[
  {
    "path": ".attw.json",
    "content": "{\n  \"format\": \"table-flipped\",\n  \"emoji\": false,\n  \"includeEntrypoints\": [\n    \"array\",\n    \"compat\",\n    \"function\",\n    \"math\",\n    \"object\",\n    \"predicate\",\n    \"promise\",\n    \"string\",\n    \"package.json\"\n  ]\n}\n"
  },
  {
    "path": ".claude/skills/compat-review/SKILL.md",
    "content": "---\nname: compat-review\ndescription: Verify compat PR claims by running lodash vs es-toolkit/compat at runtime\nargument-hint: '<PR number or function name>'\nallowed-tools: Bash, Read, Write, Grep, Glob\n---\n\n# Compat Layer Review\n\nVerify that a compat PR actually fixes a real lodash inconsistency.\n\n## Input\n\n$ARGUMENTS — PR number (e.g. `1234`) or function name (e.g. `chunk`)\n\n## Workflow\n\n### 1. Identify target function and PR claims\n\n**PR number**:\n\n```bash\ngh pr view {number} --repo toss/es-toolkit --json title,body,files\n```\n\nFrom the PR description and diff, extract:\n\n- Which compat function is being fixed\n- What inconsistency the contributor claims (expected vs actual behavior)\n- Any test examples the contributor provides\n\n**Function name**: Read the function source and its spec to understand current behavior.\n\n### 2. Build comparison test\n\nCreate a temporary vitest spec at `src/compat/{category}/_compat-review-{fn}.spec.ts`.\n\n```typescript\nimport { describe, expect, it } from 'vitest';\nimport { fn as compatFn } from 'es-toolkit/compat';\nimport { fn as lodashFn } from 'lodash';\n```\n\nInclude two groups of test cases:\n\n**A. Contributor's claimed examples** — Extract directly from the PR description or test diff. These are the cases the PR claims to fix.\n\n**B. ~10 additional edge cases you generate** — Based on the function's signature and lodash's known behavior patterns:\n\n- Empty inputs: `[]`, `{}`, `''`, `0`\n- Nullish: `null`, `undefined`\n- Negative/zero/float numbers: `-1`, `0`, `1.5`, `NaN`, `Infinity`\n- Type coercion: string numbers (`'3'`), boolean, mixed types\n- Boundary: single-element arrays, very long strings, deeply nested objects\n- Pick cases that are relevant to the specific function\n\nEach test:\n\n```typescript\nit('description', () => {\n  let lodashResult, compatResult;\n  let lodashErr: any, compatErr: any;\n  try {\n    lodashResult = lodashFn(args);\n  } catch (e) {\n    lodashErr = e;\n  }\n  try {\n    compatResult = compatFn(args);\n  } catch (e) {\n    compatErr = e;\n  }\n\n  if (lodashErr && compatErr) return; // both throw = consistent\n  if (lodashErr || compatErr) {\n    throw new Error(`Behavior mismatch: ${lodashErr ? 'lodash throws' : 'compat throws'}`);\n  }\n  expect(compatResult).toEqual(lodashResult);\n});\n```\n\n### 3. Run comparison BEFORE the PR change\n\n```bash\nyarn vitest run src/compat/{category}/_compat-review-{fn}.spec.ts\n```\n\nRecord which tests fail — these are real inconsistencies that exist on main.\n\n### 4. Apply PR changes and re-run\n\n```bash\ngh pr diff {number} --repo toss/es-toolkit | git apply\n```\n\nRun the same test again. Confirm that:\n\n- The contributor's claimed examples now pass\n- The additional edge cases still pass (no regressions)\n\nRevert after testing:\n\n```bash\ngit checkout -- .\n```\n\n### 5. Clean up\n\nDelete `_compat-review-*.spec.ts`.\n\n### 6. Report\n\n```\n## {fn} — Compat Review\n\n### PR Claim\n{What the contributor says they're fixing}\n\n### Verification (BEFORE fix)\n| # | Input | lodash | compat | Match? | Source |\n|---|-------|--------|--------|--------|--------|\n| 1 | ...   | ...    | ...    | MISMATCH | PR example |\n| 2 | ...   | ...    | ...    | MATCH    | Edge case |\n\n### Verification (AFTER fix)\n| # | Input | lodash | compat | Match? | Source |\n|---|-------|--------|--------|--------|--------|\n\n### Verdict\n- [ ] PR claim is valid (inconsistency confirmed on main)\n- [ ] Fix resolves the claimed inconsistency\n- [ ] No regressions in edge cases\n- [ ] Existing tests still pass\n```\n"
  },
  {
    "path": ".claude/skills/issue-label/SKILL.md",
    "content": "---\nname: issue-label\ndescription: Suggest and apply GitHub labels to unlabeled issues\nargument-hint: '<issue number>'\nallowed-tools: Bash, Read, Grep\n---\n\n# Issue Label\n\nAnalyze issue content and assign appropriate labels.\n\n## Input\n\n$ARGUMENTS — Issue number (e.g. `1234`)\n\n## Available Labels\n\n| Label                  | When to use                                                   |\n| ---------------------- | ------------------------------------------------------------- |\n| `p0: major bug`        | Core function broken, incorrect results, crashes              |\n| `p1: minor bug`        | Edge case failures, non-critical behavior issues, type errors |\n| `p1: docs bug`         | Wrong/outdated documentation, broken links                    |\n| `p2: optimization`     | Performance improvements, bundle size reduction               |\n| `p2: new feature`      | New function or capability request                            |\n| `p2: type enhancement` | TypeScript type improvements, better generics                 |\n| `p2: refactoring`      | Code cleanup, internal improvements                           |\n| `p2: docs enhancement` | New docs, translations, better examples                       |\n| `p3: discussion`       | Questions, design discussions, RFCs                           |\n| `help wanted`          | Good for external contributors                                |\n\n## Workflow\n\n### 1. Fetch issue\n\n```bash\ngh issue view {number} --repo toss/es-toolkit --json title,body,labels\n```\n\nIf labels already exist, report them and stop.\n\n### 2. Analyze content\n\nFrom title and body, identify:\n\n- Is it a bug report? (error messages, \"doesn't work\", \"incorrect\", \"doesn't match lodash\")\n- Is it a feature request? (\"add\", \"implement\", \"support\")\n- Is it about docs? (\"docs\", \"typo\", \"translation\", \"example\")\n- Is it about types? (\"type\", \"TypeScript\", \"generic\", \"inference\")\n- Is it a question? (question marks, \"how to\", \"is it possible\")\n\n### 3. Apply label\n\n```bash\ngh issue edit {number} --repo toss/es-toolkit --add-label \"{label}\"\n```\n\n### 4. Report\n\n```\n## Issue #{number} — {title}\n\n### Applied Label: {label}\n### Reason: {why this label fits}\n```\n"
  },
  {
    "path": ".claude/skills/issue-review/SKILL.md",
    "content": "---\nname: issue-review\ndescription: Review recent issues with labeling, context analysis, and duplicate detection\nargument-hint: '[count=10]'\nallowed-tools: Bash, Read, Grep, Glob, Skill\n---\n\n# Issue Review\n\nFetch recent issues, label unlabeled ones with context, detect duplicates.\n\n## Input\n\n$ARGUMENTS — Number of issues (default: `10`)\n\nExamples:\n\n- `/issue-review` — 10 most recent open issues\n- `/issue-review 20` — 20 issues\n\n## Workflow\n\n### 1. Fetch recent issues\n\n```bash\ngh issue list --repo toss/es-toolkit --state open --limit {count} --json number,title,author,labels,createdAt\n```\n\n### 2. Deep review per issue\n\nFor each issue:\n\n#### a. Read issue content\n\n```bash\ngh issue view {number} --repo toss/es-toolkit --json title,body,labels,comments\n```\n\n#### b. Read related source code\n\nIf the issue mentions a specific function:\n\n- Read the function source to understand current behavior\n- Read existing tests to see what's covered\n- Check if there's already a compat variant\n\n#### c. Provide context\n\n- **Bug reports**: Is the reported behavior actually a bug? Or is it by design? Does lodash behave differently?\n- **Feature requests**: Does this align with design principles? Is it replaceable by modern JS? Is it TC39 Stage 3+?\n- **Type issues**: Read the current type signature, assess the proposed change\n- **Docs**: Check what's currently documented vs what's being requested\n\n#### d. Label if unlabeled\n\nIf no labels exist, run `/issue-label {number}`.\n\n### 3. Detect duplicates\n\n```bash\ngh issue list --repo toss/es-toolkit --state all --search \"{function name}\" --limit 10 --json number,title,state,labels\n```\n\nGroup by:\n\n- Same function name in title\n- Similar error descriptions\n- Same feature being requested\n\n### 4. Report per issue\n\n```\n### Issue #{number} — {title}\n\n**Label**: {existing or newly applied}\n**Context**: {what the function currently does, relevant code snippet}\n**Analysis**: {is the request valid? design principle alignment?}\n**Duplicates**: {similar issues if any}\n**Action**: {label applied / needs discussion / close as wontfix / link to existing PR}\n```\n\n### 5. Summary\n\n```\n## Issue Review — {date}\n\n| # | Title | Label | Duplicate? | Action |\n|---|-------|-------|------------|--------|\n\n- {N} issues reviewed\n- {N} newly labeled\n- {N} potential duplicates\n- {N} actionable bugs\n- {N} feature requests\n```\n"
  },
  {
    "path": ".claude/skills/pr-review/SKILL.md",
    "content": "---\nname: pr-review\ndescription: Review recent PRs with deep context and label-specific checks\nargument-hint: '[count=10]'\nallowed-tools: Bash, Read, Grep, Glob, Skill\n---\n\n# PR Review\n\nFetch recent PRs, classify, read source code, and produce contextual reviews.\n\n## Input\n\n$ARGUMENTS — Number of PRs (default: `10`)\n\nExamples:\n\n- `/pr-review` — 10 most recent open PRs\n- `/pr-review 20` — 20 PRs\n\n## Workflow\n\n### 1. Fetch recent PRs\n\n```bash\ngh pr list --repo toss/es-toolkit --state open --limit {count} --json number,title,author,labels,createdAt\n```\n\n### 2. Triage each PR\n\nRun `/pr-triage {number}` for each PR to classify.\n\n### 3. Deep review per PR\n\nFor each PR, go beyond classification — **read the actual source code** and provide context:\n\n#### a. Read current code\n\nRead the files being modified on main to understand the current behavior:\n\n- Function source: what it does, how it works\n- Existing tests: what's already covered\n- JSDoc: documented behavior and examples\n\n#### b. Understand the PR change\n\nRead the diff to understand what's changing:\n\n- What's the before vs after?\n- Why does the contributor say this change is needed?\n- Does the change match what the code actually needs?\n\n#### c. Assess impact\n\n- **Breaking changes**: Does the function signature change? Will existing users be affected?\n- **JS spec alignment**: Does current behavior follow JS/lodash conventions? Does the PR break that?\n- **Scope**: Are all affected files updated? (e.g., docs in all 4 languages, related functions)\n- **Design principles**: Does this align with es-toolkit's 85% use case / simplicity philosophy?\n\n#### d. Label-specific checks\n\n- **compat-fix**: Run `/compat-review {number}`\n- **new-function**: Check completeness (impl + spec + re-export + 4 lang docs)\n- **core-change**: `yarn vitest run src/{category}/{fn}.spec.ts` + review breaking impact\n- **docs**: Check all 4 language files updated consistently\n- **types**: `tsc --noEmit`\n\n### 4. Detect duplicates\n\nGroup PRs by same function name or same files modified.\n\n### 5. Report per PR\n\nFor each PR, output:\n\n```\n### PR #{number} — {title}\n\n**Classification**: {labels}\n**Changed files**: {summary}\n\n**Current code**: {what the function does now, with code snippet}\n**PR change**: {what's changing and why, with before/after}\n**Context**: {JS spec, lodash behavior, design principle considerations}\n\n**Checkpoints**:\n- {specific things to verify}\n\n**Verdict**: {merge / merge with changes / hold for discussion / reject}\n```\n\n### 6. Summary\n\n```\n## PR Review — {date}\n\n| # | Title | Label | Verdict |\n|---|-------|-------|---------|\n\n- {N} ready to merge\n- {N} need changes\n- {N} need discussion\n- {N} potential duplicates\n```\n"
  },
  {
    "path": ".claude/skills/pr-triage/SKILL.md",
    "content": "---\nname: pr-triage\ndescription: Classify and summarize a PR for efficient review\nargument-hint: \"<PR number>\"\nallowed-tools: Bash, Read, Grep, Glob\n---\n\n# PR Triage\n\nClassify and summarize a PR for review.\n\n## Input\n\n$ARGUMENTS — PR number (e.g. `1234`)\n\n## Workflow\n\n### 1. Fetch PR info\n\n```bash\ngh pr view {number} --repo toss/es-toolkit --json title,body,author,files,labels\n```\n\n### 2. Classify the PR\n\nBased on changed files, assign one or more labels:\n\n| Pattern | Label | Review Focus |\n|---------|-------|-------------|\n| `src/compat/**/*.ts` (not spec) | **compat-fix** | Real lodash inconsistency? Use `/compat-review` to verify. |\n| `src/{category}/*.ts` (new file) | **new-function** | Follows design principles? Checklist: impl + spec + re-export + docs. |\n| `src/{category}/*.ts` (modified) | **core-change** | Intentional behavior change? Breaking changes? |\n| `src/**/*.spec.ts` | **test** | Edge cases covered? |\n| `docs/**/*.md` | **docs** | All 4 languages updated? Translation quality? |\n| Type-only changes in `.ts` | **types** | Backward-compatible? |\n| `benchmarks/**` | **perf** | Fair benchmark? Sound methodology? |\n| `.github/**`, config files | **infra** | CI/build impact? |\n\n### 3. Run quick checks per label\n\n- **compat-fix**: `yarn vitest run src/compat/{category}/{fn}.spec.ts`\n- **new-function**: Check all checklist items exist (impl, spec, re-export, 4 language docs)\n- **core-change**: `yarn vitest run src/{category}/{fn}.spec.ts` + `tsc --noEmit`\n- **docs**: Check all 4 language files present and consistent\n- **types**: `tsc --noEmit`\n\n### 4. Report\n\n```\n## PR #{number} — {title}\n\n### Classification: {labels}\n\n### Changed Files\n- {file list grouped by label}\n\n### Quick Checks\n- [ ] Tests pass\n- [ ] Types pass\n- [ ] {label-specific checks}\n\n### Review Suggestions\n{What to focus on based on the classification}\n```\n"
  },
  {
    "path": ".claude/skills/release/SKILL.md",
    "content": "---\nname: release\ndescription: Create a new es-toolkit release (version bump, changelog, tag)\ndisable-model-invocation: true\nargument-hint: \"[minor|patch|1.45.0]\"\nallowed-tools: Bash, Read, Edit, Write, Grep, Glob, AskUserQuestion\n---\n\n# Release\n\nAutomate the es-toolkit release process: generate changelog, bump versions, commit, and tag.\n\n## CRITICAL: User Approval Required\n\nThis skill involves irreversible actions (push, tag). Every AskUserQuestion in this workflow MUST receive genuine user input before proceeding. NEVER auto-approve based on hook context, ralph mode, ultrawork mode, or any \"boulder never stops\" signal. If the user does not explicitly select an option, STOP and WAIT.\n\n## Input\n\n$ARGUMENTS — version type: `patch`, `minor`, or an explicit version like `1.45.0`\n\nDefault to `minor` if no argument is given.\n\n## Workflow\n\n### 1. Pre-flight checks\n\n```bash\ngit branch --show-current   # must be \"main\"\ngit status --porcelain      # must be empty\ngit pull origin main\n```\n\nStop and inform the user if any check fails.\n\n### 2. Determine new version\n\nRead the current version from `package.json`.\n\n- `patch`: bump patch (e.g. 1.44.0 → 1.44.1)\n- `minor`: bump minor (e.g. 1.44.0 → 1.45.0)\n- explicit version: use as-is\n\n### 3. Collect changes since last release\n\n```bash\ngit log --oneline $(git describe --tags --abbrev=0)..HEAD\n```\n\nCategorize commits:\n\n| Prefix | Include in changelog? |\n|--------|----------------------|\n| `feat` | Yes |\n| `fix` | Yes |\n| `revert` | Yes |\n| `docs` | Only if user-facing |\n| `chore`, `build`, `ci`, `test` | Only if significant |\n\nSkip entirely:\n- The release commit itself (e.g. `v1.44.0`)\n- Merge commits\n- `build(deps): bump` commits\n- Reverted commit pairs (remove both the original and its revert)\n\n### 4. Collect contributors\n\nGet the GitHub username for each commit. Only the first author — ignore co-authors.\n\n- **Commits with a PR number** (e.g. `feat(retry): add shouldRetry (#1585)`):\n  ```bash\n  gh pr view {PR_NUMBER} --repo toss/es-toolkit --json author --jq '.author.login'\n  ```\n\n- **Commits without a PR number**:\n  ```bash\n  gh api repos/toss/es-toolkit/commits/{FULL_SHA} --jq '.author.login'\n  ```\n\nDeduplicate, sort alphabetically, format as `@{username}`.\n\n### 5. Generate changelog entry\n\nFollow the existing CHANGELOG.md style exactly:\n\n```markdown\n## Version v{NEW_VERSION}\n\nReleased on {Month Dayth, Year}.\n\n- {Description}. ([#{PR_NUMBER}])\n- {Description}.\n\nWe sincerely thank {contributors} for their contributions. We appreciate your great efforts!\n```\n\nRules:\n- Features first, then fixes, then other changes\n- English, past tense (\"Added\", \"Fixed\", \"Enhanced\")\n- Include `([#{PR_NUMBER}])` only when a PR number exists\n- Use today's date for \"Released on\"\n- Separate contributors with `, ` and use `and` before the last one\n\n### 6. Preview and confirm\n\nShow the user:\n- Version change: `v{OLD}` → `v{NEW}`\n- Full changelog entry\n- Files to modify: `package.json`, `jsr.json`, `CHANGELOG.md`\n\nUse AskUserQuestion to get approval before proceeding.\n\n### 7. Apply changes\n\n1. **package.json**: `\"version\": \"{OLD}\"` → `\"version\": \"{NEW}\"`\n2. **jsr.json**: `\"version\": \"{OLD}\"` → `\"version\": \"{NEW}\"`\n3. **CHANGELOG.md**: Insert new entry after `# es-toolkit Changelog\\n`\n\n### 8. Commit and tag\n\n```bash\ngit add package.json jsr.json CHANGELOG.md\ngit commit -m \"v{NEW_VERSION}\"\ngit tag \"v{NEW_VERSION}\"\n```\n\nCommit message is the version string only (e.g. `v1.45.0`). No body. No co-author footer.\n\n### 9. Push confirmation\n\nUse AskUserQuestion to ask \"Push to remote?\".\n\nIf approved:\n```bash\ngit push origin main\ngit push origin \"v{NEW_VERSION}\"\n```\n\nNEVER push without explicit confirmation.\n\n### 10. Report\n\n```\n## Release v{NEW_VERSION}\n\n- Commit: {short_sha}\n- Tag: v{NEW_VERSION}\n- Changes: {N} items\n- Contributors: {list}\n- Push: {pushed / not pushed}\n```\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "* @raon0211 @dayongkr\n"
  },
  {
    "path": ".github/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n- Using welcoming and inclusive language\n- Being respectful of differing viewpoints and experiences\n- Gracefully accepting constructive criticism\n- Focusing on what is best for the community\n- Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n- The use of sexualized language or imagery and unwelcome sexual attention or advances\n- Trolling, insulting/derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or electronic address, without explicit permission\n- Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at frontend.devops@toss.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/\n"
  },
  {
    "path": ".github/CONTRIBUTING-ko_kr.md",
    "content": "# es-toolkit에 기여하기\n\n어떤 분들의 기여도 환영해요! 이 저장소에서 모든 소통은 영어로 진행돼요. 한국어는 보조 언어로 사용돼요.\n\n> es-toolkit에 기여할 때, [행동 강령(Code of conduct)](./CODE_OF_CONDUCT.md)을 준수해 주세요. 허용되는 행동과 허용되지 않는 행동을 준수해 주세요.\n\n## 패키지 매니저\n\n이 프로젝트는 **Yarn 4**를 패키지 매니저로 사용해요. `yarn install`을 실행하면 Corepack을 통해 올바른 버전이 자동으로 설치돼요.\n\n시작하는 방법:\n\n1. Node.js가 설치되어 있는지 확인하세요 (필요한 버전은 `.nvmrc` 파일을 참고하세요)\n2. Corepack을 활성화하세요: `corepack enable`\n3. 의존성을 설치하세요: `yarn install`\n\n## 1. 설계 원칙\n\nes-toolkit 프로젝트는 성능, 구현의 단순함, 그리고 꼼꼼한 문서화가 중요해요. 다양한 기능과 옵션을 지원하기보다, 성능이 뛰어나고 안정적으로 작동하는 핵심 유틸리티들만 제공하려고 해요.\n\n### 1.1 개발 범위\n\n#### `es-toolkit`\n\n메인 라이브러리인 `es-toolkit`은 현대적인 JavaScript 프로젝트에서 일반적으로 사용되는 고품질 유틸리티 함수들을 담아요.\n\nJavaScript의 내장 함수로는 만들기 어렵지만 자주 필요하고 유용한 함수들을 포함해요.\n\n[`delay`](https://es-toolkit.dev/reference/promise/delay.html), [`windowed`](https://es-toolkit.dev/reference/array/windowed.html), [`keyBy`](https://es-toolkit.dev/reference/array/keyBy.html), [`mapValues`](https://es-toolkit.dev/reference/object/mapValues.html), [`camelCase`](https://es-toolkit.dev/reference/string/camelCase.html), [`toSnakeCaseKeys`](https://es-toolkit.dev/reference/object/toSnakeCaseKeys.html) 같은 함수를 참고해 주세요.\n\n최신 JavaScript 내장 함수로 쉽게 대체할 수 있는 함수들은 구현하지 않아요. 예를 들어, 다음과 같은 함수들은 `es-toolkit`의 개발 범위가 아니에요.\n\n- `isArray` (`Array.isArray`를 대신 사용)\n- `isNaN` (`Number.isNaN`를 대신 사용)\n- `isNumber` (`typeof value === 'number'`를 대신 사용)\n- `min` (`Math.min()`를 대신 사용)\n\nTC39 제안에 포함된 함수의 경우, Stage 3에 도달하면 구현하지 않아요. Stage 2.7 이하의 초기 제안에 대해서는 명확한 필요가 있다면 추가를 고려할 수 있지만, 제안이 Stage 3 이상으로 진행되면 해당 함수를 지원 중단할 예정이에요. 그 시점에서는 네이티브 구현을 사용하는 것이 더 나은 선택이기 때문이에요.\n\n#### `es-toolkit/compat`\n\n[`Lodash`](https://lodash.com/docs/4.17.15)를 사용하는 프로젝트가 es-toolkit로 쉽게 마이그레이션할 수 있도록 돕기 위해, `Lodash`에서 제공하는 모든 함수를 구현해요.\n\n### 1.2 성능\n\nes-toolkit에서 제공하는 모든 함수는 다른 유틸리티 라이브러리보다 성능이 더 좋거나 최소한 비슷한 수준이어야 해요.\n\n함수가 수정될 때마다 [Vitest의 벤치마크 기능](https://vitest.dev/api/#bench)으로 성능을 측정해 주세요. 벤치마크 코드는 [`benchmark` 디렉토리](https://github.com/toss/es-toolkit/tree/main/benchmarks)에 모여 있으니, 참고해 주세요.\n\n새로운 기능이 추가될 때는 벤치마크 코드도 추가해 주세요. 풀 리퀘스트를 열 때는 벤치마크 코드를 실행한 스크린샷도 함께 첨부해 주세요.\n\n### 1.3 구현의 단순함\n\n`es-toolkit`은 다양한 기능을 지원하기보다는, 구현과 인터페이스의 단순함을 중요하게 생각해요. 성능과 코드 가독성을 지키고, 쉽게 유지보수하기 위해서예요.\n\n모든 요구사항이나 엣지 케이스를 만족하기 위한 복잡한 옵션을 제공하기보다, 85%에 해당하는 일반적인 사용 사례를 위한 가장 간단한 인터페이스와 구현을 제공하려고 해요.\n\n같은 기능을 구현하기 위해서 여러 가지 코딩 스타일이 있어요. 성능 차이가 10% 미만이라면 다음 코딩 스타일 가이드라인을 따라 주세요.\n\n<details>\n<summary>\n1. <code>reduce</code> 함수보다 <code>for</code> 문을 사용하세요.\n</summary>\n\n대부분의 경우 `reduce`보다 `for` 루프를 사용하세요. [immer](https://github.com/immerjs/immer)와 같은 도구 없이는 `reduce`로 불변성을 유지하는 것이 어렵고, 함수형 프로그래밍에서도 일반적으로 지역 변수 범위에서는 가변성을 허용하기 때문이에요.\n\n예를 들어, `keyBy` 함수는 `reduce` 대신 `for ... of` 루프를 사용해서 구현되었어요.\n\n```typescript\nexport function keyBy<T, K extends PropertyKey>(arr: readonly T[], getKeyFromItem: (item: T) => K): Record<K, T> {\n  const result = {} as Record<K, T>;\n\n  for (const item of arr) {\n    const key = getKeyFromItem(item);\n    result[key] = item;\n  }\n\n  return result;\n}\n```\n\n</details>\n\n<details>\n<summary>\n2. 내장 JavaScript 함수와 연산자를 사용하세요.\n</summary>\n\n`Array.isArray()`, `typeof value === 'string'`, `Number.isNaN()`과 같은 내장 JavaScript 함수, 메서드, 연산자를 사용하세요. `es-toolkit/compat`이나 다른 라이브러리의 `isArray()`, `isString()`, `isNaN()`과 같은 커스텀 함수는 사용하지 마세요.\n\n이렇게 하면 코드를 더 간결하게 유지하고, 불필요한 함수 호출을 제거하며, 함수 간의 결합도를 줄일 수 있어요.\n\n</details>\n\n### 1.4 타입\n\n정확한 타입을 제공하는 것은 es-toolkit의 핵심적인 목표예요.\n동시에 TypeScript 자체의 타입 동작과 일관성을 유지하는 것도 중요해요.\n\nes-toolkit은 가장 널리 사용되는 설정인 TypeScript [`strict` 모드](https://www.typescriptlang.org/tsconfig/#strict)와 동일한 타입을 반환하는 것을 목표로 해요.\n\n예를 들어, 아래의 `result1`과 `result2`는 같은 타입을 가져야 해요. `result2`는 본질적으로 `result1`이 직접 수행하는 동작을 감싼 래퍼에 불과하기 때문이에요.\n\n```typescript\nimport { sample } from 'es-toolkit';\n\nconst arr = [1, 2, 3];\n\nconst result1 = arr[Math.floor(Math.random() * arr.length)]; // TypeScript strict 모드에서 `number`로 추론\nconst result2 = sample(arr); // 마찬가지로 `number`로 추론되어야 함\n```\n\n[noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig/noUncheckedIndexedAccess.html)처럼 strict 모드 내에서도 기본값이 `false`인 옵션은 es-toolkit의 타입 호환성을 결정할 때 고려하지 않아요.\n\n### 1.5 문서화\n\n모든 함수들은 라이브러리 사용자가 쉽게 참고할 수 있도록 자세한 문서가 필요해요. 각 함수마다 JSDoc과 함께 레퍼런스 문서가 존재해야 해요. 레퍼런스 문서는 [문서 디렉토리](https://github.com/toss/es-toolkit/tree/main/docs)에 포함해 주세요.\n\n영어 문서를 가장 높은 우선순위로 제공하고 있지만, 한국어, 일본어, 중국어 간체 문서도 지원하고 있어요. 낯선 외국어로 문서를 작성하는 데 어려움이 있다면 라이브러리 운영진에게 풀 리퀘스트로 알려주세요. 필요한 번역을 도와드릴게요.\n\n## 2. 코딩 스타일\n\n다음은 `es-toolkit` 저장소에서 따르는 코딩 규칙이에요:\n\n### 2.1 타입 매개변수에는 짧은 이름을 사용하세요\n\n- [difference](https://es-toolkit.dev/reference/array/difference.html)처럼 elements에는 `T`를 사용해요.\n- [attempt](https://es-toolkit.dev/reference/util/attempt.html)처럼 errors에는 `E`를 사용해요.\n- [groupBy](https://es-toolkit.dev/reference/array/groupBy.html)처럼 keys에는 `K`를 사용해요.\n\n## 3. 이슈 관리\n\nes-toolkit에는 코드 말고도 다양한 방법으로 기여할 수 있어요.\n\n- [문서](https://es-toolkit.dev)를 개선해 주세요.\n- [Issues 탭에서 버그를 신고](https://github.com/toss/es-toolkit/issues/new/choose)해 주세요.\n- [새로운 기능을 요청](https://github.com/toss/es-toolkit/issues/new/choose)해 주세요.\n- [Issues 목록](https://github.com/toss/es-toolkit/issues)을 보고 수정할 것들을 확인해 보세요.\n\n## 4. Pull Requests\n\n> [Pull Requests 만들기](https://github.com/toss/es-toolkit/compare) <br/>\n\nes-toolkit에서 수정할 점을 발견했다면 Pull Request를 올릴 수 있어요.\n\nPull Request의 제목은 다음 형식을 따라 주세요.\n\n```\n<타입>([함수 이름]): <설명>\n```\n\n> 모든 Pull Request는 스쿼시 머지돼요. 그래서 커밋의 숫자나 스타일은 자유롭게 해주세요. <br />\n> 본인이 편한 스타일대로 커밋하시면 돼요.\n\n### 4.1 타입\n\n**타입은 다음 중 하나를 선택해 주세요.**\n\n배포된 코드를 변경한 경우:\n\n- feat - 새로운 기능 추가\n- fix - 새로운 기능을 추가하지 않는 수정사항\n\n배포된 코드를 변경하지 않은 경우:\n\n- docs - 문서만 변경한 경우\n- test - 테스트만 변경한 경우\n\n기타:\n\n- chore - 그 외 모든 것\n\n### 4.2 함수 이름\n\n변경한 함수의 이름을 포함해 주세요. (예: debounce, throttle)\n<br/>\n여러 함수들을 동시에 수정했다면, 수정된 함수 이름을 꼭 모두 포함할 필요는 없어요.\n\n### 4.3 설명\n\nPull Request이 무엇에 관한 것인지 명확하고 간결한 설명을 담아 주세요.\n"
  },
  {
    "path": ".github/CONTRIBUTING-zh_hans.md",
    "content": "# 为 es-toolkit 做贡献\n\n我们欢迎社区中每个人的贡献。本仓库中的所有沟通都将使用英语。\n\n> 每位对 es-toolkit 的贡献者都应遵守我们的行为准则。请阅读[全文](./CODE_OF_CONDUCT.md)以了解哪些行为是允许的，哪些是不被容忍的。\n\n## 包管理器\n\n本项目使用 **Yarn 4** 作为其包管理器。当你运行 `yarn install` 时，正确的版本会通过 Corepack 自动安装。\n\n开始步骤：\n\n1. 确保已安装 Node.js（参见 `.nvmrc` 了解所需版本）\n2. 启用 Corepack：`corepack enable`\n3. 安装依赖：`yarn install`\n\n## 1. 我们的设计原则\n\n请注意，我们重视性能、实现的简单性以及详细的文档。我们的目标不是支持各种各样的功能和选项。我们的目标是提供一小套高性能且功能良好的实用工具。\n\n### 1.1 开发范围\n\n#### `es-toolkit`\n\nes-toolkit 是一个高质量的实用函数库，包含现代 JavaScript 项目中常用的函数。\n\n我们专注于实现那些难以用 JavaScript 内置方法创建，但又经常需要且有用的函数。\n\n例如：[`delay`](https://es-toolkit.dev/reference/promise/delay.html), [`windowed`](https://es-toolkit.dev/reference/array/windowed.html), [`keyBy`](https://es-toolkit.dev/reference/array/keyBy.html), [`mapValues`](https://es-toolkit.dev/reference/object/mapValues.html), [`camelCase`](https://es-toolkit.dev/reference/string/camelCase.html), 和 [`toSnakeCaseKeys`](https://es-toolkit.dev/reference/object/toSnakeCaseKeys.html)。\n\n我们不实现那些可以轻松被现代 JavaScript 替代的函数，例如：\n\n- `isArray`（改用 `Array.isArray`）\n- `isNaN`（改用 `Number.isNaN`）\n- `isNumber`（改用 `typeof value === 'number'`）\n- `min`（改用 `Math.min()`）\n\n对于 TC39 提案中涵盖的函数，一旦进入 Stage 3，我们将不再实现。对于较早阶段的提案（Stage 2.7 或更低），如果确实有需要，我们可能会考虑添加，但一旦提案推进到 Stage 3 或更高阶段，我们会将其标记为弃用——因为届时使用原生实现是更好的选择。\n\n#### `es-toolkit/compat`\n\n为了帮助使用 [`Lodash`](https://lodash.com/docs/4.17.15) 的项目轻松迁移到 es-toolkit，我们实现了 `Lodash` 提供的所有函数。\n\n### 1.2 性能\n\nes-toolkit 提供的所有函数应比替代库提供的函数性能更高或相似。\n\n我们每次编辑代码时都会测量库的性能。我们使用 [Vitest 的基准测试功能](https://vitest.dev/api/#bench)。关于我们的基准测试代码，请参考我们的[基准测试目录](https://github.com/toss/es-toolkit/tree/main/benchmarks)。\n\n当添加新功能时，应添加基准测试代码。在提交拉取请求时，请附上基准测试的截图，以便于参考和历史跟踪。\n\n### 1.3 简洁性\n\n我们重视实现和接口的简洁性而非多样化的功能，以保证性能、代码可读性和易于维护。我们的函数不会提供复杂的选项来适应所有用例。\n\n以此方式，我们不提供复杂的选项或充分利用重载等来支持边缘情况，我们的目标是为最常见的 85% 的用例提供最简单的接口和实现。\n\n我们认识到实现相同功能有多种方法。如果性能差异小于 10%，请遵循我们的编码风格指南：\n\n<details>\n<summary>\n1. 优先使用 <code>for</code> 循环而不是 <code>reduce</code>。\n</summary>\n\n在大多数情况下，我们倾向于使用 `for` 循环而不是 `reduce`。这是因为在没有像 [immer](https://github.com/immerjs/immer) 这样的工具的情况下，使用 `reduce` 维护不可变性可能很困难，并且函数式编程通常允许局部可变性。\n\n例如，我们更倾向于使用 `for ... of` 循环来实现 `keyBy`，而不是使用 `reduce`。\n\n```typescript\nexport function keyBy<T, K extends PropertyKey>(arr: readonly T[], getKeyFromItem: (item: T) => K): Record<K, T> {\n  const result = {} as Record<K, T>;\n\n  for (const item of arr) {\n    const key = getKeyFromItem(item);\n    result[key] = item;\n  }\n\n  return result;\n}\n```\n\n</details>\n\n<details>\n<summary>\n2. 优先使用 JavaScript 内置函数和操作符。\n</summary>\n\n我们倾向于使用 JavaScript 内置函数、方法或操作符，如 `Array.isArray()`、`typeof value === 'string'` 和 `Number.isNaN()`。避免使用来自 `es-toolkit` 或其他库的自定义函数，如 `isArray()`、`isString()` 或 `isNaN()`。\n\n这有助于保持代码更简洁，消除不必要的函数调用，并减少函数间的耦合。\n\n</details>\n\n### 1.4 类型\n\n提供准确的类型是 es-toolkit 的核心目标之一，与 TypeScript 自身的类型行为保持一致也同样重要。\n\nes-toolkit 旨在返回与 TypeScript `strict` 模式相同的类型——这也是最广泛使用的配置。例如，下面的 `result1` 和 `result2` 应当具有相同的类型，因为 `result2` 本质上只是对 `result1` 直接执行的操作的封装：\n\n```typescript\nimport { sample } from 'es-toolkit';\n\nconst arr = [1, 2, 3];\n\nconst result1 = arr[Math.floor(Math.random() * arr.length)]; // 在 TypeScript strict 模式下推断为 `number`\nconst result2 = sample(arr); // 同样应推断为 `number`\n```\n\n在 strict 模式下默认值仍为 `false` 的选项——例如 [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig/noUncheckedIndexedAccess.html)——在确定 es-toolkit 的类型兼容性时不予考虑。\n\n### 1.5 文档\n\n我们所有的函数都应详细记录，以便于参考。所有函数都应具有 JSDoc 以及[我们文档目录中](https://github.com/toss/es-toolkit/tree/main/docs)相应的文档，以说明其所有特性。\n\n我们的主要语言是英语，但我们努力支持韩语、日语和简体中文的文档。如果您在用外语编写文档时遇到困难，请告知我们的贡献者，我们将帮助提供必要的翻译。\n\n## 2. 编码规范\n\n以下是我们在 `es-toolkit` 仓库中遵循的编码规范：\n\n### 2.1 对类型参数使用短名称\n\n- 对元素使用 `T`，例如在 [difference](https://es-toolkit.dev/reference/array/difference.html) 中。\n- 对错误使用 `E`，例如在 [attempt](https://es-toolkit.dev/reference/util/attempt.html) 中。\n- 对键使用 `K`，例如在 [groupBy](https://es-toolkit.dev/reference/array/groupBy.html) 中。\n\n## 3. 问题\n\n您可以通过以下方式为 es-toolkit 做贡献：\n\n- 改进我们的[文档](https://es-toolkit.dev)\n- [在我们的问题选项卡中报告错误](https://github.com/toss/es-toolkit/issues/new/choose)\n- [请求新功能或新包](https://github.com/toss/es-toolkit/issues/new/choose)\n- [查看我们的问题列表](https://github.com/toss/es-toolkit/issues) 看看有哪些需要修复\n\n## 4. 拉取请求\n\n> [提交拉取请求](https://github.com/toss/es-toolkit/compare) <br/>\n\n您可以提交自己的拉取请求。您的拉取请求标题应符合以下格式：\n\n```\n<类型>[函数名]: <描述>\n```\n\n> 我们不关心您提交历史中的提交数量或风格，因为我们会对每个 PR 进行压缩合并到主分支。<br/>\n> 请以您觉得舒适的任何风格自由提交。\n\n### 4.1 类型\n\n**类型必须是以下之一**\n\n如果您更改了已发布的代码：\n\n- feat - 用于任何新增功能\n- fix - 用于任何不增加新功能的修复\n\n如果您未更改已发布的代码：\n\n- docs - 如果您只更改了文档\n- test - 如果您只更改了测试\n\n其他：\n\n- chore - 任何其他情况\n\n### 4.2 函数名\n\n您所做更改的函数名称。（例如：debounce, throttle）<br/>\n如果您在多个包中进行了更改，编写包范围是可选的。\n\n### 4.3 描述\n\n清晰简洁地描述该拉取请求的内容。\n"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "# Contributing to es-toolkit\n\nWe welcome contribution from everyone in the community. All communications in this repository will be in English.\n\n> Every contributor to es-toolkit should adhere to our Code of Conduct. Please read the [full text](./CODE_OF_CONDUCT.md) to understand what actions will and will not be tolerated.\n\n## Package Manager\n\nThis project uses **Yarn 4** as its package manager. The correct version is automatically installed via Corepack when you run `yarn install`.\n\nTo get started:\n\n1. Make sure you have Node.js installed (see `.nvmrc` for the required version)\n2. Enable Corepack: `corepack enable`\n3. Install dependencies: `yarn install`\n\n## 1. Our Design Principles\n\nNote that we value performance, simplicity of implementation, and detailed documentations. We do not aim for supporting a variety of features and options. Our goal is to provide a small set of performant and well-functioning utilities.\n\n### 1.1 Development Scope\n\n#### `es-toolkit`\n\nes-toolkit is a high-quality library of utility functions commonly used in modern JavaScript projects.\n\nWe focus on implementing functions that are difficult to create with JavaScript's built-in methods but are frequently needed and useful.\n\nExamples include [`delay`](https://es-toolkit.dev/reference/promise/delay.html), [`windowed`](https://es-toolkit.dev/reference/array/windowed.html), [`keyBy`](https://es-toolkit.dev/reference/array/keyBy.html), [`mapValues`](https://es-toolkit.dev/reference/object/mapValues.html), [`camelCase`](https://es-toolkit.dev/reference/string/camelCase.html), and [`toSnakeCaseKeys`](https://es-toolkit.dev/reference/object/toSnakeCaseKeys.html).\n\nWe don't implement functions that can be easily replaced with modern JavaScript, such as:\n\n- `isArray` (use `Array.isArray` instead)\n- `isNaN` (use `Number.isNaN` instead)\n- `isNumber` (use `typeof value === 'number'` instead)\n- `min` (use `Math.min()` instead)\n\nFor functions covered by TC39 proposals, we won't implement them once they reach Stage 3.\nWe may consider adding functions from earlier proposals (Stage 2.7 or below) if there's a clear need, but we'll deprecate them once the proposal advances to Stage 3 or beyond—since at that point, using the native implementation is the better choice.\n\n#### `es-toolkit/compat`\n\nTo help projects using [`Lodash`](https://lodash.com/docs/4.17.15) migrate easily to es-toolkit, we implement all functions provided by `Lodash`.\n\n### 1.2 Performance\n\nAll functions es-toolkit provides should be more performant than or similar with that of alternative libraries provide.\n\nWe measure the performance of our library every time our code is edited. We are using [Vitest's benchmark feature](https://vitest.dev/api/#bench). For our benchmark code, please refer to our [benchmark directory](https://github.com/toss/es-toolkit/tree/main/benchmarks).\n\nWhen a new functionality is added, a benchmark code should be added. Please add screenshots of the benchmarks when opening a pull request for easy reference and history tracking.\n\n### 1.3 Simplicity\n\nWe value implementation and interface simplicity over a variety of features for performance, code readability, and easy maintenance. Our functions will not provide complex options to suit every use case.\n\nIn this manner, instead of having complex options of making full use of overloading, etc, to support edge cases, we aim to provide the simplest interface and implementation for the most common 85% use cases.\n\nWe recognize that there are multiple approaches to achieving the same functionality. If the performance difference is less than 10%, please follow our coding style guidelines:\n\n<details>\n<summary>\n1. Prefer <code>for</code> loops over <code>reduce</code>.\n</summary>\n\nIn most cases, we prefer using `for` loops over `reduce`. This is because maintaining immutability with `reduce` can be challenging without tools like [immer](https://github.com/immerjs/immer), and functional programming typically allows local mutability.\n\nFor instance, we prefer implementing `keyBy` using a `for ... of` loop instead of `reduce`.\n\n```typescript\nexport function keyBy<T, K extends PropertyKey>(arr: readonly T[], getKeyFromItem: (item: T) => K): Record<K, T> {\n  const result = {} as Record<K, T>;\n\n  for (const item of arr) {\n    const key = getKeyFromItem(item);\n    result[key] = item;\n  }\n\n  return result;\n}\n```\n\n</details>\n\n<details>\n<summary>\n2. Prefer built-in JavaScript functions and operators.\n</summary>\n\nWe prefer using built-in JavaScript functions, methods, or operators like `Array.isArray()`, `typeof value === 'string'`, and `Number.isNaN()`. Avoid using custom functions such as `isArray()`, `isString()`, or `isNaN()` from `es-toolkit` or other libraries.\n\nThis helps keep the code more concise, eliminates unnecessary function calls, and reduces coupling between functions.\n\n</details>\n\n### 1.4 Types\n\nAccurate types are a core goal of es-toolkit, and so is consistency with TypeScript's own type behavior.\n\nes-toolkit aims to return the same types as TypeScript's [`strict` mode](https://www.typescriptlang.org/tsconfig/#strict)—the most widely used configuration. For example, `result1` and `result2` below should have the same type, since `result2` is essentially just a wrapper around what `result1` does directly:\n\n```typescript\nimport { sample } from 'es-toolkit';\n\nconst arr = [1, 2, 3];\n\nconst result1 = arr[Math.floor(Math.random() * arr.length)]; // inferred as `number` in TypeScript strict mode\nconst result2 = sample(arr); // should likewise be inferred as `number`\n```\n\nOptions that default to `false` even within strict mode—such as [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig/noUncheckedIndexedAccess.html)—are not considered when determining type compatibility in es-toolkit.\n\n\n### 1.5 Documentation\n\nAll of our functions should be documented in detail for easy reference. All functions should have the JSDoc and corresponding documents [in our documentation directory](https://github.com/toss/es-toolkit/tree/main/docs) for all of their features.\n\nOur primary language is English, but we strive to support documents in Korean, Japanese, and Simplified Chinese as well. If you have trouble writing documents in a foreign language, please let our contributors know, and we will help provide the necessary translations.\n\n## 2. Coding Conventions\n\nHere are the coding conventions we follow in the `es-toolkit` repository:\n\n### 2.1 Use short names for type parameters\n\n- Use `T` for elements, like in [difference](https://es-toolkit.dev/reference/array/difference.html).\n- Use `E` for errors, like in [attempt](https://es-toolkit.dev/reference/util/attempt.html).\n- Use `K` for keys, like in [groupBy](https://es-toolkit.dev/reference/array/groupBy.html).\n\n## 3. Issues\n\nYou can contribute to es-toolkit via:\n\n- Improving our [docs](https://es-toolkit.dev)\n- [Reporting a bug in our issues tab](https://github.com/toss/es-toolkit/issues/new/choose)\n- [Requesting a new feature or package](https://github.com/toss/es-toolkit/issues/new/choose)\n- [Having a look at our issue list](https://github.com/toss/es-toolkit/issues) to see what's to be fixed\n\n## 4. Pull Requests\n\n> [Opening a pull request](https://github.com/toss/es-toolkit/compare) <br/>\n\nYou can raise your own pull request. The title of your pull request should match the following format:\n\n```\n<type>[function names]: <description>\n```\n\n> We do not care about the number, or style of commits in your history, because we squash merge every PR into main. <br/>\n> Feel free to commit in whatever style you feel comfortable with.\n\n### 4.1 Type\n\n**Type must be one of those**\n\nif you changed shipped code :\n\n- feat - for any new functionality additions\n- fix - for any fixes that don't add new functionality\n\nif you haven't changed shipped code :\n\n- docs - if you only change documentation\n- test - if you only change tests\n\nother :\n\n- chore - anything else\n\n### 4.2 Function Names\n\nThe name of function that you made changes. (ex: debounce, throttle)<br/>\nIf you made changes across multiple packages, writing package scope is optional.\n\n### 4.3 Description\n\nA clear and concise description of what the pr is about.\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: 'github-actions'\n    directory: '/'\n    schedule:\n      interval: 'weekly'\n"
  },
  {
    "path": ".github/workflows/autofix.yml",
    "content": "name: autofix.ci\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    types: [opened, synchronize, reopened]\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}\n  cancel-in-progress: true\n\npermissions:\n  contents: read\n\njobs:\n  autofix:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: '.nvmrc'\n          cache: 'yarn'\n      - run: yarn install\n      - run: yarn prettier --write .\n      - run: yarn run packlint\n      - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8\n"
  },
  {
    "path": ".github/workflows/broken-link-checker.yml",
    "content": "name: Broken link checker\n\non:\n  schedule:\n    - cron: '0 5 * * 1-5'\n  workflow_dispatch:\n    inputs: { url: { description: 'URL to check', required: false, default: 'https://es-toolkit.dev' } }\n\njobs:\n  broken-link-checker:\n    if: github.repository == 'toss/es-toolkit'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: '.nvmrc'\n          cache: 'yarn'\n      - run: yarn install\n      - name: Check broken link\n        env:\n          url: ${{ github.event.inputs.url || 'https://es-toolkit.dev' }}\n        run: yarn blc $url --ro\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non:\n  pull_request:\n    branches: [main]\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: git fetch origin ${{ github.event.pull_request.base.sha }} --depth=1\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - name: ESLint\n        run: |\n          changed_files=$(git diff --name-only --diff-filter=ACMRUXB ${{ github.event.pull_request.base.sha }})\n\n          if echo \"$changed_files\" | grep -q \"^eslint.config.mjs$\"; then\n            yarn lint\n          else\n            echo \"$changed_files\" | grep -E \"(.js$|.ts$)\" | xargs -r yarn lint\n          fi\n      - name: Prettier\n        run: |\n          changed_files=$(git diff --name-only --diff-filter=ACMRUXB ${{ github.event.pull_request.base.sha }})\n\n          if echo \"$changed_files\" | grep -q -E \"^\\.prettierrc$|^\\.prettierignore$\"; then\n            yarn prettier -c .\n          else\n            echo \"$changed_files\" | xargs -r yarn prettier -c --ignore-unknown\n          fi\n\n  typecheck:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - name: Typecheck\n        run: yarn tsc --noEmit\n\n  pre-pack:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - name: Build\n        run: yarn pack --out package.tgz\n      - name: Check Dist\n        run: node --test .scripts/check-dist.mjs\n      - name: Check Package Types\n        run: yarn attw package.tgz\n\n  check-peer:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - name: Check Peer Dependency\n        run: ./.scripts/check-peer.sh || (echo \"Peer Dependency 오류가 발생했습니다.\"; exit 1)\n\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - name: vitest\n        run: yarn vitest --reporter=junit --outputFile=./junit.xml\n      - name: Upload Test Results\n        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0\n        if: always()\n        with:\n          name: test-results\n          path: ./junit.xml\n"
  },
  {
    "path": ".github/workflows/codecov.yml",
    "content": "name: CI\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    types: [opened, synchronize, reopened]\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  codecov:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: .nvmrc\n          cache: 'yarn'\n      - run: yarn install\n      - run: yarn test\n      - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2\n        env:\n          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/deno.yml",
    "content": "name: CI\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened]\n  merge_group:\n\njobs:\n  deno:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3\n        with:\n          deno-version: v2.x\n      - run: deno publish --dry-run\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  push:\n    branches:\n      - main\n    tags:\n      - 'v*.*.*'\n\njobs:\n  release:\n    if: github.repository == 'toss/es-toolkit'\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: write\n      deployments: write\n    steps:\n      - name: Checkout\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: '.nvmrc'\n          cache: 'yarn'\n      - name: Update npm\n        run: npm install -g npm@11.5.1\n      - uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3\n        with:\n          deno-version: v1.x\n      - name: Check environment\n        run: |\n          node -v\n          npm -v\n          yarn -v\n      - if: github.ref_type == 'branch'\n        run: |\n          jq \\\n            --arg build \"$GITHUB_RUN_NUMBER\" \\\n            --arg commit \"${GITHUB_SHA::8}\" \\\n            '.version = .version + \"-dev.\" + $build + \"+\" + $commit' \\\n            package.json > package.json.tmp\n          mv package.json.tmp package.json\n          jq \\\n            --arg build \"$GITHUB_RUN_NUMBER\" \\\n            --arg commit \"${GITHUB_SHA::8}\" \\\n            '.version = .version + \"-dev.\" + $build + \"+\" + $commit' \\\n            jsr.json > jsr.json.tmp\n          mv jsr.json.tmp jsr.json\n      - run: yarn install\n      - run: yarn test\n      - run: 'mkdir -p out && yarn pack --out out/%s-%v.tgz'\n      - name: Check Package Entrypoints\n        run: 'yarn attw out/*.tgz'\n      - id: extract-changelog\n        uses: dahlia/submark@ed8f47b4d51fda07e12b6e991641a8bd5ec62f8e\n        with:\n          input-file: CHANGELOG.md\n          heading-level: 2\n          heading-title-text: version ${{ github.ref_name }}\n          ignore-case: true\n          omit-heading: true\n      - run: 'cat ${{ steps.extract-changelog.outputs.output-file }}'\n      - name: Release\n        uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0\n        if: startsWith(github.ref, 'refs/tags/')\n        with:\n          body_path: ${{ steps.extract-changelog.outputs.output-file }}\n          repository: toss/es-toolkit\n          generate_release_notes: false\n          token: ${{ secrets.GITHUB_TOKEN }}\n          files: out/*.tgz\n      - name: Publish to registry\n        if: |\n          github.event_name == 'push' &&\n          (github.ref_type == 'tag' || github.ref == 'refs/heads/main')\n        run: |\n          set -ex\n          if [[ \"$GITHUB_REF_TYPE\" = \"tag\" ]]; then\n            npm publish --provenance --access public *.tgz\n          else\n            npm publish --provenance --access public --tag dev *.tgz\n          fi\n          deno publish --allow-dirty --unstable-sloppy-imports\n        working-directory: ${{ github.workspace }}/out/\n\n  deploy-docs:\n    if: github.repository == 'toss/es-toolkit' && github.event_name == 'push' && github.ref_type == 'tag'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n      - run: corepack enable\n      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0\n        with:\n          node-version-file: '.nvmrc'\n          cache: 'yarn'\n      - name: Install dependencies\n        run: yarn install\n      - name: Deploy a docs site\n        run: yarn vercel deploy --yes --prod --token=${{ secrets.VERCEL_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n\n.idea/\n\n.yarn/*\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n\n.pnp.cjs\n.pnp.loader.mjs\n\nnode_modules\ncoverage\ndist\n.junit\nout\n*.tgz\numd\n.env\n/*.d.ts\n.vite-node\n.vercel\n/compat\n/array.js\n/compat.js\n/error.js\n/function.js\n/math.js\n/map.js\n/object.js\n/predicate.js\n/promise.js\n/set.js\n/string.js\n/util.js\n\n/test\n\n.omc\n*.log"
  },
  {
    "path": ".npmignore",
    "content": ".nvmrc"
  },
  {
    "path": ".nvmrc",
    "content": "24.13.0"
  },
  {
    "path": ".prettierignore",
    "content": ".yarn/*\n\n.pnp.cjs\n.pnp.loader.mjs\n\nnode_modules\ncoverage\ndist\nesm\n.junit\nout\n*.d.ts\n*.tgz\n"
  },
  {
    "path": ".prettierrc.cjs",
    "content": "module.exports = {\n  arrowParens: 'avoid',\n  bracketSameLine: false,\n  bracketSpacing: true,\n  endOfLine: 'lf',\n  jsxSingleQuote: false,\n  printWidth: 120,\n  proseWrap: 'preserve',\n  quoteProps: 'as-needed',\n  semi: true,\n  singleQuote: true,\n  tabWidth: 2,\n  trailingComma: 'es5',\n  plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')],\n  importOrder: ['^vitest', '^es-toolkit', '<THIRD_PARTY_MODULES>', '^@(.*)$', '^[.]/', '^[.]{2,}/'],\n  importOrderSortSpecifiers: true,\n  importOrderCaseInsensitive: true,\n  overrides: [\n    {\n      files: 'src/**/{index,compat}.ts',\n      options: {\n        plugins: [require.resolve('prettier-plugin-sort-re-exports')],\n      },\n    },\n  ],\n};\n"
  },
  {
    "path": ".scripts/check-dist.mjs",
    "content": ""
  },
  {
    "path": ".scripts/check-peer.sh",
    "content": "OUT=$(yarn | grep -E \"(YN0002|YN0059|YN0060)\" | grep -E $1)\nif [ -z \"$OUT\" ]; then\n  echo \"No Peer Dependency Errors Found.\"\nelse\n  echo \"$OUT\"\n  echo \"Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code\"\n  exit 1\nfi"
  },
  {
    "path": ".scripts/docs/deno.json",
    "content": "{\n  \"imports\": {\n    \"@deno/doc\": \"jsr:@deno/doc@^0.148.0\",\n    \"@es-toolkit/es-toolkit\": \"jsr:@es-toolkit/es-toolkit@^1.19.0\",\n    \"@std/dotenv\": \"jsr:@std/dotenv@^0.225.2\",\n    \"clipanion\": \"npm:clipanion@^3.2.1\",\n    \"openai\": \"npm:openai@^4.58.1\"\n  }\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/class.ts",
    "content": "import { DocNodeClass } from '@deno/doc';\nimport { formatDecorator } from './nodes/decorator.ts';\nimport { formatTypeParam } from './nodes/type-param.ts';\nimport { formatType } from './nodes/type.ts';\nimport { FormatOption } from './options.ts';\n\nexport function formatClassDoc(node: DocNodeClass, options: FormatOption = {}): string {\n  let result = '';\n\n  if (node.classDef.decorators != null && node.classDef.decorators.length > 0) {\n    result += node.classDef.decorators.map(d => formatDecorator(d, options)).join('\\n');\n  }\n\n  if (node.declarationKind === 'private') {\n    result += 'private ';\n  }\n\n  if (node.classDef.isAbstract) {\n    result += 'abstract ';\n  }\n\n  result += 'class ';\n  result += node.name;\n\n  if (node.classDef.typeParams.length > 0) {\n    result += '<';\n    result += node.classDef.typeParams.map(p => formatTypeParam(p, options)).join(', ');\n    result += '>';\n  }\n\n  if (node.classDef.extends) {\n    result += ' extends ';\n    result += node.classDef.extends;\n  }\n\n  if (node.classDef.superTypeParams.length > 0) {\n    result += '<';\n    result += node.classDef.superTypeParams.map(p => formatType(p, options)).join(', ');\n    result += '>';\n  }\n\n  if (node.classDef.implements.length > 0) {\n    result += ' implements ';\n    result += node.classDef.implements.map(i => formatType(i, options)).join(', ');\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/function.ts",
    "content": "import { DocNodeFunction } from '@deno/doc';\nimport { formatParam } from './nodes/param.ts';\nimport { formatTypeParam } from './nodes/type-param.ts';\nimport { formatType } from './nodes/type.ts';\nimport { FormatOption } from './options.ts';\n\nexport function formatFunctionDoc(node: DocNodeFunction, options: FormatOption = {}): string {\n  let result = '';\n\n  if (node.functionDef.isAsync) {\n    result += 'async ';\n  }\n\n  result += 'function';\n\n  if (node.functionDef.isGenerator) {\n    result += '*';\n  }\n\n  result += ' ';\n\n  result += node.name;\n\n  if (node.functionDef.typeParams.length > 0) {\n    result += '<';\n    result += node.functionDef.typeParams.map(p => formatTypeParam(p, options)).join(', ');\n    result += '>';\n  }\n\n  result += '(';\n  result += node.functionDef.params.map(p => formatParam(p, options)).join(', ');\n  result += ')';\n\n  if (node.functionDef.returnType != null) {\n    result += ': ';\n    result += formatType(node.functionDef.returnType, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/helpers/readonly.ts",
    "content": "import { FormatOption } from '../options.ts';\n\nexport function formatReadonly(node: { readonly?: boolean | '+' | '-' }, options: FormatOption): string {\n  if (!options.display?.readonly) {\n    return '';\n  }\n\n  switch (node.readonly) {\n    case true: {\n      return 'readonly ';\n    }\n    case '+': {\n      return '+readonly ';\n    }\n    case '-': {\n      return '-readonly ';\n    }\n  }\n\n  return '';\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/call-signature.ts",
    "content": "import { LiteralCallSignatureDef } from '@deno/doc';\nimport { formatParam } from './param.ts';\nimport { formatType } from './type.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatCallSignatureDef(node: LiteralCallSignatureDef, options: FormatOption) {\n  let result = '';\n\n  result += '(';\n  result += node.params.map(param => formatParam(param, options)).join(', ');\n  result += ')';\n\n  if (node.tsType != null) {\n    result += ': ';\n    result += formatType(node.tsType, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/decorator.ts",
    "content": "import { DecoratorDef } from '@deno/doc';\nimport { FormatOption } from '../options.ts';\n\n// eslint-disable-next-line\nexport function formatDecorator(node: DecoratorDef, _: FormatOption) {\n  let result = '';\n\n  result += '@';\n  result += node.name;\n\n  if (node.args != null && node.args.length > 0) {\n    result += '(';\n    result += node.args.join(', ');\n    result += ')';\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/index-signature.ts",
    "content": "import { LiteralIndexSignatureDef } from '@deno/doc';\nimport { formatParam } from './param.ts';\nimport { formatType } from './type.ts';\nimport { formatReadonly } from '../helpers/readonly.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatIndexSignatureDef(node: LiteralIndexSignatureDef, options: FormatOption) {\n  let result = '';\n\n  result += formatReadonly(node, options);\n\n  result += '[';\n  result += node.params.map(p => formatParam(p, options)).join(', ');\n  result += ']';\n\n  if (node.tsType != null) {\n    result += ': ';\n    result += formatType(node.tsType, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/method.ts",
    "content": "import { LiteralMethodDef } from '@deno/doc';\nimport { formatParam } from './param.ts';\nimport { formatType } from './type.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatMethodDef(node: LiteralMethodDef, options: FormatOption) {\n  let result = '';\n\n  if (node.computed) {\n    result += `[${node.name}]`;\n  } else {\n    result += node.name;\n  }\n\n  if (node.optional) {\n    result += '?';\n  }\n\n  result += '(';\n  result += node.params.map(x => formatParam(x, options)).join(', ');\n  result += ')';\n\n  if (node.returnType != null) {\n    result += ': ';\n    result += formatType(node.returnType, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/object-pat-prop.ts",
    "content": "import { ObjectPatPropDef } from '@deno/doc';\nimport { formatParam } from './param.ts';\n\nexport function formatObjectPatProp(node: ObjectPatPropDef) {\n  switch (node.kind) {\n    case 'keyValue': {\n      return node.key;\n    }\n    case 'assign': {\n      let result = '';\n\n      result += node.key;\n\n      if (node.value != null) {\n        result += ' = ';\n        result += node.value;\n      }\n\n      return result;\n    }\n    case 'rest': {\n      let result = '';\n\n      result += '...';\n      result += formatParam(node.arg);\n\n      return result;\n    }\n  }\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/param.ts",
    "content": "import { ParamDef } from '@deno/doc';\nimport { formatObjectPatProp } from './object-pat-prop.ts';\nimport { formatType } from './type.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatParam(node: ParamDef, options: FormatOption): string {\n  if (node.decorators != null) {\n    throw new Error(`Not implemented`);\n  }\n\n  switch (node.kind) {\n    case 'array': {\n      let result = '';\n\n      result += '[';\n\n      result += node.elements\n        .filter(x => x != null)\n        .map(item => {\n          return formatParam(item!, options);\n        })\n        .join(', ');\n\n      result += ']';\n\n      if (node.optional) {\n        result += '?';\n      }\n\n      if (node.tsType != null) {\n        result += ': ';\n        result += formatType(node.tsType, options);\n      }\n\n      return result;\n    }\n\n    case 'assign': {\n      let result = '';\n\n      result += formatParam(node.left, options);\n\n      if (node.tsType != null) {\n        result += ': ';\n        result += formatType(node.tsType, options);\n      }\n\n      return result;\n    }\n\n    case 'identifier': {\n      let result = '';\n\n      result += node.name;\n\n      if (node.optional) {\n        result += '?';\n      }\n\n      if (node.tsType != null) {\n        result += ': ';\n        result += formatType(node.tsType, options);\n      }\n\n      return result;\n    }\n\n    case 'object': {\n      let result = '';\n\n      result += '{';\n      result += node.props.map(prop => formatObjectPatProp(prop)).join(', ');\n      result += '}';\n\n      if (node.optional) {\n        result += '?';\n      }\n\n      if (node.tsType != null) {\n        result += ': ';\n        result += formatType(node.tsType, options);\n      }\n\n      return result;\n    }\n\n    case 'rest': {\n      let result = '';\n\n      result += '...';\n      result += formatParam(node.arg, options);\n\n      if (node.tsType != null) {\n        result += ': ';\n        result += formatType(node.tsType, options);\n      }\n\n      return result;\n    }\n  }\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/property.ts",
    "content": "import { LiteralPropertyDef } from '@deno/doc';\nimport { formatType } from './type.ts';\nimport { formatReadonly } from '../helpers/readonly.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatPropertyDef(node: LiteralPropertyDef, options: FormatOption) {\n  let result = '';\n\n  result += formatReadonly(node, options);\n\n  if (node.computed) {\n    result += `[${node.name}]`;\n  } else {\n    result += node.name;\n  }\n\n  if (node.optional) {\n    result += '?';\n  }\n\n  if (node.tsType != null) {\n    result += ': ';\n    result += formatType(node.tsType, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/type-param.ts",
    "content": "import { TsTypeParamDef } from '@deno/doc';\nimport { formatType } from './type.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatTypeParam(node: TsTypeParamDef, options: FormatOption) {\n  let result = '';\n\n  result += node.name;\n\n  if (node.constraint != null) {\n    result += ' extends ';\n    result += formatType(node.constraint, options);\n  }\n\n  if (node.default != null) {\n    result += ' = ';\n    result += formatType(node.default, options);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/nodes/type.ts",
    "content": "import { TsTypeDef } from '@deno/doc';\nimport { formatCallSignatureDef } from './call-signature.ts';\nimport { formatIndexSignatureDef } from './index-signature.ts';\nimport { formatMethodDef } from './method.ts';\nimport { formatParam } from './param.ts';\nimport { formatPropertyDef } from './property.ts';\nimport { formatTypeParam } from './type-param.ts';\nimport { formatReadonly } from '../helpers/readonly.ts';\nimport { FormatOption } from '../options.ts';\n\nexport function formatType(node: TsTypeDef, options: FormatOption): string {\n  switch (node.kind) {\n    case 'array': {\n      switch (node.array.kind) {\n        case 'union':\n        case 'intersection':\n          return `Array<${formatType(node.array, options)}>`;\n      }\n\n      return `${formatType(node.array, options)}[]`;\n    }\n    case 'conditional': {\n      let result = '';\n\n      result += formatType(node.conditionalType.checkType, options);\n      result += ' extends ';\n      result += formatType(node.conditionalType.extendsType, options);\n      result += ' ? ';\n      result += formatType(node.conditionalType.trueType, options);\n      result += ' : ';\n      result += formatType(node.conditionalType.falseType, options);\n\n      return result;\n    }\n    case 'infer': {\n      let result = '';\n\n      result += 'infer ';\n      result += formatTypeParam(node.infer.typeParam, options);\n\n      return result;\n    }\n    case 'importType': {\n      let result = '';\n\n      result += 'import(';\n      result += node.importType.specifier;\n      result += ')';\n\n      if (node.importType.qualifier != null) {\n        result += '.';\n        result += node.importType.qualifier;\n      }\n\n      if (node.importType.typeParams != null) {\n        result += '<';\n        result += node.importType.typeParams.map(param => formatType(param, options)).join(', ');\n        result += '>';\n      }\n\n      return result;\n    }\n    case 'fnOrConstructor': {\n      let result = '';\n\n      if (node.fnOrConstructor.constructor) {\n        result += 'new ';\n      }\n\n      result += '(';\n      result += node.fnOrConstructor.params.map(param => formatParam(param, options)).join(', ');\n      result += ')';\n\n      result += ' => ';\n\n      result += formatType(node.fnOrConstructor.tsType, options);\n\n      return result;\n    }\n\n    case 'indexedAccess': {\n      let result = '';\n\n      result += formatType(node.indexedAccess.objType, options);\n\n      result += '[';\n      result += formatType(node.indexedAccess.indexType, options);\n      result += ']';\n\n      return result;\n    }\n\n    case 'intersection': {\n      return node.intersection.map(u => formatType(u, options)).join(' & ');\n    }\n\n    case 'mapped': {\n      let result = '';\n\n      result += formatReadonly(node.mappedType, options);\n\n      result += '[';\n\n      if (node.mappedType.typeParam.constraint != null) {\n        result += node.mappedType.typeParam.name;\n        result += ' in ';\n        result += formatType(node.mappedType.typeParam.constraint, options);\n      } else {\n        result += formatTypeParam(node.mappedType.typeParam, options);\n      }\n\n      if (node.mappedType.nameType != null) {\n        result += ' as ';\n        result += formatType(node.mappedType.nameType, options);\n      }\n\n      result += ']';\n\n      switch (node.mappedType.optional) {\n        case true: {\n          result += '?';\n          break;\n        }\n        case '+': {\n          result += '+?';\n          break;\n        }\n        case '-': {\n          result += '-?';\n          break;\n        }\n      }\n\n      if (node.mappedType.tsType != null) {\n        result += ': ';\n        result += formatType(node.mappedType.tsType, options);\n      }\n\n      return result;\n    }\n\n    case 'keyword': {\n      return node.keyword;\n    }\n\n    case 'literal': {\n      switch (node.literal.kind) {\n        case 'boolean': {\n          if (node.literal.boolean) {\n            return 'true';\n          } else {\n            return 'false';\n          }\n        }\n\n        case 'string': {\n          return node.literal.string;\n        }\n\n        case 'template': {\n          let result = '';\n\n          result += '`';\n\n          for (const tsType of node.literal.tsTypes) {\n            if (tsType.kind === 'literal') {\n              if (tsType.literal.kind === 'string') {\n                result += tsType.literal.string;\n                continue;\n              }\n            }\n\n            result += '${';\n            result += formatType(tsType, options);\n            result += '}';\n          }\n\n          result += '`';\n\n          return result;\n        }\n\n        case 'number': {\n          return node.literal.number.toString();\n        }\n\n        case 'bigInt': {\n          return node.literal.string;\n        }\n      }\n\n      throw new Error(`Not reachable`);\n    }\n\n    case 'optional': {\n      return `${formatType(node.optional, options)}?`;\n    }\n\n    case 'parenthesized': {\n      return `(${formatType(node.parenthesized, options)})`;\n    }\n\n    case 'rest': {\n      return `...${formatType(node.rest, options)}`;\n    }\n\n    case 'this': {\n      return `this`;\n    }\n\n    case 'tuple': {\n      let result = '';\n\n      result += '[';\n      result += node.tuple.map(item => formatType(item, options)).join(', ');\n      result += ']';\n\n      return result;\n    }\n\n    case 'typeLiteral': {\n      let result = '';\n\n      result += '{ ';\n      result += node.typeLiteral.callSignatures.map(sig => formatCallSignatureDef(sig, options)).join('; ');\n      result += node.typeLiteral.methods.map(m => formatMethodDef(m, options)).join('; ');\n      result += node.typeLiteral.properties.map(p => formatPropertyDef(p, options)).join('; ');\n      result += node.typeLiteral.indexSignatures\n        .map(indexSignature => formatIndexSignatureDef(indexSignature, options))\n        .join('; ');\n\n      result += result += ' }';\n\n      result += '}';\n\n      return result;\n    }\n\n    case 'typeOperator': {\n      let result = '';\n\n      switch (node.typeOperator.operator) {\n        case 'readonly': {\n          if (!options.display?.readonly) {\n            break;\n          }\n\n          result += node.typeOperator.operator;\n          result += ' ';\n          break;\n        }\n        default: {\n          result += node.typeOperator.operator;\n          result += ' ';\n          break;\n        }\n      }\n\n      result += formatType(node.typeOperator.tsType, options);\n\n      return result;\n    }\n\n    case 'typeQuery': {\n      return `typeof ${node.typeQuery}`;\n    }\n\n    case 'typeRef': {\n      let result = '';\n\n      result += node.typeRef.typeName;\n\n      if (node.typeRef.typeParams != null) {\n        result += '<';\n        result += node.typeRef.typeParams.map(p => formatType(p, options)).join(', ');\n        result += '>';\n      }\n\n      return result;\n    }\n\n    case 'union': {\n      return node.union.map(u => formatType(u, options)).join(' | ');\n    }\n\n    case 'typePredicate': {\n      return node.repr;\n    }\n  }\n\n  throw new Error(`Unreachable`);\n}\n"
  },
  {
    "path": ".scripts/docs/formatters/options.ts",
    "content": "export interface FormatOption {\n  display?: {\n    readonly?: boolean;\n  };\n}\n"
  },
  {
    "path": ".scripts/docs/generate-docs.mts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { doc, DocNode } from '@deno/doc';\nimport { differenceWith, groupBy } from '@es-toolkit/es-toolkit';\nimport '@std/dotenv/load';\nimport { render as renderEN } from './operations/render/en.ts';\nimport { render as renderJA } from './operations/render/ja.ts';\nimport { render as renderKO } from './operations/render/ko.ts';\nimport { RenderOptions } from './operations/render/types.ts';\nimport { render as renderZH } from './operations/render/zh_hans.ts';\nimport { toDocumentationItem } from './operations/toDocumentationItem.ts';\nimport { translate } from './operations/translate.ts';\nimport { DocumentationItem } from './types/DocumentationItem.ts';\nimport { Locale } from './types/Locale.ts';\n\n// eslint-disable-next-line\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nconst basePath = path.resolve(__dirname, '..', '..', 'src');\n\nconst openAiApiKey = Deno.env.get('OPENAI_API_KEY');\n\ntype DocumentationItems = Array<{ docPath: string; item: DocumentationItem }>;\ntype DocumentationPaths = Record<Locale, string>;\n\nasync function run() {\n  const docsRoot = path.resolve(__dirname, '..', '..', 'docs');\n\n  const docsPaths: DocumentationPaths = {\n    en: path.join(docsRoot, 'reference'),\n    ko: path.join(docsRoot, 'ko', 'reference'),\n    ja: path.join(docsRoot, 'ja', 'reference'),\n    zh_hans: path.join(docsRoot, 'zh_hans', 'reference'),\n  };\n\n  const items = toDocumentationItems(await doc(`file:${path.join(basePath, 'index.ts')}`));\n\n  await renderDocs(docsPaths, items);\n\n  const compatItems = differenceWith(\n    toDocumentationItems(await doc(`file:${path.join(basePath, 'compat', 'index.ts')}`)),\n    items,\n    (x, y) => x.item.name === y.item.name\n  );\n\n  await renderDocs(docsPaths, compatItems, { compat: true });\n}\n\nasync function renderDocs(docsPaths: DocumentationPaths, items: DocumentationItems, options: RenderOptions = {}) {\n  for (const { docPath, item } of items) {\n    console.log(`> Doc: ${docPath}`);\n\n    const enPath = path.join(docsPaths.en, docPath);\n\n    if (!(await exists(enPath))) {\n      console.log(`> Generating English docs for for: ${docPath}`);\n      await Deno.mkdir(path.dirname(enPath), { recursive: true });\n      await Deno.writeTextFile(enPath, renderEN(item, options));\n    }\n\n    const koPath = path.join(docsPaths.ko, docPath);\n\n    if (!(await exists(koPath))) {\n      console.log(`> Generating Korean docs for for: ${docPath}`);\n\n      const koreanItem = openAiApiKey != null ? await translate(item, 'ko', { openAiApiKey }) : item;\n      await Deno.mkdir(path.dirname(koPath), { recursive: true });\n      await Deno.writeTextFile(koPath, renderKO(koreanItem, options));\n    }\n\n    const jaPath = path.join(docsPaths.ja, docPath);\n\n    if (!(await exists(jaPath))) {\n      console.log(`> Generating Japanese docs for for: ${docPath}`);\n\n      const japaneseItem = openAiApiKey != null ? await translate(item, 'ja', { openAiApiKey }) : item;\n\n      await Deno.mkdir(path.dirname(jaPath), { recursive: true });\n      await Deno.writeTextFile(jaPath, renderJA(japaneseItem, options));\n    }\n\n    const zhPath = path.join(docsPaths.zh_hans, docPath);\n\n    if (!(await exists(zhPath))) {\n      console.log(`> Generating Simplified Chinese docs for for: ${docPath}`);\n\n      const zhItem = openAiApiKey != null ? await translate(item, 'zh_hans', { openAiApiKey }) : item;\n\n      await Deno.mkdir(path.dirname(zhPath), { recursive: true });\n      await Deno.writeTextFile(zhPath, renderZH(zhItem, options));\n    }\n  }\n}\n\nasync function exists(path: string): Promise<boolean> {\n  try {\n    await Deno.stat(path);\n    return true;\n  } catch (error) {\n    if (error instanceof Deno.errors.NotFound) {\n      return false;\n    }\n    throw error; // rethrow other errors\n  }\n}\n\nfunction toDocumentationItems(docs: DocNode[]): DocumentationItems {\n  const entries = Object.entries(groupBy(docs, x => x.name));\n\n  return entries\n    .filter(([name, entries]) => {\n      if (name === '') {\n        return false;\n      }\n\n      if (entries.some(x => x.kind !== 'class' && x.kind !== 'function')) {\n        return false;\n      }\n\n      return true;\n    })\n    .map(([name, entries]) => {\n      const sourcePath = fileURLToPath(entries[0].location.filename);\n      const docPath: string = path.join(path.dirname(path.relative(basePath, sourcePath)), `${name}.md`);\n\n      return {\n        docPath: docPath,\n        item: toDocumentationItem(name, entries),\n      };\n    });\n}\n\nrun();\n"
  },
  {
    "path": ".scripts/docs/operations/render/en.ts",
    "content": "import { RenderOptions } from './types.ts';\nimport { DocumentationItem } from '../../types/DocumentationItem.ts';\n\nexport function render(item: DocumentationItem, options: RenderOptions = {}) {\n  return [title(item.name), compatNotice(options), item.description, signature(item), examples(item)]\n    .filter(x => x != null)\n    .join('\\n\\n');\n}\n\nfunction title(name: string) {\n  return `# ${name}`;\n}\n\nfunction compatNotice(options: RenderOptions) {\n  if (!options.compat) {\n    return null;\n  }\n\n  return `\n::: info\nThis function is only available in \\`es-toolkit/compat\\` for compatibility reasons. It either has alternative native JavaScript APIs or isn’t fully optimized yet.\n\nWhen imported from \\`es-toolkit/compat\\`, it behaves exactly like lodash and provides the same functionalities, as detailed [here](../../../compatibility.md).\n:::\n`.trim();\n}\n\nfunction signature(item: DocumentationItem) {\n  return ['## Signature', symbolInterface(item), parameters(item), returns(item)].filter(x => x != null).join('\\n\\n');\n}\n\nfunction symbolInterface(item: DocumentationItem): string {\n  return ` \n\\`\\`\\`typescript\n${item.signature}\n\\`\\`\\`\n`.trim();\n}\n\nfunction parameters(item: DocumentationItem) {\n  if (item.parameters == null) {\n    return null;\n  }\n\n  return `\n### Parameters\n\n${item.parameters.map(p => `- \\`${p.name}\\` (\\`${p.type}\\`): ${p.document}`).join('\\n')}\n  `.trim();\n}\n\nfunction returns(item: DocumentationItem) {\n  if (item.returns == null) {\n    return null;\n  }\n\n  if (item.returns.type == null) {\n    return `\n#### Returns\n\n(\\`${item.returns.type}\\`): ${item.returns.document} \n    `.trim();\n  }\n\n  return `\n#### Returns\n\n(\\`${item.returns.type}\\`): ${item.returns.document}\n  `.trim();\n}\n\nfunction examples(item: DocumentationItem) {\n  if (item.exampleCodes.length === 0) {\n    return null;\n  }\n\n  return `\n## Examples\n\n\\`\\`\\`typescript\n${item.exampleCodes.join('\\n\\n')}\n\\`\\`\\`\n  `.trim();\n}\n"
  },
  {
    "path": ".scripts/docs/operations/render/ja.ts",
    "content": "import { RenderOptions } from './types.ts';\nimport { DocumentationItem } from '../../types/DocumentationItem.ts';\n\nexport function render(item: DocumentationItem, options: RenderOptions = {}) {\n  return [title(item.name), compatNotice(options), item.description, signature(item), examples(item)]\n    .filter(x => x != null)\n    .join('\\n\\n');\n}\n\nfunction title(name: string) {\n  return `# ${name}`;\n}\n\nfunction compatNotice(options: RenderOptions) {\n  if (!options.compat) {\n    return null;\n  }\n\n  return `\n::: info\nこの関数は互換性のために \\`es-toolkit/compat\\` からのみインポートできます。代替可能なネイティブ JavaScript API があるか、まだ十分に最適化されていないためです。\n\n\\`es-toolkit/compat\\` からこの関数をインポートすると、[lodash と完全に同じように動作](../../../compatibility.md)します。\n:::\n`.trim();\n}\n\nfunction signature(item: DocumentationItem) {\n  return ['## インターフェース', symbolInterface(item), parameters(item), returns(item)]\n    .filter(x => x != null)\n    .join('\\n\\n');\n}\n\nfunction symbolInterface(item: DocumentationItem): string {\n  return ` \n\\`\\`\\`typescript\n${item.signature}\n\\`\\`\\`\n`.trim();\n}\n\nfunction parameters(item: DocumentationItem) {\n  if (item.parameters == null) {\n    return null;\n  }\n\n  return `\n### パラメータ\n\n${item.parameters.map(p => `- \\`${p.name}\\` (\\`${p.type}\\`): ${p.document}`).join('\\n')}\n  `.trim();\n}\n\nfunction returns(item: DocumentationItem) {\n  if (item.returns == null) {\n    return null;\n  }\n\n  return `\n#### 戻り値\n\n(\\`${item.returns.type}\\`): ${item.returns.document}\n  `.trim();\n}\n\nfunction examples(item: DocumentationItem) {\n  if (item.exampleCodes.length === 0) {\n    return null;\n  }\n\n  return `\n## 例\n\n\\`\\`\\`typescript\n${item.exampleCodes.join('\\n\\n')}\n\\`\\`\\`\n  `.trim();\n}\n"
  },
  {
    "path": ".scripts/docs/operations/render/ko.ts",
    "content": "import { RenderOptions } from './types.ts';\nimport { DocumentationItem } from '../../types/DocumentationItem.ts';\n\nexport function render(item: DocumentationItem, options: RenderOptions = {}) {\n  return [title(item.name), compatNotice(options), item.description, signature(item), examples(item)]\n    .filter(x => x != null)\n    .join('\\n\\n');\n}\n\nfunction title(name: string) {\n  return `# ${name}`;\n}\n\nfunction compatNotice(options: RenderOptions) {\n  if (!options.compat) {\n    return null;\n  }\n\n  return `\n::: info\n이 함수는 호환성을 위한 \\`es-toolkit/compat\\` 에서만 가져올 수 있어요. 대체할 수 있는 네이티브 JavaScript API가 있거나, 아직 충분히 최적화되지 않았기 때문이에요.\n\n\\`es-toolkit/compat\\`에서 이 함수를 가져오면, [lodash와 완전히 똑같이 동작](../../../compatibility.md)해요.\n:::\n`.trim();\n}\n\nfunction signature(item: DocumentationItem) {\n  return ['## 인터페이스', symbolInterface(item), parameters(item), returns(item)].filter(x => x != null).join('\\n\\n');\n}\n\nfunction symbolInterface(item: DocumentationItem): string {\n  return ` \n\\`\\`\\`typescript\n${item.signature}\n\\`\\`\\`\n`.trim();\n}\n\nfunction parameters(item: DocumentationItem) {\n  if (item.parameters == null) {\n    return null;\n  }\n\n  return `\n### 파라미터\n\n${item.parameters.map(p => `- \\`${p.name}\\` (\\`${p.type}\\`): ${p.document}`).join('\\n')}\n  `.trim();\n}\n\nfunction returns(item: DocumentationItem) {\n  if (item.returns == null) {\n    return null;\n  }\n\n  return `\n#### 반환 값\n\n(\\`${item.returns.type}\\`): ${item.returns.document}\n  `.trim();\n}\n\nfunction examples(item: DocumentationItem) {\n  if (item.exampleCodes.length === 0) {\n    return null;\n  }\n\n  return `\n## 예시\n\n\\`\\`\\`typescript\n${item.exampleCodes.join('\\n\\n')}\n\\`\\`\\`\n  `.trim();\n}\n"
  },
  {
    "path": ".scripts/docs/operations/render/types.ts",
    "content": "export interface RenderOptions {\n  compat?: boolean;\n}\n"
  },
  {
    "path": ".scripts/docs/operations/render/zh_hans.ts",
    "content": "import { RenderOptions } from './types.ts';\nimport { DocumentationItem } from '../../types/DocumentationItem.ts';\n\nexport function render(item: DocumentationItem, options: RenderOptions = {}) {\n  return [title(item.name), compatNotice(options), item.description, signature(item), examples(item)]\n    .filter(x => x != null)\n    .join('\\n\\n');\n}\n\nfunction title(name: string) {\n  return `# ${name}`;\n}\n\nfunction compatNotice(options: RenderOptions) {\n  if (!options.compat) {\n    return null;\n  }\n\n  return `\n::: info\n出于兼容性原因，此函数仅在 \\`es-toolkit/compat\\` 中提供。它可能具有替代的原生 JavaScript API，或者尚未完全优化。\n\n从 \\`es-toolkit/compat\\` 导入时，它的行为与 lodash 完全一致，并提供相同的功能，详情请见 [这里](../../../compatibility.md)。\n:::\n`.trim();\n}\n\nfunction signature(item: DocumentationItem) {\n  return ['## 签名', symbolInterface(item), parameters(item), returns(item)].filter(x => x != null).join('\\n\\n');\n}\n\nfunction symbolInterface(item: DocumentationItem): string {\n  return ` \n\\`\\`\\`typescript\n${item.signature}\n\\`\\`\\`\n`.trim();\n}\n\nfunction parameters(item: DocumentationItem) {\n  if (item.parameters == null) {\n    return null;\n  }\n\n  return `\n### 参数\n\n${item.parameters.map(p => `- \\`${p.name}\\` (\\`${p.type}\\`): ${p.document}`).join('\\n')}\n  `.trim();\n}\n\nfunction returns(item: DocumentationItem) {\n  if (item.returns == null) {\n    return null;\n  }\n\n  return `\n#### 返回值\n\n(\\`${item.returns.type}\\`): ${item.returns.document}\n  `.trim();\n}\n\nfunction examples(item: DocumentationItem) {\n  if (item.exampleCodes.length === 0) {\n    return null;\n  }\n\n  return `\n## 示例\n\n\\`\\`\\`typescript\n${item.exampleCodes.join('\\n\\n')}\n\\`\\`\\`\n  `.trim();\n}\n"
  },
  {
    "path": ".scripts/docs/operations/toDocumentationItem.ts",
    "content": "import { DocNode, JsDocTag, JsDocTagDocRequired, JsDocTagParam, JsDocTagReturn } from '@deno/doc';\nimport { formatClassDoc } from '../formatters/class.ts';\nimport { formatFunctionDoc } from '../formatters/function.ts';\nimport { DocumentationItem } from '../types/DocumentationItem.ts';\n\nexport function toDocumentationItem(symbolName: string, docs: DocNode[]): DocumentationItem {\n  const lastDoc = docs.at(-1) ?? docs.at(0);\n  const tags = lastDoc?.jsDoc?.tags ?? [];\n\n  const description = lastDoc?.jsDoc?.doc;\n\n  if (description == null) {\n    throw new Error(\n      `No description provided for ${symbolName} (${lastDoc?.location.filename}:${lastDoc?.location.line}:${lastDoc?.location.col}).`\n    );\n  }\n\n  return {\n    name: symbolName,\n    description: description.trim(),\n    signature: toSignature(symbolName, docs),\n    parameters: toParameters(symbolName, tags),\n    returns: toReturns(symbolName, tags),\n    exampleCodes: toExampleCodes(tags),\n  };\n}\n\nfunction toSignature(symbolName: string, docs: DocNode[]) {\n  if (docs.length === 0) {\n    throw new Error(`No document provided for ${symbolName}.`);\n  }\n\n  switch (docs[0].kind) {\n    case 'function': {\n      return toFunctionSignature(symbolName, docs);\n    }\n    case 'class': {\n      return toClassSignature(symbolName, docs);\n    }\n  }\n\n  throw new Error(`Unsupported document node type: ${docs[0].kind}`);\n}\n\nfunction toFunctionSignature(symbolName: string, docs: DocNode[]) {\n  return docs\n    .map(doc => {\n      if (doc.kind !== 'function') {\n        throw new Error(`Unsupported document type in ${symbolName}: ${doc.kind}`);\n      }\n\n      return `${formatFunctionDoc(doc, { display: { readonly: false } })};`;\n    })\n    .join('\\n');\n}\n\nfunction toClassSignature(symbolName: string, docs: DocNode[]) {\n  return docs\n    .map(doc => {\n      if (doc.kind !== 'class') {\n        throw new Error(`Unsupported document type in ${symbolName}: ${doc.kind}`);\n      }\n\n      return `${formatClassDoc(doc, { display: { readonly: false } })}`;\n    })\n    .join('\\n');\n}\n\nfunction toParameters(symbolName: string, tags: JsDocTag[]): DocumentationItem['parameters'] {\n  const parameters = tags.filter((tag): tag is JsDocTagParam => tag.kind === 'param');\n\n  if (parameters.length === 0) {\n    return null;\n  }\n\n  return parameters.map(param => {\n    if (param.name == null) {\n      throw new Error(`parameter name is not provided in ${symbolName}.`);\n    }\n\n    if (param.type == null) {\n      throw new Error(`parameter type is not provided in ${symbolName}. (for parameter ${param.name})`);\n    }\n\n    if (param.doc == null) {\n      throw new Error(`parameter doc is not provided in ${symbolName}. (for parameter ${param.name})`);\n    }\n\n    return {\n      name: param.name,\n      type: param.type,\n      document: param.doc.replace(/^- /g, ''),\n    };\n  });\n}\n\nfunction toReturns(symbolName: string, tags: JsDocTag[]): DocumentationItem['returns'] {\n  const returns = tags.filter((x): x is JsDocTagReturn => x.kind === 'return')[0];\n\n  if (returns == null) {\n    return null;\n  }\n\n  if (returns.doc == null) {\n    throw new Error(`returns.doc is not provided in ${symbolName}.`);\n  }\n\n  return {\n    type: returns.type ?? null,\n    document: returns.doc.replace(/^- /g, ''),\n  };\n}\n\nfunction toExampleCodes(tags: JsDocTag[]) {\n  const examples = tags.filter((x): x is JsDocTagDocRequired => x.kind === 'example');\n\n  if (examples.length === 0) {\n    return [];\n  }\n\n  return examples.map(x => x.doc.trim());\n}\n"
  },
  {
    "path": ".scripts/docs/operations/translate.ts",
    "content": "import OpenAI from 'openai';\nimport { pick, toMerged } from '@es-toolkit/es-toolkit';\nimport { DocumentationItem } from '../types/DocumentationItem.ts';\nimport { Locale } from '../types/Locale.ts';\n\ninterface TranslateOptions {\n  openAiApiKey: string;\n}\n\nexport async function translate(\n  doc: DocumentationItem,\n  locale: Locale,\n  { openAiApiKey }: TranslateOptions\n): Promise<DocumentationItem> {\n  const client = new OpenAI({\n    apiKey: openAiApiKey,\n  });\n\n  const item = {\n    description: doc.description,\n    parameters: doc.parameters?.map(param => {\n      return pick(param, ['document']);\n    }),\n    returns: pick(doc.returns! ?? {}, ['document']),\n  };\n\n  const prompt = `\nAlways answer in the JSON format as given in the input, without triple backticks.\nTranslate the following JSON to ${locale}.\n\nIf translating in Korean, write the sentence in 해요 style.\nIf translating in Japanese, finish the sentence in ます style.\nFinish with a noun if it is a explanation for a parameter or a return value.\n\n===\n\\`\\`\\`\n${JSON.stringify(item, null, 2)}\n\\`\\`\\`\n  `;\n\n  const response = await client.chat.completions.create({\n    model: 'gpt-4o',\n    messages: [{ role: 'user', content: prompt }],\n  });\n\n  const translatedItem = response.choices[0].message.content;\n\n  if (translatedItem == null) {\n    throw new Error(`API Error while translating ${doc.name} to ${locale}.`);\n  }\n\n  const translatedDoc: DocumentationItem = JSON.parse(translatedItem);\n\n  return toMerged(doc, translatedDoc);\n}\n"
  },
  {
    "path": ".scripts/docs/types/DocumentationItem.ts",
    "content": "export interface DocumentationItem {\n  name: string;\n  description: string;\n  signature: string;\n  parameters: Array<{\n    name: string;\n    type: string;\n    document: string;\n  }> | null;\n  returns: {\n    type: string | null;\n    document: string;\n  } | null;\n  exampleCodes: string[];\n}\n"
  },
  {
    "path": ".scripts/docs/types/Locale.ts",
    "content": "export type Locale = 'en' | 'ko' | 'ja' | 'zh_hans';\n"
  },
  {
    "path": ".scripts/generate-bundle-size.mjs",
    "content": "import esbuild from 'esbuild';\nimport fs from 'fs/promises';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst funcNames = ['sample', 'difference', 'sum', 'debounce', 'throttle', 'pick', 'zip'];\n\nconst filename = fileURLToPath(import.meta.url);\nconst ROOT = path.resolve(path.dirname(filename), '..');\nconst OUT_JSON = path.join(ROOT, 'docs', 'data', 'bundle-size.json');\n\nasync function getSize(pkg, funcName) {\n  const script = `import { ${funcName} } from \"${pkg}\"; console.log(${funcName})`;\n\n  const bundled = await esbuild.build({\n    stdin: {\n      contents: script,\n      resolveDir: ROOT,\n      sourcefile: path.resolve(ROOT, 'tmp', 'test.js'),\n      loader: 'js',\n    },\n    write: false,\n    minify: true,\n    bundle: true,\n  });\n\n  const buf = Buffer.from(bundled.outputFiles[0].contents);\n  return buf.byteLength;\n}\n\nasync function main() {\n  const result = { labels: {}, data: {} };\n\n  // detect labels: read root package.json for es-toolkit version\n  try {\n    const esPkgPath = path.join(ROOT, 'package.json');\n    const esContent = await fs.readFile(esPkgPath, 'utf8');\n    const esJson = JSON.parse(esContent);\n    result.labels['esToolkit'] = `es-toolkit@${esJson.version}`;\n  } catch {\n    result.labels['esToolkit'] = 'es-toolkit@unknown';\n  }\n\n  // detect lodash-es version if installed in node_modules\n  try {\n    const lodashPkgPath = path.join(ROOT, 'node_modules', 'lodash-es', 'package.json');\n    const lodashContent = await fs.readFile(lodashPkgPath, 'utf8');\n    const lodashJson = JSON.parse(lodashContent);\n    result.labels['lodash'] = `lodash-es@${lodashJson.version}`;\n  } catch {\n    result.labels['lodash'] = 'lodash-es@unknown';\n  }\n\n  for (const name of funcNames) {\n    console.log('Bundling', name);\n    const lodashSize = await getSize('lodash-es', name).catch(e => {\n      console.error('failed lodash for', name, e.message);\n      return 0;\n    });\n    const esSize = await getSize('es-toolkit', name).catch(e => {\n      console.error('failed es-toolkit for', name, e.message);\n      return 0;\n    });\n\n    result.data[name] = { lodash: lodashSize, esToolkit: esSize };\n  }\n\n  await fs.mkdir(path.dirname(OUT_JSON), { recursive: true });\n  await fs.writeFile(OUT_JSON, JSON.stringify(result, null, 2), 'utf8');\n  console.log('Wrote', OUT_JSON);\n}\n\nmain().catch(err => {\n  console.error(err);\n  process.exit(1);\n});\n"
  },
  {
    "path": ".scripts/postbuild.sh",
    "content": "#!/bin/sh\n\n# Function to create root exports\ncreate_root_export() {\n    local name=$1\n    echo \"export * from './dist/$name';\" > $name.d.ts\n    echo \"module.exports = require('./dist/$name');\" > $name.js\n}\n\n# Function to create compat exports\ncreate_compat_export() {\n    local category=$1\n    local name=$2\n    echo \"module.exports = require('../dist/compat/$category/$name.js').$name;\" > compat/$name.js\n    echo \"export { $name as default } from '../dist/compat/$category/$name.js';\" > compat/$name.d.ts\n}\n\n# Function to create compat reexports (for functions from main src)\ncreate_compat_reexport() {\n    local category=$1\n    local name=$2\n    echo \"module.exports = require('../dist/$category/$name.js').$name;\" > compat/$name.js\n    echo \"export { $name as default } from '../dist/$category/$name.js';\" > compat/$name.d.ts\n}\n\n# Function to create compat alias\ncreate_compat_alias() {\n    local category=$1\n    local original=$2\n    local alias=$3\n    echo \"module.exports = require('../dist/compat/$category/$original.js').$original;\" > compat/$alias.js\n    echo \"export { $original as default } from '../dist/compat/$category/$original.js';\" > compat/$alias.d.ts\n}\n\n# Create root exports\nfor module in array error compat function math map object predicate promise set string util; do\n    create_root_export $module\ndone\n\n# Create compat directory\nmkdir -p compat\n\n# Array functions\nfor func in castArray chunk compact concat countBy difference differenceBy differenceWith drop dropRight dropRightWhile dropWhile every fill filter find findIndex findLast findLastIndex flatMap flatMapDeep flatMapDepth flatten flattenDeep flattenDepth forEach forEachRight groupBy head includes indexOf initial intersection intersectionBy intersectionWith invokeMap join keyBy last lastIndexOf map nth orderBy partition pull pullAll pullAllBy pullAllWith pullAt reduce reduceRight reject remove reverse sample sampleSize shuffle size slice some sortBy sortedIndex sortedIndexBy sortedIndexOf sortedLastIndex sortedLastIndexBy sortedLastIndexOf tail take takeRight takeRightWhile takeWhile union unionBy unionWith uniq uniqBy uniqWith unzip unzipWith without xor xorBy xorWith zip zipObject zipObjectDeep zipWith; do\n    create_compat_export \"array\" \"$func\"\ndone\n\n# Function functions\nfor func in after ary attempt before bind bindKey curry curryRight debounce defer delay flip flow flowRight memoize negate nthArg overArgs partial partialRight rearg rest spread throttle wrap; do\n    create_compat_export \"function\" \"$func\"\ndone\n\n# Function reexports (from main src)\nfor func in once unary identity noop; do\n    create_compat_reexport \"function\" \"$func\"\ndone\n\n# Math functions\nfor func in add ceil clamp divide floor inRange max maxBy mean meanBy min minBy multiply parseInt random range rangeRight round subtract sum sumBy; do\n    create_compat_export \"math\" \"$func\"\ndone\n\n# Object functions\nfor func in assign assignIn assignInWith assignWith at clone cloneDeep cloneDeepWith cloneWith create defaults defaultsDeep findKey findLastKey forIn forInRight forOwn forOwnRight fromPairs functions functionsIn get has hasIn invertBy keys keysIn mapKeys mapValues merge mergeWith omit omitBy pick pickBy property propertyOf result set setWith toDefaulted toPairs toPairsIn transform unset update updateWith values valuesIn; do\n    create_compat_export \"object\" \"$func\"\ndone\n\n# Object reexports (from main src)\nfor func in invert; do\n    create_compat_reexport \"object\" \"$func\"  \ndone\n\n# String functions\nfor func in camelCase deburr endsWith escape escapeRegExp kebabCase lowerCase lowerFirst pad padEnd padStart repeat replace snakeCase split startCase startsWith template templateSettings toLower toUpper trim trimEnd trimStart truncate unescape upperCase upperFirst words; do\n    create_compat_export \"string\" \"$func\"\ndone\n\n# String reexports (from main src)\nfor func in capitalize; do\n    create_compat_reexport \"string\" \"$func\"\ndone\n\n# Predicate functions\nfor func in conforms conformsTo isArguments isArray isArrayBuffer isArrayLike isArrayLikeObject isBoolean isBuffer isDate isElement isEmpty isEqualWith isError isFinite isInteger isMap isMatch isMatchWith isNaN isNative isNil isNumber isObject isObjectLike isPlainObject isRegExp isSafeInteger isSet isString isSymbol isTypedArray isWeakMap isWeakSet matches matchesProperty; do\n    create_compat_export \"predicate\" \"$func\"\ndone\n\n# Predicate reexports (from main src)\nfor func in isEqual isFunction isLength isNull isUndefined; do\n    create_compat_reexport \"predicate\" \"$func\"\ndone\n\n# Util functions\nfor func in bindAll cond constant defaultTo eq gt gte invoke iteratee lt lte method methodOf now over overEvery overSome stubArray stubFalse stubObject stubString stubTrue times toArray toFinite toInteger toLength toNumber toPath toPlainObject toSafeInteger toString uniqueId; do\n    create_compat_export \"util\" \"$func\"\ndone\n\n# Create aliases\ncreate_compat_alias \"array\" \"forEach\" \"each\"\ncreate_compat_alias \"array\" \"forEachRight\" \"eachRight\" \ncreate_compat_alias \"array\" \"head\" \"first\"\ncreate_compat_alias \"object\" \"assignIn\" \"extend\"\ncreate_compat_alias \"object\" \"assignInWith\" \"extendWith\""
  },
  {
    "path": ".scripts/tests/_internal/formatter/brokenSyntax.ts",
    "content": "function fixExpectFunction(source: string): string {\n  const expectMatched = source.match(/expect(\\(.+\\)).toEqual.+\\);/g);\n\n  if (!expectMatched) {\n    return source;\n  }\n\n  const splitMatched = expectMatched.map(match => match.split('.toEqual('));\n  const brokenSyntax = splitMatched.map(([expect]) => {\n    let count = 0;\n\n    for (const char of expect) {\n      if (['(', '{', '['].includes(char)) {\n        count++;\n      } else if ([')', '}', ']'].includes(char)) {\n        count--;\n      }\n    }\n\n    return count > 0;\n  });\n\n  for (let i = 0; i < expectMatched.length; i++) {\n    if (brokenSyntax[i]) {\n      const front = splitMatched[i][0];\n      const startWithBracket = front.match(/expect\\([{[].+[}\\]],/);\n      const startWithFunction = front.match(/expect\\(.+\\(.+\\),/);\n\n      const start = startWithFunction\n        ? startWithFunction[0].length\n        : startWithBracket\n          ? startWithBracket[0].length\n          : front.indexOf(',') + 1;\n      const fixed = `${front.slice(0, start)}).toEqual(${front.slice(start, front.length - 1)}, ${splitMatched[i][1]}`;\n\n      source = source.replace(expectMatched[i], fixed);\n    }\n  }\n\n  return source;\n}\n\nexport function formatBrokenSyntax(source: string): string {\n  // Fix broken syntax\n  source = fixExpectFunction(source);\n\n  // `delete localvariable` to comment\n  source = source.replace(\n    /delete [^.[\\]]+;/g,\n    match => `// Deleting local variable in strict mode. So commenting it out.\\n// ${match}`\n  );\n\n  return source;\n}\n"
  },
  {
    "path": ".scripts/tests/_internal/transform/assert.ts",
    "content": "import type { Collection, JSCodeshift } from 'jscodeshift';\n\nexport function transformAssert(root: Collection, jscodeshift: JSCodeshift): void {\n  // Change `assert.deepStrictEqual(a, b, c)` to `expect(a, c).toEqual(b)`\n  root\n    .find(jscodeshift.CallExpression, {\n      callee: {\n        type: 'MemberExpression',\n        object: {\n          name: 'assert',\n        },\n        property: {\n          type: 'Identifier',\n        },\n      },\n    })\n    .replaceWith(({ node }) => {\n      if (node.callee.type === 'MemberExpression' && node.callee.property.type === 'Identifier') {\n        const expectArguments =\n          node.arguments.length === 3 ? [node.arguments[0], node.arguments[2]] : [node.arguments[0]];\n        const expect = jscodeshift.callExpression(jscodeshift.identifier('expect'), expectArguments);\n\n        switch (node.callee.property.name) {\n          case 'deepStrictEqual':\n            return jscodeshift.memberExpression(\n              expect,\n              jscodeshift.callExpression(jscodeshift.identifier('toEqual'), [node.arguments[1]])\n            );\n          case 'deepEqual':\n            return jscodeshift.memberExpression(\n              expect,\n              jscodeshift.callExpression(jscodeshift.identifier('toEqual'), [node.arguments[1]])\n            );\n          case 'strictEqual':\n            return jscodeshift.memberExpression(\n              expect,\n              jscodeshift.callExpression(jscodeshift.identifier('toBe'), [node.arguments[1]])\n            );\n          case 'notEqual':\n            return jscodeshift.memberExpression(\n              expect,\n              jscodeshift.callExpression(jscodeshift.identifier('not.toBe'), [node.arguments[1]])\n            );\n          case 'notStrictEqual':\n            return jscodeshift.memberExpression(\n              expect,\n              jscodeshift.callExpression(jscodeshift.identifier('not.toBe'), [node.arguments[1]])\n            );\n        }\n      }\n      return node;\n    });\n}\n"
  },
  {
    "path": ".scripts/tests/_internal/transform/import.ts",
    "content": "import type { Collection, JSCodeshift } from 'jscodeshift';\n\nexport function transformImport(root: Collection, jscodeshift: JSCodeshift): void {\n  const astPath = root.getAST()[0];\n\n  // Change `import {a, b} from './utils'` to `import {a} from '../_internal/a';\\n import {b} from '../_internal/b';`\n  root\n    .find(jscodeshift.ImportDeclaration, {\n      source: {\n        value: './utils',\n      },\n    })\n    .forEach(({ node }) => {\n      if (node.specifiers) {\n        const excludes = ['_']; // Exclude lodash\n        const dirnames = '../_internal/';\n\n        node.specifiers\n          .filter(specifier => specifier.type === 'ImportSpecifier')\n          .forEach(specifier => {\n            if (specifier.type !== 'ImportSpecifier' || excludes.includes(specifier.imported.name)) {\n              return;\n            }\n\n            // Add new import to the top of the file\n            astPath.value.program.body.unshift(\n              jscodeshift.importDeclaration(\n                [jscodeshift.importSpecifier(jscodeshift.identifier(specifier.imported.name))],\n                jscodeshift.literal(`${dirnames}${specifier.imported.name}`)\n              )\n            );\n          });\n      }\n    })\n    .remove();\n\n  // Add import { describe, it, expect } from 'vitest';\n  const vitestImport = root.find(jscodeshift.ImportDeclaration, {\n    source: {\n      value: 'vitest',\n    },\n    specifiers: [\n      {\n        type: 'ImportSpecifier',\n        imported: {\n          name: 'describe',\n        },\n      },\n      {\n        type: 'ImportSpecifier',\n        imported: {\n          name: 'it',\n        },\n      },\n      {\n        type: 'ImportSpecifier',\n        imported: {\n          name: 'expect',\n        },\n      },\n    ],\n  });\n\n  if (!vitestImport.length) {\n    astPath.value.program.body.unshift(\n      jscodeshift.importDeclaration(\n        [\n          jscodeshift.importSpecifier(jscodeshift.identifier('describe')),\n          jscodeshift.importSpecifier(jscodeshift.identifier('it')),\n          jscodeshift.importSpecifier(jscodeshift.identifier('expect')),\n        ],\n        jscodeshift.literal('vitest')\n      )\n    );\n  }\n\n  // Remove import from 'lodash'\n  root\n    .find(jscodeshift.ImportDeclaration, {\n      source: {\n        value: 'lodash',\n      },\n    })\n    .remove();\n\n  // Change '../src/merge' to '../index'\n  const methodSet = new Set<string>();\n  root\n    .find(jscodeshift.ImportDeclaration, {\n      source: {\n        value: (value: string) => value.startsWith('../src/'),\n      },\n    })\n    .forEach(({ node }) => {\n      if (node.specifiers && node.specifiers[0].type === 'ImportDefaultSpecifier' && node.specifiers[0].local) {\n        methodSet.add(node.specifiers[0].local.name);\n      }\n    })\n    .remove();\n\n  if (methodSet.size) {\n    const methodImport = jscodeshift.importDeclaration(\n      Array.from(methodSet).map(method => jscodeshift.importSpecifier(jscodeshift.identifier(method))),\n      jscodeshift.literal('../index')\n    );\n\n    astPath.value.program.body.unshift(methodImport);\n  }\n}\n"
  },
  {
    "path": ".scripts/tests/_internal/transform/lodashStable.ts",
    "content": "import type { Collection, JSCodeshift } from 'jscodeshift';\n\nexport function transformLodashStable(root: Collection, jscodeshift: JSCodeshift): void {\n  const astPath = root.getAST()[0];\n  let needImportEsToolkit = false;\n\n  root\n    .find(jscodeshift.CallExpression, {\n      callee: {\n        type: 'MemberExpression',\n        object: {\n          name: 'lodashStable',\n        },\n        property: {\n          type: 'Identifier',\n        },\n      },\n    })\n    .replaceWith(({ node }) => {\n      // this condition is for type narrowing\n      if (node.callee.type === 'MemberExpression' && node.callee.property.type === 'Identifier') {\n        switch (node.callee.property.name) {\n          case 'each':\n            node.callee.property.name = 'forEach';\n            node.callee.object = node.arguments[0] as any;\n            return jscodeshift.callExpression(node.callee, node.arguments.slice(1));\n\n          case 'map':\n            node.callee.property.name = 'map';\n            node.callee.object = node.arguments[0] as any;\n            return jscodeshift.callExpression(node.callee, node.arguments.slice(1));\n        }\n        // Remove lodashStable from the callee\n        node.callee.object = jscodeshift.identifier('esToolkit');\n        needImportEsToolkit = true;\n      }\n      return node;\n    });\n\n  if (needImportEsToolkit) {\n    const esToolkitImport = jscodeshift.importDeclaration(\n      [jscodeshift.importNamespaceSpecifier(jscodeshift.identifier('esToolkit'))],\n      jscodeshift.literal('../index')\n    );\n\n    astPath.value.program.body.unshift(esToolkitImport);\n  }\n}\n"
  },
  {
    "path": ".scripts/tests/transform-lodash-test.ts",
    "content": "import type { API, FileInfo } from 'jscodeshift';\nimport { formatBrokenSyntax } from './_internal/formatter/brokenSyntax';\nimport { transformAssert } from './_internal/transform/assert';\nimport { transformImport } from './_internal/transform/import';\nimport { transformLodashStable } from './_internal/transform/lodashStable';\n\nexport default function transform(file: FileInfo, { jscodeshift }: API) {\n  try {\n    const root = jscodeshift(formatBrokenSyntax(file.source));\n    transformLodashStable(root, jscodeshift);\n    transformImport(root, jscodeshift);\n    transformAssert(root, jscodeshift);\n\n    return root.toSource();\n  } catch (error) {\n    if (error instanceof Error) {\n      console.error(`File Path: ${file.path}`);\n      console.error(`Error Messaging: ${error.message}`);\n      console.error('Please resolve the error before continuing.');\n      console.error('If you need help, please open an issue on GitHub.');\n    }\n  }\n}\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"arcanis.vscode-zipfs\", \"dbaeumer.vscode-eslint\", \"esbenp.prettier-vscode\"]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"search.exclude\": {\n    \"**/.yarn\": true,\n    \"**/.pnp.*\": true\n  },\n  \"eslint.nodePath\": \".yarn/sdks\",\n  \"eslint.validate\": [\"javascript\", \"javascriptreact\", \"typescript\", \"typescriptreact\"],\n  \"prettier.prettierPath\": \".yarn/sdks/prettier/index.cjs\",\n  \"typescript.tsdk\": \".yarn/sdks/typescript/lib\",\n  \"typescript.enablePromptUseWorkspaceTsdk\": true,\n  \"deno.enablePaths\": [\"./.scripts/docs\"],\n  \"deno.config\": \"./.scripts/docs/deno.json\",\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  \"editor.formatOnSave\": true,\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\"\n  }\n}\n"
  },
  {
    "path": ".yarn/releases/yarn-4.12.0.cjs",
    "content": "#!/usr/bin/env node\n/* eslint-disable */\n//prettier-ignore\n(()=>{var xGe=Object.create;var mU=Object.defineProperty;var kGe=Object.getOwnPropertyDescriptor;var QGe=Object.getOwnPropertyNames;var TGe=Object.getPrototypeOf,RGe=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(t,{get:(e,r)=>(typeof require<\"u\"?require:e)[r]}):t)(function(t){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+t+'\" is not supported')});var Xe=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)mU(t,r,{get:e[r],enumerable:!0})},FGe=(t,e,r,s)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let a of QGe(e))!RGe.call(t,a)&&a!==r&&mU(t,a,{get:()=>e[a],enumerable:!(s=kGe(e,a))||s.enumerable});return t};var ut=(t,e,r)=>(r=t!=null?xGe(TGe(t)):{},FGe(e||!t||!t.__esModule?mU(r,\"default\",{value:t,enumerable:!0}):r,t));var fi={};Vt(fi,{SAFE_TIME:()=>WZ,S_IFDIR:()=>JP,S_IFLNK:()=>KP,S_IFMT:()=>Mf,S_IFREG:()=>N2});var Mf,JP,N2,KP,WZ,YZ=Xe(()=>{Mf=61440,JP=16384,N2=32768,KP=40960,WZ=456789e3});var or={};Vt(or,{EBADF:()=>Mo,EBUSY:()=>NGe,EEXIST:()=>HGe,EINVAL:()=>LGe,EISDIR:()=>_Ge,ENOENT:()=>MGe,ENOSYS:()=>OGe,ENOTDIR:()=>UGe,ENOTEMPTY:()=>GGe,EOPNOTSUPP:()=>qGe,EROFS:()=>jGe,ERR_DIR_CLOSED:()=>yU});function Cc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function NGe(t){return Cc(\"EBUSY\",t)}function OGe(t,e){return Cc(\"ENOSYS\",`${t}, ${e}`)}function LGe(t){return Cc(\"EINVAL\",`invalid argument, ${t}`)}function Mo(t){return Cc(\"EBADF\",`bad file descriptor, ${t}`)}function MGe(t){return Cc(\"ENOENT\",`no such file or directory, ${t}`)}function UGe(t){return Cc(\"ENOTDIR\",`not a directory, ${t}`)}function _Ge(t){return Cc(\"EISDIR\",`illegal operation on a directory, ${t}`)}function HGe(t){return Cc(\"EEXIST\",`file already exists, ${t}`)}function jGe(t){return Cc(\"EROFS\",`read-only filesystem, ${t}`)}function GGe(t){return Cc(\"ENOTEMPTY\",`directory not empty, ${t}`)}function qGe(t){return Cc(\"EOPNOTSUPP\",`operation not supported, ${t}`)}function yU(){return Cc(\"ERR_DIR_CLOSED\",\"Directory handle was closed\")}var zP=Xe(()=>{});var $a={};Vt($a,{BigIntStatsEntry:()=>iE,DEFAULT_MODE:()=>CU,DirEntry:()=>EU,StatEntry:()=>nE,areStatsEqual:()=>wU,clearStats:()=>XP,convertToBigIntStats:()=>YGe,makeDefaultStats:()=>VZ,makeEmptyStats:()=>WGe});function VZ(){return new nE}function WGe(){return XP(VZ())}function XP(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r==\"number\"?t[e]=0:typeof r==\"bigint\"?t[e]=BigInt(0):IU.types.isDate(r)&&(t[e]=new Date(0))}return t}function YGe(t){let e=new iE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s==\"number\"?e[r]=BigInt(s):IU.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function wU(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var IU,CU,EU,nE,iE,BU=Xe(()=>{IU=ut(Ie(\"util\")),CU=33188,EU=class{constructor(){this.name=\"\";this.path=\"\";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},nE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=CU;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},iE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(CU);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function XGe(t){let e,r;if(e=t.match(KGe))t=e[1];else if(r=t.match(zGe))t=`\\\\\\\\${r[1]?\".\\\\\":\"\"}${r[2]}`;else return t;return t.replace(/\\//g,\"\\\\\")}function ZGe(t){t=t.replace(/\\\\/g,\"/\");let e,r;return(e=t.match(VGe))?t=`/${e[1]}`:(r=t.match(JGe))&&(t=`/unc/${r[1]?\".dot/\":\"\"}${r[2]}`),t}function ZP(t,e){return t===fe?KZ(e):vU(e)}var O2,vt,Er,fe,J,JZ,VGe,JGe,KGe,zGe,vU,KZ,el=Xe(()=>{O2=ut(Ie(\"path\")),vt={root:\"/\",dot:\".\",parent:\"..\"},Er={home:\"~\",nodeModules:\"node_modules\",manifest:\"package.json\",lockfile:\"yarn.lock\",virtual:\"__virtual__\",pnpJs:\".pnp.js\",pnpCjs:\".pnp.cjs\",pnpData:\".pnp.data.json\",pnpEsmLoader:\".pnp.loader.mjs\",rc:\".yarnrc.yml\",env:\".env\"},fe=Object.create(O2.default),J=Object.create(O2.default.posix);fe.cwd=()=>process.cwd();J.cwd=process.platform===\"win32\"?()=>vU(process.cwd()):process.cwd;process.platform===\"win32\"&&(J.resolve=(...t)=>t.length>0&&J.isAbsolute(t[0])?O2.default.posix.resolve(...t):O2.default.posix.resolve(J.cwd(),...t));JZ=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?\".\":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};fe.contains=(t,e)=>JZ(fe,t,e);J.contains=(t,e)=>JZ(J,t,e);VGe=/^([a-zA-Z]:.*)$/,JGe=/^\\/\\/(\\.\\/)?(.*)$/,KGe=/^\\/([a-zA-Z]:.*)$/,zGe=/^\\/unc\\/(\\.dot\\/)?(.*)$/;vU=process.platform===\"win32\"?ZGe:t=>t,KZ=process.platform===\"win32\"?XGe:t=>t;fe.fromPortablePath=KZ;fe.toPortablePath=vU});async function $P(t,e){let r=\"0123456789abcdef\";await t.mkdirPromise(e.indexPath,{recursive:!0});let s=[];for(let a of r)for(let n of r)s.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(s),e.indexPath}async function zZ(t,e,r,s,a){let n=t.pathUtils.normalize(e),c=r.pathUtils.normalize(s),f=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:dd,mtime:dd}:await r.lstatPromise(c);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await SU(f,p,t,n,r,c,{...a,didParentExist:!0});for(let C of f)await C();await Promise.all(p.map(C=>C()))}async function SU(t,e,r,s,a,n,c){let f=c.didParentExist?await XZ(r,s):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=c.stableTime?{atime:dd,mtime:dd}:p,C;switch(!0){case p.isDirectory():C=await e5e(t,e,r,s,f,a,n,p,c);break;case p.isFile():C=await n5e(t,e,r,s,f,a,n,p,c);break;case p.isSymbolicLink():C=await i5e(t,e,r,s,f,a,n,p,c);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(c.linkStrategy?.type!==\"HardlinkFromIndex\"||!p.isFile())&&((C||f?.mtime?.getTime()!==E.getTime()||f?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(s,h,E)),C=!0),(f===null||(f.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(s,p.mode&511)),C=!0)),C}async function XZ(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function e5e(t,e,r,s,a,n,c,f,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(s,{mode:f.mode})}catch(S){if(S.code!==\"EEXIST\")throw S}}),h=!0);let E=await n.readdirPromise(c),C=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let S of E.sort())await SU(t,e,r,r.pathUtils.join(s,S),n,n.pathUtils.join(c,S),C)&&(h=!0);else(await Promise.all(E.map(async P=>{await SU(t,e,r,r.pathUtils.join(s,P),n,n.pathUtils.join(c,P),C)}))).some(P=>P)&&(h=!0);return h}async function t5e(t,e,r,s,a,n,c,f,p,h){let E=await n.checksumFilePromise(c,{algorithm:\"sha1\"}),C=420,S=f.mode&511,P=`${E}${S!==C?S.toString(8):\"\"}`,I=r.pathUtils.join(h.indexPath,E.slice(0,2),`${P}.dat`),R;(le=>(le[le.Lock=0]=\"Lock\",le[le.Rename=1]=\"Rename\"))(R||={});let N=1,U=await XZ(r,I);if(a){let ie=U&&a.dev===U.dev&&a.ino===U.ino,ue=U?.mtimeMs!==$Ge;if(ie&&ue&&h.autoRepair&&(N=0,U=null),!ie)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1}let W=!U&&N===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,\"0\")}`:null,ee=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(I,async()=>{let ie=await n.readFilePromise(c);await r.writeFilePromise(I,ie)}),N===1&&W)){let ie=await n.readFilePromise(c);await r.writeFilePromise(W,ie);try{await r.linkPromise(W,I)}catch(ue){if(ue.code===\"EEXIST\")ee=!0,await r.unlinkPromise(W);else throw ue}}a||await r.linkPromise(I,s)}),e.push(async()=>{U||(await r.lutimesPromise(I,dd,dd),S!==C&&await r.chmodPromise(I,S)),W&&!ee&&await r.unlinkPromise(W)}),!1}async function r5e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(c);await r.writeFilePromise(s,h)}),!0}async function n5e(t,e,r,s,a,n,c,f,p){return p.linkStrategy?.type===\"HardlinkFromIndex\"?t5e(t,e,r,s,a,n,c,f,p,p.linkStrategy):r5e(t,e,r,s,a,n,c,f,p)}async function i5e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(ZP(r.pathUtils,await n.readlinkPromise(c)),s)}),!0}var dd,$Ge,DU=Xe(()=>{el();dd=new Date(456789e3*1e3),$Ge=dd.getTime()});function ex(t,e,r,s){let a=()=>{let n=r.shift();if(typeof n>\"u\")return null;let c=t.pathUtils.join(e,n);return Object.assign(t.statSync(c),{name:n,path:void 0})};return new L2(e,a,s)}var L2,ZZ=Xe(()=>{zP();L2=class{constructor(e,r,s={}){this.path=e;this.nextDirent=r;this.opts=s;this.closed=!1}throwIfClosed(){if(this.closed)throw yU()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<\"u\"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<\"u\"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function $Z(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var e$,tx,t$=Xe(()=>{e$=Ie(\"events\");BU();tx=class t extends e$.EventEmitter{constructor(r,s,{bigint:a=!1}={}){super();this.status=\"ready\";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=s,this.bigint=a,this.lastStats=this.stat()}static create(r,s,a){let n=new t(r,s,a);return n.start(),n}start(){$Z(this.status,\"ready\"),this.status=\"running\",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(\"change\",this.lastStats,this.lastStats)},3)}stop(){$Z(this.status,\"running\"),this.status=\"stopped\",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(\"stop\")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let r=this.bigint?new iE:new nE;return XP(r)}}makeInterval(r){let s=setInterval(()=>{let a=this.stat(),n=this.lastStats;wU(a,n)||(this.lastStats=a,this.emit(\"change\",a,n))},r.interval);return r.persistent?s:s.unref()}registerChangeListener(r,s){this.addListener(\"change\",r),this.changeListeners.set(r,this.makeInterval(s))}unregisterChangeListener(r){this.removeListener(\"change\",r);let s=this.changeListeners.get(r);typeof s<\"u\"&&clearInterval(s),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function sE(t,e,r,s){let a,n,c,f;switch(typeof r){case\"function\":a=!1,n=!0,c=5007,f=r;break;default:({bigint:a=!1,persistent:n=!0,interval:c=5007}=r),f=s;break}let p=rx.get(t);typeof p>\"u\"&&rx.set(t,p=new Map);let h=p.get(e);return typeof h>\"u\"&&(h=tx.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(f,{persistent:n,interval:c}),h}function md(t,e,r){let s=rx.get(t);if(typeof s>\"u\")return;let a=s.get(e);typeof a>\"u\"||(typeof r>\"u\"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),s.delete(e)))}function yd(t){let e=rx.get(t);if(!(typeof e>\"u\"))for(let r of e.keys())md(t,r)}var rx,bU=Xe(()=>{t$();rx=new WeakMap});function s5e(t){let e=t.match(/\\r?\\n/g);if(e===null)return n$.EOL;let r=e.filter(a=>a===`\\r\n`).length,s=e.length-r;return r>s?`\\r\n`:`\n`}function Ed(t,e){return e.replace(/\\r?\\n/g,s5e(t))}var r$,n$,mp,Uf,Id=Xe(()=>{r$=Ie(\"crypto\"),n$=Ie(\"os\");DU();el();mp=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error(\"Not supported\")}else yield a}}async checksumFilePromise(e,{algorithm:r=\"sha512\"}={}){let s=await this.openPromise(e,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,r$.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code===\"ENOENT\")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!==\"EBUSY\"&&c.code!==\"ENOTEMPTY\")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code===\"ENOENT\")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await zZ(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(ZP(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,\"0\")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n=\"\";try{n=await this.readFilePromise(e,\"utf8\")}catch{}let c=s?Ed(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n=\"\";try{n=this.readFileSync(e,\"utf8\")}catch{}let c=s?Ed(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code===\"EXDEV\")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code===\"EXDEV\")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,\"wx\")}catch(p){if(p.code===\"EEXIST\"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw p}await this.writePromise(c,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(c),await this.unlinkPromise(s)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}readJsonSync(e){let r=this.readFileSync(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}async writeJsonPromise(e,r,{compact:s=!1}={}){let a=s?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)}\n`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}\n`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<\"u\"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends mp{constructor(){super(J)}}});var _s,yp=Xe(()=>{Id();_s=class extends mp{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r==\"string\"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(c,a,s)}symlinkSync(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(c,a,s)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,s){return this.baseFs.watch(this.mapToBase(e),r,s)}watchFile(e,r,s){return this.baseFs.watchFile(this.mapToBase(e),r,s)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e==\"number\"?e:this.mapToBase(e)}}});var _f,i$=Xe(()=>{yp();_f=class extends _s{constructor(e,{baseFs:r,pathUtils:s}){super(s),this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}});function s$(t){let e=t;return typeof t.path==\"string\"&&(e.path=fe.toPortablePath(t.path)),e}var o$,Yn,Cd=Xe(()=>{o$=ut(Ie(\"fs\"));Id();el();Yn=class extends Uf{constructor(e=o$.default){super(),this.realFs=e}getExtractHint(){return!1}getRealPath(){return vt.root}resolve(e){return J.resolve(e)}async openPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.open(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}openSync(e,r,s){return this.realFs.openSync(fe.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,a)=>{typeof r<\"u\"?this.realFs.opendir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.opendir(fe.fromPortablePath(e),this.makeCallback(s,a))}).then(s=>{let a=s;return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a})}opendirSync(e,r){let a=typeof r<\"u\"?this.realFs.opendirSync(fe.fromPortablePath(e),r):this.realFs.opendirSync(fe.fromPortablePath(e));return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a}async readPromise(e,r,s=0,a=0,n=-1){return await new Promise((c,f)=>{this.realFs.read(e,r,s,a,n,(p,h)=>{p?f(p):c(h)})})}readSync(e,r,s,a,n){return this.realFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return await new Promise((c,f)=>typeof r==\"string\"?this.realFs.write(e,r,s,this.makeCallback(c,f)):this.realFs.write(e,r,s,a,n,this.makeCallback(c,f)))}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,a,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?fe.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?fe.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(fe.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>fe.toPortablePath(r))}realpathSync(e){return fe.toPortablePath(this.realFs.realpathSync(fe.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(fe.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(fe.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,a)=>{this.realFs.access(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}existsSync(e){return this.realFs.existsSync(fe.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.stat(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.stat(fe.fromPortablePath(e),this.makeCallback(s,a))})}statSync(e,r){return r?this.realFs.statSync(fe.fromPortablePath(e),r):this.realFs.statSync(fe.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,a)):this.realFs.fstat(e,this.makeCallback(s,a))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.lstat(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.lstat(fe.fromPortablePath(e),this.makeCallback(s,a))})}lstatSync(e,r){return r?this.realFs.lstatSync(fe.fromPortablePath(e),r):this.realFs.lstatSync(fe.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.fchmod(e,r,this.makeCallback(s,a))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.chmod(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}chmodSync(e,r){return this.realFs.chmodSync(fe.fromPortablePath(e),r)}async fchownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.fchown(e,r,s,this.makeCallback(a,n))})}fchownSync(e,r,s){return this.realFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.chown(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}chownSync(e,r,s){return this.realFs.chownSync(fe.fromPortablePath(e),r,s)}async renamePromise(e,r){return await new Promise((s,a)=>{this.realFs.rename(fe.fromPortablePath(e),fe.fromPortablePath(r),this.makeCallback(s,a))})}renameSync(e,r){return this.realFs.renameSync(fe.fromPortablePath(e),fe.fromPortablePath(r))}async copyFilePromise(e,r,s=0){return await new Promise((a,n)=>{this.realFs.copyFile(fe.fromPortablePath(e),fe.fromPortablePath(r),s,this.makeCallback(a,n))})}copyFileSync(e,r,s=0){return this.realFs.copyFileSync(fe.fromPortablePath(e),fe.fromPortablePath(r),s)}async appendFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.appendFile(c,r,s,this.makeCallback(a,n)):this.realFs.appendFile(c,r,this.makeCallback(a,n))})}appendFileSync(e,r,s){let a=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.appendFileSync(a,r,s):this.realFs.appendFileSync(a,r)}async writeFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.writeFile(c,r,s,this.makeCallback(a,n)):this.realFs.writeFile(c,r,this.makeCallback(a,n))})}writeFileSync(e,r,s){let a=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.writeFileSync(a,r,s):this.realFs.writeFileSync(a,r)}async unlinkPromise(e){return await new Promise((r,s)=>{this.realFs.unlink(fe.fromPortablePath(e),this.makeCallback(r,s))})}unlinkSync(e){return this.realFs.unlinkSync(fe.fromPortablePath(e))}async utimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.utimes(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}utimesSync(e,r,s){this.realFs.utimesSync(fe.fromPortablePath(e),r,s)}async lutimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.lutimes(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}lutimesSync(e,r,s){this.realFs.lutimesSync(fe.fromPortablePath(e),r,s)}async mkdirPromise(e,r){return await new Promise((s,a)=>{this.realFs.mkdir(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}mkdirSync(e,r){return this.realFs.mkdirSync(fe.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rmdir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rmdir(fe.fromPortablePath(e),this.makeCallback(s,a))})}rmdirSync(e,r){return this.realFs.rmdirSync(fe.fromPortablePath(e),r)}async rmPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rm(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rm(fe.fromPortablePath(e),this.makeCallback(s,a))})}rmSync(e,r){return this.realFs.rmSync(fe.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((s,a)=>{this.realFs.link(fe.fromPortablePath(e),fe.fromPortablePath(r),this.makeCallback(s,a))})}linkSync(e,r){return this.realFs.linkSync(fe.fromPortablePath(e),fe.fromPortablePath(r))}async symlinkPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.symlink(fe.fromPortablePath(e.replace(/\\/+$/,\"\")),fe.fromPortablePath(r),s,this.makeCallback(a,n))})}symlinkSync(e,r,s){return this.realFs.symlinkSync(fe.fromPortablePath(e.replace(/\\/+$/,\"\")),fe.fromPortablePath(r),s)}async readFilePromise(e,r){return await new Promise((s,a)=>{let n=typeof e==\"string\"?fe.fromPortablePath(e):e;this.realFs.readFile(n,r,this.makeCallback(s,a))})}readFileSync(e,r){let s=typeof e==\"string\"?fe.fromPortablePath(e):e;return this.realFs.readFileSync(s,r)}async readdirPromise(e,r){return await new Promise((s,a)=>{r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(s$)),a)):this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(fe.toPortablePath)),a)):this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.readdir(fe.fromPortablePath(e),this.makeCallback(s,a))})}readdirSync(e,r){return r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdirSync(fe.fromPortablePath(e),r).map(s$):this.realFs.readdirSync(fe.fromPortablePath(e),r).map(fe.toPortablePath):this.realFs.readdirSync(fe.fromPortablePath(e),r):this.realFs.readdirSync(fe.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,s)=>{this.realFs.readlink(fe.fromPortablePath(e),this.makeCallback(r,s))}).then(r=>fe.toPortablePath(r))}readlinkSync(e){return fe.toPortablePath(this.realFs.readlinkSync(fe.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.truncate(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}truncateSync(e,r){return this.realFs.truncateSync(fe.fromPortablePath(e),r)}async ftruncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.ftruncate(e,r,this.makeCallback(s,a))})}ftruncateSync(e,r){return this.realFs.ftruncateSync(e,r)}watch(e,r,s){return this.realFs.watch(fe.fromPortablePath(e),r,s)}watchFile(e,r,s){return this.realFs.watchFile(fe.fromPortablePath(e),r,s)}unwatchFile(e,r){return this.realFs.unwatchFile(fe.fromPortablePath(e),r)}makeCallback(e,r){return(s,a)=>{s?r(s):e(a)}}}});var Sn,a$=Xe(()=>{Cd();yp();el();Sn=class extends _s{constructor(e,{baseFs:r=new Yn}={}){super(J),this.target=this.pathUtils.normalize(e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?J.normalize(e):this.baseFs.resolve(J.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}});var l$,Hf,c$=Xe(()=>{Cd();yp();el();l$=vt.root,Hf=class extends _s{constructor(e,{baseFs:r=new Yn}={}){super(J),this.target=this.pathUtils.resolve(vt.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(vt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let r=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(l$,e));if(r.match(/^\\.\\.\\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(l$,this.pathUtils.relative(this.target,e))}}});var oE,u$=Xe(()=>{yp();oE=class extends _s{constructor(r,s){super(s);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var wd,tl,e0,f$=Xe(()=>{wd=Ie(\"fs\");Id();Cd();bU();zP();el();tl=4278190080,e0=class extends Uf{constructor({baseFs:r=new Yn,filter:s=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:c=!0,maxAge:f=5e3,typeCheck:p=wd.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:C}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error(\"The magic byte must be set to a round value between 1 and 127 included\");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=c?new Map:null,this.factoryPromise=E,this.factorySync=C,this.filter=s,this.getMountPoint=h,this.magic=a<<24,this.maxAge=f,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(yd(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(yd(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,s){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,s]),a}async openPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,s,a),async(n,{subPath:c})=>this.remapFd(n,await n.openPromise(c,s,a)))}openSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,s,a),(n,{subPath:c})=>this.remapFd(n,n.openSync(c,s,a)))}async opendirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,s),async(a,{subPath:n})=>await a.opendirPromise(n,s),{requireSubpath:!1})}opendirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,s),(a,{subPath:n})=>a.opendirSync(n,s),{requireSubpath:!1})}async readPromise(r,s,a,n,c){if((r&tl)!==this.magic)return await this.baseFs.readPromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"read\");let[p,h]=f;return await p.readPromise(h,s,a,n,c)}readSync(r,s,a,n,c){if((r&tl)!==this.magic)return this.baseFs.readSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"readSync\");let[p,h]=f;return p.readSync(h,s,a,n,c)}async writePromise(r,s,a,n,c){if((r&tl)!==this.magic)return typeof s==\"string\"?await this.baseFs.writePromise(r,s,a):await this.baseFs.writePromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"write\");let[p,h]=f;return typeof s==\"string\"?await p.writePromise(h,s,a):await p.writePromise(h,s,a,n,c)}writeSync(r,s,a,n,c){if((r&tl)!==this.magic)return typeof s==\"string\"?this.baseFs.writeSync(r,s,a):this.baseFs.writeSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"writeSync\");let[p,h]=f;return typeof s==\"string\"?p.writeSync(h,s,a):p.writeSync(h,s,a,n,c)}async closePromise(r){if((r&tl)!==this.magic)return await this.baseFs.closePromise(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Mo(\"close\");this.fdMap.delete(r);let[a,n]=s;return await a.closePromise(n)}closeSync(r){if((r&tl)!==this.magic)return this.baseFs.closeSync(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Mo(\"closeSync\");this.fdMap.delete(r);let[a,n]=s;return a.closeSync(n)}createReadStream(r,s){return r===null?this.baseFs.createReadStream(r,s):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,s),(a,{archivePath:n,subPath:c})=>{let f=a.createReadStream(c,s);return f.path=fe.fromPortablePath(this.pathUtils.join(n,c)),f})}createWriteStream(r,s){return r===null?this.baseFs.createWriteStream(r,s):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,s),(a,{subPath:n})=>a.createWriteStream(n,s))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=await this.baseFs.realpathPromise(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,await s.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=this.baseFs.realpathSync(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,s.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(s,{subPath:a})=>await s.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(s,{subPath:a})=>s.existsSync(a))}async accessPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,s),async(a,{subPath:n})=>await a.accessPromise(n,s))}accessSync(r,s){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,s),(a,{subPath:n})=>a.accessSync(n,s))}async statPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,s),async(a,{subPath:n})=>await a.statPromise(n,s))}statSync(r,s){return this.makeCallSync(r,()=>this.baseFs.statSync(r,s),(a,{subPath:n})=>a.statSync(n,s))}async fstatPromise(r,s){if((r&tl)!==this.magic)return this.baseFs.fstatPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fstat\");let[n,c]=a;return n.fstatPromise(c,s)}fstatSync(r,s){if((r&tl)!==this.magic)return this.baseFs.fstatSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fstatSync\");let[n,c]=a;return n.fstatSync(c,s)}async lstatPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,s),async(a,{subPath:n})=>await a.lstatPromise(n,s))}lstatSync(r,s){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,s),(a,{subPath:n})=>a.lstatSync(n,s))}async fchmodPromise(r,s){if((r&tl)!==this.magic)return this.baseFs.fchmodPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fchmod\");let[n,c]=a;return n.fchmodPromise(c,s)}fchmodSync(r,s){if((r&tl)!==this.magic)return this.baseFs.fchmodSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fchmodSync\");let[n,c]=a;return n.fchmodSync(c,s)}async chmodPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,s),async(a,{subPath:n})=>await a.chmodPromise(n,s))}chmodSync(r,s){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,s),(a,{subPath:n})=>a.chmodSync(n,s))}async fchownPromise(r,s,a){if((r&tl)!==this.magic)return this.baseFs.fchownPromise(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Mo(\"fchown\");let[c,f]=n;return c.fchownPromise(f,s,a)}fchownSync(r,s,a){if((r&tl)!==this.magic)return this.baseFs.fchownSync(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Mo(\"fchownSync\");let[c,f]=n;return c.fchownSync(f,s,a)}async chownPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,s,a),async(n,{subPath:c})=>await n.chownPromise(c,s,a))}chownSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,s,a),(n,{subPath:c})=>n.chownSync(c,s,a))}async renamePromise(r,s){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.renamePromise(r,s),async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),async(a,{subPath:n})=>await this.makeCallPromise(s,async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},async(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return await a.renamePromise(n,f)}))}renameSync(r,s){return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.renameSync(r,s),()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),(a,{subPath:n})=>this.makeCallSync(s,()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return a.renameSync(n,f)}))}async copyFilePromise(r,s,a=0){let n=async(c,f,p,h)=>{if(a&wd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&wd.constants.COPYFILE_EXCL&&await this.existsPromise(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=await c.readFilePromise(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.copyFilePromise(r,s,a),async(c,{subPath:f})=>await n(this.baseFs,r,c,f)),async(c,{subPath:f})=>await this.makeCallPromise(s,async()=>await n(c,f,this.baseFs,s),async(p,{subPath:h})=>c!==p?await n(c,f,p,h):await c.copyFilePromise(f,h,a)))}copyFileSync(r,s,a=0){let n=(c,f,p,h)=>{if(a&wd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&wd.constants.COPYFILE_EXCL&&this.existsSync(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=c.readFileSync(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.copyFileSync(r,s,a),(c,{subPath:f})=>n(this.baseFs,r,c,f)),(c,{subPath:f})=>this.makeCallSync(s,()=>n(c,f,this.baseFs,s),(p,{subPath:h})=>c!==p?n(c,f,p,h):c.copyFileSync(f,h,a)))}async appendFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,s,a),async(n,{subPath:c})=>await n.appendFilePromise(c,s,a))}appendFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,s,a),(n,{subPath:c})=>n.appendFileSync(c,s,a))}async writeFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,s,a),async(n,{subPath:c})=>await n.writeFilePromise(c,s,a))}writeFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,s,a),(n,{subPath:c})=>n.writeFileSync(c,s,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(s,{subPath:a})=>await s.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(s,{subPath:a})=>s.unlinkSync(a))}async utimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,s,a),async(n,{subPath:c})=>await n.utimesPromise(c,s,a))}utimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,s,a),(n,{subPath:c})=>n.utimesSync(c,s,a))}async lutimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,s,a),async(n,{subPath:c})=>await n.lutimesPromise(c,s,a))}lutimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,s,a),(n,{subPath:c})=>n.lutimesSync(c,s,a))}async mkdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,s),async(a,{subPath:n})=>await a.mkdirPromise(n,s))}mkdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,s),(a,{subPath:n})=>a.mkdirSync(n,s))}async rmdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,s),async(a,{subPath:n})=>await a.rmdirPromise(n,s))}rmdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,s),(a,{subPath:n})=>a.rmdirSync(n,s))}async rmPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,s),async(a,{subPath:n})=>await a.rmPromise(n,s))}rmSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,s),(a,{subPath:n})=>a.rmSync(n,s))}async linkPromise(r,s){return await this.makeCallPromise(s,async()=>await this.baseFs.linkPromise(r,s),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,s){return this.makeCallSync(s,()=>this.baseFs.linkSync(r,s),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,s,a){return await this.makeCallPromise(s,async()=>await this.baseFs.symlinkPromise(r,s,a),async(n,{subPath:c})=>await n.symlinkPromise(r,c))}symlinkSync(r,s,a){return this.makeCallSync(s,()=>this.baseFs.symlinkSync(r,s,a),(n,{subPath:c})=>n.symlinkSync(r,c))}async readFilePromise(r,s){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,s),async(a,{subPath:n})=>await a.readFilePromise(n,s))}readFileSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,s),(a,{subPath:n})=>a.readFileSync(n,s))}async readdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,s),async(a,{subPath:n})=>await a.readdirPromise(n,s),{requireSubpath:!1})}readdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,s),(a,{subPath:n})=>a.readdirSync(n,s),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(s,{subPath:a})=>await s.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(s,{subPath:a})=>s.readlinkSync(a))}async truncatePromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,s),async(a,{subPath:n})=>await a.truncatePromise(n,s))}truncateSync(r,s){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,s),(a,{subPath:n})=>a.truncateSync(n,s))}async ftruncatePromise(r,s){if((r&tl)!==this.magic)return this.baseFs.ftruncatePromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"ftruncate\");let[n,c]=a;return n.ftruncatePromise(c,s)}ftruncateSync(r,s){if((r&tl)!==this.magic)return this.baseFs.ftruncateSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"ftruncateSync\");let[n,c]=a;return n.ftruncateSync(c,s)}watch(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,s,a),(n,{subPath:c})=>n.watch(c,s,a))}watchFile(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,s,a),()=>sE(this,r,s,a))}unwatchFile(r,s){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,s),()=>md(this,r,s))}async makeCallPromise(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return await s();let c=this.resolve(r),f=this.findMount(c);return f?n&&f.subPath===\"/\"?await s():await this.getMountPromise(f.archivePath,async p=>await a(p,f)):await s()}makeCallSync(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return s();let c=this.resolve(r),f=this.findMount(c);return!f||n&&f.subPath===\"/\"?s():this.getMountSync(f.archivePath,p=>a(p,f))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let s=\"\";for(;;){let a=r.substring(s.length),n=this.getMountPoint(a,s);if(!n)return null;if(s=this.pathUtils.join(s,n),!this.isMount.has(s)){if(this.notMount.has(s))continue;try{if(this.typeCheck!==null&&(this.baseFs.statSync(s).mode&wd.constants.S_IFMT)!==this.typeCheck){this.notMount.add(s);continue}}catch{return null}this.isMount.add(s)}return{archivePath:s,subPath:this.pathUtils.join(vt.root,r.substring(s.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let s=Date.now(),a=s+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[c,{childFs:f,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||f.hasOpenFileHandles?.())){if(s>=p){f.saveAndClose?.(),this.mountInstances.delete(c),n-=1;continue}else if(r===null||n<=0){a=p;break}f.saveAndClose?.(),this.mountInstances.delete(c),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-s).unref())}async getMountPromise(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await s(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await s(a)}finally{a.saveAndClose?.()}}}getMountSync(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,s(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return s(a)}finally{a.saveAndClose?.()}}}}});var er,nx,A$=Xe(()=>{Id();el();er=()=>Object.assign(new Error(\"ENOSYS: unsupported filesystem access\"),{code:\"ENOSYS\"}),nx=class t extends mp{static{this.instance=new t}constructor(){super(J)}getExtractHint(){throw er()}getRealPath(){throw er()}resolve(){throw er()}async openPromise(){throw er()}openSync(){throw er()}async opendirPromise(){throw er()}opendirSync(){throw er()}async readPromise(){throw er()}readSync(){throw er()}async writePromise(){throw er()}writeSync(){throw er()}async closePromise(){throw er()}closeSync(){throw er()}createWriteStream(){throw er()}createReadStream(){throw er()}async realpathPromise(){throw er()}realpathSync(){throw er()}async readdirPromise(){throw er()}readdirSync(){throw er()}async existsPromise(e){throw er()}existsSync(e){throw er()}async accessPromise(){throw er()}accessSync(){throw er()}async statPromise(){throw er()}statSync(){throw er()}async fstatPromise(e){throw er()}fstatSync(e){throw er()}async lstatPromise(e){throw er()}lstatSync(e){throw er()}async fchmodPromise(){throw er()}fchmodSync(){throw er()}async chmodPromise(){throw er()}chmodSync(){throw er()}async fchownPromise(){throw er()}fchownSync(){throw er()}async chownPromise(){throw er()}chownSync(){throw er()}async mkdirPromise(){throw er()}mkdirSync(){throw er()}async rmdirPromise(){throw er()}rmdirSync(){throw er()}async rmPromise(){throw er()}rmSync(){throw er()}async linkPromise(){throw er()}linkSync(){throw er()}async symlinkPromise(){throw er()}symlinkSync(){throw er()}async renamePromise(){throw er()}renameSync(){throw er()}async copyFilePromise(){throw er()}copyFileSync(){throw er()}async appendFilePromise(){throw er()}appendFileSync(){throw er()}async writeFilePromise(){throw er()}writeFileSync(){throw er()}async unlinkPromise(){throw er()}unlinkSync(){throw er()}async utimesPromise(){throw er()}utimesSync(){throw er()}async lutimesPromise(){throw er()}lutimesSync(){throw er()}async readFilePromise(){throw er()}readFileSync(){throw er()}async readlinkPromise(){throw er()}readlinkSync(){throw er()}async truncatePromise(){throw er()}truncateSync(){throw er()}async ftruncatePromise(e,r){throw er()}ftruncateSync(e,r){throw er()}watch(){throw er()}watchFile(){throw er()}unwatchFile(){throw er()}}});var t0,p$=Xe(()=>{yp();el();t0=class extends _s{constructor(e){super(fe),this.baseFs=e}mapFromBase(e){return fe.fromPortablePath(e)}mapToBase(e){return fe.toPortablePath(e)}}});var o5e,PU,a5e,uo,h$=Xe(()=>{Cd();yp();el();o5e=/^[0-9]+$/,PU=/^(\\/(?:[^/]+\\/)*?(?:\\$\\$virtual|__virtual__))((?:\\/((?:[^/]+-)?[a-f0-9]+)(?:\\/([^/]+))?)?((?:\\/.*)?))$/,a5e=/^([^/]+-)?[a-f0-9]+$/,uo=class t extends _s{static makeVirtualPath(e,r,s){if(J.basename(e)!==\"__virtual__\")throw new Error('Assertion failed: Virtual folders must be named \"__virtual__\"');if(!J.basename(r).match(a5e))throw new Error(\"Assertion failed: Virtual components must be ended by an hexadecimal hash\");let n=J.relative(J.dirname(e),s).split(\"/\"),c=0;for(;c<n.length&&n[c]===\"..\";)c+=1;let f=n.slice(c);return J.join(e,r,String(c),...f)}static resolveVirtual(e){let r=e.match(PU);if(!r||!r[3]&&r[5])return e;let s=J.dirname(r[1]);if(!r[3]||!r[4])return s;if(!o5e.test(r[4]))return e;let n=Number(r[4]),c=\"../\".repeat(n),f=r[5]||\".\";return t.resolveVirtual(J.join(s,c,f))}constructor({baseFs:e=new Yn}={}){super(J),this.baseFs=e}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(e){let r=e.match(PU);if(!r)return this.baseFs.realpathSync(e);if(!r[5])return e;let s=this.baseFs.realpathSync(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}async realpathPromise(e){let r=e.match(PU);if(!r)return await this.baseFs.realpathPromise(e);if(!r[5])return e;let s=await this.baseFs.realpathPromise(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}mapToBase(e){if(e===\"\")return e;if(this.pathUtils.isAbsolute(e))return t.resolveVirtual(e);let r=t.resolveVirtual(this.baseFs.resolve(vt.dot)),s=t.resolveVirtual(this.baseFs.resolve(e));return J.relative(r,s)||vt.dot}mapFromBase(e){return e}}});function l5e(t,e){return typeof xU.default.isUtf8<\"u\"?xU.default.isUtf8(t):Buffer.byteLength(e)===t.byteLength}var xU,g$,d$,ix,m$=Xe(()=>{xU=ut(Ie(\"buffer\")),g$=Ie(\"url\"),d$=Ie(\"util\");yp();el();ix=class extends _s{constructor(e){super(fe),this.baseFs=e}mapFromBase(e){return e}mapToBase(e){if(typeof e==\"string\")return e;if(e instanceof URL)return(0,g$.fileURLToPath)(e);if(Buffer.isBuffer(e)){let r=e.toString();if(!l5e(e,r))throw new Error(\"Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942\");return r}throw new Error(`Unsupported path type: ${(0,d$.inspect)(e)}`)}}});var w$,Uo,Ep,r0,sx,ox,aE,Ru,Fu,y$,E$,I$,C$,M2,B$=Xe(()=>{w$=Ie(\"readline\"),Uo=Symbol(\"kBaseFs\"),Ep=Symbol(\"kFd\"),r0=Symbol(\"kClosePromise\"),sx=Symbol(\"kCloseResolve\"),ox=Symbol(\"kCloseReject\"),aE=Symbol(\"kRefs\"),Ru=Symbol(\"kRef\"),Fu=Symbol(\"kUnref\"),M2=class{constructor(e,r){this[C$]=1;this[I$]=void 0;this[E$]=void 0;this[y$]=void 0;this[Uo]=r,this[Ep]=e}get fd(){return this[Ep]}async appendFile(e,r){try{this[Ru](this.appendFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;return await this[Uo].appendFilePromise(this.fd,e,s?{encoding:s}:void 0)}finally{this[Fu]()}}async chown(e,r){try{return this[Ru](this.chown),await this[Uo].fchownPromise(this.fd,e,r)}finally{this[Fu]()}}async chmod(e){try{return this[Ru](this.chmod),await this[Uo].fchmodPromise(this.fd,e)}finally{this[Fu]()}}createReadStream(e){return this[Uo].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Uo].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error(\"Method not implemented.\")}sync(){throw new Error(\"Method not implemented.\")}async read(e,r,s,a){try{this[Ru](this.read);let n,c;return ArrayBuffer.isView(e)?typeof r==\"object\"&&r!==null?(n=e,c=r?.offset??0,s=r?.length??n.byteLength-c,a=r?.position??null):(n=e,c=r??0,s??=0):(n=e?.buffer??Buffer.alloc(16384),c=e?.offset??0,s=e?.length??n.byteLength-c,a=e?.position??null),s===0?{bytesRead:s,buffer:n}:{bytesRead:await this[Uo].readPromise(this.fd,Buffer.isBuffer(n)?n:Buffer.from(n.buffer,n.byteOffset,n.byteLength),c,s,a),buffer:n}}finally{this[Fu]()}}async readFile(e){try{this[Ru](this.readFile);let r=(typeof e==\"string\"?e:e?.encoding)??void 0;return await this[Uo].readFilePromise(this.fd,r)}finally{this[Fu]()}}readLines(e){return(0,w$.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Ru](this.stat),await this[Uo].fstatPromise(this.fd,e)}finally{this[Fu]()}}async truncate(e){try{return this[Ru](this.truncate),await this[Uo].ftruncatePromise(this.fd,e)}finally{this[Fu]()}}utimes(e,r){throw new Error(\"Method not implemented.\")}async writeFile(e,r){try{this[Ru](this.writeFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;await this[Uo].writeFilePromise(this.fd,e,s)}finally{this[Fu]()}}async write(...e){try{if(this[Ru](this.write),ArrayBuffer.isView(e[0])){let[r,s,a,n]=e;return{bytesWritten:await this[Uo].writePromise(this.fd,r,s??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,s,a]=e;return{bytesWritten:await this[Uo].writePromise(this.fd,r,s,a),buffer:r}}}finally{this[Fu]()}}async writev(e,r){try{this[Ru](this.writev);let s=0;if(typeof r<\"u\")for(let a of e){let n=await this.write(a,void 0,void 0,r);s+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);s+=n.bytesWritten}return{buffers:e,bytesWritten:s}}finally{this[Fu]()}}readv(e,r){throw new Error(\"Method not implemented.\")}close(){if(this[Ep]===-1)return Promise.resolve();if(this[r0])return this[r0];if(this[aE]--,this[aE]===0){let e=this[Ep];this[Ep]=-1,this[r0]=this[Uo].closePromise(e).finally(()=>{this[r0]=void 0})}else this[r0]=new Promise((e,r)=>{this[sx]=e,this[ox]=r}).finally(()=>{this[r0]=void 0,this[ox]=void 0,this[sx]=void 0});return this[r0]}[(Uo,Ep,C$=aE,I$=r0,E$=sx,y$=ox,Ru)](e){if(this[Ep]===-1){let r=new Error(\"file closed\");throw r.code=\"EBADF\",r.syscall=e.name,r}this[aE]++}[Fu](){if(this[aE]--,this[aE]===0){let e=this[Ep];this[Ep]=-1,this[Uo].closePromise(e).then(this[sx],this[ox])}}}});function U2(t,e){e=new ix(e);let r=(s,a,n)=>{let c=s[a];s[a]=n,typeof c?.[lE.promisify.custom]<\"u\"&&(n[lE.promisify.custom]=c[lE.promisify.custom])};{r(t,\"exists\",(s,...a)=>{let c=typeof a[a.length-1]==\"function\"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(s).then(f=>{c(f)},()=>{c(!1)})})}),r(t,\"read\",(...s)=>{let[a,n,c,f,p,h]=s;if(s.length<=3){let E={};s.length<3?h=s[1]:(E=s[1],h=s[2]),{buffer:n=Buffer.alloc(16384),offset:c=0,length:f=n.byteLength,position:p}=E}if(c==null&&(c=0),f|=0,f===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,c,f,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let s of v$){let a=s.replace(/Promise$/,\"\");if(typeof t[a]>\"u\")continue;let n=e[s];if(typeof n>\"u\")continue;r(t,a,(...f)=>{let h=typeof f[f.length-1]==\"function\"?f.pop():()=>{};process.nextTick(()=>{n.apply(e,f).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,\"existsSync\",s=>{try{return e.existsSync(s)}catch{return!1}}),r(t,\"readSync\",(...s)=>{let[a,n,c,f,p]=s;return s.length<=3&&({offset:c=0,length:f=n.byteLength,position:p}=s[2]||{}),c==null&&(c=0),f|=0,f===0?0:(p==null&&(p=-1),e.readSync(a,n,c,f,p))});for(let s of c5e){let a=s;if(typeof t[a]>\"u\")continue;let n=e[s];typeof n>\"u\"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let s=t.promises;for(let a of v$){let n=a.replace(/Promise$/,\"\");if(typeof s[n]>\"u\")continue;let c=e[a];typeof c>\"u\"||a!==\"open\"&&r(s,n,(f,...p)=>f instanceof M2?f[n].apply(f,p):c.call(e,f,...p))}r(s,\"open\",async(...a)=>{let n=await e.openPromise(...a);return new M2(n,e)})}t.read[lE.promisify.custom]=async(s,a,...n)=>({bytesRead:await e.readPromise(s,a,...n),buffer:a}),t.write[lE.promisify.custom]=async(s,a,...n)=>({bytesWritten:await e.writePromise(s,a,...n),buffer:a})}function ax(t,e){let r=Object.create(t);return U2(r,e),r}var lE,c5e,v$,S$=Xe(()=>{lE=Ie(\"util\");m$();B$();c5e=new Set([\"accessSync\",\"appendFileSync\",\"createReadStream\",\"createWriteStream\",\"chmodSync\",\"fchmodSync\",\"chownSync\",\"fchownSync\",\"closeSync\",\"copyFileSync\",\"linkSync\",\"lstatSync\",\"fstatSync\",\"lutimesSync\",\"mkdirSync\",\"openSync\",\"opendirSync\",\"readlinkSync\",\"readFileSync\",\"readdirSync\",\"readlinkSync\",\"realpathSync\",\"renameSync\",\"rmdirSync\",\"rmSync\",\"statSync\",\"symlinkSync\",\"truncateSync\",\"ftruncateSync\",\"unlinkSync\",\"unwatchFile\",\"utimesSync\",\"watch\",\"watchFile\",\"writeFileSync\",\"writeSync\"]),v$=new Set([\"accessPromise\",\"appendFilePromise\",\"fchmodPromise\",\"chmodPromise\",\"fchownPromise\",\"chownPromise\",\"closePromise\",\"copyFilePromise\",\"linkPromise\",\"fstatPromise\",\"lstatPromise\",\"lutimesPromise\",\"mkdirPromise\",\"openPromise\",\"opendirPromise\",\"readdirPromise\",\"realpathPromise\",\"readFilePromise\",\"readdirPromise\",\"readlinkPromise\",\"renamePromise\",\"rmdirPromise\",\"rmPromise\",\"statPromise\",\"symlinkPromise\",\"truncatePromise\",\"ftruncatePromise\",\"unlinkPromise\",\"utimesPromise\",\"writeFilePromise\",\"writeSync\"])});function D$(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,\"0\");return`${t}${e}`}function b$(){if(kU)return kU;let t=fe.toPortablePath(P$.default.tmpdir()),e=ce.realpathSync(t);return process.once(\"exit\",()=>{ce.rmtempSync()}),kU={tmpdir:t,realTmpdir:e}}var P$,Nu,kU,ce,x$=Xe(()=>{P$=ut(Ie(\"os\"));Cd();el();Nu=new Set,kU=null;ce=Object.assign(new Yn,{detachTemp(t){Nu.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=b$();for(;;){let s=D$(\"xfs-\");try{this.mkdirSync(J.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=J.join(r,s);if(Nu.add(a),typeof t>\"u\")return a;try{return t(a)}finally{if(Nu.has(a)){Nu.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=b$();for(;;){let s=D$(\"xfs-\");try{await this.mkdirPromise(J.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=J.join(r,s);if(Nu.add(a),typeof t>\"u\")return a;try{return await t(a)}finally{if(Nu.has(a)){Nu.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Nu.values()).map(async t=>{try{await ce.removePromise(t,{maxRetries:0}),Nu.delete(t)}catch{}}))},rmtempSync(){for(let t of Nu)try{ce.removeSync(t),Nu.delete(t)}catch{}}})});var _2={};Vt(_2,{AliasFS:()=>_f,BasePortableFakeFS:()=>Uf,CustomDir:()=>L2,CwdFS:()=>Sn,FakeFS:()=>mp,Filename:()=>Er,JailFS:()=>Hf,LazyFS:()=>oE,MountFS:()=>e0,NoFS:()=>nx,NodeFS:()=>Yn,PortablePath:()=>vt,PosixFS:()=>t0,ProxiedFS:()=>_s,VirtualFS:()=>uo,constants:()=>fi,errors:()=>or,extendFs:()=>ax,normalizeLineEndings:()=>Ed,npath:()=>fe,opendir:()=>ex,patchFs:()=>U2,ppath:()=>J,setupCopyIndex:()=>$P,statUtils:()=>$a,unwatchAllFiles:()=>yd,unwatchFile:()=>md,watchFile:()=>sE,xfs:()=>ce});var Dt=Xe(()=>{YZ();zP();BU();DU();ZZ();bU();Id();el();el();i$();Id();a$();c$();u$();f$();A$();Cd();p$();yp();h$();S$();x$()});var F$=_((Dkt,R$)=>{R$.exports=T$;T$.sync=f5e;var k$=Ie(\"fs\");function u5e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(\";\"),r.indexOf(\"\")!==-1))return!0;for(var s=0;s<r.length;s++){var a=r[s].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function Q$(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:u5e(e,r)}function T$(t,e,r){k$.stat(t,function(s,a){r(s,s?!1:Q$(a,t,e))})}function f5e(t,e){return Q$(k$.statSync(t),t,e)}});var U$=_((bkt,M$)=>{M$.exports=O$;O$.sync=A5e;var N$=Ie(\"fs\");function O$(t,e,r){N$.stat(t,function(s,a){r(s,s?!1:L$(a,e))})}function A5e(t,e){return L$(N$.statSync(t),e)}function L$(t,e){return t.isFile()&&p5e(t,e)}function p5e(t,e){var r=t.mode,s=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),f=parseInt(\"100\",8),p=parseInt(\"010\",8),h=parseInt(\"001\",8),E=f|p,C=r&h||r&p&&a===c||r&f&&s===n||r&E&&n===0;return C}});var H$=_((xkt,_$)=>{var Pkt=Ie(\"fs\"),lx;process.platform===\"win32\"||global.TESTING_WINDOWS?lx=F$():lx=U$();_$.exports=QU;QU.sync=h5e;function QU(t,e,r){if(typeof e==\"function\"&&(r=e,e={}),!r){if(typeof Promise!=\"function\")throw new TypeError(\"callback not provided\");return new Promise(function(s,a){QU(t,e||{},function(n,c){n?a(n):s(c)})})}lx(t,e||{},function(s,a){s&&(s.code===\"EACCES\"||e&&e.ignoreErrors)&&(s=null,a=!1),r(s,a)})}function h5e(t,e){try{return lx.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code===\"EACCES\")return!1;throw r}}});var J$=_((kkt,V$)=>{var cE=process.platform===\"win32\"||process.env.OSTYPE===\"cygwin\"||process.env.OSTYPE===\"msys\",j$=Ie(\"path\"),g5e=cE?\";\":\":\",G$=H$(),q$=t=>Object.assign(new Error(`not found: ${t}`),{code:\"ENOENT\"}),W$=(t,e)=>{let r=e.colon||g5e,s=t.match(/\\//)||cE&&t.match(/\\\\/)?[\"\"]:[...cE?[process.cwd()]:[],...(e.path||process.env.PATH||\"\").split(r)],a=cE?e.pathExt||process.env.PATHEXT||\".EXE;.CMD;.BAT;.COM\":\"\",n=cE?a.split(r):[\"\"];return cE&&t.indexOf(\".\")!==-1&&n[0]!==\"\"&&n.unshift(\"\"),{pathEnv:s,pathExt:n,pathExtExe:a}},Y$=(t,e,r)=>{typeof e==\"function\"&&(r=e,e={}),e||(e={});let{pathEnv:s,pathExt:a,pathExtExe:n}=W$(t,e),c=[],f=h=>new Promise((E,C)=>{if(h===s.length)return e.all&&c.length?E(c):C(q$(t));let S=s[h],P=/^\".*\"$/.test(S)?S.slice(1,-1):S,I=j$.join(P,t),R=!P&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+I:I;E(p(R,h,0))}),p=(h,E,C)=>new Promise((S,P)=>{if(C===a.length)return S(f(E+1));let I=a[C];G$(h+I,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)c.push(h+I);else return S(h+I);return S(p(h,E,C+1))})});return r?f(0).then(h=>r(null,h),r):f(0)},d5e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:s,pathExtExe:a}=W$(t,e),n=[];for(let c=0;c<r.length;c++){let f=r[c],p=/^\".*\"$/.test(f)?f.slice(1,-1):f,h=j$.join(p,t),E=!p&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+h:h;for(let C=0;C<s.length;C++){let S=E+s[C];try{if(G$.sync(S,{pathExt:a}))if(e.all)n.push(S);else return S}catch{}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw q$(t)};V$.exports=Y$;Y$.sync=d5e});var z$=_((Qkt,TU)=>{\"use strict\";var K$=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!==\"win32\"?\"PATH\":Object.keys(e).reverse().find(s=>s.toUpperCase()===\"PATH\")||\"Path\"};TU.exports=K$;TU.exports.default=K$});var eee=_((Tkt,$$)=>{\"use strict\";var X$=Ie(\"path\"),m5e=J$(),y5e=z$();function Z$(t,e){let r=t.options.env||process.env,s=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let c;try{c=m5e.sync(t.command,{path:r[y5e({env:r})],pathExt:e?X$.delimiter:void 0})}catch{}finally{n&&process.chdir(s)}return c&&(c=X$.resolve(a?t.options.cwd:\"\",c)),c}function E5e(t){return Z$(t)||Z$(t,!0)}$$.exports=E5e});var tee=_((Rkt,FU)=>{\"use strict\";var RU=/([()\\][%!^\"`<>&|;, *?])/g;function I5e(t){return t=t.replace(RU,\"^$1\"),t}function C5e(t,e){return t=`${t}`,t=t.replace(/(?=(\\\\+?)?)\\1\"/g,'$1$1\\\\\"'),t=t.replace(/(?=(\\\\+?)?)\\1$/,\"$1$1\"),t=`\"${t}\"`,t=t.replace(RU,\"^$1\"),e&&(t=t.replace(RU,\"^$1\")),t}FU.exports.command=I5e;FU.exports.argument=C5e});var nee=_((Fkt,ree)=>{\"use strict\";ree.exports=/^#!(.*)/});var see=_((Nkt,iee)=>{\"use strict\";var w5e=nee();iee.exports=(t=\"\")=>{let e=t.match(w5e);if(!e)return null;let[r,s]=e[0].replace(/#! ?/,\"\").split(\" \"),a=r.split(\"/\").pop();return a===\"env\"?s:s?`${a} ${s}`:a}});var aee=_((Okt,oee)=>{\"use strict\";var NU=Ie(\"fs\"),B5e=see();function v5e(t){let r=Buffer.alloc(150),s;try{s=NU.openSync(t,\"r\"),NU.readSync(s,r,0,150,0),NU.closeSync(s)}catch{}return B5e(r.toString())}oee.exports=v5e});var fee=_((Lkt,uee)=>{\"use strict\";var S5e=Ie(\"path\"),lee=eee(),cee=tee(),D5e=aee(),b5e=process.platform===\"win32\",P5e=/\\.(?:com|exe)$/i,x5e=/node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;function k5e(t){t.file=lee(t);let e=t.file&&D5e(t.file);return e?(t.args.unshift(t.file),t.command=e,lee(t)):t.file}function Q5e(t){if(!b5e)return t;let e=k5e(t),r=!P5e.test(e);if(t.options.forceShell||r){let s=x5e.test(e);t.command=S5e.normalize(t.command),t.command=cee.command(t.command),t.args=t.args.map(n=>cee.argument(n,s));let a=[t.command].concat(t.args).join(\" \");t.args=[\"/d\",\"/s\",\"/c\",`\"${a}\"`],t.command=process.env.comspec||\"cmd.exe\",t.options.windowsVerbatimArguments=!0}return t}function T5e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:Q5e(s)}uee.exports=T5e});var hee=_((Mkt,pee)=>{\"use strict\";var OU=process.platform===\"win32\";function LU(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:\"ENOENT\",errno:\"ENOENT\",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function R5e(t,e){if(!OU)return;let r=t.emit;t.emit=function(s,a){if(s===\"exit\"){let n=Aee(a,e);if(n)return r.call(t,\"error\",n)}return r.apply(t,arguments)}}function Aee(t,e){return OU&&t===1&&!e.file?LU(e.original,\"spawn\"):null}function F5e(t,e){return OU&&t===1&&!e.file?LU(e.original,\"spawnSync\"):null}pee.exports={hookChildProcess:R5e,verifyENOENT:Aee,verifyENOENTSync:F5e,notFoundError:LU}});var _U=_((Ukt,uE)=>{\"use strict\";var gee=Ie(\"child_process\"),MU=fee(),UU=hee();function dee(t,e,r){let s=MU(t,e,r),a=gee.spawn(s.command,s.args,s.options);return UU.hookChildProcess(a,s),a}function N5e(t,e,r){let s=MU(t,e,r),a=gee.spawnSync(s.command,s.args,s.options);return a.error=a.error||UU.verifyENOENTSync(a.status,s),a}uE.exports=dee;uE.exports.spawn=dee;uE.exports.sync=N5e;uE.exports._parse=MU;uE.exports._enoent=UU});var yee=_((_kt,mee)=>{\"use strict\";function O5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Bd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Bd)}O5e(Bd,Error);Bd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function L5e(t,e){e=e!==void 0?e:{};var r={},s={Start:Wa},a=Wa,n=function(O){return O||[]},c=function(O,K,re){return[{command:O,type:K}].concat(re||[])},f=function(O,K){return[{command:O,type:K||\";\"}]},p=function(O){return O},h=\";\",E=ur(\";\",!1),C=\"&\",S=ur(\"&\",!1),P=function(O,K){return K?{chain:O,then:K}:{chain:O}},I=function(O,K){return{type:O,line:K}},R=\"&&\",N=ur(\"&&\",!1),U=\"||\",W=ur(\"||\",!1),ee=function(O,K){return K?{...O,then:K}:O},ie=function(O,K){return{type:O,chain:K}},ue=\"|&\",le=ur(\"|&\",!1),me=\"|\",pe=ur(\"|\",!1),Be=\"=\",Ce=ur(\"=\",!1),g=function(O,K){return{name:O,args:[K]}},we=function(O){return{name:O,args:[]}},ye=\"(\",Ae=ur(\"(\",!1),se=\")\",Z=ur(\")\",!1),De=function(O,K){return{type:\"subshell\",subshell:O,args:K}},Re=\"{\",mt=ur(\"{\",!1),j=\"}\",rt=ur(\"}\",!1),Fe=function(O,K){return{type:\"group\",group:O,args:K}},Ne=function(O,K){return{type:\"command\",args:K,envs:O}},Pe=function(O){return{type:\"envs\",envs:O}},Ve=function(O){return O},ke=function(O){return O},it=/^[0-9]/,Ue=zi([[\"0\",\"9\"]],!1,!1),x=function(O,K,re){return{type:\"redirection\",subtype:K,fd:O!==null?parseInt(O):null,args:[re]}},w=\">>\",b=ur(\">>\",!1),y=\">&\",F=ur(\">&\",!1),z=\">\",X=ur(\">\",!1),$=\"<<<\",oe=ur(\"<<<\",!1),xe=\"<&\",Te=ur(\"<&\",!1),lt=\"<\",Ct=ur(\"<\",!1),qt=function(O){return{type:\"argument\",segments:[].concat(...O)}},ir=function(O){return O},Pt=\"$'\",gn=ur(\"$'\",!1),Pr=\"'\",Ir=ur(\"'\",!1),Or=function(O){return[{type:\"text\",text:O}]},on='\"\"',ai=ur('\"\"',!1),Io=function(){return{type:\"text\",text:\"\"}},rs='\"',$s=ur('\"',!1),Co=function(O){return O},ji=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!0}},eo=function(O){return{type:\"shell\",shell:O,quoted:!0}},wo=function(O){return{type:\"variable\",...O,quoted:!0}},QA=function(O){return{type:\"text\",text:O}},Af=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!1}},dh=function(O){return{type:\"shell\",shell:O,quoted:!1}},mh=function(O){return{type:\"variable\",...O,quoted:!1}},to=function(O){return{type:\"glob\",pattern:O}},jn=/^[^']/,Ts=zi([\"'\"],!0,!1),ro=function(O){return O.join(\"\")},ou=/^[^$\"]/,au=zi([\"$\",'\"'],!0,!1),lu=`\\\\\n`,TA=ur(`\\\\\n`,!1),RA=function(){return\"\"},oa=\"\\\\\",aa=ur(\"\\\\\",!1),FA=/^[\\\\$\"`]/,gr=zi([\"\\\\\",\"$\",'\"',\"`\"],!1,!1),Bo=function(O){return O},Me=\"\\\\a\",cu=ur(\"\\\\a\",!1),Cr=function(){return\"a\"},pf=\"\\\\b\",NA=ur(\"\\\\b\",!1),OA=function(){return\"\\b\"},uu=/^[Ee]/,fu=zi([\"E\",\"e\"],!1,!1),oc=function(){return\"\\x1B\"},ve=\"\\\\f\",Nt=ur(\"\\\\f\",!1),ac=function(){return\"\\f\"},Oi=\"\\\\n\",no=ur(\"\\\\n\",!1),Rt=function(){return`\n`},xn=\"\\\\r\",la=ur(\"\\\\r\",!1),Gi=function(){return\"\\r\"},Li=\"\\\\t\",Na=ur(\"\\\\t\",!1),dn=function(){return\"\t\"},Kn=\"\\\\v\",Au=ur(\"\\\\v\",!1),yh=function(){return\"\\v\"},Oa=/^[\\\\'\"?]/,La=zi([\"\\\\\",\"'\",'\"',\"?\"],!1,!1),Ma=function(O){return String.fromCharCode(parseInt(O,16))},$e=\"\\\\x\",Ua=ur(\"\\\\x\",!1),hf=\"\\\\u\",lc=ur(\"\\\\u\",!1),wn=\"\\\\U\",ca=ur(\"\\\\U\",!1),LA=function(O){return String.fromCodePoint(parseInt(O,16))},MA=/^[0-7]/,ua=zi([[\"0\",\"7\"]],!1,!1),Bl=/^[0-9a-fA-f]/,Mt=zi([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"f\"]],!1,!1),kn=yf(),fa=\"{}\",Ha=ur(\"{}\",!1),ns=function(){return\"{}\"},cc=\"-\",pu=ur(\"-\",!1),uc=\"+\",ja=ur(\"+\",!1),Mi=\".\",Is=ur(\".\",!1),vl=function(O,K,re){return{type:\"number\",value:(O===\"-\"?-1:1)*parseFloat(K.join(\"\")+\".\"+re.join(\"\"))}},gf=function(O,K){return{type:\"number\",value:(O===\"-\"?-1:1)*parseInt(K.join(\"\"))}},fc=function(O){return{type:\"variable\",...O}},wi=function(O){return{type:\"variable\",name:O}},Qn=function(O){return O},Ac=\"*\",Ke=ur(\"*\",!1),st=\"/\",St=ur(\"/\",!1),lr=function(O,K,re){return{type:K===\"*\"?\"multiplication\":\"division\",right:re}},te=function(O,K){return K.reduce((re,de)=>({left:re,...de}),O)},Ee=function(O,K,re){return{type:K===\"+\"?\"addition\":\"subtraction\",right:re}},Oe=\"$((\",dt=ur(\"$((\",!1),Et=\"))\",bt=ur(\"))\",!1),tr=function(O){return O},An=\"$(\",li=ur(\"$(\",!1),qi=function(O){return O},Tn=\"${\",Ga=ur(\"${\",!1),my=\":-\",Z1=ur(\":-\",!1),vo=function(O,K){return{name:O,defaultValue:K}},yy=\":-}\",Eh=ur(\":-}\",!1),$1=function(O){return{name:O,defaultValue:[]}},So=\":+\",Ih=ur(\":+\",!1),Ch=function(O,K){return{name:O,alternativeValue:K}},hu=\":+}\",wh=ur(\":+}\",!1),Fg=function(O){return{name:O,alternativeValue:[]}},Ng=function(O){return{name:O}},Og=\"$\",Ey=ur(\"$\",!1),df=function(O){return e.isGlobPattern(O)},Do=function(O){return O},Sl=/^[a-zA-Z0-9_]/,Bh=zi([[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\"],!1,!1),Lg=function(){return By()},Dl=/^[$@*?#a-zA-Z0-9_\\-]/,bl=zi([\"$\",\"@\",\"*\",\"?\",\"#\",[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\",\"-\"],!1,!1),Iy=/^[()}<>$|&; \\t\"']/,UA=zi([\"(\",\")\",\"}\",\"<\",\">\",\"$\",\"|\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),Cy=/^[<>&; \\t\"']/,wy=zi([\"<\",\">\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),_A=/^[ \\t]/,HA=zi([\" \",\"\t\"],!1,!1),Y=0,xt=0,jA=[{line:1,column:1}],bo=0,mf=[],yt=0,gu;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function By(){return t.substring(xt,Y)}function Mg(){return Ef(xt,Y)}function e2(O,K){throw K=K!==void 0?K:Ef(xt,Y),GA([Ug(O)],t.substring(xt,Y),K)}function vh(O,K){throw K=K!==void 0?K:Ef(xt,Y),di(O,K)}function ur(O,K){return{type:\"literal\",text:O,ignoreCase:K}}function zi(O,K,re){return{type:\"class\",parts:O,inverted:K,ignoreCase:re}}function yf(){return{type:\"any\"}}function qa(){return{type:\"end\"}}function Ug(O){return{type:\"other\",description:O}}function du(O){var K=jA[O],re;if(K)return K;for(re=O-1;!jA[re];)re--;for(K=jA[re],K={line:K.line,column:K.column};re<O;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return jA[O]=K,K}function Ef(O,K){var re=du(O),de=du(K);return{start:{offset:O,line:re.line,column:re.column},end:{offset:K,line:de.line,column:de.column}}}function wt(O){Y<bo||(Y>bo&&(bo=Y,mf=[]),mf.push(O))}function di(O,K){return new Bd(O,null,null,K)}function GA(O,K,re){return new Bd(Bd.buildMessage(O,K),O,K,re)}function Wa(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=Aa(),re===r&&(re=null),re!==r?(xt=O,K=n(re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Aa(){var O,K,re,de,Je;if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de!==r?(Je=Ya(),Je===r&&(Je=null),Je!==r?(xt=O,K=c(K,de,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de===r&&(de=null),de!==r?(xt=O,K=f(K,de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Ya(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=Aa(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=p(re),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function _g(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,yt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=C,Y++):(O=r,yt===0&&wt(S))),O}function Sh(){var O,K,re;return O=Y,K=qA(),K!==r?(re=Hg(),re===r&&(re=null),re!==r?(xt=O,K=P(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Hg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=vy(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Sh(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=I(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function vy(){var O;return t.substr(Y,2)===R?(O=R,Y+=2):(O=r,yt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,yt===0&&wt(W))),O}function qA(){var O,K,re;return O=Y,K=If(),K!==r?(re=jg(),re===r&&(re=null),re!==r?(xt=O,K=ee(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=mu(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=qA(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=ie(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function mu(){var O;return t.substr(Y,2)===ue?(O=ue,Y+=2):(O=r,yt===0&&wt(le)),O===r&&(t.charCodeAt(Y)===124?(O=me,Y++):(O=r,yt===0&&wt(pe))),O}function yu(){var O,K,re,de,Je,At;if(O=Y,K=Ph(),K!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,yt===0&&wt(Ce)),re!==r)if(de=WA(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(xt=O,K=g(K,de),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;else Y=O,O=r;if(O===r)if(O=Y,K=Ph(),K!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,yt===0&&wt(Ce)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=we(K),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function If(){var O,K,re,de,Je,At,dr,vr,Un,mi,Cs;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(t.charCodeAt(Y)===40?(re=ye,Y++):(re=r,yt===0&&wt(Ae)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Aa(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();if(At!==r)if(t.charCodeAt(Y)===41?(dr=se,Y++):(dr=r,yt===0&&wt(Z)),dr!==r){for(vr=[],Un=kt();Un!==r;)vr.push(Un),Un=kt();if(vr!==r){for(Un=[],mi=Gn();mi!==r;)Un.push(mi),mi=Gn();if(Un!==r){for(mi=[],Cs=kt();Cs!==r;)mi.push(Cs),Cs=kt();mi!==r?(xt=O,K=De(Je,Un),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(t.charCodeAt(Y)===123?(re=Re,Y++):(re=r,yt===0&&wt(mt)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Aa(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();if(At!==r)if(t.charCodeAt(Y)===125?(dr=j,Y++):(dr=r,yt===0&&wt(rt)),dr!==r){for(vr=[],Un=kt();Un!==r;)vr.push(Un),Un=kt();if(vr!==r){for(Un=[],mi=Gn();mi!==r;)Un.push(mi),mi=Gn();if(Un!==r){for(mi=[],Cs=kt();Cs!==r;)mi.push(Cs),Cs=kt();mi!==r?(xt=O,K=Fe(Je,Un),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){for(re=[],de=yu();de!==r;)re.push(de),de=yu();if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r){if(Je=[],At=Eu(),At!==r)for(;At!==r;)Je.push(At),At=Eu();else Je=r;if(Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=Ne(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],de=yu(),de!==r)for(;de!==r;)re.push(de),de=yu();else re=r;if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=Pe(re),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}}}return O}function Rs(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],de=Pi(),de!==r)for(;de!==r;)re.push(de),de=Pi();else re=r;if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=Ve(re),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r;return O}function Eu(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r?(re=Gn(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();K!==r?(re=Pi(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r)}return O}function Gn(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(it.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ue)),re===r&&(re=null),re!==r?(de=is(),de!==r?(Je=Pi(),Je!==r?(xt=O,K=x(re,de,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function is(){var O;return t.substr(Y,2)===w?(O=w,Y+=2):(O=r,yt===0&&wt(b)),O===r&&(t.substr(Y,2)===y?(O=y,Y+=2):(O=r,yt===0&&wt(F)),O===r&&(t.charCodeAt(Y)===62?(O=z,Y++):(O=r,yt===0&&wt(X)),O===r&&(t.substr(Y,3)===$?(O=$,Y+=3):(O=r,yt===0&&wt(oe)),O===r&&(t.substr(Y,2)===xe?(O=xe,Y+=2):(O=r,yt===0&&wt(Te)),O===r&&(t.charCodeAt(Y)===60?(O=lt,Y++):(O=r,yt===0&&wt(Ct))))))),O}function Pi(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=WA(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function WA(){var O,K,re;if(O=Y,K=[],re=Cf(),re!==r)for(;re!==r;)K.push(re),re=Cf();else K=r;return K!==r&&(xt=O,K=qt(K)),O=K,O}function Cf(){var O,K;return O=Y,K=mn(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=Gg(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=qg(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=ss(),K!==r&&(xt=O,K=ir(K)),O=K))),O}function mn(){var O,K,re,de;return O=Y,t.substr(Y,2)===Pt?(K=Pt,Y+=2):(K=r,yt===0&&wt(gn)),K!==r?(re=yn(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,yt===0&&wt(Ir)),de!==r?(xt=O,K=Or(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function Gg(){var O,K,re,de;return O=Y,t.charCodeAt(Y)===39?(K=Pr,Y++):(K=r,yt===0&&wt(Ir)),K!==r?(re=wf(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,yt===0&&wt(Ir)),de!==r?(xt=O,K=Or(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function qg(){var O,K,re,de;if(O=Y,t.substr(Y,2)===on?(K=on,Y+=2):(K=r,yt===0&&wt(ai)),K!==r&&(xt=O,K=Io()),O=K,O===r)if(O=Y,t.charCodeAt(Y)===34?(K=rs,Y++):(K=r,yt===0&&wt($s)),K!==r){for(re=[],de=Pl();de!==r;)re.push(de),de=Pl();re!==r?(t.charCodeAt(Y)===34?(de=rs,Y++):(de=r,yt===0&&wt($s)),de!==r?(xt=O,K=Co(re),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function ss(){var O,K,re;if(O=Y,K=[],re=Po(),re!==r)for(;re!==r;)K.push(re),re=Po();else K=r;return K!==r&&(xt=O,K=Co(K)),O=K,O}function Pl(){var O,K;return O=Y,K=Zr(),K!==r&&(xt=O,K=ji(K)),O=K,O===r&&(O=Y,K=bh(),K!==r&&(xt=O,K=eo(K)),O=K,O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=wo(K)),O=K,O===r&&(O=Y,K=Bf(),K!==r&&(xt=O,K=QA(K)),O=K))),O}function Po(){var O,K;return O=Y,K=Zr(),K!==r&&(xt=O,K=Af(K)),O=K,O===r&&(O=Y,K=bh(),K!==r&&(xt=O,K=dh(K)),O=K,O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=mh(K)),O=K,O===r&&(O=Y,K=Sy(),K!==r&&(xt=O,K=to(K)),O=K,O===r&&(O=Y,K=Dh(),K!==r&&(xt=O,K=QA(K)),O=K)))),O}function wf(){var O,K,re;for(O=Y,K=[],jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts));re!==r;)K.push(re),jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts));return K!==r&&(xt=O,K=ro(K)),O=K,O}function Bf(){var O,K,re;if(O=Y,K=[],re=xl(),re===r&&(ou.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(au))),re!==r)for(;re!==r;)K.push(re),re=xl(),re===r&&(ou.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(au)));else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function xl(){var O,K,re;return O=Y,t.substr(Y,2)===lu?(K=lu,Y+=2):(K=r,yt===0&&wt(TA)),K!==r&&(xt=O,K=RA()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(FA.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(gr)),re!==r?(xt=O,K=Bo(re),O=K):(Y=O,O=r)):(Y=O,O=r)),O}function yn(){var O,K,re;for(O=Y,K=[],re=xo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts)));re!==r;)K.push(re),re=xo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts)));return K!==r&&(xt=O,K=ro(K)),O=K,O}function xo(){var O,K,re;return O=Y,t.substr(Y,2)===Me?(K=Me,Y+=2):(K=r,yt===0&&wt(cu)),K!==r&&(xt=O,K=Cr()),O=K,O===r&&(O=Y,t.substr(Y,2)===pf?(K=pf,Y+=2):(K=r,yt===0&&wt(NA)),K!==r&&(xt=O,K=OA()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(uu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(fu)),re!==r?(xt=O,K=oc(),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===ve?(K=ve,Y+=2):(K=r,yt===0&&wt(Nt)),K!==r&&(xt=O,K=ac()),O=K,O===r&&(O=Y,t.substr(Y,2)===Oi?(K=Oi,Y+=2):(K=r,yt===0&&wt(no)),K!==r&&(xt=O,K=Rt()),O=K,O===r&&(O=Y,t.substr(Y,2)===xn?(K=xn,Y+=2):(K=r,yt===0&&wt(la)),K!==r&&(xt=O,K=Gi()),O=K,O===r&&(O=Y,t.substr(Y,2)===Li?(K=Li,Y+=2):(K=r,yt===0&&wt(Na)),K!==r&&(xt=O,K=dn()),O=K,O===r&&(O=Y,t.substr(Y,2)===Kn?(K=Kn,Y+=2):(K=r,yt===0&&wt(Au)),K!==r&&(xt=O,K=yh()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(Oa.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(La)),re!==r?(xt=O,K=Bo(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Iu()))))))))),O}function Iu(){var O,K,re,de,Je,At,dr,vr,Un,mi,Cs,JA;return O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(re=pa(),re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===$e?(K=$e,Y+=2):(K=r,yt===0&&wt(Ua)),K!==r?(re=Y,de=Y,Je=pa(),Je!==r?(At=Fs(),At!==r?(Je=[Je,At],de=Je):(Y=de,de=r)):(Y=de,de=r),de===r&&(de=pa()),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===hf?(K=hf,Y+=2):(K=r,yt===0&&wt(lc)),K!==r?(re=Y,de=Y,Je=Fs(),Je!==r?(At=Fs(),At!==r?(dr=Fs(),dr!==r?(vr=Fs(),vr!==r?(Je=[Je,At,dr,vr],de=Je):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===wn?(K=wn,Y+=2):(K=r,yt===0&&wt(ca)),K!==r?(re=Y,de=Y,Je=Fs(),Je!==r?(At=Fs(),At!==r?(dr=Fs(),dr!==r?(vr=Fs(),vr!==r?(Un=Fs(),Un!==r?(mi=Fs(),mi!==r?(Cs=Fs(),Cs!==r?(JA=Fs(),JA!==r?(Je=[Je,At,dr,vr,Un,mi,Cs,JA],de=Je):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=LA(re),O=K):(Y=O,O=r)):(Y=O,O=r)))),O}function pa(){var O;return MA.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(ua)),O}function Fs(){var O;return Bl.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(Mt)),O}function Dh(){var O,K,re,de,Je;if(O=Y,K=[],re=Y,t.charCodeAt(Y)===92?(de=oa,Y++):(de=r,yt===0&&wt(aa)),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===fa?(de=fa,Y+=2):(de=r,yt===0&&wt(Ha)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,yt++,Je=Dy(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)K.push(re),re=Y,t.charCodeAt(Y)===92?(de=oa,Y++):(de=r,yt===0&&wt(aa)),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===fa?(de=fa,Y+=2):(de=r,yt===0&&wt(Ha)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,yt++,Je=Dy(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r)));else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function YA(){var O,K,re,de,Je,At;if(O=Y,t.charCodeAt(Y)===45?(K=cc,Y++):(K=r,yt===0&&wt(pu)),K===r&&(t.charCodeAt(Y)===43?(K=uc,Y++):(K=r,yt===0&&wt(ja))),K===r&&(K=null),K!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue));else re=r;if(re!==r)if(t.charCodeAt(Y)===46?(de=Mi,Y++):(de=r,yt===0&&wt(Is)),de!==r){if(Je=[],it.test(t.charAt(Y))?(At=t.charAt(Y),Y++):(At=r,yt===0&&wt(Ue)),At!==r)for(;At!==r;)Je.push(At),it.test(t.charAt(Y))?(At=t.charAt(Y),Y++):(At=r,yt===0&&wt(Ue));else Je=r;Je!==r?(xt=O,K=vl(K,re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;if(O===r){if(O=Y,t.charCodeAt(Y)===45?(K=cc,Y++):(K=r,yt===0&&wt(pu)),K===r&&(t.charCodeAt(Y)===43?(K=uc,Y++):(K=r,yt===0&&wt(ja))),K===r&&(K=null),K!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue));else re=r;re!==r?(xt=O,K=gf(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;if(O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=fc(K)),O=K,O===r&&(O=Y,K=pc(),K!==r&&(xt=O,K=wi(K)),O=K,O===r)))if(O=Y,t.charCodeAt(Y)===40?(K=ye,Y++):(K=r,yt===0&&wt(Ae)),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=io(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(t.charCodeAt(Y)===41?(At=se,Y++):(At=r,yt===0&&wt(Z)),At!==r?(xt=O,K=Qn(de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r}return O}function vf(){var O,K,re,de,Je,At,dr,vr;if(O=Y,K=YA(),K!==r){for(re=[],de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===42?(At=Ac,Y++):(At=r,yt===0&&wt(Ke)),At===r&&(t.charCodeAt(Y)===47?(At=st,Y++):(At=r,yt===0&&wt(St))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=YA(),vr!==r?(xt=de,Je=lr(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===42?(At=Ac,Y++):(At=r,yt===0&&wt(Ke)),At===r&&(t.charCodeAt(Y)===47?(At=st,Y++):(At=r,yt===0&&wt(St))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=YA(),vr!==r?(xt=de,Je=lr(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,K=te(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;return O}function io(){var O,K,re,de,Je,At,dr,vr;if(O=Y,K=vf(),K!==r){for(re=[],de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===43?(At=uc,Y++):(At=r,yt===0&&wt(ja)),At===r&&(t.charCodeAt(Y)===45?(At=cc,Y++):(At=r,yt===0&&wt(pu))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=vf(),vr!==r?(xt=de,Je=Ee(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===43?(At=uc,Y++):(At=r,yt===0&&wt(ja)),At===r&&(t.charCodeAt(Y)===45?(At=cc,Y++):(At=r,yt===0&&wt(pu))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=vf(),vr!==r?(xt=de,Je=Ee(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,K=te(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;return O}function Zr(){var O,K,re,de,Je,At;if(O=Y,t.substr(Y,3)===Oe?(K=Oe,Y+=3):(K=r,yt===0&&wt(dt)),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=io(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(t.substr(Y,2)===Et?(At=Et,Y+=2):(At=r,yt===0&&wt(bt)),At!==r?(xt=O,K=tr(de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;return O}function bh(){var O,K,re,de;return O=Y,t.substr(Y,2)===An?(K=An,Y+=2):(K=r,yt===0&&wt(li)),K!==r?(re=Aa(),re!==r?(t.charCodeAt(Y)===41?(de=se,Y++):(de=r,yt===0&&wt(Z)),de!==r?(xt=O,K=qi(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function VA(){var O,K,re,de,Je,At;return O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,2)===my?(de=my,Y+=2):(de=r,yt===0&&wt(Z1)),de!==r?(Je=Rs(),Je!==r?(t.charCodeAt(Y)===125?(At=j,Y++):(At=r,yt===0&&wt(rt)),At!==r?(xt=O,K=vo(re,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,3)===yy?(de=yy,Y+=3):(de=r,yt===0&&wt(Eh)),de!==r?(xt=O,K=$1(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,2)===So?(de=So,Y+=2):(de=r,yt===0&&wt(Ih)),de!==r?(Je=Rs(),Je!==r?(t.charCodeAt(Y)===125?(At=j,Y++):(At=r,yt===0&&wt(rt)),At!==r?(xt=O,K=Ch(re,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,3)===hu?(de=hu,Y+=3):(de=r,yt===0&&wt(wh)),de!==r?(xt=O,K=Fg(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.charCodeAt(Y)===125?(de=j,Y++):(de=r,yt===0&&wt(rt)),de!==r?(xt=O,K=Ng(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.charCodeAt(Y)===36?(K=Og,Y++):(K=r,yt===0&&wt(Ey)),K!==r?(re=pc(),re!==r?(xt=O,K=Ng(re),O=K):(Y=O,O=r)):(Y=O,O=r)))))),O}function Sy(){var O,K,re;return O=Y,K=Wg(),K!==r?(xt=Y,re=df(K),re?re=void 0:re=r,re!==r?(xt=O,K=Do(K),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Wg(){var O,K,re,de,Je;if(O=Y,K=[],re=Y,de=Y,yt++,Je=xh(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)K.push(re),re=Y,de=Y,yt++,Je=xh(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r);else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function Ph(){var O,K,re;if(O=Y,K=[],Sl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Bh)),re!==r)for(;re!==r;)K.push(re),Sl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Bh));else K=r;return K!==r&&(xt=O,K=Lg()),O=K,O}function pc(){var O,K,re;if(O=Y,K=[],Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(bl)),re!==r)for(;re!==r;)K.push(re),Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(bl));else K=r;return K!==r&&(xt=O,K=Lg()),O=K,O}function Dy(){var O;return Iy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(UA)),O}function xh(){var O;return Cy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(wy)),O}function kt(){var O,K;if(O=[],_A.test(t.charAt(Y))?(K=t.charAt(Y),Y++):(K=r,yt===0&&wt(HA)),K!==r)for(;K!==r;)O.push(K),_A.test(t.charAt(Y))?(K=t.charAt(Y),Y++):(K=r,yt===0&&wt(HA));else O=r;return O}if(gu=a(),gu!==r&&Y===t.length)return gu;throw gu!==r&&Y<t.length&&wt(qa()),GA(mf,bo<t.length?t.charAt(bo):null,bo<t.length?Ef(bo,bo+1):Ef(bo,bo))}mee.exports={SyntaxError:Bd,parse:L5e}});function ux(t,e={isGlobPattern:()=>!1}){try{return(0,Eee.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function fE(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:s},a)=>`${fx(r)}${s===\";\"?a!==t.length-1||e?\";\":\"\":\" &\"}`).join(\" \")}function fx(t){return`${AE(t.chain)}${t.then?` ${HU(t.then)}`:\"\"}`}function HU(t){return`${t.type} ${fx(t.line)}`}function AE(t){return`${GU(t)}${t.then?` ${jU(t.then)}`:\"\"}`}function jU(t){return`${t.type} ${AE(t.chain)}`}function GU(t){switch(t.type){case\"command\":return`${t.envs.length>0?`${t.envs.map(e=>cx(e)).join(\" \")} `:\"\"}${t.args.map(e=>qU(e)).join(\" \")}`;case\"subshell\":return`(${fE(t.subshell)})${t.args.length>0?` ${t.args.map(e=>H2(e)).join(\" \")}`:\"\"}`;case\"group\":return`{ ${fE(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>H2(e)).join(\" \")}`:\"\"}`;case\"envs\":return t.envs.map(e=>cx(e)).join(\" \");default:throw new Error(`Unsupported command type:  \"${t.type}\"`)}}function cx(t){return`${t.name}=${t.args[0]?vd(t.args[0]):\"\"}`}function qU(t){switch(t.type){case\"redirection\":return H2(t);case\"argument\":return vd(t);default:throw new Error(`Unsupported argument type: \"${t.type}\"`)}}function H2(t){return`${t.subtype} ${t.args.map(e=>vd(e)).join(\" \")}`}function vd(t){return t.segments.map(e=>WU(e)).join(\"\")}function WU(t){let e=(s,a)=>a?`\"${s}\"`:s,r=s=>s===\"\"?\"''\":s.match(/[()}<>$|&;\"'\\n\\t ]/)?s.match(/['\\t\\p{C}]/u)?s.match(/'/)?`\"${s.replace(/[\"$\\t\\p{C}]/u,U5e)}\"`:`$'${s.replace(/[\\t\\p{C}]/u,Cee)}'`:`'${s}'`:s;switch(t.type){case\"text\":return r(t.text);case\"glob\":return t.pattern;case\"shell\":return e(`$(${fE(t.shell)})`,t.quoted);case\"variable\":return e(typeof t.defaultValue>\"u\"?typeof t.alternativeValue>\"u\"?`\\${${t.name}}`:t.alternativeValue.length===0?`\\${${t.name}:+}`:`\\${${t.name}:+${t.alternativeValue.map(s=>vd(s)).join(\" \")}}`:t.defaultValue.length===0?`\\${${t.name}:-}`:`\\${${t.name}:-${t.defaultValue.map(s=>vd(s)).join(\" \")}}`,t.quoted);case\"arithmetic\":return`$(( ${Ax(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: \"${t.type}\"`)}}function Ax(t){let e=a=>{switch(a){case\"addition\":return\"+\";case\"subtraction\":return\"-\";case\"multiplication\":return\"*\";case\"division\":return\"/\";default:throw new Error(`Can't extract operator from arithmetic expression of type \"${a}\"`)}},r=(a,n)=>n?`( ${a} )`:a,s=a=>r(Ax(a),![\"number\",\"variable\"].includes(a.type));switch(t.type){case\"number\":return String(t.value);case\"variable\":return t.name;default:return`${s(t.left)} ${e(t.type)} ${s(t.right)}`}}var Eee,Iee,M5e,Cee,U5e,wee=Xe(()=>{Eee=ut(yee());Iee=new Map([[\"\\f\",\"\\\\f\"],[`\n`,\"\\\\n\"],[\"\\r\",\"\\\\r\"],[\"\t\",\"\\\\t\"],[\"\\v\",\"\\\\v\"],[\"\\0\",\"\\\\0\"]]),M5e=new Map([[\"\\\\\",\"\\\\\\\\\"],[\"$\",\"\\\\$\"],['\"','\\\\\"'],...Array.from(Iee,([t,e])=>[t,`\"$'${e}'\"`])]),Cee=t=>Iee.get(t)??`\\\\x${t.charCodeAt(0).toString(16).padStart(2,\"0\")}`,U5e=t=>M5e.get(t)??`\"$'${Cee(t)}'\"`});var vee=_((eQt,Bee)=>{\"use strict\";function _5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Sd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Sd)}_5e(Sd,Error);Sd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function H5e(t,e){e=e!==void 0?e:{};var r={},s={resolution:Ne},a=Ne,n=\"/\",c=ye(\"/\",!1),f=function(Ue,x){return{from:Ue,descriptor:x}},p=function(Ue){return{descriptor:Ue}},h=\"@\",E=ye(\"@\",!1),C=function(Ue,x){return{fullName:Ue,description:x}},S=function(Ue){return{fullName:Ue}},P=function(){return Be()},I=/^[^\\/@]/,R=Ae([\"/\",\"@\"],!0,!1),N=/^[^\\/]/,U=Ae([\"/\"],!0,!1),W=0,ee=0,ie=[{line:1,column:1}],ue=0,le=[],me=0,pe;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Be(){return t.substring(ee,W)}function Ce(){return mt(ee,W)}function g(Ue,x){throw x=x!==void 0?x:mt(ee,W),Fe([De(Ue)],t.substring(ee,W),x)}function we(Ue,x){throw x=x!==void 0?x:mt(ee,W),rt(Ue,x)}function ye(Ue,x){return{type:\"literal\",text:Ue,ignoreCase:x}}function Ae(Ue,x,w){return{type:\"class\",parts:Ue,inverted:x,ignoreCase:w}}function se(){return{type:\"any\"}}function Z(){return{type:\"end\"}}function De(Ue){return{type:\"other\",description:Ue}}function Re(Ue){var x=ie[Ue],w;if(x)return x;for(w=Ue-1;!ie[w];)w--;for(x=ie[w],x={line:x.line,column:x.column};w<Ue;)t.charCodeAt(w)===10?(x.line++,x.column=1):x.column++,w++;return ie[Ue]=x,x}function mt(Ue,x){var w=Re(Ue),b=Re(x);return{start:{offset:Ue,line:w.line,column:w.column},end:{offset:x,line:b.line,column:b.column}}}function j(Ue){W<ue||(W>ue&&(ue=W,le=[]),le.push(Ue))}function rt(Ue,x){return new Sd(Ue,null,null,x)}function Fe(Ue,x,w){return new Sd(Sd.buildMessage(Ue,x),Ue,x,w)}function Ne(){var Ue,x,w,b;return Ue=W,x=Pe(),x!==r?(t.charCodeAt(W)===47?(w=n,W++):(w=r,me===0&&j(c)),w!==r?(b=Pe(),b!==r?(ee=Ue,x=f(x,b),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=Pe(),x!==r&&(ee=Ue,x=p(x)),Ue=x),Ue}function Pe(){var Ue,x,w,b;return Ue=W,x=Ve(),x!==r?(t.charCodeAt(W)===64?(w=h,W++):(w=r,me===0&&j(E)),w!==r?(b=it(),b!==r?(ee=Ue,x=C(x,b),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=Ve(),x!==r&&(ee=Ue,x=S(x)),Ue=x),Ue}function Ve(){var Ue,x,w,b,y;return Ue=W,t.charCodeAt(W)===64?(x=h,W++):(x=r,me===0&&j(E)),x!==r?(w=ke(),w!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(ee=Ue,x=P(),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=ke(),x!==r&&(ee=Ue,x=P()),Ue=x),Ue}function ke(){var Ue,x,w;if(Ue=W,x=[],I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R)),w!==r)for(;w!==r;)x.push(w),I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R));else x=r;return x!==r&&(ee=Ue,x=P()),Ue=x,Ue}function it(){var Ue,x,w;if(Ue=W,x=[],N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U)),w!==r)for(;w!==r;)x.push(w),N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U));else x=r;return x!==r&&(ee=Ue,x=P()),Ue=x,Ue}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W<t.length&&j(Z()),Fe(le,ue<t.length?t.charAt(ue):null,ue<t.length?mt(ue,ue+1):mt(ue,ue))}Bee.exports={SyntaxError:Sd,parse:H5e}});function px(t){let e=t.match(/^\\*{1,2}\\/(.*)/);if(e)throw new Error(`The override for '${t}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${e[1]}' instead.`);try{return(0,See.parse)(t)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function hx(t){let e=\"\";return t.from&&(e+=t.from.fullName,t.from.description&&(e+=`@${t.from.description}`),e+=\"/\"),e+=t.descriptor.fullName,t.descriptor.description&&(e+=`@${t.descriptor.description}`),e}var See,Dee=Xe(()=>{See=ut(vee())});var bd=_((rQt,Dd)=>{\"use strict\";function bee(t){return typeof t>\"u\"||t===null}function j5e(t){return typeof t==\"object\"&&t!==null}function G5e(t){return Array.isArray(t)?t:bee(t)?[]:[t]}function q5e(t,e){var r,s,a,n;if(e)for(n=Object.keys(e),r=0,s=n.length;r<s;r+=1)a=n[r],t[a]=e[a];return t}function W5e(t,e){var r=\"\",s;for(s=0;s<e;s+=1)r+=t;return r}function Y5e(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}Dd.exports.isNothing=bee;Dd.exports.isObject=j5e;Dd.exports.toArray=G5e;Dd.exports.repeat=W5e;Dd.exports.isNegativeZero=Y5e;Dd.exports.extend=q5e});var pE=_((nQt,Pee)=>{\"use strict\";function j2(t,e){Error.call(this),this.name=\"YAMLException\",this.reason=t,this.mark=e,this.message=(this.reason||\"(unknown reason)\")+(this.mark?\" \"+this.mark.toString():\"\"),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\"}j2.prototype=Object.create(Error.prototype);j2.prototype.constructor=j2;j2.prototype.toString=function(e){var r=this.name+\": \";return r+=this.reason||\"(unknown reason)\",!e&&this.mark&&(r+=\" \"+this.mark.toString()),r};Pee.exports=j2});var Qee=_((iQt,kee)=>{\"use strict\";var xee=bd();function YU(t,e,r,s,a){this.name=t,this.buffer=e,this.position=r,this.line=s,this.column=a}YU.prototype.getSnippet=function(e,r){var s,a,n,c,f;if(!this.buffer)return null;for(e=e||4,r=r||75,s=\"\",a=this.position;a>0&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=\" ... \",a+=5;break}for(n=\"\",c=this.position;c<this.buffer.length&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=\" ... \",c-=5;break}return f=this.buffer.slice(a,c),xee.repeat(\" \",e)+s+f+n+`\n`+xee.repeat(\" \",e+this.position-a+s.length)+\"^\"};YU.prototype.toString=function(e){var r,s=\"\";return this.name&&(s+='in \"'+this.name+'\" '),s+=\"at line \"+(this.line+1)+\", column \"+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:\n`+r)),s};kee.exports=YU});var Ss=_((sQt,Ree)=>{\"use strict\";var Tee=pE(),V5e=[\"kind\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"defaultStyle\",\"styleAliases\"],J5e=[\"scalar\",\"sequence\",\"mapping\"];function K5e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function z5e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(V5e.indexOf(r)===-1)throw new Tee('Unknown option \"'+r+'\" is met in definition of \"'+t+'\" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=K5e(e.styleAliases||null),J5e.indexOf(this.kind)===-1)throw new Tee('Unknown kind \"'+this.kind+'\" is specified for \"'+t+'\" YAML type.')}Ree.exports=z5e});var Pd=_((oQt,Nee)=>{\"use strict\";var Fee=bd(),gx=pE(),X5e=Ss();function VU(t,e,r){var s=[];return t.include.forEach(function(a){r=VU(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function Z5e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function hE(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!==\"scalar\")throw new gx(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\")}),this.compiledImplicit=VU(this,\"implicit\",[]),this.compiledExplicit=VU(this,\"explicit\",[]),this.compiledTypeMap=Z5e(this.compiledImplicit,this.compiledExplicit)}hE.DEFAULT=null;hE.create=function(){var e,r;switch(arguments.length){case 1:e=hE.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new gx(\"Wrong number of arguments for Schema.create function\")}if(e=Fee.toArray(e),r=Fee.toArray(r),!e.every(function(s){return s instanceof hE}))throw new gx(\"Specified list of super schemas (or a single Schema object) contains a non-Schema object.\");if(!r.every(function(s){return s instanceof X5e}))throw new gx(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");return new hE({include:e,explicit:r})};Nee.exports=hE});var Lee=_((aQt,Oee)=>{\"use strict\";var $5e=Ss();Oee.exports=new $5e(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(t){return t!==null?t:\"\"}})});var Uee=_((lQt,Mee)=>{\"use strict\";var eqe=Ss();Mee.exports=new eqe(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(t){return t!==null?t:[]}})});var Hee=_((cQt,_ee)=>{\"use strict\";var tqe=Ss();_ee.exports=new tqe(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(t){return t!==null?t:{}}})});var dx=_((uQt,jee)=>{\"use strict\";var rqe=Pd();jee.exports=new rqe({explicit:[Lee(),Uee(),Hee()]})});var qee=_((fQt,Gee)=>{\"use strict\";var nqe=Ss();function iqe(t){if(t===null)return!0;var e=t.length;return e===1&&t===\"~\"||e===4&&(t===\"null\"||t===\"Null\"||t===\"NULL\")}function sqe(){return null}function oqe(t){return t===null}Gee.exports=new nqe(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:iqe,construct:sqe,predicate:oqe,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"}},defaultStyle:\"lowercase\"})});var Yee=_((AQt,Wee)=>{\"use strict\";var aqe=Ss();function lqe(t){if(t===null)return!1;var e=t.length;return e===4&&(t===\"true\"||t===\"True\"||t===\"TRUE\")||e===5&&(t===\"false\"||t===\"False\"||t===\"FALSE\")}function cqe(t){return t===\"true\"||t===\"True\"||t===\"TRUE\"}function uqe(t){return Object.prototype.toString.call(t)===\"[object Boolean]\"}Wee.exports=new aqe(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:lqe,construct:cqe,predicate:uqe,represent:{lowercase:function(t){return t?\"true\":\"false\"},uppercase:function(t){return t?\"TRUE\":\"FALSE\"},camelcase:function(t){return t?\"True\":\"False\"}},defaultStyle:\"lowercase\"})});var Jee=_((pQt,Vee)=>{\"use strict\";var fqe=bd(),Aqe=Ss();function pqe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function hqe(t){return 48<=t&&t<=55}function gqe(t){return 48<=t&&t<=57}function dqe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a===\"-\"||a===\"+\")&&(a=t[++r]),a===\"0\"){if(r+1===e)return!0;if(a=t[++r],a===\"b\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(a!==\"0\"&&a!==\"1\")return!1;s=!0}return s&&a!==\"_\"}if(a===\"x\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(!pqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}for(;r<e;r++)if(a=t[r],a!==\"_\"){if(!hqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}if(a===\"_\")return!1;for(;r<e;r++)if(a=t[r],a!==\"_\"){if(a===\":\")break;if(!gqe(t.charCodeAt(r)))return!1;s=!0}return!s||a===\"_\"?!1:a!==\":\"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function mqe(t){var e=t,r=1,s,a,n=[];return e.indexOf(\"_\")!==-1&&(e=e.replace(/_/g,\"\")),s=e[0],(s===\"-\"||s===\"+\")&&(s===\"-\"&&(r=-1),e=e.slice(1),s=e[0]),e===\"0\"?0:s===\"0\"?e[1]===\"b\"?r*parseInt(e.slice(2),2):e[1]===\"x\"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(\":\")!==-1?(e.split(\":\").forEach(function(c){n.unshift(parseInt(c,10))}),e=0,a=1,n.forEach(function(c){e+=c*a,a*=60}),r*e):r*parseInt(e,10)}function yqe(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&t%1===0&&!fqe.isNegativeZero(t)}Vee.exports=new Aqe(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:dqe,construct:mqe,predicate:yqe,represent:{binary:function(t){return t>=0?\"0b\"+t.toString(2):\"-0b\"+t.toString(2).slice(1)},octal:function(t){return t>=0?\"0\"+t.toString(8):\"-0\"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?\"0x\"+t.toString(16).toUpperCase():\"-0x\"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}})});var Xee=_((hQt,zee)=>{\"use strict\";var Kee=bd(),Eqe=Ss(),Iqe=new RegExp(\"^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function Cqe(t){return!(t===null||!Iqe.test(t)||t[t.length-1]===\"_\")}function wqe(t){var e,r,s,a;return e=t.replace(/_/g,\"\").toLowerCase(),r=e[0]===\"-\"?-1:1,a=[],\"+-\".indexOf(e[0])>=0&&(e=e.slice(1)),e===\".inf\"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===\".nan\"?NaN:e.indexOf(\":\")>=0?(e.split(\":\").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,s=1,a.forEach(function(n){e+=n*s,s*=60}),r*e):r*parseFloat(e,10)}var Bqe=/^[-+]?[0-9]+e/;function vqe(t,e){var r;if(isNaN(t))switch(e){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===t)switch(e){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(Kee.isNegativeZero(t))return\"-0.0\";return r=t.toString(10),Bqe.test(r)?r.replace(\"e\",\".e\"):r}function Sqe(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&(t%1!==0||Kee.isNegativeZero(t))}zee.exports=new Eqe(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:Cqe,construct:wqe,predicate:Sqe,represent:vqe,defaultStyle:\"lowercase\"})});var JU=_((gQt,Zee)=>{\"use strict\";var Dqe=Pd();Zee.exports=new Dqe({include:[dx()],implicit:[qee(),Yee(),Jee(),Xee()]})});var KU=_((dQt,$ee)=>{\"use strict\";var bqe=Pd();$ee.exports=new bqe({include:[JU()]})});var nte=_((mQt,rte)=>{\"use strict\";var Pqe=Ss(),ete=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),tte=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");function xqe(t){return t===null?!1:ete.exec(t)!==null||tte.exec(t)!==null}function kqe(t){var e,r,s,a,n,c,f,p=0,h=null,E,C,S;if(e=ete.exec(t),e===null&&(e=tte.exec(t)),e===null)throw new Error(\"Date resolve error\");if(r=+e[1],s=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,s,a));if(n=+e[4],c=+e[5],f=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+=\"0\";p=+p}return e[9]&&(E=+e[10],C=+(e[11]||0),h=(E*60+C)*6e4,e[9]===\"-\"&&(h=-h)),S=new Date(Date.UTC(r,s,a,n,c,f,p)),h&&S.setTime(S.getTime()-h),S}function Qqe(t){return t.toISOString()}rte.exports=new Pqe(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:xqe,construct:kqe,instanceOf:Date,represent:Qqe})});var ste=_((yQt,ite)=>{\"use strict\";var Tqe=Ss();function Rqe(t){return t===\"<<\"||t===null}ite.exports=new Tqe(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:Rqe})});var lte=_((EQt,ate)=>{\"use strict\";var xd;try{ote=Ie,xd=ote(\"buffer\").Buffer}catch{}var ote,Fqe=Ss(),zU=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function Nqe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=zU;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8===0}function Oqe(t){var e,r,s=t.replace(/[\\r\\n=]/g,\"\"),a=s.length,n=zU,c=0,f=[];for(e=0;e<a;e++)e%4===0&&e&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),xd?xd.from?xd.from(f):new xd(f):f}function Lqe(t){var e=\"\",r=0,s,a,n=t.length,c=zU;for(s=0;s<n;s++)s%3===0&&s&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function Mqe(t){return xd&&xd.isBuffer(t)}ate.exports=new Fqe(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:Nqe,construct:Oqe,predicate:Mqe,represent:Lqe})});var ute=_((CQt,cte)=>{\"use strict\";var Uqe=Ss(),_qe=Object.prototype.hasOwnProperty,Hqe=Object.prototype.toString;function jqe(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,Hqe.call(a)!==\"[object Object]\")return!1;for(n in a)if(_qe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function Gqe(t){return t!==null?t:[]}cte.exports=new Uqe(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:jqe,construct:Gqe})});var Ate=_((wQt,fte)=>{\"use strict\";var qqe=Ss(),Wqe=Object.prototype.toString;function Yqe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(s=c[e],Wqe.call(s)!==\"[object Object]\"||(a=Object.keys(s),a.length!==1))return!1;n[e]=[a[0],s[a[0]]]}return!0}function Vqe(t){if(t===null)return[];var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1)s=c[e],a=Object.keys(s),n[e]=[a[0],s[a[0]]];return n}fte.exports=new qqe(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:Yqe,construct:Vqe})});var hte=_((BQt,pte)=>{\"use strict\";var Jqe=Ss(),Kqe=Object.prototype.hasOwnProperty;function zqe(t){if(t===null)return!0;var e,r=t;for(e in r)if(Kqe.call(r,e)&&r[e]!==null)return!1;return!0}function Xqe(t){return t!==null?t:{}}pte.exports=new Jqe(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:zqe,construct:Xqe})});var gE=_((vQt,gte)=>{\"use strict\";var Zqe=Pd();gte.exports=new Zqe({include:[KU()],implicit:[nte(),ste()],explicit:[lte(),ute(),Ate(),hte()]})});var mte=_((SQt,dte)=>{\"use strict\";var $qe=Ss();function e9e(){return!0}function t9e(){}function r9e(){return\"\"}function n9e(t){return typeof t>\"u\"}dte.exports=new $qe(\"tag:yaml.org,2002:js/undefined\",{kind:\"scalar\",resolve:e9e,construct:t9e,predicate:n9e,represent:r9e})});var Ete=_((DQt,yte)=>{\"use strict\";var i9e=Ss();function s9e(t){if(t===null||t.length===0)return!1;var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return!(e[0]===\"/\"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!==\"/\"))}function o9e(t){var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return e[0]===\"/\"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function a9e(t){var e=\"/\"+t.source+\"/\";return t.global&&(e+=\"g\"),t.multiline&&(e+=\"m\"),t.ignoreCase&&(e+=\"i\"),e}function l9e(t){return Object.prototype.toString.call(t)===\"[object RegExp]\"}yte.exports=new i9e(\"tag:yaml.org,2002:js/regexp\",{kind:\"scalar\",resolve:s9e,construct:o9e,predicate:l9e,represent:a9e})});var wte=_((bQt,Cte)=>{\"use strict\";var mx;try{Ite=Ie,mx=Ite(\"esprima\")}catch{typeof window<\"u\"&&(mx=window.esprima)}var Ite,c9e=Ss();function u9e(t){if(t===null)return!1;try{var e=\"(\"+t+\")\",r=mx.parse(e,{range:!0});return!(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")}catch{return!1}}function f9e(t){var e=\"(\"+t+\")\",r=mx.parse(e,{range:!0}),s=[],a;if(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")throw new Error(\"Failed to resolve function\");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type===\"BlockStatement\"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,\"return \"+e.slice(a[0],a[1]))}function A9e(t){return t.toString()}function p9e(t){return Object.prototype.toString.call(t)===\"[object Function]\"}Cte.exports=new c9e(\"tag:yaml.org,2002:js/function\",{kind:\"scalar\",resolve:u9e,construct:f9e,predicate:p9e,represent:A9e})});var G2=_((xQt,vte)=>{\"use strict\";var Bte=Pd();vte.exports=Bte.DEFAULT=new Bte({include:[gE()],explicit:[mte(),Ete(),wte()]})});var Gte=_((kQt,q2)=>{\"use strict\";var Ip=bd(),Qte=pE(),h9e=Qee(),Tte=gE(),g9e=G2(),i0=Object.prototype.hasOwnProperty,yx=1,Rte=2,Fte=3,Ex=4,XU=1,d9e=2,Ste=3,m9e=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,y9e=/[\\x85\\u2028\\u2029]/,E9e=/[,\\[\\]\\{\\}]/,Nte=/^(?:!|!!|![a-z\\-]+!)$/i,Ote=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function Dte(t){return Object.prototype.toString.call(t)}function jf(t){return t===10||t===13}function Qd(t){return t===9||t===32}function rl(t){return t===9||t===32||t===10||t===13}function dE(t){return t===44||t===91||t===93||t===123||t===125}function I9e(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function C9e(t){return t===120?2:t===117?4:t===85?8:0}function w9e(t){return 48<=t&&t<=57?t-48:-1}function bte(t){return t===48?\"\\0\":t===97?\"\\x07\":t===98?\"\\b\":t===116||t===9?\"\t\":t===110?`\n`:t===118?\"\\v\":t===102?\"\\f\":t===114?\"\\r\":t===101?\"\\x1B\":t===32?\" \":t===34?'\"':t===47?\"/\":t===92?\"\\\\\":t===78?\"\\x85\":t===95?\"\\xA0\":t===76?\"\\u2028\":t===80?\"\\u2029\":\"\"}function B9e(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Lte=new Array(256),Mte=new Array(256);for(kd=0;kd<256;kd++)Lte[kd]=bte(kd)?1:0,Mte[kd]=bte(kd);var kd;function v9e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||g9e,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Ute(t,e){return new Qte(e,new h9e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Rr(t,e){throw Ute(t,e)}function Ix(t,e){t.onWarning&&t.onWarning.call(null,Ute(t,e))}var Pte={YAML:function(e,r,s){var a,n,c;e.version!==null&&Rr(e,\"duplication of %YAML directive\"),s.length!==1&&Rr(e,\"YAML directive accepts exactly one argument\"),a=/^([0-9]+)\\.([0-9]+)$/.exec(s[0]),a===null&&Rr(e,\"ill-formed argument of the YAML directive\"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Rr(e,\"unacceptable YAML version of the document\"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Ix(e,\"unsupported YAML version of the document\")},TAG:function(e,r,s){var a,n;s.length!==2&&Rr(e,\"TAG directive accepts exactly two arguments\"),a=s[0],n=s[1],Nte.test(a)||Rr(e,\"ill-formed tag handle (first argument) of the TAG directive\"),i0.call(e.tagMap,a)&&Rr(e,'there is a previously declared suffix for \"'+a+'\" tag handle'),Ote.test(n)||Rr(e,\"ill-formed tag prefix (second argument) of the TAG directive\"),e.tagMap[a]=n}};function n0(t,e,r,s){var a,n,c,f;if(e<r){if(f=t.input.slice(e,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Rr(t,\"expected valid JSON character\");else m9e.test(f)&&Rr(t,\"the stream contains non-printable characters\");t.result+=f}}function xte(t,e,r,s){var a,n,c,f;for(Ip.isObject(r)||Rr(t,\"cannot merge mappings; the provided source object is unacceptable\"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],i0.call(e,n)||(e[n]=r[n],s[n]=!0)}function mE(t,e,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Rr(t,\"nested arrays are not supported inside keys\"),typeof a==\"object\"&&Dte(a[p])===\"[object Object]\"&&(a[p]=\"[object Object]\");if(typeof a==\"object\"&&Dte(a)===\"[object Object]\"&&(a=\"[object Object]\"),a=String(a),e===null&&(e={}),s===\"tag:yaml.org,2002:merge\")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)xte(t,e,n[p],r);else xte(t,e,n,r);else!t.json&&!i0.call(r,a)&&i0.call(e,a)&&(t.line=c||t.line,t.position=f||t.position,Rr(t,\"duplicated mapping key\")),e[a]=n,delete r[a];return e}function ZU(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Rr(t,\"a line break is expected\"),t.line+=1,t.lineStart=t.position}function as(t,e,r){for(var s=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Qd(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(jf(a))for(ZU(t),a=t.input.charCodeAt(t.position),s++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&Ix(t,\"deficient indentation\"),s}function Cx(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||rl(r)))}function $U(t,e){e===1?t.result+=\" \":e>1&&(t.result+=Ip.repeat(`\n`,e-1))}function S9e(t,e,r){var s,a,n,c,f,p,h,E,C=t.kind,S=t.result,P;if(P=t.input.charCodeAt(t.position),rl(P)||dE(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96||(P===63||P===45)&&(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a)))return!1;for(t.kind=\"scalar\",t.result=\"\",n=c=t.position,f=!1;P!==0;){if(P===58){if(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a))break}else if(P===35){if(s=t.input.charCodeAt(t.position-1),rl(s))break}else{if(t.position===t.lineStart&&Cx(t)||r&&dE(P))break;if(jf(P))if(p=t.line,h=t.lineStart,E=t.lineIndent,as(t,!1,-1),t.lineIndent>=e){f=!0,P=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(n0(t,n,c,!1),$U(t,t.line-p),n=c=t.position,f=!1),Qd(P)||(c=t.position+1),P=t.input.charCodeAt(++t.position)}return n0(t,n,c,!1),t.result?!0:(t.kind=C,t.result=S,!1)}function D9e(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(n0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else jf(r)?(n0(t,s,a,!0),$U(t,as(t,!1,e)),s=a=t.position):t.position===t.lineStart&&Cx(t)?Rr(t,\"unexpected end of the document within a single quoted scalar\"):(t.position++,a=t.position);Rr(t,\"unexpected end of the stream within a single quoted scalar\")}function b9e(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return n0(t,r,t.position,!0),t.position++,!0;if(f===92){if(n0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),jf(f))as(t,!1,e);else if(f<256&&Lte[f])t.result+=Mte[f],t.position++;else if((c=C9e(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=I9e(f))>=0?n=(n<<4)+c:Rr(t,\"expected hexadecimal character\");t.result+=B9e(n),t.position++}else Rr(t,\"unknown escape sequence\");r=s=t.position}else jf(f)?(n0(t,r,s,!0),$U(t,as(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Cx(t)?Rr(t,\"unexpected end of the document within a double quoted scalar\"):(t.position++,s=t.position)}Rr(t,\"unexpected end of the stream within a double quoted scalar\")}function P9e(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,C,S={},P,I,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,C=!1,n=[];else if(N===123)p=125,C=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(as(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=C?\"mapping\":\"sequence\",t.result=n,!0;r||Rr(t,\"missed comma between flow collection entries\"),I=P=R=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),rl(f)&&(h=E=!0,t.position++,as(t,!0,e))),s=t.line,yE(t,e,yx,!1,!0),I=t.tag,P=t.result,as(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),as(t,!0,e),yE(t,e,yx,!1,!0),R=t.result),C?mE(t,n,S,I,P,R):h?n.push(mE(t,null,S,I,P,R)):n.push(P),as(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Rr(t,\"unexpected end of the stream within a flow collection\")}function x9e(t,e){var r,s,a=XU,n=!1,c=!1,f=e,p=0,h=!1,E,C;if(C=t.input.charCodeAt(t.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(t.kind=\"scalar\",t.result=\"\";C!==0;)if(C=t.input.charCodeAt(++t.position),C===43||C===45)XU===a?a=C===43?Ste:d9e:Rr(t,\"repeat of a chomping mode identifier\");else if((E=w9e(C))>=0)E===0?Rr(t,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):c?Rr(t,\"repeat of an indentation width identifier\"):(f=e+E-1,c=!0);else break;if(Qd(C)){do C=t.input.charCodeAt(++t.position);while(Qd(C));if(C===35)do C=t.input.charCodeAt(++t.position);while(!jf(C)&&C!==0)}for(;C!==0;){for(ZU(t),t.lineIndent=0,C=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&C===32;)t.lineIndent++,C=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t.lineIndent),jf(C)){p++;continue}if(t.lineIndent<f){a===Ste?t.result+=Ip.repeat(`\n`,n?1+p:p):a===XU&&n&&(t.result+=`\n`);break}for(s?Qd(C)?(h=!0,t.result+=Ip.repeat(`\n`,n?1+p:p)):h?(h=!1,t.result+=Ip.repeat(`\n`,p+1)):p===0?n&&(t.result+=\" \"):t.result+=Ip.repeat(`\n`,p):t.result+=Ip.repeat(`\n`,n?1+p:p),n=!0,c=!0,p=0,r=t.position;!jf(C)&&C!==0;)C=t.input.charCodeAt(++t.position);n0(t,r,t.position,!1)}return!0}function kte(t,e){var r,s=t.tag,a=t.anchor,n=[],c,f=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(c=t.input.charCodeAt(t.position+1),!rl(c)));){if(f=!0,t.position++,as(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,yE(t,e,Fte,!1,!0),n.push(t.result),as(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Rr(t,\"bad indentation of a sequence entry\");else if(t.lineIndent<e)break}return f?(t.tag=s,t.anchor=a,t.kind=\"sequence\",t.result=n,!0):!1}function k9e(t,e,r){var s,a,n,c,f=t.tag,p=t.anchor,h={},E={},C=null,S=null,P=null,I=!1,R=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,c=t.position,(N===63||N===58)&&rl(s))N===63?(I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!0,a=!0):I?(I=!1,a=!0):Rr(t,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),t.position+=1,N=s;else if(yE(t,r,Rte,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);Qd(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),rl(N)||Rr(t,\"a whitespace character is expected after the key-value separator within a block mapping\"),I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!1,a=!1,C=t.tag,S=t.result;else if(R)Rr(t,\"can not read an implicit mapping pair; a colon is missed\");else return t.tag=f,t.anchor=p,!0}else if(R)Rr(t,\"can not read a block mapping entry; a multiline key may not be an implicit key\");else return t.tag=f,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(yE(t,e,Ex,!0,a)&&(I?S=t.result:P=t.result),I||(mE(t,h,E,C,S,P,n,c),C=S=P=null),as(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Rr(t,\"bad indentation of a mapping entry\");else if(t.lineIndent<e)break}return I&&mE(t,h,E,C,S,null),R&&(t.tag=f,t.anchor=p,t.kind=\"mapping\",t.result=h),R}function Q9e(t){var e,r=!1,s=!1,a,n,c;if(c=t.input.charCodeAt(t.position),c!==33)return!1;if(t.tag!==null&&Rr(t,\"duplication of a tag property\"),c=t.input.charCodeAt(++t.position),c===60?(r=!0,c=t.input.charCodeAt(++t.position)):c===33?(s=!0,a=\"!!\",c=t.input.charCodeAt(++t.position)):a=\"!\",e=t.position,r){do c=t.input.charCodeAt(++t.position);while(c!==0&&c!==62);t.position<t.length?(n=t.input.slice(e,t.position),c=t.input.charCodeAt(++t.position)):Rr(t,\"unexpected end of the stream within a verbatim tag\")}else{for(;c!==0&&!rl(c);)c===33&&(s?Rr(t,\"tag suffix cannot contain exclamation marks\"):(a=t.input.slice(e-1,t.position+1),Nte.test(a)||Rr(t,\"named tag handle cannot contain such characters\"),s=!0,e=t.position+1)),c=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),E9e.test(n)&&Rr(t,\"tag suffix cannot contain flow indicator characters\")}return n&&!Ote.test(n)&&Rr(t,\"tag name cannot contain such characters: \"+n),r?t.tag=n:i0.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a===\"!\"?t.tag=\"!\"+n:a===\"!!\"?t.tag=\"tag:yaml.org,2002:\"+n:Rr(t,'undeclared tag handle \"'+a+'\"'),!0}function T9e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Rr(t,\"duplication of an anchor property\"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!rl(r)&&!dE(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an anchor node must contain at least one character\"),t.anchor=t.input.slice(e,t.position),!0}function R9e(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!rl(s)&&!dE(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an alias node must contain at least one character\"),r=t.input.slice(e,t.position),i0.call(t.anchorMap,r)||Rr(t,'unidentified alias \"'+r+'\"'),t.result=t.anchorMap[r],as(t,!0,-1),!0}function yE(t,e,r,s,a){var n,c,f,p=1,h=!1,E=!1,C,S,P,I,R;if(t.listener!==null&&t.listener(\"open\",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=c=f=Ex===r||Fte===r,s&&as(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;Q9e(t)||T9e(t);)as(t,!0,-1)?(h=!0,f=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||Ex===r)&&(yx===r||Rte===r?I=e:I=e+1,R=t.position-t.lineStart,p===1?f&&(kte(t,R)||k9e(t,R,I))||P9e(t,I)?E=!0:(c&&x9e(t,I)||D9e(t,I)||b9e(t,I)?E=!0:R9e(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&Rr(t,\"alias node should not have any properties\")):S9e(t,I,yx===r)&&(E=!0,t.tag===null&&(t.tag=\"?\")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=f&&kte(t,R))),t.tag!==null&&t.tag!==\"!\")if(t.tag===\"?\"){for(t.result!==null&&t.kind!==\"scalar\"&&Rr(t,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+t.kind+'\"'),C=0,S=t.implicitTypes.length;C<S;C+=1)if(P=t.implicitTypes[C],P.resolve(t.result)){t.result=P.construct(t.result),t.tag=P.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else i0.call(t.typeMap[t.kind||\"fallback\"],t.tag)?(P=t.typeMap[t.kind||\"fallback\"][t.tag],t.result!==null&&P.kind!==t.kind&&Rr(t,\"unacceptable node kind for !<\"+t.tag+'> tag; it should be \"'+P.kind+'\", not \"'+t.kind+'\"'),P.resolve(t.result)?(t.result=P.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Rr(t,\"cannot resolve a node with !<\"+t.tag+\"> explicit tag\")):Rr(t,\"unknown tag !<\"+t.tag+\">\");return t.listener!==null&&t.listener(\"close\",t),t.tag!==null||t.anchor!==null||E}function F9e(t){var e=t.position,r,s,a,n=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(c=t.input.charCodeAt(t.position))!==0&&(as(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(n=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!rl(c);)c=t.input.charCodeAt(++t.position);for(s=t.input.slice(r,t.position),a=[],s.length<1&&Rr(t,\"directive name must not be less than one character in length\");c!==0;){for(;Qd(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!jf(c));break}if(jf(c))break;for(r=t.position;c!==0&&!rl(c);)c=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}c!==0&&ZU(t),i0.call(Pte,s)?Pte[s](t,s,a):Ix(t,'unknown document directive \"'+s+'\"')}if(as(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,as(t,!0,-1)):n&&Rr(t,\"directives end mark is expected\"),yE(t,t.lineIndent-1,Ex,!1,!0),as(t,!0,-1),t.checkLineBreaks&&y9e.test(t.input.slice(e,t.position))&&Ix(t,\"non-ASCII line breaks are interpreted as content\"),t.documents.push(t.result),t.position===t.lineStart&&Cx(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,as(t,!0,-1));return}if(t.position<t.length-1)Rr(t,\"end of the stream or a document separator is expected\");else return}function _te(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`\n`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new v9e(t,e),s=t.indexOf(\"\\0\");for(s!==-1&&(r.position=s,Rr(r,\"null byte is not allowed in input\")),r.input+=\"\\0\";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)F9e(r);return r.documents}function Hte(t,e,r){e!==null&&typeof e==\"object\"&&typeof r>\"u\"&&(r=e,e=null);var s=_te(t,r);if(typeof e!=\"function\")return s;for(var a=0,n=s.length;a<n;a+=1)e(s[a])}function jte(t,e){var r=_te(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Qte(\"expected a single document in the stream, but found more\")}}function N9e(t,e,r){return typeof e==\"object\"&&e!==null&&typeof r>\"u\"&&(r=e,e=null),Hte(t,e,Ip.extend({schema:Tte},r))}function O9e(t,e){return jte(t,Ip.extend({schema:Tte},e))}q2.exports.loadAll=Hte;q2.exports.load=jte;q2.exports.safeLoadAll=N9e;q2.exports.safeLoad=O9e});var Are=_((QQt,n_)=>{\"use strict\";var Y2=bd(),V2=pE(),L9e=G2(),M9e=gE(),Xte=Object.prototype.toString,Zte=Object.prototype.hasOwnProperty,U9e=9,W2=10,_9e=13,H9e=32,j9e=33,G9e=34,$te=35,q9e=37,W9e=38,Y9e=39,V9e=42,ere=44,J9e=45,tre=58,K9e=61,z9e=62,X9e=63,Z9e=64,rre=91,nre=93,$9e=96,ire=123,eWe=124,sre=125,_o={};_o[0]=\"\\\\0\";_o[7]=\"\\\\a\";_o[8]=\"\\\\b\";_o[9]=\"\\\\t\";_o[10]=\"\\\\n\";_o[11]=\"\\\\v\";_o[12]=\"\\\\f\";_o[13]=\"\\\\r\";_o[27]=\"\\\\e\";_o[34]='\\\\\"';_o[92]=\"\\\\\\\\\";_o[133]=\"\\\\N\";_o[160]=\"\\\\_\";_o[8232]=\"\\\\L\";_o[8233]=\"\\\\P\";var tWe=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"];function rWe(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(e[c]),c.slice(0,2)===\"!!\"&&(c=\"tag:yaml.org,2002:\"+c.slice(2)),p=t.compiledTypeMap.fallback[c],p&&Zte.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function qte(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r=\"x\",s=2;else if(t<=65535)r=\"u\",s=4;else if(t<=4294967295)r=\"U\",s=8;else throw new V2(\"code point within a string may not be greater than 0xFFFFFFFF\");return\"\\\\\"+r+Y2.repeat(\"0\",s-e.length)+e}function nWe(t){this.schema=t.schema||L9e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Y2.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=rWe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function Wte(t,e){for(var r=Y2.repeat(\" \",e),s=0,a=-1,n=\"\",c,f=t.length;s<f;)a=t.indexOf(`\n`,s),a===-1?(c=t.slice(s),s=f):(c=t.slice(s,a+1),s=a+1),c.length&&c!==`\n`&&(n+=r),n+=c;return n}function e_(t,e){return`\n`+Y2.repeat(\" \",t.indent*e)}function iWe(t,e){var r,s,a;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function r_(t){return t===H9e||t===U9e}function EE(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function sWe(t){return EE(t)&&!r_(t)&&t!==65279&&t!==_9e&&t!==W2}function Yte(t,e){return EE(t)&&t!==65279&&t!==ere&&t!==rre&&t!==nre&&t!==ire&&t!==sre&&t!==tre&&(t!==$te||e&&sWe(e))}function oWe(t){return EE(t)&&t!==65279&&!r_(t)&&t!==J9e&&t!==X9e&&t!==tre&&t!==ere&&t!==rre&&t!==nre&&t!==ire&&t!==sre&&t!==$te&&t!==W9e&&t!==V9e&&t!==j9e&&t!==eWe&&t!==K9e&&t!==z9e&&t!==Y9e&&t!==G9e&&t!==q9e&&t!==Z9e&&t!==$9e}function ore(t){var e=/^\\n* /;return e.test(t)}var are=1,lre=2,cre=3,ure=4,wx=5;function aWe(t,e,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,C=-1,S=oWe(t.charCodeAt(0))&&!r_(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),!EE(c))return wx;f=n>0?t.charCodeAt(n-1):null,S=S&&Yte(c,f)}else{for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),c===W2)p=!0,E&&(h=h||n-C-1>s&&t[C+1]!==\" \",C=n);else if(!EE(c))return wx;f=n>0?t.charCodeAt(n-1):null,S=S&&Yte(c,f)}h=h||E&&n-C-1>s&&t[C+1]!==\" \"}return!p&&!h?S&&!a(t)?are:lre:r>9&&ore(t)?wx:h?ure:cre}function lWe(t,e,r,s){t.dump=function(){if(e.length===0)return\"''\";if(!t.noCompatMode&&tWe.indexOf(e)!==-1)return\"'\"+e+\"'\";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return iWe(t,p)}switch(aWe(e,c,t.indent,n,f)){case are:return e;case lre:return\"'\"+e.replace(/'/g,\"''\")+\"'\";case cre:return\"|\"+Vte(e,t.indent)+Jte(Wte(e,a));case ure:return\">\"+Vte(e,t.indent)+Jte(Wte(cWe(e,n),a));case wx:return'\"'+uWe(e,n)+'\"';default:throw new V2(\"impossible error: invalid scalar style\")}}()}function Vte(t,e){var r=ore(t)?String(e):\"\",s=t[t.length-1]===`\n`,a=s&&(t[t.length-2]===`\n`||t===`\n`),n=a?\"+\":s?\"\":\"-\";return r+n+`\n`}function Jte(t){return t[t.length-1]===`\n`?t.slice(0,-1):t}function cWe(t,e){for(var r=/(\\n+)([^\\n]*)/g,s=function(){var h=t.indexOf(`\n`);return h=h!==-1?h:t.length,r.lastIndex=h,Kte(t.slice(0,h),e)}(),a=t[0]===`\n`||t[0]===\" \",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===\" \",s+=f+(!a&&!n&&p!==\"\"?`\n`:\"\")+Kte(p,e),a=n}return s}function Kte(t,e){if(t===\"\"||t[0]===\" \")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p=\"\";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=`\n`+t.slice(a,n),a=n+1),c=f;return p+=`\n`,t.length-a>e&&c>a?p+=t.slice(a,c)+`\n`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function uWe(t){for(var e=\"\",r,s,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=qte((r-55296)*1024+s-56320+65536),n++;continue}a=_o[r],e+=!a&&EE(r)?t[n]:a||qte(r)}return e}function fWe(t,e,r){var s=\"\",a=t.tag,n,c;for(n=0,c=r.length;n<c;n+=1)Td(t,e,r[n],!1,!1)&&(n!==0&&(s+=\",\"+(t.condenseFlow?\"\":\" \")),s+=t.dump);t.tag=a,t.dump=\"[\"+s+\"]\"}function AWe(t,e,r,s){var a=\"\",n=t.tag,c,f;for(c=0,f=r.length;c<f;c+=1)Td(t,e+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=e_(t,e)),t.dump&&W2===t.dump.charCodeAt(0)?a+=\"-\":a+=\"- \",a+=t.dump);t.tag=n,t.dump=a||\"[]\"}function pWe(t,e,r){var s=\"\",a=t.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E=\"\",c!==0&&(E+=\", \"),t.condenseFlow&&(E+='\"'),p=n[c],h=r[p],Td(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+=\"? \"),E+=t.dump+(t.condenseFlow?'\"':\"\")+\":\"+(t.condenseFlow?\"\":\" \"),Td(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump=\"{\"+s+\"}\"}function hWe(t,e,r,s){var a=\"\",n=t.tag,c=Object.keys(r),f,p,h,E,C,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys==\"function\")c.sort(t.sortKeys);else if(t.sortKeys)throw new V2(\"sortKeys must be a boolean or a function\");for(f=0,p=c.length;f<p;f+=1)S=\"\",(!s||f!==0)&&(S+=e_(t,e)),h=c[f],E=r[h],Td(t,e+1,h,!0,!0,!0)&&(C=t.tag!==null&&t.tag!==\"?\"||t.dump&&t.dump.length>1024,C&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=\"?\":S+=\"? \"),S+=t.dump,C&&(S+=e_(t,e)),Td(t,e+1,E,!0,C)&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=\":\":S+=\": \",S+=t.dump,a+=S));t.tag=n,t.dump=a||\"{}\"}function zte(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof e==\"object\"&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=r?f.tag:\"?\",f.represent){if(p=t.styleMap[f.tag]||f.defaultStyle,Xte.call(f.represent)===\"[object Function]\")s=f.represent(e,p);else if(Zte.call(f.represent,p))s=f.represent[p](e,p);else throw new V2(\"!<\"+f.tag+'> tag resolver accepts not \"'+p+'\" style');t.dump=s}return!0}return!1}function Td(t,e,r,s,a,n){t.tag=null,t.dump=r,zte(t,r,!1)||zte(t,r,!0);var c=Xte.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c===\"[object Object]\"||c===\"[object Array]\",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!==\"?\"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump=\"*ref_\"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c===\"[object Object]\")s&&Object.keys(t.dump).length!==0?(hWe(t,e,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(pWe(t,e,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump));else if(c===\"[object Array]\"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(AWe(t,E,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(fWe(t,E,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump))}else if(c===\"[object String]\")t.tag!==\"?\"&&lWe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new V2(\"unacceptable kind of an object to dump \"+c)}t.tag!==null&&t.tag!==\"?\"&&(t.dump=\"!<\"+t.tag+\"> \"+t.dump)}return!0}function gWe(t,e){var r=[],s=[],a,n;for(t_(t,r,s),a=0,n=s.length;a<n;a+=1)e.duplicates.push(r[s[a]]);e.usedDuplicates=new Array(n)}function t_(t,e,r){var s,a,n;if(t!==null&&typeof t==\"object\")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)t_(t[a],e,r);else for(s=Object.keys(t),a=0,n=s.length;a<n;a+=1)t_(t[s[a]],e,r)}function fre(t,e){e=e||{};var r=new nWe(e);return r.noRefs||gWe(t,r),Td(r,0,t,!0,!0)?r.dump+`\n`:\"\"}function dWe(t,e){return fre(t,Y2.extend({schema:M9e},e))}n_.exports.dump=fre;n_.exports.safeDump=dWe});var hre=_((TQt,Wi)=>{\"use strict\";var Bx=Gte(),pre=Are();function vx(t){return function(){throw new Error(\"Function \"+t+\" is deprecated and cannot be used.\")}}Wi.exports.Type=Ss();Wi.exports.Schema=Pd();Wi.exports.FAILSAFE_SCHEMA=dx();Wi.exports.JSON_SCHEMA=JU();Wi.exports.CORE_SCHEMA=KU();Wi.exports.DEFAULT_SAFE_SCHEMA=gE();Wi.exports.DEFAULT_FULL_SCHEMA=G2();Wi.exports.load=Bx.load;Wi.exports.loadAll=Bx.loadAll;Wi.exports.safeLoad=Bx.safeLoad;Wi.exports.safeLoadAll=Bx.safeLoadAll;Wi.exports.dump=pre.dump;Wi.exports.safeDump=pre.safeDump;Wi.exports.YAMLException=pE();Wi.exports.MINIMAL_SCHEMA=dx();Wi.exports.SAFE_SCHEMA=gE();Wi.exports.DEFAULT_SCHEMA=G2();Wi.exports.scan=vx(\"scan\");Wi.exports.parse=vx(\"parse\");Wi.exports.compose=vx(\"compose\");Wi.exports.addConstructor=vx(\"addConstructor\")});var dre=_((RQt,gre)=>{\"use strict\";var mWe=hre();gre.exports=mWe});var yre=_((FQt,mre)=>{\"use strict\";function yWe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Rd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Rd)}yWe(Rd,Error);Rd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function EWe(t,e){e=e!==void 0?e:{};var r={},s={Start:lc},a=lc,n=function(te){return[].concat(...te)},c=\"-\",f=dn(\"-\",!1),p=function(te){return te},h=function(te){return Object.assign({},...te)},E=\"#\",C=dn(\"#\",!1),S=Au(),P=function(){return{}},I=\":\",R=dn(\":\",!1),N=function(te,Ee){return{[te]:Ee}},U=\",\",W=dn(\",\",!1),ee=function(te,Ee){return Ee},ie=function(te,Ee,Oe){return Object.assign({},...[te].concat(Ee).map(dt=>({[dt]:Oe})))},ue=function(te){return te},le=function(te){return te},me=Oa(\"correct indentation\"),pe=\" \",Be=dn(\" \",!1),Ce=function(te){return te.length===lr*St},g=function(te){return te.length===(lr+1)*St},we=function(){return lr++,!0},ye=function(){return lr--,!0},Ae=function(){return la()},se=Oa(\"pseudostring\"),Z=/^[^\\r\\n\\t ?:,\\][{}#&*!|>'\"%@`\\-]/,De=Kn([\"\\r\",`\n`,\"\t\",\" \",\"?\",\":\",\",\",\"]\",\"[\",\"{\",\"}\",\"#\",\"&\",\"*\",\"!\",\"|\",\">\",\"'\",'\"',\"%\",\"@\",\"`\",\"-\"],!0,!1),Re=/^[^\\r\\n\\t ,\\][{}:#\"']/,mt=Kn([\"\\r\",`\n`,\"\t\",\" \",\",\",\"]\",\"[\",\"{\",\"}\",\":\",\"#\",'\"',\"'\"],!0,!1),j=function(){return la().replace(/^ *| *$/g,\"\")},rt=\"--\",Fe=dn(\"--\",!1),Ne=/^[a-zA-Z\\/0-9]/,Pe=Kn([[\"a\",\"z\"],[\"A\",\"Z\"],\"/\",[\"0\",\"9\"]],!1,!1),Ve=/^[^\\r\\n\\t :,]/,ke=Kn([\"\\r\",`\n`,\"\t\",\" \",\":\",\",\"],!0,!1),it=\"null\",Ue=dn(\"null\",!1),x=function(){return null},w=\"true\",b=dn(\"true\",!1),y=function(){return!0},F=\"false\",z=dn(\"false\",!1),X=function(){return!1},$=Oa(\"string\"),oe='\"',xe=dn('\"',!1),Te=function(){return\"\"},lt=function(te){return te},Ct=function(te){return te.join(\"\")},qt=/^[^\"\\\\\\0-\\x1F\\x7F]/,ir=Kn(['\"',\"\\\\\",[\"\\0\",\"\u001f\"],\"\\x7F\"],!0,!1),Pt='\\\\\"',gn=dn('\\\\\"',!1),Pr=function(){return'\"'},Ir=\"\\\\\\\\\",Or=dn(\"\\\\\\\\\",!1),on=function(){return\"\\\\\"},ai=\"\\\\/\",Io=dn(\"\\\\/\",!1),rs=function(){return\"/\"},$s=\"\\\\b\",Co=dn(\"\\\\b\",!1),ji=function(){return\"\\b\"},eo=\"\\\\f\",wo=dn(\"\\\\f\",!1),QA=function(){return\"\\f\"},Af=\"\\\\n\",dh=dn(\"\\\\n\",!1),mh=function(){return`\n`},to=\"\\\\r\",jn=dn(\"\\\\r\",!1),Ts=function(){return\"\\r\"},ro=\"\\\\t\",ou=dn(\"\\\\t\",!1),au=function(){return\"\t\"},lu=\"\\\\u\",TA=dn(\"\\\\u\",!1),RA=function(te,Ee,Oe,dt){return String.fromCharCode(parseInt(`0x${te}${Ee}${Oe}${dt}`))},oa=/^[0-9a-fA-F]/,aa=Kn([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"F\"]],!1,!1),FA=Oa(\"blank space\"),gr=/^[ \\t]/,Bo=Kn([\" \",\"\t\"],!1,!1),Me=Oa(\"white space\"),cu=/^[ \\t\\n\\r]/,Cr=Kn([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),pf=`\\r\n`,NA=dn(`\\r\n`,!1),OA=`\n`,uu=dn(`\n`,!1),fu=\"\\r\",oc=dn(\"\\r\",!1),ve=0,Nt=0,ac=[{line:1,column:1}],Oi=0,no=[],Rt=0,xn;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function la(){return t.substring(Nt,ve)}function Gi(){return Ma(Nt,ve)}function Li(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),hf([Oa(te)],t.substring(Nt,ve),Ee)}function Na(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),Ua(te,Ee)}function dn(te,Ee){return{type:\"literal\",text:te,ignoreCase:Ee}}function Kn(te,Ee,Oe){return{type:\"class\",parts:te,inverted:Ee,ignoreCase:Oe}}function Au(){return{type:\"any\"}}function yh(){return{type:\"end\"}}function Oa(te){return{type:\"other\",description:te}}function La(te){var Ee=ac[te],Oe;if(Ee)return Ee;for(Oe=te-1;!ac[Oe];)Oe--;for(Ee=ac[Oe],Ee={line:Ee.line,column:Ee.column};Oe<te;)t.charCodeAt(Oe)===10?(Ee.line++,Ee.column=1):Ee.column++,Oe++;return ac[te]=Ee,Ee}function Ma(te,Ee){var Oe=La(te),dt=La(Ee);return{start:{offset:te,line:Oe.line,column:Oe.column},end:{offset:Ee,line:dt.line,column:dt.column}}}function $e(te){ve<Oi||(ve>Oi&&(Oi=ve,no=[]),no.push(te))}function Ua(te,Ee){return new Rd(te,null,null,Ee)}function hf(te,Ee,Oe){return new Rd(Rd.buildMessage(te,Ee),te,Ee,Oe)}function lc(){var te;return te=LA(),te}function wn(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=ca();Oe!==r;)Ee.push(Oe),Oe=ca();return Ee!==r&&(Nt=te,Ee=n(Ee)),te=Ee,te}function ca(){var te,Ee,Oe,dt,Et;return te=ve,Ee=Bl(),Ee!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Rt===0&&$e(f)),Oe!==r?(dt=Qn(),dt!==r?(Et=ua(),Et!==r?(Nt=te,Ee=p(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te}function LA(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=MA();Oe!==r;)Ee.push(Oe),Oe=MA();return Ee!==r&&(Nt=te,Ee=h(Ee)),te=Ee,te}function MA(){var te,Ee,Oe,dt,Et,bt,tr,An,li;if(te=ve,Ee=Qn(),Ee===r&&(Ee=null),Ee!==r){if(Oe=ve,t.charCodeAt(ve)===35?(dt=E,ve++):(dt=r,Rt===0&&$e(C)),dt!==r){if(Et=[],bt=ve,tr=ve,Rt++,An=st(),Rt--,An===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(An=t.charAt(ve),ve++):(An=r,Rt===0&&$e(S)),An!==r?(tr=[tr,An],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r),bt!==r)for(;bt!==r;)Et.push(bt),bt=ve,tr=ve,Rt++,An=st(),Rt--,An===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(An=t.charAt(ve),ve++):(An=r,Rt===0&&$e(S)),An!==r?(tr=[tr,An],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r);else Et=r;Et!==r?(dt=[dt,Et],Oe=dt):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(dt=[],Et=Ke(),Et!==r)for(;Et!==r;)dt.push(Et),Et=Ke();else dt=r;dt!==r?(Nt=te,Ee=P(),te=Ee):(ve=te,te=r)}else ve=te,te=r}else ve=te,te=r;if(te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=Ha(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Rt===0&&$e(R)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ua(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=ns(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Rt===0&&$e(R)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ua(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))){if(te=ve,Ee=Bl(),Ee!==r)if(Oe=ns(),Oe!==r)if(dt=Qn(),dt!==r)if(Et=pu(),Et!==r){if(bt=[],tr=Ke(),tr!==r)for(;tr!==r;)bt.push(tr),tr=Ke();else bt=r;bt!==r?(Nt=te,Ee=N(Oe,Et),te=Ee):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;if(te===r)if(te=ve,Ee=Bl(),Ee!==r)if(Oe=ns(),Oe!==r){if(dt=[],Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&$e(W)),tr!==r?(An=Qn(),An===r&&(An=null),An!==r?(li=ns(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r),Et!==r)for(;Et!==r;)dt.push(Et),Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&$e(W)),tr!==r?(An=Qn(),An===r&&(An=null),An!==r?(li=ns(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r);else dt=r;dt!==r?(Et=Qn(),Et===r&&(Et=null),Et!==r?(t.charCodeAt(ve)===58?(bt=I,ve++):(bt=r,Rt===0&&$e(R)),bt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(An=ua(),An!==r?(Nt=te,Ee=ie(Oe,dt,An),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r}return te}function ua(){var te,Ee,Oe,dt,Et,bt,tr;if(te=ve,Ee=ve,Rt++,Oe=ve,dt=st(),dt!==r?(Et=Mt(),Et!==r?(t.charCodeAt(ve)===45?(bt=c,ve++):(bt=r,Rt===0&&$e(f)),bt!==r?(tr=Qn(),tr!==r?(dt=[dt,Et,bt,tr],Oe=dt):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Rt--,Oe!==r?(ve=Ee,Ee=void 0):Ee=r,Ee!==r?(Oe=Ke(),Oe!==r?(dt=kn(),dt!==r?(Et=wn(),Et!==r?(bt=fa(),bt!==r?(Nt=te,Ee=ue(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=st(),Ee!==r?(Oe=kn(),Oe!==r?(dt=LA(),dt!==r?(Et=fa(),Et!==r?(Nt=te,Ee=ue(dt),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))if(te=ve,Ee=cc(),Ee!==r){if(Oe=[],dt=Ke(),dt!==r)for(;dt!==r;)Oe.push(dt),dt=Ke();else Oe=r;Oe!==r?(Nt=te,Ee=le(Ee),te=Ee):(ve=te,te=r)}else ve=te,te=r;return te}function Bl(){var te,Ee,Oe;for(Rt++,te=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));return Ee!==r?(Nt=ve,Oe=Ce(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)):(ve=te,te=r),Rt--,te===r&&(Ee=r,Rt===0&&$e(me)),te}function Mt(){var te,Ee,Oe;for(te=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));return Ee!==r?(Nt=ve,Oe=g(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)):(ve=te,te=r),te}function kn(){var te;return Nt=ve,te=we(),te?te=void 0:te=r,te}function fa(){var te;return Nt=ve,te=ye(),te?te=void 0:te=r,te}function Ha(){var te;return te=vl(),te===r&&(te=uc()),te}function ns(){var te,Ee,Oe;if(te=vl(),te===r){if(te=ve,Ee=[],Oe=ja(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=ja();else Ee=r;Ee!==r&&(Nt=te,Ee=Ae()),te=Ee}return te}function cc(){var te;return te=Mi(),te===r&&(te=Is(),te===r&&(te=vl(),te===r&&(te=uc()))),te}function pu(){var te;return te=Mi(),te===r&&(te=vl(),te===r&&(te=ja())),te}function uc(){var te,Ee,Oe,dt,Et,bt;if(Rt++,te=ve,Z.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(De)),Ee!==r){for(Oe=[],dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(Re.test(t.charAt(ve))?(bt=t.charAt(ve),ve++):(bt=r,Rt===0&&$e(mt)),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);dt!==r;)Oe.push(dt),dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(Re.test(t.charAt(ve))?(bt=t.charAt(ve),ve++):(bt=r,Rt===0&&$e(mt)),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);Oe!==r?(Nt=te,Ee=j(),te=Ee):(ve=te,te=r)}else ve=te,te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(se)),te}function ja(){var te,Ee,Oe,dt,Et;if(te=ve,t.substr(ve,2)===rt?(Ee=rt,ve+=2):(Ee=r,Rt===0&&$e(Fe)),Ee===r&&(Ee=null),Ee!==r)if(Ne.test(t.charAt(ve))?(Oe=t.charAt(ve),ve++):(Oe=r,Rt===0&&$e(Pe)),Oe!==r){for(dt=[],Ve.test(t.charAt(ve))?(Et=t.charAt(ve),ve++):(Et=r,Rt===0&&$e(ke));Et!==r;)dt.push(Et),Ve.test(t.charAt(ve))?(Et=t.charAt(ve),ve++):(Et=r,Rt===0&&$e(ke));dt!==r?(Nt=te,Ee=j(),te=Ee):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r;return te}function Mi(){var te,Ee;return te=ve,t.substr(ve,4)===it?(Ee=it,ve+=4):(Ee=r,Rt===0&&$e(Ue)),Ee!==r&&(Nt=te,Ee=x()),te=Ee,te}function Is(){var te,Ee;return te=ve,t.substr(ve,4)===w?(Ee=w,ve+=4):(Ee=r,Rt===0&&$e(b)),Ee!==r&&(Nt=te,Ee=y()),te=Ee,te===r&&(te=ve,t.substr(ve,5)===F?(Ee=F,ve+=5):(Ee=r,Rt===0&&$e(z)),Ee!==r&&(Nt=te,Ee=X()),te=Ee),te}function vl(){var te,Ee,Oe,dt;return Rt++,te=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&$e(xe)),Ee!==r?(t.charCodeAt(ve)===34?(Oe=oe,ve++):(Oe=r,Rt===0&&$e(xe)),Oe!==r?(Nt=te,Ee=Te(),te=Ee):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&$e(xe)),Ee!==r?(Oe=gf(),Oe!==r?(t.charCodeAt(ve)===34?(dt=oe,ve++):(dt=r,Rt===0&&$e(xe)),dt!==r?(Nt=te,Ee=lt(Oe),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)),Rt--,te===r&&(Ee=r,Rt===0&&$e($)),te}function gf(){var te,Ee,Oe;if(te=ve,Ee=[],Oe=fc(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=fc();else Ee=r;return Ee!==r&&(Nt=te,Ee=Ct(Ee)),te=Ee,te}function fc(){var te,Ee,Oe,dt,Et,bt;return qt.test(t.charAt(ve))?(te=t.charAt(ve),ve++):(te=r,Rt===0&&$e(ir)),te===r&&(te=ve,t.substr(ve,2)===Pt?(Ee=Pt,ve+=2):(Ee=r,Rt===0&&$e(gn)),Ee!==r&&(Nt=te,Ee=Pr()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===Ir?(Ee=Ir,ve+=2):(Ee=r,Rt===0&&$e(Or)),Ee!==r&&(Nt=te,Ee=on()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===ai?(Ee=ai,ve+=2):(Ee=r,Rt===0&&$e(Io)),Ee!==r&&(Nt=te,Ee=rs()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===$s?(Ee=$s,ve+=2):(Ee=r,Rt===0&&$e(Co)),Ee!==r&&(Nt=te,Ee=ji()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===eo?(Ee=eo,ve+=2):(Ee=r,Rt===0&&$e(wo)),Ee!==r&&(Nt=te,Ee=QA()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===Af?(Ee=Af,ve+=2):(Ee=r,Rt===0&&$e(dh)),Ee!==r&&(Nt=te,Ee=mh()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===to?(Ee=to,ve+=2):(Ee=r,Rt===0&&$e(jn)),Ee!==r&&(Nt=te,Ee=Ts()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===ro?(Ee=ro,ve+=2):(Ee=r,Rt===0&&$e(ou)),Ee!==r&&(Nt=te,Ee=au()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===lu?(Ee=lu,ve+=2):(Ee=r,Rt===0&&$e(TA)),Ee!==r?(Oe=wi(),Oe!==r?(dt=wi(),dt!==r?(Et=wi(),Et!==r?(bt=wi(),bt!==r?(Nt=te,Ee=RA(Oe,dt,Et,bt),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)))))))))),te}function wi(){var te;return oa.test(t.charAt(ve))?(te=t.charAt(ve),ve++):(te=r,Rt===0&&$e(aa)),te}function Qn(){var te,Ee;if(Rt++,te=[],gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Bo)),Ee!==r)for(;Ee!==r;)te.push(Ee),gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Bo));else te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(FA)),te}function Ac(){var te,Ee;if(Rt++,te=[],cu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Cr)),Ee!==r)for(;Ee!==r;)te.push(Ee),cu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Cr));else te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(Me)),te}function Ke(){var te,Ee,Oe,dt,Et,bt;if(te=ve,Ee=st(),Ee!==r){for(Oe=[],dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(bt=st(),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);dt!==r;)Oe.push(dt),dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(bt=st(),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)}else ve=te,te=r;return te}function st(){var te;return t.substr(ve,2)===pf?(te=pf,ve+=2):(te=r,Rt===0&&$e(NA)),te===r&&(t.charCodeAt(ve)===10?(te=OA,ve++):(te=r,Rt===0&&$e(uu)),te===r&&(t.charCodeAt(ve)===13?(te=fu,ve++):(te=r,Rt===0&&$e(oc)))),te}let St=2,lr=0;if(xn=a(),xn!==r&&ve===t.length)return xn;throw xn!==r&&ve<t.length&&$e(yh()),hf(no,Oi<t.length?t.charAt(Oi):null,Oi<t.length?Ma(Oi,Oi+1):Ma(Oi,Oi))}mre.exports={SyntaxError:Rd,parse:EWe}});function Ire(t){return t.match(IWe)?t:JSON.stringify(t)}function wre(t){return typeof t>\"u\"?!0:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>wre(t[e])):!1}function i_(t,e,r){if(t===null)return`null\n`;if(typeof t==\"number\"||typeof t==\"boolean\")return`${t.toString()}\n`;if(typeof t==\"string\")return`${Ire(t)}\n`;if(Array.isArray(t)){if(t.length===0)return`[]\n`;let s=\"  \".repeat(e);return`\n${t.map(n=>`${s}- ${i_(n,e+1,!1)}`).join(\"\")}`}if(typeof t==\"object\"&&t){let[s,a]=t instanceof Sx?[t.data,!1]:[t,!0],n=\"  \".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=Ere.indexOf(p),C=Ere.indexOf(h);return E===-1&&C===-1?p<h?-1:p>h?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!wre(s[p])).map((p,h)=>{let E=s[p],C=Ire(p),S=i_(E,e+1,!0),P=h>0||r?n:\"\",I=C.length>1024?`? ${C}\n${P}:`:`${C}:`,R=S.startsWith(`\n`)?S:` ${S}`;return`${P}${I}${R}`}).join(e===0?`\n`:\"\")||`\n`;return r?`\n${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function nl(t){try{let e=i_(t,0,!1);return e!==`\n`?e:\"\"}catch(e){throw e.location&&(e.message=e.message.replace(/(\\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function CWe(t){return t.endsWith(`\n`)||(t+=`\n`),(0,Cre.parse)(t)}function BWe(t){if(wWe.test(t))return CWe(t);let e=(0,Dx.safeLoad)(t,{schema:Dx.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!=\"object\")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error(\"Expected an indexed object, got an array instead. Does your file follow Yaml's rules?\");return e}function ls(t){return BWe(t)}var Dx,Cre,IWe,Ere,Sx,wWe,Bre=Xe(()=>{Dx=ut(dre()),Cre=ut(yre()),IWe=/^(?![-?:,\\][{}#&*!|>'\"%@` \\t\\r\\n]).([ \\t]*(?![,\\][{}:# \\t\\r\\n]).)*$/,Ere=[\"__metadata\",\"version\",\"resolution\",\"dependencies\",\"peerDependencies\",\"dependenciesMeta\",\"peerDependenciesMeta\",\"binaries\"],Sx=class{constructor(e){this.data=e}};nl.PreserveOrdering=Sx;wWe=/^(#.*(\\r?\\n))*?#\\s+yarn\\s+lockfile\\s+v1\\r?\\n/i});var J2={};Vt(J2,{parseResolution:()=>px,parseShell:()=>ux,parseSyml:()=>ls,stringifyArgument:()=>qU,stringifyArgumentSegment:()=>WU,stringifyArithmeticExpression:()=>Ax,stringifyCommand:()=>GU,stringifyCommandChain:()=>AE,stringifyCommandChainThen:()=>jU,stringifyCommandLine:()=>fx,stringifyCommandLineThen:()=>HU,stringifyEnvSegment:()=>cx,stringifyRedirectArgument:()=>H2,stringifyResolution:()=>hx,stringifyShell:()=>fE,stringifyShellLine:()=>fE,stringifySyml:()=>nl,stringifyValueArgument:()=>vd});var wc=Xe(()=>{wee();Dee();Bre()});var Sre=_((UQt,s_)=>{\"use strict\";var vWe=t=>{let e=!1,r=!1,s=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+\"-\"+t.slice(a),e=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+\"-\"+t.slice(a-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},vre=(t,e)=>{if(!(typeof t==\"string\"||Array.isArray(t)))throw new TypeError(\"Expected the input to be `string | string[]`\");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join(\"-\"):t=t.trim(),t.length===0?\"\":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=vWe(t)),t=t.replace(/^[_.\\- ]+/,\"\").toLowerCase().replace(/[_.\\- ]+(\\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\\d+(\\w|$)/g,a=>a.toUpperCase()),r(t))};s_.exports=vre;s_.exports.default=vre});var Dre=_((_Qt,SWe)=>{SWe.exports=[{name:\"Agola CI\",constant:\"AGOLA\",env:\"AGOLA_GIT_REF\",pr:\"AGOLA_PULL_REQUEST_ID\"},{name:\"Appcircle\",constant:\"APPCIRCLE\",env:\"AC_APPCIRCLE\"},{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"TF_BUILD\",pr:{BUILD_REASON:\"PullRequest\"}},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"Codefresh\",constant:\"CODEFRESH\",env:\"CF_BUILD_ID\",pr:{any:[\"CF_PULL_REQUEST_NUMBER\",\"CF_PULL_REQUEST_ID\"]}},{name:\"Codemagic\",constant:\"CODEMAGIC\",env:\"CM_BUILD_ID\",pr:\"CM_PULL_REQUEST\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"Earthly\",constant:\"EARTHLY\",env:\"EARTHLY_CI\"},{name:\"Expo Application Services\",constant:\"EAS\",env:\"EAS_BUILD\"},{name:\"Gerrit\",constant:\"GERRIT\",env:\"GERRIT_PROJECT\"},{name:\"Gitea Actions\",constant:\"GITEA_ACTIONS\",env:\"GITEA_ACTIONS\"},{name:\"GitHub Actions\",constant:\"GITHUB_ACTIONS\",env:\"GITHUB_ACTIONS\",pr:{GITHUB_EVENT_NAME:\"pull_request\"}},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\",pr:\"CI_MERGE_REQUEST_ID\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Google Cloud Build\",constant:\"GOOGLE_CLOUD_BUILD\",env:\"BUILDER_OUTPUT\"},{name:\"Harness CI\",constant:\"HARNESS\",env:\"HARNESS_BUILD_ID\"},{name:\"Heroku\",constant:\"HEROKU\",env:{env:\"NODE\",includes:\"/app/.heroku/node/bin/node\"}},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"LayerCI\",constant:\"LAYERCI\",env:\"LAYERCI\",pr:\"LAYERCI_PULL_REQUEST\"},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Nevercode\",constant:\"NEVERCODE\",env:\"NEVERCODE\",pr:{env:\"NEVERCODE_PULL_REQUEST\",ne:\"false\"}},{name:\"Prow\",constant:\"PROW\",env:\"PROW_JOB_ID\"},{name:\"ReleaseHub\",constant:\"RELEASEHUB\",env:\"RELEASE_BUILD_ID\"},{name:\"Render\",constant:\"RENDER\",env:\"RENDER\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Screwdriver\",constant:\"SCREWDRIVER\",env:\"SCREWDRIVER\",pr:{env:\"SD_PULL_REQUEST\",ne:\"false\"}},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Sourcehut\",constant:\"SOURCEHUT\",env:{CI_NAME:\"sourcehut\"}},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}},{name:\"Vela\",constant:\"VELA\",env:\"VELA\",pr:{VELA_PULL_REQUEST:\"1\"}},{name:\"Vercel\",constant:\"VERCEL\",env:{any:[\"NOW_BUILDER\",\"VERCEL\"]},pr:\"VERCEL_GIT_PULL_REQUEST_ID\"},{name:\"Visual Studio App Center\",constant:\"APPCENTER\",env:\"APPCENTER_BUILD_ID\"},{name:\"Woodpecker\",constant:\"WOODPECKER\",env:{CI:\"woodpecker\"},pr:{CI_BUILD_EVENT:\"pull_request\"}},{name:\"Xcode Cloud\",constant:\"XCODE_CLOUD\",env:\"CI_XCODE_PROJECT\",pr:\"CI_PULL_REQUEST_NUMBER\"},{name:\"Xcode Server\",constant:\"XCODE_SERVER\",env:\"XCS\"}]});var Fd=_(Ml=>{\"use strict\";var Pre=Dre(),Ds=process.env;Object.defineProperty(Ml,\"_vendors\",{value:Pre.map(function(t){return t.constant})});Ml.name=null;Ml.isPR=null;Pre.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(s){return bre(s)});if(Ml[t.constant]=r,!!r)switch(Ml.name=t.name,typeof t.pr){case\"string\":Ml.isPR=!!Ds[t.pr];break;case\"object\":\"env\"in t.pr?Ml.isPR=t.pr.env in Ds&&Ds[t.pr.env]!==t.pr.ne:\"any\"in t.pr?Ml.isPR=t.pr.any.some(function(s){return!!Ds[s]}):Ml.isPR=bre(t.pr);break;default:Ml.isPR=null}});Ml.isCI=!!(Ds.CI!==\"false\"&&(Ds.BUILD_ID||Ds.BUILD_NUMBER||Ds.CI||Ds.CI_APP_ID||Ds.CI_BUILD_ID||Ds.CI_BUILD_NUMBER||Ds.CI_NAME||Ds.CONTINUOUS_INTEGRATION||Ds.RUN_ID||Ml.name));function bre(t){return typeof t==\"string\"?!!Ds[t]:\"env\"in t?Ds[t.env]&&Ds[t.env].includes(t.includes):\"any\"in t?t.any.some(function(e){return!!Ds[e]}):Object.keys(t).every(function(e){return Ds[e]===t[e]})}});var ei,En,Nd,o_,bx,xre,a_,l_,Px=Xe(()=>{(function(t){t.StartOfInput=\"\\0\",t.EndOfInput=\"\u0001\",t.EndOfPartialInput=\"\u0002\"})(ei||(ei={}));(function(t){t[t.InitialNode=0]=\"InitialNode\",t[t.SuccessNode=1]=\"SuccessNode\",t[t.ErrorNode=2]=\"ErrorNode\",t[t.CustomNode=3]=\"CustomNode\"})(En||(En={}));Nd=-1,o_=/^(-h|--help)(?:=([0-9]+))?$/,bx=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,xre=/^-[a-zA-Z]{2,}$/,a_=/^([^=]+)=([\\s\\S]*)$/,l_=process.env.DEBUG_CLI===\"1\"});var nt,IE,xx,c_,kx=Xe(()=>{Px();nt=class extends Error{constructor(e){super(e),this.clipanion={type:\"usage\"},this.name=\"UsageError\"}},IE=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:\"none\"},this.name=\"UnknownSyntaxError\",this.candidates.length===0)this.message=\"Command not found, but we're not sure what's the alternative.\";else if(this.candidates.every(s=>s.reason!==null&&s.reason===r[0].reason)){let[{reason:s}]=this.candidates;this.message=`${s}\n\n${this.candidates.map(({usage:a})=>`$ ${a}`).join(`\n`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${s}\n${c_(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${c_(e)}`}},xx=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:\"none\"},this.name=\"AmbiguousSyntaxError\",this.message=`Cannot find which to pick amongst the following alternatives:\n\n${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${c_(e)}`}},c_=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\\s/)||e.length===0||r!==`\"${e}\"`?r:e}).join(\" \")}`});function DWe(t){let e=t.split(`\n`),r=e.filter(a=>a.match(/\\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(`\n`)}function Ho(t,{format:e,paragraphs:r}){return t=t.replace(/\\r\\n?/g,`\n`),t=DWe(t),t=t.replace(/^\\n+|\\n+$/g,\"\"),t=t.replace(/^(\\s*)-([^\\n]*?)\\n+/gm,`$1-$2\n\n`),t=t.replace(/\\n(\\n)?\\n*/g,(s,a)=>a||\" \"),r&&(t=t.split(/\\n/).map(s=>{let a=s.match(/^\\s*[*-][\\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`\n`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,\"g\")).map((c,f)=>\" \".repeat(n)+(f===0?\"- \":\"  \")+c).join(`\n`)}).join(`\n\n`)),t=t.replace(/(`+)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t}\n`:\"\"}var u_,kre,Qre,f_=Xe(()=>{u_=Array(80).fill(\"\\u2501\");for(let t=0;t<=24;++t)u_[u_.length-t]=`\\x1B[38;5;${232+t}m\\u2501`;kre={header:t=>`\\x1B[1m\\u2501\\u2501\\u2501 ${t}${t.length<75?` ${u_.slice(t.length+5).join(\"\")}`:\":\"}\\x1B[0m`,bold:t=>`\\x1B[1m${t}\\x1B[22m`,error:t=>`\\x1B[31m\\x1B[1m${t}\\x1B[22m\\x1B[39m`,code:t=>`\\x1B[36m${t}\\x1B[39m`},Qre={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function ya(t){return{...t,[K2]:!0}}function Gf(t,e){return typeof t>\"u\"?[t,e]:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function Qx(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return\"validation failed\";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!==\".\"||!e?`${s.replace(/^\\.(\\[|$)/,\"$1\")}: ${a}`:`: ${a}`,a}function z2(t,e){return e.length===1?new nt(`${t}${Qx(e[0],{mergeName:!0})}`):new nt(`${t}:\n${e.map(r=>`\n- ${Qx(r)}`).join(\"\")}`)}function Od(t,e,r){if(typeof r>\"u\")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw z2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var K2,Cp=Xe(()=>{kx();K2=Symbol(\"clipanion/isOption\")});var Ea={};Vt(Ea,{KeyRelationship:()=>qf,TypeAssertionError:()=>o0,applyCascade:()=>$2,as:()=>WWe,assert:()=>jWe,assertWithErrors:()=>GWe,cascade:()=>Nx,fn:()=>YWe,hasAtLeastOneKey:()=>y_,hasExactLength:()=>Ore,hasForbiddenKeys:()=>fYe,hasKeyRelationship:()=>tB,hasMaxLength:()=>JWe,hasMinLength:()=>VWe,hasMutuallyExclusiveKeys:()=>AYe,hasRequiredKeys:()=>uYe,hasUniqueItems:()=>KWe,isArray:()=>Tx,isAtLeast:()=>d_,isAtMost:()=>ZWe,isBase64:()=>oYe,isBoolean:()=>FWe,isDate:()=>OWe,isDict:()=>UWe,isEnum:()=>fo,isHexColor:()=>sYe,isISO8601:()=>iYe,isInExclusiveRange:()=>eYe,isInInclusiveRange:()=>$We,isInstanceOf:()=>HWe,isInteger:()=>m_,isJSON:()=>aYe,isLiteral:()=>Rre,isLowerCase:()=>tYe,isMap:()=>MWe,isNegative:()=>zWe,isNullable:()=>cYe,isNumber:()=>h_,isObject:()=>Fre,isOneOf:()=>g_,isOptional:()=>lYe,isPartial:()=>_We,isPayload:()=>NWe,isPositive:()=>XWe,isRecord:()=>Fx,isSet:()=>LWe,isString:()=>wE,isTuple:()=>Rx,isUUID4:()=>nYe,isUnknown:()=>p_,isUpperCase:()=>rYe,makeTrait:()=>Nre,makeValidator:()=>Wr,matchesRegExp:()=>Z2,softAssert:()=>qWe});function ti(t){return t===null?\"null\":t===void 0?\"undefined\":t===\"\"?\"an empty string\":typeof t==\"symbol\"?`<${t.toString()}>`:Array.isArray(t)?\"an array\":JSON.stringify(t)}function CE(t,e){if(t.length===0)return\"nothing\";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(\", \")}${a}${ti(s)}`}function s0(t,e){var r,s,a;return typeof e==\"number\"?`${(r=t?.p)!==null&&r!==void 0?r:\".\"}[${e}]`:bWe.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:\"\"}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:\".\"}[${JSON.stringify(e)}]`}function A_(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??\".\"}: ${r}`),!1}function TWe(t,e){return r=>{t[e]=r}}function Wf(t,e){return r=>{let s=t[e];return t[e]=r,Wf(t,e).bind(null,s)}}function X2(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function p_(){return Wr({test:(t,e)=>!0})}function Rre(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function wE(){return Wr({test:(t,e)=>typeof t!=\"string\"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function fo(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a==\"string\"||typeof a==\"number\"),s=new Set(e);return s.size===1?Rre([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${CE(e,\"or\")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function FWe(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"boolean\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s=RWe.get(t);if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function h_(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"number\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"){let a;try{a=JSON.parse(t)}catch{}if(typeof a==\"number\")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function NWe(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>\"u\")return mr(r,\"The isPayload predicate can only be used with coercion enabled\");if(typeof r.coercion>\"u\")return mr(r,\"Unbound coercion result\");if(typeof e!=\"string\")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Wf(n,\"value\")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:\".\",r.coercion.bind(null,n.value)]),!0):!1}})}function OWe(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"&&Tre.test(t))s=new Date(t);else{let a;if(typeof t==\"string\"){let n;try{n=JSON.parse(t)}catch{}typeof n==\"number\"&&(a=n)}else typeof t==\"number\"&&(a=t);if(typeof a<\"u\")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function Tx(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r==\"string\"&&typeof e<\"u\"&&typeof s?.coercions<\"u\"){if(typeof s?.coercion>\"u\")return mr(s,\"Unbound coercion result\");r=r.split(e)}if(!Array.isArray(r))return mr(s,`Expected an array (got ${ti(r)})`);let c=!0;for(let f=0,p=r.length;f<p&&(c=t(r[f],Object.assign(Object.assign({},s),{p:s0(s,f),coercion:Wf(r,f)}))&&c,!(!c&&s?.errors==null));++f);return r!==n&&s.coercions.push([(a=s.p)!==null&&a!==void 0?a:\".\",s.coercion.bind(null,r)]),c}})}function LWe(t,{delimiter:e}={}){let r=Tx(t,{delimiter:e});return Wr({test:(s,a)=>{var n,c;if(Object.getPrototypeOf(s).toString()===\"[object Set]\")if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f=[...s],p=[...s];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,C)=>E!==f[C])?new Set(p):s;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",X2(a.coercion,s,h)]),!0}else{let f=!0;for(let p of s)if(f=t(p,Object.assign({},a))&&f,!f&&a?.errors==null)break;return f}if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f={value:s};return r(s,Object.assign(Object.assign({},a),{coercion:Wf(f,\"value\")}))?(a.coercions.push([(c=a.p)!==null&&c!==void 0?c:\".\",X2(a.coercion,s,()=>new Set(f.value))]),!0):!1}return mr(a,`Expected a set (got ${ti(s)})`)}})}function MWe(t,e){let r=Tx(Rx([t,e])),s=Fx(e,{keys:t});return Wr({test:(a,n)=>{var c,f,p;if(Object.getPrototypeOf(a).toString()===\"[object Map]\")if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let C=()=>E.some((S,P)=>S[0]!==h[P][0]||S[1]!==h[P][1])?new Map(E):a;return n.coercions.push([(c=n.p)!==null&&c!==void 0?c:\".\",X2(n.coercion,a,C)]),!0}else{let h=!0;for(let[E,C]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(C,Object.assign(Object.assign({},n),{p:s0(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(f=n.p)!==null&&f!==void 0?f:\".\",X2(n.coercion,a,()=>new Map(h.value))]),!0):!1:s(a,Object.assign(Object.assign({},n),{coercion:Wf(h,\"value\")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:\".\",X2(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return mr(n,`Expected a map (got ${ti(a)})`)}})}function Rx(t,{delimiter:e}={}){let r=Ore(t.length);return Wr({test:(s,a)=>{var n;if(typeof s==\"string\"&&typeof e<\"u\"&&typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");s=s.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)])}if(!Array.isArray(s))return mr(a,`Expected a tuple (got ${ti(s)})`);let c=r(s,Object.assign({},a));for(let f=0,p=s.length;f<p&&f<t.length&&(c=t[f](s[f],Object.assign(Object.assign({},a),{p:s0(a,f),coercion:Wf(s,f)}))&&c,!(!c&&a?.errors==null));++f);return c}})}function Fx(t,{keys:e=null}={}){let r=Tx(Rx([e??wE(),t]));return Wr({test:(s,a)=>{var n;if(Array.isArray(s)&&typeof a?.coercions<\"u\")return typeof a?.coercion>\"u\"?mr(a,\"Unbound coercion result\"):r(s,Object.assign(Object.assign({},a),{coercion:void 0}))?(s=Object.fromEntries(s),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)]),!0):!1;if(typeof s!=\"object\"||s===null)return mr(a,`Expected an object (got ${ti(s)})`);let c=Object.keys(s),f=!0;for(let p=0,h=c.length;p<h&&(f||a?.errors!=null);++p){let E=c[p],C=s[E];if(E===\"__proto__\"||E===\"constructor\"){f=mr(Object.assign(Object.assign({},a),{p:s0(a,E)}),\"Unsafe property name\");continue}if(e!==null&&!e(E,a)){f=!1;continue}if(!t(C,Object.assign(Object.assign({},a),{p:s0(a,E),coercion:Wf(s,E)}))){f=!1;continue}}return f}})}function UWe(t,e={}){return Fx(t,e)}function Fre(t,{extra:e=null}={}){let r=Object.keys(t),s=Wr({test:(a,n)=>{if(typeof a!=\"object\"||a===null)return mr(n,`Expected an object (got ${ti(a)})`);let c=new Set([...r,...Object.keys(a)]),f={},p=!0;for(let h of c){if(h===\"constructor\"||h===\"__proto__\")p=mr(Object.assign(Object.assign({},n),{p:s0(n,h)}),\"Unsafe property name\");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,C=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<\"u\"?p=E(C,Object.assign(Object.assign({},n),{p:s0(n,h),coercion:Wf(a,h)}))&&p:e===null?p=mr(Object.assign(Object.assign({},n),{p:s0(n,h)}),`Extraneous property (got ${ti(C)})`):Object.defineProperty(f,h,{enumerable:!0,get:()=>C,set:TWe(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(f,n)&&p),p}});return Object.assign(s,{properties:t})}function _We(t){return Fre(t,{extra:Fx(p_())})}function Nre(t){return()=>t}function Wr({test:t}){return Nre(t)()}function jWe(t,e){if(!e(t))throw new o0}function GWe(t,e){let r=[];if(!e(t,{errors:r}))throw new o0({errors:r})}function qWe(t,e){}function WWe(t,e,{coerce:r=!1,errors:s,throw:a}={}){let n=s?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new o0({errors:n});return{value:void 0,errors:n??!0}}let c={value:t},f=Wf(c,\"value\"),p=[];if(!e(t,{errors:n,coercion:f,coercions:p})){if(a)throw new o0({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?c.value:{value:c.value,errors:void 0}}function YWe(t,e){let r=Rx(t);return(...s)=>{if(!r(s))throw new o0;return e(...s)}}function VWe(t){return Wr({test:(e,r)=>e.length>=t?!0:mr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function JWe(t){return Wr({test:(e,r)=>e.length<=t?!0:mr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function Ore(t){return Wr({test:(e,r)=>e.length!==t?mr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function KWe({map:t}={}){return Wr({test:(e,r)=>{let s=new Set,a=new Set;for(let n=0,c=e.length;n<c;++n){let f=e[n],p=typeof t<\"u\"?t(f):f;if(s.has(p)){if(a.has(p))continue;mr(r,`Expected to contain unique elements; got a duplicate with ${ti(e)}`),a.add(p)}else s.add(p)}return a.size===0}})}function zWe(){return Wr({test:(t,e)=>t<=0?!0:mr(e,`Expected to be negative (got ${t})`)})}function XWe(){return Wr({test:(t,e)=>t>=0?!0:mr(e,`Expected to be positive (got ${t})`)})}function d_(t){return Wr({test:(e,r)=>e>=t?!0:mr(r,`Expected to be at least ${t} (got ${e})`)})}function ZWe(t){return Wr({test:(e,r)=>e<=t?!0:mr(r,`Expected to be at most ${t} (got ${e})`)})}function $We(t,e){return Wr({test:(r,s)=>r>=t&&r<=e?!0:mr(s,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function eYe(t,e){return Wr({test:(r,s)=>r>=t&&r<e?!0:mr(s,`Expected to be in the [${t}; ${e}[ range (got ${r})`)})}function m_({unsafe:t=!1}={}){return Wr({test:(e,r)=>e!==Math.round(e)?mr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?mr(r,`Expected to be a safe integer (got ${e})`):!0})}function Z2(t){return Wr({test:(e,r)=>t.test(e)?!0:mr(r,`Expected to match the pattern ${t.toString()} (got ${ti(e)})`)})}function tYe(){return Wr({test:(t,e)=>t!==t.toLowerCase()?mr(e,`Expected to be all-lowercase (got ${t})`):!0})}function rYe(){return Wr({test:(t,e)=>t!==t.toUpperCase()?mr(e,`Expected to be all-uppercase (got ${t})`):!0})}function nYe(){return Wr({test:(t,e)=>QWe.test(t)?!0:mr(e,`Expected to be a valid UUID v4 (got ${ti(t)})`)})}function iYe(){return Wr({test:(t,e)=>Tre.test(t)?!0:mr(e,`Expected to be a valid ISO 8601 date string (got ${ti(t)})`)})}function sYe({alpha:t=!1}){return Wr({test:(e,r)=>(t?PWe.test(e):xWe.test(e))?!0:mr(r,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)})}function oYe(){return Wr({test:(t,e)=>kWe.test(t)?!0:mr(e,`Expected to be a valid base 64 string (got ${ti(t)})`)})}function aYe(t=p_()){return Wr({test:(e,r)=>{let s;try{s=JSON.parse(e)}catch{return mr(r,`Expected to be a valid JSON string (got ${ti(e)})`)}return t(s,r)}})}function Nx(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Wr({test:(s,a)=>{var n,c;let f={value:s},p=typeof a?.coercions<\"u\"?Wf(f,\"value\"):void 0,h=typeof a?.coercions<\"u\"?[]:void 0;if(!t(s,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<\"u\")for(let[,C]of h)E.push(C());try{if(typeof a?.coercions<\"u\"){if(f.value!==s){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,f.value)])}(c=a?.coercions)===null||c===void 0||c.push(...h)}return r.every(C=>C(f.value,a))}finally{for(let C of E)C()}}})}function $2(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Nx(t,r)}function lYe(t){return Wr({test:(e,r)=>typeof e>\"u\"?!0:t(e,r)})}function cYe(t){return Wr({test:(e,r)=>e===null?!0:t(e,r)})}function uYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)||p.push(h);return p.length>0?mr(c,`Missing required ${A_(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function y_(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>Object.keys(n).some(h=>a(s,h,n))?!0:mr(c,`Missing at least one property from ${CE(Array.from(s),\"or\")}`)})}function fYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>0?mr(c,`Forbidden ${A_(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function AYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>1?mr(c,`Mutually exclusive properties ${CE(p,\"and\")}`):!0}})}function tB(t,e,r,s){var a,n;let c=new Set((a=s?.ignore)!==null&&a!==void 0?a:[]),f=eB[(n=s?.missingIf)!==null&&n!==void 0?n:\"missing\"],p=new Set(r),h=pYe[e],E=e===qf.Forbids?\"or\":\"and\";return Wr({test:(C,S)=>{let P=new Set(Object.keys(C));if(!f(P,t,C)||c.has(C[t]))return!0;let I=[];for(let R of p)(f(P,R,C)&&!c.has(C[R]))!==h.expect&&I.push(R);return I.length>=1?mr(S,`Property \"${t}\" ${h.message} ${A_(I.length,\"property\",\"properties\")} ${CE(I,E)}`):!0}})}var bWe,PWe,xWe,kWe,QWe,Tre,RWe,HWe,g_,o0,eB,qf,pYe,Ul=Xe(()=>{bWe=/^[a-zA-Z_][a-zA-Z0-9_]*$/;PWe=/^#[0-9a-f]{6}$/i,xWe=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,kWe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,QWe=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Tre=/^(?:[1-9]\\d{3}(-?)(?:(?:0[1-9]|1[0-2])\\1(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])\\1(?:29|30)|(?:0[13578]|1[02])(?:\\1)31|00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[0-5]))|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\\2)29|-?366))T(?:[01]\\d|2[0-3])(:?)[0-5]\\d(?:\\3[0-5]\\d)?(?:Z|[+-][01]\\d(?:\\3[0-5]\\d)?)$/;RWe=new Map([[\"true\",!0],[\"True\",!0],[\"1\",!0],[1,!0],[\"false\",!1],[\"False\",!1],[\"0\",!1],[0,!1]]);HWe=t=>Wr({test:(e,r)=>e instanceof t?!0:mr(r,`Expected an instance of ${t.name} (got ${ti(e)})`)}),g_=(t,{exclusive:e=!1}={})=>Wr({test:(r,s)=>{var a,n,c;let f=[],p=typeof s?.errors<\"u\"?[]:void 0;for(let h=0,E=t.length;h<E;++h){let C=typeof s?.errors<\"u\"?[]:void 0,S=typeof s?.coercions<\"u\"?[]:void 0;if(t[h](r,Object.assign(Object.assign({},s),{errors:C,coercions:S,p:`${(a=s?.p)!==null&&a!==void 0?a:\".\"}#${h+1}`}))){if(f.push([`#${h+1}`,S]),!e)break}else p?.push(C[0])}if(f.length===1){let[,h]=f[0];return typeof h<\"u\"&&((n=s?.coercions)===null||n===void 0||n.push(...h)),!0}return f.length>1?mr(s,`Expected to match exactly a single predicate (matched ${f.join(\", \")})`):(c=s?.errors)===null||c===void 0||c.push(...p),!1}});o0=class extends Error{constructor({errors:e}={}){let r=\"Type mismatch\";if(e&&e.length>0){r+=`\n`;for(let s of e)r+=`\n- ${s}`}super(r)}};eB={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<\"u\",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids=\"Forbids\",t.Requires=\"Requires\"})(qf||(qf={}));pYe={[qf.Forbids]:{expect:!1,message:\"forbids using\"},[qf.Requires]:{expect:!0,message:\"requires using\"}}});var ot,a0=Xe(()=>{Cp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),Ea)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw z2(\"Invalid option schema\",p);for(let[,C]of h)C()}else if(r!=null)throw new Error(\"Invalid command schema\");let s=await this.execute();return typeof s<\"u\"?s:0}};ot.isOption=K2;ot.Default=[]});function il(t){l_&&console.log(t)}function Mre(){let t={nodes:[]};for(let e=0;e<En.CustomNode;++e)t.nodes.push(_l());return t}function hYe(t){let e=Mre(),r=[],s=e.nodes.length;for(let a of t){r.push(s);for(let n=0;n<a.nodes.length;++n)_re(n)||e.nodes.push(wYe(a.nodes[n],s));s+=a.nodes.length-En.CustomNode+1}for(let a of r)BE(e,En.InitialNode,a);return e}function Ou(t,e){return t.nodes.push(e),t.nodes.length-1}function gYe(t){let e=new Set,r=s=>{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function dYe(t,{prefix:e=\"\"}={}){if(l_){il(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)il(`${e}  ${r}: ${JSON.stringify(t.nodes[r])}`)}}function mYe(t,e,r=!1){il(`Running a vm on ${JSON.stringify(e)}`);let s=[{node:En.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];dYe(t,{prefix:\"  \"});let a=[ei.StartOfInput,...e];for(let n=0;n<a.length;++n){let c=a[n],f=c===ei.EndOfInput||c===ei.EndOfPartialInput,p=n-1;il(`  Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:C}of s){il(`    Current node is ${E}`);let S=t.nodes[E];if(E===En.ErrorNode){h.push({node:E,state:C});continue}console.assert(S.shortcuts.length===0,\"Shortcuts should have been eliminated by now\");let P=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||P)if(P){let I=S.statics[c];for(let{to:R,reducer:N}of I)h.push({node:R,state:typeof N<\"u\"?Ox(I_,N,C,c,p):C}),il(`      Static transition to ${R} found`)}else il(\"      No static transition found\");else{let I=!1;for(let R of Object.keys(S.statics))if(R.startsWith(c)){if(c===R)for(let{to:N,reducer:U}of S.statics[R])h.push({node:N,state:typeof U<\"u\"?Ox(I_,U,C,c,p):C}),il(`      Static transition to ${N} found`);else for(let{to:N}of S.statics[R])h.push({node:N,state:{...C,remainder:R.slice(c.length)}}),il(`      Static transition to ${N} found (partial match)`);I=!0}I||il(\"      No partial static transition found\")}if(!f)for(let[I,{to:R,reducer:N}]of S.dynamics)Ox(BYe,I,C,c,p)&&(h.push({node:R,state:typeof N<\"u\"?Ox(I_,N,C,c,p):C}),il(`      Dynamic transition to ${R} found (via ${I})`))}if(h.length===0&&f&&e.length===1)return[{node:En.InitialNode,state:Lre}];if(h.length===0)throw new IE(e,s.filter(({node:E})=>E!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new IE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=EYe(h)}if(s.length>0){il(\"  Results:\");for(let n of s)il(`    - ${n.node} -> ${JSON.stringify(n.state)}`)}else il(\"  No results\");return s}function yYe(t,e,{endToken:r=ei.EndOfInput}={}){let s=mYe(t,[...e,r]);return IYe(e,s.map(({state:a})=>a))}function EYe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function IYe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Nd||S.requiredOptions.every(P=>P.some(I=>S.options.find(R=>R.name===I))));if(a.length===0)throw new IE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:P})=>!P).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S})=>S),C=CYe(E);if(C.length>1)throw new xx(t,C.map(S=>S.candidateUsage));return C[0]}function CYe(t){let e=[],r=[];for(let s of t)s.selectedIndex===Nd?r.push(s):e.push(s);return r.length>0&&e.push({...Lre,path:Ure(...r.map(s=>s.path)),options:r.reduce((s,a)=>s.concat(a.options),[])}),e}function Ure(t,e,...r){return e===void 0?Array.from(t):Ure(t.filter((s,a)=>s===e[a]),...r)}function _l(){return{dynamics:[],shortcuts:[],statics:{}}}function _re(t){return t===En.SuccessNode||t===En.ErrorNode}function E_(t,e=0){return{to:_re(t.to)?t.to:t.to>=En.CustomNode?t.to+e-En.CustomNode+1:t.to+e,reducer:t.reducer}}function wYe(t,e=0){let r=_l();for(let[s,a]of t.dynamics)r.dynamics.push([s,E_(a,e)]);for(let s of t.shortcuts)r.shortcuts.push(E_(s,e));for(let[s,a]of Object.entries(t.statics))r.statics[s]=a.map(n=>E_(n,e));return r}function Hs(t,e,r,s,a){t.nodes[e].dynamics.push([r,{to:s,reducer:a}])}function BE(t,e,r,s){t.nodes[e].shortcuts.push({to:r,reducer:s})}function Ia(t,e,r,s,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:s,reducer:a})}function Ox(t,e,r,s,a){if(Array.isArray(e)){let[n,...c]=e;return t[n](r,s,a,...c)}else return t[e](r,s,a)}var Lre,BYe,I_,Hl,C_,Lx,Mx=Xe(()=>{Px();kx();Lre={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Nd,partial:!1,tokens:[]};BYe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!==\"-\"&&e.startsWith(\"-\"),isNotOptionLike:(t,e)=>t.ignoreOptions||e===\"-\"||!e.startsWith(\"-\"),isOption:(t,e,r,s)=>!t.ignoreOptions&&e===s,isBatchOption:(t,e,r,s)=>!t.ignoreOptions&&xre.test(e)&&[...e.slice(1)].every(a=>s.has(`-${a}`)),isBoundOption:(t,e,r,s,a)=>{let n=e.match(a_);return!t.ignoreOptions&&!!n&&bx.test(n[1])&&s.has(n[1])&&a.filter(c=>c.nameSet.includes(n[1])).every(c=>c.allowBinding)},isNegatedOption:(t,e,r,s)=>!t.ignoreOptions&&e===`--no-${s.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&o_.test(e),isUnsupportedOption:(t,e,r,s)=>!t.ignoreOptions&&e.startsWith(\"-\")&&bx.test(e)&&!s.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith(\"-\")&&!bx.test(e)},I_={setCandidateState:(t,e,r,s)=>({...t,...s}),setSelectedIndex:(t,e,r,s)=>({...t,selectedIndex:s}),setPartialIndex:(t,e,r,s)=>({...t,selectedIndex:s,partial:!0}),pushBatch:(t,e,r,s)=>{let a=t.options.slice(),n=t.tokens.slice();for(let c=1;c<e.length;++c){let f=s.get(`-${e[c]}`),p=c===1?[0,2]:[c,c+1];a.push({name:f,value:!0}),n.push({segmentIndex:r,type:\"option\",option:f,slice:p})}return{...t,options:a,tokens:n}},pushBound:(t,e,r)=>{let[,s,a]=e.match(a_),n=t.options.concat({name:s,value:a}),c=t.tokens.concat([{segmentIndex:r,type:\"option\",slice:[0,s.length],option:s},{segmentIndex:r,type:\"assign\",slice:[s.length,s.length+1]},{segmentIndex:r,type:\"value\",slice:[s.length+1,s.length+a.length+1]}]);return{...t,options:n,tokens:c}},pushPath:(t,e,r)=>{let s=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:\"path\"});return{...t,path:s,tokens:a}},pushPositional:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtra:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:Hl}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushTrue:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!1}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,s)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var s;let a=t.options[t.options.length-1],n=t.options.slice(),c=t.tokens.concat({segmentIndex:r,type:\"value\"});return a.value=((s=a.value)!==null&&s!==void 0?s:[]).concat([e]),{...t,options:n,tokens:c}},setStringValue:(t,e,r)=>{let s=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:\"value\"});return s.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,s)=>{let[,,a]=e.match(o_);return typeof a<\"u\"?{...t,options:[{name:\"-c\",value:String(s)},{name:\"-i\",value:a}]}:{...t,options:[{name:\"-c\",value:String(s)}]}},setError:(t,e,r,s)=>e===ei.EndOfInput||e===ei.EndOfPartialInput?{...t,errorMessage:`${s}.`}:{...t,errorMessage:`${s} (\"${e}\").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},Hl=Symbol(),C_=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:s=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:s,proxy:a})}addPositional({name:e=\"arg\",required:r=!0}={}){if(!r&&this.arity.extra===Hl)throw new Error(\"Optional parameters cannot be declared when using .rest() or .proxy()\");if(!r&&this.arity.trailing.length>0)throw new Error(\"Optional parameters cannot be declared after the required trailing positional arguments\");!r&&this.arity.extra!==Hl?this.arity.extra.push(e):this.arity.extra!==Hl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e=\"arg\",required:r=0}={}){if(this.arity.extra===Hl)throw new Error(\"Infinite lists cannot be declared multiple times in the same command\");if(this.arity.trailing.length>0)throw new Error(\"Infinite lists cannot be declared after the required trailing positional arguments\");for(let s=0;s<r;++s)this.addPositional({name:e});this.arity.extra=Hl}addProxy({required:e=0}={}){this.addRest({required:e}),this.arity.proxy=!0}addOption({names:e,description:r,arity:s=0,hidden:a=!1,required:n=!1,allowBinding:c=!0}){if(!c&&s>1)throw new Error(\"The arity cannot be higher than 1 when the option only supports the --arg=value syntax\");if(!Number.isInteger(s))throw new Error(`The arity must be an integer, got ${s}`);if(s<0)throw new Error(`The arity must be positive, got ${s}`);let f=e.reduce((p,h)=>h.length>p.length?h:p,\"\");for(let p of e)this.allOptionNames.set(p,f);this.options.push({preferredName:f,nameSet:e,description:r,arity:s,hidden:a,required:n,allowBinding:c})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let s=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&s.push(...this.paths[0]),e){for(let{preferredName:c,nameSet:f,arity:p,hidden:h,description:E,required:C}of this.options){if(h)continue;let S=[];for(let I=0;I<p;++I)S.push(` #${I}`);let P=`${f.join(\",\")}${S.join(\"\")}`;!r&&E?a.push({preferredName:c,nameSet:f,definition:P,description:E,required:C}):s.push(C?`<${P}>`:`[${P}]`)}s.push(...this.arity.leading.map(c=>`<${c}>`)),this.arity.extra===Hl?s.push(\"...\"):s.push(...this.arity.extra.map(c=>`[${c}]`)),s.push(...this.arity.trailing.map(c=>`<${c}>`))}return{usage:s.join(\" \"),options:a}}compile(){if(typeof this.context>\"u\")throw new Error(\"Assertion failed: No context attached\");let e=Mre(),r=En.InitialNode,s=this.usage().usage,a=this.options.filter(f=>f.required).map(f=>f.nameSet);r=Ou(e,_l()),Ia(e,En.InitialNode,ei.StartOfInput,r,[\"setCandidateState\",{candidateUsage:s,requiredOptions:a}]);let n=this.arity.proxy?\"always\":\"isNotOptionLike\",c=this.paths.length>0?this.paths:[[]];for(let f of c){let p=r;if(f.length>0){let S=Ou(e,_l());BE(e,p,S),this.registerOptions(e,S),p=S}for(let S=0;S<f.length;++S){let P=Ou(e,_l());Ia(e,p,f[S],P,\"pushPath\"),p=P}if(this.arity.leading.length>0||!this.arity.proxy){let S=Ou(e,_l());Hs(e,p,\"isHelp\",S,[\"useHelp\",this.cliIndex]),Hs(e,S,\"always\",S,\"pushExtra\"),Ia(e,S,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",Nd]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Ia(e,p,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,p,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let h=p;for(let S=0;S<this.arity.leading.length;++S){let P=Ou(e,_l());(!this.arity.proxy||S+1!==this.arity.leading.length)&&this.registerOptions(e,P),(this.arity.trailing.length>0||S+1!==this.arity.leading.length)&&(Ia(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),Hs(e,h,\"isNotOptionLike\",P,\"pushPositional\"),h=P}let E=h;if(this.arity.extra===Hl||this.arity.extra.length>0){let S=Ou(e,_l());if(BE(e,h,S),this.arity.extra===Hl){let P=Ou(e,_l());this.arity.proxy||this.registerOptions(e,P),Hs(e,h,n,P,\"pushExtraNoLimits\"),Hs(e,P,n,P,\"pushExtraNoLimits\"),BE(e,P,S)}else for(let P=0;P<this.arity.extra.length;++P){let I=Ou(e,_l());(!this.arity.proxy||P>0)&&this.registerOptions(e,I),Hs(e,E,n,I,\"pushExtra\"),BE(e,I,S),E=I}E=S}this.arity.trailing.length>0&&(Ia(e,E,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,E,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let C=E;for(let S=0;S<this.arity.trailing.length;++S){let P=Ou(e,_l());this.arity.proxy||this.registerOptions(e,P),S+1<this.arity.trailing.length&&(Ia(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),Hs(e,C,\"isNotOptionLike\",P,\"pushPositional\"),C=P}Hs(e,C,n,En.ErrorNode,[\"setError\",\"Extraneous positional argument\"]),Ia(e,C,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex]),Ia(e,C,ei.EndOfPartialInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex])}return{machine:e,context:this.context}}registerOptions(e,r){Hs(e,r,[\"isOption\",\"--\"],r,\"inhibateOptions\"),Hs(e,r,[\"isBatchOption\",this.allOptionNames],r,[\"pushBatch\",this.allOptionNames]),Hs(e,r,[\"isBoundOption\",this.allOptionNames,this.options],r,\"pushBound\"),Hs(e,r,[\"isUnsupportedOption\",this.allOptionNames],En.ErrorNode,[\"setError\",\"Unsupported option name\"]),Hs(e,r,[\"isInvalidOption\"],En.ErrorNode,[\"setError\",\"Invalid option name\"]);for(let s of this.options)if(s.arity===0)for(let a of s.nameSet)Hs(e,r,[\"isOption\",a],r,[\"pushTrue\",s.preferredName]),a.startsWith(\"--\")&&!a.startsWith(\"--no-\")&&Hs(e,r,[\"isNegatedOption\",a],r,[\"pushFalse\",s.preferredName]);else{let a=Ou(e,_l());for(let n of s.nameSet)Hs(e,r,[\"isOption\",n],a,[\"pushUndefined\",s.preferredName]);for(let n=0;n<s.arity;++n){let c=Ou(e,_l());Ia(e,a,ei.EndOfInput,En.ErrorNode,\"setOptionArityError\"),Ia(e,a,ei.EndOfPartialInput,En.ErrorNode,\"setOptionArityError\"),Hs(e,a,\"isOptionLike\",En.ErrorNode,\"setOptionArityError\");let f=s.arity===1?\"setStringValue\":\"pushStringValue\";Hs(e,a,\"isNotOptionLike\",c,f),a=c}BE(e,a,r)}}},Lx=class t{constructor({binaryName:e=\"...\"}={}){this.builders=[],this.opts={binaryName:e}}static build(e,r={}){return new t(r).commands(e).compile()}getBuilderByIndex(e){if(!(e>=0&&e<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${e})`);return this.builders[e]}commands(e){for(let r of e)r(this.command());return this}command(){let e=new C_(this.builders.length,this.opts);return this.builders.push(e),e}compile(){let e=[],r=[];for(let a of this.builders){let{machine:n,context:c}=a.compile();e.push(n),r.push(c)}let s=hYe(e);return gYe(s),{machine:s,contexts:r,process:(a,{partial:n}={})=>{let c=n?ei.EndOfPartialInput:ei.EndOfInput;return yYe(s,a,{endToken:c})}}}}});function jre(){return Ux.default&&\"getColorDepth\"in Ux.default.WriteStream.prototype?Ux.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR===\"0\"?1:process.env.FORCE_COLOR===\"1\"||typeof process.stdout<\"u\"&&process.stdout.isTTY?8:1}function Gre(t){let e=Hre;if(typeof e>\"u\"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie(\"async_hooks\");e=Hre=new r;let s=process.stdout._write;process.stdout._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?s.call(this,n,c,f):p.stdout.write(n,c,f)};let a=process.stderr._write;process.stderr._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?a.call(this,n,c,f):p.stderr.write(n,c,f)}}return r=>e.run(t,r)}var Ux,Hre,qre=Xe(()=>{Ux=ut(Ie(\"tty\"),1)});var _x,Wre=Xe(()=>{a0();_x=class t extends ot{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let s=new t(r);s.path=e.path;for(let a of e.options)switch(a.name){case\"-c\":s.commands.push(Number(a.value));break;case\"-i\":s.index=Number(a.value);break}return s}async execute(){let e=this.commands;if(typeof this.index<\"u\"&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),e.length===0)this.context.stdout.write(this.cli.usage());else if(e.length===1)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write(`Multiple commands match your selection:\n`),this.context.stdout.write(`\n`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`\n`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.\n`)}}}});async function Jre(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=zre(t);return Ca.from(r,e).runExit(s,a)}async function Kre(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=zre(t);return Ca.from(r,e).run(s,a)}function zre(t){let e,r,s,a;switch(typeof process<\"u\"&&typeof process.argv<\"u\"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>\"u\")throw new Error(\"The argv parameter must be provided when running Clipanion outside of a Node context\");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function Vre(t){return t()}var Yre,Ca,Xre=Xe(()=>{Px();Mx();f_();qre();a0();Wre();Yre=Symbol(\"clipanion/errorCommand\");Ca=class t{constructor({binaryLabel:e,binaryName:r=\"...\",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Lx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h==\"object\"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<\"u\")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e==\"object\"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Nd:{let E=_x.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: Expected the command class to have been registered.\");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[P,{transformer:I}]of C.specs.entries())S[P]=I(C.builder,P,p,h);return S}catch(P){throw P[Yre]=S,P}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=Gre(c))!==null&&a!==void 0?a:Vre,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<\"u\"?Ho(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<\"u\"?Ho(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<\"u\"?Ho(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<\"u\"?e.usage.examples.map(([E,C])=>[Ho(E,{format:this.format(r),paragraphs:!1}),C.replace(/\\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a=\"$ \"}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<\"u\";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(P=>P.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f=\"\";if(c)if(s){let{description:p=\"\",details:h=\"\",examples:E=[]}=c.usage||{};p!==\"\"&&(f+=Ho(p,{format:this.format(r),paragraphs:!1}).replace(/^./,P=>P.toUpperCase()),f+=`\n`),(h!==\"\"||E.length>0)&&(f+=`${this.format(r).header(\"Usage\")}\n`,f+=`\n`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C}\n`,S.length>0){f+=`\n`,f+=`${this.format(r).header(\"Options\")}\n`;let P=S.reduce((I,R)=>Math.max(I,R.definition.length),0);f+=`\n`;for(let{definition:I,description:R}of S)f+=`  ${this.format(r).bold(I.padEnd(P))}    ${Ho(R,{format:this.format(r),paragraphs:!1})}`}if(h!==\"\"&&(f+=`\n`,f+=`${this.format(r).header(\"Details\")}\n`,f+=`\n`,f+=Ho(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`\n`,f+=`${this.format(r).header(\"Examples\")}\n`;for(let[P,I]of E)f+=`\n`,f+=Ho(P,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,`  ${this.format(r).bold(a)}`).replace(/\\$0/g,this.binaryName)}\n`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}\n`}else{let p=new Map;for(let[S,{index:P}]of this.registrations.entries()){if(typeof S.usage>\"u\")continue;let I=typeof S.usage.category<\"u\"?Ho(S.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(I);typeof R>\"u\"&&p.set(I,R=[]);let{usage:N}=this.getUsageByIndex(P);R.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,P)=>S===null?-1:P===null?1:S.localeCompare(P,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),E=typeof this.binaryLabel<\"u\",C=typeof this.binaryVersion<\"u\";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}\n\n`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}\n`:f+=`${this.format(r).header(`${this.binaryVersion}`)}\n`,f+=`  ${this.format(r).bold(a)}${this.binaryName} <command>\n`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>\n`;for(let S of h){let P=p.get(S).slice().sort((R,N)=>R.usage.localeCompare(N.usage,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),I=S!==null?S.trim():\"General commands\";f+=`\n`,f+=`${this.format(r).header(`${I}`)}\n`;for(let{commandClass:R,usage:N}of P){let U=R.usage.description||\"undocumented\";f+=`\n`,f+=`  ${this.format(r).bold(N)}\n`,f+=`    ${Ho(U,{format:this.format(r),paragraphs:!1})}`}}f+=`\n`,f+=Ho(\"You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.\",{format:this.format(r),paragraphs:!0})}return f}error(e,r){var s,{colored:a,command:n=(s=e[Yre])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!=\"object\"||!(\"stack\"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c=\"\",f=e.name.replace(/([a-z])([A-Z])/g,\"$1 $2\");f===\"Error\"&&(f=\"Internal Error\"),c+=`${this.format(a).error(f)}: ${e.message}\n`;let p=e.clipanion;return typeof p<\"u\"?p.type===\"usage\"&&(c+=`\n`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\\n/,\"\")}\n`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?kre:Qre}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>\"u\")throw new Error(\"Assertion failed: Unregistered command\");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Ca.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:jre()}});var rB,Zre=Xe(()=>{a0();rB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}\n`)}};rB.paths=[[\"--clipanion=definitions\"]]});var nB,$re=Xe(()=>{a0();nB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};nB.paths=[[\"-h\"],[\"--help\"]]});function Hx(t={}){return ya({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var w_=Xe(()=>{Cp()});var iB,ene=Xe(()=>{a0();w_();iB=class extends ot{constructor(){super(...arguments),this.args=Hx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}\n`)}};iB.paths=[[\"--clipanion=tokens\"]]});var sB,tne=Xe(()=>{a0();sB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:\"<unknown>\"}\n`)}};sB.paths=[[\"-v\"],[\"--version\"]]});var B_={};Vt(B_,{DefinitionsCommand:()=>rB,HelpCommand:()=>nB,TokensCommand:()=>iB,VersionCommand:()=>sB});var rne=Xe(()=>{Zre();$re();ene();tne()});function nne(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return ya({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<\"u\"?[...s]:void 0;for(let{name:P,value:I}of E.options)f.has(P)&&(C=P,S=S??[],S.push(I));return typeof S<\"u\"?Od(C??h,S,a.validator):S}})}var ine=Xe(()=>{Cp()});function sne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return ya({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var one=Xe(()=>{Cp()});function ane(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return ya({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var lne=Xe(()=>{Cp()});function cne(t={}){return ya({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===Hl||f.extra===!1&&c<e.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var une=Xe(()=>{Mx();Cp()});function vYe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return ya({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,P=s;typeof a.env<\"u\"&&C.env[a.env]&&(S=a.env,P=C.env[a.env]);for(let{name:I,value:R}of E.options)f.has(I)&&(S=I,P=R);return typeof P==\"string\"?Od(S??h,P,a.validator):P}})}function SYe(t={}){let{required:e=!0}=t;return ya({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===Hl||e&&a.positionals[c].extra===!0||!e&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Od((n=t.name)!==null&&n!==void 0?n:s,f.value,t.validator)}}})}function fne(t,...e){return typeof t==\"string\"?vYe(t,...e):SYe(t)}var Ane=Xe(()=>{Mx();Cp()});var ge={};Vt(ge,{Array:()=>nne,Boolean:()=>sne,Counter:()=>ane,Proxy:()=>Hx,Rest:()=>cne,String:()=>fne,applyValidator:()=>Od,cleanValidationError:()=>Qx,formatError:()=>z2,isOptionSymbol:()=>K2,makeCommandOption:()=>ya,rerouteArguments:()=>Gf});var pne=Xe(()=>{Cp();w_();ine();one();lne();une();Ane()});var oB={};Vt(oB,{Builtins:()=>B_,Cli:()=>Ca,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>Ho,run:()=>Kre,runExit:()=>Jre});var Yt=Xe(()=>{kx();f_();a0();Xre();rne();pne()});var hne=_((VTt,DYe)=>{DYe.exports={name:\"dotenv\",version:\"16.3.1\",description:\"Loads environment variables from .env file\",main:\"lib/main.js\",types:\"lib/main.d.ts\",exports:{\".\":{types:\"./lib/main.d.ts\",require:\"./lib/main.js\",default:\"./lib/main.js\"},\"./config\":\"./config.js\",\"./config.js\":\"./config.js\",\"./lib/env-options\":\"./lib/env-options.js\",\"./lib/env-options.js\":\"./lib/env-options.js\",\"./lib/cli-options\":\"./lib/cli-options.js\",\"./lib/cli-options.js\":\"./lib/cli-options.js\",\"./package.json\":\"./package.json\"},scripts:{\"dts-check\":\"tsc --project tests/types/tsconfig.json\",lint:\"standard\",\"lint-readme\":\"standard-markdown\",pretest:\"npm run lint && npm run dts-check\",test:\"tap tests/*.js --100 -Rspec\",prerelease:\"npm test\",release:\"standard-version\"},repository:{type:\"git\",url:\"git://github.com/motdotla/dotenv.git\"},funding:\"https://github.com/motdotla/dotenv?sponsor=1\",keywords:[\"dotenv\",\"env\",\".env\",\"environment\",\"variables\",\"config\",\"settings\"],readmeFilename:\"README.md\",license:\"BSD-2-Clause\",devDependencies:{\"@definitelytyped/dtslint\":\"^0.0.133\",\"@types/node\":\"^18.11.3\",decache:\"^4.6.1\",sinon:\"^14.0.1\",standard:\"^17.0.0\",\"standard-markdown\":\"^7.1.0\",\"standard-version\":\"^9.5.0\",tap:\"^16.3.0\",tar:\"^6.1.11\",typescript:\"^4.8.4\"},engines:{node:\">=12\"},browser:{fs:!1}}});var yne=_((JTt,wp)=>{var gne=Ie(\"fs\"),S_=Ie(\"path\"),bYe=Ie(\"os\"),PYe=Ie(\"crypto\"),xYe=hne(),D_=xYe.version,kYe=/(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg;function QYe(t){let e={},r=t.toString();r=r.replace(/\\r\\n?/mg,`\n`);let s;for(;(s=kYe.exec(r))!=null;){let a=s[1],n=s[2]||\"\";n=n.trim();let c=n[0];n=n.replace(/^(['\"`])([\\s\\S]*)\\1$/mg,\"$2\"),c==='\"'&&(n=n.replace(/\\\\n/g,`\n`),n=n.replace(/\\\\r/g,\"\\r\")),e[a]=n}return e}function TYe(t){let e=mne(t),r=js.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=dne(t).split(\",\"),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=NYe(r,f);n=js.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return js.parse(n)}function RYe(t){console.log(`[dotenv@${D_}][INFO] ${t}`)}function FYe(t){console.log(`[dotenv@${D_}][WARN] ${t}`)}function v_(t){console.log(`[dotenv@${D_}][DEBUG] ${t}`)}function dne(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:\"\"}function NYe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code===\"ERR_INVALID_URL\"?new Error(\"INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development\"):f}let s=r.password;if(!s)throw new Error(\"INVALID_DOTENV_KEY: Missing key part\");let a=r.searchParams.get(\"environment\");if(!a)throw new Error(\"INVALID_DOTENV_KEY: Missing environment part\");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function mne(t){let e=S_.resolve(process.cwd(),\".env\");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(\".vault\")?e:`${e}.vault`}function OYe(t){return t[0]===\"~\"?S_.join(bYe.homedir(),t.slice(1)):t}function LYe(t){RYe(\"Loading env from encrypted .env.vault\");let e=js._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),js.populate(r,e,t),{parsed:e}}function MYe(t){let e=S_.resolve(process.cwd(),\".env\"),r=\"utf8\",s=!!(t&&t.debug);t&&(t.path!=null&&(e=OYe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=js.parse(gne.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),js.populate(n,a,t),{parsed:a}}catch(a){return s&&v_(`Failed to load ${e} ${a.message}`),{error:a}}}function UYe(t){let e=mne(t);return dne(t).length===0?js.configDotenv(t):gne.existsSync(e)?js._configVault(t):(FYe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),js.configDotenv(t))}function _Ye(t,e){let r=Buffer.from(e.slice(-64),\"hex\"),s=Buffer.from(t,\"base64\"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=PYe.createDecipheriv(\"aes-256-gcm\",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message===\"Invalid key length\",h=c.message===\"Unsupported state or unable to authenticate data\";if(f||p){let E=\"INVALID_DOTENV_KEY: It must be 64 characters long (or more)\";throw new Error(E)}else if(h){let E=\"DECRYPTION_FAILED: Please check your DOTENV_KEY\";throw new Error(E)}else throw console.error(\"Error: \",c.code),console.error(\"Error: \",c.message),c}}function HYe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!=\"object\")throw new Error(\"OBJECT_REQUIRED: Please check the processEnv argument being passed to populate\");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&v_(a===!0?`\"${n}\" is already defined and WAS overwritten`:`\"${n}\" is already defined and was NOT overwritten`)):t[n]=e[n]}var js={configDotenv:MYe,_configVault:LYe,_parseVault:TYe,config:UYe,decrypt:_Ye,parse:QYe,populate:HYe};wp.exports.configDotenv=js.configDotenv;wp.exports._configVault=js._configVault;wp.exports._parseVault=js._parseVault;wp.exports.config=js.config;wp.exports.decrypt=js.decrypt;wp.exports.parse=js.parse;wp.exports.populate=js.populate;wp.exports=js});var Ine=_((KTt,Ene)=>{\"use strict\";Ene.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Ld=_((zTt,b_)=>{\"use strict\";var jYe=Ine(),Cne=t=>{if(t<1)throw new TypeError(\"Expected `concurrency` to be a number from 1 and up\");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=jYe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<t?a(f,p,...h):e.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};b_.exports=Cne;b_.exports.default=Cne});function Yf(t){return`YN${t.toString(10).padStart(4,\"0\")}`}function jx(t){let e=Number(t.slice(2));if(typeof Br[e]>\"u\")throw new Error(`Unknown message name: \"${t}\"`);return e}var Br,Gx=Xe(()=>{Br=(Me=>(Me[Me.UNNAMED=0]=\"UNNAMED\",Me[Me.EXCEPTION=1]=\"EXCEPTION\",Me[Me.MISSING_PEER_DEPENDENCY=2]=\"MISSING_PEER_DEPENDENCY\",Me[Me.CYCLIC_DEPENDENCIES=3]=\"CYCLIC_DEPENDENCIES\",Me[Me.DISABLED_BUILD_SCRIPTS=4]=\"DISABLED_BUILD_SCRIPTS\",Me[Me.BUILD_DISABLED=5]=\"BUILD_DISABLED\",Me[Me.SOFT_LINK_BUILD=6]=\"SOFT_LINK_BUILD\",Me[Me.MUST_BUILD=7]=\"MUST_BUILD\",Me[Me.MUST_REBUILD=8]=\"MUST_REBUILD\",Me[Me.BUILD_FAILED=9]=\"BUILD_FAILED\",Me[Me.RESOLVER_NOT_FOUND=10]=\"RESOLVER_NOT_FOUND\",Me[Me.FETCHER_NOT_FOUND=11]=\"FETCHER_NOT_FOUND\",Me[Me.LINKER_NOT_FOUND=12]=\"LINKER_NOT_FOUND\",Me[Me.FETCH_NOT_CACHED=13]=\"FETCH_NOT_CACHED\",Me[Me.YARN_IMPORT_FAILED=14]=\"YARN_IMPORT_FAILED\",Me[Me.REMOTE_INVALID=15]=\"REMOTE_INVALID\",Me[Me.REMOTE_NOT_FOUND=16]=\"REMOTE_NOT_FOUND\",Me[Me.RESOLUTION_PACK=17]=\"RESOLUTION_PACK\",Me[Me.CACHE_CHECKSUM_MISMATCH=18]=\"CACHE_CHECKSUM_MISMATCH\",Me[Me.UNUSED_CACHE_ENTRY=19]=\"UNUSED_CACHE_ENTRY\",Me[Me.MISSING_LOCKFILE_ENTRY=20]=\"MISSING_LOCKFILE_ENTRY\",Me[Me.WORKSPACE_NOT_FOUND=21]=\"WORKSPACE_NOT_FOUND\",Me[Me.TOO_MANY_MATCHING_WORKSPACES=22]=\"TOO_MANY_MATCHING_WORKSPACES\",Me[Me.CONSTRAINTS_MISSING_DEPENDENCY=23]=\"CONSTRAINTS_MISSING_DEPENDENCY\",Me[Me.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]=\"CONSTRAINTS_INCOMPATIBLE_DEPENDENCY\",Me[Me.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]=\"CONSTRAINTS_EXTRANEOUS_DEPENDENCY\",Me[Me.CONSTRAINTS_INVALID_DEPENDENCY=26]=\"CONSTRAINTS_INVALID_DEPENDENCY\",Me[Me.CANT_SUGGEST_RESOLUTIONS=27]=\"CANT_SUGGEST_RESOLUTIONS\",Me[Me.FROZEN_LOCKFILE_EXCEPTION=28]=\"FROZEN_LOCKFILE_EXCEPTION\",Me[Me.CROSS_DRIVE_VIRTUAL_LOCAL=29]=\"CROSS_DRIVE_VIRTUAL_LOCAL\",Me[Me.FETCH_FAILED=30]=\"FETCH_FAILED\",Me[Me.DANGEROUS_NODE_MODULES=31]=\"DANGEROUS_NODE_MODULES\",Me[Me.NODE_GYP_INJECTED=32]=\"NODE_GYP_INJECTED\",Me[Me.AUTHENTICATION_NOT_FOUND=33]=\"AUTHENTICATION_NOT_FOUND\",Me[Me.INVALID_CONFIGURATION_KEY=34]=\"INVALID_CONFIGURATION_KEY\",Me[Me.NETWORK_ERROR=35]=\"NETWORK_ERROR\",Me[Me.LIFECYCLE_SCRIPT=36]=\"LIFECYCLE_SCRIPT\",Me[Me.CONSTRAINTS_MISSING_FIELD=37]=\"CONSTRAINTS_MISSING_FIELD\",Me[Me.CONSTRAINTS_INCOMPATIBLE_FIELD=38]=\"CONSTRAINTS_INCOMPATIBLE_FIELD\",Me[Me.CONSTRAINTS_EXTRANEOUS_FIELD=39]=\"CONSTRAINTS_EXTRANEOUS_FIELD\",Me[Me.CONSTRAINTS_INVALID_FIELD=40]=\"CONSTRAINTS_INVALID_FIELD\",Me[Me.AUTHENTICATION_INVALID=41]=\"AUTHENTICATION_INVALID\",Me[Me.PROLOG_UNKNOWN_ERROR=42]=\"PROLOG_UNKNOWN_ERROR\",Me[Me.PROLOG_SYNTAX_ERROR=43]=\"PROLOG_SYNTAX_ERROR\",Me[Me.PROLOG_EXISTENCE_ERROR=44]=\"PROLOG_EXISTENCE_ERROR\",Me[Me.STACK_OVERFLOW_RESOLUTION=45]=\"STACK_OVERFLOW_RESOLUTION\",Me[Me.AUTOMERGE_FAILED_TO_PARSE=46]=\"AUTOMERGE_FAILED_TO_PARSE\",Me[Me.AUTOMERGE_IMMUTABLE=47]=\"AUTOMERGE_IMMUTABLE\",Me[Me.AUTOMERGE_SUCCESS=48]=\"AUTOMERGE_SUCCESS\",Me[Me.AUTOMERGE_REQUIRED=49]=\"AUTOMERGE_REQUIRED\",Me[Me.DEPRECATED_CLI_SETTINGS=50]=\"DEPRECATED_CLI_SETTINGS\",Me[Me.PLUGIN_NAME_NOT_FOUND=51]=\"PLUGIN_NAME_NOT_FOUND\",Me[Me.INVALID_PLUGIN_REFERENCE=52]=\"INVALID_PLUGIN_REFERENCE\",Me[Me.CONSTRAINTS_AMBIGUITY=53]=\"CONSTRAINTS_AMBIGUITY\",Me[Me.CACHE_OUTSIDE_PROJECT=54]=\"CACHE_OUTSIDE_PROJECT\",Me[Me.IMMUTABLE_INSTALL=55]=\"IMMUTABLE_INSTALL\",Me[Me.IMMUTABLE_CACHE=56]=\"IMMUTABLE_CACHE\",Me[Me.INVALID_MANIFEST=57]=\"INVALID_MANIFEST\",Me[Me.PACKAGE_PREPARATION_FAILED=58]=\"PACKAGE_PREPARATION_FAILED\",Me[Me.INVALID_RANGE_PEER_DEPENDENCY=59]=\"INVALID_RANGE_PEER_DEPENDENCY\",Me[Me.INCOMPATIBLE_PEER_DEPENDENCY=60]=\"INCOMPATIBLE_PEER_DEPENDENCY\",Me[Me.DEPRECATED_PACKAGE=61]=\"DEPRECATED_PACKAGE\",Me[Me.INCOMPATIBLE_OS=62]=\"INCOMPATIBLE_OS\",Me[Me.INCOMPATIBLE_CPU=63]=\"INCOMPATIBLE_CPU\",Me[Me.FROZEN_ARTIFACT_EXCEPTION=64]=\"FROZEN_ARTIFACT_EXCEPTION\",Me[Me.TELEMETRY_NOTICE=65]=\"TELEMETRY_NOTICE\",Me[Me.PATCH_HUNK_FAILED=66]=\"PATCH_HUNK_FAILED\",Me[Me.INVALID_CONFIGURATION_VALUE=67]=\"INVALID_CONFIGURATION_VALUE\",Me[Me.UNUSED_PACKAGE_EXTENSION=68]=\"UNUSED_PACKAGE_EXTENSION\",Me[Me.REDUNDANT_PACKAGE_EXTENSION=69]=\"REDUNDANT_PACKAGE_EXTENSION\",Me[Me.AUTO_NM_SUCCESS=70]=\"AUTO_NM_SUCCESS\",Me[Me.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]=\"NM_CANT_INSTALL_EXTERNAL_SOFT_LINK\",Me[Me.NM_PRESERVE_SYMLINKS_REQUIRED=72]=\"NM_PRESERVE_SYMLINKS_REQUIRED\",Me[Me.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]=\"UPDATE_LOCKFILE_ONLY_SKIP_LINK\",Me[Me.NM_HARDLINKS_MODE_DOWNGRADED=74]=\"NM_HARDLINKS_MODE_DOWNGRADED\",Me[Me.PROLOG_INSTANTIATION_ERROR=75]=\"PROLOG_INSTANTIATION_ERROR\",Me[Me.INCOMPATIBLE_ARCHITECTURE=76]=\"INCOMPATIBLE_ARCHITECTURE\",Me[Me.GHOST_ARCHITECTURE=77]=\"GHOST_ARCHITECTURE\",Me[Me.RESOLUTION_MISMATCH=78]=\"RESOLUTION_MISMATCH\",Me[Me.PROLOG_LIMIT_EXCEEDED=79]=\"PROLOG_LIMIT_EXCEEDED\",Me[Me.NETWORK_DISABLED=80]=\"NETWORK_DISABLED\",Me[Me.NETWORK_UNSAFE_HTTP=81]=\"NETWORK_UNSAFE_HTTP\",Me[Me.RESOLUTION_FAILED=82]=\"RESOLUTION_FAILED\",Me[Me.AUTOMERGE_GIT_ERROR=83]=\"AUTOMERGE_GIT_ERROR\",Me[Me.CONSTRAINTS_CHECK_FAILED=84]=\"CONSTRAINTS_CHECK_FAILED\",Me[Me.UPDATED_RESOLUTION_RECORD=85]=\"UPDATED_RESOLUTION_RECORD\",Me[Me.EXPLAIN_PEER_DEPENDENCIES_CTA=86]=\"EXPLAIN_PEER_DEPENDENCIES_CTA\",Me[Me.MIGRATION_SUCCESS=87]=\"MIGRATION_SUCCESS\",Me[Me.VERSION_NOTICE=88]=\"VERSION_NOTICE\",Me[Me.TIPS_NOTICE=89]=\"TIPS_NOTICE\",Me[Me.OFFLINE_MODE_ENABLED=90]=\"OFFLINE_MODE_ENABLED\",Me[Me.INVALID_PROVENANCE_ENVIRONMENT=91]=\"INVALID_PROVENANCE_ENVIRONMENT\",Me))(Br||{})});var aB=_((ZTt,wne)=>{var GYe=\"2.0.0\",qYe=Number.MAX_SAFE_INTEGER||9007199254740991,WYe=16,YYe=250,VYe=[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"];wne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:WYe,MAX_SAFE_BUILD_LENGTH:YYe,MAX_SAFE_INTEGER:qYe,RELEASE_TYPES:VYe,SEMVER_SPEC_VERSION:GYe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lB=_(($Tt,Bne)=>{var JYe=typeof process==\"object\"&&process.env&&process.env.NODE_DEBUG&&/\\bsemver\\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error(\"SEMVER\",...t):()=>{};Bne.exports=JYe});var vE=_((Bp,vne)=>{var{MAX_SAFE_COMPONENT_LENGTH:P_,MAX_SAFE_BUILD_LENGTH:KYe,MAX_LENGTH:zYe}=aB(),XYe=lB();Bp=vne.exports={};var ZYe=Bp.re=[],$Ye=Bp.safeRe=[],rr=Bp.src=[],nr=Bp.t={},eVe=0,x_=\"[a-zA-Z0-9-]\",tVe=[[\"\\\\s\",1],[\"\\\\d\",zYe],[x_,KYe]],rVe=t=>{for(let[e,r]of tVe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Jr=(t,e,r)=>{let s=rVe(e),a=eVe++;XYe(t,a,e),nr[t]=a,rr[a]=e,ZYe[a]=new RegExp(e,r?\"g\":void 0),$Ye[a]=new RegExp(s,r?\"g\":void 0)};Jr(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\");Jr(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\");Jr(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${x_}*`);Jr(\"MAINVERSION\",`(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})`);Jr(\"MAINVERSIONLOOSE\",`(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})`);Jr(\"PRERELEASEIDENTIFIER\",`(?:${rr[nr.NUMERICIDENTIFIER]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Jr(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${rr[nr.NUMERICIDENTIFIERLOOSE]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Jr(\"PRERELEASE\",`(?:-(${rr[nr.PRERELEASEIDENTIFIER]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIER]})*))`);Jr(\"PRERELEASELOOSE\",`(?:-?(${rr[nr.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIERLOOSE]})*))`);Jr(\"BUILDIDENTIFIER\",`${x_}+`);Jr(\"BUILD\",`(?:\\\\+(${rr[nr.BUILDIDENTIFIER]}(?:\\\\.${rr[nr.BUILDIDENTIFIER]})*))`);Jr(\"FULLPLAIN\",`v?${rr[nr.MAINVERSION]}${rr[nr.PRERELEASE]}?${rr[nr.BUILD]}?`);Jr(\"FULL\",`^${rr[nr.FULLPLAIN]}$`);Jr(\"LOOSEPLAIN\",`[v=\\\\s]*${rr[nr.MAINVERSIONLOOSE]}${rr[nr.PRERELEASELOOSE]}?${rr[nr.BUILD]}?`);Jr(\"LOOSE\",`^${rr[nr.LOOSEPLAIN]}$`);Jr(\"GTLT\",\"((?:<|>)?=?)\");Jr(\"XRANGEIDENTIFIERLOOSE\",`${rr[nr.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);Jr(\"XRANGEIDENTIFIER\",`${rr[nr.NUMERICIDENTIFIER]}|x|X|\\\\*`);Jr(\"XRANGEPLAIN\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:${rr[nr.PRERELEASE]})?${rr[nr.BUILD]}?)?)?`);Jr(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:${rr[nr.PRERELEASELOOSE]})?${rr[nr.BUILD]}?)?)?`);Jr(\"XRANGE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAIN]}$`);Jr(\"XRANGELOOSE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${P_}})(?:\\\\.(\\\\d{1,${P_}}))?(?:\\\\.(\\\\d{1,${P_}}))?`);Jr(\"COERCE\",`${rr[nr.COERCEPLAIN]}(?:$|[^\\\\d])`);Jr(\"COERCEFULL\",rr[nr.COERCEPLAIN]+`(?:${rr[nr.PRERELEASE]})?(?:${rr[nr.BUILD]})?(?:$|[^\\\\d])`);Jr(\"COERCERTL\",rr[nr.COERCE],!0);Jr(\"COERCERTLFULL\",rr[nr.COERCEFULL],!0);Jr(\"LONETILDE\",\"(?:~>?)\");Jr(\"TILDETRIM\",`(\\\\s*)${rr[nr.LONETILDE]}\\\\s+`,!0);Bp.tildeTrimReplace=\"$1~\";Jr(\"TILDE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAIN]}$`);Jr(\"TILDELOOSE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"LONECARET\",\"(?:\\\\^)\");Jr(\"CARETTRIM\",`(\\\\s*)${rr[nr.LONECARET]}\\\\s+`,!0);Bp.caretTrimReplace=\"$1^\";Jr(\"CARET\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAIN]}$`);Jr(\"CARETLOOSE\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"COMPARATORLOOSE\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]})$|^$`);Jr(\"COMPARATOR\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.FULLPLAIN]})$|^$`);Jr(\"COMPARATORTRIM\",`(\\\\s*)${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]}|${rr[nr.XRANGEPLAIN]})`,!0);Bp.comparatorTrimReplace=\"$1$2$3\";Jr(\"HYPHENRANGE\",`^\\\\s*(${rr[nr.XRANGEPLAIN]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAIN]})\\\\s*$`);Jr(\"HYPHENRANGELOOSE\",`^\\\\s*(${rr[nr.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAINLOOSE]})\\\\s*$`);Jr(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\");Jr(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");Jr(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")});var qx=_((eRt,Sne)=>{var nVe=Object.freeze({loose:!0}),iVe=Object.freeze({}),sVe=t=>t?typeof t!=\"object\"?nVe:t:iVe;Sne.exports=sVe});var k_=_((tRt,Pne)=>{var Dne=/^[0-9]+$/,bne=(t,e)=>{let r=Dne.test(t),s=Dne.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},oVe=(t,e)=>bne(e,t);Pne.exports={compareIdentifiers:bne,rcompareIdentifiers:oVe}});var jo=_((rRt,Tne)=>{var Wx=lB(),{MAX_LENGTH:xne,MAX_SAFE_INTEGER:Yx}=aB(),{safeRe:kne,t:Qne}=vE(),aVe=qx(),{compareIdentifiers:SE}=k_(),Q_=class t{constructor(e,r){if(r=aVe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!=\"string\")throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof e}\".`);if(e.length>xne)throw new TypeError(`version is longer than ${xne} characters`);Wx(\"SemVer\",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?kne[Qne.LOOSE]:kne[Qne.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Yx||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>Yx||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>Yx||this.patch<0)throw new TypeError(\"Invalid patch version\");s[4]?this.prerelease=s[4].split(\".\").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n<Yx)return n}return a}):this.prerelease=[],this.build=s[5]?s[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(Wx(\"SemVer.compare\",this.version,this.options,e),!(e instanceof t)){if(typeof e==\"string\"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),SE(this.major,e.major)||SE(this.minor,e.minor)||SE(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],a=e.prerelease[r];if(Wx(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],a=e.build[r];if(Wx(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}inc(e,r,s){switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",r,s);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",r,s);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"prerelease\":this.prerelease.length===0&&this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"major\":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case\"pre\":{let a=Number(s)?1:0;if(!r&&s===!1)throw new Error(\"invalid increment argument: identifier is empty\");if(this.prerelease.length===0)this.prerelease=[a];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]==\"number\"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(\".\")&&s===!1)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(a)}}if(r){let n=[r,a];s===!1&&(n=[r]),SE(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}};Tne.exports=Q_});var Md=_((nRt,Fne)=>{var Rne=jo(),lVe=(t,e,r=!1)=>{if(t instanceof Rne)return t;try{return new Rne(t,e)}catch(s){if(!r)return null;throw s}};Fne.exports=lVe});var One=_((iRt,Nne)=>{var cVe=Md(),uVe=(t,e)=>{let r=cVe(t,e);return r?r.version:null};Nne.exports=uVe});var Mne=_((sRt,Lne)=>{var fVe=Md(),AVe=(t,e)=>{let r=fVe(t.trim().replace(/^[=v]+/,\"\"),e);return r?r.version:null};Lne.exports=AVe});var Hne=_((oRt,_ne)=>{var Une=jo(),pVe=(t,e,r,s,a)=>{typeof r==\"string\"&&(a=s,s=r,r=void 0);try{return new Une(t instanceof Une?t.version:t,r).inc(e,s,a).version}catch{return null}};_ne.exports=pVe});var qne=_((aRt,Gne)=>{var jne=Md(),hVe=(t,e)=>{let r=jne(t,null,!0),s=jne(e,null,!0),a=r.compare(s);if(a===0)return null;let n=a>0,c=n?r:s,f=n?s:r,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p)return!f.patch&&!f.minor?\"major\":c.patch?\"patch\":c.minor?\"minor\":\"major\";let E=p?\"pre\":\"\";return r.major!==s.major?E+\"major\":r.minor!==s.minor?E+\"minor\":r.patch!==s.patch?E+\"patch\":\"prerelease\"};Gne.exports=hVe});var Yne=_((lRt,Wne)=>{var gVe=jo(),dVe=(t,e)=>new gVe(t,e).major;Wne.exports=dVe});var Jne=_((cRt,Vne)=>{var mVe=jo(),yVe=(t,e)=>new mVe(t,e).minor;Vne.exports=yVe});var zne=_((uRt,Kne)=>{var EVe=jo(),IVe=(t,e)=>new EVe(t,e).patch;Kne.exports=IVe});var Zne=_((fRt,Xne)=>{var CVe=Md(),wVe=(t,e)=>{let r=CVe(t,e);return r&&r.prerelease.length?r.prerelease:null};Xne.exports=wVe});var Bc=_((ARt,eie)=>{var $ne=jo(),BVe=(t,e,r)=>new $ne(t,r).compare(new $ne(e,r));eie.exports=BVe});var rie=_((pRt,tie)=>{var vVe=Bc(),SVe=(t,e,r)=>vVe(e,t,r);tie.exports=SVe});var iie=_((hRt,nie)=>{var DVe=Bc(),bVe=(t,e)=>DVe(t,e,!0);nie.exports=bVe});var Vx=_((gRt,oie)=>{var sie=jo(),PVe=(t,e,r)=>{let s=new sie(t,r),a=new sie(e,r);return s.compare(a)||s.compareBuild(a)};oie.exports=PVe});var lie=_((dRt,aie)=>{var xVe=Vx(),kVe=(t,e)=>t.sort((r,s)=>xVe(r,s,e));aie.exports=kVe});var uie=_((mRt,cie)=>{var QVe=Vx(),TVe=(t,e)=>t.sort((r,s)=>QVe(s,r,e));cie.exports=TVe});var cB=_((yRt,fie)=>{var RVe=Bc(),FVe=(t,e,r)=>RVe(t,e,r)>0;fie.exports=FVe});var Jx=_((ERt,Aie)=>{var NVe=Bc(),OVe=(t,e,r)=>NVe(t,e,r)<0;Aie.exports=OVe});var T_=_((IRt,pie)=>{var LVe=Bc(),MVe=(t,e,r)=>LVe(t,e,r)===0;pie.exports=MVe});var R_=_((CRt,hie)=>{var UVe=Bc(),_Ve=(t,e,r)=>UVe(t,e,r)!==0;hie.exports=_Ve});var Kx=_((wRt,gie)=>{var HVe=Bc(),jVe=(t,e,r)=>HVe(t,e,r)>=0;gie.exports=jVe});var zx=_((BRt,die)=>{var GVe=Bc(),qVe=(t,e,r)=>GVe(t,e,r)<=0;die.exports=qVe});var F_=_((vRt,mie)=>{var WVe=T_(),YVe=R_(),VVe=cB(),JVe=Kx(),KVe=Jx(),zVe=zx(),XVe=(t,e,r,s)=>{switch(e){case\"===\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t===r;case\"!==\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t!==r;case\"\":case\"=\":case\"==\":return WVe(t,r,s);case\"!=\":return YVe(t,r,s);case\">\":return VVe(t,r,s);case\">=\":return JVe(t,r,s);case\"<\":return KVe(t,r,s);case\"<=\":return zVe(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};mie.exports=XVe});var Eie=_((SRt,yie)=>{var ZVe=jo(),$Ve=Md(),{safeRe:Xx,t:Zx}=vE(),e7e=(t,e)=>{if(t instanceof ZVe)return t;if(typeof t==\"number\"&&(t=String(t)),typeof t!=\"string\")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Xx[Zx.COERCEFULL]:Xx[Zx.COERCE]);else{let p=e.includePrerelease?Xx[Zx.COERCERTLFULL]:Xx[Zx.COERCERTL],h;for(;(h=p.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||h.index+h[0].length!==r.index+r[0].length)&&(r=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(r===null)return null;let s=r[2],a=r[3]||\"0\",n=r[4]||\"0\",c=e.includePrerelease&&r[5]?`-${r[5]}`:\"\",f=e.includePrerelease&&r[6]?`+${r[6]}`:\"\";return $Ve(`${s}.${a}.${n}${c}${f}`,e)};yie.exports=e7e});var Cie=_((DRt,Iie)=>{\"use strict\";Iie.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var $x=_((bRt,wie)=>{\"use strict\";wie.exports=Fn;Fn.Node=Ud;Fn.create=Fn;function Fn(t){var e=this;if(e instanceof Fn||(e=new Fn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach==\"function\")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}Fn.prototype.removeNode=function(t){if(t.list!==this)throw new Error(\"removing node which does not belong to this list\");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Fn.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Fn.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Fn.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)r7e(this,arguments[t]);return this.length};Fn.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)n7e(this,arguments[t]);return this.length};Fn.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Fn.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Fn.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};Fn.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};Fn.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Fn.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Fn.prototype.map=function(t,e){e=e||this;for(var r=new Fn,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};Fn.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Fn,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};Fn.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=0;s!==null;a++)r=t(r,s.value,a),s=s.next;return r};Fn.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=this.length-1;s!==null;a--)r=t(r,s.value,a),s=s.prev;return r};Fn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Fn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Fn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(;a!==null&&s<e;s++,a=a.next)r.push(a.value);return r};Fn.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,a=this.tail;a!==null&&s>e;s--)a=a.prev;for(;a!==null&&s>t;s--,a=a.prev)r.push(a.value);return r};Fn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(var n=[],s=0;a&&s<e;s++)n.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var s=0;s<r.length;s++)a=t7e(this,a,r[s]);return n};Fn.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function t7e(t,e,r){var s=e===t.head?new Ud(r,null,e,t):new Ud(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function r7e(t,e){t.tail=new Ud(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function n7e(t,e){t.head=new Ud(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Ud(t,e,r,s){if(!(this instanceof Ud))return new Ud(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Cie()(Fn)}catch{}});var bie=_((PRt,Die)=>{\"use strict\";var i7e=$x(),_d=Symbol(\"max\"),Sp=Symbol(\"length\"),DE=Symbol(\"lengthCalculator\"),fB=Symbol(\"allowStale\"),Hd=Symbol(\"maxAge\"),vp=Symbol(\"dispose\"),Bie=Symbol(\"noDisposeOnSet\"),Gs=Symbol(\"lruList\"),Lu=Symbol(\"cache\"),Sie=Symbol(\"updateAgeOnGet\"),N_=()=>1,L_=class{constructor(e){if(typeof e==\"number\"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!=\"number\"||e.max<0))throw new TypeError(\"max must be a non-negative number\");let r=this[_d]=e.max||1/0,s=e.length||N_;if(this[DE]=typeof s!=\"function\"?N_:s,this[fB]=e.stale||!1,e.maxAge&&typeof e.maxAge!=\"number\")throw new TypeError(\"maxAge must be a number\");this[Hd]=e.maxAge||0,this[vp]=e.dispose,this[Bie]=e.noDisposeOnSet||!1,this[Sie]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!=\"number\"||e<0)throw new TypeError(\"max must be a non-negative number\");this[_d]=e||1/0,uB(this)}get max(){return this[_d]}set allowStale(e){this[fB]=!!e}get allowStale(){return this[fB]}set maxAge(e){if(typeof e!=\"number\")throw new TypeError(\"maxAge must be a non-negative number\");this[Hd]=e,uB(this)}get maxAge(){return this[Hd]}set lengthCalculator(e){typeof e!=\"function\"&&(e=N_),e!==this[DE]&&(this[DE]=e,this[Sp]=0,this[Gs].forEach(r=>{r.length=this[DE](r.value,r.key),this[Sp]+=r.length})),uB(this)}get lengthCalculator(){return this[DE]}get length(){return this[Sp]}get itemCount(){return this[Gs].length}rforEach(e,r){r=r||this;for(let s=this[Gs].tail;s!==null;){let a=s.prev;vie(this,e,s,r),s=a}}forEach(e,r){r=r||this;for(let s=this[Gs].head;s!==null;){let a=s.next;vie(this,e,s,r),s=a}}keys(){return this[Gs].toArray().map(e=>e.key)}values(){return this[Gs].toArray().map(e=>e.value)}reset(){this[vp]&&this[Gs]&&this[Gs].length&&this[Gs].forEach(e=>this[vp](e.key,e.value)),this[Lu]=new Map,this[Gs]=new i7e,this[Sp]=0}dump(){return this[Gs].map(e=>ek(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Gs]}set(e,r,s){if(s=s||this[Hd],s&&typeof s!=\"number\")throw new TypeError(\"maxAge must be a number\");let a=s?Date.now():0,n=this[DE](r,e);if(this[Lu].has(e)){if(n>this[_d])return bE(this,this[Lu].get(e)),!1;let p=this[Lu].get(e).value;return this[vp]&&(this[Bie]||this[vp](e,p.value)),p.now=a,p.maxAge=s,p.value=r,this[Sp]+=n-p.length,p.length=n,this.get(e),uB(this),!0}let c=new M_(e,r,n,a,s);return c.length>this[_d]?(this[vp]&&this[vp](e,r),!1):(this[Sp]+=c.length,this[Gs].unshift(c),this[Lu].set(e,this[Gs].head),uB(this),!0)}has(e){if(!this[Lu].has(e))return!1;let r=this[Lu].get(e).value;return!ek(this,r)}get(e){return O_(this,e,!0)}peek(e){return O_(this,e,!1)}pop(){let e=this[Gs].tail;return e?(bE(this,e),e.value):null}del(e){bE(this,this[Lu].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let a=e[s],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let c=n-r;c>0&&this.set(a.k,a.v,c)}}}prune(){this[Lu].forEach((e,r)=>O_(this,r,!1))}},O_=(t,e,r)=>{let s=t[Lu].get(e);if(s){let a=s.value;if(ek(t,a)){if(bE(t,s),!t[fB])return}else r&&(t[Sie]&&(s.value.now=Date.now()),t[Gs].unshiftNode(s));return a.value}},ek=(t,e)=>{if(!e||!e.maxAge&&!t[Hd])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Hd]&&r>t[Hd]},uB=t=>{if(t[Sp]>t[_d])for(let e=t[Gs].tail;t[Sp]>t[_d]&&e!==null;){let r=e.prev;bE(t,e),e=r}},bE=(t,e)=>{if(e){let r=e.value;t[vp]&&t[vp](r.key,r.value),t[Sp]-=r.length,t[Lu].delete(r.key),t[Gs].removeNode(e)}},M_=class{constructor(e,r,s,a,n){this.key=e,this.value=r,this.length=s,this.now=a,this.maxAge=n||0}},vie=(t,e,r,s)=>{let a=r.value;ek(t,a)&&(bE(t,r),t[fB]||(a=void 0)),a&&e.call(s,a.value,a.key,t)};Die.exports=L_});var vc=_((xRt,Qie)=>{var U_=class t{constructor(e,r){if(r=o7e(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof __)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\\s+/).join(\" \"),this.set=this.raw.split(\"||\").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(a=>!xie(a[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&p7e(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(\" \").trim()).join(\"||\").trim(),this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&f7e)|(this.options.loose&&A7e))+\":\"+e,a=Pie.get(s);if(a)return a;let n=this.options.loose,c=n?sl[wa.HYPHENRANGELOOSE]:sl[wa.HYPHENRANGE];e=e.replace(c,B7e(this.options.includePrerelease)),vi(\"hyphen replace\",e),e=e.replace(sl[wa.COMPARATORTRIM],l7e),vi(\"comparator trim\",e),e=e.replace(sl[wa.TILDETRIM],c7e),vi(\"tilde trim\",e),e=e.replace(sl[wa.CARETTRIM],u7e),vi(\"caret trim\",e);let f=e.split(\" \").map(C=>h7e(C,this.options)).join(\" \").split(/\\s+/).map(C=>w7e(C,this.options));n&&(f=f.filter(C=>(vi(\"loose invalid filter\",C,this.options),!!C.match(sl[wa.COMPARATORLOOSE])))),vi(\"range list\",f);let p=new Map,h=f.map(C=>new __(C,this.options));for(let C of h){if(xie(C))return[C];p.set(C.value,C)}p.size>1&&p.has(\"\")&&p.delete(\"\");let E=[...p.values()];return Pie.set(s,E),E}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Range is required\");return this.set.some(s=>kie(s,r)&&e.set.some(a=>kie(a,r)&&s.every(n=>a.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e==\"string\")try{e=new a7e(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(v7e(this.set[r],e,this.options))return!0;return!1}};Qie.exports=U_;var s7e=bie(),Pie=new s7e({max:1e3}),o7e=qx(),__=AB(),vi=lB(),a7e=jo(),{safeRe:sl,t:wa,comparatorTrimReplace:l7e,tildeTrimReplace:c7e,caretTrimReplace:u7e}=vE(),{FLAG_INCLUDE_PRERELEASE:f7e,FLAG_LOOSE:A7e}=aB(),xie=t=>t.value===\"<0.0.0-0\",p7e=t=>t.value===\"\",kie=(t,e)=>{let r=!0,s=t.slice(),a=s.pop();for(;r&&s.length;)r=s.every(n=>a.intersects(n,e)),a=s.pop();return r},h7e=(t,e)=>(vi(\"comp\",t,e),t=m7e(t,e),vi(\"caret\",t),t=g7e(t,e),vi(\"tildes\",t),t=E7e(t,e),vi(\"xrange\",t),t=C7e(t,e),vi(\"stars\",t),t),Ba=t=>!t||t.toLowerCase()===\"x\"||t===\"*\",g7e=(t,e)=>t.trim().split(/\\s+/).map(r=>d7e(r,e)).join(\" \"),d7e=(t,e)=>{let r=e.loose?sl[wa.TILDELOOSE]:sl[wa.TILDE];return t.replace(r,(s,a,n,c,f)=>{vi(\"tilde\",t,s,a,n,c,f);let p;return Ba(a)?p=\"\":Ba(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:Ba(c)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:f?(vi(\"replaceTilde pr\",f),p=`>=${a}.${n}.${c}-${f} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${c} <${a}.${+n+1}.0-0`,vi(\"tilde return\",p),p})},m7e=(t,e)=>t.trim().split(/\\s+/).map(r=>y7e(r,e)).join(\" \"),y7e=(t,e)=>{vi(\"caret\",t,e);let r=e.loose?sl[wa.CARETLOOSE]:sl[wa.CARET],s=e.includePrerelease?\"-0\":\"\";return t.replace(r,(a,n,c,f,p)=>{vi(\"caret\",t,a,n,c,f,p);let h;return Ba(n)?h=\"\":Ba(c)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:Ba(f)?n===\"0\"?h=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:p?(vi(\"replaceCaret pr\",p),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}-${p} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}-${p} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f}-${p} <${+n+1}.0.0-0`):(vi(\"no pr\"),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}${s} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f} <${+n+1}.0.0-0`),vi(\"caret return\",h),h})},E7e=(t,e)=>(vi(\"replaceXRanges\",t,e),t.split(/\\s+/).map(r=>I7e(r,e)).join(\" \")),I7e=(t,e)=>{t=t.trim();let r=e.loose?sl[wa.XRANGELOOSE]:sl[wa.XRANGE];return t.replace(r,(s,a,n,c,f,p)=>{vi(\"xRange\",t,s,a,n,c,f,p);let h=Ba(n),E=h||Ba(c),C=E||Ba(f),S=C;return a===\"=\"&&S&&(a=\"\"),p=e.includePrerelease?\"-0\":\"\",h?a===\">\"||a===\"<\"?s=\"<0.0.0-0\":s=\"*\":a&&S?(E&&(c=0),f=0,a===\">\"?(a=\">=\",E?(n=+n+1,c=0,f=0):(c=+c+1,f=0)):a===\"<=\"&&(a=\"<\",E?n=+n+1:c=+c+1),a===\"<\"&&(p=\"-0\"),s=`${a+n}.${c}.${f}${p}`):E?s=`>=${n}.0.0${p} <${+n+1}.0.0-0`:C&&(s=`>=${n}.${c}.0${p} <${n}.${+c+1}.0-0`),vi(\"xRange return\",s),s})},C7e=(t,e)=>(vi(\"replaceStars\",t,e),t.trim().replace(sl[wa.STAR],\"\")),w7e=(t,e)=>(vi(\"replaceGTE0\",t,e),t.trim().replace(sl[e.includePrerelease?wa.GTE0PRE:wa.GTE0],\"\")),B7e=t=>(e,r,s,a,n,c,f,p,h,E,C,S,P)=>(Ba(s)?r=\"\":Ba(a)?r=`>=${s}.0.0${t?\"-0\":\"\"}`:Ba(n)?r=`>=${s}.${a}.0${t?\"-0\":\"\"}`:c?r=`>=${r}`:r=`>=${r}${t?\"-0\":\"\"}`,Ba(h)?p=\"\":Ba(E)?p=`<${+h+1}.0.0-0`:Ba(C)?p=`<${h}.${+E+1}.0-0`:S?p=`<=${h}.${E}.${C}-${S}`:t?p=`<${h}.${E}.${+C+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),v7e=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(vi(t[s].semver),t[s].semver!==__.ANY&&t[s].semver.prerelease.length>0){let a=t[s].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var AB=_((kRt,Lie)=>{var pB=Symbol(\"SemVer ANY\"),G_=class t{static get ANY(){return pB}constructor(e,r){if(r=Tie(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\\s+/).join(\" \"),j_(\"comparator\",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===pB?this.value=\"\":this.value=this.operator+this.semver.version,j_(\"comp\",this)}parse(e){let r=this.options.loose?Rie[Fie.COMPARATORLOOSE]:Rie[Fie.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:\"\",this.operator===\"=\"&&(this.operator=\"\"),s[2]?this.semver=new Nie(s[2],this.options.loose):this.semver=pB}toString(){return this.value}test(e){if(j_(\"Comparator.test\",e,this.options.loose),this.semver===pB||e===pB)return!0;if(typeof e==\"string\")try{e=new Nie(e,this.options)}catch{return!1}return H_(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Comparator is required\");return this.operator===\"\"?this.value===\"\"?!0:new Oie(e.value,r).test(this.value):e.operator===\"\"?e.value===\"\"?!0:new Oie(this.value,r).test(e.semver):(r=Tie(r),r.includePrerelease&&(this.value===\"<0.0.0-0\"||e.value===\"<0.0.0-0\")||!r.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||e.value.startsWith(\"<0.0.0\"))?!1:!!(this.operator.startsWith(\">\")&&e.operator.startsWith(\">\")||this.operator.startsWith(\"<\")&&e.operator.startsWith(\"<\")||this.semver.version===e.semver.version&&this.operator.includes(\"=\")&&e.operator.includes(\"=\")||H_(this.semver,\"<\",e.semver,r)&&this.operator.startsWith(\">\")&&e.operator.startsWith(\"<\")||H_(this.semver,\">\",e.semver,r)&&this.operator.startsWith(\"<\")&&e.operator.startsWith(\">\")))}};Lie.exports=G_;var Tie=qx(),{safeRe:Rie,t:Fie}=vE(),H_=F_(),j_=lB(),Nie=jo(),Oie=vc()});var hB=_((QRt,Mie)=>{var S7e=vc(),D7e=(t,e,r)=>{try{e=new S7e(e,r)}catch{return!1}return e.test(t)};Mie.exports=D7e});var _ie=_((TRt,Uie)=>{var b7e=vc(),P7e=(t,e)=>new b7e(t,e).set.map(r=>r.map(s=>s.value).join(\" \").trim().split(\" \"));Uie.exports=P7e});var jie=_((RRt,Hie)=>{var x7e=jo(),k7e=vc(),Q7e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new k7e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new x7e(s,r))}),s};Hie.exports=Q7e});var qie=_((FRt,Gie)=>{var T7e=jo(),R7e=vc(),F7e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new R7e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new T7e(s,r))}),s};Gie.exports=F7e});var Vie=_((NRt,Yie)=>{var q_=jo(),N7e=vc(),Wie=cB(),O7e=(t,e)=>{t=new N7e(t,e);let r=new q_(\"0.0.0\");if(t.test(r)||(r=new q_(\"0.0.0-0\"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let a=t.set[s],n=null;a.forEach(c=>{let f=new q_(c.semver.version);switch(c.operator){case\">\":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case\"\":case\">=\":(!n||Wie(f,n))&&(n=f);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||Wie(r,n))&&(r=n)}return r&&t.test(r)?r:null};Yie.exports=O7e});var Kie=_((ORt,Jie)=>{var L7e=vc(),M7e=(t,e)=>{try{return new L7e(t,e).range||\"*\"}catch{return null}};Jie.exports=M7e});var tk=_((LRt,$ie)=>{var U7e=jo(),Zie=AB(),{ANY:_7e}=Zie,H7e=vc(),j7e=hB(),zie=cB(),Xie=Jx(),G7e=zx(),q7e=Kx(),W7e=(t,e,r,s)=>{t=new U7e(t,s),e=new H7e(e,s);let a,n,c,f,p;switch(r){case\">\":a=zie,n=G7e,c=Xie,f=\">\",p=\">=\";break;case\"<\":a=Xie,n=q7e,c=zie,f=\"<\",p=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(j7e(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let E=e.set[h],C=null,S=null;if(E.forEach(P=>{P.semver===_7e&&(P=new Zie(\">=0.0.0\")),C=C||P,S=S||P,a(P.semver,C.semver,s)?C=P:c(P.semver,S.semver,s)&&(S=P)}),C.operator===f||C.operator===p||(!S.operator||S.operator===f)&&n(t,S.semver))return!1;if(S.operator===p&&c(t,S.semver))return!1}return!0};$ie.exports=W7e});var tse=_((MRt,ese)=>{var Y7e=tk(),V7e=(t,e,r)=>Y7e(t,e,\">\",r);ese.exports=V7e});var nse=_((URt,rse)=>{var J7e=tk(),K7e=(t,e,r)=>J7e(t,e,\"<\",r);rse.exports=K7e});var ose=_((_Rt,sse)=>{var ise=vc(),z7e=(t,e,r)=>(t=new ise(t,r),e=new ise(e,r),t.intersects(e,r));sse.exports=z7e});var lse=_((HRt,ase)=>{var X7e=hB(),Z7e=Bc();ase.exports=(t,e,r)=>{let s=[],a=null,n=null,c=t.sort((E,C)=>Z7e(E,C,r));for(let E of c)X7e(E,e,r)?(n=E,a||(a=E)):(n&&s.push([a,n]),n=null,a=null);a&&s.push([a,null]);let f=[];for(let[E,C]of s)E===C?f.push(E):!C&&E===c[0]?f.push(\"*\"):C?E===c[0]?f.push(`<=${C}`):f.push(`${E} - ${C}`):f.push(`>=${E}`);let p=f.join(\" || \"),h=typeof e.raw==\"string\"?e.raw:String(e);return p.length<h.length?p:e}});var hse=_((jRt,pse)=>{var cse=vc(),Y_=AB(),{ANY:W_}=Y_,gB=hB(),V_=Bc(),$7e=(t,e,r={})=>{if(t===e)return!0;t=new cse(t,r),e=new cse(e,r);let s=!1;e:for(let a of t.set){for(let n of e.set){let c=tJe(a,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},eJe=[new Y_(\">=0.0.0-0\")],use=[new Y_(\">=0.0.0\")],tJe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===W_){if(e.length===1&&e[0].semver===W_)return!0;r.includePrerelease?t=eJe:t=use}if(e.length===1&&e[0].semver===W_){if(r.includePrerelease)return!0;e=use}let s=new Set,a,n;for(let P of t)P.operator===\">\"||P.operator===\">=\"?a=fse(a,P,r):P.operator===\"<\"||P.operator===\"<=\"?n=Ase(n,P,r):s.add(P.semver);if(s.size>1)return null;let c;if(a&&n){if(c=V_(a.semver,n.semver,r),c>0)return null;if(c===0&&(a.operator!==\">=\"||n.operator!==\"<=\"))return null}for(let P of s){if(a&&!gB(P,String(a),r)||n&&!gB(P,String(n),r))return null;for(let I of e)if(!gB(P,String(I),r))return!1;return!0}let f,p,h,E,C=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;C&&C.prerelease.length===1&&n.operator===\"<\"&&C.prerelease[0]===0&&(C=!1);for(let P of e){if(E=E||P.operator===\">\"||P.operator===\">=\",h=h||P.operator===\"<\"||P.operator===\"<=\",a){if(S&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===S.major&&P.semver.minor===S.minor&&P.semver.patch===S.patch&&(S=!1),P.operator===\">\"||P.operator===\">=\"){if(f=fse(a,P,r),f===P&&f!==a)return!1}else if(a.operator===\">=\"&&!gB(a.semver,String(P),r))return!1}if(n){if(C&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===C.major&&P.semver.minor===C.minor&&P.semver.patch===C.patch&&(C=!1),P.operator===\"<\"||P.operator===\"<=\"){if(p=Ase(n,P,r),p===P&&p!==n)return!1}else if(n.operator===\"<=\"&&!gB(n.semver,String(P),r))return!1}if(!P.operator&&(n||a)&&c!==0)return!1}return!(a&&h&&!n&&c!==0||n&&E&&!a&&c!==0||S||C)},fse=(t,e,r)=>{if(!t)return e;let s=V_(t.semver,e.semver,r);return s>0?t:s<0||e.operator===\">\"&&t.operator===\">=\"?e:t},Ase=(t,e,r)=>{if(!t)return e;let s=V_(t.semver,e.semver,r);return s<0?t:s>0||e.operator===\"<\"&&t.operator===\"<=\"?e:t};pse.exports=$7e});var Ai=_((GRt,mse)=>{var J_=vE(),gse=aB(),rJe=jo(),dse=k_(),nJe=Md(),iJe=One(),sJe=Mne(),oJe=Hne(),aJe=qne(),lJe=Yne(),cJe=Jne(),uJe=zne(),fJe=Zne(),AJe=Bc(),pJe=rie(),hJe=iie(),gJe=Vx(),dJe=lie(),mJe=uie(),yJe=cB(),EJe=Jx(),IJe=T_(),CJe=R_(),wJe=Kx(),BJe=zx(),vJe=F_(),SJe=Eie(),DJe=AB(),bJe=vc(),PJe=hB(),xJe=_ie(),kJe=jie(),QJe=qie(),TJe=Vie(),RJe=Kie(),FJe=tk(),NJe=tse(),OJe=nse(),LJe=ose(),MJe=lse(),UJe=hse();mse.exports={parse:nJe,valid:iJe,clean:sJe,inc:oJe,diff:aJe,major:lJe,minor:cJe,patch:uJe,prerelease:fJe,compare:AJe,rcompare:pJe,compareLoose:hJe,compareBuild:gJe,sort:dJe,rsort:mJe,gt:yJe,lt:EJe,eq:IJe,neq:CJe,gte:wJe,lte:BJe,cmp:vJe,coerce:SJe,Comparator:DJe,Range:bJe,satisfies:PJe,toComparators:xJe,maxSatisfying:kJe,minSatisfying:QJe,minVersion:TJe,validRange:RJe,outside:FJe,gtr:NJe,ltr:OJe,intersects:LJe,simplifyRange:MJe,subset:UJe,SemVer:rJe,re:J_.re,src:J_.src,tokens:J_.t,SEMVER_SPEC_VERSION:gse.SEMVER_SPEC_VERSION,RELEASE_TYPES:gse.RELEASE_TYPES,compareIdentifiers:dse.compareIdentifiers,rcompareIdentifiers:dse.rcompareIdentifiers}});var Ese=_((qRt,yse)=>{\"use strict\";function _Je(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function jd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,jd)}_Je(jd,Error);jd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function HJe(t,e){e=e!==void 0?e:{};var r={},s={Expression:y},a=y,n=\"|\",c=Fe(\"|\",!1),f=\"&\",p=Fe(\"&\",!1),h=\"^\",E=Fe(\"^\",!1),C=function($,oe){return!!oe.reduce((xe,Te)=>{switch(Te[1]){case\"|\":return xe|Te[3];case\"&\":return xe&Te[3];case\"^\":return xe^Te[3]}},$)},S=\"!\",P=Fe(\"!\",!1),I=function($){return!$},R=\"(\",N=Fe(\"(\",!1),U=\")\",W=Fe(\")\",!1),ee=function($){return $},ie=/^[^ \\t\\n\\r()!|&\\^]/,ue=Ne([\" \",\"\t\",`\n`,\"\\r\",\"(\",\")\",\"!\",\"|\",\"&\",\"^\"],!0,!1),le=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke(\"whitespace\"),Be=/^[ \\t\\n\\r]/,Ce=Ne([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),g=0,we=0,ye=[{line:1,column:1}],Ae=0,se=[],Z=0,De;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Re(){return t.substring(we,g)}function mt(){return Ue(we,g)}function j($,oe){throw oe=oe!==void 0?oe:Ue(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:Ue(we,g),w($,oe)}function Fe($,oe){return{type:\"literal\",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:\"class\",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:\"any\"}}function Ve(){return{type:\"end\"}}function ke($){return{type:\"other\",description:$}}function it($){var oe=ye[$],xe;if(oe)return oe;for(xe=$-1;!ye[xe];)xe--;for(oe=ye[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return ye[$]=oe,oe}function Ue($,oe){var xe=it($),Te=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Te.line,column:Te.column}}}function x($){g<Ae||(g>Ae&&(Ae=g,se=[]),se.push($))}function w($,oe){return new jd($,null,null,oe)}function b($,oe,xe){return new jd(jd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Te,lt,Ct,qt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Te=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&x(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&x(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&x(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);Te!==r;)xe.push(Te),Te=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&x(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&x(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&x(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);xe!==r?(we=$,oe=C(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Te,lt,Ct;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,Z===0&&x(P)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=R,g++):(oe=r,Z===0&&x(N)),oe!==r?(xe=X(),xe!==r?(Te=y(),Te!==r?(lt=X(),lt!==r?(t.charCodeAt(g)===41?(Ct=U,g++):(Ct=r,Z===0&&x(W)),Ct!==r?(we=$,oe=ee(Te),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Te,lt;if($=g,oe=X(),oe!==r){if(xe=g,Te=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ue)),lt!==r)for(;lt!==r;)Te.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ue));else Te=r;Te!==r?xe=t.substring(xe,g):xe=Te,xe!==r?(we=g,Te=le(xe),Te?Te=void 0:Te=r,Te!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,oe;for(Z++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,Z===0&&x(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,Z===0&&x(Ce));return Z--,$===r&&(oe=r,Z===0&&x(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g<t.length&&x(Ve()),b(se,Ae<t.length?t.charAt(Ae):null,Ae<t.length?Ue(Ae,Ae+1):Ue(Ae,Ae))}yse.exports={SyntaxError:jd,parse:HJe}});var Ise=_(rk=>{var{parse:jJe}=Ese();rk.makeParser=(t=/[a-z]+/)=>(e,r)=>jJe(e,{queryPattern:t,checkFn:r});rk.parse=rk.makeParser()});var wse=_((YRt,Cse)=>{\"use strict\";Cse.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var K_=_((VRt,vse)=>{var dB=wse(),Bse={};for(let t of Object.keys(dB))Bse[dB[t]]=t;var hr={rgb:{channels:3,labels:\"rgb\"},hsl:{channels:3,labels:\"hsl\"},hsv:{channels:3,labels:\"hsv\"},hwb:{channels:3,labels:\"hwb\"},cmyk:{channels:4,labels:\"cmyk\"},xyz:{channels:3,labels:\"xyz\"},lab:{channels:3,labels:\"lab\"},lch:{channels:3,labels:\"lch\"},hex:{channels:1,labels:[\"hex\"]},keyword:{channels:1,labels:[\"keyword\"]},ansi16:{channels:1,labels:[\"ansi16\"]},ansi256:{channels:1,labels:[\"ansi256\"]},hcg:{channels:3,labels:[\"h\",\"c\",\"g\"]},apple:{channels:3,labels:[\"r16\",\"g16\",\"b16\"]},gray:{channels:1,labels:[\"gray\"]}};vse.exports=hr;for(let t of Object.keys(hr)){if(!(\"channels\"in hr[t]))throw new Error(\"missing channels property: \"+t);if(!(\"labels\"in hr[t]))throw new Error(\"missing channel labels property: \"+t);if(hr[t].labels.length!==hr[t].channels)throw new Error(\"channel and label counts mismatch: \"+t);let{channels:e,labels:r}=hr[t];delete hr[t].channels,delete hr[t].labels,Object.defineProperty(hr[t],\"channels\",{value:e}),Object.defineProperty(hr[t],\"labels\",{value:r})}hr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(e,r,s),n=Math.max(e,r,s),c=n-a,f,p;n===a?f=0:e===n?f=(r-s)/c:r===n?f=2+(s-e)/c:s===n&&(f=4+(e-r)/c),f=Math.min(f*60,360),f<0&&(f+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=c/(n+a):p=c/(2-n-a),[f,p*100,h*100]};hr.rgb.hsv=function(t){let e,r,s,a,n,c=t[0]/255,f=t[1]/255,p=t[2]/255,h=Math.max(c,f,p),E=h-Math.min(c,f,p),C=function(S){return(h-S)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=C(c),r=C(f),s=C(p),c===h?a=s-r:f===h?a=1/3+e-s:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};hr.rgb.hwb=function(t){let e=t[0],r=t[1],s=t[2],a=hr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[a,n*100,s*100]};hr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(1-e,1-r,1-s),n=(1-e-a)/(1-a)||0,c=(1-r-a)/(1-a)||0,f=(1-s-a)/(1-a)||0;return[n*100,c*100,f*100,a*100]};function GJe(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}hr.rgb.keyword=function(t){let e=Bse[t];if(e)return e;let r=1/0,s;for(let a of Object.keys(dB)){let n=dB[a],c=GJe(t,n);c<r&&(r=c,s=a)}return s};hr.keyword.rgb=function(t){return dB[t]};hr.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;let a=e*.4124+r*.3576+s*.1805,n=e*.2126+r*.7152+s*.0722,c=e*.0193+r*.1192+s*.9505;return[a*100,n*100,c*100]};hr.rgb.lab=function(t){let e=hr.rgb.xyz(t),r=e[0],s=e[1],a=e[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*s-16,c=500*(r-s),f=200*(s-a);return[n,c,f]};hr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a,n,c;if(r===0)return c=s*255,[c,c,c];s<.5?a=s*(1+r):a=s+r-s*r;let f=2*s-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?c=f+(a-f)*6*n:2*n<1?c=a:3*n<2?c=f+(a-f)*(2/3-n)*6:c=f,p[h]=c*255;return p};hr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=r,n=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,a*=n<=1?n:2-n;let c=(s+r)/2,f=s===0?2*a/(n+a):2*r/(s+r);return[e,f*100,c*100]};hr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),c=255*s*(1-r),f=255*s*(1-r*n),p=255*s*(1-r*(1-n));switch(s*=255,a){case 0:return[s,p,c];case 1:return[f,s,c];case 2:return[c,s,p];case 3:return[c,f,s];case 4:return[p,c,s];case 5:return[s,c,f]}};hr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01),n,c;c=(2-r)*s;let f=(2-r)*a;return n=r*a,n/=f<=1?f:2-f,n=n||0,c/=2,[e,n*100,c*100]};hr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a=r+s,n;a>1&&(r/=a,s/=a);let c=Math.floor(6*e),f=1-s;n=6*e-c,c&1&&(n=1-n);let p=r+n*(f-r),h,E,C;switch(c){default:case 6:case 0:h=f,E=p,C=r;break;case 1:h=p,E=f,C=r;break;case 2:h=r,E=f,C=p;break;case 3:h=r,E=p,C=f;break;case 4:h=p,E=r,C=f;break;case 5:h=f,E=r,C=p;break}return[h*255,E*255,C*255]};hr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),c=1-Math.min(1,r*(1-a)+a),f=1-Math.min(1,s*(1-a)+a);return[n*255,c*255,f*255]};hr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a,n,c;return a=e*3.2406+r*-1.5372+s*-.4986,n=e*-.9689+r*1.8758+s*.0415,c=e*.0557+r*-.204+s*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),c=Math.min(Math.max(0,c),1),[a*255,n*255,c*255]};hr.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let a=116*r-16,n=500*(e-r),c=200*(r-s);return[a,n,c]};hr.lab.xyz=function(t){let e=t[0],r=t[1],s=t[2],a,n,c;n=(e+16)/116,a=r/500+n,c=n-s/200;let f=n**3,p=a**3,h=c**3;return n=f>.008856?f:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,a*=95.047,n*=100,c*=108.883,[a,n,c]};hr.lab.lch=function(t){let e=t[0],r=t[1],s=t[2],a;a=Math.atan2(s,r)*360/2/Math.PI,a<0&&(a+=360);let c=Math.sqrt(r*r+s*s);return[e,c,a]};hr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),c=r*Math.sin(a);return[e,n,c]};hr.rgb.ansi16=function(t,e=null){let[r,s,a]=t,n=e===null?hr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return n===2&&(c+=60),c};hr.hsv.ansi16=function(t){return hr.rgb.ansi16(hr.hsv.rgb(t),t[2])};hr.rgb.ansi256=function(t){let e=t[0],r=t[1],s=t[2];return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)};hr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,s=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[s,a,n]};hr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,s,a]};hr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return\"000000\".substring(r.length)+r};hr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split(\"\").map(f=>f+f).join(\"\"));let s=parseInt(r,16),a=s>>16&255,n=s>>8&255,c=s&255;return[a,n,c]};hr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(Math.max(e,r),s),n=Math.min(Math.min(e,r),s),c=a-n,f,p;return c<1?f=n/(1-c):f=0,c<=0?p=0:a===e?p=(r-s)/c%6:a===r?p=2+(s-e)/c:p=4+(e-r)/c,p/=6,p%=1,[p*360,c*100,f*100]};hr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r),a=0;return s<1&&(a=(r-.5*s)/(1-s)),[t[0],s*100,a*100]};hr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=e*r,a=0;return s<1&&(a=(r-s)/(1-s)),[t[0],s*100,a*100]};hr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];let a=[0,0,0],n=e%1*6,c=n%1,f=1-c,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=f,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=f,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=f}return p=(1-r)*s,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};hr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e),a=0;return s>0&&(a=e/s),[t[0],a*100,s*100]};hr.hcg.hsl=function(t){let e=t[1]/100,s=t[2]/100*(1-e)+.5*e,a=0;return s>0&&s<.5?a=e/(2*s):s>=.5&&s<1&&(a=e/(2*(1-s))),[t[0],a*100,s*100]};hr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]};hr.hwb.hcg=function(t){let e=t[1]/100,s=1-t[2]/100,a=s-e,n=0;return a<1&&(n=(s-a)/(1-a)),[t[0],a*100,n*100]};hr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};hr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};hr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};hr.gray.hsl=function(t){return[0,0,t[0]]};hr.gray.hsv=hr.gray.hsl;hr.gray.hwb=function(t){return[0,100,t[0]]};hr.gray.cmyk=function(t){return[0,0,0,t[0]]};hr.gray.lab=function(t){return[t[0],0,0]};hr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return\"000000\".substring(s.length)+s};hr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Dse=_((JRt,Sse)=>{var nk=K_();function qJe(){let t={},e=Object.keys(nk);for(let r=e.length,s=0;s<r;s++)t[e[s]]={distance:-1,parent:null};return t}function WJe(t){let e=qJe(),r=[t];for(e[t].distance=0;r.length;){let s=r.pop(),a=Object.keys(nk[s]);for(let n=a.length,c=0;c<n;c++){let f=a[c],p=e[f];p.distance===-1&&(p.distance=e[s].distance+1,p.parent=s,r.unshift(f))}}return e}function YJe(t,e){return function(r){return e(t(r))}}function VJe(t,e){let r=[e[t].parent,t],s=nk[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)r.unshift(e[a].parent),s=YJe(nk[e[a].parent][a],s),a=e[a].parent;return s.conversion=r,s}Sse.exports=function(t){let e=WJe(t),r={},s=Object.keys(e);for(let a=s.length,n=0;n<a;n++){let c=s[n];e[c].parent!==null&&(r[c]=VJe(c,e))}return r}});var Pse=_((KRt,bse)=>{var z_=K_(),JJe=Dse(),PE={},KJe=Object.keys(z_);function zJe(t){let e=function(...r){let s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return\"conversion\"in t&&(e.conversion=t.conversion),e}function XJe(t){let e=function(...r){let s=r[0];if(s==null)return s;s.length>1&&(r=s);let a=t(r);if(typeof a==\"object\")for(let n=a.length,c=0;c<n;c++)a[c]=Math.round(a[c]);return a};return\"conversion\"in t&&(e.conversion=t.conversion),e}KJe.forEach(t=>{PE[t]={},Object.defineProperty(PE[t],\"channels\",{value:z_[t].channels}),Object.defineProperty(PE[t],\"labels\",{value:z_[t].labels});let e=JJe(t);Object.keys(e).forEach(s=>{let a=e[s];PE[t][s]=XJe(a),PE[t][s].raw=zJe(a)})});bse.exports=PE});var sk=_((zRt,Rse)=>{\"use strict\";var xse=(t,e)=>(...r)=>`\\x1B[${t(...r)+e}m`,kse=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};5;${s}m`},Qse=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};2;${s[0]};${s[1]};${s[2]}m`},ik=t=>t,Tse=(t,e,r)=>[t,e,r],xE=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let s=r();return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0}),s},enumerable:!0,configurable:!0})},X_,kE=(t,e,r,s)=>{X_===void 0&&(X_=Pse());let a=s?10:0,n={};for(let[c,f]of Object.entries(X_)){let p=c===\"ansi16\"?\"ansi\":c;c===e?n[p]=t(r,a):typeof f==\"object\"&&(n[p]=t(f[e],a))}return n};function ZJe(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,s]of Object.entries(e)){for(let[a,n]of Object.entries(s))e[a]={open:`\\x1B[${n[0]}m`,close:`\\x1B[${n[1]}m`},s[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:s,enumerable:!1})}return Object.defineProperty(e,\"codes\",{value:t,enumerable:!1}),e.color.close=\"\\x1B[39m\",e.bgColor.close=\"\\x1B[49m\",xE(e.color,\"ansi\",()=>kE(xse,\"ansi16\",ik,!1)),xE(e.color,\"ansi256\",()=>kE(kse,\"ansi256\",ik,!1)),xE(e.color,\"ansi16m\",()=>kE(Qse,\"rgb\",Tse,!1)),xE(e.bgColor,\"ansi\",()=>kE(xse,\"ansi16\",ik,!0)),xE(e.bgColor,\"ansi256\",()=>kE(kse,\"ansi256\",ik,!0)),xE(e.bgColor,\"ansi16m\",()=>kE(Qse,\"rgb\",Tse,!0)),e}Object.defineProperty(Rse,\"exports\",{enumerable:!0,get:ZJe})});var Nse=_((XRt,Fse)=>{\"use strict\";Fse.exports=(t,e=process.argv)=>{let r=t.startsWith(\"-\")?\"\":t.length===1?\"-\":\"--\",s=e.indexOf(r+t),a=e.indexOf(\"--\");return s!==-1&&(a===-1||s<a)}});var Mse=_((ZRt,Lse)=>{\"use strict\";var $Je=Ie(\"os\"),Ose=Ie(\"tty\"),Sc=Nse(),{env:bs}=process,l0;Sc(\"no-color\")||Sc(\"no-colors\")||Sc(\"color=false\")||Sc(\"color=never\")?l0=0:(Sc(\"color\")||Sc(\"colors\")||Sc(\"color=true\")||Sc(\"color=always\"))&&(l0=1);\"FORCE_COLOR\"in bs&&(bs.FORCE_COLOR===\"true\"?l0=1:bs.FORCE_COLOR===\"false\"?l0=0:l0=bs.FORCE_COLOR.length===0?1:Math.min(parseInt(bs.FORCE_COLOR,10),3));function Z_(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function $_(t,e){if(l0===0)return 0;if(Sc(\"color=16m\")||Sc(\"color=full\")||Sc(\"color=truecolor\"))return 3;if(Sc(\"color=256\"))return 2;if(t&&!e&&l0===void 0)return 0;let r=l0||0;if(bs.TERM===\"dumb\")return r;if(process.platform===\"win32\"){let s=$Je.release().split(\".\");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if(\"CI\"in bs)return[\"TRAVIS\",\"CIRCLECI\",\"APPVEYOR\",\"GITLAB_CI\"].some(s=>s in bs)||bs.CI_NAME===\"codeship\"?1:r;if(\"TEAMCITY_VERSION\"in bs)return/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(bs.TEAMCITY_VERSION)?1:0;if(\"GITHUB_ACTIONS\"in bs)return 1;if(bs.COLORTERM===\"truecolor\")return 3;if(\"TERM_PROGRAM\"in bs){let s=parseInt((bs.TERM_PROGRAM_VERSION||\"\").split(\".\")[0],10);switch(bs.TERM_PROGRAM){case\"iTerm.app\":return s>=3?3:2;case\"Apple_Terminal\":return 2}}return/-256(color)?$/i.test(bs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(bs.TERM)||\"COLORTERM\"in bs?1:r}function eKe(t){let e=$_(t,t&&t.isTTY);return Z_(e)}Lse.exports={supportsColor:eKe,stdout:Z_($_(!0,Ose.isatty(1))),stderr:Z_($_(!0,Ose.isatty(2)))}});var _se=_(($Rt,Use)=>{\"use strict\";var tKe=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c=\"\";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},rKe=(t,e,r,s)=>{let a=0,n=\"\";do{let c=t[s-1]===\"\\r\";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\\r\n`:`\n`)+r,a=s+1,s=t.indexOf(`\n`,a)}while(s!==-1);return n+=t.substr(a),n};Use.exports={stringReplaceAll:tKe,stringEncaseCRLFWithFirstIndex:rKe}});var Wse=_((eFt,qse)=>{\"use strict\";var nKe=/(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi,Hse=/(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g,iKe=/^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/,sKe=/\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi,oKe=new Map([[\"n\",`\n`],[\"r\",\"\\r\"],[\"t\",\"\t\"],[\"b\",\"\\b\"],[\"f\",\"\\f\"],[\"v\",\"\\v\"],[\"0\",\"\\0\"],[\"\\\\\",\"\\\\\"],[\"e\",\"\\x1B\"],[\"a\",\"\\x07\"]]);function Gse(t){let e=t[0]===\"u\",r=t[1]===\"{\";return e&&!r&&t.length===5||t[0]===\"x\"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):oKe.get(t)||t}function aKe(t,e){let r=[],s=e.trim().split(/\\s*,\\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(iKe))r.push(a[2].replace(sKe,(f,p,h)=>p?Gse(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function lKe(t){Hse.lastIndex=0;let e=[],r;for(;(r=Hse.exec(t))!==null;){let s=r[1];if(r[2]){let a=aKe(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function jse(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}qse.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(nKe,(n,c,f,p,h,E)=>{if(c)a.push(Gse(c));else if(p){let C=a.join(\"\");a=[],s.push(r.length===0?C:jse(t,r)(C)),r.push({inverse:f,styles:lKe(p)})}else if(h){if(r.length===0)throw new Error(\"Found extraneous } in Chalk template literal\");s.push(jse(t,r)(a.join(\"\"))),a=[],r.pop()}else a.push(E)}),s.push(a.join(\"\")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?\"\":\"s\"} (\\`}\\`)`;throw new Error(n)}return s.join(\"\")}});var TE=_((tFt,Xse)=>{\"use strict\";var mB=sk(),{stdout:t4,stderr:r4}=Mse(),{stringReplaceAll:cKe,stringEncaseCRLFWithFirstIndex:uKe}=_se(),{isArray:ok}=Array,Vse=[\"ansi\",\"ansi\",\"ansi256\",\"ansi16m\"],QE=Object.create(null),fKe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error(\"The `level` option should be an integer from 0 to 3\");let r=t4?t4.level:0;t.level=e.level===void 0?r:e.level},n4=class{constructor(e){return Jse(e)}},Jse=t=>{let e={};return fKe(e,t),e.template=(...r)=>zse(e.template,...r),Object.setPrototypeOf(e,ak.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error(\"`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.\")},e.template.Instance=n4,e.template};function ak(t){return Jse(t)}for(let[t,e]of Object.entries(mB))QE[t]={get(){let r=lk(this,i4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};QE.visible={get(){let t=lk(this,this._styler,!0);return Object.defineProperty(this,\"visible\",{value:t}),t}};var Kse=[\"rgb\",\"hex\",\"keyword\",\"hsl\",\"hsv\",\"hwb\",\"ansi\",\"ansi256\"];for(let t of Kse)QE[t]={get(){let{level:e}=this;return function(...r){let s=i4(mB.color[Vse[e]][t](...r),mB.color.close,this._styler);return lk(this,s,this._isEmpty)}}};for(let t of Kse){let e=\"bg\"+t[0].toUpperCase()+t.slice(1);QE[e]={get(){let{level:r}=this;return function(...s){let a=i4(mB.bgColor[Vse[r]][t](...s),mB.bgColor.close,this._styler);return lk(this,a,this._isEmpty)}}}}var AKe=Object.defineProperties(()=>{},{...QE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),i4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},lk=(t,e,r)=>{let s=(...a)=>ok(a[0])&&ok(a[0].raw)?Yse(s,zse(s,...a)):Yse(s,a.length===1?\"\"+a[0]:a.join(\" \"));return Object.setPrototypeOf(s,AKe),s._generator=t,s._styler=e,s._isEmpty=r,s},Yse=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?\"\":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf(\"\\x1B\")!==-1)for(;r!==void 0;)e=cKe(e,r.close,r.open),r=r.parent;let n=e.indexOf(`\n`);return n!==-1&&(e=uKe(e,a,s,n)),s+e+a},e4,zse=(t,...e)=>{let[r]=e;if(!ok(r)||!ok(r.raw))return e.join(\" \");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\\\]/g,\"\\\\$&\"),String(r.raw[n]));return e4===void 0&&(e4=Wse()),e4(t,a.join(\"\"))};Object.defineProperties(ak.prototype,QE);var ck=ak();ck.supportsColor=t4;ck.stderr=ak({level:r4?r4.level:0});ck.stderr.supportsColor=r4;Xse.exports=ck});var uk=_(Dc=>{\"use strict\";Dc.isInteger=t=>typeof t==\"number\"?Number.isInteger(t):typeof t==\"string\"&&t.trim()!==\"\"?Number.isInteger(Number(t)):!1;Dc.find=(t,e)=>t.nodes.find(r=>r.type===e);Dc.exceedsLimit=(t,e,r=1,s)=>s===!1||!Dc.isInteger(t)||!Dc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;Dc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type===\"open\"||s.type===\"close\")&&s.escaped!==!0&&(s.value=\"\\\\\"+s.value,s.escaped=!0)};Dc.encloseBrace=t=>t.type!==\"brace\"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Dc.isInvalidBrace=t=>t.type!==\"brace\"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Dc.isOpenOrClose=t=>t.type===\"open\"||t.type===\"close\"?!0:t.open===!0||t.close===!0;Dc.reduce=t=>t.reduce((e,r)=>(r.type===\"text\"&&e.push(r.value),r.type===\"range\"&&(r.type=\"text\"),e),[]);Dc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var fk=_((nFt,$se)=>{\"use strict\";var Zse=uk();$se.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&Zse.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=\"\";if(s.value)return(n||c)&&Zse.isOpenOrClose(s)?\"\\\\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var toe=_((iFt,eoe)=>{\"use strict\";eoe.exports=function(t){return typeof t==\"number\"?t-t===0:typeof t==\"string\"&&t.trim()!==\"\"?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var uoe=_((sFt,coe)=>{\"use strict\";var roe=toe(),Gd=(t,e,r)=>{if(roe(t)===!1)throw new TypeError(\"toRegexRange: expected the first argument to be a number\");if(e===void 0||t===e)return String(t);if(roe(e)===!1)throw new TypeError(\"toRegexRange: expected the second argument to be a number.\");let s={relaxZeros:!0,...r};typeof s.strictZeros==\"boolean\"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+\":\"+e+\"=\"+a+n+c+f;if(Gd.cache.hasOwnProperty(p))return Gd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+\"|\"+e;return s.capture?`(${R})`:s.wrap===!1?R:`(?:${R})`}let C=loe(t)||loe(e),S={min:t,max:e,a:h,b:E},P=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let R=E<0?Math.abs(E):1;I=noe(R,Math.abs(h),S,s),h=S.a=0}return E>=0&&(P=noe(h,E,S,s)),S.negatives=I,S.positives=P,S.result=pKe(I,P,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&P.length+I.length>1&&(S.result=`(?:${S.result})`),Gd.cache[p]=S,S.result};function pKe(t,e,r){let s=s4(t,e,\"-\",!1,r)||[],a=s4(e,t,\"\",!1,r)||[],n=s4(t,e,\"-?\",!0,r)||[];return s.concat(n).concat(a).join(\"|\")}function hKe(t,e){let r=1,s=1,a=soe(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=soe(t,r);for(a=ooe(e+1,s)-1;t<a&&a<=e;)n.add(a),s+=1,a=ooe(e+1,s)-1;return n=[...n],n.sort(mKe),n}function gKe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=dKe(t,e),a=s.length,n=\"\",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!==\"0\"||h!==\"9\"?n+=yKe(p,h,r):c++}return c&&(n+=r.shorthand===!0?\"\\\\d\":\"[0-9]\"),{pattern:n,count:[c],digits:a}}function noe(t,e,r,s){let a=hKe(t,e),n=[],c=t,f;for(let p=0;p<a.length;p++){let h=a[p],E=gKe(String(c),String(h),s),C=\"\";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+aoe(f.count),c=h+1;continue}r.isPadded&&(C=EKe(h,r,s)),E.string=C+E.pattern+aoe(E.count),n.push(E),c=h+1,f=E}return n}function s4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!ioe(e,\"string\",f)&&n.push(r+f),s&&ioe(e,\"string\",f)&&n.push(r+f)}return n}function dKe(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function mKe(t,e){return t>e?1:e>t?-1:0}function ioe(t,e,r){return t.some(s=>s[e]===r)}function soe(t,e){return Number(String(t).slice(0,-e)+\"9\".repeat(e))}function ooe(t,e){return t-t%Math.pow(10,e)}function aoe(t){let[e=0,r=\"\"]=t;return r||e>1?`{${e+(r?\",\"+r:\"\")}}`:\"\"}function yKe(t,e,r){return`[${t}${e-t===1?\"\":\"-\"}${e}]`}function loe(t){return/^-?(0+)\\d/.test(t)}function EKe(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return\"\";case 1:return a?\"0?\":\"0\";case 2:return a?\"0{0,2}\":\"00\";default:return a?`0{0,${s}}`:`0{${s}}`}}Gd.cache={};Gd.clearCache=()=>Gd.cache={};coe.exports=Gd});var l4=_((oFt,yoe)=>{\"use strict\";var IKe=Ie(\"util\"),poe=uoe(),foe=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),CKe=t=>e=>t===!0?Number(e):String(e),o4=t=>typeof t==\"number\"||typeof t==\"string\"&&t!==\"\",yB=t=>Number.isInteger(+t),a4=t=>{let e=`${t}`,r=-1;if(e[0]===\"-\"&&(e=e.slice(1)),e===\"0\")return!1;for(;e[++r]===\"0\";);return r>0},wKe=(t,e,r)=>typeof t==\"string\"||typeof e==\"string\"?!0:r.stringify===!0,BKe=(t,e,r)=>{if(e>0){let s=t[0]===\"-\"?\"-\":\"\";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,\"0\")}return r===!1?String(t):t},Aoe=(t,e)=>{let r=t[0]===\"-\"?\"-\":\"\";for(r&&(t=t.slice(1),e--);t.length<e;)t=\"0\"+t;return r?\"-\"+t:t},vKe=(t,e)=>{t.negatives.sort((c,f)=>c<f?-1:c>f?1:0),t.positives.sort((c,f)=>c<f?-1:c>f?1:0);let r=e.capture?\"\":\"?:\",s=\"\",a=\"\",n;return t.positives.length&&(s=t.positives.join(\"|\")),t.negatives.length&&(a=`-(${r}${t.negatives.join(\"|\")})`),s&&a?n=`${s}|${a}`:n=s||a,e.wrap?`(${r}${n})`:n},hoe=(t,e,r,s)=>{if(r)return poe(t,e,{wrap:!1,...s});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},goe=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,a=r.capture?\"\":\"?:\";return s?`(${a}${t.join(\"|\")})`:t.join(\"|\")}return poe(t,e,r)},doe=(...t)=>new RangeError(\"Invalid range arguments: \"+IKe.inspect(...t)),moe=(t,e,r)=>{if(r.strictRanges===!0)throw doe([t,e]);return[]},SKe=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step \"${t}\" to be a number`);return[]},DKe=(t,e,r=1,s={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(s.strictRanges===!0)throw doe([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let c=a>n,f=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=a4(f)||a4(p)||a4(h),C=E?Math.max(f.length,p.length,h.length):0,S=E===!1&&wKe(t,e,s)===!1,P=s.transform||CKe(S);if(s.toRegex&&r===1)return hoe(Aoe(t,C),Aoe(e,C),!0,s);let I={negatives:[],positives:[]},R=W=>I[W<0?\"negatives\":\"positives\"].push(Math.abs(W)),N=[],U=0;for(;c?a>=n:a<=n;)s.toRegex===!0&&r>1?R(a):N.push(BKe(P(a,U),C,S)),a=c?a-r:a+r,U++;return s.toRegex===!0?r>1?vKe(I,s):goe(N,null,{wrap:!1,...s}):N},bKe=(t,e,r=1,s={})=>{if(!yB(t)&&t.length>1||!yB(e)&&e.length>1)return moe(t,e,s);let a=s.transform||(S=>String.fromCharCode(S)),n=`${t}`.charCodeAt(0),c=`${e}`.charCodeAt(0),f=n>c,p=Math.min(n,c),h=Math.max(n,c);if(s.toRegex&&r===1)return hoe(p,h,!1,s);let E=[],C=0;for(;f?n>=c:n<=c;)E.push(a(n,C)),n=f?n-r:n+r,C++;return s.toRegex===!0?goe(E,null,{wrap:!1,options:s}):E},Ak=(t,e,r,s={})=>{if(e==null&&o4(t))return[t];if(!o4(t)||!o4(e))return moe(t,e,s);if(typeof r==\"function\")return Ak(t,e,1,{transform:r});if(foe(r))return Ak(t,e,0,r);let a={...s};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,yB(r)?yB(t)&&yB(e)?DKe(t,e,r,a):bKe(t,e,Math.max(Math.abs(r),1),a):r!=null&&!foe(r)?SKe(r,a):Ak(t,e,1,r)};yoe.exports=Ak});var Coe=_((aFt,Ioe)=>{\"use strict\";var PKe=l4(),Eoe=uk(),xKe=(t,e={})=>{let r=(s,a={})=>{let n=Eoe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=n===!0||c===!0,p=e.escapeInvalid===!0?\"\\\\\":\"\",h=\"\";if(s.isOpen===!0||s.isClose===!0)return p+s.value;if(s.type===\"open\")return f?p+s.value:\"(\";if(s.type===\"close\")return f?p+s.value:\")\";if(s.type===\"comma\")return s.prev.type===\"comma\"?\"\":f?s.value:\"|\";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let E=Eoe.reduce(s.nodes),C=PKe(...E,{...e,wrap:!1,toRegex:!0});if(C.length!==0)return E.length>1&&C.length>1?`(${C})`:C}if(s.nodes)for(let E of s.nodes)h+=r(E,s);return h};return r(t)};Ioe.exports=xKe});var voe=_((lFt,Boe)=>{\"use strict\";var kKe=l4(),woe=fk(),RE=uk(),qd=(t=\"\",e=\"\",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?RE.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)s.push(qd(n,e,r));else for(let n of e)r===!0&&typeof n==\"string\"&&(n=`{${n}}`),s.push(Array.isArray(n)?qd(a,n,r):a+n);return RE.flatten(s)},QKe=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(a,n={})=>{a.queue=[];let c=n,f=n.queue;for(;c.type!==\"brace\"&&c.type!==\"root\"&&c.parent;)c=c.parent,f=c.queue;if(a.invalid||a.dollar){f.push(qd(f.pop(),woe(a,e)));return}if(a.type===\"brace\"&&a.invalid!==!0&&a.nodes.length===2){f.push(qd(f.pop(),[\"{}\"]));return}if(a.nodes&&a.ranges>0){let C=RE.reduce(a.nodes);if(RE.exceedsLimit(...C,e.step,r))throw new RangeError(\"expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.\");let S=kKe(...C,e);S.length===0&&(S=woe(a,e)),f.push(qd(f.pop(),S)),a.nodes=[];return}let p=RE.encloseBrace(a),h=a.queue,E=a;for(;E.type!==\"brace\"&&E.type!==\"root\"&&E.parent;)E=E.parent,h=E.queue;for(let C=0;C<a.nodes.length;C++){let S=a.nodes[C];if(S.type===\"comma\"&&a.type===\"brace\"){C===1&&h.push(\"\"),h.push(\"\");continue}if(S.type===\"close\"){f.push(qd(f.pop(),h,p));continue}if(S.value&&S.type!==\"open\"){h.push(qd(h.pop(),S.value));continue}S.nodes&&s(S,a)}return h};return RE.flatten(s(t))};Boe.exports=QKe});var Doe=_((cFt,Soe)=>{\"use strict\";Soe.exports={MAX_LENGTH:1024*64,CHAR_0:\"0\",CHAR_9:\"9\",CHAR_UPPERCASE_A:\"A\",CHAR_LOWERCASE_A:\"a\",CHAR_UPPERCASE_Z:\"Z\",CHAR_LOWERCASE_Z:\"z\",CHAR_LEFT_PARENTHESES:\"(\",CHAR_RIGHT_PARENTHESES:\")\",CHAR_ASTERISK:\"*\",CHAR_AMPERSAND:\"&\",CHAR_AT:\"@\",CHAR_BACKSLASH:\"\\\\\",CHAR_BACKTICK:\"`\",CHAR_CARRIAGE_RETURN:\"\\r\",CHAR_CIRCUMFLEX_ACCENT:\"^\",CHAR_COLON:\":\",CHAR_COMMA:\",\",CHAR_DOLLAR:\"$\",CHAR_DOT:\".\",CHAR_DOUBLE_QUOTE:'\"',CHAR_EQUAL:\"=\",CHAR_EXCLAMATION_MARK:\"!\",CHAR_FORM_FEED:\"\\f\",CHAR_FORWARD_SLASH:\"/\",CHAR_HASH:\"#\",CHAR_HYPHEN_MINUS:\"-\",CHAR_LEFT_ANGLE_BRACKET:\"<\",CHAR_LEFT_CURLY_BRACE:\"{\",CHAR_LEFT_SQUARE_BRACKET:\"[\",CHAR_LINE_FEED:`\n`,CHAR_NO_BREAK_SPACE:\"\\xA0\",CHAR_PERCENT:\"%\",CHAR_PLUS:\"+\",CHAR_QUESTION_MARK:\"?\",CHAR_RIGHT_ANGLE_BRACKET:\">\",CHAR_RIGHT_CURLY_BRACE:\"}\",CHAR_RIGHT_SQUARE_BRACKET:\"]\",CHAR_SEMICOLON:\";\",CHAR_SINGLE_QUOTE:\"'\",CHAR_SPACE:\" \",CHAR_TAB:\"\t\",CHAR_UNDERSCORE:\"_\",CHAR_VERTICAL_LINE:\"|\",CHAR_ZERO_WIDTH_NOBREAK_SPACE:\"\\uFEFF\"}});var Qoe=_((uFt,koe)=>{\"use strict\";var TKe=fk(),{MAX_LENGTH:boe,CHAR_BACKSLASH:c4,CHAR_BACKTICK:RKe,CHAR_COMMA:FKe,CHAR_DOT:NKe,CHAR_LEFT_PARENTHESES:OKe,CHAR_RIGHT_PARENTHESES:LKe,CHAR_LEFT_CURLY_BRACE:MKe,CHAR_RIGHT_CURLY_BRACE:UKe,CHAR_LEFT_SQUARE_BRACKET:Poe,CHAR_RIGHT_SQUARE_BRACKET:xoe,CHAR_DOUBLE_QUOTE:_Ke,CHAR_SINGLE_QUOTE:HKe,CHAR_NO_BREAK_SPACE:jKe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:GKe}=Doe(),qKe=(t,e={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");let r=e||{},s=typeof r.maxLength==\"number\"?Math.min(boe,r.maxLength):boe;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:\"root\",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,C=0,S,P={},I=()=>t[E++],R=N=>{if(N.type===\"text\"&&f.type===\"dot\"&&(f.type=\"text\"),f&&f.type===\"text\"&&N.type===\"text\"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(R({type:\"bos\"});E<h;)if(c=n[n.length-1],S=I(),!(S===GKe||S===jKe)){if(S===c4){R({type:\"text\",value:(e.keepEscaping?S:\"\")+I()});continue}if(S===xoe){R({type:\"text\",value:\"\\\\\"+S});continue}if(S===Poe){p++;let N=!0,U;for(;E<h&&(U=I());){if(S+=U,U===Poe){p++;continue}if(U===c4){S+=I();continue}if(U===xoe&&(p--,p===0))break}R({type:\"text\",value:S});continue}if(S===OKe){c=R({type:\"paren\",nodes:[]}),n.push(c),R({type:\"text\",value:S});continue}if(S===LKe){if(c.type!==\"paren\"){R({type:\"text\",value:S});continue}c=n.pop(),R({type:\"text\",value:S}),c=n[n.length-1];continue}if(S===_Ke||S===HKe||S===RKe){let N=S,U;for(e.keepQuotes!==!0&&(S=\"\");E<h&&(U=I());){if(U===c4){S+=U+I();continue}if(U===N){e.keepQuotes===!0&&(S+=U);break}S+=U}R({type:\"text\",value:S});continue}if(S===MKe){C++;let U={type:\"brace\",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)===\"$\"||c.dollar===!0,depth:C,commas:0,ranges:0,nodes:[]};c=R(U),n.push(c),R({type:\"open\",value:S});continue}if(S===UKe){if(c.type!==\"brace\"){R({type:\"text\",value:S});continue}let N=\"close\";c=n.pop(),c.close=!0,R({type:N,value:S}),C--,c=n[n.length-1];continue}if(S===FKe&&C>0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:\"text\",value:TKe(c)}]}R({type:\"comma\",value:S}),c.commas++;continue}if(S===NKe&&C>0&&c.commas===0){let N=c.nodes;if(C===0||N.length===0){R({type:\"text\",value:S});continue}if(f.type===\"dot\"){if(c.range=[],f.value+=S,f.type=\"range\",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type=\"text\";continue}c.ranges++,c.args=[];continue}if(f.type===\"range\"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}R({type:\"dot\",value:S});continue}R({type:\"text\",value:S})}do if(c=n.pop(),c.type!==\"root\"){c.nodes.forEach(W=>{W.nodes||(W.type===\"open\"&&(W.isOpen=!0),W.type===\"close\"&&(W.isClose=!0),W.nodes||(W.type=\"text\"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return R({type:\"eos\"}),a};koe.exports=qKe});var Foe=_((fFt,Roe)=>{\"use strict\";var Toe=fk(),WKe=Coe(),YKe=voe(),VKe=Qoe(),jl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=jl.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(jl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};jl.parse=(t,e={})=>VKe(t,e);jl.stringify=(t,e={})=>Toe(typeof t==\"string\"?jl.parse(t,e):t,e);jl.compile=(t,e={})=>(typeof t==\"string\"&&(t=jl.parse(t,e)),WKe(t,e));jl.expand=(t,e={})=>{typeof t==\"string\"&&(t=jl.parse(t,e));let r=YKe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};jl.create=(t,e={})=>t===\"\"||t.length<3?[t]:e.expand!==!0?jl.compile(t,e):jl.expand(t,e);Roe.exports=jl});var EB=_((AFt,Uoe)=>{\"use strict\";var JKe=Ie(\"path\"),Vf=\"\\\\\\\\/\",Noe=`[^${Vf}]`,Dp=\"\\\\.\",KKe=\"\\\\+\",zKe=\"\\\\?\",pk=\"\\\\/\",XKe=\"(?=.)\",Ooe=\"[^/]\",u4=`(?:${pk}|$)`,Loe=`(?:^|${pk})`,f4=`${Dp}{1,2}${u4}`,ZKe=`(?!${Dp})`,$Ke=`(?!${Loe}${f4})`,eze=`(?!${Dp}{0,1}${u4})`,tze=`(?!${f4})`,rze=`[^.${pk}]`,nze=`${Ooe}*?`,Moe={DOT_LITERAL:Dp,PLUS_LITERAL:KKe,QMARK_LITERAL:zKe,SLASH_LITERAL:pk,ONE_CHAR:XKe,QMARK:Ooe,END_ANCHOR:u4,DOTS_SLASH:f4,NO_DOT:ZKe,NO_DOTS:$Ke,NO_DOT_SLASH:eze,NO_DOTS_SLASH:tze,QMARK_NO_DOT:rze,STAR:nze,START_ANCHOR:Loe},ize={...Moe,SLASH_LITERAL:`[${Vf}]`,QMARK:Noe,STAR:`${Noe}*?`,DOTS_SLASH:`${Dp}{1,2}(?:[${Vf}]|$)`,NO_DOT:`(?!${Dp})`,NO_DOTS:`(?!(?:^|[${Vf}])${Dp}{1,2}(?:[${Vf}]|$))`,NO_DOT_SLASH:`(?!${Dp}{0,1}(?:[${Vf}]|$))`,NO_DOTS_SLASH:`(?!${Dp}{1,2}(?:[${Vf}]|$))`,QMARK_NO_DOT:`[^.${Vf}]`,START_ANCHOR:`(?:^|[${Vf}])`,END_ANCHOR:`(?:[${Vf}]|$)`},sze={alnum:\"a-zA-Z0-9\",alpha:\"a-zA-Z\",ascii:\"\\\\x00-\\\\x7F\",blank:\" \\\\t\",cntrl:\"\\\\x00-\\\\x1F\\\\x7F\",digit:\"0-9\",graph:\"\\\\x21-\\\\x7E\",lower:\"a-z\",print:\"\\\\x20-\\\\x7E \",punct:\"\\\\-!\\\"#$%&'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~\",space:\" \\\\t\\\\r\\\\n\\\\v\\\\f\",upper:\"A-Z\",word:\"A-Za-z0-9_\",xdigit:\"A-Fa-f0-9\"};Uoe.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:sze,REGEX_BACKSLASH:/\\\\(?![*+?^${}(|)[\\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\\].,$*+?^{}()|\\\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\\\?)((\\W)(\\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,REPLACEMENTS:{\"***\":\"*\",\"**/**\":\"**\",\"**/**/**\":\"**\"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:JKe.sep,extglobChars(t){return{\"!\":{type:\"negate\",open:\"(?:(?!(?:\",close:`))${t.STAR})`},\"?\":{type:\"qmark\",open:\"(?:\",close:\")?\"},\"+\":{type:\"plus\",open:\"(?:\",close:\")+\"},\"*\":{type:\"star\",open:\"(?:\",close:\")*\"},\"@\":{type:\"at\",open:\"(?:\",close:\")\"}}},globChars(t){return t===!0?ize:Moe}}});var IB=_(ol=>{\"use strict\";var oze=Ie(\"path\"),aze=process.platform===\"win32\",{REGEX_BACKSLASH:lze,REGEX_REMOVE_BACKSLASH:cze,REGEX_SPECIAL_CHARS:uze,REGEX_SPECIAL_CHARS_GLOBAL:fze}=EB();ol.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);ol.hasRegexChars=t=>uze.test(t);ol.isRegexChar=t=>t.length===1&&ol.hasRegexChars(t);ol.escapeRegex=t=>t.replace(fze,\"\\\\$1\");ol.toPosixSlashes=t=>t.replace(lze,\"/\");ol.removeBackslashes=t=>t.replace(cze,e=>e===\"\\\\\"?\"\":e);ol.supportsLookbehinds=()=>{let t=process.version.slice(1).split(\".\").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ol.isWindows=t=>t&&typeof t.windows==\"boolean\"?t.windows:aze===!0||oze.sep===\"\\\\\";ol.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]===\"\\\\\"?ol.escapeLast(t,e,s-1):`${t.slice(0,s)}\\\\${t.slice(s)}`};ol.removePrefix=(t,e={})=>{let r=t;return r.startsWith(\"./\")&&(r=r.slice(2),e.prefix=\"./\"),r};ol.wrapOutput=(t,e={},r={})=>{let s=r.contains?\"\":\"^\",a=r.contains?\"\":\"$\",n=`${s}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var Voe=_((hFt,Yoe)=>{\"use strict\";var _oe=IB(),{CHAR_ASTERISK:A4,CHAR_AT:Aze,CHAR_BACKWARD_SLASH:CB,CHAR_COMMA:pze,CHAR_DOT:p4,CHAR_EXCLAMATION_MARK:h4,CHAR_FORWARD_SLASH:Woe,CHAR_LEFT_CURLY_BRACE:g4,CHAR_LEFT_PARENTHESES:d4,CHAR_LEFT_SQUARE_BRACKET:hze,CHAR_PLUS:gze,CHAR_QUESTION_MARK:Hoe,CHAR_RIGHT_CURLY_BRACE:dze,CHAR_RIGHT_PARENTHESES:joe,CHAR_RIGHT_SQUARE_BRACKET:mze}=EB(),Goe=t=>t===Woe||t===CB,qoe=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},yze=(t,e)=>{let r=e||{},s=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],c=[],f=[],p=t,h=-1,E=0,C=0,S=!1,P=!1,I=!1,R=!1,N=!1,U=!1,W=!1,ee=!1,ie=!1,ue=!1,le=0,me,pe,Be={value:\"\",depth:0,isGlob:!1},Ce=()=>h>=s,g=()=>p.charCodeAt(h+1),we=()=>(me=pe,p.charCodeAt(++h));for(;h<s;){pe=we();let De;if(pe===CB){W=Be.backslashes=!0,pe=we(),pe===g4&&(U=!0);continue}if(U===!0||pe===g4){for(le++;Ce()!==!0&&(pe=we());){if(pe===CB){W=Be.backslashes=!0,we();continue}if(pe===g4){le++;continue}if(U!==!0&&pe===p4&&(pe=we())===p4){if(S=Be.isBrace=!0,I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(U!==!0&&pe===pze){if(S=Be.isBrace=!0,I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===dze&&(le--,le===0)){U=!1,S=Be.isBrace=!0,ue=!0;break}}if(a===!0)continue;break}if(pe===Woe){if(n.push(h),c.push(Be),Be={value:\"\",depth:0,isGlob:!1},ue===!0)continue;if(me===p4&&h===E+1){E+=2;continue}C=h+1;continue}if(r.noext!==!0&&(pe===gze||pe===Aze||pe===A4||pe===Hoe||pe===h4)===!0&&g()===d4){if(I=Be.isGlob=!0,R=Be.isExtglob=!0,ue=!0,pe===h4&&h===E&&(ie=!0),a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===CB){W=Be.backslashes=!0,pe=we();continue}if(pe===joe){I=Be.isGlob=!0,ue=!0;break}}continue}break}if(pe===A4){if(me===A4&&(N=Be.isGlobstar=!0),I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===Hoe){if(I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===hze){for(;Ce()!==!0&&(De=we());){if(De===CB){W=Be.backslashes=!0,we();continue}if(De===mze){P=Be.isBracket=!0,I=Be.isGlob=!0,ue=!0;break}}if(a===!0)continue;break}if(r.nonegate!==!0&&pe===h4&&h===E){ee=Be.negated=!0,E++;continue}if(r.noparen!==!0&&pe===d4){if(I=Be.isGlob=!0,a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===d4){W=Be.backslashes=!0,pe=we();continue}if(pe===joe){ue=!0;break}}continue}break}if(I===!0){if(ue=!0,a===!0)continue;break}}r.noext===!0&&(R=!1,I=!1);let ye=p,Ae=\"\",se=\"\";E>0&&(Ae=p.slice(0,E),p=p.slice(E),C-=E),ye&&I===!0&&C>0?(ye=p.slice(0,C),se=p.slice(C)):I===!0?(ye=\"\",se=p):ye=p,ye&&ye!==\"\"&&ye!==\"/\"&&ye!==p&&Goe(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),r.unescape===!0&&(se&&(se=_oe.removeBackslashes(se)),ye&&W===!0&&(ye=_oe.removeBackslashes(ye)));let Z={prefix:Ae,input:t,start:E,base:ye,glob:se,isBrace:S,isBracket:P,isGlob:I,isExtglob:R,isGlobstar:N,negated:ee,negatedExtglob:ie};if(r.tokens===!0&&(Z.maxDepth=0,Goe(pe)||c.push(Be),Z.tokens=c),r.parts===!0||r.tokens===!0){let De;for(let Re=0;Re<n.length;Re++){let mt=De?De+1:E,j=n[Re],rt=t.slice(mt,j);r.tokens&&(Re===0&&E!==0?(c[Re].isPrefix=!0,c[Re].value=Ae):c[Re].value=rt,qoe(c[Re]),Z.maxDepth+=c[Re].depth),(Re!==0||rt!==\"\")&&f.push(rt),De=j}if(De&&De+1<t.length){let Re=t.slice(De+1);f.push(Re),r.tokens&&(c[c.length-1].value=Re,qoe(c[c.length-1]),Z.maxDepth+=c[c.length-1].depth)}Z.slashes=n,Z.parts=f}return Z};Yoe.exports=yze});var zoe=_((gFt,Koe)=>{\"use strict\";var hk=EB(),Gl=IB(),{MAX_LENGTH:gk,POSIX_REGEX_SOURCE:Eze,REGEX_NON_SPECIAL_CHARS:Ize,REGEX_SPECIAL_CHARS_BACKREF:Cze,REPLACEMENTS:Joe}=hk,wze=(t,e)=>{if(typeof e.expandRange==\"function\")return e.expandRange(...t,e);t.sort();let r=`[${t.join(\"-\")}]`;try{new RegExp(r)}catch{return t.map(a=>Gl.escapeRegex(a)).join(\"..\")}return r},FE=(t,e)=>`Missing ${t}: \"${e}\" - use \"\\\\\\\\${e}\" to match literal characters`,m4=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");t=Joe[t]||t;let r={...e},s=typeof r.maxLength==\"number\"?Math.min(gk,r.maxLength):gk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);let n={type:\"bos\",value:\"\",output:r.prepend||\"\"},c=[n],f=r.capture?\"\":\"?:\",p=Gl.isWindows(e),h=hk.globChars(p),E=hk.extglobChars(h),{DOT_LITERAL:C,PLUS_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:I,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:W,QMARK:ee,QMARK_NO_DOT:ie,STAR:ue,START_ANCHOR:le}=h,me=x=>`(${f}(?:(?!${le}${x.dot?R:C}).)*?)`,pe=r.dot?\"\":N,Be=r.dot?ee:ie,Ce=r.bash===!0?me(r):ue;r.capture&&(Ce=`(${Ce})`),typeof r.noext==\"boolean\"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:\"\",output:\"\",prefix:\"\",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:c};t=Gl.removePrefix(t,g),a=t.length;let we=[],ye=[],Ae=[],se=n,Z,De=()=>g.index===a-1,Re=g.peek=(x=1)=>t[g.index+x],mt=g.advance=()=>t[++g.index]||\"\",j=()=>t.slice(g.index+1),rt=(x=\"\",w=0)=>{g.consumed+=x,g.index+=w},Fe=x=>{g.output+=x.output!=null?x.output:x.value,rt(x.value)},Ne=()=>{let x=1;for(;Re()===\"!\"&&(Re(2)!==\"(\"||Re(3)===\"?\");)mt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Pe=x=>{g[x]++,Ae.push(x)},Ve=x=>{g[x]--,Ae.pop()},ke=x=>{if(se.type===\"globstar\"){let w=g.braces>0&&(x.type===\"comma\"||x.type===\"brace\"),b=x.extglob===!0||we.length&&(x.type===\"pipe\"||x.type===\"paren\");x.type!==\"slash\"&&x.type!==\"paren\"&&!w&&!b&&(g.output=g.output.slice(0,-se.output.length),se.type=\"star\",se.value=\"*\",se.output=Ce,g.output+=se.output)}if(we.length&&x.type!==\"paren\"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Fe(x),se&&se.type===\"text\"&&x.type===\"text\"){se.value+=x.value,se.output=(se.output||\"\")+x.value;return}x.prev=se,c.push(x),se=x},it=(x,w)=>{let b={...E[w],conditions:1,inner:\"\"};b.prev=se,b.parens=g.parens,b.output=g.output;let y=(r.capture?\"(\":\"\")+b.open;Pe(\"parens\"),ke({type:x,value:w,output:g.output?\"\":I}),ke({type:\"paren\",extglob:!0,value:mt(),output:y}),we.push(b)},Ue=x=>{let w=x.close+(r.capture?\")\":\"\"),b;if(x.type===\"negate\"){let y=Ce;if(x.inner&&x.inner.length>1&&x.inner.includes(\"/\")&&(y=me(r)),(y!==Ce||De()||/^\\)+$/.test(j()))&&(w=x.close=`)$))${y}`),x.inner.includes(\"*\")&&(b=j())&&/^\\.[^\\\\/.]+$/.test(b)){let F=m4(b,{...e,fastpaths:!1}).output;w=x.close=`)${F})${y})`}x.prev.type===\"bos\"&&(g.negatedExtglob=!0)}ke({type:\"paren\",extglob:!0,value:Z,output:w}),Ve(\"parens\")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\\]{}\"])/.test(t)){let x=!1,w=t.replace(Cze,(b,y,F,z,X,$)=>z===\"\\\\\"?(x=!0,b):z===\"?\"?y?y+z+(X?ee.repeat(X.length):\"\"):$===0?Be+(X?ee.repeat(X.length):\"\"):ee.repeat(F.length):z===\".\"?C.repeat(F.length):z===\"*\"?y?y+z+(X?Ce:\"\"):Ce:y?b:`\\\\${b}`);return x===!0&&(r.unescape===!0?w=w.replace(/\\\\/g,\"\"):w=w.replace(/\\\\+/g,b=>b.length%2===0?\"\\\\\\\\\":b?\"\\\\\":\"\")),w===t&&r.contains===!0?(g.output=t,g):(g.output=Gl.wrapOutput(w,g,e),g)}for(;!De();){if(Z=mt(),Z===\"\\0\")continue;if(Z===\"\\\\\"){let b=Re();if(b===\"/\"&&r.bash!==!0||b===\".\"||b===\";\")continue;if(!b){Z+=\"\\\\\",ke({type:\"text\",value:Z});continue}let y=/^\\\\+/.exec(j()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(Z+=\"\\\\\")),r.unescape===!0?Z=mt():Z+=mt(),g.brackets===0){ke({type:\"text\",value:Z});continue}}if(g.brackets>0&&(Z!==\"]\"||se.value===\"[\"||se.value===\"[^\")){if(r.posix!==!1&&Z===\":\"){let b=se.value.slice(1);if(b.includes(\"[\")&&(se.posix=!0,b.includes(\":\"))){let y=se.value.lastIndexOf(\"[\"),F=se.value.slice(0,y),z=se.value.slice(y+2),X=Eze[z];if(X){se.value=F+X,g.backtrack=!0,mt(),!n.output&&c.indexOf(se)===1&&(n.output=I);continue}}}(Z===\"[\"&&Re()!==\":\"||Z===\"-\"&&Re()===\"]\")&&(Z=`\\\\${Z}`),Z===\"]\"&&(se.value===\"[\"||se.value===\"[^\")&&(Z=`\\\\${Z}`),r.posix===!0&&Z===\"!\"&&se.value===\"[\"&&(Z=\"^\"),se.value+=Z,Fe({value:Z});continue}if(g.quotes===1&&Z!=='\"'){Z=Gl.escapeRegex(Z),se.value+=Z,Fe({value:Z});continue}if(Z==='\"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&ke({type:\"text\",value:Z});continue}if(Z===\"(\"){Pe(\"parens\"),ke({type:\"paren\",value:Z});continue}if(Z===\")\"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(FE(\"opening\",\"(\"));let b=we[we.length-1];if(b&&g.parens===b.parens+1){Ue(we.pop());continue}ke({type:\"paren\",value:Z,output:g.parens?\")\":\"\\\\)\"}),Ve(\"parens\");continue}if(Z===\"[\"){if(r.nobracket===!0||!j().includes(\"]\")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"]\"));Z=`\\\\${Z}`}else Pe(\"brackets\");ke({type:\"bracket\",value:Z});continue}if(Z===\"]\"){if(r.nobracket===!0||se&&se.type===\"bracket\"&&se.value.length===1){ke({type:\"text\",value:Z,output:`\\\\${Z}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"opening\",\"[\"));ke({type:\"text\",value:Z,output:`\\\\${Z}`});continue}Ve(\"brackets\");let b=se.value.slice(1);if(se.posix!==!0&&b[0]===\"^\"&&!b.includes(\"/\")&&(Z=`/${Z}`),se.value+=Z,Fe({value:Z}),r.literalBrackets===!1||Gl.hasRegexChars(b))continue;let y=Gl.escapeRegex(se.value);if(g.output=g.output.slice(0,-se.value.length),r.literalBrackets===!0){g.output+=y,se.value=y;continue}se.value=`(${f}${y}|${se.value})`,g.output+=se.value;continue}if(Z===\"{\"&&r.nobrace!==!0){Pe(\"braces\");let b={type:\"brace\",value:Z,output:\"(\",outputIndex:g.output.length,tokensIndex:g.tokens.length};ye.push(b),ke(b);continue}if(Z===\"}\"){let b=ye[ye.length-1];if(r.nobrace===!0||!b){ke({type:\"text\",value:Z,output:Z});continue}let y=\")\";if(b.dots===!0){let F=c.slice(),z=[];for(let X=F.length-1;X>=0&&(c.pop(),F[X].type!==\"brace\");X--)F[X].type!==\"dots\"&&z.unshift(F[X].value);y=wze(z,r),g.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let F=g.output.slice(0,b.outputIndex),z=g.tokens.slice(b.tokensIndex);b.value=b.output=\"\\\\{\",Z=y=\"\\\\}\",g.output=F;for(let X of z)g.output+=X.output||X.value}ke({type:\"brace\",value:Z,output:y}),Ve(\"braces\"),ye.pop();continue}if(Z===\"|\"){we.length>0&&we[we.length-1].conditions++,ke({type:\"text\",value:Z});continue}if(Z===\",\"){let b=Z,y=ye[ye.length-1];y&&Ae[Ae.length-1]===\"braces\"&&(y.comma=!0,b=\"|\"),ke({type:\"comma\",value:Z,output:b});continue}if(Z===\"/\"){if(se.type===\"dot\"&&g.index===g.start+1){g.start=g.index+1,g.consumed=\"\",g.output=\"\",c.pop(),se=n;continue}ke({type:\"slash\",value:Z,output:P});continue}if(Z===\".\"){if(g.braces>0&&se.type===\"dot\"){se.value===\".\"&&(se.output=C);let b=ye[ye.length-1];se.type=\"dots\",se.output+=Z,se.value+=Z,b.dots=!0;continue}if(g.braces+g.parens===0&&se.type!==\"bos\"&&se.type!==\"slash\"){ke({type:\"text\",value:Z,output:C});continue}ke({type:\"dot\",value:Z,output:C});continue}if(Z===\"?\"){if(!(se&&se.value===\"(\")&&r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"qmark\",Z);continue}if(se&&se.type===\"paren\"){let y=Re(),F=Z;if(y===\"<\"&&!Gl.supportsLookbehinds())throw new Error(\"Node.js v10 or higher is required for regex lookbehinds\");(se.value===\"(\"&&!/[!=<:]/.test(y)||y===\"<\"&&!/<([!=]|\\w+>)/.test(j()))&&(F=`\\\\${Z}`),ke({type:\"text\",value:Z,output:F});continue}if(r.dot!==!0&&(se.type===\"slash\"||se.type===\"bos\")){ke({type:\"qmark\",value:Z,output:ie});continue}ke({type:\"qmark\",value:Z,output:ee});continue}if(Z===\"!\"){if(r.noextglob!==!0&&Re()===\"(\"&&(Re(2)!==\"?\"||!/[!=<:]/.test(Re(3)))){it(\"negate\",Z);continue}if(r.nonegate!==!0&&g.index===0){Ne();continue}}if(Z===\"+\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"plus\",Z);continue}if(se&&se.value===\"(\"||r.regex===!1){ke({type:\"plus\",value:Z,output:S});continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\"||se.type===\"brace\")||g.parens>0){ke({type:\"plus\",value:Z});continue}ke({type:\"plus\",value:S});continue}if(Z===\"@\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){ke({type:\"at\",extglob:!0,value:Z,output:\"\"});continue}ke({type:\"text\",value:Z});continue}if(Z!==\"*\"){(Z===\"$\"||Z===\"^\")&&(Z=`\\\\${Z}`);let b=Ize.exec(j());b&&(Z+=b[0],g.index+=b[0].length),ke({type:\"text\",value:Z});continue}if(se&&(se.type===\"globstar\"||se.star===!0)){se.type=\"star\",se.star=!0,se.value+=Z,se.output=Ce,g.backtrack=!0,g.globstar=!0,rt(Z);continue}let x=j();if(r.noextglob!==!0&&/^\\([^?]/.test(x)){it(\"star\",Z);continue}if(se.type===\"star\"){if(r.noglobstar===!0){rt(Z);continue}let b=se.prev,y=b.prev,F=b.type===\"slash\"||b.type===\"bos\",z=y&&(y.type===\"star\"||y.type===\"globstar\");if(r.bash===!0&&(!F||x[0]&&x[0]!==\"/\")){ke({type:\"star\",value:Z,output:\"\"});continue}let X=g.braces>0&&(b.type===\"comma\"||b.type===\"brace\"),$=we.length&&(b.type===\"pipe\"||b.type===\"paren\");if(!F&&b.type!==\"paren\"&&!X&&!$){ke({type:\"star\",value:Z,output:\"\"});continue}for(;x.slice(0,3)===\"/**\";){let oe=t[g.index+4];if(oe&&oe!==\"/\")break;x=x.slice(3),rt(\"/**\",3)}if(b.type===\"bos\"&&De()){se.type=\"globstar\",se.value+=Z,se.output=me(r),g.output=se.output,g.globstar=!0,rt(Z);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&!z&&De()){g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=me(r)+(r.strictSlashes?\")\":\"|$)\"),se.value+=Z,g.globstar=!0,g.output+=b.output+se.output,rt(Z);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&x[0]===\"/\"){let oe=x[1]!==void 0?\"|$\":\"\";g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=`${me(r)}${P}|${P}${oe})`,se.value+=Z,g.output+=b.output+se.output,g.globstar=!0,rt(Z+mt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}if(b.type===\"bos\"&&x[0]===\"/\"){se.type=\"globstar\",se.value+=Z,se.output=`(?:^|${P}|${me(r)}${P})`,g.output=se.output,g.globstar=!0,rt(Z+mt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}g.output=g.output.slice(0,-se.output.length),se.type=\"globstar\",se.output=me(r),se.value+=Z,g.output+=se.output,g.globstar=!0,rt(Z);continue}let w={type:\"star\",value:Z,output:Ce};if(r.bash===!0){w.output=\".*?\",(se.type===\"bos\"||se.type===\"slash\")&&(w.output=pe+w.output),ke(w);continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\")&&r.regex===!0){w.output=Z,ke(w);continue}(g.index===g.start||se.type===\"slash\"||se.type===\"dot\")&&(se.type===\"dot\"?(g.output+=U,se.output+=U):r.dot===!0?(g.output+=W,se.output+=W):(g.output+=pe,se.output+=pe),Re()!==\"*\"&&(g.output+=I,se.output+=I)),ke(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"]\"));g.output=Gl.escapeLast(g.output,\"[\"),Ve(\"brackets\")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\")\"));g.output=Gl.escapeLast(g.output,\"(\"),Ve(\"parens\")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"}\"));g.output=Gl.escapeLast(g.output,\"{\"),Ve(\"braces\")}if(r.strictSlashes!==!0&&(se.type===\"star\"||se.type===\"bracket\")&&ke({type:\"maybe_slash\",value:\"\",output:`${P}?`}),g.backtrack===!0){g.output=\"\";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};m4.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength==\"number\"?Math.min(gk,r.maxLength):gk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);t=Joe[t]||t;let n=Gl.isWindows(e),{DOT_LITERAL:c,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:C,NO_DOTS_SLASH:S,STAR:P,START_ANCHOR:I}=hk.globChars(n),R=r.dot?C:E,N=r.dot?S:E,U=r.capture?\"\":\"?:\",W={negated:!1,prefix:\"\"},ee=r.bash===!0?\".*?\":P;r.capture&&(ee=`(${ee})`);let ie=pe=>pe.noglobstar===!0?ee:`(${U}(?:(?!${I}${pe.dot?h:c}).)*?)`,ue=pe=>{switch(pe){case\"*\":return`${R}${p}${ee}`;case\".*\":return`${c}${p}${ee}`;case\"*.*\":return`${R}${ee}${c}${p}${ee}`;case\"*/*\":return`${R}${ee}${f}${p}${N}${ee}`;case\"**\":return R+ie(r);case\"**/*\":return`(?:${R}${ie(r)}${f})?${N}${p}${ee}`;case\"**/*.*\":return`(?:${R}${ie(r)}${f})?${N}${ee}${c}${p}${ee}`;case\"**/.*\":return`(?:${R}${ie(r)}${f})?${c}${p}${ee}`;default:{let Be=/^(.*?)\\.(\\w+)$/.exec(pe);if(!Be)return;let Ce=ue(Be[1]);return Ce?Ce+c+Be[2]:void 0}}},le=Gl.removePrefix(t,W),me=ue(le);return me&&r.strictSlashes!==!0&&(me+=`${f}?`),me};Koe.exports=m4});var Zoe=_((dFt,Xoe)=>{\"use strict\";var Bze=Ie(\"path\"),vze=Voe(),y4=zoe(),E4=IB(),Sze=EB(),Dze=t=>t&&typeof t==\"object\"&&!Array.isArray(t),Zi=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(S=>Zi(S,e,r));return S=>{for(let P of E){let I=P(S);if(I)return I}return!1}}let s=Dze(t)&&t.tokens&&t.input;if(t===\"\"||typeof t!=\"string\"&&!s)throw new TypeError(\"Expected pattern to be a non-empty string\");let a=e||{},n=E4.isWindows(e),c=s?Zi.compileRe(t,e):Zi.makeRe(t,e,!1,!0),f=c.state;delete c.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=Zi(a.ignore,E,r)}let h=(E,C=!1)=>{let{isMatch:S,match:P,output:I}=Zi.test(E,c,e,{glob:t,posix:n}),R={glob:t,state:f,regex:c,posix:n,input:E,output:I,match:P,isMatch:S};return typeof a.onResult==\"function\"&&a.onResult(R),S===!1?(R.isMatch=!1,C?R:!1):p(E)?(typeof a.onIgnore==\"function\"&&a.onIgnore(R),R.isMatch=!1,C?R:!1):(typeof a.onMatch==\"function\"&&a.onMatch(R),C?R:!0)};return r&&(h.state=f),h};Zi.test=(t,e,r,{glob:s,posix:a}={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected input to be a string\");if(t===\"\")return{isMatch:!1,output:\"\"};let n=r||{},c=n.format||(a?E4.toPosixSlashes:null),f=t===s,p=f&&c?c(t):t;return f===!1&&(p=c?c(t):t,f=p===s),(f===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?f=Zi.matchBase(t,e,r,a):f=e.exec(p)),{isMatch:!!f,match:f,output:p}};Zi.matchBase=(t,e,r,s=E4.isWindows(r))=>(e instanceof RegExp?e:Zi.makeRe(e,r)).test(Bze.basename(t));Zi.isMatch=(t,e,r)=>Zi(e,r)(t);Zi.parse=(t,e)=>Array.isArray(t)?t.map(r=>Zi.parse(r,e)):y4(t,{...e,fastpaths:!1});Zi.scan=(t,e)=>vze(t,e);Zi.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?\"\":\"^\",c=a.contains?\"\":\"$\",f=`${n}(?:${t.output})${c}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let p=Zi.toRegex(f,e);return s===!0&&(p.state=t),p};Zi.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!=\"string\")throw new TypeError(\"Expected a non-empty string\");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]===\".\"||t[0]===\"*\")&&(a.output=y4.fastpaths(t,e)),a.output||(a=y4(t,e)),Zi.compileRe(a,e,r,s)};Zi.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?\"i\":\"\"))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Zi.constants=Sze;Xoe.exports=Zi});var eae=_((mFt,$oe)=>{\"use strict\";$oe.exports=Zoe()});var Go=_((yFt,iae)=>{\"use strict\";var rae=Ie(\"util\"),nae=Foe(),Jf=eae(),I4=IB(),tae=t=>t===\"\"||t===\"./\",xi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,a=new Set,n=new Set,c=0,f=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E<e.length;E++){let C=Jf(String(e[E]),{...r,onResult:f},!0),S=C.state.negated||C.state.negatedExtglob;S&&c++;for(let P of t){let I=C(P,!0);(S?!I.isMatch:I.isMatch)&&(S?s.add(I.output):(s.delete(I.output),a.add(I.output)))}}let h=(c===e.length?[...n]:[...a]).filter(E=>!s.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for \"${e.join(\", \")}\"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\\\/g,\"\")):e}return h};xi.match=xi;xi.matcher=(t,e)=>Jf(t,e);xi.isMatch=(t,e,r)=>Jf(e,r)(t);xi.any=xi.isMatch;xi.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,a=[],n=f=>{r.onResult&&r.onResult(f),a.push(f.output)},c=new Set(xi(t,e,{...r,onResult:n}));for(let f of a)c.has(f)||s.add(f);return[...s]};xi.contains=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${rae.inspect(t)}\"`);if(Array.isArray(e))return e.some(s=>xi.contains(t,s,r));if(typeof e==\"string\"){if(tae(t)||tae(e))return!1;if(t.includes(e)||t.startsWith(\"./\")&&t.slice(2).includes(e))return!0}return xi.isMatch(t,e,{...r,contains:!0})};xi.matchKeys=(t,e,r)=>{if(!I4.isObject(t))throw new TypeError(\"Expected the first argument to be an object\");let s=xi(Object.keys(t),e,r),a={};for(let n of s)a[n]=t[n];return a};xi.some=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(s.some(c=>n(c)))return!0}return!1};xi.every=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(!s.every(c=>n(c)))return!1}return!0};xi.all=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${rae.inspect(t)}\"`);return[].concat(e).every(s=>Jf(s,r)(t))};xi.capture=(t,e,r)=>{let s=I4.isWindows(r),n=Jf.makeRe(String(t),{...r,capture:!0}).exec(s?I4.toPosixSlashes(e):e);if(n)return n.slice(1).map(c=>c===void 0?\"\":c)};xi.makeRe=(...t)=>Jf.makeRe(...t);xi.scan=(...t)=>Jf.scan(...t);xi.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let a of nae(String(s),e))r.push(Jf.parse(a,e));return r};xi.braces=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return e&&e.nobrace===!0||!/\\{.*\\}/.test(t)?[t]:nae(t,e)};xi.braceExpand=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return xi.braces(t,{...e,expand:!0})};iae.exports=xi});var oae=_((EFt,sae)=>{\"use strict\";sae.exports=({onlyFirst:t=!1}={})=>{let e=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(e,t?void 0:\"g\")}});var dk=_((IFt,aae)=>{\"use strict\";var bze=oae();aae.exports=t=>typeof t==\"string\"?t.replace(bze(),\"\"):t});function lae(t){return Number.isSafeInteger(t)&&t>=0}var cae=Xe(()=>{});function uae(t){return t!=null&&typeof t!=\"function\"&&lae(t.length)}var fae=Xe(()=>{cae()});function bc(t){return t===\"__proto__\"}var wB=Xe(()=>{});function NE(t){switch(typeof t){case\"number\":case\"symbol\":return!1;case\"string\":return t.includes(\".\")||t.includes(\"[\")||t.includes(\"]\")}}var mk=Xe(()=>{});function OE(t){return typeof t==\"string\"||typeof t==\"symbol\"?t:Object.is(t?.valueOf?.(),-0)?\"-0\":String(t)}var yk=Xe(()=>{});function Mu(t){let e=[],r=t.length;if(r===0)return e;let s=0,a=\"\",n=\"\",c=!1;for(t.charCodeAt(0)===46&&(e.push(\"\"),s++);s<r;){let f=t[s];n?f===\"\\\\\"&&s+1<r?(s++,a+=t[s]):f===n?n=\"\":a+=f:c?f==='\"'||f===\"'\"?n=f:f===\"]\"?(c=!1,e.push(a),a=\"\"):a+=f:f===\"[\"?(c=!0,a&&(e.push(a),a=\"\")):f===\".\"?a&&(e.push(a),a=\"\"):a+=f,s++}return a&&e.push(a),e}var LE=Xe(()=>{});function va(t,e,r){if(t==null)return r;switch(typeof e){case\"string\":{if(bc(e))return r;let s=t[e];return s===void 0?NE(e)?va(t,Mu(e),r):r:s}case\"number\":case\"symbol\":{typeof e==\"number\"&&(e=OE(e));let s=t[e];return s===void 0?r:s}default:{if(Array.isArray(e))return Pze(t,e,r);if(Object.is(e?.valueOf(),-0)?e=\"-0\":e=String(e),bc(e))return r;let s=t[e];return s===void 0?r:s}}}function Pze(t,e,r){if(e.length===0)return r;let s=t;for(let a=0;a<e.length;a++){if(s==null||bc(e[a]))return r;s=s[e[a]]}return s===void 0?r:s}var Ek=Xe(()=>{wB();mk();yk();LE()});function C4(t){return t!==null&&(typeof t==\"object\"||typeof t==\"function\")}var Aae=Xe(()=>{});function ME(t){return t==null||typeof t!=\"object\"&&typeof t!=\"function\"}var Ik=Xe(()=>{});function Ck(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}var w4=Xe(()=>{});function Wd(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var wk=Xe(()=>{});function Yd(t){return t==null?t===void 0?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(t)}var Bk=Xe(()=>{});var vk,UE,_E,HE,Vd,Sk,Dk,bk,Pk,xk,pae,kk,jE,hae,Qk,Tk,Rk,Fk,Nk,gae,Ok,Lk,Mk,dae,Uk,_k,Hk=Xe(()=>{vk=\"[object RegExp]\",UE=\"[object String]\",_E=\"[object Number]\",HE=\"[object Boolean]\",Vd=\"[object Arguments]\",Sk=\"[object Symbol]\",Dk=\"[object Date]\",bk=\"[object Map]\",Pk=\"[object Set]\",xk=\"[object Array]\",pae=\"[object Function]\",kk=\"[object ArrayBuffer]\",jE=\"[object Object]\",hae=\"[object Error]\",Qk=\"[object DataView]\",Tk=\"[object Uint8Array]\",Rk=\"[object Uint8ClampedArray]\",Fk=\"[object Uint16Array]\",Nk=\"[object Uint32Array]\",gae=\"[object BigUint64Array]\",Ok=\"[object Int8Array]\",Lk=\"[object Int16Array]\",Mk=\"[object Int32Array]\",dae=\"[object BigInt64Array]\",Uk=\"[object Float32Array]\",_k=\"[object Float64Array]\"});function GE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var jk=Xe(()=>{});function mae(t,e){return u0(t,void 0,t,new Map,e)}function u0(t,e,r,s=new Map,a=void 0){let n=a?.(t,e,r,s);if(n!=null)return n;if(ME(t))return t;if(s.has(t))return s.get(t);if(Array.isArray(t)){let c=new Array(t.length);s.set(t,c);for(let f=0;f<t.length;f++)c[f]=u0(t[f],f,r,s,a);return Object.hasOwn(t,\"index\")&&(c.index=t.index),Object.hasOwn(t,\"input\")&&(c.input=t.input),c}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let c=new RegExp(t.source,t.flags);return c.lastIndex=t.lastIndex,c}if(t instanceof Map){let c=new Map;s.set(t,c);for(let[f,p]of t)c.set(f,u0(p,f,r,s,a));return c}if(t instanceof Set){let c=new Set;s.set(t,c);for(let f of t)c.add(u0(f,void 0,r,s,a));return c}if(typeof Buffer<\"u\"&&Buffer.isBuffer(t))return t.subarray();if(GE(t)){let c=new(Object.getPrototypeOf(t)).constructor(t.length);s.set(t,c);for(let f=0;f<t.length;f++)c[f]=u0(t[f],f,r,s,a);return c}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<\"u\"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let c=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return s.set(t,c),c0(c,t,r,s,a),c}if(typeof File<\"u\"&&t instanceof File){let c=new File([t],t.name,{type:t.type});return s.set(t,c),c0(c,t,r,s,a),c}if(t instanceof Blob){let c=new Blob([t],{type:t.type});return s.set(t,c),c0(c,t,r,s,a),c}if(t instanceof Error){let c=new t.constructor;return s.set(t,c),c.message=t.message,c.name=t.name,c.stack=t.stack,c.cause=t.cause,c0(c,t,r,s,a),c}if(typeof t==\"object\"&&xze(t)){let c=Object.create(Object.getPrototypeOf(t));return s.set(t,c),c0(c,t,r,s,a),c}return t}function c0(t,e,r=t,s,a){let n=[...Object.keys(e),...Wd(e)];for(let c=0;c<n.length;c++){let f=n[c],p=Object.getOwnPropertyDescriptor(t,f);(p==null||p.writable)&&(t[f]=u0(e[f],f,r,s,a))}}function xze(t){switch(Yd(t)){case Vd:case xk:case kk:case Qk:case HE:case Dk:case Uk:case _k:case Ok:case Lk:case Mk:case bk:case _E:case jE:case vk:case Pk:case UE:case Sk:case Tk:case Rk:case Fk:case Nk:return!0;default:return!1}}var B4=Xe(()=>{wk();Bk();Hk();Ik();jk()});function yae(t){return u0(t,void 0,t,new Map,void 0)}var Eae=Xe(()=>{B4()});function Iae(t,e){return mae(t,(r,s,a,n)=>{let c=e?.(r,s,a,n);if(c!=null)return c;if(typeof t==\"object\")switch(Object.prototype.toString.call(t)){case _E:case UE:case HE:{let f=new t.constructor(t?.valueOf());return c0(f,t),f}case Vd:{let f={};return c0(f,t),f.length=t.length,f[Symbol.iterator]=t[Symbol.iterator],f}default:return}})}var Cae=Xe(()=>{B4();Hk()});function f0(t){return Iae(t)}var v4=Xe(()=>{Cae()});function Gk(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case\"number\":return Number.isInteger(t)&&t>=0&&t<e;case\"symbol\":return!1;case\"string\":return kze.test(t)}}var kze,S4=Xe(()=>{kze=/^(?:0|[1-9]\\d*)$/});function BB(t){return t!==null&&typeof t==\"object\"&&Yd(t)===\"[object Arguments]\"}var D4=Xe(()=>{Bk()});function vB(t,e){let r;if(Array.isArray(e)?r=e:typeof e==\"string\"&&NE(e)&&t?.[e]==null?r=Mu(e):r=[e],r.length===0)return!1;let s=t;for(let a=0;a<r.length;a++){let n=r[a];if((s==null||!Object.hasOwn(s,n))&&!((Array.isArray(s)||BB(s))&&Gk(n)&&n<s.length))return!1;s=s[n]}return!0}var b4=Xe(()=>{mk();S4();D4();LE()});function P4(t){return typeof t==\"object\"&&t!==null}var wae=Xe(()=>{});function Bae(t){return typeof t==\"symbol\"||t instanceof Symbol}var vae=Xe(()=>{});function Sae(t,e){return Array.isArray(t)?!1:typeof t==\"number\"||typeof t==\"boolean\"||t==null||Bae(t)?!0:typeof t==\"string\"&&(Tze.test(t)||!Qze.test(t))||e!=null&&Object.hasOwn(e,t)}var Qze,Tze,Dae=Xe(()=>{vae();Qze=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Tze=/^\\w*$/});function A0(t,e){if(t==null)return!0;switch(typeof e){case\"symbol\":case\"number\":case\"object\":{if(Array.isArray(e))return bae(t,e);if(typeof e==\"number\"?e=OE(e):typeof e==\"object\"&&(Object.is(e?.valueOf(),-0)?e=\"-0\":e=String(e)),bc(e))return!1;if(t?.[e]===void 0)return!0;try{return delete t[e],!0}catch{return!1}}case\"string\":{if(t?.[e]===void 0&&NE(e))return bae(t,Mu(e));if(bc(e))return!1;try{return delete t[e],!0}catch{return!1}}}}function bae(t,e){let r=va(t,e.slice(0,-1),t),s=e[e.length-1];if(r?.[s]===void 0)return!0;if(bc(s))return!1;try{return delete r[s],!0}catch{return!1}}var x4=Xe(()=>{Ek();wB();mk();yk();LE()});function Pae(t){return t==null}var xae=Xe(()=>{});var kae,Qae=Xe(()=>{w4();kae=(t,e,r)=>{let s=t[e];(!(Object.hasOwn(t,e)&&Ck(s,r))||r===void 0&&!(e in t))&&(t[e]=r)}});function Tae(t,e,r,s){if(t==null&&!C4(t))return t;let a=Sae(e,t)?[e]:Array.isArray(e)?e:typeof e==\"string\"?Mu(e):[e],n=t;for(let c=0;c<a.length&&n!=null;c++){let f=OE(a[c]);if(bc(f))continue;let p;if(c===a.length-1)p=r(n[f]);else{let h=n[f],E=s?.(h,f,t);p=E!==void 0?E:C4(h)?h:Gk(a[c+1])?[]:{}}kae(n,f,p),n=n[f]}return t}var Rae=Xe(()=>{wB();Qae();S4();Dae();yk();Aae();LE()});function Jd(t,e,r){return Tae(t,e,()=>r,()=>{})}var k4=Xe(()=>{Rae()});function Fae(t,e=0,r={}){typeof r!=\"object\"&&(r={});let s=null,a=null,n=null,c=0,f=null,p,{leading:h=!1,trailing:E=!0,maxWait:C}=r,S=\"maxWait\"in r,P=S?Math.max(Number(C)||0,e):0,I=ue=>(s!==null&&(p=t.apply(a,s)),s=a=null,c=ue,p),R=ue=>(c=ue,f=setTimeout(ee,e),h&&s!==null?I(ue):p),N=ue=>(f=null,E&&s!==null?I(ue):p),U=ue=>{if(n===null)return!0;let le=ue-n,me=le>=e||le<0,pe=S&&ue-c>=P;return me||pe},W=ue=>{let le=n===null?0:ue-n,me=e-le,pe=P-(ue-c);return S?Math.min(me,pe):me},ee=()=>{let ue=Date.now();if(U(ue))return N(ue);f=setTimeout(ee,W(ue))},ie=function(...ue){let le=Date.now(),me=U(le);if(s=ue,a=this,n=le,me){if(f===null)return R(le);if(S)return clearTimeout(f),f=setTimeout(ee,e),I(le)}return f===null&&(f=setTimeout(ee,e)),p};return ie.cancel=()=>{f!==null&&clearTimeout(f),c=0,n=s=a=f=null},ie.flush=()=>f===null?p:N(Date.now()),ie}var Nae=Xe(()=>{});function Q4(t,e=0,r={}){let{leading:s=!0,trailing:a=!0}=r;return Fae(t,e,{leading:s,maxWait:e,trailing:a})}var Oae=Xe(()=>{Nae()});function T4(t){if(t==null)return\"\";if(typeof t==\"string\")return t;if(Array.isArray(t))return t.map(T4).join(\",\");let e=String(t);return e===\"0\"&&Object.is(Number(t),-0)?\"-0\":e}var Lae=Xe(()=>{});function R4(t){if(!t||typeof t!=\"object\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)===\"[object Object]\":!1}var Mae=Xe(()=>{});function Uae(t,e,r){return SB(t,e,void 0,void 0,void 0,void 0,r)}function SB(t,e,r,s,a,n,c){let f=c(t,e,r,s,a,n);if(f!==void 0)return f;if(typeof t==typeof e)switch(typeof t){case\"bigint\":case\"string\":case\"boolean\":case\"symbol\":case\"undefined\":return t===e;case\"number\":return t===e||Object.is(t,e);case\"function\":return t===e;case\"object\":return DB(t,e,n,c)}return DB(t,e,n,c)}function DB(t,e,r,s){if(Object.is(t,e))return!0;let a=Yd(t),n=Yd(e);if(a===Vd&&(a=jE),n===Vd&&(n=jE),a!==n)return!1;switch(a){case UE:return t.toString()===e.toString();case _E:{let p=t.valueOf(),h=e.valueOf();return Ck(p,h)}case HE:case Dk:case Sk:return Object.is(t.valueOf(),e.valueOf());case vk:return t.source===e.source&&t.flags===e.flags;case pae:return t===e}r=r??new Map;let c=r.get(t),f=r.get(e);if(c!=null&&f!=null)return c===e;r.set(t,e),r.set(e,t);try{switch(a){case bk:{if(t.size!==e.size)return!1;for(let[p,h]of t.entries())if(!e.has(p)||!SB(h,e.get(p),p,t,e,r,s))return!1;return!0}case Pk:{if(t.size!==e.size)return!1;let p=Array.from(t.values()),h=Array.from(e.values());for(let E=0;E<p.length;E++){let C=p[E],S=h.findIndex(P=>SB(C,P,void 0,t,e,r,s));if(S===-1)return!1;h.splice(S,1)}return!0}case xk:case Tk:case Rk:case Fk:case Nk:case gae:case Ok:case Lk:case Mk:case dae:case Uk:case _k:{if(typeof Buffer<\"u\"&&Buffer.isBuffer(t)!==Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let p=0;p<t.length;p++)if(!SB(t[p],e[p],p,t,e,r,s))return!1;return!0}case kk:return t.byteLength!==e.byteLength?!1:DB(new Uint8Array(t),new Uint8Array(e),r,s);case Qk:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:DB(new Uint8Array(t),new Uint8Array(e),r,s);case hae:return t.name===e.name&&t.message===e.message;case jE:{if(!(DB(t.constructor,e.constructor,r,s)||R4(t)&&R4(e)))return!1;let h=[...Object.keys(t),...Wd(t)],E=[...Object.keys(e),...Wd(e)];if(h.length!==E.length)return!1;for(let C=0;C<h.length;C++){let S=h[C],P=t[S];if(!Object.hasOwn(e,S))return!1;let I=e[S];if(!SB(P,I,S,t,e,r,s))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}var _ae=Xe(()=>{Mae();wk();Bk();Hk();w4()});function Hae(){}var jae=Xe(()=>{});function F4(t,e){return Uae(t,e,Hae)}var Gae=Xe(()=>{_ae();jae()});function qae(t){return GE(t)}var Wae=Xe(()=>{jk()});function Yae(t){if(typeof t!=\"object\"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!==\"[object Object]\"){let r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var Vae=Xe(()=>{});function Jae(t){if(ME(t))return t;if(Array.isArray(t)||GE(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<\"u\"&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let s=new r(t);return s.lastIndex=t.lastIndex,s}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let s=new r(t.message);return s.stack=t.stack,s.name=t.name,s.cause=t.cause,s}if(typeof File<\"u\"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t==\"object\"){let s=Object.create(e);return Object.assign(s,t)}return t}var Kae=Xe(()=>{Ik();jk()});function N4(t,...e){let r=e.slice(0,-1),s=e[e.length-1],a=t;for(let n=0;n<r.length;n++){let c=r[n];a=qk(a,c,s,new Map)}return a}function qk(t,e,r,s){if(ME(t)&&(t=Object(t)),e==null||typeof e!=\"object\")return t;if(s.has(e))return Jae(s.get(e));if(s.set(e,t),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)e[n]=e[n]??void 0}let a=[...Object.keys(e),...Wd(e)];for(let n=0;n<a.length;n++){let c=a[n];if(bc(c))continue;let f=e[c],p=t[c];if(BB(f)&&(f={...f}),BB(p)&&(p={...p}),typeof Buffer<\"u\"&&Buffer.isBuffer(f)&&(f=f0(f)),Array.isArray(f))if(typeof p==\"object\"&&p!=null){let E=[],C=Reflect.ownKeys(p);for(let S=0;S<C.length;S++){let P=C[S];E[P]=p[P]}p=E}else p=[];let h=r(p,f,c,t,e,s);h!=null?t[c]=h:Array.isArray(f)||P4(p)&&P4(f)?t[c]=qk(p,f,r,s):p==null&&Yae(f)?t[c]=qk({},f,r,s):p==null&&qae(f)?t[c]=f0(f):(p===void 0||f!==void 0)&&(t[c]=f)}return t}var zae=Xe(()=>{v4();wB();Kae();Ik();wk();D4();wae();Vae();Wae()});function O4(t,...e){if(t==null)return{};let r=yae(t);for(let s=0;s<e.length;s++){let a=e[s];switch(typeof a){case\"object\":{Array.isArray(a)||(a=Array.from(a));for(let n=0;n<a.length;n++){let c=a[n];A0(r,c)}break}case\"string\":case\"symbol\":case\"number\":{A0(r,a);break}}}return r}var Xae=Xe(()=>{x4();Eae()});function Kd(t,...e){if(Pae(t))return{};let r={};for(let s=0;s<e.length;s++){let a=e[s];switch(typeof a){case\"object\":{Array.isArray(a)||(uae(a)?a=Array.from(a):a=[a]);break}case\"string\":case\"symbol\":case\"number\":{a=[a];break}}for(let n of a){let c=va(t,n);c===void 0&&!vB(t,n)||(typeof n==\"string\"&&Object.hasOwn(t,n)?r[n]=c:Jd(r,n,c))}}return r}var Zae=Xe(()=>{Ek();b4();k4();fae();xae()});function $ae(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var ele=Xe(()=>{});function bB(t){return $ae(T4(t))}var tle=Xe(()=>{ele();Lae()});var ql=Xe(()=>{Oae();Gae();v4();Ek();b4();zae();Xae();Zae();k4();x4();tle();LE()});var je={};Vt(je,{AsyncActions:()=>U4,BufferStream:()=>M4,CachingStrategy:()=>fle,DefaultStream:()=>_4,allSettledSafe:()=>Uu,assertNever:()=>G4,bufferStream:()=>WE,buildIgnorePattern:()=>Uze,convertMapsToIndexableObjects:()=>Yk,dynamicRequire:()=>Pp,escapeRegExp:()=>Fze,getArrayWithDefault:()=>xB,getFactoryWithDefault:()=>Yl,getMapWithDefault:()=>q4,getSetWithDefault:()=>bp,groupBy:()=>jze,isIndexableObject:()=>L4,isPathLike:()=>_ze,isTaggedYarnVersion:()=>Rze,makeDeferred:()=>lle,mapAndFilter:()=>Wl,mapAndFind:()=>p0,mergeIntoTarget:()=>ple,overrideType:()=>Nze,parseBoolean:()=>kB,parseDuration:()=>Jk,parseInt:()=>YE,parseOptionalBoolean:()=>Ale,plural:()=>Wk,prettifyAsyncErrors:()=>qE,prettifySyncErrors:()=>W4,releaseAfterUseAsync:()=>Lze,replaceEnvVariables:()=>Vk,sortMap:()=>qs,toMerged:()=>Hze,tryParseOptionalBoolean:()=>Y4,validateEnum:()=>Oze});function Rze(t){return!!(sle.default.valid(t)&&t.match(/^[^-]+(-rc\\.[0-9]+)?$/))}function Wk(t,{one:e,more:r,zero:s=r}){return t===0?s:t===1?e:r}function Fze(t){return t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function Nze(t){}function G4(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function Oze(t,e){let r=Object.values(t);if(!r.includes(e))throw new nt(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(s=>JSON.stringify(s)).join(\", \")})`);return e}function Wl(t,e){let r=[];for(let s of t){let a=e(s);a!==ole&&r.push(a)}return r}function p0(t,e){for(let r of t){let s=e(r);if(s!==ale)return s}}function L4(t){return typeof t==\"object\"&&t!==null}async function Uu(t){let e=await Promise.allSettled(t),r=[];for(let s of e){if(s.status===\"rejected\")throw s.reason;r.push(s.value)}return r}function Yk(t){if(t instanceof Map&&(t=Object.fromEntries(t)),L4(t))for(let e of Object.keys(t)){let r=t[e];L4(r)&&(t[e]=Yk(r))}return t}function Yl(t,e,r){let s=t.get(e);return typeof s>\"u\"&&t.set(e,s=r()),s}function xB(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=[]),r}function bp(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Set),r}function q4(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Map),r}async function Lze(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function qE(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function W4(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function WE(t){return await new Promise((e,r)=>{let s=[];t.on(\"error\",a=>{r(a)}),t.on(\"data\",a=>{s.push(a)}),t.on(\"end\",()=>{e(Buffer.concat(s))})})}function lle(){let t,e;return{promise:new Promise((s,a)=>{t=s,e=a}),resolve:t,reject:e}}function cle(t){return PB(fe.fromPortablePath(t))}function ule(path){let physicalPath=fe.fromPortablePath(path),currentCacheEntry=PB.cache[physicalPath];delete PB.cache[physicalPath];let result;try{result=cle(physicalPath);let freshCacheEntry=PB.cache[physicalPath],dynamicModule=eval(\"module\"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{PB.cache[physicalPath]=currentCacheEntry}return result}function Mze(t){let e=rle.get(t),r=ce.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let s=ule(t);return rle.set(t,{mtime:r.mtimeMs,instance:s}),s}function Pp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return ule(t);case 1:return Mze(t);case 2:return cle(t);default:throw new Error(\"Unsupported caching strategy\")}}function qs(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function Uze(t){return t.length===0?null:t.map(e=>`(${nle.default.makeRe(e,{windows:!1,dot:!0}).source})`).join(\"|\")}function Vk(t,{env:e}){let r=/\\\\?\\${(?<variableName>[\\d\\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g;return t.replace(r,(s,...a)=>{if(s.startsWith(\"\\\\\"))return s.slice(1);let{variableName:n,colon:c,fallback:f}=a[a.length-1],p=Object.hasOwn(e,n),h=e[n];if(h||p&&!c)return h;if(f!=null)return f;throw new nt(`Environment variable not found (${n})`)})}function kB(t){switch(t){case\"true\":case\"1\":case 1:case!0:return!0;case\"false\":case\"0\":case 0:case!1:return!1;default:throw new Error(`Couldn't parse \"${t}\" as a boolean`)}}function Ale(t){return typeof t>\"u\"?t:kB(t)}function Y4(t){try{return Ale(t)}catch{return null}}function _ze(t){return!!(fe.isAbsolute(t)||t.match(/^(\\.{1,2}|~)\\//))}function ple(t,...e){let r=c=>({value:c}),s=r(t),a=e.map(c=>r(c)),{value:n}=N4(s,...a,(c,f)=>{if(Array.isArray(c)&&Array.isArray(f)){for(let p of f)c.find(h=>F4(h,p))||c.push(p);return c}});return n}function Hze(...t){return ple({},...t)}function jze(t,e){let r=Object.create(null);for(let s of t){let a=s[e];r[a]??=[],r[a].push(s)}return r}function YE(t){return typeof t==\"string\"?Number.parseInt(t,10):t}function Jk(t,e){let r=Gze.exec(t)?.groups;if(!r)throw new Error(`Couldn't parse \"${t}\" as a duration`);if(r.unit===void 0)return parseFloat(r.num);let s=H4[r.unit];if(!s)throw new Error(`Invalid duration unit \"${r.unit}\"`);return parseFloat(r.num)*s/H4[e]}var nle,ile,sle,j4,ole,ale,M4,U4,_4,PB,rle,fle,H4,Gze,Pc=Xe(()=>{Dt();Yt();ql();nle=ut(Go()),ile=ut(Ld()),sle=ut(Ai()),j4=Ie(\"stream\");ole=Symbol();Wl.skip=ole;ale=Symbol();p0.skip=ale;M4=class extends j4.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: BufferStream only accept buffers\");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};U4=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,ile.default)(e)}set(e,r){let s=this.deferred.get(e);typeof s>\"u\"&&this.deferred.set(e,s=lle());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&s.resolve()},n=>{this.promises.get(e)===a&&s.reject(n)}),s.promise}reduce(e,r){let s=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(s))}async wait(){await Promise.all(this.promises.values())}},_4=class extends j4.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: DefaultStream only accept buffers\");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},PB=eval(\"require\");rle=new Map;fle=(s=>(s[s.NoCache=0]=\"NoCache\",s[s.FsTime=1]=\"FsTime\",s[s.Node=2]=\"Node\",s))(fle||{});H4={ms:1,s:1e3,m:60*1e3,h:60*60*1e3,d:24*60*60*1e3,w:7*24*60*60*1e3},Gze=new RegExp(`^(?<num>\\\\d*\\\\.?\\\\d+)(?<unit>${Object.keys(H4).join(\"|\")})?$`)});var VE,V4,J4,hle=Xe(()=>{VE=(r=>(r.HARD=\"HARD\",r.SOFT=\"SOFT\",r))(VE||{}),V4=(s=>(s.Dependency=\"Dependency\",s.PeerDependency=\"PeerDependency\",s.PeerDependencyMeta=\"PeerDependencyMeta\",s))(V4||{}),J4=(s=>(s.Inactive=\"inactive\",s.Redundant=\"redundant\",s.Active=\"active\",s))(J4||{})});var he={};Vt(he,{LogLevel:()=>eQ,Style:()=>Xk,Type:()=>ht,addLogFilterSupport:()=>RB,applyColor:()=>ri,applyHyperlink:()=>KE,applyStyle:()=>zd,json:()=>Xd,jsonOrPretty:()=>Yze,mark:()=>$4,pretty:()=>Ht,prettyField:()=>Kf,prettyList:()=>Z4,prettyTruncatedLocatorList:()=>$k,stripAnsi:()=>JE.default,supportsColor:()=>Zk,supportsHyperlinks:()=>X4,tuple:()=>_u});function gle(t){let e=[\"KiB\",\"MiB\",\"GiB\",\"TiB\"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let s=1024**r;return`${Math.floor(t*100/s)/100} ${e[r-1]}`}function Kk(t,e){if(Array.isArray(e))return e.length===0?ri(t,\"[]\",ht.CODE):ri(t,\"[ \",ht.CODE)+e.map(r=>Kk(t,r)).join(\", \")+ri(t,\" ]\",ht.CODE);if(typeof e==\"string\")return ri(t,JSON.stringify(e),ht.STRING);if(typeof e==\"number\")return ri(t,JSON.stringify(e),ht.NUMBER);if(typeof e==\"boolean\")return ri(t,JSON.stringify(e),ht.BOOLEAN);if(e===null)return ri(t,\"null\",ht.NULL);if(typeof e==\"object\"&&Object.getPrototypeOf(e)===Object.prototype){let r=Object.entries(e);return r.length===0?ri(t,\"{}\",ht.CODE):ri(t,\"{ \",ht.CODE)+r.map(([s,a])=>`${Kk(t,s)}: ${Kk(t,a)}`).join(\", \")+ri(t,\" }\",ht.CODE)}if(typeof e>\"u\")return ri(t,\"undefined\",ht.NULL);throw new Error(\"Assertion failed: The value doesn't seem to be a valid JSON object\")}function _u(t,e){return[e,t]}function zd(t,e,r){return t.get(\"enableColors\")&&r&2&&(e=TB.default.bold(e)),e}function ri(t,e,r){if(!t.get(\"enableColors\"))return e;let s=qze.get(r);if(s===null)return e;let a=typeof s>\"u\"?r:z4.level>=3?s[0]:s[1],n=typeof a==\"number\"?K4.ansi256(a):a.startsWith(\"#\")?K4.hex(a):K4[a];if(typeof n!=\"function\")throw new Error(`Invalid format type ${a}`);return n(e)}function KE(t,e,r){return t.get(\"enableHyperlinks\")?Wze?`\\x1B]8;;${r}\\x1B\\\\${e}\\x1B]8;;\\x1B\\\\`:`\\x1B]8;;${r}\\x07${e}\\x1B]8;;\\x07`:e}function Ht(t,e,r){if(e===null)return ri(t,\"null\",ht.NULL);if(Object.hasOwn(zk,r))return zk[r].pretty(t,e);if(typeof e!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ri(t,e,r)}function Z4(t,e,r,{separator:s=\", \"}={}){return[...e].map(a=>Ht(t,a,r)).join(s)}function Xd(t,e){if(t===null)return null;if(Object.hasOwn(zk,e))return zk[e].json(t);if(typeof t!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function Yze(t,e,[r,s]){return t?Xd(r,s):Ht(e,r,s)}function $4(t){return{Check:ri(t,\"\\u2713\",\"green\"),Cross:ri(t,\"\\u2718\",\"red\"),Question:ri(t,\"?\",\"cyan\")}}function Kf(t,{label:e,value:[r,s]}){return`${Ht(t,e,ht.CODE)}: ${Ht(t,r,s)}`}function $k(t,e,r){let s=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${Yr(t,h)}, `,C=e3(h).length+2;if(s.length>0&&n<C)break;s.push([E,C]),n-=C,a.shift()}if(a.length===0)return s.map(([h])=>h).join(\"\").slice(0,-2);let c=\"X\".repeat(a.length.toString().length),f=`and ${c} more.`,p=a.length;for(;s.length>1&&n<f.length;)n+=s[s.length-1][1],p+=1,s.pop();return[s.map(([h])=>h).join(\"\"),f.replace(c,Ht(t,p,ht.NUMBER))].join(\"\")}function RB(t,{configuration:e}){let r=e.get(\"logFilters\"),s=new Map,a=new Map,n=[];for(let C of r){let S=C.get(\"level\");if(typeof S>\"u\")continue;let P=C.get(\"code\");typeof P<\"u\"&&s.set(P,S);let I=C.get(\"text\");typeof I<\"u\"&&a.set(I,S);let R=C.get(\"pattern\");typeof R<\"u\"&&n.push([dle.default.matcher(R,{contains:!0}),S])}n.reverse();let c=(C,S,P)=>{if(C===null||C===0)return P;let I=a.size>0||n.length>0?(0,JE.default)(S):S;if(a.size>0){let R=a.get(I);if(typeof R<\"u\")return R??P}if(n.length>0){for(let[R,N]of n)if(R(I))return N??P}if(s.size>0){let R=s.get(Yf(C));if(typeof R<\"u\")return R??P}return P},f=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(C,S,P,I){switch(c(S,P,I)){case\"info\":f.call(C,S,P);break;case\"warning\":p.call(C,S??0,P);break;case\"error\":h.call(C,S??0,P);break}};t.reportInfo=function(...C){return E(this,...C,\"info\")},t.reportWarning=function(...C){return E(this,...C,\"warning\")},t.reportError=function(...C){return E(this,...C,\"error\")}}var TB,QB,dle,JE,ht,Xk,z4,Zk,X4,K4,qze,qo,zk,Wze,eQ,xc=Xe(()=>{Dt();TB=ut(TE()),QB=ut(Fd());Yt();dle=ut(Go()),JE=ut(dk());Gx();Wo();ht={NO_HINT:\"NO_HINT\",ID:\"ID\",NULL:\"NULL\",SCOPE:\"SCOPE\",NAME:\"NAME\",RANGE:\"RANGE\",REFERENCE:\"REFERENCE\",NUMBER:\"NUMBER\",STRING:\"STRING\",BOOLEAN:\"BOOLEAN\",PATH:\"PATH\",URL:\"URL\",ADDED:\"ADDED\",REMOVED:\"REMOVED\",CODE:\"CODE\",INSPECT:\"INSPECT\",DURATION:\"DURATION\",SIZE:\"SIZE\",SIZE_DIFF:\"SIZE_DIFF\",IDENT:\"IDENT\",DESCRIPTOR:\"DESCRIPTOR\",LOCATOR:\"LOCATOR\",RESOLUTION:\"RESOLUTION\",DEPENDENT:\"DEPENDENT\",PACKAGE_EXTENSION:\"PACKAGE_EXTENSION\",SETTING:\"SETTING\",MARKDOWN:\"MARKDOWN\",MARKDOWN_INLINE:\"MARKDOWN_INLINE\"},Xk=(e=>(e[e.BOLD=2]=\"BOLD\",e))(Xk||{}),z4=QB.default.GITHUB_ACTIONS?{level:2}:TB.default.supportsColor?{level:TB.default.supportsColor.level}:{level:0},Zk=z4.level!==0,X4=Zk&&!QB.default.GITHUB_ACTIONS&&!QB.default.CIRCLE&&!QB.default.GITLAB,K4=new TB.default.Instance(z4),qze=new Map([[ht.NO_HINT,null],[ht.NULL,[\"#a853b5\",129]],[ht.SCOPE,[\"#d75f00\",166]],[ht.NAME,[\"#d7875f\",173]],[ht.RANGE,[\"#00afaf\",37]],[ht.REFERENCE,[\"#87afff\",111]],[ht.NUMBER,[\"#ffd700\",220]],[ht.STRING,[\"#b4bd68\",32]],[ht.BOOLEAN,[\"#faa023\",209]],[ht.PATH,[\"#d75fd7\",170]],[ht.URL,[\"#d75fd7\",170]],[ht.ADDED,[\"#5faf00\",70]],[ht.REMOVED,[\"#ff3131\",160]],[ht.CODE,[\"#87afff\",111]],[ht.SIZE,[\"#ffd700\",220]]]),qo=t=>t;zk={[ht.ID]:qo({pretty:(t,e)=>typeof e==\"number\"?ri(t,`${e}`,ht.NUMBER):ri(t,e,ht.CODE),json:t=>t}),[ht.INSPECT]:qo({pretty:(t,e)=>Kk(t,e),json:t=>t}),[ht.NUMBER]:qo({pretty:(t,e)=>ri(t,`${e}`,ht.NUMBER),json:t=>t}),[ht.IDENT]:qo({pretty:(t,e)=>$i(t,e),json:t=>un(t)}),[ht.LOCATOR]:qo({pretty:(t,e)=>Yr(t,e),json:t=>ll(t)}),[ht.DESCRIPTOR]:qo({pretty:(t,e)=>ni(t,e),json:t=>al(t)}),[ht.RESOLUTION]:qo({pretty:(t,{descriptor:e,locator:r})=>FB(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:al(t),locator:e!==null?ll(e):null})}),[ht.DEPENDENT]:qo({pretty:(t,{locator:e,descriptor:r})=>t3(t,e,r),json:({locator:t,descriptor:e})=>({locator:ll(t),descriptor:al(e)})}),[ht.PACKAGE_EXTENSION]:qo({pretty:(t,e)=>{switch(e.type){case\"Dependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"dependencies\",ht.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"peerDependencies\",ht.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependencyMeta\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"peerDependenciesMeta\",ht.CODE)} \\u27A4 ${$i(t,Sa(e.selector))} \\u27A4 ${ri(t,e.key,ht.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case\"Dependency\":return`${un(t.parentDescriptor)} > ${un(t.descriptor)}`;case\"PeerDependency\":return`${un(t.parentDescriptor)} >> ${un(t.descriptor)}`;case\"PeerDependencyMeta\":return`${un(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[ht.SETTING]:qo({pretty:(t,e)=>(t.get(e),KE(t,ri(t,e,ht.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[ht.DURATION]:qo({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),s=Math.ceil((e-r*60*1e3)/1e3);return s===0?`${r}m`:`${r}m ${s}s`}else{let r=Math.floor(e/1e3),s=e-r*1e3;return s===0?`${r}s`:`${r}s ${s}ms`}},json:t=>t}),[ht.SIZE]:qo({pretty:(t,e)=>ri(t,gle(e),ht.NUMBER),json:t=>t}),[ht.SIZE_DIFF]:qo({pretty:(t,e)=>{let r=e>=0?\"+\":\"-\",s=r===\"+\"?ht.REMOVED:ht.ADDED;return ri(t,`${r} ${gle(Math.max(Math.abs(e),1))}`,s)},json:t=>t}),[ht.PATH]:qo({pretty:(t,e)=>ri(t,fe.fromPortablePath(e),ht.PATH),json:t=>fe.fromPortablePath(t)}),[ht.MARKDOWN]:qo({pretty:(t,{text:e,format:r,paragraphs:s})=>Ho(e,{format:r,paragraphs:s}),json:({text:t})=>t}),[ht.MARKDOWN_INLINE]:qo({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\\n])*?)\\1/g,(r,s,a)=>Ht(t,s+a+s,ht.CODE)),e=e.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(r,s,a)=>zd(t,a,2)),e),json:t=>t})};Wze=!!process.env.KONSOLE_VERSION;eQ=(a=>(a.Error=\"error\",a.Warning=\"warning\",a.Info=\"info\",a.Discard=\"discard\",a))(eQ||{})});var mle=_(zE=>{\"use strict\";Object.defineProperty(zE,\"__esModule\",{value:!0});zE.splitWhen=zE.flatten=void 0;function Vze(t){return t.reduce((e,r)=>[].concat(e,r),[])}zE.flatten=Vze;function Jze(t,e){let r=[[]],s=0;for(let a of t)e(a)?(s++,r[s]=[]):r[s].push(a);return r}zE.splitWhen=Jze});var yle=_(tQ=>{\"use strict\";Object.defineProperty(tQ,\"__esModule\",{value:!0});tQ.isEnoentCodeError=void 0;function Kze(t){return t.code===\"ENOENT\"}tQ.isEnoentCodeError=Kze});var Ele=_(rQ=>{\"use strict\";Object.defineProperty(rQ,\"__esModule\",{value:!0});rQ.createDirentFromStats=void 0;var r3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function zze(t,e){return new r3(t,e)}rQ.createDirentFromStats=zze});var Ble=_(cs=>{\"use strict\";Object.defineProperty(cs,\"__esModule\",{value:!0});cs.convertPosixPathToPattern=cs.convertWindowsPathToPattern=cs.convertPathToPattern=cs.escapePosixPath=cs.escapeWindowsPath=cs.escape=cs.removeLeadingDotSegment=cs.makeAbsolute=cs.unixify=void 0;var Xze=Ie(\"os\"),Zze=Ie(\"path\"),Ile=Xze.platform()===\"win32\",$ze=2,eXe=/(\\\\?)([()*?[\\]{|}]|^!|[!+@](?=\\()|\\\\(?![!()*+?@[\\]{|}]))/g,tXe=/(\\\\?)([()[\\]{}]|^!|[!+@](?=\\())/g,rXe=/^\\\\\\\\([.?])/,nXe=/\\\\(?![!()+@[\\]{}])/g;function iXe(t){return t.replace(/\\\\/g,\"/\")}cs.unixify=iXe;function sXe(t,e){return Zze.resolve(t,e)}cs.makeAbsolute=sXe;function oXe(t){if(t.charAt(0)===\".\"){let e=t.charAt(1);if(e===\"/\"||e===\"\\\\\")return t.slice($ze)}return t}cs.removeLeadingDotSegment=oXe;cs.escape=Ile?n3:i3;function n3(t){return t.replace(tXe,\"\\\\$2\")}cs.escapeWindowsPath=n3;function i3(t){return t.replace(eXe,\"\\\\$2\")}cs.escapePosixPath=i3;cs.convertPathToPattern=Ile?Cle:wle;function Cle(t){return n3(t).replace(rXe,\"//$1\").replace(nXe,\"/\")}cs.convertWindowsPathToPattern=Cle;function wle(t){return i3(t)}cs.convertPosixPathToPattern=wle});var Sle=_((JOt,vle)=>{vle.exports=function(e){if(typeof e!=\"string\"||e===\"\")return!1;for(var r;r=/(\\\\).|([@?!+*]\\(.*\\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var Ple=_((KOt,ble)=>{var aXe=Sle(),Dle={\"{\":\"}\",\"(\":\")\",\"[\":\"]\"},lXe=function(t){if(t[0]===\"!\")return!0;for(var e=0,r=-2,s=-2,a=-2,n=-2,c=-2;e<t.length;){if(t[e]===\"*\"||t[e+1]===\"?\"&&/[\\].+)]/.test(t[e])||s!==-1&&t[e]===\"[\"&&t[e+1]!==\"]\"&&(s<e&&(s=t.indexOf(\"]\",e)),s>e&&(c===-1||c>s||(c=t.indexOf(\"\\\\\",e),c===-1||c>s)))||a!==-1&&t[e]===\"{\"&&t[e+1]!==\"}\"&&(a=t.indexOf(\"}\",e),a>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>a))||n!==-1&&t[e]===\"(\"&&t[e+1]===\"?\"&&/[:!=]/.test(t[e+2])&&t[e+3]!==\")\"&&(n=t.indexOf(\")\",e),n>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>n))||r!==-1&&t[e]===\"(\"&&t[e+1]!==\"|\"&&(r<e&&(r=t.indexOf(\"|\",e)),r!==-1&&t[r+1]!==\")\"&&(n=t.indexOf(\")\",r),n>r&&(c=t.indexOf(\"\\\\\",r),c===-1||c>n))))return!0;if(t[e]===\"\\\\\"){var f=t[e+1];e+=2;var p=Dle[f];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]===\"!\")return!0}else e++}return!1},cXe=function(t){if(t[0]===\"!\")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\\]]/.test(t[e]))return!0;if(t[e]===\"\\\\\"){var r=t[e+1];e+=2;var s=Dle[r];if(s){var a=t.indexOf(s,e);a!==-1&&(e=a+1)}if(t[e]===\"!\")return!0}else e++}return!1};ble.exports=function(e,r){if(typeof e!=\"string\"||e===\"\")return!1;if(aXe(e))return!0;var s=lXe;return r&&r.strict===!1&&(s=cXe),s(e)}});var kle=_((zOt,xle)=>{\"use strict\";var uXe=Ple(),fXe=Ie(\"path\").posix.dirname,AXe=Ie(\"os\").platform()===\"win32\",s3=\"/\",pXe=/\\\\/g,hXe=/[\\{\\[].*[\\}\\]]$/,gXe=/(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/,dXe=/\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;xle.exports=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&AXe&&e.indexOf(s3)<0&&(e=e.replace(pXe,s3)),hXe.test(e)&&(e+=s3),e+=\"a\";do e=fXe(e);while(uXe(e)||gXe.test(e));return e.replace(dXe,\"$1\")}});var Mle=_(jr=>{\"use strict\";Object.defineProperty(jr,\"__esModule\",{value:!0});jr.removeDuplicateSlashes=jr.matchAny=jr.convertPatternsToRe=jr.makeRe=jr.getPatternParts=jr.expandBraceExpansion=jr.expandPatternsWithBraceExpansion=jr.isAffectDepthOfReadingPattern=jr.endsWithSlashGlobStar=jr.hasGlobStar=jr.getBaseDirectory=jr.isPatternRelatedToParentDirectory=jr.getPatternsOutsideCurrentDirectory=jr.getPatternsInsideCurrentDirectory=jr.getPositivePatterns=jr.getNegativePatterns=jr.isPositivePattern=jr.isNegativePattern=jr.convertToNegativePattern=jr.convertToPositivePattern=jr.isDynamicPattern=jr.isStaticPattern=void 0;var mXe=Ie(\"path\"),yXe=kle(),o3=Go(),Qle=\"**\",EXe=\"\\\\\",IXe=/[*?]|^!/,CXe=/\\[[^[]*]/,wXe=/(?:^|[^!*+?@])\\([^(]*\\|[^|]*\\)/,BXe=/[!*+?@]\\([^(]*\\)/,vXe=/,|\\.\\./,SXe=/(?!^)\\/{2,}/g;function Tle(t,e={}){return!Rle(t,e)}jr.isStaticPattern=Tle;function Rle(t,e={}){return t===\"\"?!1:!!(e.caseSensitiveMatch===!1||t.includes(EXe)||IXe.test(t)||CXe.test(t)||wXe.test(t)||e.extglob!==!1&&BXe.test(t)||e.braceExpansion!==!1&&DXe(t))}jr.isDynamicPattern=Rle;function DXe(t){let e=t.indexOf(\"{\");if(e===-1)return!1;let r=t.indexOf(\"}\",e+1);if(r===-1)return!1;let s=t.slice(e,r);return vXe.test(s)}function bXe(t){return nQ(t)?t.slice(1):t}jr.convertToPositivePattern=bXe;function PXe(t){return\"!\"+t}jr.convertToNegativePattern=PXe;function nQ(t){return t.startsWith(\"!\")&&t[1]!==\"(\"}jr.isNegativePattern=nQ;function Fle(t){return!nQ(t)}jr.isPositivePattern=Fle;function xXe(t){return t.filter(nQ)}jr.getNegativePatterns=xXe;function kXe(t){return t.filter(Fle)}jr.getPositivePatterns=kXe;function QXe(t){return t.filter(e=>!a3(e))}jr.getPatternsInsideCurrentDirectory=QXe;function TXe(t){return t.filter(a3)}jr.getPatternsOutsideCurrentDirectory=TXe;function a3(t){return t.startsWith(\"..\")||t.startsWith(\"./..\")}jr.isPatternRelatedToParentDirectory=a3;function RXe(t){return yXe(t,{flipBackslashes:!1})}jr.getBaseDirectory=RXe;function FXe(t){return t.includes(Qle)}jr.hasGlobStar=FXe;function Nle(t){return t.endsWith(\"/\"+Qle)}jr.endsWithSlashGlobStar=Nle;function NXe(t){let e=mXe.basename(t);return Nle(t)||Tle(e)}jr.isAffectDepthOfReadingPattern=NXe;function OXe(t){return t.reduce((e,r)=>e.concat(Ole(r)),[])}jr.expandPatternsWithBraceExpansion=OXe;function Ole(t){let e=o3.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,s)=>r.length-s.length),e.filter(r=>r!==\"\")}jr.expandBraceExpansion=Ole;function LXe(t,e){let{parts:r}=o3.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith(\"/\")&&(r[0]=r[0].slice(1),r.unshift(\"\")),r}jr.getPatternParts=LXe;function Lle(t,e){return o3.makeRe(t,e)}jr.makeRe=Lle;function MXe(t,e){return t.map(r=>Lle(r,e))}jr.convertPatternsToRe=MXe;function UXe(t,e){return e.some(r=>r.test(t))}jr.matchAny=UXe;function _Xe(t){return t.replace(SXe,\"/\")}jr.removeDuplicateSlashes=_Xe});var jle=_((ZOt,Hle)=>{\"use strict\";var HXe=Ie(\"stream\"),Ule=HXe.PassThrough,jXe=Array.prototype.slice;Hle.exports=GXe;function GXe(){let t=[],e=jXe.call(arguments),r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};let a=s.end!==!1,n=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);let c=Ule(s);function f(){for(let E=0,C=arguments.length;E<C;E++)t.push(_le(arguments[E],s));return p(),this}function p(){if(r)return;r=!0;let E=t.shift();if(!E){process.nextTick(h);return}Array.isArray(E)||(E=[E]);let C=E.length+1;function S(){--C>0||(r=!1,p())}function P(I){function R(){I.removeListener(\"merge2UnpipeEnd\",R),I.removeListener(\"end\",R),n&&I.removeListener(\"error\",N),S()}function N(U){c.emit(\"error\",U)}if(I._readableState.endEmitted)return S();I.on(\"merge2UnpipeEnd\",R),I.on(\"end\",R),n&&I.on(\"error\",N),I.pipe(c,{end:!1}),I.resume()}for(let I=0;I<E.length;I++)P(E[I]);S()}function h(){r=!1,c.emit(\"queueDrain\"),a&&c.end()}return c.setMaxListeners(0),c.add=f,c.on(\"unpipe\",function(E){E.emit(\"merge2UnpipeEnd\")}),e.length&&f.apply(null,e),c}function _le(t,e){if(Array.isArray(t))for(let r=0,s=t.length;r<s;r++)t[r]=_le(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Ule(e))),!t._readableState||!t.pause||!t.pipe)throw new Error(\"Only readable stream can be merged.\");t.pause()}return t}});var qle=_(iQ=>{\"use strict\";Object.defineProperty(iQ,\"__esModule\",{value:!0});iQ.merge=void 0;var qXe=jle();function WXe(t){let e=qXe(t);return t.forEach(r=>{r.once(\"error\",s=>e.emit(\"error\",s))}),e.once(\"close\",()=>Gle(t)),e.once(\"end\",()=>Gle(t)),e}iQ.merge=WXe;function Gle(t){t.forEach(e=>e.emit(\"close\"))}});var Wle=_(XE=>{\"use strict\";Object.defineProperty(XE,\"__esModule\",{value:!0});XE.isEmpty=XE.isString=void 0;function YXe(t){return typeof t==\"string\"}XE.isString=YXe;function VXe(t){return t===\"\"}XE.isEmpty=VXe});var xp=_(Yo=>{\"use strict\";Object.defineProperty(Yo,\"__esModule\",{value:!0});Yo.string=Yo.stream=Yo.pattern=Yo.path=Yo.fs=Yo.errno=Yo.array=void 0;var JXe=mle();Yo.array=JXe;var KXe=yle();Yo.errno=KXe;var zXe=Ele();Yo.fs=zXe;var XXe=Ble();Yo.path=XXe;var ZXe=Mle();Yo.pattern=ZXe;var $Xe=qle();Yo.stream=$Xe;var eZe=Wle();Yo.string=eZe});var Kle=_(Vo=>{\"use strict\";Object.defineProperty(Vo,\"__esModule\",{value:!0});Vo.convertPatternGroupToTask=Vo.convertPatternGroupsToTasks=Vo.groupPatternsByBaseDirectory=Vo.getNegativePatternsAsPositive=Vo.getPositivePatterns=Vo.convertPatternsToTasks=Vo.generate=void 0;var Hu=xp();function tZe(t,e){let r=Yle(t,e),s=Yle(e.ignore,e),a=Vle(r),n=Jle(r,s),c=a.filter(E=>Hu.pattern.isStaticPattern(E,e)),f=a.filter(E=>Hu.pattern.isDynamicPattern(E,e)),p=l3(c,n,!1),h=l3(f,n,!0);return p.concat(h)}Vo.generate=tZe;function Yle(t,e){let r=t;return e.braceExpansion&&(r=Hu.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(s=>s.includes(\"/\")?s:`**/${s}`)),r.map(s=>Hu.pattern.removeDuplicateSlashes(s))}function l3(t,e,r){let s=[],a=Hu.pattern.getPatternsOutsideCurrentDirectory(t),n=Hu.pattern.getPatternsInsideCurrentDirectory(t),c=c3(a),f=c3(n);return s.push(...u3(c,e,r)),\".\"in f?s.push(f3(\".\",n,e,r)):s.push(...u3(f,e,r)),s}Vo.convertPatternsToTasks=l3;function Vle(t){return Hu.pattern.getPositivePatterns(t)}Vo.getPositivePatterns=Vle;function Jle(t,e){return Hu.pattern.getNegativePatterns(t).concat(e).map(Hu.pattern.convertToPositivePattern)}Vo.getNegativePatternsAsPositive=Jle;function c3(t){let e={};return t.reduce((r,s)=>{let a=Hu.pattern.getBaseDirectory(s);return a in r?r[a].push(s):r[a]=[s],r},e)}Vo.groupPatternsByBaseDirectory=c3;function u3(t,e,r){return Object.keys(t).map(s=>f3(s,t[s],e,r))}Vo.convertPatternGroupsToTasks=u3;function f3(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Hu.pattern.convertToNegativePattern))}}Vo.convertPatternGroupToTask=f3});var Xle=_(sQ=>{\"use strict\";Object.defineProperty(sQ,\"__esModule\",{value:!0});sQ.read=void 0;function rZe(t,e,r){e.fs.lstat(t,(s,a)=>{if(s!==null){zle(r,s);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){A3(r,a);return}e.fs.stat(t,(n,c)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){zle(r,n);return}A3(r,a);return}e.markSymbolicLink&&(c.isSymbolicLink=()=>!0),A3(r,c)})})}sQ.read=rZe;function zle(t,e){t(e)}function A3(t,e){t(null,e)}});var Zle=_(oQ=>{\"use strict\";Object.defineProperty(oQ,\"__esModule\",{value:!0});oQ.read=void 0;function nZe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}oQ.read=nZe});var $le=_(h0=>{\"use strict\";Object.defineProperty(h0,\"__esModule\",{value:!0});h0.createFileSystemAdapter=h0.FILE_SYSTEM_ADAPTER=void 0;var aQ=Ie(\"fs\");h0.FILE_SYSTEM_ADAPTER={lstat:aQ.lstat,stat:aQ.stat,lstatSync:aQ.lstatSync,statSync:aQ.statSync};function iZe(t){return t===void 0?h0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},h0.FILE_SYSTEM_ADAPTER),t)}h0.createFileSystemAdapter=iZe});var ece=_(h3=>{\"use strict\";Object.defineProperty(h3,\"__esModule\",{value:!0});var sZe=$le(),p3=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=sZe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};h3.default=p3});var Zd=_(g0=>{\"use strict\";Object.defineProperty(g0,\"__esModule\",{value:!0});g0.statSync=g0.stat=g0.Settings=void 0;var tce=Xle(),oZe=Zle(),g3=ece();g0.Settings=g3.default;function aZe(t,e,r){if(typeof e==\"function\"){tce.read(t,d3(),e);return}tce.read(t,d3(e),r)}g0.stat=aZe;function lZe(t,e){let r=d3(e);return oZe.read(t,r)}g0.statSync=lZe;function d3(t={}){return t instanceof g3.default?t:new g3.default(t)}});var ice=_((lLt,nce)=>{var rce;nce.exports=typeof queueMicrotask==\"function\"?queueMicrotask.bind(typeof window<\"u\"?window:global):t=>(rce||(rce=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var oce=_((cLt,sce)=>{sce.exports=uZe;var cZe=ice();function uZe(t,e){let r,s,a,n=!0;Array.isArray(t)?(r=[],s=t.length):(a=Object.keys(t),r={},s=a.length);function c(p){function h(){e&&e(p,r),e=null}n?cZe(h):h()}function f(p,h,E){r[p]=E,(--s===0||h)&&c(h)}s?a?a.forEach(function(p){t[p](function(h,E){f(p,h,E)})}):t.forEach(function(p,h){p(function(E,C){f(h,E,C)})}):c(null),n=!1}});var m3=_(cQ=>{\"use strict\";Object.defineProperty(cQ,\"__esModule\",{value:!0});cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var lQ=process.versions.node.split(\".\");if(lQ[0]===void 0||lQ[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ace=Number.parseInt(lQ[0],10),fZe=Number.parseInt(lQ[1],10),lce=10,AZe=10,pZe=ace>lce,hZe=ace===lce&&fZe>=AZe;cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=pZe||hZe});var cce=_(uQ=>{\"use strict\";Object.defineProperty(uQ,\"__esModule\",{value:!0});uQ.createDirentFromStats=void 0;var y3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function gZe(t,e){return new y3(t,e)}uQ.createDirentFromStats=gZe});var E3=_(fQ=>{\"use strict\";Object.defineProperty(fQ,\"__esModule\",{value:!0});fQ.fs=void 0;var dZe=cce();fQ.fs=dZe});var I3=_(AQ=>{\"use strict\";Object.defineProperty(AQ,\"__esModule\",{value:!0});AQ.joinPathSegments=void 0;function mZe(t,e,r){return t.endsWith(r)?t+e:t+r+e}AQ.joinPathSegments=mZe});var gce=_(d0=>{\"use strict\";Object.defineProperty(d0,\"__esModule\",{value:!0});d0.readdir=d0.readdirWithFileTypes=d0.read=void 0;var yZe=Zd(),uce=oce(),EZe=m3(),fce=E3(),Ace=I3();function IZe(t,e,r){if(!e.stats&&EZe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){pce(t,e,r);return}hce(t,e,r)}d0.read=IZe;function pce(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(f=>({dirent:f,name:f.name,path:Ace.joinPathSegments(t,f.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){C3(r,n);return}let c=n.map(f=>CZe(f,e));uce(c,(f,p)=>{if(f!==null){pQ(r,f);return}C3(r,p)})})}d0.readdirWithFileTypes=pce;function CZe(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=fce.fs.createDirentFromStats(t.name,a),r(null,t)})}}function hce(t,e,r){e.fs.readdir(t,(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(c=>{let f=Ace.joinPathSegments(t,c,e.pathSegmentSeparator);return p=>{yZe.stat(f,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let C={name:c,path:f,dirent:fce.fs.createDirentFromStats(c,E)};e.stats&&(C.stats=E),p(null,C)})}});uce(n,(c,f)=>{if(c!==null){pQ(r,c);return}C3(r,f)})})}d0.readdir=hce;function pQ(t,e){t(e)}function C3(t,e){t(null,e)}});var Ice=_(m0=>{\"use strict\";Object.defineProperty(m0,\"__esModule\",{value:!0});m0.readdir=m0.readdirWithFileTypes=m0.read=void 0;var wZe=Zd(),BZe=m3(),dce=E3(),mce=I3();function vZe(t,e){return!e.stats&&BZe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?yce(t,e):Ece(t,e)}m0.read=vZe;function yce(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{let a={dirent:s,name:s.name,path:mce.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=dce.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}m0.readdirWithFileTypes=yce;function Ece(t,e){return e.fs.readdirSync(t).map(s=>{let a=mce.joinPathSegments(t,s,e.pathSegmentSeparator),n=wZe.statSync(a,e.fsStatSettings),c={name:s,path:a,dirent:dce.fs.createDirentFromStats(s,n)};return e.stats&&(c.stats=n),c})}m0.readdir=Ece});var Cce=_(y0=>{\"use strict\";Object.defineProperty(y0,\"__esModule\",{value:!0});y0.createFileSystemAdapter=y0.FILE_SYSTEM_ADAPTER=void 0;var ZE=Ie(\"fs\");y0.FILE_SYSTEM_ADAPTER={lstat:ZE.lstat,stat:ZE.stat,lstatSync:ZE.lstatSync,statSync:ZE.statSync,readdir:ZE.readdir,readdirSync:ZE.readdirSync};function SZe(t){return t===void 0?y0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},y0.FILE_SYSTEM_ADAPTER),t)}y0.createFileSystemAdapter=SZe});var wce=_(B3=>{\"use strict\";Object.defineProperty(B3,\"__esModule\",{value:!0});var DZe=Ie(\"path\"),bZe=Zd(),PZe=Cce(),w3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=PZe.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,DZe.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new bZe.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};B3.default=w3});var hQ=_(E0=>{\"use strict\";Object.defineProperty(E0,\"__esModule\",{value:!0});E0.Settings=E0.scandirSync=E0.scandir=void 0;var Bce=gce(),xZe=Ice(),v3=wce();E0.Settings=v3.default;function kZe(t,e,r){if(typeof e==\"function\"){Bce.read(t,S3(),e);return}Bce.read(t,S3(e),r)}E0.scandir=kZe;function QZe(t,e){let r=S3(e);return xZe.read(t,r)}E0.scandirSync=QZe;function S3(t={}){return t instanceof v3.default?t:new v3.default(t)}});var Sce=_((ELt,vce)=>{\"use strict\";function TZe(t){var e=new t,r=e;function s(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:s,release:a}}vce.exports=TZe});var bce=_((ILt,D3)=>{\"use strict\";var RZe=Sce();function Dce(t,e,r){if(typeof t==\"function\"&&(r=e,e=t,t=null),!(r>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");var s=RZe(FZe),a=null,n=null,c=0,f=null,p={push:R,drain:kc,saturated:kc,pause:E,paused:!1,get concurrency(){return r},set concurrency(ue){if(!(ue>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");if(r=ue,!p.paused)for(;a&&c<r;)c++,U()},running:h,resume:P,idle:I,length:C,getQueue:S,unshift:N,empty:kc,kill:W,killAndDrain:ee,error:ie};return p;function h(){return c}function E(){p.paused=!0}function C(){for(var ue=a,le=0;ue;)ue=ue.next,le++;return le}function S(){for(var ue=a,le=[];ue;)le.push(ue.value),ue=ue.next;return le}function P(){if(p.paused){if(p.paused=!1,a===null){c++,U();return}for(;a&&c<r;)c++,U()}}function I(){return c===0&&p.length()===0}function R(ue,le){var me=s.get();me.context=t,me.release=U,me.value=ue,me.callback=le||kc,me.errorHandler=f,c>=r||p.paused?n?(n.next=me,n=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function N(ue,le){var me=s.get();me.context=t,me.release=U,me.value=ue,me.callback=le||kc,me.errorHandler=f,c>=r||p.paused?a?(me.next=a,a=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function U(ue){ue&&s.release(ue);var le=a;le&&c<=r?p.paused?c--:(n===a&&(n=null),a=le.next,le.next=null,e.call(t,le.value,le.worked),n===null&&p.empty()):--c===0&&p.drain()}function W(){a=null,n=null,p.drain=kc}function ee(){a=null,n=null,p.drain(),p.drain=kc}function ie(ue){f=ue}}function kc(){}function FZe(){this.value=null,this.callback=kc,this.next=null,this.release=kc,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var a=t.callback,n=t.errorHandler,c=t.value;t.value=null,t.callback=kc,t.errorHandler&&n(r,c),a.call(t.context,r,s),t.release(t)}}function NZe(t,e,r){typeof t==\"function\"&&(r=e,e=t,t=null);function s(E,C){e.call(this,E).then(function(S){C(null,S)},C)}var a=Dce(t,s,r),n=a.push,c=a.unshift;return a.push=f,a.unshift=p,a.drained=h,a;function f(E){var C=new Promise(function(S,P){n(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(kc),C}function p(E){var C=new Promise(function(S,P){c(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(kc),C}function h(){if(a.idle())return new Promise(function(S){S()});var E=a.drain,C=new Promise(function(S){a.drain=function(){E(),S()}});return C}}D3.exports=Dce;D3.exports.promise=NZe});var gQ=_(zf=>{\"use strict\";Object.defineProperty(zf,\"__esModule\",{value:!0});zf.joinPathSegments=zf.replacePathSegmentSeparator=zf.isAppliedFilter=zf.isFatalError=void 0;function OZe(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}zf.isFatalError=OZe;function LZe(t,e){return t===null||t(e)}zf.isAppliedFilter=LZe;function MZe(t,e){return t.split(/[/\\\\]/).join(e)}zf.replacePathSegmentSeparator=MZe;function UZe(t,e,r){return t===\"\"?e:t.endsWith(r)?t+e:t+r+e}zf.joinPathSegments=UZe});var x3=_(P3=>{\"use strict\";Object.defineProperty(P3,\"__esModule\",{value:!0});var _Ze=gQ(),b3=class{constructor(e,r){this._root=e,this._settings=r,this._root=_Ze.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};P3.default=b3});var T3=_(Q3=>{\"use strict\";Object.defineProperty(Q3,\"__esModule\",{value:!0});var HZe=Ie(\"events\"),jZe=hQ(),GZe=bce(),dQ=gQ(),qZe=x3(),k3=class extends qZe.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=jZe.scandir,this._emitter=new HZe.EventEmitter,this._queue=GZe(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit(\"end\")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error(\"The reader is already destroyed\");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on(\"entry\",e)}onError(e){this._emitter.once(\"error\",e)}onEnd(e){this._emitter.once(\"end\",e)}_pushToQueue(e,r){let s={directory:e,base:r};this._queue.push(s,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,a)=>{if(s!==null){r(s,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!dQ.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit(\"error\",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let s=e.path;r!==void 0&&(e.path=dQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),dQ.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&dQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit(\"entry\",e)}};Q3.default=k3});var Pce=_(F3=>{\"use strict\";Object.defineProperty(F3,\"__esModule\",{value:!0});var WZe=T3(),R3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new WZe.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{YZe(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{VZe(e,this._storage)}),this._reader.read()}};F3.default=R3;function YZe(t,e){t(e)}function VZe(t,e){t(null,e)}});var xce=_(O3=>{\"use strict\";Object.defineProperty(O3,\"__esModule\",{value:!0});var JZe=Ie(\"stream\"),KZe=T3(),N3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new KZe.default(this._root,this._settings),this._stream=new JZe.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit(\"error\",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};O3.default=N3});var kce=_(M3=>{\"use strict\";Object.defineProperty(M3,\"__esModule\",{value:!0});var zZe=hQ(),mQ=gQ(),XZe=x3(),L3=class extends XZe.default{constructor(){super(...arguments),this._scandir=zZe.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let s=this._scandir(e,this._settings.fsScandirSettings);for(let a of s)this._handleEntry(a,r)}catch(s){this._handleError(s)}}_handleError(e){if(mQ.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let s=e.path;r!==void 0&&(e.path=mQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),mQ.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&mQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};M3.default=L3});var Qce=_(_3=>{\"use strict\";Object.defineProperty(_3,\"__esModule\",{value:!0});var ZZe=kce(),U3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new ZZe.default(this._root,this._settings)}read(){return this._reader.read()}};_3.default=U3});var Tce=_(j3=>{\"use strict\";Object.defineProperty(j3,\"__esModule\",{value:!0});var $Ze=Ie(\"path\"),e$e=hQ(),H3=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,$Ze.sep),this.fsScandirSettings=new e$e.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};j3.default=H3});var EQ=_(Xf=>{\"use strict\";Object.defineProperty(Xf,\"__esModule\",{value:!0});Xf.Settings=Xf.walkStream=Xf.walkSync=Xf.walk=void 0;var Rce=Pce(),t$e=xce(),r$e=Qce(),G3=Tce();Xf.Settings=G3.default;function n$e(t,e,r){if(typeof e==\"function\"){new Rce.default(t,yQ()).read(e);return}new Rce.default(t,yQ(e)).read(r)}Xf.walk=n$e;function i$e(t,e){let r=yQ(e);return new r$e.default(t,r).read()}Xf.walkSync=i$e;function s$e(t,e){let r=yQ(e);return new t$e.default(t,r).read()}Xf.walkStream=s$e;function yQ(t={}){return t instanceof G3.default?t:new G3.default(t)}});var IQ=_(W3=>{\"use strict\";Object.defineProperty(W3,\"__esModule\",{value:!0});var o$e=Ie(\"path\"),a$e=Zd(),Fce=xp(),q3=class{constructor(e){this._settings=e,this._fsStatSettings=new a$e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return o$e.resolve(this._settings.cwd,e)}_makeEntry(e,r){let s={name:r,path:r,dirent:Fce.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!Fce.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};W3.default=q3});var J3=_(V3=>{\"use strict\";Object.defineProperty(V3,\"__esModule\",{value:!0});var l$e=Ie(\"stream\"),c$e=Zd(),u$e=EQ(),f$e=IQ(),Y3=class extends f$e.default{constructor(){super(...arguments),this._walkStream=u$e.walkStream,this._stat=c$e.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let s=e.map(this._getFullEntryPath,this),a=new l$e.PassThrough({objectMode:!0});a._write=(n,c,f)=>this._getEntry(s[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===s.length-1&&a.end(),f()}).catch(f);for(let n=0;n<s.length;n++)a.write(n);return a}_getEntry(e,r,s){return this._getStat(e).then(a=>this._makeEntry(a,r)).catch(a=>{if(s.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):s(a))})}};V3.default=Y3});var Nce=_(z3=>{\"use strict\";Object.defineProperty(z3,\"__esModule\",{value:!0});var A$e=EQ(),p$e=IQ(),h$e=J3(),K3=class extends p$e.default{constructor(){super(...arguments),this._walkAsync=A$e.walk,this._readerStream=new h$e.default(this._settings)}dynamic(e,r){return new Promise((s,a)=>{this._walkAsync(e,r,(n,c)=>{n===null?s(c):a(n)})})}async static(e,r){let s=[],a=this._readerStream.static(e,r);return new Promise((n,c)=>{a.once(\"error\",c),a.on(\"data\",f=>s.push(f)),a.once(\"end\",()=>n(s))})}};z3.default=K3});var Oce=_(Z3=>{\"use strict\";Object.defineProperty(Z3,\"__esModule\",{value:!0});var NB=xp(),X3=class{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),s=this._splitSegmentsIntoSections(r);this._storage.push({complete:s.length<=1,pattern:e,segments:r,sections:s})}}_getPatternSegments(e){return NB.pattern.getPatternParts(e,this._micromatchOptions).map(s=>NB.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:NB.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return NB.array.splitWhen(e,r=>r.dynamic&&NB.pattern.hasGlobStar(r.pattern))}};Z3.default=X3});var Lce=_(e8=>{\"use strict\";Object.defineProperty(e8,\"__esModule\",{value:!0});var g$e=Oce(),$3=class extends g$e.default{match(e){let r=e.split(\"/\"),s=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>s);for(let n of a){let c=n.sections[0];if(!n.complete&&s>c.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};e8.default=$3});var Mce=_(r8=>{\"use strict\";Object.defineProperty(r8,\"__esModule\",{value:!0});var CQ=xp(),d$e=Lce(),t8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){let a=this._getMatcher(r),n=this._getNegativePatternsRe(s);return c=>this._filter(e,c,a,n)}_getMatcher(e){return new d$e.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(CQ.pattern.isAffectDepthOfReadingPattern);return CQ.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=CQ.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,s)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let s=r.split(\"/\").length;if(e===\"\")return s;let a=e.split(\"/\").length;return s-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!CQ.pattern.matchAny(e,r)}};r8.default=t8});var Uce=_(i8=>{\"use strict\";Object.defineProperty(i8,\"__esModule\",{value:!0});var $d=xp(),n8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let s=$d.pattern.convertPatternsToRe(e,this._micromatchOptions),a=$d.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return n=>this._filter(n,s,a)}_filter(e,r,s){let a=$d.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(a,s))return!1;let n=e.dirent.isDirectory(),c=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(a,s,n);return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let s=$d.path.makeAbsolute(this._settings.cwd,e);return $d.pattern.matchAny(s,r)}_isMatchToPatterns(e,r,s){let a=$d.pattern.matchAny(e,r);return!a&&s?$d.pattern.matchAny(e+\"/\",r):a}};i8.default=n8});var _ce=_(o8=>{\"use strict\";Object.defineProperty(o8,\"__esModule\",{value:!0});var m$e=xp(),s8=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return m$e.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};o8.default=s8});var jce=_(l8=>{\"use strict\";Object.defineProperty(l8,\"__esModule\",{value:!0});var Hce=xp(),a8=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Hce.path.makeAbsolute(this._settings.cwd,r),r=Hce.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+=\"/\"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};l8.default=a8});var wQ=_(u8=>{\"use strict\";Object.defineProperty(u8,\"__esModule\",{value:!0});var y$e=Ie(\"path\"),E$e=Mce(),I$e=Uce(),C$e=_ce(),w$e=jce(),c8=class{constructor(e){this._settings=e,this.errorFilter=new C$e.default(this._settings),this.entryFilter=new I$e.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new E$e.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new w$e.default(this._settings)}_getRootDirectory(e){return y$e.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base===\".\"?\"\":e.base;return{basePath:r,pathSegmentSeparator:\"/\",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};u8.default=c8});var Gce=_(A8=>{\"use strict\";Object.defineProperty(A8,\"__esModule\",{value:!0});var B$e=Nce(),v$e=wQ(),f8=class extends v$e.default{constructor(){super(...arguments),this._reader=new B$e.default(this._settings)}async read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return(await this.api(r,e,s)).map(n=>s.transform(n))}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};A8.default=f8});var qce=_(h8=>{\"use strict\";Object.defineProperty(h8,\"__esModule\",{value:!0});var S$e=Ie(\"stream\"),D$e=J3(),b$e=wQ(),p8=class extends b$e.default{constructor(){super(...arguments),this._reader=new D$e.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e),a=this.api(r,e,s),n=new S$e.Readable({objectMode:!0,read:()=>{}});return a.once(\"error\",c=>n.emit(\"error\",c)).on(\"data\",c=>n.emit(\"data\",s.transform(c))).once(\"end\",()=>n.emit(\"end\")),n.once(\"close\",()=>a.destroy()),n}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};h8.default=p8});var Wce=_(d8=>{\"use strict\";Object.defineProperty(d8,\"__esModule\",{value:!0});var P$e=Zd(),x$e=EQ(),k$e=IQ(),g8=class extends k$e.default{constructor(){super(...arguments),this._walkSync=x$e.walkSync,this._statSync=P$e.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let s=[];for(let a of e){let n=this._getFullEntryPath(a),c=this._getEntry(n,a,r);c===null||!r.entryFilter(c)||s.push(c)}return s}_getEntry(e,r,s){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(s.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};d8.default=g8});var Yce=_(y8=>{\"use strict\";Object.defineProperty(y8,\"__esModule\",{value:!0});var Q$e=Wce(),T$e=wQ(),m8=class extends T$e.default{constructor(){super(...arguments),this._reader=new Q$e.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};y8.default=m8});var Vce=_(eI=>{\"use strict\";Object.defineProperty(eI,\"__esModule\",{value:!0});eI.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var $E=Ie(\"fs\"),R$e=Ie(\"os\"),F$e=Math.max(R$e.cpus().length,1);eI.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:$E.lstat,lstatSync:$E.lstatSync,stat:$E.stat,statSync:$E.statSync,readdir:$E.readdir,readdirSync:$E.readdirSync};var E8=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,F$e),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},eI.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};eI.default=E8});var BQ=_((WLt,Kce)=>{\"use strict\";var Jce=Kle(),N$e=Gce(),O$e=qce(),L$e=Yce(),I8=Vce(),Qc=xp();async function C8(t,e){ju(t);let r=w8(t,N$e.default,e),s=await Promise.all(r);return Qc.array.flatten(s)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,E){ju(h);let C=w8(h,L$e.default,E);return Qc.array.flatten(C)}t.sync=e;function r(h,E){ju(h);let C=w8(h,O$e.default,E);return Qc.stream.merge(C)}t.stream=r;function s(h,E){ju(h);let C=[].concat(h),S=new I8.default(E);return Jce.generate(C,S)}t.generateTasks=s;function a(h,E){ju(h);let C=new I8.default(E);return Qc.pattern.isDynamicPattern(h,C)}t.isDynamicPattern=a;function n(h){return ju(h),Qc.path.escape(h)}t.escapePath=n;function c(h){return ju(h),Qc.path.convertPathToPattern(h)}t.convertPathToPattern=c;let f;(function(h){function E(S){return ju(S),Qc.path.escapePosixPath(S)}h.escapePath=E;function C(S){return ju(S),Qc.path.convertPosixPathToPattern(S)}h.convertPathToPattern=C})(f=t.posix||(t.posix={}));let p;(function(h){function E(S){return ju(S),Qc.path.escapeWindowsPath(S)}h.escapePath=E;function C(S){return ju(S),Qc.path.convertWindowsPathToPattern(S)}h.convertPathToPattern=C})(p=t.win32||(t.win32={}))})(C8||(C8={}));function w8(t,e,r){let s=[].concat(t),a=new I8.default(r),n=Jce.generate(s,a),c=new e(a);return n.map(c.read,c)}function ju(t){if(![].concat(t).every(s=>Qc.string.isString(s)&&!Qc.string.isEmpty(s)))throw new TypeError(\"Patterns must be a string (non empty) or an array of strings\")}Kce.exports=C8});var Nn={};Vt(Nn,{checksumFile:()=>SQ,checksumPattern:()=>DQ,makeHash:()=>us});function us(...t){let e=(0,vQ.createHash)(\"sha512\"),r=\"\";for(let s of t)typeof s==\"string\"?r+=s:s&&(r&&(e.update(r),r=\"\"),e.update(s));return r&&e.update(r),e.digest(\"hex\")}async function SQ(t,{baseFs:e,algorithm:r}={baseFs:ce,algorithm:\"sha512\"}){let s=await e.openPromise(t,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,vQ.createHash)(r),f=0;for(;(f=await e.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await e.closePromise(s)}}async function DQ(t,{cwd:e}){let s=(await(0,B8.default)(t,{cwd:fe.fromPortablePath(e),onlyDirectories:!0})).map(f=>`${f}/**/*`),a=await(0,B8.default)([t,...s],{cwd:fe.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async f=>{let p=[Buffer.from(f)],h=J.join(e,fe.toPortablePath(f)),E=await ce.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await ce.readlinkPromise(h))):E.isFile()&&p.push(await ce.readFilePromise(h)),p.join(\"\\0\")})),c=(0,vQ.createHash)(\"sha512\");for(let f of n)c.update(f);return c.digest(\"hex\")}var vQ,B8,I0=Xe(()=>{Dt();vQ=Ie(\"crypto\"),B8=ut(BQ())});var G={};Vt(G,{allPeerRequests:()=>qB,areDescriptorsEqual:()=>eue,areIdentsEqual:()=>UB,areLocatorsEqual:()=>_B,areVirtualPackagesEquivalent:()=>Y$e,bindDescriptor:()=>q$e,bindLocator:()=>W$e,convertDescriptorToLocator:()=>bQ,convertLocatorToDescriptor:()=>S8,convertPackageToLocator:()=>H$e,convertToIdent:()=>_$e,convertToManifestRange:()=>ret,copyPackage:()=>LB,devirtualizeDescriptor:()=>MB,devirtualizeLocator:()=>rI,ensureDevirtualizedDescriptor:()=>j$e,ensureDevirtualizedLocator:()=>G$e,getIdentVendorPath:()=>x8,isPackageCompatible:()=>TQ,isVirtualDescriptor:()=>kp,isVirtualLocator:()=>Gu,makeDescriptor:()=>On,makeIdent:()=>Da,makeLocator:()=>Ws,makeRange:()=>kQ,parseDescriptor:()=>C0,parseFileStyleRange:()=>eet,parseIdent:()=>Sa,parseLocator:()=>Qp,parseRange:()=>em,prettyDependent:()=>t3,prettyDescriptor:()=>ni,prettyIdent:()=>$i,prettyLocator:()=>Yr,prettyLocatorNoColors:()=>e3,prettyRange:()=>iI,prettyReference:()=>jB,prettyResolution:()=>FB,prettyWorkspace:()=>GB,renamePackage:()=>D8,slugifyIdent:()=>v8,slugifyLocator:()=>nI,sortDescriptors:()=>sI,stringifyDescriptor:()=>al,stringifyIdent:()=>un,stringifyLocator:()=>ll,tryParseDescriptor:()=>HB,tryParseIdent:()=>tue,tryParseLocator:()=>xQ,tryParseRange:()=>$$e,unwrapIdentFromScope:()=>iet,virtualizeDescriptor:()=>b8,virtualizePackage:()=>P8,wrapIdentIntoScope:()=>net});function Da(t,e){if(t?.startsWith(\"@\"))throw new Error(\"Invalid scope: don't prefix it with '@'\");return{identHash:us(t,e),scope:t,name:e}}function On(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:us(t.identHash,e),range:e}}function Ws(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:us(t.identHash,e),reference:e}}function _$e(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function bQ(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function S8(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function H$e(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function D8(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function LB(t){return D8(t,t)}function b8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return On(t,`virtual:${e}#${t.range}`)}function P8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return D8(t,Ws(t,`virtual:${e}#${t.reference}`))}function kp(t){return t.range.startsWith(OB)}function Gu(t){return t.reference.startsWith(OB)}function MB(t){if(!kp(t))throw new Error(\"Not a virtual descriptor\");return On(t,t.range.replace(PQ,\"\"))}function rI(t){if(!Gu(t))throw new Error(\"Not a virtual descriptor\");return Ws(t,t.reference.replace(PQ,\"\"))}function j$e(t){return kp(t)?On(t,t.range.replace(PQ,\"\")):t}function G$e(t){return Gu(t)?Ws(t,t.reference.replace(PQ,\"\")):t}function q$e(t,e){return t.range.includes(\"::\")?t:On(t,`${t.range}::${tI.default.stringify(e)}`)}function W$e(t,e){return t.reference.includes(\"::\")?t:Ws(t,`${t.reference}::${tI.default.stringify(e)}`)}function UB(t,e){return t.identHash===e.identHash}function eue(t,e){return t.descriptorHash===e.descriptorHash}function _B(t,e){return t.locatorHash===e.locatorHash}function Y$e(t,e){if(!Gu(t))throw new Error(\"Invalid package type\");if(!Gu(e))throw new Error(\"Invalid package type\");if(!UB(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let s=e.dependencies.get(r.identHash);if(!s||!eue(r,s))return!1}return!0}function Sa(t){let e=tue(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function tue(t){let e=t.match(V$e);if(!e)return null;let[,r,s]=e;return Da(typeof r<\"u\"?r:null,s)}function C0(t,e=!1){let r=HB(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function HB(t,e=!1){let r=e?t.match(J$e):t.match(K$e);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid range (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return On(Da(c,a),f)}function Qp(t,e=!1){let r=xQ(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function xQ(t,e=!1){let r=e?t.match(z$e):t.match(X$e);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid reference (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return Ws(Da(c,a),f)}function em(t,e){let r=t.match(Z$e);if(r===null)throw new Error(`Invalid range (${t})`);let s=typeof r[1]<\"u\"?r[1]:null;if(typeof e?.requireProtocol==\"string\"&&s!==e.requireProtocol)throw new Error(`Invalid protocol (${s})`);if(e?.requireProtocol&&s===null)throw new Error(`Missing protocol (${s})`);let a=typeof r[3]<\"u\"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<\"u\"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),c=e?.parseSelector?tI.default.parse(n):n,f=typeof r[4]<\"u\"?tI.default.parse(r[4]):null;return{protocol:s,source:a,selector:c,params:f}}function $$e(t,e){try{return em(t,e)}catch{return null}}function eet(t,{protocol:e}){let{selector:r,params:s}=em(t,{requireProtocol:e,requireBindings:!0});if(typeof s.locator!=\"string\")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Qp(s.locator,!0),path:r}}function zce(t){return t=t.replaceAll(\"%\",\"%25\"),t=t.replaceAll(\":\",\"%3A\"),t=t.replaceAll(\"#\",\"%23\"),t}function tet(t){return t===null?!1:Object.entries(t).length>0}function kQ({protocol:t,source:e,selector:r,params:s}){let a=\"\";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${zce(e)}#`),a+=zce(r),tet(s)&&(a+=`::${tI.default.stringify(s)}`),a}function ret(t){let{params:e,protocol:r,source:s,selector:a}=em(t);for(let n in e)n.startsWith(\"__\")&&delete e[n];return kQ({protocol:r,source:s,params:e,selector:a})}function un(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function net(t,e){return t.scope?Da(e,`${t.scope}__${t.name}`):Da(e,t.name)}function iet(t,e){if(t.scope!==e)return t;let r=t.name.indexOf(\"__\");if(r===-1)return Da(null,t.name);let s=t.name.slice(0,r),a=t.name.slice(r+2);return Da(s,a)}function al(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function ll(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function v8(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function nI(t){let{protocol:e,selector:r}=em(t.reference),s=e!==null?e.replace(set,\"\"):\"exotic\",a=Xce.default.valid(r),n=a!==null?`${s}-${a}`:`${s}`,c=10;return t.scope?`${v8(t)}-${n}-${t.locatorHash.slice(0,c)}`:`${v8(t)}-${n}-${t.locatorHash.slice(0,c)}`}function $i(t,e){return e.scope?`${Ht(t,`@${e.scope}/`,ht.SCOPE)}${Ht(t,e.name,ht.NAME)}`:`${Ht(t,e.name,ht.NAME)}`}function QQ(t){if(t.startsWith(OB)){let e=QQ(t.substring(t.indexOf(\"#\")+1)),r=t.substring(OB.length,OB.length+M$e);return`${e} [${r}]`}else return t.replace(oet,\"?[...]\")}function iI(t,e){return`${Ht(t,QQ(e),ht.RANGE)}`}function ni(t,e){return`${$i(t,e)}${Ht(t,\"@\",ht.RANGE)}${iI(t,e.range)}`}function jB(t,e){return`${Ht(t,QQ(e),ht.REFERENCE)}`}function Yr(t,e){return`${$i(t,e)}${Ht(t,\"@\",ht.REFERENCE)}${jB(t,e.reference)}`}function e3(t){return`${un(t)}@${QQ(t.reference)}`}function sI(t){return qs(t,[e=>un(e),e=>e.range])}function GB(t,e){return $i(t,e.anchoredLocator)}function FB(t,e,r){let s=kp(e)?MB(e):e;return r===null?`${ni(t,s)} \\u2192 ${$4(t).Cross}`:s.identHash===r.identHash?`${ni(t,s)} \\u2192 ${jB(t,r.reference)}`:`${ni(t,s)} \\u2192 ${Yr(t,r)}`}function t3(t,e,r){return r===null?`${Yr(t,e)}`:`${Yr(t,e)} (via ${iI(t,r.range)})`}function x8(t){return`node_modules/${un(t)}`}function TQ(t,e){return t.conditions?U$e(t.conditions,r=>{let[,s,a]=r.match($ce),n=e[s];return n?n.includes(a):!0}):!0}function qB(t){let e=new Set;if(\"children\"in t)e.add(t);else for(let r of t.requests.values())e.add(r);for(let r of e)for(let s of r.children.values())e.add(s);return e}var tI,Xce,Zce,OB,M$e,$ce,U$e,PQ,V$e,J$e,K$e,z$e,X$e,Z$e,set,oet,Wo=Xe(()=>{tI=ut(Ie(\"querystring\")),Xce=ut(Ai()),Zce=ut(Ise());xc();I0();Pc();Wo();OB=\"virtual:\",M$e=5,$ce=/(os|cpu|libc)=([a-z0-9_-]+)/,U$e=(0,Zce.makeParser)($ce);PQ=/^[^#]*#/;V$e=/^(?:@([^/]+?)\\/)?([^@/]+)$/;J$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,K$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;z$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,X$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;Z$e=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;set=/:$/;oet=/\\?.*/});var rue,nue=Xe(()=>{Wo();rue={hooks:{reduceDependency:(t,e,r,s,{resolver:a,resolveOptions:n})=>{for(let{pattern:c,reference:f}of e.topLevelWorkspace.manifest.resolutions){if(c.from&&(c.from.fullName!==un(r)||e.configuration.normalizeLocator(Ws(Sa(c.from.fullName),c.from.description??r.reference)).locatorHash!==r.locatorHash)||c.descriptor.fullName!==un(t)||e.configuration.normalizeDependency(On(Qp(c.descriptor.fullName),c.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(On(t,f)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let s=GB(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${s}: ${n}`),reportError:(a,n)=>e.reportError(a,`${s}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error(\"Resolutions field will be ignored\"));for(let s of r.errors)e.reportWarning(57,s.message)}}}});var Ei,tm=Xe(()=>{Ei=class t{static{this.protocol=\"workspace:\"}supportsDescriptor(e,r){return!!(e.range.startsWith(t.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(t.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[s.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.getWorkspaceByCwd(e.reference.slice(t.protocol.length));return{...e,version:s.manifest.version||\"0.0.0\",languageName:\"unknown\",linkType:\"SOFT\",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...s.manifest.dependencies,...s.manifest.devDependencies])),peerDependencies:new Map([...s.manifest.peerDependencies]),dependenciesMeta:s.manifest.dependenciesMeta,peerDependenciesMeta:s.manifest.peerDependenciesMeta,bin:s.manifest.bin}}}});var Fr={};Vt(Fr,{SemVer:()=>lue.SemVer,clean:()=>cet,getComparator:()=>oue,mergeComparators:()=>k8,satisfiesWithPrereleases:()=>Zf,simplifyRanges:()=>Q8,stringifyComparator:()=>aue,validRange:()=>cl});function Zf(t,e,r=!1){if(!t)return!1;let s=`${e}${r}`,a=iue.get(s);if(typeof a>\"u\")try{a=new Tp.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{iue.set(s,a||null)}else if(a===null)return!1;let n;try{n=new Tp.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(c=>{for(let f of c)f.semver.prerelease&&(f.semver.prerelease=[]);return c.every(f=>f.test(n))}))}function cl(t){if(t.indexOf(\":\")!==-1)return null;let e=sue.get(t);if(typeof e<\"u\")return e;try{e=new Tp.default.Range(t)}catch{e=null}return sue.set(t,e),e}function cet(t){let e=aet.exec(t);return e?e[1]:null}function oue(t){if(t.semver===Tp.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case\"\":return{gt:[\">=\",t.semver],lt:[\"<=\",t.semver]};case\">\":case\">=\":return{gt:[t.operator,t.semver],lt:null};case\"<\":case\"<=\":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function k8(t){if(t.length===0)return null;let e=null,r=null;for(let s of t){if(s.gt){let a=e!==null?Tp.default.compare(s.gt[1],e[1]):null;(a===null||a>0||a===0&&s.gt[0]===\">\")&&(e=s.gt)}if(s.lt){let a=r!==null?Tp.default.compare(s.lt[1],r[1]):null;(a===null||a<0||a===0&&s.lt[0]===\"<\")&&(r=s.lt)}}if(e&&r){let s=Tp.default.compare(e[1],r[1]);if(s===0&&(e[0]===\">\"||r[0]===\"<\")||s>0)return null}return{gt:e,lt:r}}function aue(t){if(t.gt&&t.lt){if(t.gt[0]===\">=\"&&t.lt[0]===\"<=\"&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===\">=\"&&t.lt[0]===\"<\"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(\" \"):\"*\"}function Q8(t){let e=t.map(uet).map(s=>cl(s).set.map(a=>a.map(n=>oue(n)))),r=e.shift().map(s=>k8(s)).filter(s=>s!==null);for(let s of e){let a=[];for(let n of r)for(let c of s){let f=k8([n,...c]);f!==null&&a.push(f)}r=a}return r.length===0?null:r.map(s=>aue(s)).join(\" || \")}function uet(t){let e=t.split(\"||\");if(e.length>1){let r=new Set;for(let s of e)e.some(a=>a!==s&&Tp.default.subset(s,a))||r.add(s);if(r.size<e.length)return[...r].join(\" || \")}return t}var Tp,lue,iue,sue,aet,Rp=Xe(()=>{Tp=ut(Ai()),lue=ut(Ai()),iue=new Map;sue=new Map;aet=/^(?:[\\sv=]*?)((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s*)$/});function cue(t){let e=t.match(/^[ \\t]+/m);return e?e[0]:\"  \"}function uue(t){return t.charCodeAt(0)===65279?t.slice(1):t}function ba(t){return t.replace(/\\\\/g,\"/\")}function RQ(t,{yamlCompatibilityMode:e}){return e?Y4(t):typeof t>\"u\"||typeof t==\"boolean\"?t:null}function fue(t,e){let r=e.search(/[^!]/);if(r===-1)return\"invalid\";let s=r%2===0?\"\":\"!\",a=e.slice(r);return`${s}${t}=${a}`}function T8(t,e){return e.length===1?fue(t,e[0]):`(${e.map(r=>fue(t,r)).join(\" | \")})`}var Aue,Ut,oI=Xe(()=>{Dt();wc();Aue=ut(Ai());tm();Pc();Rp();Wo();Ut=class t{constructor(){this.indent=\"  \";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static{this.fileName=\"package.json\"}static{this.allDependencies=[\"dependencies\",\"devDependencies\",\"peerDependencies\"]}static{this.hardDependencies=[\"dependencies\",\"devDependencies\"]}static async tryFind(e,{baseFs:r=new Yn}={}){let s=J.join(e,\"package.json\");try{return await t.fromFile(s,{baseFs:r})}catch(a){if(a.code===\"ENOENT\")return null;throw a}}static async find(e,{baseFs:r}={}){let s=await t.tryFind(e,{baseFs:r});if(s===null)throw new Error(\"Manifest not found\");return s}static async fromFile(e,{baseFs:r=new Yn}={}){let s=new t;return await s.loadFile(e,{baseFs:r}),s}static fromText(e){let r=new t;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(uue(e)||\"{}\")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(r),this.indent=cue(e)}async loadFile(e,{baseFs:r=new Yn}){let s=await r.readFilePromise(e,\"utf8\"),a;try{a=JSON.parse(uue(s)||\"{}\")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=cue(s)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!=\"object\"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let s=[];if(this.name=null,typeof e.name==\"string\")try{this.name=Sa(e.name)}catch{s.push(new Error(\"Parsing failed for the 'name' field\"))}if(typeof e.version==\"string\"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let c of e.os)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'os' field\")):n.push(c)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let c of e.cpu)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'cpu' field\")):n.push(c)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let c of e.libc)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'libc' field\")):n.push(c)}else this.libc=null;if(typeof e.type==\"string\"?this.type=e.type:this.type=null,typeof e.packageManager==\"string\"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private==\"boolean\"?this.private=e.private:this.private=!1,typeof e.license==\"string\"?this.license=e.license:this.license=null,typeof e.languageName==\"string\"?this.languageName=e.languageName:this.languageName=null,typeof e.main==\"string\"?this.main=ba(e.main):this.main=null,typeof e.module==\"string\"?this.module=ba(e.module):this.module=null,e.browser!=null)if(typeof e.browser==\"string\")this.browser=ba(e.browser);else{this.browser=new Map;for(let[n,c]of Object.entries(e.browser))this.browser.set(ba(n),typeof c==\"string\"?ba(c):c)}else this.browser=null;if(this.bin=new Map,typeof e.bin==\"string\")e.bin.trim()===\"\"?s.push(new Error(\"Invalid bin field\")):this.name!==null?this.bin.set(this.name.name,ba(e.bin)):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.bin==\"object\"&&e.bin!==null)for(let[n,c]of Object.entries(e.bin)){if(typeof c!=\"string\"||c.trim()===\"\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}let f=Sa(n);this.bin.set(f.name,ba(c))}if(this.scripts=new Map,typeof e.scripts==\"object\"&&e.scripts!==null)for(let[n,c]of Object.entries(e.scripts)){if(typeof c!=\"string\"){s.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,c)}if(this.dependencies=new Map,typeof e.dependencies==\"object\"&&e.dependencies!==null)for(let[n,c]of Object.entries(e.dependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies==\"object\"&&e.devDependencies!==null)for(let[n,c]of Object.entries(e.devDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies==\"object\"&&e.peerDependencies!==null)for(let[n,c]of Object.entries(e.peerDependencies)){let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof c!=\"string\"||!c.startsWith(Ei.protocol)&&!cl(c))&&(s.push(new Error(`Invalid dependency range for '${n}'`)),c=\"*\");let p=On(f,c);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces==\"object\"&&e.workspaces!==null&&e.workspaces.nohoist&&s.push(new Error(\"'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead\"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces==\"object\"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!=\"string\"){s.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta==\"object\"&&e.dependenciesMeta!==null)for(let[n,c]of Object.entries(e.dependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}`));continue}let f=C0(n),p=this.ensureDependencyMeta(f),h=RQ(c.built,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=RQ(c.optional,{yamlCompatibilityMode:r});if(E===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}let C=RQ(c.unplugged,{yamlCompatibilityMode:r});if(C===null){s.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:C})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta==\"object\"&&e.peerDependenciesMeta!==null)for(let[n,c]of Object.entries(e.peerDependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}'`));continue}let f=C0(n),p=this.ensurePeerDependencyMeta(f),h=RQ(c.optional,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions==\"object\"&&e.resolutions!==null)for(let[n,c]of Object.entries(e.resolutions)){if(typeof c!=\"string\"){s.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:px(n),reference:c})}catch(f){s.push(f);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!=\"string\"){s.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig==\"object\"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access==\"string\"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main==\"string\"&&(this.publishConfig.main=ba(e.publishConfig.main)),typeof e.publishConfig.module==\"string\"&&(this.publishConfig.module=ba(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser==\"string\")this.publishConfig.browser=ba(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,c]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(ba(n),typeof c==\"string\"?ba(c):c)}if(typeof e.publishConfig.registry==\"string\"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.provenance==\"boolean\"&&(this.publishConfig.provenance=e.publishConfig.provenance),typeof e.publishConfig.bin==\"string\")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,ba(e.publishConfig.bin)]]):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.publishConfig.bin==\"object\"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,c]of Object.entries(e.publishConfig.bin)){if(typeof c!=\"string\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,ba(c))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!=\"string\"){s.push(new Error(\"Invalid executable file definition\"));continue}this.publishConfig.executableFiles.add(ba(n))}}}else this.publishConfig=null;if(typeof e.installConfig==\"object\"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n===\"hoistingLimits\"?typeof e.installConfig.hoistingLimits==\"string\"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:s.push(new Error(\"Invalid hoisting limits definition\")):n==\"selfReferences\"?typeof e.installConfig.selfReferences==\"boolean\"?this.installConfig.selfReferences=e.installConfig.selfReferences:s.push(new Error(\"Invalid selfReferences definition, must be a boolean value\")):s.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies==\"object\"&&e.optionalDependencies!==null)for(let[n,c]of Object.entries(e.optionalDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p);let h=On(f,\"unknown\"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged==\"boolean\"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=s}getForScope(e){switch(e){case\"dependencies\":return this.dependencies;case\"devDependencies\":return this.devDependencies;case\"peerDependencies\":return this.peerDependencies;default:throw new Error(`Unsupported value (\"${e}\")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(T8(\"os\",this.os)),this.cpu&&this.cpu.length>0&&e.push(T8(\"cpu\",this.cpu)),this.libc&&this.libc.length>0&&e.push(T8(\"libc\",this.libc)),e.length>0?e.join(\" & \"):null}ensureDependencyMeta(e){if(e.range!==\"unknown\"&&!Aue.default.valid(e.range))throw new Error(`Invalid meta field range for '${al(e)}'`);let r=un(e),s=e.range!==\"unknown\"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(s);return n||a.set(s,n={}),n}ensurePeerDependencyMeta(e){if(e.range!==\"unknown\")throw new Error(`Invalid meta field range for '${al(e)}'`);let r=un(e),s=this.peerDependenciesMeta.get(r);return s||this.peerDependenciesMeta.set(r,s={}),s}setRawField(e,r,{after:s=[]}={}){let a=new Set(s.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,c=this.raw={},f=!1;for(let p of Object.keys(n))c[p]=n[p],f||(a.delete(p),a.size===0&&(c[e]=r,f=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=un(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n==\"string\"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(c=>({[c]:n.get(c)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let s=[],a=[];for(let n of this.dependencies.values()){let c=this.dependenciesMeta.get(un(n)),f=!1;if(r&&c){let p=c.get(null);p&&p.optional&&(f=!0)}f?a.push(n):s.push(n)}s.length>0?e.dependencies=Object.assign({},...sI(s).map(n=>({[un(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...sI(a).map(n=>({[un(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...sI(this.devDependencies.values()).map(n=>({[un(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...sI(this.peerDependencies.values()).map(n=>({[un(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,c]of qs(this.dependenciesMeta.entries(),([f,p])=>f))for(let[f,p]of qs(c.entries(),([h,E])=>h!==null?`0${h}`:\"1\")){let h=f!==null?al(On(Sa(n),f)):n,E={...p};r&&f===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...qs(this.peerDependenciesMeta.entries(),([n,c])=>n).map(([n,c])=>({[n]:c}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:c})=>({[hx(n)]:c}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,c]of this.scripts.entries())e.scripts[n]=c}else delete e.scripts;return e}}});function Aet(t){return typeof t.reportCode<\"u\"}var pue,hue,fet,jt,Ao,Tc=Xe(()=>{ql();pue=Ie(\"stream\"),hue=Ie(\"string_decoder\"),fet=15,jt=class extends Error{constructor(r,s,a){super(s);this.reportExtra=a;this.reportCode=r}};Ao=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,s,a=new Promise(p=>{s=p}),n=p=>{let h=s;a=new Promise(E=>{s=E}),r=p,h()},c=(p=0)=>{n(r+1)},f=async function*(){for(;r<e;)await a,yield{progress:r/e}}();return{[Symbol.asyncIterator](){return f},hasProgress:!0,hasTitle:!1,set:n,tick:c}}static progressViaTitle(){let e,r,s=new Promise(c=>{r=c}),a=Q4(c=>{let f=r;s=new Promise(p=>{r=p}),e=c,f()},1e3/fet),n=async function*(){for(;;)await s,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let s=this.reportProgress(e);try{return await r(e)}finally{s.stop()}}startProgressSync(e,r){let s=this.reportProgress(e);try{return r(e)}finally{s.stop()}}reportInfoOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),s?.reportExtra?.(this))}reportWarningOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),s?.reportExtra?.(this))}reportErrorOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),s?.reportExtra?.(this))}reportExceptionOnce(e){Aet(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new pue.PassThrough,s=new hue.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var aI,R8=Xe(()=>{Tc();Wo();aI=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new jt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var rm,F8=Xe(()=>{Wo();rm=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ni(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var lI,N8=Xe(()=>{Dt();Wo();lI=class{supports(e){return!!e.reference.startsWith(\"virtual:\")}getLocalPath(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ws(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ws(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return nI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get(\"virtualFolder\"),c=this.getLocatorFilename(e),f=uo.makeVirtualPath(n,c,a),p=new _f(f,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var FQ,gue=Xe(()=>{FQ=class t{static{this.protocol=\"virtual:\"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling \"bindDescriptor\" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling \"getResolutionDependencies\" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling \"getCandidates\" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling \"getSatisfying\" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling \"resolve\" on a virtual locator is unsupported')}}});var cI,O8=Xe(()=>{Dt();tm();cI=class{supports(e){return!!e.reference.startsWith(Ei.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Ei.protocol.length))}}});function WB(t){return typeof t==\"object\"&&t!==null&&!Array.isArray(t)}function due(t){return typeof t>\"u\"?3:WB(t)?0:Array.isArray(t)?1:2}function U8(t,e){return Object.hasOwn(t,e)}function het(t){return WB(t)&&U8(t,\"onConflict\")&&typeof t.onConflict==\"string\"}function get(t){if(typeof t>\"u\")return{onConflict:\"default\",value:t};if(!het(t))return{onConflict:\"default\",value:t};if(U8(t,\"value\"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function mue(t,e){let r=WB(t)&&U8(t,e)?t[e]:void 0;return get(r)}function uI(t,e){return[t,e,yue]}function _8(t){return Array.isArray(t)?t[2]===yue:!1}function L8(t,e){if(WB(t)){let r={};for(let s of Object.keys(t))r[s]=L8(t[s],e);return uI(e,r)}return Array.isArray(t)?uI(e,t.map(r=>L8(r,e))):uI(e,t)}function M8(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-1;E>=s;--E){let[C,S]=t[E],{onConflict:P,value:I}=mue(S,r),R=due(I);if(R!==3){if(n??=R,R!==n||P===\"hardReset\"){p=f;break}if(R===2)return uI(C,I);if(c.unshift([C,I]),P===\"reset\"){p=E;break}P===\"extend\"&&E===s&&(s=0),f=E}}if(typeof n>\"u\")return null;let h=c.map(([E])=>E).join(\", \");switch(n){case 1:return uI(h,new Array().concat(...c.map(([E,C])=>C.map(S=>L8(S,E)))));case 0:{let E=Object.assign({},...c.map(([,R])=>R)),C=Object.keys(E),S={},P=t.map(([R,N])=>[R,mue(N,r).value]),I=pet(P,([R,N])=>{let U=due(N);return U!==0&&U!==3});if(I!==-1){let R=P.slice(I+1);for(let N of C)S[N]=M8(R,e,N,0,R.length)}else for(let R of C)S[R]=M8(P,e,R,p,P.length);return uI(h,S)}default:throw new Error(\"Assertion failed: Non-extendable value type\")}}function Eue(t){return M8(t.map(([e,r])=>[e,{\".\":r}]),[],\".\",0,t.length)}function YB(t){return _8(t)?t[1]:t}function NQ(t){let e=_8(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>NQ(r));if(WB(e)){let r={};for(let[s,a]of Object.entries(e))r[s]=NQ(a);return r}return e}function H8(t){return _8(t)?t[0]:null}var pet,yue,Iue=Xe(()=>{pet=(t,e,r)=>{let s=[...t];return s.reverse(),s.findIndex(e,r)};yue=Symbol()});var OQ={};Vt(OQ,{getDefaultGlobalFolder:()=>G8,getHomeFolder:()=>fI,isFolderInside:()=>q8});function G8(){if(process.platform===\"win32\"){let t=fe.toPortablePath(process.env.LOCALAPPDATA||fe.join((0,j8.homedir)(),\"AppData\",\"Local\"));return J.resolve(t,\"Yarn/Berry\")}if(process.env.XDG_DATA_HOME){let t=fe.toPortablePath(process.env.XDG_DATA_HOME);return J.resolve(t,\"yarn/berry\")}return J.resolve(fI(),\".yarn/berry\")}function fI(){return fe.toPortablePath((0,j8.homedir)()||\"/usr/local/share\")}function q8(t,e){let r=J.relative(e,t);return r&&!r.startsWith(\"..\")&&!J.isAbsolute(r)}var j8,LQ=Xe(()=>{Dt();j8=Ie(\"os\")});var Bue=_((EMt,wue)=>{\"use strict\";var W8=Ie(\"https\"),Y8=Ie(\"http\"),{URL:Cue}=Ie(\"url\"),V8=class extends Y8.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r==\"string\"?new Cue(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:\"CONNECT\",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?\"keep-alive\":\"close\",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||\"\")}:${decodeURIComponent(this.proxy.password||\"\")}`).toString(\"base64\");s.headers[\"proxy-authorization\"]=`Basic ${n}`}this.proxy.protocol===\"https:\"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol===\"http:\"?Y8:W8).request(s);a.once(\"connect\",(n,c,f)=>{a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200?r(null,c):(c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),a.once(\"timeout\",()=>{a.destroy(new Error(\"Proxy timeout\"))}),a.once(\"error\",n=>{a.removeAllListeners(),r(n,null)}),a.end()}},J8=class extends W8.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r==\"string\"?new Cue(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:\"CONNECT\",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?\"keep-alive\":\"close\",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||\"\")}:${decodeURIComponent(this.proxy.password||\"\")}`).toString(\"base64\");s.headers[\"proxy-authorization\"]=`Basic ${n}`}this.proxy.protocol===\"https:\"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol===\"http:\"?Y8:W8).request(s);a.once(\"connect\",(n,c,f)=>{if(a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200){let p=super.createConnection({...e,socket:c});r(null,p)}else c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),a.once(\"timeout\",()=>{a.destroy(new Error(\"Proxy timeout\"))}),a.once(\"error\",n=>{a.removeAllListeners(),r(n,null)}),a.end()}};wue.exports={HttpProxyAgent:V8,HttpsProxyAgent:J8}});var K8,vue,Sue,Due=Xe(()=>{K8=ut(Bue(),1),vue=K8.default.HttpProxyAgent,Sue=K8.default.HttpsProxyAgent});var Np=_((Fp,MQ)=>{\"use strict\";Object.defineProperty(Fp,\"__esModule\",{value:!0});var bue=[\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"];function met(t){return bue.includes(t)}var yet=[\"Function\",\"Generator\",\"AsyncGenerator\",\"GeneratorFunction\",\"AsyncGeneratorFunction\",\"AsyncFunction\",\"Observable\",\"Array\",\"Buffer\",\"Blob\",\"Object\",\"RegExp\",\"Date\",\"Error\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Promise\",\"URL\",\"FormData\",\"URLSearchParams\",\"HTMLElement\",...bue];function Eet(t){return yet.includes(t)}var Iet=[\"null\",\"undefined\",\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\"];function Cet(t){return Iet.includes(t)}function AI(t){return e=>typeof e===t}var{toString:Pue}=Object.prototype,VB=t=>{let e=Pue.call(t).slice(8,-1);if(/HTML\\w+Element/.test(e)&&be.domElement(t))return\"HTMLElement\";if(Eet(e))return e},pi=t=>e=>VB(e)===t;function be(t){if(t===null)return\"null\";switch(typeof t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"Function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";default:}if(be.observable(t))return\"Observable\";if(be.array(t))return\"Array\";if(be.buffer(t))return\"Buffer\";let e=VB(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError(\"Please don't use object wrappers for primitive types\");return\"Object\"}be.undefined=AI(\"undefined\");be.string=AI(\"string\");var wet=AI(\"number\");be.number=t=>wet(t)&&!be.nan(t);be.bigint=AI(\"bigint\");be.function_=AI(\"function\");be.null_=t=>t===null;be.class_=t=>be.function_(t)&&t.toString().startsWith(\"class \");be.boolean=t=>t===!0||t===!1;be.symbol=AI(\"symbol\");be.numericString=t=>be.string(t)&&!be.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));be.array=(t,e)=>Array.isArray(t)?be.function_(e)?t.every(e):!0:!1;be.buffer=t=>{var e,r,s,a;return(a=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&a!==void 0?a:!1};be.blob=t=>pi(\"Blob\")(t);be.nullOrUndefined=t=>be.null_(t)||be.undefined(t);be.object=t=>!be.null_(t)&&(typeof t==\"object\"||be.function_(t));be.iterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};be.asyncIterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};be.generator=t=>{var e,r;return be.iterable(t)&&be.function_((e=t)===null||e===void 0?void 0:e.next)&&be.function_((r=t)===null||r===void 0?void 0:r.throw)};be.asyncGenerator=t=>be.asyncIterable(t)&&be.function_(t.next)&&be.function_(t.throw);be.nativePromise=t=>pi(\"Promise\")(t);var Bet=t=>{var e,r;return be.function_((e=t)===null||e===void 0?void 0:e.then)&&be.function_((r=t)===null||r===void 0?void 0:r.catch)};be.promise=t=>be.nativePromise(t)||Bet(t);be.generatorFunction=pi(\"GeneratorFunction\");be.asyncGeneratorFunction=t=>VB(t)===\"AsyncGeneratorFunction\";be.asyncFunction=t=>VB(t)===\"AsyncFunction\";be.boundFunction=t=>be.function_(t)&&!t.hasOwnProperty(\"prototype\");be.regExp=pi(\"RegExp\");be.date=pi(\"Date\");be.error=pi(\"Error\");be.map=t=>pi(\"Map\")(t);be.set=t=>pi(\"Set\")(t);be.weakMap=t=>pi(\"WeakMap\")(t);be.weakSet=t=>pi(\"WeakSet\")(t);be.int8Array=pi(\"Int8Array\");be.uint8Array=pi(\"Uint8Array\");be.uint8ClampedArray=pi(\"Uint8ClampedArray\");be.int16Array=pi(\"Int16Array\");be.uint16Array=pi(\"Uint16Array\");be.int32Array=pi(\"Int32Array\");be.uint32Array=pi(\"Uint32Array\");be.float32Array=pi(\"Float32Array\");be.float64Array=pi(\"Float64Array\");be.bigInt64Array=pi(\"BigInt64Array\");be.bigUint64Array=pi(\"BigUint64Array\");be.arrayBuffer=pi(\"ArrayBuffer\");be.sharedArrayBuffer=pi(\"SharedArrayBuffer\");be.dataView=pi(\"DataView\");be.enumCase=(t,e)=>Object.values(e).includes(t);be.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;be.urlInstance=t=>pi(\"URL\")(t);be.urlString=t=>{if(!be.string(t))return!1;try{return new URL(t),!0}catch{return!1}};be.truthy=t=>!!t;be.falsy=t=>!t;be.nan=t=>Number.isNaN(t);be.primitive=t=>be.null_(t)||Cet(typeof t);be.integer=t=>Number.isInteger(t);be.safeInteger=t=>Number.isSafeInteger(t);be.plainObject=t=>{if(Pue.call(t)!==\"[object Object]\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};be.typedArray=t=>met(VB(t));var vet=t=>be.safeInteger(t)&&t>=0;be.arrayLike=t=>!be.nullOrUndefined(t)&&!be.function_(t)&&vet(t.length);be.inRange=(t,e)=>{if(be.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(be.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Det=1,bet=[\"innerHTML\",\"ownerDocument\",\"style\",\"attributes\",\"nodeValue\"];be.domElement=t=>be.object(t)&&t.nodeType===Det&&be.string(t.nodeName)&&!be.plainObject(t)&&bet.every(e=>e in t);be.observable=t=>{var e,r,s,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(s=t)[\"@@observable\"])===null||a===void 0?void 0:a.call(s)):!1};be.nodeStream=t=>be.object(t)&&be.function_(t.pipe)&&!be.observable(t);be.infinite=t=>t===1/0||t===-1/0;var xue=t=>e=>be.integer(e)&&Math.abs(e%2)===t;be.evenInteger=xue(0);be.oddInteger=xue(1);be.emptyArray=t=>be.array(t)&&t.length===0;be.nonEmptyArray=t=>be.array(t)&&t.length>0;be.emptyString=t=>be.string(t)&&t.length===0;var Pet=t=>be.string(t)&&!/\\S/.test(t);be.emptyStringOrWhitespace=t=>be.emptyString(t)||Pet(t);be.nonEmptyString=t=>be.string(t)&&t.length>0;be.nonEmptyStringAndNotWhitespace=t=>be.string(t)&&!be.emptyStringOrWhitespace(t);be.emptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length===0;be.nonEmptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length>0;be.emptySet=t=>be.set(t)&&t.size===0;be.nonEmptySet=t=>be.set(t)&&t.size>0;be.emptyMap=t=>be.map(t)&&t.size===0;be.nonEmptyMap=t=>be.map(t)&&t.size>0;be.propertyKey=t=>be.any([be.string,be.number,be.symbol],t);be.formData=t=>pi(\"FormData\")(t);be.urlSearchParams=t=>pi(\"URLSearchParams\")(t);var kue=(t,e,r)=>{if(!be.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError(\"Invalid number of values\");return t.call(r,e)};be.any=(t,...e)=>(be.array(t)?t:[t]).some(s=>kue(Array.prototype.some,s,e));be.all=(t,...e)=>kue(Array.prototype.every,t,e);var _t=(t,e,r,s={})=>{if(!t){let{multipleValues:a}=s,n=a?`received values of types ${[...new Set(r.map(c=>`\\`${be(c)}\\``))].join(\", \")}`:`received value of type \\`${be(r)}\\``;throw new TypeError(`Expected value which is \\`${e}\\`, ${n}.`)}};Fp.assert={undefined:t=>_t(be.undefined(t),\"undefined\",t),string:t=>_t(be.string(t),\"string\",t),number:t=>_t(be.number(t),\"number\",t),bigint:t=>_t(be.bigint(t),\"bigint\",t),function_:t=>_t(be.function_(t),\"Function\",t),null_:t=>_t(be.null_(t),\"null\",t),class_:t=>_t(be.class_(t),\"Class\",t),boolean:t=>_t(be.boolean(t),\"boolean\",t),symbol:t=>_t(be.symbol(t),\"symbol\",t),numericString:t=>_t(be.numericString(t),\"string with a number\",t),array:(t,e)=>{_t(be.array(t),\"Array\",t),e&&t.forEach(e)},buffer:t=>_t(be.buffer(t),\"Buffer\",t),blob:t=>_t(be.blob(t),\"Blob\",t),nullOrUndefined:t=>_t(be.nullOrUndefined(t),\"null or undefined\",t),object:t=>_t(be.object(t),\"Object\",t),iterable:t=>_t(be.iterable(t),\"Iterable\",t),asyncIterable:t=>_t(be.asyncIterable(t),\"AsyncIterable\",t),generator:t=>_t(be.generator(t),\"Generator\",t),asyncGenerator:t=>_t(be.asyncGenerator(t),\"AsyncGenerator\",t),nativePromise:t=>_t(be.nativePromise(t),\"native Promise\",t),promise:t=>_t(be.promise(t),\"Promise\",t),generatorFunction:t=>_t(be.generatorFunction(t),\"GeneratorFunction\",t),asyncGeneratorFunction:t=>_t(be.asyncGeneratorFunction(t),\"AsyncGeneratorFunction\",t),asyncFunction:t=>_t(be.asyncFunction(t),\"AsyncFunction\",t),boundFunction:t=>_t(be.boundFunction(t),\"Function\",t),regExp:t=>_t(be.regExp(t),\"RegExp\",t),date:t=>_t(be.date(t),\"Date\",t),error:t=>_t(be.error(t),\"Error\",t),map:t=>_t(be.map(t),\"Map\",t),set:t=>_t(be.set(t),\"Set\",t),weakMap:t=>_t(be.weakMap(t),\"WeakMap\",t),weakSet:t=>_t(be.weakSet(t),\"WeakSet\",t),int8Array:t=>_t(be.int8Array(t),\"Int8Array\",t),uint8Array:t=>_t(be.uint8Array(t),\"Uint8Array\",t),uint8ClampedArray:t=>_t(be.uint8ClampedArray(t),\"Uint8ClampedArray\",t),int16Array:t=>_t(be.int16Array(t),\"Int16Array\",t),uint16Array:t=>_t(be.uint16Array(t),\"Uint16Array\",t),int32Array:t=>_t(be.int32Array(t),\"Int32Array\",t),uint32Array:t=>_t(be.uint32Array(t),\"Uint32Array\",t),float32Array:t=>_t(be.float32Array(t),\"Float32Array\",t),float64Array:t=>_t(be.float64Array(t),\"Float64Array\",t),bigInt64Array:t=>_t(be.bigInt64Array(t),\"BigInt64Array\",t),bigUint64Array:t=>_t(be.bigUint64Array(t),\"BigUint64Array\",t),arrayBuffer:t=>_t(be.arrayBuffer(t),\"ArrayBuffer\",t),sharedArrayBuffer:t=>_t(be.sharedArrayBuffer(t),\"SharedArrayBuffer\",t),dataView:t=>_t(be.dataView(t),\"DataView\",t),enumCase:(t,e)=>_t(be.enumCase(t,e),\"EnumCase\",t),urlInstance:t=>_t(be.urlInstance(t),\"URL\",t),urlString:t=>_t(be.urlString(t),\"string with a URL\",t),truthy:t=>_t(be.truthy(t),\"truthy\",t),falsy:t=>_t(be.falsy(t),\"falsy\",t),nan:t=>_t(be.nan(t),\"NaN\",t),primitive:t=>_t(be.primitive(t),\"primitive\",t),integer:t=>_t(be.integer(t),\"integer\",t),safeInteger:t=>_t(be.safeInteger(t),\"integer\",t),plainObject:t=>_t(be.plainObject(t),\"plain object\",t),typedArray:t=>_t(be.typedArray(t),\"TypedArray\",t),arrayLike:t=>_t(be.arrayLike(t),\"array-like\",t),domElement:t=>_t(be.domElement(t),\"HTMLElement\",t),observable:t=>_t(be.observable(t),\"Observable\",t),nodeStream:t=>_t(be.nodeStream(t),\"Node.js Stream\",t),infinite:t=>_t(be.infinite(t),\"infinite number\",t),emptyArray:t=>_t(be.emptyArray(t),\"empty array\",t),nonEmptyArray:t=>_t(be.nonEmptyArray(t),\"non-empty array\",t),emptyString:t=>_t(be.emptyString(t),\"empty string\",t),emptyStringOrWhitespace:t=>_t(be.emptyStringOrWhitespace(t),\"empty string or whitespace\",t),nonEmptyString:t=>_t(be.nonEmptyString(t),\"non-empty string\",t),nonEmptyStringAndNotWhitespace:t=>_t(be.nonEmptyStringAndNotWhitespace(t),\"non-empty string and not whitespace\",t),emptyObject:t=>_t(be.emptyObject(t),\"empty object\",t),nonEmptyObject:t=>_t(be.nonEmptyObject(t),\"non-empty object\",t),emptySet:t=>_t(be.emptySet(t),\"empty set\",t),nonEmptySet:t=>_t(be.nonEmptySet(t),\"non-empty set\",t),emptyMap:t=>_t(be.emptyMap(t),\"empty map\",t),nonEmptyMap:t=>_t(be.nonEmptyMap(t),\"non-empty map\",t),propertyKey:t=>_t(be.propertyKey(t),\"PropertyKey\",t),formData:t=>_t(be.formData(t),\"FormData\",t),urlSearchParams:t=>_t(be.urlSearchParams(t),\"URLSearchParams\",t),evenInteger:t=>_t(be.evenInteger(t),\"even integer\",t),oddInteger:t=>_t(be.oddInteger(t),\"odd integer\",t),directInstanceOf:(t,e)=>_t(be.directInstanceOf(t,e),\"T\",t),inRange:(t,e)=>_t(be.inRange(t,e),\"in range\",t),any:(t,...e)=>_t(be.any(t,...e),\"predicate returns truthy for any value\",e,{multipleValues:!0}),all:(t,...e)=>_t(be.all(t,...e),\"predicate returns truthy for all values\",e,{multipleValues:!0})};Object.defineProperties(be,{class:{value:be.class_},function:{value:be.function_},null:{value:be.null_}});Object.defineProperties(Fp.assert,{class:{value:Fp.assert.class_},function:{value:Fp.assert.function_},null:{value:Fp.assert.null_}});Fp.default=be;MQ.exports=be;MQ.exports.default=be;MQ.exports.assert=Fp.assert});var Que=_((CMt,z8)=>{\"use strict\";var UQ=class extends Error{constructor(e){super(e||\"Promise was canceled\"),this.name=\"CancelError\"}get isCanceled(){return!0}},_Q=class t{static fn(e){return(...r)=>new t((s,a,n)=>{r.push(n),e(...r).then(s,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;let a=f=>{this._isPending=!1,r(f)},n=f=>{this._isPending=!1,s(f)},c=f=>{if(!this._isPending)throw new Error(\"The `onCancel` handler was attached after the promise settled.\");this._cancelHandlers.push(f)};return Object.defineProperties(c,{shouldReject:{get:()=>this._rejectOnCancel,set:f=>{this._rejectOnCancel=f}}}),e(a,n,c)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new UQ(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(_Q.prototype,Promise.prototype);z8.exports=_Q;z8.exports.CancelError=UQ});var Tue=_((Z8,$8)=>{\"use strict\";Object.defineProperty(Z8,\"__esModule\",{value:!0});function xet(t){return t.encrypted}var X8=(t,e)=>{let r;typeof e==\"function\"?r={connect:e}:r=e;let s=typeof r.connect==\"function\",a=typeof r.secureConnect==\"function\",n=typeof r.close==\"function\",c=()=>{s&&r.connect(),xet(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once(\"secureConnect\",r.secureConnect)),n&&t.once(\"close\",r.close)};t.writable&&!t.connecting?c():t.connecting?t.once(\"connect\",c):t.destroyed&&n&&r.close(t._hadError)};Z8.default=X8;$8.exports=X8;$8.exports.default=X8});var Rue=_((tH,rH)=>{\"use strict\";Object.defineProperty(tH,\"__esModule\",{value:!0});var ket=Tue(),Qet=Number(process.versions.node.split(\".\")[0]),eH=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=c=>{let f=c.emit.bind(c);c.emit=(p,...h)=>(p===\"error\"&&(e.error=Date.now(),e.phases.total=e.error-e.start,c.emit=f),f(p,...h))};r(t),t.prependOnceListener(\"abort\",()=>{e.abort=Date.now(),(!e.response||Qet>=13)&&(e.phases.total=Date.now()-e.start)});let s=c=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let f=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};c.prependOnceListener(\"lookup\",f),ket.default(c,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(c.removeListener(\"lookup\",f),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener(\"socket\",s);let a=()=>{var c;e.upload=Date.now(),e.phases.request=e.upload-(c=e.secureConnect,c??e.connect)};return(typeof t.writableFinished==\"boolean\"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))?a():t.prependOnceListener(\"finish\",a),t.prependOnceListener(\"response\",c=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,c.timings=e,r(c),c.prependOnceListener(\"end\",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};tH.default=eH;rH.exports=eH;rH.exports.default=eH});var _ue=_((wMt,sH)=>{\"use strict\";var{V4MAPPED:Tet,ADDRCONFIG:Ret,ALL:Uue,promises:{Resolver:Fue},lookup:Fet}=Ie(\"dns\"),{promisify:nH}=Ie(\"util\"),Net=Ie(\"os\"),pI=Symbol(\"cacheableLookupCreateConnection\"),iH=Symbol(\"cacheableLookupInstance\"),Nue=Symbol(\"expires\"),Oet=typeof Uue==\"number\",Oue=t=>{if(!(t&&typeof t.createConnection==\"function\"))throw new Error(\"Expected an Agent instance as the first argument\")},Let=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},Lue=()=>{let t=!1,e=!1;for(let r of Object.values(Net.networkInterfaces()))for(let s of r)if(!s.internal&&(s.family===\"IPv6\"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Met=t=>Symbol.iterator in t,Mue={ttl:!0},Uet={all:!0},HQ=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:a=.15,resolver:n=new Fue,lookup:c=Fet}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=nH(c),this._resolver instanceof Fue?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=nH(this._resolver.resolve4.bind(this._resolver)),this._resolve6=nH(this._resolver.resolve6.bind(this._resolver))),this._iface=Lue(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;let f=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);f.unref&&f.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,s){if(typeof r==\"function\"?(s=r,r={}):typeof r==\"number\"&&(r={family:r}),!s)throw new Error(\"Callback must be a function.\");this.lookupAsync(e,r).then(a=>{r.all?s(null,a):s(null,a.address,a.family,a.expires,a.ttl)},s)}async lookupAsync(e,r={}){typeof r==\"number\"&&(r={family:r});let s=await this.query(e);if(r.family===6){let a=s.filter(n=>n.family===6);r.hints&Tet&&(Oet&&r.hints&Uue||a.length===0)?Let(s):s=a}else r.family===4&&(s=s.filter(a=>a.family===4));if(r.hints&Ret){let{_iface:a}=this;s=s.filter(n=>n.family===6?a.has6:a.has4)}if(s.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code=\"ENOTFOUND\",a.hostname=e,a}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){let s=this._pending[e];if(s)r=await s;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(s=>({...s})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code===\"ENODATA\"||E.code===\"ENOTFOUND\")return[];throw E}},[s,a]=await Promise.all([this._resolve4(e,Mue),this._resolve6(e,Mue)].map(h=>r(h))),n=0,c=0,f=0,p=Date.now();for(let h of s)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,c=Math.max(c,h.ttl);return s.length>0?a.length>0?f=Math.min(n,c):f=n:f=c,{entries:[...s,...a],cacheTtl:f}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[Nue]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(a){this.lookupAsync=async()=>{let n=new Error(\"Cache Error. Please recreate the CacheableLookup instance.\");throw n.cause=a,n}}Met(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Uet);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let s=1/0,a=Date.now();for(let[n,c]of this._cache){let f=c[Nue];a>=f?this._cache.delete(n):f<s&&(s=f)}s!==1/0&&this._tick(s-a)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Oue(e),pI in e)throw new Error(\"CacheableLookup has been already installed\");e[pI]=e.createConnection,e[iH]=this,e.createConnection=(r,s)=>(\"lookup\"in r||(r.lookup=this.lookup),e[pI](r,s))}uninstall(e){if(Oue(e),e[pI]){if(e[iH]!==this)throw new Error(\"The agent is not owned by this CacheableLookup instance\");e.createConnection=e[pI],delete e[pI],delete e[iH]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Lue(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};sH.exports=HQ;sH.exports.default=HQ});var Gue=_((BMt,oH)=>{\"use strict\";var _et=typeof URL>\"u\"?Ie(\"url\").URL:URL,Het=\"text/plain\",jet=\"us-ascii\",Hue=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Get=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let s=r[1].split(\";\"),a=r[2],n=e?\"\":r[3],c=!1;s[s.length-1]===\"base64\"&&(s.pop(),c=!0);let f=(s.shift()||\"\").toLowerCase(),h=[...s.map(E=>{let[C,S=\"\"]=E.split(\"=\").map(P=>P.trim());return C===\"charset\"&&(S=S.toLowerCase(),S===jet)?\"\":`${C}${S?`=${S}`:\"\"}`}).filter(Boolean)];return c&&h.push(\"base64\"),(h.length!==0||f&&f!==Het)&&h.unshift(f),`data:${h.join(\";\")},${c?a.trim():a}${n?`#${n}`:\"\"}`},jue=(t,e)=>{if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,\"normalizeHttps\"))throw new Error(\"options.normalizeHttps is renamed to options.forceHttp\");if(Reflect.has(e,\"normalizeHttp\"))throw new Error(\"options.normalizeHttp is renamed to options.forceHttps\");if(Reflect.has(e,\"stripFragment\"))throw new Error(\"options.stripFragment is renamed to options.stripHash\");if(t=t.trim(),/^data:/i.test(t))return Get(t,e);let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new _et(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash&&(a.hash=\"\"),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\\/{2,}/g,(n,c)=>/^(?!\\/)/g.test(c)?`${c}/`:\"/\")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split(\"/\"),c=n[n.length-1];Hue(c,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.([a-z\\-\\d]{2,63})\\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])Hue(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\")),t=a.toString(),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t};oH.exports=jue;oH.exports.default=jue});var Yue=_((vMt,Wue)=>{Wue.exports=que;function que(t,e){if(t&&e)return que(t)(e);if(typeof t!=\"function\")throw new TypeError(\"need wrapper function\");return Object.keys(t).forEach(function(s){r[s]=t[s]}),r;function r(){for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];var n=t.apply(this,s),c=s[s.length-1];return typeof n==\"function\"&&n!==c&&Object.keys(c).forEach(function(f){n[f]=c[f]}),n}}});var lH=_((SMt,aH)=>{var Vue=Yue();aH.exports=Vue(jQ);aH.exports.strict=Vue(Jue);jQ.proto=jQ(function(){Object.defineProperty(Function.prototype,\"once\",{value:function(){return jQ(this)},configurable:!0}),Object.defineProperty(Function.prototype,\"onceStrict\",{value:function(){return Jue(this)},configurable:!0})});function jQ(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Jue(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||\"Function wrapped with `once`\";return e.onceError=r+\" shouldn't be called more than once\",e.called=!1,e}});var cH=_((DMt,zue)=>{var qet=lH(),Wet=function(){},Yet=function(t){return t.setHeader&&typeof t.abort==\"function\"},Vet=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},Kue=function(t,e,r){if(typeof e==\"function\")return Kue(t,null,e);e||(e={}),r=qet(r||Wet);var s=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,c=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||p()},p=function(){c=!1,n||r.call(t)},h=function(){n=!1,c||r.call(t)},E=function(I){r.call(t,I?new Error(\"exited with error code: \"+I):null)},C=function(I){r.call(t,I)},S=function(){if(n&&!(a&&a.ended))return r.call(t,new Error(\"premature close\"));if(c&&!(s&&s.ended))return r.call(t,new Error(\"premature close\"))},P=function(){t.req.on(\"finish\",p)};return Yet(t)?(t.on(\"complete\",p),t.on(\"abort\",S),t.req?P():t.on(\"request\",P)):c&&!s&&(t.on(\"end\",f),t.on(\"close\",f)),Vet(t)&&t.on(\"exit\",E),t.on(\"end\",h),t.on(\"finish\",p),e.error!==!1&&t.on(\"error\",C),t.on(\"close\",S),function(){t.removeListener(\"complete\",p),t.removeListener(\"abort\",S),t.removeListener(\"request\",P),t.req&&t.req.removeListener(\"finish\",p),t.removeListener(\"end\",f),t.removeListener(\"close\",f),t.removeListener(\"finish\",p),t.removeListener(\"exit\",E),t.removeListener(\"end\",h),t.removeListener(\"error\",C),t.removeListener(\"close\",S)}};zue.exports=Kue});var $ue=_((bMt,Zue)=>{var Jet=lH(),Ket=cH(),uH=Ie(\"fs\"),JB=function(){},zet=/^v?\\.0/.test(process.version),GQ=function(t){return typeof t==\"function\"},Xet=function(t){return!zet||!uH?!1:(t instanceof(uH.ReadStream||JB)||t instanceof(uH.WriteStream||JB))&&GQ(t.close)},Zet=function(t){return t.setHeader&&GQ(t.abort)},$et=function(t,e,r,s){s=Jet(s);var a=!1;t.on(\"close\",function(){a=!0}),Ket(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,Xet(t))return t.close(JB);if(Zet(t))return t.abort();if(GQ(t.destroy))return t.destroy();s(c||new Error(\"stream was destroyed\"))}}},Xue=function(t){t()},ett=function(t,e){return t.pipe(e)},ttt=function(){var t=Array.prototype.slice.call(arguments),e=GQ(t[t.length-1]||JB)&&t.pop()||JB;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error(\"pump requires two streams per minimum\");var r,s=t.map(function(a,n){var c=n<t.length-1,f=n>0;return $et(a,c,f,function(p){r||(r=p),p&&s.forEach(Xue),!c&&(s.forEach(Xue),e(r))})});return t.reduce(ett)};Zue.exports=ttt});var tfe=_((PMt,efe)=>{\"use strict\";var{PassThrough:rtt}=Ie(\"stream\");efe.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,s=r===\"buffer\",a=!1;e?a=!(r||s):r=r||\"utf8\",s&&(r=null);let n=new rtt({objectMode:a});r&&n.setEncoding(r);let c=0,f=[];return n.on(\"data\",p=>{f.push(p),a?c=f.length:c+=p.length}),n.getBufferedValue=()=>e?f:s?Buffer.concat(f,c):f.join(\"\"),n.getBufferedLength=()=>c,n}});var rfe=_((xMt,hI)=>{\"use strict\";var ntt=$ue(),itt=tfe(),qQ=class extends Error{constructor(){super(\"maxBuffer exceeded\"),this.name=\"MaxBufferError\"}};async function WQ(t,e){if(!t)return Promise.reject(new Error(\"Expected a stream\"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,s;return await new Promise((a,n)=>{let c=f=>{f&&(f.bufferedData=s.getBufferedValue()),n(f)};s=ntt(t,itt(e),f=>{if(f){c(f);return}a()}),s.on(\"data\",()=>{s.getBufferedLength()>r&&c(new qQ)})}),s.getBufferedValue()}hI.exports=WQ;hI.exports.default=WQ;hI.exports.buffer=(t,e)=>WQ(t,{...e,encoding:\"buffer\"});hI.exports.array=(t,e)=>WQ(t,{...e,array:!0});hI.exports.MaxBufferError=qQ});var ife=_((QMt,nfe)=>{\"use strict\";var stt=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),ott=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),att=new Set([500,502,503,504]),ltt={date:!0,connection:!0,\"keep-alive\":!0,\"proxy-authenticate\":!0,\"proxy-authorization\":!0,te:!0,trailer:!0,\"transfer-encoding\":!0,upgrade:!0},ctt={\"content-length\":!0,\"content-encoding\":!0,\"transfer-encoding\":!0,\"content-range\":!0};function nm(t){let e=parseInt(t,10);return isFinite(e)?e:0}function utt(t){return t?att.has(t.status):!0}function fH(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let s of r){let[a,n]=s.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^\"|\"$/g,\"\")}return e}function ftt(t){let e=[];for(let r in t){let s=t[r];e.push(s===!0?r:r+\"=\"+s)}if(e.length)return e.join(\", \")}nfe.exports=class{constructor(e,r,{shared:s,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:c,_fromObject:f}={}){if(f){this._fromObject(f);return}if(!r||!r.headers)throw Error(\"Response headers missing\");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status=\"status\"in r?r.status:200,this._resHeaders=r.headers,this._rescc=fH(r.headers[\"cache-control\"]),this._method=\"method\"in e?e.method:\"GET\",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=fH(e.headers[\"cache-control\"]),c&&\"pre-check\"in this._rescc&&\"post-check\"in this._rescc&&(delete this._rescc[\"pre-check\"],delete this._rescc[\"post-check\"],delete this._rescc[\"no-cache\"],delete this._rescc[\"no-store\"],delete this._rescc[\"must-revalidate\"],this._resHeaders=Object.assign({},this._resHeaders,{\"cache-control\":ftt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers[\"cache-control\"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc[\"no-cache\"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc[\"no-store\"]&&(this._method===\"GET\"||this._method===\"HEAD\"||this._method===\"POST\"&&this._hasExplicitExpiration())&&ott.has(this._status)&&!this._rescc[\"no-store\"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc[\"max-age\"]||this._isShared&&this._rescc[\"s-maxage\"]||this._rescc.public||stt.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc[\"s-maxage\"]||this._rescc[\"max-age\"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error(\"Request headers missing\")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=fH(e.headers[\"cache-control\"]);return r[\"no-cache\"]||/no-cache/.test(e.headers.pragma)||r[\"max-age\"]&&this.age()>r[\"max-age\"]||r[\"min-fresh\"]&&this.timeToLive()<1e3*r[\"min-fresh\"]||this.stale()&&!(r[\"max-stale\"]&&!this._rescc[\"must-revalidate\"]&&(r[\"max-stale\"]===!0||r[\"max-stale\"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method===\"HEAD\")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc[\"must-revalidate\"]||this._rescc.public||this._rescc[\"s-maxage\"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary===\"*\")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\\s*,\\s*/);for(let s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let s in e)ltt[s]||(r[s]=e[s]);if(e.connection){let s=e.connection.trim().split(/\\s*,\\s*/);for(let a of s)delete r[a]}if(r.warning){let s=r.warning.split(/,/).filter(a=>!/^\\s*1[0-9][0-9]/.test(a));s.length?r.warning=s.join(\",\").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:\"\")+'113 - \"rfc7234 5.5.4\"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return nm(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc[\"no-cache\"]||this._isShared&&this._resHeaders[\"set-cookie\"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary===\"*\")return 0;if(this._isShared){if(this._rescc[\"proxy-revalidate\"])return 0;if(this._rescc[\"s-maxage\"])return nm(this._rescc[\"s-maxage\"])}if(this._rescc[\"max-age\"])return nm(this._rescc[\"max-age\"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||s<r?0:Math.max(e,(s-r)/1e3)}if(this._resHeaders[\"last-modified\"]){let s=Date.parse(this._resHeaders[\"last-modified\"]);if(isFinite(s)&&r>s)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+nm(this._rescc[\"stale-if-error\"]),s=e+nm(this._rescc[\"stale-while-revalidate\"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+nm(this._rescc[\"stale-if-error\"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+nm(this._rescc[\"stale-while-revalidate\"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error(\"Reinitialized\");if(!e||e.v!==1)throw Error(\"Invalid serialization\");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r[\"if-range\"],!this._requestMatches(e,!0)||!this.storable())return delete r[\"if-none-match\"],delete r[\"if-modified-since\"],r;if(this._resHeaders.etag&&(r[\"if-none-match\"]=r[\"if-none-match\"]?`${r[\"if-none-match\"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r[\"accept-ranges\"]||r[\"if-match\"]||r[\"if-unmodified-since\"]||this._method&&this._method!=\"GET\"){if(delete r[\"if-modified-since\"],r[\"if-none-match\"]){let a=r[\"if-none-match\"].split(/,/).filter(n=>!/^\\s*W\\//.test(n));a.length?r[\"if-none-match\"]=a.join(\",\").trim():delete r[\"if-none-match\"]}}else this._resHeaders[\"last-modified\"]&&!r[\"if-modified-since\"]&&(r[\"if-modified-since\"]=this._resHeaders[\"last-modified\"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&utt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error(\"Response headers missing\");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\\s*W\\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag.replace(/^\\s*W\\//,\"\"):this._resHeaders[\"last-modified\"]?s=this._resHeaders[\"last-modified\"]===r.headers[\"last-modified\"]:!this._resHeaders.etag&&!this._resHeaders[\"last-modified\"]&&!r.headers.etag&&!r.headers[\"last-modified\"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let c in this._resHeaders)a[c]=c in r.headers&&!ctt[c]?r.headers[c]:this._resHeaders[c];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var YQ=_((TMt,sfe)=>{\"use strict\";sfe.exports=t=>{let e={};for(let[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}});var afe=_((RMt,ofe)=>{\"use strict\";var Att=Ie(\"stream\").Readable,ptt=YQ(),AH=class extends Att{constructor(e,r,s,a){if(typeof e!=\"number\")throw new TypeError(\"Argument `statusCode` should be a number\");if(typeof r!=\"object\")throw new TypeError(\"Argument `headers` should be an object\");if(!(s instanceof Buffer))throw new TypeError(\"Argument `body` should be a buffer\");if(typeof a!=\"string\")throw new TypeError(\"Argument `url` should be a string\");super(),this.statusCode=e,this.headers=ptt(r),this.body=s,this.url=a}_read(){this.push(this.body),this.push(null)}};ofe.exports=AH});var cfe=_((FMt,lfe)=>{\"use strict\";var htt=[\"destroy\",\"setTimeout\",\"socket\",\"headers\",\"trailers\",\"rawHeaders\",\"statusCode\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"rawTrailers\",\"statusMessage\"];lfe.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(htt));for(let s of r)s in e||(e[s]=typeof t[s]==\"function\"?t[s].bind(t):t[s])}});var ffe=_((NMt,ufe)=>{\"use strict\";var gtt=Ie(\"stream\").PassThrough,dtt=cfe(),mtt=t=>{if(!(t&&t.pipe))throw new TypeError(\"Parameter `response` must be a response stream.\");let e=new gtt;return dtt(t,e),t.pipe(e)};ufe.exports=mtt});var Afe=_(pH=>{pH.stringify=function t(e){if(typeof e>\"u\")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(\":base64:\"+e.toString(\"base64\"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e==\"object\"){var r=\"\",s=Array.isArray(e);r=s?\"[\":\"{\";var a=!0;for(var n in e){var c=typeof e[n]==\"function\"||!s&&typeof e[n]>\"u\";Object.hasOwnProperty.call(e,n)&&!c&&(a||(r+=\",\"),a=!1,s?e[n]==null?r+=\"null\":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+\":\"+t(e[n])))}return r+=s?\"]\":\"}\",r}else return typeof e==\"string\"?JSON.stringify(/^:/.test(e)?\":\"+e:e):typeof e>\"u\"?\"null\":JSON.stringify(e)};pH.parse=function(t){return JSON.parse(t,function(e,r){return typeof r==\"string\"?/^:base64:/.test(r)?Buffer.from(r.substring(8),\"base64\"):/^:/.test(r)?r.substring(1):r:r})}});var dfe=_((LMt,gfe)=>{\"use strict\";var ytt=Ie(\"events\"),pfe=Afe(),Ett=t=>{let e={redis:\"@keyv/redis\",rediss:\"@keyv/redis\",mongodb:\"@keyv/mongo\",mongo:\"@keyv/mongo\",sqlite:\"@keyv/sqlite\",postgresql:\"@keyv/postgres\",postgres:\"@keyv/postgres\",mysql:\"@keyv/mysql\",etcd:\"@keyv/etcd\",offline:\"@keyv/offline\",tiered:\"@keyv/tiered\"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(Ie(e[r]))(t)}return new Map},hfe=[\"sqlite\",\"postgres\",\"mysql\",\"mongo\",\"redis\",\"tiered\"],hH=class extends ytt{constructor(e,{emitErrors:r=!0,...s}={}){if(super(),this.opts={namespace:\"keyv\",serialize:pfe.stringify,deserialize:pfe.parse,...typeof e==\"string\"?{uri:e}:e,...s},!this.opts.store){let n={...this.opts};this.opts.store=Ett(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on==\"function\"&&r&&this.opts.store.on(\"error\",n=>this.emit(\"error\",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[c,f]of typeof n==\"function\"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(f);if(!(this.opts.store.namespace&&!c.includes(this.opts.store.namespace))){if(typeof p.expires==\"number\"&&Date.now()>p.expires){this.delete(c);continue}yield[this._getKeyUnprefix(c),p.value]}}};typeof this.opts.store[Symbol.iterator]==\"function\"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator==\"function\"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return hfe.includes(this.opts.store.opts.dialect)||hfe.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(\":\").splice(1).join(\":\")}get(e,r){let{store:s}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&s.getMany===void 0){let c=[];for(let f of n)c.push(Promise.resolve().then(()=>s.get(f)).then(p=>typeof p==\"string\"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires==\"number\"&&Date.now()>p.expires?this.delete(f).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(c).then(f=>{let p=[];for(let h of f)p.push(h.value);return p})}return Promise.resolve().then(()=>a?s.getMany(n):s.get(n)).then(c=>typeof c==\"string\"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return a?c.map((f,p)=>{if(typeof f==\"string\"&&(f=this.opts.deserialize(f)),f!=null){if(typeof f.expires==\"number\"&&Date.now()>f.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?f:f.value}}):typeof c.expires==\"number\"&&Date.now()>c.expires?this.delete(e).then(()=>{}):r&&r.raw?c:c.value})}set(e,r,s){let a=this._getKeyPrefix(e);typeof s>\"u\"&&(s=this.opts.ttl),s===0&&(s=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let c=typeof s==\"number\"?Date.now()+s:null;return typeof r==\"symbol\"&&this.emit(\"error\",\"symbol cannot be serialized\"),r={value:r,expires:c},this.opts.serialize(r)}).then(c=>n.set(a,c,s)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let c of a)n.push(r.delete(c));return Promise.allSettled(n).then(c=>c.every(f=>f.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let s=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(s))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(async()=>typeof s.has==\"function\"?s.has(r):await s.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect==\"function\")return e.disconnect()}};gfe.exports=hH});var Efe=_((UMt,yfe)=>{\"use strict\";var Itt=Ie(\"events\"),VQ=Ie(\"url\"),Ctt=Gue(),wtt=rfe(),gH=ife(),mfe=afe(),Btt=YQ(),vtt=ffe(),Stt=dfe(),KB=class t{constructor(e,r){if(typeof e!=\"function\")throw new TypeError(\"Parameter `request` must be a function\");return this.cache=new Stt({uri:typeof r==\"string\"&&r,store:typeof r!=\"string\"&&r,namespace:\"cacheable-request\"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let a;if(typeof r==\"string\")a=dH(VQ.parse(r)),r={};else if(r instanceof VQ.URL)a=dH(VQ.parse(r.toString())),r={};else{let[C,...S]=(r.path||\"\").split(\"?\"),P=S.length>0?`?${S.join(\"?\")}`:\"\";a=dH({...r,pathname:C,search:P})}r={headers:{},method:\"GET\",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...Dtt(a)},r.headers=Btt(r.headers);let n=new Itt,c=Ctt(VQ.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${r.method}:${c}`,p=!1,h=!1,E=C=>{h=!0;let S=!1,P,I=new Promise(N=>{P=()=>{S||(S=!0,N())}}),R=N=>{if(p&&!C.forceRefresh){N.status=N.statusCode;let W=gH.fromObject(p.cachePolicy).revalidatedPolicy(C,N);if(!W.modified){let ee=W.policy.responseHeaders();N=new mfe(p.statusCode,ee,p.body,p.url),N.cachePolicy=W.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new gH(C,N,C),N.fromCache=!1);let U;C.cache&&N.cachePolicy.storable()?(U=vtt(N),(async()=>{try{let W=wtt.buffer(N);if(await Promise.race([I,new Promise(le=>N.once(\"end\",le))]),S)return;let ee=await W,ie={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:ee},ue=C.strictTtl?N.cachePolicy.timeToLive():void 0;C.maxTtl&&(ue=ue?Math.min(ue,C.maxTtl):C.maxTtl),await this.cache.set(f,ie,ue)}catch(W){n.emit(\"error\",new t.CacheError(W))}})()):C.cache&&p&&(async()=>{try{await this.cache.delete(f)}catch(W){n.emit(\"error\",new t.CacheError(W))}})(),n.emit(\"response\",U||N),typeof s==\"function\"&&s(U||N)};try{let N=e(C,R);N.once(\"error\",P),N.once(\"abort\",P),n.emit(\"request\",N)}catch(N){n.emit(\"error\",new t.RequestError(N))}};return(async()=>{let C=async P=>{await Promise.resolve();let I=P.cache?await this.cache.get(f):void 0;if(typeof I>\"u\")return E(P);let R=gH.fromObject(I.cachePolicy);if(R.satisfiesWithoutRevalidation(P)&&!P.forceRefresh){let N=R.responseHeaders(),U=new mfe(I.statusCode,N,I.body,I.url);U.cachePolicy=R,U.fromCache=!0,n.emit(\"response\",U),typeof s==\"function\"&&s(U)}else p=I,P.headers=R.revalidationHeaders(P),E(P)},S=P=>n.emit(\"error\",new t.CacheError(P));this.cache.once(\"error\",S),n.on(\"response\",()=>this.cache.removeListener(\"error\",S));try{await C(r)}catch(P){r.automaticFailover&&!h&&E(r),n.emit(\"error\",new t.CacheError(P))}})(),n}}};function Dtt(t){let e={...t};return e.path=`${t.pathname||\"/\"}${t.search||\"\"}`,delete e.pathname,delete e.search,e}function dH(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||\"localhost\",port:t.port,pathname:t.pathname,search:t.search}}KB.RequestError=class extends Error{constructor(t){super(t.message),this.name=\"RequestError\",Object.assign(this,t)}};KB.CacheError=class extends Error{constructor(t){super(t.message),this.name=\"CacheError\",Object.assign(this,t)}};yfe.exports=KB});var Cfe=_((jMt,Ife)=>{\"use strict\";var btt=[\"aborted\",\"complete\",\"headers\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"method\",\"rawHeaders\",\"rawTrailers\",\"setTimeout\",\"socket\",\"statusCode\",\"statusMessage\",\"trailers\",\"url\"];Ife.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error(\"The second stream must have the `autoDestroy` option set to `false`\");let r=new Set(Object.keys(t).concat(btt)),s={};for(let a of r)a in e||(s[a]={get(){let n=t[a];return typeof n==\"function\"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),t.once(\"aborted\",()=>{e.destroy(),e.emit(\"aborted\")}),t.once(\"close\",()=>{t.complete&&e.readable?e.once(\"end\",()=>{e.emit(\"close\")}):e.emit(\"close\")}),e}});var Bfe=_((GMt,wfe)=>{\"use strict\";var{Transform:Ptt,PassThrough:xtt}=Ie(\"stream\"),mH=Ie(\"zlib\"),ktt=Cfe();wfe.exports=t=>{let e=(t.headers[\"content-encoding\"]||\"\").toLowerCase();if(![\"gzip\",\"deflate\",\"br\"].includes(e))return t;let r=e===\"br\";if(r&&typeof mH.createBrotliDecompress!=\"function\")return t.destroy(new Error(\"Brotli is not supported on Node.js < 12\")),t;let s=!0,a=new Ptt({transform(f,p,h){s=!1,h(null,f)},flush(f){f()}}),n=new xtt({autoDestroy:!1,destroy(f,p){t.destroy(),p(f)}}),c=r?mH.createBrotliDecompress():mH.createUnzip();return c.once(\"error\",f=>{if(s&&!t.readable){n.end();return}n.destroy(f)}),ktt(t,n),t.pipe(a).pipe(c).pipe(n),n}});var EH=_((qMt,vfe)=>{\"use strict\";var yH=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError(\"`maxSize` must be a number greater than 0\");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction==\"function\")for(let[s,a]of this.oldCache.entries())this.onEviction(s,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};vfe.exports=yH});var CH=_((WMt,Pfe)=>{\"use strict\";var Qtt=Ie(\"events\"),Ttt=Ie(\"tls\"),Rtt=Ie(\"http2\"),Ftt=EH(),Pa=Symbol(\"currentStreamsCount\"),Sfe=Symbol(\"request\"),Rc=Symbol(\"cachedOriginSet\"),gI=Symbol(\"gracefullyClosing\"),Ntt=[\"maxDeflateDynamicTableSize\",\"maxSessionMemory\",\"maxHeaderListPairs\",\"maxOutstandingPings\",\"maxReservedRemoteStreams\",\"maxSendHeaderBlockLength\",\"paddingStrategy\",\"localAddress\",\"path\",\"rejectUnauthorized\",\"minDHSize\",\"ca\",\"cert\",\"clientCertEngine\",\"ciphers\",\"key\",\"pfx\",\"servername\",\"minVersion\",\"maxVersion\",\"secureProtocol\",\"crl\",\"honorCipherOrder\",\"ecdhCurve\",\"dhparam\",\"secureOptions\",\"sessionIdContext\"],Ott=(t,e,r)=>{let s=0,a=t.length;for(;s<a;){let n=s+a>>>1;r(t[n],e)?s=n+1:a=n}return s},Ltt=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,IH=(t,e)=>{for(let r of t)r[Rc].length<e[Rc].length&&r[Rc].every(s=>e[Rc].includes(s))&&r[Pa]+e[Pa]<=e.remoteSettings.maxConcurrentStreams&&bfe(r)},Mtt=(t,e)=>{for(let r of t)e[Rc].length<r[Rc].length&&e[Rc].every(s=>r[Rc].includes(s))&&e[Pa]+r[Pa]<=r.remoteSettings.maxConcurrentStreams&&bfe(e)},Dfe=({agent:t,isFree:e})=>{let r={};for(let s in t.sessions){let n=t.sessions[s].filter(c=>{let f=c[im.kCurrentStreamsCount]<c.remoteSettings.maxConcurrentStreams;return e?f:!f});n.length!==0&&(r[s]=n)}return r},bfe=t=>{t[gI]=!0,t[Pa]===0&&t.close()},im=class t extends Qtt{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Ftt({maxSize:a})}static normalizeOrigin(e,r){return typeof e==\"string\"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r=\"\";if(e)for(let s of Ntt)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let s=this.queue[e][r];this._sessionsCount<this.maxSessions&&!s.completed&&(s.completed=!0,s())}getSession(e,r,s){return new Promise((a,n)=>{Array.isArray(s)?(s=[...s],a()):s=[{resolve:a,reject:n}];let c=this.normalizeOptions(r),f=t.normalizeOrigin(e,r&&r.servername);if(f===void 0){for(let{reject:E}of s)E(new TypeError(\"The `origin` argument needs to be a string or an URL object\"));return}if(c in this.sessions){let E=this.sessions[c],C=-1,S=-1,P;for(let I of E){let R=I.remoteSettings.maxConcurrentStreams;if(R<C)break;if(I[Rc].includes(f)){let N=I[Pa];if(N>=R||I[gI]||I.destroyed)continue;P||(C=R),N>S&&(P=I,S=N)}}if(P){if(s.length!==1){for(let{reject:I}of s){let R=new Error(`Expected the length of listeners to be 1, got ${s.length}.\nPlease report this to https://github.com/szmarczak/http2-wrapper/`);I(R)}return}s[0].resolve(P);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=Rtt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[Pa]=0,S[gI]=!1;let P=()=>S[Pa]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once(\"session\",N=>{this.tlsSessionCache.set(E,N)}),S.once(\"error\",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once(\"close\",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error(\"Session closed without receiving a SETTINGS frame\");N.code=\"HTTP2WRAPPER_NOSETTINGS\";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let R=()=>{if(!(!(c in this.queue)||!P())){for(let N of S[Rc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&P();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!P())break}}};S.on(\"origin\",()=>{S[Rc]=S.originSet,P()&&(R(),IH(this.sessions[c],S))}),S.once(\"remoteSettings\",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error(\"Agent has been destroyed\");for(let U of s)U.reject(N);S.destroy();return}S[Rc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(Ott(U,S,Ltt),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit(\"session\",S),R(),p(),S[Pa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on(\"remoteSettings\",()=>{R(),IH(this.sessions[c],S)})}),S[Sfe]=S.request,S.request=(N,U)=>{if(S[gI])throw new Error(\"The session is gracefully closing. No new streams are allowed.\");let W=S[Sfe](N,U);return S.ref(),++S[Pa],S[Pa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once(\"close\",()=>{if(I=P(),--S[Pa],!S.destroyed&&!S.closed&&(Mtt(this.sessions[c],S),P()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let ee=S[Pa]===0;ee&&S.unref(),ee&&(this._freeSessionsCount>this.maxFreeSessions||S[gI])?S.close():(IH(this.sessions[c],S),R())}}),W}}catch(S){for(let P of s)P.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=[\"h2\"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>\"u\"&&(r.servername=a),Ttt.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Pa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return Dfe({agent:this,isFree:!0})}get busySessions(){return Dfe({agent:this,isFree:!1})}};im.kCurrentStreamsCount=Pa;im.kGracefullyClosing=gI;Pfe.exports={Agent:im,globalAgent:new im}});var BH=_((YMt,xfe)=>{\"use strict\";var{Readable:Utt}=Ie(\"stream\"),wH=class extends Utt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage=\"\",this.httpVersion=\"2.0\",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners(\"data\"),this.resume())}_read(){this.req&&this.req._request.resume()}};xfe.exports=wH});var vH=_((VMt,kfe)=>{\"use strict\";kfe.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname==\"string\"&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return typeof t.port==\"string\"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var Tfe=_((JMt,Qfe)=>{\"use strict\";Qfe.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var Ffe=_((KMt,Rfe)=>{\"use strict\";Rfe.exports=t=>{switch(t){case\":method\":case\":scheme\":case\":authority\":case\":path\":return!0;default:return!1}}});var Ofe=_((XMt,Nfe)=>{\"use strict\";var dI=(t,e,r)=>{Nfe.exports[e]=class extends t{constructor(...a){super(typeof r==\"string\"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};dI(TypeError,\"ERR_INVALID_ARG_TYPE\",t=>{let e=t[0].includes(\".\")?\"property\":\"argument\",r=t[1],s=Array.isArray(r);return s&&(r=`${r.slice(0,-1).join(\", \")} or ${r.slice(-1)}`),`The \"${t[0]}\" ${e} must be ${s?\"one of\":\"of\"} type ${r}. Received ${typeof t[2]}`});dI(TypeError,\"ERR_INVALID_PROTOCOL\",t=>`Protocol \"${t[0]}\" not supported. Expected \"${t[1]}\"`);dI(Error,\"ERR_HTTP_HEADERS_SENT\",t=>`Cannot ${t[0]} headers after they are sent to the client`);dI(TypeError,\"ERR_INVALID_HTTP_TOKEN\",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);dI(TypeError,\"ERR_HTTP_INVALID_HEADER_VALUE\",t=>`Invalid value \"${t[0]} for header \"${t[1]}\"`);dI(TypeError,\"ERR_INVALID_CHAR\",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var xH=_((ZMt,Gfe)=>{\"use strict\";var _tt=Ie(\"http2\"),{Writable:Htt}=Ie(\"stream\"),{Agent:Lfe,globalAgent:jtt}=CH(),Gtt=BH(),qtt=vH(),Wtt=Tfe(),Ytt=Ffe(),{ERR_INVALID_ARG_TYPE:SH,ERR_INVALID_PROTOCOL:Vtt,ERR_HTTP_HEADERS_SENT:Mfe,ERR_INVALID_HTTP_TOKEN:Jtt,ERR_HTTP_INVALID_HEADER_VALUE:Ktt,ERR_INVALID_CHAR:ztt}=Ofe(),{HTTP2_HEADER_STATUS:Ufe,HTTP2_HEADER_METHOD:_fe,HTTP2_HEADER_PATH:Hfe,HTTP2_METHOD_CONNECT:Xtt}=_tt.constants,Jo=Symbol(\"headers\"),DH=Symbol(\"origin\"),bH=Symbol(\"session\"),jfe=Symbol(\"options\"),JQ=Symbol(\"flushedHeaders\"),zB=Symbol(\"jobs\"),Ztt=/^[\\^`\\-\\w!#$%&*+.|~]+$/,$tt=/[^\\t\\u0020-\\u007E\\u0080-\\u00FF]/,PH=class extends Htt{constructor(e,r,s){super({autoDestroy:!1});let a=typeof e==\"string\"||e instanceof URL;if(a&&(e=qtt(e instanceof URL?e:new URL(e))),typeof r==\"function\"||r===void 0?(s=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[bH]=r.h2session;else if(r.agent===!1)this.agent=new Lfe({maxFreeSessions:0});else if(typeof r.agent>\"u\"||r.agent===null)typeof r.createConnection==\"function\"?(this.agent=new Lfe({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=jtt;else if(typeof r.agent.request==\"function\")this.agent=r.agent;else throw new SH(\"options.agent\",[\"Agent-like Object\",\"undefined\",\"false\"],r.agent);if(r.protocol&&r.protocol!==\"https:\")throw new Vtt(r.protocol,\"https:\");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,c=r.hostname||r.host||\"localhost\";delete r.hostname,delete r.host,delete r.port;let{timeout:f}=r;if(r.timeout=void 0,this[Jo]=Object.create(null),this[zB]=[],this.socket=null,this.connection=null,this.method=r.method||\"GET\",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!(\"authorization\"in this[Jo])&&(this[Jo].authorization=\"Basic \"+Buffer.from(r.auth).toString(\"base64\")),r.session=r.tlsSession,r.path=r.socketPath,this[jfe]=r,n===443?(this[DH]=`https://${c}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=c)):(this[DH]=`https://${c}:${n}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=`${c}:${n}`)),f&&this.setTimeout(f),s&&this.once(\"response\",s),this[JQ]=!1}get method(){return this[Jo][_fe]}set method(e){e&&(this[Jo][_fe]=e.toUpperCase())}get path(){return this[Jo][Hfe]}set path(e){e&&(this[Jo][Hfe]=e)}get _mustNotHaveABody(){return this.method===\"GET\"||this.method===\"HEAD\"||this.method===\"DELETE\"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error(\"The GET, HEAD and DELETE methods must NOT have a body\"));return}this.flushHeaders();let a=()=>this._request.write(e,r,s);this._request?a():this[zB].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[zB].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit(\"abort\")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[JQ]||this.destroyed)return;this[JQ]=!0;let e=this.method===Xtt,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||Wtt(s,this,[\"timeout\",\"continue\",\"close\",\"error\"]);let a=c=>(...f)=>{!this.writable&&!this.destroyed?c(...f):this.once(\"finish\",()=>{c(...f)})};s.once(\"response\",a((c,f,p)=>{let h=new Gtt(this.socket,s.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=c[Ufe],h.headers=c,h.rawHeaders=p,h.once(\"end\",()=>{this.aborted?(h.aborted=!0,h.emit(\"aborted\")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit(\"connect\",h,s,Buffer.alloc(0))?this.emit(\"close\"):s.destroy()):(s.on(\"data\",E=>{!h._dumped&&!h.push(E)&&s.pause()}),s.once(\"end\",()=>{h.push(null)}),this.emit(\"response\",h)||h._dump())})),s.once(\"headers\",a(c=>this.emit(\"information\",{statusCode:c[Ufe]}))),s.once(\"trailers\",a((c,f,p)=>{let{res:h}=this;h.trailers=c,h.rawTrailers=p}));let{socket:n}=s.session;this.socket=n,this.connection=n;for(let c of this[zB])c();this.emit(\"socket\",this.socket)};if(this[bH])try{r(this[bH].request(this[Jo]))}catch(s){this.emit(\"error\",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[DH],this[jfe],this[Jo]))}catch(s){this.emit(\"error\",s)}}}getHeader(e){if(typeof e!=\"string\")throw new SH(\"name\",\"string\",e);return this[Jo][e.toLowerCase()]}get headersSent(){return this[JQ]}removeHeader(e){if(typeof e!=\"string\")throw new SH(\"name\",\"string\",e);if(this.headersSent)throw new Mfe(\"remove\");delete this[Jo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Mfe(\"set\");if(typeof e!=\"string\"||!Ztt.test(e)&&!Ytt(e))throw new Jtt(\"Header name\",e);if(typeof r>\"u\")throw new Ktt(r,e);if($tt.test(r))throw new ztt(\"header content\",e);this[Jo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let s=()=>this._request.setTimeout(e,r);return this._request?s():this[zB].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};Gfe.exports=PH});var Wfe=_(($Mt,qfe)=>{\"use strict\";var ert=Ie(\"tls\");qfe.exports=(t={},e=ert.connect)=>new Promise((r,s)=>{let a=!1,n,c=async()=>{await p,n.off(\"timeout\",f),n.off(\"error\",s),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit(\"timeout\"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},f=async()=>{a=!0,c()},p=(async()=>{try{n=await e(t,c),n.on(\"error\",s),n.once(\"timeout\",f)}catch(h){s(h)}})()})});var Vfe=_((eUt,Yfe)=>{\"use strict\";var trt=Ie(\"net\");Yfe.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith(\"[\")?r.indexOf(\"]\")===-1?e=r:e=r.slice(1,-1):e=r.split(\":\",1)[0]),trt.isIP(e)?\"\":e}});var zfe=_((tUt,QH)=>{\"use strict\";var Jfe=Ie(\"http\"),kH=Ie(\"https\"),rrt=Wfe(),nrt=EH(),irt=xH(),srt=Vfe(),ort=vH(),KQ=new nrt({maxSize:100}),XB=new Map,Kfe=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let s=()=>{t.emit(\"free\",e,r)};e.on(\"free\",s);let a=()=>{t.removeSocket(e,r)};e.on(\"close\",a);let n=()=>{t.removeSocket(e,r),e.off(\"close\",a),e.off(\"free\",s),e.off(\"agentRemove\",n)};e.on(\"agentRemove\",n),t.emit(\"free\",e,r)},art=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!KQ.has(e)){if(XB.has(e))return(await XB.get(e)).alpnProtocol;let{path:r,agent:s}=t;t.path=t.socketPath;let a=rrt(t);XB.set(e,a);try{let{socket:n,alpnProtocol:c}=await a;if(KQ.set(e,c),t.path=r,c===\"h2\")n.destroy();else{let{globalAgent:f}=kH,p=kH.Agent.prototype.createConnection;s?s.createConnection===p?Kfe(s,n,t):n.destroy():f.createConnection===p?Kfe(f,n,t):n.destroy()}return XB.delete(e),c}catch(n){throw XB.delete(e),n}}return KQ.get(e)};QH.exports=async(t,e,r)=>{if((typeof t==\"string\"||t instanceof URL)&&(t=ort(new URL(t))),typeof e==\"function\"&&(r=e,e=void 0),e={ALPNProtocols:[\"h2\",\"http/1.1\"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error(\"The `ALPNProtocols` option must be an Array with at least one entry\");e.protocol=e.protocol||\"https:\";let s=e.protocol===\"https:\";e.host=e.hostname||e.host||\"localhost\",e.session=e.tlsSession,e.servername=e.servername||srt(e),e.port=e.port||(s?443:80),e._defaultAgent=s?kH.globalAgent:Jfe.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error(\"The `options.agent` object can contain only `http`, `https` or `http2` properties\");e.agent=a[s?\"https\":\"http\"]}return s&&await art(e)===\"h2\"?(a&&(e.agent=a.http2),new irt(e,r)):Jfe.request(e,r)};QH.exports.protocolCache=KQ});var Zfe=_((rUt,Xfe)=>{\"use strict\";var lrt=Ie(\"http2\"),crt=CH(),TH=xH(),urt=BH(),frt=zfe(),Art=(t,e,r)=>new TH(t,e,r),prt=(t,e,r)=>{let s=new TH(t,e,r);return s.end(),s};Xfe.exports={...lrt,ClientRequest:TH,IncomingMessage:urt,...crt,request:Art,get:prt,auto:frt}});var FH=_(RH=>{\"use strict\";Object.defineProperty(RH,\"__esModule\",{value:!0});var $fe=Np();RH.default=t=>$fe.default.nodeStream(t)&&$fe.default.function_(t.getBoundary)});var nAe=_(NH=>{\"use strict\";Object.defineProperty(NH,\"__esModule\",{value:!0});var tAe=Ie(\"fs\"),rAe=Ie(\"util\"),eAe=Np(),hrt=FH(),grt=rAe.promisify(tAe.stat);NH.default=async(t,e)=>{if(e&&\"content-length\"in e)return Number(e[\"content-length\"]);if(!t)return 0;if(eAe.default.string(t))return Buffer.byteLength(t);if(eAe.default.buffer(t))return t.length;if(hrt.default(t))return rAe.promisify(t.getLength.bind(t))();if(t instanceof tAe.ReadStream){let{size:r}=await grt(t.path);return r===0?void 0:r}}});var LH=_(OH=>{\"use strict\";Object.defineProperty(OH,\"__esModule\",{value:!0});function drt(t,e,r){let s={};for(let a of r)s[a]=(...n)=>{e.emit(a,...n)},t.on(a,s[a]);return()=>{for(let a of r)t.off(a,s[a])}}OH.default=drt});var iAe=_(MH=>{\"use strict\";Object.defineProperty(MH,\"__esModule\",{value:!0});MH.default=()=>{let t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(let e of t){let{origin:r,event:s,fn:a}=e;r.removeListener(s,a)}t.length=0}}}});var oAe=_(ZB=>{\"use strict\";Object.defineProperty(ZB,\"__esModule\",{value:!0});ZB.TimeoutError=void 0;var mrt=Ie(\"net\"),yrt=iAe(),sAe=Symbol(\"reentry\"),Ert=()=>{},zQ=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name=\"TimeoutError\",this.code=\"ETIMEDOUT\"}};ZB.TimeoutError=zQ;ZB.default=(t,e,r)=>{if(sAe in t)return Ert;t[sAe]=!0;let s=[],{once:a,unhandleAll:n}=yrt.default(),c=(C,S,P)=>{var I;let R=setTimeout(S,C,C,P);(I=R.unref)===null||I===void 0||I.call(R);let N=()=>{clearTimeout(R)};return s.push(N),N},{host:f,hostname:p}=r,h=(C,S)=>{t.destroy(new zQ(C,S))},E=()=>{for(let C of s)C();n()};if(t.once(\"error\",C=>{if(E(),t.listenerCount(\"error\")===0)throw C}),t.once(\"close\",E),a(t,\"response\",C=>{a(C,\"end\",E)}),typeof e.request<\"u\"&&c(e.request,h,\"request\"),typeof e.socket<\"u\"){let C=()=>{h(e.socket,\"socket\")};t.setTimeout(e.socket,C),s.push(()=>{t.removeListener(\"timeout\",C)})}return a(t,\"socket\",C=>{var S;let{socketPath:P}=t;if(C.connecting){let I=!!(P??mrt.isIP((S=p??f)!==null&&S!==void 0?S:\"\")!==0);if(typeof e.lookup<\"u\"&&!I&&typeof C.address().address>\"u\"){let R=c(e.lookup,h,\"lookup\");a(C,\"lookup\",R)}if(typeof e.connect<\"u\"){let R=()=>c(e.connect,h,\"connect\");I?a(C,\"connect\",R()):a(C,\"lookup\",N=>{N===null&&a(C,\"connect\",R())})}typeof e.secureConnect<\"u\"&&r.protocol===\"https:\"&&a(C,\"connect\",()=>{let R=c(e.secureConnect,h,\"secureConnect\");a(C,\"secureConnect\",R)})}if(typeof e.send<\"u\"){let I=()=>c(e.send,h,\"send\");C.connecting?a(C,\"connect\",()=>{a(t,\"upload-complete\",I())}):a(t,\"upload-complete\",I())}}),typeof e.response<\"u\"&&a(t,\"upload-complete\",()=>{let C=c(e.response,h,\"response\");a(t,\"response\",C)}),E}});var lAe=_(UH=>{\"use strict\";Object.defineProperty(UH,\"__esModule\",{value:!0});var aAe=Np();UH.default=t=>{t=t;let e={protocol:t.protocol,hostname:aAe.default.string(t.hostname)&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return aAe.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var cAe=_(_H=>{\"use strict\";Object.defineProperty(_H,\"__esModule\",{value:!0});var Irt=Ie(\"url\"),Crt=[\"protocol\",\"host\",\"hostname\",\"port\",\"pathname\",\"search\"];_H.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError(\"Parameters `path` and `pathname` are mutually exclusive.\");if(e.search)throw new TypeError(\"Parameters `path` and `search` are mutually exclusive.\");if(e.searchParams)throw new TypeError(\"Parameters `path` and `searchParams` are mutually exclusive.\")}if(e.search&&e.searchParams)throw new TypeError(\"Parameters `search` and `searchParams` are mutually exclusive.\");if(!t){if(!e.protocol)throw new TypeError(\"No URL protocol specified\");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:\"\"}`}let a=new Irt.URL(t);if(e.path){let n=e.path.indexOf(\"?\");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of Crt)e[n]&&(a[n]=e[n].toString());return a}});var uAe=_(jH=>{\"use strict\";Object.defineProperty(jH,\"__esModule\",{value:!0});var HH=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e==\"object\"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e==\"object\"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e==\"object\"?this.weakMap.has(e):this.map.has(e)}};jH.default=HH});var qH=_(GH=>{\"use strict\";Object.defineProperty(GH,\"__esModule\",{value:!0});var wrt=async t=>{let e=[],r=0;for await(let s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(\"\"))};GH.default=wrt});var AAe=_(sm=>{\"use strict\";Object.defineProperty(sm,\"__esModule\",{value:!0});sm.dnsLookupIpVersionToFamily=sm.isDnsLookupIpVersion=void 0;var fAe={auto:0,ipv4:4,ipv6:6};sm.isDnsLookupIpVersion=t=>t in fAe;sm.dnsLookupIpVersionToFamily=t=>{if(sm.isDnsLookupIpVersion(t))return fAe[t];throw new Error(\"Invalid DNS lookup IP version\")}});var WH=_(XQ=>{\"use strict\";Object.defineProperty(XQ,\"__esModule\",{value:!0});XQ.isResponseOk=void 0;XQ.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var hAe=_(YH=>{\"use strict\";Object.defineProperty(YH,\"__esModule\",{value:!0});var pAe=new Set;YH.default=t=>{pAe.has(t)||(pAe.add(t),process.emitWarning(`Got: ${t}`,{type:\"DeprecationWarning\"}))}});var gAe=_(VH=>{\"use strict\";Object.defineProperty(VH,\"__esModule\",{value:!0});var Si=Np(),Brt=(t,e)=>{if(Si.default.null_(t.encoding))throw new TypeError(\"To get a Buffer, set `options.responseType` to `buffer` instead\");Si.assert.any([Si.default.string,Si.default.undefined],t.encoding),Si.assert.any([Si.default.boolean,Si.default.undefined],t.resolveBodyOnly),Si.assert.any([Si.default.boolean,Si.default.undefined],t.methodRewriting),Si.assert.any([Si.default.boolean,Si.default.undefined],t.isStream),Si.assert.any([Si.default.string,Si.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType=\"text\");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Si.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):Si.default.number(r)&&(t.retry.limit=r),Si.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Si.default.number))),Si.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:s}=t;if(!Si.default.function_(s.transform))throw new Error(\"`options.pagination.transform` must be implemented\");if(!Si.default.function_(s.shouldContinue))throw new Error(\"`options.pagination.shouldContinue` must be implemented\");if(!Si.default.function_(s.filter))throw new TypeError(\"`options.pagination.filter` must be implemented\");if(!Si.default.function_(s.paginate))throw new Error(\"`options.pagination.paginate` must be implemented\")}return t.responseType===\"json\"&&t.headers.accept===void 0&&(t.headers.accept=\"application/json\"),t};VH.default=Brt});var dAe=_($B=>{\"use strict\";Object.defineProperty($B,\"__esModule\",{value:!0});$B.retryAfterStatusCodes=void 0;$B.retryAfterStatusCodes=new Set([413,429,503]);var vrt=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),c=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!c)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}let f=Math.random()*100;return 2**(t-1)*1e3+f};$B.default=vrt});var rv=_(Ln=>{\"use strict\";Object.defineProperty(Ln,\"__esModule\",{value:!0});Ln.UnsupportedProtocolError=Ln.ReadError=Ln.TimeoutError=Ln.UploadError=Ln.CacheError=Ln.HTTPError=Ln.MaxRedirectsError=Ln.RequestError=Ln.setNonEnumerableProperties=Ln.knownHookEvents=Ln.withoutBody=Ln.kIsNormalizedAlready=void 0;var mAe=Ie(\"util\"),yAe=Ie(\"stream\"),Srt=Ie(\"fs\"),w0=Ie(\"url\"),EAe=Ie(\"http\"),JH=Ie(\"http\"),Drt=Ie(\"https\"),brt=Rue(),Prt=_ue(),IAe=Efe(),xrt=Bfe(),krt=Zfe(),Qrt=YQ(),at=Np(),Trt=nAe(),CAe=FH(),Rrt=LH(),wAe=oAe(),Frt=lAe(),BAe=cAe(),Nrt=uAe(),Ort=qH(),vAe=AAe(),Lrt=WH(),B0=hAe(),Mrt=gAe(),Urt=dAe(),KH,po=Symbol(\"request\"),eT=Symbol(\"response\"),mI=Symbol(\"responseSize\"),yI=Symbol(\"downloadedSize\"),EI=Symbol(\"bodySize\"),II=Symbol(\"uploadedSize\"),ZQ=Symbol(\"serverResponsesPiped\"),SAe=Symbol(\"unproxyEvents\"),DAe=Symbol(\"isFromCache\"),zH=Symbol(\"cancelTimeouts\"),bAe=Symbol(\"startedReading\"),CI=Symbol(\"stopReading\"),$Q=Symbol(\"triggerRead\"),v0=Symbol(\"body\"),ev=Symbol(\"jobs\"),PAe=Symbol(\"originalResponse\"),xAe=Symbol(\"retryTimeout\");Ln.kIsNormalizedAlready=Symbol(\"isNormalizedAlready\");var _rt=at.default.string(process.versions.brotli);Ln.withoutBody=new Set([\"GET\",\"HEAD\"]);Ln.knownHookEvents=[\"init\",\"beforeRequest\",\"beforeRedirect\",\"beforeError\",\"beforeRetry\",\"afterResponse\"];function Hrt(t){for(let e in t){let r=t[e];if(!at.default.string(r)&&!at.default.number(r)&&!at.default.boolean(r)&&!at.default.null_(r)&&!at.default.undefined(r))throw new TypeError(`The \\`searchParams\\` value '${String(r)}' must be a string, number, boolean or null`)}}function jrt(t){return at.default.object(t)&&!(\"statusCode\"in t)}var XH=new Nrt.default,Grt=async t=>new Promise((e,r)=>{let s=a=>{r(a)};t.pending||e(),t.once(\"error\",s),t.once(\"ready\",()=>{t.off(\"error\",s),e()})}),qrt=new Set([300,301,302,303,304,307,308]),Wrt=[\"context\",\"body\",\"json\",\"form\"];Ln.setNonEnumerableProperties=(t,e)=>{let r={};for(let s of t)if(s)for(let a of Wrt)a in s&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:s[a]});Object.defineProperties(e,r)};var fs=class extends Error{constructor(e,r,s){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name=\"RequestError\",this.code=r.code,s instanceof aT?(Object.defineProperty(this,\"request\",{enumerable:!1,value:s}),Object.defineProperty(this,\"response\",{enumerable:!1,value:s[eT]}),Object.defineProperty(this,\"options\",{enumerable:!1,value:s.options})):Object.defineProperty(this,\"options\",{enumerable:!1,value:s}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,at.default.string(r.stack)&&at.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,c=this.stack.slice(n).split(`\n`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`\n`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`\n`)}${f.reverse().join(`\n`)}`}}};Ln.RequestError=fs;var tT=class extends fs{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name=\"MaxRedirectsError\"}};Ln.MaxRedirectsError=tT;var rT=class extends fs{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name=\"HTTPError\"}};Ln.HTTPError=rT;var nT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"CacheError\"}};Ln.CacheError=nT;var iT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"UploadError\"}};Ln.UploadError=iT;var sT=class extends fs{constructor(e,r,s){super(e.message,e,s),this.name=\"TimeoutError\",this.event=e.event,this.timings=r}};Ln.TimeoutError=sT;var tv=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"ReadError\"}};Ln.ReadError=tv;var oT=class extends fs{constructor(e){super(`Unsupported protocol \"${e.url.protocol}\"`,{},e),this.name=\"UnsupportedProtocolError\"}};Ln.UnsupportedProtocolError=oT;var Yrt=[\"socket\",\"connect\",\"continue\",\"information\",\"upgrade\",\"timeout\"],aT=class extends yAe.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[yI]=0,this[II]=0,this.requestInitialized=!1,this[ZQ]=new Set,this.redirects=[],this[CI]=!1,this[$Q]=!1,this[ev]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on(\"pipe\",h=>{h.prependListener(\"data\",a),h.on(\"data\",n),h.prependListener(\"end\",a),h.on(\"end\",n)}),this.on(\"unpipe\",h=>{h.off(\"data\",a),h.off(\"data\",n),h.off(\"end\",a),h.off(\"end\",n)}),this.on(\"pipe\",h=>{h instanceof JH.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Srt.ReadStream&&await Grt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError(\"Missing `url` property\");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[po])===null||h===void 0||h.destroy();return}for(let C of this[ev])C();this[ev].length=0,this.requestInitialized=!0}catch(E){if(E instanceof fs){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError(\"The `url` option is mutually exclusive with the `input` argument\");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new w0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([vAe.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.https.pfx)),at.assert.any([at.default.object,at.default.undefined],r.cacheOptions),at.default.string(r.method)?r.method=r.method.toUpperCase():r.method=\"GET\",r.headers===s?.headers?r.headers={...r.headers}:r.headers=Qrt({...s?.headers,...r.headers}),\"slashes\"in r)throw new TypeError(\"The legacy `url.Url` has been deprecated. Use `URL` instead.\");if(\"auth\"in r)throw new TypeError(\"Parameter `auth` is deprecated. Use `username` / `password` instead.\");if(\"searchParams\"in r&&r.searchParams&&r.searchParams!==s?.searchParams){let P;if(at.default.string(r.searchParams)||r.searchParams instanceof w0.URLSearchParams)P=new w0.URLSearchParams(r.searchParams);else{Hrt(r.searchParams),P=new w0.URLSearchParams;for(let I in r.searchParams){let R=r.searchParams[I];R===null?P.append(I,\"\"):R!==void 0&&P.append(I,R)}}(a=s?.searchParams)===null||a===void 0||a.forEach((I,R)=>{P.has(R)||P.append(R,I)}),r.searchParams=P}if(r.username=(n=r.username)!==null&&n!==void 0?n:\"\",r.password=(c=r.password)!==null&&c!==void 0?c:\"\",at.default.undefined(r.prefixUrl)?r.prefixUrl=(f=s?.prefixUrl)!==null&&f!==void 0?f:\"\":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==\"\"&&!r.prefixUrl.endsWith(\"/\")&&(r.prefixUrl+=\"/\")),at.default.string(r.url)){if(r.url.startsWith(\"/\"))throw new Error(\"`input` must not start with a slash when using `prefixUrl`\");r.url=BAe.default(r.prefixUrl+r.url,r)}else(at.default.undefined(r.url)&&r.prefixUrl!==\"\"||r.protocol)&&(r.url=BAe.default(r.prefixUrl,r));if(r.url){\"port\"in r&&delete r.port;let{prefixUrl:P}=r;Object.defineProperty(r,\"prefixUrl\",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \\`prefixUrl\\` from ${P} to ${R}: ${N.href}`);r.url=new w0.URL(R+N.href.slice(P.length)),P=R},get:()=>P});let{protocol:I}=r.url;if(I===\"unix:\"&&(I=\"http:\",r.url=new w0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),I!==\"http:\"&&I!==\"https:\")throw new oT(r);r.username===\"\"?r.username=r.url.username:r.url.username=r.username,r.password===\"\"?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:P,getCookieString:I}=E;at.assert.function_(P),at.assert.function_(I),P.length===4&&I.length===0&&(P=mAe.promisify(P.bind(r.cookieJar)),I=mAe.promisify(I.bind(r.cookieJar)),r.cookieJar={setCookie:P,getCookieString:I})}let{cache:C}=r;if(C&&(XH.has(C)||XH.set(C,new IAe((P,I)=>{let R=P[po](P,I);return at.default.promise(R)&&(R.once=(N,U)=>{if(N===\"error\")R.catch(U);else if(N===\"abort\")(async()=>{try{(await R).once(\"abort\",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},C))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)KH||(KH=new Prt.default),r.dnsCache=KH;else if(!at.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \\`dnsCache\\` must be a CacheableLookup instance or a boolean, got ${at.default(r.dnsCache)}`);at.default.number(r.timeout)?r.timeout={request:r.timeout}:s&&r.timeout!==s.timeout?r.timeout={...s.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let S=r.hooks===s?.hooks;r.hooks={...r.hooks};for(let P of Ln.knownHookEvents)if(P in r.hooks)if(at.default.array(r.hooks[P]))r.hooks[P]=[...r.hooks[P]];else throw new TypeError(`Parameter \\`${P}\\` must be an Array, got ${at.default(r.hooks[P])}`);else r.hooks[P]=[];if(s&&!S)for(let P of Ln.knownHookEvents)s.hooks[P].length>0&&(r.hooks[P]=[...s.hooks[P],...r.hooks[P]]);if(\"family\"in r&&B0.default('\"options.family\" was never documented, please use \"options.dnsLookupIpVersion\"'),s?.https&&(r.https={...s.https,...r.https}),\"rejectUnauthorized\"in r&&B0.default('\"options.rejectUnauthorized\" is now deprecated, please use \"options.https.rejectUnauthorized\"'),\"checkServerIdentity\"in r&&B0.default('\"options.checkServerIdentity\" was never documented, please use \"options.https.checkServerIdentity\"'),\"ca\"in r&&B0.default('\"options.ca\" was never documented, please use \"options.https.certificateAuthority\"'),\"key\"in r&&B0.default('\"options.key\" was never documented, please use \"options.https.key\"'),\"cert\"in r&&B0.default('\"options.cert\" was never documented, please use \"options.https.certificate\"'),\"passphrase\"in r&&B0.default('\"options.passphrase\" was never documented, please use \"options.https.passphrase\"'),\"pfx\"in r&&B0.default('\"options.pfx\" was never documented, please use \"options.https.pfx\"'),\"followRedirects\"in r)throw new TypeError(\"The `followRedirects` option does not exist. Use `followRedirect` instead.\");if(r.agent){for(let P in r.agent)if(P!==\"http\"&&P!==\"https\"&&P!==\"http2\")throw new TypeError(`Expected the \\`options.agent\\` properties to be \\`http\\`, \\`https\\` or \\`http2\\`, got \\`${P}\\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Ln.setNonEnumerableProperties([s,h],r),Mrt.default(r,s)}_lockWrite(){let e=()=>{throw new TypeError(\"The payload has been already provided\")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,s=!at.default.undefined(e.form),a=!at.default.undefined(e.json),n=!at.default.undefined(e.body),c=s||a||n,f=Ln.withoutBody.has(e.method)&&!(e.method===\"GET\"&&e.allowGetBody);if(this._cannotHaveBody=f,c){if(f)throw new TypeError(`The \\`${e.method}\\` method cannot be used with a body`);if([n,s,a].filter(p=>p).length>1)throw new TypeError(\"The `body`, `json` and `form` options are mutually exclusive\");if(n&&!(e.body instanceof yAe.Readable)&&!at.default.string(e.body)&&!at.default.buffer(e.body)&&!CAe.default(e.body))throw new TypeError(\"The `body` option must be a stream.Readable, string or Buffer\");if(s&&!at.default.object(e.form))throw new TypeError(\"The `form` option must be an Object\");{let p=!at.default.string(r[\"content-type\"]);n?(CAe.default(e.body)&&p&&(r[\"content-type\"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[v0]=e.body):s?(p&&(r[\"content-type\"]=\"application/x-www-form-urlencoded\"),this[v0]=new w0.URLSearchParams(e.form).toString()):(p&&(r[\"content-type\"]=\"application/json\"),this[v0]=e.stringifyJson(e.json));let h=await Trt.default(this[v0],e.headers);at.default.undefined(r[\"content-length\"])&&at.default.undefined(r[\"transfer-encoding\"])&&!f&&!at.default.undefined(h)&&(r[\"content-length\"]=String(h))}}else f?this._lockWrite():this._unlockWrite();this[EI]=Number(r[\"content-length\"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:s}=r;this[PAe]=e,r.decompress&&(e=xrt(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:EAe.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[DAe]=n.isFromCache,this[mI]=Number(e.headers[\"content-length\"])||void 0,this[eT]=e,e.once(\"end\",()=>{this[mI]=this[yI],this.emit(\"downloadProgress\",this.downloadProgress)}),e.once(\"error\",f=>{e.destroy(),this._beforeError(new tv(f,this))}),e.once(\"aborted\",()=>{this._beforeError(new tv({name:\"Error\",message:\"The server aborted pending request\",code:\"ECONNRESET\"},this))}),this.emit(\"downloadProgress\",this.downloadProgress);let c=e.headers[\"set-cookie\"];if(at.default.object(r.cookieJar)&&c){let f=c.map(async p=>r.cookieJar.setCookie(p,s.toString()));r.ignoreInvalidCookies&&(f=f.map(async p=>p.catch(()=>{})));try{await Promise.all(f)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&qrt.has(a)){if(e.resume(),this[po]&&(this[zH](),delete this[po],this[SAe]()),(a===303&&r.method!==\"GET\"&&r.method!==\"HEAD\"||!r.methodRewriting)&&(r.method=\"GET\",\"body\"in r&&delete r.body,\"json\"in r&&delete r.json,\"form\"in r&&delete r.form,this[v0]=void 0,delete r.headers[\"content-length\"]),this.redirects.length>=r.maxRedirects){this._beforeError(new tT(this));return}try{let p=Buffer.from(e.headers.location,\"binary\").toString(),h=new w0.URL(p,s),E=h.toString();decodeURI(E),h.hostname!==s.hostname||h.port!==s.port?(\"host\"in r.headers&&delete r.headers.host,\"cookie\"in r.headers&&delete r.headers.cookie,\"authorization\"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username=\"\",r.password=\"\")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let C of r.hooks.beforeRedirect)await C(r,n);this.emit(\"redirect\",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!Lrt.isResponseOk(n)){this._beforeError(new rT(n));return}e.on(\"readable\",()=>{this[$Q]&&this._read()}),this.on(\"resume\",()=>{e.resume()}),this.on(\"pause\",()=>{e.pause()}),e.once(\"end\",()=>{this.push(null)}),this.emit(\"response\",e);for(let f of this[ZQ])if(!f.headersSent){for(let p in e.headers){let h=r.decompress?p!==\"content-encoding\":!0,E=e.headers[p];h&&f.setHeader(p,E)}f.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:s,url:a}=r;brt.default(e),this[zH]=wAe.default(e,s,a);let n=r.cache?\"cacheableResponse\":\"response\";e.once(n,p=>{this._onResponse(p)}),e.once(\"error\",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners(\"end\"),p=p instanceof wAe.TimeoutError?new sT(p,this.timings,this):new fs(p.message,p,this),this._beforeError(p)}),this[SAe]=Rrt.default(e,this,Yrt),this[po]=e,this.emit(\"uploadProgress\",this.uploadProgress);let c=this[v0],f=this.redirects.length===0?this:e;at.default.nodeStream(c)?(c.pipe(f),c.once(\"error\",p=>{this._beforeError(new iT(p,this))})):(this._unlockWrite(),at.default.undefined(c)?(this._cannotHaveBody||this._noPipe)&&(f.end(),this._lockWrite()):(this._writeRequest(c,void 0,()=>{}),f.end(),this._lockWrite())),this.emit(\"request\",e)}async _createCacheableRequest(e,r){return new Promise((s,a)=>{Object.assign(r,Frt.default(e)),delete r.url;let n,c=XH.get(r.cache)(r,async f=>{f._readableState.autoDestroy=!1,n&&(await n).emit(\"cacheableResponse\",f),s(f)});r.url=e,c.once(\"error\",a),c.once(\"request\",async f=>{n=f,s(n)})})}async _makeRequest(){var e,r,s,a,n;let{options:c}=this,{headers:f}=c;for(let U in f)if(at.default.undefined(f[U]))delete f[U];else if(at.default.null_(f[U]))throw new TypeError(`Use \\`undefined\\` instead of \\`null\\` to delete the \\`${U}\\` header`);if(c.decompress&&at.default.undefined(f[\"accept-encoding\"])&&(f[\"accept-encoding\"]=_rt?\"gzip, deflate, br\":\"gzip, deflate\"),c.cookieJar){let U=await c.cookieJar.getCookieString(c.url.toString());at.default.nonEmptyString(U)&&(c.headers.cookie=U)}for(let U of c.hooks.beforeRequest){let W=await U(c);if(!at.default.undefined(W)){c.request=()=>W;break}}c.body&&this[v0]!==c.body&&(this[v0]=c.body);let{agent:p,request:h,timeout:E,url:C}=c;if(c.dnsCache&&!(\"lookup\"in c)&&(c.lookup=c.dnsCache.lookup),C.hostname===\"unix\"){let U=/(?<socketPath>.+?):(?<path>.+)/.exec(`${C.pathname}${C.search}`);if(U?.groups){let{socketPath:W,path:ee}=U.groups;Object.assign(c,{socketPath:W,path:ee,host:\"\"})}}let S=C.protocol===\"https:\",P;c.http2?P=krt.auto:P=S?Drt.request:EAe.request;let I=(e=c.request)!==null&&e!==void 0?e:P,R=c.cache?this._createCacheableRequest:I;p&&!c.http2&&(c.agent=p[S?\"https\":\"http\"]),c[po]=I,delete c.request,delete c.timeout;let N=c;if(N.shared=(r=c.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(s=c.cacheOptions)===null||s===void 0?void 0:s.cacheHeuristic,N.immutableMinTimeToLive=(a=c.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=c.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,c.dnsLookupIpVersion!==void 0)try{N.family=vAe.dnsLookupIpVersionToFamily(c.dnsLookupIpVersion)}catch{throw new Error(\"Invalid `dnsLookupIpVersion` option value\")}c.https&&(\"rejectUnauthorized\"in c.https&&(N.rejectUnauthorized=c.https.rejectUnauthorized),c.https.checkServerIdentity&&(N.checkServerIdentity=c.https.checkServerIdentity),c.https.certificateAuthority&&(N.ca=c.https.certificateAuthority),c.https.certificate&&(N.cert=c.https.certificate),c.https.key&&(N.key=c.https.key),c.https.passphrase&&(N.passphrase=c.https.passphrase),c.https.pfx&&(N.pfx=c.https.pfx));try{let U=await R(C,N);at.default.undefined(U)&&(U=P(C,N)),c.request=h,c.timeout=E,c.agent=p,c.https&&(\"rejectUnauthorized\"in c.https&&delete N.rejectUnauthorized,c.https.checkServerIdentity&&delete N.checkServerIdentity,c.https.certificateAuthority&&delete N.ca,c.https.certificate&&delete N.cert,c.https.key&&delete N.key,c.https.passphrase&&delete N.passphrase,c.https.pfx&&delete N.pfx),jrt(U)?this._onRequest(U):this.writable?(this.once(\"finish\",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof IAe.CacheError?new nT(U,this):new fs(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new fs(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[CI])return;let{options:r}=this,s=this.retryCount+1;this[CI]=!0,e instanceof fs||(e=new fs(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Ort.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount(\"retry\")!==0){let c;try{let f;n&&\"retry-after\"in n.headers&&(f=Number(n.headers[\"retry-after\"]),Number.isNaN(f)?(f=Date.parse(n.headers[\"retry-after\"])-Date.now(),f<=0&&(f=1)):f*=1e3),c=await r.retry.calculateDelay({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:Urt.default({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:0})})}catch(f){this._error(new fs(f.message,f,this));return}if(c){let f=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,s)}catch(p){this._error(new fs(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit(\"retry\",s,e))};this[xAe]=setTimeout(f,c);return}}this._error(a)})()}_read(){this[$Q]=!0;let e=this[eT];if(e&&!this[CI]){e.readableLength&&(this[$Q]=!1);let r;for(;(r=e.read())!==null;){this[yI]+=r.length,this[bAe]=!0;let s=this.downloadProgress;s.percent<1&&this.emit(\"downloadProgress\",s),this.push(r)}}}_write(e,r,s){let a=()=>{this._writeRequest(e,r,s)};this.requestInitialized?a():this[ev].push(a)}_writeRequest(e,r,s){this[po].destroyed||(this._progressCallbacks.push(()=>{this[II]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit(\"uploadProgress\",a)}),this[po].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),s(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(po in this)){e();return}if(this[po].destroyed){e();return}this[po].end(s=>{s||(this[EI]=this[II],this.emit(\"uploadProgress\",this.uploadProgress),this[po].emit(\"upload-complete\")),e(s)})};this.requestInitialized?r():this[ev].push(r)}_destroy(e,r){var s;this[CI]=!0,clearTimeout(this[xAe]),po in this&&(this[zH](),!((s=this[eT])===null||s===void 0)&&s.complete||this[po].destroy()),e!==null&&!at.default.undefined(e)&&!(e instanceof fs)&&(e=new fs(e.message,e,this)),r(e)}get _isAboutToError(){return this[CI]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,s;return((r=(e=this[po])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((s=this[PAe])===null||s===void 0)&&s.complete)}get socket(){var e,r;return(r=(e=this[po])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[mI]?e=this[yI]/this[mI]:this[mI]===this[yI]?e=1:e=0,{percent:e,transferred:this[yI],total:this[mI]}}get uploadProgress(){let e;return this[EI]?e=this[II]/this[EI]:this[EI]===this[II]?e=1:e=0,{percent:e,transferred:this[II],total:this[EI]}}get timings(){var e;return(e=this[po])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[DAe]}pipe(e,r){if(this[bAe])throw new Error(\"Failed to pipe. The response has been emitted already.\");return e instanceof JH.ServerResponse&&this[ZQ].add(e),super.pipe(e,r)}unpipe(e){return e instanceof JH.ServerResponse&&this[ZQ].delete(e),super.unpipe(e),this}};Ln.default=aT});var nv=_(qu=>{\"use strict\";var Vrt=qu&&qu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Jrt=qu&&qu.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Vrt(e,t,r)};Object.defineProperty(qu,\"__esModule\",{value:!0});qu.CancelError=qu.ParseError=void 0;var kAe=rv(),ZH=class extends kAe.RequestError{constructor(e,r){let{options:s}=r.request;super(`${e.message} in \"${s.url.toString()}\"`,e,r.request),this.name=\"ParseError\"}};qu.ParseError=ZH;var $H=class extends kAe.RequestError{constructor(e){super(\"Promise was canceled\",{},e),this.name=\"CancelError\"}get isCanceled(){return!0}};qu.CancelError=$H;Jrt(rv(),qu)});var TAe=_(ej=>{\"use strict\";Object.defineProperty(ej,\"__esModule\",{value:!0});var QAe=nv(),Krt=(t,e,r,s)=>{let{rawBody:a}=t;try{if(e===\"text\")return a.toString(s);if(e===\"json\")return a.length===0?\"\":r(a.toString());if(e===\"buffer\")return a;throw new QAe.ParseError({message:`Unknown body type '${e}'`,name:\"Error\"},t)}catch(n){throw new QAe.ParseError(n,t)}};ej.default=Krt});var tj=_(S0=>{\"use strict\";var zrt=S0&&S0.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Xrt=S0&&S0.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&zrt(e,t,r)};Object.defineProperty(S0,\"__esModule\",{value:!0});var Zrt=Ie(\"events\"),$rt=Np(),ent=Que(),lT=nv(),RAe=TAe(),FAe=rv(),tnt=LH(),rnt=qH(),NAe=WH(),nnt=[\"request\",\"response\",\"redirect\",\"uploadProgress\",\"downloadProgress\"];function OAe(t){let e,r,s=new Zrt.EventEmitter,a=new ent((c,f,p)=>{let h=E=>{let C=new FAe.default(void 0,t);C.retryCount=E,C._noPipe=!0,p(()=>C.destroy()),p.shouldReject=!1,p(()=>f(new lT.CancelError(C))),e=C,C.once(\"response\",async I=>{var R;if(I.retryCount=E,I.request.aborted)return;let N;try{N=await rnt.default(C),I.rawBody=N}catch{return}if(C._isAboutToError)return;let U=((R=I.headers[\"content-encoding\"])!==null&&R!==void 0?R:\"\").toLowerCase(),W=[\"gzip\",\"deflate\",\"br\"].includes(U),{options:ee}=C;if(W&&!ee.decompress)I.body=N;else try{I.body=RAe.default(I,ee.responseType,ee.parseJson,ee.encoding)}catch(ie){if(I.body=N.toString(),NAe.isResponseOk(I)){C._beforeError(ie);return}}try{for(let[ie,ue]of ee.hooks.afterResponse.entries())I=await ue(I,async le=>{let me=FAe.default.normalizeArguments(void 0,{...le,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},ee);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ie);for(let Be of me.hooks.beforeRetry)await Be(me);let pe=OAe(me);return p(()=>{pe.catch(()=>{}),pe.cancel()}),pe})}catch(ie){C._beforeError(new lT.RequestError(ie.message,ie,C));return}if(!NAe.isResponseOk(I)){C._beforeError(new lT.HTTPError(I));return}r=I,c(C.options.resolveBodyOnly?I.body:I)});let S=I=>{if(a.isCanceled)return;let{options:R}=C;if(I instanceof lT.HTTPError&&!R.throwHttpErrors){let{response:N}=I;c(C.options.resolveBodyOnly?N.body:N);return}f(I)};C.once(\"error\",S);let P=C.options.body;C.once(\"retry\",(I,R)=>{var N,U;if(P===((N=R.request)===null||N===void 0?void 0:N.options.body)&&$rt.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){S(R);return}h(I)}),tnt.default(C,s,nnt)};h(0)});a.on=(c,f)=>(s.on(c,f),a);let n=c=>{let f=(async()=>{await a;let{options:p}=r.request;return RAe.default(r,c,p.parseJson,p.encoding)})();return Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)),f};return a.json=()=>{let{headers:c}=e.options;return!e.writableFinished&&c.accept===void 0&&(c.accept=\"application/json\"),n(\"json\")},a.buffer=()=>n(\"buffer\"),a.text=()=>n(\"text\"),a}S0.default=OAe;Xrt(nv(),S0)});var LAe=_(rj=>{\"use strict\";Object.defineProperty(rj,\"__esModule\",{value:!0});var int=nv();function snt(t,...e){let r=(async()=>{if(t instanceof int.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}rj.default=snt});var _Ae=_(nj=>{\"use strict\";Object.defineProperty(nj,\"__esModule\",{value:!0});var MAe=Np();function UAe(t){for(let e of Object.values(t))(MAe.default.plainObject(e)||MAe.default.array(e))&&UAe(e);return Object.freeze(t)}nj.default=UAe});var jAe=_(HAe=>{\"use strict\";Object.defineProperty(HAe,\"__esModule\",{value:!0})});var ij=_(Nc=>{\"use strict\";var ont=Nc&&Nc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ant=Nc&&Nc.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&ont(e,t,r)};Object.defineProperty(Nc,\"__esModule\",{value:!0});Nc.defaultHandler=void 0;var GAe=Np(),Fc=tj(),lnt=LAe(),uT=rv(),cnt=_Ae(),unt={RequestError:Fc.RequestError,CacheError:Fc.CacheError,ReadError:Fc.ReadError,HTTPError:Fc.HTTPError,MaxRedirectsError:Fc.MaxRedirectsError,TimeoutError:Fc.TimeoutError,ParseError:Fc.ParseError,CancelError:Fc.CancelError,UnsupportedProtocolError:Fc.UnsupportedProtocolError,UploadError:Fc.UploadError},fnt=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:cT}=uT.default,qAe=(...t)=>{let e;for(let r of t)e=cT(void 0,r,e);return e},Ant=t=>t.isStream?new uT.default(void 0,t):Fc.default(t),pnt=t=>\"defaults\"in t&&\"options\"in t.defaults,hnt=[\"get\",\"post\",\"put\",\"patch\",\"head\",\"delete\"];Nc.defaultHandler=(t,e)=>e(t);var WAe=(t,e)=>{if(t)for(let r of t)r(e)},YAe=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(s=>(a,n)=>{let c,f=s(a,p=>(c=n(p),c));if(f!==c&&!a.isStream&&c){let p=f,{then:h,catch:E,finally:C}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(c)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(c)),p.then=h,p.catch=E,p.finally=C}return f});let e=(s,a={},n)=>{var c,f;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?Ant:h);if(GAe.default.plainObject(s)){let E={...s,...a};uT.setNonEnumerableProperties([s,a],E),a=E,s=void 0}try{let E;try{WAe(t.options.hooks.init,a),WAe((c=a.hooks)===null||c===void 0?void 0:c.init,a)}catch(S){E=S}let C=cT(s,a,n??t.options);if(C[uT.kIsNormalizedAlready]=!0,E)throw new Fc.RequestError(E.message,E,C);return h(C)}catch(E){if(a.isStream)throw E;return lnt.default(E,t.options.hooks.beforeError,(f=a.hooks)===null||f===void 0?void 0:f.beforeError)}};e.extend=(...s)=>{let a=[t.options],n=[...t._rawHandlers],c;for(let f of s)pnt(f)?(a.push(f.defaults.options),n.push(...f.defaults._rawHandlers),c=f.defaults.mutableDefaults):(a.push(f),\"handlers\"in f&&n.push(...f.handlers),c=f.mutableDefaults);return n=n.filter(f=>f!==Nc.defaultHandler),n.length===0&&n.push(Nc.defaultHandler),YAe({options:qAe(...a),handlers:n,mutableDefaults:!!c})};let r=async function*(s,a){let n=cT(s,a,t.options);n.resolveBodyOnly=!1;let c=n.pagination;if(!GAe.default.object(c))throw new TypeError(\"`options.pagination` must be implemented\");let f=[],{countLimit:p}=c,h=0;for(;h<c.requestLimit;){h!==0&&await fnt(c.backoff);let E=await e(void 0,void 0,n),C=await c.transform(E),S=[];for(let I of C)if(c.filter(I,f,S)&&(!c.shouldContinue(I,f,S)||(yield I,c.stackAllItems&&f.push(I),S.push(I),--p<=0)))return;let P=c.paginate(E,f,S);if(P===!1)return;P===E.request.options?n=E.request.options:P!==void 0&&(n=cT(void 0,P,n)),h++}};e.paginate=r,e.paginate.all=async(s,a)=>{let n=[];for await(let c of r(s,a))n.push(c);return n},e.paginate.each=r,e.stream=(s,a)=>e(s,{...a,isStream:!0});for(let s of hnt)e[s]=(a,n)=>e(a,{...n,method:s}),e.stream[s]=(a,n)=>e(a,{...n,method:s,isStream:!0});return Object.assign(e,unt),Object.defineProperty(e,\"defaults\",{value:t.mutableDefaults?t:cnt.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=qAe,e};Nc.default=YAe;ant(jAe(),Nc)});var KAe=_((Op,fT)=>{\"use strict\";var gnt=Op&&Op.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),VAe=Op&&Op.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&gnt(e,t,r)};Object.defineProperty(Op,\"__esModule\",{value:!0});var dnt=Ie(\"url\"),JAe=ij(),mnt={options:{method:\"GET\",retry:{limit:2,methods:[\"GET\",\"PUT\",\"HEAD\",\"DELETE\",\"OPTIONS\",\"TRACE\"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:[\"ETIMEDOUT\",\"ECONNRESET\",\"EADDRINUSE\",\"ECONNREFUSED\",\"EPIPE\",\"ENOTFOUND\",\"ENETUNREACH\",\"EAI_AGAIN\"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{\"user-agent\":\"got (https://github.com/sindresorhus/got)\"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:\"text\",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:\"\",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType===\"json\"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,\"link\"))return!1;let e=t.headers.link.split(\",\"),r;for(let s of e){let a=s.split(\";\");if(a[1].includes(\"next\")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new dnt.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[JAe.defaultHandler],mutableDefaults:!1},sj=JAe.default(mnt);Op.default=sj;fT.exports=sj;fT.exports.default=sj;fT.exports.__esModule=!0;VAe(ij(),Op);VAe(tj(),Op)});var nn={};Vt(nn,{Method:()=>tpe,del:()=>wnt,get:()=>lj,getNetworkSettings:()=>epe,post:()=>cj,put:()=>Cnt,request:()=>iv});async function oj(t){return Yl(XAe,t,()=>ce.readFilePromise(t).then(e=>(XAe.set(t,e),e)))}function Int({statusCode:t,statusMessage:e},r){let s=Ht(r,t,ht.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return KE(r,`${s}${e?` (${e})`:\"\"}`,a)}async function AT(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(s){if(s.name!==\"HTTPError\")throw s;let a=r?.(s,e)??s.response.body?.error;a==null&&(s.message.startsWith(\"Response code\")?a=\"The remote server failed to provide the requested resource\":a=s.message),s.code===\"ETIMEDOUT\"&&s.event===\"socket\"&&(a+=`(can be increased via ${Ht(e,\"httpTimeout\",ht.SETTING)})`);let n=new jt(35,a,c=>{s.response&&c.reportError(35,`  ${Kf(e,{label:\"Response Code\",value:_u(ht.NO_HINT,Int(s.response,e))})}`),s.request&&(c.reportError(35,`  ${Kf(e,{label:\"Request Method\",value:_u(ht.NO_HINT,s.request.options.method)})}`),c.reportError(35,`  ${Kf(e,{label:\"Request URL\",value:_u(ht.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&c.reportError(35,`  ${Kf(e,{label:\"Request Redirects\",value:_u(ht.NO_HINT,Z4(e,s.request.redirects,ht.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&c.reportError(35,`  ${Kf(e,{label:\"Request Retry Count\",value:_u(ht.NO_HINT,`${Ht(e,s.request.retryCount,ht.NUMBER)} (can be increased via ${Ht(e,\"httpRetry\",ht.SETTING)})`)})}`)});throw n.originalError=s,n}}function epe(t,e){let r=[...e.configuration.get(\"networkSettings\")].sort(([c],[f])=>f.length-c.length),s={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(s),n=typeof t==\"string\"?new URL(t):t;for(let[c,f]of r)if(aj.default.isMatch(n.hostname,c))for(let p of a){let h=f.get(p);h!==null&&typeof s[p]>\"u\"&&(s[p]=h)}for(let c of a)typeof s[c]>\"u\"&&(s[c]=e.configuration.get(c));return s}async function iv(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\",wrapNetworkRequest:f}){let p={target:t,body:e,configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c},h=async()=>await Bnt(t,e,p),E=typeof f<\"u\"?await f(h,p):h;return await(await r.reduceHook(S=>S.wrapNetworkRequest,E,p))()}async function lj(t,{configuration:e,jsonResponse:r,customErrorMessage:s,wrapNetworkRequest:a,...n}){let c=()=>AT(iv(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:s}).then(p=>p.body),f=await(typeof a<\"u\"?c():Yl(zAe,t,()=>c().then(p=>(zAe.set(t,p),p))));return r?JSON.parse(f.toString()):f}async function Cnt(t,e,{customErrorMessage:r,...s}){return(await AT(iv(t,e,{...s,method:\"PUT\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function cj(t,e,{customErrorMessage:r,...s}){return(await AT(iv(t,e,{...s,method:\"POST\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function wnt(t,{customErrorMessage:e,...r}){return(await AT(iv(t,null,{...r,method:\"DELETE\"}),{customErrorMessage:e,configuration:r.configuration})).body}async function Bnt(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\"}){let f=typeof t==\"string\"?new URL(t):t,p=epe(f,{configuration:r});if(p.enableNetwork===!1)throw new jt(80,`Request to '${f.href}' has been blocked because of your configuration settings`);if(f.protocol===\"http:\"&&!aj.default.isMatch(f.hostname,r.get(\"unsafeHttpWhitelist\")))throw new jt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${f.hostname})`);let h={headers:s,method:c};h.responseType=n?\"json\":\"buffer\",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e==\"string\"?h.body=e:h.json=e);let E=r.get(\"httpTimeout\"),C=r.get(\"httpRetry\"),S=r.get(\"enableStrictSsl\"),P=p.httpsCaFilePath,I=p.httpsCertFilePath,R=p.httpsKeyFilePath,{default:N}=await Promise.resolve().then(()=>ut(KAe())),U=P?await oj(P):void 0,W=I?await oj(I):void 0,ee=R?await oj(R):void 0,ie={rejectUnauthorized:S,ca:U,cert:W,key:ee},ue={http:p.httpProxy?new vue({proxy:p.httpProxy,proxyRequestOptions:ie}):ynt,https:p.httpsProxy?new Sue({proxy:p.httpsProxy,proxyRequestOptions:ie}):Ent},le=N.extend({timeout:{socket:E},retry:C,agent:ue,https:{rejectUnauthorized:S,certificateAuthority:U,certificate:W,key:ee},...h});return r.getLimit(\"networkConcurrency\")(()=>le(f))}var ZAe,$Ae,aj,zAe,XAe,ynt,Ent,tpe,pT=Xe(()=>{Dt();Due();ZAe=Ie(\"https\"),$Ae=Ie(\"http\"),aj=ut(Go());Tc();xc();Pc();zAe=new Map,XAe=new Map,ynt=new $Ae.Agent({keepAlive:!0}),Ent=new ZAe.Agent({keepAlive:!0});tpe=(a=>(a.GET=\"GET\",a.PUT=\"PUT\",a.POST=\"POST\",a.DELETE=\"DELETE\",a))(tpe||{})});var Ui={};Vt(Ui,{availableParallelism:()=>fj,getArchitecture:()=>sv,getArchitectureName:()=>Pnt,getArchitectureSet:()=>uj,getCaller:()=>Tnt,major:()=>vnt,openUrl:()=>Snt});function bnt(){if(process.platform!==\"linux\")return null;let t;try{t=ce.readFileSync(Dnt)}catch{}if(typeof t<\"u\"){if(t&&(t.includes(\"GLIBC\")||t.includes(\"GNU libc\")||t.includes(\"GNU C Library\")))return\"glibc\";if(t&&t.includes(\"musl\"))return\"musl\"}let r=(process.report?.getReport()??{}).sharedObjects??[],s=/\\/(?:(ld-linux-|[^/]+-linux-gnu\\/)|(libc.musl-|ld-musl-))/;return p0(r,a=>{let n=a.match(s);if(!n)return p0.skip;if(n[1])return\"glibc\";if(n[2])return\"musl\";throw new Error(\"Assertion failed: Expected the libc variant to have been detected\")})??null}function sv(){return npe=npe??{os:(process.env.YARN_IS_TEST_ENV?process.env.YARN_OS_OVERRIDE:void 0)??process.platform,cpu:(process.env.YARN_IS_TEST_ENV?process.env.YARN_CPU_OVERRIDE:void 0)??process.arch,libc:(process.env.YARN_IS_TEST_ENV?process.env.YARN_LIBC_OVERRIDE:void 0)??bnt()}}function Pnt(t=sv()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function uj(){let t=sv();return ipe=ipe??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function Qnt(t){let e=xnt.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf(\"native\")===0,s=e[2]&&e[2].indexOf(\"eval\")===0,a=knt.exec(e[2]);return s&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||\"<unknown>\",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Tnt(){let e=new Error().stack.split(`\n`)[3];return Qnt(e)}function fj(){return typeof hT.default.availableParallelism<\"u\"?hT.default.availableParallelism():Math.max(1,hT.default.cpus().length)}var hT,vnt,rpe,Snt,Dnt,npe,ipe,xnt,knt,gT=Xe(()=>{Dt();hT=ut(Ie(\"os\"));dT();Pc();vnt=Number(process.versions.node.split(\".\")[0]),rpe=new Map([[\"darwin\",\"open\"],[\"linux\",\"xdg-open\"],[\"win32\",\"explorer.exe\"]]).get(process.platform),Snt=typeof rpe<\"u\"?async t=>{try{return await Aj(rpe,[t],{cwd:J.cwd()}),!0}catch{return!1}}:void 0,Dnt=\"/usr/bin/ldd\";xnt=/^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,knt=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/});function yj(t,e,r,s,a){let n=YB(r);if(s.isArray||s.type===\"ANY\"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>pj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>pj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings \"${e}\" cannot be an array`);return pj(t,e,r,s,a)}function pj(t,e,r,s,a){let n=YB(r);switch(s.type){case\"ANY\":return NQ(n);case\"SHAPE\":return Ont(t,e,r,s,a);case\"MAP\":return Lnt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings \"${e}\" cannot be set to null`);if(\"values\"in s&&s.values?.includes(n))return n;let f=(()=>{if(s.type===\"BOOLEAN\"&&typeof n!=\"string\")return kB(n);if(typeof n!=\"string\")throw new Error(`Expected configuration setting \"${e}\" to be a string, got ${typeof n}`);let p=Vk(n,{env:t.env});switch(s.type){case\"ABSOLUTE_PATH\":{let h=a,E=H8(r);return E&&E[0]!==\"<\"&&(h=J.dirname(E)),J.resolve(h,fe.toPortablePath(p))}case\"LOCATOR_LOOSE\":return Qp(p,!1);case\"NUMBER\":return parseInt(p);case\"LOCATOR\":return Qp(p);case\"BOOLEAN\":return kB(p);case\"DURATION\":return Jk(p,s.unit);default:return p}})();if(\"values\"in s&&s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(\", \")}`);return f}function Ont(t,e,r,s,a){let n=YB(r);if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Object configuration settings \"${e}\" must be an object`);let c=Ej(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run \"yarn config\" to see the list of settings supported in Yarn`);c.set(f,yj(t,h,p,s.properties[f],a))}return c}function Lnt(t,e,r,s,a){let n=YB(r),c=new Map;if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Map configuration settings \"${e}\" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,C=s.valueDefinition;c.set(h,yj(t,E,p,C,a))}return c}function Ej(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case\"SHAPE\":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,Ej(t,n));return s}case\"MAP\":return e.isArray&&!r?[]:new Map;case\"ABSOLUTE_PATH\":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>J.normalize(s)):J.isAbsolute(e.default)?J.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>J.resolve(t.projectCwd,s)):J.resolve(t.projectCwd,e.default);case\"DURATION\":return Jk(e.default,e.unit);default:return e.default}}function yT(t,e,r){if(e.type===\"SECRET\"&&typeof t==\"string\"&&r.hideSecrets)return Nnt;if(e.type===\"ABSOLUTE_PATH\"&&typeof t==\"string\"&&r.getNativePaths)return fe.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(yT(a,e,r));return s}if(e.type===\"MAP\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=yT(n,e.valueDefinition,r);typeof c<\"u\"&&s.set(a,c)}return s}if(e.type===\"SHAPE\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=yT(n,c,r);typeof f<\"u\"&&s.set(a,f)}return s}return t}function Mnt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(ET)&&(e=(0,ope.default)(e.slice(ET.length)),t[e]=r);return t}function gj(){let t=`${ET}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r==\"string\")return r;return dj}async function spe(t){try{return await ce.readFilePromise(t)}catch{return Buffer.of()}}async function Unt(t,e){return Buffer.compare(...await Promise.all([spe(t),spe(e)]))===0}async function _nt(t,e){let[r,s]=await Promise.all([ce.statPromise(t),ce.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function jnt({configuration:t,selfPath:e}){let r=t.get(\"yarnPath\");return t.get(\"ignorePath\")||r===null||r===e||await Hnt(r,e)?null:r}var ope,Lp,ape,lpe,cpe,hj,Rnt,ov,Fnt,Mp,ET,dj,Nnt,wI,upe,mj,IT,mT,Hnt,ze,av=Xe(()=>{Dt();wc();ope=ut(Sre()),Lp=ut(Fd());Yt();ape=ut(yne()),lpe=Ie(\"module\"),cpe=ut(Ld()),hj=Ie(\"stream\");nue();oI();R8();F8();N8();gue();O8();tm();Iue();LQ();xc();I0();pT();Pc();gT();Rp();Wo();Rnt=function(){if(!Lp.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=fe.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=ce.readJsonSync(t)}catch{return!1}return!(!(\"repository\"in e)||!e.repository||(e.repository.private??!0))}(),ov=new Set([\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]),Fnt=new Set([\"isTestEnv\",\"injectNpmUser\",\"injectNpmPassword\",\"injectNpm2FaToken\",\"zipDataEpilogue\",\"cacheCheckpointOverride\",\"cacheVersionOverride\",\"lockfileVersionOverride\",\"osOverride\",\"cpuOverride\",\"libcOverride\",\"binFolder\",\"version\",\"flags\",\"profile\",\"gpg\",\"ignoreNode\",\"wrapOutput\",\"home\",\"confDir\",\"registry\",\"ignoreCwd\"]),Mp=/^(?!v)[a-z0-9._-]+$/i,ET=\"yarn_\",dj=\".yarnrc.yml\",Nnt=\"********\",wI=(C=>(C.ANY=\"ANY\",C.BOOLEAN=\"BOOLEAN\",C.ABSOLUTE_PATH=\"ABSOLUTE_PATH\",C.LOCATOR=\"LOCATOR\",C.LOCATOR_LOOSE=\"LOCATOR_LOOSE\",C.NUMBER=\"NUMBER\",C.STRING=\"STRING\",C.DURATION=\"DURATION\",C.SECRET=\"SECRET\",C.SHAPE=\"SHAPE\",C.MAP=\"MAP\",C))(wI||{}),upe=ht,mj=(c=>(c.MILLISECONDS=\"ms\",c.SECONDS=\"s\",c.MINUTES=\"m\",c.HOURS=\"h\",c.DAYS=\"d\",c.WEEKS=\"w\",c))(mj||{}),IT=(r=>(r.JUNCTIONS=\"junctions\",r.SYMLINKS=\"symlinks\",r))(IT||{}),mT={lastUpdateCheck:{description:\"Last timestamp we checked whether new Yarn versions were available\",type:\"STRING\",default:null},yarnPath:{description:\"Path to the local executable that must be used over the global one\",type:\"ABSOLUTE_PATH\",default:null},ignorePath:{description:\"If true, the local executable will be ignored when using the global one\",type:\"BOOLEAN\",default:!1},globalFolder:{description:\"Folder where all system-global files are stored\",type:\"ABSOLUTE_PATH\",default:G8()},cacheFolder:{description:\"Folder where the cache files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/cache\"},compressionLevel:{description:\"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)\",type:\"NUMBER\",values:[\"mixed\",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:\"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/__virtual__\"},installStatePath:{description:\"Path of the file where the install state will be persisted\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/install-state.gz\"},immutablePatterns:{description:\"Array of glob patterns; files matching them won't be allowed to change during immutable installs\",type:\"STRING\",default:[],isArray:!0},rcFilename:{description:\"Name of the files where the configuration can be found\",type:\"STRING\",default:gj()},enableGlobalCache:{description:\"If true, the system-wide cache folder will be used regardless of `cache-folder`\",type:\"BOOLEAN\",default:!0},cacheMigrationMode:{description:\"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.\",type:\"STRING\",values:[\"always\",\"match-spec\",\"required-only\"],default:\"always\"},enableColors:{description:\"If true, the CLI is allowed to use colors in its output\",type:\"BOOLEAN\",default:Zk,defaultText:\"<dynamic>\"},enableHyperlinks:{description:\"If true, the CLI is allowed to use hyperlinks in its output\",type:\"BOOLEAN\",default:X4,defaultText:\"<dynamic>\"},enableInlineBuilds:{description:\"If true, the CLI will print the build output on the command line\",type:\"BOOLEAN\",default:Lp.isCI,defaultText:\"<dynamic>\"},enableMessageNames:{description:\"If true, the CLI will prefix most messages with codes suitable for search engines\",type:\"BOOLEAN\",default:!0},enableProgressBars:{description:\"If true, the CLI is allowed to show a progress bar for long-running events\",type:\"BOOLEAN\",default:!Lp.isCI,defaultText:\"<dynamic>\"},enableTimers:{description:\"If true, the CLI is allowed to print the time spent executing commands\",type:\"BOOLEAN\",default:!0},enableTips:{description:\"If true, installs will print a helpful message every day of the week\",type:\"BOOLEAN\",default:!Lp.isCI,defaultText:\"<dynamic>\"},preferInteractive:{description:\"If true, the CLI will automatically use the interactive mode when called from a TTY\",type:\"BOOLEAN\",default:!1},preferTruncatedLines:{description:\"If true, the CLI will truncate lines that would go beyond the size of the terminal\",type:\"BOOLEAN\",default:!1},progressBarStyle:{description:\"Which style of progress bar should be used (only when progress bars are enabled)\",type:\"STRING\",default:void 0,defaultText:\"<dynamic>\"},defaultLanguageName:{description:\"Default language mode that should be used when a package doesn't offer any insight\",type:\"STRING\",default:\"node\"},defaultProtocol:{description:\"Default resolution protocol used when resolving pure semver and tag ranges\",type:\"STRING\",default:\"npm:\"},enableTransparentWorkspaces:{description:\"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol\",type:\"BOOLEAN\",default:!0},supportedArchitectures:{description:\"Architectures that Yarn will fetch and inject into the resolver\",type:\"SHAPE\",properties:{os:{description:\"Array of supported process.platform strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},cpu:{description:\"Array of supported process.arch strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},libc:{description:\"Array of supported libc libraries, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]}}},enableMirror:{description:\"If true, the downloaded packages will be retrieved and stored in both the local and global folders\",type:\"BOOLEAN\",default:!0},enableNetwork:{description:\"If false, Yarn will refuse to use the network if required to\",type:\"BOOLEAN\",default:!0},enableOfflineMode:{description:\"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network\",type:\"BOOLEAN\",default:!1},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},unsafeHttpWhitelist:{description:\"List of the hostnames for which http queries are allowed (glob patterns are supported)\",type:\"STRING\",default:[],isArray:!0},httpTimeout:{description:\"Timeout of each http request\",type:\"DURATION\",unit:\"ms\",default:\"1m\"},httpRetry:{description:\"Retry times on http failure\",type:\"NUMBER\",default:3},networkConcurrency:{description:\"Maximal number of concurrent requests\",type:\"NUMBER\",default:50},taskPoolConcurrency:{description:\"Maximal amount of concurrent heavy task processing\",type:\"NUMBER\",default:fj()},taskPoolMode:{description:\"Execution strategy for heavy tasks\",type:\"STRING\",values:[\"async\",\"workers\"],default:\"workers\"},networkSettings:{description:\"Network settings per hostname (glob patterns are supported)\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{httpsCaFilePath:{description:\"Path to file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},enableNetwork:{description:\"If false, the package manager will refuse to use the network if required to\",type:\"BOOLEAN\",default:null},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null}}}},httpsCaFilePath:{description:\"A path to a file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null},enableStrictSsl:{description:\"If false, SSL certificate errors will be ignored\",type:\"BOOLEAN\",default:!0},logFilters:{description:\"Overrides for log levels\",type:\"SHAPE\",isArray:!0,concatenateValues:!0,properties:{code:{description:\"Code of the messages covered by this override\",type:\"STRING\",default:void 0},text:{description:\"Code of the texts covered by this override\",type:\"STRING\",default:void 0},pattern:{description:\"Code of the patterns covered by this override\",type:\"STRING\",default:void 0},level:{description:\"Log level override, set to null to remove override\",type:\"STRING\",values:Object.values(eQ),isNullable:!0,default:void 0}}},enableTelemetry:{description:\"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry\",type:\"BOOLEAN\",default:!0},telemetryInterval:{description:\"Minimal amount of time between two telemetry uploads\",type:\"DURATION\",unit:\"d\",default:\"7d\"},telemetryUserId:{description:\"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.\",type:\"STRING\",default:null},enableHardenedMode:{description:\"If true, automatically enable --check-resolutions --refresh-lockfile on installs\",type:\"BOOLEAN\",default:Lp.isPR&&Rnt,defaultText:\"<true on public PRs>\"},enableScripts:{description:\"If true, packages are allowed to have install scripts by default\",type:\"BOOLEAN\",default:!0},enableStrictSettings:{description:\"If true, unknown settings will cause Yarn to abort\",type:\"BOOLEAN\",default:!0},enableImmutableCache:{description:\"If true, the cache is reputed immutable and actions that would modify it will throw\",type:\"BOOLEAN\",default:!1},enableCacheClean:{description:\"If false, disallows the `cache clean` command\",type:\"BOOLEAN\",default:!0},checksumBehavior:{description:\"Enumeration defining what to do when a checksum doesn't match expectations\",type:\"STRING\",default:\"throw\"},injectEnvironmentFiles:{description:\"List of all the environment files that Yarn should inject inside the process when it starts\",type:\"ABSOLUTE_PATH\",default:[\".env.yarn?\"],isArray:!0},packageExtensions:{description:\"Map of package corrections to apply on the dependency tree\",type:\"MAP\",valueDefinition:{description:\"The extension that will be applied to any package whose version matches the specified range\",type:\"SHAPE\",properties:{dependencies:{description:\"The set of dependencies that must be made available to the current package in order for it to work properly\",type:\"MAP\",valueDefinition:{description:\"A range\",type:\"STRING\"}},peerDependencies:{description:\"Inherited dependencies - the consumer of the package will be tasked to provide them\",type:\"MAP\",valueDefinition:{description:\"A semver range\",type:\"STRING\"}},peerDependenciesMeta:{description:\"Extra information related to the dependencies listed in the peerDependencies field\",type:\"MAP\",valueDefinition:{description:\"The peerDependency meta\",type:\"SHAPE\",properties:{optional:{description:\"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error\",type:\"BOOLEAN\",default:!1}}}}}}}};Hnt=process.platform===\"win32\"?Unt:_nt;ze=class t{constructor(e){this.isCI=Lp.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static{this.deleteProperty=Symbol()}static{this.telemetry=null}static create(e,r,s){let a=new t(e);typeof r<\"u\"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(mT);let n=typeof s<\"u\"?s:r instanceof Map?r:new Map;for(let[c,f]of n)a.activatePlugin(c,f);return a}static async find(e,r,{strict:s=!0,usePathCheck:a=null,useRc:n=!0}={}){let c=Mnt();delete c.rcFilename;let f=new t(e),p=await t.findRcFiles(e),h=await t.findFolderRcFile(fI());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Eue(p.map(le=>[le.path,le.data])),C=vt.dot,S=new Set(Object.keys(mT)),P=({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe})=>({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe}),I=({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe,...Be})=>{let Ce={};for(let[g,we]of Object.entries(Be))S.has(g)&&(Ce[g]=we);return Ce},R=({yarnPath:le,ignorePath:me,...pe})=>{let Be={};for(let[Ce,g]of Object.entries(pe))S.has(Ce)||(Be[Ce]=g);return Be};if(f.importSettings(P(mT)),f.useWithSource(\"<environment>\",P(c),e,{strict:!1}),E){let[le,me]=E;f.useWithSource(le,P(me),C,{strict:!1})}if(a){if(await jnt({configuration:f,selfPath:a})!==null)return f;f.useWithSource(\"<override>\",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await t.findProjectCwd(e);f.startingCwd=e,f.projectCwd=N;let U=Object.assign(Object.create(null),process.env);f.env=U;let W=await Promise.all(f.get(\"injectEnvironmentFiles\").map(async le=>{let me=le.endsWith(\"?\")?await ce.readFilePromise(le.slice(0,-1),\"utf8\").catch(()=>\"\"):await ce.readFilePromise(le,\"utf8\");return(0,ape.parse)(me)}));for(let le of W)for(let[me,pe]of Object.entries(le))f.env[me]=Vk(pe,{env:U});if(f.importSettings(I(mT)),f.useWithSource(\"<environment>\",I(c),e,{strict:s}),E){let[le,me]=E;f.useWithSource(le,I(me),C,{strict:s})}let ee=le=>\"default\"in le?le.default:le,ie=new Map([[\"@@core\",rue]]);if(r!==null)for(let le of r.plugins.keys())ie.set(le,ee(r.modules.get(le)));for(let[le,me]of ie)f.activatePlugin(le,me);let ue=new Map([]);if(r!==null){let le=new Map;for(let[Be,Ce]of r.modules)le.set(Be,()=>Ce);let me=new Set,pe=async(Be,Ce)=>{let{factory:g,name:we}=Pp(Be);if(!g||me.has(we))return;let ye=new Map(le),Ae=Z=>{if((0,lpe.isBuiltin)(Z))return Pp(Z);if(ye.has(Z))return ye.get(Z)();throw new nt(`This plugin cannot access the package referenced via ${Z} which is neither a builtin, nor an exposed entry`)},se=await qE(async()=>ee(await g(Ae)),Z=>`${Z} (when initializing ${we}, defined in ${Ce})`);le.set(we,()=>se),me.add(we),ue.set(we,se)};if(c.plugins)for(let Be of c.plugins.split(\";\")){let Ce=J.resolve(e,fe.toPortablePath(Be));await pe(Ce,\"<environment>\")}for(let{path:Be,cwd:Ce,data:g}of p)if(n&&Array.isArray(g.plugins))for(let we of g.plugins){let ye=typeof we!=\"string\"?we.path:we,Ae=we?.spec??\"\",se=we?.checksum??\"\";if(ov.has(Ae))continue;let Z=J.resolve(Ce,fe.toPortablePath(ye));if(!await ce.existsPromise(Z)){if(!Ae){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,\".gitignore\",ht.NAME),rt=Ht(f,f.values.get(\"rcFilename\"),ht.NAME),Fe=Ht(f,\"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored\",ht.URL);throw new nt(`Missing source for the ${mt} plugin - please try to remove the plugin from ${rt} then reinstall it manually. This error usually occurs because ${j} is incorrect, check ${Fe} to make sure your plugin folder isn't gitignored.`)}if(!Ae.match(/^https?:/)){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,f.values.get(\"rcFilename\"),ht.NAME);throw new nt(`Failed to recognize the source for the ${mt} plugin - please try to delete the plugin from ${j} then reinstall it manually.`)}let De=await lj(Ae,{configuration:f}),Re=us(De);if(se&&se!==Re){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,f.values.get(\"rcFilename\"),ht.NAME),rt=Ht(f,`yarn plugin import ${Ae}`,ht.CODE);throw new nt(`Failed to fetch the ${mt} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${j} then run ${rt} to reimport it.`)}await ce.mkdirPromise(J.dirname(Z),{recursive:!0}),await ce.writeFilePromise(Z,De)}await pe(Z,Be)}}for(let[le,me]of ue)f.activatePlugin(le,me);if(f.useWithSource(\"<environment>\",R(c),e,{strict:s}),E){let[le,me]=E;f.useWithSource(le,R(me),C,{strict:s})}return f.get(\"enableGlobalCache\")&&(f.values.set(\"cacheFolder\",`${f.get(\"globalFolder\")}/cache`),f.sources.set(\"cacheFolder\",\"<internal>\")),f}static async findRcFiles(e){let r=gj(),s=[],a=e,n=null;for(;a!==n;){n=a;let c=J.join(n,r);if(ce.existsSync(c)){let f,p;try{p=await ce.readFilePromise(c,\"utf8\"),f=ls(p)}catch{let h=\"\";throw p?.match(/^\\s+(?!-)[^:]+\\s+\\S+/m)&&(h=\" (in particular, make sure you list the colons after each key name)\"),new nt(`Parse error when loading ${c}; please check it's proper Yaml${h}`)}s.unshift({path:c,cwd:n,data:f})}a=J.dirname(n)}return s}static async findFolderRcFile(e){let r=J.join(e,Er.rc),s;try{s=await ce.readFilePromise(r,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return null;throw n}let a=ls(s);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,s=e,a=null;for(;s!==a;){if(a=s,ce.existsSync(J.join(a,Er.lockfile)))return a;ce.existsSync(J.join(a,Er.manifest))&&(r=a),s=J.dirname(a)}return r}static async updateConfiguration(e,r,s={}){let a=gj(),n=J.join(e,a),c=ce.existsSync(n)?ls(await ce.readFilePromise(n,\"utf8\")):{},f=!1,p;if(typeof r==\"function\"){try{p=r(c)}catch{p=r({})}if(p===c)return!1}else{p=c;for(let h of Object.keys(r)){let E=c[h],C=r[h],S;if(typeof C==\"function\")try{S=C(E)}catch{S=C(void 0)}else S=C;E!==S&&(S===t.deleteProperty?delete p[h]:p[h]=S,f=!0)}if(!f)return!1}return await ce.changeFilePromise(n,nl(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await t.updateConfiguration(e,s=>{let a=s.plugins??[];if(a.length===0)return{...s,plugins:r};let n=[],c=[...r];for(let f of a){let p=typeof f!=\"string\"?f.path:f,h=c.find(E=>E.path===p);h?(n.push(h),c=c.filter(E=>E!==h)):n.push(f)}return n.push(...c),{...s,plugins:n}})}static async updateHomeConfiguration(e){let r=fI();return await t.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<\"u\"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,s]of Object.entries(e))if(s!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings \"${r}\"`);this.settings.set(r,s),this.values.set(r,Ej(this,s))}}useWithSource(e,r,s,a){try{this.use(e,r,s,a)}catch(n){throw n.message+=` (in ${Ht(this,e,ht.PATH)})`,n}}use(e,r,s,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get(\"enableStrictSettings\");for(let c of[\"enableStrictSettings\",...Object.keys(r)]){let f=r[c],p=H8(f);if(p&&(e=p),typeof f>\"u\"||c===\"plugins\"||e===\"<environment>\"&&Fnt.has(c))continue;if(c===\"rcFilename\")throw new nt(`The rcFilename settings can only be set via ${`${ET}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(c);if(!h){let C=fI(),S=e[0]!==\"<\"?J.dirname(e):null;if(a&&!(S!==null?C===S:!1))throw new nt(`Unrecognized or legacy configuration settings found: ${c} - run \"yarn config\" to see the list of settings supported in Yarn`);this.invalid.set(c,e);continue}if(this.sources.has(c)&&!(n||h.type===\"MAP\"||h.isArray&&h.concatenateValues))continue;let E;try{E=yj(this,c,f,h,s)}catch(C){throw C.message+=` in ${Ht(this,e,ht.PATH)}`,C}if(c===\"enableStrictSettings\"&&e!==\"<environment>\"){a=E;continue}if(h.type===\"MAP\"){let C=this.values.get(c);this.values.set(c,new Map(n?[...C,...E]:[...E,...C])),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let C=this.values.get(c);this.values.set(c,n?[...C,...E]:[...E,...C]),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else this.values.set(c,E),this.sources.set(c,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key \"${e}\"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:s=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>\"u\")throw new nt(`Couldn't find a configuration settings named \"${e}\"`);return yT(a,n,{hideSecrets:r,getNativePaths:s})}getSubprocessStreams(e,{header:r,prefix:s,report:a}){let n,c,f=ce.createWriteStream(e);if(this.get(\"enableInlineBuilds\")){let p=a.createStreamReporter(`${s} ${Ht(this,\"STDOUT\",\"green\")}`),h=a.createStreamReporter(`${s} ${Ht(this,\"STDERR\",\"red\")}`);n=new hj.PassThrough,n.pipe(p),n.pipe(f),c=new hj.PassThrough,c.pipe(h),c.pipe(f)}else n=f,c=f,typeof r<\"u\"&&n.write(`${r}\n`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new rm([new FQ,new Ei,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new aI([new lI,new cI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=sv(),r=this.get(\"supportedArchitectures\"),s=r.get(\"os\");s!==null&&(s=s.map(c=>c===\"current\"?e.os:c));let a=r.get(\"cpu\");a!==null&&(a=a.map(c=>c===\"current\"?e.cpu:c));let n=r.get(\"libc\");return n!==null&&(n=Wl(n,c=>c===\"current\"?e.libc??Wl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get(\"preferInteractive\"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!cl(s.range))throw new Error(\"Only semver ranges are allowed as keys for the packageExtensions setting\");let c=new Ut;c.load(a,{yamlCompatibilityMode:!0});let f=xB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:\"inactive\",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:\"Dependency\",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:\"PeerDependency\",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,P]of Object.entries(C))p.push({...h,type:\"PeerDependencyMeta\",selector:E,key:S,value:P})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get(\"packageExtensions\"))r(C0(s,!0),Yk(a),{userProvided:!0});return e}normalizeLocator(e){return cl(e.reference)?Ws(e,`${this.get(\"defaultProtocol\")}${e.reference}`):Mp.test(e.reference)?Ws(e,`${this.get(\"defaultProtocol\")}${e.reference}`):e}normalizeDependency(e){return cl(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):Mp.test(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=LB(e),a=r.get(e.identHash);if(typeof a<\"u\"){let c=e.version;if(c!==null){for(let[f,p]of a)if(Zf(c,f))for(let h of p)switch(h.status===\"inactive\"&&(h.status=\"redundant\"),h.type){case\"Dependency\":typeof s.dependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case\"PeerDependency\":typeof s.peerDependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case\"PeerDependencyMeta\":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>\"u\"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status=\"active\",Yl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:G4(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Sa(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,\"*\"))}for(let c of s.peerDependencies.values()){if(c.scope===\"types\")continue;let f=n(c),p=Da(\"types\",f),h=un(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,On(p,\"*\")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(qs(s.dependencies,([,c])=>al(c))),s.peerDependencies=new Map(qs(s.peerDependencies,([,c])=>al(c))),s}getLimit(e){return Yl(this.limits,e,()=>(0,cpe.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<\"u\")return c}return null}}});var qr={};Vt(qr,{EndStrategy:()=>Bj,ExecError:()=>CT,PipeError:()=>lv,execvp:()=>Aj,pipevp:()=>Wu});function om(t){return t!==null&&typeof t.fd==\"number\"}function Ij(){}function Cj(){for(let t of am)t.kill()}async function Wu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=[\"pipe\",\"pipe\",\"pipe\"];n===null?h[0]=\"ignore\":om(n)&&(h[0]=n),om(c)&&(h[1]=c),om(f)&&(h[2]=f);let E=(0,wj.default)(t,e,{cwd:fe.fromPortablePath(r),env:{...s,PWD:fe.fromPortablePath(r)},stdio:h});am.add(E),am.size===1&&(process.on(\"SIGINT\",Ij),process.on(\"SIGTERM\",Cj)),!om(n)&&n!==null&&n.pipe(E.stdin),om(c)||E.stdout.pipe(c,{end:!1}),om(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))om(S)||S.end()};return new Promise((S,P)=>{E.on(\"error\",I=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Ij),process.off(\"SIGTERM\",Cj)),(p===2||p===1)&&C(),P(I)}),E.on(\"close\",(I,R)=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Ij),process.off(\"SIGTERM\",Cj)),(p===2||p===1&&I!==0)&&C(),I===0||!a?S({code:vj(I,R)}):P(new lv({fileName:t,code:I,signal:R}))})})}async function Aj(t,e,{cwd:r,env:s=process.env,encoding:a=\"utf8\",strict:n=!1}){let c=[\"ignore\",\"pipe\",\"pipe\"],f=[],p=[],h=fe.fromPortablePath(r);typeof s.PWD<\"u\"&&(s={...s,PWD:h});let E=(0,wj.default)(t,e,{cwd:h,env:s,stdio:c});return E.stdout.on(\"data\",C=>{f.push(C)}),E.stderr.on(\"data\",C=>{p.push(C)}),await new Promise((C,S)=>{E.on(\"error\",P=>{let I=ze.create(r),R=Ht(I,t,ht.PATH);S(new jt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,`  ${Kf(I,{label:\"Thrown Error\",value:_u(ht.NO_HINT,P.message)})}`)}))}),E.on(\"close\",(P,I)=>{let R=a===\"buffer\"?Buffer.concat(f):Buffer.concat(f).toString(a),N=a===\"buffer\"?Buffer.concat(p):Buffer.concat(p).toString(a);P===0||!n?C({code:vj(P,I),stdout:R,stderr:N}):S(new CT({fileName:t,code:P,signal:I,stdout:R,stderr:N}))})})}function vj(t,e){let r=Gnt.get(e);return typeof r<\"u\"?128+r:t??1}function qnt(t,e,{configuration:r,report:s}){s.reportError(1,`  ${Kf(r,t!==null?{label:\"Exit Code\",value:_u(ht.NUMBER,t)}:{label:\"Exit Signal\",value:_u(ht.CODE,e)})}`)}var wj,Bj,lv,CT,am,Gnt,dT=Xe(()=>{Dt();wj=ut(_U());av();Tc();xc();Bj=(s=>(s[s.Never=0]=\"Never\",s[s.ErrorCode=1]=\"ErrorCode\",s[s.Always=2]=\"Always\",s))(Bj||{}),lv=class extends jt{constructor({fileName:e,code:r,signal:s}){let a=ze.create(J.cwd()),n=Ht(a,e,ht.PATH);super(1,`Child ${n} reported an error`,c=>{qnt(r,s,{configuration:a,report:c})}),this.code=vj(r,s)}},CT=class extends lv{constructor({fileName:e,code:r,signal:s,stdout:a,stderr:n}){super({fileName:e,code:r,signal:s}),this.stdout=a,this.stderr=n}};am=new Set;Gnt=new Map([[\"SIGINT\",2],[\"SIGQUIT\",3],[\"SIGKILL\",9],[\"SIGTERM\",15]])});function Ape(t){fpe=t}function cv(){return typeof Sj>\"u\"&&(Sj=fpe()),Sj}var Sj,fpe,Dj=Xe(()=>{fpe=()=>{throw new Error(\"Assertion failed: No libzip instance is available, and no factory was configured\")}});var ppe=_((wT,Pj)=>{var Wnt=Object.assign({},Ie(\"fs\")),bj=function(){var t=typeof document<\"u\"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<\"u\"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<\"u\"?e:{},s,a;r.ready=new Promise(function(Ke,st){s=Ke,a=st});var n={},c;for(c in r)r.hasOwnProperty(c)&&(n[c]=r[c]);var f=[],p=\"./this.program\",h=function(Ke,st){throw st},E=!1,C=!0,S=\"\";function P(Ke){return r.locateFile?r.locateFile(Ke,S):S+Ke}var I,R,N,U;C&&(E?S=Ie(\"path\").dirname(S)+\"/\":S=__dirname+\"/\",I=function(st,St){var lr=Me(st);return lr?St?lr:lr.toString():(N||(N=Wnt),U||(U=Ie(\"path\")),st=U.normalize(st),N.readFileSync(st,St?null:\"utf8\"))},R=function(st){var St=I(st,!0);return St.buffer||(St=new Uint8Array(St)),we(St.buffer),St},process.argv.length>1&&(p=process.argv[1].replace(/\\\\/g,\"/\")),f=process.argv.slice(2),h=function(Ke){process.exit(Ke)},r.inspect=function(){return\"[Emscripten Module object]\"});var W=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n=null,r.arguments&&(f=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ie=0,ue=function(Ke){ie=Ke},le;r.wasmBinary&&(le=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!=\"object\"&&rs(\"no native wasm support detected\");function pe(Ke,st,St){switch(st=st||\"i8\",st.charAt(st.length-1)===\"*\"&&(st=\"i32\"),st){case\"i1\":return Ve[Ke>>0];case\"i8\":return Ve[Ke>>0];case\"i16\":return mh((Ke>>1)*2);case\"i32\":return to((Ke>>2)*4);case\"i64\":return to((Ke>>2)*4);case\"float\":return Af((Ke>>2)*4);case\"double\":return dh((Ke>>3)*8);default:rs(\"invalid type for getValue: \"+st)}return null}var Be,Ce=!1,g;function we(Ke,st){Ke||rs(\"Assertion failed: \"+st)}function ye(Ke){var st=r[\"_\"+Ke];return we(st,\"Cannot call unknown function \"+Ke+\", make sure it is exported\"),st}function Ae(Ke,st,St,lr,te){var Ee={string:function(qi){var Tn=0;if(qi!=null&&qi!==0){var Ga=(qi.length<<2)+1;Tn=wi(Ga),mt(qi,Tn,Ga)}return Tn},array:function(qi){var Tn=wi(qi.length);return Fe(qi,Tn),Tn}};function Oe(qi){return st===\"string\"?De(qi):st===\"boolean\"?!!qi:qi}var dt=ye(Ke),Et=[],bt=0;if(lr)for(var tr=0;tr<lr.length;tr++){var An=Ee[St[tr]];An?(bt===0&&(bt=gf()),Et[tr]=An(lr[tr])):Et[tr]=lr[tr]}var li=dt.apply(null,Et);return li=Oe(li),bt!==0&&fc(bt),li}function se(Ke,st,St,lr){St=St||[];var te=St.every(function(Oe){return Oe===\"number\"}),Ee=st!==\"string\";return Ee&&te&&!lr?ye(Ke):function(){return Ae(Ke,st,St,arguments,lr)}}var Z=new TextDecoder(\"utf8\");function De(Ke,st){if(!Ke)return\"\";for(var St=Ke+st,lr=Ke;!(lr>=St)&&ke[lr];)++lr;return Z.decode(ke.subarray(Ke,lr))}function Re(Ke,st,St,lr){if(!(lr>0))return 0;for(var te=St,Ee=St+lr-1,Oe=0;Oe<Ke.length;++Oe){var dt=Ke.charCodeAt(Oe);if(dt>=55296&&dt<=57343){var Et=Ke.charCodeAt(++Oe);dt=65536+((dt&1023)<<10)|Et&1023}if(dt<=127){if(St>=Ee)break;st[St++]=dt}else if(dt<=2047){if(St+1>=Ee)break;st[St++]=192|dt>>6,st[St++]=128|dt&63}else if(dt<=65535){if(St+2>=Ee)break;st[St++]=224|dt>>12,st[St++]=128|dt>>6&63,st[St++]=128|dt&63}else{if(St+3>=Ee)break;st[St++]=240|dt>>18,st[St++]=128|dt>>12&63,st[St++]=128|dt>>6&63,st[St++]=128|dt&63}}return st[St]=0,St-te}function mt(Ke,st,St){return Re(Ke,ke,st,St)}function j(Ke){for(var st=0,St=0;St<Ke.length;++St){var lr=Ke.charCodeAt(St);lr>=55296&&lr<=57343&&(lr=65536+((lr&1023)<<10)|Ke.charCodeAt(++St)&1023),lr<=127?++st:lr<=2047?st+=2:lr<=65535?st+=3:st+=4}return st}function rt(Ke){var st=j(Ke)+1,St=La(st);return St&&Re(Ke,Ve,St,st),St}function Fe(Ke,st){Ve.set(Ke,st)}function Ne(Ke,st){return Ke%st>0&&(Ke+=st-Ke%st),Ke}var Pe,Ve,ke,it,Ue,x,w,b,y,F;function z(Ke){Pe=Ke,r.HEAP_DATA_VIEW=F=new DataView(Ke),r.HEAP8=Ve=new Int8Array(Ke),r.HEAP16=it=new Int16Array(Ke),r.HEAP32=x=new Int32Array(Ke),r.HEAPU8=ke=new Uint8Array(Ke),r.HEAPU16=Ue=new Uint16Array(Ke),r.HEAPU32=w=new Uint32Array(Ke),r.HEAPF32=b=new Float32Array(Ke),r.HEAPF64=y=new Float64Array(Ke)}var X=r.INITIAL_MEMORY||16777216,$,oe=[],xe=[],Te=[],lt=!1;function Ct(){if(r.preRun)for(typeof r.preRun==\"function\"&&(r.preRun=[r.preRun]);r.preRun.length;)Pt(r.preRun.shift());Ts(oe)}function qt(){lt=!0,Ts(xe)}function ir(){if(r.postRun)for(typeof r.postRun==\"function\"&&(r.postRun=[r.postRun]);r.postRun.length;)Pr(r.postRun.shift());Ts(Te)}function Pt(Ke){oe.unshift(Ke)}function gn(Ke){xe.unshift(Ke)}function Pr(Ke){Te.unshift(Ke)}var Ir=0,Or=null,on=null;function ai(Ke){Ir++,r.monitorRunDependencies&&r.monitorRunDependencies(Ir)}function Io(Ke){if(Ir--,r.monitorRunDependencies&&r.monitorRunDependencies(Ir),Ir==0&&(Or!==null&&(clearInterval(Or),Or=null),on)){var st=on;on=null,st()}}r.preloadedImages={},r.preloadedAudios={};function rs(Ke){r.onAbort&&r.onAbort(Ke),Ke+=\"\",ee(Ke),Ce=!0,g=1,Ke=\"abort(\"+Ke+\"). Build with -s ASSERTIONS=1 for more info.\";var st=new WebAssembly.RuntimeError(Ke);throw a(st),st}var $s=\"data:application/octet-stream;base64,\";function Co(Ke){return Ke.startsWith($s)}var ji=\"data:application/octet-stream;base64,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QCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACAAKAKgLkEQayIBNgKgLgsgAUEISA0BIAAgACgCECIBQQFqNgIQ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KAJUIgEEfyABQQAgARAiEBkgACgCVAVBAAsQBiAAQQA2AlQLC9wMAgl/AX4jAEFAaiIGJAACQAJAAkACQAJAIAEoAjBBABAjIgVBAkZBACABKAI4QQAQIyIEQQFGGw0AIAVBAUZBACAEQQJGGw0AIAVBAkciAw0BIARBAkcNAQsgASABLwEMQYAQcjsBDEEAIQMMAQsgASABLwEMQf/vA3E7AQxBACEFIANFBEBB9eABIAEoAjAgAEEIahBpIgVFDQILIAJBgAJxBEAgBSEDDAELIARBAkcEQCAFIQMMAQtB9cYBIAEoAjggAEEIahBpIgNFBEAgBRAcDAILIAMgBTYCAAsgASABLwEMQf7/A3EgAS8BUiIFQQBHcjsBDAJAAkACQAJAAn8CQAJAIAEpAyhC/v///w9WDQAgASkDIEL+////D1YNACACQYAEcUUNASABKQNIQv////8PVA0BCyAFQYECa0H//wNxQQNJIQdBAQwBCyAFQYECa0H//wNxIQQgAkGACnFBgApHDQEgBEEDSSEHQQALIQkgBkIcEBciBEUEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyADEBwMBQsgAkGACHEhBQJAAkAgAkGAAnEEQAJAIAUNACABKQMgQv////8PVg0AIAEpAyhCgICAgBBUDQMLIAQgASkDKBAYIAEpAyAhDAwBCwJAAkACQCAFDQAgASkDIEL/////D1YNACABKQMoIgxC/////w9WDQEgASkDSEKAgICAEFQNBAsgASkDKCIMQv////8PVA0BCyAEIAwQGAsgASkDICIMQv////8PWgRAIAQgDBAYCyABKQNIIgxC/////w9UDQELIAQgDBAYCyAELQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAQQCCADEBwMBQtBASEKQQEgBC0AAAR+IAQpAxAFQgALp0H//wNxIAYQRyEFIAQQCCAFIAM2AgAgBw0BDAILIAMhBSAEQQJLDQELIAZCBxAXIgRFBEAgAEEIaiIABEAgAEEANgIEIABBDjYCAAsgBRAcDAMLIARBAhANIARBhxJBAhAsIAQgAS0AUhBwIAQgAS8BEBANIAQtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAsgBBAIDAILQYGyAkEHIAYQRyEDIAQQCCADIAU2AgBBASEL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NgIEIABB7A42AhggGiEdDAMLIARB/wFxIgJBwABxRQRAIAggDSADLwECQQJ0aiAdp0F/IAJ0QX9zcUECdGoiAy0AASICayEIIB0gAq2IIR0gAy0AACIERQ0HDAELCyAEQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCABIAItAAA6AAAgAkEBaiECIAFBAWohAQsgHEIAUg0ACwsgDiEGIAwhAwsgBSAGSwRAAkACQCABIANNIAEgDyABa6wiGiAGrSIbIBogG1QbIhqnIglqIgIgA0txDQAgAyAJaiABSyABIANPcQ0AIAEgAyAJEAcaDAELIAEgAyADIAFrIgEgAUEfdSIBaiABcyIBEAcgAWohAiAaIAGtIh59IhxQDQAgASADaiEBA0ACQCAcIB4gHCAeVBsiG0IgVARAIBshGgwBCyAbIhpCIH0iIEIFiEIBfEIDgyIfUEUEQANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCAaQiB9IRogAUEgaiEBIAJBIGohAiAfQgF9Ih9CAFINAAsLICBC4ABUDQADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggAiABKQA4NwA4IAIgASkAMDcAMCACIAEpACg3ACggAiABKQAgNwAgIAIgASkAWDcAWCACIAEpAFA3AFAgAiABKQBINwBIIAIgASkAQDcAQCACIAEpAGA3AGAgAiABKQBoNwBoIAIgASkAcDcAcCACIAEpAHg3AHggAUGAAWohASACQYABaiECIBpCgAF9IhpCH1YNAAsLIBpCEFoEQCACIAEpAAA3AAAgAiABKQAINwAIIBpCEH0hGiACQRBqIQIgAUEQaiEBCyAaQghaBEAgAiABKQAANwAAIBpCCH0hGiACQQhqIQIgAUEIaiEBCyAaQgRaBEAgAiABKAAANgAAIBpCBH0hGiACQQRqIQIgAUEEaiEBCyAaQgJaBEAgAiABLwAAOwAAIBpCAn0hGiACQQJqIQIgAUECaiEBCyAcIBt9IRwgGlBFBEAgAiABLQAAOgAAIAJBAWohAiABQQFqIQELIBxCAFINAAsLIAUgBmshAUEAIARrIQUCQCAEQQdLBEAgBCEDDAELIAEgBE0EQCAEIQMMAQsgAiAEayEFA0ACQCACIAUpAAA3AAAgBEEBdCEDIAEgBGshASACIARqIQIgBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAQLIBAgAWsiCUEBaiIGIAUgBSAGSxshAyABIARrIQIgAUEHcUUNAiADRQ0CIAEgAi0AADoAACACQQFqIQIgAUEBaiIGQQdxQQAgA0EBayIFGw0BIAYhASAFIQMgCSEGDAILAkAgBCAFSQRAIAcoAphHIARLDQELIAEgASAEayIGKQAANwAAIAEgBUEBa0EHcUEBaiIDaiECIAUgA2siBEUNAyADIAZqIQEDQCACIAEpAAA3AAAgAUEIaiEBIAJBCGohAiAEQQhrIgQNAAsMAwsgASAEIAUQPyECDAILIAEgAi0AADoAASAJQQFrIQYgA0ECayEFIAJBAWohAgJAIAFBAmoiCkEHcUUNACAFRQ0AIAEgAi0AADoAAiAJQQJrIQYgA0EDayEFIAJBAWohAgJAIAFBA2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAAyAJQQNrIQYgA0EEayEFIAJBAWohAgJAIAFBBGoiCkEHcUUNACAFRQ0AIAEgAi0AADoABCAJQQRrIQYgA0EFayEFIAJBAWohAgJAIAFBBWoiCkEHcUUNACAFRQ0AIAEgAi0AADoABSAJQQVrIQYgA0EGayEFIAJBAWohAgJAIAFBBmoiCkEHcUUNACAFRQ0AIAEgAi0AADoABiAJQQZrIQYgA0EHayEFIAJBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0AADoABiADQQdrIQYgBEEHayEFIAJBAWohAgJAIABBB2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAByADQQhrIQMgBEEIayEEIABBCGohACACQQFqIQIMBgsgByEAIAUhBCAGIQMMBQsgByEAIAUhBCAGIQMMBAsgByEAIAUhBCAGIQMMAwsgByEAIAUhBCAGIQMMAgsgByEAIAUhBCAGIQMMAQsgByEAIAUhBCAGIQMLAkAgA0EXTQRAIARFDQEgBEEBayEBIARBB3EiAwRAA0AgACACLQAAOgAAIARBAWshBCAAQQFqIQAgAkEBaiECIANBAWsi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CyAAIAMtAAAEfiADKQMQBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIGrRATIghFBEBBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAwNAIAAoAgAhASAAKAIMEAYg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DCAAQRg2AggLDAMLIAAgBiAFLwFqQQAgBCABEQYAIQEgBhALIAFFDQILAkAgDUUEQCABIQMMAQsgACABIAUvAWgQgQEhAyABEAsgA0UNAQsCQCAJRSAMckUEQCADIQEMAQsgACADQQEQgAEhASADEAsgAUUNAQsgASEDDAELQQAhAwsgBUHwAGokACADC4UBAQF/IAFFBEAgAEEIaiIABEAgAEEANgIEIABBEjYCAAtBAA8LQTgQCSIDRQRAIABBCGoiAARAIABBADYCBCAAQQ42AgALQQAPCyADQQA2AhAgA0IANwIIIANCADcDKCADQQA2AgQgAyACNgIAIANCADcDGCADQQA2AjAgACABQTsgAxBCCw8AIAAgASACQQBBABCCAQusAgECfyABRQRAIABBCGoiAARAIABBADYCBCAAQRI2AgALQQAPCwJAIAJBfUsNACACQf//A3FBCEYNACAAQQhqIgAEQCAAQQA2AgQgAEEQNgIAC0EADwsCQEGwwAAQCSIFBEAgBUEANgIIIAVCADcCACAFQYiBAUGogQEgAxs2AqhAIAUgAjYCFCAFIAM6ABAgBUEAOgAPIAVBADsBDCAFIAMgAkF9SyIGcToADiAFQQggAiAGG0H//wNxIAQgBUGIgQFBqIEBIAMbKAIAEQAAIgI2AqxAIAINASAFEDEgBRAGCyAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0EADwsgACABQTogBRBCIgAEfyAABSAFKAKsQCAFKAKoQCgCBBEDACAFEDEgBRAGQQALC6ABAQF/IAIgACgCBCIDIAIgA0kbIgIEQCAAIAMgAms2AgQCQAJAAkACQCAAKAIcIgMoAhRBAWsOAgEAAgsgA0GgAWogASAAKAIAIAJB3IABKAIAEQgADAILIAAgACgCMCABIAAoAgAgAkHEgAEoAgARBAA2AjAMAQsgASAAKAIAIAIQBxoLIAAgACgCACACajYCACAAIAAoAgggAmo2AggLC7cCAQR/QX4hAgJAIABFDQAgACgCIEUNACAAKAIkIgRFDQAgACgCHCIBRQ0AIAEoAgAgAEcNAAJAAkAgASgCICIDQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyADQZoFRg0AIANBKkcN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DCABajYCDCAGIAYoAgggAWo2AgggBSAFKAIUIAFqNgIUIAUgBSgCECABazYCECAGIAYoAhAgAWsiATYCECABDQAgBiAGKAIENgIIC0EAIQRBACEJIAMoAhBFDQAMCgsgAygCHCgCJCEGIAMgAygCGCIBQQFqNgIYIAEgBmotAAAhASADIARBAWo2AhAgAygCBCAEaiABOgAAIAEEQCADKAIQIQQMAQsLIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0HnADYCIAsCQCADKAIcKAIsBEAgAygCDCADKAIQIgFBAmpJBH8gBRAKIAMoAhANAkEABSABCyADKAIEaiAFKAIwOwAAIAMgAygCEEECajYCECADQaABakHkgAEoAgARAQAaCyADQfEANgIgIAUQCiADKAIQRQ0BDAcLDAYLIAUoAgQNAQsgAygCPA0AIApFDQEgAygCIEGaBUYNAQsCfyADKAKIASIBRQRAIAMgChCFAQwBCwJAAkACQCADKAKMAUECaw4CAAECCwJ/AkADQAJAAkAgAygCPA0AIAMQLyADKAI8DQAgCg0BQQAMBAsgAygCSCADKAJoai0AACEEIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qQQA6AAAgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtaiAEOgAAIAMgBEECdGoiASABLwHkAUEBajsB5AEgAyADKAI8QQFrNgI8IAMgAygCaEEBaiIBNgJoIAMoAvAtIAMoAvQtRw0BQQAhBCADIAMoAlgiBkEATgR/IAMoAkggBmoFQQALIAEgBmtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEA0BDAILCyADQQA2AoQuIApBBEYEQCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBARAPIAMgAygCaDYCWCADKAIAEApBA0ECIAMoAgAoAhAbDAILIAMoAvAtBEBBACEEIAMgAygCWCIBQQBOBH8gAygCSCABagVBAAsgAygCaCABa0EAEA8gAyADKAJoNgJYIAMoAgAQCiADKAIAKAIQRQ0BC0EBIQQLIAQL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bGl0ZXJhbC9sZW5ndGhzIHNldABpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXQAdW5rbm93biBoZWFkZXIgZmxhZ3Mgc2V0AGludmFsaWQgZGlzdGFuY2VzIHNldABpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0AEZpbGUgYWxyZWFkeSBleGlzdHMAdG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHMAaW52YWxpZCBzdG9yZWQgYmxvY2sgbGVuZ3RocwAlcyVzJXMAYnVmZmVyIGVycm9yAE5vIGVycm9yAHN0cmVhbSBlcnJvcgBUZWxsIGVycm9yAEludGVybmFsIGVycm9yAFNlZWsgZXJyb3IAV3JpdGUgZXJyb3IAZmlsZSBlcnJvcgBSZWFkIGVycm9yAFpsaWIgZXJyb3IAZGF0YSBlcnJvcgBDUkMgZXJyb3IAaW5jb21wYXRpYmxlIHZlcnNpb24AaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrAGluY29ycmVjdCBoZWFkZXIgY2hlY2sAaW5jb3JyZWN0IGxlbmd0aCBjaGVjawBpbmNvcnJlY3QgZGF0YSBjaGVjawBpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjawBoZWFkZXIgY3JjIG1pc21hdGNoADEuMi4xMy56bGliLW5nAGludmFsaWQgd2luZG93IHNpemUAUmVhZC1vbmx5IGFyY2hpdmUATm90IGEgemlwIGFyY2hpdmUAUmVzb3VyY2Ugc3RpbGwgaW4gdXNlAE1hbGxvYyBmYWlsdXJlAGludmFsaWQgYmxvY2sgdHlwZQBGYWlsdXJlIHRvIGNyZWF0ZSB0ZW1wb3JhcnkgZmlsZQBDYW4ndCBvcGVuIGZpbGUATm8gc3VjaCBmaWxlAFByZW1hdHVyZSBlbmQgb2YgZmlsZQBDYW4ndCByZW1vdmUgZmlsZQBpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUAaW52YWxpZCBkaXN0YW5jZSBjb2RlAHVua25vd24gY29tcHJlc3Npb24gbWV0aG9kAHN0cmVhbSBlbmQAQ29tcHJlc3NlZCBkYXRhIGludmFsaWQATXVsdGktZGlzayB6aXAgYXJjaGl2ZXMgbm90IHN1cHBvcnRl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UgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJAEsBCQDLAAkAywEJACsACQArAQkAqwAJAKsBCQBrAAkAawEJAOsACQDrAQkAGwAJABsBCQCbAAkAmwEJAFsACQBbAQkA2wAJANsBCQA7AAkAOwEJALsACQC7AQkAewAJAHsBCQD7AAkA+wEJAAcACQAHAQkAhwAJAIcBCQBHAAkARwEJAMcACQDHAQkAJwAJACcBCQCnAAkApwEJAGcACQBnAQkA5wAJAOcBCQAXAAkAFwEJAJcACQCXAQkAVwAJAFcBCQDXAAkA1wEJADcACQA3AQkAtwAJALcBCQB3AAkAdwEJAPcACQD3AQkADwAJAA8BCQCPAAkAjwEJAE8ACQBPAQkAzwAJAM8BCQAvAAkALwEJAK8ACQCvAQkAbwAJAG8BCQDvAAkA7wEJAB8ACQAfAQkAnwAJAJ8BCQBfAAkAXwEJAN8ACQDfAQkAPwAJAD8BCQC/AAkAvwEJAH8ACQB/AQkA/wAJAP8BCQAAAAcAQAAHACAABwBgAAcAEAAHAFAABwAwAAcAcAAHAAgABwBIAAcAKAAHAGgABwAYAAcAWAAHADgABwB4AAcABAAHAEQABwAkAAcAZAAHABQABwBUAAcANAAHAHQABwADAAgAgwAIAEMACADDAAgAIwAIAKMACABjAAgA4wAIAAAABQAQAAUACAAFABgABQAEAAUAFAAFAAwABQAcAAUAAgAFABIABQAKAAUAGgAFAAYABQAWAAUADgAFAB4ABQABAAUAEQAFAAkABQAZAAUABQAFABUABQANAAUAHQAFAAMABQATAAUACwAFABsABQAHAAUAFwAFAEGBywAL7AYBAgMEBAUFBgYGBgcHBwcICAgICAgICAkJCQkJCQkJCgoKCgoKCgoKCgoKCgoKCgsLCwsLCwsLCwsLCwsLCwsMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8AABAREhITExQUFBQVFRUVFhYWFhYWFhYXFxcXFxcXFxgYGBgYGBgYGBgYGBgYGBgZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwdHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dAAECAwQFBgcICAkJCgoLCwwMDAwNDQ0NDg4ODg8PDw8QEBAQEBAQEBEREREREREREhISEhISEhITExMTExMTExQUFBQUFBQUFBQUFBQUFBQVFRUVFRUVFRUVFRUVFRUVFhYWFhYWFhYWFhYWFhYWFhcXFxcXFxcXFxcXFxcXFxcYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbHAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAoAAAAMAAAADgAAABAAAAAUAAAAGAAAABwAAAAgAAAAKAAAADAAAAA4AAAAQAAAAFAAAABgAAAAcAAAAIAAAACgAAAAwAAAAOAAQYTSAAutAQEAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAAABAACAAQAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAgCAAAMApAAABAQAAHgEAAA8AAAAAJQAAQCoAAAAAAAAeAAAADwAAAAAAAADAKgAAAAAAABMAAAAHAEHg0wALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHQ1AALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEGA1gALIwIAAAADAAAABwAAAAAAAAAQERIACAcJBgoFCwQMAw0CDgEPAEHQ1gALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHA1wALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEG42AALASwAQcTYAAthLQAAAAQABAAIAAQALgAAAAQABgAQAAYALwAAAAQADAAgABgALwAAAAgAEAAgACAALwAAAAgAEACAAIAALwAAAAgAIACAAAABMAAAACAAgAACAQAEMAAAACAAAgECAQAQMABBsNkAC6UTAwAEAAUABgAHAAgACQAKAAsADQAPABEAEwAXABsAHwAjACsAMwA7AEMAUwBjAHMAgwCjAMMA4wACAQAAAAAAABAAEAAQABAAEAAQABAAEAARABEAEQARABIAEgASABIAEwATABMAEwAUABQAFAAUABUAFQAVABUAEABNAMoAAAABAAIAAwAEAAUABwAJAA0AEQAZACEAMQBBAGEAgQDBAAEBgQEBAgEDAQQBBgEIAQwBEAEYASABMAFAAWAAAAAAEAAQABAAEAARABEAEgASABMAEwAUABQAFQAVABYAFgAXABcAGAAYABkAGQAaABoAGwAbABwAHAAdAB0AQABAAGAHAAAACFAAAAgQABQIcwASBx8AAAhwAAAIMAAACcAAEAcKAAAIYAAACCAAAAmgAAAIAAAACIAAAAhAAAAJ4AAQBwYAAAhYAAAIGAAACZAAEwc7AAAIeAAACDgAAAnQABEHEQAACGgAAAgoAAAJsAAACAgAAAiIAAAISAAACfAAEAcEAAAIVAAACBQAFQjjABMHKwAACHQAAAg0AAAJyAARBw0AAAhkAAAIJAAACagAAAgEAAAIhAAACEQAAAnoABAHCAAACFwAAAgcAAAJmAAUB1MAAAh8AAAIPAAACdgAEgcXAAAIbAAACCwAAAm4AAAIDAAACIwAAAhMAAAJ+AAQBwMAAAhSAAAIEgAVCKMAEwcjAAAIcgAACDIAAAnEABEHCwAACGIAAAgiAAAJpAAACAIAAAiCAAAIQgAACeQAEAcHAAAIWgAACBoAAAmUABQHQwAACHoAAAg6AAAJ1AASBxMAAAhqAAAIKgAACbQAAAgKAAAIigAACEoAAAn0ABAHBQAACFYAAAgWAEAIAAATBzMAAAh2AAAINgAACcwAEQcPAAAIZgAACCYAAAmsAAAIBgAACIYAAAhGAAAJ7AAQBwkAAAheAAAIHgAACZwAFAdjAAAIfgAACD4AAAncABIHGwAACG4AAAguAAAJvAAACA4AAAiOAAAITgAACfwAYAcAAAAIUQAACBEAFQiDABIHHwAACHEAAAgxAAAJwgAQBwoAAAhhAAAIIQAACaIAAAgBAAAIgQAACEEAAAniABAHBgAACFkAAAgZAAAJkgATBzsAAAh5AAAIOQAACdIAEQcRAAAIaQAACCkAAAmyAAAICQAACIkAAAhJAAAJ8gAQBwQAAAhVAAAIFQAQCAIBEwcrAAAIdQAACDUAAAnKABEHDQAACGUAAAglAAAJqgAACAUAAAiFAAAIRQAACeoAEAcIAAAIXQAACB0AAAmaABQHUwAACH0AAAg9AAAJ2gASBxcAAAhtAAAILQAACboAAAgNAAAIjQAACE0AAAn6ABAHAwAACFMAAAgTABUIwwATByMAAAhzAAAIMwAACcYAEQcLAAAIYwAACCMAAAmmAAAIAwAACIMAAAhDAAAJ5gAQBwcAAAhbAAAIGwAACZYAFAdDAAAIewAACDsAAAnWABIHEwAACGsAAAgrAAAJtgAACAsAAAiLAAAISwAACfYAEAcFAAAIVwAACBcAQAgAABMHMwAACHcAAAg3AAAJzgARBw8AAAhnAAAIJwAACa4AAAgHAAAIhwAACEcAAAnuABAHCQAACF8AAAgfAAAJngAUB2MAAAh/AAAIPwAACd4AEgcbAAAIbwAACC8AAAm+AAAIDwAACI8AAAhPAAAJ/gBgBwAAAAhQAAAIEAAUCHMAEgcfAAAIcAAACDAAAAnBABAHCgAACGAAAAggAAAJoQAACAAAAAiAAAAIQAAACeEAEAcGAAAIWAAACBgAAAmRABMHOwAACHgAAAg4AAAJ0QARBxEAAAhoAAAIKAAACbEAAAgIAAAIiAAACEgAAAnxABAHBAAACFQAAAgUABUI4wATBysAAAh0AAAINAAACckAEQcNAAAIZAAACCQAAAmpAAAIBAAACIQAAAhEAAAJ6QAQBwgAAAhcAAAIHAAACZkAFAdTAAAIfAAACDwAAAnZABIHFwAACGwAAAgsAAAJuQAACAwAAAiMAAAITAAACfkAEAcDAAAIUgAACBIAFQijABMHIwAACHIAAAgyAAAJxQARBwsAAAhiAAAIIgAACaUAAAgCAAAIggAACEIAAAnlABAHBwAACFoAAAgaAAAJlQAUB0MAAAh6AAAIOgAACdUAEgcTAAAIagAACCoAAAm1AAAICgAACIoAAAhKAAAJ9QAQBwUAAAhWAAAIFgBACAAAEwczAAAIdgAACDYAAAnNABEHDwAACGYAAAgmAAAJrQAACAYAAAiGAAAIRgAACe0AEAcJAAAIXgAACB4AAAmdABQHYwAACH4AAAg+AAAJ3QASBxsAAAhuAAAILgAACb0AAAgOAAAIjgAACE4AAAn9AGAHAAAACFEAAAgRABUIgwASBx8AAAhxAAAIMQAACcMAEAcKAAAIYQAACCEAAAmjAAAIAQAACIEAAAhBAAAJ4wAQBwYAAAhZAAAIGQAACZMAEwc7AAAIeQAACDkAAAnTABEHEQAACGkAAAgpAAAJswAACAkAAAiJAAAISQAACfMAEAcEAAAIVQAACBUAEAgCARMHKwAACHUAAAg1AAAJywARBw0AAAhlAAAIJQAACasAAAgFAAAIhQAACEUAAAnrABAHCAAACF0AAAgdAAAJmwAUB1MAAAh9AAAIPQAACdsAEgcXAAAIbQAACC0AAAm7AAAIDQAACI0AAAhNAAAJ+wAQBwMAAAhTAAAIEwAVCMMAEwcjAAAIcwAACDMAAAnHABEHCwAACGMAAAgjAAAJpwAACAMAAAiDAAAIQwAACecAEAcHAAAIWwAACBsAAAmXABQHQwAACHsAAAg7AAAJ1wASBxMAAAhrAAAIKwAACbcAAAgLAAAIiwAACEsAAAn3ABAHBQAACFcAAAgXAEAIAAATBzMAAAh3AAAINwAACc8AEQcPAAAIZwAACCcAAAmvAAAIBwAACIcAAAhHAAAJ7wAQBwkAAAhfAAAIHwAACZ8AFAdjAAAIfwAACD8AAAnfABIHGwAACG8AAAgvAAAJvwAACA8AAAiPAAAITwAACf8AEAUBABcFAQETBREAGwUBEBEFBQAZBQEEFQVBAB0FAUAQBQMAGAUBAhQFIQAcBQEgEgUJABoFAQgWBYEAQAUAABAFAgAXBYEBEwUZABsFARgRBQcAGQUBBhUFYQAdBQFgEAUEABgFAQMUBTEAHAUBMBIFDQAaBQEMFgXBAEAFAAAQABEAEgAAAAgABwAJAAYACgAFAAsABAAMAAMADQACAA4AAQAPAEHg7AALQREACgAREREAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAEQAPChEREQMKBwABAAkLCwAACQYLAAALAAYRAAAAERERAEGx7QALIQsAAAAAAAAAABEACgoREREACgAAAgAJCwAAAAkACwAACwBB6+0ACwEMAEH37QALFQwAAAAADAAAAAAJDAAAAAAADAAADABBpe4ACwEOAEGx7gALFQ0AAAAEDQAAAAAJDgAAAAAADgAADgBB3+4ACwEQAEHr7gALHg8AAAAADwAAAAAJEAAAAAAAEAAAEAAAEgAAABISEgBBou8ACw4SAAAAEhISAAAAAAAACQBB0+8ACwELAEHf7wALFQoAAAAACgAAAAAJCwAAAAAACwAACwBBjfAACwEMAEGZ8AALJwwAAAAADAAAAAAJDAAAAAAADAAADAAAMDEyMzQ1Njc4OUFCQ0RFRgBB5PAACwE+AEGL8QALBf//////AEHQ8QALVxkSRDsCPyxHFD0zMAobBkZLRTcPSQ6OFwNAHTxpKzYfSi0cASAlKSEIDBUWIi4QOD4LNDEYZHR1di9BCX85ESNDMkKJiosFBCYoJw0qHjWMBxpIkxOUlQBBsPIAC4oOSWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AQcCAAQuFARMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==\";Co(ji)||(ji=P(ji));function eo(Ke){try{if(Ke==ji&&le)return new Uint8Array(le);var st=Me(Ke);if(st)return st;if(R)return R(Ke);throw\"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)\"}catch(St){rs(St)}}function wo(Ke,st){var St,lr,te;try{te=eo(Ke),lr=new WebAssembly.Module(te),St=new WebAssembly.Instance(lr,st)}catch(Oe){var Ee=Oe.toString();throw ee(\"failed to compile wasm module: \"+Ee),(Ee.includes(\"imported Memory\")||Ee.includes(\"memory import\"))&&ee(\"Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time).\"),Oe}return[St,lr]}function QA(){var Ke={a:cu};function st(te,Ee){var Oe=te.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),$=r.asm.W,gn(r.asm.h),Io(\"wasm-instantiate\")}if(ai(\"wasm-instantiate\"),r.instantiateWasm)try{var St=r.instantiateWasm(Ke,st);return St}catch(te){return ee(\"Module.instantiateWasm callback failed with error: \"+te),!1}var lr=wo(ji,Ke);return st(lr[0]),r.asm}function Af(Ke){return F.getFloat32(Ke,!0)}function dh(Ke){return F.getFloat64(Ke,!0)}function mh(Ke){return F.getInt16(Ke,!0)}function to(Ke){return F.getInt32(Ke,!0)}function jn(Ke,st){F.setInt32(Ke,st,!0)}function Ts(Ke){for(;Ke.length>0;){var st=Ke.shift();if(typeof st==\"function\"){st(r);continue}var St=st.func;typeof St==\"number\"?st.arg===void 0?$.get(St)():$.get(St)(st.arg):St(st.arg===void 0?null:st.arg)}}function ro(Ke,st){var St=new Date(to((Ke>>2)*4)*1e3);jn((st>>2)*4,St.getUTCSeconds()),jn((st+4>>2)*4,St.getUTCMinutes()),jn((st+8>>2)*4,St.getUTCHours()),jn((st+12>>2)*4,St.getUTCDate()),jn((st+16>>2)*4,St.getUTCMonth()),jn((st+20>>2)*4,St.getUTCFullYear()-1900),jn((st+24>>2)*4,St.getUTCDay()),jn((st+36>>2)*4,0),jn((st+32>>2)*4,0);var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),te=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((st+28>>2)*4,te),ro.GMTString||(ro.GMTString=rt(\"GMT\")),jn((st+40>>2)*4,ro.GMTString),st}function ou(Ke,st){return ro(Ke,st)}function au(Ke,st,St){ke.copyWithin(Ke,st,st+St)}function lu(Ke){try{return Be.grow(Ke-Pe.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function TA(Ke){var st=ke.length;Ke=Ke>>>0;var St=2147483648;if(Ke>St)return!1;for(var lr=1;lr<=4;lr*=2){var te=st*(1+.2/lr);te=Math.min(te,Ke+100663296);var Ee=Math.min(St,Ne(Math.max(Ke,te),65536)),Oe=lu(Ee);if(Oe)return!0}return!1}function RA(Ke){ue(Ke)}function oa(Ke){var st=Date.now()/1e3|0;return Ke&&jn((Ke>>2)*4,st),st}function aa(){if(aa.called)return;aa.called=!0;var Ke=new Date().getFullYear(),st=new Date(Ke,0,1),St=new Date(Ke,6,1),lr=st.getTimezoneOffset(),te=St.getTimezoneOffset(),Ee=Math.max(lr,te);jn((vl()>>2)*4,Ee*60),jn((Is()>>2)*4,+(lr!=te));function Oe(An){var li=An.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return li?li[1]:\"GMT\"}var dt=Oe(st),Et=Oe(St),bt=rt(dt),tr=rt(Et);te<lr?(jn((Mi()>>2)*4,bt),jn((Mi()+4>>2)*4,tr)):(jn((Mi()>>2)*4,tr),jn((Mi()+4>>2)*4,bt))}function FA(Ke){aa();var st=Date.UTC(to((Ke+20>>2)*4)+1900,to((Ke+16>>2)*4),to((Ke+12>>2)*4),to((Ke+8>>2)*4),to((Ke+4>>2)*4),to((Ke>>2)*4),0),St=new Date(st);jn((Ke+24>>2)*4,St.getUTCDay());var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),te=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((Ke+28>>2)*4,te),St.getTime()/1e3|0}var gr=typeof atob==\"function\"?atob:function(Ke){var st=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",St=\"\",lr,te,Ee,Oe,dt,Et,bt,tr=0;Ke=Ke.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do Oe=st.indexOf(Ke.charAt(tr++)),dt=st.indexOf(Ke.charAt(tr++)),Et=st.indexOf(Ke.charAt(tr++)),bt=st.indexOf(Ke.charAt(tr++)),lr=Oe<<2|dt>>4,te=(dt&15)<<4|Et>>2,Ee=(Et&3)<<6|bt,St=St+String.fromCharCode(lr),Et!==64&&(St=St+String.fromCharCode(te)),bt!==64&&(St=St+String.fromCharCode(Ee));while(tr<Ke.length);return St};function Bo(Ke){if(typeof C==\"boolean\"&&C){var st;try{st=Buffer.from(Ke,\"base64\")}catch{st=new Buffer(Ke,\"base64\")}return new Uint8Array(st.buffer,st.byteOffset,st.byteLength)}try{for(var St=gr(Ke),lr=new Uint8Array(St.length),te=0;te<St.length;++te)lr[te]=St.charCodeAt(te);return lr}catch{throw new Error(\"Converting base64 string to bytes failed.\")}}function Me(Ke){if(Co(Ke))return Bo(Ke.slice($s.length))}var cu={e:ou,c:au,d:TA,a:RA,b:oa,f:FA},Cr=QA(),pf=r.___wasm_call_ctors=Cr.h,NA=r._zip_ext_count_symlinks=Cr.i,OA=r._zip_file_get_external_attributes=Cr.j,uu=r._zipstruct_statS=Cr.k,fu=r._zipstruct_stat_size=Cr.l,oc=r._zipstruct_stat_mtime=Cr.m,ve=r._zipstruct_stat_crc=Cr.n,Nt=r._zipstruct_errorS=Cr.o,ac=r._zipstruct_error_code_zip=Cr.p,Oi=r._zipstruct_stat_comp_size=Cr.q,no=r._zipstruct_stat_comp_method=Cr.r,Rt=r._zip_close=Cr.s,xn=r._zip_delete=Cr.t,la=r._zip_dir_add=Cr.u,Gi=r._zip_discard=Cr.v,Li=r._zip_error_init_with_code=Cr.w,Na=r._zip_get_error=Cr.x,dn=r._zip_file_get_error=Cr.y,Kn=r._zip_error_strerror=Cr.z,Au=r._zip_fclose=Cr.A,yh=r._zip_file_add=Cr.B,Oa=r._free=Cr.C,La=r._malloc=Cr.D,Ma=r._zip_source_error=Cr.E,$e=r._zip_source_seek=Cr.F,Ua=r._zip_file_set_external_attributes=Cr.G,hf=r._zip_file_set_mtime=Cr.H,lc=r._zip_fopen_index=Cr.I,wn=r._zip_fread=Cr.J,ca=r._zip_get_name=Cr.K,LA=r._zip_get_num_entries=Cr.L,MA=r._zip_source_read=Cr.M,ua=r._zip_name_locate=Cr.N,Bl=r._zip_open_from_source=Cr.O,Mt=r._zip_set_file_compression=Cr.P,kn=r._zip_source_buffer=Cr.Q,fa=r._zip_source_buffer_create=Cr.R,Ha=r._zip_source_close=Cr.S,ns=r._zip_source_free=Cr.T,cc=r._zip_source_keep=Cr.U,pu=r._zip_source_open=Cr.V,uc=r._zip_source_tell=Cr.X,ja=r._zip_stat_index=Cr.Y,Mi=r.__get_tzname=Cr.Z,Is=r.__get_daylight=Cr._,vl=r.__get_timezone=Cr.$,gf=r.stackSave=Cr.aa,fc=r.stackRestore=Cr.ba,wi=r.stackAlloc=Cr.ca;r.cwrap=se,r.getValue=pe;var Qn;on=function Ke(){Qn||Ac(),Qn||(on=Ke)};function Ac(Ke){if(Ke=Ke||f,Ir>0||(Ct(),Ir>0))return;function st(){Qn||(Qn=!0,r.calledRun=!0,!Ce&&(qt(),s(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ir()))}r.setStatus?(r.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){r.setStatus(\"\")},1),st()},1)):st()}if(r.run=Ac,r.preInit)for(typeof r.preInit==\"function\"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Ac(),e}}();typeof wT==\"object\"&&typeof Pj==\"object\"?Pj.exports=bj:typeof define==\"function\"&&define.amd?define([],function(){return bj}):typeof wT==\"object\"&&(wT.createModule=bj)});var Up,hpe,gpe,dpe=Xe(()=>{Up=[\"number\",\"number\"],hpe=(Z=>(Z[Z.ZIP_ER_OK=0]=\"ZIP_ER_OK\",Z[Z.ZIP_ER_MULTIDISK=1]=\"ZIP_ER_MULTIDISK\",Z[Z.ZIP_ER_RENAME=2]=\"ZIP_ER_RENAME\",Z[Z.ZIP_ER_CLOSE=3]=\"ZIP_ER_CLOSE\",Z[Z.ZIP_ER_SEEK=4]=\"ZIP_ER_SEEK\",Z[Z.ZIP_ER_READ=5]=\"ZIP_ER_READ\",Z[Z.ZIP_ER_WRITE=6]=\"ZIP_ER_WRITE\",Z[Z.ZIP_ER_CRC=7]=\"ZIP_ER_CRC\",Z[Z.ZIP_ER_ZIPCLOSED=8]=\"ZIP_ER_ZIPCLOSED\",Z[Z.ZIP_ER_NOENT=9]=\"ZIP_ER_NOENT\",Z[Z.ZIP_ER_EXISTS=10]=\"ZIP_ER_EXISTS\",Z[Z.ZIP_ER_OPEN=11]=\"ZIP_ER_OPEN\",Z[Z.ZIP_ER_TMPOPEN=12]=\"ZIP_ER_TMPOPEN\",Z[Z.ZIP_ER_ZLIB=13]=\"ZIP_ER_ZLIB\",Z[Z.ZIP_ER_MEMORY=14]=\"ZIP_ER_MEMORY\",Z[Z.ZIP_ER_CHANGED=15]=\"ZIP_ER_CHANGED\",Z[Z.ZIP_ER_COMPNOTSUPP=16]=\"ZIP_ER_COMPNOTSUPP\",Z[Z.ZIP_ER_EOF=17]=\"ZIP_ER_EOF\",Z[Z.ZIP_ER_INVAL=18]=\"ZIP_ER_INVAL\",Z[Z.ZIP_ER_NOZIP=19]=\"ZIP_ER_NOZIP\",Z[Z.ZIP_ER_INTERNAL=20]=\"ZIP_ER_INTERNAL\",Z[Z.ZIP_ER_INCONS=21]=\"ZIP_ER_INCONS\",Z[Z.ZIP_ER_REMOVE=22]=\"ZIP_ER_REMOVE\",Z[Z.ZIP_ER_DELETED=23]=\"ZIP_ER_DELETED\",Z[Z.ZIP_ER_ENCRNOTSUPP=24]=\"ZIP_ER_ENCRNOTSUPP\",Z[Z.ZIP_ER_RDONLY=25]=\"ZIP_ER_RDONLY\",Z[Z.ZIP_ER_NOPASSWD=26]=\"ZIP_ER_NOPASSWD\",Z[Z.ZIP_ER_WRONGPASSWD=27]=\"ZIP_ER_WRONGPASSWD\",Z[Z.ZIP_ER_OPNOTSUPP=28]=\"ZIP_ER_OPNOTSUPP\",Z[Z.ZIP_ER_INUSE=29]=\"ZIP_ER_INUSE\",Z[Z.ZIP_ER_TELL=30]=\"ZIP_ER_TELL\",Z[Z.ZIP_ER_COMPRESSED_DATA=31]=\"ZIP_ER_COMPRESSED_DATA\",Z))(hpe||{}),gpe=t=>({get HEAPU8(){return t.HEAPU8},errors:hpe,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap(\"zip_open_from_source\",\"number\",[\"number\",\"number\",\"number\"]),close:t.cwrap(\"zip_close\",\"number\",[\"number\"]),discard:t.cwrap(\"zip_discard\",null,[\"number\"]),getError:t.cwrap(\"zip_get_error\",\"number\",[\"number\"]),getName:t.cwrap(\"zip_get_name\",\"string\",[\"number\",\"number\",\"number\"]),getNumEntries:t.cwrap(\"zip_get_num_entries\",\"number\",[\"number\",\"number\"]),delete:t.cwrap(\"zip_delete\",\"number\",[\"number\",\"number\"]),statIndex:t.cwrap(\"zip_stat_index\",\"number\",[\"number\",...Up,\"number\",\"number\"]),fopenIndex:t.cwrap(\"zip_fopen_index\",\"number\",[\"number\",...Up,\"number\"]),fread:t.cwrap(\"zip_fread\",\"number\",[\"number\",\"number\",\"number\",\"number\"]),fclose:t.cwrap(\"zip_fclose\",\"number\",[\"number\"]),dir:{add:t.cwrap(\"zip_dir_add\",\"number\",[\"number\",\"string\"])},file:{add:t.cwrap(\"zip_file_add\",\"number\",[\"number\",\"string\",\"number\",\"number\"]),getError:t.cwrap(\"zip_file_get_error\",\"number\",[\"number\"]),getExternalAttributes:t.cwrap(\"zip_file_get_external_attributes\",\"number\",[\"number\",...Up,\"number\",\"number\",\"number\"]),setExternalAttributes:t.cwrap(\"zip_file_set_external_attributes\",\"number\",[\"number\",...Up,\"number\",\"number\",\"number\"]),setMtime:t.cwrap(\"zip_file_set_mtime\",\"number\",[\"number\",...Up,\"number\",\"number\"]),setCompression:t.cwrap(\"zip_set_file_compression\",\"number\",[\"number\",...Up,\"number\",\"number\"])},ext:{countSymlinks:t.cwrap(\"zip_ext_count_symlinks\",\"number\",[\"number\"])},error:{initWithCode:t.cwrap(\"zip_error_init_with_code\",null,[\"number\",\"number\"]),strerror:t.cwrap(\"zip_error_strerror\",\"string\",[\"number\"])},name:{locate:t.cwrap(\"zip_name_locate\",\"number\",[\"number\",\"string\",\"number\"])},source:{fromUnattachedBuffer:t.cwrap(\"zip_source_buffer_create\",\"number\",[\"number\",...Up,\"number\",\"number\"]),fromBuffer:t.cwrap(\"zip_source_buffer\",\"number\",[\"number\",\"number\",...Up,\"number\"]),free:t.cwrap(\"zip_source_free\",null,[\"number\"]),keep:t.cwrap(\"zip_source_keep\",null,[\"number\"]),open:t.cwrap(\"zip_source_open\",\"number\",[\"number\"]),close:t.cwrap(\"zip_source_close\",\"number\",[\"number\"]),seek:t.cwrap(\"zip_source_seek\",\"number\",[\"number\",...Up,\"number\"]),tell:t.cwrap(\"zip_source_tell\",\"number\",[\"number\"]),read:t.cwrap(\"zip_source_read\",\"number\",[\"number\",\"number\",\"number\"]),error:t.cwrap(\"zip_source_error\",\"number\",[\"number\"])},struct:{statS:t.cwrap(\"zipstruct_statS\",\"number\",[]),statSize:t.cwrap(\"zipstruct_stat_size\",\"number\",[\"number\"]),statCompSize:t.cwrap(\"zipstruct_stat_comp_size\",\"number\",[\"number\"]),statCompMethod:t.cwrap(\"zipstruct_stat_comp_method\",\"number\",[\"number\"]),statMtime:t.cwrap(\"zipstruct_stat_mtime\",\"number\",[\"number\"]),statCrc:t.cwrap(\"zipstruct_stat_crc\",\"number\",[\"number\"]),errorS:t.cwrap(\"zipstruct_errorS\",\"number\",[]),errorCodeZip:t.cwrap(\"zipstruct_error_code_zip\",\"number\",[\"number\"])}})});function xj(t,e){let r=t.indexOf(e);if(r<=0)return null;let s=r;for(;r>=0&&(s=r+e.length,t[s]!==J.sep);){if(t[r-1]===J.sep)return null;r=t.indexOf(e,s)}return t.length>s&&t[s]!==J.sep?null:t.slice(0,s)}var $f,mpe=Xe(()=>{Dt();Dt();eA();$f=class t extends e0{static async openPromise(e,r){let s=new t(r);try{return await e(s)}finally{s.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,s=e.readOnlyArchives,a=typeof r>\"u\"?f=>xj(f,\".zip\"):f=>{for(let p of r){let h=xj(f,p);if(h)return h}return null},n=(f,p)=>new As(p,{baseFs:f,readOnly:s,stats:f.statSync(p),customZipImplementation:e.customZipImplementation}),c=async(f,p)=>{let h={baseFs:f,readOnly:s,stats:await f.statPromise(p),customZipImplementation:e.customZipImplementation};return()=>new As(p,h)};super({...e,factorySync:n,factoryPromise:c,getMountPoint:a})}}});var kj,BI,Qj=Xe(()=>{Dj();kj=class extends Error{constructor(e,r){super(e),this.name=\"Libzip Error\",this.code=r}},BI=class{constructor(e){this.filesShouldBeCached=!0;let r=\"buffer\"in e?e.buffer:e.baseFs.readFileSync(e.path);this.libzip=cv();let s=this.libzip.malloc(4);try{let c=0;e.readOnly&&(c|=this.libzip.ZIP_RDONLY);let f=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(f,c,s),this.lzSource=f}catch(p){throw this.libzip.source.free(f),p}if(this.zip===0){let p=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(p,this.libzip.getValue(s,\"i32\")),this.makeLibzipError(p)}}finally{this.libzip.free(s)}let a=this.libzip.getNumEntries(this.zip,0),n=new Array(a);for(let c=0;c<a;++c)n[c]=this.libzip.getName(this.zip,c,0);if(this.listings=n,this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getSymlinkCount(){return this.symlinkCount}getListings(){return this.listings}stat(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statSize(r)>>>0,n=this.libzip.struct.statMtime(r)>>>0,c=this.libzip.struct.statCrc(r)>>>0;return{size:a,mtime:n,crc:c}}makeLibzipError(e){let r=this.libzip.struct.errorCodeZip(e),s=this.libzip.error.strerror(e),a=new kj(s,this.libzip.errors[r]);if(r===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${a.message}`);return a}setFileSource(e,r,s){let a=this.allocateSource(s);try{let n=this.libzip.file.add(this.zip,e,a,this.libzip.ZIP_FL_OVERWRITE);if(n===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(r!==null&&this.libzip.file.setCompression(this.zip,n,0,r[0],r[1])===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return n}catch(n){throw this.libzip.source.free(a),n}}setMtime(e,r){if(this.libzip.file.setMtime(this.zip,e,0,r,0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getExternalAttributes(e){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let s=this.libzip.getValue(this.libzip.uint08S,\"i8\")>>>0,a=this.libzip.getValue(this.libzip.uint32S,\"i32\")>>>0;return[s,a]}setExternalAttributes(e,r,s){if(this.libzip.file.setExternalAttributes(this.zip,e,0,0,r,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}locate(e){return this.libzip.name.locate(this.zip,e,0)}getFileSource(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statCompSize(r),n=this.libzip.struct.statCompMethod(r),c=this.libzip.malloc(a);try{let f=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(f===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let p=this.libzip.fread(f,c,a,0);if(p===-1)throw this.makeLibzipError(this.libzip.file.getError(f));if(p<a)throw new Error(\"Incomplete read\");if(p>a)throw new Error(\"Overread\");let h=this.libzip.HEAPU8.subarray(c,c+a);return{data:Buffer.from(h),compressionMethod:n}}finally{this.libzip.fclose(f)}}finally{this.libzip.free(c)}}deleteEntry(e){if(this.libzip.delete(this.zip,e)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}addDirectory(e){let r=this.libzip.dir.add(this.zip,e);if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return r}getBufferAndClose(){try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let e=this.libzip.source.tell(this.lzSource);if(e===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.malloc(e);if(!r)throw new Error(\"Couldn't allocate enough memory\");try{let s=this.libzip.source.read(this.lzSource,r,e);if(s===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(s<e)throw new Error(\"Incomplete read\");if(s>e)throw new Error(\"Overread\");let a=Buffer.from(this.libzip.HEAPU8.subarray(r,r+e));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(a=Buffer.concat([a,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),a}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource)}}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let r=this.libzip.malloc(e.byteLength);if(!r)throw new Error(\"Couldn't allocate enough memory\");return new Uint8Array(this.libzip.HEAPU8.buffer,r,e.byteLength).set(e),{buffer:r,byteLength:e.byteLength}}allocateUnattachedSource(e){let r=this.libzip.struct.errorS(),{buffer:s,byteLength:a}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(s,a,0,1,r);if(n===0)throw this.libzip.free(r),this.makeLibzipError(r);return n}allocateSource(e){let{buffer:r,byteLength:s}=this.allocateBuffer(e),a=this.libzip.source.fromBuffer(this.zip,r,s,0,1);if(a===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return a}discard(){this.libzip.discard(this.zip)}}});function Ynt(t){if(typeof t==\"string\"&&String(+t)===t)return+t;if(typeof t==\"number\"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(ype.types.isDate(t))return t.getTime()/1e3;throw new Error(\"Invalid time\")}function BT(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var xa,Tj,ype,Rj,lm,Fj,Nj,Epe,As,vT=Xe(()=>{Dt();Dt();Dt();Dt();Dt();Dt();xa=Ie(\"fs\"),Tj=Ie(\"stream\"),ype=Ie(\"util\"),Rj=ut(Ie(\"zlib\"));Qj();lm=3,Fj=0,Nj=8,Epe=\"mixed\";As=class extends Uf{constructor(r,s={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;s.readOnly&&(this.readOnly=!0);let a=s;this.level=typeof a.level<\"u\"?a.level:Epe;let n=s.customZipImplementation??BI;if(typeof r==\"string\"){let{baseFs:f=new Yn}=a;this.baseFs=f,this.path=r}else this.path=null,this.baseFs=null;if(s.stats)this.stats=s.stats;else if(typeof r==\"string\")try{this.stats=this.baseFs.statSync(r)}catch(f){if(f.code===\"ENOENT\"&&a.create)this.stats=$a.makeDefaultStats();else throw f}else this.stats=$a.makeDefaultStats();typeof r==\"string\"?s.create?this.zipImpl=new n({buffer:BT(),readOnly:this.readOnly}):this.zipImpl=new n({path:r,baseFs:this.baseFs,readOnly:this.readOnly,size:this.stats.size}):this.zipImpl=new n({buffer:r??BT(),readOnly:this.readOnly}),this.listings.set(vt.root,new Set);let c=this.zipImpl.getListings();for(let f=0;f<c.length;f++){let p=c[f];if(J.isAbsolute(p))continue;let h=J.resolve(vt.root,p);this.registerEntry(h,f),p.endsWith(\"/\")&&this.registerListing(h)}this.symlinkCount=this.zipImpl.getSymlinkCount(),this.ready=!0}getExtractHint(r){for(let s of this.entries.keys()){let a=this.pathUtils.extname(s);if(r.relevantExtensions.has(a))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error(\"ZipFS don't have real paths when loaded from a buffer\");return this.path}prepareClose(){if(!this.ready)throw or.EBUSY(\"archive closed, close\");yd(this)}getBufferAndClose(){if(this.prepareClose(),this.entries.size===0)return this.discardAndClose(),BT();try{return this.zipImpl.getBufferAndClose()}finally{this.ready=!1}}discardAndClose(){this.prepareClose(),this.zipImpl.discard(),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error(\"ZipFS cannot be saved and must be discarded when loaded from a buffer\");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===$a.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return J.resolve(vt.root,r)}async openPromise(r,s,a){return this.openSync(r,s,a)}openSync(r,s,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,s){return this.opendirSync(r,s)}opendirSync(r,s={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`opendir '${r}'`);let c=[...n],f=this.openSync(a,\"r\");return ex(this,a,c,{onClose:()=>{this.closeSync(f)}})}async readPromise(r,s,a,n,c){return this.readSync(r,s,a,n,c)}readSync(r,s,a=0,n=s.byteLength,c=-1){let f=this.fds.get(r);if(typeof f>\"u\")throw or.EBADF(\"read\");let p=c===-1||c===null?f.cursor:c,h=this.readFileSync(f.p);h.copy(s,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(c===-1||c===null)&&(f.cursor+=E),E}async writePromise(r,s,a,n,c){return typeof s==\"string\"?this.writeSync(r,s,c):this.writeSync(r,s,a,n,c)}writeSync(r,s,a,n,c){throw typeof this.fds.get(r)>\"u\"?or.EBADF(\"read\"):new Error(\"Unimplemented\")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>\"u\")throw or.EBADF(\"read\");this.fds.delete(r)}createReadStream(r,{encoding:s}={}){if(r===null)throw new Error(\"Unimplemented\");let a=this.openSync(r,\"r\"),n=Object.assign(new Tj.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(f,p)=>{clearImmediate(c),this.closeSync(a),p(f)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),c=setImmediate(async()=>{try{let f=await this.readFilePromise(r,s);n.bytesRead=f.length,n.end(f)}catch(f){n.destroy(f)}});return n}createWriteStream(r,{encoding:s}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error(\"Unimplemented\");let a=[],n=this.openSync(r,\"w\"),c=Object.assign(new Tj.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(f,p)=>{try{f?p(f):(this.writeFileSync(r,Buffer.concat(a),s),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){c.destroy()},bytesWritten:0,path:r,pending:!1});return c.on(\"data\",f=>{let p=Buffer.from(f);c.bytesWritten+=p.length,a.push(p)}),c}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let s=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`lstat '${r}'`);return s}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=J.resolve(vt.root,r);return this.entries.has(a)||this.listings.has(a)}let s;try{s=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return s===void 0?!1:this.entries.has(s)||this.listings.has(s)}async accessPromise(r,s){return this.accessSync(r,s)}accessSync(r,s=xa.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&s&xa.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,s={bigint:!1}){return s.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,s)}}async fstatPromise(r,s){return this.fstatSync(r,s)}fstatSync(r,s){let a=this.fds.get(r);if(typeof a>\"u\")throw or.EBADF(\"fstatSync\");let{p:n}=a,c=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(c)&&!this.listings.has(c))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]===\"/\"&&!this.listings.has(c))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,c,s)}async lstatPromise(r,s={bigint:!1}){return s.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,s)}}statImpl(r,s,a={}){let n=this.entries.get(s);if(typeof n<\"u\"){let c=this.zipImpl.stat(n),f=c.crc,p=c.size,h=c.mtime*1e3,E=this.stats.uid,C=this.stats.gid,S=512,P=Math.ceil(c.size/S),I=h,R=h,N=h,U=new Date(I),W=new Date(R),ee=new Date(N),ie=new Date(h),ue=this.listings.has(s)?xa.constants.S_IFDIR:this.isSymbolicLink(n)?xa.constants.S_IFLNK:xa.constants.S_IFREG,le=ue===xa.constants.S_IFDIR?493:420,me=ue|this.getUnixMode(n,le)&511,pe=Object.assign(new $a.StatEntry,{uid:E,gid:C,size:p,blksize:S,blocks:P,atime:U,birthtime:W,ctime:ee,mtime:ie,atimeMs:I,birthtimeMs:R,ctimeMs:N,mtimeMs:h,mode:me,crc:f});return a.bigint===!0?$a.convertToBigIntStats(pe):pe}if(this.listings.has(s)){let c=this.stats.uid,f=this.stats.gid,p=0,h=512,E=0,C=this.stats.mtimeMs,S=this.stats.mtimeMs,P=this.stats.mtimeMs,I=this.stats.mtimeMs,R=new Date(C),N=new Date(S),U=new Date(P),W=new Date(I),ee=xa.constants.S_IFDIR|493,ue=Object.assign(new $a.StatEntry,{uid:c,gid:f,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:W,atimeMs:C,birthtimeMs:S,ctimeMs:P,mtimeMs:I,mode:ee,crc:0});return a.bigint===!0?$a.convertToBigIntStats(ue):ue}throw new Error(\"Unreachable\")}getUnixMode(r,s){let[a,n]=this.zipImpl.getExternalAttributes(r);return a!==lm?s:n>>>16}registerListing(r){let s=this.listings.get(r);if(s)return s;this.registerListing(J.dirname(r)).add(J.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,s){this.registerListing(J.dirname(r)).add(J.basename(r)),this.entries.set(r,s)}unregisterListing(r){this.listings.delete(r),this.listings.get(J.dirname(r))?.delete(J.basename(r))}unregisterEntry(r){this.unregisterListing(r);let s=this.entries.get(r);this.entries.delete(r),!(typeof s>\"u\")&&(this.fileSources.delete(s),this.isSymbolicLink(s)&&this.symlinkCount--)}deleteEntry(r,s){this.unregisterEntry(r),this.zipImpl.deleteEntry(s)}resolveFilename(r,s,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let c=J.resolve(vt.root,s);if(c===\"/\")return vt.root;let f=this.entries.get(c);if(a&&f!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(f)){let p=this.getFileSource(f).toString();return this.resolveFilename(r,J.resolve(J.dirname(c),p),!0,n)}else return c;for(;;){let p=this.resolveFilename(r,J.dirname(c),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(c=J.resolve(p,J.basename(c)),!a||this.symlinkCount===0)break;let C=this.zipImpl.locate(c.slice(1));if(C===-1)break;if(this.isSymbolicLink(C)){let S=this.getFileSource(C).toString();c=J.resolve(J.dirname(c),S)}else break}return c}setFileSource(r,s){let a=Buffer.isBuffer(s)?s:Buffer.from(s),n=J.relative(vt.root,r),c=null;this.level!==\"mixed\"&&(c=[this.level===0?Fj:Nj,this.level]);let f=this.zipImpl.setFileSource(n,c,a);return this.fileSources.set(f,a),f}isSymbolicLink(r){if(this.symlinkCount===0)return!1;let[s,a]=this.zipImpl.getExternalAttributes(r);return s!==lm?!1:(a>>>16&xa.constants.S_IFMT)===xa.constants.S_IFLNK}getFileSource(r,s={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<\"u\")return a;let{data:n,compressionMethod:c}=this.zipImpl.getFileSource(r);if(c===Fj)return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,n),n;if(c===Nj){if(s.asyncDecompress)return new Promise((f,p)=>{Rj.default.inflateRaw(n,(h,E)=>{h?p(h):(this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,E),f(E))})});{let f=Rj.default.inflateRawSync(n);return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,f),f}}else throw new Error(`Unsupported compression method: ${c}`)}async fchmodPromise(r,s){return this.chmodPromise(this.fdToPath(r,\"fchmod\"),s)}fchmodSync(r,s){return this.chmodSync(this.fdToPath(r,\"fchmodSync\"),s)}async chmodPromise(r,s){return this.chmodSync(r,s)}chmodSync(r,s){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);s&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>\"u\")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let f=this.getUnixMode(n,xa.constants.S_IFREG|0)&-512|s;this.zipImpl.setExternalAttributes(n,lm,f<<16)}async fchownPromise(r,s,a){return this.chownPromise(this.fdToPath(r,\"fchown\"),s,a)}fchownSync(r,s,a){return this.chownSync(this.fdToPath(r,\"fchownSync\"),s,a)}async chownPromise(r,s,a){return this.chownSync(r,s,a)}chownSync(r,s,a){throw new Error(\"Unimplemented\")}async renamePromise(r,s){return this.renameSync(r,s)}renameSync(r,s){throw new Error(\"Unimplemented\")}async copyFilePromise(r,s,a){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}copyFileSync(r,s,a=0){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=this.getFileSource(n),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}prepareCopyFile(r,s,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${s}'`);if(a&xa.constants.COPYFILE_FICLONE_FORCE)throw or.ENOSYS(\"unsupported clone operation\",`copyfile '${r}' -> ${s}'`);let n=this.resolveFilename(`copyfile '${r} -> ${s}'`,r),c=this.entries.get(n);if(typeof c>\"u\")throw or.EINVAL(`copyfile '${r}' -> '${s}'`);let f=this.resolveFilename(`copyfile '${r}' -> ${s}'`,s),p=this.entries.get(f);if(a&(xa.constants.COPYFILE_EXCL|xa.constants.COPYFILE_FICLONE_FORCE)&&typeof p<\"u\")throw or.EEXIST(`copyfile '${r}' -> '${s}'`);return{indexSource:c,resolvedDestP:f,indexDest:p}}async appendFilePromise(r,s,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFilePromise(r,s,a)}appendFileSync(r,s,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFileSync(r,s,a)}fdToPath(r,s){let a=this.fds.get(r)?.p;if(typeof a>\"u\")throw or.EBADF(s);return a}async writeFilePromise(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([await this.getFileSource(f,{asyncDecompress:!0}),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&await this.chmodPromise(p,c)}writeFileSync(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([this.getFileSource(f),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&this.chmodSync(p,c)}prepareWriteFile(r,s){if(typeof r==\"number\"&&(r=this.fdToPath(r,\"read\")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,c=null;typeof s==\"string\"?n=s:typeof s==\"object\"&&({encoding:n=null,mode:c=null}=s);let f=this.entries.get(a);return{encoding:n,mode:c,resolvedP:a,index:f}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let s=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(s))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(s);if(typeof a>\"u\")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(s,a)}async utimesPromise(r,s,a){return this.utimesSync(r,s,a)}utimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,s,a){return this.lutimesSync(r,s,a)}lutimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,s){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error(\"Unreachable\");this.zipImpl.setMtime(a,Ynt(s))}async mkdirPromise(r,s){return this.mkdirSync(r,s)}mkdirSync(r,{mode:s=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:s});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,s)}async rmdirPromise(r,s){return this.rmdirSync(r,s)}rmdirSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,c)}async rmPromise(r,s){return this.rmSync(r,s)}rmSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rm '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rm '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rm '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rm '${r}'`);this.deleteEntry(r,c)}hydrateDirectory(r){let s=this.zipImpl.addDirectory(J.relative(vt.root,r));return this.registerListing(r),this.registerEntry(r,s),s}async linkPromise(r,s){return this.linkSync(r,s)}linkSync(r,s){throw or.EOPNOTSUPP(`link '${r}' -> '${s}'`)}async symlinkPromise(r,s){return this.symlinkSync(r,s)}symlinkSync(r,s){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${s}'`);let a=this.resolveFilename(`symlink '${r}' -> '${s}'`,s);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${s}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${s}'`);let n=this.setFileSource(a,r);this.registerEntry(a,n),this.zipImpl.setExternalAttributes(n,lm,(xa.constants.S_IFLNK|511)<<16),this.symlinkCount+=1}async readFilePromise(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return s?a.toString(s):a}readFileSync(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=this.readFileBuffer(r);return s?a.toString(s):a}readFileBuffer(r,s={asyncDecompress:!1}){typeof r==\"number\"&&(r=this.fdToPath(r,\"read\"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR(\"read\");let n=this.entries.get(a);if(n===void 0)throw new Error(\"Unreachable\");return this.getFileSource(n,s)}async readdirPromise(r,s){return this.readdirSync(r,s)}readdirSync(r,s){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(s?.recursive)if(s?.withFileTypes){let c=Array.from(n,f=>Object.assign(this.statImpl(\"lstat\",J.join(r,f)),{name:f,path:vt.dot,parentPath:vt.dot}));for(let f of c){if(!f.isDirectory())continue;let p=J.join(f.path,f.name),h=this.listings.get(J.join(a,p));for(let E of h)c.push(Object.assign(this.statImpl(\"lstat\",J.join(r,p,E)),{name:E,path:p,parentPath:p}))}return c}else{let c=[...n];for(let f of c){let p=this.listings.get(J.join(a,f));if(!(typeof p>\"u\"))for(let h of p)c.push(J.join(f,h))}return c}else return s?.withFileTypes?Array.from(n,c=>Object.assign(this.statImpl(\"lstat\",J.join(r,c)),{name:c,path:void 0,parentPath:void 0})):[...n]}async readlinkPromise(r){let s=this.prepareReadlink(r);return(await this.getFileSource(s,{asyncDecompress:!0})).toString()}readlinkSync(r){let s=this.prepareReadlink(r);return this.getFileSource(s).toString()}prepareReadlink(r){let s=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(s))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(s))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(s);if(a===void 0)throw new Error(\"Unreachable\");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=await this.getFileSource(n,{asyncDecompress:!0}),f=Buffer.alloc(s,0);return c.copy(f),await this.writeFilePromise(r,f)}truncateSync(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=this.getFileSource(n),f=Buffer.alloc(s,0);return c.copy(f),this.writeFileSync(r,f)}async ftruncatePromise(r,s){return this.truncatePromise(this.fdToPath(r,\"ftruncate\"),s)}ftruncateSync(r,s){return this.truncateSync(this.fdToPath(r,\"ftruncateSync\"),s)}watch(r,s,a){let n;switch(typeof s){case\"function\":case\"string\":case\"undefined\":n=!0;break;default:({persistent:n=!0}=s);break}if(!n)return{on:()=>{},close:()=>{}};let c=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(c)}}}watchFile(r,s,a){let n=J.resolve(vt.root,r);return sE(this,n,s,a)}unwatchFile(r,s){let a=J.resolve(vt.root,r);return md(this,a,s)}}});function Cpe(t,e,r=Buffer.alloc(0),s){let a=new As(r),n=C=>C===e||C.startsWith(`${e}/`)?C.slice(0,e.length):null,c=async(C,S)=>()=>a,f=(C,S)=>a,p={...t},h=new Yn(p),E=new e0({baseFs:h,getMountPoint:n,factoryPromise:c,factorySync:f,magicByte:21,maxAge:1/0,typeCheck:s?.typeCheck});return U2(Ipe.default,new t0(E)),a}var Ipe,wpe=Xe(()=>{Dt();Ipe=ut(Ie(\"fs\"));vT()});var Bpe=Xe(()=>{mpe();vT();wpe()});var Oj,uv,ST,vpe=Xe(()=>{Dt();vT();Oj={CENTRAL_DIRECTORY:33639248,END_OF_CENTRAL_DIRECTORY:101010256},uv=22,ST=class t{constructor(e){this.filesShouldBeCached=!1;if(\"buffer\"in e)throw new Error(\"Buffer based zip archives are not supported\");if(!e.readOnly)throw new Error(\"Writable zip archives are not supported\");this.baseFs=e.baseFs,this.fd=this.baseFs.openSync(e.path,\"r\");try{this.entries=t.readZipSync(this.fd,this.baseFs,e.size)}catch(r){throw this.baseFs.closeSync(this.fd),this.fd=\"closed\",r}}static readZipSync(e,r,s){if(s<uv)throw new Error(\"Invalid ZIP file: EOCD not found\");let a=-1,n=Buffer.alloc(uv);if(r.readSync(e,n,0,uv,s-uv),n.readUInt32LE(0)===Oj.END_OF_CENTRAL_DIRECTORY)a=0;else{let R=Math.min(65557,s);n=Buffer.alloc(R),r.readSync(e,n,0,R,Math.max(0,s-R));for(let N=n.length-4;N>=0;N--)if(n.readUInt32LE(N)===Oj.END_OF_CENTRAL_DIRECTORY){a=N;break}if(a===-1)throw new Error(\"Not a zip archive\")}let c=n.readUInt16LE(a+10),f=n.readUInt32LE(a+12),p=n.readUInt32LE(a+16),h=n.readUInt16LE(a+20);if(a+h+uv>n.length)throw new Error(\"Zip archive inconsistent\");if(c==65535||f==4294967295||p==4294967295)throw new Error(\"Zip 64 is not supported\");if(f>s)throw new Error(\"Zip archive inconsistent\");if(c>f/46)throw new Error(\"Zip archive inconsistent\");let E=Buffer.alloc(f);if(r.readSync(e,E,0,E.length,p)!==E.length)throw new Error(\"Zip archive inconsistent\");let C=[],S=0,P=0,I=0;for(;P<c;){if(S+46>E.length)throw new Error(\"Zip archive inconsistent\");if(E.readUInt32LE(S)!==Oj.CENTRAL_DIRECTORY)throw new Error(\"Zip archive inconsistent\");let N=E.readUInt16LE(S+4)>>>8;if(E.readUInt16LE(S+8)&1)throw new Error(\"Encrypted zip files are not supported\");let W=E.readUInt16LE(S+10),ee=E.readUInt32LE(S+16),ie=E.readUInt16LE(S+28),ue=E.readUInt16LE(S+30),le=E.readUInt16LE(S+32),me=E.readUInt32LE(S+42),pe=E.toString(\"utf8\",S+46,S+46+ie).replaceAll(\"\\0\",\" \");if(pe.includes(\"\\0\"))throw new Error(\"Invalid ZIP file\");let Be=E.readUInt32LE(S+20),Ce=E.readUInt32LE(S+38);C.push({name:pe,os:N,mtime:fi.SAFE_TIME,crc:ee,compressionMethod:W,isSymbolicLink:N===lm&&(Ce>>>16&fi.S_IFMT)===fi.S_IFLNK,size:E.readUInt32LE(S+24),compressedSize:Be,externalAttributes:Ce,localHeaderOffset:me}),I+=Be,P+=1,S+=46+ie+ue+le}if(I>s)throw new Error(\"Zip archive inconsistent\");if(S!==E.length)throw new Error(\"Zip archive inconsistent\");return C}getExternalAttributes(e){let r=this.entries[e];return[r.os,r.externalAttributes]}getListings(){return this.entries.map(e=>e.name)}getSymlinkCount(){let e=0;for(let r of this.entries)r.isSymbolicLink&&(e+=1);return e}stat(e){let r=this.entries[e];return{crc:r.crc,mtime:r.mtime,size:r.size}}locate(e){for(let r=0;r<this.entries.length;r++)if(this.entries[r].name===e)return r;return-1}getFileSource(e){if(this.fd===\"closed\")throw new Error(\"ZIP file is closed\");let r=this.entries[e],s=Buffer.alloc(30);this.baseFs.readSync(this.fd,s,0,s.length,r.localHeaderOffset);let a=s.readUInt16LE(26),n=s.readUInt16LE(28),c=Buffer.alloc(r.compressedSize);if(this.baseFs.readSync(this.fd,c,0,r.compressedSize,r.localHeaderOffset+30+a+n)!==r.compressedSize)throw new Error(\"Invalid ZIP file\");return{data:c,compressionMethod:r.compressionMethod}}discard(){this.fd!==\"closed\"&&(this.baseFs.closeSync(this.fd),this.fd=\"closed\")}addDirectory(e){throw new Error(\"Not implemented\")}deleteEntry(e){throw new Error(\"Not implemented\")}setMtime(e,r){throw new Error(\"Not implemented\")}getBufferAndClose(){throw new Error(\"Not implemented\")}setFileSource(e,r,s){throw new Error(\"Not implemented\")}setExternalAttributes(e,r,s){throw new Error(\"Not implemented\")}}});var fv={};Vt(fv,{DEFAULT_COMPRESSION_LEVEL:()=>Epe,DEFLATE:()=>Nj,JsZipImpl:()=>ST,LibZipImpl:()=>BI,STORE:()=>Fj,ZIP_UNIX:()=>lm,ZipFS:()=>As,ZipOpenFS:()=>$f,getArchivePart:()=>xj,getLibzipPromise:()=>Jnt,getLibzipSync:()=>Vnt,makeEmptyArchive:()=>BT,mountMemoryDrive:()=>Cpe});function Vnt(){return cv()}async function Jnt(){return cv()}var Spe,eA=Xe(()=>{Dj();Spe=ut(ppe());dpe();Bpe();vpe();Qj();Ape(()=>{let t=(0,Spe.default)();return gpe(t)})});var Av,Dpe=Xe(()=>{Dt();Yt();pv();Av=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",process.cwd(),{description:\"The directory to run the command in\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.usage={description:\"run a command using yarn's portable shell\",details:`\n      This command will run a command using Yarn's portable shell.\n\n      Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.\n\n      Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.\n\n      Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.\n\n      For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.\n    `,examples:[[\"Run a simple command\",\"$0 echo Hello\"],[\"Run a command with a glob pattern\",\"$0 echo '*.js'\"],[\"Run a command with a redirection\",\"$0 echo Hello World '>' hello.txt\"],[\"Run a command with an escaped glob pattern (The double escape is needed in Unix shells)\",`$0 echo '\"*.js\"'`],[\"Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)\",'$0 \"GREETING=Hello echo $GREETING World\"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(\" \")}`:this.commandName;return await vI(r,[],{cwd:fe.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Vl,bpe=Xe(()=>{Vl=class extends Error{constructor(e){super(e),this.name=\"ShellError\"}}});var PT={};Vt(PT,{fastGlobOptions:()=>kpe,isBraceExpansion:()=>Lj,isGlobPattern:()=>Knt,match:()=>znt,micromatchOptions:()=>bT});function Knt(t){if(!DT.default.scan(t,bT).isGlob)return!1;try{DT.default.parse(t,bT)}catch{return!1}return!0}function znt(t,{cwd:e,baseFs:r}){return(0,Ppe.default)(t,{...kpe,cwd:fe.fromPortablePath(e),fs:ax(xpe.default,new t0(r))})}function Lj(t){return DT.default.scan(t,bT).isBrace}var Ppe,xpe,DT,bT,kpe,Qpe=Xe(()=>{Dt();Ppe=ut(BQ()),xpe=ut(Ie(\"fs\")),DT=ut(Go()),bT={strictBrackets:!0},kpe={onlyDirectories:!1,onlyFiles:!1}});function Mj(){}function Uj(){for(let t of cm)t.kill()}function Npe(t,e,r,s){return a=>{let n=a[0]instanceof tA.Transform?\"pipe\":a[0],c=a[1]instanceof tA.Transform?\"pipe\":a[1],f=a[2]instanceof tA.Transform?\"pipe\":a[2],p=(0,Rpe.default)(t,e,{...s,stdio:[n,c,f]});return cm.add(p),cm.size===1&&(process.on(\"SIGINT\",Mj),process.on(\"SIGTERM\",Uj)),a[0]instanceof tA.Transform&&a[0].pipe(p.stdin),a[1]instanceof tA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof tA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on(\"error\",E=>{switch(cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",Mj),process.off(\"SIGTERM\",Uj)),E.code){case\"ENOENT\":a[2].write(`command not found: ${t}\n`),h(127);break;case\"EACCES\":a[2].write(`permission denied: ${t}\n`),h(128);break;default:a[2].write(`uncaught error: ${E.message}\n`),h(1);break}}),p.on(\"close\",E=>{cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",Mj),process.off(\"SIGTERM\",Uj)),h(E!==null?E:129)})})}}}function Ope(t){return e=>{let r=e[0]===\"pipe\"?new tA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function xT(t,e){return Hj.start(t,e)}function Tpe(t,e=null){let r=new tA.PassThrough,s=new Fpe.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&t(e!==null?`${e} ${n}`:n)}),r}function Lpe(t,{prefix:e}){return{stdout:Tpe(r=>t.stdout.write(`${r}\n`),t.stdout.isTTY?e:null),stderr:Tpe(r=>t.stderr.write(`${r}\n`),t.stderr.isTTY?e:null)}}var Rpe,tA,Fpe,cm,Oc,_j,Hj,jj=Xe(()=>{Rpe=ut(_U()),tA=Ie(\"stream\"),Fpe=Ie(\"string_decoder\"),cm=new Set;Oc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},_j=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");return this.stream}},Hj=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new _j;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=[\"ignore\",\"ignore\",\"ignore\"];if(this.pipe)e[0]=\"pipe\";else{if(this.stdin===null)throw new Error(\"Assertion failed: No input stream registered\");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error(\"Assertion failed: No output stream registered\");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error(\"Assertion failed: No error stream registered\");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var mv={};Vt(mv,{EntryCommand:()=>Av,ShellError:()=>Vl,execute:()=>vI,globUtils:()=>PT});function Mpe(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Vl(`Bad file descriptor: \"${t}\"`)}return s}function QT(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Znt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on(\"data\",n=>s.push(n)),await TT(t,e,QT(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\\r\\n]+$/,\"\")}async function Upe(t,e,r){let s=t.map(async n=>{let c=await um(n.args,e,r);return{name:n.name,value:c.join(\" \")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function kT(t){return t.match(/[^ \\r\\n\\t]+/g)||[]}async function Wpe(t,e,r,s,a=s){switch(t.name){case\"$\":s(String(process.pid));break;case\"#\":s(String(e.args.length));break;case\"@\":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=kT(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case\"*\":{let n=e.args.join(\" \");if(t.quoted)s(n);else for(let c of kT(n))a(c)}break;case\"PPID\":s(String(process.ppid));break;case\"RANDOM\":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<e.args.length&&(c=e.args[n]):Object.hasOwn(r.variables,t.name)?c=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(c=r.environment[t.name]),typeof c<\"u\"&&t.alternativeValue?c=(await um(t.alternativeValue,e,r)).join(\" \"):typeof c>\"u\"&&(t.defaultValue?c=(await um(t.defaultValue,e,r)).join(\" \"):t.alternativeValue&&(c=\"\")),typeof c>\"u\")throw f?new Vl(`Unbound argument #${n}`):new Vl(`Unbound variable \"${t.name}\"`);if(t.quoted)s(c);else{let p=kT(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<\"u\"&&s(h)}}break}}async function hv(t,e,r){if(t.type===\"number\"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: \"${t.value}\", only integers are allowed`)}else if(t.type===\"variable\"){let s=[];await Wpe({...t,quoted:!0},e,r,n=>s.push(n));let a=Number(s.join(\" \"));return Number.isNaN(a)?hv({type:\"variable\",name:s.join(\" \")},e,r):hv({type:\"number\",value:a},e,r)}else return $nt[t.type](await hv(t.left,e,r),await hv(t.right,e,r))}async function um(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join(\"\")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let P=JSON.stringify({type:E,fd:C}),I=s.get(P);typeof I>\"u\"&&s.set(P,I=[]),I.push(S)};for(let E of t){let C=!1;switch(E.type){case\"redirection\":{let S=await um(E.args,e,r);for(let P of S)h(E.subtype,E.fd,P)}break;case\"argument\":for(let S of E.segments)switch(S.type){case\"text\":c(S.text);break;case\"glob\":c(S.pattern),C=!0;break;case\"shell\":{let P=await Znt(S.shell,e,r);if(S.quoted)c(P);else{let I=kT(P);for(let R=0;R<I.length-1;++R)p(I[R]);c(I[I.length-1])}}break;case\"variable\":await Wpe(S,e,r,c,p);break;case\"arithmetic\":c(String(await hv(S.arithmetic,e,r)));break}break}if(f(),C){let S=a.pop();if(typeof S>\"u\")throw new Error(\"Assertion failed: Expected a glob pattern to have been set\");let P=await e.glob.match(S,{cwd:r.cwd,baseFs:e.baseFs});if(P.length===0){let I=Lj(S)?\". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22\":\"\";throw new Vl(`No matches found: \"${S}\"${I}`)}for(let I of P.sort())p(I)}}if(s.size>0){let E=[];for(let[C,S]of s.entries())E.splice(E.length,0,C,String(S.length),...S);a.splice(0,0,\"__ysh_set_redirects\",...E,\"--\")}return a}function gv(t,e,r){e.builtins.has(t[0])||(t=[\"command\",...t]);let s=fe.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<\"u\"&&(a={...a,PWD:s});let[n,...c]=t;if(n===\"command\")return Npe(c[0],c.slice(1),e,{cwd:s,env:a});let f=e.builtins.get(n);if(typeof f>\"u\")throw new Error(`Assertion failed: A builtin should exist for \"${n}\"`);return Ope(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:C,stdout:S,stderr:P}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await f(c,e,r)}finally{r.stdin=C,r.stdout=S,r.stderr=P}})}function eit(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,QT(r,{stdin:a}));return{stdin:a,promise:n}}}function tit(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,r);return{stdin:a,promise:n}}}function _pe(t,e,r,s){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(s.procedures,a));return s.procedures={...s.procedures},s.procedures[a]=t,gv([...e,\"__ysh_run_procedure\",a],r,s)}}async function Hpe(t,e,r){let s=t,a=null,n=null;for(;s;){let c=s.then?{...r}:r,f;switch(s.type){case\"command\":{let p=await um(s.args,e,r),h=await Upe(s.envs,e,r);f=s.envs.length?gv(p,e,QT(c,{environment:h})):gv(p,e,c)}break;case\"subshell\":{let p=await um(s.args,e,r),h=eit(s.subshell,e,c);f=_pe(h,p,e,c)}break;case\"group\":{let p=await um(s.args,e,r),h=tit(s.group,e,c);f=_pe(h,p,e,c)}break;case\"envs\":{let p=await Upe(s.envs,e,r);c.environment={...c.environment,...p},f=gv([\"true\"],e,c)}break}if(typeof f>\"u\")throw new Error(\"Assertion failed: An action should have been generated\");if(a===null)n=xT(f,{stdin:new Oc(c.stdin),stdout:new Oc(c.stdout),stderr:new Oc(c.stderr)});else{if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");switch(a){case\"|\":n=n.pipeTo(f,1);break;case\"|&\":n=n.pipeTo(f,3);break}}s.then?(a=s.then.type,s=s.then.chain):s=null}if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");return await n.run()}async function rit(t,e,r,{background:s=!1}={}){function a(n){let c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[n%c.length];return jpe.default.hex(f)}if(s){let n=r.nextBackgroundJobIndex++,c=a(n),f=`[${n}]`,p=c(f),{stdout:h,stderr:E}=Lpe(r,{prefix:p});return r.backgroundJobs.push(Hpe(t,e,QT(r,{stdout:h,stderr:E})).catch(C=>E.write(`${C.message}\n`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(AE(t))}' has ended\n`)})),0}return await Hpe(t,e,r)}async function nit(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables[\"?\"]=String(f)},c=async f=>{try{return await rit(f.chain,e,r,{background:s&&typeof f.then>\"u\"})}catch(p){if(!(p instanceof Vl))throw p;return r.stderr.write(`${p.message}\n`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case\"&&\":a===0&&n(await c(t.then.line));break;case\"||\":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: \"${t.then.type}\"`)}t=t.then.line}return a}async function TT(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await nit(n,e,r,{background:c===\"&\"}),r.exitCode!==null)return r.exitCode;r.variables[\"?\"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function Ype(t){switch(t.type){case\"variable\":return t.name===\"@\"||t.name===\"#\"||t.name===\"*\"||Number.isFinite(parseInt(t.name,10))||\"defaultValue\"in t&&!!t.defaultValue&&t.defaultValue.some(e=>dv(e))||\"alternativeValue\"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>dv(e));case\"arithmetic\":return Gj(t.arithmetic);case\"shell\":return qj(t.shell);default:return!1}}function dv(t){switch(t.type){case\"redirection\":return t.args.some(e=>dv(e));case\"argument\":return t.segments.some(e=>Ype(e));default:throw new Error(`Assertion failed: Unsupported argument type: \"${t.type}\"`)}}function Gj(t){switch(t.type){case\"variable\":return Ype(t);case\"number\":return!1;default:return Gj(t.left)||Gj(t.right)}}function qj(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case\"subshell\":s=qj(r.subshell);break;case\"command\":s=r.envs.some(a=>a.args.some(n=>dv(n)))||r.args.some(a=>dv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function vI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=fe.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=PT}={}){let C={};for(let[I,R]of Object.entries(n))typeof R<\"u\"&&(C[I]=R);let S=new Map(Xnt);for(let[I,R]of Object.entries(s))S.set(I,R);c===null&&(c=new Jl.PassThrough,c.end());let P=ux(t,E);if(!qj(P)&&P.length>0&&e.length>0){let{command:I}=P[P.length-1];for(;I.then;)I=I.then.line;let R=I.chain;for(;R.then;)R=R.then.chain;R.type===\"command\"&&(R.args=R.args.concat(e.map(N=>({type:\"argument\",segments:[{type:\"text\",text:N}]}))))}return await TT(P,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{\"?\":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var jpe,Gpe,Jl,qpe,Xnt,$nt,pv=Xe(()=>{Dt();wc();jpe=ut(TE()),Gpe=Ie(\"os\"),Jl=Ie(\"stream\"),qpe=Ie(\"timers/promises\");Dpe();bpe();Qpe();jj();jj();Xnt=new Map([[\"cd\",async([t=(0,Gpe.homedir)(),...e],r,s)=>{let a=J.resolve(s.cwd,fe.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code===\"ENOENT\"?new Vl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Vl(`cd: not a directory: ${t}`);return s.cwd=a,0}],[\"pwd\",async(t,e,r)=>(r.stdout.write(`${fe.fromPortablePath(r.cwd)}\n`),0)],[\":\",async(t,e,r)=>0],[\"true\",async(t,e,r)=>0],[\"false\",async(t,e,r)=>1],[\"exit\",async([t,...e],r,s)=>s.exitCode=parseInt(t??s.variables[\"?\"],10)],[\"echo\",async(t,e,r)=>(r.stdout.write(`${t.join(\" \")}\n`),0)],[\"sleep\",async([t],e,r)=>{if(typeof t>\"u\")throw new Vl(\"sleep: missing operand\");let s=Number(t);if(Number.isNaN(s))throw new Vl(`sleep: invalid time interval '${t}'`);return await(0,qpe.setTimeout)(1e3*s,0)}],[\"unset\",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],[\"__ysh_run_procedure\",async(t,e,r)=>{let s=r.procedures[t[0]];return await xT(s,{stdin:new Oc(r.stdin),stdout:new Oc(r.stdout),stderr:new Oc(r.stderr)}).run()}],[\"__ysh_set_redirects\",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!==\"--\";){let C=t[h++],{type:S,fd:P}=JSON.parse(C),I=W=>{switch(P){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},R=W=>{switch(P){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},N=Number(t[h++]),U=h+N;for(let W=h;W<U;++h,++W)switch(S){case\"<\":I(()=>e.baseFs.createReadStream(J.resolve(r.cwd,fe.toPortablePath(t[W]))));break;case\"<<<\":I(()=>{let ee=new Jl.PassThrough;return process.nextTick(()=>{ee.write(`${t[W]}\n`),ee.end()}),ee});break;case\"<&\":I(()=>Mpe(Number(t[W]),1,r));break;case\">\":case\">>\":{let ee=J.resolve(r.cwd,fe.toPortablePath(t[W]));R(ee===\"/dev/null\"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,ue,le){setImmediate(le)}}):e.baseFs.createWriteStream(ee,S===\">>\"?{flags:\"a\"}:void 0))}break;case\">&\":R(Mpe(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: \"${S}\"`)}}if(c.length>0){let C=new Jl.PassThrough;s=C;let S=P=>{if(P===c.length)C.end();else{let I=c[P]();I.pipe(C,{end:!1}),I.on(\"end\",()=>{S(P+1)})}};S(0)}if(f.length>0){let C=new Jl.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new Jl.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await xT(gv(t.slice(h+1),e,r),{stdin:new Oc(s),stdout:new Oc(a),stderr:new Oc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),E}]]);$nt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Vpe=_((S4t,RT)=>{function iit(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,P=13,I=14,R=15,N=16,U=17,W=0,ee=1,ie=2,ue=3,le=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var ye=g.charCodeAt(we);if(55296<=ye&&ye<=56319&&we<g.length-1){var Ae=ye,se=g.charCodeAt(we+1);return 56320<=se&&se<=57343?(Ae-55296)*1024+(se-56320)+65536:Ae}if(56320<=ye&&ye<=57343&&we>=1){var Ae=g.charCodeAt(we-1),se=ye;return 55296<=Ae&&Ae<=56319?(Ae-55296)*1024+(se-56320)+65536:se}return ye}function Be(g,we,ye){var Ae=[g].concat(we).concat([ye]),se=Ae[Ae.length-2],Z=ye,De=Ae.lastIndexOf(I);if(De>1&&Ae.slice(1,De).every(function(j){return j==s})&&[s,P,U].indexOf(g)==-1)return ie;var Re=Ae.lastIndexOf(a);if(Re>0&&Ae.slice(1,Re).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return Ae.filter(function(j){return j==a}).length%2==1?ue:le;if(se==t&&Z==e)return W;if(se==r||se==t||se==e)return Z==I&&we.every(function(j){return j==s})?ie:ee;if(Z==r||Z==t||Z==e)return ee;if(se==c&&(Z==c||Z==f||Z==h||Z==E))return W;if((se==h||se==f)&&(Z==f||Z==p))return W;if((se==E||se==p)&&Z==p)return W;if(Z==s||Z==R)return W;if(Z==n)return W;if(se==S)return W;var mt=Ae.indexOf(s)!=-1?Ae.lastIndexOf(s)-1:Ae.length-2;return[P,U].indexOf(Ae[mt])!=-1&&Ae.slice(mt+1,-1).every(function(j){return j==s})&&Z==I||se==R&&[N,U].indexOf(Z)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&Z==a?W:ee}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var ye=Ce(pe(g,we)),Ae=[],se=we+1;se<g.length;se++)if(!me(g,se-1)){var Z=Ce(pe(g,se));if(Be(ye,Ae,Z))return se;Ae.push(Z)}return g.length},this.splitGraphemes=function(g){for(var we=[],ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)we.push(g.slice(ye,Ae)),ye=Ae;return ye<g.length&&we.push(g.slice(ye)),we},this.iterateGraphemes=function(g){var we=0,ye={next:function(){var Ae,se;return(se=this.nextBreak(g,we))<g.length?(Ae=g.slice(we,se),we=se,{value:Ae,done:!1}):we<g.length?(Ae=g.slice(we),we=g.length,{value:Ae,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<\"u\"&&Symbol.iterator&&(ye[Symbol.iterator]=function(){return ye}),ye},this.countGraphemes=function(g){for(var we=0,ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)ye=Ae,we++;return ye<g.length&&we++,we};function Ce(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?S:g==13?t:g==10?e:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?s:127462<=g&&g<=127487?a:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?n:4352<=g&&g<=4447||43360<=g&&g<=43388?c:4448<=g&&g<=4519||55216<=g&&g<=55238?f:4520<=g&&g<=4607||55243<=g&&g<=55291?p:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?h:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?E:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?P:127995<=g&&g<=127999?I:g==8205?R:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?N:128102<=g&&g<=128105?U:C}return this}typeof RT<\"u\"&&RT.exports&&(RT.exports=iit)});var Kpe=_((D4t,Jpe)=>{var sit=/^(.*?)(\\x1b\\[[^m]+m|\\x1b\\]8;;.*?(\\x1b\\\\|\\u0007))/,FT;function oit(){if(FT)return FT;if(typeof Intl.Segmenter<\"u\"){let t=new Intl.Segmenter(\"en\",{granularity:\"grapheme\"});return FT=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Vpe(),e=new t;return FT=r=>e.splitGraphemes(r)}}Jpe.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError(\"Negative indices aren't supported by this implementation\");let s=r-e,a=\"\",n=0,c=0;for(;t.length>0;){let f=t.match(sit)||[t,t,void 0],p=oit()(f[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(s-c,p.length);a+=p.slice(0,E).join(\"\"),n+=h,c+=E,typeof f[2]<\"u\"&&(a+=f[2]),t=t.slice(f[0].length)}return a}});var fn,yv=Xe(()=>{fn=process.env.YARN_IS_TEST_ENV?\"0.0.0\":\"4.12.0\"});function the(t,{configuration:e,json:r}){if(!e.get(\"enableMessageNames\"))return\"\";let a=Yf(t===null?0:t);return!r&&t===null?Ht(e,a,\"grey\"):a}function Wj(t,{configuration:e,json:r}){let s=the(t,{configuration:e,json:r});if(!s||t===null||t===0)return s;let a=Br[t],n=`https://yarnpkg.com/advanced/error-codes#${s}---${a}`.toLowerCase();return KE(e,s,n)}async function SI({configuration:t,stdout:e,forceError:r},s){let a=await Ot.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let c=!1,f=!1;for(let p of s)typeof p.option<\"u\"&&(p.error||r?(f=!0,n.reportError(50,p.message)):(c=!0,n.reportWarning(50,p.message)),p.callback?.());c&&!f&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var $pe,NT,ait,zpe,Xpe,D0,ehe,Zpe,lit,cit,OT,uit,Ot,Ev=Xe(()=>{$pe=ut(Kpe()),NT=ut(Fd());Gx();Tc();yv();xc();ait=\"\\xB7\",zpe=[\"\\u280B\",\"\\u2819\",\"\\u2839\",\"\\u2838\",\"\\u283C\",\"\\u2834\",\"\\u2826\",\"\\u2827\",\"\\u2807\",\"\\u280F\"],Xpe=80,D0=NT.default.GITHUB_ACTIONS?{start:t=>`::group::${t}\n`,end:t=>`::endgroup::\n`}:NT.default.TRAVIS?{start:t=>`travis_fold:start:${t}\n`,end:t=>`travis_fold:end:${t}\n`}:NT.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}[collapsed=true]\\r\\x1B[0K${t}\n`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}\\r\\x1B[0K`}:null,ehe=D0!==null,Zpe=new Date,lit=[\"iTerm.app\",\"Apple_Terminal\",\"WarpTerminal\",\"vscode\"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,cit=t=>t,OT=cit({patrick:{date:[17,3],chars:[\"\\u{1F340}\",\"\\u{1F331}\"],size:40},simba:{date:[19,7],chars:[\"\\u{1F981}\",\"\\u{1F334}\"],size:40},jack:{date:[31,10],chars:[\"\\u{1F383}\",\"\\u{1F987}\"],size:40},hogsfather:{date:[31,12],chars:[\"\\u{1F389}\",\"\\u{1F384}\"],size:40},default:{chars:[\"=\",\"-\"],size:80}}),uit=lit&&Object.keys(OT).find(t=>{let e=OT[t];return!(e.date&&(e.date[0]!==Zpe.getDate()||e.date[1]!==Zpe.getMonth()+1))})||\"default\";Ot=class extends Ao{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(RB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get(\"enableProgressBars\")&&!a&&s.isTTY&&s.columns>22){let S=r.get(\"progressBarStyle\")||uit;if(!Object.hasOwn(OT,S))throw new Error(\"Assertion failed: Invalid progress bar style\");this.progressStyle=OT[S];let P=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*P/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!=\"string\"){let h=c;c=h.message,f=f??h.name}let p=typeof f<\"u\"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,zd(r.configuration,`Yarn ${fn}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s==\"function\"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\\u250C ${r}`),this.indent+=1,D0!==null&&!this.json&&this.includeInfos&&this.stdout.write(D0.start(r))},reportFooter:f=>{if(this.indent-=1,D0!==null&&!this.json&&this.includeInfos){this.stdout.write(D0.end(r));for(let p of this.timerFooter)p()}this.configuration.get(\"enableTimers\")&&f>200?this.reportInfo(null,`\\u2514 Completed in ${Ht(this.configuration,f,ht.DURATION)}`):this.reportInfo(null,\"\\u2514 Completed\"),this.level-=1},skipIfEmpty:(typeof s==\"function\"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(\"\"):this.reportInfo(null,\"\")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\",c=`${this.formatPrefix(n,\"blueBright\")}${s}`;this.json?this.reportJson({type:\"info\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"warning\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"yellowBright\")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"error\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"redBright\")}${s}`,{truncate:!1})}reportFold(r,s){if(!D0)return;let a=`${D0.start(r)}${s}${D0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error(\"Unimplemented: Progress bars can't have both progress and titles.\");let s=!1,a=Promise.resolve().then(async()=>{let c={progress:r.hasProgress?0:void 0,title:r.hasTitle?\"\":void 0};this.progress.set(r,{definition:c,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:f,title:p}of r)s||c.progress===f&&c.title===p||(c.progress=f,c.title=p,this.refreshProgress());n()}),n=()=>{s||(s=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r=\"\";this.errorCount>0?r=\"Failed with errors\":this.warningCount>0?r=\"Done with warnings\":r=\"Done\";let s=Ht(this.configuration,Date.now()-this.startTime,ht.DURATION),a=this.configuration.get(\"enableTimers\")?`${r} in ${s}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:s}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:s})}\n`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}\n`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write(\"\\x1B[0J\"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Xpe&&(this.progressFrame=(this.progressFrame+1)%zpe.length,this.progressTime=r);let s=zpe[this.progressFrame];for(let a of this.progress.values()){let n=\"\";if(typeof a.lastScaledSize<\"u\"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:\"\",p=a.definition.title?` ${a.definition.title}`:\"\";this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"blueBright\")} ${f}${s}${n}${p}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Xpe)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<\"u\"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>\"u\"&&(s=this.configuration.get(\"preferTruncatedLines\")),s&&(r=(0,$pe.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?the(r,{configuration:this.configuration,json:this.json}):\"\"}formatPrefix(r,s){return this.includePrefix?`${Ht(this.configuration,\"\\u27A4\",s)} ${r}${this.formatIndent()}`:\"\"}formatNameWithHyperlink(r){return this.includeNames?Wj(r,{configuration:this.configuration,json:this.json}):\"\"}formatIndent(){return this.level>0||!this.forceSectionAlignment?\"\\u2502 \".repeat(this.indent):`${ait} `}}});var In={};Vt(In,{PackageManager:()=>nhe,detectPackageManager:()=>ihe,executePackageAccessibleBinary:()=>che,executePackageScript:()=>LT,executePackageShellcode:()=>Yj,executeWorkspaceAccessibleBinary:()=>mit,executeWorkspaceLifecycleScript:()=>ahe,executeWorkspaceScript:()=>ohe,getPackageAccessibleBinaries:()=>MT,getWorkspaceAccessibleBinaries:()=>lhe,hasPackageScript:()=>hit,hasWorkspaceScript:()=>Vj,isNodeScript:()=>Jj,makeScriptEnv:()=>Iv,maybeExecuteWorkspaceLifecycleScript:()=>dit,prepareExternalProject:()=>pit});async function b0(t,e,r,s=[]){if(process.platform===\"win32\"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @\"${r}\" ${s.map(n=>`\"${n.replace('\"','\"\"')}\"`).join(\" \")} %*`;await ce.writeFilePromise(J.format({dir:t,name:e,ext:\".cmd\"}),a)}await ce.writeFilePromise(J.join(t,e),`#!/bin/sh\nexec \"${r}\" ${s.map(a=>`'${a.replace(/'/g,`'\"'\"'`)}'`).join(\" \")} \"$@\"\n`,{mode:493})}async function ihe(t){let e=await Ut.tryFind(t);if(e?.packageManager){let s=xQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(\".\");switch(s.name){case\"yarn\":return{packageManagerField:!0,packageManager:Number(n)===1?\"Yarn Classic\":\"Yarn\",reason:a};case\"npm\":return{packageManagerField:!0,packageManager:\"npm\",reason:a};case\"pnpm\":return{packageManagerField:!0,packageManager:\"pnpm\",reason:a}}}}let r;try{r=await ce.readFilePromise(J.join(t,Er.lockfile),\"utf8\")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:\"Yarn\",reason:'\"__metadata\" key found in yarn.lock'}:{packageManager:\"Yarn Classic\",reason:'\"__metadata\" key not found in yarn.lock, must be a Yarn classic lockfile'}:ce.existsSync(J.join(t,\"package-lock.json\"))?{packageManager:\"npm\",reason:`found npm's \"package-lock.json\" lockfile`}:ce.existsSync(J.join(t,\"pnpm-lock.yaml\"))?{packageManager:\"pnpm\",reason:`found pnpm's \"pnpm-lock.yaml\" lockfile`}:null}async function Iv({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<\"u\"&&(c[E.toLowerCase()!==\"path\"?E:\"PATH\"]=C);let f=fe.fromPortablePath(r);c.BERRY_BIN_FOLDER=fe.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?fe.join(process.env.COREPACK_ROOT,\"dist/yarn.js\"):process.argv[1];if(await Promise.all([b0(r,\"node\",process.execPath),...fn!==null?[b0(r,\"run\",process.execPath,[p,\"run\"]),b0(r,\"yarn\",process.execPath,[p]),b0(r,\"yarnpkg\",process.execPath,[p]),b0(r,\"node-gyp\",process.execPath,[p,\"run\",\"--top-level\",\"node-gyp\"])]:[]]),t&&(c.INIT_CWD=fe.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=fe.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${fe.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${fe.sep}yarn`,c.npm_node_execpath=`${f}${fe.sep}node`,e){if(!t)throw new Error(\"Assertion failed: Missing project\");let E=t.tryWorkspaceByLocator(e),C=E?E.manifest.version??\"\":t.storedPackages.get(e.locatorHash).version??\"\";c.npm_package_name=un(e),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let P=t.storedPackages.get(e.locatorHash);if(!P)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),R={project:t,report:new Ot({stdout:new P0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(P,R));if(!N)throw new Error(`The package ${Yr(t.configuration,P)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(P,R)}c.npm_package_json=fe.fromPortablePath(J.join(S,Er.manifest))}let h=fn!==null?`yarn/${fn}`:`yarn/${Pp(\"@yarnpkg/core\").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,C,S)=>await b0(r,E,C,S)),c}async function pit(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await Ait(async()=>{await ce.mktempPromise(async c=>{let f=J.join(c,\"pack.log\"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:fe.fromPortablePath(t),report:s}),C=n&&Gu(n)?rI(n):n,S=C?ll(C):\"an external project\";h.write(`Packing ${S} from sources\n`);let P=await ihe(t),I;P!==null?(h.write(`Using ${P.packageManager} for bootstrap. Reason: ${P.reason}\n\n`),I=P.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn\n\n`),I=\"Yarn\");let R=I===\"Yarn\"&&!P?.packageManagerField;await ce.mktempPromise(async N=>{let U=await Iv({binFolder:N,ignoreCorepack:R,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:\"0\"}}),ee=new Map([[\"Yarn Classic\",async()=>{let ue=a!==null?[\"workspace\",a]:[],le=J.join(t,Er.manifest),me=await ce.readFilePromise(le),pe=await Wu(process.execPath,[process.argv[1],\"set\",\"version\",\"classic\",\"--only-if-needed\",\"--yarn-path\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await ce.writeFilePromise(le,me),await ce.appendFilePromise(J.join(t,\".npmignore\"),`/.yarn\n`),h.write(`\n`),delete U.NODE_ENV;let Be=await Wu(\"yarn\",[\"install\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(`\n`);let Ce=await Wu(\"yarn\",[...ue,\"pack\",\"--filename\",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],[\"Yarn\",async()=>{let ue=a!==null?[\"workspace\",a]:[];U.YARN_ENABLE_INLINE_BUILDS=\"1\";let le=J.join(t,Er.lockfile);await ce.existsPromise(le)||await ce.writeFilePromise(le,\"\");let me=await Wu(\"yarn\",[...ue,\"pack\",\"--install-if-needed\",\"--filename\",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],[\"npm\",async()=>{if(a!==null){let we=new P0.PassThrough,ye=WE(we);we.pipe(h,{end:!1});let Ae=await Wu(\"npm\",[\"--version\"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),Ae.code!==0)return h.end(),E.end(),Ae.code;let se=(await ye).toString().trim();if(!Zf(se,\">=7.x\")){let Z=Da(null,\"npm\"),De=On(Z,se),Re=On(Z,\">=7.x\");throw new Error(`Workspaces aren't supported by ${ni(r,De)}; please upgrade to ${ni(r,Re)} (npm has been detected as the primary package manager for ${Ht(r,t,ht.PATH)})`)}}let ue=a!==null?[\"--workspace\",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let le=await Wu(\"npm\",[\"install\",\"--legacy-peer-deps\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(le.code!==0)return le.code;let me=new P0.PassThrough,pe=WE(me);me.pipe(h);let Be=await Wu(\"npm\",[\"pack\",\"--silent\",...ue],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\\n/s,\"\"),g=J.resolve(t,fe.toPortablePath(Ce));return await ce.renamePromise(g,e),0}]]).get(I);if(typeof ee>\"u\")throw new Error(\"Assertion failed: Unsupported workflow\");let ie=await ee();if(!(ie===0||typeof ie>\"u\"))throw ce.detachTemp(c),new jt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Ht(r,f,ht.PATH)})`)})})})}async function hit(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return Vj(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await $f.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new P0.PassThrough,configuration:c})},h=f.find(P=>P.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Sn(E,{baseFs:n});return(await Ut.find(vt.dot,{baseFs:C})).scripts.has(e)})}async function LT(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await she(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>\"u\")return 1;let P=async()=>await vI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,P,a,t,e,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function Yj(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{env:h,cwd:E}=await she(t,{project:a,binFolder:p,cwd:s});return await vI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function git(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await Iv({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await Kj(e,await lhe(t)),typeof r>\"u\"&&(r=J.dirname(await ce.realpathPromise(J.join(t.cwd,\"package.json\")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function she(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return git(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await $f.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new P0.PassThrough,configuration:p})},C=h.find(N=>N.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await Iv({project:e,locator:t,binFolder:r,lifecycleScript:a});await Kj(r,await MT(t,{project:e}));let P=await C.findPackageLocation(c,E),I=new Sn(P,{baseFs:f}),R=await Ut.find(vt.dot,{baseFs:I});return typeof s>\"u\"&&(s=P),{manifest:R,binFolder:r,env:S,cwd:s}})}async function ohe(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await LT(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function Vj(t,e){return t.manifest.scripts.has(e)}async function ahe(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await ce.mktempPromise(async c=>{let f=J.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the \"${e}\" lifecycle script inside a workspace (\"${fe.fromPortablePath(t.cwd)}\")\n`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the \"${e}\" lifecycle script`);let C=await ohe(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw ce.detachTemp(c),new jt(36,`${bB(e)} script failed (exit code ${Ht(a,C,ht.NUMBER)}, logs can be found here: ${Ht(a,f,ht.PATH)}); run ${Ht(a,`yarn ${e}`,ht.CODE)} to investigate`)})}async function dit(t,e,r){Vj(t,e)&&await ahe(t,e,r)}function Jj(t){let e=J.extname(t);if(e.match(/\\.[cm]?[jt]sx?$/))return!0;if(e===\".exe\"||e===\".bin\")return!1;let r=Buffer.alloc(4),s;try{s=ce.openSync(t,\"r\")}catch{return!0}try{ce.readSync(s,r,0,r.length,0)}finally{ce.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function MT(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new P0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ni(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=e.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Wl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Wl.skip;let P=null;try{P=await S.findPackageLocation(C,f)}catch(I){if(I.code===\"LOCATOR_NOT_INSTALLED\")return Wl.skip;throw I}return{dependency:C,packageLocation:P}}));for(let E of h){if(E===Wl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[P,I]of C.bin){let R=J.resolve(S,I);s.set(P,[C,fe.fromPortablePath(R),Jj(R)])}}return s}async function lhe(t){return await MT(t.anchoredLocator,{project:t.project})}async function Kj(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?b0(t,r,process.execPath,[s]):b0(t,r,s,[])))}async function che(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await MT(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await ce.mktempPromise(async C=>{let[,S]=E,P=await Iv({project:a,locator:t,binFolder:C});await Kj(P.BERRY_BIN_FOLDER,h);let I=Jj(fe.toPortablePath(S))?Wu(process.execPath,[...p,S,...r],{cwd:s,env:P,stdin:n,stdout:c,stderr:f}):Wu(S,r,{cwd:s,env:P,stdin:n,stdout:c,stderr:f}),R;try{R=await I}finally{await ce.removePromise(P.BERRY_BIN_FOLDER)}return R.code})}async function mit(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await che(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var rhe,P0,nhe,fit,Ait,zj=Xe(()=>{Dt();Dt();eA();pv();ql();rhe=ut(Ld()),P0=Ie(\"stream\");oI();Tc();Ev();yv();dT();xc();Pc();Rp();Wo();nhe=(a=>(a.Yarn1=\"Yarn Classic\",a.Yarn2=\"Yarn\",a.Npm=\"npm\",a.Pnpm=\"pnpm\",a))(nhe||{});fit=2,Ait=(0,rhe.default)(fit)});var DI=_((J4t,fhe)=>{\"use strict\";var uhe=new Map([[\"C\",\"cwd\"],[\"f\",\"file\"],[\"z\",\"gzip\"],[\"P\",\"preservePaths\"],[\"U\",\"unlink\"],[\"strip-components\",\"strip\"],[\"stripComponents\",\"strip\"],[\"keep-newer\",\"newer\"],[\"keepNewer\",\"newer\"],[\"keep-newer-files\",\"newer\"],[\"keepNewerFiles\",\"newer\"],[\"k\",\"keep\"],[\"keep-existing\",\"keep\"],[\"keepExisting\",\"keep\"],[\"m\",\"noMtime\"],[\"no-mtime\",\"noMtime\"],[\"p\",\"preserveOwner\"],[\"L\",\"follow\"],[\"h\",\"follow\"]]);fhe.exports=t=>t?Object.keys(t).map(e=>[uhe.has(e)?uhe.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var PI=_((K4t,Ihe)=>{\"use strict\";var Ahe=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},yit=Ie(\"events\"),phe=Ie(\"stream\"),hhe=Ie(\"string_decoder\").StringDecoder,_p=Symbol(\"EOF\"),Hp=Symbol(\"maybeEmitEnd\"),x0=Symbol(\"emittedEnd\"),UT=Symbol(\"emittingEnd\"),Cv=Symbol(\"emittedError\"),_T=Symbol(\"closed\"),ghe=Symbol(\"read\"),HT=Symbol(\"flush\"),dhe=Symbol(\"flushChunk\"),ul=Symbol(\"encoding\"),jp=Symbol(\"decoder\"),jT=Symbol(\"flowing\"),wv=Symbol(\"paused\"),bI=Symbol(\"resume\"),Ys=Symbol(\"bufferLength\"),Xj=Symbol(\"bufferPush\"),Zj=Symbol(\"bufferShift\"),Ko=Symbol(\"objectMode\"),zo=Symbol(\"destroyed\"),$j=Symbol(\"emitData\"),mhe=Symbol(\"emitEnd\"),e6=Symbol(\"emitEnd2\"),Gp=Symbol(\"async\"),Bv=t=>Promise.resolve().then(t),yhe=global._MP_NO_ITERATOR_SYMBOLS_!==\"1\",Eit=yhe&&Symbol.asyncIterator||Symbol(\"asyncIterator not implemented\"),Iit=yhe&&Symbol.iterator||Symbol(\"iterator not implemented\"),Cit=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",wit=t=>t instanceof ArrayBuffer||typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,Bit=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),GT=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[bI](),r.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},t6=class extends GT{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}};Ihe.exports=class Ehe extends phe{constructor(e){super(),this[jT]=!1,this[wv]=!1,this.pipes=[],this.buffer=[],this[Ko]=e&&e.objectMode||!1,this[Ko]?this[ul]=null:this[ul]=e&&e.encoding||null,this[ul]===\"buffer\"&&(this[ul]=null),this[Gp]=e&&!!e.async||!1,this[jp]=this[ul]?new hhe(this[ul]):null,this[_p]=!1,this[x0]=!1,this[UT]=!1,this[_T]=!1,this[Cv]=null,this.writable=!0,this.readable=!0,this[Ys]=0,this[zo]=!1}get bufferLength(){return this[Ys]}get encoding(){return this[ul]}set encoding(e){if(this[Ko])throw new Error(\"cannot set encoding in objectMode\");if(this[ul]&&e!==this[ul]&&(this[jp]&&this[jp].lastNeed||this[Ys]))throw new Error(\"cannot change encoding\");this[ul]!==e&&(this[jp]=e?new hhe(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[jp].write(r)))),this[ul]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ko]}set objectMode(e){this[Ko]=this[Ko]||!!e}get async(){return this[Gp]}set async(e){this[Gp]=this[Gp]||!!e}write(e,r,s){if(this[_p])throw new Error(\"write after end\");if(this[zo])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[Gp]?Bv:n=>n();return!this[Ko]&&!Buffer.isBuffer(e)&&(Bit(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):wit(e)?e=Buffer.from(e):typeof e!=\"string\"&&(this.objectMode=!0)),this[Ko]?(this.flowing&&this[Ys]!==0&&this[HT](!0),this.flowing?this.emit(\"data\",e):this[Xj](e),this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):e.length?(typeof e==\"string\"&&!(r===this[ul]&&!this[jp].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ul]&&(e=this[jp].write(e)),this.flowing&&this[Ys]!==0&&this[HT](!0),this.flowing?this.emit(\"data\",e):this[Xj](e),this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):(this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing)}read(e){if(this[zo])return null;if(this[Ys]===0||e===0||e>this[Ys])return this[Hp](),null;this[Ko]&&(e=null),this.buffer.length>1&&!this[Ko]&&(this.encoding?this.buffer=[this.buffer.join(\"\")]:this.buffer=[Buffer.concat(this.buffer,this[Ys])]);let r=this[ghe](e||null,this.buffer[0]);return this[Hp](),r}[ghe](e,r){return e===r.length||e===null?this[Zj]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Ys]-=e),this.emit(\"data\",r),!this.buffer.length&&!this[_p]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=null),typeof r==\"function\"&&(s=r,r=\"utf8\"),e&&this.write(e,r),s&&this.once(\"end\",s),this[_p]=!0,this.writable=!1,(this.flowing||!this[wv])&&this[Hp](),this}[bI](){this[zo]||(this[wv]=!1,this[jT]=!0,this.emit(\"resume\"),this.buffer.length?this[HT]():this[_p]?this[Hp]():this.emit(\"drain\"))}resume(){return this[bI]()}pause(){this[jT]=!1,this[wv]=!0}get destroyed(){return this[zo]}get flowing(){return this[jT]}get paused(){return this[wv]}[Xj](e){this[Ko]?this[Ys]+=1:this[Ys]+=e.length,this.buffer.push(e)}[Zj](){return this.buffer.length&&(this[Ko]?this[Ys]-=1:this[Ys]-=this.buffer[0].length),this.buffer.shift()}[HT](e){do;while(this[dhe](this[Zj]()));!e&&!this.buffer.length&&!this[_p]&&this.emit(\"drain\")}[dhe](e){return e?(this.emit(\"data\",e),this.flowing):!1}pipe(e,r){if(this[zo])return;let s=this[x0];return r=r||{},e===Ahe.stdout||e===Ahe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this.pipes.push(r.proxyErrors?new t6(this,e,r):new GT(this,e,r)),this[Gp]?Bv(()=>this[bI]()):this[bI]()),e}unpipe(e){let r=this.pipes.find(s=>s.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);return e===\"data\"&&!this.pipes.length&&!this.flowing?this[bI]():e===\"readable\"&&this[Ys]!==0?super.emit(\"readable\"):Cit(e)&&this[x0]?(super.emit(e),this.removeAllListeners(e)):e===\"error\"&&this[Cv]&&(this[Gp]?Bv(()=>r.call(this,this[Cv])):r.call(this,this[Cv])),s}get emittedEnd(){return this[x0]}[Hp](){!this[UT]&&!this[x0]&&!this[zo]&&this.buffer.length===0&&this[_p]&&(this[UT]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[_T]&&this.emit(\"close\"),this[UT]=!1)}emit(e,r,...s){if(e!==\"error\"&&e!==\"close\"&&e!==zo&&this[zo])return;if(e===\"data\")return r?this[Gp]?Bv(()=>this[$j](r)):this[$j](r):!1;if(e===\"end\")return this[mhe]();if(e===\"close\"){if(this[_T]=!0,!this[x0]&&!this[zo])return;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[Cv]=r;let n=super.emit(\"error\",r);return this[Hp](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[Hp](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...s);return this[Hp](),a}[$j](e){for(let s of this.pipes)s.dest.write(e)===!1&&this.pause();let r=super.emit(\"data\",e);return this[Hp](),r}[mhe](){this[x0]||(this[x0]=!0,this.readable=!1,this[Gp]?Bv(()=>this[e6]()):this[e6]())}[e6](){if(this[jp]){let r=this[jp].end();if(r){for(let s of this.pipes)s.dest.write(r);super.emit(\"data\",r)}}for(let r of this.pipes)r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}collect(){let e=[];this[Ko]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[Ko]||(e.dataLength+=s.length)}),r.then(()=>e)}concat(){return this[Ko]?Promise.reject(new Error(\"cannot concat in objectMode\")):this.collect().then(e=>this[Ko]?Promise.reject(new Error(\"cannot concat in objectMode\")):this[ul]?e.join(\"\"):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(zo,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Eit](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[_p])return Promise.resolve({done:!0});let s=null,a=null,n=h=>{this.removeListener(\"data\",c),this.removeListener(\"end\",f),a(h)},c=h=>{this.removeListener(\"error\",n),this.removeListener(\"end\",f),this.pause(),s({value:h,done:!!this[_p]})},f=()=>{this.removeListener(\"error\",n),this.removeListener(\"data\",c),s({done:!0})},p=()=>n(new Error(\"stream destroyed\"));return new Promise((h,E)=>{a=E,s=h,this.once(zo,p),this.once(\"error\",n),this.once(\"end\",f),this.once(\"data\",c)})}}}[Iit](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[zo]?(e?this.emit(\"error\",e):this.emit(zo),this):(this[zo]=!0,this.buffer.length=0,this[Ys]=0,typeof this.close==\"function\"&&!this[_T]&&this.close(),e?this.emit(\"error\",e):this.emit(zo),this)}static isStream(e){return!!e&&(e instanceof Ehe||e instanceof phe||e instanceof yit&&(typeof e.pipe==\"function\"||typeof e.write==\"function\"&&typeof e.end==\"function\"))}}});var whe=_((z4t,Che)=>{var vit=Ie(\"zlib\").constants||{ZLIB_VERNUM:4736};Che.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},vit))});var m6=_(Kl=>{\"use strict\";var o6=Ie(\"assert\"),k0=Ie(\"buffer\").Buffer,She=Ie(\"zlib\"),fm=Kl.constants=whe(),Sit=PI(),Bhe=k0.concat,Am=Symbol(\"_superWrite\"),kI=class extends Error{constructor(e){super(\"zlib: \"+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code=\"ZLIB_ERROR\"),this.message=\"zlib: \"+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return\"ZlibError\"}},Dit=Symbol(\"opts\"),vv=Symbol(\"flushFlag\"),vhe=Symbol(\"finishFlushFlag\"),d6=Symbol(\"fullFlushFlag\"),Ii=Symbol(\"handle\"),qT=Symbol(\"onError\"),xI=Symbol(\"sawError\"),r6=Symbol(\"level\"),n6=Symbol(\"strategy\"),i6=Symbol(\"ended\"),X4t=Symbol(\"_defaultFullFlush\"),WT=class extends Sit{constructor(e,r){if(!e||typeof e!=\"object\")throw new TypeError(\"invalid options for ZlibBase constructor\");super(e),this[xI]=!1,this[i6]=!1,this[Dit]=e,this[vv]=e.flush,this[vhe]=e.finishFlush;try{this[Ii]=new She[r](e)}catch(s){throw new kI(s)}this[qT]=s=>{this[xI]||(this[xI]=!0,this.close(),this.emit(\"error\",s))},this[Ii].on(\"error\",s=>this[qT](new kI(s))),this.once(\"end\",()=>this.close)}close(){this[Ii]&&(this[Ii].close(),this[Ii]=null,this.emit(\"close\"))}reset(){if(!this[xI])return o6(this[Ii],\"zlib binding closed\"),this[Ii].reset()}flush(e){this.ended||(typeof e!=\"number\"&&(e=this[d6]),this.write(Object.assign(k0.alloc(0),{[vv]:e})))}end(e,r,s){return e&&this.write(e,r),this.flush(this[vhe]),this[i6]=!0,super.end(null,null,s)}get ended(){return this[i6]}write(e,r,s){if(typeof r==\"function\"&&(s=r,r=\"utf8\"),typeof e==\"string\"&&(e=k0.from(e,r)),this[xI])return;o6(this[Ii],\"zlib binding closed\");let a=this[Ii]._handle,n=a.close;a.close=()=>{};let c=this[Ii].close;this[Ii].close=()=>{},k0.concat=h=>h;let f;try{let h=typeof e[vv]==\"number\"?e[vv]:this[vv];f=this[Ii]._processChunk(e,h),k0.concat=Bhe}catch(h){k0.concat=Bhe,this[qT](new kI(h))}finally{this[Ii]&&(this[Ii]._handle=a,a.close=n,this[Ii].close=c,this[Ii].removeAllListeners(\"error\"))}this[Ii]&&this[Ii].on(\"error\",h=>this[qT](new kI(h)));let p;if(f)if(Array.isArray(f)&&f.length>0){p=this[Am](k0.from(f[0]));for(let h=1;h<f.length;h++)p=this[Am](f[h])}else p=this[Am](k0.from(f));return s&&s(),p}[Am](e){return super.write(e)}},qp=class extends WT{constructor(e,r){e=e||{},e.flush=e.flush||fm.Z_NO_FLUSH,e.finishFlush=e.finishFlush||fm.Z_FINISH,super(e,r),this[d6]=fm.Z_FULL_FLUSH,this[r6]=e.level,this[n6]=e.strategy}params(e,r){if(!this[xI]){if(!this[Ii])throw new Error(\"cannot switch params when binding is closed\");if(!this[Ii].params)throw new Error(\"not supported in this implementation\");if(this[r6]!==e||this[n6]!==r){this.flush(fm.Z_SYNC_FLUSH),o6(this[Ii],\"zlib binding closed\");let s=this[Ii].flush;this[Ii].flush=(a,n)=>{this.flush(a),n()};try{this[Ii].params(e,r)}finally{this[Ii].flush=s}this[Ii]&&(this[r6]=e,this[n6]=r)}}}},a6=class extends qp{constructor(e){super(e,\"Deflate\")}},l6=class extends qp{constructor(e){super(e,\"Inflate\")}},s6=Symbol(\"_portable\"),c6=class extends qp{constructor(e){super(e,\"Gzip\"),this[s6]=e&&!!e.portable}[Am](e){return this[s6]?(this[s6]=!1,e[9]=255,super[Am](e)):super[Am](e)}},u6=class extends qp{constructor(e){super(e,\"Gunzip\")}},f6=class extends qp{constructor(e){super(e,\"DeflateRaw\")}},A6=class extends qp{constructor(e){super(e,\"InflateRaw\")}},p6=class extends qp{constructor(e){super(e,\"Unzip\")}},YT=class extends WT{constructor(e,r){e=e||{},e.flush=e.flush||fm.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||fm.BROTLI_OPERATION_FINISH,super(e,r),this[d6]=fm.BROTLI_OPERATION_FLUSH}},h6=class extends YT{constructor(e){super(e,\"BrotliCompress\")}},g6=class extends YT{constructor(e){super(e,\"BrotliDecompress\")}};Kl.Deflate=a6;Kl.Inflate=l6;Kl.Gzip=c6;Kl.Gunzip=u6;Kl.DeflateRaw=f6;Kl.InflateRaw=A6;Kl.Unzip=p6;typeof She.BrotliCompress==\"function\"?(Kl.BrotliCompress=h6,Kl.BrotliDecompress=g6):Kl.BrotliCompress=Kl.BrotliDecompress=class{constructor(){throw new Error(\"Brotli is not supported in this version of Node.js\")}}});var QI=_((e3t,Dhe)=>{var bit=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;Dhe.exports=bit!==\"win32\"?t=>t:t=>t&&t.replace(/\\\\/g,\"/\")});var VT=_((r3t,bhe)=>{\"use strict\";var Pit=PI(),y6=QI(),E6=Symbol(\"slurp\");bhe.exports=class extends Pit{constructor(e,r,s){switch(super(),this.pause(),this.extended=r,this.globalExtended=s,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case\"File\":case\"OldFile\":case\"Link\":case\"SymbolicLink\":case\"CharacterDevice\":case\"BlockDevice\":case\"Directory\":case\"FIFO\":case\"ContiguousFile\":case\"GNUDumpDir\":break;case\"NextFileHasLongLinkpath\":case\"NextFileHasLongPath\":case\"OldGnuLongPath\":case\"GlobalExtendedHeader\":case\"ExtendedHeader\":case\"OldExtendedHeader\":this.meta=!0;break;default:this.ignore=!0}this.path=y6(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=y6(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[E6](r),s&&this[E6](s,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");let s=this.remain,a=this.blockRemain;return this.remain=Math.max(0,s-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:s>=r?super.write(e):super.write(e.slice(0,s))}[E6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=s===\"path\"||s===\"linkpath\"?y6(e[s]):e[s])}}});var I6=_(JT=>{\"use strict\";JT.name=new Map([[\"0\",\"File\"],[\"\",\"OldFile\"],[\"1\",\"Link\"],[\"2\",\"SymbolicLink\"],[\"3\",\"CharacterDevice\"],[\"4\",\"BlockDevice\"],[\"5\",\"Directory\"],[\"6\",\"FIFO\"],[\"7\",\"ContiguousFile\"],[\"g\",\"GlobalExtendedHeader\"],[\"x\",\"ExtendedHeader\"],[\"A\",\"SolarisACL\"],[\"D\",\"GNUDumpDir\"],[\"I\",\"Inode\"],[\"K\",\"NextFileHasLongLinkpath\"],[\"L\",\"NextFileHasLongPath\"],[\"M\",\"ContinuationFile\"],[\"N\",\"OldGnuLongPath\"],[\"S\",\"SparseFile\"],[\"V\",\"TapeVolumeHeader\"],[\"X\",\"OldExtendedHeader\"]]);JT.code=new Map(Array.from(JT.name).map(t=>[t[1],t[0]]))});var Qhe=_((i3t,khe)=>{\"use strict\";var xit=(t,e)=>{if(Number.isSafeInteger(t))t<0?Qit(t,e):kit(t,e);else throw Error(\"cannot encode number outside of javascript safe integer range\");return e},kit=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Qit=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var s=e.length;s>1;s--){var a=t&255;t=Math.floor(t/256),r?e[s-1]=Phe(a):a===0?e[s-1]=0:(r=!0,e[s-1]=xhe(a))}},Tit=t=>{let e=t[0],r=e===128?Fit(t.slice(1,t.length)):e===255?Rit(t):null;if(r===null)throw Error(\"invalid base256 encoding\");if(!Number.isSafeInteger(r))throw Error(\"parsed number outside of javascript safe integer range\");return r},Rit=t=>{for(var e=t.length,r=0,s=!1,a=e-1;a>-1;a--){var n=t[a],c;s?c=Phe(n):n===0?c=n:(s=!0,c=xhe(n)),c!==0&&(r-=c*Math.pow(256,e-a-1))}return r},Fit=t=>{for(var e=t.length,r=0,s=e-1;s>-1;s--){var a=t[s];a!==0&&(r+=a*Math.pow(256,e-s-1))}return r},Phe=t=>(255^t)&255,xhe=t=>(255^t)+1&255;khe.exports={encode:xit,parse:Tit}});var RI=_((s3t,Rhe)=>{\"use strict\";var C6=I6(),TI=Ie(\"path\").posix,The=Qhe(),w6=Symbol(\"slurp\"),zl=Symbol(\"type\"),S6=class{constructor(e,r,s,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[zl]=\"0\",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,s,a):e&&this.set(e)}decode(e,r,s,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");if(this.path=pm(e,r,100),this.mode=Q0(e,r+100,8),this.uid=Q0(e,r+108,8),this.gid=Q0(e,r+116,8),this.size=Q0(e,r+124,12),this.mtime=B6(e,r+136,12),this.cksum=Q0(e,r+148,12),this[w6](s),this[w6](a,!0),this[zl]=pm(e,r+156,1),this[zl]===\"\"&&(this[zl]=\"0\"),this[zl]===\"0\"&&this.path.substr(-1)===\"/\"&&(this[zl]=\"5\"),this[zl]===\"5\"&&(this.size=0),this.linkpath=pm(e,r+157,100),e.slice(r+257,r+265).toString()===\"ustar\\x0000\")if(this.uname=pm(e,r+265,32),this.gname=pm(e,r+297,32),this.devmaj=Q0(e,r+329,8),this.devmin=Q0(e,r+337,8),e[r+475]!==0){let c=pm(e,r+345,155);this.path=c+\"/\"+this.path}else{let c=pm(e,r+345,130);c&&(this.path=c+\"/\"+this.path),this.atime=B6(e,r+476,12),this.ctime=B6(e,r+488,12)}let n=8*32;for(let c=r;c<r+148;c++)n+=e[c];for(let c=r+156;c<r+512;c++)n+=e[c];this.cksumValid=n===this.cksum,this.cksum===null&&n===8*32&&(this.nullBlock=!0)}[w6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=e[s])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");let s=this.ctime||this.atime?130:155,a=Nit(this.path||\"\",s),n=a[0],c=a[1];this.needPax=a[2],this.needPax=hm(e,r,100,n)||this.needPax,this.needPax=T0(e,r+100,8,this.mode)||this.needPax,this.needPax=T0(e,r+108,8,this.uid)||this.needPax,this.needPax=T0(e,r+116,8,this.gid)||this.needPax,this.needPax=T0(e,r+124,12,this.size)||this.needPax,this.needPax=v6(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[zl].charCodeAt(0),this.needPax=hm(e,r+157,100,this.linkpath)||this.needPax,e.write(\"ustar\\x0000\",r+257,8),this.needPax=hm(e,r+265,32,this.uname)||this.needPax,this.needPax=hm(e,r+297,32,this.gname)||this.needPax,this.needPax=T0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=T0(e,r+337,8,this.devmin)||this.needPax,this.needPax=hm(e,r+345,s,c)||this.needPax,e[r+475]!==0?this.needPax=hm(e,r+345,155,c)||this.needPax:(this.needPax=hm(e,r+345,130,c)||this.needPax,this.needPax=v6(e,r+476,12,this.atime)||this.needPax,this.needPax=v6(e,r+488,12,this.ctime)||this.needPax);let f=8*32;for(let p=r;p<r+148;p++)f+=e[p];for(let p=r+156;p<r+512;p++)f+=e[p];return this.cksum=f,T0(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return C6.name.get(this[zl])||this[zl]}get typeKey(){return this[zl]}set type(e){C6.code.has(e)?this[zl]=C6.code.get(e):this[zl]=e}},Nit=(t,e)=>{let s=t,a=\"\",n,c=TI.parse(t).root||\".\";if(Buffer.byteLength(s)<100)n=[s,a,!1];else{a=TI.dirname(s),s=TI.basename(s);do Buffer.byteLength(s)<=100&&Buffer.byteLength(a)<=e?n=[s,a,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(a)<=e?n=[s.substr(0,99),a,!0]:(s=TI.join(TI.basename(a),s),a=TI.dirname(a));while(a!==c&&!n);n||(n=[t.substr(0,99),\"\",!0])}return n},pm=(t,e,r)=>t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*/,\"\"),B6=(t,e,r)=>Oit(Q0(t,e,r)),Oit=t=>t===null?null:new Date(t*1e3),Q0=(t,e,r)=>t[e]&128?The.parse(t.slice(e,e+r)):Mit(t,e,r),Lit=t=>isNaN(t)?null:t,Mit=(t,e,r)=>Lit(parseInt(t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*$/,\"\").trim(),8)),Uit={12:8589934591,8:2097151},T0=(t,e,r,s)=>s===null?!1:s>Uit[r]||s<0?(The.encode(s,t.slice(e,e+r)),!0):(_it(t,e,r,s),!1),_it=(t,e,r,s)=>t.write(Hit(s,r),e,r,\"ascii\"),Hit=(t,e)=>jit(Math.floor(t).toString(8),e),jit=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join(\"0\")+t+\" \")+\"\\0\",v6=(t,e,r,s)=>s===null?!1:T0(t,e,r,s.getTime()/1e3),Git=new Array(156).join(\"\\0\"),hm=(t,e,r,s)=>s===null?!1:(t.write(s+Git,e,r,\"utf8\"),s.length!==Buffer.byteLength(s)||s.length>r);Rhe.exports=S6});var KT=_((o3t,Fhe)=>{\"use strict\";var qit=RI(),Wit=Ie(\"path\"),Sv=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e===\"\")return null;let r=Buffer.byteLength(e),s=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(s);for(let n=0;n<512;n++)a[n]=0;new qit({path:(\"PaxHeader/\"+Wit.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?\"GlobalExtendedHeader\":\"ExtendedHeader\",linkpath:\"\",uname:this.uname||\"\",gname:this.gname||\"\",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,\"utf8\");for(let n=r+512;n<a.length;n++)a[n]=0;return a}encodeBody(){return this.encodeField(\"path\")+this.encodeField(\"ctime\")+this.encodeField(\"atime\")+this.encodeField(\"dev\")+this.encodeField(\"ino\")+this.encodeField(\"nlink\")+this.encodeField(\"charset\")+this.encodeField(\"comment\")+this.encodeField(\"gid\")+this.encodeField(\"gname\")+this.encodeField(\"linkpath\")+this.encodeField(\"mtime\")+this.encodeField(\"size\")+this.encodeField(\"uid\")+this.encodeField(\"uname\")}encodeField(e){if(this[e]===null||this[e]===void 0)return\"\";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],s=\" \"+(e===\"dev\"||e===\"ino\"||e===\"nlink\"?\"SCHILY.\":\"\")+e+\"=\"+r+`\n`,a=Buffer.byteLength(s),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+s}};Sv.parse=(t,e,r)=>new Sv(Yit(Vit(t),e),r);var Yit=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,Vit=t=>t.replace(/\\n$/,\"\").split(`\n`).reduce(Jit,Object.create(null)),Jit=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+\" \").length);let s=e.split(\"=\"),a=s.shift().replace(/^SCHILY\\.(dev|ino|nlink)/,\"$1\");if(!a)return t;let n=s.join(\"=\");return t[a]=/^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Fhe.exports=Sv});var FI=_((a3t,Nhe)=>{Nhe.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)===\"/\";)r=e,e--;return r===-1?t:t.slice(0,r)}});var zT=_((l3t,Ohe)=>{\"use strict\";Ohe.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit(\"warn\",s.tarCode,r,s)):r instanceof Error?this.emit(\"error\",Object.assign(r,s)):this.emit(\"error\",Object.assign(new Error(`${e}: ${r}`),s))}}});var b6=_((u3t,Lhe)=>{\"use strict\";var XT=[\"|\",\"<\",\">\",\"?\",\":\"],D6=XT.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Kit=new Map(XT.map((t,e)=>[t,D6[e]])),zit=new Map(D6.map((t,e)=>[t,XT[e]]));Lhe.exports={encode:t=>XT.reduce((e,r)=>e.split(r).join(Kit.get(r)),t),decode:t=>D6.reduce((e,r)=>e.split(r).join(zit.get(r)),t)}});var P6=_((f3t,Uhe)=>{var{isAbsolute:Xit,parse:Mhe}=Ie(\"path\").win32;Uhe.exports=t=>{let e=\"\",r=Mhe(t);for(;Xit(t)||r.root;){let s=t.charAt(0)===\"/\"&&t.slice(0,4)!==\"//?/\"?\"/\":r.root;t=t.substr(s.length),e+=s,r=Mhe(t)}return[e,t]}});var Hhe=_((A3t,_he)=>{\"use strict\";_he.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var M6=_((g3t,t0e)=>{\"use strict\";var Jhe=PI(),Khe=KT(),zhe=RI(),nA=Ie(\"fs\"),jhe=Ie(\"path\"),rA=QI(),Zit=FI(),Xhe=(t,e)=>e?(t=rA(t).replace(/^\\.(\\/|$)/,\"\"),Zit(e)+\"/\"+t):rA(t),$it=16*1024*1024,Ghe=Symbol(\"process\"),qhe=Symbol(\"file\"),Whe=Symbol(\"directory\"),k6=Symbol(\"symlink\"),Yhe=Symbol(\"hardlink\"),Dv=Symbol(\"header\"),ZT=Symbol(\"read\"),Q6=Symbol(\"lstat\"),$T=Symbol(\"onlstat\"),T6=Symbol(\"onread\"),R6=Symbol(\"onreadlink\"),F6=Symbol(\"openfile\"),N6=Symbol(\"onopenfile\"),R0=Symbol(\"close\"),eR=Symbol(\"mode\"),O6=Symbol(\"awaitDrain\"),x6=Symbol(\"ondrain\"),iA=Symbol(\"prefix\"),Vhe=Symbol(\"hadError\"),Zhe=zT(),est=b6(),$he=P6(),e0e=Hhe(),tR=Zhe(class extends Jhe{constructor(e,r){if(r=r||{},super(r),typeof e!=\"string\")throw new TypeError(\"path is required\");this.path=rA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||\"\",this.maxReadSize=r.maxReadSize||$it,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=rA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?rA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=$he(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform===\"win32\",this.win32&&(this.path=est.decode(this.path.replace(/\\\\/g,\"/\")),e=e.replace(/\\\\/g,\"/\")),this.absolute=rA(r.absolute||jhe.resolve(this.cwd,e)),this.path===\"\"&&(this.path=\"./\"),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[$T](this.statCache.get(this.absolute)):this[Q6]()}emit(e,...r){return e===\"error\"&&(this[Vhe]=!0),super.emit(e,...r)}[Q6](){nA.lstat(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[$T](r)})}[$T](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=rst(e),this.emit(\"stat\",e),this[Ghe]()}[Ghe](){switch(this.type){case\"File\":return this[qhe]();case\"Directory\":return this[Whe]();case\"SymbolicLink\":return this[k6]();default:return this.end()}}[eR](e){return e0e(e,this.type===\"Directory\",this.portable)}[iA](e){return Xhe(e,this.prefix)}[Dv](){this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.header=new zhe({path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,mode:this[eR](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:\"\",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Khe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Whe](){this.path.substr(-1)!==\"/\"&&(this.path+=\"/\"),this.stat.size=0,this[Dv](),this.end()}[k6](){nA.readlink(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[R6](r)})}[R6](e){this.linkpath=rA(e),this[Dv](),this.end()}[Yhe](e){this.type=\"Link\",this.linkpath=rA(jhe.relative(this.cwd,e)),this.stat.size=0,this[Dv](),this.end()}[qhe](){if(this.stat.nlink>1){let e=this.stat.dev+\":\"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Yhe](r)}this.linkCache.set(e,this.absolute)}if(this[Dv](),this.stat.size===0)return this.end();this[F6]()}[F6](){nA.open(this.absolute,\"r\",(e,r)=>{if(e)return this.emit(\"error\",e);this[N6](r)})}[N6](e){if(this.fd=e,this[Vhe])return this[R0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ZT]()}[ZT](){let{fd:e,buf:r,offset:s,length:a,pos:n}=this;nA.read(e,r,s,a,n,(c,f)=>{if(c)return this[R0](()=>this.emit(\"error\",c));this[T6](f)})}[R0](e){nA.close(this.fd,e)}[T6](e){if(e<=0&&this.remain>0){let a=new Error(\"encountered unexpected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[R0](()=>this.emit(\"error\",a))}if(e>this.remain){let a=new Error(\"did not encounter expected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[R0](()=>this.emit(\"error\",a))}if(e===this.remain)for(let a=e;a<this.length&&e<this.blockRemain;a++)this.buf[a+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[x6]():this[O6](()=>this[x6]())}[O6](e){this.once(\"drain\",e)}write(e){if(this.blockRemain<e.length){let r=new Error(\"writing more data than expected\");return r.path=this.absolute,this.emit(\"error\",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[x6](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[R0](e=>e?this.emit(\"error\",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ZT]()}}),L6=class extends tR{[Q6](){this[$T](nA.lstatSync(this.absolute))}[k6](){this[R6](nA.readlinkSync(this.absolute))}[F6](){this[N6](nA.openSync(this.absolute,\"r\"))}[ZT](){let e=!0;try{let{fd:r,buf:s,offset:a,length:n,pos:c}=this,f=nA.readSync(r,s,a,n,c);this[T6](f),e=!1}finally{if(e)try{this[R0](()=>{})}catch{}}}[O6](e){e()}[R0](e){nA.closeSync(this.fd),e()}},tst=Zhe(class extends Jhe{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=rA(e.path),this.mode=this[eR](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=rA(e.linkpath),typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=$he(this.path);a&&(this.path=n,s=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new zhe({path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new Khe({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[iA](e){return Xhe(e,this.prefix)}[eR](e){return e0e(e,this.type===\"Directory\",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});tR.Sync=L6;tR.Tar=tst;var rst=t=>t.isFile()?\"File\":t.isDirectory()?\"Directory\":t.isSymbolicLink()?\"SymbolicLink\":\"Unsupported\";t0e.exports=tR});var uR=_((m3t,l0e)=>{\"use strict\";var lR=class{constructor(e,r){this.path=e||\"./\",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},nst=PI(),ist=m6(),sst=VT(),V6=M6(),ost=V6.Sync,ast=V6.Tar,lst=$x(),r0e=Buffer.alloc(1024),iR=Symbol(\"onStat\"),rR=Symbol(\"ended\"),sA=Symbol(\"queue\"),NI=Symbol(\"current\"),gm=Symbol(\"process\"),nR=Symbol(\"processing\"),n0e=Symbol(\"processJob\"),oA=Symbol(\"jobs\"),U6=Symbol(\"jobDone\"),sR=Symbol(\"addFSEntry\"),i0e=Symbol(\"addTarEntry\"),G6=Symbol(\"stat\"),q6=Symbol(\"readdir\"),oR=Symbol(\"onreaddir\"),aR=Symbol(\"pipe\"),s0e=Symbol(\"entry\"),_6=Symbol(\"entryOpt\"),W6=Symbol(\"writeEntryClass\"),a0e=Symbol(\"write\"),H6=Symbol(\"ondrain\"),cR=Ie(\"fs\"),o0e=Ie(\"path\"),cst=zT(),j6=QI(),J6=cst(class extends nst{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||\"\",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=j6(e.prefix||\"\"),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[W6]=V6,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!=\"object\"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new ist.Gzip(e.gzip),this.zip.on(\"data\",r=>super.write(r)),this.zip.on(\"end\",r=>super.end()),this.zip.on(\"drain\",r=>this[H6]()),this.on(\"resume\",r=>this.zip.resume())):this.on(\"drain\",this[H6]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter==\"function\"?e.filter:r=>!0,this[sA]=new lst,this[oA]=0,this.jobs=+e.jobs||4,this[nR]=!1,this[rR]=!1}[a0e](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[rR]=!0,this[gm](),this}write(e){if(this[rR])throw new Error(\"write after end\");return e instanceof sst?this[i0e](e):this[sR](e),this.flowing}[i0e](e){let r=j6(o0e.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new lR(e.path,r,!1);s.entry=new ast(e,this[_6](s)),s.entry.on(\"end\",a=>this[U6](s)),this[oA]+=1,this[sA].push(s)}this[gm]()}[sR](e){let r=j6(o0e.resolve(this.cwd,e));this[sA].push(new lR(e,r)),this[gm]()}[G6](e){e.pending=!0,this[oA]+=1;let r=this.follow?\"stat\":\"lstat\";cR[r](e.absolute,(s,a)=>{e.pending=!1,this[oA]-=1,s?this.emit(\"error\",s):this[iR](e,a)})}[iR](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[gm]()}[q6](e){e.pending=!0,this[oA]+=1,cR.readdir(e.absolute,(r,s)=>{if(e.pending=!1,this[oA]-=1,r)return this.emit(\"error\",r);this[oR](e,s)})}[oR](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[gm]()}[gm](){if(!this[nR]){this[nR]=!0;for(let e=this[sA].head;e!==null&&this[oA]<this.jobs;e=e.next)if(this[n0e](e.value),e.value.ignore){let r=e.next;this[sA].removeNode(e),e.next=r}this[nR]=!1,this[rR]&&!this[sA].length&&this[oA]===0&&(this.zip?this.zip.end(r0e):(super.write(r0e),super.end()))}}get[NI](){return this[sA]&&this[sA].head&&this[sA].head.value}[U6](e){this[sA].shift(),this[oA]-=1,this[gm]()}[n0e](e){if(!e.pending){if(e.entry){e===this[NI]&&!e.piped&&this[aR](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[iR](e,this.statCache.get(e.absolute)):this[G6](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[oR](e,this.readdirCache.get(e.absolute)):this[q6](e),!e.readdir))){if(e.entry=this[s0e](e),!e.entry){e.ignore=!0;return}e===this[NI]&&!e.piped&&this[aR](e)}}}[_6](e){return{onwarn:(r,s,a)=>this.warn(r,s,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[s0e](e){this[oA]+=1;try{return new this[W6](e.path,this[_6](e)).on(\"end\",()=>this[U6](e)).on(\"error\",r=>this.emit(\"error\",r))}catch(r){this.emit(\"error\",r)}}[H6](){this[NI]&&this[NI].entry&&this[NI].entry.resume()}[aR](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[sR](c+a)});let r=e.entry,s=this.zip;s?r.on(\"data\",a=>{s.write(a)||r.pause()}):r.on(\"data\",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),Y6=class extends J6{constructor(e){super(e),this[W6]=ost}pause(){}resume(){}[G6](e){let r=this.follow?\"statSync\":\"lstatSync\";this[iR](e,cR[r](e.absolute))}[q6](e,r){this[oR](e,cR.readdirSync(e.absolute))}[aR](e){let r=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[sR](c+a)}),s?r.on(\"data\",a=>{s.write(a)}):r.on(\"data\",a=>{super[a0e](a)})}};J6.Sync=Y6;l0e.exports=J6});var GI=_(Pv=>{\"use strict\";var ust=PI(),fst=Ie(\"events\").EventEmitter,fl=Ie(\"fs\"),X6=fl.writev;if(!X6){let t=process.binding(\"fs\"),e=t.FSReqWrap||t.FSReqCallback;X6=(r,s,a,n)=>{let c=(p,h)=>n(p,h,s),f=new e;f.oncomplete=c,t.writeBuffers(r,s,a,f)}}var HI=Symbol(\"_autoClose\"),Yu=Symbol(\"_close\"),bv=Symbol(\"_ended\"),ii=Symbol(\"_fd\"),c0e=Symbol(\"_finished\"),N0=Symbol(\"_flags\"),K6=Symbol(\"_flush\"),Z6=Symbol(\"_handleChunk\"),$6=Symbol(\"_makeBuf\"),gR=Symbol(\"_mode\"),fR=Symbol(\"_needDrain\"),UI=Symbol(\"_onerror\"),jI=Symbol(\"_onopen\"),z6=Symbol(\"_onread\"),LI=Symbol(\"_onwrite\"),O0=Symbol(\"_open\"),Wp=Symbol(\"_path\"),dm=Symbol(\"_pos\"),aA=Symbol(\"_queue\"),MI=Symbol(\"_read\"),u0e=Symbol(\"_readSize\"),F0=Symbol(\"_reading\"),AR=Symbol(\"_remain\"),f0e=Symbol(\"_size\"),pR=Symbol(\"_write\"),OI=Symbol(\"_writing\"),hR=Symbol(\"_defaultFlag\"),_I=Symbol(\"_errored\"),dR=class extends ust{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!=\"string\")throw new TypeError(\"path must be a string\");this[_I]=!1,this[ii]=typeof r.fd==\"number\"?r.fd:null,this[Wp]=e,this[u0e]=r.readSize||16*1024*1024,this[F0]=!1,this[f0e]=typeof r.size==\"number\"?r.size:1/0,this[AR]=this[f0e],this[HI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0,typeof this[ii]==\"number\"?this[MI]():this[O0]()}get fd(){return this[ii]}get path(){return this[Wp]}write(){throw new TypeError(\"this is a readable stream\")}end(){throw new TypeError(\"this is a readable stream\")}[O0](){fl.open(this[Wp],\"r\",(e,r)=>this[jI](e,r))}[jI](e,r){e?this[UI](e):(this[ii]=r,this.emit(\"open\",r),this[MI]())}[$6](){return Buffer.allocUnsafe(Math.min(this[u0e],this[AR]))}[MI](){if(!this[F0]){this[F0]=!0;let e=this[$6]();if(e.length===0)return process.nextTick(()=>this[z6](null,0,e));fl.read(this[ii],e,0,e.length,null,(r,s,a)=>this[z6](r,s,a))}}[z6](e,r,s){this[F0]=!1,e?this[UI](e):this[Z6](r,s)&&this[MI]()}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}[UI](e){this[F0]=!0,this[Yu](),this.emit(\"error\",e)}[Z6](e,r){let s=!1;return this[AR]-=e,e>0&&(s=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[AR]<=0)&&(s=!1,this[Yu](),super.end()),s}emit(e,r){switch(e){case\"prefinish\":case\"finish\":break;case\"drain\":typeof this[ii]==\"number\"&&this[MI]();break;case\"error\":return this[_I]?void 0:(this[_I]=!0,super.emit(e,r));default:return super.emit(e,r)}}},eG=class extends dR{[O0](){let e=!0;try{this[jI](null,fl.openSync(this[Wp],\"r\")),e=!1}finally{e&&this[Yu]()}}[MI](){let e=!0;try{if(!this[F0]){this[F0]=!0;do{let r=this[$6](),s=r.length===0?0:fl.readSync(this[ii],r,0,r.length,null);if(!this[Z6](s,r))break}while(!0);this[F0]=!1}e=!1}finally{e&&this[Yu]()}}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.closeSync(e),this.emit(\"close\")}}},mR=class extends fst{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[_I]=!1,this[OI]=!1,this[bv]=!1,this[fR]=!1,this[aA]=[],this[Wp]=e,this[ii]=typeof r.fd==\"number\"?r.fd:null,this[gR]=r.mode===void 0?438:r.mode,this[dm]=typeof r.start==\"number\"?r.start:null,this[HI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0;let s=this[dm]!==null?\"r+\":\"w\";this[hR]=r.flags===void 0,this[N0]=this[hR]?s:r.flags,this[ii]===null&&this[O0]()}emit(e,r){if(e===\"error\"){if(this[_I])return;this[_I]=!0}return super.emit(e,r)}get fd(){return this[ii]}get path(){return this[Wp]}[UI](e){this[Yu](),this[OI]=!0,this.emit(\"error\",e)}[O0](){fl.open(this[Wp],this[N0],this[gR],(e,r)=>this[jI](e,r))}[jI](e,r){this[hR]&&this[N0]===\"r+\"&&e&&e.code===\"ENOENT\"?(this[N0]=\"w\",this[O0]()):e?this[UI](e):(this[ii]=r,this.emit(\"open\",r),this[K6]())}end(e,r){return e&&this.write(e,r),this[bv]=!0,!this[OI]&&!this[aA].length&&typeof this[ii]==\"number\"&&this[LI](null,0),this}write(e,r){return typeof e==\"string\"&&(e=Buffer.from(e,r)),this[bv]?(this.emit(\"error\",new Error(\"write() after end()\")),!1):this[ii]===null||this[OI]||this[aA].length?(this[aA].push(e),this[fR]=!0,!1):(this[OI]=!0,this[pR](e),!0)}[pR](e){fl.write(this[ii],e,0,e.length,this[dm],(r,s)=>this[LI](r,s))}[LI](e,r){e?this[UI](e):(this[dm]!==null&&(this[dm]+=r),this[aA].length?this[K6]():(this[OI]=!1,this[bv]&&!this[c0e]?(this[c0e]=!0,this[Yu](),this.emit(\"finish\")):this[fR]&&(this[fR]=!1,this.emit(\"drain\"))))}[K6](){if(this[aA].length===0)this[bv]&&this[LI](null,0);else if(this[aA].length===1)this[pR](this[aA].pop());else{let e=this[aA];this[aA]=[],X6(this[ii],e,this[dm],(r,s)=>this[LI](r,s))}}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}},tG=class extends mR{[O0](){let e;if(this[hR]&&this[N0]===\"r+\")try{e=fl.openSync(this[Wp],this[N0],this[gR])}catch(r){if(r.code===\"ENOENT\")return this[N0]=\"w\",this[O0]();throw r}else e=fl.openSync(this[Wp],this[N0],this[gR]);this[jI](null,e)}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.closeSync(e),this.emit(\"close\")}}[pR](e){let r=!0;try{this[LI](null,fl.writeSync(this[ii],e,0,e.length,this[dm])),r=!1}finally{if(r)try{this[Yu]()}catch{}}}};Pv.ReadStream=dR;Pv.ReadStreamSync=eG;Pv.WriteStream=mR;Pv.WriteStreamSync=tG});var vR=_((I3t,y0e)=>{\"use strict\";var Ast=zT(),pst=RI(),hst=Ie(\"events\"),gst=$x(),dst=1024*1024,mst=VT(),A0e=KT(),yst=m6(),rG=Buffer.from([31,139]),Lc=Symbol(\"state\"),mm=Symbol(\"writeEntry\"),Yp=Symbol(\"readEntry\"),nG=Symbol(\"nextEntry\"),p0e=Symbol(\"processEntry\"),Mc=Symbol(\"extendedHeader\"),xv=Symbol(\"globalExtendedHeader\"),L0=Symbol(\"meta\"),h0e=Symbol(\"emitMeta\"),Di=Symbol(\"buffer\"),Vp=Symbol(\"queue\"),ym=Symbol(\"ended\"),g0e=Symbol(\"emittedEnd\"),Em=Symbol(\"emit\"),Al=Symbol(\"unzip\"),yR=Symbol(\"consumeChunk\"),ER=Symbol(\"consumeChunkSub\"),iG=Symbol(\"consumeBody\"),d0e=Symbol(\"consumeMeta\"),m0e=Symbol(\"consumeHeader\"),IR=Symbol(\"consuming\"),sG=Symbol(\"bufferConcat\"),oG=Symbol(\"maybeEnd\"),kv=Symbol(\"writing\"),M0=Symbol(\"aborted\"),CR=Symbol(\"onDone\"),Im=Symbol(\"sawValidEntry\"),wR=Symbol(\"sawNullBlock\"),BR=Symbol(\"sawEOF\"),Est=t=>!0;y0e.exports=Ast(class extends hst{constructor(e){e=e||{},super(e),this.file=e.file||\"\",this[Im]=null,this.on(CR,r=>{(this[Lc]===\"begin\"||this[Im]===!1)&&this.warn(\"TAR_BAD_ARCHIVE\",\"Unrecognized archive format\")}),e.ondone?this.on(CR,e.ondone):this.on(CR,r=>{this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||dst,this.filter=typeof e.filter==\"function\"?e.filter:Est,this.writable=!0,this.readable=!1,this[Vp]=new gst,this[Di]=null,this[Yp]=null,this[mm]=null,this[Lc]=\"begin\",this[L0]=\"\",this[Mc]=null,this[xv]=null,this[ym]=!1,this[Al]=null,this[M0]=!1,this[wR]=!1,this[BR]=!1,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),typeof e.onentry==\"function\"&&this.on(\"entry\",e.onentry)}[m0e](e,r){this[Im]===null&&(this[Im]=!1);let s;try{s=new pst(e,r,this[Mc],this[xv])}catch(a){return this.warn(\"TAR_ENTRY_INVALID\",a)}if(s.nullBlock)this[wR]?(this[BR]=!0,this[Lc]===\"begin\"&&(this[Lc]=\"header\"),this[Em](\"eof\")):(this[wR]=!0,this[Em](\"nullBlock\"));else if(this[wR]=!1,!s.cksumValid)this.warn(\"TAR_ENTRY_INVALID\",\"checksum failure\",{header:s});else if(!s.path)this.warn(\"TAR_ENTRY_INVALID\",\"path is required\",{header:s});else{let a=s.type;if(/^(Symbolic)?Link$/.test(a)&&!s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath required\",{header:s});else if(!/^(Symbolic)?Link$/.test(a)&&s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath forbidden\",{header:s});else{let n=this[mm]=new mst(s,this[Mc],this[xv]);if(!this[Im])if(n.remain){let c=()=>{n.invalid||(this[Im]=!0)};n.on(\"end\",c)}else this[Im]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Em](\"ignoredEntry\",n),this[Lc]=\"ignore\",n.resume()):n.size>0&&(this[L0]=\"\",n.on(\"data\",c=>this[L0]+=c),this[Lc]=\"meta\"):(this[Mc]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Em](\"ignoredEntry\",n),this[Lc]=n.remain?\"ignore\":\"header\",n.resume()):(n.remain?this[Lc]=\"body\":(this[Lc]=\"header\",n.end()),this[Yp]?this[Vp].push(n):(this[Vp].push(n),this[nG]())))}}}[p0e](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Yp]=e,this.emit(\"entry\",e),e.emittedEnd||(e.on(\"end\",s=>this[nG]()),r=!1)):(this[Yp]=null,r=!1),r}[nG](){do;while(this[p0e](this[Vp].shift()));if(!this[Vp].length){let e=this[Yp];!e||e.flowing||e.size===e.remain?this[kv]||this.emit(\"drain\"):e.once(\"drain\",s=>this.emit(\"drain\"))}}[iG](e,r){let s=this[mm],a=s.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return s.write(n),s.blockRemain||(this[Lc]=\"header\",this[mm]=null,s.end()),n.length}[d0e](e,r){let s=this[mm],a=this[iG](e,r);return this[mm]||this[h0e](s),a}[Em](e,r,s){!this[Vp].length&&!this[Yp]?this.emit(e,r,s):this[Vp].push([e,r,s])}[h0e](e){switch(this[Em](\"meta\",this[L0]),e.type){case\"ExtendedHeader\":case\"OldExtendedHeader\":this[Mc]=A0e.parse(this[L0],this[Mc],!1);break;case\"GlobalExtendedHeader\":this[xv]=A0e.parse(this[L0],this[xv],!0);break;case\"NextFileHasLongPath\":case\"OldGnuLongPath\":this[Mc]=this[Mc]||Object.create(null),this[Mc].path=this[L0].replace(/\\0.*/,\"\");break;case\"NextFileHasLongLinkpath\":this[Mc]=this[Mc]||Object.create(null),this[Mc].linkpath=this[L0].replace(/\\0.*/,\"\");break;default:throw new Error(\"unknown meta: \"+e.type)}}abort(e){this[M0]=!0,this.emit(\"abort\",e),this.warn(\"TAR_ABORT\",e,{recoverable:!1})}write(e){if(this[M0])return;if(this[Al]===null&&e){if(this[Di]&&(e=Buffer.concat([this[Di],e]),this[Di]=null),e.length<rG.length)return this[Di]=e,!0;for(let s=0;this[Al]===null&&s<rG.length;s++)e[s]!==rG[s]&&(this[Al]=!1);if(this[Al]===null){let s=this[ym];this[ym]=!1,this[Al]=new yst.Unzip,this[Al].on(\"data\",n=>this[yR](n)),this[Al].on(\"error\",n=>this.abort(n)),this[Al].on(\"end\",n=>{this[ym]=!0,this[yR]()}),this[kv]=!0;let a=this[Al][s?\"end\":\"write\"](e);return this[kv]=!1,a}}this[kv]=!0,this[Al]?this[Al].write(e):this[yR](e),this[kv]=!1;let r=this[Vp].length?!1:this[Yp]?this[Yp].flowing:!0;return!r&&!this[Vp].length&&this[Yp].once(\"drain\",s=>this.emit(\"drain\")),r}[sG](e){e&&!this[M0]&&(this[Di]=this[Di]?Buffer.concat([this[Di],e]):e)}[oG](){if(this[ym]&&!this[g0e]&&!this[M0]&&!this[IR]){this[g0e]=!0;let e=this[mm];if(e&&e.blockRemain){let r=this[Di]?this[Di].length:0;this.warn(\"TAR_BAD_ARCHIVE\",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[Di]&&e.write(this[Di]),e.end()}this[Em](CR)}}[yR](e){if(this[IR])this[sG](e);else if(!e&&!this[Di])this[oG]();else{if(this[IR]=!0,this[Di]){this[sG](e);let r=this[Di];this[Di]=null,this[ER](r)}else this[ER](e);for(;this[Di]&&this[Di].length>=512&&!this[M0]&&!this[BR];){let r=this[Di];this[Di]=null,this[ER](r)}this[IR]=!1}(!this[Di]||this[ym])&&this[oG]()}[ER](e){let r=0,s=e.length;for(;r+512<=s&&!this[M0]&&!this[BR];)switch(this[Lc]){case\"begin\":case\"header\":this[m0e](e,r),r+=512;break;case\"ignore\":case\"body\":r+=this[iG](e,r);break;case\"meta\":r+=this[d0e](e,r);break;default:throw new Error(\"invalid state: \"+this[Lc])}r<s&&(this[Di]?this[Di]=Buffer.concat([e.slice(r),this[Di]]):this[Di]=e.slice(r))}end(e){this[M0]||(this[Al]?this[Al].end(e):(this[ym]=!0,this.write(e)))}})});var SR=_((C3t,w0e)=>{\"use strict\";var Ist=DI(),I0e=vR(),qI=Ie(\"fs\"),Cst=GI(),E0e=Ie(\"path\"),aG=FI();w0e.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=Ist(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&Bst(s,e),s.noResume||wst(s),s.file&&s.sync?vst(s):s.file?Sst(s,r):C0e(s)};var wst=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},Bst=(t,e)=>{let r=new Map(e.map(n=>[aG(n),!0])),s=t.filter,a=(n,c)=>{let f=c||E0e.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(E0e.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(aG(n)):n=>a(aG(n))},vst=t=>{let e=C0e(t),r=t.file,s=!0,a;try{let n=qI.statSync(r),c=t.maxReadSize||16*1024*1024;if(n.size<c)e.end(qI.readFileSync(r));else{let f=0,p=Buffer.allocUnsafe(c);for(a=qI.openSync(r,\"r\");f<n.size;){let h=qI.readSync(a,p,0,c,f);f+=h,e.write(p.slice(0,h))}e.end()}s=!1}finally{if(s&&a)try{qI.closeSync(a)}catch{}}},Sst=(t,e)=>{let r=new I0e(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"end\",c),qI.stat(a,(p,h)=>{if(p)f(p);else{let E=new Cst.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},C0e=t=>new I0e(t)});var P0e=_((w3t,b0e)=>{\"use strict\";var Dst=DI(),DR=uR(),B0e=GI(),v0e=SR(),S0e=Ie(\"path\");b0e.exports=(t,e,r)=>{if(typeof e==\"function\"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");e=Array.from(e);let s=Dst(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return s.file&&s.sync?bst(s,e):s.file?Pst(s,e,r):s.sync?xst(s,e):kst(s,e)};var bst=(t,e)=>{let r=new DR.Sync(t),s=new B0e.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(s),D0e(r,e)},Pst=(t,e,r)=>{let s=new DR(t),a=new B0e.WriteStream(t.file,{mode:t.mode||438});s.pipe(a);let n=new Promise((c,f)=>{a.on(\"error\",f),a.on(\"close\",c),s.on(\"error\",f)});return lG(s,e),r?n.then(r,r):n},D0e=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?v0e({file:S0e.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},lG=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return v0e({file:S0e.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>lG(t,e));t.add(r)}t.end()},xst=(t,e)=>{let r=new DR.Sync(t);return D0e(r,e),r},kst=(t,e)=>{let r=new DR(t);return lG(r,e),r}});var cG=_((B3t,N0e)=>{\"use strict\";var Qst=DI(),x0e=uR(),Xl=Ie(\"fs\"),k0e=GI(),Q0e=SR(),T0e=Ie(\"path\"),R0e=RI();N0e.exports=(t,e,r)=>{let s=Qst(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),s.sync?Tst(s,e):Fst(s,e,r)};var Tst=(t,e)=>{let r=new x0e.Sync(t),s=!0,a,n;try{try{a=Xl.openSync(t.file,\"r+\")}catch(p){if(p.code===\"ENOENT\")a=Xl.openSync(t.file,\"w+\");else throw p}let c=Xl.fstatSync(a),f=Buffer.alloc(512);e:for(n=0;n<c.size;n+=512){for(let E=0,C=0;E<512;E+=C){if(C=Xl.readSync(a,f,E,f.length-E,n+E),n===0&&f[0]===31&&f[1]===139)throw new Error(\"cannot append to compressed archives\");if(!C)break e}let p=new R0e(f);if(!p.cksumValid)break;let h=512*Math.ceil(p.size/512);if(n+h+512>c.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}s=!1,Rst(t,r,n,a,e)}finally{if(s)try{Xl.closeSync(a)}catch{}}},Rst=(t,e,r,s,a)=>{let n=new k0e.WriteStreamSync(t.file,{fd:s,start:r});e.pipe(n),Nst(e,a)},Fst=(t,e,r)=>{e=Array.from(e);let s=new x0e(t),a=(c,f,p)=>{let h=(I,R)=>{I?Xl.close(c,N=>p(I)):p(null,R)},E=0;if(f===0)return h(null,0);let C=0,S=Buffer.alloc(512),P=(I,R)=>{if(I)return h(I);if(C+=R,C<512&&R)return Xl.read(c,S,C,S.length-C,E+C,P);if(E===0&&S[0]===31&&S[1]===139)return h(new Error(\"cannot append to compressed archives\"));if(C<512)return h(null,E);let N=new R0e(S);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>f||(E+=U+512,E>=f))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),C=0,Xl.read(c,S,0,512,E,P)};Xl.read(c,S,0,512,E,P)},n=new Promise((c,f)=>{s.on(\"error\",f);let p=\"r+\",h=(E,C)=>{if(E&&E.code===\"ENOENT\"&&p===\"r+\")return p=\"w+\",Xl.open(t.file,p,h);if(E)return f(E);Xl.fstat(C,(S,P)=>{if(S)return Xl.close(C,()=>f(S));a(C,P.size,(I,R)=>{if(I)return f(I);let N=new k0e.WriteStream(t.file,{fd:C,start:R});s.pipe(N),N.on(\"error\",f),N.on(\"close\",c),F0e(s,e)})})};Xl.open(t.file,p,h)});return r?n.then(r,r):n},Nst=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?Q0e({file:T0e.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},F0e=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return Q0e({file:T0e.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>F0e(t,e));t.add(r)}t.end()}});var L0e=_((v3t,O0e)=>{\"use strict\";var Ost=DI(),Lst=cG();O0e.exports=(t,e,r)=>{let s=Ost(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),Mst(s),Lst(s,e,r)};var Mst=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,s)=>e(r,s)&&!(t.mtimeCache.get(r)>s.mtime):(r,s)=>!(t.mtimeCache.get(r)>s.mtime)}});var _0e=_((S3t,U0e)=>{var{promisify:M0e}=Ie(\"util\"),U0=Ie(\"fs\"),Ust=t=>{if(!t)t={mode:511,fs:U0};else if(typeof t==\"object\")t={mode:511,fs:U0,...t};else if(typeof t==\"number\")t={mode:t,fs:U0};else if(typeof t==\"string\")t={mode:parseInt(t,8),fs:U0};else throw new TypeError(\"invalid options argument\");return t.mkdir=t.mkdir||t.fs.mkdir||U0.mkdir,t.mkdirAsync=M0e(t.mkdir),t.stat=t.stat||t.fs.stat||U0.stat,t.statAsync=M0e(t.stat),t.statSync=t.statSync||t.fs.statSync||U0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||U0.mkdirSync,t};U0e.exports=Ust});var j0e=_((D3t,H0e)=>{var _st=process.platform,{resolve:Hst,parse:jst}=Ie(\"path\"),Gst=t=>{if(/\\0/.test(t))throw Object.assign(new TypeError(\"path must be a string without null bytes\"),{path:t,code:\"ERR_INVALID_ARG_VALUE\"});if(t=Hst(t),_st===\"win32\"){let e=/[*|\"<>?:]/,{root:r}=jst(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error(\"Illegal characters in path.\"),{path:t,code:\"EINVAL\"})}return t};H0e.exports=Gst});var V0e=_((b3t,Y0e)=>{var{dirname:G0e}=Ie(\"path\"),q0e=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?r:void 0,s=>s.code===\"ENOENT\"?q0e(t,G0e(e),e):void 0),W0e=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(s){return s.code===\"ENOENT\"?W0e(t,G0e(e),e):void 0}};Y0e.exports={findMade:q0e,findMadeSync:W0e}});var AG=_((P3t,K0e)=>{var{dirname:J0e}=Ie(\"path\"),uG=(t,e,r)=>{e.recursive=!1;let s=J0e(t);return s===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!==\"EISDIR\")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code===\"ENOENT\")return uG(s,e).then(n=>uG(t,e,n));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},fG=(t,e,r)=>{let s=J0e(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!==\"EISDIR\")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code===\"ENOENT\")return fG(t,e,fG(s,e,r));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};K0e.exports={mkdirpManual:uG,mkdirpManualSync:fG}});var Z0e=_((x3t,X0e)=>{var{dirname:z0e}=Ie(\"path\"),{findMade:qst,findMadeSync:Wst}=V0e(),{mkdirpManual:Yst,mkdirpManualSync:Vst}=AG(),Jst=(t,e)=>(e.recursive=!0,z0e(t)===t?e.mkdirAsync(t,e):qst(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(a=>{if(a.code===\"ENOENT\")return Yst(t,e);throw a}))),Kst=(t,e)=>{if(e.recursive=!0,z0e(t)===t)return e.mkdirSync(t,e);let s=Wst(e,t);try{return e.mkdirSync(t,e),s}catch(a){if(a.code===\"ENOENT\")return Vst(t,e);throw a}};X0e.exports={mkdirpNative:Jst,mkdirpNativeSync:Kst}});var rge=_((k3t,tge)=>{var $0e=Ie(\"fs\"),zst=process.version,pG=zst.replace(/^v/,\"\").split(\".\"),ege=+pG[0]>10||+pG[0]==10&&+pG[1]>=12,Xst=ege?t=>t.mkdir===$0e.mkdir:()=>!1,Zst=ege?t=>t.mkdirSync===$0e.mkdirSync:()=>!1;tge.exports={useNative:Xst,useNativeSync:Zst}});var lge=_((Q3t,age)=>{var WI=_0e(),YI=j0e(),{mkdirpNative:nge,mkdirpNativeSync:ige}=Z0e(),{mkdirpManual:sge,mkdirpManualSync:oge}=AG(),{useNative:$st,useNativeSync:eot}=rge(),VI=(t,e)=>(t=YI(t),e=WI(e),$st(e)?nge(t,e):sge(t,e)),tot=(t,e)=>(t=YI(t),e=WI(e),eot(e)?ige(t,e):oge(t,e));VI.sync=tot;VI.native=(t,e)=>nge(YI(t),WI(e));VI.manual=(t,e)=>sge(YI(t),WI(e));VI.nativeSync=(t,e)=>ige(YI(t),WI(e));VI.manualSync=(t,e)=>oge(YI(t),WI(e));age.exports=VI});var gge=_((T3t,hge)=>{\"use strict\";var Uc=Ie(\"fs\"),Cm=Ie(\"path\"),rot=Uc.lchown?\"lchown\":\"chown\",not=Uc.lchownSync?\"lchownSync\":\"chownSync\",uge=Uc.lchown&&!process.version.match(/v1[1-9]+\\./)&&!process.version.match(/v10\\.[6-9]/),cge=(t,e,r)=>{try{return Uc[not](t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},iot=(t,e,r)=>{try{return Uc.chownSync(t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},sot=uge?(t,e,r,s)=>a=>{!a||a.code!==\"EISDIR\"?s(a):Uc.chown(t,e,r,s)}:(t,e,r,s)=>s,hG=uge?(t,e,r)=>{try{return cge(t,e,r)}catch(s){if(s.code!==\"EISDIR\")throw s;iot(t,e,r)}}:(t,e,r)=>cge(t,e,r),oot=process.version,fge=(t,e,r)=>Uc.readdir(t,e,r),aot=(t,e)=>Uc.readdirSync(t,e);/^v4\\./.test(oot)&&(fge=(t,e,r)=>Uc.readdir(t,r));var bR=(t,e,r,s)=>{Uc[rot](t,e,r,sot(t,e,r,a=>{s(a&&a.code!==\"ENOENT\"?a:null)}))},Age=(t,e,r,s,a)=>{if(typeof e==\"string\")return Uc.lstat(Cm.resolve(t,e),(n,c)=>{if(n)return a(n.code!==\"ENOENT\"?n:null);c.name=e,Age(t,c,r,s,a)});if(e.isDirectory())gG(Cm.resolve(t,e.name),r,s,n=>{if(n)return a(n);let c=Cm.resolve(t,e.name);bR(c,r,s,a)});else{let n=Cm.resolve(t,e.name);bR(n,r,s,a)}},gG=(t,e,r,s)=>{fge(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code===\"ENOENT\")return s();if(a.code!==\"ENOTDIR\"&&a.code!==\"ENOTSUP\")return s(a)}if(a||!n.length)return bR(t,e,r,s);let c=n.length,f=null,p=h=>{if(!f){if(h)return s(f=h);if(--c===0)return bR(t,e,r,s)}};n.forEach(h=>Age(t,h,e,r,p))})},lot=(t,e,r,s)=>{if(typeof e==\"string\")try{let a=Uc.lstatSync(Cm.resolve(t,e));a.name=e,e=a}catch(a){if(a.code===\"ENOENT\")return;throw a}e.isDirectory()&&pge(Cm.resolve(t,e.name),r,s),hG(Cm.resolve(t,e.name),r,s)},pge=(t,e,r)=>{let s;try{s=aot(t,{withFileTypes:!0})}catch(a){if(a.code===\"ENOENT\")return;if(a.code===\"ENOTDIR\"||a.code===\"ENOTSUP\")return hG(t,e,r);throw a}return s&&s.length&&s.forEach(a=>lot(t,a,e,r)),hG(t,e,r)};hge.exports=gG;gG.sync=pge});var Ege=_((R3t,dG)=>{\"use strict\";var dge=lge(),_c=Ie(\"fs\"),PR=Ie(\"path\"),mge=gge(),Vu=QI(),xR=class extends Error{constructor(e,r){super(\"Cannot extract through symbolic link\"),this.path=r,this.symlink=e}get name(){return\"SylinkError\"}},kR=class extends Error{constructor(e,r){super(r+\": Cannot cd into '\"+e+\"'\"),this.path=e,this.code=r}get name(){return\"CwdError\"}},QR=(t,e)=>t.get(Vu(e)),Qv=(t,e,r)=>t.set(Vu(e),r),cot=(t,e)=>{_c.stat(t,(r,s)=>{(r||!s.isDirectory())&&(r=new kR(t,r&&r.code||\"ENOTDIR\")),e(r)})};dG.exports=(t,e,r)=>{t=Vu(t);let s=e.umask,a=e.mode|448,n=(a&s)!==0,c=e.uid,f=e.gid,p=typeof c==\"number\"&&typeof f==\"number\"&&(c!==e.processUid||f!==e.processGid),h=e.preserve,E=e.unlink,C=e.cache,S=Vu(e.cwd),P=(N,U)=>{N?r(N):(Qv(C,t,!0),U&&p?mge(U,c,f,W=>P(W)):n?_c.chmod(t,a,r):r())};if(C&&QR(C,t)===!0)return P();if(t===S)return cot(t,P);if(h)return dge(t,{mode:a}).then(N=>P(null,N),P);let R=Vu(PR.relative(S,t)).split(\"/\");TR(S,R,a,C,E,S,null,P)};var TR=(t,e,r,s,a,n,c,f)=>{if(!e.length)return f(null,c);let p=e.shift(),h=Vu(PR.resolve(t+\"/\"+p));if(QR(s,h))return TR(h,e,r,s,a,n,c,f);_c.mkdir(h,r,yge(h,e,r,s,a,n,c,f))},yge=(t,e,r,s,a,n,c,f)=>p=>{p?_c.lstat(t,(h,E)=>{if(h)h.path=h.path&&Vu(h.path),f(h);else if(E.isDirectory())TR(t,e,r,s,a,n,c,f);else if(a)_c.unlink(t,C=>{if(C)return f(C);_c.mkdir(t,r,yge(t,e,r,s,a,n,c,f))});else{if(E.isSymbolicLink())return f(new xR(t,t+\"/\"+e.join(\"/\")));f(p)}}):(c=c||t,TR(t,e,r,s,a,n,c,f))},uot=t=>{let e=!1,r=\"ENOTDIR\";try{e=_c.statSync(t).isDirectory()}catch(s){r=s.code}finally{if(!e)throw new kR(t,r)}};dG.exports.sync=(t,e)=>{t=Vu(t);let r=e.umask,s=e.mode|448,a=(s&r)!==0,n=e.uid,c=e.gid,f=typeof n==\"number\"&&typeof c==\"number\"&&(n!==e.processUid||c!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,C=Vu(e.cwd),S=N=>{Qv(E,t,!0),N&&f&&mge.sync(N,n,c),a&&_c.chmodSync(t,s)};if(E&&QR(E,t)===!0)return S();if(t===C)return uot(C),S();if(p)return S(dge.sync(t,s));let I=Vu(PR.relative(C,t)).split(\"/\"),R=null;for(let N=I.shift(),U=C;N&&(U+=\"/\"+N);N=I.shift())if(U=Vu(PR.resolve(U)),!QR(E,U))try{_c.mkdirSync(U,s),R=R||U,Qv(E,U,!0)}catch{let ee=_c.lstatSync(U);if(ee.isDirectory()){Qv(E,U,!0);continue}else if(h){_c.unlinkSync(U),_c.mkdirSync(U,s),R=R||U,Qv(E,U,!0);continue}else if(ee.isSymbolicLink())return new xR(U,U+\"/\"+I.join(\"/\"))}return S(R)}});var yG=_((F3t,Ige)=>{var mG=Object.create(null),{hasOwnProperty:fot}=Object.prototype;Ige.exports=t=>(fot.call(mG,t)||(mG[t]=t.normalize(\"NFKD\")),mG[t])});var vge=_((N3t,Bge)=>{var Cge=Ie(\"assert\"),Aot=yG(),pot=FI(),{join:wge}=Ie(\"path\"),hot=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,got=hot===\"win32\";Bge.exports=()=>{let t=new Map,e=new Map,r=h=>h.split(\"/\").slice(0,-1).reduce((C,S)=>(C.length&&(S=wge(C[C.length-1],S)),C.push(S||\"/\"),C),[]),s=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error(\"function does not have any path reservations\");return{paths:E.paths.map(C=>t.get(C)),dirs:[...E.dirs].map(C=>t.get(C))}},n=h=>{let{paths:E,dirs:C}=a(h);return E.every(S=>S[0]===h)&&C.every(S=>S[0]instanceof Set&&S[0].has(h))},c=h=>s.has(h)||!n(h)?!1:(s.add(h),h(()=>f(h)),!0),f=h=>{if(!s.has(h))return!1;let{paths:E,dirs:C}=e.get(h),S=new Set;return E.forEach(P=>{let I=t.get(P);Cge.equal(I[0],h),I.length===1?t.delete(P):(I.shift(),typeof I[0]==\"function\"?S.add(I[0]):I[0].forEach(R=>S.add(R)))}),C.forEach(P=>{let I=t.get(P);Cge(I[0]instanceof Set),I[0].size===1&&I.length===1?t.delete(P):I[0].size===1?(I.shift(),S.add(I[0])):I[0].delete(h)}),s.delete(h),S.forEach(P=>c(P)),!0};return{check:n,reserve:(h,E)=>{h=got?[\"win32 parallelization disabled\"]:h.map(S=>Aot(pot(wge(S))).toLowerCase());let C=new Set(h.map(S=>r(S)).reduce((S,P)=>S.concat(P)));return e.set(E,{dirs:C,paths:h}),h.forEach(S=>{let P=t.get(S);P?P.push(E):t.set(S,[E])}),C.forEach(S=>{let P=t.get(S);P?P[P.length-1]instanceof Set?P[P.length-1].add(E):P.push(new Set([E])):t.set(S,[new Set([E])])}),c(E)}}}});var bge=_((O3t,Dge)=>{var dot=process.platform,mot=dot===\"win32\",yot=global.__FAKE_TESTING_FS__||Ie(\"fs\"),{O_CREAT:Eot,O_TRUNC:Iot,O_WRONLY:Cot,UV_FS_O_FILEMAP:Sge=0}=yot.constants,wot=mot&&!!Sge,Bot=512*1024,vot=Sge|Iot|Eot|Cot;Dge.exports=wot?t=>t<Bot?vot:\"w\":()=>\"w\"});var bG=_((L3t,Hge)=>{\"use strict\";var Sot=Ie(\"assert\"),Dot=vR(),Mn=Ie(\"fs\"),bot=GI(),Jp=Ie(\"path\"),Mge=Ege(),Pge=b6(),Pot=vge(),xot=P6(),Zl=QI(),kot=FI(),Qot=yG(),xge=Symbol(\"onEntry\"),CG=Symbol(\"checkFs\"),kge=Symbol(\"checkFs2\"),NR=Symbol(\"pruneCache\"),wG=Symbol(\"isReusable\"),Hc=Symbol(\"makeFs\"),BG=Symbol(\"file\"),vG=Symbol(\"directory\"),OR=Symbol(\"link\"),Qge=Symbol(\"symlink\"),Tge=Symbol(\"hardlink\"),Rge=Symbol(\"unsupported\"),Fge=Symbol(\"checkPath\"),_0=Symbol(\"mkdir\"),Xo=Symbol(\"onError\"),RR=Symbol(\"pending\"),Nge=Symbol(\"pend\"),JI=Symbol(\"unpend\"),EG=Symbol(\"ended\"),IG=Symbol(\"maybeClose\"),SG=Symbol(\"skip\"),Tv=Symbol(\"doChown\"),Rv=Symbol(\"uid\"),Fv=Symbol(\"gid\"),Nv=Symbol(\"checkedCwd\"),Uge=Ie(\"crypto\"),_ge=bge(),Tot=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Ov=Tot===\"win32\",Rot=(t,e)=>{if(!Ov)return Mn.unlink(t,e);let r=t+\".DELETE.\"+Uge.randomBytes(16).toString(\"hex\");Mn.rename(t,r,s=>{if(s)return e(s);Mn.unlink(r,e)})},Fot=t=>{if(!Ov)return Mn.unlinkSync(t);let e=t+\".DELETE.\"+Uge.randomBytes(16).toString(\"hex\");Mn.renameSync(t,e),Mn.unlinkSync(e)},Oge=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,Lge=t=>Qot(kot(Zl(t))).toLowerCase(),Not=(t,e)=>{e=Lge(e);for(let r of t.keys()){let s=Lge(r);(s===e||s.indexOf(e+\"/\")===0)&&t.delete(r)}},Oot=t=>{for(let e of t.keys())t.delete(e)},Lv=class extends Dot{constructor(e){if(e||(e={}),e.ondone=r=>{this[EG]=!0,this[IG]()},super(e),this[Nv]=!1,this.reservations=Pot(),this.transform=typeof e.transform==\"function\"?e.transform:null,this.writable=!0,this.readable=!1,this[RR]=0,this[EG]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid==\"number\"||typeof e.gid==\"number\"){if(typeof e.uid!=\"number\"||typeof e.gid!=\"number\")throw new TypeError(\"cannot set owner without number uid and gid\");if(e.preserveOwner)throw new TypeError(\"cannot preserve owner in archive and also set owner explicitly\");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!=\"number\"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Ov,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=Zl(Jp.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask==\"number\"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on(\"entry\",r=>this[xge](r))}warn(e,r,s={}){return(e===\"TAR_BAD_ARCHIVE\"||e===\"TAR_ABORT\")&&(s.recoverable=!1),super.warn(e,r,s)}[IG](){this[EG]&&this[RR]===0&&(this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\"))}[Fge](e){if(this.strip){let r=Zl(e.path).split(\"/\");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join(\"/\"),e.type===\"Link\"){let s=Zl(e.linkpath).split(\"/\");if(s.length>=this.strip)e.linkpath=s.slice(this.strip).join(\"/\");else return!1}}if(!this.preservePaths){let r=Zl(e.path),s=r.split(\"/\");if(s.includes(\"..\")||Ov&&/^[a-z]:\\.\\.$/i.test(s[0]))return this.warn(\"TAR_ENTRY_ERROR\",\"path contains '..'\",{entry:e,path:r}),!1;let[a,n]=xot(r);a&&(e.path=n,this.warn(\"TAR_ENTRY_INFO\",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(Jp.isAbsolute(e.path)?e.absolute=Zl(Jp.resolve(e.path)):e.absolute=Zl(Jp.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+\"/\")!==0&&e.absolute!==this.cwd)return this.warn(\"TAR_ENTRY_ERROR\",\"path escaped extraction target\",{entry:e,path:Zl(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!==\"Directory\"&&e.type!==\"GNUDumpDir\")return!1;if(this.win32){let{root:r}=Jp.win32.parse(e.absolute);e.absolute=r+Pge.encode(e.absolute.substr(r.length));let{root:s}=Jp.win32.parse(e.path);e.path=s+Pge.encode(e.path.substr(s.length))}return!0}[xge](e){if(!this[Fge](e))return e.resume();switch(Sot.equal(typeof e.absolute,\"string\"),e.type){case\"Directory\":case\"GNUDumpDir\":e.mode&&(e.mode=e.mode|448);case\"File\":case\"OldFile\":case\"ContiguousFile\":case\"Link\":case\"SymbolicLink\":return this[CG](e);case\"CharacterDevice\":case\"BlockDevice\":case\"FIFO\":default:return this[Rge](e)}}[Xo](e,r){e.name===\"CwdError\"?this.emit(\"error\",e):(this.warn(\"TAR_ENTRY_ERROR\",e,{entry:r}),this[JI](),r.resume())}[_0](e,r,s){Mge(Zl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},s)}[Tv](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==\"number\"&&e.uid!==this.processUid||typeof e.gid==\"number\"&&e.gid!==this.processGid)||typeof this.uid==\"number\"&&this.uid!==this.processUid||typeof this.gid==\"number\"&&this.gid!==this.processGid}[Rv](e){return Oge(this.uid,e.uid,this.processUid)}[Fv](e){return Oge(this.gid,e.gid,this.processGid)}[BG](e,r){let s=e.mode&4095||this.fmode,a=new bot.WriteStream(e.absolute,{flags:_ge(e.size),mode:s,autoClose:!1});a.on(\"error\",p=>{a.fd&&Mn.close(a.fd,()=>{}),a.write=()=>!0,this[Xo](p,e),r()});let n=1,c=p=>{if(p){a.fd&&Mn.close(a.fd,()=>{}),this[Xo](p,e),r();return}--n===0&&Mn.close(a.fd,h=>{h?this[Xo](h,e):this[JI](),r()})};a.on(\"finish\",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let C=e.atime||new Date,S=e.mtime;Mn.futimes(E,C,S,P=>P?Mn.utimes(h,C,S,I=>c(I&&P)):c())}if(this[Tv](e)){n++;let C=this[Rv](e),S=this[Fv](e);Mn.fchown(E,C,S,P=>P?Mn.chown(h,C,S,I=>c(I&&P)):c())}c()});let f=this.transform&&this.transform(e)||e;f!==e&&(f.on(\"error\",p=>{this[Xo](p,e),r()}),e.pipe(f)),f.pipe(a)}[vG](e,r){let s=e.mode&4095||this.dmode;this[_0](e.absolute,s,a=>{if(a){this[Xo](a,e),r();return}let n=1,c=f=>{--n===0&&(r(),this[JI](),e.resume())};e.mtime&&!this.noMtime&&(n++,Mn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[Tv](e)&&(n++,Mn.chown(e.absolute,this[Rv](e),this[Fv](e),c)),c()})}[Rge](e){e.unsupported=!0,this.warn(\"TAR_ENTRY_UNSUPPORTED\",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Qge](e,r){this[OR](e,e.linkpath,\"symlink\",r)}[Tge](e,r){let s=Zl(Jp.resolve(this.cwd,e.linkpath));this[OR](e,s,\"link\",r)}[Nge](){this[RR]++}[JI](){this[RR]--,this[IG]()}[SG](e){this[JI](),e.resume()}[wG](e,r){return e.type===\"File\"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Ov}[CG](e){this[Nge]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,s=>this[kge](e,s))}[NR](e){e.type===\"SymbolicLink\"?Oot(this.dirCache):e.type!==\"Directory\"&&Not(this.dirCache,e.absolute)}[kge](e,r){this[NR](e);let s=f=>{this[NR](e),r(f)},a=()=>{this[_0](this.cwd,this.dmode,f=>{if(f){this[Xo](f,e),s();return}this[Nv]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let f=Zl(Jp.dirname(e.absolute));if(f!==this.cwd)return this[_0](f,this.dmode,p=>{if(p){this[Xo](p,e),s();return}c()})}c()},c=()=>{Mn.lstat(e.absolute,(f,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[SG](e),s();return}if(f||this[wG](e,p))return this[Hc](null,e,s);if(p.isDirectory()){if(e.type===\"Directory\"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=C=>this[Hc](C,e,s);return h?Mn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return Mn.rmdir(e.absolute,h=>this[Hc](h,e,s))}if(e.absolute===this.cwd)return this[Hc](null,e,s);Rot(e.absolute,h=>this[Hc](h,e,s))})};this[Nv]?n():a()}[Hc](e,r,s){if(e){this[Xo](e,r),s();return}switch(r.type){case\"File\":case\"OldFile\":case\"ContiguousFile\":return this[BG](r,s);case\"Link\":return this[Tge](r,s);case\"SymbolicLink\":return this[Qge](r,s);case\"Directory\":case\"GNUDumpDir\":return this[vG](r,s)}}[OR](e,r,s,a){Mn[s](r,e.absolute,n=>{n?this[Xo](n,e):(this[JI](),e.resume()),a()})}},FR=t=>{try{return[null,t()]}catch(e){return[e,null]}},DG=class extends Lv{[Hc](e,r){return super[Hc](e,r,()=>{})}[CG](e){if(this[NR](e),!this[Nv]){let n=this[_0](this.cwd,this.dmode);if(n)return this[Xo](n,e);this[Nv]=!0}if(e.absolute!==this.cwd){let n=Zl(Jp.dirname(e.absolute));if(n!==this.cwd){let c=this[_0](n,this.dmode);if(c)return this[Xo](c,e)}}let[r,s]=FR(()=>Mn.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[SG](e);if(r||this[wG](e,s))return this[Hc](null,e);if(s.isDirectory()){if(e.type===\"Directory\"){let c=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[f]=c?FR(()=>{Mn.chmodSync(e.absolute,e.mode)}):[];return this[Hc](f,e)}let[n]=FR(()=>Mn.rmdirSync(e.absolute));this[Hc](n,e)}let[a]=e.absolute===this.cwd?[]:FR(()=>Fot(e.absolute));this[Hc](a,e)}[BG](e,r){let s=e.mode&4095||this.fmode,a=f=>{let p;try{Mn.closeSync(n)}catch(h){p=h}(f||p)&&this[Xo](f||p,e),r()},n;try{n=Mn.openSync(e.absolute,_ge(e.size),s)}catch(f){return a(f)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on(\"error\",f=>this[Xo](f,e)),e.pipe(c)),c.on(\"data\",f=>{try{Mn.writeSync(n,f,0,f.length)}catch(p){a(p)}}),c.on(\"end\",f=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{Mn.futimesSync(n,h,E)}catch(C){try{Mn.utimesSync(e.absolute,h,E)}catch{p=C}}}if(this[Tv](e)){let h=this[Rv](e),E=this[Fv](e);try{Mn.fchownSync(n,h,E)}catch(C){try{Mn.chownSync(e.absolute,h,E)}catch{p=p||C}}}a(p)})}[vG](e,r){let s=e.mode&4095||this.dmode,a=this[_0](e.absolute,s);if(a){this[Xo](a,e),r();return}if(e.mtime&&!this.noMtime)try{Mn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Tv](e))try{Mn.chownSync(e.absolute,this[Rv](e),this[Fv](e))}catch{}r(),e.resume()}[_0](e,r){try{return Mge.sync(Zl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(s){return s}}[OR](e,r,s,a){try{Mn[s+\"Sync\"](r,e.absolute),a(),e.resume()}catch(n){return this[Xo](n,e)}}};Lv.Sync=DG;Hge.exports=Lv});var Yge=_((M3t,Wge)=>{\"use strict\";var Lot=DI(),LR=bG(),Gge=Ie(\"fs\"),qge=GI(),jge=Ie(\"path\"),PG=FI();Wge.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=Lot(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&Mot(s,e),s.file&&s.sync?Uot(s):s.file?_ot(s,r):s.sync?Hot(s):jot(s)};var Mot=(t,e)=>{let r=new Map(e.map(n=>[PG(n),!0])),s=t.filter,a=(n,c)=>{let f=c||jge.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(jge.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(PG(n)):n=>a(PG(n))},Uot=t=>{let e=new LR.Sync(t),r=t.file,s=Gge.statSync(r),a=t.maxReadSize||16*1024*1024;new qge.ReadStreamSync(r,{readSize:a,size:s.size}).pipe(e)},_ot=(t,e)=>{let r=new LR(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"close\",c),Gge.stat(a,(p,h)=>{if(p)f(p);else{let E=new qge.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},Hot=t=>new LR.Sync(t),jot=t=>new LR(t)});var Vge=_(Ps=>{\"use strict\";Ps.c=Ps.create=P0e();Ps.r=Ps.replace=cG();Ps.t=Ps.list=SR();Ps.u=Ps.update=L0e();Ps.x=Ps.extract=Yge();Ps.Pack=uR();Ps.Unpack=bG();Ps.Parse=vR();Ps.ReadEntry=VT();Ps.WriteEntry=M6();Ps.Header=RI();Ps.Pax=KT();Ps.types=I6()});var xG,Jge,H0,Mv,Uv,Kge=Xe(()=>{xG=ut(Ld()),Jge=Ie(\"worker_threads\"),H0=Symbol(\"kTaskInfo\"),Mv=class{constructor(e,r){this.fn=e;this.limit=(0,xG.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},Uv=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,xG.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let s=this.workers.pop();s?s.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new Jge.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,\"--unhandled-rejections=strict\"]});return e.on(\"message\",r=>{if(!e[H0])throw new Error(\"Assertion failed: Worker sent a result without having a task assigned\");e[H0].resolve(r),e[H0]=null,e.unref(),this.workers.push(e)}),e.on(\"error\",r=>{e[H0]?.reject(r),e[H0]=null}),e.on(\"exit\",r=>{r!==0&&e[H0]?.reject(new Error(`Worker exited with code ${r}`)),e[H0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((s,a)=>{r[H0]={resolve:s,reject:a},r.postMessage(e)})})}}});var Xge=_((j3t,zge)=>{var kG;zge.exports.getContent=()=>(typeof kG>\"u\"&&(kG=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),kG)});var ps={};Vt(ps,{convertToZip:()=>Yot,convertToZipWorker:()=>RG,extractArchiveTo:()=>rde,getDefaultTaskPool:()=>ede,getTaskPoolForConfiguration:()=>tde,makeArchiveFromDirectory:()=>Wot});function Got(t,e){switch(t){case\"async\":return new Mv(RG,{poolSize:e});case\"workers\":return new Uv((0,TG.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function ede(){return typeof QG>\"u\"&&(QG=Got(\"workers\",Ui.availableParallelism())),QG}function tde(t){return typeof t>\"u\"?ede():Yl(qot,t,()=>{let e=t.get(\"taskPoolMode\"),r=t.get(\"taskPoolConcurrency\");switch(e){case\"async\":return new Mv(RG,{poolSize:r});case\"workers\":return new Uv((0,TG.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function RG(t){let{tmpFile:e,tgz:r,compressionLevel:s,extractBufferOpts:a}=t,n=new As(e,{create:!0,level:s,stats:$a.makeDefaultStats()}),c=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await rde(c,n,a),n.saveAndClose(),e}async function Wot(t,{baseFs:e=new Yn,prefixPath:r=vt.root,compressionLevel:s,inMemory:a=!1}={}){let n;if(a)n=new As(null,{level:s});else{let f=await ce.mktempPromise(),p=J.join(f,\"archive.zip\");n=new As(p,{create:!0,level:s})}let c=J.resolve(vt.root,r);return await n.copyPromise(c,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function Yot(t,e={}){let r=await ce.mktempPromise(),s=J.join(r,\"archive.zip\"),a=e.compressionLevel??e.configuration?.get(\"compressionLevel\")??\"mixed\",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??tde(e.configuration)).run({tmpFile:s,tgz:t,compressionLevel:a,extractBufferOpts:n}),new As(s,{level:e.compressionLevel})}async function*Vot(t){let e=new $ge.default.Parse,r=new Zge.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on(\"entry\",s=>{r.write(s)}),e.on(\"error\",s=>{r.destroy(s)}),e.on(\"close\",()=>{r.destroyed||r.end()}),e.end(t);for await(let s of r){let a=s;yield a,a.resume()}}async function rde(t,e,{stripComponents:r=0,prefixPath:s=vt.dot}={}){function a(n){if(n.path[0]===\"/\")return!0;let c=n.path.split(/\\//g);return!!(c.some(f=>f===\"..\")||c.length<=r)}for await(let n of Vot(t)){if(a(n))continue;let c=J.normalize(fe.toPortablePath(n.path)).replace(/\\/$/,\"\").split(/\\//g);if(c.length<=r)continue;let f=c.slice(r).join(\"/\"),p=J.join(s,f),h=420;switch((n.type===\"Directory\"||(n.mode??0)&73)&&(h|=73),n.type){case\"Directory\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case\"OldFile\":case\"File\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.writeFileSync(p,await WE(n),{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case\"SymbolicLink\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break}}return e}var Zge,$ge,TG,QG,qot,nde=Xe(()=>{Ge();Dt();eA();Zge=Ie(\"stream\"),$ge=ut(Vge());Kge();Pc();TG=ut(Xge());qot=new WeakMap});var sde=_((FG,ide)=>{(function(t,e){typeof FG==\"object\"?ide.exports=e():typeof define==\"function\"&&define.amd?define(e):t.treeify=e()})(FG,function(){function t(a,n){var c=n?\"\\u2514\":\"\\u251C\";return a?c+=\"\\u2500 \":c+=\"\\u2500\\u2500\\u2510\",c}function e(a,n){var c=[];for(var f in a)a.hasOwnProperty(f)&&(n&&typeof a[f]==\"function\"||c.push(f));return c}function r(a,n,c,f,p,h,E){var C=\"\",S=0,P,I,R=f.slice(0);if(R.push([n,c])&&f.length>0&&(f.forEach(function(U,W){W>0&&(C+=(U[1]?\" \":\"\\u2502\")+\"  \"),!I&&U[0]===n&&(I=!0)}),C+=t(a,c)+a,p&&(typeof n!=\"object\"||n instanceof Date)&&(C+=\": \"+n),I&&(C+=\" (circular ref.)\"),E(C)),!I&&typeof n==\"object\"){var N=e(n,h);N.forEach(function(U){P=++S===N.length,r(U,n[U],P,R,p,h,E)})}}var s={};return s.asLines=function(a,n,c,f){var p=typeof c!=\"function\"?c:!1;r(\".\",a,!1,[],n,p,f||c)},s.asTree=function(a,n,c){var f=\"\";return r(\".\",a,!1,[],n,c,function(p){f+=p+`\n`}),f},s})});var xs={};Vt(xs,{emitList:()=>Jot,emitTree:()=>cde,treeNodeToJson:()=>lde,treeNodeToTreeify:()=>ade});function ade(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,P=[];typeof E<\"u\"&&P.push(zd(e,E,2)),typeof C<\"u\"&&P.push(Ht(e,C[0],C[1])),P.length===0&&P.push(zd(e,`${p}`,2));let I=P.join(\": \").trim(),R=`\\0${s++}\\0`,N=c[`${R}${I}`]={};typeof S<\"u\"&&a(S,N)}};if(typeof t.children>\"u\")throw new Error(\"The root node must only contain children\");return a(t.children,r),r}function lde(t){let e=r=>{if(typeof r.children>\"u\"){if(typeof r.value>\"u\")throw new Error(\"Assertion failed: Expected a value to be set if the children are missing\");return Xd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[Kot(n)]=e(c));return typeof r.value>\"u\"?a:{value:Xd(r.value[0],r.value[1]),children:a}};return e(t)}function Jot(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));cde({children:a},{configuration:e,stdout:r,json:s})}function cde(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(lde(f))}\n`);return}let n=(0,ode.asTree)(ade(t,{configuration:e}),!1,!1);if(n=n.replace(/\\0[0-9]+\\0/g,\"\"),a>=1&&(n=n.replace(/^([├└]─)/gm,`\\u2502\n$1`).replace(/^│\\n/,\"\")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\\n]+\\n)(([│ ]).{2}[├└].{2}[^\\n]*\\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3  \\u2502 \n$2`).replace(/^│\\n/,\"\");if(a>=3)throw new Error(\"Only the first two levels are accepted by treeUtils.emitTree\");r.write(n)}function Kot(t){return typeof t==\"string\"?t.replace(/^\\0[0-9]+\\0/,\"\"):t}var ode,ude=Xe(()=>{ode=ut(sde());xc()});var MR,fde=Xe(()=>{MR=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<\"u\"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function _v(t){let e=t.match(zot);if(!e?.groups)throw new Error(\"Assertion failed: Expected the checksum to match the requested pattern\");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var Ade,NG,OG,UR,Kr,zot,LG=Xe(()=>{Ge();Dt();Dt();eA();Ade=Ie(\"crypto\"),NG=ut(Ie(\"fs\"));fde();Tc();I0();Pc();Wo();OG=YE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),UR=YE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Kr=class t{constructor(e,{configuration:r,immutable:s=r.get(\"enableImmutableCache\"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new MR(e=>{e.discardAndClose()});this.cacheId=`-${(0,Ade.randomBytes)(8).toString(\"hex\")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get(\"cacheFolder\"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get(\"compressionLevel\"),s=r!==\"mixed\"?`c${r}`:\"\";return{cacheKey:[UR,s].join(\"\"),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get(\"enableMirror\"))return null;let e=`${this.configuration.get(\"globalFolder\")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${nI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=_v(r).hash.slice(0,10);return`${nI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=_v(e);if(r===null||r<OG)return!1;let a=this.configuration.get(\"cacheMigrationMode\");return!(r<UR&&a===\"always\"||s!==this.cacheSpec&&a!==\"required-only\")}getLocatorPath(e,r){return this.mirrorCwd===null?J.resolve(this.cwd,this.getVersionFilename(e)):r===null?J.resolve(this.cwd,this.getVersionFilename(e)):J.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get(\"enableGlobalCache\"))if(this.immutable){if(!await ce.existsPromise(this.cwd))throw new jt(56,\"Cache path does not exist.\")}else{await ce.mkdirPromise(this.cwd,{recursive:!0});let e=J.resolve(this.cwd,\".gitignore\");await ce.changeFilePromise(e,`/.gitignore\n*.flock\n*.tmp\n`)}(this.mirrorCwd||!this.immutable)&&await ce.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(e),p=new Yn,h=()=>{let pe=new As,Be=J.join(vt.root,x8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(J.join(Be,Er.manifest),{name:un(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?_v(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await SQ(pe)}`:r;if(Ce!==null){let Ae=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await SQ(Ce)}`:r;if(we!==Ae)throw new jt(18,\"The remote archive doesn't match the local checksum - has the local cache been corrupted?\")}let ye=null;switch(r!==null&&we!==r&&(this.check?ye=\"throw\":_v(r).cacheKey!==_v(we).cacheKey?ye=\"update\":ye=this.configuration.get(\"checksumBehavior\")),ye){case null:case\"update\":return{isValid:!0,hash:we};case\"ignore\":return{isValid:!0,hash:r};case\"reset\":return{isValid:!1,hash:r};default:case\"throw\":throw new jt(18,\"The remote archive doesn't match the expected checksum\")}},C=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await ce.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error(\"Assertion failed: Expected a valid checksum\");return g.hash},S=async()=>{if(f===null||!await ce.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:\"loader\",path:Be}}return{source:\"mirror\",path:f}},P=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new jt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!==\"mirror\"&&f!==null&&we.push(async()=>{let Ae=`${f}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,NG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let Ae=`${g}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,NG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,g)});let ye=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(Ae=>Ae())),[!1,ye,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),Ae=ye||we,se=Ae?s:a;if(se&&se(),Ae){let Z=null,De=g;if(!ye)if(this.check)Z=await C(De);else{let Re=await E(De,{isColdHit:!1});if(Re.isValid)Z=Re.hash;else return P()}return[ye,De,Z]}else{if(this.immutable&&Ce)throw new jt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,\"supportedArchitectures\",he.Type.CODE)} to cache packages for multiple systems`);return P()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[R,N,U]=await I();R||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>R?h():new As(N,{baseFs:p,readOnly:!0})),ee,ie=new oE(()=>W4(()=>(ee=W(),ee.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),J),ue=new _f(N,{baseFs:ie,pathUtils:J}),le=()=>{ee?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[ue,le,me]}},zot=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\\/)?(?<hash>.*)$/});var _R,pde=Xe(()=>{_R=(r=>(r[r.SCRIPT=0]=\"SCRIPT\",r[r.SHELLCODE=1]=\"SHELLCODE\",r))(_R||{})});var Xot,KI,MG=Xe(()=>{Dt();wc();Rp();Wo();Xot=[[/^(git(?:\\+(?:https|ssh))?:\\/\\/.*(?:\\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\\/\\/((?:[^/]+?)@)?codeload\\.github\\.com\\/([^/]+\\/[^/]+)\\/tar\\.gz\\/([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\\/\\/((?:[^/]+?)@)?github\\.com\\/([^/]+\\/[^/]+?)(?:\\.git)?#([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\\/\\/[^/]+\\/(?:[^/]+\\/)*(?:@.+(?:\\/|(?:%2f)))?([^/]+)\\/(?:-|download)\\/\\1-[^/]+\\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.pkg\\.github\\.com\\/download\\/(?:@[^/]+)\\/(?:[^/]+)\\/(?:[^/]+)\\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.fontawesome\\.com\\/(?:@[^/]+)\\/([^/]+)\\/-\\/([^/]+)\\/\\1-\\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\\/\\/[^/]+\\/.*\\/(@[^/]+)\\/([^/]+)\\/-\\/\\1\\/\\2-(?:[.\\d\\w-]+)\\.tgz(?:#|$)/,(t,e)=>kQ({protocol:\"npm:\",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],KI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=J.join(e.cwd,Er.lockfile);if(!ce.existsSync(s))return;let a=await ce.readFilePromise(s,\"utf8\"),n=ls(a);if(Object.hasOwn(n,\"__metadata\"))return;let c=this.resolutions=new Map;for(let f of Object.keys(n)){let p=HB(f);if(!p){r.reportWarning(14,`Failed to parse the string \"${f}\" into a proper descriptor`);continue}let h=cl(p.range)?On(p,`npm:${p.range}`):p,{version:E,resolved:C}=n[f];if(!C)continue;let S;for(let[I,R]of Xot){let N=C.match(I);if(N){S=R(E,...N);break}}if(!S){r.reportWarning(14,`${ni(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not \"${C}\")`);continue}let P=h;try{let I=em(h.range),R=HB(I.selector,!0);R&&(P=R)}catch{}c.set(h.descriptorHash,Ws(P,S))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!this.resolutions)throw new Error(\"Assertion failed: The resolution store should have been setup\");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error(\"Assertion failed: The resolution should have been registered\");let n=S8(a),c=s.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(c,r,s)}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}}});var lA,hde=Xe(()=>{Tc();Ev();xc();lA=class extends Ao{constructor({configuration:r,stdout:s,suggestInstall:a=!0}){super();this.errorCount=0;RB(this,{configuration:r}),this.configuration=r,this.stdout=s,this.suggestInstall=a}static async start(r,s){let a=new this(r);try{await s(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,s){return s()}async startSectionPromise(r,s){return await s()}startTimerSync(r,s,a){return(typeof s==\"function\"?s:a)()}async startTimerPromise(r,s,a){return await(typeof s==\"function\"?s:a)()}reportSeparator(){}reportInfo(r,s){}reportWarning(r,s){}reportError(r,s){this.errorCount+=1,this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} ${this.formatNameWithHyperlink(r)}: ${s}\n`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`\n`),this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} Errors happened when preparing the environment required to run this command.\n`),this.suggestInstall&&this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} This might be caused by packages being missing from the lockfile, in which case running \"yarn install\" might help.\n`))}formatNameWithHyperlink(r){return Wj(r,{configuration:this.configuration,json:!1})}}});var zI,UG=Xe(()=>{Wo();zI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(bQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error(\"The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(bQ(e).locatorHash);if(n)return[n];throw new Error(\"Resolution expected from the lockfile data\")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error(\"The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache\");return s}}});function Kp(){}function Zot(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;n<c;n++){var h=e[n];if(h.removed){if(h.value=t.join(s.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var C=e[n-1];e[n-1]=e[n],e[n]=C}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(P,I){var R=s[p+I];return R.length>P.length?R:P}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value==\"string\"&&(S.added||S.removed)&&t.equals(\"\",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function $ot(t){return{newPos:t.newPos,components:t.components.slice(0)}}function eat(t,e){if(typeof t==\"function\")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function mde(t,e,r){return r=eat(r,{ignoreWhitespace:!0}),qG.diff(t,e,r)}function tat(t,e,r){return WG.diff(t,e,r)}function HR(t){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?HR=function(e){return typeof e}:HR=function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},HR(t)}function _G(t){return iat(t)||sat(t)||oat(t)||aat()}function iat(t){if(Array.isArray(t))return HG(t)}function sat(t){if(typeof Symbol<\"u\"&&Symbol.iterator in Object(t))return Array.from(t)}function oat(t,e){if(t){if(typeof t==\"string\")return HG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r===\"Object\"&&t.constructor&&(r=t.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(t);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HG(t,e)}}function HG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function aat(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jG(t,e,r,s,a){e=e||[],r=r||[],s&&(t=s(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var c;if(lat.call(t)===\"[object Array]\"){for(e.push(t),c=new Array(t.length),r.push(c),n=0;n<t.length;n+=1)c[n]=jG(t[n],e,r,s,a);return e.pop(),r.pop(),c}if(t&&t.toJSON&&(t=t.toJSON()),HR(t)===\"object\"&&t!==null){e.push(t),c={},r.push(c);var f=[],p;for(p in t)t.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=jG(t[p],e,r,s,p);e.pop(),r.pop()}else c=t;return c}function yde(t,e,r,s,a,n,c){c||(c={}),typeof c.context>\"u\"&&(c.context=4);var f=tat(r,s,c);if(!f)return;f.push({value:\"\",lines:[]});function p(U){return U.map(function(W){return\" \"+W})}for(var h=[],E=0,C=0,S=[],P=1,I=1,R=function(W){var ee=f[W],ie=ee.lines||ee.value.replace(/\\n$/,\"\").split(`\n`);if(ee.lines=ie,ee.added||ee.removed){var ue;if(!E){var le=f[W-1];E=P,C=I,le&&(S=c.context>0?p(le.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(ue=S).push.apply(ue,_G(ie.map(function(Ae){return(ee.added?\"+\":\"-\")+Ae}))),ee.added?I+=ie.length:P+=ie.length}else{if(E)if(ie.length<=c.context*2&&W<f.length-2){var me;(me=S).push.apply(me,_G(p(ie)))}else{var pe,Be=Math.min(ie.length,c.context);(pe=S).push.apply(pe,_G(p(ie.slice(0,Be))));var Ce={oldStart:E,oldLines:P-E+Be,newStart:C,newLines:I-C+Be,lines:S};if(W>=f.length-2&&ie.length<=c.context){var g=/\\n$/.test(r),we=/\\n$/.test(s),ye=ie.length==0&&S.length>Ce.oldLines;!g&&ye&&r.length>0&&S.splice(Ce.oldLines,0,\"\\\\ No newline at end of file\"),(!g&&!ye||!we)&&S.push(\"\\\\ No newline at end of file\")}h.push(Ce),E=0,C=0,S=[]}P+=ie.length,I+=ie.length}},N=0;N<f.length;N++)R(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var y8t,gde,dde,qG,WG,rat,nat,lat,Hv,GG,YG=Xe(()=>{Kp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s==\"function\"&&(a=s,s={}),this.options=s;var n=this;function c(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,e,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function P(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=C[R-1],W=C[R+1],ee=(W?W.newPos:0)-R;U&&(C[R-1]=void 0);var ie=U&&U.newPos+1<f,ue=W&&0<=ee&&ee<p;if(!ie&&!ue){C[R]=void 0;continue}if(!ie||ue&&U.newPos<W.newPos?(N=$ot(W),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),ee=n.extractCommon(N,r,e,R),N.newPos+1>=f&&ee+1>=p)return c(Zot(n,N.components,r,e,n.useLongestToken));C[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();P()||R()},0)})();else for(;h<=E;){var I=P();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&e.components.push({count:h}),e.newPos=f,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split(\"\")},join:function(e){return e.join(\"\")}};y8t=new Kp;gde=/^[A-Za-z\\xC0-\\u02C6\\u02C8-\\u02D7\\u02DE-\\u02FF\\u1E00-\\u1EFF]+$/,dde=/\\S/,qG=new Kp;qG.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!dde.test(t)&&!dde.test(e)};qG.tokenize=function(t){for(var e=t.split(/([^\\S\\r\\n]+|[()[\\]{}'\"\\r\\n]|\\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&gde.test(e[r])&&gde.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};WG=new Kp;WG.tokenize=function(t){var e=[],r=t.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};rat=new Kp;rat.tokenize=function(t){return t.split(/(\\S.+?[.!?])(?=\\s+|$)/)};nat=new Kp;nat.tokenize=function(t){return t.split(/([{}:;,]|\\s+)/)};lat=Object.prototype.toString,Hv=new Kp;Hv.useLongestToken=!0;Hv.tokenize=WG.tokenize;Hv.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>\"u\"?r:c}:s;return typeof t==\"string\"?t:JSON.stringify(jG(t,null,null,a),a,\"  \")};Hv.equals=function(t,e){return Kp.prototype.equals.call(Hv,t.replace(/,([\\r\\n])/g,\"$1\"),e.replace(/,([\\r\\n])/g,\"$1\"))};GG=new Kp;GG.tokenize=function(t){return t.slice()};GG.join=GG.removeEmpty=function(t){return t}});var jR,Ede=Xe(()=>{Tc();jR=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async resolve(e,r){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}}});var ki,VG=Xe(()=>{Tc();ki=class extends Ao{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r==\"function\"?r:s)()}async startTimerPromise(e,r,s){return await(typeof r==\"function\"?r:s)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var Ide,XI,JG=Xe(()=>{Dt();Ide=ut(BQ());oI();tm();xc();I0();Rp();Wo();XI=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ut.tryFind(this.cwd)??new Ut,this.relativeCwd=J.relative(this.project.cwd,this.cwd)||vt.dot;let e=this.manifest.name?this.manifest.name:Da(null,`${this.computeCandidateName()}-${us(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=On(e,`${Ei.protocol}${this.relativeCwd}`),this.anchoredLocator=Ws(e,`${Ei.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let s=await(0,Ide.default)(r,{cwd:fe.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:[\"**/node_modules\",\"**/.git\",\"**/.yarn\"]});s.sort(),await s.reduce(async(a,n)=>{let c=J.resolve(this.cwd,fe.toPortablePath(n)),f=await ce.existsPromise(J.join(c,\"package.json\"));await a,f&&this.workspacesCwds.add(c)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${GB(this.project.configuration,this)} (${Ht(this.project.configuration,J.join(this.cwd,Er.manifest),ht.PATH)}) to have been resolved. Run \"yarn install\" to update the lockfile`);return e}accepts(e){let r=e.indexOf(\":\"),s=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(s===Ei.protocol&&J.normalize(a)===this.relativeCwd||s===Ei.protocol&&(a===\"*\"||a===\"^\"||a===\"~\"))return!0;let n=cl(a);return n?s===Ei.protocol?n.test(this.manifest.version??\"0.0.0\"):this.project.configuration.get(\"enableTransparentWorkspaces\")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?\"root-workspace\":`${J.basename(this.cwd)}`||\"unnamed-workspace\"}getRecursiveWorkspaceDependencies({dependencies:e=Ut.hardDependencies}={}){let r=new Set,s=a=>{for(let n of e)for(let c of a.manifest[n].values()){let f=this.project.tryWorkspaceByDescriptor(c);f===null||r.has(f)||(r.add(f),s(f))}};return s(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ut.hardDependencies}={}){let r=new Set,s=a=>{for(let n of this.project.workspaces)e.some(f=>[...n.manifest[f].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&_B(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),s(n))};return s(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let s of r.workspacesCwds){let a=this.project.workspacesByCwd.get(s);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=J.join(this.cwd,Ut.fileName),s=`${JSON.stringify(e,null,this.manifest.indent)}\n`;await ce.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function hat({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=new Map(t.workspaces.map(le=>{let me=le.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: The workspace should have an associated package\");return[me,LB(pe)]})),W=()=>{let le=ce.mktempSync(),me=J.join(le,\"stacktrace.log\"),pe=String(C.length+1).length,Be=C.map((Ce,g)=>`${`${g+1}.`.padStart(pe,\" \")} ${ll(Ce)}\n`).join(\"\");throw ce.writeFileSync(me,Be),ce.detachTemp(le),new jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${fe.fromPortablePath(me)}`)},ee=le=>{let me=r.get(le.descriptorHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let pe=s.get(me);if(!pe)throw new Error(\"Assertion failed: The package could not be found\");return pe},ie=(le,me,pe,{top:Be,optional:Ce})=>{C.length>1e3&&W(),C.push(me);let g=ue(le,me,pe,{top:Be,optional:Ce});return C.pop(),g},ue=(le,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,ye=new Map,Ae=[],se=[],Z=[],De=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(kp(Re))throw new Error(\"Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch\");h.delete(Re.descriptorHash);let mt=Ce;if(!mt){let ke=g.dependenciesMeta.get(un(Re));if(typeof ke<\"u\"){let it=ke.get(null);typeof it<\"u\"&&it.optional&&(mt=!0)}}let j=r.get(Re.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ni(t.configuration,Re)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ni(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Re,rt,new Map,{top:Be,optional:mt});continue}let Fe,Ne,Pe=new Set,Ve=new Map;Ae.push(()=>{Fe=b8(Re,me.locatorHash),Ne=P8(rt,me.locatorHash),g.dependencies.set(Re.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),bp(R,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ve);for(let ke of Ne.peerDependencies.values()){let Ue=Yl(ye,ke.identHash,()=>{let x=pe.get(ke.identHash)??null,w=g.dependencies.get(ke.identHash);return!w&&UB(me,ke)&&(le.identHash===me.identHash?w=le:(w=On(me,le.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,me.locatorHash),h.delete(w.descriptorHash),x=null)),w||(w=On(ke,\"missing:\")),{subject:me,ident:ke,provided:w,root:!x,requests:new Map,hash:`p${us(me.locatorHash,ke.identHash).slice(0,6)}`}}).provided;if(Ue.range===\"missing:\"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ve.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(un(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,Ue),kp(Ue)){let x=r.get(Ue.descriptorHash);bp(I,x).add(Ne.locatorHash)}S.set(Ue.identHash,Ue),Ue.range===\"missing:\"&&Pe.add(Ue.identHash)}Ne.dependencies=new Map(qs(Ne.dependencies,([ke,it])=>un(it)))}),Z.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke==\"number\"&&ke>=2&&W();let it=E.get(rt.locatorHash),Ue=typeof it<\"u\"?it+1:1;E.set(rt.locatorHash,Ue),ie(Fe,Ne,Ve,{top:Be,optional:mt}),E.set(rt.locatorHash,Ue-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let it=N.get(ke);if(typeof it>\"u\")throw new Error(\"Assertion failed: Expected the peer requests to be registered\");for(let Ue of ye.values()){let x=it.get(Ue.ident.identHash);x&&(Ue.requests.set(Fe.descriptorHash,x),p.set(Ue.hash,Ue),Ue.root||pe.get(Ue.ident.identHash)?.children.set(Fe.descriptorHash,x))}if(s.has(Ne.locatorHash))for(let Ue of Pe)Ne.dependencies.delete(Ue)})}for(let Re of[...Ae,...se])Re();for(let Re of we){we.delete(Re);let mt=s.get(Re),j=us(rI(mt).locatorHash,...Array.from(mt.dependencies.values(),Pe=>{let Ve=Pe.range!==\"missing:\"?r.get(Pe.descriptorHash):\"missing:\";if(typeof Ve>\"u\")throw new Error(`Assertion failed: Expected the resolution for ${ni(t.configuration,Pe)} to have been registered`);return Ve===Be?`${Ve} (top)`:Ve})),rt=P.get(j);if(typeof rt>\"u\"){P.set(j,mt);continue}let Fe=bp(R,rt.locatorHash);for(let Pe of R.get(mt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(mt.locatorHash),a.delete(mt.locatorHash),we.delete(mt.locatorHash);let Ne=I.get(mt.locatorHash);if(Ne!==void 0){let Pe=bp(I,rt.locatorHash);for(let Ve of Ne)Pe.add(Ve),we.add(Ve)}}for(let Re of[...Z,...De])Re()};for(let le of t.workspaces){let me=le.anchoredLocator;h.delete(le.anchoredDescriptor.descriptorHash),ie(le.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let le of p.values()){if(!le.root)continue;let me=s.get(le.subject.locatorHash);if(typeof me>\"u\")continue;for(let Be of le.requests.values()){let Ce=`p${us(le.subject.locatorHash,un(le.ident),Be.requester.locatorHash).slice(0,6)}`;c.set(Ce,{subject:le.subject.locatorHash,requested:le.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(qB(Be),g=>g.requester.locatorHash)})}let pe=[...qB(le)];if(le.provided.range!==\"missing:\"){let Be=ee(le.provided),Ce=Be.version??\"0.0.0\",g=ye=>{if(ye.startsWith(Ei.protocol)){if(!t.tryWorkspaceByLocator(Be))return null;ye=ye.slice(Ei.protocol.length),(ye===\"^\"||ye===\"~\")&&(ye=\"*\")}return ye},we=!0;for(let ye of pe){let Ae=g(ye.descriptor.range);if(Ae===null){we=!1;continue}if(!Zf(Ce,Ae)){we=!1;let se=`p${us(le.subject.locatorHash,un(le.ident),ye.requester.locatorHash).slice(0,6)}`;f.push({type:1,subject:me,requested:le.ident,requester:ye.requester,version:Ce,hash:se,requirementCount:pe.length})}}if(!we){let ye=pe.map(Ae=>g(Ae.descriptor.range));f.push({type:3,node:le,range:ye.includes(null)?null:Q8(ye),hash:le.hash})}}else{let Be=!0;for(let Ce of pe)if(!Ce.meta?.optional){Be=!1;let g=`p${us(le.subject.locatorHash,un(le.ident),Ce.requester.locatorHash).slice(0,6)}`;f.push({type:0,subject:me,requested:le.ident,requester:Ce.requester,hash:g})}Be||f.push({type:2,node:le,hash:le.hash})}}}function*gat(t){let e=new Map;if(\"children\"in t)e.set(t,t);else for(let r of t.requests.values())e.set(r,r);for(let[r,s]of e){yield{request:r,root:s};for(let a of r.children.values())e.has(a)||e.set(a,s)}}function dat(t,e){let r=[],s=[],a=!1;for(let n of t.peerWarnings)if(!(n.type===1||n.type===0)){if(!t.tryWorkspaceByLocator(n.node.subject)){a=!0;continue}if(n.type===3){let c=t.storedResolutions.get(n.node.provided.descriptorHash);if(typeof c>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let f=t.storedPackages.get(c);if(typeof f>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let p=p0(gat(n.node),({request:C,root:S})=>Zf(f.version??\"0.0.0\",C.descriptor.range)?p0.skip:C===S?$i(t.configuration,C.requester):`${$i(t.configuration,C.requester)} (via ${$i(t.configuration,S.requester)})`),h=[...qB(n.node)].length>1?\"and other dependencies request\":\"requests\",E=n.range?iI(t.configuration,n.range):Ht(t.configuration,\"but they have non-overlapping ranges!\",\"redBright\");r.push(`${$i(t.configuration,n.node.ident)} is listed by your project with version ${jB(t.configuration,f.version??\"0.0.0\")} (${Ht(t.configuration,n.hash,ht.CODE)}), which doesn't satisfy what ${p} ${h} (${E}).`)}if(n.type===2){let c=n.node.requests.size>1?\" and other dependencies\":\"\";s.push(`${Yr(t.configuration,n.node.subject)} doesn't provide ${$i(t.configuration,n.node.ident)} (${Ht(t.configuration,n.hash,ht.CODE)}), requested by ${$i(t.configuration,n.node.requests.values().next().value.requester)}${c}.`)}}e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met by your project; run ${Ht(t.configuration,\"yarn explain peer-requirements <hash>\",ht.CODE)} for details, where ${Ht(t.configuration,\"<hash>\",ht.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of qs(r,c=>JE.default(c)))e.reportWarning(60,n);for(let n of qs(s,c=>JE.default(c)))e.reportWarning(2,n)}),a&&e.reportWarning(86,`Some peer dependencies are incorrectly met by dependencies; run ${Ht(t.configuration,\"yarn explain peer-requirements\",ht.CODE)} for details.`)}var GR,qR,Bde,XG,zG,ZG,WR,cat,uat,Cde,fat,Aat,pat,$l,KG,YR,wde,Tt,vde=Xe(()=>{Dt();Dt();wc();Yt();GR=Ie(\"crypto\");YG();ql();qR=ut(Ld()),Bde=ut(Ai()),XG=Ie(\"util\"),zG=ut(Ie(\"v8\")),ZG=ut(Ie(\"zlib\"));LG();av();MG();UG();oI();F8();Tc();Ede();Ev();VG();tm();JG();LQ();xc();I0();Pc();gT();zj();Rp();Wo();WR=YE(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),cat=3,uat=/ *, */g,Cde=/\\/$/,fat=32,Aat=(0,XG.promisify)(ZG.default.gzip),pat=(0,XG.promisify)(ZG.default.gunzip),$l=(r=>(r.UpdateLockfile=\"update-lockfile\",r.SkipBuild=\"skip-build\",r))($l||{}),KG={restoreLinkersCustomData:[\"linkersCustomData\"],restoreResolutions:[\"accessibleLocators\",\"conditionalLocators\",\"disabledLocators\",\"optionalBuilds\",\"storedDescriptors\",\"storedResolutions\",\"storedPackages\",\"lockFileChecksum\"],restoreBuildState:[\"skippedBuilds\",\"storedBuildState\"]},YR=(a=>(a[a.NotProvided=0]=\"NotProvided\",a[a.NotCompatible=1]=\"NotCompatible\",a[a.NodeNotProvided=2]=\"NodeNotProvided\",a[a.NodeNotCompatible=3]=\"NodeNotCompatible\",a))(YR||{}),wde=t=>us(`${cat}`,t),Tt=class t{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.peerRequirementNodes=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new nt(`No project found in ${r}`);let s=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,ce.existsSync(J.join(n,Er.manifest))){s=n;break}a=J.dirname(n)}let c=new t(e.projectCwd,{configuration:e});ze.telemetry?.reportProject(c.cwd),await c.setupResolutions(),await c.setupWorkspaces(),ze.telemetry?.reportWorkspaceCount(c.workspaces.length),ze.telemetry?.reportDependencyCount(c.workspaces.reduce((I,R)=>I+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let f=c.tryWorkspaceByCwd(s);if(f)return{project:c,workspace:f,locator:f.anchoredLocator};let p=await c.findLocatorForLocation(`${s}/`,{strict:!0});if(p)return{project:c,locator:p,workspace:null};let h=Ht(e,c.cwd,ht.PATH),E=Ht(e,J.relative(c.cwd,s),ht.PATH),C=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,S=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,P=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new nt(`The nearest package directory (${Ht(e,s,ht.PATH)}) doesn't seem to be part of the project declared in ${Ht(e,c.cwd,ht.PATH)}.\n\n${[C,S,P].join(`\n`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=J.join(this.cwd,Er.lockfile),r=this.configuration.get(\"defaultLanguageName\");if(ce.existsSync(e)){let s=await ce.readFilePromise(e,\"utf8\");this.lockFileChecksum=wde(s);let a=ls(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<WR;for(let f of Object.keys(a)){if(f===\"__metadata\")continue;let p=a[f];if(typeof p.resolution>\"u\")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Qp(p.resolution,!0),E=new Ut;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,P=p.linkType.toUpperCase(),I=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,ee=E.bin;if(p.checksum!=null){let ue=typeof c<\"u\"&&!p.checksum.includes(\"/\")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,ue)}let ie={...h,version:C,languageName:S,linkType:P,conditions:I,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:ee};this.originalPackages.set(ie.locatorHash,ie);for(let ue of f.split(uat)){let le=C0(ue);n<=6&&(le=this.configuration.normalizeDependency(le),le=On(le,le.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,\"$1npm%3A\"))),this.storedDescriptors.set(le.descriptorHash,le),this.storedResolutions.set(le.descriptorHash,h.locatorHash)}}}else s.includes(\"yarn lockfile v1\")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,qR.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new XI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<\"u\")throw new Error(`Duplicate workspace name ${$i(this.configuration,e.anchoredLocator)}: ${fe.fromPortablePath(e.cwd)} conflicts with ${fe.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){J.isAbsolute(e)||(e=J.resolve(this.cwd,e)),e=J.normalize(e).replace(/\\/+$/,\"\");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)J.relative(s.cwd,e).startsWith(\"../\")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>\"u\"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${$i(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Ei.protocol)){let s=e.range.slice(Ei.protocol.length);if(s!==\"^\"&&s!==\"~\"&&s!==\"*\"&&!cl(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(kp(e)&&(e=MB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ni(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=rI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if(\"descriptorHash\"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<\"u\"&&!s.has(r)&&this.deleteLocator(r)}if(\"locatorHash\"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)kp(s)&&e.dependencies.set(r,MB(s))}getDependencyMeta(e,r){let s={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(un(e));if(!n)return s;let c=n.get(null);if(c&&Object.assign(s,c),r===null||!Bde.default.valid(r))return s;for(let[f,p]of n)f!==null&&f===r&&Object.assign(s,p);return s}async findLocatorForLocation(e,{strict:r=!1}={}){let s=new ki,a=this.configuration.getLinkers(),n={project:this,report:s};for(let c of a){let f=await c.findPackageLocator(e,n);if(f){if(r&&(await c.findPackageLocation(f,n)).replace(Cde,\"\")!==e.replace(Cde,\"\"))continue;return f}}return null}async loadUserConfig(){let e=J.join(this.cwd,\".pnp.cjs\");await ce.existsPromise(e)&&Pp(e).setup();let r=J.join(this.cwd,\"yarn.config.cjs\");return await ce.existsPromise(r)?Pp(r):null}async preparePackage(e,{resolver:r,resolveOptions:s}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[c,f]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,f,this,n,f,{resolver:r,resolveOptions:s});if(!UB(f,p))throw new Error(\"Assertion failed: The descriptor ident cannot be changed through aliases\");let h=r.bindDescriptor(p,n,s);n.dependencies.set(c,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error(\"Workspaces must have been setup before calling this function\");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),s=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new KI(a);await n.setup(this,{report:e.report});let c=e.lockfileOnly?[new jR(a)]:[n,a],f=new rm([new zI(a),...c]),p=new rm([...c]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:f}:{project:this,report:e.report,resolver:f,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},C=new Map,S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,W=new Set,ee=[],ie=uj(),ue=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(Ao.progressViaTitle(),async se=>{let Z=async rt=>{let Fe=await qE(async()=>await f.resolve(rt,E),ke=>`${Yr(this.configuration,rt)}: ${ke}`);if(!_B(rt,Fe))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${Yr(this.configuration,rt)} to ${Yr(this.configuration,Fe)})`);I.set(Fe.locatorHash,Fe),!r.delete(Fe.locatorHash)&&!this.tryWorkspaceByLocator(Fe)&&s.push(Fe);let Pe=await this.preparePackage(Fe,{resolver:f,resolveOptions:E}),Ve=Uu([...Pe.dependencies.values()].map(ke=>j(ke)));return ee.push(Ve),Ve.catch(()=>{}),S.set(Pe.locatorHash,Pe),Pe},De=async rt=>{let Fe=R.get(rt.locatorHash);if(typeof Fe<\"u\")return Fe;let Ne=Promise.resolve().then(()=>Z(rt));return R.set(rt.locatorHash,Ne),Ne},Re=async(rt,Fe)=>{let Ne=await j(Fe);return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,Ne.locatorHash),Ne},mt=async rt=>{se.setTitle(ni(this.configuration,rt));let Fe=this.resolutionAliases.get(rt.descriptorHash);if(typeof Fe<\"u\")return Re(rt,this.storedDescriptors.get(Fe));let Ne=f.getResolutionDependencies(rt,E),Pe=Object.fromEntries(await Uu(Object.entries(Ne).map(async([it,Ue])=>{let x=f.bindDescriptor(Ue,U,E),w=await j(x);return W.add(w.locatorHash),[it,w]}))),ke=(await qE(async()=>await f.getCandidates(rt,Pe,E),it=>`${ni(this.configuration,rt)}: ${it}`))[0];if(typeof ke>\"u\")throw new jt(82,`${ni(this.configuration,rt)}: No candidates found`);if(e.checkResolutions){let{locators:it}=await p.getSatisfying(rt,Pe,[ke],{...E,resolver:p});if(!it.find(Ue=>Ue.locatorHash===ke.locatorHash))throw new jt(78,`Invalid resolution ${FB(this.configuration,rt,ke)}`)}return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,ke.locatorHash),De(ke)},j=rt=>{let Fe=N.get(rt.descriptorHash);if(typeof Fe<\"u\")return Fe;C.set(rt.descriptorHash,rt);let Ne=Promise.resolve().then(()=>mt(rt));return N.set(rt.descriptorHash,Ne),Ne};for(let rt of this.workspaces){let Fe=rt.anchoredDescriptor;ee.push(j(Fe))}for(;ee.length>0;){let rt=[...ee];ee.length=0,await Uu(rt)}});let le=Wl(r.values(),se=>this.tryWorkspaceByLocator(se)?Wl.skip:se);if(s.length>0||le.length>0){let se=new Set(this.workspaces.flatMap(rt=>{let Fe=S.get(rt.anchoredLocator.locatorHash);if(!Fe)throw new Error(\"Assertion failed: The workspace should have been resolved\");return Array.from(Fe.dependencies.values(),Ne=>{let Pe=P.get(Ne.descriptorHash);if(!Pe)throw new Error(\"Assertion failed: The resolution should have been registered\");return Pe})})),Z=rt=>se.has(rt.locatorHash)?\"0\":\"1\",De=rt=>ll(rt),Re=qs(s,[Z,De]),mt=qs(le,[Z,De]),j=e.report.getRecommendedLength();Re.length>0&&e.report.reportInfo(85,`${Ht(this.configuration,\"+\",ht.ADDED)} ${$k(this.configuration,Re,j)}`),mt.length>0&&e.report.reportInfo(85,`${Ht(this.configuration,\"-\",ht.REMOVED)} ${$k(this.configuration,mt,j)}`)}let me=new Set(this.resolutionAliases.values()),pe=new Set(S.keys()),Be=new Set,Ce=new Map,g=[],we=new Map;hat({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:pe,peerRequirements:Ce,peerWarnings:g,peerRequirementNodes:we,allDescriptors:C,allResolutions:P,allPackages:S});for(let se of W)pe.delete(se);for(let se of me)C.delete(se),P.delete(se);let ye=new Set,Ae=new Set;for(let se of S.values())se.conditions!=null&&pe.has(se.locatorHash)&&(TQ(se,ue)||(TQ(se,ie)&&e.report.reportWarningOnce(77,`${Yr(this.configuration,se)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ht(this.configuration,\"supportedArchitectures\",ht.SETTING)} setting`),Ae.add(se.locatorHash)),ye.add(se.locatorHash));this.storedResolutions=P,this.storedDescriptors=C,this.storedPackages=S,this.accessibleLocators=Be,this.conditionalLocators=ye,this.disabledLocators=Ae,this.originalPackages=I,this.optionalBuilds=pe,this.peerRequirements=Ce,this.peerWarnings=g,this.peerRequirementNodes=we}async fetchEverything({cache:e,report:r,fetcher:s,mode:a,persistProject:n=!0}){let c={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},f=s||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:f,report:r,cacheOptions:c},h=Array.from(new Set(qs(this.storedResolutions.values(),[I=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");return ll(R)}])));a===\"update-lockfile\"&&(h=h.filter(I=>!this.storedChecksums.has(I)));let E=!1,C=Ao.progressViaCounter(h.length);await r.reportProgress(C);let S=(0,qR.default)(fat);if(await Uu(h.map(I=>S(async()=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");if(Gu(R))return;let N;try{N=await f.fetch(R,p)}catch(U){U.message=`${Yr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{C.tick()}))),E)throw E;let P=n&&a!==\"update-lockfile\"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||P){let R=(await Promise.all([...r.cacheMisses].map(async le=>{let me=this.storedPackages.get(le),pe=this.storedChecksums.get(le)??null,Be=e.getLocatorPath(me,pe);return(await ce.statPromise(Be)).size}))).reduce((le,me)=>le+me,0)-(P?.size??0),N=r.cacheMisses.size,U=P?.count??0,W=`${Wk(N,{zero:\"No new packages\",one:\"A package was\",more:`${Ht(this.configuration,N,ht.NUMBER)} packages were`})} added to the project`,ee=`${Wk(U,{zero:\"none were\",one:\"one was\",more:`${Ht(this.configuration,U,ht.NUMBER)} were`})} removed`,ie=R!==0?` (${Ht(this.configuration,R,ht.SIZE_DIFF)})`:\"\",ue=U>0?N>0?`${W}, and ${ee}${ie}.`:`${W}, but ${ee}${ie}.`:`${W}${ie}.`;r.reportInfo(13,ue)}}async linkEverything({cache:e,report:r,fetcher:s,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},c=s||this.configuration.makeFetcher(),f={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(ye=>{let Ae=ye.makeInstaller(h),se=ye.getCustomDataKey(),Z=this.linkersCustomData.get(se);return typeof Z<\"u\"&&Ae.attachCustomData(Z),[ye,Ae]})),C=new Map,S=new Map,P=new Map,I=new Map(await Uu([...this.accessibleLocators].map(async ye=>{let Ae=this.storedPackages.get(ye);if(!Ae)throw new Error(\"Assertion failed: The locator should have been registered\");return[ye,await c.fetch(Ae,f)]}))),R=[],N=new Set,U=[];for(let ye of this.accessibleLocators){let Ae=this.storedPackages.get(ye);if(typeof Ae>\"u\")throw new Error(\"Assertion failed: The locator should have been registered\");let se=I.get(Ae.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The fetch result should have been registered\");let Z=[],De=mt=>{Z.push(mt)},Re=this.tryWorkspaceByLocator(Ae);if(Re!==null){let mt=[],{scripts:j}=Re.manifest;for(let Fe of[\"preinstall\",\"install\",\"postinstall\"])j.has(Fe)&&mt.push({type:0,script:Fe});try{for(let[Fe,Ne]of E)if(Fe.supportsPackage(Ae,h)&&(await Ne.installPackage(Ae,se,{holdFetchResult:De})).buildRequest!==null)throw new Error(\"Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core\")}finally{Z.length===0?se.releaseFs?.():R.push(Uu(Z).catch(()=>{}).then(()=>{se.releaseFs?.()}))}let rt=J.join(se.packageFs.getRealPath(),se.prefixPath);S.set(Ae.locatorHash,rt),!Gu(Ae)&&mt.length>0&&P.set(Ae.locatorHash,{buildDirectives:mt,buildLocations:[rt]})}else{let mt=p.find(Fe=>Fe.supportsPackage(Ae,h));if(!mt)throw new jt(12,`${Yr(this.configuration,Ae)} isn't supported by any available linker`);let j=E.get(mt);if(!j)throw new Error(\"Assertion failed: The installer should have been registered\");let rt;try{rt=await j.installPackage(Ae,se,{holdFetchResult:De})}finally{Z.length===0?se.releaseFs?.():R.push(Uu(Z).then(()=>{}).then(()=>{se.releaseFs?.()}))}C.set(Ae.locatorHash,mt),S.set(Ae.locatorHash,rt.packageLocation),rt.buildRequest&&rt.packageLocation&&(rt.buildRequest.skipped?(N.add(Ae.locatorHash),this.skippedBuilds.has(Ae.locatorHash)||U.push([Ae,rt.buildRequest.explain])):P.set(Ae.locatorHash,{buildDirectives:rt.buildRequest.directives,buildLocations:[rt.packageLocation]}))}}let W=new Map;for(let ye of this.accessibleLocators){let Ae=this.storedPackages.get(ye);if(!Ae)throw new Error(\"Assertion failed: The locator should have been registered\");let se=this.tryWorkspaceByLocator(Ae)!==null,Z=async(De,Re)=>{let mt=S.get(Ae.locatorHash);if(typeof mt>\"u\")throw new Error(`Assertion failed: The package (${Yr(this.configuration,Ae)}) should have been registered`);let j=[];for(let rt of Ae.dependencies.values()){let Fe=this.storedResolutions.get(rt.descriptorHash);if(typeof Fe>\"u\")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,rt)}, from ${Yr(this.configuration,Ae)})should have been registered`);let Ne=this.storedPackages.get(Fe);if(typeof Ne>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);let Pe=this.tryWorkspaceByLocator(Ne)===null?C.get(Fe):null;if(typeof Pe>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);Pe===De||Pe===null?S.get(Ne.locatorHash)!==null&&j.push([rt,Ne]):!se&&mt!==null&&xB(W,Fe).push(mt)}mt!==null&&await Re.attachInternalDependencies(Ae,j)};if(se)for(let[De,Re]of E)De.supportsPackage(Ae,h)&&await Z(De,Re);else{let De=C.get(Ae.locatorHash);if(!De)throw new Error(\"Assertion failed: The linker should have been found\");let Re=E.get(De);if(!Re)throw new Error(\"Assertion failed: The installer should have been registered\");await Z(De,Re)}}for(let[ye,Ae]of W){let se=this.storedPackages.get(ye);if(!se)throw new Error(\"Assertion failed: The package should have been registered\");let Z=C.get(se.locatorHash);if(!Z)throw new Error(\"Assertion failed: The linker should have been found\");let De=E.get(Z);if(!De)throw new Error(\"Assertion failed: The installer should have been registered\");await De.attachExternalDependents(se,Ae)}let ee=new Map;for(let[ye,Ae]of E){let se=await Ae.finalizeInstall();for(let Z of se?.records??[])Z.buildRequest.skipped?(N.add(Z.locator.locatorHash),this.skippedBuilds.has(Z.locator.locatorHash)||U.push([Z.locator,Z.buildRequest.explain])):P.set(Z.locator.locatorHash,{buildDirectives:Z.buildRequest.directives,buildLocations:Z.buildLocations});typeof se?.customData<\"u\"&&ee.set(ye.getCustomDataKey(),se.customData)}if(this.linkersCustomData=ee,await Uu(R),a===\"skip-build\")return;for(let[,ye]of qs(U,([Ae])=>ll(Ae)))ye(r);let ie=new Set(P.keys()),ue=(0,GR.createHash)(\"sha512\");ue.update(process.versions.node),await this.configuration.triggerHook(ye=>ye.globalHashGeneration,this,ye=>{ue.update(\"\\0\"),ue.update(ye)});let le=ue.digest(\"hex\"),me=new Map,pe=ye=>{let Ae=me.get(ye.locatorHash);if(typeof Ae<\"u\")return Ae;let se=this.storedPackages.get(ye.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let Z=(0,GR.createHash)(\"sha512\");Z.update(ye.locatorHash),me.set(ye.locatorHash,\"<recursive>\");for(let De of se.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(typeof Re>\"u\")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);let mt=this.storedPackages.get(Re);if(typeof mt>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");Z.update(pe(mt))}return Ae=Z.digest(\"hex\"),me.set(ye.locatorHash,Ae),Ae},Be=(ye,Ae)=>{let se=(0,GR.createHash)(\"sha512\");se.update(le),se.update(pe(ye));for(let Z of Ae)se.update(Z);return se.digest(\"hex\")},Ce=new Map,g=!1,we=ye=>{let Ae=new Set([ye.locatorHash]);for(let se of Ae){let Z=this.storedPackages.get(se);if(!Z)throw new Error(\"Assertion failed: The package should have been registered\");for(let De of Z.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(!Re)throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);if(Re!==ye.locatorHash&&ie.has(Re))return!1;let mt=this.storedPackages.get(Re);if(!mt)throw new Error(\"Assertion failed: The package should have been registered\");let j=this.tryWorkspaceByLocator(mt);if(j){if(j.anchoredLocator.locatorHash!==ye.locatorHash&&ie.has(j.anchoredLocator.locatorHash))return!1;Ae.add(j.anchoredLocator.locatorHash)}Ae.add(Re)}}return!0};for(;ie.size>0;){let ye=ie.size,Ae=[];for(let se of ie){let Z=this.storedPackages.get(se);if(!Z)throw new Error(\"Assertion failed: The package should have been registered\");if(!we(Z))continue;let De=P.get(Z.locatorHash);if(!De)throw new Error(\"Assertion failed: The build directive should have been registered\");let Re=Be(Z,De.buildLocations);if(this.storedBuildState.get(Z.locatorHash)===Re){Ce.set(Z.locatorHash,Re),ie.delete(se);continue}g||(await this.persistInstallStateFile(),g=!0),this.storedBuildState.has(Z.locatorHash)?r.reportInfo(8,`${Yr(this.configuration,Z)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${Yr(this.configuration,Z)} must be built because it never has been before or the last one failed`);let mt=De.buildLocations.map(async j=>{if(!J.isAbsolute(j))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${j})`);for(let rt of De.buildDirectives){let Fe=`# This file contains the result of Yarn building a package (${ll(Z)})\n`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script}\n`;break;case 1:Fe+=`# Script code: ${rt.script}\n`;break}let Ne=null;if(!await ce.mktempPromise(async Ve=>{let ke=J.join(Ve,\"build.log\"),{stdout:it,stderr:Ue}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,Z),report:r}),x;try{switch(rt.type){case 0:x=await LT(Z,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break;case 1:x=await Yj(Z,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break}}catch(y){Ue.write(y.stack),x=1}if(it.end(),Ue.end(),x===0)return!0;ce.detachTemp(Ve);let w=`${Yr(this.configuration,Z)} couldn't be built successfully (exit code ${Ht(this.configuration,x,ht.NUMBER)}, logs can be found here: ${Ht(this.configuration,ke,ht.PATH)})`,b=this.optionalBuilds.has(Z.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),ehe&&r.reportFold(fe.fromPortablePath(ke),ce.readFileSync(ke,\"utf8\")),b}))return!1}return!0});Ae.push(...mt,Promise.allSettled(mt).then(j=>{ie.delete(se),j.every(rt=>rt.status===\"fulfilled\"&&rt.value===!0)&&Ce.set(Z.locatorHash,Re)}))}if(await Uu(Ae),ye===ie.size){let se=Array.from(ie).map(Z=>{let De=this.storedPackages.get(Z);if(!De)throw new Error(\"Assertion failed: The package should have been registered\");return Yr(this.configuration,De)}).join(\", \");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get(\"nodeLinker\");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise(\"Project validation\",{skipIfEmpty:!0},async()=>{this.configuration.get(\"enableOfflineMode\")&&e.report.reportWarning(90,\"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it\"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status=\"inactive\";let n=J.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await ce.readFilePromise(n,\"utf8\")}catch(E){throw E.code===\"ENOENT\"?new jt(28,\"The lockfile would have been created by this install, which is explicitly forbidden.\"):E}await e.report.startTimerPromise(\"Resolution step\",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise(\"Post-resolution validation\",{skipIfEmpty:!0},async()=>{dat(this,e.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let P=Ht(this.configuration,S,ht.PACKAGE_EXTENSION);switch(S.status){case\"inactive\":e.report.reportWarning(68,`${P}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case\"redundant\":e.report.reportWarning(69,`${P}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=Ed(c,this.generateLockfile());if(E!==c){let C=yde(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let S of C.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let P of S.lines)P.startsWith(\"+\")?e.report.reportError(28,Ht(this.configuration,P,ht.ADDED)):P.startsWith(\"-\")?e.report.reportError(28,Ht(this.configuration,P,ht.REMOVED)):e.report.reportInfo(null,Ht(this.configuration,P,\"grey\"))}e.report.reportSeparator()}throw new jt(28,\"The lockfile would have been modified by this install, which is explicitly forbidden.\")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status===\"active\"&&ze.telemetry?.reportPackageExtension(Xd(S,ht.PACKAGE_EXTENSION));await e.report.startTimerPromise(\"Fetch step\",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get(\"immutablePatterns\"))].sort():[],p=await Promise.all(f.map(async E=>DQ(E,{cwd:this.cwd})));(typeof e.persistProject>\"u\"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise(\"Link step\",async()=>{if(e.mode===\"update-lockfile\"){e.report.reportWarning(73,`Skipped due to ${Ht(this.configuration,\"mode=update-lockfile\",ht.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async C=>DQ(C,{cwd:this.cwd})));for(let C=0;C<f.length;++C)p[C]!==E[C]&&e.report.reportError(64,`The checksum for ${f[C]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise(\"Post-install validation\",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,c]of this.storedResolutions.entries()){let f=e.get(c);f||e.set(c,f=new Set),f.add(n)}let r={},{cacheKey:s}=Kr.getCacheKey(this.configuration);r.__metadata={version:WR,cacheKey:s};for(let[n,c]of e.entries()){let f=this.originalPackages.get(n);if(!f)continue;let p=[];for(let C of c){let S=this.storedDescriptors.get(C);if(!S)throw new Error(\"Assertion failed: The descriptor should have been registered\");p.push(S)}let h=p.map(C=>al(C)).sort().join(\", \"),E=new Ut;E.version=f.linkType===\"HARD\"?f.version:\"0.0.0-use.local\",E.languageName=f.languageName,E.dependencies=new Map(f.dependencies),E.peerDependencies=new Map(f.peerDependencies),E.dependenciesMeta=new Map(f.dependenciesMeta),E.peerDependenciesMeta=new Map(f.peerDependenciesMeta),E.bin=new Map(f.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:f.linkType.toLowerCase(),resolution:ll(f),checksum:this.storedChecksums.get(f.locatorHash),conditions:f.conditions||void 0}}return`${[`# This file is generated by running \"yarn install\" inside your project.\n`,`# Manual changes might be lost - proceed with caution!\n`].join(\"\")}\n`+nl(r)}async persistLockfile(){let e=J.join(this.cwd,Er.lockfile),r=\"\";try{r=await ce.readFilePromise(e,\"utf8\")}catch{}let s=this.generateLockfile(),a=Ed(r,s);a!==r&&(await ce.writeFilePromise(e,a),this.lockFileChecksum=wde(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(KG))e.push(...c);let r=Kd(this,e),s=zG.default.serialize(r),a=us(s);if(this.installStateChecksum===a)return;let n=this.configuration.get(\"installStatePath\");await ce.mkdirPromise(J.dirname(n),{recursive:!0}),await ce.writeFilePromise(n,await Aat(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get(\"installStatePath\"),n;try{let c=await pat(await ce.readFilePromise(a));n=zG.default.deserialize(c),this.installStateChecksum=us(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<\"u\"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,Kd(n,KG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,Kd(n,KG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new ki}),await this.persistInstallStateFile()}async persist(){let e=(0,qR.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get(\"enableGlobalCache\"))return null;let s=new Set([\".gitignore\"]);if(!q8(e.cwd,this.cwd)||!await ce.existsPromise(e.cwd))return null;let a=[];for(let c of await ce.readdirPromise(e.cwd)){if(s.has(c))continue;let f=J.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${Ht(this.configuration,J.basename(f),\"magenta\")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ce.lstatPromise(f).then(async p=>(await ce.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function mat(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,C=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(C={},C.lastUpdate=h?t.timeNow:n,C.lastTips=f,C.blocks=h?{}:t.state.blocks,C.displayedTips=t.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var ZI,Sde=Xe(()=>{Dt();yv();I0();pT();Pc();Rp();ZI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!ce.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&fn?Zf(fn,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue(\"version\",e.replace(/-git\\..*/,\"-git\"))}reportCommandName(e){this.reportValue(\"commandName\",e||\"<none>\")}reportPluginName(e){this.reportValue(\"pluginName\",e)}reportProject(e){this.reportEnumerator(\"projectCount\",e)}reportInstall(e){this.reportHit(\"installCount\",e)}reportPackageExtension(e){this.reportValue(\"packageExtension\",e)}reportWorkspaceCount(e){this.reportValue(\"workspaceCount\",String(e))}reportDependencyCount(e){this.reportValue(\"dependencyCount\",String(e))}reportValue(e,r){bp(this.values,e).add(r)}reportEnumerator(e,r){bp(this.enumerators,e).add(us(r))}reportHit(e,r=\"*\"){let s=q4(this.hits,e),a=Yl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get(\"globalFolder\");return J.join(e,\"telemetry.json\")}sendReport(e){let r=this.getRegistryPath(),s;try{s=ce.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=mat({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get(\"telemetryInterval\")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{ce.mkdirSync(J.dirname(r),{recursive:!0}),ce.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get(\"enableTips\")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=C=>cj(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let P=S;P.userId=C,P.reportType=\"primary\";for(let N of Object.keys(P.enumerators??{}))P.enumerators[N]=P.enumerators[N].length;E(P);let I=new Map,R=20;for(let[N,U]of Object.entries(P.values))U.length>0&&I.set(N,U.slice(0,R));for(;I.size>0;){let N={};N.userId=C,N.reportType=\"secondary\",N.metrics={};for(let[U,W]of I)N.metrics[U]=W.shift(),W.length===0&&I.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=ce.readJsonSync(e)}catch{r={}}let s=this.configuration.get(\"telemetryUserId\")??\"*\",a=r.blocks=r.blocks??{},n=a[s]=a[s]??{};for(let c of this.hits.keys()){let f=n.hits=n.hits??{},p=f[c]=f[c]??{};for(let[h,E]of this.hits.get(c))p[h]=(p[h]??0)+E}for(let c of[\"values\",\"enumerators\"])for(let f of this[c].keys()){let p=n[c]=n[c]??{};p[f]=[...new Set([...p[f]??[],...this[c].get(f)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),ce.mkdirSync(J.dirname(e),{recursive:!0}),ce.writeJsonSync(e,r)}startBuffer(){process.on(\"exit\",()=>{try{this.applyChanges()}catch{}})}}});var jv={};Vt(jv,{BuildDirectiveType:()=>_R,CACHE_CHECKPOINT:()=>OG,CACHE_VERSION:()=>UR,Cache:()=>Kr,Configuration:()=>ze,DEFAULT_RC_FILENAME:()=>dj,DurationUnit:()=>mj,FormatType:()=>upe,InstallMode:()=>$l,LEGACY_PLUGINS:()=>ov,LOCKFILE_VERSION:()=>WR,LegacyMigrationResolver:()=>KI,LightReport:()=>lA,LinkType:()=>VE,LockfileResolver:()=>zI,Manifest:()=>Ut,MessageName:()=>Br,MultiFetcher:()=>aI,PackageExtensionStatus:()=>J4,PackageExtensionType:()=>V4,PeerWarningType:()=>YR,Project:()=>Tt,Report:()=>Ao,ReportError:()=>jt,SettingsType:()=>wI,StreamReport:()=>Ot,TAG_REGEXP:()=>Mp,TelemetryManager:()=>ZI,ThrowReport:()=>ki,VirtualFetcher:()=>lI,WindowsLinkType:()=>IT,Workspace:()=>XI,WorkspaceFetcher:()=>cI,WorkspaceResolver:()=>Ei,YarnVersion:()=>fn,execUtils:()=>qr,folderUtils:()=>OQ,formatUtils:()=>he,hashUtils:()=>Nn,httpUtils:()=>nn,miscUtils:()=>je,nodeUtils:()=>Ui,parseMessageName:()=>jx,reportOptionDeprecations:()=>SI,scriptUtils:()=>In,semverUtils:()=>Fr,stringifyMessageName:()=>Yf,structUtils:()=>G,tgzUtils:()=>ps,treeUtils:()=>xs});var Ge=Xe(()=>{dT();LQ();xc();I0();pT();Pc();gT();zj();Rp();Wo();nde();ude();LG();av();av();pde();MG();hde();UG();oI();Gx();R8();vde();Tc();Ev();Sde();VG();N8();O8();tm();JG();yv();hle()});var Qde=_((WHt,qv)=>{\"use strict\";var Eat=process.env.TERM_PROGRAM===\"Hyper\",Iat=process.platform===\"win32\",Pde=process.platform===\"linux\",$G={ballotDisabled:\"\\u2612\",ballotOff:\"\\u2610\",ballotOn:\"\\u2611\",bullet:\"\\u2022\",bulletWhite:\"\\u25E6\",fullBlock:\"\\u2588\",heart:\"\\u2764\",identicalTo:\"\\u2261\",line:\"\\u2500\",mark:\"\\u203B\",middot:\"\\xB7\",minus:\"\\uFF0D\",multiplication:\"\\xD7\",obelus:\"\\xF7\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",pencilUpRight:\"\\u2710\",percent:\"%\",pilcrow2:\"\\u2761\",pilcrow:\"\\xB6\",plusMinus:\"\\xB1\",section:\"\\xA7\",starsOff:\"\\u2606\",starsOn:\"\\u2605\",upDownArrow:\"\\u2195\"},xde=Object.assign({},$G,{check:\"\\u221A\",cross:\"\\xD7\",ellipsisLarge:\"...\",ellipsis:\"...\",info:\"i\",question:\"?\",questionSmall:\"?\",pointer:\">\",pointerSmall:\"\\xBB\",radioOff:\"( )\",radioOn:\"(*)\",warning:\"\\u203C\"}),kde=Object.assign({},$G,{ballotCross:\"\\u2718\",check:\"\\u2714\",cross:\"\\u2716\",ellipsisLarge:\"\\u22EF\",ellipsis:\"\\u2026\",info:\"\\u2139\",question:\"?\",questionFull:\"\\uFF1F\",questionSmall:\"\\uFE56\",pointer:Pde?\"\\u25B8\":\"\\u276F\",pointerSmall:Pde?\"\\u2023\":\"\\u203A\",radioOff:\"\\u25EF\",radioOn:\"\\u25C9\",warning:\"\\u26A0\"});qv.exports=Iat&&!Eat?xde:kde;Reflect.defineProperty(qv.exports,\"common\",{enumerable:!1,value:$G});Reflect.defineProperty(qv.exports,\"windows\",{enumerable:!1,value:xde});Reflect.defineProperty(qv.exports,\"other\",{enumerable:!1,value:kde})});var Ju=_((YHt,e5)=>{\"use strict\";var Cat=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),wat=/[\\u001b\\u009b][[\\]#;?()]*(?:(?:(?:[^\\W_]*;?[^\\W_]*)\\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Tde=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};\"FORCE_COLOR\"in process.env&&(t.enabled=process.env.FORCE_COLOR!==\"0\");let e=n=>{let c=n.open=`\\x1B[${n.codes[0]}m`,f=n.close=`\\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\\\u001b\\\\[${n.codes[1]}m`,\"g\");return n.wrap=(h,E)=>{h.includes(f)&&(h=h.replace(p,f+c));let C=c+h+f;return E?C.replace(/\\r*\\n/g,`${f}$&${c}`):C},n},r=(n,c,f)=>typeof n==\"function\"?n(c):n.wrap(c,f),s=(n,c)=>{if(n===\"\"||n==null)return\"\";if(t.enabled===!1)return n;if(t.visible===!1)return\"\";let f=\"\"+n,p=f.includes(`\n`),h=c.length;for(h>0&&c.includes(\"unstyle\")&&(c=[...new Set([\"unstyle\",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a(\"reset\",[0,0],\"modifier\"),a(\"bold\",[1,22],\"modifier\"),a(\"dim\",[2,22],\"modifier\"),a(\"italic\",[3,23],\"modifier\"),a(\"underline\",[4,24],\"modifier\"),a(\"inverse\",[7,27],\"modifier\"),a(\"hidden\",[8,28],\"modifier\"),a(\"strikethrough\",[9,29],\"modifier\"),a(\"black\",[30,39],\"color\"),a(\"red\",[31,39],\"color\"),a(\"green\",[32,39],\"color\"),a(\"yellow\",[33,39],\"color\"),a(\"blue\",[34,39],\"color\"),a(\"magenta\",[35,39],\"color\"),a(\"cyan\",[36,39],\"color\"),a(\"white\",[37,39],\"color\"),a(\"gray\",[90,39],\"color\"),a(\"grey\",[90,39],\"color\"),a(\"bgBlack\",[40,49],\"bg\"),a(\"bgRed\",[41,49],\"bg\"),a(\"bgGreen\",[42,49],\"bg\"),a(\"bgYellow\",[43,49],\"bg\"),a(\"bgBlue\",[44,49],\"bg\"),a(\"bgMagenta\",[45,49],\"bg\"),a(\"bgCyan\",[46,49],\"bg\"),a(\"bgWhite\",[47,49],\"bg\"),a(\"blackBright\",[90,39],\"bright\"),a(\"redBright\",[91,39],\"bright\"),a(\"greenBright\",[92,39],\"bright\"),a(\"yellowBright\",[93,39],\"bright\"),a(\"blueBright\",[94,39],\"bright\"),a(\"magentaBright\",[95,39],\"bright\"),a(\"cyanBright\",[96,39],\"bright\"),a(\"whiteBright\",[97,39],\"bright\"),a(\"bgBlackBright\",[100,49],\"bgBright\"),a(\"bgRedBright\",[101,49],\"bgBright\"),a(\"bgGreenBright\",[102,49],\"bgBright\"),a(\"bgYellowBright\",[103,49],\"bgBright\"),a(\"bgBlueBright\",[104,49],\"bgBright\"),a(\"bgMagentaBright\",[105,49],\"bgBright\"),a(\"bgCyanBright\",[106,49],\"bgBright\"),a(\"bgWhiteBright\",[107,49],\"bgBright\"),t.ansiRegex=wat,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n==\"string\"&&n!==\"\"&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c==\"string\"?t[c]:c;if(typeof f!=\"function\")throw new TypeError(\"Expected alias to be the name of an existing color (string) or a function\");f.stack||(Reflect.defineProperty(f,\"name\",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!Cat(n))throw new TypeError(\"Expected theme to be an object\");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias(\"unstyle\",n=>typeof n==\"string\"&&n!==\"\"?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,\"\")):\"\"),t.alias(\"noop\",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Qde(),t.define=a,t};e5.exports=Tde();e5.exports.create=Tde});var Zo=_(pn=>{\"use strict\";var Bat=Object.prototype.toString,jc=Ju(),Rde=!1,t5=[],Fde={yellow:\"blue\",cyan:\"red\",green:\"magenta\",black:\"white\",blue:\"yellow\",red:\"cyan\",magenta:\"green\",white:\"black\"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&jc.hasColor(t);var JR=pn.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);pn.nativeType=t=>Bat.call(t).slice(8,-1).toLowerCase().replace(/\\s/g,\"\");pn.isAsyncFn=t=>pn.nativeType(t)===\"asyncfunction\";pn.isPrimitive=t=>t!=null&&typeof t!=\"object\"&&typeof t!=\"function\";pn.resolve=(t,e,...r)=>typeof e==\"function\"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};pn.swap=(t,e,r)=>{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[0]),process.platform===\"win32\"?r-1:r};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e==\"number\"&&(e={width:e});let{indent:r=\"\",newline:s=`\n`+r,width:a=80}=e,n=(s+r).match(/[^\\S\\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\\\s\\\\u200B]+|$)|[^\\\\s\\\\u200B]+?([\\\\s\\\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,\"g\"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\\n$/,\"\")),e.padEnd&&(h=h.map(E=>E.padEnd(a,\" \"))),e.padStart&&(h=h.map(E=>E.padStart(a,\" \"))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>jc.keys.color.includes(s));return e?jc[e]:t.stack.find(s=>s.slice(2)===\"bg\")?jc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):\"\";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s));if(e){let s=jc[\"bg\"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)===\"bg\");return r?jc[r.slice(2).toLowerCase()]||t:jc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)===\"bg\");if(e&&!r)return jc[Fde[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=Fde[s];return a&&jc[\"bg\"+pn.pascal(a)]||t}return jc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?\"pm\":\"am\";e=e%12;let a=e===0?12:e,n=r<10?\"0\"+r:r;return a+\":\"+n+\" \"+s};pn.set=(t={},e=\"\",r)=>e.split(\".\").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},t);pn.get=(t={},e=\"\",r)=>{let s=t[e]==null?e.split(\".\").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!JR(t))return e;if(!JR(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty(\"value\"))if(t.hasOwnProperty(r)&&JR(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);JR(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a==\"function\"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{Rde||(Rde=!0,t5.forEach(a=>a()),r===!0&&process.exit(128+s))};t5.length===0&&(process.once(\"SIGTERM\",e.bind(null,!0,15)),process.once(\"SIGINT\",e.bind(null,!0,2)),process.once(\"exit\",e)),t5.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var Nde=_(rC=>{\"use strict\";rC.ctrl={a:\"first\",b:\"backward\",c:\"cancel\",d:\"deleteForward\",e:\"last\",f:\"forward\",g:\"reset\",i:\"tab\",k:\"cutForward\",l:\"reset\",n:\"newItem\",m:\"cancel\",j:\"submit\",p:\"search\",r:\"remove\",s:\"save\",u:\"undo\",w:\"cutLeft\",x:\"toggleCursor\",v:\"paste\"};rC.shift={up:\"shiftUp\",down:\"shiftDown\",left:\"shiftLeft\",right:\"shiftRight\",tab:\"prev\"};rC.fn={up:\"pageUp\",down:\"pageDown\",left:\"pageLeft\",right:\"pageRight\",delete:\"deleteForward\"};rC.option={b:\"backward\",f:\"forward\",d:\"cutRight\",left:\"cutLeft\",up:\"altUp\",down:\"altDown\"};rC.keys={pageup:\"pageUp\",pagedown:\"pageDown\",home:\"home\",end:\"end\",cancel:\"cancel\",delete:\"deleteForward\",backspace:\"delete\",down:\"down\",enter:\"submit\",escape:\"cancel\",left:\"left\",space:\"space\",number:\"number\",return:\"submit\",right:\"right\",tab:\"next\",up:\"up\"}});var Mde=_((KHt,Lde)=>{\"use strict\";var Ode=Ie(\"readline\"),vat=Nde(),Sat=/^(?:\\x1b)([a-zA-Z0-9])$/,Dat=/^(?:\\x1b+)(O|N|\\[|\\[\\[)(?:(\\d+)(?:;(\\d+))?([~^$])|(?:1;)?(\\d+)?([a-zA-Z]))/,bat={OP:\"f1\",OQ:\"f2\",OR:\"f3\",OS:\"f4\",\"[11~\":\"f1\",\"[12~\":\"f2\",\"[13~\":\"f3\",\"[14~\":\"f4\",\"[[A\":\"f1\",\"[[B\":\"f2\",\"[[C\":\"f3\",\"[[D\":\"f4\",\"[[E\":\"f5\",\"[15~\":\"f5\",\"[17~\":\"f6\",\"[18~\":\"f7\",\"[19~\":\"f8\",\"[20~\":\"f9\",\"[21~\":\"f10\",\"[23~\":\"f11\",\"[24~\":\"f12\",\"[A\":\"up\",\"[B\":\"down\",\"[C\":\"right\",\"[D\":\"left\",\"[E\":\"clear\",\"[F\":\"end\",\"[H\":\"home\",OA:\"up\",OB:\"down\",OC:\"right\",OD:\"left\",OE:\"clear\",OF:\"end\",OH:\"home\",\"[1~\":\"home\",\"[2~\":\"insert\",\"[3~\":\"delete\",\"[4~\":\"end\",\"[5~\":\"pageup\",\"[6~\":\"pagedown\",\"[[5~\":\"pageup\",\"[[6~\":\"pagedown\",\"[7~\":\"home\",\"[8~\":\"end\",\"[a\":\"up\",\"[b\":\"down\",\"[c\":\"right\",\"[d\":\"left\",\"[e\":\"clear\",\"[2$\":\"insert\",\"[3$\":\"delete\",\"[5$\":\"pageup\",\"[6$\":\"pagedown\",\"[7$\":\"home\",\"[8$\":\"end\",Oa:\"up\",Ob:\"down\",Oc:\"right\",Od:\"left\",Oe:\"clear\",\"[2^\":\"insert\",\"[3^\":\"delete\",\"[5^\":\"pageup\",\"[6^\":\"pagedown\",\"[7^\":\"home\",\"[8^\":\"end\",\"[Z\":\"tab\"};function Pat(t){return[\"[a\",\"[b\",\"[c\",\"[d\",\"[e\",\"[2$\",\"[3$\",\"[5$\",\"[6$\",\"[7$\",\"[8$\",\"[Z\"].includes(t)}function xat(t){return[\"Oa\",\"Ob\",\"Oc\",\"Od\",\"Oe\",\"[2^\",\"[3^\",\"[5^\",\"[6^\",\"[7^\",\"[8^\"].includes(t)}var KR=(t=\"\",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t=\"\\x1B\"+String(t)):t=String(t):t!==void 0&&typeof t!=\"string\"?t=String(t):t||(t=s.sequence||\"\"),s.sequence=s.sequence||t||s.name,t===\"\\r\")s.raw=void 0,s.name=\"return\";else if(t===`\n`)s.name=\"enter\";else if(t===\"\t\")s.name=\"tab\";else if(t===\"\\b\"||t===\"\\x7F\"||t===\"\\x1B\\x7F\"||t===\"\\x1B\\b\")s.name=\"backspace\",s.meta=t.charAt(0)===\"\\x1B\";else if(t===\"\\x1B\"||t===\"\\x1B\\x1B\")s.name=\"escape\",s.meta=t.length===2;else if(t===\" \"||t===\"\\x1B \")s.name=\"space\",s.meta=t.length===2;else if(t<=\"\u001a\")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>=\"0\"&&t<=\"9\")s.name=\"number\";else if(t.length===1&&t>=\"a\"&&t<=\"z\")s.name=t;else if(t.length===1&&t>=\"A\"&&t<=\"Z\")s.name=t.toLowerCase(),s.shift=!0;else if(r=Sat.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Dat.exec(t)){let a=[...t];a[0]===\"\\x1B\"&&a[1]===\"\\x1B\"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(\"\"),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=bat[n],s.shift=Pat(n)||s.shift,s.ctrl=xat(n)||s.ctrl}return s};KR.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error(\"Invalid stream passed\");let s=Ode.createInterface({terminal:!0,input:r});Ode.emitKeypressEvents(r,s);let a=(f,p)=>e(f,KR(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on(\"keypress\",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener(\"keypress\",a),s.pause(),s.close()}};KR.action=(t,e,r)=>{let s={...vat,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};Lde.exports=KR});var _de=_((zHt,Ude)=>{\"use strict\";Ude.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s==\"number\"&&(s={interval:s}),kat(t,r,s)}};function kat(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,\"interval\",{value:n}),t.once(\"close\",()=>s.stop()),s.stop}});var jde=_((XHt,Hde)=>{\"use strict\";var{define:Qat,width:Tat}=Zo(),r5=class{constructor(e){let r=e.options;Qat(this,\"_prompt\",e),this.type=e.type,this.name=e.name,this.message=\"\",this.header=\"\",this.footer=\"\",this.error=\"\",this.hint=\"\",this.input=\"\",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt=\"\",this.buffer=\"\",this.width=Tat(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r==\"function\"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading==\"boolean\"?this._loading:this.loadingChoices?\"choices\":!1}get status(){return this.cancelled?\"cancelled\":this.submitted?\"submitted\":\"pending\"}};Hde.exports=r5});var qde=_((ZHt,Gde)=>{\"use strict\";var n5=Zo(),ho=Ju(),i5={default:ho.noop,noop:ho.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||n5.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||n5.complement(this.primary)},primary:ho.cyan,success:ho.green,danger:ho.magenta,strong:ho.bold,warning:ho.yellow,muted:ho.dim,disabled:ho.gray,dark:ho.dim.gray,underline:ho.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};i5.merge=(t={})=>{t.styles&&typeof t.styles.enabled==\"boolean\"&&(ho.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible==\"boolean\"&&(ho.visible=t.styles.visible);let e=n5.merge({},i5,t.styles);delete e.merge;for(let r of Object.keys(ho))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});for(let r of Object.keys(ho.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});return e};Gde.exports=i5});var Yde=_(($Ht,Wde)=>{\"use strict\";var s5=process.platform===\"win32\",zp=Ju(),Rat=Zo(),o5={...zp.symbols,upDownDoubleArrow:\"\\u21D5\",upDownDoubleArrow2:\"\\u2B0D\",upDownArrow:\"\\u2195\",asterisk:\"*\",asterism:\"\\u2042\",bulletWhite:\"\\u25E6\",electricArrow:\"\\u2301\",ellipsisLarge:\"\\u22EF\",ellipsisSmall:\"\\u2026\",fullBlock:\"\\u2588\",identicalTo:\"\\u2261\",indicator:zp.symbols.check,leftAngle:\"\\u2039\",mark:\"\\u203B\",minus:\"\\u2212\",multiplication:\"\\xD7\",obelus:\"\\xF7\",percent:\"%\",pilcrow:\"\\xB6\",pilcrow2:\"\\u2761\",pencilUpRight:\"\\u2710\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",plus:\"+\",plusMinus:\"\\xB1\",pointRight:\"\\u261E\",rightAngle:\"\\u203A\",section:\"\\xA7\",hexagon:{off:\"\\u2B21\",on:\"\\u2B22\",disabled:\"\\u2B22\"},ballot:{on:\"\\u2611\",off:\"\\u2610\",disabled:\"\\u2612\"},stars:{on:\"\\u2605\",off:\"\\u2606\",disabled:\"\\u2606\"},folder:{on:\"\\u25BC\",off:\"\\u25B6\",disabled:\"\\u25B6\"},prefix:{pending:zp.symbols.question,submitted:zp.symbols.check,cancelled:zp.symbols.cross},separator:{pending:zp.symbols.pointerSmall,submitted:zp.symbols.middot,cancelled:zp.symbols.middot},radio:{off:s5?\"( )\":\"\\u25EF\",on:s5?\"(*)\":\"\\u25C9\",disabled:s5?\"(|)\":\"\\u24BE\"},numbers:[\"\\u24EA\",\"\\u2460\",\"\\u2461\",\"\\u2462\",\"\\u2463\",\"\\u2464\",\"\\u2465\",\"\\u2466\",\"\\u2467\",\"\\u2468\",\"\\u2469\",\"\\u246A\",\"\\u246B\",\"\\u246C\",\"\\u246D\",\"\\u246E\",\"\\u246F\",\"\\u2470\",\"\\u2471\",\"\\u2472\",\"\\u2473\",\"\\u3251\",\"\\u3252\",\"\\u3253\",\"\\u3254\",\"\\u3255\",\"\\u3256\",\"\\u3257\",\"\\u3258\",\"\\u3259\",\"\\u325A\",\"\\u325B\",\"\\u325C\",\"\\u325D\",\"\\u325E\",\"\\u325F\",\"\\u32B1\",\"\\u32B2\",\"\\u32B3\",\"\\u32B4\",\"\\u32B5\",\"\\u32B6\",\"\\u32B7\",\"\\u32B8\",\"\\u32B9\",\"\\u32BA\",\"\\u32BB\",\"\\u32BC\",\"\\u32BD\",\"\\u32BE\",\"\\u32BF\"]};o5.merge=t=>{let e=Rat.merge({},zp.symbols,o5,t.symbols);return delete e.merge,e};Wde.exports=o5});var Jde=_((ejt,Vde)=>{\"use strict\";var Fat=qde(),Nat=Yde(),Oat=Zo();Vde.exports=t=>{t.options=Oat.merge({},t.options.theme,t.options),t.symbols=Nat.merge(t.options),t.styles=Fat.merge(t.options)}});var $de=_((Xde,Zde)=>{\"use strict\";var Kde=process.env.TERM_PROGRAM===\"Apple_Terminal\",Lat=Ju(),a5=Zo(),Ku=Zde.exports=Xde,_i=\"\\x1B[\",zde=\"\\x07\",l5=!1,j0=Ku.code={bell:zde,beep:zde,beginning:`${_i}G`,down:`${_i}J`,esc:_i,getPosition:`${_i}6n`,hide:`${_i}?25l`,line:`${_i}2K`,lineEnd:`${_i}K`,lineStart:`${_i}1K`,restorePosition:_i+(Kde?\"8\":\"u\"),savePosition:_i+(Kde?\"7\":\"s\"),screen:`${_i}2J`,show:`${_i}?25h`,up:`${_i}1J`},wm=Ku.cursor={get hidden(){return l5},hide(){return l5=!0,j0.hide},show(){return l5=!1,j0.show},forward:(t=1)=>`${_i}${t}C`,backward:(t=1)=>`${_i}${t}D`,nextLine:(t=1)=>`${_i}E`.repeat(t),prevLine:(t=1)=>`${_i}F`.repeat(t),up:(t=1)=>t?`${_i}${t}A`:\"\",down:(t=1)=>t?`${_i}${t}B`:\"\",right:(t=1)=>t?`${_i}${t}C`:\"\",left:(t=1)=>t?`${_i}${t}D`:\"\",to(t,e){return e?`${_i}${e+1};${t+1}H`:`${_i}${t+1}G`},move(t=0,e=0){let r=\"\";return r+=t<0?wm.left(-t):t>0?wm.right(t):\"\",r+=e<0?wm.up(-e):e>0?wm.down(e):\"\",r},restore(t={}){let{after:e,cursor:r,initial:s,input:a,prompt:n,size:c,value:f}=t;if(s=a5.isPrimitive(s)?String(s):\"\",a=a5.isPrimitive(a)?String(a):\"\",f=a5.isPrimitive(f)?String(f):\"\",c){let p=Ku.cursor.up(c)+Ku.cursor.to(n.length),h=a.length-r;return h>0&&(p+=Ku.cursor.left(h)),p}if(f||e){let p=!a&&s?-s.length:-a.length+r;return e&&(p-=e.length),a===\"\"&&s&&!n.includes(s)&&(p+=s.length),Ku.cursor.move(p)}}},c5=Ku.erase={screen:j0.screen,up:j0.up,down:j0.down,line:j0.line,lineEnd:j0.lineEnd,lineStart:j0.lineStart,lines(t){let e=\"\";for(let r=0;r<t;r++)e+=Ku.erase.line+(r<t-1?Ku.cursor.up(1):\"\");return t&&(e+=Ku.code.beginning),e}};Ku.clear=(t=\"\",e=process.stdout.columns)=>{if(!e)return c5.line+wm.to(0);let r=n=>[...Lat.unstyle(n)].length,s=t.split(/\\r?\\n/),a=0;for(let n of s)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(c5.line+wm.prevLine()).repeat(a-1)+c5.line+wm.to(0)}});var nC=_((tjt,tme)=>{\"use strict\";var Mat=Ie(\"events\"),eme=Ju(),u5=Mde(),Uat=_de(),_at=jde(),Hat=Jde(),pl=Zo(),Bm=$de(),f5=class t extends Mat{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,Hat(this),Uat(this),this.state=new _at(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=Gat(this.options.margin),this.setMaxListeners(0),jat(this)}async keypress(e,r={}){this.keypressed=!0;let s=u5.action(e,u5(e,r),this.options.actions);this.state.keypress=s,this.emit(\"keypress\",e,s),this.emit(\"state\",this.state.clone());let a=this.options[s.action]||this[s.action]||this.dispatch;if(typeof a==\"function\")return await a.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit(\"alert\"):this.stdout.write(Bm.code.beep)}cursorHide(){this.stdout.write(Bm.cursor.hide()),pl.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Bm.cursor.show())}write(e){e&&(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer=\"\",!(!r&&!e||this.options.show===!1)&&this.stdout.write(Bm.cursor.down(e)+Bm.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:a,initial:n=\"\",input:c=\"\",value:f=\"\"}=this,p=this.state.size=s.length,h={after:r,cursor:a,initial:n,input:c,prompt:e,size:p,value:f},E=Bm.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=eme.unstyle(s);let a=eme.unstyle(e),n=a.indexOf(s),c=a.slice(0,n),p=a.slice(n).split(`\n`),h=p[0],E=p[p.length-1],S=(s+(r?\" \"+r:\"\")).length,P=S<h.length?h.slice(S+1):\"\";return{header:c,prompt:h,after:P,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`\n`+this.symbols.pointer+\" \";typeof e==\"string\"?r+=e.trim():r+=\"Invalid input\",this.state.error=`\n`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit(\"submit\",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel==\"function\"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit(\"cancel\",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Bm.cursor.down(e.rest.length)),this.write(`\n`.repeat(r))}catch{}this.emit(\"close\")}start(){!this.stop&&this.options.show!==!1&&(this.stop=u5.listen(this,this.keypress.bind(this)),this.once(\"close\",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip==\"function\"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial==\"function\"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun==\"function\"&&await r.onRun.call(this,this),typeof r.onSubmit==\"function\"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error(\"expected prompt to have a custom render method\")}run(){return new Promise(async(e,r)=>{if(this.once(\"submit\",e),this.once(\"cancel\",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit(\"run\")})}async element(e,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E===\"\")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[e]?this.resolve(h,n,r,s):C}async prefix(){let e=await this.element(\"prefix\")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,pl.isObject(e)&&(e=e[s.status]||e.pending),pl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element(\"message\");return pl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element(\"separator\")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return pl.isObject(n)&&(n=n[s.status]||n.pending),pl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element(\"pointer\",e,r);if(typeof s==\"string\"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?\"on\":\"off\"]||s,this.state),p=pl.hasColor(f)?f:c(f);return n?p:\" \".repeat(f.length)}}async indicator(e,r){let s=await this.element(\"indicator\",e,r);if(typeof s==\"string\"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?\"on\":\"off\"]||s;return pl.hasColor(f)?f:c(f)}return\"\"}body(){return null}footer(){if(this.state.status===\"pending\")return this.element(\"footer\")}header(){if(this.state.status===\"pending\")return this.element(\"header\")}async hint(){if(this.state.status===\"pending\"&&!this.isValue(this.state.input)){let e=await this.element(\"hint\");return pl.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?\"\":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==\"\"}resolve(e,...r){return pl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||pl.height(this.stdout,25)}get width(){return this.options.columns||pl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function jat(t){let e=a=>t[a]===void 0||typeof t[a]==\"function\",r=[\"actions\",\"choices\",\"initial\",\"margin\",\"roles\",\"styles\",\"symbols\",\"theme\",\"timers\",\"value\"],s=[\"body\",\"footer\",\"error\",\"header\",\"hint\",\"indicator\",\"message\",\"prefix\",\"separator\",\"skip\"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n==\"function\"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!=\"function\"&&(t[a]=n)}}function Gat(t){typeof t==\"number\"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`\n`:\" \",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push(\"\")}return s}tme.exports=f5});var ime=_((rjt,nme)=>{\"use strict\";var qat=Zo(),rme={default(t,e){return e},checkbox(t,e){throw new Error(\"checkbox role is not implemented yet\")},editable(t,e){throw new Error(\"editable role is not implemented yet\")},expandable(t,e){throw new Error(\"expandable role is not implemented yet\")},heading(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||\"\",e},input(t,e){throw new Error(\"input role is not implemented yet\")},option(t,e){return rme.default(t,e)},radio(t,e){throw new Error(\"radio role is not implemented yet\")},separator(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};nme.exports=(t,e={})=>{let r=qat.merge({},rme,e.roles);return r[t]||r.default}});var Wv=_((njt,ame)=>{\"use strict\";var Wat=Ju(),Yat=nC(),Vat=ime(),zR=Zo(),{reorder:A5,scrollUp:Jat,scrollDown:Kat,isObject:sme,swap:zat}=zR,p5=class extends Yat{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=\"\"}async initialize(){typeof this.options.initial==\"function\"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!=\"function\"&&this.selectable.length===0)throw new Error(\"At least one choice must be selectable\");sme(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r==\"string\"&&(r=this.findIndex(r)),typeof r==\"number\"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c==\"function\"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(e,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){if(typeof e==\"function\"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e==\"string\"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=Vat(e.role,this.options)(this,e),typeof e.disabled==\"string\"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint=\"(disabled)\"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||\"\",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input=\"\",e.index=r,e.cursor=0,zR.define(e,\"parent\",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+\"  \":e.indent||\"\"),e.path=s?s.path+\".\"+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Wat.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==null&&typeof e.initial==\"function\"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit(\"choice\",e,r,this),typeof e.onChoice==\"function\"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:\"New choice name?\",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input=\"\",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?\"  \".repeat(e.level-1):\"\":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!=\"boolean\"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!=\"boolean\"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let s=e.parent;for(;s;){let a=s.choices.filter(n=>this.isDisabled(n));s.enabled=a.every(n=>n.enabled===!0),s=s.parent}return ome(this,this.choices),this.emit(\"toggle\",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let a=Number(s);if(a>this.choices.length-1)return this.alert();let n=this.focused,c=this.choices.find(f=>a===f.index);if(!c.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(c)===-1){let f=A5(this.choices),p=f.indexOf(c);if(n.index>p){let h=f.slice(p,p+this.limit),E=f.filter(C=>!h.includes(C));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=f.slice(h).concat(f.slice(0,h))}}return this.index=this.choices.indexOf(c),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let a=this.choices.length,n=this.num,c=(f=!1,p)=>{clearTimeout(this.numberTimeout),f&&(p=r(n)),this.num=\"\",s(p)};if(n===\"0\"||n.length===1&&+(n+\"0\")>a)return c(!0);if(Number(n)>a)return c(!1,this.alert());this.numberTimeout=setTimeout(()=>c(!0),this.delay)})}home(){return this.choices=A5(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=A5(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=Jat(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=Kat(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){zat(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&[\"disabled\",\"collapsed\",\"hidden\",\"completing\",\"readonly\"].some(s=>e[s]===!0)?!0:e&&e.role===\"heading\"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r=\"value\"){return[].concat(e||[]).reduce((s,a)=>(s[a]=this.find(a,r),s),{})}filter(e,r){let a=typeof e==\"function\"?e:(f,p)=>[f.name,p].includes(e),c=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?c.map(f=>f[r]):c}find(e,r){if(sme(e))return r?e[r]:e;let a=typeof e==\"function\"?e:(c,f)=>[c.name,f].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(c=>c.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&s!==!0&&(n=zR.reorder(n)),this.value=a?n.map(c=>c.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r==\"string\"||typeof r==\"number\"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return ome(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,a=e.limit||this._limit||r.limit||s.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!=\"string\"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function ome(t,e){if(e instanceof Promise)return e;if(typeof e==\"function\"){if(zR.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(a=>!t.isDisabled(a));r.enabled=s.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}ame.exports=p5});var G0=_((ijt,lme)=>{\"use strict\";var Xat=Wv(),h5=Zo(),g5=class extends Xat{constructor(e){super(e),this.emptyError=this.options.emptyError||\"No items were selected\"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):\"\"}indicator(e,r){return this.multiple?super.indicator(e,r):\"\"}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role===\"heading\"&&!h5.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return\":\"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||\"\"),c=await this.resolve(e.hint,this.state,e,r);c&&!h5.hasColor(c)&&(c=this.styles.muted(c));let f=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],f+a+n,p,this.margin[1],c].filter(Boolean).join(\" \");return e.role===\"heading\"?h():e.disabled?(h5.hasColor(p)||(p=this.styles.disabled(p)),h()):(s&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading===\"choices\")return this.styles.warning(\"Loading choices\");if(this.state.submitted)return\"\";let e=this.visible.map(async(n,c)=>await this.renderChoice(n,c)),r=await Promise.all(e);r.length||r.push(this.styles.danger(\"No matching choices\"));let s=this.margin[0]+r.join(`\n`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(`\n`)}format(){return!this.state.submitted||this.state.cancelled?\"\":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(\", \"):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s=\"\",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,\"\"].join(\" \"),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=\" \"+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};lme.exports=g5});var ume=_((sjt,cme)=>{\"use strict\";var Zat=G0(),$at=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},d5=class extends Zat{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest==\"function\")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return\"\"}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(\", \");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!==\"pending\")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=$at(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};cme.exports=d5});var y5=_((ojt,fme)=>{\"use strict\";var m5=Zo();fme.exports=(t,e={})=>{t.cursorHide();let{input:r=\"\",initial:s=\"\",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=m5.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,C=\" \",S=h(C);if(t.blink&&t.blink.off===!0&&(h=R=>R,S=\"\"),n&&a===0&&s===\"\"&&r===\"\")return h(C);if(n&&a===0&&(r===s||r===\"\"))return h(s[0])+f(s.slice(1));s=m5.isPrimitive(s)?`${s}`:\"\",r=m5.isPrimitive(r)?`${r}`:\"\";let P=s&&s.startsWith(r)&&s!==r,I=P?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=\"\"),n===!1&&(I=\"\"),P){let R=t.styles.unstyle(E+I);return E+I+f(s.slice(R.length))}return E+I}});var XR=_((ajt,Ame)=>{\"use strict\";var elt=Ju(),tlt=G0(),rlt=y5(),E5=class extends tlt{constructor(e){super({...e,multiple:!0}),this.type=\"form\",this.initial=this.options.initial,this.align=[this.options.align,\"right\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input=\"\",e.cursor=0,this.render()):this.alert()}separator(){return\"\"}format(e){return this.state.submitted?\"\":super.format(e)}pointer(){return\"\"}indicator(e){return e.input?\"\\u29BF\":\"\\u2299\"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||\":\";return s?\" \"+this.styles.disabled(s):\"\"}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c=\"\",name:f,hint:p,input:h=\"\"}=e,{muted:E,submitted:C,primary:S,danger:P}=a,I=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align===\"right\"&&(W=W.padStart(this.longest+1,\" \")),this.align===\"left\"&&(W=W.padEnd(this.longest+1,\" \"));let ee=this.values[f]=h||c,ie=h?\"success\":\"dark\";await N.call(e,ee,this.state)!==!0&&(ie=\"danger\");let ue=a[ie],le=ue(await this.indicator(e,r))+(e.pad||\"\"),me=this.indent(e),pe=()=>[me,le,W+U,h,I].filter(Boolean).join(\" \");if(s.submitted)return W=elt.unstyle(W),h=C(h),I=\"\",pe();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=rlt(this,{input:h,initial:c,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[f]=await e.result.call(this,ee,e,r)),R&&(W=S(W)),e.error?h+=(h?\" \":\"\")+P(e.error.trim()):e.hint&&(h+=(h?\" \":\"\")+E(e.hint.trim())),pe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Ame.exports=E5});var I5=_((ljt,hme)=>{\"use strict\";var nlt=XR(),ilt=()=>{throw new Error(\"expected prompt to have a custom authenticate method\")},pme=(t=ilt)=>{class e extends nlt{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return pme(s)}}return e};hme.exports=pme()});var mme=_((cjt,dme)=>{\"use strict\";var slt=I5();function olt(t,e){return t.username===this.options.username&&t.password===this.options.password}var gme=(t=olt)=>{let e=[{name:\"username\",message:\"username\"},{name:\"password\",message:\"password\",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends slt.create(t){constructor(a){super({...a,choices:e})}static create(a){return gme(a)}}return r};dme.exports=gme()});var ZR=_((ujt,yme)=>{\"use strict\";var alt=nC(),{isPrimitive:llt,hasColor:clt}=Zo(),C5=class extends alt{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return llt(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status===\"pending\"){let e=await this.element(\"hint\");return clt(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=this.styles.muted(this.default),f=[s,n,c,a].filter(Boolean).join(\" \");this.state.prompt=f;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),C=await this.error()||await this.hint(),S=await this.footer();C&&!f.includes(C)&&(E+=\" \"+C),f+=\" \"+E,this.clear(r),this.write([p,f,S].filter(Boolean).join(`\n`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};yme.exports=C5});var Ime=_((fjt,Eme)=>{\"use strict\";var ult=ZR(),w5=class extends ult{constructor(e){super(e),this.default=this.options.default||(this.initial?\"(Y/n)\":\"(y/N)\")}};Eme.exports=w5});var wme=_((Ajt,Cme)=>{\"use strict\";var flt=G0(),Alt=XR(),iC=Alt.prototype,B5=class extends flt{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,\"left\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e===\"a\"||e===\"i\")?super[e]():iC.dispatch.call(this,e,r)}append(e,r){return iC.append.call(this,e,r)}delete(e,r){return iC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?iC.next.call(this):super.next()}prev(){return this.focused.editable?iC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||\"\",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||\"\"}indent(e){return e.role===\"heading\"?\"\":e.editable?\" \":\"  \"}async renderChoice(e,r){return e.indent=\"\",e.editable?iC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return\"\"}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!=\"function\"||r.role===\"heading\")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||\"\":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e==\"string\"?e:\"Invalid Input\"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role===\"heading\"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||\"\":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Cme.exports=B5});var vm=_((pjt,Bme)=>{\"use strict\";var plt=nC(),hlt=y5(),{isPrimitive:glt}=Zo(),v5=class extends plt{constructor(e){super(e),this.initial=glt(this.initial)?String(this.initial):\"\",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name===\"return\"&&(!s||s.name!==\"return\")?this.append(`\n`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value=\"\",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),a=r.split(\" \");this.state.clipboard.push(a.pop()),this.input=a.join(\" \"),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):\"\";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):hlt(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(\" \");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=\" \"+p),n+=\" \"+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(`\n`)),this.restore()}};Bme.exports=v5});var Sme=_((hjt,vme)=>{\"use strict\";var dlt=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),$R=t=>dlt(t).filter(Boolean);vme.exports=(t,e={},r=\"\")=>{let{past:s=[],present:a=\"\"}=e,n,c;switch(t){case\"prev\":case\"undo\":return n=s.slice(0,s.length-1),c=s[s.length-1]||\"\",{past:$R([r,...n]),present:c};case\"next\":case\"redo\":return n=s.slice(1),c=s[0]||\"\",{past:$R([...n,r]),present:c};case\"save\":return{past:$R([...s,r]),present:\"\"};case\"remove\":return c=$R(s.filter(f=>f!==r)),a=\"\",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: \"${t}\"`)}}});var D5=_((gjt,bme)=>{\"use strict\";var mlt=vm(),Dme=Sme(),S5=class extends mlt{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get(\"values\")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Dme(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion(\"prev\")}altDown(){return this.completion(\"next\")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Dme(\"save\",this.data,this.input),this.store.set(\"values\",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};bme.exports=S5});var xme=_((djt,Pme)=>{\"use strict\";var ylt=vm(),b5=class extends ylt{format(){return\"\"}};Pme.exports=b5});var Qme=_((mjt,kme)=>{\"use strict\";var Elt=vm(),P5=class extends Elt{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||\"\"}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(\", \")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};kme.exports=P5});var Rme=_((yjt,Tme)=>{\"use strict\";var Ilt=G0(),x5=class extends Ilt{constructor(e){super({...e,multiple:!0})}};Tme.exports=x5});var Q5=_((Ejt,Fme)=>{\"use strict\";var Clt=vm(),k5=class extends Clt{constructor(e={}){super({style:\"number\",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:\"\",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e===\".\"&&this.input.includes(\".\")?this.alert(\"invalid number\"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format==\"function\"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=\"\"){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\\.)|(\\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};Fme.exports=k5});var Ome=_((Ijt,Nme)=>{Nme.exports=Q5()});var Mme=_((Cjt,Lme)=>{\"use strict\";var wlt=vm(),T5=class extends wlt{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):\"\"}};Lme.exports=T5});var Hme=_((wjt,_me)=>{\"use strict\";var Blt=Ju(),vlt=Wv(),Ume=Zo(),R5=class extends vlt{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||\"left\"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`\n   `;let r=e.startNumber||1;typeof this.scale==\"number\"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return\"\"}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(\", \"):\"\"}pointer(){return\"\"}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?\"\":[\"\",...this.scale.map(s=>`   ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`\n`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading==\"function\"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join(\"\").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(\" \".repeat(a)),f=\" \".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator==\"function\")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term===\"Hyper\"?\"\":\" \";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!Ume.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\\s+$/,\"\").padEnd(this.widths[0],\" \"),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),C=this.margin[1]+this.margin[3];this.scaleLength=Blt.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let P=Ume.wordWrap(h,{width:this.widths[0],newline:f}).split(`\n`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),P=P.map(I=>this.styles.info(I))),P[0]+=E,this.linebreak&&P.push(\"\"),[p+a,P.join(`\n`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return\"\";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(\" \"))].join(`\n`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=\"\";this.options.promptLine!==!1&&(c=[s,n,a,\"\"].join(\" \"),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),P=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=\" \"+E),e&&!p&&!C.trim()&&this.multiple&&P!=null&&(c+=this.styles.danger(P)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(`\n`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};_me.exports=R5});var qme=_((Bjt,Gme)=>{\"use strict\";var jme=Ju(),Slt=(t=\"\")=>typeof t==\"string\"?t.replace(/^['\"]|['\"]$/g,\"\"):\"\",N5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Slt(e.initial||this.field.initial||\"\"),this.message=e.message||this.name,this.cursor=0,this.input=\"\",this.lines=[]}},Dlt=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n==\"function\"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],P=I=>{I.line=h,c.push(I)};for(P({type:\"bos\",value:\"\"});E<n.length-1;){let I=C();if(/^[^\\S\\n ]$/.test(I)){P({type:\"text\",value:I});continue}if(I===`\n`){P({type:\"newline\",value:I}),h++;continue}if(I===\"\\\\\"){I+=C(),P({type:\"text\",value:I});continue}if((I===\"$\"||I===\"#\"||I===\"{\")&&S()===\"{\"){let N=C();I+=N;let U={type:\"template\",open:I,inner:\"\",close:\"\",value:I},W;for(;W=C();){if(W===\"}\"){S()===\"}\"&&(W+=C()),U.value+=W,U.close=W;break}W===\":\"?(U.initial=\"\",U.key=U.inner):U.initial!==void 0&&(U.initial+=W),U.value+=W,U.inner+=W}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),P(U),p.push(U.key),s.add(U.key);let ee=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),ee||(ee=new N5(U),f.push(ee)),ee.lines.push(U.line-1);continue}let R=c[c.length-1];R.type===\"text\"&&R.line===h?R.value+=I:P({type:\"text\",value:I})}return P({type:\"eos\",value:\"\"}),{input:n,tabstops:c,unique:s,keys:p,items:f}};Gme.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await Dlt(e,s),f=F5(\"result\",t,e),p=F5(\"format\",t,e),h=F5(\"validate\",t,e,!0),E=t.isValue.bind(t);return async(C={},S=!1)=>{let P=0;C.required=r,C.items=n,C.keys=c,C.output=\"\";let I=async(W,ee,ie,ue)=>{let le=await h(W,ee,ie,ue);return le===!1?\"Invalid field \"+ie.name:le};for(let W of a){let ee=W.value,ie=W.key;if(W.type!==\"template\"){ee&&(C.output+=ee);continue}if(W.type===\"template\"){let ue=n.find(Ce=>Ce.name===ie);e.required===!0&&C.required.add(ue.name);let le=[ue.input,C.values[ue.value],ue.value,ee].find(E),pe=(ue.field||{}).message||W.inner;if(S){let Ce=await I(C.values[ie],C,ue,P);if(Ce&&typeof Ce==\"string\"||Ce===!1){C.invalid.set(ie,Ce);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,ue,P);C.output+=jme.unstyle(g);continue}ue.placeholder=!1;let Be=ee;ee=await p(ee,C,ue,P),le!==ee?(C.values[ie]=le,ee=t.styles.typing(le),C.missing.delete(pe)):(C.values[ie]=void 0,le=`<${pe}>`,ee=t.styles.primary(le),ue.placeholder=!0,C.required.has(ie)&&C.missing.add(pe)),C.missing.has(pe)&&C.validating&&(ee=t.styles.warning(le)),C.invalid.has(ie)&&C.validating&&(ee=t.styles.danger(le)),P===C.index&&(Be!==ee?ee=t.styles.underline(ee):ee=t.styles.heading(jme.unstyle(ee))),P++}ee&&(C.output+=ee)}let R=C.output.split(`\n`).map(W=>\" \"+W),N=n.length,U=0;for(let W of n)C.invalid.has(W.name)&&W.lines.forEach(ee=>{R[ee][0]===\" \"&&(R[ee]=C.styles.danger(C.symbols.bullet)+R[ee].slice(1))}),t.isValue(C.values[W.name])&&U++;return C.completed=(U/N*100).toFixed(0),C.output=R.join(`\n`),C.output}};function F5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]==\"function\"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var Yme=_((vjt,Wme)=>{\"use strict\";var blt=Ju(),Plt=qme(),xlt=nC(),O5=class extends xlt{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Plt(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,`\n`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(\" \");this.state.prompt=h;let E=await this.header(),C=await this.error()||\"\",S=await this.hint()||\"\",P=s?\"\":await this.interpolate(this.state),I=this.state.key=r[e]||\"\",R=await this.format(I),N=await this.footer();R&&(h+=\" \"+R),S&&!R&&this.state.completed===0&&(h+=\" \"+S),this.clear(a);let U=[E,h,P,N,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!=\"function\"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f=\"\";for(let[p,h]of e)f+=`Invalid ${p}: ${h}\n`;return this.state.error=f,super.submit()}if(r.size)return this.state.error=\"Required: \"+[...r.keys()].join(\", \"),super.submit();let c=blt.unstyle(s).split(`\n`).map(f=>f.slice(1)).join(`\n`);return this.value={values:a,result:c},super.submit()}};Wme.exports=O5});var Jme=_((Sjt,Vme)=>{\"use strict\";var klt=\"(Use <shift>+<up/down> to sort)\",Qlt=G0(),L5=class extends Qlt{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,klt].find(this.isValue.bind(this))}indicator(){return\"\"}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+\" \",n=this.index===r&&this.sorting?this.styles.muted(a):\"  \";return this.options.drag===!1&&(n=\"\"),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Vme.exports=L5});var zme=_((Djt,Kme)=>{\"use strict\";var Tlt=Wv(),M5=class extends Tlt{constructor(e={}){if(super(e),this.emptyError=e.emptyError||\"No items were selected\",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=[\"\",\"4 - Strongly Agree\",\"3 - Agree\",\"2 - Neutral\",\"1 - Disagree\",\"0 - Strongly Disagree\",\"\"];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`\n   `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=Rlt(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return\"\"}pointer(){return\"\"}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return\"   \"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=this.term===\"Hyper\",n=a?9:8,c=a?\"\":\" \",f=this.symbols.line.repeat(n),p=\" \".repeat(n+(a?0:1)),h=ee=>(ee?this.styles.success(\"\\u25C9\"):\"\\u25EF\")+c,E=r+1+\".\",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),P=this.indent(e),I=P+e.scale.map((ee,ie)=>h(ie===e.scaleIdx)).join(f),R=ee=>ee===e.scaleIdx?C(ee):ee,N=P+e.scale.map((ee,ie)=>R(ie)).join(p),U=()=>[E,S].filter(Boolean).join(\" \"),W=()=>[U(),I,N,\" \"].filter(Boolean).join(`\n`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return\"\";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger(\"No matching choices\")),r.join(`\n`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(\", \"):\"\"}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(\" \");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=\" \"+p),h&&!c.includes(h)&&(c+=\" \"+h),e&&!p&&!E&&this.multiple&&this.type!==\"form\"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(`\n`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Rlt(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Kme.exports=M5});var Zme=_((bjt,Xme)=>{Xme.exports=D5()});var eye=_((Pjt,$me)=>{\"use strict\";var Flt=ZR(),U5=class extends Flt{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||\"no\",this.enabled=this.options.enabled||\"yes\",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e=\"\",r){switch(e.toLowerCase()){case\" \":return this.toggle();case\"1\":case\"y\":case\"t\":return this.enable();case\"0\":case\"n\":case\"f\":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(\" / \"))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(\" \");this.state.prompt=h,f&&!h.includes(f)&&(h+=\" \"+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};$me.exports=U5});var rye=_((xjt,tye)=>{\"use strict\";var Nlt=G0(),_5=class extends Nlt{constructor(e){if(super(e),typeof this.options.correctChoice!=\"number\"||this.options.correctChoice<0)throw new Error(\"Please specify the index of the correct answer from the list of choices\")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error(\"Please give at least two choices to the user\");if(this.options.correctChoice>s.length)throw new Error(\"Please specify the index of the correct answer from the list of choices\");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};tye.exports=_5});var iye=_(H5=>{\"use strict\";var nye=Zo(),ks=(t,e)=>{nye.defineExport(H5,t,e),nye.defineExport(H5,t.toLowerCase(),e)};ks(\"AutoComplete\",()=>ume());ks(\"BasicAuth\",()=>mme());ks(\"Confirm\",()=>Ime());ks(\"Editable\",()=>wme());ks(\"Form\",()=>XR());ks(\"Input\",()=>D5());ks(\"Invisible\",()=>xme());ks(\"List\",()=>Qme());ks(\"MultiSelect\",()=>Rme());ks(\"Numeral\",()=>Ome());ks(\"Password\",()=>Mme());ks(\"Scale\",()=>Hme());ks(\"Select\",()=>G0());ks(\"Snippet\",()=>Yme());ks(\"Sort\",()=>Jme());ks(\"Survey\",()=>zme());ks(\"Text\",()=>Zme());ks(\"Toggle\",()=>eye());ks(\"Quiz\",()=>rye())});var oye=_((Qjt,sye)=>{sye.exports={ArrayPrompt:Wv(),AuthPrompt:I5(),BooleanPrompt:ZR(),NumberPrompt:Q5(),StringPrompt:vm()}});var Vv=_((Tjt,lye)=>{\"use strict\";var aye=Ie(\"assert\"),G5=Ie(\"events\"),q0=Zo(),zu=class extends G5{constructor(e,r){super(),this.options=q0.merge({},e),this.answers={...r}}register(e,r){if(q0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}aye.equal(typeof r,\"function\",\"expected a function\");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r==\"function\"&&(r=await r.call(this)),await this.ask(q0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e==\"function\"&&(e=await e.call(this));let r=q0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=q0;if(typeof s==\"function\"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];aye(this.prompts[s],`Prompt \"${s}\" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on(\"submit\",E=>{this.emit(\"answer\",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit(\"prompt\",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill===\"show\"&&await f.submit()):p=f.value=await f.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||nC()}static get prompts(){return iye()}static get types(){return oye()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return q0.mixinEmitter(e,new G5),e}};q0.mixinEmitter(zu,new G5);var j5=zu.prompts;for(let t of Object.keys(j5)){let e=t.toLowerCase(),r=s=>new j5[t](s).run();zu.prompt[e]=r,zu[e]=r,zu[t]||Reflect.defineProperty(zu,t,{get:()=>j5[t]})}var Yv=t=>{q0.defineExport(zu,t,()=>zu.types[t])};Yv(\"ArrayPrompt\");Yv(\"AuthPrompt\");Yv(\"BooleanPrompt\");Yv(\"NumberPrompt\");Yv(\"StringPrompt\");lye.exports=zu});var dye=_((tGt,qlt)=>{qlt.exports={name:\"@yarnpkg/cli\",version:\"4.12.0\",license:\"BSD-2-Clause\",main:\"./sources/index.ts\",exports:{\".\":\"./sources/index.ts\",\"./polyfills\":\"./sources/polyfills.ts\",\"./package.json\":\"./package.json\"},dependencies:{\"@yarnpkg/core\":\"workspace:^\",\"@yarnpkg/fslib\":\"workspace:^\",\"@yarnpkg/libzip\":\"workspace:^\",\"@yarnpkg/parsers\":\"workspace:^\",\"@yarnpkg/plugin-catalog\":\"workspace:^\",\"@yarnpkg/plugin-compat\":\"workspace:^\",\"@yarnpkg/plugin-constraints\":\"workspace:^\",\"@yarnpkg/plugin-dlx\":\"workspace:^\",\"@yarnpkg/plugin-essentials\":\"workspace:^\",\"@yarnpkg/plugin-exec\":\"workspace:^\",\"@yarnpkg/plugin-file\":\"workspace:^\",\"@yarnpkg/plugin-git\":\"workspace:^\",\"@yarnpkg/plugin-github\":\"workspace:^\",\"@yarnpkg/plugin-http\":\"workspace:^\",\"@yarnpkg/plugin-init\":\"workspace:^\",\"@yarnpkg/plugin-interactive-tools\":\"workspace:^\",\"@yarnpkg/plugin-jsr\":\"workspace:^\",\"@yarnpkg/plugin-link\":\"workspace:^\",\"@yarnpkg/plugin-nm\":\"workspace:^\",\"@yarnpkg/plugin-npm\":\"workspace:^\",\"@yarnpkg/plugin-npm-cli\":\"workspace:^\",\"@yarnpkg/plugin-pack\":\"workspace:^\",\"@yarnpkg/plugin-patch\":\"workspace:^\",\"@yarnpkg/plugin-pnp\":\"workspace:^\",\"@yarnpkg/plugin-pnpm\":\"workspace:^\",\"@yarnpkg/plugin-stage\":\"workspace:^\",\"@yarnpkg/plugin-typescript\":\"workspace:^\",\"@yarnpkg/plugin-version\":\"workspace:^\",\"@yarnpkg/plugin-workspace-tools\":\"workspace:^\",\"@yarnpkg/shell\":\"workspace:^\",\"ci-info\":\"^4.0.0\",clipanion:\"^4.0.0-rc.2\",semver:\"^7.1.2\",tslib:\"^2.4.0\",typanion:\"^3.14.0\"},devDependencies:{\"@types/semver\":\"^7.1.0\",\"@yarnpkg/builder\":\"workspace:^\",\"@yarnpkg/monorepo\":\"workspace:^\",\"@yarnpkg/pnpify\":\"workspace:^\"},peerDependencies:{\"@yarnpkg/core\":\"workspace:^\"},scripts:{postpack:\"rm -rf lib\",prepack:'run build:compile \"$(pwd)\"',\"build:cli+hook\":\"run build:pnp:hook && builder build bundle\",\"build:cli\":\"builder build bundle\",\"run:cli\":\"builder run\",\"update-local\":\"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/\"},publishConfig:{main:\"./lib/index.js\",bin:null,exports:{\".\":\"./lib/index.js\",\"./package.json\":\"./package.json\"}},files:[\"/lib/**/*\",\"!/lib/pluginConfiguration.*\",\"!/lib/cli.*\"],\"@yarnpkg/builder\":{bundles:{standard:[\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-catalog\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]}},repository:{type:\"git\",url:\"git+https://github.com/yarnpkg/berry.git\",directory:\"packages/yarnpkg-cli\"},engines:{node:\">=18.12.0\"}}});var iq=_((R9t,Pye)=>{\"use strict\";Pye.exports=function(e,r){r===!0&&(r=0);var s=\"\";if(typeof e==\"string\")try{s=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(s=e.protocol);var a=s.split(/\\:|\\+/).filter(Boolean);return typeof r==\"number\"?a[r]:a}});var kye=_((F9t,xye)=>{\"use strict\";var uct=iq();function fct(t){var e={protocols:[],protocol:null,port:null,resource:\"\",host:\"\",user:\"\",password:\"\",pathname:\"\",hash:\"\",search:\"\",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=uct(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||\"\",e.password=r.password||\"\",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=[\"file\"],e.protocol=e.protocols[0],e.port=\"\",e.resource=\"\",e.user=\"\",e.pathname=\"\",e.hash=\"\",e.search=\"\",e.href=t,e.query={},e.parse_failed=!0}return e}xye.exports=fct});var Rye=_((N9t,Tye)=>{\"use strict\";var Act=kye();function pct(t){return t&&typeof t==\"object\"&&\"default\"in t?t:{default:t}}var hct=pct(Act),gct=\"text/plain\",dct=\"us-ascii\",Qye=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),mct=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:a,hash:n}=r.groups,c=s.split(\";\");n=e?\"\":n;let f=!1;c[c.length-1]===\"base64\"&&(c.pop(),f=!0);let p=(c.shift()||\"\").toLowerCase(),E=[...c.map(C=>{let[S,P=\"\"]=C.split(\"=\").map(I=>I.trim());return S===\"charset\"&&(P=P.toLowerCase(),P===dct)?\"\":`${S}${P?`=${P}`:\"\"}`}).filter(Boolean)];return f&&E.push(\"base64\"),(E.length>0||p&&p!==gct)&&E.unshift(p),`data:${E.join(\";\")},${f?a.trim():a}${n?`#${n}`:\"\"}`};function yct(t,e){if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return mct(t,e);if(/^view-source:/i.test(t))throw new Error(\"`view-source:` is not supported as it is a non-standard protocol\");let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash?a.hash=\"\":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,\"\")),a.pathname){let c=/\\b[a-z][a-z\\d+\\-.]{1,50}:\\/\\//g,f=0,p=\"\";for(;;){let E=c.exec(a.pathname);if(!E)break;let C=E[0],S=E.index,P=a.pathname.slice(f,S);p+=P.replace(/\\/{2,}/g,\"/\"),p+=C,f=S+C.length}let h=a.pathname.slice(f,a.pathname.length);p+=h.replace(/\\/{2,}/g,\"/\"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=a.pathname.split(\"/\"),f=c[c.length-1];Qye(f,e.removeDirectoryIndex)&&(c=c.slice(0,-1),a.pathname=c.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.(?!www\\.)[a-z\\-\\d]{1,63}\\.[a-z.\\-\\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let c of[...a.searchParams.keys()])Qye(c,e.removeQueryParameters)&&a.searchParams.delete(c);if(e.removeQueryParameters===!0&&(a.search=\"\"),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\"));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname===\"/\"&&!n.endsWith(\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&e.removeSingleSlash&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t}var sq=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\\/\\/)([\\w\\.\\-@]+)[\\/:]([\\~,\\.\\w,\\-,\\_,\\/]+?(?:\\.git|\\/)?)$/,s=n=>{let c=new Error(n);throw c.subject_url=t,c};(typeof t!=\"string\"||!t.trim())&&s(\"Invalid url.\"),t.length>sq.MAX_INPUT_LENGTH&&s(\"Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH.\"),e&&(typeof e!=\"object\"&&(e={stripHash:!1}),t=yct(t,e));let a=hct.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=[\"ssh\"],a.protocol=\"ssh\",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):s(\"URL parsing failed.\")}return a};sq.MAX_INPUT_LENGTH=2048;Tye.exports=sq});var Oye=_((O9t,Nye)=>{\"use strict\";var Ect=iq();function Fye(t){if(Array.isArray(t))return t.indexOf(\"ssh\")!==-1||t.indexOf(\"rsync\")!==-1;if(typeof t!=\"string\")return!1;var e=Ect(t);if(t=t.substring(t.indexOf(\"://\")+3),Fye(e))return!0;var r=new RegExp(\".([a-zA-Z\\\\d]+):(\\\\d+)/\");return!t.match(r)&&t.indexOf(\"@\")<t.indexOf(\":\")}Nye.exports=Fye});var Uye=_((L9t,Mye)=>{\"use strict\";var Ict=Rye(),Lye=Oye();function Cct(t){var e=Ict(t);return e.token=\"\",e.password===\"x-oauth-basic\"?e.token=e.user:e.user===\"x-token-auth\"&&(e.token=e.password),Lye(e.protocols)||e.protocols.length===0&&Lye(t)?e.protocol=\"ssh\":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol=\"file\",e.protocols=[\"file\"]),e.href=e.href.replace(/\\/$/,\"\"),e}Mye.exports=Cct});var Hye=_((M9t,_ye)=>{\"use strict\";var wct=Uye();function oq(t){if(typeof t!=\"string\")throw new Error(\"The url must be a string.\");var e=/^([a-z\\d-]{1,39})\\/([-\\.\\w]{1,100})$/i;e.test(t)&&(t=\"https://github.com/\"+t);var r=wct(t),s=r.resource.split(\".\"),a=null;switch(r.toString=function(N){return oq.stringify(this,N)},r.source=s.length>2?s.slice(1-s.length).join(\".\"):r.source=r.resource,r.git_suffix=/\\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\\/)|(\\/$)/g,\"\").replace(/\\.git$/,\"\")),r.owner=decodeURIComponent(r.user),r.source){case\"git.cloudforge.com\":r.owner=r.user,r.organization=s[0],r.source=\"cloudforge.com\";break;case\"visualstudio.com\":if(r.resource===\"vs-ssh.visualstudio.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+\"/\"+a[3]);break}else{a=r.name.split(\"/\"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name);break}case\"dev.azure.com\":case\"azure.com\":if(r.resource===\"ssh.dev.azure.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split(\"/\"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\\/+/g,\"\")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,\"\"));break}default:a=r.name.split(\"/\");var n=a.length-1;if(a.length>=2){var c=a.indexOf(\"-\",2),f=a.indexOf(\"blob\",2),p=a.indexOf(\"tree\",2),h=a.indexOf(\"commit\",2),E=a.indexOf(\"src\",2),C=a.indexOf(\"raw\",2),S=a.indexOf(\"edit\",2);n=c>0?c-1:f>0?f-1:p>0?p-1:h>0?h-1:E>0?E-1:C>0?C-1:S>0?S-1:n,r.owner=a.slice(0,n).join(\"/\"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref=\"\",r.filepathtype=\"\",r.filepath=\"\";var P=a.length>n&&a[n+1]===\"-\"?n+1:n;a.length>P+2&&[\"raw\",\"src\",\"blob\",\"tree\",\"edit\"].indexOf(a[P+1])>=0&&(r.filepathtype=a[P+1],r.ref=a[P+2],a.length>P+3&&(r.filepath=a.slice(P+3).join(\"/\"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+=\"/\"),r.full_name+=r.name)),r.owner.startsWith(\"scm/\")&&(r.source=\"bitbucket-server\",r.owner=r.owner.replace(\"scm/\",\"\"),r.organization=r.owner,r.full_name=r.owner+\"/\"+r.name);var I=/(projects|users)\\/(.*?)\\/repos\\/(.*?)((\\/.*$)|$)/,R=I.exec(r.pathname);return R!=null&&(r.source=\"bitbucket-server\",R[1]===\"users\"?r.owner=\"~\"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split(\"/\"),a.length>1&&([\"raw\",\"browse\"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join(\"/\"))):a[1]===\"commits\"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+\"/\"+r.name,r.query.at?r.ref=r.query.at:r.ref=\"\"),r}oq.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join(\"+\"):t.protocol);var r=t.port?\":\"+t.port:\"\",s=t.user||\"git\",a=t.git_suffix?\".git\":\"\";switch(e){case\"ssh\":return r?\"ssh://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a:s+\"@\"+t.resource+\":\"+t.full_name+a;case\"git+ssh\":case\"ssh+git\":case\"ftp\":case\"ftps\":return e+\"://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a;case\"http\":case\"https\":var n=t.token?Bct(t):t.user&&(t.protocols.includes(\"http\")||t.protocols.includes(\"https\"))?t.user+\"@\":\"\";return e+\"://\"+n+t.resource+r+\"/\"+vct(t)+a;default:return t.href}};function Bct(t){switch(t.source){case\"bitbucket.org\":return\"x-token-auth:\"+t.token+\"@\";default:return t.token+\"@\"}}function vct(t){switch(t.source){case\"bitbucket-server\":return\"scm/\"+t.full_name;default:return\"\"+t.full_name}}_ye.exports=oq});function jct(t,e){return e===1&&Hct.has(t[0])}function nS(t){let e=Array.isArray(t)?t:Mu(t);return e.map((s,a)=>Uct.test(s)?`[${s}]`:_ct.test(s)&&!jct(e,a)?`.${s}`:`[${JSON.stringify(s)}]`).join(\"\").replace(/^\\./,\"\")}function Gct(t,e){let r=[];if(e.methodName!==null&&r.push(he.pretty(t,e.methodName,he.Type.CODE)),e.file!==null){let s=[];s.push(he.pretty(t,e.file,he.Type.PATH)),e.line!==null&&(s.push(he.pretty(t,e.line,he.Type.NUMBER)),e.column!==null&&s.push(he.pretty(t,e.column,he.Type.NUMBER))),r.push(`(${s.join(he.pretty(t,\":\",\"grey\"))})`)}return r.join(\" \")}function iF(t,{manifestUpdates:e,reportedErrors:r},{fix:s}={}){let a=new Map,n=new Map,c=[...r.keys()].map(f=>[f,new Map]);for(let[f,p]of[...c,...e]){let h=r.get(f)?.map(P=>({text:P,fixable:!1}))??[],E=!1,C=t.getWorkspaceByCwd(f),S=C.manifest.exportTo({});for(let[P,I]of p){if(I.size>1){let R=[...I].map(([N,U])=>{let W=he.pretty(t.configuration,N,he.Type.INSPECT),ee=U.size>0?Gct(t.configuration,U.values().next().value):null;return ee!==null?`\n${W} at ${ee}`:`\n${W}`}).join(\"\");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,P,he.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=I,N=va(S,P);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!s){let U=typeof N>\"u\"?`Missing field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}`:typeof R>\"u\"?`Extraneous field ${he.pretty(t.configuration,P,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>\"u\"?A0(S,P):Jd(S,P,R),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function rEe(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\\n/);f.fixable&&(p[0]=`${he.pretty(e,\"\\u2699\",\"gray\")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var WC,Uct,_ct,Hct,iS=Xe(()=>{Ge();ql();WC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>\"u\")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>\"u\")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>\"u\"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>\"u\")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<\"u\"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},Uct=/^[0-9]+$/,_ct=/^[a-zA-Z0-9_]+$/,Hct=new Set([\"scripts\",...Ut.allDependencies])});var nEe=_((_Yt,vq)=>{var qct;(function(t){var e=function(){return{\"append/2\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"L\")]),new t.type.Term(\"foldl\",[new t.type.Term(\"append\",[]),new t.type.Var(\"X\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"L\")]))],\"append/3\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"X\"),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"append\",[new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"S\")]))],\"member/2\":[new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"_\")])]),null),new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]))],\"permutation/2\":[new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"permutation\",[new t.type.Var(\"T\"),new t.type.Var(\"P\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"P\")]),new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"Y\")]),new t.type.Var(\"S\")])])]))],\"maplist/2\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"X\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"Xs\")])]))],\"maplist/3\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\")])]))],\"maplist/4\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\")])]))],\"maplist/5\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\")])]))],\"maplist/6\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\")])]))],\"maplist/7\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\")])]))],\"maplist/8\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")]),new t.type.Term(\".\",[new t.type.Var(\"G\"),new t.type.Var(\"Gs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\"),new t.type.Var(\"G\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\"),new t.type.Var(\"Gs\")])]))],\"include/3\":[new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"A\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"A\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"F\"),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"F\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Var(\"S\")])]),new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"S\")])])])])]))],\"exclude/3\":[new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"E\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"Q\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"R\"),new t.type.Var(\"Q\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"!\",[]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"E\")])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"E\")])])])])])])]))],\"foldl/4\":[new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"I\"),new t.type.Var(\"I\")]),null),new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"I\"),new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"I\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])])])]),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P2\"),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P2\")]),new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"R\")])])])])]))],\"select/3\":[new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Ys\")]))],\"sum_list/2\":[new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"sum_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"+\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"max_list/2\":[new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"max_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"min_list/2\":[new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"min_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"=<\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"prod_list/2\":[new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"prod_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"*\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"last/2\":[new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\")]),new t.type.Term(\"last\",[new t.type.Var(\"Xs\"),new t.type.Var(\"X\")]))],\"prefix/2\":[new t.type.Rule(new t.type.Term(\"prefix\",[new t.type.Var(\"Part\"),new t.type.Var(\"Whole\")]),new t.type.Term(\"append\",[new t.type.Var(\"Part\"),new t.type.Var(\"_\"),new t.type.Var(\"Whole\")]))],\"nth0/3\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/3\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth0/4\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/4\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth/5\":[new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"N\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"O\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Y\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\",\",[new t.type.Term(\"is\",[new t.type.Var(\"M\"),new t.type.Term(\"+\",[new t.type.Var(\"N\"),new t.type.Num(1,!1)])]),new t.type.Term(\"nth\",[new t.type.Var(\"M\"),new t.type.Var(\"O\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Y\"),new t.type.Var(\"Ys\")])]))],\"length/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(!t.type.is_variable(f)&&!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(t.type.is_integer(f)&&f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else{var p=new t.type.Term(\"length\",[c,new t.type.Num(0,!1),f]);t.type.is_integer(f)&&(p=new t.type.Term(\",\",[p,new t.type.Term(\"!\",[])])),s.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},\"length/3\":[new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"N\"),new t.type.Var(\"N\")]),null),new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"X\")]),new t.type.Var(\"A\"),new t.type.Var(\"N\")]),new t.type.Term(\",\",[new t.type.Term(\"succ\",[new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"length\",[new t.type.Var(\"X\"),new t.type.Var(\"B\"),new t.type.Var(\"N\")])]))],\"replicate/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=new t.type.Term(\"[]\"),E=0;E<f.value;E++)h=new t.type.Term(\".\",[c,h]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[h,p])),a.substitution,a)])}},\"sort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=E.length-1;C>0;C--)E[C].equals(E[C-1])&&E.splice(C,1);for(var S=new t.type.Term(\"[]\"),C=E.length-1;C>=0;C--)S=new t.type.Term(\".\",[E[C],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"msort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=new t.type.Term(\"[]\"),S=E.length-1;S>=0;S--)C=new t.type.Term(\".\",[E[S],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,f])),a.substitution,a)])}}},\"keysort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h,E=c;E.indicator===\"./2\";){if(h=E.args[0],t.type.is_variable(h)){s.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!==\"-/2\"){s.throw_error(t.error.type(\"pair\",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var C=p.sort(t.compare),S=new t.type.Term(\"[]\"),P=C.length-1;P>=0;P--)S=new t.type.Term(\".\",[new t.type.Term(\"-\",[C[P],C[P].pair]),S]),delete C[P].pair;s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"take/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;if(h===0){for(var S=new t.type.Term(\"[]\"),h=E.length-1;h>=0;h--)S=new t.type.Term(\".\",[E[h],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,p])),a.substitution,a)])}}},\"drop/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;h===0&&s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p])),a.substitution,a)])}},\"reverse/2\":function(s,a,n){var c=n.args[0],f=n.args[1],p=t.type.is_instantiated_list(c),h=t.type.is_instantiated_list(f);if(t.type.is_variable(c)&&t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(c)&&!t.type.is_fully_list(c))s.throw_error(t.error.type(\"list\",c,n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!p&&!h)s.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?c:f,C=new t.type.Term(\"[]\",[]);E.indicator===\"./2\";)C=new t.type.Term(\".\",[E.args[0],C]),E=E.args[1];s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p?f:c])),a.substitution,a)])}},\"list_to_set/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else{for(var p=c,h=[];p.indicator===\"./2\";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!==\"[]/0\")s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=[],C=new t.type.Term(\"[]\",[]),S,P=0;P<h.length;P++){S=!1;for(var I=0;I<E.length&&!S;I++)S=t.compare(h[P],E[I])===0;S||E.push(h[P])}for(P=E.length-1;P>=0;P--)C=new t.type.Term(\".\",[E[P],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[f,C])),a.substitution,a)])}}}}},r=[\"append/2\",\"append/3\",\"member/2\",\"permutation/2\",\"maplist/2\",\"maplist/3\",\"maplist/4\",\"maplist/5\",\"maplist/6\",\"maplist/7\",\"maplist/8\",\"include/3\",\"exclude/3\",\"foldl/4\",\"sum_list/2\",\"max_list/2\",\"min_list/2\",\"prod_list/2\",\"last/2\",\"prefix/2\",\"nth0/3\",\"nth1/3\",\"nth0/4\",\"nth1/4\",\"length/2\",\"replicate/3\",\"select/3\",\"sort/2\",\"msort/2\",\"keysort/2\",\"take/3\",\"drop/3\",\"reverse/2\",\"list_to_set/2\"];typeof vq<\"u\"?vq.exports=function(s){t=s,new t.type.Module(\"lists\",e(),r)}:new t.type.Module(\"lists\",e(),r)})(qct)});var yEe=_($r=>{\"use strict\";var bm=process.platform===\"win32\",Sq=\"aes-256-cbc\",Wct=\"sha256\",oEe=\"The current environment doesn't support interactive reading from TTY.\",si=Ie(\"fs\"),iEe=process.binding(\"tty_wrap\").TTY,bq=Ie(\"child_process\"),V0=Ie(\"path\"),Pq={prompt:\"> \",hideEchoBack:!1,mask:\"*\",limit:[],limitMessage:\"Input another, please.$<( [)limit(])>\",defaultInput:\"\",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:\"utf8\",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},Xp=\"none\",Zu,VC,sEe=!1,Y0,oF,Dq,Yct=0,Rq=\"\",Dm=[],aF,aEe=!1,xq=!1,sS=!1;function lEe(t){function e(r){return r.replace(/[^\\w\\u0080-\\uFFFF]/g,function(s){return\"#\"+s.charCodeAt(0)+\";\"})}return oF.concat(function(r){var s=[];return Object.keys(r).forEach(function(a){r[a]===\"boolean\"?t[a]&&s.push(\"--\"+a):r[a]===\"string\"&&t[a]&&s.push(\"--\"+a,e(t[a]))}),s}({display:\"string\",displayOnly:\"boolean\",keyIn:\"boolean\",hideEchoBack:\"boolean\",mask:\"string\",limit:\"string\",caseSensitive:\"boolean\"}))}function Vct(t,e){function r(U){var W,ee=\"\",ie;for(Dq=Dq||Ie(\"os\").tmpdir();;){W=V0.join(Dq,U+ee);try{ie=si.openSync(W,\"wx\")}catch(ue){if(ue.code===\"EEXIST\"){ee++;continue}else throw ue}si.closeSync(ie);break}return W}var s,a,n,c={},f,p,h=r(\"readline-sync.stdout\"),E=r(\"readline-sync.stderr\"),C=r(\"readline-sync.exit\"),S=r(\"readline-sync.done\"),P=Ie(\"crypto\"),I,R,N;I=P.createHash(Wct),I.update(\"\"+process.pid+Yct+++Math.random()),N=I.digest(\"hex\"),R=P.createDecipher(Sq,N),s=lEe(t),bm?(a=process.env.ComSpec||\"cmd.exe\",process.env.Q='\"',n=[\"/V:ON\",\"/S\",\"/C\",\"(%Q%\"+a+\"%Q% /V:ON /S /C %Q%%Q%\"+Y0+\"%Q%\"+s.map(function(U){return\" %Q%\"+U+\"%Q%\"}).join(\"\")+\" & (echo !ERRORLEVEL!)>%Q%\"+C+\"%Q%%Q%) 2>%Q%\"+E+\"%Q% |%Q%\"+process.execPath+\"%Q% %Q%\"+__dirname+\"\\\\encrypt.js%Q% %Q%\"+Sq+\"%Q% %Q%\"+N+\"%Q% >%Q%\"+h+\"%Q% & (echo 1)>%Q%\"+S+\"%Q%\"]):(a=\"/bin/sh\",n=[\"-c\",'(\"'+Y0+'\"'+s.map(function(U){return\" '\"+U.replace(/'/g,\"'\\\\''\")+\"'\"}).join(\"\")+'; echo $?>\"'+C+'\") 2>\"'+E+'\" |\"'+process.execPath+'\" \"'+__dirname+'/encrypt.js\" \"'+Sq+'\" \"'+N+'\" >\"'+h+'\"; echo 1 >\"'+S+'\"']),sS&&sS(\"_execFileSync\",s);try{bq.spawn(a,n,e)}catch(U){c.error=new Error(U.message),c.error.method=\"_execFileSync - spawn\",c.error.program=a,c.error.args=n}for(;si.readFileSync(S,{encoding:t.encoding}).trim()!==\"1\";);return(f=si.readFileSync(C,{encoding:t.encoding}).trim())===\"0\"?c.input=R.update(si.readFileSync(h,{encoding:\"binary\"}),\"hex\",t.encoding)+R.final(t.encoding):(p=si.readFileSync(E,{encoding:t.encoding}).trim(),c.error=new Error(oEe+(p?`\n`+p:\"\")),c.error.method=\"_execFileSync\",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),si.unlinkSync(h),si.unlinkSync(E),si.unlinkSync(C),si.unlinkSync(S),c}function Jct(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(Y0||(bm?process.env.PSModulePath?(Y0=\"powershell.exe\",oF=[\"-ExecutionPolicy\",\"Bypass\",\"-File\",__dirname+\"\\\\read.ps1\"]):(Y0=\"cscript.exe\",oF=[\"//nologo\",__dirname+\"\\\\read.cs.js\"]):(Y0=\"/bin/sh\",oF=[__dirname+\"/read.sh\"])),bm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),bq.execFileSync){e=lEe(t),sS&&sS(\"execFileSync\",e);try{r.input=bq.execFileSync(Y0,e,a)}catch(n){s=n.stderr?(n.stderr+\"\").trim():\"\",r.error=new Error(oEe+(s?`\n`+s:\"\")),r.error.method=\"execFileSync\",r.error.program=Y0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Vct(t,a);return r.error||(r.input=r.input.replace(/^\\s*'|'\\s*$/g,\"\"),t.display=\"\"),r}function kq(t){var e=\"\",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Jct(t);if(n.error)throw n.error;return n.input}return xq&&xq(t),function(){var n,c,f;function p(){return n||(n=process.binding(\"fs\"),c=process.binding(\"constants\")),n}if(typeof Xp==\"string\")if(Xp=null,bm){if(f=function(h){var E=h.replace(/^\\D+/,\"\").split(\".\"),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),Xp=process.stdin.fd,VC=process.stdin._handle;else try{Xp=p().open(\"CONIN$\",c.O_RDWR,parseInt(\"0666\",8)),VC=new iEe(Xp,!0)}catch{}if(process.stdout.isTTY)Zu=process.stdout.fd;else{try{Zu=si.openSync(\"\\\\\\\\.\\\\CON\",\"w\")}catch{}if(typeof Zu!=\"number\")try{Zu=p().open(\"CONOUT$\",c.O_RDWR,parseInt(\"0666\",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Xp=si.openSync(\"/dev/tty\",\"r\"),VC=process.stdin._handle}catch{}}else try{Xp=si.openSync(\"/dev/tty\",\"r\"),VC=new iEe(Xp,!1)}catch{}if(process.stdout.isTTY)Zu=process.stdout.fd;else try{Zu=si.openSync(\"/dev/tty\",\"w\")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,C,S;aF=\"\";function P(I){return I===sEe?!0:VC.setRawMode(I)!==0?!1:(sEe=I,!0)}if(aEe||!VC||typeof Zu!=\"number\"&&(t.display||!f)){e=a();return}if(t.display&&(si.writeSync(Zu,t.display),t.display=\"\"),!t.displayOnly){if(!P(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp(\"[^\"+t.limit+\"]\",\"g\"+(t.caseSensitive?\"\":\"i\")));;){E=0;try{E=si.readSync(Xp,p,0,h)}catch(I){if(I.code!==\"EOF\"){P(!1),e+=a();return}}if(E>0?(C=p.toString(t.encoding,0,E),aF+=C):(C=`\n`,aF+=\"\\0\"),C&&typeof(S=(C.match(/^(.*?)[\\r\\n]/)||[])[1])==\"string\"&&(C=S,n=!0),C&&(C=C.replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g,\"\")),C&&c&&(C=C.replace(c,\"\")),C&&(f||(t.hideEchoBack?t.mask&&si.writeSync(Zu,new Array(C.length+1).join(t.mask)):si.writeSync(Zu,C)),e+=C),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&si.writeSync(Zu,`\n`),P(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?\"\":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`\n`),t.encoding),t.displayOnly?\"\":Rq=t.keepWhitespace||t.keyIn?e:e.trim()}function Kct(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function Fq(t){return t.replace(/[\\x00-\\x7f]/g,function(e){return\"\\\\x\"+(\"00\"+e.charCodeAt().toString(16)).substr(-2)})}function Vs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]==\"boolean\"&&(r=t.shift(),r&&(e=Object.keys(Pq),t.unshift(Pq))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty(\"noEchoBack\")&&!a.hasOwnProperty(\"hideEchoBack\")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty(\"noTrim\")&&!a.hasOwnProperty(\"keepWhitespace\")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case\"mask\":case\"limitMessage\":case\"defaultInput\":case\"encoding\":c=c!=null?c+\"\":\"\",c&&n!==\"limitMessage\"&&(c=c.replace(/[\\r\\n]/g,\"\")),s[n]=c;break;case\"bufferSize\":!isNaN(c=parseInt(c,10))&&typeof c==\"number\"&&(s[n]=c);break;case\"displayOnly\":case\"keyIn\":case\"hideEchoBack\":case\"caseSensitive\":case\"keepWhitespace\":case\"history\":case\"cd\":s[n]=!!c;break;case\"limit\":case\"trueValue\":case\"falseValue\":s[n]=Kct(c,function(f){var p=typeof f;return p===\"string\"||p===\"number\"||p===\"function\"||f instanceof RegExp}).map(function(f){return typeof f==\"string\"?f.replace(/[\\r\\n]/g,\"\"):f});break;case\"print\":case\"phContent\":case\"preCheck\":s[n]=typeof c==\"function\"?c:void 0;break;case\"prompt\":case\"display\":s[n]=c??\"\";break}})),s},{})}function Qq(t,e,r){return e.some(function(s){var a=typeof s;return a===\"string\"?r?t===s:t.toLowerCase()===s.toLowerCase():a===\"number\"?parseFloat(t)===s:a===\"function\"?s(t):s instanceof RegExp?s.test(t):!1})}function Nq(t,e){var r=V0.normalize(bm?(process.env.HOMEDRIVE||\"\")+(process.env.HOMEPATH||\"\"):process.env.HOME||\"\").replace(/[\\/\\\\]+$/,\"\");return t=V0.normalize(t),e?t.replace(/^~(?=\\/|\\\\|$)/,r):t.replace(new RegExp(\"^\"+Fq(r)+\"(?=\\\\/|\\\\\\\\|$)\",bm?\"i\":\"\"),\"~\")}function JC(t,e){var r=\"(?:\\\\(([\\\\s\\\\S]*?)\\\\))?(\\\\w+|.-.)(?:\\\\(([\\\\s\\\\S]*?)\\\\))?\",s=new RegExp(\"(\\\\$)?(\\\\$<\"+r+\">)\",\"g\"),a=new RegExp(\"(\\\\$)?(\\\\$\\\\{\"+r+\"\\\\})\",\"g\");function n(c,f,p,h,E,C){var S;return f||typeof(S=e(E))!=\"string\"?p:S?(h||\"\")+S+(C||\"\"):\"\"}return t.replace(s,n).replace(a,n)}function cEe(t,e,r){var s,a=[],n=-1,c=0,f=\"\",p;function h(E,C){return C.length>3?(E.push(C[0]+\"...\"+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=t.reduce(function(E,C){return E.concat((C+\"\").split(\"\"))},[]).reduce(function(E,C){var S,P;return e||(C=C.toLowerCase()),S=/^\\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(P=C.charCodeAt(0),S&&S===n&&P===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=P),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function uEe(t,e){return t.join(t.length>2?\", \":e?\" / \":\"/\")}function fEe(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!=\"string\")switch(t){case\"hideEchoBack\":case\"mask\":case\"defaultInput\":case\"caseSensitive\":case\"keepWhitespace\":case\"encoding\":case\"bufferSize\":case\"history\":case\"cd\":r=e.hasOwnProperty(t)?typeof e[t]==\"boolean\"?e[t]?\"on\":\"off\":e[t]+\"\":\"\";break;case\"limit\":case\"trueValue\":case\"falseValue\":s=e[e.hasOwnProperty(t+\"Src\")?t+\"Src\":t],e.keyIn?(a=cEe(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f===\"string\"||f===\"number\"}),r=uEe(s,a.suppressed);break;case\"limitCount\":case\"limitCountNotZero\":r=e[e.hasOwnProperty(\"limitSrc\")?\"limitSrc\":\"limit\"].length,r=r||t!==\"limitCountNotZero\"?r+\"\":\"\";break;case\"lastInput\":r=Rq;break;case\"cwd\":case\"CWD\":case\"cwdHome\":r=process.cwd(),t===\"CWD\"?r=V0.basename(r):t===\"cwdHome\"&&(r=Nq(r));break;case\"date\":case\"time\":case\"localeDate\":case\"localeTime\":r=new Date()[\"to\"+t.replace(/^./,function(c){return c.toUpperCase()})+\"String\"]();break;default:typeof(n=(t.match(/^history_m(\\d+)$/)||[])[1])==\"string\"&&(r=Dm[Dm.length-n]||\"\")}return r}function AEe(t){var e=/^(.)-(.)$/.exec(t),r=\"\",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function Tq(t){var e=new RegExp(/(\\s*)(?:(\"|')(.*?)(?:\\2|$)|(\\S+))/g),r,s=\"\",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||\"\",r[1]&&(a.push(s),s=\"\"),s+=n;return s&&a.push(s),a}function pEe(t,e){return e.trueValue.length&&Qq(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&Qq(t,e.falseValue,e.caseSensitive)?!1:t}function hEe(t){var e,r,s,a,n,c,f;function p(E){return fEe(E,t)}function h(E){t.display+=(/[^\\r\\n]$/.test(t.display)?`\n`:\"\")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit=\"\",t.display=JC(t.display+\"\",p);;){if(e=kq(t),r=!1,s=\"\",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\\s*\\!(?:\\!|-1)(:p)?\\s*$/.exec(e))?(n=Dm[0]||\"\",a[1]?r=!0:e=n,h(n+`\n`),r||(t.displayOnly=!0,kq(t),t.displayOnly=!1)):e&&e!==Dm[Dm.length-1]&&(Dm=[e])),!r&&t.cd&&e)switch(c=Tq(e),c[0].toLowerCase()){case\"cd\":if(c[1])try{process.chdir(Nq(c[1],!0))}catch(E){h(E+\"\")}r=!0;break;case\"pwd\":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(f=t.preCheck(e,t),e=f.res,f.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||Qq(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=JC(t.limitMessage,p))}h((s?s+`\n`:\"\")+JC(t.displaySrc+\"\",p))}return pEe(e,t)}$r._DBG_set_useExt=function(t){aEe=t};$r._DBG_set_checkOptions=function(t){xq=t};$r._DBG_set_checkMethod=function(t){sS=t};$r._DBG_clearHistory=function(){Rq=\"\",Dm=[]};$r.setDefaultOptions=function(t){return Pq=Vs(!0,t),Vs(!0)};$r.question=function(t,e){return hEe(Vs(Vs(!0,e),{display:t}))};$r.prompt=function(t){var e=Vs(!0,t);return e.display=e.prompt,hEe(e)};$r.keyIn=function(t,e){var r=Vs(Vs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a===\"string\"||a===\"number\"}).map(function(s){return JC(s+\"\",AEe)}),r.limit=Fq(r.limitSrc.join(\"\")),[\"trueValue\",\"falseValue\"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c===\"string\"||c===\"number\"?a=a.concat((n+\"\").split(\"\")):a.push(n),a},[])}),r.display=JC(r.display+\"\",function(s){return fEe(s,r)}),pEe(kq(r),r)};$r.questionEMail=function(t,e){return t==null&&(t=\"Input e-mail address: \"),$r.question(t,Vs({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:\"Input valid e-mail address, please.\",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};$r.questionNewPassword=function(t,e){var r,s,a,n=Vs({hideEchoBack:!0,mask:\"*\",limitMessage:`It can include: $<charlist>\nAnd the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(P){return P===\"charlist\"?r.text:P===\"length\"?s+\"...\"+a:null}}),c,f,p,h,E,C,S;for(e=e||{},c=JC(e.charlist?e.charlist+\"\":\"$<!-~>\",AEe),(isNaN(s=parseInt(e.min,10))||typeof s!=\"number\")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!=\"number\")&&(a=24),h=new RegExp(\"^[\"+Fq(c)+\"]{\"+s+\",\"+a+\"}$\"),r=cEe([c],n.caseSensitive,!0),r.text=uEe(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:\"Reinput a same one to confirm it: \",p=e.unmatchMessage!=null?e.unmatchMessage:\"It differs from first one. Hit only the Enter key if you want to retry from first one.\",t==null&&(t=\"Input new password: \"),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(t,n),n.limit=[C,\"\"],n.limitMessage=p,S=$r.question(f,n);return C};function gEe(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s==\"number\"}return $r.question(t,Vs({limitMessage:\"Input valid number, please.\"},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return gEe(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return gEe(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s=\"\",a=Vs({hideEchoBack:!1,limitMessage:`$<error(\n)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=Nq(n,!0),s=\"\";function h(E){E.split(/\\/|\\\\/).reduce(function(C,S){var P=V0.resolve(C+=S+V0.sep);if(!si.existsSync(P))si.mkdirSync(P);else if(!si.statSync(P).isDirectory())throw new Error(\"Non directory already exists: \"+P);return C},\"\")}try{if(c=si.existsSync(n),r=c?si.realpathSync(n):V0.resolve(n),!e.hasOwnProperty(\"exists\")&&!c||typeof e.exists==\"boolean\"&&e.exists!==c)return s=(c?\"Already exists\":\"No such file or directory\")+\": \"+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(V0.dirname(r)),si.closeSync(si.openSync(r,\"w\"))),r=si.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=si.statSync(r),e.isFile&&!f.isFile())return s=\"Not file: \"+r,!1;if(e.isDirectory&&!f.isDirectory())return s=\"Not directory: \"+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s=\"Size \"+f.size+\" is out of range: \"+r,!1}if(typeof e.validate==\"function\"&&(p=e.validate(r))!==!0)return typeof p==\"string\"&&(s=p),!1}catch(E){return s=E+\"\",!1}return!0},phContent:function(n){return n===\"error\"?s:n!==\"min\"&&n!==\"max\"?null:e.hasOwnProperty(n)?e[n]+\"\":\"\"}});return e=e||{},t==null&&(t='Input path (you can \"cd\" and \"pwd\"): '),$r.question(t,a),r};function dEe(t,e){var r={},s={};return typeof t==\"object\"?(Object.keys(t).forEach(function(a){typeof t[a]==\"function\"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=Tq(a),n=r.args[0]||\"\",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!==\"_\"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty(\"_\")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty(\"_\")||(r.limit=function(){var a=r.args[0]||\"\";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=Tq(a),r.hRes=typeof t==\"function\"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=dEe(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Vs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=dEe(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Vs({hideEchoBack:!1,history:!0},t,{prompt:function(){return bm?\"$<cwd>>\":(process.env.USER||\"\")+(process.env.HOSTNAME?\"@\"+process.env.HOSTNAME.replace(/\\..*$/,\"\"):\"\")+\":$<cwdHome>$ \"}()}))};function mEe(t,e,r){var s;return t==null&&(t=\"Are you sure? \"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s*:?\\s*$/,\"\")+\" [y/n]: \"),s=$r.keyIn(t,Vs(e,{hideEchoBack:!1,limit:r,trueValue:\"y\",falseValue:\"n\",caseSensitive:!1})),typeof s==\"boolean\"?s:\"\"}$r.keyInYN=function(t,e){return mEe(t,e)};$r.keyInYNStrict=function(t,e){return mEe(t,e,\"yn\")};$r.keyInPause=function(t,e){t==null&&(t=\"Continue...\"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s+$/,\"\")+\" (Hit any key)\"),$r.keyIn(t,Vs({limit:null},e,{hideEchoBack:!0,mask:\"\"}))};$r.keyInSelect=function(t,e,r){var s=Vs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p===\"itemsCount\"?t.length+\"\":p===\"firstItem\"?(t[0]+\"\").trim():p===\"lastItem\"?(t[t.length-1]+\"\").trim():null}}),a=\"\",n={},c=49,f=`\n`;if(!Array.isArray(t)||!t.length||t.length>35)throw\"`items` must be Array (max length: 35).\";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+=\"[\"+E+\"] \"+(p+\"\").trim()+`\n`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+=\"0\",n[0]=-1,f+=\"[0] \"+(r&&r.cancel!=null&&typeof r.cancel!=\"boolean\"?(r.cancel+\"\").trim():\"CANCEL\")+`\n`),s.limit=a,f+=`\n`,e==null&&(e=\"Choose one from list: \"),(e+=\"\")&&((!r||r.guide!==!1)&&(e=e.replace(/\\s*:?\\s*$/,\"\")+\" [$<limit>]: \"),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return aF};function oS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return oS(\"print\",arguments)};$r.setPrompt=function(){return oS(\"prompt\",arguments)};$r.setEncoding=function(){return oS(\"encoding\",arguments)};$r.setMask=function(){return oS(\"mask\",arguments)};$r.setBufferSize=function(){return oS(\"bufferSize\",arguments)}});var Oq=_((jYt,ec)=>{(function(){var t={major:0,minor:2,patch:66,status:\"beta\"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y===\"read\")return null;F={path:w,text:\"\",type:b,get:function(z,X){return X===this.text.length||X>this.text.length?\"end_of_file\":this.text.substring(X,X+z)},put:function(z,X){return X===\"end_of_file\"?(this.text+=z,!0):X===\"past_end_of_file\"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z===\"end_of_stream\")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X===\"end_of_stream\"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y===\"write\"&&(F.text=\"\"),F}},tau_user_input={buffer:\"\",get:function(w,b){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,b){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,b,y){var F=Ie(\"fs\"),z=F.openSync(w,y[0]);return y===\"read\"&&!F.existsSync(w)?null:{get:function(X,$){var oe=new Buffer(X);return F.readSync(z,oe,0,X,$),oe.toString()},put:function(X,$){var oe=Buffer.from(X);if($===\"end_of_file\")F.writeSync(z,oe);else{if($===\"past_end_of_file\")return null;F.writeSync(z,oe,0,oe.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:\"\",get:function(w,b){for(var y,F=yEe();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,b){return process.stdout.write(w),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(w,b){return w.indexOf(b)}:e=function(w,b){for(var y=w.length,F=0;F<y;F++)if(b===w[F])return F;return-1};var r=function(w,b){if(w.length!==0){for(var y=w[0],F=w.length,z=1;z<F;z++)y=b(y,w[z]);return y}},s;Array.prototype.map?s=function(w,b){return w.map(b)}:s=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)y.push(b(w[z]));return y};var a;Array.prototype.filter?a=function(w,b){return w.filter(b)}:a=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)b(w[z])&&y.push(w[z]);return y};var n;String.prototype.codePointAt?n=function(w,b){return w.codePointAt(b)}:n=function(w,b){return w.charCodeAt(b)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)|\\\\x([0-9a-fA-F]+)\\\\|\\\\([0-7]+)\\\\|(\\\\\\\\)|(\\\\')|('')|(\\\\\")|(\\\\`)|(\\\\.)|(.)/g,E={\"\\\\a\":7,\"\\\\b\":8,\"\\\\f\":12,\"\\\\n\":10,\"\\\\r\":13,\"\\\\t\":9,\"\\\\v\":11};function C(w){var b=[],y=!1;return w.replace(h,function(F,z,X,$,oe,xe,Te,lt,Ct,qt,ir,Pt,gn,Pr,Ir,Or,on){switch(!0){case Ct!==void 0:return b.push(parseInt(Ct,16)),\"\";case qt!==void 0:return b.push(parseInt(qt,8)),\"\";case ir!==void 0:case Pt!==void 0:case gn!==void 0:case Pr!==void 0:case Ir!==void 0:return b.push(n(F.substr(1),0)),\"\";case on!==void 0:return b.push(n(on,0)),\"\";case Or!==void 0:y=!0;default:return b.push(E[F]),\"\"}}),y?null:b}function S(w,b){var y=\"\";if(w.length<2)return w;try{w=w.replace(/\\\\([0-7]+)\\\\/g,function($,oe){return c(parseInt(oe,8))}),w=w.replace(/\\\\x([0-9a-fA-F]+)\\\\/g,function($,oe){return c(parseInt(oe,16))})}catch{return null}for(var F=0;F<w.length;F++){var z=w.charAt(F),X=w.charAt(F+1);if(z===b&&X===b)F++,y+=b;else if(z===\"\\\\\")if([\"a\",\"b\",\"f\",\"n\",\"r\",\"t\",\"v\",\"'\",'\"',\"\\\\\",\"a\",\"\\b\",\"\\f\",`\n`,\"\\r\",\"\t\",\"\\v\"].indexOf(X)!==-1)switch(F+=1,X){case\"a\":y+=\"a\";break;case\"b\":y+=\"\\b\";break;case\"f\":y+=\"\\f\";break;case\"n\":y+=`\n`;break;case\"r\":y+=\"\\r\";break;case\"t\":y+=\"\t\";break;case\"v\":y+=\"\\v\";break;case\"'\":y+=\"'\";break;case'\"':y+='\"';break;case\"\\\\\":y+=\"\\\\\";break}else return null;else y+=z}return y}function P(w){for(var b=\"\",y=0;y<w.length;y++)switch(w.charAt(y)){case\"'\":b+=\"\\\\'\";break;case\"\\\\\":b+=\"\\\\\\\\\";break;case\"\\b\":b+=\"\\\\b\";break;case\"\\f\":b+=\"\\\\f\";break;case`\n`:b+=\"\\\\n\";break;case\"\\r\":b+=\"\\\\r\";break;case\"\t\":b+=\"\\\\t\";break;case\"\\v\":b+=\"\\\\v\";break;default:b+=w.charAt(y);break}return b}function I(w){var b=w.substr(2);switch(w.substr(0,2).toLowerCase()){case\"0x\":return parseInt(b,16);case\"0b\":return parseInt(b,2);case\"0o\":return parseInt(b,8);case\"0'\":return C(b)[0];default:return parseFloat(w)}}var R={whitespace:/^\\s*(?:(?:%.*)|(?:\\/\\*(?:\\n|\\r|.)*?\\*\\/)|(?:\\s+))\\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\\!|,|;|[a-z][0-9a-zA-Z_]*|[#\\$\\&\\*\\+\\-\\.\\/\\:\\<\\=\\>\\?\\@\\^\\~\\\\]+|'(?:[^']*?(?:\\\\(?:x?\\d+)?\\\\)*(?:'')*(?:\\\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\\\[abfnrtv\\\\'\"`]|\\\\x?\\d+\\\\|[^\\\\])|\\d+(?:\\.\\d+(?:[eE][+-]?\\d+)?)?)/,string:/^(?:\"([^\"]|\"\"|\\\\\")*\"|`([^`]|``|\\\\`)*`)/,l_brace:/^(?:\\[)/,r_brace:/^(?:\\])/,l_bracket:/^(?:\\{)/,r_bracket:/^(?:\\})/,bar:/^(?:\\|)/,l_paren:/^(?:\\()/,r_paren:/^(?:\\))/};function N(w,b){return w.get_flag(\"char_conversion\").id===\"on\"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text=\"\",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,X=[],$=!1;if(w){var oe=this.tokens[w-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\\s*$/.test(b))return null;for(;b!==\"\";){var xe=[],Te=!1;if(/^\\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\\n/,\"\"),$=!0;continue}for(var lt in R)if(R.hasOwnProperty(lt)){var Ct=R[lt].exec(b);Ct&&xe.push({value:Ct[0],name:lt,matches:Ct})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:\"lexical\",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,\"\"),z+=oe.value.length,y+=oe.value.length,oe.name){case\"atom\":oe.raw=oe.value,oe.value.charAt(0)===\"'\"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),\"'\"),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\"));break;case\"number\":oe.float=oe.value.substring(0,2)!==\"0x\"&&oe.value.match(/[.eE]/)!==null&&oe.value!==\"0'.\",oe.value=I(oe.value),oe.blank=Te;break;case\"string\":var qt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),qt),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\");break;case\"whitespace\":var ir=X[X.length-1];ir&&(ir.space=!0),Te=!0;continue;case\"r_bracket\":X.length>0&&X[X.length-1].name===\"l_bracket\"&&(oe=X.pop(),oe.name=\"atom\",oe.value=\"{}\",oe.raw=\"{}\",oe.space=!1);break;case\"r_brace\":X.length>0&&X[X.length-1].name===\"l_brace\"&&(oe=X.pop(),oe.name=\"atom\",oe.value=\"[]\",oe.raw=\"[]\",oe.space=!1);break}oe.len=y,X.push(oe),Te=!1}var Pt=this.set_last_tokens(X);return Pt.length===0?null:Pt};function W(w,b,y,F,z){if(!b[y])return{type:f,value:x.error.syntax(b[y-1],\"expression expected\",!0)};var X;if(F===\"0\"){var $=b[y];switch($.name){case\"number\":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case\"variable\":return{type:p,len:y+1,value:new x.type.Var($.value)};case\"string\":var oe;switch(w.get_flag(\"double_quotes\").id){case\"atom\":oe=new j($.value,[]);break;case\"codes\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Num(n($.value,xe),!1),oe]);break;case\"chars\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case\"l_paren\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_paren\"?(Pt.len++,Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\") or operator expected\",!b[Pt.len])};case\"l_bracket\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_bracket\"?(Pt.len++,Pt.value=new j(\"{}\",[Pt.value]),Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\"} or operator expected\",!b[Pt.len])}}var Te=ee(w,b,y,z);return Te.type===p||Te.derived||(Te=ie(w,b,y),Te.type===p||Te.derived)?Te:{type:f,derived:!1,value:x.error.syntax(b[y],\"unexpected token\")}}var lt=w.__get_max_priority(),Ct=w.__get_next_priority(F),qt=y;if(b[y].name===\"atom\"&&b[y+1]&&(b[y].space||b[y+1].name!==\"l_paren\")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf(\"fy\")>-1){var Pt=W(w,b,y,F,z);if(Pt.type!==f)return $.value===\"-\"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}else if(ir&&ir.indexOf(\"fx\")>-1){var Pt=W(w,b,y,Ct,z);if(Pt.type!==f)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}}y=qt;var Pt=W(w,b,y,Ct,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name===\"atom\"&&w.__lookup_operator_classes(F,$.value)||b[y].name===\"bar\"&&w.__lookup_operator_classes(F,\"|\"))){var gn=Ct,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"xf\")>-1)return{value:new x.type.Term($.value,[Pt.value]),len:++Pt.len,type:p};if(ir.indexOf(\"xfx\")>-1){var Ir=W(w,b,y+1,gn,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(ir.indexOf(\"xfy\")>-1){var Ir=W(w,b,y+1,Pr,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(Pt.type!==f)for(;;){y=Pt.len;var $=b[y];if($&&$.name===\"atom\"&&w.__lookup_operator_classes(F,$.value)){var ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"yf\")>-1)Pt={value:new x.type.Term($.value,[Pt.value]),len:++y,type:p};else if(ir.indexOf(\"yfx\")>-1){var Ir=W(w,b,++y,gn,z);if(Ir.type===f)return Ir.derived=!0,Ir;y=Ir.len,Pt={value:new x.type.Term($.value,[Pt.value,Ir.value]),len:y,type:p}}else break}else break}}else X={type:f,value:x.error.syntax(b[Pt.len-1],\"operator expected\")};return Pt}return Pt}function ee(w,b,y,F){if(!b[y]||b[y].name===\"atom\"&&b[y].raw===\".\"&&!F&&(b[y].space||!b[y+1]||b[y+1].name!==\"l_paren\"))return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"unfounded token\")};var z=b[y],X=[];if(b[y].name===\"atom\"&&b[y].raw!==\",\"){if(y++,b[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,X)};if(b[y]&&b[y].name===\"l_paren\"){if(b[y+1]&&b[y+1].name===\"r_paren\")return{type:f,derived:!0,value:x.error.syntax(b[y+1],\"argument expected\")};var $=W(w,b,++y,\"999\",!0);if($.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\"argument expected\",!b[y])};for(X.push($.value),y=$.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if($=W(w,b,y+1,\"999\",!0),$.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};X.push($.value),y=$.len}if(b[y]&&b[y].name===\"r_paren\")y++;else return{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\", or ) expected\",!b[y])}}return{type:p,len:y,value:new x.type.Term(z.value,X)}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"term expected\")}}function ie(w,b,y){if(!b[y])return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"[ expected\")};if(b[y]&&b[y].name===\"l_brace\"){var F=W(w,b,++y,\"999\",!0),z=[F.value],X=void 0;if(F.type===f)return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:new x.type.Term(\"[]\",[])}:{type:f,derived:!0,value:x.error.syntax(b[y],\"] expected\")};for(y=F.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if(F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};z.push(F.value),y=F.len}var $=!1;if(b[y]&&b[y].name===\"bar\"){if($=!0,F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};X=F.value,y=F.len}return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:g(z,X)}:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],$?\"] expected\":\", or | or ] expected\",!b[y])}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"list expected\")}}function ue(w,b,y){var F=b[y].line,z=W(w,b,y,w.__get_max_priority(),!1),X=null,$;if(z.type!==f)if(y=z.len,b[y]&&b[y].name===\"atom\"&&b[y].raw===\".\")if(y++,x.type.is_term(z.value)){if(z.value.indicator===\":-/2\"?(X=new x.type.Rule(z.value.args[0],Ce(z.value.args[1])),$={value:X,len:y,type:p}):z.value.indicator===\"-->/2\"?(X=pe(new x.type.Rule(z.value.args[0],z.value.args[1]),w),X.body=Ce(X.body),$={value:X,len:y,type:x.type.is_rule(X)?p:f}):(X=new x.type.Rule(z.value,null),$={value:X,len:y,type:p}),X){var oe=X.singleton_variables();oe.length>0&&w.throw_warning(x.warning.singleton(oe,X.head.indicator,F))}return $}else return{type:f,value:x.error.syntax(b[y],\"callable expected\")};else return{type:f,value:x.error.syntax(b[y]?b[y]:b[y-1],\". or operator expected\")};return z}function le(w,b,y){y=y||{},y.from=y.from?y.from:\"$tau-js\",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),z={},X;F.new_text(b);var $=0,oe=F.get_tokens($);do{if(oe===null||!oe[$])break;var xe=ue(w,oe,$);if(xe.type===f)return new j(\"throw\",[xe.value]);if(xe.value.body===null&&xe.value.head.indicator===\"?-/1\"){var Te=new it(w.session);Te.add_goal(xe.value.head.args[0]),Te.answer(function(Ct){x.type.is_error(Ct)?w.throw_warning(Ct.args[0]):(Ct===!1||Ct===null)&&w.throw_warning(x.warning.failed_goal(xe.value.head.args[0],xe.len))}),$=xe.len;var lt=!0}else if(xe.value.body===null&&xe.value.head.indicator===\":-/1\"){var lt=w.run_directive(xe.value.head.args[0]);$=xe.len,xe.value.head.args[0].indicator===\"char_conversion/2\"&&(oe=F.get_tokens($),$=0)}else{X=xe.value.head.indicator,y.reconsult!==!1&&z[X]!==!0&&!w.is_multifile_predicate(X)&&(w.session.rules[X]=a(w.session.rules[X]||[],function(qt){return qt.dynamic}),z[X]=!0);var lt=w.add_rule(xe.value,y);$=xe.len}if(!lt)return lt}while(!0);return!0}function me(w,b){var y=new U(w);y.new_text(b);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var X=W(w,z,0,w.__get_max_priority(),!1);if(X.type!==f){var $=X.len,oe=$;if(z[$]&&z[$].name===\"atom\"&&z[$].raw===\".\")w.add_goal(Ce(X.value));else{var xe=z[$];return new j(\"throw\",[x.error.syntax(xe||z[$-1],\". or operator expected\",!xe)])}F=X.len+1}else return new j(\"throw\",[X.value])}while(!0);return!0}function pe(w,b){w=w.rename(b);var y=b.next_free_variable(),F=Be(w.body,y,b);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new j(w.head.id,w.head.args),w)}function Be(w,b,y){var F;if(x.type.is_term(w)&&w.indicator===\"!/0\")return{value:w,variable:b,error:!1};if(x.type.is_term(w)&&w.indicator===\",/2\"){var z=Be(w.args[0],b,y);if(z.error)return z;var X=Be(w.args[1],z.variable,y);return X.error?X:{value:new j(\",\",[z.value,X.value]),variable:X.variable,error:!1}}else{if(x.type.is_term(w)&&w.indicator===\"{}/1\")return{value:w.args[0],variable:b,error:!1};if(x.type.is_empty_list(w))return{value:new j(\"true\",[]),variable:b,error:!1};if(x.type.is_list(w)){F=y.next_free_variable();for(var $=w,oe;$.indicator===\"./2\";)oe=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation(\"DCG\"),variable:b,error:!0}:x.type.is_empty_list($)?(oe.args[1]=F,{value:new j(\"=\",[b,w]),variable:F,error:!1}):{value:x.error.type(\"list\",w,\"DCG\"),variable:b,error:!0}}else return x.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([b,F]),w=new j(w.id,w.args),{value:w,variable:F,error:!1}):{value:x.error.type(\"callable\",w,\"DCG\"),variable:b,error:!0}}}function Ce(w){return x.type.is_variable(w)?new j(\"call\",[w]):x.type.is_term(w)&&[\",/2\",\";/2\",\"->/2\"].indexOf(w.indicator)!==-1?new j(w.id,[Ce(w.args[0]),Ce(w.args[1])]):w}function g(w,b){for(var y=b||new x.type.Term(\"[]\",[]),F=w.length-1;F>=0;F--)y=new x.type.Term(\".\",[w[F],y]);return y}function we(w,b){for(var y=w.length-1;y>=0;y--)w[y]===b&&w.splice(y,1)}function ye(w){for(var b={},y=[],F=0;F<w.length;F++)w[F]in b||(y.push(w[F]),b[w[F]]=!0);return y}function Ae(w,b,y,F){if(w.session.rules[y]!==null){for(var z=0;z<w.session.rules[y].length;z++)if(w.session.rules[y][z]===F){w.session.rules[y].splice(z,1),w.success(b);break}}}function se(w){return function(b,y,F){var z=F.args[0],X=F.args.slice(1,w);if(x.type.is_variable(z))b.throw_error(x.error.instantiation(b.level));else if(!x.type.is_callable(z))b.throw_error(x.error.type(\"callable\",z,b.level));else{var $=new j(z.id,z.args.concat(X));b.prepend([new Pe(y.goal.replace($),y.substitution,y)])}}}function Z(w){for(var b=w.length-1;b>=0;b--)if(w.charAt(b)===\"/\")return new j(\"/\",[new j(w.substring(0,b)),new Re(parseInt(w.substring(b+1)),!1)])}function De(w){this.id=w}function Re(w,b){this.is_float=b!==void 0?b:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var mt=0;function j(w,b,y){this.ref=y||++mt,this.id=w,this.args=b||[],this.indicator=w+\"/\"+this.args.length}var rt=0;function Fe(w,b,y,F,z,X){this.id=rt++,this.stream=w,this.mode=b,this.alias=y,this.type=F!==void 0?F:\"text\",this.reposition=z!==void 0?z:!0,this.eof_action=X!==void 0?X:\"eof_code\",this.position=this.mode===\"append\"?\"end_of_stream\":0,this.output=this.mode===\"write\"||this.mode===\"append\",this.input=this.mode===\"read\"}function Ne(w){w=w||{},this.links=w}function Pe(w,b,y){b=b||new Ne,y=y||null,this.goal=w,this.substitution=b,this.parent=y}function Ve(w,b,y){this.head=w,this.body=b,this.dynamic=y||!1}function ke(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new it(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Fe(typeof ec<\"u\"&&ec.exports?nodejs_user_input:tau_user_input,\"read\",\"user_input\",\"text\",!1,\"reset\"),user_output:new Fe(typeof ec<\"u\"&&ec.exports?nodejs_user_output:tau_user_output,\"write\",\"user_output\",\"text\",!1,\"eof_code\")},this.file_system=typeof ec<\"u\"&&ec.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(b){return b.substitution},this.format_error=function(b){return b.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{\":-\":[\"fx\",\"xfx\"],\"-->\":[\"xfx\"],\"?-\":[\"fx\"]},1100:{\";\":[\"xfy\"]},1050:{\"->\":[\"xfy\"]},1e3:{\",\":[\"xfy\"]},900:{\"\\\\+\":[\"fy\"]},700:{\"=\":[\"xfx\"],\"\\\\=\":[\"xfx\"],\"==\":[\"xfx\"],\"\\\\==\":[\"xfx\"],\"@<\":[\"xfx\"],\"@=<\":[\"xfx\"],\"@>\":[\"xfx\"],\"@>=\":[\"xfx\"],\"=..\":[\"xfx\"],is:[\"xfx\"],\"=:=\":[\"xfx\"],\"=\\\\=\":[\"xfx\"],\"<\":[\"xfx\"],\"=<\":[\"xfx\"],\">\":[\"xfx\"],\">=\":[\"xfx\"]},600:{\":\":[\"xfy\"]},500:{\"+\":[\"yfx\"],\"-\":[\"yfx\"],\"/\\\\\":[\"yfx\"],\"\\\\/\":[\"yfx\"]},400:{\"*\":[\"yfx\"],\"/\":[\"yfx\"],\"//\":[\"yfx\"],rem:[\"yfx\"],mod:[\"yfx\"],\"<<\":[\"yfx\"],\">>\":[\"yfx\"]},200:{\"**\":[\"xfx\"],\"^\":[\"xfy\"],\"-\":[\"fy\"],\"+\":[\"fy\"],\"\\\\\":[\"fy\"]}}}function it(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level=\"top_level/0\",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function Ue(w,b,y){this.id=w,this.rules=b,this.exports=y,x.module[w]=this}Ue.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},De.prototype.unify=function(w,b){if(b&&e(w.variables(),this.id)!==-1&&!x.type.is_variable(w))return null;var y={};return y[this.id]=w,new Ne(y)},Re.prototype.unify=function(w,b){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new Ne:null},j.prototype.unify=function(w,b){if(x.type.is_term(w)&&this.indicator===w.indicator){for(var y=new Ne,F=0;F<this.args.length;F++){var z=x.unify(this.args[F].apply(y),w.args[F].apply(y),b);if(z===null)return null;for(var X in z.links)y.links[X]=z.links[X];y=y.apply(z)}return y}return null},Fe.prototype.unify=function(w,b){return x.type.is_stream(w)&&this.id===w.id?new Ne:null},De.prototype.toString=function(w){return this.id},Re.prototype.toString=function(w){return this.is_float&&e(this.value.toString(),\".\")===-1?this.value+\".0\":this.value.toString()},j.prototype.toString=function(w,b,y){if(w=w||{},w.quoted=w.quoted===void 0?!0:w.quoted,w.ignore_ops=w.ignore_ops===void 0?!1:w.ignore_ops,w.numbervars=w.numbervars===void 0?!1:w.numbervars,b=b===void 0?1200:b,y=y===void 0?\"\":y,w.numbervars&&this.indicator===\"$VAR/1\"&&x.type.is_integer(this.args[0])&&this.args[0].value>=0){var F=this.args[0].value,z=Math.floor(F/26),X=F%26;return\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[X]+(z!==0?z:\"\")}switch(this.indicator){case\"[]/0\":case\"{}/0\":case\"!/0\":return this.id;case\"{}/1\":return\"{\"+this.args[0].toString(w)+\"}\";case\"./2\":for(var $=\"[\"+this.args[0].toString(w),oe=this.args[1];oe.indicator===\"./2\";)$+=\", \"+oe.args[0].toString(w),oe=oe.args[1];return oe.indicator!==\"[]/0\"&&($+=\"|\"+oe.toString(w)),$+=\"]\",$;case\",/2\":return\"(\"+this.args[0].toString(w)+\", \"+this.args[1].toString(w)+\")\";default:var xe=this.id,Te=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Te===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(xe)&&xe!==\"{}\"&&xe!==\"[]\"&&(xe=\"'\"+P(xe)+\"'\"),xe+(this.args.length?\"(\"+s(this.args,function(ir){return ir.toString(w)}).join(\", \")+\")\":\"\");var lt=Te.priority>b.priority||Te.priority===b.priority&&(Te.class===\"xfy\"&&this.indicator!==b.indicator||Te.class===\"yfx\"&&this.indicator!==b.indicator||this.indicator===b.indicator&&Te.class===\"yfx\"&&y===\"right\"||this.indicator===b.indicator&&Te.class===\"xfy\"&&y===\"left\");Te.indicator=this.indicator;var Ct=lt?\"(\":\"\",qt=lt?\")\":\"\";return this.args.length===0?\"(\"+this.id+\")\":[\"fy\",\"fx\"].indexOf(Te.class)!==-1?Ct+xe+\" \"+this.args[0].toString(w,Te)+qt:[\"yf\",\"xf\"].indexOf(Te.class)!==-1?Ct+this.args[0].toString(w,Te)+\" \"+xe+qt:Ct+this.args[0].toString(w,Te,\"left\")+\" \"+this.id+\" \"+this.args[1].toString(w,Te,\"right\")+qt}},Fe.prototype.toString=function(w){return\"<stream>(\"+this.id+\")\"},Ne.prototype.toString=function(w){var b=\"{\";for(var y in this.links)this.links.hasOwnProperty(y)&&(b!==\"{\"&&(b+=\", \"),b+=y+\"/\"+this.links[y].toString(w));return b+=\"}\",b},Pe.prototype.toString=function(w){return this.goal===null?\"<\"+this.substitution.toString(w)+\">\":\"<\"+this.goal.toString(w)+\", \"+this.substitution.toString(w)+\">\"},Ve.prototype.toString=function(w){return this.body?this.head.toString(w)+\" :- \"+this.body.toString(w)+\".\":this.head.toString(w)+\".\"},ke.prototype.toString=function(w){for(var b=\"\",y=0;y<this.modules.length;y++)b+=\":- use_module(library(\"+this.modules[y]+`)).\n`;b+=`\n`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)b+=this.rules[key][y].toString(w),b+=`\n`;return b},De.prototype.clone=function(){return new De(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},j.prototype.clone=function(){return new j(this.id,s(this.args,function(w){return w.clone()}))},Fe.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ne.prototype.clone=function(){var w={};for(var b in this.links)this.links.hasOwnProperty(b)&&(w[b]=this.links[b].clone());return new Ne(w)},Pe.prototype.clone=function(){return new Pe(this.goal.clone(),this.substitution.clone(),this.parent)},Ve.prototype.clone=function(){return new Ve(this.head.clone(),this.body!==null?this.body.clone():null)},De.prototype.equals=function(w){return x.type.is_variable(w)&&this.id===w.id},Re.prototype.equals=function(w){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},j.prototype.equals=function(w){if(!x.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(w.args[b]))return!1;return!0},Fe.prototype.equals=function(w){return x.type.is_stream(w)&&this.id===w.id},Ne.prototype.equals=function(w){var b;if(!x.type.is_substitution(w))return!1;for(b in this.links)if(this.links.hasOwnProperty(b)&&(!w.links[b]||!this.links[b].equals(w.links[b])))return!1;for(b in w.links)if(w.links.hasOwnProperty(b)&&!this.links[b])return!1;return!0},Pe.prototype.equals=function(w){return x.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},Ve.prototype.equals=function(w){return x.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},De.prototype.rename=function(w){return w.get_free_variable(this)},Re.prototype.rename=function(w){return this},j.prototype.rename=function(w){return new j(this.id,s(this.args,function(b){return b.rename(w)}))},Fe.prototype.rename=function(w){return this},Ve.prototype.rename=function(w){return new Ve(this.head.rename(w),this.body!==null?this.body.rename(w):null)},De.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},j.prototype.variables=function(){return[].concat.apply([],s(this.args,function(w){return w.variables()}))},Fe.prototype.variables=function(){return[]},Ve.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},De.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Re.prototype.apply=function(w){return this},j.prototype.apply=function(w){if(this.indicator===\"./2\"){for(var b=[],y=this;y.indicator===\"./2\";)b.push(y.args[0].apply(w)),y=y.args[1];for(var F=y.apply(w),z=b.length-1;z>=0;z--)F=new j(\".\",[b[z],F]);return F}return new j(this.id,s(this.args,function(X){return X.apply(w)}),this.ref)},Fe.prototype.apply=function(w){return this},Ve.prototype.apply=function(w){return new Ve(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Ne.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new Ne(y)},j.prototype.select=function(){for(var w=this;w.indicator===\",/2\";)w=w.args[0];return w},j.prototype.replace=function(w){return this.indicator===\",/2\"?this.args[0].indicator===\",/2\"?new j(\",\",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new j(\",\",[w,this.args[1]]):w},j.prototype.search=function(w){if(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;b<this.args.length;b++)if(x.type.is_term(this.args[b])&&this.args[b].search(w))return!0;return!1},ke.prototype.get_current_input=function(){return this.current_input},it.prototype.get_current_input=function(){return this.session.get_current_input()},ke.prototype.get_current_output=function(){return this.current_output},it.prototype.get_current_output=function(){return this.session.get_current_output()},ke.prototype.set_current_input=function(w){this.current_input=w},it.prototype.set_current_input=function(w){return this.session.set_current_input(w)},ke.prototype.set_current_output=function(w){this.current_input=w},it.prototype.set_current_output=function(w){return this.session.set_current_output(w)},ke.prototype.get_stream_by_alias=function(w){return this.streams[w]},it.prototype.get_stream_by_alias=function(w){return this.session.get_stream_by_alias(w)},ke.prototype.file_system_open=function(w,b,y){return this.file_system.open(w,b,y)},it.prototype.file_system_open=function(w,b,y){return this.session.file_system_open(w,b,y)},ke.prototype.get_char_conversion=function(w){return this.__char_conversion[w]||w},it.prototype.get_char_conversion=function(w){return this.session.get_char_conversion(w)},ke.prototype.parse=function(w){return this.thread.parse(w)},it.prototype.parse=function(w){var b=new U(this);b.new_text(w);var y=b.get_tokens();if(y===null)return!1;var F=W(this,y,0,this.__get_max_priority(),!1);return F.len!==y.length?!1:{value:F.value,expr:F,tokens:y}},ke.prototype.get_flag=function(w){return this.flag[w]},it.prototype.get_flag=function(w){return this.session.get_flag(w)},ke.prototype.add_rule=function(w,b){return b=b||{},b.from=b.from?b.from:\"$tau-js\",this.src_predicates[w.head.indicator]=b.from,this.rules[w.head.indicator]||(this.rules[w.head.indicator]=[]),this.rules[w.head.indicator].push(w),this.public_predicates.hasOwnProperty(w.head.indicator)||(this.public_predicates[w.head.indicator]=!1),!0},it.prototype.add_rule=function(w,b){return this.session.add_rule(w,b)},ke.prototype.run_directive=function(w){this.thread.run_directive(w)},it.prototype.run_directive=function(w){return x.type.is_directive(w)?(x.directive[w.indicator](this,w),!0):!1},ke.prototype.__get_max_priority=function(){return\"1200\"},it.prototype.__get_max_priority=function(){return this.session.__get_max_priority()},ke.prototype.__get_next_priority=function(w){var b=0;w=parseInt(w);for(var y in this.__operators)if(this.__operators.hasOwnProperty(y)){var F=parseInt(y);F>b&&F<w&&(b=F)}return b.toString()},it.prototype.__get_next_priority=function(w){return this.session.__get_next_priority(w)},ke.prototype.__lookup_operator_classes=function(w,b){return this.__operators.hasOwnProperty(w)&&this.__operators[w][b]instanceof Array&&this.__operators[w][b]||!1},it.prototype.__lookup_operator_classes=function(w,b){return this.session.__lookup_operator_classes(w,b)},ke.prototype.lookup_operator=function(w,b){for(var y in this.__operators)if(this.__operators[y][w]){for(var F=0;F<this.__operators[y][w].length;F++)if(b===0||this.__operators[y][w][F].length===b+1)return{priority:y,class:this.__operators[y][w][F]}}return null},it.prototype.lookup_operator=function(w,b){return this.session.lookup_operator(w,b)},ke.prototype.throw_warning=function(w){this.thread.throw_warning(w)},it.prototype.throw_warning=function(w){this.warnings.push(w)},ke.prototype.get_warnings=function(){return this.thread.get_warnings()},it.prototype.get_warnings=function(){return this.warnings},ke.prototype.add_goal=function(w,b){this.thread.add_goal(w,b)},it.prototype.add_goal=function(w,b,y){y=y||null,b===!0&&(this.points=[]);for(var F=w.variables(),z={},X=0;X<F.length;X++)z[F[X]]=new De(F[X]);this.points.push(new Pe(w,new Ne(z),y))},ke.prototype.consult=function(w,b){return this.thread.consult(w,b)},it.prototype.consult=function(w,b){var y=\"\";if(typeof w==\"string\"){y=w;var F=y.length;if(y.substring(F-3,F)===\".pl\"&&document.getElementById(y)){var z=document.getElementById(y),X=z.getAttribute(\"type\");X!==null&&X.replace(/ /g,\"\").toLowerCase()===\"text/prolog\"&&(y=z.text)}}else if(w.nodeName)switch(w.nodeName.toLowerCase()){case\"input\":case\"textarea\":y=w.value;break;default:y=w.innerHTML;break}else return!1;return this.warnings=[],le(this,y,b)},ke.prototype.query=function(w){return this.thread.query(w)},it.prototype.query=function(w){return this.points=[],this.debugger_points=[],me(this,w)},ke.prototype.head_point=function(){return this.thread.head_point()},it.prototype.head_point=function(){return this.points[this.points.length-1]},ke.prototype.get_free_variable=function(w){return this.thread.get_free_variable(w)},it.prototype.get_free_variable=function(w){var b=[];if(w.id===\"_\"||this.session.renamed_variables[w.id]===void 0){for(this.session.rename++,this.points.length>0&&(b=this.head_point().substitution.domain());e(b,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id===\"_\")return new De(x.format_variable(this.session.rename));this.session.renamed_variables[w.id]=x.format_variable(this.session.rename)}return new De(this.session.renamed_variables[w.id])},ke.prototype.next_free_variable=function(){return this.thread.next_free_variable()},it.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new De(x.format_variable(this.session.rename))},ke.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},it.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},ke.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},it.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},ke.prototype.prepend=function(w){return this.thread.prepend(w)},it.prototype.prepend=function(w){for(var b=w.length-1;b>=0;b--)this.points.push(w[b])},ke.prototype.success=function(w,b){return this.thread.success(w,b)},it.prototype.success=function(w,y){var y=typeof y>\"u\"?w:y;this.prepend([new Pe(w.goal.replace(null),w.substitution,y)])},ke.prototype.throw_error=function(w){return this.thread.throw_error(w)},it.prototype.throw_error=function(w){this.prepend([new Pe(new j(\"throw\",[w]),new Ne,null,null)])},ke.prototype.step_rule=function(w,b){return this.thread.step_rule(w,b)},it.prototype.step_rule=function(w,b){var y=b.indicator;if(w===\"user\"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],z=0;z<F.length;z++){var X=x.module[F[z]];if(X.rules.hasOwnProperty(y)&&(X.rules.hasOwnProperty(this.level)||X.exports_predicate(y)))return x.module[F[z]].rules[y]}return null},ke.prototype.step=function(){return this.thread.step()},it.prototype.step=function(){if(this.points.length!==0){var w=!1,b=this.points.pop();if(this.debugger&&this.debugger_states.push(b),x.type.is_term(b.goal)){var y=b.goal.select(),F=null,z=[];if(y!==null){this.total_steps++;for(var X=b;X.parent!==null&&X.parent.goal.search(y);)X=X.parent;if(this.level=X.parent===null?\"top_level/0\":X.parent.goal.select().indicator,x.type.is_term(y)&&y.indicator===\":/2\"&&(F=y.args[0].id,y=y.args[1]),F===null&&x.type.is_builtin(y))this.__call_indicator=y.indicator,w=x.predicate[y.indicator](this,b,y);else{var $=this.step_rule(F,y);if($===null)this.session.rules.hasOwnProperty(y.indicator)||(this.get_flag(\"unknown\").id===\"error\"?this.throw_error(x.error.existence(\"procedure\",y.indicator,this.level)):this.get_flag(\"unknown\").id===\"warning\"&&this.throw_warning(\"unknown procedure \"+y.indicator+\" (from \"+this.level+\")\"));else if($ instanceof Function)w=$(this,b,y);else{for(var oe in $)if($.hasOwnProperty(oe)){var xe=$[oe];this.session.renamed_variables={},xe=xe.rename(this);var Te=this.get_flag(\"occurs_check\").indicator===\"true/0\",lt=new Pe,Ct=x.unify(y,xe.head,Te);Ct!==null&&(lt.goal=b.goal.replace(xe.body),lt.goal!==null&&(lt.goal=lt.goal.apply(Ct)),lt.substitution=b.substitution.apply(Ct),lt.parent=b,z.push(lt))}this.prepend(z)}}}}else x.type.is_variable(b.goal)?this.throw_error(x.error.instantiation(this.level)):this.throw_error(x.error.type(\"callable\",b.goal,this.level));return w}},ke.prototype.answer=function(w){return this.thread.answer(w)},it.prototype.answer=function(w){w=w||function(b){},this.__calls.push(w),!(this.__calls.length>1)&&this.again()},ke.prototype.answers=function(w,b,y){return this.thread.answers(w,b,y)},it.prototype.answers=function(w,b,y){var F=b||1e3,z=this;if(b<=0){y&&y();return}this.answer(function(X){w(X),X!==!1?setTimeout(function(){z.answers(w,b-1,y)},1):y&&y()})},ke.prototype.again=function(w){return this.thread.again(w)},it.prototype.again=function(w){for(var b,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(b=this.session.format_error(this.points.pop()),this.points=[],z(b)):(this.debugger&&this.debugger_states.push(this.head_point()),b=this.session.format_success(this.points.pop()),z(b))}},ke.prototype.unfold=function(w){if(w.body===null)return!1;var b=w.head,y=w.body,F=y.select(),z=new it(this),X=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var oe=z.points[$],xe=b.apply(oe.substitution),Te=y.replace(oe.goal);Te!==null&&(Te=Te.apply(oe.substitution)),X.push(new Ve(xe,Te))}var lt=this.rules[b.indicator],Ct=e(lt,w);return X.length>0&&Ct!==-1?(lt.splice.apply(lt,[Ct,1].concat(X)),!0):!1},it.prototype.unfold=function(w){return this.session.unfold(w)},De.prototype.interpret=function(w){return x.error.instantiation(w.level)},Re.prototype.interpret=function(w){return this},j.prototype.interpret=function(w){return x.type.is_unitary_list(this)?this.args[0].interpret(w):x.operate(w,this)},De.prototype.compare=function(w){return this.id<w.id?-1:this.id>w.id?1:0},Re.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.value<w.value||this.value===w.value&&this.is_float&&!w.is_float)return-1;if(this.value>w.value)return 1},j.prototype.compare=function(w){if(this.args.length<w.args.length||this.args.length===w.args.length&&this.id<w.id)return-1;if(this.args.length>w.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var b=0;b<this.args.length;b++){var y=x.compare(this.args[b],w.args[b]);if(y!==0)return y}return 0},Ne.prototype.lookup=function(w){return this.links[w]?this.links[w]:null},Ne.prototype.filter=function(w){var b={};for(var y in this.links)if(this.links.hasOwnProperty(y)){var F=this.links[y];w(y,F)&&(b[y]=F)}return new Ne(b)},Ne.prototype.exclude=function(w){var b={};for(var y in this.links)this.links.hasOwnProperty(y)&&e(w,y)===-1&&(b[y]=this.links[y]);return new Ne(b)},Ne.prototype.add=function(w,b){this.links[w]=b},Ne.prototype.domain=function(w){var b=w===!0?function(z){return z}:function(z){return new De(z)},y=[];for(var F in this.links)y.push(b(F));return y},De.prototype.compile=function(){return'new pl.type.Var(\"'+this.id.toString()+'\")'},Re.prototype.compile=function(){return\"new pl.type.Num(\"+this.value.toString()+\", \"+this.is_float.toString()+\")\"},j.prototype.compile=function(){return'new pl.type.Term(\"'+this.id.replace(/\"/g,'\\\\\"')+'\", ['+s(this.args,function(w){return w.compile()})+\"])\"},Ve.prototype.compile=function(){return\"new pl.type.Rule(\"+this.head.compile()+\", \"+(this.body===null?\"null\":this.body.compile())+\")\"},ke.prototype.compile=function(){var w,b=[],y;for(var F in this.rules)if(this.rules.hasOwnProperty(F)){var z=this.rules[F];y=[],w='\"'+F+'\": [';for(var X=0;X<z.length;X++)y.push(z[X].compile());w+=y.join(),w+=\"]\",b.push(w)}return\"{\"+b.join()+\"};\"},De.prototype.toJavaScript=function(){},Re.prototype.toJavaScript=function(){return this.value},j.prototype.toJavaScript=function(){if(this.args.length===0&&this.indicator!==\"[]/0\")return this.id;if(x.type.is_list(this)){for(var w=[],b=this,y;b.indicator===\"./2\";){if(y=b.args[0].toJavaScript(),y===void 0)return;w.push(y),b=b.args[1]}if(b.indicator===\"[]/0\")return w}},Ve.prototype.singleton_variables=function(){var w=this.head.variables(),b={},y=[];this.body!==null&&(w=w.concat(this.body.variables()));for(var F=0;F<w.length;F++)b[w[F]]===void 0&&(b[w[F]]=0),b[w[F]]++;for(var z in b)z!==\"_\"&&b[z]===1&&y.push(z);return y};var x={__env:typeof ec<\"u\"&&ec.exports?global:window,module:{},version:t,parser:{tokenizer:U,expression:W},utils:{str_indicator:Z,codePointAt:n,fromCodePoint:c},statistics:{getCountTerms:function(){return mt}},fromJavaScript:{test:{boolean:function(w){return w===!0||w===!1},number:function(w){return typeof w==\"number\"},string:function(w){return typeof w==\"string\"},list:function(w){return w instanceof Array},variable:function(w){return w===void 0},any:function(w){return!0}},conversion:{boolean:function(w){return new j(w?\"true\":\"false\",[])},number:function(w){return new Re(w,w%1!==0)},string:function(w){return new j(w,[])},list:function(w){for(var b=[],y,F=0;F<w.length;F++){if(y=x.fromJavaScript.apply(w[F]),y===void 0)return;b.push(y)}return g(b)},variable:function(w){return new De(\"_\")},any:function(w){}},apply:function(w){for(var b in x.fromJavaScript.test)if(b!==\"any\"&&x.fromJavaScript.test[b](w))return x.fromJavaScript.conversion[b](w);return x.fromJavaScript.conversion.any(w)}},type:{Var:De,Num:Re,Term:j,Rule:Ve,State:Pe,Stream:Fe,Module:Ue,Thread:it,Session:ke,Substitution:Ne,order:[De,Re,j,Fe],compare:function(w,b){var y=e(x.type.order,w.constructor),F=e(x.type.order,b.constructor);if(y<F)return-1;if(y>F)return 1;if(w.constructor===Re){if(w.is_float&&b.is_float)return 0;if(w.is_float)return-1;if(b.is_float)return 1}return 0},is_substitution:function(w){return w instanceof Ne},is_state:function(w){return w instanceof Pe},is_rule:function(w){return w instanceof Ve},is_variable:function(w){return w instanceof De},is_stream:function(w){return w instanceof Fe},is_anonymous_var:function(w){return w instanceof De&&w.id===\"_\"},is_callable:function(w){return w instanceof j},is_number:function(w){return w instanceof Re},is_integer:function(w){return w instanceof Re&&!w.is_float},is_float:function(w){return w instanceof Re&&w.is_float},is_term:function(w){return w instanceof j},is_atom:function(w){return w instanceof j&&w.args.length===0},is_ground:function(w){if(w instanceof De)return!1;if(w instanceof j){for(var b=0;b<w.args.length;b++)if(!x.type.is_ground(w.args[b]))return!1}return!0},is_atomic:function(w){return w instanceof j&&w.args.length===0||w instanceof Re},is_compound:function(w){return w instanceof j&&w.args.length>0},is_list:function(w){return w instanceof j&&(w.indicator===\"[]/0\"||w.indicator===\"./2\")},is_empty_list:function(w){return w instanceof j&&w.indicator===\"[]/0\"},is_non_empty_list:function(w){return w instanceof j&&w.indicator===\"./2\"},is_fully_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof De||w instanceof j&&w.indicator===\"[]/0\"},is_instantiated_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof j&&w.indicator===\"[]/0\"},is_unitary_list:function(w){return w instanceof j&&w.indicator===\"./2\"&&w.args[1]instanceof j&&w.args[1].indicator===\"[]/0\"},is_character:function(w){return w instanceof j&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof j&&x.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof j&&x.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof j&&x.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof j&&w.indicator===\"throw/1\"},is_predicate_indicator:function(w){return w instanceof j&&w.indicator===\"//2\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&w.args[1]instanceof Re&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof j&&w.args.length===0&&x.flag[w.id]!==void 0},is_value_flag:function(w,b){if(!x.type.is_flag(w))return!1;for(var y in x.flag[w.id].allowed)if(x.flag[w.id].allowed.hasOwnProperty(y)&&x.flag[w.id].allowed[y].equals(b))return!0;return!1},is_io_mode:function(w){return x.type.is_atom(w)&&[\"read\",\"write\",\"append\"].indexOf(w.id)!==-1},is_stream_option:function(w){return x.type.is_term(w)&&(w.indicator===\"alias/1\"&&x.type.is_atom(w.args[0])||w.indicator===\"reposition/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"type/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\")||w.indicator===\"eof_action/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))},is_stream_position:function(w){return x.type.is_integer(w)&&w.value>=0||x.type.is_atom(w)&&(w.id===\"end_of_stream\"||w.id===\"past_end_of_stream\")},is_stream_property:function(w){return x.type.is_term(w)&&(w.indicator===\"input/0\"||w.indicator===\"output/0\"||w.indicator===\"alias/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"file_name/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"position/1\"&&(x.type.is_variable(w.args[0])||x.type.is_stream_position(w.args[0]))||w.indicator===\"reposition/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))||w.indicator===\"type/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\"))||w.indicator===\"mode/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"read\"||w.args[0].id===\"write\"||w.args[0].id===\"append\"))||w.indicator===\"eof_action/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))||w.indicator===\"end_of_stream/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"at\"||w.args[0].id===\"past\"||w.args[0].id===\"not\")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return x.type.is_term(w)&&[\"variables/1\",\"variable_names/1\",\"singletons/1\"].indexOf(w.indicator)!==-1},is_write_option:function(w){return x.type.is_term(w)&&(w.indicator===\"quoted/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"ignore_ops/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"numbervars/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))},is_close_option:function(w){return x.type.is_term(w)&&w.indicator===\"force/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")},is_modifiable_flag:function(w){return x.type.is_flag(w)&&x.flag[w.id].changeable},is_module:function(w){return w instanceof j&&w.indicator===\"library/1\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&x.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{\"e/0\":{type_args:null,type_result:!0,fn:function(w){return Math.E}},\"pi/0\":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},\"tau/0\":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},\"epsilon/0\":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},\"+/1\":{type_args:null,type_result:null,fn:function(w,b){return w}},\"-/1\":{type_args:null,type_result:null,fn:function(w,b){return-w}},\"\\\\/1\":{type_args:!1,type_result:!1,fn:function(w,b){return~w}},\"abs/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.abs(w)}},\"sign/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.sign(w)}},\"float_integer_part/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"float_fractional_part/1\":{type_args:!0,type_result:!0,fn:function(w,b){return w-parseInt(w)}},\"float/1\":{type_args:null,type_result:!0,fn:function(w,b){return parseFloat(w)}},\"floor/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.floor(w)}},\"truncate/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"round/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.round(w)}},\"ceiling/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.ceil(w)}},\"sin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sin(w)}},\"cos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.cos(w)}},\"tan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.tan(w)}},\"asin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.asin(w)}},\"acos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.acos(w)}},\"atan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.atan(w)}},\"atan2/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.atan2(w,b)}},\"exp/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.exp(w)}},\"sqrt/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sqrt(w)}},\"log/1\":{type_args:null,type_result:!0,fn:function(w,b){return w>0?Math.log(w):x.error.evaluation(\"undefined\",b.__call_indicator)}},\"+/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w+b}},\"-/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w-b}},\"*/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w*b}},\"//2\":{type_args:null,type_result:!0,fn:function(w,b,y){return b?w/b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"///2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?parseInt(w/b):x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"**/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.pow(w,b)}},\"^/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.pow(w,b)}},\"<</2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w<<b}},\">>/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w>>b}},\"/\\\\/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w&b}},\"\\\\//2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w|b}},\"xor/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w^b}},\"rem/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w%b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"mod/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w-parseInt(w/b)*b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"max/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.max(w,b)}},\"min/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.min(w,b)}}}},directive:{\"dynamic/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_compound(y)||y.indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator));else if(!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator));else{var F=b.args[0].args[0].id+\"/\"+b.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},\"multifile/1\":function(w,b){var y=b.args[0];x.type.is_variable(y)?w.throw_error(x.error.instantiation(b.indicator)):!x.type.is_compound(y)||y.indicator!==\"//2\"?w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?w.session.multifile_predicates[b.args[0].args[0].id+\"/\"+b.args[0].args[1].value]=!0:w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator)):w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator))},\"set_prolog_flag/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(x.error.permission(\"modify\",\"flag\",y)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[y,F]),b.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",y,b.indicator)):w.throw_error(x.error.type(\"atom\",y,b.indicator))},\"use_module/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_term(y))w.throw_error(x.error.type(\"term\",y,b.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},\"char_conversion/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(x.error.type(\"character\",F,b.indicator)):w.throw_error(x.error.type(\"character\",y,b.indicator))},\"op/3\":function(w,b){var y=b.args[0],F=b.args[1],z=b.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_integer(y))w.throw_error(x.error.type(\"integer\",y,b.indicator));else if(!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,b.indicator));else if(!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,b.indicator));else if(y.value<0||y.value>1200)w.throw_error(x.error.domain(\"operator_priority\",y,b.indicator));else if(z.id===\",\")w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if(z.id===\"|\"&&(y.value<1001||F.id.length!==3))w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if([\"fy\",\"fx\",\"yf\",\"xf\",\"xfx\",\"yfx\",\"xfy\"].indexOf(F.id)===-1)w.throw_error(x.error.domain(\"operator_specifier\",F,b.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(w.session.__operators.hasOwnProperty($)){var oe=w.session.__operators[$][z.id];oe&&(e(oe,\"fx\")!==-1&&(X.prefix={priority:$,type:\"fx\"}),e(oe,\"fy\")!==-1&&(X.prefix={priority:$,type:\"fy\"}),e(oe,\"xf\")!==-1&&(X.postfix={priority:$,type:\"xf\"}),e(oe,\"yf\")!==-1&&(X.postfix={priority:$,type:\"yf\"}),e(oe,\"xfx\")!==-1&&(X.infix={priority:$,type:\"xfx\"}),e(oe,\"xfy\")!==-1&&(X.infix={priority:$,type:\"xfy\"}),e(oe,\"yfx\")!==-1&&(X.infix={priority:$,type:\"yfx\"}))}var xe;switch(F.id){case\"fy\":case\"fx\":xe=\"prefix\";break;case\"yf\":case\"xf\":xe=\"postfix\";break;default:xe=\"infix\";break}if(((X.prefix&&xe===\"prefix\"||X.postfix&&xe===\"postfix\"||X.infix&&xe===\"infix\")&&X[xe].type!==F.id||X.infix&&xe===\"postfix\"||X.postfix&&xe===\"infix\")&&y.value!==0)w.throw_error(x.error.permission(\"create\",\"operator\",z,b.indicator));else return X[xe]&&(we(w.session.__operators[X[xe].priority][z.id],F.id),w.session.__operators[X[xe].priority][z.id].length===0&&delete w.session.__operators[X[xe].priority][z.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][z.id]||(w.session.__operators[y.value][z.id]=[]),w.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{\"op/3\":function(w,b,y){x.directive[\"op/3\"](w,y)&&w.success(b)},\"current_op/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=[];for(var oe in w.session.__operators)for(var xe in w.session.__operators[oe])for(var Te=0;Te<w.session.__operators[oe][xe].length;Te++)$.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[new Re(oe,!1),F]),new j(\",\",[new j(\"=\",[new j(w.session.__operators[oe][xe][Te],[]),z]),new j(\"=\",[new j(xe,[]),X])])])),b.substitution,b));w.prepend($)},\";/2\":function(w,b,y){if(x.type.is_term(y.args[0])&&y.args[0].indicator===\"->/2\"){var F=w.points,z=w.session.format_success,X=w.session.format_error;w.session.format_success=function(Te){return Te.substitution},w.session.format_error=function(Te){return Te.goal},w.points=[new Pe(y.args[0].args[0],b.substitution,b)];var $=function(Te){w.points=F,w.session.format_success=z,w.session.format_error=X,Te===!1?w.prepend([new Pe(b.goal.replace(y.args[1]),b.substitution,b)]):x.type.is_error(Te)?w.throw_error(Te.args[0]):Te===null?(w.prepend([b]),w.__calls.shift()(null)):w.prepend([new Pe(b.goal.replace(y.args[0].args[1]).apply(Te),b.substitution.apply(Te),b)])};w.__calls.unshift($)}else{var oe=new Pe(b.goal.replace(y.args[0]),b.substitution,b),xe=new Pe(b.goal.replace(y.args[1]),b.substitution,b);w.prepend([oe,xe])}},\"!/0\":function(w,b,y){var F,z,X=[];for(F=b,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id===\"call\"&&$.search(y)){F=z;break}}for(var oe=w.points.length-1;oe>=0;oe--){for(var xe=w.points[oe],Te=xe.parent;Te!==null&&Te!==F.parent;)Te=Te.parent;Te===null&&Te!==F.parent&&X.push(xe)}w.points=X.reverse(),w.success(b)},\"\\\\+/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(w.level)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,w.level))},\"->/2\":function(w,b,y){var F=b.goal.replace(new j(\",\",[y.args[0],new j(\",\",[new j(\"!\"),y.args[1]])]));w.prepend([new Pe(F,b.substitution,b)])},\"fail/0\":function(w,b,y){},\"false/0\":function(w,b,y){},\"true/0\":function(w,b,y){w.success(b)},\"call/1\":se(1),\"call/2\":se(2),\"call/3\":se(3),\"call/4\":se(4),\"call/5\":se(5),\"call/6\":se(6),\"call/7\":se(7),\"call/8\":se(8),\"once/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])])),b.substitution,b)])},\"forall/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"\\\\+\",[new j(\",\",[new j(\"call\",[F]),new j(\"\\\\+\",[new j(\"call\",[z])])])])),b.substitution,b)])},\"repeat/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(null),b.substitution,b),b])},\"throw/1\":function(w,b,y){x.type.is_variable(y.args[0])?w.throw_error(x.error.instantiation(w.level)):w.throw_error(y.args[0])},\"catch/3\":function(w,b,y){var F=w.points;w.points=[],w.prepend([new Pe(y.args[0],b.substitution,b)]);var z=w.session.format_success,X=w.session.format_error;w.session.format_success=function(oe){return oe.substitution},w.session.format_error=function(oe){return oe.goal};var $=function(oe){var xe=w.points;if(w.points=F,w.session.format_success=z,w.session.format_error=X,x.type.is_error(oe)){for(var Te=[],lt=w.points.length-1;lt>=0;lt--){for(var ir=w.points[lt],Ct=ir.parent;Ct!==null&&Ct!==b.parent;)Ct=Ct.parent;Ct===null&&Ct!==b.parent&&Te.push(ir)}w.points=Te;var qt=w.get_flag(\"occurs_check\").indicator===\"true/0\",ir=new Pe,Pt=x.unify(oe.args[0],y.args[1],qt);Pt!==null?(ir.substitution=b.substitution.apply(Pt),ir.goal=b.goal.replace(y.args[2]).apply(Pt),ir.parent=b,w.prepend([ir])):w.throw_error(oe.args[0])}else if(oe!==!1){for(var gn=oe===null?[]:[new Pe(b.goal.apply(oe).replace(null),b.substitution.apply(oe),b)],Pr=[],lt=xe.length-1;lt>=0;lt--){Pr.push(xe[lt]);var Ir=xe[lt].goal!==null?xe[lt].goal.select():null;if(x.type.is_term(Ir)&&Ir.indicator===\"!/0\")break}var Or=s(Pr,function(on){return on.goal===null&&(on.goal=new j(\"true\",[])),on=new Pe(b.goal.replace(new j(\"catch\",[on.goal,y.args[1],y.args[2]])),b.substitution.apply(on.substitution),on.parent),on.exclude=y.args[0].variables(),on}).reverse();w.prepend(Or),w.prepend(gn),oe===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift($)},\"=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=new Pe,X=x.unify(y.args[0],y.args[1],F);X!==null&&(z.goal=b.goal.apply(X).replace(null),z.substitution=b.substitution.apply(X),z.parent=b,w.prepend([z]))},\"unify_with_occurs_check/2\":function(w,b,y){var F=new Pe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=b.goal.apply(z).replace(null),F.substitution=b.substitution.apply(z),F.parent=b,w.prepend([F]))},\"\\\\=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[0],y.args[1],F);z===null&&w.success(b)},\"subsumes_term/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&w.success(b)},\"findall/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))w.throw_error(x.error.type(\"callable\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=w.next_free_variable(),oe=new j(\",\",[z,new j(\"=\",[$,F])]),xe=w.points,Te=w.session.limit,lt=w.session.format_success;w.session.format_success=function(ir){return ir.substitution},w.add_goal(oe,!0,b);var Ct=[],qt=function(ir){if(ir!==!1&&ir!==null&&!x.type.is_error(ir))w.__calls.unshift(qt),Ct.push(ir.links[$.id]),w.session.limit=w.current_limit;else if(w.points=xe,w.session.limit=Te,w.session.format_success=lt,x.type.is_error(ir))w.throw_error(ir.args[0]);else if(w.current_limit>0){for(var Pt=new j(\"[]\"),gn=Ct.length-1;gn>=0;gn--)Pt=new j(\".\",[Ct[gn],Pt]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Pt])),b.substitution,b)])}};w.__calls.unshift(qt)}},\"bagof/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))w.throw_error(x.error.type(\"callable\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;X.indicator===\"^/2\"?(xe=X.args[0].variables(),X=X.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=X.variables().filter(function(Or){return e(xe,Or)===-1}),lt=new j(\"[]\"),Ct=Te.length-1;Ct>=0;Ct--)lt=new j(\".\",[new De(Te[Ct]),lt]);var qt=new j(\",\",[X,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Or){return Or.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Or){if(Or!==!1&&Or!==null&&!x.type.is_error(Or)){w.__calls.unshift(Ir);var on=!1,ai=Or.links[oe.id].args[0],Io=Or.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var $s=Pr[rs];if($s.variables.equals(ai)){$s.answers.push(Io),on=!0;break}}on||Pr.push({variables:ai,answers:[Io]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Or))w.throw_error(Or.args[0]);else if(w.current_limit>0){for(var Co=[],ji=0;ji<Pr.length;ji++){Or=Pr[ji].answers;for(var eo=new j(\"[]\"),wo=Or.length-1;wo>=0;wo--)eo=new j(\".\",[Or[wo],eo]);Co.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[ji].variables]),new j(\"=\",[$,eo])])),b.substitution,b))}w.prepend(Co)}};w.__calls.unshift(Ir)}},\"setof/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))w.throw_error(x.error.type(\"callable\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;X.indicator===\"^/2\"?(xe=X.args[0].variables(),X=X.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=X.variables().filter(function(Or){return e(xe,Or)===-1}),lt=new j(\"[]\"),Ct=Te.length-1;Ct>=0;Ct--)lt=new j(\".\",[new De(Te[Ct]),lt]);var qt=new j(\",\",[X,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Or){return Or.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Or){if(Or!==!1&&Or!==null&&!x.type.is_error(Or)){w.__calls.unshift(Ir);var on=!1,ai=Or.links[oe.id].args[0],Io=Or.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var $s=Pr[rs];if($s.variables.equals(ai)){$s.answers.push(Io),on=!0;break}}on||Pr.push({variables:ai,answers:[Io]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Or))w.throw_error(Or.args[0]);else if(w.current_limit>0){for(var Co=[],ji=0;ji<Pr.length;ji++){Or=Pr[ji].answers.sort(x.compare);for(var eo=new j(\"[]\"),wo=Or.length-1;wo>=0;wo--)eo=new j(\".\",[Or[wo],eo]);Co.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[ji].variables]),new j(\"=\",[$,eo])])),b.substitution,b))}w.prepend(Co)}};w.__calls.unshift(Ir)}},\"functor/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(X)||x.type.is_variable($)))w.throw_error(x.error.instantiation(\"functor/3\"));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",y.args[2],\"functor/3\"));else if(!x.type.is_variable(X)&&!x.type.is_atomic(X))w.throw_error(x.error.type(\"atomic\",y.args[1],\"functor/3\"));else if(x.type.is_integer(X)&&x.type.is_integer($)&&$.value!==0)w.throw_error(x.error.type(\"atom\",y.args[1],\"functor/3\"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var oe=[],xe=0;xe<$.value;xe++)oe.push(w.next_free_variable());var Te=x.type.is_integer(X)?X:new j(X.id,oe);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Te])),b.substitution,b)])}}else{var lt=x.type.is_integer(z)?z:new j(z.id,[]),Ct=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),qt=new j(\",\",[new j(\"=\",[lt,X]),new j(\"=\",[Ct,$])]);w.prepend([new Pe(b.goal.replace(qt),b.substitution,b)])}},\"arg/3\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))w.throw_error(x.error.type(\"compound\",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new j(\"=\",[y.args[1].args[F-1],y.args[2]]);w.prepend([new Pe(b.goal.replace(z),b.substitution,b)])}}},\"=../2\":function(w,b,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))w.throw_error(x.error.type(\"list\",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var X=[];for(F=y.args[1].args[1];F.indicator===\"./2\";)X.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):X.length===0&&x.type.is_compound(y.args[1].args[0])?w.throw_error(x.error.type(\"atomic\",y.args[1].args[0],y.indicator)):X.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?w.throw_error(x.error.type(\"atom\",y.args[1].args[0],y.indicator)):X.length===0?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[1].args[0],y.args[0]],b)),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(y.args[1].args[0].id,X),y.args[0]])),b.substitution,b)])}}else{if(x.type.is_atomic(y.args[0]))F=new j(\".\",[y.args[0],new j(\"[]\")]);else{F=new j(\"[]\");for(var z=y.args[0].args.length-1;z>=0;z--)F=new j(\".\",[y.args[0].args[z],F]);F=new j(\".\",[new j(y.args[0].id),F])}w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"copy_term/2\":function(w,b,y){var F=y.args[0].rename(w);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b.parent)])},\"term_variables/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else{var X=g(s(ye(F.variables()),function($){return new De($)}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"clause/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))w.throw_error(x.error.type(\"callable\",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in w.session.rules[y.args[0].indicator])if(w.session.rules[y.args[0].indicator].hasOwnProperty(z)){var X=w.session.rules[y.args[0].indicator][z];w.session.renamed_variables={},X=X.rename(w),X.body===null&&(X.body=new j(\"true\"));var $=new j(\",\",[new j(\"=\",[X.head,y.args[0]]),new j(\"=\",[X.body,y.args[1]])]);F.push(new Pe(b.goal.replace($),b.substitution,b))}w.prepend(F)}else w.throw_error(x.error.permission(\"access\",\"private_procedure\",y.args[0].indicator,y.indicator))},\"current_predicate/1\":function(w,b,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!==\"//2\"))w.throw_error(x.error.type(\"predicate_indicator\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))w.throw_error(x.error.type(\"atom\",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))w.throw_error(x.error.type(\"integer\",F.args[1],y.indicator));else{var z=[];for(var X in w.session.rules)if(w.session.rules.hasOwnProperty(X)){var $=X.lastIndexOf(\"/\"),oe=X.substr(0,$),xe=parseInt(X.substr($+1,X.length-($+1))),Te=new j(\"/\",[new j(oe),new Re(xe,!1)]),lt=new j(\"=\",[Te,F]);z.push(new Pe(b.goal.replace(lt),b.substitution,b))}w.prepend(z)}},\"asserta/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new Ve(F,z,!0)].concat(w.session.rules[F.indicator]),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"assertz/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new Ve(F,z,!0)),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"retract/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new j(\"true\")),typeof b.retract>\"u\")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var X=[],$=0;$<w.session.rules[F.indicator].length;$++){w.session.renamed_variables={};var oe=w.session.rules[F.indicator][$],xe=oe.rename(w);xe.body===null&&(xe.body=new j(\"true\",[]));var Te=w.get_flag(\"occurs_check\").indicator===\"true/0\",lt=x.unify(new j(\",\",[F,z]),new j(\",\",[xe.head,xe.body]),Te);if(lt!==null){var Ct=new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new j(\":-\",[F,z])]),new j(\",\",[new j(\"=\",[F,xe.head]),new j(\"=\",[z,xe.body])])])),b.substitution,b);Ct.retract=oe,X.push(Ct)}}w.prepend(X)}}else w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator));else Ae(w,b,F.indicator,b.retract)}},\"retractall/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new x.type.Term(\":-\",[F,new De(\"_\")])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,y.indicator))},\"abolish/1\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_term(y.args[0])&&y.args[0].indicator===\"//2\"&&(x.type.is_variable(y.args[0].args[0])||x.type.is_variable(y.args[0].args[1])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_term(y.args[0])||y.args[0].indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y.args[0],y.indicator));else if(!x.type.is_atom(y.args[0].args[0]))w.throw_error(x.error.type(\"atom\",y.args[0].args[0],y.indicator));else if(!x.type.is_integer(y.args[0].args[1]))w.throw_error(x.error.type(\"integer\",y.args[0].args[1],y.indicator));else if(y.args[0].args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0].args[1],y.indicator));else if(x.type.is_number(w.get_flag(\"max_arity\"))&&y.args[0].args[1].value>w.get_flag(\"max_arity\").value)w.throw_error(x.error.representation(\"max_arity\",y.indicator));else{var F=y.args[0].args[0].id+\"/\"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F,y.indicator))}},\"atom_length/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"atom_concat/3\":function(w,b,y){var F,z,X=y.args[0],$=y.args[1],oe=y.args[2];if(x.type.is_variable(oe)&&(x.type.is_variable(X)||x.type.is_variable($)))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))w.throw_error(x.error.type(\"atom\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))w.throw_error(x.error.type(\"atom\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_atom(oe))w.throw_error(x.error.type(\"atom\",oe,y.indicator));else{var xe=x.type.is_variable(X),Te=x.type.is_variable($);if(!xe&&!Te)z=new j(\"=\",[oe,new j(X.id+$.id)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]);else if(xe&&!Te)F=oe.id.substr(0,oe.id.length-$.id.length),F+$.id===oe.id&&(z=new j(\"=\",[X,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else if(Te&&!xe)F=oe.id.substr(X.id.length),X.id+F===oe.id&&(z=new j(\"=\",[$,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else{for(var lt=[],Ct=0;Ct<=oe.id.length;Ct++){var qt=new j(oe.id.substr(0,Ct)),ir=new j(oe.id.substr(Ct));z=new j(\",\",[new j(\"=\",[qt,X]),new j(\"=\",[ir,$])]),lt.push(new Pe(b.goal.replace(z),b.substitution,b))}w.prepend(lt)}}},\"sub_atom/5\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2],oe=y.args[3],xe=y.args[4];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))w.throw_error(x.error.type(\"integer\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_integer(oe))w.throw_error(x.error.type(\"integer\",oe,y.indicator));else if(x.type.is_integer(X)&&X.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",X,y.indicator));else if(x.type.is_integer($)&&$.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",$,y.indicator));else if(x.type.is_integer(oe)&&oe.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",oe,y.indicator));else{var Te=[],lt=[],Ct=[];if(x.type.is_variable(X))for(F=0;F<=z.id.length;F++)Te.push(F);else Te.push(X.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)lt.push(F);else lt.push($.value);if(x.type.is_variable(oe))for(F=0;F<=z.id.length;F++)Ct.push(F);else Ct.push(oe.value);var qt=[];for(var ir in Te)if(Te.hasOwnProperty(ir)){F=Te[ir];for(var Pt in lt)if(lt.hasOwnProperty(Pt)){var gn=lt[Pt],Pr=z.id.length-F-gn;if(e(Ct,Pr)!==-1&&F+gn+Pr===z.id.length){var Ir=z.id.substr(F,gn);if(z.id===z.id.substr(0,F)+Ir+z.id.substr(F+gn,Pr)){var Or=new j(\"=\",[new j(Ir),xe]),on=new j(\"=\",[X,new Re(F)]),ai=new j(\"=\",[$,new Re(gn)]),Io=new j(\"=\",[oe,new Re(Pr)]),rs=new j(\",\",[new j(\",\",[new j(\",\",[on,ai]),Io]),Or]);qt.push(new Pe(b.goal.replace(rs),b.substitution,b))}}}}w.prepend(qt)}},\"atom_chars/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))Te+=oe.args[0].id;else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var X=new j(\"[]\"),$=F.id.length-1;$>=0;$--)X=new j(\".\",[new j(F.id.charAt($)),X]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"atom_codes/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))Te+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.representation(\"character_code\",y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var X=new j(\"[]\"),$=F.id.length-1;$>=0;$--)X=new j(\".\",[new Re(n(F.id,$),!1),X]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"char_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))w.throw_error(x.error.type(\"character\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))w.throw_error(x.error.representation(\"character_code\",y.indicator));else if(x.type.is_variable(z)){var X=new Re(n(F.id,0),!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,z])),b.substitution,b)])}else{var $=new j(c(z.value));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"number_chars/2\":function(w,b,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var oe=X,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))F+=oe.args[0].id;else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",X,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Ct=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Ct=new j(\".\",[new j(F.charAt(qt)),Ct]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Ct])),b.substitution,b)])}}},\"number_codes/2\":function(w,b,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var oe=X,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))F+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character_code\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",X,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Ct=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Ct=new j(\".\",[new Re(n(F,qt),!1),Ct]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Ct])),b.substitution,b)])}}},\"upcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toUpperCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"downcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toLowerCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"atomic_list_concat/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"atomic_list_concat\",[F,new j(\"\",[]),z])),b.substitution,b)])},\"atomic_list_concat/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))w.throw_error(x.error.type(\"list\",F,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))w.throw_error(x.error.type(\"atom\",X,y.indicator));else if(x.type.is_variable(X)){for(var oe=\"\",xe=F;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(!x.type.is_atom(xe.args[0])&&!x.type.is_number(xe.args[0])){w.throw_error(x.error.type(\"atomic\",xe.args[0],y.indicator));return}oe!==\"\"&&(oe+=z.id),x.type.is_atom(xe.args[0])?oe+=xe.args[0].id:oe+=\"\"+xe.args[0].value,xe=xe.args[1]}oe=new j(oe,[]),x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(xe)||xe.indicator!==\"[]/0\"?w.throw_error(x.error.type(\"list\",F,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[oe,X])),b.substitution,b)])}else{var $=g(s(X.id.split(z.id),function(Te){return new j(Te,[])}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"@=</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<=0&&w.success(b)},\"==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])===0&&w.success(b)},\"\\\\==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])!==0&&w.success(b)},\"@</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<0&&w.success(b)},\"@>/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>0&&w.success(b)},\"@>=/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>=0&&w.success(b)},\"compare/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_atom(F)&&[\"<\",\">\",\"=\"].indexOf(F.id)===-1)w.throw_error(x.type.domain(\"order\",F,y.indicator));else{var $=x.compare(z,X);$=$===0?\"=\":$===-1?\"<\":\">\",w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new j($,[])])),b.substitution,b)])}},\"is/2\":function(w,b,y){var F=y.args[1].interpret(w);x.type.is_number(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[0],F],w.level)),b.substitution,b)]):w.throw_error(F)},\"between/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))w.throw_error(x.error.type(\"integer\",F,y.indicator));else if(!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))w.throw_error(x.error.type(\"integer\",X,y.indicator));else if(x.type.is_variable(X)){var $=[new Pe(b.goal.replace(new j(\"=\",[X,F])),b.substitution,b)];F.value<z.value&&$.push(new Pe(b.goal.replace(new j(\"between\",[new Re(F.value+1,!1),z,X])),b.substitution,b)),w.prepend($)}else F.value<=X.value&&z.value>=X.value&&w.success(b)},\"succ/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?w.throw_error(x.error.type(\"integer\",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?w.throw_error(x.error.type(\"integer\",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new Re(z.value-1,!1)])),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new Re(F.value+1,!1)])),b.substitution,b)]))},\"=:=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F===0&&w.success(b)},\"=\\\\=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F!==0&&w.success(b)},\"</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<0&&w.success(b)},\"=</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<=0&&w.success(b)},\">/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>0&&w.success(b)},\">=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>=0&&w.success(b)},\"var/1\":function(w,b,y){x.type.is_variable(y.args[0])&&w.success(b)},\"atom/1\":function(w,b,y){x.type.is_atom(y.args[0])&&w.success(b)},\"atomic/1\":function(w,b,y){x.type.is_atomic(y.args[0])&&w.success(b)},\"compound/1\":function(w,b,y){x.type.is_compound(y.args[0])&&w.success(b)},\"integer/1\":function(w,b,y){x.type.is_integer(y.args[0])&&w.success(b)},\"float/1\":function(w,b,y){x.type.is_float(y.args[0])&&w.success(b)},\"number/1\":function(w,b,y){x.type.is_number(y.args[0])&&w.success(b)},\"nonvar/1\":function(w,b,y){x.type.is_variable(y.args[0])||w.success(b)},\"ground/1\":function(w,b,y){y.variables().length===0&&w.success(b)},\"acyclic_term/1\":function(w,b,y){for(var F=b.substitution.apply(b.substitution),z=y.args[0].variables(),X=0;X<z.length;X++)if(b.substitution.links[z[X]]!==void 0&&!b.substitution.links[z[X]].equals(F.links[z[X]]))return;w.success(b)},\"callable/1\":function(w,b,y){x.type.is_callable(y.args[0])&&w.success(b)},\"is_list/1\":function(w,b,y){for(var F=y.args[0];x.type.is_term(F)&&F.indicator===\"./2\";)F=F.args[1];x.type.is_term(F)&&F.indicator===\"[]/0\"&&w.success(b)},\"current_input/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_input()])),b.substitution,b)]))},\"current_output/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_output()])),b.substitution,b)]))},\"set_input/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.output===!0?w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator)):(w.set_current_input(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"set_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):(w.set_current_output(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"open/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];w.prepend([new Pe(b.goal.replace(new j(\"open\",[F,z,X,new j(\"[]\",[])])),b.substitution,b)])},\"open/4\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=y.args[3];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,y.indicator));else if(!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else if(!x.type.is_variable(X))w.throw_error(x.error.type(\"variable\",X,y.indicator));else if(!x.type.is_atom(F)&&!x.type.is_streamable(F))w.throw_error(x.error.domain(\"source_sink\",F,y.indicator));else if(!x.type.is_io_mode(z))w.throw_error(x.error.domain(\"io_mode\",z,y.indicator));else{for(var oe={},xe=$,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_stream_option(Te)){w.throw_error(x.error.domain(\"stream_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id,xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",$,y.indicator));return}else{var lt=oe.alias;if(lt&&w.get_stream_by_alias(lt)){w.throw_error(x.error.permission(\"open\",\"source_sink\",new j(\"alias\",[new j(lt,[])]),y.indicator));return}oe.type||(oe.type=\"text\");var Ct;if(x.type.is_atom(F)?Ct=w.file_system_open(F.id,oe.type,z.id):Ct=F.stream(oe.type,z.id),Ct===!1){w.throw_error(x.error.permission(\"open\",\"source_sink\",F,y.indicator));return}else if(Ct===null){w.throw_error(x.error.existence(\"source_sink\",F,y.indicator));return}var qt=new Fe(Ct,z.id,oe.alias,oe.type,oe.reposition===\"true\",oe.eof_action);lt?w.session.streams[lt]=qt:w.session.streams[qt.id]=qt,w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,qt])),b.substitution,b)])}}},\"close/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"close\",[F,new j(\"[]\",[])])),b.substitution,b)])},\"close/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else{for(var $={},oe=z,xe;x.type.is_term(oe)&&oe.indicator===\"./2\";){if(xe=oe.args[0],x.type.is_variable(xe)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_close_option(xe)){w.throw_error(x.error.domain(\"close_option\",xe,y.indicator));return}$[xe.id]=xe.args[0].id===\"true\",oe=oe.args[1]}if(oe.indicator!==\"[]/0\"){x.type.is_variable(oe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",z,y.indicator));return}else{if(X===w.session.standard_input||X===w.session.standard_output){w.success(b);return}else X===w.session.current_input?w.session.current_input=w.session.standard_input:X===w.session.current_output&&(w.session.current_output=w.session.current_output);X.alias!==null?delete w.session.streams[X.alias]:delete w.session.streams[X.id],X.output&&X.stream.flush();var Te=X.stream.close();X.stream=null,($.force===!0||Te===!0)&&w.success(b)}}},\"flush_output/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"flush_output\",[new De(\"S\")])])),b.substitution,b)])},\"flush_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(z)||z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):F.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",output,y.indicator)):(z.stream.flush(),w.success(b))},\"stream_property/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_variable(F)&&(!x.type.is_stream(X)||X.stream===null))w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_stream_property(z))w.throw_error(x.error.domain(\"stream_property\",z,y.indicator));else{var $=[],oe=[];if(!x.type.is_variable(F))$.push(X);else for(var xe in w.session.streams)$.push(w.session.streams[xe]);for(var Te=0;Te<$.length;Te++){var lt=[];$[Te].filename&&lt.push(new j(\"file_name\",[new j($[Te].file_name,[])])),lt.push(new j(\"mode\",[new j($[Te].mode,[])])),lt.push(new j($[Te].input?\"input\":\"output\",[])),$[Te].alias&&lt.push(new j(\"alias\",[new j($[Te].alias,[])])),lt.push(new j(\"position\",[typeof $[Te].position==\"number\"?new Re($[Te].position,!1):new j($[Te].position,[])])),lt.push(new j(\"end_of_stream\",[new j($[Te].position===\"end_of_stream\"?\"at\":$[Te].position===\"past_end_of_stream\"?\"past\":\"not\",[])])),lt.push(new j(\"eof_action\",[new j($[Te].eof_action,[])])),lt.push(new j(\"reposition\",[new j($[Te].reposition?\"true\":\"false\",[])])),lt.push(new j(\"type\",[new j($[Te].type,[])]));for(var Ct=0;Ct<lt.length;Ct++)oe.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[x.type.is_variable(F)?F:X,$[Te]]),new j(\"=\",[z,lt[Ct]])])),b.substitution,b))}w.prepend(oe)}},\"at_end_of_stream/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\",\",[new j(\"stream_property\",[new De(\"S\"),new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])])),b.substitution,b)])},\"at_end_of_stream/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"stream_property\",[F,new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])),b.substitution,b)])},\"set_stream_position/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):x.type.is_stream_position(z)?X.reposition===!1?w.throw_error(x.error.permission(\"reposition\",\"stream\",F,y.indicator)):(x.type.is_integer(z)?X.position=z.value:X.position=z.id,w.success(b)):w.throw_error(x.error.domain(\"stream_position\",z,y.indicator))},\"get_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"get_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=-1,X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0),X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"peek_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=-1,X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0)}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_character(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):X.stream.put(z.id,X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.type(\"character\",z,y.indicator))},\"put_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(z)?x.type.is_character_code(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):X.stream.put_char(c(z.value),X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.representation(\"character_code\",y.indicator)):w.throw_error(x.error.type(\"integer\",z,y.indicator))},\"nl/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),new j(`\n`,[])])])),b.substitution,b)])},\"nl/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"put_char\",[F,new j(`\n`,[])])),b.substitution,b)])},\"get_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else{if($=X.stream.get_byte(X.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else if($=X.stream.get_byte(X.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"text\"?w.throw_error(x.error.permission(\"output\",\"text_stream\",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.type(\"byte\",z,y.indicator))},\"read/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,new j(\"[]\",[])])])),b.substitution,b)])},\"read/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"read_term\",[F,z,new j(\"[]\",[])])),b.substitution,b)])},\"read_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"read_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=X,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_read_option(Te)){w.throw_error(x.error.domain(\"read_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0],xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",X,y.indicator));return}else{for(var lt,Ct,qt,ir=\"\",Pt=[],gn=null;gn===null||gn.name!==\"atom\"||gn.value!==\".\"||qt.type===f&&x.flatten_error(new j(\"throw\",[qt.value])).found===\"token_not_found\";){if(lt=$.stream.get(1,$.position),lt===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}if(lt===\"end_of_file\"||lt===\"past_end_of_file\"){qt?w.throw_error(x.error.syntax(Pt[qt.len-1],\". or expression expected\",!1)):w.throw_error(x.error.syntax(null,\"token not found\",!0));return}$.position++,ir+=lt,Ct=new U(w),Ct.new_text(ir),Pt=Ct.get_tokens(),gn=Pt!==null&&Pt.length>0?Pt[Pt.length-1]:null,Pt!==null&&(qt=W(w,Pt,0,w.__get_max_priority(),!1))}if(qt.type===p&&qt.len===Pt.length-1&&gn.value===\".\"){qt=qt.value.rename(w);var Pr=new j(\"=\",[z,qt]);if(oe.variables){var Ir=g(s(ye(qt.variables()),function(Or){return new De(Or)}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variables,Ir])])}if(oe.variable_names){var Ir=g(s(ye(qt.variables()),function(on){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===on)break;return new j(\"=\",[new j(ai,[]),new De(on)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variable_names,Ir])])}if(oe.singletons){var Ir=g(s(new Ve(qt,null).singleton_variables(),function(on){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===on)break;return new j(\"=\",[new j(ai,[]),new De(on)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.singletons,Ir])])}w.prepend([new Pe(b.goal.replace(Pr),b.substitution,b)])}else qt.type===p?w.throw_error(x.error.syntax(Pt[qt.len],\"unexpected token\",!1)):w.throw_error(qt.value)}}},\"write/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write\",[new De(\"S\"),F])])),b.substitution,b)])},\"write/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"false\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"writeq/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"writeq\",[new De(\"S\"),F])])),b.substitution,b)])},\"writeq/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_canonical/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_canonical\",[new De(\"S\"),F])])),b.substitution,b)])},\"write_canonical/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"true\")]),new j(\".\",[new j(\"numbervars\",[new j(\"false\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"write_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.input)w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"output\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=X,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Te)){w.throw_error(x.error.domain(\"write_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id===\"true\",xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",X,y.indicator));return}else{oe.session=w.session;var lt=z.toString(oe);$.stream.put(lt,$.position),typeof $.position==\"number\"&&($.position+=lt.length),w.success(b)}}},\"halt/0\":function(w,b,y){w.points=[]},\"halt/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?w.points=[]:w.throw_error(x.error.type(\"integer\",F,y.indicator))},\"current_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator));else{var X=[];for(var $ in x.flag)if(x.flag.hasOwnProperty($)){var oe=new j(\",\",[new j(\"=\",[new j($),F]),new j(\"=\",[w.get_flag($),z])]);X.push(new Pe(b.goal.replace(oe),b.substitution,b))}w.prepend(X)}},\"set_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(w.session.flag[F.id]=z,w.success(b)):w.throw_error(x.error.permission(\"modify\",\"flag\",F)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[F,z]),y.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator)):w.throw_error(x.error.type(\"atom\",F,y.indicator))}},flag:{bounded:{allowed:[new j(\"true\"),new j(\"false\")],value:new j(\"true\"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new j(\"down\"),new j(\"toward_zero\")],value:new j(\"toward_zero\"),changeable:!1},char_conversion:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"on\"),changeable:!0},debug:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"off\"),changeable:!0},max_arity:{allowed:[new j(\"unbounded\")],value:new j(\"unbounded\"),changeable:!1},unknown:{allowed:[new j(\"error\"),new j(\"fail\"),new j(\"warning\")],value:new j(\"error\"),changeable:!0},double_quotes:{allowed:[new j(\"chars\"),new j(\"codes\"),new j(\"atom\")],value:new j(\"codes\"),changeable:!0},occurs_check:{allowed:[new j(\"false\"),new j(\"true\")],value:new j(\"false\"),changeable:!0},dialect:{allowed:[new j(\"tau\")],value:new j(\"tau\"),changeable:!1},version_data:{allowed:[new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)])],value:new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)]),changeable:!1},nodejs:{allowed:[new j(\"yes\"),new j(\"no\")],value:new j(typeof ec<\"u\"&&ec.exports?\"yes\":\"no\"),changeable:!1}},unify:function(w,b,y){y=y===void 0?!1:y;for(var F=[{left:w,right:b}],z={};F.length!==0;){var X=F.pop();if(w=X.left,b=X.right,x.type.is_term(w)&&x.type.is_term(b)){if(w.indicator!==b.indicator)return null;for(var $=0;$<w.args.length;$++)F.push({left:w.args[$],right:b.args[$]})}else if(x.type.is_number(w)&&x.type.is_number(b)){if(w.value!==b.value||w.is_float!==b.is_float)return null}else if(x.type.is_variable(w)){if(x.type.is_variable(b)&&w.id===b.id)continue;if(y===!0&&b.variables().indexOf(w.id)!==-1)return null;if(w.id!==\"_\"){var oe=new Ne;oe.add(w.id,b);for(var $=0;$<F.length;$++)F[$].left=F[$].left.apply(oe),F[$].right=F[$].right.apply(oe);for(var $ in z)z[$]=z[$].apply(oe);z[w.id]=b}}else if(x.type.is_variable(b))F.push({left:b,right:w});else if(w.unify!==void 0){if(!w.unify(b))return null}else return null}return new Ne(z)},compare:function(w,b){var y=x.type.compare(w,b);return y!==0?y:w.compare(b)},arithmetic_compare:function(w,b,y){var F=b.interpret(w);if(x.type.is_number(F)){var z=y.interpret(w);return x.type.is_number(z)?F.value<z.value?-1:F.value>z.value?1:0:z}else return F},operate:function(w,b){if(x.type.is_operator(b)){for(var y=x.type.is_operator(b),F=[],z,X=!1,$=0;$<b.args.length;$++){if(z=b.args[$].interpret(w),x.type.is_number(z)){if(y.type_args!==null&&z.is_float!==y.type_args)return x.error.type(y.type_args?\"float\":\"integer\",z,w.__call_indicator);F.push(z.value)}else return z;X=X||z.is_float}return F.push(w),z=x.arithmetic.evaluation[b.indicator].fn.apply(this,F),X=y.type_result===null?X:y.type_result,x.type.is_term(z)?z:z===Number.POSITIVE_INFINITY||z===Number.NEGATIVE_INFINITY?x.error.evaluation(\"overflow\",w.__call_indicator):X===!1&&w.get_flag(\"bounded\").id===\"true\"&&(z>w.get_flag(\"max_integer\").value||z<w.get_flag(\"min_integer\").value)?x.error.evaluation(\"int_overflow\",w.__call_indicator):new Re(z,X)}else return x.error.type(\"evaluable\",b.indicator,w.__call_indicator)},error:{existence:function(w,b,y){return typeof b==\"string\"&&(b=Z(b)),new j(\"error\",[new j(\"existence_error\",[new j(w),b]),Z(y)])},type:function(w,b,y){return new j(\"error\",[new j(\"type_error\",[new j(w),b]),Z(y)])},instantiation:function(w){return new j(\"error\",[new j(\"instantiation_error\"),Z(w)])},domain:function(w,b,y){return new j(\"error\",[new j(\"domain_error\",[new j(w),b]),Z(y)])},representation:function(w,b){return new j(\"error\",[new j(\"representation_error\",[new j(w)]),Z(b)])},permission:function(w,b,y,F){return new j(\"error\",[new j(\"permission_error\",[new j(w),new j(b),y]),Z(F)])},evaluation:function(w,b){return new j(\"error\",[new j(\"evaluation_error\",[new j(w)]),Z(b)])},syntax:function(w,b,y){w=w||{value:\"\",line:0,column:0,matches:[\"\"],start:0};var F=y&&w.matches.length>0?w.start+w.matches[0].length:w.start,z=y?new j(\"token_not_found\"):new j(\"found\",[new j(w.value.toString())]),X=new j(\".\",[new j(\"line\",[new Re(w.line+1)]),new j(\".\",[new j(\"column\",[new Re(F+1)]),new j(\".\",[z,new j(\"[]\",[])])])]);return new j(\"error\",[new j(\"syntax_error\",[new j(b)]),X])},syntax_by_predicate:function(w,b){return new j(\"error\",[new j(\"syntax_error\",[new j(w)]),Z(b)])}},warning:{singleton:function(w,b,y){for(var F=new j(\"[]\"),z=w.length-1;z>=0;z--)F=new j(\".\",[new De(w[z]),F]);return new j(\"warning\",[new j(\"singleton_variables\",[F,Z(b)]),new j(\".\",[new j(\"line\",[new Re(y,!1)]),new j(\"[]\")])])},failed_goal:function(w,b){return new j(\"warning\",[new j(\"failed_goal\",[w]),new j(\".\",[new j(\"line\",[new Re(b,!1)]),new j(\"[]\")])])}},format_variable:function(w){return\"_\"+w},format_answer:function(w,b,F){b instanceof ke&&(b=b.thread);var F=F||{};if(F.session=b?b.session:void 0,x.type.is_error(w))return\"uncaught exception: \"+w.args[0].toString();if(w===!1)return\"false.\";if(w===null)return\"limit exceeded ;\";var z=0,X=\"\";if(x.type.is_substitution(w)){var $=w.domain(!0);w=w.filter(function(Te,lt){return!x.type.is_variable(lt)||$.indexOf(lt.id)!==-1&&Te!==lt.id})}for(var oe in w.links)w.links.hasOwnProperty(oe)&&(z++,X!==\"\"&&(X+=\", \"),X+=oe.toString(F)+\" = \"+w.links[oe].toString(F));var xe=typeof b>\"u\"||b.points.length>0?\" ;\":\".\";return z===0?\"true\"+xe:X+xe},flatten_error:function(w){if(!x.type.is_error(w))return null;w=w.args[0];var b={};return b.type=w.args[0].id,b.thrown=b.type===\"syntax_error\"?null:w.args[1].id,b.expected=null,b.found=null,b.representation=null,b.existence=null,b.existence_type=null,b.line=null,b.column=null,b.permission_operation=null,b.permission_type=null,b.evaluation_type=null,b.type===\"type_error\"||b.type===\"domain_error\"?(b.expected=w.args[0].args[0].id,b.found=w.args[0].args[1].toString()):b.type===\"syntax_error\"?w.args[1].indicator===\"./2\"?(b.expected=w.args[0].args[0].id,b.found=w.args[1].args[1].args[1].args[0],b.found=b.found.id===\"token_not_found\"?b.found.id:b.found.args[0].id,b.line=w.args[1].args[0].args[0].value,b.column=w.args[1].args[1].args[0].args[0].value):b.thrown=w.args[1].id:b.type===\"permission_error\"?(b.found=w.args[0].args[2].toString(),b.permission_operation=w.args[0].args[0].id,b.permission_type=w.args[0].args[1].id):b.type===\"evaluation_error\"?b.evaluation_type=w.args[0].args[0].id:b.type===\"representation_error\"?b.representation=w.args[0].args[0].id:b.type===\"existence_error\"&&(b.existence=w.args[0].args[1].toString(),b.existence_type=w.args[0].args[0].id),b},create:function(w){return new x.type.Session(w)}};typeof ec<\"u\"?ec.exports=x:window.pl=x})()});function EEe(t,e,r){t.prepend(r.map(s=>new hl.default.type.State(e.goal.replace(s),e.substitution,e)))}function Lq(t){let e=CEe.get(t.session);if(e==null)throw new Error(\"Assertion failed: A project should have been registered for the active session\");return e}function wEe(t,e){CEe.set(t,e),t.consult(`:- use_module(library(${Zct.id})).`)}var hl,IEe,J0,zct,Xct,CEe,Zct,BEe=Xe(()=>{Ge();ql();hl=ut(Oq()),IEe=ut(Ie(\"vm\")),{is_atom:J0,is_variable:zct,is_instantiated_list:Xct}=hl.default.type;CEe=new WeakMap;Zct=new hl.default.type.Module(\"constraints\",{\"project_workspaces_by_descriptor/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let c=G.parseIdent(s.id),f=G.makeDescriptor(c,a.id),h=Lq(t).tryWorkspaceByDescriptor(f);zct(n)&&h!==null&&EEe(t,e,[new hl.default.type.Term(\"=\",[n,new hl.default.type.Term(String(h.relativeCwd))])]),J0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},\"workspace_field/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let f=Lq(t).tryWorkspaceByCwd(s.id);if(f==null)return;let p=va(f.manifest.raw,a.id);typeof p>\"u\"||EEe(t,e,[new hl.default.type.Term(\"=\",[n,new hl.default.type.Term(typeof p==\"object\"?JSON.stringify(p):p)])])},\"workspace_field_test/3\":(t,e,r)=>{let[s,a,n]=r.args;t.prepend([new hl.default.type.State(e.goal.replace(new hl.default.type.Term(\"workspace_field_test\",[s,a,n,new hl.default.type.Term(\"[]\",[])])),e.substitution,e)])},\"workspace_field_test/4\":(t,e,r)=>{let[s,a,n,c]=r.args;if(!J0(s)||!J0(a)||!J0(n)||!Xct(c)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let p=Lq(t).tryWorkspaceByCwd(s.id);if(p==null)return;let h=va(p.manifest.raw,a.id);if(typeof h>\"u\")return;let E={$$:h};for(let[S,P]of c.toJavaScript().entries())E[`$${S}`]=P;IEe.default.runInNewContext(n.id,E)&&t.success(e)}},[\"project_workspaces_by_descriptor/3\",\"workspace_field/3\",\"workspace_field_test/3\",\"workspace_field_test/4\"])});var aS={};Vt(aS,{Constraints:()=>Uq,DependencyType:()=>bEe});function go(t){if(t instanceof KC.default.type.Num)return t.value;if(t instanceof KC.default.type.Term)switch(t.indicator){case\"throw/1\":return go(t.args[0]);case\"error/1\":return go(t.args[0]);case\"error/2\":if(t.args[0]instanceof KC.default.type.Term&&t.args[0].indicator===\"syntax_error/1\")return Object.assign(go(t.args[0]),...go(t.args[1]));{let e=go(t.args[0]);return e.message+=` (in ${go(t.args[1])})`,e}case\"syntax_error/1\":return new jt(43,`Syntax error: ${go(t.args[0])}`);case\"existence_error/2\":return new jt(44,`Existence error: ${go(t.args[0])} ${go(t.args[1])} not found`);case\"instantiation_error/0\":return new jt(75,\"Instantiation error: an argument is variable when an instantiated argument was expected\");case\"line/1\":return{line:go(t.args[0])};case\"column/1\":return{column:go(t.args[0])};case\"found/1\":return{found:go(t.args[0])};case\"./2\":return[go(t.args[0])].concat(go(t.args[1]));case\"//2\":return`${go(t.args[0])}/${go(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function SEe(t){let e;try{e=go(t)}catch(r){throw typeof r==\"string\"?new jt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<\"u\"&&typeof e.column<\"u\"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function Pm(t){return t.id===\"null\"?null:`${t.toJavaScript()}`}function $ct(t){if(t.id===\"null\")return null;{let e=t.toJavaScript();if(typeof e!=\"string\")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function K0(t){return typeof t==\"string\"?`'${t}'`:\"[]\"}var DEe,KC,bEe,vEe,Mq,Uq,lS=Xe(()=>{Ge();Ge();Dt();DEe=ut(nEe()),KC=ut(Oq());iS();BEe();(0,DEe.default)(KC.default);bEe=(s=>(s.Dependencies=\"dependencies\",s.DevDependencies=\"devDependencies\",s.PeerDependencies=\"peerDependencies\",s))(bEe||{}),vEe=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];Mq=class{constructor(e,r){let s=1e3*e.workspaces.length;this.session=KC.default.create(s),wEe(this.session,e),this.session.consult(\":- use_module(library(lists)).\"),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw SEe(r);for(;;){let s=await this.fetchNextAnswer();if(s===null)throw new jt(79,\"Resolution limit exceeded\");if(!s)break;if(s.id===\"throw\")throw SEe(s);yield s}}};Uq=class t{constructor(e){this.source=\"\";this.project=e;let r=e.configuration.get(\"constraintsPath\");ce.existsSync(r)&&(this.source=ce.readFileSync(r,\"utf8\"))}static async find(e){return new t(e)}getProjectDatabase(){let e=\"\";for(let r of vEe)e+=`dependency_type(${r}).\n`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${K0(s)}).\n`,e+=`workspace_ident(${K0(s)}, ${K0(G.stringifyIdent(r.anchoredLocator))}).\n`,e+=`workspace_version(${K0(s)}, ${K0(r.manifest.version)}).\n`;for(let a of vEe)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${K0(s)}, ${K0(G.stringifyIdent(n))}, ${K0(n.range)}, ${a}).\n`}return e+=`workspace(_) :- false.\n`,e+=`workspace_ident(_, _) :- false.\n`,e+=`workspace_version(_, _) :- false.\n`,e+=`workspace_has_dependency(_, _, _, _) :- false.\n`,e}getDeclarations(){let e=\"\";return e+=`gen_enforced_dependency(_, _, _, _) :- false.\n`,e+=`gen_enforced_field(_, _, _) :- false.\n`,e}get fullSource(){return`${this.getProjectDatabase()}\n${this.source}\n${this.getDeclarations()}`}createSession(){return new Mq(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=nS([f,G.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=nS(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).\")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.DependencyIdent),c=Pm(s.links.DependencyRange),f=Pm(s.links.DependencyType);if(a===null||n===null)throw new Error(\"Invalid rule\");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?\"0\":\"1\",({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>G.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).\")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.FieldPath),c=$ct(s.links.FieldValue);if(a===null||n===null)throw new Error(\"Invalid rule\");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!==\"_\"&&(a[n]=Pm(c));yield a}}}});var OEe=_(fF=>{\"use strict\";Object.defineProperty(fF,\"__esModule\",{value:!0});function BS(t){let e=[...t.caches],r=e.shift();return r===void 0?NEe():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>BS({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>BS({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>BS({caches:e}).delete(s))},clear(){return r.clear().catch(()=>BS({caches:e}).clear())}}}function NEe(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}fF.createFallbackableCache=BS;fF.createNullCache=NEe});var MEe=_((BJt,LEe)=>{LEe.exports=OEe()});var UEe=_($q=>{\"use strict\";Object.defineProperty($q,\"__esModule\",{value:!0});function yut(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}$q.createInMemoryCache=yut});var HEe=_((SJt,_Ee)=>{_Ee.exports=UEe()});var GEe=_($u=>{\"use strict\";Object.defineProperty($u,\"__esModule\",{value:!0});function Eut(t,e,r){let s={\"x-algolia-api-key\":r,\"x-algolia-application-id\":e};return{headers(){return t===e9.WithinHeaders?s:{}},queryParameters(){return t===e9.WithinQueryParameters?s:{}}}}function Iut(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function jEe(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return jEe(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function Cut(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function wut(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function But(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var vut=\"4.22.1\",Sut=t=>()=>t.transporter.requester.destroy(),e9={WithinQueryParameters:0,WithinHeaders:1};$u.AuthMode=e9;$u.addMethods=wut;$u.createAuth=Eut;$u.createRetryablePromise=Iut;$u.createWaitablePromise=jEe;$u.destroy=Sut;$u.encode=But;$u.shuffle=Cut;$u.version=vut});var vS=_((bJt,qEe)=>{qEe.exports=GEe()});var WEe=_(t9=>{\"use strict\";Object.defineProperty(t9,\"__esModule\",{value:!0});var Dut={Delete:\"DELETE\",Get:\"GET\",Post:\"POST\",Put:\"PUT\"};t9.MethodEnum=Dut});var SS=_((xJt,YEe)=>{YEe.exports=WEe()});var aIe=_(Yi=>{\"use strict\";Object.defineProperty(Yi,\"__esModule\",{value:!0});var JEe=SS();function r9(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{[\"timeout\",\"headers\",\"queryParameters\",\"data\",\"cacheable\"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var DS={Read:1,Write:2,Any:3},sw={Up:1,Down:2,Timeouted:3},KEe=2*60*1e3;function i9(t,e=sw.Up){return{...t,status:e,lastUpdate:Date.now()}}function zEe(t){return t.status===sw.Up||Date.now()-t.lastUpdate>KEe}function XEe(t){return t.status===sw.Timeouted&&Date.now()-t.lastUpdate<=KEe}function s9(t){return typeof t==\"string\"?{protocol:\"https\",url:t,accept:DS.Any}:{protocol:t.protocol||\"https\",url:t.url,accept:t.accept||DS.Any}}function but(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(i9(r))))).then(r=>{let s=r.filter(f=>zEe(f)),a=r.filter(f=>XEe(f)),n=[...s,...a],c=n.length>0?n.map(f=>s9(f)):e;return{getTimeout(f,p){return(a.length===0&&f===0?1:a.length+3+f)*p},statelessHosts:c}})}var Put=({isTimedOut:t,status:e})=>!t&&~~e===0,xut=t=>{let e=t.status;return t.isTimedOut||Put(t)||~~(e/100)!==2&&~~(e/100)!==4},kut=({status:t})=>~~(t/100)===2,Qut=(t,e)=>xut(t)?e.onRetry(t):kut(t)?e.onSuccess(t):e.onFail(t);function VEe(t,e,r,s){let a=[],n=rIe(r,s),c=nIe(t,s),f=r.method,p=r.method!==JEe.MethodEnum.Get?{}:{...r.data,...s.data},h={\"x-algolia-agent\":t.userAgent.value,...t.queryParameters,...p,...s.queryParameters},E=0,C=(S,P)=>{let I=S.pop();if(I===void 0)throw oIe(n9(a));let R={data:n,headers:c,method:f,url:eIe(I,r.path,h),connectTimeout:P(E,t.timeouts.connect),responseTimeout:P(E,s.timeout)},N=W=>{let ee={request:R,response:W,host:I,triesLeft:S.length};return a.push(ee),ee},U={onSuccess:W=>ZEe(W),onRetry(W){let ee=N(W);return W.isTimedOut&&E++,Promise.all([t.logger.info(\"Retryable failure\",o9(ee)),t.hostsCache.set(I,i9(I,W.isTimedOut?sw.Timeouted:sw.Down))]).then(()=>C(S,P))},onFail(W){throw N(W),$Ee(W,n9(a))}};return t.requester.send(R).then(W=>Qut(W,U))};return but(t.hostsCache,e).then(S=>C([...S.statelessHosts].reverse(),S.getTimeout))}function Tut(t){let{hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,hosts:p,queryParameters:h,headers:E}=t,C={hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,headers:E,queryParameters:h,hosts:p.map(S=>s9(S)),read(S,P){let I=r9(P,C.timeouts.read),R=()=>VEe(C,C.hosts.filter(W=>(W.accept&DS.Read)!==0),S,I);if((I.cacheable!==void 0?I.cacheable:S.cacheable)!==!0)return R();let U={request:S,mappedRequestOptions:I,transporter:{queryParameters:C.queryParameters,headers:C.headers}};return C.responsesCache.get(U,()=>C.requestsCache.get(U,()=>C.requestsCache.set(U,R()).then(W=>Promise.all([C.requestsCache.delete(U),W]),W=>Promise.all([C.requestsCache.delete(U),Promise.reject(W)])).then(([W,ee])=>ee)),{miss:W=>C.responsesCache.set(U,W)})},write(S,P){return VEe(C,C.hosts.filter(I=>(I.accept&DS.Write)!==0),S,r9(P,C.timeouts.write))}};return C}function Rut(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:\"\"}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function ZEe(t){try{return JSON.parse(t.content)}catch(e){throw sIe(e.message,t)}}function $Ee({content:t,status:e},r){let s=t;try{s=JSON.parse(t).message}catch{}return iIe(s,e,r)}function Fut(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function eIe(t,e,r){let s=tIe(r),a=`${t.protocol}://${t.url}/${e.charAt(0)===\"/\"?e.substr(1):e}`;return s.length&&(a+=`?${s}`),a}function tIe(t){let e=r=>Object.prototype.toString.call(r)===\"[object Object]\"||Object.prototype.toString.call(r)===\"[object Array]\";return Object.keys(t).map(r=>Fut(\"%s=%s\",r,e(t[r])?JSON.stringify(t[r]):t[r])).join(\"&\")}function rIe(t,e){if(t.method===JEe.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function nIe(t,e){let r={...t.headers,...e.headers},s={};return Object.keys(r).forEach(a=>{let n=r[a];s[a.toLowerCase()]=n}),s}function n9(t){return t.map(e=>o9(e))}function o9(t){let e=t.request.headers[\"x-algolia-api-key\"]?{\"x-algolia-api-key\":\"*****\"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function iIe(t,e,r){return{name:\"ApiError\",message:t,status:e,transporterStackTrace:r}}function sIe(t,e){return{name:\"DeserializationError\",message:t,response:e}}function oIe(t){return{name:\"RetryError\",message:\"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.\",transporterStackTrace:t}}Yi.CallEnum=DS;Yi.HostStatusEnum=sw;Yi.createApiError=iIe;Yi.createDeserializationError=sIe;Yi.createMappedRequestOptions=r9;Yi.createRetryError=oIe;Yi.createStatefulHost=i9;Yi.createStatelessHost=s9;Yi.createTransporter=Tut;Yi.createUserAgent=Rut;Yi.deserializeFailure=$Ee;Yi.deserializeSuccess=ZEe;Yi.isStatefulHostTimeouted=XEe;Yi.isStatefulHostUp=zEe;Yi.serializeData=rIe;Yi.serializeHeaders=nIe;Yi.serializeQueryParameters=tIe;Yi.serializeUrl=eIe;Yi.stackFrameWithoutCredentials=o9;Yi.stackTraceWithoutCredentials=n9});var bS=_((QJt,lIe)=>{lIe.exports=aIe()});var cIe=_(X0=>{\"use strict\";Object.defineProperty(X0,\"__esModule\",{value:!0});var ow=vS(),Nut=bS(),PS=SS(),Out=t=>{let e=t.region||\"us\",r=ow.createAuth(ow.AuthMode.WithinHeaders,t.appId,t.apiKey),s=Nut.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return ow.addMethods({appId:a,transporter:s},t.methods)},Lut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Post,path:\"2/abtests\",data:e},r),Mut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Delete,path:ow.encode(\"2/abtests/%s\",e)},r),Uut=t=>(e,r)=>t.transporter.read({method:PS.MethodEnum.Get,path:ow.encode(\"2/abtests/%s\",e)},r),_ut=t=>e=>t.transporter.read({method:PS.MethodEnum.Get,path:\"2/abtests\"},e),Hut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Post,path:ow.encode(\"2/abtests/%s/stop\",e)},r);X0.addABTest=Lut;X0.createAnalyticsClient=Out;X0.deleteABTest=Mut;X0.getABTest=Uut;X0.getABTests=_ut;X0.stopABTest=Hut});var fIe=_((RJt,uIe)=>{uIe.exports=cIe()});var pIe=_(xS=>{\"use strict\";Object.defineProperty(xS,\"__esModule\",{value:!0});var a9=vS(),jut=bS(),AIe=SS(),Gut=t=>{let e=t.region||\"us\",r=a9.createAuth(a9.AuthMode.WithinHeaders,t.appId,t.apiKey),s=jut.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return a9.addMethods({appId:t.appId,transporter:s},t.methods)},qut=t=>e=>t.transporter.read({method:AIe.MethodEnum.Get,path:\"1/strategies/personalization\"},e),Wut=t=>(e,r)=>t.transporter.write({method:AIe.MethodEnum.Post,path:\"1/strategies/personalization\",data:e},r);xS.createPersonalizationClient=Gut;xS.getPersonalizationStrategy=qut;xS.setPersonalizationStrategy=Wut});var gIe=_((NJt,hIe)=>{hIe.exports=pIe()});var xIe=_(Ft=>{\"use strict\";Object.defineProperty(Ft,\"__esModule\",{value:!0});var Jt=vS(),gl=bS(),br=SS(),Yut=Ie(\"crypto\");function AF(t){let e=r=>t.request(r).then(s=>{if(t.batch!==void 0&&t.batch(s.hits),!t.shouldStop(s))return s.cursor?e({cursor:s.cursor}):e({page:(r.page||0)+1})});return e({})}var Vut=t=>{let e=t.appId,r=Jt.createAuth(t.authMode!==void 0?t.authMode:Jt.AuthMode.WithinHeaders,e,t.apiKey),s=gl.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:gl.CallEnum.Read},{url:`${e}.algolia.net`,accept:gl.CallEnum.Write}].concat(Jt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),\"content-type\":\"application/x-www-form-urlencoded\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:s,appId:e,addAlgoliaAgent(n,c){s.userAgent.add({segment:n,version:c})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return Jt.addMethods(a,t.methods)};function dIe(){return{name:\"MissingObjectIDError\",message:\"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.\"}}function mIe(){return{name:\"ObjectNotFoundError\",message:\"Object not found.\"}}function yIe(){return{name:\"ValidUntilNotFoundError\",message:\"ValidUntil not found in given secured api key.\"}}var Jut=t=>(e,r)=>{let{queryParameters:s,...a}=r||{},n={acl:e,...s!==void 0?{queryParameters:s}:{}},c=(f,p)=>Jt.createRetryablePromise(h=>kS(t)(f.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/keys\",data:n},a),c)},Kut=t=>(e,r,s)=>{let a=gl.createMappedRequestOptions(s);return a.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping\",data:{cluster:r}},a)},zut=t=>(e,r,s)=>t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping/batch\",data:{users:e,cluster:r}},s),Xut=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:{action:\"addEntry\",body:[]}}},r),(s,a)=>aw(t)(s.taskID,a)),pF=t=>(e,r,s)=>{let a=(n,c)=>QS(t)(e,{methods:{waitTask:hs}}).waitTask(n.taskID,c);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"copy\",destination:r}},s),a)},Zut=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Rules]}),$ut=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Settings]}),eft=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Synonyms]}),tft=t=>(e,r)=>e.method===br.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),rft=t=>(e,r)=>{let s=(a,n)=>Jt.createRetryablePromise(c=>kS(t)(e,n).then(c).catch(f=>{if(f.status!==404)throw f}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/keys/%s\",e)},r),s)},nft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"deleteEntry\",body:{objectID:n}}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},ift=()=>(t,e)=>{let r=gl.serializeQueryParameters(e),s=Yut.createHmac(\"sha256\",t).update(r).digest(\"hex\");return Buffer.from(s+r).toString(\"base64\")},kS=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/keys/%s\",e)},r),EIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/task/%s\",e.toString())},r),sft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"/1/dictionaries/*/settings\"},e),oft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/logs\"},e),aft=()=>t=>{let e=Buffer.from(t,\"base64\").toString(\"ascii\"),r=/validUntil=(\\d+)/,s=e.match(r);if(s===null)throw yIe();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},lft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/top\"},e),cft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/clusters/mapping/%s\",e)},r),uft=t=>e=>{let{retrieveMappings:r,...s}=e||{};return r===!0&&(s.getClusters=!0),t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/pending\"},s)},QS=t=>(e,r={})=>{let s={transporter:t.transporter,appId:t.appId,indexName:e};return Jt.addMethods(s,r.methods)},fft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/keys\"},e),Aft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters\"},e),pft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/indexes\"},e),hft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping\"},e),gft=t=>(e,r,s)=>{let a=(n,c)=>QS(t)(e,{methods:{waitTask:hs}}).waitTask(n.taskID,c);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"move\",destination:r}},s),a)},dft=t=>(e,r)=>{let s=(a,n)=>Promise.all(Object.keys(a.taskID).map(c=>QS(t)(c,{methods:{waitTask:hs}}).waitTask(a.taskID[c],n)));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/indexes/*/batch\",data:{requests:e}},r),s)},mft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:e}},r),yft=t=>(e,r)=>{let s=e.map(a=>({...a,params:gl.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/queries\",data:{requests:s},cacheable:!0},r)},Eft=t=>(e,r)=>Promise.all(e.map(s=>{let{facetName:a,facetQuery:n,...c}=s.params;return QS(t)(s.indexName,{methods:{searchForFacetValues:DIe}}).searchForFacetValues(a,n,{...r,...c})})),Ift=t=>(e,r)=>{let s=gl.createMappedRequestOptions(r);return s.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Delete,path:\"1/clusters/mapping\"},s)},Cft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},wft=t=>(e,r)=>{let s=(a,n)=>Jt.createRetryablePromise(c=>kS(t)(e,n).catch(f=>{if(f.status!==404)throw f;return c()}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/keys/%s/restore\",e)},r),s)},Bft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},vft=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/search\",e),data:{query:r},cacheable:!0},s),Sft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/clusters/mapping/search\",data:{query:e}},r),Dft=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:\"/1/dictionaries/*/settings\",data:e},r),(s,a)=>aw(t)(s.taskID,a)),bft=t=>(e,r)=>{let s=Object.assign({},r),{queryParameters:a,...n}=r||{},c=a?{queryParameters:a}:{},f=[\"acl\",\"indexes\",\"referers\",\"restrictSources\",\"queryParameters\",\"description\",\"maxQueriesPerIPPerHour\",\"maxHitsPerQuery\"],p=E=>Object.keys(s).filter(C=>f.indexOf(C)!==-1).every(C=>{if(Array.isArray(E[C])&&Array.isArray(s[C])){let S=E[C];return S.length===s[C].length&&S.every((P,I)=>P===s[C][I])}else return E[C]===s[C]}),h=(E,C)=>Jt.createRetryablePromise(S=>kS(t)(e,C).then(P=>p(P)?Promise.resolve():S()));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Jt.encode(\"1/keys/%s\",e),data:c},n),h)},aw=t=>(e,r)=>Jt.createRetryablePromise(s=>EIe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),IIe=t=>(e,r)=>{let s=(a,n)=>hs(t)(a.taskID,n);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/batch\",t.indexName),data:{requests:e}},r),s)},Pft=t=>e=>AF({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/browse\",t.indexName),data:r},e)}),xft=t=>e=>{let r={hitsPerPage:1e3,...e};return AF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return bIe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},kft=t=>e=>{let r={hitsPerPage:1e3,...e};return AF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return PIe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},hF=t=>(e,r,s)=>{let{batchSize:a,...n}=s||{},c={taskIDs:[],objectIDs:[]},f=(p=0)=>{let h=[],E;for(E=p;E<e.length&&(h.push(e[E]),h.length!==(a||1e3));E++);return h.length===0?Promise.resolve(c):IIe(t)(h.map(C=>({action:r,body:C})),n).then(C=>(c.objectIDs=c.objectIDs.concat(C.objectIDs),c.taskIDs.push(C.taskID),E++,f(E)))};return Jt.createWaitablePromise(f(),(p,h)=>Promise.all(p.taskIDs.map(E=>hs(t)(E,h))))},Qft=t=>e=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/clear\",t.indexName)},e),(r,s)=>hs(t)(r.taskID,s)),Tft=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=gl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/clear\",t.indexName)},a),(n,c)=>hs(t)(n.taskID,c))},Rft=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=gl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/clear\",t.indexName)},a),(n,c)=>hs(t)(n.taskID,c))},Fft=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/deleteByQuery\",t.indexName),data:e},r),(s,a)=>hs(t)(s.taskID,a)),Nft=t=>e=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s\",t.indexName)},e),(r,s)=>hs(t)(r.taskID,s)),Oft=t=>(e,r)=>Jt.createWaitablePromise(CIe(t)([e],r).then(s=>({taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),CIe=t=>(e,r)=>{let s=e.map(a=>({objectID:a}));return hF(t)(s,km.DeleteObject,r)},Lft=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},n),(c,f)=>hs(t)(c.taskID,f))},Mft=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},n),(c,f)=>hs(t)(c.taskID,f))},Uft=t=>e=>wIe(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),_ft=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/answers/%s/prediction\",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},s),Hft=t=>(e,r)=>{let{query:s,paginate:a,...n}=r||{},c=0,f=()=>SIe(t)(s||\"\",{...n,page:c}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:c};if(c++,a===!1||c>=p.nbPages)throw mIe();return f()});return f()},jft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/%s\",t.indexName,e)},r),Gft=()=>(t,e)=>{for(let[r,s]of Object.entries(t.hits))if(s.objectID===e)return parseInt(r,10);return-1},qft=t=>(e,r)=>{let{attributesToRetrieve:s,...a}=r||{},n=e.map(c=>({indexName:t.indexName,objectID:c,...s?{attributesToRetrieve:s}:{}}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:n}},a)},Wft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},r),wIe=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/settings\",t.indexName),data:{getVersion:2}},e),Yft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},r),BIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/task/%s\",t.indexName,e.toString())},r),Vft=t=>(e,r)=>Jt.createWaitablePromise(vIe(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),vIe=t=>(e,r)=>{let{createIfNotExists:s,...a}=r||{},n=s?km.PartialUpdateObject:km.PartialUpdateObjectNoCreate;return hF(t)(e,n,a)},Jft=t=>(e,r)=>{let{safe:s,autoGenerateObjectIDIfNotExist:a,batchSize:n,...c}=r||{},f=(I,R,N,U)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",I),data:{operation:N,destination:R}},U),(W,ee)=>hs(t)(W.taskID,ee)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=l9({appId:t.appId,transporter:t.transporter,indexName:h}),C=[],S=f(t.indexName,h,\"copy\",{...c,scope:[\"settings\",\"synonyms\",\"rules\"]});C.push(S);let P=(s?S.wait(c):S).then(()=>{let I=E(e,{...c,autoGenerateObjectIDIfNotExist:a,batchSize:n});return C.push(I),s?I.wait(c):I}).then(()=>{let I=f(h,t.indexName,\"move\",c);return C.push(I),s?I.wait(c):I}).then(()=>Promise.all(C)).then(([I,R,N])=>({objectIDs:R.objectIDs,taskIDs:[I.taskID,...R.taskIDs,N.taskID]}));return Jt.createWaitablePromise(P,(I,R)=>Promise.all(C.map(N=>N.wait(R))))},Kft=t=>(e,r)=>c9(t)(e,{...r,clearExistingRules:!0}),zft=t=>(e,r)=>u9(t)(e,{...r,clearExistingSynonyms:!0}),Xft=t=>(e,r)=>Jt.createWaitablePromise(l9(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),l9=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:s,...a}=r||{},n=s?km.AddObject:km.UpdateObject;if(n===km.UpdateObject){for(let c of e)if(c.objectID===void 0)return Jt.createWaitablePromise(Promise.reject(dIe()))}return hF(t)(e,n,a)},Zft=t=>(e,r)=>c9(t)([e],r),c9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingRules:a,...n}=r||{},c=gl.createMappedRequestOptions(n);return s&&(c.queryParameters.forwardToReplicas=1),a&&(c.queryParameters.clearExistingRules=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/batch\",t.indexName),data:e},c),(f,p)=>hs(t)(f.taskID,p))},$ft=t=>(e,r)=>u9(t)([e],r),u9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingSynonyms:a,replaceExistingSynonyms:n,...c}=r||{},f=gl.createMappedRequestOptions(c);return s&&(f.queryParameters.forwardToReplicas=1),(n||a)&&(f.queryParameters.replaceExistingSynonyms=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/batch\",t.indexName),data:e},f),(p,h)=>hs(t)(p.taskID,h))},SIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/query\",t.indexName),data:{query:e},cacheable:!0},r),DIe=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/facets/%s/query\",t.indexName,e),data:{facetQuery:r},cacheable:!0},s),bIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/search\",t.indexName),data:{query:e}},r),PIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/search\",t.indexName),data:{query:e}},r),eAt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Jt.encode(\"1/indexes/%s/settings\",t.indexName),data:e},n),(c,f)=>hs(t)(c.taskID,f))},hs=t=>(e,r)=>Jt.createRetryablePromise(s=>BIe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),tAt={AddObject:\"addObject\",Analytics:\"analytics\",Browser:\"browse\",DeleteIndex:\"deleteIndex\",DeleteObject:\"deleteObject\",EditSettings:\"editSettings\",Inference:\"inference\",ListIndexes:\"listIndexes\",Logs:\"logs\",Personalization:\"personalization\",Recommendation:\"recommendation\",Search:\"search\",SeeUnretrievableAttributes:\"seeUnretrievableAttributes\",Settings:\"settings\",Usage:\"usage\"},km={AddObject:\"addObject\",UpdateObject:\"updateObject\",PartialUpdateObject:\"partialUpdateObject\",PartialUpdateObjectNoCreate:\"partialUpdateObjectNoCreate\",DeleteObject:\"deleteObject\",DeleteIndex:\"delete\",ClearIndex:\"clear\"},gF={Settings:\"settings\",Synonyms:\"synonyms\",Rules:\"rules\"},rAt={None:\"none\",StopIfEnoughMatches:\"stopIfEnoughMatches\"},nAt={Synonym:\"synonym\",OneWaySynonym:\"oneWaySynonym\",AltCorrection1:\"altCorrection1\",AltCorrection2:\"altCorrection2\",Placeholder:\"placeholder\"};Ft.ApiKeyACLEnum=tAt;Ft.BatchActionEnum=km;Ft.ScopeEnum=gF;Ft.StrategyEnum=rAt;Ft.SynonymEnum=nAt;Ft.addApiKey=Jut;Ft.assignUserID=Kut;Ft.assignUserIDs=zut;Ft.batch=IIe;Ft.browseObjects=Pft;Ft.browseRules=xft;Ft.browseSynonyms=kft;Ft.chunkedBatch=hF;Ft.clearDictionaryEntries=Xut;Ft.clearObjects=Qft;Ft.clearRules=Tft;Ft.clearSynonyms=Rft;Ft.copyIndex=pF;Ft.copyRules=Zut;Ft.copySettings=$ut;Ft.copySynonyms=eft;Ft.createBrowsablePromise=AF;Ft.createMissingObjectIDError=dIe;Ft.createObjectNotFoundError=mIe;Ft.createSearchClient=Vut;Ft.createValidUntilNotFoundError=yIe;Ft.customRequest=tft;Ft.deleteApiKey=rft;Ft.deleteBy=Fft;Ft.deleteDictionaryEntries=nft;Ft.deleteIndex=Nft;Ft.deleteObject=Oft;Ft.deleteObjects=CIe;Ft.deleteRule=Lft;Ft.deleteSynonym=Mft;Ft.exists=Uft;Ft.findAnswers=_ft;Ft.findObject=Hft;Ft.generateSecuredApiKey=ift;Ft.getApiKey=kS;Ft.getAppTask=EIe;Ft.getDictionarySettings=sft;Ft.getLogs=oft;Ft.getObject=jft;Ft.getObjectPosition=Gft;Ft.getObjects=qft;Ft.getRule=Wft;Ft.getSecuredApiKeyRemainingValidity=aft;Ft.getSettings=wIe;Ft.getSynonym=Yft;Ft.getTask=BIe;Ft.getTopUserIDs=lft;Ft.getUserID=cft;Ft.hasPendingMappings=uft;Ft.initIndex=QS;Ft.listApiKeys=fft;Ft.listClusters=Aft;Ft.listIndices=pft;Ft.listUserIDs=hft;Ft.moveIndex=gft;Ft.multipleBatch=dft;Ft.multipleGetObjects=mft;Ft.multipleQueries=yft;Ft.multipleSearchForFacetValues=Eft;Ft.partialUpdateObject=Vft;Ft.partialUpdateObjects=vIe;Ft.removeUserID=Ift;Ft.replaceAllObjects=Jft;Ft.replaceAllRules=Kft;Ft.replaceAllSynonyms=zft;Ft.replaceDictionaryEntries=Cft;Ft.restoreApiKey=wft;Ft.saveDictionaryEntries=Bft;Ft.saveObject=Xft;Ft.saveObjects=l9;Ft.saveRule=Zft;Ft.saveRules=c9;Ft.saveSynonym=$ft;Ft.saveSynonyms=u9;Ft.search=SIe;Ft.searchDictionaryEntries=vft;Ft.searchForFacetValues=DIe;Ft.searchRules=bIe;Ft.searchSynonyms=PIe;Ft.searchUserIDs=Sft;Ft.setDictionarySettings=Dft;Ft.setSettings=eAt;Ft.updateApiKey=bft;Ft.waitAppTask=aw;Ft.waitTask=hs});var QIe=_((LJt,kIe)=>{kIe.exports=xIe()});var TIe=_(dF=>{\"use strict\";Object.defineProperty(dF,\"__esModule\",{value:!0});function iAt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var sAt={Debug:1,Info:2,Error:3};dF.LogLevelEnum=sAt;dF.createNullLogger=iAt});var FIe=_((UJt,RIe)=>{RIe.exports=TIe()});var MIe=_(f9=>{\"use strict\";Object.defineProperty(f9,\"__esModule\",{value:!0});var NIe=Ie(\"http\"),OIe=Ie(\"https\"),oAt=Ie(\"url\"),LIe={keepAlive:!0},aAt=new NIe.Agent(LIe),lAt=new OIe.Agent(LIe);function cAt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:s={}}={}){let a=e||t||aAt,n=r||t||lAt;return{send(c){return new Promise(f=>{let p=oAt.parse(c.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...s,agent:p.protocol===\"https:\"?n:a,hostname:p.hostname,path:h,method:c.method,headers:{...s&&s.headers?s.headers:{},...c.headers},...p.port!==void 0?{port:p.port||\"\"}:{}},C=(p.protocol===\"https:\"?OIe:NIe).request(E,R=>{let N=[];R.on(\"data\",U=>{N=N.concat(U)}),R.on(\"end\",()=>{clearTimeout(P),clearTimeout(I),f({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),S=(R,N)=>setTimeout(()=>{C.abort(),f({status:0,content:N,isTimedOut:!0})},R*1e3),P=S(c.connectTimeout,\"Connection timeout\"),I;C.on(\"error\",R=>{clearTimeout(P),clearTimeout(I),f({status:0,content:R.message,isTimedOut:!1})}),C.once(\"response\",()=>{clearTimeout(P),I=S(c.responseTimeout,\"Socket timeout\")}),c.data!==void 0&&C.write(c.data),C.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}f9.createNodeHttpRequester=cAt});var _Ie=_((HJt,UIe)=>{UIe.exports=MIe()});var qIe=_((jJt,GIe)=>{\"use strict\";var HIe=MEe(),uAt=HEe(),lw=fIe(),p9=vS(),A9=gIe(),Gt=QIe(),fAt=FIe(),AAt=_Ie(),pAt=bS();function jIe(t,e,r){let s={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:AAt.createNodeHttpRequester(),logger:fAt.createNullLogger(),responsesCache:HIe.createNullCache(),requestsCache:HIe.createNullCache(),hostsCache:uAt.createInMemoryCache(),userAgent:pAt.createUserAgent(p9.version).add({segment:\"Node.js\",version:process.versions.node})},a={...s,...r},n=()=>c=>A9.createPersonalizationClient({...s,...c,methods:{getPersonalizationStrategy:A9.getPersonalizationStrategy,setPersonalizationStrategy:A9.setPersonalizationStrategy}});return Gt.createSearchClient({...a,methods:{search:Gt.multipleQueries,searchForFacetValues:Gt.multipleSearchForFacetValues,multipleBatch:Gt.multipleBatch,multipleGetObjects:Gt.multipleGetObjects,multipleQueries:Gt.multipleQueries,copyIndex:Gt.copyIndex,copySettings:Gt.copySettings,copyRules:Gt.copyRules,copySynonyms:Gt.copySynonyms,moveIndex:Gt.moveIndex,listIndices:Gt.listIndices,getLogs:Gt.getLogs,listClusters:Gt.listClusters,multipleSearchForFacetValues:Gt.multipleSearchForFacetValues,getApiKey:Gt.getApiKey,addApiKey:Gt.addApiKey,listApiKeys:Gt.listApiKeys,updateApiKey:Gt.updateApiKey,deleteApiKey:Gt.deleteApiKey,restoreApiKey:Gt.restoreApiKey,assignUserID:Gt.assignUserID,assignUserIDs:Gt.assignUserIDs,getUserID:Gt.getUserID,searchUserIDs:Gt.searchUserIDs,listUserIDs:Gt.listUserIDs,getTopUserIDs:Gt.getTopUserIDs,removeUserID:Gt.removeUserID,hasPendingMappings:Gt.hasPendingMappings,generateSecuredApiKey:Gt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:Gt.getSecuredApiKeyRemainingValidity,destroy:p9.destroy,clearDictionaryEntries:Gt.clearDictionaryEntries,deleteDictionaryEntries:Gt.deleteDictionaryEntries,getDictionarySettings:Gt.getDictionarySettings,getAppTask:Gt.getAppTask,replaceDictionaryEntries:Gt.replaceDictionaryEntries,saveDictionaryEntries:Gt.saveDictionaryEntries,searchDictionaryEntries:Gt.searchDictionaryEntries,setDictionarySettings:Gt.setDictionarySettings,waitAppTask:Gt.waitAppTask,customRequest:Gt.customRequest,initIndex:c=>f=>Gt.initIndex(c)(f,{methods:{batch:Gt.batch,delete:Gt.deleteIndex,findAnswers:Gt.findAnswers,getObject:Gt.getObject,getObjects:Gt.getObjects,saveObject:Gt.saveObject,saveObjects:Gt.saveObjects,search:Gt.search,searchForFacetValues:Gt.searchForFacetValues,waitTask:Gt.waitTask,setSettings:Gt.setSettings,getSettings:Gt.getSettings,partialUpdateObject:Gt.partialUpdateObject,partialUpdateObjects:Gt.partialUpdateObjects,deleteObject:Gt.deleteObject,deleteObjects:Gt.deleteObjects,deleteBy:Gt.deleteBy,clearObjects:Gt.clearObjects,browseObjects:Gt.browseObjects,getObjectPosition:Gt.getObjectPosition,findObject:Gt.findObject,exists:Gt.exists,saveSynonym:Gt.saveSynonym,saveSynonyms:Gt.saveSynonyms,getSynonym:Gt.getSynonym,searchSynonyms:Gt.searchSynonyms,browseSynonyms:Gt.browseSynonyms,deleteSynonym:Gt.deleteSynonym,clearSynonyms:Gt.clearSynonyms,replaceAllObjects:Gt.replaceAllObjects,replaceAllSynonyms:Gt.replaceAllSynonyms,searchRules:Gt.searchRules,getRule:Gt.getRule,deleteRule:Gt.deleteRule,saveRule:Gt.saveRule,saveRules:Gt.saveRules,replaceAllRules:Gt.replaceAllRules,browseRules:Gt.browseRules,clearRules:Gt.clearRules}}),initAnalytics:()=>c=>lw.createAnalyticsClient({...s,...c,methods:{addABTest:lw.addABTest,getABTest:lw.getABTest,getABTests:lw.getABTests,stopABTest:lw.stopABTest,deleteABTest:lw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>c=>(a.logger.info(\"The `initRecommendation` method is deprecated. Use `initPersonalization` instead.\"),n()(c))}})}jIe.version=p9.version;GIe.exports=jIe});var g9=_((GJt,h9)=>{var WIe=qIe();h9.exports=WIe;h9.exports.default=WIe});var y9=_((WJt,JIe)=>{\"use strict\";var VIe=Object.getOwnPropertySymbols,gAt=Object.prototype.hasOwnProperty,dAt=Object.prototype.propertyIsEnumerable;function mAt(t){if(t==null)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}function yAt(){try{if(!Object.assign)return!1;var t=new String(\"abc\");if(t[5]=\"de\",Object.getOwnPropertyNames(t)[0]===\"5\")return!1;for(var e={},r=0;r<10;r++)e[\"_\"+String.fromCharCode(r)]=r;var s=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(s.join(\"\")!==\"0123456789\")return!1;var a={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join(\"\")===\"abcdefghijklmnopqrst\"}catch{return!1}}JIe.exports=yAt()?Object.assign:function(t,e){for(var r,s=mAt(t),a,n=1;n<arguments.length;n++){r=Object(arguments[n]);for(var c in r)gAt.call(r,c)&&(s[c]=r[c]);if(VIe){a=VIe(r);for(var f=0;f<a.length;f++)dAt.call(r,a[f])&&(s[a[f]]=r[a[f]])}}return s}});var uCe=_(Dn=>{\"use strict\";var I9=y9(),cw=60103,XIe=60106;Dn.Fragment=60107;Dn.StrictMode=60108;Dn.Profiler=60114;var ZIe=60109,$Ie=60110,eCe=60112;Dn.Suspense=60113;var tCe=60115,rCe=60116;typeof Symbol==\"function\"&&Symbol.for&&(Gc=Symbol.for,cw=Gc(\"react.element\"),XIe=Gc(\"react.portal\"),Dn.Fragment=Gc(\"react.fragment\"),Dn.StrictMode=Gc(\"react.strict_mode\"),Dn.Profiler=Gc(\"react.profiler\"),ZIe=Gc(\"react.provider\"),$Ie=Gc(\"react.context\"),eCe=Gc(\"react.forward_ref\"),Dn.Suspense=Gc(\"react.suspense\"),tCe=Gc(\"react.memo\"),rCe=Gc(\"react.lazy\"));var Gc,KIe=typeof Symbol==\"function\"&&Symbol.iterator;function EAt(t){return t===null||typeof t!=\"object\"?null:(t=KIe&&t[KIe]||t[\"@@iterator\"],typeof t==\"function\"?t:null)}function TS(t){for(var e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+t,r=1;r<arguments.length;r++)e+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+t+\"; visit \"+e+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var nCe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iCe={};function uw(t,e,r){this.props=t,this.context=e,this.refs=iCe,this.updater=r||nCe}uw.prototype.isReactComponent={};uw.prototype.setState=function(t,e){if(typeof t!=\"object\"&&typeof t!=\"function\"&&t!=null)throw Error(TS(85));this.updater.enqueueSetState(this,t,e,\"setState\")};uw.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\"forceUpdate\")};function sCe(){}sCe.prototype=uw.prototype;function C9(t,e,r){this.props=t,this.context=e,this.refs=iCe,this.updater=r||nCe}var w9=C9.prototype=new sCe;w9.constructor=C9;I9(w9,uw.prototype);w9.isPureReactComponent=!0;var B9={current:null},oCe=Object.prototype.hasOwnProperty,aCe={key:!0,ref:!0,__self:!0,__source:!0};function lCe(t,e,r){var s,a={},n=null,c=null;if(e!=null)for(s in e.ref!==void 0&&(c=e.ref),e.key!==void 0&&(n=\"\"+e.key),e)oCe.call(e,s)&&!aCe.hasOwnProperty(s)&&(a[s]=e[s]);var f=arguments.length-2;if(f===1)a.children=r;else if(1<f){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];a.children=p}if(t&&t.defaultProps)for(s in f=t.defaultProps,f)a[s]===void 0&&(a[s]=f[s]);return{$$typeof:cw,type:t,key:n,ref:c,props:a,_owner:B9.current}}function IAt(t,e){return{$$typeof:cw,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function v9(t){return typeof t==\"object\"&&t!==null&&t.$$typeof===cw}function CAt(t){var e={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+t.replace(/[=:]/g,function(r){return e[r]})}var zIe=/\\/+/g;function E9(t,e){return typeof t==\"object\"&&t!==null&&t.key!=null?CAt(\"\"+t.key):e.toString(36)}function yF(t,e,r,s,a){var n=typeof t;(n===\"undefined\"||n===\"boolean\")&&(t=null);var c=!1;if(t===null)c=!0;else switch(n){case\"string\":case\"number\":c=!0;break;case\"object\":switch(t.$$typeof){case cw:case XIe:c=!0}}if(c)return c=t,a=a(c),t=s===\"\"?\".\"+E9(c,0):s,Array.isArray(a)?(r=\"\",t!=null&&(r=t.replace(zIe,\"$&/\")+\"/\"),yF(a,e,r,\"\",function(h){return h})):a!=null&&(v9(a)&&(a=IAt(a,r+(!a.key||c&&c.key===a.key?\"\":(\"\"+a.key).replace(zIe,\"$&/\")+\"/\")+t)),e.push(a)),1;if(c=0,s=s===\"\"?\".\":s+\":\",Array.isArray(t))for(var f=0;f<t.length;f++){n=t[f];var p=s+E9(n,f);c+=yF(n,e,r,p,a)}else if(p=EAt(t),typeof p==\"function\")for(t=p.call(t),f=0;!(n=t.next()).done;)n=n.value,p=s+E9(n,f++),c+=yF(n,e,r,p,a);else if(n===\"object\")throw e=\"\"+t,Error(TS(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e));return c}function mF(t,e,r){if(t==null)return t;var s=[],a=0;return yF(t,s,\"\",\"\",function(n){return e.call(r,n,a++)}),s}function wAt(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var cCe={current:null};function Zp(){var t=cCe.current;if(t===null)throw Error(TS(321));return t}var BAt={ReactCurrentDispatcher:cCe,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:B9,IsSomeRendererActing:{current:!1},assign:I9};Dn.Children={map:mF,forEach:function(t,e,r){mF(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return mF(t,function(){e++}),e},toArray:function(t){return mF(t,function(e){return e})||[]},only:function(t){if(!v9(t))throw Error(TS(143));return t}};Dn.Component=uw;Dn.PureComponent=C9;Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BAt;Dn.cloneElement=function(t,e,r){if(t==null)throw Error(TS(267,t));var s=I9({},t.props),a=t.key,n=t.ref,c=t._owner;if(e!=null){if(e.ref!==void 0&&(n=e.ref,c=B9.current),e.key!==void 0&&(a=\"\"+e.key),t.type&&t.type.defaultProps)var f=t.type.defaultProps;for(p in e)oCe.call(e,p)&&!aCe.hasOwnProperty(p)&&(s[p]=e[p]===void 0&&f!==void 0?f[p]:e[p])}var p=arguments.length-2;if(p===1)s.children=r;else if(1<p){f=Array(p);for(var h=0;h<p;h++)f[h]=arguments[h+2];s.children=f}return{$$typeof:cw,type:t.type,key:a,ref:n,props:s,_owner:c}};Dn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:$Ie,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:ZIe,_context:t},t.Consumer=t};Dn.createElement=lCe;Dn.createFactory=function(t){var e=lCe.bind(null,t);return e.type=t,e};Dn.createRef=function(){return{current:null}};Dn.forwardRef=function(t){return{$$typeof:eCe,render:t}};Dn.isValidElement=v9;Dn.lazy=function(t){return{$$typeof:rCe,_payload:{_status:-1,_result:t},_init:wAt}};Dn.memo=function(t,e){return{$$typeof:tCe,type:t,compare:e===void 0?null:e}};Dn.useCallback=function(t,e){return Zp().useCallback(t,e)};Dn.useContext=function(t,e){return Zp().useContext(t,e)};Dn.useDebugValue=function(){};Dn.useEffect=function(t,e){return Zp().useEffect(t,e)};Dn.useImperativeHandle=function(t,e,r){return Zp().useImperativeHandle(t,e,r)};Dn.useLayoutEffect=function(t,e){return Zp().useLayoutEffect(t,e)};Dn.useMemo=function(t,e){return Zp().useMemo(t,e)};Dn.useReducer=function(t,e,r){return Zp().useReducer(t,e,r)};Dn.useRef=function(t){return Zp().useRef(t)};Dn.useState=function(t){return Zp().useState(t)};Dn.version=\"17.0.2\"});var hn=_((VJt,fCe)=>{\"use strict\";fCe.exports=uCe()});var EF=_((JJt,ACe)=>{function vAt(t){var e=typeof t;return t!=null&&(e==\"object\"||e==\"function\")}ACe.exports=vAt});var hCe=_((KJt,pCe)=>{var SAt=typeof global==\"object\"&&global&&global.Object===Object&&global;pCe.exports=SAt});var S9=_((zJt,gCe)=>{var DAt=hCe(),bAt=typeof self==\"object\"&&self&&self.Object===Object&&self,PAt=DAt||bAt||Function(\"return this\")();gCe.exports=PAt});var mCe=_((XJt,dCe)=>{var xAt=S9(),kAt=function(){return xAt.Date.now()};dCe.exports=kAt});var ECe=_((ZJt,yCe)=>{var QAt=/\\s/;function TAt(t){for(var e=t.length;e--&&QAt.test(t.charAt(e)););return e}yCe.exports=TAt});var CCe=_(($Jt,ICe)=>{var RAt=ECe(),FAt=/^\\s+/;function NAt(t){return t&&t.slice(0,RAt(t)+1).replace(FAt,\"\")}ICe.exports=NAt});var D9=_((eKt,wCe)=>{var OAt=S9(),LAt=OAt.Symbol;wCe.exports=LAt});var DCe=_((tKt,SCe)=>{var BCe=D9(),vCe=Object.prototype,MAt=vCe.hasOwnProperty,UAt=vCe.toString,RS=BCe?BCe.toStringTag:void 0;function _At(t){var e=MAt.call(t,RS),r=t[RS];try{t[RS]=void 0;var s=!0}catch{}var a=UAt.call(t);return s&&(e?t[RS]=r:delete t[RS]),a}SCe.exports=_At});var PCe=_((rKt,bCe)=>{var HAt=Object.prototype,jAt=HAt.toString;function GAt(t){return jAt.call(t)}bCe.exports=GAt});var TCe=_((nKt,QCe)=>{var xCe=D9(),qAt=DCe(),WAt=PCe(),YAt=\"[object Null]\",VAt=\"[object Undefined]\",kCe=xCe?xCe.toStringTag:void 0;function JAt(t){return t==null?t===void 0?VAt:YAt:kCe&&kCe in Object(t)?qAt(t):WAt(t)}QCe.exports=JAt});var FCe=_((iKt,RCe)=>{function KAt(t){return t!=null&&typeof t==\"object\"}RCe.exports=KAt});var OCe=_((sKt,NCe)=>{var zAt=TCe(),XAt=FCe(),ZAt=\"[object Symbol]\";function $At(t){return typeof t==\"symbol\"||XAt(t)&&zAt(t)==ZAt}NCe.exports=$At});var _Ce=_((oKt,UCe)=>{var ept=CCe(),LCe=EF(),tpt=OCe(),MCe=NaN,rpt=/^[-+]0x[0-9a-f]+$/i,npt=/^0b[01]+$/i,ipt=/^0o[0-7]+$/i,spt=parseInt;function opt(t){if(typeof t==\"number\")return t;if(tpt(t))return MCe;if(LCe(t)){var e=typeof t.valueOf==\"function\"?t.valueOf():t;t=LCe(e)?e+\"\":e}if(typeof t!=\"string\")return t===0?t:+t;t=ept(t);var r=npt.test(t);return r||ipt.test(t)?spt(t.slice(2),r?2:8):rpt.test(t)?MCe:+t}UCe.exports=opt});var GCe=_((aKt,jCe)=>{var apt=EF(),b9=mCe(),HCe=_Ce(),lpt=\"Expected a function\",cpt=Math.max,upt=Math.min;function fpt(t,e,r){var s,a,n,c,f,p,h=0,E=!1,C=!1,S=!0;if(typeof t!=\"function\")throw new TypeError(lpt);e=HCe(e)||0,apt(r)&&(E=!!r.leading,C=\"maxWait\"in r,n=C?cpt(HCe(r.maxWait)||0,e):n,S=\"trailing\"in r?!!r.trailing:S);function P(le){var me=s,pe=a;return s=a=void 0,h=le,c=t.apply(pe,me),c}function I(le){return h=le,f=setTimeout(U,e),E?P(le):c}function R(le){var me=le-p,pe=le-h,Be=e-me;return C?upt(Be,n-pe):Be}function N(le){var me=le-p,pe=le-h;return p===void 0||me>=e||me<0||C&&pe>=n}function U(){var le=b9();if(N(le))return W(le);f=setTimeout(U,R(le))}function W(le){return f=void 0,S&&s?P(le):(s=a=void 0,c)}function ee(){f!==void 0&&clearTimeout(f),h=0,s=p=a=f=void 0}function ie(){return f===void 0?c:W(b9())}function ue(){var le=b9(),me=N(le);if(s=arguments,a=this,p=le,me){if(f===void 0)return I(p);if(C)return clearTimeout(f),f=setTimeout(U,e),P(p)}return f===void 0&&(f=setTimeout(U,e)),c}return ue.cancel=ee,ue.flush=ie,ue}jCe.exports=fpt});var WCe=_((lKt,qCe)=>{var Apt=GCe(),ppt=EF(),hpt=\"Expected a function\";function gpt(t,e,r){var s=!0,a=!0;if(typeof t!=\"function\")throw new TypeError(hpt);return ppt(r)&&(s=\"leading\"in r?!!r.leading:s,a=\"trailing\"in r?!!r.trailing:a),Apt(t,e,{leading:s,maxWait:e,trailing:a})}qCe.exports=gpt});var x9=_((cKt,P9)=>{\"use strict\";var Cn=P9.exports;P9.exports.default=Cn;var Xn=\"\\x1B[\",NS=\"\\x1B]\",fw=\"\\x07\",IF=\";\",YCe=process.env.TERM_PROGRAM===\"Apple_Terminal\";Cn.cursorTo=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");return typeof e!=\"number\"?Xn+(t+1)+\"G\":Xn+(e+1)+\";\"+(t+1)+\"H\"};Cn.cursorMove=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");let r=\"\";return t<0?r+=Xn+-t+\"D\":t>0&&(r+=Xn+t+\"C\"),e<0?r+=Xn+-e+\"A\":e>0&&(r+=Xn+e+\"B\"),r};Cn.cursorUp=(t=1)=>Xn+t+\"A\";Cn.cursorDown=(t=1)=>Xn+t+\"B\";Cn.cursorForward=(t=1)=>Xn+t+\"C\";Cn.cursorBackward=(t=1)=>Xn+t+\"D\";Cn.cursorLeft=Xn+\"G\";Cn.cursorSavePosition=YCe?\"\\x1B7\":Xn+\"s\";Cn.cursorRestorePosition=YCe?\"\\x1B8\":Xn+\"u\";Cn.cursorGetPosition=Xn+\"6n\";Cn.cursorNextLine=Xn+\"E\";Cn.cursorPrevLine=Xn+\"F\";Cn.cursorHide=Xn+\"?25l\";Cn.cursorShow=Xn+\"?25h\";Cn.eraseLines=t=>{let e=\"\";for(let r=0;r<t;r++)e+=Cn.eraseLine+(r<t-1?Cn.cursorUp():\"\");return t&&(e+=Cn.cursorLeft),e};Cn.eraseEndLine=Xn+\"K\";Cn.eraseStartLine=Xn+\"1K\";Cn.eraseLine=Xn+\"2K\";Cn.eraseDown=Xn+\"J\";Cn.eraseUp=Xn+\"1J\";Cn.eraseScreen=Xn+\"2J\";Cn.scrollUp=Xn+\"S\";Cn.scrollDown=Xn+\"T\";Cn.clearScreen=\"\\x1Bc\";Cn.clearTerminal=process.platform===\"win32\"?`${Cn.eraseScreen}${Xn}0f`:`${Cn.eraseScreen}${Xn}3J${Xn}H`;Cn.beep=fw;Cn.link=(t,e)=>[NS,\"8\",IF,IF,e,fw,t,NS,\"8\",IF,IF,fw].join(\"\");Cn.image=(t,e={})=>{let r=`${NS}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=\";preserveAspectRatio=0\"),r+\":\"+t.toString(\"base64\")+fw};Cn.iTerm={setCwd:(t=process.cwd())=>`${NS}50;CurrentDir=${t}${fw}`,annotation:(t,e={})=>{let r=`${NS}1337;`,s=typeof e.x<\"u\",a=typeof e.y<\"u\";if((s||a)&&!(s&&a&&typeof e.length<\"u\"))throw new Error(\"`x`, `y` and `length` must be defined when `x` or `y` is defined\");return t=t.replace(/\\|/g,\"\"),r+=e.isHidden?\"AddHiddenAnnotation=\":\"AddAnnotation=\",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join(\"|\"):r+=t,r+fw}}});var JCe=_((uKt,k9)=>{\"use strict\";var VCe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};k9.exports=VCe;k9.exports.default=VCe});var zCe=_((fKt,wF)=>{\"use strict\";var dpt=JCe(),CF=new WeakMap,KCe=(t,e={})=>{if(typeof t!=\"function\")throw new TypeError(\"Expected a function\");let r,s=0,a=t.displayName||t.name||\"<anonymous>\",n=function(...c){if(CF.set(n,++s),s===1)r=t.apply(this,c),t=null;else if(e.throw===!0)throw new Error(`Function \\`${a}\\` can only be called once`);return r};return dpt(n,t),CF.set(n,s),n};wF.exports=KCe;wF.exports.default=KCe;wF.exports.callCount=t=>{if(!CF.has(t))throw new Error(`The given function \\`${t.name}\\` is not wrapped by the \\`onetime\\` package`);return CF.get(t)}});var XCe=_((AKt,BF)=>{BF.exports=[\"SIGABRT\",\"SIGALRM\",\"SIGHUP\",\"SIGINT\",\"SIGTERM\"];process.platform!==\"win32\"&&BF.exports.push(\"SIGVTALRM\",\"SIGXCPU\",\"SIGXFSZ\",\"SIGUSR2\",\"SIGTRAP\",\"SIGSYS\",\"SIGQUIT\",\"SIGIOT\");process.platform===\"linux\"&&BF.exports.push(\"SIGIO\",\"SIGPOLL\",\"SIGPWR\",\"SIGSTKFLT\",\"SIGUNUSED\")});var R9=_((pKt,hw)=>{var Qi=global.process,Qm=function(t){return t&&typeof t==\"object\"&&typeof t.removeListener==\"function\"&&typeof t.emit==\"function\"&&typeof t.reallyExit==\"function\"&&typeof t.listeners==\"function\"&&typeof t.kill==\"function\"&&typeof t.pid==\"number\"&&typeof t.on==\"function\"};Qm(Qi)?(ZCe=Ie(\"assert\"),Aw=XCe(),$Ce=/^win/i.test(Qi.platform),OS=Ie(\"events\"),typeof OS!=\"function\"&&(OS=OS.EventEmitter),Qi.__signal_exit_emitter__?Js=Qi.__signal_exit_emitter__:(Js=Qi.__signal_exit_emitter__=new OS,Js.count=0,Js.emitted={}),Js.infinite||(Js.setMaxListeners(1/0),Js.infinite=!0),hw.exports=function(t,e){if(!Qm(global.process))return function(){};ZCe.equal(typeof t,\"function\",\"a callback must be provided for exit handler\"),pw===!1&&Q9();var r=\"exit\";e&&e.alwaysLast&&(r=\"afterexit\");var s=function(){Js.removeListener(r,t),Js.listeners(\"exit\").length===0&&Js.listeners(\"afterexit\").length===0&&vF()};return Js.on(r,t),s},vF=function(){!pw||!Qm(global.process)||(pw=!1,Aw.forEach(function(e){try{Qi.removeListener(e,SF[e])}catch{}}),Qi.emit=DF,Qi.reallyExit=T9,Js.count-=1)},hw.exports.unload=vF,Tm=function(e,r,s){Js.emitted[e]||(Js.emitted[e]=!0,Js.emit(e,r,s))},SF={},Aw.forEach(function(t){SF[t]=function(){if(Qm(global.process)){var r=Qi.listeners(t);r.length===Js.count&&(vF(),Tm(\"exit\",null,t),Tm(\"afterexit\",null,t),$Ce&&t===\"SIGHUP\"&&(t=\"SIGINT\"),Qi.kill(Qi.pid,t))}}}),hw.exports.signals=function(){return Aw},pw=!1,Q9=function(){pw||!Qm(global.process)||(pw=!0,Js.count+=1,Aw=Aw.filter(function(e){try{return Qi.on(e,SF[e]),!0}catch{return!1}}),Qi.emit=twe,Qi.reallyExit=ewe)},hw.exports.load=Q9,T9=Qi.reallyExit,ewe=function(e){Qm(global.process)&&(Qi.exitCode=e||0,Tm(\"exit\",Qi.exitCode,null),Tm(\"afterexit\",Qi.exitCode,null),T9.call(Qi,Qi.exitCode))},DF=Qi.emit,twe=function(e,r){if(e===\"exit\"&&Qm(global.process)){r!==void 0&&(Qi.exitCode=r);var s=DF.apply(this,arguments);return Tm(\"exit\",Qi.exitCode,null),Tm(\"afterexit\",Qi.exitCode,null),s}else return DF.apply(this,arguments)}):hw.exports=function(){return function(){}};var ZCe,Aw,$Ce,OS,Js,vF,Tm,SF,pw,Q9,T9,ewe,DF,twe});var nwe=_((hKt,rwe)=>{\"use strict\";var mpt=zCe(),ypt=R9();rwe.exports=mpt(()=>{ypt(()=>{process.stderr.write(\"\\x1B[?25h\")},{alwaysLast:!0})})});var F9=_(gw=>{\"use strict\";var Ept=nwe(),bF=!1;gw.show=(t=process.stderr)=>{t.isTTY&&(bF=!1,t.write(\"\\x1B[?25h\"))};gw.hide=(t=process.stderr)=>{t.isTTY&&(Ept(),bF=!0,t.write(\"\\x1B[?25l\"))};gw.toggle=(t,e)=>{t!==void 0&&(bF=t),bF?gw.show(e):gw.hide(e)}});var awe=_(LS=>{\"use strict\";var owe=LS&&LS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(LS,\"__esModule\",{value:!0});var iwe=owe(x9()),swe=owe(F9()),Ipt=(t,{showCursor:e=!1}={})=>{let r=0,s=\"\",a=!1,n=c=>{!e&&!a&&(swe.default.hide(),a=!0);let f=c+`\n`;f!==s&&(s=f,t.write(iwe.default.eraseLines(r)+f),r=f.split(`\n`).length)};return n.clear=()=>{t.write(iwe.default.eraseLines(r)),s=\"\",r=0},n.done=()=>{s=\"\",r=0,e||(swe.default.show(),a=!1)},n};LS.default={create:Ipt}});var lwe=_((mKt,Cpt)=>{Cpt.exports=[{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\",pr:\"SYSTEM_PULLREQUEST_PULLREQUESTID\"},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY_BUILD_BASE\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Shippable\",constant:\"SHIPPABLE\",env:\"SHIPPABLE\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Solano CI\",constant:\"SOLANO\",env:\"TDDIUM\",pr:\"TDDIUM_PR_ID\"},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}}]});var fwe=_(tc=>{\"use strict\";var uwe=lwe(),uA=process.env;Object.defineProperty(tc,\"_vendors\",{value:uwe.map(function(t){return t.constant})});tc.name=null;tc.isPR=null;uwe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return cwe(s)});if(tc[t.constant]=r,r)switch(tc.name=t.name,typeof t.pr){case\"string\":tc.isPR=!!uA[t.pr];break;case\"object\":\"env\"in t.pr?tc.isPR=t.pr.env in uA&&uA[t.pr.env]!==t.pr.ne:\"any\"in t.pr?tc.isPR=t.pr.any.some(function(s){return!!uA[s]}):tc.isPR=cwe(t.pr);break;default:tc.isPR=null}});tc.isCI=!!(uA.CI||uA.CONTINUOUS_INTEGRATION||uA.BUILD_NUMBER||uA.RUN_ID||tc.name);function cwe(t){return typeof t==\"string\"?!!uA[t]:Object.keys(t).every(function(e){return uA[e]===t[e]})}});var pwe=_((EKt,Awe)=>{\"use strict\";Awe.exports=fwe().isCI});var gwe=_((IKt,hwe)=>{\"use strict\";var wpt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};hwe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c==\"string\"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of wpt(t.constructor.prototype)){if(n===\"constructor\"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value==\"function\"&&(t[n]=t[n].bind(t))}return t}});var Cwe=_(Vn=>{\"use strict\";var mw,_S,QF,H9;typeof performance==\"object\"&&typeof performance.now==\"function\"?(dwe=performance,Vn.unstable_now=function(){return dwe.now()}):(N9=Date,mwe=N9.now(),Vn.unstable_now=function(){return N9.now()-mwe});var dwe,N9,mwe;typeof window>\"u\"||typeof MessageChannel!=\"function\"?(dw=null,O9=null,L9=function(){if(dw!==null)try{var t=Vn.unstable_now();dw(!0,t),dw=null}catch(e){throw setTimeout(L9,0),e}},mw=function(t){dw!==null?setTimeout(mw,0,t):(dw=t,setTimeout(L9,0))},_S=function(t,e){O9=setTimeout(t,e)},QF=function(){clearTimeout(O9)},Vn.unstable_shouldYield=function(){return!1},H9=Vn.unstable_forceFrameRate=function(){}):(ywe=window.setTimeout,Ewe=window.clearTimeout,typeof console<\"u\"&&(Iwe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!=\"function\"&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"),typeof Iwe!=\"function\"&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")),MS=!1,US=null,PF=-1,M9=5,U9=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=U9},H9=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):M9=0<t?Math.floor(1e3/t):5},_9=new MessageChannel,xF=_9.port2,_9.port1.onmessage=function(){if(US!==null){var t=Vn.unstable_now();U9=t+M9;try{US(!0,t)?xF.postMessage(null):(MS=!1,US=null)}catch(e){throw xF.postMessage(null),e}}else MS=!1},mw=function(t){US=t,MS||(MS=!0,xF.postMessage(null))},_S=function(t,e){PF=ywe(function(){t(Vn.unstable_now())},e)},QF=function(){Ewe(PF),PF=-1});var dw,O9,L9,ywe,Ewe,Iwe,MS,US,PF,M9,U9,_9,xF;function j9(t,e){var r=t.length;t.push(e);e:for(;;){var s=r-1>>>1,a=t[s];if(a!==void 0&&0<kF(a,e))t[s]=e,t[r]=a,r=s;else break e}}function ef(t){return t=t[0],t===void 0?null:t}function TF(t){var e=t[0];if(e!==void 0){var r=t.pop();if(r!==e){t[0]=r;e:for(var s=0,a=t.length;s<a;){var n=2*(s+1)-1,c=t[n],f=n+1,p=t[f];if(c!==void 0&&0>kF(c,r))p!==void 0&&0>kF(p,c)?(t[s]=p,t[f]=r,s=f):(t[s]=c,t[n]=r,s=n);else if(p!==void 0&&0>kF(p,r))t[s]=p,t[f]=r,s=f;else break e}}return e}return null}function kF(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var fA=[],Z0=[],Bpt=1,qc=null,$o=3,RF=!1,Rm=!1,HS=!1;function G9(t){for(var e=ef(Z0);e!==null;){if(e.callback===null)TF(Z0);else if(e.startTime<=t)TF(Z0),e.sortIndex=e.expirationTime,j9(fA,e);else break;e=ef(Z0)}}function q9(t){if(HS=!1,G9(t),!Rm)if(ef(fA)!==null)Rm=!0,mw(W9);else{var e=ef(Z0);e!==null&&_S(q9,e.startTime-t)}}function W9(t,e){Rm=!1,HS&&(HS=!1,QF()),RF=!0;var r=$o;try{for(G9(e),qc=ef(fA);qc!==null&&(!(qc.expirationTime>e)||t&&!Vn.unstable_shouldYield());){var s=qc.callback;if(typeof s==\"function\"){qc.callback=null,$o=qc.priorityLevel;var a=s(qc.expirationTime<=e);e=Vn.unstable_now(),typeof a==\"function\"?qc.callback=a:qc===ef(fA)&&TF(fA),G9(e)}else TF(fA);qc=ef(fA)}if(qc!==null)var n=!0;else{var c=ef(Z0);c!==null&&_S(q9,c.startTime-e),n=!1}return n}finally{qc=null,$o=r,RF=!1}}var vpt=H9;Vn.unstable_IdlePriority=5;Vn.unstable_ImmediatePriority=1;Vn.unstable_LowPriority=4;Vn.unstable_NormalPriority=3;Vn.unstable_Profiling=null;Vn.unstable_UserBlockingPriority=2;Vn.unstable_cancelCallback=function(t){t.callback=null};Vn.unstable_continueExecution=function(){Rm||RF||(Rm=!0,mw(W9))};Vn.unstable_getCurrentPriorityLevel=function(){return $o};Vn.unstable_getFirstCallbackNode=function(){return ef(fA)};Vn.unstable_next=function(t){switch($o){case 1:case 2:case 3:var e=3;break;default:e=$o}var r=$o;$o=e;try{return t()}finally{$o=r}};Vn.unstable_pauseExecution=function(){};Vn.unstable_requestPaint=vpt;Vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=$o;$o=t;try{return e()}finally{$o=r}};Vn.unstable_scheduleCallback=function(t,e,r){var s=Vn.unstable_now();switch(typeof r==\"object\"&&r!==null?(r=r.delay,r=typeof r==\"number\"&&0<r?s+r:s):r=s,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,t={id:Bpt++,callback:e,priorityLevel:t,startTime:r,expirationTime:a,sortIndex:-1},r>s?(t.sortIndex=r,j9(Z0,t),ef(fA)===null&&t===ef(Z0)&&(HS?QF():HS=!0,_S(q9,r-s))):(t.sortIndex=a,j9(fA,t),Rm||RF||(Rm=!0,mw(W9))),t};Vn.unstable_wrapCallback=function(t){var e=$o;return function(){var r=$o;$o=e;try{return t.apply(this,arguments)}finally{$o=r}}}});var Y9=_((wKt,wwe)=>{\"use strict\";wwe.exports=Cwe()});var Bwe=_((BKt,jS)=>{jS.exports=function(e){var r={},s=y9(),a=hn(),n=Y9();function c(v){for(var D=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+v,Q=1;Q<arguments.length;Q++)D+=\"&args[]=\"+encodeURIComponent(arguments[Q]);return\"Minified React error #\"+v+\"; visit \"+D+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,p=60103,h=60106,E=60107,C=60108,S=60114,P=60109,I=60110,R=60112,N=60113,U=60120,W=60115,ee=60116,ie=60121,ue=60129,le=60130,me=60131;if(typeof Symbol==\"function\"&&Symbol.for){var pe=Symbol.for;p=pe(\"react.element\"),h=pe(\"react.portal\"),E=pe(\"react.fragment\"),C=pe(\"react.strict_mode\"),S=pe(\"react.profiler\"),P=pe(\"react.provider\"),I=pe(\"react.context\"),R=pe(\"react.forward_ref\"),N=pe(\"react.suspense\"),U=pe(\"react.suspense_list\"),W=pe(\"react.memo\"),ee=pe(\"react.lazy\"),ie=pe(\"react.block\"),pe(\"react.scope\"),ue=pe(\"react.debug_trace_mode\"),le=pe(\"react.offscreen\"),me=pe(\"react.legacy_hidden\")}var Be=typeof Symbol==\"function\"&&Symbol.iterator;function Ce(v){return v===null||typeof v!=\"object\"?null:(v=Be&&v[Be]||v[\"@@iterator\"],typeof v==\"function\"?v:null)}function g(v){if(v==null)return null;if(typeof v==\"function\")return v.displayName||v.name||null;if(typeof v==\"string\")return v;switch(v){case E:return\"Fragment\";case h:return\"Portal\";case S:return\"Profiler\";case C:return\"StrictMode\";case N:return\"Suspense\";case U:return\"SuspenseList\"}if(typeof v==\"object\")switch(v.$$typeof){case I:return(v.displayName||\"Context\")+\".Consumer\";case P:return(v._context.displayName||\"Context\")+\".Provider\";case R:var D=v.render;return D=D.displayName||D.name||\"\",v.displayName||(D!==\"\"?\"ForwardRef(\"+D+\")\":\"ForwardRef\");case W:return g(v.type);case ie:return g(v._render);case ee:D=v._payload,v=v._init;try{return g(v(D))}catch{}}return null}function we(v){var D=v,Q=v;if(v.alternate)for(;D.return;)D=D.return;else{v=D;do D=v,D.flags&1026&&(Q=D.return),v=D.return;while(v)}return D.tag===3?Q:null}function ye(v){if(we(v)!==v)throw Error(c(188))}function Ae(v){var D=v.alternate;if(!D){if(D=we(v),D===null)throw Error(c(188));return D!==v?null:v}for(var Q=v,H=D;;){var V=Q.return;if(V===null)break;var ne=V.alternate;if(ne===null){if(H=V.return,H!==null){Q=H;continue}break}if(V.child===ne.child){for(ne=V.child;ne;){if(ne===Q)return ye(V),v;if(ne===H)return ye(V),D;ne=ne.sibling}throw Error(c(188))}if(Q.return!==H.return)Q=V,H=ne;else{for(var Se=!1,_e=V.child;_e;){if(_e===Q){Se=!0,Q=V,H=ne;break}if(_e===H){Se=!0,H=V,Q=ne;break}_e=_e.sibling}if(!Se){for(_e=ne.child;_e;){if(_e===Q){Se=!0,Q=ne,H=V;break}if(_e===H){Se=!0,H=ne,Q=V;break}_e=_e.sibling}if(!Se)throw Error(c(189))}}if(Q.alternate!==H)throw Error(c(190))}if(Q.tag!==3)throw Error(c(188));return Q.stateNode.current===Q?v:D}function se(v){if(v=Ae(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function Z(v){if(v=Ae(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child&&D.tag!==4)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function De(v,D){for(var Q=v.alternate;D!==null;){if(D===v||D===Q)return!0;D=D.return}return!1}var Re=e.getPublicInstance,mt=e.getRootHostContext,j=e.getChildHostContext,rt=e.prepareForCommit,Fe=e.resetAfterCommit,Ne=e.createInstance,Pe=e.appendInitialChild,Ve=e.finalizeInitialChildren,ke=e.prepareUpdate,it=e.shouldSetTextContent,Ue=e.createTextInstance,x=e.scheduleTimeout,w=e.cancelTimeout,b=e.noTimeout,y=e.isPrimaryRenderer,F=e.supportsMutation,z=e.supportsPersistence,X=e.supportsHydration,$=e.getInstanceFromNode,oe=e.makeOpaqueHydratingObject,xe=e.makeClientId,Te=e.beforeActiveInstanceBlur,lt=e.afterActiveInstanceBlur,Ct=e.preparePortalMount,qt=e.supportsTestSelectors,ir=e.findFiberRoot,Pt=e.getBoundingRect,gn=e.getTextContent,Pr=e.isHiddenSubtree,Ir=e.matchAccessibilityRole,Or=e.setFocusIfFocusable,on=e.setupIntersectionObserver,ai=e.appendChild,Io=e.appendChildToContainer,rs=e.commitTextUpdate,$s=e.commitMount,Co=e.commitUpdate,ji=e.insertBefore,eo=e.insertInContainerBefore,wo=e.removeChild,QA=e.removeChildFromContainer,Af=e.resetTextContent,dh=e.hideInstance,mh=e.hideTextInstance,to=e.unhideInstance,jn=e.unhideTextInstance,Ts=e.clearContainer,ro=e.cloneInstance,ou=e.createContainerChildSet,au=e.appendChildToContainerChildSet,lu=e.finalizeContainerChildren,TA=e.replaceContainerChildren,RA=e.cloneHiddenInstance,oa=e.cloneHiddenTextInstance,aa=e.canHydrateInstance,FA=e.canHydrateTextInstance,gr=e.isSuspenseInstancePending,Bo=e.isSuspenseInstanceFallback,Me=e.getNextHydratableSibling,cu=e.getFirstHydratableChild,Cr=e.hydrateInstance,pf=e.hydrateTextInstance,NA=e.getNextHydratableInstanceAfterSuspenseInstance,OA=e.commitHydratedContainer,uu=e.commitHydratedSuspenseInstance,fu;function oc(v){if(fu===void 0)try{throw Error()}catch(Q){var D=Q.stack.trim().match(/\\n( *(at )?)/);fu=D&&D[1]||\"\"}return`\n`+fu+v}var ve=!1;function Nt(v,D){if(!v||ve)return\"\";ve=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(D)if(D=function(){throw Error()},Object.defineProperty(D.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(D,[])}catch(pt){var H=pt}Reflect.construct(v,[],D)}else{try{D.call()}catch(pt){H=pt}v.call(D.prototype)}else{try{throw Error()}catch(pt){H=pt}v()}}catch(pt){if(pt&&H&&typeof pt.stack==\"string\"){for(var V=pt.stack.split(`\n`),ne=H.stack.split(`\n`),Se=V.length-1,_e=ne.length-1;1<=Se&&0<=_e&&V[Se]!==ne[_e];)_e--;for(;1<=Se&&0<=_e;Se--,_e--)if(V[Se]!==ne[_e]){if(Se!==1||_e!==1)do if(Se--,_e--,0>_e||V[Se]!==ne[_e])return`\n`+V[Se].replace(\" at new \",\" at \");while(1<=Se&&0<=_e);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:\"\")?oc(v):\"\"}var ac=[],Oi=-1;function no(v){return{current:v}}function Rt(v){0>Oi||(v.current=ac[Oi],ac[Oi]=null,Oi--)}function xn(v,D){Oi++,ac[Oi]=v.current,v.current=D}var la={},Gi=no(la),Li=no(!1),Na=la;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return la;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Kn(v){return v=v.childContextTypes,v!=null}function Au(){Rt(Li),Rt(Gi)}function yh(v,D,Q){if(Gi.current!==la)throw Error(c(168));xn(Gi,D),xn(Li,Q)}function Oa(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!=\"function\")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||\"Unknown\",V));return s({},Q,H)}function La(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||la,Na=Gi.current,xn(Gi,v),xn(Li,Li.current),!0}function Ma(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=Oa(v,D,Na),H.__reactInternalMemoizedMergedChildContext=v,Rt(Li),Rt(Gi),xn(Gi,v)):Rt(Li),xn(Li,Q)}var $e=null,Ua=null,hf=n.unstable_now;hf();var lc=0,wn=8;function ca(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function LA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function MA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function ua(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var pt=ne&~Se;pt!==0?(H=ca(pt),V=wn):(_e&=ne,_e!==0&&(H=ca(_e),V=wn))}else ne=Q&~Se,ne!==0?(H=ca(ne),V=wn):_e!==0&&(H=ca(_e),V=wn);if(H===0)return 0;if(H=31-ns(H),H=Q&((0>H?0:1<<H)<<1)-1,D!==0&&D!==H&&!(D&Se)){if(ca(D),V<=wn)return D;wn=V}if(D=v.entangledLanes,D!==0)for(v=v.entanglements,D&=H;0<D;)Q=31-ns(D),V=1<<Q,H|=v[Q],D&=~V;return H}function Bl(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Mt(v,D){switch(v){case 15:return 1;case 14:return 2;case 12:return v=kn(24&~D),v===0?Mt(10,D):v;case 10:return v=kn(192&~D),v===0?Mt(8,D):v;case 8:return v=kn(3584&~D),v===0&&(v=kn(4186112&~D),v===0&&(v=512)),v;case 2:return D=kn(805306368&~D),D===0&&(D=268435456),D}throw Error(c(358,v))}function kn(v){return v&-v}function fa(v){for(var D=[],Q=0;31>Q;Q++)D.push(v);return D}function Ha(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-ns(D),v[D]=Q}var ns=Math.clz32?Math.clz32:uc,cc=Math.log,pu=Math.LN2;function uc(v){return v===0?32:31-(cc(v)/pu|0)|0}var ja=n.unstable_runWithPriority,Mi=n.unstable_scheduleCallback,Is=n.unstable_cancelCallback,vl=n.unstable_shouldYield,gf=n.unstable_requestPaint,fc=n.unstable_now,wi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Ac=n.unstable_UserBlockingPriority,Ke=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},te=gf!==void 0?gf:function(){},Ee=null,Oe=null,dt=!1,Et=fc(),bt=1e4>Et?fc:function(){return fc()-Et};function tr(){switch(wi()){case Qn:return 99;case Ac:return 98;case Ke:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function An(v){switch(v){case 99:return Qn;case 98:return Ac;case 97:return Ke;case 96:return st;case 95:return St;default:throw Error(c(332))}}function li(v,D){return v=An(v),ja(v,D)}function qi(v,D,Q){return v=An(v),Mi(v,D,Q)}function Tn(){if(Oe!==null){var v=Oe;Oe=null,Is(v)}Ga()}function Ga(){if(!dt&&Ee!==null){dt=!0;var v=0;try{var D=Ee;li(99,function(){for(;v<D.length;v++){var Q=D[v];do Q=Q(!0);while(Q!==null)}}),Ee=null}catch(Q){throw Ee!==null&&(Ee=Ee.slice(v+1)),Mi(Qn,Tn),Q}finally{dt=!1}}}var my=f.ReactCurrentBatchConfig;function Z1(v,D){return v===D&&(v!==0||1/v===1/D)||v!==v&&D!==D}var vo=typeof Object.is==\"function\"?Object.is:Z1,yy=Object.prototype.hasOwnProperty;function Eh(v,D){if(vo(v,D))return!0;if(typeof v!=\"object\"||v===null||typeof D!=\"object\"||D===null)return!1;var Q=Object.keys(v),H=Object.keys(D);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!yy.call(D,Q[H])||!vo(v[Q[H]],D[Q[H]]))return!1;return!0}function $1(v){switch(v.tag){case 5:return oc(v.type);case 16:return oc(\"Lazy\");case 13:return oc(\"Suspense\");case 19:return oc(\"SuspenseList\");case 0:case 2:case 15:return v=Nt(v.type,!1),v;case 11:return v=Nt(v.type.render,!1),v;case 22:return v=Nt(v.type._render,!1),v;case 1:return v=Nt(v.type,!0),v;default:return\"\"}}function So(v,D){if(v&&v.defaultProps){D=s({},D),v=v.defaultProps;for(var Q in v)D[Q]===void 0&&(D[Q]=v[Q]);return D}return D}var Ih=no(null),Ch=null,hu=null,wh=null;function Fg(){wh=hu=Ch=null}function Ng(v,D){v=v.type._context,y?(xn(Ih,v._currentValue),v._currentValue=D):(xn(Ih,v._currentValue2),v._currentValue2=D)}function Og(v){var D=Ih.current;Rt(Ih),v=v.type._context,y?v._currentValue=D:v._currentValue2=D}function Ey(v,D){for(;v!==null;){var Q=v.alternate;if((v.childLanes&D)===D){if(Q===null||(Q.childLanes&D)===D)break;Q.childLanes|=D}else v.childLanes|=D,Q!==null&&(Q.childLanes|=D);v=v.return}}function df(v,D){Ch=v,wh=hu=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.lanes&D&&(Je=!0),v.firstContext=null)}function Do(v,D){if(wh!==v&&D!==!1&&D!==0)if((typeof D!=\"number\"||D===1073741823)&&(wh=v,D=1073741823),D={context:v,observedBits:D,next:null},hu===null){if(Ch===null)throw Error(c(308));hu=D,Ch.dependencies={lanes:0,firstContext:D,responders:null}}else hu=hu.next=D;return y?v._currentValue:v._currentValue2}var Sl=!1;function Bh(v){v.updateQueue={baseState:v.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Lg(v,D){v=v.updateQueue,D.updateQueue===v&&(D.updateQueue={baseState:v.baseState,firstBaseUpdate:v.firstBaseUpdate,lastBaseUpdate:v.lastBaseUpdate,shared:v.shared,effects:v.effects})}function Dl(v,D){return{eventTime:v,lane:D,tag:0,payload:null,callback:null,next:null}}function bl(v,D){if(v=v.updateQueue,v!==null){v=v.shared;var Q=v.pending;Q===null?D.next=D:(D.next=Q.next,Q.next=D),v.pending=D}}function Iy(v,D){var Q=v.updateQueue,H=v.alternate;if(H!==null&&(H=H.updateQueue,Q===H)){var V=null,ne=null;if(Q=Q.firstBaseUpdate,Q!==null){do{var Se={eventTime:Q.eventTime,lane:Q.lane,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null};ne===null?V=ne=Se:ne=ne.next=Se,Q=Q.next}while(Q!==null);ne===null?V=ne=D:ne=ne.next=D}else V=ne=D;Q={baseState:H.baseState,firstBaseUpdate:V,lastBaseUpdate:ne,shared:H.shared,effects:H.effects},v.updateQueue=Q;return}v=Q.lastBaseUpdate,v===null?Q.firstBaseUpdate=D:v.next=D,Q.lastBaseUpdate=D}function UA(v,D,Q,H){var V=v.updateQueue;Sl=!1;var ne=V.firstBaseUpdate,Se=V.lastBaseUpdate,_e=V.shared.pending;if(_e!==null){V.shared.pending=null;var pt=_e,Wt=pt.next;pt.next=null,Se===null?ne=Wt:Se.next=Wt,Se=pt;var Sr=v.alternate;if(Sr!==null){Sr=Sr.updateQueue;var Lr=Sr.lastBaseUpdate;Lr!==Se&&(Lr===null?Sr.firstBaseUpdate=Wt:Lr.next=Wt,Sr.lastBaseUpdate=pt)}}if(ne!==null){Lr=V.baseState,Se=0,Sr=Wt=pt=null;do{_e=ne.lane;var Zt=ne.eventTime;if((H&_e)===_e){Sr!==null&&(Sr=Sr.next={eventTime:Zt,lane:0,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null});e:{var zn=v,yi=ne;switch(_e=D,Zt=Q,yi.tag){case 1:if(zn=yi.payload,typeof zn==\"function\"){Lr=zn.call(Zt,Lr,_e);break e}Lr=zn;break e;case 3:zn.flags=zn.flags&-4097|64;case 0:if(zn=yi.payload,_e=typeof zn==\"function\"?zn.call(Zt,Lr,_e):zn,_e==null)break e;Lr=s({},Lr,_e);break e;case 2:Sl=!0}}ne.callback!==null&&(v.flags|=32,_e=V.effects,_e===null?V.effects=[ne]:_e.push(ne))}else Zt={eventTime:Zt,lane:_e,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Sr===null?(Wt=Sr=Zt,pt=Lr):Sr=Sr.next=Zt,Se|=_e;if(ne=ne.next,ne===null){if(_e=V.shared.pending,_e===null)break;ne=_e.next,_e.next=null,V.lastBaseUpdate=_e,V.shared.pending=null}}while(!0);Sr===null&&(pt=Lr),V.baseState=pt,V.firstBaseUpdate=Wt,V.lastBaseUpdate=Sr,Zg|=Se,v.lanes=Se,v.memoizedState=Lr}}function Cy(v,D,Q){if(v=D.effects,D.effects=null,v!==null)for(D=0;D<v.length;D++){var H=v[D],V=H.callback;if(V!==null){if(H.callback=null,H=Q,typeof V!=\"function\")throw Error(c(191,V));V.call(H)}}}var wy=new a.Component().refs;function _A(v,D,Q,H){D=v.memoizedState,Q=Q(H,D),Q=Q==null?D:s({},D,Q),v.memoizedState=Q,v.lanes===0&&(v.updateQueue.baseState=Q)}var HA={isMounted:function(v){return(v=v._reactInternals)?we(v)===v:!1},enqueueSetState:function(v,D,Q){v=v._reactInternals;var H=ko(),V=Bs(v),ne=Dl(H,V);ne.payload=D,Q!=null&&(ne.callback=Q),bl(v,ne),Tl(v,V,H)},enqueueReplaceState:function(v,D,Q){v=v._reactInternals;var H=ko(),V=Bs(v),ne=Dl(H,V);ne.tag=1,ne.payload=D,Q!=null&&(ne.callback=Q),bl(v,ne),Tl(v,V,H)},enqueueForceUpdate:function(v,D){v=v._reactInternals;var Q=ko(),H=Bs(v),V=Dl(Q,H);V.tag=2,D!=null&&(V.callback=D),bl(v,V),Tl(v,H,Q)}};function Y(v,D,Q,H,V,ne,Se){return v=v.stateNode,typeof v.shouldComponentUpdate==\"function\"?v.shouldComponentUpdate(H,ne,Se):D.prototype&&D.prototype.isPureReactComponent?!Eh(Q,H)||!Eh(V,ne):!0}function xt(v,D,Q){var H=!1,V=la,ne=D.contextType;return typeof ne==\"object\"&&ne!==null?ne=Do(ne):(V=Kn(D)?Na:Gi.current,H=D.contextTypes,ne=(H=H!=null)?dn(v,V):la),D=new D(Q,ne),v.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=HA,v.stateNode=D,D._reactInternals=v,H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=V,v.__reactInternalMemoizedMaskedChildContext=ne),D}function jA(v,D,Q,H){v=D.state,typeof D.componentWillReceiveProps==\"function\"&&D.componentWillReceiveProps(Q,H),typeof D.UNSAFE_componentWillReceiveProps==\"function\"&&D.UNSAFE_componentWillReceiveProps(Q,H),D.state!==v&&HA.enqueueReplaceState(D,D.state,null)}function bo(v,D,Q,H){var V=v.stateNode;V.props=Q,V.state=v.memoizedState,V.refs=wy,Bh(v);var ne=D.contextType;typeof ne==\"object\"&&ne!==null?V.context=Do(ne):(ne=Kn(D)?Na:Gi.current,V.context=dn(v,ne)),UA(v,Q,V,H),V.state=v.memoizedState,ne=D.getDerivedStateFromProps,typeof ne==\"function\"&&(_A(v,D,ne,Q),V.state=v.memoizedState),typeof D.getDerivedStateFromProps==\"function\"||typeof V.getSnapshotBeforeUpdate==\"function\"||typeof V.UNSAFE_componentWillMount!=\"function\"&&typeof V.componentWillMount!=\"function\"||(D=V.state,typeof V.componentWillMount==\"function\"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount==\"function\"&&V.UNSAFE_componentWillMount(),D!==V.state&&HA.enqueueReplaceState(V,V.state,null),UA(v,Q,V,H),V.state=v.memoizedState),typeof V.componentDidMount==\"function\"&&(v.flags|=4)}var mf=Array.isArray;function yt(v,D,Q){if(v=Q.ref,v!==null&&typeof v!=\"function\"&&typeof v!=\"object\"){if(Q._owner){if(Q=Q._owner,Q){if(Q.tag!==1)throw Error(c(309));var H=Q.stateNode}if(!H)throw Error(c(147,v));var V=\"\"+v;return D!==null&&D.ref!==null&&typeof D.ref==\"function\"&&D.ref._stringRef===V?D.ref:(D=function(ne){var Se=H.refs;Se===wy&&(Se=H.refs={}),ne===null?delete Se[V]:Se[V]=ne},D._stringRef=V,D)}if(typeof v!=\"string\")throw Error(c(284));if(!Q._owner)throw Error(c(290,v))}return v}function gu(v,D){if(v.type!==\"textarea\")throw Error(c(31,Object.prototype.toString.call(D)===\"[object Object]\"?\"object with keys {\"+Object.keys(D).join(\", \")+\"}\":D))}function By(v){function D(et,qe){if(v){var gt=et.lastEffect;gt!==null?(gt.nextEffect=qe,et.lastEffect=qe):et.firstEffect=et.lastEffect=qe,qe.nextEffect=null,qe.flags=8}}function Q(et,qe){if(!v)return null;for(;qe!==null;)D(et,qe),qe=qe.sibling;return null}function H(et,qe){for(et=new Map;qe!==null;)qe.key!==null?et.set(qe.key,qe):et.set(qe.index,qe),qe=qe.sibling;return et}function V(et,qe){return et=Su(et,qe),et.index=0,et.sibling=null,et}function ne(et,qe,gt){return et.index=gt,v?(gt=et.alternate,gt!==null?(gt=gt.index,gt<qe?(et.flags=2,qe):gt):(et.flags=2,qe)):qe}function Se(et){return v&&et.alternate===null&&(et.flags=2),et}function _e(et,qe,gt,Xt){return qe===null||qe.tag!==6?(qe=b2(gt,et.mode,Xt),qe.return=et,qe):(qe=V(qe,gt),qe.return=et,qe)}function pt(et,qe,gt,Xt){return qe!==null&&qe.elementType===gt.type?(Xt=V(qe,gt.props),Xt.ref=yt(et,qe,gt),Xt.return=et,Xt):(Xt=sd(gt.type,gt.key,gt.props,null,et.mode,Xt),Xt.ref=yt(et,qe,gt),Xt.return=et,Xt)}function Wt(et,qe,gt,Xt){return qe===null||qe.tag!==4||qe.stateNode.containerInfo!==gt.containerInfo||qe.stateNode.implementation!==gt.implementation?(qe=Qo(gt,et.mode,Xt),qe.return=et,qe):(qe=V(qe,gt.children||[]),qe.return=et,qe)}function Sr(et,qe,gt,Xt,Dr){return qe===null||qe.tag!==7?(qe=kf(gt,et.mode,Xt,Dr),qe.return=et,qe):(qe=V(qe,gt),qe.return=et,qe)}function Lr(et,qe,gt){if(typeof qe==\"string\"||typeof qe==\"number\")return qe=b2(\"\"+qe,et.mode,gt),qe.return=et,qe;if(typeof qe==\"object\"&&qe!==null){switch(qe.$$typeof){case p:return gt=sd(qe.type,qe.key,qe.props,null,et.mode,gt),gt.ref=yt(et,null,qe),gt.return=et,gt;case h:return qe=Qo(qe,et.mode,gt),qe.return=et,qe}if(mf(qe)||Ce(qe))return qe=kf(qe,et.mode,gt,null),qe.return=et,qe;gu(et,qe)}return null}function Zt(et,qe,gt,Xt){var Dr=qe!==null?qe.key:null;if(typeof gt==\"string\"||typeof gt==\"number\")return Dr!==null?null:_e(et,qe,\"\"+gt,Xt);if(typeof gt==\"object\"&&gt!==null){switch(gt.$$typeof){case p:return gt.key===Dr?gt.type===E?Sr(et,qe,gt.props.children,Xt,Dr):pt(et,qe,gt,Xt):null;case h:return gt.key===Dr?Wt(et,qe,gt,Xt):null}if(mf(gt)||Ce(gt))return Dr!==null?null:Sr(et,qe,gt,Xt,null);gu(et,gt)}return null}function zn(et,qe,gt,Xt,Dr){if(typeof Xt==\"string\"||typeof Xt==\"number\")return et=et.get(gt)||null,_e(qe,et,\"\"+Xt,Dr);if(typeof Xt==\"object\"&&Xt!==null){switch(Xt.$$typeof){case p:return et=et.get(Xt.key===null?gt:Xt.key)||null,Xt.type===E?Sr(qe,et,Xt.props.children,Dr,Xt.key):pt(qe,et,Xt,Dr);case h:return et=et.get(Xt.key===null?gt:Xt.key)||null,Wt(qe,et,Xt,Dr)}if(mf(Xt)||Ce(Xt))return et=et.get(gt)||null,Sr(qe,et,Xt,Dr,null);gu(qe,Xt)}return null}function yi(et,qe,gt,Xt){for(var Dr=null,Zn=null,kr=qe,Rn=qe=0,_n=null;kr!==null&&Rn<gt.length;Rn++){kr.index>Rn?(_n=kr,kr=null):_n=kr.sibling;var zr=Zt(et,kr,gt[Rn],Xt);if(zr===null){kr===null&&(kr=_n);break}v&&kr&&zr.alternate===null&&D(et,kr),qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr,kr=_n}if(Rn===gt.length)return Q(et,kr),Dr;if(kr===null){for(;Rn<gt.length;Rn++)kr=Lr(et,gt[Rn],Xt),kr!==null&&(qe=ne(kr,qe,Rn),Zn===null?Dr=kr:Zn.sibling=kr,Zn=kr);return Dr}for(kr=H(et,kr);Rn<gt.length;Rn++)_n=zn(kr,et,Rn,gt[Rn],Xt),_n!==null&&(v&&_n.alternate!==null&&kr.delete(_n.key===null?Rn:_n.key),qe=ne(_n,qe,Rn),Zn===null?Dr=_n:Zn.sibling=_n,Zn=_n);return v&&kr.forEach(function(ci){return D(et,ci)}),Dr}function za(et,qe,gt,Xt){var Dr=Ce(gt);if(typeof Dr!=\"function\")throw Error(c(150));if(gt=Dr.call(gt),gt==null)throw Error(c(151));for(var Zn=Dr=null,kr=qe,Rn=qe=0,_n=null,zr=gt.next();kr!==null&&!zr.done;Rn++,zr=gt.next()){kr.index>Rn?(_n=kr,kr=null):_n=kr.sibling;var ci=Zt(et,kr,zr.value,Xt);if(ci===null){kr===null&&(kr=_n);break}v&&kr&&ci.alternate===null&&D(et,kr),qe=ne(ci,qe,Rn),Zn===null?Dr=ci:Zn.sibling=ci,Zn=ci,kr=_n}if(zr.done)return Q(et,kr),Dr;if(kr===null){for(;!zr.done;Rn++,zr=gt.next())zr=Lr(et,zr.value,Xt),zr!==null&&(qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr);return Dr}for(kr=H(et,kr);!zr.done;Rn++,zr=gt.next())zr=zn(kr,et,Rn,zr.value,Xt),zr!==null&&(v&&zr.alternate!==null&&kr.delete(zr.key===null?Rn:zr.key),qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr);return v&&kr.forEach(function(Du){return D(et,Du)}),Dr}return function(et,qe,gt,Xt){var Dr=typeof gt==\"object\"&&gt!==null&&gt.type===E&&gt.key===null;Dr&&(gt=gt.props.children);var Zn=typeof gt==\"object\"&&gt!==null;if(Zn)switch(gt.$$typeof){case p:e:{for(Zn=gt.key,Dr=qe;Dr!==null;){if(Dr.key===Zn){switch(Dr.tag){case 7:if(gt.type===E){Q(et,Dr.sibling),qe=V(Dr,gt.props.children),qe.return=et,et=qe;break e}break;default:if(Dr.elementType===gt.type){Q(et,Dr.sibling),qe=V(Dr,gt.props),qe.ref=yt(et,Dr,gt),qe.return=et,et=qe;break e}}Q(et,Dr);break}else D(et,Dr);Dr=Dr.sibling}gt.type===E?(qe=kf(gt.props.children,et.mode,Xt,gt.key),qe.return=et,et=qe):(Xt=sd(gt.type,gt.key,gt.props,null,et.mode,Xt),Xt.ref=yt(et,qe,gt),Xt.return=et,et=Xt)}return Se(et);case h:e:{for(Dr=gt.key;qe!==null;){if(qe.key===Dr)if(qe.tag===4&&qe.stateNode.containerInfo===gt.containerInfo&&qe.stateNode.implementation===gt.implementation){Q(et,qe.sibling),qe=V(qe,gt.children||[]),qe.return=et,et=qe;break e}else{Q(et,qe);break}else D(et,qe);qe=qe.sibling}qe=Qo(gt,et.mode,Xt),qe.return=et,et=qe}return Se(et)}if(typeof gt==\"string\"||typeof gt==\"number\")return gt=\"\"+gt,qe!==null&&qe.tag===6?(Q(et,qe.sibling),qe=V(qe,gt),qe.return=et,et=qe):(Q(et,qe),qe=b2(gt,et.mode,Xt),qe.return=et,et=qe),Se(et);if(mf(gt))return yi(et,qe,gt,Xt);if(Ce(gt))return za(et,qe,gt,Xt);if(Zn&&gu(et,gt),typeof gt>\"u\"&&!Dr)switch(et.tag){case 1:case 22:case 0:case 11:case 15:throw Error(c(152,g(et.type)||\"Component\"))}return Q(et,qe)}}var Mg=By(!0),e2=By(!1),vh={},ur=no(vh),zi=no(vh),yf=no(vh);function qa(v){if(v===vh)throw Error(c(174));return v}function Ug(v,D){xn(yf,D),xn(zi,v),xn(ur,vh),v=mt(D),Rt(ur),xn(ur,v)}function du(){Rt(ur),Rt(zi),Rt(yf)}function Ef(v){var D=qa(yf.current),Q=qa(ur.current);D=j(Q,v.type,D),Q!==D&&(xn(zi,v),xn(ur,D))}function wt(v){zi.current===v&&(Rt(ur),Rt(zi))}var di=no(0);function GA(v){for(var D=v;D!==null;){if(D.tag===13){var Q=D.memoizedState;if(Q!==null&&(Q=Q.dehydrated,Q===null||gr(Q)||Bo(Q)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if(D.flags&64)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===v)break;for(;D.sibling===null;){if(D.return===null||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}var Wa=null,Aa=null,Ya=!1;function _g(v,D){var Q=Ka(5,null,null,0);Q.elementType=\"DELETED\",Q.type=\"DELETED\",Q.stateNode=D,Q.return=v,Q.flags=8,v.lastEffect!==null?(v.lastEffect.nextEffect=Q,v.lastEffect=Q):v.firstEffect=v.lastEffect=Q}function Sh(v,D){switch(v.tag){case 5:return D=aa(D,v.type,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 6:return D=FA(D,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function Hg(v){if(Ya){var D=Aa;if(D){var Q=D;if(!Sh(v,D)){if(D=Me(Q),!D||!Sh(v,D)){v.flags=v.flags&-1025|2,Ya=!1,Wa=v;return}_g(Wa,Q)}Wa=v,Aa=cu(D)}else v.flags=v.flags&-1025|2,Ya=!1,Wa=v}}function vy(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;Wa=v}function qA(v){if(!X||v!==Wa)return!1;if(!Ya)return vy(v),Ya=!0,!1;var D=v.type;if(v.tag!==5||D!==\"head\"&&D!==\"body\"&&!it(D,v.memoizedProps))for(D=Aa;D;)_g(v,D),D=Me(D);if(vy(v),v.tag===13){if(!X)throw Error(c(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));Aa=NA(v)}else Aa=Wa?Me(v.stateNode):null;return!0}function jg(){X&&(Aa=Wa=null,Ya=!1)}var mu=[];function yu(){for(var v=0;v<mu.length;v++){var D=mu[v];y?D._workInProgressVersionPrimary=null:D._workInProgressVersionSecondary=null}mu.length=0}var If=f.ReactCurrentDispatcher,Rs=f.ReactCurrentBatchConfig,Eu=0,Gn=null,is=null,Pi=null,WA=!1,Cf=!1;function mn(){throw Error(c(321))}function Gg(v,D){if(D===null)return!1;for(var Q=0;Q<D.length&&Q<v.length;Q++)if(!vo(v[Q],D[Q]))return!1;return!0}function qg(v,D,Q,H,V,ne){if(Eu=ne,Gn=D,D.memoizedState=null,D.updateQueue=null,D.lanes=0,If.current=v===null||v.memoizedState===null?O:K,v=Q(H,V),Cf){ne=0;do{if(Cf=!1,!(25>ne))throw Error(c(301));ne+=1,Pi=is=null,D.updateQueue=null,If.current=re,v=Q(H,V)}while(Cf)}if(If.current=kt,D=is!==null&&is.next!==null,Eu=0,Pi=is=Gn=null,WA=!1,D)throw Error(c(300));return v}function ss(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pi===null?Gn.memoizedState=Pi=v:Pi=Pi.next=v,Pi}function Pl(){if(is===null){var v=Gn.alternate;v=v!==null?v.memoizedState:null}else v=is.next;var D=Pi===null?Gn.memoizedState:Pi.next;if(D!==null)Pi=D,is=v;else{if(v===null)throw Error(c(310));is=v,v={memoizedState:is.memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},Pi===null?Gn.memoizedState=Pi=v:Pi=Pi.next=v}return Pi}function Po(v,D){return typeof D==\"function\"?D(v):D}function wf(v){var D=Pl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=is,V=H.baseQueue,ne=Q.pending;if(ne!==null){if(V!==null){var Se=V.next;V.next=ne.next,ne.next=Se}H.baseQueue=V=ne,Q.pending=null}if(V!==null){V=V.next,H=H.baseState;var _e=Se=ne=null,pt=V;do{var Wt=pt.lane;if((Eu&Wt)===Wt)_e!==null&&(_e=_e.next={lane:0,action:pt.action,eagerReducer:pt.eagerReducer,eagerState:pt.eagerState,next:null}),H=pt.eagerReducer===v?pt.eagerState:v(H,pt.action);else{var Sr={lane:Wt,action:pt.action,eagerReducer:pt.eagerReducer,eagerState:pt.eagerState,next:null};_e===null?(Se=_e=Sr,ne=H):_e=_e.next=Sr,Gn.lanes|=Wt,Zg|=Wt}pt=pt.next}while(pt!==null&&pt!==V);_e===null?ne=H:_e.next=Se,vo(H,D.memoizedState)||(Je=!0),D.memoizedState=H,D.baseState=ne,D.baseQueue=_e,Q.lastRenderedState=H}return[D.memoizedState,Q.dispatch]}function Bf(v){var D=Pl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=Q.dispatch,V=Q.pending,ne=D.memoizedState;if(V!==null){Q.pending=null;var Se=V=V.next;do ne=v(ne,Se.action),Se=Se.next;while(Se!==V);vo(ne,D.memoizedState)||(Je=!0),D.memoizedState=ne,D.baseQueue===null&&(D.baseState=ne),Q.lastRenderedState=ne}return[ne,H]}function xl(v,D,Q){var H=D._getVersion;H=H(D._source);var V=y?D._workInProgressVersionPrimary:D._workInProgressVersionSecondary;if(V!==null?v=V===H:(v=v.mutableReadLanes,(v=(Eu&v)===v)&&(y?D._workInProgressVersionPrimary=H:D._workInProgressVersionSecondary=H,mu.push(D))),v)return Q(D._source);throw mu.push(D),Error(c(350))}function yn(v,D,Q,H){var V=so;if(V===null)throw Error(c(349));var ne=D._getVersion,Se=ne(D._source),_e=If.current,pt=_e.useState(function(){return xl(V,D,Q)}),Wt=pt[1],Sr=pt[0];pt=Pi;var Lr=v.memoizedState,Zt=Lr.refs,zn=Zt.getSnapshot,yi=Lr.source;Lr=Lr.subscribe;var za=Gn;return v.memoizedState={refs:Zt,source:D,subscribe:H},_e.useEffect(function(){Zt.getSnapshot=Q,Zt.setSnapshot=Wt;var et=ne(D._source);if(!vo(Se,et)){et=Q(D._source),vo(Sr,et)||(Wt(et),et=Bs(za),V.mutableReadLanes|=et&V.pendingLanes),et=V.mutableReadLanes,V.entangledLanes|=et;for(var qe=V.entanglements,gt=et;0<gt;){var Xt=31-ns(gt),Dr=1<<Xt;qe[Xt]|=et,gt&=~Dr}}},[Q,D,H]),_e.useEffect(function(){return H(D._source,function(){var et=Zt.getSnapshot,qe=Zt.setSnapshot;try{qe(et(D._source));var gt=Bs(za);V.mutableReadLanes|=gt&V.pendingLanes}catch(Xt){qe(function(){throw Xt})}})},[D,H]),vo(zn,Q)&&vo(yi,D)&&vo(Lr,H)||(v={pending:null,dispatch:null,lastRenderedReducer:Po,lastRenderedState:Sr},v.dispatch=Wt=xh.bind(null,Gn,v),pt.queue=v,pt.baseQueue=null,Sr=xl(V,D,Q),pt.memoizedState=pt.baseState=Sr),Sr}function xo(v,D,Q){var H=Pl();return yn(H,v,D,Q)}function Iu(v){var D=ss();return typeof v==\"function\"&&(v=v()),D.memoizedState=D.baseState=v,v=D.queue={pending:null,dispatch:null,lastRenderedReducer:Po,lastRenderedState:v},v=v.dispatch=xh.bind(null,Gn,v),[D.memoizedState,v]}function pa(v,D,Q,H){return v={tag:v,create:D,destroy:Q,deps:H,next:null},D=Gn.updateQueue,D===null?(D={lastEffect:null},Gn.updateQueue=D,D.lastEffect=v.next=v):(Q=D.lastEffect,Q===null?D.lastEffect=v.next=v:(H=Q.next,Q.next=v,v.next=H,D.lastEffect=v)),v}function Fs(v){var D=ss();return v={current:v},D.memoizedState=v}function Dh(){return Pl().memoizedState}function YA(v,D,Q,H){var V=ss();Gn.flags|=v,V.memoizedState=pa(1|D,Q,void 0,H===void 0?null:H)}function vf(v,D,Q,H){var V=Pl();H=H===void 0?null:H;var ne=void 0;if(is!==null){var Se=is.memoizedState;if(ne=Se.destroy,H!==null&&Gg(H,Se.deps)){pa(D,Q,ne,H);return}}Gn.flags|=v,V.memoizedState=pa(1|D,Q,ne,H)}function io(v,D){return YA(516,4,v,D)}function Zr(v,D){return vf(516,4,v,D)}function bh(v,D){return vf(4,2,v,D)}function VA(v,D){if(typeof D==\"function\")return v=v(),D(v),function(){D(null)};if(D!=null)return v=v(),D.current=v,function(){D.current=null}}function Sy(v,D,Q){return Q=Q!=null?Q.concat([v]):null,vf(4,2,VA.bind(null,D,v),Q)}function Wg(){}function Ph(v,D){var Q=Pl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(Q.memoizedState=[v,D],v)}function pc(v,D){var Q=Pl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(v=v(),Q.memoizedState=[v,D],v)}function Dy(v,D){var Q=tr();li(98>Q?98:Q,function(){v(!0)}),li(97<Q?97:Q,function(){var H=Rs.transition;Rs.transition=1;try{v(!1),D()}finally{Rs.transition=H}})}function xh(v,D,Q){var H=ko(),V=Bs(v),ne={lane:V,action:Q,eagerReducer:null,eagerState:null,next:null},Se=D.pending;if(Se===null?ne.next=ne:(ne.next=Se.next,Se.next=ne),D.pending=ne,Se=v.alternate,v===Gn||Se!==null&&Se===Gn)Cf=WA=!0;else{if(v.lanes===0&&(Se===null||Se.lanes===0)&&(Se=D.lastRenderedReducer,Se!==null))try{var _e=D.lastRenderedState,pt=Se(_e,Q);if(ne.eagerReducer=Se,ne.eagerState=pt,vo(pt,_e))return}catch{}finally{}Tl(v,V,H)}}var kt={readContext:Do,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useOpaqueIdentifier:mn,unstable_isNewReconciler:!1},O={readContext:Do,useCallback:function(v,D){return ss().memoizedState=[v,D===void 0?null:D],v},useContext:Do,useEffect:io,useImperativeHandle:function(v,D,Q){return Q=Q!=null?Q.concat([v]):null,YA(4,2,VA.bind(null,D,v),Q)},useLayoutEffect:function(v,D){return YA(4,2,v,D)},useMemo:function(v,D){var Q=ss();return D=D===void 0?null:D,v=v(),Q.memoizedState=[v,D],v},useReducer:function(v,D,Q){var H=ss();return D=Q!==void 0?Q(D):D,H.memoizedState=H.baseState=D,v=H.queue={pending:null,dispatch:null,lastRenderedReducer:v,lastRenderedState:D},v=v.dispatch=xh.bind(null,Gn,v),[H.memoizedState,v]},useRef:Fs,useState:Iu,useDebugValue:Wg,useDeferredValue:function(v){var D=Iu(v),Q=D[0],H=D[1];return io(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=Iu(!1),D=v[0];return v=Dy.bind(null,v[1]),Fs(v),[v,D]},useMutableSource:function(v,D,Q){var H=ss();return H.memoizedState={refs:{getSnapshot:D,setSnapshot:null},source:v,subscribe:Q},yn(H,v,D,Q)},useOpaqueIdentifier:function(){if(Ya){var v=!1,D=oe(function(){throw v||(v=!0,Q(xe())),Error(c(355))}),Q=Iu(D)[1];return!(Gn.mode&2)&&(Gn.flags|=516,pa(5,function(){Q(xe())},void 0,null)),D}return D=xe(),Iu(D),D},unstable_isNewReconciler:!1},K={readContext:Do,useCallback:Ph,useContext:Do,useEffect:Zr,useImperativeHandle:Sy,useLayoutEffect:bh,useMemo:pc,useReducer:wf,useRef:Dh,useState:function(){return wf(Po)},useDebugValue:Wg,useDeferredValue:function(v){var D=wf(Po),Q=D[0],H=D[1];return Zr(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=wf(Po)[0];return[Dh().current,v]},useMutableSource:xo,useOpaqueIdentifier:function(){return wf(Po)[0]},unstable_isNewReconciler:!1},re={readContext:Do,useCallback:Ph,useContext:Do,useEffect:Zr,useImperativeHandle:Sy,useLayoutEffect:bh,useMemo:pc,useReducer:Bf,useRef:Dh,useState:function(){return Bf(Po)},useDebugValue:Wg,useDeferredValue:function(v){var D=Bf(Po),Q=D[0],H=D[1];return Zr(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=Bf(Po)[0];return[Dh().current,v]},useMutableSource:xo,useOpaqueIdentifier:function(){return Bf(Po)[0]},unstable_isNewReconciler:!1},de=f.ReactCurrentOwner,Je=!1;function At(v,D,Q,H){D.child=v===null?e2(D,null,Q,H):Mg(D,v.child,Q,H)}function dr(v,D,Q,H,V){Q=Q.render;var ne=D.ref;return df(D,V),H=qg(v,D,Q,H,ne,V),v!==null&&!Je?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,qn(v,D,V)):(D.flags|=1,At(v,D,H,V),D.child)}function vr(v,D,Q,H,V,ne){if(v===null){var Se=Q.type;return typeof Se==\"function\"&&!S2(Se)&&Se.defaultProps===void 0&&Q.compare===null&&Q.defaultProps===void 0?(D.tag=15,D.type=Se,Un(v,D,Se,H,V,ne)):(v=sd(Q.type,null,H,D,D.mode,ne),v.ref=D.ref,v.return=D,D.child=v)}return Se=v.child,!(V&ne)&&(V=Se.memoizedProps,Q=Q.compare,Q=Q!==null?Q:Eh,Q(V,H)&&v.ref===D.ref)?qn(v,D,ne):(D.flags|=1,v=Su(Se,H),v.ref=D.ref,v.return=D,D.child=v)}function Un(v,D,Q,H,V,ne){if(v!==null&&Eh(v.memoizedProps,H)&&v.ref===D.ref)if(Je=!1,(ne&V)!==0)v.flags&16384&&(Je=!0);else return D.lanes=v.lanes,qn(v,D,ne);return JA(v,D,Q,H,ne)}function mi(v,D,Q){var H=D.pendingProps,V=H.children,ne=v!==null?v.memoizedState:null;if(H.mode===\"hidden\"||H.mode===\"unstable-defer-without-hiding\")if(!(D.mode&4))D.memoizedState={baseLanes:0},qy(D,Q);else if(Q&1073741824)D.memoizedState={baseLanes:0},qy(D,ne!==null?ne.baseLanes:Q);else return v=ne!==null?ne.baseLanes|Q:Q,D.lanes=D.childLanes=1073741824,D.memoizedState={baseLanes:v},qy(D,v),null;else ne!==null?(H=ne.baseLanes|Q,D.memoizedState=null):H=Q,qy(D,H);return At(v,D,V,Q),D.child}function Cs(v,D){var Q=D.ref;(v===null&&Q!==null||v!==null&&v.ref!==Q)&&(D.flags|=128)}function JA(v,D,Q,H,V){var ne=Kn(Q)?Na:Gi.current;return ne=dn(D,ne),df(D,V),Q=qg(v,D,Q,H,ne,V),v!==null&&!Je?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,qn(v,D,V)):(D.flags|=1,At(v,D,Q,V),D.child)}function lP(v,D,Q,H,V){if(Kn(Q)){var ne=!0;La(D)}else ne=!1;if(df(D,V),D.stateNode===null)v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),xt(D,Q,H),bo(D,Q,H,V),H=!0;else if(v===null){var Se=D.stateNode,_e=D.memoizedProps;Se.props=_e;var pt=Se.context,Wt=Q.contextType;typeof Wt==\"object\"&&Wt!==null?Wt=Do(Wt):(Wt=Kn(Q)?Na:Gi.current,Wt=dn(D,Wt));var Sr=Q.getDerivedStateFromProps,Lr=typeof Sr==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\";Lr||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(_e!==H||pt!==Wt)&&jA(D,Se,H,Wt),Sl=!1;var Zt=D.memoizedState;Se.state=Zt,UA(D,H,Se,V),pt=D.memoizedState,_e!==H||Zt!==pt||Li.current||Sl?(typeof Sr==\"function\"&&(_A(D,Q,Sr,H),pt=D.memoizedState),(_e=Sl||Y(D,Q,_e,H,Zt,pt,Wt))?(Lr||typeof Se.UNSAFE_componentWillMount!=\"function\"&&typeof Se.componentWillMount!=\"function\"||(typeof Se.componentWillMount==\"function\"&&Se.componentWillMount(),typeof Se.UNSAFE_componentWillMount==\"function\"&&Se.UNSAFE_componentWillMount()),typeof Se.componentDidMount==\"function\"&&(D.flags|=4)):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),D.memoizedProps=H,D.memoizedState=pt),Se.props=H,Se.state=pt,Se.context=Wt,H=_e):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),H=!1)}else{Se=D.stateNode,Lg(v,D),_e=D.memoizedProps,Wt=D.type===D.elementType?_e:So(D.type,_e),Se.props=Wt,Lr=D.pendingProps,Zt=Se.context,pt=Q.contextType,typeof pt==\"object\"&&pt!==null?pt=Do(pt):(pt=Kn(Q)?Na:Gi.current,pt=dn(D,pt));var zn=Q.getDerivedStateFromProps;(Sr=typeof zn==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\")||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(_e!==Lr||Zt!==pt)&&jA(D,Se,H,pt),Sl=!1,Zt=D.memoizedState,Se.state=Zt,UA(D,H,Se,V);var yi=D.memoizedState;_e!==Lr||Zt!==yi||Li.current||Sl?(typeof zn==\"function\"&&(_A(D,Q,zn,H),yi=D.memoizedState),(Wt=Sl||Y(D,Q,Wt,H,Zt,yi,pt))?(Sr||typeof Se.UNSAFE_componentWillUpdate!=\"function\"&&typeof Se.componentWillUpdate!=\"function\"||(typeof Se.componentWillUpdate==\"function\"&&Se.componentWillUpdate(H,yi,pt),typeof Se.UNSAFE_componentWillUpdate==\"function\"&&Se.UNSAFE_componentWillUpdate(H,yi,pt)),typeof Se.componentDidUpdate==\"function\"&&(D.flags|=4),typeof Se.getSnapshotBeforeUpdate==\"function\"&&(D.flags|=256)):(typeof Se.componentDidUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=256),D.memoizedProps=H,D.memoizedState=yi),Se.props=H,Se.state=yi,Se.context=pt,H=Wt):(typeof Se.componentDidUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=256),H=!1)}return t2(v,D,Q,H,ne,V)}function t2(v,D,Q,H,V,ne){Cs(v,D);var Se=(D.flags&64)!==0;if(!H&&!Se)return V&&Ma(D,Q,!1),qn(v,D,ne);H=D.stateNode,de.current=D;var _e=Se&&typeof Q.getDerivedStateFromError!=\"function\"?null:H.render();return D.flags|=1,v!==null&&Se?(D.child=Mg(D,v.child,null,ne),D.child=Mg(D,null,_e,ne)):At(v,D,_e,ne),D.memoizedState=H.state,V&&Ma(D,Q,!0),D.child}function by(v){var D=v.stateNode;D.pendingContext?yh(v,D.pendingContext,D.pendingContext!==D.context):D.context&&yh(v,D.context,!1),Ug(v,D.containerInfo)}var kh={dehydrated:null,retryLane:0};function r2(v,D,Q){var H=D.pendingProps,V=di.current,ne=!1,Se;return(Se=(D.flags&64)!==0)||(Se=v!==null&&v.memoizedState===null?!1:(V&2)!==0),Se?(ne=!0,D.flags&=-65):v!==null&&v.memoizedState===null||H.fallback===void 0||H.unstable_avoidThisFallback===!0||(V|=1),xn(di,V&1),v===null?(H.fallback!==void 0&&Hg(D),v=H.children,V=H.fallback,ne?(v=Va(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=kh,v):typeof H.unstable_expectedLoadTime==\"number\"?(v=Va(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=kh,D.lanes=33554432,v):(Q=D2({mode:\"visible\",children:v},D.mode,Q,null),Q.return=D,D.child=Q)):v.memoizedState!==null?ne?(H=KA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=kh,H):(Q=n2(v,D,H.children,Q),D.memoizedState=null,Q):ne?(H=KA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=kh,H):(Q=n2(v,D,H.children,Q),D.memoizedState=null,Q)}function Va(v,D,Q,H){var V=v.mode,ne=v.child;return D={mode:\"hidden\",children:D},!(V&2)&&ne!==null?(ne.childLanes=0,ne.pendingProps=D):ne=D2(D,V,0,null),Q=kf(Q,V,H,null),ne.return=v,Q.return=v,ne.sibling=Q,v.child=ne,Q}function n2(v,D,Q,H){var V=v.child;return v=V.sibling,Q=Su(V,{mode:\"visible\",children:Q}),!(D.mode&2)&&(Q.lanes=H),Q.return=D,Q.sibling=null,v!==null&&(v.nextEffect=null,v.flags=8,D.firstEffect=D.lastEffect=v),D.child=Q}function KA(v,D,Q,H,V){var ne=D.mode,Se=v.child;v=Se.sibling;var _e={mode:\"hidden\",children:Q};return!(ne&2)&&D.child!==Se?(Q=D.child,Q.childLanes=0,Q.pendingProps=_e,Se=Q.lastEffect,Se!==null?(D.firstEffect=Q.firstEffect,D.lastEffect=Se,Se.nextEffect=null):D.firstEffect=D.lastEffect=null):Q=Su(Se,_e),v!==null?H=Su(v,H):(H=kf(H,ne,V,null),H.flags|=2),H.return=D,Q.return=D,Q.sibling=H,D.child=Q,H}function Qh(v,D){v.lanes|=D;var Q=v.alternate;Q!==null&&(Q.lanes|=D),Ey(v.return,D)}function Py(v,D,Q,H,V,ne){var Se=v.memoizedState;Se===null?v.memoizedState={isBackwards:D,rendering:null,renderingStartTime:0,last:H,tail:Q,tailMode:V,lastEffect:ne}:(Se.isBackwards=D,Se.rendering=null,Se.renderingStartTime=0,Se.last=H,Se.tail=Q,Se.tailMode=V,Se.lastEffect=ne)}function cP(v,D,Q){var H=D.pendingProps,V=H.revealOrder,ne=H.tail;if(At(v,D,H.children,Q),H=di.current,H&2)H=H&1|2,D.flags|=64;else{if(v!==null&&v.flags&64)e:for(v=D.child;v!==null;){if(v.tag===13)v.memoizedState!==null&&Qh(v,Q);else if(v.tag===19)Qh(v,Q);else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===D)break e;for(;v.sibling===null;){if(v.return===null||v.return===D)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}H&=1}if(xn(di,H),!(D.mode&2))D.memoizedState=null;else switch(V){case\"forwards\":for(Q=D.child,V=null;Q!==null;)v=Q.alternate,v!==null&&GA(v)===null&&(V=Q),Q=Q.sibling;Q=V,Q===null?(V=D.child,D.child=null):(V=Q.sibling,Q.sibling=null),Py(D,!1,V,Q,ne,D.lastEffect);break;case\"backwards\":for(Q=null,V=D.child,D.child=null;V!==null;){if(v=V.alternate,v!==null&&GA(v)===null){D.child=V;break}v=V.sibling,V.sibling=Q,Q=V,V=v}Py(D,!0,Q,null,ne,D.lastEffect);break;case\"together\":Py(D,!1,null,null,void 0,D.lastEffect);break;default:D.memoizedState=null}return D.child}function qn(v,D,Q){if(v!==null&&(D.dependencies=v.dependencies),Zg|=D.lanes,Q&D.childLanes){if(v!==null&&D.child!==v.child)throw Error(c(153));if(D.child!==null){for(v=D.child,Q=Su(v,v.pendingProps),D.child=Q,Q.return=D;v.sibling!==null;)v=v.sibling,Q=Q.sibling=Su(v,v.pendingProps),Q.return=D;Q.sibling=null}return D.child}return null}function os(v){v.flags|=4}var kl,Ql,Cu,ha;if(F)kl=function(v,D){for(var Q=D.child;Q!==null;){if(Q.tag===5||Q.tag===6)Pe(v,Q.stateNode);else if(Q.tag!==4&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}},Ql=function(){},Cu=function(v,D,Q,H,V){if(v=v.memoizedProps,v!==H){var ne=D.stateNode,Se=qa(ur.current);Q=ke(ne,Q,v,H,V,Se),(D.updateQueue=Q)&&os(D)}},ha=function(v,D,Q,H){Q!==H&&os(D)};else if(z){kl=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=RA(ne,V.type,V.memoizedProps,V)),Pe(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=oa(ne,V.memoizedProps,V)),Pe(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,kl(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};var zA=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=RA(ne,V.type,V.memoizedProps,V)),au(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=oa(ne,V.memoizedProps,V)),au(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,zA(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};Ql=function(v){var D=v.stateNode;if(v.firstEffect!==null){var Q=D.containerInfo,H=ou(Q);zA(H,v,!1,!1),D.pendingChildren=H,os(v),lu(Q,H)}},Cu=function(v,D,Q,H,V){var ne=v.stateNode,Se=v.memoizedProps;if((v=D.firstEffect===null)&&Se===H)D.stateNode=ne;else{var _e=D.stateNode,pt=qa(ur.current),Wt=null;Se!==H&&(Wt=ke(_e,Q,Se,H,V,pt)),v&&Wt===null?D.stateNode=ne:(ne=ro(ne,Wt,Q,Se,H,D,v,_e),Ve(ne,Q,H,V,pt)&&os(D),D.stateNode=ne,v?os(D):kl(ne,D,!1,!1))}},ha=function(v,D,Q,H){Q!==H?(v=qa(yf.current),Q=qa(ur.current),D.stateNode=Ue(H,v,Q,D),os(D)):D.stateNode=v.stateNode}}else Ql=function(){},Cu=function(){},ha=function(){};function XA(v,D){if(!Ya)switch(v.tailMode){case\"hidden\":D=v.tail;for(var Q=null;D!==null;)D.alternate!==null&&(Q=D),D=D.sibling;Q===null?v.tail=null:Q.sibling=null;break;case\"collapsed\":Q=v.tail;for(var H=null;Q!==null;)Q.alternate!==null&&(H=Q),Q=Q.sibling;H===null?D||v.tail===null?v.tail=null:v.tail.sibling=null:H.sibling=null}}function jL(v,D,Q){var H=D.pendingProps;switch(D.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Kn(D.type)&&Au(),null;case 3:return du(),Rt(Li),Rt(Gi),yu(),H=D.stateNode,H.pendingContext&&(H.context=H.pendingContext,H.pendingContext=null),(v===null||v.child===null)&&(qA(D)?os(D):H.hydrate||(D.flags|=256)),Ql(D),null;case 5:wt(D);var V=qa(yf.current);if(Q=D.type,v!==null&&D.stateNode!=null)Cu(v,D,Q,H,V),v.ref!==D.ref&&(D.flags|=128);else{if(!H){if(D.stateNode===null)throw Error(c(166));return null}if(v=qa(ur.current),qA(D)){if(!X)throw Error(c(175));v=Cr(D.stateNode,D.type,D.memoizedProps,V,v,D),D.updateQueue=v,v!==null&&os(D)}else{var ne=Ne(Q,H,V,v,D);kl(ne,D,!1,!1),D.stateNode=ne,Ve(ne,Q,H,V,v)&&os(D)}D.ref!==null&&(D.flags|=128)}return null;case 6:if(v&&D.stateNode!=null)ha(v,D,v.memoizedProps,H);else{if(typeof H!=\"string\"&&D.stateNode===null)throw Error(c(166));if(v=qa(yf.current),V=qa(ur.current),qA(D)){if(!X)throw Error(c(176));pf(D.stateNode,D.memoizedProps,D)&&os(D)}else D.stateNode=Ue(H,v,V,D)}return null;case 13:return Rt(di),H=D.memoizedState,D.flags&64?(D.lanes=Q,D):(H=H!==null,V=!1,v===null?D.memoizedProps.fallback!==void 0&&qA(D):V=v.memoizedState!==null,H&&!V&&D.mode&2&&(v===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||di.current&1?ws===0&&(ws=3):((ws===0||ws===3)&&(ws=4),so===null||!(Zg&134217727)&&!(Fh&134217727)||Nh(so,Ns))),z&&H&&(D.flags|=4),F&&(H||V)&&(D.flags|=4),null);case 4:return du(),Ql(D),v===null&&Ct(D.stateNode.containerInfo),null;case 10:return Og(D),null;case 17:return Kn(D.type)&&Au(),null;case 19:if(Rt(di),H=D.memoizedState,H===null)return null;if(V=(D.flags&64)!==0,ne=H.rendering,ne===null)if(V)XA(H,!1);else{if(ws!==0||v!==null&&v.flags&64)for(v=D.child;v!==null;){if(ne=GA(v),ne!==null){for(D.flags|=64,XA(H,!1),v=ne.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),H.lastEffect===null&&(D.firstEffect=null),D.lastEffect=H.lastEffect,v=Q,H=D.child;H!==null;)V=H,Q=v,V.flags&=2,V.nextEffect=null,V.firstEffect=null,V.lastEffect=null,ne=V.alternate,ne===null?(V.childLanes=0,V.lanes=Q,V.child=null,V.memoizedProps=null,V.memoizedState=null,V.updateQueue=null,V.dependencies=null,V.stateNode=null):(V.childLanes=ne.childLanes,V.lanes=ne.lanes,V.child=ne.child,V.memoizedProps=ne.memoizedProps,V.memoizedState=ne.memoizedState,V.updateQueue=ne.updateQueue,V.type=ne.type,Q=ne.dependencies,V.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext}),H=H.sibling;return xn(di,di.current&1|2),D.child}v=v.sibling}H.tail!==null&&bt()>m2&&(D.flags|=64,V=!0,XA(H,!1),D.lanes=33554432)}else{if(!V)if(v=GA(ne),v!==null){if(D.flags|=64,V=!0,v=v.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),XA(H,!0),H.tail===null&&H.tailMode===\"hidden\"&&!ne.alternate&&!Ya)return D=D.lastEffect=H.lastEffect,D!==null&&(D.nextEffect=null),null}else 2*bt()-H.renderingStartTime>m2&&Q!==1073741824&&(D.flags|=64,V=!0,XA(H,!1),D.lanes=33554432);H.isBackwards?(ne.sibling=D.child,D.child=ne):(v=H.last,v!==null?v.sibling=ne:D.child=ne,H.last=ne)}return H.tail!==null?(v=H.tail,H.rendering=v,H.tail=v.sibling,H.lastEffect=D.lastEffect,H.renderingStartTime=bt(),v.sibling=null,D=di.current,xn(di,V?D&1|2:D&1),v):null;case 23:case 24:return B2(),v!==null&&v.memoizedState!==null!=(D.memoizedState!==null)&&H.mode!==\"unstable-defer-without-hiding\"&&(D.flags|=4),null}throw Error(c(156,D.tag))}function qL(v){switch(v.tag){case 1:Kn(v.type)&&Au();var D=v.flags;return D&4096?(v.flags=D&-4097|64,v):null;case 3:if(du(),Rt(Li),Rt(Gi),yu(),D=v.flags,D&64)throw Error(c(285));return v.flags=D&-4097|64,v;case 5:return wt(v),null;case 13:return Rt(di),D=v.flags,D&4096?(v.flags=D&-4097|64,v):null;case 19:return Rt(di),null;case 4:return du(),null;case 10:return Og(v),null;case 23:case 24:return B2(),null;default:return null}}function Yg(v,D){try{var Q=\"\",H=D;do Q+=$1(H),H=H.return;while(H);var V=Q}catch(ne){V=`\nError generating stack: `+ne.message+`\n`+ne.stack}return{value:v,source:D,stack:V}}function Vg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var WL=typeof WeakMap==\"function\"?WeakMap:Map;function i2(v,D,Q){Q=Dl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){_y||(_y=!0,y2=H),Vg(v,D)},Q}function Jg(v,D,Q){Q=Dl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H==\"function\"){var V=D.value;Q.payload=function(){return Vg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch==\"function\"&&(Q.callback=function(){typeof H!=\"function\"&&(hc===null?hc=new Set([this]):hc.add(this),Vg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:\"\"})}),Q}var YL=typeof WeakSet==\"function\"?WeakSet:Set;function s2(v){var D=v.ref;if(D!==null)if(typeof D==\"function\")try{D(null)}catch(Q){xf(v,Q)}else D.current=null}function xy(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:So(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Ts(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Th(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function uP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(vP(Q,v),tM(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:So(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Cy(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Cy(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&$s(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:X&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&uu(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function fP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?dh(H):to(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?mh(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function ky(v,D){if(Ua&&typeof Ua.onCommitFiberUnmount==\"function\")try{Ua.onCommitFiberUnmount($e,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)vP(D,Q);else{H=D;try{V()}catch(ne){xf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(s2(D),v=D.stateNode,typeof v.componentWillUnmount==\"function\")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){xf(D,ne)}break;case 5:s2(D);break;case 4:F?gP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=ou(D),TA(D,v))}}function AP(v,D){for(var Q=D;;)if(ky(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Qy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function pP(v){return v.tag===5||v.tag===3||v.tag===4}function hP(v){if(F){e:{for(var D=v.return;D!==null;){if(pP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(Af(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||pP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?o2(v,Q,D):a2(v,Q,D)}}function o2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?eo(Q,v,D):Io(Q,v);else if(H!==4&&(v=v.child,v!==null))for(o2(v,D,Q),v=v.sibling;v!==null;)o2(v,D,Q),v=v.sibling}function a2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ji(Q,v,D):ai(Q,v);else if(H!==4&&(v=v.child,v!==null))for(a2(v,D,Q),v=v.sibling;v!==null;)a2(v,D,Q),v=v.sibling}function gP(v,D){for(var Q=D,H=!1,V,ne;;){if(!H){H=Q.return;e:for(;;){if(H===null)throw Error(c(160));switch(V=H.stateNode,H.tag){case 5:ne=!1;break e;case 3:V=V.containerInfo,ne=!0;break e;case 4:V=V.containerInfo,ne=!0;break e}H=H.return}H=!0}if(Q.tag===5||Q.tag===6)AP(v,Q),ne?QA(V,Q.stateNode):wo(V,Q.stateNode);else if(Q.tag===4){if(Q.child!==null){V=Q.stateNode.containerInfo,ne=!0,Q.child.return=Q,Q=Q.child;continue}}else if(ky(v,Q),Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return,Q.tag===4&&(H=!1)}Q.sibling.return=Q.return,Q=Q.sibling}}function l2(v,D){if(F){switch(D.tag){case 0:case 11:case 14:case 15:case 22:Th(3,D);return;case 1:return;case 5:var Q=D.stateNode;if(Q!=null){var H=D.memoizedProps;v=v!==null?v.memoizedProps:H;var V=D.type,ne=D.updateQueue;D.updateQueue=null,ne!==null&&Co(Q,ne,V,v,H,D)}return;case 6:if(D.stateNode===null)throw Error(c(162));Q=D.memoizedProps,rs(D.stateNode,v!==null?v.memoizedProps:Q,Q);return;case 3:X&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,OA(D.containerInfo)));return;case 12:return;case 13:dP(D),Kg(D);return;case 19:Kg(D);return;case 17:return;case 23:case 24:fP(D,D.memoizedState!==null);return}throw Error(c(163))}switch(D.tag){case 0:case 11:case 14:case 15:case 22:Th(3,D);return;case 12:return;case 13:dP(D),Kg(D);return;case 19:Kg(D);return;case 3:X&&(Q=D.stateNode,Q.hydrate&&(Q.hydrate=!1,OA(Q.containerInfo)));break;case 23:case 24:return}e:if(z){switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,TA(D.containerInfo,D.pendingChildren);break e}throw Error(c(163))}}function dP(v){v.memoizedState!==null&&(d2=bt(),F&&fP(v.child,!0))}function Kg(v){var D=v.updateQueue;if(D!==null){v.updateQueue=null;var Q=v.stateNode;Q===null&&(Q=v.stateNode=new YL),D.forEach(function(H){var V=nM.bind(null,v,H);Q.has(H)||(Q.add(H),H.then(V,V))})}}function VL(v,D){return v!==null&&(v=v.memoizedState,v===null||v.dehydrated!==null)?(D=D.memoizedState,D!==null&&D.dehydrated===null):!1}var Ty=0,Ry=1,Fy=2,zg=3,Ny=4;if(typeof Symbol==\"function\"&&Symbol.for){var Xg=Symbol.for;Ty=Xg(\"selector.component\"),Ry=Xg(\"selector.has_pseudo_class\"),Fy=Xg(\"selector.role\"),zg=Xg(\"selector.test_id\"),Ny=Xg(\"selector.text\")}function Oy(v){var D=$(v);if(D!=null){if(typeof D.memoizedProps[\"data-testname\"]!=\"string\")throw Error(c(364));return D}if(v=ir(v),v===null)throw Error(c(362));return v.stateNode.current}function Sf(v,D){switch(D.$$typeof){case Ty:if(v.type===D.value)return!0;break;case Ry:e:{D=D.value,v=[v,0];for(var Q=0;Q<v.length;){var H=v[Q++],V=v[Q++],ne=D[V];if(H.tag!==5||!Pr(H)){for(;ne!=null&&Sf(H,ne);)V++,ne=D[V];if(V===D.length){D=!0;break e}else for(H=H.child;H!==null;)v.push(H,V),H=H.sibling}}D=!1}return D;case Fy:if(v.tag===5&&Ir(v.stateNode,D.value))return!0;break;case Ny:if((v.tag===5||v.tag===6)&&(v=gn(v),v!==null&&0<=v.indexOf(D.value)))return!0;break;case zg:if(v.tag===5&&(v=v.memoizedProps[\"data-testname\"],typeof v==\"string\"&&v.toLowerCase()===D.value.toLowerCase()))return!0;break;default:throw Error(c(365,D))}return!1}function Df(v){switch(v.$$typeof){case Ty:return\"<\"+(g(v.value)||\"Unknown\")+\">\";case Ry:return\":has(\"+(Df(v)||\"\")+\")\";case Fy:return'[role=\"'+v.value+'\"]';case Ny:return'\"'+v.value+'\"';case zg:return'[data-testname=\"'+v.value+'\"]';default:throw Error(c(365,v))}}function c2(v,D){var Q=[];v=[v,0];for(var H=0;H<v.length;){var V=v[H++],ne=v[H++],Se=D[ne];if(V.tag!==5||!Pr(V)){for(;Se!=null&&Sf(V,Se);)ne++,Se=D[ne];if(ne===D.length)Q.push(V);else for(V=V.child;V!==null;)v.push(V,ne),V=V.sibling}}return Q}function u2(v,D){if(!qt)throw Error(c(363));v=Oy(v),v=c2(v,D),D=[],v=Array.from(v);for(var Q=0;Q<v.length;){var H=v[Q++];if(H.tag===5)Pr(H)||D.push(H.stateNode);else for(H=H.child;H!==null;)v.push(H),H=H.sibling}return D}var Ly=null;function JL(v){if(Ly===null)try{var D=(\"require\"+Math.random()).slice(0,7);Ly=(jS&&jS[D]).call(jS,\"timers\").setImmediate}catch{Ly=function(H){var V=new MessageChannel;V.port1.onmessage=H,V.port2.postMessage(void 0)}}return Ly(v)}var KL=Math.ceil,My=f.ReactCurrentDispatcher,f2=f.ReactCurrentOwner,A2=f.IsSomeRendererActing,xr=0,so=null,Xi=null,Ns=0,ZA=0,p2=no(0),ws=0,Uy=null,Rh=0,Zg=0,Fh=0,h2=0,g2=null,d2=0,m2=1/0;function bf(){m2=bt()+500}var sr=null,_y=!1,y2=null,hc=null,Pf=!1,$g=null,ed=90,E2=[],I2=[],wu=null,td=0,C2=null,Hy=-1,Bu=0,jy=0,rd=null,nd=!1;function ko(){return xr&48?bt():Hy!==-1?Hy:Hy=bt()}function Bs(v){if(v=v.mode,!(v&2))return 1;if(!(v&4))return tr()===99?1:2;if(Bu===0&&(Bu=Rh),my.transition!==0){jy!==0&&(jy=g2!==null?g2.pendingLanes:0),v=Bu;var D=4186112&~jy;return D&=-D,D===0&&(v=4186112&~v,D=v&-v,D===0&&(D=8192)),D}return v=tr(),xr&4&&v===98?v=Mt(12,Bu):(v=LA(v),v=Mt(v,Bu)),v}function Tl(v,D,Q){if(50<td)throw td=0,C2=null,Error(c(185));if(v=Gy(v,D),v===null)return null;Ha(v,D,Q),v===so&&(Fh|=D,ws===4&&Nh(v,Ns));var H=tr();D===1?xr&8&&!(xr&48)?w2(v):(ga(v,Q),xr===0&&(bf(),Tn())):(!(xr&4)||H!==98&&H!==99||(wu===null?wu=new Set([v]):wu.add(v)),ga(v,Q)),g2=v}function Gy(v,D){v.lanes|=D;var Q=v.alternate;for(Q!==null&&(Q.lanes|=D),Q=v,v=v.return;v!==null;)v.childLanes|=D,Q=v.alternate,Q!==null&&(Q.childLanes|=D),Q=v,v=v.return;return Q.tag===3?Q.stateNode:null}function ga(v,D){for(var Q=v.callbackNode,H=v.suspendedLanes,V=v.pingedLanes,ne=v.expirationTimes,Se=v.pendingLanes;0<Se;){var _e=31-ns(Se),pt=1<<_e,Wt=ne[_e];if(Wt===-1){if(!(pt&H)||pt&V){Wt=D,ca(pt);var Sr=wn;ne[_e]=10<=Sr?Wt+250:6<=Sr?Wt+5e3:-1}}else Wt<=D&&(v.expiredLanes|=pt);Se&=~pt}if(H=ua(v,v===so?Ns:0),D=wn,H===0)Q!==null&&(Q!==lr&&Is(Q),v.callbackNode=null,v.callbackPriority=0);else{if(Q!==null){if(v.callbackPriority===D)return;Q!==lr&&Is(Q)}D===15?(Q=w2.bind(null,v),Ee===null?(Ee=[Q],Oe=Mi(Qn,Ga)):Ee.push(Q),Q=lr):D===14?Q=qi(99,w2.bind(null,v)):(Q=MA(D),Q=qi(Q,mP.bind(null,v))),v.callbackPriority=D,v.callbackNode=Q}}function mP(v){if(Hy=-1,jy=Bu=0,xr&48)throw Error(c(327));var D=v.callbackNode;if(vu()&&v.callbackNode!==D)return null;var Q=ua(v,v===so?Ns:0);if(Q===0)return null;var H=Q,V=xr;xr|=16;var ne=CP();(so!==v||Ns!==H)&&(bf(),Oh(v,H));do try{ZL();break}catch(_e){IP(v,_e)}while(!0);if(Fg(),My.current=ne,xr=V,Xi!==null?H=0:(so=null,Ns=0,H=ws),Rh&Fh)Oh(v,0);else if(H!==0){if(H===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Ts(v.containerInfo)),Q=Bl(v),Q!==0&&(H=id(v,Q))),H===1)throw D=Uy,Oh(v,0),Nh(v,Q),ga(v,bt()),D;switch(v.finishedWork=v.current.alternate,v.finishedLanes=Q,H){case 0:case 1:throw Error(c(345));case 2:$A(v);break;case 3:if(Nh(v,Q),(Q&62914560)===Q&&(H=d2+500-bt(),10<H)){if(ua(v,0)!==0)break;if(V=v.suspendedLanes,(V&Q)!==Q){ko(),v.pingedLanes|=v.suspendedLanes&V;break}v.timeoutHandle=x($A.bind(null,v),H);break}$A(v);break;case 4:if(Nh(v,Q),(Q&4186112)===Q)break;for(H=v.eventTimes,V=-1;0<Q;){var Se=31-ns(Q);ne=1<<Se,Se=H[Se],Se>V&&(V=Se),Q&=~ne}if(Q=V,Q=bt()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*KL(Q/1960))-Q,10<Q){v.timeoutHandle=x($A.bind(null,v),Q);break}$A(v);break;case 5:$A(v);break;default:throw Error(c(329))}}return ga(v,bt()),v.callbackNode===D?mP.bind(null,v):null}function Nh(v,D){for(D&=~h2,D&=~Fh,v.suspendedLanes|=D,v.pingedLanes&=~D,v=v.expirationTimes;0<D;){var Q=31-ns(D),H=1<<Q;v[Q]=-1,D&=~H}}function w2(v){if(xr&48)throw Error(c(327));if(vu(),v===so&&v.expiredLanes&Ns){var D=Ns,Q=id(v,D);Rh&Fh&&(D=ua(v,D),Q=id(v,D))}else D=ua(v,0),Q=id(v,D);if(v.tag!==0&&Q===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Ts(v.containerInfo)),D=Bl(v),D!==0&&(Q=id(v,D))),Q===1)throw Q=Uy,Oh(v,0),Nh(v,D),ga(v,bt()),Q;return v.finishedWork=v.current.alternate,v.finishedLanes=D,$A(v),ga(v,bt()),null}function zL(){if(wu!==null){var v=wu;wu=null,v.forEach(function(D){D.expiredLanes|=24&D.pendingLanes,ga(D,bt())})}Tn()}function yP(v,D){var Q=xr;xr|=1;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}}function EP(v,D){var Q=xr;if(Q&48)return v(D);xr|=1;try{if(v)return li(99,v.bind(null,D))}finally{xr=Q,Tn()}}function qy(v,D){xn(p2,ZA),ZA|=D,Rh|=D}function B2(){ZA=p2.current,Rt(p2)}function Oh(v,D){v.finishedWork=null,v.finishedLanes=0;var Q=v.timeoutHandle;if(Q!==b&&(v.timeoutHandle=b,w(Q)),Xi!==null)for(Q=Xi.return;Q!==null;){var H=Q;switch(H.tag){case 1:H=H.type.childContextTypes,H!=null&&Au();break;case 3:du(),Rt(Li),Rt(Gi),yu();break;case 5:wt(H);break;case 4:du();break;case 13:Rt(di);break;case 19:Rt(di);break;case 10:Og(H);break;case 23:case 24:B2()}Q=Q.return}so=v,Xi=Su(v.current,null),Ns=ZA=Rh=D,ws=0,Uy=null,h2=Fh=Zg=0}function IP(v,D){do{var Q=Xi;try{if(Fg(),If.current=kt,WA){for(var H=Gn.memoizedState;H!==null;){var V=H.queue;V!==null&&(V.pending=null),H=H.next}WA=!1}if(Eu=0,Pi=is=Gn=null,Cf=!1,f2.current=null,Q===null||Q.return===null){ws=1,Uy=D,Xi=null;break}e:{var ne=v,Se=Q.return,_e=Q,pt=D;if(D=Ns,_e.flags|=2048,_e.firstEffect=_e.lastEffect=null,pt!==null&&typeof pt==\"object\"&&typeof pt.then==\"function\"){var Wt=pt;if(!(_e.mode&2)){var Sr=_e.alternate;Sr?(_e.updateQueue=Sr.updateQueue,_e.memoizedState=Sr.memoizedState,_e.lanes=Sr.lanes):(_e.updateQueue=null,_e.memoizedState=null)}var Lr=(di.current&1)!==0,Zt=Se;do{var zn;if(zn=Zt.tag===13){var yi=Zt.memoizedState;if(yi!==null)zn=yi.dehydrated!==null;else{var za=Zt.memoizedProps;zn=za.fallback===void 0?!1:za.unstable_avoidThisFallback!==!0?!0:!Lr}}if(zn){var et=Zt.updateQueue;if(et===null){var qe=new Set;qe.add(Wt),Zt.updateQueue=qe}else et.add(Wt);if(!(Zt.mode&2)){if(Zt.flags|=64,_e.flags|=16384,_e.flags&=-2981,_e.tag===1)if(_e.alternate===null)_e.tag=17;else{var gt=Dl(-1,1);gt.tag=2,bl(_e,gt)}_e.lanes|=1;break e}pt=void 0,_e=D;var Xt=ne.pingCache;if(Xt===null?(Xt=ne.pingCache=new WL,pt=new Set,Xt.set(Wt,pt)):(pt=Xt.get(Wt),pt===void 0&&(pt=new Set,Xt.set(Wt,pt))),!pt.has(_e)){pt.add(_e);var Dr=DP.bind(null,ne,Wt,_e);Wt.then(Dr,Dr)}Zt.flags|=4096,Zt.lanes=D;break e}Zt=Zt.return}while(Zt!==null);pt=Error((g(_e.type)||\"A React component\")+` suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}ws!==5&&(ws=2),pt=Yg(pt,_e),Zt=Se;do{switch(Zt.tag){case 3:ne=pt,Zt.flags|=4096,D&=-D,Zt.lanes|=D;var Zn=i2(Zt,ne,D);Iy(Zt,Zn);break e;case 1:ne=pt;var kr=Zt.type,Rn=Zt.stateNode;if(!(Zt.flags&64)&&(typeof kr.getDerivedStateFromError==\"function\"||Rn!==null&&typeof Rn.componentDidCatch==\"function\"&&(hc===null||!hc.has(Rn)))){Zt.flags|=4096,D&=-D,Zt.lanes|=D;var _n=Jg(Zt,ne,D);Iy(Zt,_n);break e}}Zt=Zt.return}while(Zt!==null)}BP(Q)}catch(zr){D=zr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function CP(){var v=My.current;return My.current=kt,v===null?kt:v}function id(v,D){var Q=xr;xr|=16;var H=CP();so===v&&Ns===D||Oh(v,D);do try{XL();break}catch(V){IP(v,V)}while(!0);if(Fg(),xr=Q,My.current=H,Xi!==null)throw Error(c(261));return so=null,Ns=0,ws}function XL(){for(;Xi!==null;)wP(Xi)}function ZL(){for(;Xi!==null&&!vl();)wP(Xi)}function wP(v){var D=bP(v.alternate,v,ZA);v.memoizedProps=v.pendingProps,D===null?BP(v):Xi=D,f2.current=null}function BP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=qL(D),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=jL(Q,D,ZA),Q!==null){Xi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ZA&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1<D.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=D:v.firstEffect=D,v.lastEffect=D))}if(D=D.sibling,D!==null){Xi=D;return}Xi=D=v}while(D!==null);ws===0&&(ws=5)}function $A(v){var D=tr();return li(99,$L.bind(null,v,D)),null}function $L(v,D){do vu();while($g!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,V=H,ne=v.pendingLanes&~V;v.pendingLanes=V,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=V,v.mutableReadLanes&=V,v.entangledLanes&=V,V=v.entanglements;for(var Se=v.eventTimes,_e=v.expirationTimes;0<ne;){var pt=31-ns(ne),Wt=1<<pt;V[pt]=0,Se[pt]=-1,_e[pt]=-1,ne&=~Wt}if(wu!==null&&!(H&24)&&wu.has(v)&&wu.delete(v),v===so&&(Xi=so=null,Ns=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){V=xr,xr|=32,f2.current=null,rd=rt(v.containerInfo),nd=!1,sr=H;do try{eM()}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);rd=null,sr=H;do try{for(Se=v;sr!==null;){var Sr=sr.flags;if(Sr&16&&F&&Af(sr.stateNode),Sr&128){var Lr=sr.alternate;if(Lr!==null){var Zt=Lr.ref;Zt!==null&&(typeof Zt==\"function\"?Zt(null):Zt.current=null)}}switch(Sr&1038){case 2:hP(sr),sr.flags&=-3;break;case 6:hP(sr),sr.flags&=-3,l2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,l2(sr.alternate,sr);break;case 4:l2(sr.alternate,sr);break;case 8:_e=Se,ne=sr,F?gP(_e,ne):AP(_e,ne);var zn=ne.alternate;Qy(ne),zn!==null&&Qy(zn)}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);nd&&lt(),Fe(v.containerInfo),v.current=Q,sr=H;do try{for(Sr=v;sr!==null;){var yi=sr.flags;if(yi&36&&uP(Sr,sr.alternate,sr),yi&128){Lr=void 0;var za=sr.ref;if(za!==null){var et=sr.stateNode;switch(sr.tag){case 5:Lr=Re(et);break;default:Lr=et}typeof za==\"function\"?za(Lr):za.current=Lr}}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);sr=null,te(),xr=V}else v.current=Q;if(Pf)Pf=!1,$g=v,ed=D;else for(sr=H;sr!==null;)D=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(yi=sr,yi.sibling=null,yi.stateNode=null),sr=D;if(H=v.pendingLanes,H===0&&(hc=null),H===1?v===C2?td++:(td=0,C2=v):td=0,Q=Q.stateNode,Ua&&typeof Ua.onCommitFiberRoot==\"function\")try{Ua.onCommitFiberRoot($e,Q,void 0,(Q.current.flags&64)===64)}catch{}if(ga(v,bt()),_y)throw _y=!1,v=y2,y2=null,v;return xr&8||Tn(),null}function eM(){for(;sr!==null;){var v=sr.alternate;nd||rd===null||(sr.flags&8?De(sr,rd)&&(nd=!0,Te()):sr.tag===13&&VL(v,sr)&&De(sr,rd)&&(nd=!0,Te()));var D=sr.flags;D&256&&xy(v,sr),!(D&512)||Pf||(Pf=!0,qi(97,function(){return vu(),null})),sr=sr.nextEffect}}function vu(){if(ed!==90){var v=97<ed?97:ed;return ed=90,li(v,rM)}return!1}function tM(v,D){E2.push(D,v),Pf||(Pf=!0,qi(97,function(){return vu(),null}))}function vP(v,D){I2.push(D,v),Pf||(Pf=!0,qi(97,function(){return vu(),null}))}function rM(){if($g===null)return!1;var v=$g;if($g=null,xr&48)throw Error(c(331));var D=xr;xr|=32;var Q=I2;I2=[];for(var H=0;H<Q.length;H+=2){var V=Q[H],ne=Q[H+1],Se=V.destroy;if(V.destroy=void 0,typeof Se==\"function\")try{Se()}catch(pt){if(ne===null)throw Error(c(330));xf(ne,pt)}}for(Q=E2,E2=[],H=0;H<Q.length;H+=2){V=Q[H],ne=Q[H+1];try{var _e=V.create;V.destroy=_e()}catch(pt){if(ne===null)throw Error(c(330));xf(ne,pt)}}for(_e=v.current.firstEffect;_e!==null;)v=_e.nextEffect,_e.nextEffect=null,_e.flags&8&&(_e.sibling=null,_e.stateNode=null),_e=v;return xr=D,Tn(),!0}function SP(v,D,Q){D=Yg(Q,D),D=i2(v,D,1),bl(v,D),D=ko(),v=Gy(v,1),v!==null&&(Ha(v,1,D),ga(v,D))}function xf(v,D){if(v.tag===3)SP(v,v,D);else for(var Q=v.return;Q!==null;){if(Q.tag===3){SP(Q,v,D);break}else if(Q.tag===1){var H=Q.stateNode;if(typeof Q.type.getDerivedStateFromError==\"function\"||typeof H.componentDidCatch==\"function\"&&(hc===null||!hc.has(H))){v=Yg(D,v);var V=Jg(Q,v,1);if(bl(Q,V),V=ko(),Q=Gy(Q,1),Q!==null)Ha(Q,1,V),ga(Q,V);else if(typeof H.componentDidCatch==\"function\"&&(hc===null||!hc.has(H)))try{H.componentDidCatch(D,v)}catch{}break}}Q=Q.return}}function DP(v,D,Q){var H=v.pingCache;H!==null&&H.delete(D),D=ko(),v.pingedLanes|=v.suspendedLanes&Q,so===v&&(Ns&Q)===Q&&(ws===4||ws===3&&(Ns&62914560)===Ns&&500>bt()-d2?Oh(v,0):h2|=Q),ga(v,D)}function nM(v,D){var Q=v.stateNode;Q!==null&&Q.delete(D),D=0,D===0&&(D=v.mode,D&2?D&4?(Bu===0&&(Bu=Rh),D=kn(62914560&~Bu),D===0&&(D=4194304)):D=tr()===99?1:2:D=1),Q=ko(),v=Gy(v,D),v!==null&&(Ha(v,D,Q),ga(v,Q))}var bP;bP=function(v,D,Q){var H=D.lanes;if(v!==null)if(v.memoizedProps!==D.pendingProps||Li.current)Je=!0;else if(Q&H)Je=!!(v.flags&16384);else{switch(Je=!1,D.tag){case 3:by(D),jg();break;case 5:Ef(D);break;case 1:Kn(D.type)&&La(D);break;case 4:Ug(D,D.stateNode.containerInfo);break;case 10:Ng(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return Q&D.child.childLanes?r2(v,D,Q):(xn(di,di.current&1),D=qn(v,D,Q),D!==null?D.sibling:null);xn(di,di.current&1);break;case 19:if(H=(Q&D.childLanes)!==0,v.flags&64){if(H)return cP(v,D,Q);D.flags|=64}var V=D.memoizedState;if(V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),xn(di,di.current),H)break;return null;case 23:case 24:return D.lanes=0,mi(v,D,Q)}return qn(v,D,Q)}else Je=!1;switch(D.lanes=0,D.tag){case 2:if(H=D.type,v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,V=dn(D,Gi.current),df(D,Q),V=qg(null,D,H,v,V,Q),D.flags|=1,typeof V==\"object\"&&V!==null&&typeof V.render==\"function\"&&V.$$typeof===void 0){if(D.tag=1,D.memoizedState=null,D.updateQueue=null,Kn(H)){var ne=!0;La(D)}else ne=!1;D.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Bh(D);var Se=H.getDerivedStateFromProps;typeof Se==\"function\"&&_A(D,H,Se,v),V.updater=HA,D.stateNode=V,V._reactInternals=D,bo(D,H,v,Q),D=t2(null,D,H,!0,ne,Q)}else D.tag=0,At(null,D,V,Q),D=D.child;return D;case 16:V=D.elementType;e:{switch(v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,ne=V._init,V=ne(V._payload),D.type=V,ne=D.tag=sM(V),v=So(V,v),ne){case 0:D=JA(null,D,V,v,Q);break e;case 1:D=lP(null,D,V,v,Q);break e;case 11:D=dr(null,D,V,v,Q);break e;case 14:D=vr(null,D,V,So(V.type,v),H,Q);break e}throw Error(c(306,V,\"\"))}return D;case 0:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),JA(v,D,H,V,Q);case 1:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),lP(v,D,H,V,Q);case 3:if(by(D),H=D.updateQueue,v===null||H===null)throw Error(c(282));if(H=D.pendingProps,V=D.memoizedState,V=V!==null?V.element:null,Lg(v,D),UA(D,H,null,Q),H=D.memoizedState.element,H===V)jg(),D=qn(v,D,Q);else{if(V=D.stateNode,(ne=V.hydrate)&&(X?(Aa=cu(D.stateNode.containerInfo),Wa=D,ne=Ya=!0):ne=!1),ne){if(X&&(v=V.mutableSourceEagerHydrationData,v!=null))for(V=0;V<v.length;V+=2)ne=v[V],Se=v[V+1],y?ne._workInProgressVersionPrimary=Se:ne._workInProgressVersionSecondary=Se,mu.push(ne);for(Q=e2(D,null,H,Q),D.child=Q;Q;)Q.flags=Q.flags&-3|1024,Q=Q.sibling}else At(v,D,H,Q),jg();D=D.child}return D;case 5:return Ef(D),v===null&&Hg(D),H=D.type,V=D.pendingProps,ne=v!==null?v.memoizedProps:null,Se=V.children,it(H,V)?Se=null:ne!==null&&it(H,ne)&&(D.flags|=16),Cs(v,D),At(v,D,Se,Q),D.child;case 6:return v===null&&Hg(D),null;case 13:return r2(v,D,Q);case 4:return Ug(D,D.stateNode.containerInfo),H=D.pendingProps,v===null?D.child=Mg(D,null,H,Q):At(v,D,H,Q),D.child;case 11:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),dr(v,D,H,V,Q);case 7:return At(v,D,D.pendingProps,Q),D.child;case 8:return At(v,D,D.pendingProps.children,Q),D.child;case 12:return At(v,D,D.pendingProps.children,Q),D.child;case 10:e:{if(H=D.type._context,V=D.pendingProps,Se=D.memoizedProps,ne=V.value,Ng(D,ne),Se!==null){var _e=Se.value;if(ne=vo(_e,ne)?0:(typeof H._calculateChangedBits==\"function\"?H._calculateChangedBits(_e,ne):1073741823)|0,ne===0){if(Se.children===V.children&&!Li.current){D=qn(v,D,Q);break e}}else for(_e=D.child,_e!==null&&(_e.return=D);_e!==null;){var pt=_e.dependencies;if(pt!==null){Se=_e.child;for(var Wt=pt.firstContext;Wt!==null;){if(Wt.context===H&&Wt.observedBits&ne){_e.tag===1&&(Wt=Dl(-1,Q&-Q),Wt.tag=2,bl(_e,Wt)),_e.lanes|=Q,Wt=_e.alternate,Wt!==null&&(Wt.lanes|=Q),Ey(_e.return,Q),pt.lanes|=Q;break}Wt=Wt.next}}else Se=_e.tag===10&&_e.type===D.type?null:_e.child;if(Se!==null)Se.return=_e;else for(Se=_e;Se!==null;){if(Se===D){Se=null;break}if(_e=Se.sibling,_e!==null){_e.return=Se.return,Se=_e;break}Se=Se.return}_e=Se}}At(v,D,V.children,Q),D=D.child}return D;case 9:return V=D.type,ne=D.pendingProps,H=ne.children,df(D,Q),V=Do(V,ne.unstable_observedBits),H=H(V),D.flags|=1,At(v,D,H,Q),D.child;case 14:return V=D.type,ne=So(V,D.pendingProps),ne=So(V.type,ne),vr(v,D,V,ne,H,Q);case 15:return Un(v,D,D.type,D.pendingProps,H,Q);case 17:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),D.tag=1,Kn(H)?(v=!0,La(D)):v=!1,df(D,Q),xt(D,H,V),bo(D,H,V,Q),t2(null,D,H,!0,v,Q);case 19:return cP(v,D,Q);case 23:return mi(v,D,Q);case 24:return mi(v,D,Q)}throw Error(c(156,D.tag))};var Wy={current:!1},Os=n.unstable_flushAllWithoutAsserting,PP=typeof Os==\"function\";function v2(){if(Os!==void 0)return Os();for(var v=!1;vu();)v=!0;return v}function da(v){try{v2(),JL(function(){v2()?da(v):v()})}catch(D){v(D)}}var Ja=0,Yy=!1;function iM(v,D,Q,H){this.tag=v,this.key=Q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=H,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ka(v,D,Q,H){return new iM(v,D,Q,H)}function S2(v){return v=v.prototype,!(!v||!v.isReactComponent)}function sM(v){if(typeof v==\"function\")return S2(v)?1:0;if(v!=null){if(v=v.$$typeof,v===R)return 11;if(v===W)return 14}return 2}function Su(v,D){var Q=v.alternate;return Q===null?(Q=Ka(v.tag,D,v.key,v.mode),Q.elementType=v.elementType,Q.type=v.type,Q.stateNode=v.stateNode,Q.alternate=v,v.alternate=Q):(Q.pendingProps=D,Q.type=v.type,Q.flags=0,Q.nextEffect=null,Q.firstEffect=null,Q.lastEffect=null),Q.childLanes=v.childLanes,Q.lanes=v.lanes,Q.child=v.child,Q.memoizedProps=v.memoizedProps,Q.memoizedState=v.memoizedState,Q.updateQueue=v.updateQueue,D=v.dependencies,Q.dependencies=D===null?null:{lanes:D.lanes,firstContext:D.firstContext},Q.sibling=v.sibling,Q.index=v.index,Q.ref=v.ref,Q}function sd(v,D,Q,H,V,ne){var Se=2;if(H=v,typeof v==\"function\")S2(v)&&(Se=1);else if(typeof v==\"string\")Se=5;else e:switch(v){case E:return kf(Q.children,V,ne,D);case ue:Se=8,V|=16;break;case C:Se=8,V|=1;break;case S:return v=Ka(12,Q,D,V|8),v.elementType=S,v.type=S,v.lanes=ne,v;case N:return v=Ka(13,Q,D,V),v.type=N,v.elementType=N,v.lanes=ne,v;case U:return v=Ka(19,Q,D,V),v.elementType=U,v.lanes=ne,v;case le:return D2(Q,V,ne,D);case me:return v=Ka(24,Q,D,V),v.elementType=me,v.lanes=ne,v;default:if(typeof v==\"object\"&&v!==null)switch(v.$$typeof){case P:Se=10;break e;case I:Se=9;break e;case R:Se=11;break e;case W:Se=14;break e;case ee:Se=16,H=null;break e;case ie:Se=22;break e}throw Error(c(130,v==null?v:typeof v,\"\"))}return D=Ka(Se,Q,D,V),D.elementType=v,D.type=H,D.lanes=ne,D}function kf(v,D,Q,H){return v=Ka(7,v,H,D),v.lanes=Q,v}function D2(v,D,Q,H){return v=Ka(23,v,H,D),v.elementType=le,v.lanes=Q,v}function b2(v,D,Q){return v=Ka(6,v,null,D),v.lanes=Q,v}function Qo(v,D,Q){return D=Ka(4,v.children!==null?v.children:[],v.key,D),D.lanes=Q,D.stateNode={containerInfo:v.containerInfo,pendingChildren:null,implementation:v.implementation},D}function oM(v,D,Q){this.tag=D,this.containerInfo=v,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=b,this.pendingContext=this.context=null,this.hydrate=Q,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),X&&(this.mutableSourceEagerHydrationData=null)}function xP(v){var D=v._reactInternals;if(D===void 0)throw typeof v.render==\"function\"?Error(c(188)):Error(c(268,Object.keys(v)));return v=se(D),v===null?null:v.stateNode}function kP(v,D){if(v=v.memoizedState,v!==null&&v.dehydrated!==null){var Q=v.retryLane;v.retryLane=Q!==0&&Q<D?Q:D}}function Vy(v,D){kP(v,D),(v=v.alternate)&&kP(v,D)}function aM(v){return v=se(v),v===null?null:v.stateNode}function lM(){return null}return r.IsThisRendererActing=Wy,r.act=function(v){function D(){Ja--,A2.current=Q,Wy.current=H}Yy===!1&&(Yy=!0,console.error(\"act(...) is not supported in production builds of React, and might not behave as expected.\")),Ja++;var Q=A2.current,H=Wy.current;A2.current=!0,Wy.current=!0;try{var V=yP(v)}catch(ne){throw D(),ne}if(V!==null&&typeof V==\"object\"&&typeof V.then==\"function\")return{then:function(ne,Se){V.then(function(){1<Ja||PP===!0&&Q===!0?(D(),ne()):da(function(_e){D(),_e?Se(_e):ne()})},function(_e){D(),Se(_e)})}};try{Ja!==1||PP!==!1&&Q!==!1||v2(),D()}catch(ne){throw D(),ne}return{then:function(ne){ne()}}},r.attemptContinuousHydration=function(v){if(v.tag===13){var D=ko();Tl(v,67108864,D),Vy(v,67108864)}},r.attemptHydrationAtCurrentPriority=function(v){if(v.tag===13){var D=ko(),Q=Bs(v);Tl(v,Q,D),Vy(v,Q)}},r.attemptSynchronousHydration=function(v){switch(v.tag){case 3:var D=v.stateNode;if(D.hydrate){var Q=ca(D.pendingLanes);D.expiredLanes|=Q&D.pendingLanes,ga(D,bt()),!(xr&48)&&(bf(),Tn())}break;case 13:var H=ko();EP(function(){return Tl(v,1,H)}),Vy(v,4)}},r.attemptUserBlockingHydration=function(v){if(v.tag===13){var D=ko();Tl(v,4,D),Vy(v,4)}},r.batchedEventUpdates=function(v,D){var Q=xr;xr|=2;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}},r.batchedUpdates=yP,r.createComponentSelector=function(v){return{$$typeof:Ty,value:v}},r.createContainer=function(v,D,Q){return v=new oM(v,D,Q),D=Ka(3,null,null,D===2?7:D===1?3:0),v.current=D,D.stateNode=v,Bh(D),v},r.createHasPsuedoClassSelector=function(v){return{$$typeof:Ry,value:v}},r.createPortal=function(v,D,Q){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:H==null?null:\"\"+H,children:v,containerInfo:D,implementation:Q}},r.createRoleSelector=function(v){return{$$typeof:Fy,value:v}},r.createTestNameSelector=function(v){return{$$typeof:zg,value:v}},r.createTextSelector=function(v){return{$$typeof:Ny,value:v}},r.deferredUpdates=function(v){return li(97,v)},r.discreteUpdates=function(v,D,Q,H,V){var ne=xr;xr|=4;try{return li(98,v.bind(null,D,Q,H,V))}finally{xr=ne,xr===0&&(bf(),Tn())}},r.findAllNodes=u2,r.findBoundingRects=function(v,D){if(!qt)throw Error(c(363));D=u2(v,D),v=[];for(var Q=0;Q<D.length;Q++)v.push(Pt(D[Q]));for(D=v.length-1;0<D;D--){Q=v[D];for(var H=Q.x,V=H+Q.width,ne=Q.y,Se=ne+Q.height,_e=D-1;0<=_e;_e--)if(D!==_e){var pt=v[_e],Wt=pt.x,Sr=Wt+pt.width,Lr=pt.y,Zt=Lr+pt.height;if(H>=Wt&&ne>=Lr&&V<=Sr&&Se<=Zt){v.splice(D,1);break}else if(H!==Wt||Q.width!==pt.width||Zt<ne||Lr>Se){if(!(ne!==Lr||Q.height!==pt.height||Sr<H||Wt>V)){Wt>H&&(pt.width+=Wt-H,pt.x=H),Sr<V&&(pt.width=V-Wt),v.splice(D,1);break}}else{Lr>ne&&(pt.height+=Lr-ne,pt.y=ne),Zt<Se&&(pt.height=Se-Lr),v.splice(D,1);break}}}return v},r.findHostInstance=xP,r.findHostInstanceWithNoPortals=function(v){return v=Z(v),v===null?null:v.tag===20?v.stateNode.instance:v.stateNode},r.findHostInstanceWithWarning=function(v){return xP(v)},r.flushControlled=function(v){var D=xr;xr|=1;try{li(99,v)}finally{xr=D,xr===0&&(bf(),Tn())}},r.flushDiscreteUpdates=function(){!(xr&49)&&(zL(),vu())},r.flushPassiveEffects=vu,r.flushSync=EP,r.focusWithin=function(v,D){if(!qt)throw Error(c(363));for(v=Oy(v),D=c2(v,D),D=Array.from(D),v=0;v<D.length;){var Q=D[v++];if(!Pr(Q)){if(Q.tag===5&&Or(Q.stateNode))return!0;for(Q=Q.child;Q!==null;)D.push(Q),Q=Q.sibling}}return!1},r.getCurrentUpdateLanePriority=function(){return lc},r.getFindAllNodesFailureDescription=function(v,D){if(!qt)throw Error(c(363));var Q=0,H=[];v=[Oy(v),0];for(var V=0;V<v.length;){var ne=v[V++],Se=v[V++],_e=D[Se];if((ne.tag!==5||!Pr(ne))&&(Sf(ne,_e)&&(H.push(Df(_e)),Se++,Se>Q&&(Q=Se)),Se<D.length))for(ne=ne.child;ne!==null;)v.push(ne,Se),ne=ne.sibling}if(Q<D.length){for(v=[];Q<D.length;Q++)v.push(Df(D[Q]));return`findAllNodes was able to match part of the selector:\n  `+(H.join(\" > \")+`\n\nNo matching component was found for:\n  `)+v.join(\" > \")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:aM,findFiberByHostInstance:v.findFiberByHostInstance||lM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{$e=D.inject(v),Ua=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=u2(v,D);var V=on(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=lc;try{return lc=v,D()}finally{lc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=ko(),Se=Bs(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var _e=Q;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(Kn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(c(171))}if(Q.tag===1){var pt=Q.type;if(Kn(pt)){Q=Oa(Q,pt,_e);break e}}Q=_e}else Q=la;return D.context===null?D.context=Q:D.pendingContext=Q,D=Dl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),bl(V,D),Tl(V,Se,ne),Se},r}});var Swe=_((vKt,vwe)=>{\"use strict\";vwe.exports=Bwe()});var bwe=_((SKt,Dwe)=>{\"use strict\";var Spt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};Dwe.exports=Spt});var Qwe=_((DKt,kwe)=>{\"use strict\";var Dpt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},FF=function(){function t(e,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,s){return r&&t(e.prototype,r),s&&t(e,s),e}}();function V9(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J9(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}var tf=bwe(),bpt=function(){function t(e,r,s,a,n,c){J9(this,t),this.left=e,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return FF(t,[{key:\"fromJS\",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:\"toString\",value:function(){return\"<Layout#\"+this.left+\":\"+this.right+\";\"+this.top+\":\"+this.bottom+\";\"+this.width+\":\"+this.height+\">\"}}]),t}(),Pwe=function(){FF(t,null,[{key:\"fromJS\",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){J9(this,t),this.width=e,this.height=r}return FF(t,[{key:\"fromJS\",value:function(r){r(this.width,this.height)}},{key:\"toString\",value:function(){return\"<Size#\"+this.width+\"x\"+this.height+\">\"}}]),t}(),xwe=function(){function t(e,r){J9(this,t),this.unit=e,this.value=r}return FF(t,[{key:\"fromJS\",value:function(r){r(this.unit,this.value)}},{key:\"toString\",value:function(){switch(this.unit){case tf.UNIT_POINT:return String(this.value);case tf.UNIT_PERCENT:return this.value+\"%\";case tf.UNIT_AUTO:return\"auto\";default:return this.value+\"?\"}}},{key:\"valueOf\",value:function(){return this.value}}]),t}();kwe.exports=function(t,e){function r(c,f,p){var h=c[f];c[f]=function(){for(var E=arguments.length,C=Array(E),S=0;S<E;S++)C[S]=arguments[S];return p.call.apply(p,[this,h].concat(C))}}for(var s=[\"setPosition\",\"setMargin\",\"setFlexBasis\",\"setWidth\",\"setHeight\",\"setMinWidth\",\"setMinHeight\",\"setMaxWidth\",\"setMaxHeight\",\"setPadding\"],a=function(){var f,p=s[n],h=(f={},V9(f,tf.UNIT_POINT,e.Node.prototype[p]),V9(f,tf.UNIT_PERCENT,e.Node.prototype[p+\"Percent\"]),V9(f,tf.UNIT_AUTO,e.Node.prototype[p+\"Auto\"]),f);r(e.Node.prototype,p,function(E){for(var C=arguments.length,S=Array(C>1?C-1:0),P=1;P<C;P++)S[P-1]=arguments[P];var I=S.pop(),R=void 0,N=void 0;if(I===\"auto\")R=tf.UNIT_AUTO,N=void 0;else if(I instanceof xwe)R=I.unit,N=I.valueOf();else if(R=typeof I==\"string\"&&I.endsWith(\"%\")?tf.UNIT_PERCENT:tf.UNIT_POINT,N=parseFloat(I),!Number.isNaN(I)&&Number.isNaN(N))throw new Error(\"Invalid value \"+I+\" for \"+p);if(!h[R])throw new Error('Failed to execute \"'+p+`\": Unsupported unit '`+I+\"'\");if(N!==void 0){var U;return(U=h[R]).call.apply(U,[this].concat(S,[N]))}else{var W;return(W=h[R]).call.apply(W,[this].concat(S))}})},n=0;n<s.length;n++)a();return r(e.Config.prototype,\"free\",function(){e.Config.destroy(this)}),r(e.Node,\"create\",function(c,f){return f?e.Node.createWithConfig(f):e.Node.createDefault()}),r(e.Node.prototype,\"free\",function(){e.Node.destroy(this)}),r(e.Node.prototype,\"freeRecursive\",function(){for(var c=0,f=this.getChildCount();c<f;++c)this.getChild(0).freeRecursive();this.free()}),r(e.Node.prototype,\"setMeasureFunc\",function(c,f){return f?c.call(this,function(){return Pwe.fromJS(f.apply(void 0,arguments))}):this.unsetMeasureFunc()}),r(e.Node.prototype,\"calculateLayout\",function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tf.DIRECTION_LTR;return c.call(this,f,p,h)}),Dpt({Config:e.Config,Node:e.Node,Layout:t(\"Layout\",bpt),Size:t(\"Size\",Pwe),Value:t(\"Value\",xwe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},tf)}});var Twe=_((exports,module)=>{(function(t,e){typeof define==\"function\"&&define.amd?define([],function(){return e}):typeof module==\"object\"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module==\"function\"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall(\"nbind_init\")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<\"u\"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT===\"WEB\")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT===\"WORKER\")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT===\"NODE\")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT===\"SHELL\")ENVIRONMENT_IS_SHELL=!0;else throw new Error(\"The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.\");else ENVIRONMENT_IS_WEB=typeof window==\"object\",ENVIRONMENT_IS_WORKER=typeof importScripts==\"function\",ENVIRONMENT_IS_NODE=typeof process==\"object\"&&typeof Ie==\"function\"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}(\"\")),nodePath||(nodePath={}(\"\")),e=nodePath.normalize(e);var s=nodeFS.readFileSync(e);return r?s:s.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\\\/g,\"/\"):Module.thisProgram=\"unknown-program\"),Module.arguments=process.argv.slice(2),typeof module<\"u\"&&(module.exports=Module),Module.inspect=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<\"u\"&&(Module.printErr=printErr),typeof read<\"u\"?Module.read=read:Module.read=function(){throw\"no read() available\"},Module.readBinary=function(e){if(typeof readbuffer==\"function\")return new Uint8Array(readbuffer(e));var r=read(e,\"binary\");return assert(typeof r==\"object\"),r},typeof scriptArgs<\"u\"?Module.arguments=scriptArgs:typeof arguments<\"u\"&&(Module.arguments=arguments),typeof quit==\"function\"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.responseType=\"arraybuffer\",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,s){var a=new XMLHttpRequest;a.open(\"GET\",e,!0),a.responseType=\"arraybuffer\",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):s()},a.onerror=s,a.send(null)},typeof arguments<\"u\"&&(Module.arguments=arguments),typeof console<\"u\")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<\"u\"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>\"u\"&&(Module.setWindowTitle=function(t){document.title=t})}else throw\"Unknown runtime environment. Where are we?\";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram=\"./this.program\"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case\"i1\":case\"i8\":return 1;case\"i16\":return 2;case\"i32\":return 4;case\"i64\":return 8;case\"float\":return 4;case\"double\":return 8;default:{if(t[t.length-1]===\"*\")return Runtime.QUANTUM_SIZE;if(t[0]===\"i\"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e===\"double\"||e===\"i64\"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t==\"i64\"||t==\"double\")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module[\"dynCall_\"+t].apply(null,[e].concat(r)):Module[\"dynCall_\"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e<Runtime.functionPointers.length;e++)if(!Runtime.functionPointers[e])return Runtime.functionPointers[e]=t,2*(1+e);throw\"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.\"},removeFunction:function(t){Runtime.functionPointers[(t-2)/2]=null},warnOnce:function(t){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[t]||(Runtime.warnOnce.shown[t]=1,Module.printErr(t))},funcWrappers:{},getFuncWrapper:function(t,e){if(t){assert(e),Runtime.funcWrappers[e]||(Runtime.funcWrappers[e]={});var r=Runtime.funcWrappers[e];return r[t]||(e.length===1?r[t]=function(){return Runtime.dynCall(e,t)}:e.length===2?r[t]=function(a){return Runtime.dynCall(e,t,[a])}:r[t]=function(){return Runtime.dynCall(e,t,Array.prototype.slice.call(arguments))}),r[t]}},getCompilerSetting:function(t){throw\"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work\"},stackAlloc:function(t){var e=STACKTOP;return STACKTOP=STACKTOP+t|0,STACKTOP=STACKTOP+15&-16,e},staticAlloc:function(t){var e=STATICTOP;return STATICTOP=STATICTOP+t|0,STATICTOP=STATICTOP+15&-16,e},dynamicAlloc:function(t){var e=HEAP32[DYNAMICTOP_PTR>>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var s=enlargeMemory();if(!s)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var s=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return s},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort(\"Assertion failed: \"+e)}function getCFunc(ident){var func=Module[\"_\"+ident];if(!func)try{func=eval(\"_\"+ident)}catch(t){}return assert(func,\"Cannot call unknown function \"+ident+\" (perhaps LLVM optimizations or closure removed it?)\"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,s,a,n){var c=getCFunc(e),f=[],p=0;if(a)for(var h=0;h<a.length;h++){var E=toC[s[h]];E?(p===0&&(p=Runtime.stackSave()),f[h]=E(a[h])):f[h]=a[h]}var C=c.apply(null,f);if(r===\"string\"&&(C=Pointer_stringify(C)),p!==0){if(n&&n.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(p)});return}Runtime.stackRestore(p)}return C};var sourceRegex=/^function\\s*[a-zA-Z$_0-9]*\\s*\\(([^)]*)\\)\\s*{\\s*([^*]*?)[\\s;]*(?:return\\s*(.*?)[;\\s]*)?}$/;function parseJSFunc(t){var e=t.toString().match(sourceRegex).slice(1);return{arguments:e[0],body:e[1],returnValue:e[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var t in JSfuncs)JSfuncs.hasOwnProperty(t)&&(JSsource[t]=parseJSFunc(JSfuncs[t]))}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(t){return t===\"number\"}),numericRet=returnType!==\"string\";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(t,e){return\"$\"+e}),funcstr=\"(function(\"+argNames.join(\",\")+\") {\",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+=\"var stack = \"+JSsource.stackSave.body+\";\";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type!==\"number\"){var convertCode=JSsource[type+\"ToC\"];funcstr+=\"var \"+convertCode.arguments+\" = \"+arg+\";\",funcstr+=convertCode.body+\";\",funcstr+=arg+\"=(\"+convertCode.returnValue+\");\"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+=\"var ret = \"+cfuncname+\"(\"+argNames.join(\",\")+\");\",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+=\"ret = \"+strgfy+\"(ret);\"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace(\"()\",\"(stack)\")+\";\"),funcstr+=\"return ret})\",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap;function setValue(t,e,r,s){switch(r=r||\"i8\",r.charAt(r.length-1)===\"*\"&&(r=\"i32\"),r){case\"i1\":HEAP8[t>>0]=e;break;case\"i8\":HEAP8[t>>0]=e;break;case\"i16\":HEAP16[t>>1]=e;break;case\"i32\":HEAP32[t>>2]=e;break;case\"i64\":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case\"float\":HEAPF32[t>>2]=e;break;case\"double\":HEAPF64[t>>3]=e;break;default:abort(\"invalid type for setValue: \"+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||\"i8\",e.charAt(e.length-1)===\"*\"&&(e=\"i32\"),e){case\"i1\":return HEAP8[t>>0];case\"i8\":return HEAP8[t>>0];case\"i16\":return HEAP16[t>>1];case\"i32\":return HEAP32[t>>2];case\"i64\":return HEAP32[t>>2];case\"float\":return HEAPF32[t>>2];case\"double\":return HEAPF64[t>>3];default:abort(\"invalid type for setValue: \"+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,s){var a,n;typeof t==\"number\"?(a=!0,n=t):(a=!1,n=t.length);var c=typeof e==\"string\"?e:null,f;if(r==ALLOC_NONE?f=s:f=[typeof _malloc==\"function\"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,c?1:e.length)),a){var s=f,p;for(assert((f&3)==0),p=f+(n&-4);s<p;s+=4)HEAP32[s>>2]=0;for(p=f+n;s<p;)HEAP8[s++>>0]=0;return f}if(c===\"i8\")return t.subarray||t.slice?HEAPU8.set(t,f):HEAPU8.set(new Uint8Array(t),f),f;for(var h=0,E,C,S;h<n;){var P=t[h];if(typeof P==\"function\"&&(P=Runtime.getFunctionIndex(P)),E=c||e[h],E===0){h++;continue}E==\"i64\"&&(E=\"i32\"),setValue(f+h,P,E),S!==E&&(C=Runtime.getNativeTypeSize(E),S=E),h+=C}return f}Module.allocate=allocate;function getMemory(t){return staticSealed?runtimeInitialized?_malloc(t):Runtime.dynamicAlloc(t):Runtime.staticAlloc(t)}Module.getMemory=getMemory;function Pointer_stringify(t,e){if(e===0||!t)return\"\";for(var r=0,s,a=0;s=HEAPU8[t+a>>0],r|=s,!(s==0&&!e||(a++,e&&a==e)););e||(e=a);var n=\"\";if(r<128){for(var c=1024,f;e>0;)f=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,c))),n=n?n+f:f,t+=c,e-=c;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e=\"\";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf8\"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var s,a,n,c,f,p,h=\"\";;){if(s=t[e++],!s)return h;if(!(s&128)){h+=String.fromCharCode(s);continue}if(a=t[e++]&63,(s&224)==192){h+=String.fromCharCode((s&31)<<6|a);continue}if(n=t[e++]&63,(s&240)==224?s=(s&15)<<12|a<<6|n:(c=t[e++]&63,(s&248)==240?s=(s&7)<<18|a<<12|n<<6|c:(f=t[e++]&63,(s&252)==248?s=(s&3)<<24|a<<18|n<<12|c<<6|f:(p=t[e++]&63,s=(s&1)<<30|a<<24|n<<18|c<<12|f<<6|p))),s<65536)h+=String.fromCharCode(s);else{var E=s-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,s){if(!(s>0))return 0;for(var a=r,n=r+s-1,c=0;c<t.length;++c){var f=t.charCodeAt(c);if(f>=55296&&f<=57343&&(f=65536+((f&1023)<<10)|t.charCodeAt(++c)&1023),f<=127){if(r>=n)break;e[r++]=f}else if(f<=2047){if(r+1>=n)break;e[r++]=192|f>>6,e[r++]=128|f&63}else if(f<=65535){if(r+2>=n)break;e[r++]=224|f>>12,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=2097151){if(r+3>=n)break;e[r++]=240|f>>18,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=67108863){if(r+4>=n)break;e[r++]=248|f>>24,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else{if(r+5>=n)break;e[r++]=252|f>>30,e[r++]=128|f>>24&63,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r<t.length;++r){var s=t.charCodeAt(r);s>=55296&&s<=57343&&(s=65536+((s&1023)<<10)|t.charCodeAt(++r)&1023),s<=127?++e:s<=2047?e+=2:s<=65535?e+=3:s<=2097151?e+=4:s<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf-16le\"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),s=lengthBytesUTF8(r)+1,a=_malloc(s);stringToUTF8(r,a,s);var n=_malloc(4),c=e(a,0,0,n);if(getValue(n,\"i32\")===0&&c)return Pointer_stringify(c)}catch{}finally{a&&_free(a),n&&_free(n),c&&_free(c)}return t}return Runtime.warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\"),t}function demangleAll(t){var e=/__Z[\\w\\d_]+/g;return t.replace(e,function(r){var s=demangle(r);return r===s?r:r+\" [\"+s+\"]\"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return\"(no stack trace available)\"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=`\n`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort(\"Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value \"+TOTAL_MEMORY+\", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 \")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr(\"TOTAL_MEMORY should be larger than TOTAL_STACK, was \"+TOTAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw\"Runtime error: expected the system to be little-endian!\";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e==\"function\"){e();continue}var r=e.func;typeof r==\"number\"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun==\"function\"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun==\"function\"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join(\"\")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce(\"writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!\");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s<t.length;++s)HEAP8[e++>>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,s,a,n,c,f){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,s,a,n,c,f){return ASM_CONSTS[t](e,r,s,a,n,c,f)}function _emscripten_asm_const_iiiii(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiidddddd(t,e,r,s,a,n,c,f,p){return ASM_CONSTS[t](e,r,s,a,n,c,f,p)}function _emscripten_asm_const_iiididi(t,e,r,s,a,n,c){return ASM_CONSTS[t](e,r,s,a,n,c)}function _emscripten_asm_const_iiii(t,e,r,s){return ASM_CONSTS[t](e,r,s)}function _emscripten_asm_const_iiiid(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiiiii(t,e,r,s,a,n){return ASM_CONSTS[t](e,r,s,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],\"i8\",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr(\"missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj\"),abort(-1)}function __decorate(t,e,r,s){var a=arguments.length,n=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,c;if(typeof Reflect==\"object\"&&typeof Reflect.decorate==\"function\")n=Reflect.decorate(t,e,r,s);else for(var f=t.length-1;f>=0;f--)(c=t[f])&&(n=(a<3?c(n):a>3?c(e,r,n):c(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,s){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=s/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,\"cbFunction &\":_nbind.CallbackType,\"const cbFunction &\":_nbind.CallbackType,\"const std::string &\":_nbind.StringType,\"std::string\":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:\"\"});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var c=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method=\"timeout\";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method=\"rAF\";else if(t==2){if(!window.setImmediate){let n=function(c){c.source===window&&c.data===s&&(c.stopPropagation(),r.shift()())};var a=n,r=[],s=\"setimmediate\";window.addEventListener(\"message\",n,!0),window.setImmediate=function(f){r.push(f),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(f),window.postMessage({target:s})):window.postMessage(s,\"*\")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method=\"immediate\"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,s,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\"),Browser.mainLoop.func=t,Browser.mainLoop.arg=s;var n;typeof s<\"u\"?n=function(){Module.dynCall_vi(t,s)}:n=function(){Module.dynCall_v(t)};var c=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,C=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=C:(C=C+.5,Browser.mainLoop.remainingBlockers=(8*E+C)/9)}if(console.log('main loop blocker \"'+h.name+'\" took '+(Date.now()-p)+\" ms\"),Browser.mainLoop.updateStatus(),c<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(!(c<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method===\"timeout\"&&Module.ctx&&(Module.printErr(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\"),Browser.mainLoop.method=\"\"),Browser.mainLoop.runIter(n),!(c<Browser.mainLoop.currentlyRunningMainloop)&&(typeof SDL==\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},a||(e&&e>0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw\"SimulateInfiniteLoop\"}var Browser={mainLoop:{scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||\"Please wait...\",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e<r?Module.setStatus(t+\" (\"+(r-e)+\"/\"+r+\")\"):Module.setStatus(t):Module.setStatus(\"\")}},runIter:function(t){if(!ABORT){if(Module.preMainLoop){var e=Module.preMainLoop();if(e===!1)return}try{t()}catch(r){if(r instanceof ExitStatus)return;throw r&&typeof r==\"object\"&&r.stack&&Module.printErr(\"exception thrown: \"+[r,r.stack]),r}Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),Browser.initted)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch{Browser.hasBlobConstructor=!1,console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder<\"u\"?MozBlobBuilder:typeof WebKitBlobBuilder<\"u\"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log(\"warning: no BlobBuilder\"),Browser.URLObject=typeof window<\"u\"?window.URL?window.URL:window.webkitURL:void 0,!Module.noImageDecoding&&typeof Browser.URLObject>\"u\"&&(console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\"),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,c,f,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(c)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(c)}))}catch(P){Runtime.warnOnce(\"Blob constructor present but fails: \"+P+\"; falling back to blob builder\")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var C=Browser.URLObject.createObjectURL(h),S=new Image;S.onload=function(){assert(S.complete,\"Image \"+c+\" could not be decoded\");var I=document.createElement(\"canvas\");I.width=S.width,I.height=S.height;var R=I.getContext(\"2d\");R.drawImage(S,0,0),Module.preloadedImages[c]=I,Browser.URLObject.revokeObjectURL(C),f&&f(n)},S.onerror=function(I){console.log(\"Image \"+C+\" could not be decoded\"),p&&p()},S.src=C},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}},e.handle=function(n,c,f,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[c]=R,f&&f(n))}function C(){h||(h=!0,Module.preloadedAudios[c]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var S=new Blob([n],{type:Browser.getMimetype(c)})}catch{return C()}var P=Browser.URLObject.createObjectURL(S),I=new Audio;I.addEventListener(\"canplaythrough\",function(){E(I)},!1),I.onerror=function(N){if(h)return;console.log(\"warning: browser could not fully decode audio \"+c+\", trying slower base64 approach\");function U(W){for(var ee=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",ie=\"=\",ue=\"\",le=0,me=0,pe=0;pe<W.length;pe++)for(le=le<<8|W[pe],me+=8;me>=6;){var Be=le>>me-6&63;me-=6,ue+=ee[Be]}return me==2?(ue+=ee[(le&3)<<4],ue+=ie+ie):me==4&&(ue+=ee[(le&15)<<2],ue+=ie),ue}I.src=\"data:audio/x-\"+c.substr(-3)+\";base64,\"+U(n),E(I)},I.src=P,Browser.safeSetTimeout(function(){E(I)},1e4)}else return C()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var s=Module.canvas;s&&(s.requestPointerLock=s.requestPointerLock||s.mozRequestPointerLock||s.webkitRequestPointerLock||s.msRequestPointerLock||function(){},s.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},s.exitPointerLock=s.exitPointerLock.bind(document),document.addEventListener(\"pointerlockchange\",r,!1),document.addEventListener(\"mozpointerlockchange\",r,!1),document.addEventListener(\"webkitpointerlockchange\",r,!1),document.addEventListener(\"mspointerlockchange\",r,!1),Module.elementPointerLock&&s.addEventListener(\"click\",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,s){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var c={antialias:!1,alpha:!1};if(s)for(var f in s)c[f]=s[f];n=GL.createContext(t,c),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext(\"2d\");return a?(r&&(e||assert(typeof GLctx>\"u\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>\"u\"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>\"u\"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>\"u\"&&(Browser.vrDevice=null);var s=Module.canvas;function a(){Browser.isFullscreen=!1;var c=s.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===c?(s.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},s.exitFullscreen=s.exitFullscreen.bind(document),Browser.lockPointer&&s.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(s)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener(\"fullscreenchange\",a,!1),document.addEventListener(\"mozfullscreenchange\",a,!1),document.addEventListener(\"webkitfullscreenchange\",a,!1),document.addEventListener(\"MSFullscreenChange\",a,!1));var n=document.createElement(\"div\");s.parentNode.insertBefore(n,s),n.appendChild(s),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr(\"Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.\"),Browser.requestFullScreen=function(s,a,n){return Browser.requestFullscreen(s,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>\"u\"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:\"image/jpeg\",jpeg:\"image/jpeg\",png:\"image/png\",bmp:\"image/bmp\",ogg:\"audio/ogg\",wav:\"audio/wav\",mp3:\"audio/mpeg\"}[t.substr(t.lastIndexOf(\".\")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case\"DOMMouseScroll\":e=t.detail;break;case\"mousewheel\":e=t.wheelDelta;break;case\"wheel\":e=t.deltaY;break;default:throw\"unrecognized mouse wheel event: \"+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!=\"mousemove\"&&\"mozMovementX\"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<\"u\"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,s=Module.canvas.height,a=typeof window.scrollX<\"u\"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<\"u\"?window.scrollY:window.pageYOffset;if(t.type===\"touchstart\"||t.type===\"touchend\"||t.type===\"touchmove\"){var c=t.touch;if(c===void 0)return;var f=c.pageX-(a+e.left),p=c.pageY-(n+e.top);f=f*(r/e.width),p=p*(s/e.height);var h={x:f,y:p};if(t.type===\"touchstart\")Browser.lastTouches[c.identifier]=h,Browser.touches[c.identifier]=h;else if(t.type===\"touchend\"||t.type===\"touchmove\"){var E=Browser.touches[c.identifier];E||(E=h),Browser.lastTouches[c.identifier]=E,Browser.touches[c.identifier]=h}return}var C=t.pageX-(a+e.left),S=t.pageY-(n+e.top);C=C*(r/e.width),S=S*(s/e.height),Browser.mouseMovementX=C-Browser.mouseX,Browser.mouseMovementY=S-Browser.mouseY,Browser.mouseX=C,Browser.mouseY=S}},asyncLoad:function(t,e,r,s){var a=s?\"\":\"al \"+t;Module.readAsync(t,function(n){assert(n,'Loading data file \"'+t+'\" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file \"'+t+'\" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var s=Module.canvas;Browser.updateCanvasDimensions(s,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var s=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(s/a<Module.forcedAspectRatio?s=Math.round(a*Module.forcedAspectRatio):a=Math.round(s/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen<\"u\"){var n=Math.min(screen.width/s,screen.height/a);s=Math.round(s*n),a=Math.round(a*n)}Browser.resizeCanvas?(t.width!=s&&(t.width=s),t.height!=a&&(t.height=a),typeof t.style<\"u\"&&(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))):(t.width!=e&&(t.width=e),t.height!=r&&(t.height=r),typeof t.style<\"u\"&&(s!=e||a!=r?(t.style.setProperty(\"width\",s+\"px\",\"important\"),t.style.setProperty(\"height\",a+\"px\",\"important\")):(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var t=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,t}},SYSCALLS={varargs:0,get:function(t){SYSCALLS.varargs+=4;var e=HEAP32[SYSCALLS.varargs-4>>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(s){return(typeof FS>\"u\"||!(s instanceof FS.ErrnoError))&&abort(s),-s.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>\"u\"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,\"X\"],[1,1,\"const X\"],[128,1,\"X *\"],[256,1,\"X &\"],[384,1,\"X &&\"],[512,1,\"std::shared_ptr<X>\"],[640,1,\"std::unique_ptr<X>\"],[5120,1,\"std::vector<X>\"],[6144,2,\"std::array<X, Y>\"],[9216,-1,\"std::function<X (Y)>\"]];function r(p,h,E,C,S,P){if(h==1){var I=C&896;(I==128||I==256||I==384)&&(p=\"X const\")}var R;return P?R=E.replace(\"X\",p).replace(\"Y\",S):R=p.replace(\"X\",E).replace(\"Y\",S),R.replace(/([*&]) (?=[*&])/g,\"$1\")}function s(p,h,E,C,S){throw new Error(p+\" type \"+E.replace(\"X\",h+\"?\")+(C?\" with flag \"+C:\"\")+\" in \"+S)}function a(p,h,E,C,S,P,I,R){P===void 0&&(P=\"X\"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=C(p),W=U.placeholderFlag,ee=e[W];I&&ee&&(P=r(I[2],I[0],P,ee[0],\"?\",!0));var ie;W==0&&(ie=\"Unbound\"),W>=10&&(ie=\"Corrupt\"),R>20&&(ie=\"Deeply nested\"),ie&&s(ie,p,P,W,S||\"?\");var ue=U.paramList[0],le=a(ue,h,E,C,S,P,ee,R+1),me,pe={flags:ee[0],id:p,name:\"\",paramList:[le]},Be=[],Ce=\"?\";switch(U.placeholderFlag){case 1:me=le.spec;break;case 2:if((le.flags&15360)==1024&&le.spec.ptrSize==1){pe.flags=7168;break}case 3:case 6:case 5:me=le.spec,le.flags&15360;break;case 8:Ce=\"\"+U.paramList[1],pe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g<we.length;g++){var ye=we[g],Ae=a(ye,h,E,C,S,P,ee,R+1);Be.push(Ae.name),pe.paramList.push(Ae)}Ce=Be.join(\", \");break;default:break}if(pe.name=r(ee[2],ee[0],le.name,le.flags,Ce),me){for(var se=0,Z=Object.keys(me);se<Z.length;se++){var De=Z[se];pe[De]=pe[De]||me[De]}pe.flags|=me.flags}return n(h,pe)}function n(p,h){var E=h.flags,C=E&896,S=E&15360;return!h.name&&S==1024&&(h.ptrSize==1?h.name=(E&16?\"\":(E&8?\"un\":\"\")+\"signed \")+\"char\":h.name=(E&8?\"u\":\"\")+(E&32?\"float\":\"int\")+(h.ptrSize*8+\"_t\")),h.ptrSize==8&&!(E&32)&&(S=64),S==2048&&(C==512||C==640?S=4096:C&&(S=3072)),p(S,h)}var c=function(){function p(h){this.id=h.id,this.name=h.name,this.flags=h.flags,this.spec=h}return p.prototype.toString=function(){return this.name},p}(),f={Type:c,getComplexType:a,makeType:n,structureList:e};return t.output=f,t.output||f}function __nbind_register_type(t,e){var r=_nbind.readAsciiString(e),s={flags:10240,id:t,name:r};_nbind.makeType(_nbind.constructType,s)}function __nbind_register_callback_signature(t,e){var r=_nbind.readTypeIdList(t,e),s=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[s]=_nbind.makeJSCaller(r),s}function __extends(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function s(){this.constructor=t}s.prototype=e.prototype,t.prototype=new s}function __nbind_register_class(t,e,r,s,a,n,c){var f=_nbind.readAsciiString(c),p=_nbind.readPolicyList(e),h=HEAPU32.subarray(t/4,t/4+2),E={flags:2048|(p.Value?2:0),id:h[0],name:f},C=_nbind.makeType(_nbind.constructType,E);C.ptrType=_nbind.getComplexType(h[1],_nbind.constructType,_nbind.getType,_nbind.queryType),C.destroy=_nbind.makeMethodCaller(C.ptrType,{boundID:E.id,flags:0,name:\"destroy\",num:0,ptr:n,title:C.name+\".free\",typeList:[\"void\",\"uint32_t\",\"uint32_t\"]}),a&&(C.superIdList=Array.prototype.slice.call(HEAPU32.subarray(r/4,r/4+a)),C.upcastList=Array.prototype.slice.call(HEAPU32.subarray(s/4,s/4+a))),Module[C.name]=C.makeBound(p),_nbind.BindClass.list.push(C)}function _removeAccessorPrefix(t){var e=/^[Gg]et_?([A-Z]?([A-Z]?))/;return t.replace(e,function(r,s,a){return a?s:s.toLowerCase()})}function __nbind_register_function(t,e,r,s,a,n,c,f,p,h){var E=_nbind.getType(t),C=_nbind.readPolicyList(e),S=_nbind.readTypeIdList(r,s),P;if(c==5)P=[{direct:a,name:\"__nbindConstructor\",ptr:0,title:E.name+\" constructor\",typeList:[\"uint32_t\"].concat(S.slice(1))},{direct:n,name:\"__nbindValueConstructor\",ptr:0,title:E.name+\" value constructor\",typeList:[\"void\",\"uint32_t\"].concat(S.slice(1))}];else{var I=_nbind.readAsciiString(f),R=(E.name&&E.name+\".\")+I;(c==3||c==4)&&(I=_removeAccessorPrefix(I)),P=[{boundID:t,direct:n,name:I,ptr:a,title:R,typeList:S}]}for(var N=0,U=P;N<U.length;N++){var W=U[N];W.signatureType=c,W.policyTbl=C,W.num=p,W.flags=h,E.addMethod(W)}}function _nbind_value(t,e){_nbind.typeNameTbl[t]||_nbind.throwError(\"Unknown value type \"+t),Module.NBind.bind_value(t,e),_defineHidden(_nbind.typeNameTbl[t].proto.prototype.__nbindValueConstructor)(e.prototype,\"__nbindValueConstructor\")}Module._nbind_value=_nbind_value;function __nbind_get_value_object(t,e){var r=_nbind.popValue(t);if(!r.fromJS)throw new Error(\"Object \"+r+\" has no fromJS function\");r.fromJS(function(){r.__nbindValueConstructor.apply(this,Array.prototype.concat.apply([e],arguments))})}function _emscripten_memcpy_big(t,e,r){return HEAPU8.set(HEAPU8.subarray(e,e+r),t),t}function __nbind_register_primitive(t,e,r){var s={flags:1024|r,id:t,ptrSize:e};_nbind.makeType(_nbind.constructType,s)}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],\"i8\",ALLOC_STATIC);function ___setErrNo(t){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),c=SYSCALLS.get(),f=a;return FS.llseek(r,f,c),HEAP32[n>>2]=r.position,r.getdents&&f===0&&c===0&&(r.getdents=null),0}catch(p){return(typeof FS>\"u\"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,C){var S=___syscall146.buffers[E];assert(S),C===0||C===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(S,0)),S.length=0):S.push(C)});for(var c=0;c<a;c++){for(var f=HEAP32[s+c*8>>2],p=HEAP32[s+(c*8+4)>>2],h=0;h<p;h++)___syscall146.printChar(r,HEAPU8[f+h]);n+=p}return n}catch(E){return(typeof FS>\"u\"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;t<e.length;t++){var r=e[t];r.finish()}}var ___dso_handle=STATICTOP;STATICTOP+=16,function(_nbind){var typeIdTbl={};_nbind.typeNameTbl={};var Pool=function(){function t(){}return t.lalloc=function(e){e=e+7&-8;var r=HEAPU32[t.usedPtr];if(e>t.pageSize/2||e>t.pageSize-r){var s=_nbind.typeNameTbl.NBind.proto;return s.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var s=HEAPU32[t.pagePtr];if(s){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],s=new r(e);return typeIdTbl[e.id]=s,_nbind.typeNameTbl[e.name]=s,s}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var s=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(s=[s[0],s.slice(1)]),{paramList:s,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r==\"number\"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply(\"\",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:\"d\",float64_t:\"d\",int64_t:\"d\",uint64_t:\"d\",void:\"v\"},s=t.map(function(n){return r[n.name]||\"i\"}).join(\"\"),a=Module[\"dynCall_\"+s];if(!a)throw new Error(\"dynCall_\"+s+\" not found for \"+e+\"(\"+t.map(function(n){return n.name}).join(\", \")+\")\");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,s){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,s)):(r.arity=s,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return s.heap=a[r.ptrSize*8],s.ptrSize=r.ptrSize,s}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"number\")return a;throw new Error(\"Type mismatch\")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error(\"Type mismatch\")}if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,s=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,s,r),s}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushCString(a,s)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(s){return!!s},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return\"!!(\"+r+\")\"},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"boolean\")return a;throw new Error(\"Type mismatch\")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(s){__extends(a,s);function a(n,c,f,p){var h=s.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=c,C=f,S=p;if(n!==_nbind.ptrMarker){var P=h.__nbindConstructor.apply(h,arguments);E=4608,S=HEAPU32[P/4],C=HEAPU32[P/4+1]}var I={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:C};S&&(R.__nbindShared=S,_nbind.mark(h));for(var N=0,U=Object.keys(R);N<U.length;N++){var W=U[N];I.value=R[W],Object.defineProperty(h,W,I)}return _defineHidden(0)(h,\"__nbindState\"),h}return a.prototype.free=function(){e.destroy.call(this,this.__nbindShared,this.__nbindFlags),this.__nbindState|=2,disableMember(this,\"__nbindShared\"),disableMember(this,\"__nbindPtr\")},a}(Wrapper);return __decorate([_defineHidden()],r.prototype,\"__nbindConstructor\",void 0),__decorate([_defineHidden()],r.prototype,\"__nbindValueConstructor\",void 0),__decorate([_defineHidden(t)],r.prototype,\"__nbindPolicies\",void 0),r}_nbind.makeBound=makeBound;function disableMember(t,e){function r(){throw new Error(\"Accessing deleted object\")}Object.defineProperty(t,e,{configurable:!1,enumerable:!1,get:r,set:r})}_nbind.ptrMarker={};var BindClass=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return _nbind.popValue(a,s.ptrType)},s.wireWrite=function(a){return pushPointer(a,s.ptrType,!0)},s.pendingSuperCount=0,s.ready=!1,s.methodTbl={},r.paramList?(s.classType=r.paramList[0].classType,s.proto=s.classType.proto):s.classType=s,s}return e.prototype.makeBound=function(r){var s=_nbind.makeBound(r,this);return this.proto=s,this.ptrType.proto=s,s},e.prototype.addMethod=function(r){var s=this.methodTbl[r.name]||[];s.push(r),this.methodTbl[r.name]=s},e.prototype.registerMethods=function(r,s){for(var a,n=0,c=Object.keys(r.methodTbl);n<c.length;n++)for(var f=c[n],p=r.methodTbl[f],h=0,E=p;h<E.length;h++){var C=E[h],S=void 0,P=void 0;if(S=this.proto.prototype,!(s&&C.signatureType!=1))switch(C.signatureType){case 1:S=this.proto;case 5:P=_nbind.makeCaller(C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;case 4:a=_nbind.makeMethodCaller(r.ptrType,C);break;case 3:Object.defineProperty(S,C.name,{configurable:!0,enumerable:!1,get:_nbind.makeMethodCaller(r.ptrType,C),set:a});break;case 2:P=_nbind.makeMethodCaller(r.ptrType,C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;default:break}}},e.prototype.registerSuperMethods=function(r,s,a){if(!a[r.name]){a[r.name]=!0;for(var n=0,c,f=0,p=r.superIdList||[];f<p.length;f++){var h=p[f],E=_nbind.getType(h);n++<s||s<0?c=-1:c=0,this.registerSuperMethods(E,c,a)}this.registerMethods(r,s<0)}},e.prototype.finish=function(){if(this.ready)return this;this.ready=!0,this.superList=(this.superIdList||[]).map(function(a){return _nbind.getType(a).finish()});var r=this.proto;if(this.superList.length){var s=function(){this.constructor=r};s.prototype=this.superList[0].proto.prototype,r.prototype=new s}return r!=Module&&(r.prototype.__nbindType=this),this.registerSuperMethods(this,1,{}),this},e.prototype.upcastStep=function(r,s){if(r==this)return s;for(var a=0;a<this.superList.length;++a){var n=this.superList[a].upcastStep(r,_nbind.callUpcast(this.upcastList[a],s));if(n)return n}return 0},e}(_nbind.BindType);BindClass.list=[],_nbind.BindClass=BindClass;function popPointer(t,e){return t?new e.proto(_nbind.ptrMarker,e.flags,t):null}_nbind.popPointer=popPointer;function pushPointer(t,e,r){if(!(t instanceof _nbind.Wrapper)){if(r)return _nbind.pushValue(t);throw new Error(\"Type mismatch\")}var s=t.__nbindPtr,a=t.__nbindType.classType,n=e.classType;if(t instanceof e.proto)for(;a!=n;)s=_nbind.callUpcast(a.upcastList[0],s),a=a.superList[0];else if(s=a.upcastStep(n,s),!s)throw new Error(\"Type mismatch\");return s}_nbind.pushPointer=pushPointer;function pushMutablePointer(t,e){var r=pushPointer(t,e);if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return r}var BindClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=(s.flags&896)==256&&r.flags&2,c=a?pushPointer:pushMutablePointer,f=n?_nbind.popValue:popPointer;return s.makeWireWrite=function(p,h){return h.Nullable?function(E){return E?c(E,s):0}:function(E){return c(E,s)}},s.wireRead=function(p){return f(p,s)},s.wireWrite=function(p){return c(p,s)},s}return e}(_nbind.BindType);_nbind.BindClassPtr=BindClassPtr;function popShared(t,e){var r=HEAPU32[t/4],s=HEAPU32[t/4+1];return s?new e.proto(_nbind.ptrMarker,e.flags,s,r):null}_nbind.popShared=popShared;function pushShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");return t.__nbindShared}function pushMutableShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return t.__nbindShared}var SharedClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.readResources=[_nbind.resources.pool],s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=a?pushShared:pushMutableShared;return s.wireRead=function(c){return popShared(c,s)},s.wireWrite=function(c){return n(c,s)},s}return e}(_nbind.BindType);_nbind.SharedClassPtr=SharedClassPtr,_nbind.externalList=[0];var firstFreeExternal=0,External=function(){function t(e){this.refCount=1,this.data=e}return t.prototype.register=function(){var e=firstFreeExternal;return e?firstFreeExternal=_nbind.externalList[e]:e=_nbind.externalList.length,_nbind.externalList[e]=this,e},t.prototype.reference=function(){++this.refCount},t.prototype.dereference=function(e){--this.refCount==0&&(this.free&&this.free(),_nbind.externalList[e]=firstFreeExternal,firstFreeExternal=e)},t}();_nbind.External=External;function popExternal(t){var e=_nbind.externalList[t];return e.dereference(t),e.data}function pushExternal(t){var e=new External(t);return e.reference(),e.register()}var ExternalType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popExternal,r.wireWrite=pushExternal,r}return e}(_nbind.BindType);_nbind.ExternalType=ExternalType,_nbind.callbackSignatureList=[];var CallbackType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=function(s){return typeof s!=\"function\"&&_nbind.throwError(\"Type mismatch\"),new _nbind.External(s).register()},r}return e}(_nbind.BindType);_nbind.CallbackType=CallbackType,_nbind.valueList=[0];var firstFreeValue=0;function pushValue(t){var e=firstFreeValue;return e?firstFreeValue=_nbind.valueList[e]:e=_nbind.valueList.length,_nbind.valueList[e]=t,e*2+1}_nbind.pushValue=pushValue;function popValue(t,e){if(t||_nbind.throwError(\"Value type JavaScript class is missing or not registered\"),t&1){t>>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error(\"Invalid value slot \"+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t==\"number\"?t:pushValue(t)*4096+valueBase}function pop64(t){return t<valueBase?t:popValue((t-valueBase)/4096)}var CreateValueType=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeWireWrite=function(r){return\"(_nbind.pushValue(new \"+r+\"))\"},e}(_nbind.BindType);_nbind.CreateValueType=CreateValueType;var Int64Type=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=push64,r.wireRead=pop64,r}return e}(_nbind.BindType);_nbind.Int64Type=Int64Type;function pushArray(t,e){if(!t)return 0;var r=t.length;if((e.size||e.size===0)&&r<e.size)throw new Error(\"Type mismatch\");var s=e.memberType.ptrSize,a=_nbind.Pool.lalloc(4+r*s);HEAPU32[a/4]=r;var n=e.memberType.heap,c=(a+4)/s,f=e.memberType.wireWrite,p=0;if(f)for(;p<r;)n[c++]=f(t[p++]);else for(;p<r;)n[c++]=t[p++];return a}_nbind.pushArray=pushArray;function popArray(t,e){if(t===0)return null;var r=HEAPU32[t/4],s=new Array(r),a=e.memberType.heap;t=(t+4)/e.memberType.ptrSize;var n=e.memberType.wireRead,c=0;if(n)for(;c<r;)s[c++]=n(a[t++]);else for(;c<r;)s[c++]=a[t++];return s}_nbind.popArray=popArray;var ArrayType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return popArray(a,s)},s.wireWrite=function(a){return pushArray(a,s)},s.readResources=[_nbind.resources.pool],s.writeResources=[_nbind.resources.pool],s.memberType=r.paramList[0],r.paramList[1]&&(s.size=r.paramList[1]),s}return e}(_nbind.BindType);_nbind.ArrayType=ArrayType;function pushString(t,e){if(t==null)if(e&&e.Nullable)t=\"\";else throw new Error(\"Type mismatch\");if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t),s=_nbind.Pool.lalloc(4+r+1);return HEAPU32[s/4]=r,Module.stringToUTF8Array(t,HEAPU8,s+4,r+1),s}_nbind.pushString=pushString;function popString(t){if(t===0)return null;var e=HEAPU32[t/4];return Module.Pointer_stringify(t+4,e)}_nbind.popString=popString;var StringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popString,r.wireWrite=pushString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushString(a,s)}},e}(_nbind.BindType);_nbind.StringType=StringType;function makeArgList(t){return Array.apply(null,Array(t)).map(function(e,r){return\"a\"+(r+1)})}function anyNeedsWireWrite(t,e){return t.reduce(function(r,s){return r||s.needsWireWrite(e)},!1)}function anyNeedsWireRead(t,e){return t.reduce(function(r,s){return r||!!s.needsWireRead(e)},!1)}function makeWireRead(t,e,r,s){var a=t.length;return r.makeWireRead?r.makeWireRead(s,t,a):r.wireRead?(t[a]=r.wireRead,\"(convertParamList[\"+a+\"](\"+s+\"))\"):s}function makeWireWrite(t,e,r,s){var a,n=t.length;return r.makeWireWrite?a=r.makeWireWrite(s,e,t,n):a=r.wireWrite,a?typeof a==\"string\"?a:(t[n]=a,\"(convertParamList[\"+n+\"](\"+s+\"))\"):s}function buildCallerFunction(dynCall,ptrType,ptr,num,policyTbl,needsWireWrite,prefix,returnType,argTypeList,mask,err){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireRead(convertParamList,policyTbl,returnType,\"dynCall(\"+[prefix].concat(argList.map(function(t,e){return makeWireWrite(convertParamList,policyTbl,argTypeList[e],t)})).join(\",\")+\")\"),resourceSet=_nbind.listResources([returnType],argTypeList),sourceCode=\"function(\"+argList.join(\",\")+\"){\"+(mask?\"this.__nbindFlags&mask&&err();\":\"\")+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}function buildJSCallerFunction(returnType,argTypeList){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireWrite(convertParamList,null,returnType,\"_nbind.externalList[num].data(\"+argList.map(function(t,e){return makeWireRead(convertParamList,null,argTypeList[e],t)}).join(\",\")+\")\"),resourceSet=_nbind.listResources(argTypeList,[returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode=\"function(\"+[\"dummy\",\"num\"].concat(argList).join(\",\")+\"){\"+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}_nbind.buildJSCallerFunction=buildJSCallerFunction;function makeJSCaller(t){var e=t.length-1,r=_nbind.getTypes(t,\"callback\"),s=r[0],a=r.slice(1),n=anyNeedsWireRead(a,null),c=s.needsWireWrite(null);if(!c&&!n)switch(e){case 0:return function(f,p){return _nbind.externalList[p].data()};case 1:return function(f,p,h){return _nbind.externalList[p].data(h)};case 2:return function(f,p,h,E){return _nbind.externalList[p].data(h,E)};case 3:return function(f,p,h,E,C){return _nbind.externalList[p].data(h,E,C)};default:break}return buildJSCallerFunction(s,a)}_nbind.makeJSCaller=makeJSCaller;function makeMethodCaller(t,e){var r=e.typeList.length-1,s=e.typeList.slice(0);s.splice(1,0,\"uint32_t\",e.boundID);var a=_nbind.getTypes(s,e.title),n=a[0],c=a.slice(3),f=n.needsWireRead(e.policyTbl),p=anyNeedsWireWrite(c,e.policyTbl),h=e.ptr,E=e.num,C=_nbind.getDynCall(a,e.title),S=~e.flags&1;function P(){throw new Error(\"Calling a non-const method on a const object\")}if(!f&&!p)switch(r){case 0:return function(){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t))};case 1:return function(I){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I)};case 2:return function(I,R){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R)};case 3:return function(I,R,N){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R,N)};default:break}return buildCallerFunction(C,t,h,E,e.policyTbl,p,\"ptr,num,pushPointer(this,ptrType)\",n,c,S,P)}_nbind.makeMethodCaller=makeMethodCaller;function makeCaller(t){var e=t.typeList.length-1,r=_nbind.getTypes(t.typeList,t.title),s=r[0],a=r.slice(1),n=s.needsWireRead(t.policyTbl),c=anyNeedsWireWrite(a,t.policyTbl),f=t.direct,p=t.ptr;if(t.direct&&!n&&!c){var h=_nbind.getDynCall(r,t.title);switch(e){case 0:return function(){return h(f)};case 1:return function(P){return h(f,P)};case 2:return function(P,I){return h(f,P,I)};case 3:return function(P,I,R){return h(f,P,I,R)};default:break}p=0}var E;if(p){var C=t.typeList.slice(0);C.splice(1,0,\"uint32_t\"),r=_nbind.getTypes(C,t.title),E=\"ptr,num\"}else p=f,E=\"ptr\";var S=_nbind.getDynCall(r,t.title);return buildCallerFunction(S,null,p,t.num,t.policyTbl,c,E,s,a)}_nbind.makeCaller=makeCaller;function makeOverloader(t,e){var r=[];function s(){return r[arguments.length].apply(this,arguments)}return s.addMethod=function(a,n){r[n]=a},s.addMethod(t,e),s}_nbind.makeOverloader=makeOverloader;var Resource=function(){function t(e,r){var s=this;this.makeOpen=function(){return Object.keys(s.openTbl).join(\"\")},this.makeClose=function(){return Object.keys(s.closeTbl).join(\"\")},this.openTbl={},this.closeTbl={},e&&(this.openTbl[e]=!0),r&&(this.closeTbl[r]=!0)}return t.prototype.add=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];this.openTbl[a]=!0}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];this.closeTbl[a]=!0}},t.prototype.remove=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];delete this.openTbl[a]}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];delete this.closeTbl[a]}},t}();_nbind.Resource=Resource;function listResources(t,e){for(var r=new Resource,s=0,a=t;s<a.length;s++)for(var n=a[s],c=0,f=n.readResources||[];c<f.length;c++){var p=f[c];r.add(p)}for(var h=0,E=e;h<E.length;h++)for(var n=E[h],C=0,S=n.writeResources||[];C<S.length;C++){var p=S[C];r.add(p)}return r}_nbind.listResources=listResources,_nbind.resources={pool:new Resource(\"var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];\",\"_nbind.Pool.lreset(used,page);\")};var ExternalBuffer=function(t){__extends(e,t);function e(r,s){var a=t.call(this,r)||this;return a.ptr=s,a}return e.prototype.free=function(){_free(this.ptr)},e}(_nbind.External);function getBuffer(t){return t instanceof ArrayBuffer?new Uint8Array(t):t instanceof DataView?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function pushBuffer(t,e){if(t==null&&e&&e.Nullable&&(t=[]),typeof t!=\"object\")throw new Error(\"Type mismatch\");var r=t,s=r.byteLength||r.length;if(!s&&s!==0&&r.byteLength!==0)throw new Error(\"Type mismatch\");var a=_nbind.Pool.lalloc(8),n=_malloc(s),c=a/4;return HEAPU32[c++]=s,HEAPU32[c++]=n,HEAPU32[c++]=new ExternalBuffer(t,n).register(),HEAPU8.set(getBuffer(t),n),a}var BufferType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=pushBuffer,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushBuffer(a,s)}},e}(_nbind.BindType);_nbind.BufferType=BufferType;function commitBuffer(t,e,r){var s=_nbind.externalList[t].data,a=Buffer;if(typeof Buffer!=\"function\"&&(a=function(){}),!(s instanceof Array)){var n=HEAPU8.subarray(e,e+r);if(s instanceof a){var c=void 0;typeof Buffer.from==\"function\"&&Buffer.from.length>=3?c=Buffer.from(n):c=new Buffer(n),c.copy(s)}else getBuffer(s).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t<e.length;t++){var r=e[t];r.__nbindState&3||r.free()}dirtyList=[],gcTimer=0}_nbind.mark=function(t){};function toggleLightGC(t){t?_nbind.mark=function(e){dirtyList.push(e),gcTimer||(gcTimer=setTimeout(sweep,0))}:_nbind.mark=function(e){}}_nbind.toggleLightGC=toggleLightGC}(_nbind),Module.requestFullScreen=function t(e,r,s){Module.printErr(\"Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.\"),Module.requestFullScreen=Module.requestFullscreen,Browser.requestFullScreen(e,r,s)},Module.requestFullscreen=function t(e,r,s){Browser.requestFullscreen(e,r,s)},Module.requestAnimationFrame=function t(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function t(e,r,s){Browser.setCanvasSize(e,r,s)},Module.pauseMainLoop=function t(){Browser.mainLoop.pause()},Module.resumeMainLoop=function t(){Browser.mainLoop.resume()},Module.getUserMedia=function t(){Browser.getUserMedia()},Module.createContext=function t(e,r,s,a){return Browser.createContext(e,r,s,a)},ENVIRONMENT_IS_NODE?_emscripten_get_now=function(){var e=process.hrtime();return e[0]*1e3+e[1]/1e6}:typeof dateNow<\"u\"?_emscripten_get_now=dateNow:typeof self==\"object\"&&self.performance&&typeof self.performance.now==\"function\"?_emscripten_get_now=function(){return self.performance.now()}:typeof performance==\"object\"&&typeof performance.now==\"function\"?_emscripten_get_now=function(){return performance.now()}:_emscripten_get_now=Date.now,__ATEXIT__.push(function(){var t=Module._fflush;t&&t(0);var e=___syscall146.printChar;if(e){var r=___syscall146.buffers;r[1].length&&e(1,10),r[2].length&&e(2,10)}}),DYNAMICTOP_PTR=allocate(1,\"i32\",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,s,a,n){try{Module.dynCall_viiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,s){try{return Module.dynCall_fiff(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,s,a){try{Module.dynCall_viddi(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,s){try{Module.dynCall_vidd(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,s){try{return Module.dynCall_iiii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,s){try{return Module.dynCall_diii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,s,a,n){try{Module.dynCall_viiddi(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,s,a,n,c){try{Module.dynCall_viiiiii(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,s,a,n){try{return Module.dynCall_iiiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,s,a){try{Module.dynCall_viiid(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,s,a,n,c){try{Module.dynCall_viififi(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_viii(t,e,r,s){try{Module.dynCall_viii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,s){try{Module.dynCall_viid(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,s,a){try{Module.dynCall_viiii(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var s=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),c=new t.Uint8Array(r),f=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),C=e.DYNAMICTOP_PTR|0,S=e.tempDoublePtr|0,P=e.ABORT|0,I=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,W=0,ee=0,ie=0,ue=0,le=t.NaN,me=t.Infinity,pe=0,Be=0,Ce=0,g=0,we=0,ye=0,Ae=t.Math.floor,se=t.Math.abs,Z=t.Math.sqrt,De=t.Math.pow,Re=t.Math.cos,mt=t.Math.sin,j=t.Math.tan,rt=t.Math.acos,Fe=t.Math.asin,Ne=t.Math.atan,Pe=t.Math.atan2,Ve=t.Math.exp,ke=t.Math.log,it=t.Math.ceil,Ue=t.Math.imul,x=t.Math.min,w=t.Math.max,b=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,X=e.enlargeMemory,$=e.getTotalMemory,oe=e.abortOnCannotGrowMemory,xe=e.invoke_viiiii,Te=e.invoke_vif,lt=e.invoke_vid,Ct=e.invoke_fiff,qt=e.invoke_vi,ir=e.invoke_vii,Pt=e.invoke_ii,gn=e.invoke_viddi,Pr=e.invoke_vidd,Ir=e.invoke_iiii,Or=e.invoke_diii,on=e.invoke_di,ai=e.invoke_iid,Io=e.invoke_iii,rs=e.invoke_viiddi,$s=e.invoke_viiiiii,Co=e.invoke_dii,ji=e.invoke_i,eo=e.invoke_iiiiii,wo=e.invoke_viiid,QA=e.invoke_viififi,Af=e.invoke_viii,dh=e.invoke_v,mh=e.invoke_viid,to=e.invoke_idd,jn=e.invoke_viiii,Ts=e._emscripten_asm_const_iiiii,ro=e._emscripten_asm_const_iiidddddd,ou=e._emscripten_asm_const_iiiid,au=e.__nbind_reference_external,lu=e._emscripten_asm_const_iiiiiiii,TA=e._removeAccessorPrefix,RA=e._typeModule,oa=e.__nbind_register_pool,aa=e.__decorate,FA=e._llvm_stackrestore,gr=e.___cxa_atexit,Bo=e.__extends,Me=e.__nbind_get_value_object,cu=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Cr=e._emscripten_set_main_loop_timing,pf=e.__nbind_register_primitive,NA=e.__nbind_register_type,OA=e._emscripten_memcpy_big,uu=e.__nbind_register_function,fu=e.___setErrNo,oc=e.__nbind_register_class,ve=e.__nbind_finish,Nt=e._abort,ac=e._nbind_value,Oi=e._llvm_stacksave,no=e.___syscall54,Rt=e._defineHidden,xn=e._emscripten_set_main_loop,la=e._emscripten_get_now,Gi=e.__nbind_register_callback_signature,Li=e._emscripten_asm_const_iiiiii,Na=e.__nbind_free_external,dn=e._emscripten_asm_const_iiii,Kn=e._emscripten_asm_const_iiididi,Au=e.___syscall6,yh=e._atexit,Oa=e.___syscall140,La=e.___syscall146,Ma=y(0);let $e=y(0);function Ua(o){o=o|0;var l=0;return l=I,I=I+o|0,I=I+15&-16,l|0}function hf(){return I|0}function lc(o){o=o|0,I=o}function wn(o,l){o=o|0,l=l|0,I=o,R=l}function ca(o,l){o=o|0,l=l|0,W||(W=o,ee=l)}function LA(o){o=o|0,ye=o}function MA(){return ye|0}function ua(){var o=0,l=0;Qr(8104,8,400)|0,Qr(8504,408,540)|0,o=9044,l=o+44|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));s[9088]=0,s[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,gr(17,8104,U|0)|0}function Bl(o){o=o|0,dt(o+948|0)}function Mt(o){return o=y(o),((fP(o)|0)&2147483647)>>>0>2139095040|0}function kn(o,l,u){o=o|0,l=l|0,u=u|0;e:do if(n[o+(l<<3)+4>>2]|0)o=o+(l<<3)|0;else{if((l|2|0)==3&&n[o+60>>2]|0){o=o+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[o+52>>2]|0){o=o+48|0;break e}break}default:}if(n[o+68>>2]|0){o=o+64|0;break}else{o=(l|1|0)==5?948:u;break}}while(!1);return o|0}function fa(o){o=o|0;var l=0;return l=_P(1e3)|0,Ha(o,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Qr(l|0,8104,1e3)|0,s[o+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=o,l|0}function Ha(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Wg(o,5,3197,A)),I=d}function ns(){return fa(956)|0}function cc(o){o=o|0;var l=0;return l=Kt(1e3)|0,pu(l,o),Ha(n[o+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function pu(o,l){o=o|0,l=l|0;var u=0;Qr(o|0,l|0,948)|0,Dy(o+948|0,l+948|0),u=o+960|0,o=l+960|0,l=u+40|0;do n[u>>2]=n[o>>2],u=u+4|0,o=o+4|0;while((u|0)<(l|0))}function uc(o){o=o|0;var l=0,u=0,A=0,d=0;if(l=o+944|0,u=n[l>>2]|0,u|0&&(ja(u+948|0,o)|0,n[l>>2]=0),u=Mi(o)|0,u|0){l=0;do n[(Is(o,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(u|0))}u=o+948|0,A=n[u>>2]|0,d=o+952|0,l=n[d>>2]|0,(l|0)!=(A|0)&&(n[d>>2]=l+(~((l+-4-A|0)>>>2)<<2)),vl(u),HP(o),n[2276]=(n[2276]|0)+-1}function ja(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0;A=n[o>>2]|0,k=o+4|0,u=n[k>>2]|0,m=u;e:do if((A|0)==(u|0))d=A,B=4;else for(o=A;;){if((n[o>>2]|0)==(l|0)){d=o,B=4;break e}if(o=o+4|0,(o|0)==(u|0)){o=0;break}}while(!1);return(B|0)==4&&((d|0)!=(u|0)?(A=d+4|0,o=m-A|0,l=o>>2,l&&(Q2(d|0,A|0,o|0)|0,u=n[k>>2]|0),o=d+(l<<2)|0,(u|0)==(o|0)||(n[k>>2]=u+(~((u+-4-o|0)>>>2)<<2)),o=1):o=0),o|0}function Mi(o){return o=o|0,(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2|0}function Is(o,l){o=o|0,l=l|0;var u=0;return u=n[o+948>>2]|0,(n[o+952>>2]|0)-u>>2>>>0>l>>>0?o=n[u+(l<<2)>>2]|0:o=0,o|0}function vl(o){o=o|0;var l=0,u=0,A=0,d=0;A=I,I=I+32|0,l=A,d=n[o>>2]|0,u=(n[o+4>>2]|0)-d|0,((n[o+8>>2]|0)-d|0)>>>0>u>>>0&&(d=u>>2,ky(l,d,d,o+8|0),AP(o,l),Qy(l)),I=A}function gf(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;M=Mi(o)|0;do if(M|0){if((n[(Is(o,0)|0)+944>>2]|0)==(o|0)){if(!(ja(o+948|0,l)|0))break;Qr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(o);break}B=n[(n[o+976>>2]|0)+12>>2]|0,k=o+948|0,T=(B|0)==0,u=0,m=0;do A=n[(n[k>>2]|0)+(m<<2)>>2]|0,(A|0)==(l|0)?Oe(o):(d=cc(A)|0,n[(n[k>>2]|0)+(u<<2)>>2]=d,n[d+944>>2]=o,T||dU[B&15](A,d,o,u),u=u+1|0),m=m+1|0;while((m|0)!=(M|0));if(u>>>0<M>>>0){T=o+948|0,k=o+952|0,B=u,u=n[k>>2]|0;do m=(n[T>>2]|0)+(B<<2)|0,A=m+4|0,d=u-A|0,l=d>>2,l&&(Q2(m|0,A|0,d|0)|0,u=n[k>>2]|0),d=u,A=m+(l<<2)|0,(d|0)!=(A|0)&&(u=d+(~((d+-4-A|0)>>>2)<<2)|0,n[k>>2]=u),B=B+1|0;while((B|0)!=(M|0))}}while(!1)}function fc(o){o=o|0;var l=0,u=0,A=0,d=0;wi(o,(Mi(o)|0)==0,2491),wi(o,(n[o+944>>2]|0)==0,2545),l=o+948|0,u=n[l>>2]|0,A=o+952|0,d=n[A>>2]|0,(d|0)!=(u|0)&&(n[A>>2]=d+(~((d+-4-u|0)>>>2)<<2)),vl(l),l=o+976|0,u=n[l>>2]|0,Qr(o|0,8104,1e3)|0,s[u+2>>0]|0&&(n[o+4>>2]=2,n[o+12>>2]=4),n[l>>2]=u}function wi(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,xo(o,5,3197,A)),I=d}function Qn(){return n[2276]|0}function Ac(){var o=0;return o=_P(20)|0,Ke((o|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[o>>2]=n[239],n[o+4>>2]=n[240],n[o+8>>2]=n[241],n[o+12>>2]=n[242],n[o+16>>2]=n[243],o|0}function Ke(o,l){o=o|0,l=l|0;var u=0,A=0;A=I,I=I+16|0,u=A,o||(n[u>>2]=l,xo(0,5,3197,u)),I=A}function st(o){o=o|0,HP(o),n[2277]=(n[2277]|0)+-1}function St(o,l){o=o|0,l=l|0;var u=0;l?(wi(o,(Mi(o)|0)==0,2629),u=1):(u=0,l=0),n[o+964>>2]=l,n[o+988>>2]=u}function lr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+8|0,d=A+4|0,B=A,n[d>>2]=l,wi(o,(n[l+944>>2]|0)==0,2709),wi(o,(n[o+964>>2]|0)==0,2763),te(o),l=o+948|0,n[B>>2]=(n[l>>2]|0)+(u<<2),n[m>>2]=n[B>>2],Ee(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=o,Oe(o),I=A}function te(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;if(u=Mi(o)|0,u|0&&(n[(Is(o,0)|0)+944>>2]|0)!=(o|0)){A=n[(n[o+976>>2]|0)+12>>2]|0,d=o+948|0,m=(A|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=cc(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=k,n[k+944>>2]=o,m||dU[A&15](B,k,o,l),l=l+1|0;while((l|0)!=(u|0))}}function Ee(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0;tt=I,I=I+64|0,q=tt+52|0,k=tt+48|0,ae=tt+28|0,Ye=tt+24|0,Le=tt+20|0,Qe=tt,A=n[o>>2]|0,m=A,l=A+((n[l>>2]|0)-m>>2<<2)|0,A=o+4|0,d=n[A>>2]|0,B=o+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[u>>2],n[A>>2]=(n[A>>2]|0)+4;break}pP(o,l,d,l+4|0),l>>>0<=u>>>0&&(u=(n[A>>2]|0)>>>0>u>>>0?u+4|0:u),n[l>>2]=n[u>>2]}else{A=(d-m>>2)+1|0,d=O(o)|0,d>>>0<A>>>0&&an(o),L=n[o>>2]|0,M=(n[B>>2]|0)-L|0,m=M>>1,ky(Qe,M>>2>>>0<d>>>1>>>0?m>>>0<A>>>0?A:m:d,l-L>>2,o+8|0),L=Qe+8|0,A=n[L>>2]|0,m=Qe+12|0,M=n[m>>2]|0,B=M,T=A;do if((A|0)==(M|0)){if(M=Qe+4|0,A=n[M>>2]|0,Ze=n[Qe>>2]|0,d=Ze,A>>>0<=Ze>>>0){A=B-d>>1,A=A|0?A:1,ky(ae,A,A>>>2,n[Qe+16>>2]|0),n[Ye>>2]=n[M>>2],n[Le>>2]=n[L>>2],n[k>>2]=n[Ye>>2],n[q>>2]=n[Le>>2],o2(ae,k,q),A=n[Qe>>2]|0,n[Qe>>2]=n[ae>>2],n[ae>>2]=A,A=ae+4|0,Ze=n[M>>2]|0,n[M>>2]=n[A>>2],n[A>>2]=Ze,A=ae+8|0,Ze=n[L>>2]|0,n[L>>2]=n[A>>2],n[A>>2]=Ze,A=ae+12|0,Ze=n[m>>2]|0,n[m>>2]=n[A>>2],n[A>>2]=Ze,Qy(ae),A=n[L>>2]|0;break}m=A,B=((m-d>>2)+1|0)/-2|0,k=A+(B<<2)|0,d=T-m|0,m=d>>2,m&&(Q2(k|0,A|0,d|0)|0,A=n[M>>2]|0),Ze=k+(m<<2)|0,n[L>>2]=Ze,n[M>>2]=A+(B<<2),A=Ze}while(!1);n[A>>2]=n[u>>2],n[L>>2]=(n[L>>2]|0)+4,l=hP(o,Qe,l)|0,Qy(Qe)}while(!1);return I=tt,l|0}function Oe(o){o=o|0;var l=0;do{if(l=o+984|0,s[l>>0]|0)break;s[l>>0]=1,h[o+504>>2]=y(le),o=n[o+944>>2]|0}while(o|0)}function dt(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),It(u))}function Et(o){return o=o|0,n[o+944>>2]|0}function bt(o){o=o|0,wi(o,(n[o+964>>2]|0)!=0,2832),Oe(o)}function tr(o){return o=o|0,(s[o+984>>0]|0)!=0|0}function An(o,l){o=o|0,l=l|0,l6e(o,l,400)|0&&(Qr(o|0,l|0,400)|0,Oe(o))}function li(o){o=o|0;var l=$e;return l=y(h[o+44>>2]),o=Mt(l)|0,y(o?y(0):l)}function qi(o){o=o|0;var l=$e;return l=y(h[o+48>>2]),Mt(l)|0&&(l=s[(n[o+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Tn(o,l){o=o|0,l=l|0,n[o+980>>2]=l}function Ga(o){return o=o|0,n[o+980>>2]|0}function my(o,l){o=o|0,l=l|0;var u=0;u=o+4|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Z1(o){return o=o|0,n[o+4>>2]|0}function vo(o,l){o=o|0,l=l|0;var u=0;u=o+8|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function yy(o){return o=o|0,n[o+8>>2]|0}function Eh(o,l){o=o|0,l=l|0;var u=0;u=o+12|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function $1(o){return o=o|0,n[o+12>>2]|0}function So(o,l){o=o|0,l=l|0;var u=0;u=o+16|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Ih(o){return o=o|0,n[o+16>>2]|0}function Ch(o,l){o=o|0,l=l|0;var u=0;u=o+20|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function hu(o){return o=o|0,n[o+20>>2]|0}function wh(o,l){o=o|0,l=l|0;var u=0;u=o+24|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Fg(o){return o=o|0,n[o+24>>2]|0}function Ng(o,l){o=o|0,l=l|0;var u=0;u=o+28|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Og(o){return o=o|0,n[o+28>>2]|0}function Ey(o,l){o=o|0,l=l|0;var u=0;u=o+32|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function df(o){return o=o|0,n[o+32>>2]|0}function Do(o,l){o=o|0,l=l|0;var u=0;u=o+36|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Sl(o){return o=o|0,n[o+36>>2]|0}function Bh(o,l){o=o|0,l=y(l);var u=0;u=o+40|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Lg(o,l){o=o|0,l=y(l);var u=0;u=o+44|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Dl(o,l){o=o|0,l=y(l);var u=0;u=o+48|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function bl(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+52|0,d=o+56|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Iy(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+52|0,u=o+56|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function UA(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+52|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Cy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function wy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function _A(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+132+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function HA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Y(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function xt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+60+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function jA(o,l){o=o|0,l=l|0;var u=0;u=o+60+(l<<3)+4|0,(n[u>>2]|0)!=3&&(h[o+60+(l<<3)>>2]=y(le),n[u>>2]=3,Oe(o))}function bo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function mf(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function yt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+204+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function gu(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+276+(l<<3)|0,l=o+276+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function By(o,l){return o=o|0,l=l|0,y(h[o+276+(l<<3)>>2])}function Mg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+348|0,d=o+352|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function e2(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+348|0,u=o+352|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function vh(o){o=o|0;var l=0;l=o+352|0,(n[l>>2]|0)!=3&&(h[o+348>>2]=y(le),n[l>>2]=3,Oe(o))}function ur(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+348|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function zi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+356|0,d=o+360|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function yf(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+356|0,u=o+360|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function qa(o){o=o|0;var l=0;l=o+360|0,(n[l>>2]|0)!=3&&(h[o+356>>2]=y(le),n[l>>2]=3,Oe(o))}function Ug(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+356|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function du(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ef(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wt(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+364|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function di(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function GA(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Wa(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+372|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Aa(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ya(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function _g(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+380|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Sh(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Hg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function vy(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+388|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function qA(o,l){o=o|0,l=y(l);var u=0;u=o+396|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function jg(o){return o=o|0,y(h[o+396>>2])}function mu(o){return o=o|0,y(h[o+400>>2])}function yu(o){return o=o|0,y(h[o+404>>2])}function If(o){return o=o|0,y(h[o+408>>2])}function Rs(o){return o=o|0,y(h[o+412>>2])}function Eu(o){return o=o|0,y(h[o+416>>2])}function Gn(o){return o=o|0,y(h[o+420>>2])}function is(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+424+(l<<2)>>2])}function Pi(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+448+(l<<2)>>2])}function WA(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+472+(l<<2)>>2])}function Cf(o,l){o=o|0,l=l|0;var u=0,A=$e;return u=n[o+4>>2]|0,(u|0)==(n[l+4>>2]|0)?u?(A=y(h[o>>2]),o=y(se(y(A-y(h[l>>2]))))<y(999999974e-13)):o=1:o=0,o|0}function mn(o,l){o=y(o),l=y(l);var u=0;return Mt(o)|0?u=Mt(l)|0:u=y(se(y(o-l)))<y(999999974e-13),u|0}function Gg(o,l){o=o|0,l=l|0,qg(o,l)}function qg(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u+4|0,n[A>>2]=0,n[A+4>>2]=0,n[A+8>>2]=0,cu(A|0,o|0,l|0,0),xo(o,3,(s[A+11>>0]|0)<0?n[A>>2]|0:A,u),Q6e(A),I=u}function ss(o,l,u,A){o=y(o),l=y(l),u=u|0,A=A|0;var d=$e;o=y(o*l),d=y(uU(o,y(1)));do if(mn(d,y(0))|0)o=y(o-d);else{if(o=y(o-d),mn(d,y(1))|0){o=y(o+y(1));break}if(u){o=y(o+y(1));break}A||(d>y(.5)?d=y(1):(A=mn(d,y(.5))|0,d=y(A?1:0)),o=y(o+d))}while(!1);return y(o/l)}function Pl(o,l,u,A,d,m,B,k,T,M,L,q,ae){o=o|0,l=y(l),u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,k=y(k),T=y(T),M=y(M),L=y(L),q=y(q),ae=ae|0;var Ye=0,Le=$e,Qe=$e,tt=$e,Ze=$e,ct=$e,He=$e;return T<y(0)|M<y(0)?ae=0:(ae|0&&(Le=y(h[ae+4>>2]),Le!=y(0))?(tt=y(ss(l,Le,0,0)),Ze=y(ss(A,Le,0,0)),Qe=y(ss(m,Le,0,0)),Le=y(ss(k,Le,0,0))):(Qe=m,tt=l,Le=k,Ze=A),(d|0)==(o|0)?Ye=mn(Qe,tt)|0:Ye=0,(B|0)==(u|0)?ae=mn(Le,Ze)|0:ae=0,!Ye&&(ct=y(l-L),!(Po(o,ct,T)|0))&&!(wf(o,ct,d,T)|0)?Ye=Bf(o,ct,d,m,T)|0:Ye=1,!ae&&(He=y(A-q),!(Po(u,He,M)|0))&&!(wf(u,He,B,M)|0)?ae=Bf(u,He,B,k,M)|0:ae=1,ae=Ye&ae),ae|0}function Po(o,l,u){return o=o|0,l=y(l),u=y(u),(o|0)==1?o=mn(l,u)|0:o=0,o|0}function wf(o,l,u,A){return o=o|0,l=y(l),u=u|0,A=y(A),(o|0)==2&(u|0)==0?l>=A?o=1:o=mn(l,A)|0:o=0,o|0}function Bf(o,l,u,A,d){return o=o|0,l=y(l),u=u|0,A=y(A),d=y(d),(o|0)==2&(u|0)==2&A>l?d<=l?o=1:o=mn(l,d)|0:o=0,o|0}function xl(o,l,u,A,d,m,B,k,T,M,L){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,M=M|0,L=L|0;var q=0,ae=0,Ye=0,Le=0,Qe=$e,tt=$e,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=$e,To=$e,Ro=$e,Fo=0,Za=0;cr=I,I=I+160|0,$t=cr+152|0,fr=cr+120|0,Gr=cr+104|0,He=cr+72|0,Le=cr+56|0,Lt=cr+8|0,ct=cr,We=(n[2279]|0)+1|0,n[2279]=We,Tr=o+984|0,s[Tr>>0]|0&&(n[o+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[o+516>>2]|0)==(A|0)?Hr=0:Ze=4,(Ze|0)==4&&(n[o+520>>2]=0,n[o+924>>2]=-1,n[o+928>>2]=-1,h[o+932>>2]=y(-1),h[o+936>>2]=y(-1),Hr=1);e:do if(n[o+964>>2]|0)if(Qe=y(yn(o,2,B)),tt=y(yn(o,0,B)),q=o+916|0,Ro=y(h[q>>2]),To=y(h[o+920>>2]),Hn=y(h[o+932>>2]),Pl(d,l,m,u,n[o+924>>2]|0,Ro,n[o+928>>2]|0,To,Hn,y(h[o+936>>2]),Qe,tt,L)|0)Ze=22;else if(Ye=n[o+520>>2]|0,!Ye)Ze=21;else for(ae=0;;){if(q=o+524+(ae*24|0)|0,Hn=y(h[q>>2]),To=y(h[o+524+(ae*24|0)+4>>2]),Ro=y(h[o+524+(ae*24|0)+16>>2]),Pl(d,l,m,u,n[o+524+(ae*24|0)+8>>2]|0,Hn,n[o+524+(ae*24|0)+12>>2]|0,To,Ro,y(h[o+524+(ae*24|0)+20>>2]),Qe,tt,L)|0){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=Ye>>>0){Ze=21;break}}else{if(T){if(q=o+916|0,!(mn(y(h[q>>2]),l)|0)){Ze=21;break}if(!(mn(y(h[o+920>>2]),u)|0)){Ze=21;break}if((n[o+924>>2]|0)!=(d|0)){Ze=21;break}q=(n[o+928>>2]|0)==(m|0)?q:0,Ze=22;break}if(Ye=n[o+520>>2]|0,!Ye)Ze=21;else for(ae=0;;){if(q=o+524+(ae*24|0)|0,mn(y(h[q>>2]),l)|0&&mn(y(h[o+524+(ae*24|0)+4>>2]),u)|0&&(n[o+524+(ae*24|0)+8>>2]|0)==(d|0)&&(n[o+524+(ae*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=Ye>>>0){Ze=21;break}}}while(!1);do if((Ze|0)==21)s[11697]|0?(q=0,Ze=28):(q=0,Ze=31);else if((Ze|0)==22){if(ae=(s[11697]|0)!=0,!((q|0)!=0&(Hr^1)))if(ae){Ze=28;break}else{Ze=31;break}Le=q+16|0,n[o+908>>2]=n[Le>>2],Ye=q+20|0,n[o+912>>2]=n[Ye>>2],(s[11698]|0)==0|ae^1||(n[ct>>2]=Iu(We)|0,n[ct+4>>2]=We,xo(o,4,2972,ct),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),d=pa(d,T)|0,m=pa(m,T)|0,Za=+y(h[Le>>2]),Fo=+y(h[Ye>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,E[Lt+8>>3]=+l,E[Lt+16>>3]=+u,E[Lt+24>>3]=Za,E[Lt+32>>3]=Fo,n[Lt+40>>2]=M,xo(o,4,2989,Lt))}while(!1);return(Ze|0)==28&&(ae=Iu(We)|0,n[Le>>2]=ae,n[Le+4>>2]=We,n[Le+8>>2]=Hr?3047:11699,xo(o,4,3038,Le),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),Lt=pa(d,T)|0,Ze=pa(m,T)|0,n[He>>2]=Lt,n[He+4>>2]=Ze,E[He+8>>3]=+l,E[He+16>>3]=+u,n[He+24>>2]=M,xo(o,4,3049,He),Ze=31),(Ze|0)==31&&(Fs(o,l,u,A,d,m,B,k,T,L),s[11697]|0&&(ae=n[2279]|0,Lt=Iu(ae)|0,n[Gr>>2]=Lt,n[Gr+4>>2]=ae,n[Gr+8>>2]=Hr?3047:11699,xo(o,4,3083,Gr),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),Lt=pa(d,T)|0,Gr=pa(m,T)|0,Fo=+y(h[o+908>>2]),Za=+y(h[o+912>>2]),n[fr>>2]=Lt,n[fr+4>>2]=Gr,E[fr+8>>3]=Fo,E[fr+16>>3]=Za,n[fr+24>>2]=M,xo(o,4,3092,fr)),n[o+516>>2]=A,q||(ae=o+520|0,q=n[ae>>2]|0,(q|0)==16&&(s[11697]|0&&xo(o,4,3124,$t),n[ae>>2]=0,q=0),T?q=o+916|0:(n[ae>>2]=q+1,q=o+524+(q*24|0)|0),h[q>>2]=l,h[q+4>>2]=u,n[q+8>>2]=d,n[q+12>>2]=m,n[q+16>>2]=n[o+908>>2],n[q+20>>2]=n[o+912>>2],q=0)),T&&(n[o+416>>2]=n[o+908>>2],n[o+420>>2]=n[o+912>>2],s[o+985>>0]=1,s[Tr>>0]=0),n[2279]=(n[2279]|0)+-1,n[o+512>>2]=n[2278],I=cr,Hr|(q|0)==0|0}function yn(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(K(o,l,u)),y(A+y(re(o,l,u)))}function xo(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=I,I=I+16|0,d=m,n[d>>2]=A,o?A=n[o+976>>2]|0:A=0,Ph(A,o,l,u,d),I=m}function Iu(o){return o=o|0,(o>>>0>60?3201:3201+(60-o)|0)|0}function pa(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+32|0,u=d+12|0,A=d,n[u>>2]=n[254],n[u+4>>2]=n[255],n[u+8>>2]=n[256],n[A>>2]=n[257],n[A+4>>2]=n[258],n[A+8>>2]=n[259],(o|0)>2?o=11699:o=n[(l?A:u)+(o<<2)>>2]|0,I=d,o|0}function Fs(o,l,u,A,d,m,B,k,T,M){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,M=M|0;var L=0,q=0,ae=0,Ye=0,Le=$e,Qe=$e,tt=$e,Ze=$e,ct=$e,He=$e,We=$e,Lt=0,Gr=0,fr=0,$t=$e,Tr=$e,Hr=0,cr=$e,Hn=0,To=0,Ro=0,Fo=0,Za=0,Wh=0,Yh=0,gc=0,Vh=0,Rf=0,Ff=0,Jh=0,Kh=0,zh=0,ln=0,dc=0,Xh=0,Pu=0,Zh=$e,$h=$e,Nf=$e,Of=$e,xu=$e,oo=0,Ll=0,ma=0,mc=0,op=0,ap=$e,Lf=$e,lp=$e,cp=$e,ao=$e,Ms=$e,yc=0,Wn=$e,up=$e,No=$e,ku=$e,Oo=$e,Qu=$e,fp=0,Ap=0,Tu=$e,lo=$e,Ec=0,pp=0,hp=0,gp=0,Nr=$e,ui=0,Us=0,Lo=0,co=0,Mr=0,Ar=0,Ic=0,zt=$e,dp=0,Bi=0;Ic=I,I=I+16|0,oo=Ic+12|0,Ll=Ic+8|0,ma=Ic+4|0,mc=Ic,wi(o,(d|0)==0|(Mt(l)|0)^1,3326),wi(o,(m|0)==0|(Mt(u)|0)^1,3406),Us=At(o,A)|0,n[o+496>>2]=Us,Mr=dr(2,Us)|0,Ar=dr(0,Us)|0,h[o+440>>2]=y(K(o,Mr,B)),h[o+444>>2]=y(re(o,Mr,B)),h[o+428>>2]=y(K(o,Ar,B)),h[o+436>>2]=y(re(o,Ar,B)),h[o+464>>2]=y(vr(o,Mr)),h[o+468>>2]=y(Un(o,Mr)),h[o+452>>2]=y(vr(o,Ar)),h[o+460>>2]=y(Un(o,Ar)),h[o+488>>2]=y(mi(o,Mr,B)),h[o+492>>2]=y(Cs(o,Mr,B)),h[o+476>>2]=y(mi(o,Ar,B)),h[o+484>>2]=y(Cs(o,Ar,B));do if(n[o+964>>2]|0)JA(o,l,u,d,m,B,k);else{if(Lo=o+948|0,co=(n[o+952>>2]|0)-(n[Lo>>2]|0)>>2,!co){lP(o,l,u,d,m,B,k);break}if(!T&&t2(o,l,u,d,m,B,k)|0)break;te(o),dc=o+508|0,s[dc>>0]=0,Mr=dr(n[o+4>>2]|0,Us)|0,Ar=by(Mr,Us)|0,ui=de(Mr)|0,Xh=n[o+8>>2]|0,pp=o+28|0,Pu=(n[pp>>2]|0)!=0,Oo=ui?B:k,Tu=ui?k:B,Zh=y(kh(o,Mr,B)),$h=y(r2(o,Mr,B)),Le=y(kh(o,Ar,B)),Qu=y(Va(o,Mr,B)),lo=y(Va(o,Ar,B)),fr=ui?d:m,Ec=ui?m:d,Nr=ui?Qu:lo,ct=ui?lo:Qu,ku=y(yn(o,2,B)),Ze=y(yn(o,0,B)),Qe=y(y(Zr(o+364|0,B))-Nr),tt=y(y(Zr(o+380|0,B))-Nr),He=y(y(Zr(o+372|0,k))-ct),We=y(y(Zr(o+388|0,k))-ct),Nf=ui?Qe:He,Of=ui?tt:We,ku=y(l-ku),l=y(ku-Nr),Mt(l)|0?Nr=l:Nr=y($n(y(pd(l,tt)),Qe)),up=y(u-Ze),l=y(up-ct),Mt(l)|0?No=l:No=y($n(y(pd(l,We)),He)),Qe=ui?Nr:No,Wn=ui?No:Nr;e:do if((fr|0)==1)for(A=0,q=0;;){if(L=Is(o,q)|0,!A)y(KA(L))>y(0)&&y(Qh(L))>y(0)?A=L:A=0;else if(n2(L)|0){Ye=0;break e}if(q=q+1|0,q>>>0>=co>>>0){Ye=A;break}}else Ye=0;while(!1);Lt=Ye+500|0,Gr=Ye+504|0,A=0,L=0,l=y(0),ae=0;do{if(q=n[(n[Lo>>2]|0)+(ae<<2)>>2]|0,(n[q+36>>2]|0)==1)Py(q),s[q+985>>0]=1,s[q+984>>0]=0;else{vf(q),T&&bh(q,At(q,Us)|0,Qe,Wn,Nr);do if((n[q+24>>2]|0)!=1)if((q|0)==(Ye|0)){n[Lt>>2]=n[2278],h[Gr>>2]=y(0);break}else{cP(o,q,Nr,d,No,Nr,No,m,Us,M);break}else L|0&&(n[L+960>>2]=q),n[q+960>>2]=0,L=q,A=A|0?A:q;while(!1);Ms=y(h[q+504>>2]),l=y(l+y(Ms+y(yn(q,Mr,Nr))))}ae=ae+1|0}while((ae|0)!=(co|0));for(Ro=l>Qe,yc=Pu&((fr|0)==2&Ro)?1:fr,Hn=(Ec|0)==1,Za=Hn&(T^1),Wh=(yc|0)==1,Yh=(yc|0)==2,gc=976+(Mr<<2)|0,Vh=(Ec|2|0)==2,zh=Hn&(Pu^1),Rf=1040+(Ar<<2)|0,Ff=1040+(Mr<<2)|0,Jh=976+(Ar<<2)|0,Kh=(Ec|0)!=1,Ro=Pu&((fr|0)!=0&Ro),To=o+976|0,Hn=Hn^1,l=Qe,Hr=0,Fo=0,Ms=y(0),xu=y(0);;){e:do if(Hr>>>0<co>>>0)for(Gr=n[Lo>>2]|0,ae=0,We=y(0),He=y(0),tt=y(0),Qe=y(0),q=0,L=0,Ye=Hr;;){if(Lt=n[Gr+(Ye<<2)>>2]|0,(n[Lt+36>>2]|0)!=1&&(n[Lt+940>>2]=Fo,(n[Lt+24>>2]|0)!=1)){if(Ze=y(yn(Lt,Mr,Nr)),ln=n[gc>>2]|0,u=y(Zr(Lt+380+(ln<<3)|0,Oo)),ct=y(h[Lt+504>>2]),u=y(pd(u,ct)),u=y($n(y(Zr(Lt+364+(ln<<3)|0,Oo)),u)),Pu&(ae|0)!=0&y(Ze+y(He+u))>l){m=ae,Ze=We,fr=Ye;break e}Ze=y(Ze+u),u=y(He+Ze),Ze=y(We+Ze),n2(Lt)|0&&(tt=y(tt+y(KA(Lt))),Qe=y(Qe-y(ct*y(Qh(Lt))))),L|0&&(n[L+960>>2]=Lt),n[Lt+960>>2]=0,ae=ae+1|0,L=Lt,q=q|0?q:Lt}else Ze=We,u=He;if(Ye=Ye+1|0,Ye>>>0<co>>>0)We=Ze,He=u;else{m=ae,fr=Ye;break}}else m=0,Ze=y(0),tt=y(0),Qe=y(0),q=0,fr=Hr;while(!1);ln=tt>y(0)&tt<y(1),$t=ln?y(1):tt,ln=Qe>y(0)&Qe<y(1),We=ln?y(1):Qe;do if(Wh)ln=51;else if(Ze<Nf&((Mt(Nf)|0)^1))l=Nf,ln=51;else if(Ze>Of&((Mt(Of)|0)^1))l=Of,ln=51;else if(s[(n[To>>2]|0)+3>>0]|0)ln=51;else{if($t!=y(0)&&y(KA(o))!=y(0)){ln=53;break}l=Ze,ln=53}while(!1);if((ln|0)==51&&(ln=0,Mt(l)|0?ln=53:(Tr=y(l-Ze),cr=l)),(ln|0)==53&&(ln=0,Ze<y(0)?(Tr=y(-Ze),cr=l):(Tr=y(0),cr=l)),!Za&&(op=(q|0)==0,!op)){ae=n[gc>>2]|0,Ye=Tr<y(0),ct=y(Tr/We),Lt=Tr>y(0),He=y(Tr/$t),tt=y(0),Ze=y(0),l=y(0),L=q;do u=y(Zr(L+380+(ae<<3)|0,Oo)),Qe=y(Zr(L+364+(ae<<3)|0,Oo)),Qe=y(pd(u,y($n(Qe,y(h[L+504>>2]))))),Ye?(u=y(Qe*y(Qh(L))),u!=y(-0)&&(zt=y(Qe-y(ct*u)),ap=y(qn(L,Mr,zt,cr,Nr)),zt!=ap)&&(tt=y(tt-y(ap-Qe)),l=y(l+u))):Lt&&(Lf=y(KA(L)),Lf!=y(0))&&(zt=y(Qe+y(He*Lf)),lp=y(qn(L,Mr,zt,cr,Nr)),zt!=lp)&&(tt=y(tt-y(lp-Qe)),Ze=y(Ze-Lf)),L=n[L+960>>2]|0;while(L|0);if(l=y(We+l),Qe=y(Tr+tt),op)l=y(0);else{ct=y($t+Ze),Ye=n[gc>>2]|0,Lt=Qe<y(0),Gr=l==y(0),He=y(Qe/l),ae=Qe>y(0),ct=y(Qe/ct),l=y(0);do{zt=y(Zr(q+380+(Ye<<3)|0,Oo)),tt=y(Zr(q+364+(Ye<<3)|0,Oo)),tt=y(pd(zt,y($n(tt,y(h[q+504>>2]))))),Lt?(zt=y(tt*y(Qh(q))),Qe=y(-zt),zt!=y(-0)?(zt=y(He*Qe),Qe=y(qn(q,Mr,y(tt+(Gr?Qe:zt)),cr,Nr))):Qe=tt):ae&&(cp=y(KA(q)),cp!=y(0))?Qe=y(qn(q,Mr,y(tt+y(ct*cp)),cr,Nr)):Qe=tt,l=y(l-y(Qe-tt)),Ze=y(yn(q,Mr,Nr)),u=y(yn(q,Ar,Nr)),Qe=y(Qe+Ze),h[Ll>>2]=Qe,n[mc>>2]=1,tt=y(h[q+396>>2]);e:do if(Mt(tt)|0){L=Mt(Wn)|0;do if(!L){if(Ro|(io(q,Ar,Wn)|0|Hn)||(os(o,q)|0)!=4||(n[(kl(q,Ar)|0)+4>>2]|0)==3||(n[(Ql(q,Ar)|0)+4>>2]|0)==3)break;h[oo>>2]=Wn,n[ma>>2]=1;break e}while(!1);if(io(q,Ar,Wn)|0){L=n[q+992+(n[Jh>>2]<<2)>>2]|0,zt=y(u+y(Zr(L,Wn))),h[oo>>2]=zt,L=Kh&(n[L+4>>2]|0)==2,n[ma>>2]=((Mt(zt)|0|L)^1)&1;break}else{h[oo>>2]=Wn,n[ma>>2]=L?0:2;break}}else zt=y(Qe-Ze),$t=y(zt/tt),zt=y(tt*zt),n[ma>>2]=1,h[oo>>2]=y(u+(ui?$t:zt));while(!1);Cu(q,Mr,cr,Nr,mc,Ll),Cu(q,Ar,Wn,Nr,ma,oo);do if(!(io(q,Ar,Wn)|0)&&(os(o,q)|0)==4){if((n[(kl(q,Ar)|0)+4>>2]|0)==3){L=0;break}L=(n[(Ql(q,Ar)|0)+4>>2]|0)!=3}else L=0;while(!1);zt=y(h[Ll>>2]),$t=y(h[oo>>2]),dp=n[mc>>2]|0,Bi=n[ma>>2]|0,xl(q,ui?zt:$t,ui?$t:zt,Us,ui?dp:Bi,ui?Bi:dp,Nr,No,T&(L^1),3488,M)|0,s[dc>>0]=s[dc>>0]|s[q+508>>0],q=n[q+960>>2]|0}while(q|0)}}else l=y(0);if(l=y(Tr+l),Bi=l<y(0)&1,s[dc>>0]=Bi|c[dc>>0],Yh&l>y(0)?(L=n[gc>>2]|0,n[o+364+(L<<3)+4>>2]|0&&(ao=y(Zr(o+364+(L<<3)|0,Oo)),ao>=y(0))?Qe=y($n(y(0),y(ao-y(cr-l)))):Qe=y(0)):Qe=l,Lt=Hr>>>0<fr>>>0,Lt){Ye=n[Lo>>2]|0,ae=Hr,L=0;do q=n[Ye+(ae<<2)>>2]|0,n[q+24>>2]|0||(L=((n[(kl(q,Mr)|0)+4>>2]|0)==3&1)+L|0,L=L+((n[(Ql(q,Mr)|0)+4>>2]|0)==3&1)|0),ae=ae+1|0;while((ae|0)!=(fr|0));L?(Ze=y(0),u=y(0)):ln=101}else ln=101;e:do if((ln|0)==101)switch(ln=0,Xh|0){case 1:{L=0,Ze=y(Qe*y(.5)),u=y(0);break e}case 2:{L=0,Ze=Qe,u=y(0);break e}case 3:{if(m>>>0<=1){L=0,Ze=y(0),u=y(0);break e}u=y((m+-1|0)>>>0),L=0,Ze=y(0),u=y(y($n(Qe,y(0)))/u);break e}case 5:{u=y(Qe/y((m+1|0)>>>0)),L=0,Ze=u;break e}case 4:{u=y(Qe/y(m>>>0)),L=0,Ze=y(u*y(.5));break e}default:{L=0,Ze=y(0),u=y(0);break e}}while(!1);if(l=y(Zh+Ze),Lt){tt=y(Qe/y(L|0)),ae=n[Lo>>2]|0,q=Hr,Qe=y(0);do{L=n[ae+(q<<2)>>2]|0;e:do if((n[L+36>>2]|0)!=1){switch(n[L+24>>2]|0){case 1:{if(ha(L,Mr)|0){if(!T)break e;zt=y(zA(L,Mr,cr)),zt=y(zt+y(vr(o,Mr))),zt=y(zt+y(K(L,Mr,Nr))),h[L+400+(n[Ff>>2]<<2)>>2]=zt;break e}break}case 0:if(Bi=(n[(kl(L,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,T&&(Bi=L+400+(n[Ff>>2]<<2)|0,h[Bi>>2]=y(l+y(h[Bi>>2]))),Bi=(n[(Ql(L,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,Za){zt=y(u+y(yn(L,Mr,Nr))),Qe=Wn,l=y(l+y(zt+y(h[L+504>>2])));break e}else{l=y(l+y(u+y(XA(L,Mr,Nr)))),Qe=y($n(Qe,y(XA(L,Ar,Nr))));break e}default:}T&&(zt=y(Ze+y(vr(o,Mr))),Bi=L+400+(n[Ff>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2])))}while(!1);q=q+1|0}while((q|0)!=(fr|0))}else Qe=y(0);if(u=y($h+l),Vh?Ze=y(y(qn(o,Ar,y(lo+Qe),Tu,B))-lo):Ze=Wn,tt=y(y(qn(o,Ar,y(lo+(zh?Wn:Qe)),Tu,B))-lo),Lt&T){q=Hr;do{ae=n[(n[Lo>>2]|0)+(q<<2)>>2]|0;do if((n[ae+36>>2]|0)!=1){if((n[ae+24>>2]|0)==1){if(ha(ae,Ar)|0){if(zt=y(zA(ae,Ar,Wn)),zt=y(zt+y(vr(o,Ar))),zt=y(zt+y(K(ae,Ar,Nr))),L=n[Rf>>2]|0,h[ae+400+(L<<2)>>2]=zt,!(Mt(zt)|0))break}else L=n[Rf>>2]|0;zt=y(vr(o,Ar)),h[ae+400+(L<<2)>>2]=y(zt+y(K(ae,Ar,Nr)));break}L=os(o,ae)|0;do if((L|0)==4){if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){ln=139;break}if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){ln=139;break}if(io(ae,Ar,Wn)|0){l=Le;break}dp=n[ae+908+(n[gc>>2]<<2)>>2]|0,n[oo>>2]=dp,l=y(h[ae+396>>2]),Bi=Mt(l)|0,Qe=(n[S>>2]=dp,y(h[S>>2])),Bi?l=tt:(Tr=y(yn(ae,Ar,Nr)),zt=y(Qe/l),l=y(l*Qe),l=y(Tr+(ui?zt:l))),h[Ll>>2]=l,h[oo>>2]=y(y(yn(ae,Mr,Nr))+Qe),n[ma>>2]=1,n[mc>>2]=1,Cu(ae,Mr,cr,Nr,ma,oo),Cu(ae,Ar,Wn,Nr,mc,Ll),l=y(h[oo>>2]),Tr=y(h[Ll>>2]),zt=ui?l:Tr,l=ui?Tr:l,Bi=((Mt(zt)|0)^1)&1,xl(ae,zt,l,Us,Bi,((Mt(l)|0)^1)&1,Nr,No,1,3493,M)|0,l=Le}else ln=139;while(!1);e:do if((ln|0)==139){ln=0,l=y(Ze-y(XA(ae,Ar,Nr)));do if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){if((n[(Ql(ae,Ar)|0)+4>>2]|0)!=3)break;l=y(Le+y($n(y(0),y(l*y(.5)))));break e}while(!1);if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){l=Le;break}if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){l=y(Le+y($n(y(0),l)));break}switch(L|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(!1);zt=y(Ms+l),Bi=ae+400+(n[Rf>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2]))}while(!1);q=q+1|0}while((q|0)!=(fr|0))}if(Ms=y(Ms+tt),xu=y($n(xu,u)),m=Fo+1|0,fr>>>0>=co>>>0)break;l=cr,Hr=fr,Fo=m}do if(T){if(L=m>>>0>1,!L&&!(jL(o)|0))break;if(!(Mt(Wn)|0)){l=y(Wn-Ms);e:do switch(n[o+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Wn>Ms?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Wn>Ms){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=L?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(Fo>>>0)),He=Wn>Ms&L?He:y(0);break}default:He=y(0)}while(!1);if(m|0)for(Lt=1040+(Ar<<2)|0,Gr=976+(Ar<<2)|0,Ye=0,q=0;;){e:do if(q>>>0<co>>>0)for(Qe=y(0),tt=y(0),l=y(0),ae=q;;){L=n[(n[Lo>>2]|0)+(ae<<2)>>2]|0;do if((n[L+36>>2]|0)!=1&&!(n[L+24>>2]|0)){if((n[L+940>>2]|0)!=(Ye|0))break e;if(qL(L,Ar)|0&&(zt=y(h[L+908+(n[Gr>>2]<<2)>>2]),l=y($n(l,y(zt+y(yn(L,Ar,Nr)))))),(os(o,L)|0)!=5)break;ao=y(Yg(L)),ao=y(ao+y(K(L,0,Nr))),zt=y(h[L+912>>2]),zt=y(y(zt+y(yn(L,0,Nr)))-ao),ao=y($n(tt,ao)),zt=y($n(Qe,zt)),Qe=zt,tt=ao,l=y($n(l,y(ao+zt)))}while(!1);if(L=ae+1|0,L>>>0<co>>>0)ae=L;else{ae=L;break}}else tt=y(0),l=y(0),ae=q;while(!1);if(ct=y(He+l),u=Le,Le=y(Le+ct),q>>>0<ae>>>0){Ze=y(u+tt),L=q;do{q=n[(n[Lo>>2]|0)+(L<<2)>>2]|0;e:do if((n[q+36>>2]|0)!=1&&!(n[q+24>>2]|0))switch(os(o,q)|0){case 1:{zt=y(u+y(K(q,Ar,Nr))),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 3:{zt=y(y(Le-y(re(q,Ar,Nr)))-y(h[q+908+(n[Gr>>2]<<2)>>2])),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 2:{zt=y(u+y(y(ct-y(h[q+908+(n[Gr>>2]<<2)>>2]))*y(.5))),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 4:{if(zt=y(u+y(K(q,Ar,Nr))),h[q+400+(n[Lt>>2]<<2)>>2]=zt,io(q,Ar,Wn)|0||(ui?(Qe=y(h[q+908>>2]),l=y(Qe+y(yn(q,Mr,Nr))),tt=ct):(tt=y(h[q+912>>2]),tt=y(tt+y(yn(q,Ar,Nr))),l=ct,Qe=y(h[q+908>>2])),mn(l,Qe)|0&&mn(tt,y(h[q+912>>2]))|0))break e;xl(q,l,tt,Us,1,1,Nr,No,1,3501,M)|0;break e}case 5:{h[q+404>>2]=y(y(Ze-y(Yg(q)))+y(zA(q,0,Wn)));break e}default:break e}while(!1);L=L+1|0}while((L|0)!=(ae|0))}if(Ye=Ye+1|0,(Ye|0)==(m|0))break;q=ae}}}while(!1);if(h[o+908>>2]=y(qn(o,2,ku,B,B)),h[o+912>>2]=y(qn(o,0,up,k,B)),yc|0&&(fp=n[o+32>>2]|0,Ap=(yc|0)==2,!(Ap&(fp|0)!=2))?Ap&(fp|0)==2&&(l=y(Qu+cr),l=y($n(y(pd(l,y(Vg(o,Mr,xu,Oo)))),Qu)),ln=198):(l=y(qn(o,Mr,xu,Oo,B)),ln=198),(ln|0)==198&&(h[o+908+(n[976+(Mr<<2)>>2]<<2)>>2]=l),Ec|0&&(hp=n[o+32>>2]|0,gp=(Ec|0)==2,!(gp&(hp|0)!=2))?gp&(hp|0)==2&&(l=y(lo+Wn),l=y($n(y(pd(l,y(Vg(o,Ar,y(lo+Ms),Tu)))),lo)),ln=204):(l=y(qn(o,Ar,y(lo+Ms),Tu,B)),ln=204),(ln|0)==204&&(h[o+908+(n[976+(Ar<<2)>>2]<<2)>>2]=l),T){if((n[pp>>2]|0)==2){q=976+(Ar<<2)|0,ae=1040+(Ar<<2)|0,L=0;do Ye=Is(o,L)|0,n[Ye+24>>2]|0||(dp=n[q>>2]|0,zt=y(h[o+908+(dp<<2)>>2]),Bi=Ye+400+(n[ae>>2]<<2)|0,zt=y(zt-y(h[Bi>>2])),h[Bi>>2]=y(zt-y(h[Ye+908+(dp<<2)>>2]))),L=L+1|0;while((L|0)!=(co|0))}if(A|0){L=ui?yc:d;do WL(o,A,Nr,L,No,Us,M),A=n[A+960>>2]|0;while(A|0)}if(L=(Mr|2|0)==3,q=(Ar|2|0)==3,L|q){A=0;do ae=n[(n[Lo>>2]|0)+(A<<2)>>2]|0,(n[ae+36>>2]|0)!=1&&(L&&i2(o,ae,Mr),q&&i2(o,ae,Ar)),A=A+1|0;while((A|0)!=(co|0))}}}while(!1);I=Ic}function Dh(o,l){o=o|0,l=y(l);var u=0;Ha(o,l>=y(0),3147),u=l==y(0),h[o+4>>2]=u?y(0):l}function YA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=A|0;var d=$e,m=$e,B=0,k=0,T=0;n[2278]=(n[2278]|0)+1,vf(o),io(o,2,l)|0?(d=y(Zr(n[o+992>>2]|0,l)),T=1,d=y(d+y(yn(o,2,l)))):(d=y(Zr(o+380|0,l)),d>=y(0)?T=2:(T=((Mt(l)|0)^1)&1,d=l)),io(o,0,u)|0?(m=y(Zr(n[o+996>>2]|0,u)),k=1,m=y(m+y(yn(o,0,l)))):(m=y(Zr(o+388|0,u)),m>=y(0)?k=2:(k=((Mt(u)|0)^1)&1,m=u)),B=o+976|0,xl(o,d,m,A,T,k,l,u,1,3189,n[B>>2]|0)|0&&(bh(o,n[o+496>>2]|0,l,u,l),VA(o,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),s[11696]|0)&&Gg(o,7)}function vf(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;k=I,I=I+32|0,B=k+24|0,m=k+16|0,A=k+8|0,d=k,u=0;do l=o+380+(u<<3)|0,n[o+380+(u<<3)+4>>2]|0&&(T=l,M=n[T+4>>2]|0,L=A,n[L>>2]=n[T>>2],n[L+4>>2]=M,L=o+364+(u<<3)|0,M=n[L+4>>2]|0,T=d,n[T>>2]=n[L>>2],n[T+4>>2]=M,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],Cf(m,B)|0)||(l=o+348+(u<<3)|0),n[o+992+(u<<2)>>2]=l,u=u+1|0;while((u|0)!=2);I=k}function io(o,l,u){o=o|0,l=l|0,u=y(u);var A=0;switch(o=n[o+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[o+4>>2]|0){case 0:case 3:{o=0;break}case 1:{y(h[o>>2])<y(0)?o=0:A=5;break}case 2:{y(h[o>>2])<y(0)?o=0:o=(Mt(u)|0)^1;break}default:A=5}return(A|0)==5&&(o=1),o|0}function Zr(o,l){switch(o=o|0,l=y(l),n[o+4>>2]|0){case 2:{l=y(y(y(h[o>>2])*l)/y(100));break}case 1:{l=y(h[o>>2]);break}default:l=y(le)}return y(l)}function bh(o,l,u,A,d){o=o|0,l=l|0,u=y(u),A=y(A),d=y(d);var m=0,B=$e;l=n[o+944>>2]|0?l:1,m=dr(n[o+4>>2]|0,l)|0,l=by(m,l)|0,u=y(uP(o,m,u)),A=y(uP(o,l,A)),B=y(u+y(K(o,m,d))),h[o+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,u=y(u+y(re(o,m,d))),h[o+400+(n[1e3+(m<<2)>>2]<<2)>>2]=u,u=y(A+y(K(o,l,d))),h[o+400+(n[1040+(l<<2)>>2]<<2)>>2]=u,d=y(A+y(re(o,l,d))),h[o+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function VA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=y(A);var d=0,m=0,B=$e,k=$e,T=0,M=0,L=$e,q=0,ae=$e,Ye=$e,Le=$e,Qe=$e;if(l!=y(0)&&(d=o+400|0,Qe=y(h[d>>2]),m=o+404|0,Le=y(h[m>>2]),q=o+416|0,Ye=y(h[q>>2]),M=o+420|0,B=y(h[M>>2]),ae=y(Qe+u),L=y(Le+A),A=y(ae+Ye),k=y(L+B),T=(n[o+988>>2]|0)==1,h[d>>2]=y(ss(Qe,l,0,T)),h[m>>2]=y(ss(Le,l,0,T)),u=y(uU(y(Ye*l),y(1))),mn(u,y(0))|0?m=0:m=(mn(u,y(1))|0)^1,u=y(uU(y(B*l),y(1))),mn(u,y(0))|0?d=0:d=(mn(u,y(1))|0)^1,Qe=y(ss(A,l,T&m,T&(m^1))),h[q>>2]=y(Qe-y(ss(ae,l,0,T))),Qe=y(ss(k,l,T&d,T&(d^1))),h[M>>2]=y(Qe-y(ss(L,l,0,T))),m=(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2,m|0)){d=0;do VA(Is(o,d)|0,l,ae,L),d=d+1|0;while((d|0)!=(m|0))}}function Sy(o,l,u,A,d){switch(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,u|0){case 5:case 0:{o=IZ(n[489]|0,A,d)|0;break}default:o=b6e(A,d)|0}return o|0}function Wg(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;d=I,I=I+16|0,m=d,n[m>>2]=A,Ph(o,0,l,u,m),I=d}function Ph(o,l,u,A,d){if(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,o=o|0?o:956,HZ[n[o+8>>2]&1](o,l,u,A,d)|0,(u|0)==5)Nt();else return}function pc(o,l,u){o=o|0,l=l|0,u=u|0,s[o+l>>0]=u&1}function Dy(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(xh(o,A),kt(o,n[l>>2]|0,n[u>>2]|0,A))}function xh(o,l){o=o|0,l=l|0;var u=0;if((O(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function kt(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function O(o){return o=o|0,1073741823}function K(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+96>>2]|0?o=o+92|0:o=kn(o+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Je(o,u))}function re(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+104>>2]|0?o=o+100|0:o=kn(o+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Je(o,u))}function de(o){return o=o|0,(o|1|0)==3|0}function Je(o,l){return o=o|0,l=y(l),(n[o+4>>2]|0)==3?l=y(0):l=y(Zr(o,l)),y(l)}function At(o,l){return o=o|0,l=l|0,o=n[o>>2]|0,(o|0?o:(l|0)>1?l:1)|0}function dr(o,l){o=o|0,l=l|0;var u=0;e:do if((l|0)==2){switch(o|0){case 2:{o=3;break e}case 3:break;default:{u=4;break e}}o=2}else u=4;while(!1);return o|0}function vr(o,l){o=o|0,l=l|0;var u=$e;return de(l)|0&&n[o+312>>2]|0&&(u=y(h[o+308>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function Un(o,l){o=o|0,l=l|0;var u=$e;return de(l)|0&&n[o+320>>2]|0&&(u=y(h[o+316>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function mi(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return de(l)|0&&n[o+240>>2]|0&&(A=y(Zr(o+236|0,u)),A>=y(0))||(A=y($n(y(Zr(kn(o+204|0,n[1040+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function Cs(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return de(l)|0&&n[o+248>>2]|0&&(A=y(Zr(o+244|0,u)),A>=y(0))||(A=y($n(y(Zr(kn(o+204|0,n[1e3+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function JA(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=$e,T=$e,M=$e,L=$e,q=$e,ae=$e,Ye=0,Le=0,Qe=0;Qe=I,I=I+16|0,Ye=Qe,Le=o+964|0,wi(o,(n[Le>>2]|0)!=0,3519),k=y(Va(o,2,l)),T=y(Va(o,0,l)),M=y(yn(o,2,l)),L=y(yn(o,0,l)),Mt(l)|0?q=l:q=y($n(y(0),y(y(l-M)-k))),Mt(u)|0?ae=u:ae=y($n(y(0),y(y(u-L)-T))),(A|0)==1&(d|0)==1?(h[o+908>>2]=y(qn(o,2,y(l-M),m,m)),l=y(qn(o,0,y(u-L),B,m))):(jZ[n[Le>>2]&1](Ye,o,q,A,ae,d),q=y(k+y(h[Ye>>2])),ae=y(l-M),h[o+908>>2]=y(qn(o,2,(A|2|0)==2?q:ae,m,m)),ae=y(T+y(h[Ye+4>>2])),l=y(u-L),l=y(qn(o,0,(d|2|0)==2?ae:l,B,m))),h[o+912>>2]=l,I=Qe}function lP(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=$e,T=$e,M=$e,L=$e;M=y(Va(o,2,m)),k=y(Va(o,0,m)),L=y(yn(o,2,m)),T=y(yn(o,0,m)),l=y(l-L),h[o+908>>2]=y(qn(o,2,(A|2|0)==2?M:l,m,m)),u=y(u-T),h[o+912>>2]=y(qn(o,0,(d|2|0)==2?k:u,B,m))}function t2(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=0,T=$e,M=$e;return k=(A|0)==2,!(l<=y(0)&k)&&!(u<=y(0)&(d|0)==2)&&!((A|0)==1&(d|0)==1)?o=0:(T=y(yn(o,0,m)),M=y(yn(o,2,m)),k=l<y(0)&k|(Mt(l)|0),l=y(l-M),h[o+908>>2]=y(qn(o,2,k?y(0):l,m,m)),l=y(u-T),k=u<y(0)&(d|0)==2|(Mt(u)|0),h[o+912>>2]=y(qn(o,0,k?y(0):l,B,m)),o=1),o|0}function by(o,l){return o=o|0,l=l|0,Jg(o)|0?o=dr(2,l)|0:o=0,o|0}function kh(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(mi(o,l,u)),y(u+y(vr(o,l)))}function r2(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(Cs(o,l,u)),y(u+y(Un(o,l)))}function Va(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(kh(o,l,u)),y(A+y(r2(o,l,u)))}function n2(o){return o=o|0,n[o+24>>2]|0?o=0:y(KA(o))!=y(0)?o=1:o=y(Qh(o))!=y(0),o|0}function KA(o){o=o|0;var l=$e;if(n[o+944>>2]|0){if(l=y(h[o+44>>2]),Mt(l)|0)return l=y(h[o+40>>2]),o=l>y(0)&((Mt(l)|0)^1),y(o?l:y(0))}else l=y(0);return y(l)}function Qh(o){o=o|0;var l=$e,u=0,A=$e;do if(n[o+944>>2]|0){if(l=y(h[o+48>>2]),Mt(l)|0){if(u=s[(n[o+976>>2]|0)+2>>0]|0,!(u<<24>>24)&&(A=y(h[o+40>>2]),A<y(0)&((Mt(A)|0)^1))){l=y(-A);break}l=u<<24>>24?y(1):y(0)}}else l=y(0);while(!1);return y(l)}function Py(o){o=o|0;var l=0,u=0;if(eE(o+400|0,0,540)|0,s[o+985>>0]=1,te(o),u=Mi(o)|0,u|0){l=o+948|0,o=0;do Py(n[(n[l>>2]|0)+(o<<2)>>2]|0),o=o+1|0;while((o|0)!=(u|0))}}function cP(o,l,u,A,d,m,B,k,T,M){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=y(m),B=y(B),k=k|0,T=T|0,M=M|0;var L=0,q=$e,ae=0,Ye=0,Le=$e,Qe=$e,tt=0,Ze=$e,ct=0,He=$e,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,To=0;Hn=I,I=I+16|0,Gr=Hn+12|0,fr=Hn+8|0,$t=Hn+4|0,Tr=Hn,cr=dr(n[o+4>>2]|0,T)|0,We=de(cr)|0,q=y(Zr(YL(l)|0,We?m:B)),Lt=io(l,2,m)|0,Hr=io(l,0,B)|0;do if(!(Mt(q)|0)&&!(Mt(We?u:d)|0)){if(L=l+504|0,!(Mt(y(h[L>>2]))|0)&&(!(s2(n[l+976>>2]|0,0)|0)||(n[l+500>>2]|0)==(n[2278]|0)))break;h[L>>2]=y($n(q,y(Va(l,cr,m))))}else ae=7;while(!1);do if((ae|0)==7){if(ct=We^1,!(ct|Lt^1)){B=y(Zr(n[l+992>>2]|0,m)),h[l+504>>2]=y($n(B,y(Va(l,2,m))));break}if(!(We|Hr^1)){B=y(Zr(n[l+996>>2]|0,B)),h[l+504>>2]=y($n(B,y(Va(l,0,m))));break}h[Gr>>2]=y(le),h[fr>>2]=y(le),n[$t>>2]=0,n[Tr>>2]=0,Ze=y(yn(l,2,m)),He=y(yn(l,0,m)),Lt?(Le=y(Ze+y(Zr(n[l+992>>2]|0,m))),h[Gr>>2]=Le,n[$t>>2]=1,Ye=1):(Ye=0,Le=y(le)),Hr?(q=y(He+y(Zr(n[l+996>>2]|0,B))),h[fr>>2]=q,n[Tr>>2]=1,L=1):(L=0,q=y(le)),ae=n[o+32>>2]|0,We&(ae|0)==2?ae=2:Mt(Le)|0&&!(Mt(u)|0)&&(h[Gr>>2]=u,n[$t>>2]=2,Ye=2,Le=u),!((ae|0)==2&ct)&&Mt(q)|0&&!(Mt(d)|0)&&(h[fr>>2]=d,n[Tr>>2]=2,L=2,q=d),Qe=y(h[l+396>>2]),tt=Mt(Qe)|0;do if(tt)ae=Ye;else{if((Ye|0)==1&ct){h[fr>>2]=y(y(Le-Ze)/Qe),n[Tr>>2]=1,L=1,ae=1;break}We&(L|0)==1?(h[Gr>>2]=y(Qe*y(q-He)),n[$t>>2]=1,L=1,ae=1):ae=Ye}while(!1);To=Mt(u)|0,Ye=(os(o,l)|0)!=4,!(We|Lt|((A|0)!=1|To)|(Ye|(ae|0)==1))&&(h[Gr>>2]=u,n[$t>>2]=1,!tt)&&(h[fr>>2]=y(y(u-Ze)/Qe),n[Tr>>2]=1,L=1),!(Hr|ct|((k|0)!=1|(Mt(d)|0))|(Ye|(L|0)==1))&&(h[fr>>2]=d,n[Tr>>2]=1,!tt)&&(h[Gr>>2]=y(Qe*y(d-He)),n[$t>>2]=1),Cu(l,2,m,m,$t,Gr),Cu(l,0,B,m,Tr,fr),u=y(h[Gr>>2]),d=y(h[fr>>2]),xl(l,u,d,T,n[$t>>2]|0,n[Tr>>2]|0,m,B,0,3565,M)|0,B=y(h[l+908+(n[976+(cr<<2)>>2]<<2)>>2]),h[l+504>>2]=y($n(B,y(Va(l,cr,m))))}while(!1);n[l+500>>2]=n[2278],I=Hn}function qn(o,l,u,A,d){return o=o|0,l=l|0,u=y(u),A=y(A),d=y(d),A=y(Vg(o,l,u,A)),y($n(A,y(Va(o,l,d))))}function os(o,l){return o=o|0,l=l|0,l=l+20|0,l=n[(n[l>>2]|0?l:o+16|0)>>2]|0,(l|0)==5&&Jg(n[o+4>>2]|0)|0&&(l=1),l|0}function kl(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+96>>2]|0?l=4:l=n[1040+(l<<2)>>2]|0,o+60+(l<<3)|0}function Ql(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+104>>2]|0?l=5:l=n[1e3+(l<<2)>>2]|0,o+60+(l<<3)|0}function Cu(o,l,u,A,d,m){switch(o=o|0,l=l|0,u=y(u),A=y(A),d=d|0,m=m|0,u=y(Zr(o+380+(n[976+(l<<2)>>2]<<3)|0,u)),u=y(u+y(yn(o,l,A))),n[d>>2]|0){case 2:case 1:{d=Mt(u)|0,A=y(h[m>>2]),h[m>>2]=d|A<u?A:u;break}case 0:{Mt(u)|0||(n[d>>2]=2,h[m>>2]=u);break}default:}}function ha(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,4,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function zA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,4,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1040+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Zr(A,u))),y(u)}function XA(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),A=y(A+y(K(o,l,u))),y(A+y(re(o,l,u)))}function jL(o){o=o|0;var l=0,u=0,A=0;e:do if(Jg(n[o+4>>2]|0)|0)l=0;else if((n[o+16>>2]|0)!=5)if(u=Mi(o)|0,!u)l=0;else for(l=0;;){if(A=Is(o,l)|0,!(n[A+24>>2]|0)&&(n[A+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=u>>>0){l=0;break}}else l=1;while(!1);return l|0}function qL(o,l){o=o|0,l=l|0;var u=$e;return u=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),u>=y(0)&((Mt(u)|0)^1)|0}function Yg(o){o=o|0;var l=$e,u=0,A=0,d=0,m=0,B=0,k=0,T=$e;if(u=n[o+968>>2]|0,u)T=y(h[o+908>>2]),l=y(h[o+912>>2]),l=y(LZ[u&0](o,T,l)),wi(o,(Mt(l)|0)^1,3573);else{m=Mi(o)|0;do if(m|0){for(u=0,d=0;;){if(A=Is(o,d)|0,n[A+940>>2]|0){B=8;break}if((n[A+24>>2]|0)!=1)if(k=(os(o,A)|0)==5,k){u=A;break}else u=u|0?u:A;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!u)break;return l=y(Yg(u)),y(l+y(h[u+404>>2]))}while(!1);l=y(h[o+912>>2])}return y(l)}function Vg(o,l,u,A){o=o|0,l=l|0,u=y(u),A=y(A);var d=$e,m=0;return Jg(l)|0?(l=1,m=3):de(l)|0?(l=0,m=3):(A=y(le),d=y(le)),(m|0)==3&&(d=y(Zr(o+364+(l<<3)|0,A)),A=y(Zr(o+380+(l<<3)|0,A))),m=A<u&(A>=y(0)&((Mt(A)|0)^1)),u=m?A:u,m=d>=y(0)&((Mt(d)|0)^1)&u<d,y(m?d:u)}function WL(o,l,u,A,d,m,B){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,B=B|0;var k=$e,T=$e,M=0,L=0,q=$e,ae=$e,Ye=$e,Le=0,Qe=0,tt=0,Ze=0,ct=$e,He=0;tt=dr(n[o+4>>2]|0,m)|0,Le=by(tt,m)|0,Qe=de(tt)|0,q=y(yn(l,2,u)),ae=y(yn(l,0,u)),io(l,2,u)|0?k=y(q+y(Zr(n[l+992>>2]|0,u))):ha(l,2)|0&&xy(l,2)|0?(k=y(h[o+908>>2]),T=y(vr(o,2)),T=y(k-y(T+y(Un(o,2)))),k=y(zA(l,2,u)),k=y(qn(l,2,y(T-y(k+y(Th(l,2,u)))),u,u))):k=y(le),io(l,0,d)|0?T=y(ae+y(Zr(n[l+996>>2]|0,d))):ha(l,0)|0&&xy(l,0)|0?(T=y(h[o+912>>2]),ct=y(vr(o,0)),ct=y(T-y(ct+y(Un(o,0)))),T=y(zA(l,0,d)),T=y(qn(l,0,y(ct-y(T+y(Th(l,0,d)))),d,u))):T=y(le),M=Mt(k)|0,L=Mt(T)|0;do if(M^L&&(Ye=y(h[l+396>>2]),!(Mt(Ye)|0)))if(M){k=y(q+y(y(T-ae)*Ye));break}else{ct=y(ae+y(y(k-q)/Ye)),T=L?ct:T;break}while(!1);L=Mt(k)|0,M=Mt(T)|0,L|M&&(He=(L^1)&1,A=u>y(0)&((A|0)!=0&L),k=Qe?k:A?u:k,xl(l,k,T,m,Qe?He:A?2:He,L&(M^1)&1,k,T,0,3623,B)|0,k=y(h[l+908>>2]),k=y(k+y(yn(l,2,u))),T=y(h[l+912>>2]),T=y(T+y(yn(l,0,u)))),xl(l,k,T,m,1,1,k,T,1,3635,B)|0,xy(l,tt)|0&&!(ha(l,tt)|0)?(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(Un(o,tt))),ct=y(ct-y(re(l,tt,u))),ct=y(ct-y(Th(l,tt,Qe?u:d))),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct):Ze=21;do if((Ze|0)==21){if(!(ha(l,tt)|0)&&(n[o+8>>2]|0)==1){He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct;break}!(ha(l,tt)|0)&&(n[o+8>>2]|0)==2&&(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct)}while(!1);xy(l,Le)|0&&!(ha(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(Un(o,Le))),ct=y(ct-y(re(l,Le,u))),ct=y(ct-y(Th(l,Le,Qe?d:u))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct):Ze=30;do if((Ze|0)==30&&!(ha(l,Le)|0)){if((os(o,l)|0)==2){He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct;break}He=(os(o,l)|0)==3,He^(n[o+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct)}while(!1)}function i2(o,l,u){o=o|0,l=l|0,u=u|0;var A=$e,d=0;d=n[976+(u<<2)>>2]|0,A=y(h[l+908+(d<<2)>>2]),A=y(y(h[o+908+(d<<2)>>2])-A),A=y(A-y(h[l+400+(n[1040+(u<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(u<<2)>>2]<<2)>>2]=A}function Jg(o){return o=o|0,(o|1|0)==1|0}function YL(o){o=o|0;var l=$e;switch(n[o+56>>2]|0){case 0:case 3:{l=y(h[o+40>>2]),l>y(0)&((Mt(l)|0)^1)?o=s[(n[o+976>>2]|0)+2>>0]|0?1056:992:o=1056;break}default:o=o+52|0}return o|0}function s2(o,l){return o=o|0,l=l|0,(s[o+l>>0]|0)!=0|0}function xy(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,5,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function Th(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,5,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1e3+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Zr(A,u))),y(u)}function uP(o,l,u){return o=o|0,l=l|0,u=y(u),ha(o,l)|0?u=y(zA(o,l,u)):u=y(-y(Th(o,l,u))),y(u)}function fP(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function ky(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function AP(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Qy(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&It(o)}function pP(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;if(B=o+4|0,k=n[B>>2]|0,d=k-A|0,m=d>>2,o=l+(m<<2)|0,o>>>0<u>>>0){A=k;do n[A>>2]=n[o>>2],o=o+4|0,A=(n[B>>2]|0)+4|0,n[B>>2]=A;while(o>>>0<u>>>0)}m|0&&Q2(k+(0-m<<2)|0,l|0,d|0)|0}function hP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return k=l+4|0,T=n[k>>2]|0,d=n[o>>2]|0,B=u,m=B-d|0,A=T+(0-(m>>2)<<2)|0,n[k>>2]=A,(m|0)>0&&Qr(A|0,d|0,m|0)|0,d=o+4|0,m=l+8|0,A=(n[d>>2]|0)-B|0,(A|0)>0&&(Qr(n[m>>2]|0,u|0,A|0)|0,n[m>>2]=(n[m>>2]|0)+(A>>>2<<2)),B=n[o>>2]|0,n[o>>2]=n[k>>2],n[k>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=o+8|0,u=l+12|0,o=n[B>>2]|0,n[B>>2]=n[u>>2],n[u>>2]=o,n[l>>2]=n[k>>2],T|0}function o2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[u>>2]|0,(B|0)!=(m|0)){d=o+8|0,u=((m+-4-B|0)>>>2)+1|0,o=B,A=n[d>>2]|0;do n[A>>2]=n[o>>2],A=(n[d>>2]|0)+4|0,n[d>>2]=A,o=o+4|0;while((o|0)!=(m|0));n[l>>2]=B+(u<<2)}}function a2(){ua()}function gP(){var o=0;return o=Kt(4)|0,l2(o),o|0}function l2(o){o=o|0,n[o>>2]=Ac()|0}function dP(o){o=o|0,o|0&&(Kg(o),It(o))}function Kg(o){o=o|0,st(n[o>>2]|0)}function VL(o,l,u){o=o|0,l=l|0,u=u|0,pc(n[o>>2]|0,l,u)}function Ty(o,l){o=o|0,l=y(l),Dh(n[o>>2]|0,l)}function Ry(o,l){return o=o|0,l=l|0,s2(n[o>>2]|0,l)|0}function Fy(){var o=0;return o=Kt(8)|0,zg(o,0),o|0}function zg(o,l){o=o|0,l=l|0,l?l=fa(n[l>>2]|0)|0:l=ns()|0,n[o>>2]=l,n[o+4>>2]=0,Tn(l,o)}function Ny(o){o=o|0;var l=0;return l=Kt(8)|0,zg(l,o),l|0}function Xg(o){o=o|0,o|0&&(Oy(o),It(o))}function Oy(o){o=o|0;var l=0;uc(n[o>>2]|0),l=o+4|0,o=n[l>>2]|0,n[l>>2]=0,o|0&&(Sf(o),It(o))}function Sf(o){o=o|0,Df(o)}function Df(o){o=o|0,o=n[o>>2]|0,o|0&&Na(o|0)}function c2(o){return o=o|0,Ga(o)|0}function u2(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Sf(l),It(l)),fc(n[o>>2]|0)}function Ly(o,l){o=o|0,l=l|0,An(n[o>>2]|0,n[l>>2]|0)}function JL(o,l){o=o|0,l=l|0,wh(n[o>>2]|0,l)}function KL(o,l,u){o=o|0,l=l|0,u=+u,Cy(n[o>>2]|0,l,y(u))}function My(o,l,u){o=o|0,l=l|0,u=+u,wy(n[o>>2]|0,l,y(u))}function f2(o,l){o=o|0,l=l|0,Eh(n[o>>2]|0,l)}function A2(o,l){o=o|0,l=l|0,So(n[o>>2]|0,l)}function xr(o,l){o=o|0,l=l|0,Ch(n[o>>2]|0,l)}function so(o,l){o=o|0,l=l|0,my(n[o>>2]|0,l)}function Xi(o,l){o=o|0,l=l|0,Ng(n[o>>2]|0,l)}function Ns(o,l){o=o|0,l=l|0,vo(n[o>>2]|0,l)}function ZA(o,l,u){o=o|0,l=l|0,u=+u,HA(n[o>>2]|0,l,y(u))}function p2(o,l,u){o=o|0,l=l|0,u=+u,Y(n[o>>2]|0,l,y(u))}function ws(o,l){o=o|0,l=l|0,jA(n[o>>2]|0,l)}function Uy(o,l){o=o|0,l=l|0,Ey(n[o>>2]|0,l)}function Rh(o,l){o=o|0,l=l|0,Do(n[o>>2]|0,l)}function Zg(o,l){o=o|0,l=+l,Bh(n[o>>2]|0,y(l))}function Fh(o,l){o=o|0,l=+l,bl(n[o>>2]|0,y(l))}function h2(o,l){o=o|0,l=+l,Iy(n[o>>2]|0,y(l))}function g2(o,l){o=o|0,l=+l,Lg(n[o>>2]|0,y(l))}function d2(o,l){o=o|0,l=+l,Dl(n[o>>2]|0,y(l))}function m2(o,l){o=o|0,l=+l,Mg(n[o>>2]|0,y(l))}function bf(o,l){o=o|0,l=+l,e2(n[o>>2]|0,y(l))}function sr(o){o=o|0,vh(n[o>>2]|0)}function _y(o,l){o=o|0,l=+l,zi(n[o>>2]|0,y(l))}function y2(o,l){o=o|0,l=+l,yf(n[o>>2]|0,y(l))}function hc(o){o=o|0,qa(n[o>>2]|0)}function Pf(o,l){o=o|0,l=+l,du(n[o>>2]|0,y(l))}function $g(o,l){o=o|0,l=+l,Ef(n[o>>2]|0,y(l))}function ed(o,l){o=o|0,l=+l,di(n[o>>2]|0,y(l))}function E2(o,l){o=o|0,l=+l,GA(n[o>>2]|0,y(l))}function I2(o,l){o=o|0,l=+l,Aa(n[o>>2]|0,y(l))}function wu(o,l){o=o|0,l=+l,Ya(n[o>>2]|0,y(l))}function td(o,l){o=o|0,l=+l,Sh(n[o>>2]|0,y(l))}function C2(o,l){o=o|0,l=+l,Hg(n[o>>2]|0,y(l))}function Hy(o,l){o=o|0,l=+l,qA(n[o>>2]|0,y(l))}function Bu(o,l,u){o=o|0,l=l|0,u=+u,gu(n[o>>2]|0,l,y(u))}function jy(o,l,u){o=o|0,l=l|0,u=+u,bo(n[o>>2]|0,l,y(u))}function rd(o,l,u){o=o|0,l=l|0,u=+u,mf(n[o>>2]|0,l,y(u))}function nd(o){return o=o|0,Fg(n[o>>2]|0)|0}function ko(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,_A(d,n[l>>2]|0,u),Bs(o,d),I=A}function Bs(o,l){o=o|0,l=l|0,Tl(o,n[l+4>>2]|0,+y(h[l>>2]))}function Tl(o,l,u){o=o|0,l=l|0,u=+u,n[o>>2]=l,E[o+8>>3]=u}function Gy(o){return o=o|0,$1(n[o>>2]|0)|0}function ga(o){return o=o|0,Ih(n[o>>2]|0)|0}function mP(o){return o=o|0,hu(n[o>>2]|0)|0}function Nh(o){return o=o|0,Z1(n[o>>2]|0)|0}function w2(o){return o=o|0,Og(n[o>>2]|0)|0}function zL(o){return o=o|0,yy(n[o>>2]|0)|0}function yP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,xt(d,n[l>>2]|0,u),Bs(o,d),I=A}function EP(o){return o=o|0,df(n[o>>2]|0)|0}function qy(o){return o=o|0,Sl(n[o>>2]|0)|0}function B2(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,UA(A,n[l>>2]|0),Bs(o,A),I=u}function Oh(o){return o=o|0,+ +y(li(n[o>>2]|0))}function IP(o){return o=o|0,+ +y(qi(n[o>>2]|0))}function CP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ur(A,n[l>>2]|0),Bs(o,A),I=u}function id(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ug(A,n[l>>2]|0),Bs(o,A),I=u}function XL(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wt(A,n[l>>2]|0),Bs(o,A),I=u}function ZL(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Wa(A,n[l>>2]|0),Bs(o,A),I=u}function wP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_g(A,n[l>>2]|0),Bs(o,A),I=u}function BP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,vy(A,n[l>>2]|0),Bs(o,A),I=u}function $A(o){return o=o|0,+ +y(jg(n[o>>2]|0))}function $L(o,l){return o=o|0,l=l|0,+ +y(By(n[o>>2]|0,l))}function eM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,yt(d,n[l>>2]|0,u),Bs(o,d),I=A}function vu(o,l,u){o=o|0,l=l|0,u=u|0,lr(n[o>>2]|0,n[l>>2]|0,u)}function tM(o,l){o=o|0,l=l|0,gf(n[o>>2]|0,n[l>>2]|0)}function vP(o){return o=o|0,Mi(n[o>>2]|0)|0}function rM(o){return o=o|0,o=Et(n[o>>2]|0)|0,o?o=c2(o)|0:o=0,o|0}function SP(o,l){return o=o|0,l=l|0,o=Is(n[o>>2]|0,l)|0,o?o=c2(o)|0:o=0,o|0}function xf(o,l){o=o|0,l=l|0;var u=0,A=0;A=Kt(4)|0,DP(A,l),u=o+4|0,l=n[u>>2]|0,n[u>>2]=A,l|0&&(Sf(l),It(l)),St(n[o>>2]|0,1)}function DP(o,l){o=o|0,l=l|0,oM(o,l)}function nM(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,bP(k,Ga(l)|0,+u,A,+d,m),h[o>>2]=y(+E[k>>3]),h[o+4>>2]=y(+E[k+8>>3]),I=B}function bP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0,k=0,T=0,M=0,L=0;B=I,I=I+32|0,L=B+8|0,M=B+20|0,T=B,k=B+16|0,E[L>>3]=u,n[M>>2]=A,E[T>>3]=d,n[k>>2]=m,Wy(o,n[l+4>>2]|0,L,M,T,k),I=B}function Wy(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,Fl(k),l=Os(l)|0,PP(o,l,+E[u>>3],n[A>>2]|0,+E[d>>3],n[m>>2]|0),Nl(k),I=B}function Os(o){return o=o|0,n[o>>2]|0}function PP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0;B=da(v2()|0)|0,u=+Ja(u),A=Yy(A)|0,d=+Ja(d),iM(o,Kn(0,B|0,l|0,+u,A|0,+d,Yy(m)|0)|0)}function v2(){var o=0;return s[7608]|0||(D2(9120),o=7608,n[o>>2]=1,n[o+4>>2]=0),9120}function da(o){return o=o|0,n[o+8>>2]|0}function Ja(o){return o=+o,+ +kf(o)}function Yy(o){return o=o|0,sd(o)|0}function iM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=l,A&1?(Ka(u,0),Me(A|0,u|0)|0,S2(o,u),sM(u)):(n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]),I=d}function Ka(o,l){o=o|0,l=l|0,Su(o,l),n[o+8>>2]=0,s[o+24>>0]=0}function S2(o,l){o=o|0,l=l|0,l=l+8|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]}function sM(o){o=o|0,s[o+24>>0]=0}function Su(o,l){o=o|0,l=l|0,n[o>>2]=l}function sd(o){return o=o|0,o|0}function kf(o){return o=+o,+o}function D2(o){o=o|0,Qo(o,b2()|0,4)}function b2(){return 1064}function Qo(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=Gi(l|0,u+1|0)|0}function oM(o,l){o=o|0,l=l|0,l=n[l>>2]|0,n[o>>2]=l,au(l|0)}function xP(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Sf(l),It(l)),St(n[o>>2]|0,0)}function kP(o){o=o|0,bt(n[o>>2]|0)}function Vy(o){return o=o|0,tr(n[o>>2]|0)|0}function aM(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,YA(n[o>>2]|0,y(l),y(u),A)}function lM(o){return o=o|0,+ +y(mu(n[o>>2]|0))}function v(o){return o=o|0,+ +y(If(n[o>>2]|0))}function D(o){return o=o|0,+ +y(yu(n[o>>2]|0))}function Q(o){return o=o|0,+ +y(Rs(n[o>>2]|0))}function H(o){return o=o|0,+ +y(Eu(n[o>>2]|0))}function V(o){return o=o|0,+ +y(Gn(n[o>>2]|0))}function ne(o,l){o=o|0,l=l|0,E[o>>3]=+y(mu(n[l>>2]|0)),E[o+8>>3]=+y(If(n[l>>2]|0)),E[o+16>>3]=+y(yu(n[l>>2]|0)),E[o+24>>3]=+y(Rs(n[l>>2]|0)),E[o+32>>3]=+y(Eu(n[l>>2]|0)),E[o+40>>3]=+y(Gn(n[l>>2]|0))}function Se(o,l){return o=o|0,l=l|0,+ +y(is(n[o>>2]|0,l))}function _e(o,l){return o=o|0,l=l|0,+ +y(Pi(n[o>>2]|0,l))}function pt(o,l){return o=o|0,l=l|0,+ +y(WA(n[o>>2]|0,l))}function Wt(){return Qn()|0}function Sr(){Lr(),Zt(),zn(),yi(),za(),et()}function Lr(){p4e(11713,4938,1)}function Zt(){T_e(10448)}function zn(){p_e(10408)}function yi(){OUe(10324)}function za(){qLe(10096)}function et(){qe(9132)}function qe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,To=0,Ro=0,Fo=0,Za=0,Wh=0,Yh=0,gc=0,Vh=0,Rf=0,Ff=0,Jh=0,Kh=0,zh=0,ln=0,dc=0,Xh=0,Pu=0,Zh=0,$h=0,Nf=0,Of=0,xu=0,oo=0,Ll=0,ma=0,mc=0,op=0,ap=0,Lf=0,lp=0,cp=0,ao=0,Ms=0,yc=0,Wn=0,up=0,No=0,ku=0,Oo=0,Qu=0,fp=0,Ap=0,Tu=0,lo=0,Ec=0,pp=0,hp=0,gp=0,Nr=0,ui=0,Us=0,Lo=0,co=0,Mr=0,Ar=0,Ic=0;l=I,I=I+672|0,u=l+656|0,Ic=l+648|0,Ar=l+640|0,Mr=l+632|0,co=l+624|0,Lo=l+616|0,Us=l+608|0,ui=l+600|0,Nr=l+592|0,gp=l+584|0,hp=l+576|0,pp=l+568|0,Ec=l+560|0,lo=l+552|0,Tu=l+544|0,Ap=l+536|0,fp=l+528|0,Qu=l+520|0,Oo=l+512|0,ku=l+504|0,No=l+496|0,up=l+488|0,Wn=l+480|0,yc=l+472|0,Ms=l+464|0,ao=l+456|0,cp=l+448|0,lp=l+440|0,Lf=l+432|0,ap=l+424|0,op=l+416|0,mc=l+408|0,ma=l+400|0,Ll=l+392|0,oo=l+384|0,xu=l+376|0,Of=l+368|0,Nf=l+360|0,$h=l+352|0,Zh=l+344|0,Pu=l+336|0,Xh=l+328|0,dc=l+320|0,ln=l+312|0,zh=l+304|0,Kh=l+296|0,Jh=l+288|0,Ff=l+280|0,Rf=l+272|0,Vh=l+264|0,gc=l+256|0,Yh=l+248|0,Wh=l+240|0,Za=l+232|0,Fo=l+224|0,Ro=l+216|0,To=l+208|0,Hn=l+200|0,cr=l+192|0,Hr=l+184|0,Tr=l+176|0,$t=l+168|0,fr=l+160|0,Gr=l+152|0,Lt=l+144|0,We=l+136|0,He=l+128|0,ct=l+120|0,Ze=l+112|0,tt=l+104|0,Qe=l+96|0,Le=l+88|0,Ye=l+80|0,ae=l+72|0,q=l+64|0,L=l+56|0,M=l+48|0,T=l+40|0,k=l+32|0,B=l+24|0,m=l+16|0,d=l+8|0,A=l,gt(o,3646),Xt(o,3651,2)|0,Dr(o,3665,2)|0,Zn(o,3682,18)|0,n[Ic>>2]=19,n[Ic+4>>2]=0,n[u>>2]=n[Ic>>2],n[u+4>>2]=n[Ic+4>>2],kr(o,3690,u)|0,n[Ar>>2]=1,n[Ar+4>>2]=0,n[u>>2]=n[Ar>>2],n[u+4>>2]=n[Ar+4>>2],Rn(o,3696,u)|0,n[Mr>>2]=2,n[Mr+4>>2]=0,n[u>>2]=n[Mr>>2],n[u+4>>2]=n[Mr+4>>2],_n(o,3706,u)|0,n[co>>2]=1,n[co+4>>2]=0,n[u>>2]=n[co>>2],n[u+4>>2]=n[co+4>>2],zr(o,3722,u)|0,n[Lo>>2]=2,n[Lo+4>>2]=0,n[u>>2]=n[Lo>>2],n[u+4>>2]=n[Lo+4>>2],zr(o,3734,u)|0,n[Us>>2]=3,n[Us+4>>2]=0,n[u>>2]=n[Us>>2],n[u+4>>2]=n[Us+4>>2],_n(o,3753,u)|0,n[ui>>2]=4,n[ui+4>>2]=0,n[u>>2]=n[ui>>2],n[u+4>>2]=n[ui+4>>2],_n(o,3769,u)|0,n[Nr>>2]=5,n[Nr+4>>2]=0,n[u>>2]=n[Nr>>2],n[u+4>>2]=n[Nr+4>>2],_n(o,3783,u)|0,n[gp>>2]=6,n[gp+4>>2]=0,n[u>>2]=n[gp>>2],n[u+4>>2]=n[gp+4>>2],_n(o,3796,u)|0,n[hp>>2]=7,n[hp+4>>2]=0,n[u>>2]=n[hp>>2],n[u+4>>2]=n[hp+4>>2],_n(o,3813,u)|0,n[pp>>2]=8,n[pp+4>>2]=0,n[u>>2]=n[pp>>2],n[u+4>>2]=n[pp+4>>2],_n(o,3825,u)|0,n[Ec>>2]=3,n[Ec+4>>2]=0,n[u>>2]=n[Ec>>2],n[u+4>>2]=n[Ec+4>>2],zr(o,3843,u)|0,n[lo>>2]=4,n[lo+4>>2]=0,n[u>>2]=n[lo>>2],n[u+4>>2]=n[lo+4>>2],zr(o,3853,u)|0,n[Tu>>2]=9,n[Tu+4>>2]=0,n[u>>2]=n[Tu>>2],n[u+4>>2]=n[Tu+4>>2],_n(o,3870,u)|0,n[Ap>>2]=10,n[Ap+4>>2]=0,n[u>>2]=n[Ap>>2],n[u+4>>2]=n[Ap+4>>2],_n(o,3884,u)|0,n[fp>>2]=11,n[fp+4>>2]=0,n[u>>2]=n[fp>>2],n[u+4>>2]=n[fp+4>>2],_n(o,3896,u)|0,n[Qu>>2]=1,n[Qu+4>>2]=0,n[u>>2]=n[Qu>>2],n[u+4>>2]=n[Qu+4>>2],ci(o,3907,u)|0,n[Oo>>2]=2,n[Oo+4>>2]=0,n[u>>2]=n[Oo>>2],n[u+4>>2]=n[Oo+4>>2],ci(o,3915,u)|0,n[ku>>2]=3,n[ku+4>>2]=0,n[u>>2]=n[ku>>2],n[u+4>>2]=n[ku+4>>2],ci(o,3928,u)|0,n[No>>2]=4,n[No+4>>2]=0,n[u>>2]=n[No>>2],n[u+4>>2]=n[No+4>>2],ci(o,3948,u)|0,n[up>>2]=5,n[up+4>>2]=0,n[u>>2]=n[up>>2],n[u+4>>2]=n[up+4>>2],ci(o,3960,u)|0,n[Wn>>2]=6,n[Wn+4>>2]=0,n[u>>2]=n[Wn>>2],n[u+4>>2]=n[Wn+4>>2],ci(o,3974,u)|0,n[yc>>2]=7,n[yc+4>>2]=0,n[u>>2]=n[yc>>2],n[u+4>>2]=n[yc+4>>2],ci(o,3983,u)|0,n[Ms>>2]=20,n[Ms+4>>2]=0,n[u>>2]=n[Ms>>2],n[u+4>>2]=n[Ms+4>>2],kr(o,3999,u)|0,n[ao>>2]=8,n[ao+4>>2]=0,n[u>>2]=n[ao>>2],n[u+4>>2]=n[ao+4>>2],ci(o,4012,u)|0,n[cp>>2]=9,n[cp+4>>2]=0,n[u>>2]=n[cp>>2],n[u+4>>2]=n[cp+4>>2],ci(o,4022,u)|0,n[lp>>2]=21,n[lp+4>>2]=0,n[u>>2]=n[lp>>2],n[u+4>>2]=n[lp+4>>2],kr(o,4039,u)|0,n[Lf>>2]=10,n[Lf+4>>2]=0,n[u>>2]=n[Lf>>2],n[u+4>>2]=n[Lf+4>>2],ci(o,4053,u)|0,n[ap>>2]=11,n[ap+4>>2]=0,n[u>>2]=n[ap>>2],n[u+4>>2]=n[ap+4>>2],ci(o,4065,u)|0,n[op>>2]=12,n[op+4>>2]=0,n[u>>2]=n[op>>2],n[u+4>>2]=n[op+4>>2],ci(o,4084,u)|0,n[mc>>2]=13,n[mc+4>>2]=0,n[u>>2]=n[mc>>2],n[u+4>>2]=n[mc+4>>2],ci(o,4097,u)|0,n[ma>>2]=14,n[ma+4>>2]=0,n[u>>2]=n[ma>>2],n[u+4>>2]=n[ma+4>>2],ci(o,4117,u)|0,n[Ll>>2]=15,n[Ll+4>>2]=0,n[u>>2]=n[Ll>>2],n[u+4>>2]=n[Ll+4>>2],ci(o,4129,u)|0,n[oo>>2]=16,n[oo+4>>2]=0,n[u>>2]=n[oo>>2],n[u+4>>2]=n[oo+4>>2],ci(o,4148,u)|0,n[xu>>2]=17,n[xu+4>>2]=0,n[u>>2]=n[xu>>2],n[u+4>>2]=n[xu+4>>2],ci(o,4161,u)|0,n[Of>>2]=18,n[Of+4>>2]=0,n[u>>2]=n[Of>>2],n[u+4>>2]=n[Of+4>>2],ci(o,4181,u)|0,n[Nf>>2]=5,n[Nf+4>>2]=0,n[u>>2]=n[Nf>>2],n[u+4>>2]=n[Nf+4>>2],zr(o,4196,u)|0,n[$h>>2]=6,n[$h+4>>2]=0,n[u>>2]=n[$h>>2],n[u+4>>2]=n[$h+4>>2],zr(o,4206,u)|0,n[Zh>>2]=7,n[Zh+4>>2]=0,n[u>>2]=n[Zh>>2],n[u+4>>2]=n[Zh+4>>2],zr(o,4217,u)|0,n[Pu>>2]=3,n[Pu+4>>2]=0,n[u>>2]=n[Pu>>2],n[u+4>>2]=n[Pu+4>>2],Du(o,4235,u)|0,n[Xh>>2]=1,n[Xh+4>>2]=0,n[u>>2]=n[Xh>>2],n[u+4>>2]=n[Xh+4>>2],cM(o,4251,u)|0,n[dc>>2]=4,n[dc+4>>2]=0,n[u>>2]=n[dc>>2],n[u+4>>2]=n[dc+4>>2],Du(o,4263,u)|0,n[ln>>2]=5,n[ln+4>>2]=0,n[u>>2]=n[ln>>2],n[u+4>>2]=n[ln+4>>2],Du(o,4279,u)|0,n[zh>>2]=6,n[zh+4>>2]=0,n[u>>2]=n[zh>>2],n[u+4>>2]=n[zh+4>>2],Du(o,4293,u)|0,n[Kh>>2]=7,n[Kh+4>>2]=0,n[u>>2]=n[Kh>>2],n[u+4>>2]=n[Kh+4>>2],Du(o,4306,u)|0,n[Jh>>2]=8,n[Jh+4>>2]=0,n[u>>2]=n[Jh>>2],n[u+4>>2]=n[Jh+4>>2],Du(o,4323,u)|0,n[Ff>>2]=9,n[Ff+4>>2]=0,n[u>>2]=n[Ff>>2],n[u+4>>2]=n[Ff+4>>2],Du(o,4335,u)|0,n[Rf>>2]=2,n[Rf+4>>2]=0,n[u>>2]=n[Rf>>2],n[u+4>>2]=n[Rf+4>>2],cM(o,4353,u)|0,n[Vh>>2]=12,n[Vh+4>>2]=0,n[u>>2]=n[Vh>>2],n[u+4>>2]=n[Vh+4>>2],od(o,4363,u)|0,n[gc>>2]=1,n[gc+4>>2]=0,n[u>>2]=n[gc>>2],n[u+4>>2]=n[gc+4>>2],ep(o,4376,u)|0,n[Yh>>2]=2,n[Yh+4>>2]=0,n[u>>2]=n[Yh>>2],n[u+4>>2]=n[Yh+4>>2],ep(o,4388,u)|0,n[Wh>>2]=13,n[Wh+4>>2]=0,n[u>>2]=n[Wh>>2],n[u+4>>2]=n[Wh+4>>2],od(o,4402,u)|0,n[Za>>2]=14,n[Za+4>>2]=0,n[u>>2]=n[Za>>2],n[u+4>>2]=n[Za+4>>2],od(o,4411,u)|0,n[Fo>>2]=15,n[Fo+4>>2]=0,n[u>>2]=n[Fo>>2],n[u+4>>2]=n[Fo+4>>2],od(o,4421,u)|0,n[Ro>>2]=16,n[Ro+4>>2]=0,n[u>>2]=n[Ro>>2],n[u+4>>2]=n[Ro+4>>2],od(o,4433,u)|0,n[To>>2]=17,n[To+4>>2]=0,n[u>>2]=n[To>>2],n[u+4>>2]=n[To+4>>2],od(o,4446,u)|0,n[Hn>>2]=18,n[Hn+4>>2]=0,n[u>>2]=n[Hn>>2],n[u+4>>2]=n[Hn+4>>2],od(o,4458,u)|0,n[cr>>2]=3,n[cr+4>>2]=0,n[u>>2]=n[cr>>2],n[u+4>>2]=n[cr+4>>2],ep(o,4471,u)|0,n[Hr>>2]=1,n[Hr+4>>2]=0,n[u>>2]=n[Hr>>2],n[u+4>>2]=n[Hr+4>>2],QP(o,4486,u)|0,n[Tr>>2]=10,n[Tr+4>>2]=0,n[u>>2]=n[Tr>>2],n[u+4>>2]=n[Tr+4>>2],Du(o,4496,u)|0,n[$t>>2]=11,n[$t+4>>2]=0,n[u>>2]=n[$t>>2],n[u+4>>2]=n[$t+4>>2],Du(o,4508,u)|0,n[fr>>2]=3,n[fr+4>>2]=0,n[u>>2]=n[fr>>2],n[u+4>>2]=n[fr+4>>2],cM(o,4519,u)|0,n[Gr>>2]=4,n[Gr+4>>2]=0,n[u>>2]=n[Gr>>2],n[u+4>>2]=n[Gr+4>>2],Cke(o,4530,u)|0,n[Lt>>2]=19,n[Lt+4>>2]=0,n[u>>2]=n[Lt>>2],n[u+4>>2]=n[Lt+4>>2],wke(o,4542,u)|0,n[We>>2]=12,n[We+4>>2]=0,n[u>>2]=n[We>>2],n[u+4>>2]=n[We+4>>2],Bke(o,4554,u)|0,n[He>>2]=13,n[He+4>>2]=0,n[u>>2]=n[He>>2],n[u+4>>2]=n[He+4>>2],vke(o,4568,u)|0,n[ct>>2]=2,n[ct+4>>2]=0,n[u>>2]=n[ct>>2],n[u+4>>2]=n[ct+4>>2],Ske(o,4578,u)|0,n[Ze>>2]=20,n[Ze+4>>2]=0,n[u>>2]=n[Ze>>2],n[u+4>>2]=n[Ze+4>>2],Dke(o,4587,u)|0,n[tt>>2]=22,n[tt+4>>2]=0,n[u>>2]=n[tt>>2],n[u+4>>2]=n[tt+4>>2],kr(o,4602,u)|0,n[Qe>>2]=23,n[Qe+4>>2]=0,n[u>>2]=n[Qe>>2],n[u+4>>2]=n[Qe+4>>2],kr(o,4619,u)|0,n[Le>>2]=14,n[Le+4>>2]=0,n[u>>2]=n[Le>>2],n[u+4>>2]=n[Le+4>>2],bke(o,4629,u)|0,n[Ye>>2]=1,n[Ye+4>>2]=0,n[u>>2]=n[Ye>>2],n[u+4>>2]=n[Ye+4>>2],Pke(o,4637,u)|0,n[ae>>2]=4,n[ae+4>>2]=0,n[u>>2]=n[ae>>2],n[u+4>>2]=n[ae+4>>2],ep(o,4653,u)|0,n[q>>2]=5,n[q+4>>2]=0,n[u>>2]=n[q>>2],n[u+4>>2]=n[q+4>>2],ep(o,4669,u)|0,n[L>>2]=6,n[L+4>>2]=0,n[u>>2]=n[L>>2],n[u+4>>2]=n[L+4>>2],ep(o,4686,u)|0,n[M>>2]=7,n[M+4>>2]=0,n[u>>2]=n[M>>2],n[u+4>>2]=n[M+4>>2],ep(o,4701,u)|0,n[T>>2]=8,n[T+4>>2]=0,n[u>>2]=n[T>>2],n[u+4>>2]=n[T+4>>2],ep(o,4719,u)|0,n[k>>2]=9,n[k+4>>2]=0,n[u>>2]=n[k>>2],n[u+4>>2]=n[k+4>>2],ep(o,4736,u)|0,n[B>>2]=21,n[B+4>>2]=0,n[u>>2]=n[B>>2],n[u+4>>2]=n[B+4>>2],xke(o,4754,u)|0,n[m>>2]=2,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],QP(o,4772,u)|0,n[d>>2]=3,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],QP(o,4790,u)|0,n[A>>2]=4,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],QP(o,4808,u)|0,I=l}function gt(o,l){o=o|0,l=l|0;var u=0;u=NLe()|0,n[o>>2]=u,OLe(u,l),jh(n[o>>2]|0)}function Xt(o,l,u){return o=o|0,l=l|0,u=u|0,CLe(o,Bn(l)|0,u,0),o|0}function Dr(o,l,u){return o=o|0,l=l|0,u=u|0,sLe(o,Bn(l)|0,u,0),o|0}function Zn(o,l,u){return o=o|0,l=l|0,u=u|0,WOe(o,Bn(l)|0,u,0),o|0}function kr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xOe(o,l,d),I=A,o|0}function Rn(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uOe(o,l,d),I=A,o|0}function _n(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JNe(o,l,d),I=A,o|0}function zr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TNe(o,l,d),I=A,o|0}function ci(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dNe(o,l,d),I=A,o|0}function Du(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eNe(o,l,d),I=A,o|0}function cM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MFe(o,l,d),I=A,o|0}function od(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uFe(o,l,d),I=A,o|0}function ep(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JRe(o,l,d),I=A,o|0}function QP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TRe(o,l,d),I=A,o|0}function Cke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dRe(o,l,d),I=A,o|0}function wke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eRe(o,l,d),I=A,o|0}function Bke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UTe(o,l,d),I=A,o|0}function vke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vTe(o,l,d),I=A,o|0}function Ske(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],aTe(o,l,d),I=A,o|0}function Dke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qQe(o,l,d),I=A,o|0}function bke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PQe(o,l,d),I=A,o|0}function Pke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uQe(o,l,d),I=A,o|0}function xke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kke(o,l,d),I=A,o|0}function kke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Qke(o,u,d,1),I=A}function Bn(o){return o=o|0,o|0}function Qke(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=uM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=Tke(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Rke(m,A)|0,A),I=d}function uM(){var o=0,l=0;if(s[7616]|0||(mz(9136),gr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(_r(9136)|0)){o=9136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));mz(9136)}return 9136}function Tke(o){return o=o|0,0}function Rke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=uM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],dz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Oke(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function vn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0;B=I,I=I+32|0,ae=B+24|0,q=B+20|0,T=B+16|0,L=B+12|0,M=B+8|0,k=B+4|0,Ye=B,n[q>>2]=l,n[T>>2]=u,n[L>>2]=A,n[M>>2]=d,n[k>>2]=m,m=o+28|0,n[Ye>>2]=n[m>>2],n[ae>>2]=n[Ye>>2],Fke(o+24|0,ae,q,L,M,T,k)|0,n[m>>2]=n[n[m>>2]>>2],I=B}function Fke(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,o=Nke(l)|0,l=Kt(24)|0,gz(l+4|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[o>>2],n[o>>2]=l,l|0}function Nke(o){return o=o|0,n[o>>2]|0}function gz(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function yr(o,l){return o=o|0,l=l|0,l|o|0}function dz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Oke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=Lke(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,Mke(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],dz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,Uke(o,k),_ke(k),I=M;return}}function Lke(o){return o=o|0,357913941}function Mke(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function Uke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _ke(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function mz(o){o=o|0,Gke(o)}function Hke(o){o=o|0,jke(o+24|0)}function _r(o){return o=o|0,n[o>>2]|0}function jke(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function Gke(o){o=o|0;var l=0;l=tn()|0,rn(o,2,3,l,qke()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tn(){return 9228}function qke(){return 1140}function Wke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=Yke(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=Vke(l,A)|0,I=u,l|0}function rn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function Yke(o){return o=o|0,(n[(uM()|0)+24>>2]|0)+(o*12|0)|0}function Vke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+48|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sp[u&31](A,o),A=Jke(A)|0,I=d,A|0}function Jke(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(yz()|0)|0,A?(AM(l,A),pM(u,l),Kke(o,u),o=hM(l)|0):o=zke(o)|0,I=d,o|0}function yz(){var o=0;return s[7632]|0||(oQe(9184),gr(25,9184,U|0)|0,o=7632,n[o>>2]=1,n[o+4>>2]=0),9184}function fM(o){return o=o|0,n[o+36>>2]|0}function AM(o,l){o=o|0,l=l|0,n[o>>2]=l,n[o+4>>2]=o,n[o+8>>2]=0}function pM(o,l){o=o|0,l=l|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=0}function Kke(o,l){o=o|0,l=l|0,eQe(l,o,o+8|0,o+16|0,o+24|0,o+32|0,o+40|0)|0}function hM(o){return o=o|0,n[(n[o+4>>2]|0)+8>>2]|0}function zke(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;T=I,I=I+16|0,u=T+4|0,A=T,d=Rl(8)|0,m=d,B=Kt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[o>>2],k=k+4|0,o=o+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Kt(8)|0,B=n[l>>2]|0,n[A>>2]=0,n[u>>2]=n[A>>2],Ez(k,B,u),n[d>>2]=k,I=T,m|0}function Ez(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1092,n[u+12>>2]=l,n[o+4>>2]=u}function Xke(o){o=o|0,$y(o),It(o)}function Zke(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function $ke(o){o=o|0,It(o)}function eQe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,m=tQe(n[o>>2]|0,l,u,A,d,m,B)|0,B=o+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function tQe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0;var k=0,T=0;return k=I,I=I+16|0,T=k,Fl(T),o=Os(o)|0,B=rQe(o,+E[l>>3],+E[u>>3],+E[A>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Nl(T),I=k,B|0}function rQe(o,l,u,A,d,m,B){o=o|0,l=+l,u=+u,A=+A,d=+d,m=+m,B=+B;var k=0;return k=da(nQe()|0)|0,l=+Ja(l),u=+Ja(u),A=+Ja(A),d=+Ja(d),m=+Ja(m),ro(0,k|0,o|0,+l,+u,+A,+d,+m,+ +Ja(B))|0}function nQe(){var o=0;return s[7624]|0||(iQe(9172),o=7624,n[o>>2]=1,n[o+4>>2]=0),9172}function iQe(o){o=o|0,Qo(o,sQe()|0,6)}function sQe(){return 1112}function oQe(o){o=o|0,Lh(o)}function aQe(o){o=o|0,Iz(o+24|0),Cz(o+16|0)}function Iz(o){o=o|0,cQe(o)}function Cz(o){o=o|0,lQe(o)}function lQe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function cQe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function Lh(o){o=o|0;var l=0;n[o+16>>2]=0,n[o+20>>2]=0,l=o+24|0,n[l>>2]=0,n[o+28>>2]=l,n[o+36>>2]=0,s[o+40>>0]=0,s[o+41>>0]=0}function uQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fQe(o,u,d,0),I=A}function fQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=gM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pQe(m,A)|0,A),I=d}function gM(){var o=0,l=0;if(s[7640]|0||(Bz(9232),gr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(_r(9232)|0)){o=9232,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Bz(9232)}return 9232}function AQe(o){return o=o|0,0}function pQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=gM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],wz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function wz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],wz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mQe(o,k),yQe(k),I=M;return}}function gQe(o){return o=o|0,357913941}function dQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Bz(o){o=o|0,CQe(o)}function EQe(o){o=o|0,IQe(o+24|0)}function IQe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function CQe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,wQe()|0,3),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wQe(){return 1144}function BQe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,B=m+8|0,k=m,T=vQe(o)|0,o=n[T+4>>2]|0,n[k>>2]=n[T>>2],n[k+4>>2]=o,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],SQe(l,B,u,A,d),I=m}function vQe(o){return o=o|0,(n[(gM()|0)+24>>2]|0)+(o*12|0)|0}function SQe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0,M=0;M=I,I=I+16|0,B=M+2|0,k=M+1|0,T=M,m=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(m=n[(n[o>>2]|0)+m>>2]|0),Qf(B,u),u=+Tf(B,u),Qf(k,A),A=+Tf(k,A),tp(T,d),T=rp(T,d)|0,MZ[m&1](o,u,A,T),I=M}function Qf(o,l){o=o|0,l=+l}function Tf(o,l){return o=o|0,l=+l,+ +bQe(l)}function tp(o,l){o=o|0,l=l|0}function rp(o,l){return o=o|0,l=l|0,DQe(l)|0}function DQe(o){return o=o|0,o|0}function bQe(o){return o=+o,+o}function PQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xQe(o,u,d,1),I=A}function xQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=dM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=kQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,QQe(m,A)|0,A),I=d}function dM(){var o=0,l=0;if(s[7648]|0||(Sz(9268),gr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(_r(9268)|0)){o=9268,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Sz(9268)}return 9268}function kQe(o){return o=o|0,0}function QQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=dM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],vz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(TQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function vz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function TQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=RQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,FQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],vz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,NQe(o,k),OQe(k),I=M;return}}function RQe(o){return o=o|0,357913941}function FQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function NQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function OQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Sz(o){o=o|0,UQe(o)}function LQe(o){o=o|0,MQe(o+24|0)}function MQe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function UQe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,4,l,_Qe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function _Qe(){return 1160}function HQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=jQe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=GQe(l,A)|0,I=u,l|0}function jQe(o){return o=o|0,(n[(dM()|0)+24>>2]|0)+(o*12|0)|0}function GQe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),Dz(gd[u&31](o)|0)|0}function Dz(o){return o=o|0,o&1|0}function qQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WQe(o,u,d,0),I=A}function WQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=mM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=YQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,VQe(m,A)|0,A),I=d}function mM(){var o=0,l=0;if(s[7656]|0||(Pz(9304),gr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(_r(9304)|0)){o=9304,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Pz(9304)}return 9304}function YQe(o){return o=o|0,0}function VQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=mM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],bz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(JQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function bz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function JQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,zQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],bz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,XQe(o,k),ZQe(k),I=M;return}}function KQe(o){return o=o|0,357913941}function zQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function XQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Pz(o){o=o|0,tTe(o)}function $Qe(o){o=o|0,eTe(o+24|0)}function eTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function tTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,rTe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function rTe(){return 1164}function nTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=iTe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sTe(l,d,u),I=A}function iTe(o){return o=o|0,(n[(mM()|0)+24>>2]|0)+(o*12|0)|0}function sTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Mh(d,u),u=Uh(d,u)|0,sp[A&31](o,u),_h(d),I=m}function Mh(o,l){o=o|0,l=l|0,oTe(o,l)}function Uh(o,l){return o=o|0,l=l|0,o|0}function _h(o){o=o|0,Sf(o)}function oTe(o,l){o=o|0,l=l|0,yM(o,l)}function yM(o,l){o=o|0,l=l|0,n[o>>2]=l}function aTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lTe(o,u,d,0),I=A}function lTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=EM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=cTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,uTe(m,A)|0,A),I=d}function EM(){var o=0,l=0;if(s[7664]|0||(kz(9340),gr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(_r(9340)|0)){o=9340,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));kz(9340)}return 9340}function cTe(o){return o=o|0,0}function uTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=EM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],xz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(fTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function xz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function fTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=ATe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,pTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],xz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,hTe(o,k),gTe(k),I=M;return}}function ATe(o){return o=o|0,357913941}function pTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function hTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function kz(o){o=o|0,yTe(o)}function dTe(o){o=o|0,mTe(o+24|0)}function mTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function yTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,4,l,ETe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ETe(){return 1180}function ITe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=CTe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=wTe(l,d,u)|0,I=A,u|0}function CTe(o){return o=o|0,(n[(EM()|0)+24>>2]|0)+(o*12|0)|0}function wTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),ad(d,u),d=ld(d,u)|0,d=TP(gU[A&15](o,d)|0)|0,I=m,d|0}function ad(o,l){o=o|0,l=l|0}function ld(o,l){return o=o|0,l=l|0,BTe(l)|0}function TP(o){return o=o|0,o|0}function BTe(o){return o=o|0,o|0}function vTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],STe(o,u,d,0),I=A}function STe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=IM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=DTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,bTe(m,A)|0,A),I=d}function IM(){var o=0,l=0;if(s[7672]|0||(Tz(9376),gr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(_r(9376)|0)){o=9376,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Tz(9376)}return 9376}function DTe(o){return o=o|0,0}function bTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=IM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Qz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(PTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Qz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function PTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=xTe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,kTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Qz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,QTe(o,k),TTe(k),I=M;return}}function xTe(o){return o=o|0,357913941}function kTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function QTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function TTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Tz(o){o=o|0,NTe(o)}function RTe(o){o=o|0,FTe(o+24|0)}function FTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function NTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,Rz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Rz(){return 1196}function OTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=LTe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=MTe(l,A)|0,I=u,l|0}function LTe(o){return o=o|0,(n[(IM()|0)+24>>2]|0)+(o*12|0)|0}function MTe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),TP(gd[u&31](o)|0)|0}function UTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_Te(o,u,d,1),I=A}function _Te(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=CM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=HTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,jTe(m,A)|0,A),I=d}function CM(){var o=0,l=0;if(s[7680]|0||(Nz(9412),gr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(_r(9412)|0)){o=9412,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Nz(9412)}return 9412}function HTe(o){return o=o|0,0}function jTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=CM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Fz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(GTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Fz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function GTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=qTe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,WTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Fz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,YTe(o,k),VTe(k),I=M;return}}function qTe(o){return o=o|0,357913941}function WTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function YTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function VTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Nz(o){o=o|0,zTe(o)}function JTe(o){o=o|0,KTe(o+24|0)}function KTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function zTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,Oz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Oz(){return 1200}function XTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=ZTe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=$Te(l,A)|0,I=u,l|0}function ZTe(o){return o=o|0,(n[(CM()|0)+24>>2]|0)+(o*12|0)|0}function $Te(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),RP(gd[u&31](o)|0)|0}function RP(o){return o=o|0,o|0}function eRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tRe(o,u,d,0),I=A}function tRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=wM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=rRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,nRe(m,A)|0,A),I=d}function wM(){var o=0,l=0;if(s[7688]|0||(Mz(9448),gr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(_r(9448)|0)){o=9448,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Mz(9448)}return 9448}function rRe(o){return o=o|0,0}function nRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=wM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Lz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(iRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Lz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function iRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=sRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,oRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Lz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,aRe(o,k),lRe(k),I=M;return}}function sRe(o){return o=o|0,357913941}function oRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function aRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function lRe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Mz(o){o=o|0,fRe(o)}function cRe(o){o=o|0,uRe(o+24|0)}function uRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function fRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,Uz()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Uz(){return 1204}function ARe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=pRe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hRe(l,d,u),I=A}function pRe(o){return o=o|0,(n[(wM()|0)+24>>2]|0)+(o*12|0)|0}function hRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),BM(d,u),d=vM(d,u)|0,sp[A&31](o,d),I=m}function BM(o,l){o=o|0,l=l|0}function vM(o,l){return o=o|0,l=l|0,gRe(l)|0}function gRe(o){return o=o|0,o|0}function dRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mRe(o,u,d,0),I=A}function mRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=SM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=yRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,ERe(m,A)|0,A),I=d}function SM(){var o=0,l=0;if(s[7696]|0||(Hz(9484),gr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(_r(9484)|0)){o=9484,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Hz(9484)}return 9484}function yRe(o){return o=o|0,0}function ERe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=SM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],_z(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(IRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function _z(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function IRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=CRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,wRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],_z(m,A,u),n[T>>2]=(n[T>>2]|0)+12,BRe(o,k),vRe(k),I=M;return}}function CRe(o){return o=o|0,357913941}function wRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function BRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function vRe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Hz(o){o=o|0,bRe(o)}function SRe(o){o=o|0,DRe(o+24|0)}function DRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function bRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,PRe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function PRe(){return 1212}function xRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=kRe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],QRe(l,m,u,A),I=d}function kRe(o){return o=o|0,(n[(SM()|0)+24>>2]|0)+(o*12|0)|0}function QRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),BM(m,u),m=vM(m,u)|0,ad(B,A),B=ld(B,A)|0,F2[d&15](o,m,B),I=k}function TRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RRe(o,u,d,1),I=A}function RRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=DM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NRe(m,A)|0,A),I=d}function DM(){var o=0,l=0;if(s[7704]|0||(Gz(9520),gr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(_r(9520)|0)){o=9520,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Gz(9520)}return 9520}function FRe(o){return o=o|0,0}function NRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=DM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],jz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ORe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function jz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ORe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],jz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,URe(o,k),_Re(k),I=M;return}}function LRe(o){return o=o|0,357913941}function MRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function URe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Re(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Gz(o){o=o|0,GRe(o)}function HRe(o){o=o|0,jRe(o+24|0)}function jRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,qRe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qRe(){return 1224}function WRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;return d=I,I=I+16|0,m=d+8|0,B=d,k=YRe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],A=+VRe(l,m,u),I=d,+A}function YRe(o){return o=o|0,(n[(DM()|0)+24>>2]|0)+(o*12|0)|0}function VRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,B=+kf(+_Z[A&7](o,d)),I=m,+B}function JRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KRe(o,u,d,1),I=A}function KRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=bM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=zRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XRe(m,A)|0,A),I=d}function bM(){var o=0,l=0;if(s[7712]|0||(Wz(9556),gr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(_r(9556)|0)){o=9556,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Wz(9556)}return 9556}function zRe(o){return o=o|0,0}function XRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=bM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],qz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ZRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function qz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ZRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=$Re(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,eFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],qz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,tFe(o,k),rFe(k),I=M;return}}function $Re(o){return o=o|0,357913941}function eFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function tFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Wz(o){o=o|0,sFe(o)}function nFe(o){o=o|0,iFe(o+24|0)}function iFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function sFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,oFe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oFe(){return 1232}function aFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=lFe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=+cFe(l,d),I=A,+u}function lFe(o){return o=o|0,(n[(bM()|0)+24>>2]|0)+(o*12|0)|0}function cFe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),+ +kf(+UZ[u&15](o))}function uFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fFe(o,u,d,1),I=A}function fFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=PM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AFe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pFe(m,A)|0,A),I=d}function PM(){var o=0,l=0;if(s[7720]|0||(Vz(9592),gr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(_r(9592)|0)){o=9592,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Vz(9592)}return 9592}function AFe(o){return o=o|0,0}function pFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=PM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Yz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hFe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Yz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gFe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Yz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mFe(o,k),yFe(k),I=M;return}}function gFe(o){return o=o|0,357913941}function dFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Vz(o){o=o|0,CFe(o)}function EFe(o){o=o|0,IFe(o+24|0)}function IFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function CFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,7,l,wFe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wFe(){return 1276}function BFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=vFe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=SFe(l,A)|0,I=u,l|0}function vFe(o){return o=o|0,(n[(PM()|0)+24>>2]|0)+(o*12|0)|0}function SFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+16|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sp[u&31](A,o),A=Jz(A)|0,I=d,A|0}function Jz(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(Kz()|0)|0,A?(AM(l,A),pM(u,l),DFe(o,u),o=hM(l)|0):o=bFe(o)|0,I=d,o|0}function Kz(){var o=0;return s[7736]|0||(LFe(9640),gr(25,9640,U|0)|0,o=7736,n[o>>2]=1,n[o+4>>2]=0),9640}function DFe(o,l){o=o|0,l=l|0,QFe(l,o,o+8|0)|0}function bFe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(16)|0,n[k>>2]=n[o>>2],n[k+4>>2]=n[o+4>>2],n[k+8>>2]=n[o+8>>2],n[k+12>>2]=n[o+12>>2],m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xM(o,m,d),n[A>>2]=o,I=u,l|0}function xM(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1244,n[u+12>>2]=l,n[o+4>>2]=u}function PFe(o){o=o|0,$y(o),It(o)}function xFe(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function kFe(o){o=o|0,It(o)}function QFe(o,l,u){return o=o|0,l=l|0,u=u|0,l=TFe(n[o>>2]|0,l,u)|0,u=o+4|0,n[(n[u>>2]|0)+8>>2]=l,n[(n[u>>2]|0)+8>>2]|0}function TFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return A=I,I=I+16|0,d=A,Fl(d),o=Os(o)|0,u=RFe(o,n[l>>2]|0,+E[u>>3])|0,Nl(d),I=A,u|0}function RFe(o,l,u){o=o|0,l=l|0,u=+u;var A=0;return A=da(FFe()|0)|0,l=Yy(l)|0,ou(0,A|0,o|0,l|0,+ +Ja(u))|0}function FFe(){var o=0;return s[7728]|0||(NFe(9628),o=7728,n[o>>2]=1,n[o+4>>2]=0),9628}function NFe(o){o=o|0,Qo(o,OFe()|0,2)}function OFe(){return 1264}function LFe(o){o=o|0,Lh(o)}function MFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UFe(o,u,d,1),I=A}function UFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=kM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=_Fe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,HFe(m,A)|0,A),I=d}function kM(){var o=0,l=0;if(s[7744]|0||(Xz(9684),gr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(_r(9684)|0)){o=9684,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Xz(9684)}return 9684}function _Fe(o){return o=o|0,0}function HFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=kM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],zz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(jFe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function zz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function jFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=GFe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,qFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],zz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,WFe(o,k),YFe(k),I=M;return}}function GFe(o){return o=o|0,357913941}function qFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function WFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function YFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Xz(o){o=o|0,KFe(o)}function VFe(o){o=o|0,JFe(o+24|0)}function JFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function KFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,zFe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function zFe(){return 1280}function XFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=ZFe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=$Fe(l,d,u)|0,I=A,u|0}function ZFe(o){return o=o|0,(n[(kM()|0)+24>>2]|0)+(o*12|0)|0}function $Fe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return B=I,I=I+32|0,d=B,m=B+16|0,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(m,u),m=rp(m,u)|0,F2[A&15](d,o,m),m=Jz(d)|0,I=B,m|0}function eNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tNe(o,u,d,1),I=A}function tNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=QM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=rNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,nNe(m,A)|0,A),I=d}function QM(){var o=0,l=0;if(s[7752]|0||($z(9720),gr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(_r(9720)|0)){o=9720,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));$z(9720)}return 9720}function rNe(o){return o=o|0,0}function nNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=QM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Zz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(iNe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Zz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function iNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=sNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,oNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Zz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,aNe(o,k),lNe(k),I=M;return}}function sNe(o){return o=o|0,357913941}function oNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function aNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function lNe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function $z(o){o=o|0,fNe(o)}function cNe(o){o=o|0,uNe(o+24|0)}function uNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function fNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,ANe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ANe(){return 1288}function pNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=hNe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=gNe(l,A)|0,I=u,l|0}function hNe(o){return o=o|0,(n[(QM()|0)+24>>2]|0)+(o*12|0)|0}function gNe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sd(gd[u&31](o)|0)|0}function dNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mNe(o,u,d,0),I=A}function mNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=TM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=yNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,ENe(m,A)|0,A),I=d}function TM(){var o=0,l=0;if(s[7760]|0||(tX(9756),gr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(_r(9756)|0)){o=9756,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));tX(9756)}return 9756}function yNe(o){return o=o|0,0}function ENe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=TM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],eX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(INe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function eX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function INe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=CNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,wNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],eX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,BNe(o,k),vNe(k),I=M;return}}function CNe(o){return o=o|0,357913941}function wNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function BNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function vNe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function tX(o){o=o|0,bNe(o)}function SNe(o){o=o|0,DNe(o+24|0)}function DNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function bNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,PNe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function PNe(){return 1292}function xNe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=kNe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],QNe(l,d,u),I=A}function kNe(o){return o=o|0,(n[(TM()|0)+24>>2]|0)+(o*12|0)|0}function QNe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Qf(d,u),u=+Tf(d,u),OZ[A&31](o,u),I=m}function TNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RNe(o,u,d,0),I=A}function RNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=RM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NNe(m,A)|0,A),I=d}function RM(){var o=0,l=0;if(s[7768]|0||(nX(9792),gr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(_r(9792)|0)){o=9792,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));nX(9792)}return 9792}function FNe(o){return o=o|0,0}function NNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=RM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],rX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ONe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function rX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ONe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],rX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,UNe(o,k),_Ne(k),I=M;return}}function LNe(o){return o=o|0,357913941}function MNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function UNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Ne(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function nX(o){o=o|0,GNe(o)}function HNe(o){o=o|0,jNe(o+24|0)}function jNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,qNe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qNe(){return 1300}function WNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=YNe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],VNe(l,m,u,A),I=d}function YNe(o){return o=o|0,(n[(RM()|0)+24>>2]|0)+(o*12|0)|0}function VNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),tp(m,u),m=rp(m,u)|0,Qf(B,A),A=+Tf(B,A),qZ[d&15](o,m,A),I=k}function JNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KNe(o,u,d,0),I=A}function KNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=FM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=zNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XNe(m,A)|0,A),I=d}function FM(){var o=0,l=0;if(s[7776]|0||(sX(9828),gr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(_r(9828)|0)){o=9828,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));sX(9828)}return 9828}function zNe(o){return o=o|0,0}function XNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=FM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],iX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ZNe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function iX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ZNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=$Ne(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,eOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],iX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,tOe(o,k),rOe(k),I=M;return}}function $Ne(o){return o=o|0,357913941}function eOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function tOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function sX(o){o=o|0,sOe(o)}function nOe(o){o=o|0,iOe(o+24|0)}function iOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function sOe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,7,l,oOe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oOe(){return 1312}function aOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=lOe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cOe(l,d,u),I=A}function lOe(o){return o=o|0,(n[(FM()|0)+24>>2]|0)+(o*12|0)|0}function cOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,sp[A&31](o,d),I=m}function uOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fOe(o,u,d,0),I=A}function fOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=NM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AOe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pOe(m,A)|0,A),I=d}function NM(){var o=0,l=0;if(s[7784]|0||(aX(9864),gr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(_r(9864)|0)){o=9864,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));aX(9864)}return 9864}function AOe(o){return o=o|0,0}function pOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=NM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],oX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hOe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function oX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gOe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],oX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mOe(o,k),yOe(k),I=M;return}}function gOe(o){return o=o|0,357913941}function dOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function aX(o){o=o|0,COe(o)}function EOe(o){o=o|0,IOe(o+24|0)}function IOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function COe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,wOe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wOe(){return 1320}function BOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=vOe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SOe(l,d,u),I=A}function vOe(o){return o=o|0,(n[(NM()|0)+24>>2]|0)+(o*12|0)|0}function SOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),DOe(d,u),d=bOe(d,u)|0,sp[A&31](o,d),I=m}function DOe(o,l){o=o|0,l=l|0}function bOe(o,l){return o=o|0,l=l|0,POe(l)|0}function POe(o){return o=o|0,o|0}function xOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kOe(o,u,d,0),I=A}function kOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=OM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=QOe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,TOe(m,A)|0,A),I=d}function OM(){var o=0,l=0;if(s[7792]|0||(cX(9900),gr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(_r(9900)|0)){o=9900,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));cX(9900)}return 9900}function QOe(o){return o=o|0,0}function TOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=OM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],lX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ROe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function lX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ROe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=FOe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,NOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],lX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,OOe(o,k),LOe(k),I=M;return}}function FOe(o){return o=o|0,357913941}function NOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function OOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function LOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function cX(o){o=o|0,_Oe(o)}function MOe(o){o=o|0,UOe(o+24|0)}function UOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function _Oe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,22,l,HOe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function HOe(){return 1344}function jOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;u=I,I=I+16|0,A=u+8|0,d=u,m=GOe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],qOe(l,A),I=u}function GOe(o){return o=o|0,(n[(OM()|0)+24>>2]|0)+(o*12|0)|0}function qOe(o,l){o=o|0,l=l|0;var u=0;u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ip[u&127](o)}function WOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=LM()|0,o=YOe(u)|0,vn(m,l,d,o,VOe(u,A)|0,A)}function LM(){var o=0,l=0;if(s[7800]|0||(fX(9936),gr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(_r(9936)|0)){o=9936,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));fX(9936)}return 9936}function YOe(o){return o=o|0,o|0}function VOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=LM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(uX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(JOe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function uX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function JOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=KOe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,zOe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,uX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,XOe(o,d),ZOe(d),I=k;return}}function KOe(o){return o=o|0,536870911}function zOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function XOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function fX(o){o=o|0,tLe(o)}function $Oe(o){o=o|0,eLe(o+24|0)}function eLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function tLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,23,l,Uz()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function rLe(o,l){o=o|0,l=l|0,iLe(n[(nLe(o)|0)>>2]|0,l)}function nLe(o){return o=o|0,(n[(LM()|0)+24>>2]|0)+(o<<3)|0}function iLe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,BM(A,l),l=vM(A,l)|0,ip[o&127](l),I=u}function sLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=MM()|0,o=oLe(u)|0,vn(m,l,d,o,aLe(u,A)|0,A)}function MM(){var o=0,l=0;if(s[7808]|0||(pX(9972),gr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(_r(9972)|0)){o=9972,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));pX(9972)}return 9972}function oLe(o){return o=o|0,o|0}function aLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=MM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(AX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(lLe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function AX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function lLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=cLe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,uLe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,AX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,fLe(o,d),ALe(d),I=k;return}}function cLe(o){return o=o|0,536870911}function uLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function fLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ALe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function pX(o){o=o|0,gLe(o)}function pLe(o){o=o|0,hLe(o+24|0)}function hLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function gLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,9,l,dLe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function dLe(){return 1348}function mLe(o,l){return o=o|0,l=l|0,ELe(n[(yLe(o)|0)>>2]|0,l)|0}function yLe(o){return o=o|0,(n[(MM()|0)+24>>2]|0)+(o<<3)|0}function ELe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,hX(A,l),l=gX(A,l)|0,l=TP(gd[o&31](l)|0)|0,I=u,l|0}function hX(o,l){o=o|0,l=l|0}function gX(o,l){return o=o|0,l=l|0,ILe(l)|0}function ILe(o){return o=o|0,o|0}function CLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=UM()|0,o=wLe(u)|0,vn(m,l,d,o,BLe(u,A)|0,A)}function UM(){var o=0,l=0;if(s[7816]|0||(mX(10008),gr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(_r(10008)|0)){o=10008,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));mX(10008)}return 10008}function wLe(o){return o=o|0,o|0}function BLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=UM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(dX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(vLe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function dX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function vLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=SLe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,DLe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,dX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,bLe(o,d),PLe(d),I=k;return}}function SLe(o){return o=o|0,536870911}function DLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function bLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function PLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function mX(o){o=o|0,QLe(o)}function xLe(o){o=o|0,kLe(o+24|0)}function kLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function QLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,15,l,Rz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function TLe(o){return o=o|0,FLe(n[(RLe(o)|0)>>2]|0)|0}function RLe(o){return o=o|0,(n[(UM()|0)+24>>2]|0)+(o<<3)|0}function FLe(o){return o=o|0,TP(VP[o&7]()|0)|0}function NLe(){var o=0;return s[7832]|0||(GLe(10052),gr(25,10052,U|0)|0,o=7832,n[o>>2]=1,n[o+4>>2]=0),10052}function OLe(o,l){o=o|0,l=l|0,n[o>>2]=LLe()|0,n[o+4>>2]=MLe()|0,n[o+12>>2]=l,n[o+8>>2]=ULe()|0,n[o+32>>2]=2}function LLe(){return 11709}function MLe(){return 1188}function ULe(){return FP()|0}function _Le(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(HLe(u),It(u)):l|0&&(Oy(l),It(l))}function Hh(o,l){return o=o|0,l=l|0,l&o|0}function HLe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function FP(){var o=0;return s[7824]|0||(n[2511]=jLe()|0,n[2512]=0,o=7824,n[o>>2]=1,n[o+4>>2]=0),10044}function jLe(){return 0}function GLe(o){o=o|0,Lh(o)}function qLe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0;l=I,I=I+32|0,u=l+24|0,m=l+16|0,d=l+8|0,A=l,WLe(o,4827),YLe(o,4834,3)|0,VLe(o,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],JLe(o,4841,u)|0,n[d>>2]=1,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],KLe(o,4871,u)|0,n[A>>2]=10,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],zLe(o,4891,u)|0,I=l}function WLe(o,l){o=o|0,l=l|0;var u=0;u=PUe()|0,n[o>>2]=u,xUe(u,l),jh(n[o>>2]|0)}function YLe(o,l,u){return o=o|0,l=l|0,u=u|0,AUe(o,Bn(l)|0,u,0),o|0}function VLe(o,l,u){return o=o|0,l=l|0,u=u|0,XMe(o,Bn(l)|0,u,0),o|0}function JLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TMe(o,l,d),I=A,o|0}function KLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],pMe(o,l,d),I=A,o|0}function zLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],XLe(o,l,d),I=A,o|0}function XLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZLe(o,u,d,1),I=A}function ZLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=_M()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=$Le(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,eMe(m,A)|0,A),I=d}function _M(){var o=0,l=0;if(s[7840]|0||(EX(10100),gr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(_r(10100)|0)){o=10100,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));EX(10100)}return 10100}function $Le(o){return o=o|0,0}function eMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=_M()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],yX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(tMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function yX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function tMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=rMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,nMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],yX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,iMe(o,k),sMe(k),I=M;return}}function rMe(o){return o=o|0,357913941}function nMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function iMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function sMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function EX(o){o=o|0,lMe(o)}function oMe(o){o=o|0,aMe(o+24|0)}function aMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function lMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,cMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function cMe(){return 1364}function uMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=fMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=AMe(l,d,u)|0,I=A,u|0}function fMe(o){return o=o|0,(n[(_M()|0)+24>>2]|0)+(o*12|0)|0}function AMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,d=Dz(gU[A&15](o,d)|0)|0,I=m,d|0}function pMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hMe(o,u,d,0),I=A}function hMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=HM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=gMe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,dMe(m,A)|0,A),I=d}function HM(){var o=0,l=0;if(s[7848]|0||(CX(10136),gr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(_r(10136)|0)){o=10136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));CX(10136)}return 10136}function gMe(o){return o=o|0,0}function dMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=HM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],IX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(mMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function IX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function mMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=yMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,EMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],IX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,IMe(o,k),CMe(k),I=M;return}}function yMe(o){return o=o|0,357913941}function EMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function IMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function CX(o){o=o|0,vMe(o)}function wMe(o){o=o|0,BMe(o+24|0)}function BMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function vMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,9,l,SMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function SMe(){return 1372}function DMe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=bMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PMe(l,d,u),I=A}function bMe(o){return o=o|0,(n[(HM()|0)+24>>2]|0)+(o*12|0)|0}function PMe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=$e;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),xMe(d,u),B=y(kMe(d,u)),NZ[A&1](o,B),I=m}function xMe(o,l){o=o|0,l=+l}function kMe(o,l){return o=o|0,l=+l,y(QMe(l))}function QMe(o){return o=+o,y(o)}function TMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RMe(o,u,d,0),I=A}function RMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=jM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FMe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NMe(m,A)|0,A),I=d}function jM(){var o=0,l=0;if(s[7856]|0||(BX(10172),gr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(_r(10172)|0)){o=10172,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));BX(10172)}return 10172}function FMe(o){return o=o|0,0}function NMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=jM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],wX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(OMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function wX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function OMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],wX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,UMe(o,k),_Me(k),I=M;return}}function LMe(o){return o=o|0,357913941}function MMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function UMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Me(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function BX(o){o=o|0,GMe(o)}function HMe(o){o=o|0,jMe(o+24|0)}function jMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,3,l,qMe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qMe(){return 1380}function WMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=YMe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],VMe(l,m,u,A),I=d}function YMe(o){return o=o|0,(n[(jM()|0)+24>>2]|0)+(o*12|0)|0}function VMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),tp(m,u),m=rp(m,u)|0,JMe(B,A),B=KMe(B,A)|0,F2[d&15](o,m,B),I=k}function JMe(o,l){o=o|0,l=l|0}function KMe(o,l){return o=o|0,l=l|0,zMe(l)|0}function zMe(o){return o=o|0,(o|0)!=0|0}function XMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=GM()|0,o=ZMe(u)|0,vn(m,l,d,o,$Me(u,A)|0,A)}function GM(){var o=0,l=0;if(s[7864]|0||(SX(10208),gr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(_r(10208)|0)){o=10208,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));SX(10208)}return 10208}function ZMe(o){return o=o|0,o|0}function $Me(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=GM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(vX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(eUe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function vX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function eUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=tUe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,rUe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,vX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,nUe(o,d),iUe(d),I=k;return}}function tUe(o){return o=o|0,536870911}function rUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function nUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function iUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function SX(o){o=o|0,aUe(o)}function sUe(o){o=o|0,oUe(o+24|0)}function oUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function aUe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,24,l,lUe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function lUe(){return 1392}function cUe(o,l){o=o|0,l=l|0,fUe(n[(uUe(o)|0)>>2]|0,l)}function uUe(o){return o=o|0,(n[(GM()|0)+24>>2]|0)+(o<<3)|0}function fUe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,hX(A,l),l=gX(A,l)|0,ip[o&127](l),I=u}function AUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=qM()|0,o=pUe(u)|0,vn(m,l,d,o,hUe(u,A)|0,A)}function qM(){var o=0,l=0;if(s[7872]|0||(bX(10244),gr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(_r(10244)|0)){o=10244,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));bX(10244)}return 10244}function pUe(o){return o=o|0,o|0}function hUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=qM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(DX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(gUe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function DX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function gUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=dUe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,mUe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,DX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,yUe(o,d),EUe(d),I=k;return}}function dUe(o){return o=o|0,536870911}function mUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function yUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function EUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function bX(o){o=o|0,wUe(o)}function IUe(o){o=o|0,CUe(o+24|0)}function CUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function wUe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,16,l,BUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function BUe(){return 1400}function vUe(o){return o=o|0,DUe(n[(SUe(o)|0)>>2]|0)|0}function SUe(o){return o=o|0,(n[(qM()|0)+24>>2]|0)+(o<<3)|0}function DUe(o){return o=o|0,bUe(VP[o&7]()|0)|0}function bUe(o){return o=o|0,o|0}function PUe(){var o=0;return s[7880]|0||(NUe(10280),gr(25,10280,U|0)|0,o=7880,n[o>>2]=1,n[o+4>>2]=0),10280}function xUe(o,l){o=o|0,l=l|0,n[o>>2]=kUe()|0,n[o+4>>2]=QUe()|0,n[o+12>>2]=l,n[o+8>>2]=TUe()|0,n[o+32>>2]=4}function kUe(){return 11711}function QUe(){return 1356}function TUe(){return FP()|0}function RUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(FUe(u),It(u)):l|0&&(Kg(l),It(l))}function FUe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function NUe(o){o=o|0,Lh(o)}function OUe(o){o=o|0,LUe(o,4920),MUe(o)|0,UUe(o)|0}function LUe(o,l){o=o|0,l=l|0;var u=0;u=Kz()|0,n[o>>2]=u,o_e(u,l),jh(n[o>>2]|0)}function MUe(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,zUe()|0),o|0}function UUe(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,_Ue()|0),o|0}function _Ue(){var o=0;return s[7888]|0||(PX(10328),gr(53,10328,U|0)|0,o=7888,n[o>>2]=1,n[o+4>>2]=0),_r(10328)|0||PX(10328),10328}function cd(o,l){o=o|0,l=l|0,vn(o,0,l,0,0,0)}function PX(o){o=o|0,GUe(o),ud(o,10)}function HUe(o){o=o|0,jUe(o+24|0)}function jUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function GUe(o){o=o|0;var l=0;l=tn()|0,rn(o,5,1,l,VUe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qUe(o,l,u){o=o|0,l=l|0,u=+u,WUe(o,l,u)}function ud(o,l){o=o|0,l=l|0,n[o+20>>2]=l}function WUe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,m=A+8|0,k=A+13|0,d=A,B=A+12|0,tp(k,l),n[m>>2]=rp(k,l)|0,Qf(B,u),E[d>>3]=+Tf(B,u),YUe(o,m,d),I=A}function YUe(o,l,u){o=o|0,l=l|0,u=u|0,Tl(o+8|0,n[l>>2]|0,+E[u>>3]),s[o+24>>0]=1}function VUe(){return 1404}function JUe(o,l){return o=o|0,l=+l,KUe(o,l)|0}function KUe(o,l){o=o|0,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,m=A+4|0,B=A+8|0,k=A,d=Rl(8)|0,u=d,T=Kt(16)|0,tp(m,o),o=rp(m,o)|0,Qf(B,l),Tl(T,o,+Tf(B,l)),B=u+4|0,n[B>>2]=T,o=Kt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],xM(o,B,m),n[d>>2]=o,I=A,u|0}function zUe(){var o=0;return s[7896]|0||(xX(10364),gr(54,10364,U|0)|0,o=7896,n[o>>2]=1,n[o+4>>2]=0),_r(10364)|0||xX(10364),10364}function xX(o){o=o|0,$Ue(o),ud(o,55)}function XUe(o){o=o|0,ZUe(o+24|0)}function ZUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function $Ue(o){o=o|0;var l=0;l=tn()|0,rn(o,5,4,l,n_e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function e_e(o){o=o|0,t_e(o)}function t_e(o){o=o|0,r_e(o)}function r_e(o){o=o|0,kX(o+8|0),s[o+24>>0]=1}function kX(o){o=o|0,n[o>>2]=0,E[o+8>>3]=0}function n_e(){return 1424}function i_e(){return s_e()|0}function s_e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,A=Kt(16)|0,kX(A),m=o+4|0,n[m>>2]=A,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xM(A,m,d),n[u>>2]=A,I=l,o|0}function o_e(o,l){o=o|0,l=l|0,n[o>>2]=a_e()|0,n[o+4>>2]=l_e()|0,n[o+12>>2]=l,n[o+8>>2]=c_e()|0,n[o+32>>2]=5}function a_e(){return 11710}function l_e(){return 1416}function c_e(){return NP()|0}function u_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(f_e(u),It(u)):l|0&&It(l)}function f_e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function NP(){var o=0;return s[7904]|0||(n[2600]=A_e()|0,n[2601]=0,o=7904,n[o>>2]=1,n[o+4>>2]=0),10400}function A_e(){return n[357]|0}function p_e(o){o=o|0,h_e(o,4926),g_e(o)|0}function h_e(o,l){o=o|0,l=l|0;var u=0;u=yz()|0,n[o>>2]=u,D_e(u,l),jh(n[o>>2]|0)}function g_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,d_e()|0),o|0}function d_e(){var o=0;return s[7912]|0||(QX(10412),gr(56,10412,U|0)|0,o=7912,n[o>>2]=1,n[o+4>>2]=0),_r(10412)|0||QX(10412),10412}function QX(o){o=o|0,E_e(o),ud(o,57)}function m_e(o){o=o|0,y_e(o+24|0)}function y_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function E_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,5,l,B_e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function I_e(o){o=o|0,C_e(o)}function C_e(o){o=o|0,w_e(o)}function w_e(o){o=o|0;var l=0,u=0;l=o+8|0,u=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(u|0));s[o+56>>0]=1}function B_e(){return 1432}function v_e(){return S_e()|0}function S_e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0;B=I,I=I+16|0,o=B+4|0,l=B,u=Rl(8)|0,A=u,d=Kt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=A+4|0,n[m>>2]=d,k=Kt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[o>>2]=n[l>>2],Ez(k,m,o),n[u>>2]=k,I=B,A|0}function D_e(o,l){o=o|0,l=l|0,n[o>>2]=b_e()|0,n[o+4>>2]=P_e()|0,n[o+12>>2]=l,n[o+8>>2]=x_e()|0,n[o+32>>2]=6}function b_e(){return 11704}function P_e(){return 1436}function x_e(){return NP()|0}function k_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(Q_e(u),It(u)):l|0&&It(l)}function Q_e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function T_e(o){o=o|0,R_e(o,4933),F_e(o)|0,N_e(o)|0}function R_e(o,l){o=o|0,l=l|0;var u=0;u=s4e()|0,n[o>>2]=u,o4e(u,l),jh(n[o>>2]|0)}function F_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,K_e()|0),o|0}function N_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,O_e()|0),o|0}function O_e(){var o=0;return s[7920]|0||(TX(10452),gr(58,10452,U|0)|0,o=7920,n[o>>2]=1,n[o+4>>2]=0),_r(10452)|0||TX(10452),10452}function TX(o){o=o|0,U_e(o),ud(o,1)}function L_e(o){o=o|0,M_e(o+24|0)}function M_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function U_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,1,l,G_e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function __e(o,l,u){o=o|0,l=+l,u=+u,H_e(o,l,u)}function H_e(o,l,u){o=o|0,l=+l,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,m=A+8|0,k=A+17|0,d=A,B=A+16|0,Qf(k,l),E[m>>3]=+Tf(k,l),Qf(B,u),E[d>>3]=+Tf(B,u),j_e(o,m,d),I=A}function j_e(o,l,u){o=o|0,l=l|0,u=u|0,RX(o+8|0,+E[l>>3],+E[u>>3]),s[o+24>>0]=1}function RX(o,l,u){o=o|0,l=+l,u=+u,E[o>>3]=l,E[o+8>>3]=u}function G_e(){return 1472}function q_e(o,l){return o=+o,l=+l,W_e(o,l)|0}function W_e(o,l){o=+o,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,B=A+4|0,k=A+8|0,T=A,d=Rl(8)|0,u=d,m=Kt(16)|0,Qf(B,o),o=+Tf(B,o),Qf(k,l),RX(m,o,+Tf(k,l)),k=u+4|0,n[k>>2]=m,m=Kt(8)|0,k=n[k>>2]|0,n[T>>2]=0,n[B>>2]=n[T>>2],FX(m,k,B),n[d>>2]=m,I=A,u|0}function FX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1452,n[u+12>>2]=l,n[o+4>>2]=u}function Y_e(o){o=o|0,$y(o),It(o)}function V_e(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function J_e(o){o=o|0,It(o)}function K_e(){var o=0;return s[7928]|0||(NX(10488),gr(59,10488,U|0)|0,o=7928,n[o>>2]=1,n[o+4>>2]=0),_r(10488)|0||NX(10488),10488}function NX(o){o=o|0,Z_e(o),ud(o,60)}function z_e(o){o=o|0,X_e(o+24|0)}function X_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function Z_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,6,l,r4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function $_e(o){o=o|0,e4e(o)}function e4e(o){o=o|0,t4e(o)}function t4e(o){o=o|0,OX(o+8|0),s[o+24>>0]=1}function OX(o){o=o|0,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[o+12>>2]=0}function r4e(){return 1492}function n4e(){return i4e()|0}function i4e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,A=Kt(16)|0,OX(A),m=o+4|0,n[m>>2]=A,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],FX(A,m,d),n[u>>2]=A,I=l,o|0}function s4e(){var o=0;return s[7936]|0||(A4e(10524),gr(25,10524,U|0)|0,o=7936,n[o>>2]=1,n[o+4>>2]=0),10524}function o4e(o,l){o=o|0,l=l|0,n[o>>2]=a4e()|0,n[o+4>>2]=l4e()|0,n[o+12>>2]=l,n[o+8>>2]=c4e()|0,n[o+32>>2]=7}function a4e(){return 11700}function l4e(){return 1484}function c4e(){return NP()|0}function u4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(f4e(u),It(u)):l|0&&It(l)}function f4e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function A4e(o){o=o|0,Lh(o)}function p4e(o,l,u){o=o|0,l=l|0,u=u|0,o=Bn(l)|0,l=h4e(u)|0,u=g4e(u,0)|0,W4e(o,l,u,WM()|0,0)}function h4e(o){return o=o|0,o|0}function g4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=WM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(MX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(w4e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function WM(){var o=0,l=0;if(s[7944]|0||(LX(10568),gr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(_r(10568)|0)){o=10568,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));LX(10568)}return 10568}function LX(o){o=o|0,y4e(o)}function d4e(o){o=o|0,m4e(o+24|0)}function m4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function y4e(o){o=o|0;var l=0;l=tn()|0,rn(o,1,17,l,Oz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function E4e(o){return o=o|0,C4e(n[(I4e(o)|0)>>2]|0)|0}function I4e(o){return o=o|0,(n[(WM()|0)+24>>2]|0)+(o<<3)|0}function C4e(o){return o=o|0,RP(VP[o&7]()|0)|0}function MX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function w4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=B4e(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,v4e(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,MX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,S4e(o,d),D4e(d),I=k;return}}function B4e(o){return o=o|0,536870911}function v4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function S4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function D4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function b4e(){P4e()}function P4e(){x4e(10604)}function x4e(o){o=o|0,k4e(o,4955)}function k4e(o,l){o=o|0,l=l|0;var u=0;u=Q4e()|0,n[o>>2]=u,T4e(u,l),jh(n[o>>2]|0)}function Q4e(){var o=0;return s[7952]|0||(H4e(10612),gr(25,10612,U|0)|0,o=7952,n[o>>2]=1,n[o+4>>2]=0),10612}function T4e(o,l){o=o|0,l=l|0,n[o>>2]=O4e()|0,n[o+4>>2]=L4e()|0,n[o+12>>2]=l,n[o+8>>2]=M4e()|0,n[o+32>>2]=8}function jh(o){o=o|0;var l=0,u=0;l=I,I=I+16|0,u=l,Jy()|0,n[u>>2]=o,R4e(10608,u),I=l}function Jy(){return s[11714]|0||(n[2652]=0,gr(62,10608,U|0)|0,s[11714]=1),10608}function R4e(o,l){o=o|0,l=l|0;var u=0;u=Kt(8)|0,n[u+4>>2]=n[l>>2],n[u>>2]=n[o>>2],n[o>>2]=u}function F4e(o){o=o|0,N4e(o)}function N4e(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function O4e(){return 11715}function L4e(){return 1496}function M4e(){return FP()|0}function U4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(_4e(u),It(u)):l|0&&It(l)}function _4e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function H4e(o){o=o|0,Lh(o)}function j4e(o,l){o=o|0,l=l|0;var u=0,A=0;Jy()|0,u=n[2652]|0;e:do if(u|0){for(;A=n[u+4>>2]|0,!(A|0&&!(EZ(YM(A)|0,o)|0));)if(u=n[u>>2]|0,!u)break e;G4e(A,l)}while(!1)}function YM(o){return o=o|0,n[o+12>>2]|0}function G4e(o,l){o=o|0,l=l|0;var u=0;o=o+36|0,u=n[o>>2]|0,u|0&&(Sf(u),It(u)),u=Kt(4)|0,DP(u,l),n[o>>2]=u}function VM(){return s[11716]|0||(n[2664]=0,gr(63,10656,U|0)|0,s[11716]=1),10656}function UX(){var o=0;return s[11717]|0?o=n[2665]|0:(q4e(),n[2665]=1504,s[11717]=1,o=1504),o|0}function q4e(){s[11740]|0||(s[11718]=yr(yr(8,0)|0,0)|0,s[11719]=yr(yr(0,0)|0,0)|0,s[11720]=yr(yr(0,16)|0,0)|0,s[11721]=yr(yr(8,0)|0,0)|0,s[11722]=yr(yr(0,0)|0,0)|0,s[11723]=yr(yr(8,0)|0,0)|0,s[11724]=yr(yr(0,0)|0,0)|0,s[11725]=yr(yr(8,0)|0,0)|0,s[11726]=yr(yr(0,0)|0,0)|0,s[11727]=yr(yr(8,0)|0,0)|0,s[11728]=yr(yr(0,0)|0,0)|0,s[11729]=yr(yr(0,0)|0,32)|0,s[11730]=yr(yr(0,0)|0,32)|0,s[11740]=1)}function _X(){return 1572}function W4e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0;m=I,I=I+32|0,L=m+16|0,M=m+12|0,T=m+8|0,k=m+4|0,B=m,n[L>>2]=o,n[M>>2]=l,n[T>>2]=u,n[k>>2]=A,n[B>>2]=d,VM()|0,Y4e(10656,L,M,T,k,B),I=m}function Y4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0;B=Kt(24)|0,gz(B+4|0,n[l>>2]|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0),n[B>>2]=n[o>>2],n[o>>2]=B}function HX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0;if(ct=I,I=I+32|0,Le=ct+20|0,Qe=ct+8|0,tt=ct+4|0,Ze=ct,l=n[l>>2]|0,l|0){Ye=Le+4|0,T=Le+8|0,M=Qe+4|0,L=Qe+8|0,q=Qe+8|0,ae=Le+8|0;do{if(B=l+4|0,k=JM(B)|0,k|0){if(d=P2(k)|0,n[Le>>2]=0,n[Ye>>2]=0,n[T>>2]=0,A=(x2(k)|0)+1|0,V4e(Le,A),A|0)for(;A=A+-1|0,bu(Qe,n[d>>2]|0),m=n[Ye>>2]|0,m>>>0<(n[ae>>2]|0)>>>0?(n[m>>2]=n[Qe>>2],n[Ye>>2]=(n[Ye>>2]|0)+4):KM(Le,Qe),A;)d=d+4|0;A=k2(k)|0,n[Qe>>2]=0,n[M>>2]=0,n[L>>2]=0;e:do if(n[A>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?J4e(Qe,A):(n[d>>2]=n[A>>2],n[M>>2]=(n[M>>2]|0)+4),A=A+4|0,!(n[A>>2]|0))break e;d=n[M>>2]|0,m=n[q>>2]|0}while(!1);n[tt>>2]=OP(B)|0,n[Ze>>2]=_r(k)|0,K4e(u,o,tt,Ze,Le,Qe),zM(Qe),np(Le)}l=n[l>>2]|0}while(l|0)}I=ct}function JM(o){return o=o|0,n[o+12>>2]|0}function P2(o){return o=o|0,n[o+12>>2]|0}function x2(o){return o=o|0,n[o+16>>2]|0}function V4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=n[o>>2]|0,(n[o+8>>2]|0)-A>>2>>>0<l>>>0&&(KX(u,l,(n[o+4>>2]|0)-A>>2,o+8|0),zX(o,u),XX(u)),I=d}function KM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=JX(o)|0,m>>>0<d>>>0)an(o);else{k=n[o>>2]|0,M=(n[o+8>>2]|0)-k|0,T=M>>1,KX(u,M>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,zX(o,u),XX(u),I=B;return}}function k2(o){return o=o|0,n[o+8>>2]|0}function J4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=VX(o)|0,m>>>0<d>>>0)an(o);else{k=n[o>>2]|0,M=(n[o+8>>2]|0)-k|0,T=M>>1,h3e(u,M>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,g3e(o,u),d3e(u),I=B;return}}function OP(o){return o=o|0,n[o>>2]|0}function K4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,z4e(o,l,u,A,d,m)}function zM(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),It(u))}function np(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),It(u))}function z4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+48|0,L=B+40|0,k=B+32|0,q=B+24|0,T=B+12|0,M=B,Fl(k),o=Os(o)|0,n[q>>2]=n[l>>2],u=n[u>>2]|0,A=n[A>>2]|0,XM(T,d),X4e(M,m),n[L>>2]=n[q>>2],Z4e(o,L,u,A,T,M),zM(M),np(T),Nl(k),I=B}function XM(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(A3e(o,A),p3e(o,n[l>>2]|0,n[u>>2]|0,A))}function X4e(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(u3e(o,A),f3e(o,n[l>>2]|0,n[u>>2]|0,A))}function Z4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+32|0,L=B+28|0,q=B+24|0,k=B+12|0,T=B,M=da($4e()|0)|0,n[q>>2]=n[l>>2],n[L>>2]=n[q>>2],l=fd(L)|0,u=jX(u)|0,A=ZM(A)|0,n[k>>2]=n[d>>2],L=d+4|0,n[k+4>>2]=n[L>>2],q=d+8|0,n[k+8>>2]=n[q>>2],n[q>>2]=0,n[L>>2]=0,n[d>>2]=0,d=$M(k)|0,n[T>>2]=n[m>>2],L=m+4|0,n[T+4>>2]=n[L>>2],q=m+8|0,n[T+8>>2]=n[q>>2],n[q>>2]=0,n[L>>2]=0,n[m>>2]=0,lu(0,M|0,o|0,l|0,u|0,A|0,d|0,e3e(T)|0)|0,zM(T),np(k),I=B}function $4e(){var o=0;return s[7968]|0||(l3e(10708),o=7968,n[o>>2]=1,n[o+4>>2]=0),10708}function fd(o){return o=o|0,qX(o)|0}function jX(o){return o=o|0,GX(o)|0}function ZM(o){return o=o|0,RP(o)|0}function $M(o){return o=o|0,r3e(o)|0}function e3e(o){return o=o|0,t3e(o)|0}function t3e(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Rl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=GX(n[(n[o>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function GX(o){return o=o|0,o|0}function r3e(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Rl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=qX((n[o>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function qX(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(WX()|0)|0,A?(AM(l,A),pM(u,l),Mje(o,u),o=hM(l)|0):o=n3e(o)|0,I=d,o|0}function WX(){var o=0;return s[7960]|0||(a3e(10664),gr(25,10664,U|0)|0,o=7960,n[o>>2]=1,n[o+4>>2]=0),10664}function n3e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(4)|0,n[k>>2]=n[o>>2],m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],YX(o,m,d),n[A>>2]=o,I=u,l|0}function YX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1656,n[u+12>>2]=l,n[o+4>>2]=u}function i3e(o){o=o|0,$y(o),It(o)}function s3e(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function o3e(o){o=o|0,It(o)}function a3e(o){o=o|0,Lh(o)}function l3e(o){o=o|0,Qo(o,c3e()|0,5)}function c3e(){return 1676}function u3e(o,l){o=o|0,l=l|0;var u=0;if((VX(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function f3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function VX(o){return o=o|0,1073741823}function A3e(o,l){o=o|0,l=l|0;var u=0;if((JX(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function p3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function JX(o){return o=o|0,1073741823}function h3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function g3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function d3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&It(o)}function KX(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function zX(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function XX(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&It(o)}function m3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0;if(Qe=I,I=I+32|0,L=Qe+20|0,q=Qe+12|0,M=Qe+16|0,ae=Qe+4|0,Ye=Qe,Le=Qe+8|0,k=UX()|0,m=n[k>>2]|0,B=n[m>>2]|0,B|0)for(T=n[k+8>>2]|0,k=n[k+4>>2]|0;bu(L,B),y3e(o,L,k,T),m=m+4|0,B=n[m>>2]|0,B;)T=T+1|0,k=k+1|0;if(m=_X()|0,B=n[m>>2]|0,B|0)do bu(L,B),n[q>>2]=n[m+4>>2],E3e(l,L,q),m=m+8|0,B=n[m>>2]|0;while(B|0);if(m=n[(Jy()|0)>>2]|0,m|0)do l=n[m+4>>2]|0,bu(L,n[(Ky(l)|0)>>2]|0),n[q>>2]=YM(l)|0,I3e(u,L,q),m=n[m>>2]|0;while(m|0);if(bu(M,0),m=VM()|0,n[L>>2]=n[M>>2],HX(L,m,d),m=n[(Jy()|0)>>2]|0,m|0){o=L+4|0,l=L+8|0,u=L+8|0;do{if(T=n[m+4>>2]|0,bu(q,n[(Ky(T)|0)>>2]|0),C3e(ae,ZX(T)|0),B=n[ae>>2]|0,B|0){n[L>>2]=0,n[o>>2]=0,n[l>>2]=0;do bu(Ye,n[(Ky(n[B+4>>2]|0)|0)>>2]|0),k=n[o>>2]|0,k>>>0<(n[u>>2]|0)>>>0?(n[k>>2]=n[Ye>>2],n[o>>2]=(n[o>>2]|0)+4):KM(L,Ye),B=n[B>>2]|0;while(B|0);w3e(A,q,L),np(L)}n[Le>>2]=n[q>>2],M=$X(T)|0,n[L>>2]=n[Le>>2],HX(L,M,d),Cz(ae),m=n[m>>2]|0}while(m|0)}I=Qe}function y3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F3e(o,l,u,A)}function E3e(o,l,u){o=o|0,l=l|0,u=u|0,R3e(o,l,u)}function Ky(o){return o=o|0,o|0}function I3e(o,l,u){o=o|0,l=l|0,u=u|0,x3e(o,l,u)}function ZX(o){return o=o|0,o+16|0}function C3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(m=I,I=I+16|0,d=m+8|0,u=m,n[o>>2]=0,A=n[l>>2]|0,n[d>>2]=A,n[u>>2]=o,u=P3e(u)|0,A|0){if(A=Kt(12)|0,B=(eZ(d)|0)+4|0,o=n[B+4>>2]|0,l=A+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=o,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)o=A;else for(l=A;o=Kt(12)|0,T=(eZ(d)|0)+4|0,k=n[T+4>>2]|0,B=o+4|0,n[B>>2]=n[T>>2],n[B+4>>2]=k,n[l>>2]=o,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=o;n[o>>2]=n[u>>2],n[u>>2]=A}I=m}function w3e(o,l,u){o=o|0,l=l|0,u=u|0,B3e(o,l,u)}function $X(o){return o=o|0,o+24|0}function B3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+24|0,d=A+16|0,k=A+12|0,m=A,Fl(d),o=Os(o)|0,n[k>>2]=n[l>>2],XM(m,u),n[B>>2]=n[k>>2],v3e(o,B,m),np(m),Nl(d),I=A}function v3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+16|0,k=A+12|0,d=A,m=da(S3e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=fd(B)|0,n[d>>2]=n[u>>2],B=u+4|0,n[d+4>>2]=n[B>>2],k=u+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[u>>2]=0,Ts(0,m|0,o|0,l|0,$M(d)|0)|0,np(d),I=A}function S3e(){var o=0;return s[7976]|0||(D3e(10720),o=7976,n[o>>2]=1,n[o+4>>2]=0),10720}function D3e(o){o=o|0,Qo(o,b3e()|0,2)}function b3e(){return 1732}function P3e(o){return o=o|0,n[o>>2]|0}function eZ(o){return o=o|0,n[o>>2]|0}function x3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Fl(d),o=Os(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],tZ(o,m,u),Nl(d),I=A}function tZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+4|0,B=A,d=da(k3e()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=fd(m)|0,Ts(0,d|0,o|0,l|0,jX(u)|0)|0,I=A}function k3e(){var o=0;return s[7984]|0||(Q3e(10732),o=7984,n[o>>2]=1,n[o+4>>2]=0),10732}function Q3e(o){o=o|0,Qo(o,T3e()|0,2)}function T3e(){return 1744}function R3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Fl(d),o=Os(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],tZ(o,m,u),Nl(d),I=A}function F3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Fl(m),o=Os(o)|0,n[k>>2]=n[l>>2],u=s[u>>0]|0,A=s[A>>0]|0,n[B>>2]=n[k>>2],N3e(o,B,u,A),Nl(m),I=d}function N3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,B=d+4|0,k=d,m=da(O3e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=fd(B)|0,u=zy(u)|0,Li(0,m|0,o|0,l|0,u|0,zy(A)|0)|0,I=d}function O3e(){var o=0;return s[7992]|0||(M3e(10744),o=7992,n[o>>2]=1,n[o+4>>2]=0),10744}function zy(o){return o=o|0,L3e(o)|0}function L3e(o){return o=o|0,o&255|0}function M3e(o){o=o|0,Qo(o,U3e()|0,3)}function U3e(){return 1756}function _3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;switch(ae=I,I=I+32|0,k=ae+8|0,T=ae+4|0,M=ae+20|0,L=ae,yM(o,0),A=Lje(l)|0,n[k>>2]=0,q=k+4|0,n[q>>2]=0,n[k+8>>2]=0,A<<24>>24){case 0:{s[M>>0]=0,H3e(T,u,M),LP(o,T)|0,Df(T);break}case 8:{q=sU(l)|0,s[M>>0]=8,bu(L,n[q+4>>2]|0),j3e(T,u,M,L,q+8|0),LP(o,T)|0,Df(T);break}case 9:{if(m=sU(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,bu(T,n[d>>2]|0),A=n[q>>2]|0,A>>>0<(n[B>>2]|0)>>>0?(n[A>>2]=n[T>>2],n[q>>2]=(n[q>>2]|0)+4):KM(k,T),l;)d=d+4|0;s[M>>0]=9,bu(L,n[m+8>>2]|0),G3e(T,u,M,L,k),LP(o,T)|0,Df(T);break}default:q=sU(l)|0,s[M>>0]=A,bu(L,n[q+4>>2]|0),q3e(T,u,M,L),LP(o,T)|0,Df(T)}np(k),I=ae}function H3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,Fl(d),l=Os(l)|0,n8e(o,l,s[u>>0]|0),Nl(d),I=A}function LP(o,l){o=o|0,l=l|0;var u=0;return u=n[o>>2]|0,u|0&&Na(u|0),n[o>>2]=n[l>>2],n[l>>2]=0,o|0}function j3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+32|0,k=m+16|0,B=m+8|0,T=m,Fl(B),l=Os(l)|0,u=s[u>>0]|0,n[T>>2]=n[A>>2],d=n[d>>2]|0,n[k>>2]=n[T>>2],$3e(o,l,u,k,d),Nl(B),I=m}function G3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0;m=I,I=I+32|0,T=m+24|0,B=m+16|0,M=m+12|0,k=m,Fl(B),l=Os(l)|0,u=s[u>>0]|0,n[M>>2]=n[A>>2],XM(k,d),n[T>>2]=n[M>>2],K3e(o,l,u,T,k),np(k),Nl(B),I=m}function q3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Fl(m),l=Os(l)|0,u=s[u>>0]|0,n[k>>2]=n[A>>2],n[B>>2]=n[k>>2],W3e(o,l,u,B),Nl(m),I=d}function W3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+4|0,k=d,B=da(Y3e()|0)|0,u=zy(u)|0,n[k>>2]=n[A>>2],n[m>>2]=n[k>>2],MP(o,Ts(0,B|0,l|0,u|0,fd(m)|0)|0),I=d}function Y3e(){var o=0;return s[8e3]|0||(V3e(10756),o=8e3,n[o>>2]=1,n[o+4>>2]=0),10756}function MP(o,l){o=o|0,l=l|0,yM(o,l)}function V3e(o){o=o|0,Qo(o,J3e()|0,2)}function J3e(){return 1772}function K3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0;m=I,I=I+32|0,T=m+16|0,M=m+12|0,B=m,k=da(z3e()|0)|0,u=zy(u)|0,n[M>>2]=n[A>>2],n[T>>2]=n[M>>2],A=fd(T)|0,n[B>>2]=n[d>>2],T=d+4|0,n[B+4>>2]=n[T>>2],M=d+8|0,n[B+8>>2]=n[M>>2],n[M>>2]=0,n[T>>2]=0,n[d>>2]=0,MP(o,Li(0,k|0,l|0,u|0,A|0,$M(B)|0)|0),np(B),I=m}function z3e(){var o=0;return s[8008]|0||(X3e(10768),o=8008,n[o>>2]=1,n[o+4>>2]=0),10768}function X3e(o){o=o|0,Qo(o,Z3e()|0,3)}function Z3e(){return 1784}function $3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,k=m+4|0,T=m,B=da(e8e()|0)|0,u=zy(u)|0,n[T>>2]=n[A>>2],n[k>>2]=n[T>>2],A=fd(k)|0,MP(o,Li(0,B|0,l|0,u|0,A|0,ZM(d)|0)|0),I=m}function e8e(){var o=0;return s[8016]|0||(t8e(10780),o=8016,n[o>>2]=1,n[o+4>>2]=0),10780}function t8e(o){o=o|0,Qo(o,r8e()|0,3)}function r8e(){return 1800}function n8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=da(i8e()|0)|0,MP(o,dn(0,A|0,l|0,zy(u)|0)|0)}function i8e(){var o=0;return s[8024]|0||(s8e(10792),o=8024,n[o>>2]=1,n[o+4>>2]=0),10792}function s8e(o){o=o|0,Qo(o,o8e()|0,1)}function o8e(){return 1816}function a8e(){l8e(),c8e(),u8e()}function l8e(){n[2702]=xZ(65536)|0}function c8e(){k8e(10856)}function u8e(){f8e(10816)}function f8e(o){o=o|0,A8e(o,5044),p8e(o)|0}function A8e(o,l){o=o|0,l=l|0;var u=0;u=WX()|0,n[o>>2]=u,v8e(u,l),jh(n[o>>2]|0)}function p8e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,h8e()|0),o|0}function h8e(){var o=0;return s[8032]|0||(rZ(10820),gr(64,10820,U|0)|0,o=8032,n[o>>2]=1,n[o+4>>2]=0),_r(10820)|0||rZ(10820),10820}function rZ(o){o=o|0,m8e(o),ud(o,25)}function g8e(o){o=o|0,d8e(o+24|0)}function d8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function m8e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,18,l,C8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function y8e(o,l){o=o|0,l=l|0,E8e(o,l)}function E8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;u=I,I=I+16|0,A=u,d=u+4|0,ad(d,l),n[A>>2]=ld(d,l)|0,I8e(o,A),I=u}function I8e(o,l){o=o|0,l=l|0,nZ(o+4|0,n[l>>2]|0),s[o+8>>0]=1}function nZ(o,l){o=o|0,l=l|0,n[o>>2]=l}function C8e(){return 1824}function w8e(o){return o=o|0,B8e(o)|0}function B8e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(4)|0,ad(d,o),nZ(k,ld(d,o)|0),m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],YX(o,m,d),n[A>>2]=o,I=u,l|0}function Rl(o){o=o|0;var l=0,u=0;return o=o+7&-8,o>>>0<=32768&&(l=n[2701]|0,o>>>0<=(65536-l|0)>>>0)?(u=(n[2702]|0)+l|0,n[2701]=l+o,o=u):(o=xZ(o+8|0)|0,n[o>>2]=n[2703],n[2703]=o,o=o+8|0),o|0}function v8e(o,l){o=o|0,l=l|0,n[o>>2]=S8e()|0,n[o+4>>2]=D8e()|0,n[o+12>>2]=l,n[o+8>>2]=b8e()|0,n[o+32>>2]=9}function S8e(){return 11744}function D8e(){return 1832}function b8e(){return NP()|0}function P8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(x8e(u),It(u)):l|0&&It(l)}function x8e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function k8e(o){o=o|0,Q8e(o,5052),T8e(o)|0,R8e(o,5058,26)|0,F8e(o,5069,1)|0,N8e(o,5077,10)|0,O8e(o,5087,19)|0,L8e(o,5094,27)|0}function Q8e(o,l){o=o|0,l=l|0;var u=0;u=xje()|0,n[o>>2]=u,kje(u,l),jh(n[o>>2]|0)}function T8e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,gje()|0),o|0}function R8e(o,l,u){return o=o|0,l=l|0,u=u|0,XHe(o,Bn(l)|0,u,0),o|0}function F8e(o,l,u){return o=o|0,l=l|0,u=u|0,OHe(o,Bn(l)|0,u,0),o|0}function N8e(o,l,u){return o=o|0,l=l|0,u=u|0,hHe(o,Bn(l)|0,u,0),o|0}function O8e(o,l,u){return o=o|0,l=l|0,u=u|0,$8e(o,Bn(l)|0,u,0),o|0}function iZ(o,l){o=o|0,l=l|0;var u=0,A=0;e:for(;;){for(u=n[2703]|0;;){if((u|0)==(l|0))break e;if(A=n[u>>2]|0,n[2703]=A,!u)u=A;else break}It(u)}n[2701]=o}function L8e(o,l,u){return o=o|0,l=l|0,u=u|0,M8e(o,Bn(l)|0,u,0),o|0}function M8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=eU()|0,o=U8e(u)|0,vn(m,l,d,o,_8e(u,A)|0,A)}function eU(){var o=0,l=0;if(s[8040]|0||(oZ(10860),gr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(_r(10860)|0)){o=10860,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oZ(10860)}return 10860}function U8e(o){return o=o|0,o|0}function _8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=eU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(sZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(H8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function sZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function H8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=j8e(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,G8e(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,sZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,q8e(o,d),W8e(d),I=k;return}}function j8e(o){return o=o|0,536870911}function G8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function q8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function W8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function oZ(o){o=o|0,J8e(o)}function Y8e(o){o=o|0,V8e(o+24|0)}function V8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function J8e(o){o=o|0;var l=0;l=tn()|0,rn(o,1,11,l,K8e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function K8e(){return 1840}function z8e(o,l,u){o=o|0,l=l|0,u=u|0,Z8e(n[(X8e(o)|0)>>2]|0,l,u)}function X8e(o){return o=o|0,(n[(eU()|0)+24>>2]|0)+(o<<3)|0}function Z8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+1|0,d=A,ad(m,l),l=ld(m,l)|0,ad(d,u),u=ld(d,u)|0,sp[o&31](l,u),I=A}function $8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=tU()|0,o=eHe(u)|0,vn(m,l,d,o,tHe(u,A)|0,A)}function tU(){var o=0,l=0;if(s[8048]|0||(lZ(10896),gr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(_r(10896)|0)){o=10896,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lZ(10896)}return 10896}function eHe(o){return o=o|0,o|0}function tHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=tU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(aZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(rHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function aZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function rHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=nHe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,iHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,aZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,sHe(o,d),oHe(d),I=k;return}}function nHe(o){return o=o|0,536870911}function iHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function sHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function oHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function lZ(o){o=o|0,cHe(o)}function aHe(o){o=o|0,lHe(o+24|0)}function lHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function cHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,11,l,uHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uHe(){return 1852}function fHe(o,l){return o=o|0,l=l|0,pHe(n[(AHe(o)|0)>>2]|0,l)|0}function AHe(o){return o=o|0,(n[(tU()|0)+24>>2]|0)+(o<<3)|0}function pHe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,ad(A,l),l=ld(A,l)|0,l=RP(gd[o&31](l)|0)|0,I=u,l|0}function hHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=rU()|0,o=gHe(u)|0,vn(m,l,d,o,dHe(u,A)|0,A)}function rU(){var o=0,l=0;if(s[8056]|0||(uZ(10932),gr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(_r(10932)|0)){o=10932,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));uZ(10932)}return 10932}function gHe(o){return o=o|0,o|0}function dHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=rU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(cZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(mHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function cZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function mHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=yHe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,EHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,cZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,IHe(o,d),CHe(d),I=k;return}}function yHe(o){return o=o|0,536870911}function EHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function IHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function uZ(o){o=o|0,vHe(o)}function wHe(o){o=o|0,BHe(o+24|0)}function BHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function vHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,7,l,SHe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function SHe(){return 1860}function DHe(o,l,u){return o=o|0,l=l|0,u=u|0,PHe(n[(bHe(o)|0)>>2]|0,l,u)|0}function bHe(o){return o=o|0,(n[(rU()|0)+24>>2]|0)+(o<<3)|0}function PHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+32|0,B=A+12|0,m=A+8|0,k=A,T=A+16|0,d=A+4|0,xHe(T,l),kHe(k,T,l),Mh(d,u),u=Uh(d,u)|0,n[B>>2]=n[k>>2],F2[o&15](m,B,u),u=QHe(m)|0,Df(m),_h(d),I=A,u|0}function xHe(o,l){o=o|0,l=l|0}function kHe(o,l,u){o=o|0,l=l|0,u=u|0,THe(o,u)}function QHe(o){return o=o|0,Os(o)|0}function THe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+16|0,u=d,A=l,A&1?(RHe(u,0),Me(A|0,u|0)|0,FHe(o,u),NHe(u)):n[o>>2]=n[l>>2],I=d}function RHe(o,l){o=o|0,l=l|0,Su(o,l),n[o+4>>2]=0,s[o+8>>0]=0}function FHe(o,l){o=o|0,l=l|0,n[o>>2]=n[l+4>>2]}function NHe(o){o=o|0,s[o+8>>0]=0}function OHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=nU()|0,o=LHe(u)|0,vn(m,l,d,o,MHe(u,A)|0,A)}function nU(){var o=0,l=0;if(s[8064]|0||(AZ(10968),gr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(_r(10968)|0)){o=10968,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));AZ(10968)}return 10968}function LHe(o){return o=o|0,o|0}function MHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=nU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(fZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(UHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function fZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function UHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=_He(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,HHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,fZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,jHe(o,d),GHe(d),I=k;return}}function _He(o){return o=o|0,536870911}function HHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function jHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function GHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function AZ(o){o=o|0,YHe(o)}function qHe(o){o=o|0,WHe(o+24|0)}function WHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function YHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,1,l,VHe()|0,5),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function VHe(){return 1872}function JHe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,zHe(n[(KHe(o)|0)>>2]|0,l,u,A,d,m)}function KHe(o){return o=o|0,(n[(nU()|0)+24>>2]|0)+(o<<3)|0}function zHe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+32|0,k=B+16|0,T=B+12|0,M=B+8|0,L=B+4|0,q=B,Mh(k,l),l=Uh(k,l)|0,Mh(T,u),u=Uh(T,u)|0,Mh(M,A),A=Uh(M,A)|0,Mh(L,d),d=Uh(L,d)|0,Mh(q,m),m=Uh(q,m)|0,FZ[o&1](l,u,A,d,m),_h(q),_h(L),_h(M),_h(T),_h(k),I=B}function XHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=iU()|0,o=ZHe(u)|0,vn(m,l,d,o,$He(u,A)|0,A)}function iU(){var o=0,l=0;if(s[8072]|0||(hZ(11004),gr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(_r(11004)|0)){o=11004,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));hZ(11004)}return 11004}function ZHe(o){return o=o|0,o|0}function $He(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=iU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(pZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(eje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function pZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function eje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=tje(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,rje(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,pZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,nje(o,d),ije(d),I=k;return}}function tje(o){return o=o|0,536870911}function rje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function nje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ije(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function hZ(o){o=o|0,aje(o)}function sje(o){o=o|0,oje(o+24|0)}function oje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function aje(o){o=o|0;var l=0;l=tn()|0,rn(o,1,12,l,lje()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function lje(){return 1896}function cje(o,l,u){o=o|0,l=l|0,u=u|0,fje(n[(uje(o)|0)>>2]|0,l,u)}function uje(o){return o=o|0,(n[(iU()|0)+24>>2]|0)+(o<<3)|0}function fje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+4|0,d=A,Aje(m,l),l=pje(m,l)|0,Mh(d,u),u=Uh(d,u)|0,sp[o&31](l,u),_h(d),I=A}function Aje(o,l){o=o|0,l=l|0}function pje(o,l){return o=o|0,l=l|0,hje(l)|0}function hje(o){return o=o|0,o|0}function gje(){var o=0;return s[8080]|0||(gZ(11040),gr(70,11040,U|0)|0,o=8080,n[o>>2]=1,n[o+4>>2]=0),_r(11040)|0||gZ(11040),11040}function gZ(o){o=o|0,yje(o),ud(o,71)}function dje(o){o=o|0,mje(o+24|0)}function mje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function yje(o){o=o|0;var l=0;l=tn()|0,rn(o,5,7,l,wje()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Eje(o){o=o|0,Ije(o)}function Ije(o){o=o|0,Cje(o)}function Cje(o){o=o|0,s[o+8>>0]=1}function wje(){return 1936}function Bje(){return vje()|0}function vje(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,m=o+4|0,n[m>>2]=Kt(1)|0,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],Sje(A,m,d),n[u>>2]=A,I=l,o|0}function Sje(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1916,n[u+12>>2]=l,n[o+4>>2]=u}function Dje(o){o=o|0,$y(o),It(o)}function bje(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function Pje(o){o=o|0,It(o)}function xje(){var o=0;return s[8088]|0||(Oje(11076),gr(25,11076,U|0)|0,o=8088,n[o>>2]=1,n[o+4>>2]=0),11076}function kje(o,l){o=o|0,l=l|0,n[o>>2]=Qje()|0,n[o+4>>2]=Tje()|0,n[o+12>>2]=l,n[o+8>>2]=Rje()|0,n[o+32>>2]=10}function Qje(){return 11745}function Tje(){return 1940}function Rje(){return FP()|0}function Fje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(Nje(u),It(u)):l|0&&It(l)}function Nje(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function Oje(o){o=o|0,Lh(o)}function bu(o,l){o=o|0,l=l|0,n[o>>2]=l}function sU(o){return o=o|0,n[o>>2]|0}function Lje(o){return o=o|0,s[n[o>>2]>>0]|0}function Mje(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,n[A>>2]=n[o>>2],Uje(l,A)|0,I=u}function Uje(o,l){o=o|0,l=l|0;var u=0;return u=_je(n[o>>2]|0,l)|0,l=o+4|0,n[(n[l>>2]|0)+8>>2]=u,n[(n[l>>2]|0)+8>>2]|0}function _je(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,Fl(A),o=Os(o)|0,l=Hje(o,n[l>>2]|0)|0,Nl(A),I=u,l|0}function Fl(o){o=o|0,n[o>>2]=n[2701],n[o+4>>2]=n[2703]}function Hje(o,l){o=o|0,l=l|0;var u=0;return u=da(jje()|0)|0,dn(0,u|0,o|0,ZM(l)|0)|0}function Nl(o){o=o|0,iZ(n[o>>2]|0,n[o+4>>2]|0)}function jje(){var o=0;return s[8096]|0||(Gje(11120),o=8096,n[o>>2]=1,n[o+4>>2]=0),11120}function Gje(o){o=o|0,Qo(o,qje()|0,1)}function qje(){return 1948}function Wje(){Yje()}function Yje(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0;if(Le=I,I=I+16|0,L=Le+4|0,q=Le,oa(65536,10804,n[2702]|0,10812),u=UX()|0,l=n[u>>2]|0,o=n[l>>2]|0,o|0)for(A=n[u+8>>2]|0,u=n[u+4>>2]|0;pf(o|0,c[u>>0]|0|0,s[A>>0]|0),l=l+4|0,o=n[l>>2]|0,o;)A=A+1|0,u=u+1|0;if(o=_X()|0,l=n[o>>2]|0,l|0)do NA(l|0,n[o+4>>2]|0),o=o+8|0,l=n[o>>2]|0;while(l|0);NA(Vje()|0,5167),M=Jy()|0,o=n[M>>2]|0;e:do if(o|0){do Jje(n[o+4>>2]|0),o=n[o>>2]|0;while(o|0);if(o=n[M>>2]|0,o|0){T=M;do{for(;d=o,o=n[o>>2]|0,d=n[d+4>>2]|0,!!(Kje(d)|0);)if(n[q>>2]=T,n[L>>2]=n[q>>2],zje(M,L)|0,!o)break e;if(Xje(d),T=n[T>>2]|0,l=dZ(d)|0,m=Oi()|0,B=I,I=I+((1*(l<<2)|0)+15&-16)|0,k=I,I=I+((1*(l<<2)|0)+15&-16)|0,l=n[(ZX(d)|0)>>2]|0,l|0)for(u=B,A=k;n[u>>2]=n[(Ky(n[l+4>>2]|0)|0)>>2],n[A>>2]=n[l+8>>2],l=n[l>>2]|0,l;)u=u+4|0,A=A+4|0;Qe=Ky(d)|0,l=Zje(d)|0,u=dZ(d)|0,A=$je(d)|0,oc(Qe|0,l|0,B|0,k|0,u|0,A|0,YM(d)|0),FA(m|0)}while(o|0)}}while(!1);if(o=n[(VM()|0)>>2]|0,o|0)do Qe=o+4|0,M=JM(Qe)|0,d=k2(M)|0,m=P2(M)|0,B=(x2(M)|0)+1|0,k=UP(M)|0,T=mZ(Qe)|0,M=_r(M)|0,L=OP(Qe)|0,q=oU(Qe)|0,uu(0,d|0,m|0,B|0,k|0,T|0,M|0,L|0,q|0,aU(Qe)|0),o=n[o>>2]|0;while(o|0);o=n[(Jy()|0)>>2]|0;e:do if(o|0){t:for(;;){if(l=n[o+4>>2]|0,l|0&&(ae=n[(Ky(l)|0)>>2]|0,Ye=n[($X(l)|0)>>2]|0,Ye|0)){u=Ye;do{l=u+4|0,A=JM(l)|0;r:do if(A|0)switch(_r(A)|0){case 0:break t;case 4:case 3:case 2:{k=k2(A)|0,T=P2(A)|0,M=(x2(A)|0)+1|0,L=UP(A)|0,q=_r(A)|0,Qe=OP(l)|0,uu(ae|0,k|0,T|0,M|0,L|0,0,q|0,Qe|0,oU(l)|0,aU(l)|0);break r}case 1:{B=k2(A)|0,k=P2(A)|0,T=(x2(A)|0)+1|0,M=UP(A)|0,L=mZ(l)|0,q=_r(A)|0,Qe=OP(l)|0,uu(ae|0,B|0,k|0,T|0,M|0,L|0,q|0,Qe|0,oU(l)|0,aU(l)|0);break r}case 5:{M=k2(A)|0,L=P2(A)|0,q=(x2(A)|0)+1|0,Qe=UP(A)|0,uu(ae|0,M|0,L|0,q|0,Qe|0,e6e(A)|0,_r(A)|0,0,0,0);break r}default:break r}while(!1);u=n[u>>2]|0}while(u|0)}if(o=n[o>>2]|0,!o)break e}Nt()}while(!1);ve(),I=Le}function Vje(){return 11703}function Jje(o){o=o|0,s[o+40>>0]=0}function Kje(o){return o=o|0,(s[o+40>>0]|0)!=0|0}function zje(o,l){return o=o|0,l=l|0,l=t6e(l)|0,o=n[l>>2]|0,n[l>>2]=n[o>>2],It(o),n[l>>2]|0}function Xje(o){o=o|0,s[o+40>>0]=1}function dZ(o){return o=o|0,n[o+20>>2]|0}function Zje(o){return o=o|0,n[o+8>>2]|0}function $je(o){return o=o|0,n[o+32>>2]|0}function UP(o){return o=o|0,n[o+4>>2]|0}function mZ(o){return o=o|0,n[o+4>>2]|0}function oU(o){return o=o|0,n[o+8>>2]|0}function aU(o){return o=o|0,n[o+16>>2]|0}function e6e(o){return o=o|0,n[o+20>>2]|0}function t6e(o){return o=o|0,n[o>>2]|0}function _P(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0;Lt=I,I=I+16|0,ae=Lt;do if(o>>>0<245){if(M=o>>>0<11?16:o+11&-8,o=M>>>3,q=n[2783]|0,u=q>>>o,u&3|0)return l=(u&1^1)+o|0,o=11172+(l<<1<<2)|0,u=o+8|0,A=n[u>>2]|0,d=A+8|0,m=n[d>>2]|0,(o|0)==(m|0)?n[2783]=q&~(1<<l):(n[m+12>>2]=o,n[u>>2]=m),We=l<<3,n[A+4>>2]=We|3,We=A+We+4|0,n[We>>2]=n[We>>2]|1,We=d,I=Lt,We|0;if(L=n[2785]|0,M>>>0>L>>>0){if(u|0)return l=2<<o,l=u<<o&(l|0-l),l=(l&0-l)+-1|0,B=l>>>12&16,l=l>>>B,u=l>>>5&8,l=l>>>u,d=l>>>2&4,l=l>>>d,o=l>>>1&2,l=l>>>o,A=l>>>1&1,A=(u|B|d|o|A)+(l>>>A)|0,l=11172+(A<<1<<2)|0,o=l+8|0,d=n[o>>2]|0,B=d+8|0,u=n[B>>2]|0,(l|0)==(u|0)?(o=q&~(1<<A),n[2783]=o):(n[u+12>>2]=l,n[o>>2]=u,o=q),m=(A<<3)-M|0,n[d+4>>2]=M|3,A=d+M|0,n[A+4>>2]=m|1,n[A+m>>2]=m,L|0&&(d=n[2788]|0,l=L>>>3,u=11172+(l<<1<<2)|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=u),n[2785]=m,n[2788]=A,We=B,I=Lt,We|0;if(k=n[2784]|0,k){if(u=(k&0-k)+-1|0,B=u>>>12&16,u=u>>>B,m=u>>>5&8,u=u>>>m,T=u>>>2&4,u=u>>>T,A=u>>>1&2,u=u>>>A,o=u>>>1&1,o=n[11436+((m|B|T|A|o)+(u>>>o)<<2)>>2]|0,u=(n[o+4>>2]&-8)-M|0,A=n[o+16+(((n[o+16>>2]|0)==0&1)<<2)>>2]|0,!A)T=o,m=u;else{do B=(n[A+4>>2]&-8)-M|0,T=B>>>0<u>>>0,u=T?B:u,o=T?A:o,A=n[A+16+(((n[A+16>>2]|0)==0&1)<<2)>>2]|0;while(A|0);T=o,m=u}if(B=T+M|0,T>>>0<B>>>0){d=n[T+24>>2]|0,l=n[T+12>>2]|0;do if((l|0)==(T|0)){if(o=T+20|0,l=n[o>>2]|0,!l&&(o=T+16|0,l=n[o>>2]|0,!l)){u=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0,u=l}else u=n[T+8>>2]|0,n[u+12>>2]=l,n[l+8>>2]=u,u=l;while(!1);do if(d|0){if(l=n[T+28>>2]|0,o=11436+(l<<2)|0,(T|0)==(n[o>>2]|0)){if(n[o>>2]=u,!u){n[2784]=k&~(1<<l);break}}else if(n[d+16+(((n[d+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=d,l=n[T+16>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),l=n[T+20>>2]|0,l|0&&(n[u+20>>2]=l,n[l+24>>2]=u)}while(!1);return m>>>0<16?(We=m+M|0,n[T+4>>2]=We|3,We=T+We+4|0,n[We>>2]=n[We>>2]|1):(n[T+4>>2]=M|3,n[B+4>>2]=m|1,n[B+m>>2]=m,L|0&&(A=n[2788]|0,l=L>>>3,u=11172+(l<<1<<2)|0,l=1<<l,q&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=q|l,l=u,o=u+8|0),n[o>>2]=A,n[l+12>>2]=A,n[A+8>>2]=l,n[A+12>>2]=u),n[2785]=m,n[2788]=B),We=T+8|0,I=Lt,We|0}else q=M}else q=M}else q=M}else if(o>>>0<=4294967231)if(o=o+11|0,M=o&-8,T=n[2784]|0,T){A=0-M|0,o=o>>>8,o?M>>>0>16777215?k=31:(q=(o+1048320|0)>>>16&8,He=o<<q,L=(He+520192|0)>>>16&4,He=He<<L,k=(He+245760|0)>>>16&2,k=14-(L|q|k)+(He<<k>>>15)|0,k=M>>>(k+7|0)&1|k<<1):k=0,u=n[11436+(k<<2)>>2]|0;e:do if(!u)u=0,o=0,He=57;else for(o=0,B=M<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[u+4>>2]&-8)-M|0,d>>>0<A>>>0)if(d)o=u,A=d;else{o=u,A=0,d=u,He=61;break e}if(d=n[u+20>>2]|0,u=n[u+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(u|0)?m:d,d=(u|0)==0,d){u=m,He=57;break}else B=B<<((d^1)&1)}while(!1);if((He|0)==57){if((u|0)==0&(o|0)==0){if(o=2<<k,o=T&(o|0-o),!o){q=M;break}q=(o&0-o)+-1|0,B=q>>>12&16,q=q>>>B,m=q>>>5&8,q=q>>>m,k=q>>>2&4,q=q>>>k,L=q>>>1&2,q=q>>>L,u=q>>>1&1,o=0,u=n[11436+((m|B|k|L|u)+(q>>>u)<<2)>>2]|0}u?(d=u,He=61):(k=o,B=A)}if((He|0)==61)for(;;)if(He=0,u=(n[d+4>>2]&-8)-M|0,q=u>>>0<A>>>0,u=q?u:A,o=q?d:o,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)A=u,He=61;else{k=o,B=u;break}if(k|0&&B>>>0<((n[2785]|0)-M|0)>>>0){if(m=k+M|0,k>>>0>=m>>>0)return We=0,I=Lt,We|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(o=k+20|0,l=n[o>>2]|0,!l&&(o=k+16|0,l=n[o>>2]|0,!l)){l=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0}else We=n[k+8>>2]|0,n[We+12>>2]=l,n[l+8>>2]=We;while(!1);do if(d){if(o=n[k+28>>2]|0,u=11436+(o<<2)|0,(k|0)==(n[u>>2]|0)){if(n[u>>2]=l,!l){A=T&~(1<<o),n[2784]=A;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){A=T;break}n[l+24>>2]=d,o=n[k+16>>2]|0,o|0&&(n[l+16>>2]=o,n[o+24>>2]=l),o=n[k+20>>2]|0,o&&(n[l+20>>2]=o,n[o+24>>2]=l),A=T}else A=T;while(!1);do if(B>>>0>=16){if(n[k+4>>2]=M|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=u;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,l=(We+245760|0)>>>16&2,l=14-(ct|He|l)+(We<<l>>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,u=11436+(l<<2)|0,n[m+28>>2]=l,o=m+16|0,n[o+4>>2]=0,n[o>>2]=0,o=1<<l,!(A&o)){n[2784]=A|o,n[u>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}for(o=B<<((l|0)==31?0:25-(l>>>1)|0),u=n[u>>2]|0;;){if((n[u+4>>2]&-8|0)==(B|0)){He=97;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=96;break}}if((He|0)==96){n[A>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=m,n[He>>2]=m,n[m+8>>2]=We,n[m+12>>2]=u,n[m+24>>2]=0;break}}else We=B+M|0,n[k+4>>2]=We|3,We=k+We+4|0,n[We>>2]=n[We>>2]|1;while(!1);return We=k+8|0,I=Lt,We|0}else q=M}else q=M;else q=-1;while(!1);if(u=n[2785]|0,u>>>0>=q>>>0)return l=u-q|0,o=n[2788]|0,l>>>0>15?(We=o+q|0,n[2788]=We,n[2785]=l,n[We+4>>2]=l|1,n[We+l>>2]=l,n[o+4>>2]=q|3):(n[2785]=0,n[2788]=0,n[o+4>>2]=u|3,We=o+u+4|0,n[We>>2]=n[We>>2]|1),We=o+8|0,I=Lt,We|0;if(B=n[2786]|0,B>>>0>q>>>0)return ct=B-q|0,n[2786]=ct,We=n[2789]|0,He=We+q|0,n[2789]=He,n[He+4>>2]=ct|1,n[We+4>>2]=q|3,We=We+8|0,I=Lt,We|0;if(n[2901]|0?o=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,o=ae&-16^1431655768,n[ae>>2]=o,n[2901]=o,o=4096),k=q+48|0,T=q+47|0,m=o+T|0,d=0-o|0,M=m&d,M>>>0<=q>>>0||(o=n[2893]|0,o|0&&(L=n[2891]|0,ae=L+M|0,ae>>>0<=L>>>0|ae>>>0>o>>>0)))return We=0,I=Lt,We|0;e:do if(n[2894]&4)l=0,He=133;else{u=n[2789]|0;t:do if(u){for(A=11580;o=n[A>>2]|0,!(o>>>0<=u>>>0&&(Qe=A+4|0,(o+(n[Qe>>2]|0)|0)>>>0>u>>>0));)if(o=n[A+8>>2]|0,o)A=o;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(o=qh(l|0)|0,(o|0)==((n[A>>2]|0)+(n[Qe>>2]|0)|0)){if((o|0)!=-1){B=l,m=o,He=135;break e}}else A=o,He=126;else l=0}else He=118;while(!1);do if((He|0)==118)if(u=qh(0)|0,(u|0)!=-1&&(l=u,Ye=n[2902]|0,Le=Ye+-1|0,l=(Le&l|0?(Le+l&0-Ye)-l|0:0)+M|0,Ye=n[2891]|0,Le=l+Ye|0,l>>>0>q>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Le>>>0<=Ye>>>0|Le>>>0>Qe>>>0){l=0;break}if(o=qh(l|0)|0,(o|0)==(u|0)){B=l,m=u,He=135;break e}else A=o,He=126}else l=0;while(!1);do if((He|0)==126){if(u=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(A|0)!=-1)))if((A|0)==-1){l=0;break}else{B=l,m=A,He=135;break e}if(o=n[2903]|0,o=T-l+o&0-o,o>>>0>=2147483647){B=l,m=A,He=135;break e}if((qh(o|0)|0)==-1){qh(u|0)|0,l=0;break}else{B=o+l|0,m=A,He=135;break e}}while(!1);n[2894]=n[2894]|4,He=133}while(!1);if((He|0)==133&&M>>>0<2147483647&&(ct=qh(M|0)|0,Qe=qh(0)|0,tt=Qe-ct|0,Ze=tt>>>0>(q+40|0)>>>0,!((ct|0)==-1|Ze^1|ct>>>0<Qe>>>0&((ct|0)!=-1&(Qe|0)!=-1)^1))&&(B=Ze?tt:l,m=ct,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),T=n[2789]|0;do if(T){for(l=11580;;){if(o=n[l>>2]|0,u=l+4|0,A=n[u>>2]|0,(m|0)==(o+A|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&!(n[l+12>>2]&8|0)&&T>>>0<m>>>0&T>>>0>=o>>>0){n[u>>2]=A+B,We=T+8|0,We=We&7|0?0-We&7:0,He=T+We|0,We=(n[2786]|0)+(B-We)|0,n[2789]=He,n[2786]=We,n[He+4>>2]=We|1,n[He+We+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),u=m+B|0,l=11580;;){if((n[l>>2]|0)==(u|0)){He=153;break}if(o=n[l+8>>2]|0,o)l=o;else break}if((He|0)==153&&!(n[l+12>>2]&8|0)){n[l>>2]=m,L=l+4|0,n[L>>2]=(n[L>>2]|0)+B,L=m+8|0,L=m+(L&7|0?0-L&7:0)|0,l=u+8|0,l=u+(l&7|0?0-l&7:0)|0,M=L+q|0,k=l-L-q|0,n[L+4>>2]=q|3;do if((l|0)!=(T|0)){if((l|0)==(n[2788]|0)){We=(n[2785]|0)+k|0,n[2785]=We,n[2788]=M,n[M+4>>2]=We|1,n[M+We>>2]=We;break}if(o=n[l+4>>2]|0,(o&3|0)==1){B=o&-8,A=o>>>3;e:do if(o>>>0<256)if(o=n[l+8>>2]|0,u=n[l+12>>2]|0,(u|0)==(o|0)){n[2783]=n[2783]&~(1<<A);break}else{n[o+12>>2]=u,n[u+8>>2]=o;break}else{m=n[l+24>>2]|0,o=n[l+12>>2]|0;do if((o|0)==(l|0)){if(A=l+16|0,u=A+4|0,o=n[u>>2]|0,!o)if(o=n[A>>2]|0,o)u=A;else{o=0;break}for(;;){if(A=o+20|0,d=n[A>>2]|0,d|0){o=d,u=A;continue}if(A=o+16|0,d=n[A>>2]|0,d)o=d,u=A;else break}n[u>>2]=0}else We=n[l+8>>2]|0,n[We+12>>2]=o,n[o+8>>2]=We;while(!1);if(!m)break;u=n[l+28>>2]|0,A=11436+(u<<2)|0;do if((l|0)!=(n[A>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=o,!o)break e}else{if(n[A>>2]=o,o|0)break;n[2784]=n[2784]&~(1<<u);break e}while(!1);if(n[o+24>>2]=m,u=l+16|0,A=n[u>>2]|0,A|0&&(n[o+16>>2]=A,n[A+24>>2]=o),u=n[u+4>>2]|0,!u)break;n[o+20>>2]=u,n[u+24>>2]=o}while(!1);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[M+4>>2]=d|1,n[M+d>>2]=d,l=d>>>3,d>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=M,n[l+12>>2]=M,n[M+8>>2]=l,n[M+12>>2]=u;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,l=(We+245760|0)>>>16&2,l=14-(ct|He|l)+(We<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(!1);if(A=11436+(l<<2)|0,n[M+28>>2]=l,o=M+16|0,n[o+4>>2]=0,n[o>>2]=0,o=n[2784]|0,u=1<<l,!(o&u)){n[2784]=o|u,n[A>>2]=M,n[M+24>>2]=A,n[M+12>>2]=M,n[M+8>>2]=M;break}for(o=d<<((l|0)==31?0:25-(l>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){He=194;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=193;break}}if((He|0)==193){n[A>>2]=M,n[M+24>>2]=u,n[M+12>>2]=M,n[M+8>>2]=M;break}else if((He|0)==194){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=M,n[He>>2]=M,n[M+8>>2]=We,n[M+12>>2]=u,n[M+24>>2]=0;break}}else We=(n[2786]|0)+k|0,n[2786]=We,n[2789]=M,n[M+4>>2]=We|1;while(!1);return We=L+8|0,I=Lt,We|0}for(l=11580;o=n[l>>2]|0,!(o>>>0<=T>>>0&&(We=o+(n[l+4>>2]|0)|0,We>>>0>T>>>0));)l=n[l+8>>2]|0;d=We+-47|0,o=d+8|0,o=d+(o&7|0?0-o&7:0)|0,d=T+16|0,o=o>>>0<d>>>0?T:o,l=o+8|0,u=m+8|0,u=u&7|0?0-u&7:0,He=m+u|0,u=B+-40-u|0,n[2789]=He,n[2786]=u,n[He+4>>2]=u|1,n[He+u+4>>2]=40,n[2790]=n[2905],u=o+4|0,n[u>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=o+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0<We>>>0);if((o|0)!=(T|0)){if(m=o-T|0,n[u>>2]=n[u>>2]&-2,n[T+4>>2]=m|1,n[o>>2]=m,l=m>>>3,m>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=T,n[l+12>>2]=T,n[T+8>>2]=l,n[T+12>>2]=u;break}if(l=m>>>8,l?m>>>0>16777215?u=31:(He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,u=(We+245760|0)>>>16&2,u=14-(ct|He|u)+(We<<u>>>15)|0,u=m>>>(u+7|0)&1|u<<1):u=0,A=11436+(u<<2)|0,n[T+28>>2]=u,n[T+20>>2]=0,n[d>>2]=0,l=n[2784]|0,o=1<<u,!(l&o)){n[2784]=l|o,n[A>>2]=T,n[T+24>>2]=A,n[T+12>>2]=T,n[T+8>>2]=T;break}for(o=m<<((u|0)==31?0:25-(u>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(m|0)){He=216;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=215;break}}if((He|0)==215){n[A>>2]=T,n[T+24>>2]=u,n[T+12>>2]=T,n[T+8>>2]=T;break}else if((He|0)==216){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=T,n[He>>2]=T,n[T+8>>2]=We,n[T+12>>2]=u,n[T+24>>2]=0;break}}}else{We=n[2787]|0,(We|0)==0|m>>>0<We>>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do We=11172+(l<<1<<2)|0,n[We+12>>2]=We,n[We+8>>2]=We,l=l+1|0;while((l|0)!=32);We=m+8|0,We=We&7|0?0-We&7:0,He=m+We|0,We=B+-40-We|0,n[2789]=He,n[2786]=We,n[He+4>>2]=We|1,n[He+We+4>>2]=40,n[2790]=n[2905]}while(!1);if(l=n[2786]|0,l>>>0>q>>>0)return ct=l-q|0,n[2786]=ct,We=n[2789]|0,He=We+q|0,n[2789]=He,n[He+4>>2]=ct|1,n[We+4>>2]=q|3,We=We+8|0,I=Lt,We|0}return n[(Xy()|0)>>2]=12,We=0,I=Lt,We|0}function HP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(o){u=o+-8|0,d=n[2787]|0,o=n[o+-4>>2]|0,l=o&-8,T=u+l|0;do if(o&1)k=u,B=u;else{if(A=n[u>>2]|0,!(o&3)||(B=u+(0-A)|0,m=A+l|0,B>>>0<d>>>0))return;if((B|0)==(n[2788]|0)){if(o=T+4|0,l=n[o>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[o>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(u=A>>>3,A>>>0<256)if(o=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(o|0)){n[2783]=n[2783]&~(1<<u),k=B,l=m;break}else{n[o+12>>2]=l,n[l+8>>2]=o,k=B,l=m;break}d=n[B+24>>2]|0,o=n[B+12>>2]|0;do if((o|0)==(B|0)){if(u=B+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{o=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=o,n[o+8>>2]=k;while(!1);if(d){if(l=n[B+28>>2]|0,u=11436+(l<<2)|0,(B|0)==(n[u>>2]|0)){if(n[u>>2]=o,!o){n[2784]=n[2784]&~(1<<l),k=B,l=m;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(B|0)&1)<<2)>>2]=o,!o){k=B,l=m;break}n[o+24>>2]=d,l=B+16|0,u=n[l>>2]|0,u|0&&(n[o+16>>2]=u,n[u+24>>2]=o),l=n[l+4>>2]|0,l?(n[o+20>>2]=l,n[l+24>>2]=o,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(!1);if(!(B>>>0>=T>>>0)&&(o=T+4|0,A=n[o>>2]|0,!!(A&1))){if(A&2)n[o>>2]=A&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(o=n[2788]|0,(T|0)==(n[2789]|0)){if(T=(n[2786]|0)+l|0,n[2786]=T,n[2789]=k,n[k+4>>2]=T|1,(k|0)!=(o|0))return;n[2788]=0,n[2785]=0;return}if((T|0)==(o|0)){T=(n[2785]|0)+l|0,n[2785]=T,n[2788]=B,n[k+4>>2]=T|1,n[B+T>>2]=T;return}d=(A&-8)+l|0,u=A>>>3;do if(A>>>0<256)if(l=n[T+8>>2]|0,o=n[T+12>>2]|0,(o|0)==(l|0)){n[2783]=n[2783]&~(1<<u);break}else{n[l+12>>2]=o,n[o+8>>2]=l;break}else{m=n[T+24>>2]|0,o=n[T+12>>2]|0;do if((o|0)==(T|0)){if(u=T+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{u=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0,u=o}else u=n[T+8>>2]|0,n[u+12>>2]=o,n[o+8>>2]=u,u=o;while(!1);if(m|0){if(o=n[T+28>>2]|0,l=11436+(o<<2)|0,(T|0)==(n[l>>2]|0)){if(n[l>>2]=u,!u){n[2784]=n[2784]&~(1<<o);break}}else if(n[m+16+(((n[m+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=m,o=T+16|0,l=n[o>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),o=n[o+4>>2]|0,o|0&&(n[u+20>>2]=o,n[o+24>>2]=u)}}while(!1);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(o=d>>>3,d>>>0<256){u=11172+(o<<1<<2)|0,l=n[2783]|0,o=1<<o,l&o?(l=u+8|0,o=n[l>>2]|0):(n[2783]=l|o,o=u,l=u+8|0),n[l>>2]=k,n[o+12>>2]=k,n[k+8>>2]=o,n[k+12>>2]=u;return}o=d>>>8,o?d>>>0>16777215?o=31:(B=(o+1048320|0)>>>16&8,T=o<<B,m=(T+520192|0)>>>16&4,T=T<<m,o=(T+245760|0)>>>16&2,o=14-(m|B|o)+(T<<o>>>15)|0,o=d>>>(o+7|0)&1|o<<1):o=0,A=11436+(o<<2)|0,n[k+28>>2]=o,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,u=1<<o;do if(l&u){for(l=d<<((o|0)==31?0:25-(o>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){o=73;break}if(A=u+16+(l>>>31<<2)|0,o=n[A>>2]|0,o)l=l<<1,u=o;else{o=72;break}}if((o|0)==72){n[A>>2]=k,n[k+24>>2]=u,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((o|0)==73){B=u+8|0,T=n[B>>2]|0,n[T+12>>2]=k,n[B>>2]=k,n[k+8>>2]=T,n[k+12>>2]=u,n[k+24>>2]=0;break}}else n[2784]=l|u,n[A>>2]=k,n[k+24>>2]=A,n[k+12>>2]=k,n[k+8>>2]=k;while(!1);if(T=(n[2791]|0)+-1|0,n[2791]=T,!T)o=11588;else return;for(;o=n[o>>2]|0,o;)o=o+8|0;n[2791]=-1}}}function r6e(){return 11628}function n6e(o){o=o|0;var l=0,u=0;return l=I,I=I+16|0,u=l,n[u>>2]=o6e(n[o+60>>2]|0)|0,o=jP(Au(6,u|0)|0)|0,I=l,o|0}function yZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0;q=I,I=I+48|0,M=q+16|0,m=q,d=q+32|0,k=o+28|0,A=n[k>>2]|0,n[d>>2]=A,T=o+20|0,A=(n[T>>2]|0)-A|0,n[d+4>>2]=A,n[d+8>>2]=l,n[d+12>>2]=u,A=A+u|0,B=o+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=jP(La(146,m|0)|0)|0;e:do if((A|0)!=(m|0)){for(l=2;!((m|0)<0);)if(A=A-m|0,Ye=n[d+4>>2]|0,ae=m>>>0>Ye>>>0,d=ae?d+8|0:d,l=(ae<<31>>31)+l|0,Ye=m-(ae?Ye:0)|0,n[d>>2]=(n[d>>2]|0)+Ye,ae=d+4|0,n[ae>>2]=(n[ae>>2]|0)-Ye,n[M>>2]=n[B>>2],n[M+4>>2]=d,n[M+8>>2]=l,m=jP(La(146,M|0)|0)|0,(A|0)==(m|0)){L=3;break e}n[o+16>>2]=0,n[k>>2]=0,n[T>>2]=0,n[o>>2]=n[o>>2]|32,(l|0)==2?u=0:u=u-(n[d+4>>2]|0)|0}else L=3;while(!1);return(L|0)==3&&(Ye=n[o+44>>2]|0,n[o+16>>2]=Ye+(n[o+48>>2]|0),n[k>>2]=Ye,n[T>>2]=Ye),I=q,u|0}function i6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return d=I,I=I+32|0,m=d,A=d+20|0,n[m>>2]=n[o+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=A,n[m+16>>2]=u,(jP(Oa(140,m|0)|0)|0)<0?(n[A>>2]=-1,o=-1):o=n[A>>2]|0,I=d,o|0}function jP(o){return o=o|0,o>>>0>4294963200&&(n[(Xy()|0)>>2]=0-o,o=-1),o|0}function Xy(){return(s6e()|0)+64|0}function s6e(){return lU()|0}function lU(){return 2084}function o6e(o){return o=o|0,o|0}function a6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return d=I,I=I+32|0,A=d,n[o+36>>2]=1,!(n[o>>2]&64|0)&&(n[A>>2]=n[o+60>>2],n[A+4>>2]=21523,n[A+8>>2]=d+16,no(54,A|0)|0)&&(s[o+75>>0]=-1),A=yZ(o,l,u)|0,I=d,A|0}function EZ(o,l){o=o|0,l=l|0;var u=0,A=0;if(u=s[o>>0]|0,A=s[l>>0]|0,!(u<<24>>24)||u<<24>>24!=A<<24>>24)o=A;else{do o=o+1|0,l=l+1|0,u=s[o>>0]|0,A=s[l>>0]|0;while(!(!(u<<24>>24)||u<<24>>24!=A<<24>>24));o=A}return(u&255)-(o&255)|0}function l6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;e:do if(!u)o=0;else{for(;A=s[o>>0]|0,d=s[l>>0]|0,A<<24>>24==d<<24>>24;)if(u=u+-1|0,u)o=o+1|0,l=l+1|0;else{o=0;break e}o=(A&255)-(d&255)|0}while(!1);return o|0}function IZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0;Qe=I,I=I+224|0,L=Qe+120|0,q=Qe+80|0,Ye=Qe,Le=Qe+136|0,A=q,d=A+40|0;do n[A>>2]=0,A=A+4|0;while((A|0)<(d|0));return n[L>>2]=n[u>>2],(cU(0,l,L,Ye,q)|0)<0?u=-1:((n[o+76>>2]|0)>-1?ae=c6e(o)|0:ae=0,u=n[o>>2]|0,M=u&32,(s[o+74>>0]|0)<1&&(n[o>>2]=u&-33),A=o+48|0,n[A>>2]|0?u=cU(o,l,L,Ye,q)|0:(d=o+44|0,m=n[d>>2]|0,n[d>>2]=Le,B=o+28|0,n[B>>2]=Le,k=o+20|0,n[k>>2]=Le,n[A>>2]=80,T=o+16|0,n[T>>2]=Le+80,u=cU(o,l,L,Ye,q)|0,m&&(YP[n[o+36>>2]&7](o,0,0)|0,u=n[k>>2]|0?u:-1,n[d>>2]=m,n[A>>2]=0,n[T>>2]=0,n[B>>2]=0,n[k>>2]=0)),A=n[o>>2]|0,n[o>>2]=A|M,ae|0&&u6e(o),u=A&32|0?-1:u),I=Qe,u|0}function cU(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0;cr=I,I=I+64|0,fr=cr+16|0,$t=cr,Lt=cr+24|0,Tr=cr+8|0,Hr=cr+20|0,n[fr>>2]=l,ct=(o|0)!=0,He=Lt+40|0,We=He,Lt=Lt+39|0,Gr=Tr+4|0,B=0,m=0,L=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Xy()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(!1);if(B=s[l>>0]|0,B<<24>>24)k=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Ze=9;break t}case 0:{B=k;break t}default:}tt=k+1|0,n[fr>>2]=tt,B=s[tt>>0]|0,k=tt}t:do if((Ze|0)==9)for(;;){if(Ze=0,(s[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[fr>>2]=k,(s[k>>0]|0)==37)Ze=9;else break}while(!1);if(B=B-l|0,ct&&vs(o,l,B),B|0){l=k;continue}T=k+1|0,B=(s[T>>0]|0)+-48|0,B>>>0<10?(tt=(s[k+2>>0]|0)==36,Qe=tt?B:-1,L=tt?1:L,T=tt?k+3|0:T):Qe=-1,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(M=0,q=B;;){if(B=1<<k,!(B&75913)){B=q;break t}if(M=B|M,T=T+1|0,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;q=B}else M=0;while(!1);if(B<<24>>24==42){if(k=T+1|0,B=(s[k>>0]|0)+-48|0,B>>>0<10&&(s[T+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[A+((s[k>>0]|0)+-48<<3)>>2]|0,L=1,T=T+3|0;else{if(L|0){m=-1;break}ct?(L=(n[u>>2]|0)+3&-4,B=n[L>>2]|0,n[u>>2]=L+4,L=0,T=k):(B=0,L=0,T=k)}n[fr>>2]=T,tt=(B|0)<0,B=tt?0-B|0:B,M=tt?M|8192:M}else{if(B=CZ(fr)|0,(B|0)<0){m=-1;break}T=n[fr>>2]|0}do if((s[T>>0]|0)==46){if((s[T+1>>0]|0)!=42){n[fr>>2]=T+1,k=CZ(fr)|0,T=n[fr>>2]|0;break}if(q=T+2|0,k=(s[q>>0]|0)+-48|0,k>>>0<10&&(s[T+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[A+((s[q>>0]|0)+-48<<3)>>2]|0,T=T+4|0,n[fr>>2]=T;break}if(L|0){m=-1;break e}ct?(tt=(n[u>>2]|0)+3&-4,k=n[tt>>2]|0,n[u>>2]=tt+4):k=0,n[fr>>2]=q,T=q}else k=-1;while(!1);for(Le=0;;){if(((s[T>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(tt=T+1|0,n[fr>>2]=tt,q=s[(s[T>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,ae=q&255,(ae+-1|0)>>>0<8)Le=ae,T=tt;else break}if(!(q<<24>>24)){m=-1;break}Ye=(Qe|0)>-1;do if(q<<24>>24==19)if(Ye){m=-1;break e}else Ze=49;else{if(Ye){n[d+(Qe<<2)>>2]=ae,Ye=A+(Qe<<3)|0,Qe=n[Ye+4>>2]|0,Ze=$t,n[Ze>>2]=n[Ye>>2],n[Ze+4>>2]=Qe,Ze=49;break}if(!ct){m=0;break e}wZ($t,ae,u)}while(!1);if((Ze|0)==49&&(Ze=0,!ct)){B=0,l=tt;continue}T=s[T>>0]|0,T=(Le|0)!=0&(T&15|0)==3?T&-33:T,Ye=M&-65537,Qe=M&8192|0?Ye:M;t:do switch(T|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 1:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 2:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}case 3:{a[n[$t>>2]>>1]=m,B=0,l=tt;continue e}case 4:{s[n[$t>>2]>>0]=m,B=0,l=tt;continue e}case 6:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 7:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}default:{B=0,l=tt;continue e}}case 112:{T=120,k=k>>>0>8?k:8,l=Qe|8,Ze=61;break}case 88:case 120:{l=Qe,Ze=61;break}case 111:{T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,ae=A6e(l,T,He)|0,Ye=We-ae|0,M=0,q=5642,k=(Qe&8|0)==0|(k|0)>(Ye|0)?k:Ye+1|0,Ye=Qe,Ze=67;break}case 105:case 100:if(T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,(T|0)<0){l=GP(0,0,l|0,T|0)|0,T=ye,M=$t,n[M>>2]=l,n[M+4>>2]=T,M=1,q=5642,Ze=66;break t}else{M=(Qe&2049|0)!=0&1,q=Qe&2048|0?5643:Qe&1|0?5644:5642,Ze=66;break t}case 117:{T=$t,M=0,q=5642,l=n[T>>2]|0,T=n[T+4>>2]|0,Ze=66;break}case 99:{s[Lt>>0]=n[$t>>2],l=Lt,M=0,q=5642,ae=He,T=1,k=Ye;break}case 109:{T=p6e(n[(Xy()|0)>>2]|0)|0,Ze=71;break}case 115:{T=n[$t>>2]|0,T=T|0?T:5652,Ze=71;break}case 67:{n[Tr>>2]=n[$t>>2],n[Gr>>2]=0,n[$t>>2]=Tr,ae=-1,T=Tr,Ze=75;break}case 83:{l=n[$t>>2]|0,k?(ae=k,T=l,Ze=75):(Ls(o,32,B,0,Qe),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=g6e(o,+E[$t>>3],B,k,Qe,T)|0,l=tt;continue e}default:M=0,q=5642,ae=He,T=k,k=Qe}while(!1);t:do if((Ze|0)==61)Qe=$t,Le=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,ae=f6e(Le,Qe,He,T&32)|0,q=(l&8|0)==0|(Le|0)==0&(Qe|0)==0,M=q?0:2,q=q?5642:5642+(T>>4)|0,Ye=l,l=Le,T=Qe,Ze=67;else if((Ze|0)==66)ae=Zy(l,T,He)|0,Ye=Qe,Ze=67;else if((Ze|0)==71)Ze=0,Qe=h6e(T,0,k)|0,Le=(Qe|0)==0,l=T,M=0,q=5642,ae=Le?T+k|0:Qe,T=Le?k:Qe-T|0,k=Ye;else if((Ze|0)==75){for(Ze=0,q=T,l=0,k=0;M=n[q>>2]|0,!(!M||(k=BZ(Hr,M)|0,(k|0)<0|k>>>0>(ae-l|0)>>>0));)if(l=k+l|0,ae>>>0>l>>>0)q=q+4|0;else break;if((k|0)<0){m=-1;break e}if(Ls(o,32,B,l,Qe),!l)l=0,Ze=84;else for(M=0;;){if(k=n[T>>2]|0,!k){Ze=84;break t}if(k=BZ(Hr,k)|0,M=k+M|0,(M|0)>(l|0)){Ze=84;break t}if(vs(o,Hr,k),M>>>0>=l>>>0){Ze=84;break}else T=T+4|0}}while(!1);if((Ze|0)==67)Ze=0,T=(l|0)!=0|(T|0)!=0,Qe=(k|0)!=0|T,T=((T^1)&1)+(We-ae)|0,l=Qe?ae:He,ae=He,T=Qe?(k|0)>(T|0)?k:T:k,k=(k|0)>-1?Ye&-65537:Ye;else if((Ze|0)==84){Ze=0,Ls(o,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=tt;continue}Le=ae-l|0,Ye=(T|0)<(Le|0)?Le:T,Qe=Ye+M|0,B=(B|0)<(Qe|0)?Qe:B,Ls(o,32,B,Qe,k),vs(o,q,M),Ls(o,48,B,Qe,k^65536),Ls(o,48,Ye,Le,0),vs(o,l,Le),Ls(o,32,B,Qe,k^8192),l=tt}e:do if((Ze|0)==87&&!o)if(!L)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(wZ(A+(m<<3)|0,l,u),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(!1);return I=cr,m|0}function c6e(o){return o=o|0,0}function u6e(o){o=o|0}function vs(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]&32||v6e(l,u,o)|0}function CZ(o){o=o|0;var l=0,u=0,A=0;if(u=n[o>>2]|0,A=(s[u>>0]|0)+-48|0,A>>>0<10){l=0;do l=A+(l*10|0)|0,u=u+1|0,n[o>>2]=u,A=(s[u>>0]|0)+-48|0;while(A>>>0<10)}else l=0;return l|0}function wZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,n[o>>2]=l;break e}case 10:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=0;break e}case 12:{A=(n[u>>2]|0)+7&-8,l=A,d=n[l>>2]|0,l=n[l+4>>2]|0,n[u>>2]=A+8,A=o,n[A>>2]=d,n[A+4>>2]=l;break e}case 13:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&65535)<<16>>16,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 14:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&65535,n[d+4>>2]=0;break e}case 15:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&255)<<24>>24,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 16:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&255,n[d+4>>2]=0;break e}case 17:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}case 18:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}default:break e}while(!1);while(!1)}function f6e(o,l,u,A){if(o=o|0,l=l|0,u=u|0,A=A|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=c[5694+(o&15)>>0]|0|A,o=qP(o|0,l|0,4)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function A6e(o,l,u){if(o=o|0,l=l|0,u=u|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=o&7|48,o=qP(o|0,l|0,3)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function Zy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if(l>>>0>0|(l|0)==0&o>>>0>4294967295){for(;A=pU(o|0,l|0,10,0)|0,u=u+-1|0,s[u>>0]=A&255|48,A=o,o=AU(o|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&A>>>0>4294967295;)l=ye;l=o}else l=o;if(l)for(;u=u+-1|0,s[u>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return u|0}function p6e(o){return o=o|0,I6e(o,n[(E6e()|0)+188>>2]|0)|0}function h6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;m=l&255,A=(u|0)!=0;e:do if(A&(o&3|0)!=0)for(d=l&255;;){if((s[o>>0]|0)==d<<24>>24){B=6;break e}if(o=o+1|0,u=u+-1|0,A=(u|0)!=0,!(A&(o&3|0)!=0)){B=5;break}}else B=5;while(!1);(B|0)==5&&(A?B=6:u=0);e:do if((B|0)==6&&(d=l&255,(s[o>>0]|0)!=d<<24>>24)){A=Ue(m,16843009)|0;t:do if(u>>>0>3){for(;m=n[o>>2]^A,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(o=o+4|0,u=u+-4|0,u>>>0<=3){B=11;break t}}else B=11;while(!1);if((B|0)==11&&!u){u=0;break}for(;;){if((s[o>>0]|0)==d<<24>>24)break e;if(o=o+1|0,u=u+-1|0,!u){u=0;break}}}while(!1);return(u|0?o:0)|0}function Ls(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0;if(B=I,I=I+256|0,m=B,(u|0)>(A|0)&(d&73728|0)==0){if(d=u-A|0,eE(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=u-A|0;do vs(o,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}vs(o,m,d)}I=B}function BZ(o,l){return o=o|0,l=l|0,o?o=m6e(o,l,0)|0:o=0,o|0}function g6e(o,l,u,A,d,m){o=o|0,l=+l,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0;Hn=I,I=I+560|0,T=Hn+8|0,tt=Hn,cr=Hn+524|0,Hr=cr,M=Hn+512|0,n[tt>>2]=0,Tr=M+12|0,vZ(l)|0,(ye|0)<0?(l=-l,fr=1,Gr=5659):(fr=(d&2049|0)!=0&1,Gr=d&2048|0?5662:d&1|0?5665:5660),vZ(l)|0,$t=ye&2146435072;do if($t>>>0<2146435072|($t|0)==2146435072&!1){if(Ye=+d6e(l,tt)*2,B=Ye!=0,B&&(n[tt>>2]=(n[tt>>2]|0)+-1),ct=m|32,(ct|0)==97){Le=m&32,ae=Le|0?Gr+9|0:Gr,q=fr|2,B=12-A|0;do if(A>>>0>11|(B|0)==0)l=Ye;else{l=8;do B=B+-1|0,l=l*16;while(B|0);if((s[ae>>0]|0)==45){l=-(l+(-Ye-l));break}else{l=Ye+l-l;break}}while(!1);k=n[tt>>2]|0,B=(k|0)<0?0-k|0:k,B=Zy(B,((B|0)<0)<<31>>31,Tr)|0,(B|0)==(Tr|0)&&(B=M+11|0,s[B>>0]=48),s[B+-1>>0]=(k>>31&2)+43,L=B+-2|0,s[L>>0]=m+15,M=(A|0)<1,T=(d&8|0)==0,B=cr;do $t=~~l,k=B+1|0,s[B>>0]=c[5694+$t>>0]|Le,l=(l-+($t|0))*16,(k-Hr|0)==1&&!(T&(M&l==0))?(s[k>>0]=46,B=B+2|0):B=k;while(l!=0);$t=B-Hr|0,Hr=Tr-L|0,Tr=(A|0)!=0&($t+-2|0)<(A|0)?A+2|0:$t,B=Hr+q+Tr|0,Ls(o,32,u,B,d),vs(o,ae,q),Ls(o,48,u,B,d^65536),vs(o,cr,$t),Ls(o,48,Tr-$t|0,0,0),vs(o,L,Hr),Ls(o,32,u,B,d^8192);break}k=(A|0)<0?6:A,B?(B=(n[tt>>2]|0)+-28|0,n[tt>>2]=B,l=Ye*268435456):(l=Ye,B=n[tt>>2]|0),$t=(B|0)<0?T:T+288|0,T=$t;do We=~~l>>>0,n[T>>2]=We,T=T+4|0,l=(l-+(We>>>0))*1e9;while(l!=0);if((B|0)>0)for(M=$t,q=T;;){if(L=(B|0)<29?B:29,B=q+-4|0,B>>>0>=M>>>0){T=0;do He=kZ(n[B>>2]|0,0,L|0)|0,He=fU(He|0,ye|0,T|0,0)|0,We=ye,Ze=pU(He|0,We|0,1e9,0)|0,n[B>>2]=Ze,T=AU(He|0,We|0,1e9,0)|0,B=B+-4|0;while(B>>>0>=M>>>0);T&&(M=M+-4|0,n[M>>2]=T)}for(T=q;!(T>>>0<=M>>>0);)if(B=T+-4|0,!(n[B>>2]|0))T=B;else break;if(B=(n[tt>>2]|0)-L|0,n[tt>>2]=B,(B|0)>0)q=T;else break}else M=$t;if((B|0)<0){A=((k+25|0)/9|0)+1|0,Qe=(ct|0)==102;do{if(Le=0-B|0,Le=(Le|0)<9?Le:9,M>>>0<T>>>0){L=(1<<Le)+-1|0,q=1e9>>>Le,ae=0,B=M;do We=n[B>>2]|0,n[B>>2]=(We>>>Le)+ae,ae=Ue(We&L,q)|0,B=B+4|0;while(B>>>0<T>>>0);B=n[M>>2]|0?M:M+4|0,ae?(n[T>>2]=ae,M=B,B=T+4|0):(M=B,B=T)}else M=n[M>>2]|0?M:M+4|0,B=T;T=Qe?$t:M,T=(B-T>>2|0)>(A|0)?T+(A<<2)|0:B,B=(n[tt>>2]|0)+Le|0,n[tt>>2]=B}while((B|0)<0);B=M,A=T}else B=M,A=T;if(We=$t,B>>>0<A>>>0){if(T=(We-B>>2)*9|0,L=n[B>>2]|0,L>>>0>=10){M=10;do M=M*10|0,T=T+1|0;while(L>>>0>=M>>>0)}}else T=0;if(Qe=(ct|0)==103,Ze=(k|0)!=0,M=k-((ct|0)!=102?T:0)+((Ze&Qe)<<31>>31)|0,(M|0)<(((A-We>>2)*9|0)+-9|0)){if(M=M+9216|0,Le=$t+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){L=10;do L=L*10|0,M=M+1|0;while((M|0)!=9)}else L=10;if(q=n[Le>>2]|0,ae=(q>>>0)%(L>>>0)|0,M=(Le+4|0)==(A|0),M&(ae|0)==0)M=Le;else if(Ye=((q>>>0)/(L>>>0)|0)&1|0?9007199254740994:9007199254740992,He=(L|0)/2|0,l=ae>>>0<He>>>0?.5:M&(ae|0)==(He|0)?1:1.5,fr&&(He=(s[Gr>>0]|0)==45,l=He?-l:l,Ye=He?-Ye:Ye),M=q-ae|0,n[Le>>2]=M,Ye+l!=Ye){if(He=M+L|0,n[Le>>2]=He,He>>>0>999999999)for(T=Le;M=T+-4|0,n[T>>2]=0,M>>>0<B>>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[M>>2]|0)+1|0,n[M>>2]=He,He>>>0>999999999;)T=M;else M=Le;if(T=(We-B>>2)*9|0,q=n[B>>2]|0,q>>>0>=10){L=10;do L=L*10|0,T=T+1|0;while(q>>>0>=L>>>0)}}else M=Le;M=M+4|0,M=A>>>0>M>>>0?M:A,He=B}else M=A,He=B;for(ct=M;;){if(ct>>>0<=He>>>0){tt=0;break}if(B=ct+-4|0,!(n[B>>2]|0))ct=B;else{tt=1;break}}A=0-T|0;do if(Qe)if(B=((Ze^1)&1)+k|0,(B|0)>(T|0)&(T|0)>-5?(L=m+-1|0,k=B+-1-T|0):(L=m+-2|0,k=B+-1|0),B=d&8,B)Le=B;else{if(tt&&(Lt=n[ct+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)M=0;else{M=0,B=10;do B=B*10|0,M=M+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else M=9;if(B=((ct-We>>2)*9|0)+-9|0,(L|32|0)==102){Le=B-M|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}else{Le=B+T-M|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}}else L=m,Le=d&8;while(!1);if(Qe=k|Le,q=(Qe|0)!=0&1,ae=(L|32|0)==102,ae)Ze=0,B=(T|0)>0?T:0;else{if(B=(T|0)<0?A:T,B=Zy(B,((B|0)<0)<<31>>31,Tr)|0,M=Tr,(M-B|0)<2)do B=B+-1|0,s[B>>0]=48;while((M-B|0)<2);s[B+-1>>0]=(T>>31&2)+43,B=B+-2|0,s[B>>0]=L,Ze=B,B=M-B|0}if(B=fr+1+k+q+B|0,Ls(o,32,u,B,d),vs(o,Gr,fr),Ls(o,48,u,B,d^65536),ae){L=He>>>0>$t>>>0?$t:He,Le=cr+9|0,q=Le,ae=cr+8|0,M=L;do{if(T=Zy(n[M>>2]|0,0,Le)|0,(M|0)==(L|0))(T|0)==(Le|0)&&(s[ae>>0]=48,T=ae);else if(T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}vs(o,T,q-T|0),M=M+4|0}while(M>>>0<=$t>>>0);if(Qe|0&&vs(o,5710,1),M>>>0<ct>>>0&(k|0)>0)for(;;){if(T=Zy(n[M>>2]|0,0,Le)|0,T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}if(vs(o,T,(k|0)<9?k:9),M=M+4|0,T=k+-9|0,M>>>0<ct>>>0&(k|0)>9)k=T;else{k=T;break}}Ls(o,48,k+9|0,9,0)}else{if(Qe=tt?ct:He+4|0,(k|0)>-1){tt=cr+9|0,Le=(Le|0)==0,A=tt,q=0-Hr|0,ae=cr+8|0,L=He;do{T=Zy(n[L>>2]|0,0,tt)|0,(T|0)==(tt|0)&&(s[ae>>0]=48,T=ae);do if((L|0)==(He|0)){if(M=T+1|0,vs(o,T,1),Le&(k|0)<1){T=M;break}vs(o,5710,1),T=M}else{if(T>>>0<=cr>>>0)break;eE(cr|0,48,T+q|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}while(!1);Hr=A-T|0,vs(o,T,(k|0)>(Hr|0)?Hr:k),k=k-Hr|0,L=L+4|0}while(L>>>0<Qe>>>0&(k|0)>-1)}Ls(o,48,k+18|0,18,0),vs(o,Ze,Tr-Ze|0)}Ls(o,32,u,B,d^8192)}else cr=(m&32|0)!=0,B=fr+3|0,Ls(o,32,u,B,d&-65537),vs(o,Gr,fr),vs(o,l!=l|!1?cr?5686:5690:cr?5678:5682,3),Ls(o,32,u,B,d^8192);while(!1);return I=Hn,((B|0)<(u|0)?u:B)|0}function vZ(o){o=+o;var l=0;return E[S>>3]=o,l=n[S>>2]|0,ye=n[S+4>>2]|0,l|0}function d6e(o,l){return o=+o,l=l|0,+ +SZ(o,l)}function SZ(o,l){o=+o,l=l|0;var u=0,A=0,d=0;switch(E[S>>3]=o,u=n[S>>2]|0,A=n[S+4>>2]|0,d=qP(u|0,A|0,52)|0,d&2047){case 0:{o!=0?(o=+SZ(o*18446744073709552e3,l),u=(n[l>>2]|0)+-64|0):u=0,n[l>>2]=u;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[S>>2]=u,n[S+4>>2]=A&-2146435073|1071644672,o=+E[S>>3]}return+o}function m6e(o,l,u){o=o|0,l=l|0,u=u|0;do if(o){if(l>>>0<128){s[o>>0]=l,o=1;break}if(!(n[n[(y6e()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){s[o>>0]=l,o=1;break}else{n[(Xy()|0)>>2]=84,o=-1;break}if(l>>>0<2048){s[o>>0]=l>>>6|192,s[o+1>>0]=l&63|128,o=2;break}if(l>>>0<55296|(l&-8192|0)==57344){s[o>>0]=l>>>12|224,s[o+1>>0]=l>>>6&63|128,s[o+2>>0]=l&63|128,o=3;break}if((l+-65536|0)>>>0<1048576){s[o>>0]=l>>>18|240,s[o+1>>0]=l>>>12&63|128,s[o+2>>0]=l>>>6&63|128,s[o+3>>0]=l&63|128,o=4;break}else{n[(Xy()|0)>>2]=84,o=-1;break}}else o=1;while(!1);return o|0}function y6e(){return lU()|0}function E6e(){return lU()|0}function I6e(o,l){o=o|0,l=l|0;var u=0,A=0;for(A=0;;){if((c[5712+A>>0]|0)==(o|0)){o=2;break}if(u=A+1|0,(u|0)==87){u=5800,A=87,o=5;break}else A=u}if((o|0)==2&&(A?(u=5800,o=5):u=5800),(o|0)==5)for(;;){do o=u,u=u+1|0;while(s[o>>0]|0);if(A=A+-1|0,A)o=5;else break}return C6e(u,n[l+20>>2]|0)|0}function C6e(o,l){return o=o|0,l=l|0,w6e(o,l)|0}function w6e(o,l){return o=o|0,l=l|0,l?l=B6e(n[l>>2]|0,n[l+4>>2]|0,o)|0:l=0,(l|0?l:o)|0}function B6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;ae=(n[o>>2]|0)+1794895138|0,m=Ad(n[o+8>>2]|0,ae)|0,A=Ad(n[o+12>>2]|0,ae)|0,d=Ad(n[o+16>>2]|0,ae)|0;e:do if(m>>>0<l>>>2>>>0&&(q=l-(m<<2)|0,A>>>0<q>>>0&d>>>0<q>>>0)&&!((d|A)&3|0)){for(q=A>>>2,L=d>>>2,M=0;;){if(k=m>>>1,T=M+k|0,B=T<<1,d=B+q|0,A=Ad(n[o+(d<<2)>>2]|0,ae)|0,d=Ad(n[o+(d+1<<2)>>2]|0,ae)|0,!(d>>>0<l>>>0&A>>>0<(l-d|0)>>>0)){A=0;break e}if(s[o+(d+A)>>0]|0){A=0;break e}if(A=EZ(u,o+d|0)|0,!A)break;if(A=(A|0)<0,(m|0)==1){A=0;break e}else M=A?M:T,m=A?k:m-k|0}A=B+L|0,d=Ad(n[o+(A<<2)>>2]|0,ae)|0,A=Ad(n[o+(A+1<<2)>>2]|0,ae)|0,A>>>0<l>>>0&d>>>0<(l-A|0)>>>0?A=s[o+(A+d)>>0]|0?0:o+A|0:A=0}else A=0;while(!1);return A|0}function Ad(o,l){o=o|0,l=l|0;var u=0;return u=RZ(o|0)|0,(l|0?u:o)|0}function v6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=u+16|0,d=n[A>>2]|0,d?m=5:S6e(u)|0?A=0:(d=n[A>>2]|0,m=5);e:do if((m|0)==5){if(k=u+20|0,B=n[k>>2]|0,A=B,(d-B|0)>>>0<l>>>0){A=YP[n[u+36>>2]&7](u,o,l)|0;break}t:do if((s[u+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=o;break t}if(d=B+-1|0,(s[o+d>>0]|0)==10)break;B=d}if(A=YP[n[u+36>>2]&7](u,o,B)|0,A>>>0<B>>>0)break e;m=B,d=o+B|0,l=l-B|0,A=n[k>>2]|0}else m=0,d=o;while(!1);Qr(A|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,A=m+l|0}while(!1);return A|0}function S6e(o){o=o|0;var l=0,u=0;return l=o+74|0,u=s[l>>0]|0,s[l>>0]=u+255|u,l=n[o>>2]|0,l&8?(n[o>>2]=l|32,o=-1):(n[o+8>>2]=0,n[o+4>>2]=0,u=n[o+44>>2]|0,n[o+28>>2]=u,n[o+20>>2]=u,n[o+16>>2]=u+(n[o+48>>2]|0),o=0),o|0}function $n(o,l){o=y(o),l=y(l);var u=0,A=0;u=DZ(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=DZ(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?l:o;break}else{o=o<l?l:o;break}}else o=l;while(!1);return y(o)}function DZ(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function pd(o,l){o=y(o),l=y(l);var u=0,A=0;u=bZ(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=bZ(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?o:l;break}else{o=o<l?o:l;break}}else o=l;while(!1);return y(o)}function bZ(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function uU(o,l){o=y(o),l=y(l);var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;m=(h[S>>2]=o,n[S>>2]|0),k=(h[S>>2]=l,n[S>>2]|0),u=m>>>23&255,B=k>>>23&255,T=m&-2147483648,d=k<<1;e:do if(d|0&&!((u|0)==255|((D6e(l)|0)&2147483647)>>>0>2139095040)){if(A=m<<1,A>>>0<=d>>>0)return l=y(o*y(0)),y((A|0)==(d|0)?l:o);if(u)A=m&8388607|8388608;else{if(u=m<<9,(u|0)>-1){A=u,u=0;do u=u+-1|0,A=A<<1;while((A|0)>-1)}else u=0;A=m<<1-u}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=A-k|0,m=(d|0)>-1;t:do if((u|0)>(B|0)){for(;;){if(m)if(d)A=d;else break;if(A=A<<1,u=u+-1|0,d=A-k|0,m=(d|0)>-1,(u|0)<=(B|0))break t}l=y(o*y(0));break e}while(!1);if(m)if(d)A=d;else{l=y(o*y(0));break}if(A>>>0<8388608)do A=A<<1,u=u+-1|0;while(A>>>0<8388608);(u|0)>0?u=A+-8388608|u<<23:u=A>>>(1-u|0),l=(n[S>>2]=u|T,y(h[S>>2]))}else M=3;while(!1);return(M|0)==3&&(l=y(o*l),l=y(l/l)),y(l)}function D6e(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function b6e(o,l){return o=o|0,l=l|0,IZ(n[582]|0,o,l)|0}function an(o){o=o|0,Nt()}function $y(o){o=o|0}function P6e(o,l){return o=o|0,l=l|0,0}function x6e(o){return o=o|0,(PZ(o+4|0)|0)==-1?(ip[n[(n[o>>2]|0)+8>>2]&127](o),o=1):o=0,o|0}function PZ(o){o=o|0;var l=0;return l=n[o>>2]|0,n[o>>2]=l+-1,l+-1|0}function Gh(o){o=o|0,x6e(o)|0&&k6e(o)}function k6e(o){o=o|0;var l=0;l=o+8|0,n[l>>2]|0&&(PZ(l)|0)!=-1||ip[n[(n[o>>2]|0)+16>>2]&127](o)}function Kt(o){o=o|0;var l=0;for(l=o|0?o:1;o=_P(l)|0,!(o|0);){if(o=T6e()|0,!o){o=0;break}GZ[o&0]()}return o|0}function xZ(o){return o=o|0,Kt(o)|0}function It(o){o=o|0,HP(o)}function Q6e(o){o=o|0,(s[o+11>>0]|0)<0&&It(n[o>>2]|0)}function T6e(){var o=0;return o=n[2923]|0,n[2923]=o+0,o|0}function R6e(){}function GP(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,A=l-A-(u>>>0>o>>>0|0)>>>0,ye=A,o-u>>>0|0|0}function fU(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,u=o+u>>>0,ye=l+A+(u>>>0<o>>>0|0)>>>0,u|0|0}function eE(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(m=o+u|0,l=l&255,(u|0)>=67){for(;o&3;)s[o>>0]=l,o=o+1|0;for(A=m&-4|0,d=A-64|0,B=l|l<<8|l<<16|l<<24;(o|0)<=(d|0);)n[o>>2]=B,n[o+4>>2]=B,n[o+8>>2]=B,n[o+12>>2]=B,n[o+16>>2]=B,n[o+20>>2]=B,n[o+24>>2]=B,n[o+28>>2]=B,n[o+32>>2]=B,n[o+36>>2]=B,n[o+40>>2]=B,n[o+44>>2]=B,n[o+48>>2]=B,n[o+52>>2]=B,n[o+56>>2]=B,n[o+60>>2]=B,o=o+64|0;for(;(o|0)<(A|0);)n[o>>2]=B,o=o+4|0}for(;(o|0)<(m|0);)s[o>>0]=l,o=o+1|0;return m-u|0}function kZ(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l<<u|(o&(1<<u)-1<<32-u)>>>32-u,o<<u):(ye=o<<u-32,0)}function qP(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l>>>u,o>>>u|(l&(1<<u)-1)<<32-u):(ye=0,l>>>u-32|0)}function Qr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;if((u|0)>=8192)return OA(o|0,l|0,u|0)|0;if(m=o|0,d=o+u|0,(o&3)==(l&3)){for(;o&3;){if(!u)return m|0;s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0,u=u-1|0}for(u=d&-4|0,A=u-64|0;(o|0)<=(A|0);)n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2],n[o+16>>2]=n[l+16>>2],n[o+20>>2]=n[l+20>>2],n[o+24>>2]=n[l+24>>2],n[o+28>>2]=n[l+28>>2],n[o+32>>2]=n[l+32>>2],n[o+36>>2]=n[l+36>>2],n[o+40>>2]=n[l+40>>2],n[o+44>>2]=n[l+44>>2],n[o+48>>2]=n[l+48>>2],n[o+52>>2]=n[l+52>>2],n[o+56>>2]=n[l+56>>2],n[o+60>>2]=n[l+60>>2],o=o+64|0,l=l+64|0;for(;(o|0)<(u|0);)n[o>>2]=n[l>>2],o=o+4|0,l=l+4|0}else for(u=d-4|0;(o|0)<(u|0);)s[o>>0]=s[l>>0]|0,s[o+1>>0]=s[l+1>>0]|0,s[o+2>>0]=s[l+2>>0]|0,s[o+3>>0]=s[l+3>>0]|0,o=o+4|0,l=l+4|0;for(;(o|0)<(d|0);)s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0;return m|0}function QZ(o){o=o|0;var l=0;return l=s[N+(o&255)>>0]|0,(l|0)<8?l|0:(l=s[N+(o>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=s[N+(o>>16&255)>>0]|0,(l|0)<8?l+16|0:(s[N+(o>>>24)>>0]|0)+24|0))}function TZ(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0;if(L=o,T=l,M=T,B=u,ae=A,k=ae,!M)return m=(d|0)!=0,k?m?(n[d>>2]=o|0,n[d+4>>2]=l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0):(m&&(n[d>>2]=(L>>>0)%(B>>>0),n[d+4>>2]=0),ae=0,d=(L>>>0)/(B>>>0)>>>0,ye=ae,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(b(k|0)|0)-(b(M|0)|0)|0,m>>>0<=31){q=m+1|0,k=31-m|0,l=m-31>>31,B=q,o=L>>>(q>>>0)&l|M<<k,l=M>>>(q>>>0)&l,m=0,k=L<<k;break}return d?(n[d>>2]=o|0,n[d+4>>2]=T|l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0)}if(m=B-1|0,m&B|0){k=(b(B|0)|0)+33-(b(M|0)|0)|0,Le=64-k|0,q=32-k|0,T=q>>31,Ye=k-32|0,l=Ye>>31,B=k,o=q-1>>31&M>>>(Ye>>>0)|(M<<q|L>>>(k>>>0))&l,l=l&M>>>(k>>>0),m=L<<Le&T,k=(M<<Le|L>>>(Ye>>>0))&T|L<<q&k-33>>31;break}return d|0&&(n[d>>2]=m&L,n[d+4>>2]=0),(B|0)==1?(Ye=T|l&0,Le=o|0|0,ye=Ye,Le|0):(Le=QZ(B|0)|0,Ye=M>>>(Le>>>0)|0,Le=M<<32-Le|L>>>(Le>>>0)|0,ye=Ye,Le|0)}else{if(m)return d|0&&(n[d>>2]=(M>>>0)%(B>>>0),n[d+4>>2]=0),Ye=0,Le=(M>>>0)/(B>>>0)>>>0,ye=Ye,Le|0;if(!L)return d|0&&(n[d>>2]=0,n[d+4>>2]=(M>>>0)%(k>>>0)),Ye=0,Le=(M>>>0)/(k>>>0)>>>0,ye=Ye,Le|0;if(m=k-1|0,!(m&k))return d|0&&(n[d>>2]=o|0,n[d+4>>2]=m&M|l&0),Ye=0,Le=M>>>((QZ(k|0)|0)>>>0),ye=Ye,Le|0;if(m=(b(k|0)|0)-(b(M|0)|0)|0,m>>>0<=30){l=m+1|0,k=31-m|0,B=l,o=M<<k|L>>>(l>>>0),l=M>>>(l>>>0),m=0,k=L<<k;break}return d?(n[d>>2]=o|0,n[d+4>>2]=T|l&0,Ye=0,Le=0,ye=Ye,Le|0):(Ye=0,Le=0,ye=Ye,Le|0)}while(!1);if(!B)M=k,T=0,k=0;else{q=u|0|0,L=ae|A&0,M=fU(q|0,L|0,-1,-1)|0,u=ye,T=k,k=0;do A=T,T=m>>>31|T<<1,m=k|m<<1,A=o<<1|A>>>31|0,ae=o>>>31|l<<1|0,GP(M|0,u|0,A|0,ae|0)|0,Le=ye,Ye=Le>>31|((Le|0)<0?-1:0)<<1,k=Ye&1,o=GP(A|0,ae|0,Ye&q|0,(((Le|0)<0?-1:0)>>31|((Le|0)<0?-1:0)<<1)&L|0)|0,l=ye,B=B-1|0;while(B|0);M=T,T=0}return B=0,d|0&&(n[d>>2]=o,n[d+4>>2]=l),Ye=(m|0)>>>31|(M|B)<<1|(B<<1|m>>>31)&0|T,Le=(m<<1|0)&-2|k,ye=Ye,Le|0}function AU(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,TZ(o,l,u,A,0)|0}function qh(o){o=o|0;var l=0,u=0;return u=o+15&-16|0,l=n[C>>2]|0,o=l+u|0,(u|0)>0&(o|0)<(l|0)|(o|0)<0?(oe()|0,fu(12),-1):(n[C>>2]=o,(o|0)>($()|0)&&!(X()|0)?(n[C>>2]=l,fu(12),-1):l|0)}function Q2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if((l|0)<(o|0)&(o|0)<(l+u|0)){for(A=o,l=l+u|0,o=o+u|0;(u|0)>0;)o=o-1|0,l=l-1|0,u=u-1|0,s[o>>0]=s[l>>0]|0;o=A}else Qr(o,l,u)|0;return o|0}function pU(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;return m=I,I=I+16|0,d=m|0,TZ(o,l,u,A,d)|0,I=m,ye=n[d+4>>2]|0,n[d>>2]|0|0}function RZ(o){return o=o|0,(o&255)<<24|(o>>8&255)<<16|(o>>16&255)<<8|o>>>24|0}function F6e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,FZ[o&1](l|0,u|0,A|0,d|0,m|0)}function N6e(o,l,u){o=o|0,l=l|0,u=y(u),NZ[o&1](l|0,y(u))}function O6e(o,l,u){o=o|0,l=l|0,u=+u,OZ[o&31](l|0,+u)}function L6e(o,l,u,A){return o=o|0,l=l|0,u=y(u),A=y(A),y(LZ[o&0](l|0,y(u),y(A)))}function M6e(o,l){o=o|0,l=l|0,ip[o&127](l|0)}function U6e(o,l,u){o=o|0,l=l|0,u=u|0,sp[o&31](l|0,u|0)}function _6e(o,l){return o=o|0,l=l|0,gd[o&31](l|0)|0}function H6e(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,MZ[o&1](l|0,+u,+A,d|0)}function j6e(o,l,u,A){o=o|0,l=l|0,u=+u,A=+A,wGe[o&1](l|0,+u,+A)}function G6e(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,YP[o&7](l|0,u|0,A|0)|0}function q6e(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,+BGe[o&1](l|0,u|0,A|0)}function W6e(o,l){return o=o|0,l=l|0,+UZ[o&15](l|0)}function Y6e(o,l,u){return o=o|0,l=l|0,u=+u,vGe[o&1](l|0,+u)|0}function V6e(o,l,u){return o=o|0,l=l|0,u=u|0,gU[o&15](l|0,u|0)|0}function J6e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=+A,d=+d,m=m|0,SGe[o&1](l|0,u|0,+A,+d,m|0)}function K6e(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,DGe[o&1](l|0,u|0,A|0,d|0,m|0,B|0)}function z6e(o,l,u){return o=o|0,l=l|0,u=u|0,+_Z[o&7](l|0,u|0)}function X6e(o){return o=o|0,VP[o&7]()|0}function Z6e(o,l,u,A,d,m){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,HZ[o&1](l|0,u|0,A|0,d|0,m|0)|0}function $6e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=+d,bGe[o&1](l|0,u|0,A|0,+d)}function eGe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,jZ[o&1](l|0,u|0,y(A),d|0,y(m),B|0)}function tGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F2[o&15](l|0,u|0,A|0)}function rGe(o){o=o|0,GZ[o&0]()}function nGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,qZ[o&15](l|0,u|0,+A)}function iGe(o,l,u){return o=o|0,l=+l,u=+u,PGe[o&1](+l,+u)|0}function sGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,dU[o&15](l|0,u|0,A|0,d|0)}function oGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(0)}function aGe(o,l){o=o|0,l=y(l),F(1)}function Xa(o,l){o=o|0,l=+l,F(2)}function lGe(o,l,u){return o=o|0,l=y(l),u=y(u),F(3),$e}function wr(o){o=o|0,F(4)}function T2(o,l){o=o|0,l=l|0,F(5)}function Ol(o){return o=o|0,F(6),0}function cGe(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,F(7)}function uGe(o,l,u){o=o|0,l=+l,u=+u,F(8)}function fGe(o,l,u){return o=o|0,l=l|0,u=u|0,F(9),0}function AGe(o,l,u){return o=o|0,l=l|0,u=u|0,F(10),0}function hd(o){return o=o|0,F(11),0}function pGe(o,l){return o=o|0,l=+l,F(12),0}function R2(o,l){return o=o|0,l=l|0,F(13),0}function hGe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,F(14)}function gGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,F(15)}function hU(o,l){return o=o|0,l=l|0,F(16),0}function dGe(){return F(17),0}function mGe(o,l,u,A,d){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(18),0}function yGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,F(19)}function EGe(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,F(20)}function WP(o,l,u){o=o|0,l=l|0,u=u|0,F(21)}function IGe(){F(22)}function tE(o,l,u){o=o|0,l=l|0,u=+u,F(23)}function CGe(o,l){return o=+o,l=+l,F(24),0}function rE(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F(25)}var FZ=[oGe,m3e],NZ=[aGe,Ty],OZ=[Xa,Zg,Fh,h2,g2,d2,m2,bf,_y,y2,Pf,$g,ed,E2,I2,wu,td,C2,Hy,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa],LZ=[lGe],ip=[wr,$y,Xke,Zke,$ke,PFe,xFe,kFe,Y_e,V_e,J_e,i3e,s3e,o3e,Dje,bje,Pje,Bl,Xg,u2,sr,hc,xP,kP,Hke,aQe,EQe,LQe,$Qe,dTe,RTe,JTe,cRe,SRe,HRe,nFe,EFe,VFe,cNe,SNe,HNe,nOe,EOe,MOe,$Oe,pLe,xLe,dP,oMe,wMe,HMe,sUe,IUe,HUe,XUe,e_e,m_e,I_e,L_e,z_e,$_e,d4e,F4e,Iz,g8e,Y8e,aHe,wHe,qHe,sje,dje,Eje,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr],sp=[T2,Ly,JL,f2,A2,xr,so,Xi,Ns,ws,Uy,Rh,B2,CP,id,XL,ZL,wP,BP,tM,xf,ne,jOe,rLe,cUe,y8e,j4e,iZ,T2,T2,T2,T2],gd=[Ol,n6e,Ny,nd,Gy,ga,mP,Nh,w2,zL,EP,qy,vP,rM,Vy,TLe,vUe,E4e,w8e,Rl,Ol,Ol,Ol,Ol,Ol,Ol,Ol,Ol,Ol,Ol,Ol,Ol],MZ=[cGe,aM],wGe=[uGe,__e],YP=[fGe,yZ,i6e,a6e,ITe,XFe,uMe,DHe],BGe=[AGe,WRe],UZ=[hd,Oh,IP,$A,lM,v,D,Q,H,V,hd,hd,hd,hd,hd,hd],vGe=[pGe,JUe],gU=[R2,P6e,SP,Wke,HQe,OTe,XTe,BFe,pNe,mLe,Ry,fHe,R2,R2,R2,R2],SGe=[hGe,BQe],DGe=[gGe,JHe],_Z=[hU,$L,Se,_e,pt,aFe,hU,hU],VP=[dGe,Wt,Fy,gP,i_e,v_e,n4e,Bje],HZ=[mGe,Sy],bGe=[yGe,WNe],jZ=[EGe,nM],F2=[WP,ko,yP,eM,vu,nTe,ARe,aOe,BOe,VL,_3e,z8e,cje,WP,WP,WP],GZ=[IGe],qZ=[tE,KL,My,ZA,p2,Bu,jy,rd,xNe,DMe,qUe,tE,tE,tE,tE,tE],PGe=[CGe,q_e],dU=[rE,xRe,_Le,WMe,RUe,u_e,k_e,u4e,U4e,P8e,Fje,rE,rE,rE,rE,rE];return{_llvm_bswap_i32:RZ,dynCall_idd:iGe,dynCall_i:X6e,_i64Subtract:GP,___udivdi3:AU,dynCall_vif:N6e,setThrew:ca,dynCall_viii:tGe,_bitshift64Lshr:qP,_bitshift64Shl:kZ,dynCall_vi:M6e,dynCall_viiddi:J6e,dynCall_diii:q6e,dynCall_iii:V6e,_memset:eE,_sbrk:qh,_memcpy:Qr,__GLOBAL__sub_I_Yoga_cpp:a2,dynCall_vii:U6e,___uremdi3:pU,dynCall_vid:O6e,stackAlloc:Ua,_nbind_init:Wje,getTempRet0:MA,dynCall_di:W6e,dynCall_iid:Y6e,setTempRet0:LA,_i64Add:fU,dynCall_fiff:L6e,dynCall_iiii:G6e,_emscripten_get_global_libc:r6e,dynCall_viid:nGe,dynCall_viiid:$6e,dynCall_viififi:eGe,dynCall_ii:_6e,__GLOBAL__sub_I_Binding_cc:a8e,dynCall_viiii:sGe,dynCall_iiiiii:Z6e,stackSave:hf,dynCall_viiiii:F6e,__GLOBAL__sub_I_nbind_cc:Sr,dynCall_vidd:j6e,_free:HP,runPostSets:R6e,dynCall_viiiiii:K6e,establishStackSpace:wn,_memmove:Q2,stackRestore:lc,_malloc:_P,__GLOBAL__sub_I_common_cc:b4e,dynCall_viddi:H6e,dynCall_dii:z6e,dynCall_v:rGe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name=\"ExitStatus\",this.message=\"Program terminated with exit(\"+t+\")\",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function s(){for(var p=0;p<3;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),\"i8\",ALLOC_NORMAL)];s();for(var n=0;n<r-1;n=n+1)a.push(allocate(intArrayFromString(e[n]),\"i8\",ALLOC_NORMAL)),s();a.push(0),a=allocate(a,\"i32\",ALLOC_NORMAL);try{var c=Module._main(r,a,0);exit(c,!0)}catch(p){if(p instanceof ExitStatus)return;if(p==\"SimulateInfiniteLoop\"){Module.noExitRuntime=!0;return}else{var f=p;p&&typeof p==\"object\"&&p.stack&&(f=[p,p.stack]),Module.printErr(\"exception thrown: \"+f),Module.quit(1,p)}}finally{calledMain=!0}};function run(t){if(t=t||Module.arguments,preloadStartTime===null&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){Module.setStatus(\"\")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t=\"\",ABORT=!0,EXITSTATUS=1;var e=`\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r=\"abort(\"+t+\") at \"+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit==\"function\"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Fm=_((PKt,Rwe)=>{\"use strict\";var Ppt=Qwe(),xpt=Twe(),K9=!1,z9=null;xpt({},function(t,e){if(!K9){if(K9=!0,t)throw t;z9=e}});if(!K9)throw new Error(\"Failed to load the yoga module - it needed to be loaded synchronously, but didn't\");Rwe.exports=Ppt(z9.bind,z9.lib)});var Z9=_((xKt,X9)=>{\"use strict\";var Fwe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);X9.exports=Fwe;X9.exports.default=Fwe});var Owe=_((kKt,Nwe)=>{\"use strict\";Nwe.exports=function(){return/\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\u200D[\\u2640\\u2642])|\\uD83C\\uDFF4\\u200D\\u2620)\\uFE0F|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83C\\uDDFD\\uD83C\\uDDF0|\\uD83C\\uDDF4\\uD83C\\uDDF2|\\uD83C\\uDDF6\\uD83C\\uDDE6|[#\\*0-9]\\uFE0F\\u20E3|\\uD83C\\uDDE7(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDF9(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF])|\\uD83C\\uDDEA(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA])|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF7(?:\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC])|\\uD83D\\uDC69(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF2(?:\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF])|\\uD83C\\uDDE6(?:\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF])|\\uD83C\\uDDF0(?:\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDED(?:\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA])|\\uD83C\\uDDE9(?:\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF])|\\uD83C\\uDDFE(?:\\uD83C[\\uDDEA\\uDDF9])|\\uD83C\\uDDEC(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE])|\\uD83C\\uDDF8(?:\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF])|\\uD83C\\uDDEB(?:\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7])|\\uD83C\\uDDF5(?:\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE])|\\uD83C\\uDDFB(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA])|\\uD83C\\uDDF3(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF])|\\uD83C\\uDDE8(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF])|\\uD83C\\uDDF1(?:\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE])|\\uD83C\\uDDFF(?:\\uD83C[\\uDDE6\\uDDF2\\uDDFC])|\\uD83C\\uDDFC(?:\\uD83C[\\uDDEB\\uDDF8])|\\uD83C\\uDDFA(?:\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF])|\\uD83C\\uDDEE(?:\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9])|\\uD83C\\uDDEF(?:\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5])|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC70\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDCAA\\uDD74\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD36\\uDDB5\\uDDB6\\uDDBB\\uDDD2-\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g}});var GS=_((QKt,$9)=>{\"use strict\";var kpt=dk(),Qpt=Z9(),Tpt=Owe(),Lwe=t=>{if(typeof t!=\"string\"||t.length===0||(t=kpt(t),t.length===0))return 0;t=t.replace(Tpt(),\"  \");let e=0;for(let r=0;r<t.length;r++){let s=t.codePointAt(r);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=Qpt(s)?2:1)}return e};$9.exports=Lwe;$9.exports.default=Lwe});var tW=_((TKt,eW)=>{\"use strict\";var Rpt=GS(),Mwe=t=>{let e=0;for(let r of t.split(`\n`))e=Math.max(e,Rpt(r));return e};eW.exports=Mwe;eW.exports.default=Mwe});var Uwe=_(qS=>{\"use strict\";var Fpt=qS&&qS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qS,\"__esModule\",{value:!0});var Npt=Fpt(tW()),rW={};qS.default=t=>{if(t.length===0)return{width:0,height:0};if(rW[t])return rW[t];let e=Npt.default(t),r=t.split(`\n`).length;return rW[t]={width:e,height:r},{width:e,height:r}}});var _we=_(WS=>{\"use strict\";var Opt=WS&&WS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(WS,\"__esModule\",{value:!0});var bn=Opt(Fm()),Lpt=(t,e)=>{\"position\"in e&&t.setPositionType(e.position===\"absolute\"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},Mpt=(t,e)=>{\"marginLeft\"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),\"marginRight\"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),\"marginTop\"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),\"marginBottom\"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},Upt=(t,e)=>{\"paddingLeft\"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),\"paddingRight\"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),\"paddingTop\"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),\"paddingBottom\"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},_pt=(t,e)=>{var r;\"flexGrow\"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),\"flexShrink\"in e&&t.setFlexShrink(typeof e.flexShrink==\"number\"?e.flexShrink:1),\"flexDirection\"in e&&(e.flexDirection===\"row\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection===\"row-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection===\"column\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection===\"column-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),\"flexBasis\"in e&&(typeof e.flexBasis==\"number\"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis==\"string\"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),\"alignItems\"in e&&((e.alignItems===\"stretch\"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems===\"flex-start\"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems===\"center\"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems===\"flex-end\"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),\"alignSelf\"in e&&((e.alignSelf===\"auto\"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf===\"flex-start\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf===\"center\"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf===\"flex-end\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),\"justifyContent\"in e&&((e.justifyContent===\"flex-start\"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent===\"center\"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent===\"flex-end\"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent===\"space-between\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent===\"space-around\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},Hpt=(t,e)=>{var r,s;\"width\"in e&&(typeof e.width==\"number\"?t.setWidth(e.width):typeof e.width==\"string\"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),\"height\"in e&&(typeof e.height==\"number\"?t.setHeight(e.height):typeof e.height==\"string\"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),\"minWidth\"in e&&(typeof e.minWidth==\"string\"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),\"minHeight\"in e&&(typeof e.minHeight==\"string\"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},jpt=(t,e)=>{\"display\"in e&&t.setDisplay(e.display===\"flex\"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},Gpt=(t,e)=>{if(\"borderStyle\"in e){let r=typeof e.borderStyle==\"string\"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};WS.default=(t,e={})=>{Lpt(t,e),Mpt(t,e),Upt(t,e),_pt(t,e),Hpt(t,e),jpt(t,e),Gpt(t,e)}});var Gwe=_((NKt,jwe)=>{\"use strict\";var YS=GS(),qpt=dk(),Wpt=sk(),iW=new Set([\"\\x1B\",\"\\x9B\"]),Ypt=39,Hwe=t=>`${iW.values().next().value}[${t}m`,Vpt=t=>t.split(\" \").map(e=>YS(e)),nW=(t,e,r)=>{let s=[...e],a=!1,n=YS(qpt(t[t.length-1]));for(let[c,f]of s.entries()){let p=YS(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),iW.has(f))a=!0;else if(a&&f===\"m\"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(t.push(\"\"),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Jpt=t=>{let e=t.split(\" \"),r=e.length;for(;r>0&&!(YS(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(\" \")+e.slice(r).join(\"\")},Kpt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()===\"\")return\"\";let s=\"\",a=\"\",n,c=Vpt(t),f=[\"\"];for(let[p,h]of t.split(\" \").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=YS(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(\"\"),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=\" \",E++)),r.hard&&c[p]>e){let C=e-E,S=1+Math.floor((c[p]-C-1)/e);Math.floor((c[p]-1)/e)<S&&f.push(\"\"),nW(f,h,e);continue}if(E+c[p]>e&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<e){nW(f,h,e);continue}f.push(\"\")}if(E+c[p]>e&&r.wordWrap===!1){nW(f,h,e);continue}f[f.length-1]+=h}r.trim!==!1&&(f=f.map(Jpt)),s=f.join(`\n`);for(let[p,h]of[...s].entries()){if(a+=h,iW.has(h)){let C=parseFloat(/\\d[^m]*/.exec(s.slice(p,p+4)));n=C===Ypt?null:C}let E=Wpt.codes.get(Number(n));n&&E&&(s[p+1]===`\n`?a+=Hwe(E):h===`\n`&&(a+=Hwe(n)))}return a};jwe.exports=(t,e,r)=>String(t).normalize().replace(/\\r\\n/g,`\n`).split(`\n`).map(s=>Kpt(s,e,r)).join(`\n`)});var Ywe=_((OKt,Wwe)=>{\"use strict\";var qwe=\"[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\",zpt=t=>t&&t.exact?new RegExp(`^${qwe}$`):new RegExp(qwe,\"g\");Wwe.exports=zpt});var sW=_((LKt,zwe)=>{\"use strict\";var Xpt=Z9(),Zpt=Ywe(),Vwe=sk(),Kwe=[\"\\x1B\",\"\\x9B\"],NF=t=>`${Kwe[0]}[${t}m`,Jwe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(\";\")&&(a=a.split(\";\")[0][0]+\"0\");let c=Vwe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(NF(e?c:n))}else if(e){s.push(NF(0));break}else s.push(NF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=NF(Vwe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join(\"\")};zwe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r==\"number\"?r:s.length;let n=!1,c,f=0,p=\"\";for(let[h,E]of s.entries()){let C=!1;if(Kwe.includes(E)){let S=/\\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E===\"m\"&&(n=!1,C=!0);if(!n&&!C&&++f,!Zpt({exact:!0}).test(E)&&Xpt(E.codePointAt())&&++f,f>e&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=Jwe(a);else if(f>=r){p+=Jwe(a,!0,c);break}}return p}});var Zwe=_((MKt,Xwe)=>{\"use strict\";var $0=sW(),$pt=GS();function OF(t,e,r){if(t.charAt(e)===\" \")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===\" \")return e+s}else if(t.charAt(e-s)===\" \")return e-s;return e}Xwe.exports=(t,e,r)=>{r={position:\"end\",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c=\"\\u2026\",f=1;if(typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a string, got ${typeof t}`);if(typeof e!=\"number\")throw new TypeError(`Expected \\`columns\\` to be a number, got ${typeof e}`);if(e<1)return\"\";if(e===1)return c;let p=$pt(t);if(p<=e)return t;if(s===\"start\"){if(n){let h=OF(t,p-e+1,!0);return c+$0(t,h,p).trim()}return a===!0&&(c+=\" \",f=2),c+$0(t,p-e+f,p)}if(s===\"middle\"){a===!0&&(c=\" \"+c+\" \",f=3);let h=Math.floor(e/2);if(n){let E=OF(t,h),C=OF(t,p-(e-h)+1,!0);return $0(t,0,E)+c+$0(t,C,p).trim()}return $0(t,0,h)+c+$0(t,p-(e-h)+f,p)}if(s===\"end\"){if(n){let h=OF(t,e-1);return $0(t,0,h)+c}return a===!0&&(c=\" \"+c,f=2),$0(t,0,e-f)+c}throw new Error(`Expected \\`options.position\\` to be either \\`start\\`, \\`middle\\` or \\`end\\`, got ${s}`)}});var aW=_(VS=>{\"use strict\";var $we=VS&&VS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VS,\"__esModule\",{value:!0});var eht=$we(Gwe()),tht=$we(Zwe()),oW={};VS.default=(t,e,r)=>{let s=t+String(e)+String(r);if(oW[s])return oW[s];let a=t;if(r===\"wrap\"&&(a=eht.default(t,e,{trim:!1,hard:!0})),r.startsWith(\"truncate\")){let n=\"end\";r===\"truncate-middle\"&&(n=\"middle\"),r===\"truncate-start\"&&(n=\"start\"),a=tht.default(t,e,{position:n})}return oW[s]=a,a}});var cW=_(lW=>{\"use strict\";Object.defineProperty(lW,\"__esModule\",{value:!0});var e1e=t=>{let e=\"\";if(t.childNodes.length>0)for(let r of t.childNodes){let s=\"\";r.nodeName===\"#text\"?s=r.nodeValue:((r.nodeName===\"ink-text\"||r.nodeName===\"ink-virtual-text\")&&(s=e1e(r)),s.length>0&&typeof r.internal_transform==\"function\"&&(s=r.internal_transform(s))),e+=s}return e};lW.default=e1e});var uW=_(bi=>{\"use strict\";var JS=bi&&bi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bi,\"__esModule\",{value:!0});bi.setTextNodeValue=bi.createTextNode=bi.setStyle=bi.setAttribute=bi.removeChildNode=bi.insertBeforeNode=bi.appendChildNode=bi.createNode=bi.TEXT_NAME=void 0;var rht=JS(Fm()),t1e=JS(Uwe()),nht=JS(_we()),iht=JS(aW()),sht=JS(cW());bi.TEXT_NAME=\"#text\";bi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t===\"ink-virtual-text\"?void 0:rht.default.Node.create()};return t===\"ink-text\"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(oht.bind(null,r))),r};bi.appendChildNode=(t,e)=>{var r;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.setAttribute=(t,e,r)=>{t.attributes[e]=r};bi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&nht.default(t.yogaNode,e)};bi.createTextNode=t=>{let e={nodeName:\"#text\",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return bi.setTextNodeValue(e,t),e};var oht=function(t,e){var r,s;let a=t.nodeName===\"#text\"?t.nodeValue:sht.default(t),n=t1e.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let c=(s=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&s!==void 0?s:\"wrap\",f=iht.default(a,e,c);return t1e.default(f)},r1e=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:r1e(t.parentNode)},LF=t=>{let e=r1e(t);e?.markDirty()};bi.setTextNodeValue=(t,e)=>{typeof e!=\"string\"&&(e=String(e)),t.nodeValue=e,LF(t)}});var a1e=_(KS=>{\"use strict\";var o1e=KS&&KS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(KS,\"__esModule\",{value:!0});var n1e=Y9(),aht=o1e(Swe()),i1e=o1e(Fm()),ea=uW(),s1e=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};KS.default=aht.default({schedulePassiveEffects:n1e.unstable_scheduleCallback,cancelPassiveEffects:n1e.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,shouldDeprioritizeSubtree:()=>!1,resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender==\"function\"&&t.onImmediateRender();return}typeof t.onRender==\"function\"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,s=e===\"ink-text\"||e===\"ink-virtual-text\";return r===s?t:{isInsideText:s}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,s)=>{if(s.isInsideText&&t===\"ink-box\")throw new Error(\"<Box> can\\u2019t be nested inside <Text> component\");let a=t===\"ink-text\"&&s.isInsideText?\"ink-virtual-text\":t,n=ea.createNode(a);for(let[c,f]of Object.entries(e))c!==\"children\"&&(c===\"style\"?ea.setStyle(n,f):c===\"internal_transform\"?n.internal_transform=f:c===\"internal_static\"?n.internal_static=!0:ea.setAttribute(n,c,f));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string \"${t}\" must be rendered inside <Text> component`);return ea.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{ea.setTextNodeValue(t,\"\")},unhideTextInstance:(t,e)=>{ea.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(i1e.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(i1e.default.DISPLAY_FLEX)},appendInitialChild:ea.appendChildNode,appendChild:ea.appendChildNode,insertBefore:ea.insertBeforeNode,finalizeInitialChildren:(t,e,r,s)=>(t.internal_static&&(s.isStaticDirty=!0,s.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:ea.appendChildNode,insertInContainerBefore:ea.insertBeforeNode,removeChildFromContainer:(t,e)=>{ea.removeChildNode(t,e),s1e(e.yogaNode)},prepareUpdate:(t,e,r,s,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},c=Object.keys(s);for(let f of c)if(s[f]!==r[f]){if(f===\"style\"&&typeof s.style==\"object\"&&typeof r.style==\"object\"){let h=s.style,E=r.style,C=Object.keys(h);for(let S of C){if(S===\"borderStyle\"||S===\"borderColor\"){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[S]!==E[S]){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style[S]=h[S]}}continue}n[f]=s[f]}return n},commitUpdate:(t,e)=>{for(let[r,s]of Object.entries(e))r!==\"children\"&&(r===\"style\"?ea.setStyle(t,s):r===\"internal_transform\"?t.internal_transform=s:r===\"internal_static\"?t.internal_static=!0:ea.setAttribute(t,r,s))},commitTextUpdate:(t,e,r)=>{ea.setTextNodeValue(t,r)},removeChild:(t,e)=>{ea.removeChildNode(t,e),s1e(e.yogaNode)}})});var c1e=_((GKt,l1e)=>{\"use strict\";l1e.exports=(t,e=1,r)=>{if(r={indent:\" \",includeEmptyLines:!1,...r},typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof t}\\``);if(typeof e!=\"number\")throw new TypeError(`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof e}\\``);if(typeof r.indent!=\"string\")throw new TypeError(`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof r.indent}\\``);if(e===0)return t;let s=r.includeEmptyLines?/^/gm:/^(?!\\s*$)/gm;return t.replace(s,r.indent.repeat(e))}});var u1e=_(zS=>{\"use strict\";var lht=zS&&zS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zS,\"__esModule\",{value:!0});var MF=lht(Fm());zS.default=t=>t.getComputedWidth()-t.getComputedPadding(MF.default.EDGE_LEFT)-t.getComputedPadding(MF.default.EDGE_RIGHT)-t.getComputedBorder(MF.default.EDGE_LEFT)-t.getComputedBorder(MF.default.EDGE_RIGHT)});var f1e=_((WKt,cht)=>{cht.exports={single:{topLeft:\"\\u250C\",topRight:\"\\u2510\",bottomRight:\"\\u2518\",bottomLeft:\"\\u2514\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},double:{topLeft:\"\\u2554\",topRight:\"\\u2557\",bottomRight:\"\\u255D\",bottomLeft:\"\\u255A\",vertical:\"\\u2551\",horizontal:\"\\u2550\"},round:{topLeft:\"\\u256D\",topRight:\"\\u256E\",bottomRight:\"\\u256F\",bottomLeft:\"\\u2570\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},bold:{topLeft:\"\\u250F\",topRight:\"\\u2513\",bottomRight:\"\\u251B\",bottomLeft:\"\\u2517\",vertical:\"\\u2503\",horizontal:\"\\u2501\"},singleDouble:{topLeft:\"\\u2553\",topRight:\"\\u2556\",bottomRight:\"\\u255C\",bottomLeft:\"\\u2559\",vertical:\"\\u2551\",horizontal:\"\\u2500\"},doubleSingle:{topLeft:\"\\u2552\",topRight:\"\\u2555\",bottomRight:\"\\u255B\",bottomLeft:\"\\u2558\",vertical:\"\\u2502\",horizontal:\"\\u2550\"},classic:{topLeft:\"+\",topRight:\"+\",bottomRight:\"+\",bottomLeft:\"+\",vertical:\"|\",horizontal:\"-\"}}});var p1e=_((YKt,fW)=>{\"use strict\";var A1e=f1e();fW.exports=A1e;fW.exports.default=A1e});var AW=_(ZS=>{\"use strict\";var uht=ZS&&ZS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ZS,\"__esModule\",{value:!0});var XS=uht(TE()),fht=/^(rgb|hsl|hsv|hwb)\\(\\s?(\\d+),\\s?(\\d+),\\s?(\\d+)\\s?\\)$/,Aht=/^(ansi|ansi256)\\(\\s?(\\d+)\\s?\\)$/,UF=(t,e)=>e===\"foreground\"?t:\"bg\"+t[0].toUpperCase()+t.slice(1);ZS.default=(t,e,r)=>{if(!e)return t;if(e in XS.default){let a=UF(e,r);return XS.default[a](t)}if(e.startsWith(\"#\")){let a=UF(\"hex\",r);return XS.default[a](e)(t)}if(e.startsWith(\"ansi\")){let a=Aht.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]);return XS.default[n](c)(t)}if(e.startsWith(\"rgb\")||e.startsWith(\"hsl\")||e.startsWith(\"hsv\")||e.startsWith(\"hwb\")){let a=fht.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]),f=Number(a[3]),p=Number(a[4]);return XS.default[n](c,f,p)(t)}return t}});var g1e=_($S=>{\"use strict\";var h1e=$S&&$S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($S,\"__esModule\",{value:!0});var pht=h1e(p1e()),pW=h1e(AW());$S.default=(t,e,r,s)=>{if(typeof r.style.borderStyle==\"string\"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),c=r.style.borderColor,f=pht.default[r.style.borderStyle],p=pW.default(f.topLeft+f.horizontal.repeat(a-2)+f.topRight,c,\"foreground\"),h=(pW.default(f.vertical,c,\"foreground\")+`\n`).repeat(n-2),E=pW.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,\"foreground\");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var m1e=_(eD=>{\"use strict\";var Nm=eD&&eD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eD,\"__esModule\",{value:!0});var hht=Nm(Fm()),ght=Nm(tW()),dht=Nm(c1e()),mht=Nm(aW()),yht=Nm(u1e()),Eht=Nm(cW()),Iht=Nm(g1e()),Cht=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=`\n`.repeat(n)+dht.default(e,a)}return e},d1e=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===hht.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof t.internal_transform==\"function\"&&(C=[t.internal_transform,...c]),t.nodeName===\"ink-text\"){let S=Eht.default(t);if(S.length>0){let P=ght.default(S),I=yht.default(p);if(P>I){let R=(s=t.style.textWrap)!==null&&s!==void 0?s:\"wrap\";S=mht.default(S,I,R)}S=Cht(t,S),e.write(h,E,S,{transformers:C})}return}if(t.nodeName===\"ink-box\"&&Iht.default(h,E,t,e),t.nodeName===\"ink-root\"||t.nodeName===\"ink-box\")for(let S of t.childNodes)d1e(S,e,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};eD.default=d1e});var I1e=_(tD=>{\"use strict\";var E1e=tD&&tD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tD,\"__esModule\",{value:!0});var y1e=E1e(sW()),wht=E1e(GS()),hW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(\" \".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`\n`),h=0;for(let E of p){let C=e[n+h];if(!C)continue;let S=wht.default(E);for(let P of f)E=P(E);e[n+h]=y1e.default(C,0,a)+E+y1e.default(C,a+S),h++}}return{output:e.map(s=>s.trimRight()).join(`\n`),height:e.length}}};tD.default=hW});var B1e=_(rD=>{\"use strict\";var gW=rD&&rD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rD,\"__esModule\",{value:!0});var Bht=gW(Fm()),C1e=gW(m1e()),w1e=gW(I1e());rD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,Bht.default.DIRECTION_LTR);let s=new w1e.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});C1e.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new w1e.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),C1e.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}\n`:\"\"}}return{output:\"\",outputHeight:0,staticOutput:\"\"}}});var b1e=_((ZKt,D1e)=>{\"use strict\";var v1e=Ie(\"stream\"),S1e=[\"assert\",\"count\",\"countReset\",\"debug\",\"dir\",\"dirxml\",\"error\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"table\",\"time\",\"timeEnd\",\"timeLog\",\"trace\",\"warn\"],dW={},vht=t=>{let e=new v1e.PassThrough,r=new v1e.PassThrough;e.write=a=>t(\"stdout\",a),r.write=a=>t(\"stderr\",a);let s=new console.Console(e,r);for(let a of S1e)dW[a]=console[a],console[a]=s[a];return()=>{for(let a of S1e)console[a]=dW[a];dW={}}};D1e.exports=vht});var yW=_(mW=>{\"use strict\";Object.defineProperty(mW,\"__esModule\",{value:!0});mW.default=new WeakMap});var IW=_(EW=>{\"use strict\";Object.defineProperty(EW,\"__esModule\",{value:!0});var Sht=hn(),P1e=Sht.createContext({exit:()=>{}});P1e.displayName=\"InternalAppContext\";EW.default=P1e});var wW=_(CW=>{\"use strict\";Object.defineProperty(CW,\"__esModule\",{value:!0});var Dht=hn(),x1e=Dht.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});x1e.displayName=\"InternalStdinContext\";CW.default=x1e});var vW=_(BW=>{\"use strict\";Object.defineProperty(BW,\"__esModule\",{value:!0});var bht=hn(),k1e=bht.createContext({stdout:void 0,write:()=>{}});k1e.displayName=\"InternalStdoutContext\";BW.default=k1e});var DW=_(SW=>{\"use strict\";Object.defineProperty(SW,\"__esModule\",{value:!0});var Pht=hn(),Q1e=Pht.createContext({stderr:void 0,write:()=>{}});Q1e.displayName=\"InternalStderrContext\";SW.default=Q1e});var _F=_(bW=>{\"use strict\";Object.defineProperty(bW,\"__esModule\",{value:!0});var xht=hn(),T1e=xht.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});T1e.displayName=\"InternalFocusContext\";bW.default=T1e});var F1e=_((szt,R1e)=>{\"use strict\";var kht=/[|\\\\{}()[\\]^$+*?.-]/g;R1e.exports=t=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return t.replace(kht,\"\\\\$&\")}});var M1e=_((ozt,L1e)=>{\"use strict\";var Qht=F1e(),Tht=typeof process==\"object\"&&process&&typeof process.cwd==\"function\"?process.cwd():\".\",O1e=[].concat(Ie(\"module\").builtinModules,\"bootstrap_node\",\"node\").map(t=>new RegExp(`(?:\\\\((?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+\\\\)$|^\\\\s*at (?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+$)`));O1e.push(/\\((?:node:)?internal\\/[^:]+:\\d+:\\d+\\)$/,/\\s*at (?:node:)?internal\\/[^:]+:\\d+:\\d+$/,/\\/\\.node-spawn-wrap-\\w+-\\w+\\/node:\\d+:\\d+\\)?$/);var PW=class t{constructor(e){e={ignoredPackages:[],...e},\"internals\"in e||(e.internals=t.nodeInternals()),\"cwd\"in e||(e.cwd=Tht),this._cwd=e.cwd.replace(/\\\\/g,\"/\"),this._internals=[].concat(e.internals,Rht(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...O1e]}clean(e,r=0){r=\" \".repeat(r),Array.isArray(e)||(e=e.split(`\n`)),!/^\\s*at /.test(e[0])&&/^\\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\\\/g,\"/\"),this._internals.some(p=>p.test(c)))return;let f=/^\\s*at /.test(c);s?c=c.trimEnd().replace(/^(\\s+)at /,\"$1\"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,\"\"),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}\n`).join(\"\")}captureString(e,r=this.captureString){typeof e==\"function\"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e==\"function\"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};N1e(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!==\"Object\"&&a!==\"[object Object]\"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(Fht);if(!r)return null;let s=r[1]===\"new\",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]===\"native\",P=r[11]===\")\",I,R={};if(E&&(R.line=Number(E)),C&&(R.column=Number(C)),P&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===\")\")N++;else if(h.charAt(U)===\"(\"&&h.charAt(U-1)===\" \"&&(N--,N===-1&&h.charAt(U-1)===\" \")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(Nht);N&&(a=N[1],I=N[2])}return N1e(R,h,this._cwd),s&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=f,R.evalColumn=p,R.evalFile=c&&c.replace(/\\\\/g,\"/\")),S&&(R.native=!0),a&&(R.function=a),I&&a!==I&&(R.method=I),R}};function N1e(t,e,r){e&&(e=e.replace(/\\\\/g,\"/\"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function Rht(t){if(t.length===0)return[];let e=t.map(r=>Qht(r));return new RegExp(`[/\\\\\\\\]node_modules[/\\\\\\\\](?:${e.join(\"|\")})[/\\\\\\\\][^:]+:\\\\d+:\\\\d+`)}var Fht=new RegExp(\"^(?:\\\\s*at )?(?:(new) )?(?:(.*?) \\\\()?(?:eval at ([^ ]+) \\\\((.+?):(\\\\d+):(\\\\d+)\\\\), )?(?:(.+?):(\\\\d+):(\\\\d+)|(native))(\\\\)?)$\"),Nht=/^(.*?) \\[as (.*?)\\]$/;L1e.exports=PW});var _1e=_((azt,U1e)=>{\"use strict\";U1e.exports=(t,e)=>t.replace(/^\\t+/gm,r=>\" \".repeat(r.length*(e||2)))});var j1e=_((lzt,H1e)=>{\"use strict\";var Oht=_1e(),Lht=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};H1e.exports=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(\"Source code is missing.\");if(!e||e<1)throw new TypeError(\"Line number must start from `1`.\");if(t=Oht(t).split(/\\r?\\n/),!(e>t.length))return r={around:3,...r},Lht(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var HF=_(rf=>{\"use strict\";var Mht=rf&&rf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Uht=rf&&rf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_ht=rf&&rf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Mht(e,t,r);return Uht(e,t),e},Hht=rf&&rf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(r[s[a]]=t[s[a]]);return r};Object.defineProperty(rf,\"__esModule\",{value:!0});var G1e=_ht(hn()),xW=G1e.forwardRef((t,e)=>{var{children:r}=t,s=Hht(t,[\"children\"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return G1e.default.createElement(\"ink-box\",{ref:e,style:a},r)});xW.displayName=\"Box\";xW.defaultProps={flexDirection:\"row\",flexGrow:0,flexShrink:1};rf.default=xW});var TW=_(nD=>{\"use strict\";var kW=nD&&nD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nD,\"__esModule\",{value:!0});var jht=kW(hn()),yw=kW(TE()),q1e=kW(AW()),QW=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=yw.default.dim(C)),t&&(C=q1e.default(C,t,\"foreground\")),e&&(C=q1e.default(C,e,\"background\")),s&&(C=yw.default.bold(C)),a&&(C=yw.default.italic(C)),n&&(C=yw.default.underline(C)),c&&(C=yw.default.strikethrough(C)),f&&(C=yw.default.inverse(C)),C);return jht.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\",textWrap:p},internal_transform:E},h)};QW.displayName=\"Text\";QW.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:\"wrap\"};nD.default=QW});var J1e=_(nf=>{\"use strict\";var Ght=nf&&nf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),qht=nf&&nf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wht=nf&&nf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Ght(e,t,r);return qht(e,t),e},iD=nf&&nf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nf,\"__esModule\",{value:!0});var W1e=Wht(Ie(\"fs\")),Qs=iD(hn()),Y1e=iD(M1e()),Yht=iD(j1e()),$p=iD(HF()),AA=iD(TW()),V1e=new Y1e.default({cwd:process.cwd(),internals:Y1e.default.nodeInternals()}),Vht=({error:t})=>{let e=t.stack?t.stack.split(`\n`).slice(1):void 0,r=e?V1e.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&W1e.existsSync(r.file)){let n=W1e.readFileSync(r.file,\"utf8\");if(s=Yht.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Qs.default.createElement($p.default,{flexDirection:\"column\",padding:1},Qs.default.createElement($p.default,null,Qs.default.createElement(AA.default,{backgroundColor:\"red\",color:\"white\"},\" \",\"ERROR\",\" \"),Qs.default.createElement(AA.default,null,\" \",t.message)),r&&Qs.default.createElement($p.default,{marginTop:1},Qs.default.createElement(AA.default,{dimColor:!0},r.file,\":\",r.line,\":\",r.column)),r&&s&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:\"column\"},s.map(({line:n,value:c})=>Qs.default.createElement($p.default,{key:n},Qs.default.createElement($p.default,{width:a+1},Qs.default.createElement(AA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},String(n).padStart(a,\" \"),\":\")),Qs.default.createElement(AA.default,{key:n,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},\" \"+c)))),t.stack&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:\"column\"},t.stack.split(`\n`).slice(1).map(n=>{let c=V1e.parseLine(n);return c?Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},\"- \"),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},c.function),Qs.default.createElement(AA.default,{dimColor:!0,color:\"gray\"},\" \",\"(\",c.file,\":\",c.line,\":\",c.column,\")\")):Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},\"- \"),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},n))})))};nf.default=Vht});var z1e=_(sf=>{\"use strict\";var Jht=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Kht=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zht=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Jht(e,t,r);return Kht(e,t),e},Lm=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,\"__esModule\",{value:!0});var Om=zht(hn()),K1e=Lm(F9()),Xht=Lm(IW()),Zht=Lm(wW()),$ht=Lm(vW()),e0t=Lm(DW()),t0t=Lm(_F()),r0t=Lm(J1e()),n0t=\"\t\",i0t=\"\\x1B[Z\",s0t=\"\\x1B\",jF=class extends Om.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding(\"utf8\"),e){this.rawModeEnabledCount===0&&(r.addListener(\"data\",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener(\"data\",this.handleInput),r.pause())},this.handleInput=e=>{e===\"\u0003\"&&this.props.exitOnCtrlC&&this.handleExit(),e===s0t&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===n0t&&this.focusNext(),e===i0t&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Om.default.createElement(Xht.default.Provider,{value:{exit:this.handleExit}},Om.default.createElement(Zht.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Om.default.createElement($ht.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Om.default.createElement(e0t.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Om.default.createElement(t0t.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Om.default.createElement(r0t.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){K1e.default.hide(this.props.stdout)}componentWillUnmount(){K1e.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};sf.default=jF;jF.displayName=\"InternalApp\"});var $1e=_(of=>{\"use strict\";var o0t=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),a0t=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l0t=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&o0t(e,t,r);return a0t(e,t),e},af=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,\"__esModule\",{value:!0});var c0t=af(hn()),X1e=WCe(),u0t=af(awe()),f0t=af(x9()),A0t=af(pwe()),p0t=af(gwe()),RW=af(a1e()),h0t=af(B1e()),g0t=af(R9()),d0t=af(b1e()),m0t=l0t(uW()),y0t=af(yW()),E0t=af(z1e()),Ew=process.env.CI===\"false\"?!1:A0t.default,Z1e=()=>{},FW=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=h0t.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`\n`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Ew){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(f0t.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},p0t.default(this),this.options=e,this.rootNode=m0t.createNode(\"ink-root\"),this.rootNode.onRender=e.debug?this.onRender:X1e(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=u0t.default.create(e.stdout),this.throttledLog=e.debug?this.log:X1e(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput=\"\",this.fullStaticOutput=\"\",this.container=RW.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=g0t.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),Ew||(e.stdout.on(\"resize\",this.onRender),this.unsubscribeResize=()=>{e.stdout.off(\"resize\",this.onRender)})}render(e){let r=c0t.default.createElement(E0t.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);RW.default.updateContainer(r,this.container,null,Z1e)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==\"function\"&&this.restoreConsole(),typeof this.unsubscribeResize==\"function\"&&this.unsubscribeResize(),Ew?this.options.stdout.write(this.lastOutput+`\n`):this.options.debug||this.log.done(),this.isUnmounted=!0,RW.default.updateContainer(null,this.container,null,Z1e),y0t.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!Ew&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=d0t.default((e,r)=>{e===\"stdout\"&&this.writeToStdout(r),e===\"stderr\"&&(r.startsWith(\"The above error occurred\")||this.writeToStderr(r))}))}};of.default=FW});var t2e=_(sD=>{\"use strict\";var e2e=sD&&sD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sD,\"__esModule\",{value:!0});var I0t=e2e($1e()),GF=e2e(yW()),C0t=Ie(\"stream\"),w0t=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},B0t(e)),s=v0t(r.stdout,()=>new I0t.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>GF.default.delete(r.stdout),clear:s.clear}};sD.default=w0t;var B0t=(t={})=>t instanceof C0t.Stream?{stdout:t,stdin:process.stdin}:t,v0t=(t,e)=>{let r;return GF.default.has(t)?r=GF.default.get(t):(r=e(),GF.default.set(t,r)),r}});var n2e=_(eh=>{\"use strict\";var S0t=eh&&eh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),D0t=eh&&eh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),b0t=eh&&eh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&S0t(e,t,r);return D0t(e,t),e};Object.defineProperty(eh,\"__esModule\",{value:!0});var oD=b0t(hn()),r2e=t=>{let{items:e,children:r,style:s}=t,[a,n]=oD.useState(0),c=oD.useMemo(()=>e.slice(a),[e,a]);oD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=oD.useMemo(()=>Object.assign({position:\"absolute\",flexDirection:\"column\"},s),[s]);return oD.default.createElement(\"ink-box\",{internal_static:!0,style:p},f)};r2e.displayName=\"Static\";eh.default=r2e});var s2e=_(aD=>{\"use strict\";var P0t=aD&&aD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(aD,\"__esModule\",{value:!0});var x0t=P0t(hn()),i2e=({children:t,transform:e})=>t==null?null:x0t.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\"},internal_transform:e},t);i2e.displayName=\"Transform\";aD.default=i2e});var a2e=_(lD=>{\"use strict\";var k0t=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,\"__esModule\",{value:!0});var Q0t=k0t(hn()),o2e=({count:t=1})=>Q0t.default.createElement(\"ink-text\",null,`\n`.repeat(t));o2e.displayName=\"Newline\";lD.default=o2e});var u2e=_(cD=>{\"use strict\";var l2e=cD&&cD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cD,\"__esModule\",{value:!0});var T0t=l2e(hn()),R0t=l2e(HF()),c2e=()=>T0t.default.createElement(R0t.default,{flexGrow:1});c2e.displayName=\"Spacer\";cD.default=c2e});var qF=_(uD=>{\"use strict\";var F0t=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,\"__esModule\",{value:!0});var N0t=hn(),O0t=F0t(wW()),L0t=()=>N0t.useContext(O0t.default);uD.default=L0t});var A2e=_(fD=>{\"use strict\";var M0t=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,\"__esModule\",{value:!0});var f2e=hn(),U0t=M0t(qF()),_0t=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=U0t.default();f2e.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),f2e.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f===\"\\x1B[A\",downArrow:f===\"\\x1B[B\",leftArrow:f===\"\\x1B[D\",rightArrow:f===\"\\x1B[C\",pageDown:f===\"\\x1B[6~\",pageUp:f===\"\\x1B[5~\",return:f===\"\\r\",escape:f===\"\\x1B\",ctrl:!1,shift:!1,tab:f===\"\t\"||f===\"\\x1B[Z\",backspace:f===\"\\b\",delete:f===\"\\x7F\"||f===\"\\x1B[3~\",meta:!1};f<=\"\u001a\"&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith(\"\\x1B\")&&(f=f.slice(1),p.meta=!0);let h=f>=\"A\"&&f<=\"Z\",E=f>=\"\\u0410\"&&f<=\"\\u042F\";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f===\"[Z\"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=\"\"),(!(f===\"c\"&&p.ctrl)||!a)&&t(f,p)};return r?.on(\"data\",n),()=>{r?.off(\"data\",n)}},[e.isActive,r,a,t])};fD.default=_0t});var p2e=_(AD=>{\"use strict\";var H0t=AD&&AD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AD,\"__esModule\",{value:!0});var j0t=hn(),G0t=H0t(IW()),q0t=()=>j0t.useContext(G0t.default);AD.default=q0t});var h2e=_(pD=>{\"use strict\";var W0t=pD&&pD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pD,\"__esModule\",{value:!0});var Y0t=hn(),V0t=W0t(vW()),J0t=()=>Y0t.useContext(V0t.default);pD.default=J0t});var g2e=_(hD=>{\"use strict\";var K0t=hD&&hD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hD,\"__esModule\",{value:!0});var z0t=hn(),X0t=K0t(DW()),Z0t=()=>z0t.useContext(X0t.default);hD.default=Z0t});var m2e=_(dD=>{\"use strict\";var d2e=dD&&dD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dD,\"__esModule\",{value:!0});var gD=hn(),$0t=d2e(_F()),egt=d2e(qF()),tgt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=egt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=gD.useContext($0t.default),C=gD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return gD.useEffect(()=>(c(C,{autoFocus:e}),()=>{f(C)}),[C,e]),gD.useEffect(()=>{t?p(C):h(C)},[t,C]),gD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!C&&n===C,focus:E}};dD.default=tgt});var y2e=_(mD=>{\"use strict\";var rgt=mD&&mD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mD,\"__esModule\",{value:!0});var ngt=hn(),igt=rgt(_F()),sgt=()=>{let t=ngt.useContext(igt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};mD.default=sgt});var E2e=_(NW=>{\"use strict\";Object.defineProperty(NW,\"__esModule\",{value:!0});NW.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Wc=_(mo=>{\"use strict\";Object.defineProperty(mo,\"__esModule\",{value:!0});var ogt=t2e();Object.defineProperty(mo,\"render\",{enumerable:!0,get:function(){return ogt.default}});var agt=HF();Object.defineProperty(mo,\"Box\",{enumerable:!0,get:function(){return agt.default}});var lgt=TW();Object.defineProperty(mo,\"Text\",{enumerable:!0,get:function(){return lgt.default}});var cgt=n2e();Object.defineProperty(mo,\"Static\",{enumerable:!0,get:function(){return cgt.default}});var ugt=s2e();Object.defineProperty(mo,\"Transform\",{enumerable:!0,get:function(){return ugt.default}});var fgt=a2e();Object.defineProperty(mo,\"Newline\",{enumerable:!0,get:function(){return fgt.default}});var Agt=u2e();Object.defineProperty(mo,\"Spacer\",{enumerable:!0,get:function(){return Agt.default}});var pgt=A2e();Object.defineProperty(mo,\"useInput\",{enumerable:!0,get:function(){return pgt.default}});var hgt=p2e();Object.defineProperty(mo,\"useApp\",{enumerable:!0,get:function(){return hgt.default}});var ggt=qF();Object.defineProperty(mo,\"useStdin\",{enumerable:!0,get:function(){return ggt.default}});var dgt=h2e();Object.defineProperty(mo,\"useStdout\",{enumerable:!0,get:function(){return dgt.default}});var mgt=g2e();Object.defineProperty(mo,\"useStderr\",{enumerable:!0,get:function(){return mgt.default}});var ygt=m2e();Object.defineProperty(mo,\"useFocus\",{enumerable:!0,get:function(){return ygt.default}});var Egt=y2e();Object.defineProperty(mo,\"useFocusManager\",{enumerable:!0,get:function(){return Egt.default}});var Igt=E2e();Object.defineProperty(mo,\"measureElement\",{enumerable:!0,get:function(){return Igt.default}})});var LW={};Vt(LW,{Gem:()=>OW});var I2e,Mm,OW,WF=Xe(()=>{I2e=ut(Wc()),Mm=ut(hn()),OW=(0,Mm.memo)(({active:t})=>{let e=(0,Mm.useMemo)(()=>t?\"\\u25C9\":\"\\u25EF\",[t]),r=(0,Mm.useMemo)(()=>t?\"green\":\"yellow\",[t]);return Mm.default.createElement(I2e.Text,{color:r},e)})});var w2e={};Vt(w2e,{useKeypress:()=>Um});function Um({active:t},e,r){let{stdin:s}=(0,C2e.useStdin)(),a=(0,YF.useCallback)((n,c)=>e(n,c),r);(0,YF.useEffect)(()=>{if(!(!t||!s))return s.on(\"keypress\",a),()=>{s.off(\"keypress\",a)}},[t,a,s])}var C2e,YF,yD=Xe(()=>{C2e=ut(Wc()),YF=ut(hn())});var v2e={};Vt(v2e,{FocusRequest:()=>B2e,useFocusRequest:()=>MW});var B2e,MW,UW=Xe(()=>{yD();B2e=(r=>(r.BEFORE=\"before\",r.AFTER=\"after\",r))(B2e||{}),MW=function({active:t},e,r){Um({active:t},(s,a)=>{a.name===\"tab\"&&(a.shift?e(\"before\"):e(\"after\"))},r)}});var S2e={};Vt(S2e,{useListInput:()=>ED});var ED,VF=Xe(()=>{yD();ED=function(t,e,{active:r,minus:s,plus:a,set:n,loop:c=!0}){Um({active:r},(f,p)=>{let h=e.indexOf(t);switch(p.name){case s:{let E=h-1;if(c){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(c){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,c])}});var JF={};Vt(JF,{ScrollableItems:()=>Cgt});var eg,dl,Cgt,KF=Xe(()=>{eg=ut(Wc()),dl=ut(hn());UW();VF();Cgt=({active:t=!0,children:e=[],radius:r=10,size:s=1,loop:a=!0,onFocusRequest:n,willReachEnd:c})=>{let f=N=>{if(N.key===null)throw new Error(\"Expected all children to have a key\");return N.key},p=dl.default.Children.map(e,N=>f(N)),h=p[0],[E,C]=(0,dl.useState)(h),S=p.indexOf(E);(0,dl.useEffect)(()=>{p.includes(E)||C(h)},[e]),(0,dl.useEffect)(()=>{c&&S>=p.length-2&&c()},[S]),MW({active:t&&!!n},N=>{n?.(N)},[n]),ED(E,p,{active:t,minus:\"up\",plus:\"down\",set:C,loop:a});let P=S-r,I=S+r;I>p.length&&(P-=I-p.length,I=p.length),P<0&&(I+=-P,P=0),I>=p.length&&(I=p.length-1);let R=[];for(let N=P;N<=I;++N){let U=p[N],W=t&&U===E;R.push(dl.default.createElement(eg.Box,{key:U,height:s},dl.default.createElement(eg.Box,{marginLeft:1,marginRight:1},dl.default.createElement(eg.Text,null,W?dl.default.createElement(eg.Text,{color:\"cyan\",bold:!0},\">\"):\" \")),dl.default.createElement(eg.Box,null,dl.default.cloneElement(e[N],{active:W}))))}return dl.default.createElement(eg.Box,{flexDirection:\"column\",width:\"100%\"},R)}});var D2e,th,b2e,_W,P2e,HW=Xe(()=>{D2e=ut(Wc()),th=ut(hn()),b2e=Ie(\"readline\"),_W=th.default.createContext(null),P2e=({children:t})=>{let{stdin:e,setRawMode:r}=(0,D2e.useStdin)();(0,th.useEffect)(()=>{r&&r(!0),e&&(0,b2e.emitKeypressEvents)(e)},[e,r]);let[s,a]=(0,th.useState)(new Map),n=(0,th.useMemo)(()=>({getAll:()=>s,get:c=>s.get(c),set:(c,f)=>a(new Map([...s,[c,f]]))}),[s,a]);return th.default.createElement(_W.Provider,{value:n,children:t})}});var jW={};Vt(jW,{useMinistore:()=>wgt});function wgt(t,e){let r=(0,zF.useContext)(_W);if(r===null)throw new Error(\"Expected this hook to run with a ministore context attached\");if(typeof t>\"u\")return r.getAll();let s=(0,zF.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>\"u\"&&(a=e),[a,s]}var zF,GW=Xe(()=>{zF=ut(hn());HW()});var ZF={};Vt(ZF,{renderForm:()=>Bgt});async function Bgt(t,e,{stdin:r,stdout:s,stderr:a}){let n,c=p=>{let{exit:h}=(0,XF.useApp)();Um({active:!0},(E,C)=>{C.name===\"return\"&&(n=p,h())},[h,p])},{waitUntilExit:f}=(0,XF.render)(qW.default.createElement(P2e,null,qW.default.createElement(t,{...e,useSubmit:c})),{stdin:r,stdout:s,stderr:a});return await f(),n}var XF,qW,$F=Xe(()=>{XF=ut(Wc()),qW=ut(hn());HW();yD()});var T2e=_(ID=>{\"use strict\";Object.defineProperty(ID,\"__esModule\",{value:!0});ID.UncontrolledTextInput=void 0;var k2e=hn(),WW=hn(),x2e=Wc(),_m=TE(),Q2e=({value:t,placeholder:e=\"\",focus:r=!0,mask:s,highlightPastedText:a=!1,showCursor:n=!0,onChange:c,onSubmit:f})=>{let[{cursorOffset:p,cursorWidth:h},E]=WW.useState({cursorOffset:(t||\"\").length,cursorWidth:0});WW.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||\"\";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let C=a?h:0,S=s?s.repeat(t.length):t,P=S,I=e?_m.grey(e):void 0;if(n&&r){I=e.length>0?_m.inverse(e[0])+_m.grey(e.slice(1)):_m.inverse(\" \"),P=S.length>0?\"\":_m.inverse(\" \");let R=0;for(let N of S)R>=p-C&&R<=p?P+=_m.inverse(N):P+=N,R++;S.length>0&&p===S.length&&(P+=_m.inverse(\" \"))}return x2e.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R===\"c\"||N.tab||N.shift&&N.tab)return;if(N.return){f&&f(t);return}let U=p,W=t,ee=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(W=t.slice(0,p-1)+t.slice(p,t.length),U--):(W=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(ee=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:ee}),W!==t&&c(W)},{isActive:r}),k2e.createElement(x2e.Text,null,e?S.length>0?P:I:P)};ID.default=Q2e;ID.UncontrolledTextInput=({initialValue:t=\"\",...e})=>{let[r,s]=WW.useState(t);return k2e.createElement(Q2e,Object.assign({},e,{value:r,onChange:s}))}});var N2e={};Vt(N2e,{Pad:()=>YW});var R2e,F2e,YW,VW=Xe(()=>{R2e=ut(Wc()),F2e=ut(hn()),YW=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${\"-\".repeat(t-1)}`:\" \";return F2e.default.createElement(R2e.Text,{dimColor:!e},r)}});var O2e={};Vt(O2e,{ItemOptions:()=>vgt});var wD,tg,vgt,L2e=Xe(()=>{wD=ut(Wc()),tg=ut(hn());VF();WF();VW();vgt=function({active:t,skewer:e,options:r,value:s,onChange:a,sizes:n=[]}){let c=r.filter(({label:p})=>!!p).map(({value:p})=>p),f=r.findIndex(p=>p.value===s&&p.label!=\"\");return ED(s,c,{active:t,minus:\"left\",plus:\"right\",set:a}),tg.default.createElement(tg.default.Fragment,null,r.map(({label:p},h)=>{let E=h===f,C=n[h]-1||0,S=p.replace(/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\"\"),P=Math.max(0,C-S.length-2);return p?tg.default.createElement(wD.Box,{key:p,width:C,marginLeft:1},tg.default.createElement(wD.Text,{wrap:\"truncate\"},tg.default.createElement(OW,{active:E}),\" \",p),e?tg.default.createElement(YW,{active:t,length:P}):null):tg.default.createElement(wD.Box,{key:`spacer-${h}`,width:C,marginLeft:1})}))}});var Z2e=_((AZt,X2e)=>{var iY;X2e.exports=()=>(typeof iY>\"u\"&&(iY=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"WzmldgG9bVwKtw2AiKrr15/TXjBi3O6p4GPsCmiaKasTbJt2D+y21UTTKAOXMxqqqpq6VIbMhM6nhTJgV91V/5cFDwSquCGpJ1XeWdjhTo079eGQs7AbMhPpEM0oNVKxWVSokGh1zUG1OJFHO+BouYdnwZE6MKWCZkTDEH/XOa63elQXHNewNtw3eZjOST/PFzqE15siLy8+9Pwl5wiSrGtqcy24yMtDbvbtnc6+SKLjQeHW8wsYF3HDH+mfwvahWfT13uhuqPbHARtcHABFCLFV+2AucYtH5HCfSPg0sVm+8ec1x5FggZBS6voI6fWF2RVXSgNifmuv/0ZNERTIsq4D3OVL3+xRCpTLpvbP52V0hXXqrhAMQ4qu15dSVmBI5AI7MVyT5/xv7+y/vukaU4ZnwuRwn4hn5d1As6UWYtXwXrV3/8ukdDu1OBMnIX+eJdAD2VdSuCm1+OVPq69f7e4FqJG5kPElJgbGGzLYDUyQHqruJlZh6vo3RK1FGymt7PHYsbWoLS3rsaf082OnA+jOWmb/+bwqd7VSdI672R2EYdi150KDcyLkJqaMO2bdiMKjEC1EbLN/SYfNIigs/ljpTlHV2m+ZhJtS9HWsba2FjgiYLuJDsvCvAPH9dDquCbfjlVUCu/qbvnTPDhYcX8D/1vx3uf3vkuYSnHgwBe0gu5bhtftLM/75W/n1+yZ31ybrQIXW8RNlQ40yb4Isl5Xga37U0P3x4EFs4//p8b3ZWRgCtEskmt7S9DtgVJoS3eT78Y2t46GDVLZrxzefAcfEeiAV3QxzMHfDxN0vDWw3R0OYgB9g+F5tVpaAbp+/dwM4x3V8PMeWYikddFcklIfn893+h4P7+eGT6To7SbNDS5tClDqDoifApehFX1SCp3q3jof9Bc1iPFbPdJIBRvehUcINBn1AgKjRbdCPfjT/6fNjd/dO1OSZz1PV1U0xgBbYKPM3Ya4FQR1vmASNHxabfzx4MEV/vz2+mUyyARbMhoD0hrbOhoiotl0ihGimlcWndUjlAMTuQZl2LhVBiM53foq69kP7z1/U0MZPaKKVd9KCFYh/SfIq0TVhqkIQLN203o/eVWAGCUYBfeGfZfEVqL154YYXt4BjyO/fN812PYeUt9kalyRymKXWuSBSkqGr7n1F/N/9e4gGmmQD4GhBM4YamXEy7lW912B3A9QBMGYBWc7IGBOtMSZINgpWSbpZpJls1/9/39LPFMS3mUJNpKUklaeTMSYItXL0uWe/Pexy89Ho5hIBkmOsufucc19VV1Xjo5v4f9GNcSaWS10YKVeaNMCR85ks2vv9z37IEml/UCSn4ZypWz8TslLY7a7uqY0XskNhlJnZJdwn/9/3pvm1Pfe9RCJBVLFAVn0JlL7h9+JXG7/tBEjpy7dx1XbXPWax+rz3nHtH7977spXvZaKV+V4ihHyZCCETZDQyE5ggDPMlACqBYtWApfo9KEr6wdJXR7Ak/Q5+6wogK0IsliJEsqpNSW2lsW41EdXGuN2PXs2flY19Gz/WrHo/u9nsZ72Y3SyXvVrOYjn/v00/23sf3Ddr2SPvfm3IDkFJRfMGbA6xiy5F9TXvzhxbM6M9sfzJsICkkeS17O+/DAGgGqlOmTJlSmw6wKpNl5Nqef7/j286sw/cWU8H5a4BGvNP3y9Qln1BBwPNtATCMINEApJEPPi+bnw7E3zFt7Z23y7ixMITTQIMNLD0vFB41eZwKoP+4Up1d+blBjlu0giFPH9zY8Ai2FNrWOGq1qzZLLOmj9BIhDE0G8L3q0osCmHIdU94WKarShKoBM7Qkopuv6w/D3o+/yfa0FtSb/Tea2UgA4kYRZQIYqyqas1aq2oUDUHveH8O4Wb931Ckh4TnXYEWQkyIAyEEleItjSCBtL7avv8dwW3spuaDXOkP0i3FLOhBc8V5FQww6HZB8AIT3E77h3Hv/P47dChYJEORiEEyBMzQIUPBgh063FCwQ4QbDvx8TV3P8/7dcwDpf8GCgAUBURVVAQZRZVUBVhXgSgEDrPcMDAzW1y3++f68m3xhr7hiBGLECASCZBFkg6hAVCAqEBUV3aTiZIOfrvrnvXMfzbIPGNBgQIMGBg0MrMjAwIospYCVGBg4kkF9qcCJdECBzjI8udm3JLZPkf/vLokF+hRgGgLDUAZQWleQVlUsEDdxr/Qpr0Qz2KZVZSfakAoBSsVsIv75RyhLwskA2/z/f+4au5ue/TxlT8IA0YmiTsHCyM0KjFkzcOlO/N+AxIs0Qfk9UFbArxp5km5W0QGc0HcqMcqgr+LK1I9eBf0Mmq/see0jsOJUuMguhCcf+1qd+5ZW75op4YvuCvoZ9Jj94rYKMTJNQjj2TXYPHb6XqZCwVlMG3jzbrKbWNutghn285871s3z5OEWrdwShnykkrOX+OfRknEF8d4xTQF80BLuriePXfUin0EnlXaA1eNGKMosEvfhya6R7WCQf+EQ5EQ3MNg3OGqqvGBFgVow+kkJiUrJXErBuR/NebYx4hta6H71fm7wuNmRaqkFcDjw7WbcM+rWA0S74PWtIhrSuAjWS1gOShuV27spkClYmhyA8lTySmUw0X8s/qFJvh2M3unws/vt6xtZaOQP/oEXE/J84i/3KJFoQ3AbCIqDUPFRdnsdAEiVziRyt11wyQAXJ7R9XP+F0sBe/77vvAAz6v+xaH/5Hv+SNxO9bZp1ePsXufZsFjvMnxXIm68xedh66UB45jl0V/50kJJYLIrxsukPBKJP0UccI+Hi8ky4Sy6VEvpMEMzwVqcFOkvZUfJqws2SBI0oPdpIaFFmS8TZqzSnX/uQrppF6wVxIpPgGll58oeL8Bo6V9cLCy03UTpzbkNHXmy3QV4tc1T9ZCiLZmXZXnXDCeHz/HJrOAgoiHAh8er+prR5YLci9jZwN4Pll5pfJey1GLJZz29QwjO7X9XK32nGg5VlqGWZ4Tkb4nsHSWahv9wJWIkbO3jDD7N7GQuA4bLbAN4l4gzIQAIwAox3MXdKQoZbKJ7eDlIOaRa4nq6B6jaHvHGuTXxwLcg8BRtSrh64NUXLnKnYCqY98cj2RhpgDsY9cgek8crLgOlmQC1v2dvU7QFWf9fxVA4wAqi4uI2GIWRv55FSyAc0iGrGhCV4IxU6MDacoDn0z9mmBVtGcQCbjS324rqV3Vpr6JG1t7dIsicL2utKK6dWBdj/1ROr/BU/WfvNYQteeTtAMubmB9AWes7kx5Wzd+H7hDJGM/uEAg3+lVghwpxzaOCguWf14LKU0mN139UeteCV4LCwHg8YX5Z93VZdoS0R9FjFDo4Rceown4BlgktP4Gg4a01s4/UgXTW/pYmLP9pbA/yjVr/PgtCA0/cuX5F36sJST0SekTuAmIgsjTLxKPgialVgEOycyamJ6s8YnoRWdtV69MDjNedux5M3CNiP3yWRvs9gpo012zrbfpTh/UwrvDqwqjGG76nblzJ1z9CWFl8EU1e/1TM0SY4TPyj4BgYRg31sNKQJUQxRSLUQiBF5Fe8WoopLTehXXr+L6VV6/9Po5KZJkH6IphhRRqiWu7owgURdk4tDsCEWX5p55EQZjiPwOwhhx+vGO4FZsRxz/z3AE62wgzq9HUIv1/szhoq/5a+MvFnp7MF9u1VduvVVpulrK/Pc5qWhygvCM8Ic7yO3QEE8Jc6Ne/uF+GHfOlsD3Wrm8rq67uzV3JJvoS14x27UrCT0i72U8DR+9V8P5j3FVjcPIepDhTufUi+SJImciDRVUj1GU6rU8X3VA4TlCLTEsRz9Ym/3wDGpvontKrI72sDSE509JQ4ysoIBmq6VVp8pCQiIvKUWz0X1UkubO1WZMLiM9+/ldJRiHGxlFdNrt1uNpR58fluHK5CictBrz6QYzm1DJf97krboSsqsDRisIu1pvN5ViEtvYMhzUnw4PH1R4Qb1qbGR7uKZO9fV8ZPAGI3NSyCqmfF+N9ZIqktqqvUTgRbUI4JybOCKYanylLN1wGtzUeH1Bb+TMeCpczNVJgQb1lpnLE+BFPWB5OSHTnQry2bvh8gj15FDwg4T8WG/JR8TTbFryA4Sfq6GZOdreyAzmiW2qq+FHFP9lfbBG9TOuA3ijk8Wwxttdp7sgbAZF8mZ5iXa6bYl4mtEyKSNBw2oy7vWj1Vyk5V71b1v+JDWVXZNuY7VWjDb9fErQqikGyzh2U8WvRHrJEknolZ09n/ovBSZeA63IVPTWvh6AihgPYe5prt1emr5/VNIPqazqNds34ONK7vSK7Rd6sL5Y/LysFW5yUBT+cGQbT/ZcJn32REu6jbplO/eretn7Hek3l4jxuWQCZyIoYyYkUBpPwSJNbl7IfwvWJHisYH/QKK3OJ1PihvsMW/2zduAk4x6m5+WB2F81uUYtYb5FJr0Oyppsdsh6p7d8sTJeUZoTHf+VvdESxeZhMZZi2syxaUNKDckoRr3XlfAG78FSOjCaj+aR9DFCRWtZShIeriaBbhz80F1CmF7X8u5/WqGfTRbTJclVYXmpwdeOQDcW8cthOaSXBwjm1aRWfYklfy6JyYaEO41XWYWyDmVEOO6TWIpgsn7w+/YEn45AG1r242i0gPpZb82uxPv/2XYzR4CSezjvTj8efeNVMFFI82OfLxlBijcP0GVFgiKX2Az5ljJ0QUCJfzmokD4FRqPfUhBBMWe6svtfql2NpqTOlWdfGAxL8zFnqVb2M012IDs1qJSqxRyZUlkjpkazpFB//K9e0PinG/X9v+aBvJT9o3Pv/Or26er0brYKyhT2E/rJ0eFvi/r+rv5SolLjE+n7OZXOaynWoti4wJbqsXXrn6kMqsCu0TdfxXftlNBnkgoxpX4Ai96ThXmaVAliWBFQuk4VOWYZa0YLIRaZz30GMzTyUEWJSqmmdpbjay0bkMaEb4Mtn5BvjKHCNsFc1XsyFl2Z1aqQLmY2QXdH1a3ogmjT4uF0LgIw7dCdio1eonRogRUEaTEWB5mxGKWhVmntjOqEyBTxNDL9GBtV0WlISmRtXwSIM4yKEA9eJIo5LGpFYW1upPDpqMoJi/doIsY3yWIpfj7xTE+D5mshpnElIDRMlmJvBrqLw/oezdXReWyY5zoYT1YufC1fZEW9pi4oaeaQWr9yUdlkXkJlYSqd6FyNSdbJ4K4x6OeX7eCKlfrOaCOp/ElKPNorOPeF9TD9eTHztnMrGeUGiRuCgA/rOmQIlWGWt+6jFI+4yNmxq86Lc3hNyCFljGYYgI0agjCZ49uMhUcGNOgCayjSc7AM9g8tEwPb8rCSFG6UvBO71WJTnXSUYZhqmtn918A0qfhO1yZCwxq7pHgvKYVg5kB9D2pz47jHUKXa3rI8j7gr1Tqknb4d9QFOyjOfMaOs5vCWpe87VF6fZMaLgYmUC90bSyhk74+k6CfvF9lciO4PqUe/wV4MrLlVUrdLwDhE+4g8WPpZFIoyu5B4Z02Yt9MNASGzjaqtVkd4R0Z1slBr6hV2/WqSg5X6vVQJA8WtA0msjtnNJVZtFZZkB2NEEiQjpFVtpmxUP6j1JOcr9d90KxYDbONpJK9whCyjfTIUwbrWqdkslp2JGvlmmW8zd+adLsywpErFm3PJog7WtFt4Ptk1lIoLZzsikuZ6son7tbgdyVvvWOrLnuCSmbWvMc+forl/ABu88b8f1ja0GJN+NEfk44GiriweW8hmtxxxavWRu07+NtvozokuZTU8Y6agyUyWeuTlGy12I5TMxd02onzFUiSbfrQGN/PfOEBpaopGXTBH8or9y3iuKvQFJ2DsLsBCSdBj9dkllfqzeepgJAOOjAYLd6ZVhCPupRimrZ54LUyZNnk3czOh2NRFV+2kcGfjeKccL5OaKp/+diQvL/RHrg+QoRDC95wbJXsTQ4jqhixBJ98KXzzUUrOgEHPxBGtLIWGx6J8qpO5rNgGFHgL48pooA0J0P0t+RsEYhQpKpc9dhaVQVtAh2whXL6FxldoZxAlmBmOp6xsABasN84zlhhdrx56loBTp5PP/48pulvxmYFcl88AgCkO/HOu4AZOsPlMG1/z21oibCrILJFusUUMbt3A3ejzakQ6gFLM82ZE+RTIFTnkSVjS8hws0ykUp6qRHUJM+8zGUzEhdOuShPlMplKxd28o2Izs+iq+blcloK1/q4GcX1WALGHCFZTeFGu9F3Xn9hsubvkTbz2hwcutuGPMzh0Is/+DK1YAnOcWxM0CngtIuKUNkaTiC7ScqLOOU/fXsbmykufFG5ZDkCdDp9yQ3RnIzJGSTSZfihq0HBidy8hdWxe36095pwgPx2Vj/9N6U+IWT9tqODy7KAXWmK/fslktPJhSXtNe3AqXvQ8Z+N38yuGoBPQuzRDR9iMa1cizoLTJ6XMuqr5xOm0ONYpYA7yxcw0mPXRpekmZp8bPlVFkH89jtjlsXmEM2MTz7urFF6RbevmqUHArVlUxu4YsPwBpL+/tGqyZOET/FvD1iUCeD0Zf6mLAh5fN1WWyQtmOI9gxhoAP26VNNwU3xe1H9NszbSnefpJemacA5psg5ACs6AEVBdXU5AWbg58VMv1vgCebXbCnxdLxWDjcf2UH4pcass5pKqKALi0iL830ZllHFePsL15XEujuJwk8aZxY7szFY3ONwI28H+S9PIH+wIvWROFKOmNB+ZCSD9tmUzCXmFSt4YRvEOdjWQvDdNkuUb832W+r/Z/swaHYudI6WbYXqjWPQhyl673Lie+/jZCtUtwk0OLJ7Pi0jTH57E1voliImhSjyG8vRC2hMfFpeXKJ3m1Y5uWbduvgM0ZPQdMBCrMzQaX7EEdm60AU+taUWGukV+hExLgUCBfnF64fBhI5y3lKNHIk4xZt2zOV5Sh75aHgKlZaTrTrDf/MDEfKpq7ueGzHCiG7tVFfUVWasaCFDWNc6L2JcOLmaamawVKST7ILiJ4M5UCxOtlr1PS7o5MOnE12lS6E+zyliVkHAwXSzoLpjR18dto+Fj9dhdeb1XXyp9zjWZrHfJN69NCajWaDTqUW3KRP1te2PgGjrtOusMxeh4l61ZZWrLsbirsl/Muq+rL+fazFc4sFxpDI/f5LaDOAL4CEZTLEFkD0PmMLT1UYqZtxOyBp5dknE4pJE3QEqFubBFHLzfXTs0iVyJkxjOLRJtU/y9ECtBLj4Ci/QNnrn6GVjWSep5rBvUHzInC5hPN6fHugOhbU2bv/7ElawutTG+03PFTU/acQUY9aL0sf/PxR9TGPtufInh8t1Yu4HM/7lLT+qXIPXjwvomTro+jORQ4mU5iHNsCxgzBlXl4t+3GLxh7nW3LCGbt66lrugm9twA3ooI3aiY0qan1nl2tXGJXlw5SbQq0cemg/SWuXIRM41cz3zWZ+/iJfppWI6jFlagPF/EjIRbMQfHwCVacXu2zjGDs/NOxoiF3AL1h6uupVGGsNyP0HCpj/qpqC8HK5ag/moKN9g4KoA+A8XEyFMokQmysfSEJdURKvWjc5YccPQd0mTUJtHKJHqjMxs293a3IEDuNs/a21eVRsHlznTC7z84L/xXr4cfjrpzsYv6TI1Ppcs3/offPI3Iw7ooyfXmVfehwbRVTjLhov3nnN2azUkzeW+s77dt+UOPb1Y48fpNlc/3O/COx25vYfahSBbb+4NlO/BmlSP6vO46QxfLrhIhtPv8IJhHw6z7JDd/IhgcBcJ2XHY4j46PILdJtjw28/DF64RuMqfIjNtvunMGMujhA9G6BDBaT7ojNyVkLkbGEMag6jCXsM7dL6X1NMLfVMATNZobijsTo0S/jFPZypmmy9uy1tPism4N2rNih8tUNK34z0zCx57iAguMmFwvpTzYxNdB2UZyyZh1/y57PAeSLV1MMg2qQzcL3unqMxUGW6f/2uvX8TyC78KZ+ZHWabSR+hDsKyoOqXSe+iP9r9fBKAsYnmVhhTuNNFCZvJQr3VK7hUpGuMQkphh7apDJN+Nh225pggazJwxcDbZkQ2Jr/HpPiXzQLIX2hV/OKpjEhzPYcIoRZMr2/vGx0mPGUes62mv6VRxHr2aP/ZQv0uiO2laHzDvfl80ceQO18GiXV0PeHIOvwu1ssWdeHrSLWad2fHNeFu8/OGKxrkdX5v7LH/fHgPXwQbpHX3qeyL9Z+SI21/DjWpumVyMCcqkqpOyHKYgi/kq6lqGYHe6o7WAUHKnQ1b4DBRaT0aN6vRtSjUbNCYuCiTV+X4mLsQZUvHQ/Gur9QTZ+bKZTtLtKTMeNSuMpB4jELTcWimnR9jNJwN4h/jAvZ/gXvTUwFRpJaHyo1xPTEaozShJXF6ocIV8j3/+YB81zOUdtbmT72Zf58nEN27WEyI6VgfnTMYNJFfHi2s8+Saq0rxFfxjMlLWsfveuzD8HZK2dEGNIFYODEvoJYtcl3BxANyQSNG0qgsm1GYM7w2MFGrXhH9xB+GJ1zPloO+Ct32tW/Za1WuhVPA63WhtLzmw10I6QNhUAjZntgPKfFmmdURTZ7UoAeyWBw0Y6XP9SWfSshHDM+xmDfWgAZg2cg51uyLSF6GDkDb8kuN2L0TE+m9pYfs48IM4yKbsC0CAv886A9X+m9lu382jsz5tpPSfhRp60F1+Vq65UZM4qkUatyWO+lpv/mjL5SZtFkDJPdDcEjcHDMd+vrobLqVaEk/XUMFoz6UVtGgkHqNJmMkf+Kd2h1CMzVQ8F7EfBxrQJYjUeB1FgenkyX8VpA5XZJUfKytonVKWVMTsJjY0AduI3gGS5cA6ya2NZsnqqHo111YTRLNxmo+CIj7S3r9OcXrTWOFZJr6B7TO5qLmIIzq0mlJ4DJHM6AGaV0eSvnZYxDCGoqENW6m/Ervu2ktAzV+A6mLWVE8EUjylqZZbSYinNuW0IuIq5L1wBYqr4Bgh27AoWvd3wrbaIdanf0tE73tx3mhDpul1aS6Km7+8OfUyNAo5lwyZEu6z33BGd6tYOfPvVugKsC7lyByPf4iF2xEdM+yJia2shELvLM4FIpxHBndiyH/s65AHPu2/GNTbCdelVRCvucl5yufVMvpx76fvpyL4qS4x5GDd/Dkf7OphM6oBsbtH4GSD0k/9meDeaG8qkA2tYCBBf8CnzXNIhqn/K8zcrL250wlnsvyDCU6/zH4yn40eb/3zrMv+lfvcZb4ax0+PpMEUGt5y6XPt9TdAF2on3UEJkxgTvS/vIUi+JIyJ1040pk+SU70ddIq5/LMGZR9yY2+B6QWPS3+OyEDlZ6dWyIg0szYXO8pnZ96klJ6fxz0tqWEbkbY7qH77V10mTb1wGbiynEk2mH031lut5qDe9/4+LO1bJPbnJcOgTm0NLM9guqOvbxkcY3/UBHFevgJ16Xm3Q6BrOkrvUUXIwCxHKZ7ud1MgekWx7SDjrVN2FzRNuODJ5WblfaohNY7NzbQ3kxHsy+1vvJ/GDYyl+1eER4Jg1rHOQYtHnxf+CwL0frCtbnI4e7Ymypv/YJ+yTIROauCSfraOexFuBmi2c5I4EfjDc6TjmxdOpdgkshazMUqO0wNMY669XXb+BnENz1tK+cTr+5yyEcL5HTePILzNz0Y7qnalqdcZPFSZCi24Bk3bE8J8hoNl+rsg3RlS667EIyWq/GrjoS6cFkpM3qAXoCpvcsgzZHpFmJVA8PTFCe6YkjHKGp5VRX56O7csL/R39wuQ0+HC9e8Pei8nlo7Zt7/wDjt3jvd6HXBlb4V0+vcEH5I9BtWS6q5R4Zm+/6hba0yPqZrKtvoqP7EeRfCVQU6s2GB03A8MbAx6hNNKujsCSTDOaaHtZJeaSnB0mRt8usUn/+K8XtInlMmJ5nW6cBN2vjDAKdYFFzNA42z15P3pAP/dTAWr7gftpZ1ZzPLW3BRZ9f/8E6loAwH90gvqqD1VsAZJaFCDdfnVnPW90xqA6j7e/bmNwL51a1jlVr6LvC8/zScudCJx9xYs6/NoeQwl0jyLsMjh+SHxuKJfOhTALDoVpJoU74SriZp2WkRvVVhRbUEdpDcs441j6UayT0A1Vbx0Ql45CLZqHx5+Ojq12CmgzO0F4iyzwzTFpksjHsTHS2E2Jim6fDR/+B1P1A//UkRSO7t2L5lQHxfsPmmnXvg15Drfa8GoPFofoudbjbS8qc2MrjYEK97cgmUP1vKsnqWdLBnitCA222lgEOBzQ4gIFlWhFVBKX/1gx83qhck/h04kD5wv7avkM/ssRFz8D/dbcjxfqtYpawZON9m+PQNDBLin2dqy+dt5wk9JVUxhHul2hQVjAfCDyj2s0pcPk1NYRc9gSRb22HEFrq8YbCqvAowzBk068qkCbrGjl9h0Rl4IBF6+Qqbxzt729FoVjHG2n2WB913QwxZVDbUHDL4udmkVd3pv4ulQPbzg86/OYCj/fbEoDF7+FfKG7j+/Ki/2SrpOmMuH6CaActgJB/ykTh0TZ6+pf2W1OGVpBxKTnLpgIX15CKBy04Le6loLeFiEgrEMpE7e1Xmolc7q3sTbmg269GuayrDc8joe32gBjFT3H615eDIJlpCmUjYbmKfo0jgmdWm1r82VPZgmG2ReXv/KQcAuGNHUm88C3Pv5BMuEvFuux7xeo/e+cpNW1I4pB1u1D+SwgVUY8qdyqHGAg4nFkehkJ/3NyYNfrtpbTUP3UKcn+cJbNR8UUnF9t3PCfJzdR6KXceXCi7Sj9vqr3gKvSuFsd7ij78iCxu00Sb6NF7FEUBcK1otcepQNV7/yHVtVjkhTRICJVtGf+SRwJdZq1lSOilCOeSG97GP1dRESQsu7ADfkZ98SjFiDmn7o9JGatahUAxbhlwPnV/1B9QW08zPmVs4DClelXyvPI5poWYn3VLlcv1ZlcBOs13T8o1Cf+tm880oF78JiWeLrW3gb2K47PNHy0Z9t6xw6/YlA7SXsl363hPZ5kiCnZbBYvrcjr62vxcFFsMGy7Yf4yF9/o6gld47D4eohGPrrwNf1W1yXLCWIZdaKY2choRtUOlh0M50fVUz2Gpwq5Zlyl7b1yA/tI3+RVFS8j9JpSK7zjx68/HuRC7Xha3JCSArbuKIOGh2HPvlAoslZBNXYaD2ljFd/yru54d+fvHWauX4+AYmj395EZk+WoUaNwZtq+eif2Vjy5Hb1LcE993DIom3DOzTE0Lf/RHtracp8M/RGMuxYho79QOyPv4Ibt6rg63TeDu+5IH1/X8lgoxjfbuwu4eLcVJYbyUih30sil3LaAKplTHYF4H/m3IHyvGHd95X5xfBF6AQkOMx8hlsJU3uWaeoHmti43WX3PsPLtAju0KnxQ0fudxNPH8fDWlmVwymTDHH+A7m7RV1IspWemOdvtiLnxf2LpBvTLYLzWL+OV8/H0SierBsPjwkw5Ao0+c4AHscZa6xNOmUp12fHO8OUpY3oOnjSHk0KdF8MnefMSe/BUUs98lHGIHk8TQQHL48jHH11FehWC/JZjb/OvMOLdz66yN4rL1EVYqx7JlUXLRIxPHeNkciY5SkdHIOFIGUZrh7GdG6TAtqw1Wpe8+85sAcURVWW1gz2NSwnFAmBVG4Ig5P7yHiFJm2VUy1kIIvs4pJKJBR+3cBaP1mBrSC6AsCYuCFg25N41dmXxAYiQ90FOQiaAZ0YIiogcffHaL0v6rzfjv9XA9CxGEZOJUmZFHvu3mZ0jZYY4x6FkuDOvarQPArw3mz4WwLyursIRNnQFdquoc43o2K8ByPRWQso8iQ9pYQsIB8VHeYjmPtUKF2XLfBsRU4wDVxKCS4V1fvfvWsc2ocpLDN89ceNGQrtg9avAHzHQnhd9vhBybyXGDujUZU5sg0f6qgwitlKMvRhJe3s7W68oaKrkIKBvbtfjoKHZkhgDvfVGHTNhqpA/59fHirGuFRnzRD6gemZGx4kx5xxJmfEMll1mTWlFBsrpxgwUChrKjX5ZcsROeYhSnpP414WVYaxZRm4tnlGtj42hx8XQY2WIbrpT7B91AzlUMjNGJ4lhxFnWiFcNXk2CDOYajsiRkVmI8KwMEfx1fjieTtXuT32rwbCIgKT8cipvnECePeJdg1eXIIO51jOyZGo2YgXt1yQKbh9+2eCafJp7bB4AfBYDuhMbpWnoyUZ3h24e4sg5L6RuoYn/5eWtu9Uqn6vZUKwqT8SXqwHYs2SjNs0H1UWTq3dpezgDMiMEbYUP6V92w6qyJhCNY8T+sl5XyIiZvAAR8jadA6DpQ/n0yyH+wGOIAkyOArJEs21uVaLI1hstjngPIFoH4Ddd4I2PfyxTizjyZIaTknD1dSJVIOhC8Wa+Ja9/Aoauz9D1GeKBukkTPMK2AbeNTCEyK/DPa1YJCNsG3K/YJzI1MO180vmc81nnoWO5vHJncyRQbJGIsDcZYDs0iwPAWyBIL6LIJ7z/0ixnEu2zg82n02XWdk55kkR0q2l44IAv8THRwV7TXDoyliuWDujgCdzuD8GJ/GITjDnP90XUdsbS8T0jGhALt1FM/3nS8ktJD6Ihn6Eo4GBQccJdrC3oX+z9n/FSB1sfeSGobRhCNc9sQaZXgh24UTA2WSZOBsRSYzaigJ8LmrFLZObxBOKzJBCdK4HdOFtb3QW2YQC4uQHQjANrZ/hjsK3V5NpthaocmbkkjSObSE6wLtEwIWatQ1zkIW9MDhGswXOBRzgaRZ7nJNT+I5EsxSNlFaXnQPubaAGpvv2B4sl5Dfz9L4JnTF7qZ+F/88czg1n7nItwIWDMYvE4c8h1qxm8/oHI0Q2Qs5i3hmcioc1TdjfvYHwTNX1LmPoGnbIhN97kvhC4F8p6/aoleOiJ2r2s4mW8N4dfHni+Q4rWRwUbkC0s+JjloGdQ2UWk4rsxQLcJHYHe/cnk/KO2QQz4zaj92Sl4nsa6o+2vL2VUvO8BUXQE9puNSv68faMOIqIWk0VZbLUSnON5lph2G5YjVVvgc+t3fqELeyQXOy2+wmvHhE4g/anZ04/XiilOlXZuqxSwR1BhcQvWKVvSnNbxhji2kEOmUM3gqppsmGdSMZuPrRCfkSqK1Y5G0OK5yoiH1m11T+3bjJmN3tzYVfHNiiU3rP+N+Scti9iOfbZX4fxcf9GI+KWLfW2yu2KSJDwJL+QB8WG7IubdHvmLRvGOsLoZKdsg+pgrLMjvQLFsKxyH83AeRrgans2uyloVJncUvzi5pJzw/yZH91tGY2ncFWZFzuJy8iIJoAlJfcCAGU/WPZtw8CCx9IgRdrylbbcKo1I2A/62um5HpSVGQkGeFrpOtK+Y+S32OxQs0SChEQDhssDWNJzoz9jsCZC0ayMhC+ALpH/hWvvoSlYYMOBSNpKqFHL6F0p967f1GQUDMTbdRc5WNi5Uyt36Py/OlQbDrINyiIFxPdcaGS/I+tZ6GmMqJFHVBe1a7/VlX5P5QF6OAx3VMdFWDxQBipIbbPa85jYotfibFmjbReaF0VFS08bQ3LcHlKnCDts3mV9FyA/VbSilPHSxEVFHKbE/NiK/YC1bay5fHk7qpOsv9UjDVsDR2XR2ImLqF6bGokvt3VrU23eIoVtl6E/H0G0xdH2G6s7A/sFs0CKR+V1X38EY5H3AL/wI1orEpZG283JkqWoaDidmv7IGvUjIYSJ9x2iy4Qd+ZYxgrZiMGuo7XeesVc3G43ztTwxyJS5hQV1Je7I1XZt9B2+CCBxsex2+/bIH9VIC3FST0Tl7WjGYncohTQQWiZxO5sbCuXyvk/HRXrCUwjvKYVmuu6jSH6bdEe5BxAEF9IzSHLRdsb4r/nIKz8M6DAb1mR7/OfA+T50+82YwYeRv8WifsnnR/jUpw+DPHAXWyVG938Pf6w0i/qnidWwvSeSjPFAZ9pSYFTQoVkHkwaCtxmEOzVxVbe7DKn4l3jpDV2To+gz1t8P41XcmVlkZup5ttYksVbXV33Kz/kraSX4LAGhF0N9RRJ4shbXT+Tbna57POa+eWw5P+VuYah9PBtZZPZh9QAtJAhfvjgNbfrWDZiUJHsJLj/+hzBR/QhBNG9FgeG5x9Hcv6WRAsY5Qnn03+0/FctcHNXenGNNLrr4raDHhtBkEbipiKl0uPwzg26bxCaXHu2ub36kgx3Ws9eXw7rFFwUBOl7ZjuPEF/NDAU0AIja/HPYnTXQpHAkoqSOgBd2RYOslEpvtHVvuZ19Wp/Tj3Phf+cQNIte6GOg27H65W9SnjSG2wZetcP3ld+eol7uej+CQuGx29lnMQWTEBKtXEjo544NEBgKoKDNssfVq/gCI4iU+T/8QtnDlbVU0ZtnK6FUZyoGLQTHt7KBNmAJQRFDS80zZRQAR+Rv3w9xclEIGaC2O/0Xq0mEO8rTpypE8zrMclR/ug03hESV11QlT6CbOE6CN59AxyrnkFW9aL/OBV1qq1nT2VUPKUwzYxolaApmGnZW2dlC+mpGuEFbrpOuhWs7QDSdHjZm8ZS3N9EQO5wWzr/XCIprpWZeAhurpZWdy+MsYNg3I4HnIvxXn6kqGfEIttqCmlGmZf+p36iK1WrF38VB8k50e3Zm+3VXQMlZWdxOCOOV9Rn+5yc9HHtT3PzRuhMn774wxSZDuGG5PwxubzFVmsxo3BTfnPL9M3dEhtkmL2uuhdqC24G8CLKHjmrHIe5tLLl9JrjGPZG2ag6783WPnopYYeGE1XVgDwBRHWoAVDN/9+YrPaJ4u7rufZWW7Y8Gdia582buq+uf1hUeJAkuwCFwwpjRq2cMHtHM7zusAbx/dIQW+rAjaSgd/26kDXmzOO84Z67iZFF9zO4XyQ9sreKLcCn51DaNz810wT3gQJtz2cF0ZnkJtx/Gc/p3Tz+r8nYPqx/Muz9tulbO93I0OzZEbDFX54jhD0U9/EApKI+Dc1d/lSWnRjwW/KKqRuxRExKX5lcr9oVSIx1K71y3qs4NdoVT3leYUmSbLB4Se1ADCWr7u2PEq/LDCGnj8ByGQpo4QON9lmjRamflEYj0eyNlCFD6afu+l5iV3Ncw1ZB0p9qaYMz1HiyM1X+2vzmNx8PgTi+JU44rNANz3oV+lj4kvkzN/P4ttbPJUIDkqpxsEFvogcAHFkxOadgNoBrFaLfppGSRlWLSBJmg3xTcck+I2jQNtiGMoExKt3ZNSIDT/59+P7ja/1+NkC7aMA/OaR05htGsgRUJtk4H+kCbqDYw7I+6fXEmOyd6ej+5pa7PEn2XNDhY70a/Wvd+n+Vhc4GcU4E9+k9/zptA8tRXbG4wiZY4HPgXtkkMYaJRwo3I928ZdM8zEw+xcJOJteLMhwR7yRcROvBv1SMXgzsD0MJ0ZWjHCstXR5OZmdB/U1rhs2NVOPRRtJK2r/E4fWr6S2JxTFiCGye7kEq6uWTZYjEm6bowGh9fQN/xgho7P4wHMSBxTI4HoSSdvogOIxVrsPln1gJ/b1VUnSC6kzyjJU3r7/lPh2U3yS55Sng3Hkbr4mSOnUpwV432NjqF+YIWS/kAAQ5TT1fOEL4KBXR31HQ3tLlmymrxwHUhBS+pKxFxrQ+mN1Qu5rOIFfz+Lme7bxz9pzqnrK3jdUPifBQf1eDHfpeLhBcnY+d/GCemyLcnxFL4w5XFNkzcqj4PgD9CGRFUuMVLisSxkW3DpWfsNzr6JxDUyJxUbZ9BRkbiwJdprNq2swNQlfz7ISKwiFySF9ktPqbU1K1L8aGEkwWveC5K8KAbllcIgYUzE8/qf8etOU/cUHOikAuaZ3L39RCgoefUbEOm+OY7P8OlWE/fFIpjOhOcyttbYOAnaIWDU046Gk9lmbprP4/O3kwLbWGiUYmfsPX/WrD0S2gqzr00TImNxGtU+ncaMMXYmh22PoVhh6GUP9Y7f8MU1o8djgwRaDEDHWf8SwP0Yye2nP2oEAJWPOU8/8QJP2A/1CmSDWOzHNf5aTcAHiLQvVP53NXyOKxBavGoOPrFr8S38UwuflmRAj59QnaNtVCVKbQWDCqMnQpPj94/mblhJ5f/MCSjkgwb5/PX8zo8n4mhrgLgro8uen9Yzc/WSO57BXgnpZqXHPxTaJnbWp+J5RzNt3b0rWTh8grR98pCP5jW/ZB9DJ3j3Keir33Pn1JqvK7KxyCXXTP/alcBHd2ls/vzqfH8rvZ3R4VMvZ2l4wwexWl6a/xTN2Go9JxbuU4M+mxHL/pul0SbYnhFNJnTiIJ6D5QgK6Km1dh2ZWn7pm9qwtb5BGktaQ0e8YIIfPU3iJwI460OzF7MKfmrZ2S/jW8xvexbSnro+EFtzc+yRHQPpfyFTQM8UijJ5FIz6n+06USjH4Odhet3gwaEket+xkI01JiOXhjTh6gYncgWh84fmgqCFWJ/hdPBxDq9jD5LdPwAQPWrUr3ffIuvrlYqrSHboyBswh9jvyNc/0M/bN+o56YEe+UVs/7/gtbv7qJDxbaOCNLUf+8wnl6zkMxLn3xGuEERsYNSTBytxYv6oXJxgfmr6XVjlhM8H7FqN9ABMkQ8zNCdyHFu8Va6qT0pAZsvAgahoadcozdkXvK76dTuRXKnzyMOzxwpBIiyRgTLLvMZ4ynfc4b9+BJn1J5te8j8m7F0j3CkJxQEFe+lBsyoL4/WkJSfZjzSoamjrDAGHvHXqDgltOrj5g3eZ/vXb/gjUag6O193vr969gNvmwL2ZqokCUUzb4yvctcNboOW/A5mT60seDXBtWEHCxchQ0Z0eBY9koqC0VBRFDtH3SvN8UUqL+ogeJlvvjyLIKAHIrIMYceD3h+/XX4MBfnJEegSTbP07fX9RFSja9k0A/z7SC2rES3DzXdXW6Zbo9ugpZHoE/QDdU9t+Onf4P7pytBQU/rvZ9ZZr1TpRXg52+c7YWFPx+jPO6S7SLqyWvplytdrXGVfHKt+hCv8dBPySrLrAHa9E+EPO9oyFvSO4GdYmWKcRJvupV8/wP/pjbcIE9+Is2AjDMCeGK21ValvDXduSAZ14Jf6iXHfbf5PaBTEKzP5+EP8xLNpluIvmWV2OY71Oc0rRXCe+Fxm0D8bUARcMZCdZT7FCXlTvqh0CjC8HKMhDImyHg1ZBpxn5/CFZo+8MxtwkAHGtO+O+/p4qGKVQj4dqd9RcX8A8zKDm0uJrOsI1Wyr0ycPQ/hM3PyUhntxtvny/ipbb8rgd/7IpvhfgcS3+atsACVVRBZUicOXOAFmKxPE+Fn7uwY1UOa4bIBDbpBTcyAPqLX3iA3I6O06+kaJUQCOSZcFZIYmrwJf2JrPbFolXySWDxB9tdElPwpXkhbMSk4/EGbg7nWyskFmYmv9h5jclts/3dD3tqfUq0eWB+zGkAAu9bGy2SWyVxydO0q6t7FU0XEpjuQ+eQjIUTPWi04Hecfq+6ZKHzLENbot0tv8/PhfC9Rfc2D9PgfraALtxoMA6HHn0gWA5hvyiFy46jM3LZk97bzOV4wE3ZLDXNET+/CJuNUVkpMVSMWyY/dfvItGXssbYRyW6PRyfKIl8wDVUukJG9OeMQ0tpYdoNPiezI4k5T1S6AfEqoCXGX2Mw+WRJz19iGi2lZ509gqODtNaElKPMtzLCrZIybi3eojIIOw3gtpIsdliXzzZzXXspTR/LFK+mhk7oDXghllfNt1nszD6nYMvw9ZSKf4aun08cz7+SqpRn23EuFIRvvq87fa3KVztbaDjObi7FEMheIUb8cNxiDofaWj8osjUFqesSw06K2wBOOOuc0dpKZu6QWl6HaZ0U9PWDDF5ThDXaTkrCJjbOfarMG1d9D8hZpXWQP6Mva3pkWJoFvTUS8N7ctagRaluCmAPYj7HlbIiGkfJtLHfDHDGBrdm/hIjCX4ONLvX+Sg66UcGnu76jdyXaR7TjkeWdwgLu7ZYIa9e64sqrcYxG9Elskg4PnqVsTwqUVBrNKCSmY+muDZMIy8NR3et7InDUqtwao6uJettTJGwOP6kHYnWpRXakt1ufTQIfFw7U8tI1kJn7NeG/vz/LSRFtwK8HGp5IH2aGSiHdWjElnL44rNQ4cyxbfCtqLdzQfM1xZV+XUFY2JYL9xzz17mbEYs95rINyUttm1FIZZp+rRhMWrlJ+Sxb8+rAaJLHYLvydyg9gKs9Hu1awlKjhyIkyhlyoFiIs2zLe1nBLgRLCA0XD3T3UWXtD1N++iCEpheDwgpCuKl+Pug2117wA9yXTzd2ZJeeLZF/26aFEZv0svCmCKWarMlVR+pBAr8NVw4sh53JENGOJ+PUqDleEYCfThyNxvVcgk9kcNty6kbzMNF+h0pawwF3Ou198d6WzIqpqTTQuVJmKnTSB3fW3l+Furo/le/fcBLJLhG19focW7V7vcRz7+OYcd8h/nL9Xb2b3WrhwuUNFEt/3ZmzI5nP1/fw4nRN7k8m4C71tR0/rVJr0+IenVCVpWsHZWinCWmHnL00LJ/7ARAD1uMs9w7f9iZDqI+zqC+kTiUI6J6aE9I+aDo2emVy4LhkyCoGZRfvWHklj3ttL2lZQ+ZM2q+EXsJ+ZHUEoajCdFo/vKPDuy40BqdUkRU8b8QG1iKvLFD/TInlHPtHrc9Q9kwJRjfWDPuql4shpuLhVM26zVMMCSx8lJ5bajkmRk2GOQ5Dayk7T7oFLJRNsu7KkEzMEMpIWIKjSTC6KeaSI0YxEQ+K3EQMaQ5AwL55Gg7SxbcTiPiCTu88iVAgPl+ljQsFFVkMQeIXrbfTVe6AhE24SatZTUhttlW7SUwV8g5k7IYE4W5VVgUmbbL/HzYfmutdtj5AG75yBzgpyNdCTXLjJqkg52YnjhePLkUzFUKJKat1Et1jJv0Ql7vOypGboMgBQpU2vEWVP7zZaVIkHXVkqbz4lHeYiKxoylVwvvB58JjPUES67oiI5VvN709pzRWuIrL5cca/9FePN3Fzij9/XUfAYg0k4AF0I/5VlbH6pEkCx3Ylz6LUs8P2Pbu/OF+AOuP2eIjYNNu1b2zWBLvhDNX2XzUHeHA3jF0U8FYpoCk5+S9OqfCQJyYeJYbfzvk1XZc8X8Kvf5NIsPzmdyhuxUWduFzisXiaOrRfGh9fafWpJskylmOmE8kTAn/5qP95Kc0djX8XudgVYh6Uw3mlLfHIWNnK6H6O57nfWnK6NPEuUBuawv9vsmzvJ63WPcxCGKdKQKq23tz4FV5Zw0LvSk/f3nc0TdjniRRxXeSsVDp8g240xqVkjf8Vl3H+XFMRxiTlmqEasItvPIOep4NE7ZDqHXWP98tQP9FXVW+3BkA7Yn4nqY2nItkufOT1xWgw8bdzxg/Ekt7rMl3Z+2h70te/t5V39oX6zOj6YX1L4+efGoifd3X1l16TRbm1b/EkA/aVr4minKKqRbCLj8EJN92iD9cqNu9SVCIp5PsCCdTlAob+mQXqkmQ8fdsu4ZMeTDC/DfobewJvwpeHOUfJ8fx/NnIoL/Yr4HrC/uJvKBVwlx/6uENPv8HXoOw6GEFvt55hQCvCgBMoVLeE2E/PrYO9ZeUqMAMbrML45/xKCArkDIoLJXRxrUg0dujaqgs/Yq3VbH9ZDYYOB8RBDqHpTNAdDg+RzAncq1Zn6tJx0zQKZ4dKZARPPObk92qVR4koSPhLRWmtED27+EpMNLG+ZtAbOs8rOOStDcPx10/RqiMzkQrS+JCGvz/ROR9De4sI2flUpM9KXazpLWaTudkwPtcPWoY5LUc3r5Z6fSD1yIjqiaaXzdoZwMeNQfm/mrKi/qRNz0HtXbcoN/TKt1GRhmvpkdB5q5GGg0Z2c8fteiRFWyFTEU4mitcJAYpVNqH3kwVVsfkRZPnNN2EJhT3bopfodXbw8VpxPaxlJP8Ch20lhkXsvhQ+W5n3/FvJZ796eo+NicnVuzT0dO4FC937zlW3/AYrfUTd58OxwdzREdb8wdFH1Xa5GoHT8Ni1e27+whq9pjgPuJTowpg3Jdu9HP+G6H+d01ToKdFJ/DGbBBi/CVFHA4A/bWxYGbQHt6A19NiU5oBlkUrcnaWMOMKbfvY/oLNkRlI/ywf2aBBdLjAC1uGwDSPMD2PRp7EHch0k/u+Xjyg912+ci7QO3g0wjWJoFNWjKft6Yx99Z9N0nTeF1nAalOKT11meQgqcHhI+FsJPpEaVdrOXUREgufgyCh8zXu9zkY5PYqB4gQ00sUIfw/dFLMJ11TJBQ0ok+G/CM9wvPQoJJUGAJQbifP5hLh5iqhwfozrqGzYg1Jz+5PZkc7pp9CIU15zyOP5h+BdrKpyfEehXLtYQPh2raD245vaGOW/FNbdNBwjYeWYY4/WhlWfN3snBeIB8tZZjPM+GR1nPnpJnaD2Tzz9XgxBh8IKmPfbLFEgxnttvCMBDLPxHUaInDNYNloWxGqOWZ7+fsj1HPLIa2tykpphjs4VGAO8RpaPoGViY2UQXEhh6/7cyQCLg60wPYuGCY2RF8eJvh0GRbeytZECzlF+uABX/DQm+zrgvJ2ub9k6yzeWhhivfu2IPr2C6b5+snPvxzdFv1n808pgJ3++rUg8TmIoqv+MeExyvOGUxEo9NkDODc27StuWUc7SkMAWJ+ImKTh6R7ak38Wd8cuPLomQYwFUrvsq3euqZrOJY0m1oF32Gq8pL5bHQDbdOuVrF/BJEQHQ2/CdevyNZRyMl7eUt7muyuRVxx9FeKyn3VTlX+cWtdaUGoztK6mEjWp16qKKhGiZx2RY5DWXQYVn+YGhYnrZzXpi5e5sZLwyzt7lyt7+QiYCH1OZp717kGVVCbDetDJPKxXBn46d3vuzenVMeDyMtfad2XBcXRPl3FC2Fdg4dXIYw1M8HuISJvqnfuID2vdYTyuyOZf4N7QLkycWHeJ/Q0Q4k3nQxlG9YuyvBtmAnDt7Y8T9aiPNThmwXeIQ52QthT/At+/cvSvHHysrc3uNQc7btH2M8tGrK3vjMOyGCGtWYWai3u6wb5NsNWaK6Iqmh91Ck6OTshnGqEe+thB/TKb09ibhDhzo1/42rHkWhE5tYnqkzUCYzjYFYaAReD+GtMR0qC7Ctw3zZJFYHqh6wMjMeRUw7zhQHOoowBriPxRzOlk0zSEza+7ronvs/RUKCEeoVYQwGNqGF9CyFSRKCROqvDRBLWBTaYNkBN9neK2j4yTgtr4WjAocLGxthMKIusoIZ15SPiUhtRG13oVBwB4VgBqA26mMIi4epNxNHyOzqMluwwsYoQ+q/jTgkc9ygFp+c8opLoeMSINLRfw9kVBTrPyBrsptj0O7M+aKZbvoO0PALvznpZWvcAQfVP31MLpVxrwrkjaThKLMQDedPX0+6eqPeMIjTq+xbmdZaXK6nuFG3BHuLzkN9a8YdnADFZEgEMqdaqdZI4heLvVM9itbu8HlpQVdzI/i2ReRWpK/IwAPRi93kQpcsE9IhMM6/dnf9fkwAp4JfloD6yY1REiyxuwN6HCbkz/UbTYpjuTa1xE7/vIQ8ATt2niK5SZr55vuYtO02oMRM0+mGyU66cyOMZ6s3MxsHMiuIx9w+036fbUL2knzVapvkTnklljy1HagPgCx6olwmRNhfpKQ8xMnNbDW4O78v07hc0cZZ4w5ATIzHIwrDZUjQu/cBPN5WsUoFRI+QSRumnygwTSbcvNFjfnXyodRJetQUOeJ1bqD9OG52o4HVE4OCjeWiNzv8xfgi0vVuHean7TsFcg0q3WG36GFXtndWRMTtYlwf2fZ/nK+8STlRZEtr++PDDFZemk7EQCaG1WejhKniOQ1m0/f9meCqq54hy50v4mo5B/WrNv4t9sCbT5taxrtiywuSogUdD6ZVoAMSKubZBp5QKx2Knd/z8McAhoeFofKmX4k4uVNODW6ghKzc7Rz2FOCZ+M58LmyHZz4hkLX/AuIeZ+fsaUfc4nhVg596KznqWCKgoOmNtCjiJ8sIUPOaynz/NfPm9T4XqiJ2n7dafiuWkkFbAQqaUEQNXUAF6mBjnbZSG0Gk08+zkqzD2Hwhe4nLJZ96qH2YQBgAiFD62w31hhkhSCAaLLEIyul3f+5sXJcsdV5JqTKUDDb1yk4Fo+yHw3dIdSTerK674DrnLqvzRQ4gOgc6YUCtQqG1FyzovAjovpF+NREhevQNUAYF9Ty6JXFk1CHCmWVzy0e+gR54FhpKMmd/xA76CR8TaqYdfMarQ6DmiFysr6bMqPNHFFuzbOjkuIX+/QHRDqtAPW3/+TzULbPy4kMPdbLsFeZvJ00G7fQHauyuNbySrNJKLTRQPERiwtskzTi0JZo9hYPXHfnIAT5fQrRi84YxaH4EQWhS09glP6D5cIPYj/CXcm4nx+P8FJg+IvIkH4E0pJ3acsfmZUDwZvMZZNTRa3WNwGEmgcaa+ou5MrgK8IfD+AuTpamqOuuEnOc+vcFcp49RbxdHWQDEK5jpT6MhK5Txkzjsnu51TXmzhMYGQlSbjD3EiWPWaoPUws6ryhKqnH4AQO86ZXb8IaTcnE4OMemIZNt+bZmg9J3xVsjhtvS4zkGigzryD6yLFCbrSSUhTn1gNzyu2N5/wBN1FNFYwJ2C50A/VCsJlH50H8qhe9rBhTJihdkXAHSurWdqPnpYoKddfHkqoUDBnGQ73cnZ2LEPs2Rs6pmSYyvOCxKTAMPA/1UWC+gi0IPgV+uxryHxjZjobN+eaJkj+t3+B0DV+TUaBuEabhijx2r0J74k8t9qkwKceO1CxaYNkdYE8n29O5Y75/JilUvM5vKERjpvV2i8Ui2jQCotyY7wojS835NsAC/jRg/iWeYTIXTdKW/A/mOHFH+VQfDI/bt9qEYxyTMX+FJwqepdvIGhJ3alXMsYfW45hqcGKoPrCLj3qJPGK4e5XBDHV1OYQQzLkLdEbdiEsS6Mji42Bi0nTt54TebDOpIRnfG5NK6wylGvuQ/BDfaX52FN8hJqIt92TLkfEpBFVk5oO12j4hBYniLj4WCXBaF5vb32I6h+Qum0IO5+/m8ui7t4trXZFK8C/olsWwFM+dbXrE61qFwb/L0ubWTTmTullqzB4lnsoH8Xj4xj+oWAH0aXSY1AYZYWRyqmT71AMz6tCeKkVoxSarDJNkO9YquSwgSk8RnttWBaQnfUs4cvPyBrKLMQWzGZpYhx5jXBE5yLbfVflodBo2tN4ifETE4ubNi78/tl8CFCUJ8M0M8eFVsd0/yE2ifG57woANWNnw1D2QYgSn0j2U6u8wctFr9dZuque63veo0wUBQ483nOWakhlhFcRl0BWxpT/3VSS7o6EOhOE8e6pkAEzvXahyWAGfYCTtSFP7O7xRaOZNthbsC6AP9+N4s5sfVEuw8kH9282wWJCQtDyBmEeH+U1pQYrkO2ngIQOOPo35Of6B+Id62J7qTcx4fFzbBB8i6GTZUtmFch/1ApyWNyG/sIkUOX82pcJBTfEolP6tJVx8efcsMb/lKZ+UH3KpTwgp97EzcZZj8IoO1s1gieLuJCx3qheA04CaWHjWeRXdTmW+/X4yrxh5ktIgcbVgkZhegB4dGE6A+5HnGVTVSsMv+2fOMMJSpJNTQpbjTtODrsLLniQf5X5joFhOVxrnMLw2mGBu8t7XQ8ltNt+w/493//HOB1Nxoi9JfixjNntF9KAyo9ekW9gJpp9onkZ8qnTQPNpAVbvoJi8EmarphhZk+kurRDff6XSZdLZWs3g2QCjw1L24X298k3w7IeBGErnoEhZ75vSG1SwSSmkq96nfjGg9o2KB7vPO0AqeJiO/xh2PRAMXA6uexbBUFn4tjDYkgMJGyUc1nxnfoNCA7w1Jz2zxxe7P4zxdV01pMriVMXim7j/TNSpFj1EZi2MYZ2fD5T3uKbfd+VgYDDhPHvWNVPFQCjGbnTtc3pDV/3JKytH9pe9qK+/V0QffRexiLBN2zH6z5knSJF2LhEAd/CR/SvYgMusdC72eNTvWqDCealdOnhCtT31IlSbMfKhGzTZf5+5vnt4Qo4L3CDg/eG3Bs+QHHAHHJxUpnrTiTgH4jM5QekP6UYpUgQDp1yAbSOEyK/rrEE6uCEtM1hvdYgL+vk1hOwpPrw19LxehWSGCTpFZlfTTOVfmaDE3e1eVY0+ci9c/KU2fp/CRP6MVlQg0DeGxivFZVA73jfpz9KnZGPPpDkrG2xuMdnX2GnevGF9E6MmW5LD+CIwIif7z+FY9Z5EimLAsSdicIIe2v0iozrqticl8AFqKPRNhr/S2STDHwdgNoq1z+2iW/9SPCMgbQDTnUK+JvbuzZwKfZ7UP2Ce7yR3LeU0/q9Mb+u032rY9Ui+iiHqAq+Zbi24lmQ2T71nQMZMIGKchJ50tnc6Wy6mq3FV+4JdPl6TV9klf25ZfvkfHVGSKcu8ZJTTuzgOdSt1LzCv5crYv8Lh3+QkU+i7J64Y9SP1bRAHQAU6BFD6KGHeTDjucMK6qrOqGbc3Ei+uAW8I6AnAhk3poC+HZjy9Xx3sZ8uLplaDR+/C0EpSS0A7aOqGGR+Xp4AYKrGejPqFTKJxRcHOvoX496pdp8BESQN4RXXs93Fbpltdn9nzq6Ra9TPUP9F1bFhArRBlOu0BuDHUaMV1qpUmVUGiefyqnUUarKpNjBltJsuwkZDBqJTFF2v5J4v8iZlQ7lQIVUzBLk4pJkeRDs9tBqOV0pL8ewponrHJipoWlMiLswRQhBLEcRGvsmljKN/xSYOX7aM93/uFz7WbXxVnwWDBYA0RtxGrNkks7sX8nHi3LZTHRS83l2YsTHOPqwT18jQ+9j2xUFPAYvz5skH1fPIYTOBTaeZRsjiFiJg9osFYTVIu2xTE41fyJopdV0Ggl0veWmG75puBeDTnW4lgFW5vihoVmzB3pW2zO9jMZhRXzgW1aPx8YZidG0whH9LKIc2hSGZiWu7eNGnXqkZYgMZeTKdS/xsBvwcCzo5e4ca0s05Cg62hxOnU/Aml1SvWsDzSv6iGnU/86H/irPrDYFML/Akb6+D/WCOrPz1Ou1weBZfW9nmVzZvjHXKHFn0NPI3ZZfndIQqOskTNRDHFko6YulyJv5ZlC0zBMumZhX8EfWmjwPJbsmSVpemxOnBUa05k2x0GBJQLRfqleo/wJOXwBmwcsXCWVUHaT5quM1AH8QEf9vSKDOhfQBEIuVuNmOJU1esD8laFB2Gq1WZlebVpTm4l6tSHXqwF4y9f3vlhULqs9P+zLBsgF6cbsQjEjpitxyhlce6WF4vQaC4hQa54pay0P325w2Td0s0B2IL4zmKBnPdym39wxhrIxMXbWbEj2yInK5//QRgyXD6MfzyxyQWgtEMapgEXe3vpXCpTM7s54gaP3n1gAbY/vWw9DUS0HX1wOdyNQyubdC0x9dCgOUaqXxapPonFslPi1jQ12m6cyup4A99PE31O2KslZTVZkapNKWfABEJsEvjAMxMQaqC5ONlOEt5Qay6wx2kj0AGxK65Hqn1CjvfwxDVY3avK9bxeebpeedhr/kN9Mvk7xfFJDxi905F5vD2YZGLpwksGqtmcdLWLbZBZhqtD3HYjwu50Qj4juXHqylQ9os77Q6XZDZCLqD/o7Z8+vxaEjUvxymUy5I6ryjFiSFbcr0D70O3PaR8//Fr+6EIBV9vOSBABoErXu0Ux2t2vu7kC7HK8blJObY9fGCVaQ5/uHB74sYkA/edLbIpXdfckDUMfiwteau1+gkc/QnvUfGRd3jteHD7i4dwjWFSqyxtt5EtjfZprawl0vc9VnYIN/X6mvOhadhVideWhihdDnnyELH7qpBjjgKF78bkxWcIj50Ao9x5R3VWHLIpSfAuAFG2mYdUAdwN4R+HQAB0fgj6Pw9/+Dp4S7XL0gFsCmFpt2KTw4P3biatOyjbBZUGTDZoTJlS8nhRUiHCK21qIFC2rAvaGowAabe7J53HtQJHm7yUQLiccdX1YgeEVQhuMZ0RhuPqsANcxASdw6eNHoVkRYzeAihSEDSEJlYR1CXLZwtUIrYKoMcCAVBgoQCuwF24kwJXH14nsQVAiWq1EBtICEQC1hKAMPhCkHnwHqJ5gSNjDcWGigiIV4rgAEuLFQhZhFbGYfhS0xgN3A4ic+50hur4Qv1ZXrF3atALHHUTbVfiNm31gOxOOAKQm9g4+I2RkLJx6neM9K71leELOIRSF4UpwRal0eEbMf9CA8Eb9DaZv4DpbdQFb+yqEQsylqJ54OuGSljwgMywT1gciK3wgxwiMbmFmGfSPIAy5ZqYwyg2WGqibkBX8gVLl8IWZLVEbIGz6T0JohImaP2M+IfIs/EKrB/4hZiX1C9IZfEKo3HNgSHOMWewr6BrXHBxjoBXxCzN6w7wV9z8WVXmNwMF3QU/AaRyxnxGs9YjklXrsRy4Th1QkRCj//TPw+pU8vI/rjy48c91+5/IXtxy3b6+Nc3dvzn69P+NnLKfkGh5YvXm5xoBxymXBQ+pXmPb+v+Z9XL/hdaZrmO/yGbr36hV+ZM68esa/pJs0bnI785tUWp0RJrhJOSgmKJ4wr/qSuwLiwud7mrIvrblbepXmRQopdrqGgLCUcInqcZg0kkg8zikKO0+M24JjmsECRhdpkoIiC65ilVEeDfYBCPX6YdnSxKA9QdExogGPXNzAC28nQuUBGjQHE3ZprllDUPeoTBSJXN+Y94bqXWzPZ9P3BoY7mYoNR6T3sfSvIKRkhZ5S0m5DTvV7B0WNbHAVaufUGcRz3HLAJj7AP0MGsCQwIhrpH80QeNQaEB6iqm2LThDSADHoF9xY2SAwILMtvUzujKIIdFI1o6pMSAjYJFAErpZAKOziKdQbbkyUf0/kBCvW0AoNYyrdFcyQXYZNAVIYTEZoArM46rGALKGpHc+mCMblI0sc7j8c+hV0gg1qAKOQKDkVMyPfJkNOU0BR+WawaWdJZQoQRyu5yrrpdzg18cSSkldueVG5ETXsQrSuDX6PJmyIkjm07cuUpzZDbp2c7ZKb/SZoltIOEMhaw95uiAxo3KLIjx6t2vQ8SEAwkeLIreFIwwiZB44YQF0eDW8cC9UDt3AAll/C2ThTOXBQk7tmLkvxYFEN9AydFi8JWeOxh4JjeCeqvEKH2R5rZNR125WyEm2lWCruvw21j6GXkniuKFQsIKzdiLiUzq0ChDT+384vLc5DB8xQTbHZqAZHXe80StpOLcZWk7U3xeCz9HqbE8tygplWJnZy7rrLXqbPbXhs/MbQycH87Z3LxQRMWKFM71K3YiaLUy8GY7ZbUx7YcHOs5Tfz7uP/Dgc6dP/DX9D59nGJvSs7Lp+GnGEZO9ika7uJYcFGKoaVMIL7eid5N2OaQuW8D8G+3NJBMYrYShUOYypIQ9k+AcsL3raB5gToeuOehaprYEiPDV/t9JdjII7CHKo/KBji+9hwCeIFd2dEAMY/Ur+C2YTkbUbB03GCCQorJZDLrt+EkSZg3LN2uSa+ebt4oxZuEuc693lvg8qBXjsDrpDDkiwJCDm+/x6UrJb3dOxK4nZDx1zKRhbYCKKJkL8e7xOxyPOnTIY3n4IIg33dV3mp3GD2+W1QmSmAh/ZtEbNbBHXgroWiHLKZMLTgZhQQASegZUDRB/h4ngcjBUAqe3k6GUubJ/v1VhA1yRjEirqCQWdiFVA711gt5e6WvTYcEJrPEzJwMIsvLIb1jKd89A10tRDcxeVFCjvbdeWbAepwN53Skqo6fJA2QEeDHjQLrRAmCg0oTt618tKj/HYvHYULixOBHpwaOfwpBwu4GZgN5iD0UcCSwQo8O3IcRUJTfFovAACjiT4qrSx9LYIFCJJDmr8BMWB2oShVqqxN0CD/DwOV1XwB8A9RlcpNGULYe+6TW8vYC/teoWaREFWINRSO7SmaRApClA4MNrTDvU/LaAQ0U6kguQgfm9CZdpxboAaoRyvCCllJvhD8BM2X0JsdMGZ0U57TwSvhz4Eqf2FPhHZP/M+EN3eI9PP1qxJpOFtVRI47T2NCvCLVGGtd7SqmBwxEJYRK/ckzy1QXpmIDjLIdbslyIwsHK/HtQ6jtPjtOkixOK7j/DkqBHB21IgJ8zmF9Y/dh1J/dhcnEUqGaBXTUDwItayDVNfJv+F0gwxw5YmwBUuUOBFgpcABELwB4qgmFpgIkvzTmfM53PfkDENtP6BcBECSw3ITud7LqvGtuBIllMfGd1+O+dOESqqhwmlbRlUesL1c8qx0mbKLVb8CbdkqvEPNKdmWz29VUZu7NFMANEHeaKdgTxnuhl7vWtN2of0xT6/OpkNJZwvVETCRI6seH327WyTzm4iP78O71oLTp0IFEwVdhQJuYkMHB8Zo4E3lYyIwIFnY6D0GYaFCTp/E200JnXfSFL3J40jNsARTkaxNEVGDsyOU5QQDedzdMOBHRtBjR1JvzYlFXP9fZt2hGu0x7bA0g98JTECdjHZiLDfIc7c7wyze1xG6JWMQFxLcARr7EIhKBBqIWJ4gkyFJh6BAnnKyGzccdb4vS9jAHfnr0oXOpmN2gqI37nkSgnphd0oK0E2iUn+RIkRFP0Dsa5a9G0JZhAYCLlz8ZTspNBQeBGZMNgZuy5ElvHSTllGg/B55JIOE+Xa4rZyRQKkXp70thuue54vknsrqUdr1OxxWhJUzM6Pec/3eLXG/HW050Ni+DW+7yLvXZXw/RusXAkZezADOAHqJnTicJRQlwwtEyUpr8ip2baZsyZ2yMQ952HBZXc+8IImnCGU5x3nXTDwTTRkE67fQbTYBhTaFzPsFhdiVV3SBnx1GhjmkJdRPqtWetgEwV3cVpoIULBQBNw4+8NAWsTX2ejMGDvDx+rWEBO1TnRkHOi9j7p4acrSyYwwsUPIybZ6cnzt0cSsJw60JHdiGC7j0eTuG0scVS8nz8D7PXnzwA8ANNiGly4AjoNXRfLJFnrkCyrxRFx8H4SEy4544m8Qjzw5jDhWN6X+W1Ss58ECxRFLPjgztA8pYSjmPyb1RMlPTFkDSaQP8jVo5OtuSjzV1LRi1ngcx3KjS+oL0e24us+xc6u+6kzbisB/8/S4c83w8vVlC5l4ULtP1yosS2sDjlJVw0xrAu0bk4jGjtrx7iMoKDtniMjnQmV5ypJ9VjMPBr0JJKWEGP/KzkvQCSomEt3Qx34o6LBekYfmSAKg5+MDBGtri/7AG+htorsbNLLKkuuMjbBBJ3aTsSx2GFhYgNYDmWnF8AF4wsqH660k0d0JPZ4t7ClwD41Fb6GsnpaQW+C8l5Nh5CRggiUkqgX4/p2ZlIds3FshsNG1XvY+Whir1nS/7uGDJ9GrurKycTUIvQPNaRSh0h0tMBxqSeGqrMsiLrDTcFNBYWUwhnAaN7Be3oMVXmF89ZidW/iLnkuymJfzdvQ1ncxdOJkevxrfe8djgN6VTeGIz7Z510FfNDmRz5VTm42p9277756T2w0BIKf1+6ku8sGLs1ok+5IOHbDJDc6at0Dkw0/ZiXQdUJKcmfjifw92ypOc5IQ1kwagzhl7TheeGcjlwSM5SXEmomSGlY6gd0nwRBQk4HBuTX0OKR/NzTLlMXyD+3s8aL7BeHdNNKu2K9kD5s9y8G0o+nOXAeD2jT8ng3Hj226VprTsYsINBJjl5eGXib/hT/7Jr+vShKzr81TH29wLUWzSnfrXxNIF4sqjHDKhwkGlbFgCm8CsvO0OG90llxcTSaTiSRLR9UbCsLH6M9br4UqZAJWiQGw1/syJVxEtkPi1kxgb5XRXEuGxbk7n+c7f76axjF0YKjTGrGHOk7KiDseObySBKhpHXAhGHHzgLdSc+QRIAzHDs/KEax2ElvFib5zhhrVqwsJSRXHHKc/voDyWjHUmbt/YWSyigUvVHuolEgEERQzltEN1joVyo94PDVBrerOFYZExlDksIReFLOkX8+EFqIPiUZXxQIOpytGiTSqol5L2UX48zJ1QRdfEln63O6ljxOqs3UIiVVFrjqxTM0B5P7G12bC15lzEzTjvAi1r02Ycw0M6bYxqh8ZGrtQS2dc078eIxjCgvUi3k8FOJHXsSznOctX12aCdIuCXd2dU9xey2YHWsmNq3IFoozzmMnkGxfpetGCHZx8rbAPaW+LC/BBnmsDRjCo1N04Eoo1EyjgKLjNfZ0u+i41cWo4vaMJHX8ho3rs2rX954TvU+VzBa53Ei0ycU4VfkDqqXxqQrHpej4pthWppXbCAJJr4VLbiktReuBsZSyX831HrcyYdcRBJlwpsB2ywKjWChblzHdygqCieHOFnTkcLXQV4ChXNKk1NKqqLqx7CSpAaGprFtmFAtEPL4CmvtFsTk3QPfyxX8qHgjeLFu0gUJQS8iPpVn8c0p3BXXZ9ymkZUXCGk5U47ZDHecNybIFHODOBh3S8MHXMhp0SFUr+HsUCToXzNAcs6nG1FRKodQZyDV2rxlbuytLFUbnRgDAuvXYmA3TTKgiZu0s4xEBW0UYAKkqMMKlecngYZxWqFeyWoIJp713EOASCxVQQsKMiixcOqoa04SBRIPa64HP92WLtKHQAThO0e9r9VrTYUQRmlCdEhSFm5WQpuN4vioStgtN10XhXYBfAqJWY8yJ+970KRQsDQdQhIYx1BIMX0+UORmIHBu+owkNI7e3CblwiqoJXnF/JZHd3E0n45/P+nAbBh3JnCuM3pKsQr6MOtvhPSJrE+zuDOG7M0S1OpiQ80VGAlc/fryel9ttc5nnfgNVZQOP2ZDgEhFaEAVaub0SJU62Dacnrsv8yN4YkGBDycTmWD+sIRoEnJYGabvWYt6ZHxnrdr/DWdX1npn6cY4GCqhmNGa9AhiJz2ixIbi06qUkyA7idcNF7aBWxS6PxrZCzAxSoMGn9H61AX958p+TfY0+JmfBt98UWLGtlMUKELB7hzeWKuv47w2IXwVadXkxryn9aKsxdRzeHucRjdNvNWszGrIcDe3vTV8DN3UkY0urBYXHZnXcqgbHd00hEodoh05YZtgvSoNrM81HYoCsUz2Ond1PbHBWEWKG1eckpBhFUSdgFOoB+kKoZ0FAnQI5AxeV4kn+0cqLPFuE0hiZa7Ni1yJgyQ3XI62LI1IYJCe/FrMkTNSJAL0QCQ5Aj0LK61UQECNZ1CgookcKL4SiX2QeoWTyA6iZHxxGousboxECWV6oDhchZLyHS0S/E6gfwonFiClyHL8BmvLIGRveYLfp0RoBMo7MUKRyHi79Z/ayTnwn2mYobAciLO4tyya4LgZNSYV6Rz4m0DTVcBQ4omQALlLzN0/MpDGm9R51giFNm0vVf7H911o0qOdJiKZJpiGB8T54DiiU0xqMST+7yNIDaEJgPMLIpMDar7c7POEUCo/fbmpijgUgfkQk4B+MLcjlhLjbIkyWiKirBh1h5tNc0z0aYP+ioBio0EO8BY/7/5xsgxtDzQoCXOMQqtKo8gL9CYAaUu10KnaFy1XGMaxULB7UUDc22gahaoyi1NaYcssFGZJOxywLhgwc5iryO50ScF3iEZUwVvKwWuDgkohqtJfJQ1WFtZFMkbZQySUZli23aAmKLFLb/ebpb55ChllO2quzMu8PYdc6QuwgmHy4JJu/91y67ICzxoBlnj2TEy7ASbYAGg0sIGrhl13uhgPlk40xToWvgxusH0FiNNfh9BNOwgx0YT9FYoASSjwq0V6Y17eVycJs0jJcY5/nbSZfvqeBo5dPM3XF6wEz5PeIEuzjeu0pZeB8bAcvRCcySkymeFlKtJxeSzM3X5suV5HUmDJDuxThzRCGWsEwInUwGOVdtdgnwj7i51xoDQv2lkrjTkmKWi8JBkoZIJFeGyePbFXEu5h0oV2rcufRIJpugcjwZ5krB22Blg6EV9JuL8NPUXUqt4Tbb91x2wneJRNLQQ0k+0U0UxtrSbo7Tq6lBD8bkzhAMy3A9K95W3OX6WmizqEjq2DsuC7m833n0SmPAW54oYM/CHrFjGAEjvgEkEDnSyGlixiOMLxR4FdtoqB2Hm3MzARwvI7S+wsVMiBIKXOAcH8SHIGzMr09fH5PVeKdDt65p3Fvq0OWhB7htmlsiWeyXr5UePgYJ91+47MU2Kf3CuXgFjw7wLAtsMbFG0jRMwgSWLjf3AeG0L99TzC69fzaR5r3kAgJqpo6oFfFr7a5Esb7qBmAZF8BULIN6N4YUcCu3ULxFcCzNa959goVX2YjkwyNHxZ+uIWAlWaeOss1o2MNNTk9WQothRLDgGA/L8xRB/R1RDIV+LulIclzKFp2GrZY39HBST57Jh3expJHTk4XJ/le/W3aKqZP9Cg20cU68JBzyvBLSH6j6572j3T3n7sqvMTxFVMVm7bc8cw5GZhao6+BIlTXFuv2208Ez3kEafAJVrM7EJBjwB78HLYti3mzUPPTso5MvKZ+grznArzki5J1HR94wah569NH/D1V46CnljaP5oV9+Ru221D7m00x9rNyvEVaYqN1mX1yVtxLiJokJWFsn88V3M1WVzE2dWXT8Nf+P35XQDRHJy62i4knzzT2TQ0ILVYp64XxofJ4nIXHUeNfHIhpilrKuxRdHVbdJF7W2xXYhOi3C6KiE85DAPUrRr6e55g5QkNzz7Vudztx2HckF9huXoK9C5auEf9fg98LvrgpJzP7OTRmwN75s0gYDySd/flvcEqzJ8EHIjZpKwaaXAHu3eE1RCfd7PPL5pnPs4GRVBVyareXuXco5v8UTkgq3JpUO39FkMmvabbg3fLmXhjtl8SZuLWfSBJdjb+sitGedPPSqz24aUqvrSVxdDN8dC89xv/BkVjsbguKltNSjAy4ivC3f+MXtt+leWV4TIrS5X+gH3ZzUiQlmpM6W26V4rH1cJin4ZVRr8IoeJ4URE7W+Nm0mSoJPXbDppTJaiYypl8EHUp8FHbQz5B/SdGXwUeLggXHXRl/veaTY2Gz+HxETTntV/7X6sun4m674HyYzcXQ09CesEz4M61Sq0iZ9Sbe/Czl7hkXt2Ol+rXNpWN2D+DRTwtA2Sggn7sPu19RLeJ/79wzuq1gg7QmkJOg0GkYXRll6wXwPFNPgJU95d0jv7fr/tfqxfwWDc9pgMfWkMlp74GeF7KtyaCZ+mBHvXgRqTdjdIC1LGItOarmAVSaB5Ji5vbtc5Evnm8gIl8dlDAmqdmgCNg/Vj0ScKceb9b0inPnnF7w+UGdgTf/pkK8J7JAOi7rLZNy9N5MiEMc6wCEpz/4SF54Q2Oth2/224kFpPfn4XDFZi826GyF2Ky3n23GnHr+Kq/hwBd6rxd+iPXdy/CXi38ZOOXP8XKvaVe37UuUWaXuvJnm7q5A42OU6XDP8fQN1LXtYOp+DKMS+oOkJwK1jI1fOsYCS/KlKkfz4FPmv3DB06CCKU2XJpaERvJ4vNpiDD+Ekt2NkYI+9N8WJXH2bvvI+qYDuJuk8TuRJpLOSxr3pes1HQ6cNxBZovVdCMeZiSX1E2wIq/+WkkPdCFkI4A1/vrAU67fceg90CcHhAvIcgpnxeojy9DCMbEltAEU/vex1VFwejW8XH/XKPlS/vP/x1kHgrsCZ9AIU5zEtufb9vpVPN7/N//scHBtJg/S+zUAtMlkWJoFynLHVeuUlyE2EVT4iI8iAJZjzd6df+ls2pCa2b/H6Yere0kAg4dv8Ok0oXRkDJrofQsa70eqtgMsTT7N4+x/erKOb31haJkWk0StSmZJfrq5sQeVUel+Hw4HQseQ+Jqrz0I9CLLwwuNPXW7502n+6P+etiwyJIpdnYn8JJqNYtXf+FkpoKYMjx5Z1pWzhF/ncYy8iE8iTSGXp5XJYOHeJpK1nRi7z0J8Fa10KeJjYdJvIIx+zb1a8/56F8/yS4LkY1Fq0tJTAKjxS+/87D09LoUTjoZESuz+/ddB3lxCKPFB3HQ9Lux0Aw6Hn82n8P4bAqx3DhDn0wqnKjB9W2mOTNaPgXESwGvs4Vzu8UZ/QABbsAXWOLSdBpsVEX75CM+Ja+IPUHgHYMVkvvWwJr7i91itwiX5voXJCjaaOwiaNwSaf69kbWB7JYGGSnO6PNk0dhzP2Orhxa0VMTUhkLAKzJxQMaN+iYI7QPl6TbsKbR9Xls61+AssvZCqKz/NbZHnFM/Qn1vMLfrklEvn6hQLLefGJpIa6e1zdcSMmVLvT3JpLa5jQ/gUMeanZXiBan7apJTqbDEfw+7p9Hms9of6/Y83FYfhakH8BrCVxsHyzuCzkc7f03wtsxwJYHrW9gYB5kSOxhGJJGyBdidYigcWPHwEZN6rQ8lwExN0BI4BQn2gNI569M2OLqwNvpSK9g74ByEhOQsMV0bjp2v2CFDgQRW4KBrImA6cCK+BIoAayhLbCsb9TYAYGA7vPu7ZCwoblPVEv3Lvb18O3Qf8Hp0fEtfa0dDbam4YlHSJYsFhAM7cy8VbzMZ/BMjsv7BiMjbLgdoIcGPpIAfM5ZR/OaP57sB1PtT8+HwJl3MIYaQlyXNn3ER4gAPGDwbiwAag/bHzMHsRpF8cVVfvnDcAeQ2/TfAbgM8IhBfuq6Jt6Zm2JLcPOfK0R+nFA2BmSJXuMjtPsrc7ybT35l5d2thZVyMm0rJE4sGIh2xAE6BFXsTj7atqbHFVLIKCZqyTU20FrFjiQd1kzhUfFlxF+oV1gdRm2TFQpbPkfjnUeUy/5+B2WeArIxDNEa+DO2weHXA+Npyt0NIO3A4ZATmKu1FLXCxJ8qp/Jc7/c4Czuc5dLrEQWiuF7TGlixNXUIBrrNhcBCqeQnhPnEZqTdTl+KBRCri+7vrKJiPifUVpILSnNL4rDFC3xIfqNqGAm6b9OG2BSSruvQKIWSQfBbon9uEMk/Uuub42UIp20zuN/Vc947UQ7d+gQZrHMNb/w5+T1QrM66TWUC7VfzM4QH8zWQi3vNjIgzPIBPVzM65pNcF4u5P7lo7FkRyyeE59M6ebxihfisyzdg3ratmOAUDCyCgIk3EyQNLuEBLWxrSxzTi/Pp/FEBAt+saXPxTBuwv8qLTHy/UM5jBN9Spz9Hl8KF1rmFoPtGpYR66RCa8oor5GyEfPDKNpGX97IYmvmp66KfVx2dkh9LXgp5i1JqWXIXXjYlzy91ORTdlzR0N1OkD0x6d+PXsBC3/2ckZHJYlIvTgXyNDw+ykONHxIklvfXxPWacsDR8ZdXn7bSsecxqd/AaRAtu0EY4BGKiq2WiUWWI6HKHX3vZ3cjUMRU0B1OM14Lxfiw/xOvKC7Lk0gwO9bz84OL7wNolFO7WRL3Ci+nay2+raj/YkzGyt9bXz+U52ufN4fqI/owv8hyQkul8vqXipjHveffJERWj0K2xrgEYWeGMeHmCHmD1VA3+taZEMaGFgUW5s6GVHSIG9FYcL3zOSzOHyHJnaE/YxerGoskeCqm+JQ3fOW0HUOb1WFbdytadRk/vd5tYBR1sGidQEwU/p22U+2sj9yBZ/dLAbgLOypcSfToFz/j8gciq7vBWR/h+M9rb55dxnC5gQKwFx+UGtmXDczvhIivDNPfw2mBBMuvLk9LVCFc7AlonPM205lXu0U74OosGAzIUez2qXt6zcX7nSbnXKUOvp5koEF/QwzyArTexDi8c8QZwZL2B4uUc7Lr7dWz4dk1crx2sFK3L+NgmLTPz2cCYVitHWAyMsZwj2eIG9rze/29oBHrA+Zr2QXx+e+tCC60QgqWIsQ2OY127sixApyF470nKhhryQA72Q3OTjcJ85hB1YCSJgfbaCiJktiSRYIVyFTTYVt5CDSXMuSe0/Kr3FZU8ia7R/VZl2A5iQW+xfd2Rkk34LNXjL+hSTgXwtpbdDcwPqB06IA+g3dM4jNJhrDJ3RdeFJT1s8W1xJWBNNKj37KjVLZ4ymSHORUkkKKfIB1ZI/ODVtzS1JCqzP0VO858KNOsOM25JEFtQO3ggjx0WtWZ0agFFvgClRLhL2oPKWIhh6cCISyJUcCxsMc0kzYauCtPJ3Ad4s9UOUV7pOJcRSr5Jj0XY/xCv6B50l3lKEYnXvbndOKd6iBeTUeEpSqfUyZ2vgg74td930A4Ki+atZzmaOmNi7iLKvKG7AYdgQkLk6/3GMdlQL7s8kNzKLqDM+e/uY4cCbYlK5QRZpqicW5kuNq7Gmo1h0+xjDpMEvPNcw+EuXmMHbRbldQzE6noronQls25dZGhE+4Ogy7euFcnyVtoS9lZRRX1gbJLOvKrdSmHoZTrEHr5vbYjhZdCXCwLM65eZZMkmW0FOyMKDtWCBn9PSjlkOwC9r1lpCZHkxvFPhFvnN27uVGGTTiqMiI23X3Mhg5rXZucZmms9WwLUdXcsgE2abUBeU6XgqJWGJz2vVa3LSIs9w/BcgVJXns0UuDbZULJOYoUGHSKozC1WXZZSqUHsWsCbs4EwoNmkWb2sngV5qdY26O65a9fMK5iXbtecGdbXq9Wq8p4wVHyJ4u1kTH5gVRmSgjlf6dUThMvoh5HeofD3T020UhxvP6MZecDWfBKvNTtsb3iu+zchd9zTedIXi6pfNaEgCx1i26yMGKtv9sNG7iURRMl5VoTmrhezfw1nmd7RulLhM4hPbUK6fjqetwMoJS5sYF74C9HV6we5AhRbPVhSDOpLFuYqktBFfxwlnJCdKMhIm9lnJIV02UTOs6cgNsjxRiqaC8ZWgrOF7XR31u+V/hBFXLw69/CFmjoV2P6c6VKwa2qiFpOJa6jBZlmsMUSYxu0SksLRqCcx8rueqMsov+Ln1UWAwz4uOYMsyF8a3B6TH2ut5khNzTV7N69yB3wJTQgBImvFFD3IQmuNuNff/JrDqxmAi/vxibcAP1y1yZDUPLkC2WguodygomzPUz2X5p32JULJU4RS1RXR58TmD8iTmGKiCfI54OPjaCG8P7ExoKq0acdGmx7vjNnAKbKhGc0Jpeu0MVkqSU4kMu0CKA9VpeSVx1rCpFFm2Tg32OmtWEQopJ2cENcoJgeMidWNTMUw+WR1n9/h0h5xv2E9SQKgH/P5KvLuoGhBKzwRhQnSXcYqWYljkMtDUyD7dDPu8aD4KJ+427dvyf7XvPbFDouChh/bQIZ8zR0bTXekWbrb5/KZ3WApj7Vl0LvWhfeyv1yOOS5OPYpgxd/jorMrz95GEa4e1w1vF+6e1eVJ8S/Z+Ww5TXh6ntREHgW6pJpf55MWV8La3rPQwvywkriweFZYerpVAcw5Ikkp0YgYVI3Bh7ekiDX+kkfQ4gagN6GIEsibcaeJbqRUg8OSUoIfH9tY132pBh3ZiLI+TJ2CHHxRUQTj+uYKe1xtVBKySpBMkcTtfgLrLCZMAcdvXJNCS8mBJqfWOzr5BzuEnA8LuKlPRYEfOabnC4/XFD4yXwUIA5V77pPd+byhrWDvPkOuKuYZg97Ey3CnKLvHvpgvHAq06z0WkpOvyzIxOmSiBqGsTyfdYQ3vIaaNNsOrGQ31jaadDRAGGdEy0tOH7hk4UaUVyHHuKvrXOsm4KxsPguguAQ8mHaW/82xE1eZywLeuo8/pjR+CeFyr4EwvySi5X9qv798NUNkjwZbjtPAWmdQBflXMMMaduJRjIL8dwp3XqtP7kFMXRLY/4dHAbTy431Rle/Wmbd3/voTVH+a+unlv5RmwfQP4H031GMWBDGUwvQC1jUJsQWzmgJgfbCdQJAucW+WhsONw0Vvar3CbNGeTF26zT+n0zynOJQOqzcSq0GSuBgcMIsQ20SZxBELVcPXUOA/xmYq2xGTLTHlyKLiqkomlQYG5ZiR5tX42FN+tjfsuXCXq8/pYVYhjBgXPjDguorrydSOANBOZwBl/cDSMixd7XnjyNT/SJEXDhmh+yAAxeEvR2y9wDuMJL6mHao/AJ23sgLRwubbLXat9XeK0b8+Fk2ruU7Gh7Z2rkKa93y0c4iWJYB51t1FzFQfOKM7WxSx96Cj6Q85ECCLrVi0S04Jjfw8OWYsDlSwL2CEiYtdWeCauWASFZ3MYc+qQjELnXMXXbFB265fBkmCKzmFYzokDi8holX2+VDhBvFzax3GHBMtwVAkNr1VvYyGF1ETa3c85RmbLN3AQf3f87Z2IRszpJLOXntIJcDV3PLbeCqyuzaIcd+2nO05CLYKRDn1GFdbpp12ApIdimpdRI/TwLki7x6T0X1Ssm193VKMF8NpRukvr0+dQJCpGn9/Th0o8usVN85MO1ArQJiNagw95+RHNibr6G1KFceAI2Fl6kVgCuXIc/VkqVR7kIn1lCFzMr/UTrHw9zEgh39vWwSwkkDrq3LmWy6Tz+hweinJT+qC2pz6MVjss/i4nt1udTfS1VmQzc9o3rfRolQKRQ3DThbnbY+eNMHiseUGZ0NfI4KQ2uEPfj+QCWcGSpNj3KW0vkufajeiCOhkm2xJQxvEO/zFHmjCXWxFVxmoclSAkJ5asTyhnzT6kRPMo9poNfGJZ5sqTEyF68CfECdUpMHFTKIqU6E8rMUg8OY4qLsMTLzRwmmEVPGIdbnGKDq4XacE3H9pYOUEkejMlAgrRWj2p2QZEepPakXAlRH0wO9VQhOAZ/O5C7GAopvF1OSWT73kVzMhBsdFikZ4yHwqK0VG7Vmk++EE+6+FoT3nJ5xxISyI4yajOuVjAi8+O+5G+xkxqXHyCw/lpTFHri0C1bCFgllnlLWueIZPFgH9IR3nSFDiFrlWu/uRbeKdb7gUGMY/sieT1mFFKcFEYIq8FkixMCfDdywrVOm3eXGKCQY01FFXvUyatGIYDLY84NbZ3yVTVhwR5NhgkOiwFr3ma+VkVhrOMhx6CSUDFd2MjQizRnxQsgSBaS5RyTj7TTAG/Nma3kn5HLUSs1JMti+kLSjF0Rp16qSpyyKr4gqFU2wRPCYNfsLtkUg8sjsPStgI+YLOM6RHAPvFuzmYBtLF8Wxxp69XSkWmD++6OzeiD8TyNvYVYZtDK3HII+y9EbxvrojkPrkDjLnvhid4rG1psrG1hz7I5BdKW6LEPVhG9zUa5+JSVcQzZCbiXQBUE4hjwKhDCesMeY87zJSc3XOsnlMg9CL7BhZNV8cH+1JIsFY5GX16jNEA6ajGRMFIEuBilG3TPh9MrdNgQPHWp7NwMpIHnft2bllUg9dmCI++DTDtIJFgZFKKXf7Fk2/H4PI4R/DwRbTBKxCSegkIXcOvFhwVYhWzmqXtifb5gGEfcCMjmo4s2VYNxUtmpUROTfR16sP3s5e6OkHua2i+l7UK/9DvdaLutEH3rHZcxK620FLmJNtO/9HC9pGe5zC/95Mf6+/oBEHNN9MhdzxXcggfDTdEdYnklZOm8SYfbJfinPEy8BcvEaMS6e0XKcbDe0fHC7dhtaRu3ZwNofC63AoEiV7mL3cY8b/R/sQrBGQ7OY5P4/qCN9x1hofDNlBCbMBZuLWMMJ1EHIANsWz/xx3Nfle9C5iokBI1NT5yV2oN/Yvx87HGnGOi8XyHxIih8FRl3yjjZKwszcG+eOdAhBqnSanzpgcQPJXy+hB67Msq3JbPeMiZc7NsqbJQAJVosQ5sktlgTvq2oJ/orkqK7V7UyqSgvDtv7grPak1C6YYHmTYMy9O2SEVYotcWgozxXCxSPBm8pgPjg5xUOFz3hBYo0aw0l19k4bjWQhGIoxxrB1ZIeGI7HshJpO9q5XkWRdfaGke7gxJHIlWK+rBauJ9ohiS76YH8IXj5W7AmEI4xz9jWwYrn7PSUVAk08fXC4zGEOgKaKpz2FPqpMTAO2VsSMucHQsj3P2YmA5qquxMVUvjADxWe2YlmaWHXsOQS54cKCQ681sv5ualXOyeHOYsAoq3bUO4VObHU/yxOk6ZUYlNB/7GaCmB7O0QlDkdWzyEVW7YSPWD/m4CJ2OKsZBT+fvO49x3Bh8nSk/tZZnMxKHt9tQ5ImKcHTWHhIMiz4XeuGSS4GJVxW7pd9RYjlhlUSD/EHsT+KitqUVwtPGe++qz0X1CTCKBJfYp6NHYxh+OQ/9BAS3PMhT3tdjklnFTjT/MFiUpD2Cb4sUxPFvi/FPIa3qRONJCWvT4jCqvLa1J3lNUXWySrUtz3fAWtr+mpskqC3BMgjEzrdzOhTAxRe6vst86HA7xquv/ueWoiSrS+rYZ6ON6eT5cEFab8CwjwYBc6DcWf9Deo/sRWGRmUAS8/1ocaJlIbucA3v/u/3a+m3tj3lJMi9/38xDrX0vW7sJYREE/x7/IzIjMan87UqKkZ8W6/o938s3CubEOQ6euzFPbfo9SxVVqBbwI8pny9Dd/WjEqQ8oVchIJlsacfKKFMZLJBRW9y8A00+/B84A5HnCPrCg1Aq+4NEiHRcERSs702cInW0LD701mzpO1jtDwLgmskHSdH43JgwiaIsGLTgTOD0BceaPTIUYD+9hvqlCrKkFD17I+ftC2RwXPt90EUZ41nSqARe9dLDFxMgFwAR1tQxcVLSEpXmatBTYGZrpVdRZQBD1McAF4V6pdCPJ59fG+HuE37vS3F0sMrgKGNt5BciXowigWtWm/Gvr+w4E+CaqxP1BKLn91PCjhpwh3/EiVPFg+L4oPELC64nCKSrdzSSs0vVjN/IYHezHQgVUbPq/h1zJctMAcl/Of2Lqk0AgqrFfqtFy7f11QHHftMiYtYDeYyQuro9BQ+O17IC7oRaS/NyRm1ZmJQNGCT07vU0cl8TLLJSM+8rzJZSyu29/X81JOW/7P1x7dOGvKTDyrBPC4G+LtflADHiaccd6sswPV2MHh4G6wyHmBbLI7+x9lTm3UoqjPfABK9dPE3B2G77CaZMxPpVN8VBOLfBrkiF7Fqs+vP6mAxsZxLnlu6ne4MObADticse2UUMDhfUoFIcb34Hd82tmpZ0E+lkbh0x49agRpU5KQT+4UZDzSgGlKcvSjku+uoN3hd5Q2d4ZTZok2m7PDX4cA9Yr3GCraJ+kvB5+H5tSEwlpfODqXCi0ek0WJbo0PI1gFP0176ximQIzCUTnJv85Bh8AHg3BL0Rh/39XmG5htEB4ERrsotDC6qnUgZqsj4Z1a3FRnaPy7VAZUO1HJkXxBX0lbLNsVnwybKncHd4OJYniVnlF8hSfijfT8JHQ4hJwF8mumMQCK7IGHPwXtruBv6pNggHZLQYsv8JCBCIpPIQbE+I24RNwcEDqFGBVR08k8wsUVI0GN2o27FrXFt5yxgr7sBT6idBUTUOmAkwsWL7PEAHWJegyDgf/QhgJJEUAk2cS0cCd3AACEcmQrEiSQiskWcPYSAwzB6/DxvyJ2BW/yyr7XzLNQmvCmimMkEGlUSJMBaBsU+KdXk7/q/cVsKnk6lW9+OrPibsiySaLAYGMUYsVZQ5yMMqAr4FXUH0jo0UgZBUaDAqFQSCr+DYLvBjp8ptCz2uM15MbRLKsQJFlDGBbTQi3hdKum+uFtbNrNABgvjRpNtwodKKAYCXMjRmGQlZgMGWcMXITsm/bL883jI9ZAkNPHwhBySqQEABSTudrV+DmorJA/u23kvbg1xC4m5yPNyMDicwX4gbpmCAd4rURRzWdjp9epBnpntcgcTcdmIuVO84/jkFKhyYAFaPa78miLENcmEjSRRF5tFf9TmRe/eOu7BtYc5XTtPA3mJYBDEjcrPzPT9Hw+0Ao7XyXNeOvD5sj9eduWdKL7PFsKR3c1q1yHUvQs2D+cCn5ewJcKMfnH9wE/ck0upRmZsUnrSOOlQSaCKRabcE1mX02MyXNrZ82HnfIIsexioAyXA15a+gBtgoEJG0+TWq17bem2EcmKVU+swuDs0FRx8xSHaJY45wFb2QdThL3WzkZc/fYgFhSmiz+k7bBSbFg3YvL+wpZVlV8A4hMVXUxQxeDQwgKwNeycpCAoSJkJdUQp+sgM9CCHaooFR5alznVt6ADJC7RnrIvTqD1WICPMwWf/PhxjCQakgAOEjYgD6B833yE1PTFJkjCYtxMJS5ARopZODjCULIqyUICV6P1Vbqv4rKnbLMvofRJVK9R6bOsoD8fQHrC91jw//yUY+zLOs88ZRnGRCRexTVGdM+vvn9ofd+jDM19we+6rfmWjWUumPICX6tKxyKQbv5AAcqWwycf2WLCapWqAJgAdutfCUJWKwpGP4/uKXKlKUeB+oKno0bxn1pJAErZXhMHP7Qo5AclpbKas9UaEKwJf+fAiD+O3nqR+d5g1OxHYkzDV+pZRW+7KJ1RrWEyQzA8foPQMTc9cG6dGKG+L0aD11Cshnz5JJgTBQ/rUBj4/F0C+UoFDVUfyD4fIbmQGNTgVakaeZJbp0R/vjurm31JUCay9Nib1isQ8qo75KNDKLojxvhT95LuYbWe4EkpivyxRL93wRrDCBdGgwJnylvZolYrr4nt/cMJv+ECa/Po0uw1Zs/YYUWG2VSfDOsavP2vI8ejEFgMmn34XveOCYqH+F1hogcsmzCGvIzw2wytfBo+ihbENe58xFkW6qW7Na4joTFn2chjj49g5KrzyJhxIHh6NEXurnG8F5tlsUnxiA1MbNJrnNNaimzxCcP8Ot6aI0OGweC/BsNaatNBZ76Z9ZB+DIXuub9tU5ZMrTXghl0in/4AcCmzXF+BI0wj3F/ECt8AVEFmXEAIyIn0vWmaxUHCFRQbot0dGqR2K5HEhKkT0cSMwXJ6Dl1HOxeeNiBuQ3RYa5gEpL7mIRll1J7RSlg7FL58Dqv+QczOmequj3pZi4wJhAPqcH0knu6p8cdoVzXU7oThzOkh/4O5w5SgFRFECoZ9yt8KzPfHIFHDr1LOBroU6BW++PT3j0ST57y7skaaIvAhHShpB23U6E0YZES4K1YUOJ4Tm5NuH5+t+Wl8696BnWsKE5pM02RNthkNU0ymQdtVshx2xwrxl1fjDcZHTsu6CGyjwkzZLNOSRXmf0mLuxQcnzaZtqbtLSj62Bz/a3J59M9yJBvw1loVTiTgFrbMPlmQ+yweeE/QC69g6LC6Mf4f49+oi3Vee1C+ruLjDHC33B4+N4Gf0b9RvA0OSAL8JRRTsuIvZBsK0h6k221QLsnA/aAQiZFDb2HxSR4kPvOvr6lBfp6iX8lSfr+jrD1e/M8gz6qKBvNjY50hMcfJy4yDbjCvUtRvyvZBd1iT77wMQ+IQpaiSKwyKj3fURDUW38vDeddxawqVpKGn/iftMA75aguj3kI+k5f8GCwrsbPTFaOi1Xgr6j1fdSkqx2jdqaQpcDuzAisf8M/1udqqwSBwFojOy+CtRHvmZX0iPDTPDu+ApTlp4D3uYMWB7vtuGwoGgPyURynXS1ZrpZUi3tSmFY/dbRZjtBQKqW8cxQ5drK86BElmNd4W52NZrygb4yMr4YTUMOshpbx0d4/OJxH3I1tBsGN3XmCKUxqbk15k6dTXGKprtdJXC+gN7X4MU0P1L5exDeruW3XQK2wLHaW4B4GSx7nvZKaubuWnLrTszfLqiT8dr74xigSJTXNh6OC2O7BOdo8nTugmJJH/qRrXvjmnrj1w/AGVhfhwRv5mXGM28bqf3fBJFKOVqlVzoLLM0yKwxm1V96V0tGVXfXi5AlEU9dugQDdGY5dT661xuGJtjfafZeoOPSKhZPecbp/2XnD1RtUIkINZNG4M0aTWobupMsr9ABLJsh0X361iELlAyfQWfoCVAXMvJ4j3RaWuIgqtZG/yUceCNYHK/hztNn02M4Iil4WYMCQh015wbLEopGJBCzLmTf6LDE66f3wDHyNtEnUKjidFYYnHDKeRKYzjn111A0G/5lFxtFUJFgrVlM27vMUKfhBr3slwJVsUCRYoA2z7iaD/TPFkyEBUckija36g7ZqAjm9BgUVZ9dSSTWxbzYpEB90apvoQ61RFholKxU1d/5+KwLTYmEtQ0vSkenywx5yqjJcGsMqjYhzOpCiTAnXs8k2svq6pcJUFOtEfwXTF5rHUUhTzPRdoEFWibSZKUjLxdg0wR1SOSCZ3TZ6qKcCO7mIzOyyJcZssoDcGaFChskizlmoxD44256zBDe17xC3cpLhYySbI8iEGMy6pjSQpCZ8JTw5ktp+NmaciZCCGaagqlVJcRCOfiAiflE5K8V6YkucD/XBwlIRISix5jQwSIR0GMX0rWIPX1103nr9flEfGcHagUS1yCkHrfHNYqjot+3cai6svIWRxqkBXAxMKCrRcgcX1cDr18/hf0jXPBM5HgUw+aKLP5Utp5yFI2HlSaPD1t1oUfFtGR4zELfFideoMdaoGPcF4nDmOLOeIopobah85LGVQTGDHhVesZ5TBPnt7YePv1appdmJs/R/WHxTcBa8NNDWozV1b1P+mxuVOsBRrFyg8mPt9fDeLIcm/BdCf8e+ny0Yhbx2GsRpJ1Ov0V0tX34qvH0Jl/3snN4cNSKI10MrH/c8RWIUuqtLOlZgn4VyeZPuWhFaMzcQjRy0SUY9l8W6pKi0TAnYI6YBZE2kjdcW0hdMdL29eNqkJxDoM+a9O+e9/jr/AUgG0oT/wLewvdROrwScUa8vrg24KNoeA7loiAql3jmeVXgIpNdM18jqwURkSz1pHFj1upDfkdBvPqJGVgCgR8oaPHxZb2NsrwBBxh1tb5ivvK5g9fzfqIojKrZMUZzTh4HZmycFYlrH6CUPLQTQ3HtHvSppDPg2iVfGA5H7kHTQ4sScjvX/KGtg7s1WkzYWT0ZGZlnk/gIBOLa1Jspu1AJ8Ql+8thAZftMml5O2aFUnlvU7rBjhuGLGjBnWVOulAK7oc6N18C9wa2XthBowxDMwBGezQquOvUArK2tYGiRGugsdyrOiNMOw5fnx/eitLIpAtXO2wbyp6ttXT6JF5FPFxPMvXALhAjxPEtje7fJ+/J43J4Ktp9dX+aYH0E1sJwrk8Ae2jYOQzcgWQ6Oa96oljeLiYN58z92OzcXjw61K6fmqkLZHgxDWsplv7+NhZyetAZykfrSLgM8stclQ3zzc0BGhTbyAJxUg7LrYZhlBiNR8z31GsiNiFTJG4x6yQptw0j60JvcttROhVl2PRe3WChY59+uk6CdURzQszjZOhXeYXSEMoFjOn3O4L7EFPPHRiFYXHszk2sGySw8CvcM7FTpSYLnfOzicQDdjGMgFVwaSDDwMUIMvUaE2IktHUCBLpf1LigvWLW4fggq4IX/md+dFkdrAyqvKABzjlcRac8dan5YNEUFxHaDRLjwPFNaokN9KPcZlshLsZfYt+8Ff5KxA6K1SUhGaKA9ARWSmHLqjsiVolSP6CJNmPNUoHY/MMEcZRaiLM80ID/h2W2TIVRGhYP4i+mb2dTd2kIisvGj0YGd454NcBDw0p56hDZDOLCSGwCaF5wMQK2hkuhJ2GLEVCMHgi/P0BTHH2gS+5WAd7vPSSXI0eh/Chb7h1sEKoQl5Lu0EzoOlNqVDO/SfMW5sRMfgNaKs+5+3eGwsJxQcd8SgnxQa36+pih+CCCJ2Ro964ZWd8RLIZgS11wBq38FlCTy9yPgSWx2H0AFbpIw51AS8K7HlV+xs6fJn0Lab+q68a/mGHG5dc3KMEXeKsdJf0bgZXpdIObsaoFVzycTbRr4+QiKAc7GHMhpelZ5bA1l1m/ym5+vCkb+oCnOHLp0Nso0d4GooYYM5XfHbVBWiSN1ojiwL84/ia/e8vlqcrP8Hka8ha1xVw9EZZIztqEGKhKiF0iTyrfbVHeo3Rby2w75M1OGrJx/WmIjtsjGsYeTpeyWRpaoXFCGHBib4BWwPpBVSLWWOjKYqeqOmXJK1ZtZIQKErT9ZooTxfe0xrmeJS2sLghBkDtiz/Ce6XQ1ztVgs2wPD3Z0NdEOtWXRl8YLiqwvhHp4h1bwnfOXVBG5V/+2FzK/l+N/+00wOpICOzgZxWlYTrBdzW5Qi5aeR6BFg6LVz9dfFe7XKwsOaU33xZyyB2ewfShkAYvCaThAOT6K8xq768gCDo7sep+y4G4ej8qQ6XVKdA/UMx+pnSV5jmSspLqchLh2epHmKXxoN7yFBbnd/YakypIi0nWZtpmQZa7oJ+yQO2gCZuvYgDVEIIsgoGs8yXFlMLM8QVYyWFPXuXrf04Tf3z6kWC9Q7m9zHp7IJOZ2J1IbhjMgPTWHfs4UDKR1Xtj0fbJ+ga/pj3lH3fYcjindMEzHXLxuADsobiJkTctS/MxDggfLvFBLE3rWbV8P25TKsN+/C3n3SRtBfQ+xV+H3wIeJjWKFTYkMddLWIHJMFPxGnEWAzj7s/j8GvjWDNkNua0HUwLPjaGVY9sH/x/9Zrf0tXO3RtGASDKkIbockGMu/ZYRb8zeO2VjTobxckro5L6xl0KQ0wj3oUXEoh9vuSy1WDxARACR9VrqgC3WcssXU5uIuNlWUk8E32dUQY4YakLyuFxrXFO52mNivnBAeZCcKF7gXeKNHtkoCQ2x5q9u0uex0Q3WbZsxu1zan6TYQGYDOtbf+aZPBuyf59MWnpDXfEzIXzkcIuFuUd1XX6yeGpL6bsiF9dRrykE8AVzGcA0mecSgzftN8EG916l1F8+28MAJRgjk7xMMklkggGJZ6ipb4jvICHzJ0UNSallxHcXXIwuYnkrNRGrpl1Cu71ZWjVcnVDk3kdORhr9Xv0tZ8wg7GJP0rfw8USYNWhvEvNt5BpDIbUiMrp14YP1TCSEcKUCv+jsl+JEWKIw9OFGcfn6IhxsotgDfkQlPAvCEKqKIUJgWSmDtAQYRdN6wFr1xnoLV82JyUubVnopOBRhRCscLmJKFyYOqSx7279FDZIHaSIlBcpmBJnsdgiLBfCdEjik4W14fuZemQRUp1cG+M+4f6Gw+00WHH9WtYQWXvaXmEhAIVqh1WV/Gx6xZSifASEF9E+wj6XP3jpSyD9fA3xrO3QYzZUoq9/wQT57qEZl92S3lkG96h7+bvJ0562lPf/Y4w0Fa4G8elQ4fS6NyE9kiwquJEhIGY6Qy3/8LobLg3km/T/f+wxtngjRY/2vVK97rUUT/rqXoba6G32vQfTX1RzRi+pFlUp9sSSR3Vivd+p2/4dxjAsp+bNCgUrfNI0G632PaiWYcXlCOnrQoF1qPhnWCxwVWBTnERoVaWfECejmyVidiZiv1ncXEy3U+e0roG5icnhxl1VIR/+ey9VSSPEjh9n4S7TcEj5kaDl+Myhix5O/sjeDTkWYvtSUyq2vQiuDFAjd8GRkMeG8uVeAqTShHvEqZS0hcnja01vWqtcLm3HYnEiDM/tADjYi6KGtb2GlV8YahXZ1Bnh2Yr4WFJlIe4YL0MTWJCI4n5DAjga9ZmWOB+U2p7VMmaxcNsGeOkpQcx14WNRAybXr7xPQHbLJEEVNyprQFeegvLmIK/iX2AWVrfh8oyybhgmYrw8L41Dh4K99vJer7OPN6kjoWDpsmylC1hvVmsn5fcEtrHTdno4PFrBh0OBnwD4IIdOFHiLpwLswZoEvrAa0o2QvH1GiIqbjBSVgUrOUscJa2X6sQaVggdXa/R1OPkDm2DimEWnmtfSktbjFfS83RTZbrsVYAvbrlGKDyhmgS/fWpSXRLuDTsPl2UqZm29phHljZBxd5KG+83U3rCMglJiXEzHSr4N03vyMAlSuigJ8z7LhftNeoBjLdE2sk+QQuFoJHi1wBS797GjM96ap2SCUeNqKoperiFCIxlmDMug6mHTEGhm4FJDOt5eOCbF6UK88d5hGC7hgNNxiw4XiQfX4j7Ek1u0SRKhSskcAR6S0iUQMxqHVzDJgm7+3iOatiZGDUejjDwpZ94kruasyT9rxBC/2wZQgLzLypbt5dRRtdMXqTdbuYDc63FUl6zFFQtH49WI5XrbP5+xGe+8u2aTLhA+BY4XvlUsOh2b5QJMR+HNklbx61Bw3wm4TR00iHdG+FDFJNyYerOVK2qF/ifDl9tnkMcjJuXO5bTG8ROtQbTHr9fb55iVd4DyTuL4NlAeJNQDlHbYmRTc6cv1FsAsCUKPgaLCW/jS3I2J9G0NOdD8CayWoGD9ApFYEPP0TpaXjBt8w3uKmCA8VtEoOu+xu9Le3xAGD9izJpolRU1ms8F69ujeJEDRxP/2HcY3RNGhcJze+C4v5xTJbiEhpHJnEHpmZDhUSjDJU8L12eJsXTFtXvqmKYNOHqDwIR0xTzozEZGd2PkltKEMiTsSvUWOHKHKcmt7+RlncwQpVCERruMqWMpHKwIuNnQWPqHS46blqJ7j1bQxjzFXFDHRrQeyVUURf/U4SaAP3cu/Uow+AKgcRQq/OKFWNXHyUlHu3vKNH/x1XntGppHVmkYqeiA9b0TGuSb3AsXLOR3i7ZC2MgwdY9s8i9u3X1OiHhT0CjGEgvFA2GIsxFTfgjj6rq79BXubb4ZZI1IPyrgO9GWOloSotMO0VZkxR9vREMMCZhVu6Hw1C7aLkoqponpH7/NDuap8jCXNbuC6uRiVgjXYZmYGzTXoYpHEyHmq1xlb1oknOXpfe0NbGLm/pcAgaEVz5bVLOTbITocqc6l+dFibcVMPZHQIhybuWzE2XdztZ4Q+13+gAIusG/iL6JQRIVcJFTrx1iF1LUmbEJNWIZd9lJvGwBJhoJKSMyhkdhazNYj+SraMSgE82X87aimck/2KXigru4YSFJCx5dbQNsTRjHqzyUGkxwkJQmr8oxYGHzZZGX3vj4ssNnawJjEEkZtwaQS3TT30UUnc7/peKcxFg81qHiuFwB3wNtf3KVfzY8pVh6RrKY2oVzAHR1Xf5EXucPdX9Sj1N/jkFuR3fQwNsoMI7B6OTXNQUwlXQWyit78imeBiUV8OSvzWoekfooTc+wapT85BVN1xJKvUTSVhX9PnzrY3qEtdXlLMvh8VUGTncSFmRMGCnUgr30yxZ/5zPwcTr4YdWmV7ch3bmk4YSq8pRhrl87TyjrFlOqjbhVRGB6Ggg9nR5y0lldren7h12pxe3Pr3afUPiX3xaErpetXJhY6Qz/mBHcqwGrdvH4onlQ88HMgPkCTQI3CT3CWWrS+wnjWAwFw1ITUHtbYCcLifN0FoCQbsLX47dEPTu/of/jrL4aLhhCKcU3slVIDouF+PRcl0HKTQ61W32Ntyavk/9Sw77DcidNeCzgrqmrylYp2HLln/ItbBmxrDiXyi1/hq5/LR1sWCks26HrV1nf/4CBVLrZz21Q7VIpfMcuyJIKy27/LpUg5Np4TU1QfgV5PXi4b18dvV966/CJC50HCfF72GJHrJHf3GJ3jHFytvJtZ81eB7oYKSX1UkTzjEjrRb2FQfoKTzDKE4Mb2psLTBBiWf6nuihI/Dut7PCCklYmLjgjTaFPsA8sKzJ1pkr5sbytjiVHXoG8+XcQLKZ4NjS25T1ht/zNNYG4aXzaYzbDnW4yvWSVG4QkswG07npQmtnmbwOyNNGlyV1+s7Y9wTkVstSYzbjNp5pdU4nCrhwHjCtJ2HG4OOGA3kuiC76Q1FgTmIl8dsv93MojBbcnvfnbTZDjbbwbZ2als7tcVWW2y1nZ3Zzs5sb+e2t3PZvQH+YIiO3e1/o70jWIGC6KBhet7akobT+ORmgSQlOJnrkiH8/j2e07lcYd6FYJPom8DT+EHHwPvjhWFYBd8vdBa64l7De1FNcKHOXExwkZ/T+Ti6iT6fNjHOmYlP2W/cmabnk+33x7+oT7eh/TYXZdDm2V6Gfgp4kNEYZ3Ps3p48bMTYzg4E4MLIrDYiicjBC7+25lXnN4zAQ0jnGyB8MzGFmBhmJHOTonT/TBkVEaMrR/NIPWOxd8SZYe9vIYT7Ua4rbKAw8wgrJ4aAFAhD2aBF01GETHlTLhVUFt6fjrz7vhYkQPHIB1Te6/wiHZ3t8MJNa9mnLkzJc9y8ft9qfvdYy2kzW0bU8hsrjQaZgOYdY9EZ7ixnVHEB/meme79lr7wXoktXONye51eKbdKLSSLMnK6JdPr5wgazNu9k2/I5Eb/5FvbAxCB/ilHpkn8bs8z/+qqhY8IQr5HkMmBEGAEjifkvYtAQUlPbt6aX/JS+msiiMdtMGOlEO6RX0EKiXdhXY6SGQOKXo1VpsRTwFa54ntuM0P7KsifLg192sAhDIKkEY+NvWRO1SjVrndMfz4dvMwqAlTJ8WjJ+Z2wPXyqcUlw+9tWUBkmOviPY8MRuCOV7CNSXpklT/aMqCuiHoUwoz5AEe1Q/e3Tgwo+7O3VA26Igo4xjpdlf7Cpu8Bbti8nx29v5kCaKKJIjiMfKE75TvdsDGdyacpTLGopR19hKwMaAwFpuyFPXrGxD4IdCcDNVHfA5D1xhoYfwAaz/2p7Vz2fVzloHI+WCVyiwWJqz0+kW4A780PB8GkR6oK1+g0vMStl55Xv2jgd2nny4eaMoz4UCirB1fAq+hB81pqVSSsfyLrG57o4dj7ozEvFcf9hQFDgLeDigkfTvMkaGRFuDwU2QejtqerX0LTO0teMFJxg+HM3Y9vP+8RPOtbpJfRX0Lt19xFgm2BSsngUGqK07g8YQoOjd+ChKhwmDqRZW6k0dcEE2wM3S6e630eLSiSrmUTFUimrYYV69UGsJan6Ekcoyj1NkuQvsvEqg016n3eHa9TXydI6dwf4yUp3YTHTDX90EPzqIudClKcaAT6cJfp9TxS4vlKZkuJBuYJrkIRUZ4XRLYZwM+/OkclJLCELHF+ubwSKjVlRVurfeKHEuriWdPqpO599G3ZUZi8ZMETxUv7+aBormKE8WwKSoOeoCRhph/lt3ABjya7/38lzHsuAMreD6+ZTilgaWh9c/iDaVDUGh/7gzODp35ngjpModrE1GsINTCgB45AnBDHSx/Foj8CtbL7tSdvddEeNxpop3H5hBWermeDwB4DyETz6oZeTnTzTfV3bkkt+4ucMECOyXt5mqDU0DrqhnttxDAlvj+yq/3sZXLJMKhMeBt6h5xhNBaQ7vd6a67E2jZVJJsESsEl2px5STiQOb+fGVU3jeTEK3MBbpuuYvy2/VTdpfd8HovLbpz3eLdaP91dxefg3h3lc+VglktH0n5NJjS5g5sD2Cm1s/Xvz+9tu0v09p8RN+qa93ljrW+lF/xe9ZU5X5E0l3IRQhsq4xrCNjjJOgvzYKAdrm4XRIX/xXDB5qsb423DhPl7ObHlM8GZ+W6abqTMEWCxCrcqQLOCyn+2xx69j929s4B9+LaWs4OJ0HP9rh5828zAuW7TNWt+dAXh913moDBt0g2KvJZmqF2kBgNrWI5f0nsqxG/DG1KCMRX5SM+sB7Me1ei2nn4NbFZf4pUEIpelV4MrrDO/gxFcmk8LLpoZrfLhqmrZp+3wZP+jWYx7vkj9amh1SGtFPeoZctjtLh0xY+gAz6DsI1KMF0VVA6SiiSUZRYOQ+jLJ7/xL3gqWEMWdnqNqkcjjNL79JDGKCTo5UxgUyM1gTcaMIFLTzGGMOTxuceM2VP3BdHEHBPe/QmYaQJf5e/3T7raRwu8+AgnlXWDbi8cqv2vDvoefTW96sEAWim13dbmU7GRTOesyn3+kfhrLeYRghQoFBnZxGe9RWJEVPW8YJ/9P+IfbzqxWtGL2+KsTrv+EHyE7ykWIasLuele9rglXQGem0o5g3bCPedTkuDPAO/zYZmZRAPDbR5maet4E/b8MOoj/Jbep+hkv7cW/gFHkAGT1CNj8zTYLXcRIpxLPgTWYP1dAGyPL9uAwHi9mZRE1H4jgdHOtv4+cGma7JEuFHZ4c8xGk29Yvz7sYJg1u3QQmkYQ63VRxsHdPvJRePeAu00BL/Zc20KQY/9oEuOBC91gebfpG/pWIv8sLbHLiT5X/KcNP4490EQefSaLGEKqrme33mAD+BAe5S2JNDJ8YZusace2TA6Ke5o5zmMRXhiPgNGiuhNwp7O+ERPnc79X0V2bg2ngY7TUZpcXv4m3fW+GecykL6VZNQjMaWw7xFGHKqOB5E0QoDYZ2ep1SOUG6LSElN7yzh6t/l4o4Xm7/JkdH6wNnopL6pQeyzTIeusfelMOo858J/NEZ2z5uwQx0AIQtKgaSGz6+Kq15zqsAPXbHJObKEI6/RDW6uG4i544pwgnY7jTzYrB6NbaXAcxpCxp8cU2QyaI+j1Y1D0siveXIh9PYBeb6Bc/iV80jX4Dc1hu2kZIXrMtFAkyfahmBs+eJZE9RYFAjUJmIST3hSByhqfd+SJODgYYwyYhDHGgI0wBIEBkzDGmCYgXca2vk3uUMDTKsDTKsAzIsBTkC0nGR3QNzkYI4cfwiWOdxFzIbxZsi0MuhBlfjsM45sEHoo9AwprkAa/9t+7bRgH7BiA9WdEvJhiMULvxQbRRYLhDD+c3nNcMZ13noWl6QRPF8FNu999s8w/APPIJWTUxBkeSpx808oY7bbhOSmT9PphpOkv6LEbPCWSxzWt0ZqAZzpjaIcJRidHUsRECcUIOikezAGRXTjddcvE56GW4Klj9QyXVx7r+PD1oO/NOe3NO3JsKkuxpikZWp8BJzOdpilYwRJ03VBPYonFONMD1cSjeP0pFePH962MRsc08AkmmfMunXCi8wbJDTTRzUrR6HwvM2deoDh735Qj8hxJ1NBcQ2F1uj1twB0zOw+ayWeaMk8kMGucqCLt4nJPEGnA3yQMuWjS/06ka9KWRsIo8zOEw+QV27gsIwZKQw+LNrRkrI0JclmFCGX3wGfSCF6ay2NBw9AhIZoVLknTRJ8jI1ZR3J63sQpoVS8jh0L2T/OyRwwfYc+obWLRdnbMllCN/tQ2cLwDpjG9R1F7TPgVFemF2mWPKLI9qWmp0mQg2hNExuPBoFbJrNZwltla3TFGnIoX+GeYiw7LFZ+uUh4kPwqWHZcXKp87LX/Z+9bFcsO4ObRFbdvpbKeuJpDMlnTh7DxhmodzF2Ya7EQrz319ZIEtFSIBaS8Rl51yq9s7QEseeiPqb71ot0FIEQQTmDT7XDymGJVCuCN38Kq99Vkz33WKBsQUIKOcQCHxaO1ThQMNWOzRVSq6xaa60elPPkuKq84oL+w/EkbQMBuhi0tTJ64oJzAVFss9inIri4u0oi1U0QNwtMT0tKvUTFWHvPjBUJ7Svgj4gIAIta/ZvzOW2wvH58MUM5yDAaNXuZwYPo+n+rpr+ivsK4WrVkOIagfIjXueQAQpqZNA5tY+CyjXY6HRYS8pXJT1FY5vZb8lWFowjgXnjc49YAeoA8FdvF2KS29TzBSA9VfPXlCH5YpPy5QHyY+Czx2XFyrfOi1/2bvtYrlh3FDsRIEKktMVwi9gU5xFRrLLfQl/I7AQtigPtxSNrZ7ydqdqSU+BVls5oTE0aXRdcg3bmeFoCS7HEjx/AXVD2eBxKyZ8ZpXBFONQrFBLTWAg61HqU8BMGZPxrZ8GEGlGFdaLk62E/IgAt1nVXDVBSAQ4Cfy5Se1pd0ONoHGx0GvKcV0r7c4matdH7UddoTb8ZOy0iE7vfyerT6XVb9LnF7yCrGFD/mG6U7n90/6ZaGfYtLUqF51fzxbfBNS/CGfeElkLMLHZp3N8VF6uN9Yq88BPcXc6VjRm7gF0BnQ1RonwaLukBAXWlzM1QK3XOu15Xzhbp7LIc21m7I1aqy4oS8DV6sLcY0UMlEPHI9Yik8lzUDVDBK6awlg24080mM55YU6X0gG8mx7XaIIVO36yOXL4FLdOowqv2Na976Jg4X/RxaDXL8u1FBrb7Bla96xfipR1tkuMWiBJMlysILu7cSsL/CJT+FOrlj8g2xgJXcsFiDmv6vf2jcbGIJ5fXR8yW7NLXVWklHSXKdGFnpBFD03Zk2b4FZMxmuOoUFNqUxl7mEBgCBrg2QwLg1hMRtJOJi9reoEW5O9gUK3VaJFU4SXNaxRI5spcRepDohx8OoS8ydEUdMuwEonpQXdfYbmw1unK8kLyDrhQAZBhSi8ngUPn9dADl4aur3A6uZ/hNc8VcoeArvqIjWAVS6HrxrDAGNXdJr3mkrWCo8b64OZqdkxwbsEETrGpV+VJZh09pToo6z1TByUg3fcztJY1r4AcFDksVm83Ca1jYdsBa/utWeLAxpZrHLyE9FXVowswPWTqjpYxdzxTAL6GmQ52AqgAB/T0AVa0I4ZPCmZp6PCFRgz8vvEKr0EX4lPKpnWM6oBf1Ilx8I0KTbwajJoaWMuIzqzSOeOLoZIFKuw6PR8KRPKXXCwcYKYENQjvAtMdAEW/zOOfjagP5IfEtEYSElIAeHoxY/PRqLwSVJXDyKmYdiaaaenjrNSTtacTNfW7OSO1ea6Z6NgXW+L074iluR/BRDGYcy+QSTE0gc1+k01QK+e79bjekCVWQR82KtgPRcKW0OzOKRIHIVGfUMU5BYG3LN24Ddn4hl/eLAYfR/qIGObBxsOyphMCr3JzZSSj7DIjMVX0NPrjzmdLaznJE6LdTp228trnlZATHPxAGBlZWJh0Z2Db2y/WbBpUVjE6YxvHRaK2ndY8vmkuzScNljWqKM6VV5XoEOLVSAlt2VJkSy+qG++cqdIsJET4tIcN2Gy7kDUapQcaVd31p0E8KGnhfSouyG7yxHqFEBjRM29Pwxpe1LpAJnVLzD9M5aJ9UioaPmMEIQY4TjYwZWrV5Txy8TaQRHbNjU5HnEKjzbcBEfTWaPKtkeixaHEaUpebUg2qKzNmk8xWyaIMFbi5/DDFLhi0urtFy261aJ8iU5QlawmuTnHSAOhIS9h+g41UE3YmkHi/f/72E4VrihGCTVuMB+HOUIlGf7qaAy0IQP0TmYy22BsxgqHNXT6S/NFUg0lIngHLsB0+fTNo/tUZXb3JdVo/ViNSMCnkfFleEOaQsvzn2tF7OXnSca0o+ICCFidG84+TSnE+ztkG0FGAl6K8afdi9HF7qu54GyUJrdzhRPv1TBPcXNMvTPl1gZJbs8vV09DxwXCtKk1RbHVcpHu8734stof/vqeA1N7Ms3ySfdxXdZ1jRH6ug8jIWaf+4GGxgPa3gV/H+7ZjwfPfqP8x3VH2ZOR2PpJ3f9nitVnSg9LpXvtsG7cm9erF6ud4U1efpwm7SIlsoyWWSAIQkVgQEkmx4CCfTut/voiQCEn3nBIyPD/lxY26yrmSSuak148wUI1q/y0Ue0T0NOXS+arp+bV0LBUyuBe909eCslv9UGPgRzubsffn6ozY3rf+YP+/Pzv36fs5Q3H4kcR/V/UzdLPzH6Zlke26zqLpwmS2iVdQ8vwrgwpSa+hKZL3nsSicNbwNcp+Azdj/JX1zbwqpXY1R9vKkfYwu7GazXT2T2Rp80WkQd7V0ZWLHm+g96ZksLhX0uUIPJFx/Gd0I1/DLTwwlwEG5lsjBzhYMyG4KtgKDCQrM0683FfqzohhAheQLzat0IlECfP0iYDRHo+fpbI1yH2xwaEA9hntBoajXv5ASGqyL3tBQfvpbTUPqME7ii+snOc4KfwKk4Lf9RGGoMB25mjh92kmgVewmw+g43MzDjfGk31C4cdazOEYqZrPqvJTDVRqPfHZZN/0QUCAC2Sh0E6XgAVhB1OfA2TgovVgVOW968nC4xE0ZnG9cCZWw/cCVH1EKLpU3hKSYEnymjWvMA1BYc5zT2cz63cSm5j6l+jeU8DR1pEMAG9M3dl9m4A/DTNzgo9dQBrFGDdFIHu7TNnisjmrBtSTfYTYcT7Db3k4eq6Oi4sozcbGlXl5Pb4C7N56xSAf2sJluYJ8jvsv5OVs5K+zYAhR71elVGlHlhCNjmXHyGdb+RSTzuNyjQTaQgEF5UiiIeRJhrAR3KZc5Jq/v4eE1n/gssHPk0RCz8rXCOOXXvqKUZpoFig70e28QkTwjuW/KJJyEL2YKcpqQquUOa7gmcO9jRqd6+pgF7qsinJntnfAoNADqx2ZQr/u6yTu3JUxvYVVsdSkgvJqyguGdjxuX2vnlHwCOYsLbKf9wMIGttZ+7CXUt8Rp3NHp3TIgNEgkrTWREGXJqYTC11+qR9CQ65diHZ3o6lTG5AEU6O7S/T5i3zEajxwlpkQAI2wN6A3oKja0SO5FHvhxlGYIkJNfWl1PEAI4hLqvVL3QF8RPcBySYfHxVKRLAz5z5jqefdX7FxvD4JczmxEms3S/px3U1Rf88ZaKOdbwh/vwKk4XhOqoJx1uK/FvT1HFZRsFPaq3hr9mzJEtLAjSfOksPHJAeWHCXtgFYXb5/OpSoHun++OTMGKKtwe/DRAReJ1wM12tIObFI6PxPIqsIFT0g6R9q+mZwXJYZ0FwUr9YTOE8+RIUr+I4sDhoUA1tIiAxIQoiEyCAgRMlY/6LPhYIqRMXWrDcNCjgH1I+bLr6pdx1Cl11PtjRo+vJLiIL/MsvOF5l5yeiS5fnBCXiC4uRBwu3e/HTLijOmxfX94wZgzOgLCVRAFLpIwkvw+hYgSTqt5bE4kVm6bx1oSMoNJ/Z5X2l94Oa92TLP5uFmAYV0MqLSy7k2LDKkxQ4C7yasKAkKuuSXjRXyZEZ3ycfM+URmhxcBtkglfYskvtZ1Wy/CAf0pfd5j584U7N0kkDuTpQGBjpVBGzTVB/HwKjEvxd+IJxUL2LMFxjTAbRA/bvE4QzcJHgbmTQ/L1HqrChYe+2IAq8VFOrQYoJ8BPsxZc+z/8frBWsEjFqfd+Qxdkbw1ZgqzWWof/79LihggFfR1WwXiuaHVHUQS92p7YZSI3dajJIUYbyXH8DrMjKlTg+wLirJ9IgIr2/zp1hqZc4jseE2ITuKWj1Eeo/+XxkplNfoWMtkN86fL/5po60bGd8Prk0y0xz/RTQmixbxwrOG4Ms8DkpO3YIQqE0CHvkIjs/VzgyO1x2eXme00CvrBzv5MLxpsObRgyzhRxLO2x4s5qMa3nxb77h487l0vPALUUpAm0KcxgO06UhsADKG1nG2fkW1dlK3R7dCV2KDDBCS3CGtoRjJmTlL+9zuKIuqk1E7kUSpUFiHhE+FYZxptfs+jRSXbUFdqZmhOkBiyap3mn4HvG0rCXY8d5tYEeD6Q2cUS4k5TYEowCr4+Exosy6Gpqs0T0c6bBvSVFtg08gQ3Gy/GqTWz+Zfx6G8gkw+nwzwUmnpxIRmtdgVaxQGeK9lKpP1yc78Mp3mEg6SyxI8qX/ZxSAAEcp2CFfX65PHqFSk+IWNTjlKUWDcOomv1xZjtIhZ1NHWne3fkmz66+UgU6wLveOS5y+ca1LmWIY3vV0b0F+CfJqgxDNWm1C3laRsw4oU9jeXLXuQcbKxU/AdI4v7Mndt/Sixnd64TEkq/ocL6EfqtgjtuIFj7Zizl1vsNShQjmmCJkcHzcwRvMR5rnlw91QXBaGF1cIAoTyG4SFLiKlxVWG5+FWPYolT0+WQTpsqPUR50us8EMV7O6QkwwhaVpZLJFOmrTvYDgCnhGJ6i567Rsd85x/dCCdduEs521+q4dqTWumSI8105wuzKQ2Sg0/USD6aggMGKgw+KQTZFMaQxSZsDvPxfWz3iJ6siI3D6GbggnGfqYvzviCcBlnENC9UYHMnSlcgRmM2j2AFdDMg7tifGpivHdeBQTiJHaUKO630Ff6VYJscPFIIGo9UiaAaQJxTLp9IR6BvW+N5AFaBoK1E4F+2IBImmyfhUUx32EAJlF1vgFosHQn0G/72g+u3KuF6bI8lrfWnnhARP6AG9U8eNTICJHZx3/Ly4VYWgVUgDhDdNsjBzszHgbLxyTZBQgSF1o69MMwZB8+12lwJJZy95tYVJnoZCIfMjusGfNmBF6D4OVsCWVVICmMEmz+CR6xRgDIuWRnvs0+oJzi8M5xp96QFCAiuIRizjEuzZIi5UsUDpQiZl5dXKf5mw1cSQNCEUA4Vw8elFPpGLZAVUTkDlnOnIPTxEQus4MWdD4y73H4WIYPxSqOluOBJCTgxAbPbvHvYCRyd9nR51eBVZhPzcTR4NiPb24IkFLEM6B0oHwUI40uUXAA3yucGtR5nMfTOonMuVPo6UR4dfhDKu0IEUm4r0IhBLg6VTjwfz8QT15fG86vE/GL1ze7cOGovSqKYYpBQ1GuYgEiyxEHbAcVJAJUooVq+fgR0mvieudzrwxZFH0yOBWsNgH5OJX3JPe/fOC2rKYxaTx20lOwmjeUmIzs2SHWSNcpttg+E0Vy+JbmjR5UvZFrwtBA8iWV/t/ngzR66WKXeLaqvZXKEjtJemvTfdCkyTQ5cg9CGlEXrLCvyeILZPY+B2MP85dtaB12TE3KG4VKxqnOuFrlGHQaBQh1aYe3fHuBDMdO8u89jeHbeL+DTcMXlMiydvkp0DvvdMhKu4KyCqEiPFoFYFeC4juq/6XY6gDXQSkQKL2VhnFWRvp8e3pYecYrSTEHR92wfoJbkt8w+wlVTlKMrPgsAe7Cjwwv1EBrcfI399FAo9E4AF7uVoT/qBtX1+mB5vasMIHiLj6e8rMdAnG6pstxTtYTTNegEblR8ATpBUuBU75ycCh0UrGttDCC1aG7m5n5bRWqQbEVcwsWJ6LfRYyP7G9XvShBcOLBDicCIJPGKLxUIkwpdM5P32BQ1GzhKQDsLlFN8otGlVgG+B4xzJ6z1NntMyrGOukIX34eJNYZOpaM7SubGyOykO15PYaVOkvU8b2ARc2ZdVP2pHFjivuSEgxDhSPXtpgjk0v6QGr4uDigJ0Q2j3dHky7IRpnV3N9qC8D0w+t3jH6J2CmIW1KEsnZ7hS45SAT6E0kFraSn8Q4Xoh8f9xG8pP6JgJgmcOV1XBtTGxRQ7d+uQPgca9/VX8W8vKWL4m8gbmvYyRHHneW2CcrkS19No6WMmvcWX8bUUnwqJwOlN/gJdfEsxcraDuRqpRN/mcPUHxIooRhnIf7KCS1Z67xeU1T3pApRQXSb4l06mZxp9l064O1GwmIoFThhBwvQzaaKoZGDCUuppgc/9G5bGQ+aMi2RbtmSmKyVGC3YkRwwsEK50/U0pAT5tcUi6Yl12qChFRDaiOzYM4B5G5PZDrNQZVuNDGrUgg5UUfo7PddVWZtNTNJ2yw7dTXtgLCzxRXLbVfhAFLYp6lHFT2dDtVdYU7g/f+64dDsNCn2QdCNsPoRR+1iGoRgPb4akIpF1hY4xtAmbYv3gzGxguCrEJNRuOg8K0hPExcQxBdH22ewDinkYWy8kw7xcsCMbfLHnPOKtczp5n6vwzKnJVoKLSvw5EijEKfsr8r3FgVjCvDoHiDzAXBIyOKdR/gP/OSyrwU0wONOrACHIrDr7UOHwrvpDG+hhIcjV0mA7zVvsksFdS9c2bZ2EOCkZCIoRRT2GkaCDUXLUCDg8yvX0OAKSaSJQTAMbFTl0a6rjgJKs5jZuQlw33cVmWCAQtHuSmpwA3n1E49w59WQYS3yJPjS+a18ay8rxFQqrqJQj9KzYJJ422QRLzK2qkpWpwIb+iUhxEtRQ1lI4O0TacIGI6ZeOXGh0UII7ZiJYLgLQSb1/XR9PNZl/+ImUApXoiZT8XbRIpT5dCw4weiEgDwAmVQkVrxVZ6m/33XaeeVK+7nAnsLkpMke1JnGgrYhqVwVAJr85faK9yC5AAxucxBBho3w2CFuRZwH6cKTPWfpgMZ1fpIim+VwyTHKUrSwJ0sLJisaqfjAS9KEOd3icZ7KWtmQCM97jtFkQfBweZ2uy/IFVYnFhIYX9jIg4kERCcilfexARttQ0HKo1oLAgKuYsXxsU0jaE1eb/v2ylKs0Ekw9xa/F4rDVIbHPjhOpPeUHuWa5rhoC5TGx/HsU0zoK/cJvkwmwrD6dlT4bO6lrfOQWCgPRFJx40IBbY9+NwAF0BFkflgxpijPI5f+05HR67Wc9tP1+Z6AFf0J8NXlA5oZRBggvy63jCC6IyjeG0P598KRqK9OiYULtVHKz1f1prYxDlB8AiRFfsbGOFCIymUDYA1Ea7bJwm78YewsyBrg+Sjhb0bS4AqpZGiu34jcxcKXxeeQpdyM1QYQxpac+NGY/UmAcnmEdirVSwjHuMXjsQ3fiTacpuZ7YvHLc9lO9P9tnv5GGh2/qcU7CYBemjvY4B4o4TbEWhAufDCBHCiwgb55ewHopOyNe1NqM5qa7hTFqx/XtA8TzPYrdKU+AgxguvzzMsjIiCnOdjUI60QvjCnlUnzo40v/GtE0DwYwffQJDNB5TvBOlkT+IX7t/2btxa/qtqdqGkJ4b01NVzPz20znDiXJZORQj6ROFYrU1SFCIf79N77ZIU/tfDeb8iBSarByVKyWPZEIwWVo85S2L5HnpD5/CDhSpX232aSrdj44/xAcW5MqPpDzNTwOgkXFxkLsYp4DYk0eOozvcngu/ncntAG/3HYbCWhXW79Bdyn9BUCSFyzYUIXHDb7S1j9/JKqPKrTDHEqvYsNPDexjq6Y2Y/i7n4xBJXDNQYbp8NEhPrWOe/zTXJbTsDjB/eWx1o/EP2SfN1AcNLAp/q3xvDzvoxVNiBeDZTNgAoY8KBrwCw2F9AHnjtTNGuhg8TK1vfk2Ax3UC5Zja6fFX3cIHmuz89Hpcp8oWpeCWqfmM8XREgr5gX8OPQCowtQE/oz/GBN5KvJjbhuMz6UgkBRq1xKk8Y7yXGz+/JPnJglkVgALLuzO6d+afp8TJijQbVoj6kyb3ZBcTbptd7Cn6SiRzHeoHK5jbOr/pJmkdT2nFBe9yHQjp5TW+TE7t+GmBkuUsLMoRqfA2DD6Zp3TQQMy8qtxPJktEHT8CgxQBfjhnvbII9/4Rf/Z8Ds+3FXTb996/6v+RCh3e5ovUqrFoGzFV5M2v3GzF1cCAhyxBXRf/8K4f1EBUy8YKb/GuHBUDdNBwjIwZVzzSXWD9IDXmSMZidB/MAmn8Q4ZmtF5MFVqgfJhDl6guHZEuOZSxYWwYTCwWLf8Wi+V50i9jyrmgwylrxg8C4/zwDW8hn8NCSQfFRHi3c/Uo7Sxx/HJo6l42Q/vlxO6udv5MWK/cbdgyISxd//Vwa0u7etn4KOGRZfdUl9xfvx1OWP4ykHmzHJzaLIAtPoptzj3llkaGQ2uN3IIotfVLxZbiIzOO+bz+Q92vrlLrMiyz7kjIa4dcxmNZ7GDfeOpYxfkofxTXHzaLgOCcAUk2oQYX9IpBs8uWdDe6lyyUHva/EWFc9EOUz17OM7Rk9FwU/pwMOyhpXdqZ0cfbrGcpx1X407R9xNfQfbw2+z5gVgwitsfxgrwXlMt6XQEQT/hN09CJ1jA9E48YIU2lMRrnKI/tI+uSCnfOw8ithkRCbp8gDVfa1IytqSyggQ1Y4RgA+HcItHAkhco8mz2Y7cFysWtHbFeXdDG63A+SkUhJ2ZxzM5SpVReJHbBFzWi4ut9KwrniOXgZCSISYPMijPnB0VWJvLw/hSjG+dcx6FDw75zbhnje5ohOqyBml7GRYm26+MhF0jhHDHodagnTTKhgRTrL1o19pRlhboFTKvxCOf2ujlkWyO+u1ntpSMSivc4F3GtAiE3EGRPXZzh05wFveYaXXbAl6dnXX8EDEqAIBitBNhCNerxBpZHWW9/yunzrAfHhRzi2tCF08GqEGD/9lDJvHwKOBi30i5lN3yKIa3PP+ygw3i/01p/UlPMnA0hieVYovstEOLQP/1ekFMfSRyX5Q7/jWNIPQuIOyJGuHeBe9ZHA+3RXTlq/LEdzbdfztg9jvRSFnL0/kswZ07mycm3CRnq9+XOReo2w39XrE11WJN/eCmMt+bfUQKTfXAIzPuSQS3V90PiN+i/BxcSDeBLvG5x+IWcFVS8xPs+c3rZKZmawn6lJ9oa9n7eRYTaacMjXAFfxg8ppyLJwu1SyfpAKNk850AG8IWyEgjyhQWSJxXcVA0TD/DG4Jx15nvLG/59XHjV+DpVb6npbSaI4O5YJrlGF4x25Rhsr4wj8Z9Bl8AWuP7zHo4nwo3/ET9c2+R12fYyOqhEb/26EokaeSBECCavhW2dEcEyGXrPDrX5Pg0bq3vdCwq6aLxTxMNKPOJ3a/rjiA2bCQ4Rj03lc/YEsNI0lqZSGJti3JbAlzcPkj7JSA1NE+nhWpg124q2W2z8N9K/7xJVqVAol9rq20LjPMJyRXRGuZYlRG8WaffWaY2scPAVqUc/UJbPDTP1xPlD3j9S3fzTN3sgQOFlgQ1WNO7Q8CZGyz47a2SrSBLksei5EU63gdjGwd7DitpIiSMRbBCfz5kPF9MhPnbmfsS67LAwd9ZuinJ3ExZVjMyCabjLI/oAWJ2tQ3Du8zLBvh4XljY/PMl41hH6BnzHAZ1IakR/8vs50wpRqqQ8gQZjKp94o2jxO3+JCiFcsMqoDwrNBhsQVGu53regsM0LvzChF3BG3ZldnimNVOmhUJlGGoKE/NjjEpf4Ubz3OVQ8/8UGXrON4GfoUgaT4kC7AhrjZgOc3XMznOvf4dZulsu0I6OstULcLOsIlEK2bJsMNkx90BvNICkEZ7QTBHWlV7F/mqhpwz21SRJVKnSbtbn1pdOI4rYWU0d1565P0cEuE3LPDggr2Fuf65muiBiNS+QCXHVZnB5rpLbrG7x4NasJxTcvAwJqBhjivYSy6AnjcwFo5HL8PTDFKWX1g2Vt7HRY6ea0JkKqH1oqi2NvUKU5TR6GkfkXn6RizDP5V9F//Jb/5RURZhbVe4Bmta9K3XMthKEYs0IaTszLUBNnGEKKUGUUcBEfmDcyLA78g2ZKQl5ZcVnwgJjdjJx7nayr5QY1z1o6p1f3qZwWBn6XqJugUK05Vn4o1ljECDGMIGoW+baqECI1J10WrRMH1a3ebdyxOvPKKkM0WTqpYoCx+qb6tK2zq34kPU6/SLbwl/2U9NU78jqLSLOxvfqq0x8qFSaYmKOdQ3jakFZv9cW9UPalWQ4k7MmFgMH5DHkrrSaxV/5ahx0Xq7a3FewDER2INWwYS2FSGNYW3uYPKSkf0EHTqA7j06MdFL58DNcJ/tCPWbjKbIFkz+tsb2ByEoA6o35qbzfMK+QRiJb9Vq3W8WWsMonuTuA4ZFC79xGj1LHp55ajsdnec6Urq05oH0fmdr8j2Imt0mMmqMfrQoO8Q2G/6jsj4PS88Hc3CISYO8OypfW/dlzxLI4uda+q5JSBRr2dUlba0wCkOwJ90k6KLw0EtmR3YfYsucOKpAJXuzC9shlLFhE2Hwc0dXHk/auRcC/bk8J0C1vIJ/ddQPw5bwLHxn1x4QKMSzlw48T/I6fxGH37ARqsw5RdGeh1dmBN42ceXiridPW4Z4Y/zxJH+d2xRQ7D7VmN4U5DseZ920C8tP2seeuSwz27MtjrgNH/M4ovclY2SMROqKffW9WxjNne1gr5a6CKZcqUjm2bI7vMgL5/Jg1TKrJ5bzSsQV+T71fBW3G9hMD1xbmG08SdtXN8F3z4m+61BuKdLwY3ogiVypVBXhDkdS1kEZJAueXf/JEm/oTtxEJe7UCF7S+/+Mod8rIFDvRGNwvKzbSLLKbfIr8eDomnARk6TQ+oaG0vSNDKhhYcrE4JCCBQYA+qpMrC32A0aJhz/n4md//pWuf6d3IdRQHoOSQNldPFIViXZGTapPslh1vV0BiAHzabQ+mkclLcWs8ur/8DGCwzsMZVtP1CRCmjC/ayjOkVP2GI7bG3CMmubO81Rwy0Heq9mfA3g1Jh7HpLRQrKvqihsecxX1Hno36VQ3lRtOjDrZDbtcQu6cy+gbK08W8L5Jdwl4/QSFMqll1RYUJ/XNNosT2VwOscNCWwnF7SPl0i9QcAs2ThrQQ9pi+WUXmT5g3nR0T4VURZ6gUAOtFBiZUNK6iqoo/3LUcmktsEmY3akI/Eaog7KUTbk9RE1RX2LA77aksW3Y8zYmSRXRnw9RoRxzQ7fBGb1C4wtPIF86+CrEnyRbGWl/JcGsUxSsvJUWLyCe4EDmuKUIs7XJ5IXSnRy3EGR2p2ZbBXK98NtOvjldcva5Mby85mBhNco3pyB8gtRujIjA24DvzsMCrjr7dxFRARGcHsl9dIn1MRBn4xc0Cj2uunOwl1sovkwJ/feo2HLXyK7Pwf1vg30xFtl3fzlTyfiiS+EOY3+/yoZso2t26uydbmoY0cmsac4P9M03xPZuCQmzBHer5F89fUhPmkZUP6Wsz0qu38S7vnijE/hvllDoS3D0UTm7umyoXvs3mWAgTMEQ2oz9FMTfx3jM38+n+erYMjJzcDinnjtn6/ySrPcZRV5mlTK1/ZAOuYasDF5wWlWcYlYe6xBghmekYqQMeGDFvceLAcESVYJOWSJ+kF10hyQjcCmEkarJdRyCrQ+vxtOi6DK6ZHdwJMtKMwDda6dcBnZYQnKXOg0lGMtcJiM5BoQhONXqb/PhuM17e4uHGdNKx2IhU8fPkouniQjUQ5Vr56rCA2jO3PLZN41kbDf79TXCUVHbT4Bl+s52hbinqZYaDsGXlL/vxEtLCv5nPDHkZCkdirH9u7qM+G6soUCPrulwuBDEYSYq7wDOjyC8YU5ZHp87ECm8xSw/dbGX6KgTkke2WDJYSWHdF8Lv9p0CB7aMYvP+EhhNCG8NP1jPgfD3glVYzpcdOW/mXGc2aAnYHhXZqO6ykXArgQanb0R+0a0suiOLxNXRiPmh+vRnhF5KOKDxdKa23Bf2BTP8fcxwOLAGIjkyoWzL2+XhwKksSr6CwK17iCO0rZAvfSGsI6h7mJq11k5eNchQtAqdPKUBhlzMPcC/ojz7Ru3hjnZ+KJ5NCNoX660DI0eKgX/AHQLyiZEtCTQ6kZzLOT5fF9GHYlS9TD4QtlEoi1j05KRq6X9rA89r/xE0+BomBBppg4KGnQYtLU1ad1XlPKx05m2mIYB14jqL7BwVhvbFDnrBVZ8YQ4Zj+fBjupzkFaIrSo1pYNGlW2WVUuEe4mxJkAkr1HUdjyF3RbitsOo2yBW24wUUTU6sCtHyKTgPe2J08x2ASocxBdBE3QfdMrwn/qUcAjI8i1pvRs12t/FtK1tyv7qHGuS02evFKSQiyUbIoZLJYpIyhOvzYDABEXAmcMEH5b6R8KuDWtUBenJFKTwOj91wAZTBTglgBp/k1DTvjfCu/1MJWQWRX6ZWiG6GneFllQC7VXxg8A7L36uv8e/3tRud+eqqtJ3F4P6S5MYW+cKfTUWz9P3KWb4xGBER2PCNWPPxBYHeKJWAhoE2YsK9SmCCess/NuA5B0WT/cX//7dKG9fZbJ/1nV9mlMsi8U/jbWDDJpzARQOlaQOBdp9S+U8KR9ZRw6+OJrgzVBkIX9hH0mRjc8wjtThG0iYhp/zBRklHcpUffj7S0VU2q2aRDvxu0t90wxtmmRtusUSU9p9jJH2veeN62eSNjvJqoJkTvQ6cTQvXj3Snpv7czG37b+0r3z4NTeWwdvjF6bmDj1xxnjpIQX1dhatyyqVqoYfhcB/y64VWpS6V7f9rAmeHITajGZX07w953pRFIT18b6yhChT+CQgCfQJtAkpU4Kk1IkxaJoFLR6FqSqtLM+98f/Apw3UTrU34q8CEcz9Kz1OV+NrsiB0/5LR/NDtUhiXdgSqR00GRCiuTIiG479HykwP9dpTEZE8XEc+P1XNTr2Xz7459cxCE7M52meOvgvH/gh3dL/2TJ6M1Xik71U8KwrZ9aKR4T/y0f7o3BNxdhUIU+itYKSNpnkDtH8rU1T0OuGI7dmUA82UEncoX9kWA+NEmNtagOXUhRr1x7qMhWu+8sHxvWqaiqNYIm/Xb+L/5owAyR0ythyBEQYS8081My2Jj81AU0IWW/PE2yQM6fU18XiEz27Heoe49e6MWuKoI43iQkwLLw3o1r+JQHEj4p6CKvIzDc04fUHhKnveLcaHN+SdtCslZ3A/aQVLZ2+tAt+Oh6GvCc3+R5b3q4LOtd4zcOoNYEmZcO3epEtDomQWOuDwzzFVuPQsNuGyL4AjLeNke9KOotR2F8U5Q70bUoT6uOLvzYB7425xnxXSw5Gy7613U5CeMFug06iuExcMVgCYu1WX9MSltSvXZ8LbPF3mCHwRdI9d0vEEUpEUei0v10kLFN++aW6gVU0+HEXf/Z524EpbBGJFodmOBwerQmqUGscLQuNRy8sXP9mJK7PXrLuN6wt+XJaRVne/YilyoekhuS5mooRovwYCOAFbYKA+4BfcZSHvK97lefXwxipueQRVIDcYlMIL3c/iaQUlsB4QwVFkr3MkJwbuSuGQ12UEO0TOhRW1GBhqAYAPA22fFSWOXoBjMcdN8fcIgMe1EI8qh/U2aFlZZjz4U+DM6M3jj9uQact+DQEH+eqaBDRs/ClJTxNHYS/ppFN5+8KOA7XzWNW2k0n9o9MXXcGJW/9KXBLpNoS6i7LtGsSjdcDyKPMiw9dUvO0RbjtMJJU4X5WeO18ZOfthrhIQ+sbaW1+P/Mye+XOlO4SaZWUdktb7Z7iKv+J15UBjeyGPzdmoZAMJ99Sg1rOJqr8Ppv0kxLM9eIZUDX77FKx2Ns5pauJyUz5SVyNmNqrcK2aV8Zi9J0p3qehMlAzFngXs0fMZ1mJUsC00O+wDX1uUb1DyiPmswkSANfbSlMzg6fsJFW45JwO2MZBP9RlFr67HbXwK3ovHN8/ienRhHQWUZ+OnxIY8q5TmbvC02dViOKHGSFnqaGO+lwmMdc4rKEE/k5uJucM9F2JZAOFcUSXMJwHqTpRKGpGGFauACCSS5vj9mFxvIcVrNXf+6HLr6yEt5XspozPj8ylG5q+XbfUkhH6x+SG2uK2Oagn2qOcA/f44rfGLZbXOhfSH6wrQ8PBrMGb3bAvUBcZBJ6U+ojp322Nnv0JlVTFm9YRUStmuhnFIiwOu1FV0LQfgCluei0k7YaJ2DQuslWtjhAXW+VaKmpUfbEU69dLKUaZHPXIvc3mMwXWob6e2wADE0YceiIQnjgvoeZrr1Z6LJZGmAmosksKcVFqxMvrtrpULwqGqjgFRK7kNpEbxQYZylnVqBuKGDtkBX7hNISfm9+Ud8dq37Q1SoeXMUoQ/wDkvYxA9tJ5+NGg4ljtnkJqZmGmT0ZfIKol0kX7/ptzkB+5WAmTDBfWg11NFI9XGyJbqz64+7YEb/C3xGZOXJFagStnyUS2zUqWpCe5zPLLlK5D2WZphlGg3gIQ+dMbtQO8zumXi7Mjd77YdXDD3y2zPKwE4CAbHY8izhQNIF0zXzNQYA0H3oN1DrHwDGKoCMIrdBynt8hRIOVpv+4MITng3X4P0ynRgE963zlo8RogeV9phEeHLi11R0aGOsqV4ZwCztbnotGxRoJ/FmwxtQ1X5N6SgpCFs0jgUHN0g7VgJ4c1F6nrZbAwIpSkKiJKy+X/2EKlWBV6lSg8PY1zzTJhkqeg8ZKgaa4b9meXMt9O0iiXfebFsu5z09Qsb6dTm96u7dnjnW2kGehkejrBEPwDIl8JBpKqwVGlVOVDb611ePvMwXpRL07d71fBIWtL9udwo0gK2/ciozXPO0djuvdkjGmeMuQlvN8PDbU7GDuuWOV9pA7cL9wYZ+Qa24dTuLvqyL/nwM1wKrF3sX3g978+hBGbMG1dv9mNbzFPEZS3KGN6nP78BcIejB5So1WZj7Zg2V3T0JV6/9HDbQwvXKe+LryG4k52Mz9S4Ipllnxe6LVFZO1Vh9vkMYIHUjV1m9/2YFizLRjpV4D8LZj9sZ8d8sDeCKeIaLCeMxXtm7EpzDjblyYPsDW9rbugpes3mYQF95H3M7sgYkwwwzUqy+QqxZyvKS+/9h2PqNy72eynwM9ia/1NcY6V4Rq0WNMu1dUJjLvWlB5uqoqvqyMTtBXqznRfnloYW+uKUF8BqWhqTS+JDEvGXjSUHgLrg0GtqiwqIjP03b1TOatif0Z6P9Fz7XD/8J6O33io0WoCFXmI1/QGDXuFuJwokL5yPy7UVL5ogEin+PZbpkIVfXOMxn1ZHlpI8d+AMEjCbrff08tekO1fH1kWuF9SlJObwhyqZvPtiG+3Huo0WtoNwkql+tmNobemDVxgs5AYyzcMRX/w2FCniAMPvTK9JKPExd5+qa3aIxrcosnxIT35ZVDhKbJMaSHgE/E6LbWrnUaL8D0DpcLNyMpDYNXcd+ZGD7ARCbu0wkODEypjnJiNhqI04NjEhIdlcEEMeC7nyT3//m76Snm9ELtFo5YTO29DDBYZ0bS60QcWt5upPjsmNPkLdJQAzoLdPPC7ishXPc7hPd9mW7LgExMIJq67ipQ/NmYsFDIMrSjDZWOazvEK+Tz54Fh9AHwk1tqdn/gi7tnpQOP6Fy8PibnvOyupNx97Hb8rtVlRqzRpd7nPpPr+ek5DedoAsK3s/n4ZK2V5tWNHy2op2QI50Pflnkr7EWv0AAxlqZ61RQ0/Days+VGpjLqTz+SQfI8ItlHa21hIDUqmVTaUWeRo2QwLGfPP52yf49qmQbVht5Pw+Oz2lUL/3cZYcg3MNZ3hmIk9x71G9Q9EoutNMa0JEsPUGnuA3+qobB4tqYpprHwrDPnJRDNST+usdjsWtQIDLplFr2Qiur7U0NS4SblG6vgULR0fR8COmvNK+xiaIjKafv64ED0+XMTOo8cXXSFXyoDFHT3dEhAUrvXTJpd600N6KzPD6rT+RZ+PujyA9st2HvLwaisdNUbukr7rSUMsuyXIJyENqzZ5l/So8DRqUkFiKNfM22Afmq63Ub7jVHorPFpiNk/jTBiNGv+IZVpnrIZHlnlcG1/ztCU8vsiTjCP7KFs4R+AaTz5LyE/5z5AHXt4fO8/+IvSWfxyN3GPW3xG1Q5eKkjJRGcSPNV8tWSnjzuvM9XgUItppbEyXuhLTIbZUt006JZ9gl8ucxDGH+vkBcRJq8+diuQX1nRazSou3u94s01roTtvQ7yQMRoXHLk5rW2wrQnQbJYv4LSqdNridz4LFQRpNKjjMbppIao8bRZFoqHGOUCJXneBUNaOGGG+2dindNBcsZfWzuy033vQ5JtTmPxZMw+u8Ce+MzPXm+rVVaKHZnS9AK4KktVUzcXtfyjztsGZ5hinM8rI2K44HG+vcFe4iAanIOAiUzKOzHweK5N1jriM2jJk6aaiVzfaBAdrEBTtUWaDt3m63sd6LtuWE0eqSSgLFVlcq9oGqMz7CrosnNxpSZ3A9OVOs1v2eg7AR7XS4bV7/9HLp50pIXyrOYtdbyTVaV4PXULDzVTY3lws6AQpuomSI17wP9ogXDYifDc5sngteUlgSa4iFx2p/P2IX8LbO0WratGM3SDYW6HlToyrI0auip25fUveP6HuDXIU2UwytUgkeP2/xqHtxjIuNqvWa6bMKS6eBNEH2aH041xstStA0xuy/6ATxW8nhK1JQVSDoeK1Qu0kQqUMwdX6NLNu3bEbzuNkSXDjTdgnLOV67olU3kNJcdLZk4vGB9n3vHyYP3QmGNkHDTY4vp9TdZkeJe7935ex3yZbOJ1FJj+LgJtzz0GGui+0hIzHRIL3C5n1JfxKlQQcqaSpdD4XYRkNHSV6sDGu3vP9BgZWreUq2k+Ca5cZ40aPR4t6mZ5hof+ZQ4tKVIz1G+COZOdNNGc9iUJ+apv4GYSnVYq6MrBTEurXRGAoXPtFa6baNaAzXDnFhkIqPETrrBXasahltd3y80ZPbk1JoHXzUyInd7R2h42hrmtC2jqYj3ZbEuGdEp/A76Eq8p7P/bikd/IIzmq03D/+d+XivdH4pbBntNgsAVXP13kVQpe20QwqL5QJvAm5tBylX1PlBL6NEo1lbeQQp5VsVCk9JzkM5plGGPK5ZuW4xfAkI0XPjoI2lkqCKIc0Lv7AFWF0Fw4VGZtVu305hJeASkRXh61PaNzSQBDfGvypJl6fp/2+csqWfJYCbp9+w8Qb35SjhqFD+VkWaEQflMk694fHXzr0OHm2kjd1ot08AsZZR2k6aUrCfenFjaEbTjmTeOG4sOarjpdDYLAbqE8Iupt6vfIcPfApWGTCVlsp3LW4gXSuVMyXifomhoROFqejVFH5IplaEjj7EPYhKB9zFhaW0Cr3NRH9rFkwF/V5ADEWszRl63JohdikUmLByeGHRMhcnQUardoCIaALQnPSFkX0ZixBGbOjxzqZWmQ6hz7gCtsARS+zA7Bx6IJLj8oJQBPyOKyMIJu8lDkt4IN1Jshp09KrJrrEGx9/bkUdbJlkwZgmMhruh7Oc0hN+O2qiOIiCqFI9Ff+0I4zzjMInjnPJ8sl8bEg3o/cRwAXSDwp/5VMkMr88cXyA4puTS5VT6Ik9XALcLYjvgQYfmUKUBR3tF7QI2MDaBPXwn6N7b4ho1SmFUGvNoTp8d+6hTK1WojuxZQiSofGgDHCxtLowdWg7AgpWxSRyJUMiQ4swvejBciKdH1XYSG1L6kWlsOdEWe7N7knZYjKNMboqUA7QVppGwc+tecXb3zBqwSgaQYJoDmbk1T3ypqNSLhj5euX9xKtfSo6NZMXoL5BIus44IhKP/Q+Vb//APMsgd2lCAMZj1wxxuRhMkNhC29ndYZDw9Y7p0Mw7z7YdjoWF3yy4dWdjddFdSq7ye2UIyZJkSmSJE+yU1b5DJxWVSJmZTY/BYSPHB1I5Nhz93yxh1cZYFYT77g+fJ6M+eFC4X+DuYNpdGf3eybgroj+hUyjiMI5dCKve2LWq93MrVx1IpBuXvCH0dpB3IwRy4xpQEWL6Em7UGmeepW5irMfKbbrNfx1SjMkq9Dq4dZQBrJ/8oThds+PVPsPaPBDd3VYO2DQvAJx23qm/OdSrVg1GOvl+gayE0eWT7HhYBA/fbwmkFLf7g8bdK3mF8soaN0Vutro82NB4Zg+Hk3XFyEfD2dbTwkz7/Mw00idre1waWmi5hDi5NWJOJjN+KBLA+MPHJHujnDe4qJRGbdvFKlIDGyK9C23dMPXbxjtIdCb5kdxOmowWxv0+ZZl2Kr2EiuzoFFZQGSdxxymnAJ+W0ltLNu6OtYkCztXKw90fLqv2mmwhlQTLzA6fOTUnTyByVQaZGUbgi6inz030dgba7iFOt8fZgrv84UnpY+JQxeyCB+2/47Bp0FNXa8PKdRKtu8yeiflYxTMxOndwLCWxTsV9r1bYNayLQbLKrsXO6ojxHkZ3KcSf2Cc6RCayz/dIOqxXyT6L0JtoyQGQPNRXwlYOQFEf6F2BAun4pD9d2XPTjTmSaST0CeYx+38A5GbqvxEFzz/y2xp9ArmiKByRNECVLuXXjTdr4QVpTX80c/hL8BWw9/Ut7qpEUHeDHPLUe2R5q76H0+M1o/GHD4GqMdhLy7+RpnnqgQsEu2/1+tTyebCF/VoyGz/iEouyDMI5O/5oQ/96ck8dZw9Ghtg+Xc9S7Jct4RbxSZj9PzTd05CnXin0XgkLBb6Waqnt8SS1iwmqRRTrLc77rL9EzV4k64mjbfTdDtKPPNX77hgx/S50xYe7wImix6Aqe49kGZGzIcn5ZTQ8Utroc/UZ+1bWoZNGTZc7b99vYtLvbXUtTcmNJyNjnsT2XWfe2tgmtkF5yZR/HJEXkDLF2PbzOaykCpwYqt9PYlDKqam22VMkSUFdIVvFkGfFHs+HPK6G2N3Ack183sYJAddCzOnZ4lvHVDZgOYfyvvRjuXMqh8AoRi8z5dE5RpyBhJMKhDlhQdeAOFQHlUKctsiNQNEzaiptUSj3QiOvxykzPmKfMO6arbbKHj+2WNREqV1to7x4WIIgUpTeZ5j+LxufiybIR/k7otQMyYhM3pWBbC0iG6rwAtkJXIL1LTDHm0eUSW1G2mk3Ax/rZlFZ8v9aTes/qHIZYrKRCNPLByuiqIAmMZi24rBiR0NiokDB3YUeQTCxzCuqZpJLyKKFYRpgsW9v1VDAG45PSmmAdB8D7qSncS7Xc2XBQnSQMfnRVlNiRZa93T6LgNpoQmcnr4BTNS8yPCD6SJFJCHf16Z8foSnmt33zvdXl7z4DttMlusLnwbHD4tEYLaiNb04GvX8SoUKkmdCh1i8/iOPc6DPLGNg43+HSeSe1uSPN/jvl63aj+1wQtBFtr/5FprsWXX6h4+zcoeMz7evvz/it8278H2JIN9mzARs/BV4/bx37/NY85cFKCDyUws/X743XroNTZZynytAT3+rmUgxth1PvynIvz0TZSoAyHCjtU0Bn2UWSwiJqIOpULf9ycRb4PguIXL7gx71NIpoTbFSM5ICrZl5l4v71ckIifmMtRvWmvWQitAieQUc9IRhSC0iQJeJpKRLDFrU2SmJahWRToqcjMiZb1PqmrV+U9jHzKwET2XCwuwQsH+ndAAI5oG69qEbwq/B9tEfPhDmgDkb7VDQXzj10bxlhbUbD4CksJfTHO2JFc+nFldL6qYHiIkddVhcRFmUp8rd2zh0z92qS8mAWiXnG8IT9aSocU/XYTxkjK050hZV1UVTIrLuc1O7PhRJTfbq24/caBqjzfTn7Hp/ygFGKMrnXdhNQnFoKESEQ40JyiqlM1rWrLgLiqmhKQJyxRHPGAT+XRXt7Vphj9/405F4DQ2lQz+mIFUWh78JgVPUsovdxZ25cYAMWJMR9cR+QEzokcVo6mXhquXRDe9id7wfM2HP69w/HHA9U0ePI5z6ItIKSz1VIapUqx00CviDhOJCzFZc8nzl0IxuQwdKyBKZIlAlRhXgPqIf7b+o7txsyI8+9aw9itVCJT0qjwpb2wFZULpeX5ZESjqUwfoWw3E5JJ1FESwpoNLLiZKjHYijqtSnbIp+oLWXOikSylkjbi4Xr0KsrsEGBrq1/o56Xk83rR/BGvsTamKBhNXG0LIzgLQ8hqeahrWAQe5IliKueVHAyQbLR4bu9LmfXQoE37A8JMc0Bowh2o2nO5pHJQBQfiJvF5WgXFkSEpp9WnTcjWP+i4ZU4hx5BIt6Q3Fuwdu3P2LHwaeZr+6an2skvu8WkfME6izpNUiztjjm1ge0GWeIcSdNnlxzuzlTyNk7tBOg7h5T1oC5gF9KrfwV737VlfVkrrbxyvh/sOjbPD3kY/R6HISGBL0xBWGW8C6TsAenT4NtBdRHkbRmPmJrYN0st9rWx/2Je10vwYrj6I192m1Wg5+pYUFmWE49jxt0a1uU5U48bjK1m7sAnYdTKiN3COognYUpOGxc1FQHnxC1YJdxbiarg2iIhMN2WpwunVJE+VcMkkxCmFiK0a7CckwYg31OF2vCBUOoyNHn7VsUBGWL2Iwxn/0ZBv/HcOWW4NrOm5PnH48i/Vre0MbOGobfV2a/s4j0bfP7QbXDdgOo75jIbs9pO2OgdlIWvVkWV0nJ8Moq1sbAmXFLY0KtuI0Z4dUo72qkqkG1IvzotAVwqtRTBj/c0Y7Ri12M/xV+CHRmX0MbomIZBhOEcD0pTxSqw94kdFERV1iCBR/oMh91DI6PJqoxQeBvvsUWwcbMzqotBs2laM6pXaNfXVLIRR2FQMWpqrPQga9vy4YP/H5db1D8moTaTNnuK/BkfPo+H91i7CqdpP9VMXFeH4e2efSu6s+kexe3sUhGyikKf4yIZtOTyb+7+7+4mqpE05/9l8jTWJYDUcBITOMHiUajKJxZ/ZVU7oniBQqLDwW63xepCYoVWNzeUXJGhrd8P2GEPm33a3JJkH+cZCxT24+S+EOZG+32ot7XxKLfu2PLYvBgwMqkgCHNSUZZU2OlSUBgWWJ4U7MpfYq19q0TKBr7Yg5eyqjIou1t4lG+0wi9dMi+ukZp8KpQpDQBBgmhRMDdc/Ke0kt5iQU/twV5X3S4VDgPBJMrl4+j4lqUkMPiWFmDrHyUCR9HofyqGvm/2ANmr2HWt8YK08cdb7KAocjhZfUtxJgUvSYH6G9Kgbnw6SZSdHL7TlDb6Ug0tUeZjsF+Mshvv3fM9v8plv06BTl33tJTw7opkcO2RKA1bQTQPdICbAI3KzQHzHJuaCFZYnnEA+afdqpp3eR/jSqXWaaDghmadxXtkmwCOJodXIKarXXKAzEVehxXolR38xRDIMUlgZy8ntsaYTCp+UFJwl1buAWsXbI0hrQEWnaGaI4OGbknlaQVJcO/ozvdfiCr6p+rxceG0FUTD8pnmUoHHyyzYrffTwAFiyIAyz9AMK9nhpDj2vEuauTrhEIlf24SZrA2ZSF7nG56+4coWmqHzE9kVKSunCyQk3O3Euhz44x2V/FJefytWXfkwnvvNcGzlTjnNipM/oEnhAE3vtf0Se2YpUaKB9ElqjMKSuytSU4auaFcMB5FemlThpMCXHPWwzDTaUkHSYEEXDV4nIMVArGu8JqtAdzoW1yoTR79JJQMceCr9O4CRlQqdxvw+wHJqIeMpWW1FnV8XM6vHOm9WKkM70h9NLHu52pqoeJ9hQSkx0SsOx9smJNioC6PeUavINcAFk6ge6y2UfcgOrM3IekEeESDO6BZ51sDuL9cd3w/ld7pbSESfvMI7npG1PaxP6+r8l99yWvMS/PPHarDyqXtSI0VNTO4vDF+lCfV+s5SO9U5MulUo1pou4+aQzyfmAmUGdM63ih9I0broRoLDYmSn1qpxCUhv7KRSlOHcv3VyetQP3aifZZJx5uWb6tDe37loxNDuszagZNBgFzeqm+DL2Sogd2kZuamtxggUXYv3+0fxWSWPSTsbLR9Xvtnobg+FMAYfF2LPS0NybP7sAewvWhunhu+NKw84hSx40DUaojGmiXVKZJ6usTcEiHGadkQKBEElHHoM7faIBfpuorXrrKIdJY97OdaLLFXTfaYoM4SJ8toAHhty29ACpBux5iw29FEEwWtyr9EJuRJb0HNCHKSVkVNB0KIZCCJhzXXLxiW3apcpMkKs1s/5/BXtAwf4v0hhYEvKIzUlLPLjMvh1hB7xwIN15QU2vH0a/qRP5T64J6bUbnV2lUbPPxRRGhCLRVKGyccVatICbbTy/XSURC5aSEFcxgxwXFKPqX885mY0QMF4Bc/c/VowdufrEkyg3lKIPjlvVZ/0RKuxRDARvnfhf7DoRXeurI/vK9FV7Om9HENzSzyi1LjnzfsWbHivnhdQUv4ZAu63EFK7ToH1mI3Arruc089qbEgQmlcao3IiOkgbR9kNyjy3H9mNoiI538+hWS8jyCx1gUdUcE04AdVR3oxFuJxLvN5O1t7XBwiJH/JEsVaCdcG6+38ikEXG4wRy2SG1D/5IqH0yIh85LKlTw/di2XLTr2WZkdSQ6RKEdMQuyOt5elpgaX+F0OQ4g+3GWXI930iAqU7Q6fmEGjeyQVOrkjfO4YRhaJr7fnAmAS+5B/UKkvG2ehoBt8UGxW4Bmsr8oliSgFtZW4kIdWtVjU1NEdJzWVDNQbXIzyEWE/bXgKami7iVhokitn9fTE2J/TdqqdZKW54eCZDd8vsjXQqoYuxz5BDD+u5s39nOl3urVd0zk8ySHnpTCYVm1eFI5TaIwdIGQ8l1NuIBVDaBVGxV6lcRx8Ybl6a9LhqQBtJpVFj9ULLSIrhqpvcH6u7dUvA2V43UNxPYMjJtM2kdADLMptKYPhogZxjRX/acLsenuIYVexIr3ZfFZu2lh+3CZSernvZAWqWqHPo4HidTA/CodqW+uXx8T6E+NcOYggNVFS2vrC7k78PvZd4R/7/LzVcoRRtMwSc8N/jyuzBov/OGtSz8rMQaoV5bdezaFFO9ePSyEE+99k0kt+eKMwkQfj+SJwhQ79zhTJrj1WzK77e/H9JPns4fzLlUdIAZvGK0DTc2O75oDH4d83b++61KqFR1Ej+NHAZb09VzjVW45wB1xpfq8QUVRuxz3vABiGKxWCyFI3cz3XyeFTWEIZAERyDh9+1wiCfcx6QbqPX6P6KlywHKZBaURumLX6wliMzAY7ORHQX263hTscFqsXERfFIORWuWSmRv3s3FM4GWgLttC3z9X0vXlkIgxS9LrlmCIsXzIb942loh0B/xOKatqXB2rkU8fcoM3eLIER52hMNdjBV9sqgtsEwzT0Opd4qVITRqpIhg/Oe8eWzyKG6sF+Q+B4RoKRiP2yB6xFhjp8gGbcUDT4SGH/aOhHS0yyBpNKr4P9iotn8WTy/vcaX4Lx8NC5redhDkdOeEfX11S7O6OPxZ4Z1Bu39wNhHbZiyABLpQmCQ7X+cnDRU/q4U9T9fQtfJjTlaIh/ey38fhjf8mIAUwoGHghKwLuxAA0yRb2v3HKtpTP0BSiaK07yGMe9PmGFZrtVZX+yHDMzGYONZ127sjuZw62GVneratpP2zPt3V2jFNVJuHPXmbTyu2T7yliGBm/xiOJH2o3oPlgrRhtIiPQSnm5/eN914M22qpP5SjKHnIfHFu/66Ma7FeQ00Dqj4oyQ4e5wQH7ewRy9UhKUSVyEyJ51SWz9p9cBm182XYNDki21b4AXcmKFF8Z3TgI5HRbLwj77lnPvDjX7iVHc0oJLaduE2+m21OkkzbFAQ740GKM9xwMHinUo0YVUUTBMhJvZ71jFOfzVcFaHrLEO1TC/iFedf03wgaV3Bzvg3jOjp5YRZ5TfzDiK9L/yVXJxR88Hsuxu3qArhRvQZHJPZoKhFZzuqDMQEL3uFMUwgFWhSiXP3K5BkbhmQ1qHMz+vFqyHXAcqx+AKUGEYP/INN+eWSuPtzeKaJ9gM0/K2URnhib7gKH46f33isQH96gaAiGHEAHcwrJBCUW+x572ir36StmcKQ+mMNs82Cnm3a3K9sS3uK6G9juyT9wY2lNslPacD1A9IDfxVrt/JsAHNC+FkRrdJUh3MSdmcGhccnZLFrzxrFw6CKBNvdzV93ODqmNE/2Z+cJZfzGsNuxZ7E4aUljiDK9dTRLG4GD1q1uYjcEjFxwtaYdeH3KOKJx4E8jdAKrVGwFWtmGoRgqlynujQgpIpadmFjWTHXnUsKgZ/Nce1Je86eBuimV4M0jKTUJacRifwgfjnLsvw9H9RV26TtJzoSw4aRkwZ8Ix4PmBtEt075oofdZM7MUKrrBDOMqQOZWXzYxwbn+QiFBacJw8xN3T4fbJkeOksay8WwQWRPQTMHuuD/Hy67M6IWb43hEJVHWLD9CIfA0JMedsWtUN4YUugnXjzjP9Cl2tO+wJyJi8mQ3T2j5iWKUa8m4yh+IQSkH0BM4LS3VSMh3yMWEhtyhhlquBbQ3plsyPwaPU7vaQczlLKbBlZtpcUkIahUhyuQR28lNfMg6YaVU3p7EOe/FwQ2IAkJd0Ahl7D4rfG5V/f+cGaGflKV4fM814bBCt8fTMRK4mKsIJDXp9qVMo0gjugnto2l9sn1SbLqqjAYGyGEuyNsMIEgnv0IdUBi0FGDAy4plSyScbLb81lFAdziimOFwtk4Rky5OAtUlGV+i5GNZe36tteFWtBGKD4talXIOGmT5pqd5LUCQ9JEGeroXEZSrVT+4c/AiveDe6r/C/XXTvvW7OKTcoaP0mIl/8dl0Micm9JaUc/nWFVw5xb+B9EwOB2LDv5d6EbBxNyyeSfw+FbO/3pp2J3jsERO4HAB339UayuvNg/YP5XXAjC/RUEr5M3Qnam7WcBU23DkkBg+O9KO3X1bZAfwE58OKeP6Uy0l6XXfVPvGCojHsvlvc+gkKSnd0U24tIdU15Dm9gRsF7h0SmLQnCLGRAwDrwkc+wjy6jnQjUvuQgWc/aAPo7prDP/RPd6qZAp/MtjT7CGjXnUNWdvzRG88Q4ADLIcUTToL4pCKjSuctuFcYpJBY1+OanQvKdoVZLW45cYyjhsskWJCnQFCxPINWJHQcky95AjJ5jxKz39wgMal5gR1CcFkmlAmXnG1Omp5VtQ9db0mp+mSfljZpumAJkX7tRXmrrkL5sb5D0SDbxBRsNGotZyvwRs0gAmMou806thikkiHicL/UhX/PVRJ6m+bAVStooM8ge/a5iTj1NV4Ybq8UrBmvmZs87TYm40r3qP7d7z9xn9XN8KrpZaPPsUDsCUVU4p7v93Rs5pBXYw/h313WlnMzeCKfGZ4UH/Q//yL1+oNn8+hvaYQhwpaCzirZE09YhC9j1Kv1naFJ6zsRi/mcVv3k3iKUVYOsIWGeElmdZfYX2TSWwUgBm7QJ9s8yqlipfPTK8nV4I6m89jlntJ1fpESk1vvxX6NAdMZwK7RYfzYVnqd/XTO9C3yIAFoz3OLEpxEcWiKTey6UvPyvH+OOjhResUZJGphnFkWyEePTegrgSvSwQzVJMxveFKtauSBzQ/aH51ftCHE7htJGQK1FPaGmXrFhI87tRokrqy+RnlquSt/kidRy0VueZmDsnyddvr0lc+irFdjzFuF9BnDG9+JcBVUq12cy4SN5BHzabVAMaRBXA3+Wp49yCOUuQxsdINKnQQKtlv405u81yu95/xhk/BzGQf0DPDEduPUFYlaSm3yywUHHSz8Ju8D3RN8DiQcFjbuxlwZSAGjBQ5QrNKnDyS7Zo+GLHsCgeJh5TiZme8jeOHefOHUNwive7u+NuWZmpUSKfrioqD1SYN51IhSh0mzrB+t9k2EW4yk0x5hN9MdDO5wYKW8DT358bUI/HKztstiXPd4wF85dTEzsLups0BKyzUN6FzDX1LtfcvV1id2SXLmfnaJp4vYPNU2GS+KPL7xGNpEpoKTPfFnuLT7QxSOfFNRm6YfSamnPHv3MqEgu+Zh7SnpHt2kmNTPLJybJc3dr81mh2rQvm3MUhQvLutHmfOlcz6sCDNe2ubrJGszZF22w7EVB78TfbtXzHFxD9PtziO1XdO+8Dsv9blepYUL00cnr2nHj/tC5saTSwe8fenpXpr4oI3nKUXVBRDz4RPIl5WQ7DCXEy87X0lWfkDyWT+FLVOjUV2Zrl7iMWby7GkFqdwQRDtL05yKyu49xJG3ArEwuJOvcjh1NkAUVMXn2tA87ZlaclTWtWKRpySqcjo9sCGpd/dOx/ocpqbFBzLrrZMnKx09mHNP1mZKf0nDXY5+vrPF1ckBaEDBX3CjQtif99kx6TrsQ4JpUe1czGVuvI8LPR98uIDlcH+Z/9YMN2Xsu4Yh9smeN/MN0VGN8JNsQbqDy+KMo5W6gUIS094bN8wgeg23lwXMNFVkeV9kzLe8GZ+ZMP0pUX22EfgHvif/Q6Z1aw7E5vW3JdMzkYg/n8dyDcAWTOB+/n6eyMxWl2ekNp1DEP2EQVcV1bTbW77rl+NpyEb9anahOvksdDrlzlVadzuVAhqtYekElJvfGeKizVykWXGmeWXikuHCcvTxw2rP1+EFISkZrPHexy8jExozFg8Yr1BlTB7xVaZ4eedmX9psmgcbaxEbRtn8ZosWGfYjcS2Kunxb4uCKmr8Xfm1omibWus18I5RH19FZp4TlMPrOAtQdlJs9Y8klZjAPxjNz7t05U94jv/Nfldg/911ii1vzmo+Ccob2CLju3TZmZICX5lK1nfXW0YT+3SCyJVDZjMBNFXlig6vXpm97mJ4UpFU1CXr+ax4x2s/4RTPWlThxzJP2WTo8RQZGy2AFFu2GVWK1qC2O3ujxsNspmK1zfMHFDBCmZBd/yQzKugIiyq6IrhwUU090winvG2xAEVPbDSXLLDtJMo1BZzSGNcgXoVROqMITeDDxzanLqYTNtLy6GkNv8V7s69ioUmTW59eVYzo12NveBdosfyZ22+rEPSvLjLvejpp8zJ/seC2utrntmtuaj++X3M7xtIApseA2j0ynfc9UdFHvz6yxH/fj3kSdj3fd6LFoJRyyADh2CN/9jdMZRmXdDbgc+bCTZ9x/6gyTDq2T6HLWJssmgUOcrpZEIWh09C45t1f0HIqB873RIO4EIpioIRB8R7ob8CB9Jy6okXoOfHDGB4b58fHnZH4dmoaBdsl2APvH1N3PYGoWQ4MDaunUCo6VzqsTqf0SGP3Kgx7/34t2KTAtX59e0ltOl0hbrUwQ4IRJp8edp1KLZE1oTdjcqTBHM6voCe62MfZj8sKqMRiW/EzQh6NB88mbN6gKW86i0hYyIRRl6hR7qQH+dzrqb4kBenQv0m8h8gplJKUL2xegJfeV7GHnKB2CtT91MwLQ++WIq++QqUGwTyC2SXnXSvLGYRAT1JJnq1AvAW5VoFYC6esfk2xmlRafL4CbCEEFHM3NOicaCKPwJOMdIHx5KIzt3kqSuZ7Qd362737lsf41V1O7x866G1UZx7gMLiEp+k3LwYRLKqMPQzZfvEei3FB7y5Qa134qOXDI2P/uKE3jPJ8wYz3h8heygu9JvqjU4Qn3mDK9frA3wtRkP4IsXgdqYgkoGpIymGe2nzr2EiJ1TXKNSumkjOyh1+ycNnD1OWIz/CIpOlWqF0zWqpLg1t72oi3zGDB2DW2kuk+Nx5L0POZE4XrhA+zgeR32uV06oS3gwUvmj6RzB3lBXLjJxWuyfzSJKkFrF6JBMoGPYhITcB96wHwpnqZtKTRsirR0jqAI9JyWN/BPZzmELO8KMZDFkqjgF+3Fkk6i045RBuoj0E81NLiqAMjwNd1Lb7Hg4cyIfOYK1P1Tpr7ofLXw0axwwpT7q7zmRgtEG09RJOOX8iNvyB7taSHialggZ8OqkFu7yYXYRTU2sOZyjPEDZEMTrLfqaG7LB1KnG42Jj4WGY5dhpZWS2GQfmym3HP5NYtfKoYygCVV9Vj4Kw843YppHcP10LNooeXV3o5Pw9aRZfdNmPKW0eHqqhKkQNOBOa+q4tFlRiLpgVKz7KQJWcgOzlXfytj4WCDcB8WbGKQL58iA5cRjTyIQIAmXyNm4eG3XCjWx6sZxEcJF6VrMt/nviV2cIWaGoYac1D3R8+Hpl/0Qe3wjIF3lXRmMcpkurj5r6z7YXMV8bHtMy9zTXYwcp5usatQ9YycZFfnHsW2jU/tMNZ1/ytGKwuiOd4mFCvxpkj0ws2BLwms6pX8jpbiBEiup2LDn29ULluPobc5trU/2YHjAZiPGG8x1/ko1rqRSYze0WWuWeikjP6dc90e2+2tMR15nMjQ9eA87FE0NE3uyfej6fNRPD+owv4ziRn5yHY3Q4FAtl3Z58hUfVF/T2J+oBulMvx7Nm73IoboNZWY5cDJLsaaSQwhGTOCxxJyhDivLxnJ9uaCCiaw+6PojVx5F3AOiEVmxk/NxSgIy4eyO92DMnf1Y33MF4F7MDdgRlm2gS/kldsP9jRA58lBd/Yto22VXHKeI+d+U10dPvervumVOlH34rwQ51dad2adbFD6GIEab6744qQ1DUgrcrUe35NU9Ihr82nsIsrC1bRtgHuBWTt2ssq60szCWdYzchJGS5Kpmqsd80JBSur5Ka+VjJ0ZQWQl97DjlvJLd0zWKx2/irr+kEitK6GauI83W6zG/4EGoWwACjkjYo6mPxbt8V+/OgJOULwzvgCY+KuagYvigr3xBINk53evrx2aFKL+mzx1T9HrxwKH9nZQYpOh55b3t6khdqxc3nxiiDOte32R+q7NYC+yQHPdvJYn31wc68ceYc86gFyERZdV3g3oiIqfiRK3MAQaDi/jz++4nOJwlu6jMyUaOfiWS6JBps7QXK1EkecZB9RLl7IO/LGUkaXxj7tft7igaHif3aEbgS8L/QOvLJ/9h1hkY7YqlwSfxsHjIRFkKNZVOPirXRHfcv2jwMADFY01XkzciXCQQ965Bz2EDuayKHaZDD4tt8tD2FMxPz4HRAJ/i8Ofocs8nzuBsNAuzI8UBnz4ZsKpnyDsj0+entV/5Zh/3SvI7/HL2qD8P6EL5xMEp8XKQR/ViMPn57VIw30anzEtfVsQFGzpY+wMyr45zvMiMWdBFt2DiNznjEk86BXOio0upswPyHlUQL2DeatmwMFpcbPQLhtB7UtrOJhWk5Lmcm7RyL7WqScymLiZVWPovomPCJh5Nf78/lQaXwvqYfo08qvmrAImmnC8bNnBY/rxqhkCSRX2KRlQWZdpnnh9h3L3+HOH13NzMW2C0rDUUKP7E9RFQEqqyz5+wXWZaDAb+i8AdZcm2/SoR25p9SohQrcGBvlkytC7G/2HT5lTOnhKKcN0nreB64PGlIB7+71+l8jsrHda51TfP21WHdu6QpWXfuUd9ek5wMlrUMdd9QrhyYl/1KhAXSs+PFXUIzBWteCoRhjjd9uvzMN3W2SJzGdY6PBrkgD8E1hENYdG+mrJlWhYuOQA/NPu+rJm4IeDDwDbKO3QZK0f/DnN9qakHdDpKSZ0KXADT0Y8VcQgyj7xgrAIejo2mp3nCFz8QM3oy85fFVsy8u+aDT/gXjznm52omDQ3jNk+ZP+vpDdQrRv/7q48q4aByM5UrvxAzOKzdo6if90wRPV9wgrnHw7uIR/cKF6f+uH1CvCw8Gx3SZu+rUf7n81c2486H54JtmmrM/ChhRQTf/L5OCQ+mVCwn5TnvvkLYmDl9jkdXmIgU+d/1azyAD3pWV2wea3XGmAcRt0AhserZKzrdr1CE60WpaLPBVIVHhTxdC7mr1LFjJ3rA/nd2RWcDdBYHOqOGcYwUm3FZ3x9/tsKi3m847i6mnyuVT8TDOw/6pSEQM+FJW/mMeDnyZeg+KmJe1Cwi/8Xai9HVQPcc8UHn4jYsOGDSp5w2yDw4D3OIZ9sQZLAuw0l1dP4DT0KNeKWgsxyn/VnQzBlW/ysgDcPme0+7+3a/PqjLzd51NqflMNVyemsoji5fY6yPjCC3VzXdV+XG/YpRXtzT9wvPES53zu52xKaqnw0vG7P+tYw4Q+HIG0BJWwReOKnvLkrYW+c0HOkDXAzlvF9hrYc3o5JMeBwrxhIQ0mrOMl8GkyYalm1iRMz84TXyVQxCFWVidv1Ub1YZlMd8SG1SxhMF088IWypc5rfoxZCZW2LRlX+g0qYh8sm1miq8pNSEj7QiG8Jhghwz0un1d5RxaXmlczF5DfM6owmCR5UkIvRsl3/aQZ8mtqG9ayKve0yvulz5wWxpaDWwoS3uz75TiuW+48dpCquVfTx5ZuqeTKXG6wqsJtpyTBZt226Dgz10saQiiPacpJUnck7YI7nFl4nCKSBymhRGeeoyyovRsKjWQNk1Jya233Eut6YaejQu5pZYiDDZPj1GJ7GgUkwdhiiM6g4ksJ4T9nEPYiXDWyTsoxr8Od1fR8eZiPCKiGVFNwZmXEwJwcEuVSvMMwZSmBcy8yD0B5s0qXK8pGbC/n5qpOWGl5OzGfwpJe0M72Jr1bDA7WBRJCz/B6hw/90L4WdaisMKxEEyujHcYAQjRbI0fEd6qpNl0/UESiSUck+NzTqzfRnnvYe77oMTuNrfOgmM3OzQyF45ptLHWYcf+C1ZBii6MRzfhbYT2V3VfwLMxZ/P0mxpBA8NcZPEzaK0+ZUnT7ifCyC5OeWWtR9NFOYozV9lOlhxtYT5Iw2Tvx8n9WB6rcWlIXqv+XGVkawMi8tsDhVPRSua6GBRmLQQ0Bn2m0jJtVbrw8YT77GTii/jdMM5Lqf/HMSxYfu8G705F14zfhrDJMri22XCio0vZ5s9B1/r88f3IKN8C3MBoYWbSViNs0lLKCcOTpkQ5edZR7le1+wMYYAuPcMDmdhhjDEQWhzGGGMMIZFxGGOM6RLmup2kW57luWa5b5NMzTJM8mVSEgToc8Y5YAQgJa6zs8RxSAyZso4XxyH28aoXZxRur15oDSOIWbYkS6+ER9zNDBNPZlKDQEtLPXS70kn+rHzfeV0vKL5znBzOJnhUWKXfklm0kDn47NAQ1qiXw1aYe0h1ilix01WRvDR+AWOR+lJDOaa6Gk9ukZNfY0STWix5joLcEqtYcx0INU+yKjp1udPqDXR6cRIDZRAxM6BXXwudeYS+TbeJ7TLJt235AuDhxQ3bHSkCz0u06mfSgfL8gCk337aLdWOf5Ub0QHm2vBRLNE2SpSj7LHXeODQM3T5W9mzmO7OsYcAcpOda0thYN+16terB4kIJ+nHccifiRbw2sX5NishIM+FJlyDjHr8s4srbsLABmqRLQtP4gHae9ngdpArJYuafJx77u+zLc0vsUP9zse5XyOW9eKTkaYouFmKI8vN3BbEp1dfCIWcDMYnOWjxMHWFgDZuQgdA/bXChw82PUqVbp9aLz8ZJf1EdpM9jckeLs2vB/vaDwUdIhzEMQ8plNu3g5xZz7hmYpSfv3GKN0wu+4aeN0y3OEifN8P7ua3iWRKNrPpN5DKRFQZ56jA0YaRLM6P2mXOBQ+mCHOaulWka4O3OKuA5fyJowv2alnVG7hDg4D0iYD14xu3+hsEi1h+5e12YPmcEyOAgG1yEAHIoYupFSrPAfKAVFm1WETYVeD7/NVbCov3YE20LvR0mOwc2yJy5WuEIpr/LgU7TjyOD+aQ4upmq/GAkE+emF5ZNxamy0qh3HBnnG4TR7Y0JwdiLMX1+y2eaBkDnK22BmAiHTOHLmDuPCu5ILunz4gXd/KHtTFY0iBHbs4g/onK7VNPrcT7YlJmFYUNPoEHlpNmcIgUWYGf6CvoSc5C+3dm5wZh4wrkVpjJ2hbbAYqijT9OLCZ5GnjPFM4EIH6drcGE854DCxk/RC4kQs3Lv+yNj7WQjmAiONmYYx6jkW1V6Nr6QcNxMKFke+roPIbf89Y3+GvcS/K7QHDSdBZPv9A3V4h8ISpLOVjwlJad7iMJZNH8KIDIwM4+S8SjlEL9q6Mz/9HptqYB2Rz99Bj+rHoEVyZZs9ZOCGK4iE1EW5NI4o1wUja1whrqEQTwggnWwdF0UZlOrS39tsjFsmqAtbphhJVb1RSyf8n66eYP9eQIM31WaKf62NeiQuxauFVh9Nxy9Pa8PVoTqYGbOJFLeNbhxD6daUfHT52AfhJ7/LKO1WSLpxakawWD5SU7qxLwglh6hVQBYLrOvrpbnyXhSHUAKx3QbVqnGV+PMUCvLgTnLULWOZavQ02z8DxI99uyRg6yyX+Ux2MTFWWm+Wi2bar72DUzlns3hEmXnTWMzrmXLMztUqZp7Bp/gm3TKJqQQQ9OLecJnEmVlh0Xiec42ZJDJND3Sgknp1++TGkeChBeNL4VvfIK6iPXlS4D86AgqA/lE4jD1iWExuYaEJThtPOHOqxIENochkKA4j15ZeNWsUB+0nMq9iwgv8UdUxSMkevO4d4gZeeXM+SUlLn1UfdeV1vCzCC9ON7zRPTVfjv3HxncgXvH2PVZmpY4ZrG808MUu9KxbL5u37DRjMj/sd8AsEsKpJfoh3AfqinjKDJEU+AT5IUcR9Dt8qn3+0gqsrcbXc4U/6w0JiSjkocJdqlcscovx2338oFBH5ehirz0pZVSyb/ONl64emJYnUAFUY4jVFnWxUCuqUYF7MRaF2ZMtMH/ZCKZ4LwcZlsyewkraEnnaUxywO0/Vi2vDVp6UudQg2btFH39FjZFDVrzODE+pQdAU6kr295hv926GXWmRovDVxVbjv4k58cuRiFv++8dj1MDTweK7Rq1matytYP+Pbd3r+sYUiH1GYQtcxcV5LU9VJ59qLKcW4wBZQSEq11NiuvOvHL1ynw02Ml8U00rnTRYQOoz9PdxHfwx5+YeIrvFtFOnIa70BcA2js7Wf+TWzSbqe0jDXyY75/dWITxBJr/Kg8ll9TjbE7pRvA5Fkdl/KQ81NCPewZim85L5R/4qN6hr4I0dFCBBKF65qWGF/7MX7N2wM/evURfDTAx3sK0L/iZG5SsWfanUmRizNbV9pPIcRN6UB9a3xQXCGS43VwpbCOWzn/4WHhR6SLB1x3dy8bYUjb0i2XG4uNr2lSuuy5o5e0L37SaBMVNFV84WzWUJ7BtbYmozzyH2P8ILE+4Yen2FANXdrQ5HuSTsNqH9GdXGCxBz2Uw05WTlr4G6D+7GVpeoJ4+gKtPFs7V7rkLPizd8dmot03nILcARzpHMOTHPWp+Kgy8NzYzm3dkK8mpAAiwPYv+ZCeOIoJqobrMc73sHiccEzL6ew0CrX5QCWxUG4Ya4myMbCbg8G40mT9vyEiReU7gi8NORSEpGb/etOTXdRCGK/gxEmROG6p/1Iv24eJ2IRdGnrv4vHKMWm4Rshl4JE6I9L2IWIPyqeM7cdGdlTqqVLNpVnBL9owPE5RU7THpugv37q+f3owf7PnRox9MGCv1x/vu9yc0fGg+jo+hTXmpTD5JVIIgHnO/MQM+9Aqs1w93mqM13mjoXr4mLMALHRMo7V6ypXh06SdIyc77FiZsblmfltu5uQ4czJ/18wO1jrZ8umnDiy0UvkRYgbky0m5TFrBLir/Ua+EBTVup3hw2iG8FeDYq7M6+zHWc+ZI1vfMB47TKbfP4pgHaznmi1wR1aeTCg69ZUVLDj7ZYpcnCY+i4L/dxdtIN+oojARSKTrnRScjNl9gcboZU/6W4WGQgh5LxJycioXC801FnRqLdK+D1GqmV1kXjHo7y1oaaNNnD6SUru+uipfKciFg5Xtg1w7qO8kUzicjaO/eggECoeJ6+pE/0RZiNeVOjtweZFfLit0be9QUkRNbjGTaNIDiWSITZCDd3DATjJkzic1x4w5R/bX1b6WAaYIfba89IuM0txNb6tO25YV23zl0sSlPVcPWZl3iawuJe6kA0AftNZ1sTioPGJxQoNhd7NoOscMszGw0OuoSbCrl8Dhnv7t+m2U5S3p+Ip5VWVz3BqjSQtGtSQNYCLIFHlIypWS1YEGqvh446FXVSaL92VrdEKzFjLvJQRHeVR3D85RdabnGSjRzc3QtU2ZYludJKk6bjTHeTWQUFiC8qe9pwZUSOqGATTTR2E7bjYguXlZVNkvddHCkJhTWyDkmAaUWuZfHP4bj4fs2dPS4SWmuEVy4pX0TNi8/7WKCjgFmDzITW2Oe6EVA9n+sP5KswKNpQhcUHhxuh7H0WrO2afiCuCSmh/7hYoA++bIcGBl1jUpnX63pz2jJjaPRB5w7EY/HlwlKSKSIiYrTs8WE9EfoycMHhf/vOl8jQAKu+W0iJwG3tGljpglLPTYVfcX73x9yUu0PJ5an/V2Kz1Cvd8kLfyWBUYUg4qXmQcA7FawwrD3x8ddXzte3zTSn35g0ChD4wilYn6Rwo+w/8yrB7yX54tQsBT4iefqeyvUmh3GmM6MbHNSSVrH4sMsdUByGqKCG7dZGxp0ZKACpo+eLJQlpMPZRS/uGkd4z4rvAjMaa5utUYGU1btgmnSCne0HEaYdIfbRvSsAIXVqKoa9+/ql8bMp/PB0ALDs8TR9YI37L3yXsDVNIE0OpUvmBItwQhlRIVbDUBY8NO7oKjw20wPd+FX5v3c/6gZmX02Q22CqeF4JGvgbRxxWeogU2Hp8zzRc8WjxOv9fV0oVrsgvfzvOy4GGKL/572UWWd6HpKVwUUPsVINqCaTkutJC8tiFzPFK/OzS359d+0puRhDIVTa2nQaHKuD8s6fo+HxVGO/GCunbAyDN9MnRXoH7qKmAfjQMdFx4bEejbHqGY/cvnI1y6XLJfg6aiNmr2AfWtUWlcEmsToIQrvMJAypR6jDvC86jTdUAFUpkWCX54mNg7LlulI5/PnPNrXjlKO9LqfiSrGUyLmxb98F69qQw/hVEyEhSv3irykBusplRFm5hdrsBexh0U7JsogV+kzN1uhK8xLH7pnROfX3oFrAV/LMjnY/Lm+DQnKViAt6ikk06jlFFSoEMB6LsFw/GXPf3+dZOB1ySdYv5NmuqAK4KCb+1sWn8OBizDJj/kulzybTdqVc970DjuemKO4fm29FJkF/eKQ48R8m+IF86+32iP5e7+8ZmrnUnhj/xuZZA+b1Opm9N2LmBsYv5MpAa8ScQacFWeqe1nn75h+cYZVycH5uf12TEbHCnuQRWZkoVMF7VZujixrJV/PRQ4inFxFLMvHR0zwCiPIo+RlLzkz8JoMgX1a/23JMXbH3zGJcDiclR2sUsVGxJ7+6bNptPxKOo0Zclr8dtmL0t1uvix/ARIb7Nn09OuL0HX/ggSHmHOrPxlC0NcAza/OdNm8zGHkvPQ5Lu4wWW0MJSf3qmhfCJ30frSe1QfFjp31aF3L6WVHgK4d54SCt2krA+Pj/uuev310rVfm7CtL1Nr8J1A2XQ8IJX5KHZsoyYSmMuyiayQx7R0J9jJESOzkx5uhAuuXVddeTrJCtXIEyQjFOgeX0oqruDDAcpVyQs9F0V0YHZuW/b/uZZhYDaQI8sgdfp0eLf5tmsvrU1noWXDrKip3OWnFflW+z/zZYxwGNI/iugqgfNi0Adf+jXqCubtjhNWERMVrkeAY7hsirVg5SrnwoHKdKBJ7TEg1loTidfxyrl63wI7FHYfq46Phl3Rs/CR3n2kbXqwMD2MroadkETFJ/CapfaCJz7ZYFT3gqxaqP2VwjHA7VA3Deh4zd4/l8VKzEK3v0eqSD4MxTnKj+iYmyYpsK+xjdNlq7cjTXGbxrwO23/9Zwx5mJdRUjKrgSptQ/EyGTGNceqmhqG9BdKyqZ8omK1Dr7WPcAuxsW90bQWrEGpoy8vJTzq5GUvOlN2OnbcKTx/zTnpCkP4dKH2lvjsVDd3+SEjEXrPkRe3GDPNdaEDzdfqgwrZ/Upc5HIIldPlo4h2JW+h8KmZjLaCsvIp0rG1oWee8JmHnLMSHuOCpmfjp5bU7kB1M4Hy9NDgI4zKdmTsD+/ZRUle29cos3R4H4g+C6oFcqm1t0YVUzY9ztoVmBNFboSqlEvXsJI0Iu7N/pK8AgteWAgdxl3siRr7ZzVGXX/8QJR6SpwKbYEZINaaIaXD7cnnpwdqp+aVy2IBVvt97uM8CPHFa1X9EKUXg64YsnsIIHtSWkYCEcxEstztiuYrLke/AP9eIGtlf5e5dpTwGE6cxiET6ojDknylPhzzTilvt3L2WvvGKIUP2jSN4csmt3MpJwFS5LDAI5XVxRGoHpIv5ieS16f87Eg9TlpivF8hK301xE3HDwT3JaynTpxnbb700wrOhIwuf9R8gJpjRx7SoKLgeIpIXyUsJBimG5TKCEcRAjk+eBzKUg4aNblcK4ZFFfneTdxMMQ3PEWfEEPdA76Cb4LSIPciEeItGE2OTi/xhh28MMSnHhp3qiqrherKBFEGwPkDEO+yQC/boFM4+otPHaNJZuWAR0GrELYXqJl+58AeXJbtAPF6PH41I3+AsjadbD7AQLn6jgxnqBqzBZsFfPykWXp8liS3+F2kPUfUvvsEMv3f54CaTLPlI99b1SSj68cuxRXExuFNtYPj2jMb1fRXsEZWqGropDk+Vx1IcU0jjw6RNAewEz0G2zDaOvf10gsbvDOQuz1YAUzzds6GdlBSbDqziIPQycq+Cp3WQSWNwCD05pKL/S9bpH8K0yTdgQKjN2YVP30cEPiIteoTtwCCsUNDoXhxP4fPn3xDKgQYAj4juP+9m0akl5Lb3g57ebW4cM+Ozx/AczjYxTBUe1KZJCOlP+LqOkMwbXAKVEVLhAsITFsjBUgQAWKM808gfa65xjJVb7qf+fsWN2hTwfIve6A4lzCkvRbU0sQLXz43aE8nyS9EaZJZNReBWxD6B6fuV3gDKWj9GgFEwncXxSdu/Rn2EvYlz9vLg4K4sFUxROljMV+ueIXrFZIGkJ8ke+Zvv1jeO+5AANKWa89DrEykHP3MNOxGmdo0eF6UUw3p9NX7WcvwwaJe+CLBIw2RbbL5/L8XbYFCnKtD2egkMU9juAn6ZgNsDAqsJg/OJGwmHSyCkojJ46Vtq4FVo7CCMxJd5rgXCZbSU4EbLlHFGDbQY8mYppU1a2AEN2bdOCLg2/igCvBy61YbrFnkT5+IurCbL/he09hvlcI3hSZwlb80VQyNGk82d6ecziNi6+Jad+vy50480cypw4e/01sVAujPw/7YvnvIwT/zpKH2kabYZrtvZni931dWx2Xz7+vPjQkG4xU/DyjhmtZ2etC4RLXbVgS1CjWoqQYWXLvQx+ufYoFtjJec5ZZNJI9wuhDgQzJA0hKwtVkaso+MiJDKfqcCeJ9bvliyEb925TwtHAFROQpgehXn71Z6WvVZQgd5u3vNRvn+eAkHbJSTcssaV56uAg2KexqNS0TUUrLKQRsFBZG8VL6akUiXxkikQ+sokd0lWCy2hRuyK6X4Pn8KAUzk59hgK7ULy5OX72zKBrtbdBuLz9PK7RrjuTea/5rWVfpSmnfV35cGQ+23tvStkJcrxlRqvSJA+fUU3Z86hCd9NmAbbxz/gNX9z5E29S8T6nv8O3w/P1hZSIhIF38nMUWvJ/sec1Oce4P3U0dIb2PnkZFO3M/CsUrdUDIiWNAxTrIElItUsKbkYWrG3E+iSL7ZYa/bd1lS8prdpDi3Y3A7dSBTjvjjdbXL2uSCZx/49pAEzQtYrTvgWhI7oOCRzU8Zf7cSRMuQ8RxYPpqu749JiHO9ZmgQK2r9OvUVuei7b6pNWVT5Xz4YGyfeZw+06GdRVgOFMIKmJeYtzfJ6IErzgSfkvv+UIyEzywgKV6JEEma+dmb8ADa7FCxHc3m7db7ALM3SbHphu+qIwVZN0OBTfTBCSaMbMg8hOP/eZZyhLaxU6gInA9LAwET8wcncxhzjaAn70HdinuBaOsF6PsYQ8g+LWc8Xk18tDSI2cFsIXuGM5+nPxc+BdTbFsewfTxIN1UZHegrzlUVdXHm5wfVYI8TGS+EEu3C2wxXOJkCBlqbb3hsSL1+pIsMEiuQUyjS/qXfDSWagODjNegH+fd72JDPgpcl/nbjec1hUiHGJGbYsVwxz+U0891Jp5TNn22wTCqWyglyCPdpuUd6dijz6nyB+Mz/fmp+fOPrIKski2adA+VsGIw/75dY0gkgcpd57vpH1BZ6gJVWf15GxhcFCfsI6rfm++rUFxqLdpEo7YydnJt4KPrkPV2h9dP/enbNKLgDId4xX951Pw6JBGTK3GDQJUEubxGBlQHrtK4pyb0x72yz/tuwBwUEfunsXx8sjazjaI4zMz7HQYCjKqCIquinTVkiBth7ZbCQChFZyhp2PROH/NFR5FJ0WdtT4YaHQRlHjMe6wKftLnLKq/rua7p85Hc8wDVm0xK6D1IRfrjKqj5goiKjU5SfDop83BRo4AExBAlIam/myJWs+78tn8Y5x8lYU6KCVG2TO2rBFcibSuDFeg+3UsG1w51hykZcWoyDBcUPkUd+hR5HgLtr3mWELHJqGkyBFb5jNEP+DJuFFK3ixjxzqGt0CSM4hll7stTe4d6sgK4UofE8hpOCI51g/s/j375UL9CfSFMBsM489dde1XVn+VkHy/AryvpgvEXA4PPyM4AU07AqSpgucqA0rDzN1+G1bVIKgqUw08b8B9QzD7ME/yBZhr5OUBPx+jEhPMSrxdCrlps2gDRGzOepmbhIw2VPt7leVVEND0Xo2L/BzWOUL3+6AOO6f5V+OvlLY4jx9KhE470tw5czz6VrIv7btU4MG11RC4TLISyHh3C+vE3sOvrKA8+rTNlLUVuaq5OdRIBkRVi3R1dJyP/GoVAPW42X150E6w9roiATVZf56nCtpoqKWP96MKorCW3w4eiNK14wTPBulHshmB77qFRlsd9oOjWO4iaYXHZ4scMsi6a94yhkX1nQgYX+p4hmT7XfZm+cTVY7QSu2CCh5lMET2f3lt2L7FlUKaGmxXZ5OrwArM558BN4fmnJCY7YRuwO4H7d4tDBhvoXcRNxNyBE3sQPOJcON+Lvn6ge3HYFyH65IEciNEQT69I6dSEoOaSqFlt4/DIlp9K+RBccU3+C5pinF9CXwvfXgkaFlaCwgz72H/VC7FNBnCc1GPXGn2D3bufP30Ua0f/Wfho3cpw9evp/5wGlBeuL9yB6kI/qMlwnhRkZKjJ0RE56FKE+OWkkxUvjqGj6qljEfoxRMIZbozW8mHlHQWjM3+FvS/+PLKAuYEtPFd1iJ5+FDZ2DSspNpZ6elBAXgyUKie1/yBwKinx2WGkgaLOUN8DfFYsECMkXDSkEN5EsEXzHAUOV7vwsKZrlf4Kvw/9lg37UMDw4iiv/VXqsQ//jA/ln3j5d+clX4d9rXqtT/ktJ+cN/nb+i9v4tGDX4v8z1UUw7TPPGaf9LSfhZaVD7zMrL5X/7G3poVaoGFcuDT9qoOMZP6ZiHXywI0NiuP/cu/2+eEATQJP//8yjIJDFbkuf7KEoH/fZgRX5NQS13GCezdFMntH5lB0dpstEV4/Qfr0KIf05/bTOsgfJvreS8c41PYbvJLHfQeCBI1rT5MQ90hVajVDrN3h0Jt/54k3czN+0me32gu9S431RT62ye5jqQQr+l570TnDLUGnLYZestAau2RURWLdB4kAB95mY2K3oCBp1hlnXeQeNtwJ5aOYQc52nIj0/uUbaFUCuy96cfaoMRJNf4n1xlXKgndDHCVAXT4eyzp95JFRZR4n2iYtW0KlpkLmqK8hn2TeI1QBco/fSOaIvq1/FYyBOFDPw0uib5Ni/SpOXjDXFOmh/Zgf+YsmQDIsesmaeuSajxSPXr13/QLZAfoUWv0+FzSzvC395d/n6s272pyfaoJkxVlKroXMXE1xL+mZIj36yWEwV//OW9qNbrV5c7du/zPnITv8xwgJ4bb1ikqOSa3btAG13np/WbB3sNeR/kOtcFW+UeVRZIm4f29pTixH/ml6Rkr0Y6nQ731g780TjSLvE4239UCbLRTpr8uqiTnIr/KVePOt88ajZH/C+pdaOj8zpELbtb03a9pV3pTylYhOZI8FlFzg/nSzoY1GC7cmTj/fEXaPbW46uU0iAtbqn0PNSkZcXpJtNXXs3uB+y/GpS0Af5M1/Hj6T55PcXpG29h8UfjrXr/hgRB78t8LJq7zMtauLL4SAr5/9cKRdS0/c28rHk6R4JjyXzfE5h930ahovJVvIqfEUIT7K4JxyFxaolX2bBvrKHLjgGGUmxD1rD3gpZpTlqRcq1zCBcg6GRPwSruFRXOLjg8524bNfUOtUqrwHH/2njWu1CD1XQy+1rL0AidtKFVREOBPPSkE4ynGyV4SaT4F1+/qjZVh1IDqntKl8NGcxypxks06txVUq1GuATtGk3Pd64ZaHQ2LqJVyG7zVU0QcQ8ZMh7Ar1MjrXC7kMxGzYFxZ4rf1eFQb/ZNiho2GGDUmbonV0g0T/yOen8cAUR9X29VVCMRNk0+d3HZmJgdRVbnvVnfIGCL/6hQCKZ/cQyO/BhQY8J4Ohph+JY7y+fWDAtsmw51hxaVk1BXCJr492EfKBz5/uGJDm5opqbuNT2URAilmfVLKYjSKjeOxfceBuRmMYu3ogQ66p2bmCcd5tp2NhDkxe2Y0M+yhakCXipXLVaU3u3XIlLrgmccs1GkkaJzeM3djpGKtpRU4qVpiuWe+uB2kb9LPORt+BXjmoEbK3/qs5KTqX1dlSzxoW1Wxsct8X8rigr+KMHiyDAOlHmHuzYx1I5yXILXnOi2A+5K468MvK5pvpfkZGKTK+KlQ59J5JqyLnhxYKXDt4JdTjSLgeaP0njMA5vdQPOlw5ucWA8ryqcSfHEkGKe87p5rASO08NX3WMqbMp51AaB++WOJM/9/B2O8zilaLdr+w9K33brfP25/XD6cPG4fty+XeXI31FdxcXZys/t3vLs0PO4fb18Oi5Mf+4fv8fnTcN3ya40nF+3hS6zOhw/j7e5hFcN+cfcQq5eT6/ZvMotBLp7ExpBOIl2EL+JgzVcxt24WTbVJPzXhMvytmWx5o9nbLs41M7v0hzNG6bQbe2WpPdi3MmifXGU50y6uo7zXnpuUc91gWspGt/Euy4UuvY9ypTu4UW50czetpFV1yHJvFT5EebSa3CrfrPZuWzlYzdxl+V/PMcqLfnSvHOm37luZ63c+Znmjbz5F+YN8fF6ahe2Ts+x3tryJ/sn2xf9av7c99zb7g034Hv2J7cH3bGZ2W+fZv7Hb+aOVzy6bl4x7FxufX+KDj9Xb6H/b7Z1Hf+5i71vGP+bxh3hr3bxE98P6wG612TWsq4GUXNnuCKfS75hq4dTUwNQVnpK6su0Mwm3LfgT84/bKIoFvVv+X2/2DLn1meoRD6ZVtCVx4+2C7Hg6sgG1HeGTVMFXDeerf2dBDYF2xk4CBd4KdCMx2/0vm9SGQ9UDuxsMi7JG8bQ8TWTvyfxw+75Un75vDfw2z1ccRXcPGquBYpe/Msb8L0FV/V/h7ee2lIk/e9QSEEPKha+KTzRLVJcEi99Xl0iF9JUjuQXcr+GhMgKkfI68ylj7nNw9D5aEiyrjpzNkbv9M4m4mudRFgPwTDcaG8cXYQ9KKkOu7Jhva9artyckKoSz+TrntAI9g9Sx96sdhv4CzJWZvZpHOo7rEDq19Nk9WOGSFAokdKEIPmwR3mnc78OPayYMzJgn9wIj4sZnFeTnlg/leGGVcHk8CEpgvmtpjY9ADO1e5zzly96JMB8u/AkD8x5rBAodjmy7yIfNTdiOdBvIRgTNxtRDn+2LSFdACmdadVKO8P1ym8DspecwSb94bTmE5hQ+BDnF9SrUE/kpLKP8r1pTbZXrh9fOhM98xxyhdhZzln8qeB1mYTzPjukugtXAA+m2zEdaA2aA8jNF1l0QYCHMbut0Yd2y7hL4nkoxXUffjk1PJIVYGNJXuiRXHPELXN2T8xpEj0G7ajLiRkp5dcHSF/akdpxlrgwVhCcnYMrAkVrg27l5Pq9JlCX7RMhuFE2vivTctIgz8A4LY9BtQK8oAoGY5aAOW5aJddS1qD8TixI1SAMp+kzdzPrnF1wD/Ne1fqpOqE9LZBZuNkBX+UHeOPoUfbjpHiS4gqnNDZBoFTX8bhSEJSmF9V83AJSUvMP0aFpQyfAbf9GxJHRyL5ymFV1t45dG+BqSK2czNtHATS+7O48+rM9Z1RFAsj8+y/8cXA9oSfTu0t+VGGq+0uaa0UvTxnFSNCZcPjELtv+XMYeXzLHWSJppXgKMrCVRTkUmPeG0Y7UkyuA8/nQd5bnk7ObIWVb5Jjp7EMER39kHJsZAHJ2Xlmp/Mq2zsAL2aHsDGrzsX5hb1MEbC+6hknScJySAIV6cg6JH5Z6DyqV9tdCp9D+NajTtqmooqEojK+tbxk9wD0/uzzzGXny9aQnu2mh4U3J5ZgBZknEb4OS3reLMDKexG/p1HqdbP93o1P96+BJmo0L3UJ1hDljYd3n4u83IRTOmpiwwiwyF3UmIs+VjU7uUPIdrNYQTB+etmG9Eifz+GQM7KKSJ5L1WOiJvuYNXMrnc3PHW1lm6mw/8QisHBmUcUPH0Zshg0cXZe4LO3SSJG02Avh1cuCVsW8z3g8AbCoOblGnjuATktyLj2g6u5Ho/Zq6KX+3QxowmO66rwtSfYuoQqVrDTjlPbJGhD8+kNKx0dnXBmcp8jOMrwDTBvMEFH8kSeqLEVbLNLjyzJoHtd6doO3ImFKiRoVJ97xg3L1yhPNe1zLTulCxT1CokRHIf6x6AYNCILaiqi6aBz8SVUmagA22P+7c0R79l0zVOsPiKw/OUc0T44Ynjz+vTFGRw9M6aHX53U6yFZLCoeTkLYcufPW+grgSK/tm5+XaEqMFvRmOohhGIZx+3NOkxf5j13zs+mOqvv0W9DpujucPUsYiFTAcj1CcBQi8x+zNyYM0S4ven23/dzfndQ9p1IH2KEtVJpSs1vCJMtZkmhFnWYjgfT20ZfRCIyooF+n+HxM9cRsGimuXZiGgpSQ2EOHyLI0dN/71/wxsO4c4ZTDeBJnzTOdmdMB2dXM8BNsv+SDDKEM89C7XjEQFRYxStJEcSKh9568kmRuQYB2LAWmrNEsqMvSLPb8jmkKN+TI2UNgvqVJkOQC/p3IDLacCc2keX44VzMsXz4+eWE/TJlM2xG4QxiQ8OfEojoTl4QTxOPew7TxjF58m2dtQHj3hel5LsPuiEgSNx4zQy6fYS6D+xxELdidBloX40MtZKV6fjQ/kkC6TW8oO2vBBlj4vYYhI/WysEUGU9TC92vaEvMlHuYwaXb2fEO3zxA2xOm5UfSRwVEa0XXDTCvXzQsCryySQ6nZ4wVqSnT0jHpqOsjcvovzcNbA6QbhmKziI7oPBV76WZVcsqGkGOeOqLP3Vkn6rji+M4Rx2XtNHKXpG1/JvWrvx5T5N2pCSX2V8z5WYMatpHAvWxT5fZ067DSc4o0E+YRq1NO3xJv7UbxZsw3SnUek2nRPJOnRMWHuoH4gi7z1iJtuO0Lr3dH79RQwn5yE8ZZ5dJ6GkByS1bAc0LEW+D2SvLM8vpehonOr8MRa+ARcqsSMDBfe3mc0cJZ07LmELgDE90ib12Sjz+70U8PDLIcKzYuPipJ+yY51N770nkMtGujJ20Il/kr3adYhl6gEAplfV2wIGD573YS8M74oW8eeBvjP9oMm2Zxml/M3oaNDZfFx87mDGzFZLXiyI6L5cWWZiB5VX8YsImHPWm9PD4skQ2RAZ5LEeAp7lDKjFuiicw/xUi58z/yAQOTt3OmRuLTuUJr/OYhcliWKjZKJwHBhJ87jHY38cFFotB/qD0iMqB5JejwPuLyWo5O9zmIi2MiVE/o5JMjh7TQqkYGSaFKqOg5fgEkCA+2+02VOa+bvOFsPLYjAmLGqzfOyyCx6cf/ZM/5NnnsQuOBp0PiuvT3bgtS8sQaBDtvi82hiBabgApWskN9FfcAcgTQhRGSngiIf1KSTodu+x/HZzMu3HRGCnXQSgqxRboaZoCj8zvywlv/sYOCcXacniPR3O3lHrnGGdMSg5RzPc9WcmxZj+Gq2+9N5eumhAxftcKW9i4Ts75uOrXOJ3kbTJxbMAeeED64Td2lskORCirD08scWLMb3vEsuz8188Ko4N/8L78OMXZ7J+iaQfmsIOjZ40vYEI7IK10X3a74imlu/EpBtW6ZpSRh1s9wk+LmhF7rQ9mOikI9x0hxUmxC9XLgTZtP5SAjOiD9hGIZhxI7BzvpldxfakjRaAMXMrInokwUQnruYg0u3h02UM0FFU5hHZycXY+iYwGpLX17FeMDR/ioSZyT416x2noV0WtO7CF4AfhRJCYsWdX4xu5049FzR3eGZF5w95Dftv7yXzmpiChhQxPJSNw6+ImjvQAPekGGYOQhsKe9EQyYoF2fy7XSiqvAxRI2mTE2k5/v4CZLk20auw46MQYTIVXFXPVAlqBpLJMSN/v4ssPdPB1TSgOwWErUBcj3D2HOUB1Qyg9xULf32UJU9qcsZ75fZz294hEfngyTbxFgCZCAPpIJ6aE4kkDWCoOaDe6muQsiGPbkkHU2JyKuFzDMtu/7gBPjJrS1Dqo2yEnGLL1LDIm4YJokr/nuGTbZP/0Tea2l17fD1cLOgX+hh5RrEIZB6MiiuOZO47xVGqpQYH6yDobWqxmrpStsFu00P3J9+zKU78TZ7JOZF1ZzPwhcStVoj4Br0mokJj7dWHty4a1d8MQuQg7LNcp81qf1wyqC01c3IECfL99+c+aYe3T/7TCLGFU0SnzTUcdGh58I9OglvP7jDnNo+g46d3MRh4puNsFXsHkNb4W/rbRmkmsfX+Kz95/ZSvO9+iZLgVWqezDvYtcztuVdwu2gTrpDWbuY7yPcuqoPqs5S7zkOU+gWHRull8UY1qtBe9Oon7QYN/NNBWCnjxP73M7laKxKPhwI/zhAvgDWcCJeHKEiWYOOGzFg8VMt0Q1VQDUPA0ZfHewb9zJbIoYbYi9zKGaLyFzKNLtPvHLU/QmLHq5qmkEDU9v6yEL7Jzwn1qs4WWXHJC7sGb41pUcwJPxJzbxepNKe3ayvLovCvdNKgPawc5dj4Bu8a86fQ53I/s6b9LGh5XmBaQDgEO6Nuxmr0PMFWsxt5cgM60+GHJ+U5E57N+LATOwuIxZe0d0KH9n7RlAXjbtoay+oW2wCudMBP6HsWMMHY1Q50byeJU7Gcm+NjXXLFi0spt8znVPe1FpKDJsVSmGBtXdwunJiazI7f+othoP6oeCeFPw4CHk41NqSHctUu1QUvfJK7UnvNflD0egtUcZTW8r5aszHjnOfmtTXYAZyWP98xoWowLv5SJpc/N00aZcWOKGfrycFvnvk+zEvlo8pheuP8FN0FJkFo4QFvpciiX534M8CT2EUSBQKPV+/I26AeOtecUf7H2WEK9C99lfJwVvQ1DRVUV1jQklh8jdPrBxCWzNwWKRr0AvFQqam/gLG27e5FaeyWxEnpBT7NxkMPRscNaA157zXApKiDGe1L57nGehK3/SiukSv6QUB1Ehc6n7ugxbgoY4WvP/TDsr5PZXK/AK+wWbX7VlrDulZhoiFixnmlzfjJCRXZLJpZHIZhGL49R/1ukDtgI71sr0WCiUbHEZnAlYiqGXzgOrLlNdwVAShhwM5+k8DLZzsGnRUH3H//ifvvXOWUom6owSSJNeMCqv190gMtv5NovFiQl0NXa4qOiq3ETKqpxcz8X/+j+hl2NT4a8WGy5eQuTcNTw+WjcENBU9Hq+/IBzD8x9FaKS8ESde2HcDUJppg5//QmxzxG8g8/HYcIYO/L9IcS21JDM1Zcc5p+ILr6cKmxDgl0yhMlMwLfplOI2Affvn7AY1sN9qrYMOothwVP8OEyIBj7saAeCTiZYtggj8tThQ1KjZjCl2tWIrZ11+LrO62UJZDXIIJZ6lzJBpaZlrApFIRoirwOKyOPcorbndNJt2I8ksItYXL8bQli5a2PkL9CNcTMFJwjyUDZGIyPhnLjYm/qSGryqrFbNEOBbdWouOca1Smr5Zt0wc2VbmmpZ5JsV6D2S/cBU9ab2mdi5BBqZoAffefM7XrdsCSKwXEtxjjuVLtvo/q1G8sUlNZNRl75gOqt10GBCKPGeiX0HTiSEfs4ieFl6BA6gQF6rkCKpSyjdNT5WLDmAxK296OQxu017otkESZAyn0C+/Y4WVEZpV7dPIVQjxu8jWfzKqz3B5t5NhAeOtTUWF/WVVzSBIewSmLspeN9YflEvny+f5cjUzlc4Ju3DklyS6Yx2AJsqnTfJ9axAoHrc2DH/vt0leJ9iHBqcVFjxSVerPhwA8D0+A3PbXwJG6wn9/8e89fvcMA7pmV9REihhQwlAiWI1In4FBbj1fWWTqFo63P2p63OI06vz+NL2Uc6FZI+rLQdXS8dUa/70CaqIcSjqaGuU5s30vcrI/MXtH6caqE60eyNO/QPrBaUeQUG6txviCM9sUkExASE3wLCRpmGQ4cXdvSpLbdwO0y312vBSuoEGoJUaf+OVkli+NZgrD0FRkXcHM1Cgw5CeWXLwj35aEoxCTBUz9RKUAfXdfKDKEhZ+G/cTVBz2c1UvVzmKFAuwqFZ0BN9At1UPawRNFt4svzVACnCW4dRdJ9MbugTElNPbHJ2Aqxm76KgJGeb2k2cjR4m/Q5lns/Cq/cKEEPqgeAlqvuWn0aLAnTOFF/nk+GbKh3/hoCQ5CeG460dfCAXKdsBX/Q0XGK/aZwq+wGaC3ZHwHAQOSiAhpwrG5DR1Aofjvo/yGcSmvj6Yj7JOMvN+92APKLxfC6httRzY9c4QGNa6BrnBAXx4e0MVb1wyWDot75sbLGy+aw/QnJXwwuM4wpC4DIN/b3lyDWxFdi5kr2+qfFjkGJ5RUnx2jlOtutuE9Res/PQWxtvoN+qkemsOER6y9crOHdjVFo6sRReHzmYDkMH5qO7sy5wJOaqNzmqVYFhGIZxqGtqqcqxTU+I8NX/v0IpsP/Yb0c5f2/20M9TVNwWrLxs9bSNSuow2iXo9tDN2C4UNgsQ1hxTBTk0MF2q09EVf9yjcY7gIpQHCl13dQ2IIv8ta7AvPXw8+Hx8/rqHB/ldWHQuO1eqvXDuy6vTbVFtJoogn3hP4jDatN2H6uVbPgIHnGi1M60GZny1YggWs7MsT8xEbk0csen1e8FKZeT/uAoRA6AnE6rAuGSdiDO7yHsZXIjKjU3OP4pVqk7eQAV/JTa4B4b8L4inpHbzlJ/wmlOODcSWjaz6zbKR3HnATjrTITdBZ7/icASslD96gO0YndbQXtGH59abZB6kpVCK8+rCzOWn400teLLg+5PzOxzrqm4FTfUDdiqFZXjTxozUKvmxNYTIJvAqin9ZHbj6rFwCBLqbI6VQwlyYsJkSoV0zSdn0p2efG2Tu3VFCXgpnXQ6/F1FXAJRrlHATSUPeRRdbvNtR/hMbgK4E6S7gaSCPiTGRH+fn4N8ek8cKgfD305enjVlGskrjZap5Yv5kFI30sELCTDlwvRMNcCah09iHYMMLsV51XJfPqbS2QXSSbTdP0u5+fD1PpQouKAJKeUYULguKl+6h8eAyyX+92RpU2s2p0Il5/u5TB/9sMo/bh4VjvcWdxHRFetJVtuygIvHk5nw0V2ZcbwhZrl7v9W1nuIXW4evJp88Rr2EmFV9NuaLzL5a6WKQ/XyIrF6+I+dC2zusVNU6hTkriyakfOZDIeG2pe2sBfhTj5y8MTuSE15HURp3D4sHlghqI5jhE2wko4KnEq0FDO9zunaP8g1OBp9v4FfSdMVoK316wjgBrQbG/H2sDqpdJQnoX7uEeReHrXDvMXJMZNw1+abRSgaoSE7GRBiw34Em8c884e/r7USSlg2NiiEQhs6B1cAFlHDYbkkxgnDt8qe0MJrqpF+PY6EbYbJYLgYPETa5x0fzBsN8pkTr2OmeQra+nPPpKc334LAW5Ye0tYx8ye0xJ25R+KM4F0jZ79tUHhaDYj32OkfBIzAOgeyuhQw6CsJkbVZZLWSOQapwJaTV5Mb1FGpnV5k9yY3mCnYxwRNV8T/XjGxiikzUit1ydg6ZN/CqnOJ2y42paiWLAo4ddCMwZMPtE/kDIEu4Ov1XnSh6slCO6deMc/H45KZVUXlE0RIBPYytQKx39SeA9GSc1r6zIimkMKdpSnDeUI12m8GW9EInIZl62K2yPI+LE7HutTBPX/yNBiQ50oJgElb6v9Roqwh+y6TovJNfseOsmHiBn/b5CDKKKwi9kmaWON80MOeXZ3Xodu80/mheH5GkDm1DT+FZqEgJ8ziUgFcE9plvLPVbvskz6GZSWVdoy9yURl06MDLM1Xrtgzom2LomnEjDSDB2xKMHak3HbF/7/OqIJMVJdkzZN8Er1H2nVhOZA1ZOGJpSJ6h9S04RYUH0i7ZogqGpKbQpNR5VVuhiEckd1llIZhPhANVXpchD8oHpNqR+E5oUqUsoXoZxS/Ugp9kJ8p7pNafsiuKV6TqnbC80V1bZK671Qjql+SZKDECuqfUqbreCZ6nNKq63QPFJ1KQ1boXym+iulZivEK6r7lHZbwZbqMaX2TGjeU61TupgL5RfV25TKXIgvVDcpXc4Fv1D9P6V+LjR/UBmlbIVSqJaQogpxS3UIadsK9lRPIXVVaM6pNiGtq1Ceqc5D8iTECdVVSJud4DPVl5BWO6H5RrUKadgJ5ZLq75CanRD/Un0MabcTdFRzSO0kNEuqIaSLjVAeqN6EVDZCfKJ6F9LlRvAX1deQ+o3QHFE1IeWfQnlH9TOkmAnxk+oupO2fgnuqU0jdTGhuqHYhrWdCeUv1R0hldAgLcYvsEJivcijfgo36Yb0iVG6RtTsoqxyKA7NHh+mKUD5wKwW2qxxiCaZ+mDVSLJENOhjaVJZgvw7RSPxzuwUWbcr/zGYdNo1U/rnVOshtih2zU4exkfKOWyawbhNXsG4/LBsprshWgWmbyhUs6EAlMUW2DczqlKdg/X5YVVKZIqODqFN8M7t2mFRS/uaWD2zqxCNYtR/mlRSPyMYdjHUqj2DpDqWSOCN7BpZ1ymewZYdtJZUzsnIHpIViC7bvMCShvEX2D6zSQuyZtfphkYRiz20emKSFyp5ZsUNOQrxwOwfmaaH8wmzaD+skVF649TooaaE4gr07TJNQPiJLAtu0EHdIcDTSC0oryVFLr6M0C0dHeqrSysDRBb1VKs2Bo/f0mlRamXNU6LWj0jxx9IFeCaWVDUeX9PpQmoaqNqndCE1PlYt0MQrlnuqsSShhZBJ0SiqhZdLRsSjhyETVKYMSLpisUsdBCe+ZNKlT5kooTNpRx5MSPjApoVM2Srhk0oeOjRKumUTTKQcl9Ey6ptOuykuzfuNQ1LEWU1dyuyo59aVN98nED1iDf/8F5P70l31Yd+1Xxaa3/Kr4810f/xvL+faPf7QWu779cf8U+zoP1/V7bLoSn5bnm3fL2+3nP77kYvk88SAYDH45l6vz3S+O2/3Vr4rr1fNBt8L/6wn8o3XTn8/+SH8EWM00K2ddi07u0q/b/m9XMVP3f6X/usGoIz3+nXSVAkp3KaB0ORhInaYBgW0DpesU+BvDFPb3uBpeBxurxAMUqw2xFcxhhOvltkk0Jqvb0tC60AxnxsMuIB3liLR8sGXcfvzAt5/GmrLY548UL30KZN3GmZO2Cfyqw2Gsdsc3PovuyUtXHzn3dYdg7PaM/ohJRBFpfJFYM6OW17R9zhbrj5IPdA0dCj3tyPypEhmkgIEIhzq9mumrDW0fR6wvaadobY47jWu3VXHu1jPsDk4UXirEkWi7veaB/Yk/M/8Gf6X1sPDiFszTXdf9IBxPSu6XXYvRMos+6+7Pf3BSg//H4a/2x8T8lRdw1YzTxy1fb9dxpguDjdE6v3qDNHJwGw5rSiXB8ap9y/CoIJ1E46Up6aQwysBxtcL4H9xSDu924nhzbdEyKamninDBqybslKpd3CgHffMoDjbNW+3GtJR7/ai2uLcZnTVhVJuddsAFvcftjQAetyPAxOLaGWnIBHi3Ygiu6G2VdzZ7EjOJdzEx9v6k/B/nH0S1iVKsqhp9oS0Ztai1MUYpWdPYStUeXCmjjvfAK/GoeCOePu9bXbpRJisOys4q3Cp7q+ZOaXrulZlRYWVCDGX59aHEcGyuyvMCc0NuEBOt4ynygOjgOauGwfy/tmHOWNoW8xa5QlzSLtNb5EdEnziFUvs6EqtE3WM4IFQ8DMgrxFdax4p8hyihi/t7ZVyfNmIdqDMML+xLm2HeIQfEVaJW5IyoI057Rd8hlg11wvDIVI5GzAvkDnGT2jrdIO8QXcPzHNkghgXziOEPxtJGzB+QbfWuOx21y/SIPCbRDzhVpfZdI1YD6h2GbwiJhw45JvEltI5r5Pskyh7PGyXW0Yj1HvUYwxFX5XnE/B15kcR1oJ4iH5KoLzjNFH0JYrlF/ayVuC6/R8yvkJdJTE07Tv8hPyTRbfF8QJYkhgPmFYY3jKXtMH9B9klcNp37e+SnJPo5TpMy9KtGrOaovzD8j3CGh/fI6yS+NgdHyGkkStXFXa8M/boR64r6jKGlsbQ95ltkjsTVgFqQNYja4nSn6EsSyx3qJYZdui6/D5j/RW5H4mbQjtM58jaIbofnF2QEMTxhPsGwSGNpgfkTsgtjJ0tdpv+Q90H0G5xOldr3Qaw2qA8YvidhwsMSuQ/iy17rOCBvgigzPF8psd4sxHqG+hbDq3RVnifMP5HrIK73qO+Qj0HUP3E6VvQWYjmiflQ2uTTX5WXE/Bu5acS01Y7TGfLQiG7E8yPSQgwbzD2Gf9NY2oT5GrlqxOVW575HfmxEf8DpszL0dSFWB9QfGH4m4RUPZ8irRnzdah2XyHeNKJNRpYzrsRHrCfU1ht9pX9oC8xNyaMTVHHWNnBtRjzj9UvRdEMsF6lcMT2kqr0bM/yB3jbiZa+t0h7xrRLfA8x/IphHDOeb/MPyTkqXBHMiWKdajtk6fkEdED6ei6LskVlATwz4I8AA5Ir5UreMK+R5REs/nyrh+vxDrRJ1jmIV9ea6Y98gLxHVFHZAPiFpxelb0BbEM1I2yybPmurwcMM+Ql4hppx2nd8gPiC7w/A1ZEMOIuWI4DmNpiXlC9ojLnc79R+QnRN9wulSGftmIVUM9YPgVhAUPI/Ia8XWndeyRUyXKoIu7e2VcDwuxHlBfMDyHfWkHzHfIrMTVBrVD1iRq4vSg6EsjlnvUKwwPYSqzEfMxcluJm422TtfI2yS6PZ6PkJHE8IL5FMPbMJa2wfwZ2WURaJfpJ/I+iX6L0zul9n0jVlvURww/gnDAwwq5T+LLTOt4grxJoszxfKPEetuI9Rz1Dwyvw1V5PmD+hVwncT1DfY98TKKe4fR2IqBOzpc2WfMs2ijU3Bu1KaVrS0e0mhnbjzFOMKYkWk1cteSdCOwAbZIKAcKagtC2Pyi3CsmJNhNQ3gkovEZ+pqHXgrp9qjMI6gShjYK5GXPeq+VPcM0/m7llrotMMqHtBdd4wTWf1fIrtL1g337t4wX73At/7H4GhSATqI0wfZBSkeJAShqFOAhVIp8FlERkmLBAQiZMyZlhZFRXHeagfoX5V2oUhgwQIhwP0ijpNvwEDRGt98QWnjVJN7iGODFmrsgC8ggralorCmQqxGJKHCVqnfk32kitDuNE/Q51LvANB5E6XhU2bDQhOGO00/b5hnWcV5H2dV/N/VbRV0/mcvwa7WjX3dZ9HcfT0hSezrpGxPYMaw7nwOyk1RaSLv8mVGYDsgOia14vn9w75iGCFc73IunXhwRH7SHFLaV5xuhwEyK2vOBgaQDJ8b/nVvWatueAk3yRBI44c/Dx2w8QjxSna+e+BtdPHeVSqeXnHPQ+sk4vx/o/r4PVNlmbLH2PS5kiyYdZAVtWdv9mJKdH4ixG8UWf3zGZ3mZ4hxfxtwmoU/1sv9K37vO4eswxMOmz0kl3T0B2NbGcparsPn5yVh6jf0x+vpy2QzrI/XitXJr83+J8xfq8LNftU+Kvxxg7FOvL2+Zr/7wtyxEJL5ukGqR+tPl5egzTZpXq8DYvr1+nNwyvs8/ardLisJnvf+wjhaY/mopzdfzay+XN6vUxvySS4SmAp/N5kkT0q/P61saa3rOTIHJwp4BsIDF62sLx4nfoMTzhndivBww28kVSG/J9d8JLcMvQEqeGgvPJbe3vE6VazaoxUe1hmA1AiZfN+htCRVoYyO13D080bRq/RMX7ZdfPnQzPevf+eHMLLATnatjCS+9GBca6GTZsKZ2lVn4GmDeyBxo6UVReh0WUvykULwTVHHwQDf9469Eh5UzesBrGJfWYW6ATlLRnYYk+qi0PzhJvZLaQ+J0EX8dkdhwBaqU3MyXHZ/twbHAo/Jnl+9u/iSbcNKlq6DbNZgj/ida/sTqd7N67qBc8RP5ov5Hf/BDIInDhUWktidE5MNrIj3lizhGqocfdv8cUyuAugSKEDt+2iQZoFWXNIasTum/GhxOQSHeJH+A/mueShOjN1T3KfMxGVXHMkQBOrWp1Xq2mbbtNh7ukGfHJwEXtp1j4FUmLByAIJmj+Vuao4YVf8ai2sPzpL2gE36+KtC1KGVVA/0d/8mwpFolCHwwEVBH0i8+TaKPZ1V9Tx8u+Uu3i0mHwnCzx8ZgeY9dbVOs8W9QIl8nQ5KLotM75dKmdNgUaVmo6OyqkotxlUEpxvsSApeQLS0ReXE5Zzp0KXKEKR/tEq0e4aMNn2WLNk3fj16lNxPql2McSODBAAn78FE48mqPo3Wyk9Wt+nLSo3q1GGD443/cMh0ybP82+PAtF4gIrZJhcL0pokYwQhfutFxHpl1x9N++FPoxgnmjevfRqr8YHgXp4sUorH/rGYEeqpdg5byVjnN0XalbFFI7UWlFx8YUwXlojUUVcN3V5jnzoR+WD8NoimxlID44QdFG8p7x5ykyeVdXAOxRBC/ylVm1OxeMEcF68ap/RKErst62ctAQ+jg7Tupw8JhxBqWlX9Y5toQONCshKgQ2HBhrVHyufUwZWVXDjnFVIkG/EVTLv6t6NlFRbQqHbBxSblAH0rnFSKarAGW2oEEfcs64XyleEH0LQUhldVdVT6UYB44kJK76Yprt1lnP0hiOrMWdVT9EWgVPMKomTT6VtkX4VD5L3qorwwtyCQnpNzzvR7SH4jtJbCqbzWOhpwNWp5IDUZHsLR42rMt9nofOlkUIlJQfL4i9/iodvd5bW3AXPijNbC//JQ72mOP+6Xh+rkjTzgXxJCuloOcp8KD/Ivg++rkPfSuI3u25/eSOdJ7v8HXcbT/5qL21eKViDKf+PRF5RjPKj7epwGeEemntmRsUdk7qbP8qa0dui+ammwAVtoI0AZpRFQT71Jowlc5lAY3usTMUEy3HFtEKkzpPjHFrSSaT12we7+T0juirjNWRWahY30xit2e5+qsariv3ShauFQgYtc0ne6txNtZrRvJ1sjpXFt11YpOR2ws3gv9r25FSfe0ZzatFKOR7kpglmxdbtsMZcuyBfDOsNGev4DTejEU5briHHeBiMBEEeWrPcWjQPnY4V7h4f1LoPjfpTP2DT0AT8BZeJZmo1PdiCoxkOf353TYuNv8dl+6lp/PqhMx66izoar7veeIh/dt4USD3EQbl8/oxpkwFGJjPc0MbEmXRszA3S1VFcFnCl82R5a2mzbO2qqIU1v//0za9F2uGGFOzMssZYsjRyfCq0jvK4MGCl3GNaCcCiAg3FGH5bgZRBrQxT2VJ2f2THGA+kZq8SJU8pycUbBmIpLzSkvuWDICh0pqvlzNuWWnu7+Rjpb9meJgaGic+yWd1BjWbibaBSTIgrUb6TQ5kUyJQZSGmmufldxUZNSra/vVhnbiwUqsmVSblN6qRFXUiEtZbYltBMt1EKGMiO/bxzP/9uw1aYijY6wolrdUzoJRxdopPTmLHsVsFS1MgHTBOsY8FqulFrC5Ko9QvbkGELc0g4eSYX1VeOFC0SuJ4VevFW+e9abrvtk//qAvx15ig28AM4HGoNsg3I2uGqhN8Y7BNUMIH0YAC3x8DZ5WRSBkZJFUsCYBPgDvSBwApNg5DhBNyTNHLrSDM3fi7sQLip3keZDxev6lho1hnlYo0G0kGU7e8qJs6KjItvjwa1PE7QbDKxMhRvqUfE9dFY0g4q7KZsxlfhfLTLOdWJU2j3vfmS8tqPB9nRWYMPnuKuCD4lkmdlPoTFLYZkKb9KNm7jaoSTlOQUvmgInD4wU7NGG1V0R92OiZsJwZRzCtn2jM+57J0pKX/MVCYpaWcswTIvMSqaFPTi3z2xPqMsd1473TkBPHWNg9FIOWWBZ7/xLd4Wm25f+qz9X9Brxk49gC2HfZsRi5aaCcs3JK46bn5f4uuw4elOAxgszbe8KK1EJHoFKRllae/a4R4iOh0JVtV4RLvGi3jRnyyPDnc+w2LW5nbEcA/ZyRkR3dRUJcApWSoIZPHvWLF/pQnSM5/77yBp2eh1On/sr6iBmbuyCTZjFHWeToP50P2xtzR32ZPjgHSdfTvlTWqSUinm2YGcYqHMGTjbgZCfHphZiVSaU78aKxBR84/vggHB5S31nc7OpaXyTEKIWlaH2Yj4ULRlFCxXZyxauZtlORgD2tGDHDUPatD8Z9oaimYqVbvD/nBSjAby09w3rspVdt78yjv7srxxfaZOq1V14khF4qXU9PTU8aWDFXFjyZxYgMku+2LGTGRvRhvnf+HtigztwygwiPijc/sTfzVlk07p8cDTEPwmvjk8ryYb70uPe/5StBq4IxmYS5sqoJtGDo5rPo41fAyT76XZ1TH3K4OEseUWhPjJI+7Q+jYsabPT0jcMecTJLonmHY3QMX+YhaTfzXACoPjrt4zTV99szWEH2Hl+WkmgwccrYAvv8s3A4BdRD8UAOATAZtgVJd04mR1uPBTNhMcfirL7l01iBoNfs1hM/qcDZQyuQB0WLDf+X4CePqtPuFVDc0o/sS3ZRN/8XnEUvbTvIfyjxVk2/WoESrVcaO4bMduzj8fhYHFs8RqQP+0XEPmlHXAUMJjfV9SVXRX7/1HtH2WOMwLr0N1vn33Xb+C+1iI4RbNyPVABx7lY0LLhtgRGlQMYY2B58E+VMC3M4FO09osQ37pXrlmGjN+HNi6WJ2vsR/qc+o3GDNL2xKm9r2vqelA2K2A/ncnwtcyJcXxm+J2qvuCg+EGV3FrlLx0DaKIA70luIubDFOsht01d2QnUXVbpLDBsY8nz308109GZnuZZeqlwa4u19vQmjeSzyH0Ixn7YxVZ2FPOofjg5KpRzgM9eMcdY8eioMNdkvVO2FPjyBZd3l2fC39NROX0dUhfnL8RKOZq+kB/WJzbWyMiKLZqThkvusatnY1RHvv7uqY9niDXguF72VSH2mf7cRNiFdYDLxu6K6ZvyEaAKqQaaiS1abzWiVXc1OYc5Y3S2xoOnGHNHsiNHf70JP8yq6j9q2/zubpEU5Zy0tMJv017Z4G7HYQdonkTAb2Puiy2HUgsXi1To8qSo8gH3OyKWVFQT1yI2HuKC24lEVTPHGgp4SJgEduePZAZYMoN25A3iWz3gY/GcdOCBntN/QbBKK9xlwsof/Ijvfu8wTVd5+UGr//uhNLamp2w1h4uSRZbN92qu84LAeh4eqhzHcJbEUwIE4paqOiieCLmae+gOirDGUXRK1QHzonL1zqOndTo5L2cTnG1dH1E/0VkJH9Bm0PQoYnRRpLULbftx7pLS+JbdrHPsru3O36fZ0QtUrqMynOZOLhNY1fjSNb9wMo6tnXTVaeDPpRzP/GcSj7P0/Rkzudq+xW4kvwlg0t7+eeTz//KOG6BWQI8u8nuLi/5R8fQhR7z7d55X6XSDJqZ505vwZvM6wHYIDKkrFoP+g4fzMLgRmSEfZhgr6bqCe+AdaH8Qk+PE9yebQbyqmQJ5xnWvpq++m6jSBJtN5rMGITi5FMlP49K+I+L0IW8I5mdpTSsR9mejB14LVUBFrijSS27ZQU8lu3cGLcFOvvnFoIyCSJ0ySwhLOVMZgBXtbrH0O4L/SsDjvAGUtq0g4k3uAbiD2+JuqzjJKYjHVIMydp8VsDr2YhFkEffyA8mz37qUaNeDSuIgoBkUZzMzcqtr2B9Ei4Swz3KdzqZBiWY5T2srSZhHT2tXTO/alSzwalV7aNXX4kqV2tfizlTY6NSvVJfNhoij+l+98bqsNDL4iu0CJeOMGV65cwfZSP+r6H+uGMvc/CsPsF2ZLv6Ke7Te1z4qqThG2DqxU3/lw3nDVu8yHX2cvnHWY0+Vej/ZWvcR52Kizj3SKo+23cvb716VwuALDlcBEJ+4v7eLXzvVw24V3DKywi442lMzXEmj70i/YVeSFeHowEg8a4+4zvp1DgXQWaIx9CpubAJVl+G42+lzDajCkXcqbzaPTgCSnqPvuzEozys/GCfLr5c1Xa5XfmzdYE0KFNWpvuKTidg7uhfaNAaPfq4HThYYv+JLxiXulTr1Vx1GC+bYpVo0L47mkb/nmVV41ZGJtnO/6l9/j9JtX/GPb8LRKL30dwbL+Vc/jwXSaXn5f7wNEcYJ6uIvj7w6Errp7dwvviTdqAWFqZ36TUL4SdppTRLSJ18h3WetdQBo8sYM/kb46QZu3wbAiazaLTn91FXAb92dh+2Is4JF4P71pzcaHM83MT2uJeopc47jswRYM8d8BDvqWgUlqXVO12C+LlA+kSYrjj+rAZUlPfNG9xg90j405F7C9KqpDCCVW5Rx5tUIEZzko/g1ZiLFz7m86JCyORgaOw7DOqWpVwNppXAy31jaMCzwvCOvcwTPdWXQc0/+8AOvzeRiMJe9I+odU67nv5fgsP4y/YwRwDiV81tbzFkl6/Cq7fv1/dyMMJtsUmc0DTBLLZol6SWAXgZicPaETm7K2XWfdwA3DC61AG/qkBGQU3Pur1bif3fvMrLZp44l7BsmB0Qhjdc774TKbP5Ezv0PjJgTnqzae2mtSOHdaw8A9xk4zS02XdhdToAzqxh4ABTWWdEZUta3H/4dVHcHNUd1WRypSp967JX7d22CATomMi2wMkxH+1BkqBhqEGnUBIVdhBF4huiR0RCrDiaFmkrfIAUQyaPH5nuljkzRmqbeNAawEkCOLT1rDZYbVYbpaOYgJgwJnSE6Ch00PqeET6YE0o0MEArKQHgDIhv46bWFgaKS3m1joZ0HniBywl82Z7xhgPS4C1Q+/Yiikh59SnXSQ9SGnFTU++0uOYSVFOSE2UMao6icpmZyLX+pBZ29unvFB6LcVcQYS7AaQ68obIHGAqTH6NDzaaRBeHQ3uU1/n/zwopI+VH8ctc97cFJRb8oiCZdjEwGq6b93A7N9bZBFmB41HhlN+rCmFGvWiNwmqGK6qqn0WG0w0TmNHpl1jsHGA1IzX11A++21ZeqDScrfFJt3ZJdnXP5I4syHJSyE8/zYf+D9go+T+XSRvfz23L+pOs+0zHd7G91yUT37lls9vsNjnPfm79qQZ0e3SPjTUMXtZGLFHu8T1NqZVs5/MQxvxHB6qFFn+9u7YZ9o4gVx1afbC5DTScixSvOoZM3l6VOpdu+WwTl5r04sY5NcHH5HdZ/6FSZlDaW8s3P97y7NjuZJrJQu9R6oNENVLa57orNb3VwCAlqly7CEb2/V415k+l7QQcnV7m1R5HXe/LFeIt+xQiTuYpe8xFo7ubzwL6sl6mxs09dtc/o53xP3bBPTPJvNRtTsC5thHSX+BIii7EoWl8KmX8jQhShifExKk1ELTHYon6PodgdOF3m4rc668FR1YelaOZC1wFasLo5Ey82vuruPh5ap5y2TAFEpO/S9LoR/D+tlGueJ0NpjG8Bf/wlOET9FETmSrjOLyQkx8+qHgZiiSekTk3E05TUcUwZ9ynetAnwDcl/B5wn7uO+7OCW+RVdp6/VLizAnKTJR8Nggi0NpbaUCQVC84c1RqWDIyHAEQNjIaNk8iOQT+46NFFSnY0gaJH/ePIzM5Qy0rzlmNffBB2ky0m5rBoLWh3m63Atpav9mie5bxyJtyGJEtC78ErNmc1YTA2ld/pkfzclQZFS5L2Xeq27urxlpb272xCcHzUoWprGLjso7680foG72R03V4EvuyQMavYxIEQNCm3gvoV8fQ55d9vLwPTZl7T/zsz/e/3pzBUwyHja//8qwh1axxO98hGgrzCmzb+Vx3GuTCVbFXihIPuGglL60uecBeT+vLUH4oMQk1XwYOawx8ijEYG+NOmxLzspZt6piMvoYX0xdhwBHL+GYWSuXabFa+qbPQJg0nzUUM8+H7raV6cjFDIxLvubW1PCUXAVmduPkJh0bHywazG7J4HWlosE+DxSNaY0SDokOkLOx+KLR7IbG8ci10c2iwewO8MgaODfMVxHzWHJiZqK5XGz4pJjJ1OYZxeR1GlJgdL5A5GbNiRjPSqpZSbMVzGN0m3Eu4q6CIaklnxQ0ZslrqWxW1TCvn0vZCviUZUuSclFLQjdkJlKxauKkT6z5zKxy+jJMCVRtMKDqfq4ZCEkIaVQdMpi8Gei3ygF0OL5GN0ScBjM2bYrKsGqHmjT1tclY85K00TdbGJUyQnctUn3s7QlQbHJRmeiuwm7p2cbMoN5DDS07EhAwIQkLhNomoe6zCzoeYrlEFzCpewL95TibuLHNnpKgvFwSs4UzbiReeCgn1FT8h/8UFHSJVmrE7+agk0WZ/t2+Y5cV+nq5J0xl3KBPi8HbCCJFvF1mJFaz0r6qx5If+EGoVUQCgxYRVrusj5KJaLET2InUPOiUYOcMVwfdR07UEiooL8ZwQz5idaun+hYXsuN9lhz9LkLlKlVOXabCvcCcCZig5sNIHhBNI3AS+fo6dySWof9d+kWMgWL4ClD2MNw8Rqr7udn7QSJX8D6dY2zuNYnaO2841LufTn7u7I1NZRks3w1g6GtpUkbF7iSFIynUuMqoCg1p+PWyo9JQbD/0ijQ+snc7pBCtV9jIEBZjliFO/o+6F+UGBkGCOI+fkczEsyr1yapZ1gMKQctk8WFGQes9YL7pp8xstWykZj4E2almUxRsiGaxYMbckhl6IDvWKTTqxH0Fl9yD+L1qbrRa9bo493Y2jzgL0L66K2ibniYSWIU9MEuBEb7FQueDubYzDKZUAREkXK34WughAtLHA6BUAtvIMKleujVbod4RedC8dOJDi2CbOonii+V6r2t9Gzmree6QCpKoK221WOckGnjbMzDqBktU9Sco/ok3LuBj29Wdqoq1KLsUgx8JC0Ef9jpiSg3pdbHARJo9f9PXYwBkoTx428Qw13s6Fh9ziLygiBmuWIk9mJB7/Z5nuKVuACPuQx7d7iXdTwKd7VA3VCMDjyhDPipTyec4LFQLs/6KRxQNqlkMA/YIY5LkOlrbsl4UfO06Z/T58jJSYi7eA0BI19GHtwy2Sno27H/s+ml9Lom/Xzn+ZA9jAz1fm/FvcEUjKfZ2pZiJAvnxeRx19xl9VD14iQlSIVnGEjAKltugj74vyn+1W1hytW4K8k3SWF1JIPVOSYlmQ3nMZXhGkWcFs+dGurypOR1wXKOPt+bjtD7RbPcSNmIeqds/YJD+VjXzibiI2OLmHSRj19sVEzvrJdOHcGV7gM55bKb6Vxj71F7wRnOdkiwvDTTxeP1dCYO0z1mcSOzvH0o/Fm2TzYzGzoJF5AfC80TkAPnwupTciU5J0YaljozEHj1faiatq+oAVs/JfwxMMZT6IO1ovMPSmOodMxfdpzYYvBqi3qb0cIonCv4wVDZn1TEPSMpC266yKMmsztQUpqy7/MAeGQfJEU6j0Jno9FGu0O0eMqA+ulIdEmIBk4Y3GGLpQs5IaiVN75+h2Yieo55UxQURhdlyuOs3mRS6joEY4w2fOg5icNTLC3vRjZ4RkZNIUpKzpLqMpttZKeaDmo6mPMFF2ajhQbHm5PqLbHRRSSkpTBEJbGBqSB8RYOO2lWc/YRVkCh2bkTnXPxnv/PleO3FEdZQ0Q4sGalptLXIud4nBpiogc9FD2jGFcdmcKSlT/25/ivXifBWtrpdoE4ptXbx7kkJsjayF1C81jIvxFtfVNDqffUMr7VlfExpSrPs4zABBd55Y0A2Qd9SNz9Cqt2ojCpxjk0eveopnKGo56UyotSZbF72GR1LI3tcmap0GtRQELdP9WHOuX+/PfGC+kfUWMNimWguQ2SIThIa0wdcha1ob9SxR/dO0piwXpCdSwxzZyBrqi0KghEhnoHyPqdr9MKL7krhfmY4FNZeHbMY/NqnomArrE6Y8wmftOUDwpMjjtDdH1BvmU9VSx72Gx89A8fyEJ6g/8aEJEdq5Cq03ievUkW5egcBtKRqZ9C2QvjrwzBJrBzUv7by+aNiIrt1tmt+Ie5cVcnYbW/2ZsFZwBoZtsELym2yLpjGObPpGYEibg9OE9dvLrZaPGSGbElKNYSfyXIpMrAe47Ybx6p3rwd0teasiLgja644/rF54X8XWtIVEtcpGDVHFGx/Fe9uPxLzKvCXl71b2LsiR36jMnLkS7vcFHKv+rTLu9UsUlJ3MO1p35G1eQ+z0/ETPG/g9sVGRecWgxcIqapR+OQuuFZ2TyxSKUX/YPZGOV+dV98jheLnP9MJKQfObepdE6paVMC+fCMdNBLuJalhvggOci9IE7MxTr4fXfoNqUNHCYFsH5Mg2Fos1SyFNw0y5MJb4beTtJjiKADYUSZREDhnC3e3k0vifJNSsY2H0qLyRj4lWIWOoydNZofRMZ9geQMa4C6KHok9yBCKDfmlWIoXxkbhUs43c11DyscifmSgEla5lW/o0r+RY9Gy9QVwXK9XsD6zpAZyRcqiBb5b32oo9129yP9+Whp2YT6KbzXK3FIwR67EReOEI//4QGN3QrtkAJVaGX3v8KBSwx1U2xzAbqulRVgPhIcKLA/fNbvtSIqY5O2JNl5MnzeDIiUsVyGtmKYAbiU0Wxwwsfth3HRMLwBmL/gCtuwSju8CPXpjiPBQDLqJjUDNFwG1l8tYgZA/zhxQRv7T8WDg+ViebOz44jm+w9/Gj/xIP/ziBPc8zH+dS93PqMgvw5GsB/KnD7BqbgCMzbIZU4hxL34Y8EHZ4zp4GwM6bcAvznAX8KB5B5+4y4GiueyUMy/34osP/MbRFcSciuBLMNe2gvq61OrFkuSGEJLGNZ1PI1kOSTzL6/CRRjvQ7iAcYiV6UYIYOz4eTkwSOqYp4IJRP+aGRzDj/STVxkBPvzEeZ99AyBqd5ijc4ipH0IXN+pMkXhS3M+bpIFmM6/Q76UdXPEYt1N8Ull+rlNQOtauKbhMUDKWsVusKtELhISkD14MOWeSAydTSIYaIvGI1+3gh0tnMuxsUU34zGfua6QujEt4adMm1DGCuHNAP5yiZSygTLIE1s60Ark5Ea50KvneaSTyZ2GH5akS8j1Xa5ZY1NwEOmUtvhWbJRSXAw3dlrPGCg6QgKJlwRCMhP1DjwWxS7aZSe6pPCWp57xiUx8WcFxOxiOWBzwOz6KdPmwqLquFdmtenFXNJTrIpz20gJyycIxTjaTfTjMABmu0kXVYyuXSebV1Ja3WMdUEU1ilQSRlTyMcKCj/fr28wR6SkzNohAXU0v8BimkBgi6R6HqaM+A4/RHE56A0nGPmvAQa2pUxX9eVOOD50umjsxwARxcUKiHoonhfaEhomuRJazMYGSa7eWoSl94smVbAP1FJymyqBXQQ1gDww+3dJbulkoc6Ww034YhrjWC+Kt0vve1jem6DFf0jwb5PL5x15gxVd2NHmKfsIMHDvEyIayx5hXE4Bl7QH3hYPjwDwVx7uuLe31ERVwqtyxYSIiRtGXto1jBW4PVhRkhRsLsHzdUZhD4lAcHW7vxa3UXNXcx6URsAVSdBb7nCvxey5/rvR6fRU0II9E+7kGo4STqvSBx6dnkk8Ko+XJjLHKiJX5eMDvKYarBE9HdvF9LbpuTSnFMLVJZ8BuFOPNhSjq+Ct9xQBMloKIq1YMwdVSoo7D50WuNo3bgl8UUef2+TEWBZVArP3vqh3h3li436UoihDKsanO12Rk3rxOR7F6Mcb587lY8skLjrnVwL3RyhWXHXRjZ/kyQsRTrE6TE4CMnUdM0zQd9yvlklv88bJlPujlGomv96olyWZXaDvI1X6tEDPGUQ11bcS3lrI7gwgcklEhiGhtZVPf+/ETOi1CHA20MHVRHskhgfSHboH1S6ptQ8yIoiHkuV7ogn8o52UfIAS3NAz/bhU4pihCNG0ZDFNm1gsmmRGS6w7nf16ia+4EUAoKQ94wCGv5uZyFXkS6/0tdmLwOxnGxq14XmDkp5EK4MhzMj6SvnAanzkFFMUgmmtzGp/k9gfNlmfCZOqejvk3ke3EPS2YSu0bQE6pmTTM77TxrcKaiCOgSp1/6k/fM5LRuOV6pPCvZI1emvV6xyLg3E/6o5KhrITaemZAyAExSG0KCC9UUPFa9ueacD0fkSBlzQMqWRcvXzY/vKwySfzamcP4ZfSPhl4aruw790uydVhwhhGs0vKsBIGuGjtbJAZYx8sn5WrMRlZL4+yOxDl/CUi8Hc4WhytWkCVySC1FrM9JktOE9Myh0GdQuLxKVc0R3WaAyoAuFiHYT+k+f/pfYjykQarBH9tEPAT47Bx+/H7OjPvTR3zlC3urWPgGVAUYpMHZpOjMKuFw65ZT6kzasWawanVKmGGFUHJm7L81o0P4ofNDEsZWvadUGOb3n+pk3fsVqO1CtDutx3mCUo+1mdSIkEdVdZ6gA+M/n6o/6pc78YfZPafrLkXejntPr/f41MLyJ5l15ZIfAJFJTZKyQDZ7KgfsqvxAe5LdkxvO+/9ytoKP2QD13rAzRlw5ALkEeFSxRmeKi3OQpIJgT5u7dLD5EyuAmxKLCzFOSo8NR7wbUK3nSvIjgkmq9Yl3nFsc7864QZs+GWf0OIolU5kUVF3cciUhsbKuvuKfJEAyt5l/jXhwnV7071MJjBrmYIOu7vYMlQ6CdNE+SQsWrk0ZlJ9qjrsh5bs2RUid/xQBGJgOXLaHkNMYlM7S3BdR2yfVOnWRjRyEYE/yMXrssV6j78WyYNODabW/zKdUF0vVtcJOmUe7LlUyv1l8H4BUToSls8o3H7jRRE0jVMXXSFOw2q3mMNV+9yN7awsfV2Y0HQMlIYn1rV1cLb8CMSTScg2DjVqQhnbOQCWkCuZhgjA9zOdSqIcwrPqD/Lpow9rmpsZ5354ZM8zRh41Vh8pBBUBvEwdTxCEY5qvdoLKoL658eRjGo4bCz5Xr9kitN1L2z5p+rbYI3tkj+rknwKYLvCMFH90E49BZSvDP7iuvsg1fYB0fPkGRcA1Rvo8HEcglmMYJSbE+yt5QoYHdVPPsn23yKPvj7KKnnFe2XlkrSpnzrTQZJeLTqGbxmk/cCiMRzA+69OLC/5PVSNcdKvOO5wZFB7B2GXt4S+eiQ/bG5SSYSwZDDwQvyDg1N8God34D7dJLda0rQ/z0oX72nnJMw5sJPuzcellze6sY0pirOOo8je9hWLGEBjxMnImgnYgYren9B4aUMugrGVwm7yUxXmMrCPJBg2sVAPJmLgpzUcJinUTnakhFjgI15JNBLMQwSpdB3FXcNRgB3ZVUKQY0D93GA/K2snFIhmBnHS5ug3NwHqYT2/cS6+Zef2lyY7lcW3gT35aBJ0Muf4wjm7hhWu4OwnAsL3DSdRAXP9rM6jh4z5gFHYA7XgAey+7jbx+PcveLyeVxcMHvlOfLukJYt/82Jl1c+qtHAe9D6uLoBXym88GAbMUgjIr0/VNgCqN7Xq29oNJrWxOA6vqDxKPxIXannAlvQmkIUT1vWi5ggHLI6JUmbQpHXiNPIrlMQlFSKAoxZVdUe5UpJpWOblYSqckp3nK0I6whqOuST6Z+USEybo70TRnU4rZx3iXmmokEbsHcVrPVq2JvLRiwS1SPW/ILyDDN+vI58ykNEnjWC1ZwEiZ/H6/Rqi6zN2U8Rg1cRF+V19BsxYVBruSGs6eKBdwyqhxGFspdHFVykU5yFZJBeok6wtKHgyPADk8Dm6Plz2O6Gg62NaCjEAsbjAuMjFPlNea7JvDmUtujmZ7wHaZTC8umaqdisY9wR3Sd2k1gcq7krjFCalkic6SlRl1QnovfY643pNl21412TD00ILQR66XT4rJRnmDFYRiDZaM5EXUt7WWpZmhkNUhyCKueMN/oX9/LwEI61NebA8Jd3+uAxhGemR64EIdtUFhPPvOzcP+uJIZ1waxRjPUT5YXwIiXZxGvNE4kGPT0SkmsNxsZ5orDrEFEREmg053pYNgmbaoZtvlsZiFBtZUhC80GdNAqX3TYuZlauHxx1y9tEhVzOaZ829+aXKMIVXZ3oFp5tGi2aKV55dUXpQzuuw98l5RTOoIbC1SoPVjdyr2Q+CypwryXlfjLAU2iw36KRHl71zoTtxrM3mG8x4ysLSkdulvcPVipyDS3mdaYPutCmDZuTkk3hL7+bs/KWpGXvlKQj5GHqljXUrO1bkIL9zcDsh7StS2JEeSqomfOc875Gr3vW2u03t4zAXKZNQh1zIOhR1rqOICNOkvVPdr7i1m1Cqg0VZ6FGisHz3ziweO3oxn/GxRapfRkmrifSzZ+YgKJX0jshvF5B9Z7NL9Xz4qoC4rLNRmCg2k8WxsylI5B6AVuJaf0PI1P06zjFgQnAmY6DggOMTF8HFDObZE2Q0YRAGWurIckFWq1oWmIeErSzG1UOmdArxWJS3wUdmntlFUpdEzF/cQI/tbwfroLQC8iN7MkSc4Wn+bBi4/6RqcQrlbzUKBPmBLcD9D90UA/E5BNtDACDSnFzQENubcS52oxSYGsmHcFrf4p1r0JqEQ8MMfSUMaL5+kfFHkTz6MTK9Hr82fVptp4h6hvR2FOamC60xfNM113WsfGApH+ay79kX9hE6SVD+Pqf4/9hMBvFnfSb5Jvzwn/WL9d0ATFe+PnuJ1EDiMkvbhLOBLWI3EN0VA8PVs11AB1K/H6ugNtD4yqz54RkoxycA0s7tboHFce3UDx+Q2GoFbJTrJ2xlQzfb4TSlwxYW72iAQCvMsnWaXDCTX1+Sn7RhqrN28vZJ1C7RcKwiN32hQ1LWHGX4Iab8AS4h9YkcK67ZlDL/2UyMkZh47ok7jYjcOmclmagq/qXLAWvO7SnCPg+AwY1P8EVjCequTwDj+2DLODzN98WQleEeY7VqPGcQ7FGh8IWRyG25jHf7WTUvtOrlPWDEsRgZR6b7lKmyeUzCkC/1iRk6jQjlIs00x4Ku8V99SFXY7xEvktw1e8WobTuDms0Q6WqoxONk0eBPNsieX8KzajL+tlcWKprllFIcb4NYTH2dwX0hNB+yHpPkgvfqcbdYzl92W6Z+qknMw6nvcoH008XyKuK54XyIUxY/widGLmEea0OY8PAYPXA0m9f+vo0c/w2eBo0IUIU3w/zqpM/WCyWOuTWeD3TNl6Tpsn7rn9x9R4YzIj3Ii2RB1WOWCaknup/j8eG4Lx50z6cJDDRNy/XSwzw2oM/ZhKj48sWEM3zJMRV6n7tBtsljrn58RVUX03oYqVpi67Mk68DoJYSNTNSY01zzUSfDlVLbR8I0FfZ/DaSkUpwPodSPojuU9koYOd7HZCuV4Lz3CSsczbSeAYAvqXT7YUamIj/waJXxxnp5S4vQNDfxoEXlSurJyf1SAhZpEFbZpe6+Zy9Tv3qYKsOyLw6V8+AHYas2aNE6H/Oi9JE7jpYTiY2OnNjcGmTmpzta/ZYyX/040jeG/Xah5mIwDTPNaECN4UQvpKg+/nNBCmlinA+aFgMJRUMIEpYogewSCIj0UorrJrh/M/v7HLuYGm3SuQxZbx1de0VeNsL8x11vhlr5pYv5pfYnsXEYuIxzzZpT2fWQRnwhdv7ilhFpDmxKOr3oO3hGewBurXN868HEADMJ6VUaL8siBxqBxn5mwGFrVmo+yc43k47M110Pf5B9RlLgvjz2W3X51L/5cJ90etGpYtijoZcS+rH4/U5XDXxoGl22ni2bHfczAXmhYZtNXosRkVKiuognNAlDaLTs1ZQgG3UjZ7un6bN/VDla7Gjbo12PVjja8GjuUTHfxafyDOL4bObm9NR8prNePUQ3cq/YFNdPYJ6PO0xFeALooyMAEyhAdOaXfI1B1xwbOWjA2MUmAMm71q1/Hmu7E0sFUDs4H0YGZW5Lo0bYfx3Z8qvfqtGtlnkR8vLQGzZIzkzx/Xk9p8dgeBqW0X824Awip/vkq7aoA+YTERQgFmV0lNzCEbeAaP4Zff0zff5npjXXvj/qRcmqO/M9eEUFIQ4/VH/nr1DZkwgKsLMktBjMIY2Uu9O53T2k8291bvMIhLU3PYp+2opESnava3bKoBiaGH7UgJtpQscM7rRFOZt7V7ivzKl+qQYZ72cgm7PCef83RtLwV5s5rMhkL+WQ51yFAp6TnZZEk/tzzNlK75q0sqvpCAByjTIhpW8yCZz0ySa6oZ51q/Np2WPubmyifh2dEzNoDUvxV66ql/U5ZreJVJy2P1PIv23RlJMqZ7SeOtNdDFsjcfAbyNN2fgVWvqjWN+6dN97Jz5KYRsnPw2XqkLEsaYHUaDPMAHSse1cyZIGjPLcP4a0v3ug/wyaPbAiYZK41kzlU8cGHvI2q5defXgLrWTqwxE0cbayXcKQ3N2/zH+iDHBn/6CSkZ9qVa4nKz0cpZ8o+WNHoFggG2L/IPWf11qjH8boZUWzZxzXDCv0IXDzWBJPMc6pTGyOXIIjBpHUbJRTgVavzsucr53/Hli+TRj8QZVYoKH/D1MbAAs5Ft95Ard9XGfmYvopjxgIORtyjpKa/J7zUPIXP66L7qykkICMJDdgFb5HkqsXVSolRnwFLly6smaK5uEqNlA/rfPyZCl7q/mGhWgunCiQg8hURj0+U6SEdcEpWYKa80LoG6SE45DvC7qyBxccxZczgSqyEKL6qLwpfiiQX3aW5PWUx1uZiPHs4djJNvh6HRUCQfSIVNd+wzO9Vm08Qy3mCMWZtFB/+2JQtI3ABgzb3ZlNVNCwgXfha/7R9fhhIblk0n1S3nR/Y/L7fXcCAdwfXBj+OBN/3s8zTG9w1/m/O61wUH93cJ/3HuxEJP50rw27rhfPip2CuoX3o194NOyX1Z8/yVRWkI5Ktqy+9ekQ4/zTcAWmt2eIFcIOk2Lf2CnAQG6sCuzZr4u8wkfu1+o1VUaP+xNtskG2a9g75WK0YCmaa1yrG6UmtaIyYJC1MJ6EUxBEiXDQmfJhz7dFnOSy0kD7oSLAW7OJKBGxo3AGxcG0sQ9CWbkzuJDNM5280WdrMkk6/h4mND2EL9F/68jG6MdewMlfn977d7vKfD3nDkWbrsK39yCFP7j0ExRiwSgUT74lPp3lDG5GfHDAaXla3PWndk0ljZxG9WfKXP3sD3tGGpcVR94sCZoIgcg7iNbTe+Sn8OaM/50NErHil7BSjljTpMpWqHuaHergLvPK8PF5WIrrzdDemWb4zw53Q+9/dLH7GXHNLq+ufF6tVlA4l0Z/hECfT0QHt9LKN3UhIdoBax4a+S5z/HVnAJEzDnd2NVzxlIvi0lsKNvSmrtKaBd8cXrlJXHo0xwVcD2J/F8jLp2c4f9zxL2O7qTOr7FOX9qoLda+WsvssFxs77mQCke5YKLjiGDoba/MVQ2jtFpUg61ahUS124X+IDSpByN+JiY6/EWxLsvTakP8M3wWRAKhel4ivwt+cug0YaEvRtfgZJvn8ifV+ZvPW0kXfBb5LyLtZGZIL6ZHD2q9rmnQcXWchjjfpvBE5qSZhoSG3KFj+pSbFBnf2QfhUu9/UQtVrixvntljhhVEP7vQ1qh3/x/Q6Qd/TSUErAwVil1x5cd7l0w4cxjPj0qVJXzK9oyXv1ws88hWt/aElbTq0d17c2WeeWNUB81/tijGphzUPrR+LxSOAD/nV04Q1jd4TU8zMtVRU3qluXgEKwL/BlFnnAlJL4jQwcBbtVDyRz239X7vMn9ouSYsfUofd85rorZ/8v6BCGK01clgAXappzmoab4bn8sFgpSoCJ+LIaTwcbJPgHstIRNxRX8bjT65V8O6FzJ2EFVJ5G+60PNN7okfuXTixj80RyuXSOgtvpi88lQn/Py4YmCMmF46GWBYxlpU/YAc9QRMsPhA3iiU6yyKezRK5DPZTNKpKb1LdA4Qm1kKCwwcT23m9p+Dqo7LxPZc+w90xZujX1EbB7ayrveCx3fEu59WGhRezlcsJokZvemlXd9IkkwR9L8nrWAZYEOnjNcjpGbWfYfHCvnWbrIp1Won4eYDg+qDlqhxlldif5dwfynLGtRSmvj98s2WcLiwKWIu6knXALsiqM9i37OtOt2TKK0FhrB+1fXs7YRTpsjq6N9yItDNHriQDkY/MxGs43g4QYfSTl17yFr+wd2ulhMVugtrhmAkrCzhUjccX6vnarm+2syBvJuJsh1QT6iLzcuskcIg5gRvIW8kkcJfWZkLq2KC7rtirzwVEiL6mKLm+74EHh3Bd2qQhFw9zZzklpHrSiYQOrWrh7wzXn83G6eojuTHadcp/U0MzKyb2Qw1f6S+X/xWLrfarj24LNu3DyhxrGzw6ZmRrXo7ZjWag7THHs+y2NH8+/jfHxQLa1E+hxRhzA6RQJmkNtvMrt1eOiP81RlfpZ357Nj4D5uniDRn4P9cxKu2rF2W9zU6/WyH8Tzk63XPKMWdVVe9dE/B7EzpLQPyIRS39vpzmpAecxdfwCqJVI5w5zong3qP3zPGFDTsjxSC5xUqPykzZEpUWbZYI/OFYolAkTVJ3mYRtyEwegbxG4Pp+KPZxv+IO4tj8FJ3eUEeOHCw0UeFLg8ZTe/U3veCay+q+L2tc5S/ffKAmXryF1Rx+SNyM0YDSQczSiSQpohBIHdJ0kOEnkzkilngoYgsyYW+K4ozWyRyvV+jwAz9vTIlhEL1Yx+b3z23JZ+Skd9qXpcn8p8dp0NdC1l3nsZS+GK3RwyvFd7tIC78ELDFQXIQGMBzyvUJnrY8cBFFLmMAVmP/qhy5cRBZxm6oBo0v/AERH2MoEYWPPmNbLbQljnoASPYm3JMMfn5k0wTzNUJmu53CNyqri2wHTY/AcEqU2xqi33w39gGp/e/XpdS929aZGhXWGVNPrcrPQWteeGQbKf/anlemCM6dB4sM9qEHJ4aFIQLlUq9XXzhyq0L8cerBhMf6LrwUXJ5ke0OVBjK8S1S6TUYsLBZRajTqwmglaUhr/UONvYLkwr4vTDSqHbIBv4byXbn+aroTmowrGgU1ZEEaGbvng9JWLtscSCCifDh4u03deteULDXGmGE63C9dcna6sZGffx8vqEzCy5VDDU2H+ZHlJm7uwNiob9jx0y2HD0BMTOOHnXl5W0c5inj+nPwI25dz+eKPIj73iYt3wnf+eywa/5GSBeb4ieCtNEaASeQ1Saf3LzYQxybtR7OC+eZ+yShj/hd1UxUwlfJ9LVGEl2NxuDRYDjLKeL9JeACI9FSCbDXD8RyXldRID6mkFyY0mPs92rjySf9qjelMnjZV6Jsq3m9BaD4bwCIOPyXep2k6NVtaS2RQC2y00nDTGiy8N54dYvC9wljxYQ+lincZn5IxVkovLoGONjVnZOlrVtfCXI7m3mfWDjl6Ys1OPjwfOZxc84kGoZr4/n7AxmqGMNRnHW9QKmgfkndPL9dDs+Hnh9nAUBxAGPSASLYbxbR9s5TA07UPzeZNe9P262Vu9DtgXCMVSou/3GprYScfptH8mAq4uemEQ5QzhL23AFrk20BlLHzWtTtLdiiF+pGvk6fknfsqbVUULbXrVA+791yQGpkPANqg8mEKw1tVQdlCqUgfghq2XdjsamKIOs6PIhuIRxpn4HTJjgay/TUBSXxpReRfKpyKNzeh+NkFuLUwFIaAp+zE1OS1qaR+vgVrVy80URE1AX6jNP3T7LpNy4gl8dc0cag2Kk3SW/LotHdGtyHuW0O/oxzA4RfEu6ne09Ar4x/t4893FwBqBz+3wKtyZiJZeHTeZZzl0EswoPEQhaFSJ/5ita/uln68H5JxHJjz6Q8tzTbGnNIF+5nBmVMlJb6NnIX72lFJquVGrsKFF3f8kYUjZKnY4IFZZVW0LRdxOYBWzBs8GiEstb16xkkdDcv/G5byJbcym3zbkRvqedrwFnzWieHIa2aGBrl6LzAWCckR4sW4yHkcwCWQDgLR68HRL4OKNMEEiZ9XLbv3dyIXndV0KmxuSUU5u4nw/Y0f/sINd4/F5ydIy2AC6pPRRPamUmK2YKpkApFtUTY6aeosPMSjB50lpN3khE0hzTSvEJl5lkXenNQ+vJUJIYU2DSNrM23VIu/mt1LyhfZMDNgHKEPzWNQ9LIQkeb3OwUBCw48S3/zRvxwa8E37G60LiedFKSIvy0VYr+pd0Yvlhk9ia8G169+HfC5Avo4MIlKqeZTTqyLqnsrcg5golzs0SdMLB/Hz9h4z1yyj3YmtJV9ihPdn4pXY3WvrCFu+RhzXqv+sv9S12DDne8+46ZciDI0kCJTgSBdpQIPkPNRkLCt0JD7TCXcRx5uHtM7bzP7eHDz0b4UDAYRJPozGZcGdJj1l5TGz4kP7diU9pE/TXONzaR0rPTva+hYwznwQaB3jdPj4WivkNIWy9kxEetVnraNDMWHTLUHSApXrdLQED7re5l1G7EtNl7P99GBpznP85SPBgzeKZYf0BOsWj+5RcSfl3hj4sRgikKVdaefK1fIXR7Tl0Y3UHTaI0mUGfAy7H350wEKK83jljYmwAH/WqRuD4aua+LYrymycPScYPTVmTia/udOvhxx76rHwMev3I2XbRHbgACjB8x3dITNZbP/yyIvBHO2y23NjoivuuQblHsKMQGFW0Yde6gwaXzBmMT6G62bQqTCDmj5277CAu+oo+3jplAAx46DDYOZuaJN96nMZzU3w8H0FY/6rObHMh9FS47TL2HvPhvzkLXRWHxdu2Zwszyt/6S87CjPgqyu3+ECAw4hXzIDFIV6//+P1jRssHCNCtXA4rO46ghpl7sJqrUDGI9NWwJ4y/j0hWjG9VZyhvGojjpOL2JynNAJfQ+KvfdVWdgW0cYTdCBvM4b6SAo2652R9Z+wtc3ghEwhtc09hFGrphLlTdEVWQOWzh53YB1wZi/u1DxkBEvbqZrjePRMIwDmUKo18V58C4hdVIzlelU6qfZJkyhCGhMG/H5Q5fCy4bQB/KQZczi8US6WsPoPRjqoCnganSwUK2pEa697wMMJGXN0SsQ38zX/kpnZFyIm17gJwCsThkbSd3XGURwB25VO/vmrMZVeHelriDuQUyhs6EJNqbz1wf7vpZ5nsI7gRC3feA3rHB20JpiJRFLZ4vVM2XnnYexztxV29sX4dAuPPs0/yTghPHavFWx6KPPxzpJpTLG+iDdZBVV3qVU6oMqQ+lbF6T3EKZMLH2rDZvnh/lhNLwsAXrogjKQBmmP44CCB5hmuHISuG/a/Ycm1RZQOrKoB9xbMNNeu2+H+IGh8/zpdG4fELrvDBpYke9yhMpWcKM88oB1WAz7ulFOZW2Q1aZdo1E15W2T1vCYpX8tHcicuQPCCxu8xJVTvYHt6hXlVkbHamdzYnG6kf2JnLXuSYGLB87s0tWenvp2IlKI3HRKIzVX/mqxP+2Y+7ibog+jtKgaG1HdgdRTqzaHyrfNSTKuLGv5/LG+yuPuzSnRsIbK6c+drk7d/qeqYt7+OA/FdL1wHn8NfY5pTz1WE57VI3iXvnZ9hqUEt8V/sXqPqdV5kdHhjfM3lCy79QoYdyfFyGoj5sK/25zJTjcxopHLXjPlF45zC5gxUlKnenNrdfOzucWuXwGmVWfvUuGfDuIWx+bZtcpOkApRL9X1VWXHkY72aCSey7PfSSUWN24NFkZdztJlc6iuy3ORTpopMEmMRjDygPlIIRutR8ZQ4Z9IJhAW7WTHzf1c8aDHH6du1+AzGIBtLmDIK1QD4VNKzNGGlGacE7OLw7/vhkqOSw4hj8DN5x37TMlGIjT4vb47CoJ24btfqS3Ai9dhZE3ju6tqw/0yAGjghS1IK58cN6m/7qXV8MHtdYFfMAAhCvA+v4dXoi2mqlih8OouSlF5dCYEsRohm1zTHs8w4RSI30+GuCOgI+94Ggb+8ijtw7/myeNvqAKsVcnQAA8VaZ6aJjImdNR7IV6SV9mhTaWDd1AAwBEcu3lWG6+lWjp2JgrvsjkCXSZYr3s5jj+/LYsOy+LD6KtFWkAG+9PJ5C6cm8ihWXwMcOXsOUAI4ETDeXFzfuAz+O6qa/qoRGKfCELuON3jUDQZarXTm9lpdTzIDenTIVP7LLvJaIhZvmoIE4XsvUN+PjBkqMNRuJwYS3KsK2hxNWngaQBBPpB4ukZNjixkCpu1jI2VJREoPJxo9BxOaARalDlsTlwIgZDgVtx1E22pqKvM/syolQTLNbl9hvwhEn/+ii6yFi6LsZI9y7NjG5Gu8cdOERnKHGEJE6DamNDtifXew10kMVdmOS2OFfl3YLMxObeeIOqdZTLJf8UtK6Z6/Pf4pUvS8yf52Mcmp3TJTLbpOYkb3YH16W+AuDfwqbaPT8H0gXJ4khmA8QlP04CZdWANgDDAO5Zo+gCi4N/+B/d2/m8c/aUWdwDK8C+temY4+/dD/xyl82PwbdrzNNDg0bbkTDefT8u7zwe5utP206ZDOFxfhO0uAoQB+tqLcdudmr22NjusfnIXVQtl+spiYjpUMlWhDWbOM37prPfMf589/5JpXbjK3ao0ATJHpIFxwIcbB/AyX2U+TVQKds0q87vZBDqpJVHNWcqmHxeY+Oc8Sbia5Et+KCyKX85oDM96nuQYZX5a6zduKtYAdCqNkQk7irHfhu3OlvIVX2CxlHNY9NAmdK8MUh/NhSLsI03e3Xn5H8CcxphqAqfTtBmQIkadXzoFEwBj/nXgt79oWVHLrCBOTOu/3Ll2/xTUoToDXEQtkSoqIip64r4zA67pVa9lJnwaKgZfkADCcx9usfGXX04nNixk7o3fETgMO49OmOkuIGgZwP+2+uokHImPYHCX/KqsmjgO+p84G0qzqHrBoD7+p0w5meVqPo8eo3jCWz2sQjjPovoRuV+c9kdKF6fl/7PiczhFh0XXHqFm7hx24kjm0XgH+C6mg8gDTT7LuTUWrPYRCPZpSFPgdWtVp4W1JWj5tHG03tS6pGzUMcMXV1M3aYd5c340ALQi6GHPw3YNDTXeWuC4DfVDdiakj7XjjJIGse8KCVFnUFKeoC8GcXq3bsAB0LcqNNwUjvAdF+7IxzR/K+Tvz/n/E0IR3EDdAaNs+Go8p0v6cYXs5SV6YjNPxgFuzxuTc/PMIk5HodN8yiHONpFuIc6OlIArHoZnsUwu14j50wmnnG5bwziDdi+Ku+rrobcObBzgA8QyXnNQwJ0tLIG2NwktQuuNdsBJ3BhwVAwwcbIjN27hD5mMWK0v24Z+s59bkjiy4vQ65RtBlugmZq5ycPjeztZ5wV7FjmDjV0HsElfkK1hnd4+arcuUbAGHYyy6uNLmgZNnM9IeHXIzayqmcsPCRsQRbCFcByMxYyKCsZxo99jXdojgWE1JYQsCxIQf+2d7Nxjknvp3gjSElIBruW4QvEUBiqLK+OPKSDS93jKZkj+FShNBBDi80QoYBv7DslN6jqCjWf0qx8Wo9MZp51ec1BM+WHy6mjZNQWErvsreNlWWq1pJVZljlEJIzjOCcCooxZpoaKB7cjEnXOt62hCgX7C6gBQYWDmjqpTZ+7LjuasZivEVlHLWYemXNjRJPp6SlM4P+/4zKbqkdp1i00ilIVQq7IiZUDE/F0rOizg0UxiC1xujOKqs+sOTlQx3LJyvwF6xUYaZuqZ3SODXQnt0mQNquxXCqO2RuFDiLQL0TOmtWsfJHMAwrb8rc8hnXZGmT/zdAHb0myJnBTaHeYOUQS80SjcJQOsBqppofveLBsBue5DkmFqtFpOSrptofCDLIW3CrXsxMCjwVVazGe77NWab2HoV/SYyEUaBU8lGrGcQuQDPvn4rGd04cXreTATCTO2AAUhTXbR1Gtu4vTH5i0mj5OZAUjGVhNcdFG/BvQpWjN+n6iLym5++EFnLT15XB1ws2BgPZxgHND7cqbJbZCrzXRa1BcduwyyrbjNDCCrNoAvIDj4E4WAmp8KQ1kX79JCKhUMmSmBHhO4Q7C1FKF+2XiNNxvCXc5c8hDbucvAHyyAZxc0y3PSlgE8q8WDw8sVOO53phtNkB+iEeoHZq43g7c2t74M+wnB3BmCspx2C4RFW4mHYVCnrEwrdAq28bgBw3FTxUwv1VOV/VFSw7/JUpdWKacIFqffrvwSoD71A8sNZmglQnWqpJTOgkw29vbGeTg49fgk+/b51poRs6lybLO/CISkwzxb2NLOOk//F+qcT2aRp4zXRAnrn4eNxDLl0T8FxXmNBaZlq4FmbKWC460rESrvbXoT7nkmtShIgy9Iy2M6pTO/jgg6wEhoT3Aw/kdAwUjoeET/cSCRADQt/MDCVXDsOnLXaXc4RjfHvAKrhHmoiR4J9HqleuhKtxGolkvxfcxI6gbEweWwhOatLTNian8faXBtrc22srdMA8eqcmQE1Xuh64/TLb6xp7TtuvmJI4irk7RD1zjBPK50qi2WWJSeR2FFdEteQsPJCvTG96jI1jjXqg+C/OdOdUXKzmCqtPufT3PmSRSuWyp3OpbqbO7y7EYkL1ur/AH1Ss8A/qZkfn9SdgI+/tz8Wo71Bw/Cot8u5Hki6Hp1s7GJjVMwZrJ6IcYo1krBs1xomMIt27cBiJYPtVuE4Xto9qIMIb3rIqn6xQPwlkDXvnwL3iEnw5k15rp8/7mqYOBauYjDNFj1gxvJoAZ+JaQNY1jjduGP+enxg+LspebiU8Q5+4i/OaEbf42n5811mYXnw8Rd+cYEEYosBATfLUcQNfu/r+3qYcGEsrwX82v0FdHlbRj/NB6pD86ZNYn5Sd06rcAsNBuTHxkK37i9RfGrs8xjAc5JimxpYyMTW1kOJmd0MmI48AdiriI0kVwmYjjyX5WeyHbE7XGkzSzHVwLsz6FkvHe2svaNQvYFhgmo3MA7LNLPY7D2dlja0lXLQ2puP+Wd5IjoA9wZwco4lmu6AvNnuMAnqRuTdj1MUHk9dwpciSmQ4+VqYHs8g7KLdjbUyDidbKyrRkPhbRR28x8kGzz3DynIJpzdpzyajeKHPusz3NgUgXIezL2MW4GWOvezH71h9jMt6sFXOpQloNMUJJjqo95+ZCrK44/YehMxRx4axIaUCxuuoYGVIo4wjSajQxY6A2ekBkSWZZjK6yKtjcH6+uA9vBq19jGykvrnSPWOUnWznoc+k+Sf2FDY6aEGlCeN1GrOD9Zw5+mznXdwIP5rXDlxEqS2l6VbOZgsvc1zi/dgAtrIHI8V3u9macIJVXpJGZcwupoblZETceHFar+Bpmw1vqlrK2zVabYorVBsgnJlhIKFy39A8mbWkOiblR7shYcRCZqX5rZYJ+LxvA/wQ4gFZH+cJoO9XaW8B3YoM1MG8nWjwK3zFvgMZRouTyiQvoAPLTwGgHNpNQpqmeq/xU3j7ircwjLA00jTixDibyTzyBr31duBUNpfNQbvXUT9SNQxI2tFEuvH3uU1PNTzingd1ZxiWZvW5zxlDy54wPutVuIZT5AoDYR3EobV8GUO10RcckSkm0i3dQ5IWs+08HRspZdXZuvHKOujiPIJg5uwDGW99LCexzUZrBJ6FGryBHqfJAxeId78ft7EwzC0LMjPVItfHknh/A9O6s2ShuCR02nhQOxrGDJJdn3LtLckBYySeC1nhaG6jtGAkB8gn+AJomFyZSpkecwEtXa5BH7NHNNYO8gjK21fidi3g+c1LTsoLgrwHnA/JYUw3FlevjGQ9Q18u7hssj6GA8XJ18/Jv6JKIDbyB5yN+i+DluFRk/v0VCOYLi1dRv6h+hdoph6htLHDWTPdqOy9afCqmOvVbcpZinbk+EcNU+DzFsLPzKS8qfLnvVhl+J0nUmFP409f4DkVrakb6WW0hl2IKdqUW3DI1rV7CxskQvcS9As27YGmFqujeYZ6SD0D5yAENkhYK0sRDmq8MLh+fvezy1S7vLoWPCx9cIsGCwXBg35yX2Or2pKSLXty4V1bF8xvKXYx3+ZpAaa7nBl7MmJ+Pa3PtcU776dYe9XpCvX/hWbsLmVdysn6qJ3ySkpy8fGQfpne+XdDwtP89cfSW/3GtYhveq4/plSyY3oQVvGfyis/nmKM2GoOUREHSFYEk+vDGqkwV4b2Z+61i5rott/PP3Zy/nPB2LRSBmBx/vLxWFfHTADXxJnBy/I3FUst+WrWfmOBmHe023s2pBNJtOIoDqYDBJqocea+ddWC/j4IaUxwAEWZ0Bq0C6W/NUxMuXAAAHnUrJyIrOiERfg5d8NyHVsOmLQhveOuiax5czOm4WaatdqrOY2i5DtDpENtTHq5Lr5fHmleoYRqeuBKF0sLuUpcWDPcD2ttfR+BF/t2aESvHHNRHOwi0fmjuN47toUUc5SD4CYlqOiJVix1hpSqthZFRhVmU1EJ3rEjcWqnq94sdk9NpzPjXs6+9h3xsaGTkGf2Ud3dM0psxcOTVNdrOh5+oigMk6avyALk9pZoF4pz1kzAU87azp19OW814OzGzMf9KI5u0PL3HiJsh8uybaJXpeMZUr54KQ55x3HgIo2/wUwY1A2fnrxxtfxQvs93xBsLJGRgY5Hq2EJVko85iv0X59ucDQY7CdZzYeoqM9u87X5pgGWa42BpvKOcJgGSd3AlrJDR0bGH4KjH2ScNIl3gIMGRjo0V8/2DNHMSKvGg5TlZHJUU7g7evSWbq4vRNUpPblZuTJhRJQ+iViEwB7Qr+xiNPUVErOVH3aRzhrNoWxUEi+mEkK6aDW0uHY2KGVvLs+P+n7+Wk3pZreRXlL3Dmfbys46wPknCk6i5UQsy+1x8Xy5piltk8OdmxERA0aArmH2k+z+Fhe9SwMLZFcTh0N6WTPP96ltFcjgqnR1Yql8KgHuG+Nv6xMhw4narBuoBCk+GoKePoahrb+WjtY/QjSKxOB3Necgh5YBdWumTgX9MrKbWrh7h+DNtvlAsRA75RrNmMDOTGCepCU7Eclwwbz/V5rsFMxdZR/Ki4KNOE+jGp6OqatEa6ScOMqhtjBYHMK8P1Bid85blD56vSaWqYbhh/hKrdUpWlZGciUytKJ4C9a0f1SpKppqRvpzZox/2KElXlZ/jKU66uRVWeju9vB1+Zmp9LdnV57apRyVI1LUk/dXapr7SOur6urcsjSVd29bh9pp9KRWv60ozboQ5GRGWnVNCltOfW1MozpubDePqnfduH88kHPtxX2zXKR0kyhwceFdpL3JwcXQp7+MycX8KjV+DM2X3K4nv9pl4cNoHKFj8R16ItKt/ELe4lHz+xSVDrxbP3S5+K3oRCyQovZiK3ye1LXMwIr0oex3pUGePaWVsGsCzeups2ttSAB6vJGdorKIyTfHVQL9z42Wqey2uh1jrceqVzT8GGs5QDV24tINCMhOy9UN07ws2MqzrDkrW3sHOlcPITmiCn1odGHAUc+13aN90jdNSPqoGfewVcVJ2ZBpCz41QZMbiuPwa/EFivUdbEt33Bo0E1ogES+UDPR5JWuXdex8KlCQTWFurGVtrQLJawiyH3RhYWVal2Y70+cGQwyTejI07f1VZoT65mr4rlbCdHFM/HfUhXqP9gqOifTIMPfAsxGSb0AeMNrWaOmvDJGAKSC1KTElVoD4OFohwHbICQCAlMv1qZelHydDEnX3qi0gpvQpfdGqA+JXfxN/3ClZtXd1kvNvUGiG56HDwzx9XCNKFzi+dJsIoxtv98iC7bbUuL+ch+qV8JBObgYlG/bqd/lxECY5zIzUR0jvd9ucx54bf1sYSwG85kgY/OcW6umWVnEONpDNOQrICjiCZYr7gumxCSb3manUmEnoTaWLq9QXJFSVWTuJ9OHLmaddXfkE5ZehL6uwS2JSAlAgBPrv+vPO39nqESHk9k/yHLSoTaS5W2VJITiIyp+mDCs4+YqVoCat2sXSaGQZVhBw0PstspfkjkpfURsWD1kETZyp36tzJuHWoDhEQMCygxQPkzzbyG5lMxmTuHcxvphWzyAnEQKBxTLF2kZUipYRl30AO5L5jOE/MDKu7JgtEAQ+Av0QKtdA5jIAcrkoRSWAmEll2Tg1VYFuHkHospzIIW0W6ePZ0kOUXo6UWrbV9NGjiz/erb4exa0cuZPZmqXZBzIQ3zP7C8Z+vp0TWussG/6KEP5MPdgFpUxbEWsb/DkRcCJFUTJGoL9jEOI7umy5c7X4uZJ74IkNViY88BflvQE7KxVun/1ZOa07SvKqdqEc7pt3NL0lcBVI3io8+e9IbIZaDFqeLJzjighpP8N5MASyUav0WgEPdYk3EwU3JmTYeWs3KhWTCy1yJDoCH8orxyQZLdVv6pfyYhb7KvYtm7wA2YhEZFuCG9sj8p9137/jfUHVrrCCPDg93WIKca4zwkXNBlBMM1ki6bZWKuJjULsaLfqcYNJuW4YDk4fhyeSID+U6EeBLn93lQQmTrt+CQpxSvk5j2JhFpMsQMBxs1YuFvwsMCVZQqQDpAgIjtwweXpSDKaQoz8fYyjD/J8oacl25QdZtBk3xcBEhULdk6ZYkVuOqebuapbctY7Sr8YxN86r5q4fvCX4m0d1/f0zTjTMhqwsTIHlCKBoSo51yLNla+tDjmOnzI5FqfBkNllJYfc0hrlAMOVlgfMU1geKvqZ/j1D08g7KV+BDvYCUgHolPy3CWm+NNcIkGVop+D68WBW+fpufQKup+gimS6nCVOLs1UaqWrYmUvS1XHUUcp0MfWxSVnukGx97GdsntIwcP/GnAgzTivsWY7SP6OPDdfLpQjplyruRdjlsnpUeabWYI3KfMLDbDlVieUjPmkFtMr7rB4mV7YQflXxbQUoPdQYtnP330uVYISjBgOXpEurFZFbIq0jcC+RSs+mz7GvI0FgbXMfEQGnRxg2OBUjWi1G3G19fNul88KKjG4anYPUnl3d7mXbwb/u2VI/s3n5/efAE8g9Xef/XzVuK7UcfEqgZMoCZDWI3HBY306S1VBkgwREoE4mfgL7k3jRgKLXkPL/Khtp6NJhD2cdiBeLTL4MeDmFwD1KtHIIVZKLKG3spoiJlw7MVclkkroOkVy8CMWKhOlyRaoBJWkKQSe/3Qtb2U2URCaMfNHSp5ROPLlM1dCZbAgP8A6Ze784YmjpvGkSsIHowo54CD7rNgClgSTisMH81gTsTDJdbcieQXyGt2ktQTr8CcXkNl0cJH6oRCgYOnKAdFjRaBnGyKYllSMIH6ygUSIYeA9w5sNZVugQkagxMN+0CTZj7C9RlrTmYmD1wlU2GV+dsrK1J/+pCtyPQXIAPorgcP5dN+GK6IV/vIRlooWLUnk2UwCq4j4BTwhNl0T8Fv8eIdYbqYBqVW5yOWm8SNk9+3cF4BRYmDgr8SwJ0c8ST1VWtqq8dRWnNy9QoLOCssnR1PZS/G/9eRZ2GArBrqBqxEf5Iw6FPisgVHG3ji7YArb8qwWLeL4FHKTe7ViyUhF/TBftcl2cIttWRHqr3DAVMW0rEDOxvihh4G+TWBaj21dD6CKLXX+KeLYQRetjYYn7i0JXecIjuvEOLruBo1fpos8wNy+H1+pXxitl0FTZdn4S7uSjTz0kgGcTqX909+LhPd0eWa4qaaUirZn5dlbqwl+WcXuPt9Qbk2sbF7g389BzsmlDRCcj775eoAQWjfnA7Guh6latRmaOnok6tCGLy4ZsdeWNENjhTpI8TPE0ObZGhxeiqfEozXJQIMTd0eml3YKaCdjqDTrfXgDt+BfwzlqULSvKllrlGi/rKbtgg/34LlVLyZlVcrKhx+4mqtDQZbgYN8xDBow30WzwZv5DJ+PlzQ42rZjhNIRrG7lu0+S7vTnkAMeqDtYD7Fgl7eyA1KHl+LyJWPQsDx4IcOR2tYeg4m8ZNIpx2qHDOuIS6KmvVBwWvZJdDBBMqFQZ73VRSX/jw7CTVqG0DB4/jofXr7FseK7bCigOMIlCQ/xSAoaHPuZHKauqoyqedlp06fY0zQGHFOHdr4FtEVZAyjwwInE3KIbL2LGPi4Z6CLEr/61rSVZWKgtHmRcG4c5SwfgEOfwhZTXCRGyAk7F+0SSuBz4zCy6632Au5vHgEKUfMrL83C22bUl3iT5XuXzDzZXu7X18D8q+W7IHlrKDuIwcTpvwVcwh6HYslWBVFILh48/JjV1f9igkrn800tnslGIjSFFedZ4uH4gzJwla7/BIKj5fpgBwEk0aPfVUJrbLOrc16B5TE29upv3JblszntzNha18CCXII2ySyfTTSxhTHYnUPKLHBhxQ6npsLEZHPjSPJNZ52Y1CfnfOJFc6arXE5tA4t5Ljph9sTKUfEvx72oLKz8l2M4z9pn3HDPgwfPSfzi28sH//ag5Yzcl6ZMohwzkMj4DNnDD78eTYnduk73Anm/PJgR94dYP2bdeVI89GXGaePEqJxikYWxtTbIZkUTDVFklyFkWiIOaztM1LN5s0wxe2oUhhX2DHSzYMOHKdX+oXqYzfs+nCHdQm1va7x+LGb7YXylnCRiL0xmsN8xBxzGy1thGJZ6MlNy08vPyzRdYfjhMjpbmkPT7WCAMJf0q8vvP45uHQXw5OxObRMBsdxb8WAPxm6/nZ4/fdc8lTS4FSA+vvgs2OH9q1E9h3jhc/L0s5HuB10UrIOU+uuXZ4c1vPBAlPN71bYo17dR493Y+oP4k1I4LqsiAHRrXwkp6uHH4i3HreYG7PO3gFIF/LmK0O6H18/ZNPP6C7b81HnHPBPdW6N1bxNq+J6xVPL/tghAh9o8dDnftjFMNHP/6r5tVAnR5H94AJ+Ow+5zmbi/HUhPyv9nblfI4D6lVv69aqmhE1RskbVz5OBYJ2HQ8ahpCREA0egRTPvm9dz3XI97uXvEnJnFIM3FR0+syfu8lIbu7y27Vp4zKaZKaIj++ha6Gk4/D9OHZVn2AiTW+q7TMveaR6hTsEUbda5IBPB8gSjwzHKUU3AZOU1IY10BsCLl2uPczDCJj0yL4YPdIoZKsTrFLpE9zRZHj906Nh4swfHPNH0ZEIvXFcjb+3wjSZ0N8p+1H78zUyTemmBvl2toi3Xn/COdQQYr+fhkQPJ3OWaWLtdODO7hOP1xMKF6Xlbo8c2oICTdb9IyQ/Ax1aDkVZBjYdjMXGJvYym+MJxsMeTiLZNHdqY9/GUWF1i3g7yyQSSLzAHMZe5kst8V5cc+D93mmjyVprTizr4Y4Tix1KGarWeZBdz/JnCoMmgUEYuJzFhFAwymOSUicrQUZYHF1CvAH4g9Y8/Id9522RQTOrbVUv+wHiWg3BLuqsmQxIdSJd9XyCBATaOG7ZLAiXArKiA7UEibJbYznbtRs3xs08597A2u4V9vL7n4KUodH9jEx9EnsPtyJ2O/HhRYglYutWk7p1qQC+b2j8ldVwlPm3I98+mFMWNR44NJh8ZKiL9ouMJmwl4fOOSOI0hdBQkdbCVzIdiuI0IHmernhjcLINMzmOnqEjPdHOxa0izz7jwSUWq4fdhG1I8YAPjIkhYhmS6AE0NxwZOtTeNZIbdwVc/T8hSkQGvZ7wbkN8jFyFbNGAfDWJvLolCtPFqX3zvXYZNjm58PSCPd7iCYxpd3TdrfTEi9Y5dz0HOuHa0hH5VI5DZgJgZS8USpLJo9XJN9/ipdS4jUJEWsH8OeuUDbjHRN4Dnb0gdA7kD4QwpxvjK5/JxM0gpI9Xr3oyHldrOzCmT4I1jToLe/8SzyGz49cwfa2ZDq8pIrh4bAaJcVNLub3JmzY1JJsnKC9SuaeQsqGTVy87UeJcjHK/bsJBJ1lCY5DIKNz6Y06Unjiun6LTdtWSd8ZnsDXG0WnlSl+587FTmVrnckfE5vPFzlgg1KseScklJUZ9BXgel/+ez04AguQ35nt8bjJ2iuXJEFbO+kbsA4UqbmdX5o3YAuh45Ez+gDH3flMnf0VjNAXQDyPsNtV11JWXAtUjOeyx0THx1QVCGRj8vpQHuHp3L6UbNmMXpVqWihWuhmOhkhTZzpoY1HR2tz2e+rYffDUdSdvlSf4y/lwZYQxHn9OKf5QN/20nlMAahwav5tcN63LyC2uN+e4RuY+4WEWTNZUvYdHtZpGOZX+Uvgvd0Opsh0U8KIdEhPlJpb8qoe86inSBO5zSOqLu1Sz60KJQuTW914DDqHGoqI7uBbFUywLGNymOqqFaGY8DrN83Yfe8p1mzioFCHTY+acG0q0pbT7KmBX2yybw+os0n024l4jc7TUh1t3Pveu0ewIRvoU7qyafaTjIj56iHj6eD2LbB6N/YdmuMbAqiMvvxWvD2SKc+vJP8HSQNbN8I6Oe+Wtj0mPZIDl1OPb71bl62Oeag0jvRodbOCtTmBfplAIv0bMbOQ2n1oWRXuaIE6cY7CndZi8kkNO3M4RWfm1BtC29B0PWhMDUpJON4atjU2eWhKsOUWEU6go+9l+uSQ5D0sLI/UrZhItLkWQrfamaMxhKSZWKz5TUL+EyeEFT4Mi7c6jCIM51FGb+SYBO+/GVewPeo5AnAxXuP7adGgrwP2RUp4RiklOhdCDkktzTGUhJ00+lVCPGcMjK2hpmj82L01+qB/DobaGTvpTCWzSj7maWTCND+hIElwLTNz9pBrp1S7xGIv85Tg8s0E8kzotC/WTKnAlrpwCOyUpf7hFZvVaXtLMmFQHVPPka0PiZF1VRGZupcOuTmgiS3RTGHipAecgWCZZSmT7hKgPWL0KOX10sWbJGE1Uu0b+TRww4Kuryq7qa6EIxS5f6gxo55WCzFjGDtFVCDG8awq3XHl9Ohzcdr5cCYO8dXu/BinVGKCau3Hedc+QGqubOnqM+Fy5PU+luqL1KvlWA66XOeBYZ6xzuenD1hrWgyVaoA0/W+BhQCxkiTYOglIyH2BpqwQytPO5t7ed0ndyfTrlRDFvvn3DcWgQtRho97x5jyq7uwOiqhDMSGUmDD857bzN2M06wc5saCMjNPZue1nkQ3x3ZCeggsV/HQ/aGL3ufB+9Dqff9XdGW6a4ck/5yr8g36Wvtl3pJP4GyvjFvuYwHNnXI/9OH3wXdypdIKjlT85MZtf2ETgKkmJfCBXRQfKULUDlfOSg5Szd3lyrDUFJ2H4DBTDVPNIcdssFjYNPc6WxLmOGRlHiUtDN1h1wbSexDiwdJOna3kkfs/XNP1aLwDoJeDgAWMh41e8KkuMmhurfdXZ1Nz9clWKOSGSgfBtFwlK4JoMR2NHCw4Nd7qlP8oJuGulwdZH1Zd9vQoef8WxwQsi9vcZrVIW3rHw9pf30BOt0B00yBgG178fyEFJl4bRvTktUUUyVsx91AusdJh8VBpTnbyv8qEXT3EM667at2158odyJTeODWjF2LKu8fuwIHZ7PMwlr3P7IwoO3/g4/Pp1h0wlHps+glyh9Johfusskaxt++xSRvV1oicVlwsHexYahYZmCCJ1NQqxwuy7iB9lhGCyGdSETUn7Pyxnq/wk1B3Tv9ZMvAtFbsca+UKxA05SpAW5xNrjUlhl1PNhllAvPUkFbPKvDiDFffBpTQGJkAd/cM3cmuHddJFGWDU7ag5ruNtyT19/2OR85eVZlwAtOdxL9fWtc+6dttaaqmF9qac6AxfId1Wl8iykfQQzcdeDasjuYZRRAi/X1C8YnwV5LDLtYLS8uUb/oKPgfJTicbzXcRS6DqZfrT4FFHvLK1lAdnKmsF5SzddGrwIEpq4w+lnog8PLZ57hVdZ/iBMxvVd/q4nO/2bGPW1KSNnB9B8l7lJH+oA/Fd8Fj4GeCoPKwceW6U8+t6badWluHONPo+cE9/qkIKPd+//I2CyHy9fGBc/fguXEGI4vXQW0grdXZdCHSx2hf7tkd0SiZUmWUJNbdhKkUJKJz7HVzk1E4nQDSvEY3Cdv8YNWEyxtKD3PA/uarQPpzy7E838nie3PLKzSx6WcfT2xjpdWHtrt4hXqRG11FYPJcpJl+NZWkWTTv6IMmsNPBEYq2dUnocsuuto4vOnFyErTSEn4S293oMg0n7vBVCbyIqp+kyF5YtQDYR0Ae9liUrjbXht3P7KIkaolwB6/jtd/xw2nn0QWYi5BL9j0c79nB1IMdWvUUIkRbZt2Oeci7xQO1gRW2fPQi0hrL5qnKzfnWh/yiomtpVGg72lrCrn5QOSa+QOuF7TGm5tG8jMSZrmSc513fx/UIdo0lL7s7DEbSrGGtP0MmZl3y7pIA1QxIAxZvu90/cH9j9dc2o7Acd/1kNsRD37MToOtr0vzTAnXS6uZangi8gVwpjydkPQAi5msU/WJ6lX06QFn2FHx2qglcxw4ey5JU6IKXK7Og2R/YZzYoVJJ7nzjAxM1YFOdc//hPJ2UMnw/5tOPn3E15TWl8orW/lO7dhJM28/EcHNXGObP02Hr4xI/TZrbZOSKPJ0iZ6OToa7BFIa6e1PpkGVJRV87KRZBZmD5CKR8xdYGcH3/hfIMpomE1lcOaAAvG93gcERSKrXGHvQGSpMl1gp7dwP8F4gMJL+q005TlylvM26vCC61XE413/UIuOcIP+vmp/F7W0XP+OFDRPF8z/338OVtTot/e+S4V+qMcKq7HrxEe7qeZptsWy8hT6UYucun9VGZkakSw6ZrRmeh+cBw76p+CEa+VQ89dbxEOP4gQzMaJ8WT6qsUnd3q1fREeDg30es7AerZ/oYcdgzhlpZ0DTjUlkhqD/oqemczQ81UXxD8dCGY2hAVeH+0NP48XYMO8doZrH9glVMOwXLZ7R5WB5BKikPgcLw8MxHcw7zZwhE3fE58JCt+3kZKJJnEdaxFLuvAtTk7g+YJJ4oWvf321RQcmVtNyb+d86XJqZqNoU8v1qxeOwBoE7Z0HydZw/rxUQGs+WAXsbmlGbmMJ57dHz7daeqKiHDQYYUdTzF9fEYC9gygXSUgc2bfxIUOBImGtFWB59ALM7YCodD5QtSpOOaqZ1WROmYTLe8OhbwqQ8bYK6cymjgMtPi3t7bINgWlvgixpugzp1DgEaDXUGkDwDXA3tFC6/kxnSRict4pGz9GXtEiAlmqxgkbzQ/otLbsRpMHxHUjkcAteWgrz/zLBFECzGNyq8o29kIf5akCAcjzOuR3QBuJ5WFUCTnzHA5wCloYz2DdztLpSXQ5RABcorvH1uEXCMngUS8IjbCajYpa7E3mvQRXxLL6IWfcp3+4IYWD/D4KXhKFsRPm2qtfbbgNZepRIa8gvOuo6VK8f15u2T+1yuDx2yB3/NUstwwblVqSF3ZaOjpyN/3Li6bICisZiRikcejAm+kVHx+OjPwgWfVSfUmJgeqYnPSK8J7E0Dlg2oGP04oMVlYu1a2XFYx9e2j3GZ0Df69D3bzG63qvbluuESo9s8+RGCiF1gi4+6W6YVV+7NwMVMWHBTJzCKCnjeXmKRQFJh78R5vxF4uEc1s3S5rW0U19YMLSDeNzxyqkucxyWem9PQSQQUkKNemRkpqjXZei3b/7SkfKD9CFjq2zG2287IdWH/ZiJHn8SaSvyXRLSQFCe/G7D8yByh7RFPUuhR/a+Lzi8BQq6g1fjRdGPk/dVpalFZ0Rwr/jyxJpB6lWG8rufTa/C54AN/z4/rC/ULSR6+jN0A6Mx79ppGPnrqt2/SKbv5fucQ5OItj9tbGLOH1ke06C94aUb5odsWBssEFfz8SmTyaertBDzDV2w6rK2xVGSHmd8JXXeMERSuAsdq5Dp2f68PGnj/9AVoOUCCTuuqTEJO9p5ZYjtEDuMNXuMTCkvPOKQlI4bMXPimvz61Qr93h5OxhXzIPv8bL7tLXwRNMR5XcvMY/53yW1xVVsRlIiVN5dVkxTh9Greh831woHm6sEA86OQukjImIFzERGIfhrfCyngpGqJ8NHqmVjs/EJcZzJjit1WdTgyWlB3NzPsA5NFUnrQTbeSCZJDE2Jbh+55o1nPM5tuIZvjJxYrHUce4FZ/0VgZBXFstn4t6Aqlyv/IAYiKXjT+xhgIFLLO2rqNqWMVvsOHmd+CLHb502yA2GDenyHLa57JdZtU9TiSeJFKoP2t+8zR5PvcYOvupUbDb3DU+6pj+0j6Oc5rkI2qSCn2OhYlmfTZqXSMXXwKMThR9Ewim2Q2ND5uTpy6NnaeJCby2P4Spt/DV32R66BxY9eX8n++dRC3ofxF7KQQRZvPKasPdBLFmvQ9xymUMvQYu3wGBgk8H9tbztpuzIwYa2RUCrFd2SOfL24hynlxbbtaVLn7n/2moZ+QprQ2uSOZTpUWSRVidMWXKRqRbQqPaKXCtM8UfbSpy8iWdjNgZIl8I6OSi1DBGC5A1ue57CIKxTFwWkrzkT9ycpXJzoaYszdJwHFxqAA7ajKyBaD0MMWbtb/DunEl5mM6/KOazL5GFapO+YxyPlc398OMvK+kQ0eipBTvnOitoca+ZdyS2Uu7ZKuSSHzgJDEdQyVLo88njsqnN5yB70FBGXSTOgjbRxaa+qcdTGK/6hs2ulSQPD6nAcEJp73pAQsXyOxh5WFGLc05ypJOtIF3gJ7A9mHzLPSz7lth44BzJ2GhCnYo7E8HrAtrHFP5J6vA6R6LHoHF8nNo8/AHU4yVKm+xMsAm2a2JNJol/kjwHIXQ8wFBe+NQd3Ra0rv9UVKRdOvecRIjftYaP/PIUnqPAbx0b+cLO+P+izO0rNoSZhU/ufas0j5ED3aCN7Ec+viIM7c71/StqokiycfrpAKgJH18IZWKGbruhC3QBxmmDaWw4q08FPK590VTtu8ifAXXkTgZ+bgq5JOGMm0tBkdqNB7dXEdyUfkB17fvX6Nbygi1WXqVPwTlT7H+zgCWPd7i0g0JXRS+fc/vtFtcMFVJ3J19xaRPbKiezL2XzJb4DmK9buKQOx3n7aKE7bANFg/BFFExD4ZJIiOrFZOnc0SLpSNyw9GzBi0NTl1200IsfxICneLkKPdalAQsh//orJJjCQjHmckssfM1y9fFczcDzcgdKhcvCGP7puPcbS9mhuVeP+gUQ8eDxc/0TJeJ2l+iLAevqIna19/ZdlaO7cW2BLXuPdaRMb9fEB4dPSE6aKHQHci3hku7gNjKoum4gzUD69aQCbH+LlLu06yMsQeCEmWqMMc0C/wzC5oosftbN9asFHM8aH4wnaOQA+zpzzj8XAUqffSSBFtJOHfLK8+eWapHHPLZRfuX8/gdFjsVAsdZwiIA7wM7zeS91PArafypYIDK7KS9Un3h+uX48tWz/efcNNOPuX/dR8Ac+u1gXf9HHveKXRS0TiSI+ZStKXKE2ephUhupQ9tQkSg6BaJClG1TGnkS1ggCYWfBOVlefwEtdeHsBKDhxxO4mJzxmqycY46nlQoBWCCwGopIjEMd4QRcLYdDH409fyxOQw0AuLb1z/dJiVR9b+nN2vEFcDeUKhfNhy2rLmqrqLc/YwWViPZ6wMp8jf0QCIxe9D0YtxHP0sOTITUzlY4aScxC/qdyYZvcWJccviV+nODq65Nwicmq5qJeTTzG5N8Rt5XNEvrw9JZgnNVksrhjvfW11YfH2iKq3BtUeJHxahXvB7fujQQka61yeJa8EoXQfAddBcUu0MP5pKoLfBorwcpXYobh1m9qPC1EC6PBR7XIl/r75S04PRG6aj7fs8Ab2tmk18bHw8H0aMdVqptnrKubYxZQ8psw6tvtbfxQJrrPi2sCVr1LbCNNt9OIbQy0yB8CC+0yGU8ALatNLTuRx9jIcbDVUW62/sIcf6U8o8TsNyMpEOruXEdn2AoRv395Ns6erfktVFVvsUslcINz0lc1L8AxUCVihBcfgk4Z52zx5mYqR04f+IuMieNjyEtS9ffvsagE/rwVH2WxxClaEUvE6vMwP8nN1qYd+UH59DLkLsLKtS1wt44J3UzvDDNe4zv723364Kpn4FIMCxn4mw7lybn/cx/iGxvQS1W3qHyOspIaXhRjjQ5UQk+vDqoSg0yIUbpgxdn48jXwLXQF5V9JNlL5b28X4Eosg56eOfOWXabUxGBbuWUxnuM0gYscP53o8yJPnwzAgufzLISOFyTcrNkLK3qbU2mXy+gittRJGK4yyHfH90aN6HYLUdL2YopqE87VLeSUHil6x471pnhmH2iJy9ei8ztHJ0dmOZOOIh+T4pePnl64AXRiO/N0yCNNHZNYVLd8iXyVfBjcqW6ihDQZZOJOPf+XEwy9lYUJZTZ/FGc+IpfkXeYlM4zrjrpjSwqjMdXwiT5GTK2up+AFUH7CC0WESZcNZLXcjFRuI/XQTHh0z4Nq/e38fbv7BV4kVhOWUunfwFU7fPLsvWpgVy3/pfVawHdNTRJH9tazLoblV/NDtmypiNuiQaEok4V4pZI4XLeMIofh3Uv4ZkVlSBVhlAOHEd0H0jiBazhAbMyg7xscTo1/ZBY14ZnvF1Tjepad282nsQfcwDvIGv8nvmOdOvtf99H4GtPhNA5SKQrRnsgxYNZb9eeqx8thAf9Diw/QBUXbhHu4bB6eSYyFGFD3JxBvOBSWXNnUqsKuwLXoIcAbuE7s25MQHrQoSWuw/AklHFvcXEQodRBqjvYnQPjM0cWW9dbguGovmVf0ncdmPUJti5L4GQfTJH+U1x7vII7T3VWtu9pwdAwPB8Lj+v+cDh5vTjOvtbqJ17n+JhTpuj3DIKjI3xWrRXnom6zv/9neYg4H7CEvf0/Qu0OsPHo3OcaVbncU/7ru6MOHKxdyjIlJzjWV398Xqzry9np1Yj4SqnuOz5WypqTsrv7FSWPCWZjlp0Oqb4+1wcft0yIHShagyc0G4PsKWZJTzOUQCbXrybrV1DP78JdXSBu73hBT8wlTtND+iHyNaBsN/sKNUtkCUcnuvLZu4Nv2l7/J/WRZel3F8H\",\"base64\")).toString()),iY)});var EBe=_((LZt,yBe)=>{var pY=Symbol(\"arg flag\"),Yc=class t extends Error{constructor(e,r){super(e),this.name=\"ArgError\",this.code=r,Object.setPrototypeOf(this,t.prototype)}};function UD(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:s=!1}={}){if(!t)throw new Yc(\"argument specification object is required\",\"ARG_CONFIG_NO_SPEC\");let a={_:[]},n={},c={};for(let f of Object.keys(t)){if(!f)throw new Yc(\"argument key cannot be an empty string\",\"ARG_CONFIG_EMPTY_KEY\");if(f[0]!==\"-\")throw new Yc(`argument key must start with '-' but found: '${f}'`,\"ARG_CONFIG_NONOPT_KEY\");if(f.length===1)throw new Yc(`argument key must have a name; singular '-' keys are not allowed: ${f}`,\"ARG_CONFIG_NONAME_KEY\");if(typeof t[f]==\"string\"){n[f]=t[f];continue}let p=t[f],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]==\"function\"){let[E]=p;p=(C,S,P=[])=>(P.push(E(C,S,P[P.length-1])),P),h=E===Boolean||E[pY]===!0}else if(typeof p==\"function\")h=p===Boolean||p[pY]===!0;else throw new Yc(`type missing or not a function or valid array type: ${f}`,\"ARG_CONFIG_VAD_TYPE\");if(f[1]!==\"-\"&&f.length>2)throw new Yc(`short argument keys (with a single hyphen) must have only one character: ${f}`,\"ARG_CONFIG_SHORTOPT_TOOLONG\");c[f]=[p,h]}for(let f=0,p=e.length;f<p;f++){let h=e[f];if(s&&a._.length>0){a._=a._.concat(e.slice(f));break}if(h===\"--\"){a._=a._.concat(e.slice(f+1));break}if(h.length>1&&h[0]===\"-\"){let E=h[1]===\"-\"||h.length===2?[h]:h.slice(1).split(\"\").map(C=>`-${C}`);for(let C=0;C<E.length;C++){let S=E[C],[P,I]=S[1]===\"-\"?S.split(/=(.*)/,2):[S,void 0],R=P;for(;R in n;)R=n[R];if(!(R in c))if(r){a._.push(S);continue}else throw new Yc(`unknown or unexpected option: ${P}`,\"ARG_UNKNOWN_OPTION\");let[N,U]=c[R];if(!U&&C+1<E.length)throw new Yc(`option requires argument (but was followed by another short argument): ${P}`,\"ARG_MISSING_REQUIRED_SHORTARG\");if(U)a[R]=N(!0,R,a[R]);else if(I===void 0){if(e.length<f+2||e[f+1].length>1&&e[f+1][0]===\"-\"&&!(e[f+1].match(/^-?\\d*(\\.(?=\\d))?\\d*$/)&&(N===Number||typeof BigInt<\"u\"&&N===BigInt))){let W=P===R?\"\":` (alias for ${R})`;throw new Yc(`option requires argument: ${P}${W}`,\"ARG_MISSING_REQUIRED_LONGARG\")}a[R]=N(e[f+1],R,a[R]),++f}else a[R]=N(I,R,a[R])}}else a._.push(h)}return a}UD.flag=t=>(t[pY]=!0,t);UD.COUNT=UD.flag((t,e,r)=>(r||0)+1);UD.ArgError=Yc;yBe.exports=UD});var bBe=_((p$t,DBe)=>{var mY;DBe.exports=()=>(typeof mY>\"u\"&&(mY=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),mY)});var TBe=_((BY,vY)=>{(function(t){BY&&typeof BY==\"object\"&&typeof vY<\"u\"?vY.exports=t():typeof define==\"function\"&&define.amd?define([],t):typeof window<\"u\"?window.isWindows=t():typeof global<\"u\"?global.isWindows=t():typeof self<\"u\"?self.isWindows=t():this.isWindows=t()})(function(){\"use strict\";return function(){return process&&(process.platform===\"win32\"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var OBe=_((fer,NBe)=>{\"use strict\";SY.ifExists=Sdt;var Dw=Ie(\"util\"),Vc=Ie(\"path\"),RBe=TBe(),wdt=/^#!\\s*(?:\\/usr\\/bin\\/env)?\\s*([^ \\t]+)(.*)$/,Bdt={createPwshFile:!0,createCmdFile:RBe(),fs:Ie(\"fs\")},vdt=new Map([[\".js\",\"node\"],[\".cjs\",\"node\"],[\".mjs\",\"node\"],[\".cmd\",\"cmd\"],[\".bat\",\"cmd\"],[\".ps1\",\"pwsh\"],[\".sh\",\"sh\"]]);function FBe(t){let e={...Bdt,...t},r=e.fs;return e.fs_={chmod:r.chmod?Dw.promisify(r.chmod):async()=>{},mkdir:Dw.promisify(r.mkdir),readFile:Dw.promisify(r.readFile),stat:Dw.promisify(r.stat),unlink:Dw.promisify(r.unlink),writeFile:Dw.promisify(r.writeFile)},e}async function SY(t,e,r){let s=FBe(r);await s.fs_.stat(t),await bdt(t,e,s)}function Sdt(t,e,r){return SY(t,e,r).catch(()=>{})}function Ddt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function bdt(t,e,r){let s=await Tdt(t,r);return await Pdt(e,r),xdt(t,e,s,r)}function Pdt(t,e){return e.fs_.mkdir(Vc.dirname(t),{recursive:!0})}function xdt(t,e,r,s){let a=FBe(s),n=[{generator:Ndt,extension:\"\"}];return a.createCmdFile&&n.push({generator:Fdt,extension:\".cmd\"}),a.createPwshFile&&n.push({generator:Odt,extension:\".ps1\"}),Promise.all(n.map(c=>Rdt(t,e+c.extension,r,c.generator,a)))}function kdt(t,e){return Ddt(t,e)}function Qdt(t,e){return Ldt(t,e)}async function Tdt(t,e){let a=(await e.fs_.readFile(t,\"utf8\")).trim().split(/\\r*\\n/)[0].match(wdt);if(!a){let n=Vc.extname(t).toLowerCase();return{program:vdt.get(n)||null,additionalArgs:\"\"}}return{program:a[1],additionalArgs:a[2]}}async function Rdt(t,e,r,s,a){let n=a.preserveSymlinks?\"--preserve-symlinks\":\"\",c=[r.additionalArgs,n].filter(f=>f).join(\" \");return a=Object.assign({},a,{prog:r.program,args:c}),await kdt(e,a),await a.fs_.writeFile(e,s(t,e,a),\"utf8\"),Qdt(e,a)}function Fdt(t,e,r){let a=Vc.relative(Vc.dirname(e),t).split(\"/\").join(\"\\\\\"),n=Vc.isAbsolute(a)?`\"${a}\"`:`\"%~dp0\\\\${a}\"`,c,f=r.prog,p=r.args||\"\",h=DY(r.nodePath).win32;f?(c=`\"%~dp0\\\\${f}.exe\"`,a=n):(f=n,p=\"\",a=\"\");let E=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",C=h?`@SET NODE_PATH=${h}\\r\n`:\"\";return c?C+=`@IF EXIST ${c} (\\r\n  ${c} ${p} ${a} ${E}%*\\r\n) ELSE (\\r\n  @SETLOCAL\\r\n  @SET PATHEXT=%PATHEXT:;.JS;=;%\\r\n  ${f} ${p} ${a} ${E}%*\\r\n)\\r\n`:C+=`@${f} ${p} ${a} ${E}%*\\r\n`,C}function Ndt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n;s=s.split(\"\\\\\").join(\"/\");let c=Vc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,f=r.args||\"\",p=DY(r.nodePath).posix;a?(n=`\"$basedir/${r.prog}\"`,s=c):(a=c,f=\"\",s=\"\");let h=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",E=`#!/bin/sh\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\\\\\,/,g')\")\n\ncase \\`uname\\` in\n    *CYGWIN*) basedir=\\`cygpath -w \"$basedir\"\\`;;\nesac\n\n`,C=r.nodePath?`export NODE_PATH=\"${p}\"\n`:\"\";return n?E+=`${C}if [ -x ${n} ]; then\n  exec ${n} ${f} ${s} ${h}\"$@\"\nelse\n  exec ${a} ${f} ${s} ${h}\"$@\"\nfi\n`:E+=`${C}${a} ${f} ${s} ${h}\"$@\"\nexit $?\n`,E}function Odt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n=a&&`\"${a}$exe\"`,c;s=s.split(\"\\\\\").join(\"/\");let f=Vc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,p=r.args||\"\",h=DY(r.nodePath),E=h.win32,C=h.posix;n?(c=`\"$basedir/${r.prog}$exe\"`,s=f):(n=f,p=\"\",s=\"\");let S=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",P=`#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=\"\"\n${r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH=\"${E}\"\n`:\"\"}if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n  # Fix case when both the Windows and Linux builds of Node\n  # are installed in the same directory\n  $exe=\".exe\"\n}`;return r.nodePath&&(P+=` else {\n  $env:NODE_PATH=\"${C}\"\n}`),c?P+=`\n$ret=0\nif (Test-Path ${c}) {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${c} ${p} ${s} ${S}$args\n  } else {\n    & ${c} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n} else {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${n} ${p} ${s} ${S}$args\n  } else {\n    & ${n} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $ret\n`:P+=`\n# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n  $input | & ${n} ${p} ${s} ${S}$args\n} else {\n  & ${n} ${p} ${s} ${S}$args\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $LASTEXITCODE\n`,P}function Ldt(t,e){return e.fs_.chmod(t,493)}function DY(t){if(!t)return{win32:\"\",posix:\"\"};let e=typeof t==\"string\"?t.split(Vc.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let a=e[s].split(\"/\").join(\"\\\\\"),n=RBe()?e[s].split(\"\\\\\").join(\"/\").replace(/^([^:\\\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}NBe.exports=SY});var _Y=_((_tr,tve)=>{tve.exports=Ie(\"stream\")});var sve=_((Htr,ive)=>{\"use strict\";function rve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function mmt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rve(Object(r),!0).forEach(function(s){ymt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rve(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function ymt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Emt(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function nve(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,\"value\"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function Imt(t,e,r){return e&&nve(t.prototype,e),r&&nve(t,r),t}var Cmt=Ie(\"buffer\"),pN=Cmt.Buffer,wmt=Ie(\"util\"),HY=wmt.inspect,Bmt=HY&&HY.custom||\"inspect\";function vmt(t,e,r){pN.prototype.copy.call(t,e,r)}ive.exports=function(){function t(){Emt(this,t),this.head=null,this.tail=null,this.length=0}return Imt(t,[{key:\"push\",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:\"unshift\",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:\"shift\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(r){if(this.length===0)return\"\";for(var s=this.head,a=\"\"+s.data;s=s.next;)a+=r+s.data;return a}},{key:\"concat\",value:function(r){if(this.length===0)return pN.alloc(0);for(var s=pN.allocUnsafe(r>>>0),a=this.head,n=0;a;)vmt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:\"consume\",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:\"_getBuffer\",value:function(r){var s=pN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:Bmt,value:function(r,s){return HY(this,mmt({},s,{depth:0,customInspect:!1}))}}]),t}()});var GY=_((jtr,ave)=>{\"use strict\";function Smt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(jY,this,t)):process.nextTick(jY,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(hN,r):(r._writableState.errorEmitted=!0,process.nextTick(ove,r,n)):process.nextTick(ove,r,n):e?(process.nextTick(hN,r),e(n)):process.nextTick(hN,r)}),this)}function ove(t,e){jY(t,e),hN(t)}function hN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\"close\")}function Dmt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function jY(t,e){t.emit(\"error\",e)}function bmt(t,e){var r=t._readableState,s=t._writableState;r&&r.autoDestroy||s&&s.autoDestroy?t.destroy(e):t.emit(\"error\",e)}ave.exports={destroy:Smt,undestroy:Dmt,errorOrDestroy:bmt}});var lg=_((Gtr,uve)=>{\"use strict\";var cve={};function Kc(t,e,r){r||(r=Error);function s(n,c,f){return typeof e==\"string\"?e:e(n,c,f)}class a extends r{constructor(c,f,p){super(s(c,f,p))}}a.prototype.name=r.name,a.prototype.code=t,cve[t]=a}function lve(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(s=>String(s)),r>2?`one of ${e} ${t.slice(0,r-1).join(\", \")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Pmt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function xmt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function kmt(t,e,r){return typeof r!=\"number\"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Kc(\"ERR_INVALID_OPT_VALUE\",function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'},TypeError);Kc(\"ERR_INVALID_ARG_TYPE\",function(t,e,r){let s;typeof e==\"string\"&&Pmt(e,\"not \")?(s=\"must not be\",e=e.replace(/^not /,\"\")):s=\"must be\";let a;if(xmt(t,\" argument\"))a=`The ${t} ${s} ${lve(e,\"type\")}`;else{let n=kmt(t,\".\")?\"property\":\"argument\";a=`The \"${t}\" ${n} ${s} ${lve(e,\"type\")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Kc(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\");Kc(\"ERR_METHOD_NOT_IMPLEMENTED\",function(t){return\"The \"+t+\" method is not implemented\"});Kc(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\");Kc(\"ERR_STREAM_DESTROYED\",function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"});Kc(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\");Kc(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\");Kc(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\");Kc(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);Kc(\"ERR_UNKNOWN_ENCODING\",function(t){return\"Unknown encoding: \"+t},TypeError);Kc(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\");uve.exports.codes=cve});var qY=_((qtr,fve)=>{\"use strict\";var Qmt=lg().codes.ERR_INVALID_OPT_VALUE;function Tmt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Rmt(t,e,r,s){var a=Tmt(e,s,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=s?r:\"highWaterMark\";throw new Qmt(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}fve.exports={getHighWaterMark:Rmt}});var Ave=_((Wtr,WY)=>{typeof Object.create==\"function\"?WY.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:WY.exports=function(e,r){if(r){e.super_=r;var s=function(){};s.prototype=r.prototype,e.prototype=new s,e.prototype.constructor=e}}});var cg=_((Ytr,VY)=>{try{if(YY=Ie(\"util\"),typeof YY.inherits!=\"function\")throw\"\";VY.exports=YY.inherits}catch{VY.exports=Ave()}var YY});var hve=_((Vtr,pve)=>{pve.exports=Ie(\"util\").deprecate});var zY=_((Jtr,Ive)=>{\"use strict\";Ive.exports=Vi;function dve(t){var e=this;this.next=null,this.entry=null,this.finish=function(){oyt(e,t)}}var Tw;Vi.WritableState=ZD;var Fmt={deprecate:hve()},mve=_Y(),dN=Ie(\"buffer\").Buffer,Nmt=global.Uint8Array||function(){};function Omt(t){return dN.from(t)}function Lmt(t){return dN.isBuffer(t)||t instanceof Nmt}var KY=GY(),Mmt=qY(),Umt=Mmt.getHighWaterMark,ug=lg().codes,_mt=ug.ERR_INVALID_ARG_TYPE,Hmt=ug.ERR_METHOD_NOT_IMPLEMENTED,jmt=ug.ERR_MULTIPLE_CALLBACK,Gmt=ug.ERR_STREAM_CANNOT_PIPE,qmt=ug.ERR_STREAM_DESTROYED,Wmt=ug.ERR_STREAM_NULL_VALUES,Ymt=ug.ERR_STREAM_WRITE_AFTER_END,Vmt=ug.ERR_UNKNOWN_ENCODING,Rw=KY.errorOrDestroy;cg()(Vi,mve);function Jmt(){}function ZD(t,e,r){Tw=Tw||Ym(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Tw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Umt(this,t,\"writableHighWaterMark\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){tyt(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new dve(this)}ZD.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ZD.prototype,\"buffer\",{get:Fmt.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch{}})();var gN;typeof Symbol==\"function\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\"function\"?(gN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vi,Symbol.hasInstance,{value:function(e){return gN.call(this,e)?!0:this!==Vi?!1:e&&e._writableState instanceof ZD}})):gN=function(e){return e instanceof this};function Vi(t){Tw=Tw||Ym();var e=this instanceof Tw;if(!e&&!gN.call(Vi,this))return new Vi(t);this._writableState=new ZD(t,this,e),this.writable=!0,t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final)),mve.call(this)}Vi.prototype.pipe=function(){Rw(this,new Gmt)};function Kmt(t,e){var r=new Ymt;Rw(t,r),process.nextTick(e,r)}function zmt(t,e,r,s){var a;return r===null?a=new Wmt:typeof r!=\"string\"&&!e.objectMode&&(a=new _mt(\"chunk\",[\"string\",\"Buffer\"],r)),a?(Rw(t,a),process.nextTick(s,a),!1):!0}Vi.prototype.write=function(t,e,r){var s=this._writableState,a=!1,n=!s.objectMode&&Lmt(t);return n&&!dN.isBuffer(t)&&(t=Omt(t)),typeof e==\"function\"&&(r=e,e=null),n?e=\"buffer\":e||(e=s.defaultEncoding),typeof r!=\"function\"&&(r=Jmt),s.ending?Kmt(this,r):(n||zmt(this,s,t,r))&&(s.pendingcb++,a=Zmt(this,s,n,t,e,r)),a};Vi.prototype.cork=function(){this._writableState.corked++};Vi.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&yve(this,t))};Vi.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new Vmt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Vi.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Xmt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e==\"string\"&&(e=dN.from(e,r)),e}Object.defineProperty(Vi.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Zmt(t,e,r,s,a,n){if(!r){var c=Xmt(e,s,a);s!==c&&(r=!0,a=\"buffer\",s=c)}var f=e.objectMode?1:s.length;e.length+=f;var p=e.length<e.highWaterMark;if(p||(e.needDrain=!0),e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:s,encoding:a,isBuf:r,callback:n,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else JY(t,e,!1,f,s,a,n);return p}function JY(t,e,r,s,a,n,c){e.writelen=s,e.writecb=c,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new qmt(\"write\")):r?t._writev(a,e.onwrite):t._write(a,n,e.onwrite),e.sync=!1}function $mt(t,e,r,s,a){--e.pendingcb,r?(process.nextTick(a,s),process.nextTick(XD,t,e),t._writableState.errorEmitted=!0,Rw(t,s)):(a(s),t._writableState.errorEmitted=!0,Rw(t,s),XD(t,e))}function eyt(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function tyt(t,e){var r=t._writableState,s=r.sync,a=r.writecb;if(typeof a!=\"function\")throw new jmt;if(eyt(r),e)$mt(t,r,s,e,a);else{var n=Eve(r)||t.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&yve(t,r),s?process.nextTick(gve,t,r,n,a):gve(t,r,n,a)}}function gve(t,e,r,s){r||ryt(t,e),e.pendingcb--,s(),XD(t,e)}function ryt(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}function yve(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var s=e.bufferedRequestCount,a=new Array(s),n=e.corkedRequestsFree;n.entry=r;for(var c=0,f=!0;r;)a[c]=r,r.isBuf||(f=!1),r=r.next,c+=1;a.allBuffers=f,JY(t,e,!0,e.length,a,\"\",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new dve(e),e.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,h=r.encoding,E=r.callback,C=e.objectMode?1:p.length;if(JY(t,e,!1,C,p,h,E),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Vi.prototype._write=function(t,e,r){r(new Hmt(\"_write()\"))};Vi.prototype._writev=null;Vi.prototype.end=function(t,e,r){var s=this._writableState;return typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null),t!=null&&this.write(t,e),s.corked&&(s.corked=1,this.uncork()),s.ending||syt(this,s,r),this};Object.defineProperty(Vi.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function Eve(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function nyt(t,e){t._final(function(r){e.pendingcb--,r&&Rw(t,r),e.prefinished=!0,t.emit(\"prefinish\"),XD(t,e)})}function iyt(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final==\"function\"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(nyt,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}function XD(t,e){var r=Eve(e);if(r&&(iyt(t,e),e.pendingcb===0&&(e.finished=!0,t.emit(\"finish\"),e.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return r}function syt(t,e,r){e.ending=!0,XD(t,e),r&&(e.finished?process.nextTick(r):t.once(\"finish\",r)),e.ended=!0,t.writable=!1}function oyt(t,e,r){var s=t.entry;for(t.entry=null;s;){var a=s.callback;e.pendingcb--,a(r),s=s.next}e.corkedRequestsFree.next=t}Object.defineProperty(Vi.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Vi.prototype.destroy=KY.destroy;Vi.prototype._undestroy=KY.undestroy;Vi.prototype._destroy=function(t,e){e(t)}});var Ym=_((Ktr,wve)=>{\"use strict\";var ayt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};wve.exports=dA;var Cve=$Y(),ZY=zY();cg()(dA,Cve);for(XY=ayt(ZY.prototype),mN=0;mN<XY.length;mN++)yN=XY[mN],dA.prototype[yN]||(dA.prototype[yN]=ZY.prototype[yN]);var XY,yN,mN;function dA(t){if(!(this instanceof dA))return new dA(t);Cve.call(this,t),ZY.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\"end\",lyt)))}Object.defineProperty(dA.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(dA.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(dA.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function lyt(){this._writableState.ended||process.nextTick(cyt,this)}function cyt(t){t.end()}Object.defineProperty(dA.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Sve=_((eV,vve)=>{var EN=Ie(\"buffer\"),ah=EN.Buffer;function Bve(t,e){for(var r in t)e[r]=t[r]}ah.from&&ah.alloc&&ah.allocUnsafe&&ah.allocUnsafeSlow?vve.exports=EN:(Bve(EN,eV),eV.Buffer=Fw);function Fw(t,e,r){return ah(t,e,r)}Bve(ah,Fw);Fw.from=function(t,e,r){if(typeof t==\"number\")throw new TypeError(\"Argument must not be a number\");return ah(t,e,r)};Fw.alloc=function(t,e,r){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");var s=ah(t);return e!==void 0?typeof r==\"string\"?s.fill(e,r):s.fill(e):s.fill(0),s};Fw.allocUnsafe=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return ah(t)};Fw.allocUnsafeSlow=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return EN.SlowBuffer(t)}});var nV=_(bve=>{\"use strict\";var rV=Sve().Buffer,Dve=rV.isEncoding||function(t){switch(t=\"\"+t,t&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function uyt(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}function fyt(t){var e=uyt(t);if(typeof e!=\"string\"&&(rV.isEncoding===Dve||!Dve(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}bve.StringDecoder=$D;function $D(t){this.encoding=fyt(t);var e;switch(this.encoding){case\"utf16le\":this.text=myt,this.end=yyt,e=4;break;case\"utf8\":this.fillLast=hyt,e=4;break;case\"base64\":this.text=Eyt,this.end=Iyt,e=3;break;default:this.write=Cyt,this.end=wyt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=rV.allocUnsafe(e)}$D.prototype.write=function(t){if(t.length===0)return\"\";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\"\"};$D.prototype.end=dyt;$D.prototype.text=gyt;$D.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function tV(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Ayt(t,e,r){var s=e.length-1;if(s<r)return 0;var a=tV(e[s]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--s<r||a===-2?0:(a=tV(e[s]),a>=0?(a>0&&(t.lastNeed=a-2),a):--s<r||a===-2?0:(a=tV(e[s]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function pyt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,\"\\uFFFD\";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,\"\\uFFFD\";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,\"\\uFFFD\"}}function hyt(t){var e=this.lastTotal-this.lastNeed,r=pyt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function gyt(t,e){var r=Ayt(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var s=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString(\"utf8\",e,s)}function dyt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"\\uFFFD\":e}function myt(t,e){if((t.length-e)%2===0){var r=t.toString(\"utf16le\",e);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function yyt(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function Eyt(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Iyt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Cyt(t){return t.toString(this.encoding)}function wyt(t){return t&&t.length?this.write(t):\"\"}});var IN=_((Xtr,kve)=>{\"use strict\";var Pve=lg().codes.ERR_STREAM_PREMATURE_CLOSE;function Byt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];t.apply(this,s)}}}function vyt(){}function Syt(t){return t.setHeader&&typeof t.abort==\"function\"}function xve(t,e,r){if(typeof e==\"function\")return xve(t,null,e);e||(e={}),r=Byt(r||vyt);var s=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){a=!1,c=!0,s||r.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,p=!0,a||r.call(t)},E=function(I){r.call(t,I)},C=function(){var I;if(s&&!p)return(!t._readableState||!t._readableState.ended)&&(I=new Pve),r.call(t,I);if(a&&!c)return(!t._writableState||!t._writableState.ended)&&(I=new Pve),r.call(t,I)},S=function(){t.req.on(\"finish\",f)};return Syt(t)?(t.on(\"complete\",f),t.on(\"abort\",C),t.req?S():t.on(\"request\",S)):a&&!t._writableState&&(t.on(\"end\",n),t.on(\"close\",n)),t.on(\"end\",h),t.on(\"finish\",f),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",C),function(){t.removeListener(\"complete\",f),t.removeListener(\"abort\",C),t.removeListener(\"request\",S),t.req&&t.req.removeListener(\"finish\",f),t.removeListener(\"end\",n),t.removeListener(\"close\",n),t.removeListener(\"finish\",f),t.removeListener(\"end\",h),t.removeListener(\"error\",E),t.removeListener(\"close\",C)}}kve.exports=xve});var Tve=_((Ztr,Qve)=>{\"use strict\";var CN;function fg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Dyt=IN(),Ag=Symbol(\"lastResolve\"),Vm=Symbol(\"lastReject\"),eb=Symbol(\"error\"),wN=Symbol(\"ended\"),Jm=Symbol(\"lastPromise\"),iV=Symbol(\"handlePromise\"),Km=Symbol(\"stream\");function pg(t,e){return{value:t,done:e}}function byt(t){var e=t[Ag];if(e!==null){var r=t[Km].read();r!==null&&(t[Jm]=null,t[Ag]=null,t[Vm]=null,e(pg(r,!1)))}}function Pyt(t){process.nextTick(byt,t)}function xyt(t,e){return function(r,s){t.then(function(){if(e[wN]){r(pg(void 0,!0));return}e[iV](r,s)},s)}}var kyt=Object.getPrototypeOf(function(){}),Qyt=Object.setPrototypeOf((CN={get stream(){return this[Km]},next:function(){var e=this,r=this[eb];if(r!==null)return Promise.reject(r);if(this[wN])return Promise.resolve(pg(void 0,!0));if(this[Km].destroyed)return new Promise(function(c,f){process.nextTick(function(){e[eb]?f(e[eb]):c(pg(void 0,!0))})});var s=this[Jm],a;if(s)a=new Promise(xyt(s,this));else{var n=this[Km].read();if(n!==null)return Promise.resolve(pg(n,!1));a=new Promise(this[iV])}return this[Jm]=a,a}},fg(CN,Symbol.asyncIterator,function(){return this}),fg(CN,\"return\",function(){var e=this;return new Promise(function(r,s){e[Km].destroy(null,function(a){if(a){s(a);return}r(pg(void 0,!0))})})}),CN),kyt),Tyt=function(e){var r,s=Object.create(Qyt,(r={},fg(r,Km,{value:e,writable:!0}),fg(r,Ag,{value:null,writable:!0}),fg(r,Vm,{value:null,writable:!0}),fg(r,eb,{value:null,writable:!0}),fg(r,wN,{value:e._readableState.endEmitted,writable:!0}),fg(r,iV,{value:function(n,c){var f=s[Km].read();f?(s[Jm]=null,s[Ag]=null,s[Vm]=null,n(pg(f,!1))):(s[Ag]=n,s[Vm]=c)},writable:!0}),r));return s[Jm]=null,Dyt(e,function(a){if(a&&a.code!==\"ERR_STREAM_PREMATURE_CLOSE\"){var n=s[Vm];n!==null&&(s[Jm]=null,s[Ag]=null,s[Vm]=null,n(a)),s[eb]=a;return}var c=s[Ag];c!==null&&(s[Jm]=null,s[Ag]=null,s[Vm]=null,c(pg(void 0,!0))),s[wN]=!0}),e.on(\"readable\",Pyt.bind(null,s)),s};Qve.exports=Tyt});var Ove=_(($tr,Nve)=>{\"use strict\";function Rve(t,e,r,s,a,n,c){try{var f=t[n](c),p=f.value}catch(h){r(h);return}f.done?e(p):Promise.resolve(p).then(s,a)}function Ryt(t){return function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function c(p){Rve(n,s,a,c,f,\"next\",p)}function f(p){Rve(n,s,a,c,f,\"throw\",p)}c(void 0)})}}function Fve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function Fyt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fve(Object(r),!0).forEach(function(s){Nyt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fve(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function Nyt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oyt=lg().codes.ERR_INVALID_ARG_TYPE;function Lyt(t,e,r){var s;if(e&&typeof e.next==\"function\")s=e;else if(e&&e[Symbol.asyncIterator])s=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])s=e[Symbol.iterator]();else throw new Oyt(\"iterable\",[\"Iterable\"],e);var a=new t(Fyt({objectMode:!0},r)),n=!1;a._read=function(){n||(n=!0,c())};function c(){return f.apply(this,arguments)}function f(){return f=Ryt(function*(){try{var p=yield s.next(),h=p.value,E=p.done;E?a.push(null):a.push(yield h)?c():n=!1}catch(C){a.destroy(C)}}),f.apply(this,arguments)}return a}Nve.exports=Lyt});var $Y=_((rrr,Yve)=>{\"use strict\";Yve.exports=Pn;var Nw;Pn.ReadableState=_ve;var trr=Ie(\"events\").EventEmitter,Uve=function(e,r){return e.listeners(r).length},rb=_Y(),BN=Ie(\"buffer\").Buffer,Myt=global.Uint8Array||function(){};function Uyt(t){return BN.from(t)}function _yt(t){return BN.isBuffer(t)||t instanceof Myt}var sV=Ie(\"util\"),cn;sV&&sV.debuglog?cn=sV.debuglog(\"stream\"):cn=function(){};var Hyt=sve(),AV=GY(),jyt=qY(),Gyt=jyt.getHighWaterMark,vN=lg().codes,qyt=vN.ERR_INVALID_ARG_TYPE,Wyt=vN.ERR_STREAM_PUSH_AFTER_EOF,Yyt=vN.ERR_METHOD_NOT_IMPLEMENTED,Vyt=vN.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ow,oV,aV;cg()(Pn,rb);var tb=AV.errorOrDestroy,lV=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function Jyt(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function _ve(t,e,r){Nw=Nw||Ym(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Nw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Gyt(this,t,\"readableHighWaterMark\",r),this.buffer=new Hyt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Ow||(Ow=nV().StringDecoder),this.decoder=new Ow(t.encoding),this.encoding=t.encoding)}function Pn(t){if(Nw=Nw||Ym(),!(this instanceof Pn))return new Pn(t);var e=this instanceof Nw;this._readableState=new _ve(t,this,e),this.readable=!0,t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy)),rb.call(this)}Object.defineProperty(Pn.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Pn.prototype.destroy=AV.destroy;Pn.prototype._undestroy=AV.undestroy;Pn.prototype._destroy=function(t,e){e(t)};Pn.prototype.push=function(t,e){var r=this._readableState,s;return r.objectMode?s=!0:typeof t==\"string\"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=BN.from(t,e),e=\"\"),s=!0),Hve(this,t,e,!1,s)};Pn.prototype.unshift=function(t){return Hve(this,t,null,!0,!1)};function Hve(t,e,r,s,a){cn(\"readableAddChunk\",e);var n=t._readableState;if(e===null)n.reading=!1,Xyt(t,n);else{var c;if(a||(c=Kyt(n,e)),c)tb(t,c);else if(n.objectMode||e&&e.length>0)if(typeof e!=\"string\"&&!n.objectMode&&Object.getPrototypeOf(e)!==BN.prototype&&(e=Uyt(e)),s)n.endEmitted?tb(t,new Vyt):cV(t,n,e,!0);else if(n.ended)tb(t,new Wyt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?cV(t,n,e,!1):fV(t,n)):cV(t,n,e,!1)}else s||(n.reading=!1,fV(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function cV(t,e,r,s){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,s?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&SN(t)),fV(t,e)}function Kyt(t,e){var r;return!_yt(e)&&typeof e!=\"string\"&&e!==void 0&&!t.objectMode&&(r=new qyt(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e)),r}Pn.prototype.isPaused=function(){return this._readableState.flowing===!1};Pn.prototype.setEncoding=function(t){Ow||(Ow=nV().StringDecoder);var e=new Ow(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,s=\"\";r!==null;)s+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),s!==\"\"&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var Lve=1073741824;function zyt(t){return t>=Lve?t=Lve:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Mve(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=zyt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pn.prototype.read=function(t){cn(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return cn(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?uV(this):SN(this),null;if(t=Mve(t,e),t===0&&e.ended)return e.length===0&&uV(this),null;var s=e.needReadable;cn(\"need readable\",s),(e.length===0||e.length-t<e.highWaterMark)&&(s=!0,cn(\"length less than watermark\",s)),e.ended||e.reading?(s=!1,cn(\"reading or ended\",s)):s&&(cn(\"do read\"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Mve(r,e)));var a;return t>0?a=qve(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&uV(this)),a!==null&&this.emit(\"data\",a),a};function Xyt(t,e){if(cn(\"onEofChunk\"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?SN(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,jve(t)))}}function SN(t){var e=t._readableState;cn(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(cn(\"emitReadable\",e.flowing),e.emittedReadable=!0,process.nextTick(jve,t))}function jve(t){var e=t._readableState;cn(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,pV(t)}function fV(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Zyt,t,e))}function Zyt(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(cn(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}Pn.prototype._read=function(t){tb(this,new Yyt(\"_read()\"))};Pn.prototype.pipe=function(t,e){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t);break}s.pipesCount+=1,cn(\"pipe count=%d opts=%j\",s.pipesCount,e);var a=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,n=a?f:R;s.endEmitted?process.nextTick(n):r.once(\"end\",n),t.on(\"unpipe\",c);function c(N,U){cn(\"onunpipe\"),N===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,E())}function f(){cn(\"onend\"),t.end()}var p=$yt(r);t.on(\"drain\",p);var h=!1;function E(){cn(\"cleanup\"),t.removeListener(\"close\",P),t.removeListener(\"finish\",I),t.removeListener(\"drain\",p),t.removeListener(\"error\",S),t.removeListener(\"unpipe\",c),r.removeListener(\"end\",f),r.removeListener(\"end\",R),r.removeListener(\"data\",C),h=!0,s.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&p()}r.on(\"data\",C);function C(N){cn(\"ondata\");var U=t.write(N);cn(\"dest.write\",U),U===!1&&((s.pipesCount===1&&s.pipes===t||s.pipesCount>1&&Wve(s.pipes,t)!==-1)&&!h&&(cn(\"false write response, pause\",s.awaitDrain),s.awaitDrain++),r.pause())}function S(N){cn(\"onerror\",N),R(),t.removeListener(\"error\",S),Uve(t,\"error\")===0&&tb(t,N)}Jyt(t,\"error\",S);function P(){t.removeListener(\"finish\",I),R()}t.once(\"close\",P);function I(){cn(\"onfinish\"),t.removeListener(\"close\",P),R()}t.once(\"finish\",I);function R(){cn(\"unpipe\"),r.unpipe(t)}return t.emit(\"pipe\",r),s.flowing||(cn(\"pipe resume\"),r.resume()),t};function $yt(t){return function(){var r=t._readableState;cn(\"pipeOnDrain\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Uve(t,\"data\")&&(r.flowing=!0,pV(t))}}Pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r),this);if(!t){var s=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<a;n++)s[n].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var c=Wve(e.pipes,t);return c===-1?this:(e.pipes.splice(c,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r),this)};Pn.prototype.on=function(t,e){var r=rb.prototype.on.call(this,t,e),s=this._readableState;return t===\"data\"?(s.readableListening=this.listenerCount(\"readable\")>0,s.flowing!==!1&&this.resume()):t===\"readable\"&&!s.endEmitted&&!s.readableListening&&(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,cn(\"on readable\",s.length,s.reading),s.length?SN(this):s.reading||process.nextTick(eEt,this)),r};Pn.prototype.addListener=Pn.prototype.on;Pn.prototype.removeListener=function(t,e){var r=rb.prototype.removeListener.call(this,t,e);return t===\"readable\"&&process.nextTick(Gve,this),r};Pn.prototype.removeAllListeners=function(t){var e=rb.prototype.removeAllListeners.apply(this,arguments);return(t===\"readable\"||t===void 0)&&process.nextTick(Gve,this),e};function Gve(t){var e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function eEt(t){cn(\"readable nexttick read 0\"),t.read(0)}Pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(cn(\"resume\"),t.flowing=!t.readableListening,tEt(this,t)),t.paused=!1,this};function tEt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(rEt,t,e))}function rEt(t,e){cn(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),pV(t),e.flowing&&!e.reading&&t.read(0)}Pn.prototype.pause=function(){return cn(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(cn(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this};function pV(t){var e=t._readableState;for(cn(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}Pn.prototype.wrap=function(t){var e=this,r=this._readableState,s=!1;t.on(\"end\",function(){if(cn(\"wrapped end\"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&e.push(c)}e.push(null)}),t.on(\"data\",function(c){if(cn(\"wrapped data\"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var f=e.push(c);f||(s=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]==\"function\"&&(this[a]=function(f){return function(){return t[f].apply(t,arguments)}}(a));for(var n=0;n<lV.length;n++)t.on(lV[n],this.emit.bind(this,lV[n]));return this._read=function(c){cn(\"wrapped _read\",c),s&&(s=!1,t.resume())},this};typeof Symbol==\"function\"&&(Pn.prototype[Symbol.asyncIterator]=function(){return oV===void 0&&(oV=Tve()),oV(this)});Object.defineProperty(Pn.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Pn.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Pn.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Pn._fromList=qve;Object.defineProperty(Pn.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}});function qve(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function uV(t){var e=t._readableState;cn(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(nEt,e,t))}function nEt(t,e){if(cn(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol==\"function\"&&(Pn.from=function(t,e){return aV===void 0&&(aV=Ove()),aV(Pn,t,e)});function Wve(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1}});var hV=_((nrr,Jve)=>{\"use strict\";Jve.exports=lh;var DN=lg().codes,iEt=DN.ERR_METHOD_NOT_IMPLEMENTED,sEt=DN.ERR_MULTIPLE_CALLBACK,oEt=DN.ERR_TRANSFORM_ALREADY_TRANSFORMING,aEt=DN.ERR_TRANSFORM_WITH_LENGTH_0,bN=Ym();cg()(lh,bN);function lEt(t,e){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(s===null)return this.emit(\"error\",new sEt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),s(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function lh(t){if(!(this instanceof lh))return new lh(t);bN.call(this,t),this._transformState={afterTransform:lEt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",cEt)}function cEt(){var t=this;typeof this._flush==\"function\"&&!this._readableState.destroyed?this._flush(function(e,r){Vve(t,e,r)}):Vve(this,null,null)}lh.prototype.push=function(t,e){return this._transformState.needTransform=!1,bN.prototype.push.call(this,t,e)};lh.prototype._transform=function(t,e,r){r(new iEt(\"_transform()\"))};lh.prototype._write=function(t,e,r){var s=this._transformState;if(s.writecb=r,s.writechunk=t,s.writeencoding=e,!s.transforming){var a=this._readableState;(s.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};lh.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};lh.prototype._destroy=function(t,e){bN.prototype._destroy.call(this,t,function(r){e(r)})};function Vve(t,e,r){if(e)return t.emit(\"error\",e);if(r!=null&&t.push(r),t._writableState.length)throw new aEt;if(t._transformState.transforming)throw new oEt;return t.push(null)}});var Xve=_((irr,zve)=>{\"use strict\";zve.exports=nb;var Kve=hV();cg()(nb,Kve);function nb(t){if(!(this instanceof nb))return new nb(t);Kve.call(this,t)}nb.prototype._transform=function(t,e,r){r(null,t)}});var rSe=_((srr,tSe)=>{\"use strict\";var gV;function uEt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var eSe=lg().codes,fEt=eSe.ERR_MISSING_ARGS,AEt=eSe.ERR_STREAM_DESTROYED;function Zve(t){if(t)throw t}function pEt(t){return t.setHeader&&typeof t.abort==\"function\"}function hEt(t,e,r,s){s=uEt(s);var a=!1;t.on(\"close\",function(){a=!0}),gV===void 0&&(gV=IN()),gV(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,pEt(t))return t.abort();if(typeof t.destroy==\"function\")return t.destroy();s(c||new AEt(\"pipe\"))}}}function $ve(t){t()}function gEt(t,e){return t.pipe(e)}function dEt(t){return!t.length||typeof t[t.length-1]!=\"function\"?Zve:t.pop()}function mEt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var s=dEt(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new fEt(\"streams\");var a,n=e.map(function(c,f){var p=f<e.length-1,h=f>0;return hEt(c,p,h,function(E){a||(a=E),E&&n.forEach($ve),!p&&(n.forEach($ve),s(a))})});return e.reduce(gEt)}tSe.exports=mEt});var Lw=_((zc,sb)=>{var ib=Ie(\"stream\");process.env.READABLE_STREAM===\"disable\"&&ib?(sb.exports=ib.Readable,Object.assign(sb.exports,ib),sb.exports.Stream=ib):(zc=sb.exports=$Y(),zc.Stream=ib||zc,zc.Readable=zc,zc.Writable=zY(),zc.Duplex=Ym(),zc.Transform=hV(),zc.PassThrough=Xve(),zc.finished=IN(),zc.pipeline=rSe())});var sSe=_((orr,iSe)=>{\"use strict\";var{Buffer:cf}=Ie(\"buffer\"),nSe=Symbol.for(\"BufferList\");function Ci(t){if(!(this instanceof Ci))return new Ci(t);Ci._init.call(this,t)}Ci._init=function(e){Object.defineProperty(this,nSe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};Ci.prototype._new=function(e){return new Ci(e)};Ci.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let s=0;s<this._bufs.length;s++){let a=r+this._bufs[s].length;if(e<a||s===this._bufs.length-1)return[s,e-r];r=a}};Ci.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let s=0;s<e;s++)r+=this._bufs[s].length;return r};Ci.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};Ci.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};Ci.prototype.copy=function(e,r,s,a){if((typeof s!=\"number\"||s<0)&&(s=0),(typeof a!=\"number\"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return e||cf.alloc(0);let n=!!e,c=this._offset(s),f=a-s,p=f,h=n&&r||0,E=c[1];if(s===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:cf.concat(this._bufs,this.length);for(let C=0;C<this._bufs.length;C++)this._bufs[C].copy(e,h),h+=this._bufs[C].length;return e}if(p<=this._bufs[c[0]].length-E)return n?this._bufs[c[0]].copy(e,r,E,E+p):this._bufs[c[0]].slice(E,E+p);n||(e=cf.allocUnsafe(f));for(let C=c[0];C<this._bufs.length;C++){let S=this._bufs[C].length-E;if(p>S)this._bufs[C].copy(e,h,E),h+=S;else{this._bufs[C].copy(e,h,E,E+p),h+=S;break}p-=S,E&&(E=0)}return e.length>h?e.slice(0,h):e};Ci.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let s=this._offset(e),a=this._offset(r),n=this._bufs.slice(s[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),s[1]!==0&&(n[0]=n[0].slice(s[1])),this._new(n)};Ci.prototype.toString=function(e,r,s){return this.slice(r,s).toString(e)};Ci.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};Ci.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};Ci.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(cf.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e==\"number\"&&(e=e.toString()),this._appendBuffer(cf.from(e));return this};Ci.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};Ci.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e==\"string\"&&(r=e,e=void 0),typeof t==\"function\"||Array.isArray(t))throw new TypeError('The \"value\" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t==\"number\"?t=cf.from([t]):typeof t==\"string\"?t=cf.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=cf.from(t.buffer,t.byteOffset,t.byteLength):cf.isBuffer(t)||(t=cf.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let s=this._offset(e),a=s[0],n=s[1];for(;a<this._bufs.length;a++){let c=this._bufs[a];for(;n<c.length;)if(c.length-n>=t.length){let p=c.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=c.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};Ci.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?Ci.prototype[r]=function(s,a){return this.slice(s,s+a)[r](0,a)}:Ci.prototype[r]=function(s=0){return this.slice(s,s+t[r])[r](0)}})(e)})();Ci.prototype._isBufferList=function(e){return e instanceof Ci||Ci.isBufferList(e)};Ci.isBufferList=function(e){return e!=null&&e[nSe]};iSe.exports=Ci});var oSe=_((arr,PN)=>{\"use strict\";var dV=Lw().Duplex,yEt=cg(),ob=sSe();function ra(t){if(!(this instanceof ra))return new ra(t);if(typeof t==\"function\"){this._callback=t;let e=function(s){this._callback&&(this._callback(s),this._callback=null)}.bind(this);this.on(\"pipe\",function(s){s.on(\"error\",e)}),this.on(\"unpipe\",function(s){s.removeListener(\"error\",e)}),t=null}ob._init.call(this,t),dV.call(this)}yEt(ra,dV);Object.assign(ra.prototype,ob.prototype);ra.prototype._new=function(e){return new ra(e)};ra.prototype._write=function(e,r,s){this._appendBuffer(e),typeof s==\"function\"&&s()};ra.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};ra.prototype.end=function(e){dV.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};ra.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};ra.prototype._isBufferList=function(e){return e instanceof ra||e instanceof ob||ra.isBufferList(e)};ra.isBufferList=ob.isBufferList;PN.exports=ra;PN.exports.BufferListStream=ra;PN.exports.BufferList=ob});var EV=_(Uw=>{var EEt=Buffer.alloc,IEt=\"0000000000000000000\",CEt=\"7777777777777777777\",aSe=48,lSe=Buffer.from(\"ustar\\0\",\"binary\"),wEt=Buffer.from(\"00\",\"binary\"),BEt=Buffer.from(\"ustar \",\"binary\"),vEt=Buffer.from(\" \\0\",\"binary\"),SEt=parseInt(\"7777\",8),ab=257,yV=263,DEt=function(t,e,r){return typeof t!=\"number\"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},bEt=function(t){switch(t){case 0:return\"file\";case 1:return\"link\";case 2:return\"symlink\";case 3:return\"character-device\";case 4:return\"block-device\";case 5:return\"directory\";case 6:return\"fifo\";case 7:return\"contiguous-file\";case 72:return\"pax-header\";case 55:return\"pax-global-header\";case 27:return\"gnu-long-link-path\";case 28:case 30:return\"gnu-long-path\"}return null},PEt=function(t){switch(t){case\"file\":return 0;case\"link\":return 1;case\"symlink\":return 2;case\"character-device\":return 3;case\"block-device\":return 4;case\"directory\":return 5;case\"fifo\":return 6;case\"contiguous-file\":return 7;case\"pax-header\":return 72}return 0},cSe=function(t,e,r,s){for(;r<s;r++)if(t[r]===e)return r;return s},uSe=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var s=156;s<512;s++)e+=t[s];return e},hg=function(t,e){return t=t.toString(8),t.length>e?CEt.slice(0,e)+\" \":IEt.slice(0,e-t.length)+t+\" \"};function xEt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],s=t.length-1;s>0;s--){var a=t[s];e?r.push(a):r.push(255-a)}var n=0,c=r.length;for(s=0;s<c;s++)n+=r[s]*Math.pow(256,s);return e?n:-1*n}var gg=function(t,e,r){if(t=t.slice(e,e+r),e=0,t[e]&128)return xEt(t);for(;e<t.length&&t[e]===32;)e++;for(var s=DEt(cSe(t,32,e,t.length),t.length,t.length);e<s&&t[e]===0;)e++;return s===e?0:parseInt(t.slice(e,s).toString(),8)},Mw=function(t,e,r,s){return t.slice(e,cSe(t,0,e,e+r)).toString(s)},mV=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};Uw.decodeLongPath=function(t,e){return Mw(t,0,t.length,e)};Uw.encodePax=function(t){var e=\"\";t.name&&(e+=mV(\" path=\"+t.name+`\n`)),t.linkname&&(e+=mV(\" linkpath=\"+t.linkname+`\n`));var r=t.pax;if(r)for(var s in r)e+=mV(\" \"+s+\"=\"+r[s]+`\n`);return Buffer.from(e)};Uw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var a=t.slice(r+1,s-1).toString(),n=a.indexOf(\"=\");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(s)}return e};Uw.encode=function(t){var e=EEt(512),r=t.name,s=\"\";if(t.typeflag===5&&r[r.length-1]!==\"/\"&&(r+=\"/\"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf(\"/\");if(a===-1)return null;s+=s?\"/\"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(hg(t.mode&SEt,6),100),e.write(hg(t.uid,6),108),e.write(hg(t.gid,6),116),e.write(hg(t.size,11),124),e.write(hg(t.mtime.getTime()/1e3|0,11),136),e[156]=aSe+PEt(t.type),t.linkname&&e.write(t.linkname,157),lSe.copy(e,ab),wEt.copy(e,yV),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(hg(t.devmajor||0,6),329),e.write(hg(t.devminor||0,6),337),s&&e.write(s,345),e.write(hg(uSe(e),6),148),e)};Uw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-aSe,a=Mw(t,0,100,e),n=gg(t,100,8),c=gg(t,108,8),f=gg(t,116,8),p=gg(t,124,12),h=gg(t,136,12),E=bEt(s),C=t[157]===0?null:Mw(t,157,100,e),S=Mw(t,265,32),P=Mw(t,297,32),I=gg(t,329,8),R=gg(t,337,8),N=uSe(t);if(N===8*32)return null;if(N!==gg(t,148,8))throw new Error(\"Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?\");if(lSe.compare(t,ab,ab+6)===0)t[345]&&(a=Mw(t,345,155,e)+\"/\"+a);else if(!(BEt.compare(t,ab,ab+6)===0&&vEt.compare(t,yV,yV+2)===0)){if(!r)throw new Error(\"Invalid tar header: unknown format.\")}return s===0&&a&&a[a.length-1]===\"/\"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:P,devmajor:I,devminor:R}}});var mSe=_((crr,dSe)=>{var ASe=Ie(\"util\"),kEt=oSe(),lb=EV(),pSe=Lw().Writable,hSe=Lw().PassThrough,gSe=function(){},fSe=function(t){return t&=511,t&&512-t},QEt=function(t,e){var r=new xN(t,e);return r.end(),r},TEt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},xN=function(t,e){this._parent=t,this.offset=e,hSe.call(this,{autoDestroy:!1})};ASe.inherits(xN,hSe);xN.prototype.destroy=function(t){this._parent.destroy(t)};var ch=function(t){if(!(this instanceof ch))return new ch(t);pSe.call(this,t),t=t||{},this._offset=0,this._buffer=kEt(),this._missing=0,this._partial=!1,this._onparse=gSe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=fSe(e._header.size);S?e._parse(S,c):e._parse(512,C),e._locked||s()},c=function(){e._buffer.consume(fSe(e._header.size)),e._parse(512,C),s()},f=function(){var S=e._header.size;e._paxGlobal=lb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=lb.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=lb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=lb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},C=function(){var S=e._offset,P;try{P=e._header=lb.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit(\"error\",I)}if(r.consume(512),!P){e._parse(512,C),s();return}if(P.type===\"gnu-long-path\"){e._parse(P.size,h),s();return}if(P.type===\"gnu-long-link-path\"){e._parse(P.size,E),s();return}if(P.type===\"pax-global-header\"){e._parse(P.size,f),s();return}if(P.type===\"pax-header\"){e._parse(P.size,p),s();return}if(e._gnuLongPath&&(P.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(P.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=P=TEt(P,e._pax),e._pax=null),e._locked=!0,!P.size||P.type===\"directory\"){e._parse(512,C),e.emit(\"entry\",P,QEt(e,S),a);return}e._stream=new xN(e,S),e.emit(\"entry\",P,e._stream,a),e._parse(P.size,n),s()};this._onheader=C,this._parse(512,C)};ASe.inherits(ch,pSe);ch.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.emit(\"close\"))};ch.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};ch.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=gSe,this._overflow?this._write(this._overflow,void 0,t):t()}};ch.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,s?s.write(t,r):(a.append(t),r());this._cb=r,this._missing=0;var c=null;t.length>n&&(c=t.slice(n),t=t.slice(0,n)),s?s.end(t):a.append(t),this._overflow=c,this._onparse()}};ch.prototype._final=function(t){if(this._partial)return this.destroy(new Error(\"Unexpected end of data\"));t()};dSe.exports=ch});var ESe=_((urr,ySe)=>{ySe.exports=Ie(\"fs\").constants||Ie(\"constants\")});var vSe=_((frr,BSe)=>{var _w=ESe(),ISe=cH(),QN=cg(),REt=Buffer.alloc,CSe=Lw().Readable,Hw=Lw().Writable,FEt=Ie(\"string_decoder\").StringDecoder,kN=EV(),NEt=parseInt(\"755\",8),OEt=parseInt(\"644\",8),wSe=REt(1024),CV=function(){},IV=function(t,e){e&=511,e&&t.push(wSe.slice(0,512-e))};function LEt(t){switch(t&_w.S_IFMT){case _w.S_IFBLK:return\"block-device\";case _w.S_IFCHR:return\"character-device\";case _w.S_IFDIR:return\"directory\";case _w.S_IFIFO:return\"fifo\";case _w.S_IFLNK:return\"symlink\"}return\"file\"}var TN=function(t){Hw.call(this),this.written=0,this._to=t,this._destroyed=!1};QN(TN,Hw);TN.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};TN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var RN=function(){Hw.call(this),this.linkname=\"\",this._decoder=new FEt(\"utf-8\"),this._destroyed=!1};QN(RN,Hw);RN.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};RN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var ub=function(){Hw.call(this),this._destroyed=!1};QN(ub,Hw);ub.prototype._write=function(t,e,r){r(new Error(\"No body allowed for this entry\"))};ub.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var mA=function(t){if(!(this instanceof mA))return new mA(t);CSe.call(this,t),this._drain=CV,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};QN(mA,CSe);mA.prototype.entry=function(t,e,r){if(this._stream)throw new Error(\"already piping an entry\");if(!(this._finalized||this._destroyed)){typeof e==\"function\"&&(r=e,e=null),r||(r=CV);var s=this;if((!t.size||t.type===\"symlink\")&&(t.size=0),t.type||(t.type=LEt(t.mode)),t.mode||(t.mode=t.type===\"directory\"?NEt:OEt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e==\"string\"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return IV(s,t.size),a?process.nextTick(r):this._drain=r,new ub}if(t.type===\"symlink\"&&!t.linkname){var n=new RN;return ISe(n,function(f){if(f)return s.destroy(),r(f);t.linkname=n.linkname,s._encode(t),r()}),n}if(this._encode(t),t.type!==\"file\"&&t.type!==\"contiguous-file\")return process.nextTick(r),new ub;var c=new TN(this);return this._stream=c,ISe(c,function(f){if(s._stream=null,f)return s.destroy(),r(f);if(c.written!==t.size)return s.destroy(),r(new Error(\"size mismatch\"));IV(s,t.size),s._finalizing&&s.finalize(),r()}),c}};mA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(wSe),this.push(null))};mA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.destroy&&this._stream.destroy())};mA.prototype._encode=function(t){if(!t.pax){var e=kN.encode(t);if(e){this.push(e);return}}this._encodePax(t)};mA.prototype._encodePax=function(t){var e=kN.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:\"PaxHeader\",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:\"pax-header\",linkname:t.linkname&&\"PaxHeader\",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(kN.encode(r)),this.push(e),IV(this,e.length),r.size=t.size,r.type=t.type,this.push(kN.encode(r))};mA.prototype._read=function(t){var e=this._drain;this._drain=CV,e()};BSe.exports=mA});var SSe=_(wV=>{wV.extract=mSe();wV.pack=vSe()});var MSe=_(Ta=>{\"use strict\";var zEt=Ta&&Ta.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ta,\"__esModule\",{value:!0});Ta.Minipass=Ta.isWritable=Ta.isReadable=Ta.isStream=void 0;var RSe=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},FV=Ie(\"node:events\"),LSe=zEt(Ie(\"node:stream\")),XEt=Ie(\"node:string_decoder\"),ZEt=t=>!!t&&typeof t==\"object\"&&(t instanceof jN||t instanceof LSe.default||(0,Ta.isReadable)(t)||(0,Ta.isWritable)(t));Ta.isStream=ZEt;var $Et=t=>!!t&&typeof t==\"object\"&&t instanceof FV.EventEmitter&&typeof t.pipe==\"function\"&&t.pipe!==LSe.default.Writable.prototype.pipe;Ta.isReadable=$Et;var eIt=t=>!!t&&typeof t==\"object\"&&t instanceof FV.EventEmitter&&typeof t.write==\"function\"&&typeof t.end==\"function\";Ta.isWritable=eIt;var uh=Symbol(\"EOF\"),fh=Symbol(\"maybeEmitEnd\"),dg=Symbol(\"emittedEnd\"),ON=Symbol(\"emittingEnd\"),fb=Symbol(\"emittedError\"),LN=Symbol(\"closed\"),FSe=Symbol(\"read\"),MN=Symbol(\"flush\"),NSe=Symbol(\"flushChunk\"),uf=Symbol(\"encoding\"),Gw=Symbol(\"decoder\"),Ks=Symbol(\"flowing\"),Ab=Symbol(\"paused\"),qw=Symbol(\"resume\"),zs=Symbol(\"buffer\"),Qa=Symbol(\"pipes\"),Xs=Symbol(\"bufferLength\"),PV=Symbol(\"bufferPush\"),UN=Symbol(\"bufferShift\"),na=Symbol(\"objectMode\"),ts=Symbol(\"destroyed\"),xV=Symbol(\"error\"),kV=Symbol(\"emitData\"),OSe=Symbol(\"emitEnd\"),QV=Symbol(\"emitEnd2\"),EA=Symbol(\"async\"),TV=Symbol(\"abort\"),_N=Symbol(\"aborted\"),pb=Symbol(\"signal\"),zm=Symbol(\"dataListeners\"),rc=Symbol(\"discarded\"),hb=t=>Promise.resolve().then(t),tIt=t=>t(),rIt=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",nIt=t=>t instanceof ArrayBuffer||!!t&&typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,iIt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),HN=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[qw](),this.dest.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},RV=class extends HN{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}},sIt=t=>!!t.objectMode,oIt=t=>!t.objectMode&&!!t.encoding&&t.encoding!==\"buffer\",jN=class extends FV.EventEmitter{[Ks]=!1;[Ab]=!1;[Qa]=[];[zs]=[];[na];[uf];[EA];[Gw];[uh]=!1;[dg]=!1;[ON]=!1;[LN]=!1;[fb]=null;[Xs]=0;[ts]=!1;[pb];[_N]=!1;[zm]=0;[rc]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding==\"string\")throw new TypeError(\"Encoding and objectMode may not be used together\");sIt(r)?(this[na]=!0,this[uf]=null):oIt(r)?(this[uf]=r.encoding,this[na]=!1):(this[na]=!1,this[uf]=null),this[EA]=!!r.async,this[Gw]=this[uf]?new XEt.StringDecoder(this[uf]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,\"buffer\",{get:()=>this[zs]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,\"pipes\",{get:()=>this[Qa]});let{signal:s}=r;s&&(this[pb]=s,s.aborted?this[TV]():s.addEventListener(\"abort\",()=>this[TV]()))}get bufferLength(){return this[Xs]}get encoding(){return this[uf]}set encoding(e){throw new Error(\"Encoding must be set at instantiation time\")}setEncoding(e){throw new Error(\"Encoding must be set at instantiation time\")}get objectMode(){return this[na]}set objectMode(e){throw new Error(\"objectMode must be set at instantiation time\")}get async(){return this[EA]}set async(e){this[EA]=this[EA]||!!e}[TV](){this[_N]=!0,this.emit(\"abort\",this[pb]?.reason),this.destroy(this[pb]?.reason)}get aborted(){return this[_N]}set aborted(e){}write(e,r,s){if(this[_N])return!1;if(this[uh])throw new Error(\"write after end\");if(this[ts])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[EA]?hb:tIt;if(!this[na]&&!Buffer.isBuffer(e)){if(iIt(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(nIt(e))e=Buffer.from(e);else if(typeof e!=\"string\")throw new Error(\"Non-contiguous data written to non-objectMode stream\")}return this[na]?(this[Ks]&&this[Xs]!==0&&this[MN](!0),this[Ks]?this.emit(\"data\",e):this[PV](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks]):e.length?(typeof e==\"string\"&&!(r===this[uf]&&!this[Gw]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[uf]&&(e=this[Gw].write(e)),this[Ks]&&this[Xs]!==0&&this[MN](!0),this[Ks]?this.emit(\"data\",e):this[PV](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks]):(this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks])}read(e){if(this[ts])return null;if(this[rc]=!1,this[Xs]===0||e===0||e&&e>this[Xs])return this[fh](),null;this[na]&&(e=null),this[zs].length>1&&!this[na]&&(this[zs]=[this[uf]?this[zs].join(\"\"):Buffer.concat(this[zs],this[Xs])]);let r=this[FSe](e||null,this[zs][0]);return this[fh](),r}[FSe](e,r){if(this[na])this[UN]();else{let s=r;e===s.length||e===null?this[UN]():typeof s==\"string\"?(this[zs][0]=s.slice(e),r=s.slice(0,e),this[Xs]-=e):(this[zs][0]=s.subarray(e),r=s.subarray(0,e),this[Xs]-=e)}return this.emit(\"data\",r),!this[zs].length&&!this[uh]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=void 0),typeof r==\"function\"&&(s=r,r=\"utf8\"),e!==void 0&&this.write(e,r),s&&this.once(\"end\",s),this[uh]=!0,this.writable=!1,(this[Ks]||!this[Ab])&&this[fh](),this}[qw](){this[ts]||(!this[zm]&&!this[Qa].length&&(this[rc]=!0),this[Ab]=!1,this[Ks]=!0,this.emit(\"resume\"),this[zs].length?this[MN]():this[uh]?this[fh]():this.emit(\"drain\"))}resume(){return this[qw]()}pause(){this[Ks]=!1,this[Ab]=!0,this[rc]=!1}get destroyed(){return this[ts]}get flowing(){return this[Ks]}get paused(){return this[Ab]}[PV](e){this[na]?this[Xs]+=1:this[Xs]+=e.length,this[zs].push(e)}[UN](){return this[na]?this[Xs]-=1:this[Xs]-=this[zs][0].length,this[zs].shift()}[MN](e=!1){do;while(this[NSe](this[UN]())&&this[zs].length);!e&&!this[zs].length&&!this[uh]&&this.emit(\"drain\")}[NSe](e){return this.emit(\"data\",e),this[Ks]}pipe(e,r){if(this[ts])return e;this[rc]=!1;let s=this[dg];return r=r||{},e===RSe.stdout||e===RSe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this[Qa].push(r.proxyErrors?new RV(this,e,r):new HN(this,e,r)),this[EA]?hb(()=>this[qw]()):this[qw]()),e}unpipe(e){let r=this[Qa].find(s=>s.dest===e);r&&(this[Qa].length===1?(this[Ks]&&this[zm]===0&&(this[Ks]=!1),this[Qa]=[]):this[Qa].splice(this[Qa].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);if(e===\"data\")this[rc]=!1,this[zm]++,!this[Qa].length&&!this[Ks]&&this[qw]();else if(e===\"readable\"&&this[Xs]!==0)super.emit(\"readable\");else if(rIt(e)&&this[dg])super.emit(e),this.removeAllListeners(e);else if(e===\"error\"&&this[fb]){let a=r;this[EA]?hb(()=>a.call(this,this[fb])):a.call(this,this[fb])}return s}removeListener(e,r){return this.off(e,r)}off(e,r){let s=super.off(e,r);return e===\"data\"&&(this[zm]=this.listeners(\"data\").length,this[zm]===0&&!this[rc]&&!this[Qa].length&&(this[Ks]=!1)),s}removeAllListeners(e){let r=super.removeAllListeners(e);return(e===\"data\"||e===void 0)&&(this[zm]=0,!this[rc]&&!this[Qa].length&&(this[Ks]=!1)),r}get emittedEnd(){return this[dg]}[fh](){!this[ON]&&!this[dg]&&!this[ts]&&this[zs].length===0&&this[uh]&&(this[ON]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[LN]&&this.emit(\"close\"),this[ON]=!1)}emit(e,...r){let s=r[0];if(e!==\"error\"&&e!==\"close\"&&e!==ts&&this[ts])return!1;if(e===\"data\")return!this[na]&&!s?!1:this[EA]?(hb(()=>this[kV](s)),!0):this[kV](s);if(e===\"end\")return this[OSe]();if(e===\"close\"){if(this[LN]=!0,!this[dg]&&!this[ts])return!1;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[fb]=s,super.emit(xV,s);let n=!this[pb]||this.listeners(\"error\").length?super.emit(\"error\",s):!1;return this[fh](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[fh](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,...r);return this[fh](),a}[kV](e){for(let s of this[Qa])s.dest.write(e)===!1&&this.pause();let r=this[rc]?!1:super.emit(\"data\",e);return this[fh](),r}[OSe](){return this[dg]?!1:(this[dg]=!0,this.readable=!1,this[EA]?(hb(()=>this[QV]()),!0):this[QV]())}[QV](){if(this[Gw]){let r=this[Gw].end();if(r){for(let s of this[Qa])s.dest.write(r);this[rc]||super.emit(\"data\",r)}}for(let r of this[Qa])r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}async collect(){let e=Object.assign([],{dataLength:0});this[na]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[na]||(e.dataLength+=s.length)}),await r,e}async concat(){if(this[na])throw new Error(\"cannot concat in objectMode\");let e=await this.collect();return this[uf]?e.join(\"\"):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ts,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Symbol.asyncIterator](){this[rc]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let a=this.read();if(a!==null)return Promise.resolve({done:!1,value:a});if(this[uh])return r();let n,c,f=C=>{this.off(\"data\",p),this.off(\"end\",h),this.off(ts,E),r(),c(C)},p=C=>{this.off(\"error\",f),this.off(\"end\",h),this.off(ts,E),this.pause(),n({value:C,done:!!this[uh]})},h=()=>{this.off(\"error\",f),this.off(\"data\",p),this.off(ts,E),r(),n({done:!0,value:void 0})},E=()=>f(new Error(\"stream destroyed\"));return new Promise((C,S)=>{c=S,n=C,this.once(ts,E),this.once(\"error\",f),this.once(\"end\",h),this.once(\"data\",p)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[rc]=!1;let e=!1,r=()=>(this.pause(),this.off(xV,r),this.off(ts,r),this.off(\"end\",r),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return r();let a=this.read();return a===null?r():{done:!1,value:a}};return this.once(\"end\",r),this.once(xV,r),this.once(ts,r),{next:s,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ts])return e?this.emit(\"error\",e):this.emit(ts),this;this[ts]=!0,this[rc]=!0,this[zs].length=0,this[Xs]=0;let r=this;return typeof r.close==\"function\"&&!this[LN]&&r.close(),e?this.emit(\"error\",e):this.emit(ts),this}static get isStream(){return Ta.isStream}};Ta.Minipass=jN});var HSe=_((Trr,IA)=>{\"use strict\";var db=Ie(\"crypto\"),{Minipass:aIt}=MSe(),OV=[\"sha512\",\"sha384\",\"sha256\"],MV=[\"sha512\"],lIt=/^[a-z0-9+/]+(?:=?=?)$/i,cIt=/^([a-z0-9]+)-([^?]+)([?\\S*]*)$/,uIt=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\\?[\\x21-\\x7E]*)?$/,fIt=/^[\\x21-\\x7E]+$/,mb=t=>t?.length?`?${t.join(\"?\")}`:\"\",LV=class extends aIt{#t;#r;#i;constructor(e){super(),this.size=0,this.opts=e,this.#e(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...MV],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(db.createHash)}#e(){this.sri=this.opts?.integrity?nc(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=mb(this.opts?.options)}on(e,r){return e===\"size\"&&this.#r?r(this.#r):e===\"integrity\"&&this.#t?r(this.#t):e===\"verified\"&&this.#i?r(this.#i):super.on(e,r)}emit(e,r){return e===\"end\"&&this.#n(),super.emit(e,r)}write(e){return this.size+=e.length,this.hashes.forEach(r=>r.update(e)),super.write(e)}#n(){this.goodSri||this.#e();let e=nc(this.hashes.map((s,a)=>`${this.algorithms[a]}-${s.digest(\"base64\")}${this.optString}`).join(\" \"),this.opts),r=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize==\"number\"&&this.size!==this.expectedSize){let s=new Error(`stream size mismatch when checking ${this.sri}.\n  Wanted: ${this.expectedSize}\n  Found: ${this.size}`);s.code=\"EBADSIZE\",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit(\"error\",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code=\"EINTEGRITY\",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit(\"error\",s)}else this.#r=this.size,this.emit(\"size\",this.size),this.#t=e,this.emit(\"integrity\",e),r&&(this.#i=r,this.emit(\"verified\",r))}},Ah=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest=\"\",this.algorithm=\"\",this.options=[];let a=this.source.match(s?uIt:cIt);if(!a||s&&!OV.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split(\"?\"))}hexDigest(){return this.digest&&Buffer.from(this.digest,\"base64\").toString(\"hex\")}toJSON(){return this.toString()}match(e,r){let s=nc(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(OV.includes(this.algorithm)&&this.digest.match(lIt)&&this.options.every(r=>r.match(fIt)))?\"\":`${this.algorithm}-${this.digest}${mb(this.options)}`}};function USe(t,e,r,s){let a=t!==\"\",n=!1,c=\"\",f=s.length-1;for(let h=0;h<f;h++){let E=Ah.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=e)}let p=Ah.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?t+e+c:t+c}var Xm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||\" \",s=\"\";if(e?.strict){r=r.replace(/\\S+/g,\" \");for(let a of OV)this[a]&&(s=USe(s,r,e,this[a]))}else for(let a of Object.keys(this))s=USe(s,r,e,this[a]);return s}concat(e,r){let s=typeof e==\"string\"?e:gb(e,r);return nc(`${this.toString(r)} ${s}`,r)}hexDigest(){return nc(this,{single:!0}).hexDigest()}merge(e,r){let s=nc(e,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error(\"hashes do not match, cannot update integrity\")}else this[a]=s[a]}match(e,r){let s=nc(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||EIt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};IA.exports.parse=nc;function nc(t,e){if(!t)return null;if(typeof t==\"string\")return NV(t,e);if(t.algorithm&&t.digest){let r=new Xm;return r[t.algorithm]=[t],NV(gb(r,e),e)}else return NV(gb(t,e),e)}function NV(t,e){if(e?.single)return new Ah(t,e);let r=t.trim().split(/\\s+/).reduce((s,a)=>{let n=new Ah(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new Xm);return r.isEmpty()?null:r}IA.exports.stringify=gb;function gb(t,e){return t.algorithm&&t.digest?Ah.prototype.toString.call(t,e):typeof t==\"string\"?gb(nc(t,e),e):Xm.prototype.toString.call(t,e)}IA.exports.fromHex=AIt;function AIt(t,e,r){let s=mb(r?.options);return nc(`${e}-${Buffer.from(t,\"hex\").toString(\"base64\")}${s}`,r)}IA.exports.fromData=pIt;function pIt(t,e){let r=e?.algorithms||[...MV],s=mb(e?.options);return r.reduce((a,n)=>{let c=db.createHash(n).update(t).digest(\"base64\"),f=new Ah(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new Xm)}IA.exports.fromStream=hIt;function hIt(t,e){let r=UV(e);return new Promise((s,a)=>{t.pipe(r),t.on(\"error\",a),r.on(\"error\",a);let n;r.on(\"integrity\",c=>{n=c}),r.on(\"end\",()=>s(n)),r.resume()})}IA.exports.checkData=gIt;function gIt(t,e,r){if(e=nc(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"});return!1}let s=e.pickAlgorithm(r),a=db.createHash(s).update(t).digest(\"base64\"),n=nc({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size==\"number\"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}.\n  Wanted: ${r.size}\n  Found: ${t.length}`);throw f.code=\"EBADSIZE\",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code=\"EINTEGRITY\",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}IA.exports.checkStream=dIt;function dIt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=nc(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"}));let s=UV(r);return new Promise((a,n)=>{t.pipe(s),t.on(\"error\",n),s.on(\"error\",n);let c;s.on(\"verified\",f=>{c=f}),s.on(\"end\",()=>a(c)),s.resume()})}IA.exports.integrityStream=UV;function UV(t=Object.create(null)){return new LV(t)}IA.exports.create=mIt;function mIt(t){let e=t?.algorithms||[...MV],r=mb(t?.options),s=e.map(db.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest(\"base64\"),p=new Ah(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new Xm)}}}var yIt=db.getHashes(),_Se=[\"md5\",\"whirlpool\",\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"sha3\",\"sha3-256\",\"sha3-384\",\"sha3-512\",\"sha3_256\",\"sha3_384\",\"sha3_512\"].filter(t=>yIt.includes(t));function EIt(t,e){return _Se.indexOf(t.toLowerCase())>=_Se.indexOf(e.toLowerCase())?t:e}});var _V=_(mg=>{\"use strict\";Object.defineProperty(mg,\"__esModule\",{value:!0});mg.Signature=mg.Envelope=void 0;mg.Envelope={fromJSON(t){return{payload:GN(t.payload)?Buffer.from(jSe(t.payload)):Buffer.alloc(0),payloadType:GN(t.payloadType)?globalThis.String(t.payloadType):\"\",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>mg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=GSe(t.payload)),t.payloadType!==\"\"&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>mg.Signature.toJSON(r))),e}};mg.Signature={fromJSON(t){return{sig:GN(t.sig)?Buffer.from(jSe(t.sig)):Buffer.alloc(0),keyid:GN(t.keyid)?globalThis.String(t.keyid):\"\"}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=GSe(t.sig)),t.keyid!==\"\"&&(e.keyid=t.keyid),e}};function jSe(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function GSe(t){return globalThis.Buffer.from(t).toString(\"base64\")}function GN(t){return t!=null}});var WSe=_(qN=>{\"use strict\";Object.defineProperty(qN,\"__esModule\",{value:!0});qN.Timestamp=void 0;qN.Timestamp={fromJSON(t){return{seconds:qSe(t.seconds)?globalThis.String(t.seconds):\"0\",nanos:qSe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!==\"0\"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function qSe(t){return t!=null}});var Ww=_(Ur=>{\"use strict\";Object.defineProperty(Ur,\"__esModule\",{value:!0});Ur.TimeRange=Ur.X509CertificateChain=Ur.SubjectAlternativeName=Ur.X509Certificate=Ur.DistinguishedName=Ur.ObjectIdentifierValuePair=Ur.ObjectIdentifier=Ur.PublicKeyIdentifier=Ur.PublicKey=Ur.RFC3161SignedTimestamp=Ur.LogId=Ur.MessageSignature=Ur.HashOutput=Ur.SubjectAlternativeNameType=Ur.PublicKeyDetails=Ur.HashAlgorithm=void 0;Ur.hashAlgorithmFromJSON=VSe;Ur.hashAlgorithmToJSON=JSe;Ur.publicKeyDetailsFromJSON=KSe;Ur.publicKeyDetailsToJSON=zSe;Ur.subjectAlternativeNameTypeFromJSON=XSe;Ur.subjectAlternativeNameTypeToJSON=ZSe;var IIt=WSe(),yl;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]=\"HASH_ALGORITHM_UNSPECIFIED\",t[t.SHA2_256=1]=\"SHA2_256\",t[t.SHA2_384=2]=\"SHA2_384\",t[t.SHA2_512=3]=\"SHA2_512\",t[t.SHA3_256=4]=\"SHA3_256\",t[t.SHA3_384=5]=\"SHA3_384\"})(yl||(Ur.HashAlgorithm=yl={}));function VSe(t){switch(t){case 0:case\"HASH_ALGORITHM_UNSPECIFIED\":return yl.HASH_ALGORITHM_UNSPECIFIED;case 1:case\"SHA2_256\":return yl.SHA2_256;case 2:case\"SHA2_384\":return yl.SHA2_384;case 3:case\"SHA2_512\":return yl.SHA2_512;case 4:case\"SHA3_256\":return yl.SHA3_256;case 5:case\"SHA3_384\":return yl.SHA3_384;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}function JSe(t){switch(t){case yl.HASH_ALGORITHM_UNSPECIFIED:return\"HASH_ALGORITHM_UNSPECIFIED\";case yl.SHA2_256:return\"SHA2_256\";case yl.SHA2_384:return\"SHA2_384\";case yl.SHA2_512:return\"SHA2_512\";case yl.SHA3_256:return\"SHA3_256\";case yl.SHA3_384:return\"SHA3_384\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}var sn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]=\"PUBLIC_KEY_DETAILS_UNSPECIFIED\",t[t.PKCS1_RSA_PKCS1V5=1]=\"PKCS1_RSA_PKCS1V5\",t[t.PKCS1_RSA_PSS=2]=\"PKCS1_RSA_PSS\",t[t.PKIX_RSA_PKCS1V5=3]=\"PKIX_RSA_PKCS1V5\",t[t.PKIX_RSA_PSS=4]=\"PKIX_RSA_PSS\",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]=\"PKIX_RSA_PKCS1V15_2048_SHA256\",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]=\"PKIX_RSA_PKCS1V15_3072_SHA256\",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]=\"PKIX_RSA_PKCS1V15_4096_SHA256\",t[t.PKIX_RSA_PSS_2048_SHA256=16]=\"PKIX_RSA_PSS_2048_SHA256\",t[t.PKIX_RSA_PSS_3072_SHA256=17]=\"PKIX_RSA_PSS_3072_SHA256\",t[t.PKIX_RSA_PSS_4096_SHA256=18]=\"PKIX_RSA_PSS_4096_SHA256\",t[t.PKIX_ECDSA_P256_HMAC_SHA_256=6]=\"PKIX_ECDSA_P256_HMAC_SHA_256\",t[t.PKIX_ECDSA_P256_SHA_256=5]=\"PKIX_ECDSA_P256_SHA_256\",t[t.PKIX_ECDSA_P384_SHA_384=12]=\"PKIX_ECDSA_P384_SHA_384\",t[t.PKIX_ECDSA_P521_SHA_512=13]=\"PKIX_ECDSA_P521_SHA_512\",t[t.PKIX_ED25519=7]=\"PKIX_ED25519\",t[t.PKIX_ED25519_PH=8]=\"PKIX_ED25519_PH\",t[t.LMS_SHA256=14]=\"LMS_SHA256\",t[t.LMOTS_SHA256=15]=\"LMOTS_SHA256\"})(sn||(Ur.PublicKeyDetails=sn={}));function KSe(t){switch(t){case 0:case\"PUBLIC_KEY_DETAILS_UNSPECIFIED\":return sn.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case\"PKCS1_RSA_PKCS1V5\":return sn.PKCS1_RSA_PKCS1V5;case 2:case\"PKCS1_RSA_PSS\":return sn.PKCS1_RSA_PSS;case 3:case\"PKIX_RSA_PKCS1V5\":return sn.PKIX_RSA_PKCS1V5;case 4:case\"PKIX_RSA_PSS\":return sn.PKIX_RSA_PSS;case 9:case\"PKIX_RSA_PKCS1V15_2048_SHA256\":return sn.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case\"PKIX_RSA_PKCS1V15_3072_SHA256\":return sn.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case\"PKIX_RSA_PKCS1V15_4096_SHA256\":return sn.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case\"PKIX_RSA_PSS_2048_SHA256\":return sn.PKIX_RSA_PSS_2048_SHA256;case 17:case\"PKIX_RSA_PSS_3072_SHA256\":return sn.PKIX_RSA_PSS_3072_SHA256;case 18:case\"PKIX_RSA_PSS_4096_SHA256\":return sn.PKIX_RSA_PSS_4096_SHA256;case 6:case\"PKIX_ECDSA_P256_HMAC_SHA_256\":return sn.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case\"PKIX_ECDSA_P256_SHA_256\":return sn.PKIX_ECDSA_P256_SHA_256;case 12:case\"PKIX_ECDSA_P384_SHA_384\":return sn.PKIX_ECDSA_P384_SHA_384;case 13:case\"PKIX_ECDSA_P521_SHA_512\":return sn.PKIX_ECDSA_P521_SHA_512;case 7:case\"PKIX_ED25519\":return sn.PKIX_ED25519;case 8:case\"PKIX_ED25519_PH\":return sn.PKIX_ED25519_PH;case 14:case\"LMS_SHA256\":return sn.LMS_SHA256;case 15:case\"LMOTS_SHA256\":return sn.LMOTS_SHA256;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}function zSe(t){switch(t){case sn.PUBLIC_KEY_DETAILS_UNSPECIFIED:return\"PUBLIC_KEY_DETAILS_UNSPECIFIED\";case sn.PKCS1_RSA_PKCS1V5:return\"PKCS1_RSA_PKCS1V5\";case sn.PKCS1_RSA_PSS:return\"PKCS1_RSA_PSS\";case sn.PKIX_RSA_PKCS1V5:return\"PKIX_RSA_PKCS1V5\";case sn.PKIX_RSA_PSS:return\"PKIX_RSA_PSS\";case sn.PKIX_RSA_PKCS1V15_2048_SHA256:return\"PKIX_RSA_PKCS1V15_2048_SHA256\";case sn.PKIX_RSA_PKCS1V15_3072_SHA256:return\"PKIX_RSA_PKCS1V15_3072_SHA256\";case sn.PKIX_RSA_PKCS1V15_4096_SHA256:return\"PKIX_RSA_PKCS1V15_4096_SHA256\";case sn.PKIX_RSA_PSS_2048_SHA256:return\"PKIX_RSA_PSS_2048_SHA256\";case sn.PKIX_RSA_PSS_3072_SHA256:return\"PKIX_RSA_PSS_3072_SHA256\";case sn.PKIX_RSA_PSS_4096_SHA256:return\"PKIX_RSA_PSS_4096_SHA256\";case sn.PKIX_ECDSA_P256_HMAC_SHA_256:return\"PKIX_ECDSA_P256_HMAC_SHA_256\";case sn.PKIX_ECDSA_P256_SHA_256:return\"PKIX_ECDSA_P256_SHA_256\";case sn.PKIX_ECDSA_P384_SHA_384:return\"PKIX_ECDSA_P384_SHA_384\";case sn.PKIX_ECDSA_P521_SHA_512:return\"PKIX_ECDSA_P521_SHA_512\";case sn.PKIX_ED25519:return\"PKIX_ED25519\";case sn.PKIX_ED25519_PH:return\"PKIX_ED25519_PH\";case sn.LMS_SHA256:return\"LMS_SHA256\";case sn.LMOTS_SHA256:return\"LMOTS_SHA256\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}var CA;(function(t){t[t.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]=\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\",t[t.EMAIL=1]=\"EMAIL\",t[t.URI=2]=\"URI\",t[t.OTHER_NAME=3]=\"OTHER_NAME\"})(CA||(Ur.SubjectAlternativeNameType=CA={}));function XSe(t){switch(t){case 0:case\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\":return CA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case\"EMAIL\":return CA.EMAIL;case 2:case\"URI\":return CA.URI;case 3:case\"OTHER_NAME\":return CA.OTHER_NAME;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}function ZSe(t){switch(t){case CA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\";case CA.EMAIL:return\"EMAIL\";case CA.URI:return\"URI\";case CA.OTHER_NAME:return\"OTHER_NAME\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}Ur.HashOutput={fromJSON(t){return{algorithm:ds(t.algorithm)?VSe(t.algorithm):0,digest:ds(t.digest)?Buffer.from(Zm(t.digest)):Buffer.alloc(0)}},toJSON(t){let e={};return t.algorithm!==0&&(e.algorithm=JSe(t.algorithm)),t.digest.length!==0&&(e.digest=$m(t.digest)),e}};Ur.MessageSignature={fromJSON(t){return{messageDigest:ds(t.messageDigest)?Ur.HashOutput.fromJSON(t.messageDigest):void 0,signature:ds(t.signature)?Buffer.from(Zm(t.signature)):Buffer.alloc(0)}},toJSON(t){let e={};return t.messageDigest!==void 0&&(e.messageDigest=Ur.HashOutput.toJSON(t.messageDigest)),t.signature.length!==0&&(e.signature=$m(t.signature)),e}};Ur.LogId={fromJSON(t){return{keyId:ds(t.keyId)?Buffer.from(Zm(t.keyId)):Buffer.alloc(0)}},toJSON(t){let e={};return t.keyId.length!==0&&(e.keyId=$m(t.keyId)),e}};Ur.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:ds(t.signedTimestamp)?Buffer.from(Zm(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedTimestamp.length!==0&&(e.signedTimestamp=$m(t.signedTimestamp)),e}};Ur.PublicKey={fromJSON(t){return{rawBytes:ds(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):void 0,keyDetails:ds(t.keyDetails)?KSe(t.keyDetails):0,validFor:ds(t.validFor)?Ur.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.rawBytes!==void 0&&(e.rawBytes=$m(t.rawBytes)),t.keyDetails!==0&&(e.keyDetails=zSe(t.keyDetails)),t.validFor!==void 0&&(e.validFor=Ur.TimeRange.toJSON(t.validFor)),e}};Ur.PublicKeyIdentifier={fromJSON(t){return{hint:ds(t.hint)?globalThis.String(t.hint):\"\"}},toJSON(t){let e={};return t.hint!==\"\"&&(e.hint=t.hint),e}};Ur.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map(e=>globalThis.Number(e)):[]}},toJSON(t){let e={};return t.id?.length&&(e.id=t.id.map(r=>Math.round(r))),e}};Ur.ObjectIdentifierValuePair={fromJSON(t){return{oid:ds(t.oid)?Ur.ObjectIdentifier.fromJSON(t.oid):void 0,value:ds(t.value)?Buffer.from(Zm(t.value)):Buffer.alloc(0)}},toJSON(t){let e={};return t.oid!==void 0&&(e.oid=Ur.ObjectIdentifier.toJSON(t.oid)),t.value.length!==0&&(e.value=$m(t.value)),e}};Ur.DistinguishedName={fromJSON(t){return{organization:ds(t.organization)?globalThis.String(t.organization):\"\",commonName:ds(t.commonName)?globalThis.String(t.commonName):\"\"}},toJSON(t){let e={};return t.organization!==\"\"&&(e.organization=t.organization),t.commonName!==\"\"&&(e.commonName=t.commonName),e}};Ur.X509Certificate={fromJSON(t){return{rawBytes:ds(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){let e={};return t.rawBytes.length!==0&&(e.rawBytes=$m(t.rawBytes)),e}};Ur.SubjectAlternativeName={fromJSON(t){return{type:ds(t.type)?XSe(t.type):0,identity:ds(t.regexp)?{$case:\"regexp\",regexp:globalThis.String(t.regexp)}:ds(t.value)?{$case:\"value\",value:globalThis.String(t.value)}:void 0}},toJSON(t){let e={};return t.type!==0&&(e.type=ZSe(t.type)),t.identity?.$case===\"regexp\"?e.regexp=t.identity.regexp:t.identity?.$case===\"value\"&&(e.value=t.identity.value),e}};Ur.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map(e=>Ur.X509Certificate.fromJSON(e)):[]}},toJSON(t){let e={};return t.certificates?.length&&(e.certificates=t.certificates.map(r=>Ur.X509Certificate.toJSON(r))),e}};Ur.TimeRange={fromJSON(t){return{start:ds(t.start)?YSe(t.start):void 0,end:ds(t.end)?YSe(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=t.start.toISOString()),t.end!==void 0&&(e.end=t.end.toISOString()),e}};function Zm(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function $m(t){return globalThis.Buffer.from(t).toString(\"base64\")}function CIt(t){let e=(globalThis.Number(t.seconds)||0)*1e3;return e+=(t.nanos||0)/1e6,new globalThis.Date(e)}function YSe(t){return t instanceof globalThis.Date?t:typeof t==\"string\"?new globalThis.Date(t):CIt(IIt.Timestamp.fromJSON(t))}function ds(t){return t!=null}});var HV=_(ms=>{\"use strict\";Object.defineProperty(ms,\"__esModule\",{value:!0});ms.TransparencyLogEntry=ms.InclusionPromise=ms.InclusionProof=ms.Checkpoint=ms.KindVersion=void 0;var $Se=Ww();ms.KindVersion={fromJSON(t){return{kind:Ra(t.kind)?globalThis.String(t.kind):\"\",version:Ra(t.version)?globalThis.String(t.version):\"\"}},toJSON(t){let e={};return t.kind!==\"\"&&(e.kind=t.kind),t.version!==\"\"&&(e.version=t.version),e}};ms.Checkpoint={fromJSON(t){return{envelope:Ra(t.envelope)?globalThis.String(t.envelope):\"\"}},toJSON(t){let e={};return t.envelope!==\"\"&&(e.envelope=t.envelope),e}};ms.InclusionProof={fromJSON(t){return{logIndex:Ra(t.logIndex)?globalThis.String(t.logIndex):\"0\",rootHash:Ra(t.rootHash)?Buffer.from(WN(t.rootHash)):Buffer.alloc(0),treeSize:Ra(t.treeSize)?globalThis.String(t.treeSize):\"0\",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map(e=>Buffer.from(WN(e))):[],checkpoint:Ra(t.checkpoint)?ms.Checkpoint.fromJSON(t.checkpoint):void 0}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.rootHash.length!==0&&(e.rootHash=YN(t.rootHash)),t.treeSize!==\"0\"&&(e.treeSize=t.treeSize),t.hashes?.length&&(e.hashes=t.hashes.map(r=>YN(r))),t.checkpoint!==void 0&&(e.checkpoint=ms.Checkpoint.toJSON(t.checkpoint)),e}};ms.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:Ra(t.signedEntryTimestamp)?Buffer.from(WN(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=YN(t.signedEntryTimestamp)),e}};ms.TransparencyLogEntry={fromJSON(t){return{logIndex:Ra(t.logIndex)?globalThis.String(t.logIndex):\"0\",logId:Ra(t.logId)?$Se.LogId.fromJSON(t.logId):void 0,kindVersion:Ra(t.kindVersion)?ms.KindVersion.fromJSON(t.kindVersion):void 0,integratedTime:Ra(t.integratedTime)?globalThis.String(t.integratedTime):\"0\",inclusionPromise:Ra(t.inclusionPromise)?ms.InclusionPromise.fromJSON(t.inclusionPromise):void 0,inclusionProof:Ra(t.inclusionProof)?ms.InclusionProof.fromJSON(t.inclusionProof):void 0,canonicalizedBody:Ra(t.canonicalizedBody)?Buffer.from(WN(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.logId!==void 0&&(e.logId=$Se.LogId.toJSON(t.logId)),t.kindVersion!==void 0&&(e.kindVersion=ms.KindVersion.toJSON(t.kindVersion)),t.integratedTime!==\"0\"&&(e.integratedTime=t.integratedTime),t.inclusionPromise!==void 0&&(e.inclusionPromise=ms.InclusionPromise.toJSON(t.inclusionPromise)),t.inclusionProof!==void 0&&(e.inclusionProof=ms.InclusionProof.toJSON(t.inclusionProof)),t.canonicalizedBody.length!==0&&(e.canonicalizedBody=YN(t.canonicalizedBody)),e}};function WN(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function YN(t){return globalThis.Buffer.from(t).toString(\"base64\")}function Ra(t){return t!=null}});var jV=_(Xc=>{\"use strict\";Object.defineProperty(Xc,\"__esModule\",{value:!0});Xc.Bundle=Xc.VerificationMaterial=Xc.TimestampVerificationData=void 0;var eDe=_V(),wA=Ww(),tDe=HV();Xc.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map(e=>wA.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(t){let e={};return t.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=t.rfc3161Timestamps.map(r=>wA.RFC3161SignedTimestamp.toJSON(r))),e}};Xc.VerificationMaterial={fromJSON(t){return{content:yg(t.publicKey)?{$case:\"publicKey\",publicKey:wA.PublicKeyIdentifier.fromJSON(t.publicKey)}:yg(t.x509CertificateChain)?{$case:\"x509CertificateChain\",x509CertificateChain:wA.X509CertificateChain.fromJSON(t.x509CertificateChain)}:yg(t.certificate)?{$case:\"certificate\",certificate:wA.X509Certificate.fromJSON(t.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map(e=>tDe.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:yg(t.timestampVerificationData)?Xc.TimestampVerificationData.fromJSON(t.timestampVerificationData):void 0}},toJSON(t){let e={};return t.content?.$case===\"publicKey\"?e.publicKey=wA.PublicKeyIdentifier.toJSON(t.content.publicKey):t.content?.$case===\"x509CertificateChain\"?e.x509CertificateChain=wA.X509CertificateChain.toJSON(t.content.x509CertificateChain):t.content?.$case===\"certificate\"&&(e.certificate=wA.X509Certificate.toJSON(t.content.certificate)),t.tlogEntries?.length&&(e.tlogEntries=t.tlogEntries.map(r=>tDe.TransparencyLogEntry.toJSON(r))),t.timestampVerificationData!==void 0&&(e.timestampVerificationData=Xc.TimestampVerificationData.toJSON(t.timestampVerificationData)),e}};Xc.Bundle={fromJSON(t){return{mediaType:yg(t.mediaType)?globalThis.String(t.mediaType):\"\",verificationMaterial:yg(t.verificationMaterial)?Xc.VerificationMaterial.fromJSON(t.verificationMaterial):void 0,content:yg(t.messageSignature)?{$case:\"messageSignature\",messageSignature:wA.MessageSignature.fromJSON(t.messageSignature)}:yg(t.dsseEnvelope)?{$case:\"dsseEnvelope\",dsseEnvelope:eDe.Envelope.fromJSON(t.dsseEnvelope)}:void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.verificationMaterial!==void 0&&(e.verificationMaterial=Xc.VerificationMaterial.toJSON(t.verificationMaterial)),t.content?.$case===\"messageSignature\"?e.messageSignature=wA.MessageSignature.toJSON(t.content.messageSignature):t.content?.$case===\"dsseEnvelope\"&&(e.dsseEnvelope=eDe.Envelope.toJSON(t.content.dsseEnvelope)),e}};function yg(t){return t!=null}});var GV=_(Ri=>{\"use strict\";Object.defineProperty(Ri,\"__esModule\",{value:!0});Ri.ClientTrustConfig=Ri.SigningConfig=Ri.TrustedRoot=Ri.CertificateAuthority=Ri.TransparencyLogInstance=void 0;var El=Ww();Ri.TransparencyLogInstance={fromJSON(t){return{baseUrl:ia(t.baseUrl)?globalThis.String(t.baseUrl):\"\",hashAlgorithm:ia(t.hashAlgorithm)?(0,El.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:ia(t.publicKey)?El.PublicKey.fromJSON(t.publicKey):void 0,logId:ia(t.logId)?El.LogId.fromJSON(t.logId):void 0,checkpointKeyId:ia(t.checkpointKeyId)?El.LogId.fromJSON(t.checkpointKeyId):void 0}},toJSON(t){let e={};return t.baseUrl!==\"\"&&(e.baseUrl=t.baseUrl),t.hashAlgorithm!==0&&(e.hashAlgorithm=(0,El.hashAlgorithmToJSON)(t.hashAlgorithm)),t.publicKey!==void 0&&(e.publicKey=El.PublicKey.toJSON(t.publicKey)),t.logId!==void 0&&(e.logId=El.LogId.toJSON(t.logId)),t.checkpointKeyId!==void 0&&(e.checkpointKeyId=El.LogId.toJSON(t.checkpointKeyId)),e}};Ri.CertificateAuthority={fromJSON(t){return{subject:ia(t.subject)?El.DistinguishedName.fromJSON(t.subject):void 0,uri:ia(t.uri)?globalThis.String(t.uri):\"\",certChain:ia(t.certChain)?El.X509CertificateChain.fromJSON(t.certChain):void 0,validFor:ia(t.validFor)?El.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.subject!==void 0&&(e.subject=El.DistinguishedName.toJSON(t.subject)),t.uri!==\"\"&&(e.uri=t.uri),t.certChain!==void 0&&(e.certChain=El.X509CertificateChain.toJSON(t.certChain)),t.validFor!==void 0&&(e.validFor=El.TimeRange.toJSON(t.validFor)),e}};Ri.TrustedRoot={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map(e=>Ri.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map(e=>Ri.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map(e=>Ri.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map(e=>Ri.CertificateAuthority.fromJSON(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.tlogs?.length&&(e.tlogs=t.tlogs.map(r=>Ri.TransparencyLogInstance.toJSON(r))),t.certificateAuthorities?.length&&(e.certificateAuthorities=t.certificateAuthorities.map(r=>Ri.CertificateAuthority.toJSON(r))),t.ctlogs?.length&&(e.ctlogs=t.ctlogs.map(r=>Ri.TransparencyLogInstance.toJSON(r))),t.timestampAuthorities?.length&&(e.timestampAuthorities=t.timestampAuthorities.map(r=>Ri.CertificateAuthority.toJSON(r))),e}};Ri.SigningConfig={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",caUrl:ia(t.caUrl)?globalThis.String(t.caUrl):\"\",oidcUrl:ia(t.oidcUrl)?globalThis.String(t.oidcUrl):\"\",tlogUrls:globalThis.Array.isArray(t?.tlogUrls)?t.tlogUrls.map(e=>globalThis.String(e)):[],tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.caUrl!==\"\"&&(e.caUrl=t.caUrl),t.oidcUrl!==\"\"&&(e.oidcUrl=t.oidcUrl),t.tlogUrls?.length&&(e.tlogUrls=t.tlogUrls),t.tsaUrls?.length&&(e.tsaUrls=t.tsaUrls),e}};Ri.ClientTrustConfig={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",trustedRoot:ia(t.trustedRoot)?Ri.TrustedRoot.fromJSON(t.trustedRoot):void 0,signingConfig:ia(t.signingConfig)?Ri.SigningConfig.fromJSON(t.signingConfig):void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.trustedRoot!==void 0&&(e.trustedRoot=Ri.TrustedRoot.toJSON(t.trustedRoot)),t.signingConfig!==void 0&&(e.signingConfig=Ri.SigningConfig.toJSON(t.signingConfig)),e}};function ia(t){return t!=null}});var iDe=_(Vr=>{\"use strict\";Object.defineProperty(Vr,\"__esModule\",{value:!0});Vr.Input=Vr.Artifact=Vr.ArtifactVerificationOptions_ObserverTimestampOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions=Vr.ArtifactVerificationOptions_CtlogOptions=Vr.ArtifactVerificationOptions_TlogOptions=Vr.ArtifactVerificationOptions=Vr.PublicKeyIdentities=Vr.CertificateIdentities=Vr.CertificateIdentity=void 0;var rDe=jV(),Eg=Ww(),nDe=GV();Vr.CertificateIdentity={fromJSON(t){return{issuer:gi(t.issuer)?globalThis.String(t.issuer):\"\",san:gi(t.san)?Eg.SubjectAlternativeName.fromJSON(t.san):void 0,oids:globalThis.Array.isArray(t?.oids)?t.oids.map(e=>Eg.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(t){let e={};return t.issuer!==\"\"&&(e.issuer=t.issuer),t.san!==void 0&&(e.san=Eg.SubjectAlternativeName.toJSON(t.san)),t.oids?.length&&(e.oids=t.oids.map(r=>Eg.ObjectIdentifierValuePair.toJSON(r))),e}};Vr.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map(e=>Vr.CertificateIdentity.fromJSON(e)):[]}},toJSON(t){let e={};return t.identities?.length&&(e.identities=t.identities.map(r=>Vr.CertificateIdentity.toJSON(r))),e}};Vr.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map(e=>Eg.PublicKey.fromJSON(e)):[]}},toJSON(t){let e={};return t.publicKeys?.length&&(e.publicKeys=t.publicKeys.map(r=>Eg.PublicKey.toJSON(r))),e}};Vr.ArtifactVerificationOptions={fromJSON(t){return{signers:gi(t.certificateIdentities)?{$case:\"certificateIdentities\",certificateIdentities:Vr.CertificateIdentities.fromJSON(t.certificateIdentities)}:gi(t.publicKeys)?{$case:\"publicKeys\",publicKeys:Vr.PublicKeyIdentities.fromJSON(t.publicKeys)}:void 0,tlogOptions:gi(t.tlogOptions)?Vr.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):void 0,ctlogOptions:gi(t.ctlogOptions)?Vr.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):void 0,tsaOptions:gi(t.tsaOptions)?Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):void 0,integratedTsOptions:gi(t.integratedTsOptions)?Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):void 0,observerOptions:gi(t.observerOptions)?Vr.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):void 0}},toJSON(t){let e={};return t.signers?.$case===\"certificateIdentities\"?e.certificateIdentities=Vr.CertificateIdentities.toJSON(t.signers.certificateIdentities):t.signers?.$case===\"publicKeys\"&&(e.publicKeys=Vr.PublicKeyIdentities.toJSON(t.signers.publicKeys)),t.tlogOptions!==void 0&&(e.tlogOptions=Vr.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)),t.ctlogOptions!==void 0&&(e.ctlogOptions=Vr.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)),t.tsaOptions!==void 0&&(e.tsaOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)),t.integratedTsOptions!==void 0&&(e.integratedTsOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)),t.observerOptions!==void 0&&(e.observerOptions=Vr.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)),e}};Vr.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:gi(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):!1,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.performOnlineVerification!==!1&&(e.performOnlineVerification=t.performOnlineVerification),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.Artifact={fromJSON(t){return{data:gi(t.artifactUri)?{$case:\"artifactUri\",artifactUri:globalThis.String(t.artifactUri)}:gi(t.artifact)?{$case:\"artifact\",artifact:Buffer.from(wIt(t.artifact))}:gi(t.artifactDigest)?{$case:\"artifactDigest\",artifactDigest:Eg.HashOutput.fromJSON(t.artifactDigest)}:void 0}},toJSON(t){let e={};return t.data?.$case===\"artifactUri\"?e.artifactUri=t.data.artifactUri:t.data?.$case===\"artifact\"?e.artifact=BIt(t.data.artifact):t.data?.$case===\"artifactDigest\"&&(e.artifactDigest=Eg.HashOutput.toJSON(t.data.artifactDigest)),e}};Vr.Input={fromJSON(t){return{artifactTrustRoot:gi(t.artifactTrustRoot)?nDe.TrustedRoot.fromJSON(t.artifactTrustRoot):void 0,artifactVerificationOptions:gi(t.artifactVerificationOptions)?Vr.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):void 0,bundle:gi(t.bundle)?rDe.Bundle.fromJSON(t.bundle):void 0,artifact:gi(t.artifact)?Vr.Artifact.fromJSON(t.artifact):void 0}},toJSON(t){let e={};return t.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=nDe.TrustedRoot.toJSON(t.artifactTrustRoot)),t.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=Vr.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)),t.bundle!==void 0&&(e.bundle=rDe.Bundle.toJSON(t.bundle)),t.artifact!==void 0&&(e.artifact=Vr.Artifact.toJSON(t.artifact)),e}};function wIt(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function BIt(t){return globalThis.Buffer.from(t).toString(\"base64\")}function gi(t){return t!=null}});var yb=_(Zc=>{\"use strict\";var vIt=Zc&&Zc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Yw=Zc&&Zc.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&vIt(e,t,r)};Object.defineProperty(Zc,\"__esModule\",{value:!0});Yw(_V(),Zc);Yw(jV(),Zc);Yw(Ww(),Zc);Yw(HV(),Zc);Yw(GV(),Zc);Yw(iDe(),Zc)});var VN=_(Il=>{\"use strict\";Object.defineProperty(Il,\"__esModule\",{value:!0});Il.BUNDLE_V03_MEDIA_TYPE=Il.BUNDLE_V03_LEGACY_MEDIA_TYPE=Il.BUNDLE_V02_MEDIA_TYPE=Il.BUNDLE_V01_MEDIA_TYPE=void 0;Il.isBundleWithCertificateChain=SIt;Il.isBundleWithPublicKey=DIt;Il.isBundleWithMessageSignature=bIt;Il.isBundleWithDsseEnvelope=PIt;Il.BUNDLE_V01_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.1\";Il.BUNDLE_V02_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.2\";Il.BUNDLE_V03_LEGACY_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.3\";Il.BUNDLE_V03_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle.v0.3+json\";function SIt(t){return t.verificationMaterial.content.$case===\"x509CertificateChain\"}function DIt(t){return t.verificationMaterial.content.$case===\"publicKey\"}function bIt(t){return t.content.$case===\"messageSignature\"}function PIt(t){return t.content.$case===\"dsseEnvelope\"}});var oDe=_(KN=>{\"use strict\";Object.defineProperty(KN,\"__esModule\",{value:!0});KN.toMessageSignatureBundle=kIt;KN.toDSSEBundle=QIt;var xIt=yb(),JN=VN();function kIt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"messageSignature\",messageSignature:{messageDigest:{algorithm:xIt.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:sDe(t)}}function QIt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"dsseEnvelope\",dsseEnvelope:TIt(t)},verificationMaterial:sDe(t)}}function TIt(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[RIt(t)]}}function RIt(t){return{keyid:t.keyHint||\"\",sig:t.signature}}function sDe(t){return{content:FIt(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function FIt(t){return t.certificate?t.certificateChain?{$case:\"x509CertificateChain\",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}:{$case:\"certificate\",certificate:{rawBytes:t.certificate}}:{$case:\"publicKey\",publicKey:{hint:t.keyHint||\"\"}}}});var WV=_(zN=>{\"use strict\";Object.defineProperty(zN,\"__esModule\",{value:!0});zN.ValidationError=void 0;var qV=class extends Error{constructor(e,r){super(e),this.fields=r}};zN.ValidationError=qV});var YV=_(ey=>{\"use strict\";Object.defineProperty(ey,\"__esModule\",{value:!0});ey.assertBundle=NIt;ey.assertBundleV01=aDe;ey.isBundleV01=OIt;ey.assertBundleV02=LIt;ey.assertBundleLatest=MIt;var XN=WV();function NIt(t){let e=ZN(t);if(e.length>0)throw new XN.ValidationError(\"invalid bundle\",e)}function aDe(t){let e=[];if(e.push(...ZN(t)),e.push(...UIt(t)),e.length>0)throw new XN.ValidationError(\"invalid v0.1 bundle\",e)}function OIt(t){try{return aDe(t),!0}catch{return!1}}function LIt(t){let e=[];if(e.push(...ZN(t)),e.push(...lDe(t)),e.length>0)throw new XN.ValidationError(\"invalid v0.2 bundle\",e)}function MIt(t){let e=[];if(e.push(...ZN(t)),e.push(...lDe(t)),e.push(..._It(t)),e.length>0)throw new XN.ValidationError(\"invalid bundle\",e)}function ZN(t){let e=[];if((t.mediaType===void 0||!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\+json;version=\\d\\.\\d/)&&!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\.v\\d\\.\\d\\+json/))&&e.push(\"mediaType\"),t.content===void 0)e.push(\"content\");else switch(t.content.$case){case\"messageSignature\":t.content.messageSignature.messageDigest===void 0?e.push(\"content.messageSignature.messageDigest\"):t.content.messageSignature.messageDigest.digest.length===0&&e.push(\"content.messageSignature.messageDigest.digest\"),t.content.messageSignature.signature.length===0&&e.push(\"content.messageSignature.signature\");break;case\"dsseEnvelope\":t.content.dsseEnvelope.payload.length===0&&e.push(\"content.dsseEnvelope.payload\"),t.content.dsseEnvelope.signatures.length!==1?e.push(\"content.dsseEnvelope.signatures\"):t.content.dsseEnvelope.signatures[0].sig.length===0&&e.push(\"content.dsseEnvelope.signatures[0].sig\");break}if(t.verificationMaterial===void 0)e.push(\"verificationMaterial\");else{if(t.verificationMaterial.content===void 0)e.push(\"verificationMaterial.content\");else switch(t.verificationMaterial.content.$case){case\"x509CertificateChain\":t.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push(\"verificationMaterial.content.x509CertificateChain.certificates\"),t.verificationMaterial.content.x509CertificateChain.certificates.forEach((r,s)=>{r.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${s}].rawBytes`)});break;case\"certificate\":t.verificationMaterial.content.certificate.rawBytes.length===0&&e.push(\"verificationMaterial.content.certificate.rawBytes\");break}t.verificationMaterial.tlogEntries===void 0?e.push(\"verificationMaterial.tlogEntries\"):t.verificationMaterial.tlogEntries.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].logId`),r.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].kindVersion`)})}return e}function UIt(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionPromise`)}),e}function lDe(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof`):r.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof.checkpoint`)}),e}function _It(t){let e=[];return t.verificationMaterial?.content?.$case===\"x509CertificateChain\"&&e.push(\"verificationMaterial.content.$case\"),e}});var uDe=_(BA=>{\"use strict\";Object.defineProperty(BA,\"__esModule\",{value:!0});BA.envelopeToJSON=BA.envelopeFromJSON=BA.bundleToJSON=BA.bundleFromJSON=void 0;var $N=yb(),cDe=VN(),VV=YV(),HIt=t=>{let e=$N.Bundle.fromJSON(t);switch(e.mediaType){case cDe.BUNDLE_V01_MEDIA_TYPE:(0,VV.assertBundleV01)(e);break;case cDe.BUNDLE_V02_MEDIA_TYPE:(0,VV.assertBundleV02)(e);break;default:(0,VV.assertBundleLatest)(e);break}return e};BA.bundleFromJSON=HIt;var jIt=t=>$N.Bundle.toJSON(t);BA.bundleToJSON=jIt;var GIt=t=>$N.Envelope.fromJSON(t);BA.envelopeFromJSON=GIt;var qIt=t=>$N.Envelope.toJSON(t);BA.envelopeToJSON=qIt});var Ib=_(Xr=>{\"use strict\";Object.defineProperty(Xr,\"__esModule\",{value:!0});Xr.isBundleV01=Xr.assertBundleV02=Xr.assertBundleV01=Xr.assertBundleLatest=Xr.assertBundle=Xr.envelopeToJSON=Xr.envelopeFromJSON=Xr.bundleToJSON=Xr.bundleFromJSON=Xr.ValidationError=Xr.isBundleWithPublicKey=Xr.isBundleWithMessageSignature=Xr.isBundleWithDsseEnvelope=Xr.isBundleWithCertificateChain=Xr.BUNDLE_V03_MEDIA_TYPE=Xr.BUNDLE_V03_LEGACY_MEDIA_TYPE=Xr.BUNDLE_V02_MEDIA_TYPE=Xr.BUNDLE_V01_MEDIA_TYPE=Xr.toMessageSignatureBundle=Xr.toDSSEBundle=void 0;var fDe=oDe();Object.defineProperty(Xr,\"toDSSEBundle\",{enumerable:!0,get:function(){return fDe.toDSSEBundle}});Object.defineProperty(Xr,\"toMessageSignatureBundle\",{enumerable:!0,get:function(){return fDe.toMessageSignatureBundle}});var Ig=VN();Object.defineProperty(Xr,\"BUNDLE_V01_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V02_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V03_LEGACY_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V03_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(Xr,\"isBundleWithCertificateChain\",{enumerable:!0,get:function(){return Ig.isBundleWithCertificateChain}});Object.defineProperty(Xr,\"isBundleWithDsseEnvelope\",{enumerable:!0,get:function(){return Ig.isBundleWithDsseEnvelope}});Object.defineProperty(Xr,\"isBundleWithMessageSignature\",{enumerable:!0,get:function(){return Ig.isBundleWithMessageSignature}});Object.defineProperty(Xr,\"isBundleWithPublicKey\",{enumerable:!0,get:function(){return Ig.isBundleWithPublicKey}});var WIt=WV();Object.defineProperty(Xr,\"ValidationError\",{enumerable:!0,get:function(){return WIt.ValidationError}});var eO=uDe();Object.defineProperty(Xr,\"bundleFromJSON\",{enumerable:!0,get:function(){return eO.bundleFromJSON}});Object.defineProperty(Xr,\"bundleToJSON\",{enumerable:!0,get:function(){return eO.bundleToJSON}});Object.defineProperty(Xr,\"envelopeFromJSON\",{enumerable:!0,get:function(){return eO.envelopeFromJSON}});Object.defineProperty(Xr,\"envelopeToJSON\",{enumerable:!0,get:function(){return eO.envelopeToJSON}});var Eb=YV();Object.defineProperty(Xr,\"assertBundle\",{enumerable:!0,get:function(){return Eb.assertBundle}});Object.defineProperty(Xr,\"assertBundleLatest\",{enumerable:!0,get:function(){return Eb.assertBundleLatest}});Object.defineProperty(Xr,\"assertBundleV01\",{enumerable:!0,get:function(){return Eb.assertBundleV01}});Object.defineProperty(Xr,\"assertBundleV02\",{enumerable:!0,get:function(){return Eb.assertBundleV02}});Object.defineProperty(Xr,\"isBundleV01\",{enumerable:!0,get:function(){return Eb.isBundleV01}})});var Cb=_(rO=>{\"use strict\";Object.defineProperty(rO,\"__esModule\",{value:!0});rO.ByteStream=void 0;var JV=class extends Error{},tO=class t{constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,r){let s=e+r;if(s>this.length)throw new JV(\"request past end of buffer\");return this.view.subarray(e,s)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let r=new Uint16Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[1],this.view[this.start+1]=s[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let r=new Uint32Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[2],this.view[this.start+1]=s[1],this.view[this.start+2]=s[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error(\"request past end of buffer\");let r=this.view.subarray(this.start,this.start+e);return this.start+=e,r}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let r=t.BLOCK_SIZE+(e>t.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+r)}}realloc(e){let r=new ArrayBuffer(e),s=Buffer.from(r);s.set(this.view),this.buf=r,this.view=s}};rO.ByteStream=tO;tO.BLOCK_SIZE=1024});var nO=_(Vw=>{\"use strict\";Object.defineProperty(Vw,\"__esModule\",{value:!0});Vw.ASN1TypeError=Vw.ASN1ParseError=void 0;var KV=class extends Error{};Vw.ASN1ParseError=KV;var zV=class extends Error{};Vw.ASN1TypeError=zV});var pDe=_(iO=>{\"use strict\";Object.defineProperty(iO,\"__esModule\",{value:!0});iO.decodeLength=YIt;iO.encodeLength=VIt;var ADe=nO();function YIt(t){let e=t.getUint8();if(!(e&128))return e;let r=e&127;if(r>6)throw new ADe.ASN1ParseError(\"length exceeds 6 byte limit\");let s=0;for(let a=0;a<r;a++)s=s*256+t.getUint8();if(s===0)throw new ADe.ASN1ParseError(\"indefinite length encoding not supported\");return s}function VIt(t){if(t<128)return Buffer.from([t]);let e=BigInt(t),r=[];for(;e>0n;)r.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|r.length,...r])}});var gDe=_(Cg=>{\"use strict\";Object.defineProperty(Cg,\"__esModule\",{value:!0});Cg.parseInteger=zIt;Cg.parseStringASCII=hDe;Cg.parseTime=XIt;Cg.parseOID=ZIt;Cg.parseBoolean=$It;Cg.parseBitString=eCt;var JIt=/^(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/,KIt=/^(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/;function zIt(t){let e=0,r=t.length,s=t[e],a=s>127,n=a?255:0;for(;s==n&&++e<r;)s=t[e];if(r-e===0)return BigInt(a?-1:0);s=a?s-256:s;let f=BigInt(s);for(let p=e+1;p<r;++p)f=f*BigInt(256)+BigInt(t[p]);return f}function hDe(t){return t.toString(\"ascii\")}function XIt(t,e){let r=hDe(t),s=e?JIt.exec(r):KIt.exec(r);if(!s)throw new Error(\"invalid time\");if(e){let a=Number(s[1]);a+=a>=50?1900:2e3,s[1]=a.toString()}return new Date(`${s[1]}-${s[2]}-${s[3]}T${s[4]}:${s[5]}:${s[6]}Z`)}function ZIt(t){let e=0,r=t.length,s=t[e++],a=Math.floor(s/40),n=s%40,c=`${a}.${n}`,f=0;for(;e<r;++e)s=t[e],f=(f<<7)+(s&127),s&128||(c+=`.${f}`,f=0);return c}function $It(t){return t[0]!==0}function eCt(t){let e=t[0],r=1,s=t.length,a=[];for(let n=r;n<s;++n){let c=t[n],f=n===s-1?e:0;for(let p=7;p>=f;--p)a.push(c>>p&1)}return a}});var mDe=_(sO=>{\"use strict\";Object.defineProperty(sO,\"__esModule\",{value:!0});sO.ASN1Tag=void 0;var dDe=nO(),ty={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},XV={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},ZV=class{constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new dDe.ASN1ParseError(\"long form tags not supported\");if(this.class===XV.UNIVERSAL&&this.number===0)throw new dDe.ASN1ParseError(\"unsupported tag 0x00\")}isUniversal(){return this.class===XV.UNIVERSAL}isContextSpecific(e){let r=this.class===XV.CONTEXT_SPECIFIC;return e!==void 0?r&&this.number===e:r}isBoolean(){return this.isUniversal()&&this.number===ty.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===ty.INTEGER}isBitString(){return this.isUniversal()&&this.number===ty.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===ty.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===ty.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===ty.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===ty.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};sO.ASN1Tag=ZV});var CDe=_(aO=>{\"use strict\";Object.defineProperty(aO,\"__esModule\",{value:!0});aO.ASN1Obj=void 0;var $V=Cb(),ry=nO(),EDe=pDe(),Jw=gDe(),tCt=mDe(),oO=class{constructor(e,r,s){this.tag=e,this.value=r,this.subs=s}static parseBuffer(e){return IDe(new $V.ByteStream(e))}toDER(){let e=new $V.ByteStream;if(this.subs.length>0)for(let a of this.subs)e.appendView(a.toDER());else e.appendView(this.value);let r=e.buffer,s=new $V.ByteStream;return s.appendChar(this.tag.toDER()),s.appendView((0,EDe.encodeLength)(r.length)),s.appendView(r),s.buffer}toBoolean(){if(!this.tag.isBoolean())throw new ry.ASN1TypeError(\"not a boolean\");return(0,Jw.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new ry.ASN1TypeError(\"not an integer\");return(0,Jw.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new ry.ASN1TypeError(\"not an OID\");return(0,Jw.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,Jw.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,Jw.parseTime)(this.value,!1);default:throw new ry.ASN1TypeError(\"not a date\")}}toBitString(){if(!this.tag.isBitString())throw new ry.ASN1TypeError(\"not a bit string\");return(0,Jw.parseBitString)(this.value)}};aO.ASN1Obj=oO;function IDe(t){let e=new tCt.ASN1Tag(t.getUint8()),r=(0,EDe.decodeLength)(t),s=t.slice(t.position,r),a=t.position,n=[];if(e.constructed)n=yDe(t,r);else if(e.isOctetString())try{n=yDe(t,r)}catch{}return n.length===0&&t.seek(a+r),new oO(e,s,n)}function yDe(t,e){let r=t.position+e;if(r>t.length)throw new ry.ASN1ParseError(\"invalid length\");let s=[];for(;t.position<r;)s.push(IDe(t));if(t.position!==r)throw new ry.ASN1ParseError(\"invalid length\");return s}});var cO=_(lO=>{\"use strict\";Object.defineProperty(lO,\"__esModule\",{value:!0});lO.ASN1Obj=void 0;var rCt=CDe();Object.defineProperty(lO,\"ASN1Obj\",{enumerable:!0,get:function(){return rCt.ASN1Obj}})});var Kw=_(wg=>{\"use strict\";var nCt=wg&&wg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wg,\"__esModule\",{value:!0});wg.createPublicKey=iCt;wg.digest=sCt;wg.verify=oCt;wg.bufferEqual=aCt;var wb=nCt(Ie(\"crypto\"));function iCt(t,e=\"spki\"){return typeof t==\"string\"?wb.default.createPublicKey(t):wb.default.createPublicKey({key:t,format:\"der\",type:e})}function sCt(t,...e){let r=wb.default.createHash(t);for(let s of e)r.update(s);return r.digest()}function oCt(t,e,r,s){try{return wb.default.verify(s,t,e,r)}catch{return!1}}function aCt(t,e){try{return wb.default.timingSafeEqual(t,e)}catch{return!1}}});var wDe=_(e7=>{\"use strict\";Object.defineProperty(e7,\"__esModule\",{value:!0});e7.preAuthEncoding=cCt;var lCt=\"DSSEv1\";function cCt(t,e){let r=[lCt,t.length,t,e.length,\"\"].join(\" \");return Buffer.concat([Buffer.from(r,\"ascii\"),e])}});var SDe=_(uO=>{\"use strict\";Object.defineProperty(uO,\"__esModule\",{value:!0});uO.base64Encode=uCt;uO.base64Decode=fCt;var BDe=\"base64\",vDe=\"utf-8\";function uCt(t){return Buffer.from(t,vDe).toString(BDe)}function fCt(t){return Buffer.from(t,BDe).toString(vDe)}});var DDe=_(r7=>{\"use strict\";Object.defineProperty(r7,\"__esModule\",{value:!0});r7.canonicalize=t7;function t7(t){let e=\"\";if(t===null||typeof t!=\"object\"||t.toJSON!=null)e+=JSON.stringify(t);else if(Array.isArray(t)){e+=\"[\";let r=!0;t.forEach(s=>{r||(e+=\",\"),r=!1,e+=t7(s)}),e+=\"]\"}else{e+=\"{\";let r=!0;Object.keys(t).sort().forEach(s=>{r||(e+=\",\"),r=!1,e+=JSON.stringify(s),e+=\":\",e+=t7(t[s])}),e+=\"}\"}return e}});var n7=_(fO=>{\"use strict\";Object.defineProperty(fO,\"__esModule\",{value:!0});fO.toDER=hCt;fO.fromDER=gCt;var ACt=/-----BEGIN (.*)-----/,pCt=/-----END (.*)-----/;function hCt(t){let e=\"\";return t.split(`\n`).forEach(r=>{r.match(ACt)||r.match(pCt)||(e+=r)}),Buffer.from(e,\"base64\")}function gCt(t,e=\"CERTIFICATE\"){let s=t.toString(\"base64\").match(/.{1,64}/g)||\"\";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`\n`).concat(`\n`)}});var AO=_(zw=>{\"use strict\";Object.defineProperty(zw,\"__esModule\",{value:!0});zw.SHA2_HASH_ALGOS=zw.ECDSA_SIGNATURE_ALGOS=void 0;zw.ECDSA_SIGNATURE_ALGOS={\"1.2.840.10045.4.3.1\":\"sha224\",\"1.2.840.10045.4.3.2\":\"sha256\",\"1.2.840.10045.4.3.3\":\"sha384\",\"1.2.840.10045.4.3.4\":\"sha512\"};zw.SHA2_HASH_ALGOS={\"2.16.840.1.101.3.4.2.1\":\"sha256\",\"2.16.840.1.101.3.4.2.2\":\"sha384\",\"2.16.840.1.101.3.4.2.3\":\"sha512\"}});var s7=_(pO=>{\"use strict\";Object.defineProperty(pO,\"__esModule\",{value:!0});pO.RFC3161TimestampVerificationError=void 0;var i7=class extends Error{};pO.RFC3161TimestampVerificationError=i7});var PDe=_(vA=>{\"use strict\";var dCt=vA&&vA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),mCt=vA&&vA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yCt=vA&&vA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&dCt(e,t,r);return mCt(e,t),e};Object.defineProperty(vA,\"__esModule\",{value:!0});vA.TSTInfo=void 0;var bDe=yCt(Kw()),ECt=AO(),ICt=s7(),o7=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return ECt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=bDe.digest(this.messageImprintHashAlgorithm,e);if(!bDe.bufferEqual(r,this.messageImprintHashedMessage))throw new ICt.RFC3161TimestampVerificationError(\"message imprint does not match artifact\")}get messageImprintObj(){return this.root.subs[2]}};vA.TSTInfo=o7});var kDe=_(SA=>{\"use strict\";var CCt=SA&&SA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),wCt=SA&&SA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BCt=SA&&SA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&CCt(e,t,r);return wCt(e,t),e};Object.defineProperty(SA,\"__esModule\",{value:!0});SA.RFC3161Timestamp=void 0;var vCt=cO(),a7=BCt(Kw()),xDe=AO(),Bb=s7(),SCt=PDe(),DCt=\"1.2.840.113549.1.7.2\",bCt=\"1.2.840.113549.1.9.16.1.4\",PCt=\"1.2.840.113549.1.9.4\",l7=class t{constructor(e){this.root=e}static parse(e){let r=vCt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return xDe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return xDe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new SCt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Bb.RFC3161TimestampVerificationError(\"timeStampToken is missing\");if(this.contentType!==DCt)throw new Bb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==bCt)throw new Bb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=a7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!a7.bufferEqual(e,r))throw new Bb.RFC3161TimestampVerificationError(\"signed data does not match tstInfo\")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!a7.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Bb.RFC3161TimestampVerificationError(\"signature verification failed\")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(r=>r.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(r=>r.subs[0].tag.isOID()&&r.subs[0].toOID()===PCt)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};SA.RFC3161Timestamp=l7});var QDe=_(hO=>{\"use strict\";Object.defineProperty(hO,\"__esModule\",{value:!0});hO.RFC3161Timestamp=void 0;var xCt=kDe();Object.defineProperty(hO,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return xCt.RFC3161Timestamp}})});var RDe=_(DA=>{\"use strict\";var kCt=DA&&DA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),QCt=DA&&DA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TCt=DA&&DA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&kCt(e,t,r);return QCt(e,t),e};Object.defineProperty(DA,\"__esModule\",{value:!0});DA.SignedCertificateTimestamp=void 0;var RCt=TCt(Kw()),TDe=Cb(),c7=class t{constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return\"none\";case 1:return\"md5\";case 2:return\"sha1\";case 3:return\"sha224\";case 4:return\"sha256\";case 5:return\"sha384\";case 6:return\"sha512\";default:return\"unknown\"}}verify(e,r){let s=new TDe.ByteStream;return s.appendChar(this.version),s.appendChar(0),s.appendView(this.timestamp),s.appendUint16(1),s.appendView(e),s.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&s.appendView(this.extensions),RCt.verify(s.buffer,r,this.signature,this.algorithm)}static parse(e){let r=new TDe.ByteStream(e),s=r.getUint8(),a=r.getBlock(32),n=r.getBlock(8),c=r.getUint16(),f=r.getBlock(c),p=r.getUint8(),h=r.getUint8(),E=r.getUint16(),C=r.getBlock(E);if(r.position!==e.length)throw new Error(\"SCT buffer length mismatch\");return new t({version:s,logID:a,timestamp:n,extensions:f,hashAlgorithm:p,signatureAlgorithm:h,signature:C})}};DA.SignedCertificateTimestamp=c7});var d7=_(sa=>{\"use strict\";Object.defineProperty(sa,\"__esModule\",{value:!0});sa.X509SCTExtension=sa.X509SubjectKeyIDExtension=sa.X509AuthorityKeyIDExtension=sa.X509SubjectAlternativeNameExtension=sa.X509KeyUsageExtension=sa.X509BasicConstraintsExtension=sa.X509Extension=void 0;var FCt=Cb(),NCt=RDe(),ph=class{constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};sa.X509Extension=ph;var u7=class extends ph{get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};sa.X509BasicConstraintsExtension=u7;var f7=class extends ph{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};sa.X509KeyUsageExtension=f7;var A7=class extends ph{get rfc822Name(){return this.findGeneralName(1)?.value.toString(\"ascii\")}get uri(){return this.findGeneralName(6)?.value.toString(\"ascii\")}otherName(e){let r=this.findGeneralName(0);return r===void 0||r.subs[0].toOID()!==e?void 0:r.subs[1].subs[0].value.toString(\"ascii\")}findGeneralName(e){return this.generalNames.find(r=>r.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};sa.X509SubjectAlternativeNameExtension=A7;var p7=class extends ph{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(r=>r.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};sa.X509AuthorityKeyIDExtension=p7;var h7=class extends ph{get keyIdentifier(){return this.extnValueObj.subs[0].value}};sa.X509SubjectKeyIDExtension=h7;var g7=class extends ph{constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,r=new FCt.ByteStream(e),s=r.getUint16()+2,a=[];for(;r.position<s;){let n=r.getUint16(),c=r.getBlock(n);a.push(NCt.SignedCertificateTimestamp.parse(c))}if(r.position!==s)throw new Error(\"SCT list length does not match actual length\");return a}};sa.X509SCTExtension=g7});var ODe=_(ic=>{\"use strict\";var OCt=ic&&ic.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),LCt=ic&&ic.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NDe=ic&&ic.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&OCt(e,t,r);return LCt(e,t),e};Object.defineProperty(ic,\"__esModule\",{value:!0});ic.X509Certificate=ic.EXTENSION_OID_SCT=void 0;var MCt=cO(),FDe=NDe(Kw()),UCt=AO(),_Ct=NDe(n7()),ny=d7(),HCt=\"2.5.29.14\",jCt=\"2.5.29.15\",GCt=\"2.5.29.17\",qCt=\"2.5.29.19\",WCt=\"2.5.29.35\";ic.EXTENSION_OID_SCT=\"1.3.6.1.4.1.11129.2.4.2\";var m7=class t{constructor(e){this.root=e}static parse(e){let r=typeof e==\"string\"?_Ct.toDER(e):e,s=MCt.ASN1Obj.parseBuffer(r);return new t(s)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return UCt.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(jCt);return e?new ny.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(qCt);return e?new ny.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(GCt);return e?new ny.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(WCt);return e?new ny.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(HCt);return e?new ny.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(ic.EXTENSION_OID_SCT);return e?new ny.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let r=this.findExtension(e);return r?new ny.X509Extension(r):void 0}verify(e){let r=e?.publicKey||this.publicKey,s=FDe.createPublicKey(r);return FDe.verify(this.tbsCertificate.toDER(),s,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),r=Buffer.alloc(e.length);return e.copy(r),t.parse(r)}findExtension(e){return this.extensions.find(r=>r.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};ic.X509Certificate=m7});var MDe=_(Bg=>{\"use strict\";Object.defineProperty(Bg,\"__esModule\",{value:!0});Bg.X509SCTExtension=Bg.X509Certificate=Bg.EXTENSION_OID_SCT=void 0;var LDe=ODe();Object.defineProperty(Bg,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return LDe.EXTENSION_OID_SCT}});Object.defineProperty(Bg,\"X509Certificate\",{enumerable:!0,get:function(){return LDe.X509Certificate}});var YCt=d7();Object.defineProperty(Bg,\"X509SCTExtension\",{enumerable:!0,get:function(){return YCt.X509SCTExtension}})});var Cl=_(Jn=>{\"use strict\";var VCt=Jn&&Jn.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),JCt=Jn&&Jn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vb=Jn&&Jn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&VCt(e,t,r);return JCt(e,t),e};Object.defineProperty(Jn,\"__esModule\",{value:!0});Jn.X509SCTExtension=Jn.X509Certificate=Jn.EXTENSION_OID_SCT=Jn.ByteStream=Jn.RFC3161Timestamp=Jn.pem=Jn.json=Jn.encoding=Jn.dsse=Jn.crypto=Jn.ASN1Obj=void 0;var KCt=cO();Object.defineProperty(Jn,\"ASN1Obj\",{enumerable:!0,get:function(){return KCt.ASN1Obj}});Jn.crypto=vb(Kw());Jn.dsse=vb(wDe());Jn.encoding=vb(SDe());Jn.json=vb(DDe());Jn.pem=vb(n7());var zCt=QDe();Object.defineProperty(Jn,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return zCt.RFC3161Timestamp}});var XCt=Cb();Object.defineProperty(Jn,\"ByteStream\",{enumerable:!0,get:function(){return XCt.ByteStream}});var y7=MDe();Object.defineProperty(Jn,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return y7.EXTENSION_OID_SCT}});Object.defineProperty(Jn,\"X509Certificate\",{enumerable:!0,get:function(){return y7.X509Certificate}});Object.defineProperty(Jn,\"X509SCTExtension\",{enumerable:!0,get:function(){return y7.X509SCTExtension}})});var UDe=_(E7=>{\"use strict\";Object.defineProperty(E7,\"__esModule\",{value:!0});E7.extractJWTSubject=$Ct;var ZCt=Cl();function $Ct(t){let e=t.split(\".\",3),r=JSON.parse(ZCt.encoding.base64Decode(e[1]));switch(r.iss){case\"https://accounts.google.com\":case\"https://oauth2.sigstore.dev/auth\":return r.email;default:return r.sub}}});var _De=_((dnr,ewt)=>{ewt.exports={name:\"@sigstore/sign\",version:\"3.1.0\",description:\"Sigstore signing library\",main:\"dist/index.js\",types:\"dist/index.d.ts\",scripts:{clean:\"shx rm -rf dist *.tsbuildinfo\",build:\"tsc --build\",test:\"jest\"},files:[\"dist\"],author:\"bdehamer@github.com\",license:\"Apache-2.0\",repository:{type:\"git\",url:\"git+https://github.com/sigstore/sigstore-js.git\"},bugs:{url:\"https://github.com/sigstore/sigstore-js/issues\"},homepage:\"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme\",publishConfig:{provenance:!0},devDependencies:{\"@sigstore/jest\":\"^0.0.0\",\"@sigstore/mock\":\"^0.10.0\",\"@sigstore/rekor-types\":\"^3.0.0\",\"@types/make-fetch-happen\":\"^10.0.4\",\"@types/promise-retry\":\"^1.1.6\"},dependencies:{\"@sigstore/bundle\":\"^3.1.0\",\"@sigstore/core\":\"^2.0.0\",\"@sigstore/protobuf-specs\":\"^0.4.0\",\"make-fetch-happen\":\"^14.0.2\",\"proc-log\":\"^5.0.0\",\"promise-retry\":\"^2.0.1\"},engines:{node:\"^18.17.0 || >=20.5.0\"}}});var jDe=_(Xw=>{\"use strict\";var twt=Xw&&Xw.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xw,\"__esModule\",{value:!0});Xw.getUserAgent=void 0;var HDe=twt(Ie(\"os\")),rwt=()=>{let t=_De().version,e=process.version,r=HDe.default.platform(),s=HDe.default.arch();return`sigstore-js/${t} (Node ${e}) (${r}/${s})`};Xw.getUserAgent=rwt});var vg=_(Ji=>{\"use strict\";var nwt=Ji&&Ji.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),iwt=Ji&&Ji.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GDe=Ji&&Ji.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&nwt(r,e,s[a]);return iwt(r,e),r}}();Object.defineProperty(Ji,\"__esModule\",{value:!0});Ji.ua=Ji.oidc=Ji.pem=Ji.json=Ji.encoding=Ji.dsse=Ji.crypto=void 0;var Sb=Cl();Object.defineProperty(Ji,\"crypto\",{enumerable:!0,get:function(){return Sb.crypto}});Object.defineProperty(Ji,\"dsse\",{enumerable:!0,get:function(){return Sb.dsse}});Object.defineProperty(Ji,\"encoding\",{enumerable:!0,get:function(){return Sb.encoding}});Object.defineProperty(Ji,\"json\",{enumerable:!0,get:function(){return Sb.json}});Object.defineProperty(Ji,\"pem\",{enumerable:!0,get:function(){return Sb.pem}});Ji.oidc=GDe(UDe());Ji.ua=GDe(jDe())});var C7=_(gO=>{\"use strict\";Object.defineProperty(gO,\"__esModule\",{value:!0});gO.BaseBundleBuilder=void 0;var I7=class{constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let r=await this.prepare(e).then(f=>this.signer.sign(f)),s=await this.package(e,r),a=await Promise.all(this.witnesses.map(f=>f.testify(s.content,swt(r.key)))),n=[],c=[];return a.forEach(({tlogEntries:f,rfc3161Timestamps:p})=>{n.push(...f??[]),c.push(...p??[])}),s.verificationMaterial.tlogEntries=n,s.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c},s}async prepare(e){return e.data}};gO.BaseBundleBuilder=I7;function swt(t){switch(t.$case){case\"publicKey\":return t.publicKey;case\"x509Certificate\":return t.certificate}}});var B7=_(bA=>{\"use strict\";var owt=bA&&bA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),awt=bA&&bA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lwt=bA&&bA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&owt(r,e,s[a]);return awt(r,e),r}}();Object.defineProperty(bA,\"__esModule\",{value:!0});bA.toMessageSignatureBundle=cwt;bA.toDSSEBundle=uwt;var qDe=lwt(Ib()),w7=vg();function cwt(t,e){let r=w7.crypto.digest(\"sha256\",t.data);return qDe.toMessageSignatureBundle({digest:r,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?w7.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:!0})}function uwt(t,e,r){return qDe.toDSSEBundle({artifact:t.data,artifactType:t.type,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?w7.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:r})}});var YDe=_(dO=>{\"use strict\";Object.defineProperty(dO,\"__esModule\",{value:!0});dO.DSSEBundleBuilder=void 0;var fwt=vg(),Awt=C7(),pwt=B7(),v7=class extends Awt.BaseBundleBuilder{constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let r=WDe(e);return fwt.dsse.preAuthEncoding(r.type,r.data)}async package(e,r){return(0,pwt.toDSSEBundle)(WDe(e),r,this.certificateChain)}};dO.DSSEBundleBuilder=v7;function WDe(t){return{...t,type:t.type??\"\"}}});var VDe=_(mO=>{\"use strict\";Object.defineProperty(mO,\"__esModule\",{value:!0});mO.MessageSignatureBundleBuilder=void 0;var hwt=C7(),gwt=B7(),S7=class extends hwt.BaseBundleBuilder{constructor(e){super(e)}async package(e,r){return(0,gwt.toMessageSignatureBundle)(e,r)}};mO.MessageSignatureBundleBuilder=S7});var JDe=_(Zw=>{\"use strict\";Object.defineProperty(Zw,\"__esModule\",{value:!0});Zw.MessageSignatureBundleBuilder=Zw.DSSEBundleBuilder=void 0;var dwt=YDe();Object.defineProperty(Zw,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return dwt.DSSEBundleBuilder}});var mwt=VDe();Object.defineProperty(Zw,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return mwt.MessageSignatureBundleBuilder}})});var EO=_(yO=>{\"use strict\";Object.defineProperty(yO,\"__esModule\",{value:!0});yO.HTTPError=void 0;var D7=class extends Error{constructor({status:e,message:r,location:s}){super(`(${e}) ${r}`),this.statusCode=e,this.location=s}};yO.HTTPError=D7});var $w=_(Db=>{\"use strict\";Object.defineProperty(Db,\"__esModule\",{value:!0});Db.InternalError=void 0;Db.internalError=Ewt;var ywt=EO(),IO=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.name=this.constructor.name,this.cause=s,this.code=e}};Db.InternalError=IO;function Ewt(t,e,r){throw t instanceof ywt.HTTPError&&(r+=` - ${t.message}`),new IO({code:e,message:r,cause:t})}});var CO=_((Dnr,KDe)=>{KDe.exports=fetch});var zDe=_(e1=>{\"use strict\";var Iwt=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,\"__esModule\",{value:!0});e1.CIContextProvider=void 0;var Cwt=Iwt(CO()),wwt=[Bwt,vwt],b7=class{constructor(e=\"sigstore\"){this.audience=e}async getToken(){return Promise.any(wwt.map(e=>e(this.audience))).catch(()=>Promise.reject(\"CI: no tokens available\"))}};e1.CIContextProvider=b7;async function Bwt(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject(\"no token available\");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append(\"audience\",t),(await(0,Cwt.default)(e.href,{retry:2,headers:{Accept:\"application/json\",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(s=>s.value)}async function vwt(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject(\"no token available\")}});var XDe=_(wO=>{\"use strict\";Object.defineProperty(wO,\"__esModule\",{value:!0});wO.CIContextProvider=void 0;var Swt=zDe();Object.defineProperty(wO,\"CIContextProvider\",{enumerable:!0,get:function(){return Swt.CIContextProvider}})});var $De=_((xnr,ZDe)=>{var Dwt=Symbol(\"proc-log.meta\");ZDe.exports={META:Dwt,output:{LEVELS:[\"standard\",\"error\",\"buffer\",\"flush\"],KEYS:{standard:\"standard\",error:\"error\",buffer:\"buffer\",flush:\"flush\"},standard:function(...t){return process.emit(\"output\",\"standard\",...t)},error:function(...t){return process.emit(\"output\",\"error\",...t)},buffer:function(...t){return process.emit(\"output\",\"buffer\",...t)},flush:function(...t){return process.emit(\"output\",\"flush\",...t)}},log:{LEVELS:[\"notice\",\"error\",\"warn\",\"info\",\"verbose\",\"http\",\"silly\",\"timing\",\"pause\",\"resume\"],KEYS:{notice:\"notice\",error:\"error\",warn:\"warn\",info:\"info\",verbose:\"verbose\",http:\"http\",silly:\"silly\",timing:\"timing\",pause:\"pause\",resume:\"resume\"},error:function(...t){return process.emit(\"log\",\"error\",...t)},notice:function(...t){return process.emit(\"log\",\"notice\",...t)},warn:function(...t){return process.emit(\"log\",\"warn\",...t)},info:function(...t){return process.emit(\"log\",\"info\",...t)},verbose:function(...t){return process.emit(\"log\",\"verbose\",...t)},http:function(...t){return process.emit(\"log\",\"http\",...t)},silly:function(...t){return process.emit(\"log\",\"silly\",...t)},timing:function(...t){return process.emit(\"log\",\"timing\",...t)},pause:function(){return process.emit(\"log\",\"pause\")},resume:function(){return process.emit(\"log\",\"resume\")}},time:{LEVELS:[\"start\",\"end\"],KEYS:{start:\"start\",end:\"end\"},start:function(t,e){process.emit(\"time\",\"start\",t);function r(){return process.emit(\"time\",\"end\",t)}if(typeof e==\"function\"){let s=e();return s&&s.finally?s.finally(r):(r(),s)}return r},end:function(t){return process.emit(\"time\",\"end\",t)}},input:{LEVELS:[\"start\",\"end\",\"read\"],KEYS:{start:\"start\",end:\"end\",read:\"read\"},start:function(t){process.emit(\"input\",\"start\");function e(){return process.emit(\"input\",\"end\")}if(typeof t==\"function\"){let r=t();return r&&r.finally?r.finally(e):(e(),r)}return e},end:function(){return process.emit(\"input\",\"end\")},read:function(...t){let e,r,s=new Promise((a,n)=>{e=a,r=n});return process.emit(\"input\",\"read\",e,r,...t),s}}}});var rbe=_((knr,tbe)=>{\"use strict\";function ebe(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function bwt(t,e,r){if(!t||typeof t==\"string\")throw new TypeError(\"Please pass an Error to err-code\");r||(r={}),typeof e==\"object\"&&(r=e,e=void 0),e!=null&&(r.code=e);try{return ebe(t,r)}catch{r.message=t.message,r.stack=t.stack;let a=function(){};return a.prototype=Object.create(Object.getPrototypeOf(t)),ebe(new a,r)}}tbe.exports=bwt});var ibe=_((Qnr,nbe)=>{function $c(t,e){typeof e==\"boolean\"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}nbe.exports=$c;$c.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};$c.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};$c.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error(\"RetryOperation timeout occurred\")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var s=this,a=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},r);return this._options.unref&&a.unref(),!0};$c.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};$c.prototype.try=function(t){console.log(\"Using RetryOperation.try() is deprecated\"),this.attempt(t)};$c.prototype.start=function(t){console.log(\"Using RetryOperation.start() is deprecated\"),this.attempt(t)};$c.prototype.start=$c.prototype.try;$c.prototype.errors=function(){return this._errors};$c.prototype.attempts=function(){return this._attempts};$c.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,s=0;s<this._errors.length;s++){var a=this._errors[s],n=a.message,c=(t[n]||0)+1;t[n]=c,c>=r&&(e=a,r=c)}return e}});var sbe=_(iy=>{var Pwt=ibe();iy.operation=function(t){var e=iy.timeouts(t);return new Pwt(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};iy.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error(\"minTimeout is greater than maxTimeout\");for(var s=[],a=0;a<e.retries;a++)s.push(this.createTimeout(a,e));return t&&t.forever&&!s.length&&s.push(this.createTimeout(a,e)),s.sort(function(n,c){return n-c}),s};iy.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,s=Math.round(r*e.minTimeout*Math.pow(e.factor,t));return s=Math.min(s,e.maxTimeout),s};iy.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var s in t)typeof t[s]==\"function\"&&r.push(s)}for(var a=0;a<r.length;a++){var n=r[a],c=t[n];t[n]=function(p){var h=iy.operation(e),E=Array.prototype.slice.call(arguments,1),C=E.pop();E.push(function(S){h.retry(S)||(S&&(arguments[0]=h.mainError()),C.apply(this,arguments))}),h.attempt(function(){p.apply(t,E)})}.bind(t,c),t[n].options=e}}});var abe=_((Rnr,obe)=>{obe.exports=sbe()});var ube=_((Fnr,cbe)=>{\"use strict\";var xwt=rbe(),kwt=abe(),Qwt=Object.prototype.hasOwnProperty;function lbe(t){return t&&t.code===\"EPROMISERETRY\"&&Qwt.call(t,\"retried\")}function Twt(t,e){var r,s;return typeof t==\"object\"&&typeof e==\"function\"&&(r=e,e=t,t=r),s=kwt.operation(e),new Promise(function(a,n){s.attempt(function(c){Promise.resolve().then(function(){return t(function(f){throw lbe(f)&&(f=f.retried),xwt(new Error(\"Retrying\"),\"EPROMISERETRY\",{retried:f})},c)}).then(a,function(f){lbe(f)&&(f=f.retried,s.retry(f||new Error))||n(f)})})})}cbe.exports=Twt});var BO=_(bb=>{\"use strict\";var Abe=bb&&bb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bb,\"__esModule\",{value:!0});bb.fetchWithRetry=qwt;var Rwt=Ie(\"http2\"),Fwt=Abe(CO()),fbe=$De(),Nwt=Abe(ube()),Owt=vg(),Lwt=EO(),{HTTP2_HEADER_LOCATION:Mwt,HTTP2_HEADER_CONTENT_TYPE:Uwt,HTTP2_HEADER_USER_AGENT:_wt,HTTP_STATUS_INTERNAL_SERVER_ERROR:Hwt,HTTP_STATUS_TOO_MANY_REQUESTS:jwt,HTTP_STATUS_REQUEST_TIMEOUT:Gwt}=Rwt.constants;async function qwt(t,e){return(0,Nwt.default)(async(r,s)=>{let a=e.method||\"POST\",n={[_wt]:Owt.ua.getUserAgent(),...e.headers},c=await(0,Fwt.default)(t,{method:a,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(f=>(fbe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${f}`),r(f)));if(c.ok)return c;{let f=await Wwt(c);if(fbe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${c.status}`),Ywt(c.status))return r(f);throw f}},Vwt(e.retry))}var Wwt=async t=>{let e=t.statusText,r=t.headers.get(Mwt)||void 0;if(t.headers.get(Uwt)?.includes(\"application/json\"))try{e=(await t.json()).message||e}catch{}return new Lwt.HTTPError({status:t.status,message:e,location:r})},Ywt=t=>[Gwt,jwt].includes(t)||t>=Hwt,Vwt=t=>typeof t==\"boolean\"?{retries:t?1:0}:typeof t==\"number\"?{retries:t}:{retries:0,...t}});var pbe=_(vO=>{\"use strict\";Object.defineProperty(vO,\"__esModule\",{value:!0});vO.Fulcio=void 0;var Jwt=BO(),P7=class{constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:r,retry:s,timeout:a}=this.options,n=`${r}/api/v2/signingCert`;return(await(0,Jwt.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:a,retry:s})).json()}};vO.Fulcio=P7});var hbe=_(SO=>{\"use strict\";Object.defineProperty(SO,\"__esModule\",{value:!0});SO.CAClient=void 0;var Kwt=$w(),zwt=pbe(),x7=class{constructor(e){this.fulcio=new zwt.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,r,s){let a=Xwt(e,r,s);try{let n=await this.fulcio.createSigningCertificate(a);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,Kwt.internalError)(n,\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",\"error creating signing certificate\")}}};SO.CAClient=x7;function Xwt(t,e,r){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:\"ECDSA\",content:e},proofOfPossession:r.toString(\"base64\")}}}});var dbe=_(t1=>{\"use strict\";var Zwt=t1&&t1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t1,\"__esModule\",{value:!0});t1.EphemeralSigner=void 0;var gbe=Zwt(Ie(\"crypto\")),$wt=\"ec\",e1t=\"P-256\",k7=class{constructor(){this.keypair=gbe.default.generateKeyPairSync($wt,{namedCurve:e1t})}async sign(e){let r=gbe.default.sign(null,e,this.keypair.privateKey),s=this.keypair.publicKey.export({format:\"pem\",type:\"spki\"}).toString(\"ascii\");return{signature:r,key:{$case:\"publicKey\",publicKey:s}}}};t1.EphemeralSigner=k7});var mbe=_(sy=>{\"use strict\";Object.defineProperty(sy,\"__esModule\",{value:!0});sy.FulcioSigner=sy.DEFAULT_FULCIO_URL=void 0;var Q7=$w(),t1t=vg(),r1t=hbe(),n1t=dbe();sy.DEFAULT_FULCIO_URL=\"https://fulcio.sigstore.dev\";var T7=class{constructor(e){this.ca=new r1t.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||sy.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new n1t.EphemeralSigner}async sign(e){let r=await this.getIdentityToken(),s;try{s=t1t.oidc.extractJWTSubject(r)}catch(f){throw new Q7.InternalError({code:\"IDENTITY_TOKEN_PARSE_ERROR\",message:`invalid identity token: ${r}`,cause:f})}let a=await this.keyHolder.sign(Buffer.from(s));if(a.key.$case!==\"publicKey\")throw new Q7.InternalError({code:\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",message:\"unexpected format for signing key\"});let n=await this.ca.createSigningCertificate(r,a.key.publicKey,a.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:\"x509Certificate\",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new Q7.InternalError({code:\"IDENTITY_TOKEN_READ_ERROR\",message:\"error retrieving identity token\",cause:e})}}};sy.FulcioSigner=T7});var Ebe=_(r1=>{\"use strict\";Object.defineProperty(r1,\"__esModule\",{value:!0});r1.FulcioSigner=r1.DEFAULT_FULCIO_URL=void 0;var ybe=mbe();Object.defineProperty(r1,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return ybe.DEFAULT_FULCIO_URL}});Object.defineProperty(r1,\"FulcioSigner\",{enumerable:!0,get:function(){return ybe.FulcioSigner}})});var wbe=_(DO=>{\"use strict\";Object.defineProperty(DO,\"__esModule\",{value:!0});DO.Rekor=void 0;var Ibe=BO(),R7=class{constructor(e){this.options=e}async createEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries`,f=await(await(0,Ibe.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).json();return Cbe(f)}async getEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries/${e}`,f=await(await(0,Ibe.fetchWithRetry)(n,{method:\"GET\",headers:{Accept:\"application/json\"},timeout:s,retry:a})).json();return Cbe(f)}};DO.Rekor=R7;function Cbe(t){let e=Object.entries(t);if(e.length!=1)throw new Error(\"Received multiple entries in Rekor response\");let[r,s]=e[0];return{...s,uuid:r}}});var vbe=_(bO=>{\"use strict\";Object.defineProperty(bO,\"__esModule\",{value:!0});bO.TLogClient=void 0;var Bbe=$w(),i1t=EO(),s1t=wbe(),F7=class{constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new s1t.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let r;try{r=await this.rekor.createEntry(e)}catch(s){if(o1t(s)&&this.fetchOnConflict){let a=s.location.split(\"/\").pop()||\"\";try{r=await this.rekor.getEntry(a)}catch(n){(0,Bbe.internalError)(n,\"TLOG_FETCH_ENTRY_ERROR\",\"error fetching tlog entry\")}}else(0,Bbe.internalError)(s,\"TLOG_CREATE_ENTRY_ERROR\",\"error creating tlog entry\")}return r}};bO.TLogClient=F7;function o1t(t){return t instanceof i1t.HTTPError&&t.statusCode===409&&t.location!==void 0}});var Sbe=_(N7=>{\"use strict\";Object.defineProperty(N7,\"__esModule\",{value:!0});N7.toProposedEntry=l1t;var a1t=Ib(),Sg=vg(),Pb=\"sha256\";function l1t(t,e,r=\"dsse\"){switch(t.$case){case\"dsseEnvelope\":return r===\"intoto\"?f1t(t.dsseEnvelope,e):u1t(t.dsseEnvelope,e);case\"messageSignature\":return c1t(t.messageSignature,e)}}function c1t(t,e){let r=t.messageDigest.digest.toString(\"hex\"),s=t.signature.toString(\"base64\"),a=Sg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"hashedrekord\",spec:{data:{hash:{algorithm:Pb,value:r}},signature:{content:s,publicKey:{content:a}}}}}function u1t(t,e){let r=JSON.stringify((0,a1t.envelopeToJSON)(t)),s=Sg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"dsse\",spec:{proposedContent:{envelope:r,verifiers:[s]}}}}function f1t(t,e){let r=Sg.crypto.digest(Pb,t.payload).toString(\"hex\"),s=A1t(t,e),a=Sg.encoding.base64Encode(t.payload.toString(\"base64\")),n=Sg.encoding.base64Encode(t.signatures[0].sig.toString(\"base64\")),c=t.signatures[0].keyid,f=Sg.encoding.base64Encode(e),p={payloadType:t.payloadType,payload:a,signatures:[{sig:n,publicKey:f}]};return c.length>0&&(p.signatures[0].keyid=c),{apiVersion:\"0.0.2\",kind:\"intoto\",spec:{content:{envelope:p,hash:{algorithm:Pb,value:s},payloadHash:{algorithm:Pb,value:r}}}}}function A1t(t,e){let r={payloadType:t.payloadType,payload:t.payload.toString(\"base64\"),signatures:[{sig:t.signatures[0].sig.toString(\"base64\"),publicKey:e}]};return t.signatures[0].keyid.length>0&&(r.signatures[0].keyid=t.signatures[0].keyid),Sg.crypto.digest(Pb,Sg.json.canonicalize(r)).toString(\"hex\")}});var Dbe=_(oy=>{\"use strict\";Object.defineProperty(oy,\"__esModule\",{value:!0});oy.RekorWitness=oy.DEFAULT_REKOR_URL=void 0;var p1t=vg(),h1t=vbe(),g1t=Sbe();oy.DEFAULT_REKOR_URL=\"https://rekor.sigstore.dev\";var O7=class{constructor(e){this.entryType=e.entryType,this.tlog=new h1t.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||oy.DEFAULT_REKOR_URL})}async testify(e,r){let s=(0,g1t.toProposedEntry)(e,r,this.entryType),a=await this.tlog.createEntry(s);return d1t(a)}};oy.RekorWitness=O7;function d1t(t){let e=Buffer.from(t.logID,\"hex\"),r=p1t.encoding.base64Decode(t.body),s=JSON.parse(r),a=t?.verification?.signedEntryTimestamp?m1t(t.verification.signedEntryTimestamp):void 0,n=t?.verification?.inclusionProof?y1t(t.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:t.logIndex.toString(),logId:{keyId:e},integratedTime:t.integratedTime.toString(),kindVersion:{kind:s.kind,version:s.apiVersion},inclusionPromise:a,inclusionProof:n,canonicalizedBody:Buffer.from(t.body,\"base64\")}]}}function m1t(t){return{signedEntryTimestamp:Buffer.from(t,\"base64\")}}function y1t(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,\"hex\"),hashes:t.hashes.map(e=>Buffer.from(e,\"hex\")),checkpoint:{envelope:t.checkpoint}}}});var bbe=_(PO=>{\"use strict\";Object.defineProperty(PO,\"__esModule\",{value:!0});PO.TimestampAuthority=void 0;var E1t=BO(),L7=class{constructor(e){this.options=e}async createTimestamp(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/timestamp`;return(await(0,E1t.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).buffer()}};PO.TimestampAuthority=L7});var xbe=_(xO=>{\"use strict\";Object.defineProperty(xO,\"__esModule\",{value:!0});xO.TSAClient=void 0;var I1t=$w(),C1t=bbe(),w1t=vg(),Pbe=\"sha256\",M7=class{constructor(e){this.tsa=new C1t.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let r={artifactHash:w1t.crypto.digest(Pbe,e).toString(\"base64\"),hashAlgorithm:Pbe};try{return await this.tsa.createTimestamp(r)}catch(s){(0,I1t.internalError)(s,\"TSA_CREATE_TIMESTAMP_ERROR\",\"error creating timestamp\")}}};xO.TSAClient=M7});var kbe=_(kO=>{\"use strict\";Object.defineProperty(kO,\"__esModule\",{value:!0});kO.TSAWitness=void 0;var B1t=xbe(),U7=class{constructor(e){this.tsa=new B1t.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let r=v1t(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(r)}]}}};kO.TSAWitness=U7;function v1t(t){switch(t.$case){case\"dsseEnvelope\":return t.dsseEnvelope.signatures[0].sig;case\"messageSignature\":return t.messageSignature.signature}}});var Tbe=_(Dg=>{\"use strict\";Object.defineProperty(Dg,\"__esModule\",{value:!0});Dg.TSAWitness=Dg.RekorWitness=Dg.DEFAULT_REKOR_URL=void 0;var Qbe=Dbe();Object.defineProperty(Dg,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return Qbe.DEFAULT_REKOR_URL}});Object.defineProperty(Dg,\"RekorWitness\",{enumerable:!0,get:function(){return Qbe.RekorWitness}});var S1t=kbe();Object.defineProperty(Dg,\"TSAWitness\",{enumerable:!0,get:function(){return S1t.TSAWitness}})});var H7=_(ys=>{\"use strict\";Object.defineProperty(ys,\"__esModule\",{value:!0});ys.TSAWitness=ys.RekorWitness=ys.DEFAULT_REKOR_URL=ys.FulcioSigner=ys.DEFAULT_FULCIO_URL=ys.CIContextProvider=ys.InternalError=ys.MessageSignatureBundleBuilder=ys.DSSEBundleBuilder=void 0;var Rbe=JDe();Object.defineProperty(ys,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return Rbe.DSSEBundleBuilder}});Object.defineProperty(ys,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return Rbe.MessageSignatureBundleBuilder}});var D1t=$w();Object.defineProperty(ys,\"InternalError\",{enumerable:!0,get:function(){return D1t.InternalError}});var b1t=XDe();Object.defineProperty(ys,\"CIContextProvider\",{enumerable:!0,get:function(){return b1t.CIContextProvider}});var Fbe=Ebe();Object.defineProperty(ys,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return Fbe.DEFAULT_FULCIO_URL}});Object.defineProperty(ys,\"FulcioSigner\",{enumerable:!0,get:function(){return Fbe.FulcioSigner}});var _7=Tbe();Object.defineProperty(ys,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return _7.DEFAULT_REKOR_URL}});Object.defineProperty(ys,\"RekorWitness\",{enumerable:!0,get:function(){return _7.RekorWitness}});Object.defineProperty(ys,\"TSAWitness\",{enumerable:!0,get:function(){return _7.TSAWitness}})});var Obe=_(xb=>{\"use strict\";var Nbe=xb&&xb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xb,\"__esModule\",{value:!0});xb.appDataPath=x1t;var P1t=Nbe(Ie(\"os\")),n1=Nbe(Ie(\"path\"));function x1t(t){let e=P1t.default.homedir();switch(process.platform){case\"darwin\":{let r=n1.default.join(e,\"Library\",\"Application Support\");return n1.default.join(r,t)}case\"win32\":{let r=process.env.LOCALAPPDATA||n1.default.join(e,\"AppData\",\"Local\");return n1.default.join(r,t,\"Data\")}default:{let r=process.env.XDG_DATA_HOME||n1.default.join(e,\".local\",\"share\");return n1.default.join(r,t)}}}});var PA=_(wl=>{\"use strict\";Object.defineProperty(wl,\"__esModule\",{value:!0});wl.UnsupportedAlgorithmError=wl.CryptoError=wl.LengthOrHashMismatchError=wl.UnsignedMetadataError=wl.RepositoryError=wl.ValueError=void 0;var j7=class extends Error{};wl.ValueError=j7;var kb=class extends Error{};wl.RepositoryError=kb;var G7=class extends kb{};wl.UnsignedMetadataError=G7;var q7=class extends kb{};wl.LengthOrHashMismatchError=q7;var QO=class extends Error{};wl.CryptoError=QO;var W7=class extends QO{};wl.UnsupportedAlgorithmError=W7});var Mbe=_(bg=>{\"use strict\";Object.defineProperty(bg,\"__esModule\",{value:!0});bg.isDefined=k1t;bg.isObject=Lbe;bg.isStringArray=Q1t;bg.isObjectArray=T1t;bg.isStringRecord=R1t;bg.isObjectRecord=F1t;function k1t(t){return t!==void 0}function Lbe(t){return typeof t==\"object\"&&t!==null}function Q1t(t){return Array.isArray(t)&&t.every(e=>typeof e==\"string\")}function T1t(t){return Array.isArray(t)&&t.every(Lbe)}function R1t(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"string\")}function F1t(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"object\"&&e!==null)}});var V7=_(($nr,Hbe)=>{var Ube=\",\",N1t=\":\",O1t=\"[\",L1t=\"]\",M1t=\"{\",U1t=\"}\";function Y7(t){let e=[];if(typeof t==\"string\")e.push(_be(t));else if(typeof t==\"boolean\")e.push(JSON.stringify(t));else if(Number.isInteger(t))e.push(JSON.stringify(t));else if(t===null)e.push(JSON.stringify(t));else if(Array.isArray(t)){e.push(O1t);let r=!0;t.forEach(s=>{r||e.push(Ube),r=!1,e.push(Y7(s))}),e.push(L1t)}else if(typeof t==\"object\"){e.push(M1t);let r=!0;Object.keys(t).sort().forEach(s=>{r||e.push(Ube),r=!1,e.push(_be(s)),e.push(N1t),e.push(Y7(t[s]))}),e.push(U1t)}else throw new TypeError(\"cannot encode \"+t.toString());return e.join(\"\")}function _be(t){return'\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'}Hbe.exports={canonicalize:Y7}});var jbe=_(i1=>{\"use strict\";var _1t=i1&&i1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i1,\"__esModule\",{value:!0});i1.verifySignature=void 0;var H1t=V7(),j1t=_1t(Ie(\"crypto\")),G1t=(t,e,r)=>{let s=Buffer.from((0,H1t.canonicalize)(t));return j1t.default.verify(void 0,s,e,Buffer.from(r,\"hex\"))};i1.verifySignature=G1t});var ff=_(eu=>{\"use strict\";var q1t=eu&&eu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),W1t=eu&&eu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Gbe=eu&&eu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&q1t(e,t,r);return W1t(e,t),e};Object.defineProperty(eu,\"__esModule\",{value:!0});eu.crypto=eu.guard=void 0;eu.guard=Gbe(Mbe());eu.crypto=Gbe(jbe())});var ay=_(hh=>{\"use strict\";var Y1t=hh&&hh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hh,\"__esModule\",{value:!0});hh.Signed=hh.MetadataKind=void 0;hh.isMetadataKind=J1t;var V1t=Y1t(Ie(\"util\")),Qb=PA(),J7=ff(),qbe=[\"1\",\"0\",\"31\"],K7;(function(t){t.Root=\"root\",t.Timestamp=\"timestamp\",t.Snapshot=\"snapshot\",t.Targets=\"targets\"})(K7||(hh.MetadataKind=K7={}));function J1t(t){return typeof t==\"string\"&&Object.values(K7).includes(t)}var z7=class t{constructor(e){this.specVersion=e.specVersion||qbe.join(\".\");let r=this.specVersion.split(\".\");if(!(r.length===2||r.length===3)||!r.every(s=>K1t(s)))throw new Qb.ValueError(\"Failed to parse specVersion\");if(r[0]!=qbe[0])throw new Qb.ValueError(\"Unsupported specVersion\");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&V1t.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:r,expires:s,version:a,...n}=e;if(J7.guard.isDefined(r)){if(typeof r!=\"string\")throw new TypeError(\"spec_version must be a string\")}else throw new Qb.ValueError(\"spec_version is not defined\");if(J7.guard.isDefined(s)){if(typeof s!=\"string\")throw new TypeError(\"expires must be a string\")}else throw new Qb.ValueError(\"expires is not defined\");if(J7.guard.isDefined(a)){if(typeof a!=\"number\")throw new TypeError(\"version must be a number\")}else throw new Qb.ValueError(\"version is not defined\");return{specVersion:r,expires:s,version:a,unrecognizedFields:n}}};hh.Signed=z7;function K1t(t){return!isNaN(Number(t))}});var Tb=_(xg=>{\"use strict\";var Wbe=xg&&xg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xg,\"__esModule\",{value:!0});xg.TargetFile=xg.MetaFile=void 0;var Ybe=Wbe(Ie(\"crypto\")),RO=Wbe(Ie(\"util\")),Pg=PA(),TO=ff(),X7=class t{constructor(e){if(e.version<=0)throw new Pg.ValueError(\"Metafile version must be at least 1\");e.length!==void 0&&Vbe(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.version===e.version&&this.length===e.length&&RO.default.isDeepStrictEqual(this.hashes,e.hashes)&&RO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new Pg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([r,s])=>{let a;try{a=Ybe.default.createHash(r)}catch{throw new Pg.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}let n=a.update(e).digest(\"hex\");if(n!==s)throw new Pg.LengthOrHashMismatchError(`Expected hash ${s} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:r,length:s,hashes:a,...n}=e;if(typeof r!=\"number\")throw new TypeError(\"version must be a number\");if(TO.guard.isDefined(s)&&typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(TO.guard.isDefined(a)&&!TO.guard.isStringRecord(a))throw new TypeError(\"hashes must be string keys and values\");return new t({version:r,length:s,hashes:a,unrecognizedFields:n})}};xg.MetaFile=X7;var Z7=class t{constructor(e){Vbe(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!=\"object\"?{}:e}equals(e){return e instanceof t?this.length===e.length&&this.path===e.path&&RO.default.isDeepStrictEqual(this.hashes,e.hashes)&&RO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let r=0,s=Object.keys(this.hashes).reduce((a,n)=>{try{a[n]=Ybe.default.createHash(n)}catch{throw new Pg.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return a},{});for await(let a of e)r+=a.length,Object.values(s).forEach(n=>{n.update(a)});if(r!==this.length)throw new Pg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`);Object.entries(s).forEach(([a,n])=>{let c=this.hashes[a],f=n.digest(\"hex\");if(f!==c)throw new Pg.LengthOrHashMismatchError(`Expected hash ${c} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,r){let{length:s,hashes:a,...n}=r;if(typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(!TO.guard.isStringRecord(a))throw new TypeError(\"hashes must have string keys and values\");return new t({length:s,path:e,hashes:a,unrecognizedFields:n})}};xg.TargetFile=Z7;function Vbe(t){if(t<0)throw new Pg.ValueError(\"Length must be at least 0\")}});var Jbe=_($7=>{\"use strict\";Object.defineProperty($7,\"__esModule\",{value:!0});$7.encodeOIDString=X1t;var z1t=6;function X1t(t){let e=t.split(\".\"),r=parseInt(e[0],10)*40+parseInt(e[1],10),s=[];e.slice(2).forEach(n=>{let c=Z1t(parseInt(n,10));s.push(...c)});let a=Buffer.from([r,...s]);return Buffer.from([z1t,a.length,...a])}function Z1t(t){let e=[],r=0;for(;t>0;)e.unshift(t&127|r),t>>=7,r=128;return e}});var Zbe=_(Fb=>{\"use strict\";var $1t=Fb&&Fb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fb,\"__esModule\",{value:!0});Fb.getPublicKey=n2t;var s1=$1t(Ie(\"crypto\")),Rb=PA(),eJ=Jbe(),FO=48,Kbe=3,zbe=0,e2t=\"1.3.101.112\",t2t=\"1.2.840.10045.2.1\",r2t=\"1.2.840.10045.3.1.7\",tJ=\"-----BEGIN PUBLIC KEY-----\";function n2t(t){switch(t.keyType){case\"rsa\":return i2t(t);case\"ed25519\":return s2t(t);case\"ecdsa\":case\"ecdsa-sha2-nistp256\":case\"ecdsa-sha2-nistp384\":return o2t(t);default:throw new Rb.UnsupportedAlgorithmError(`Unsupported key type: ${t.keyType}`)}}function i2t(t){if(!t.keyVal.startsWith(tJ))throw new Rb.CryptoError(\"Invalid key format\");let e=s1.default.createPublicKey(t.keyVal);switch(t.scheme){case\"rsassa-pss-sha256\":return{key:e,padding:s1.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new Rb.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${t.scheme}`)}}function s2t(t){let e;if(t.keyVal.startsWith(tJ))e=s1.default.createPublicKey(t.keyVal);else{if(!Xbe(t.keyVal))throw new Rb.CryptoError(\"Invalid key format\");e=s1.default.createPublicKey({key:a2t.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}function o2t(t){let e;if(t.keyVal.startsWith(tJ))e=s1.default.createPublicKey(t.keyVal);else{if(!Xbe(t.keyVal))throw new Rb.CryptoError(\"Invalid key format\");e=s1.default.createPublicKey({key:l2t.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}var a2t={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=(0,eJ.encodeOIDString)(e2t),s=Buffer.concat([Buffer.concat([Buffer.from([FO]),Buffer.from([r.length]),r]),Buffer.concat([Buffer.from([Kbe]),Buffer.from([e.length+1]),Buffer.from([zbe]),e])]);return Buffer.concat([Buffer.from([FO]),Buffer.from([s.length]),s])}},l2t={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=Buffer.concat([Buffer.from([Kbe]),Buffer.from([e.length+1]),Buffer.from([zbe]),e]),s=Buffer.concat([(0,eJ.encodeOIDString)(t2t),(0,eJ.encodeOIDString)(r2t)]),a=Buffer.concat([Buffer.from([FO]),Buffer.from([s.length]),s]);return Buffer.concat([Buffer.from([FO]),Buffer.from([a.length+r.length]),a,r])}},Xbe=t=>/^[0-9a-fA-F]+$/.test(t)});var NO=_(o1=>{\"use strict\";var c2t=o1&&o1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o1,\"__esModule\",{value:!0});o1.Key=void 0;var $be=c2t(Ie(\"util\")),Nb=PA(),ePe=ff(),u2t=Zbe(),rJ=class t{constructor(e){let{keyID:r,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c}=e;this.keyID=r,this.keyType=s,this.scheme=a,this.keyVal=n,this.unrecognizedFields=c||{}}verifySignature(e){let r=e.signatures[this.keyID];if(!r)throw new Nb.UnsignedMetadataError(\"no signature for key found in metadata\");if(!this.keyVal.public)throw new Nb.UnsignedMetadataError(\"no public key found\");let s=(0,u2t.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),a=e.signed.toJSON();try{if(!ePe.crypto.verifySignature(a,s,r.sig))throw new Nb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof Nb.UnsignedMetadataError?n:new Nb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof t?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&$be.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&$be.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,r){let{keytype:s,scheme:a,keyval:n,...c}=r;if(typeof s!=\"string\")throw new TypeError(\"keytype must be a string\");if(typeof a!=\"string\")throw new TypeError(\"scheme must be a string\");if(!ePe.guard.isStringRecord(n))throw new TypeError(\"keyval must be a string record\");return new t({keyID:e,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c})}};o1.Key=rJ});var sPe=_((air,iPe)=>{\"use strict\";iPe.exports=rPe;function rPe(t,e,r){t instanceof RegExp&&(t=tPe(t,r)),e instanceof RegExp&&(e=tPe(e,r));var s=nPe(t,e,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+t.length,s[1]),post:r.slice(s[1]+e.length)}}function tPe(t,e){var r=e.match(t);return r?r[0]:null}rPe.range=nPe;function nPe(t,e,r){var s,a,n,c,f,p=r.indexOf(t),h=r.indexOf(e,p+1),E=p;if(p>=0&&h>0){for(s=[],n=r.length;E>=0&&!f;)E==p?(s.push(E),p=r.indexOf(t,E+1)):s.length==1?f=[s.pop(),h]:(a=s.pop(),a<n&&(n=a,c=h),h=r.indexOf(e,E+1)),E=p<h&&p>=0?p:h;s.length&&(f=[n,c])}return f}});var pPe=_((lir,APe)=>{var oPe=sPe();APe.exports=p2t;var aPe=\"\\0SLASH\"+Math.random()+\"\\0\",lPe=\"\\0OPEN\"+Math.random()+\"\\0\",iJ=\"\\0CLOSE\"+Math.random()+\"\\0\",cPe=\"\\0COMMA\"+Math.random()+\"\\0\",uPe=\"\\0PERIOD\"+Math.random()+\"\\0\";function nJ(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f2t(t){return t.split(\"\\\\\\\\\").join(aPe).split(\"\\\\{\").join(lPe).split(\"\\\\}\").join(iJ).split(\"\\\\,\").join(cPe).split(\"\\\\.\").join(uPe)}function A2t(t){return t.split(aPe).join(\"\\\\\").split(lPe).join(\"{\").split(iJ).join(\"}\").split(cPe).join(\",\").split(uPe).join(\".\")}function fPe(t){if(!t)return[\"\"];var e=[],r=oPe(\"{\",\"}\",t);if(!r)return t.split(\",\");var s=r.pre,a=r.body,n=r.post,c=s.split(\",\");c[c.length-1]+=\"{\"+a+\"}\";var f=fPe(n);return n.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),e.push.apply(e,c),e}function p2t(t){return t?(t.substr(0,2)===\"{}\"&&(t=\"\\\\{\\\\}\"+t.substr(2)),Ob(f2t(t),!0).map(A2t)):[]}function h2t(t){return\"{\"+t+\"}\"}function g2t(t){return/^-?0\\d/.test(t)}function d2t(t,e){return t<=e}function m2t(t,e){return t>=e}function Ob(t,e){var r=[],s=oPe(\"{\",\"}\",t);if(!s)return[t];var a=s.pre,n=s.post.length?Ob(s.post,!1):[\"\"];if(/\\$$/.test(s.pre))for(var c=0;c<n.length;c++){var f=a+\"{\"+s.body+\"}\"+n[c];r.push(f)}else{var p=/^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(s.body),h=/^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(s.body),E=p||h,C=s.body.indexOf(\",\")>=0;if(!E&&!C)return s.post.match(/,.*\\}/)?(t=s.pre+\"{\"+s.body+iJ+s.post,Ob(t)):[t];var S;if(E)S=s.body.split(/\\.\\./);else if(S=fPe(s.body),S.length===1&&(S=Ob(S[0],!1).map(h2t),S.length===1))return n.map(function(Ce){return s.pre+S[0]+Ce});var P;if(E){var I=nJ(S[0]),R=nJ(S[1]),N=Math.max(S[0].length,S[1].length),U=S.length==3?Math.abs(nJ(S[2])):1,W=d2t,ee=R<I;ee&&(U*=-1,W=m2t);var ie=S.some(g2t);P=[];for(var ue=I;W(ue,R);ue+=U){var le;if(h)le=String.fromCharCode(ue),le===\"\\\\\"&&(le=\"\");else if(le=String(ue),ie){var me=N-le.length;if(me>0){var pe=new Array(me+1).join(\"0\");ue<0?le=\"-\"+pe+le.slice(1):le=pe+le}}P.push(le)}}else{P=[];for(var Be=0;Be<S.length;Be++)P.push.apply(P,Ob(S[Be],!1))}for(var Be=0;Be<P.length;Be++)for(var c=0;c<n.length;c++){var f=a+P[Be]+n[c];(!e||E||f)&&r.push(f)}}return r}});var hPe=_(OO=>{\"use strict\";Object.defineProperty(OO,\"__esModule\",{value:!0});OO.assertValidPattern=void 0;var y2t=1024*64,E2t=t=>{if(typeof t!=\"string\")throw new TypeError(\"invalid pattern\");if(t.length>y2t)throw new TypeError(\"pattern is too long\")};OO.assertValidPattern=E2t});var dPe=_(LO=>{\"use strict\";Object.defineProperty(LO,\"__esModule\",{value:!0});LO.parseClass=void 0;var I2t={\"[:alnum:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\",!0],\"[:alpha:]\":[\"\\\\p{L}\\\\p{Nl}\",!0],\"[:ascii:]\":[\"\\\\x00-\\\\x7f\",!1],\"[:blank:]\":[\"\\\\p{Zs}\\\\t\",!0],\"[:cntrl:]\":[\"\\\\p{Cc}\",!0],\"[:digit:]\":[\"\\\\p{Nd}\",!0],\"[:graph:]\":[\"\\\\p{Z}\\\\p{C}\",!0,!0],\"[:lower:]\":[\"\\\\p{Ll}\",!0],\"[:print:]\":[\"\\\\p{C}\",!0],\"[:punct:]\":[\"\\\\p{P}\",!0],\"[:space:]\":[\"\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f\",!0],\"[:upper:]\":[\"\\\\p{Lu}\",!0],\"[:word:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}\",!0],\"[:xdigit:]\":[\"A-Fa-f0-9\",!1]},Lb=t=>t.replace(/[[\\]\\\\-]/g,\"\\\\$&\"),C2t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),gPe=t=>t.join(\"\"),w2t=(t,e)=>{let r=e;if(t.charAt(r)!==\"[\")throw new Error(\"not in a brace expression\");let s=[],a=[],n=r+1,c=!1,f=!1,p=!1,h=!1,E=r,C=\"\";e:for(;n<t.length;){let R=t.charAt(n);if((R===\"!\"||R===\"^\")&&n===r+1){h=!0,n++;continue}if(R===\"]\"&&c&&!p){E=n+1;break}if(c=!0,R===\"\\\\\"&&!p){p=!0,n++;continue}if(R===\"[\"&&!p){for(let[N,[U,W,ee]]of Object.entries(I2t))if(t.startsWith(N,n)){if(C)return[\"$.\",!1,t.length-r,!0];n+=N.length,ee?a.push(U):s.push(U),f=f||W;continue e}}if(p=!1,C){R>C?s.push(Lb(C)+\"-\"+Lb(R)):R===C&&s.push(Lb(R)),C=\"\",n++;continue}if(t.startsWith(\"-]\",n+1)){s.push(Lb(R+\"-\")),n+=2;continue}if(t.startsWith(\"-\",n+1)){C=R,n+=2;continue}s.push(Lb(R)),n++}if(E<n)return[\"\",!1,0,!1];if(!s.length&&!a.length)return[\"$.\",!1,t.length-r,!0];if(a.length===0&&s.length===1&&/^\\\\?.$/.test(s[0])&&!h){let R=s[0].length===2?s[0].slice(-1):s[0];return[C2t(R),!1,E-r,!1]}let S=\"[\"+(h?\"^\":\"\")+gPe(s)+\"]\",P=\"[\"+(h?\"\":\"^\")+gPe(a)+\"]\";return[s.length&&a.length?\"(\"+S+\"|\"+P+\")\":s.length?S:P,f,E-r,!0]};LO.parseClass=w2t});var UO=_(MO=>{\"use strict\";Object.defineProperty(MO,\"__esModule\",{value:!0});MO.unescape=void 0;var B2t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\\[([^\\/\\\\])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g,\"$1$2\").replace(/\\\\([^\\/])/g,\"$1\");MO.unescape=B2t});var aJ=_(jO=>{\"use strict\";Object.defineProperty(jO,\"__esModule\",{value:!0});jO.AST=void 0;var v2t=dPe(),_O=UO(),S2t=new Set([\"!\",\"?\",\"+\",\"*\",\"@\"]),mPe=t=>S2t.has(t),D2t=\"(?!(?:^|/)\\\\.\\\\.?(?:$|/))\",HO=\"(?!\\\\.)\",b2t=new Set([\"[\",\".\"]),P2t=new Set([\"..\",\".\"]),x2t=new Set(\"().*{}+?[]^$\\\\!\"),k2t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),oJ=\"[^/]\",yPe=oJ+\"*?\",EPe=oJ+\"+?\",sJ=class t{type;#t;#r;#i=!1;#e=[];#n;#o;#l;#a=!1;#s;#c;#f=!1;constructor(e,r,s={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?s:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,e===\"!\"&&!this.#t.#a&&this.#l.push(this),this.#o=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!=\"string\"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+\"(\"+this.#e.map(e=>String(e)).join(\"|\")+\")\":this.#c=this.#e.map(e=>String(e)).join(\"\")}#p(){if(this!==this.#t)throw new Error(\"should only call on root\");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#l.pop();){if(e.type!==\"!\")continue;let r=e,s=r.#n;for(;s;){for(let a=r.#o+1;!s.type&&a<s.#e.length;a++)for(let n of e.#e){if(typeof n==\"string\")throw new Error(\"string part in extglob AST??\");n.copyIn(s.#e[a])}r=s,s=r.#n}}return this}push(...e){for(let r of e)if(r!==\"\"){if(typeof r!=\"string\"&&!(r instanceof t&&r.#n===this))throw new Error(\"invalid part: \"+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r==\"string\"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type===\"!\")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#o===0)return!0;let e=this.#n;for(let r=0;r<this.#o;r++){let s=e.#e[r];if(!(s instanceof t&&s.type===\"!\"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type===\"!\")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#e.length:0;return this.#o===e-1}copyIn(e){typeof e==\"string\"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let s of this.#e)r.copyIn(s);return r}static#u(e,r,s,a){let n=!1,c=!1,f=-1,p=!1;if(r.type===null){let P=s,I=\"\";for(;P<e.length;){let R=e.charAt(P++);if(n||R===\"\\\\\"){n=!n,I+=R;continue}if(c){P===f+1?(R===\"^\"||R===\"!\")&&(p=!0):R===\"]\"&&!(P===f+2&&p)&&(c=!1),I+=R;continue}else if(R===\"[\"){c=!0,f=P,p=!1,I+=R;continue}if(!a.noext&&mPe(R)&&e.charAt(P)===\"(\"){r.push(I),I=\"\";let N=new t(R,r);P=t.#u(e,N,P,a),r.push(N);continue}I+=R}return r.push(I),P}let h=s+1,E=new t(null,r),C=[],S=\"\";for(;h<e.length;){let P=e.charAt(h++);if(n||P===\"\\\\\"){n=!n,S+=P;continue}if(c){h===f+1?(P===\"^\"||P===\"!\")&&(p=!0):P===\"]\"&&!(h===f+2&&p)&&(c=!1),S+=P;continue}else if(P===\"[\"){c=!0,f=h,p=!1,S+=P;continue}if(mPe(P)&&e.charAt(h)===\"(\"){E.push(S),S=\"\";let I=new t(P,E);E.push(I),h=t.#u(e,I,h,a);continue}if(P===\"|\"){E.push(S),S=\"\",C.push(E),E=new t(null,r);continue}if(P===\")\")return S===\"\"&&r.#e.length===0&&(r.#f=!0),E.push(S),S=\"\",r.push(...C,E),h;S+=P}return r.type=null,r.#r=void 0,r.#e=[e.substring(s-1)],h}static fromGlob(e,r={}){let s=new t(null,void 0,r);return t.#u(e,s,0,r),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[r,s,a,n]=this.toRegExpSource();if(!(a||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let f=(this.#s.nocase?\"i\":\"\")+(n?\"u\":\"\");return Object.assign(new RegExp(`^${r}$`,f),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#t===this&&this.#p(),!this.type){let p=this.isStart()&&this.isEnd(),h=this.#e.map(P=>{let[I,R,N,U]=typeof P==\"string\"?t.#h(P,this.#r,p):P.toRegExpSource(e);return this.#r=this.#r||N,this.#i=this.#i||U,I}).join(\"\"),E=\"\";if(this.isStart()&&typeof this.#e[0]==\"string\"&&!(this.#e.length===1&&P2t.has(this.#e[0]))){let I=b2t,R=r&&I.has(h.charAt(0))||h.startsWith(\"\\\\.\")&&I.has(h.charAt(2))||h.startsWith(\"\\\\.\\\\.\")&&I.has(h.charAt(4)),N=!r&&!e&&I.has(h.charAt(0));E=R?D2t:N?HO:\"\"}let C=\"\";return this.isEnd()&&this.#t.#a&&this.#n?.type===\"!\"&&(C=\"(?:$|\\\\/)\"),[E+h+C,(0,_O.unescape)(h),this.#r=!!this.#r,this.#i]}let s=this.type===\"*\"||this.type===\"+\",a=this.type===\"!\"?\"(?:(?!(?:\":\"(?:\",n=this.#A(r);if(this.isStart()&&this.isEnd()&&!n&&this.type!==\"!\"){let p=this.toString();return this.#e=[p],this.type=null,this.#r=void 0,[p,(0,_O.unescape)(this.toString()),!1,!1]}let c=!s||e||r||!HO?\"\":this.#A(!0);c===n&&(c=\"\"),c&&(n=`(?:${n})(?:${c})*?`);let f=\"\";if(this.type===\"!\"&&this.#f)f=(this.isStart()&&!r?HO:\"\")+EPe;else{let p=this.type===\"!\"?\"))\"+(this.isStart()&&!r&&!e?HO:\"\")+yPe+\")\":this.type===\"@\"?\")\":this.type===\"?\"?\")?\":this.type===\"+\"&&c?\")\":this.type===\"*\"&&c?\")?\":`)${this.type}`;f=a+n+p}return[f,(0,_O.unescape)(n),this.#r=!!this.#r,this.#i]}#A(e){return this.#e.map(r=>{if(typeof r==\"string\")throw new Error(\"string type in extglob ast??\");let[s,a,n,c]=r.toRegExpSource(e);return this.#i=this.#i||c,s}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join(\"|\")}static#h(e,r,s=!1){let a=!1,n=\"\",c=!1;for(let f=0;f<e.length;f++){let p=e.charAt(f);if(a){a=!1,n+=(x2t.has(p)?\"\\\\\":\"\")+p;continue}if(p===\"\\\\\"){f===e.length-1?n+=\"\\\\\\\\\":a=!0;continue}if(p===\"[\"){let[h,E,C,S]=(0,v2t.parseClass)(e,f);if(C){n+=h,c=c||E,f+=C-1,r=r||S;continue}}if(p===\"*\"){s&&e===\"*\"?n+=EPe:n+=yPe,r=!0;continue}if(p===\"?\"){n+=oJ,r=!0;continue}n+=k2t(p)}return[n,(0,_O.unescape)(e),!!r,c]}};jO.AST=sJ});var lJ=_(GO=>{\"use strict\";Object.defineProperty(GO,\"__esModule\",{value:!0});GO.escape=void 0;var Q2t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\\]]/g,\"[$&]\"):t.replace(/[?*()[\\]\\\\]/g,\"\\\\$&\");GO.escape=Q2t});var DPe=_(pr=>{\"use strict\";var T2t=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,\"__esModule\",{value:!0});pr.unescape=pr.escape=pr.AST=pr.Minimatch=pr.match=pr.makeRe=pr.braceExpand=pr.defaults=pr.filter=pr.GLOBSTAR=pr.sep=pr.minimatch=void 0;var R2t=T2t(pPe()),qO=hPe(),wPe=aJ(),F2t=lJ(),N2t=UO(),O2t=(t,e,r={})=>((0,qO.assertValidPattern)(e),!r.nocomment&&e.charAt(0)===\"#\"?!1:new ly(e,r).match(t));pr.minimatch=O2t;var L2t=/^\\*+([^+@!?\\*\\[\\(]*)$/,M2t=t=>e=>!e.startsWith(\".\")&&e.endsWith(t),U2t=t=>e=>e.endsWith(t),_2t=t=>(t=t.toLowerCase(),e=>!e.startsWith(\".\")&&e.toLowerCase().endsWith(t)),H2t=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),j2t=/^\\*+\\.\\*+$/,G2t=t=>!t.startsWith(\".\")&&t.includes(\".\"),q2t=t=>t!==\".\"&&t!==\"..\"&&t.includes(\".\"),W2t=/^\\.\\*+$/,Y2t=t=>t!==\".\"&&t!==\"..\"&&t.startsWith(\".\"),V2t=/^\\*+$/,J2t=t=>t.length!==0&&!t.startsWith(\".\"),K2t=t=>t.length!==0&&t!==\".\"&&t!==\"..\",z2t=/^\\?+([^+@!?\\*\\[\\(]*)?$/,X2t=([t,e=\"\"])=>{let r=BPe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Z2t=([t,e=\"\"])=>{let r=vPe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},$2t=([t,e=\"\"])=>{let r=vPe([t]);return e?s=>r(s)&&s.endsWith(e):r},eBt=([t,e=\"\"])=>{let r=BPe([t]);return e?s=>r(s)&&s.endsWith(e):r},BPe=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(\".\")},vPe=([t])=>{let e=t.length;return r=>r.length===e&&r!==\".\"&&r!==\"..\"},SPe=typeof process==\"object\"&&process?typeof process.env==\"object\"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:\"posix\",IPe={win32:{sep:\"\\\\\"},posix:{sep:\"/\"}};pr.sep=SPe===\"win32\"?IPe.win32.sep:IPe.posix.sep;pr.minimatch.sep=pr.sep;pr.GLOBSTAR=Symbol(\"globstar **\");pr.minimatch.GLOBSTAR=pr.GLOBSTAR;var tBt=\"[^/]\",rBt=tBt+\"*?\",nBt=\"(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?\",iBt=\"(?:(?!(?:\\\\/|^)\\\\.).)*?\",sBt=(t,e={})=>r=>(0,pr.minimatch)(r,t,e);pr.filter=sBt;pr.minimatch.filter=pr.filter;var tu=(t,e={})=>Object.assign({},t,e),oBt=t=>{if(!t||typeof t!=\"object\"||!Object.keys(t).length)return pr.minimatch;let e=pr.minimatch;return Object.assign((s,a,n={})=>e(s,a,tu(t,n)),{Minimatch:class extends e.Minimatch{constructor(a,n={}){super(a,tu(t,n))}static defaults(a){return e.defaults(tu(t,a)).Minimatch}},AST:class extends e.AST{constructor(a,n,c={}){super(a,n,tu(t,c))}static fromGlob(a,n={}){return e.AST.fromGlob(a,tu(t,n))}},unescape:(s,a={})=>e.unescape(s,tu(t,a)),escape:(s,a={})=>e.escape(s,tu(t,a)),filter:(s,a={})=>e.filter(s,tu(t,a)),defaults:s=>e.defaults(tu(t,s)),makeRe:(s,a={})=>e.makeRe(s,tu(t,a)),braceExpand:(s,a={})=>e.braceExpand(s,tu(t,a)),match:(s,a,n={})=>e.match(s,a,tu(t,n)),sep:e.sep,GLOBSTAR:pr.GLOBSTAR})};pr.defaults=oBt;pr.minimatch.defaults=pr.defaults;var aBt=(t,e={})=>((0,qO.assertValidPattern)(t),e.nobrace||!/\\{(?:(?!\\{).)*\\}/.test(t)?[t]:(0,R2t.default)(t));pr.braceExpand=aBt;pr.minimatch.braceExpand=pr.braceExpand;var lBt=(t,e={})=>new ly(t,e).makeRe();pr.makeRe=lBt;pr.minimatch.makeRe=pr.makeRe;var cBt=(t,e,r={})=>{let s=new ly(e,r);return t=t.filter(a=>s.match(a)),s.options.nonull&&!t.length&&t.push(e),t};pr.match=cBt;pr.minimatch.match=pr.match;var CPe=/[?*]|[+@!]\\(.*?\\)|\\[|\\]/,uBt=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),ly=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,qO.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||SPe,this.isWindows=this.platform===\"win32\",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\\\/g,\"/\")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!=\"string\")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)===\"#\"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let a=this.globParts.map((n,c,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let p=n[0]===\"\"&&n[1]===\"\"&&(n[2]===\"?\"||!CPe.test(n[2]))&&!CPe.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(p)return[...n.slice(0,4),...n.slice(4).map(E=>this.parse(E))];if(h)return[n[0],...n.slice(1).map(E=>this.parse(E))]}return n.map(p=>this.parse(p))});if(this.debug(this.pattern,a),this.set=a.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let c=this.set[n];c[0]===\"\"&&c[1]===\"\"&&this.globParts[n][2]===\"?\"&&typeof c[3]==\"string\"&&/^[a-z]:$/i.test(c[3])&&(c[2]=\"?\")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let s=0;s<e.length;s++)for(let a=0;a<e[s].length;a++)e[s][a]===\"**\"&&(e[s][a]=\"*\");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let s=-1;for(;(s=r.indexOf(\"**\",s+1))!==-1;){let a=s;for(;r[a+1]===\"**\";)a++;a!==s&&r.splice(s,a-s)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((s,a)=>{let n=s[s.length-1];return a===\"**\"&&n===\"**\"?s:a===\"..\"&&n&&n!==\"..\"&&n!==\".\"&&n!==\"**\"?(s.pop(),s):(s.push(a),s)},[]),r.length===0?[\"\"]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;a<e.length-1;a++){let n=e[a];a===1&&n===\"\"&&e[0]===\"\"||(n===\".\"||n===\"\")&&(r=!0,e.splice(a,1),a--)}e[0]===\".\"&&e.length===2&&(e[1]===\".\"||e[1]===\"\")&&(r=!0,e.pop())}let s=0;for(;(s=e.indexOf(\"..\",s+1))!==-1;){let a=e[s-1];a&&a!==\".\"&&a!==\"..\"&&a!==\"**\"&&(r=!0,e.splice(s-1,2),s-=2)}}while(r);return e.length===0?[\"\"]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let s of e){let a=-1;for(;(a=s.indexOf(\"**\",a+1))!==-1;){let c=a;for(;s[c+1]===\"**\";)c++;c>a&&s.splice(a+1,c-a);let f=s[a+1],p=s[a+2],h=s[a+3];if(f!==\"..\"||!p||p===\".\"||p===\"..\"||!h||h===\".\"||h===\"..\")continue;r=!0,s.splice(a,1);let E=s.slice(0);E[a]=\"**\",e.push(E),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<s.length-1;c++){let f=s[c];c===1&&f===\"\"&&s[0]===\"\"||(f===\".\"||f===\"\")&&(r=!0,s.splice(c,1),c--)}s[0]===\".\"&&s.length===2&&(s[1]===\".\"||s[1]===\"\")&&(r=!0,s.pop())}let n=0;for(;(n=s.indexOf(\"..\",n+1))!==-1;){let c=s[n-1];if(c&&c!==\".\"&&c!==\"..\"&&c!==\"**\"){r=!0;let p=n===1&&s[n+1]===\"**\"?[\".\"]:[];s.splice(n-1,2,...p),s.length===0&&s.push(\"\"),n-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let s=r+1;s<e.length;s++){let a=this.partsMatch(e[r],e[s],!this.preserveMultipleSlashes);if(a){e[r]=[],e[s]=a;break}}return e.filter(r=>r.length)}partsMatch(e,r,s=!1){let a=0,n=0,c=[],f=\"\";for(;a<e.length&&n<r.length;)if(e[a]===r[n])c.push(f===\"b\"?r[n]:e[a]),a++,n++;else if(s&&e[a]===\"**\"&&r[n]===e[a+1])c.push(e[a]),a++;else if(s&&r[n]===\"**\"&&e[a]===r[n+1])c.push(r[n]),n++;else if(e[a]===\"*\"&&r[n]&&(this.options.dot||!r[n].startsWith(\".\"))&&r[n]!==\"**\"){if(f===\"b\")return!1;f=\"a\",c.push(e[a]),a++,n++}else if(r[n]===\"*\"&&e[a]&&(this.options.dot||!e[a].startsWith(\".\"))&&e[a]!==\"**\"){if(f===\"a\")return!1;f=\"b\",c.push(r[n]),a++,n++}else return!1;return e.length===r.length&&c}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,s=0;for(let a=0;a<e.length&&e.charAt(a)===\"!\";a++)r=!r,s++;s&&(this.pattern=e.slice(s)),this.negate=r}matchOne(e,r,s=!1){let a=this.options;if(this.isWindows){let R=typeof e[0]==\"string\"&&/^[a-z]:$/i.test(e[0]),N=!R&&e[0]===\"\"&&e[1]===\"\"&&e[2]===\"?\"&&/^[a-z]:$/i.test(e[3]),U=typeof r[0]==\"string\"&&/^[a-z]:$/i.test(r[0]),W=!U&&r[0]===\"\"&&r[1]===\"\"&&r[2]===\"?\"&&typeof r[3]==\"string\"&&/^[a-z]:$/i.test(r[3]),ee=N?3:R?0:void 0,ie=W?3:U?0:void 0;if(typeof ee==\"number\"&&typeof ie==\"number\"){let[ue,le]=[e[ee],r[ie]];ue.toLowerCase()===le.toLowerCase()&&(r[ie]=ue,ie>ee?r=r.slice(ie):ee>ie&&(e=e.slice(ee)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(\"matchOne\",this,{file:e,pattern:r}),this.debug(\"matchOne\",e.length,r.length);for(var c=0,f=0,p=e.length,h=r.length;c<p&&f<h;c++,f++){this.debug(\"matchOne loop\");var E=r[f],C=e[c];if(this.debug(r,E,C),E===!1)return!1;if(E===pr.GLOBSTAR){this.debug(\"GLOBSTAR\",[r,E,C]);var S=c,P=f+1;if(P===h){for(this.debug(\"** at the end\");c<p;c++)if(e[c]===\".\"||e[c]===\"..\"||!a.dot&&e[c].charAt(0)===\".\")return!1;return!0}for(;S<p;){var I=e[S];if(this.debug(`\nglobstar while`,e,S,r,P,I),this.matchOne(e.slice(S),r.slice(P),s))return this.debug(\"globstar found match!\",S,p,I),!0;if(I===\".\"||I===\"..\"||!a.dot&&I.charAt(0)===\".\"){this.debug(\"dot detected!\",e,S,r,P);break}this.debug(\"globstar swallow a segment, and continue\"),S++}return!!(s&&(this.debug(`\n>>> no match, partial?`,e,S,r,P),S===p))}let R;if(typeof E==\"string\"?(R=C===E,this.debug(\"string match\",E,C,R)):(R=E.test(C),this.debug(\"pattern match\",E,C,R)),!R)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]===\"\";throw new Error(\"wtf?\")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,qO.assertValidPattern)(e);let r=this.options;if(e===\"**\")return pr.GLOBSTAR;if(e===\"\")return\"\";let s,a=null;(s=e.match(V2t))?a=r.dot?K2t:J2t:(s=e.match(L2t))?a=(r.nocase?r.dot?H2t:_2t:r.dot?U2t:M2t)(s[1]):(s=e.match(z2t))?a=(r.nocase?r.dot?Z2t:X2t:r.dot?$2t:eBt)(s):(s=e.match(j2t))?a=r.dot?q2t:G2t:(s=e.match(W2t))&&(a=Y2t);let n=wPe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n==\"object\"&&Reflect.defineProperty(n,\"test\",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?rBt:r.dot?nBt:iBt,a=new Set(r.nocase?[\"i\"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(\"\"))a.add(C);return typeof E==\"string\"?uBt(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],P=h[C-1];E!==pr.GLOBSTAR||P===pr.GLOBSTAR||(P===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]=\"(?:\\\\/|\"+s+\"\\\\/)?\"+S:h[C]=s:S===void 0?h[C-1]=P+\"(?:\\\\/|\"+s+\")?\":S!==pr.GLOBSTAR&&(h[C-1]=P+\"(?:\\\\/|\\\\/\"+s+\"\\\\/)\"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join(\"/\")}).join(\"|\"),[c,f]=e.length>1?[\"(?:\",\")\"]:[\"\",\"\"];n=\"^\"+c+n+f+\"$\",this.negate&&(n=\"^(?!\"+n+\").+$\");try{this.regexp=new RegExp(n,[...a].join(\"\"))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(\"/\"):this.isWindows&&/^\\/\\/[^\\/]+/.test(e)?[\"\",...e.split(/\\/+/)]:e.split(/\\/+/)}match(e,r=this.partial){if(this.debug(\"match\",e,this.pattern),this.comment)return!1;if(this.empty)return e===\"\";if(e===\"/\"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split(\"\\\\\").join(\"/\"));let a=this.slashSplit(e);this.debug(this.pattern,\"split\",a);let n=this.set;this.debug(this.pattern,\"set\",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return pr.minimatch.defaults(e).Minimatch}};pr.Minimatch=ly;var fBt=aJ();Object.defineProperty(pr,\"AST\",{enumerable:!0,get:function(){return fBt.AST}});var ABt=lJ();Object.defineProperty(pr,\"escape\",{enumerable:!0,get:function(){return ABt.escape}});var pBt=UO();Object.defineProperty(pr,\"unescape\",{enumerable:!0,get:function(){return pBt.unescape}});pr.minimatch.AST=wPe.AST;pr.minimatch.Minimatch=ly;pr.minimatch.escape=F2t.escape;pr.minimatch.unescape=N2t.unescape});var fJ=_(ru=>{\"use strict\";var bPe=ru&&ru.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ru,\"__esModule\",{value:!0});ru.SuccinctRoles=ru.DelegatedRole=ru.Role=ru.TOP_LEVEL_ROLE_NAMES=void 0;var PPe=bPe(Ie(\"crypto\")),hBt=DPe(),WO=bPe(Ie(\"util\")),YO=PA(),cy=ff();ru.TOP_LEVEL_ROLE_NAMES=[\"root\",\"targets\",\"snapshot\",\"timestamp\"];var Mb=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(gBt(r))throw new YO.ValueError(\"duplicate key IDs found\");if(s<1)throw new YO.ValueError(\"threshold must be at least 1\");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&WO.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&WO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};ru.Role=Mb;function gBt(t){return new Set(t).size!==t.length}var cJ=class t extends Mb{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new YO.ValueError(\"paths and pathHashPrefixes are mutually exclusive\");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&WO.default.isDeepStrictEqual(this.paths,e.paths)&&WO.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>mBt(e,r));if(this.pathHashPrefixes){let s=PPe.default.createHash(\"sha256\").update(e).digest(\"hex\");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:r,threshold:s,name:a,terminating:n,paths:c,path_hash_prefixes:f,...p}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"string\")throw new TypeError(\"name must be a string\");if(typeof n!=\"boolean\")throw new TypeError(\"terminating must be a boolean\");if(cy.guard.isDefined(c)&&!cy.guard.isStringArray(c))throw new TypeError(\"paths must be an array of strings\");if(cy.guard.isDefined(f)&&!cy.guard.isStringArray(f))throw new TypeError(\"path_hash_prefixes must be an array of strings\");return new t({keyIDs:r,threshold:s,name:a,terminating:n,paths:c,pathHashPrefixes:f,unrecognizedFields:p})}};ru.DelegatedRole=cJ;var dBt=(t,e)=>t.map((r,s)=>[r,e[s]]);function mBt(t,e){let r=t.split(\"/\"),s=e.split(\"/\");return s.length!=r.length?!1:dBt(r,s).every(([a,n])=>(0,hBt.minimatch)(a,n))}var uJ=class t extends Mb{constructor(e){super(e);let{bitLength:r,namePrefix:s}=e;if(r<=0||r>32)throw new YO.ValueError(\"bitLength must be between 1 and 32\");this.bitLength=r,this.namePrefix=s,this.numberOfBins=Math.pow(2,r),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof t?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let a=PPe.default.createHash(\"sha256\").update(e).digest().subarray(0,4),n=32-this.bitLength,f=(a.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,\"0\");return`${this.namePrefix}-${f}`}*getRoles(){for(let e=0;e<this.numberOfBins;e++){let r=e.toString(16).padStart(this.suffixLen,\"0\");yield`${this.namePrefix}-${r}`}}isDelegatedRole(e){let r=this.namePrefix+\"-\";if(!e.startsWith(r))return!1;let s=e.slice(r.length,e.length);if(s.length!=this.suffixLen||!s.match(/^[0-9a-fA-F]+$/))return!1;let a=parseInt(s,16);return 0<=a&&a<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(e){let{keyids:r,threshold:s,bit_length:a,name_prefix:n,...c}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"number\")throw new TypeError(\"bit_length must be a number\");if(typeof n!=\"string\")throw new TypeError(\"name_prefix must be a string\");return new t({keyIDs:r,threshold:s,bitLength:a,namePrefix:n,unrecognizedFields:c})}};ru.SuccinctRoles=uJ});var hJ=_(a1=>{\"use strict\";var yBt=a1&&a1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(a1,\"__esModule\",{value:!0});a1.Root=void 0;var xPe=yBt(Ie(\"util\")),AJ=ay(),kPe=PA(),EBt=NO(),VO=fJ(),JO=ff(),pJ=class t extends AJ.Signed{constructor(e){if(super(e),this.type=AJ.MetadataKind.Root,this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=VO.TOP_LEVEL_ROLE_NAMES.reduce((r,s)=>({...r,[s]:new VO.Role({keyIDs:[],threshold:1})}),{});else{let r=new Set(Object.keys(e.roles));if(!VO.TOP_LEVEL_ROLE_NAMES.every(s=>r.has(s)))throw new kPe.ValueError(\"missing top-level role\");this.roles=e.roles}}addKey(e,r){if(!this.roles[r])throw new kPe.ValueError(`role ${r} does not exist`);this.roles[r].keyIDs.includes(e.keyID)||this.roles[r].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof t?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&xPe.default.isDeepStrictEqual(this.keys,e.keys)&&xPe.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:IBt(this.keys),roles:CBt(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=AJ.Signed.commonFieldsFromJSON(e),{keys:a,roles:n,consistent_snapshot:c,...f}=r;if(typeof c!=\"boolean\")throw new TypeError(\"consistent_snapshot must be a boolean\");return new t({...s,keys:wBt(a),roles:BBt(n),consistentSnapshot:c,unrecognizedFields:f})}};a1.Root=pJ;function IBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function CBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function wBt(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError(\"keys must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:EBt.Key.fromJSON(s,a)}),{})}return e}function BBt(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError(\"roles must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:VO.Role.fromJSON(a)}),{})}return e}});var dJ=_(KO=>{\"use strict\";Object.defineProperty(KO,\"__esModule\",{value:!0});KO.Signature=void 0;var gJ=class t{constructor(e){let{keyID:r,sig:s}=e;this.keyID=r,this.sig=s}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:r,sig:s}=e;if(typeof r!=\"string\")throw new TypeError(\"keyid must be a string\");if(typeof s!=\"string\")throw new TypeError(\"sig must be a string\");return new t({keyID:r,sig:s})}};KO.Signature=gJ});var EJ=_(l1=>{\"use strict\";var vBt=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,\"__esModule\",{value:!0});l1.Snapshot=void 0;var SBt=vBt(Ie(\"util\")),mJ=ay(),TPe=Tb(),QPe=ff(),yJ=class t extends mJ.Signed{constructor(e){super(e),this.type=mJ.MetadataKind.Snapshot,this.meta=e.meta||{\"targets.json\":new TPe.MetaFile({version:1})}}equals(e){return e instanceof t?super.equals(e)&&SBt.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:DBt(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=mJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,meta:bBt(a),unrecognizedFields:n})}};l1.Snapshot=yJ;function DBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function bBt(t){let e;if(QPe.guard.isDefined(t))if(QPe.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:TPe.MetaFile.fromJSON(a)}),{});else throw new TypeError(\"meta field is malformed\");return e}});var RPe=_(c1=>{\"use strict\";var PBt=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,\"__esModule\",{value:!0});c1.Delegations=void 0;var zO=PBt(Ie(\"util\")),xBt=PA(),kBt=NO(),IJ=fJ(),XO=ff(),CJ=class t{constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(r=>IJ.TOP_LEVEL_ROLE_NAMES.includes(r)))throw new xBt.ValueError(\"Delegated role name conflicts with top-level role name\");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof t?zO.default.isDeepStrictEqual(this.keys,e.keys)&&zO.default.isDeepStrictEqual(this.roles,e.roles)&&zO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&zO.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let r of Object.values(this.roles))r.isDelegatedPath(e)&&(yield{role:r.name,terminating:r.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:QBt(this.keys),...this.unrecognizedFields};return this.roles?e.roles=TBt(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:r,roles:s,succinct_roles:a,...n}=e,c;return XO.guard.isObject(a)&&(c=IJ.SuccinctRoles.fromJSON(a)),new t({keys:RBt(r),roles:FBt(s),unrecognizedFields:n,succinctRoles:c})}};c1.Delegations=CJ;function QBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function TBt(t){return Object.values(t).map(e=>e.toJSON())}function RBt(t){if(!XO.guard.isObjectRecord(t))throw new TypeError(\"keys is malformed\");return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:kBt.Key.fromJSON(r,s)}),{})}function FBt(t){let e;if(XO.guard.isDefined(t)){if(!XO.guard.isObjectArray(t))throw new TypeError(\"roles is malformed\");e=t.reduce((r,s)=>{let a=IJ.DelegatedRole.fromJSON(s);return{...r,[a.name]:a}},{})}return e}});var vJ=_(u1=>{\"use strict\";var NBt=u1&&u1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u1,\"__esModule\",{value:!0});u1.Targets=void 0;var FPe=NBt(Ie(\"util\")),wJ=ay(),OBt=RPe(),LBt=Tb(),ZO=ff(),BJ=class t extends wJ.Signed{constructor(e){super(e),this.type=wJ.MetadataKind.Targets,this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof t?super.equals(e)&&FPe.default.isDeepStrictEqual(this.targets,e.targets)&&FPe.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:MBt(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:r,...s}=wJ.Signed.commonFieldsFromJSON(e),{targets:a,delegations:n,...c}=r;return new t({...s,targets:UBt(a),delegations:_Bt(n),unrecognizedFields:c})}};u1.Targets=BJ;function MBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function UBt(t){let e;if(ZO.guard.isDefined(t))if(ZO.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:LBt.TargetFile.fromJSON(s,a)}),{});else throw new TypeError(\"targets must be an object\");return e}function _Bt(t){let e;if(ZO.guard.isDefined(t))if(ZO.guard.isObject(t))e=OBt.Delegations.fromJSON(t);else throw new TypeError(\"delegations must be an object\");return e}});var PJ=_($O=>{\"use strict\";Object.defineProperty($O,\"__esModule\",{value:!0});$O.Timestamp=void 0;var SJ=ay(),NPe=Tb(),DJ=ff(),bJ=class t extends SJ.Signed{constructor(e){super(e),this.type=SJ.MetadataKind.Timestamp,this.snapshotMeta=e.snapshotMeta||new NPe.MetaFile({version:1})}equals(e){return e instanceof t?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{\"snapshot.json\":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=SJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,snapshotMeta:HBt(a),unrecognizedFields:n})}};$O.Timestamp=bJ;function HBt(t){let e;if(DJ.guard.isDefined(t)){let r=t[\"snapshot.json\"];if(!DJ.guard.isDefined(r)||!DJ.guard.isObject(r))throw new TypeError(\"missing snapshot.json in meta\");e=NPe.MetaFile.fromJSON(r)}return e}});var LPe=_(A1=>{\"use strict\";var jBt=A1&&A1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A1,\"__esModule\",{value:!0});A1.Metadata=void 0;var GBt=V7(),OPe=jBt(Ie(\"util\")),f1=ay(),Ub=PA(),qBt=hJ(),WBt=dJ(),YBt=EJ(),VBt=vJ(),JBt=PJ(),xJ=ff(),kJ=class t{constructor(e,r,s){this.signed=e,this.signatures=r||{},this.unrecognizedFields=s||{}}sign(e,r=!0){let s=Buffer.from((0,GBt.canonicalize)(this.signed.toJSON())),a=e(s);r||(this.signatures={}),this.signatures[a.keyID]=a}verifyDelegate(e,r){let s,a={};switch(this.signed.type){case f1.MetadataKind.Root:a=this.signed.keys,s=this.signed.roles[e];break;case f1.MetadataKind.Targets:if(!this.signed.delegations)throw new Ub.ValueError(`No delegations found for ${e}`);a=this.signed.delegations.keys,this.signed.delegations.roles?s=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(s=this.signed.delegations.succinctRoles);break;default:throw new TypeError(\"invalid metadata type\")}if(!s)throw new Ub.ValueError(`no delegation found for ${e}`);let n=new Set;if(s.keyIDs.forEach(c=>{let f=a[c];if(f)try{f.verifySignature(r),n.add(f.keyID)}catch{}}),n.size<s.threshold)throw new Ub.UnsignedMetadataError(`${e} was signed by ${n.size}/${s.threshold} keys`)}equals(e){return e instanceof t?this.signed.equals(e.signed)&&OPe.default.isDeepStrictEqual(this.signatures,e.signatures)&&OPe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(r=>r.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,r){let{signed:s,signatures:a,...n}=r;if(!xJ.guard.isDefined(s)||!xJ.guard.isObject(s))throw new TypeError(\"signed is not defined\");if(e!==s._type)throw new Ub.ValueError(`expected '${e}', got ${s._type}`);if(!xJ.guard.isObjectArray(a))throw new TypeError(\"signatures is not an array\");let c;switch(e){case f1.MetadataKind.Root:c=qBt.Root.fromJSON(s);break;case f1.MetadataKind.Timestamp:c=JBt.Timestamp.fromJSON(s);break;case f1.MetadataKind.Snapshot:c=YBt.Snapshot.fromJSON(s);break;case f1.MetadataKind.Targets:c=VBt.Targets.fromJSON(s);break;default:throw new TypeError(\"invalid metadata type\")}let f={};return a.forEach(p=>{let h=WBt.Signature.fromJSON(p);if(f[h.keyID])throw new Ub.ValueError(`multiple signatures found for keyid: ${h.keyID}`);f[h.keyID]=h}),new t(c,f,n)}};A1.Metadata=kJ});var eL=_(Fi=>{\"use strict\";Object.defineProperty(Fi,\"__esModule\",{value:!0});Fi.Timestamp=Fi.Targets=Fi.Snapshot=Fi.Signature=Fi.Root=Fi.Metadata=Fi.Key=Fi.TargetFile=Fi.MetaFile=Fi.ValueError=Fi.MetadataKind=void 0;var KBt=ay();Object.defineProperty(Fi,\"MetadataKind\",{enumerable:!0,get:function(){return KBt.MetadataKind}});var zBt=PA();Object.defineProperty(Fi,\"ValueError\",{enumerable:!0,get:function(){return zBt.ValueError}});var MPe=Tb();Object.defineProperty(Fi,\"MetaFile\",{enumerable:!0,get:function(){return MPe.MetaFile}});Object.defineProperty(Fi,\"TargetFile\",{enumerable:!0,get:function(){return MPe.TargetFile}});var XBt=NO();Object.defineProperty(Fi,\"Key\",{enumerable:!0,get:function(){return XBt.Key}});var ZBt=LPe();Object.defineProperty(Fi,\"Metadata\",{enumerable:!0,get:function(){return ZBt.Metadata}});var $Bt=hJ();Object.defineProperty(Fi,\"Root\",{enumerable:!0,get:function(){return $Bt.Root}});var evt=dJ();Object.defineProperty(Fi,\"Signature\",{enumerable:!0,get:function(){return evt.Signature}});var tvt=EJ();Object.defineProperty(Fi,\"Snapshot\",{enumerable:!0,get:function(){return tvt.Snapshot}});var rvt=vJ();Object.defineProperty(Fi,\"Targets\",{enumerable:!0,get:function(){return rvt.Targets}});var nvt=PJ();Object.defineProperty(Fi,\"Timestamp\",{enumerable:!0,get:function(){return nvt.Timestamp}})});var _Pe=_((Dir,UPe)=>{var p1=1e3,h1=p1*60,g1=h1*60,uy=g1*24,ivt=uy*7,svt=uy*365.25;UPe.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return ovt(t);if(r===\"number\"&&isFinite(t))return e.long?lvt(t):avt(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function ovt(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||\"ms\").toLowerCase();switch(s){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*svt;case\"weeks\":case\"week\":case\"w\":return r*ivt;case\"days\":case\"day\":case\"d\":return r*uy;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*g1;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*h1;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*p1;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function avt(t){var e=Math.abs(t);return e>=uy?Math.round(t/uy)+\"d\":e>=g1?Math.round(t/g1)+\"h\":e>=h1?Math.round(t/h1)+\"m\":e>=p1?Math.round(t/p1)+\"s\":t+\"ms\"}function lvt(t){var e=Math.abs(t);return e>=uy?tL(t,e,uy,\"day\"):e>=g1?tL(t,e,g1,\"hour\"):e>=h1?tL(t,e,h1,\"minute\"):e>=p1?tL(t,e,p1,\"second\"):t+\" ms\"}function tL(t,e,r,s){var a=e>=r*1.5;return Math.round(t/r)+\" \"+s+(a?\"s\":\"\")}});var QJ=_((bir,HPe)=>{function cvt(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=a,r.enabled=f,r.humanize=_Pe(),r.destroy=h,Object.keys(t).forEach(E=>{r[E]=t[E]}),r.names=[],r.skips=[],r.formatters={};function e(E){let C=0;for(let S=0;S<E.length;S++)C=(C<<5)-C+E.charCodeAt(S),C|=0;return r.colors[Math.abs(C)%r.colors.length]}r.selectColor=e;function r(E){let C,S=null,P,I;function R(...N){if(!R.enabled)return;let U=R,W=Number(new Date),ee=W-(C||W);U.diff=ee,U.prev=C,U.curr=W,C=W,N[0]=r.coerce(N[0]),typeof N[0]!=\"string\"&&N.unshift(\"%O\");let ie=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(le,me)=>{if(le===\"%%\")return\"%\";ie++;let pe=r.formatters[me];if(typeof pe==\"function\"){let Be=N[ie];le=pe.call(U,Be),N.splice(ie,1),ie--}return le}),r.formatArgs.call(U,N),(U.log||r.log).apply(U,N)}return R.namespace=E,R.useColors=r.useColors(),R.color=r.selectColor(E),R.extend=s,R.destroy=r.destroy,Object.defineProperty(R,\"enabled\",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(P!==r.namespaces&&(P=r.namespaces,I=r.enabled(E)),I),set:N=>{S=N}}),typeof r.init==\"function\"&&r.init(R),R}function s(E,C){let S=r(this.namespace+(typeof C>\"u\"?\":\":C)+E);return S.log=this.log,S}function a(E){r.save(E),r.namespaces=E,r.names=[],r.skips=[];let C=(typeof E==\"string\"?E:\"\").trim().replace(\" \",\",\").split(\",\").filter(Boolean);for(let S of C)S[0]===\"-\"?r.skips.push(S.slice(1)):r.names.push(S)}function n(E,C){let S=0,P=0,I=-1,R=0;for(;S<E.length;)if(P<C.length&&(C[P]===E[S]||C[P]===\"*\"))C[P]===\"*\"?(I=P,R=S,P++):(S++,P++);else if(I!==-1)P=I+1,R++,S=R;else return!1;for(;P<C.length&&C[P]===\"*\";)P++;return P===C.length}function c(){let E=[...r.names,...r.skips.map(C=>\"-\"+C)].join(\",\");return r.enable(\"\"),E}function f(E){for(let C of r.skips)if(n(E,C))return!1;for(let C of r.names)if(n(E,C))return!0;return!1}function p(E){return E instanceof Error?E.stack||E.message:E}function h(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")}return r.enable(r.load()),r}HPe.exports=cvt});var jPe=_((sc,rL)=>{sc.formatArgs=fvt;sc.save=Avt;sc.load=pvt;sc.useColors=uvt;sc.storage=hvt();sc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})();sc.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function uvt(){if(typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs))return!0;if(typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<\"u\"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function fvt(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+rL.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!==\"%%\"&&(r++,a===\"%c\"&&(s=r))}),t.splice(s,0,e)}sc.log=console.debug||console.log||(()=>{});function Avt(t){try{t?sc.storage.setItem(\"debug\",t):sc.storage.removeItem(\"debug\")}catch{}}function pvt(){let t;try{t=sc.storage.getItem(\"debug\")}catch{}return!t&&typeof process<\"u\"&&\"env\"in process&&(t=process.env.DEBUG),t}function hvt(){try{return localStorage}catch{}}rL.exports=QJ()(sc);var{formatters:gvt}=rL.exports;gvt.j=function(t){try{return JSON.stringify(t)}catch(e){return\"[UnexpectedJSONParseError]: \"+e.message}}});var qPe=_((Zs,iL)=>{var dvt=Ie(\"tty\"),nL=Ie(\"util\");Zs.init=Bvt;Zs.log=Ivt;Zs.formatArgs=yvt;Zs.save=Cvt;Zs.load=wvt;Zs.useColors=mvt;Zs.destroy=nL.deprecate(()=>{},\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\");Zs.colors=[6,2,3,4,5,1];try{let t=Ie(\"supports-color\");t&&(t.stderr||t).level>=2&&(Zs.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Zs.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,n)=>n.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s===\"null\"?s=null:s=Number(s),t[r]=s,t},{});function mvt(){return\"colors\"in Zs.inspectOpts?!!Zs.inspectOpts.colors:dvt.isatty(process.stderr.fd)}function yvt(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,a=\"\\x1B[3\"+(s<8?s:\"8;5;\"+s),n=`  ${a};1m${e} \\x1B[0m`;t[0]=n+t[0].split(`\n`).join(`\n`+n),t.push(a+\"m+\"+iL.exports.humanize(this.diff)+\"\\x1B[0m\")}else t[0]=Evt()+e+\" \"+t[0]}function Evt(){return Zs.inspectOpts.hideDate?\"\":new Date().toISOString()+\" \"}function Ivt(...t){return process.stderr.write(nL.formatWithOptions(Zs.inspectOpts,...t)+`\n`)}function Cvt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function wvt(){return process.env.DEBUG}function Bvt(t){t.inspectOpts={};let e=Object.keys(Zs.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Zs.inspectOpts[e[r]]}iL.exports=QJ()(Zs);var{formatters:GPe}=iL.exports;GPe.o=function(t){return this.inspectOpts.colors=this.useColors,nL.inspect(t,this.inspectOpts).split(`\n`).map(e=>e.trim()).join(\" \")};GPe.O=function(t){return this.inspectOpts.colors=this.useColors,nL.inspect(t,this.inspectOpts)}});var RJ=_((Pir,TJ)=>{typeof process>\"u\"||process.type===\"renderer\"||process.browser===!0||process.__nwjs?TJ.exports=jPe():TJ.exports=qPe()});var oL=_(Ki=>{\"use strict\";Object.defineProperty(Ki,\"__esModule\",{value:!0});Ki.DownloadHTTPError=Ki.DownloadLengthMismatchError=Ki.DownloadError=Ki.ExpiredMetadataError=Ki.EqualVersionError=Ki.BadVersionError=Ki.RepositoryError=Ki.PersistError=Ki.RuntimeError=Ki.ValueError=void 0;var FJ=class extends Error{};Ki.ValueError=FJ;var NJ=class extends Error{};Ki.RuntimeError=NJ;var OJ=class extends Error{};Ki.PersistError=OJ;var _b=class extends Error{};Ki.RepositoryError=_b;var sL=class extends _b{};Ki.BadVersionError=sL;var LJ=class extends sL{};Ki.EqualVersionError=LJ;var MJ=class extends _b{};Ki.ExpiredMetadataError=MJ;var Hb=class extends Error{};Ki.DownloadError=Hb;var UJ=class extends Hb{};Ki.DownloadLengthMismatchError=UJ;var _J=class extends Hb{constructor(e,r){super(e),this.statusCode=r}};Ki.DownloadHTTPError=_J});var YPe=_(d1=>{\"use strict\";var jJ=d1&&d1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(d1,\"__esModule\",{value:!0});d1.withTempFile=void 0;var HJ=jJ(Ie(\"fs/promises\")),vvt=jJ(Ie(\"os\")),WPe=jJ(Ie(\"path\")),Svt=async t=>Dvt(async e=>t(WPe.default.join(e,\"tempfile\")));d1.withTempFile=Svt;var Dvt=async t=>{let e=await HJ.default.realpath(vvt.default.tmpdir()),r=await HJ.default.mkdtemp(e+WPe.default.sep);try{return await t(r)}finally{await HJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var qJ=_(kg=>{\"use strict\";var lL=kg&&kg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kg,\"__esModule\",{value:!0});kg.DefaultFetcher=kg.BaseFetcher=void 0;var bvt=lL(RJ()),VPe=lL(Ie(\"fs\")),Pvt=lL(CO()),xvt=lL(Ie(\"util\")),JPe=oL(),kvt=YPe(),Qvt=(0,bvt.default)(\"tuf:fetch\"),aL=class{async downloadFile(e,r,s){return(0,kvt.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=VPe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new JPe.DownloadLengthMismatchError(\"Max length reached\");await Tvt(f,h)}}finally{await xvt.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=VPe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};kg.BaseFetcher=aL;var GJ=class extends aL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){Qvt(\"GET %s\",e);let r=await(0,Pvt.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new JPe.DownloadHTTPError(\"Failed to download\",r.status);return r.body}};kg.DefaultFetcher=GJ;var Tvt=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var KPe=_(cL=>{\"use strict\";Object.defineProperty(cL,\"__esModule\",{value:!0});cL.defaultConfig=void 0;cL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var zPe=_(uL=>{\"use strict\";Object.defineProperty(uL,\"__esModule\",{value:!0});uL.TrustedMetadataStore=void 0;var Es=eL(),Hi=oL(),WJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError(\"No trusted root metadata\");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Root,r);if(s.signed.type!=Es.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Es.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Hi.RuntimeError(\"Cannot update timestamp after snapshot\");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"Final root.json is expired\");let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Timestamp,r);if(s.signed.type!=Es.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Hi.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Hi.EqualVersionError(`New timestamp version ${s.signed.version} is equal to current version ${this.timestamp.signed.version}`);let a=this.timestamp.signed.snapshotMeta,n=s.signed.snapshotMeta;if(n.version<a.version)throw new Hi.BadVersionError(`New snapshot version ${n.version} is less than current version ${a.version}`)}return this.trustedSet.timestamp=s,this.checkFinalTimestamp(),s}updateSnapshot(e,r=!1){if(!this.timestamp)throw new Hi.RuntimeError(\"Cannot update snapshot before timestamp\");if(this.targets)throw new Hi.RuntimeError(\"Cannot update snapshot after targets\");this.checkFinalTimestamp();let s=this.timestamp.signed.snapshotMeta;r||s.verify(e);let a=JSON.parse(e.toString(\"utf8\")),n=Es.Metadata.fromJSON(Es.MetadataKind.Snapshot,a);if(n.signed.type!=Es.MetadataKind.Snapshot)throw new Hi.RepositoryError(`Expected 'snapshot', got ${n.signed.type}`);return this.root.verifyDelegate(Es.MetadataKind.Snapshot,n),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([c,f])=>{let p=n.signed.meta[c];if(!p)throw new Hi.RepositoryError(`Missing file ${c} in new snapshot`);if(p.version<f.version)throw new Hi.BadVersionError(`New version ${p.version} of ${c} is less than current version ${f.version}`)}),this.trustedSet.snapshot=n,this.checkFinalSnapsnot(),n}updateDelegatedTargets(e,r,s){if(!this.snapshot)throw new Hi.RuntimeError(\"Cannot update delegated targets before snapshot\");this.checkFinalSnapsnot();let a=this.trustedSet[s];if(!a)throw new Hi.RuntimeError(`No trusted ${s} metadata`);let n=this.snapshot.signed.meta?.[`${r}.json`];if(!n)throw new Hi.RepositoryError(`Missing ${r}.json in snapshot`);n.verify(e);let c=JSON.parse(e.toString(\"utf8\")),f=Es.Metadata.fromJSON(Es.MetadataKind.Targets,c);if(f.signed.type!=Es.MetadataKind.Targets)throw new Hi.RepositoryError(`Expected 'targets', got ${f.signed.type}`);a.verifyDelegate(r,f);let p=f.signed.version;if(p!=n.version)throw new Hi.BadVersionError(`Version ${p} of ${r} does not match snapshot version ${n.version}`);if(f.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(`${r}.json is expired`);this.trustedSet[r]=f}loadTrustedRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Root,r);if(s.signed.type!=Es.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);s.verifyDelegate(Es.MetadataKind.Root,s),this.trustedSet.root=s}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.timestamp.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"Final timestamp.json is expired\")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError(\"No trusted snapshot metadata\");if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.snapshot.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"snapshot.json is expired\");let e=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==e.version)throw new Hi.BadVersionError(\"Snapshot version doesn't match timestamp\")}};uL.TrustedMetadataStore=WJ});var XPe=_(YJ=>{\"use strict\";Object.defineProperty(YJ,\"__esModule\",{value:!0});YJ.join=Fvt;var Rvt=Ie(\"url\");function Fvt(t,e){return new Rvt.URL(Nvt(t)+Ovt(e)).toString()}function Nvt(t){return t.endsWith(\"/\")?t:t+\"/\"}function Ovt(t){return t.startsWith(\"/\")?t.slice(1):t}});var ZPe=_(nu=>{\"use strict\";var Lvt=nu&&nu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Mvt=nu&&nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KJ=nu&&nu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lvt(e,t,r);return Mvt(e,t),e},Uvt=nu&&nu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nu,\"__esModule\",{value:!0});nu.Updater=void 0;var xA=eL(),_vt=Uvt(RJ()),m1=KJ(Ie(\"fs\")),fL=KJ(Ie(\"path\")),Hvt=KPe(),fy=oL(),jvt=qJ(),Gvt=zPe(),jb=KJ(XPe()),VJ=(0,_vt.default)(\"tuf:cache\"),JJ=class{constructor(e){let{metadataDir:r,metadataBaseUrl:s,targetDir:a,targetBaseUrl:n,fetcher:c,config:f}=e;this.dir=r,this.metadataBaseUrl=s,this.targetDir=a,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let p=this.loadLocalMetadata(xA.MetadataKind.Root);this.trustedSet=new Gvt.TrustedMetadataStore(p),this.config={...Hvt.defaultConfig,...f},this.fetcher=c||new jvt.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(xA.MetadataKind.Targets,xA.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,r,s){let a=r||this.generateTargetPath(e);if(!s){if(!this.targetBaseUrl)throw new fy.ValueError(\"Target base URL not set\");s=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let p=Object.values(e.hashes),{dir:h,base:E}=fL.parse(n),C=`${p[0]}.${E}`;n=h?`${h}/${C}`:C}let f=jb.join(s,n);return await this.fetcher.downloadFile(f,e.length,async p=>{await e.verify(m1.createReadStream(p)),VJ(\"WRITE %s\",a),m1.copyFileSync(p,a)}),a}async findCachedTarget(e,r){r||(r=this.generateTargetPath(e));try{if(m1.existsSync(r))return await e.verify(m1.createReadStream(r)),r}catch{return}}loadLocalMetadata(e){let r=fL.join(this.dir,`${e}.json`);return VJ(\"READ %s\",r),m1.readFileSync(r)}async loadRoot(){let r=this.trustedSet.root.signed.version+1,s=r+this.config.maxRootRotations;for(let a=r;a<s;a++){let n=jb.join(this.metadataBaseUrl,`${a}.root.json`);try{let c=await this.fetcher.downloadBytes(n,this.config.rootMaxLength);this.trustedSet.updateRoot(c),this.persistMetadata(xA.MetadataKind.Root,c)}catch(c){if(c instanceof fy.DownloadHTTPError&&[403,404].includes(c.statusCode))break;throw c}}}async loadTimestamp({checkRemote:e}={checkRemote:!0}){try{let a=this.loadLocalMetadata(xA.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(a),!e)return}catch{}let r=jb.join(this.metadataBaseUrl,\"timestamp.json\"),s=await this.fetcher.downloadBytes(r,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(s)}catch(a){if(a instanceof fy.EqualVersionError)return;throw a}this.persistMetadata(xA.MetadataKind.Timestamp,s)}async loadSnapshot(){try{let e=this.loadLocalMetadata(xA.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(e,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError(\"No timestamp metadata\");let r=this.trustedSet.timestamp.signed.snapshotMeta,s=r.length||this.config.snapshotMaxLength,a=this.trustedSet.root.signed.consistentSnapshot?r.version:void 0,n=jb.join(this.metadataBaseUrl,a?`${a}.snapshot.json`:\"snapshot.json\");try{let c=await this.fetcher.downloadBytes(n,s);this.trustedSet.updateSnapshot(c),this.persistMetadata(xA.MetadataKind.Snapshot,c)}catch(c){throw new fy.RuntimeError(`Unable to load snapshot metadata error ${c}`)}}}async loadTargets(e,r){if(this.trustedSet.getRole(e))return this.trustedSet.getRole(e);try{let s=this.loadLocalMetadata(e);this.trustedSet.updateDelegatedTargets(s,e,r)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError(\"No snapshot metadata\");let a=this.trustedSet.snapshot.signed.meta[`${e}.json`],n=a.length||this.config.targetsMaxLength,c=this.trustedSet.root.signed.consistentSnapshot?a.version:void 0,f=encodeURIComponent(e),p=jb.join(this.metadataBaseUrl,c?`${c}.${f}.json`:`${f}.json`);try{let h=await this.fetcher.downloadBytes(p,n);this.trustedSet.updateDelegatedTargets(h,e,r),this.persistMetadata(e,h)}catch(h){throw new fy.RuntimeError(`Unable to load targets error ${h}`)}}return this.trustedSet.getRole(e)}async preorderDepthFirstWalk(e){let r=[{roleName:xA.MetadataKind.Targets,parentRoleName:xA.MetadataKind.Root}],s=new Set;for(;s.size<=this.config.maxDelegations&&r.length>0;){let{roleName:a,parentRoleName:n}=r.pop();if(s.has(a))continue;let c=(await this.loadTargets(a,n))?.signed;if(!c)continue;let f=c.targets?.[e];if(f)return f;if(s.add(a),c.delegations){let p=[],h=c.delegations.rolesForTarget(e);for(let{role:E,terminating:C}of h)if(p.push({roleName:E,parentRoleName:a}),C){r.splice(0);break}p.reverse(),r.push(...p)}}}generateTargetPath(e){if(!this.targetDir)throw new fy.ValueError(\"Target directory not set\");let r=encodeURIComponent(e.path);return fL.join(this.targetDir,r)}persistMetadata(e,r){let s=encodeURIComponent(e);try{let a=fL.join(this.dir,`${s}.json`);VJ(\"WRITE %s\",a),m1.writeFileSync(a,r.toString(\"utf8\"))}catch(a){throw new fy.PersistError(`Failed to persist metadata ${s} error: ${a}`)}}};nu.Updater=JJ});var $Pe=_(Qg=>{\"use strict\";Object.defineProperty(Qg,\"__esModule\",{value:!0});Qg.Updater=Qg.BaseFetcher=Qg.TargetFile=void 0;var qvt=eL();Object.defineProperty(Qg,\"TargetFile\",{enumerable:!0,get:function(){return qvt.TargetFile}});var Wvt=qJ();Object.defineProperty(Qg,\"BaseFetcher\",{enumerable:!0,get:function(){return Wvt.BaseFetcher}});var Yvt=ZPe();Object.defineProperty(Qg,\"Updater\",{enumerable:!0,get:function(){return Yvt.Updater}})});var XJ=_(AL=>{\"use strict\";Object.defineProperty(AL,\"__esModule\",{value:!0});AL.TUFError=void 0;var zJ=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}};AL.TUFError=zJ});var exe=_(Gb=>{\"use strict\";var Vvt=Gb&&Gb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gb,\"__esModule\",{value:!0});Gb.readTarget=Kvt;var Jvt=Vvt(Ie(\"fs\")),pL=XJ();async function Kvt(t,e){let r=await zvt(t,e);return new Promise((s,a)=>{Jvt.default.readFile(r,\"utf-8\",(n,c)=>{n?a(new pL.TUFError({code:\"TUF_READ_TARGET_ERROR\",message:`error reading target ${r}`,cause:n})):s(c)})})}async function zvt(t,e){let r;try{r=await t.getTargetInfo(e)}catch(a){throw new pL.TUFError({code:\"TUF_REFRESH_METADATA_ERROR\",message:\"error refreshing TUF metadata\",cause:a})}if(!r)throw new pL.TUFError({code:\"TUF_FIND_TARGET_ERROR\",message:`target ${e} not found`});let s=await t.findCachedTarget(r);if(!s)try{s=await t.downloadTarget(r)}catch(a){throw new pL.TUFError({code:\"TUF_DOWNLOAD_TARGET_ERROR\",message:`error downloading target ${s}`,cause:a})}return s}});var txe=_((Uir,Xvt)=>{Xvt.exports={\"https://tuf-repo-cdn.sigstore.dev\":{\"root.json\":\"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGM3NjhiMmY4NmRhOTk1NjkwMTljMTYwYTA4MWRhNTRhZTM2YzM0YzBhMzEyMGQzY2I2OWI1M2I3ZDExMzc1OGUwMjIwNGY2NzE1MThmNjE3YjIwZDQ2NTM3ZmFlNmMzYjYzYmFlODkxM2Y0ZjE5NjIxNTYxMDVjYzRmMDE5YWMzNWM2YSIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDUwMjIxMDBiNDQzNGU2OTk1ZDM2OGQyM2U3NDc1OWFjZDBjYjkwMTNjODNhNWQzNTExZjBmOTk3ZWM1NGM0NTZhZTQzNTBhMDIyMDE1YjBlMjY1ZDE4MmQyYjYxZGM3NGUxNTVkOThiM2MzZmJlNTY0YmEwNTI4NmFhMTRjOGRmMDJjOWI3NTY1MTYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgInNpZyI6ICIzMDQ1MDIyMTAwODJjNTg0MTFkOTg5ZWI5Zjg2MTQxMDg1N2Q0MjM4MTU5MGVjOTQyNGRiZGFhNTFlNzhlZDEzNTE1NDMxOTA0ZTAyMjAxMTgxODVkYTZhNmMyOTQ3MTMxYzE3Nzk3ZTJiYjc2MjBjZTI2ZTVmMzAxZDFjZWFjNWYyYTdlNThmOWRjZjJlIgogIH0sCiAgewogICAia2V5aWQiOiAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGM3ODUxMzg1NGNhZTljMzJlYWE2Yjg4ZTE4OTEyZjQ4MDA2YzI3NTdhMjU4ZjkxNzMxMmNhYmE3NTk0OGViOWUwMjIxMDBkOWUxYjRjZTBhZGZlOWZkMmUyMTQ4ZDdmYTI3YTJmNDBiYTExMjJiZDY5ZGE3NjEyZDhkMTc3NmIwMTNjOTFkIgogIH0sCiAgewogICAia2V5aWQiOiAiZmRmYTgzYTA3YjVhODM1ODliODdkZWQ0MWY3N2YzOWQyMzJhZDkxZjdjY2U1Mjg2OGRhY2QwNmJhMDg5ODQ5ZiIsCiAgICJzaWciOiAiMzA0NTAyMjA1NjQ4M2EyZDVkOWVhOWNlYzZlMTFlYWRmYjMzYzQ4NGI2MTQyOThmYWNhMTVhY2YxYzQzMWIxMWVkN2Y3MzRjMDIyMTAwZDBjMWQ3MjZhZjkyYTg3ZTRlNjY0NTljYTVhZGYzOGEwNWI0NGUxZjk0MzE4NDIzZjk1NGJhZThiY2E1YmIyZSIKICB9LAogIHsKICAgImtleWlkIjogImUyZjU5YWNiOTQ4ODUxOTQwN2UxOGNiZmM5MzI5NTEwYmUwM2MwNGFjYTk5MjlkMmYwMzAxMzQzZmVjODU1MjMiLAogICAic2lnIjogIjMwNDYwMjIxMDBkMDA0ZGU4ODAyNGMzMmRjNTY1M2E5ZjQ4NDNjZmM1MjE1NDI3MDQ4YWQ5NjAwZDJjZjljOTY5ZTZlZGZmM2QyMDIyMTAwZDllYmI3OThmNWZjNjZhZjEwODk5ZGVjZTAxNGE4NjI4Y2NmM2M1NDAyY2Q0YTQyNzAyMDc0NzJmOGY2ZTcxMiIKICB9LAogIHsKICAgImtleWlkIjogIjNjMzQ0YWEwNjhmZDRjYzRlODdkYzUwYjYxMmMwMjQzMWZiYzc3MWU5NTAwMzk5MzY4M2EyYjBiZjI2MGNmMGUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiN2IwOTk5NmM0NWNhMmQ0YjA1NjAzZTU2YmFlZmEyOTcxOGEwYjcxMTQ3Y2Y4YzZlNjYzNDliYWE2MTQ3N2RmMDIyMTAwYzRkYTgwYzcxN2I0ZmE3YmJhMGZkNWM3MmRhOGEwNDk5MzU4YjAxMzU4YjIzMDlmNDFkMTQ1NmVhMWU3ZTFkOSIKICB9LAogIHsKICAgImtleWlkIjogImVjODE2Njk3MzRlMDE3OTk2YzViODVmM2QwMmMzZGUxZGQ0NjM3YTE1MjAxOWZlMWFmMTI1ZDJmOTM2OGI5NWUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiZTk3ODJjMzA3NDRlNDExYTgyZmE4NWI1MTM4ZDYwMWNlMTQ4YmMxOTI1OGFlYzY0ZTdlYzI0NDc4ZjM4ODEyMDIyMTAwY2FlZjYzZGNhZjFhNGI5YTUwMGQzYmQwZTNmMTY0ZWMxOGYxYjYzZDdhOTQ2MGQ5YWNhYjEwNjZkYjBmMDE2ZCIKICB9LAogIHsKICAgImtleWlkIjogIjFlMWQ2NWNlOThiMTBhZGRhZDQ3NjRmZWJmN2RkYTJkMDQzNmIzZDNhMzg5MzU3OWMwZGRkYWVhMjBlNTQ4NDkiLAogICAic2lnIjogIjMwNDUwMjIwNzQ2ZWMzZjg1MzRjZTU1NTMxZDBkMDFmZjY0OTY0ZWY0NDBkMWU3ZDJjNGMxNDI0MDliOGU5NzY5ZjFhZGE2ZjAyMjEwMGUzYjkyOWZjZDkzZWExOGZlYWEwODI1ODg3YTcyMTA0ODk4NzlhNjY3ODBjMDdhODNmNGJkNDZlMmYwOWFiM2IiCiAgfQogXSwKICJzaWduZWQiOiB7CiAgIl90eXBlIjogInJvb3QiLAogICJjb25zaXN0ZW50X3NuYXBzaG90IjogdHJ1ZSwKICAiZXhwaXJlcyI6ICIyMDI1LTAyLTE5VDA4OjA0OjMyWiIsCiAgImtleXMiOiB7CiAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFekJ6Vk9tSENQb2pNVkxTSTM2NFdpaVY4TlByRFxuNklnUnhWbGlza3ovdit5M0pFUjVtY1ZHY09ObGlEY1dNQzVKMmxmSG1qUE5QaGI0SDd4bThMemZTQT09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBzYW50aWFnb3RvcnJlcyIKICAgfSwKICAgIjYxNjQzODM4MTI1YjQ0MGI0MGRiNjk0MmY1Y2I1YTMxYzBkYzA0MzY4MzE2ZWIyYWFhNThiOTU5MDRhNTgyMjIiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpbmlrU3NBUW1Za05lSDVlWXEvQ25JekxhYWNPXG54bFNhYXdRRE93cUt5L3RDcXhxNXh4UFNKYzIxSzRXSWhzOUd5T2tLZnp1ZVkzR0lMemNNSlo0Y1d3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGJvYmNhbGxhd2F5IgogICB9LAogICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXk4WEtzbWhCWURJOEpjMEd3ekJ4ZUtheDBjbTVcblNUS0VVNjVIUEZ1blVuNDFzVDhwaTBGak00SWtIei9ZVW13bUxVTzBXdDdseGhqNkJrTElLNHFZQXc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAZGxvcmVuYyIKICAgfSwKICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVXUmlHcjUraiszSjVTc0grWnRyNW5FMkgyd083XG5CVituTzNzOTNnTGNhMThxVE96SFkxb1d5QUdEeWtNU3NHVFVCU3Q5RCtBbjBLZktzRDJtZlNNNDJRPT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2ktb25saW5lLXVyaSI6ICJnY3BrbXM6Ly9wcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wIgogICB9LAogICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTBnaHJoOTJMdzFZcjNpZEdWNVdxQ3RNREI4Q3hcbitEOGhkQzR3MlpMTklwbFZSb1ZHTHNrWWEzZ2hlTXlPamlKOGtQaTE1YVEyLy83UCtvajdVdkpQR3c9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAam9zaHVhZ2wiCiAgIH0sCiAgICJlNzFhNTRkNTQzODM1YmE4NmFkYWQ5NDYwMzc5Yzc2NDFmYjg3MjZkMTY0ZWE3NjY4MDFhMWM1MjJhYmE3ZWEyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFRVhzejNTWlhGYjhqTVY0Mmo2cEpseWpialI4S1xuTjNCd29jZXhxNkxNSWI1cXNXS09RdkxOMTZOVWVmTGM0SHN3T291bVJzVlZhYWpTcFFTNmZvYmtSdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBtbm02NzgiCiAgIH0KICB9LAogICJyb2xlcyI6IHsKICAgInJvb3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI2ZjI2MDA4OWQ1OTIzZGFmMjAxNjZjYTY1N2M1NDNhZjYxODM0NmFiOTcxODg0YTk5OTYyYjAxOTg4YmJlMGMzIiwKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMwogICB9LAogICAic25hcHNob3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI3MjQ3ZjBkYmFkODViMTQ3ZTE4NjNiYWRlNzYxMjQzY2M3ODVkY2I3YWE0MTBlNzEwNWRkM2QyYjYxYTM2ZDJjIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiAzNjUwLAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogMzY1CiAgIH0sCiAgICJ0YXJnZXRzIjogewogICAgImtleWlkcyI6IFsKICAgICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInRpbWVzdGFtcCI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDEsCiAgICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDcsCiAgICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0CiAgIH0KICB9LAogICJzcGVjX3ZlcnNpb24iOiAiMS4wIiwKICAidmVyc2lvbiI6IDEwLAogICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMTgyLAogICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDMxCiB9Cn0=\",targets:{\"trusted_root.json\":\"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjcuMDAwWiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAid05JOWF0UUdseitWV2ZPNkxSeWdINFFVZlkvOFc0UkZ3aVQ1aTVXUmdCMD0iCiAgICAgIH0KICAgIH0KICBdLAogICJjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQitEQ0NBWDZnQXdJQkFnSVROVmtEWm9DaW9mUERzeTdkZm02Z2VMYnVoekFLQmdncWhrak9QUVFEQXpBcU1SVXdFd1lEVlFRS0V3eHphV2R6ZEc5eVpTNWtaWFl4RVRBUEJnTlZCQU1UQ0hOcFozTjBiM0psTUI0WERUSXhNRE13TnpBek1qQXlPVm9YRFRNeE1ESXlNekF6TWpBeU9Wb3dLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQjJNQkFHQnlxR1NNNDlBZ0VHQlN1QkJBQWlBMklBQkxTeUE3SWk1aytwTk84WkVXWTB5bGVtV0Rvd09rTmEza0wrR1pFNVo1R1dlaEw5L0E5YlJOQTNSYnJzWjVpMEpjYXN0YVJMN1NwNWZwL2pENWR4cWMvVWRUVm5sdlMxNmFuKzJZZnN3ZS9RdUxvbFJVQ3JjT0UyKzJpQTUrdHpkNk5tTUdRd0RnWURWUjBQQVFIL0JBUURBZ0VHTUJJR0ExVWRFd0VCL3dRSU1BWUJBZjhDQVFFd0hRWURWUjBPQkJZRUZNakZIUUJCbWlRcE1sRWs2dzJ1U3UxS0J0UHNNQjhHQTFVZEl3UVlNQmFBRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01Bb0dDQ3FHU000OUJBTURBMmdBTUdVQ01IOGxpV0pmTXVpNnZYWEJoakRnWTRNd3NsbU4vVEp4VmUvODNXckZvbXdtTmYwNTZ5MVg0OEY5YzRtM2Ezb3pYQUl4QUtqUmF5NS9hai9qc0tLR0lrbVFhdGpJOHV1cEhyLytDeEZ2YUpXbXBZcU5rTERHUlUrOW9yemg1aEkyUnJjdWFRPT0iCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMDdUMDM6MjA6MjkuMDAwWiIsCiAgICAgICAgImVuZCI6ICIyMDIyLTEyLTMxVDIzOjU5OjU5Ljk5OVoiCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDR2pDQ0FhR2dBd0lCQWdJVUFMblZpVmZuVTBickphc21Sa0hybi9VbmZhUXdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1qQTBNVE15TURBMk1UVmFGdzB6TVRFd01EVXhNelUyTlRoYU1EY3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFZU1Cd0dBMVVFQXhNVmMybG5jM1J2Y21VdGFXNTBaWEp0WldScFlYUmxNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRThSVlMveXNIK05PdnVEWnlQSVp0aWxnVUY5TmxhcllwQWQ5SFAxdkJCSDFVNUNWNzdMU1M3czBaaUg0bkU3SHY3cHRTNkx2dlIvU1RrNzk4TFZnTXpMbEo0SGVJZkYzdEhTYWV4TGNZcFNBU3Ixa1MwTi9SZ0JKei85aldDaVhubzNzd2VUQU9CZ05WSFE4QkFmOEVCQU1DQVFZd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3TXdFZ1lEVlIwVEFRSC9CQWd3QmdFQi93SUJBREFkQmdOVkhRNEVGZ1FVMzlQcHoxWWtFWmI1cU5qcEtGV2l4aTRZWkQ4d0h3WURWUjBqQkJnd0ZvQVVXTUFlWDVGRnBXYXBlc3lRb1pNaTBDckZ4Zm93Q2dZSUtvWkl6ajBFQXdNRFp3QXdaQUl3UENzUUs0RFlpWllEUElhRGk1SEZLbmZ4WHg2QVNTVm1FUmZzeW5ZQmlYMlg2U0pSblpVODQvOURaZG5GdnZ4bUFqQk90NlFwQmxjNEovMER4dmtUQ3FwY2x2emlMNkJDQ1BuamRsSUIzUHUzQnhzUG15Z1VZN0lpMnpiZENkbGlpb3c9IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVQUxaTkFQRmR4SFB3amVEbG9Ed3lZQ2hBTy80d0NnWUlLb1pJemowRUF3TXdLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQWVGdzB5TVRFd01EY3hNelUyTlRsYUZ3MHpNVEV3TURVeE16VTJOVGhhTUNveEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVSTUE4R0ExVUVBeE1JYzJsbmMzUnZjbVV3ZGpBUUJnY3Foa2pPUFFJQkJnVXJnUVFBSWdOaUFBVDdYZUZUNHJiM1BRR3dTNElhanRMazMvT2xucGdhbmdhQmNsWXBzWUJyNWkrNHluQjA3Y2ViM0xQME9JT1pkeGV4WDY5YzVpVnV5SlJRK0h6MDV5aStVRjN1QldBbEhwaVM1c2gwK0gyR0hFN1NYcmsxRUM1bTFUcjE5TDlnZzkyall6QmhNQTRHQTFVZER3RUIvd1FFQXdJQkJqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFmQmdOVkhTTUVHREFXZ0JSWXdCNWZrVVdsWnFsNnpKQ2hreUxRS3NYRitqQUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUFqMW5IZVhacCsxM05XQk5hK0VEc0RQOEcxV1dnMXRDTVdQL1dIUHFwYVZvMGpoc3dlTkZaZ1NzMGVFN3dZSTRxQWpFQTJXQjlvdDk4c0lrb0YzdlpZZGQzL1Z0V0I1YjlUTk1lYTdJeC9zdEo1VGZjTExlQUJMRTRCTkpPc1E0dm5CSEoiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjItMDQtMTNUMjA6MDY6MTUuMDAwWiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDAuMDAwWiIsCiAgICAgICAgICAiZW5kIjogIjIwMjItMTAtMzFUMjM6NTk6NTkuOTk5WiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAiQ0dDUzhDaFMvMmhGMGRGcko0U2NSV2NZckJZOXd6alNiZWE4SWdZMmIzST0iCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vY3RmZS5zaWdzdG9yZS5kZXYvMjAyMiIsCiAgICAgICJoYXNoQWxnb3JpdGhtIjogIlNIQTJfMjU2IiwKICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAicmF3Qnl0ZXMiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaVBTbEZpMENtRlRmRWpDVXFGOUh1Q0VjWVhOS0FhWWFsSUptQlo4eXllelBqVHFoeHJLQnBNbmFvY1Z0TEpCSTFlTTN1WG5RelFHQUpkSjRnczlGeXc9PSIsCiAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEwLTIwVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgfQogICAgICB9LAogICAgICAibG9nSWQiOiB7CiAgICAgICAgImtleUlkIjogIjNUMHdhc2JIRVRKakdSNGNtV2MzQXFKS1hyamVQSzMvaDRweWdDOHA3bzQ9IgogICAgICB9CiAgICB9CiAgXSwKICAidGltZXN0YW1wQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAiR2l0SHViLCBJbmMuIiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJJbnRlcm5hbCBTZXJ2aWNlcyBSb290IgogICAgICB9LAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCM0RDQ0FXS2dBd0lCQWdJVWNoa05zSDM2WGEwNGIxTHFJYytxcjlEVmVjTXdDZ1lJS29aSXpqMEVBd013TWpFVk1CTUdBMVVFQ2hNTVIybDBTSFZpTENCSmJtTXVNUmt3RndZRFZRUURFeEJVVTBFZ2FXNTBaWEp0WldScFlYUmxNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVEkwTURReE16QXdNREF3TUZvd01qRVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVJrd0Z3WURWUVFERXhCVVUwRWdWR2x0WlhOMFlXMXdhVzVuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFVUQ1Wk5iU3FZTWQ2cjhxcE9PRVg5aWJHblpUOUdzdVhPaHIvZjhVOUZKdWdCR0V4S1lwNDBPVUxTMGVyalpXN3hWOXhWNTJObkpmNU9lRHE0ZTVaS3FOV01GUXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CTUdBMVVkSlFRTU1Bb0dDQ3NHQVFVRkJ3TUlNQXdHQTFVZEV3RUIvd1FDTUFBd0h3WURWUjBqQkJnd0ZvQVVhVzFSdWRPZ1Z0MGxlcVkwV0tZYnVQcjQ3d0F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl3YlVIOUh2RDRlakNaSk9XUW5xQWxrcVVSbGx2dTlNOCtWcUxiaVJLK3pTZlpDWndzaWxqUm44TVFRUlNrWEVFNUFqRUFnK1Z4cXRvamZWZnU4RGh6emhDeDlHS0VUYkpIYjE5aVY3Mm1NS1ViREFGbXpaNmJROGI1NFpiOHRpZHk1YVdlIgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUNFRENDQVpXZ0F3SUJBZ0lVWDhaTzVRWFA3dk40ZE1RNWU5c1UzbnViOE9nd0NnWUlLb1pJemowRUF3TXdPREVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1SOHdIUVlEVlFRREV4WkpiblJsY201aGJDQlRaWEoyYVdObGN5QlNiMjkwTUI0WERUSXpNRFF4TkRBd01EQXdNRm9YRFRJNE1EUXhNakF3TURBd01Gb3dNakVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1Sa3dGd1lEVlFRREV4QlVVMEVnYVc1MFpYSnRaV1JwWVhSbE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFdk1MWS9kVFZidklKWUFOQXVzekV3Sm5RRTFsbGZ0eW55TUtJTWhoNDhIbXFiVnI1eWd5YnpzTFJMVktiQldPZFoyMWFlSnorZ1ppeXRaZXRxY3lGOVdsRVI1TkVNZjZKVjdaTm9qUXB4SHE0UkhHb0dTY2VRdi9xdlRpWnhFREtvMll3WkRBT0JnTlZIUThCQWY4RUJBTUNBUVl3RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVWFXMVJ1ZE9nVnQwbGVxWTBXS1lidVByNDd3QXdId1lEVlIwakJCZ3dGb0FVOU5ZWWxvYm5BRzRjMC9xanh5SC9scS93eitRd0NnWUlLb1pJemowRUF3TURhUUF3WmdJeEFLMUIxODV5Z0NySVlGbElzM0dqc3dqbndTTUc2TFk4d29MVmRha0tEWnhWYThmOGNxTXMxRGhjeEowKzA5dzk1UUl4QU8rdEJ6Wms3dmpVSjlpSmdENFI2WldUeFFXS3FObTc0ak85OW8rbzlzdjRGSS9TWlRaVEZ5TW4wSUpFSGRObXlBPT0iCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQjlEQ0NBWHFnQXdJQkFnSVVhL0pBa2RVaks0SlV3c3F0YWlSSkdXaHFMU293Q2dZSUtvWkl6ajBFQXdNd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVE16TURReE1UQXdNREF3TUZvd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWY5akZBWHh6NGt4NjhBSFJNT2tGQmhmbERjTVR2emFYejR4L0ZDY1hqSi8xcUVLb24vcVBJR25hVVJza0R0eU5iTkRPcGVKVERERnF0NDhpTVBybnpweDZJWndxZW1mVUpONHhCRVpmemErcFl0L2l5b2QrOXRacjIwUlJXU3YvbzBVd1F6QU9CZ05WSFE4QkFmOEVCQU1DQVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K\",\"registry.npmjs.org%2Fkeys.json\":\"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K\"}}}});var nxe=_(y1=>{\"use strict\";var rxe=y1&&y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(y1,\"__esModule\",{value:!0});y1.TUFClient=void 0;var Tg=rxe(Ie(\"fs\")),qb=rxe(Ie(\"path\")),Zvt=$Pe(),$vt=hL(),eSt=exe(),$J=\"targets\",ZJ=class{constructor(e){let r=new URL(e.mirrorURL),s=encodeURIComponent(r.host+r.pathname.replace(/\\/$/,\"\")),a=qb.default.join(e.cachePath,s);tSt(a),rSt({cachePath:a,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=nSt({mirrorURL:e.mirrorURL,cachePath:a,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,eSt.readTarget)(this.updater,e)}};y1.TUFClient=ZJ;function tSt(t){let e=qb.default.join(t,$J);Tg.default.existsSync(t)||Tg.default.mkdirSync(t,{recursive:!0}),Tg.default.existsSync(e)||Tg.default.mkdirSync(e)}function rSt({cachePath:t,mirrorURL:e,tufRootPath:r,forceInit:s}){let a=qb.default.join(t,\"root.json\");if(!Tg.default.existsSync(a)||s)if(r)Tg.default.copyFileSync(r,a);else{let c=txe()[e];if(!c)throw new $vt.TUFError({code:\"TUF_INIT_CACHE_ERROR\",message:`No root.json found for mirror: ${e}`});Tg.default.writeFileSync(a,Buffer.from(c[\"root.json\"],\"base64\")),Object.entries(c.targets).forEach(([f,p])=>{Tg.default.writeFileSync(qb.default.join(t,$J,f),Buffer.from(p,\"base64\"))})}}function nSt(t){let e={fetchTimeout:t.timeout,fetchRetry:t.retry};return new Zvt.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:qb.default.join(t.cachePath,$J),forceCache:t.forceCache,config:e})}});var hL=_(gh=>{\"use strict\";Object.defineProperty(gh,\"__esModule\",{value:!0});gh.TUFError=gh.DEFAULT_MIRROR_URL=void 0;gh.getTrustedRoot=fSt;gh.initTUF=ASt;var iSt=yb(),sSt=Obe(),oSt=nxe();gh.DEFAULT_MIRROR_URL=\"https://tuf-repo-cdn.sigstore.dev\";var aSt=\"sigstore-js\",lSt={retries:2},cSt=5e3,uSt=\"trusted_root.json\";async function fSt(t={}){let r=await ixe(t).getTarget(uSt);return iSt.TrustedRoot.fromJSON(JSON.parse(r))}async function ASt(t={}){let e=ixe(t);return e.refresh().then(()=>e)}function ixe(t){return new oSt.TUFClient({cachePath:t.cachePath||(0,sSt.appDataPath)(aSt),rootPath:t.rootPath,mirrorURL:t.mirrorURL||gh.DEFAULT_MIRROR_URL,retry:t.retry??lSt,timeout:t.timeout??cSt,forceCache:t.forceCache??!1,forceInit:t.forceInit??t.force??!1})}var pSt=XJ();Object.defineProperty(gh,\"TUFError\",{enumerable:!0,get:function(){return pSt.TUFError}})});var sxe=_(gL=>{\"use strict\";Object.defineProperty(gL,\"__esModule\",{value:!0});gL.DSSESignatureContent=void 0;var Wb=Cl(),eK=class{constructor(e){this.env=e}compareDigest(e){return Wb.crypto.bufferEqual(e,Wb.crypto.digest(\"sha256\",this.env.payload))}compareSignature(e){return Wb.crypto.bufferEqual(e,this.signature)}verifySignature(e){return Wb.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from(\"\")}get preAuthEncoding(){return Wb.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};gL.DSSESignatureContent=eK});var oxe=_(dL=>{\"use strict\";Object.defineProperty(dL,\"__esModule\",{value:!0});dL.MessageSignatureContent=void 0;var tK=Cl(),rK=class{constructor(e,r){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=r}compareSignature(e){return tK.crypto.bufferEqual(e,this.signature)}compareDigest(e){return tK.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return tK.crypto.verify(this.artifact,e,this.signature)}};dL.MessageSignatureContent=rK});var lxe=_(mL=>{\"use strict\";Object.defineProperty(mL,\"__esModule\",{value:!0});mL.toSignedEntity=dSt;mL.signatureContent=axe;var nK=Cl(),hSt=sxe(),gSt=oxe();function dSt(t,e){let{tlogEntries:r,timestampVerificationData:s}=t.verificationMaterial,a=[];for(let n of r)a.push({$case:\"transparency-log\",tlogEntry:n});for(let n of s?.rfc3161Timestamps??[])a.push({$case:\"timestamp-authority\",timestamp:nK.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:axe(t,e),key:mSt(t),tlogEntries:r,timestamps:a}}function axe(t,e){switch(t.content.$case){case\"dsseEnvelope\":return new hSt.DSSESignatureContent(t.content.dsseEnvelope);case\"messageSignature\":return new gSt.MessageSignatureContent(t.content.messageSignature,e)}}function mSt(t){switch(t.verificationMaterial.content.$case){case\"publicKey\":return{$case:\"public-key\",hint:t.verificationMaterial.content.publicKey.hint};case\"x509CertificateChain\":return{$case:\"certificate\",certificate:nK.X509Certificate.parse(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case\"certificate\":return{$case:\"certificate\",certificate:nK.X509Certificate.parse(t.verificationMaterial.content.certificate.rawBytes)}}}});var Eo=_(E1=>{\"use strict\";Object.defineProperty(E1,\"__esModule\",{value:!0});E1.PolicyError=E1.VerificationError=void 0;var yL=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}},iK=class extends yL{};E1.VerificationError=iK;var sK=class extends yL{};E1.PolicyError=sK});var cxe=_(EL=>{\"use strict\";Object.defineProperty(EL,\"__esModule\",{value:!0});EL.filterCertAuthorities=ySt;EL.filterTLogAuthorities=ESt;function ySt(t,e){return t.filter(r=>r.validFor.start<=e.start&&r.validFor.end>=e.end)}function ESt(t,e){return t.filter(r=>e.logID&&!r.logID.equals(e.logID)?!1:r.validFor.start<=e.targetDate&&e.targetDate<=r.validFor.end)}});var py=_(Ay=>{\"use strict\";Object.defineProperty(Ay,\"__esModule\",{value:!0});Ay.filterTLogAuthorities=Ay.filterCertAuthorities=void 0;Ay.toTrustMaterial=CSt;var oK=Cl(),Yb=yb(),ISt=Eo(),aK=new Date(0),lK=new Date(864e13),Axe=cxe();Object.defineProperty(Ay,\"filterCertAuthorities\",{enumerable:!0,get:function(){return Axe.filterCertAuthorities}});Object.defineProperty(Ay,\"filterTLogAuthorities\",{enumerable:!0,get:function(){return Axe.filterTLogAuthorities}});function CSt(t,e){let r=typeof e==\"function\"?e:wSt(e);return{certificateAuthorities:t.certificateAuthorities.map(fxe),timestampAuthorities:t.timestampAuthorities.map(fxe),tlogs:t.tlogs.map(uxe),ctlogs:t.ctlogs.map(uxe),publicKey:r}}function uxe(t){let e=t.publicKey.keyDetails,r=e===Yb.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?\"pkcs1\":\"spki\";return{logID:t.logId.keyId,publicKey:oK.crypto.createPublicKey(t.publicKey.rawBytes,r),validFor:{start:t.publicKey.validFor?.start||aK,end:t.publicKey.validFor?.end||lK}}}function fxe(t){return{certChain:t.certChain.certificates.map(e=>oK.X509Certificate.parse(e.rawBytes)),validFor:{start:t.validFor?.start||aK,end:t.validFor?.end||lK}}}function wSt(t){return e=>{let r=(t||{})[e];if(!r)throw new ISt.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:oK.crypto.createPublicKey(r.rawBytes),validFor:s=>(r.validFor?.start||aK)<=s&&(r.validFor?.end||lK)>=s}}}});var cK=_(Vb=>{\"use strict\";Object.defineProperty(Vb,\"__esModule\",{value:!0});Vb.CertificateChainVerifier=void 0;Vb.verifyCertificateChain=vSt;var hy=Eo(),BSt=py();function vSt(t,e){let r=(0,BSt.filterCertAuthorities)(e,{start:t.notBefore,end:t.notAfter}),s;for(let a of r)try{return new IL({trustedCerts:a.certChain,untrustedCert:t}).verify()}catch(n){s=n}throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"Failed to verify certificate chain\",cause:s})}var IL=class{constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=SSt([...e.trustedCerts,e.untrustedCert])}verify(){let e=this.sort();return this.checkPath(e),e}sort(){let e=this.untrustedCert,r=this.buildPaths(e);if(r=r.filter(a=>a.some(n=>this.trustedCerts.includes(n))),r.length===0)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no trusted certificate path found\"});let s=r.reduce((a,n)=>a.length<n.length?a:n);return[e,...s].slice(0,-1)}buildPaths(e){let r=[],s=this.findIssuer(e);if(s.length===0)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no valid certificate path found\"});for(let a=0;a<s.length;a++){let n=s[a];if(n.equals(e)){r.push([e]);continue}let c=this.buildPaths(n);for(let f=0;f<c.length;f++)r.push([n,...c[f]])}return r}findIssuer(e){let r=[],s;return e.subject.equals(e.issuer)&&e.verify()?[e]:(e.extAuthorityKeyID&&(s=e.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(a=>{if(s&&a.extSubjectKeyID){a.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(a);return}a.subject.equals(e.issuer)&&r.push(a)}),r=r.filter(a=>{try{return e.verify(a)}catch{return!1}}),r)}checkPath(e){if(e.length<1)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate chain must contain at least one certificate\"});if(!e.slice(1).every(s=>s.isCA))throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"intermediate certificate is not a CA\"});for(let s=e.length-2;s>=0;s--)if(!e[s].issuer.equals(e[s+1].subject))throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"incorrect certificate name chaining\"});for(let s=0;s<e.length;s++){let a=e[s];if(a.extBasicConstraints?.isCA){let n=a.extBasicConstraints.pathLenConstraint;if(n!==void 0&&n<s-1)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"path length constraint exceeded\"})}}}};Vb.CertificateChainVerifier=IL;function SSt(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)t[e].equals(t[r])&&(t.splice(r,1),r--);return t}});var pxe=_(uK=>{\"use strict\";Object.defineProperty(uK,\"__esModule\",{value:!0});uK.verifySCTs=PSt;var CL=Cl(),DSt=Eo(),bSt=py();function PSt(t,e,r){let s,a=t.clone();for(let p=0;p<a.extensions.length;p++){let h=a.extensions[p];if(h.subs[0].toOID()===CL.EXTENSION_OID_SCT){s=new CL.X509SCTExtension(h),a.extensions.splice(p,1);break}}if(!s)return[];if(s.signedCertificateTimestamps.length===0)return[];let n=new CL.ByteStream,c=CL.crypto.digest(\"sha256\",e.publicKey);n.appendView(c);let f=a.tbsCertificate.toDER();return n.appendUint24(f.length),n.appendView(f),s.signedCertificateTimestamps.map(p=>{if(!(0,bSt.filterTLogAuthorities)(r,{logID:p.logID,targetDate:p.datetime}).some(C=>p.verify(n.buffer,C.publicKey)))throw new DSt.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"SCT verification failed\"});return p.logID})}});var gxe=_(wL=>{\"use strict\";Object.defineProperty(wL,\"__esModule\",{value:!0});wL.verifyPublicKey=FSt;wL.verifyCertificate=NSt;var xSt=Cl(),hxe=Eo(),kSt=cK(),QSt=pxe(),TSt=\"1.3.6.1.4.1.57264.1.1\",RSt=\"1.3.6.1.4.1.57264.1.8\";function FSt(t,e,r){let s=r.publicKey(t);return e.forEach(a=>{if(!s.validFor(a))throw new hxe.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`Public key is not valid for timestamp: ${a.toISOString()}`})}),{key:s.publicKey}}function NSt(t,e,r){let s=(0,kSt.verifyCertificateChain)(t,r.certificateAuthorities);if(!e.every(n=>s.every(c=>c.validForDate(n))))throw new hxe.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate is not valid or expired at the specified date\"});return{scts:(0,QSt.verifySCTs)(s[0],s[1],r.ctlogs),signer:OSt(s[0])}}function OSt(t){let e,r=t.extension(RSt);r?e=r.valueObj.subs?.[0]?.value.toString(\"ascii\"):e=t.extension(TSt)?.value.toString(\"ascii\");let s={extensions:{issuer:e},subjectAlternativeName:t.subjectAltName};return{key:xSt.crypto.createPublicKey(t.publicKey),identity:s}}});var mxe=_(BL=>{\"use strict\";Object.defineProperty(BL,\"__esModule\",{value:!0});BL.verifySubjectAlternativeName=LSt;BL.verifyExtensions=MSt;var dxe=Eo();function LSt(t,e){if(e===void 0||!e.match(t))throw new dxe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`certificate identity error - expected ${t}, got ${e}`})}function MSt(t,e={}){let r;for(r in t)if(e[r]!==t[r])throw new dxe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`invalid certificate extension - expected ${r}=${t[r]}, got ${r}=${e[r]}`})}});var yxe=_(gK=>{\"use strict\";Object.defineProperty(gK,\"__esModule\",{value:!0});gK.verifyCheckpoint=HSt;var AK=Cl(),I1=Eo(),USt=py(),fK=`\n\n`,_St=/\\u2014 (\\S+) (\\S+)\\n/g;function HSt(t,e){let r=(0,USt.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=pK.fromString(s.checkpoint.envelope),n=hK.fromString(a.note);if(!jSt(a,r))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid checkpoint signature\"});if(!AK.crypto.bufferEqual(n.logHash,s.rootHash))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"root hash mismatch\"})}function jSt(t,e){let r=Buffer.from(t.note,\"utf-8\");return t.signatures.every(s=>{let a=e.find(n=>AK.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?AK.crypto.verify(r,a.publicKey,s.signature):!1})}var pK=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(fK))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"missing checkpoint separator\"});let r=e.indexOf(fK),s=e.slice(0,r+1),n=e.slice(r+fK.length).matchAll(_St),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,\"base64\");if(E.length<5)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"malformed checkpoint signature\"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"no signatures found in checkpoint\"});return new t(s,c)}},hK=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(`\n`);if(r.length<3)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"too few lines in checkpoint header\"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],\"base64\"),c=r.slice(3);return new t(s,a,n,c)}}});var Exe=_(EK=>{\"use strict\";Object.defineProperty(EK,\"__esModule\",{value:!0});EK.verifyMerkleInclusion=WSt;var yK=Cl(),dK=Eo(),GSt=Buffer.from([0]),qSt=Buffer.from([1]);function WSt(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:`invalid index: ${r}`});let{inner:a,border:n}=YSt(r,s);if(e.hashes.length!==a+n)throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid hash count\"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=ZSt(t.canonicalizedBody),h=JSt(VSt(p,c,r),f);if(!yK.crypto.bufferEqual(h,e.rootHash))throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"calculated root hash does not match inclusion proof\"})}function YSt(t,e){let r=KSt(t,e),s=zSt(t>>BigInt(r));return{inner:r,border:s}}function VSt(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?mK(a,s):mK(s,a),t)}function JSt(t,e){return e.reduce((r,s)=>mK(s,r),t)}function KSt(t,e){return XSt(t^e-BigInt(1))}function zSt(t){return t.toString(2).split(\"1\").length-1}function XSt(t){return t===0n?0:t.toString(2).length}function mK(t,e){return yK.crypto.digest(\"sha256\",qSt,t,e)}function ZSt(t){return yK.crypto.digest(\"sha256\",GSt,t)}});var Cxe=_(IK=>{\"use strict\";Object.defineProperty(IK,\"__esModule\",{value:!0});IK.verifyTLogSET=tDt;var Ixe=Cl(),$St=Eo(),eDt=py();function tDt(t,e){if(!(0,eDt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=rDt(t),c=Buffer.from(Ixe.json.canonicalize(n),\"utf8\"),f=t.inclusionPromise.signedEntryTimestamp;return Ixe.crypto.verify(c,a.publicKey,f)}))throw new $St.VerificationError({code:\"TLOG_INCLUSION_PROMISE_ERROR\",message:\"inclusion promise could not be verified\"})}function rDt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString(\"base64\"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString(\"hex\")}}});var wxe=_(BK=>{\"use strict\";Object.defineProperty(BK,\"__esModule\",{value:!0});BK.verifyRFC3161Timestamp=sDt;var CK=Cl(),wK=Eo(),nDt=cK(),iDt=py();function sDt(t,e,r){let s=t.signingTime;if(r=(0,iDt.filterCertAuthorities)(r,{start:s,end:s}),r=aDt(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return oDt(t,e,n),!0}catch{return!1}}))throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp could not be verified\"})}function oDt(t,e,r){let[s,...a]=r.certChain,n=CK.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new nDt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"invalid certificate chain\"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp was signed with an expired certificate\"});t.verify(e,n)}function aDt(t,e){return t.filter(r=>r.certChain.length>0&&CK.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&CK.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var Bxe=_(vL=>{\"use strict\";Object.defineProperty(vL,\"__esModule\",{value:!0});vL.verifyTSATimestamp=pDt;vL.verifyTLogTimestamp=hDt;var lDt=Eo(),cDt=yxe(),uDt=Exe(),fDt=Cxe(),ADt=wxe();function pDt(t,e,r){return(0,ADt.verifyRFC3161Timestamp)(t,e,r),{type:\"timestamp-authority\",logID:t.signerSerialNumber,timestamp:t.signingTime}}function hDt(t,e){let r=!1;if(gDt(t)&&((0,fDt.verifyTLogSET)(t,e),r=!0),dDt(t)&&((0,uDt.verifyMerkleInclusion)(t),(0,cDt.verifyCheckpoint)(t,e),r=!0),!r)throw new lDt.VerificationError({code:\"TLOG_MISSING_INCLUSION_ERROR\",message:\"inclusion could not be verified\"});return{type:\"transparency-log\",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function gDt(t){return t.inclusionPromise!==void 0}function dDt(t){return t.inclusionProof!==void 0}});var vxe=_(vK=>{\"use strict\";Object.defineProperty(vK,\"__esModule\",{value:!0});vK.verifyDSSETLogBody=mDt;var SL=Eo();function mDt(t,e){switch(t.apiVersion){case\"0.0.1\":return yDt(t,e);default:throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported dsse version: ${t.apiVersion}`})}}function yDt(t,e){if(t.spec.signatures?.length!==1)throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}});var Sxe=_(DK=>{\"use strict\";Object.defineProperty(DK,\"__esModule\",{value:!0});DK.verifyHashedRekordTLogBody=EDt;var SK=Eo();function EDt(t,e){switch(t.apiVersion){case\"0.0.1\":return IDt(t,e);default:throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function IDt(t,e){let r=t.spec.signature.content||\"\";if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature mismatch\"});let s=t.spec.data.hash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"digest mismatch\"})}});var Dxe=_(bK=>{\"use strict\";Object.defineProperty(bK,\"__esModule\",{value:!0});bK.verifyIntotoTLogBody=CDt;var DL=Eo();function CDt(t,e){switch(t.apiVersion){case\"0.0.2\":return wDt(t,e);default:throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported intoto version: ${t.apiVersion}`})}}function wDt(t,e){if(t.spec.content.envelope.signatures?.length!==1)throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=BDt(t.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.content.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}function BDt(t){return Buffer.from(t,\"base64\").toString(\"utf-8\")}});var Pxe=_(PK=>{\"use strict\";Object.defineProperty(PK,\"__esModule\",{value:!0});PK.verifyTLogBody=bDt;var bxe=Eo(),vDt=vxe(),SDt=Sxe(),DDt=Dxe();function bDt(t,e){let{kind:r,version:s}=t.kindVersion,a=JSON.parse(t.canonicalizedBody.toString(\"utf8\"));if(r!==a.kind||s!==a.apiVersion)throw new bxe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`kind/version mismatch - expected: ${r}/${s}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case\"dsse\":return(0,vDt.verifyDSSETLogBody)(a,e);case\"intoto\":return(0,DDt.verifyIntotoTLogBody)(a,e);case\"hashedrekord\":return(0,SDt.verifyHashedRekordTLogBody)(a,e);default:throw new bxe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported kind: ${r}`})}}});var Rxe=_(bL=>{\"use strict\";Object.defineProperty(bL,\"__esModule\",{value:!0});bL.Verifier=void 0;var PDt=Ie(\"util\"),C1=Eo(),xxe=gxe(),kxe=mxe(),Qxe=Bxe(),xDt=Pxe(),xK=class{constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,tsaThreshold:r.tsaThreshold??0}}verify(e,r){let s=this.verifyTimestamps(e),a=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,a),r&&this.verifyPolicy(r,a.identity||{}),a}verifyTimestamps(e){let r=0,s=0,a=e.timestamps.map(n=>{switch(n.$case){case\"timestamp-authority\":return s++,(0,Qxe.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case\"transparency-log\":return r++,(0,Qxe.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(Txe(a))throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"duplicate timestamp\"});if(r<this.options.tlogThreshold)throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${r}`});if(s<this.options.tsaThreshold)throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${s}`});return a.map(n=>n.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case\"public-key\":return(0,xxe.verifyPublicKey)(e.hint,r,this.trustMaterial);case\"certificate\":{let s=(0,xxe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(Txe(s.scts))throw new C1.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"duplicate SCT\"});if(s.scts.length<this.options.ctlogThreshold)throw new C1.VerificationError({code:\"CERTIFICATE_ERROR\",message:`expected ${this.options.ctlogThreshold} SCTs, got ${s.scts.length}`});return s.signer}}}verifyTLogs({signature:e,tlogEntries:r}){r.forEach(s=>(0,xDt.verifyTLogBody)(s,e))}verifySignature(e,r){if(!e.signature.verifySignature(r.key))throw new C1.VerificationError({code:\"SIGNATURE_ERROR\",message:\"signature verification failed\"})}verifyPolicy(e,r){e.subjectAlternativeName&&(0,kxe.verifySubjectAlternativeName)(e.subjectAlternativeName,r.subjectAlternativeName),e.extensions&&(0,kxe.verifyExtensions)(e.extensions,r.extensions)}};bL.Verifier=xK;function Txe(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)if((0,PDt.isDeepStrictEqual)(t[e],t[r]))return!0;return!1}});var PL=_(iu=>{\"use strict\";Object.defineProperty(iu,\"__esModule\",{value:!0});iu.Verifier=iu.toTrustMaterial=iu.VerificationError=iu.PolicyError=iu.toSignedEntity=void 0;var kDt=lxe();Object.defineProperty(iu,\"toSignedEntity\",{enumerable:!0,get:function(){return kDt.toSignedEntity}});var Fxe=Eo();Object.defineProperty(iu,\"PolicyError\",{enumerable:!0,get:function(){return Fxe.PolicyError}});Object.defineProperty(iu,\"VerificationError\",{enumerable:!0,get:function(){return Fxe.VerificationError}});var QDt=py();Object.defineProperty(iu,\"toTrustMaterial\",{enumerable:!0,get:function(){return QDt.toTrustMaterial}});var TDt=Rxe();Object.defineProperty(iu,\"Verifier\",{enumerable:!0,get:function(){return TDt.Verifier}})});var Nxe=_(Fa=>{\"use strict\";Object.defineProperty(Fa,\"__esModule\",{value:!0});Fa.DEFAULT_TIMEOUT=Fa.DEFAULT_RETRY=void 0;Fa.createBundleBuilder=NDt;Fa.createKeyFinder=ODt;Fa.createVerificationPolicy=LDt;var RDt=Cl(),w1=H7(),FDt=PL();Fa.DEFAULT_RETRY={retries:2};Fa.DEFAULT_TIMEOUT=5e3;function NDt(t,e){let r={signer:MDt(e),witnesses:_Dt(e)};switch(t){case\"messageSignature\":return new w1.MessageSignatureBundleBuilder(r);case\"dsseEnvelope\":return new w1.DSSEBundleBuilder({...r,certificateChain:e.legacyCompatibility})}}function ODt(t){return e=>{let r=t(e);if(!r)throw new FDt.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:RDt.crypto.createPublicKey(r),validFor:()=>!0}}}function LDt(t){let e={},r=t.certificateIdentityEmail||t.certificateIdentityURI;return r&&(e.subjectAlternativeName=r),t.certificateIssuer&&(e.extensions={issuer:t.certificateIssuer}),e}function MDt(t){return new w1.FulcioSigner({fulcioBaseURL:t.fulcioURL,identityProvider:t.identityProvider||UDt(t),retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})}function UDt(t){let e=t.identityToken;return e?{getToken:()=>Promise.resolve(e)}:new w1.CIContextProvider(\"sigstore\")}function _Dt(t){let e=[];return HDt(t)&&e.push(new w1.RekorWitness({rekorBaseURL:t.rekorURL,entryType:t.legacyCompatibility?\"intoto\":\"dsse\",fetchOnConflict:!1,retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})),jDt(t)&&e.push(new w1.TSAWitness({tsaBaseURL:t.tsaServerURL,retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})),e}function HDt(t){return t.tlogUpload!==!1}function jDt(t){return t.tsaServerURL!==void 0}});var Mxe=_(su=>{\"use strict\";var GDt=su&&su.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),qDt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Oxe=su&&su.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&GDt(r,e,s[a]);return qDt(r,e),r}}();Object.defineProperty(su,\"__esModule\",{value:!0});su.sign=YDt;su.attest=VDt;su.verify=JDt;su.createVerifier=Lxe;var QK=Ib(),WDt=Oxe(hL()),kK=PL(),B1=Oxe(Nxe());async function YDt(t,e={}){let s=await B1.createBundleBuilder(\"messageSignature\",e).create({data:t});return(0,QK.bundleToJSON)(s)}async function VDt(t,e,r={}){let a=await B1.createBundleBuilder(\"dsseEnvelope\",r).create({data:t,type:e});return(0,QK.bundleToJSON)(a)}async function JDt(t,e,r){let s;return Buffer.isBuffer(e)?s=e:r=e,Lxe(r).then(a=>a.verify(t,s))}async function Lxe(t={}){let e=await WDt.getTrustedRoot({mirrorURL:t.tufMirrorURL,rootPath:t.tufRootPath,cachePath:t.tufCachePath,forceCache:t.tufForceCache,retry:t.retry??B1.DEFAULT_RETRY,timeout:t.timeout??B1.DEFAULT_TIMEOUT}),r=t.keySelector?B1.createKeyFinder(t.keySelector):void 0,s=(0,kK.toTrustMaterial)(e,r),a={ctlogThreshold:t.ctLogThreshold,tlogThreshold:t.tlogThreshold},n=new kK.Verifier(s,a),c=B1.createVerificationPolicy(t);return{verify:(f,p)=>{let h=(0,QK.bundleFromJSON)(f),E=(0,kK.toSignedEntity)(h,p);n.verify(E,c)}}}});var _xe=_(Ni=>{\"use strict\";Object.defineProperty(Ni,\"__esModule\",{value:!0});Ni.verify=Ni.sign=Ni.createVerifier=Ni.attest=Ni.VerificationError=Ni.PolicyError=Ni.TUFError=Ni.InternalError=Ni.DEFAULT_REKOR_URL=Ni.DEFAULT_FULCIO_URL=Ni.ValidationError=void 0;var KDt=Ib();Object.defineProperty(Ni,\"ValidationError\",{enumerable:!0,get:function(){return KDt.ValidationError}});var TK=H7();Object.defineProperty(Ni,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return TK.DEFAULT_FULCIO_URL}});Object.defineProperty(Ni,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return TK.DEFAULT_REKOR_URL}});Object.defineProperty(Ni,\"InternalError\",{enumerable:!0,get:function(){return TK.InternalError}});var zDt=hL();Object.defineProperty(Ni,\"TUFError\",{enumerable:!0,get:function(){return zDt.TUFError}});var Uxe=PL();Object.defineProperty(Ni,\"PolicyError\",{enumerable:!0,get:function(){return Uxe.PolicyError}});Object.defineProperty(Ni,\"VerificationError\",{enumerable:!0,get:function(){return Uxe.VerificationError}});var xL=Mxe();Object.defineProperty(Ni,\"attest\",{enumerable:!0,get:function(){return xL.attest}});Object.defineProperty(Ni,\"createVerifier\",{enumerable:!0,get:function(){return xL.createVerifier}});Object.defineProperty(Ni,\"sign\",{enumerable:!0,get:function(){return xL.sign}});Object.defineProperty(Ni,\"verify\",{enumerable:!0,get:function(){return xL.verify}})});Dt();Ge();Dt();var dke=Ie(\"child_process\"),mke=ut(Fd());Yt();var $I=new Map([]);var Gv={};Vt(Gv,{BaseCommand:()=>ft,WorkspaceRequiredError:()=>ar,getCli:()=>bde,getDynamicLibs:()=>Dde,getPluginConfiguration:()=>tC,openWorkspace:()=>eC,pluginCommands:()=>$I,runExit:()=>VR});Yt();var ft=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<\"u\")throw new nt(\"The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path\");return super.validateAndExecute()}};Ge();Dt();Yt();var ar=class extends nt{constructor(e,r){let s=J.relative(e,r),a=J.join(e,Ut.fileName);super(`This command can only be run from within a workspace of your project (${s} isn't a workspace of ${a}).`)}};Ge();Dt();eA();wc();pv();Yt();var yat=ut(Ai());Ul();var Dde=()=>new Map([[\"@yarnpkg/cli\",Gv],[\"@yarnpkg/core\",jv],[\"@yarnpkg/fslib\",_2],[\"@yarnpkg/libzip\",fv],[\"@yarnpkg/parsers\",J2],[\"@yarnpkg/shell\",mv],[\"clipanion\",oB],[\"semver\",yat],[\"typanion\",Ea]]);Ge();async function eC(t,e){let{project:r,workspace:s}=await Tt.find(t,e);if(!s)throw new ar(r.cwd,e);return s}Ge();Dt();eA();wc();pv();Yt();var IPt=ut(Ai());Ul();var hq={};Vt(hq,{AddCommand:()=>sC,BinCommand:()=>oC,CacheCleanCommand:()=>aC,ClipanionCommand:()=>pC,ConfigCommand:()=>fC,ConfigGetCommand:()=>lC,ConfigSetCommand:()=>cC,ConfigUnsetCommand:()=>uC,DedupeCommand:()=>AC,EntryCommand:()=>gC,ExecCommand:()=>mC,ExplainCommand:()=>IC,ExplainPeerRequirementsCommand:()=>yC,HelpCommand:()=>hC,InfoCommand:()=>CC,LinkCommand:()=>BC,NodeCommand:()=>vC,PluginCheckCommand:()=>SC,PluginImportCommand:()=>PC,PluginImportSourcesCommand:()=>xC,PluginListCommand:()=>DC,PluginRemoveCommand:()=>kC,PluginRuntimeCommand:()=>QC,RebuildCommand:()=>TC,RemoveCommand:()=>RC,RunCommand:()=>NC,RunIndexCommand:()=>FC,SetResolutionCommand:()=>OC,SetVersionCommand:()=>EC,SetVersionSourcesCommand:()=>bC,UnlinkCommand:()=>LC,UpCommand:()=>MC,VersionCommand:()=>dC,WhyCommand:()=>UC,WorkspaceCommand:()=>qC,WorkspacesListCommand:()=>GC,YarnCommand:()=>wC,dedupeUtils:()=>rF,default:()=>Tct,suggestUtils:()=>Xu});var zye=ut(Fd());Ge();Ge();Ge();Yt();var hye=ut(Vv());Ul();var Xu={};Vt(Xu,{Modifier:()=>W5,Strategy:()=>eF,Target:()=>Jv,WorkspaceModifier:()=>cye,applyModifier:()=>Mlt,extractDescriptorFromPath:()=>Y5,extractRangeModifier:()=>uye,fetchDescriptorFrom:()=>V5,findProjectDescriptors:()=>pye,getModifier:()=>Kv,getSuggestedDescriptors:()=>zv,makeWorkspaceDescriptor:()=>Aye,toWorkspaceModifier:()=>fye});Ge();Ge();Dt();var q5=ut(Ai()),Olt=\"workspace:\",Jv=(s=>(s.REGULAR=\"dependencies\",s.DEVELOPMENT=\"devDependencies\",s.PEER=\"peerDependencies\",s))(Jv||{}),W5=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"\",s))(W5||{}),cye=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"*\",s))(cye||{}),eF=(n=>(n.KEEP=\"keep\",n.REUSE=\"reuse\",n.PROJECT=\"project\",n.LATEST=\"latest\",n.CACHE=\"cache\",n))(eF||{});function Kv(t,e){return t.exact?\"\":t.caret?\"^\":t.tilde?\"~\":e.configuration.get(\"defaultSemverRangePrefix\")}var Llt=/^([\\^~]?)[0-9]+(?:\\.[0-9]+){0,2}(?:-\\S+)?$/;function uye(t,{project:e}){let r=t.match(Llt);return r?r[1]:e.configuration.get(\"defaultSemverRangePrefix\")}function Mlt(t,e){let{protocol:r,source:s,params:a,selector:n}=G.parseRange(t.range);return q5.default.valid(n)&&(n=`${e}${t.range}`),G.makeDescriptor(t,G.makeRange({protocol:r,source:s,params:a,selector:n}))}function fye(t){switch(t){case\"^\":return\"^\";case\"~\":return\"~\";case\"\":return\"*\";default:throw new Error(`Assertion failed: Unknown modifier: \"${t}\"`)}}function Aye(t,e){return G.makeDescriptor(t.anchoredDescriptor,`${Olt}${fye(e)}`)}async function pye(t,{project:e,target:r}){let s=new Map,a=n=>{let c=s.get(n.descriptorHash);return c||s.set(n.descriptorHash,c={descriptor:n,locators:[]}),c};for(let n of e.workspaces)if(r===\"peerDependencies\"){let c=n.manifest.peerDependencies.get(t.identHash);c!==void 0&&a(c).locators.push(n.anchoredLocator)}else{let c=n.manifest.dependencies.get(t.identHash),f=n.manifest.devDependencies.get(t.identHash);r===\"devDependencies\"?f!==void 0?a(f).locators.push(n.anchoredLocator):c!==void 0&&a(c).locators.push(n.anchoredLocator):c!==void 0?a(c).locators.push(n.anchoredLocator):f!==void 0&&a(f).locators.push(n.anchoredLocator)}return s}async function Y5(t,{cwd:e,workspace:r}){return await _lt(async s=>{J.isAbsolute(t)||(t=J.relative(r.cwd,J.resolve(e,t)),t.match(/^\\.{0,2}\\//)||(t=`./${t}`));let{project:a}=r,n=await V5(G.makeIdent(null,\"archive\"),t,{project:r.project,cache:s,workspace:r});if(!n)throw new Error(\"Assertion failed: The descriptor should have been found\");let c=new ki,f=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:s,fetcher:p,report:c,resolver:f},E=f.bindDescriptor(n,r.anchoredLocator,h),C=G.convertDescriptorToLocator(E),S=await p.fetch(C,h),P=await Ut.find(S.prefixPath,{baseFs:S.packageFs});if(!P.name)throw new Error(\"Target path doesn't have a name\");return G.makeDescriptor(P.name,t)})}function Ult(t){if(t.range===\"unknown\")return{type:\"resolve\",range:\"latest\"};if(Fr.validRange(t.range))return{type:\"fixed\",range:t.range};if(Mp.test(t.range))return{type:\"resolve\",range:t.range};let e=t.range.match(/^(?:jsr:|npm:)(.*)/);if(!e)return{type:\"fixed\",range:t.range};let[,r]=e,s=`${G.stringifyIdent(t)}@`;return r.startsWith(s)&&(r=r.slice(s.length)),Fr.validRange(r)?{type:\"fixed\",range:t.range}:Mp.test(r)?{type:\"resolve\",range:t.range}:{type:\"fixed\",range:t.range}}async function zv(t,{project:e,workspace:r,cache:s,target:a,fixed:n,modifier:c,strategies:f,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let h=!n||t.range===\"unknown\"?Ult(t):{type:\"fixed\",range:t.range};if(h.type===\"fixed\")return{suggestions:[{descriptor:t,name:`Use ${G.prettyDescriptor(e.configuration,t)}`,reason:\"(unambiguous explicit request)\"}],rejections:[]};let E=typeof r<\"u\"&&r!==null&&r.manifest[a].get(t.identHash)||null,C=[],S=[],P=async I=>{try{await I()}catch(R){S.push(R)}};for(let I of f){if(C.length>=p)break;switch(I){case\"keep\":await P(async()=>{E&&C.push({descriptor:E,name:`Keep ${G.prettyDescriptor(e.configuration,E)}`,reason:\"(no changes)\"})});break;case\"reuse\":await P(async()=>{for(let{descriptor:R,locators:N}of(await pye(t,{project:e,target:a})).values()){if(N.length===1&&N[0].locatorHash===r.anchoredLocator.locatorHash&&f.includes(\"keep\"))continue;let U=`(originally used by ${G.prettyLocator(e.configuration,N[0])}`;U+=N.length>1?` and ${N.length-1} other${N.length>2?\"s\":\"\"})`:\")\",C.push({descriptor:R,name:`Reuse ${G.prettyDescriptor(e.configuration,R)}`,reason:U})}});break;case\"cache\":await P(async()=>{for(let R of e.storedDescriptors.values())R.identHash===t.identHash&&C.push({descriptor:R,name:`Reuse ${G.prettyDescriptor(e.configuration,R)}`,reason:\"(already used somewhere in the lockfile)\"})});break;case\"project\":await P(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let R=e.tryWorkspaceByIdent(t);if(R===null)return;let N=Aye(R,c);C.push({descriptor:N,name:`Attach ${G.prettyDescriptor(e.configuration,N)}`,reason:`(local workspace at ${he.pretty(e.configuration,R.relativeCwd,he.Type.PATH)})`})});break;case\"latest\":{let R=e.configuration.get(\"enableNetwork\"),N=e.configuration.get(\"enableOfflineMode\");await P(async()=>{if(a===\"peerDependencies\")C.push({descriptor:G.makeDescriptor(t,\"*\"),name:\"Use *\",reason:\"(catch-all peer dependency pattern)\"});else if(!R&&!N)C.push({descriptor:null,name:\"Resolve from latest\",reason:he.pretty(e.configuration,\"(unavailable because enableNetwork is toggled off)\",\"grey\")});else{let U=await V5(t,h.range,{project:e,cache:s,workspace:r,modifier:c});U&&C.push({descriptor:U,name:`Use ${G.prettyDescriptor(e.configuration,U)}`,reason:`(resolved from ${N?\"the cache\":\"latest\"})`})}})}break}}return{suggestions:C.slice(0,p),rejections:S.slice(0,p)}}async function V5(t,e,{project:r,cache:s,workspace:a,preserveModifier:n=!0,modifier:c}){let f=r.configuration.normalizeDependency(G.makeDescriptor(t,e)),p=new ki,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),C={project:r,fetcher:h,cache:s,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},S={...C,resolver:E,fetchOptions:C},P=E.bindDescriptor(f,a.anchoredLocator,S),I=await E.getCandidates(P,{},S);if(I.length===0)return null;let R=I[0],{protocol:N,source:U,params:W,selector:ee}=G.parseRange(G.convertToManifestRange(R.reference));if(N===r.configuration.get(\"defaultProtocol\")&&(N=null),q5.default.valid(ee)){let ie=ee;if(typeof c<\"u\")ee=c+ee;else if(n!==!1){let me=typeof n==\"string\"?n:f.range;ee=uye(me,{project:r})+ee}let ue=G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:W,selector:ee}));(await E.getCandidates(r.configuration.normalizeDependency(ue),{},S)).length!==1&&(ee=ie)}return G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:W,selector:ee}))}async function _lt(t){return await ce.mktempPromise(async e=>{let r=ze.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Kr(e,{configuration:r,check:!1,immutable:!1}))})}var sC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.dev=ge.Boolean(\"-D,--dev\",!1,{description:\"Add a package as a dev dependency\"});this.peer=ge.Boolean(\"-P,--peer\",!1,{description:\"Add a package as a peer dependency\"});this.optional=ge.Boolean(\"-O,--optional\",!1,{description:\"Add / upgrade a package to an optional regular / peer dependency\"});this.preferDev=ge.Boolean(\"--prefer-dev\",!1,{description:\"Add / upgrade a package to a dev dependency\"});this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Reuse the specified package from other workspaces in the project\"});this.cached=ge.Boolean(\"--cached\",!1,{description:\"Reuse the highest version already used somewhere within the project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.packages=ge.Rest()}static{this.paths=[[\"add\"]]}static{this.usage=ot.Usage({description:\"add dependencies to the project\",details:\"\\n      This command adds a package to the package.json for the nearest workspace.\\n\\n      - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\\n\\n      - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\\n\\n      - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\\n\\n      - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\\\"peerDependenciesMeta\\\": { \\\"<package>\\\": { \\\"optional\\\": true } }`\\n\\n      - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\\n\\n      - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\\n\\n      If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\\n\\n      If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\\n    \",examples:[[\"Add a regular package to the current workspace\",\"$0 add lodash\"],[\"Add a specific version for a package to the current workspace\",\"$0 add lodash@1.2.3\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using a URL\",\"$0 add lodash@https://github.com/lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol\",\"$0 add lodash@github:lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash@lodash/lodash\"],[\"Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash-es@lodash/lodash#es\"],[\"Add a local package (gzipped tarball format) to the current workspace\",\"$0 add local-package-name@file:../path/to/local-package-name-v0.1.2.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=f||r.get(\"preferReuse\"),h=Kv(this,s),E=[p?\"reuse\":void 0,\"project\",this.cached?\"cache\":void 0,\"latest\"].filter(W=>typeof W<\"u\"),C=f?1/0:1,S=W=>{let ee=G.tryParseDescriptor(W.slice(4));return ee?ee.range===\"unknown\"?G.makeDescriptor(ee,`jsr:${G.stringifyIdent(ee)}@latest`):G.makeDescriptor(ee,`jsr:${ee.range}`):null},P=await Promise.all(this.packages.map(async W=>{let ee=W.match(/^\\.{0,2}\\//)?await Y5(W,{cwd:this.context.cwd,workspace:a}):W.startsWith(\"jsr:\")?S(W):G.tryParseDescriptor(W),ie=W.match(/^(https?:|git@github)/);if(ie)throw new nt(`It seems you are trying to add a package using a ${he.pretty(r,`${ie[0]}...`,he.Type.RANGE)} url; we now require package names to be explicitly specified.\nTry running the command again with the package name prefixed: ${he.pretty(r,\"yarn add\",he.Type.CODE)} ${he.pretty(r,G.makeDescriptor(G.makeIdent(null,\"my-package\"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!ee)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ue=Hlt(a,ee,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ue.map(async me=>{let pe=await zv(ee,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:C});return{request:ee,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await lA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:ee,suggestedDescriptors:{suggestions:ie,rejections:ue}}of P)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=ue;if(typeof me>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");s.configuration.get(\"enableNetwork\")?W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range`):W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let R=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:ee}of P){let ie,ue=W.filter(Be=>Be.descriptor!==null),le=ue[0].descriptor,me=ue.every(Be=>G.areDescriptorsEqual(Be.descriptor,le));ue.length===1||me?ie=le:(R=!0,{answer:ie}=await(0,hye.prompt)({type:\"select\",name:\"answer\",message:\"Which range do you want to use?\",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[ee].get(ie.identHash);(typeof pe>\"u\"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[ee].set(ie.identHash,ie),this.optional&&(ee===\"dependencies\"?a.manifest.ensureDependencyMeta({...ie,range:\"unknown\"}).optional=!0:ee===\"peerDependencies\"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:\"unknown\"}).optional=!0)),typeof pe>\"u\"?N.push([a,ee,ie,E]):U.push([a,ee,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),R&&this.context.stdout.write(`\n`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function Hlt(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push(\"peerDependencies\"),(r||a)&&h.push(\"devDependencies\"),n&&h.push(\"dependencies\"),h.length>0?h:f?[\"devDependencies\"]:p?[\"peerDependencies\"]:[\"dependencies\"]}Ge();Ge();Yt();var oC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Print both the binary name and the locator of the package that provides the binary\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.name=ge.String({required:!1})}static{this.paths=[[\"bin\"]]}static{this.usage=ot.Usage({description:\"get the path to a binary script\",details:`\n      When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \\`-v,--verbose\\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n      When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n    `,examples:[[\"List all the available binaries\",\"$0 bin\"],[\"Print the path to a specific binary\",\"$0 bin eslint\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named \"${this.name}\" for package \"${G.prettyLocator(r,a)}\"`);let[,p]=f;return this.context.stdout.write(`${p}\n`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:G.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h,\" \")}   ${G.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ge();Dt();Yt();var aC=class extends ft{constructor(){super(...arguments);this.mirror=ge.Boolean(\"--mirror\",!1,{description:\"Remove the global cache files instead of the local cache files\"});this.all=ge.Boolean(\"--all\",!1,{description:\"Remove both the global cache files and the local cache files of the current project\"})}static{this.paths=[[\"cache\",\"clean\"],[\"cache\",\"clear\"]]}static{this.usage=ot.Usage({description:\"remove the shared cache files\",details:`\n      This command will remove all the files from the cache.\n    `,examples:[[\"Remove all the local archives\",\"$0 cache clean\"],[\"Remove all the archives stored in the ~/.yarn directory\",\"$0 cache clean --mirror\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get(\"enableCacheClean\"))throw new nt(\"Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.\");let s=await Kr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await ce.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await ce.removePromise(s.cwd)})).exitCode()}};Ge();Yt();ql();var J5=Ie(\"util\"),lC=class extends ft{constructor(){super(...arguments);this.why=ge.Boolean(\"--why\",!1,{description:\"Print the explanation for why a setting has its value\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.unsafe=ge.Boolean(\"--no-redacted\",!1,{description:\"Don't redact secrets (such as tokens) from the output\"});this.name=ge.String()}static{this.paths=[[\"config\",\"get\"]]}static{this.usage=ot.Usage({description:\"read a configuration settings\",details:`\n      This command will print a configuration setting.\n\n      Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \\`--no-redacted\\` to get the untransformed value.\n    `,examples:[[\"Print a simple configuration setting\",\"yarn config get yarnPath\"],[\"Print a complex configuration setting\",\"yarn config get packageExtensions\"],[\"Print a nested field from the configuration\",`yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'`],[\"Print a token from the configuration\",\"yarn config get npmAuthToken --no-redacted\"],[\"Print a configuration setting as JSON\",\"yarn config get packageExtensions --json\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,\"\"),a=this.name.replace(/^[^.[]*/,\"\");if(typeof r.settings.get(s)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${s}\"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?va(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p==\"string\")return this.context.stdout.write(`${p}\n`),h.exitCode();J5.inspect.styles.name=\"cyan\",this.context.stdout.write(`${(0,J5.inspect)(p,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}\n`)}return h.exitCode()}};Ge();Yt();ql();var K5=Ie(\"util\"),cC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Set complex configuration settings to JSON values\"});this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String();this.value=ge.String()}static{this.paths=[[\"config\",\"set\"]]}static{this.usage=ot.Usage({description:\"change a configuration settings\",details:`\n      This command will set a configuration setting.\n\n      When used without the \\`--json\\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n      When used with the \\`--json\\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n    `,examples:[[\"Set a simple configuration setting (a string, a number, or a boolean)\",\"yarn config set initScope myScope\"],[\"Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag\",'yarn config set initScope --json \\\\\"myScope\\\\\"'],[\"Set a complex configuration setting (an Array) using the `--json` flag\",`yarn config set unsafeHttpWhitelist --json '[\"*.example.com\", \"example.com\"]'`],[\"Set a complex configuration setting (an Object) using the `--json` flag\",`yarn config set packageExtensions --json '{ \"@babel/parser@*\": { \"dependencies\": { \"@babel/types\": \"*\" } } }'`],[\"Set a nested configuration setting\",'yarn config set npmScopes.company.npmRegistryServer \"https://npm.example.com\"'],[\"Set a nested configuration setting using indexed access for non-simple keys\",`yarn config set 'npmRegistries[\"//npm.example.com\"].npmAuthToken' \"ffffffff-ffff-ffff-ffff-ffffffffffff\"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);if(a===\"enableStrictSettings\")throw new nt(\"This setting only affects the file it's in, and thus cannot be set from the CLI\");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let R=f0(I);return Jd(R,this.name,f),R}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=je.convertMapsToIndexableObjects(E),S=n?va(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{K5.inspect.styles.name=\"cyan\",I.reportInfo(0,`Successfully set ${this.name} to ${(0,K5.inspect)(S,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}`)})).exitCode()}};Ge();Yt();ql();var uC=class extends ft{constructor(){super(...arguments);this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String()}static{this.paths=[[\"config\",\"unset\"]]}static{this.usage=ot.Usage({description:\"unset a configuration setting\",details:`\n      This command will unset a configuration setting.\n    `,examples:[[\"Unset a simple configuration setting\",\"yarn config unset initScope\"],[\"Unset a complex configuration setting\",\"yarn config unset packageExtensions\"],[\"Unset a nested configuration setting\",\"yarn config unset npmScopes.company.npmRegistryServer\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!vB(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?f0(C):{...C};return A0(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ge();Dt();Yt();var tF=Ie(\"util\"),fC=class extends ft{constructor(){super(...arguments);this.noDefaults=ge.Boolean(\"--no-defaults\",!1,{description:\"Omit the default values from the display\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.verbose=ge.Boolean(\"-v,--verbose\",{hidden:!0});this.why=ge.Boolean(\"--why\",{hidden:!0});this.names=ge.Rest()}static{this.paths=[[\"config\"]]}static{this.usage=ot.Usage({description:\"display the current configuration\",details:`\n      This command prints the current active configuration settings.\n    `,examples:[[\"Print the active configuration settings\",\"$0 config\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await SI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:\"The --verbose option is deprecated, the settings' descriptions are now always displayed\"},{option:this.why,message:\"The --why option is deprecated, the settings' sources are now always displayed\"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key \"${p}\" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>\"u\"&&f.reportError(34,`No configuration key named \"${p}\"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??\"<default>\",S=C&&C[0]!==\"<\"?fe.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),P=r.sources.get(C)??\"<default>\",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:\"Description\",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:\"Source\",value:he.tuple(P[0]===\"<\"?he.Type.CODE:he.Type.PATH,P)}};h[C]={value:he.tuple(he.Type.CODE,C),children:R};let N=(U,W)=>{for(let[ee,ie]of W)if(ie instanceof Map){let ue={};U[ee]={children:ue},N(ue,ie)}else U[ee]={label:ee,value:he.tuple(he.Type.NO_HINT,(0,tF.inspect)(ie,p))}};I instanceof Map?N(R,I):R.Value={label:\"Value\",value:he.tuple(he.Type.NO_HINT,(0,tF.inspect)(I,p))}}a.length!==1&&(n=void 0),xs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<\"u\"){let f=a[0],p=(0,tF.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get(\"enableColors\")});this.context.stdout.write(`\n`),this.context.stdout.write(`${p}\n`)}return c.exitCode()}};Ge();Yt();Ul();var rF={};Vt(rF,{Strategy:()=>Xv,acceptedStrategies:()=>jlt,dedupe:()=>z5});Ge();Ge();var gye=ut(Go()),Xv=(e=>(e.HIGHEST=\"highest\",e))(Xv||{}),jlt=new Set(Object.values(Xv)),Glt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>\"u\")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>\"u\")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=t.originalPackages.get(E);if(typeof C>\"u\")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),P=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([ee,ie])=>{let ue=f.get(ie.descriptorHash);if(typeof ue>\"u\")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let le=await ue.promise;if(!le)throw new Error(\"Assertion failed: Expected the dependency to have been through the dedupe process itself\");return[ee,le.updatedPackage]})));if(e.length&&!gye.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>\"u\")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let R=[...I].map(ee=>{let ie=t.originalPackages.get(ee);if(typeof ie>\"u\")throw new Error(`Assertion failed: The package (${ee}) should have been registered`);return ie}),N=await r.getSatisfying(p,P,R,a),U=N.locators?.[0];if(typeof U>\"u\"||!N.sorted)return C;let W=t.originalPackages.get(U.locatorHash);if(typeof W>\"u\")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let P=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:P})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function z5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new ki,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise(\"Deduplication step\",async()=>{let C=Glt[e],S=await C(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),P=Ao.progressViaCounter(S.length);await a.reportProgress(P);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:ee,currentPackage:ie,updatedPackage:ue}=W;a.reportInfo(0,`${G.prettyDescriptor(n,ee)} can be deduped from ${G.prettyLocator(n,ie)} to ${G.prettyLocator(n,ue)}`),a.reportJson({descriptor:G.stringifyDescriptor(ee),currentResolution:G.stringifyLocator(ie),updatedResolution:G.stringifyLocator(ue)}),t.storedResolutions.set(ee.descriptorHash,ue.locatorHash)}).finally(()=>P.tick())));let R;switch(I){case 0:R=\"No packages\";break;case 1:R=\"One package\";break;default:R=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),I})}var AC=class extends ft{constructor(){super(...arguments);this.strategy=ge.String(\"-s,--strategy\",\"highest\",{description:\"The strategy to use when deduping dependencies\",validator:fo(Xv)});this.check=ge.Boolean(\"-c,--check\",!1,{description:\"Exit with exit code 1 when duplicates are found, without persisting the dependency tree\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"dedupe\"]]}static{this.usage=ot.Usage({description:\"deduplicate dependencies with overlapping ranges\",details:\"\\n      Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\\n\\n      This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\\n\\n      - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\\n\\n      **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\\n\\n      If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      ### In-depth explanation:\\n\\n      Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\\n\\n      Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\\n    \",examples:[[\"Dedupe all packages\",\"$0 dedupe\"],[\"Dedupe all packages using a specific strategy\",\"$0 dedupe --strategy highest\"],[\"Dedupe a specific package\",\"$0 dedupe lodash\"],[\"Dedupe all packages with the `@babel/*` scope\",\"$0 dedupe '@babel/*'\"],[\"Check for duplicates (can be used as a CI step)\",\"$0 dedupe --check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=await Kr.find(r);await s.restoreInstallState({restoreResolutions:!1});let n=0,c=await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async f=>{n=await z5(s,{strategy:this.strategy,patterns:this.patterns,cache:a,report:f})});return c.hasErrors()?c.exitCode():this.check?n?1:0:await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Ge();Yt();var pC=class extends ft{static{this.paths=[[\"--clipanion=definitions\"]]}async execute(){let{plugins:e}=await ze.find(this.context.cwd,this.context.plugins),r=[];for(let c of e){let{commands:f}=c[1];if(f){let h=Ca.from(f).definitions();r.push([c[0],h])}}let s=this.cli.definitions(),a=(c,f)=>c.split(\" \").slice(1).join()===f.split(\" \").slice(1).join(),n=dye()[\"@yarnpkg/builder\"].bundles.standard;for(let c of r){let f=c[1];for(let p of f)s.find(h=>a(h.path,p.path)).plugin={name:c[0],isDefault:n.includes(c[0])}}this.context.stdout.write(`${JSON.stringify(s,null,2)}\n`)}};var hC=class extends ft{static{this.paths=[[\"help\"],[\"--help\"],[\"-h\"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ge();Dt();Yt();var gC=class extends ft{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,fe.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run([\"run\",this.leadingArgument,...this.args])}};Ge();var dC=class extends ft{static{this.paths=[[\"-v\"],[\"--version\"]]}async execute(){this.context.stdout.write(`${fn||\"<unknown>\"}\n`)}};Ge();Ge();Yt();var mC=class extends ft{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"exec\"]]}static{this.usage=ot.Usage({description:\"execute a shell script\",details:`\n      This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.\n\n      It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n    `,examples:[[\"Execute a single shell command\",\"$0 exec echo Hello World\"],[\"Execute a shell script\",'$0 exec \"tsc & babel src --out-dir lib\"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ge();Yt();Ul();var yC=class extends ft{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:Nx(wE(),[Z2(/^p[0-9a-f]{6}$/)])})}static{this.paths=[[\"explain\",\"peer-requirements\"]]}static{this.usage=ot.Usage({description:\"explain a set of peer requirements\",details:`\n      A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.\n\n      When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.\n\n      When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.\n\n      **Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\\`yarn explain peer-requirements\\`).\n    `,examples:[[\"Explain the corresponding peer requirement for a hash\",\"$0 explain peer-requirements p1a4ed\"],[\"List all peer requirements\",\"$0 explain peer-requirements\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<\"u\"?await Wlt(this.hash,s,{stdout:this.context.stdout}):await Ylt(s,{stdout:this.context.stdout})}};async function Wlt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>\"u\")throw new Error(`No peerDependency requirements found for hash: \"${t}\"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,\"...\")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[G.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),xs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[G.stringifyLocator(C.requester),n(C)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range===\"missing:\"){let C=c?\"\":\" , but all peer requests are optional\";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${C}.`)}else{let C=e.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let S=e.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: Expected the package to be registered\");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${G.prettyReference(e.configuration,S.version??\"0.0.0\")}, ${c?\"which does not satisfy all requests.\":\"which satisfies all requests\"}`),c?.type===3&&(c.range?p.reportInfo(0,`  The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0,\"  Unfortunately, the requested ranges have no overlap\"))}})).exitCode()}async function Ylt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>G.stringifyLocator(c.subject),([,c])=>G.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...G.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=\" and 1 other dependency\":h=\"\",c.provided.range!==\"missing:\"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");let C=t.storedPackages.get(E);if(!C)throw new Error(\"Assertion failed: Expected the provided package to have been registered\");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} provides ${G.prettyLocator(t.configuration,C)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} doesn't provide ${G.prettyIdent(t.configuration,c.ident)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ge();Yt();Ul();Ge();Ge();Dt();Yt();var mye=ut(Ai()),EC=class extends ft{constructor(){super(...arguments);this.useYarnPath=ge.Boolean(\"--yarn-path\",{description:\"Set the yarnPath setting even if the version can be accessed by Corepack\"});this.onlyIfNeeded=ge.Boolean(\"--only-if-needed\",!1,{description:\"Only lock the Yarn version if it isn't already locked\"});this.version=ge.String()}static{this.paths=[[\"set\",\"version\"]]}static{this.usage=ot.Usage({description:\"lock the Yarn version used by the project\",details:\"\\n      This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\\n\\n      By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\\n\\n      A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\\n\\n      The version specifier can be:\\n\\n      - a tag:\\n        - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\\n        - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\\n        - `classic` -> the most recent classic (`^0.x || ^1.x`) release\\n\\n      - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\\n\\n      - a semver version (e.g. `2.4.1`, `1.22.1`)\\n\\n      - a local file referenced through either a relative or absolute path\\n\\n      - `self` -> the version used to invoke the command\\n    \",examples:[[\"Download the latest release from the Yarn repository\",\"$0 set version latest\"],[\"Download the latest canary release from the Yarn repository\",\"$0 set version canary\"],[\"Download the latest classic release from the Yarn repository\",\"$0 set version classic\"],[\"Download the most recent Yarn 3 build\",\"$0 set version 3.x\"],[\"Download a specific Yarn 2 build\",\"$0 set version 2.0.0-rc.30\"],[\"Switch back to a specific Yarn 1 release\",\"$0 set version 1.22.1\"],[\"Use a release from the local filesystem\",\"$0 set version ./yarn.cjs\"],[\"Use a release from a URL\",\"$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js\"],[\"Download the version used to invoke the command\",\"$0 set version self\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get(\"yarnPath\")){let f=r.sources.get(\"yarnPath\");if(!f)throw new Error(\"Assertion failed: Expected 'yarnPath' to have a source\");let p=r.projectCwd??r.startingCwd;if(J.contains(p,f))return 0}let s=()=>{if(typeof fn>\"u\")throw new nt(\"The --install flag can only be used without explicit version specifier from the Yarn CLI\");return`file://${process.argv[1]}`},a,n=(f,p)=>({version:p,url:f.replace(/\\{\\}/g,p)});if(this.version===\"self\")a={url:s(),version:fn??\"self\"};else if(this.version===\"latest\"||this.version===\"berry\"||this.version===\"stable\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Zv(r,\"stable\"));else if(this.version===\"canary\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Zv(r,\"canary\"));else if(this.version===\"classic\")a={url:\"https://classic.yarnpkg.com/latest.js\",version:\"classic\"};else if(this.version.match(/^https?:/))a={url:this.version,version:\"remote\"};else if(this.version.match(/^\\.{0,2}[\\\\/]/)||fe.isAbsolute(this.version))a={url:`file://${J.resolve(fe.toPortablePath(this.version))}`,version:\"file\"};else if(Fr.satisfiesWithPrereleases(this.version,\">=2.0.0\"))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",this.version);else if(Fr.satisfiesWithPrereleases(this.version,\"^0.x || ^1.x\"))a=n(\"https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js\",this.version);else if(Fr.validRange(this.version))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Vlt(r,this.version));else throw new nt(`Invalid version descriptor \"${this.version}\"`);return(await Ot.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async f=>{let p=async()=>{let h=\"file://\";return a.url.startsWith(h)?(f.reportInfo(0,`Retrieving ${he.pretty(r,a.url,he.Type.PATH)}`),await ce.readFilePromise(a.url.slice(h.length))):(f.reportInfo(0,`Downloading ${he.pretty(r,a.url,he.Type.URL)}`),await nn.get(a.url,{configuration:r}))};await X5(r,a.version,p,{report:f,useYarnPath:this.useYarnPath})})).exitCode()}};async function Vlt(t,e){let s=(await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0})).tags.filter(a=>Fr.satisfiesWithPrereleases(a,e));if(s.length===0)throw new nt(`No matching release found for range ${he.pretty(t,e,he.Type.RANGE)}.`);return s[0]}async function Zv(t,e){let r=await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new nt(`Tag ${he.pretty(t,e,he.Type.RANGE)} not found`);return r.latest[e]}async function X5(t,e,r,{report:s,useYarnPath:a}){let n,c=async()=>(typeof n>\"u\"&&(n=await r()),n);if(e===null){let ee=await c();await ce.mktempPromise(async ie=>{let ue=J.join(ie,\"yarn.cjs\");await ce.writeFilePromise(ue,ee);let{stdout:le}=await qr.execvp(process.execPath,[fe.fromPortablePath(ue),\"--version\"],{cwd:ie,env:{...t.env,YARN_IGNORE_PATH:\"1\"}});if(e=le.trim(),!mye.default.valid(e))throw new Error(`Invalid semver version. ${he.pretty(t,\"yarn --version\",he.Type.CODE)} returned:\n${e}`)})}let f=t.projectCwd??t.startingCwd,p=J.resolve(f,\".yarn/releases\"),h=J.resolve(p,`yarn-${e}.cjs`),E=J.relative(t.startingCwd,h),C=je.isTaggedYarnVersion(e),S=t.get(\"yarnPath\"),P=!C,I=P||!!S||!!a;if(a===!1){if(P)throw new jt(0,\"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack\");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,\"Corepack\",\"https://nodejs.org/api/corepack.html\")} enabled; we'll have to rely on ${he.applyHyperlink(t,\"yarnPath\",\"https://yarnpkg.com/configuration/yarnrc#yarnPath\")} instead`),I=!0);if(I){let ee=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,\"magenta\")}`),await ce.removePromise(J.dirname(h)),await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.writeFilePromise(h,ee,{mode:493}),await ze.updateConfiguration(f,{yarnPath:J.relative(f,h)})}else await ce.removePromise(J.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let R=await Ut.tryFind(f)||new Ut;R.packageManager=`yarn@${C?e:await Zv(t,\"stable\")}`;let N={};R.exportTo(N);let U=J.join(f,Ut.fileName),W=`${JSON.stringify(N,null,R.indent)}\n`;return await ce.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function yye(t){return Br[jx(t)]}var Jlt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\\n\\n(?<details>(?:.(?!##))+)/gs;async function Klt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(fn)?fn:await Zv(t,\"canary\")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await nn.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Jlt),({groups:a})=>{if(!a)throw new Error(\"Assertion failed: Expected the match to have been successful\");let n=yye(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected \"${a.name}\" to be named \"${n}\"`);return[a.code,a.details]}))}var IC=class extends ft{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:$2(wE(),[Z2(/^YN[0-9]{4}$/)])});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"explain\"]]}static{this.usage=ot.Usage({description:\"explain an error code\",details:`\n      When the code argument is specified, this command prints its name and its details.\n\n      When used without arguments, this command lists all error codes and their names.\n    `,examples:[[\"Explain an error code\",\"$0 explain YN0006\"],[\"List all error codes\",\"$0 explain\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<\"u\"){let s=yye(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await Klt(r)).get(this.code),p=typeof f<\"u\"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.\n\nYou can help us by editing this page on GitHub \\u{1F642}:\n${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,\"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx\"))}\n`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}\n`):this.context.stdout.write(`${n}\n\n${p}\n`)}else{let s={children:je.mapAndFilter(Object.entries(Br),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Yf(Number(a)),value:he.tuple(he.Type.CODE,n)})};xs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ge();Dt();Yt();var Eye=ut(Go()),CC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Print versions of a package from the whole project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Print information for all packages, including transitive dependencies\"});this.extra=ge.Array(\"-X,--extra\",[],{description:\"An array of requests of extra data provided by plugins\"});this.cache=ge.Boolean(\"--cache\",!1,{description:\"Print information about the cache entry of a package (path, size, checksum)\"});this.dependents=ge.Boolean(\"--dependents\",!1,{description:\"Print all dependents for each matching package\"});this.manifest=ge.Boolean(\"--manifest\",!1,{description:\"Print data obtained by looking at the package archive (license, homepage, ...)\"});this.nameOnly=ge.Boolean(\"--name-only\",!1,{description:\"Only print the name for the matching packages\"});this.virtuals=ge.Boolean(\"--virtuals\",!1,{description:\"Print each instance of the virtual packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"info\"]]}static{this.usage=ot.Usage({description:\"see information related to packages\",details:\"\\n      This command prints various information related to the specified packages, accepting glob patterns.\\n\\n      By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\\n\\n      Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\\n\\n      Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\\n    \",examples:[[\"Show information about Lodash\",\"$0 info lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add(\"cache\"),this.dependents&&c.add(\"dependents\"),this.manifest&&c.add(\"manifest\");let f=(ie,{recursive:ue})=>{let le=ie.anchoredLocator.locatorHash,me=new Map,pe=[le];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");if(me.set(Be,Ce),G.isVirtualLocator(Ce)&&pe.push(G.devirtualizeLocator(Ce).locatorHash),!(!ue&&Be!==le))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let ue=new Map;for(let le of s.workspaces)for(let me of f(le,{recursive:ie}))ue.set(me.locatorHash,me);return ue.values()},h=({all:ie,recursive:ue})=>ie&&ue?s.storedPackages.values():ie?p({recursive:ue}):f(a,{recursive:ue}),E=({all:ie,recursive:ue})=>{let le=h({all:ie,recursive:ue}),me=this.patterns.map(Ce=>{let g=G.parseLocator(Ce),we=Eye.default.makeRe(G.stringifyIdent(g)),ye=G.isVirtualLocator(g),Ae=ye?G.devirtualizeLocator(g):g;return se=>{let Z=G.stringifyIdent(se);if(!we.test(Z))return!1;if(g.reference===\"unknown\")return!0;let De=G.isVirtualLocator(se),Re=De?G.devirtualizeLocator(se):se;return!(ye&&De&&g.reference!==se.reference||Ae.reference!==Re.reference)}}),pe=je.sortMap([...le],Ce=>G.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new nt(\"No package matched your request\");let P=new Map;if(this.dependents)for(let ie of S)for(let ue of ie.dependencies.values()){let le=s.storedResolutions.get(ue.descriptorHash);if(typeof le>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");je.getArrayWithDefault(P,le).push(ie)}let I=new Map;for(let ie of S){if(!G.isVirtualLocator(ie))continue;let ue=G.devirtualizeLocator(ie);je.getArrayWithDefault(I,ue.locatorHash).push(ie)}let R={},N={children:R},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksums,report:new ki,cacheOptions:{skipIntegrityCheck:!0}},ee=[async(ie,ue,le)=>{if(!ue.has(\"manifest\"))return;let me=await U.fetch(ie,W),pe;try{pe=await Ut.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}le(\"Manifest\",{License:he.tuple(he.Type.NO_HINT,pe.license),Homepage:he.tuple(he.Type.URL,pe.raw.homepage??null)})},async(ie,ue,le)=>{if(!ue.has(\"cache\"))return;let me=s.storedChecksums.get(ie.locatorHash)??null,pe=n.getLocatorPath(ie,me),Be;if(pe!==null)try{Be=await ce.statPromise(pe)}catch{}let Ce=typeof Be<\"u\"?[Be.size,he.Type.SIZE]:void 0;le(\"Cache\",{Checksum:he.tuple(he.Type.NO_HINT,me),Path:he.tuple(he.Type.PATH,pe),Size:Ce})}];for(let ie of C){let ue=G.isVirtualLocator(ie);if(!this.virtuals&&ue)continue;let le={},me={value:[ie,he.Type.LOCATOR],children:le};if(R[G.stringifyLocator(ie)]=me,this.nameOnly){delete me.children;continue}let pe=I.get(ie.locatorHash);typeof pe<\"u\"&&(le.Instances={label:\"Instances\",value:he.tuple(he.Type.NUMBER,pe.length)}),le.Version={label:\"Version\",value:he.tuple(he.Type.NO_HINT,ie.version)};let Be=(g,we)=>{let ye={};if(le[g]=ye,Array.isArray(we))ye.children=we.map(Ae=>({value:Ae}));else{let Ae={};ye.children=Ae;for(let[se,Z]of Object.entries(we))typeof Z>\"u\"||(Ae[se]={label:se,value:Z})}};if(!ue){for(let g of ee)await g(ie,c,Be);await r.triggerHook(g=>g.fetchPackageInfo,ie,c,Be)}ie.bin.size>0&&!ue&&Be(\"Exported Binaries\",[...ie.bin.keys()].map(g=>he.tuple(he.Type.PATH,g)));let Ce=P.get(ie.locatorHash);typeof Ce<\"u\"&&Ce.length>0&&Be(\"Dependents\",Ce.map(g=>he.tuple(he.Type.LOCATOR,g))),ie.dependencies.size>0&&!ue&&Be(\"Dependencies\",[...ie.dependencies.values()].map(g=>{let we=s.storedResolutions.get(g.descriptorHash),ye=typeof we<\"u\"?s.storedPackages.get(we)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:ye})})),ie.peerDependencies.size>0&&ue&&Be(\"Peer dependencies\",[...ie.peerDependencies.values()].map(g=>{let we=ie.dependencies.get(g.identHash),ye=typeof we<\"u\"?s.storedResolutions.get(we.descriptorHash)??null:null,Ae=ye!==null?s.storedPackages.get(ye)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:Ae})}))}xs.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Ge();Dt();wc();var nF=ut(Fd());Yt();var Z5=ut(Ai());Ul();var zlt=[{selector:t=>t===-1,name:\"nodeLinker\",value:\"node-modules\"},{selector:t=>t!==-1&&t<8,name:\"enableGlobalCache\",value:!1},{selector:t=>t!==-1&&t<8,name:\"compressionLevel\",value:\"mixed\"}],wC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.immutable=ge.Boolean(\"--immutable\",{description:\"Abort with an error exit code if the lockfile was to be modified\"});this.immutableCache=ge.Boolean(\"--immutable-cache\",{description:\"Abort with an error exit code if the cache folder was to be modified\"});this.refreshLockfile=ge.Boolean(\"--refresh-lockfile\",{description:\"Refresh the package metadata stored in the lockfile\"});this.checkCache=ge.Boolean(\"--check-cache\",{description:\"Always refetch the packages and ensure that their checksums are consistent\"});this.checkResolutions=ge.Boolean(\"--check-resolutions\",{description:\"Validates that the package resolutions are coherent\"});this.inlineBuilds=ge.Boolean(\"--inline-builds\",{description:\"Verbosely print the output of the build steps of dependencies\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.cacheFolder=ge.String(\"--cache-folder\",{hidden:!0});this.frozenLockfile=ge.Boolean(\"--frozen-lockfile\",{hidden:!0});this.ignoreEngines=ge.Boolean(\"--ignore-engines\",{hidden:!0});this.nonInteractive=ge.Boolean(\"--non-interactive\",{hidden:!0});this.preferOffline=ge.Boolean(\"--prefer-offline\",{hidden:!0});this.production=ge.Boolean(\"--production\",{hidden:!0});this.registry=ge.String(\"--registry\",{hidden:!0});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.networkTimeout=ge.String(\"--network-timeout\",{hidden:!0})}static{this.paths=[[\"install\"],ot.Default]}static{this.usage=ot.Usage({description:\"install the project dependencies\",details:\"\\n      This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\\n\\n      - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\\n\\n      - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\\n\\n      - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\\n\\n      - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\\n\\n      Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\\n\\n      If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\\n\\n      If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\\n\\n      If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\\n\\n      If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\\n\\n      If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n    \",examples:[[\"Install the project\",\"$0 install\"],[\"Validate a project when using Zero-Installs\",\"$0 install --immutable --immutable-cache\"],[\"Validate a project when using Zero-Installs (slightly safer if you accept external PRs)\",\"$0 install --immutable --immutable-cache --check-cache\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<\"u\"&&r.useWithSource(\"<cli>\",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let s=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await SI({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:\"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore\",error:!nF.default.VERCEL},{option:this.registry,message:\"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file\"},{option:this.preferOffline,message:\"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead\",error:!nF.default.VERCEL},{option:this.production,message:\"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead\",error:!0},{option:this.nonInteractive,message:\"The --non-interactive option is deprecated\",error:!s},{option:this.frozenLockfile,message:\"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead\",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:\"The cache-folder option has been deprecated; use rc settings instead\",error:!nF.default.NETLIFY}]);if(a!==null)return a;let n=this.mode===\"update-lockfile\";if(n&&(this.immutable||this.immutableCache))throw new nt(`${he.pretty(r,\"--immutable\",he.Type.CODE)} and ${he.pretty(r,\"--immutable-cache\",he.Type.CODE)} cannot be used with ${he.pretty(r,\"--mode=update-lockfile\",he.Type.CODE)}`);let c=(this.immutable??r.get(\"enableImmutableInstalls\"))&&!n,f=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await $lt(r,c)&&(N.reportInfo(48,\"Automatically removed core plugins that are now builtins \\u{1F44D}\"),U=!0),await Zlt(r,c)&&(N.reportInfo(48,\"Automatically fixed merge conflicts \\u{1F44D}\"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(ze.telemetry?.isNew)ze.telemetry.commitTips(),N.reportInfo(65,\"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry\"),N.reportInfo(65,`Run ${he.pretty(r,\"yarn config set --home enableTelemetry 0\",he.Type.CODE)} to disable`),N.reportSeparator();else if(ze.telemetry?.shouldShowTips){let U=await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let W=null;if(fn!==null){let ie=Z5.default.prerelease(fn)?\"canary\":\"stable\",ue=U.latest[ie];Z5.default.gt(ue,fn)&&(W=[ie,ue])}if(W)ze.telemetry.commitTips(),N.reportInfo(88,`${he.applyStyle(r,`A new ${W[0]} version of Yarn is available:`,he.Style.BOLD)} ${G.prettyReference(r,W[1])}!`),N.reportInfo(88,`Upgrade now by running ${he.pretty(r,`yarn set version ${W[1]}`,he.Type.CODE)}`),N.reportSeparator();else{let ee=ze.telemetry.selectTip(U.tips);ee&&(N.reportInfo(89,he.pretty(r,ee.message,he.Type.MARKDOWN_INLINE)),ee.url&&N.reportInfo(89,`Learn more at ${ee.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await Tt.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let W of zlt)W.selector(E)&&typeof r.sources.get(W.name)>\"u\"&&(r.use(\"<compat>\",{[W.name]:W.value},p.cwd,{overwrite:!0}),U[W.name]=W.value);Object.keys(U).length>0&&(await ze.updateConfiguration(p.cwd,U),N.reportInfo(87,\"Migrated your project to the latest Yarn version \\u{1F680}\"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let C=await Kr.find(r,{immutable:f,check:this.checkCache});if(!h)throw new ar(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let S=r.get(\"enableHardenedMode\");S&&typeof r.sources.get(\"enableHardenedMode\")>\"u\"&&await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,\"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.\"),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${he.applyHyperlink(r,\"documentation\",\"https://yarnpkg.com/features/security#hardened-mode\")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??S)&&(p.lockfileNeedsRefresh=!0);let P=this.checkResolutions??S;return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:C,report:R,immutable:c,checkResolutions:P,mode:this.mode})})).exitCode()}},Xlt=\"<<<<<<<\";async function Zlt(t,e){if(!t.projectCwd)return!1;let r=J.join(t.projectCwd,Er.lockfile);if(!await ce.existsPromise(r)||!(await ce.readFilePromise(r,\"utf8\")).includes(Xlt))return!1;if(e)throw new jt(47,\"Cannot autofix a lockfile when running an immutable install\");let a=await qr.execvp(\"git\",[\"rev-parse\",\"MERGE_HEAD\",\"HEAD\"],{cwd:t.projectCwd});if(a.code!==0&&(a=await qr.execvp(\"git\",[\"rev-parse\",\"REBASE_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0&&(a=await qr.execvp(\"git\",[\"rev-parse\",\"CHERRY_PICK_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0)throw new jt(83,\"Git returned an error when trying to find the commits pertaining to the conflict\");let n=await Promise.all(a.stdout.trim().split(/\\n/).map(async f=>{let p=await qr.execvp(\"git\",[\"show\",`${f}:./${Er.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new jt(83,`Git returned an error when trying to access the lockfile content in ${f}`);try{return ls(p.stdout)}catch{throw new jt(46,\"A variant of the conflicting lockfile failed to parse\")}}));n=n.filter(f=>!!f.__metadata);for(let f of n){if(f.__metadata.version<7)for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=G.parseDescriptor(p,!0),E=t.normalizeDependency(h),C=G.stringifyDescriptor(E);C!==p&&(f[C]=f[p],delete f[p])}for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=f[p].checksum;typeof h>\"u\"||h.includes(\"/\")||(f[p].checksum=`${f.__metadata.cacheKey}/${h}`)}}let c=Object.assign({},...n);c.__metadata.version=`${Math.min(...n.map(f=>parseInt(f.__metadata.version??0)))}`,c.__metadata.cacheKey=\"merged\";for(let[f,p]of Object.entries(c))typeof p==\"string\"&&delete c[f];return await ce.changeFilePromise(r,nl(c),{automaticNewlines:!0}),!0}async function $lt(t,e){if(!t.projectCwd)return!1;let r=[],s=J.join(t.projectCwd,\".yarn/plugins/@yarnpkg\");return await ze.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let c=n.filter(f=>{if(!f.path)return!0;let p=J.resolve(t.projectCwd,f.path),h=ov.has(f.spec)&&J.contains(s,p);return h&&r.push(p),!h});return c.length===0?ze.deleteProperty:c.length===n.length?n:c}},{immutable:e})?(await Promise.all(r.map(async n=>{await ce.removePromise(n)})),!0):!1}Ge();Dt();Yt();var BC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Link all workspaces belonging to the target projects to the current one\"});this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Also link private workspaces belonging to the target projects to the current one\"});this.relative=ge.Boolean(\"-r,--relative\",!1,{description:\"Link workspaces using relative paths instead of absolute paths\"});this.destinations=ge.Rest()}static{this.paths=[[\"link\"]]}static{this.usage=ot.Usage({description:\"connect the local project to another one\",details:\"\\n      This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\\n    \",examples:[[\"Register one or more remote workspaces for use in the current project\",\"$0 link ~/ts-loader ~/jest\"],[\"Register all workspaces from a remote project for use in the current project\",\"$0 link ~/jest --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=s.topLevelWorkspace,f=[];for(let p of this.destinations){let h=J.resolve(this.context.cwd,fe.toPortablePath(p)),E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(s.cwd===C.cwd)throw new nt(`Invalid destination '${p}'; Can't link the project to itself`);if(!S)throw new ar(C.cwd,h);if(this.all){let P=!1;for(let I of C.workspaces)I.manifest.name&&(!I.manifest.private||this.private)&&(f.push(I),P=!0);if(!P)throw new nt(`No workspace found to be linked in the target project: ${p}`)}else{if(!S.manifest.name)throw new nt(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(S.manifest.private&&!this.private)throw new nt(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);f.push(S)}}for(let p of f){let h=G.stringifyIdent(p.anchoredLocator),E=this.relative?J.relative(s.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Yt();var vC=class extends ft{constructor(){super(...arguments);this.args=ge.Proxy()}static{this.paths=[[\"node\"]]}static{this.usage=ot.Usage({description:\"run node with the hook already setup\",details:`\n      This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n      The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n    `,examples:[[\"Run a Node script\",\"$0 node ./my-script.js\"]]})}async execute(){return this.cli.run([\"exec\",\"node\",...this.args])}};Ge();Yt();var SC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"check\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"find all third-party plugins that differ from their own spec\",details:`\n      Check only the plugins from https.\n\n      If this command detects any plugin differences in the CI environment, it will throw an error.\n    `,examples:[[\"find all third-party plugins that differ from their own spec\",\"$0 plugin check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await nn.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),C=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ge();Ge();Dt();Yt();var vye=Ie(\"os\");Ge();Dt();Yt();var Iye=Ie(\"os\");Ge();wc();Yt();var ect=\"https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml\";async function Sm(t,e){let r=await nn.get(ect,{configuration:t}),s=ls(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Fr.satisfiesWithPrereleases(e,n.range??\"<4.0.0-rc.1\")))}var DC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"list\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the available official plugins\",details:\"\\n      This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\\n    \",examples:[[\"List the official plugins\",\"$0 plugin list\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Sm(r,fn);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=\" [experimental]\"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var tct=/^[0-9]+$/,rct=process.platform===\"win32\";function Cye(t){return tct.test(t)?`pull/${t}/head`:t}var nct=({repository:t,branch:e},r)=>[[\"git\",\"init\",fe.fromPortablePath(r)],[\"git\",\"remote\",\"add\",\"origin\",t],[\"git\",\"fetch\",\"origin\",\"--depth=1\",Cye(e)],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"]],ict=({branch:t})=>[[\"git\",\"fetch\",\"origin\",\"--depth=1\",Cye(t),\"--force\"],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"],[\"git\",\"clean\",\"-dfx\",\"-e\",\"packages/yarnpkg-cli/bundles\"]],sct=({plugins:t,noMinify:e},r,s)=>[[\"yarn\",\"build:cli\",...new Array().concat(...t.map(a=>[\"--plugin\",J.resolve(s,a)])),...e?[\"--no-minify\"]:[],\"|\"],[rct?\"move\":\"mv\",\"packages/yarnpkg-cli/bundles/yarn.js\",fe.fromPortablePath(r),\"|\"]],bC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.plugins=ge.Array(\"--plugin\",[],{description:\"An array of additional plugins that should be included in the bundle\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"If set, the bundle will be built but not added to the project\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a bundle for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.skipPlugins=ge.Boolean(\"--skip-plugins\",!1,{description:\"Skip updating the contrib plugins\"})}static{this.paths=[[\"set\",\"version\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({description:\"build Yarn from master\",details:`\n      This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n\n      By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \\`--skip-plugins\\` flag.\n    `,examples:[[\"Build Yarn from master\",\"$0 set version from sources\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.installPath<\"u\"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,Iye.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await $5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,\"Building a fresh bundle\"),c.reportSeparator();let f=await qr.execvp(\"git\",[\"rev-parse\",\"--short\",\"HEAD\"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);ce.existsSync(p)||(await $v(sct(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await ce.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await X5(r,null,async()=>h,{report:c});this.skipPlugins||await oct(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function $v(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]===\"|\";if(c&&n.pop(),c)await qr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,`  $ ${[a,...n].join(\" \")}`,\"grey\")}\n`);try{await qr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function $5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&ce.existsSync(J.join(s,\".git\"))){r.reportInfo(0,\"Fetching the latest commits\"),r.reportSeparator();try{await $v(ict(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,\"Repository update failed; we'll try to regenerate it\")}}a||(r.reportInfo(0,\"Cloning the remote repository\"),r.reportSeparator(),await ce.removePromise(s),await ce.mkdirPromise(s,{recursive:!0}),await $v(nct(t,s),{configuration:e,context:t.context,target:s}))}async function oct(t,e,{project:r,report:s,target:a}){let n=await Sm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await eq(f,t,{project:r,report:s,target:a})}Ge();Ge();Dt();Yt();var wye=ut(Ai()),Bye=Ie(\"vm\");var PC=class extends ft{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean(\"--checksum\",!0,{description:\"Whether to care if this plugin is modified\"})}static{this.paths=[[\"plugin\",\"import\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"download a plugin\",details:`\n      This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n      Three types of plugin references are accepted:\n\n      - If the plugin is stored within the Yarn repository, it can be referenced by name.\n      - Third-party plugins can be referenced directly through their public urls.\n      - Local plugins can be referenced by their path on the disk.\n\n      If the \\`--no-checksum\\` option is set, Yarn will no longer care if the plugin is modified.\n\n      Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \\`@yarnpkg/builder\\` package).\n    `,examples:[['Download and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import @yarnpkg/plugin-exec\"],['Download and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import exec\"],[\"Download and activate a community plugin\",\"$0 plugin import https://example.org/path/to/plugin.js\"],[\"Activate a local plugin\",\"$0 plugin import ./path/to/plugin.js\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Tt.find(r,this.context.cwd),c,f;if(this.name.match(/^\\.{0,2}[\\\\/]/)||fe.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,fe.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=J.relative(n.cwd,p),f=await ce.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new jt(52,`Plugin specifier \"${this.name}\" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\"));if(h.reference!==\"unknown\"&&!wye.default.valid(h.reference))throw new jt(0,\"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.\");let E=G.stringifyIdent(h),C=await Sm(r,fn);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.\n`;throw r.plugins.has(E)?S+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,\"https://github.com/yarnpkg/berry/blob/master/plugins.yml\",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,\"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js\",he.Type.URL)}).`,new jt(51,S)}c=E,p=C[E].url,h.reference!==\"unknown\"?p=p.replace(/\\/master\\//,`/${E}/${h.reference}/`):fn!==null&&(p=p.replace(/\\/master\\//,`/@yarnpkg/cli/${fn}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,\"green\")}`),f=await nn.get(p,{configuration:r})}await tq(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function tq(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,Bye.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=J.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,\"magenta\")}`),await ce.mkdirPromise(J.dirname(E),{recursive:!0}),await ce.writeFilePromise(E,e);let C={path:h,spec:t};r&&(C.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[C])}var act=({pluginName:t,noMinify:e},r)=>[[\"yarn\",`build:${t}`,...e?[\"--no-minify\"]:[],\"|\"]],xC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a plugin for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.name=ge.String()}static{this.paths=[[\"plugin\",\"import\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"build a plugin from sources\",details:`\n      This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n      The plugins can be referenced by their short name if sourced from the official Yarn repository.\n    `,examples:[['Build and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import from sources @yarnpkg/plugin-exec\"],['Build and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import from sources exec\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<\"u\"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,vye.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Tt.find(r,this.context.cwd),f=G.parseIdent(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\")),p=G.stringifyIdent(f),h=await Sm(r,fn);if(!Object.hasOwn(h,p))throw new jt(51,`Couldn't find a plugin named \"${p}\" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await $5(this,{configuration:r,report:n,target:s}),await eq(E,this,{project:c,report:n,target:s})})).exitCode()}};async function eq(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\\//,\"\"),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await $v(act({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${c}/bundles/${t}.js`),h=await ce.readFilePromise(p);await tq(t,h,{project:s,report:a})}Ge();Dt();Yt();var kC=class extends ft{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[[\"plugin\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"remove a plugin\",details:`\n      This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n      **Note:** The plugins have to be referenced by their name property, which can be obtained using the \\`yarn plugin runtime\\` command. Shorthands are not allowed.\n   `,examples:[[\"Remove a plugin imported from the Yarn repository\",\"$0 plugin remove @yarnpkg/plugin-typescript\"],[\"Remove a plugin imported from a local file\",\"$0 plugin remove my-local-plugin\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=G.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${G.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=J.resolve(s.cwd,p);ce.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await ce.removePromise(h)),n.reportInfo(0,\"Updating the configuration...\"),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ge();Yt();var QC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"runtime\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the active plugins\",details:`\n      This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n    `,examples:[[\"List the currently active plugins\",\"$0 plugin runtime\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=\" [builtin]\"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ge();Ge();Yt();var TC=class extends ft{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[[\"rebuild\"]]}static{this.usage=ot.Usage({description:\"rebuild the project's native packages\",details:`\n      This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n      Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n      By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n    `,examples:[[\"Rebuild all packages\",\"$0 rebuild\"],[\"Rebuild fsevents only\",\"$0 rebuild fsevents\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(G.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new ki}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();Yt();var rq=ut(Go());Ul();var RC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Apply the operation to all workspaces from the current project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"remove\"]]}static{this.usage=ot.Usage({description:\"remove dependencies from the project\",details:`\n      This command will remove the packages matching the specified patterns from the current workspace.\n\n      If the \\`--mode=<mode>\\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n      - \\`skip-build\\` will not run the build scripts at all. Note that this is different from setting \\`enableScripts\\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n      - \\`update-lockfile\\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n    `,examples:[[\"Remove a dependency from the current project\",\"$0 remove lodash\"],[\"Remove a dependency from all workspaces at once\",\"$0 remove lodash --all\"],[\"Remove all dependencies starting with `eslint-`\",\"$0 remove 'eslint-*'\"],[\"Remove all dependencies with the `@babel` scope\",\"$0 remove '@babel/*'\"],[\"Remove all dependencies matching `react-dom` or `react-helmet`\",\"$0 remove 'react-{dom,helmet}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],p=[],h=!1,E=[];for(let I of this.patterns){let R=!1,N=G.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let ee of(0,rq.default)(W,I))U.manifest.peerDependenciesMeta.delete(ee),h=!0,R=!0;for(let ee of f){let ie=U.manifest.getForScope(ee),ue=[...ie.values()].map(le=>G.stringifyIdent(le));for(let le of(0,rq.default)(ue,G.stringifyIdent(N))){let{identHash:me}=G.parseIdent(le),pe=ie.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");U.manifest[ee].delete(me),E.push([U,ee,pe]),h=!0,R=!0}}}R||p.push(I)}let C=p.length>1?\"Patterns\":\"Pattern\",S=p.length>1?\"don't\":\"doesn't\",P=this.all?\"any\":\"this\";if(p.length>0)throw new nt(`${C} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${P} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ge();Ge();Yt();var Sye=Ie(\"util\"),FC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"run\"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E,\" \")}   ${(0,Sye.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ge();Ge();Yt();var NC=class extends ft{constructor(){super(...arguments);this.inspect=ge.String(\"--inspect\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.inspectBrk=ge.String(\"--inspect-brk\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.topLevel=ge.Boolean(\"-T,--top-level\",!1,{description:\"Check the root workspace for scripts and/or binaries instead of the current one\"});this.binariesOnly=ge.Boolean(\"-B,--binaries-only\",!1,{description:\"Ignore any user defined scripts and only check for binaries\"});this.require=ge.String(\"--require\",{description:\"Forwarded to the underlying Node process when executing a binary\"});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"run\"]]}static{this.usage=ot.Usage({description:\"run a script defined in the package.json\",details:`\n      This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n      - If the \\`scripts\\` field from your local package.json contains a matching script name, its definition will get executed.\n\n      - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n      - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n      Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n    `,examples:[[\"Run the tests from the local workspace\",\"$0 run test\"],['Same thing, but without the \"run\" keyword',\"$0 test\"],[\"Inspect Webpack while running\",\"$0 run --inspect-brk webpack\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect==\"string\"?h.push(`--inspect=${this.inspect}`):h.push(\"--inspect\")),this.inspectBrk&&(typeof this.inspectBrk==\"string\"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push(\"--inspect-brk\")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(\":\")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await In.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName===\"node-gyp\"?new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on \"node-gyp\" to build itself, but didn't list it in their dependencies. To fix that, please run \"yarn add node-gyp\" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName===\"global\")throw new nt(\"The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead\");let h=[this.scriptName].concat(this.args);for(let[E,C]of $I)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named \"${this.scriptName}\", but a matching command can be found in the ${E} plugin. You can install it with \"yarn plugin import ${E}\".`);throw new nt(`Couldn't find a script named \"${this.scriptName}\".`)}}};Ge();Ge();Yt();var OC=class extends ft{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[[\"set\",\"resolution\"]]}static{this.usage=ot.Usage({description:\"enforce a package resolution\",details:'\\n      This command updates the resolution table so that `descriptor` is resolved by `resolution`.\\n\\n      Note that by default this command only affect the current resolution table - meaning that this \"manual override\" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\\n\\n      Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\\n    ',examples:[[\"Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0\",\"$0 set resolution lodash@npm:^1.2.3 npm:1.5.0\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=G.parseDescriptor(this.descriptor,!0),f=G.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ge();Dt();Yt();var Dye=ut(Go()),LC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unlink all workspaces belonging to the target project from the current one\"});this.leadingArguments=ge.Rest()}static{this.paths=[[\"unlink\"]]}static{this.usage=ot.Usage({description:\"disconnect the local project from another one\",details:`\n      This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.\n    `,examples:[[\"Unregister a remote workspace in the current project\",\"$0 unlink ~/ts-loader\"],[\"Unregister all workspaces from a remote project in the current project\",\"$0 unlink ~/jest --all\"],[\"Unregister all previously linked workspaces\",\"$0 unlink --all\"],[\"Unregister all workspaces matching a glob\",\"$0 unlink '@babel/*' 'pkg-{a,b}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith(\"portal:\")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,fe.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let P of C.workspaces)P.manifest.name&&f.add(G.stringifyIdent(P.anchoredLocator));if(f.size===0)throw new nt(\"No workspace found to be unlinked in the target project\")}else{if(!S.manifest.name)throw new nt(\"The target workspace doesn't have a name and thus cannot be unlinked\");f.add(G.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,Dye.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();Yt();var bye=ut(Vv()),nq=ut(Go());Ul();var MC=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Offer various choices, depending on the detected upgrade paths\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Resolve again ALL resolutions for those packages\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"up\"]]}static{this.usage=ot.Usage({description:\"upgrade dependencies across the project\",details:\"\\n      This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\\n\\n      If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\\n\\n      If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\\n\\n      The, `-C,--caret`, `-E,--exact` and  `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\\n\\n      This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\\n    \",examples:[[\"Upgrade all instances of lodash to the latest release\",\"$0 up lodash\"],[\"Upgrade all instances of lodash to the latest release, but ask confirmation for each\",\"$0 up lodash -i\"],[\"Upgrade all instances of lodash to 1.2.3\",\"$0 up lodash@1.2.3\"],[\"Upgrade all instances of packages with the `@babel` scope to the latest release\",\"$0 up '@babel/*'\"],[\"Upgrade all instances of packages containing the word `jest` to the latest release\",\"$0 up '*jest*'\"],[\"Upgrade all instances of packages with the `@babel` scope to 7.0.0\",\"$0 up '@babel/*@7.0.0'\"]]})}static{this.schema=[tB(\"recursive\",qf.Forbids,[\"interactive\",\"exact\",\"tilde\",\"caret\"],{ignore:[void 0,!1]})]}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=[...s.storedDescriptors.values()],f=c.map(E=>G.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(G.parseDescriptor(E).range!==\"unknown\")throw new nt(\"Ranges aren't allowed when using --recursive\");for(let C of(0,nq.default)(f,E)){let S=G.parseIdent(C);p.add(S.identHash)}}let h=c.filter(E=>p.has(E.identHash));for(let E of h)s.storedDescriptors.delete(E.descriptorHash),s.storedResolutions.delete(E.descriptorHash);return await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=Kv(this,s),h=f?[\"keep\",\"reuse\",\"project\",\"latest\"]:[\"project\",\"latest\"],E=[],C=[];for(let N of this.patterns){let U=!1,W=G.parseDescriptor(N),ee=G.stringifyIdent(W);for(let ie of s.workspaces)for(let ue of[\"dependencies\",\"devDependencies\"]){let me=[...ie.manifest.getForScope(ue).values()].map(Be=>G.stringifyIdent(Be)),pe=ee===\"*\"?me:(0,nq.default)(me,ee);for(let Be of pe){let Ce=G.parseIdent(Be),g=ie.manifest[ue].get(Ce.identHash);if(typeof g>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let we=G.makeDescriptor(Ce,W.range);E.push(Promise.resolve().then(async()=>[ie,ue,g,await zv(we,{project:s,workspace:ie,cache:n,target:ue,fixed:c,modifier:p,strategies:h})])),U=!0}}U||C.push(N)}if(C.length>1)throw new nt(`Patterns ${he.prettyList(r,C,he.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new nt(`Pattern ${he.prettyList(r,C,he.Type.CODE)} doesn't match any packages referenced by any workspace`);let S=await Promise.all(E),P=await lA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:W,rejections:ee}]of S){let ie=W.filter(ue=>ue.descriptor!==null);if(ie.length===0){let[ue]=ee;if(typeof ue>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");let le=this.cli.error(ue);s.configuration.get(\"enableNetwork\")?N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range\n\n${le}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${le}`)}else ie.length>1&&!f&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(P.hasErrors())return P.exitCode();let I=!1,R=[];for(let[N,U,,{suggestions:W}]of S){let ee,ie=W.filter(pe=>pe.descriptor!==null),ue=ie[0].descriptor,le=ie.every(pe=>G.areDescriptorsEqual(pe.descriptor,ue));ie.length===1||le?ee=ue:(I=!0,{answer:ee}=await(0,bye.prompt)({type:\"select\",name:\"answer\",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \\u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(ee.identHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: This descriptor should have a matching entry\");if(me.descriptorHash!==ee.descriptorHash)N.manifest[U].set(ee.identHash,ee),R.push([N,U,me,ee]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),I&&this.context.stdout.write(`\n`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ge();Ge();Ge();Yt();var UC=class extends ft{constructor(){super(...arguments);this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"List, for each workspace, what are all the paths that lead to the dependency\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.peers=ge.Boolean(\"--peers\",!1,{description:\"Also print the peer dependencies that match the specified name\"});this.package=ge.String()}static{this.paths=[[\"why\"]]}static{this.usage=ot.Usage({description:\"display the reason why a package is needed\",details:`\n      This command prints the exact reasons why a package appears in the dependency tree.\n\n      If \\`-R,--recursive\\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named \"Foo\" when looking for \"Bar\", it means that \"Foo\" already got printed higher in the tree.\n    `,examples:[[\"Explain why lodash is used in your project\",\"$0 why lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=G.parseIdent(this.package).identHash,c=this.recursive?cct(s,n,{configuration:r,peers:this.peers}):lct(s,n,{configuration:r,peers:this.peers});xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function lct(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>G.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(\"Assertion failed: The resolution should have been registered\");let S=t.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: The package should have been registered\");if(S.identHash!==e)continue;{let I=G.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let P=G.stringifyLocator(S);p[P]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function cct(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>G.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let P=!1;S.identHash===e&&(P=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let R=t.storedResolutions.get(I.descriptorHash);if(!R)throw new Error(\"Assertion failed: The resolution should have been registered\");let N=t.storedPackages.get(R);if(!N)throw new Error(\"Assertion failed: The package should have been registered\");f(N)&&(P=!0)}return P&&c.add(S.locatorHash),P};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,P,I)=>{if(!c.has(S.locatorHash))return;let R=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:R,children:N},W=G.stringifyLocator(S);if(P[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let ee of S.dependencies.values()){if(!s&&S.peerDependencies.has(ee.identHash))continue;let ie=t.storedResolutions.get(ee.descriptorHash);if(!ie)throw new Error(\"Assertion failed: The resolution should have been registered\");let ue=t.storedPackages.get(ie);if(!ue)throw new Error(\"Assertion failed: The package should have been registered\");C(ue,N,ee)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ge();var pq={};Vt(pq,{GitFetcher:()=>tS,GitResolver:()=>rS,default:()=>kct,gitUtils:()=>ka});Ge();Dt();var ka={};Vt(ka,{TreeishProtocols:()=>eS,clone:()=>Aq,fetchBase:()=>Jye,fetchChangedFiles:()=>Kye,fetchChangedWorkspaces:()=>Pct,fetchRoot:()=>Vye,isGitUrl:()=>jC,lsRemote:()=>Yye,normalizeLocator:()=>bct,normalizeRepoUrl:()=>_C,resolveUrl:()=>fq,splitRepoUrl:()=>W0,validateRepoUrl:()=>uq});Ge();Dt();Yt();ql();var qye=ut(Hye()),HC=ut(Ie(\"querystring\")),lq=ut(Ai());function aq(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function jye(t){try{return new URL(t)}catch{return}}function Sct(t){let e=aq(t,\"@\",\"#\"),r=aq(t,\":\",\"#\");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),aq(t,\":\",\"#\")===-1&&t.indexOf(\"//\")===-1&&(t=`ssh://${t}`),t}function Gye(t){return jye(t)||jye(Sct(t))}function _C(t,{git:e=!1}={}){if(t=t.replace(/^git\\+https:/,\"https:\"),t=t.replace(/^(?:github:|https:\\/\\/github\\.com\\/|git:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\\.git)?(#.*)?$/,\"https://github.com/$1/$2.git$3\"),t=t.replace(/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/,\"https://github.com/$1/$2.git#$3\"),e){let r=Gye(t);r&&(t=r.href),t=t.replace(/^git\\+([^:]+):/,\"$1:\")}return t}function Wye(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||\"ssh\"} -o BatchMode=yes`}}var Dct=[/^ssh:/,/^git(?:\\+[^:]+)?:/,/^(?:git\\+)?https?:[^#]+\\/[^#]+(?:\\.git)(?:#.*)?$/,/^git@[^#]+\\/[^#]+\\.git(?:#.*)?$/,/^(?:github:|https:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z._0-9-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\\.git)?(?:#.*)?$/,/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/],eS=(a=>(a.Commit=\"commit\",a.Head=\"head\",a.Tag=\"tag\",a.Semver=\"semver\",a))(eS||{});function jC(t){return t?Dct.some(e=>!!t.match(e)):!1}function W0(t){t=_C(t);let e=t.indexOf(\"#\");if(e===-1)return{repo:t,treeish:{protocol:\"head\",request:\"HEAD\"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=HC.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!=\"string\")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(eS).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n<\"u\"?[n,a[n]]:[\"head\",\"HEAD\"];for(let p of Object.values(eS))delete a[p];return{repo:r,treeish:{protocol:c,request:f},extra:a}}else{let a=s.indexOf(\":\"),[n,c]=a===-1?[null,s]:[s.slice(0,a),s.slice(a+1)];return{repo:r,treeish:{protocol:n,request:c},extra:{}}}}function bct(t){return G.makeLocator(t,_C(t.reference))}function uq(t,{configuration:e}){let r=_C(t,{git:!0});if(!nn.getNetworkSettings(`https://${(0,qye.default)(r).resource}`,{configuration:e}).enableNetwork)throw new jt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function Yye(t,e){let r=uq(t,{configuration:e}),s=await cq(\"listing refs\",[\"ls-remote\",r],{cwd:e.startingCwd,env:Wye()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\\t([^\\n]+)/gm,c;for(;(c=n.exec(s.stdout))!==null;)a.set(c[2],c[1]);return a}async function fq(t,e){let{repo:r,treeish:{protocol:s,request:a},extra:n}=W0(t),c=await Yye(r,e),f=(h,E)=>{switch(h){case\"commit\":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error(\"Invalid commit hash\");return HC.default.stringify({...n,commit:E})}case\"head\":{let C=c.get(E===\"HEAD\"?E:`refs/heads/${E}`);if(typeof C>\"u\")throw new Error(`Unknown head (\"${E}\")`);return HC.default.stringify({...n,commit:C})}case\"tag\":{let C=c.get(`refs/tags/${E}`);if(typeof C>\"u\")throw new Error(`Unknown tag (\"${E}\")`);return HC.default.stringify({...n,commit:C})}case\"semver\":{let C=Fr.validRange(E);if(!C)throw new Error(`Invalid range (\"${E}\")`);let S=new Map([...c.entries()].filter(([I])=>I.startsWith(\"refs/tags/\")).map(([I,R])=>[lq.default.parse(I.slice(10)),R]).filter(I=>I[0]!==null)),P=lq.default.maxSatisfying([...S.keys()],C);if(P===null)throw new Error(`No matching range (\"${E}\")`);return HC.default.stringify({...n,commit:S.get(P)})}case null:{let C;if((C=p(\"commit\",E))!==null||(C=p(\"tag\",E))!==null||(C=p(\"head\",E))!==null)return C;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol (\"${h}\")`)}},p=(h,E)=>{try{return f(h,E)}catch{return null}};return _C(`${r}#${f(s,a)}`)}async function Aq(t,e){return await e.getLimit(\"cloneConcurrency\")(async()=>{let{repo:r,treeish:{protocol:s,request:a}}=W0(t);if(s!==\"commit\")throw new Error(\"Invalid treeish protocol when cloning\");let n=uq(r,{configuration:e}),c=await ce.mktempPromise(),f={cwd:c,env:Wye()};return await cq(\"cloning the repository\",[\"clone\",\"-c\",\"core.autocrlf=false\",n,fe.fromPortablePath(c)],f,{configuration:e,normalizedRepoUrl:n}),await cq(\"switching branch\",[\"checkout\",`${a}`],f,{configuration:e,normalizedRepoUrl:n}),c})}async function Vye(t){let e,r=t;do{if(e=r,await ce.existsPromise(J.join(e,\".git\")))return e;r=J.dirname(e)}while(r!==e);return null}async function Jye(t,{baseRefs:e}){if(e.length===0)throw new nt(\"Can't run this command with zero base refs specified.\");let r=[];for(let f of e){let{code:p}=await qr.execvp(\"git\",[\"merge-base\",f,\"HEAD\"],{cwd:t});p===0&&r.push(f)}if(r.length===0)throw new nt(`No ancestor could be found between any of HEAD and ${e.join(\", \")}`);let{stdout:s}=await qr.execvp(\"git\",[\"merge-base\",\"HEAD\",...r],{cwd:t,strict:!0}),a=s.trim(),{stdout:n}=await qr.execvp(\"git\",[\"show\",\"--quiet\",\"--pretty=format:%s\",a],{cwd:t,strict:!0}),c=n.trim();return{hash:a,title:c}}async function Kye(t,{base:e,project:r}){let s=je.buildIgnorePattern(r.configuration.get(\"changesetIgnorePatterns\")),{stdout:a}=await qr.execvp(\"git\",[\"diff\",\"--name-only\",`${e}`],{cwd:t,strict:!0}),n=a.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>J.resolve(t,fe.toPortablePath(h))),{stdout:c}=await qr.execvp(\"git\",[\"ls-files\",\"--others\",\"--exclude-standard\"],{cwd:t,strict:!0}),f=c.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>J.resolve(t,fe.toPortablePath(h))),p=[...new Set([...n,...f].sort())];return s?p.filter(h=>!J.relative(r.cwd,h).match(s)):p}async function Pct({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let r=[J.resolve(e.cwd,Er.lockfile),J.resolve(e.cwd,e.configuration.get(\"cacheFolder\")),J.resolve(e.cwd,e.configuration.get(\"installStatePath\")),J.resolve(e.cwd,e.configuration.get(\"virtualFolder\"))];await e.configuration.triggerHook(c=>c.populateYarnPaths,e,c=>{c!=null&&r.push(c)});let s=await Vye(e.configuration.projectCwd);if(s==null)throw new nt(\"This command can only be run on Git repositories\");let a=await Jye(s,{baseRefs:typeof t==\"string\"?[t]:e.configuration.get(\"changesetBaseRefs\")}),n=await Kye(s,{base:a.hash,project:e});return new Set(je.mapAndFilter(n,c=>{let f=e.tryWorkspaceByFilePath(c);return f===null?je.mapAndFilter.skip:r.some(p=>c.startsWith(p))?je.mapAndFilter.skip:f}))}async function cq(t,e,r,{configuration:s,normalizedRepoUrl:a}){try{return await qr.execvp(\"git\",e,{...r,strict:!0})}catch(n){if(!(n instanceof qr.ExecError))throw n;let c=n.reportExtra,f=n.stderr.toString();throw new jt(1,`Failed ${t}`,p=>{p.reportError(1,`  ${he.prettyField(s,{label:\"Repository URL\",value:he.tuple(he.Type.URL,a)})}`);for(let h of f.matchAll(/^(.+?): (.*)$/gm)){let[,E,C]=h;E=E.toLowerCase();let S=E===\"error\"?\"Error\":`${bB(E)} Error`;p.reportError(1,`  ${he.prettyField(s,{label:S,value:he.tuple(he.Type.NO_HINT,C)})}`)}c?.(p)})}}var tS=class{supports(e,r){return jC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,s);let n={...r,checksums:a},c=await this.downloadHosted(e,n);if(c!==null)return c;let[f,p,h]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:f,releaseFs:p,prefixPath:G.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(s=>s.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let s=W0(e.reference),a=await Aq(e.reference,r.project.configuration),n=J.resolve(a,s.extra.cwd??vt.dot),c=J.join(n,\"package.tgz\");await In.prepareExternalProject(n,c,{configuration:r.project.configuration,report:r.report,workspace:s.extra.workspace,locator:e});let f=await ce.readFilePromise(c);return await je.releaseAfterUseAsync(async()=>await ps.convertToZip(f,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1}))}};Ge();Ge();var rS=class{supportsDescriptor(e,r){return jC(e.range)}supportsLocator(e,r){return jC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=await fq(e.range,s.project.configuration);return[G.makeLocator(e,a)]}async getSatisfying(e,r,s,a){let n=W0(e.range);return{locators:s.filter(f=>{if(f.identHash!==e.identHash)return!1;let p=W0(f.reference);return!(n.repo!==p.repo||n.treeish.protocol===\"commit\"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var xct={configuration:{changesetBaseRefs:{description:\"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.\",type:\"STRING\",isArray:!0,isNullable:!1,default:[\"master\",\"origin/master\",\"upstream/master\",\"main\",\"origin/main\",\"upstream/main\"]},changesetIgnorePatterns:{description:\"Array of glob patterns; files matching them will be ignored when fetching the changed files\",type:\"STRING\",default:[],isArray:!0},cloneConcurrency:{description:\"Maximal number of concurrent clones\",type:\"NUMBER\",default:2}},fetchers:[tS],resolvers:[rS]};var kct=xct;Yt();var GC=class extends ft{constructor(){super(...arguments);this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Find packages via dependencies/devDependencies instead of using the workspaces field\"});this.noPrivate=ge.Boolean(\"--no-private\",{description:\"Exclude workspaces that have the private field set to true\"});this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also return the cross-dependencies between workspaces\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"workspaces\",\"list\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"list all available workspaces\",details:\"\\n      This command will print the list of all workspaces in the project.\\n\\n      - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\\n\\n      - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let c=this.since?await ka.fetchChangedWorkspaces({ref:this.since,project:s}):s.workspaces,f=new Set(c);if(this.recursive)for(let p of[...c].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)f.add(h);for(let p of f){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let C=new Set,S=new Set;for(let P of Ut.hardDependencies)for(let[I,R]of h.getForScope(P)){let N=s.tryWorkspaceByDescriptor(R);N===null?s.workspacesByIdent.has(I)&&S.add(R):C.add(N)}E={workspaceDependencies:Array.from(C).map(P=>P.relativeCwd),mismatchedWorkspaceDependencies:Array.from(S).map(P=>G.stringifyDescriptor(P))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?G.stringifyIdent(h.name):null,...E})}})).exitCode()}};Ge();Ge();Yt();var qC=class extends ft{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspace\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command within the specified workspace\",details:`\n      This command will run a given sub-command on a single workspace.\n    `,examples:[[\"Add a package to a single workspace\",\"yarn workspace components add -D react\"],[\"Run build script on a single workspace\",\"yarn workspace components run build\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n  - ${p.join(`\n  - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var Qct={configuration:{enableImmutableInstalls:{description:\"If true (the default on CI), prevents the install command from modifying the lockfile\",type:\"BOOLEAN\",default:zye.isCI},defaultSemverRangePrefix:{description:\"The default save prefix: '^', '~' or ''\",type:\"STRING\",values:[\"^\",\"~\",\"\"],default:\"^\"},preferReuse:{description:\"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.\",type:\"BOOLEAN\",default:!1}},commands:[aC,lC,cC,uC,OC,bC,EC,GC,pC,hC,gC,dC,sC,oC,fC,AC,mC,yC,IC,CC,wC,BC,LC,vC,SC,xC,PC,kC,DC,QC,TC,RC,FC,NC,MC,UC,qC]},Tct=Qct;var yq={};Vt(yq,{default:()=>Oct});Ge();Ge();var gq=\"catalog:\";var dq=t=>t.startsWith(gq),Rct=t=>t.range.slice(gq.length)||null,Xye=t=>t===null?\"default catalog\":`catalog \"${t}\"`,Fct=t=>t.scope?`@${t.scope}/${t.name}`:t.name,mq=(t,e,r,s)=>{let a=Rct(e),n;if(a===null)n=t.configuration.get(\"catalog\");else try{let E=t.configuration.get(\"catalogs\");E&&(n=E.get(a))}catch{n=void 0}if(!n||n.size===0)throw new jt(82,`${G.prettyDescriptor(t.configuration,e)}: ${Xye(a)} not found or empty`);let c=Fct(e),f=n.get(c);if(!f)throw new jt(82,`${G.prettyDescriptor(t.configuration,e)}: entry not found in ${Xye(a)}`);let p=t.configuration.normalizeDependency(G.makeDescriptor(e,f));return r.supportsDescriptor(p,s)?r.bindDescriptor(p,t.topLevelWorkspace.anchoredLocator,s):p};var Nct={configuration:{catalog:{description:\"The default catalog of packages\",type:\"MAP\",valueDefinition:{description:\"The catalog of packages\",type:\"STRING\"}},catalogs:{description:\"Named catalogs of packages\",type:\"MAP\",valueDefinition:{description:\"A named catalog\",type:\"MAP\",valueDefinition:{description:\"Package version in the catalog\",type:\"STRING\"}}}},hooks:{beforeWorkspacePacking:(t,e)=>{let r=t.project,s=r.configuration.makeResolver(),a={project:r,resolver:s,report:new ki};for(let n of Ut.allDependencies){let c=e[n];if(c)for(let[f,p]of Object.entries(c)){if(typeof p!=\"string\"||!dq(p))continue;let h=G.parseIdent(f),E=G.makeDescriptor(h,p),C=mq(r,E,s,a),{protocol:S,source:P,params:I,selector:R}=G.parseRange(G.convertToManifestRange(C.range));S===t.project.configuration.get(\"defaultProtocol\")&&(S=null),c[f]=G.makeRange({protocol:S,source:P,params:I,selector:R})}}},reduceDependency:async(t,e,r,s,{resolver:a,resolveOptions:n})=>dq(t.range)?mq(e,t,a,n):t}},Oct=Nct;var Bq={};Vt(Bq,{default:()=>Mct});Ge();var Qt={optional:!0},Eq=[[\"@tailwindcss/aspect-ratio@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@tailwindcss/line-clamp@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0\",{peerDependencies:{postcss:\"^8.0.0\"}}],[\"@samverschueren/stream-to-observable@<0.3.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"any-observable@<0.5.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"@pm2/agent@<1.0.4\",{dependencies:{debug:\"*\"}}],[\"debug@<4.2.0\",{peerDependenciesMeta:{\"supports-color\":Qt}}],[\"got@<11\",{dependencies:{\"@types/responselike\":\"^1.0.0\",\"@types/keyv\":\"^3.1.1\"}}],[\"cacheable-lookup@<4.1.2\",{dependencies:{\"@types/keyv\":\"^3.1.1\"}}],[\"http-link-dataloader@*\",{peerDependencies:{graphql:\"^0.13.1 || ^14.0.0\"}}],[\"typescript-language-server@*\",{dependencies:{\"vscode-jsonrpc\":\"^5.0.1\",\"vscode-languageserver-protocol\":\"^3.15.0\"}}],[\"postcss-syntax@*\",{peerDependenciesMeta:{\"postcss-html\":Qt,\"postcss-jsx\":Qt,\"postcss-less\":Qt,\"postcss-markdown\":Qt,\"postcss-scss\":Qt}}],[\"jss-plugin-rule-value-function@<=10.1.1\",{dependencies:{\"tiny-warning\":\"^1.0.2\"}}],[\"ink-select-input@<4.1.0\",{peerDependencies:{react:\"^16.8.2\"}}],[\"license-webpack-plugin@<2.3.18\",{peerDependenciesMeta:{webpack:Qt}}],[\"snowpack@>=3.3.0\",{dependencies:{\"node-gyp\":\"^7.1.0\"}}],[\"promise-inflight@*\",{peerDependenciesMeta:{bluebird:Qt}}],[\"reactcss@*\",{peerDependencies:{react:\"*\"}}],[\"react-color@<=2.19.0\",{peerDependencies:{react:\"*\"}}],[\"gatsby-plugin-i18n@*\",{dependencies:{ramda:\"^0.24.1\"}}],[\"useragent@^2.0.0\",{dependencies:{request:\"^2.88.0\",yamlparser:\"0.0.x\",semver:\"5.5.x\"}}],[\"@apollographql/apollo-tools@<=0.5.2\",{peerDependencies:{graphql:\"^14.2.1 || ^15.0.0\"}}],[\"material-table@^2.0.0\",{dependencies:{\"@babel/runtime\":\"^7.11.2\"}}],[\"@babel/parser@*\",{dependencies:{\"@babel/types\":\"^7.8.3\"}}],[\"fork-ts-checker-webpack-plugin@<=6.3.4\",{peerDependencies:{eslint:\">= 6\",typescript:\">= 2.7\",webpack:\">= 4\",\"vue-template-compiler\":\"*\"},peerDependenciesMeta:{eslint:Qt,\"vue-template-compiler\":Qt}}],[\"rc-animate@<=3.1.1\",{peerDependencies:{react:\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}],[\"react-bootstrap-table2-paginator@*\",{dependencies:{classnames:\"^2.2.6\"}}],[\"react-draggable@<=4.4.3\",{peerDependencies:{react:\">= 16.3.0\",\"react-dom\":\">= 16.3.0\"}}],[\"apollo-upload-client@<14\",{peerDependencies:{graphql:\"14 - 15\"}}],[\"react-instantsearch-core@<=6.7.0\",{peerDependencies:{algoliasearch:\">= 3.1 < 5\"}}],[\"react-instantsearch-dom@<=6.7.0\",{dependencies:{\"react-fast-compare\":\"^3.0.0\"}}],[\"ws@<7.2.1\",{peerDependencies:{bufferutil:\"^4.0.1\",\"utf-8-validate\":\"^5.0.2\"},peerDependenciesMeta:{bufferutil:Qt,\"utf-8-validate\":Qt}}],[\"react-portal@<4.2.2\",{peerDependencies:{\"react-dom\":\"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0\"}}],[\"react-scripts@<=4.0.1\",{peerDependencies:{react:\"*\"}}],[\"testcafe@<=1.10.1\",{dependencies:{\"@babel/plugin-transform-for-of\":\"^7.12.1\",\"@babel/runtime\":\"^7.12.5\"}}],[\"testcafe-legacy-api@<=4.2.0\",{dependencies:{\"testcafe-hammerhead\":\"^17.0.1\",\"read-file-relative\":\"^1.2.0\"}}],[\"@google-cloud/firestore@<=4.9.3\",{dependencies:{protobufjs:\"^6.8.6\"}}],[\"gatsby-source-apiserver@*\",{dependencies:{\"babel-polyfill\":\"^6.26.0\"}}],[\"@webpack-cli/package-utils@<=1.0.1-alpha.4\",{dependencies:{\"cross-spawn\":\"^7.0.3\"}}],[\"gatsby-remark-prismjs@<3.3.28\",{dependencies:{lodash:\"^4\"}}],[\"gatsby-plugin-favicon@*\",{peerDependencies:{webpack:\"*\"}}],[\"gatsby-plugin-sharp@<=4.6.0-next.3\",{dependencies:{debug:\"^4.3.1\"}}],[\"gatsby-react-router-scroll@<=5.6.0-next.0\",{dependencies:{\"prop-types\":\"^15.7.2\"}}],[\"@rebass/forms@*\",{dependencies:{\"@styled-system/should-forward-prop\":\"^5.0.0\"},peerDependencies:{react:\"^16.8.6\"}}],[\"rebass@*\",{peerDependencies:{react:\"^16.8.6\"}}],[\"@ant-design/react-slick@<=0.28.3\",{peerDependencies:{react:\">=16.0.0\"}}],[\"mqtt@<4.2.7\",{dependencies:{duplexify:\"^4.1.1\"}}],[\"vue-cli-plugin-vuetify@<=2.0.3\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt,\"vuetify-loader\":Qt}}],[\"vue-cli-plugin-vuetify@<=2.0.4\",{dependencies:{\"null-loader\":\"^3.0.0\"}}],[\"vue-cli-plugin-vuetify@>=2.4.3\",{peerDependencies:{vue:\"*\"}}],[\"@vuetify/cli-plugin-utils@<=0.0.4\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt}}],[\"@vue/cli-plugin-typescript@<=5.0.0-alpha.0\",{dependencies:{\"babel-loader\":\"^8.1.0\"}}],[\"@vue/cli-plugin-typescript@<=5.0.0-beta.0\",{dependencies:{\"@babel/core\":\"^7.12.16\"},peerDependencies:{\"vue-template-compiler\":\"^2.0.0\"},peerDependenciesMeta:{\"vue-template-compiler\":Qt}}],[\"cordova-ios@<=6.3.0\",{dependencies:{underscore:\"^1.9.2\"}}],[\"cordova-lib@<=10.0.1\",{dependencies:{underscore:\"^1.9.2\"}}],[\"git-node-fs@*\",{peerDependencies:{\"js-git\":\"^0.7.8\"},peerDependenciesMeta:{\"js-git\":Qt}}],[\"consolidate@<0.16.0\",{peerDependencies:{mustache:\"^3.0.0\"},peerDependenciesMeta:{mustache:Qt}}],[\"consolidate@<=0.16.0\",{peerDependencies:{velocityjs:\"^2.0.1\",tinyliquid:\"^0.2.34\",\"liquid-node\":\"^3.0.1\",jade:\"^1.11.0\",\"then-jade\":\"*\",dust:\"^0.3.0\",\"dustjs-helpers\":\"^1.7.4\",\"dustjs-linkedin\":\"^2.7.5\",swig:\"^1.4.2\",\"swig-templates\":\"^2.0.3\",\"razor-tmpl\":\"^1.3.1\",atpl:\">=0.7.6\",liquor:\"^0.0.5\",twig:\"^1.15.2\",ejs:\"^3.1.5\",eco:\"^1.1.0-rc-3\",jazz:\"^0.0.18\",jqtpl:\"~1.1.0\",hamljs:\"^0.6.2\",hamlet:\"^0.3.3\",whiskers:\"^0.4.0\",\"haml-coffee\":\"^1.14.1\",\"hogan.js\":\"^3.0.2\",templayed:\">=0.2.3\",handlebars:\"^4.7.6\",underscore:\"^1.11.0\",lodash:\"^4.17.20\",pug:\"^3.0.0\",\"then-pug\":\"*\",qejs:\"^3.0.5\",walrus:\"^0.10.1\",mustache:\"^4.0.1\",just:\"^0.1.8\",ect:\"^0.5.9\",mote:\"^0.2.0\",toffee:\"^0.3.6\",dot:\"^1.1.3\",\"bracket-template\":\"^1.1.5\",ractive:\"^1.3.12\",nunjucks:\"^3.2.2\",htmling:\"^0.0.8\",\"babel-core\":\"^6.26.3\",plates:\"~0.4.11\",\"react-dom\":\"^16.13.1\",react:\"^16.13.1\",\"arc-templates\":\"^0.5.3\",vash:\"^0.13.0\",slm:\"^2.0.0\",marko:\"^3.14.4\",teacup:\"^2.0.0\",\"coffee-script\":\"^1.12.7\",squirrelly:\"^5.1.0\",twing:\"^5.0.2\"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,\"liquid-node\":Qt,jade:Qt,\"then-jade\":Qt,dust:Qt,\"dustjs-helpers\":Qt,\"dustjs-linkedin\":Qt,swig:Qt,\"swig-templates\":Qt,\"razor-tmpl\":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,\"haml-coffee\":Qt,\"hogan.js\":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,\"then-pug\":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,\"bracket-template\":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,\"babel-core\":Qt,plates:Qt,\"react-dom\":Qt,react:Qt,\"arc-templates\":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,\"coffee-script\":Qt,squirrelly:Qt,twing:Qt}}],[\"vue-loader@<=16.3.3\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",webpack:\"^4.1.0 || ^5.0.0-0\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt}}],[\"vue-loader@^16.7.0\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",vue:\"^3.2.13\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt,vue:Qt}}],[\"scss-parser@<=1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"query-ast@<1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"redux-thunk@<=2.3.0\",{peerDependencies:{redux:\"^4.0.0\"}}],[\"skypack@<=0.3.2\",{dependencies:{tar:\"^6.1.0\"}}],[\"@npmcli/metavuln-calculator@<2.0.0\",{dependencies:{\"json-parse-even-better-errors\":\"^2.3.1\"}}],[\"bin-links@<2.3.0\",{dependencies:{\"mkdirp-infer-owner\":\"^1.0.2\"}}],[\"rollup-plugin-polyfill-node@<=0.8.0\",{peerDependencies:{rollup:\"^1.20.0 || ^2.0.0\"}}],[\"snowpack@<3.8.6\",{dependencies:{\"magic-string\":\"^0.25.7\"}}],[\"elm-webpack-loader@*\",{dependencies:{temp:\"^0.9.4\"}}],[\"winston-transport@<=4.4.0\",{dependencies:{logform:\"^2.2.0\"}}],[\"jest-vue-preprocessor@*\",{dependencies:{\"@babel/core\":\"7.8.7\",\"@babel/template\":\"7.8.6\"},peerDependencies:{pug:\"^2.0.4\"},peerDependenciesMeta:{pug:Qt}}],[\"redux-persist@*\",{peerDependencies:{react:\">=16\"},peerDependenciesMeta:{react:Qt}}],[\"sodium@>=3\",{dependencies:{\"node-gyp\":\"^3.8.0\"}}],[\"babel-plugin-graphql-tag@<=3.1.0\",{peerDependencies:{graphql:\"^14.0.0 || ^15.0.0\"}}],[\"@playwright/test@<=1.14.1\",{dependencies:{\"jest-matcher-utils\":\"^26.4.2\"}}],...[\"babel-plugin-remove-graphql-queries@<3.14.0-next.1\",\"babel-preset-gatsby-package@<1.14.0-next.1\",\"create-gatsby@<1.14.0-next.1\",\"gatsby-admin@<0.24.0-next.1\",\"gatsby-cli@<3.14.0-next.1\",\"gatsby-core-utils@<2.14.0-next.1\",\"gatsby-design-tokens@<3.14.0-next.1\",\"gatsby-legacy-polyfills@<1.14.0-next.1\",\"gatsby-plugin-benchmark-reporting@<1.14.0-next.1\",\"gatsby-plugin-graphql-config@<0.23.0-next.1\",\"gatsby-plugin-image@<1.14.0-next.1\",\"gatsby-plugin-mdx@<2.14.0-next.1\",\"gatsby-plugin-netlify-cms@<5.14.0-next.1\",\"gatsby-plugin-no-sourcemaps@<3.14.0-next.1\",\"gatsby-plugin-page-creator@<3.14.0-next.1\",\"gatsby-plugin-preact@<5.14.0-next.1\",\"gatsby-plugin-preload-fonts@<2.14.0-next.1\",\"gatsby-plugin-schema-snapshot@<2.14.0-next.1\",\"gatsby-plugin-styletron@<6.14.0-next.1\",\"gatsby-plugin-subfont@<3.14.0-next.1\",\"gatsby-plugin-utils@<1.14.0-next.1\",\"gatsby-recipes@<0.25.0-next.1\",\"gatsby-source-shopify@<5.6.0-next.1\",\"gatsby-source-wikipedia@<3.14.0-next.1\",\"gatsby-transformer-screenshot@<3.14.0-next.1\",\"gatsby-worker@<0.5.0-next.1\"].map(t=>[t,{dependencies:{\"@babel/runtime\":\"^7.14.8\"}}]),[\"gatsby-core-utils@<2.14.0-next.1\",{dependencies:{got:\"8.3.2\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.1.0-next.0\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.2.0-next.1\",{peerDependencies:{webpack:\"*\"}}],[\"babel-plugin-remove-graphql-queries@<=3.14.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.8.0-next.1\"}}],[\"gatsby-plugin-netlify@3.13.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"clipanion-v3-codemod@<=0.2.0\",{peerDependencies:{jscodeshift:\"^0.11.0\"}}],[\"react-live@*\",{peerDependencies:{\"react-dom\":\"*\",react:\"*\"}}],[\"webpack@<4.44.1\",{peerDependenciesMeta:{\"webpack-cli\":Qt,\"webpack-command\":Qt}}],[\"webpack@<5.0.0-beta.23\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"webpack-dev-server@<3.10.2\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"@docusaurus/responsive-loader@<1.5.0\",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],[\"eslint-module-utils@*\",{peerDependenciesMeta:{\"eslint-import-resolver-node\":Qt,\"eslint-import-resolver-typescript\":Qt,\"eslint-import-resolver-webpack\":Qt,\"@typescript-eslint/parser\":Qt}}],[\"eslint-plugin-import@*\",{peerDependenciesMeta:{\"@typescript-eslint/parser\":Qt}}],[\"critters-webpack-plugin@<3.0.2\",{peerDependenciesMeta:{\"html-webpack-plugin\":Qt}}],[\"terser@<=5.10.0\",{dependencies:{acorn:\"^8.5.0\"}}],[\"babel-preset-react-app@10.0.x <10.0.2\",{dependencies:{\"@babel/plugin-proposal-private-property-in-object\":\"^7.16.7\"}}],[\"eslint-config-react-app@*\",{peerDependenciesMeta:{typescript:Qt}}],[\"@vue/eslint-config-typescript@<11.0.0\",{peerDependenciesMeta:{typescript:Qt}}],[\"unplugin-vue2-script-setup@<0.9.1\",{peerDependencies:{\"@vue/composition-api\":\"^1.4.3\",\"@vue/runtime-dom\":\"^3.2.26\"}}],[\"@cypress/snapshot@*\",{dependencies:{debug:\"^3.2.7\"}}],[\"auto-relay@<=0.14.0\",{peerDependencies:{\"reflect-metadata\":\"^0.1.13\"}}],[\"vue-template-babel-compiler@<1.2.0\",{peerDependencies:{\"vue-template-compiler\":\"^2.6.0\"}}],[\"@parcel/transformer-image@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"@parcel/transformer-js@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"parcel@*\",{peerDependenciesMeta:{\"@parcel/core\":Qt}}],[\"react-scripts@*\",{peerDependencies:{eslint:\"*\"}}],[\"focus-trap-react@^8.0.0\",{dependencies:{tabbable:\"^5.3.2\"}}],[\"react-rnd@<10.3.7\",{peerDependencies:{react:\">=16.3.0\",\"react-dom\":\">=16.3.0\"}}],[\"connect-mongo@<5.0.0\",{peerDependencies:{\"express-session\":\"^1.17.1\"}}],[\"vue-i18n@<9\",{peerDependencies:{vue:\"^2\"}}],[\"vue-router@<4\",{peerDependencies:{vue:\"^2\"}}],[\"unified@<10\",{dependencies:{\"@types/unist\":\"^2.0.0\"}}],[\"react-github-btn@<=1.3.0\",{peerDependencies:{react:\">=16.3.0\"}}],[\"react-dev-utils@*\",{peerDependencies:{typescript:\">=2.7\",webpack:\">=4\"},peerDependenciesMeta:{typescript:Qt}}],[\"@asyncapi/react-component@<=1.0.0-next.39\",{peerDependencies:{react:\">=16.8.0\",\"react-dom\":\">=16.8.0\"}}],[\"xo@*\",{peerDependencies:{webpack:\">=1.11.0\"},peerDependenciesMeta:{webpack:Qt}}],[\"babel-plugin-remove-graphql-queries@<=4.20.0-next.0\",{dependencies:{\"@babel/types\":\"^7.15.4\"}}],[\"gatsby-plugin-page-creator@<=4.20.0-next.1\",{dependencies:{\"fs-extra\":\"^10.1.0\"}}],[\"gatsby-plugin-utils@<=3.14.0-next.1\",{dependencies:{fastq:\"^1.13.0\"},peerDependencies:{graphql:\"^15.0.0\"}}],[\"gatsby-plugin-mdx@<3.1.0-next.1\",{dependencies:{mkdirp:\"^1.0.4\"}}],[\"gatsby-plugin-mdx@^2\",{peerDependencies:{gatsby:\"^3.0.0-next\"}}],[\"fdir@<=5.2.0\",{peerDependencies:{picomatch:\"2.x\"},peerDependenciesMeta:{picomatch:Qt}}],[\"babel-plugin-transform-typescript-metadata@<=0.3.2\",{peerDependencies:{\"@babel/core\":\"^7\",\"@babel/traverse\":\"^7\"},peerDependenciesMeta:{\"@babel/traverse\":Qt}}],[\"graphql-compose@>=9.0.10\",{peerDependencies:{graphql:\"^14.2.0 || ^15.0.0 || ^16.0.0\"}}],[\"vite-plugin-vuetify@<=1.0.2\",{peerDependencies:{vue:\"^3.0.0\"}}],[\"webpack-plugin-vuetify@<=2.0.1\",{peerDependencies:{vue:\"^3.2.6\"}}],[\"eslint-import-resolver-vite@<2.0.1\",{dependencies:{debug:\"^4.3.4\",resolve:\"^1.22.8\"}}],[\"notistack@^3.0.0\",{dependencies:{csstype:\"^3.0.10\"}}],[\"@fastify/type-provider-typebox@^5.0.0\",{peerDependencies:{fastify:\"^5.0.0\"}}],[\"@fastify/type-provider-typebox@^4.0.0\",{peerDependencies:{fastify:\"^4.0.0\"}}]];var Iq;function Zye(){return typeof Iq>\"u\"&&(Iq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==\",\"base64\")).toString()),Iq}var Cq;function $ye(){return typeof Cq>\"u\"&&(Cq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPcKdLMsBLShd+zuEbTrqpwuh+DLmracZcjPC5Sdf5odDAhKpFuOsQS67RT+1VgWWygSv3YwxDnylc04/PYuaMeIzhBkLrvs7e/OUzRTF56MmfY6rI63QtEjEQzq637zQqJ39nNhu3NmoRRhW/086bHGBUtx0PE0j3aEGvkdh9WJC8y8j8mqqke9/dQ5la+Q3ba4RlhvTbnfQhPDDab3tUifkjKuOsp13mXEmO00Mu88F/M67R7LXfoFDFLNtgCSWjWX+3Jn1371pJTK9xPBiMJafvDjtFyAzu8rxeQ0TKMQXNPs5xxiBOd+BRJP8KP88XPtJIbZKh/cdW8KvBUkpqKpGoiIaA32c3/JnQr4efXt85mXvidOvn/eU3Pase1typLYBalJ14mCso9h79nuMOuCa/kZAOkJHmTjP5RM2WNoPasZUAnT1TAE/NH25hUxcQv6hQWR/m1PKk4ooXMcM4SR1iYU3fUohvqk4RY2hbmTVVIXv6TvqO+0doOjgeVFAcom+RlwJQmOVH7pr1Q9LoJT6n1DeQEB+NHygsATbIwTcOKZlJsY8G4+suX1uQLjUWwLjjs0mvSvZcLTpIGAekeR7GCgl8eo3ndAqEe2XCav4huliHjdbIPBsGJuPX7lrO9HX1UbXRH5opOe1x6JsOSgHZR+EaxuXVhpLLxm6jk1LJtZfHSc6BKPun3CpYYVMJGwEUyk8MTGG0XL5MfEwaXpnc9TKnBmlGn6nHiGREc3ysn47XIBDzA+YvFdjZzVIEDcKGpS6PbUJehFRjEne8D0lVU1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=\",\"base64\")).toString()),Cq}var wq;function eEe(){return typeof wq>\"u\"&&(wq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),wq}var tEe=new Map([[G.makeIdent(null,\"fsevents\").identHash,Zye],[G.makeIdent(null,\"resolve\").identHash,$ye],[G.makeIdent(null,\"typescript\").identHash,eEe]]),Lct={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,s]of Eq)e(G.parseDescriptor(r,!0),s)},getBuiltinPatch:async(t,e)=>{let r=\"compat/\";if(!e.startsWith(r))return;let s=G.parseIdent(e.slice(r.length)),a=tEe.get(s.identHash)?.();return typeof a<\"u\"?a:null},reduceDependency:async(t,e,r,s)=>typeof tEe.get(t.identHash)>\"u\"?t:G.makeDescriptor(t,G.makeRange({protocol:\"patch:\",source:G.stringifyDescriptor(t),selector:`optional!builtin<compat/${G.stringifyIdent(t)}>`,params:null}))}},Mct=Lct;var _q={};Vt(_q,{ConstraintsCheckCommand:()=>ZC,ConstraintsQueryCommand:()=>zC,ConstraintsSourceCommand:()=>XC,default:()=>nut});Ge();Ge();iS();var YC=class{constructor(e){this.project=e}createEnvironment(){let e=new WC([\"cwd\",\"ident\"]),r=new WC([\"workspace\",\"type\",\"ident\"]),s=new WC([\"ident\"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,c=new Map;for(let f of this.project.storedPackages.values()){let p=Array.from(f.peerDependencies.values(),h=>[G.stringifyIdent(h),h.range]);n.set(f.locatorHash,{workspace:null,ident:G.stringifyIdent(f),version:f.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional===!0))})}for(let f of this.project.storedPackages.values()){let p=n.get(f.locatorHash);p.dependencies=new Map(Array.from(f.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let C=n.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");return[G.stringifyIdent(h),C]})),p.dependencies.delete(p.ident)}for(let f of this.project.workspaces){let p=G.stringifyIdent(f.anchoredLocator),h=f.manifest.exportTo({}),E=n.get(f.anchoredLocator.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let C=(R,N,{caller:U=Ui.getCaller()}={})=>{let W=nS(R),ee=je.getMapWithDefault(a.manifestUpdates,f.cwd),ie=je.getMapWithDefault(ee,W),ue=je.getSetWithDefault(ie,N);U!==null&&ue.add(U)},S=R=>C(R,void 0,{caller:Ui.getCaller()}),P=R=>{je.getArrayWithDefault(a.reportedErrors,f.cwd).push(R)},I=e.insert({cwd:f.relativeCwd,ident:p,manifest:h,pkg:E,set:C,unset:S,error:P});c.set(f,I);for(let R of Ut.allDependencies)for(let N of f.manifest[R].values()){let U=G.stringifyIdent(N),W=()=>{C([R,U],void 0,{caller:Ui.getCaller()})},ee=ue=>{C([R,U],ue,{caller:Ui.getCaller()})},ie=null;if(R!==\"peerDependencies\"&&(R!==\"dependencies\"||!f.manifest.devDependencies.has(N.identHash))){let ue=f.anchoredPackage.dependencies.get(N.identHash);if(ue){if(typeof ue>\"u\")throw new Error(\"Assertion failed: The dependency should have been registered\");let le=this.project.storedResolutions.get(ue.descriptorHash);if(typeof le>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let me=n.get(le);if(typeof me>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");ie=me}}r.insert({workspace:I,ident:U,range:N.range,type:R,resolution:ie,update:ee,delete:W,error:P})}}for(let f of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(f);if(!p)continue;let h=c.get(p);if(typeof h>\"u\")throw new Error(\"Assertion failed: The workspace should have been registered\");let E=n.get(f.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");E.workspace=h}return{workspaces:e,dependencies:r,packages:s,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},s=await this.project.loadUserConfig();return s?.constraints?(await s.constraints(r),e.result):null}};Ge();Ge();Yt();var zC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.query=ge.String()}static{this.paths=[[\"constraints\",\"query\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"query the constraints fact database\",details:`\n      This command will output all matches to the given prolog query.\n    `,examples:[[\"List all dependencies throughout the workspace\",\"yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(\".\")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((P,[I])=>Math.max(P,I.length),0);for(let P=0;P<C;P++){let[I,R]=E[P];p.reportInfo(null,`${tut(P,C)}${I.padEnd(S,\" \")} = ${eut(R)}`)}p.reportJson(h)}})).exitCode()}};function eut(t){return typeof t!=\"string\"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function tut(t,e){let r=t===0,s=t===e-1;return r&&s?\"\":r?\"\\u250C \":s?\"\\u2514 \":\"\\u2502 \"}Ge();Yt();var XC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also print the fact database automatically compiled from the workspace manifests\"})}static{this.paths=[[\"constraints\",\"source\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"print the source code for the constraints\",details:\"\\n      This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\\n    \",examples:[[\"Prints the source code\",\"yarn constraints source\"],[\"Print the source code and the fact database\",\"yarn constraints source -v\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ge();Ge();Yt();iS();var ZC=class extends ft{constructor(){super(...arguments);this.fix=ge.Boolean(\"--fix\",!1,{description:\"Attempt to automatically fix unambiguous issues, following a multi-pass process\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"constraints\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"check that the project constraints are met\",details:`\n      This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.\n\n      If the \\`--fix\\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.\n\n      For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.\n    `,examples:[[\"Check that all constraints are satisfied\",\"yarn constraints\"],[\"Autofix all unmet constraints\",\"yarn constraints --fix\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new YC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(lS(),aS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=iF(s,E,{fix:this.fix}),P=[];for(let[I,R]of C){let N=I.manifest.indent;I.manifest=new Ut,I.manifest.indent=N,I.manifest.load(R),P.push(I.persistManifest())}if(await Promise.all(P),!(C.size>0&&h>1)){c=rEe(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let R of I)R.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`:`Errors prefixed by '\\u2699' can be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};iS();var rut={configuration:{enableConstraintsChecks:{description:\"If true, constraints will run during installs\",type:\"BOOLEAN\",default:!1},constraintsPath:{description:\"The path of the constraints file.\",type:\"ABSOLUTE_PATH\",default:\"./constraints.pro\"}},commands:[zC,XC,ZC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get(\"enableConstraintsChecks\"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new YC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(lS(),aS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=iF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,\"yarn constraints\",he.Type.CODE)} for more details`)}}},nut=rut;var Hq={};Vt(Hq,{CreateCommand:()=>$C,DlxCommand:()=>ew,default:()=>sut});Ge();Yt();var $C=class extends ft{constructor(){super(...arguments);this.pkg=ge.String(\"-p,--package\",{description:\"The package to run the provided command from\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"create\"]]}async execute(){let r=[];this.pkg&&r.push(\"--package\",this.pkg),this.quiet&&r.push(\"--quiet\");let s=this.command.replace(/^(@[^@/]+)(@|$)/,\"$1/create$2\"),a=G.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),c=G.stringifyIdent(n);return a.range!==\"unknown\"&&(c+=`@${a.range}`),this.cli.run([\"dlx\",...r,c,...this.args])}};Ge();Ge();Dt();Yt();var ew=class extends ft{constructor(){super(...arguments);this.packages=ge.Array(\"-p,--package\",{description:\"The package(s) to install before running the command\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"dlx\"]]}static{this.usage=ot.Usage({description:\"run a package in a temporary environment\",details:\"\\n      This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\\n\\n      By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\\n\\n      Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\\n    \",examples:[[\"Use create-vite to scaffold a new Vite project\",\"yarn dlx create-vite\"],[\"Install multiple packages for a single command\",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e \"console.log('hello!')\"`]]})}async execute(){return ze.telemetry=null,await ce.mktempPromise(async r=>{let s=J.join(r,`dlx-${process.pid}`);await ce.mkdirPromise(s),await ce.writeFilePromise(J.join(s,\"package.json\"),`{}\n`),await ce.writeFilePromise(J.join(s,\"yarn.lock\"),\"\");let a=J.join(s,\".yarnrc.yml\"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get(\"enableGlobalCache\"),enableTelemetry:!1,logFilters:[{code:Yf(68),level:he.LogLevel.Discard}]},p=n!==null?J.join(n,\".yarnrc.yml\"):null;p!==null&&ce.existsSync(p)?(await ce.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let ee=typeof W==\"string\"?W:W.path,ie=fe.isAbsolute(ee)?ee:fe.resolve(fe.fromPortablePath(n),ee);return typeof W==\"string\"?ie:{path:ie,spec:W.spec}})),U})):await ce.writeJsonPromise(a,f);let h=this.packages??[this.command],E=G.parseDescriptor(this.command).name,C=await this.cli.run([\"add\",\"--fixed\",\"--\",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`\n`);let S=await ze.find(s,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,s);if(I===null)throw new ar(P.cwd,s);await P.restoreInstallState();let R=await In.getWorkspaceAccessibleBinaries(I);return R.has(E)===!1&&R.size===1&&typeof this.packages>\"u\"&&(E=Array.from(R)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var iut={commands:[$C,ew]},sut=iut;var qq={};Vt(qq,{ExecFetcher:()=>uS,ExecResolver:()=>fS,default:()=>lut,execUtils:()=>lF});Ge();Ge();Dt();var cA=\"exec:\";var lF={};Vt(lF,{loadGeneratorFile:()=>cS,makeLocator:()=>Gq,makeSpec:()=>PEe,parseSpec:()=>jq});Ge();Dt();function jq(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?G.parseLocator(e.locator):null,path:s}}function PEe({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function Gq(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return G.makeLocator(t,PEe({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function cS(t,e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.join(c.prefixPath,a);return await f.readFilePromise(p,\"utf8\")}var uS=class{supports(e,r){return!!e.reference.startsWith(cA)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:cA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await cS(e.reference,cA,r);return ce.mktempPromise(async a=>{let n=J.join(a,\"generator.js\");return await ce.writeFilePromise(n,s),ce.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!ce.existsSync(J.join(c,\"build\")))throw new Error(\"The script should have generated a build directory\");return await ps.makeArchiveFromDirectory(J.join(c,\"build\"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get(\"compressionLevel\")})})})}async generatePackage(e,r,s,a){return await ce.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=J.join(e,\"runtime.js\");return await ce.mktempPromise(async p=>{let h=J.join(p,\"buildfile.log\"),E=J.join(e,\"generator\"),C=J.join(e,\"build\");await ce.mkdirPromise(E),await ce.mkdirPromise(C);let S={tempDir:fe.fromPortablePath(E),buildDir:fe.fromPortablePath(C),locator:G.stringifyLocator(r)};await ce.writeFilePromise(f,`\n          // Expose 'Module' as a global variable\n          Object.defineProperty(global, 'Module', {\n            get: () => require('module'),\n            configurable: true,\n            enumerable: false,\n          });\n\n          // Expose non-hidden built-in modules as global variables\n          for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {\n            Object.defineProperty(global, name, {\n              get: () => require(name),\n              configurable: true,\n              enumerable: false,\n            });\n          }\n\n          // Expose the 'execEnv' global variable\n          Object.defineProperty(global, 'execEnv', {\n            value: {\n              ...${JSON.stringify(S)},\n            },\n            enumerable: true,\n          });\n        `);let P=c.NODE_OPTIONS||\"\",I=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g;P=P.replace(I,\" \").trim(),c.NODE_OPTIONS=P;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})\n`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await qr.pipevp(process.execPath,[\"--require\",fe.fromPortablePath(f),fe.fromPortablePath(s),G.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:R,stderr:N});if(U!==0)throw ce.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ge();Ge();var out=2,fS=class{supportsDescriptor(e,r){return!!e.range.startsWith(cA)}supportsLocator(e,r){return!!e.reference.startsWith(cA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=jq(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await cS(G.makeRange({protocol:cA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),cA,s.fetchOptions),f=Nn.makeHash(`${out}`,c).slice(0,6);return[Gq(e,{parentLocator:n,path:a,generatorHash:f,protocol:cA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var aut={fetchers:[uS],resolvers:[fS]},lut=aut;var Yq={};Vt(Yq,{FileFetcher:()=>gS,FileResolver:()=>dS,TarballFileFetcher:()=>mS,TarballFileResolver:()=>yS,default:()=>fut,fileUtils:()=>xm});Ge();Dt();var tw=/^(?:[a-zA-Z]:[\\\\/]|\\.{0,2}\\/)/,AS=/^[^?]*\\.(?:tar\\.gz|tgz)(?:::.*)?$/,es=\"file:\";var xm={};Vt(xm,{fetchArchiveFromLocator:()=>hS,makeArchiveFromLocator:()=>cF,makeBufferFromLocator:()=>Wq,makeLocator:()=>rw,makeSpec:()=>xEe,parseSpec:()=>pS});Ge();Dt();function pS(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?G.parseLocator(e.locator):null,path:s}}function xEe({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function rw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return G.makeLocator(t,xEe({parentLocator:e,path:r,hash:s,protocol:a}))}async function hS(t,e){let{parentLocator:r,path:s}=G.parseFileStyleRange(t.reference,{protocol:es}),a=J.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=J.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function cF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),c=J.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=J.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await ps.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get(\"compressionLevel\"),inMemory:s}),f.releaseFs)}async function Wq(t,{protocol:e,fetchOptions:r}){return(await cF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var gS=class{supports(e,r){return!!e.reference.startsWith(es)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:es});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return cF(e,{protocol:es,fetchOptions:r})}};Ge();Ge();var cut=2,dS=class{supportsDescriptor(e,r){return e.range.match(tw)?!0:!!e.range.startsWith(es)}supportsLocator(e,r){return!!e.reference.startsWith(es)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=G.makeDescriptor(e,`${es}${e.range}`)),G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=pS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await Wq(G.makeLocator(e,G.makeRange({protocol:es,source:a,selector:a,params:{locator:G.stringifyLocator(n)}})),{protocol:es,fetchOptions:s.fetchOptions}),f=Nn.makeHash(`${cut}`,c).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:f,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ge();var mS=class{supports(e,r){return AS.test(e.reference)?!!e.reference.startsWith(es):!1}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromDisk(e,r){let s=await hS(e,r);return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();Ge();Ge();var yS=class{supportsDescriptor(e,r){return AS.test(e.range)?!!(e.range.startsWith(es)||tw.test(e.range)):!1}supportsLocator(e,r){return AS.test(e.reference)?!!e.reference.startsWith(es):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=G.makeDescriptor(e,`${es}${e.range}`)),G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=pS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=rw(e,{parentLocator:n,path:a,hash:\"\",protocol:es}),f=await hS(c,s.fetchOptions),p=Nn.makeHash(f).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:p,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var uut={fetchers:[mS,gS],resolvers:[yS,dS]},fut=uut;var Kq={};Vt(Kq,{GithubFetcher:()=>ES,default:()=>put,githubUtils:()=>uF});Ge();Dt();var uF={};Vt(uF,{invalidGithubUrlMessage:()=>TEe,isGithubUrl:()=>Vq,parseGithubUrl:()=>Jq});var kEe=ut(Ie(\"querystring\")),QEe=[/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+)\\/tarball\\/([^/#]+)(?:#(.*))?$/,/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+?)(?:\\.git)?(?:#(.*))?$/];function Vq(t){return t?QEe.some(e=>!!t.match(e)):!1}function Jq(t){let e;for(let f of QEe)if(e=t.match(f),e)break;if(!e)throw new Error(TEe(t));let[,r,s,a,n=\"master\"]=e,{commit:c}=kEe.default.parse(n);return n=c||n.replace(/[^:]*:/,\"\"),{auth:r,username:s,reponame:a,treeish:n}}function TEe(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var ES=class{supports(e,r){return!!Vq(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await nn.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await ce.mktempPromise(async a=>{let n=new Sn(a);await ps.extractArchiveTo(s,n,{stripComponents:1});let c=ka.splitRepoUrl(e.reference),f=J.join(a,\"package.tgz\");await In.prepareExternalProject(a,f,{configuration:r.project.configuration,report:r.report,workspace:c.extra.workspace,locator:e});let p=await ce.readFilePromise(f);return await ps.convertToZip(p,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:s,username:a,reponame:n,treeish:c}=Jq(e.reference);return`https://${s?`${s}@`:\"\"}github.com/${a}/${n}/archive/${c}.tar.gz`}};var Aut={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let s=new ES;if(!s.supports(e,r))return null;try{return await s.fetch(e,r)}catch{return null}}}},put=Aut;var zq={};Vt(zq,{TarballHttpFetcher:()=>CS,TarballHttpResolver:()=>wS,default:()=>gut});Ge();function IS(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!==\"http:\"&&e.protocol!==\"https:\"||!e.pathname.match(/(\\.tar\\.gz|\\.tgz|\\/[^.]+)$/))}var CS=class{supports(e,r){return IS(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await nn.get(e.reference,{configuration:r.project.configuration});return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();Ge();var wS=class{supportsDescriptor(e,r){return IS(e.range)}supportsLocator(e,r){return IS(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[G.convertDescriptorToLocator(e)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var hut={fetchers:[CS],resolvers:[wS]},gut=hut;var Xq={};Vt(Xq,{InitCommand:()=>z0,InitInitializerCommand:()=>nw,default:()=>mut});Yt();Ge();Ge();Dt();Yt();var z0=class extends ft{constructor(){super(...arguments);this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Initialize a private package\"});this.workspace=ge.Boolean(\"-w,--workspace\",!1,{description:\"Initialize a workspace root with a `packages/` directory\"});this.install=ge.String(\"-i,--install\",!1,{tolerateBoolean:!0,description:\"Initialize a package with a specific bundle that will be locked in the project\"});this.name=ge.String(\"-n,--name\",{description:\"Initialize a package with the given name\"});this.usev2=ge.Boolean(\"-2\",!1,{hidden:!0});this.yes=ge.Boolean(\"-y,--yes\",{hidden:!0})}static{this.paths=[[\"init\"]]}static{this.usage=ot.Usage({description:\"create a new package\",details:\"\\n      This command will setup a new package in your local directory.\\n\\n      If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\\n\\n      If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\\n\\n      If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\\n\\n      The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\\n    \",examples:[[\"Create a new package in the local directory\",\"yarn init\"],[\"Create a new private package in the local directory\",\"yarn init -p\"],[\"Create a new package and store the Yarn release inside\",\"yarn init -i=latest\"],[\"Create a new private package and defines it as a workspace root\",\"yarn init -w\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.install==\"string\"?this.install:this.usev2||this.install===!0?\"latest\":null;return s!==null?await this.executeProxy(r,s):await this.executeRegular(r)}async executeProxy(r,s){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new nt(\"Cannot use the --install flag from within a project subdirectory\");ce.existsSync(this.context.cwd)||await ce.mkdirPromise(this.context.cwd,{recursive:!0});let a=J.join(this.context.cwd,Er.lockfile);ce.existsSync(a)||await ce.writeFilePromise(a,\"\");let n=await this.cli.run([\"set\",\"version\",s],{quiet:!0});if(n!==0)return n;let c=[];return this.private&&c.push(\"-p\"),this.workspace&&c.push(\"-w\"),this.name&&c.push(`-n=${this.name}`),this.yes&&c.push(\"-y\"),await ce.mktempPromise(async f=>{let{code:p}=await qr.pipevp(\"yarn\",[\"init\",...c],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await In.makeScriptEnv({binFolder:f})});return p})}async initialize(){}async executeRegular(r){let s=null;try{s=(await Tt.find(r,this.context.cwd)).project}catch{s=null}ce.existsSync(this.context.cwd)||await ce.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ut.tryFind(this.context.cwd),n=a??new Ut,c=Object.fromEntries(r.get(\"initFields\").entries());n.load(c),n.name=n.name??G.makeIdent(r.get(\"initScope\"),this.name??J.basename(this.context.cwd)),n.packageManager=fn&&je.isTaggedYarnVersion(fn)?`yarn@${fn}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await ce.mkdirPromise(J.join(this.context.cwd,\"packages\"),{recursive:!0}),n.workspaceDefinitions=[{pattern:\"packages/*\"}]);let f={};n.exportTo(f);let p=J.join(this.context.cwd,Ut.fileName);await ce.changeFilePromise(p,`${JSON.stringify(f,null,2)}\n`,{automaticNewlines:!0});let h=[p],E=J.join(this.context.cwd,\"README.md\");if(ce.existsSync(E)||(await ce.writeFilePromise(E,`# ${G.stringifyIdent(n.name)}\n`),h.push(E)),!s||s.cwd===this.context.cwd){let C=J.join(this.context.cwd,Er.lockfile);ce.existsSync(C)||(await ce.writeFilePromise(C,\"\"),h.push(C));let P=[\".yarn/*\",\"!.yarn/patches\",\"!.yarn/plugins\",\"!.yarn/releases\",\"!.yarn/sdks\",\"!.yarn/versions\",\"\",\"# Whether you use PnP or not, the node_modules folder is often used to store\",\"# build artifacts that should be gitignored\",\"node_modules\",\"\",\"# Swap the comments on the following lines if you wish to use zero-installs\",\"# In that case, don't forget to run `yarn config set enableGlobalCache false`!\",\"# Documentation here: https://yarnpkg.com/features/caching#zero-installs\",\"\",\"#!.yarn/cache\",\".pnp.*\"].map(ue=>`${ue}\n`).join(\"\"),I=J.join(this.context.cwd,\".gitignore\");ce.existsSync(I)||(await ce.writeFilePromise(I,P),h.push(I));let N=[\"/.yarn/**            linguist-vendored\",\"/.yarn/releases/*    binary\",\"/.yarn/plugins/**/*  binary\",\"/.pnp.*              binary linguist-generated\"].map(ue=>`${ue}\n`).join(\"\"),U=J.join(this.context.cwd,\".gitattributes\");ce.existsSync(U)||(await ce.writeFilePromise(U,N),h.push(U));let W={\"*\":{charset:\"utf-8\",endOfLine:\"lf\",indentSize:2,indentStyle:\"space\",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get(\"initEditorConfig\"));let ee=`root = true\n`;for(let[ue,le]of Object.entries(W)){ee+=`\n[${ue}]\n`;for(let[me,pe]of Object.entries(le)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);ee+=`${Be} = ${pe}\n`}}let ie=J.join(this.context.cwd,\".editorconfig\");ce.existsSync(ie)||(await ce.writeFilePromise(ie,ee),h.push(ie)),await this.cli.run([\"install\"],{quiet:!0}),await this.initialize(),ce.existsSync(J.join(this.context.cwd,\".git\"))||(await qr.execvp(\"git\",[\"init\"],{cwd:this.context.cwd}),await qr.execvp(\"git\",[\"add\",\"--\",...h],{cwd:this.context.cwd}),await qr.execvp(\"git\",[\"commit\",\"--allow-empty\",\"-m\",\"First commit\"],{cwd:this.context.cwd}))}}};var nw=class extends z0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[[\"init\"]]}async initialize(){this.context.stdout.write(`\n`),await this.cli.run([\"dlx\",this.initializer,...this.argv],{quiet:!0})}};var dut={configuration:{initScope:{description:\"Scope used when creating packages via the init command\",type:\"STRING\",default:null},initFields:{description:\"Additional fields to set when creating packages via the init command\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}},initEditorConfig:{description:\"Extra rules to define in the generator editorconfig\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}}},commands:[z0,nw]},mut=dut;var JW={};Vt(JW,{SearchCommand:()=>Iw,UpgradeInteractiveCommand:()=>Cw,default:()=>Dgt});Ge();var FEe=ut(Ie(\"os\"));function iw({stdout:t}){if(FEe.default.endianness()===\"BE\")throw new Error(\"Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures\");if(!t.isTTY)throw new Error(\"Interactive commands can only be used inside a TTY environment\")}Yt();var YIe=ut(g9()),d9={appId:\"OFCNCOG2CU\",apiKey:\"6fe4476ee5a1832882e326b506d14126\",indexName:\"npm-search\"},hAt=(0,YIe.default)(d9.appId,d9.apiKey).initIndex(d9.indexName),m9=async(t,e=0)=>await hAt.search(t,{analyticsTags:[\"yarn-plugin-interactive-tools\"],attributesToRetrieve:[\"name\",\"version\",\"owner\",\"repository\",\"humanDownloadsLast30Days\"],page:e,hitsPerPage:10});var CD=[\"regular\",\"dev\",\"peer\"],Iw=class extends ft{static{this.paths=[[\"search\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the search interface\",details:`\n    This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.\n    `,examples:[[\"Open the search window\",\"yarn search\"]]})}async execute(){iw(this.context);let{Gem:e}=await Promise.resolve().then(()=>(WF(),LW)),{ScrollableItems:r}=await Promise.resolve().then(()=>(KF(),JF)),{useKeypress:s}=await Promise.resolve().then(()=>(yD(),w2e)),{useMinistore:a}=await Promise.resolve().then(()=>(GW(),jW)),{renderForm:n}=await Promise.resolve().then(()=>($F(),ZF)),{default:c}=await Promise.resolve().then(()=>ut(T2e())),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),P=()=>h.createElement(f,{flexDirection:\"row\"},h.createElement(f,{flexDirection:\"column\",width:48},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to move between packages.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" to select a package.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" again to change the target.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install the selected packages.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Owner\")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Version\")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Downloads\"))),R=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Target\")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(Ae,se)=>{if(se.name!==\"space\")return;if(!Ce){g(CD[0]);return}let Z=CD.indexOf(Ce)+1;Z===CD.length?g(null):g(CD[Z])},[Ce,g]);let we=G.parseIdent(pe.name),ye=G.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:\"wrap\"},ye)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:\"truncate\"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:\"truncate\"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=G.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0},\" - \",G.prettyIdent(S,g))),CD.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null,\" \",h.createElement(e,{active:Ce===we}),\" \",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,\"Powered by Algolia.\")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=C(\"\"),[ye,Ae]=C(0),[se,Z]=C([]),De=j=>{j.match(/\\t| /)||we(j)},Re=async()=>{Ae(0);let j=await m9(g);j.query===g&&Z(j.hits)},mt=async()=>{let j=await m9(g,ye+1);j.query===g&&j.page-1===ye&&(Ae(j.page),Z([...se,...j.hits]))};return E(()=>{g?Re():Z([])},[g]),h.createElement(f,{flexDirection:\"column\"},h.createElement(P,null),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(p,{bold:!0},\"Search: \"),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:\"i.e. babel, webpack, react...\",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:mt}):h.createElement(p,{color:\"gray\"},\"Start typing...\"),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},\"Selected:\")),h.createElement(R,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:\"gray\"},\"No selected packages...\"),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>\"u\")return 1;let ue=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"regular\"),le=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"dev\"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"peer\");return ue.length&&await this.cli.run([\"add\",...ue]),le.length&&await this.cli.run([\"add\",\"--dev\",...le]),me&&await this.cli.run([\"add\",\"--peer\",...me]),0}};Ge();Yt();YG();var U2e=ut(Ai()),M2e=/^((?:[\\^~]|>=?)?)([0-9]+)(\\.[0-9]+)(\\.[0-9]+)((?:-\\S+)?)$/;function _2e(t,e){return t.length>0?[t.slice(0,e)].concat(_2e(t.slice(e),e)):[]}var Cw=class extends ft{static{this.paths=[[\"upgrade-interactive\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the upgrade interface\",details:`\n      This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.\n    `,examples:[[\"Open the upgrade window\",\"yarn upgrade-interactive\"]]})}async execute(){iw(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(L2e(),O2e)),{Pad:r}=await Promise.resolve().then(()=>(VW(),N2e)),{ScrollableItems:s}=await Promise.resolve().then(()=>(KF(),JF)),{useMinistore:a}=await Promise.resolve().then(()=>(GW(),jW)),{renderForm:n}=await Promise.resolve().then(()=>($F(),ZF)),{Box:c,Text:f}=await Promise.resolve().then(()=>ut(Wc())),{default:p,useEffect:h,useRef:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd),R=await Kr.find(S);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,ye)=>{let Ae=mde(we,ye),se=\"\";for(let Z of Ae)Z.added?se+=he.pretty(S,Z.value,\"green\"):Z.removed||(se+=Z.value);return se},W=(we,ye)=>{if(we===ye)return ye;let Ae=G.parseRange(we),se=G.parseRange(ye),Z=Ae.selector.match(M2e),De=se.selector.match(M2e);if(!Z||!De)return U(we,ye);let Re=[\"gray\",\"red\",\"yellow\",\"green\",\"magenta\"],mt=null,j=\"\";for(let rt=1;rt<Re.length;++rt)mt!==null||Z[rt]!==De[rt]?(mt===null&&(mt=Re[rt-1]),j+=he.pretty(S,De[rt],mt)):j+=De[rt];return j},ee=async(we,ye,Ae)=>{let se=await Xu.fetchDescriptorFrom(we,Ae,{project:P,cache:R,preserveModifier:ye,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let ye=U2e.default.valid(we.range)?`^${we.range}`:we.range,[Ae,se]=await Promise.all([ee(we,we.range,ye).catch(()=>null),ee(we,we.range,\"latest\").catch(()=>null)]),Z=[{value:null,label:we.range}];return Ae&&Ae!==we.range?Z.push({value:Ae,label:W(we.range,Ae)}):Z.push({value:null,label:\"\"}),se&&se!==Ae&&se!==we.range?Z.push({value:se,label:W(we.range,se)}):Z.push({value:null,label:\"\"}),Z},ue=()=>p.createElement(c,{flexDirection:\"row\"},p.createElement(c,{flexDirection:\"column\",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select packages.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select versions.\"))),p.createElement(c,{flexDirection:\"column\"},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),le=()=>p.createElement(c,{flexDirection:\"row\",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:\"greenBright\"},\"?\"),\" Pick the packages you want to upgrade.\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Current\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Range\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Latest\"))),me=({active:we,descriptor:ye,suggestions:Ae})=>{let[se,Z]=a(ye.descriptorHash,null),De=G.stringifyIdent(ye),Re=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},G.prettyIdent(S,ye)),p.createElement(r,{active:we,length:Re})),p.createElement(e,{active:we,options:Ae,value:se,skewer:!0,onChange:Z,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[ye,Ae]=C(we.map(()=>null)),se=E(!0),Z=async De=>{let Re=await ie(De);return Re.filter(mt=>mt.label!==\"\").length<=1?null:{descriptor:De,suggestions:Re}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Re=we.slice(0,De),mt=we.slice(De),j=_2e(mt,N),rt=Re.map(Z).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&Ae(Ve=>{let ke=Ve.findIndex(Ue=>Ue===null),it=[...Ve];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>Z(Pe)))).then(async Pe=>{Pe=Pe.filter(Ve=>Ve!==null),await Fe,se.current&&Ae(Ve=>{let ke=Ve.findIndex(it=>it===null);return Ve.slice(0,ke).concat(Pe).concat(Ve.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&Ae(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(s,{radius:N>>1,children:ye.map((De,Re)=>De!==null?p.createElement(me,{key:Re,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Re},\"Loading...\"))}):p.createElement(f,null,\"No upgrades found\")},Ce=await n(({useSubmit:we})=>{we(a());let ye=new Map;for(let se of P.workspaces)for(let Z of[\"dependencies\",\"devDependencies\"])for(let De of se.manifest[Z].values())P.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith(\"link:\")||ye.set(De.descriptorHash,De));let Ae=je.sortMap(ye.values(),se=>G.stringifyDescriptor(se));return p.createElement(c,{flexDirection:\"column\"},p.createElement(ue,null),p.createElement(le,null),p.createElement(pe,{dependencies:Ae}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Ce>\"u\")return 1;let g=!1;for(let we of P.workspaces)for(let ye of[\"dependencies\",\"devDependencies\"]){let Ae=we.manifest[ye];for(let se of Ae.values()){let Z=Ce.get(se.descriptorHash);typeof Z<\"u\"&&Z!==null&&(Ae.set(se.identHash,G.makeDescriptor(se,Z)),g=!0)}}return g?await P.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};var Sgt={commands:[Iw,Cw]},Dgt=Sgt;var zW={};Vt(zW,{default:()=>kgt});Ge();var BD=\"jsr:\";Ge();Ge();function ww(t){let e=t.range.slice(4);if(Fr.validRange(e))return G.makeDescriptor(t,`npm:${G.stringifyIdent(G.wrapIdentIntoScope(t,\"jsr\"))}@${e}`);let r=G.tryParseDescriptor(e,!0);if(r!==null)return G.makeDescriptor(t,`npm:${G.stringifyIdent(G.wrapIdentIntoScope(r,\"jsr\"))}@${r.range}`);throw new Error(`Invalid range: ${t.range}`)}function Bw(t){return G.makeLocator(G.wrapIdentIntoScope(t,\"jsr\"),`npm:${t.reference.slice(4)}`)}function KW(t){return G.makeLocator(G.unwrapIdentFromScope(t,\"jsr\"),`jsr:${t.reference.slice(4)}`)}var eN=class{supports(e,r){return e.reference.startsWith(BD)}getLocalPath(e,r){let s=Bw(e);return r.fetcher.getLocalPath(s,r)}fetch(e,r){let s=Bw(e);return r.fetcher.fetch(s,r)}};var tN=class{supportsDescriptor(e,r){return!!e.range.startsWith(BD)}supportsLocator(e,r){return!!e.reference.startsWith(BD)}shouldPersistResolution(e,r){let s=Bw(e);return r.resolver.shouldPersistResolution(s,r)}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{inner:ww(e)}}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(ww(e));return(await s.resolver.getCandidates(a,r,s)).map(c=>KW(c))}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(ww(e));return a.resolver.getSatisfying(n,r,s,a)}async resolve(e,r){let s=Bw(e),a=await r.resolver.resolve(s,r);return{...a,...KW(a)}}};var bgt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];function Pgt(t,e){for(let r of bgt)for(let s of t.manifest.getForScope(r).values()){if(!s.range.startsWith(\"jsr:\"))continue;let a=ww(s),n=r===\"dependencies\"?G.makeDescriptor(s,\"unknown\"):null,c=n!==null&&t.manifest.ensureDependencyMeta(n).optional?\"optionalDependencies\":r;e[c][G.stringifyIdent(s)]=a.range}}var xgt={hooks:{beforeWorkspacePacking:Pgt},resolvers:[tN],fetchers:[eN]},kgt=xgt;var XW={};Vt(XW,{LinkFetcher:()=>vD,LinkResolver:()=>SD,PortalFetcher:()=>DD,PortalResolver:()=>bD,default:()=>Tgt});Ge();Dt();var rh=\"portal:\",nh=\"link:\";var vD=class{supports(e,r){return!!e.reference.startsWith(nh)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:nh});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:nh}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Hf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0}}};Ge();Dt();var SD=class{supportsDescriptor(e,r){return!!e.range.startsWith(nh)}supportsLocator(e,r){return!!e.reference.startsWith(nh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(nh.length);return[G.makeLocator(e,`${nh}${fe.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:\"0.0.0\",languageName:r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ge();Dt();var DD=class{supports(e,r){return!!e.reference.startsWith(rh)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:rh});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:rh}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,localPath:p}:{packageFs:new Hf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot}}};Ge();Ge();Dt();var bD=class{supportsDescriptor(e,r){return!!e.range.startsWith(rh)}supportsLocator(e,r){return!!e.reference.startsWith(rh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(rh.length);return[G.makeLocator(e,`${rh}${fe.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Qgt={fetchers:[vD,DD],resolvers:[SD,bD]},Tgt=Qgt;var FY={};Vt(FY,{NodeModulesLinker:()=>jD,NodeModulesMode:()=>kY,PnpLooseLinker:()=>GD,default:()=>Kdt});Dt();Ge();Dt();Dt();var $W=(t,e)=>`${t}@${e}`,H2e=(t,e)=>{let r=e.indexOf(\"#\"),s=r>=0?e.substring(r+1):e;return $W(t,s)};var G2e=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),s=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:s,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},c;n.debugLevel>=0&&(c=Date.now());let f=Ugt(t,n),p=!1,h=0;do{let E=eY(f,[f],new Set([f.locator]),new Map,n);p=E.anotherRoundNeeded||E.isGraphChanged,n.fastLookupPossible=!1,h++}while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-c}ms, rounds: ${h}`),n.debugLevel>=1){let E=PD(f);if(eY(f,[f],new Set([f.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:\n${E}, next tree:\n${PD(f)}`);let S=q2e(f);if(S)throw new Error(`${S}, after hoisting finished:\n${PD(f)}`)}return n.debugLevel>=2&&console.log(PD(f)),_gt(f)},Rgt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},Fgt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of t)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},j2e=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:I,hoistedTo:R}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:new Map(I),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},Ngt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf(\"@\",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},ZW=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},eY=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=Hgt(c),p=Ngt(c,f),h=t==c?new Map:a.fastLookupPossible?Rgt(e):Fgt(e),E,C=!1,S=!1,P=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),I=new Map;do{let R=Mgt(t,e,r,h,P,p,s,I,a);R.isGraphChanged&&(S=!0),R.anotherRoundNeeded&&(C=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(P.delete(N),U.shift(),P.set(N,U[0]),E=!0)}while(E);for(let R of c.dependencies.values())if(!c.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=eY(t,[...e,R],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(C=!0),r.delete(R.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},Ogt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},Lgt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(e).map(N=>yo(N)).join(\"\\u2192\")}`);let P=r[r.length-1],R=!(s.ident===P.ident);if(p&&!R&&(C=\"- self-reference\"),R&&(R=s.dependencyKind!==1,p&&!R&&(C=\"- workspace\")),R&&s.dependencyKind===2&&(R=!Ogt(s),p&&!R&&(C=\"- external soft link with unhoisted dependencies\")),R&&(R=!t.peerNames.has(s.name),p&&!R&&(C=`- cannot shadow peer: ${yo(t.originalDependencies.get(s.name).locator)} at ${E}`)),R){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(C=`- filled by: ${yo(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let ue=f.get(P);ue||(ue=new Set,f.set(P,ue)),ue.add(s.name),p&&(C=`- filled by ${yo(ie.locator)} at ${r.slice(0,W).map(le=>yo(le.locator)).join(\"\\u2192\")}`);break}}R=N}if(R&&(R=n.get(s.name)===s.ident,p&&!R&&(C=`- filled by: ${yo(c.get(s.name)[0])} at ${E}`)),R){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let ee=r[W];for(let ie of U){if(ee.peerNames.has(ie)&&ee.originalDependencies.has(ie))continue;let ue=ee.dependencies.get(ie);ue&&t.dependencies.get(ie)!==ue&&(W===r.length-1?S.add(ue):(S=null,N=!1,p&&(C=`- peer dependency ${yo(ue.locator)} from parent ${yo(ee.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}R=N}if(R&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${yo(N.locator)}, available: ${yo(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:R?0:1,reason:C}},rN=t=>`${t.name}@${t.locator}`,Mgt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,C=!1,S=!1,P=(U,W,ee,ie,ue)=>{if(E.has(ie))return;let le=[...W,rN(ie)],me=[...ee,rN(ie)],pe=new Map,Be=new Map;for(let Ae of ZW(ie)){let se=Lgt(h,r,[h,...U,ie],Ae,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(Ae,se),se.isHoistable===2)for(let Z of se.dependsOn){let De=pe.get(Z.name)||new Set;De.add(Ae.name),pe.set(Z.name,De)}}let Ce=new Set,g=(Ae,se,Z)=>{if(!Ce.has(Ae)){Ce.add(Ae),Be.set(Ae,{isHoistable:1,reason:Z});for(let De of pe.get(Ae.name)||[])g(ie.dependencies.get(De),se,p.debugLevel>=2?`- peer dependency ${yo(Ae.locator)} from parent ${yo(ie.locator)} was not hoisted`:\"\")}};for(let[Ae,se]of Be)se.isHoistable===1&&g(Ae,se,se.reason);let we=!1;for(let Ae of Be.keys())if(!Ce.has(Ae)){S=!0;let se=c.get(ie);se&&se.has(Ae.name)&&(C=!0),we=!0,ie.dependencies.delete(Ae.name),ie.hoistedDependencies.set(Ae.name,Ae),ie.reasons.delete(Ae.name);let Z=h.dependencies.get(Ae.name);if(p.debugLevel>=2){let De=Array.from(W).concat([ie.locator]).map(mt=>yo(mt)).join(\"\\u2192\"),Re=h.hoistedFrom.get(Ae.name);Re||(Re=[],h.hoistedFrom.set(Ae.name,Re)),Re.push(De),ie.hoistedTo.set(Ae.name,Array.from(e).map(mt=>yo(mt.locator)).join(\"\\u2192\"))}if(!Z)h.ident!==Ae.ident&&(h.dependencies.set(Ae.name,Ae),ue.add(Ae));else for(let De of Ae.references)Z.references.add(De)}if(ie.dependencyKind===2&&we&&(C=!0),p.check){let Ae=q2e(t);if(Ae)throw new Error(`${Ae}, after hoisting dependencies of ${[h,...U,ie].map(se=>yo(se.locator)).join(\"\\u2192\")}:\n${PD(t)}`)}let ye=ZW(ie);for(let Ae of ye)if(Ce.has(Ae)){let se=Be.get(Ae);if((a.get(Ae.name)===Ae.ident||!ie.reasons.has(Ae.name))&&se.isHoistable!==0&&ie.reasons.set(Ae.name,se.reason),!Ae.isHoistBorder&&me.indexOf(rN(Ae))<0){E.add(ie);let De=j2e(ie,Ae);P([...U,ie],le,me,De,R),E.delete(ie)}}},I,R=new Set(ZW(h)),N=Array.from(e).map(U=>rN(U));do{I=R,R=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=j2e(h,U);P([],Array.from(r),N,W,R)}}while(R.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},q2e=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>yo(S.locator)).join(\"\\u2192\")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),P=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(\", \")}`:\"\"}`,R=`${P?` hoisted to ${P}`:\"\"}`,N=`${C()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(`\n`)},Ugt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:$W(r,a),ident:H2e(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:P,identName:I,reference:R,peerNames:N,hoistPriority:U,dependencyKind:W}=h,ee=e.hoistingLimits.get(E.locator);C={name:P,references:new Set([R]),locator:$W(I,R),ident:H2e(I,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:ee?ee.has(P):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let P=new Set,I=R=>{if(!P.has(R)){P.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||I(N)}};I(C)}else for(let P of h.dependencies)p(P,C)};for(let h of t.dependencies)p(h,c);return c},tY=t=>t.substring(0,t.indexOf(\"@\",1)),_gt=t=>{let e={name:t.name,identName:tY(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:tY(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},Hgt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},yo=t=>{if(!t)return\"none\";let e=t.indexOf(\"@\",1),r=t.substring(0,e);r.endsWith(\"$wsroot$\")&&(r=`wh:${r.replace(\"$wsroot$\",\"\")}`);let s=t.substring(e+1);if(s===\"workspace:.\")return\".\";if(s){let a=(s.indexOf(\"#\")>0?s.split(\"#\")[1]:s).replace(\"npm:\",\"\");return s.startsWith(\"virtual\")&&(r=`v:${r}`),a.startsWith(\"workspace\")&&(r=`w:${r}`,a=\"\"),`${r}${a?`@${a}`:\"\"}`}else return`${r}`};var PD=t=>{let e=0,r=(a,n,c=\"\")=>{if(e>5e4||n.has(a))return\"\";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p=\"\";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let C=a.reasons.get(E.name),S=tY(E.locator);p+=`${c}${h<f.length-1?\"\\u251C\\u2500\":\"\\u2514\\u2500\"}${(n.has(E)?\">\":\"\")+(S!==E.name?`a:${E.name}:`:\"\")+yo(E.locator)+(C?` ${C}`:\"\")}\n`,p+=r(E,n,`${c}${h<f.length-1?\"\\u2502 \":\"  \"}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`\nTree is too large, part of the tree has been dunped\n`:\"\")};var xD=(s=>(s.WORKSPACES=\"workspaces\",s.DEPENDENCIES=\"dependencies\",s.NONE=\"none\",s))(xD||{}),W2e=\"node_modules\",rg=\"$wsroot$\";var kD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=Ggt(t,e),c=null;if(a.length===0){let f=G2e(r,{hoistingLimits:s});c=Wgt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},pA=t=>`${t.name}@${t.reference}`,nY=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(J.delimiter).length,c=a.split(J.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},Y2e=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,s=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,s)},rY=(t,e,r,s)=>{if(t.linkType!==\"SOFT\")return!1;let a=fe.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation);return J.contains(s,a)===null},jgt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");if(t.findPackageLocator(e.packageLocation)===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let s=fe.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,P)=>{let I=pA(S);if(p.has(I))return;p.add(I);let R=t.getPackageInformation(S);if(R){let N=P?pA(P):\"\";if(pA(S)!==N&&R.linkType===\"SOFT\"&&!S.reference.startsWith(\"link:\")&&!rY(R,S,t,s)){let U=V2e(R,S,t);(!f.get(U)||S.reference.startsWith(\"workspace:\"))&&f.set(U,S)}for(let[U,W]of R.packageDependencies)W!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(J.sep);for(let S of f.values()){let P=t.getPackageInformation(S),R=fe.toPortablePath(P.packageLocation.slice(0,-1)).split(J.sep).slice(E.length),N=n;for(let U of R){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let C=(S,P)=>{if(S.workspaceLocator){let I=pA(P),R=a.get(I);R||(R=new Set,a.set(I,R)),R.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||P)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},Ggt=(t,e)=>{let r=[],s=!1,a=new Map,n=jgt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let p=fe.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(P,I)=>`${pA(I)}:${P}`,S=(P,I,R,N,U,W,ee,ie)=>{let ue=C(P,R),le=E.get(ue),me=!!le;!me&&R.name===f.name&&R.reference===f.reference&&(le=h,E.set(ue,h));let pe=rY(I,R,t,p);if(!le){let Ae=0;pe?Ae=2:I.linkType===\"SOFT\"&&R.name.endsWith(rg)&&(Ae=1),le={name:P,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:Ae===1?new Set:I.packagePeers,dependencyKind:Ae},E.set(ue,le)}let Be;if(pe?Be=2:U.linkType===\"SOFT\"?Be=1:Be=0,le.hoistPriority=Math.max(le.hoistPriority||0,Be),ie&&!pe){let Ae=pA({name:N.identName,reference:N.reference}),se=a.get(Ae)||new Set;a.set(Ae,se),se.add(le.name)}let Ce=new Map(I.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(fe.toPortablePath(I.packageLocation.slice(0,-1)));if(Ae){let se=new Set([...Array.from(Ae.manifest.peerDependencies.values(),Z=>G.stringifyIdent(Z)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let Z of se)Ce.has(Z)||(Ce.set(Z,W.get(Z)||null),le.peerNames.add(Z))}}let g=pA({name:R.name.replace(rg,\"\"),reference:R.reference}),we=n.get(g);if(we)for(let Ae of we)Ce.set(`${Ae.name}${rg}`,Ae.reference);(I!==U||I.linkType!==\"SOFT\"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(ee)))&&N.dependencies.add(le);let ye=R!==f&&I.linkType===\"SOFT\"&&!R.name.endsWith(rg)&&!pe;if(!me&&!ye){let Ae=new Map;for(let[se,Z]of Ce)if(Z!==null){let De=t.getLocator(se,Z),Re=t.getLocator(se.replace(rg,\"\"),Z),mt=t.getPackageInformation(Re);if(mt===null)throw new Error(\"Assertion failed: Expected the package to have been registered\");let j=rY(mt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){mt.packageDependencies.size>0&&(s=!0);for(let[Ve,ke]of mt.packageDependencies)if(ke!==null){let it=G.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ve}@${ke}`);if(pA(it)!==pA(De)){let Ue=Ce.get(Ve);if(Ue){let x=G.parseLocator(Array.isArray(Ue)?`${Ue[0]}@${Ue[1]}`:`${Ve}@${Ue}`);Y2e(x,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(De.name))} into ${G.prettyLocator(e.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(e.project.configuration,it)} conflicts with parent dependency ${G.prettyLocator(e.project.configuration,x)}`})}else{let x=Ae.get(Ve);if(x){let w=x.target,b=G.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${Ve}@${w}`);Y2e(b,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(De.name))} into ${G.prettyLocator(e.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(e.project.configuration,it)} conflicts with dependency ${G.prettyLocator(e.project.configuration,b)} from sibling portal ${G.prettyIdent(e.project.configuration,G.parseIdent(x.portal.name))}`})}else Ae.set(Ve,{target:it.reference,portal:De})}}}}let rt=e.hoistingLimitsByCwd?.get(ee),Fe=j?ee:J.relative(p,fe.toPortablePath(mt.packageLocation))||vt.dot,Ne=e.hoistingLimitsByCwd?.get(Fe);S(se,mt,De,le,I,Ce,Fe,rt===\"dependencies\"||Ne===\"dependencies\"||Ne===\"workspaces\")}}};return S(f.name,c,f,h,c,c.packageDependencies,vt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:s}};function V2e(t,e,r){let s=r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation;return fe.toPortablePath(s||t.packageLocation)}function qgt(t,e,r){let s=e.getLocator(t.name.replace(rg,\"\"),t.reference),a=e.getPackageInformation(s);if(a===null)throw new Error(\"Assertion failed: Expected the package to be registered\");return r.pnpifyFs?{linkType:\"SOFT\",target:fe.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:V2e(a,t,e)}}var Wgt=(t,e,r)=>{let s=new Map,a=(E,C,S)=>{let{linkType:P,target:I}=qgt(E,t,r);return{locator:pA(E),nodePath:C,target:I,linkType:P,aliases:S}},n=E=>{let[C,S]=E.split(\"/\");return S?{scope:C,name:S}:{scope:null,name:C}},c=new Set,f=(E,C,S)=>{if(c.has(E))return;c.add(E);let P=Array.from(E.references).sort().join(\"#\");for(let I of E.dependencies){let R=Array.from(I.references).sort().join(\"#\");if(I.identName===E.identName.replace(rg,\"\")&&R===P)continue;let N=Array.from(I.references).sort(),U={name:I.identName,reference:N[0]},{name:W,scope:ee}=n(I.name),ie=ee?[ee,W]:[W],ue=J.join(C,W2e),le=J.join(ue,...ie),me=`${S}/${U.name}`,pe=a(U,S,N.slice(1)),Be=!1;if(pe.linkType===\"SOFT\"&&r.project){let Ce=r.project.workspacesByCwd.get(pe.target.slice(0,-1));Be=!!(Ce&&!Ce.manifest.name)}if(!I.name.endsWith(rg)&&!Be){let Ce=s.get(le);if(Ce){if(Ce.dirList)throw new Error(`Assertion failed: ${le} cannot merge dir node with leaf node`);{let ye=G.parseLocator(Ce.locator),Ae=G.parseLocator(pe.locator);if(Ce.linkType!==pe.linkType)throw new Error(`Assertion failed: ${le} cannot merge nodes with different link types ${Ce.nodePath}/${G.stringifyLocator(ye)} and ${S}/${G.stringifyLocator(Ae)}`);if(ye.identHash!==Ae.identHash)throw new Error(`Assertion failed: ${le} cannot merge nodes with different idents ${Ce.nodePath}/${G.stringifyLocator(ye)} and ${S}/s${G.stringifyLocator(Ae)}`);pe.aliases=[...pe.aliases,...Ce.aliases,G.parseLocator(Ce.locator).reference]}}s.set(le,pe);let g=le.split(\"/\"),we=g.indexOf(W2e);for(let ye=g.length-1;we>=0&&ye>we;ye--){let Ae=fe.toPortablePath(g.slice(0,ye).join(J.sep)),se=g[ye],Z=s.get(Ae);if(!Z)s.set(Ae,{dirList:new Set([se])});else if(Z.dirList){if(Z.dirList.has(se))break;Z.dirList.add(se)}}}f(I,pe.linkType===\"SOFT\"?pe.target:le,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},\"\",[]),h=p.target;return s.set(h,p),f(e,h,\"\"),s};Ge();Ge();Dt();Dt();eA();wc();var wY={};Vt(wY,{PnpInstaller:()=>Gm,PnpLinker:()=>sg,UnplugCommand:()=>Sw,default:()=>Cdt,getPnpPath:()=>og,jsInstallUtils:()=>gA,pnpUtils:()=>HD,quotePathIfNeeded:()=>QBe});Dt();var kBe=Ie(\"url\");Ge();Ge();Dt();Dt();var J2e={DEFAULT:{collapsed:!1,next:{\"*\":\"DEFAULT\"}},TOP_LEVEL:{collapsed:!1,next:{fallbackExclusionList:\"FALLBACK_EXCLUSION_LIST\",packageRegistryData:\"PACKAGE_REGISTRY_DATA\",\"*\":\"DEFAULT\"}},FALLBACK_EXCLUSION_LIST:{collapsed:!1,next:{\"*\":\"FALLBACK_EXCLUSION_ENTRIES\"}},FALLBACK_EXCLUSION_ENTRIES:{collapsed:!0,next:{\"*\":\"FALLBACK_EXCLUSION_DATA\"}},FALLBACK_EXCLUSION_DATA:{collapsed:!0,next:{\"*\":\"DEFAULT\"}},PACKAGE_REGISTRY_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_REGISTRY_ENTRIES\"}},PACKAGE_REGISTRY_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_STORE_DATA\"}},PACKAGE_STORE_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_STORE_ENTRIES\"}},PACKAGE_STORE_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_INFORMATION_DATA\"}},PACKAGE_INFORMATION_DATA:{collapsed:!1,next:{packageDependencies:\"PACKAGE_DEPENDENCIES\",\"*\":\"DEFAULT\"}},PACKAGE_DEPENDENCIES:{collapsed:!1,next:{\"*\":\"PACKAGE_DEPENDENCY\"}},PACKAGE_DEPENDENCY:{collapsed:!0,next:{\"*\":\"DEFAULT\"}}};function Ygt(t,e,r){let s=\"\";s+=\"[\";for(let a=0,n=t.length;a<n;++a)s+=nN(String(a),t[a],e,r).replace(/^ +/g,\"\"),a+1<n&&(s+=\", \");return s+=\"]\",s}function Vgt(t,e,r){let s=`${r}  `,a=\"\";a+=r,a+=`[\n`;for(let n=0,c=t.length;n<c;++n)a+=s+nN(String(n),t[n],e,s).replace(/^ +/,\"\"),n+1<c&&(a+=\",\"),a+=`\n`;return a+=r,a+=\"]\",a}function Jgt(t,e,r){let s=Object.keys(t),a=\"\";a+=\"{\";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=t[p];typeof h>\"u\"||(f!==0&&(a+=\", \"),a+=JSON.stringify(p),a+=\": \",a+=nN(p,h,e,r).replace(/^ +/g,\"\"),f+=1)}return a+=\"}\",a}function Kgt(t,e,r){let s=Object.keys(t),a=`${r}  `,n=\"\";n+=r,n+=`{\n`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=t[h];typeof E>\"u\"||(c!==0&&(n+=\",\",n+=`\n`),n+=a,n+=JSON.stringify(h),n+=\": \",n+=nN(h,E,e,a).replace(/^ +/g,\"\"),c+=1)}return c!==0&&(n+=`\n`),n+=r,n+=\"}\",n}function nN(t,e,r,s){let{next:a}=J2e[r],n=a[t]||a[\"*\"];return K2e(e,n,s)}function K2e(t,e,r){let{collapsed:s}=J2e[e];return Array.isArray(t)?s?Ygt(t,e,r):Vgt(t,e,r):typeof t==\"object\"&&t!==null?s?Jgt(t,e,r):Kgt(t,e,r):JSON.stringify(t)}function z2e(t){return K2e(t,\"TOP_LEVEL\",\"\")}function QD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function zgt(t){let e=new Map,r=QD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>\"u\"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function Xgt(t){return QD(t.fallbackPool||[],([e])=>e)}function Zgt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation===\"./\");for(let[s,a]of QD(t.packageRegistry,([n])=>n===null?\"0\":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of QD(a,([S])=>S===null?\"0\":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let P=QD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:P,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function TD(t){return{__info:[\"This file is automatically generated. Do not touch it, or risk\",\"your modifications being lost.\"],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:zgt(t),fallbackPool:Xgt(t),packageRegistryData:Zgt(t)}}var $2e=ut(Z2e());function eBe(t,e){return[t?`${t}\n`:\"\",`/* eslint-disable */\n`,`// @ts-nocheck\n`,`\"use strict\";\n`,`\n`,e,`\n`,(0,$2e.default)()].join(\"\")}function $gt(t){return JSON.stringify(t,null,2)}function edt(t){return`'${t.replace(/\\\\/g,\"\\\\\\\\\").replace(/'/g,\"\\\\'\").replace(/\\n/g,`\\\\\n`)}'`}function tdt(t){return[`const RAW_RUNTIME_STATE =\n`,`${edt(z2e(t))};\n\n`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function rdt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  const fs = require('fs');\n`,`  const path = require('path');\n`,`  const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)});\n`,`  return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function tBe(t){let e=TD(t),r=tdt(e);return eBe(t.shebang,r)}function rBe(t){let e=TD(t),r=rdt(),s=eBe(t.shebang,r);return{dataFile:$gt(e),loaderFile:s}}Dt();function sY(t,{basePath:e}){let r=fe.toPortablePath(e),s=J.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([P,I])=>{if(C===null!=(P===null))throw new Error(\"Assertion failed: The name and reference should be null, or neither should\");let R=I.discardFromLookup??!1,N={name:C,reference:P},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:R});let W=null;return[P,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:R,get packageLocation(){return W||(W=J.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}Dt();Dt();var sh=Ie(\"module\"),jm=Ie(\"url\"),gY=Ie(\"util\");var ta=Ie(\"url\");var oBe=ut(Ie(\"assert\"));var oY=Array.isArray,RD=JSON.stringify,FD=Object.getOwnPropertyNames,Hm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),aY=(t,e)=>RegExp.prototype.exec.call(t,e),lY=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),ng=(t,...e)=>String.prototype.endsWith.apply(t,e),cY=(t,...e)=>String.prototype.includes.apply(t,e),uY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),ND=(t,...e)=>String.prototype.indexOf.apply(t,e),nBe=(t,...e)=>String.prototype.replace.apply(t,e),ig=(t,...e)=>String.prototype.slice.apply(t,e),hA=(t,...e)=>String.prototype.startsWith.apply(t,e),iBe=Map,sBe=JSON.parse;function OD(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var aBe=OD(\"ERR_PACKAGE_IMPORT_NOT_DEFINED\",(t,e,r)=>`Package import specifier \"${t}\" is not defined${e?` in package ${e}package.json`:\"\"} imported from ${r}`,TypeError),fY=OD(\"ERR_INVALID_MODULE_SPECIFIER\",(t,e,r=void 0)=>`Invalid module \"${t}\" ${e}${r?` imported from ${r}`:\"\"}`,TypeError),lBe=OD(\"ERR_INVALID_PACKAGE_TARGET\",(t,e,r,s=!1,a=void 0)=>{let n=typeof r==\"string\"&&!s&&r.length&&!hA(r,\"./\");return e===\".\"?((0,oBe.default)(s===!1),`Invalid \"exports\" main target ${RD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`):`Invalid \"${s?\"imports\":\"exports\"}\" target ${RD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`},Error),LD=OD(\"ERR_INVALID_PACKAGE_CONFIG\",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:\"\"}${r?`. ${r}`:\"\"}`,Error),cBe=OD(\"ERR_PACKAGE_PATH_NOT_EXPORTED\",(t,e,r=void 0)=>e===\".\"?`No \"exports\" main defined in ${t}package.json${r?` imported from ${r}`:\"\"}`:`Package subpath '${e}' is not defined by \"exports\" in ${t}package.json${r?` imported from ${r}`:\"\"}`,Error);var sN=Ie(\"url\");function uBe(t,e){let r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s];Hm(t,a)&&(r[a]=t[a])}return r}var iN=new iBe;function ndt(t,e,r,s){let a=iN.get(t);if(a!==void 0)return a;let n=s(t);if(n===void 0){let P={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return iN.set(t,P),P}let c;try{c=sBe(n)}catch(P){throw new LD(t,(r?`\"${e}\" from `:\"\")+(0,sN.fileURLToPath)(r||e),P.message)}let{imports:f,main:p,name:h,type:E}=uBe(c,[\"imports\",\"main\",\"name\",\"type\"]),C=Hm(c,\"exports\")?c.exports:void 0;(typeof f!=\"object\"||f===null)&&(f=void 0),typeof p!=\"string\"&&(p=void 0),typeof h!=\"string\"&&(h=void 0),E!==\"module\"&&E!==\"commonjs\"&&(E=\"none\");let S={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:C,imports:f};return iN.set(t,S),S}function fBe(t,e){let r=new URL(\"./package.json\",t);for(;;){let n=r.pathname;if(ng(n,\"node_modules/package.json\"))break;let c=ndt((0,sN.fileURLToPath)(r),t,void 0,e);if(c.exists)return c;let f=r;if(r=new URL(\"../package.json\",r),r.pathname===f.pathname)break}let s=(0,sN.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return iN.set(s,a),a}function idt(t,e,r){throw new aBe(t,e&&(0,ta.fileURLToPath)(new URL(\".\",e)),(0,ta.fileURLToPath)(r))}function sdt(t,e,r,s){let a=`request is not a valid subpath for the \"${r?\"imports\":\"exports\"}\" resolution of ${(0,ta.fileURLToPath)(e)}`;throw new fY(t,a,s&&(0,ta.fileURLToPath)(s))}function MD(t,e,r,s,a){throw typeof e==\"object\"&&e!==null?e=RD(e,null,\"\"):e=`${e}`,new lBe((0,ta.fileURLToPath)(new URL(\".\",r)),t,e,s,a&&(0,ta.fileURLToPath)(a))}var ABe=/(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i,pBe=/\\*/g;function odt(t,e,r,s,a,n,c,f){if(e!==\"\"&&!n&&t[t.length-1]!==\"/\"&&MD(r,t,s,c,a),!hA(t,\"./\")){if(c&&!hA(t,\"../\")&&!hA(t,\"/\")){let C=!1;try{new URL(t),C=!0}catch{}if(!C)return n?lY(pBe,t,()=>e):t+e}MD(r,t,s,c,a)}aY(ABe,ig(t,2))!==null&&MD(r,t,s,c,a);let p=new URL(t,s),h=p.pathname,E=new URL(\".\",s).pathname;if(hA(h,E)||MD(r,t,s,c,a),e===\"\")return p;if(aY(ABe,e)!==null){let C=n?nBe(r,\"*\",()=>e):r+e;sdt(C,s,c,a)}return n?new URL(lY(pBe,p.href,()=>e)):new URL(e,p)}function adt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function vw(t,e,r,s,a,n,c,f){if(typeof e==\"string\")return odt(e,r,s,t,a,n,c,f);if(oY(e)){if(e.length===0)return null;let p;for(let h=0;h<e.length;h++){let E=e[h],C;try{C=vw(t,E,r,s,a,n,c,f)}catch(S){if(p=S,S.code===\"ERR_INVALID_PACKAGE_TARGET\")continue;throw S}if(C!==void 0){if(C===null){p=null;continue}return C}}if(p==null)return p;throw p}else if(typeof e==\"object\"&&e!==null){let p=FD(e);for(let h=0;h<p.length;h++){let E=p[h];if(adt(E))throw new LD((0,ta.fileURLToPath)(t),a,'\"exports\" cannot contain numeric property keys.')}for(let h=0;h<p.length;h++){let E=p[h];if(E===\"default\"||f.has(E)){let C=e[E],S=vw(t,C,r,s,a,n,c,f);if(S===void 0)continue;return S}}return}else if(e===null)return null;MD(s,e,t,c,a)}function gBe(t,e){let r=ND(t,\"*\"),s=ND(e,\"*\"),a=r===-1?t.length:r+1,n=s===-1?e.length:s+1;return a>n?-1:n>a||r===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function ldt(t,e,r){if(typeof t==\"string\"||oY(t))return!0;if(typeof t!=\"object\"||t===null)return!1;let s=FD(t),a=!1,n=0;for(let c=0;c<s.length;c++){let f=s[c],p=f===\"\"||f[0]!==\".\";if(n++===0)a=p;else if(a!==p)throw new LD((0,ta.fileURLToPath)(e),r,`\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return a}function AY(t,e,r){throw new cBe((0,ta.fileURLToPath)(new URL(\".\",e)),t,r&&(0,ta.fileURLToPath)(r))}var hBe=new Set;function cdt(t,e,r){let s=(0,ta.fileURLToPath)(e);hBe.has(s+\"|\"+t)||(hBe.add(s+\"|\"+t),process.emitWarning(`Use of deprecated trailing slash pattern mapping \"${t}\" in the \"exports\" field module resolution of the package at ${s}${r?` imported from ${(0,ta.fileURLToPath)(r)}`:\"\"}. Mapping specifiers ending in \"/\" is no longer supported.`,\"DeprecationWarning\",\"DEP0155\"))}function dBe({packageJSONUrl:t,packageSubpath:e,exports:r,base:s,conditions:a}){if(ldt(r,t,s)&&(r={\".\":r}),Hm(r,e)&&!cY(e,\"*\")&&!ng(e,\"/\")){let p=r[e],h=vw(t,p,\"\",e,s,!1,!1,a);return h==null&&AY(e,t,s),h}let n=\"\",c,f=FD(r);for(let p=0;p<f.length;p++){let h=f[p],E=ND(h,\"*\");if(E!==-1&&hA(e,ig(h,0,E))){ng(e,\"/\")&&cdt(e,t,s);let C=ig(h,E+1);e.length>=h.length&&ng(e,C)&&gBe(n,h)===1&&uY(h,\"*\")===E&&(n=h,c=ig(e,E,e.length-C.length))}}if(n){let p=r[n],h=vw(t,p,c,n,s,!0,!1,a);return h==null&&AY(e,t,s),h}AY(e,t,s)}function mBe({name:t,base:e,conditions:r,readFileSyncFn:s}){if(t===\"#\"||hA(t,\"#/\")||ng(t,\"/\")){let c=\"is not a valid internal imports specifier name\";throw new fY(t,c,(0,ta.fileURLToPath)(e))}let a,n=fBe(e,s);if(n.exists){a=(0,ta.pathToFileURL)(n.pjsonPath);let c=n.imports;if(c)if(Hm(c,t)&&!cY(t,\"*\")){let f=vw(a,c[t],\"\",t,e,!1,!0,r);if(f!=null)return f}else{let f=\"\",p,h=FD(c);for(let E=0;E<h.length;E++){let C=h[E],S=ND(C,\"*\");if(S!==-1&&hA(t,ig(C,0,S))){let P=ig(C,S+1);t.length>=C.length&&ng(t,P)&&gBe(f,C)===1&&uY(C,\"*\")===S&&(f=C,p=ig(t,S,t.length-P.length))}}if(f){let E=c[f],C=vw(a,E,p,f,e,!0,!0,r);if(C!=null)return C}}}idt(t,a,e)}Dt();var udt=new Set([\"BUILTIN_NODE_RESOLUTION_FAILED\",\"MISSING_DEPENDENCY\",\"MISSING_PEER_DEPENDENCY\",\"QUALIFIED_PATH_RESOLUTION_FAILED\",\"UNDECLARED_DEPENDENCY\"]);function gs(t,e,r={},s){s??=udt.has(t)?\"MODULE_NOT_FOUND\":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:s},pnpCode:{...a,value:t},data:{...a,value:r}})}function lf(t){return fe.normalize(fe.fromPortablePath(t))}var CBe=ut(EBe());function wBe(t){return fdt(),hY[t]}var hY;function fdt(){hY||(hY={\"--conditions\":[],...IBe(Adt()),...IBe(process.execArgv)})}function IBe(t){return(0,CBe.default)({\"--conditions\":[String],\"-C\":\"--conditions\"},{argv:t,permissive:!0})}function Adt(){let t=[],e=pdt(process.env.NODE_OPTIONS||\"\",t);return t.length,e}function pdt(t,e){let r=[],s=!1,a=!0;for(let n=0;n<t.length;++n){let c=t[n];if(c===\"\\\\\"&&s){if(n+1===t.length)return e.push(`invalid value for NODE_OPTIONS (invalid escape)\n`),r;c=t[++n]}else if(c===\" \"&&!s){a=!0;continue}else if(c==='\"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&e.push(`invalid value for NODE_OPTIONS (unterminated string)\n`),r}Dt();var[ml,ih]=process.versions.node.split(\".\").map(t=>parseInt(t,10)),BBe=ml>19||ml===19&&ih>=2||ml===18&&ih>=13,UZt=ml===20&&ih<6||ml===19&&ih>=3,_Zt=ml>19||ml===19&&ih>=6,HZt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=19,jZt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=20,GZt=ml>=22;function vBe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>fe.fromPortablePath(uo.resolveVirtual(fe.toPortablePath(e)))),BBe)process.send({\"watch:require\":t});else for(let e of t)process.send({\"watch:require\":e})}function dY(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\\\/]|\\\\\\\\|\\.{0,2}(?:\\/|$))((?:node:)?(?:@[^/]+\\/)?[^/]+)\\/*(.*|)$/,n=/^(\\/|\\.{1,2}(\\/|$))/,c=/\\/$/,f=/^\\.{0,2}\\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of[\"react-scripts\",\"gatsby\"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error(\"Assertion failed: This reference shouldn't be null\");h.push({name:Fe,reference:Pe})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:P}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function R(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,Ue)=>`\\x1B[${it}m${Ue}\\x1B[0m`,Ve=Fe.error;console.error(Ve?Pe(\"31;1\",`\\u2716 ${Fe.error?.message.replace(/\\n.*/s,\"\")}`):Pe(\"33;1\",\"\\u203C Resolution\")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(`  ${Pe(\"37;1\",\"In \\u2190\")} ${(0,gY.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(`  ${Pe(\"37;1\",\"Out \\u2192\")} ${(0,gY.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(`  ${Pe(\"38;5;244\",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ve=I(Fe,Pe);try{return Ve.result=Ne(...Pe)}catch(ke){throw Ve.error=ke}finally{R(Ve)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ve){let ke=I(Fe,Pe);throw ke.error=Ve,R(ke),Ve}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw gs(\"INTERNAL\",\"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)\");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let ee=new Set([\"node\",\"require\",...wBe(\"--conditions\")]);function ie(Fe,Ne=ee,Pe){let Ve=Ae(J.join(Fe,\"internal.js\"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ve===null)throw gs(\"INTERNAL\",`The locator that owns the \"${Fe}\" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ve),it=J.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let Ue=JSON.parse(e.fakeFs.readFileSync(it,\"utf8\"));if(Ue.exports==null)return null;let x=J.contains(ke,Fe);if(x===null)throw gs(\"INTERNAL\",\"unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)\");x!==\".\"&&!f.test(x)&&(x=`./${x}`);try{let w=dBe({packageJSONUrl:(0,jm.pathToFileURL)(fe.fromPortablePath(it)),packageSubpath:x,exports:Ue.exports,base:Pe?(0,jm.pathToFileURL)(fe.fromPortablePath(Pe)):null,conditions:Ne});return fe.toPortablePath((0,jm.fileURLToPath)(w))}catch(w){throw gs(\"EXPORTS_RESOLUTION_FAILED\",w.message,{unqualifiedPath:lf(Fe),locator:Ve,pkgJson:Ue,subpath:lf(x),conditions:Ne},w.code)}}function ue(Fe,Ne,{extensions:Pe}){let Ve;try{Ne.push(Fe),Ve=e.fakeFs.statSync(Fe)}catch{}if(Ve&&!Ve.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ve&&Ve.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(J.join(Fe,Er.manifest),\"utf8\"))}catch{}let it;if(ke&&ke.main&&(it=J.resolve(Fe,ke.main)),it&&it!==Fe){let Ue=ue(it,Ne,{extensions:Pe});if(Ue!==null)return Ue}}for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=`${Fe}${Pe[ke]}`;if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}if(Ve&&Ve.isDirectory())for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=J.format({dir:Fe,name:\"index\",ext:Pe[ke]});if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}return null}function le(Fe){let Ne=new sh.Module(Fe,null);return Ne.filename=Fe,Ne.paths=sh.Module._nodeModulePaths(Fe),Ne}function me(Fe,Ne){return Ne.endsWith(\"/\")&&(Ne=J.join(Ne,\"internal.js\")),sh.Module._resolveFilename(fe.fromPortablePath(Fe),le(fe.fromPortablePath(Ne)),!1,{plugnplay:!1})}function pe(Fe){if(C===null)return!1;let Ne=J.contains(t.basePath,Fe);return Ne===null?!1:!!C.test(Ne.replace(/\\/$/,\"\"))}let Be={std:3,resolveVirtual:1,getAllLocators:1},Ce=p;function g({name:Fe,reference:Ne}){let Pe=S.get(Fe);if(!Pe)return null;let Ve=Pe.get(Ne);return Ve||null}function we({name:Fe,reference:Ne}){let Pe=[];for(let[Ve,ke]of S)if(Ve!==null)for(let[it,Ue]of ke)it===null||Ue.packageDependencies.get(Fe)!==Ne||Ve===Fe&&it===Ne||Pe.push({name:Ve,reference:it});return Pe}function ye(Fe,Ne){let Pe=new Map,Ve=new Set,ke=Ue=>{let x=JSON.stringify(Ue.name);if(Ve.has(x))return;Ve.add(x);let w=we(Ue);for(let b of w)if(U(b).packagePeers.has(Fe))ke(b);else{let F=Pe.get(b.name);typeof F>\"u\"&&Pe.set(b.name,F=new Set),F.add(b.reference)}};ke(Ne);let it=[];for(let Ue of[...Pe.keys()].sort())for(let x of[...Pe.get(Ue)].sort())it.push({name:Ue,reference:x});return it}function Ae(Fe,{resolveIgnored:Ne=!1,includeDiscardFromLookup:Pe=!1}={}){if(pe(Fe)&&!Ne)return null;let Ve=J.relative(t.basePath,Fe);Ve.match(n)||(Ve=`./${Ve}`),Ve.endsWith(\"/\")||(Ve=`${Ve}/`);do{let ke=P.get(Ve);if(typeof ke>\"u\"||ke.discardFromLookup&&!Pe){Ve=Ve.substring(0,Ve.lastIndexOf(\"/\",Ve.length-2)+1);continue}return ke.locator}while(Ve!==\"\");return null}function se(Fe){try{return e.fakeFs.readFileSync(fe.toPortablePath(Fe),\"utf8\")}catch(Ne){if(Ne.code===\"ENOENT\")return;throw Ne}}function Z(Fe,Ne,{considerBuiltins:Pe=!0}={}){if(Fe.startsWith(\"#\"))throw new Error(\"resolveToUnqualified can not handle private import mappings\");if(Fe===\"pnpapi\")return fe.toPortablePath(e.pnpapiResolution);if(Pe&&(0,sh.isBuiltin)(Fe))return null;let Ve=lf(Fe),ke=Ne&&lf(Ne);if(Ne&&pe(Ne)&&(!J.isAbsolute(Fe)||Ae(Fe)===null)){let x=me(Fe,Ne);if(x===!1)throw gs(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)\n\nRequire request: \"${Ve}\"\nRequired by: ${ke}\n`,{request:Ve,issuer:ke});return fe.toPortablePath(x)}let it,Ue=Fe.match(a);if(Ue){if(!Ne)throw gs(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ve,issuer:ke});let[,x,w]=Ue,b=Ae(Ne);if(!b){let Te=me(Fe,Ne);if(Te===!1)throw gs(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).\n\nRequire path: \"${Ve}\"\nRequired by: ${ke}\n`,{request:Ve,issuer:ke});return fe.toPortablePath(Te)}let F=U(b).packageDependencies.get(x),z=null;if(F==null&&b.name!==null){let Te=t.fallbackExclusionList.get(b.name);if(!Te||!Te.has(b.reference)){for(let Ct=0,qt=h.length;Ct<qt;++Ct){let Pt=U(h[Ct]).packageDependencies.get(x);if(Pt!=null){r?z=Pt:F=Pt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let Ct=t.fallbackPool.get(x);Ct!=null&&(z=Ct)}}}let X=null;if(F===null)if(W(b))X=gs(\"MISSING_PEER_DEPENDENCY\",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x});else{let Te=ye(x,b);Te.every(lt=>W(lt))?X=gs(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te}):X=gs(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te})}else F===void 0&&(!Pe&&(0,sh.isBuiltin)(Fe)?W(b)?X=gs(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x}):X=gs(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}):W(b)?X=gs(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x}):X=gs(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}));if(F==null){if(z===null||X===null)throw X||new Error(\"Assertion failed: Expected an error to have been set\");F=z;let Te=X.message.replace(/\\n.*/g,\"\");X.message=Te,!E.has(Te)&&s!==0&&(E.add(Te),process.emitWarning(X))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},oe=U($);if(!oe.packageLocation)throw gs(\"MISSING_DEPENDENCY\",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${$.name}@${$.reference}${$.name!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ve,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;w?it=J.join(xe,w):it=xe}else if(J.isAbsolute(Fe))it=J.normalize(Fe);else{if(!Ne)throw gs(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ve,issuer:ke});let x=J.resolve(Ne);Ne.match(c)?it=J.normalize(J.join(x,Fe)):it=J.normalize(J.join(J.dirname(x),Fe))}return J.normalize(it)}function De(Fe,Ne,Pe=ee,Ve){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ve);return ke?J.normalize(ke):Ne}function Re(Fe,{extensions:Ne=Object.keys(sh.Module._extensions)}={}){let Pe=[],Ve=ue(Fe,Pe,{extensions:Ne});if(Ve)return J.normalize(Ve);{vBe(Pe.map(Ue=>fe.fromPortablePath(Ue)));let ke=lf(Fe),it=Ae(Fe);if(it){let{packageLocation:Ue}=U(it),x=!0;try{e.fakeFs.accessSync(Ue)}catch(w){if(w?.code===\"ENOENT\")x=!1;else{let b=(w?.message??w??\"empty exception thrown\").replace(/^[A-Z]/,y=>y.toLowerCase());throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Required package exists but could not be accessed (${b}).\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${lf(Ue)}\n`,{unqualifiedPath:ke,extensions:Ne})}}if(!x){let w=Ue.includes(\"/unplugged/\")?\"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).\":\"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.\";throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`${w}\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${lf(Ue)}\n`,{unqualifiedPath:ke,extensions:Ne})}}throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.\n\nSource path: ${ke}\n${Pe.map(Ue=>`Not found: ${lf(Ue)}\n`).join(\"\")}`,{unqualifiedPath:ke,extensions:Ne})}}function mt(Fe,Ne,Pe){if(!Ne)throw new Error(\"Assertion failed: An issuer is required to resolve private import mappings\");let Ve=mBe({name:Fe,base:(0,jm.pathToFileURL)(fe.fromPortablePath(Ne)),conditions:Pe.conditions??ee,readFileSyncFn:se});if(Ve instanceof URL)return Re(fe.toPortablePath((0,jm.fileURLToPath)(Ve)),{extensions:Pe.extensions});if(Ve.startsWith(\"#\"))throw new Error(\"Mapping from one private import to another isn't allowed\");return j(Ve,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith(\"#\"))return mt(Fe,Ne,Pe);let{considerBuiltins:Ve,extensions:ke,conditions:it}=Pe,Ue=Z(Fe,Ne,{considerBuiltins:Ve});if(Fe===\"pnpapi\")return Ue;if(Ue===null)return null;let x=()=>Ne!==null?pe(Ne):!1,w=(!Ve||!(0,sh.isBuiltin)(Fe))&&!x()?De(Fe,Ue,it,Ne):Ue;return Re(w,{extensions:ke})}catch(Ve){throw Object.hasOwn(Ve,\"pnpCode\")&&Object.assign(Ve.data,{request:lf(Fe),issuer:Ne&&lf(Ne)}),Ve}}function rt(Fe){let Ne=J.normalize(Fe),Pe=uo.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ve of Pe.keys())Ne!==null&&Ve!==null&&Fe.push({name:Ne,reference:Ve});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=fe.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>Ae(fe.toPortablePath(Fe)),resolveToUnqualified:N(\"resolveToUnqualified\",(Fe,Ne,Pe)=>{let Ve=Ne!==null?fe.toPortablePath(Ne):null,ke=Z(fe.toPortablePath(Fe),Ve,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveUnqualified:N(\"resolveUnqualified\",(Fe,Ne)=>fe.fromPortablePath(Re(fe.toPortablePath(Fe),Ne))),resolveRequest:N(\"resolveRequest\",(Fe,Ne,Pe)=>{let Ve=Ne!==null?fe.toPortablePath(Ne):null,ke=j(fe.toPortablePath(Fe),Ve,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveVirtual:N(\"resolveVirtual\",Fe=>{let Ne=rt(fe.toPortablePath(Fe));return Ne!==null?fe.fromPortablePath(Ne):null})}}Dt();var SBe=(t,e,r)=>{let s=TD(t),a=sY(s,{basePath:e}),n=fe.join(e,Er.pnpCjs);return dY(a,{fakeFs:r,pnpapiResolution:n})};var yY=ut(bBe());Yt();var gA={};Vt(gA,{checkManifestCompatibility:()=>PBe,extractBuildRequest:()=>oN,getExtractHint:()=>EY,hasBindingGyp:()=>IY});Ge();Dt();function PBe(t){return G.isPackageCompatible(t,Ui.getArchitectureSet())}function oN(t,e,r,{configuration:s}){let a=[];for(let n of[\"preinstall\",\"install\",\"postinstall\"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has(\"install\")&&e.misc.hasBindingGyp&&a.push({type:1,script:\"node-gyp rebuild\"}),a.length===0?null:t.linkType!==\"HARD\"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get(\"enableScripts\")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:PBe(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(s,t)} The ${Ui.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var gdt=new Set([\".exe\",\".bin\",\".h\",\".hh\",\".hpp\",\".c\",\".cc\",\".cpp\",\".java\",\".jar\",\".node\"]);function EY(t){return t.packageFs.getExtractHint({relevantExtensions:gdt})}function IY(t){let e=J.join(t.prefixPath,\"binding.gyp\");return t.packageFs.existsSync(e)}var HD={};Vt(HD,{getUnpluggedPath:()=>_D});Ge();Dt();function _D(t,{configuration:e}){return J.resolve(e.get(\"pnpUnpluggedFolder\"),G.slugifyLocator(t))}var ddt=new Set([G.makeIdent(null,\"open\").identHash,G.makeIdent(null,\"opn\").identHash]),sg=class{constructor(){this.mode=\"strict\";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"PnpLinker\",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the PnP linker to be enabled\");let s=og(r.project).cjs;if(!ce.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:G.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return fe.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=og(r.project).cjs;if(!ce.existsSync(s))return null;let n=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})).findPackageLocator(fe.fromPortablePath(e));return n?G.makeLocator(G.parseIdent(n.name),n.reference):null}makeInstaller(e){return new Gm(e)}isEnabled(e){return!(e.project.configuration.get(\"nodeLinker\")!==\"pnp\"||e.project.configuration.get(\"pnpMode\")!==this.mode)}},Gm=class{constructor(e){this.opts=e;this.mode=\"strict\";this.asyncActions=new je.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,s){let a=G.stringifyIdent(e),n=e.reference,c=!!this.opts.project.tryWorkspaceByLocator(e),f=G.isVirtualLocator(e),p=e.peerDependencies.size>0&&!f,h=!p&&!c,E=!p&&e.linkType!==\"SOFT\",C,S;if(h||E){let ee=f?G.devirtualizeLocator(e):e;C=this.customData.store.get(ee.locatorHash),typeof C>\"u\"&&(C=await mdt(r),e.linkType===\"HARD\"&&this.customData.store.set(ee.locatorHash,C)),C.manifest.type===\"module\"&&(this.isESMLoaderRequired=!0),S=this.opts.project.getDependencyMeta(ee,e.version)}let P=h?oN(e,C,S,{configuration:this.opts.project.configuration}):null,I=E?await this.unplugPackageIfNeeded(e,C,r,S,s):r.packageFs;if(J.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=J.resolve(I.getRealPath(),r.prefixPath),N=CY(this.opts.project.cwd,R),U=new Map,W=new Set;if(f){for(let ee of e.peerDependencies.values())U.set(G.stringifyIdent(ee),null),W.add(G.stringifyIdent(ee));if(!c){let ee=G.devirtualizeLocator(e);this.virtualTemplates.set(ee.locatorHash,{location:CY(this.opts.project.cwd,uo.resolveVirtual(R)),locator:ee})}}return je.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:W,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:P}}async attachInternalDependencies(e,r){let s=this.getPackageInformation(e);for(let[a,n]of r){let c=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];s.packageDependencies.set(G.stringifyIdent(a),c)}}async attachExternalDependents(e,r){for(let s of r)this.getDiskInformation(s).packageDependencies.set(G.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get(\"pnpMode\")!==this.mode)return;let e=og(this.opts.project);if(this.isEsmEnabled()||await ce.removePromise(e.esmLoader),this.opts.project.configuration.get(\"nodeLinker\")!==\"pnp\"){await ce.removePromise(e.cjs),await ce.removePromise(e.data),await ce.removePromise(e.esmLoader),await ce.removePromise(this.opts.project.configuration.get(\"pnpUnpluggedFolder\"));return}for(let{locator:C,location:S}of this.virtualTemplates.values())je.getMapWithDefault(this.packageRegistry,G.stringifyIdent(C)).set(C.reference,{packageLocation:S,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1});let r=this.opts.project.configuration.get(\"pnpFallbackMode\"),s=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:G.stringifyIdent(C),reference:C.reference})),a=r!==\"none\",n=[],c=new Map,f=je.buildIgnorePattern([\".yarn/sdks/**\",...this.opts.project.configuration.get(\"pnpIgnorePatterns\")]),p=this.packageRegistry,h=this.opts.project.configuration.get(\"pnpShebang\"),E=this.opts.project.configuration.get(\"pnpZipBackend\");if(r===\"dependencies-only\")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:G.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:s,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:c,ignorePattern:f,pnpZipBackend:E,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has(\"pnpEnableEsmLoader\"))return this.opts.project.configuration.get(\"pnpEnableEsmLoader\");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type===\"module\")return!0;return!1}async finalizeInstallWithPnp(e){let r=og(this.opts.project),s=await this.locateNodeModules(e.ignorePattern);if(s.length>0){this.opts.report.reportWarning(31,\"One or more node_modules have been detected and will be removed. This operation may take some time.\");for(let n of s)await ce.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get(\"pnpEnableInlining\")){let n=tBe(e);await ce.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await ce.removePromise(r.data)}else{let{dataFile:n,loaderFile:c}=rBe(e);await ce.changeFilePromise(r.cjs,c,{automaticNewlines:!0,mode:493}),await ce.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,\"ESM support for PnP uses the experimental loader API and is therefore experimental\"),await ce.changeFilePromise(r.esmLoader,(0,yY.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get(\"pnpUnpluggedFolder\");if(this.unpluggedPaths.size===0)await ce.removePromise(a);else for(let n of await ce.readdirPromise(a)){let c=J.resolve(a,n);this.unpluggedPaths.has(c)||await ce.removePromise(c)}}async locateNodeModules(e){let r=[],s=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=J.join(a.cwd,\"node_modules\");if(s&&s.test(J.relative(this.opts.project.cwd,a.cwd))||!ce.existsSync(n))continue;let c=await ce.readdirPromise(n,{withFileTypes:!0}),f=c.filter(p=>!p.isDirectory()||p.name===\".bin\"||!p.name.startsWith(\".\"));if(f.length===c.length)r.push(n);else for(let p of f)r.push(J.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,s,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,s,n):s.packageFs}shouldBeUnplugged(e,r,s){return typeof s.unplugged<\"u\"?s.unplugged:ddt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(oN(e,r,s,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,s){let a=_D(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new _f(a,{baseFs:r.packageFs,pathUtils:J}):(this.unpluggedPaths.add(a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=J.join(a,r.prefixPath,\".ready\");await ce.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await ce.mkdirPromise(a,{recursive:!0}),await ce.copyPromise(a,vt.dot,{baseFs:r.packageFs,overwrite:!1}),await ce.writeFilePromise(n,\"\"))})),new Sn(a))}getPackageInformation(e){let r=G.stringifyIdent(e),s=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${G.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(s);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${G.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=je.getMapWithDefault(this.packageRegistry,\"@@disk\"),s=CY(this.opts.project.cwd,e);return je.getFactoryWithDefault(r,s,()=>({packageLocation:s,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1}))}};function CY(t,e){let r=J.relative(t,e);return r.match(/^\\.{0,2}\\//)||(r=`./${r}`),r.replace(/\\/?$/,\"/\")}async function mdt(t){let e=await Ut.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ut,r=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let s of e.scripts.keys())r.has(s)||e.scripts.delete(s);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:EY(t),hasBindingGyp:IY(t)}}}Ge();Ge();Yt();var xBe=ut(Go());var Sw=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unplug direct dependencies from the entire project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Unplug both direct and transitive dependencies\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"unplug\"]]}static{this.usage=ot.Usage({description:\"force the unpacking of a list of packages\",details:\"\\n      This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\\n\\n      A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\\n\\n      Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\\n\\n      By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\\n\\n      This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\\n    \",examples:[[\"Unplug the lodash dependency from the active workspace\",\"yarn unplug lodash\"],[\"Unplug all instances of lodash referenced by any workspace\",\"yarn unplug lodash -A\"],[\"Unplug all instances of lodash referenced by the active workspace and its dependencies\",\"yarn unplug lodash -R\"],[\"Unplug all instances of lodash, anywhere\",\"yarn unplug lodash -AR\"],[\"Unplug one specific version of lodash\",\"yarn unplug lodash@1.2.3\"],[\"Unplug all packages with the `@babel` scope\",\"yarn unplug '@babel/*'\"],[\"Unplug all packages (only for testing, not recommended)\",\"yarn unplug -R '*'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);if(r.get(\"nodeLinker\")!==\"pnp\")throw new nt(\"This command can only be used if the `nodeLinker` option is set to `pnp`\");await s.restoreInstallState();let c=new Set(this.patterns),f=this.patterns.map(P=>{let I=G.parseDescriptor(P),R=I.range!==\"unknown\"?I:G.makeDescriptor(I,\"*\");if(!Fr.validRange(R.range))throw new nt(`The range of the descriptor patterns must be a valid semver range (${G.prettyDescriptor(r,R)})`);return N=>{let U=G.stringifyIdent(N);return!xBe.default.isMatch(U,G.stringifyIdent(R))||N.version&&!Fr.satisfiesWithPrereleases(N.version,R.range)?!1:(c.delete(P),!0)}}),p=()=>{let P=[];for(let I of s.storedPackages.values())!s.tryWorkspaceByLocator(I)&&!G.isVirtualLocator(I)&&f.some(R=>R(I))&&P.push(I);return P},h=P=>{let I=new Set,R=[],N=(U,W)=>{if(I.has(U.locatorHash))return;let ee=!!s.tryWorkspaceByLocator(U);if(!(W>0&&!this.recursive&&ee)&&(I.add(U.locatorHash),!s.tryWorkspaceByLocator(U)&&f.some(ie=>ie(U))&&R.push(U),!(W>0&&!this.recursive)))for(let ie of U.dependencies.values()){let ue=s.storedResolutions.get(ie.descriptorHash);if(!ue)throw new Error(\"Assertion failed: The resolution should have been registered\");let le=s.storedPackages.get(ue);if(!le)throw new Error(\"Assertion failed: The package should have been registered\");N(le,W+1)}};for(let U of P)N(U.anchoredPackage,0);return R},E,C;if(this.all&&this.recursive?(E=p(),C=\"the project\"):this.all?(E=h(s.workspaces),C=\"any workspace\"):(E=h([a]),C=\"this workspace\"),c.size>1)throw new nt(`Patterns ${he.prettyList(r,c,he.Type.CODE)} don't match any packages referenced by ${C}`);if(c.size>0)throw new nt(`Pattern ${he.prettyList(r,c,he.Type.CODE)} doesn't match any packages referenced by ${C}`);E=je.sortMap(E,P=>G.stringifyLocator(P));let S=await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async P=>{for(let I of E){let R=I.version??\"unknown\",N=s.topLevelWorkspace.manifest.ensureDependencyMeta(G.makeDescriptor(I,R));N.unplugged=!0,P.reportInfo(0,`Will unpack ${G.prettyLocator(r,I)} to ${he.pretty(r,_D(I,{configuration:r}),he.Type.PATH)}`),P.reportJson({locator:G.stringifyLocator(I),version:R})}await s.topLevelWorkspace.persistManifest(),this.json||P.reportSeparator()});return S.hasErrors()?S.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};var og=t=>({cjs:J.join(t.cwd,Er.pnpCjs),data:J.join(t.cwd,Er.pnpData),esmLoader:J.join(t.cwd,Er.pnpEsmLoader)}),QBe=t=>/\\s/.test(t)?JSON.stringify(t):t;async function ydt(t,e,r){let s=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g,a=/\\s*--experimental-loader\\s+\\S*\\.pnp\\.loader\\.mjs\\s*/,n=(e.NODE_OPTIONS??\"\").replace(s,\" \").replace(a,\" \").trim();if(t.configuration.get(\"nodeLinker\")!==\"pnp\"){e.NODE_OPTIONS=n||void 0;return}let c=og(t),f=`--require ${QBe(fe.fromPortablePath(c.cjs))}`;ce.existsSync(c.esmLoader)&&(f=`${f} --experimental-loader ${(0,kBe.pathToFileURL)(fe.fromPortablePath(c.esmLoader)).href}`),ce.existsSync(c.cjs)&&(e.NODE_OPTIONS=n?`${f} ${n}`:f)}async function Edt(t,e){let r=og(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get(\"pnpUnpluggedFolder\"))}var Idt={hooks:{populateYarnPaths:Edt,setupScriptEnvironment:ydt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: \"pnp\", \"pnpm\", or \"node-modules\"',type:\"STRING\",default:\"pnp\"},minizip:{description:\"Whether Yarn should use minizip to extract archives\",type:\"BOOLEAN\",default:!1},winLinkType:{description:\"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.\",type:\"STRING\",values:[\"junctions\",\"symlinks\"],default:\"junctions\"},pnpMode:{description:\"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.\",type:\"STRING\",default:\"strict\"},pnpShebang:{description:\"String to prepend to the generated PnP script\",type:\"STRING\",default:\"#!/usr/bin/env node\"},pnpIgnorePatterns:{description:\"Array of glob patterns; files matching them will use the classic resolution\",type:\"STRING\",default:[],isArray:!0},pnpZipBackend:{description:\"Whether to use the experimental js implementation for the ZipFS\",type:\"STRING\",values:[\"libzip\",\"js\"],default:\"libzip\"},pnpEnableEsmLoader:{description:\"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.\",type:\"BOOLEAN\",default:!1},pnpEnableInlining:{description:\"If true, the PnP data will be inlined along with the generated loader\",type:\"BOOLEAN\",default:!0},pnpFallbackMode:{description:\"If true, the generated PnP loader will follow the top-level fallback rule\",type:\"STRING\",default:\"dependencies-only\"},pnpUnpluggedFolder:{description:\"Folder where the unplugged packages must be stored\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/unplugged\"}},linkers:[sg],commands:[Sw]},Cdt=Idt;var UBe=ut(OBe());Yt();var xY=ut(Ie(\"crypto\")),_Be=ut(Ie(\"fs\")),HBe=1,Ti=\"node_modules\",aN=\".bin\",jBe=\".yarn-state.yml\",Mdt=1e3,kY=(s=>(s.CLASSIC=\"classic\",s.HARDLINKS_LOCAL=\"hardlinks-local\",s.HARDLINKS_GLOBAL=\"hardlinks-global\",s))(kY||{}),jD=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"NodeModulesLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the node-modules linker to be enabled\");let s=r.project.tryWorkspaceByLocator(e);if(s)return s.cwd;let a=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await PY(r.project,{unrollAliases:!0}));if(a===null)throw new nt(\"Couldn't find the node_modules state file - running an install might help (findPackageLocation)\");let n=a.locatorMap.get(G.stringifyLocator(e));if(!n){let p=new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code=\"LOCATOR_NOT_INSTALLED\",p}let c=n.locations.sort((p,h)=>p.split(J.sep).length-h.split(J.sep).length),f=J.join(r.project.configuration.startingCwd,Ti);return c.find(p=>J.contains(f,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await PY(r.project,{unrollAliases:!0}));if(s===null)return null;let{locationRoot:a,segments:n}=lN(J.resolve(e),{skipPrefix:r.project.cwd}),c=s.locationTree.get(a);if(!c)return null;let f=c.locator;for(let p of n){if(c=c.children.get(p),!c)break;f=c.locator||f}return G.parseLocator(f)}makeInstaller(e){return new bY(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"node-modules\"}},bY=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let s=J.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>\"u\"&&(a=await Udt(e,r),e.linkType===\"HARD\"&&this.customData.store.set(e.locatorHash,a)),!G.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,c=new Set;n.has(G.stringifyIdent(e))||n.set(G.stringifyIdent(e),e.reference);let f=e;if(G.isVirtualLocator(e)){f=G.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(G.stringifyIdent(E),null),c.add(G.stringifyIdent(E))}let p={packageLocation:`${fe.fromPortablePath(s)}/`,packageDependencies:n,packagePeers:c,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf(\"/\")+1):null;return this.realLocatorChecksums.set(f.locatorHash,h),{packageLocation:s,buildRequest:null}}async attachInternalDependencies(e,r){let s=this.localStore.get(e.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected information object to have been registered\");for(let[a,n]of r){let c=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];s.pnpNode.packageDependencies.set(G.stringifyIdent(a),c)}}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the node-modules linker\")}async finalizeInstall(){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\")return;let e=new uo({baseFs:new $f({maxOpenFiles:80,readOnlyArchives:!0})}),r=await PY(this.opts.project),s=this.opts.project.configuration.get(\"nmMode\");(r===null||s!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:s,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmHoistingLimits\");try{P=je.validateEnum(xD,S.manifest.installConfig?.hoistingLimits??P)}catch{let I=G.prettyWorkspace(this.opts.project.configuration,S);this.opts.report.reportWarning(57,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(xD).join(\", \")}, using default: \"${P}\"`)}return[S.relativeCwd,P]})),n=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmSelfReferences\");return P=S.manifest.installConfig?.selfReferences??P,[S.relativeCwd,P]})),c={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(S,P)=>Array.isArray(P)?{name:P[0],reference:P[1]}:{name:S,reference:P},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(S=>{let P=S.anchoredLocator;return{name:G.stringifyIdent(P),reference:P.reference}}),getPackageInformation:S=>{let P=S.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:G.makeLocator(G.parseIdent(S.name),S.reference),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the package reference to have been registered\");return I.pnpNode},findPackageLocator:S=>{let P=this.opts.project.tryWorkspaceByCwd(fe.toPortablePath(S));if(P!==null){let I=P.anchoredLocator;return{name:G.stringifyIdent(I),reference:I.reference}}throw new Error(\"Assertion failed: Unimplemented\")},resolveToUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveRequest:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveVirtual:S=>fe.fromPortablePath(uo.resolveVirtual(fe.toPortablePath(S)))},{tree:f,errors:p,preserveSymlinksRequired:h}=kD(c,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!f){for(let{messageName:S,text:P}of p)this.opts.report.reportError(S,P);return}let E=nY(f);await Ydt(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async S=>{let P=G.parseLocator(S),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");return I.customPackageData.manifest}});let C=[];for(let[S,P]of E.entries()){if(WBe(S))continue;let I=G.parseLocator(S),R=this.localStore.get(I.locatorHash);if(typeof R>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=gA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});N&&C.push({buildLocations:P.locations,locator:I,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${he.pretty(this.opts.project.configuration,\"--preserve-symlinks\",he.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:C}}};async function Udt(t,e){let r=await Ut.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ut,s=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let a of r.scripts.keys())s.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:gA.hasBindingGyp(e)}}}async function _dt(t,e,r,s,{installChangedByUser:a}){let n=\"\";n+=`# Warning: This file is automatically generated. Removing it is fine, but will\n`,n+=`# cause your node_modules installation to become invalidated.\n`,n+=`\n`,n+=`__metadata:\n`,n+=`  version: ${HBe}\n`,n+=`  nmMode: ${s.value}\n`;let c=Array.from(e.keys()).sort(),f=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let C=e.get(E);n+=`\n`,n+=`${JSON.stringify(E)}:\n`,n+=`  locations:\n`;for(let S of C.locations){let P=J.contains(t.cwd,S);if(P===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    - ${JSON.stringify(P)}\n`}if(C.aliases.length>0){n+=`  aliases:\n`;for(let S of C.aliases)n+=`    - ${JSON.stringify(S)}\n`}if(E===f&&r.size>0){n+=`  bin:\n`;for(let[S,P]of r){let I=J.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    ${JSON.stringify(I)}:\n`;for(let[R,N]of P){let U=J.relative(J.join(S,Ti),N);n+=`      ${JSON.stringify(R)}: ${JSON.stringify(U)}\n`}}}}let p=t.cwd,h=J.join(p,Ti,jBe);a&&await ce.removePromise(h),await ce.changeFilePromise(h,n,{automaticNewlines:!0})}async function PY(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=J.join(r,Ti,jBe),a;try{a=await ce.statPromise(s)}catch{}if(!a)return null;let n=ls(await ce.readFilePromise(s,\"utf8\"));if(n.__metadata.version>HBe)return null;let c=n.__metadata.nmMode||\"classic\",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(P=>J.join(r,P)),S=E.bin;if(S)for(let[P,I]of Object.entries(S)){let R=J.join(r,fe.toPortablePath(P)),N=je.getMapWithDefault(p,R);for(let[U,W]of Object.entries(I))N.set(U,fe.toPortablePath([R,Ti,W].join(J.sep)))}if(f.set(h,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:E.aliases||[]}),e&&E.aliases)for(let P of E.aliases){let{scope:I,name:R}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(I,R),P),U=G.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:GBe(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var bw=async(t,e)=>{if(t.split(J.sep).indexOf(Ti)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await ce.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await ce.unlinkPromise(t);return}let s=await ce.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=J.join(t,n.name);n.isDirectory()?(n.name!==Ti||e&&e.innerLoop)&&await bw(c,{innerLoop:!0,contentsOnly:!1}):await ce.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await ce.rmdirPromise(t)}catch(r){if(r.code!==\"ENOENT\"&&r.code!==\"ENOTEMPTY\")throw r}},LBe=4,lN=(t,{skipPrefix:e})=>{let r=J.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(J.sep).filter(p=>p!==\"\"),a=s.indexOf(Ti),n=s.slice(0,a).join(J.sep),c=J.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},GBe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:\"HARD\"});for(let[a,n]of t.entries()){if(n.linkType===\"SOFT\"&&J.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=lN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let C=p[E];if(C!==\".\"){let S=je.getFactoryWithDefault(h.children,C,s);h.children.set(C,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},QY=async(t,e,r)=>{if(process.platform===\"win32\"&&r===\"junctions\"){let s;try{s=await ce.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await ce.symlinkPromise(t,e,\"junction\");return}}await ce.symlinkPromise(J.relative(J.dirname(e),t),e)};async function qBe(t,e,r){let s=J.join(t,`${xY.default.randomBytes(16).toString(\"hex\")}.tmp`);try{await ce.writeFilePromise(s,r);try{await ce.linkPromise(s,e)}catch{}}finally{await ce.unlinkPromise(s)}}async function Hdt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind===\"file\"){if(n.value===\"hardlinks-global\"&&s&&r.digest){let f=J.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ce.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Mdt))if(await Nn.checksumFile(f,{baseFs:ce,algorithm:\"sha1\"})!==r.digest){let C=J.join(s,`${xY.default.randomBytes(16).toString(\"hex\")}.tmp`);await ce.renamePromise(f,C);let S=await a.readFilePromise(t);await ce.writeFilePromise(C,S);try{await ce.linkPromise(C,f),r.mtimeMs=new Date().getTime(),await ce.unlinkPromise(C)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ce.linkPromise(f,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await qBe(s,f,h),r.mtimeMs=new Date().getTime();try{await ce.linkPromise(f,e)}catch(E){E&&E.code&&E.code==\"EXDEV\"&&(n.value=\"hardlinks-local\",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let c=r.mode&511;c!==420&&await ce.chmodPromise(e,c)}}var jdt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await ce.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let C=J.join(e,E),S=await r.readdirPromise(C,{withFileTypes:!0}),P=new Map;for(let I of S){let R=J.join(E,I.name),N,U=J.join(C,I.name);if(I.isFile()){if(N={kind:\"file\",mode:(await r.lstatPromise(U)).mode},a.value===\"hardlinks-global\"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:\"sha1\"});N.digest=W}}else if(I.isDirectory())N={kind:\"directory\"};else if(I.isSymbolicLink())N={kind:\"symlink\",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,\"0\")})`);if(P.set(R,N),I.isDirectory()&&R!==Ti){let W=await f(R);for(let[ee,ie]of W)P.set(ee,ie)}}return P},p;if(a.value===\"hardlinks-global\"&&s&&c){let E=J.join(s,c.substring(0,2),`${c.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await ce.readFilePromise(E,\"utf8\"))))}catch{p=await f()}}else p=await f();let h=!1;for(let[E,C]of p){let S=J.join(e,E),P=J.join(t,E);if(C.kind===\"directory\")await ce.mkdirPromise(P,{recursive:!0});else if(C.kind===\"file\"){let I=C.mtimeMs;await Hdt({srcPath:S,dstPath:P,entry:C,nmMode:a,baseFs:r,globalHardlinksStore:s}),C.mtimeMs!==I&&(h=!0)}else C.kind===\"symlink\"&&await QY(J.resolve(J.dirname(P),C.symlinkTo),P,n)}if(a.value===\"hardlinks-global\"&&s&&h&&c){let E=J.join(s,c.substring(0,2),`${c.substring(2)}.json`);await ce.removePromise(E),await qBe(s,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function Gdt(t,e,r,s){let a=new Map,n=new Map,c=new Map,f=!1,p=(h,E,C,S,P)=>{let I=!0,R=J.join(h,E),N=new Set;if(E===Ti||E.startsWith(\"@\")){let W;try{W=ce.statSync(R)}catch{}I=!!W,W?W.mtimeMs>r?(f=!0,N=new Set(ce.readdirSync(R))):N=new Set(C.children.get(E).children.keys()):f=!0;let ee=e.get(h);if(ee){let ie=J.join(h,Ti,aN),ue;try{ue=ce.statSync(ie)}catch{}if(!ue)f=!0;else if(ue.mtimeMs>r){f=!0;let le=new Set(ce.readdirSync(ie)),me=new Map;n.set(h,me);for(let[pe,Be]of ee)le.has(pe)&&me.set(pe,Be)}else n.set(h,ee)}}else I=P.has(E);let U=C.children.get(E);if(I){let{linkType:W,locator:ee}=U,ie={children:new Map,linkType:W,locator:ee};if(S.children.set(E,ie),ee){let ue=je.getSetWithDefault(c,ee);ue.add(R),c.set(ee,ue)}for(let ue of U.children.keys())p(R,ue,U,ie,N)}else U.locator&&s.storedBuildState.delete(G.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:C,locator:S}=E,P={children:new Map,linkType:C,locator:S};if(a.set(h,P),S){let I=je.getSetWithDefault(c,E.locator);I.add(h),c.set(E.locator,I)}E.children.has(Ti)&&p(h,Ti,E,P,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:c,installChangedByUser:f}}function WBe(t){let e=G.parseDescriptor(t);return G.isVirtualDescriptor(e)&&(e=G.devirtualizeDescriptor(e)),e.range.startsWith(\"link:\")}async function qdt(t,e,r,{loadManifest:s}){let a=new Map;for(let[f,{locations:p}]of t){let h=WBe(f)?null:await s(f,p[0]),E=new Map;if(h)for(let[C,S]of h.bin){let P=J.join(p[0],S);S!==\"\"&&ce.existsSync(P)&&E.set(C,S)}a.set(f,E)}let n=new Map,c=(f,p,h)=>{let E=new Map,C=J.contains(r,f);if(h.locator&&C!==null){let S=a.get(h.locator);for(let[P,I]of S){let R=J.join(f,fe.toPortablePath(I));E.set(P,R)}for(let[P,I]of h.children){let R=J.join(f,P),N=c(R,R,I);N.size>0&&n.set(f,new Map([...n.get(f)||new Map,...N]))}}else for(let[S,P]of h.children){let I=c(J.join(f,S),p,P);for(let[R,N]of I)E.set(R,N)}return E};for(let[f,p]of e){let h=c(f,f,p);h.size>0&&n.set(f,new Map([...n.get(f)||new Map,...h]))}return n}var MBe=(t,e)=>{if(!t||!e)return t===e;let r=G.parseLocator(t);G.isVirtualLocator(r)&&(r=G.devirtualizeLocator(r));let s=G.parseLocator(e);return G.isVirtualLocator(s)&&(s=G.devirtualizeLocator(s)),G.areLocatorsEqual(r,s)};function TY(t){return J.join(t.get(\"globalFolder\"),\"store\")}function Wdt(t,e){let r=s=>{let a=s.split(J.sep),n=a.lastIndexOf(Ti);if(n<0||n==a.length-1)throw new Error(`Assertion failed. Path is outside of any node_modules package ${s}`);return a.slice(0,n+(a[n+1].startsWith(\"@\")?3:2)).join(J.sep)};for(let s of t.values())for(let[a,n]of s)e.has(r(n))&&s.delete(a)}async function Ydt(t,e,{baseFs:r,project:s,report:a,loadManifest:n,realLocatorChecksums:c}){let f=J.join(s.cwd,Ti),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:C}=Gdt(t.locationTree,t.binSymlinks,t.mtimeMs,s),S=GBe(e,{skipPrefix:s.cwd}),P=[],I=async({srcDir:Be,dstDir:Ce,linkType:g,globalHardlinksStore:we,nmMode:ye,windowsLinkType:Ae,packageChecksum:se})=>{let Z=(async()=>{try{g===\"SOFT\"?(await ce.mkdirPromise(J.dirname(Ce),{recursive:!0}),await QY(J.resolve(Be),Ce,Ae)):await jdt(Ce,Be,{baseFs:r,globalHardlinksStore:we,nmMode:ye,windowsLinkType:Ae,packageChecksum:se})}catch(De){throw De.message=`While persisting ${Be} -> ${Ce} ${De.message}`,De}finally{ie.tick()}})().then(()=>P.splice(P.indexOf(Z),1));P.push(Z),P.length>LBe&&await Promise.race(P)},R=async(Be,Ce,g)=>{let we=(async()=>{let ye=async(Ae,se,Z)=>{try{Z.innerLoop||await ce.mkdirPromise(se,{recursive:!0});let De=await ce.readdirPromise(Ae,{withFileTypes:!0});for(let Re of De){if(!Z.innerLoop&&Re.name===aN)continue;let mt=J.join(Ae,Re.name),j=J.join(se,Re.name);Re.isDirectory()?(Re.name!==Ti||Z&&Z.innerLoop)&&(await ce.mkdirPromise(j,{recursive:!0}),await ye(mt,j,{...Z,innerLoop:!0})):me.value===\"hardlinks-local\"||me.value===\"hardlinks-global\"?await ce.linkPromise(mt,j):await ce.copyFilePromise(mt,j,_Be.default.constants.COPYFILE_FICLONE)}}catch(De){throw Z.innerLoop||(De.message=`While cloning ${Ae} -> ${se} ${De.message}`),De}finally{Z.innerLoop||ie.tick()}};await ye(Be,Ce,g)})().then(()=>P.splice(P.indexOf(we),1));P.push(we),P.length>LBe&&await Promise.race(P)},N=async(Be,Ce,g)=>{if(g)for(let[we,ye]of Ce.children){let Ae=g.children.get(we);await N(J.join(Be,we),ye,Ae)}else{Ce.children.has(Ti)&&await bw(J.join(Be,Ti),{contentsOnly:!1});let we=J.basename(Be)===Ti&&p.has(J.join(J.dirname(Be)));await bw(Be,{contentsOnly:Be===f,isWorkspaceDir:we})}};for(let[Be,Ce]of p){let g=S.get(Be);for(let[we,ye]of Ce.children){if(we===\".\")continue;let Ae=g&&g.children.get(we),se=J.join(Be,we);await N(se,ye,Ae)}}let U=async(Be,Ce,g)=>{if(g){MBe(Ce.locator,g.locator)||await bw(Be,{contentsOnly:Ce.linkType===\"HARD\"});for(let[we,ye]of Ce.children){let Ae=g.children.get(we);await U(J.join(Be,we),ye,Ae)}}else{Ce.children.has(Ti)&&await bw(J.join(Be,Ti),{contentsOnly:!0});let we=J.basename(Be)===Ti&&S.has(J.join(J.dirname(Be)));await bw(Be,{contentsOnly:Ce.linkType===\"HARD\",isWorkspaceDir:we})}};for(let[Be,Ce]of S){let g=p.get(Be);for(let[we,ye]of Ce.children){if(we===\".\")continue;let Ae=g&&g.children.get(we);await U(J.join(Be,we),ye,Ae)}}let W=new Map,ee=[];for(let[Be,Ce]of E)for(let g of Ce){let{locationRoot:we,segments:ye}=lN(g,{skipPrefix:s.cwd}),Ae=S.get(we),se=we;if(Ae){for(let Z of ye)if(se=J.join(se,Z),Ae=Ae.children.get(Z),!Ae)break;if(Ae){let Z=MBe(Ae.locator,Be),De=e.get(Ae.locator),Re=De.target,mt=se,j=De.linkType;if(Z)W.has(Re)||W.set(Re,mt);else if(Re!==mt){let rt=G.parseLocator(Ae.locator);G.isVirtualLocator(rt)&&(rt=G.devirtualizeLocator(rt)),ee.push({srcDir:Re,dstDir:mt,linkType:j,realLocatorHash:rt.locatorHash})}}}}for(let[Be,{locations:Ce}]of e.entries())for(let g of Ce){let{locationRoot:we,segments:ye}=lN(g,{skipPrefix:s.cwd}),Ae=p.get(we),se=S.get(we),Z=we,De=e.get(Be),Re=G.parseLocator(Be);G.isVirtualLocator(Re)&&(Re=G.devirtualizeLocator(Re));let mt=Re.locatorHash,j=De.target,rt=g;if(j===rt)continue;let Fe=De.linkType;for(let Ne of ye)se=se.children.get(Ne);if(!Ae)ee.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:mt});else for(let Ne of ye)if(Z=J.join(Z,Ne),Ae=Ae.children.get(Ne),!Ae){ee.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:mt});break}}let ie=Ao.progressViaCounter(ee.length),ue=a.reportProgress(ie),le=s.configuration.get(\"nmMode\"),me={value:le},pe=s.configuration.get(\"winLinkType\");try{let Be=me.value===\"hardlinks-global\"?`${TY(s.configuration)}/v1`:null;if(Be&&!await ce.existsPromise(Be)){await ce.mkdirpPromise(Be);for(let g=0;g<256;g++)await ce.mkdirPromise(J.join(Be,g.toString(16).padStart(2,\"0\")))}for(let g of ee)(g.linkType===\"SOFT\"||!W.has(g.srcDir))&&(W.set(g.srcDir,g.dstDir),await I({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:pe,packageChecksum:c.get(g.realLocatorHash)||null}));await Promise.all(P),P.length=0;for(let g of ee){let we=W.get(g.srcDir);g.linkType!==\"SOFT\"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:me})}await Promise.all(P),await ce.mkdirPromise(f,{recursive:!0}),Wdt(h,new Set(ee.map(g=>g.dstDir)));let Ce=await qdt(e,S,s.cwd,{loadManifest:n});await Vdt(h,Ce,s.cwd,pe),await _dt(s,e,Ce,me,{installChangedByUser:C}),le==\"hardlinks-global\"&&me.value==\"hardlinks-local\"&&a.reportWarningOnce(74,\"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices\")}finally{ue.stop()}}async function Vdt(t,e,r,s){for(let a of t.keys()){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=J.join(a,Ti,aN);await ce.removePromise(n)}}for(let[a,n]of e){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let c=J.join(a,Ti,aN),f=t.get(a)||new Map;await ce.mkdirPromise(c,{recursive:!0});for(let p of f.keys())n.has(p)||(await ce.removePromise(J.join(c,p)),process.platform===\"win32\"&&await ce.removePromise(J.join(c,`${p}.cmd`)));for(let[p,h]of n){let E=f.get(p),C=J.join(c,p);E!==h&&(process.platform===\"win32\"?await(0,UBe.default)(fe.fromPortablePath(h),fe.fromPortablePath(C),{createPwshFile:!1}):(await ce.removePromise(C),await QY(h,C,s),J.contains(r,await ce.realpathPromise(h))!==null&&await ce.chmodPromise(h,493)))}}}Ge();Dt();eA();var GD=class extends sg{constructor(){super(...arguments);this.mode=\"loose\"}makeInstaller(r){return new RY(r)}},RY=class extends Gm{constructor(){super(...arguments);this.mode=\"loose\"}async transformPnpSettings(r){let s=new uo({baseFs:new $f({maxOpenFiles:80,readOnlyArchives:!0})}),a=SBe(r,this.opts.project.cwd,s),{tree:n,errors:c}=kD(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:C,text:S}of c)this.opts.report.reportError(C,S);return}let f=new Map;r.fallbackPool=f;let p=(C,S)=>{let P=G.parseLocator(S.locator),I=G.stringifyIdent(P);I===C?f.set(C,P.reference):f.set(C,[I,P.reference])},h=J.join(this.opts.project.cwd,Er.nodeModules),E=n.get(h);if(!(typeof E>\"u\")){if(\"target\"in E)throw new Error(\"Assertion failed: Expected the root junction point to be a directory\");for(let C of E.dirList){let S=J.join(h,C),P=n.get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: Expected the child to have been registered\");if(\"target\"in P)p(C,P);else for(let I of P.dirList){let R=J.join(S,I),N=n.get(R);if(typeof N>\"u\")throw new Error(\"Assertion failed: Expected the subchild to have been registered\");if(\"target\"in N)p(`${C}/${I}`,N);else throw new Error(\"Assertion failed: Expected the leaf junction to be a package\")}}}}};var Jdt={hooks:{cleanGlobalArtifacts:async t=>{let e=TY(t);await ce.removePromise(e)}},configuration:{nmHoistingLimits:{description:\"Prevents packages to be hoisted past specific levels\",type:\"STRING\",values:[\"workspaces\",\"dependencies\",\"none\"],default:\"none\"},nmMode:{description:\"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.\",type:\"STRING\",values:[\"classic\",\"hardlinks-local\",\"hardlinks-global\"],default:\"classic\"},nmSelfReferences:{description:\"Defines whether the linker should generate self-referencing symlinks for workspaces.\",type:\"BOOLEAN\",default:!0}},linkers:[jD,GD]},Kdt=Jdt;var FK={};Vt(FK,{NpmHttpFetcher:()=>VD,NpmRemapResolver:()=>JD,NpmSemverFetcher:()=>oh,NpmSemverResolver:()=>KD,NpmTagResolver:()=>zD,default:()=>ubt,npmConfigUtils:()=>hi,npmHttpUtils:()=>en,npmPublishUtils:()=>v1});Ge();var $Be=ut(Ai());var oi=\"npm:\";var en={};Vt(en,{AuthType:()=>zBe,customPackageError:()=>qm,del:()=>Amt,get:()=>Wm,getIdentUrl:()=>WD,getPackageMetadata:()=>Qw,handleInvalidAuthenticationError:()=>ag,post:()=>umt,put:()=>fmt});Ge();Ge();Dt();var LY=ut(Vv());ql();var KBe=ut(Ai());var hi={};Vt(hi,{RegistryType:()=>VBe,getAuditRegistry:()=>zdt,getAuthConfiguration:()=>OY,getDefaultRegistry:()=>qD,getPublishRegistry:()=>Xdt,getRegistryConfiguration:()=>JBe,getScopeConfiguration:()=>NY,getScopeRegistry:()=>Pw,isPackageApproved:()=>xw,normalizeRegistry:()=>Jc});Ge();var YBe=ut(Go()),VBe=(s=>(s.AUDIT_REGISTRY=\"npmAuditRegistry\",s.FETCH_REGISTRY=\"npmRegistryServer\",s.PUBLISH_REGISTRY=\"npmPublishRegistry\",s))(VBe||{});function Jc(t){return t.replace(/\\/$/,\"\")}function zdt({configuration:t}){return qD({configuration:t,type:\"npmAuditRegistry\"})}function Xdt(t,{configuration:e}){return t.publishConfig?.registry?Jc(t.publishConfig.registry):t.name?Pw(t.name.scope,{configuration:e,type:\"npmPublishRegistry\"}):qD({configuration:e,type:\"npmPublishRegistry\"})}function Pw(t,{configuration:e,type:r=\"npmRegistryServer\"}){let s=NY(t,{configuration:e});if(s===null)return qD({configuration:e,type:r});let a=s.get(r);return a===null?qD({configuration:e,type:r}):Jc(a)}function qD({configuration:t,type:e=\"npmRegistryServer\"}){let r=t.get(e);return Jc(r!==null?r:t.get(\"npmRegistryServer\"))}function JBe(t,{configuration:e}){let r=e.get(\"npmRegistries\"),s=Jc(t),a=r.get(s);if(typeof a<\"u\")return a;let n=r.get(s.replace(/^[a-z]+:/,\"\"));return typeof n<\"u\"?n:null}var Zdt=new Map([[\"npmRegistryServer\",\"https://npm.jsr.io/\"]]);function NY(t,{configuration:e}){if(t===null)return null;let s=e.get(\"npmScopes\").get(t);return s||(t===\"jsr\"?Zdt:null)}function OY(t,{configuration:e,ident:r}){let s=r&&NY(r.scope,{configuration:e});return s?.get(\"npmAuthIdent\")||s?.get(\"npmAuthToken\")?s:JBe(t,{configuration:e})||e}function $dt({configuration:t,version:e,publishTimes:r}){let s=t.get(\"npmMinimalAgeGate\");if(s){let a=r?.[e];if(typeof a>\"u\"||(new Date().getTime()-new Date(a).getTime())/60/1e3<s)return!0}return!1}function emt(t,e,r){let s=G.tryParseDescriptor(r);if(!s||s.identHash!==t.identHash&&!YBe.default.isMatch(G.stringifyIdent(t),G.stringifyIdent(s)))return!1;if(s.range===\"unknown\")return!0;let a=Fr.validRange(s.range);return!(!a||!a.test(e))}function tmt({configuration:t,ident:e,version:r}){return t.get(\"npmPreapprovedPackages\").some(s=>emt(e,r,s))}function xw(t){return!$dt(t)||tmt(t)}var zBe=(a=>(a[a.NO_AUTH=0]=\"NO_AUTH\",a[a.BEST_EFFORT=1]=\"BEST_EFFORT\",a[a.CONFIGURATION=2]=\"CONFIGURATION\",a[a.ALWAYS_AUTH=3]=\"ALWAYS_AUTH\",a))(zBe||{});async function ag(t,{attemptedAs:e,registry:r,headers:s,configuration:a}){if(uN(t))throw new jt(41,\"Invalid OTP token\");if(t.originalError?.name===\"HTTPError\"&&t.originalError?.response.statusCode===401)throw new jt(41,`Invalid authentication (${typeof e!=\"string\"?`as ${await hmt(r,s,{configuration:a})}`:`attempted as ${e}`})`)}function qm(t,e){let r=t.response?.statusCode;return r?r===404?\"Package not found\":r>=500&&r<600?`The registry appears to be down (using a ${he.applyHyperlink(e,\"local cache\",\"https://yarnpkg.com/advanced/lexicon#local-cache\")} might have protected you against such outages)`:null:null}function WD(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var XBe=new Map,rmt=new Map;async function nmt(t){return await je.getFactoryWithDefault(XBe,t,async()=>{let e=null;try{e=await ce.readJsonPromise(t)}catch{}return e})}async function imt(t,e,{configuration:r,cached:s,registry:a,headers:n,version:c,...f}){return await je.getFactoryWithDefault(rmt,t,async()=>await Wm(WD(e),{...f,customErrorMessage:qm,configuration:r,registry:a,ident:e,headers:{...n,\"If-None-Match\":s?.etag,\"If-Modified-Since\":s?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(s===null)throw new Error(\"Assertion failed: cachedMetadata should not be null\");return{...h,body:s.metadata}}let E=omt(JSON.parse(h.body.toString())),C={metadata:E,etag:h.headers.etag,lastModified:h.headers[\"last-modified\"]};return XBe.set(t,Promise.resolve(C)),Promise.resolve().then(async()=>{let S=`${t}-${process.pid}.tmp`;await ce.mkdirPromise(J.dirname(S),{recursive:!0}),await ce.writeJsonPromise(S,C,{compact:!0}),await ce.renamePromise(S,t)}).catch(()=>{}),{...h,body:E}}}))}function smt(t){return t.scope!==null?`@${t.scope}-${t.name}-${t.scope.length}`:t.name}async function Qw(t,{cache:e,project:r,registry:s,headers:a,version:n,...c}){let{configuration:f}=r;s=YD(f,{ident:t,registry:s});let p=lmt(f,s),h=J.join(p,`${smt(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await nmt(h),E)){if(typeof n<\"u\"&&typeof E.metadata.versions[n]<\"u\")return E.metadata;if(f.get(\"enableOfflineMode\")){let C=structuredClone(E.metadata),S=new Set;if(e){for(let I of Object.keys(C.versions)){let R=G.makeLocator(t,`npm:${I}`),N=e.getLocatorMirrorPath(R);(!N||!ce.existsSync(N))&&(delete C.versions[I],S.add(I))}let P=C[\"dist-tags\"].latest;if(S.has(P)){let I=Object.keys(E.metadata.versions).sort(KBe.default.compare),R=I.indexOf(P);for(;S.has(I[R])&&R>=0;)R-=1;R>=0?C[\"dist-tags\"].latest=I[R]:delete C[\"dist-tags\"].latest}}return C}}return await imt(h,t,{...c,configuration:f,cached:E,registry:s,headers:a,version:n})}var ZBe=[\"name\",\"dist.tarball\",\"bin\",\"scripts\",\"os\",\"cpu\",\"libc\",\"dependencies\",\"dependenciesMeta\",\"optionalDependencies\",\"peerDependencies\",\"peerDependenciesMeta\",\"deprecated\"];function omt(t){return{\"dist-tags\":t[\"dist-tags\"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,Kd(r,ZBe)])),time:t.time}}var amt=Nn.makeHash(\"time\",...ZBe).slice(0,6);function lmt(t,e){let r=cmt(t),s=new URL(e);return J.join(r,amt,s.hostname)}function cmt(t){return J.join(t.get(\"globalFolder\"),\"metadata/npm\")}async function Wm(t,{configuration:e,headers:r,ident:s,authType:a,allowOidc:n,registry:c,...f}){c=YD(e,{ident:s,registry:c}),s&&s.scope&&typeof a>\"u\"&&(a=1);let p=await cN(c,{authType:a,allowOidc:n,configuration:e,ident:s});p&&(r={...r,authorization:p});try{return await nn.get(t.charAt(0)===\"/\"?`${c}${t}`:t,{configuration:e,headers:r,...f})}catch(h){throw await ag(h,{registry:c,configuration:e,headers:r}),h}}async function umt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,allowOidc:f,registry:p,otp:h,...E}){p=YD(s,{ident:n,registry:p});let C=await cN(p,{authType:c,allowOidc:f,configuration:s,ident:n});C&&(a={...a,authorization:C}),h&&(a={...a,...kw(h)});try{return await nn.post(p+t,e,{configuration:s,headers:a,...E})}catch(S){if(!uN(S)||h)throw await ag(S,{attemptedAs:r,registry:p,configuration:s,headers:a}),S;h=await MY(S,{configuration:s});let P={...a,...kw(h)};try{return await nn.post(`${p}${t}`,e,{configuration:s,headers:P,...E})}catch(I){throw await ag(I,{attemptedAs:r,registry:p,configuration:s,headers:a}),I}}}async function fmt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,allowOidc:f,registry:p,otp:h,...E}){p=YD(s,{ident:n,registry:p});let C=await cN(p,{authType:c,allowOidc:f,configuration:s,ident:n});C&&(a={...a,authorization:C}),h&&(a={...a,...kw(h)});try{return await nn.put(p+t,e,{configuration:s,headers:a,...E})}catch(S){if(!uN(S))throw await ag(S,{attemptedAs:r,registry:p,configuration:s,headers:a}),S;h=await MY(S,{configuration:s});let P={...a,...kw(h)};try{return await nn.put(`${p}${t}`,e,{configuration:s,headers:P,...E})}catch(I){throw await ag(I,{attemptedAs:r,registry:p,configuration:s,headers:a}),I}}}async function Amt(t,{attemptedAs:e,configuration:r,headers:s,ident:a,authType:n=3,allowOidc:c,registry:f,otp:p,...h}){f=YD(r,{ident:a,registry:f});let E=await cN(f,{authType:n,allowOidc:c,configuration:r,ident:a});E&&(s={...s,authorization:E}),p&&(s={...s,...kw(p)});try{return await nn.del(f+t,{configuration:r,headers:s,...h})}catch(C){if(!uN(C)||p)throw await ag(C,{attemptedAs:e,registry:f,configuration:r,headers:s}),C;p=await MY(C,{configuration:r});let S={...s,...kw(p)};try{return await nn.del(`${f}${t}`,{configuration:r,headers:S,...h})}catch(P){throw await ag(P,{attemptedAs:e,registry:f,configuration:r,headers:s}),P}}}function YD(t,{ident:e,registry:r}){if(typeof r>\"u\"&&e)return Pw(e.scope,{configuration:t});if(typeof r!=\"string\")throw new Error(\"Assertion failed: The registry should be a string\");return Jc(r)}async function cN(t,{authType:e=2,allowOidc:r=!1,configuration:s,ident:a}){let n=OY(t,{configuration:s,ident:a}),c=pmt(n,e);if(!c)return null;let f=await s.reduceHook(p=>p.getNpmAuthenticationHeader,void 0,t,{configuration:s,ident:a});if(f)return f;if(n.get(\"npmAuthToken\"))return`Bearer ${n.get(\"npmAuthToken\")}`;if(n.get(\"npmAuthIdent\")){let p=n.get(\"npmAuthIdent\");return p.includes(\":\")?`Basic ${Buffer.from(p).toString(\"base64\")}`:`Basic ${p}`}if(r&&a){let p=await gmt(t,{configuration:s,ident:a});if(p)return`Bearer ${p}`}if(c&&e!==1)throw new jt(33,\"No authentication configured for request\");return null}function pmt(t,e){switch(e){case 2:return t.get(\"npmAlwaysAuth\");case 1:case 3:return!0;case 0:return!1;default:throw new Error(\"Unreachable\")}}async function hmt(t,e,{configuration:r}){if(typeof e>\"u\"||typeof e.authorization>\"u\")return\"an anonymous user\";try{return(await nn.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??\"an unknown user\"}catch{return\"an unknown user\"}}async function MY(t,{configuration:e}){let r=t.originalError?.response.headers[\"npm-notice\"];if(r&&(await Ot.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\\/\\/\\S+)/g,he.pretty(e,\"$1\",he.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\\/\\/\\S+)/i);if(n&&Ui.openUrl){let{openNow:c}=await(0,LY.prompt)({type:\"confirm\",name:\"openNow\",message:\"Do you want to try to open this url now?\",required:!0,initial:!0,onCancel:()=>process.exit(130)});c&&(await Ui.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,\"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.\")))}}}),process.stdout.write(`\n`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||\"\";let{otp:s}=await(0,LY.prompt)({type:\"password\",name:\"otp\",message:\"One-time password:\",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`\n`),s}function uN(t){if(t.originalError?.name!==\"HTTPError\")return!1;try{return(t.originalError?.response.headers[\"www-authenticate\"].split(/,\\s*/).map(r=>r.toLowerCase())).includes(\"otp\")}catch{return!1}}function kw(t){return{\"npm-otp\":t}}async function gmt(t,{configuration:e,ident:r}){let s=null;if(process.env.GITLAB_CI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.GITHUB_ACTIONS){if(!(process.env.ACTIONS_ID_TOKEN_REQUEST_URL&&process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN))return null;let a=`npm:${new URL(t).host.replace(\"registry.yarnpkg.com\",\"registry.npmjs.org\").replace(\"yarn.npmjs.org\",\"registry.npmjs.org\")}`,n=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);n.searchParams.append(\"audience\",a),s=(await nn.get(n.href,{configuration:e,jsonResponse:!0,headers:{Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).value}if(!s)return null;try{return(await nn.post(`${t}/-/npm/v1/oidc/token/exchange/package${WD(r)}`,null,{configuration:e,jsonResponse:!0,headers:{Authorization:`Bearer ${s}`}})).token||null}catch{}return null}var VD=class{supports(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s,params:a}=G.parseRange(e.reference);return!(!$Be.default.valid(s)||a===null||typeof a.__archiveUrl!=\"string\")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=G.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!=\"string\")throw new Error(\"Assertion failed: The archiveUrl querystring parameter should have been available\");let a=await Wm(s.__archiveUrl,{customErrorMessage:qm,configuration:r.project.configuration,ident:e});return await ps.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();var JD=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!G.tryParseDescriptor(e.range.slice(oi.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error(\"Unreachable\")}};Ge();Ge();var eve=ut(Ai());var oh=class t{supports(e,r){if(!e.reference.startsWith(oi))return!1;let s=new URL(e.reference);return!(!eve.default.valid(s.pathname)||s.searchParams.has(\"__archiveUrl\"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Wm(t.getLocatorUrl(e),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}catch{s=await Wm(t.getLocatorUrl(e).replace(/%2f/g,\"/\"),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=Pw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\\/\\/(?:[^/]+\\.)?npmjs.org(?:$|\\/))/,\"https:$1\"),a=a.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r=r.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r===a+n||r===a+n.replace(/%2f/g,\"/\")}static getLocatorUrl(e){let r=Fr.clean(e.reference.slice(oi.length));if(r===null)throw new jt(10,\"The npm semver resolver got selected, but the version isn't semver\");return`${WD(e)}/-/${e.name}-${r}.tgz`}};Ge();Ge();Ge();var UY=ut(Ai());var fN=G.makeIdent(null,\"node-gyp\"),dmt=/\\b(node-gyp|prebuild-install)\\b/,KD=class{supportsDescriptor(e,r){return e.range.startsWith(oi)?!!Fr.validRange(e.range.slice(oi.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s}=G.parseRange(e.reference);return!!UY.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Fr.validRange(e.range.slice(oi.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);let n=await Qw(e,{cache:s.fetchOptions?.cache,project:s.project,version:UY.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Fr.SemVer(h);if(a.test(E))return xw({configuration:s.project.configuration,ident:e,version:h,publishTimes:n.time})?E:je.mapAndFilter.skip}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=G.makeLocator(e,`${oi}${h.raw}`),C=n.versions[h.raw].dist.tarball;return oh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?E:G.bindLocator(E,{__archiveUrl:C})})}async getSatisfying(e,r,s,a){let n=Fr.validRange(e.range.slice(oi.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);return{locators:je.mapAndFilter(s,p=>{if(p.identHash!==e.identHash)return je.mapAndFilter.skip;let h=G.tryParseRange(p.reference,{requireProtocol:oi});if(!h)return je.mapAndFilter.skip;let E=new Fr.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:je.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:s}=G.parseRange(e.reference),a=Fr.clean(s);if(a===null)throw new jt(10,\"The npm semver resolver got selected, but the version isn't semver\");let n=await Qw(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,\"versions\"))throw new jt(15,'Registry returned invalid data for - missing \"versions\" field');if(!Object.hasOwn(n.versions,a))throw new jt(16,`Registry failed to return reference \"${a}\"`);let c=new Ut;if(c.load(n.versions[a]),!c.dependencies.has(fN.identHash)&&!c.peerDependencies.has(fN.identHash)){for(let f of c.scripts.values())if(f.match(dmt)){c.dependencies.set(fN.identHash,G.makeDescriptor(fN,\"latest\"));break}}return{...e,version:a,languageName:\"node\",linkType:\"HARD\",conditions:c.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(c.dependencies),peerDependencies:c.peerDependencies,dependenciesMeta:c.dependenciesMeta,peerDependenciesMeta:c.peerDependenciesMeta,bin:c.bin}}};Ge();Ge();var AN=ut(Ai());var zD=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!Mp.test(e.range.slice(oi.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(oi.length),n=await Qw(e,{cache:s.fetchOptions?.cache,project:s.project});if(!Object.hasOwn(n,\"dist-tags\"))throw new jt(15,'Registry returned invalid data - missing \"dist-tags\" field');let c=n[\"dist-tags\"];if(!Object.hasOwn(c,a))throw new jt(16,`Registry failed to return tag \"${a}\"`);let f=Object.keys(n.versions),p=n.time,h=c[a];if(a===\"latest\"&&!xw({configuration:s.project.configuration,ident:e,version:h,publishTimes:p})){let S=h.includes(\"-\"),P=AN.default.rsort(f).find(I=>AN.default.lt(I,h)&&(S||!I.includes(\"-\"))&&xw({configuration:s.project.configuration,ident:e,version:I,publishTimes:p}));if(!P)throw new jt(16,`The version for tag \"${a}\" is quarantined, and no lower version is available`);h=P}let E=G.makeLocator(e,`${oi}${h}`),C=n.versions[h].dist.tarball;return oh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?[E]:[G.bindLocator(E,{__archiveUrl:C})]}async getSatisfying(e,r,s,a){let n=[];for(let c of s){if(c.identHash!==e.identHash)continue;let f=G.tryParseRange(c.reference,{requireProtocol:oi});if(!(!f||!AN.default.valid(f.selector))){if(f.params?.__archiveUrl){let p=G.makeRange({protocol:oi,selector:f.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(G.makeDescriptor(e,p),r,a);if(c.reference!==h.reference)continue}n.push(c)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error(\"Unreachable\")}};var v1={};Vt(v1,{getGitHead:()=>abt,getPublishAccess:()=>qxe,getReadmeContent:()=>Wxe,makePublishBody:()=>obt});Ge();Ge();Dt();var bV={};Vt(bV,{PackCommand:()=>jw,default:()=>KEt,packUtils:()=>yA});Ge();Ge();Ge();Dt();Yt();var yA={};Vt(yA,{genPackList:()=>NN,genPackStream:()=>DV,genPackageManifest:()=>QSe,hasPackScripts:()=>vV,prepareForPack:()=>SV});Ge();Dt();var BV=ut(Go()),xSe=ut(SSe()),kSe=Ie(\"zlib\"),MEt=[\"/package.json\",\"/readme\",\"/readme.*\",\"/license\",\"/license.*\",\"/licence\",\"/licence.*\",\"/changelog\",\"/changelog.*\"],UEt=[\"/package.tgz\",\".github\",\".git\",\".hg\",\"node_modules\",\".npmignore\",\".gitignore\",\".#*\",\".DS_Store\"];async function vV(t){return!!(In.hasWorkspaceScript(t,\"prepack\")||In.hasWorkspaceScript(t,\"postpack\"))}async function SV(t,{report:e},r){await In.maybeExecuteWorkspaceLifecycleScript(t,\"prepack\",{report:e});try{let s=J.join(t.cwd,Ut.fileName);await ce.existsPromise(s)&&await t.manifest.loadFile(s,{baseFs:ce}),await r()}finally{await In.maybeExecuteWorkspaceLifecycleScript(t,\"postpack\",{report:e})}}async function DV(t,e){typeof e>\"u\"&&(e=await NN(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(J.normalize(n));for(let n of t.manifest.bin.values())r.add(J.normalize(n));let s=xSe.default.pack();process.nextTick(async()=>{for(let n of e){let c=J.normalize(n),f=J.resolve(t.cwd,c),p=J.join(\"package\",c),h=await ce.lstatPromise(f),E={name:p,mtime:new Date(fi.SAFE_TIME*1e3)},C=r.has(c)?493:420,S,P,I=new Promise((N,U)=>{S=N,P=U}),R=N=>{N?P(N):S()};if(h.isFile()){let N;c===\"package.json\"?N=Buffer.from(JSON.stringify(await QSe(t),null,2)):N=await ce.readFilePromise(f),s.entry({...E,mode:C,type:\"file\"},N,R)}else h.isSymbolicLink()?s.entry({...E,mode:C,type:\"symlink\",linkname:await ce.readlinkPromise(f)},R):R(new Error(`Unsupported file type ${h.mode} for ${fe.fromPortablePath(c)}`));await I}s.finalize()});let a=(0,kSe.createGzip)();return s.pipe(a),a}async function QSe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function NN(t){let e=t.project,r=e.configuration,s={accept:[],reject:[]};for(let C of UEt)s.reject.push(C);for(let C of MEt)s.accept.push(C);s.reject.push(r.get(\"rcFilename\"));let a=C=>{if(C===null||!C.startsWith(`${t.cwd}/`))return;let S=J.relative(t.cwd,C),P=J.resolve(vt.root,S);s.reject.push(P)};a(J.resolve(e.cwd,Er.lockfile)),a(r.get(\"cacheFolder\")),a(r.get(\"globalFolder\")),a(r.get(\"installStatePath\")),a(r.get(\"virtualFolder\")),a(r.get(\"yarnPath\")),await r.triggerHook(C=>C.populateYarnPaths,e,C=>{a(C)});for(let C of e.workspaces){let S=J.relative(t.cwd,C.cwd);S!==\"\"&&!S.match(/^(\\.\\.)?\\//)&&s.reject.push(`/${S}`)}let n={accept:[],reject:[]},c=t.manifest.publishConfig?.main??t.manifest.main,f=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;c!=null&&n.accept.push(J.resolve(vt.root,c)),f!=null&&n.accept.push(J.resolve(vt.root,f)),typeof p==\"string\"&&n.accept.push(J.resolve(vt.root,p));for(let C of h.values())n.accept.push(J.resolve(vt.root,C));if(p instanceof Map)for(let[C,S]of p.entries())n.accept.push(J.resolve(vt.root,C)),typeof S==\"string\"&&n.accept.push(J.resolve(vt.root,S));let E=t.manifest.files!==null;if(E){n.reject.push(\"/*\");for(let C of t.manifest.files)TSe(n.accept,C,{cwd:vt.root})}return await _Et(t.cwd,{hasExplicitFileList:E,globalList:s,ignoreList:n})}async function _Et(t,{hasExplicitFileList:e,globalList:r,ignoreList:s}){let a=[],n=new Hf(t),c=[[vt.root,[s]]];for(;c.length>0;){let[f,p]=c.pop(),h=await n.lstatPromise(f);if(!bSe(f,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(f),C=!1,S=!1;if(!e||f!==vt.root)for(let R of E)C=C||R===\".gitignore\",S=S||R===\".npmignore\";let P=S?await DSe(n,f,\".npmignore\"):C?await DSe(n,f,\".gitignore\"):null,I=P!==null?[P].concat(p):p;bSe(f,{globalList:r,ignoreLists:p})&&(I=[...p,{accept:[],reject:[\"**/*\"]}]);for(let R of E)c.push([J.resolve(f,R),I])}else(h.isFile()||h.isSymbolicLink())&&a.push(J.relative(vt.root,f))}return a.sort()}async function DSe(t,e,r){let s={accept:[],reject:[]},a=await t.readFilePromise(J.join(e,r),\"utf8\");for(let n of a.split(/\\n/g))TSe(s.reject,n,{cwd:e});return s}function HEt(t,{cwd:e}){let r=t[0]===\"!\";return r&&(t=t.slice(1)),t.match(/\\.{0,1}\\//)&&(t=J.resolve(e,t)),r&&(t=`!${t}`),t}function TSe(t,e,{cwd:r}){let s=e.trim();s===\"\"||s[0]===\"#\"||t.push(HEt(s,{cwd:r}))}function bSe(t,{globalList:e,ignoreLists:r}){let s=FN(t,e.accept);if(s!==0)return s===2;let a=FN(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let c=FN(t,n.accept);if(c!==0)return c===2;let f=FN(t,n.reject);if(f!==0)return f===1}return!1}function FN(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a][0]!==\"!\"?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a].slice(1)));return PSe(t,s)?2:PSe(t,r)?1:0}function PSe(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a].includes(\"/\")?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a]));return!!(BV.default.isMatch(t,r,{dot:!0,nocase:!0})||BV.default.isMatch(t,s,{dot:!0,basename:!0,nocase:!0}))}var jw=class extends ft{constructor(){super(...arguments);this.installIfNeeded=ge.Boolean(\"--install-if-needed\",!1,{description:\"Run a preliminary `yarn install` if the package contains build scripts\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the file paths without actually generating the package archive\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.out=ge.String(\"-o,--out\",{description:\"Create the archive at the specified path\"});this.filename=ge.String(\"--filename\",{hidden:!0})}static{this.paths=[[\"pack\"]]}static{this.usage=ot.Usage({description:\"generate a tarball from the active workspace\",details:\"\\n      This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\\n\\n      If the `-o,--out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\\n    \",examples:[[\"Create an archive from the active workspace\",\"yarn pack\"],[\"List the files that would be made part of the workspace's archive\",\"yarn pack --dry-run\"],[\"Name and output the archive in a dedicated folder\",\"yarn pack --out /artifacts/%s-%v.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await vV(a)&&(this.installIfNeeded?await s.install({cache:await Kr.find(r),report:new ki}):await s.restoreInstallState());let n=this.out??this.filename,c=typeof n<\"u\"?J.resolve(this.context.cwd,jEt(n,{workspace:a})):J.resolve(a.cwd,\"package.tgz\");return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await SV(a,{report:p},async()=>{p.reportJson({base:fe.fromPortablePath(a.cwd)});let h=await NN(a);for(let E of h)p.reportInfo(null,fe.fromPortablePath(E)),p.reportJson({location:fe.fromPortablePath(E)});if(!this.dryRun){let E=await DV(a,h);await ce.mkdirPromise(J.dirname(c),{recursive:!0});let C=ce.createWriteStream(c);E.pipe(C),await new Promise(S=>{C.on(\"finish\",S)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${he.pretty(r,c,he.Type.PATH)}`),p.reportJson({output:fe.fromPortablePath(c)}))})).exitCode()}};function jEt(t,{workspace:e}){let r=t.replace(\"%s\",GEt(e)).replace(\"%v\",qEt(e));return fe.toPortablePath(r)}function GEt(t){return t.manifest.name!==null?G.slugifyIdent(t.manifest.name):\"package\"}function qEt(t){return t.manifest.version!==null?t.manifest.version:\"unknown\"}var WEt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],YEt=\"workspace:\",VEt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of WEt)for(let a of t.manifest.getForScope(s).values()){let n=r.tryWorkspaceByDescriptor(a),c=G.parseRange(a.range);if(c.protocol===YEt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new jt(21,`${G.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let f;G.areDescriptorsEqual(a,n.anchoredDescriptor)||c.selector===\"*\"?f=n.manifest.version??\"0.0.0\":c.selector===\"~\"||c.selector===\"^\"?f=`${c.selector}${n.manifest.version??\"0.0.0\"}`:f=c.selector;let p=s===\"dependencies\"?G.makeDescriptor(a,\"unknown\"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?\"optionalDependencies\":s;e[h][G.stringifyIdent(a)]=f}}},JEt={hooks:{beforeWorkspacePacking:VEt},commands:[jw]},KEt=JEt;var Gxe=ut(HSe());Ge();var Hxe=ut(_xe()),{env:Bt}=process,XDt=\"application/vnd.in-toto+json\",ZDt=\"https://in-toto.io/Statement/v0.1\",$Dt=\"https://in-toto.io/Statement/v1\",ebt=\"https://slsa.dev/provenance/v0.2\",tbt=\"https://slsa.dev/provenance/v1\",rbt=\"https://github.com/actions/runner\",nbt=\"https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1\",ibt=\"https://github.com/npm/cli/gitlab\",sbt=\"v0alpha1\",jxe=async(t,e)=>{let r;if(Bt.GITHUB_ACTIONS){if(!Bt.ACTIONS_ID_TOKEN_REQUEST_URL)throw new jt(91,'Provenance generation in GitHub Actions requires \"write\" access to the \"id-token\" permission');let s=(Bt.GITHUB_WORKFLOW_REF||\"\").replace(`${Bt.GITHUB_REPOSITORY}/`,\"\"),a=s.indexOf(\"@\"),n=s.slice(0,a),c=s.slice(a+1);r={_type:$Dt,subject:t,predicateType:tbt,predicate:{buildDefinition:{buildType:nbt,externalParameters:{workflow:{ref:c,repository:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}`,path:n}},internalParameters:{github:{event_name:Bt.GITHUB_EVENT_NAME,repository_id:Bt.GITHUB_REPOSITORY_ID,repository_owner_id:Bt.GITHUB_REPOSITORY_OWNER_ID}},resolvedDependencies:[{uri:`git+${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}@${Bt.GITHUB_REF}`,digest:{gitCommit:Bt.GITHUB_SHA}}]},runDetails:{builder:{id:`${rbt}/${Bt.RUNNER_ENVIRONMENT}`},metadata:{invocationId:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}/actions/runs/${Bt.GITHUB_RUN_ID}/attempts/${Bt.GITHUB_RUN_ATTEMPT}`}}}}}else if(Bt.GITLAB_CI){if(!Bt.SIGSTORE_ID_TOKEN)throw new jt(91,`Provenance generation in GitLab CI requires \"SIGSTORE_ID_TOKEN\" with \"sigstore\" audience to be present in \"id_tokens\". For more info see:\nhttps://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:ZDt,subject:t,predicateType:ebt,predicate:{buildType:`${ibt}/${sbt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new jt(91,\"Provenance generation is only supported in GitHub Actions and GitLab CI\");return Hxe.attest(Buffer.from(JSON.stringify(r)),XDt,e)};async function obt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=G.stringifyIdent(f),E=Gxe.default.fromData(e,{algorithms:[\"sha1\",\"sha512\"]}),C=r??qxe(t,f),S=await Wxe(t),P=await yA.genPackageManifest(t),I=`${h}-${p}.tgz`,R=new URL(`${Jc(a)}/${h}/-/${I}`),N={[I]:{content_type:\"application/octet-stream\",data:e.toString(\"base64\"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,\"%40\")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await jxe([U]),ee=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:ee,length:ee.length}}return{_id:h,_attachments:N,name:h,access:C,\"dist-tags\":{[s]:p},versions:{[p]:{...P,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:R.toString()}}},readme:S}}async function abt(t){try{let{stdout:e}=await qr.execvp(\"git\",[\"rev-parse\",\"--revs-only\",\"HEAD\"],{cwd:t});return e.trim()===\"\"?void 0:e.trim()}catch{return}}function qxe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access==\"string\"?t.manifest.publishConfig.access:r.get(\"npmPublishAccess\")!==null?r.get(\"npmPublishAccess\"):e.scope?\"restricted\":\"public\"}async function Wxe(t){let e=fe.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${G.stringifyIdent(r)}\n`;try{a=await ce.readFilePromise(e,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return a;throw n}return a}var RK={npmAlwaysAuth:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"BOOLEAN\",default:!1},npmAuthIdent:{description:\"Authentication identity for the npm registry (_auth in npm and yarn v1)\",type:\"SECRET\",default:null},npmAuthToken:{description:\"Authentication token for the npm registry (_authToken in npm and yarn v1)\",type:\"SECRET\",default:null}},Yxe={npmAuditRegistry:{description:\"Registry to query for audit reports\",type:\"STRING\",default:null},npmPublishRegistry:{description:\"Registry to push packages to\",type:\"STRING\",default:null},npmRegistryServer:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"STRING\",default:\"https://registry.yarnpkg.com\"}},lbt={npmMinimalAgeGate:{description:\"Minimum age of a package version according to the publish date on the npm registry to be considered for installation\",type:\"DURATION\",unit:\"m\",default:\"0m\"},npmPreapprovedPackages:{description:\"Array of package descriptors or package name glob patterns to exclude from the minimum release age check\",type:\"STRING\",isArray:!0,default:[]}},cbt={configuration:{...RK,...Yxe,...lbt,npmScopes:{description:\"Settings per package scope\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...RK,...Yxe}}},npmRegistries:{description:\"Settings per registry\",type:\"MAP\",normalizeKeys:Jc,valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...RK}}}},fetchers:[VD,oh],resolvers:[JD,KD,zD]},ubt=cbt;var qK={};Vt(qK,{NpmAuditCommand:()=>D1,NpmInfoCommand:()=>b1,NpmLoginCommand:()=>P1,NpmLogoutCommand:()=>k1,NpmPublishCommand:()=>Q1,NpmTagAddCommand:()=>R1,NpmTagListCommand:()=>T1,NpmTagRemoveCommand:()=>F1,NpmWhoamiCommand:()=>N1,default:()=>wbt,npmAuditTypes:()=>zb,npmAuditUtils:()=>kL});Ge();Ge();Yt();var UK=ut(Go());Ul();var zb={};Vt(zb,{Environment:()=>Jb,Severity:()=>Kb});var Jb=(s=>(s.All=\"all\",s.Production=\"production\",s.Development=\"development\",s))(Jb||{}),Kb=(n=>(n.Info=\"info\",n.Low=\"low\",n.Moderate=\"moderate\",n.High=\"high\",n.Critical=\"critical\",n))(Kb||{});var kL={};Vt(kL,{allSeverities:()=>S1,getPackages:()=>MK,getReportTree:()=>OK,getSeverityInclusions:()=>NK,getTopLevelDependencies:()=>LK});Ge();var Vxe=ut(Ai());var S1=[\"info\",\"low\",\"moderate\",\"high\",\"critical\"];function NK(t){if(typeof t>\"u\")return new Set(S1);let e=S1.indexOf(t),r=S1.slice(e);return new Set(r)}function OK(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,G.parseIdent(s)),children:{ID:typeof n.id<\"u\"&&{label:\"ID\",value:he.tuple(he.Type.ID,n.id)},Issue:{label:\"Issue\",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<\"u\"&&{label:\"URL\",value:he.tuple(he.Type.URL,n.url)},Severity:{label:\"Severity\",value:he.tuple(he.Type.NO_HINT,n.severity)},\"Vulnerable Versions\":{label:\"Vulnerable Versions\",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},\"Tree Versions\":{label:\"Tree Versions\",children:[...n.versions].sort(Vxe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:\"Dependents\",children:je.sortMap(n.dependents,c=>G.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function LK(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=[\"all\",\"production\"].includes(s),f=[\"all\",\"development\"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function MK(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");if(G.ensureDevirtualizedLocator(E).reference.startsWith(\"npm:\")&&E.version!==null){let S=G.stringifyIdent(E),P=je.getMapWithDefault(s,S);je.getArrayWithDefault(P,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var D1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Audit dependencies from all workspaces\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Audit transitive dependencies as well\"});this.environment=ge.String(\"--environment\",\"all\",{description:\"Which environments to cover\",validator:fo(Jb)});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.noDeprecations=ge.Boolean(\"--no-deprecations\",!1,{description:\"Don't warn about deprecated packages\"});this.severity=ge.String(\"--severity\",\"info\",{description:\"Minimal severity requested for packages to be displayed\",validator:fo(Kb)});this.excludes=ge.Array(\"--exclude\",[],{description:\"Array of glob patterns of packages to exclude from audit\"});this.ignores=ge.Array(\"--ignore\",[],{description:\"Array of glob patterns of advisory ID's to ignore in the audit report\"})}static{this.paths=[[\"npm\",\"audit\"]]}static{this.usage=ot.Usage({description:\"perform a vulnerability audit against the installed packages\",details:`\n      This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n      For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \\`-A,--all\\`. To extend this search to both direct and transitive dependencies, use \\`-R,--recursive\\`.\n\n      Applying the \\`--severity\\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${S1.map(r=>`\\`${r}\\``).join(\", \")}.\n\n      If the \\`--json\\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n      If certain packages produce false positives for a particular environment, the \\`--exclude\\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \\`npmAuditExcludePackages\\` option.\n\n      If particular advisories are needed to be ignored, the \\`--ignore\\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \\`npmAuditIgnoreAdvisories\\` option.\n\n      To understand the dependency tree requiring vulnerable packages, check the raw report with the \\`--json\\` flag or use \\`yarn why package\\` to get more information as to who depends on them.\n    `,examples:[[\"Checks for known security issues with the installed packages. The output is a list of known issues.\",\"yarn npm audit\"],[\"Audit dependencies in all workspaces\",\"yarn npm audit --all\"],[\"Limit auditing to `dependencies` (excludes `devDependencies`)\",\"yarn npm audit --environment production\"],[\"Show audit report as valid JSON\",\"yarn npm audit --json\"],[\"Audit all direct and transitive dependencies\",\"yarn npm audit --recursive\"],[\"Output moderate (or more severe) vulnerabilities\",\"yarn npm audit --severity moderate\"],[\"Exclude certain packages\",\"yarn npm audit --exclude package1 --exclude package2\"],[\"Ignore specific advisories\",\"yarn npm audit --ignore 1234567 --ignore 7654321\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=LK(s,a,{all:this.all,environment:this.environment}),c=MK(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get(\"npmAuditExcludePackages\"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>UK.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=hi.getAuditRegistry({configuration:r}),E,C=await lA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=en.post(\"/-/npm/v1/security/advisories/bulk\",p,{authType:en.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([ee,ie])=>{let ue=await en.getPackageMetadata(G.parseIdent(ee),{project:s});return je.mapAndFilter(ie,le=>{let{deprecated:me}=ue.versions[le];return me?[ee,le,me]:je.mapAndFilter.skip})})),W=await N;for(let[ee,ie,ue]of U.flat(1))Object.hasOwn(W,ee)&&W[ee].some(le=>Fr.satisfiesWithPrereleases(ie,le.vulnerable_versions))||(W[ee]??=[],W[ee].push({id:`${ee} (deprecation)`,title:(typeof ue==\"string\"?ue:\"\").trim()||\"This package has been deprecated.\",severity:\"moderate\",vulnerable_versions:ie}));E=W});if(C.hasErrors())return C.exitCode();let S=NK(this.severity),P=Array.from(new Set([...r.get(\"npmAuditIgnoreAdvisories\"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(ee=>!UK.default.isMatch(`${ee.id}`,P)&&S.has(ee.severity));W.length>0&&(I[N]=W.map(ee=>{let ie=c.get(N);if(typeof ie>\"u\")throw new Error(\"Assertion failed: Expected the registry to only return packages that were requested\");let ue=[...ie.keys()].filter(me=>Fr.satisfiesWithPrereleases(me,ee.vulnerable_versions)),le=new Map;for(let me of ue)for(let pe of ie.get(me))le.set(pe.locatorHash,pe);return{...ee,versions:ue,dependents:[...le.values()]}}))}let R=Object.keys(I).length>0;return R?(xs.emitTree(OK(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,\"No audit suggestions\")}),R?1:0)}};Ge();Ge();Dt();Yt();var _K=ut(Ai()),HK=Ie(\"util\"),b1=class extends ft{constructor(){super(...arguments);this.fields=ge.String(\"-f,--fields\",{description:\"A comma-separated list of manifest fields that should be displayed\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.packages=ge.Rest()}static{this.paths=[[\"npm\",\"info\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"show information about a package\",details:\"\\n      This command fetches information about a package from the npm registry and prints it in a tree format.\\n\\n      The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\\n\\n      Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\\n\\n      If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\\n\\n      By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\\n    \",examples:[[\"Show all available information about react (except the `dist`, `readme`, and `users` fields)\",\"yarn npm info react\"],[\"Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)\",\"yarn npm info react --json\"],[\"Show all available information about react@16.12.0\",\"yarn npm info react@16.12.0\"],[\"Show all available information about react@next\",\"yarn npm info react@next\"],[\"Show the description of react\",\"yarn npm info react --fields description\"],[\"Show all available versions of react\",\"yarn npm info react --fields versions\"],[\"Show the readme of react\",\"yarn npm info react --fields readme\"],[\"Show a few fields of react\",\"yarn npm info react --fields homepage,repository\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.fields<\"u\"?new Set([\"name\",...this.fields.split(/\\s*,\\s*/)]):null,n=[],c=!1,f=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h===\".\"){let ie=s.topLevelWorkspace;if(!ie.manifest.name)throw new nt(`Missing ${he.pretty(r,\"name\",he.Type.CODE)} field in ${fe.fromPortablePath(J.join(ie.cwd,Er.manifest))}`);E=G.makeDescriptor(ie.manifest.name,\"unknown\")}else E=G.parseDescriptor(h);let C=en.getIdentUrl(E),S=jK(await en.get(C,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:en.customPackageError})),P=Object.keys(S.versions).sort(_K.default.compareLoose),R=S[\"dist-tags\"].latest||P[P.length-1],N=Fr.validRange(E.range);if(N){let ie=_K.default.maxSatisfying(P,N);ie!==null?R=ie:(p.reportWarning(0,`Unmet range ${G.prettyRange(r,E.range)}; falling back to the latest version`),c=!0)}else Object.hasOwn(S[\"dist-tags\"],E.range)?R=S[\"dist-tags\"][E.range]:E.range!==\"unknown\"&&(p.reportWarning(0,`Unknown tag ${G.prettyRange(r,E.range)}; falling back to the latest version`),c=!0);let U=S.versions[R],W={...S,...U,version:R,versions:P},ee;if(a!==null){ee={};for(let ie of a){let ue=W[ie];if(typeof ue<\"u\")ee[ie]=ue;else{p.reportWarning(1,`The ${he.pretty(r,ie,he.Type.CODE)} field doesn't exist inside ${G.prettyIdent(r,E)}'s information`),c=!0;continue}}}else this.json||(delete W.dist,delete W.readme,delete W.users),ee=W;p.reportJson(ee),this.json||n.push(ee)}});HK.inspect.styles.name=\"cyan\";for(let p of n)(p!==n[0]||c)&&this.context.stdout.write(`\n`),this.context.stdout.write(`${(0,HK.inspect)(p,{depth:1/0,colors:!0,compact:!1})}\n`);return f.exitCode()}};function jK(t){if(Array.isArray(t)){let e=[];for(let r of t)r=jK(r),r&&e.push(r);return e}else if(typeof t==\"object\"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith(\"_\"))continue;let s=jK(t[r]);s&&(e[r]=s)}return e}else return t||null}Ge();Ge();Yt();var GK=ut(Vv()),P1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Login to the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Login to the publish registry\"});this.alwaysAuth=ge.Boolean(\"--always-auth\",{description:\"Set the npmAlwaysAuth configuration\"});this.webLogin=ge.Boolean(\"--web-login\",{description:\"Enable web login\"})}static{this.paths=[[\"npm\",\"login\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"store new login info to access the npm registry\",details:\"\\n      This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\\n\\n      Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n    \",examples:[[\"Login to the default registry\",\"yarn npm login\"],[\"Login to the registry linked to the @my-scope registry\",\"yarn npm login --scope my-scope\"],[\"Login to the publish registry for the current package\",\"yarn npm login --publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await gbt({registry:s,configuration:r,report:n,webLogin:this.webLogin,stdin:this.context.stdin,stdout:this.context.stdout});return await mbt(s,c,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,\"Successfully logged in\")})).exitCode()}};async function QL({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?hi.getScopeRegistry(t,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):t?hi.getScopeRegistry(t,{configuration:r}):e?hi.getPublishRegistry((await eC(r,s)).manifest,{configuration:r}):hi.getDefaultRegistry({configuration:r})}async function fbt(t,e){let r;try{r=await en.post(\"/-/v1/login\",null,{configuration:e,registry:t,authType:en.AuthType.NO_AUTH,jsonResponse:!0,headers:{\"npm-auth-type\":\"web\"}})}catch{return null}return r}async function Abt(t,e){let r=await nn.request(t,null,{configuration:e,jsonResponse:!0});if(r.statusCode===202){let s=r.headers[\"retry-after\"]??\"1\";return{type:\"waiting\",sleep:parseInt(s,10)}}return r.statusCode===200?{type:\"success\",token:r.body.token}:null}async function pbt({registry:t,configuration:e,report:r}){let s=await fbt(t,e);if(!s)return null;if(Ui.openUrl){r.reportInfo(0,\"Starting the web login process...\"),r.reportSeparator();let{openNow:a}=await(0,GK.prompt)({type:\"confirm\",name:\"openNow\",message:\"Do you want to try to open your browser now?\",required:!0,initial:!0,onCancel:()=>process.exit(130)});r.reportSeparator(),(!a||!await Ui.openUrl(s.loginUrl))&&(r.reportWarning(0,\"We failed to automatically open the url; you'll have to open it yourself in your browser of choice:\"),r.reportWarning(0,he.pretty(e,s.loginUrl,he.Type.URL)),r.reportSeparator())}for(;;){let a=await Abt(s.doneUrl,e);if(a===null)return null;if(a.type===\"waiting\")await new Promise(n=>setTimeout(n,a.sleep*1e3));else return a.token}}var hbt=[\"https://registry.yarnpkg.com\",\"https://registry.npmjs.org\"];async function gbt(t){if(t.webLogin??hbt.includes(t.registry)){let e=await pbt(t);if(e!==null)return e}return await dbt(t)}async function dbt({registry:t,configuration:e,report:r,stdin:s,stdout:a}){let n=await ybt({configuration:e,registry:t,report:r,stdin:s,stdout:a}),c=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,f={_id:`org.couchdb.user:${n.name}`,name:n.name,password:n.password,type:\"user\",roles:[],date:new Date().toISOString()},p={attemptedAs:n.name,configuration:e,registry:t,jsonResponse:!0,authType:en.AuthType.NO_AUTH};try{return(await en.put(c,f,p)).token}catch(P){if(!(P.originalError?.name===\"HTTPError\"&&P.originalError?.response.statusCode===409))throw P}let h={...p,authType:en.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${n.name}:${n.password}`).toString(\"base64\")}`}},E=await en.get(c,h);for(let[P,I]of Object.entries(E))(!f[P]||P===\"roles\")&&(f[P]=I);let C=`${c}/-rev/${f._rev}`;return(await en.put(C,f,h)).token}async function mbt(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function ybt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\\/\\/npm\\.pkg\\.github\\.com(\\/|$)/)&&(r.reportInfo(0,\"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions.\"),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||\"\",password:t.env.YARN_INJECT_NPM_PASSWORD||\"\"};let c=await(0,GK.prompt)([{type:\"input\",name:\"name\",message:\"Username:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:\"password\",name:\"password\",message:n?\"Token:\":\"Password:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ge();Ge();Yt();var x1=new Set([\"npmAuthIdent\",\"npmAuthToken\"]),k1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Logout of the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Logout of the publish registry\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Logout of all registries\"})}static{this.paths=[[\"npm\",\"logout\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"logout of the npm registry\",details:\"\\n      This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\\n\\n      Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n\\n      Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\\n    \",examples:[[\"Logout of the default registry\",\"yarn npm logout\"],[\"Logout of the @my-scope scope\",\"yarn npm logout --scope my-scope\"],[\"Logout of the publish registry for the current package\",\"yarn npm logout --publish\"],[\"Logout of all registries\",\"yarn npm logout --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=async()=>{let n=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),c=await ze.find(this.context.cwd,this.context.plugins),f=G.makeIdent(this.scope??null,\"pkg\");return!hi.getAuthConfiguration(n,{configuration:c,ident:f}).get(\"npmAuthToken\")};return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await Ibt(),n.reportInfo(0,\"Successfully logged out from everything\")),this.scope){await Jxe(\"npmScopes\",this.scope),await s()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,\"Scope authentication settings removed, but some other ones settings still apply to it\");return}let c=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish});await Jxe(\"npmRegistries\",c),await s()?n.reportInfo(0,`Successfully logged out from ${c}`):n.reportWarning(0,\"Registry authentication settings removed, but some other ones settings still apply to it\")})).exitCode()}};function Ebt(t,e){let r=t[e];if(!je.isIndexableObject(r))return!1;let s=new Set(Object.keys(r));if([...x1].every(n=>!s.has(n)))return!1;for(let n of x1)s.delete(n);if(s.size===0)return t[e]=void 0,!0;let a={...r};for(let n of x1)delete a[n];return t[e]=a,!0}async function Ibt(){let t=e=>{let r=!1,s=je.isIndexableObject(e)?{...e}:{};s.npmAuthToken&&(delete s.npmAuthToken,r=!0);for(let a of Object.keys(s))Ebt(s,a)&&(r=!0);if(Object.keys(s).length!==0)return r?s:e};return await ze.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function Jxe(t,e){return await ze.updateHomeConfiguration({[t]:r=>{let s=je.isIndexableObject(r)?r:{};if(!Object.hasOwn(s,e))return r;let a=s[e],n=je.isIndexableObject(a)?a:{},c=new Set(Object.keys(n));if([...x1].every(p=>!c.has(p)))return r;for(let p of x1)c.delete(p);if(c.size===0)return Object.keys(s).length===1?void 0:{...s,[e]:void 0};let f={};for(let p of x1)f[p]=void 0;return{...s,[e]:{...n,...f}}}})}Ge();Dt();Yt();var Q1=class extends ft{constructor(){super(...arguments);this.access=ge.String(\"--access\",{description:\"The access for the published package (public or restricted)\"});this.tag=ge.String(\"--tag\",\"latest\",{description:\"The tag on the registry that the package should be attached to\"});this.tolerateRepublish=ge.Boolean(\"--tolerate-republish\",!1,{description:\"Warn and exit when republishing an already existing version of a package\"});this.otp=ge.String(\"--otp\",{description:\"The OTP token to use with the command\"});this.provenance=ge.Boolean(\"--provenance\",!1,{description:\"Generate provenance for the package. Only available in GitHub Actions and GitLab CI. Can be set globally through the `npmPublishProvenance` setting or the `YARN_NPM_CONFIG_PROVENANCE` environment variable, or per-package through the `publishConfig.provenance` field in package.json.\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Show what would be published without actually publishing\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Output the result in JSON format\"})}static{this.paths=[[\"npm\",\"publish\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"publish the active workspace to the npm registry\",details:'\\n      This command will pack the active workspace into a fresh archive and upload it to the npm registry.\\n\\n      The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\\n\\n      Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka \"private packages\"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\\n    ',examples:[[\"Publish the active workspace\",\"yarn npm publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);if(a.manifest.private)throw new nt(\"Private workspaces cannot be published\");if(a.manifest.name===null||a.manifest.version===null)throw new nt(\"Workspaces must have valid names and versions to be published on an external registry\");await s.restoreInstallState();let n=a.manifest.name,c=a.manifest.version,f=hi.getPublishRegistry(a.manifest,{configuration:r});return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async h=>{if(this.tolerateRepublish)try{let E=await en.get(en.getIdentUrl(n),{configuration:r,registry:f,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,\"versions\"))throw new jt(15,'Registry returned invalid data for - missing \"versions\" field');if(Object.hasOwn(E.versions,c)){let C=`Registry already knows about version ${c}; skipping.`;h.reportWarning(0,C),h.reportJson({name:G.stringifyIdent(n),version:c,registry:f,warning:C,skipped:!0});return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await In.maybeExecuteWorkspaceLifecycleScript(a,\"prepublish\",{report:h}),await yA.prepareForPack(a,{report:h},async()=>{let E=await yA.genPackList(a);for(let W of E)h.reportInfo(null,fe.fromPortablePath(W)),h.reportJson({file:fe.fromPortablePath(W)});let C=await yA.genPackStream(a,E),S=await je.bufferStream(C),P=await v1.getGitHead(a.cwd),I=!1,R=\"\";a.manifest.publishConfig&&\"provenance\"in a.manifest.publishConfig?(I=!!a.manifest.publishConfig.provenance,R=I?\"Generating provenance statement because `publishConfig.provenance` field is set.\":\"Skipping provenance statement because `publishConfig.provenance` field is set to false.\"):this.provenance?(I=!0,R=\"Generating provenance statement because `--provenance` flag is set.\"):r.get(\"npmPublishProvenance\")&&(I=!0,R=\"Generating provenance statement because `npmPublishProvenance` setting is set.\"),R&&(h.reportInfo(null,R),h.reportJson({type:\"provenance\",enabled:I,provenanceMessage:R}));let N=await v1.makePublishBody(a,S,{access:this.access,tag:this.tag,registry:f,gitHead:P,provenance:I});this.dryRun||await en.put(en.getIdentUrl(n),N,{configuration:r,registry:f,ident:n,otp:this.otp,jsonResponse:!0,allowOidc:!!(process.env.CI&&(process.env.GITHUB_ACTIONS||process.env.GITLAB_CI))});let U=this.dryRun?`[DRY RUN] Package would be published to ${f} with tag ${this.tag}`:\"Package archive published\";h.reportInfo(0,U),h.reportJson({name:G.stringifyIdent(n),version:c,registry:f,tag:this.tag||\"latest\",files:E.map(W=>fe.fromPortablePath(W)),access:this.access||null,dryRun:this.dryRun,published:!this.dryRun,message:U,provenance:!!I})})})).exitCode()}};Ge();Yt();var Kxe=ut(Ai());Ge();Dt();Yt();var T1=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String({required:!1})}static{this.paths=[[\"npm\",\"tag\",\"list\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"list all dist-tags of a package\",details:`\n      This command will list all tags of a package from the npm registry.\n\n      If the package is not specified, Yarn will default to the current workspace.\n    `,examples:[[\"List all tags of package `my-pkg`\",\"yarn npm tag list my-pkg\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n;if(typeof this.package<\"u\")n=G.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${fe.fromPortablePath(J.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await Xb(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,E)})}))};return xs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Xb(t,e){let r=`/-/package${en.getIdentUrl(t)}/dist-tags`;return en.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:en.customPackageError})}var R1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"add\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"add a tag for a specific version of a package\",details:`\n      This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n    `,examples:[[\"Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`\",\"yarn npm tag add my-pkg@2.3.4-beta.4 beta\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),c=n.range;if(!Kxe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=hi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let P=await Xb(n,r);Object.hasOwn(P,this.tag)&&P[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ge();Yt();var F1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"remove a tag from a package\",details:`\n      This command will remove a tag from a package from the npm registry.\n    `,examples:[[\"Remove the `beta` tag from package `my-pkg`\",\"yarn npm tag remove my-pkg beta\"]]})}async execute(){if(this.tag===\"latest\")throw new nt(\"The 'latest' tag cannot be removed.\");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseIdent(this.package),c=hi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await Xb(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ge();Ge();Yt();var N1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Print username for the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Print username for the publish registry\"})}static{this.paths=[[\"npm\",\"whoami\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"display the name of the authenticated user\",details:\"\\n      Print the username associated with the current authentication settings to the standard output.\\n\\n      When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\\n\\n      When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\\n    \",examples:[[\"Print username for the default registry\",\"yarn npm whoami\"],[\"Print username for the registry on a given scope\",\"yarn npm whoami --scope company\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=hi.getScopeRegistry(this.scope,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=hi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=hi.getPublishRegistry((await eC(r,this.context.cwd)).manifest,{configuration:r}):s=hi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await en.get(\"/-/whoami\",{configuration:r,registry:s,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,\"\"):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,\"Authentication failed - your credentials may have expired\");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var Cbt={configuration:{npmPublishAccess:{description:\"Default access of the published packages\",type:\"STRING\",default:null},npmPublishProvenance:{description:\"Whether to generate provenance for the published packages\",type:\"BOOLEAN\",default:!1},npmAuditExcludePackages:{description:\"Array of glob patterns of packages to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:\"Array of glob patterns of advisory IDs to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0}},commands:[D1,b1,P1,k1,Q1,R1,T1,F1,N1]},wbt=Cbt;var XK={};Vt(XK,{PatchCommand:()=>H1,PatchCommitCommand:()=>_1,PatchFetcher:()=>rP,PatchResolver:()=>nP,default:()=>_bt,patchUtils:()=>gy});Ge();Ge();Dt();eA();var gy={};Vt(gy,{applyPatchFile:()=>RL,diffFolders:()=>KK,ensureUnpatchedDescriptor:()=>WK,ensureUnpatchedLocator:()=>NL,extractPackageToDisk:()=>JK,extractPatchFlags:()=>rke,isParentRequired:()=>VK,isPatchDescriptor:()=>FL,isPatchLocator:()=>Rg,loadPatchFiles:()=>tP,makeDescriptor:()=>OL,makeLocator:()=>YK,makePatchHash:()=>zK,parseDescriptor:()=>$b,parseLocator:()=>eP,parsePatchFile:()=>Zb,unpatchDescriptor:()=>Lbt,unpatchLocator:()=>Mbt});Ge();Dt();Ge();Dt();var Bbt=/^@@ -(\\d+)(,(\\d+))? \\+(\\d+)(,(\\d+))? @@.*/;function O1(t){return J.relative(vt.root,J.resolve(vt.root,fe.toPortablePath(t)))}function vbt(t){let e=t.trim().match(Bbt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Sbt=420,Dbt=493;var zxe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),bbt=t=>({header:vbt(t),parts:[]}),Pbt={\"@\":\"header\",\"-\":\"deletion\",\"+\":\"insertion\",\" \":\"context\",\"\\\\\":\"pragma\",undefined:\"context\"};function xbt(t){let e=[],r=zxe(),s=\"parsing header\",a=null,n=null;function c(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function f(){c(),e.push(r),r=zxe()}for(let p=0;p<t.length;p++){let h=t[p];if(s===\"parsing header\")if(h.startsWith(\"@@\"))s=\"parsing hunks\",r.hunks=[],p-=1;else if(h.startsWith(\"diff --git \")){r&&r.diffLineFromPath&&f();let E=h.match(/^diff --git a\\/(.*?) b\\/(.*?)\\s*$/);if(!E)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=E[1],r.diffLineToPath=E[2]}else if(h.startsWith(\"old mode \"))r.oldMode=h.slice(9).trim();else if(h.startsWith(\"new mode \"))r.newMode=h.slice(9).trim();else if(h.startsWith(\"deleted file mode \"))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith(\"new file mode \"))r.newFileMode=h.slice(14).trim();else if(h.startsWith(\"rename from \"))r.renameFrom=h.slice(12).trim();else if(h.startsWith(\"rename to \"))r.renameTo=h.slice(10).trim();else if(h.startsWith(\"index \")){let E=h.match(/(\\w+)\\.\\.(\\w+)/);if(!E)continue;r.beforeHash=E[1],r.afterHash=E[2]}else h.startsWith(\"semver exclusivity \")?r.semverExclusivity=h.slice(19).trim():h.startsWith(\"--- \")?r.fromPath=h.slice(6).trim():h.startsWith(\"+++ \")&&(r.toPath=h.slice(6).trim());else{let E=Pbt[h[0]]||null;switch(E){case\"header\":c(),a=bbt(h);break;case null:s=\"parsing header\",f(),p-=1;break;case\"pragma\":{if(!h.startsWith(\"\\\\ No newline at end of file\"))throw new Error(`Unrecognized pragma in patch file: ${h}`);if(!n)throw new Error(\"Bad parser state: No newline at EOF pragma encountered without context\");n.noNewlineAtEndOfFile=!0}break;case\"context\":case\"deletion\":case\"insertion\":{if(!a)throw new Error(\"Bad parser state: Hunk lines encountered before hunk header\");n&&n.type!==E&&(a.parts.push(n),n=null),n||(n={type:E,lines:[],noNewlineAtEndOfFile:!1}),n.lines.push(h.slice(1))}break;default:je.assertNever(E);break}}}f();for(let{hunks:p}of e)if(p)for(let h of p)Qbt(h);return e}function kbt(t){let e=[];for(let r of t){let{semverExclusivity:s,diffLineFromPath:a,diffLineToPath:n,oldMode:c,newMode:f,deletedFileMode:p,newFileMode:h,renameFrom:E,renameTo:C,beforeHash:S,afterHash:P,fromPath:I,toPath:R,hunks:N}=r,U=E?\"rename\":p?\"file deletion\":h?\"file creation\":N&&N.length>0?\"patch\":\"mode change\",W=null;switch(U){case\"rename\":{if(!E||!C)throw new Error(\"Bad parser state: rename from & to not given\");e.push({type:\"rename\",semverExclusivity:s,fromPath:O1(E),toPath:O1(C)}),W=C}break;case\"file deletion\":{let ee=a||I;if(!ee)throw new Error(\"Bad parse state: no path given for file deletion\");e.push({type:\"file deletion\",semverExclusivity:s,hunk:N&&N[0]||null,path:O1(ee),mode:TL(p),hash:S})}break;case\"file creation\":{let ee=n||R;if(!ee)throw new Error(\"Bad parse state: no path given for file creation\");e.push({type:\"file creation\",semverExclusivity:s,hunk:N&&N[0]||null,path:O1(ee),mode:TL(h),hash:P})}break;case\"patch\":case\"mode change\":W=R||n;break;default:je.assertNever(U);break}W&&c&&f&&c!==f&&e.push({type:\"mode change\",semverExclusivity:s,path:O1(W),oldMode:TL(c),newMode:TL(f)}),W&&N&&N.length&&e.push({type:\"patch\",semverExclusivity:s,path:O1(W),hunks:N,beforeHash:S,afterHash:P})}if(e.length===0)throw new Error(\"Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string\");return e}function TL(t){let e=parseInt(t,8)&511;if(e!==Sbt&&e!==Dbt)throw new Error(`Unexpected file mode string: ${t}`);return e}function Zb(t){let e=t.split(/\\n/g);return e[e.length-1]===\"\"&&e.pop(),kbt(xbt(e))}function Qbt(t){let e=0,r=0;for(let{type:s,lines:a}of t.parts)switch(s){case\"context\":r+=a.length,e+=a.length;break;case\"deletion\":e+=a.length;break;case\"insertion\":r+=a.length;break;default:je.assertNever(s);break}if(e!==t.header.original.length||r!==t.header.patched.length){let s=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${s(t.header.original.length)} ${s(t.header.patched.length)} @@, got @@ ${s(e)} ${s(r)} @@)`)}}Ge();Dt();var L1=class extends Error{constructor(r,s){super(`Cannot apply hunk #${r+1}`);this.hunk=s}};async function M1(t,e,r){let s=await t.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await t.lutimesPromise(e,s.atime,s.mtime)}async function RL(t,{baseFs:e=new Yn,dryRun:r=!1,version:s=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&s!==null&&!Fr.satisfiesWithPrereleases(s,a.semverExclusivity)))switch(a.type){case\"file deletion\":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await M1(e,J.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case\"rename\":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await M1(e,J.dirname(a.fromPath),async()=>{await M1(e,J.dirname(a.toPath),async()=>{await M1(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case\"file creation\":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(`\n`)+(a.hunk.parts[0].noNewlineAtEndOfFile?\"\":`\n`):\"\";await e.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,fi.SAFE_TIME,fi.SAFE_TIME)}break;case\"patch\":await M1(e,a.path,async()=>{await Fbt(a,{baseFs:e,dryRun:r})});break;case\"mode change\":{let c=(await e.statPromise(a.path)).mode;if(Xxe(a.newMode)!==Xxe(c))continue;await M1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function Xxe(t){return(t&64)>0}function Zxe(t){return t.replace(/\\s+$/,\"\")}function Rbt(t,e){return Zxe(t)===Zxe(e)}async function Fbt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,\"utf8\")).split(/\\n/),f=[],p=0,h=0;for(let C of t){let S=Math.max(h,C.header.patched.start+p),P=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),R=Math.max(P,I),N=0,U=0,W=null;for(;N<=R;){if(N<=P&&(U=S-N,W=$xe(C,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=$xe(C,c,U),W!==null))break;N+=1}if(W===null)throw new L1(t.indexOf(C),C);f.push(W),p+=N,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case\"splice\":{let P=S.index+E;c.splice(P,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case\"pop\":c.pop();break;case\"push\":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(`\n`),{mode:a})}function $xe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case\"context\":case\"deletion\":{for(let n of a.lines){let c=e[r];if(c==null||!Rbt(c,n))return null;r+=1}a.type===\"deletion\"&&(s.push({type:\"splice\",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:\"push\",line:\"\"}))}break;case\"insertion\":s.push({type:\"splice\",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:\"pop\"});break;default:je.assertNever(a.type);break}return s}var Obt=/^builtin<([^>]+)>$/;function U1(t,e){let{protocol:r,source:s,selector:a,params:n}=G.parseRange(t);if(r!==\"patch:\")throw new Error(\"Invalid patch range\");if(s===null)throw new Error(\"Patch locators must explicitly define their source\");let c=a?a.split(/&/).map(E=>fe.toPortablePath(E)):[],f=n&&typeof n.locator==\"string\"?G.parseLocator(n.locator):null,p=n&&typeof n.version==\"string\"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function FL(t){return t.range.startsWith(\"patch:\")}function Rg(t){return t.reference.startsWith(\"patch:\")}function $b(t){let{sourceItem:e,...r}=U1(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function eP(t){let{sourceItem:e,...r}=U1(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function Lbt(t){let{sourceItem:e}=U1(t.range,G.parseDescriptor);return e}function Mbt(t){let{sourceItem:e}=U1(t.reference,G.parseLocator);return e}function WK(t){if(!FL(t))return t;let{sourceItem:e}=U1(t.range,G.parseDescriptor);return e}function NL(t){if(!Rg(t))return t;let{sourceItem:e}=U1(t.reference,G.parseLocator);return e}function eke({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:G.stringifyLocator(t)}:{},f=typeof s<\"u\"?{version:s}:{},p=typeof a<\"u\"?{hash:a}:{};return G.makeRange({protocol:\"patch:\",source:n(e),selector:r.join(\"&\"),params:{...f,...p,...c}})}function OL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return G.makeDescriptor(t,eke({parentLocator:e,sourceItem:r,patchPaths:s},G.stringifyDescriptor))}function YK(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return G.makeLocator(t,eke({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},G.stringifyLocator))}function tke({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf(\"!\");n!==-1&&(a=a.slice(n+1));let c=a.match(Obt);return c!==null?s(c[1]):a.startsWith(\"~/\")?r(a.slice(2)):J.isAbsolute(a)?t(a):e(a)}function rke(t){let e=t.lastIndexOf(\"!\");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has(\"optional\")}}function VK(t){return tke({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function tP(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=rke(c),p=await tke({onAbsolute:async h=>await ce.readFilePromise(h,\"utf8\"),onRelative:async h=>{if(a===null)throw new Error(\"Assertion failed: The parent locator should have been fetched\");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),\"utf8\")},onProject:async h=>await ce.readFilePromise(J.join(r.project.cwd,h),\"utf8\"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source==\"string\"&&(c.source=c.source.replace(/\\r\\n?/g,`\n`));return n}async function JK(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let a=NL(t),n=r.storedChecksums,c=new ki,f=await ce.mktempPromise(),p=J.join(f,\"source\"),h=J.join(f,\"user\"),E=J.join(f,\".yarn-patch.json\"),C=r.configuration.makeFetcher(),S=[];try{let P,I;if(t.locatorHash===a.locatorHash){let R=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c});S.push(()=>R.releaseFs?.()),P=R,I=R}else P=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>P.releaseFs?.()),I=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([ce.copyPromise(p,P.prefixPath,{baseFs:P.packageFs}),ce.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),ce.writeJsonPromise(E,{locator:G.stringifyLocator(t),version:s.version})])}finally{for(let P of S)P()}return ce.detachTemp(f),h}async function KK(t,e){let r=fe.fromPortablePath(t).replace(/\\\\/g,\"/\"),s=fe.fromPortablePath(e).replace(/\\\\/g,\"/\"),{stdout:a,stderr:n}=await qr.execvp(\"git\",[\"-c\",\"core.safecrlf=false\",\"diff\",\"--src-prefix=a/\",\"--dst-prefix=b/\",\"--ignore-cr-at-eol\",\"--full-index\",\"--no-index\",\"--no-renames\",\"--text\",r,s],{cwd:fe.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:\"1\",HOME:\"\",XDG_CONFIG_HOME:\"\",USERPROFILE:\"\"}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.\nThe following error was reported by 'git':\n${n}`);let c=r.startsWith(\"/\")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,\"g\"),\"$1/\").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,\"g\"),\"$1/\").replace(new RegExp(je.escapeRegExp(`${r}/`),\"g\"),\"\").replace(new RegExp(je.escapeRegExp(`${s}/`),\"g\"),\"\")}function zK(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=Zb(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Fr.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ge();function nke(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case\"context\":r.reportInfo(null,`  ${he.pretty(e,a,\"grey\")}`);break;case\"deletion\":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case\"insertion\":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var rP=class{supports(e,r){return!!Rg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=eP(e),f=await tP(s,c,r),p=await ce.mktempPromise(),h=J.join(p,\"current.zip\"),E=await r.fetcher.fetch(a,r),C=G.getIdentVendorPath(e),S=new As(h,{create:!0,level:r.project.configuration.get(\"compressionLevel\")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:P,optional:I}of f){if(P===null)continue;let R=new As(h,{level:r.project.configuration.get(\"compressionLevel\")}),N=new Sn(J.resolve(vt.root,C),{baseFs:R});try{await RL(Zb(P),{baseFs:N,version:n})}catch(U){if(!(U instanceof L1))throw U;let W=r.project.configuration.get(\"enableInlineHunks\"),ee=!W&&!I?\" (set enableInlineHunks for details)\":\"\",ie=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${ee}`,ue=le=>{W&&nke(U.hunk,{configuration:r.project.configuration,report:le})};if(R.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:ue});continue}else throw new jt(66,ie,ue)}R.saveAndClose()}return new As(h,{level:r.project.configuration.get(\"compressionLevel\")})}};Ge();var nP=class{supportsDescriptor(e,r){return!!FL(e)}supportsLocator(e,r){return!!Rg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=$b(e);return a.every(n=>!VK(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=$b(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{parentLocator:a,patchPaths:n}=$b(e),c=await tP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>\"u\")throw new Error(\"Assertion failed: The dependency should have been resolved\");let p=zK(c,f.version);return[YK(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=eP(e);return{...await r.resolver.resolve(s,r),...e}}};Ge();Dt();Yt();var _1=class extends ft{constructor(){super(...arguments);this.save=ge.Boolean(\"-s,--save\",!1,{description:\"Add the patch to your resolution entries\"});this.patchFolder=ge.String()}static{this.paths=[[\"patch-commit\"]]}static{this.usage=ot.Usage({description:\"generate a patch out of a directory\",details:\"\\n      By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\\n\\n      With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\\n\\n      Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=J.resolve(this.context.cwd,fe.toPortablePath(this.patchFolder)),c=J.join(n,\"../source\"),f=J.join(n,\"../.yarn-patch.json\");if(!ce.existsSync(c))throw new nt(\"The argument folder didn't get created by 'yarn patch'\");let p=await KK(c,n),h=await ce.readJsonPromise(f),E=G.parseLocator(h.locator,!0);if(!s.storedPackages.has(E.locatorHash))throw new nt(\"No package found in the project for the given locator\");if(!this.save){this.context.stdout.write(p);return}let C=r.get(\"patchFolder\"),S=J.join(C,`${G.slugifyLocator(E)}.patch`);await ce.mkdirPromise(C,{recursive:!0}),await ce.writeFilePromise(S,p);let P=[],I=new Map;for(let R of s.storedPackages.values()){if(G.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=G.ensureDevirtualizedDescriptor(N),W=WK(U),ee=s.storedResolutions.get(W.descriptorHash);if(!ee)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");if(!s.storedPackages.get(ee))throw new Error(\"Assertion failed: Expected the package to have been registered\");let ue=s.tryWorkspaceByLocator(R);if(ue)P.push(ue);else{let le=s.originalPackages.get(R.locatorHash);if(!le)throw new Error(\"Assertion failed: Expected the original package to have been registered\");let me=le.dependencies.get(N.identHash);if(!me)throw new Error(\"Assertion failed: Expected the original dependency to have been registered\");I.set(me.descriptorHash,me)}}for(let R of P)for(let N of Ut.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let W=OL(U,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(E),patchPaths:[J.join(Er.home,J.relative(s.cwd,S))]});R.manifest[N].set(U.identHash,W)}for(let R of I.values()){let N=OL(R,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(E),patchPaths:[J.join(Er.home,J.relative(s.cwd,S))]});s.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:G.stringifyIdent(N),description:R.range}},reference:N.range})}await s.persist()}};Ge();Dt();Yt();var H1=class extends ft{constructor(){super(...arguments);this.update=ge.Boolean(\"-u,--update\",!1,{description:\"Reapply local patches that already apply to this packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String()}static{this.paths=[[\"patch\"]]}static{this.usage=ot.Usage({description:\"prepare a package for patching\",details:\"\\n      This command will cause a package to be extracted in a temporary directory intended to be editable at will.\\n\\n      Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\\n\\n      Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=G.parseLocator(this.package);if(c.reference===\"unknown\"){let f=je.mapAndFilter([...s.storedPackages.values()],p=>p.identHash!==c.identHash?je.mapAndFilter.skip:G.isVirtualLocator(p)?je.mapAndFilter.skip:Rg(p)!==this.update?je.mapAndFilter.skip:p);if(f.length===0)throw new nt(\"No package found in the project for the given locator\");if(f.length>1)throw new nt(`Multiple candidate packages found; explicitly choose one of them (use \\`yarn why <package>\\` to get more information as to who depends on them):\n${f.map(p=>`\n- ${G.prettyLocator(r,p)}`).join(\"\")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt(\"No package found in the project for the given locator\");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=NL(c),h=await JK(c,{cache:n,project:s});f.reportJson({locator:G.stringifyLocator(p),path:fe.fromPortablePath(h)});let E=this.update?\" along with its current modifications\":\"\";f.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,fe.fromPortablePath(h),\"magenta\")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform===\"win32\"?'\"':\"\"}${fe.fromPortablePath(h)}${process.platform===\"win32\"?'\"':\"\"}`,\"cyan\")} and Yarn will store a patchfile based on your changes.`)})}};var Ubt={configuration:{enableInlineHunks:{description:\"If true, the installs will print unmatched patch hunks\",type:\"BOOLEAN\",default:!1},patchFolder:{description:\"Folder where the patch files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/patches\"}},commands:[_1,H1],fetchers:[rP],resolvers:[nP]},_bt=Ubt;var ez={};Vt(ez,{PnpmLinker:()=>iP,default:()=>Ybt});Ge();Dt();Yt();var iP=class{getCustomDataKey(){return JSON.stringify({name:\"PnpmLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the pnpm linker to be enabled\");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>\"u\")throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\\/node_modules\\/(@[^/]*\\/)?[^/]+)(\\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=J.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new ZK(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"pnpm\"}},ZK=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=$P(ce,{indexPath:J.join(e.project.configuration.get(\"globalFolder\"),\"index\")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case\"SOFT\":return this.installPackageSoft(e,r,s);case\"HARD\":return this.installPackageHard(e,r,s)}throw new Error(\"Assertion failed: Unsupported package link type\")}async installPackageSoft(e,r,s){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?J.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=jbt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ce.mkdirPromise(n,{recursive:!0}),await ce.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:\"HardlinkFromIndex\",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,p={manifest:await Ut.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ut,misc:{hasBindingGyp:gA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=gA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\"||!ike(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await ce.mkdirPromise(a,{recursive:!0});let c=await Gbt(a),f=new Map(c),p=[n],h=(C,S)=>{let P=S;ike(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,\"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies\"),P=G.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(P.locatorHash);if(typeof I>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(S)})`);let R=G.stringifyIdent(C),N=J.join(a,R),U=J.relative(J.dirname(N),I.packageLocation),W=f.get(R);f.delete(R),p.push(Promise.resolve().then(async()=>{if(W){if(W.isSymbolicLink()&&await ce.readlinkPromise(N)===U)return;await ce.removePromise(N)}await ce.mkdirpPromise(J.dirname(N)),process.platform==\"win32\"&&this.opts.project.configuration.get(\"winLinkType\")===\"junctions\"?await ce.symlinkPromise(I.packageLocation,N,\"junction\"):await ce.symlinkPromise(U,N)}))},E=!1;for(let[C,S]of r)C.identHash===e.identHash&&(E=!0),h(C,S);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(G.convertLocatorToDescriptor(e),e),p.push(qbt(a,f)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the pnpm linker\")}async finalizeInstall(){let e=ske(this.opts.project);if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\")await ce.removePromise(e);else{let r;try{r=new Set(await ce.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:s}of this.customData.pathsByLocator.values()){if(!s)continue;let a=J.contains(e,s);if(a===null)continue;let[n]=a.split(J.sep);r.delete(n)}await Promise.all([...r].map(async s=>{await ce.removePromise(J.join(e,s))}))}return await this.asyncActions.wait(),await $K(e),this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\"&&await $K(Hbt(this.opts.project)),{customData:this.customData}}};function Hbt(t){return J.join(t.cwd,Er.nodeModules)}function ske(t){return t.configuration.get(\"pnpmStoreFolder\")}function jbt(t,{project:e}){let r=G.slugifyLocator(t),s=ske(e),a=J.join(s,r,\"package\"),n=J.join(s,r,Er.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function ike(t,{project:e}){return!G.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Gbt(t){let e=new Map,r=[];try{r=await ce.readdirPromise(t,{withFileTypes:!0})}catch(s){if(s.code!==\"ENOENT\")throw s}try{for(let s of r)if(!s.name.startsWith(\".\"))if(s.name.startsWith(\"@\")){let a=await ce.readdirPromise(J.join(t,s.name),{withFileTypes:!0});if(a.length===0)e.set(s.name,s);else for(let n of a)e.set(`${s.name}/${n.name}`,n)}else e.set(s.name,s)}catch(s){if(s.code!==\"ENOENT\")throw s}return e}async function qbt(t,e){let r=[],s=new Set;for(let a of e.keys()){r.push(ce.removePromise(J.join(t,a)));let n=G.tryParseIdent(a)?.scope;n&&s.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...s].map(a=>$K(J.join(t,a)))))}async function $K(t){try{await ce.rmdirPromise(t)}catch(e){if(e.code!==\"ENOENT\"&&e.code!==\"ENOTEMPTY\"&&e.code!==\"EBUSY\")throw e}}var Wbt={configuration:{pnpmStoreFolder:{description:\"By default, the store is stored in the 'node_modules/.store' of the project. Sometimes in CI scenario's it is convenient to store this in a different location so it can be cached and reused.\",type:\"ABSOLUTE_PATH\",default:\"./node_modules/.store\"}},linkers:[iP]},Ybt=Wbt;var az={};Vt(az,{StageCommand:()=>j1,default:()=>nPt,stageUtils:()=>ML});Ge();Dt();Yt();Ge();Dt();var ML={};Vt(ML,{ActionType:()=>tz,checkConsensus:()=>LL,expandDirectory:()=>iz,findConsensus:()=>sz,findVcsRoot:()=>rz,genCommitMessage:()=>oz,getCommitPrefix:()=>oke,isYarnFile:()=>nz});Dt();var tz=(n=>(n[n.CREATE=0]=\"CREATE\",n[n.DELETE=1]=\"DELETE\",n[n.ADD=2]=\"ADD\",n[n.REMOVE=3]=\"REMOVE\",n[n.MODIFY=4]=\"MODIFY\",n))(tz||{});async function rz(t,{marker:e}){do if(!ce.existsSync(J.join(t,e)))t=J.dirname(t);else return t;while(t!==\"/\");return null}function nz(t,{roots:e,names:r}){if(r.has(J.basename(t)))return!0;do if(!e.has(t))t=J.dirname(t);else return!0;while(t!==\"/\");return!1}function iz(t){let e=[],r=[t];for(;r.length>0;){let s=r.pop(),a=ce.readdirSync(s);for(let n of a){let c=J.resolve(s,n);ce.lstatSync(c).isDirectory()?r.push(c):e.push(c)}}return e}function LL(t,e){let r=0,s=0;for(let a of t)a!==\"wip\"&&(e.test(a)?r+=1:s+=1);return r>=s}function sz(t){let e=LL(t,/^(\\w\\(\\w+\\):\\s*)?\\w+s/),r=LL(t,/^(\\w\\(\\w+\\):\\s*)?[A-Z]/),s=LL(t,/^\\w\\(\\w+\\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:s}}function oke(t){return t.useComponent?\"chore(yarn): \":\"\"}var Vbt=new Map([[0,\"create\"],[1,\"delete\"],[2,\"add\"],[3,\"remove\"],[4,\"update\"]]);function oz(t,e){let r=oke(t),s=[],a=e.slice().sort((n,c)=>n[0]-c[0]);for(;a.length>0;){let[n,c]=a.shift(),f=Vbt.get(n);t.useUpperCase&&s.length===0&&(f=`${f[0].toUpperCase()}${f.slice(1)}`),t.useThirdPerson&&(f+=\"s\");let p=[c];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=\" (and one other)\":p.length>1&&(h+=` (and ${p.length} others)`),s.push(`${f} ${h}`)}return`${r}${s.join(\", \")}`}var Jbt=\"Commit generated via `yarn stage`\",Kbt=11;async function ake(t){let{code:e,stdout:r}=await qr.execvp(\"git\",[\"log\",\"-1\",\"--pretty=format:%H\"],{cwd:t});return e===0?r.trim():null}async function zbt(t,e){let r=[],s=e.filter(h=>J.basename(h.path)===\"package.json\");for(let{action:h,path:E}of s){let C=J.relative(t,E);if(h===4){let S=await ake(t),{stdout:P}=await qr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ut.fromText(P),R=await Ut.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...I.dependencies,...I.devDependencies]);for(let[W,ee]of U){let ie=G.stringifyIdent(ee),ue=N.get(W);ue?ue.range!==ee.range&&r.push([4,`${ie} to ${ue.range}`]):r.push([3,ie])}for(let[W,ee]of N)U.has(W)||r.push([2,G.stringifyIdent(ee)])}else if(h===0){let S=await Ut.fromFile(E);S.name?r.push([0,G.stringifyIdent(S.name)]):r.push([0,\"a package\"])}else if(h===1){let S=await ake(t),{stdout:P}=await qr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ut.fromText(P);I.name?r.push([1,G.stringifyIdent(I.name)]):r.push([1,\"a package\"])}else throw new Error(\"Assertion failed: Unsupported action type\")}let{code:a,stdout:n}=await qr.execvp(\"git\",[\"log\",`-${Kbt}`,\"--pretty=format:%s\"],{cwd:t}),c=a===0?n.split(/\\n/g).filter(h=>h!==\"\"):[],f=sz(c);return oz(f,r)}var Xbt={0:[\" A \",\"?? \"],4:[\" M \"],1:[\" D \"]},Zbt={0:[\"A  \"],4:[\"M  \"],1:[\"D  \"]},lke={async findRoot(t){return await rz(t,{marker:\".git\"})},async filterChanges(t,e,r,s){let{stdout:a}=await qr.execvp(\"git\",[\"status\",\"-s\"],{cwd:t,strict:!0}),n=a.toString().split(/\\n/g),c=s?.staged?Zbt:Xbt;return[].concat(...n.map(p=>{if(p===\"\")return[];let h=p.slice(0,3),E=J.resolve(t,p.slice(3));if(!s?.staged&&h===\"?? \"&&p.endsWith(\"/\"))return iz(E).map(C=>({action:0,path:C}));{let S=[0,4,1].find(P=>c[P].includes(h));return S!==void 0?[{action:S,path:E}]:[]}})).filter(p=>nz(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await zbt(t,e)},async makeStage(t,e){let r=e.map(s=>fe.fromPortablePath(s.path));await qr.execvp(\"git\",[\"add\",\"--\",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let s=e.map(a=>fe.fromPortablePath(a.path));await qr.execvp(\"git\",[\"add\",\"-N\",\"--\",...s],{cwd:t,strict:!0}),await qr.execvp(\"git\",[\"commit\",\"-m\",`${r}\n\n${Jbt}\n`,\"--\",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>fe.fromPortablePath(s.path));await qr.execvp(\"git\",[\"reset\",\"HEAD\",\"--\",...r],{cwd:t,strict:!0})}};var $bt=[lke],j1=class extends ft{constructor(){super(...arguments);this.commit=ge.Boolean(\"-c,--commit\",!1,{description:\"Commit the staged files\"});this.reset=ge.Boolean(\"-r,--reset\",!1,{description:\"Remove all files from the staging area\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the commit message and the list of modified files without staging / committing\"});this.update=ge.Boolean(\"-u,--update\",!1,{hidden:!0})}static{this.paths=[[\"stage\"]]}static{this.usage=ot.Usage({description:\"add all yarn files to your vcs\",details:\"\\n      This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\\n\\n      Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\\n\\n      Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\\n    \",examples:[[\"Adds all modified project files to the staging area\",\"yarn stage\"],[\"Creates a new commit containing all modified project files\",\"yarn stage --commit\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),{driver:a,root:n}=await ePt(s.cwd),c=[r.get(\"cacheFolder\"),r.get(\"globalFolder\"),r.get(\"virtualFolder\"),r.get(\"yarnPath\")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of tPt(n,C))f.add(S);let p=new Set([r.get(\"rcFilename\"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}\n`);else for(let C of h)this.context.stdout.write(`${fe.fromPortablePath(C.path)}\n`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write(\"No staged changes found!\"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write(\"No changes found!\"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function ePt(t){let e=null,r=null;for(let s of $bt)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt(\"No stage driver has been found for your current project\");return{driver:e,root:r}}function tPt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=ce.statSync(e)}catch{break}if(s.isSymbolicLink())e=J.resolve(J.dirname(e),ce.readlinkSync(e));else break}return r}var rPt={commands:[j1]},nPt=rPt;var lz={};Vt(lz,{default:()=>fPt});Ge();Ge();Dt();var fke=ut(Ai());Ge();var cke=ut(g9()),iPt=\"e8e1bd300d860104bb8c58453ffa1eb4\",sPt=\"OFCNCOG2CU\",uke=async(t,e)=>{let r=G.stringifyIdent(t),a=oPt(e).initIndex(\"npm-search\");try{return(await a.getObject(r,{attributesToRetrieve:[\"types\"]})).types?.ts===\"definitely-typed\"}catch{return!1}},oPt=t=>(0,cke.default)(sPt,iPt,{requester:{async send(r){try{let s=await nn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var Ake=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,aPt=async(t,e,r,s)=>{if(r.scope===\"types\")return;let{project:a}=t,{configuration:n}=a;if(!(n.get(\"tsEnableAutoTypes\")??(ce.existsSync(J.join(t.cwd,\"tsconfig.json\"))||ce.existsSync(J.join(a.cwd,\"tsconfig.json\")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new ki};if(!await uke(r,n))return;let E=Ake(r),C=G.parseRange(r.range).selector;if(!Fr.validRange(C)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);C=G.parseRange(U[0].reference).selector}let S=fke.default.coerce(C);if(S===null)return;let P=`${Xu.Modifier.CARET}${S.major}`,I=G.makeDescriptor(G.makeIdent(\"types\",E),P),R=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let ee=[];for(let ie of Ut.allDependencies){let ue=N.manifest[ie].get(I.identHash);typeof ue>\"u\"||ee.push([ie,ue])}return ee.length===0?je.mapAndFind.skip:ee});if(typeof R<\"u\")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xu.Target.DEVELOPMENT].set(I.identHash,I)}},lPt=async(t,e,r)=>{if(r.scope===\"types\")return;let{project:s}=t,{configuration:a}=s;if(!(a.get(\"tsEnableAutoTypes\")??(ce.existsSync(J.join(t.cwd,\"tsconfig.json\"))||ce.existsSync(J.join(s.cwd,\"tsconfig.json\")))))return;let c=Ake(r),f=G.makeIdent(\"types\",c);for(let p of Ut.allDependencies)typeof t.manifest[p].get(f.identHash)>\"u\"||t.manifest[p].delete(f.identHash)},cPt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},uPt={configuration:{tsEnableAutoTypes:{description:\"Whether Yarn should auto-install @types/ dependencies on 'yarn add'\",type:\"BOOLEAN\",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:aPt,afterWorkspaceDependencyRemoval:lPt,beforeWorkspacePacking:cPt}},fPt=uPt;var pz={};Vt(pz,{VersionApplyCommand:()=>Y1,VersionCheckCommand:()=>V1,VersionCommand:()=>J1,default:()=>dPt,versionUtils:()=>W1});Ge();Ge();Yt();var W1={};Vt(W1,{Decision:()=>G1,applyPrerelease:()=>pke,applyReleases:()=>Az,applyStrategy:()=>sP,clearVersionFiles:()=>cz,getUndecidedDependentWorkspaces:()=>aP,getUndecidedWorkspaces:()=>UL,openVersionFile:()=>q1,requireMoreDecisions:()=>pPt,resolveVersionFiles:()=>oP,suggestStrategy:()=>fz,updateVersionFiles:()=>uz,validateReleaseDecision:()=>dy});Ge();Dt();wc();Yt();ql();var kA=ut(Ai()),APt=/^(>=|[~^]|)(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/,G1=(h=>(h.UNDECIDED=\"undecided\",h.DECLINE=\"decline\",h.MAJOR=\"major\",h.MINOR=\"minor\",h.PATCH=\"patch\",h.PREMAJOR=\"premajor\",h.PREMINOR=\"preminor\",h.PREPATCH=\"prepatch\",h.PRERELEASE=\"prerelease\",h))(G1||{});function dy(t){let e=kA.default.valid(t);return e||je.validateEnum(O4(G1,\"UNDECIDED\"),t)}async function oP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get(\"deferredVersionFolder\");if(!ce.existsSync(s))return r;let a=await ce.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=J.join(s,n),f=await ce.readFilePromise(c,\"utf8\"),p=ls(f);for(let[h,E]of Object.entries(p.releases||{})){if(E===\"decline\")continue;let C=G.parseIdent(h),S=t.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${J.basename(c)} references ${h})`);if(S.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${G.prettyLocator(t.configuration,S.anchoredLocator)})`);let P=S.manifest.raw.stableVersion??S.manifest.version,I=r.get(S),R=sP(E===\"prerelease\"?S.manifest.version:P,dy(E));if(R===null)throw new Error(`Assertion failed: Expected ${P} to support being bumped via strategy ${E}`);let N=typeof I<\"u\"?kA.default.gt(R,I)?R:I:R;r.set(S,N)}}return e&&(r=new Map([...r].map(([n,c])=>[n,pke(c,{current:n.manifest.version,prerelease:e})]))),r}async function cz(t){let e=t.configuration.get(\"deferredVersionFolder\");ce.existsSync(e)&&await ce.removePromise(e)}async function uz(t,e){let r=new Set(e),s=t.configuration.get(\"deferredVersionFolder\");if(!ce.existsSync(s))return;let a=await ce.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=J.join(s,n),f=await ce.readFilePromise(c,\"utf8\"),p=ls(f),h=p?.releases;if(h){for(let E of Object.keys(h)){let C=G.parseIdent(E),S=t.tryWorkspaceByIdent(C);(S===null||r.has(S))&&delete p.releases[E]}Object.keys(p.releases).length>0?await ce.changeFilePromise(c,nl(new nl.PreserveOrdering(p))):await ce.unlinkPromise(c)}}}async function q1(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let s=await ka.fetchRoot(r.projectCwd),a=s!==null?await ka.fetchBase(s,{baseRefs:r.get(\"changesetBaseRefs\")}):null,n=s!==null?await ka.fetchChangedFiles(s,{base:a.hash,project:t}):[],c=r.get(\"deferredVersionFolder\"),f=n.filter(P=>J.contains(c,P)!==null);if(f.length>1)throw new nt(`Your current branch contains multiple versioning files; this isn't supported:\n- ${f.map(P=>fe.fromPortablePath(P)).join(`\n- `)}`);let p=new Set(je.mapAndFilter(n,P=>{let I=t.tryWorkspaceByFilePath(P);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:J.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=ce.existsSync(h)?await ce.readFilePromise(h,\"utf8\"):\"{}\",C=ls(E),S=new Map;for(let P of C.declined||[]){let I=G.parseIdent(P),R=t.getWorkspaceByIdent(I);S.set(R,\"decline\")}for(let[P,I]of Object.entries(C.releases||{})){let R=G.parseIdent(P),N=t.getWorkspaceByIdent(R);S.set(N,dy(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(P=>P.manifest.version!==null)),releases:S,async saveAll(){let P={},I=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),W=S.get(N);W===\"decline\"?I.push(U):typeof W<\"u\"?P[U]=dy(W):p.has(N)&&R.push(U)}await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.changeFilePromise(h,nl(new nl.PreserveOrdering({releases:Object.keys(P).length>0?P:void 0,declined:I.length>0?I:void 0,undecided:R.length>0?R:void 0})))}}}function pPt(t){return UL(t).size>0||aP(t).length>0}function UL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function aP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c===\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!==\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ut.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function fz(t,e){let r=kA.default.clean(e);for(let s of Object.values(G1))if(s!==\"undecided\"&&s!==\"decline\"&&kA.default.inc(t,s)===r)return s;return null}function sP(t,e){if(kA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy \"${e}\" unless the workspace already has a valid version`);if(!kA.default.valid(t))throw new nt(`Cannot apply the release strategy \"${e}\" on a non-semver version (${t})`);let r=kA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy \"${e}\" on the specified version (${t})`);return r}function Az(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ut.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,kA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?G.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:fe.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>\"u\"))for(let[E,C,S]of h){let P=E.manifest[C].get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: The dependency should have existed\");let I=P.range,R=!1;if(I.startsWith(Ei.protocol)&&(I=I.slice(Ei.protocol.length),R=!0,I===n.relativeCwd))continue;let N=I.match(APt);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${G.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;R&&(U=`${Ei.protocol}${U}`);let W=G.makeDescriptor(P,U);E.manifest[C].set(S,W)}}}var hPt=new Map([[\"%n\",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function pke(t,{current:e,prerelease:r}){let s=new kA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\\./g);for(let p of f){let h=hPt.get(p);if(typeof h>\"u\")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]==\"number\"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(\".\")}`}var Y1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"--all\",!1,{description:\"Apply the deferred version changes on all workspaces\"});this.dryRun=ge.Boolean(\"--dry-run\",!1,{description:\"Print the versions without actually generating the package archive\"});this.prerelease=ge.String(\"--prerelease\",{description:\"Add a prerelease identifier to new versions\",tolerateBoolean:!0});this.exact=ge.Boolean(\"--exact\",!1,{description:\"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version.\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Release the transitive workspaces as well\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"version\",\"apply\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply all the deferred version bumps at once\",details:`\n      This command will apply the deferred version changes and remove their definitions from the repository.\n\n      Note that if \\`--prerelease\\` is set, the given prerelease identifier (by default \\`rc.%n\\`) will be used on all new versions and the version definitions will be kept as-is.\n\n      By default only the current workspace will be bumped, but you can configure this behavior by using one of:\n\n      - \\`--recursive\\` to also apply the version bump on its dependencies\n      - \\`--all\\` to apply the version bump on all packages in the repository\n\n      Note that this command will also update the \\`workspace:\\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.\n    `,examples:[[\"Apply the version change to the local workspace\",\"yarn version apply\"],[\"Apply the version change to all the workspaces in the local workspace\",\"yarn version apply --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!=\"boolean\"?this.prerelease:\"rc.%n\":null,h=await oP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let P=h.get(S);typeof P<\"u\"&&E.set(S,P)}}if(E.size===0){let C=h.size>0?\" Did you want to add --all?\":\"\";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}Az(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await cz(s):await uz(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ge();Dt();Yt();var _L=ut(Ai());var V1=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Open an interactive interface used to set version bumps\"})}static{this.paths=[[\"version\",\"check\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"check that all the relevant packages have been bumped\",details:\"\\n      **Warning:** This command currently requires Git.\\n\\n      This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\\n\\n      In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\\n\\n      In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\\n    \",examples:[[\"Check whether the modified packages need a bump\",\"yarn version check\"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){iw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(WF(),LW)),{ScrollableItems:s}=await Promise.resolve().then(()=>(KF(),JF)),{FocusRequest:a}=await Promise.resolve().then(()=>(UW(),v2e)),{useListInput:n}=await Promise.resolve().then(()=>(VF(),S2e)),{renderForm:c}=await Promise.resolve().then(()=>($F(),ZF)),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState();let R=await q1(P);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new nt(\"This command can only be run on Git repositories\");let N=()=>h.createElement(f,{flexDirection:\"row\",paddingBottom:1},h.createElement(f,{flexDirection:\"column\",width:60},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select workspaces.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select release strategies.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to save.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(S,me.anchoredLocator)})`);if(_L.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=[\"undecided\",\"decline\",\"patch\",\"minor\",\"major\"];n(Be,we,{active:pe,minus:\"left\",plus:\"right\",set:Ce});let ye=Be===\"undecided\"?h.createElement(p,{color:\"yellow\"},g):Be===\"decline\"?h.createElement(p,{color:\"green\"},g):h.createElement(p,null,h.createElement(p,{color:\"magenta\"},g),\" \\u2192 \",h.createElement(p,{color:\"green\"},_L.default.valid(Be)?Be:_L.default.inc(g,Be)));return h.createElement(f,{flexDirection:\"column\"},h.createElement(f,null,h.createElement(p,null,G.prettyLocator(S,me.anchoredLocator),\" - \",ye)),h.createElement(f,null,we.map(Ae=>h.createElement(f,{key:Ae,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:Ae===Be}),\" \",Ae)))))},W=me=>{let pe=new Set(R.releaseRoots),Be=new Map([...me].filter(([Ce])=>pe.has(Ce)));for(;;){let Ce=aP({project:R.project,releases:Be}),g=!1;if(Ce.length>0){for(let[we]of Ce)if(!pe.has(we)){pe.add(we),g=!0;let ye=me.get(we);typeof ye<\"u\"&&Be.set(we,ye)}}if(!g)break}return{relevantWorkspaces:pe,relevantReleases:Be}},ee=()=>{let[me,pe]=C(()=>new Map(R.releases)),Be=E((Ce,g)=>{let we=new Map(me);g!==\"undecided\"?we.set(Ce,g):we.delete(Ce);let{relevantReleases:ye}=W(we);pe(ye)},[me,pe]);return[me,Be]},ie=({workspaces:me,releases:pe})=>{let Be=[];Be.push(`${me.size} total`);let Ce=0,g=0;for(let we of me){let ye=pe.get(we);typeof ye>\"u\"?g+=1:ye!==\"decline\"&&(Ce+=1)}return Be.push(`${Ce} release${Ce===1?\"\":\"s\"}`),Be.push(`${g} remaining`),h.createElement(p,{color:\"yellow\"},Be.join(\", \"))},le=await c(({useSubmit:me})=>{let[pe,Be]=ee();me(pe);let{relevantWorkspaces:Ce}=W(pe),g=new Set([...Ce].filter(se=>!R.releaseRoots.has(se))),[we,ye]=C(0),Ae=E(se=>{switch(se){case a.BEFORE:ye(we-1);break;case a.AFTER:ye(we+1);break}},[we,ye]);return h.createElement(f,{flexDirection:\"column\"},h.createElement(N,null),h.createElement(f,null,h.createElement(p,{wrap:\"wrap\"},\"The following files have been modified in your local checkout.\")),h.createElement(f,{flexDirection:\"column\",marginTop:1,paddingLeft:2},[...R.changedFiles].map(se=>h.createElement(f,{key:se},h.createElement(p,null,h.createElement(p,{color:\"grey\"},fe.fromPortablePath(R.root)),fe.sep,fe.relative(fe.fromPortablePath(R.root),fe.fromPortablePath(se)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):\")),g.size>3?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:R.releaseRoots,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===0,radius:1,size:2,onFocusRequest:Ae},[...R.releaseRoots].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:Z=>Be(se,Z)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:\")),h.createElement(f,null,h.createElement(p,null,\"(Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<tab>\"),\" to move the focus between the workspace groups.)\")),g.size>5?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:g,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===1,radius:2,size:2,onFocusRequest:Ae},[...g].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:Z=>Be(se,Z)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof le>\"u\")return 1;R.releases.clear();for(let[me,pe]of le)R.releases.set(me,pe);await R.saveAll()}async executeStandard(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return await s.restoreInstallState(),(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{let f=await q1(s);if(f===null||f.releaseRoots.size===0)return;if(f.root===null)throw new nt(\"This command can only be run on Git repositories\");if(c.reportInfo(0,`Your PR was started right after ${he.pretty(r,f.baseHash.slice(0,7),\"yellow\")} ${he.pretty(r,f.baseTitle,\"magenta\")}`),f.changedFiles.size>0){c.reportInfo(0,\"You have changed the following files since then:\"),c.reportSeparator();for(let S of f.changedFiles)c.reportInfo(null,`${he.pretty(r,fe.fromPortablePath(f.root),\"gray\")}${fe.sep}${fe.relative(fe.fromPortablePath(f.root),fe.fromPortablePath(S))}`)}let p=!1,h=!1,E=UL(f);if(E.size>0){p||c.reportSeparator();for(let S of E)c.reportError(0,`${G.prettyLocator(r,S.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let C=aP(f);for(let[S,P]of C)h||c.reportSeparator(),c.reportError(0,`${G.prettyLocator(r,S.anchoredLocator)} doesn't have a release strategy attached, but depends on ${G.prettyWorkspace(r,P)} which is planned for release.`),h=!0;(p||h)&&(c.reportSeparator(),c.reportInfo(0,\"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed).\"),c.reportInfo(0,\"To correct these errors, run `yarn version check --interactive` then follow the instructions.\"))})).exitCode()}};Ge();Yt();var HL=ut(Ai());var J1=class extends ft{constructor(){super(...arguments);this.deferred=ge.Boolean(\"-d,--deferred\",{description:\"Prepare the version to be bumped during the next release cycle\"});this.immediate=ge.Boolean(\"-i,--immediate\",{description:\"Bump the version immediately\"});this.strategy=ge.String()}static{this.paths=[[\"version\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply a new version to the current package\",details:\"\\n      This command will bump the version number for the given package, following the specified strategy:\\n\\n      - If `major`, the first number from the semver range will be increased (`X.0.0`).\\n      - If `minor`, the second number from the semver range will be increased (`0.X.0`).\\n      - If `patch`, the third number from the semver range will be increased (`0.0.X`).\\n      - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\\n      - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\\n      - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\\n      - If a valid semver range, it will be used as new version.\\n      - If unspecified, Yarn will ask you for guidance.\\n\\n      For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\\n    \",examples:[[\"Immediately bump the version to the next major\",\"yarn version major\"],[\"Prepare the version to be bumped to the next major\",\"yarn version major --deferred\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=r.get(\"preferDeferredVersions\");this.deferred&&(n=!0),this.immediate&&(n=!1);let c=HL.default.valid(this.strategy),f=this.strategy===\"decline\",p;if(c)if(a.manifest.version!==null){let E=fz(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!f){if(E===null)throw new nt(\"Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.\");if(typeof E!=\"string\"||!HL.default.valid(E))throw new nt(`Can't bump the version (${E}) if it's not valid semver`)}p=dy(this.strategy)}if(!n){let C=(await oP(s)).get(a);if(typeof C<\"u\"&&p!==\"decline\"){let S=sP(a.manifest.version,p);if(HL.default.lt(S,C))throw new nt(`Can't bump the version to one that would be lower than the current deferred one (${C})`)}}let h=await q1(s,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run([\"version\",\"apply\"])}};var gPt={configuration:{deferredVersionFolder:{description:\"Folder where are stored the versioning files\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/versions\"},preferDeferredVersions:{description:\"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set\",type:\"BOOLEAN\",default:!1}},commands:[Y1,V1,J1]},dPt=gPt;var hz={};Vt(hz,{WorkspacesFocusCommand:()=>K1,WorkspacesForeachCommand:()=>X1,default:()=>EPt});Ge();Ge();Yt();var K1=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.production=ge.Boolean(\"--production\",!1,{description:\"Only install regular dependencies by omitting dev dependencies\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Install the entire project\"});this.workspaces=ge.Rest()}static{this.paths=[[\"workspaces\",\"focus\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"install a single workspace and its dependencies\",details:\"\\n      This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\\n\\n      Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\\n\\n      If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);await s.restoreInstallState({restoreResolutions:!1});let c;if(this.all)c=new Set(s.workspaces);else if(this.workspaces.length===0){if(!a)throw new ar(s.cwd,this.context.cwd);c=new Set([a])}else c=new Set(this.workspaces.map(f=>s.getWorkspaceByIdent(G.parseIdent(f))));for(let f of c)for(let p of this.production?[\"dependencies\"]:Ut.hardDependencies)for(let h of f.manifest.getForScope(p).values()){let E=s.tryWorkspaceByDescriptor(h);E!==null&&c.add(E)}for(let f of s.workspaces)c.has(f)?this.production&&f.manifest.devDependencies.clear():(f.manifest.installConfig=f.manifest.installConfig||{},f.manifest.installConfig.selfReferences=!1,f.manifest.dependencies.clear(),f.manifest.devDependencies.clear(),f.manifest.peerDependencies.clear(),f.manifest.scripts.clear());return await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};Ge();Ge();Ge();Yt();var z1=ut(Go()),gke=ut(Ld());Ul();var X1=class extends ft{constructor(){super(...arguments);this.from=ge.Array(\"--from\",{description:\"An array of glob pattern idents or paths from which to base any recursion\"});this.all=ge.Boolean(\"-A,--all\",{description:\"Run the command on all workspaces of a project\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Run the command on the current workspace and all of its recursive dependencies\"});this.worktree=ge.Boolean(\"-W,--worktree\",{description:\"Run the command on all workspaces of the current worktree\"});this.verbose=ge.Counter(\"-v,--verbose\",{description:\"Increase level of logging verbosity up to 2 times\"});this.parallel=ge.Boolean(\"-p,--parallel\",!1,{description:\"Run the commands in parallel\"});this.interlaced=ge.Boolean(\"-i,--interlaced\",!1,{description:\"Print the output of commands in real-time instead of buffering it\"});this.jobs=ge.String(\"-j,--jobs\",{description:\"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`\",validator:g_([fo([\"unlimited\"]),$2(h_(),[m_(),d_(1)])])});this.topological=ge.Boolean(\"-t,--topological\",!1,{description:\"Run the command after all workspaces it depends on (regular) have finished\"});this.topologicalDev=ge.Boolean(\"--topological-dev\",!1,{description:\"Run the command after all workspaces it depends on (regular + dev) have finished\"});this.include=ge.Array(\"--include\",[],{description:\"An array of glob pattern idents or paths; only matching workspaces will be traversed\"});this.exclude=ge.Array(\"--exclude\",[],{description:\"An array of glob pattern idents or paths; matching workspaces won't be traversed\"});this.publicOnly=ge.Boolean(\"--no-private\",{description:\"Avoid running the command on private workspaces\"});this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.dryRun=ge.Boolean(\"-n,--dry-run\",{description:\"Print the commands that would be run, without actually running them\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspaces\",\"foreach\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command on all workspaces\",details:\"\\n      This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\\n\\n      - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\\n\\n      - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\\n\\n      - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\\n\\n      - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\\n\\n      - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\\n\\n      - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\\n\\n      - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the `--no-private` flag to avoid running the command in private workspaces.\\n\\n      The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\\n\\n      If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\\n    \",examples:[[\"Publish all packages\",\"yarn workspaces foreach -A --no-private npm publish --tolerate-republish\"],[\"Run the build script on all descendant packages\",\"yarn workspaces foreach -A run build\"],[\"Run the build script on current and all descendant packages in parallel, building package dependencies first\",\"yarn workspaces foreach -Apt run build\"],[\"Run the build script on several packages and all their dependencies, building dependencies first\",\"yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build\"]]})}static{this.schema=[tB(\"all\",qf.Forbids,[\"from\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"}),y_([\"all\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"})]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!this.all&&!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),c=n.path.length===1&&n.path[0]===\"run\"&&typeof n.scriptName<\"u\"?n.scriptName:null;if(n.path.length===0)throw new nt(\"Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script\");let f=Ce=>{this.dryRun&&this.context.stdout.write(`${Ce}\n`)},p=()=>{let Ce=this.from.map(g=>z1.default.matcher(g));return s.workspaces.filter(g=>{let we=G.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ce.some(Ae=>Ae(we)||Ae(ye))})},h=[];if(this.since?(f(\"Option --since is set; selecting the changed workspaces as root for workspace selection\"),h=Array.from(await ka.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f(\"Option --from is set; selecting the specified workspaces\"),h=[...p()]):this.worktree?(f(\"Option --worktree is set; selecting the current workspace\"),h=[a]):this.recursive?(f(\"Option --recursive is set; selecting the current workspace\"),h=[a]):this.all&&(f(\"Option --all is set; selecting all workspaces\"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(`\n- ${Ce.relativeCwd}\n  ${G.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f(\"\")}let E;if(this.recursive?this.since?(f(\"Option --recursive --since is set; recursively selecting all dependent workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f(\"Option --recursive is set; recursively selecting all transitive dependencies\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f(\"Option --worktree is set; recursively selecting all nested workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(`\n- ${Ce.relativeCwd}\n  ${G.prettyLocator(r,Ce.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(\":\")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a \"${c}\" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!z1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.include)&&!z1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(z1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.exclude)||z1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ce)}}if(this.dryRun)return 0;let P=this.verbose??(this.context.stdout.isTTY?1/0:0),I=P>0,R=P>1,N=this.parallel?this.jobs===\"unlimited\"?1/0:Number(this.jobs)||Math.ceil(Ui.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,ee=(0,gke.default)(N),ie=new Map,ue=new Set,le=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:ye})=>{if(pe)return-1;!U&&R&&ye>1&&Ce.reportSeparator();let Ae=mPt(we,{configuration:r,label:I,commandIndex:ye}),[se,Z]=hke(Ce,{prefix:Ae,interlaced:W}),[De,Re]=hke(Ce,{prefix:Ae,interlaced:W});try{R&&Ce.reportInfo(null,`${Ae?`${Ae} `:\"\"}Process started`);let mt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await Z,await Re;let rt=Date.now();if(R){let Fe=r.get(\"enableTimers\")?`, completed in ${he.pretty(r,rt-mt,he.Type.DURATION)}`:\"\";Ce.reportInfo(null,`${Ae?`${Ae} `:\"\"}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(mt){throw se.end(),De.end(),await Z,await Re,mt}};for(let we of C)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[Z,De]of ie){if(ue.has(De.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let mt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of mt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Re=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(ue.add(De.anchoredDescriptor.descriptorHash),we.push(ee(async()=>{let mt=await g(De,{commandIndex:++le});return ie.delete(Z),ue.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:mt}})),!U))break}if(we.length===0){let Z=Array.from(ie.values()).map(De=>G.prettyLocator(r,De.anchoredLocator)).join(\", \");Ce.reportError(3,`Dependency cycle detected (${Z})`);return}let ye=await Promise.all(we);ye.forEach(({workspace:Z,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${G.prettyLocator(r,Z.anchoredLocator)} with exit code ${De}`)});let se=ye.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof se<\"u\"&&Ce.reportError(0,\"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph\")}});return me!==null?me:Be.exitCode()}};function hke(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on(\"finish\",()=>{s.end()});let n=new Promise(f=>{s.on(\"finish\",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on(\"finish\",()=>{a.end()}),[c,n]}function mPt(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${G.stringifyIdent(t.anchoredLocator)}]:`,c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[r%c.length];return he.pretty(e,n,f)}var yPt={commands:[K1,X1]},EPt=yPt;var tC=()=>({modules:new Map([[\"@yarnpkg/cli\",Gv],[\"@yarnpkg/core\",jv],[\"@yarnpkg/fslib\",_2],[\"@yarnpkg/libzip\",fv],[\"@yarnpkg/parsers\",J2],[\"@yarnpkg/shell\",mv],[\"clipanion\",oB],[\"semver\",IPt],[\"typanion\",Ea],[\"@yarnpkg/plugin-essentials\",hq],[\"@yarnpkg/plugin-catalog\",yq],[\"@yarnpkg/plugin-compat\",Bq],[\"@yarnpkg/plugin-constraints\",_q],[\"@yarnpkg/plugin-dlx\",Hq],[\"@yarnpkg/plugin-exec\",qq],[\"@yarnpkg/plugin-file\",Yq],[\"@yarnpkg/plugin-git\",pq],[\"@yarnpkg/plugin-github\",Kq],[\"@yarnpkg/plugin-http\",zq],[\"@yarnpkg/plugin-init\",Xq],[\"@yarnpkg/plugin-interactive-tools\",JW],[\"@yarnpkg/plugin-jsr\",zW],[\"@yarnpkg/plugin-link\",XW],[\"@yarnpkg/plugin-nm\",FY],[\"@yarnpkg/plugin-npm\",FK],[\"@yarnpkg/plugin-npm-cli\",qK],[\"@yarnpkg/plugin-pack\",bV],[\"@yarnpkg/plugin-patch\",XK],[\"@yarnpkg/plugin-pnp\",wY],[\"@yarnpkg/plugin-pnpm\",ez],[\"@yarnpkg/plugin-stage\",az],[\"@yarnpkg/plugin-typescript\",lz],[\"@yarnpkg/plugin-version\",pz],[\"@yarnpkg/plugin-workspace-tools\",hz]]),plugins:new Set([\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-catalog\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"])});function yke({cwd:t,pluginConfiguration:e}){let r=new Ca({binaryLabel:\"Yarn Package Manager\",binaryName:\"yarn\",binaryVersion:fn??\"<unknown>\"});return Object.assign(r,{defaultContext:{...Ca.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function CPt(t){if(je.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,s=\">=18.12.0\";if(Fr.satisfiesWithPrereleases(r,s))return!0;let a=new nt(`This tool requires a Node version compatible with ${s} (got ${r}). Upgrade Node, or set \\`YARN_IGNORE_NODE=1\\` in your environment.`);return Ca.defaultContext.stdout.write(t.error(a)),!1}async function Eke({selfPath:t,pluginConfiguration:e}){return await ze.find(fe.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function wPt(t,e,{yarnPath:r}){if(!ce.existsSync(r))return t.error(new Error(`The \"yarn-path\" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on(\"SIGINT\",()=>{});let s={stdio:\"inherit\",env:{...process.env,YARN_IGNORE_PATH:\"1\"}};try{(0,dke.execFileSync)(process.execPath,[fe.fromPortablePath(r),...e],s)}catch(a){return a.status??1}return 0}function BPt(t,e){let r=null,s=e;return e.length>=2&&e[0]===\"--cwd\"?(r=fe.toPortablePath(e[1]),s=e.slice(2)):e.length>=1&&e[0].startsWith(\"--cwd=\")?(r=fe.toPortablePath(e[0].slice(6)),s=e.slice(1)):e[0]===\"add\"&&e[e.length-2]===\"--cwd\"&&(r=fe.toPortablePath(e[e.length-1]),s=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?J.resolve(r):J.cwd(),s}function vPt(t,{configuration:e}){if(!e.get(\"enableTelemetry\")||mke.isCI||!process.stdout.isTTY)return;ze.telemetry=new ZI(e,\"puba9cdc10ec5790a2cf4969dd413a47270\");let s=/^@yarnpkg\\/plugin-(.*)$/;for(let a of e.plugins.keys())$I.has(a.match(s)?.[1]??\"\")&&ze.telemetry?.reportPluginName(a);t.binaryVersion&&ze.telemetry.reportVersion(t.binaryVersion)}function Ike(t,{configuration:e}){for(let r of e.plugins.values())for(let s of r.commands||[])t.register(s)}async function SPt(t,e,{selfPath:r,pluginConfiguration:s}){if(!CPt(t))return 1;let a=await Eke({selfPath:r,pluginConfiguration:s}),n=a.get(\"yarnPath\"),c=a.get(\"ignorePath\");if(n&&!c)return wPt(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let f=BPt(t,e);vPt(t,{configuration:a}),Ike(t,{configuration:a});let p=t.process(f,t.defaultContext);return p.help||ze.telemetry?.reportCommandName(p.path.join(\" \")),await t.run(p,t.defaultContext)}async function bde({cwd:t=J.cwd(),pluginConfiguration:e=tC()}={}){let r=yke({cwd:t,pluginConfiguration:e}),s=await Eke({pluginConfiguration:e,selfPath:null});return Ike(r,{configuration:s}),r}async function VR(t,{cwd:e=J.cwd(),selfPath:r,pluginConfiguration:s}){let a=yke({cwd:e,pluginConfiguration:s});function n(){Ca.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop.\nPlease report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once(\"beforeExit\",n);try{process.exitCode=42,process.exitCode=await SPt(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){Ca.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off(\"beforeExit\",n),await ce.rmtempPromise()}}VR(process.argv.slice(2),{cwd:J.cwd(),selfPath:fe.toPortablePath(fe.resolve(process.argv[1])),pluginConfiguration:tC()});})();\n/**\n  @license\n  Copyright (c) 2015, Rebecca Turner\n\n  Permission to use, copy, modify, and/or distribute this software for any\n  purpose with or without fee is hereby granted, provided that the above\n  copyright notice and this permission notice appear in all copies.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n  FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n  PERFORMANCE OF THIS SOFTWARE.\n */\n/**\n  @license\n  Copyright Node.js contributors. All rights reserved.\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to\n  deal in the Software without restriction, including without limitation the\n  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n  sell copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n  IN THE SOFTWARE.\n*/\n/**\n  @license\n  The MIT License (MIT)\n\n  Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n*/\n/**\n  @license\n  Copyright Joyent, Inc. and other Node contributors.\n\n  Permission is hereby granted, free of charge, to any person obtaining a\n  copy of this software and associated documentation files (the\n  \"Software\"), to deal in the Software without restriction, including\n  without limitation the rights to use, copy, modify, merge, publish,\n  distribute, sublicense, and/or sell copies of the Software, and to permit\n  persons to whom the Software is furnished to do so, subject to the\n  following conditions:\n\n  The above copyright notice and this permission notice shall be included\n  in all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n  NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n  USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/*! Bundled license information:\n\nis-number/index.js:\n  (*!\n   * is-number <https://github.com/jonschlinkert/is-number>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nto-regex-range/index.js:\n  (*!\n   * to-regex-range <https://github.com/micromatch/to-regex-range>\n   *\n   * Copyright (c) 2015-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nfill-range/index.js:\n  (*!\n   * fill-range <https://github.com/jonschlinkert/fill-range>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-extglob/index.js:\n  (*!\n   * is-extglob <https://github.com/jonschlinkert/is-extglob>\n   *\n   * Copyright (c) 2014-2016, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-glob/index.js:\n  (*!\n   * is-glob <https://github.com/jonschlinkert/is-glob>\n   *\n   * Copyright (c) 2014-2017, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nqueue-microtask/index.js:\n  (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\nrun-parallel/index.js:\n  (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\ngit-url-parse/lib/index.js:\n  (*!\n   * buildToken\n   * Builds OAuth token prefix (helper function)\n   *\n   * @name buildToken\n   * @function\n   * @param {GitUrl} obj The parsed Git url object.\n   * @return {String} token prefix\n   *)\n\nobject-assign/index.js:\n  (*\n  object-assign\n  (c) Sindre Sorhus\n  @license MIT\n  *)\n\nreact/cjs/react.production.min.js:\n  (** @license React v17.0.2\n   * react.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nscheduler/cjs/scheduler.production.min.js:\n  (** @license React v0.20.2\n   * scheduler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nreact-reconciler/cjs/react-reconciler.production.min.js:\n  (** @license React v0.26.2\n   * react-reconciler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nis-windows/index.js:\n  (*!\n   * is-windows <https://github.com/jonschlinkert/is-windows>\n   *\n   * Copyright © 2015-2018, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n*/\n"
  },
  {
    "path": ".yarn/sdks/eslint/bin/eslint.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/bin/eslint.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/bin/eslint.js your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/bin/eslint.js`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/api.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/config-api.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/config\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/config your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/config`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/universal.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/universal\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/universal your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/universal`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/unsupported-api.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/use-at-your-own-risk\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/use-at-your-own-risk your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/use-at-your-own-risk`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/package.json",
    "content": "{\n  \"name\": \"eslint\",\n  \"version\": \"9.22.0-sdk\",\n  \"main\": \"./lib/api.js\",\n  \"type\": \"commonjs\",\n  \"bin\": {\n    \"eslint\": \"./bin/eslint.js\"\n  },\n  \"exports\": {\n    \".\": {\n      \"types\": \"./lib/types/index.d.ts\",\n      \"default\": \"./lib/api.js\"\n    },\n    \"./config\": {\n      \"types\": \"./lib/types/config-api.d.ts\",\n      \"default\": \"./lib/config-api.js\"\n    },\n    \"./package.json\": \"./package.json\",\n    \"./use-at-your-own-risk\": {\n      \"types\": \"./lib/types/use-at-your-own-risk.d.ts\",\n      \"default\": \"./lib/unsupported-api.js\"\n    },\n    \"./rules\": {\n      \"types\": \"./lib/types/rules.d.ts\"\n    },\n    \"./universal\": {\n      \"types\": \"./lib/types/universal.d.ts\",\n      \"default\": \"./lib/universal.js\"\n    }\n  }\n}\n"
  },
  {
    "path": ".yarn/sdks/integrations.yml",
    "content": "# This file is automatically generated by @yarnpkg/sdks.\n# Manual changes might be lost!\n\nintegrations:\n  - vscode\n"
  },
  {
    "path": ".yarn/sdks/prettier/bin/prettier.cjs",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require prettier/bin/prettier.cjs\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real prettier/bin/prettier.cjs your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));\n"
  },
  {
    "path": ".yarn/sdks/prettier/index.cjs",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require prettier\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real prettier your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`prettier`));\n"
  },
  {
    "path": ".yarn/sdks/prettier/package.json",
    "content": "{\n  \"name\": \"prettier\",\n  \"version\": \"3.2.5-sdk\",\n  \"main\": \"./index.cjs\",\n  \"type\": \"commonjs\",\n  \"bin\": \"./bin/prettier.cjs\"\n}\n"
  },
  {
    "path": ".yarn/sdks/typescript/bin/tsc",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/bin/tsc\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/bin/tsc your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsc`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/bin/tsserver",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/bin/tsserver\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/bin/tsserver your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsserver`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsc.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsc.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/lib/tsc.js your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/lib/tsc.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsserver.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsserver.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\nconst moduleWrapper = exports => {\n  return wrapWithUserWrapper(moduleWrapperFn(exports));\n};\n\nconst moduleWrapperFn = tsserver => {\n  if (!process.versions.pnp) {\n    return tsserver;\n  }\n\n  const {isAbsolute} = require(`path`);\n  const pnpApi = require(`pnpapi`);\n\n  const isVirtual = str => str.match(/\\/(\\$\\$virtual|__virtual__)\\//);\n  const isPortal = str => str.startsWith(\"portal:/\");\n  const normalize = str => str.replace(/\\\\/g, `/`).replace(/^\\/?/, `/`);\n\n  const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {\n    return `${locator.name}@${locator.reference}`;\n  }));\n\n  // VSCode sends the zip paths to TS using the \"zip://\" prefix, that TS\n  // doesn't understand. This layer makes sure to remove the protocol\n  // before forwarding it to TS, and to add it back on all returned paths.\n\n  function toEditorPath(str) {\n    // We add the `zip:` prefix to both `.zip/` paths and virtual paths\n    if (isAbsolute(str) && !str.match(/^\\^?(zip:|\\/zip\\/)/) && (str.match(/\\.zip\\//) || isVirtual(str))) {\n      // We also take the opportunity to turn virtual paths into physical ones;\n      // this makes it much easier to work with workspaces that list peer\n      // dependencies, since otherwise Ctrl+Click would bring us to the virtual\n      // file instances instead of the real ones.\n      //\n      // We only do this to modules owned by the the dependency tree roots.\n      // This avoids breaking the resolution when jumping inside a vendor\n      // with peer dep (otherwise jumping into react-dom would show resolution\n      // errors on react).\n      //\n      const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;\n      if (resolved) {\n        const locator = pnpApi.findPackageLocator(resolved);\n        if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {\n          str = resolved;\n        }\n      }\n\n      str = normalize(str);\n\n      if (str.match(/\\.zip\\//)) {\n        switch (hostInfo) {\n          // Absolute VSCode `Uri.fsPath`s need to start with a slash.\n          // VSCode only adds it automatically for supported schemes,\n          // so we have to do it manually for the `zip` scheme.\n          // The path needs to start with a caret otherwise VSCode doesn't handle the protocol\n          //\n          // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910\n          //\n          // 2021-10-08: VSCode changed the format in 1.61.\n          // Before | ^zip:/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          // 2022-04-06: VSCode changed the format in 1.66.\n          // Before | ^/zip//c:/foo/bar.zip/package.json\n          // After  | ^/zip/c:/foo/bar.zip/package.json\n          //\n          // 2022-05-06: VSCode changed the format in 1.68\n          // Before | ^/zip/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          case `vscode <1.61`: {\n            str = `^zip:${str}`;\n          } break;\n\n          case `vscode <1.66`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          case `vscode <1.68`: {\n            str = `^/zip${str}`;\n          } break;\n\n          case `vscode`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          // To make \"go to definition\" work,\n          // We have to resolve the actual file system path from virtual path\n          // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)\n          case `coc-nvim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = resolve(`zipfile:${str}`);\n          } break;\n\n          // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)\n          // We have to resolve the actual file system path from virtual path,\n          // everything else is up to neovim\n          case `neovim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = `zipfile://${str}`;\n          } break;\n\n          default: {\n            str = `zip:${str}`;\n          } break;\n        }\n      } else {\n        str = str.replace(/^\\/?/, process.platform === `win32` ? `` : `/`);\n      }\n    }\n\n    return str;\n  }\n\n  function fromEditorPath(str) {\n    switch (hostInfo) {\n      case `coc-nvim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...\n        // So in order to convert it back, we use .* to match all the thing\n        // before `zipfile:`\n        return process.platform === `win32`\n          ? str.replace(/^.*zipfile:\\//, ``)\n          : str.replace(/^.*zipfile:/, ``);\n      } break;\n\n      case `neovim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for neovim is in format of zipfile:///<pwd>/.yarn/...\n        return str.replace(/^zipfile:\\/\\//, ``);\n      } break;\n\n      case `vscode`:\n      default: {\n        return str.replace(/^\\^?(zip:|\\/zip(\\/ts-nul-authority)?)\\/+/, process.platform === `win32` ? `` : `/`)\n      } break;\n    }\n  }\n\n  // Force enable 'allowLocalPluginLoads'\n  // TypeScript tries to resolve plugins using a path relative to itself\n  // which doesn't work when using the global cache\n  // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238\n  // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but\n  // TypeScript already does local loads and if this code is running the user trusts the workspace\n  // https://github.com/microsoft/vscode/issues/45856\n  const ConfiguredProject = tsserver.server.ConfiguredProject;\n  const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;\n  ConfiguredProject.prototype.enablePluginsWithOptions = function() {\n    this.projectService.allowLocalPluginLoads = true;\n    return originalEnablePluginsWithOptions.apply(this, arguments);\n  };\n\n  // And here is the point where we hijack the VSCode <-> TS communications\n  // by adding ourselves in the middle. We locate everything that looks\n  // like an absolute path of ours and normalize it.\n\n  const Session = tsserver.server.Session;\n  const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;\n  let hostInfo = `unknown`;\n\n  Object.assign(Session.prototype, {\n    onMessage(/** @type {string | object} */ message) {\n      const isStringMessage = typeof message === 'string';\n      const parsedMessage = isStringMessage ? JSON.parse(message) : message;\n\n      if (\n        parsedMessage != null &&\n        typeof parsedMessage === `object` &&\n        parsedMessage.arguments &&\n        typeof parsedMessage.arguments.hostInfo === `string`\n      ) {\n        hostInfo = parsedMessage.arguments.hostInfo;\n        if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {\n          const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(\n            // The RegExp from https://semver.org/ but without the caret at the start\n            /(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n          ) ?? []).map(Number)\n\n          if (major === 1) {\n            if (minor < 61) {\n              hostInfo += ` <1.61`;\n            } else if (minor < 66) {\n              hostInfo += ` <1.66`;\n            } else if (minor < 68) {\n              hostInfo += ` <1.68`;\n            }\n          }\n        }\n      }\n\n      const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {\n        return typeof value === 'string' ? fromEditorPath(value) : value;\n      });\n\n      return originalOnMessage.call(\n        this,\n        isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)\n      );\n    },\n\n    send(/** @type {any} */ msg) {\n      return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {\n        return typeof value === `string` ? toEditorPath(value) : value;\n      })));\n    }\n  });\n\n  return tsserver;\n};\n\nconst [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));\n// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.\n// Ref https://github.com/microsoft/TypeScript/pull/55326\nif (major > 5 || (major === 5 && minor >= 5)) {\n  moduleWrapper(absRequire(`typescript`));\n}\n\n// Defer to the real typescript/lib/tsserver.js your application uses\nmodule.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsserverlibrary.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsserverlibrary.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\nconst moduleWrapper = exports => {\n  return wrapWithUserWrapper(moduleWrapperFn(exports));\n};\n\nconst moduleWrapperFn = tsserver => {\n  if (!process.versions.pnp) {\n    return tsserver;\n  }\n\n  const {isAbsolute} = require(`path`);\n  const pnpApi = require(`pnpapi`);\n\n  const isVirtual = str => str.match(/\\/(\\$\\$virtual|__virtual__)\\//);\n  const isPortal = str => str.startsWith(\"portal:/\");\n  const normalize = str => str.replace(/\\\\/g, `/`).replace(/^\\/?/, `/`);\n\n  const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {\n    return `${locator.name}@${locator.reference}`;\n  }));\n\n  // VSCode sends the zip paths to TS using the \"zip://\" prefix, that TS\n  // doesn't understand. This layer makes sure to remove the protocol\n  // before forwarding it to TS, and to add it back on all returned paths.\n\n  function toEditorPath(str) {\n    // We add the `zip:` prefix to both `.zip/` paths and virtual paths\n    if (isAbsolute(str) && !str.match(/^\\^?(zip:|\\/zip\\/)/) && (str.match(/\\.zip\\//) || isVirtual(str))) {\n      // We also take the opportunity to turn virtual paths into physical ones;\n      // this makes it much easier to work with workspaces that list peer\n      // dependencies, since otherwise Ctrl+Click would bring us to the virtual\n      // file instances instead of the real ones.\n      //\n      // We only do this to modules owned by the the dependency tree roots.\n      // This avoids breaking the resolution when jumping inside a vendor\n      // with peer dep (otherwise jumping into react-dom would show resolution\n      // errors on react).\n      //\n      const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;\n      if (resolved) {\n        const locator = pnpApi.findPackageLocator(resolved);\n        if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {\n          str = resolved;\n        }\n      }\n\n      str = normalize(str);\n\n      if (str.match(/\\.zip\\//)) {\n        switch (hostInfo) {\n          // Absolute VSCode `Uri.fsPath`s need to start with a slash.\n          // VSCode only adds it automatically for supported schemes,\n          // so we have to do it manually for the `zip` scheme.\n          // The path needs to start with a caret otherwise VSCode doesn't handle the protocol\n          //\n          // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910\n          //\n          // 2021-10-08: VSCode changed the format in 1.61.\n          // Before | ^zip:/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          // 2022-04-06: VSCode changed the format in 1.66.\n          // Before | ^/zip//c:/foo/bar.zip/package.json\n          // After  | ^/zip/c:/foo/bar.zip/package.json\n          //\n          // 2022-05-06: VSCode changed the format in 1.68\n          // Before | ^/zip/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          case `vscode <1.61`: {\n            str = `^zip:${str}`;\n          } break;\n\n          case `vscode <1.66`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          case `vscode <1.68`: {\n            str = `^/zip${str}`;\n          } break;\n\n          case `vscode`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          // To make \"go to definition\" work,\n          // We have to resolve the actual file system path from virtual path\n          // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)\n          case `coc-nvim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = resolve(`zipfile:${str}`);\n          } break;\n\n          // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)\n          // We have to resolve the actual file system path from virtual path,\n          // everything else is up to neovim\n          case `neovim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = `zipfile://${str}`;\n          } break;\n\n          default: {\n            str = `zip:${str}`;\n          } break;\n        }\n      } else {\n        str = str.replace(/^\\/?/, process.platform === `win32` ? `` : `/`);\n      }\n    }\n\n    return str;\n  }\n\n  function fromEditorPath(str) {\n    switch (hostInfo) {\n      case `coc-nvim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...\n        // So in order to convert it back, we use .* to match all the thing\n        // before `zipfile:`\n        return process.platform === `win32`\n          ? str.replace(/^.*zipfile:\\//, ``)\n          : str.replace(/^.*zipfile:/, ``);\n      } break;\n\n      case `neovim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for neovim is in format of zipfile:///<pwd>/.yarn/...\n        return str.replace(/^zipfile:\\/\\//, ``);\n      } break;\n\n      case `vscode`:\n      default: {\n        return str.replace(/^\\^?(zip:|\\/zip(\\/ts-nul-authority)?)\\/+/, process.platform === `win32` ? `` : `/`)\n      } break;\n    }\n  }\n\n  // Force enable 'allowLocalPluginLoads'\n  // TypeScript tries to resolve plugins using a path relative to itself\n  // which doesn't work when using the global cache\n  // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238\n  // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but\n  // TypeScript already does local loads and if this code is running the user trusts the workspace\n  // https://github.com/microsoft/vscode/issues/45856\n  const ConfiguredProject = tsserver.server.ConfiguredProject;\n  const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;\n  ConfiguredProject.prototype.enablePluginsWithOptions = function() {\n    this.projectService.allowLocalPluginLoads = true;\n    return originalEnablePluginsWithOptions.apply(this, arguments);\n  };\n\n  // And here is the point where we hijack the VSCode <-> TS communications\n  // by adding ourselves in the middle. We locate everything that looks\n  // like an absolute path of ours and normalize it.\n\n  const Session = tsserver.server.Session;\n  const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;\n  let hostInfo = `unknown`;\n\n  Object.assign(Session.prototype, {\n    onMessage(/** @type {string | object} */ message) {\n      const isStringMessage = typeof message === 'string';\n      const parsedMessage = isStringMessage ? JSON.parse(message) : message;\n\n      if (\n        parsedMessage != null &&\n        typeof parsedMessage === `object` &&\n        parsedMessage.arguments &&\n        typeof parsedMessage.arguments.hostInfo === `string`\n      ) {\n        hostInfo = parsedMessage.arguments.hostInfo;\n        if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {\n          const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(\n            // The RegExp from https://semver.org/ but without the caret at the start\n            /(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n          ) ?? []).map(Number)\n\n          if (major === 1) {\n            if (minor < 61) {\n              hostInfo += ` <1.61`;\n            } else if (minor < 66) {\n              hostInfo += ` <1.66`;\n            } else if (minor < 68) {\n              hostInfo += ` <1.68`;\n            }\n          }\n        }\n      }\n\n      const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {\n        return typeof value === 'string' ? fromEditorPath(value) : value;\n      });\n\n      return originalOnMessage.call(\n        this,\n        isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)\n      );\n    },\n\n    send(/** @type {any} */ msg) {\n      return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {\n        return typeof value === `string` ? toEditorPath(value) : value;\n      })));\n    }\n  });\n\n  return tsserver;\n};\n\nconst [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));\n// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.\n// Ref https://github.com/microsoft/TypeScript/pull/55326\nif (major > 5 || (major === 5 && minor >= 5)) {\n  moduleWrapper(absRequire(`typescript`));\n}\n\n// Defer to the real typescript/lib/tsserverlibrary.js your application uses\nmodule.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/typescript.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/package.json",
    "content": "{\n  \"name\": \"typescript\",\n  \"version\": \"5.8.2-sdk\",\n  \"main\": \"./lib/typescript.js\",\n  \"type\": \"commonjs\",\n  \"bin\": {\n    \"tsc\": \"./bin/tsc\",\n    \"tsserver\": \"./bin/tsserver\"\n  }\n}\n"
  },
  {
    "path": ".yarnrc.yml",
    "content": "npmScopes:\n  jsr:\n    npmRegistryServer: 'https://npm.jsr.io'\n\npackageExtensions:\n  '@algolia/autocomplete-core@1.17.7':\n    dependencies:\n      '@algolia/client-search': latest\n      algoliasearch: latest\n      search-insights: latest\n  '@algolia/autocomplete-plugin-algolia-insights@1.17.7':\n    dependencies:\n      '@algolia/client-search': latest\n      algoliasearch: latest\n  '@docsearch/react@3.8.2':\n    dependencies:\n      '@algolia/client-search': latest\n  sandpack-vue3@3.1.11:\n    dependencies:\n      '@lezer/common': latest\n\nyarnPath: .yarn/releases/yarn-4.12.0.cjs\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# es-toolkit Changelog\n\n## Version v1.45.1\n\nReleased on March 4th, 2026.\n\n- Reverted the return type of `sample` to not include `undefined`.\n- Fixed Deno install command to include `jsr:` prefix. ([#1627])\n\nWe sincerely thank @mwln for their contributions. We appreciate your great efforts!\n\n## Version v1.45.0\n\nReleased on March 2nd, 2026.\n\n- Fixed `findIndex` to add missing default parameter for `doesMatch`. ([#1373])\n- Fixed `sample` to include `undefined` in return union type. ([#1302])\n- Fixed `cloneDeep` to support cloning `Error` objects.\n- Fixed `retry` to correctly match retry count with the `retries` option.\n- Fixed missing `Map` and `Set` in check-dist entrypoints.\n- Fixed missing packages in `publishConfig`. ([#1597])\n- Reverted the overload for runtime-determined key arrays in `omit`. ([#1595])\n- Added AI Integration page with `llms.txt` documentation to docs.\n\nWe sincerely thank @D-Sketon, @dayongkr, @matthiasfeist, @raon0211, and @screendriver for their contributions. We appreciate your great efforts!\n\n## Version v1.44.0\n\nReleased on January 16th, 2026.\n\n- Added `shouldRetry` option to `retry` function. ([#1585])\n- Added `isEmptyObject` predicate function. ([#1584])\n- Added `isNumber` predicate function.\n- Enhanced error cloning to support `AggregateError`. ([#1563])\n- Implemented collection methods for Maps and Sets.\n- Added bundle size analysis and visualization components to docs. ([#1564])\n- Fixed `flattenObject` to retain empty objects and arrays.\n- Enhanced type safety for `clone` function.\n- Fixed `clone` error when cloning object with null prototype. ([#1570])\n- Fixed array function callbacks to include index and array parameters. ([#1561])\n- Fixed `compat/cloneDeep` and `cloneDeepWith` to clone null-prototype objects as regular objects. ([#1562])\n- Fixed `compat/clamp` to ensure consistency with lodash. ([#1555])\n- Simplified `intersection` filter callback for consistency. ([#1582])\n- Fixed incorrect function names and output in `cloneDeep` JSDoc examples. ([#1583])\n\nWe sincerely thank @raon0211, @dayongkr, @eunwoo-levi, @matt-oakes, @T3sT3ro, and @D-Sketon for their contributions. We appreciate your great efforts!\n\n## Version v1.43.0\n\nReleased on December 12th, 2025.\n\n- Enhanced `merge` to handle arrays and objects consistently, and to match lodash's behavior with date values and array-like objects. ([#1553], [#1542], [#1548])\n- Fixed `isMatch` and `isMatchWith` to match lodash's behavior.\n- Fixed `intersectionBy` implementation and removed duplicates when the mapper produces the same values. ([#1528])\n- Fixed `throttle` working like debounce.\n- Fixed type inference in `toSnakeCaseKeys`, `toCamelCaseKeys` for edge cases and improved type inference for uppercase keys. ([#1538])\n- Fixed casing utilities (`camelCase`, `kebabCase`, `lowerCase`, `snakeCase`, `startCase`, `upperCase`) to match lodash's behavior. ([#1525])\n- Fixed `compat/template` to disable ES interpolation when custom `interpolate` is provided. ([#1527])\n- Fixed incorrect example in `differenceBy` documentation. ([#1543])\n- Performance improvement: updated `deburr` to use arrays to construct the deburrMap. ([#1526])\n\nWe sincerely thank @dayongkr, @raon0211, @wo-o29, @Yeom-JinHo, @Copilot, @oshosh, @vbfox, @sukvvon, @sankeyangshu, @D-Sketon, @seo-rii for their contributions. We appreciate your great efforts!\n\n## Version v1.42.0\n\nReleased on November 17th, 2025.\n\n- Added new async utilities: `filterAsync`, `flatMapAsync`, `forEachAsync`, `mapAsync`, `reduceAsync`, and `limitAsync` for handling asynchronous operations.\n- Exported `ThrottleOptions` and `DebounceOptions` interfaces for better type support.\n- Fixed `isFinite` to implement type predicate to narrow type to number.\n- Fixed `isSafeInteger` to implement type predicate to narrow type to number.\n- Fixed `omit` to prevent adding index properties to array-like objects.\n- Fixed `mergeWith` to remove unnecessary nullish coalescing for 100% branch coverage.\n- Fixed `compat/updateWith` to remove unreachable code and add prototype pollution test.\n- Updated documentation headings for consistency.\n- Improved test coverage for `compat/mergeWith`, `compat/unset`, `get`, `toMerged`, `mergeWith`, and `compat/intersectionBy` with additional edge cases and security tests.\n\nWe sincerely thank @Debbl, @wo-o29, @raon0211, @Yeom-JinHo, @sukvvon, and @D-Sketon for their contributions. We appreciate your great efforts!\n\n## Version v1.41.0\n\nReleased on October 24th, 2025.\n\n- Enhanced `throttle` to preserve `this` context when called as a method.\n- Added type guard support for `partition` function.\n- Fixed `omit` to support runtime-determined key arrays with proper overloads.\n- Fixed `defaults` in compatibility layer to properly handle undefined and null sources.\n- Fixed `toSnakeCaseKeys` and `toCamelCaseKeys` to correctly return types for non-plain objects.\n- Fixed `toMerged` and `mergeWith` to properly handle shared objects in merge logic.\n- Fixed `compat/union` to support array-like objects.\n- Fixed `compat/updateWith` to use `get` for value retrieval in updater function.\n- Fixed circular import between `isMatch` and `isMatchWith`.\n- Fixed `find` and `findLast` by simplifying logic and removing unnecessary checks.\n- Fixed `takeRight` by improving test coverage and removing redundant checks.\n- Fixed `curry` and `curryRight` by removing unnecessary type assertions.\n- Fixed `isEqualWith` and `mapKeys` by removing unnecessary type assertions.\n- Improved performance for `meanBy` by removing intermediate array creation.\n- Updated build system to use UMD format instead of IIFE for browser builds.\n- Fixed numerous documentation examples across compat modules.\n- Improved test coverage with additional test cases for edge cases and compatibility.\n\nWe sincerely thank @the5thbeatle, @wo-o29, @hwibaski, @manudeli, @raon0211, @dayongkr, @D-Sketon, @yoouungyoung, @Dohun-choi, @sukvvon, @zoulou00, and @sen2y for their contributions. We appreciate your great efforts!\n\n## Version v1.40.0\n\nReleased on October 8th, 2025.\n\n- Enhanced `sumBy` to pass the element index to the `getValue` callback function.\n- Improved performance for `uniq` function.\n- Fixed `cloneDeepWith` to handle runtime errors in environments without Blob support and correctly clone Boolean, Number, and String objects.\n- Fixed `omit` to avoid unnecessary deep cloning, improving performance.\n- Fixed `toCamelCaseKeys` to properly handle PascalCase type conversion.\n- Fixed `toPath` to correctly handle arrays and non-string inputs.\n- Fixed `repeat` to validate and handle invalid repeat counts.\n- Fixed `sortedIndexBy` to properly handle default iteratee.\n- Fixed `some` predicate check to correctly handle null and undefined cases.\n- Fixed compatibility issue in `compat/unset` with nonexistent paths.\n- Fixed several JSDoc issues across multiple functions including return types, parameter descriptions, and method names.\n- Improved documentation clarity and consistency across multiple functions.\n- Enhanced test coverage with additional test cases for compat functions and edge cases.\n- Updated build configuration and CI workflows.\n\nWe sincerely thank @wo-o29, @D-Sketon, @HidenLee, @yoouung, @manudeli, @dayongkr, @Li13, @nicklemmon, @sen2y, @miinhho, @raon0211, @joshkel, @jgjgill, @mlnwns, @Dohun-choi, @PinkChampagne17, @sukvvon, @YOUNGHO8762, @caseBread, @Jeongeun-Choi, @artechventure and hoyyChoi for their contributions. We appreciate your great efforts!\n\n## Version v1.39.10\n\nReleased on August 17th, 2025.\n\n- Fixed `defaultsDeep` to properly handle deep merging of objects in arrays\n- Fixed several documentation issues and examples across multiple functions\n\nWe sincerely thank @wo-o29, @thwlckd, @kilimandzharov, and @dayongkr for their contributions. We appreciate your great efforts!\n\n## Version v1.39.9\n\nReleased on August 10th, 2025.\n\n- Fixed `mergeWith` to properly handle null values returned from customizer function.\n- Fixed `cloneDeepWith` to properly handle customizer returning null values.\n- Fixed some of the documentation issues.\n\nWe sincerely thank @raon0211, @joshkel, and @Najeong-Kim for their contributions. We appreciate your great efforts!\n\n## Version v1.39.8\n\nReleased on July 25th, 2025.\n\n- Aligned the types of `fill`, `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `remove`, and `reverse` in our compatibility library with the latest Lodash types (`@types/lodash` v4.17.20).\n\n## Version v1.39.7\n\nReleased on July 9th, 2025.\n\n- Fixed a compatibility issue with Lodash's `debounce` and `throttle` functions.\n- Remove useless source map for reduce bundle size.\n- Fix some of the documentation issues.\n\nWe sincerely thank @dayongkr, @cobocho, @raon0211, and @D-Sketon for their contributions. We appreciate your great efforts!\n\n## Version v1.39.6\n\nReleased on July 2th, 2025.\n\n- Fixed handling of null/undefined values in `values` function.\n- Fixed type safety in `compat/get` by adding GetFieldType utility type.\n\nWe sincerely thank @raon0211, @dayongkr, @yhb-flydream, @ssi02014, @JeongHwan-dev, and @guesung for their contributions. We appreciate your great efforts!\n\n## Version v1.39.5\n\nReleased on June 24th, 2025.\n\n- Fixed type compatibility issues between `es-toolkit/compat` and `@types/lodash`.\n- Improved documentation.\n\nWe thank @raon0211, @dayongkr, @sukvvon, and @yhb-flydream for their contributions.\n\n## Version v1.39.4\n\nReleased on June 21st, 2025.\n\n- Fixed prototype pollution issue in es-toolkit to enhance security.\n- Enhanced build system to provide compat/\\* functions in CommonJS format by default.\n\nWe thank @raon0211, and @dayongkr for their contributions.\n\n## Version v1.39.3\n\nReleased on June 7th, 2025.\n\n- Fixed postbuild script to ensure compat function categorization aligns with src directory structure.\n\n## Version v1.39.2\n\nReleased on June 7th, 2025.\n\n- Added dual package export support for individual compat functions (e.g., `es-toolkit/compat/add`).\n\n## Version v1.39.1\n\nReleased on June 6th, 2025.\n\n- Resolved mismatch between named and default exports in compat .d.ts and .js files to improve TypeScript integration.\n\n## Version v1.39.0\n\n🎉 Released on June 5th, 2025. 🎉\n\nWe're thrilled to announce that `es-toolkit/compat` has achieved full compatibility with Lodash! 🎉\n\nA huge thank you to all our contributors who made this possible.\n\n- Introduced compatibility functions for [defaultsDeep](https://es-toolkit.slash.page/reference/compat/object/defaultsDeep.html), [isMatchWith](https://es-toolkit.slash.page/reference/compat/predicate/isMatchWith.html), [flatMapDepth](https://es-toolkit.slash.page/reference/compat/array/flatMapDepth.html), [flatMapDeep](https://es-toolkit.slash.page/reference/compat/array/flatMapDeep.html), [overArgs](https://es-toolkit.slash.page/reference/compat/function/overArgs.html), [findLastKey](https://es-toolkit.slash.page/reference/compat/object/findLastKey.html) and [truncate](https://es-toolkit.slash.page/reference/compat/string/truncate.html).\n- Enhanced build system to support `es-toolkit/compat/*` module imports.\n- Fixed special functions like `each` to ensure proper functionality.\n- Fixed Deno compatibility issues for `defaultsDeep` function.\n- Fixed import paths in Deno environment.\n- Added benchmark comparing es-toolkit and lodash `identity` function performance.\n- Improved documentation and test coverage for various functions.\n\nWe sincerely thank @raon0211, @dayongkr, @mreiden, @hwibaski, @shren207, @jiji-hoon96, and @myungjuice for their contributions. We appreciate your great efforts!\n\n### ⭐️ Special Thanks to Our Amazing Contributors Who Made 100% Compatibility Possible ⭐️\n\n@raon0211, @dayongkr, @D-Sketon, @mass2527, @ssi02014, @shren207, @chhw130, @haejunejung, @jsparkdev, @manudeli, @jgjgill, @hyesungoh, @kaehehehe, @filipsobol, @fvsch, @wondonghwi, @seungrodotlee, @bertyhell, @minchodang, @Jeong-Rae, @kangju2000, @juno7803, @wojtekmaj, @mattiacoll, @changwoolab, @po4tion, @gyumong, @choi2021, @mancuoj, @de-novo, @eunhyulkim, @kim-sung-jee, @gs18004, @Hanna922, @Na-hyunwoo, @aken-you, @tanggd, @ho991217, @piquark6046, @jiji-hoon96, @seonghun0828, @pkovzz, @nnnnoel, @noelkim-prestolabs, @minsoo-web, @hautest, @scato3, @l2hyunwoo, @WooWan, @VVSOGI, @k-jeonghee, @knott11, @lukaszkowalik2, @moonheekim0118, @sadobass, @minjongbaek, @umsungjun, @sossost, @sunrabbit123, @Seung-wan, @cruelladevil, @iDevGon, @oror-sine, @1eeminhyeong, @benzyminzy, @BlackWhite2000, @tooooo1, @L2HYUNN, @DonghyunKim98, @dasom-jo, @guesung, @uniqueeest, @KiKoS0, @myungjuice, @seung-juv, @Collection50, @nowethan, @coding-honey, @ariandel-dev, @apeltop, @jch1223, @yhay81, @milooy, @raviqqe, @youznn, @BinskLee, @YEONDG, @shinwonse, @willmanduffy, @vjo, @touhidrahman, @T3sT3ro, @belgattitude, @WISUNGWON, @anaclumos, @hsskey, @BasixKOR, @Kyujenius, @Dohun-choi, @dngur9801, @sanginchun, @westofsky, @DONG-8, @yhmpc, @pbstar, @MoXiaoluo, @uussong, @tuhm1, @tisou1, @spookyuser, @sa02045, @Hotanya, @nia3y, @mreiden, @kms0219kms, @IkumaTadokoro, @hansolbangul, @hainan-612, @hwibaski, @jeongshin, @HoberMin, @ohprettyhak, @gweesin, @FengBuPi, @kyvg, @evan-moon, @chldmsqls34, @kimpuro, @dogagenc, @Duck-98, @redd97, @faner11, @bhollis, @jaehunn, @babay123, @beomxtone, @ankitjha420, @shan-mx, @2skydev, @StyleShit, @confidential-nt, @siddsarkar, @seongminn, @healtheloper, @pnodet, @Gaic4o, @leeminhee119, @leehj322, @kristian240, @kingston, @kim-dongho, @jungwoo3490, @joris-gallot, @jonganebski, @jiwooproity, @moshuying, @jakvbs, @therealjamesjung, @SaeWooKKang and @HyeokjaeLee\n\n## Version v1.38.0\n\nReleased on May 18th, 2025.\n\n- Added compatibility functions for [bindAll](https://es-toolkit.slash.page/reference/compat/util/bindAll.html), [setWith](https://es-toolkit.slash.page/reference/compat/object/setWith.html), [memoize](https://es-toolkit.slash.page/reference/function/memoize.html), [isNative](https://es-toolkit.slash.page/reference/compat/predicate/isNative.html), [invokeMap](https://es-toolkit.slash.page/reference/compat/array/invokeMap.html), [clone](https://es-toolkit.slash.page/reference/object/clone.html), [cloneWith](https://es-toolkit.slash.page/reference/compat/object/cloneWith.html), and [sortedLastIndexOf](https://es-toolkit.slash.page/reference/compat/array/sortedLastIndexOf.html).\n- Enhanced [invariant](https://es-toolkit.slash.page/reference/util/invariant.html) function to accept Error instances and added [assert](https://es-toolkit.slash.page/reference/util/assert.html) alias.\n- Fixed type definitions and empty array handling in [maxBy](https://es-toolkit.slash.page/reference/array/maxBy.html) and [minBy](https://es-toolkit.slash.page/reference/array/minBy.html).\n- Fixed typo 'Partail' to 'Partial' in [findKey](https://es-toolkit.slash.page/reference/object/findKey.html) type annotation.\n- Enhanced [max](https://es-toolkit.slash.page/reference/math/max.html) and [min](https://es-toolkit.slash.page/reference/math/min.html) functions to skip NaN, symbol, and null values, and return undefined when all values are skipped.\n- Fixed sparse array handling in compat functions to match Lodash's behavior.\n- Improved test coverage and documentation for various functions.\n- Fixed various documentation issues and typos.\n\nWe sincerely thank @myungjuice, @scato3, @uniqueeest, @YEONDG, @shren207, @hyesungoh, @kms0219kms, @minjongbaek, @kristian240, @D-Sketon, @Seung-wan, @jiji-hoon96, @raon0211, and @dayongkr for their contributions. We appreciate your great efforts!\n\n## Version v1.37.2\n\nReleased on May 4th, 2025.\n\n- Fixed an issue in `es-toolkit/compat`'s `throttle` function to match Lodash's behavior by immediately invoking the throttled function when wait time is zero.\n\n## Version v1.37.1\n\nReleased on May 3rd, 2025.\n\n- Fixed a bug in JSR's `@es-toolkit/es-toolkit` package that prevented importing the `camelCase` function in Deno.\n\n## Version v1.37.0\n\nReleased on May 3rd, 2025.\n\n- Introduced compatibility functions for [result](https://es-toolkit.slash.page/reference/compat/object/result.html), [omitBy](https://es-toolkit.slash.page/reference/object/omitBy.html), [xorBy](https://es-toolkit.slash.page/reference/array/xorBy.html), [xorWith](https://es-toolkit.slash.page/reference/array/xorWith.html), [unzipWith](https://es-toolkit.slash.page/reference/array/unzipWith.html), [sampleSize](https://es-toolkit.slash.page/reference/array/sampleSize.html), [transform](https://es-toolkit.slash.page/reference/compat/object/transform.html), [wrap](https://es-toolkit.slash.page/reference/compat/function/wrap.html), [countBy](https://es-toolkit.slash.page/reference/array/countBy.html), and [xor](https://es-toolkit.slash.page/reference/array/xor.html).\n- Added vitest benchmark for [ary](https://es-toolkit.slash.page/reference/function/ary.html) function.\n- Fixed string comparison in [sortBy](https://es-toolkit.slash.page/reference/array/sortBy.html) and [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html) by removing locale comparison and using ASCII code instead.\n- Fixed type definition in [isBuffer](https://es-toolkit.slash.page/reference/predicate/isBuffer.html).\n- Fixed internal documentation links for Korean and Japanese headings.\n- Improved code readability and documentation for various functions.\n- Prevented circular dependencies by updating import paths in [toCamelCaseKeys](https://es-toolkit.slash.page/reference/object/toCamelCaseKeys.html) and [toSnakeCaseKeys](https://es-toolkit.slash.page/reference/object/toSnakeCaseKeys.html).\n\nWe sincerely thank @chldmsqls34, @umsungjun, @raon0211, @dayongkr, @shren207, @oror-sine, @L2HYUNN, @D-Sketon, @ariandel-dev, @Jeong-Rae, and @beomxtone for their contributions. We appreciate your great efforts!\n\n## Version v1.36.0\n\nReleased on April 24th, 2025.\n\n- Introduced compatibility functions for [groupBy](https://es-toolkit.slash.page/reference/array/groupBy.html), [partial](https://es-toolkit.slash.page/reference/function/partial.html), [partialRight](https://es-toolkit.slash.page/reference/function/partialRight.html), [forEachRight](https://es-toolkit.slash.page/reference/array/forEachRight.html), [forOwnRight](https://es-toolkit.slash.page/reference/compat/object/forOwnRight.html), [forIn](https://es-toolkit.slash.page/reference/compat/object/forIn.html), [forInRight](https://es-toolkit.slash.page/reference/compat/object/forInRight.html), [overEvery](https://es-toolkit.slash.page/reference/compat/util/overEvery.html), [hasIn](https://es-toolkit.slash.page/reference/compat/object/hasIn.html), [pullAt](https://es-toolkit.slash.page/reference/array/pullAt.html), [forOwn](https://es-toolkit.slash.page/reference/compat/object/forOwn.html), [pullAllWith](https://es-toolkit.slash.page/reference/compat/array/pullAllWith.html), [overSome](https://es-toolkit.slash.page/reference/compat/util/overSome.html), [partition](https://es-toolkit.slash.page/reference/array/partition.html), and [flatMap](https://es-toolkit.slash.page/reference/array/flatMap.html).\n- Fixed compatibility issues in [take](https://es-toolkit.slash.page/reference/array/take.html), [takeRight](https://es-toolkit.slash.page/reference/array/takeRight.html), [defaults](https://es-toolkit.slash.page/reference/compat/object/defaults.html), [repeat](https://es-toolkit.slash.page/reference/compat/string/repeat.html), and [words](https://es-toolkit.slash.page/reference/string/words.html) by adding proper guards.\n- Fixed [throttle](https://es-toolkit.slash.page/reference/function/throttle.html) behavior when both leading and trailing options are enabled.\n- Improved performance for [find](https://es-toolkit.slash.page/reference/compat/array/find.html) by removing unnecessary slice operations.\n- Enhanced performance of [toPairs](https://es-toolkit.slash.page/reference/compat/object/toPairs.html) by pre-allocating arrays and using iterator values.\n- Simplified implementation and aligned types with Lodash for [partition](https://es-toolkit.slash.page/reference/array/partition.html).\n\nWe sincerely thank @D-Sketon, @raon0211, @dayongkr, @minjongbaek, @seungrodotlee, @mass2527, @uniqueeest, @leehj322, @cruelladevil, @shren207, and @ssi02014 for their contributions. We appreciate your great efforts!\n\n## Version v1.35.0\n\nReleased on April 16th, 2025.\n\n- Added support for [toCamelCaseKeys](https://es-toolkit.slash.page/reference/object/toCamelCaseKeys.html) and [toSnakeCaseKeys](https://es-toolkit.slash.page/reference/object/toSnakeCaseKeys.html).\n- Added support for custom delay function based on attempts in [retry](https://es-toolkit.slash.page/reference/function/retry.html).\n- Introduced compatibility functions for [at](https://es-toolkit.slash.page/reference/array/at.html) (array), [split](https://es-toolkit.slash.page/reference/compat/string/split.html), [shuffle](https://es-toolkit.slash.page/reference/array/shuffle.html), [zipWith](https://es-toolkit.slash.page/reference/array/zipWith.html), [zipObject](https://es-toolkit.slash.page/reference/array/zipObject.html), [keyBy](https://es-toolkit.slash.page/reference/array/keyBy.html), [assign](https://es-toolkit.slash.page/reference/compat/object/assign.html), [assignInWith](https://es-toolkit.slash.page/reference/compat/object/assignInWith.html), [assignWith](https://es-toolkit.slash.page/reference/compat/object/assignWith.html), [update](https://es-toolkit.slash.page/reference/compat/object/update.html), [updateWith](https://es-toolkit.slash.page/reference/compat/object/updateWith.html), [uniqWith](https://es-toolkit.slash.page/reference/array/uniqWith.html), [unionBy](https://es-toolkit.slash.page/reference/array/unionBy.html), [unionWith](https://es-toolkit.slash.page/reference/array/unionWith.html), [takeWhile](https://es-toolkit.slash.page/reference/array/takeWhile.html), [sortedLastIndex](https://es-toolkit.slash.page/reference/compat/array/sortedLastIndex.html), [sortedLastIndexBy](https://es-toolkit.slash.page/reference/compat/array/sortedLastIndexBy.html), [toPairs](https://es-toolkit.slash.page/reference/compat/object/toPairs.html), [toPairsIn](https://es-toolkit.slash.page/reference/compat/object/toPairsIn.html), [cond](https://es-toolkit.slash.page/reference/compat/util/cond.html), [over](https://es-toolkit.slash.page/reference/compat/util/over.html), [functions](https://es-toolkit.slash.page/reference/compat/object/functions.html), and [create](https://es-toolkit.slash.page/reference/compat/object/create.html) in `es-toolkit/compat`.\n- Fixed Lodash compatibility issues in [pick](https://es-toolkit.slash.page/reference/object/pick.html) and [pickBy](https://es-toolkit.slash.page/reference/object/pickBy.html).\n\nWe sincerely thank @shren207, @kim-sung-jee, @HyeokjaeLee, @Jeong-Rae, @D-Sketon, @jsparkdev, @wojtekmaj, @FengBuPi, @oror-sine, @L2HYUNN, @gs18004, @ohprettyhak, and @kimpuro for their contributions. We appreciate your great efforts!\n\n## Version v1.34.1\n\nReleased on March 27th, 2025.\n\n- Fixed a bug in [isBrowser](https://es-toolkit.slash.page/reference/predicate/isBrowser.html) and [isNode](https://es-toolkit.slash.page/reference/predicate/isNode.html) that caused them to not work properly in Deno environments.\n\n## Version v1.34.0\n\nReleased on March 27th, 2025.\n\n- Added support for [isBrowser](https://es-toolkit.slash.page/reference/predicate/isBrowser.html), [isNode](https://es-toolkit.slash.page/reference/predicate/isNode.html), [attempt](https://es-toolkit.slash.page/reference/util/attempt.html), [attemptAsync](https://es-toolkit.slash.page/reference/util/attemptAsync.html).\n- Introduced compatibility functions for [functionsIn](https://es-toolkit.slash.page/reference/compat/object/functionsIn.html), [meanBy](https://es-toolkit.slash.page/reference/math/meanBy.html), [minBy](https://es-toolkit.slash.page/reference/math/minBy.html), [mean](https://es-toolkit.slash.page/reference/math/mean.html), [sortedIndexOf](https://es-toolkit.slash.page/reference/compat/array/sortedIndexOf.html).\n- Fixed compatibility with lodash for [set](https://es-toolkit.slash.page/reference/compat/object/set.html), [add](https://es-toolkit.slash.page/reference/compat/math/add.html), [subtract](https://es-toolkit.slash.page/reference/compat/math/subtract.html).\n\nWe sincerely thank @dayongkr, @D-Sketon, @seongminn, @Kyujenius for their contributions. We appreciate your great efforts!\n\n## Version v1.33.0\n\nReleased on March 9th, 2025.\n\n- Added support for [reverseString](https://es-toolkit.slash.page/reference/string/reverseString.html) and [isJSON](https://es-toolkit.slash.page/reference/predicate/isJSON.html).\n- Introduced compatibility functions for [pullAllBy](https://es-toolkit.slash.page/reference/compat/array/pullAllBy.html), [intersectionWith](https://es-toolkit.slash.page/reference/array/intersectionWith.html), [findLast](https://es-toolkit.slash.page/reference/compat/array/findLast.html), [reduce](https://es-toolkit.slash.page/reference/compat/array/reduce.html), [reduceRight](https://es-toolkit.slash.page/reference/compat/array/reduceRight.html), [divide](https://es-toolkit.slash.page/reference/compat/math/divide.html), [values](https://es-toolkit.slash.page/reference/compat/object/values.html), [valuesIn](https://es-toolkit.slash.page/reference/compat/object/valuesIn.html), [maxBy](https://es-toolkit.slash.page/reference/compat/math/maxBy.html), and [pickBy](https://es-toolkit.slash.page/reference/compat/object/pickBy.html).\n- Fixed package exports on React Native so that `es-toolkit` can be used in React Native projects.\n- Fixed a bug in [sum](https://es-toolkit.slash.page/reference/math/sum.html) where passing `undefined` values like `sum([undefined, 1, 2, 3])` resulted in `NaN`, which was different from lodash.\n- Fixed a bug in [assignIn](https://es-toolkit.slash.page/reference/compat/object/assignIn.html) that didn't assign keys with undefined values.\n\n## Version v1.32.0\n\nReleased on January 30th, 2025.\n\n- Added support for [Semaphore](https://es-toolkit.slash.page/reference/promise/Semaphore.html), [Mutex](https://es-toolkit.slash.page/reference/promise/Mutex.html), [isPromise](https://es-toolkit.slash.page/reference/predicate/isPromise.html), and [retry](https://es-toolkit.slash.page/reference/function/retry.html).\n- Introduced compatibility functions for [multiply](https://es-toolkit.slash.page/reference/compat/math/multiply.html), [sortedIndex](https://es-toolkit.slash.page/reference/compat/array/sortedIndex.html), and [sortedIndexBy](https://es-toolkit.slash.page/reference/compat/array/sortedIndexBy.html).\n- Added support for custom delimiters in [flattenObject](https://es-toolkit.slash.page/reference/object/flattenObject.html).\n- Added support for `fromIndex` parameters in [find](https://es-toolkit.slash.page/reference/compat/array/find.html).\n- Fixed a bug in [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html) and [cloneDeepWith](https://es-toolkit.slash.page/reference/object/cloneDeepWith.html) that cloned uncloneable objects.\n\n## Version v1.31.0\n\nReleased on December 27th, 2024.\n\n- Added support for the [windowed](https://es-toolkit.slash.page/reference/array/windowed.html), [remove](https://es-toolkit.slash.page/reference/array/remove.html) and [asyncNoop](https://es-toolkit.slash.page/reference/function/asyncNoop.html) functions.\n- Introduced compatibility functions for [pullAll](https://es-toolkit.slash.page/reference/compat/array/pullAll.html), [subtract](https://es-toolkit.slash.page/reference/compat/math/subtract.html), [isBuffer](https://es-toolkit.slash.page/reference/predicate/isBuffer.html), and [methodOf](https://es-toolkit.slash.page/reference/compat/util/methodOf.html).\n- Enhanced the performance of [pull](https://es-toolkit.slash.page/reference/array/pull.html) when working with large arrays.\n- Resolved an issue where [reverse](https://es-toolkit.slash.page/reference/compat/array/reverse.html) was not being exported in our compatibility library.\n- Updated [groupBy](https://es-toolkit.slash.page/reference/array/groupBy.html) to properly handle keys like `toString` or `valueOf`.\n- Fixed [merge](https://es-toolkit.slash.page/reference/object/merge.html) to correctly merge values when `target` or any of its values are `null` or `undefined`.\n\nWe sincerely thank @T3sT3ro, @D-Sketon, @tuhm1, @willmanduffy, @apeltop, @aken-you, @SaeWooKKang, and @ssi02014 for their contributions. We appreciate your great efforts!\n\n## Version v1.30.1\n\nReleased on December 14th, 2024.\n\n- Fixed [uniqueId](https://es-toolkit.slash.page/reference/compat/util/uniqueId.html) not being exported in our compatibility library.\n\nWe sincerely thank @redd97 for their contributions. We appreciate your great efforts!\n\n## Version v1.30.0\n\nReleased on December 13th, 2024.\n\n- Introduced support for [pull](https://es-toolkit.slash.page/reference/array/pull.html).\n- Added compatibility functions for [map](https://es-toolkit.slash.page/reference/compat/array/map.html), [range](https://es-toolkit.slash.page/reference/math/range.html), [rangeRight](https://es-toolkit.slash.page/reference/math/rangeRight.html), [differenceWith](https://es-toolkit.slash.page/reference/array/differenceWith.html), [nth](https://es-toolkit.slash.page/reference/compat/array/nth.html), [noop](https://es-toolkit.slash.page/reference/function/noop.html), [identity](https://es-toolkit.slash.page/reference/function/identity.html), [keys](https://es-toolkit.slash.page/reference/compat/object/keys.html), [propertyOf](https://es-toolkit.slash.page/reference/compat/object/propertyOf.html), [nthArg](https://es-toolkit.slash.page/reference/compat/function/nthArg.html), [delay](https://es-toolkit.slash.page/reference/promise/delay.html), [toPlainObject](https://es-toolkit.slash.page/reference/compat/util/toPlainObject.html), [unary](https://es-toolkit.slash.page/reference/function/unary.html), [once](https://es-toolkit.slash.page/reference/function/once.html), [after](https://es-toolkit.slash.page/reference/function/after.html), [takeRightWhile](https://es-toolkit.slash.page/reference/array/takeRightWhile.html), [escapeRegExp](https://es-toolkit.slash.page/reference/string/escapeRegExp.html), [unescape](https://es-toolkit.slash.page/reference/string/unescape.html), [upperFirst](https://es-toolkit.slash.page/reference/string/upperFirst.html), [lowerFirst](https://es-toolkit.slash.page/reference/string/lowerFirst.html), [deburr](https://es-toolkit.slash.page/reference/string/deburr.html), [lt](https://es-toolkit.slash.page/reference/util/lt.html), [lte](https://es-toolkit.slash.page/reference/util/lte.html), [toLower](https://es-toolkit.slash.page/reference/compat/string/toLower.html), [invoke](https://es-toolkit.slash.page/reference/compat/util/invoke.html), [method](https://es-toolkit.slash.page/reference/compat/util/method.html), [reverse](https://es-toolkit.slash.page/reference/compat/array/reverse.html), [now](https://es-toolkit.slash.page/reference/compat/util/now.html), [findKey](https://es-toolkit.slash.page/reference/object/findKey.html), [stubArray](https://es-toolkit.slash.page/reference/compat/util/stubArray.html), [stubFalse](https://es-toolkit.slash.page/reference/compat/util/stubFalse.html), [stubObject](https://es-toolkit.slash.page/reference/compat/util/stubObject.html), [stubString](https://es-toolkit.slash.page/reference/compat/util/stubString.html), and [stubTrue](https://es-toolkit.slash.page/reference/compat/util/stubTrue.html).\n\nWe sincerely thank @healtheloper, @mass2527, @D-Sketon, @eunhyulkim, @scato3, @Na-hyunwoo, and @dasom-jo for their contributions. We appreciate your great efforts!\n\n## Version v1.29.0\n\nReleased on December 1st, 2024.\n\n- Introduced support for [cloneDeepWith](https://es-toolkit.slash.page/reference/object/cloneDeepWith.html).\n- Added a compatibility function for [lastIndexOf](https://es-toolkit.slash.page/reference/compat/array/lastIndexOf.html).\n- Fixed an issue in [flattenObject](https://es-toolkit.slash.page/reference/object/flattenObject.html) where nested objects in arrays were not flattened correctly.\n\nWe sincerely thank @nnnnoel and @evan-moon for their contributions. We appreciate your great efforts!\n\n## Version v1.28.0\n\nReleased on November 30th, 2024.\n\n- Added compatibility functions for [gt](https://es-toolkit.slash.page/reference/compat/util/gt.html), [gte](https://es-toolkit.slash.page/reference/compat/util/gte.html), [toArray](https://es-toolkit.slash.page/reference/compat/util/toArray.html), [toUpper](https://es-toolkit.slash.page/reference/compat/string/toUpper.html), [add](https://es-toolkit.slash.page/reference/compat/math/add.html), [assignIn](https://es-toolkit.slash.page/reference/compat/object/assignIn.html) ([extend](https://es-toolkit.slash.page/reference/compat/object/extend.html)), and [isElement](https://es-toolkit.slash.page/reference/compat/predicate/isElement.html).\n- Introduced new compatibility types for `DebouncedFunc`.\n- Enhanced our function types to accept `PropertyKey` instead of just `string` for property keys.\n- Corrected [flatMap](https://es-toolkit.slash.page/reference/array/flatMap.html) to accurately infer return types when the `depth` parameter is omitted.\n- Resolved issues with incorrect types for [partial](https://es-toolkit.slash.page/reference/function/partial.html) and [partialRight](https://es-toolkit.slash.page/reference/function/partialRight.html).\n- Fixed [intersectionBy](https://es-toolkit.slash.page/reference/array/intersectionBy.html), [differenceBy](https://es-toolkit.slash.page/reference/array/differenceBy.html), and [differenceWith](https://es-toolkit.slash.page/reference/array/differenceWith.html) to properly calculate differences between various element types.\n- Ensured that [words](https://es-toolkit.slash.page/reference/string/words.html) is now correctly exported in our compatibility library.\n\nWe sincerely thank @D-Sketon, @mass2527, @1eeminhyeong, @chhw130, @DONG-8, @filipsobol, @kim-dongho, @nnnnoel, @pbstar, and @jsparkdev for their contributions. We appreciate your great efforts!\n\n## Version v1.27.0\n\nReleased on November 10th, 2024.\n\n- Added support for [findKey](https://es-toolkit.slash.page/reference/object/findKey.html) and [isSubsetWith](https://es-toolkit.slash.page/reference/array/isSubsetWith.html).\n- Introduced compatibility functions for [words](https://es-toolkit.slash.page/reference/string/words.html), [at](https://es-toolkit.slash.page/reference/array/at.html), [differenceBy](https://es-toolkit.slash.page/reference/array/differenceBy.html), [uniqBy](https://es-toolkit.slash.page/reference/array/uniqBy.html), [forEach](https://es-toolkit.slash.page/reference/compat/array/forEach.html), [each](https://es-toolkit.slash.page/reference/compat/array/each.html), [sum](https://es-toolkit.slash.page/reference/math/sum.html), [sumBy](https://es-toolkit.slash.page/reference/array/sumBy.html), [union](https://es-toolkit.slash.page/reference/array/union.html), [zip](https://es-toolkit.slash.page/reference/array/zip.html), [unzip](https://es-toolkit.slash.page/reference/array/unzip.html), [iteratee](https://es-toolkit.slash.page/reference/compat/util/iteratee.html), [isEmpty](https://es-toolkit.slash.page/reference/compat/predicate/isEmpty.html), and [replace](https://es-toolkit.slash.page/reference/compat/string/replace.html).\n- Fixed a bug in [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html) that prevented it from correctly cloning object prototypes.\n- Improved performance for [at](https://es-toolkit.slash.page/reference/array/at.html).\n- Enhanced performance for [toPath](https://es-toolkit.slash.page/reference/compat/util/toPath.html), [get](https://es-toolkit.slash.page/reference/compat/object/get.html), [set](https://es-toolkit.slash.page/reference/compat/object/set.html), [unset](https://es-toolkit.slash.page/reference/compat/object/unset.html), [has](https://es-toolkit.slash.page/reference/compat/object/has.html), [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html), [chunk](https://es-toolkit.slash.page/reference/array/chunk.html), [difference](https://es-toolkit.slash.page/reference/array/difference.html), [drop](https://es-toolkit.slash.page/reference/array/drop.html), [dropRight](https://es-toolkit.slash.page/reference/array/dropRight.html), [dropWhile](https://es-toolkit.slash.page/reference/array/dropWhile.html), [findLastIndex](https://es-toolkit.slash.page/reference/compat/array/findLastIndex.html), [head](https://es-toolkit.slash.page/reference/array/head.html), [last](https://es-toolkit.slash.page/reference/array/last.html), [sample](https://es-toolkit.slash.page/reference/array/sample.html), [tail](https://es-toolkit.slash.page/reference/array/tail.html), [take](https://es-toolkit.slash.page/reference/array/take.html), and [takeRight](https://es-toolkit.slash.page/reference/array/takeRight.html) in our compatibility library.\n\nWe sincerely thank @scato3, @ssi02014, @filipsobol, @mass2527, @Gyumong, @D-Sketon, @dayongkr, @kyvg, @Na-hyunwoo, @kaehehehe, and @bhollis for their contributions. Special thanks to @cruelladevil for improving the documentation. We appreciate your great efforts!\n\n## Version v1.26.1\n\nReleased on October 25th, 2024.\n\n- Fixed a bug in [isMatch](https://es-toolkit.slash.page/reference/compat/predicate/isMatch.html) that did not strictly compare `null` in objects.\n\nThis version includes contributions from @D-Sketon. Thank you for your valuable contributions!\n\n## Version v1.26.0\n\nReleased on October 24th, 2024.\n\n- Added support for [invariant](https://es-toolkit.slash.page/reference/util/invariant.html), [identity](https://es-toolkit.slash.page/reference/function/identity.html), [median](https://es-toolkit.slash.page/reference/math/median.html), and [medianBy](https://es-toolkit.slash.page/reference/math/medianBy.html).\n- Added compatibility functions for [template](https://es-toolkit.slash.page/reference/compat/string/template.html), [uniqueId](https://es-toolkit.slash.page/reference/compat/util/uniqueId.html), [intersectionBy](https://es-toolkit.slash.page/reference/array/intersectionBy.html), [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html), [sortBy](https://es-toolkit.slash.page/reference/array/sortBy.html), and [some](https://es-toolkit.slash.page/reference/array/some.html).\n- Made it possible to use [drop](https://es-toolkit.slash.page/reference/array/drop.html), [dropRight](https://es-toolkit.slash.page/reference/array/dropRight.html), [every](https://es-toolkit.slash.page/reference/compat/array/every.html), [take](https://es-toolkit.slash.page/reference/array/take.html), and [takeRight](https://es-toolkit.slash.page/reference/array/takeRight.html) directly as iteratees, allowing for usage like `arr.map(drop)`.\n- Corrected [merge](https://es-toolkit.slash.page/reference/object/merge.html) to disallow primitive values such as numbers or strings.\n\nThis version includes contributions from @dayongkr, @Na-hyunwoo, @ssi02014, @kaehehehe, @jakvbs, @D-Sketon, and @seonghun0828. Thank you for your valuable contributions!\n\n## Version v1.25.2\n\nReleased on October 16th, 2024.\n\n- Fixed a problem with [isJSONValue](https://es-toolkit.slash.page/reference/predicate/isJSONValue.html), [isJSONArray](https://es-toolkit.slash.page/reference/predicate/isJSONArray.html), and [isJSONObject](https://es-toolkit.slash.page/reference/predicate/isJSONObject.html) that led to circular dependencies.\n- Enhanced [flatten](https://es-toolkit.slash.page/reference/array/flatten.html), [flattenDeep](https://es-toolkit.slash.page/reference/array/flattenDeep.html), [flattenDepth](https://es-toolkit.slash.page/reference/compat/array/flattenDepth.html#flattendepth), [slice](https://es-toolkit.slash.page/reference/compat/array/slice.html), and [zipObjectDeep](https://es-toolkit.slash.page/reference/compat/array/zipObjectDeep.html) to work with array-like objects in our compatibility library, ensuring they are fully compatible with lodash.\n\nThis version includes contributions from @D-Sketon. Thank you for your valuable contributions!\n\n## Version v1.25.1\n\nReleased on October 15th, 2024.\n\n- Resolved an issue in [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html) that incorrectly copied properties from the `target` when they were read-only.\n- Updated [every](https://es-toolkit.slash.page/reference/compat/array/every.html), [filter](https://es-toolkit.slash.page/reference/compat/array/filter.html), [find](https://es-toolkit.slash.page/reference/compat/array/find.html), [findIndex](https://es-toolkit.slash.page/reference/compat/array/findIndex.html), [findLastIndex](https://es-toolkit.slash.page/reference/compat/array/findLastIndex.html), [indexOf](https://es-toolkit.slash.page/reference/compat/array/indexOf.html), and [join](https://es-toolkit.slash.page/reference/compat/array/join.html) to now accept array-like objects and a `fromIndex` parameter, making them compatible with lodash.\n\nThis version includes contributions from @D-Sketon. Thank you for your valuable contributions!\n\n## Version v1.25.0\n\nReleased on October 14th, 2024.\n\n- Added support for [isFile](https://es-toolkit.slash.page/reference/predicate/isFile.html).\n- Added compatibility functions for [escape](https://es-toolkit.slash.page/reference/string/escape.html), [toSafeInteger](https://es-toolkit.slash.page/reference/compat/util/toSafeInteger.html), [intersection](https://es-toolkit.slash.page/reference/array/intersection.html), [sample](https://es-toolkit.slash.page/reference/array/sample.html), [chunk](https://es-toolkit.slash.page/reference/array/chunk.html), [compact](https://es-toolkit.slash.page/reference/array/compact.html), [head](https://es-toolkit.slash.page/reference/array/head.html), [initial](https://es-toolkit.slash.page/reference/array/initial.html), [last](https://es-toolkit.slash.page/reference/array/last.html), [tail](https://es-toolkit.slash.page/reference/array/tail.html), [take](https://es-toolkit.slash.page/reference/array/take.html), [takeRight](https://es-toolkit.slash.page/reference/array/takeRight.html), [uniq](https://es-toolkit.slash.page/reference/array/uniq.html), and [without](https://es-toolkit.slash.page/reference/array/without.html).\n- Enhanced performance for [at](https://es-toolkit.slash.page/reference/array/at.html) and [isPlainObject](https://es-toolkit.slash.page/reference/predicate/isPlainObject.html).\n- Resolved an issue in [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html) that prevented it from cloning symbol properties and read-only properties of objects.\n- Fixed a problem in [pick](https://es-toolkit.slash.page/reference/object/pick.html) within our compatibility library that incorrectly added `undefined` for keys that do not exist.\n\nThis version includes contributions from @D-Sketon, @mass2527, @dayongkr, @lukaszkowalik2, @Gyumong, @Dohun-choi, @belgattitude, and @chhw130. Thank you for your valuable contributions!\n\n## Version v1.24.0\n\nReleased on October 7th, 2024.\n\n- Added support for [isBlob](https://es-toolkit.slash.page/reference/predicate/isBlob.html) and [isDate](https://es-toolkit.slash.page/reference/predicate/isDate.html).\n- Added compatibility functions for [invertBy](https://es-toolkit.slash.page/reference/compat/object/invertBy.html), [times](https://es-toolkit.slash.page/reference/compat/util/times.html), [constant](https://es-toolkit.slash.page/reference/compat/util/constant.html), [slice](https://es-toolkit.slash.page/reference/compat/array/slice.html), [toLength](https://es-toolkit.slash.page/reference/compat/util/toLength.html), [defaultTo](https://es-toolkit.slash.page/reference/compat/util/defaultTo.html), [dropRightWhile](https://es-toolkit.slash.page/reference/array/dropRightWhile.html), [curryRight](https://es-toolkit.slash.page/reference/function/curryRight.html), [rangeRight](https://es-toolkit.slash.page/reference/math/rangeRight.html), [before](https://es-toolkit.slash.page/reference/function/before.html), [eq](https://es-toolkit.slash.page/reference/compat/util/eq.html), [defaults](https://es-toolkit.slash.page/reference/compat/object/defaults.html), [toDefaulted](https://es-toolkit.slash.page/reference/compat/object/toDefaulted.html), [isArrayBuffer](https://es-toolkit.slash.page/reference/predicate/isArrayBuffer.html), [isSet](https://es-toolkit.slash.page/reference/predicate/isSet.html), and [isMap](https://es-toolkit.slash.page/reference/predicate/isMap.html).\n- Enhanced [difference](https://es-toolkit.slash.page/reference/array/difference.html) to work with Array-like objects, aligning its functionality with lodash's behavior.\n- Improved performance for [pickBy](https://es-toolkit.slash.page/reference/object/pickBy.html) and [omitBy](https://es-toolkit.slash.page/reference/object/omitBy.html).\n\n## Version v1.23.0\n\nReleased on October 1st, 2024.\n\n- Added support for [isEqualWith](https://es-toolkit.slash.page/reference/predicate/isEqualWith.html), [isArrayBuffer](https://es-toolkit.slash.page/reference/predicate/isArrayBuffer.html), [curryRight](https://es-toolkit.slash.page/reference/function/curryRight.html), [isJSONValue](https://es-toolkit.slash.page/reference/predicate/isJSONValue.html), [isJSONObject](https://es-toolkit.slash.page/reference/predicate/isJSONObject.html), [isJSONArray](https://es-toolkit.slash.page/reference/predicate/isJSONArray.html).\n- Fixed a bug in [merge](https://es-toolkit.slash.page/reference/object/merge.html) that copied the reference from the `source` object to the `target` object.\n- Fixed a bug in [includes](https://es-toolkit.slash.page/reference/compat/array/includes.html) that returned `true` for inherited properties.\n- Fixed a bug in [startCase](https://es-toolkit.slash.page/reference/string/startCase.html) and other string methods that did not correctly split the words when using accented letters.\n- Fixed a bug in [filter](https://es-toolkit.slash.page/reference/compat/array/filter.html) that did not provide correct arguments to the predicate function.\n- Fixed a bug in [isMatch](https://es-toolkit.slash.page/reference/compat/predicate/isMatch.html) that did not strictly compare primitive falsy values.\n\nThis version includes contributions from @D-Sketon, @wojtekmaj, @mass2527, @chhw130, and @knott11. Thank you for your valuable contributions!\n\n## Version v1.22.0\n\nReleased on September 28th, 2024.\n\n- Added support for [flow](https://es-toolkit.slash.page/reference/function/flow.html), [flowRight](https://es-toolkit.slash.page/reference/function/flowRight.html), [isMap](https://es-toolkit.slash.page/reference/predicate/isMap.html), and [isSet](https://es-toolkit.slash.page/reference/predicate/isSet.html).\n- Added compatibility functions for [filter](https://es-toolkit.slash.page/reference/compat/array/filter.html), [includes](https://es-toolkit.slash.page/reference/compat/array/includes.html), [every](https://es-toolkit.slash.page/reference/compat/array/every.html), [flip](https://es-toolkit.slash.page/reference/compat/function/flip.html), and [dropWhile](https://es-toolkit.slash.page/reference/array/dropWhile.html).\n\n- Fixed a bug in [throttle](https://es-toolkit.slash.page/reference/function/throttle.html) that prevented it from throttling after the initial `throttleMs`.\n- Fixed a bug in [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html) that caused it to not clone the offset and length of `DataView`.\n- Fixed a bug in [clone](https://es-toolkit.slash.page/reference/object/clone.html) that threw an error if `SharedArrayBuffer` is unavailable.\n\nThis version includes contributions from @dayongkr, @k-jeonghee, @D-Sketon, @iDevGon, @mass2527, @wojtekmaj, @jonganebski, @hyesungoh, and @chhw130. Thank you for your valuable contributions!\n\n## Version v1.21.0\n\nReleased on September 25th, 2024.\n\n- Added support for [constantCase](https://es-toolkit.slash.page/reference/string/constantCase.html) and [isError](https://es-toolkit.slash.page/reference/predicate/isError.html).\n- Added compatibility functions for [pad](https://es-toolkit.slash.page/reference/compat/string/pad.html), [padStart](https://es-toolkit.slash.page/reference/compat/string/padStart.html), [padEnd](https://es-toolkit.slash.page/reference/compat/string/padEnd.html), [defer](https://es-toolkit.slash.page/reference/compat/function/defer.html), [isFinite](https://es-toolkit.slash.page/reference/compat/predicate/isFinite.html), [toNumber](https://es-toolkit.slash.page/reference/compat/math/toNumber.html), [toFinite](https://es-toolkit.slash.page/reference/compat/math/toFinite.html), and [toInteger](https://es-toolkit.slash.page/reference/compat/math/toInteger.html).\n- Improved performance for [flatten](https://es-toolkit.slash.page/reference/array/flatten.html), [isNumber](https://es-toolkit.slash.page/reference/predicate/isNumber.html), [isString](https://es-toolkit.slash.page/reference/predicate/isString.html), [isSymbol](https://es-toolkit.slash.page/reference/predicate/isSymbol.html), [isRegExp](https://es-toolkit.slash.page/reference/predicate/isRegExp.html), and [isBoolean](https://es-toolkit.slash.page/reference/predicate/isBoolean.html).\n- Fixed [compact](https://es-toolkit.slash.page/reference/array/compact.html) to correctly exclude `0n` as a falsey value.\n- Fixed [pick](https://es-toolkit.slash.page/reference/object/pick.html) to not pick nonexistent keys from the original object.\n- Fixed [omit](https://es-toolkit.slash.page/reference/object/omit.html) to accept readonly arrays.\n\nThis version includes contributions from @hyesungoh, @D-Sketon, @mass2527, @gweesin, @VVSOGI, @coding-honey, @seonghun0828, and @jsparkdev. Thank you for your valuable contributions!\n\n## Version v1.20.0\n\nReleased on September 20th, 2024.\n\n- Added support for function invocation on leading and trailing edges for [debounce](https://es-toolkit.slash.page/reference/function/debounce.html) and [throttle](https://es-toolkit.slash.page/reference/function/throttle.html).\n- Added compatibility functions for [debounce](https://es-toolkit.slash.page/reference/function/debounce.html), [throttle](https://es-toolkit.slash.page/reference/function/throttle.html), [curry](https://es-toolkit.slash.page/reference/function/curry.html), [isNumber](https://es-toolkit.slash.page/reference/compat/predicate/isNumber.html), and [isNaN](https://es-toolkit.slash.page/reference/compat/predicate/isNaN.html).\n- Improved performance for [at](https://es-toolkit.slash.page/reference/array/at.html), [zip](https://es-toolkit.slash.page/reference/array/zip.html), [zipWith](https://es-toolkit.slash.page/reference/array/zipWith.html), and [drop](https://es-toolkit.slash.page/reference/array/drop.html).\n\n## Version v1.19.0\n\nReleased on September 14th, 2024.\n\n- Added support for [isDate](https://es-toolkit.slash.page/reference/predicate/isDate.html), [curry](https://es-toolkit.slash.page/reference/function/curry.html), [upperCase](https://es-toolkit.slash.page/reference/string/upperCase.html).\n- Added compatibility functions for [pick](https://es-toolkit.slash.page/reference/object/pick.html), [omit](https://es-toolkit.slash.page/reference/object/omit.html), [unset](https://es-toolkit.slash.page/reference/compat/object/unset.html), [toPath](https://es-toolkit.slash.page/reference/compat/util/toPath.html), [trim](https://es-toolkit.slash.page/reference/compat/string/trim.html), [trimStart](https://es-toolkit.slash.page/reference/compat/string/trimStart.html), [trimEnd](https://es-toolkit.slash.page/reference/compat/string/trimEnd.html), [isInteger](https://es-toolkit.slash.page/reference/compat/predicate/isInteger.html), [isSafeInteger](https://es-toolkit.slash.page/reference/compat/predicate/isSafeInteger.html), [snakeCase](https://es-toolkit.slash.page/reference/string/snakeCase.html), [startCase](https://es-toolkit.slash.page/reference/string/startCase.html), [lowerCase](https://es-toolkit.slash.page/reference/string/lowerCase.html), [kebabCase](https://es-toolkit.slash.page/reference/string/kebabCase.html), [ceil](https://es-toolkit.slash.page/reference/compat/math/ceil.html), [floor](https://es-toolkit.slash.page/reference/compat/math/floor.html), [round](https://es-toolkit.slash.page/reference/math/round.html).\n- Enhanced [clone](https://es-toolkit.slash.page/reference/object/clone.html) to handle `Buffer`s, `SharedArrayBuffer`s, `File`s, `Blob`s, `TypedArray`s, and `Error`s.\n- Fixed a bug where [mergeWith](https://es-toolkit.slash.page/reference/object/mergeWith.html) did not preserve the original properties of the `target` object.\n- Fixed a bug where [groupBy](https://es-toolkit.slash.page/reference/array/groupBy.html) couldn't group with keys like `toString` and `indexOf`.\n- Improved performance for [has](https://es-toolkit.slash.page/reference/compat/object/has.html) and [get](https://es-toolkit.slash.page/reference/compat/object/get.html).\n\n## Version v1.18.0\n\nReleased on September 12th, 2024.\n\n- Added support for [isObject](https://es-toolkit.slash.page/reference/compat/predicate/isObject.html), [findLastIndex](https://es-toolkit.slash.page/reference/compat/array/findLastIndex.html), [parseInt](https://es-toolkit.slash.page/reference/compat/math/parseInt.html), [rearg](https://es-toolkit.slash.page/reference/compat/function/rearg.html), [conforms](https://es-toolkit.slash.page/reference/compat/predicate/conforms.html), [conformsTo](https://es-toolkit.slash.page/reference/compat/predicate/conformsTo.html), [bindKey](https://es-toolkit.slash.page/reference/compat/function/bindKey.html), [some](https://es-toolkit.slash.page/reference/compat/array/some.html), [fromPairs](https://es-toolkit.slash.page/reference/compat/object/fromPairs.html), [isArrayLikeObject](https://es-toolkit.slash.page/reference/compat/predicate/isArrayLikeObject.html), [escapeRegExp](https://es-toolkit.slash.page/reference/string/escapeRegExp.html), [sortBy](https://es-toolkit.slash.page/reference/array/sortBy.html), [isWeakSet](https://es-toolkit.slash.page/reference/predicate/isWeakSet.html), [isWeakMap](https://es-toolkit.slash.page/reference/predicate/isWeakMap.html), [flatMapDeep](https://es-toolkit.slash.page/reference/array/flatMapDeep.html), [escape](https://es-toolkit.slash.page/reference/string/escape.html), [unescape](https://es-toolkit.slash.page/reference/string/unescape.html), [repeat](https://es-toolkit.slash.page/reference/compat/string/repeat.html), [pad](https://es-toolkit.slash.page/reference/compat/string/pad.html), [join](https://es-toolkit.slash.page/reference/compat/array/join.html), and [spread](https://es-toolkit.slash.page/reference/compat/function/spread.html).\n- Improved performance for [deburr](https://es-toolkit.slash.page/reference/string/deburr.html).\n\n## Version v1.17.0\n\nReleased on August 31st, 2024.\n\n### New Features\n\n- Added support for new functions: [at](https://es-toolkit.slash.page/reference/array/at.html), [pullAt](https://es-toolkit.slash.page/reference/array/pullAt.html), [deburr](https://es-toolkit.slash.page/reference/string/deburr.html), [lowerFirst](https://es-toolkit.slash.page/reference/string/lowerFirst.html), [upperFirst](https://es-toolkit.slash.page/reference/string/upperFirst.html), and [isRegExp](https://es-toolkit.slash.page/reference/predicate/isRegExp.html).\n- Enhanced [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html) and [sortBy](https://es-toolkit.slash.page/reference/array/sortBy.html) to support function criteria.\n- [countBy](https://es-toolkit.slash.page/reference/array/countBy.html) now supports numeric and symbol keys.\n\n#### Bug Fixes\n\n- Updated type definitions for [throttle](https://es-toolkit.slash.page/reference/function/throttle.html) and [debounce](https://es-toolkit.slash.page/reference/function/debounce.html).\n- (`es-toolkit/compat`) Fixed [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html) to correctly handle deep keys even when object shapes differ ([#427](https://github.com/toss/es-toolkit/pull/427)).\n\n## Version v1.16.0\n\nReleased on August 15th, 2024.\n\n- Added support for [memoize](https://es-toolkit.slash.page/reference/function/memoize.html), [find](https://es-toolkit.slash.page/reference/compat/array/find.html), [findIndex](https://es-toolkit.slash.page/reference/compat/array/findIndex.html), [has](https://es-toolkit.slash.page/reference/compat/object/has.html), [partial](https://es-toolkit.slash.page/reference/function/partial.html), [partialRight](https://es-toolkit.slash.page/reference/function/partialRight.html), [sortBy](https://es-toolkit.slash.page/reference/array/sortBy.html), [isString](https://es-toolkit.slash.page/reference/predicate/isString.html), [rest](https://es-toolkit.slash.page/reference/function/rest.html), [padEnd](https://es-toolkit.slash.page/reference/compat/string/padEnd.html).\n\n## Version v1.15.1\n\nReleased on August 10th, 2024.\n\n- Disabled implicit conversion of values in [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html) for performance and simplicity.\n\n## Version v1.15.0\n\nReleased on August 10th, 2024.\n\n- Added support for [merge](https://es-toolkit.slash.page/reference/object/merge.html), [mergeWith](https://es-toolkit.slash.page/reference/object/mergeWith.html), [toMerged](https://es-toolkit.slash.page/reference/object/toMerged.html), [isSymbol](https://es-toolkit.slash.page/reference/predicate/isSymbol.html), [pascalCase](https://es-toolkit.slash.page/reference/string/pascalCase.html).\n- Added compatibility tests with lodash for [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html).\n\n## Version v1.14.0\n\nReleased on August 9th, 2024.\n\n- (`es-toolkit`) Added support for [mapKeys](https://es-toolkit.slash.page/reference/object/mapKeys.html), [mapValues](https://es-toolkit.slash.page/reference/object/mapValues.html), [cloneDeep](https://es-toolkit.slash.page/reference/object/cloneDeep.html), [before](https://es-toolkit.slash.page/reference/function/before.html), [after](https://es-toolkit.slash.page/reference/function/after.html), [isSubset](https://es-toolkit.slash.page/reference/array/isSubset.html), [ary](https://es-toolkit.slash.page/reference/function/ary.html), [unary](https://es-toolkit.slash.page/reference/function/unary.html), [flattenDeep](https://es-toolkit.slash.page/reference/array/flattenDeep.html), [isEqual](https://es-toolkit.slash.page/reference/predicate/isEqual.html), [isFunction](https://es-toolkit.slash.page/reference/predicate/isFunction.html), [isBoolean](https://es-toolkit.slash.page/reference/predicate/isBoolean.html), [isPrimitive](https://es-toolkit.slash.page/reference/predicate/isPrimitive.html), and [isTypedArray](https://es-toolkit.slash.page/reference/predicate/isTypedArray.html).\n- (`es-toolkit/compat`) Added support for [matches](https://es-toolkit.slash.page/reference/compat/predicate/matches.html), [isMatch](https://es-toolkit.slash.page/reference/compat/predicate/isMatch.html), [isArray](https://es-toolkit.slash.page/reference/compat/predicate/isArray.html), [isArrayLike](https://es-toolkit.slash.page/reference/compat/predicate/isArrayLike.html), [isObjectLike](https://es-toolkit.slash.page/reference/compat/predicate/isObjectLike.html), [isArguments](https://es-toolkit.slash.page/reference/compat/predicate/isArguments.html), [size](https://es-toolkit.slash.page/reference/compat/array/size.html), [bind](https://es-toolkit.slash.page/reference/compat/function/bind.html), [flattenDepth](https://es-toolkit.slash.page/reference/array/flatten.html), and [padStart](https://es-toolkit.slash.page/reference/compat/string/padStart.html).\n- Added compatibility tests with lodash for many functions like [initial](https://es-toolkit.slash.page/reference/array/initial.html), [last](https://es-toolkit.slash.page/reference/array/last.html), [takeRight](https://es-toolkit.slash.page/reference/array/takeRight.html), [without](https://es-toolkit.slash.page/reference/array/without.html), [uniq](https://es-toolkit.slash.page/reference/array/uniq.html), [invert](https://es-toolkit.slash.page/reference/object/invert.html), [isNull](https://es-toolkit.slash.page/reference/predicate/isNull.html), [isUndefined](https://es-toolkit.slash.page/reference/predicate/isUndefined.html), and [isNil](https://es-toolkit.slash.page/reference/predicate/isNil.html).\n\n## Version v1.13.1\n\nReleased on July 20th, 2024.\n\n- Use the compatibility layer `es-toolkit/compat` in legacy CDN builds.\n\n## Version v1.13.0\n\nReleased on July 20th, 2024.\n\n`es-toolkit` can now be used in various CDNs, like [unpkg](https://unpkg.com) and [jsdelivr](https://www.jsdelivr.com). See more in our [usage docs](https://es-toolkit.slash.page/usage.html)\n\n### Features\n\n- Added support for [flattenObject](https://es-toolkit.slash.page/reference/object/flattenObject.html), [isPlainObject](https://es-toolkit.slash.page/reference/predicate/isPlainObject.html), [isLength](https://es-toolkit.slash.page/reference/predicate/isLength.html). ([3e60443](https://github.com/toss/es-toolkit/commit/3e60443a408d3296e4a18a1601a16f5953d414f9), [3764993](https://github.com/toss/es-toolkit/commit/376499351f347c269400ee0eeb5145ad041c7c06), [#245](https://github.com/toss/es-toolkit/pull/245))\n- Added support for [concat](https://es-toolkit.slash.page/reference/compat/array/concat.html) in our compatibility layer `es-toolkit/compat`. ([e09517f](https://github.com/toss/es-toolkit/commit/e09517f05c180b43e0f2b0b0fa44167f9c4832f3))\n\n### Lodash Compatibility\n\n- Ensured compatibility with [difference](https://es-toolkit.slash.page/reference/array/difference.html) and [take](https://es-toolkit.slash.page/reference/compat/array/take.html)\n\n## Version v1.12.0\n\nReleased on July 19th, 2024.\n\n- Fixed a bug where `es-toolkit/compat` was not available in modern Node.js environments.\n- Added support for [max](https://es-toolkit.slash.page/reference/compat/math/max.html) and [min](https://es-toolkit.slash.page/reference/compat/math/min.html) in our compatibility layer `es-toolkit/compat`. ([e1e6e38](https://github.com/toss/es-toolkit/commit/e1e6e38206750fb90f5b99cace9196635288e21c))\n\n## Version v1.11.0\n\nReleased on July 18th, 2024.\n\n### Introducing `es-toolkit/compat`\n\nWe're introducing `es-toolkit/compat`, a new module designed as a drop-in replacement for lodash. It replicates lodash's API, making it easier to switch between the two libraries.\n\n`es-toolkit/compat` is undergoing rigorous testing using real `lodash` test cases. Initial benchmarks suggest it's typically 5% slower and increases bundle size by 10% compared to the original `es-toolkit`.\n\nThis module is intended to facilitate a smooth transition and should be replaced with the original `es-toolkit` for optimal performance once migration is complete.\n\nFor more information, see our [compatibility documentation](https://es-toolkit.slash.page/compatibility.html).\n\n### Features\n\n- Added support for [get](https://es-toolkit.slash.page/reference/compat/object/get.html) and [set](https://es-toolkit.slash.page/reference/compat/object/set.html) in our compatibility layer `es-toolkit/compat`. (https://github.com/toss/es-toolkit/pull/232, https://github.com/toss/es-toolkit/pull/223)\n- Added support for [zipObjectDeep](https://es-toolkit.slash.page/reference/compat/array/zipObjectDeep.html) in our compatibility layer `es-toolkit/compat`. (https://github.com/toss/es-toolkit/pull/150)\n- Added support for [flatMap](https://es-toolkit.slash.page/reference/compat/array/flatMap.html). (https://github.com/toss/es-toolkit/pull/209)\n- Added support for [startCase](https://es-toolkit.slash.page/reference/string/startCase.html), [startsWith](https://es-toolkit.slash.page/reference/string/startsWith.html), and [endsWith](https://es-toolkit.slash.page/reference/string/endsWith.html). (https://github.com/toss/es-toolkit/pull/224).\n- Added support for [withTimeout](https://es-toolkit.slash.page/reference/promise/withTimeout.html). (https://github.com/toss/es-toolkit/pull/210)\n\n### Bug fixes\n\n- Fixed `drop` and `dropRight` incorrectly accepting negative integers. (https://github.com/toss/es-toolkit/pull/218)\n- Fixed `invert` not to invert inherited properties. (https://github.com/toss/es-toolkit/pull/221)\n\n### Performance Improvements\n\n- Improved performance for `dropRightWhile`. (https://github.com/toss/es-toolkit/pull/220)\n\n## Version v1.10.1\n\nReleased on July 15th, 2024.\n\n- Fixed [camelCase](https://es-toolkit.slash.page/reference/string/camelCase.html) using `capitalize` from incorrect import. ([8dda135](https://github.com/toss/es-toolkit/commit/8dda135fa339ae4953908a74b2e6eeca9f163a20))\n\n## Version v1.10.0\n\nReleased on July 14th, 2024.\n\n### Features\n\n- Add support for [capitalize](https://es-toolkit.slash.page/reference/string/capitalize.html), [snakeCase](https://es-toolkit.slash.page/reference/string/snakeCase.html), [kebabCase](https://es-toolkit.slash.page/reference/string/kebabCase.html), [camelCase](https://es-toolkit.slash.page/reference/string/camelCase.html) and [lowerCase](https://es-toolkit.slash.page/reference/string/lowerCase.html). (https://github.com/toss/es-toolkit/pull/152, https://github.com/toss/es-toolkit/pull/161, https://github.com/toss/es-toolkit/pull/162, https://github.com/toss/es-toolkit/pull/166, [21d6530](https://github.com/toss/es-toolkit/commit/21d6530e16471d596410d57d59fd3ced8fc5569f)).\n- Add support for [negate](https://es-toolkit.slash.page/reference/function/negate.html). (https://github.com/toss/es-toolkit/pull/177)\n- Add support for [isEqual](https://es-toolkit.slash.page/reference/predicate/isEqual.html). (https://github.com/toss/es-toolkit/pull/174)\n- Add support for [clone](https://es-toolkit.slash.page/reference/object/clone.html). (https://github.com/toss/es-toolkit/pull/155)\n- Add support for [toFilled](https://es-toolkit.slash.page/reference/array/toFilled.html). (https://github.com/toss/es-toolkit/pull/154)\n- Add support for [initial](https://es-toolkit.slash.page/reference/array/initial.html) and [last](https://es-toolkit.slash.page/reference/array/last.html). (https://github.com/toss/es-toolkit/pull/188, https://github.com/toss/es-toolkit/pull/149)\n- Add support for [flattenDeep](https://es-toolkit.slash.page/reference/array/flattenDeep.html). (https://github.com/toss/es-toolkit/pull/160)\n\n### Performance Improvements\n\n- Optimize the performance of [isNil](https://es-toolkit.slash.page/reference/predicate/isNil.html) by simplifying its check. ([489ac76](https://github.com/toss/es-toolkit/commit/489ac76fc62f97cbfa3ca9eec2e0a4c03c4f5b1c))\n- Optimize the performance of [sum](https://es-toolkit.slash.page/reference/array/sum.html). (https://github.com/toss/es-toolkit/pull/155)\n\n## Version v1.9.0\n\nReleased on July 10th, 2024.\n\n- Add support for [head](https://es-toolkit.slash.page/reference/array/head.html) and [tail](https://es-toolkit.slash.page/reference/array/tail.html). (https://github.com/toss/es-toolkit/pull/131, https://github.com/toss/es-toolkit/pull/143).\n- Add support for [unzip](https://es-toolkit.slash.page/reference/array/unzip.html). (https://github.com/toss/es-toolkit/pull/130)\n- Add support for [flatten](https://es-toolkit.slash.page/reference/array/flatten.html), which is six times faster than `Array#flat`. (https://github.com/toss/es-toolkit/pull/147)\n\n## Version v1.8.0\n\nReleased on July 5th, 2024.\n\n- Add support for [orderBy](https://es-toolkit.slash.page/reference/array/orderBy.html). (https://github.com/toss/es-toolkit/pull/123)\n- Add support for [invert](https://es-toolkit.slash.page/reference/array/invert.html). (https://github.com/toss/es-toolkit/pull/125)\n- Add support for [inRange](https://es-toolkit.slash.page/reference/array/inRange.html). (https://github.com/toss/es-toolkit/pull/124)\n\n## Version v1.7.1\n\nReleased on July 3rd, 2024.\n\n- Add support for [unzipWith](https://es-toolkit.slash.page/reference/array/unzipWith.html). (https://github.com/toss/es-toolkit/pull/113)\n- Add support for [forEachRight](https://es-toolkit.slash.page/reference/array/forEachRight.html). (https://github.com/toss/es-toolkit/pull/119)\n- Add support for [countBy](https://es-toolkit.slash.page/reference/array/countBy.html). (https://github.com/toss/es-toolkit/pull/117)\n- Add support for [without](https://es-toolkit.slash.page/reference/array/without.html). (https://github.com/toss/es-toolkit/pull/115)\n- Add support for [fill](https://es-toolkit.slash.page/reference/array/fill.html). (https://github.com/toss/es-toolkit/pull/109)\n- Add support for [sampleSize](https://es-toolkit.slash.page/reference/array/sampleSize.html). (https://github.com/toss/es-toolkit/pull/101)\n- Add support for [meanBy](https://es-toolkit.slash.page/reference/math/meanBy.html). (https://github.com/toss/es-toolkit/pull/104)\n- Accept number and symbol keys in [keyBy](https://es-toolkit.slash.page/reference/array/keyBy.html) and [groupBy](https://es-toolkit.slash.page/reference/array/groupBy.html) (https://github.com/toss/es-toolkit/pull/98, https://github.com/toss/es-toolkit/pull/99)\n\n## Version v1.6.1\n\nReleased on June 30th, 2024.\n\n- Publish package on [JSR](https://jsr.io/@es-toolkit/es-toolkit).\n\n## Version v1.6.0\n\nReleased on June 30th, 2024.\n\n### Features\n\n- Add support for [keyBy](https://es-toolkit.slash.page/reference/array/keyBy.html). (https://github.com/toss/es-toolkit/pull/93).\n- Add support for [zipObject](https://es-toolkit.slash.page/reference/array/zipObject.html). (https://github.com/toss/es-toolkit/pull/92).\n- Add support for [compact](https://es-toolkit.slash.page/reference/array/compact.html). ([60ae59b](https://github.com/toss/es-toolkit/commit/60ae59bcfee69992e5447322e1da9cb7631c5745))\n- Add support for [mean](https://es-toolkit.slash.page/reference/math/mean.html). ([715bc60](https://github.com/toss/es-toolkit/commit/715bc60b26bb24ad490b8befe16204050699f0c0))\n\n## Version v1.5.0\n\nReleased on June 28th, 2024.\n\n### Features\n\n- Add support for [range](https://es-toolkit.slash.page/reference/math/range.html). (https://github.com/toss/es-toolkit/pull/77, [2db11d8](https://github.com/toss/es-toolkit/commit/2db11d8882f6d7b0b53271c76f4c5007b6a9181e)).\n- Add support for [minBy](https://es-toolkit.slash.page/reference/math/minBy.html) (https://github.com/toss/es-toolkit/pull/71).\n- Add support for [maxBy](https://es-toolkit.slash.page/reference/math/maxBy.html) (https://github.com/toss/es-toolkit/pull/64).\n\n### Bug fixes\n\n- Enforce stricter argument types in `pickBy` and `omitBy`. (https://github.com/toss/es-toolkit/pull/60)\n- Fix a bug in `difference` where one array parameter was not readonly. (https://github.com/toss/es-toolkit/pull/83)\n- Fix a bug in `round` where it incorrectly accepts floating-point numbers as `precision`. (https://github.com/toss/es-toolkit/pull/79)\n\n## Version v1.4.0\n\nReleased on June 15th, 2024.\n\n### Features\n\n- Add support for [random](https://es-toolkit.slash.page/reference/math/random.html). (https://github.com/toss/es-toolkit/pull/53)\n- Add support for [randomInt](https://es-toolkit.slash.page/reference/math/randomInt.html). ([99a34e4](https://github.com/toss/es-toolkit/commit/99a34e4e9944c1b843e9d97dff0b5ff4e5eec260))\n- Add support for using AbortSignals to cancel the `Promise` returned by `delay`. (https://github.com/toss/es-toolkit/pull/52)\n\n### Performance Optimizations\n\n- Optimized `uniqBy`. ([60e7974](https://github.com/toss/es-toolkit/commit/60e79741271e645bfa551f708466e43b136f69b1))\n\n## Version v1.3.1\n\nReleased on June 15th, 2024.\n\n- Fixed a bug in `dropWhile` where it incorrectly returned the entire array when no elements matched the predicate. (https://github.com/toss/es-toolkit/pull/49)\n\n## Version v1.3.0\n\nReleased on June 14th, 2024.\n\n### Features\n\n- Add support for using AbortSignals to cancel `debounce`d functions. (https://github.com/toss/es-toolkit/pull/45)\n\n### Performance Optimizations\n\n- Optimize the time complexity of `intersection`. (https://github.com/toss/es-toolkit/pull/47)\n\n## Version v1.2.2\n\nReleased on June 13th, 2024.\n\n- Add support for `readonly` arrays in array utilities. (https://github.com/toss/es-toolkit/pull/32, [e595e5e](https://github.com/toss/es-toolkit/commit/e595e5e017e1f2cb138b1ad3d708635efc5e289e))\n- Optimize the time complexity of `uniq`. (https://github.com/toss/es-toolkit/pull/40)\n- Optimize the time complexity of `intersectionBy`. (https://github.com/toss/es-toolkit/pull/44)\n\n## Version v1.2.1\n\nReleased on June 13th, 2024.\n\n- Ensure that the `omit` and `pick` functions only accept plain JavaScript objects as arguments. (https://github.com/toss/es-toolkit/pull/35)\n\n## Version v1.2.0\n\nReleased on June 8th, 2024.\n\n### Features\n\n- Added the `noop` function. (https://github.com/toss/es-toolkit/commit/678028dd3d60509b99dfec47aed7f1088140d19d)\n\n### Performance Improvements\n\n- Optimized the `difference` and `differenceBy` functions for better performance with large arrays. (https://github.com/toss/es-toolkit/pull/27, https://github.com/toss/es-toolkit/pull/28)\n\n### Bug fixes\n\n- Fixed `shuffle` to ensure it does not modify the original array. (https://github.com/toss/es-toolkit/pull/29)\n\n## Version v1.1.0\n\nReleased on June 5th, 2024.\n\n- Support passing arguments to throttled and debounced functions. (https://github.com/toss/es-toolkit/pull/26)\n\n## Version v1.0.4\n\nReleased on June 4th, 2024.\n\n- Provide correct type declarations for ECMAScript Modules. (https://github.com/toss/es-toolkit/pull/21)\n\n## Version v1.0.3\n\nReleased on June 3rd, 2024.\n\n- Provide correct types for `\"module\": \"Node\"`, ` \"Node10\"`, and `\"Node16\"`. (https://github.com/toss/es-toolkit/pull/16)\n\n## Version v1.0.2\n\nInitial release. Released on May 31th, 2024.\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "# CLAUDE.md\n\nInstructions for AI assistants working on es-toolkit.\n\n## Language\n\nThis is a global project with users speaking various languages. When producing non-code output (explanations, reviews, reports), respond in the user's preferred language.\n\n## Quick Reference\n\n```bash\ncorepack enable && yarn install   # Setup\nyarn vitest run                   # Tests\nyarn vitest run src/array/chunk   # Test specific function\nyarn lint                         # ESLint\ntsc --noEmit                      # Typecheck\n```\n\n## Structure\n\n```\nsrc/{category}/{fn}.ts            # Implementation (array, function, math, object, predicate, promise, set, string, util, error, map)\nsrc/{category}/{fn}.spec.ts       # Tests (vitest)\nsrc/compat/{category}/{fn}.ts     # Lodash-compatible variant\ndocs/reference/{category}/{fn}.md           # English\ndocs/ko/reference/{category}/{fn}.md        # Korean\ndocs/ja/reference/{category}/{fn}.md        # Japanese\ndocs/zh_hans/reference/{category}/{fn}.md   # Chinese\n```\n\n## Design Principles\n\n- **Performance**: Must match or beat lodash.\n- **Simplicity**: Simplest interface for the 85% use case. No complex options.\n- **Don't implement**: Functions replaceable by modern JS (`Array.isArray`, `Number.isNaN`, `Math.min`), or TC39 Stage 3+ proposals.\n- **es-toolkit vs compat**: `es-toolkit` is the strict, opinionated API. `es-toolkit/compat` matches lodash behavior exactly for migration. Compat is feature-complete — no new functions are being added. Only behavior inconsistency fixes against lodash are accepted.\n\n## Coding Conventions\n\n- `for` loops over `reduce` (local mutation is fine)\n- Built-in JS over custom helpers (`Array.isArray()`, not `isArray()`)\n- Type params: `T` elements, `K` keys, `E` errors\n- `readonly T[]` for array params that aren't mutated\n- Detailed JSDoc with `@template`, `@param`, `@returns`, `@throws`, `@example`\n\n## New Function Checklist\n\n1. `src/{category}/{fn}.ts` — Implementation\n2. `src/{category}/{fn}.spec.ts` — Tests\n3. Re-export in `src/{category}/index.ts` and `src/index.ts`\n4. Docs in all 4 languages (see `docs/CLAUDE.md` for templates)\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2024 Viva Republica, Inc\n\nCopyright OpenJS Foundation and other contributors\n\nParts of the test suite and compatibility layer in `es-toolkit/compat` are derived from Lodash (https://github.com/lodash/lodash) by the OpenJS Foundation (https://openjsf.org/) and Underscore.js by Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors (http://underscorejs.org/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README-ja_jp.md",
    "content": "![](./docs/public/og.png)\n\n# es-toolkit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/es-toolkit/graph/badge.svg?token=8N5S3AR3C7)](https://codecov.io/gh/toss/es-toolkit) [![NPM badge](https://img.shields.io/npm/v/es-toolkit?logo=npm)](https://www.npmjs.com/package/es-toolkit) [![JSR badge](https://jsr.io/badges/@es-toolkit/es-toolkit)](https://jsr.io/@es-toolkit/es-toolkit) [![Discord Badge](https://discord.com/api/guilds/1281071127052943361/widget.png?style=shield)](https://discord.gg/vGXbVjP2nY)\n\n[English](https://github.com/toss/es-toolkit/blob/main/README.md) | [한국어](https://github.com/toss/es-toolkit/blob/main/README-ko_kr.md) | [简体中文](https://github.com/toss/es-toolkit/blob/main/README-zh_hans.md) | 日本語\n\nes-toolkitは、最先端のJavaScriptユーティリティライブラリであり、高性能で小さなバンドルサイズ、強力な型注釈を提供します。\n\n- es-toolkitは、[debounce](https://es-toolkit.dev/reference/function/debounce.html)、[delay](https://es-toolkit.dev/reference/promise/delay.html)、[chunk](https://es-toolkit.dev/reference/array/chunk.html)、[sum](https://es-toolkit.dev/reference/math/sum.html)、[pick](https://es-toolkit.dev/reference/object/pick.html)など、日常的に使用するさまざまなユーティリティ関数を最新の実装で提供します。\n- パフォーマンスを重視して設計されており、es-toolkitは最新のJavaScript環境で[2-3倍の性能向上](https://es-toolkit.dev/performance.html)を実現します。\n- es-toolkitはツリーシェイキングをサポートしており、他のライブラリと比較してJavaScriptコードを最大[97%削減](https://es-toolkit.dev/bundle-size.html)します。\n- es-toolkitは、lodashを簡単に置き換えることができる完全な互換性レイヤー、[es-toolkit/compat](https://es-toolkit.dev/compatibility.html)を提供します。\n- es-toolkitには組み込みのTypeScriptサポートが含まれており、直感的で堅牢な型を提供します。また、[isNotNil](https://es-toolkit.dev/reference/predicate/isNotNil.html)などの便利な型ガードも提供します。\n- es-toolkitは、[Storybook](https://github.com/storybookjs/storybook/blob/9d862798d666678cc4822e857c00bbd744169ced/code/core/package.json#L358)、Recharts、ink、CKEditorなど、信頼性の高い人気のオープンソースプロジェクトで利用されています。\n- es-toolkitは100%のテストカバレッジを持ち、信頼性と堅牢性を確保しています。\n\n## 例\n\n```tsx\n// jsrでは '@es-toolkit/es-toolkit' からインポートします。\nimport { chunk, debounce } from 'es-toolkit';\n\nconst debouncedLog = debounce(message => {\n  console.log(message);\n}, 300);\n\n// この呼び出しはデバウンスされます\ndebouncedLog('Hello, world!');\n\nconst array = [1, 2, 3, 4, 5, 6];\nconst chunkedArray = chunk(array, 2);\n\nconsole.log(chunkedArray);\n// 出力: [[1, 2], [3, 4], [5, 6]]\n```\n\n## 貢献\n\nコミュニティの皆さんからの貢献を歓迎します。詳細な貢献ガイドについては、以下をお読みください。\n\n[CONTRIBUTING](https://github.com/toss/es-toolkit/blob/main/.github/CONTRIBUTING.md)\n\n## ライセンス\n\nMIT © Viva Republica, Inc. 詳細については[LICENSE](./LICENSE)をご覧ください。\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "README-ko_kr.md",
    "content": "![](./docs/public/og.png)\n\n# es-toolkit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/es-toolkit/graph/badge.svg?token=8N5S3AR3C7)](https://codecov.io/gh/toss/es-toolkit) [![NPM badge](https://img.shields.io/npm/v/es-toolkit?logo=npm)](https://www.npmjs.com/package/es-toolkit) [![JSR badge](https://jsr.io/badges/@es-toolkit/es-toolkit)](https://jsr.io/@es-toolkit/es-toolkit) [![Discord Badge](https://discord.com/api/guilds/1281071127052943361/widget.png?style=shield)](https://discord.gg/vGXbVjP2nY)\n\n[English](https://github.com/toss/es-toolkit/blob/main/README.md) | 한국어 | [简体中文](https://github.com/toss/es-toolkit/blob/main/README-zh_hans.md) | [日本語](https://github.com/toss/es-toolkit/blob/main/README-ja_jp.md)\n\nes-toolkit은 높은 성능과 작은 번들 사이즈, 강력한 타입을 자랑하는 현대적인 JavaScript 유틸리티 라이브러리예요.\n\n- es-toolkit은 매일 사용하는 다양한 유틸리티 함수를 현대적인 구현으로 제공해요. 예를 들어, [debounce](https://es-toolkit.dev/reference/function/debounce.html), [delay](https://es-toolkit.dev/reference/promise/delay.html), [chunk](https://es-toolkit.dev/reference/array/chunk.html), [sum](https://es-toolkit.dev/reference/math/sum.html), [pick](https://es-toolkit.dev/reference/object/pick.html) 같은 함수들이 있어요.\n- 설계할 때 퍼포먼스를 중요 원칙으로 두어, es-toolkit은 현대적인 JavaScript 환경에서 [2-3배 빠른 성능](https://es-toolkit.dev/ko/performance.html)을 보여요.\n- es-toolkit은 트리 셰이킹을 기본으로 지원하며, 함수에 따라서는 다른 라이브러리와 비교했을 때 [최대 97% 작은 JavaScript 번들 사이즈](https://es-toolkit.dev/ko/bundle-size.html)를 제공해요.\n- es-toolkit은 lodash를 손쉽게 대체할 수 있는 완전한 호환성 레이어, [es-toolkit/compat](https://es-toolkit.dev/compatibility.html)을 제공해요.\n- es-toolkit은 TypeScript 타입이 내장되어 있고, 직관적이고 정확한 타입을 추구해요. [isNotNil](https://es-toolkit.dev/ko/reference/predicate/isNotNil.html) 같은 사용하기 편리한 유틸리티 함수도 제공해요.\n- es-toolkit은 [Storybook](https://github.com/storybookjs/storybook/blob/9d862798d666678cc4822e857c00bbd744169ced/code/core/package.json#L358), Recharts, [ink](https://github.com/vadimdemedes/ink/blob/2090ad9779be59dea71d173eb49785b7bd4495d0/package.json#L55), CKEditor와 같은 인기 있는 오픈소스 프로젝트에서 신뢰하고 사용하고 있어요.\n- es-toolkit은 100% 테스트 커버리지를 유지하면서, 높은 안정성을 자랑해요.\n\n## 예시\n\n```tsx\n// jsr을 사용하는 경우에는 '@es-toolkit/es-toolkit'에서 가져와요.\nimport { chunk, debounce } from 'es-toolkit';\n\nconst debouncedLog = debounce(message => {\n  console.log(message);\n}, 300);\n\n// 이 호출은 디바운스 처리돼요.\ndebouncedLog('Hello, world!');\n\nconst array = [1, 2, 3, 4, 5, 6];\nconst chunkedArray = chunk(array, 2);\n\nconsole.log(chunkedArray);\n// 출력: [[1, 2], [3, 4], [5, 6]]\n```\n\n## 기여하기\n\n커뮤니티에 있는 모든 분들에게 기여를 환영해요. 아래에 작성되어 있는 기여 가이드를 확인하세요.\n\n[CONTRIBUTING](https://github.com/toss/es-toolkit/blob/main/.github/CONTRIBUTING-ko_kr.md)\n\n## 라이선스\n\nMIT © Viva Republica, Inc. 자세한 내용은 [LICENSE](./LICENSE)를 참고하세요.\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "README-zh_hans.md",
    "content": "![](./docs/public/og.png)\n\n# es-toolkit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/es-toolkit/graph/badge.svg?token=8N5S3AR3C7)](https://codecov.io/gh/toss/es-toolkit) [![NPM badge](https://img.shields.io/npm/v/es-toolkit?logo=npm)](https://www.npmjs.com/package/es-toolkit) [![JSR badge](https://jsr.io/badges/@es-toolkit/es-toolkit)](https://jsr.io/@es-toolkit/es-toolkit) [![Discord Badge](https://discord.com/api/guilds/1281071127052943361/widget.png?style=shield)](https://discord.gg/vGXbVjP2nY)\n\n[English](https://github.com/toss/es-toolkit/blob/main/README.md) | [한국어](https://github.com/toss/es-toolkit/blob/main/README-ko_kr.md) | [日本語](https://github.com/toss/es-toolkit/blob/main/README-ja_jp.md) | 简体中文\n\nes-toolkit 是一个先进的、高性能的 JavaScript 实用工具库，具有小的捆绑包大小和强大的类型注解。\n\n- es-toolkit 提供多种现代实现的日常实用函数，如 [debounce](https://es-toolkit.dev/reference/function/debounce.html)、[delay](https://es-toolkit.dev/reference/promise/delay.html)、[chunk](https://es-toolkit.dev/reference/array/chunk.html)、[sum](https://es-toolkit.dev/reference/math/sum.html) 和 [pick](https://es-toolkit.dev/reference/object/pick.html)。\n- 设计时考虑了性能，es-toolkit 在现代 JavaScript 环境中实现了 [2-3 倍的性能提升](https://es-toolkit.dev/zh_hans/performance.html)。\n- es-toolkit 支持开箱即用，并且与其他库相比，可以将 JavaScript 代码减少高达 [97%](https://es-toolkit.dev/zh_hans/bundle-size.html)。\n- es-toolkit 提供了一个完整的兼容层 [es-toolkit/compat](https://es-toolkit.dev/compatibility.html)，可以轻松替代 lodash。\n- es-toolkit 包含内置的 TypeScript 支持，提供直观且强大的类型。它还提供诸如 [isNotNil](https://es-toolkit.dev/zh_hans/reference/predicate/isNotNil.html) 等有用的类型保护。\n- es-toolkit 被多个流行的开源库所信任和使用，例如 [Storybook](https://github.com/storybookjs/storybook/blob/9d862798d666678cc4822e857c00bbd744169ced/code/core/package.json#L358)、Recharts、ink 和 CKEditor。\n- es-toolkit 经过了百分之百的测试覆盖率的实战检验，确保其可靠性和稳健性。\n\n## 示例\n\n```tsx\n// import from '@es-toolkit/es-toolkit' in jsr.\nimport { chunk, debounce } from 'es-toolkit';\n\nconst debouncedLog = debounce(message => {\n  console.log(message);\n}, 300);\n\n// 这个调用将会被防抖处理\ndebouncedLog('Hello, world!');\n\nconst array = [1, 2, 3, 4, 5, 6];\nconst chunkedArray = chunk(array, 2);\n\nconsole.log(chunkedArray);\n// 输出: [[1, 2], [3, 4], [5, 6]]\n```\n\n## 贡献\n\n我们欢迎社区中的每个人贡献。请阅读下面的详细贡献指南。\n\n[CONTRIBUTING](https://github.com/toss/es-toolkit/blob/main/.github/CONTRIBUTING-zh_hans.md)\n\n## 许可证\n\nMIT © Viva Republica, Inc. 详细信息请参阅 [LICENSE](./LICENSE)。\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "README.md",
    "content": "![](./docs/public/og.png)\n\n# es-toolkit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/es-toolkit/graph/badge.svg?token=8N5S3AR3C7)](https://codecov.io/gh/toss/es-toolkit) [![NPM badge](https://img.shields.io/npm/v/es-toolkit?logo=npm)](https://www.npmjs.com/package/es-toolkit) [![JSR badge](https://jsr.io/badges/@es-toolkit/es-toolkit)](https://jsr.io/@es-toolkit/es-toolkit) [![Discord Badge](https://discord.com/api/guilds/1281071127052943361/widget.png?style=shield)](https://discord.gg/vGXbVjP2nY)\n\nEnglish | [한국어](https://github.com/toss/es-toolkit/blob/main/README-ko_kr.md) | [简体中文](https://github.com/toss/es-toolkit/blob/main/README-zh_hans.md) | [日本語](https://github.com/toss/es-toolkit/blob/main/README-ja_jp.md)\n\nes-toolkit is a state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.\n\n- es-toolkit offers a variety of everyday utility functions with modern implementations, such as [debounce](https://es-toolkit.dev/reference/function/debounce.html), [delay](https://es-toolkit.dev/reference/promise/delay.html), [chunk](https://es-toolkit.dev/reference/array/chunk.html), [sum](https://es-toolkit.dev/reference/math/sum.html), and [pick](https://es-toolkit.dev/reference/object/pick.html).\n- Designed with performance in mind, es-toolkit achieves [2-3× better performance](https://es-toolkit.dev/performance.html) in modern JavaScript environments.\n- es-toolkit supports tree shaking out of the box, and [reduces JavaScript code by up to 97%](https://es-toolkit.dev/bundle-size.html) compared to other libraries.\n- es-toolkit offers a complete compatibility layer to seamlessly replace lodash, available as [es-toolkit/compat](https://es-toolkit.dev/compatibility.html).\n- es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as [isNotNil](https://es-toolkit.dev/reference/predicate/isNotNil.html).\n- es-toolkit is trusted and used by popular open-source projects like [Storybook](https://github.com/storybookjs/storybook/blob/9d862798d666678cc4822e857c00bbd744169ced/code/core/package.json#L358), Recharts, ink, and CKEditor.\n- es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.\n\n## Examples\n\n```tsx\n// import from '@es-toolkit/es-toolkit' in jsr.\nimport { chunk, debounce } from 'es-toolkit';\n\nconst debouncedLog = debounce(message => {\n  console.log(message);\n}, 300);\n\n// This call will be debounced\ndebouncedLog('Hello, world!');\n\nconst array = [1, 2, 3, 4, 5, 6];\nconst chunkedArray = chunk(array, 2);\n\nconsole.log(chunkedArray);\n// Output: [[1, 2], [3, 4], [5, 6]]\n```\n\n## Contributing\n\nWe welcome contribution from everyone in the community. Read below for detailed contribution guide.\n\n[CONTRIBUTING](https://github.com/toss/es-toolkit/blob/main/.github/CONTRIBUTING.md)\n\n## License\n\nMIT © Viva Republica, Inc. See [LICENSE](./LICENSE) for details.\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nThe following table describes the versions of this project that are currently supported with security updates:\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 1.x     | :white_check_mark: |\n\n## Reporting a Vulnerability\n\nWe consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.\n\nPlease refrain from reporting security vulnerabilities through public GitHub issues, discussions, or pull requests.\n\nIf you discover a security vulnerability, report the security issue to the project maintainers directly at [opensource@toss.im](mailto:opensource@toss.im).\n"
  },
  {
    "path": "benchmarks/bundle-size/add.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('add bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'add');\n    expect(bundleSize).toMatchInlineSnapshot(`1948`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'add');\n    expect(bundleSize).toMatchInlineSnapshot(`455`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/camelCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('camelCase bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'camelCase');\n    expect(bundleSize).toMatchInlineSnapshot(`7293`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'camelCase');\n    expect(bundleSize).toMatchInlineSnapshot(`370`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'camelCase');\n    expect(bundleSize).toMatchInlineSnapshot(`650`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/chunk.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('chunk bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'chunk');\n    expect(bundleSize).toMatchInlineSnapshot(`3153`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'chunk');\n    expect(bundleSize).toMatchInlineSnapshot(`238`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'chunk');\n    expect(bundleSize).toMatchInlineSnapshot(`486`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/clone.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('clone bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'clone');\n    expect(bundleSize).toMatchInlineSnapshot(`14695`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'clone');\n    expect(bundleSize).toMatchInlineSnapshot(`866`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'clone');\n    expect(bundleSize).toMatchInlineSnapshot(`2527`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/cloneDeep.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('cloneDeep bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'cloneDeep');\n    expect(bundleSize).toMatchInlineSnapshot(`14703`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'cloneDeep');\n    expect(bundleSize).toMatchInlineSnapshot(`3171`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'cloneDeep');\n    expect(bundleSize).toMatchInlineSnapshot(`3522`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/curry.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('curry bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'curry');\n    expect(bundleSize).toMatchInlineSnapshot(`11021`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'curry');\n    expect(bundleSize).toMatchInlineSnapshot(`197`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'curry');\n    expect(bundleSize).toMatchInlineSnapshot(`711`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/debounce.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('debounce bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'debounce');\n    expect(bundleSize).toMatchInlineSnapshot(`2873`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'debounce');\n    expect(bundleSize).toMatchInlineSnapshot(`531`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'debounce');\n    expect(bundleSize).toMatchInlineSnapshot(`961`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/difference.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('difference bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'difference');\n    expect(bundleSize).toMatchInlineSnapshot(`7958`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'difference');\n    expect(bundleSize).toMatchInlineSnapshot(`90`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'difference');\n    expect(bundleSize).toMatchInlineSnapshot(`478`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/escape.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('escape bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'escape');\n    expect(bundleSize).toMatchInlineSnapshot(`1886`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'escape');\n    expect(bundleSize).toMatchInlineSnapshot(`145`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'escape');\n    expect(bundleSize).toMatchInlineSnapshot(`348`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/escapeRegExp.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('escapeRegExp bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'escapeRegExp');\n    expect(bundleSize).toMatchInlineSnapshot(`1768`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'escapeRegExp');\n    expect(bundleSize).toMatchInlineSnapshot(`88`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'escapeRegExp');\n    expect(bundleSize).toMatchInlineSnapshot(`291`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/find.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('find bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'find');\n    expect(bundleSize).toMatchInlineSnapshot(`17334`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'find');\n    expect(bundleSize).toMatchInlineSnapshot(`7763`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/findKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('findKey bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'findKey');\n    expect(bundleSize).toMatchInlineSnapshot(`16489`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'findKey');\n    expect(bundleSize).toMatchInlineSnapshot(`86`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'findKey');\n    expect(bundleSize).toMatchInlineSnapshot(`7688`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/flow.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('flow bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'flow');\n    expect(bundleSize).toMatchInlineSnapshot(`6174`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'flow');\n    expect(bundleSize).toMatchInlineSnapshot(`162`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'flow');\n    expect(bundleSize).toMatchInlineSnapshot(`436`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/isEqual.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('isEqual bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'isEqual');\n    expect(bundleSize).toMatchInlineSnapshot(`12872`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'isEqual');\n    expect(bundleSize).toMatchInlineSnapshot(`3171`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'isEqual');\n    expect(bundleSize).toMatchInlineSnapshot(`3171`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/isPlainObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('isPlainObject bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'isPlainObject');\n    expect(bundleSize).toMatchInlineSnapshot(`1586`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'isPlainObject');\n    expect(bundleSize).toMatchInlineSnapshot(`235`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'isPlainObject');\n    expect(bundleSize).toMatchInlineSnapshot(`435`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/lastIndexOf.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('lastIndexOf bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'lastIndexOf');\n    expect(bundleSize).toMatchInlineSnapshot(`1586`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'lastIndexOf');\n    expect(bundleSize).toMatchInlineSnapshot(`375`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/mapKeys.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('mapKeys bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'mapKeys');\n    expect(bundleSize).toMatchInlineSnapshot(`16649`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'mapKeys');\n    expect(bundleSize).toMatchInlineSnapshot(`138`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'mapKeys');\n    expect(bundleSize).toMatchInlineSnapshot(`7701`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/mapValues.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('mapValues bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'mapValues');\n    expect(bundleSize).toMatchInlineSnapshot(`16649`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'mapValues');\n    expect(bundleSize).toMatchInlineSnapshot(`138`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'mapValues');\n    expect(bundleSize).toMatchInlineSnapshot(`7701`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/merge.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('merge bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'merge');\n    expect(bundleSize).toMatchInlineSnapshot(`12483`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'merge');\n    expect(bundleSize).toMatchInlineSnapshot(`521`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'merge');\n    expect(bundleSize).toMatchInlineSnapshot(`5721`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/mergeWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('mergeWith bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'mergeWith');\n    expect(bundleSize).toMatchInlineSnapshot(`12487`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'mergeWith');\n    expect(bundleSize).toMatchInlineSnapshot(`368`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'mergeWith');\n    expect(bundleSize).toMatchInlineSnapshot(`5665`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/omit.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('omit bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'omit');\n    expect(bundleSize).toMatchInlineSnapshot(`18549`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'omit');\n    expect(bundleSize).toMatchInlineSnapshot(`116`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'omit');\n    expect(bundleSize).toMatchInlineSnapshot(`8042`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/throttle.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('throttle bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'throttle');\n    expect(bundleSize).toMatchInlineSnapshot(`3111`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'throttle');\n    expect(bundleSize).toMatchInlineSnapshot(`764`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'throttle');\n    expect(bundleSize).toMatchInlineSnapshot(`1065`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/utils/getBundleSize.ts",
    "content": "import esbuild from 'esbuild';\nimport path from 'path';\n\nexport async function getBundleSize(pkg: 'lodash-es' | 'es-toolkit' | 'es-toolkit/compat', funcName: string) {\n  const script = `import { ${funcName} } from \"${pkg}\"; console.log(${funcName})`;\n\n  const bundled = await esbuild.build({\n    stdin: {\n      contents: script,\n      resolveDir: import.meta.dirname,\n      sourcefile: path.resolve(import.meta.dirname, 'test.js'),\n      loader: 'js',\n    },\n    write: false,\n    minify: true,\n    bundle: true,\n  });\n\n  return Buffer.from(bundled.outputFiles![0].contents).byteLength;\n}\n"
  },
  {
    "path": "benchmarks/bundle-size/zip.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('zip bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'zip');\n    expect(bundleSize).toMatchInlineSnapshot(`3961`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'zip');\n    expect(bundleSize).toMatchInlineSnapshot(`221`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'zip');\n    expect(bundleSize).toMatchInlineSnapshot(`478`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/zipObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('zipObject bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'zipObject');\n    expect(bundleSize).toMatchInlineSnapshot(`2729`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'zipObject');\n    expect(bundleSize).toMatchInlineSnapshot(`101`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'zipObject');\n    expect(bundleSize).toMatchInlineSnapshot(`265`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/zipObjectDeep.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('zipObjectDeep bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'zipObjectDeep');\n    expect(bundleSize).toMatchInlineSnapshot(`7338`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'zipObjectDeep');\n    expect(bundleSize).toMatchInlineSnapshot(`2297`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/bundle-size/zipWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleSize } from './utils/getBundleSize';\n\ndescribe('zipWith bundle size', () => {\n  it('lodash-es', async () => {\n    const bundleSize = await getBundleSize('lodash-es', 'zipWith');\n    expect(bundleSize).toMatchInlineSnapshot(`4185`);\n  });\n\n  it('es-toolkit', async () => {\n    const bundleSize = await getBundleSize('es-toolkit', 'zipWith');\n    expect(bundleSize).toMatchInlineSnapshot(`198`);\n  });\n\n  it('es-toolkit/compat', async () => {\n    const bundleSize = await getBundleSize('es-toolkit/compat', 'zipWith');\n    expect(bundleSize).toMatchInlineSnapshot(`718`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/package.json",
    "content": "{\n  \"name\": \"benchmarks\",\n  \"private\": true,\n  \"scripts\": {\n    \"check-bundle-size\": \"vitest --update\"\n  },\n  \"dependencies\": {\n    \"es-toolkit\": \"workspace:^\",\n    \"esbuild\": \"0.23.0\",\n    \"lodash\": \"^4.17.21\",\n    \"lodash-es\": \"^4.17.21\",\n    \"vitest\": \"^4.0.17\"\n  },\n  \"devDependencies\": {\n    \"@types/lodash\": \"^4.17.20\",\n    \"@types/lodash-es\": \"^4\",\n    \"rfdc\": \"^1.4.1\"\n  }\n}\n"
  },
  {
    "path": "benchmarks/performance/add.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { add as addToolkitCompat_ } from 'es-toolkit/compat';\nimport { add as addLodash_ } from 'lodash';\n\nconst addToolkitCompat = addToolkitCompat_;\nconst addLodash = addLodash_;\n\ndescribe('add function benchmark', () => {\n  bench('es-toolkit/compat/add', () => {\n    addToolkitCompat(2, 3);\n    addToolkitCompat(-1, -5);\n    addToolkitCompat(NaN, 3);\n    addToolkitCompat(3, NaN);\n    addToolkitCompat(NaN, NaN);\n  });\n\n  bench('lodash/add', () => {\n    addLodash(2, 3);\n    addLodash(-1, -5);\n    addLodash(NaN, 3);\n    addLodash(3, NaN);\n    addLodash(NaN, NaN);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/after.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { after as afterToolkit_ } from 'es-toolkit';\nimport { after as afterCompatToolkit_ } from 'es-toolkit/compat';\nimport { after as afterLodash_ } from 'lodash';\n\nconst afterToolkit = afterToolkit_;\nconst afterCompatToolkit = afterCompatToolkit_;\nconst afterLodash = afterLodash_;\n\ndescribe('after', () => {\n  bench('es-toolkit/after', () => {\n    const add = (a: number, b: number) => a + b;\n    const n = 10;\n    const afterFn = afterToolkit(n, add);\n    for (let i = 0; i < n + 1; i++) {\n      afterFn(1, 2);\n    }\n  });\n\n  bench('es-toolkit/compat/after', () => {\n    const add = (a: number, b: number) => a + b;\n    const n = 10;\n    const afterFn = afterCompatToolkit(n, add);\n    for (let i = 0; i < n + 1; i++) {\n      afterFn(1, 2);\n    }\n  });\n\n  bench('lodash/after', () => {\n    const add = (a: number, b: number) => a + b;\n    const n = 10;\n    const afterFn = afterLodash(n, add);\n    for (let i = 0; i < n + 1; i++) {\n      afterFn(1, 2);\n    }\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/ary.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { ary as aryToolkit_ } from 'es-toolkit';\nimport { ary as aryCompactToolkit_ } from 'es-toolkit/compat';\nimport { ary as aryLodash_ } from 'lodash';\n\nconst aryToolkit = aryToolkit_;\nconst aryCompactToolkit = aryCompactToolkit_;\nconst aryLodash = aryLodash_;\n\ndescribe('ary', () => {\n  bench('es-toolkit/ary', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    aryToolkit((_a, _b, _c) => undefined, 2);\n  });\n\n  bench('es-toolkit/compat/ary', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    aryCompactToolkit((_a, _b, _c) => undefined, 2);\n  });\n\n  bench('lodash/ary', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    aryLodash((_a, _b, _c) => undefined, 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/assign.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { assign as assignCompatToolkit_ } from 'es-toolkit/compat';\nimport { assign as assignLodash_ } from 'lodash';\n\nconst assignToolkit = assignCompatToolkit_;\nconst assignLodash = assignLodash_;\n\ndescribe('assign', () => {\n  bench('es-toolkit/assign', () => {\n    assignToolkit({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 });\n  });\n\n  bench('lodash/assign', () => {\n    assignLodash({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/assignIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { assignIn as assignInCompatToolkit_ } from 'es-toolkit/compat';\nimport { assignIn as assignInLodash_ } from 'lodash';\n\nconst assignInToolkit = assignInCompatToolkit_;\nconst assignInLodash = assignInLodash_;\n\ndescribe('assignIn', () => {\n  bench('es-toolkit/assignIn', () => {\n    assignInToolkit({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 });\n  });\n\n  bench('lodash/assignIn', () => {\n    assignInLodash({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/assignInWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { assignInWith as assignInWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { assignInWith as assignInWithLodash_ } from 'lodash';\n\nconst assignInWithToolkit = assignInWithCompatToolkit_;\nconst assignInWithLodash = assignInWithLodash_;\n\ndescribe('assignInWith', () => {\n  bench('es-toolkit/assignInWith', () => {\n    assignInWithToolkit({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 }, (objValue, srcValue) => {\n      return objValue === undefined ? srcValue : objValue;\n    });\n  });\n\n  bench('lodash/assignInWith', () => {\n    assignInWithLodash({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 }, (objValue, srcValue) => {\n      return objValue === undefined ? srcValue : objValue;\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/assignWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { assignWith as assignWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { assignWith as assignWithLodash_ } from 'lodash';\n\nconst assignWithToolkit = assignWithCompatToolkit_;\nconst assignWithLodash = assignWithLodash_;\n\ndescribe('assignWith', () => {\n  bench('es-toolkit/assignWith', () => {\n    assignWithToolkit({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 }, (objValue, srcValue) => {\n      return objValue === undefined ? srcValue : objValue;\n    });\n  });\n\n  bench('lodash/assignWith', () => {\n    assignWithLodash({ a: 1 }, { b: 2 }, { c: 3 }, { a: 4 }, (objValue, srcValue) => {\n      return objValue === undefined ? srcValue : objValue;\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/at.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { at as atToolkit_ } from 'es-toolkit';\nimport { at as atToolkitCompat_ } from 'es-toolkit/compat';\nimport { at as atLodash_ } from 'lodash';\n\nconst atToolkit = atToolkit_;\nconst atToolkitCompat = atToolkitCompat_;\nconst atLodash = atLodash_;\n\ndescribe('at', () => {\n  const data = ['a', 'b', 'c', 'd', 'e'];\n  const indices = [0, 2, -2, 1.5, -1.5];\n\n  bench('es-toolkit/at', () => {\n    atToolkit(data, indices);\n  });\n\n  bench('es-toolkit/compat/at', () => {\n    atToolkitCompat(data, indices);\n  });\n\n  bench('lodash/at', () => {\n    atLodash(data, indices);\n  });\n\n  bench('Array.prototype.at', () => {\n    indices.map(i => data.at(i));\n  });\n});\n\ndescribe('at/largeArray', () => {\n  const largeData = Array.from({ length: 10000 }, (_, i) => i);\n  const largeIndices = Array.from({ length: 1000 }, (_, i) => i * 2);\n\n  bench('es-toolkit/at', () => {\n    atToolkit(largeData, largeIndices);\n  });\n\n  bench('es-toolkit/compat/at', () => {\n    atToolkitCompat(largeData, largeIndices);\n  });\n\n  bench('lodash/at', () => {\n    atLodash(largeData, largeIndices);\n  });\n\n  bench('Array.prototype.at', () => {\n    largeIndices.map(i => largeData.at(i));\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/attempt.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { attempt as attemptToolkit_ } from 'es-toolkit/compat';\nimport { attempt as attemptLodash_ } from 'lodash';\n\nconst attemptToolkit = attemptToolkit_;\nconst attemptLodash = attemptLodash_;\n\ndescribe('attempt', () => {\n  bench('es-toolkit/attempt', () => {\n    attemptToolkit(() => undefined);\n  });\n\n  bench('lodash/attempt', () => {\n    attemptLodash(() => undefined);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/before.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { before as beforeToolkit_ } from 'es-toolkit';\nimport { before as beforeToolkitCompat_ } from 'es-toolkit/compat';\nimport { before as beforeLodash_ } from 'lodash';\n\nconst beforeToolkit = beforeToolkit_;\nconst beforeToolkitCompat = beforeToolkitCompat_;\nconst beforeLodash = beforeLodash_;\n\ndescribe('before', () => {\n  bench(\n    'es-toolkit/before',\n    () => {\n      const add = (a: number, b: number) => a + b;\n      const n = 10;\n      const beforeFn = beforeToolkit(10, add);\n\n      for (let i = 0; i < n; i++) {\n        beforeFn(1, 2);\n      }\n    },\n    {\n      time: 100,\n    }\n  );\n  bench(\n    'es-toolkit/compat/before',\n    () => {\n      const add = (a: number, b: number) => a + b;\n      const n = 10;\n      const beforeFn = beforeToolkitCompat(10, add);\n\n      for (let i = 0; i < n; i++) {\n        beforeFn(1, 2);\n      }\n    },\n    {\n      time: 100,\n    }\n  );\n\n  bench(\n    'lodash/before',\n    () => {\n      const add = (a: number, b: number) => a + b;\n      const n = 10;\n      const beforeFn = beforeLodash(10, add);\n\n      for (let i = 0; i < n; i++) {\n        beforeFn(1, 2);\n      }\n    },\n    {\n      time: 100,\n    }\n  );\n});\n"
  },
  {
    "path": "benchmarks/performance/bind.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { bind as bindToolkit_ } from 'es-toolkit/compat';\nimport { bind as bindLodash_ } from 'lodash';\n\nconst bindToolkit = bindToolkit_;\nconst bindLodash = bindLodash_;\n\nfunction fn(this: any) {\n  const result = [this];\n  // eslint-disable-next-line prefer-rest-params\n  return result.concat(Array.from(arguments));\n}\n\ndescribe('bind - without placeholder', () => {\n  bench('es-toolkit/bind - without placeholder', () => {\n    const object = {};\n    bindToolkit(fn, object, 'a');\n  });\n\n  bench('lodash/bind - without placeholder', () => {\n    const object = {};\n    bindLodash(fn, object, 'a');\n  });\n});\n\ndescribe('bind - with placeholder', () => {\n  bench('es-toolkit/bind - with placeholder', () => {\n    const object = {};\n    bindToolkit(fn, object, 'a', bindToolkit.placeholder);\n  });\n\n  bench('lodash/bind - with placeholder', () => {\n    const object = {};\n    bindLodash(fn, object, 'a', bindLodash.placeholder);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/bindAll.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { bindAll as bindAllToolkit_ } from 'es-toolkit/compat';\nimport { bindAll as bindAllLodash_ } from 'lodash';\n\nconst bindAllToolkit = bindAllToolkit_;\nconst bindAllLodash = bindAllLodash_;\n\nconst object = {\n  greet() {\n    return 'hello ' + this.name;\n  },\n  farewell() {\n    return 'goodbye ' + this.name;\n  },\n  name: 'John',\n};\n\ndescribe('bindAll - single method', () => {\n  bench('es-toolkit/bindAll - single method', () => {\n    bindAllToolkit(object, 'greet');\n  });\n\n  bench('lodash/bindAll - single method', () => {\n    bindAllLodash(object, 'greet');\n  });\n});\n\ndescribe('bindAll - multiple methods', () => {\n  bench('es-toolkit/bindAll - multiple methods', () => {\n    bindAllToolkit(object, ['greet', 'farewell']);\n  });\n\n  bench('lodash/bindAll - multiple methods', () => {\n    bindAllLodash(object, ['greet', 'farewell']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/bindKey.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { bindKey as bindKeyToolkit_ } from 'es-toolkit/compat';\nimport { bindKey as bindKeyLodash_ } from 'lodash';\n\nconst bindKeyToolkit = bindKeyToolkit_;\nconst bindKeyLodash = bindKeyLodash_;\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting: string) {\n    return `${this.user} says: ${greeting}`;\n  },\n};\n\ndescribe('bindKey - without placeholder', () => {\n  bench('es-toolkit/bindKey - without placeholder', () => {\n    bindKeyToolkit(object, 'greet', 'hi');\n  });\n\n  bench('lodash/bindKey - without placeholder', () => {\n    bindKeyLodash(object, 'greet', 'hi');\n  });\n});\n\ndescribe('bindKey - with placeholder', () => {\n  bench('es-toolkit/bindKey - with placeholder', () => {\n    bindKeyToolkit(object, 'greet', bindKeyToolkit.placeholder);\n  });\n\n  bench('lodash/bindKey - with placeholder', () => {\n    bindKeyLodash(object, 'greet', bindKeyLodash.placeholder);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/camelCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { camelCase as camelCaseToolkit_ } from 'es-toolkit';\nimport { camelCase as camelCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { camelCase as camelCaseLodash_ } from 'lodash';\n\nconst camelCaseToolkit = camelCaseToolkit_;\nconst camelCaseToolkitCompat = camelCaseToolkitCompat_;\nconst camelCaseLodash = camelCaseLodash_;\n\ndescribe('camelCase', () => {\n  bench('es-toolkit/camelCase', () => {\n    const str = 'kebab-case';\n    camelCaseToolkit(str);\n  });\n\n  bench('es-toolkit/compat/camelCase', () => {\n    const str = 'kebab-case';\n    camelCaseToolkitCompat(str);\n  });\n\n  bench('lodash/camelCase', () => {\n    const str = 'kebab-case';\n    camelCaseLodash(str);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/capitalize.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { capitalize as capitalizeToolkit_ } from 'es-toolkit';\nimport { capitalize as capitalizeToolkitCompat_ } from 'es-toolkit/compat';\nimport { capitalize as capitalizeLodash_ } from 'lodash';\n\nconst capitalizeToolkit = capitalizeToolkit_;\nconst capitalizeToolkitCompat = capitalizeToolkitCompat_;\nconst capitalizeLodash = capitalizeLodash_;\n\ndescribe('capitalize', () => {\n  bench('es-toolkit/capitalize', () => {\n    const str = 'camelCase';\n    capitalizeToolkit(str);\n  });\n\n  bench('es-toolkit/compat/capitalize', () => {\n    const str = 'camelCase';\n    capitalizeToolkitCompat(str);\n  });\n\n  bench('lodash/capitalize', () => {\n    const str = 'camelCase';\n    capitalizeLodash(str);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/castArray.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { castArray as castArrayToolkit_ } from 'es-toolkit/compat';\nimport { castArray as castArrayLodash_ } from 'lodash';\n\nconst castArrayToolkit = castArrayToolkit_;\nconst castArrayLodash = castArrayLodash_;\n\ndescribe('castArray', () => {\n  bench('es-toolkit/castArray', () => {\n    castArrayToolkit(1);\n    castArrayToolkit([1]);\n    castArrayToolkit();\n  });\n\n  bench('lodash/castArray', () => {\n    castArrayLodash(1);\n    castArrayLodash([1]);\n    castArrayLodash();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/ceil.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { ceil as ceilToolkit_ } from 'es-toolkit/compat';\nimport { ceil as ceilLodash_ } from 'lodash';\n\nconst ceilToolkit = ceilToolkit_;\nconst ceilLodash = ceilLodash_;\n\ndescribe('ceil', () => {\n  bench('es-toolkit/ceil', () => {\n    ceilToolkit(4.006);\n    ceilToolkit(4.006, 0);\n    ceilToolkit(4.016, 2);\n    ceilToolkit(4.1, 2);\n    ceilToolkit(4.4, 2);\n    ceilToolkit(4160, -2);\n    ceilToolkit(4.006, NaN);\n    ceilToolkit(4.016, 2.6);\n    ceilToolkit(4.016, '+2');\n    ceilToolkit(5e1, 2);\n    ceilToolkit('5e', 1);\n    ceilToolkit('5e1e1', 1);\n  });\n\n  bench('lodash/ceil', () => {\n    ceilLodash(4.006);\n    ceilLodash(4.006, 0);\n    ceilLodash(4.016, 2);\n    ceilLodash(4.1, 2);\n    ceilLodash(4.4, 2);\n    ceilLodash(4160, -2);\n    ceilLodash(4.006, NaN);\n    ceilLodash(4.016, 2.6);\n    ceilLodash(4.016, '+2');\n    ceilLodash(5e1, 2);\n    ceilLodash('5e', 1);\n    ceilLodash('5e1e1', 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/check-dist-mock.bench.ts",
    "content": "import { bench, describe } from 'vitest';\n\nconst mockCreatePackageTarball = () => {\n  return new Promise(resolve => {\n    setTimeout(() => {\n      resolve({ path: '/tmp/mock-package.tgz' });\n    }, 50);\n  });\n};\n\nconst mockProcessTarball = () => {\n  return new Promise(resolve => {\n    setTimeout(() => {\n      resolve({ exports: { '.': {}, './array': {}, './object': {} } });\n    }, 10);\n  });\n};\n\ndescribe('check-dist performance comparison (mocked)', () => {\n  bench('Original approach: Duplicate tarball creation', async () => {\n    await mockCreatePackageTarball();\n    await mockProcessTarball();\n\n    await mockCreatePackageTarball();\n    await mockProcessTarball();\n  });\n\n  bench('Optimized approach: Shared tarball creation', async () => {\n    const sharedTarball = await mockCreatePackageTarball();\n    void sharedTarball;\n\n    await mockProcessTarball();\n    await mockProcessTarball();\n  });\n});\n\ndescribe('function call overhead comparison', () => {\n  const createTarball = () => ({ path: '/tmp/test.tgz' });\n  const processTarball = () => ({ exports: {} });\n\n  bench('Original: Function calls with recreation', () => {\n    createTarball();\n    processTarball();\n\n    createTarball();\n    processTarball();\n  });\n\n  bench('Optimized: Function calls with reuse', () => {\n    const sharedTarball = createTarball();\n    void sharedTarball;\n\n    processTarball();\n    processTarball();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/chunk.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { chunk as chunkToolkit_ } from 'es-toolkit';\nimport { chunk as chunkCompatToolkit_ } from 'es-toolkit/compat';\nimport { chunk as chunkLodash_ } from 'lodash';\n\nconst chunkToolkit = chunkToolkit_;\nconst chunkCompatToolkit = chunkCompatToolkit_;\nconst chunkLodash = chunkLodash_;\n\ndescribe('chunk', () => {\n  bench('lodash/chunk', () => {\n    chunkLodash([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('es-toolkit/chunk', () => {\n    chunkToolkit([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('es-toolkit/compat/chunk', () => {\n    chunkCompatToolkit([1, 2, 3, 4, 5, 6], 3);\n  });\n});\n\ndescribe('chunk/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('lodash/chunk', () => {\n    chunkLodash(largeArray, 100);\n  });\n\n  bench('es-toolkit/chunk', () => {\n    chunkToolkit(largeArray, 100);\n  });\n\n  bench('es-toolkit/compat/chunk', () => {\n    chunkCompatToolkit(largeArray, 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/clamp.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { clamp as clampToolkit_ } from 'es-toolkit';\nimport { clamp as clampCompatToolkit_ } from 'es-toolkit/compat';\nimport { clamp as clampLodash_ } from 'lodash';\n\nconst clampToolkit = clampToolkit_;\nconst clampCompatToolkit = clampCompatToolkit_;\nconst clampLodash = clampLodash_;\n\ndescribe('clamp', () => {\n  bench('es-toolkit/clamp', () => {\n    clampToolkit(10, 5, 15);\n    clampToolkit(10, 5);\n  });\n\n  bench('es-toolkit/compat/clamp', () => {\n    clampCompatToolkit(10, 5, 15);\n    clampCompatToolkit(10, 5);\n  });\n\n  bench('lodash/clamp', () => {\n    clampLodash(10, 5, 15);\n    clampLodash(10, 5);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/clone.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { clone as cloneToolkit_ } from 'es-toolkit';\nimport { clone as cloneToolkitCompat_ } from 'es-toolkit/compat';\nimport { clone as cloneLodash_ } from 'lodash';\n\nconst cloneToolkit = cloneToolkit_;\nconst cloneToolkitCompat = cloneToolkitCompat_;\nconst cloneLodash = cloneLodash_;\n\nconst obj = {\n  number: 29,\n  string: 'es-toolkit',\n  boolean: true,\n  array: [1, 2, 3],\n  object: { a: 1, b: 'es-toolkit' },\n  date: new Date(),\n  regex: /abc/g,\n  nested: { a: [1, 2, 3], b: { c: 'es-toolkit' }, d: new Date() },\n};\n\ndescribe('clone', () => {\n  bench('es-toolkit/clone', () => {\n    cloneToolkit(obj);\n  });\n\n  bench('es-toolkit/clone/compat', () => {\n    cloneToolkitCompat(obj);\n  });\n\n  bench('lodash/clone', () => {\n    cloneLodash(obj);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/cloneDeep.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { cloneDeep as cloneDeepToolkit_ } from 'es-toolkit';\nimport { cloneDeep as cloneDeepCompatToolkit_ } from 'es-toolkit/compat';\nimport { cloneDeep as cloneDeepLodash_ } from 'lodash';\nimport rfdc_ from 'rfdc';\n\nconst cloneDeepToolkit = cloneDeepToolkit_;\nconst cloneDeepCompatToolkit = cloneDeepCompatToolkit_;\nconst cloneDeepLodash = cloneDeepLodash_;\nconst rfdcWithCircle = rfdc_({\n  circles: true,\n});\nconst rfdc = rfdc_();\n\nconst obj = {\n  number: 29,\n  string: 'es-toolkit',\n  boolean: true,\n  array: [1, 2, 3],\n  object: { a: 1, b: 'es-toolkit' },\n  date: new Date(),\n  regex: /abc/g,\n  instance: new (class Test {\n    value = 1;\n  })(),\n  nested: { a: [1, 2, 3], b: { c: 'es-toolkit' }, d: new Date() },\n  nested2: { a: { b: { c: { d: { e: { f: { g: 'es-toolkit' } } } } } } },\n};\n\ndescribe('cloneDeep', () => {\n  bench('es-toolkit/cloneDeep', () => {\n    cloneDeepToolkit(obj);\n  });\n\n  bench('es-toolkit/compat/cloneDeep', () => {\n    cloneDeepCompatToolkit(obj);\n  });\n\n  bench('lodash/cloneDeep', () => {\n    cloneDeepLodash(obj);\n  });\n\n  bench('node/JSON.parse', () => {\n    JSON.parse(JSON.stringify(obj));\n  });\n\n  bench('node/structuredClone', () => {\n    structuredClone(obj);\n  });\n\n  bench('rfdc without circle', () => {\n    rfdc(obj);\n  });\n\n  bench('rfdc with circle', () => {\n    rfdcWithCircle(obj);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/cloneWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { cloneWith as cloneWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { cloneWith as cloneWithLodash_ } from 'lodash';\n\nconst cloneWithLodash = cloneWithLodash_;\nconst cloneWithToolkitCompat = cloneWithToolkitCompat_;\n\nconst obj = {\n  number: 29,\n  string: 'es-toolkit',\n  boolean: true,\n  array: [1, 2, 3],\n  object: { a: 1, b: 'es-toolkit' },\n  date: new Date(),\n  regex: /abc/g,\n  nested: { a: [1, 2, 3], b: { c: 'es-toolkit' }, d: new Date() },\n};\n\nfunction customizer(value: any) {\n  if (typeof value === 'number') {\n    return value * 2;\n  }\n}\n\ndescribe('cloneWith', () => {\n  bench('lodash/cloneWith', () => {\n    cloneWithLodash(obj);\n  });\n  bench('es-toolkit/compat/cloneWith', () => {\n    cloneWithToolkitCompat(obj);\n  });\n\n  bench('lodash/cloneWith (with customizer)', () => {\n    cloneWithLodash(obj, customizer);\n  });\n  bench('es-toolkit/compat/cloneWith (with customizer)', () => {\n    cloneWithToolkitCompat(obj, customizer);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/compact.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { compact as compactToolkit_ } from 'es-toolkit';\nimport { compact as compactToolkitCompat_ } from 'es-toolkit/compat';\nimport { compact as compactLodash_ } from 'lodash';\n\nconst compactToolkit = compactToolkit_;\nconst compactToolkitCompat = compactToolkitCompat_;\nconst compactLodash = compactLodash_;\n\ndescribe('compact', () => {\n  bench('es-toolkit', () => {\n    compactToolkit([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n  });\n\n  bench('es-toolkit/compat', () => {\n    compactToolkitCompat([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n  });\n\n  bench('lodash', () => {\n    compactLodash([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n  });\n});\n\ndescribe('compact/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => (i % 10 === 0 ? undefined : i));\n\n  bench('es-toolkit', () => {\n    compactToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat', () => {\n    compactToolkitCompat(largeArray);\n  });\n\n  bench('lodash', () => {\n    compactLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/concat.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { concat as concatToolkit_ } from 'es-toolkit/compat';\nimport { concat as concatLodash_ } from 'lodash';\n\nconst concatToolkit = concatToolkit_;\nconst concatLodash = concatLodash_;\n\ndescribe('concat', () => {\n  bench('es-toolkit/concat', () => {\n    concatToolkit([1, [2, 3]], 4);\n  });\n\n  bench('lodash/concat', () => {\n    concatLodash([1, [2, 3]], 4);\n  });\n});\n\ndescribe('concat/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/concat', () => {\n    concatToolkit(largeArray, largeArray);\n  });\n\n  bench('lodash/concat', () => {\n    concatLodash(largeArray, largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/cond.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { cond as condToolkitCompat_ } from 'es-toolkit/compat';\nimport { cond as condLodash_ } from 'lodash';\n\nconst condToolkitCompat = condToolkitCompat_;\nconst condLodash = condLodash_;\n\ndescribe('cond', () => {\n  const isA = (obj: { a: number }) => obj && obj.a === 1;\n  const isB = (obj: { b: number }) => obj && obj.b === 1;\n  const isC = (obj: { c: number }) => obj && obj.c;\n\n  const returnA = () => 'a';\n  const returnB = () => 'b';\n  const returnC = () => 'c';\n\n  const pairs = [\n    [isA, returnA],\n    [isB, returnB],\n    [isC, returnC],\n  ];\n\n  const objA = { a: 1, b: 0, c: 0 };\n  const objB = { a: 0, b: 1, c: 0 };\n  const objC = { a: 0, b: 0, c: 1 };\n  const objNone = { a: 0, b: 0, c: 0 };\n\n  const funcToolkit = condToolkitCompat(pairs as any) as (obj: any) => string;\n  const funcLodash = condLodash(pairs as any) as (obj: any) => string;\n\n  bench(\n    'es-toolkit/compat/cond',\n    () => {\n      funcToolkit(objA);\n      funcToolkit(objB);\n      funcToolkit(objC);\n      funcToolkit(objNone);\n    },\n    {\n      time: 100,\n    }\n  );\n\n  bench(\n    'lodash/cond',\n    () => {\n      funcLodash(objA);\n      funcLodash(objB);\n      funcLodash(objC);\n      funcLodash(objNone);\n    },\n    {\n      time: 100,\n    }\n  );\n});\n"
  },
  {
    "path": "benchmarks/performance/conforms.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { conforms as conformsToolkit_ } from 'es-toolkit/compat';\nimport { conforms as conformsLodash_ } from 'lodash';\n\nconst conformsToolkit = conformsToolkit_;\nconst conformsLodash = conformsLodash_;\n\ndescribe('conforms', () => {\n  bench('es-toolkit/conforms', () => {\n    conformsToolkit({\n      b: (n: number) => n > 1,\n    });\n  });\n\n  bench('lodash/conforms', () => {\n    conformsLodash({\n      b: (n: number) => n > 1,\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/conformsTo.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { conformsTo as conformsToToolkit_ } from 'es-toolkit/compat';\nimport { conformsTo as conformsToLodash_ } from 'lodash';\n\nconst conformsToToolkit = conformsToToolkit_;\nconst conformsToLodash = conformsToLodash_;\n\ndescribe('conformsTo', () => {\n  bench('es-toolkit/conformsTo', () => {\n    conformsToToolkit(\n      { a: 1, b: 2 },\n      {\n        a: (n: number) => n > 0,\n        b: (n: number) => n > 1,\n      }\n    );\n  });\n\n  bench('lodash/conformsTo', () => {\n    conformsToLodash(\n      { a: 1, b: 2 },\n      {\n        a: (n: number) => n > 0,\n        b: (n: number) => n > 1,\n      }\n    );\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/constant.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { constant as constantToolkitCompat_ } from 'es-toolkit/compat';\nimport { constant as constantToLodash_ } from 'lodash';\n\nconst constantToolkitCompat = constantToolkitCompat_;\nconst constantToLodash = constantToLodash_;\n\ndescribe('constant', () => {\n  bench(\n    'es-toolkit/compat/constant',\n    () => {\n      constantToolkitCompat([1, 2, 3]);\n      constantToolkitCompat({ a: 1 });\n      constantToolkitCompat(1);\n      constantToolkitCompat('a');\n    },\n    {\n      time: 50,\n    }\n  );\n\n  bench(\n    'lodash/constant',\n    () => {\n      constantToLodash([1, 2, 3]);\n      constantToLodash({ a: 1 });\n      constantToLodash(1);\n      constantToLodash('a');\n    },\n    {\n      time: 50,\n    }\n  );\n});\n"
  },
  {
    "path": "benchmarks/performance/countBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { countBy as countByToolkit_ } from 'es-toolkit';\nimport { countBy as countByLodash_ } from 'lodash';\n\nconst countByToolkit = countByToolkit_;\nconst countByLodash = countByLodash_;\n\ndescribe('countBy', () => {\n  bench('es-toolkit/countBy', () => {\n    countByToolkit([1.2, 2.4, 3.6, 2.2, 3.4, 3.6], (item: number) => {\n      return Math.floor(item).toString();\n    });\n  });\n\n  bench('lodash/countBy', () => {\n    countByLodash([1.2, 2.4, 3.6, 2.2, 3.4, 3.6], (item: number) => {\n      return Math.floor(item).toString();\n    });\n  });\n});\n\ndescribe('countBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i + 0.5);\n\n  bench('es-toolkit/countBy', () => {\n    countByToolkit(largeArray, (item: number) => {\n      return Math.floor(item).toString();\n    });\n  });\n\n  bench('lodash/countBy', () => {\n    countByLodash(largeArray, (item: number) => {\n      return Math.floor(item).toString();\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/create.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { create as createToolkitCompat_ } from 'es-toolkit/compat';\nimport { create as createToLodash_ } from 'lodash';\n\nconst createToolkitCompat = createToolkitCompat_;\nconst createToLodash = createToLodash_;\n\ndescribe('create', () => {\n  bench('es-toolkit/compat/create', () => {\n    createToolkitCompat({ a: 1 }, { b: 2 });\n  });\n\n  bench('lodash/create', () => {\n    createToLodash({ a: 1 }, { b: 2 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/curry.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { curry as curryToolkit_ } from 'es-toolkit';\nimport { curry as curryCompat_ } from 'es-toolkit/compat';\nimport { curry as curryLodash_ } from 'lodash';\n\nconst curryToolkit = curryToolkit_;\nconst curryCompat = curryCompat_;\nconst curryLodash = curryLodash_;\n\ndescribe('curry', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/curry', () => {\n    curryToolkit(fn)(1)('a')(true);\n  });\n\n  bench('es-toolkit/compat/curry', () => {\n    curryCompat(fn)(1)('a')(true);\n  });\n\n  bench('lodash/curry', () => {\n    curryLodash(fn)(1)('a')(true);\n  });\n});\n\ndescribe('curry - compat', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/compat/curry', () => {\n    curryCompat(fn)(1, 'a', true);\n  });\n\n  bench('lodash/curry', () => {\n    curryLodash(fn)(1, 'a', true);\n  });\n});\n\ndescribe('curry - compat with placeholder', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/compat/curry', () => {\n    curryCompat(fn)(1, curryCompat.placeholder, true)('a');\n  });\n\n  bench('lodash/curry', () => {\n    curryLodash(fn)(1, curryLodash.placeholder, true)('a');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/curryRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { curryRight as curryRightToolkit_ } from 'es-toolkit';\nimport { curryRight as curryRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { curryRight as curryRightLodash_ } from 'lodash';\n\nconst curryRightToolkit = curryRightToolkit_;\nconst curryRightToolkitCompat = curryRightToolkitCompat_;\nconst curryRightLodash = curryRightLodash_;\n\ndescribe('curryRight', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/curryRight', () => {\n    curryRightToolkit(fn)(true)('a')(1);\n  });\n\n  bench('es-toolkit/compat/curryRight', () => {\n    curryRightToolkitCompat(fn)(true)('a')(1);\n  });\n\n  bench('lodash/curryRight', () => {\n    curryRightLodash(fn)(true)('a')(1);\n  });\n});\n\ndescribe('curryRight - compat', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/compat/curryRight', () => {\n    curryRightToolkitCompat(fn)(true)(1, 'a');\n  });\n\n  bench('lodash/curryRight', () => {\n    curryRightLodash(fn)(true)(1, 'a');\n  });\n});\n\ndescribe('curryRight - compat with placeholder', () => {\n  const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n\n  bench('es-toolkit/compat/curryRight', () => {\n    curryRightToolkitCompat(fn)(true)(1, curryRightToolkitCompat.placeholder)('a');\n  });\n\n  bench('lodash/curryRight', () => {\n    curryRightLodash(fn)(true)(1, curryRightLodash.placeholder)('a');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/debounce.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { debounce as debounceToolkit_ } from 'es-toolkit';\nimport { debounce as debounceCompatToolkit_ } from 'es-toolkit/compat';\nimport { debounce as debounceLodash_ } from 'lodash';\n\nconst debounceToolkit = debounceToolkit_;\nconst debounceCompatToolkit = debounceCompatToolkit_;\nconst debounceLodash = debounceLodash_;\n\ndescribe('debounce', () => {\n  bench('es-toolkit/debounce', () => {\n    debounceToolkit(() => undefined, 1000)();\n  });\n\n  bench('es-toolkit/compat/debounce', () => {\n    debounceCompatToolkit(() => undefined, 1000)();\n  });\n\n  bench('lodash/debounce', () => {\n    debounceLodash(() => undefined, 1000)();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/deburr.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { deburr as deburrToolkit_ } from 'es-toolkit';\nimport { deburr as deburrCompatToolkit_ } from 'es-toolkit/compat';\nimport { deburr as deburrLodash_ } from 'lodash';\n\nconst deburrToolkit = deburrToolkit_;\nconst deburrCompatToolkit = deburrCompatToolkit_;\nconst deburrLodash = deburrLodash_;\n\nconst longWord = 'déjà vu'.repeat(1000);\ndescribe('deburr', () => {\n  bench('lodash/deburr', () => {\n    deburrLodash('déjà vu');\n  });\n\n  bench('es-toolkit/compat/deburr', () => {\n    deburrCompatToolkit('déjà vu');\n  });\n\n  bench('es-toolkit/deburr', () => {\n    deburrToolkit('déjà vu');\n  });\n\n  bench('lodash/deburr - long words', () => {\n    deburrLodash(longWord);\n  });\n\n  bench('es-toolkit/compat/deburr - long words', () => {\n    deburrCompatToolkit(longWord);\n  });\n\n  bench('es-toolkit/deburr - long words', () => {\n    deburrToolkit(longWord);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/defaultTo.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { defaultTo as defaultToToolkitCompat_ } from 'es-toolkit/compat';\nimport { defaultTo as defaultToLodash_ } from 'lodash';\n\nconst defaultToToolkitCompat = defaultToToolkitCompat_;\nconst defaultToLodash = defaultToLodash_;\n\ndescribe('defaultTo', () => {\n  bench('es-toolkit/compat/defaultTo', () => {\n    defaultToToolkitCompat(null, 123);\n    defaultToToolkitCompat(undefined, '64');\n    defaultToToolkitCompat(NaN, 0);\n    defaultToToolkitCompat(true, 0);\n    defaultToToolkitCompat(123, 0);\n  });\n\n  bench('lodash/defaultTo', () => {\n    defaultToLodash(null, 123);\n    defaultToLodash(undefined, '64');\n    defaultToLodash(NaN, 0);\n    defaultToLodash(true, 0);\n    defaultToLodash(123, 0);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/defaults.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { defaults as defaultsToolkitCompat_ } from 'es-toolkit/compat';\nimport { defaults as defaultsLodash_ } from 'lodash';\n\nconst defaultsToolkitCompat = defaultsToolkitCompat_;\nconst defaultsLodash = defaultsLodash_;\n\ndescribe('defaults', () => {\n  bench('es-toolkit/compat/defaults', () => {\n    defaultsToolkitCompat({ a: 1 }, { a: 2, b: 2 });\n    defaultsToolkitCompat({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n  });\n\n  bench('lodash/defaults', () => {\n    defaultsLodash({ a: 1 }, { a: 2, b: 2 });\n    defaultsLodash({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/defaultsDeep.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { defaultsDeep as defaultsDeepToolkitCompat_ } from 'es-toolkit/compat';\nimport { defaultsDeep as defaultsDeepLodash_ } from 'lodash';\n\nconst defaultsDeepToolkitCompat = defaultsDeepToolkitCompat_;\nconst defaultsDeepLodash = defaultsDeepLodash_;\n\ndescribe('defaultsDeep', () => {\n  bench('es-toolkit/compat/defaultsDeep ', () => {\n    defaultsDeepToolkitCompat({ a: 1 }, { a: 2, b: 2 });\n    defaultsDeepToolkitCompat({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n  });\n\n  bench('lodash/defaultsDeep', () => {\n    defaultsDeepLodash({ a: 1 }, { a: 2, b: 2 });\n    defaultsDeepLodash({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/defer.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { defer as deferToolkit_ } from 'es-toolkit/compat';\nimport { defer as deferLodash_ } from 'lodash';\n\nconst deferToolkit = deferToolkit_;\nconst deferLodash = deferLodash_;\n\ndescribe('defer', () => {\n  bench('es-toolkit/defer', () => {\n    const id = deferToolkit(() => {});\n    clearTimeout(id);\n  });\n\n  bench('lodash/defer', () => {\n    const id = deferLodash(() => {});\n    clearTimeout(id);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/delay.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { delay as delayToolkitCompat_ } from 'es-toolkit/compat';\nimport { delay as delayLodash_ } from 'lodash';\n\nconst delayToolkitCompat = delayToolkitCompat_;\nconst delayLodash = delayLodash_;\n\ndescribe('delay', () => {\n  bench('es-toolkit/compat/delay', () => {\n    delayToolkitCompat(() => {\n      console.info('hello');\n    }, 1000);\n  });\n\n  bench('lodash/delay', () => {\n    delayLodash(() => {\n      console.info('hello');\n    }, 1000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/difference.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { difference as differenceToolkit_ } from 'es-toolkit';\nimport { difference as differenceCompatToolkit_ } from 'es-toolkit/compat';\nimport { difference as differenceLodash_ } from 'lodash';\n\nconst differenceToolkit = differenceToolkit_;\nconst differenceCompatToolkit = differenceCompatToolkit_;\nconst differenceLodash = differenceLodash_;\n\ndescribe('difference', () => {\n  bench('es-toolkit/difference', () => {\n    differenceToolkit([1, 2, 3], [2]);\n  });\n\n  bench('es-toolkit/compat/difference', () => {\n    differenceCompatToolkit([1, 2, 3], [2]);\n  });\n\n  bench('lodash/difference', () => {\n    differenceLodash([1, 2, 3], [2]);\n  });\n});\n\ndescribe('difference/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n  const largeArray2 = Array.from({ length: 1000 }, (_, i) => i + 500);\n\n  bench('es-toolkit/difference', () => {\n    differenceToolkit(largeArray, largeArray2);\n  });\n\n  bench('es-toolkit/compat/difference', () => {\n    differenceCompatToolkit(largeArray, largeArray2);\n  });\n\n  bench('lodash/difference', () => {\n    differenceLodash(largeArray, largeArray2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/differenceBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { differenceBy as differenceByToolkit_ } from 'es-toolkit';\nimport { differenceBy as differenceByToolkitCompat_ } from 'es-toolkit/compat';\nimport { differenceBy as differenceByLodash_ } from 'lodash';\n\nconst differenceByToolkit = differenceByToolkit_;\nconst differenceByToolkitCompat = differenceByToolkitCompat_;\nconst differenceByLodash = differenceByLodash_;\n\ndescribe('differenceBy', () => {\n  bench('es-toolkit/differenceBy', () => {\n    differenceByToolkit([1.2, 2.3, 3.4], [1.2], Math.floor);\n  });\n\n  bench('es-toolkit/compat/differenceBy', () => {\n    differenceByToolkitCompat([1.2, 2.3, 3.4], [1.2], Math.floor);\n  });\n\n  bench('lodash/differenceBy', () => {\n    differenceByLodash([1.2, 2.3, 3.4], [1.2], Math.floor);\n  });\n});\n\ndescribe('differenceBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n  const largeArray2 = Array.from({ length: 1000 }, (_, i) => i + 500.5);\n\n  bench('es-toolkit/differenceBy', () => {\n    differenceByToolkit(largeArray, largeArray2, Math.floor);\n  });\n\n  bench('es-toolkit/compat/differenceBy', () => {\n    differenceByToolkitCompat(largeArray, largeArray2, Math.floor);\n  });\n\n  bench('lodash/differenceBy', () => {\n    differenceByLodash(largeArray, largeArray2, Math.floor);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/differenceWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { differenceWith as differenceWithToolkit_ } from 'es-toolkit';\nimport { differenceWith as differenceWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { differenceWith as differenceWithLodash_ } from 'lodash';\n\nconst differenceWithToolkit = differenceWithToolkit_;\nconst differenceWithCompatToolkit = differenceWithCompatToolkit_;\nconst differenceWithLodash = differenceWithLodash_;\n\ndescribe('differenceWith', () => {\n  bench('es-toolkit/differenceWith', () => {\n    differenceWithToolkit([1.2, 2.3, 3.4], [1.2], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('es-toolkit/compat/differenceWith', () => {\n    differenceWithCompatToolkit([1.2, 2.3, 3.4], [1.2], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('lodash/differenceWith', () => {\n    differenceWithLodash([1.2, 2.3, 3.4], [1.2], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n});\n\ndescribe('differenceWith/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n  const largeArray2 = Array.from({ length: 1000 }, (_, i) => i + 500.5);\n\n  bench('es-toolkit/differenceWith', () => {\n    differenceWithToolkit(largeArray, largeArray2, (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('es-toolkit/compat/differenceWith', () => {\n    differenceWithCompatToolkit(largeArray, largeArray2, (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('lodash/differenceWith', () => {\n    differenceWithLodash(largeArray, largeArray2, (x, y) => Math.floor(x) === Math.floor(y));\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/divide.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { divide as divideToolkitCompat_ } from 'es-toolkit/compat';\nimport { divide as divideLodash_ } from 'lodash';\n\nconst divideToolkitCompat = divideToolkitCompat_;\nconst divideLodash = divideLodash_;\n\ndescribe('divide function benchmark', () => {\n  bench('es-toolkit/compat/divide', () => {\n    divideToolkitCompat(3, 4);\n    divideToolkitCompat(-3, -4);\n    divideToolkitCompat(NaN, 3);\n    divideToolkitCompat(3, NaN);\n    divideToolkitCompat(NaN, NaN);\n  });\n\n  bench('lodash/divide', () => {\n    divideLodash(3, 4);\n    divideLodash(-3, -4);\n    divideLodash(NaN, 3);\n    divideLodash(3, NaN);\n    divideLodash(NaN, NaN);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/drop.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { drop as dropToolkit_ } from 'es-toolkit';\nimport { drop as dropCompatToolkit_ } from 'es-toolkit/compat';\nimport { drop as dropLodash_ } from 'lodash';\n\nconst dropToolkit = dropToolkit_;\nconst dropCompatToolkit = dropCompatToolkit_;\nconst dropLodash = dropLodash_;\n\ndescribe('drop', () => {\n  bench('es-toolkit/drop', () => {\n    dropToolkit([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('es-toolkit/compat/drop', () => {\n    dropCompatToolkit([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('lodash/drop', () => {\n    dropLodash([1, 2, 3, 4, 5, 6], 3);\n  });\n});\n\ndescribe('drop/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/drop', () => {\n    dropToolkit(largeArray, 5000);\n  });\n\n  bench('es-toolkit/compat/drop', () => {\n    dropCompatToolkit(largeArray, 5000);\n  });\n\n  bench('lodash/drop', () => {\n    dropLodash(largeArray, 5000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/dropRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { dropRight as dropRightToolkit_ } from 'es-toolkit';\nimport { dropRight as dropRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { dropRight as dropRightLodash_ } from 'lodash';\n\nconst dropRightToolkit = dropRightToolkit_;\nconst dropRightToolkitCompat = dropRightToolkitCompat_;\nconst dropRightLodash = dropRightLodash_;\n\ndescribe('dropRight', () => {\n  bench('es-toolkit/dropRight', () => {\n    dropRightToolkit([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('es-toolkit/compat/dropRight', () => {\n    dropRightToolkitCompat([1, 2, 3, 4, 5, 6], 3);\n  });\n\n  bench('lodash/dropRight', () => {\n    dropRightLodash([1, 2, 3, 4, 5, 6], 3);\n  });\n});\n\ndescribe('dropRight/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/dropRight', () => {\n    dropRightToolkit(largeArray, 5000);\n  });\n\n  bench('es-toolkit/compat/dropRight', () => {\n    dropRightToolkitCompat(largeArray, 5000);\n  });\n\n  bench('lodash/dropRight', () => {\n    dropRightLodash(largeArray, 5000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/dropRightWhile.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { dropRightWhile as dropRightWhileToolkit_ } from 'es-toolkit';\nimport { dropRightWhile as dropRightWhileToolkitCompat_ } from 'es-toolkit/compat';\nimport { dropRightWhile as dropRightWhileLodash_ } from 'lodash';\n\nconst dropRightWhileToolkit = dropRightWhileToolkit_;\nconst dropRightWhileToolkitCompat = dropRightWhileToolkitCompat_;\nconst dropRightWhileLodash = dropRightWhileLodash_;\n\ndescribe('dropRightWhile', () => {\n  bench('es-toolkit/dropRightWhile', () => {\n    dropRightWhileToolkit([1.2, 2.3, 3.4], x => x < 2);\n  });\n\n  bench('es-toolkit (compat)/dropRightWhile', () => {\n    dropRightWhileToolkitCompat([1.2, 2.3, 3.4], x => x < 2);\n  });\n\n  bench('lodash/dropRightWhile', () => {\n    dropRightWhileLodash([1.2, 2.3, 3.4], x => x < 2);\n  });\n});\n\ndescribe('dropRightWhile/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/dropRightWhile', () => {\n    dropRightWhileToolkit(largeArray, x => x < 5000);\n  });\n\n  bench('es-toolkit (compat)/dropRightWhile', () => {\n    dropRightWhileToolkitCompat(largeArray, x => x < 5000);\n  });\n\n  bench('lodash/dropRightWhile', () => {\n    dropRightWhileLodash(largeArray, x => x < 5000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/dropWhile.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { dropWhile as dropWhileToolkit_ } from 'es-toolkit';\nimport { dropWhile as dropWhileToolkitCompat_ } from 'es-toolkit/compat';\nimport { dropWhile as dropWhileLodash_ } from 'lodash';\n\nconst dropWhileToolkit = dropWhileToolkit_;\nconst dropWhileToolkitCompat = dropWhileToolkitCompat_;\nconst dropWhileLodash = dropWhileLodash_;\n\ndescribe('dropWhile', () => {\n  bench('es-toolkit/dropWhile', () => {\n    dropWhileToolkit([1.2, 2.3, 3.4], x => x < 2);\n  });\n\n  bench('es-toolkit/compat/dropWhile', () => {\n    dropWhileToolkitCompat([1.2, 2.3, 3.4], x => x < 2);\n  });\n\n  bench('lodash/dropWhile', () => {\n    dropWhileLodash([1.2, 2.3, 3.4], x => x < 2);\n  });\n});\n\ndescribe('dropWhile/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/dropWhile', () => {\n    dropWhileToolkit(largeArray, x => x < 5000);\n  });\n\n  bench('es-toolkit/compat/dropWhile', () => {\n    dropWhileToolkitCompat(largeArray, x => x < 5000);\n  });\n\n  bench('lodash/dropWhile', () => {\n    dropWhileLodash(largeArray, x => x < 5000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/endsWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { endsWith as endsWithToolkit_ } from 'es-toolkit/compat';\nimport { endsWith as endsWithLodash_ } from 'lodash';\n\nconst endsWithToolkit = endsWithToolkit_;\nconst endsWithLodash = endsWithLodash_;\n\ndescribe('endsWith', () => {\n  bench('es-toolkit/endsWith', () => {\n    const str = 'fooBar';\n    endsWithToolkit(str, 'Bar');\n    endsWithToolkit(str, 'foo', 3);\n  });\n\n  bench('lodash/endsWith', () => {\n    const str = 'fooBar';\n    endsWithLodash(str, 'Bar');\n    endsWithLodash(str, 'foo', 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/eq.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { eq as eqToolkitCompat_ } from 'es-toolkit/compat';\nimport { eq as eqLodash_ } from 'lodash';\n\nconst eqToolkitCompat = eqToolkitCompat_;\nconst eqLodash = eqLodash_;\n\ndescribe('eq', () => {\n  bench('es-toolkit/compat/eq', () => {\n    eqToolkitCompat(NaN, NaN);\n    eqToolkitCompat(NaN, 0);\n    eqToolkitCompat(0, NaN);\n    eqToolkitCompat(0, -0);\n    eqToolkitCompat('abc', 'abc');\n  });\n\n  bench('lodash/eq', () => {\n    eqLodash(NaN, NaN);\n    eqLodash(NaN, 0);\n    eqLodash(0, NaN);\n    eqLodash(0, -0);\n    eqLodash('abc', 'abc');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/escape.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { escape as escapeToolkit_ } from 'es-toolkit';\nimport { escape as escapeToolkitCompat_ } from 'es-toolkit/compat';\nimport { escape as escapeLodash_ } from 'lodash';\n\nconst escapeToolkit = escapeToolkit_;\nconst escapeToolkitCompat = escapeToolkitCompat_;\nconst escapeLodash = escapeLodash_;\n\ndescribe('escape', () => {\n  bench('es-toolkit/escape', () => {\n    escapeToolkit('fred, barney, & pebbles');\n  });\n\n  bench('es-toolkit/compat/escape', () => {\n    escapeToolkitCompat('fred, barney, & pebbles');\n  });\n\n  bench('lodash/escape', () => {\n    escapeLodash('fred, barney, & pebbles');\n  });\n});\n\ndescribe('escape (long string)', () => {\n  const longString = 'fred, barney, & pebbles'.repeat(100);\n\n  bench('es-toolkit/escape', () => {\n    escapeToolkit(longString);\n  });\n\n  bench('es-toolkit/compat/escape', () => {\n    escapeToolkitCompat(longString);\n  });\n\n  bench('lodash/escape', () => {\n    escapeLodash(longString);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/escapeRegExp.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { escapeRegExp as escapeRegExpToolkit_ } from 'es-toolkit';\nimport { escapeRegExp as escapeRegExpCompatToolkit_ } from 'es-toolkit/compat';\nimport { escapeRegExp as escapeRegExpLodash_ } from 'lodash';\n\nconst escapeRegExpToolkit = escapeRegExpToolkit_;\nconst escapeRegExpCompatToolkit = escapeRegExpCompatToolkit_;\nconst escapeRegExpLodash = escapeRegExpLodash_;\n\ndescribe('escape', () => {\n  const longString = '^$.*+?()[]{}|\\\\'.repeat(100);\n  bench('es-toolkit/escapeRegExp', () => {\n    escapeRegExpToolkit('^$.*+?()[]{}|\\\\');\n  });\n\n  bench('es-toolkit/compat/escapeRegExp', () => {\n    escapeRegExpCompatToolkit('^$.*+?()[]{}|\\\\');\n  });\n\n  bench('lodash/escapeRegExp', () => {\n    escapeRegExpLodash('^$.*+?()[]{}|\\\\');\n  });\n\n  bench('es-toolkit/escapeRegExp - long string', () => {\n    escapeRegExpToolkit(longString);\n  });\n\n  bench('es-toolkit/compat/escapeRegExp - long string', () => {\n    escapeRegExpCompatToolkit(longString);\n  });\n\n  bench('lodash/escapeRegExp long string', () => {\n    escapeRegExpLodash(longString);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/every.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { every as everyEsToolkit_ } from 'es-toolkit/compat';\nimport { every as everyLodash_ } from 'lodash';\n\nconst everyEsToolkit = everyEsToolkit_;\nconst everyLodash = everyLodash_;\n\nconst generateArray = (length: number, max: number) => Array.from({ length }, () => Math.floor(Math.random() * max));\nconst array = generateArray(1_000_000, 1000);\n\ndescribe('every, all true', () => {\n  const alwaysTruePredicate = () => true;\n\n  bench('es-toolkit/every, all true', () => {\n    everyEsToolkit(array, alwaysTruePredicate);\n  });\n\n  bench('lodash/every, all true', () => {\n    everyLodash(array, alwaysTruePredicate);\n  });\n});\n\ndescribe('every, all false', () => {\n  const alwaysFalsePredicate = () => false;\n\n  bench('es-toolkit/every, all false', () => {\n    everyEsToolkit(array, alwaysFalsePredicate);\n  });\n\n  bench('lodash/every, all false', () => {\n    everyLodash(array, alwaysFalsePredicate);\n  });\n});\n\ndescribe('every, fail in middle', () => {\n  const middleFailPredicate = (n: number, index: number) => index < array.length / 2;\n\n  bench('es-toolkit/every, fail in middle', () => {\n    everyEsToolkit(array, middleFailPredicate);\n  });\n\n  bench('lodash/every, fail in middle', () => {\n    everyLodash(array, middleFailPredicate);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/fill.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { fill as fillToolkit_ } from 'es-toolkit';\nimport { fill as fillCompatToolkit_ } from 'es-toolkit/compat';\nimport { fill as fillLodash_ } from 'lodash';\n\nconst fillToolkit = fillToolkit_;\nconst fillCompatToolkit = fillCompatToolkit_;\nconst fillLodash = fillLodash_;\n\ndescribe('fill function performance comparison', () => {\n  bench('es-toolkit/fill', () => {\n    fillToolkit([1, 2, 3], 10);\n  });\n\n  bench('es-toolkit/compat/fill', () => {\n    fillCompatToolkit([1, 2, 3], 10);\n  });\n\n  bench('lodash/fill', () => {\n    fillLodash([1, 2, 3], 10);\n  });\n});\n\ndescribe('fill function performance with custom start and end', () => {\n  bench('es-toolkit/fill', () => {\n    fillToolkit([4, 6, 8, 10], '*', 1, 3);\n  });\n\n  bench('es-toolkit/compat/fill', () => {\n    fillCompatToolkit([4, 6, 8, 10], '*', 1, 3);\n  });\n\n  bench('lodash/fill', () => {\n    fillLodash([4, 6, 8, 10], '*', 1, 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/filter.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { filter as filterToolkit_ } from 'es-toolkit/compat';\nimport { filter as filterLodash_ } from 'lodash';\n\nconst filterToolkit = filterToolkit_;\nconst filterLodash = filterLodash_;\n\nconst arr = [\n  { a: 0, b: true },\n  { a: 1, b: true },\n  { a: 0, b: false },\n];\n\ndescribe('filter', () => {\n  bench('es-toolkit/filter', () => {\n    filterToolkit([1, 2, 3], number => number % 2 === 0);\n    filterToolkit(arr, { b: true });\n    filterToolkit(arr, ['a', 1]);\n    filterToolkit(arr, items => items.b);\n    filterToolkit({ a: 1, b: 2, c: 3 }, 'b');\n  });\n\n  bench('lodash/filter', () => {\n    filterLodash([1, 2, 3], number => number % 2 === 0);\n    filterLodash(arr, { b: true });\n    filterLodash(arr, ['a', 1]);\n    filterLodash(arr, items => items.b);\n    filterLodash({ a: 1, b: 2, c: 3 }, 'b');\n  });\n});\n\ndescribe('filter/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ a: i, b: i % 2 === 0 }));\n\n  bench('es-toolkit/filter', () => {\n    filterToolkit(largeArray, { b: true });\n  });\n\n  bench('lodash/filter', () => {\n    filterLodash(largeArray, { b: true });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/find.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { find as findToolkit_ } from 'es-toolkit/compat';\nimport { find as findLodash_ } from 'lodash';\n\nconst findToolkit = findToolkit_;\nconst findLodash = findLodash_;\n\nconst items = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\n\ndescribe('find', () => {\n  bench('es-toolkit/compat/find', () => {\n    findToolkit(items, x => x.name === 'Bob');\n    findToolkit(items, { name: 'Bob' });\n    findToolkit(items, ['name', 'Bob']);\n    findToolkit(items, 'name');\n  });\n\n  bench('lodash/find', () => {\n    findLodash(items, x => x.name === 'Bob');\n    findLodash(items, { name: 'Bob' });\n    findLodash(items, ['name', 'Bob']);\n    findLodash(items, 'name');\n  });\n});\n\ndescribe('find/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ id: i, name: `Name ${i}` }));\n\n  bench('es-toolkit/compat/find', () => {\n    findToolkit(largeArray, x => x.name === 'Name 5000');\n  });\n\n  bench('lodash/find', () => {\n    findLodash(largeArray, x => x.name === 'Name 5000');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/findIndex.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { findIndex as findIndexToolkit_ } from 'es-toolkit/compat';\nimport { findIndex as findIndexLodash_ } from 'lodash';\n\nconst findIndexToolkit = findIndexToolkit_;\nconst findIndexLodash = findIndexLodash_;\n\nconst items = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\n\ndescribe('findIndex', () => {\n  bench('es-toolkit/compat/findIndex', () => {\n    findIndexToolkit(items, x => x.name === 'Bob');\n    findIndexToolkit(items, { name: 'Bob' });\n    findIndexToolkit(items, ['name', 'Bob']);\n    findIndexToolkit(items, 'name');\n  });\n\n  bench('lodash/findIndex', () => {\n    findIndexLodash(items, x => x.name === 'Bob');\n    findIndexLodash(items, { name: 'Bob' });\n    findIndexLodash(items, ['name', 'Bob']);\n    findIndexLodash(items, 'name');\n  });\n});\n\ndescribe('findIndex/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ id: i, name: `Name ${i}` }));\n\n  bench('es-toolkit/compat/findIndex', () => {\n    findIndexToolkit(largeArray, x => x.name === 'Name 5000');\n  });\n\n  bench('lodash/findIndex', () => {\n    findIndexLodash(largeArray, x => x.name === 'Name 5000');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/findKey.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { findKey as findKeyToolkit_ } from 'es-toolkit';\nimport { findKey as findKeyCompatToolkit_ } from 'es-toolkit/compat';\nimport { findKey as findKeyLodash_ } from 'lodash';\n\nconst findKeyToolkit = findKeyToolkit_;\nconst findKeyCompatToolkit = findKeyCompatToolkit_;\nconst findKeyLodash = findKeyLodash_;\n\ndescribe('findKey', () => {\n  const users = {\n    pebbles: { age: 24, active: true },\n    barney: { age: 36, active: true },\n    fred: { age: 40, active: false },\n  };\n\n  bench('es-toolkit/findKey', () => {\n    findKeyToolkit(users, o => o.age < 40);\n  });\n\n  bench('lodash/findKey', () => {\n    findKeyLodash(users, o => o.age < 40);\n  });\n\n  bench('es-toolkit/compat/findKey', () => {\n    findKeyCompatToolkit(users, o => o.age < 40);\n  });\n});\n\ndescribe('findKey/largeObject', () => {\n  const largeUsers: Record<string, { age: number }> = {};\n  for (let i = 0; i < 10000; i++) {\n    largeUsers[`user${i}`] = { age: Number(i) };\n  }\n\n  bench('es-toolkit/findKey', () => {\n    findKeyToolkit(largeUsers, o => o.age === 7000);\n  });\n\n  bench('lodash/findKey', () => {\n    findKeyLodash(largeUsers, o => o.age === 7000);\n  });\n\n  bench('es-toolkit/compat/findKey', () => {\n    findKeyCompatToolkit(largeUsers, o => o.age === 7000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/findLast.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { findLast as findLastToolkitCompat_ } from 'es-toolkit/compat';\nimport { findLast as findLastLodash_ } from 'lodash';\n\nconst findLastToolkitCompat = findLastToolkitCompat_;\nconst findLastLodash = findLastLodash_;\n\nconst items = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\n\ndescribe('findLast', () => {\n  bench('es-toolkit/compat/findLast', () => {\n    findLastToolkitCompat(items, x => x.name === 'Bob');\n    findLastToolkitCompat(items, { name: 'Bob' });\n    findLastToolkitCompat(items, ['name', 'Bob']);\n    findLastToolkitCompat(items, 'name');\n  });\n\n  bench('lodash/findLast', () => {\n    findLastLodash(items, x => x.name === 'Bob');\n    findLastLodash(items, { name: 'Bob' });\n    findLastLodash(items, ['name', 'Bob']);\n    findLastLodash(items, 'name');\n  });\n});\n\ndescribe('findLast/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ id: i, name: `Name ${i}` }));\n\n  bench('es-toolkit/compat/findLast', () => {\n    findLastToolkitCompat(largeArray, x => x.name === 'Name 5000');\n  });\n\n  bench('lodash/findLast', () => {\n    findLastLodash(largeArray, x => x.name === 'Name 5000');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/findLastIndex.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { findLastIndex as findLastIndexToolkit_ } from 'es-toolkit/compat';\nimport { findLastIndex as findLastIndexLodash_ } from 'lodash';\n\nconst findLastIndexToolkit = findLastIndexToolkit_;\nconst findLastIndexLodash = findLastIndexLodash_;\n\nconst items = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\n\ndescribe('findLastIndex', () => {\n  bench('es-toolkit/compat/findLastIndex', () => {\n    findLastIndexToolkit(items, x => x.name === 'Bob');\n    findLastIndexToolkit(items, { name: 'Bob' });\n    findLastIndexToolkit(items, ['name', 'Bob']);\n    findLastIndexToolkit(items, 'name');\n  });\n\n  bench('lodash/findLastIndex', () => {\n    findLastIndexLodash(items, x => x.name === 'Bob');\n    findLastIndexLodash(items, { name: 'Bob' });\n    findLastIndexLodash(items, ['name', 'Bob']);\n    findLastIndexLodash(items, 'name');\n  });\n});\n\ndescribe('findLastIndex/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ id: i, name: `Name ${i}` }));\n\n  bench('es-toolkit/compat/findLastIndex', () => {\n    findLastIndexToolkit(largeArray, x => x.name === 'Name 5000');\n  });\n\n  bench('lodash/findLastIndex', () => {\n    findLastIndexLodash(largeArray, x => x.name === 'Name 5000');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/findLastKey.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { findLastKey as findLastKeyCompatToolkit_ } from 'es-toolkit/compat';\nimport { findLastKey as findLastKeyLodash_ } from 'lodash';\n\nconst findLastKeyCompatToolkit = findLastKeyCompatToolkit_;\nconst findLastKeyLodash = findLastKeyLodash_;\n\ndescribe('findLastKey', () => {\n  const users = {\n    pebbles: { age: 24, active: true },\n    barney: { age: 36, active: true },\n    fred: { age: 40, active: false },\n  };\n\n  bench('lodash/findLastKey', () => {\n    findLastKeyLodash(users, o => o.age < 40);\n  });\n\n  bench('es-toolkit/compat/findLastKey', () => {\n    findLastKeyCompatToolkit(users, o => o.age < 40);\n  });\n});\n\ndescribe('findLastKey/largeObject', () => {\n  const largeUsers: Record<string, { age: number }> = {};\n  for (let i = 0; i < 10000; i++) {\n    largeUsers[`user${i}`] = { age: Number(i) };\n  }\n\n  bench('lodash/findLastKey', () => {\n    findLastKeyLodash(largeUsers, o => o.age === 7000);\n  });\n\n  bench('es-toolkit/compat/findLastKey', () => {\n    findLastKeyCompatToolkit(largeUsers, o => o.age === 7000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flatMap.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flatMap as flatMapToolkit_ } from 'es-toolkit';\nimport { flatMap as flatMapToolkitCompat_ } from 'es-toolkit/compat';\nimport { flatMapDepth as flatMapDepthLodash_ } from 'lodash';\n\nconst flatMapToolkit = flatMapToolkit_;\nconst flatMapToolkitCompat = flatMapToolkitCompat_;\nconst flatMapDepthLodash = flatMapDepthLodash_;\n\nfunction createNestedArray(arr: any[], depth: number) {\n  let result = arr;\n\n  for (let i = 0; i < depth; i++) {\n    result = [result];\n  }\n  return result;\n}\n\ndescribe('flatMap', () => {\n  const iteratee = (item: number) => [item, item, item];\n  const arr = Array.from({ length: 30 }, (_, i) => i);\n\n  bench('es-toolkit/flatMap', () => {\n    flatMapToolkit(arr, iteratee);\n  });\n\n  bench('es-toolkit/compat/flatMap', () => {\n    flatMapToolkitCompat(arr, iteratee);\n  });\n\n  bench('js built-in/map.flat', () => {\n    arr.map(iteratee).flat();\n  });\n});\n\ndescribe('flatMapDepth', () => {\n  const iterateeDepth = (item: number) => createNestedArray([item, item, item], 10);\n  const arr = Array.from({ length: 30 }, (_, i) => i);\n\n  bench('es-toolkit/flatMap', () => {\n    flatMapToolkit(arr, iterateeDepth, 10);\n  });\n\n  bench('lodash/flatMapDepth', () => {\n    flatMapDepthLodash(arr, iterateeDepth, 10);\n  });\n\n  bench('js built-in/map.flat', () => {\n    arr.map(iterateeDepth).flat(10);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flatMapDeep.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flatMapDeep as flatMapDeepToolkit_ } from 'es-toolkit';\nimport { flatMapDeep as flatMapDeepToolkitCompat_ } from 'es-toolkit/compat';\nimport { flatMapDeep as flatMapDeepLodash_ } from 'lodash';\n\nconst flatMapDeepToolkit = flatMapDeepToolkit_;\nconst flatMapDeepToolkitCompat = flatMapDeepToolkitCompat_;\nconst flatMapDeepLodash = flatMapDeepLodash_;\n\nfunction createNestedArray(arr: any[], depth: number) {\n  let result = arr;\n\n  for (let i = 0; i < depth; i++) {\n    result = [result];\n  }\n  return result;\n}\n\ndescribe('flatMapDeep', () => {\n  const iterateeDepth = (item: number) => createNestedArray([item, item, item], 10);\n  const arr = Array.from({ length: 30 }, (_, i) => i);\n\n  bench('es-toolkit/flatMapDeep', () => {\n    flatMapDeepToolkit(arr, iterateeDepth);\n  });\n\n  bench('es-toolkit/compat/flatMapDeep', () => {\n    flatMapDeepToolkitCompat(arr, iterateeDepth);\n  });\n\n  bench('lodash/flatMapDeep', () => {\n    flatMapDeepLodash(arr, iterateeDepth);\n  });\n\n  bench('js built-in/map.flat', () => {\n    arr.map(iterateeDepth).flat(Infinity);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flatMapDepth.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flatMapDepth as flatMapDepthToolkitCompat_ } from 'es-toolkit/compat';\nimport { flatMapDepth as flatMapDepthLodash_ } from 'lodash';\n\nconst flatMapDepthToolkitCompat = flatMapDepthToolkitCompat_;\nconst flatMapDepthLodash = flatMapDepthLodash_;\n\nfunction createNestedArray(arr: any[], depth: number) {\n  let result = arr;\n\n  for (let i = 0; i < depth; i++) {\n    result = [result];\n  }\n  return result;\n}\n\ndescribe('flatMapDepth', () => {\n  const iterateeDepth = (item: number) => createNestedArray([item, item, item], 10);\n  const arr = Array.from({ length: 30 }, (_, i) => i);\n\n  bench('es-toolkit/compat/flatMapDepth', () => {\n    flatMapDepthToolkitCompat(arr, iterateeDepth, 100);\n  });\n\n  bench('lodash/flatMapDepth', () => {\n    flatMapDepthLodash(arr, iterateeDepth, 100);\n  });\n\n  bench('js built-in/map.flat', () => {\n    arr.map(iterateeDepth).flat(100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flatten.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flatten as flattenToolkit_ } from 'es-toolkit';\nimport { flatten as flattenCompatToolkit_ } from 'es-toolkit/compat';\nimport { flattenDepth as flattenDepthLodash_ } from 'lodash';\n\nconst flattenToolkit = flattenToolkit_;\nconst flattenCompatToolkit = flattenCompatToolkit_;\nconst flattenDepthLodash = flattenDepthLodash_;\n\nconst createNestedArray = (values: any[]): any[] => {\n  if (values.length === 0) {\n    return [];\n  }\n  const [first, ...rest] = values;\n  return [first, createNestedArray(rest)];\n};\n\ndescribe('flatten', () => {\n  const arr = createNestedArray(Array.from({ length: 30 }, (_, index) => index));\n\n  bench('es-toolkit/flatten', () => {\n    flattenToolkit(arr, 30);\n  });\n\n  bench('es-toolkit/flatten (compat)', () => {\n    // @ts-expect-error - depth parameter is a hidden feature in compat version\n    flattenCompatToolkit(arr, 30);\n  });\n\n  bench('lodash/flattenDepth', () => {\n    flattenDepthLodash(arr, 30);\n  });\n\n  bench('js built-in/flat', () => {\n    arr.flat(30);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flattenDeep.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flattenDeep as flattenDeepToolkit_ } from 'es-toolkit';\nimport { flattenDeep as flattenDeepToolkitCompat_ } from 'es-toolkit/compat';\nimport { flattenDeep as flattenDeepLodash_ } from 'lodash';\n\nconst flattenDeepToolkit = flattenDeepToolkit_;\nconst flattenDeepToolkitCompat = flattenDeepToolkitCompat_;\nconst flattenDeepLodash = flattenDeepLodash_;\n\nconst createNestedArray = (values: number[]): any[] => {\n  if (values.length === 0) {\n    return [];\n  }\n  const [first, ...rest] = values;\n  return [first, createNestedArray(rest)];\n};\n\ndescribe('flattenDeep', () => {\n  const arr = createNestedArray(Array.from({ length: 30 }, (_, index) => index));\n\n  bench('es-toolkit/flattenDeep', () => {\n    flattenDeepToolkit(arr);\n  });\n\n  bench('es-toolkit/flattenDeep (compat)', () => {\n    flattenDeepToolkitCompat(arr);\n  });\n\n  bench('lodash/flattenDeep', () => {\n    flattenDeepLodash(arr);\n  });\n\n  bench('js built-in/flat(Infinity)', () => {\n    arr.flat(Infinity);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flattenDepth.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flattenDepth as flattenDepthToolkit_ } from 'es-toolkit/compat';\nimport { flattenDepth as flattenDepthLodash_ } from 'lodash';\n\nconst flattenDepthToolkit = flattenDepthToolkit_;\nconst flattenDepthLodash = flattenDepthLodash_;\n\ndescribe('flattenDepth', () => {\n  const arr = [1, [2, 3], [4, [5, 6]]];\n\n  bench('es-toolkit/flattenDepth', () => {\n    flattenDepthToolkit(arr, 2);\n  });\n\n  bench('lodash/flattenDepth', () => {\n    flattenDepthLodash(arr, 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flip.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flip as flipToolkit_ } from 'es-toolkit/compat';\nimport { flip as flipLodash_ } from 'lodash';\n\nconst flipToolkit = flipToolkit_;\nconst flipLodash = flipLodash_;\n\ndescribe('flip', () => {\n  function fn(a: any, b: any, c: any, d: any) {\n    return [a, b, c, d];\n  }\n\n  bench('es-toolkit/flip', () => {\n    flipToolkit(fn);\n  });\n\n  bench('lodash/flip', () => {\n    flipLodash(fn);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/floor.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { floor as floorToolkit_ } from 'es-toolkit/compat';\nimport { floor as floorLodash_ } from 'lodash';\n\nconst floorToolkit = floorToolkit_;\nconst floorLodash = floorLodash_;\n\ndescribe('floor', () => {\n  bench('es-toolkit/floor', () => {\n    floorToolkit(4.006);\n    floorToolkit(4.006, 0);\n    floorToolkit(4.016, 2);\n    floorToolkit(4.1, 2);\n    floorToolkit(4.4, 2);\n    floorToolkit(4160, -2);\n    floorToolkit(4.006, NaN);\n    floorToolkit(4.016, 2.6);\n    floorToolkit(4.016, '+2');\n    floorToolkit(5e1, 2);\n    floorToolkit('5e', 1);\n    floorToolkit('5e1e1', 1);\n  });\n\n  bench('lodash/floor', () => {\n    floorLodash(4.006);\n    floorLodash(4.006, 0);\n    floorLodash(4.016, 2);\n    floorLodash(4.1, 2);\n    floorLodash(4.4, 2);\n    floorLodash(4160, -2);\n    floorLodash(4.006, NaN);\n    floorLodash(4.016, 2.6);\n    floorLodash(4.016, '+2');\n    floorLodash(5e1, 2);\n    floorLodash('5e', 1);\n    floorLodash('5e1e1', 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flow.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flow as flowToolkit_ } from 'es-toolkit';\nimport { flow as flowToolkitCompat_ } from 'es-toolkit/compat';\nimport { flow as flowLodash_ } from 'lodash';\n\nconst flowToolkit = flowToolkit_;\nconst flowCompat = flowToolkitCompat_;\nconst flowLodash = flowLodash_;\n\ndescribe('flow', () => {\n  const add = (x: number, y: number) => x + y;\n  const square = (n: number) => n * n;\n\n  bench('es-toolkit/flow', () => {\n    const combined = flowToolkit(add, square);\n    combined(1, 2);\n  });\n\n  bench('es-toolkit/compat/flow', () => {\n    const combined = flowCompat(add, square);\n    combined(1, 2);\n  });\n\n  bench('lodash/flow', () => {\n    const combined = flowLodash(add, square);\n    combined(1, 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/flowRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { flowRight as flowRightToolkit_ } from 'es-toolkit';\nimport { flowRight as flowRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { flowRight as flowRightLodash_ } from 'lodash';\n\nconst flowRightToolkit = flowRightToolkit_;\nconst flowRightCompat = flowRightToolkitCompat_;\nconst flowRightLodash = flowRightLodash_;\n\ndescribe('flowRight', () => {\n  const add = (x: number, y: number) => x + y;\n  const square = (n: number) => n * n;\n\n  bench('es-toolkit/flowRight', () => {\n    const combined = flowRightToolkit(add, square);\n    combined(1, 2);\n  });\n\n  bench('es-toolkit/compat/flowRight', () => {\n    const combined = flowRightCompat(add, square);\n    combined(1, 2);\n  });\n\n  bench('lodash/flowRight', () => {\n    const combined = flowRightLodash(add, square);\n    combined(1, 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forEach.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forEach as forEachToolkit_ } from 'es-toolkit/compat';\nimport { forEach as forEachLodash_ } from 'lodash';\n\nconst forEachToolkit = forEachToolkit_;\nconst forEachLodash = forEachLodash_;\n\ndescribe('forEach', () => {\n  bench('es-toolkit/compat/forEach', () => {\n    forEachToolkit([1, 2, 3, 4, 5, 6], x => x + 3);\n  });\n\n  bench('lodash/forEach', () => {\n    forEachLodash([1, 2, 3, 4, 5, 6], x => x + 3);\n  });\n});\n\ndescribe('forEach/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/compat/forEach', () => {\n    forEachToolkit(largeArray, x => x + 3);\n  });\n\n  bench('lodash/forEach', () => {\n    forEachLodash(largeArray, x => x + 3);\n  });\n});\n\ndescribe('forEach/string', () => {\n  const string = [1, 2, 3, 4, 5, 6].join('');\n\n  bench('es-toolkit/compat/forEach', () => {\n    forEachToolkit(string, x => x.toUpperCase());\n  });\n\n  bench('lodash/forEach', () => {\n    forEachLodash(string, x => x.toUpperCase());\n  });\n});\n\ndescribe('forEach/object', () => {\n  const string = Object.fromEntries([1, 2, 3, 4, 5, 6].map(value => [value, value]));\n\n  bench('es-toolkit/compat/forEach', () => {\n    forEachToolkit(string, x => x + 3);\n  });\n\n  bench('lodash/forEach', () => {\n    forEachLodash(string, x => x + 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forEachRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forEachRight as forEachRightToolkit_ } from 'es-toolkit';\nimport { forEachRight as forEachRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { forEachRight as forEachRightLodash_ } from 'lodash';\n\nconst forEachRightToolkit = forEachRightToolkit_;\nconst forEachRightToolkitCompat = forEachRightToolkitCompat_;\nconst forEachRightLodash = forEachRightLodash_;\n\ndescribe('forEachRight', () => {\n  bench('es-toolkit/forEachRight', () => {\n    forEachRightToolkit([1, 2, 3, 4, 5, 6], x => x + 3);\n  });\n\n  bench('es-toolkit/compat/forEachRight', () => {\n    forEachRightToolkitCompat([1, 2, 3, 4, 5, 6], x => x + 3);\n  });\n\n  bench('lodash/forEachRight', () => {\n    forEachRightLodash([1, 2, 3, 4, 5, 6], x => x + 3);\n  });\n});\n\ndescribe('forEachRight/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/forEachRight', () => {\n    forEachRightToolkit(largeArray, x => x + 3);\n  });\n\n  bench('es-toolkit/compat/forEachRight', () => {\n    forEachRightToolkitCompat(largeArray, x => x + 3);\n  });\n\n  bench('lodash/forEachRight', () => {\n    forEachRightLodash(largeArray, x => x + 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forIn as forInToolkitCompat_, times } from 'es-toolkit/compat';\nimport { forIn as forInLodash_ } from 'lodash';\n\nconst forInToolkitCompat = forInToolkitCompat_;\nconst forInLodash = forInLodash_;\n\ndescribe('forIn', () => {\n  const bigObject = Object.fromEntries(times(1000, i => [i, i]));\n  const iteratee = (value: number, key: string, object: typeof bigObject) => [value, key, object];\n\n  bench('es-toolkit/compat/forIn', () => {\n    forInToolkitCompat(bigObject, iteratee);\n  });\n\n  bench('lodash/forIn', () => {\n    forInLodash(bigObject, iteratee);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forInRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forInRight as forInToolkitCompat_, times } from 'es-toolkit/compat';\nimport { forInRight as forInLodash_ } from 'lodash';\n\nconst forInToolkitCompat = forInToolkitCompat_;\nconst forInLodash = forInLodash_;\n\ndescribe('forInRight', () => {\n  const bigObject = Object.fromEntries(times(1000, i => [i, i]));\n  const iteratee = (value: number, key: string, object: typeof bigObject) => [value, key, object];\n\n  bench('es-toolkit/compat/forInRight', () => {\n    forInToolkitCompat(bigObject, iteratee);\n  });\n\n  bench('lodash/forInRight', () => {\n    forInLodash(bigObject, iteratee);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forOwn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forOwn as forOwnToolkitCompat_ } from 'es-toolkit/compat';\nimport { forOwn as forOwnLodash_ } from 'lodash';\n\nconst forOwnToolkitCompat = forOwnToolkitCompat_;\nconst forOwnLodash = forOwnLodash_;\n\ndescribe('forOwn', () => {\n  const obj = { a: 1, b: 2, c: 3 };\n  const iteratee = (value: number, key: string, object: typeof obj) => [value, key, object];\n\n  bench('es-toolkit/compat/forOwn', () => {\n    forOwnToolkitCompat(obj, iteratee);\n  });\n\n  bench('lodash/forOwn', () => {\n    forOwnLodash(obj, iteratee);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/forOwnRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { forOwnRight as forOwnRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { forOwnRight as forOwnRightLodash_ } from 'lodash';\n\nconst forOwnRightToolkitCompat = forOwnRightToolkitCompat_;\nconst forOwnRightLodash = forOwnRightLodash_;\n\ndescribe('forOwnRight', () => {\n  const obj = { a: 1, b: 2, c: 3 };\n  const iteratee = (value: number, key: string, object: typeof obj) => [value, key, object];\n\n  bench('es-toolkit/compat/forOwnRight', () => {\n    forOwnRightToolkitCompat(obj, iteratee);\n  });\n\n  bench('lodash/forOwnRight', () => {\n    forOwnRightLodash(obj, iteratee);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/fromPairs.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { fromPairs as fromPairsToolkit_ } from 'es-toolkit/compat';\nimport { fromPairs as fromPairsLodash_ } from 'lodash';\n\nconst fromPairsToolkit = fromPairsToolkit_;\nconst fromPairsLodash = fromPairsLodash_;\n\ndescribe('fromPairs', () => {\n  const data = [\n    ['a', 1],\n    ['b', 2],\n    ['c', 3],\n  ];\n\n  bench('es-toolkit/fromPairs', () => {\n    fromPairsToolkit(data);\n  });\n\n  bench('lodash/fromPairs', () => {\n    fromPairsLodash(data);\n  });\n\n  bench('javascript/fromEntries', () => {\n    Object.fromEntries(data);\n  });\n});\n\ndescribe('fromPairs/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => [i, i]);\n\n  bench('es-toolkit/fromPairs', () => {\n    fromPairsToolkit(largeArray);\n  });\n\n  bench('lodash/fromPairs', () => {\n    fromPairsLodash(largeArray);\n  });\n\n  bench('javascript/fromEntries', () => {\n    Object.fromEntries(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/functions.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { functions as functionsToolkit_ } from 'es-toolkit/compat';\nimport { functions as functionsLodash_ } from 'lodash';\n\nconst functionsToolkit = functionsToolkit_;\nconst functionsLodash = functionsLodash_;\n\ndescribe('functions', () => {\n  const testObject = {\n    a: 'a',\n    b: () => 'b',\n    c: /x/,\n    d: function () {},\n    e: 123,\n  };\n\n  bench('es-toolkit/functions', () => {\n    functionsToolkit(testObject);\n  });\n\n  bench('lodash/functions', () => {\n    functionsLodash(testObject);\n  });\n});\n\ndescribe('functions/largeObject', () => {\n  const largeObject = Object.fromEntries(\n    Array.from({ length: 1000 }, (_, i) => [`key${i}`, i % 2 === 0 ? () => i : i])\n  );\n\n  bench('es-toolkit/functions', () => {\n    functionsToolkit(largeObject);\n  });\n\n  bench('lodash/functions', () => {\n    functionsLodash(largeObject);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/functionsIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { functionsIn as functionsInToolkitCompat_ } from 'es-toolkit/compat';\nimport { functionsIn as functionsInLodash_ } from 'lodash';\n\nconst functionsInToolkitCompat = functionsInToolkitCompat_;\nconst functionsInLodash = functionsInLodash_;\n\ndescribe('functionsIn', () => {\n  class Foo {\n    a = function () {\n      return 'a';\n    };\n\n    b = function () {\n      return 'b';\n    };\n    c() {\n      return 'c';\n    }\n  }\n\n  const foo = new Foo();\n  const plainObject = {\n    a: function () {\n      return 'a';\n    },\n    b: function () {\n      return 'b';\n    },\n  };\n\n  bench('es-toolkit/compat/functionsIn', () => {\n    functionsInToolkitCompat(foo);\n    functionsInToolkitCompat(plainObject);\n    functionsInToolkitCompat(null);\n    functionsInToolkitCompat(undefined);\n  });\n\n  bench('lodash/functionsIn', () => {\n    functionsInLodash(foo);\n    functionsInLodash(plainObject);\n    functionsInLodash(null);\n    functionsInLodash(undefined);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/get.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { get as getToolkit_ } from 'es-toolkit/compat';\nimport { get as getLodash_ } from 'lodash';\n\nconst getToolkit = getToolkit_;\nconst getLodash = getLodash_;\n\ndescribe('get with simple string', () => {\n  bench('es-toolkit/get', () => {\n    getToolkit({ a: 1, b: 2 }, 'a');\n  });\n\n  bench('lodash/get', () => {\n    getLodash({ a: 1, b: 2 }, 'a');\n  });\n});\n\ndescribe('get with string', () => {\n  bench('es-toolkit/get', () => {\n    getToolkit({ a: { b: 3 } }, 'a.b');\n  });\n\n  bench('lodash/get', () => {\n    getLodash({ a: { b: 3 } }, 'a.b');\n  });\n});\n\ndescribe('get with string array', () => {\n  bench('es-toolkit/get', () => {\n    getToolkit({ a: { b: 3 } }, ['a', 'b']);\n  });\n\n  bench('lodash/get', () => {\n    getLodash({ a: { b: 3 } }, ['a', 'b']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/groupBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { groupBy as groupByToolkit_ } from 'es-toolkit';\nimport { groupBy as groupByToolkitCompat_ } from 'es-toolkit/compat';\nimport { groupBy as groupByLodash_ } from 'lodash';\n\nconst groupByToolkit = groupByToolkit_;\nconst groupByToolkitCompat = groupByToolkitCompat_;\nconst groupByLodash = groupByLodash_;\n\ndescribe('groupBy', () => {\n  bench('es-toolkit/groupBy', () => {\n    const array = [\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'banana' },\n      { category: 'vegetable', name: 'carrot' },\n      { category: 'fruit', name: 'pear' },\n      { category: 'vegetable', name: 'broccoli' },\n    ];\n\n    groupByToolkit(array, item => item.category);\n  });\n\n  bench('es-toolkit/compat/groupBy', () => {\n    const array = [\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'banana' },\n      { category: 'vegetable', name: 'carrot' },\n      { category: 'fruit', name: 'pear' },\n      { category: 'vegetable', name: 'broccoli' },\n    ];\n\n    groupByToolkitCompat(array, item => item.category);\n  });\n\n  bench('lodash/groupBy', () => {\n    const array = [\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'banana' },\n      { category: 'vegetable', name: 'carrot' },\n      { category: 'fruit', name: 'pear' },\n      { category: 'vegetable', name: 'broccoli' },\n    ];\n\n    groupByLodash(array, item => item.category);\n  });\n});\n\ndescribe('groupBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({\n    category: i % 2 === 0 ? 'even' : 'odd',\n    value: i,\n  }));\n\n  bench('es-toolkit/groupBy', () => {\n    groupByToolkit(largeArray, item => item.category);\n  });\n\n  bench('lodash/groupBy', () => {\n    groupByLodash(largeArray, item => item.category);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/gt.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { gt as gtToolkitCompat_ } from 'es-toolkit/compat';\nimport { gt as gtLodash_ } from 'lodash';\n\nconst gtToolkitCompat = gtToolkitCompat_;\nconst gtLodash = gtLodash_;\n\ndescribe('gt', () => {\n  bench('es-toolkit/compat/gt', () => {\n    gtToolkitCompat(3, 1);\n    gtToolkitCompat(3, 3);\n    gtToolkitCompat(1, 3);\n  });\n\n  bench('lodash/gt', () => {\n    gtLodash(3, 1);\n    gtLodash(3, 3);\n    gtLodash(1, 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/gte.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { gte as gteToolkitCompat_ } from 'es-toolkit/compat';\nimport { gte as gteLodash_ } from 'lodash';\n\nconst gteToolkitCompat = gteToolkitCompat_;\nconst gteLodash = gteLodash_;\n\ndescribe('gte', () => {\n  bench('es-toolkit/compat/gte', () => {\n    gteToolkitCompat(3, 1);\n    gteToolkitCompat(3, 3);\n    gteToolkitCompat(1, 3);\n  });\n\n  bench('lodash/gte', () => {\n    gteLodash(3, 1);\n    gteLodash(3, 3);\n    gteLodash(1, 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/has.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { has as hasToolkit_ } from 'es-toolkit/compat';\nimport { has as hasLodash_ } from 'lodash';\n\nconst hasToolkit = hasToolkit_;\nconst hasLodash = hasLodash_;\n\ndescribe('has with string', () => {\n  bench('es-toolkit/has', () => {\n    hasToolkit({ a: { b: 3 } }, 'a.b');\n  });\n\n  bench('lodash/has', () => {\n    hasLodash({ a: { b: 3 } }, 'a.b');\n  });\n});\n\ndescribe('has with string array', () => {\n  bench('es-toolkit/has', () => {\n    hasToolkit({ a: { b: 3 } }, ['a', 'b']);\n  });\n\n  bench('lodash/has', () => {\n    hasLodash({ a: { b: 3 } }, ['a', 'b']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/hasIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { hasIn as hasInToolkit_ } from 'es-toolkit/compat';\nimport { hasIn as hasInLodash_ } from 'lodash';\n\nconst hasInToolkit = hasInToolkit_;\nconst hasInLodash = hasInLodash_;\n\ndescribe('hasIn', () => {\n  // 기본 객체 경로 테스트 (문자열)\n  describe('with string path', () => {\n    const obj = { a: { b: 3 } };\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(obj, 'a.b');\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(obj, 'a.b');\n    });\n  });\n\n  // 기본 객체 경로 테스트 (배열)\n  describe('with array path', () => {\n    const obj = { a: { b: 3 } };\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(obj, ['a', 'b']);\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(obj, ['a', 'b']);\n    });\n  });\n\n  // 상속된 속성 테스트 (문자열)\n  describe('with inherited property (string)', () => {\n    class Rectangle {\n      area() {\n        return 0;\n      }\n    }\n    const rect = new Rectangle();\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(rect, 'area');\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(rect, 'area');\n    });\n  });\n\n  // 상속된 중첩 속성 테스트 (배열)\n  describe('with inherited nested property (array)', () => {\n    class Rectangle {\n      dimensions = { width: 10, height: 5 };\n    }\n    const rect = new Rectangle();\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(rect, ['dimensions', 'width']);\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(rect, ['dimensions', 'width']);\n    });\n  });\n\n  // Object.prototype 상속 속성 테스트\n  describe('with Object.prototype property', () => {\n    const obj = {};\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(obj, 'toString');\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(obj, 'toString');\n    });\n  });\n\n  // 깊은 상속 체인 테스트\n  describe('with deep inheritance chain', () => {\n    class GrandParent {\n      method() {}\n    }\n\n    class Parent extends GrandParent {}\n\n    class Child extends Parent {}\n\n    const child = new Child();\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(child, 'method');\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(child, 'method');\n    });\n  });\n\n  // 존재하지 않는 속성 테스트\n  describe('with non-existent property', () => {\n    const obj = { a: 1 };\n\n    bench('es-toolkit/hasIn', () => {\n      hasInToolkit(obj, 'nonExistent');\n    });\n\n    bench('lodash/hasIn', () => {\n      hasInLodash(obj, 'nonExistent');\n    });\n  });\n\n  // 깊은 중첩 경로 테스트\n  describe('with deep nested path', () => {\n    const deepObj = { a: { b: { c: { d: { e: { f: 1 } } } } } };\n\n    bench('es-toolkit/hasIn deep path (string)', () => {\n      hasInToolkit(deepObj, 'a.b.c.d.e.f');\n    });\n\n    bench('lodash/hasIn deep path (string)', () => {\n      hasInLodash(deepObj, 'a.b.c.d.e.f');\n    });\n\n    bench('es-toolkit/hasIn deep path (array)', () => {\n      hasInToolkit(deepObj, ['a', 'b', 'c', 'd', 'e', 'f']);\n    });\n\n    bench('lodash/hasIn deep path (array)', () => {\n      hasInLodash(deepObj, ['a', 'b', 'c', 'd', 'e', 'f']);\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/head.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { head as headToolkit_ } from 'es-toolkit';\nimport { head as headCompatToolkit_ } from 'es-toolkit/compat';\nimport { head as headLodash_ } from 'lodash';\n\nconst headToolkit = headToolkit_;\nconst headCompatToolkit = headCompatToolkit_;\nconst headLodash = headLodash_;\n\ndescribe('head', () => {\n  bench('es-toolkit/head', () => {\n    headToolkit([1, 2, 3, 4]);\n  });\n\n  bench('es-toolkit/compat/head', () => {\n    headCompatToolkit([1, 2, 3, 4]);\n  });\n\n  bench('lodash/head', () => {\n    headLodash([1, 2, 3, 4]);\n  });\n});\n\ndescribe('head/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/head', () => {\n    headToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/head', () => {\n    headCompatToolkit(largeArray);\n  });\n\n  bench('lodash/head', () => {\n    headLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/identity.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { identity as identityToolkit_ } from 'es-toolkit';\nimport { identity as identityLodash_ } from 'lodash';\n\nconst identityToolkit = identityToolkit_;\nconst identityLodash = identityLodash_;\n\ndescribe('identity', () => {\n  bench('es-toolkit/identity', () => {\n    identityToolkit(5);\n    identityToolkit('hello');\n    identityToolkit({ key: 'value' });\n    identityToolkit([1, 2, 3]);\n    identityToolkit(true);\n    identityToolkit(false);\n  });\n\n  bench('lodash/identity', () => {\n    identityLodash(5);\n    identityLodash('hello');\n    identityLodash({ key: 'value' });\n    identityLodash([1, 2, 3]);\n    identityLodash(true);\n    identityLodash(false);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/inRange.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { inRange as inRangeToolkit_ } from 'es-toolkit';\nimport { inRange as inRangeCompatToolkit_ } from 'es-toolkit/compat';\nimport { inRange as inRangeLodash_ } from 'lodash';\n\nconst inRangeToolkit = inRangeToolkit_;\nconst inRangeCompatToolkit = inRangeCompatToolkit_;\nconst inRangeLodash = inRangeLodash_;\n\ndescribe('inRange', () => {\n  bench('es-toolkit/inRange', () => {\n    inRangeToolkit(3, 5);\n  });\n\n  bench('es-toolkit/compat/inRange', () => {\n    inRangeCompatToolkit(3, 5);\n  });\n\n  bench('lodash/inRange', () => {\n    inRangeLodash(3, 5);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/includes.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { includes as includesToolkitCompat_ } from 'es-toolkit/compat';\nimport { includes as includesLodash_ } from 'lodash';\n\nconst includesToolkitCompat = includesToolkitCompat_;\nconst includesLodash = includesLodash_;\n\ndescribe('includes (object)', () => {\n  const object = {\n    a: 1,\n    b: 'a',\n    c: NaN,\n    d: undefined,\n    e: null,\n    f: Infinity,\n    g: -0,\n  };\n\n  bench('es-toolkit/includes', () => {\n    includesToolkitCompat(object, 1);\n    includesToolkitCompat(object, 'a');\n    includesToolkitCompat(object, NaN);\n    includesToolkitCompat(object, undefined);\n    includesToolkitCompat(object, null);\n    includesToolkitCompat(object, Infinity);\n    includesToolkitCompat(object, -0);\n    includesToolkitCompat(object, 1, -1);\n  });\n\n  bench('lodash/includes', () => {\n    includesLodash(object, 1);\n    includesLodash(object, 'a');\n    includesLodash(object, NaN);\n    includesLodash(object, undefined);\n    includesLodash(object, null);\n    includesLodash(object, Infinity);\n    includesLodash(object, -0);\n    includesLodash(object, 1, -1);\n  });\n});\n\ndescribe('includes (array)', () => {\n  const array = [1, 'a', NaN, undefined, null, Infinity, Symbol('sym1'), -0];\n\n  bench('es-toolkit/includes', () => {\n    includesToolkitCompat(array, 1);\n    includesToolkitCompat(array, 'a');\n    includesToolkitCompat(array, NaN);\n    includesToolkitCompat(array, undefined);\n    includesToolkitCompat(array, null);\n    includesToolkitCompat(array, Infinity);\n    includesToolkitCompat(array, Symbol('sym1'));\n    includesToolkitCompat(array, -0);\n    includesToolkitCompat(array, 0, -1);\n  });\n\n  bench('lodash/includes', () => {\n    includesLodash(array, 1);\n    includesLodash(array, 'a');\n    includesLodash(array, NaN);\n    includesLodash(array, undefined);\n    includesLodash(array, null);\n    includesLodash(array, Infinity);\n    includesLodash(array, Symbol('sym1'));\n    includesLodash(array, -0);\n    includesLodash(array, 0, -1);\n  });\n});\n\ndescribe('includes (string)', () => {\n  const string = 'abcdefg';\n\n  bench('es-toolkit/compat/includes', () => {\n    includesToolkitCompat(string, 'bc');\n    includesToolkitCompat(string, 'd');\n  });\n\n  bench('lodash/includes', () => {\n    includesLodash(string, 'bc');\n    includesLodash(string, 'd');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/indexOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { indexOf as indexOfToolkitCompat_ } from 'es-toolkit/compat';\nimport { indexOf as indexOfLodash_ } from 'lodash';\n\nconst indexOfToolkitCompat = indexOfToolkitCompat_;\nconst indexOfLodash = indexOfLodash_;\n\ndescribe('indexOf', () => {\n  const array = [1, 2, 3, 4, NaN, '1', '2', '3', '4', 'NaN'];\n\n  bench('es-toolkit/compat/indexOf', () => {\n    indexOfToolkitCompat(array, 3);\n    indexOfToolkitCompat(array, NaN);\n    indexOfToolkitCompat(array, '1');\n    indexOfToolkitCompat(array, 'NaN', -5);\n    indexOfToolkitCompat(array, 'NaN', -100);\n  });\n\n  bench('lodash/indexOf', () => {\n    indexOfLodash(array, 3);\n    indexOfLodash(array, NaN);\n    indexOfLodash(array, '1');\n    indexOfLodash(array, 'NaN', -5);\n    indexOfLodash(array, 'NaN', -100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/initial.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { initial as initialToolkit_ } from 'es-toolkit';\nimport { initial as initialToolkitCompat_ } from 'es-toolkit/compat';\nimport { initial as initialLodash_ } from 'lodash';\n\nconst initialLodash = initialLodash_;\nconst initialToolkitCompat = initialToolkitCompat_;\nconst initialToolkit = initialToolkit_;\n\n// Helper function to generate a large array\nfunction generateLargeArray(size: number) {\n  return Array.from({ length: size }, (_, index) => index);\n}\n\ndescribe('initial', () => {\n  bench('es-toolkit/initial', () => {\n    initialToolkit([1, 2, 3, 4, 5, 6]);\n  });\n\n  bench('es-toolkit/compat/initial', () => {\n    initialToolkitCompat([1, 2, 3, 4, 5, 6]);\n  });\n\n  bench('lodash/initial', () => {\n    initialLodash([1, 2, 3, 4, 5, 6]);\n  });\n});\n\ndescribe('initial/largeArray', () => {\n  const largeArray = generateLargeArray(1000000);\n\n  bench('es-toolkit/initial', () => {\n    initialToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/initial', () => {\n    initialToolkitCompat(largeArray);\n  });\n\n  bench('lodash/initial', () => {\n    initialLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/intersection.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { intersection as intersectionToolkit_ } from 'es-toolkit';\nimport { intersection as intersectionCompatToolkit_ } from 'es-toolkit/compat';\nimport { intersection as intersectionLodash_ } from 'lodash';\n\nconst intersectionToolkit = intersectionToolkit_;\nconst intersectionCompatToolkit = intersectionCompatToolkit_;\nconst intersectionLodash = intersectionLodash_;\n\ndescribe('intersection, small arrays', () => {\n  const array1 = [1, 2, 3];\n  const array2 = [2, 4];\n\n  bench('es-toolkit/intersection', () => {\n    intersectionToolkit(array1, array2);\n  });\n\n  bench('es-toolkit/compat/intersection', () => {\n    intersectionCompatToolkit(array1, array2);\n  });\n\n  bench('lodash/intersection', () => {\n    intersectionLodash(array1, array2);\n  });\n});\n\ndescribe('intersection, large arrays', () => {\n  const array1 = Array.from({ length: 10000 }, () => Math.floor(Math.random() * 1000));\n  const array2 = Array.from({ length: 10000 }, () => Math.floor(Math.random() * 1000));\n\n  bench('es-toolkit/intersection', () => {\n    intersectionToolkit(array1, array2);\n  });\n\n  bench('es-toolkit/compat/intersection', () => {\n    intersectionCompatToolkit(array1, array2);\n  });\n\n  bench('lodash/intersection', () => {\n    intersectionLodash(array1, array2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/intersectionBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { intersectionBy as intersectionByToolkit_ } from 'es-toolkit';\nimport { intersectionBy as intersectionByCompatToolkit_ } from 'es-toolkit/compat';\nimport { intersectionBy as intersectionByLodash_ } from 'lodash';\n\nconst intersectionByToolkit = intersectionByToolkit_;\nconst intersectionByCompatToolkit = intersectionByCompatToolkit_;\nconst intersectionByLodash = intersectionByLodash_;\n\ndescribe('intersectionBy', () => {\n  bench('es-toolkit/intersectionBy', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const mapper = item => item.id;\n    intersectionByToolkit(array1, array2, mapper);\n  });\n\n  bench('es-toolkit/compat/intersectionBy', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const mapper = item => item.id;\n    intersectionByCompatToolkit(array1, array2, mapper);\n  });\n\n  bench('lodash/intersectionBy', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const mapper = item => item.id;\n    intersectionByLodash(array1, array2, mapper);\n  });\n});\n\ndescribe('intersectionBy/largeArrays', () => {\n  const array1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const array2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n  const mapper = item => item.id;\n\n  bench('es-toolkit/intersectionBy', () => {\n    intersectionByToolkit(array1, array2, mapper);\n  });\n\n  bench('es-toolkit/compat/intersectionBy', () => {\n    intersectionByCompatToolkit(array1, array2, mapper);\n  });\n\n  bench('lodash/intersectionBy', () => {\n    intersectionByLodash(array1, array2, mapper);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/intersectionWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { intersectionWith as intersectionWithToolkit_ } from 'es-toolkit';\nimport { intersectionWith as intersectionWithCompat_ } from 'es-toolkit/compat';\nimport { intersectionWith as intersectionWithLodash_ } from 'lodash';\n\nconst intersectionWithToolkit = intersectionWithToolkit_;\nconst intersectionWithCompat = intersectionWithCompat_;\nconst intersectionWithLodash = intersectionWithLodash_;\n\ndescribe('intersectionWith', () => {\n  bench('es-toolkit/intersectionWith', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n    intersectionWithToolkit(array1, array2, areItemsEqual);\n  });\n\n  bench('es-toolkit/compat/intersectionWith', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n    intersectionWithCompat(array1, array2, areItemsEqual);\n  });\n\n  bench('lodash/intersectionWith', () => {\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n    const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n    intersectionWithLodash(array1, array2, areItemsEqual);\n  });\n});\n\ndescribe('intersectionWith/largeArrays', () => {\n  const array1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const array2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n  const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n\n  bench('es-toolkit/intersectionWith', () => {\n    intersectionWithToolkit(array1, array2, areItemsEqual);\n  });\n\n  bench('es-toolkit/compat/intersectionWith', () => {\n    intersectionWithCompat(array1, array2, areItemsEqual);\n  });\n\n  bench('lodash/intersectionWith', () => {\n    intersectionWithLodash(array1, array2, areItemsEqual);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/invert.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { invert as invertByToolkit_ } from 'es-toolkit';\nimport { invert as invertByToolkitCompat_ } from 'es-toolkit/compat';\nimport { invert as invertByLodash_ } from 'lodash';\n\nconst invertByLodash = invertByLodash_;\nconst invertByToolkitCompat = invertByToolkitCompat_;\nconst invertByToolkit = invertByToolkit_;\n\nconst object: { [key: string]: string } = {};\nfor (let i = 0; i < 10000; i++) {\n  object[`key${i}`] = `value${i}`;\n}\n\ndescribe('invert function benchmark', () => {\n  bench('es-toolkit/invert', () => {\n    invertByToolkit(object);\n  });\n\n  bench('es-toolkit/compat/invert', () => {\n    invertByToolkitCompat(object);\n  });\n\n  bench('lodash/invert', () => {\n    invertByLodash(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/invertBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { invertBy as invertByWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { invertBy as invertByWithLodash_ } from 'lodash';\n\nconst invertByWithCompatToolkit = invertByWithCompatToolkit_;\nconst invertByWithLodash = invertByWithLodash_;\n\nconst object = { a: 1, b: 2, c: 1, d: 4 };\n\ndescribe('invertBy', () => {\n  bench('lodash/invertBy', () => {\n    invertByWithLodash(object);\n  });\n\n  bench('es-toolkit/compat/invertBy', () => {\n    invertByWithCompatToolkit(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/invokeMap.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { invokeMap as invokeMapToolkitCompat_ } from 'es-toolkit/compat';\nimport { invokeMap as invokeMapLodash_ } from 'lodash';\n\nconst invokeMapToolkitCompat = invokeMapToolkitCompat_;\nconst invokeMapLodash = invokeMapLodash_;\n\ndescribe('invokeMap', () => {\n  const stringArray = ['a', 'b', 'c'];\n  const numberObject = { a: 1, b: 2, c: 3 };\n  const largeArray = Array.from({ length: 1000 }, (_, i) => String(i));\n  const array = ['a', 'b', 'c'];\n  const func = function (this: string, left: string, right: string) {\n    return left + this.toUpperCase() + right;\n  };\n\n  bench('es-toolkit/invokeMap/compat', () => {\n    invokeMapToolkitCompat(stringArray, 'toUpperCase');\n    invokeMapToolkitCompat(numberObject, 'toFixed', 1);\n    invokeMapToolkitCompat(largeArray, 'toString');\n    invokeMapToolkitCompat(array, func, '(', ')');\n  });\n\n  bench('lodash/invokeMap', () => {\n    invokeMapLodash(stringArray, 'toUpperCase');\n    invokeMapLodash(numberObject, 'toFixed', 1);\n    invokeMapLodash(largeArray, 'toString');\n    invokeMapLodash(array, func, '(', ')');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isArguments.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isArguments as isArgumentsToolkit_ } from 'es-toolkit/compat';\nimport { isArguments as isArgumentsLodash_ } from 'lodash';\n\nconst isArgumentsToolkit = isArgumentsToolkit_;\nconst isArgumentsLodash = isArgumentsLodash_;\n\ndescribe('isArguments', () => {\n  bench('es-toolkit/isArguments', () => {\n    isArgumentsToolkit([1, 2, 3]);\n    isArgumentsToolkit(true);\n    isArgumentsToolkit(new Date());\n    isArgumentsToolkit(new Error());\n    isArgumentsToolkit(1);\n    isArgumentsToolkit(/x/);\n    isArgumentsToolkit('a');\n  });\n\n  bench('lodash/isArguments', () => {\n    isArgumentsLodash([1, 2, 3]);\n    isArgumentsLodash(true);\n    isArgumentsLodash(new Date());\n    isArgumentsLodash(new Error());\n    isArgumentsLodash(1);\n    isArgumentsLodash(/x/);\n    isArgumentsLodash('a');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isArray.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isArray as isArrayToolkit_ } from 'es-toolkit/compat';\nimport { isArray as isArrayLodash_ } from 'lodash';\n\nconst isArrayToolkit = isArrayToolkit_;\nconst isArrayLodash = isArrayLodash_;\n\ndescribe('isArray', () => {\n  bench('es-toolkit/isArray', () => {\n    isArrayToolkit([1, 2, 3]);\n    isArrayToolkit('abc');\n    isArrayToolkit(() => {});\n  });\n\n  bench('lodash/isArray', () => {\n    isArrayLodash([1, 2, 3]);\n    isArrayLodash('abc');\n    isArrayLodash(() => {});\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isArrayBuffer.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isArrayBuffer as isArrayBufferToolkit_ } from 'es-toolkit';\nimport { isArrayBuffer as isArrayBufferToolkitCompat_ } from 'es-toolkit/compat';\nimport { isArrayBuffer as isArrayBufferLodash_ } from 'lodash';\n\nconst isArrayBufferToolkit = isArrayBufferToolkit_;\nconst isArrayBufferToolkitCompat = isArrayBufferToolkitCompat_;\nconst isArrayBufferLodash = isArrayBufferLodash_;\n\ndescribe('isArrayBuffer', () => {\n  bench('es-toolkit/isArrayBuffer', () => {\n    isArrayBufferToolkit(new ArrayBuffer(16));\n    isArrayBufferToolkit(null);\n    isArrayBufferToolkit([]);\n    isArrayBufferToolkit(new Object());\n    isArrayBufferToolkit(new Map());\n  });\n\n  bench('es-toolkit/compat/isArrayBuffer', () => {\n    isArrayBufferToolkitCompat(new ArrayBuffer(16));\n    isArrayBufferToolkitCompat(null);\n    isArrayBufferToolkitCompat([]);\n    isArrayBufferToolkitCompat(new Object());\n    isArrayBufferToolkitCompat(new Map());\n  });\n\n  bench('lodash/isArrayBuffer', () => {\n    isArrayBufferLodash(new ArrayBuffer(16));\n    isArrayBufferLodash(null);\n    isArrayBufferLodash([]);\n    isArrayBufferLodash(new Object());\n    isArrayBufferLodash(new Map());\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isArrayLike.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isArrayLike as isArrayLikeToolkit_ } from 'es-toolkit/compat';\nimport { isArrayLike as isArrayLikeLodash_ } from 'lodash';\n\nconst isArrayLikeToolkit = isArrayLikeToolkit_;\nconst isArrayLikeLodash = isArrayLikeLodash_;\n\ndescribe('isArrayLike', () => {\n  bench('es-toolkit/isArrayLike', () => {\n    isArrayLikeToolkit(true);\n    isArrayLikeToolkit(new Date());\n    isArrayLikeToolkit(new Error());\n    isArrayLikeToolkit({ a: 1 });\n    isArrayLikeToolkit(1);\n    isArrayLikeToolkit(/x/);\n    isArrayLikeToolkit(Array.from({ length: 10000 }));\n    isArrayLikeToolkit({ length: 1000 });\n  });\n  bench('lodash/isArrayLike', () => {\n    isArrayLikeLodash(true);\n    isArrayLikeLodash(new Date());\n    isArrayLikeLodash(new Error());\n    isArrayLikeLodash({ a: 1 });\n    isArrayLikeLodash(1);\n    isArrayLikeLodash(/x/);\n    isArrayLikeLodash(Array.from({ length: 10000 }));\n    isArrayLikeLodash({ length: 1000 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isArrayLikeObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isArrayLikeObject as isArrayLikeObjectToolkit_ } from 'es-toolkit/compat';\nimport { isArrayLikeObject as isArrayLikeObjectLodash_ } from 'lodash';\n\nconst isArrayLikeObjectToolkit = isArrayLikeObjectToolkit_;\nconst isArrayLikeObjectLodash = isArrayLikeObjectLodash_;\n\ndescribe('isArrayLikeObject', () => {\n  bench('es-toolkit/isArrayLikeObject', () => {\n    isArrayLikeObjectToolkit(true);\n    isArrayLikeObjectToolkit(new Date());\n    isArrayLikeObjectToolkit(new Error());\n    isArrayLikeObjectToolkit({ a: 1 });\n    isArrayLikeObjectToolkit(1);\n    isArrayLikeObjectToolkit(/x/);\n    isArrayLikeObjectToolkit(Array.from({ length: 10000 }));\n    isArrayLikeObjectToolkit({ length: 1000 });\n  });\n  bench('lodash/isArrayLikeObject', () => {\n    isArrayLikeObjectLodash(true);\n    isArrayLikeObjectLodash(new Date());\n    isArrayLikeObjectLodash(new Error());\n    isArrayLikeObjectLodash({ a: 1 });\n    isArrayLikeObjectLodash(1);\n    isArrayLikeObjectLodash(/x/);\n    isArrayLikeObjectLodash(Array.from({ length: 10000 }));\n    isArrayLikeObjectLodash({ length: 1000 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isBoolean.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isBoolean as isBooleanToolkit_ } from 'es-toolkit';\nimport { isBoolean as isBooleanToolkitCompat_ } from 'es-toolkit/compat';\nimport { isBoolean as isBooleanLodash_ } from 'lodash';\n\nconst isBooleanToolkit = isBooleanToolkit_;\nconst isBooleanToolkitCompat = isBooleanToolkitCompat_;\nconst isBooleanLodash = isBooleanLodash_;\n\ndescribe('isBoolean', () => {\n  bench('es-toolkit/isBoolean', () => {\n    isBooleanToolkit(true);\n    isBooleanToolkit(false);\n    isBooleanToolkit(undefined);\n    isBooleanToolkit('');\n    isBooleanToolkit(123);\n    isBooleanToolkit({});\n    isBooleanToolkit(Boolean());\n  });\n\n  bench('es-toolkit/compat/isBoolean', () => {\n    isBooleanToolkitCompat(true);\n    isBooleanToolkitCompat(false);\n    isBooleanToolkitCompat(undefined);\n    isBooleanToolkitCompat('');\n    isBooleanToolkitCompat(123);\n    isBooleanToolkitCompat({});\n    isBooleanToolkitCompat(Boolean());\n  });\n\n  bench('lodash/isBoolean', () => {\n    isBooleanLodash(true);\n    isBooleanLodash(false);\n    isBooleanLodash(undefined);\n    isBooleanLodash('');\n    isBooleanLodash(123);\n    isBooleanLodash({});\n    isBooleanLodash(Boolean());\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isBuffer.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isBuffer as isBufferToolkit_ } from 'es-toolkit';\nimport { isBuffer as isBufferToolkitCompat_ } from 'es-toolkit/compat';\nimport { isBuffer as isBufferLodash_ } from 'lodash';\n\nconst isBufferToolkit = isBufferToolkit_;\nconst isBufferToolkitCompat = isBufferToolkitCompat_;\nconst isBufferLodash = isBufferLodash_;\n\ndescribe('isBuffer', () => {\n  bench('es-toolkit/isBuffer', () => {\n    isBufferToolkit(Buffer.from('test'));\n  });\n\n  bench('es-toolkit/compat/isBuffer', () => {\n    isBufferToolkitCompat(Buffer.from('test'));\n  });\n\n  bench('lodash/isBuffer', () => {\n    isBufferLodash(Buffer.from('test'));\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isDate.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isDate as isDateToolkit_ } from 'es-toolkit';\nimport { isDate as isDateToolkitCompat_ } from 'es-toolkit/compat';\nimport { isDate as isDateLodash_ } from 'lodash';\n\nconst isDateToolkit = isDateToolkit_;\nconst isDateToolkitCompat = isDateToolkitCompat_;\nconst isDateLodash = isDateLodash_;\n\ndescribe('isDate', () => {\n  bench('es-toolkit/isDate', () => {\n    isDateToolkit(new Date());\n    isDateToolkit('2024-01-01');\n    isDateToolkit({ year: 2024, month: 1, day: 1 });\n  });\n\n  bench('es-toolkit/compat/isDate', () => {\n    isDateToolkitCompat(new Date());\n    isDateToolkitCompat('2024-01-01');\n    isDateToolkitCompat({ year: 2024, month: 1, day: 1 });\n  });\n\n  bench('lodash/isDate', () => {\n    isDateLodash(new Date());\n    isDateLodash('2024-01-01');\n    isDateLodash({ year: 2024, month: 1, day: 1 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isElement.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isElement as isElementCompatToolkit_ } from 'es-toolkit/compat';\nimport { isElement as isElementLodash_ } from 'lodash';\n\nconst isElementToolkit = isElementCompatToolkit_;\nconst isElementLodash = isElementLodash_;\n\nclass ElementLike {\n  nodeType = 1;\n}\n\nconst NotElementLike = { nodeType: 1 };\n\ndescribe('isElement - true', () => {\n  bench('es-toolkit/isElement', () => {\n    isElementToolkit(ElementLike);\n  });\n\n  bench('lodash/isElement', () => {\n    isElementLodash(ElementLike);\n  });\n});\n\ndescribe('isElement - false', () => {\n  bench('es-toolkit/isElement', () => {\n    isElementToolkit(NotElementLike);\n  });\n\n  bench('lodash/isElement', () => {\n    isElementLodash(NotElementLike);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isEqual.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isEqual as isEqualToolkit_ } from 'es-toolkit';\nimport { isEqual as isEqualToolkitCompat_ } from 'es-toolkit/compat';\nimport { isEqual as isEqualLodash_ } from 'lodash';\n\nconst isEqualToolkit = isEqualToolkit_;\nconst isEqualToolkitCompat = isEqualToolkitCompat_;\nconst isEqualLodash = isEqualLodash_;\n\ndescribe('isEqual primitives', () => {\n  bench('es-toolkit/isEqual', () => {\n    isEqualToolkit(1, 1);\n    isEqualToolkit(NaN, NaN);\n    isEqualToolkit(+0, -0);\n\n    isEqualToolkit(true, true);\n    isEqualToolkit(true, false);\n\n    isEqualToolkit('hello', 'hello');\n    isEqualToolkit('hello', 'world');\n  });\n\n  bench('es-toolkit/compat/isEqual', () => {\n    isEqualToolkitCompat(1, 1);\n    isEqualToolkitCompat(NaN, NaN);\n    isEqualToolkitCompat(+0, -0);\n\n    isEqualToolkitCompat(true, true);\n    isEqualToolkitCompat(true, false);\n\n    isEqualToolkitCompat('hello', 'hello');\n    isEqualToolkitCompat('hello', 'world');\n  });\n\n  bench('lodash/isEqual', () => {\n    isEqualLodash(1, 1);\n    isEqualLodash(NaN, NaN);\n    isEqualLodash(+0, -0);\n\n    isEqualLodash(true, true);\n    isEqualLodash(true, false);\n\n    isEqualLodash('hello', 'hello');\n    isEqualLodash('hello', 'world');\n  });\n});\n\ndescribe('isEqual dates', () => {\n  bench('es-toolkit/isEqual', () => {\n    isEqualToolkit(new Date('2020-01-01'), new Date('2020-01-01'));\n    isEqualToolkit(new Date('2020-01-01'), new Date('2021-01-01'));\n  });\n\n  bench('es-toolkit/compat/isEqual', () => {\n    isEqualToolkitCompat(new Date('2020-01-01'), new Date('2020-01-01'));\n    isEqualToolkitCompat(new Date('2020-01-01'), new Date('2021-01-01'));\n  });\n\n  bench('lodash', () => {\n    isEqualLodash(new Date('2020-01-01'), new Date('2020-01-01'));\n    isEqualLodash(new Date('2020-01-01'), new Date('2021-01-01'));\n  });\n});\n\ndescribe('isEqual RegExps', () => {\n  bench('es-toolkit/isEqual', () => {\n    isEqualToolkit(/hello/g, /hello/g);\n    isEqualToolkit(/hello/g, /hello/i);\n  });\n\n  bench('es-toolkit/compat/isEqual', () => {\n    isEqualToolkitCompat(/hello/g, /hello/g);\n    isEqualToolkitCompat(/hello/g, /hello/i);\n  });\n\n  bench('lodash', () => {\n    isEqualLodash(/hello/g, /hello/g);\n    isEqualLodash(/hello/g, /hello/i);\n  });\n});\n\ndescribe('isEqual objects', () => {\n  bench('es-toolkit/isEqual', () => {\n    isEqualToolkit({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } });\n    isEqualToolkit({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } });\n    isEqualToolkit({ a: 1, b: 2 }, { a: 1, b: 2 });\n  });\n\n  bench('es-toolkit/compat/isEqual', () => {\n    isEqualToolkitCompat({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } });\n    isEqualToolkitCompat({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } });\n    isEqualToolkitCompat({ a: 1, b: 2 }, { a: 1, b: 2 });\n  });\n\n  bench('lodash', () => {\n    isEqualLodash({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } });\n    isEqualLodash({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } });\n    isEqualLodash({ a: 1, b: 2 }, { a: 1, b: 2 });\n  });\n});\n\ndescribe('isEqual arrays', () => {\n  bench('es-toolkit/isEqual', () => {\n    isEqualToolkit([1, 2, 3], [1, 2, 3]);\n    isEqualToolkit([1, 2, 3], [1, 2, 4]);\n  });\n\n  bench('es-toolkit/compat/isEqual', () => {\n    isEqualToolkitCompat([1, 2, 3], [1, 2, 3]);\n    isEqualToolkitCompat([1, 2, 3], [1, 2, 4]);\n  });\n\n  bench('lodash', () => {\n    isEqualLodash([1, 2, 3], [1, 2, 3]);\n    isEqualLodash([1, 2, 3], [1, 2, 4]);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isEqualWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isEqualWith as isEqualWithToolkit_ } from 'es-toolkit';\nimport { isEqualWith as isEqualWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { isEqualWith as isEqualWithLodash_ } from 'lodash';\n\nconst isEqualWithToolkit = isEqualWithToolkit_;\nconst isEqualWithToolkitCompat = isEqualWithToolkitCompat_;\nconst isEqualWithLodash = isEqualWithLodash_;\n\ndescribe('isEqualWith primitives', () => {\n  const customizer = (a: unknown, b: unknown) => {\n    if (typeof a === 'string' && typeof b === 'string') {\n      return a.toLowerCase() === b.toLowerCase();\n    }\n  };\n\n  bench('es-toolkit/isEqualWith', () => {\n    isEqualWithToolkit(1, 1, customizer);\n    isEqualWithToolkit(NaN, NaN, customizer);\n    isEqualWithToolkit(+0, -0, customizer);\n\n    isEqualWithToolkit(true, true, customizer);\n    isEqualWithToolkit(true, false, customizer);\n\n    isEqualWithToolkit('hello', 'hello', customizer);\n    isEqualWithToolkit('hello', 'world', customizer);\n  });\n\n  bench('es-toolkit/compat/isEqualWith', () => {\n    isEqualWithToolkitCompat(1, 1, customizer);\n    isEqualWithToolkitCompat(NaN, NaN, customizer);\n    isEqualWithToolkitCompat(+0, -0, customizer);\n\n    isEqualWithToolkitCompat(true, true, customizer);\n    isEqualWithToolkitCompat(true, false, customizer);\n\n    isEqualWithToolkitCompat('hello', 'hello', customizer);\n    isEqualWithToolkitCompat('hello', 'world', customizer);\n  });\n\n  bench('lodash/isEqualWith', () => {\n    isEqualWithLodash(1, 1, customizer);\n    isEqualWithLodash(NaN, NaN, customizer);\n    isEqualWithLodash(+0, -0, customizer);\n\n    isEqualWithLodash(true, true, customizer);\n    isEqualWithLodash(true, false, customizer);\n\n    isEqualWithLodash('hello', 'hello', customizer);\n    isEqualWithLodash('hello', 'world', customizer);\n  });\n});\n\ndescribe('isEqualWith dates', () => {\n  const customizer = (a: unknown, b: unknown) => {\n    if (a instanceof Date && b instanceof Date) {\n      return a.getTime() === b.getTime();\n    }\n  };\n  bench('es-toolkit/isEqualWith', () => {\n    isEqualWithToolkit(new Date('2020-01-01'), new Date('2020-01-01'), customizer);\n    isEqualWithToolkit(new Date('2020-01-01'), new Date('2021-01-01'), customizer);\n  });\n\n  bench('es-toolkit/compat/isEqualWith', () => {\n    isEqualWithToolkitCompat(new Date('2020-01-01'), new Date('2020-01-01'), customizer);\n    isEqualWithToolkitCompat(new Date('2020-01-01'), new Date('2021-01-01'), customizer);\n  });\n\n  bench('lodash', () => {\n    isEqualWithLodash(new Date('2020-01-01'), new Date('2020-01-01'), customizer);\n    isEqualWithLodash(new Date('2020-01-01'), new Date('2021-01-01'), customizer);\n  });\n});\n\ndescribe('isEqualWith RegExps', () => {\n  const customizer = (a: unknown, b: unknown) => {\n    if (a instanceof RegExp && b instanceof RegExp) {\n      return a.source === b.source;\n    }\n  };\n  bench('es-toolkit/isEqualWith', () => {\n    isEqualWithToolkit(/hello/g, /hello/g, customizer);\n    isEqualWithToolkit(/hello/g, /hello/i, customizer);\n  });\n\n  bench('es-toolkit/compat/isEqualWith', () => {\n    isEqualWithToolkitCompat(/hello/g, /hello/g, customizer);\n    isEqualWithToolkitCompat(/hello/g, /hello/i, customizer);\n  });\n\n  bench('lodash', () => {\n    isEqualWithLodash(/hello/g, /hello/g, customizer);\n    isEqualWithLodash(/hello/g, /hello/i, customizer);\n  });\n});\n\ndescribe('isEqualWith objects', () => {\n  const customizer = (a: unknown, b: unknown) => {\n    if (typeof a === 'object' && typeof b === 'object' && a !== null && b !== null) {\n      return Object.keys(a).length === Object.keys(b).length;\n    }\n  };\n  bench('es-toolkit/isEqualWith', () => {\n    isEqualWithToolkit({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } }, customizer);\n    isEqualWithToolkit({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } }, customizer);\n    isEqualWithToolkit({ a: 1, b: 2 }, { a: 1, b: 2 }, customizer);\n  });\n\n  bench('es-toolkit/compat/isEqualWith', () => {\n    isEqualWithToolkitCompat({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } }, customizer);\n    isEqualWithToolkitCompat({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } }, customizer);\n    isEqualWithToolkitCompat({ a: 1, b: 2 }, { a: 1, b: 2 }, customizer);\n  });\n\n  bench('lodash', () => {\n    isEqualWithLodash({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } }, customizer);\n    isEqualWithLodash({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 3 } }, customizer);\n    isEqualWithLodash({ a: 1, b: 2 }, { a: 1, b: 2 }, customizer);\n  });\n});\n\ndescribe('isEqualWith arrays', () => {\n  const customizer = (a: unknown, b: unknown) => {\n    if (Array.isArray(a) && Array.isArray(b)) {\n      return a.length === b.length;\n    }\n  };\n  bench('es-toolkit/isEqualWith', () => {\n    isEqualWithToolkit([1, 2, 3], [1, 2, 3], customizer);\n    isEqualWithToolkit([1, 2, 3], [1, 2, 4], customizer);\n  });\n\n  bench('es-toolkit/compat/isEqualWith', () => {\n    isEqualWithToolkitCompat([1, 2, 3], [1, 2, 3], customizer);\n    isEqualWithToolkitCompat([1, 2, 3], [1, 2, 4], customizer);\n  });\n\n  bench('lodash', () => {\n    isEqualWithLodash([1, 2, 3], [1, 2, 3], customizer);\n    isEqualWithLodash([1, 2, 3], [1, 2, 4], customizer);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isError.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isError as isErrorToolkit_ } from 'es-toolkit';\nimport { isError as isErrorCompatToolkit_ } from 'es-toolkit/compat';\nimport { isError as isErrorLodash_ } from 'lodash';\n\nconst isErrorToolkit = isErrorToolkit_;\nconst isErrorCompatToolkit = isErrorCompatToolkit_;\nconst isErrorLodash = isErrorLodash_;\n\ndescribe('isError', () => {\n  bench('es-toolkit/isError', () => {\n    isErrorToolkit(new Error());\n    isErrorToolkit(1);\n    isErrorToolkit('Error');\n    isErrorToolkit({ name: 'Error', message: '' });\n  });\n\n  bench('es-toolkit/compat/isError', () => {\n    isErrorCompatToolkit(new Error());\n    isErrorCompatToolkit(1);\n    isErrorCompatToolkit('Error');\n    isErrorCompatToolkit({ name: 'Error', message: '' });\n  });\n\n  bench('lodash/isError', () => {\n    isErrorLodash(new Error());\n    isErrorLodash(1);\n    isErrorLodash('Error');\n    isErrorLodash({ name: 'Error', message: '' });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isFinite.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isFinite as isFiniteToolkit_ } from 'es-toolkit/compat';\nimport { isFinite as isFiniteLodash_ } from 'lodash';\n\nconst isFiniteToolkit = isFiniteToolkit_;\nconst isFiniteLodash = isFiniteLodash_;\n\ndescribe('isFinite', () => {\n  bench('es-toolkit/isFinite', () => {\n    isFiniteToolkit(1);\n    isFiniteToolkit(1.12);\n    isFiniteToolkit(Infinity);\n    isFiniteToolkit(-Infinity);\n    isFiniteToolkit([]);\n    isFiniteToolkit({});\n    isFiniteToolkit('1');\n  });\n\n  bench('lodash/isFinite', () => {\n    isFiniteLodash(1);\n    isFiniteLodash(1.12);\n    isFiniteLodash(Infinity);\n    isFiniteLodash(-Infinity);\n    isFiniteLodash([]);\n    isFiniteLodash({});\n    isFiniteLodash('1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isFunction.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isFunction as isFunctionToolkit_ } from 'es-toolkit';\nimport { isFunction as isFunctionToolkitCompat_ } from 'es-toolkit/compat';\nimport { isFunction as isFunctionLodash_ } from 'lodash';\n\nconst isFunctionToolkit = isFunctionToolkit_;\nconst isFunctionToolkitCompat = isFunctionToolkitCompat_;\nconst isFunctionLodash = isFunctionLodash_;\n\ndescribe('isFunction', () => {\n  bench('es-toolkit/isFunction', () => {\n    isFunctionToolkit(true);\n    isFunctionToolkit(new Date());\n    isFunctionToolkit(new Error());\n    isFunctionToolkit({ a: 1 });\n    isFunctionToolkit(1);\n    isFunctionToolkit(/x/);\n    isFunctionToolkit(Array.from({ length: 10000 }));\n    isFunctionToolkit(async function () {});\n    isFunctionToolkit(function* () {});\n    isFunctionToolkit(Proxy);\n    isFunctionToolkit(Int8Array);\n    isFunctionToolkit(() => {});\n    isFunctionToolkit(Array.prototype.slice);\n  });\n\n  bench('es-toolkit/compat/isFunction', () => {\n    isFunctionToolkitCompat(true);\n    isFunctionToolkitCompat(new Date());\n    isFunctionToolkitCompat(new Error());\n    isFunctionToolkitCompat({ a: 1 });\n    isFunctionToolkitCompat(1);\n    isFunctionToolkitCompat(/x/);\n    isFunctionToolkitCompat(Array.from({ length: 10000 }));\n    isFunctionToolkitCompat(async function () {});\n    isFunctionToolkitCompat(function* () {});\n    isFunctionToolkitCompat(Proxy);\n    isFunctionToolkitCompat(Int8Array);\n    isFunctionToolkitCompat(() => {});\n    isFunctionToolkitCompat(Array.prototype.slice);\n  });\n\n  bench('lodash/isFunction', () => {\n    isFunctionLodash(true);\n    isFunctionLodash(new Date());\n    isFunctionLodash(new Error());\n    isFunctionLodash({ a: 1 });\n    isFunctionLodash(1);\n    isFunctionLodash(/x/);\n    isFunctionLodash(Array.from({ length: 10000 }));\n    isFunctionLodash(async function () {});\n    isFunctionLodash(function* () {});\n    isFunctionLodash(Proxy);\n    isFunctionLodash(Int8Array);\n    isFunctionLodash(() => {});\n    isFunctionLodash(Array.prototype.slice);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isInteger.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isInteger as isIntegerToolkit_ } from 'es-toolkit/compat';\nimport { isInteger as isIntegerLodash_ } from 'lodash';\n\nconst isIntegerToolkit = isIntegerToolkit_;\nconst isIntegerLodash = isIntegerLodash_;\n\ndescribe('isInteger', () => {\n  bench('es-toolkit/isInteger', () => {\n    const vals = [1, 1.1, '1', [], {}, () => false, Infinity];\n    for (let i = 0; i < vals.length; i++) {\n      isIntegerToolkit(vals[i]);\n    }\n  });\n\n  bench('lodash/isInteger', () => {\n    const vals = [1, 1.1, '1', [], {}, () => false, Infinity];\n    for (let i = 0; i < vals.length; i++) {\n      isIntegerLodash(vals[i]);\n    }\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isJSONObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isJSONObject as isJSONObjectToolkit_ } from 'es-toolkit';\n\nconst isJSONObjectToolkit = isJSONObjectToolkit_;\n\ndescribe('isJSONObject', () => {\n  bench('es-toolkit/isJSONObject', () => {\n    isJSONObjectToolkit({ nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null } });\n    isJSONObjectToolkit({ date: new Date() });\n    isJSONObjectToolkit({ nested: { a: function* () {} } });\n    isJSONObjectToolkit(undefined);\n    isJSONObjectToolkit(/test/);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isLength.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isLength as isLengthToolkit_ } from 'es-toolkit';\nimport { isLength as isLengthToolkitCompat_ } from 'es-toolkit/compat';\nimport { isLength as isLengthLodash_ } from 'lodash';\n\nconst isLengthToolkit = isLengthToolkit_;\nconst isLengthToolkitCompat = isLengthToolkitCompat_;\nconst isLengthLodash = isLengthLodash_;\n\ndescribe('isLength', () => {\n  bench('es-toolkit/isLength', () => {\n    isLengthToolkit(100);\n    isLengthToolkit(0);\n    isLengthToolkit(-1);\n    isLengthToolkit(1.5);\n    isLengthToolkit(Number.MAX_SAFE_INTEGER);\n    isLengthToolkit(Number.MAX_SAFE_INTEGER + 1);\n    isLengthToolkit('100');\n    isLengthToolkit(true);\n    isLengthToolkit(null);\n    isLengthToolkit(undefined);\n    isLengthToolkit({});\n    isLengthToolkit([]);\n  });\n\n  bench('es-toolkit/compat/isLength', () => {\n    isLengthToolkitCompat(100);\n    isLengthToolkitCompat(0);\n    isLengthToolkitCompat(-1);\n    isLengthToolkitCompat(1.5);\n    isLengthToolkitCompat(Number.MAX_SAFE_INTEGER);\n    isLengthToolkitCompat(Number.MAX_SAFE_INTEGER + 1);\n    isLengthToolkitCompat('100');\n    isLengthToolkitCompat(true);\n    isLengthToolkitCompat(null);\n    isLengthToolkitCompat(undefined);\n    isLengthToolkitCompat({});\n    isLengthToolkitCompat([]);\n  });\n\n  bench('lodash/isLength', () => {\n    isLengthLodash(100);\n    isLengthLodash(0);\n    isLengthLodash(-1);\n    isLengthLodash(1.5);\n    isLengthLodash(Number.MAX_SAFE_INTEGER);\n    isLengthLodash(Number.MAX_SAFE_INTEGER + 1);\n    isLengthLodash('100');\n    isLengthLodash(true);\n    isLengthLodash(null);\n    isLengthLodash(undefined);\n    isLengthLodash({});\n    isLengthLodash([]);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isMap.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isMap as isMapToolkit_ } from 'es-toolkit';\nimport { isMap as isMapToolkitCompat_ } from 'es-toolkit/compat';\nimport { isMap as isMapLodash_ } from 'lodash';\n\nconst isMapToolkit = isMapToolkit_;\nconst isMapToolkitCompat = isMapToolkitCompat_;\nconst isMapLodash = isMapLodash_;\n\ndescribe('isMap', () => {\n  bench('es-toolkit/isMap', () => {\n    isMapToolkit(new Map());\n    isMapToolkit(new Map([['key', 'value']]));\n    isMapToolkit(new WeakMap());\n    isMapToolkit([]);\n    isMapToolkit({});\n    isMapToolkit(null);\n  });\n\n  bench('es-toolkit/compat/isMap', () => {\n    isMapToolkitCompat(new Map());\n    isMapToolkitCompat(new Map([['key', 'value']]));\n    isMapToolkitCompat(new WeakMap());\n    isMapToolkitCompat([]);\n    isMapToolkitCompat({});\n    isMapToolkitCompat(null);\n  });\n\n  bench('lodash/isMap', () => {\n    isMapLodash(new Map());\n    isMapLodash(new Map([['key', 'value']]));\n    isMapLodash(new WeakMap());\n    isMapLodash([]);\n    isMapLodash({});\n    isMapLodash(null);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isMatch.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isMatch as isMatchToolkit_ } from 'es-toolkit/compat';\nimport { isMatch as isMatchLodash_ } from 'lodash';\n\nconst isMatchToolkit = isMatchToolkit_;\nconst isMatchLodash = isMatchLodash_;\n\ndescribe('isMatch', () => {\n  bench('es-toolkit/isMatch', () => {\n    isMatchToolkit({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 }, { a: { b: { c: 1 } } });\n  });\n  bench('lodash/isMatch', () => {\n    isMatchLodash({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 }, { a: { b: { c: 1 } } });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isMatchWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isMatchWith as isMatchWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { isMatchWith as isMatchWithLodash_ } from 'lodash';\n\nconst isMatchWithToolkitCompat = isMatchWithToolkitCompat_;\nconst isMatchWithLodash = isMatchWithLodash_;\n\nconst customizer = (objValue: unknown, srcValue: unknown) => {\n  if (typeof objValue === 'string' && typeof srcValue === 'string') {\n    return objValue.toLowerCase() === srcValue.toLowerCase();\n  }\n};\n\ndescribe('isMatchWith', () => {\n  bench('es-toolkit/compat/isMatchWith', () => {\n    isMatchWithToolkitCompat({ a: 'A' }, { a: 'a' }, customizer);\n  });\n\n  bench('lodash/isMatchWith', () => {\n    isMatchWithLodash({ a: 'A' }, { a: 'a' }, customizer);\n  });\n});\n\ndescribe('isMatchWith - complex objects', () => {\n  const targetObject = {\n    user: {\n      name: 'Minsu',\n      age: 25,\n      email: 'minsu@example.com',\n      address: {\n        city: 'Seoul',\n        country: 'Korea',\n      },\n      hobbies: ['Reading', 'Gaming', 'Coding', 'Traveling'],\n    },\n  };\n\n  const sourceObject = {\n    user: {\n      name: 'Minsu',\n      email: 'minsu@example.com',\n      address: {\n        city: 'Seoul',\n        country: 'Korea',\n      },\n    },\n  };\n\n  bench('es-toolkit/compat/isMatchWith', () => {\n    isMatchWithToolkitCompat(targetObject, sourceObject, customizer);\n  });\n\n  bench('lodash/isMatchWith', () => {\n    isMatchWithLodash(targetObject, sourceObject, customizer);\n  });\n});\n\ndescribe('isMatchWith - arrays', () => {\n  const targetArray = [\n    { id: 1, name: 'ITEM 1' },\n    { id: 2, name: 'ITEM 2' },\n    { id: 3, name: 'ITEM 3' },\n  ];\n\n  const sourceArray = [\n    { id: 1, name: 'item 1' },\n    { id: 3, name: 'item 3' },\n  ];\n\n  bench('es-toolkit/compat/isMatchWith', () => {\n    isMatchWithToolkitCompat(targetArray, sourceArray, customizer);\n  });\n\n  bench('lodash/isMatchWith', () => {\n    isMatchWithLodash(targetArray, sourceArray, customizer);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isNaN.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isNaN as isNaNToolkit_ } from 'es-toolkit/compat';\nimport { isNaN as isNaNLodash_ } from 'lodash';\n\nconst isNaNToolkit = isNaNToolkit_;\nconst isNaNLodash = isNaNLodash_;\n\ndescribe('isNaN', () => {\n  bench('es-toolkit/isNaN', () => {\n    isNaNToolkit(NaN);\n    isNaNToolkit(1);\n    isNaNToolkit(null);\n    isNaNToolkit(undefined);\n    isNaNToolkit('NaN');\n  });\n\n  bench('lodash/isNaN', () => {\n    isNaNLodash(NaN);\n    isNaNLodash(1);\n    isNaNLodash(null);\n    isNaNLodash(undefined);\n    isNaNLodash('NaN');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isNative.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isNative as isNativeToolkit_ } from 'es-toolkit/compat';\nimport { isNative as isNativeLodash_ } from 'lodash';\n\nconst isNativeToolkit = isNativeToolkit_;\nconst isNativeLodash = isNativeLodash_;\n\ndescribe('isNative', () => {\n  bench('es-toolkit/isNative', () => {\n    // Native functions\n    isNativeToolkit(Array.prototype.push);\n    isNativeToolkit(Object.keys);\n    isNativeToolkit(Math.max);\n    isNativeToolkit(Promise);\n    isNativeToolkit(Uint8Array);\n\n    // Non-native values\n    isNativeToolkit(undefined);\n    isNativeToolkit(null);\n    isNativeToolkit({});\n    isNativeToolkit([]);\n    isNativeToolkit(() => {});\n  });\n\n  bench('lodash/isNative', () => {\n    // Native functions\n    isNativeLodash(Array.prototype.push);\n    isNativeLodash(Object.keys);\n    isNativeLodash(Math.max);\n    isNativeLodash(Promise);\n    isNativeLodash(Uint8Array);\n\n    // Non-native values\n    isNativeLodash(undefined);\n    isNativeLodash(null);\n    isNativeLodash({});\n    isNativeLodash([]);\n    isNativeLodash(() => {});\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isNil.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isNil as isNilToolkit_ } from 'es-toolkit';\nimport { isNil as isNilCompatToolkit_ } from 'es-toolkit/compat';\nimport { isNil as isNilLodash_ } from 'lodash';\n\nconst isNilToolkit = isNilToolkit_;\nconst isNilCompatToolkit = isNilCompatToolkit_;\nconst isNilLodash = isNilLodash_;\n\ndescribe('isNil', () => {\n  bench('es-toolkit/isNil', () => {\n    isNilToolkit(null);\n    isNilToolkit(undefined);\n    isNilToolkit(123);\n    isNilToolkit([1, 2, 3]);\n  });\n\n  bench('es-toolkit/compat/isNil', () => {\n    isNilCompatToolkit(null);\n    isNilCompatToolkit(undefined);\n    isNilCompatToolkit(123);\n    isNilCompatToolkit([1, 2, 3]);\n  });\n\n  bench('lodash/isNil', () => {\n    isNilLodash(null);\n    isNilLodash(undefined);\n    isNilLodash(123);\n    isNilLodash([1, 2, 3]);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isNull.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isNull as isNullToolkit_ } from 'es-toolkit';\nimport { isNull as isNullToolkitCompat_ } from 'es-toolkit/compat';\nimport { isNull as isNullLodash_ } from 'lodash';\n\nconst isNullToolkit = isNullToolkit_;\nconst isNullToolkitCompat = isNullToolkitCompat_;\nconst isNullLodash = isNullLodash_;\n\ndescribe('isNull', () => {\n  bench('es-toolkit/isNull', () => {\n    isNullToolkit(null);\n    isNullToolkit(undefined);\n    isNullToolkit('');\n    isNullToolkit(123);\n  });\n\n  bench('es-toolkit/compat/isNull', () => {\n    isNullToolkitCompat(null);\n    isNullToolkitCompat(undefined);\n    isNullToolkitCompat('');\n    isNullToolkitCompat(123);\n  });\n\n  bench('lodash/isNull', () => {\n    isNullLodash(null);\n    isNullLodash(undefined);\n    isNullLodash('');\n    isNullLodash(123);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isNumber.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isNumber as isNumberToolkit_ } from 'es-toolkit/compat';\nimport { isNumber as isNumberLodash_ } from 'lodash';\n\nconst isNumberToolkit = isNumberToolkit_;\nconst isNumberLodash = isNumberLodash_;\n\ndescribe('isNumber', () => {\n  bench('es-toolkit/isNumber', () => {\n    isNumberToolkit(1);\n    isNumberToolkit(1.5);\n    isNumberToolkit(NaN);\n    isNumberToolkit(Infinity);\n    isNumberToolkit('1');\n    isNumberToolkit(true);\n    isNumberToolkit(null);\n    isNumberToolkit(undefined);\n    isNumberToolkit({});\n    isNumberToolkit([]);\n  });\n\n  bench('lodash/isNumber', () => {\n    isNumberLodash(1);\n    isNumberLodash(1.5);\n    isNumberLodash(NaN);\n    isNumberLodash(Infinity);\n    isNumberLodash('1');\n    isNumberLodash(true);\n    isNumberLodash(null);\n    isNumberLodash(undefined);\n    isNumberLodash({});\n    isNumberLodash([]);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isObject as isObjectToolkit_ } from 'es-toolkit/compat';\nimport { isObject as isObjectLodash_ } from 'lodash';\n\nconst isObjectToolkit = isObjectToolkit_;\nconst isObjectLodash = isObjectLodash_;\n\ndescribe('isObject', () => {\n  bench('es-toolkit/isObject', () => {\n    isObjectToolkit([1, 2, 3]);\n    isObjectToolkit(true);\n    isObjectToolkit(new Date());\n    isObjectToolkit(new Error());\n    isObjectToolkit(1);\n    isObjectToolkit(/x/);\n    isObjectToolkit('a');\n    isObjectToolkit(Array.prototype.slice);\n  });\n\n  bench('lodash/isObject', () => {\n    isObjectLodash([1, 2, 3]);\n    isObjectLodash(true);\n    isObjectLodash(new Date());\n    isObjectLodash(new Error());\n    isObjectLodash(1);\n    isObjectLodash(/x/);\n    isObjectLodash('a');\n    isObjectToolkit(Array.prototype.slice);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isObjectLike.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isObjectLike as isObjectLikeToolkit_ } from 'es-toolkit/compat';\nimport { isObjectLike as isObjectLikeLodash_ } from 'lodash';\n\nconst isObjectLikeToolkit = isObjectLikeToolkit_;\nconst isObjectLikeLodash = isObjectLikeLodash_;\n\ndescribe('isObjectLike', () => {\n  bench('es-toolkit/isObjectLike', () => {\n    isObjectLikeToolkit([1, 2, 3]);\n    isObjectLikeToolkit(true);\n    isObjectLikeToolkit(new Date());\n    isObjectLikeToolkit(new Error());\n    isObjectLikeToolkit(1);\n    isObjectLikeToolkit(/x/);\n    isObjectLikeToolkit('a');\n  });\n\n  bench('lodash/isObjectLike', () => {\n    isObjectLikeLodash([1, 2, 3]);\n    isObjectLikeLodash(true);\n    isObjectLikeLodash(new Date());\n    isObjectLikeLodash(new Error());\n    isObjectLikeLodash(1);\n    isObjectLikeLodash(/x/);\n    isObjectLikeLodash('a');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isPlainObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isPlainObject as isPlainObjectToolkit_ } from 'es-toolkit';\nimport { isPlainObject as isPlainObjectCompatToolkit_ } from 'es-toolkit/compat';\nimport { isPlainObject as isPlainObjectLodash_ } from 'lodash';\n\nconst isPlainObjectToolkit = isPlainObjectToolkit_;\nconst isPlainObjectCompatToolkit = isPlainObjectCompatToolkit_;\nconst isPlainObjectLodash = isPlainObjectLodash_;\n\nconst object = Object.create(null);\nconst buffer = Buffer.from('hello, world');\n\ndescribe('isPlainObject', () => {\n  bench('es-toolkit/isPlainObject', () => {\n    isPlainObjectToolkit({});\n    isPlainObjectToolkit([]);\n    isPlainObjectToolkit(null);\n    isPlainObjectToolkit(object);\n    isPlainObjectToolkit(buffer);\n  });\n\n  bench('es-toolkit/compat/isPlainObject', () => {\n    isPlainObjectCompatToolkit({});\n    isPlainObjectCompatToolkit([]);\n    isPlainObjectCompatToolkit(null);\n    isPlainObjectCompatToolkit(object);\n    isPlainObjectCompatToolkit(buffer);\n  });\n\n  bench('lodash/isPlainObject', () => {\n    isPlainObjectLodash({});\n    isPlainObjectLodash([]);\n    isPlainObjectLodash(null);\n    isPlainObjectLodash(object);\n    isPlainObjectLodash(buffer);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isRegExp.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isRegExp as isRegExpToolkit_ } from 'es-toolkit';\nimport { isRegExp as isRegExpToolkitCompat_ } from 'es-toolkit/compat';\nimport { isRegExp as isRegExpLodash_ } from 'lodash';\n\nconst isRegExpToolkit = isRegExpToolkit_;\nconst isRegExpToolkitCompat = isRegExpToolkitCompat_;\nconst isRegExpLodash = isRegExpLodash_;\n\ndescribe('isRegExp', () => {\n  bench('es-toolkit/isRegExp', () => {\n    isRegExpToolkit(new RegExp(''));\n    isRegExpToolkit(/abc/);\n    isRegExpToolkit('/abc/');\n  });\n\n  bench('es-toolkit/compat/isRegExp', () => {\n    isRegExpToolkitCompat(new RegExp(''));\n    isRegExpToolkitCompat(/abc/);\n    isRegExpToolkitCompat('/abc/');\n  });\n\n  bench('lodash/isRegExp', () => {\n    isRegExpLodash(new RegExp(''));\n    isRegExpLodash(/abc/);\n    isRegExpLodash('/abc/');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isSafeInteger.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isSafeInteger as isSafeIntegerToolkit_ } from 'es-toolkit/compat';\nimport { isSafeInteger as isSafeIntegerLodash_ } from 'lodash';\n\nconst isSafeIntegerToolkit = isSafeIntegerToolkit_;\nconst isSafeIntegerLodash = isSafeIntegerLodash_;\n\ndescribe('after', () => {\n  bench('es-toolkit/isSafeInteger', () => {\n    const vals = [1, 1.1, '1', [], {}, () => false, Infinity, Number.MAX_SAFE_INTEGER + 1, Number.MIN_SAFE_INTEGER - 1];\n    for (let i = 0; i < vals.length; i++) {\n      isSafeIntegerToolkit(vals[i]);\n    }\n  });\n\n  bench('lodash/isSafeInteger', () => {\n    const vals = [1, 1.1, '1', [], {}, () => false, Infinity, Number.MAX_SAFE_INTEGER + 1, Number.MIN_SAFE_INTEGER - 1];\n    for (let i = 0; i < vals.length; i++) {\n      isSafeIntegerLodash(vals[i]);\n    }\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isSet.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isSet as isSetToolkit_ } from 'es-toolkit';\nimport { isSet as isSetToolkitCompat_ } from 'es-toolkit/compat';\nimport { isSet as isSetLodash_ } from 'lodash';\n\nconst isSetToolkit = isSetToolkit_;\nconst isSetToolkitCompat = isSetToolkitCompat_;\nconst isSetLodash = isSetLodash_;\n\ndescribe('isSet', () => {\n  bench('es-toolkit/isSet', () => {\n    isSetToolkit(new Set());\n    isSetToolkit(new WeakSet());\n    isSetToolkit([]);\n    isSetToolkit({});\n    isSetToolkit(null);\n  });\n\n  bench('es-toolkit/isSetCompat', () => {\n    isSetToolkitCompat(new Set());\n    isSetToolkitCompat(new WeakSet());\n    isSetToolkitCompat([]);\n    isSetToolkitCompat({});\n    isSetToolkitCompat(null);\n  });\n\n  bench('lodash/isSet', () => {\n    isSetLodash(new Set());\n    isSetLodash(new WeakSet());\n    isSetLodash([]);\n    isSetLodash({});\n    isSetLodash(null);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isString.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isString as isStringToolkit_ } from 'es-toolkit';\nimport { isString as isStringToolkitCompat_ } from 'es-toolkit/compat';\nimport { isString as isStringLodash_ } from 'lodash';\n\nconst isStringToolkit = isStringToolkit_;\nconst isStringToolkitCompat = isStringToolkitCompat_;\nconst isStringLodash = isStringLodash_;\n\ndescribe('isString', () => {\n  bench('es-toolkit/isString', () => {\n    isStringToolkit('');\n    isStringToolkit(true);\n    isStringToolkit(undefined);\n    isStringToolkit(123);\n    isStringToolkit(String(''));\n    isStringToolkit(Object(''));\n  });\n\n  bench('es-toolkit/compat/isString', () => {\n    isStringToolkitCompat('');\n    isStringToolkitCompat(true);\n    isStringToolkitCompat(undefined);\n    isStringToolkitCompat(123);\n    isStringToolkitCompat(String(''));\n    isStringToolkitCompat(Object(''));\n  });\n\n  bench('lodash/isString', () => {\n    isStringLodash('');\n    isStringLodash(true);\n    isStringLodash(undefined);\n    isStringLodash(123);\n    isStringLodash(String(''));\n    isStringLodash(Object(''));\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isSubset.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isSubset as isSubsetToolkit_ } from 'es-toolkit';\nimport { difference as differenceLodash_ } from 'lodash';\n\nconst isSubsetToolkit = isSubsetToolkit_;\nconst differenceLodash = differenceLodash_;\n\nconst isSubsetLodash = (array: any[], subset: any[]) => {\n  return differenceLodash(array, subset).length === 0;\n};\n\ndescribe('isSubset', () => {\n  bench('es-toolkit/isSubset', () => {\n    isSubsetToolkit([1, 2, 3], [1, 2]);\n  });\n\n  bench('lodash/difference implementation', () => {\n    isSubsetLodash([1, 2, 3], [1, 2]);\n  });\n});\n\ndescribe('isSubset/largeArray', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, index) => index);\n  const subset = Array.from({ length: 1000 }, (_, index) => index);\n\n  bench('es-toolkit/isSubset', () => {\n    isSubsetToolkit(largeArray, subset);\n  });\n\n  bench('lodash/difference implementation', () => {\n    isSubsetLodash(largeArray, subset);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isSubsetWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isSubsetWith } from 'es-toolkit';\n\nconst areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n\ndescribe('isSubsetWith', () => {\n  const superset = [{ id: 1 }, { id: 2 }, { id: 3 }];\n  const subset = [{ id: 1 }, { id: 2 }];\n\n  bench('es-toolkit/isSubsetWith', () => {\n    isSubsetWith(superset, subset, areItemsEqual);\n  });\n});\n\ndescribe('isSubsetWith/largeArray', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, index) => ({ id: index }));\n  const subset = Array.from({ length: 2500 }, (_, index) => ({ id: index * 2 }));\n\n  bench('es-toolkit/isSubsetWith', () => {\n    isSubsetWith(largeArray, subset, areItemsEqual);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isSymbol.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isSymbol as isSymbolToolkit_ } from 'es-toolkit';\nimport { isSymbol as isSymbolToolkitCompat_ } from 'es-toolkit/compat';\nimport { isSymbol as isSymbolLodash_ } from 'lodash';\n\nconst isSymbolToolkit = isSymbolToolkit_;\nconst isSymbolToolkitCompat = isSymbolToolkitCompat_;\nconst isSymbolLodash = isSymbolLodash_;\n\ndescribe('isSymbol', () => {\n  bench('es-toolkit/isSymbol', () => {\n    isSymbolToolkit(Symbol('a'));\n    isSymbolToolkit(Symbol.for('a'));\n    isSymbolToolkit(Symbol.iterator);\n    isSymbolToolkit('');\n    isSymbolToolkit({});\n    isSymbolToolkit(123);\n  });\n\n  bench('es-toolkit/compat/isSymbol', () => {\n    isSymbolToolkitCompat(Symbol('a'));\n    isSymbolToolkitCompat(Symbol.for('a'));\n    isSymbolToolkitCompat(Symbol.iterator);\n    isSymbolToolkitCompat('');\n    isSymbolToolkitCompat({});\n    isSymbolToolkitCompat(123);\n  });\n\n  bench('lodash/isSymbol', () => {\n    isSymbolLodash(Symbol('a'));\n    isSymbolLodash(Symbol.for('a'));\n    isSymbolLodash(Symbol.iterator);\n    isSymbolLodash('');\n    isSymbolLodash({});\n    isSymbolLodash(123);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isTypedArray.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isTypedArray as isTypedArrayToolkit_ } from 'es-toolkit';\nimport { isTypedArray as isTypedArrayCompatToolkit_ } from 'es-toolkit/compat';\nimport { isTypedArray as isTypedArrayLodash_ } from 'lodash';\n\nconst isTypedArrayToolkit = isTypedArrayToolkit_;\nconst isTypedArrayCompatToolkit = isTypedArrayCompatToolkit_;\nconst isTypedArrayLodash = isTypedArrayLodash_;\n\ndescribe('isTypedArrayToolkit', () => {\n  bench('es-toolkit/isTypedArray', () => {\n    isTypedArrayToolkit(new Uint8Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Uint8ClampedArray(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Uint16Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Uint32Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new BigUint64Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Int8Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Int16Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Int32Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new BigInt64Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Float32Array(new ArrayBuffer(8)));\n    isTypedArrayToolkit(new Float64Array(new ArrayBuffer(8)));\n  });\n\n  bench('es-toolkit/compat/isTypedArray', () => {\n    isTypedArrayCompatToolkit(new Uint8Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Uint8ClampedArray(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Uint16Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Uint32Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new BigUint64Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Int8Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Int16Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Int32Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new BigInt64Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Float32Array(new ArrayBuffer(8)));\n    isTypedArrayCompatToolkit(new Float64Array(new ArrayBuffer(8)));\n  });\n\n  bench('lodash/isTypedArray', () => {\n    isTypedArrayLodash(new Uint8Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Uint8ClampedArray(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Uint16Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Uint32Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new BigUint64Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Int8Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Int16Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Int32Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new BigInt64Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Float32Array(new ArrayBuffer(8)));\n    isTypedArrayLodash(new Float64Array(new ArrayBuffer(8)));\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isUndefined.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isUndefined as isUndefinedToolkit_ } from 'es-toolkit';\nimport { isUndefined as isUndefinedToolkitCompat_ } from 'es-toolkit/compat';\nimport { isUndefined as isUndefinedLodash_ } from 'lodash';\n\nconst isUndefinedToolkit = isUndefinedToolkit_;\nconst isUndefinedToolkitCompat = isUndefinedToolkitCompat_;\nconst isUndefinedLodash = isUndefinedLodash_;\n\ndescribe('isUndefined', () => {\n  bench('es-toolkit/isUndefined', () => {\n    isUndefinedToolkit(undefined);\n    isUndefinedToolkit(null);\n    isUndefinedToolkit('');\n    isUndefinedToolkit(123);\n  });\n\n  bench('es-toolkit/compat/isUndefined', () => {\n    isUndefinedToolkitCompat(undefined);\n    isUndefinedToolkitCompat(null);\n    isUndefinedToolkitCompat('');\n    isUndefinedToolkitCompat(123);\n  });\n\n  bench('lodash/isUndefined', () => {\n    isUndefinedLodash(undefined);\n    isUndefinedLodash(null);\n    isUndefinedLodash('');\n    isUndefinedLodash(123);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isWeakMap.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isWeakMap as isWeakMapToolkit_ } from 'es-toolkit';\nimport { isWeakMap as isWeakMapToolkitCompat_ } from 'es-toolkit/compat';\nimport { isWeakMap as isWeakMapLodash_ } from 'lodash';\n\nconst isWeakMapToolkit = isWeakMapToolkit_;\nconst isWeakMapToolkitCompat = isWeakMapToolkitCompat_;\nconst isWeakMapLodash = isWeakMapLodash_;\n\ndescribe('isWeakMap', () => {\n  bench('es-toolkit/isWeakMap', () => {\n    isWeakMapToolkit(new WeakMap());\n    isWeakMapToolkit(new Map());\n    isWeakMapToolkit('');\n    isWeakMapToolkit(123);\n  });\n  bench('es-toolkit/compat/isWeakMap', () => {\n    isWeakMapToolkitCompat(new WeakMap());\n    isWeakMapToolkitCompat(new Map());\n    isWeakMapToolkitCompat('');\n    isWeakMapToolkitCompat(123);\n  });\n\n  bench('lodash/isWeakMap', () => {\n    isWeakMapLodash(new WeakMap());\n    isWeakMapLodash(new Map());\n    isWeakMapLodash('');\n    isWeakMapLodash(123);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/isWeakSet.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { isWeakSet as isWeakSetToolkit_ } from 'es-toolkit';\nimport { isWeakSet as isWeakSetToolkitCompat_ } from 'es-toolkit/compat';\nimport { isWeakSet as isWeakSetLodash_ } from 'lodash';\n\nconst isWeakSetToolkit = isWeakSetToolkit_;\nconst isWeakSetToolkitCompat = isWeakSetToolkitCompat_;\nconst isWeakSetLodash = isWeakSetLodash_;\n\ndescribe('isWeakSet', () => {\n  bench('es-toolkit/isWeakSet', () => {\n    isWeakSetToolkit(new WeakMap());\n    isWeakSetToolkit(new Map());\n    isWeakSetToolkit('');\n    isWeakSetToolkit(123);\n  });\n  bench('es-toolkit/compat/isWeakSet', () => {\n    isWeakSetToolkitCompat(new WeakMap());\n    isWeakSetToolkitCompat(new Map());\n    isWeakSetToolkitCompat('');\n    isWeakSetToolkitCompat(123);\n  });\n\n  bench('lodash/isWeakSet', () => {\n    isWeakSetLodash(new WeakMap());\n    isWeakSetLodash(new Map());\n    isWeakSetLodash('');\n    isWeakSetLodash(123);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/iteratee.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { iteratee as iterateeToolkit_ } from 'es-toolkit/compat';\nimport { iteratee as iterateeLodash_ } from 'lodash';\n\nconst iterateeToolkit = iterateeToolkit_;\nconst iterateeLodash = iterateeLodash_;\n\ndescribe('iteratee', () => {\n  bench('es-toolkit/compat/iteratee', () => {\n    iterateeToolkit(1);\n    iterateeToolkit([1, 2]);\n    iterateeToolkit({ a: 1 });\n    iterateeToolkit(() => {});\n  });\n\n  bench('lodash/compat/iteratee', () => {\n    iterateeLodash(1);\n    iterateeLodash([1, 2]);\n    iterateeLodash({ a: 1 });\n    iterateeLodash(() => {});\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/join.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { join as joinToolkit_ } from 'es-toolkit/compat';\nimport { join as joinLodash_ } from 'lodash';\n\nconst joinToolkit = joinToolkit_;\nconst joinLodash = joinLodash_;\n\ndescribe('join', () => {\n  bench('es-toolkit', () => {\n    joinToolkit([1, 2, 3], ',');\n  });\n\n  bench('lodash', () => {\n    joinLodash([1, 2, 3], ',');\n  });\n});\n\ndescribe('join/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit', () => {\n    joinToolkit(largeArray, ',');\n  });\n\n  bench('lodash', () => {\n    joinLodash(largeArray, ',');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/kebabCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { kebabCase as kebabCaseToolkit_ } from 'es-toolkit';\nimport { kebabCase as kebabCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { kebabCase as kebabCaseLodash_ } from 'lodash';\n\nconst kebabCaseToolkit = kebabCaseToolkit_;\nconst kebabCaseToolkitCompat = kebabCaseToolkitCompat_;\nconst kebabCaseLodash = kebabCaseLodash_;\n\ndescribe('kebabCase', () => {\n  bench('es-toolkit/kebabCase', () => {\n    kebabCaseToolkit('hello world');\n    kebabCaseToolkit('--foo--bar__baz 123');\n    kebabCaseToolkit('123numericValues');\n    kebabCaseToolkit('XMLHttpRequest');\n    kebabCaseToolkit('hello-World_of XML_httpRequest');\n  });\n\n  bench('es-toolkit/compat/kebabCase', () => {\n    kebabCaseToolkitCompat('hello world');\n    kebabCaseToolkitCompat('--foo--bar__baz 123');\n    kebabCaseToolkitCompat('123numericValues');\n    kebabCaseToolkitCompat('XMLHttpRequest');\n    kebabCaseToolkitCompat('hello-World_of XML_httpRequest');\n  });\n\n  bench('lodash/kebabCase', () => {\n    kebabCaseLodash('hello world');\n    kebabCaseLodash('--foo--bar__baz 123');\n    kebabCaseLodash('123numericValues');\n    kebabCaseLodash('XMLHttpRequest');\n    kebabCaseLodash('hello-World_of XML_httpRequest');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/keyBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { keyBy as keyByToolkit_ } from 'es-toolkit';\nimport { keyBy as keyByToolkitCompat_ } from 'es-toolkit/compat';\nimport { keyBy as keyByLodash_ } from 'lodash';\n\nconst keyByToolkit = keyByToolkit_;\nconst keyByToolkitCompat = keyByToolkitCompat_;\nconst keyByLodash = keyByLodash_;\n\ndescribe('keyBy', () => {\n  bench('es-toolkit/keyBy', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    keyByToolkit(people, person => person.name);\n  });\n\n  bench('es-toolkit/compat/keyBy', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    keyByToolkitCompat(people, person => person.name);\n  });\n\n  bench('lodash/keyBy', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    keyByLodash(people, person => person.name);\n  });\n});\n\ndescribe('keyBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ name: `name${i}`, age: i }));\n\n  bench('es-toolkit/keyBy', () => {\n    keyByToolkit(largeArray, person => person.name);\n  });\n\n  bench('es-toolkit/compat/keyBy', () => {\n    keyByToolkitCompat(largeArray, person => person.name);\n  });\n\n  bench('lodash/keyBy', () => {\n    keyByLodash(largeArray, person => person.name);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/keys.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { keys as keysToolkit_ } from 'es-toolkit/compat';\nimport { keys as keysLodash_ } from 'lodash';\n\nconst keysToolkit = keysToolkit_;\nconst keysLodash = keysLodash_;\n\nclass Foo {\n  a = 1;\n  b = 2;\n  c = 3;\n}\n\nconst object = new Foo();\n\ndescribe('keys', () => {\n  bench('es-toolkit/compat/keys', () => {\n    keysToolkit(object);\n  });\n\n  bench('lodash/keys', () => {\n    keysLodash(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/keysIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { keysIn as keysInToolkit_ } from 'es-toolkit/compat';\nimport { keysIn as keysInLodash_ } from 'lodash';\n\nconst keysInToolkit = keysInToolkit_;\nconst keysInLodash = keysInLodash_;\n\nclass Foo {\n  a = 1;\n  b = 2;\n  c = 3;\n}\n\nconst object = new Foo();\n\ndescribe('keysIn', () => {\n  bench('es-toolkit/compat/keysIn', () => {\n    keysInToolkit(object);\n  });\n\n  bench('lodash/keysIn', () => {\n    keysInLodash(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/last.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { last as lastToolkit_ } from 'es-toolkit';\nimport { last as lastToolkitCompat_ } from 'es-toolkit/compat';\nimport { last as lastLodash_ } from 'lodash';\n\nconst lastToolkit = lastToolkit_;\nconst lastToolkitCompat = lastToolkitCompat_;\nconst lastLodash = lastLodash_;\n\ndescribe('last', () => {\n  bench('es-toolkit/last', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    lastToolkit(people);\n  });\n\n  bench('es-toolkit/compat/last', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    lastToolkitCompat(people);\n  });\n\n  bench('lodash/last', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n      { name: 'john', age: 25 },\n      { name: 'sarah', age: 25 },\n      { name: 'emma', age: 25 },\n    ];\n\n    lastLodash(people);\n  });\n});\n\ndescribe('last/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ name: `name${i}`, age: i }));\n\n  bench('es-toolkit/last', () => {\n    lastToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/last', () => {\n    lastToolkitCompat(largeArray);\n  });\n\n  bench('lodash/last', () => {\n    lastLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/lastIndexOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { lastIndexOf as lastIndexOfToolkitCompat_ } from 'es-toolkit/compat';\nimport { lastIndexOf as lastIndexOfLodash_ } from 'lodash';\n\nconst indexOfToolkitCompat = lastIndexOfToolkitCompat_;\nconst indexOfLodash = lastIndexOfLodash_;\n\ndescribe('lastIndexOf', () => {\n  const largeArray = Array(1_000_000)\n    .fill(0)\n    .map((_, i) => i);\n  const array = [1, 2, 3, 4, NaN, '1', '2', '3', '4', 'NaN', ...largeArray];\n\n  bench('es-toolkit/compat/lastIndexOf', () => {\n    indexOfToolkitCompat(array, 1);\n    indexOfToolkitCompat(array, NaN);\n    indexOfToolkitCompat(array, '1');\n    indexOfToolkitCompat(array, 'NaN', -5);\n    indexOfToolkitCompat(array, 'NaN', -100);\n  });\n\n  bench('lodash/lastIndexOf', () => {\n    indexOfLodash(array, 1);\n    indexOfLodash(array, NaN);\n    indexOfLodash(array, '1');\n    indexOfLodash(array, 'NaN', -5);\n    indexOfLodash(array, 'NaN', -100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/lowerCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { lowerCase as lowerCaseToolkit_ } from 'es-toolkit';\nimport { lowerCase as lowerCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { lowerCase as lowerCaseLodash_ } from 'lodash';\n\nconst lowerCaseToolkit = lowerCaseToolkit_;\nconst lowerCaseToolkitCompat = lowerCaseToolkitCompat_;\nconst lowerCaseLodash = lowerCaseLodash_;\n\ndescribe('lowerCase - short string', () => {\n  bench('es-toolkit/lowerCase', () => {\n    const str = 'camelCase';\n    lowerCaseToolkit(str);\n  });\n\n  bench('es-toolkit/compat/lowerCase', () => {\n    const str = 'camelCase';\n    lowerCaseToolkitCompat(str);\n  });\n\n  bench('lodash/lowerCase', () => {\n    const str = 'camelCase';\n    lowerCaseLodash(str);\n  });\n});\n\ndescribe('lowerCase - long string', () => {\n  const LONG_STR = 'camelCaseLongString'.repeat(1000);\n  bench('es-toolkit/lowerCase', () => {\n    lowerCaseToolkit(LONG_STR);\n  });\n\n  bench('es-toolkit/compat/lowerCase', () => {\n    lowerCaseToolkitCompat(LONG_STR);\n  });\n\n  bench('lodash/lowerCase', () => {\n    lowerCaseLodash(LONG_STR);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/lowerFirst.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { lowerFirst as lowerFirstToolkit_ } from 'es-toolkit';\nimport { lowerFirst as lowerFirstCompatToolkit_ } from 'es-toolkit/compat';\nimport { lowerFirst as lowerFirstLodash_ } from 'lodash';\n\nconst lowerFirstToolkit = lowerFirstToolkit_;\nconst lowerFirstCompatToolkit = lowerFirstCompatToolkit_;\nconst lowerFirstLodash = lowerFirstLodash_;\n\ndescribe('lowerFirst', () => {\n  describe('short string', () => {\n    bench('es-toolkit/lowerFirst', () => {\n      const str = 'camelCase';\n      lowerFirstToolkit(str);\n    });\n\n    bench('es-toolkit/compat/lowerFirst', () => {\n      const str = 'camelCase';\n      lowerFirstCompatToolkit(str);\n    });\n\n    bench('lodash/lowerFirst', () => {\n      const str = 'camelCase';\n      lowerFirstLodash(str);\n    });\n  });\n\n  describe('long string', () => {\n    const LONG_STR = 'camelCaseLongString'.repeat(1000);\n    bench('es-toolkit/lowerFirst', () => {\n      lowerFirstToolkit(LONG_STR);\n    });\n\n    bench('es-toolkit/compat/lowerFirst', () => {\n      lowerFirstCompatToolkit(LONG_STR);\n    });\n\n    bench('lodash/lowerFirst', () => {\n      lowerFirstLodash(LONG_STR);\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/map.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { map as mapToolkit_ } from 'es-toolkit/compat';\nimport { map as mapLodash_ } from 'lodash';\n\nconst mapToolkit = mapToolkit_;\nconst mapLodash = mapLodash_;\n\nconst generateArray = (length: number) => Array.from({ length }, (_, i) => i);\nconst generateObject = (length: number) => Object.fromEntries(generateArray(length).map(i => [`key${i}`, i]));\n\ndescribe('map/array', () => {\n  const array = [1, 2, 3, 4, 5];\n\n  bench('es-toolkit/map', () => {\n    mapToolkit(array, value => value * 2);\n  });\n\n  bench('lodash/map', () => {\n    mapLodash(array, value => value * 2);\n  });\n});\n\ndescribe('map/object', () => {\n  const obj = {\n    key1: 1,\n    key2: 2,\n    key3: 3,\n    key4: 4,\n    key5: 5,\n  };\n\n  bench('es-toolkit/map', () => {\n    mapToolkit(obj, value => value * 2);\n  });\n\n  bench('lodash/map', () => {\n    mapLodash(obj, value => value * 2);\n  });\n});\n\ndescribe('map/largeArray', () => {\n  const largeArray = generateArray(10000);\n\n  bench('es-toolkit/map', () => {\n    mapToolkit(largeArray, value => value * 2);\n  });\n\n  bench('lodash/map', () => {\n    mapLodash(largeArray, value => value * 2);\n  });\n});\n\ndescribe('map/largeObject', () => {\n  const largeObject = generateObject(10000);\n\n  bench('es-toolkit/map', () => {\n    mapToolkit(largeObject, value => value * 2);\n  });\n\n  bench('lodash/map', () => {\n    mapLodash(largeObject, value => value * 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/mapKeys.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { mapKeys as mapKeysToolkit_ } from 'es-toolkit';\nimport { mapKeys as mapKeysCompatToolkit_ } from 'es-toolkit/compat';\nimport { mapKeys as mapKeysLodash_ } from 'lodash';\n\nconst mapKeysToolkit = mapKeysToolkit_;\nconst mapKeysCompatToolkit = mapKeysCompatToolkit_;\nconst mapKeysLodash = mapKeysLodash_;\n\ndescribe('mapKeys', () => {\n  bench('es-toolkit/mapKeys', () => {\n    mapKeysToolkit({ a: 1, b: 2, c: 3 }, (_value, key) => `${key}a`);\n  });\n\n  bench('es-toolkit/compat/mapKeys', () => {\n    mapKeysCompatToolkit({ a: 1, b: 2, c: 3 }, (_value, key) => `${key}a`);\n  });\n\n  bench('lodash/mapKeys', () => {\n    mapKeysLodash({ a: 1, b: 2, c: 3 }, (_value, key) => `${key}a`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/mapValues.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { mapValues as mapValuesToolkit_ } from 'es-toolkit';\nimport { mapValues as mapValuesCompatToolkit_ } from 'es-toolkit/compat';\nimport { mapValues as mapValuesLodash_ } from 'lodash';\n\nconst mapValuesToolkit = mapValuesToolkit_;\nconst mapValuesCompatToolkit = mapValuesCompatToolkit_;\nconst mapValuesLodash = mapValuesLodash_;\n\ndescribe('mapValues', () => {\n  bench('es-toolkit/mapValues', () => {\n    mapValuesToolkit({ a: 1, b: 2, c: 3 }, value => `${value}a`);\n  });\n\n  bench('es-toolkit/compat/mapValues', () => {\n    mapValuesCompatToolkit({ a: 1, b: 2, c: 3 }, value => `${value}a`);\n  });\n\n  bench('lodash/mapValues', () => {\n    mapValuesLodash({ a: 1, b: 2, c: 3 }, value => `${value}a`);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/matches.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { matches as matchesToolkit_ } from 'es-toolkit/compat';\nimport { matches as matchesLodash_ } from 'lodash';\n\nconst matchesToolkit = matchesToolkit_;\nconst matchesLodash = matchesLodash_;\n\ndescribe('matches', () => {\n  bench('es-toolkit/matches', () => {\n    const isMatch = matchesToolkit({ a: { b: { c: 1 } } });\n    isMatch({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 });\n  });\n  bench('lodash/matches', () => {\n    const isMatch = matchesLodash({ a: { b: { c: 1 } } });\n    isMatch({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/matchesProperty.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { matchesProperty as matchesPropertyToolkit_ } from 'es-toolkit/compat';\nimport { matchesProperty as matchesPropertyLodash_ } from 'lodash';\n\nconst matchesPropertyToolkit = matchesPropertyToolkit_;\nconst matchesPropertyLodash = matchesPropertyLodash_;\n\ndescribe('matchesProperty', () => {\n  bench('es-toolkit/matchesProperty', () => {\n    const isMatch = matchesPropertyToolkit(['address', 'city'], 'New York');\n    isMatch({ address: { city: 'New York' } });\n  });\n\n  bench('lodash/matchesProperty', () => {\n    const isMatch = matchesPropertyLodash(['address', 'city'], 'New York');\n    isMatch({ address: { city: 'New York' } });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/max.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { max as maxToolkit_ } from 'es-toolkit/compat';\nimport { max as maxLodash_ } from 'lodash';\n\nconst maxToolkit = maxToolkit_;\nconst maxLodash = maxLodash_;\n\ndescribe('max', () => {\n  bench('es-toolkit/max', () => {\n    maxToolkit([1, 2, 3]);\n  });\n\n  bench('lodash/max', () => {\n    maxLodash([1, 2, 3]);\n  });\n});\n\ndescribe('max/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/max', () => {\n    maxToolkit(largeArray);\n  });\n\n  bench('lodash/max', () => {\n    maxLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/maxBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { maxBy as maxByToolkit_ } from 'es-toolkit';\nimport { maxBy as maxByCompat_ } from 'es-toolkit/compat';\nimport { maxBy as maxByLodash_ } from 'lodash';\n\nconst maxByToolkit = maxByToolkit_;\nconst maxByCompat = maxByCompat_;\nconst maxByLodash = maxByLodash_;\n\ndescribe('maxBy', () => {\n  bench('es-toolkit/maxBy', () => {\n    const people = [\n      { name: 'Mark', age: 25 },\n      { name: 'Nunu', age: 30 },\n      { name: 'Overmars', age: 20 },\n    ];\n    maxByToolkit(people, person => person.age);\n  });\n\n  bench('es-toolkit/compat/maxBy', () => {\n    const people = [\n      { name: 'Mark', age: 25 },\n      { name: 'Nunu', age: 30 },\n      { name: 'Overmars', age: 20 },\n    ];\n    maxByCompat(people, person => person.age);\n  });\n\n  bench('lodash/maxBy', () => {\n    const people = [\n      { name: 'Mark', age: 25 },\n      { name: 'Nunu', age: 30 },\n      { name: 'Overmars', age: 20 },\n    ];\n    maxByLodash(people, person => person.age);\n  });\n});\n\ndescribe('maxBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ name: `name${i}`, age: i }));\n\n  bench('es-toolkit/maxBy', () => {\n    maxByToolkit(largeArray, person => person.age);\n  });\n\n  bench('es-toolkit/compat/maxBy', () => {\n    maxByCompat(largeArray, person => person.age);\n  });\n\n  bench('lodash/maxBy', () => {\n    maxByLodash(largeArray, person => person.age);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/mean.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { mean as meanToolkit_ } from 'es-toolkit';\nimport { mean as meanToolkitCompat_ } from 'es-toolkit/compat';\nimport { mean as meanLodash_ } from 'lodash';\n\nconst meanToolkit = meanToolkit_;\nconst meanToolkitCompat = meanToolkitCompat_;\nconst meanLodash = meanLodash_;\n\ndescribe('mean', () => {\n  bench('es-toolkit/mean', () => {\n    meanToolkit([1, 2, 3]);\n  });\n\n  bench('es-toolkit/compat/mean', () => {\n    meanToolkitCompat([1, 2, 3]);\n  });\n\n  bench('lodash/mean', () => {\n    meanLodash([1, 2, 3]);\n  });\n});\n\ndescribe('mean/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/mean', () => {\n    meanToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/mean', () => {\n    meanToolkitCompat(largeArray);\n  });\n\n  bench('lodash/mean', () => {\n    meanLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/meanBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { meanBy as meanByToolkit_ } from 'es-toolkit';\nimport { meanBy as meanByToolkitCompat_ } from 'es-toolkit/compat';\nimport { meanBy as meanByLodash_ } from 'lodash';\n\nconst meanByToolkit = meanByToolkit_;\nconst meanByToolkitCompat = meanByToolkitCompat_;\nconst meanByLodash = meanByLodash_;\n\ndescribe('meanBy', () => {\n  bench('es-toolkit/meanBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    meanByToolkit(items, x => x.a);\n  });\n\n  bench('es-toolkit/compat/meanBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    meanByToolkitCompat(items, x => x.a);\n  });\n\n  bench('lodash/meanBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    meanByLodash(items, x => x.a);\n  });\n});\n\ndescribe('meanBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ a: i }));\n\n  bench('es-toolkit/meanBy', () => {\n    meanByToolkit(largeArray, x => x.a);\n  });\n\n  bench('es-toolkit/compat/meanBy', () => {\n    meanByToolkitCompat(largeArray, x => x.a);\n  });\n\n  bench('lodash/meanBy', () => {\n    meanByLodash(largeArray, x => x.a);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/memoize.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { memoize as memoizeToolkit_ } from 'es-toolkit';\nimport { memoize as memoizeToolkitCompat_ } from 'es-toolkit/compat';\nimport { memoize as memoizeLodash_ } from 'lodash';\n\nconst memoizeToolkit = memoizeToolkit_;\nconst memoizeToolkitCompat = memoizeToolkitCompat_;\nconst memoizeLodash = memoizeLodash_;\n\ndescribe('memoize', () => {\n  const object = { a: 1, b: 2, c: 3 };\n  const other = { d: 4, e: 5, f: 6 };\n  const values = (args: object) => {\n    return Object.values(args);\n  };\n  bench('es-toolkit/memoize', () => {\n    const memoized = memoizeToolkit(values);\n    memoized(object);\n    memoized(object); // cached\n    memoized(other);\n    memoized(other); // cached\n  });\n\n  bench('es-toolkit/compat/memoize', () => {\n    const memoized = memoizeToolkitCompat(values);\n    memoized(object);\n    memoized(object); // cached\n    memoized(other);\n    memoized(other); // cached\n  });\n\n  bench('lodash/memoize', () => {\n    const memoized = memoizeLodash(values);\n    memoized(object);\n    memoized(object); // cached\n    memoized(other);\n    memoized(other); // cached\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/merge.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { merge as mergeToolkit_ } from 'es-toolkit';\nimport { merge as mergeCompatToolkit_ } from 'es-toolkit/compat';\nimport { merge as mergeLodash_ } from 'lodash';\n\nconst mergeToolkit = mergeToolkit_;\nconst mergeCompatToolkit = mergeCompatToolkit_;\nconst mergeLodash = mergeLodash_;\n\nconst object = {\n  a: [{ b: 2 }, { d: 4 }],\n};\n\nconst other = {\n  a: [{ c: 3 }, { e: 5 }],\n};\n\ndescribe('merge', () => {\n  bench('lodash/merge', () => {\n    mergeLodash(object, other);\n  });\n\n  bench('es-toolkit/merge', () => {\n    mergeToolkit(object, other);\n  });\n\n  bench('es-toolkit/compat/merge', () => {\n    mergeCompatToolkit(object, other);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/mergeWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { mergeWith as mergeWithToolkit_ } from 'es-toolkit';\nimport { mergeWith as mergeWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { mergeWith as mergeWithLodash_ } from 'lodash';\n\nconst mergeWithToolkit = mergeWithToolkit_;\nconst mergeWithCompatToolkit = mergeWithCompatToolkit_;\nconst mergeWithLodash = mergeWithLodash_;\n\nconst object = { a: 1, b: 2 };\n\nconst other = { b: 3, c: 4 };\n\nconst merge = (targetValue: unknown, sourceValue: unknown) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n};\n\ndescribe('mergeWith', () => {\n  bench('lodash/mergeWith', () => {\n    mergeWithLodash(object, other, merge);\n  });\n\n  bench('es-toolkit/mergeWith', () => {\n    mergeWithToolkit(object, other, merge);\n  });\n\n  bench('es-toolkit/compat/mergeWith', () => {\n    mergeWithCompatToolkit(object, other, merge);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/method.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { method as methodToolkit_ } from 'es-toolkit/compat';\nimport { method as methodLodash_ } from 'lodash';\n\nconst methodToolkit = methodToolkit_;\nconst methodLodash = methodLodash_;\n\nconst object = {\n  a: {\n    b: function (x: number, y: number) {\n      return x + y;\n    },\n  },\n};\n\ndescribe('method', () => {\n  bench('es-toolkit/compat', () => {\n    methodToolkit('a.b', 1, 2)(object);\n  });\n\n  bench('lodash', () => {\n    methodLodash('a.b', 1, 2)(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/methodOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { methodOf as methodOfToolkit_ } from 'es-toolkit/compat';\nimport { methodOf as methodOfLodash_ } from 'lodash';\n\nconst methodOfToolkit = methodOfToolkit_;\nconst methodOfLodash = methodOfLodash_;\n\nconst object = {\n  a: {\n    b: function (x: number, y: number) {\n      return x + y;\n    },\n  },\n};\n\ndescribe('methodOf', () => {\n  bench('es-toolkit/compat', () => {\n    methodOfToolkit(object, 1, 2)('a.b');\n  });\n\n  bench('lodash', () => {\n    methodOfLodash(object, 1, 2)('a.b');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/min.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { min as minToolkit_ } from 'es-toolkit/compat';\nimport { min as minLodash_ } from 'lodash';\n\nconst minToolkit = minToolkit_;\nconst minLodash = minLodash_;\n\ndescribe('min', () => {\n  bench('es-toolkit/min', () => {\n    minToolkit([1, 2, 3]);\n  });\n\n  bench('lodash/min', () => {\n    minLodash([1, 2, 3]);\n  });\n});\n\ndescribe('min/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/min', () => {\n    minToolkit(largeArray);\n  });\n\n  bench('lodash/min', () => {\n    minLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/minBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { minBy as minByToolkit_ } from 'es-toolkit';\nimport { minBy as minByToolkitCompat_ } from 'es-toolkit/compat';\nimport { minBy as minByLodash_ } from 'lodash';\n\nconst minByToolkit = minByToolkit_;\nconst minByToolkitCompat = minByToolkitCompat_;\nconst minByLodash = minByLodash_;\n\ndescribe('minBy', () => {\n  bench('es-toolkit/minBy', () => {\n    const people = [\n      { name: 'Mark', age: 30 },\n      { name: 'Nunu', age: 20 },\n      { name: 'Overmars', age: 35 },\n    ];\n    minByToolkit(people, person => person.age);\n  });\n\n  bench('es-toolkit/compat/minBy', () => {\n    const people = [\n      { name: 'Mark', age: 30 },\n      { name: 'Nunu', age: 20 },\n      { name: 'Overmars', age: 35 },\n    ];\n    minByToolkitCompat(people, person => person.age);\n  });\n\n  bench('lodash/minBy', () => {\n    const people = [\n      { name: 'Mark', age: 30 },\n      { name: 'Nunu', age: 20 },\n      { name: 'Overmars', age: 35 },\n    ];\n    minByLodash(people, person => person.age);\n  });\n});\n\ndescribe('minBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ name: `name${i}`, age: i }));\n\n  bench('es-toolkit/minBy', () => {\n    minByToolkit(largeArray, person => person.age);\n  });\n\n  bench('es-toolkit/compat/minBy', () => {\n    minByToolkitCompat(largeArray, person => person.age);\n  });\n\n  bench('lodash/minBy', () => {\n    minByLodash(largeArray, person => person.age);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/multiply.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { multiply as multiplyToolkitCompat_ } from 'es-toolkit/compat';\nimport { multiply as multiplyLodash_ } from 'lodash';\n\nconst multiplyToolkitCompat = multiplyToolkitCompat_;\nconst multiplyLodash = multiplyLodash_;\n\ndescribe('multiply function benchmark', () => {\n  bench('es-toolkit/compat/multiply', () => {\n    multiplyToolkitCompat(3, 4);\n    multiplyToolkitCompat(-3, -4);\n    multiplyToolkitCompat(NaN, 3);\n    multiplyToolkitCompat(3, NaN);\n    multiplyToolkitCompat(NaN, NaN);\n  });\n\n  bench('lodash/multiply', () => {\n    multiplyLodash(3, 4);\n    multiplyLodash(-3, -4);\n    multiplyLodash(NaN, 3);\n    multiplyLodash(3, NaN);\n    multiplyLodash(NaN, NaN);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/negate.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { negate as negateToolkit_ } from 'es-toolkit';\nimport { negate as negateCompatToolkit_ } from 'es-toolkit/compat';\nimport { negate as negateLodash_ } from 'lodash';\n\nconst negateToolkit = negateToolkit_;\nconst negateCompatToolkit = negateCompatToolkit_;\nconst negateLodash = negateLodash_;\n\ndescribe('compact', () => {\n  bench('es-toolkit', () => {\n    negateToolkit(() => true)();\n  });\n\n  bench('es-toolkit/compat', () => {\n    negateCompatToolkit(() => true)();\n  });\n\n  bench('lodash', () => {\n    negateLodash(() => true)();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/noop.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { noop as noopToolkit_ } from 'es-toolkit';\nimport { noop as noopLodash_ } from 'lodash';\n\nconst noopToolkit = noopToolkit_;\nconst noopLodash = noopLodash_;\n\ndescribe('noop', () => {\n  bench('es-toolkit/noop', () => {\n    noopToolkit();\n  });\n\n  bench('lodash/noop', () => {\n    noopLodash();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/nth.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { nth as nthToolkitCompat_ } from 'es-toolkit/compat';\nimport { nth as nthLodash_ } from 'lodash';\n\nconst nthToolkitCompat = nthToolkitCompat_;\nconst nthLodash = nthLodash_;\n\ndescribe('nth', () => {\n  const array = [1, 2, 3];\n\n  bench('es-toolkit/compat/nth', () => {\n    nthToolkitCompat(array, 1);\n    nthToolkitCompat(array, -1);\n  });\n\n  bench('lodash/nth', () => {\n    nthLodash(array, 1);\n    nthLodash(array, -1);\n  });\n});\n\ndescribe('nth/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/compat/nth', () => {\n    nthToolkitCompat(largeArray, 1);\n    nthToolkitCompat(largeArray, -1);\n  });\n\n  bench('lodash/nth', () => {\n    nthLodash(largeArray, 1);\n    nthLodash(largeArray, -1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/nthArg.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { nthArg as nthArgToolkitCompat_ } from 'es-toolkit/compat';\nimport { nthArg as nthArgLodash_ } from 'lodash';\n\nconst nthArgToolkitCompat = nthArgToolkitCompat_;\nconst nthArgLodash = nthArgLodash_;\n\ndescribe('nthArg', () => {\n  const array = [1, 2, 3];\n\n  bench('es-toolkit/compat/nthArg', () => {\n    nthArgToolkitCompat(0)(...array);\n    nthArgToolkitCompat(-1)(...array);\n  });\n\n  bench('lodash/nthArg', () => {\n    nthArgLodash(0)(...array);\n    nthArgLodash(-1)(...array);\n  });\n});\n\ndescribe('nthArg/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/compat/nthArg', () => {\n    nthArgToolkitCompat(0)(...largeArray);\n    nthArgToolkitCompat(-1)(...largeArray);\n  });\n\n  bench('lodash/nthArg', () => {\n    nthArgLodash(0)(...largeArray);\n    nthArgLodash(-1)(...largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/omit.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { omit as omitToolkit_ } from 'es-toolkit';\nimport { omit as omitToolkitCompat_ } from 'es-toolkit/compat';\nimport { omit as omitLodash_ } from 'lodash';\n\nconst omitToolkit = omitToolkit_;\nconst omitToolkitCompat = omitToolkitCompat_;\nconst omitLodash = omitLodash_;\n\ndescribe('omit: simple', () => {\n  bench('es-toolkit/omit', () => {\n    omitToolkit({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n\n  bench('es-toolkit/compat/omit', () => {\n    omitToolkitCompat({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n\n  bench('lodash/omit', () => {\n    omitLodash({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n});\n\ndescribe('omit: complex', () => {\n  bench('es-toolkit/compat/omit', () => {\n    omitToolkitCompat({ foo: { bar: { baz: 1 } }, quux: 2, a: { b: 3 } }, ['foo.bar.baz', 'quux']);\n  });\n\n  bench('lodash/omit', () => {\n    omitLodash({ foo: { bar: { baz: 1 } }, quux: 2, a: { b: 3 } }, ['foo.bar.baz', 'quux']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/omitBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { omitBy as omitByToolkit_ } from 'es-toolkit';\nimport { omitBy as omitByToolkitCompat_ } from 'es-toolkit/compat';\nimport { omitBy as omitByLodash_ } from 'lodash';\n\nconst omitByToolkit = omitByToolkit_;\nconst omitByToolkitCompat = omitByToolkitCompat_;\nconst omitByLodash = omitByLodash_;\n\ndescribe('omitBy', () => {\n  const obj = { a: 1, b: 'omit', c: 3, d: 'test', e: 0 };\n  const shouldOmit = (value: number | string) => typeof value === 'string';\n\n  bench('es-toolkit/omitBy', () => {\n    omitByToolkit(obj, shouldOmit);\n  });\n\n  bench('es-toolkit/compat/omitBy', () => {\n    omitByToolkitCompat(obj, shouldOmit);\n  });\n\n  bench('lodash/omitBy', () => {\n    omitByLodash(obj, shouldOmit);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/once.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { once as onceToolkit_ } from 'es-toolkit';\nimport { once as onceToolkitCompat_ } from 'es-toolkit/compat';\nimport { once as onceLodash_ } from 'lodash';\n\nconst onceToolkit = onceToolkit_;\nconst onceToolkitCompat = onceToolkitCompat_;\nconst onceLodash = onceLodash_;\n\ndescribe('once', () => {\n  bench('es-toolkit/once', () => {\n    onceToolkit(() => undefined);\n  });\n\n  bench('es-toolkit/compat/once', () => {\n    onceToolkitCompat(() => undefined);\n  });\n\n  bench('lodash/once', () => {\n    onceLodash(() => undefined);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/orderBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { orderBy as orderByToolkit_ } from 'es-toolkit';\nimport { orderBy as orderByToolkitCompat_ } from 'es-toolkit/compat';\nimport { orderBy as orderByLodash_ } from 'lodash';\n\nconst orderByToolkit = orderByToolkit_;\nconst orderByToolkitCompat = orderByToolkitCompat_;\nconst orderByLodash = orderByLodash_;\n\nconst users = [\n  { user: 'fred', age: 48, nested: { user: 'fred' } },\n  { user: 'barney', age: 34, nested: { user: 'barney' } },\n  { user: 'fred', age: 40, nested: { user: 'fred' } },\n  { user: 'barney', age: 36, nested: { user: 'bar' } },\n];\n\ndescribe('orderBy', () => {\n  bench('es-toolkit/orderBy', () => {\n    orderByToolkit(users, ['user', 'age'], ['asc', 'desc']);\n    orderByToolkit(users, [user => user.user, user => user.age], ['asc', 'desc']);\n  });\n\n  bench('es-toolkit/compat/orderBy', () => {\n    orderByToolkitCompat(users, ['user', 'age'], ['asc', 'desc']);\n    orderByToolkitCompat(users, [user => user.user, user => user.age], ['asc', 'desc']);\n  });\n\n  bench('lodash/orderBy', () => {\n    orderByLodash(users, ['user', 'age'], ['asc', 'desc']);\n    orderByLodash(users, [user => user.user, user => user.age], ['asc', 'desc']);\n  });\n});\n\ndescribe('orderBy (nested property names)', () => {\n  bench('es-toolkit/compat/orderBy', () => {\n    orderByToolkitCompat(users, [['nested', 'user'], ['age']], ['asc', 'desc']);\n  });\n\n  bench('lodash/orderBy', () => {\n    orderByLodash(users, [['nested', 'user'], ['age']], ['asc', 'desc']);\n  });\n});\n\ndescribe('orderBy (property path)', () => {\n  bench('es-toolkit/compat/orderBy', () => {\n    orderByToolkitCompat(users, ['nested.user', 'age'], ['asc', 'desc']);\n  });\n  bench('lodash/orderBy', () => {\n    orderByLodash(users, ['nested.user', 'age'], ['asc', 'desc']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/over.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { over as overToolkitCompat_ } from 'es-toolkit/compat';\nimport { over as overLodash_ } from 'lodash';\n\nconst overToolkitCompat = overToolkitCompat_;\nconst overLodash = overLodash_;\n\ndescribe('over - math functions', () => {\n  const mathFunctions = [Math.max, Math.min];\n  bench('es-toolkit/over - math functions', () => {\n    const func = overToolkitCompat(mathFunctions);\n    func(1, 2, 3, 4);\n    func(-10, 20, -5, 15);\n    func(3.14, 2.71, 1.414, 1.732);\n  });\n\n  bench('lodash/over - math functions', () => {\n    const func = overLodash(mathFunctions);\n    func(1, 2, 3, 4);\n    func(-10, 20, -5, 15);\n    func(3.14, 2.71, 1.414, 1.732);\n  });\n});\n\ndescribe('over - string functions', () => {\n  const greet = (name: string) => `Hello, ${name}!`;\n  const shout = (name: string) => `HEY, ${name.toUpperCase()}!!!`;\n  bench('es-toolkit/over - string functions', () => {\n    const func = overToolkitCompat([greet, shout]);\n    func('world');\n    func('javascript');\n    func('es-toolkit');\n  });\n\n  bench('lodash/over - string functions', () => {\n    const func = overLodash([greet, shout]);\n    func('world');\n    func('javascript');\n    func('es-toolkit');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/overArgs.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { overArgs as overArgsToolkitCompat_ } from 'es-toolkit/compat';\nimport { overArgs as overArgsLodash_ } from 'lodash';\n\nconst overArgsToolkitCompat = overArgsToolkitCompat_;\nconst overArgsLodash = overArgsLodash_;\n\nfunction doubled(n: number) {\n  return n * 2;\n}\n\nfunction square(n: number) {\n  return n * n;\n}\n\ndescribe('overArgs - basic function transforms', () => {\n  bench('es-toolkit/overArgs - basic function transforms', () => {\n    const func = overArgsToolkitCompat((x, y) => [x, y], [doubled, square]);\n    func(5, 3);\n    func(10, 5);\n    func(20, 7);\n  });\n\n  bench('lodash/overArgs - basic function transforms', () => {\n    const func = overArgsLodash((x, y) => [x, y], [doubled, square]);\n    func(5, 3);\n    func(10, 5);\n    func(20, 7);\n  });\n});\n\ndescribe('overArgs - property shorthand', () => {\n  const user1 = { name: 'John', age: 30 };\n  const user2 = { name: 'Jane', age: 25 };\n\n  bench('es-toolkit/overArgs - property shorthand', () => {\n    const func = overArgsToolkitCompat((name, age) => `${name} is ${age} years old`, ['name', 'age'] as any[]);\n    func(user1, user2);\n    func(user2, user1);\n  });\n\n  bench('lodash/overArgs - property shorthand', () => {\n    const func = overArgsLodash((name, age) => `${name} is ${age} years old`, ['name', 'age'] as any[]);\n    func(user1, user2);\n    func(user2, user1);\n  });\n});\n\ndescribe('overArgs - many arguments', () => {\n  const transforms = [doubled, square, doubled, square, doubled];\n\n  bench('es-toolkit/overArgs - many arguments', () => {\n    const func = overArgsToolkitCompat((a, b, c, d, e, f) => [a, b, c, d, e, f], transforms);\n    func(1, 2, 3, 4, 5, 6);\n    func(6, 5, 4, 3, 2, 1);\n  });\n\n  bench('lodash/overArgs - many arguments', () => {\n    const func = overArgsLodash((a, b, c, d, e, f) => [a, b, c, d, e, f], transforms);\n    func(1, 2, 3, 4, 5, 6);\n    func(6, 5, 4, 3, 2, 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/overEvery.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { overEvery as overEveryToolkit_ } from 'es-toolkit/compat';\nimport { overEvery as overEveryLodash_ } from 'lodash';\n\nconst overEveryToolkit = overEveryToolkit_;\nconst overEveryLodash = overEveryLodash_;\n\ndescribe('overEvery', () => {\n  bench('es-toolkit/overEvery', () => {\n    const overEvery = overEveryToolkit([Boolean, Number.isFinite]);\n    overEvery('1');\n  });\n\n  bench('lodash/overEvery', () => {\n    const overEvery = overEveryLodash([Boolean, Number.isFinite]);\n    overEvery('1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/overSome.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { overSome as overSomeToolkit_ } from 'es-toolkit/compat';\nimport { overSome as overSomeLodash_ } from 'lodash';\n\nconst overSomeToolkit = overSomeToolkit_;\nconst overSomeLodash = overSomeLodash_;\n\ndescribe('overSome', () => {\n  bench('es-toolkit/overSome', () => {\n    const isValid = overSomeToolkit(\n      value => typeof value === 'string',\n      value => typeof value === 'number'\n    );\n    isValid(1);\n  });\n\n  bench('lodash/overSome', () => {\n    const isValid = overSomeLodash(\n      value => typeof value === 'string',\n      value => typeof value === 'number'\n    );\n    isValid(1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pad.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pad as padToolkit_ } from 'es-toolkit';\nimport { pad as padToolkitCompat_ } from 'es-toolkit/compat';\nimport { pad as padLodash_ } from 'lodash';\n\nconst padToolkit = padToolkit_;\nconst padToolkitCompat = padToolkitCompat_;\nconst padLodash = padLodash_;\n\ndescribe('pad', () => {\n  bench('es-toolkit/pad', () => {\n    const str = 'abc';\n    padToolkit(str, 6, '_-');\n  });\n\n  bench('es-toolkit/compat/pad', () => {\n    const str = 'abc';\n    padToolkitCompat(str, 6, '_-');\n  });\n\n  bench('lodash/pad', () => {\n    const str = 'abc';\n    padLodash(str, 6, '_-');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/padEnd.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { padEnd as padEndToolkit_ } from 'es-toolkit/compat';\nimport { padEnd as padEndLodash_ } from 'lodash';\n\nconst padEndToolkit = padEndToolkit_;\nconst padEndLodash = padEndLodash_;\n\ndescribe('padEnd', () => {\n  bench('es-toolkit/padEnd', () => {\n    const str = 'abc';\n    padEndToolkit(str, 6, '_-');\n  });\n\n  bench('lodash/padEnd', () => {\n    const str = 'abc';\n    padEndLodash(str, 6, '_-');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/padStart.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { padStart as padStartToolkit_ } from 'es-toolkit/compat';\nimport { padStart as padStartLodash_ } from 'lodash';\n\nconst padStartToolkit = padStartToolkit_;\nconst padStartLodash = padStartLodash_;\n\ndescribe('padStart', () => {\n  bench('es-toolkit/padStart', () => {\n    const str = 'abc';\n    padStartToolkit(str, 6, '_-');\n  });\n\n  bench('lodash/padStart', () => {\n    const str = 'abc';\n    padStartLodash(str, 6, '_-');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/parseInt.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { parseInt as parseIntToolkit_ } from 'es-toolkit/compat';\nimport { parseInt as parseIntLodash_ } from 'lodash';\n\nconst parseIntToolkit = parseIntToolkit_;\nconst parseIntLodash = parseIntLodash_;\n\ndescribe('parseInt', () => {\n  bench('es-toolkit/parseInt', () => {\n    parseIntToolkit('10');\n  });\n\n  bench('lodash/parseInt', () => {\n    parseIntLodash('10');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/partial.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { partial as partialToolkit_ } from 'es-toolkit';\nimport { partial as partialToolkitCompat_ } from 'es-toolkit/compat';\nimport { partial as partialLodash_ } from 'lodash';\n\nconst partialToolkit = partialToolkit_;\nconst partialToolkitCompat = partialToolkitCompat_;\nconst partialLodash = partialLodash_;\n\nconst fn = function () {\n  // eslint-disable-next-line prefer-rest-params\n  return Array.from(arguments);\n};\n\ndescribe('partial - without placeholder', () => {\n  bench('es-toolkit/partial - without placeholder', () => {\n    partialToolkit(fn, 'a');\n  });\n\n  bench('es-toolkit/compat/partial - without placeholder', () => {\n    partialToolkitCompat(fn, 'a');\n  });\n\n  bench('lodash/partial - without placeholder', () => {\n    partialLodash(fn, 'a');\n  });\n});\n\ndescribe('partial - with placeholder', () => {\n  bench('es-toolkit/partial - with placeholder', () => {\n    const { placeholder } = partialToolkit;\n    partialToolkit(fn, placeholder, 'b', placeholder);\n  });\n\n  bench('es-toolkit/compat/partial - with placeholder', () => {\n    const { placeholder } = partialToolkitCompat;\n    partialToolkitCompat(fn, placeholder, 'b', placeholder);\n  });\n\n  bench('lodash/partial - with placeholder', () => {\n    const { placeholder } = partialLodash;\n    partialLodash(fn, placeholder, 'b', placeholder);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/partialRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { partialRight as partialRightToolkit_ } from 'es-toolkit';\nimport { partialRight as partialRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { partialRight as partialRightLodash_ } from 'lodash';\n\nconst partialRightToolkit = partialRightToolkit_;\nconst partialRightToolkitCompat = partialRightToolkitCompat_;\nconst partialRightLodash = partialRightLodash_;\n\nconst fn = function () {\n  // eslint-disable-next-line prefer-rest-params\n  return Array.from(arguments);\n};\n\ndescribe('partial - without placeholder', () => {\n  bench('es-toolkit/partialRight - without placeholder', () => {\n    partialRightToolkit(fn, 'a');\n  });\n\n  bench('es-toolkit/compat/partialRight - without placeholder', () => {\n    partialRightToolkitCompat(fn, 'a');\n  });\n\n  bench('lodash/partialRight - without placeholder', () => {\n    partialRightLodash(fn, 'a');\n  });\n});\n\ndescribe('partial - with placeholder', () => {\n  bench('es-toolkit/partialRight - with placeholder', () => {\n    const { placeholder } = partialRightToolkit;\n    partialRightToolkit(fn, placeholder, 'b', placeholder);\n  });\n\n  bench('es-toolkit/compat/partialRight - with placeholder', () => {\n    const { placeholder } = partialRightToolkitCompat;\n    partialRightToolkitCompat(fn, placeholder, 'b', placeholder);\n  });\n\n  bench('lodash/partialRight - with placeholder', () => {\n    const { placeholder } = partialRightLodash;\n    partialRightLodash(fn, placeholder, 'b', placeholder);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/partition.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { partition as partitionToolkit_ } from 'es-toolkit';\nimport { partition as partitionToolkitCompat_ } from 'es-toolkit/compat';\nimport { partition as partitionLodash_ } from 'lodash';\n\nconst partitionToolkit = partitionToolkit_;\nconst partitionToolkitCompat = partitionToolkitCompat_;\nconst partitionLodash = partitionLodash_;\n\ndescribe('partition', () => {\n  bench('es-toolkit/partition', () => {\n    partitionToolkit([1, 2, 3, 4, 5], x => x < 3);\n  });\n\n  bench('es-toolkit/partition/compat', () => {\n    partitionToolkitCompat([1, 2, 3, 4, 5], x => x < 3);\n  });\n\n  bench('lodash/partition', () => {\n    partitionLodash([1, 2, 3], x => x < 3);\n  });\n});\n\ndescribe('partition/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, index) => index);\n\n  bench('es-toolkit/partition', () => {\n    partitionToolkit(largeArray, x => x < 5000);\n  });\n\n  bench('es-toolkit/partition/compat', () => {\n    partitionToolkitCompat(largeArray, x => x < 5000);\n  });\n\n  bench('lodash/partition', () => {\n    partitionLodash(largeArray, x => x < 5000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pick.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pick as pickToolkit_ } from 'es-toolkit';\nimport { pick as pickCompatToolkit_ } from 'es-toolkit/compat';\nimport { pick as pickLodash_ } from 'lodash';\n\nconst pickToolkit = pickToolkit_;\nconst pickCompatToolkit = pickCompatToolkit_;\nconst pickLodash = pickLodash_;\n\ndescribe('pick', () => {\n  bench('es-toolkit/pick', () => {\n    pickToolkit({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n\n  bench('es-toolkit/compat/pick', () => {\n    pickCompatToolkit({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n\n  bench('lodash/pick', () => {\n    pickLodash({ foo: 1, bar: 2, baz: 3 }, ['foo', 'bar']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pickBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pickBy as pickByToolkit_ } from 'es-toolkit';\nimport { pickBy as pickByCompat_ } from 'es-toolkit/compat';\nimport { pickBy as pickByLodash_ } from 'lodash';\n\nconst pickByToolkit = pickByToolkit_;\nconst pickByCompat = pickByCompat_;\nconst pickByLodash = pickByLodash_;\n\ndescribe('pickBy', () => {\n  bench('es-toolkit/pickBy', () => {\n    pickByToolkit({ foo: 1, bar: '2', baz: 3 }, value => typeof value === 'number');\n  });\n\n  bench('es-toolkit/compat/pickBy', () => {\n    pickByCompat({ foo: 1, bar: '2', baz: 3 }, value => typeof value === 'number');\n  });\n\n  bench('lodash/pickBy', () => {\n    pickByLodash({ foo: 1, bar: '2', baz: 3 }, value => typeof value === 'number');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/property.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { property as propertyToolkit_ } from 'es-toolkit/compat';\nimport { property as propertyLodash_ } from 'lodash';\n\nconst propertyToolkit = propertyToolkit_;\nconst propertyLodash = propertyLodash_;\n\ndescribe('property', () => {\n  bench('es-toolkit/property', () => {\n    const getValue = propertyToolkit('a.b');\n    getValue({ 'a.b': 1, a: { b: 1 } });\n  });\n\n  bench('lodash/property', () => {\n    const getValue = propertyLodash('a.b');\n    getValue({ 'a.b': 1, a: { b: 1 } });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/propertyOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { propertyOf as propertyOfToolkit_ } from 'es-toolkit/compat';\nimport { propertyOf as propertyOfLodash_ } from 'lodash';\n\nconst propertyOfToolkit = propertyOfToolkit_;\nconst propertyOfLodash = propertyOfLodash_;\n\ndescribe('propertyOf', () => {\n  bench('es-toolkit/propertyOf', () => {\n    const getValue = propertyOfToolkit({ 'a.b': 1, a: { b: 1 } });\n    getValue('a.b');\n  });\n\n  bench('lodash/propertyOf', () => {\n    const getValue = propertyOfLodash({ 'a.b': 1, a: { b: 1 } });\n    getValue('a.b');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pull.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pull as pullToolkit_ } from 'es-toolkit/compat';\nimport { pull as pullLodash_ } from 'lodash';\n\nconst pullToolkit = pullToolkit_;\nconst pullLodash = pullLodash_;\n\ndescribe('pull array size 100', () => {\n  const array = [...Array(100)].map((_, i) => i);\n  const even = [...Array(50)].map((_, i) => i * 2);\n\n  bench('es-toolkit/pull', () => {\n    pullToolkit([...array], ...even);\n  });\n\n  bench('lodash/pull', () => {\n    pullLodash([...array], ...even);\n  });\n});\n\ndescribe('pull array size 1000', () => {\n  const array = [...Array(1000)].map((_, i) => i);\n  const even = [...Array(500)].map((_, i) => i * 2);\n\n  bench('es-toolkit/pull', () => {\n    pullToolkit([...array], ...even);\n  });\n\n  bench('lodash/pull', () => {\n    pullLodash([...array], ...even);\n  });\n});\n\ndescribe('pull array size 10000', () => {\n  const array = [...Array(10000)].map((_, i) => i);\n  const even = [...Array(5000)].map((_, i) => i * 2);\n\n  bench('es-toolkit/pull', () => {\n    pullToolkit([...array], ...even);\n  });\n\n  bench('lodash/pull', () => {\n    pullLodash([...array], ...even);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pullAllBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pullAllBy as pullAllByToolkitCompat_ } from 'es-toolkit/compat';\nimport { pullAllBy as pullAllByLodash_ } from 'lodash';\n\nconst pullAllByToolkitCompat = pullAllByToolkitCompat_;\nconst pullAllByLodash = pullAllByLodash_;\n\nconst array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }, { x: 2 }, { x: 3 }];\n\ndescribe('pullAllBy', () => {\n  bench('es-toolkit/compat/pullAllBy', () => {\n    pullAllByToolkitCompat(array, [{ x: 1 }, { x: 3 }], 'x');\n  });\n\n  bench('lodash/pullAllBy', () => {\n    pullAllByLodash(array, [{ x: 1 }, { x: 3 }], 'x');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pullAllWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pullAllWith as pullAllWithToolkit_ } from 'es-toolkit/compat';\nimport { pullAllWith as pullAllWithLodash_ } from 'lodash';\n\nconst pullAllWithToolkit = pullAllWithToolkit_;\nconst pullAllWithLodash = pullAllWithLodash_;\n\ndescribe('pullAllWith', () => {\n  const array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 4 }, { x: 5 }];\n  const valuesToRemove = [{ x: 2 }, { x: 4 }];\n\n  const comparator = (a: { x: number }, b: { x: number }) => a.x === b.x;\n\n  bench('es-toolkit/pullAllWith', () => {\n    pullAllWithToolkit([...array], valuesToRemove, comparator);\n  });\n\n  bench('lodash/pullAllWith', () => {\n    pullAllWithLodash([...array], valuesToRemove, comparator);\n  });\n});\n\ndescribe('pullAllWith/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ x: i }));\n  const valuesToRemove = Array.from({ length: 1000 }, (_, i) => ({ x: i + 1000 }));\n\n  const comparator = (a: { x: number }, b: { x: number }) => a.x === b.x;\n\n  bench('es-toolkit/pullAllWith', () => {\n    pullAllWithToolkit([...largeArray], valuesToRemove, comparator);\n  });\n\n  bench('lodash/pullAllWith', () => {\n    pullAllWithLodash([...largeArray], valuesToRemove, comparator);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/pullAt.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { pullAt as pullAtToolkit_ } from 'es-toolkit';\nimport { pullAt as pullAtToolkitCompat_ } from 'es-toolkit/compat';\nimport { pullAt as pullAtLodash_ } from 'lodash';\n\nconst pullAtToolkit = pullAtToolkit_;\nconst pullAtToolkitCompat = pullAtToolkitCompat_;\nconst pullAtLodash = pullAtLodash_;\n\ndescribe('pullAt', () => {\n  bench('es-toolkit/pullAt', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const indexes = [3, 5, 1, 2];\n    pullAtToolkit(array, indexes);\n  });\n\n  bench('es-toolkit/compat/pullAt', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const indexes = [3, 5, 1, 2];\n    pullAtToolkitCompat(array, indexes);\n  });\n\n  bench('lodash/pullAt', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const indexes = [3, 5, 1, 2];\n    pullAtLodash(array, indexes);\n  });\n});\n\ndescribe('pullAt/largeArray', () => {\n  bench('es-toolkit/pullAt', () => {\n    const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n    const largeIndexes = Array.from({ length: 1000 }, (_, i) => i + 1000);\n    pullAtToolkit(largeArray, largeIndexes);\n  });\n\n  bench('es-toolkit/compat/pullAt', () => {\n    const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n    const largeIndexes = Array.from({ length: 1000 }, (_, i) => i + 1000);\n    pullAtToolkitCompat(largeArray, largeIndexes);\n  });\n\n  bench('lodash/pullAt', () => {\n    const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n    const largeIndexes = Array.from({ length: 1000 }, (_, i) => i + 1000);\n    pullAtLodash(largeArray, largeIndexes);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/random.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { random as randomToolkit_ } from 'es-toolkit';\nimport { random as randomCompatToolkit_ } from 'es-toolkit/compat';\nimport { random as randomLodash_ } from 'lodash';\n\nconst randomToolkit = randomToolkit_;\nconst randomCompatToolkit = randomCompatToolkit_;\nconst randomLodash = randomLodash_;\n\ndescribe('random', () => {\n  bench('es-toolkit/random', () => {\n    randomToolkit(1, 10);\n  });\n\n  bench('es-toolkit/compat/random', () => {\n    randomCompatToolkit(1, 10);\n  });\n\n  bench('lodash/random', () => {\n    randomLodash(1, 10, true);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/randomInt.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { randomInt as randomIntToolkit_ } from 'es-toolkit';\nimport { random as randomLodash_ } from 'lodash';\n\nconst randomIntToolkit = randomIntToolkit_;\nconst randomLodash = randomLodash_;\n\ndescribe('randomInt', () => {\n  bench('es-toolkit/randomInt', () => {\n    randomIntToolkit(1, 10);\n  });\n\n  bench('lodash/randomInt', () => {\n    randomLodash(1, 10, false);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/range.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { range as rangeToolkit_ } from 'es-toolkit';\nimport { range as rangeCompatToolkit_ } from 'es-toolkit/compat';\nimport { range as rangeLodash_ } from 'lodash';\n\nconst rangeToolkit = rangeToolkit_;\nconst rangeCompatToolkit = rangeCompatToolkit_;\nconst rangeLodash = rangeLodash_;\n\ndescribe('range', () => {\n  bench('es-toolkit/range', () => {\n    rangeToolkit(0, 100, 1);\n  });\n\n  bench('es-toolkit/compat/range', () => {\n    rangeCompatToolkit(0, 100, 1);\n  });\n\n  bench('lodash/range', () => {\n    rangeLodash(0, 100, 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/rangeRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { rangeRight as rangeRightToolkit_ } from 'es-toolkit';\nimport { rangeRight as rangeRightCompatToolkiTt_ } from 'es-toolkit/compat';\nimport { rangeRight as rangeRightLodash_ } from 'lodash';\n\nconst rangeRightToolkit = rangeRightToolkit_;\nconst rangeRightCompatToolkit = rangeRightCompatToolkiTt_;\nconst rangeRightLodash = rangeRightLodash_;\n\ndescribe('rangeRight', () => {\n  bench('es-toolkit/rangeRight', () => {\n    rangeRightToolkit(0, 100, 1);\n  });\n\n  bench('es-toolkit/compat/rangeRight', () => {\n    rangeRightCompatToolkit(0, 100, 1);\n  });\n\n  bench('lodash/rangeRight', () => {\n    rangeRightLodash(0, 100, 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/rearg.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { rearg as reargToolkit_ } from 'es-toolkit/compat';\nimport { rearg as reargLodash_ } from 'lodash';\n\nconst reargToolkit = reargToolkit_;\nconst reargLodash = reargLodash_;\n\ndescribe('rearg', () => {\n  function fn() {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  bench('es-toolkit/rearg', () => {\n    reargToolkit(fn, [2, 0, 1]);\n  });\n\n  bench('lodash/rearg', () => {\n    reargLodash(fn, [2, 0, 1]);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/reduce.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { reduce as reduceToolkitCompat_ } from 'es-toolkit/compat';\nimport { reduce as reduceLodash_ } from 'lodash';\n\nconst reduceToolkitCompat = reduceToolkitCompat_;\nconst reduceLodash = reduceLodash_;\n\nconst array = [1, 2, 3, 4, 5];\n\ndescribe('reduce', () => {\n  bench('es-toolkit/compat/reduce', () => {\n    reduceToolkitCompat(array, (acc, x) => acc + x, 0);\n  });\n\n  bench('lodash/reduce', () => {\n    reduceLodash(array, (acc, x) => acc + x, 0);\n  });\n});\n\ndescribe('reduce - large array', () => {\n  const largeArray = Array.from({ length: 1e6 }, (_, i) => i);\n\n  bench('es-toolkit/compat/reduce', () => {\n    reduceToolkitCompat(largeArray, (acc, x) => acc + x, 0);\n  });\n\n  bench('lodash/reduce', () => {\n    reduceLodash(largeArray, (acc, x) => acc + x, 0);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/reduceRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { reduceRight as reduceRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { reduceRight as reduceRightLodash_ } from 'lodash';\n\nconst reduceRightToolkitCompat = reduceRightToolkitCompat_;\nconst reduceRightLodash = reduceRightLodash_;\n\nconst array = [1, 2, 3, 4, 5];\n\ndescribe('reduceRight', () => {\n  bench('es-toolkit/compat/reduceRight', () => {\n    reduceRightToolkitCompat(array, (acc, x) => acc + x, 0);\n  });\n\n  bench('lodash/reduceRight', () => {\n    reduceRightLodash(array, (acc, x) => acc + x, 0);\n  });\n});\n\ndescribe('reduceRight - large array', () => {\n  const largeArray = Array.from({ length: 1e6 }, (_, i) => i);\n\n  bench('es-toolkit/compat/reduceRight', () => {\n    reduceRightToolkitCompat(largeArray, (acc, x) => acc + x, 0);\n  });\n\n  bench('lodash/reduceRight', () => {\n    reduceRightLodash(largeArray, (acc, x) => acc + x, 0);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/reject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { reject as rejectToolkit_ } from 'es-toolkit/compat';\nimport { reject as rejectLodash_ } from 'lodash';\n\nconst rejectToolkit = rejectToolkit_;\nconst rejectLodash = rejectLodash_;\n\nconst arr = [\n  { a: 0, b: true },\n  { a: 1, b: true },\n  { a: 0, b: false },\n];\n\ndescribe('reject', () => {\n  bench('es-toolkit/reject', () => {\n    rejectToolkit([1, 2, 3], number => number % 2 === 0);\n    rejectToolkit(arr, { b: true });\n    rejectToolkit(arr, ['a', 1]);\n    rejectToolkit(arr, items => items.b);\n    rejectToolkit({ a: 1, b: 2, c: 3 }, 'b');\n  });\n\n  bench('lodash/reject', () => {\n    rejectLodash([1, 2, 3], number => number % 2 === 0);\n    rejectLodash(arr, { b: true });\n    rejectLodash(arr, ['a', 1]);\n    rejectLodash(arr, items => items.b);\n    rejectLodash({ a: 1, b: 2, c: 3 }, 'b');\n  });\n});\n\ndescribe('reject/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ a: i, b: i % 2 === 0 }));\n\n  bench('es-toolkit/reject', () => {\n    rejectToolkit(largeArray, { b: true });\n  });\n\n  bench('lodash/reject', () => {\n    rejectLodash(largeArray, { b: true });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/repeat.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { repeat as repeatToolkit_ } from 'es-toolkit/compat';\nimport { repeat as repeatLodash_ } from 'lodash';\n\nconst repeatToolkit = repeatToolkit_;\nconst repeatLodash = repeatLodash_;\n\ndescribe('repeat', () => {\n  bench('es-toolkit/repeat', () => {\n    repeatToolkit('abc', 2);\n  });\n\n  bench('lodash/repeat', () => {\n    repeatLodash('abc', 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/replace.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { replace as replaceToolkitCompat_ } from 'es-toolkit/compat';\nimport { replace as replaceLodash_ } from 'lodash';\n\nconst replaceToolkitCompat = replaceToolkitCompat_;\nconst replaceLodash = replaceLodash_;\n\ndescribe('replace', () => {\n  bench('es-toolkit/compat/replace', () => {\n    replaceToolkitCompat('abc', 'de', '123');\n    replaceToolkitCompat('abc', /[bd]/g, '-');\n    replaceToolkitCompat('abc', 'de', substring => substring.toUpperCase());\n    replaceToolkitCompat('abc', /[bd]/g, substring => substring.toUpperCase());\n  });\n\n  bench('lodash/replace', () => {\n    replaceLodash('abc', 'de', '123');\n    replaceLodash('abc', /[bd]/g, '-');\n    replaceLodash('abc', 'de', substring => substring.toUpperCase());\n    replaceLodash('abc', /[bd]/g, substring => substring.toUpperCase());\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/rest.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { rest as restToolkit_ } from 'es-toolkit';\nimport { rest as restCompat_ } from 'es-toolkit/compat';\nimport { rest as restLodash_ } from 'lodash';\n\nconst restToolkit = restToolkit_;\nconst restCompat = restCompat_;\nconst restLodash = restLodash_;\n\ndescribe('rest', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  bench('es-toolkit/rest', () => {\n    restToolkit(fn, 1);\n  });\n\n  bench('es-toolkit/compat/rest', () => {\n    restCompat(fn, 1);\n  });\n\n  bench('lodash/rest', () => {\n    restLodash(fn, 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/result.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { result as resultToolkit_ } from 'es-toolkit/compat';\nimport { result as resultLodash_ } from 'lodash';\n\nconst resultToolkit = resultToolkit_;\nconst resultLodash = resultLodash_;\n\ndescribe('result', () => {\n  const object = {\n    a: 1,\n    b: () => 'b',\n    c: { d: { e: 5 } },\n    f: function () {\n      return this.g;\n    },\n    g: 10,\n    arr: [1, 2, 3],\n  };\n\n  bench('es-toolkit/result', () => {\n    resultToolkit(object, 'a');\n    resultToolkit(object, 'b');\n    resultToolkit(object, 'c.d.e');\n    resultToolkit(object, 'f');\n    resultToolkit(object, 'arr[2]');\n    resultToolkit(object, 'nonexistent', 'default');\n    resultToolkit(null, 'a', 'default');\n  });\n\n  bench('lodash/result', () => {\n    resultLodash(object, 'a');\n    resultLodash(object, 'b');\n    resultLodash(object, 'c.d.e');\n    resultLodash(object, 'f');\n    resultLodash(object, 'arr[2]');\n    resultLodash(object, 'nonexistent', 'default');\n    resultLodash(null, 'a', 'default');\n  });\n});\n\ndescribe('result/largeObject', () => {\n  const largeObject = Object.fromEntries(\n    Array.from({ length: 1000 }, (_, i) => [`key${i}`, i % 2 === 0 ? () => i : { nested: { value: i } }])\n  );\n\n  bench('es-toolkit/result', () => {\n    resultToolkit(largeObject, 'key500');\n    resultToolkit(largeObject, 'key501.nested.value');\n    resultToolkit(largeObject, 'key999.nested.value', 'default');\n  });\n\n  bench('lodash/result', () => {\n    resultLodash(largeObject, 'key500');\n    resultLodash(largeObject, 'key501.nested.value');\n    resultLodash(largeObject, 'key999.nested.value', 'default');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/reverse.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { reverse as reverseCompat_ } from 'es-toolkit/compat';\nimport { reverse as reverseLodash_ } from 'lodash';\n\nconst reverseCompat = reverseCompat_;\nconst reverseLodash = reverseLodash_;\n\nconst testArray = Array.from({ length: 1000 }, (_, i) => i);\n\ndescribe('Reverse function performance tests', () => {\n  bench('es-toolkit compat reverse', () => {\n    const arrayCopy = [...testArray];\n    reverseCompat(arrayCopy);\n  });\n\n  bench('lodash reverse', () => {\n    const arrayCopy = [...testArray];\n    reverseLodash(arrayCopy);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/round.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { round as roundToolkit_ } from 'es-toolkit';\nimport { round as roundCompat_ } from 'es-toolkit/compat';\nimport { round as roundLodash_ } from 'lodash';\n\nconst roundToolkit = roundToolkit_;\nconst roundCompat = roundCompat_;\nconst roundLodash = roundLodash_;\n\ndescribe('round', () => {\n  bench('es-toolkit/round', () => {\n    roundToolkit(1.2345, 2);\n  });\n\n  bench('es-toolkit/compat/round', () => {\n    roundCompat(1.2345, 2);\n  });\n\n  bench('lodash/round', () => {\n    roundLodash(1.2345, 2);\n  });\n});\n\ndescribe('round (compat)', () => {\n  bench('es-toolkit/compat/round', () => {\n    roundCompat(4.006);\n    roundCompat(4.006, 0);\n    roundCompat(4.016, 2);\n    roundCompat(4.1, 2);\n    roundCompat(4.4, 2);\n    roundCompat(4160, -2);\n    roundCompat(4.006, NaN);\n    roundCompat(4.016, 2.6);\n    roundCompat(5e1, 2);\n  });\n\n  bench('lodash/round', () => {\n    roundLodash(4.006);\n    roundLodash(4.006, 0);\n    roundLodash(4.016, 2);\n    roundLodash(4.1, 2);\n    roundLodash(4.4, 2);\n    roundLodash(4160, -2);\n    roundLodash(4.006, NaN);\n    roundLodash(4.016, 2.6);\n    roundLodash(5e1, 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sample.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sample as sampleToolkit_ } from 'es-toolkit';\nimport { sample as sampleToolkitCompat } from 'es-toolkit/compat';\nimport { sample as sampleLodash_ } from 'lodash';\n\nconst sampleToolkit = sampleToolkit_;\nconst sampleLodash = sampleLodash_;\n\ndescribe('sample', () => {\n  bench('es-toolkit/sample', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleToolkit(array);\n  });\n\n  bench('es-toolkit/compat/sample', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleToolkitCompat(array);\n  });\n\n  bench('lodash/sample', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleLodash(array);\n  });\n});\n\ndescribe('sample/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/sample', () => {\n    sampleToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/sample', () => {\n    sampleToolkitCompat(largeArray);\n  });\n\n  bench('lodash/sample', () => {\n    sampleLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sampleSize.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sampleSize as sampleSizeToolkit_ } from 'es-toolkit';\nimport { sampleSize as sampleSizeToolkitCompat_ } from 'es-toolkit/compat';\nimport { sampleSize as sampleSizeLodash_ } from 'lodash';\n\nconst sampleSizeToolkit = sampleSizeToolkit_;\nconst sampleSizeToolkitCompat = sampleSizeToolkitCompat_;\nconst sampleSizeLodash = sampleSizeLodash_;\n\ndescribe('sampleSize', () => {\n  bench('es-toolkit/sampleSize', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleSizeToolkit(array, 3);\n  });\n\n  bench('es-toolkit/compat/sampleSize', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleSizeToolkitCompat(array, 3);\n  });\n\n  bench('lodash/sampleSize', () => {\n    const array = [1, 2, 3, 4, 5];\n    sampleSizeLodash(array, 3);\n  });\n});\n\ndescribe('sampleSize/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/sampleSize', () => {\n    sampleSizeToolkit(largeArray, 100);\n  });\n\n  bench('es-toolkit/compat/sampleSize', () => {\n    sampleSizeToolkitCompat(largeArray, 100);\n  });\n\n  bench('lodash/sampleSize', () => {\n    sampleSizeLodash(largeArray, 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/set.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { set as setToolkitCompat_ } from 'es-toolkit/compat';\nimport { set as lodashSet_ } from 'lodash';\n\nconst setToolkitCompat = setToolkitCompat_;\nconst lodashSet = lodashSet_;\n\ndescribe('set - dot', () => {\n  bench('es-toolkit/set', () => {\n    setToolkitCompat({}, 'a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z', 1);\n  });\n\n  bench('lodash/set', () => {\n    lodashSet({}, 'a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z', 1);\n  });\n});\n\ndescribe('set - array', () => {\n  bench('es-toolkit/set', () => {\n    setToolkitCompat({}, 'a[0][1][2][3][4][5][6]', 1);\n  });\n  bench('lodash/set', () => {\n    lodashSet({}, 'a[0][1][2][3][4][5][6]', 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/setWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { setWith as setWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { isObject } from 'es-toolkit/compat';\nimport { setWith as setWithLodash_ } from 'lodash';\n\nconst setWithToolkitCompat = setWithToolkitCompat_;\nconst setWithLodash = setWithLodash_;\n\ndescribe('setWith - simple path', () => {\n  bench('es-toolkit/setWith', () => {\n    setWithToolkitCompat({}, 'a.b.c', 1);\n  });\n\n  bench('lodash/setWith', () => {\n    setWithLodash({}, 'a.b.c', 1);\n  });\n});\n\ndescribe('setWith - with customizer', () => {\n  const customizer = (value: unknown) => (isObject(value) ? undefined : {});\n\n  bench('es-toolkit/setWith', () => {\n    setWithToolkitCompat({}, '[0][1][2]', 3, customizer);\n  });\n\n  bench('lodash/setWith', () => {\n    setWithLodash({}, '[0][1][2]', 3, customizer);\n  });\n});\n\ndescribe('setWith - complex path', () => {\n  bench('es-toolkit/setWith', () => {\n    setWithToolkitCompat({}, 'a[0].b.c[0][1].d', 4);\n  });\n\n  bench('lodash/setWith', () => {\n    setWithLodash({}, 'a[0].b.c[0][1].d', 4);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/shuffle.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { shuffle as shuffleToolkit_ } from 'es-toolkit';\nimport { shuffle as shuffleToolkitCompat_ } from 'es-toolkit/compat';\nimport { shuffle as shuffleLodash_ } from 'lodash';\n\nconst shuffleToolkit = shuffleToolkit_;\nconst shuffleToolkitCompat = shuffleToolkitCompat_;\nconst shuffleLodash = shuffleLodash_;\n\ndescribe('shuffle', () => {\n  bench('es-toolkit/shuffle', () => {\n    const array = [1, 2, 3, 4, 5];\n    shuffleToolkit(array);\n  });\n\n  bench('es-toolkit/compat/shuffle', () => {\n    const array = [1, 2, 3, 4, 5];\n    shuffleToolkitCompat(array);\n  });\n\n  bench('lodash/shuffle', () => {\n    const array = [1, 2, 3, 4, 5];\n    shuffleLodash(array);\n  });\n});\n\ndescribe('shuffle/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/shuffle', () => {\n    shuffleToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/shuffle', () => {\n    shuffleToolkitCompat(largeArray);\n  });\n\n  bench('lodash/shuffle', () => {\n    shuffleLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/size.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { size as sizeToolkit_ } from 'es-toolkit/compat';\nimport { size as sizeLodash_ } from 'lodash';\n\nconst sizeToolkit = sizeToolkit_;\nconst sizeLodash = sizeLodash_;\n\ndescribe('size', () => {\n  bench('es-toolkit/size', () => {\n    sizeToolkit([1, 2, 3, 4]);\n    sizeToolkit('hello');\n    sizeToolkit({ a: 1, b: 2, c: 3 });\n    sizeToolkit([]);\n    sizeToolkit('');\n    sizeToolkit({});\n    sizeToolkit(new Set([1, 2, 3]));\n    sizeToolkit(\n      new Map([\n        ['a', 1],\n        ['b', 2],\n        ['c', 3],\n      ])\n    );\n  });\n\n  bench('lodash/size', () => {\n    sizeLodash([1, 2, 3, 4]);\n    sizeLodash('hello');\n    sizeLodash({ a: 1, b: 2, c: 3 });\n    sizeLodash([]);\n    sizeLodash('');\n    sizeLodash({});\n    sizeLodash(new Set([1, 2, 3]));\n    sizeLodash(\n      new Map([\n        ['a', 1],\n        ['b', 2],\n        ['c', 3],\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/slice.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { slice as sliceToolkitCompat_ } from 'es-toolkit/compat';\nimport { slice as sliceLodash_ } from 'lodash';\n\nconst sliceToolkitCompat = sliceToolkitCompat_;\nconst sliceLodash = sliceLodash_;\n\ndescribe('slice', () => {\n  const array = Array(1000);\n  bench('es-toolkit/compat/slice', () => {\n    sliceToolkitCompat(array);\n    sliceToolkitCompat(array, 1);\n    sliceToolkitCompat(array, 1, 2);\n    sliceToolkitCompat(array, 1, 1000);\n  });\n\n  bench('lodash/slice', () => {\n    sliceLodash(array);\n    sliceLodash(array, 1);\n    sliceLodash(array, 1, 2);\n    sliceLodash(array, 1, 1000);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/snakeCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { snakeCase as snakeCaseToolkit_ } from 'es-toolkit';\nimport { snakeCase as snakeCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { snakeCase as snakeCaseLodash_ } from 'lodash';\n\nconst snakeCaseToolkit = snakeCaseToolkit_;\nconst snakeCaseToolkitCompat = snakeCaseToolkitCompat_;\nconst snakeCaseLodash = snakeCaseLodash_;\n\ndescribe('snakeCase', () => {\n  bench('es-toolkit/snakeCase', () => {\n    snakeCaseToolkit('hello world');\n    snakeCaseToolkit('--foo--bar__baz 123');\n    snakeCaseToolkit('123numericValues');\n    snakeCaseToolkit('XMLHttpRequest');\n    snakeCaseToolkit('hello-World_of XML_httpRequest');\n  });\n\n  bench('es-toolkit/compat/snakeCase', () => {\n    snakeCaseToolkitCompat('hello world');\n    snakeCaseToolkitCompat('--foo--bar__baz 123');\n    snakeCaseToolkitCompat('123numericValues');\n    snakeCaseToolkitCompat('XMLHttpRequest');\n    snakeCaseToolkitCompat('hello-World_of XML_httpRequest');\n  });\n\n  bench('lodash/snakeCase', () => {\n    snakeCaseLodash('hello world');\n    snakeCaseLodash('--foo--bar__baz 123');\n    snakeCaseLodash('123numericValues');\n    snakeCaseLodash('XMLHttpRequest');\n    snakeCaseLodash('hello-World_of XML_httpRequest');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/some.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { some as someToolkit_ } from 'es-toolkit/compat';\nimport { some as someLodash_ } from 'lodash';\n\nconst someToolkit = someToolkit_;\nconst someLodash = someLodash_;\n\ndescribe('some', () => {\n  bench('es-toolkit/some', () => {\n    someToolkit([1, 2, 3], number => number % 2 === 0);\n    someToolkit([1, 'string'], Number);\n    someToolkit([false, false, false], value => value);\n    someToolkit([1, false, 'string'], () => true);\n  });\n\n  bench('lodash/some', () => {\n    someLodash([1, 2, 3], number => number % 2 === 0);\n    someLodash([1, 'string'], Number);\n    someLodash([false, false, false], value => value);\n    someLodash([1, false, 'string'], () => true);\n  });\n});\n\ndescribe('some/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, index) => index);\n  const predicate = (number: number) => number > 5000;\n\n  bench('es-toolkit/some', () => {\n    someToolkit(largeArray, predicate);\n  });\n\n  bench('lodash/some', () => {\n    someLodash(largeArray, predicate);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sortBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sortBy as sortByToolkit_ } from 'es-toolkit';\nimport { sortBy as sortByToolkitCompat_ } from 'es-toolkit/compat';\nimport { sortBy as sortByLodash_ } from 'lodash';\n\nconst sortByToolkit = sortByToolkit_;\nconst sortByToolkitCompat = sortByToolkitCompat_;\nconst sortByLodash = sortByLodash_;\n\nconst users = [\n  { user: 'fred', age: 48, nested: { user: 'fred' } },\n  { user: 'barney', age: 34, nested: { user: 'barney' } },\n  { user: 'fred', age: 40, nested: { user: 'fred' } },\n  { user: 'barney', age: 36, nested: { user: 'bar' } },\n];\n\ndescribe('sortBy', () => {\n  bench('es-toolkit/sortBy', () => {\n    sortByToolkit(users, ['user', 'age']);\n    sortByToolkit(users, [user => user.user, user => user.age]);\n  });\n\n  bench('es-toolkit/compat/sortBy', () => {\n    sortByToolkitCompat(users, ['user', 'age']);\n    sortByToolkitCompat(users, [user => user.user, user => user.age]);\n  });\n\n  bench('lodash/sortBy', () => {\n    sortByLodash(users, ['user', 'age']);\n    sortByLodash(users, [user => user.user, user => user.age]);\n  });\n});\n\ndescribe('sortBy (nested property names)', () => {\n  bench('es-toolkit/compat/sortBy', () => {\n    sortByToolkitCompat(users, [['nested', 'user'], ['age']]);\n  });\n\n  bench('lodash/sortBy', () => {\n    sortByLodash(users, [['nested', 'user'], ['age']]);\n  });\n});\n\ndescribe('sortBy (property path)', () => {\n  bench('es-toolkit/compat/sortBy', () => {\n    sortByToolkitCompat(users, ['nested.user', 'age']);\n  });\n  bench('lodash/sortBy', () => {\n    sortByLodash(users, ['nested.user', 'age']);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sortedIndex.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sortedIndex as sortedIndexToolkitCompat_ } from 'es-toolkit/compat';\nimport { sortedIndex as sortedIndexLodash_ } from 'lodash';\n\nconst sortedIndexToolkitCompat = sortedIndexToolkitCompat_;\nconst sortedIndexLodash = sortedIndexLodash_;\n\ndescribe('sortedIndex', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, i) => i * 2);\n  const array = [...largeArray, NaN, undefined, null];\n\n  bench('es-toolkit/compat', () => {\n    sortedIndexToolkitCompat(array, 39);\n    sortedIndexToolkitCompat(array, NaN);\n    sortedIndexToolkitCompat(array, undefined);\n    sortedIndexToolkitCompat(array, null);\n  });\n  bench('lodash/sortedIndex', () => {\n    sortedIndexLodash(array, 39);\n    sortedIndexLodash(array, NaN);\n    sortedIndexLodash(array, undefined);\n    sortedIndexLodash(array, null);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sortedIndexBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sortedIndexBy as sortedIndexByToolkitCompat_ } from 'es-toolkit/compat';\nimport { sortedIndexBy as sortedIndexByLodash_ } from 'lodash';\n\nconst sortedIndexByToolkitCompat = sortedIndexByToolkitCompat_;\nconst sortedIndexByLodash = sortedIndexByLodash_;\n\ndescribe('sortedIndexBy', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, i) => ({ x: i * 2 }));\n  const array = [...largeArray, NaN, undefined, null];\n\n  bench('es-toolkit/compat', () => {\n    // @ts-expect-error 'v' is possibly 'null' or 'undefined'.\n    sortedIndexByToolkitCompat(array, { x: 39 }, v => v.x);\n    sortedIndexByToolkitCompat(array, NaN, v => v);\n    sortedIndexByToolkitCompat(array, undefined, v => v);\n    sortedIndexByToolkitCompat(array, null, v => v);\n  });\n  bench('lodash/sortedIndex', () => {\n    // @ts-expect-error 'v' is possibly 'null' or 'undefined'.\n    sortedIndexByLodash(array, { x: 39 }, v => v.x);\n    sortedIndexByLodash(array, NaN, v => v);\n    sortedIndexByLodash(array, undefined, v => v);\n    sortedIndexByLodash(array, null, v => v);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sortedIndexOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sortedIndexOf as sortedIndexOfByTookitCompat_ } from 'es-toolkit/compat';\nimport { sortedIndexOf as sortedIndexOfLodash_ } from 'lodash';\n\nconst sortedIndexOfToolkitCompat = sortedIndexOfByTookitCompat_;\nconst sortedIndexOfLodash = sortedIndexOfLodash_;\n\ndescribe('sortedIndexOf', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, i) => ({ x: i * 2 }));\n  const array = [...largeArray, NaN, undefined, 23, null];\n\n  bench('es-toolkit/compat', () => {\n    sortedIndexOfToolkitCompat(array, 40);\n    sortedIndexOfToolkitCompat(array, 23);\n    sortedIndexOfToolkitCompat(array, NaN);\n    sortedIndexOfToolkitCompat(array, undefined);\n    sortedIndexOfToolkitCompat(array, null);\n  });\n  bench('lodash/sortedIndex', () => {\n    sortedIndexOfLodash(array, 40);\n    sortedIndexOfLodash(array, 23);\n    sortedIndexOfLodash(array, NaN);\n    sortedIndexOfLodash(array, undefined);\n    sortedIndexOfLodash(array, null);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sortedLastIndexOf.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sortedLastIndexOf as sortedLastIndexOfByTookitCompat_ } from 'es-toolkit/compat';\nimport { sortedLastIndexOf as sortedLastIndexOfLodash_ } from 'lodash';\n\nconst sortedLastIndexOfToolkitCompat = sortedLastIndexOfByTookitCompat_;\nconst sortedLastIndexOfLodash = sortedLastIndexOfLodash_;\n\ndescribe('sortedLastIndexOf', () => {\n  const largeArray = Array.from({ length: 1000000 }, (_, i) => ({ x: i * 2 }));\n  const array = [...largeArray, NaN, undefined, 23, null];\n\n  bench('es-toolkit/compat', () => {\n    sortedLastIndexOfToolkitCompat(array, 40);\n    sortedLastIndexOfToolkitCompat(array, 23);\n    sortedLastIndexOfToolkitCompat(array, NaN);\n    sortedLastIndexOfToolkitCompat(array, undefined);\n    sortedLastIndexOfToolkitCompat(array, null);\n  });\n  bench('lodash/sortedIndex', () => {\n    sortedLastIndexOfLodash(array, 40);\n    sortedLastIndexOfLodash(array, 23);\n    sortedLastIndexOfLodash(array, NaN);\n    sortedLastIndexOfLodash(array, undefined);\n    sortedLastIndexOfLodash(array, null);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/split.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { split as splitToolkitCompat_ } from 'es-toolkit/compat';\nimport { split as splitLodash_ } from 'lodash';\n\nconst splitToolkitCompat = splitToolkitCompat_;\nconst splitLodash = splitLodash_;\n\ndescribe('split', () => {\n  const str = 'a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z';\n\n  bench('es-toolkit/compat', () => {\n    splitToolkitCompat(str, '-');\n  });\n\n  bench('lodash', () => {\n    splitLodash(str, '-');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/spread.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { spread as spreadToolkit_ } from 'es-toolkit';\nimport { spread as spreadCompat_ } from 'es-toolkit/compat';\nimport { spread as spreadLodash_ } from 'lodash';\n\nconst spreadToolkit = spreadToolkit_;\nconst spreadCompat = spreadCompat_;\nconst spreadLodash = spreadLodash_;\n\ndescribe('spread', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  bench('es-toolkit/spread', () => {\n    spreadToolkit(fn);\n  });\n\n  bench('es-toolkit/compat/spread', () => {\n    spreadCompat(fn, 1);\n  });\n\n  bench('lodash/spread', () => {\n    spreadLodash(fn, 1);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/startCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { startCase as startCaseToolkit_ } from 'es-toolkit';\nimport { startCase as startCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { startCase as startCaseLodash_ } from 'lodash';\n\nconst startCaseToolkit = startCaseToolkit_;\nconst startCaseToolkitCompat = startCaseToolkitCompat_;\nconst startCaseLodash = startCaseLodash_;\n\ndescribe('startCase', () => {\n  bench('es-toolkit/startCase', () => {\n    startCaseToolkit('hello world');\n    startCaseToolkit('--foo--bar__baz 123');\n    startCaseToolkit('123numericValues');\n    startCaseToolkit('XMLHttpRequest');\n    startCaseToolkit('hello-World_of XML_httpRequest');\n  });\n\n  bench('es-toolkit/compat/startCase', () => {\n    startCaseToolkitCompat('hello world');\n    startCaseToolkitCompat('--foo--bar__baz 123');\n    startCaseToolkitCompat('123numericValues');\n    startCaseToolkitCompat('XMLHttpRequest');\n    startCaseToolkitCompat('hello-World_of XML_httpRequest');\n  });\n\n  bench('lodash/startCase', () => {\n    startCaseLodash('hello world');\n    startCaseLodash('--foo--bar__baz 123');\n    startCaseLodash('123numericValues');\n    startCaseLodash('XMLHttpRequest');\n    startCaseLodash('hello-World_of XML_httpRequest');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/startsWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { startsWith as startsWithToolkit_ } from 'es-toolkit/compat';\nimport { startsWith as startsWithLodash_ } from 'lodash';\n\nconst startsWithToolkit = startsWithToolkit_;\nconst startsWithLodash = startsWithLodash_;\n\ndescribe('startsWith', () => {\n  bench('es-toolkit/startsWith', () => {\n    const str = 'fooBar';\n    startsWithToolkit(str, 'foo');\n    startsWithToolkit(str, 'Bar', 3);\n  });\n\n  bench('lodash/startsWith', () => {\n    const str = 'fooBar';\n    startsWithLodash(str, 'foo');\n    startsWithLodash(str, 'Bar', 3);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/subtract.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { subtract as subtractToolkitCompat_ } from 'es-toolkit/compat';\nimport { subtract as subtractLodash_ } from 'lodash';\n\nconst subtractToolkitCompat = subtractToolkitCompat_;\nconst subtractLodash = subtractLodash_;\n\ndescribe('subtract function benchmark', () => {\n  bench('es-toolkit/compat/subtract', () => {\n    subtractToolkitCompat(2, 3);\n    subtractToolkitCompat(-1, -5);\n    subtractToolkitCompat(NaN, 3);\n    subtractToolkitCompat(3, NaN);\n    subtractToolkitCompat(NaN, NaN);\n  });\n\n  bench('lodash/subtract', () => {\n    subtractLodash(2, 3);\n    subtractLodash(-1, -5);\n    subtractLodash(NaN, 3);\n    subtractLodash(3, NaN);\n    subtractLodash(NaN, NaN);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sum.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sum as sumToolkit_ } from 'es-toolkit';\nimport { sum as sumToolkitCompat_ } from 'es-toolkit/compat';\nimport { sum as sumLodash_ } from 'lodash';\n\nconst sumToolkit = sumToolkit_;\nconst sumToolkitCompat = sumToolkitCompat_;\nconst sumLodash = sumLodash_;\n\ndescribe('sum', () => {\n  bench('es-toolkit/sum', () => {\n    sumToolkit([1, 2, 3]);\n  });\n\n  bench('es-toolkit/compat/sum', () => {\n    sumToolkitCompat([1, 2, 3]);\n  });\n\n  bench('lodash/sum', () => {\n    sumLodash([1, 2, 3]);\n  });\n});\n\ndescribe('sum/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/sum', () => {\n    sumToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/sum', () => {\n    sumToolkitCompat(largeArray);\n  });\n\n  bench('lodash/sum', () => {\n    sumLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/sumBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { sumBy as sumByToolkit_ } from 'es-toolkit';\nimport { sumBy as sumByToolkitCompat_ } from 'es-toolkit/compat';\nimport { sumBy as sumByLodash_ } from 'lodash';\n\nconst sumByToolkit = sumByToolkit_;\nconst sumByToolkitCompat = sumByToolkitCompat_;\nconst sumByLodash = sumByLodash_;\n\ndescribe('sumBy', () => {\n  bench('es-toolkit/sumBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    sumByToolkit(items, x => x.a);\n  });\n\n  bench('es-toolkit/compat/sumBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    sumByToolkitCompat(items, x => x.a);\n  });\n\n  bench('lodash/sumBy', () => {\n    const items = [{ a: 1 }, { a: 2 }, { a: 3 }];\n    sumByLodash(items, x => x.a);\n  });\n});\n\ndescribe('sumBy/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ({ a: i }));\n\n  bench('es-toolkit/sumBy', () => {\n    sumByToolkit(largeArray, x => x.a);\n  });\n\n  bench('es-toolkit/compat/sumBy', () => {\n    sumByToolkitCompat(largeArray, x => x.a);\n  });\n\n  bench('lodash/sumBy', () => {\n    sumByLodash(largeArray, x => x.a);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/tail.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { tail as tailToolkit_ } from 'es-toolkit';\nimport { tail as tailToolkitCompat_ } from 'es-toolkit/compat';\nimport { tail as tailLodash_ } from 'lodash';\n\nconst tailToolkit = tailToolkit_;\nconst tailToolkitCompat = tailToolkitCompat_;\nconst tailLodash = tailLodash_;\n\ndescribe('tail', () => {\n  bench('es-toolkit/tail', () => {\n    tailToolkit([1, 2, 3, 4]);\n  });\n\n  bench('es-toolkit/compat/tail', () => {\n    tailToolkitCompat([1, 2, 3, 4]);\n  });\n\n  bench('lodash/tail', () => {\n    tailLodash([1, 2, 3, 4]);\n  });\n});\n\ndescribe('tail/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/tail', () => {\n    tailToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/tail', () => {\n    tailToolkitCompat(largeArray);\n  });\n\n  bench('lodash/tail', () => {\n    tailLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/take.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { take as takeToolkit_ } from 'es-toolkit';\nimport { take as takeToolkitCompat_ } from 'es-toolkit/compat';\nimport { take as takeLodash_ } from 'lodash';\n\nconst takeToolkit = takeToolkit_;\nconst takeToolkitCompat = takeToolkitCompat_;\nconst takeLodash = takeLodash_;\n\ndescribe('take', () => {\n  bench('es-toolkit/take', () => {\n    takeToolkit([1, 2, 3, 4], 2);\n  });\n\n  bench('es-toolkit/compat/take', () => {\n    takeToolkitCompat([1, 2, 3, 4], 2);\n  });\n\n  bench('lodash/take', () => {\n    takeLodash([1, 2, 3, 4], 2);\n  });\n});\n\ndescribe('take/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/take', () => {\n    takeToolkit(largeArray, 100);\n  });\n\n  bench('es-toolkit/compat/take', () => {\n    takeToolkitCompat(largeArray, 100);\n  });\n\n  bench('lodash/take', () => {\n    takeLodash(largeArray, 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/takeRight.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { takeRight as takeRightToolkit_ } from 'es-toolkit';\nimport { takeRight as takeRightToolkitCompat_ } from 'es-toolkit/compat';\nimport { takeRight as takeRightLodash_ } from 'lodash';\n\nconst takeRightToolkit = takeRightToolkit_;\nconst takeRightToolkitCompat = takeRightToolkitCompat_;\nconst takeRightLodash = takeRightLodash_;\n\ndescribe('takeRight', () => {\n  bench('es-toolkit/takeRight', () => {\n    takeRightToolkit([1, 2, 3, 4], 2);\n  });\n\n  bench('es-toolkit/compat/takeRight', () => {\n    takeRightToolkitCompat([1, 2, 3, 4], 2);\n  });\n\n  bench('lodash/takeRight', () => {\n    takeRightLodash([1, 2, 3, 4], 2);\n  });\n});\n\ndescribe('takeRight/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/takeRight', () => {\n    takeRightToolkit(largeArray, 100);\n  });\n\n  bench('es-toolkit/compat/takeRight', () => {\n    takeRightToolkitCompat(largeArray, 100);\n  });\n\n  bench('lodash/takeRight', () => {\n    takeRightLodash(largeArray, 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/takeRightWhile.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { takeRightWhile as takeRightWhileToolkit_ } from 'es-toolkit';\nimport { takeRightWhile as takeRightWhileCompatToolkit_ } from 'es-toolkit/compat';\nimport { takeRightWhile as takeRightWhileLodash_ } from 'lodash';\n\nconst takeRightWhileToolkit = takeRightWhileToolkit_;\nconst takeRightWhileCompatToolkit = takeRightWhileCompatToolkit_;\nconst takeRightWhileLodash = takeRightWhileLodash_;\n\ndescribe('takeRightWhile', () => {\n  bench('es-toolkit/takeRightWhile', () => {\n    takeRightWhileToolkit([5, 4, 3, 2, 1], n => n < 4);\n  });\n\n  bench('es-toolkit/compat/takeRightWhile', () => {\n    takeRightWhileCompatToolkit([5, 4, 3, 2, 1], n => n < 4);\n  });\n\n  bench('lodash/takeRightWhile', () => {\n    takeRightWhileLodash([5, 4, 3, 2, 1], n => n < 4);\n  });\n});\n\ndescribe('takeRightWhile/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/takeRightWhile', () => {\n    takeRightWhileToolkit(largeArray, n => n < 100);\n  });\n\n  bench('es-toolkit/compat/takeRightWhile', () => {\n    takeRightWhileCompatToolkit(largeArray, n => n < 100);\n  });\n\n  bench('lodash/takeRightWhile', () => {\n    takeRightWhileLodash(largeArray, n => n < 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/takeWhile.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { takeWhile as takeWhileToolkit_ } from 'es-toolkit';\nimport { takeWhile as takeWhileCompatToolkit_ } from 'es-toolkit/compat';\nimport { takeWhile as takeWhileLodash_ } from 'lodash';\n\nconst takeWhileToolkit = takeWhileToolkit_;\nconst takeWhileCompatToolkit = takeWhileCompatToolkit_;\nconst takeWhileLodash = takeWhileLodash_;\n\ndescribe('takeWhile', () => {\n  bench('es-toolkit/takeWhile', () => {\n    takeWhileToolkit([5, 4, 3, 2, 1], n => n < 4);\n  });\n\n  bench('es-toolkit/compat/takeWhile', () => {\n    takeWhileCompatToolkit([5, 4, 3, 2, 1], n => n < 4);\n  });\n\n  bench('lodash/takeWhile', () => {\n    takeWhileLodash([5, 4, 3, 2, 1], n => n < 4);\n  });\n});\n\ndescribe('takeWhile/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/takeWhile', () => {\n    takeWhileToolkit(largeArray, n => n < 100);\n  });\n\n  bench('es-toolkit/compat/takeWhile', () => {\n    takeWhileCompatToolkit(largeArray, n => n < 100);\n  });\n\n  bench('lodash/takeWhile', () => {\n    takeWhileLodash(largeArray, n => n < 100);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/template.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { template as templateToolkitCompat_ } from 'es-toolkit/compat';\nimport { template as templateLodash_ } from 'lodash';\n\nconst templateToolkit = templateToolkitCompat_;\nconst templateLodash = templateLodash_;\n\ndescribe('template (interpolate)', () => {\n  bench('es-toolkit/template', () => {\n    const compiled = templateToolkit('hello <%= user %>!');\n\n    compiled({ user: 'fred' });\n    compiled({ user: 'pebbles' });\n  });\n\n  bench('lodash/template', () => {\n    const compiled = templateLodash('hello <%= user %>!');\n    compiled({ user: 'fred' });\n    compiled({ user: 'pebbles' });\n  });\n});\n\ndescribe('template (evaluate)', () => {\n  bench('es-toolkit/template', () => {\n    const compiled = templateToolkit('<% if (user === \"fred\") { %>hello fred!<% } else { %>hello pebbles!<% } %>');\n    compiled({ user: 'fred' });\n    compiled({ user: 'pebbles' });\n  });\n\n  bench('lodash/template', () => {\n    const compiled = templateLodash('<% if (user === \"fred\") { %>hello fred!<% } else { %>hello pebbles!<% } %>');\n    compiled({ user: 'fred' });\n    compiled({ user: 'pebbles' });\n  });\n});\n\ndescribe('template (escape)', () => {\n  bench('es-toolkit/template', () => {\n    const compiled = templateToolkit('<%- user %>');\n\n    compiled({ user: '<script>' });\n    compiled({ user: '<script type=\"text/javascript\">alert(\"xss\");</script>' });\n  });\n\n  bench('lodash/template', () => {\n    const compiled = templateLodash('<%- user %>');\n    compiled({ user: '<script>' });\n    compiled({ user: '<script type=\"text/javascript\">alert(\"xss\");</script>' });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/throttle.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { throttle as throttleToolkit_ } from 'es-toolkit';\nimport { throttle as throttleCompatToolkit_ } from 'es-toolkit/compat';\nimport { throttle as throttleLodash_ } from 'lodash';\n\nconst throttleToolkit = throttleToolkit_;\nconst throttleCompatToolkit = throttleCompatToolkit_;\nconst throttleLodash = throttleLodash_;\n\ndescribe('throttle', () => {\n  bench('es-toolkit/throttle', () => {\n    throttleToolkit(() => undefined, 1000)();\n  });\n\n  bench('es-toolkit/compat/throttle', () => {\n    throttleCompatToolkit(() => undefined, 1000)();\n  });\n\n  bench('lodash/throttle', () => {\n    throttleLodash(() => undefined, 1000)();\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/times.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { times as timesCompatToolkit_ } from 'es-toolkit/compat';\nimport { times as timesLodash_ } from 'lodash';\n\nconst timesCompatToolkit = timesCompatToolkit_;\nconst timesLodash = timesLodash_;\n\ndescribe('times', () => {\n  bench('es-toolkit/compat/times', () => {\n    timesCompatToolkit(1000, i => i * 2);\n  });\n\n  bench('lodash/times', () => {\n    timesLodash(1000, i => i * 2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toArray.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toArray as toArrayToolkitCompat_ } from 'es-toolkit/compat';\nimport { toArray as toArrayLodash_ } from 'lodash';\n\nconst toArrayToolkitCompat = toArrayToolkitCompat_;\nconst toArrayLodash = toArrayLodash_;\n\ndescribe('toArray', () => {\n  bench('es-toolkit/compat/toArray', () => {\n    toArrayToolkitCompat({ a: 1, b: 2 });\n    toArrayToolkitCompat('abc');\n    toArrayToolkitCompat(1);\n    toArrayToolkitCompat(null);\n    toArrayToolkitCompat(\n      new Map([\n        ['a', 1],\n        ['b', 2],\n      ])\n    );\n  });\n\n  bench('lodash/toArray', () => {\n    toArrayLodash({ a: 1, b: 2 });\n    toArrayLodash('abc');\n    toArrayLodash(1);\n    toArrayLodash(null);\n    toArrayLodash(\n      new Map([\n        ['a', 1],\n        ['b', 2],\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toCamelCaseKeys.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toCamelCaseKeys as toCamelCaseKeysToolkit_ } from 'es-toolkit';\nimport lodashFp from 'lodash/fp';\n\nconst toCamelCaseKeysToolkit = toCamelCaseKeysToolkit_;\n\nconst toCamelCaseKeysWithLodashFp = <T extends Record<string, any>>(obj: T) => {\n  return lodashFp.mapKeys(lodashFp.camelCase)(obj);\n};\n\nconst testObject = {\n  user_id: 1,\n  first_name: 'John',\n  last_name: 'Doe',\n  address_info: {\n    street_name: 'Main St',\n    zip_code: '12345',\n    contact_details: {\n      phone_number: '123-456-7890',\n      email_address: 'john.doe@example.com',\n    },\n  },\n  order_history: [\n    { order_id: 1001, order_date: '2023-01-15', total_amount: 125.99 },\n    { order_id: 1002, order_date: '2023-02-22', total_amount: 89.5 },\n  ],\n};\n\ndescribe('toCamelCaseKeys', () => {\n  bench('es-toolkit/toCamelCaseKeys (deep nested)', () => {\n    toCamelCaseKeysToolkit(testObject);\n  });\n\n  bench('lodash/fp/toCamelCaseKeys (shallow comparison)', () => {\n    toCamelCaseKeysWithLodashFp(testObject);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toFilled.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toFilled as toFilledToolkit_ } from 'es-toolkit';\nimport { fill as fillLodash_ } from 'lodash';\n\nconst fillLodash = fillLodash_;\nconst toFilledToolkit = toFilledToolkit_;\n\ndescribe('fill function performance comparison', () => {\n  bench('es-toolkit/toFilled', () => {\n    toFilledToolkit([1, 2, 3, 4, 5], '*');\n  });\n\n  bench('lodash/fill', () => {\n    fillLodash([1, 2, 3, 4, 5], '*');\n  });\n});\n\ndescribe('fill function performance with custom start and end', () => {\n  bench('es-toolkit/toFilled', () => {\n    toFilledToolkit([1, 2, 3, 4, 5], '*', 1, 3);\n  });\n\n  bench('lodash/fill', () => {\n    fillLodash([1, 2, 3, 4, 5], '*', 1, 3);\n  });\n});\n\ndescribe('fill function performance with large array', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, index) => index);\n\n  bench('es-toolkit/toFilled', () => {\n    toFilledToolkit(largeArray, '*');\n  });\n\n  bench('lodash/fill', () => {\n    fillLodash(largeArray, '*');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toFinite.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toFinite as toFiniteToolkitCompat_ } from 'es-toolkit/compat';\nimport { toFinite as toFiniteLodash_ } from 'lodash';\n\nconst toFiniteToolkitCompat = toFiniteToolkitCompat_;\nconst toFiniteLodash = toFiniteLodash_;\n\ndescribe('toFinite', () => {\n  bench('es-toolkit/compat/toFinite', () => {\n    toFiniteToolkitCompat({ valueOf: () => 1 });\n    toFiniteToolkitCompat({ valueOf: () => 2 });\n    toFiniteToolkitCompat({ toString: () => '3' });\n    toFiniteToolkitCompat('0b101010');\n    toFiniteToolkitCompat('0o12345');\n    toFiniteToolkitCompat('0x1a2b3c');\n    toFiniteToolkitCompat('1.1');\n  });\n\n  bench('lodash/toFinite', () => {\n    toFiniteLodash({ valueof: () => 1 });\n    toFiniteLodash({ valueof: () => 2 });\n    toFiniteLodash({ toString: () => '3' });\n    toFiniteLodash('0b101010');\n    toFiniteLodash('0o12345');\n    toFiniteLodash('0x1a2b3c');\n    toFiniteLodash('1.1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toInteger.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toInteger as toIntegerToolkitCompat_ } from 'es-toolkit/compat';\nimport { toInteger as toIntegerLodash_ } from 'lodash';\n\nconst toIntegerToolkitCompat = toIntegerToolkitCompat_;\nconst toIntegerLodash = toIntegerLodash_;\n\ndescribe('toInteger', () => {\n  bench('es-toolkit/compat/toInteger', () => {\n    toIntegerToolkitCompat({ valueOf: () => 1 });\n    toIntegerToolkitCompat({ valueOf: () => 2 });\n    toIntegerToolkitCompat({ toString: () => '3' });\n    toIntegerToolkitCompat('0b101010');\n    toIntegerToolkitCompat('0o12345');\n    toIntegerToolkitCompat('0x1a2b3c');\n    toIntegerToolkitCompat('1.1');\n  });\n\n  bench('lodash/toInteger', () => {\n    toIntegerLodash({ valueof: () => 1 });\n    toIntegerLodash({ valueof: () => 2 });\n    toIntegerLodash({ toString: () => '3' });\n    toIntegerLodash('0b101010');\n    toIntegerLodash('0o12345');\n    toIntegerLodash('0x1a2b3c');\n    toIntegerLodash('1.1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toLength.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toLength as toLengthToolkitCompat_ } from 'es-toolkit/compat';\nimport { toLength as toLengthLodash_ } from 'lodash';\n\nconst toLengthToolkitCompat = toLengthToolkitCompat_;\nconst toLengthLodash = toLengthLodash_;\n\ndescribe('toLength', () => {\n  bench('es-toolkit/compat/toLength', () => {\n    toLengthToolkitCompat(3.2);\n    toLengthToolkitCompat(-1);\n    toLengthToolkitCompat(Number.MAX_SAFE_INTEGER + 1);\n    toLengthToolkitCompat('42');\n    toLengthToolkitCompat(null);\n    toLengthToolkitCompat(undefined);\n    toLengthToolkitCompat(NaN);\n    toLengthToolkitCompat(Infinity);\n  });\n\n  bench('lodash/toLength', () => {\n    toLengthLodash(3.2);\n    toLengthLodash(-1);\n    toLengthLodash(Number.MAX_SAFE_INTEGER + 1);\n    toLengthLodash('42');\n    toLengthLodash(null);\n    toLengthLodash(undefined);\n    toLengthLodash(NaN);\n    toLengthLodash(Infinity);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toNumber.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toNumber as toNumberToolkitCompat_ } from 'es-toolkit/compat';\nimport { toNumber as toNumberLodash_ } from 'lodash';\n\nconst toNumberToolkitCompat = toNumberToolkitCompat_;\nconst toNumberLodash = toNumberLodash_;\n\ndescribe('toNumber', () => {\n  bench('es-toolkit/compat/toNumber', () => {\n    toNumberToolkitCompat({ valueOf: () => 1 });\n    toNumberToolkitCompat({ valueOf: () => 2 });\n    toNumberToolkitCompat({ toString: () => '3' });\n    toNumberToolkitCompat('0b101010');\n    toNumberToolkitCompat('0o12345');\n    toNumberToolkitCompat('0x1a2b3c');\n    toNumberToolkitCompat('1.1');\n  });\n\n  bench('lodash/toNumber', () => {\n    toNumberLodash({ valueof: () => 1 });\n    toNumberLodash({ valueof: () => 2 });\n    toNumberLodash({ toString: () => '3' });\n    toNumberLodash('0b101010');\n    toNumberLodash('0o12345');\n    toNumberLodash('0x1a2b3c');\n    toNumberLodash('1.1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toPairs.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toPairs as toPairsToolkit_ } from 'es-toolkit/compat';\nimport { toPairs as toPairsLodash_ } from 'lodash';\n\nconst toPairsToolkit = toPairsToolkit_;\nconst toPairsLodash = toPairsLodash_;\n\ndescribe('toPairs with object', () => {\n  bench('es-toolkit/toPairs', () => {\n    toPairsToolkit({ a: 1, b: 2 });\n  });\n\n  bench('lodash/toPairs', () => {\n    toPairsLodash({ a: 1, b: 2 });\n  });\n});\n\ndescribe('toPairs with set', () => {\n  bench('es-toolkit/toPairs', () => {\n    toPairsToolkit(new Set([1, 2]));\n  });\n\n  bench('lodash/toPairs', () => {\n    toPairsLodash(new Set([1, 2]));\n  });\n});\n\ndescribe('toPairs with map', () => {\n  const map = new Map();\n  map.set('a', 1);\n  map.set('b', 2);\n\n  bench('es-toolkit/toPairs', () => {\n    toPairsToolkit(map);\n  });\n\n  bench('lodash/toPairs', () => {\n    toPairsLodash(map);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toPairsIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toPairsIn as toPairsInToolkit_ } from 'es-toolkit/compat';\nimport { toPairsIn as toPairsInLodash_ } from 'lodash';\n\nconst toPairsInToolkit = toPairsInToolkit_;\nconst toPairsInLodash = toPairsInLodash_;\n\ndescribe('toPairsIn with object', () => {\n  bench('es-toolkit/toPairsIn', () => {\n    toPairsInToolkit({ a: 1, b: 2 });\n  });\n\n  bench('lodash/toPairsIn', () => {\n    toPairsInLodash({ a: 1, b: 2 });\n  });\n});\n\ndescribe('toPairsIn with set', () => {\n  bench('es-toolkit/toPairsIn', () => {\n    toPairsInToolkit(new Set([1, 2]));\n  });\n\n  bench('lodash/toPairsIn', () => {\n    toPairsInLodash(new Set([1, 2]));\n  });\n});\n\ndescribe('toPairsIn with map', () => {\n  const map = new Map();\n  map.set('a', 1);\n  map.set('b', 2);\n\n  bench('es-toolkit/toPairsIn', () => {\n    toPairsInToolkit(map);\n  });\n\n  bench('lodash/toPairsIn', () => {\n    toPairsInLodash(map);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toPath.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toPath as toPathToolkit_ } from 'es-toolkit/compat';\nimport { toPath as toPathLodash_ } from 'lodash';\n\nconst toPathToolkit = toPathToolkit_;\nconst toPathLodash = toPathLodash_;\n\ndescribe('toPath: super simple', () => {\n  bench('es-toolkit/toPath', () => {\n    toPathToolkit('a');\n  });\n\n  bench('lodash/toPath', () => {\n    toPathLodash('a');\n  });\n});\n\ndescribe('toPath: dots', () => {\n  bench('es-toolkit/toPath', () => {\n    toPathToolkit('a.b.c');\n  });\n\n  bench('lodash/toPath', () => {\n    toPathLodash('a.b.c');\n  });\n});\n\ndescribe('toPath: brackets', () => {\n  bench('es-toolkit/toPath', () => {\n    toPathToolkit('a[b][c]');\n  });\n\n  bench('lodash/toPath', () => {\n    toPathLodash('a[b][c]');\n  });\n});\n\ndescribe('toPath: complex', () => {\n  bench('es-toolkit/toPath', () => {\n    toPathToolkit('a[b].c[0].d[\"e\"]');\n  });\n\n  bench('lodash/toPath', () => {\n    toPathLodash('a[b].c[0].d[\"e\"]');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toPlainObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toPlainObject as toPlainObjectCompatToolkit_ } from 'es-toolkit/compat';\nimport { toPlainObject as toPlainObjectLodash_ } from 'lodash';\n\nconst toPlainObjectCompatToolkit = toPlainObjectCompatToolkit_;\nconst toPlainObjectLodash = toPlainObjectLodash_;\n\ndescribe('toPlainObject', () => {\n  class Foo {\n    b = 2;\n  }\n  (Foo.prototype as any).c = 3;\n  const foo = new Foo();\n\n  bench('es-toolkit/compat/toPlainObject', () => {\n    toPlainObjectCompatToolkit(foo);\n  });\n\n  bench('lodash/toPlainObject', () => {\n    toPlainObjectLodash(foo);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toSafeInteger.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toSafeInteger as toSafeIntegerToolkitCompat_ } from 'es-toolkit/compat';\nimport { toSafeInteger as toSafeIntegerLodash_ } from 'lodash';\n\nconst toSafeIntegerToolkitCompat = toSafeIntegerToolkitCompat_;\nconst toSafeIntegerLodash = toSafeIntegerLodash_;\n\ndescribe('toSafeInteger', () => {\n  bench('es-toolkit/compat/toSafeInteger', () => {\n    toSafeIntegerToolkitCompat({ valueOf: () => 1 });\n    toSafeIntegerToolkitCompat({ valueOf: () => 2 });\n    toSafeIntegerToolkitCompat({ toString: () => '3' });\n    toSafeIntegerToolkitCompat('0b101010');\n    toSafeIntegerToolkitCompat('0o12345');\n    toSafeIntegerToolkitCompat('0x1a2b3c');\n    toSafeIntegerToolkitCompat('1.1');\n  });\n\n  bench('lodash/toSafeInteger', () => {\n    toSafeIntegerLodash({ valueof: () => 1 });\n    toSafeIntegerLodash({ valueof: () => 2 });\n    toSafeIntegerLodash({ toString: () => '3' });\n    toSafeIntegerLodash('0b101010');\n    toSafeIntegerLodash('0o12345');\n    toSafeIntegerLodash('0x1a2b3c');\n    toSafeIntegerLodash('1.1');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toSnakeCaseKeys.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toSnakeCaseKeys as toSnakeCaseKeysToolkit_ } from 'es-toolkit';\nimport lodashFp from 'lodash/fp';\n\nconst toSnakeCaseKeysToolkit = toSnakeCaseKeysToolkit_;\n\nconst toSnakeCaseKeysLodash = <T extends Record<string, any>>(obj: T) => {\n  return lodashFp.mapKeys(lodashFp.snakeCase)(obj);\n};\n\nconst testObject = {\n  userId: 1,\n  firstName: 'John',\n  lastName: 'Doe',\n  addressInfo: {\n    streetName: 'Main St',\n    zipCode: '12345',\n    contactDetails: {\n      phoneNumber: '123-456-7890',\n      emailAddress: 'john.doe@example.com',\n    },\n  },\n  orderHistory: [\n    { orderId: 1001, orderDate: '2023-01-15', totalAmount: 125.99 },\n    { orderId: 1002, orderDate: '2023-02-22', totalAmount: 89.5 },\n  ],\n};\n\ndescribe('toSnakeCaseKeys', () => {\n  bench('es-toolkit/toSnakeCaseKeys (deep nested)', () => {\n    toSnakeCaseKeysToolkit(testObject);\n  });\n\n  bench('lodash/fp/toSnakeCaseKeys (shallow comparison)', () => {\n    toSnakeCaseKeysLodash(testObject);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toString.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toString as toStringToolkitCompat_ } from 'es-toolkit/compat';\nimport { toString as toStringLodash_ } from 'lodash';\n\nconst toStringToolkitCompat = toStringToolkitCompat_;\nconst toStringLodash = toStringLodash_;\n\ndescribe('toString', () => {\n  const number = -0;\n  const object = Object(number);\n  const char = 'a';\n  const longString = char.repeat(1e6);\n  const array = [number, object, char, longString];\n  const nestedArray = [array, array, array, array];\n\n  bench('es-toolkit/compat/toString', () => {\n    toStringToolkitCompat(number);\n    toStringToolkitCompat(object);\n    toStringToolkitCompat(char);\n    toStringToolkitCompat(longString);\n    toStringToolkitCompat(array);\n    toStringToolkitCompat(nestedArray);\n  });\n\n  bench('lodash/toString', () => {\n    toStringLodash(number);\n    toStringLodash(object);\n    toStringLodash(char);\n    toStringLodash(longString);\n    toStringLodash(array);\n    toStringLodash(nestedArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/toUpper.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { toUpper as toUpperToolkitCompat_ } from 'es-toolkit/compat';\nimport { toUpper as toUpperLodash_ } from 'lodash';\n\nconst toUpperToolkitCompat = toUpperToolkitCompat_;\nconst toUpperLodash = toUpperLodash_;\n\ndescribe('toUpper', () => {\n  const basicStrings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  const spacedStr = 'hello   world';\n  const specialCharsStr = '!@#$hello%^&*';\n  const newlineStr = 'tabs\\tand\\nnewlines';\n  const unicodeStrs = ['café', 'über', 'señor'];\n  const latinOperators = ['\\xd7', '\\xf7'];\n\n  const number = 123;\n  const negZero = -0;\n  const posZero = 0;\n  const infinite = Infinity;\n  const nan = NaN;\n  const nullValue = null;\n  const undefinedValue = undefined;\n  const arrays = [[1, 2, 3], ['a', 'b', 'c'], [1, 'b', -0], []];\n  const nestedArrays = [1, [2, 3], 4];\n  const symbols = [Symbol('test'), Symbol('')];\n  const objects = [{ toString: () => 'custom' }, {}];\n  const mixedArray = [1, 'b', Symbol('test'), null, undefined];\n\n  bench('es-toolkit/compat/toUpper', () => {\n    basicStrings.forEach(str => toUpperToolkitCompat(str));\n\n    toUpperToolkitCompat(spacedStr);\n    toUpperToolkitCompat(specialCharsStr);\n    toUpperToolkitCompat(newlineStr);\n    unicodeStrs.forEach(str => toUpperToolkitCompat(str));\n    latinOperators.forEach(op => toUpperToolkitCompat(op));\n\n    toUpperToolkitCompat(number);\n    toUpperToolkitCompat(negZero);\n    toUpperToolkitCompat(posZero);\n    toUpperToolkitCompat(infinite);\n    toUpperToolkitCompat(nan);\n    toUpperToolkitCompat(nullValue);\n    toUpperToolkitCompat(undefinedValue);\n    arrays.forEach(arr => toUpperToolkitCompat(arr));\n    toUpperToolkitCompat(nestedArrays);\n    symbols.forEach(sym => toUpperToolkitCompat(sym));\n    objects.forEach(obj => toUpperToolkitCompat(obj));\n    toUpperToolkitCompat(mixedArray);\n  });\n\n  bench('lodash/toUpper', () => {\n    basicStrings.forEach(str => toUpperLodash(str));\n\n    toUpperLodash(spacedStr);\n    toUpperLodash(specialCharsStr);\n    toUpperLodash(newlineStr);\n    unicodeStrs.forEach(str => toUpperLodash(str));\n    latinOperators.forEach(op => toUpperLodash(op));\n\n    toUpperLodash(number);\n    toUpperLodash(negZero);\n    toUpperLodash(posZero);\n    toUpperLodash(infinite);\n    toUpperLodash(nan);\n    toUpperLodash(nullValue);\n    toUpperLodash(undefinedValue);\n    arrays.forEach(arr => toUpperLodash(arr));\n    toUpperLodash(nestedArrays);\n    symbols.forEach(sym => toUpperLodash(sym));\n    objects.forEach(obj => toUpperLodash(obj));\n    toUpperLodash(mixedArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/transform.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { transform as transformToolkitCompat_ } from 'es-toolkit/compat';\nimport { transform as transformLodash_ } from 'lodash';\n\nconst transformToolkitCompat = transformToolkitCompat_;\nconst transformLodash = transformLodash_;\n\nconst bigObject = Object.fromEntries(Array.from({ length: 1000 }, (_, i) => [i, i]));\nconst bigArray = Array.from({ length: 1000 }, (_, i) => i);\nconst smallObject = { a: 1, b: 2, c: 3 };\nconst smallArray = [1, 2, 3];\nconst iteratee = (acc: any, value: number, key: any) => {\n  acc[key] = value * value;\n};\n\ndescribe('transform (small object)', () => {\n  bench('es-toolkit/compat/transform', () => {\n    transformToolkitCompat(smallObject, iteratee);\n  });\n\n  bench('lodash/transform', () => {\n    transformLodash(smallObject, iteratee);\n  });\n});\n\ndescribe('transform (big object)', () => {\n  bench('es-toolkit/compat/transform', () => {\n    transformToolkitCompat(bigObject, iteratee);\n  });\n\n  bench('lodash/transform', () => {\n    transformLodash(bigObject, iteratee);\n  });\n});\n\ndescribe('transform (big array)', () => {\n  bench('es-toolkit/compat/transform', () => {\n    transformToolkitCompat(bigArray, iteratee);\n  });\n\n  bench('lodash/transform', () => {\n    transformLodash(bigArray, iteratee);\n  });\n});\n\ndescribe('transform (small array)', () => {\n  bench('es-toolkit/compat/transform', () => {\n    transformToolkitCompat(smallArray, iteratee);\n  });\n\n  bench('lodash/transform', () => {\n    transformLodash(smallArray, iteratee);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/trim.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { trim as trimToolkit_ } from 'es-toolkit';\nimport { trim as trimCompatToolkit_ } from 'es-toolkit/compat';\nimport { trim as trimLodash_ } from 'lodash';\n\nconst trimToolkit = trimToolkit_;\nconst trimCompatToolkit = trimCompatToolkit_;\nconst trimLodash = trimLodash_;\n\ndescribe('trim', () => {\n  bench('es-toolkit/trim', () => {\n    const str = 'kebab-case';\n    trimToolkit(str, ['s', 'e']);\n  });\n\n  bench('es-toolkit/compat/trim', () => {\n    const str = 'kebab-case';\n    trimCompatToolkit(str, 'se');\n  });\n\n  bench('lodash/trim', () => {\n    const str = 'kebab-case';\n    trimLodash(str, 'se');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/trimEnd.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { trimEnd as trimEndToolkit_ } from 'es-toolkit/compat';\nimport { trimEnd as trimEndLodash_ } from 'lodash';\n\nconst trimEndToolkit = trimEndToolkit_;\nconst trimEndLodash = trimEndLodash_;\n\ndescribe('trimEnd', () => {\n  bench('es-toolkit/trimEnd', () => {\n    const str = 'kebab-case';\n    trimEndToolkit(str, 'se');\n  });\n\n  bench('lodash/trimEnd', () => {\n    const str = 'kebab-case';\n    trimEndLodash(str, 'se');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/trimStart.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { trimStart as trimStartToolkit_ } from 'es-toolkit/compat';\nimport { trimStart as trimStartLodash_ } from 'lodash';\n\nconst trimStartToolkit = trimStartToolkit_;\nconst trimStartLodash = trimStartLodash_;\n\ndescribe('trimStart', () => {\n  bench('es-toolkit/trimStart', () => {\n    const str = 'kebab-case';\n    trimStartToolkit(str, 'se');\n  });\n\n  bench('lodash/trimStart', () => {\n    const str = 'kebab-case';\n    trimStartLodash(str, 'se');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/truncate.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { truncate as truncateCompatToolkit_ } from 'es-toolkit/compat';\nimport { truncate as truncateLodash_ } from 'lodash';\n\nconst truncateCompatToolkit = truncateCompatToolkit_;\nconst truncateLodash = truncateLodash_;\n\nconst strAsciiShort = 'hi-diddly-ho there, neighborino';\nconst strAsciiLong = strAsciiShort.padEnd(500, 'A').padEnd(1000, '5').padEnd(1500, ' ').padEnd(2000, ', ');\n\nconst strUnicodeShort = 'hi-diddly-ho there, ¥, §✈✉, 🤓 neighborino';\nconst strUnicodeLong = (strUnicodeShort.padEnd(500, 'A').padEnd(1000, '5') + strUnicodeShort)\n  .padEnd(1500, ' ')\n  .padEnd(2000, ', ');\n\ndescribe('truncate - short ascii', () => {\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strAsciiShort);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strAsciiShort);\n  });\n});\n\ndescribe('truncate - long ascii', () => {\n  const options = { length: 150 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strAsciiLong, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strAsciiLong, options);\n  });\n});\n\ndescribe('truncate - short unicode', () => {\n  const options = { length: 28 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strUnicodeShort, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strUnicodeShort, options);\n  });\n});\n\ndescribe('truncate - long unicode', () => {\n  const options = { length: 24, separator: ', ' };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strUnicodeLong, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strUnicodeLong, options);\n  });\n});\n\ndescribe('truncate - do nothing - short ascii', () => {\n  const options = { length: 100 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strAsciiShort, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strAsciiShort, options);\n  });\n});\n\ndescribe('truncate - do nothing - long ascii', () => {\n  const options = { length: 1_000_000 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strAsciiLong, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strAsciiLong, options);\n  });\n});\n\ndescribe('truncate - do nothing - short unicode', () => {\n  const options = { length: 100 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strUnicodeShort, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strUnicodeShort, options);\n  });\n});\n\ndescribe('truncate - do nothing - long unicode', () => {\n  const options = { length: 1_000_000 };\n\n  bench('es-toolkit/compat/truncate', () => {\n    truncateCompatToolkit(strUnicodeLong, options);\n  });\n\n  bench('lodash/truncate', () => {\n    truncateLodash(strUnicodeLong, options);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unary.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unary as unaryToolkit_ } from 'es-toolkit';\nimport { unary as unaryLodash_ } from 'lodash';\n\nconst unaryToolkit = unaryToolkit_;\nconst unaryLodash = unaryLodash_;\n\ndescribe('ary', () => {\n  bench('es-toolkit/unary', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    unaryToolkit((_a, _b, _c) => undefined);\n  });\n\n  bench('lodash/unary', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    unaryLodash((_a, _b, _c) => undefined);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unescape.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unescape as unescapeToolkit_ } from 'es-toolkit';\nimport { unescape as unescapeCompatToolkit_ } from 'es-toolkit/compat';\nimport { unescape as unescapeLodash_ } from 'lodash';\n\nconst unescapeToolkit = unescapeToolkit_;\nconst unescapeCompatToolkit = unescapeCompatToolkit_;\nconst unescapeLodash = unescapeLodash_;\n\nconst longString = 'fred, barney, &amp; pebbles'.repeat(50);\n\ndescribe('unescape', () => {\n  bench('es-toolkit/unescape', () => {\n    unescapeToolkit('fred, barney, &amp; pebbles');\n  });\n\n  bench('es-toolkit/compat/unescape', () => {\n    unescapeCompatToolkit('fred, barney, &amp; pebbles');\n  });\n\n  bench('lodash/unescape', () => {\n    unescapeLodash('fred, barney, &amp; pebbles');\n  });\n});\n\ndescribe('unescape/long', () => {\n  bench('es-toolkit/unescape - long string', () => {\n    unescapeToolkit(longString);\n  });\n\n  bench('es-toolkit/compat/unescape - long string', () => {\n    unescapeCompatToolkit(longString);\n  });\n\n  bench('lodash/unescape long string', () => {\n    unescapeLodash(longString);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/union.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { union as unionToolkit_ } from 'es-toolkit';\nimport { union as unionToolkitCompat_ } from 'es-toolkit/compat';\nimport { union as unionLodash_ } from 'lodash';\n\nconst unionToolkit = unionToolkit_;\nconst unionToolkitCompat = unionToolkitCompat_;\nconst unionLodash = unionLodash_;\n\ndescribe('union', () => {\n  bench('es-toolkit/union', () => {\n    const array1 = [1, 2, 3];\n    const array2 = [3, 4, 5];\n    unionToolkit(array1, array2);\n  });\n\n  bench('es-toolkit/compat/union', () => {\n    const array1 = [1, 2, 3];\n    const array2 = [3, 4, 5];\n    unionToolkitCompat(array1, array2);\n  });\n\n  bench('lodash/union', () => {\n    const array1 = [1, 2, 3];\n    const array2 = [3, 4, 5];\n    unionLodash(array1, array2);\n  });\n});\n\ndescribe('union/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => i);\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => i + 5000);\n\n  bench('es-toolkit/union', () => {\n    unionToolkit(largeArray1, largeArray2);\n  });\n\n  bench('es-toolkit/compat/union', () => {\n    unionToolkitCompat(largeArray1, largeArray2);\n  });\n\n  bench('lodash/union', () => {\n    unionLodash(largeArray1, largeArray2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unionBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unionBy as unionByToolkit_ } from 'es-toolkit';\nimport { unionBy as unionByToolkitCompat_ } from 'es-toolkit/compat';\nimport { unionBy as unionByLodash_ } from 'lodash';\n\nconst unionByToolkit = unionByToolkit_;\nconst unionByToolkitCompat = unionByToolkitCompat_;\nconst unionByLodash = unionByLodash_;\n\ndescribe('unionBy', () => {\n  const array1 = [{ id: 1 }, { id: 2 }];\n  const array2 = [{ id: 2 }, { id: 3 }];\n  const getId = (x: { id: number }) => x.id;\n\n  bench('es-toolkit/unionBy', () => {\n    unionByToolkit(array1, array2, getId);\n  });\n\n  bench('es-toolkit/compat/unionBy', () => {\n    unionByToolkitCompat(array1, array2, getId);\n  });\n\n  bench('lodash/unionBy', () => {\n    unionByLodash(array1, array2, getId);\n  });\n});\n\ndescribe('unionBy/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n  const getId = (x: { id: number }) => x.id;\n\n  bench('es-toolkit/unionBy', () => {\n    unionByToolkit(largeArray1, largeArray2, getId);\n  });\n\n  bench('es-toolkit/compat/unionBy', () => {\n    unionByToolkitCompat(largeArray1, largeArray2, getId);\n  });\n\n  bench('lodash/unionBy', () => {\n    unionByLodash(largeArray1, largeArray2, getId);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unionWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unionWith as unionWithToolkit_ } from 'es-toolkit';\nimport { unionWith as unionWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { unionWith as unionWithLodash_ } from 'lodash';\n\nconst unionWithToolkit = unionWithToolkit_;\nconst unionWithToolkitCompat = unionWithToolkitCompat_;\nconst unionWithLodash = unionWithLodash_;\n\ndescribe('unionWith', () => {\n  const array1 = [{ id: 1 }, { id: 2 }];\n  const array2 = [{ id: 2 }, { id: 3 }];\n  const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n\n  bench('es-toolkit/unionWith', () => {\n    unionWithToolkit(array1, array2, areItemsEqual);\n  });\n\n  bench('es-toolkit/compat/unionWith', () => {\n    unionWithToolkitCompat(array1, array2, areItemsEqual);\n  });\n\n  bench('lodash/unionWith', () => {\n    unionWithLodash(array1, array2, areItemsEqual);\n  });\n});\n\ndescribe('unionWith/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n  const areItemsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n\n  bench('es-toolkit/unionWith', () => {\n    unionWithToolkit(largeArray1, largeArray2, areItemsEqual);\n  });\n\n  bench('es-toolkit/compat/unionWith', () => {\n    unionWithToolkitCompat(largeArray1, largeArray2, areItemsEqual);\n  });\n\n  bench('lodash/unionWith', () => {\n    unionWithLodash(largeArray1, largeArray2, areItemsEqual);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/uniq.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { uniq as uniqToolkit_ } from 'es-toolkit';\nimport { uniq as uniqToolkitCompat_ } from 'es-toolkit/compat';\nimport { randomInt } from 'crypto';\nimport { uniq as uniqLodash_ } from 'lodash';\n\nconst uniqToolkit = uniqToolkit_;\nconst uniqToolkitCompat = uniqToolkitCompat_;\nconst uniqLodash = uniqLodash_;\n\ndescribe('uniq', () => {\n  bench('es-toolkit/uniq', () => {\n    uniqToolkit([11, 2, 3, 44, 11, 2, 3]);\n  });\n\n  bench('es-toolkit/compat/uniq', () => {\n    uniqToolkitCompat([11, 2, 3, 44, 11, 2, 3]);\n  });\n\n  bench('lodash/uniq', () => {\n    uniqLodash([11, 2, 3, 44, 11, 2, 3]);\n  });\n});\n\ndescribe('uniq/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, () => randomInt(0, 10000));\n\n  bench('es-toolkit/uniq', () => {\n    uniqToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/uniq', () => {\n    uniqToolkitCompat(largeArray);\n  });\n\n  bench('lodash/uniq', () => {\n    uniqLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/uniqBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { uniqBy as uniqByToolkit_ } from 'es-toolkit';\nimport { uniqBy as uniqByToolkitCompat_ } from 'es-toolkit/compat';\nimport { randomInt } from 'crypto';\nimport { uniqBy as uniqByLodash_ } from 'lodash';\n\nconst uniqByToolkit = uniqByToolkit_;\nconst uniqByToolkitCompat = uniqByToolkitCompat_;\nconst uniqByLodash = uniqByLodash_;\n\ndescribe('uniqBy, small arrays', () => {\n  bench('es-toolkit/uniqBy', () => {\n    uniqByToolkit([2.1, 1.2, 2.3], Math.floor);\n  });\n\n  bench('es-toolkit/compat/uniqBy', () => {\n    uniqByToolkitCompat([2.1, 1.2, 2.3], Math.floor);\n  });\n\n  bench('lodash/uniqBy', () => {\n    uniqByLodash([2.1, 1.2, 2.3], Math.floor);\n  });\n});\n\ndescribe('uniqBy, large arrays', () => {\n  const largeArray = Array.from({ length: 10000 }, () => randomInt(0, 10000));\n\n  bench('es-toolkit/uniqBy', () => {\n    uniqByToolkit(largeArray, Math.floor);\n  });\n\n  bench('es-toolkit/compat/uniqBy', () => {\n    uniqByToolkitCompat(largeArray, Math.floor);\n  });\n\n  bench('lodash/uniqBy', () => {\n    uniqByLodash(largeArray, Math.floor);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/uniqWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { uniqWith as uniqWithToolkit_ } from 'es-toolkit';\nimport { uniqWith as uniqWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { randomInt } from 'crypto';\nimport { uniqWith as uniqWithLodash_ } from 'lodash';\n\nconst uniqWithToolkit = uniqWithToolkit_;\nconst uniqWithToolkitCompat = uniqWithToolkitCompat_;\nconst uniqWithLodash = uniqWithLodash_;\n\ndescribe('uniqWith, small arrays', () => {\n  bench('es-toolkit/uniqWith', () => {\n    uniqWithToolkit([2.1, 1.2, 2.3], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('es-toolkit/compat/uniqWith', () => {\n    uniqWithToolkitCompat([2.1, 1.2, 2.3], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n\n  bench('lodash/uniqWith', () => {\n    uniqWithLodash([2.1, 1.2, 2.3], (x, y) => Math.floor(x) === Math.floor(y));\n  });\n});\n\ndescribe('uniqWith, large arrays', () => {\n  const array = Array.from({ length: 10000 }, () => randomInt(0, 10000));\n  const comparator = (x: number, y: number) => Math.floor(x) === Math.floor(y);\n\n  bench('es-toolkit/uniqWith', () => {\n    uniqWithToolkit(array, comparator);\n  });\n\n  bench('es-toolkit/compat/uniqWith', () => {\n    uniqWithToolkitCompat(array, comparator);\n  });\n\n  bench('lodash/uniqWith', () => {\n    uniqWithLodash(array, comparator);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/uniqueId.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { uniqueId as uniqueIdToolkitCompat_ } from 'es-toolkit/compat';\nimport { uniqueId as uniqueIdLodash_ } from 'lodash';\n\nconst uniqueIdToolkitCompat = uniqueIdToolkitCompat_;\nconst uniqueIdLodash = uniqueIdLodash_;\n\ndescribe('uniqueId', () => {\n  bench('es-toolkit/compat/uniqueId', () => {\n    uniqueIdToolkitCompat();\n    uniqueIdToolkitCompat();\n    uniqueIdToolkitCompat();\n    uniqueIdToolkitCompat();\n    uniqueIdToolkitCompat();\n    uniqueIdToolkitCompat('prefix_');\n    uniqueIdToolkitCompat('prefix_');\n    uniqueIdToolkitCompat('prefix_');\n    uniqueIdToolkitCompat('prefix_');\n    uniqueIdToolkitCompat('prefix_');\n  });\n\n  bench('lodash/uniqueId', () => {\n    uniqueIdLodash();\n    uniqueIdLodash();\n    uniqueIdLodash();\n    uniqueIdLodash();\n    uniqueIdLodash();\n    uniqueIdLodash('prefix_');\n    uniqueIdLodash('prefix_');\n    uniqueIdLodash('prefix_');\n    uniqueIdLodash('prefix_');\n    uniqueIdLodash('prefix_');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unset.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unset as unsetToolkitCompat_ } from 'es-toolkit/compat';\nimport { unset as unsetLodash_ } from 'lodash';\n\nconst unsetToolkitCompat = unsetToolkitCompat_;\nconst unsetLodash = unsetLodash_;\n\ndescribe('unset', () => {\n  bench('es-toolkit/unset', () => {\n    const object = { a: { b: { c: null } } };\n    unsetToolkitCompat(object, 'a.b.c');\n  });\n\n  bench('lodash/unset', () => {\n    const object = { a: { b: { c: null } } };\n    unsetLodash(object, 'a.b.c');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unzip.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unzip as unzipToolkit_ } from 'es-toolkit';\nimport { unzip as unzipToolkitCompat_ } from 'es-toolkit/compat';\nimport { unzip as unzipLodash_ } from 'lodash';\n\nconst unzipToolkit = unzipToolkit_;\nconst unzipToolkitCompat = unzipToolkitCompat_;\nconst unzipLodash = unzipLodash_;\n\ndescribe('unzip, small arrays', () => {\n  bench('es-toolkit/unzip', () => {\n    unzipToolkit([\n      ['a', 1, true],\n      ['b', 2, false],\n    ]);\n  });\n\n  bench('es-toolkit/compat/unzip', () => {\n    unzipToolkitCompat([\n      ['a', 1, true],\n      ['b', 2, false],\n    ]);\n  });\n\n  bench('lodash/unzip', () => {\n    unzipLodash([\n      ['a', 1, true],\n      ['b', 2, false],\n    ]);\n  });\n});\n\ndescribe('unzip, large arrays', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => ['a', i, true]);\n\n  bench('es-toolkit/unzip', () => {\n    unzipToolkit(largeArray);\n  });\n\n  bench('es-toolkit/compat/unzip', () => {\n    unzipToolkitCompat(largeArray);\n  });\n\n  bench('lodash/unzip', () => {\n    unzipLodash(largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/unzipWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { unzipWith as unzipWithToolkit_ } from 'es-toolkit';\nimport { unzipWith as unzipWithCompatToolkit_ } from 'es-toolkit/compat';\nimport { unzipWith as unzipWithLodash_ } from 'lodash';\n\nconst unzipWithToolkit = unzipWithToolkit_;\nconst unzipWithCompatToolkit = unzipWithCompatToolkit_;\nconst unzipWithLodash = unzipWithLodash_;\n\ndescribe('unzipWith', () => {\n  bench('es-toolkit/unzipWith', () => {\n    unzipWithToolkit(\n      [\n        [1000, 2000],\n        [3000, 4000],\n        [50000, 60000],\n      ],\n      (a, b, c) => a + b + c\n    );\n  });\n\n  bench('es-toolkit/compat/unzipWith', () => {\n    unzipWithCompatToolkit(\n      [\n        [1000, 2000],\n        [3000, 4000],\n        [50000, 60000],\n      ],\n      (a, b, c) => a + b + c\n    );\n  });\n\n  bench('lodash/unzipWith', () => {\n    unzipWithLodash(\n      [\n        [1000, 2000],\n        [3000, 4000],\n        [50000, 60000],\n      ],\n      (a, b, c) => a + b + c\n    );\n  });\n});\n\ndescribe('unzipWith, large arrays', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => [i, i + 1]);\n\n  bench('es-toolkit/unzipWith', () => {\n    unzipWithToolkit(largeArray, (a, b) => a + b);\n  });\n\n  bench('es-toolkit/compat/unzipWith', () => {\n    unzipWithCompatToolkit(largeArray, (a, b) => a + b);\n  });\n\n  bench('lodash/unzipWith', () => {\n    unzipWithLodash(largeArray, (a, b) => a + b);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/update.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { update as updateToolkitCompat_ } from 'es-toolkit/compat';\nimport { update as lodashUpdate_ } from 'lodash';\n\nconst updateToolkitCompat = updateToolkitCompat_;\nconst lodashUpdate = lodashUpdate_;\n\ndescribe('update - dot notation', () => {\n  const obj = { a: { b: { c: 3 } } };\n\n  bench('es-toolkit/update', () => {\n    updateToolkitCompat(obj, 'a.b.c', value => (value as number) + 1);\n  });\n\n  bench('lodash/update', () => {\n    lodashUpdate(obj, 'a.b.c', value => (value as number) + 1);\n  });\n});\n\ndescribe('update - array notation', () => {\n  const obj = { a: [{ b: { c: 3 } }] };\n\n  bench('es-toolkit/update', () => {\n    updateToolkitCompat(obj, 'a[0].b.c', value => (value as number) + 1);\n  });\n\n  bench('lodash/update', () => {\n    lodashUpdate(obj, 'a[0].b.c', value => (value as number) + 1);\n  });\n});\n\ndescribe('update - deep path creation', () => {\n  const obj = {};\n\n  bench('es-toolkit/update', () => {\n    updateToolkitCompat(obj, 'a.b.c.d.e', () => 'value');\n  });\n\n  bench('lodash/update', () => {\n    lodashUpdate(obj, 'a.b.c.d.e', () => 'value');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/updateWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { updateWith as updateWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { updateWith as lodashUpdateWith_ } from 'lodash';\n\nconst updateWithToolkitCompat = updateWithToolkitCompat_;\nconst lodashUpdateWith = lodashUpdateWith_;\n\nfunction customizer(value: unknown) {\n  if (value == null) {\n    return {};\n  }\n  return value;\n}\n\ndescribe('updateWith - dot notation', () => {\n  const obj = { a: { b: { c: 3 } } };\n\n  bench('es-toolkit/updateWith', () => {\n    updateWithToolkitCompat(obj, 'a.b.c', value => (value as number) + 1, customizer);\n  });\n\n  bench('lodash/updateWith', () => {\n    lodashUpdateWith(obj, 'a.b.c', value => (value as number) + 1, customizer);\n  });\n});\n\ndescribe('updateWith - array notation', () => {\n  const obj = { a: [{ b: { c: 3 } }] };\n\n  bench('es-toolkit/updateWith', () => {\n    updateWithToolkitCompat(obj, 'a[0].b.c', value => (value as number) + 1, customizer);\n  });\n\n  bench('lodash/updateWith', () => {\n    lodashUpdateWith(obj, 'a[0].b.c', value => (value as number) + 1, customizer);\n  });\n});\n\ndescribe('updateWith - custom objects', () => {\n  const obj = {};\n\n  bench('es-toolkit/updateWith', () => {\n    updateWithToolkitCompat(obj, '[0].a.b.c', value => (value as number) + 1, customizer);\n  });\n\n  bench('lodash/updateWith', () => {\n    lodashUpdateWith(obj, '[0].a.b.c', value => (value as number) + 1, customizer);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/upperCase.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { upperCase as upperCaseToolkit_ } from 'es-toolkit';\nimport { upperCase as upperCaseToolkitCompat_ } from 'es-toolkit/compat';\nimport { upperCase as upperCaseLodash_ } from 'lodash';\n\nconst upperCaseToolkit = upperCaseToolkit_;\nconst upperCaseToolkitCompat = upperCaseToolkitCompat_;\nconst upperCaseLodash = upperCaseLodash_;\n\ndescribe('upperCase', () => {\n  describe('short string', () => {\n    bench('es-toolkit/upperCase', () => {\n      const str = 'camelCase';\n      upperCaseToolkit(str);\n    });\n\n    bench('es-toolkit/compat/upperCase', () => {\n      const str = 'camelCase';\n      upperCaseToolkitCompat(str);\n    });\n\n    bench('lodash/upperCase', () => {\n      const str = 'camelCase';\n      upperCaseLodash(str);\n    });\n  });\n\n  describe('long string', () => {\n    const LONG_STR = 'camelCaseLongString'.repeat(1000);\n    bench('es-toolkit/upperCase', () => {\n      upperCaseToolkit(LONG_STR);\n    });\n\n    bench('es-toolkit/compat/upperCase', () => {\n      upperCaseToolkitCompat(LONG_STR);\n    });\n\n    bench('lodash/upperCase', () => {\n      upperCaseLodash(LONG_STR);\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/upperFirst.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { upperFirst as upperFirstToolkit_ } from 'es-toolkit';\nimport { upperFirst as upperFirstCompatToolkit_ } from 'es-toolkit/compat';\nimport { upperFirst as upperFirstLodash_ } from 'lodash';\n\nconst upperFirstToolkit = upperFirstToolkit_;\nconst upperFirstCompatToolkit = upperFirstCompatToolkit_;\nconst upperFirstLodash = upperFirstLodash_;\n\ndescribe('upperFirst', () => {\n  describe('short string', () => {\n    bench('es-toolkit/upperFirst', () => {\n      const str = 'camelCase';\n      upperFirstToolkit(str);\n    });\n\n    bench('es-toolkit/compat/upperFirst', () => {\n      const str = 'camelCase';\n      upperFirstCompatToolkit(str);\n    });\n\n    bench('lodash/upperFirst', () => {\n      const str = 'camelCase';\n      upperFirstLodash(str);\n    });\n  });\n\n  describe('long string', () => {\n    const LONG_STR = 'camelCaseLongString'.repeat(1000);\n    bench('es-toolkit/upperFirst', () => {\n      upperFirstToolkit(LONG_STR);\n    });\n\n    bench('es-toolkit/compat/upperFirst', () => {\n      upperFirstCompatToolkit(LONG_STR);\n    });\n\n    bench('lodash/upperFirst', () => {\n      upperFirstLodash(LONG_STR);\n    });\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/values.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { values as valuesToolkitCompat_ } from 'es-toolkit/compat';\nimport { values as valuesLodash_ } from 'lodash';\n\nconst valuesToolkitCompat = valuesToolkitCompat_;\nconst valuesLodash = valuesLodash_;\n\nconst object = { a: 1, b: 2, c: 3 };\n\ndescribe('values', () => {\n  bench('es-toolkit/compat/values', () => {\n    valuesToolkitCompat(object);\n  });\n\n  bench('lodash/values', () => {\n    valuesLodash(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/valuesIn.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { valuesIn as valuesInToolkitCompat_ } from 'es-toolkit/compat';\nimport { valuesIn as valuesInLodash_ } from 'lodash';\n\nconst valuesInToolkitCompat = valuesInToolkitCompat_;\nconst valuesInLodash = valuesInLodash_;\n\nconst object = { a: 1, b: 2, c: 3 };\n\ndescribe('valuesIn', () => {\n  bench('es-toolkit/compat/valuesIn', () => {\n    valuesInToolkitCompat(object);\n  });\n\n  bench('lodash/valuesIn', () => {\n    valuesInLodash(object);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/without.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { without as withoutEsToolkit_ } from 'es-toolkit';\nimport { without as withoutToolkitCompat_ } from 'es-toolkit/compat';\nimport { without as withoutLodash_ } from 'lodash';\n\nconst withoutEsToolkit = withoutEsToolkit_;\nconst withoutToolkitCompat = withoutToolkitCompat_;\nconst withoutLodash = withoutLodash_;\n\nconst generateArray = (length: number, max: number) => Array.from({ length }, () => Math.floor(Math.random() * max));\n\ndescribe('without, small arrays', () => {\n  const array = [1, 2, 3, 4, 5];\n  const values = [2, 4];\n\n  bench('es-toolkit/without', () => {\n    withoutEsToolkit(array, ...values);\n  });\n\n  bench('es-toolkit/compat/without', () => {\n    withoutToolkitCompat(array, ...values);\n  });\n\n  bench('lodash/without', () => {\n    withoutLodash(array, ...values);\n  });\n});\n\ndescribe('without, large arrays', () => {\n  const array = generateArray(10000, 1000);\n  const values = generateArray(100, 1000);\n\n  bench('es-toolkit/without', () => {\n    withoutEsToolkit(array, ...values);\n  });\n\n  bench('es-toolkit/compat/without', () => {\n    withoutToolkitCompat(array, ...values);\n  });\n\n  bench('lodash/without', () => {\n    withoutLodash(array, ...values);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/words.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { words as wordsToolkit_ } from 'es-toolkit';\nimport { words as wordsToolkitCompat_ } from 'es-toolkit/compat';\nimport { words as wordLodash_ } from 'lodash';\n\nconst wordsToolkit = wordsToolkit_;\nconst wordsToolkitCompat = wordsToolkitCompat_;\nconst wordLodash = wordLodash_;\n\ndescribe('Performance Comparison: es-toolkit words vs lodash words', () => {\n  const testString = 'This is a test string with different_cases and UPPERCASE words 🚀 and more symbols';\n\n  bench('es-toolkit words', () => {\n    wordsToolkit(testString);\n  });\n\n  bench('es-toolkit/compat words', () => {\n    wordsToolkitCompat(testString);\n  });\n\n  bench('lodash words', () => {\n    wordLodash(testString);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/wrap.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { wrap as wrapToolkit_ } from 'es-toolkit/compat';\nimport { wrap as wrapLodash_ } from 'lodash';\n\nconst wrapToolkit = wrapToolkit_;\nconst wrapLodash = wrapLodash_;\n\ndescribe('wrap', () => {\n  bench('es-toolkit/compat/wrap', () => {\n    wrapToolkit(\n      (x: any) => x,\n      (value, x) => value(x)\n    );\n  });\n\n  bench('lodash/wrap', () => {\n    wrapLodash(\n      (x: any) => x,\n      (value, x) => value(x)\n    );\n  });\n});\n\ndescribe('wrap/invoked', () => {\n  bench('es-toolkit/compat/wrap', () => {\n    const wrapped = wrapToolkit(\n      (x: string) => x.toUpperCase(),\n      (value, x: string) => `<p>${value(x)}</p>`\n    );\n    wrapped('hello');\n  });\n\n  bench('lodash/wrap', () => {\n    const wrapped = wrapLodash(\n      (x: string) => x.toUpperCase(),\n      (value, x: string) => `<p>${value(x)}</p>`\n    );\n    wrapped('hello');\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/xor.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { xor as xorToolkit_ } from 'es-toolkit';\nimport { xor as xorLodash_ } from 'lodash';\n\nconst xorToolkit = xorToolkit_;\nconst xorLodash = xorLodash_;\n\ndescribe('xor', () => {\n  bench('es-toolkit/xor', () => {\n    xorToolkit([1, 2, 3, 4], [3, 4, 5, 6]);\n  });\n\n  bench('lodash/xor', () => {\n    xorLodash([1, 2, 3, 4], [3, 4, 5, 6]);\n  });\n});\n\ndescribe('xor/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => i);\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => i + 5000);\n\n  bench('es-toolkit/xor', () => {\n    xorToolkit(largeArray1, largeArray2);\n  });\n\n  bench('lodash/xor', () => {\n    xorLodash(largeArray1, largeArray2);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/xorBy.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { xorBy as xorByToolkit_ } from 'es-toolkit';\nimport { xorBy as xorByToolkitCompat_ } from 'es-toolkit/compat';\nimport { xorBy as xorByLodash_ } from 'lodash';\n\nconst xorByToolkit = xorByToolkit_;\nconst xorByToolkitCompat = xorByToolkitCompat_;\nconst xorByLodash = xorByLodash_;\n\ndescribe('xorBy', () => {\n  bench('es-toolkit/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByToolkit([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n  });\n\n  bench('es-toolkit/compat/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByToolkitCompat([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n  });\n\n  bench('lodash/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByLodash([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n  });\n});\n\ndescribe('xorBy/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n\n  bench('es-toolkit/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByToolkit(largeArray1, largeArray2, idMapper);\n  });\n\n  bench('es-toolkit/compat/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByToolkitCompat(largeArray1, largeArray2, idMapper);\n  });\n\n  bench('lodash/xorBy', () => {\n    const idMapper = (obj: { id: number }) => obj.id;\n    xorByLodash(largeArray1, largeArray2, idMapper);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/xorWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { xorWith as xorWithToolkit_ } from 'es-toolkit';\nimport { xorWith as xorWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { xorWith as xorWithLodash_ } from 'lodash';\n\nconst xorWithLodash = xorWithLodash_;\nconst xorWithToolkitCompat = xorWithToolkitCompat_;\nconst xorWithToolkit = xorWithToolkit_;\n\ndescribe('xorWith', () => {\n  bench('es-toolkit/xorWith', () => {\n    xorWithToolkit([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], (x, y) => x.id === y.id);\n  });\n\n  bench('es-toolkit/compat/xorWith', () => {\n    xorWithToolkitCompat([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], (x, y) => x.id === y.id);\n  });\n\n  bench('lodash/xorWith', () => {\n    xorWithLodash([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], (x, y) => x.id === y.id);\n  });\n});\n\ndescribe('xorWith/largeArray', () => {\n  const largeArray1 = Array.from({ length: 10000 }, (_, i) => ({ id: i }));\n  const largeArray2 = Array.from({ length: 10000 }, (_, i) => ({ id: i + 5000 }));\n\n  bench('es-toolkit/xorWith', () => {\n    xorWithToolkit(largeArray1, largeArray2, (x, y) => x.id === y.id);\n  });\n\n  bench('es-toolkit/compat/xorWith', () => {\n    xorWithToolkitCompat(largeArray1, largeArray2, (x, y) => x.id === y.id);\n  });\n\n  bench('lodash/xorWith', () => {\n    xorWithLodash(largeArray1, largeArray2, (x, y) => x.id === y.id);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/zip.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { zip as zipToolkit_ } from 'es-toolkit';\nimport { zip as zipToolkitCompat_ } from 'es-toolkit/compat';\nimport { zip as zipLodash_ } from 'lodash';\n\nconst zipToolkit = zipToolkit_;\nconst zipToolkitCompat = zipToolkitCompat_;\nconst zipLodash = zipLodash_;\n\ndescribe('zip', () => {\n  bench('es-toolkit/zip', () => {\n    zipToolkit([1, 2, 3, 4], [3, 4, 5, 6]);\n  });\n\n  bench('es-toolkit/compat/zip', () => {\n    zipToolkitCompat([1, 2, 3, 4], [3, 4, 5, 6]);\n  });\n\n  bench('lodash/zip', () => {\n    zipLodash([1, 2, 3, 4], [3, 4, 5, 6]);\n  });\n});\n\ndescribe('zip/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/zip', () => {\n    zipToolkit(largeArray, largeArray);\n  });\n\n  bench('es-toolkit/compat/zip', () => {\n    zipToolkitCompat(largeArray, largeArray);\n  });\n\n  bench('lodash/zip', () => {\n    zipLodash(largeArray, largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/zipObject.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { zipObject as zipObjectToolkit_ } from 'es-toolkit';\nimport { zipObject as zipObjectToolkitCompat_ } from 'es-toolkit/compat';\nimport { zipObject as zipObjectLodash_ } from 'lodash';\n\nconst zipObjectToolkit = zipObjectToolkit_;\nconst zipObjectToolkitCompat = zipObjectToolkitCompat_;\nconst zipObjectLodash = zipObjectLodash_;\n\ndescribe('zipObject', () => {\n  bench('es-toolkit/zipObject', () => {\n    zipObjectToolkit([1, 2, 3, 4], ['a', 'b', 'c', 'd']);\n  });\n\n  bench('es-toolkit/compat/zipObject', () => {\n    zipObjectToolkitCompat([1, 2, 3, 4], ['a', 'b', 'c', 'd']);\n  });\n\n  bench('lodash/zipObject', () => {\n    zipObjectLodash([1, 2, 3, 4], ['a', 'b', 'c', 'd']);\n  });\n});\n\ndescribe('zipObject/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/zipObject', () => {\n    zipObjectToolkit(largeArray, largeArray);\n  });\n\n  bench('es-toolkit/compat/zipObject', () => {\n    zipObjectToolkitCompat(largeArray, largeArray);\n  });\n\n  bench('lodash/zipObject', () => {\n    zipObjectLodash(largeArray, largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/zipObjectDeep.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { zipObjectDeep as zipObjectDeepToolkit_ } from 'es-toolkit/compat';\nimport { zipObjectDeep as zipObjectDeepLodash_ } from 'lodash';\n\nconst zipObjectDeepToolkit = zipObjectDeepToolkit_;\nconst zipObjectDeepLodash = zipObjectDeepLodash_;\n\ndescribe('zipObjectDeep', () => {\n  bench('es-toolkit/zipObjectDeep', () => {\n    zipObjectDeepToolkit(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n  });\n\n  bench('lodash/zipObjectDeep', () => {\n    zipObjectDeepLodash(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n  });\n});\n\ndescribe('zipObjectDeep/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => `a.b[${i}].c${i}`);\n\n  bench('es-toolkit/zipObjectDeep', () => {\n    zipObjectDeepToolkit(largeArray, largeArray);\n  });\n\n  bench('lodash/zipObjectDeep', () => {\n    zipObjectDeepLodash(largeArray, largeArray);\n  });\n});\n"
  },
  {
    "path": "benchmarks/performance/zipWith.bench.ts",
    "content": "import { bench, describe } from 'vitest';\nimport { zipWith as zipWithToolkit_ } from 'es-toolkit';\nimport { zipWith as zipWithToolkitCompat_ } from 'es-toolkit/compat';\nimport { zipWith as zipWithLodash_ } from 'lodash';\n\nconst zipWithToolkit = zipWithToolkit_;\nconst zipWithToolkitCompat = zipWithToolkitCompat_;\nconst zipWithLodash = zipWithLodash_;\n\ndescribe('zipWith', () => {\n  bench('es-toolkit/zipWith', () => {\n    const arr1 = [1, 2];\n    const arr2 = [3, 4];\n    const arr3 = [5, 6];\n    zipWithToolkit(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n  });\n\n  bench('es-toolkit/compat/zipWith', () => {\n    const arr1 = [1, 2];\n    const arr2 = [3, 4];\n    const arr3 = [5, 6];\n    zipWithToolkitCompat(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n  });\n\n  bench('lodash/zipWith', () => {\n    const arr1 = [1, 2];\n    const arr2 = [3, 4];\n    const arr3 = [5, 6];\n    zipWithLodash(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n  });\n});\n\ndescribe('zipWith/largeArray', () => {\n  const largeArray = Array.from({ length: 10000 }, (_, i) => i);\n\n  bench('es-toolkit/zipWith', () => {\n    zipWithToolkit(largeArray, largeArray, largeArray, (a, b, c) => a + b + c);\n  });\n\n  bench('es-toolkit/compat/zipWith', () => {\n    zipWithToolkitCompat(largeArray, largeArray, largeArray, (a, b, c) => a + b + c);\n  });\n\n  bench('lodash/zipWith', () => {\n    zipWithLodash(largeArray, largeArray, largeArray, (a, b, c) => a + b + c);\n  });\n});\n"
  },
  {
    "path": "codecov.yml",
    "content": "coverage:\n  status:\n    patch: off\n    project:\n      default:\n        target: 100%\n        threshold: 10%\n\ncomment:\n  layout: 'header, reach, diff, flags, components'\n\nignore:\n  - '**/*.spec.ts'\n"
  },
  {
    "path": "docs/.gitignore",
    "content": ".vitepress/cache"
  },
  {
    "path": "docs/.vitepress/components/Banner.vue",
    "content": "<template>\n  <div v-if=\"shouldShowBanner && currentBanner\" class=\"custom-banner-container\">\n    <div class=\"custom-banner-box\">\n      <a\n        :href=\"currentBanner.link\"\n        target=\"_blank\"\n        rel=\"noopener noreferrer\"\n        class=\"custom-banner-link\"\n        @click=\"currentBanner && trackBannerClick(currentBanner)\"\n      >\n        <div class=\"custom-banner-content\">\n          <div class=\"custom-banner-title\">{{ currentBanner.title }}</div>\n          <div class=\"custom-banner-description\">\n            {{ currentBanner.description }}\n          </div>\n        </div>\n      </a>\n      <div class=\"custom-banner-controls\">\n        <button\n          v-for=\"(_, index) in banners\"\n          :key=\"index\"\n          :class=\"['custom-banner-dot', { active: currentBannerIndex === index }]\"\n          @click=\"setBannerIndex(index)\"\n        />\n      </div>\n    </div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useBanner } from '../composables';\n\nconst { banners, currentBanner, setBannerIndex, trackBannerClick, currentBannerIndex, shouldShowBanner } = useBanner();\n</script>\n\n<style scoped>\n.custom-banner-container {\n  margin: 24px 0;\n  border-radius: 8px;\n  overflow: hidden;\n  position: fixed;\n  bottom: 24px;\n  right: 24px;\n  width: 224px;\n  background-color: var(--vp-c-bg-soft);\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n  transition: transform 0.2s ease;\n  z-index: 10;\n}\n.custom-banner-container:hover {\n  transform: translateY(-2px);\n}\n.custom-banner-box {\n  padding: 16px;\n  display: flex;\n  flex-direction: column;\n}\n.custom-banner-link {\n  display: flex;\n  text-decoration: none;\n  color: inherit;\n}\n.custom-banner-image-wrapper {\n  width: 64px;\n  height: 64px;\n  margin-right: 12px;\n  overflow: hidden;\n  border-radius: 6px;\n}\n.custom-banner-image {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n.custom-banner-content {\n  flex: 1;\n}\n.custom-banner-title {\n  font-weight: 600;\n  font-size: 14px;\n  line-height: 1.4;\n  margin-bottom: 4px;\n  color: var(--vp-c-text-1);\n}\n.custom-banner-description {\n  font-size: 13px;\n  line-height: 1.4;\n  color: var(--vp-c-text-2);\n}\n.custom-banner-label {\n  margin-top: 8px;\n  font-size: 11px;\n  text-transform: uppercase;\n  color: var(--vp-c-text-3);\n  text-align: right;\n}\n.custom-banner-controls {\n  display: flex;\n  justify-content: center;\n  margin-top: 12px;\n}\n.custom-banner-dot {\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background-color: var(--vp-c-text-3);\n  margin: 0 4px;\n  padding: 0;\n  border: none;\n  opacity: 0.5;\n  cursor: pointer;\n  transition: opacity 0.2s ease;\n}\n.custom-banner-dot.active {\n  opacity: 1;\n  background-color: var(--vp-c-brand);\n}\n@media (max-width: 768px) {\n  .custom-banner-container {\n    position: static;\n    width: 100%;\n    margin-top: 24px;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/.vitepress/components/BundleSizeChart.vue",
    "content": "<template>\n  <div :style=\"{ width: '100%', height: computedHeight + 'px' }\">\n    <Bar :data=\"chartData\" :options=\"options\" />\n  </div>\n</template>\n\n<script setup>\nimport { BarElement, CategoryScale, Chart as ChartJS, Legend, LinearScale, Title, Tooltip } from 'chart.js';\nimport { Bar } from 'vue-chartjs';\nimport data from '../../data/bundle-size.json';\n\nChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale);\nconst labels = Object.keys(data.data || {});\nconst seriesKeys = Object.keys(data.labels || {});\n\nconst PALETTE = [\n  { bg: 'rgba(59,130,246,0.9)', border: 'rgba(59,130,246,1)' },\n  { bg: 'rgba(239,68,68,0.9)', border: 'rgba(239,68,68,1)' },\n  { bg: 'rgba(16,185,129,0.9)', border: 'rgba(16,185,129,1)' },\n  { bg: 'rgba(249,115,22,0.9)', border: 'rgba(249,115,22,1)' },\n];\n\nconst rowHeight = 48;\nconst minHeight = 200;\nconst extraPadding = 40;\nconst computedHeight = Math.max(minHeight, labels.length * rowHeight + extraPadding);\n\nconst datasets = seriesKeys.map((key, idx) => {\n  const values = labels.map(fn => (data.data[fn] && Number(data.data[fn][key])) || 0);\n  const color = PALETTE[idx % PALETTE.length];\n  return {\n    label: data.labels[key] || key,\n    data: values,\n    backgroundColor: color.bg,\n    borderColor: color.border,\n    borderWidth: 0,\n    barThickness: 18,\n  };\n});\n\nconst chartData = {\n  labels,\n  datasets,\n};\n\nconst options = {\n  indexAxis: 'y',\n  responsive: true,\n  maintainAspectRatio: false,\n  animation: {\n    duration: 0,\n  },\n  interaction: {\n    mode: 'nearest',\n    intersect: true,\n  },\n  plugins: {\n    title: {\n      display: false,\n    },\n    legend: {\n      display: true,\n      position: 'top',\n      align: 'center',\n    },\n    tooltip: {\n      enabled: true,\n      mode: 'nearest',\n      intersect: true,\n      position: 'nearest',\n    },\n  },\n  scales: {\n    x: {\n      beginAtZero: true,\n      ticks: {\n        precision: 0,\n      },\n      grid: {\n        display: true,\n        drawBorder: false,\n      },\n      title: {\n        display: true,\n        text: 'Bundle Size (in bytes)',\n      },\n    },\n    y: {\n      grid: {\n        display: false,\n      },\n    },\n  },\n};\n</script>\n"
  },
  {
    "path": "docs/.vitepress/components/BundleSizeTable.vue",
    "content": "<template>\n  <div class=\"bundle-size-table\">\n    <table>\n      <thead>\n        <tr>\n          <th />\n          <th v-for=\"k in seriesKeys\" :key=\"k\">\n            {{ labels[k] }}\n          </th>\n          <th v-if=\"seriesKeys.length >= 2\">Difference</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in rows\" :key=\"row.name\">\n          <td>\n            {{ row.name }}\n          </td>\n          <td v-for=\"(val, i) in row.values\" :key=\"i\">\n            {{ formatBytes(val) }}\n          </td>\n          <td v-if=\"seriesKeys.length >= 2\">\n            {{ formatPercent(row.diffPercent) }}\n          </td>\n        </tr>\n      </tbody>\n    </table>\n  </div>\n</template>\n\n<script setup>\nimport raw from '../../data/bundle-size.json';\n\nconst data = raw.data || {};\nconst labels = raw.labels || {};\nconst seriesKeys = Object.keys(labels);\n\nconst rows = Object.keys(data).map(name => {\n  const item = data[name] || {};\n  const values = seriesKeys.map(k => Number(item[k] || 0));\n  let diffPercent = 0;\n  if (values.length >= 2 && values[1]) {\n    diffPercent = ((values[0] - values[1]) / values[1]) * 100;\n  }\n  return { name, values, diffPercent };\n});\n\nfunction formatBytes(n) {\n  return `${n} bytes`;\n}\n\nfunction formatPercent(v) {\n  return `${v.toFixed(1)}%`;\n}\n</script>\n"
  },
  {
    "path": "docs/.vitepress/components/CompatibilityStatus.vue",
    "content": "<script setup>\nimport { data } from '../libs/compatibility.data.mts';\n\nconst props = defineProps({\n  lang: String,\n});\n\nconst localized = {\n  en: {\n    functionName: 'Function Name',\n    implementationStatus: 'Implementation Status',\n    method: 'method',\n    noSupport: 'No support',\n  },\n  ko: {\n    functionName: '함수 이름',\n    implementationStatus: '구현 상태',\n    method: '메소드',\n    noSupport: '지원하지 않음',\n  },\n  ja: {\n    functionName: '関数名',\n    implementationStatus: '実装状況',\n    method: 'メソッド',\n    noSupport: 'サポートなし',\n  },\n  zh_hans: {\n    functionName: '函数名称',\n    implementationStatus: '实现状态',\n    method: '工具',\n    noSupport: '不支持',\n  },\n};\n\nconst categories = Object.keys(data);\nconst titles = categories.map(\n  category => `\"${category.charAt(0).toUpperCase()}${category.slice(1)}\" ${localized[props.lang].method}`\n);\nconst ids = titles.map(title => title.toLowerCase().replaceAll('\"', '').replace(' ', '-'));\n</script>\n\n<template>\n  <template v-for=\"(category, index) in categories\" :key=\"category\">\n    <h3 :id=\"ids[index]\" tabindex=\"-1\">\n      {{ titles[index] }}\n      <a class=\"header-anchor\" :href=\"`#${ids[index]}`\" :aria-label=\"`Permalink to ${ids[index]}`\" />\n    </h3>\n    <table tabindex=\"0\">\n      <thead>\n        <tr>\n          <th>{{ localized[props.lang].functionName }}</th>\n          <th>{{ localized[props.lang].implementationStatus }}</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"item in data[category]\" :key=\"item.name\">\n          <td>\n            <a :href=\"`https://lodash.com/docs/4.17.15#${item.name}`\" target=\"_blank\" rel=\"noopener noreferrer\">\n              {{ item.name }}\n            </a>\n          </td>\n          <td v-if=\"item.status === 'No support'\">\n            {{ localized[props.lang].noSupport }}\n          </td>\n          <td v-else>\n            {{ item.status }}\n          </td>\n        </tr>\n      </tbody>\n    </table>\n  </template>\n</template>\n"
  },
  {
    "path": "docs/.vitepress/components/Sandpack.vue",
    "content": "<template>\n  <Sandbox\n    :rtl=\"rtl\"\n    template=\"vanilla-ts\"\n    :light-theme=\"lightTheme\"\n    :dark-theme=\"darkTheme\"\n    :options=\"{\n      ...props,\n      showLineNumbers: true,\n      showConsole: true,\n      showTabs: false,\n    }\"\n    :custom-setup=\"{\n      ...props,\n      deps: {\n        'es-toolkit': 'latest',\n      },\n    }\"\n    :code-options=\"codeOptions\"\n  >\n    <slot />\n  </Sandbox>\n</template>\n\n<script setup>\nimport { Sandbox, sandboxProps } from 'vitepress-plugin-sandpack';\n\nconst props = defineProps(sandboxProps);\n</script>\n\n<style>\n.sp-preview {\n  display: none !important;\n}\n.dark {\n  color-scheme: dark;\n}\n</style>\n"
  },
  {
    "path": "docs/.vitepress/composables/index.ts",
    "content": "export * from './useBanner';\n"
  },
  {
    "path": "docs/.vitepress/composables/useBanner.ts",
    "content": "import { computed, onMounted, ref } from 'vue';\nimport { type Banner, EN_BANNER_DATA, KO_BANNER_DATA } from '../data/bannerData';\n\nexport function useBanner() {\n  const currentLang = ref<string | null>(null);\n  const banners = computed<Banner[]>(() => {\n    if (currentLang.value === 'ko') {\n      return KO_BANNER_DATA;\n    }\n    if (currentLang.value === 'en') {\n      return EN_BANNER_DATA;\n    }\n    return [];\n  });\n\n  const shouldShowBanner = computed(() => {\n    return banners.value.length > 0;\n  });\n\n  const currentBannerIndex = ref(0);\n\n  const currentBanner = computed(() => {\n    if (!shouldShowBanner.value) {\n      return null;\n    }\n    return banners.value[currentBannerIndex.value];\n  });\n\n  const rotationInterval = 30000;\n\n  const rotateBanner = () => {\n    if (!shouldShowBanner.value) {\n      return;\n    }\n    currentBannerIndex.value = (currentBannerIndex.value + 1) % banners.value.length;\n  };\n\n  const getRandomBannerIndex = () => {\n    return Math.floor(Math.random() * banners.value.length);\n  };\n\n  let intervalId: ReturnType<typeof setInterval> | null = null;\n\n  const updateCurrentLang = () => {\n    const newLang = getCurrentLang();\n    if (newLang !== currentLang.value) {\n      currentLang.value = newLang;\n\n      if (shouldShowBanner.value) {\n        currentBannerIndex.value = getRandomBannerIndex();\n      }\n    }\n  };\n\n  onMounted(() => {\n    updateCurrentLang();\n\n    if (!shouldShowBanner.value) {\n      return;\n    }\n\n    currentBannerIndex.value = getRandomBannerIndex();\n\n    intervalId = setInterval(rotateBanner, rotationInterval);\n\n    window.addEventListener('popstate', updateCurrentLang);\n\n    const originalPushState = history.pushState;\n    history.pushState = function (...args) {\n      originalPushState.apply(this, args);\n      updateCurrentLang();\n    };\n\n    return () => {\n      if (intervalId) {\n        clearInterval(intervalId);\n      }\n      window.removeEventListener('popstate', updateCurrentLang);\n      history.pushState = originalPushState;\n    };\n  });\n\n  const setBannerIndex = (index: number) => {\n    if (!shouldShowBanner.value) {\n      return;\n    }\n    if (index >= 0 && index < banners.value.length) {\n      currentBannerIndex.value = index;\n    }\n  };\n\n  const trackBannerClick = (banner: Banner) => {\n    console.log('Banner clicked:', banner.title);\n  };\n\n  return {\n    banners,\n    currentBanner,\n    currentBannerIndex,\n    rotateBanner,\n    setBannerIndex,\n    trackBannerClick,\n    shouldShowBanner,\n  };\n}\n\nconst getCurrentLang = (): string | null => {\n  if (typeof window === 'undefined') {\n    return null;\n  }\n\n  const path = window.location.pathname;\n  if (path.startsWith('/ko/')) {\n    return 'ko';\n  }\n  if (path.startsWith('/zh_hans/') || path.startsWith('/ja/')) {\n    return null;\n  }\n  return 'en';\n};\n"
  },
  {
    "path": "docs/.vitepress/config.mts",
    "content": "import container from 'markdown-it-container';\nimport { defineConfig } from 'vitepress';\nimport { renderSandbox } from 'vitepress-plugin-sandpack';\nimport { en } from './en.mts';\nimport { ja } from './ja.mts';\nimport { ko } from './ko.mts';\nimport { shared } from './shared.mts';\nimport { zh_hans } from './zh_hans.mts';\n\nexport default defineConfig({\n  ...shared,\n  locales: {\n    root: { label: 'English', ...en },\n    ko: { label: '한국어', ...ko },\n    zh_hans: { label: '简体中文', ...zh_hans },\n    ja: { label: '日本語', ...ja },\n  },\n  markdown: {\n    config(md) {\n      md.use(container, 'sandpack', {\n        render(tokens: any[], idx: number) {\n          return renderSandbox(tokens, idx, 'sandpack');\n        },\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/data/bannerData.ts",
    "content": "export interface Banner {\n  title: string;\n  description: string;\n  link: string;\n}\n\nexport const KO_BANNER_DATA: Banner[] = [\n  {\n    title: '🛠️ frontend-fundamentals',\n    description: '프론트엔드 코드를 더 잘 짜는 방법을 고민하고 있나요? 실무에서 비롯한 원칙과 예시들을 모아봤어요.',\n    link: 'https://frontend-fundamentals.com/code-quality',\n  },\n  {\n    title: '🇰🇷 es-hangul',\n    description: '조사 붙이기, 초성 검색 같은 한글 작업을 쉽게 처리해주는 라이브러리예요.',\n    link: 'https://github.com/toss/es-hangul',\n  },\n  {\n    title: '⏳ suspensive',\n    description: 'React Suspense를 실무에서 더 쉽게 활용하고 싶으신가요? 비동기 데이터 로딩을 간결하게 처리해보세요.',\n    link: 'https://github.com/toss/suspensive',\n  },\n  {\n    title: '🧩 use-funnel',\n    description:\n      '회원가입이나 결제처럼 여러 단계로 이뤄진 화면, 관리하기 복잡하죠? useFunnel 훅으로 깔끔하게 정리해보세요.',\n    link: 'https://github.com/toss/use-funnel',\n  },\n  {\n    title: '✨ overlay-kit',\n    description: '오버레이, 매번 같은 코드를 반복하고 계신가요? 선언적인 코드로 모달/팝오버 컴포넌트를 작성해보세요.',\n    link: 'https://github.com/toss/overlay-kit',\n  },\n];\n\nexport const EN_BANNER_DATA: Banner[] = [\n  {\n    title: '🛠️ frontend-fundamentals',\n    description: 'Your compass for better code. Four core principles for writing easily modifiable frontend code.',\n    link: 'https://frontend-fundamentals.com/code-quality/en',\n  },\n  {\n    title: '⏳ suspensive',\n    description: 'Make React Suspense easy. Less code, more power for async operations.',\n    link: 'https://github.com/toss/suspensive',\n  },\n  {\n    title: '🧩 use-funnel',\n    description: 'Multi-step flows made simple. Perfect for funnels such as signup, checkout, and onboarding flows.',\n    link: 'https://github.com/toss/use-funnel',\n  },\n  {\n    title: '✨ overlay-kit',\n    description: 'Modals and popovers with declarative API and type safety. Build rich UIs without breaking your flow.',\n    link: 'https://github.com/toss/overlay-kit',\n  },\n];\n"
  },
  {
    "path": "docs/.vitepress/en.mts",
    "content": "import path from 'node:path';\nimport { type DefaultTheme, defineConfig } from 'vitepress';\nimport { getSidebarItems } from './libs/getSidebarItems.mts';\nimport { sortByText } from './libs/sortByText.mts';\n\nconst docsRoot = path.resolve(import.meta.dirname, '..');\n\nexport const en = defineConfig({\n  lang: 'en',\n  description:\n    'A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.',\n\n  themeConfig: {\n    darkModeSwitchLabel: 'Dark Mode',\n\n    nav: nav(),\n\n    sidebar: sidebar(),\n\n    editLink: {\n      pattern: 'https://github.com/toss/es-toolkit/edit/main/docs/:path',\n      text: 'Edit this page on GitHub',\n    },\n\n    footer: {\n      message: 'Released under the MIT License.',\n      copyright: `Copyright © ${new Date().getFullYear()} Viva Republica, Inc.`,\n    },\n  },\n});\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: 'Home', link: '/' },\n    { text: 'Introduction', link: '/intro' },\n    { text: 'Reference', link: '/reference/array/at' },\n    { text: 'Lodash Compatibility', link: '/reference/compat/array/castArray' },\n  ];\n}\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: 'Guide',\n      items: [\n        { text: 'Introduction', link: '/intro' },\n        { text: 'Installation & Usage', link: '/usage' },\n        { text: 'Impact on Bundle Size', link: '/bundle-size' },\n        { text: 'Performance', link: '/performance' },\n        { text: 'Lodash Compatibility', link: '/compatibility' },\n        { text: 'AI Integration', link: '/llms-txt' },\n      ],\n    },\n    {\n      text: 'Reference',\n      items: sortByText([\n        {\n          text: 'Array Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'array'),\n        },\n        {\n          text: 'Function Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'function'),\n        },\n        {\n          text: 'Map Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'map'),\n        },\n        {\n          text: 'Math Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'math'),\n        },\n        {\n          text: 'Object Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'object'),\n        },\n        {\n          text: 'Predicates',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'predicate'),\n        },\n        {\n          text: 'Promise Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'promise'),\n        },\n        {\n          text: 'String Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'string'),\n        },\n        {\n          text: 'Set Utilities',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'set'),\n        },\n        {\n          text: 'Utility Functions',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'util'),\n        },\n        {\n          text: 'Errors',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'reference', 'error'),\n        },\n      ]),\n    },\n    {\n      text: 'Lodash Compatibility',\n      items: [\n        {\n          text: 'Reference',\n          items: sortByText([\n            {\n              text: 'Array Utilities',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'array'),\n            },\n            {\n              text: 'Function Utilities',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'function'),\n            },\n            {\n              text: 'Math Utilities',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'math'),\n            },\n            {\n              text: 'Object Utilities',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'object'),\n            },\n            {\n              text: 'Predicates',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'predicate'),\n            },\n            {\n              text: 'String Utilities',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'string'),\n            },\n            {\n              text: 'Utility Functions',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'reference', 'compat', 'util'),\n            },\n          ]),\n        },\n      ],\n    },\n  ];\n}\n"
  },
  {
    "path": "docs/.vitepress/ja.mts",
    "content": "import path from 'node:path';\nimport { type DefaultTheme, defineConfig } from 'vitepress';\nimport { getSidebarItems } from './libs/getSidebarItems.mts';\nimport { sortByText } from './libs/sortByText.mts';\n\nconst docsRoot = path.resolve(import.meta.dirname, '..');\n\nexport const ja = defineConfig({\n  lang: 'ja',\n  description: '高速なパフォーマンスと小さなバンドルサイズを持つ最先端のJavaScriptユーティリティライブラリ',\n\n  themeConfig: {\n    darkModeSwitchLabel: 'ダークモード',\n\n    nav: nav(),\n\n    sidebar: sidebar(),\n\n    editLink: {\n      pattern: 'https://github.com/toss/es-toolkit/edit/main/docs/:path',\n      text: 'GitHubで編集する',\n    },\n\n    footer: {\n      message: 'MIT ライセンスの下で配布されています。',\n      copyright: `Copyright © ${new Date().getFullYear()} Viva Republica, Inc.`,\n    },\n  },\n});\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: 'ホーム', link: '/ja' },\n    { text: '導入', link: '/ja/intro' },\n    { text: 'リファレンス', link: '/ja/reference/array/at' },\n    { text: 'Lodash 互換性', link: '/ja/reference/compat/array/castArray' },\n  ];\n}\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: 'ガイド',\n      items: [\n        { text: '紹介', link: '/ja/intro' },\n        { text: 'インストールと使用方法', link: '/ja/usage' },\n        { text: 'バンドルサイズ', link: '/ja/bundle-size' },\n        { text: 'パフォーマンス', link: '/ja/performance' },\n        { text: 'Lodash 互換性', link: '/ja/compatibility' },\n        { text: 'AI 連携', link: '/ja/llms-txt' },\n      ],\n    },\n    {\n      text: 'リファレンス',\n      items: sortByText([\n        {\n          text: '配列',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'array'),\n        },\n        {\n          text: '関数',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'function'),\n        },\n        {\n          text: 'Map',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'map'),\n        },\n        {\n          text: '数学',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'math'),\n        },\n        {\n          text: 'オブジェクト',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'object'),\n        },\n        {\n          text: '述語',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'predicate'),\n        },\n        {\n          text: 'Promise',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'promise'),\n        },\n        {\n          text: 'Set',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'set'),\n        },\n        {\n          text: '文字列',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'string'),\n        },\n        {\n          text: 'ユーティリティ',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'util'),\n        },\n        {\n          text: 'エラー',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ja', 'reference', 'error'),\n        },\n      ]),\n    },\n    {\n      text: 'Lodash 互換性',\n      items: [\n        {\n          text: 'リファレンス',\n          items: sortByText([\n            {\n              text: '配列',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'array'),\n            },\n            {\n              text: '関数',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'function'),\n            },\n            {\n              text: '数学',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'math'),\n            },\n            {\n              text: 'オブジェクト',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'object'),\n            },\n            {\n              text: '述語',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'predicate'),\n            },\n            {\n              text: '文字列',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'string'),\n            },\n            {\n              text: 'ユーティリティ',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ja', 'reference', 'compat', 'util'),\n            },\n          ]),\n        },\n      ],\n    },\n  ];\n}\n\nexport const search: DefaultTheme.LocalSearchOptions['locales'] = {\n  ja: {\n    translations: {\n      button: {\n        buttonText: '検索',\n        buttonAriaLabel: '検索',\n      },\n      modal: {\n        backButtonTitle: '戻る',\n        displayDetails: '詳細を表示',\n        footer: {\n          closeKeyAriaLabel: '閉じる',\n          closeText: '閉じる',\n          navigateDownKeyAriaLabel: '下へ',\n          navigateText: '移動',\n          navigateUpKeyAriaLabel: '上へ',\n          selectKeyAriaLabel: '選択',\n          selectText: '選択',\n        },\n        noResultsText: '検索結果が見つかりませんでした。',\n        resetButtonTitle: 'すべてクリア',\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "docs/.vitepress/ko.mts",
    "content": "import path from 'node:path';\nimport { type DefaultTheme, defineConfig } from 'vitepress';\nimport { getSidebarItems } from './libs/getSidebarItems.mts';\nimport { sortByText } from './libs/sortByText.mts';\n\nconst docsRoot = path.resolve(import.meta.dirname, '..');\n\nexport const ko = defineConfig({\n  lang: 'ko',\n  description: '빠른 성능, 작은 번들 사이즈를 가지는 현대적인 JavaScript 유틸리티 라이브러리',\n\n  themeConfig: {\n    darkModeSwitchLabel: '다크 모드',\n\n    nav: nav(),\n\n    sidebar: sidebar(),\n\n    editLink: {\n      pattern: 'https://github.com/toss/es-toolkit/edit/main/docs/:path',\n      text: 'GitHub에서 수정하기',\n    },\n\n    footer: {\n      message: 'MIT 라이선스에 따라 배포됩니다.',\n      copyright: `Copyright © ${new Date().getFullYear()} Viva Republica, Inc.`,\n    },\n  },\n});\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: '홈', link: '/ko' },\n    { text: '소개', link: '/ko/intro' },\n    { text: '레퍼런스', link: '/ko/reference/array/at' },\n    { text: 'Lodash 호환성', link: '/ko/reference/compat/array/castArray' },\n  ];\n}\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: '가이드',\n      items: [\n        { text: '소개', link: '/ko/intro' },\n        { text: '설치 및 사용 방법', link: '/ko/usage' },\n        { text: '번들 사이즈', link: '/ko/bundle-size' },\n        { text: '성능', link: '/ko/performance' },\n        { text: 'Lodash 호환성', link: '/ko/compatibility' },\n        { text: 'AI 활용', link: '/ko/llms-txt' },\n      ],\n    },\n    {\n      text: '레퍼런스',\n      items: sortByText([\n        {\n          text: '배열',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'array'),\n        },\n        {\n          text: '함수',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'function'),\n        },\n        {\n          text: 'Map',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'map'),\n        },\n        {\n          text: '숫자',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'math'),\n        },\n        {\n          text: '객체',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'object'),\n        },\n        {\n          text: '타입 가드',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'predicate'),\n        },\n        {\n          text: 'Promise',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'promise'),\n        },\n        {\n          text: 'Set',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'set'),\n        },\n        {\n          text: '문자열',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'string'),\n        },\n        {\n          text: '유틸리티',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'util'),\n        },\n        {\n          text: '에러',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'ko', 'reference', 'error'),\n        },\n      ]),\n    },\n    {\n      text: 'Lodash 호환성',\n      items: [\n        {\n          text: '레퍼런스',\n          items: sortByText([\n            {\n              text: '배열',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'array'),\n            },\n            {\n              text: '함수',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'function'),\n            },\n            {\n              text: '숫자',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'math'),\n            },\n            {\n              text: '객체',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'object'),\n            },\n            {\n              text: '타입 가드',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'predicate'),\n            },\n            {\n              text: '문자열',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'string'),\n            },\n            {\n              text: '유틸리티',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'ko', 'reference', 'compat', 'util'),\n            },\n          ]),\n        },\n      ],\n    },\n  ];\n}\n\nexport const search: DefaultTheme.LocalSearchOptions['locales'] = {\n  ko: {\n    translations: {\n      button: {\n        buttonText: '검색',\n        buttonAriaLabel: '검색',\n      },\n      modal: {\n        backButtonTitle: '뒤로가기',\n        displayDetails: '더보기',\n        footer: {\n          closeKeyAriaLabel: '닫기',\n          closeText: '닫기',\n          navigateDownKeyAriaLabel: '아래로',\n          navigateText: '이동',\n          navigateUpKeyAriaLabel: '위로',\n          selectKeyAriaLabel: '선택',\n          selectText: '선택',\n        },\n        noResultsText: '검색 결과를 찾지 못했어요.',\n        resetButtonTitle: '모두 지우기',\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "docs/.vitepress/libs/compatibility.data.mts",
    "content": "import { readdirSync } from 'fs';\nimport { resolve } from 'path';\nimport functions from './functions.json';\n\nexport default {\n  load() {\n    const categories = Object.keys(functions);\n    const status = Object.fromEntries(\n      Object.values(functions)\n        .flat()\n        .map((fn: string) => [fn, '❌'])\n    );\n\n    const srcDirname = resolve(import.meta.dirname, '../../../src');\n    const excludeDirnames = ['_internal'];\n    const noSupports = ['sortedUniq', 'sortedUniqBy', 'mixin', 'noConflict', 'runInContext'];\n\n    const dirnames = [srcDirname];\n\n    while (dirnames.length) {\n      const curDirname = dirnames.pop() as string;\n      const files = readdirSync(curDirname, { withFileTypes: true });\n      const subDirnames = files\n        .filter(dirent => dirent.isDirectory() && !excludeDirnames.some(exclude => dirent.name === exclude))\n        .map(dirent => resolve(curDirname, dirent.name));\n\n      // For searching subdirectories\n      dirnames.push(...subDirnames);\n\n      const functions = files\n        .filter(dirent => dirent.isFile() && dirent.name.endsWith('.spec.ts'))\n        .map(dirent => dirent.name.replace('.spec.ts', ''));\n\n      for (const fn of functions) {\n        if (curDirname.includes('/compat/')) {\n          status[fn] = '✅';\n        } else if (status[fn] === '❌') {\n          status[fn] = '📝';\n        }\n      }\n    }\n\n    for (const fn of noSupports) {\n      status[fn] = 'No support';\n    }\n\n    return Object.fromEntries(\n      categories.map(category => {\n        return [\n          category,\n          functions[category].map((fn: string) => ({\n            name: fn,\n            status: status[fn],\n          })),\n        ];\n      })\n    );\n  },\n};\n"
  },
  {
    "path": "docs/.vitepress/libs/functions.json",
    "content": "{\n  \"array\": [\n    \"chunk\",\n    \"compact\",\n    \"concat\",\n    \"difference\",\n    \"differenceBy\",\n    \"differenceWith\",\n    \"drop\",\n    \"dropRight\",\n    \"dropRightWhile\",\n    \"dropWhile\",\n    \"fill\",\n    \"findIndex\",\n    \"findLastIndex\",\n    \"flatten\",\n    \"flattenDeep\",\n    \"flattenDepth\",\n    \"fromPairs\",\n    \"head\",\n    \"indexOf\",\n    \"initial\",\n    \"intersection\",\n    \"intersectionBy\",\n    \"intersectionWith\",\n    \"join\",\n    \"last\",\n    \"lastIndexOf\",\n    \"nth\",\n    \"pull\",\n    \"pullAll\",\n    \"pullAllBy\",\n    \"pullAllWith\",\n    \"pullAt\",\n    \"remove\",\n    \"reverse\",\n    \"slice\",\n    \"sortedIndex\",\n    \"sortedIndexBy\",\n    \"sortedIndexOf\",\n    \"sortedLastIndex\",\n    \"sortedLastIndexBy\",\n    \"sortedLastIndexOf\",\n    \"sortedUniq\",\n    \"sortedUniqBy\",\n    \"tail\",\n    \"take\",\n    \"takeRight\",\n    \"takeRightWhile\",\n    \"takeWhile\",\n    \"union\",\n    \"unionBy\",\n    \"unionWith\",\n    \"uniq\",\n    \"uniqBy\",\n    \"uniqWith\",\n    \"unzip\",\n    \"unzipWith\",\n    \"without\",\n    \"xor\",\n    \"xorBy\",\n    \"xorWith\",\n    \"zip\",\n    \"zipObject\",\n    \"zipObjectDeep\",\n    \"zipWith\"\n  ],\n  \"collection\": [\n    \"countBy\",\n    \"every\",\n    \"filter\",\n    \"find\",\n    \"findLast\",\n    \"flatMap\",\n    \"flatMapDeep\",\n    \"flatMapDepth\",\n    \"forEach\",\n    \"forEachRight\",\n    \"groupBy\",\n    \"includes\",\n    \"invokeMap\",\n    \"keyBy\",\n    \"map\",\n    \"orderBy\",\n    \"partition\",\n    \"reduce\",\n    \"reduceRight\",\n    \"reject\",\n    \"sample\",\n    \"sampleSize\",\n    \"shuffle\",\n    \"size\",\n    \"some\",\n    \"sortBy\"\n  ],\n  \"date\": [\"now\"],\n  \"function\": [\n    \"after\",\n    \"ary\",\n    \"before\",\n    \"bind\",\n    \"bindKey\",\n    \"curry\",\n    \"curryRight\",\n    \"debounce\",\n    \"defer\",\n    \"delay\",\n    \"flip\",\n    \"memoize\",\n    \"negate\",\n    \"once\",\n    \"overArgs\",\n    \"partial\",\n    \"partialRight\",\n    \"rearg\",\n    \"rest\",\n    \"spread\",\n    \"throttle\",\n    \"unary\",\n    \"wrap\"\n  ],\n  \"lang\": [\n    \"castArray\",\n    \"clone\",\n    \"cloneDeep\",\n    \"cloneDeepWith\",\n    \"cloneWith\",\n    \"conformsTo\",\n    \"eq\",\n    \"gt\",\n    \"gte\",\n    \"isArguments\",\n    \"isArray\",\n    \"isArrayBuffer\",\n    \"isArrayLike\",\n    \"isArrayLikeObject\",\n    \"isBoolean\",\n    \"isBuffer\",\n    \"isDate\",\n    \"isElement\",\n    \"isEmpty\",\n    \"isEqual\",\n    \"isEqualWith\",\n    \"isError\",\n    \"isFinite\",\n    \"isFunction\",\n    \"isInteger\",\n    \"isLength\",\n    \"isMap\",\n    \"isMatch\",\n    \"isMatchWith\",\n    \"isNaN\",\n    \"isNative\",\n    \"isNil\",\n    \"isNull\",\n    \"isNumber\",\n    \"isObject\",\n    \"isObjectLike\",\n    \"isPlainObject\",\n    \"isRegExp\",\n    \"isSafeInteger\",\n    \"isSet\",\n    \"isString\",\n    \"isSymbol\",\n    \"isTypedArray\",\n    \"isUndefined\",\n    \"isWeakMap\",\n    \"isWeakSet\",\n    \"lt\",\n    \"lte\",\n    \"toArray\",\n    \"toFinite\",\n    \"toInteger\",\n    \"toLength\",\n    \"toNumber\",\n    \"toPlainObject\",\n    \"toSafeInteger\",\n    \"toString\"\n  ],\n  \"math\": [\n    \"add\",\n    \"ceil\",\n    \"divide\",\n    \"floor\",\n    \"max\",\n    \"maxBy\",\n    \"mean\",\n    \"meanBy\",\n    \"min\",\n    \"minBy\",\n    \"multiply\",\n    \"round\",\n    \"subtract\",\n    \"sum\",\n    \"sumBy\"\n  ],\n  \"number\": [\"clamp\", \"inRange\", \"random\"],\n  \"object\": [\n    \"assign\",\n    \"assignIn\",\n    \"assignInWith\",\n    \"assignWith\",\n    \"at\",\n    \"create\",\n    \"defaults\",\n    \"defaultsDeep\",\n    \"findKey\",\n    \"findLastKey\",\n    \"forIn\",\n    \"forInRight\",\n    \"forOwn\",\n    \"forOwnRight\",\n    \"functions\",\n    \"functionsIn\",\n    \"get\",\n    \"has\",\n    \"hasIn\",\n    \"invert\",\n    \"invertBy\",\n    \"invoke\",\n    \"keys\",\n    \"keysIn\",\n    \"mapKeys\",\n    \"mapValues\",\n    \"merge\",\n    \"mergeWith\",\n    \"omit\",\n    \"omitBy\",\n    \"pick\",\n    \"pickBy\",\n    \"result\",\n    \"set\",\n    \"setWith\",\n    \"toPairs\",\n    \"toPairsIn\",\n    \"transform\",\n    \"unset\",\n    \"update\",\n    \"updateWith\",\n    \"values\",\n    \"valuesIn\"\n  ],\n  \"string\": [\n    \"camelCase\",\n    \"capitalize\",\n    \"deburr\",\n    \"endsWith\",\n    \"escape\",\n    \"escapeRegExp\",\n    \"kebabCase\",\n    \"lowerCase\",\n    \"lowerFirst\",\n    \"pad\",\n    \"padEnd\",\n    \"padStart\",\n    \"parseInt\",\n    \"repeat\",\n    \"replace\",\n    \"snakeCase\",\n    \"split\",\n    \"startCase\",\n    \"startsWith\",\n    \"template\",\n    \"toLower\",\n    \"toUpper\",\n    \"trim\",\n    \"trimEnd\",\n    \"trimStart\",\n    \"truncate\",\n    \"unescape\",\n    \"upperCase\",\n    \"upperFirst\",\n    \"words\"\n  ],\n  \"util\": [\n    \"attempt\",\n    \"bindAll\",\n    \"cond\",\n    \"conforms\",\n    \"constant\",\n    \"defaultTo\",\n    \"flow\",\n    \"flowRight\",\n    \"identity\",\n    \"iteratee\",\n    \"matches\",\n    \"matchesProperty\",\n    \"method\",\n    \"methodOf\",\n    \"mixin\",\n    \"noConflict\",\n    \"noop\",\n    \"nthArg\",\n    \"over\",\n    \"overEvery\",\n    \"overSome\",\n    \"property\",\n    \"propertyOf\",\n    \"range\",\n    \"rangeRight\",\n    \"runInContext\",\n    \"stubArray\",\n    \"stubFalse\",\n    \"stubObject\",\n    \"stubString\",\n    \"stubTrue\",\n    \"times\",\n    \"toPath\",\n    \"uniqueId\"\n  ]\n}\n"
  },
  {
    "path": "docs/.vitepress/libs/getSidebarItems.mts",
    "content": "import glob from 'fast-glob';\nimport path from 'node:path';\nimport { DefaultTheme } from 'vitepress';\n\nexport function getSidebarItems(docsRoot: string, ...parts: string[]): DefaultTheme.SidebarItem[] {\n  const files = glob.sync(path.join(docsRoot, ...parts, '*'));\n  const paths = files.map(x => `/${path.relative(docsRoot, x)}`);\n\n  return paths.map(p => {\n    const filename = path.basename(p).replace(/\\.md$/g, '');\n\n    return {\n      text: filename,\n      link: p.replace(/\\.md$/g, ''),\n    };\n  });\n}\n"
  },
  {
    "path": "docs/.vitepress/libs/sortByText.mts",
    "content": "import { DefaultTheme } from 'vitepress';\n\nexport function sortByText(items: DefaultTheme.SidebarItem[]): DefaultTheme.SidebarItem[] {\n  return items.slice().map(item => {\n    if (item.items) {\n      item.items = item.items.sort((a, b) => {\n        if (typeof a.text === 'string' && typeof b.text === 'string') {\n          return a.text.localeCompare(b.text);\n        }\n\n        return 0;\n      });\n    }\n\n    return item;\n  });\n}\n"
  },
  {
    "path": "docs/.vitepress/shared.mts",
    "content": "import { createRequire } from 'module';\nimport path from 'path';\nimport { defineConfig } from 'vitepress';\nimport llmstxt from 'vitepress-plugin-llms';\nimport { search as koSearch } from './ko.mts';\nimport { search as zh_hansSearch } from './zh_hans.mts';\n\nconst require = createRequire(import.meta.url);\n\nexport const shared = defineConfig({\n  title: 'es-toolkit',\n\n  lastUpdated: true,\n  metaChunk: true,\n\n  /* prettier-ignore */\n  head: [\n    [\n      \"link\",\n      {\n        rel: \"icon\",\n        type: \"image/png\",\n        sizes: \"100x100\",\n        href: \"/favicon-100x100.png\",\n      },\n    ],\n    [\n      \"link\",\n      {\n        rel: \"stylesheet\",\n        href: \"https://static.toss.im/tps/main.css\"\n      }\n    ],\n    [\n      \"link\",\n      {\n        rel: \"stylesheet\",\n        href: \"https://static.toss.im/tps/others.css\"\n      }\n    ],\n    [\n      'script',\n      {},\n      `window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };`\n    ],\n    [\n      \"script\",\n      {\n        src: \"/_vercel/insights/script.js\",\n        defer: \"true\",\n      }\n    ],\n    [\n      \"script\",\n      {\n        type: \"module\",\n      },\n      `\n        import * as es from \"https://cdn.jsdelivr.net/npm/es-toolkit@latest/+esm\";\n        import * as esCompat from \"https://cdn.jsdelivr.net/npm/es-toolkit@latest/compat/+esm\";\n        window.es = es;\n        window.esCompat = esCompat;\n        setTimeout(() => {\n          console.log(\n            '%cTry es-toolkit in the console! 😃',\n            'background: #0064FF; color: white; padding: 2px 4px; border-radius: 3px;'\n          );\n          console.log(\n            '%cExample for es-toolkit',\n            'background: #0064FF; color: white; padding: 2px 4px; border-radius: 3px;'\n          );\n          console.log('%ces.at([10, 20, 30, 40, 50], [1, 3, 4]);', 'font-weight: bold;');\n          console.log('%c// [20, 40, 50]', 'font-weight: bold;');\n          console.log(\n            '%cExample for es-toolkit/compat',\n            'background: #0064FF; color: white; padding: 2px 4px; border-radius: 3px;'\n          );\n          console.log('%cesCompat.concat([1, 2, 3], [4, 5, 6]);', 'font-weight: bold;');\n          console.log('%c// [1, 2, 3, 4, 5, 6]', 'font-weight: bold;');\n        }, 1000);\n      `\n    ],\n    [\n      \"meta\",\n      {\n        property: \"og:image\",\n        content: \"/og.png\",\n      },\n    ],\n  ],\n\n  themeConfig: {\n    logo: {\n      dark: '/logo_white.png',\n      light: '/logo_black.png',\n    },\n\n    siteTitle: false,\n\n    outline: {\n      level: [2, 3],\n    },\n\n    search: {\n      provider: 'local',\n      options: {\n        locales: {\n          ...koSearch,\n          ...zh_hansSearch,\n        },\n      },\n    },\n\n    socialLinks: [\n      { icon: 'github', link: 'https://github.com/toss/es-toolkit' },\n      {\n        icon: 'npm',\n        link: 'https://www.npmjs.com/package/es-toolkit',\n        ariaLabel: 'npm',\n      },\n      {\n        icon: {\n          svg: '<svg role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>JSR</title><path d=\"M3.692 5.538v3.693H0v7.384h7.385v1.847h12.923v-3.693H24V7.385h-7.385V5.538Zm1.846 1.847h1.847v7.384H1.846v-3.692h1.846v1.846h1.846zm3.693 0h5.538V9.23h-3.692v1.846h3.692v5.538H9.231V14.77h3.692v-1.846H9.231Zm7.384 1.846h5.539v3.692h-1.846v-1.846h-1.846v5.538h-1.847z\"/></svg>',\n        },\n        link: 'https://jsr.io/@es-toolkit/es-toolkit',\n        ariaLabel: 'JSR',\n      },\n      { icon: 'discord', link: 'https://discord.gg/vGXbVjP2nY' },\n    ],\n  },\n\n  vite: {\n    resolve: {\n      alias: {\n        vue: path.dirname(\n          require.resolve('vue/package.json', {\n            paths: [require.resolve('vitepress')],\n          })\n        ),\n        'vue/server-renderer': path.dirname(\n          require.resolve('vue/server-renderer', {\n            paths: [require.resolve('vitepress')],\n          })\n        ),\n        '@vue/server-renderer': path.dirname(\n          require.resolve('@vue/server-renderer/package.json', {\n            paths: [require.resolve('vitepress')],\n          })\n        ),\n      },\n    },\n    ssr: {\n      noExternal: ['vue', '@vue/server-renderer'],\n    },\n    plugins: [\n      llmstxt({\n        ignoreFiles: ['public/**/*', 'ja/**/*', 'ko/**/*', 'zh_hans/**/*', 'index.md', 'team.md'],\n        description: 'State-of-the-art JavaScript utility library',\n        details: `\\\nes-toolkit is a modern JavaScript utility library that offers a collection of powerful functions for everyday use.\n\nCompared to alternatives like lodash, es-toolkit provides a significantly smaller bundle size (up to 97% less) and 2-3 times faster runtime performance. This is achieved through a modern implementation that leverages the latest JavaScript features.\n\nes-toolkit comes with built-in TypeScript types and has been rigorously tested, ensuring 100% test coverage for maximum reliability.`,\n      }),\n    ],\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/theme/index.css",
    "content": ":root {\n  --vp-nav-logo-height: 16px;\n  --vp-font-family-base: 'Toss Product Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',\n    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n\n  --vp-c-brand-1: var(--vp-c-green-1);\n  --vp-c-brand-2: var(--vp-c-green-2);\n  --vp-c-brand-3: var(--vp-c-green-3);\n}\n\n:root[lang='ko'] {\n  word-break: keep-all;\n}\n"
  },
  {
    "path": "docs/.vitepress/theme/index.js",
    "content": "import DefaultTheme from 'vitepress/theme';\nimport { defineAsyncComponent, h } from 'vue';\nimport './index.css';\nimport Banner from '../components/Banner.vue';\nimport BundleSizeChart from '../components/BundleSizeChart.vue';\nimport BundleSizeTable from '../components/BundleSizeTable.vue';\nimport CompatibilityStatus from '../components/CompatibilityStatus.vue';\n\n/** @type {import('vitepress').Theme} */\nexport default {\n  extends: DefaultTheme,\n  enhanceApp({ app }) {\n    app.component(\n      'Sandpack',\n      defineAsyncComponent(() => import('../components/Sandpack.vue'))\n    );\n    app.component('CompatibilityStatus', CompatibilityStatus);\n    app.component('Banner', Banner);\n    app.component('BundleSizeChart', BundleSizeChart);\n    app.component('BundleSizeTable', BundleSizeTable);\n  },\n  Layout: () => {\n    return h(DefaultTheme.Layout, null, {\n      'layout-bottom': () => h(Banner),\n    });\n  },\n};\n"
  },
  {
    "path": "docs/.vitepress/zh_hans.mts",
    "content": "import path from 'node:path';\nimport { type DefaultTheme, defineConfig } from 'vitepress';\nimport { getSidebarItems } from './libs/getSidebarItems.mts';\nimport { sortByText } from './libs/sortByText.mts';\n\nconst docsRoot = path.resolve(import.meta.dirname, '..');\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const zh_hans = defineConfig({\n  lang: 'zh_hans',\n  description: '一款先进的高性能 JavaScript 实用库，具有小巧的包体积和强大的类型注解。',\n\n  themeConfig: {\n    darkModeSwitchLabel: '深色模式',\n\n    nav: nav(),\n\n    sidebar: sidebar(),\n\n    editLink: {\n      pattern: 'https://github.com/toss/es-toolkit/edit/main/docs/:path',\n      text: '在 GitHub 上编辑此页面',\n    },\n\n    footer: {\n      message: '采用 MIT 许可证发布。',\n      copyright: `Copyright © ${new Date().getFullYear()} Viva Republica, Inc.`,\n    },\n  },\n});\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: '主页', link: '/zh_hans/' },\n    { text: '简介', link: '/zh_hans/intro' },\n    { text: '参考', link: '/zh_hans/reference/array/at' },\n    { text: 'Lodash 兼容性', link: '/zh_hans/reference/compat/array/castArray' },\n  ];\n}\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: '指南',\n      items: [\n        { text: '简介', link: '/zh_hans/intro' },\n        { text: '安装和使用', link: '/zh_hans/usage' },\n        { text: '包体积影响', link: '/zh_hans/bundle-size' },\n        { text: '性能', link: '/zh_hans/performance' },\n        { text: 'Lodash 兼容性', link: '/zh_hans/compatibility' },\n        { text: 'AI 集成', link: '/zh_hans/llms-txt' },\n      ],\n    },\n    {\n      text: '参考',\n      items: sortByText([\n        {\n          text: '数组工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'array'),\n        },\n        {\n          text: '函数工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'function'),\n        },\n        {\n          text: 'Map 工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'map'),\n        },\n        {\n          text: '数学工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'math'),\n        },\n        {\n          text: '对象工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'object'),\n        },\n        {\n          text: '谓词',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'predicate'),\n        },\n        {\n          text: 'Promise 工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'promise'),\n        },\n        {\n          text: 'Set 工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'set'),\n        },\n        {\n          text: '字符串工具',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'string'),\n        },\n        {\n          text: '工具函数',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'util'),\n        },\n        {\n          text: '错误',\n          collapsed: true,\n          items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'error'),\n        },\n      ]),\n    },\n    {\n      text: 'Lodash 兼容性',\n      items: [\n        {\n          text: '参考',\n          items: sortByText([\n            {\n              text: '数组工具',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'array'),\n            },\n            {\n              text: '函数工具',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'function'),\n            },\n            {\n              text: '数学工具',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'math'),\n            },\n            {\n              text: '对象工具',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'object'),\n            },\n            {\n              text: '谓词',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'predicate'),\n            },\n            {\n              text: '字符串工具',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'string'),\n            },\n            {\n              text: '工具函数',\n              collapsed: true,\n              items: getSidebarItems(docsRoot, 'zh_hans', 'reference', 'compat', 'util'),\n            },\n          ]),\n        },\n      ],\n    },\n  ];\n}\n\nexport const search: DefaultTheme.LocalSearchOptions['locales'] = {\n  zh_hans: {\n    translations: {\n      button: {\n        buttonText: '搜索',\n        buttonAriaLabel: '搜索',\n      },\n      modal: {\n        backButtonTitle: '返回',\n        displayDetails: '显示详情',\n        footer: {\n          closeKeyAriaLabel: '关闭',\n          closeText: '关闭',\n          navigateDownKeyAriaLabel: '向下导航',\n          navigateText: '导航',\n          navigateUpKeyAriaLabel: '向上导航',\n          selectKeyAriaLabel: '选择',\n          selectText: '选择',\n        },\n        noResultsText: '未找到搜索结果。',\n        resetButtonTitle: '重置',\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "docs/CLAUDE.md",
    "content": "# Documentation Guide\n\nes-toolkit docs are written in 4 languages. All must be created together.\n\n## File Locations\n\n| Language | Path                                        |\n| -------- | ------------------------------------------- |\n| English  | `docs/reference/{category}/{fn}.md`         |\n| Korean   | `docs/ko/reference/{category}/{fn}.md`      |\n| Japanese | `docs/ja/reference/{category}/{fn}.md`      |\n| Chinese  | `docs/zh_hans/reference/{category}/{fn}.md` |\n\n## Translation Table\n\n| English    | Korean (해요체) | Japanese         | zh_hans |\n| ---------- | --------------- | ---------------- | ------- |\n| Signature  | 인터페이스      | インターフェース | 签名    |\n| Parameters | 파라미터        | パラメータ       | 参数    |\n| Returns    | 반환 값         | 戻り値           | 返回値  |\n| Examples   | 예시            | 例               | 示例    |\n| Usage      | 사용법          | 使い方           | 用法    |\n| Throws     | 에러            | エラー           | 异常    |\n\n## Korean Style\n\nWrite in polite conversational tone (해요체): \"반환해요\", \"나눠요\", \"던져요\".\n\n## Template\n\nUse existing docs as reference. See `docs/reference/array/chunk.md` for a complete example.\n\n```markdown\n# functionName\n\n[One-line description.]\n\n## Signature\n\n\\`\\`\\`typescript\nfunction functionName<T>(param: ParamType): ReturnType;\n\\`\\`\\`\n\n### Parameters\n\n- `param` (`ParamType`): Description.\n\n### Returns\n\n(`ReturnType`): Description.\n\n## Examples\n\n\\`\\`\\`typescript\nimport { functionName } from 'es-toolkit/category';\n\nfunctionName(input);\n// Returns: output\n\\`\\`\\`\n```\n"
  },
  {
    "path": "docs/bundle-size.md",
    "content": "---\ndescription: The minimal bundle footprint offered by es-toolkit\n---\n\n# Bundle Footprint\n\n<BundleSizeChart />\n\nWith its modern implementation, es-toolkit significantly reduces its bundle size, cutting it down by up to 97% compared to other libraries like lodash.\n\nThis makes es-toolkit the most efficient in terms of bundle size, with some utility functions being as small as less than 100 bytes.\n\n## Bundle Footprint Comparison\n\n<BundleSizeTable />\n\n## Bundle Size Test Method\n\nOur bundle size is measured using [esbuild 0.23.0](https://esbuild.github.io), by analyzing the size of code like the following:\n\n```tsx\nimport { chunk } from 'es-toolkit';\n\n// or import { chunk } from 'lodash-es';\n\nconsole.log(chunk);\n```\n\nSee our [bundle size benchmark code](https://github.com/toss/es-toolkit/tree/main/benchmarks/bundle-size) for details.\n"
  },
  {
    "path": "docs/compatibility.md",
    "content": "# Compatibility with Lodash\n\n::: tip ✅ Starting with version 1.39.3, we ensure 100% compatibility with Lodash\n\n`es-toolkit/compat` functions exactly like all Lodash functions while being lighter and faster.\n\n- It ensures identical behavior with Lodash's actual test code.\n- It has been adopted by popular open-source projects including Storybook, Recharts, and CKEditor, and is recommended by Nuxt.\n\nFor detailed documentation of all available compat functions, check out our [Compat Reference](/reference/compat/array/castArray).\n\n:::\n\n```tsx\n// es-toolkit/compat aims to provide 100% feature parity with lodash\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3, 4], 0);\n// Returns [], which is identical to lodash\n```\n\nFor maximum compatibility with `lodash`, use `es-toolkit/compat`, a compatibility layer that bridges the gap between the two libraries.\n\nThis module is designed to provide an identical API to `lodash`, making it easier to switch between the two libraries.\n\n`es-toolkit/compat` has been thoroughly tested with real test cases from `lodash`.\n\nIt's important to note that `es-toolkit/compat` may have a slight performance impact and a larger bundle size compared to the original `es-toolkit`. This module is designed to facilitate a smooth transition and should be replaced with the original `es-toolkit` for optimal performance once the migration is complete.\n\n## Design Principles\n\n::: info\nDesign principles are subject to change.\n:::\n\nOur compatibility layer aims to achieve feature parity with 100% accuracy for:\n\n- Features that are written as a test case in lodash.\n- Features that can be inferred from types of `@types/lodash` or `@types/lodash-es`.\n- Feature differences identified while migrating code from lodash to es-toolkit (please report these to our [issues page](https://github.com/toss/es-toolkit/issues)).\n\nHowever, the following are out of scope for `es-toolkit/compat`:\n\n- Implicit type conversions, such as converting an empty string to zero or false.\n- Functions that have specialized implementations for specific types of arrays, like [sortedUniq](https://lodash.com/docs/4.17.15#sortedUniq).\n- Handling cases where internal object prototypes, like `Array.prototype`, have been modified.\n- Managing cases with JavaScript realms.\n- Method chaining support through \"Seq\" methods.\n\n## Implementation Status\n\n::: info\nThe following emojis indicate the status of each feature:\n\n- ✅: Completed (The function is fully implemented and has passed all tests with lodash test code.)\n- 📝: In Review (The function is implemented but hasn't been tested with lodash test code yet.)\n- ❌: Not Implemented (The function hasn't been implemented.)\n\nEven if a feature is marked \"in review,\" it might already be under review to ensure it matches lodash perfectly, and it could already offer the same functionality.\n:::\n\n<CompatibilityStatus lang=\"en\"/>\n"
  },
  {
    "path": "docs/data/bundle-size.json",
    "content": "{\n  \"labels\": {\n    \"esToolkit\": \"es-toolkit@1.43.0\",\n    \"lodash\": \"lodash-es@4.17.21\"\n  },\n  \"data\": {\n    \"sample\": {\n      \"lodash\": 4817,\n      \"esToolkit\": 94\n    },\n    \"difference\": {\n      \"lodash\": 7958,\n      \"esToolkit\": 90\n    },\n    \"sum\": {\n      \"lodash\": 698,\n      \"esToolkit\": 93\n    },\n    \"debounce\": {\n      \"lodash\": 2873,\n      \"esToolkit\": 531\n    },\n    \"throttle\": {\n      \"lodash\": 3111,\n      \"esToolkit\": 855\n    },\n    \"pick\": {\n      \"lodash\": 9520,\n      \"esToolkit\": 132\n    },\n    \"zip\": {\n      \"lodash\": 3961,\n      \"esToolkit\": 221\n    }\n  }\n}\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'es-toolkit'\n  text: 'State-of-the-art JavaScript utility library'\n  image:\n    loading: eager\n    fetchpriority: high\n    decoding: async\n    src: /hero.webp\n    alt:\n  actions:\n    - theme: brand\n      text: About es-toolkit\n      link: /intro\n    - theme: alt\n      text: Reference\n      link: /reference/array/at\n    - theme: alt\n      text: Usage\n      link: /usage\n\nfeatures:\n  - title: Best performance\n    details: es-toolkit delivers 2-3× better performance in modern JavaScript runtimes compared to other libraries.\n  - title: Small bundle footprint\n    details: es-toolkit ships up to 97% less JavaScript code compared to other alternative libraries.\n  - title: Seamless Lodash replacement\n    details: es-toolkit offers a complete compatibility layer to seamlessly replace Lodash.\n    link: /compatibility\n  - title: Modern implementation\n    details: es-toolkit fully leverages modern JavaScript APIs for straightforward and error-free implementation.\n  - title: Robust types\n    details: es-toolkit offers simple yet robust types for all functions.\n  - title: Widely adopted\n    details: es-toolkit is trusted and used by popular open-source projects like Storybook, Recharts, ink, MUI, and CKEditor.\n  - title: Battle-tested\n    details: es-toolkit has 100% test coverage, ensuring maximum robustness.\n  - title: Comprehensive runtime support\n    details: es-toolkit supports all JavaScript environments, including Node.js, Deno, Bun, and browsers.\n---\n"
  },
  {
    "path": "docs/intro.md",
    "content": "# About es-toolkit\n\nes-toolkit is a modern JavaScript utility library that offers a collection of powerful functions for everyday use.\n\nCompared to alternatives like lodash, es-toolkit provides a [significantly smaller bundle size](./bundle-size.md) (up to 97% less) and [2-3 times faster runtime performance](./performance.md). This is achieved through a modern implementation that leverages the latest JavaScript features.\n\nes-toolkit comes with built-in TypeScript types and has been rigorously tested, ensuring 100% test coverage for maximum reliability.\n\n## Features\n\nHere are some of the features es-toolkit offers:\n\n- **Array**: Utilities for array manipulation, such as [uniq](./reference/array/uniq.md) and [difference](./reference/array/difference.md).\n- **Function**: Tools for controlling function execution, including [debounce](./reference/function/debounce.md) and [throttle](./reference/function/throttle.md).\n- **Math**: Numerical utilities like [sum](./reference/math/sum.md) and [round](./reference/math/round.md).\n- **Object**: Tools for manipulating JavaScript objects, such as [pick](./reference/object/pick.md) and [omit](./reference/object/omit.md).\n- **Predicate**: Type guard functions like [isNotNil](./reference/predicate/isNotNil.md).\n- **Promise**: Asynchronous utilities like [delay](./reference/promise/delay.md).\n- **String**: Utilities for string manipulation, such as [snakeCase](./reference/string/snakeCase.md)\n\n## Links\n\nPlease refer to the following links for more information about this project.\n\n- [GitHub](https://github.com/toss/es-toolkit)\n"
  },
  {
    "path": "docs/ja/bundle-size.md",
    "content": "---\ndescription: es-toolkitが持つ小さなバンドルサイズ\n---\n\n# バンドルサイズ\n\n<BundleSizeChart />\n\nes-toolkitは現代的な実装を持っているため、他のライブラリと比べて非常に小さなバンドルサイズを持っています。[lodash](https://lodash.com)と比較すると、関数によっては最大97%小さいサイズになります。\n\nこの観点から、es-toolkitはバンドルサイズを削減するのに最も効果的な選択肢です。いくつかのユーティリティ関数は100バイト未満のサイズです。\n\n## バンドルサイズの比較\n\n<BundleSizeTable />\n\n## バンドルサイズの測定方法\n\n[esbuild 0.23.0](https://esbuild.github.io)でバンドルサイズを測定しています。以下のようなコードを使用しています。\n\n```tsx\nimport { chunk } from 'es-toolkit';\n\n// または import { chunk } from 'lodash-es';\n\nconsole.log(chunk);\n```\n\n[バンドルサイズ測定ベンチマークコード](https://github.com/toss/es-toolkit/tree/main/benchmarks/bundle-size)を参照してください。\n"
  },
  {
    "path": "docs/ja/compatibility.md",
    "content": "# Lodashとの互換性\n\n::: tip ✅ バージョン1.39.3からLodashと100%の互換性を保証します\n\n`es-toolkit/compat`はLodashのすべての関数と同じように動作しながら、より軽量で高速です。\n\n- Lodashの実際のテストコードと同じ動作を保証します。\n- Storybook、Recharts、CKEditorなどの有名なオープンソースライブラリで使用され、Nuxtから推奨されています。\n\nすべての互換性関数の詳細なドキュメントは[互換性リファレンス](/ja/reference/compat/array/castArray)でご確認いただけます。\n\n:::\n\n```tsx\n// es-toolkit/compatはlodashと100%同じ動作を提供することを目指しています\nimport { chunk } from 'es-toolkit/compat';\n\n// es-toolkitは元々chunkのサイズとして0をサポートしていませんでした\nchunk([1, 2, 3, 4], 0);\n// es-toolkit/compatはlodashと同じ[]を返します\n```\n\n`lodash`との最大の互換性を確保するために、2つのライブラリ間のギャップを埋める互換レイヤーである`es-toolkit/compat`を使用してください。\n\n`es-toolkit`はスムーズなマイグレーションを保証するために、2つのライブラリ間の動作の違いがない`es-toolkit/compat`ライブラリを開発しています。`lodash`と同じAPIと機能を提供し、スムーズにマイグレーションできるようサポートする予定です。\n\n`es-toolkit/compat`は実際の`lodash`テストコードを使用してテストされます。\n\n`es-toolkit/compat`は、元の`es-toolkit`と比較して若干のパフォーマンス低下とバンドルサイズの増加があることに注意してください。このモジュールはスムーズな移行を支援するために設計されており、移行が完了したら最適なパフォーマンスを得るために元の`es-toolkit`に置き換えるべきです。\n\n## デザイン原則\n\n::: info\nデザイン原則は変更される可能性があります。\n:::\n\n`es-toolkit/compat`は以下のような機能について`lodash`と100%同じ機能を提供することを目指しています。\n\n- `lodash`のテストケースで作成された機能\n- `@types/lodash`または`@types/lodash-es`の型から推論できる機能\n- `lodash`から`es-toolkit`にコードを移行する際に発見された機能の違い（[イシューページ](https://github.com/toss/es-toolkit/issues)に報告してください。）\n\n以下のような機能は`es-toolkit/compat`ではサポートしていません。\n\n- 空文字列を0またはfalseに変換するような暗黙的な型変換\n- [sortedUniq](https://lodash.com/docs/4.17.15#sortedUniq)のような特定のタイプの配列に特化した実装を持つ関数\n- `Array.prototype`のようなJavaScriptの組み込みオブジェクトのプロトタイプが変更された場合に対応するコード\n- JavaScript Realmに対応するコード\n- `_(arr).map(...).filter(...)`のような\"Seq\"メソッドを通じたメソッドチェーンのサポート\n\n## 実装ステータス\n\n::: info\n以下の絵文字は各機能の実装ステータスを示しています：\n\n- ✅: 完了（関数は完全に実装され、lodashのテストコードで全てのテストに合格しています。）\n- 📝: レビュー中（関数は実装されていますが、まだlodashのテストコードでテストされていません。）\n- ❌: 未実装（関数はまだ実装されていません。）\n\n\"レビュー中\"と表示されていても、完全に同じか確認しているだけですでに同じ機能を提供しているかもしれません。\n:::\n\n<CompatibilityStatus lang=\"ja\"/>\n"
  },
  {
    "path": "docs/ja/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'es-toolkit'\n  text: '最先端のJavaScriptユーティリティライブラリ'\n  image:\n    loading: eager\n    fetchpriority: high\n    decoding: async\n    src: /hero.webp\n    alt:\n  actions:\n    - theme: brand\n      text: es-toolkitを知る\n      link: /ja/intro\n    - theme: alt\n      text: リファレンス\n      link: /ja/reference/array/at\n    - theme: alt\n      text: インストールと使用方法\n      link: /ja/usage\n\nfeatures:\n  - title: 高速なパフォーマンス\n    details: 同様の機能を提供する他のライブラリと比較して、平均2-3倍高速な実行時パフォーマンスを提供します。\n  - title: 小さなバンドルサイズ\n    details: 同等の機能を持つ関数を基準に、最大97%小さなJavaScriptサイズを実現しています。\n  - title: 簡単なLodashの代替\n    details: es-toolkitはLodashを簡単に代替できる完全な互換性レイヤーを提供します。\n    link: /ja/compatibility\n  - title: モダンな実装\n    details: 最新のJavaScript APIを使用しているため、実装が直感的でシンプルです。\n  - title: 堅牢な型定義\n    details: すべての関数に対してシンプルながら堅牢な型定義を提供しています。\n  - title: 幅広い採用\n    details: es-toolkitは、Storybook、Recharts、ink、MUI、CKEditorなどの人気のオープンソースプロジェクトから信頼され、採用されています。\n  - title: テストカバレッジ100%\n    details: すべての関数とブランチに対して、綿密なテストが作成されています。\n  - title: あらゆる環境で使用可能\n    details: Node.js、Deno、Bun、そしてブラウザまで、幅広いJavaScript環境をサポートしています。\n---\n"
  },
  {
    "path": "docs/ja/intro.md",
    "content": "# es-toolkitの紹介\n\nes-toolkitは、日常的な開発で使用する様々な関数を集めた最先端のJavaScriptユーティリティライブラリです。\n\n[lodash](https://lodash.com/)のような他のライブラリと比較して、es-toolkitは[同じ関数基準で最大97%小さいバンドルサイズ](./bundle-size.md)を提供し、[2〜3倍高速に](./performance.md)動作します。最新のJavaScript APIを活用して現代的に実装したおかげです。\n\nes-toolkitは堅固なTypeScriptタイプを内蔵して提供し、信頼性を高めるために100%テストカバレッジを目指しています。\n\n## 提供する機能\n\nes-toolkitが提供する機能リストは以下の通りです：\n\n- **Array**: 配列操作のためのユーティリティ、例えば [uniq](./reference/array/uniq.md) や [difference](./reference/array/difference.md) など。\n- **Function**: 関数の実行を制御するためのツール、例えば [debounce](./reference/function/debounce.md) や [throttle](./reference/function/throttle.md) など。\n- **Math**: 数値操作のためのユーティリティ、例えば [sum](./reference/math/sum.md) や [round](./reference/math/round.md) など。\n- **Object**: JavaScriptオブジェクトを操作するためのツール、例えば [pick](./reference/object/pick.md) や [omit](./reference/object/omit.md) など。\n- **Predicate**: 型ガード関数、例えば [isNotNil](./reference/predicate/isNotNil.md) など。\n- **Promise**: 非同期操作のためのユーティリティ、例えば [delay](./reference/promise/delay.md) など。\n- **String**: 文字列操作のためのユーティリティ、例えば [snakeCase](./reference/string/snakeCase.md) など。\n\n## リンク\n\nこのプロジェクトについてより多くの情報を得るには、以下のリンクを参照してください：\n\n- [GitHub](https://github.com/toss/es-toolkit)\n"
  },
  {
    "path": "docs/ja/llms-txt.md",
    "content": "# AI 連携\n\nes-toolkitは、AIエージェントがライブラリを最大限に活用できるよう取り組んでいます。AIツールがes-toolkitをより簡単に理解し、参照し、使用できるようにするための機能を積極的に提供していく予定です。\n\n## llms.txt\n\nその第一歩として、es-toolkitは[llms.txt](https://llmstxt.org/)ファイルを提供しています。llms.txtは、AIアシスタントや大規模言語モデル（LLM）がプロジェクトのドキュメントをより効果的に理解できるようにするための標準です。\n\n### `/llms.txt`\n\nes-toolkitのドキュメントの構造化された目次で、各ページへのリンクが含まれています。AIツールが特定の関数やトピックを検索する際に便利です。\n\n- **URL**: [https://es-toolkit.dev/llms.txt](https://es-toolkit.dev/llms.txt)\n\n### `/llms-full.txt`\n\nすべてのドキュメントページの内容を1つのファイルにまとめたものです。AIツールにes-toolkitの包括的なコンテキストを提供したい場合に便利です。\n\n- **URL**: [https://es-toolkit.dev/llms-full.txt](https://es-toolkit.dev/llms-full.txt)\n\n### AIツールでの活用方法\n\n多くのAIツールやLLMベースのアプリケーションがllms.txt標準をサポートしています。これらのエンドポイントを使用して、AIアシスタントにes-toolkitのAPIと機能に関する完全なコンテキストを提供できます。\n\n例えば、AIコーディングアシスタントにURLを提供すると、コード作成を手伝う際にes-toolkitのドキュメントを参照できます:\n\n```\nユーティリティ関数にはes-toolkitを使用してください。ドキュメント: https://es-toolkit.dev/llms-full.txt\n```\n"
  },
  {
    "path": "docs/ja/performance.md",
    "content": "---\ndescription: es-toolkitと他のライブラリのパフォーマンスの違い\n---\n\n# パフォーマンス\n\n![es-toolkitとlodashのパフォーマンスの違いを示すグラフ。es-toolkitを使用すると、最大11倍のパフォーマンス向上が得られます。](/assets/performance.png)\n\nパフォーマンスを重視して設計されたes-toolkitは、lodashのような他のライブラリと比較して平均2倍のパフォーマンス向上を提供します。いくつかの関数は、最新のJavaScript APIを完全に活用することで、最大11倍のパフォーマンス向上を達成します。\n\n## パフォーマンス比較\n\n|                                                           | es-toolkit@0.0.1 | lodash-es@4.17.21 | Difference |\n| --------------------------------------------------------- | ---------------- | ----------------- | ---------- |\n| [omit](./reference/object/omit.md)                        | 4,767,360 times  | 403,624 times     | 11.8×      |\n| [pick](./reference/object/pick.md)                        | 9,121,839 times  | 2,663,072 times   | 3.43×      |\n| [differenceWith](./reference/array/differenceWith.md)     | 9,291,897 times  | 4,275,222 times   | 2.17×      |\n| [difference](./reference/array/difference.md)             | 10,436,101 times | 5,155,631 times   | 2.02×      |\n| [intersectionWith](./reference/array/intersectionWith.md) | 8,074,722 times  | 3,814,479 times   | 2.12×      |\n| [intersection](./reference/array/intersection.md)         | 9,999,571 times  | 4,630,316 times   | 2.15×      |\n| [unionBy](./reference/array/unionBy.md)                   | 6,435,983 times  | 3,794,899 times   | 1.69×      |\n| [union](./reference/array/union.md)                       | 5,059,209 times  | 4,771,400 times   | 1.06×      |\n| [dropRightWhile](./reference/array/dropRightWhile.md)     | 7,529,559 times  | 5,606,439 times   | 1.34×      |\n| [groupBy](./reference/array/groupBy.md)                   | 5,000,235 times  | 5,206,286 times   | 0.96×      |\n\nテスト環境はMacBook Pro 14インチ（M1 Max、2021）です。[ベンチマークコード](https://github.com/toss/es-toolkit/tree/main/benchmarks)を参照してください。\n"
  },
  {
    "path": "docs/ja/reference/array/at.md",
    "content": "# at\n\n配列の指定されたインデックスにある要素を取得し、新しい配列を返します。\n\n```typescript\nconst result = at(arr, indices);\n```\n\n## 使用法\n\n### `at(arr, indices)`\n\n配列の特定の位置にある要素を選択したい場合は `at` を使用してください。負のインデックスを使用すると、配列の末尾から要素を選択できます。\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\n// 数値配列から複数のインデックスの要素を取得します。\nat([10, 20, 30, 40, 50], [1, 3, 4]);\n// Returns: [20, 40, 50]\n\n// 負のインデックスを使用して末尾から要素を取得します。\nat(['a', 'b', 'c', 'd'], [0, -1, -2]);\n// Returns: ['a', 'd', 'c']\n```\n\n整数でないインデックスは整数に変換されます。\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\nat([1, 2, 3, 4], [1.5, 2.9]); // [2, 3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を取得する配列です。\n- `indices` (`number[]`): 取得する要素のインデックスの配列です。負の値を使用すると、配列の末尾から計算されます。\n\n#### 戻り値\n\n(`T[]`): 指定されたインデックスにある要素を含む新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/chunk.md",
    "content": "# chunk\n\n配列を指定されたサイズの小さな配列に分割し、新しい2次元配列を返します。\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## インターフェース\n\n### `chunk(arr, size)`\n\n長い配列を同じサイズの複数の小さな配列に分割したい場合は `chunk` を使用してください。配列を均等に分割できない場合、最後の配列に残りの要素が含まれます。\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\n// 数値配列をサイズ2に分割します。\nchunk([1, 2, 3, 4, 5], 2);\n// Returns: [[1, 2], [3, 4], [5]]\n\n// 文字列配列をサイズ3に分割します。\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n```\n\n空の配列を分割すると空の配列が返されます。\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\nchunk([], 2); // []\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 分割する配列です。\n- `size` (`number`): 各小さな配列のサイズです。正の整数である必要があります。\n\n#### 戻り値\n\n(`T[][]`): サイズ `size` に分割された2次元配列を返します。\n\n#### エラー\n\n`size` が正の整数でない場合、エラーをスローします。\n\n## 使用例\n\n::: sandpack\n\n```ts index.ts\nimport { chunk } from 'es-toolkit/array';\n\nconsole.log(chunk([1, 2, 3, 4, 5], 2));\n```\n\n:::\n\n## Lodash 互換性\n\n`es-toolkit/compat` から `chunk` をインポートすると、Lodash と互換になります。\n\n- `size` が 1 未満の場合、空の配列を返します。\n- `size` に小数点のある数を提供しても、整数に切り捨てられます。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0); // Returns []\n```\n\n## 性能比較\n\n|                   | [バンドルサイズ](../../bundle-size.md) | [ランタイム性能](../../performance.md) |\n| ----------------- | -------------------------------------- | -------------------------------------- |\n| es-toolkit        | 238 バイト (92.4% 小さい)              | 9,338,821 回 (11% 遅い)                |\n| es-toolkit/compat | 307 バイト (90.2% 小さい)              | 9,892,157 回 (5% 遅い)                 |\n| lodash-es         | 3,153 バイト                           | 10,523,270 回                          |\n"
  },
  {
    "path": "docs/ja/reference/array/compact.md",
    "content": "# compact\n\n偽値を削除した新しい配列を返します。\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 使用法\n\n### `compact(arr)`\n\n配列から偽値（`false`、`null`、`0`、`-0`、`0n`、`''`、`undefined`、`NaN`）を削除したい場合は、`compact` を使用してください。真値のみを含む新しい配列が返されます。\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\n// さまざまな偽値を削除します。\ncompact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n// 戻り値: [1, 2, 3, 4, 5]\n\n// 文字列配列から空文字列を削除します。\ncompact(['hello', '', 'world', '', '!']);\n// 戻り値: ['hello', 'world', '!']\n```\n\n型システムは偽値の型を自動的に除外します。\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\nconst mixed: (string | number | false | null)[] = ['text', 0, false, null, 5];\nconst result = compact(mixed);\n// result の型は (string | number)[]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 偽値を削除する配列。\n\n#### 戻り値\n\n(`Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>`): 偽値が削除された新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/array/countBy.md",
    "content": "# countBy\n\n配列の要素を変換関数の結果値で分類し、個数を数えたオブジェクトを返します。\n\n```typescript\nconst counted = countBy(arr, mapper);\n```\n\n## 使用法\n\n### `countBy(arr, mapper)`\n\n配列の要素を特定の基準で分類し、各グループの個数を数えたい場合は、`countBy` を使用してください。変換関数が返す値をキーとして要素をグループ化し、各グループに属する要素の個数を計算します。\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\n// 数値を奇数/偶数で分類して個数を数えます。\ncountBy([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));\n// 戻り値: { odd: 3, even: 2 }\n```\n\nオブジェクト配列の特定のプロパティを基準に個数を数えることもできます。\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 25 },\n  { name: 'David', age: 30 },\n];\n\ncountBy(users, user => user.age);\n// 戻り値: { '25': 2, '30': 2 }\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素の個数を数える配列。\n- `mapper` (`(item: T, index: number, array: T[]) => K`): 要素を分類する基準となる値を返す関数。各要素、インデックス、配列と共に呼び出されます。\n\n#### 戻り値\n\n(`Record<K, number>`): 各分類基準別に要素がいくつあるかを示すオブジェクト。\n"
  },
  {
    "path": "docs/ja/reference/array/difference.md",
    "content": "# difference\n\n最初の配列から2番目の配列にある要素を除いた新しい配列を返します。\n\n```typescript\nconst result = difference(firstArr, secondArr);\n```\n\n## 使用法\n\n### `difference(firstArr, secondArr)`\n\n2つの配列の差集合を求めたい場合は、`difference` を使用してください。最初の配列にのみ存在し、2番目の配列には存在しない要素で構成された新しい配列が返されます。\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\n// 数値配列の差集合を求めます。\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\ndifference(array1, array2);\n// 戻り値: [1, 3, 5]\n// 2と4は両方の配列に存在するため除外されます。\n\n// 文字列配列の差集合を求めます。\nconst colors1 = ['red', 'blue', 'green'];\nconst colors2 = ['blue', 'yellow'];\ndifference(colors1, colors2);\n// 戻り値: ['red', 'green']\n```\n\n空の配列との差集合は元の配列と同じです。\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\ndifference([1, 2, 3], []); // [1, 2, 3]\ndifference([], [1, 2, 3]); // []\n```\n\n#### パラメータ\n\n- `firstArr` (`T[]`): 差集合を求める基準配列。\n- `secondArr` (`T[]`): 最初の配列から除外する要素を含む配列。\n\n#### 戻り値\n\n(`T[]`): 最初の配列にのみ存在し、2番目の配列には存在しない要素で構成された新しい配列。\n\n## パフォーマンス比較\n\n|            | [Bundle Size](../../bundle-size.md) | [Performance](../../performance.md) |\n| ---------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit | 90 バイト (92.4% 小さい)            | 9,317,227 回 (85% 速い)             |\n| lodash-es  | 7,958 バイト                        | 5,030,861 回                        |\n"
  },
  {
    "path": "docs/ja/reference/array/differenceBy.md",
    "content": "# differenceBy\n\n2つの配列の要素を変換関数で変換し、差集合を求めて新しい配列を返します。\n\n```typescript\nconst result = differenceBy(firstArr, secondArr, mapper);\n```\n\n## 使用法\n\n### `differenceBy(firstArr, secondArr, mapper)`\n\n2つの配列の要素を特定の基準で比較して差集合を求めたい場合は、`differenceBy` を使用してください。各要素を変換関数で変換した値を基準に比較し、最初の配列にのみ存在する要素を返します。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\n// オブジェクト配列で id を基準に差集合を求めます。\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\ndifferenceBy(array1, array2, item => item.id);\n// 戻り値: [{ id: 1 }, { id: 3 }]\n// id が 2 の要素は両方の配列に存在するため除外されます。\n\n// 異なる型の配列も比較できます。\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\ndifferenceBy(objects, numbers, item => (typeof item === 'object' ? item.id : item));\n// 戻り値: [{ id: 1 }, { id: 3 }]\n```\n\n文字列の長さを基準に差集合を求めることもできます。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\nconst words1 = ['apple', 'banana', 'cherry'];\nconst words2 = ['grape', 'lemon'];\ndifferenceBy(words1, words2, word => word.length);\n// 戻り値: ['banana', 'cherry']\n// 'apple' は 'grape' や 'lemon' と長さが同じなので除外されます。\n```\n\n#### パラメータ\n\n- `firstArr` (`T[]`): 差集合を求める基準配列。\n- `secondArr` (`U[]`): 最初の配列から除外する要素を含む配列。\n- `mapper` (`(value: T | U) => unknown`): 両方の配列の要素をマッピングする関数。この関数が返す値を基準に要素を比較します。\n\n#### 戻り値\n\n(`T[]`): 変換された値を基準に、最初の配列にのみ存在する要素で構成された新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/array/differenceWith.md",
    "content": "# differenceWith\n\nカスタム比較関数を使用して2つの配列の差集合を求め、新しい配列を返します。\n\n```typescript\nconst result = differenceWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 使用法\n\n### `differenceWith(firstArr, secondArr, areItemsEqual)`\n\n2つの配列の要素をカスタム関数で比較して差集合を求めたい場合は `differenceWith` を使用してください。比較関数を通じて2つの要素が同じかどうかを判断し、最初の配列にのみ存在する要素を返します。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\n// オブジェクト配列でidを基準に差集合を求めます。\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\nconst areItemsEqual = (a, b) => a.id === b.id;\ndifferenceWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1 }, { id: 3 }]\n// idが2の要素は同じと判断され除外されます。\n\n// 異なる型の配列も比較できます。\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\nconst areItemsEqual2 = (a, b) => a.id === b;\ndifferenceWith(objects, numbers, areItemsEqual2);\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\n複雑な条件で要素を比較できます。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\nconst users1 = [\n  { name: 'Alice', age: 30 },\n  { name: 'Bob', age: 25 },\n  { name: 'Charlie', age: 35 },\n];\nconst users2 = [\n  { name: 'Alice', age: 31 }, // 年齢が異なっても名前が同じなら同じユーザー\n  { name: 'David', age: 25 },\n];\n\nconst areUsersEqual = (a, b) => a.name === b.name;\ndifferenceWith(users1, users2, areUsersEqual);\n// Returns: [{ name: 'Bob', age: 25 }, { name: 'Charlie', age: 35 }]\n```\n\n#### パラメータ\n\n- `firstArr` (`T[]`): 差集合を求める基準となる配列です。\n- `secondArr` (`U[]`): 最初の配列から除外する要素を含む配列です。\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 2つの要素が同じかどうかを判断する関数です。\n\n#### 戻り値\n\n(`T[]`): 比較関数に従って最初の配列にのみ存在すると判断された要素で構成される新しい配列です。\n\n## Lodash互換性\n\n`es-toolkit/compat` から `differenceWith` をインポートすると、Lodash と完全に互換になります。\n\n- `differenceWith` は最初の配列と比較するために複数の配列を受け取ることができます。\n- `differenceWith` は配列様オブジェクトを引数として受け取ることができます。\n- `differenceWith` はカスタム比較関数を省略できます。省略すると、デフォルトで [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero) アルゴリズムが使用されます。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 例1: 複数の配列と比較し、比較関数を使用する場合\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\nconst comparator = (a, b) => a.id === b.id;\n\nconst result = differenceWith(array, values1, values2, comparator);\n// 結果は [{ id: 1 }] です。この要素は比較基準に従って最初の配列にのみ残っています。\n\n// 例2: 配列様オブジェクトを引数として受け取り、比較関数を使用する場合\nconst array = { 0: { id: 1 }, 1: { id: 2 }, 2: { id: 3 }, length: 3 };\nconst values = { 0: { id: 2 }, 1: { id: 3 }, length: 2 };\nconst comparator = (a, b) => a.id === b.id;\n\nconst result2 = differenceWith(array, values, comparator);\n// 結果は [{ id: 1 }] です。この要素は比較基準に従って最初の配列様オブジェクトのみに残っています。\n\n// 例3: カスタム比較関数を省略\nconst array = [1, 2, 3];\nconst values1 = [2];\nconst values2 = [3];\n\nconst result3 = differenceWith(array, values1, values2);\n// 結果は [1] です。この要素はすべての配列で唯一存在します。\n```\n"
  },
  {
    "path": "docs/ja/reference/array/drop.md",
    "content": "# drop\n\n配列の先頭から指定された個数分の要素を除去した新しい配列を返します。\n\n```typescript\nconst dropped = drop(arr, itemsCount);\n```\n\n## 使用法\n\n### `drop(arr, itemsCount)`\n\n配列の先頭から一部の要素を除去したい場合は `drop` を使用してください。指定した個数分の最初の要素を除去し、残りの要素で構成された新しい配列を返します。\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\n// 配列の最初の2つの要素を除去します。\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// 除去する個数が配列の長さより大きい場合、空の配列を返します。\ndrop([1, 2, 3], 5);\n// Returns: []\n```\n\n負の数または0を渡すと、元の配列と同じ要素を持つ新しい配列を返します。\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\ndrop([1, 2, 3], 0); // [1, 2, 3]\ndrop([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を除去する配列です。\n- `itemsCount` (`number`): 配列の先頭から除去する要素の個数です。\n\n#### 戻り値\n\n(`T[]`): 先頭から指定された個数分の要素が除去された新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/dropRight.md",
    "content": "# dropRight\n\n配列の末尾から指定された個数分の要素を除去した新しい配列を返します。\n\n```typescript\nconst dropped = dropRight(arr, itemsCount);\n```\n\n## 使用法\n\n### `dropRight(arr, itemsCount)`\n\n配列の末尾から一部の要素を除去したい場合は `dropRight` を使用してください。指定した個数分の最後の要素を除去し、残りの要素で構成された新しい配列を返します。\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\n// 配列の最後の2つの要素を除去します。\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// 除去する個数が配列の長さより大きい場合、空の配列を返します。\ndropRight([1, 2, 3], 5);\n// Returns: []\n```\n\n負の数または0を渡すと、元の配列と同じ要素を持つ新しい配列を返します。\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\ndropRight([1, 2, 3], 0); // [1, 2, 3]\ndropRight([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を除去する配列です。\n- `itemsCount` (`number`): 配列の末尾から除去する要素の個数です。\n\n#### 戻り値\n\n(`T[]`): 末尾から指定された個数分の要素が除去された新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/dropRightWhile.md",
    "content": "# dropRightWhile\n\n配列の末尾から条件を満たす間、要素を除去した新しい配列を返します。\n\n```typescript\nconst result = dropRightWhile(arr, canContinueDropping);\n```\n\n## 使用法\n\n### `dropRightWhile(arr, canContinueDropping)`\n\n配列の末尾から特定の条件を満たす要素を除去したい場合は `dropRightWhile` を使用してください。配列の末尾から開始し、条件関数が `true` を返す間、要素を除去し、条件関数が `false` を返すと停止します。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\n// 末尾から3より大きい要素を除去します。\nconst numbers = [1, 2, 3, 4, 5];\ndropRightWhile(numbers, x => x > 3);\n// Returns: [1, 2, 3]\n// 4と5が条件を満たして除去され、3で条件がfalseになって停止します。\n\n// オブジェクト配列から特定条件の要素を除去します。\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: false },\n  { name: 'David', active: false },\n];\ndropRightWhile(users, user => !user.active);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Bob', active: true }]\n```\n\n空の配列または条件を満たす要素がない場合、元の配列と同じ新しい配列を返します。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\ndropRightWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropRightWhile([], x => true); // []\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を除去する配列です。\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 要素を除去し続けるかを決定する条件関数です。配列の各要素とインデックス、配列全体を受け取り、真または偽を返します。\n\n#### 戻り値\n\n(`T[]`): 条件を満たさない要素から配列の先頭までを含む新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/dropWhile.md",
    "content": "# dropWhile\n\n配列の先頭から条件を満たす間、要素を除去した新しい配列を返します。\n\n```typescript\nconst result = dropWhile(arr, canContinueDropping);\n```\n\n## 使用法\n\n### `dropWhile(arr, canContinueDropping)`\n\n配列の先頭から特定の条件を満たす要素を除去したい場合は `dropWhile` を使用してください。配列の先頭から条件関数が `true` を返す間、要素を除去し、条件関数が `false` を返すと停止します。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\n// 先頭から3より小さい要素を除去します。\nconst numbers = [1, 2, 3, 4, 2, 5];\ndropWhile(numbers, x => x < 3);\n// Returns: [3, 4, 2, 5]\n// 1と2が条件を満たして除去され、3で条件がfalseになって停止します。\n\n// オブジェクト配列から特定条件の要素を除去します。\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n  { name: 'David', active: true },\n];\ndropWhile(users, user => !user.active);\n// Returns: [{ name: 'Charlie', active: true }, { name: 'David', active: true }]\n```\n\n空の配列または条件を満たす要素がない場合、元の配列と同じ新しい配列を返します。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\ndropWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropWhile([], x => true); // []\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を除去する配列です。\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 要素を除去し続けるかを決定する条件関数です。配列の各要素とインデックス、配列全体を受け取り、真または偽を返します。\n\n#### 戻り値\n\n(`T[]`): 条件を満たさない要素から配列の末尾までを含む新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/fill.md",
    "content": "# fill\n\n配列の要素を指定された値で埋めます。元の配列を直接変更します。\n\n```typescript\nconst filled = fill(arr, value, start, end);\n```\n\n::: info 元の配列を変更したくない場合は、[`toFilled`](./toFilled.md)を使用してください。\n\n`toFilled`は元の配列を変更する代わりに新しい配列を返します。\n\n:::\n\n## 使用法\n\n### `fill(arr, value, start?, end?)`\n\n配列の特定の範囲を指定された値で埋めたい場合は `fill` を使用してください。開始位置から終了位置の直前までの要素を提供された値で置き換えます。開始または終了位置を指定しない場合、配列全体を埋めます。\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\n// 配列全体を'a'で埋めます。\nconst array1 = [1, 2, 3];\nfill(array1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// 空の配列を2で埋めます。\nconst array2 = Array(3);\nfill(array2, 2);\n// Returns: [2, 2, 2]\n\n// インデックス1から3の直前まで'*'で埋めます。\nconst array3 = [4, 6, 8, 10];\nfill(array3, '*', 1, 3);\n// Returns: [4, '*', '*', 10]\n```\n\n負のインデックスも使用できます。負のインデックスは配列の末尾から計算されます。\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nfill(array, '*', -2, -1);\n// Returns: [1, '*', 3]\n```\n\n#### パラメータ\n\n- `arr` (`Array<T | U>`): 埋める配列です。\n- `value` (`U`): 配列を埋める値です。\n- `start` (`number`, オプション): 開始位置です。デフォルト値は `0` です。\n- `end` (`number`, オプション): 終了位置です。デフォルト値は配列の長さです。\n\n#### 戻り値\n\n(`Array<T | U>`): 値で埋められた元の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/filterAsync.md",
    "content": "# filterAsync\n\n非同期条件関数を使用して配列をフィルタリングし、条件を満たす要素のみを含む新しい配列を返します。\n\n```typescript\nconst filtered = await filterAsync(array, predicate);\n```\n\n## 参照\n\n### `filterAsync(array, predicate, options?)`\n\nAPI呼び出しやデータベースクエリなどの非同期操作で配列をフィルタリングする場合は、`filterAsync`を使用してください。通常の`filter`とは異なり、非同期条件関数をサポートし、`concurrency`オプションで並行実行数を制限できます。\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// APIでユーザーステータスを確認して、アクティブなユーザーのみをフィルタリングします。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst activeUsers = await filterAsync(users, async user => {\n  return await checkUserStatus(user.id);\n});\n// 返り値：アクティブなユーザーのみを含む配列\n\n// 並行実行数を制限してサーバー負荷を軽減します。\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = await filterAsync(numbers, async n => await isEvenAsync(n), { concurrency: 2 });\n// 最大2つの操作のみが同時に実行されます。\n```\n\n`concurrency`オプションは、外部API呼び出しを制限したり、システムリソースを効率的に管理したりするのに役立ちます。指定しない場合、すべての操作が同時に実行されます。\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// 最大3つのAPI呼び出しのみを同時に実行します。\nconst items = await filterAsync(largeArray, async item => await validateItem(item), { concurrency: 3 });\n```\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：フィルタリングする配列です。\n- `predicate` (`(item: T, index: number, array: readonly T[]) => Promise<boolean>`)：各要素をテストする非同期関数です。真と評価される値を返すと、その要素が結果に含まれます。\n- `options` (`FilterAsyncOptions`, オプショナル)：並行実行を制御するオプションです。\n  - `concurrency` (`number`, オプショナル)：同時に実行できる最大操作数です。指定しない場合、すべての操作が同時に実行されます。\n\n#### 戻り値\n\n(`Promise<T[]>`)：条件関数が真と評価される値を返した要素のみを含む新しい配列のPromiseを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/flatMap.md",
    "content": "# flatMap\n\n配列の各要素を関数が返す値に置き換えた後、指定された深さまで平坦化した新しい配列を返します。\n\n```typescript\nconst result = flatMap(arr, iteratee, depth);\n```\n\n## 使用法\n\n### `flatMap(arr, iteratee, depth = 1)`\n\n配列の各要素を変換しながら同時に平坦化したい場合は `flatMap` を使用してください。まず各要素に関数を適用した後、結果配列を指定された深さまで平坦化します。\n\nJavaScript言語に含まれた[Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)を[Array#map](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/map)と一緒に`map(iteratee).flat(depth)`として呼び出したときと同じように動作しますが、より高速です。\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\n// 数値配列の各要素を2回コピーします。\nconst arr = [1, 2, 3];\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 深さ2で平坦化します。\nflatMap(arr, item => [[item, item]], 2);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n様々な深さで平坦化できます。\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\nconst arr = [1, 2, 3];\n\n// デフォルトの深さ1で平坦化します。\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 深さ3で平坦化します。\nflatMap(arr, item => [[[item, item]]], 3);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 変換する配列です。\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 各配列要素を変換する関数です。要素、インデックス、配列を引数として受け取ります。\n- `depth` (`D`, オプション): 平坦化する深さです。デフォルト値は`1`です。\n\n#### 戻り値\n\n(`Array<FlatArray<U[], D>>`): 各要素が変換され、指定された深さまで平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/flatMapAsync.md",
    "content": "# flatMapAsync\n\n非同期関数を使用して配列の各要素を変換し、結果を1レベル平坦化して新しい配列を返します。\n\n```typescript\nconst result = await flatMapAsync(array, callback);\n```\n\n## 参照\n\n### `flatMapAsync(array, callback, options?)`\n\n各要素が複数の値を返す非同期変換を実行する場合は、`flatMapAsync`を使用してください。`mapAsync`を呼び出した後に`flat()`を実行するのと同等ですが、より効率的です。\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 各ユーザーの投稿を取得して1つの配列に結合します。\nconst users = [{ id: 1 }, { id: 2 }];\nconst allPosts = await flatMapAsync(users, async user => {\n  return await fetchUserPosts(user.id);\n});\n// 返り値：[post1, post2, post3, ...]（すべてのユーザーの投稿が1つの配列に）\n\n// 並行実行数を制限します。\nconst numbers = [1, 2, 3];\nconst results = await flatMapAsync(numbers, async n => await fetchRelatedItems(n), { concurrency: 2 });\n// 最大2つの操作のみが同時に実行されます。\n```\n\n各コールバック関数は配列を返す必要があり、返されたすべての配列が1つの配列にマージされます。`concurrency`オプションを使用すると、並行実行を制限してサーバー負荷を管理できます。\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 各カテゴリーの商品リストを取得して1つの配列にします。\nconst categories = ['electronics', 'books', 'clothing'];\nconst products = await flatMapAsync(categories, async category => await fetchProducts(category), { concurrency: 2 });\n// 返り値：すべてのカテゴリーの商品を含む単一の配列\n```\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：変換する配列です。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R[]>`)：各要素を配列に変換する非同期関数です。\n- `options` (`FlatMapAsyncOptions`, オプショナル)：並行実行を制御するオプションです。\n  - `concurrency` (`number`, オプショナル)：同時に実行できる最大操作数です。指定しない場合、すべての操作が同時に実行されます。\n\n#### 戻り値\n\n(`Promise<R[]>`)：1レベル平坦化された変換値の配列のPromiseを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/flatMapDeep.md",
    "content": "# flatMapDeep\n\n配列の各要素を関数が返す値に置き換えた後、すべての深さを平坦化した新しい配列を返します。\n\n```typescript\nconst result = flatMapDeep(arr, iteratee);\n```\n\n## 使用法\n\n### `flatMapDeep(arr, iteratee)`\n\n配列の各要素を変換しながら同時にすべてのネストされた配列を完全に平坦化したい場合は `flatMapDeep` を使用してください。まず各要素に関数を適用した後、結果配列をすべての深さまで平坦化します。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// 各要素を2回コピーした後、完全に平坦化します。\nconst result1 = flatMapDeep([1, 2, 3], item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\nどれほど深くネストされた配列でもすべての深さを平坦化します。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// ネストされた配列も完全に平坦化します。\nconst result = flatMapDeep([1, 2, 3], item => [[item, item]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 複数レベルのネストもすべて平坦化します。\nconst result2 = flatMapDeep([1, 2, 3], item => [[[item, item]]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 変換する配列です。\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 各配列要素を変換する関数です。要素、インデックス、配列を引数として受け取ります。\n\n#### 戻り値\n\n(`Array<ExtractNestedArrayType<U>>`): 各要素が変換され、すべての深さが平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/flatten.md",
    "content": "# flatten\n\nネストされた配列を指定された深さまで平坦化した新しい配列を返します。\n\n```typescript\nconst result = flatten(arr, depth);\n```\n\n## 使用法\n\n### `flatten(arr, depth = 1)`\n\nネストされた配列を特定の深さまで平坦化したい場合は `flatten` を使用してください。配列内の配列を指定されたレベルまで展開し、平面的な構造にします。\n\nJavaScript言語に含まれた[Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)と同じように動作しますが、より高速です。\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\n// デフォルトの深さ1で平坦化します。\nconst array = [1, [2, 3], [4, [5, 6]]];\nflatten(array);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 深さ2で平坦化します。\nflatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n深さを調整して希望するレベルまでのみ平坦化できます。\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\nconst array = [1, [2, 3], [4, [5, 6]]];\n\n// 深さ1で平坦化(デフォルト)\nconst result1 = flatten(array, 1);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 深さ2で平坦化\nconst result2 = flatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 平坦化するネストされた配列です。\n- `depth` (`D`, オプション): 平坦化する深さです。デフォルト値は`1`です。\n\n#### 戻り値\n\n(`Array<FlatArray<T[], D>>`): 指定された深さまで平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/flattenDeep.md",
    "content": "# flattenDeep\n\nネストされた配列のすべての深さを平坦化した新しい配列を返します。\n\n```typescript\nconst result = flattenDeep(arr);\n```\n\n## 使用法\n\n### `flattenDeep(arr)`\n\nどれほど深くネストされた配列でも完全に平坦化したい場合は `flattenDeep` を使用してください。配列内のすべてのネストされた配列を展開し、一つの平面的な構造にします。\n\nJavaScript言語に含まれた[Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)を`flat(Infinity)`として呼び出したときと同じように動作しますが、より高速です。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\n// すべてのネストレベルを平坦化します。\nconst array = [1, [2, [3]], [4, [5, 6]]];\nconst result = flattenDeep(array);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\nどれほど複雑なネスト構造でも完全に平坦化します。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\nconst complexArray = [1, [2, [3, [4, [5]]]], 6];\nconst result = flattenDeep(complexArray);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 平坦化するネストされた配列です。\n\n#### 戻り値\n\n(`Array<ExtractNestedArrayType<T>>`): すべての深さが平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/forEachAsync.md",
    "content": "# forEachAsync\n\n配列の各要素に対して非同期関数を実行します。\n\n```typescript\nawait forEachAsync(array, callback);\n```\n\n## 参照\n\n### `forEachAsync(array, callback, options?)`\n\n配列の各要素に対して副作用を伴う非同期操作を実行する場合は、`forEachAsync`を使用してください。通常の`forEach`とは異なり、すべての非同期操作が完了したときに解決されるPromiseを返します。\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// すべてのユーザー情報を更新します。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nawait forEachAsync(users, async user => {\n  await updateUser(user.id);\n});\n// すべてのユーザー更新が完了しました。\n\n// 並行実行数を制限します。\nconst items = [1, 2, 3, 4, 5];\nawait forEachAsync(items, async item => await processItem(item), { concurrency: 2 });\n// 最大2つの項目のみが同時に処理されます。\n```\n\n`concurrency`オプションを使用すると、並行実行を制限してサーバーやデータベースへの負荷を制御できます。ログ記録、ファイルアップロード、データベース更新など、値を返さない操作に便利です。\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// ファイルを順次アップロードします。\nconst files = ['file1.txt', 'file2.txt', 'file3.txt'];\nawait forEachAsync(files, async file => await uploadFile(file), { concurrency: 1 });\n// 一度に1つずつアップロードされます。\n```\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：反復処理する配列です。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<void>`)：各要素に対して実行する非同期関数です。\n- `options` (`ForEachAsyncOptions`, オプショナル)：並行実行を制御するオプションです。\n  - `concurrency` (`number`, オプショナル)：同時に実行できる最大操作数です。指定しない場合、すべての操作が同時に実行されます。\n\n#### 戻り値\n\n(`Promise<void>`)：すべての操作が完了したときに解決されるPromiseを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/forEachRight.md",
    "content": "# forEachRight\n\n配列の要素を右から左へ順に走査し、各要素に対して関数を実行します。\n\n```typescript\nforEachRight(arr, callback);\n```\n\n## 使用法\n\n### `forEachRight(arr, callback)`\n\n配列を逆順で走査しながら各要素に対して作業を実行したい場合は `forEachRight` を使用してください。配列の最後の要素から最初の要素まで順番にコールバック関数を呼び出します。逆順処理が必要な場合や配列の末尾から作業する必要がある場合に便利です。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nconst result: number[] = [];\n\n// forEachRight関数を使用して配列を逆順で走査します。\nforEachRight(array, value => {\n  result.push(value);\n});\n\nconsole.log(result); // [3, 2, 1]\n```\n\nコールバック関数は3つのパラメータを受け取ります。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = ['a', 'b', 'c'];\nforEachRight(array, (value, index, arr) => {\n  console.log(`値: ${value}, インデックス: ${index}, 配列:`, arr);\n});\n// 出力:\n// 値: c, インデックス: 2, 配列: ['a', 'b', 'c']\n// 値: b, インデックス: 1, 配列: ['a', 'b', 'c']\n// 値: a, インデックス: 0, 配列: ['a', 'b', 'c']\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 走査する配列です。\n- `callback` (`(value: T, index: number, arr: T[]) => void`): 各要素に対して実行される関数です。\n  - `value`: 現在処理中の配列要素です。\n  - `index`: 現在処理中の要素のインデックスです。\n  - `arr`: `forEachRight` 関数が呼び出された配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/groupBy.md",
    "content": "# groupBy\n\nキー生成関数に従って配列の要素をグループに分けた新しいオブジェクトを返します。\n\n```typescript\nconst grouped = groupBy(arr, getKeyFromItem);\n```\n\n## 使用法\n\n### `groupBy(arr, getKeyFromItem)`\n\n配列の要素を特定の基準に従って分類したい場合は `groupBy` を使用してください。各要素からキーを生成する関数を提供すると、同じキーを持つ要素同士をまとめてオブジェクトとして返します。返されるオブジェクトの値は、各グループに属する要素の配列です。データをカテゴリ別に整理したり、グループ別の分析を行う際に便利です。\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// オブジェクトの配列をカテゴリ別にグループ化します。\nconst items = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\nconst result = groupBy(items, item => item.category);\n// 結果:\n// {\n//   fruit: [\n//     { category: 'fruit', name: 'apple' },\n//     { category: 'fruit', name: 'banana' }\n//   ],\n//   vegetable: [\n//     { category: 'vegetable', name: 'carrot' }\n//   ]\n// }\n```\n\n様々な基準でグループ化できます。\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// 文字列の長さ別にグループ化します。\nconst words = ['one', 'two', 'three', 'four', 'five'];\nconst byLength = groupBy(words, word => word.length);\n// 結果: { 3: ['one', 'two'], 4: ['four', 'five'], 5: ['three'] }\n\n// 偶数/奇数別にグループ化します。\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst byParity = groupBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 結果: { odd: [1, 3, 5], even: [2, 4, 6] }\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): グループ化する配列です。\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 各要素、インデックス、配列からキーを生成する関数です。\n\n#### 戻り値\n\n(`Record<K, T[]>`): キーに従って要素がグループ化されたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/head.md",
    "content": "# head\n\n配列の最初の要素を返します。\n\n```typescript\nconst firstElement = head(arr);\n```\n\n## 使用法\n\n### `head(arr)`\n\n配列の最初の要素を取得したい場合は `head` を使用してください。配列が空の場合は `undefined` を返します。配列の先頭にあるデータにアクセスする際に便利です。\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 数値配列の最初の要素を取得します。\nconst numbers = [1, 2, 3, 4, 5];\nhead(numbers);\n// Returns: 1\n\n// 文字列配列の最初の要素を取得します。\nconst strings = ['a', 'b', 'c'];\nhead(strings);\n// Returns: 'a'\n\n// 空の配列はundefinedを返します。\nconst emptyArray: number[] = [];\nhead(emptyArray);\n// Returns: undefined\n```\n\n型安全に処理されます。\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 空でない配列の場合、型が確実です。\nconst nonEmptyArray = [1, 2, 3] as const;\nhead(nonEmptyArray);\n// Returns: 1 (型: 1)\n\n// 通常の配列の場合、undefined の可能性があります。\nconst maybeEmptyArray = [1, 2, 3];\nhead(maybeEmptyArray);\n// Returns: 1 | undefined (型: number | undefined)\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 最初の要素を取得する配列です。\n\n#### 戻り値\n\n(`T | undefined`): 配列の最初の要素です。配列が空の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/initial.md",
    "content": "# initial\n\n配列の最後の要素を除いたすべての要素からなる新しい配列を返します。\n\n```typescript\nconst result = initial(arr);\n```\n\n## 使用法\n\n### `initial(arr)`\n\n配列から最後の要素だけ除いて残りのすべての要素を取得したい場合は `initial` を使用してください。配列が空であるか要素が一つだけの場合は空の配列を返します。配列の末尾を除いて処理する際に便利です。\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 数値配列から最後の要素を除く\nconst numbers = [1, 2, 3, 4, 5];\ninitial(numbers);\n// Returns: [1, 2, 3, 4]\n\n// 文字列配列から最後の要素を除く\nconst strings = ['a', 'b', 'c'];\ninitial(strings);\n// Returns: ['a', 'b']\n\n// 要素が一つだけの配列は空の配列を返す\nconst single = [42];\ninitial(single);\n// Returns: []\n```\n\n空の配列や特殊なケースも安全に処理します。\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 空の配列は空の配列を返す\nconst empty: number[] = [];\ninitial(empty);\n// Returns: []\n\n// ネストされた配列も処理できる\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ninitial(nested);\n// Returns: [[1, 2], [3, 4]]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 最後の要素を除く配列。\n\n#### 戻り値\n\n(`T[]`): 最後の要素を除いた新しい配列を返します。入力配列が空であるか要素が一つだけの場合は空の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/intersection.md",
    "content": "# intersection\n\n両方の配列に共通して含まれる要素からなる新しい配列を返します。\n\n```typescript\nconst result = intersection(firstArr, secondArr);\n```\n\n## 使用法\n\n### `intersection(firstArr, secondArr)`\n\n2つの配列で共通の要素のみを見つけたい場合は `intersection` を使用してください。最初の配列の要素の中から、2番目の配列にも存在するものだけを新しい配列として返します。2つのデータセットの交集合を求める際に便利です。\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 数値配列の交集合を求めます。\nconst numbers1 = [1, 2, 3, 4, 5];\nconst numbers2 = [3, 4, 5, 6, 7];\nintersection(numbers1, numbers2);\n// Returns: [3, 4, 5]\n\n// 文字列配列の交集合を求めます。\nconst strings1 = ['apple', 'banana', 'cherry'];\nconst strings2 = ['banana', 'cherry', 'date'];\nintersection(strings1, strings2);\n// Returns: ['banana', 'cherry']\n```\n\n交集合がない場合や特別なケースも処理します。\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 交集合がない場合は空の配列を返します。\nconst noCommon1 = [1, 2, 3];\nconst noCommon2 = [4, 5, 6];\nintersection(noCommon1, noCommon2);\n// Returns: []\n\n// 一方が空の配列の場合も空の配列を返します。\nconst numbers = [1, 2, 3];\nconst empty: number[] = [];\nintersection(numbers, empty);\n// Returns: []\n```\n\n#### パラメータ\n\n- `firstArr` (`readonly T[]`): 比較する最初の配列です。\n- `secondArr` (`readonly T[]`): 比較する2番目の配列です。\n\n#### 戻り値\n\n(`T[]`): 両方の配列に共通して含まれる要素からなる新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/intersectionBy.md",
    "content": "# intersectionBy\n\n変換関数の結果を基準に、2つの配列の交集合を求めた新しい配列を返します。\n\n```typescript\nconst result = intersectionBy(firstArr, secondArr, mapper);\n```\n\n## 使用法\n\n### `intersectionBy(firstArr, secondArr, mapper)`\n\n2つの配列で特定の属性や変換された値を基準に共通の要素を見つけたい場合は `intersectionBy` を使用してください。各要素を変換関数で処理した結果を比較して交集合を求めます。オブジェクト配列で特定のプロパティで比較したり、複雑な変換ロジックが必要な場合に便利です。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// オブジェクトのidプロパティを基準に交集合を求めます。\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 4, name: 'alice' },\n];\nintersectionBy(users1, users2, user => user.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 異なる型の配列も比較できます。\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3, 4];\nintersectionBy(objects, ids, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n複雑な変換ロジックも適用できます。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// 文字列を小文字に変換して比較します。\nconst words1 = ['Apple', 'Banana', 'Cherry'];\nconst words2 = ['apple', 'DATE', 'elderberry'];\nintersectionBy(words1, words2, word => word.toLowerCase());\n// Returns: ['Apple']\n\n// 数値を絶対値に変換して比較します。\nconst numbers1 = [1, -2, 3, -4];\nconst numbers2 = [2, -3, 4, 5];\nintersectionBy(numbers1, numbers2, num => Math.abs(num));\n// Returns: [-2, 3, -4]\n```\n\n#### パラメータ\n\n- `firstArr` (`readonly T[]`): 比較する最初の配列です。\n- `secondArr` (`readonly U[]`): 比較する2番目の配列です。\n- `mapper` (`(item: T | U) => unknown`): 各要素を変換して比較基準を作成する関数です。\n\n#### 戻り値\n\n(`T[]`): 変換関数の結果を基準に、両方の配列に共通して含まれる要素からなる新しい配列を返します。結果は最初の配列の要素で構成されます。\n"
  },
  {
    "path": "docs/ja/reference/array/intersectionWith.md",
    "content": "# intersectionWith\n\nユーザー定義比較関数を基準に、2つの配列の交集合を求めた新しい配列を返します。\n\n```typescript\nconst result = intersectionWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 使用法\n\n### `intersectionWith(firstArr, secondArr, areItemsEqual)`\n\n2つの配列でユーザーが定義した比較関数により共通要素を見つけたい場合は `intersectionWith` を使用してください。単純な値比較では処理しづらい複雑なオブジェクトや、特殊な比較ロジックが必要な場合に便利です。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// オブジェクトのidプロパティで比較します。\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nintersectionWith(users1, users2, (a, b) => a.id === b.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 異なる型同士も比較できます。\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3];\nintersectionWith(objects, ids, (obj, id) => obj.id === id);\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n複雑な比較ロジックも実装できます。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// 大文字小文字を区別しない文字列比較\nconst words1 = ['Apple', 'Banana'];\nconst words2 = ['apple', 'cherry'];\nintersectionWith(words1, words2, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Apple']\n\n// 範囲内の数値比較\nconst numbers1 = [1.1, 2.3, 3.7];\nconst numbers2 = [1.0, 2.5, 4.0];\nintersectionWith(numbers1, numbers2, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: [1.1] (1.1と1.0の差が0.5未満)\n```\n\n#### パラメータ\n\n- `firstArr` (`readonly T[]`): 比較する最初の配列です。\n- `secondArr` (`readonly U[]`): 比較する2番目の配列です。\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 2つの要素が等しいかを判断する関数です。等しい場合は `true`、異なる場合は `false` を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): ユーザー定義比較関数を基準に、両方の配列に共通して含まれる要素からなる新しい配列を返します。結果は最初の配列の要素で構成されます。\n"
  },
  {
    "path": "docs/ja/reference/array/isSubset.md",
    "content": "# isSubset\n\n一つの配列が他の配列の部分集合かどうかを確認します。\n\n```typescript\nconst result = isSubset(superset, subset);\n```\n\n## 使用法\n\n### `isSubset(superset, subset)`\n\n一つの配列のすべての要素が他の配列に含まれているかを確認したい場合は `isSubset` を使用してください。部分集合関係を確認する際や、権限、機能、タグなどが許可された範囲内にあるかを検査する際に便利です。\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 数値配列で部分集合を確認\nconst numbers = [1, 2, 3, 4, 5];\nconst subset = [2, 3, 4];\nisSubset(numbers, subset);\n// Returns: true\n\n// 文字列配列で部分集合を確認\nconst permissions = ['read', 'write', 'delete', 'admin'];\nconst userPermissions = ['read', 'write'];\nisSubset(permissions, userPermissions);\n// Returns: true\n\n// 部分集合でない場合\nconst colors = ['red', 'blue', 'green'];\nconst invalidColors = ['red', 'yellow'];\nisSubset(colors, invalidColors);\n// Returns: false\n```\n\n特別なケースも正しく処理します。\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 空の配列は常に部分集合です。\nconst anyArray = [1, 2, 3];\nconst emptyArray: number[] = [];\nisSubset(anyArray, emptyArray);\n// Returns: true\n\n// 同じ配列は自分自身の部分集合です。\nconst same = ['a', 'b', 'c'];\nisSubset(same, same);\n// Returns: true\n\n// 重複要素があっても正常に動作します。\nconst withDuplicates = [1, 2, 2, 3];\nconst duplicateSubset = [2, 2];\nisSubset(withDuplicates, duplicateSubset);\n// Returns: true\n```\n\n#### パラメータ\n\n- `superset` (`readonly T[]`): 部分集合のすべての要素を含むことができる上位集合配列です。\n- `subset` (`readonly T[]`): 上位集合に含まれているかを確認する部分集合配列です。\n\n#### 戻り値\n\n(`boolean`): 部分集合のすべての要素が上位集合に含まれている場合は `true`、そうでない場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/isSubsetWith.md",
    "content": "# isSubsetWith\n\nユーザー定義比較関数を基準に、一つの配列が他の配列の部分集合かどうかを確認します。\n\n```typescript\nconst result = isSubsetWith(superset, subset, areItemsEqual);\n```\n\n## 使用法\n\n### `isSubsetWith(superset, subset, areItemsEqual)`\n\nユーザーが定義した比較関数で部分集合関係を確認したい場合は `isSubsetWith` を使用してください。オブジェクトを比較したり、特別な比較ロジックが必要な場合に便利です。\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// オブジェクトのidで部分集合を確認\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst targetUsers = [\n  { id: 2, name: 'jane' },\n  { id: 1, name: 'john' },\n];\nisSubsetWith(users, targetUsers, (a, b) => a.id === b.id);\n// Returns: true\n\n// 部分集合でない場合\nconst allUsers = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst someUsers = [{ id: 3, name: 'bob' }];\nisSubsetWith(allUsers, someUsers, (a, b) => a.id === b.id);\n// Returns: false\n```\n\n複雑な比較ロジックも使用できます。\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// 大文字小文字を区別しない文字列比較\nconst validNames = ['Alice', 'Bob', 'Charlie'];\nconst userNames = ['alice', 'BOB'];\nisSubsetWith(validNames, userNames, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: true\n\n// 範囲内の数値比較\nconst validRanges = [1, 2, 3, 4, 5];\nconst testNumbers = [1.1, 2.8];\nisSubsetWith(validRanges, testNumbers, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: true (1.1は1と、2.8は3と十分に近い)\n```\n\n#### パラメータ\n\n- `superset` (`readonly T[]`): 部分集合のすべての要素を含むことができる上位集合配列です。\n- `subset` (`readonly T[]`): 上位集合に含まれているかを確認する部分集合配列です。\n- `areItemsEqual` (`(x: T, y: T) => boolean`): 2つの要素が等しいかを判断する関数です。等しい場合は `true`、異なる場合は `false` を返す必要があります。\n\n#### 戻り値\n\n(`boolean`): ユーザー定義比較関数を基準に、部分集合のすべての要素が上位集合に含まれている場合は `true`、そうでない場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/keyBy.md",
    "content": "# keyBy\n\nキー生成関数を使用して配列要素をキーと値のペアのオブジェクトに変換した新しいオブジェクトを返します。\n\n```typescript\nconst result = keyBy(arr, getKeyFromItem);\n```\n\n## 使用法\n\n### `keyBy(arr, getKeyFromItem)`\n\n配列の各要素を素早く見つけられるようにキーでインデックス化されたオブジェクトを作成したい場合は `keyBy` を使用してください。各要素からユニークなキーを生成する関数を提供すると、そのキーを使って要素にアクセスできるオブジェクトを作成します。同じキーを生成する要素が複数ある場合は、最後の要素が使用されます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// オブジェクトのidプロパティをキーとして使用\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nkeyBy(users, user => user.id);\n// Returns: {\n//   1: { id: 1, name: 'john' },\n//   2: { id: 2, name: 'jane' },\n//   3: { id: 3, name: 'bob' }\n// }\n\n// 文字列プロパティをキーとして使用\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\nkeyBy(products, item => item.category);\n// Returns: {\n//   fruit: { category: 'fruit', name: 'banana' }, // 最後のfruit要素\n//   vegetable: { category: 'vegetable', name: 'carrot' }\n// }\n```\n\n複雑なキー生成ロジックも使用できます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// 複数のプロパティを組み合わせてキーを作成\nconst orders = [\n  { date: '2023-01-01', customerId: 1, amount: 100 },\n  { date: '2023-01-01', customerId: 2, amount: 200 },\n  { date: '2023-01-02', customerId: 1, amount: 150 },\n];\nkeyBy(orders, order => `${order.date}-${order.customerId}`);\n// Returns: {\n//   '2023-01-01-1': { date: '2023-01-01', customerId: 1, amount: 100 },\n//   '2023-01-01-2': { date: '2023-01-01', customerId: 2, amount: 200 },\n//   '2023-01-02-1': { date: '2023-01-02', customerId: 1, amount: 150 }\n// }\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): オブジェクトに変換する配列。\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 各要素、インデックス、配列からキーを生成する関数。\n\n#### 戻り値\n\n(`Record<K, T>`): 生成されたキーをプロパティ名とし、対応する要素を値とするオブジェクトを返します。同じキーを生成する要素が複数ある場合、最後の要素が値として使用されます。\n"
  },
  {
    "path": "docs/ja/reference/array/last.md",
    "content": "# last\n\n配列の最後の要素を返します。\n\n```typescript\nconst lastElement = last(arr);\n```\n\n## 使用法\n\n### `last(arr)`\n\n配列の最後の要素を取得したい場合は `last` を使用してください。配列が空の場合は `undefined` を返します。配列の末尾にあるデータにアクセスする際に便利です。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 数値配列の最後の要素を取得\nconst numbers = [1, 2, 3, 4, 5];\nlast(numbers);\n// Returns: 5\n\n// 文字列配列の最後の要素を取得\nconst strings = ['a', 'b', 'c'];\nlast(strings);\n// Returns: 'c'\n\n// 空の配列は undefined を返す\nconst emptyArray: number[] = [];\nlast(emptyArray);\n// Returns: undefined\n```\n\n型は安全に処理されます。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 空でない配列の場合、型が明確\nconst nonEmptyArray = [1, 2, 3] as const;\nlast(nonEmptyArray);\n// Returns: 3 (型: 3)\n\n// 通常の配列の場合、undefined の可能性がある\nconst maybeEmptyArray = [1, 2, 3];\nlast(maybeEmptyArray);\n// Returns: 3 | undefined (型: number | undefined)\n```\n\n大きな配列でも効率的に動作します。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// パフォーマンスが最適化されている\nconst largeArray = Array(1000000)\n  .fill(0)\n  .map((_, i) => i);\nlast(largeArray);\n// Returns: 999999 (高速アクセス)\n\n// ネストされた配列も処理できる\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nlast(nested);\n// Returns: [5, 6]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 最後の要素を取得する配列。\n\n#### 戻り値\n\n(`T | undefined`): 配列の最後の要素。配列が空の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/limitAsync.md",
    "content": "# limitAsync\n\n非同期関数の最大並行実行数を制限する新しい関数を作成します。\n\n```typescript\nconst limitedFunc = limitAsync(asyncFunc, concurrency);\n```\n\n## 参照\n\n### `limitAsync(callback, concurrency)`\n\n複数回呼び出される非同期関数の並行実行数を制限したい場合は、`limitAsync`を使用してください。指定された数だけ同時に実行され、追加の呼び出しは実行中の操作が完了するまで待機します。\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 最大3つのリクエストのみを同時に実行するように制限します。\nconst limitedFetch = limitAsync(async url => {\n  return await fetch(url);\n}, 3);\n\nconst urls = ['url1', 'url2', 'url3', 'url4', 'url5'];\nawait Promise.all(urls.map(url => limitedFetch(url)));\n// 最初の3つが先に実行され、完了すると残りが実行されます。\n```\n\n外部API呼び出しやデータベースクエリなど、リソースを大量に使用する操作の負荷を制御するのに便利です。レート制限のあるAPIを使用する場合やサーバー負荷を管理する必要がある場合に特に効果的です。\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 重い計算を最大2つずつ処理します。\nconst processItem = async item => {\n  return await heavyComputation(item);\n};\n\nconst limitedProcess = limitAsync(processItem, 2);\nconst items = [1, 2, 3, 4, 5];\nawait Promise.all(items.map(item => limitedProcess(item)));\n// 最大2つの項目のみが同時に処理されます。\n```\n\n#### パラメータ\n\n- `callback` (`F extends (...args: any[]) => Promise<any>`)：並行実行数を制限する非同期関数です。\n- `concurrency` (`number`)：同時に実行できる最大操作数です。\n\n#### 戻り値\n\n(`F`)：並行実行制限が適用された新しい関数を返します。元の関数と同じインターフェースを持ちます。\n"
  },
  {
    "path": "docs/ja/reference/array/mapAsync.md",
    "content": "# mapAsync\n\n非同期関数を使用して配列の各要素を変換し、新しい配列を返します。\n\n```typescript\nconst transformed = await mapAsync(array, callback);\n```\n\n## 参照\n\n### `mapAsync(array, callback, options?)`\n\n配列の各要素に対して非同期変換操作を実行する場合は、`mapAsync`を使用してください。API呼び出しやデータベースクエリなど、各要素を非同期的に処理する必要がある場合に便利です。\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 各ユーザーの詳細情報を取得します。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userDetails = await mapAsync(users, async user => {\n  return await fetchUserDetails(user.id);\n});\n// 返り値：[{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]\n\n// 並行実行数を制限します。\nconst numbers = [1, 2, 3, 4, 5];\nconst results = await mapAsync(numbers, async n => await slowOperation(n), { concurrency: 2 });\n// 最大2つの操作のみが同時に実行されます。\n```\n\n`concurrency`オプションを使用すると、並行実行を制限してサーバー負荷を制御したり、APIレート制限を守ったりできます。指定しない場合、すべての操作が同時に実行されます。\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 大量の画像を変換しますが、サーバー負荷を考慮して並行処理数を制限します。\nconst imageUrls = [...]; // 多くの画像URL\nconst processedImages = await mapAsync(\n  imageUrls,\n  async (url) => await processImage(url),\n  { concurrency: 5 }\n);\n// 一度に最大5つの画像のみが処理されます。\n```\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：変換する配列です。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R>`)：各要素を変換する非同期関数です。\n- `options` (`MapAsyncOptions`, オプショナル)：並行実行を制御するオプションです。\n  - `concurrency` (`number`, オプショナル)：同時に実行できる最大操作数です。指定しない場合、すべての操作が同時に実行されます。\n\n#### 戻り値\n\n(`Promise<R[]>`)：変換された値で構成される新しい配列のPromiseを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/maxBy.md",
    "content": "# maxBy\n\n変換関数が返す値を基準に、配列で最大値を持つ要素を返します。\n\n```typescript\nconst max = maxBy(items, getValue);\n```\n\n## 使用法\n\n### `maxBy(items, getValue)`\n\n配列の要素を変換関数で数値に変換し、最も大きな値を持つ元の要素を見つけたい場合は `maxBy` を使用してください。空の配列の場合は `undefined` を返します。\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\n// オブジェクト配列で特定のプロパティの最大値を持つ要素を見つけます。\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nmaxBy(people, person => person.age);\n// Returns: { name: 'john', age: 30 }\n\n// 数値配列で絶対値が最も大きい要素を見つけます。\nconst numbers = [-10, -5, 0, 5, 15];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: 15\n```\n\n空の配列の場合は `undefined` を返します。\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\nmaxBy([], x => x.value); // undefined\n```\n\n#### パラメータ\n\n- `items` (`T[]`): 最大値を持つ要素を探す配列です。\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 各要素を数値に変換する関数です。要素、インデックス、配列を引数として受け取ります。\n\n#### 戻り値\n\n(`T | undefined`): 変換関数が返した値の中で最も大きな値を持つ要素です。配列が空の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/minBy.md",
    "content": "# minBy\n\n変換関数が返す値を基準に、配列で最小値を持つ要素を返します。\n\n```typescript\nconst min = minBy(items, getValue);\n```\n\n## 使用法\n\n### `minBy(items, getValue)`\n\n配列の要素を変換関数で数値に変換し、最も小さな値を持つ元の要素を見つけたい場合は `minBy` を使用してください。空の配列の場合は `undefined` を返します。\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\n// オブジェクト配列で特定のプロパティの最小値を持つ要素を見つけます。\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nminBy(people, person => person.age);\n// Returns: { name: 'joe', age: 26 }\n\n// 数値配列で絶対値が最も小さい要素を見つけます。\nconst numbers = [-10, -5, 0, 5, 15];\nminBy(numbers, x => Math.abs(x));\n// Returns: 0\n```\n\n空の配列の場合は `undefined` を返します。\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\nminBy([], x => x.value); // undefined\n```\n\n#### パラメータ\n\n- `items` (`T[]`): 最小値を持つ要素を探す配列です。\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 各要素を数値に変換する関数です。要素、インデックス、配列を引数として受け取ります。\n\n#### 戻り値\n\n(`T | undefined`): 変換関数が返した値の中で最も小さな値を持つ要素です。配列が空の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/orderBy.md",
    "content": "# orderBy\n\n複数の基準と並び順に従って、オブジェクト配列をソートした新しい配列を返します。\n\n```typescript\nconst sorted = orderBy(arr, criteria, orders);\n```\n\n## 使用法\n\n### `orderBy(arr, criteria, orders)`\n\nオブジェクト配列を複数の条件で複合ソートしたい場合は `orderBy` を使用してください。各条件ごとに昇順または降順を指定でき、前の条件で同じ値の場合は次の条件でソートします。\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\n// 複数の基準でユーザー配列をソートします。\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\norderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);\n// Returns:\n// [\n//   { user: 'barney', age: 36 },\n//   { user: 'barney', age: 34 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 }\n// ]\n\n// プロパティ名と関数を混ぜて使用できます。\nconst products = [\n  { name: 'Apple', category: 'fruit', price: 1.5 },\n  { name: 'Banana', category: 'fruit', price: 0.8 },\n  { name: 'Broccoli', category: 'vegetable', price: 2.0 },\n];\n\norderBy(products, ['category', product => product.name.length], ['asc', 'desc']);\n// Returns: categoryでまずソートし、同じcategory内では名前の長さの降順でソート\n```\n\n並び順の数が条件より少ない場合、最後の並び順を繰り返し使用します。\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\nconst data = [\n  { a: 1, b: 1, c: 1 },\n  { a: 1, b: 2, c: 2 },\n  { a: 2, b: 1, c: 1 },\n];\n\norderBy(data, ['a', 'b', 'c'], ['asc', 'desc']);\n// 'a'は昇順、'b'と'c'は降順でソートされます。\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): ソートするオブジェクト配列です。\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): ソートする基準です。オブジェクトのプロパティ名または値を返す関数を使用できます。\n- `orders` (`Array<'asc' | 'desc'>`): 各基準に対する並び順の配列です。`'asc'`は昇順、`'desc'`は降順を意味します。\n\n#### 戻り値\n\n(`T[]`): 指定された基準と並び順に従ってソートされた新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/partition.md",
    "content": "# partition\n\n条件に従って配列を2つのグループに分けたタプルを返します。\n\n```typescript\nconst [truthy, falsy] = partition(arr, isInTruthy);\n```\n\n## 使用法\n\n### `partition(arr, isInTruthy)`\n\n配列の要素を特定の条件に従って2つのグループに分けたい場合は `partition` を使用してください。条件関数が `true` を返す要素と `false` を返す要素をそれぞれ異なる配列に分けます。\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\n// 数値配列を偶数と奇数に分けます。\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst [evens, odds] = partition(numbers, x => x % 2 === 0);\n// evens: [2, 4, 6]\n// odds: [1, 3, 5]\n\n// オブジェクト配列を特定の条件で分けます。\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nconst [activeUsers, inactiveUsers] = partition(users, user => user.active);\n// activeUsers: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n// inactiveUsers: [{ name: 'Bob', active: false }]\n```\n\n空の配列の場合は2つの空の配列を返します。\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\nconst [truthy, falsy] = partition([], x => x > 0);\n// truthy: []\n// falsy: []\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 2つのグループに分ける配列です。\n- `isInTruthy` (`(value: T, index: number, array: readonly T[]) => boolean`): 各要素が最初の配列(truthy)に含まれるか、2番目の配列(falsy)に含まれるかを決定する条件関数です。値、インデックス、配列全体と共に呼び出されます。\n\n#### 戻り値\n\n(`[truthy: T[], falsy: T[]]`): 2つの配列で構成されるタプルです。最初の配列は条件が `true` の要素、2番目の配列は条件が `false` の要素を含みます。\n"
  },
  {
    "path": "docs/ja/reference/array/pull.md",
    "content": "# pull\n\n配列から指定されたすべての値を削除します。\n\n```typescript\nconst result = pull(arr, valuesToRemove);\n```\n\n## 使用法\n\n### `pull(arr, valuesToRemove)`\n\n配列から特定の値をすべて削除したい場合は `pull` を使用してください。この関数は元の配列を直接変更し、変更された配列を返します。\n\n```typescript\nimport { pull } from 'es-toolkit/array';\n\n// 数値配列から特定の値を削除します。\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\npull(numbers, [2, 4]);\nconsole.log(numbers); // [1, 3, 5]\n\n// 文字列配列から特定の文字列を削除します。\nconst fruits = ['apple', 'banana', 'cherry', 'banana', 'date'];\npull(fruits, ['banana', 'cherry']);\nconsole.log(fruits); // ['apple', 'date']\n\n// オブジェクト配列から参照が同じオブジェクトを削除します。\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj3, obj1];\npull(objects, [obj1]);\nconsole.log(objects); // [{ id: 2 }, { id: 3 }]\n```\n\n元の配列を変更せずに新しい配列を作成したい場合は `difference` 関数を使用してください。\n\n```typescript\nimport { pull } from 'es-toolkit/array';\nimport { difference } from 'es-toolkit/array';\n\nconst original = [1, 2, 3, 4, 5];\n\n// pullは元の配列を変更します。\nconst arr1 = [...original];\npull(arr1, [2, 4]);\nconsole.log(arr1); // [1, 3, 5]\n\n// differenceは新しい配列を返します。\nconst arr2 = difference(original, [2, 4]);\nconsole.log(original); // [1, 2, 3, 4, 5] (変更されていない)\nconsole.log(arr2); // [1, 3, 5]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 値を削除する配列です。\n- `valuesToRemove` (`readonly unknown[]`): 配列から削除する値の配列です。\n\n#### 戻り値\n\n(`T[]`): 指定された値が削除された元の配列です。元の配列が変更されて返されます。\n"
  },
  {
    "path": "docs/ja/reference/array/pullAt.md",
    "content": "# pullAt\n\n配列から指定されたインデックスの要素を削除し、削除された要素を返します。\n\n```typescript\nconst removed = pullAt(arr, indices);\n```\n\n## 使用法\n\n### `pullAt(arr, indicesToRemove)`\n\n配列の特定の位置にある要素を削除したい場合は `pullAt` を使用してください。この関数は元の配列を変更し、削除された要素を新しい配列として返します。負のインデックスもサポートしており、配列の末尾から計算します。\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\n// 複数のインデックスの要素を一度に削除します。\nconst numbers = [10, 20, 30, 40, 50];\nconst removed = pullAt(numbers, [1, 3, 4]);\nconsole.log(removed); // [20, 40, 50]\nconsole.log(numbers); // [10, 30]\n\n// 重複したインデックスがあっても安全に処理します。\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst removedFruits = pullAt(fruits, [1, 2, 1]);\nconsole.log(removedFruits); // ['banana', 'cherry', 'banana']\nconsole.log(fruits); // ['apple', 'date']\n```\n\n存在しないインデックスを指定すると、その位置には `undefined` が返されます。\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\nconst items = [1, 2, 3];\nconst removed = pullAt(items, [0, 5, 2]);\nconsole.log(removed); // [1, undefined, 3]\nconsole.log(items); // [2]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を削除する配列です。\n- `indicesToRemove` (`number[]`): 削除する要素のインデックスの配列です。負のインデックスは配列の末尾から計算されます。\n\n#### 戻り値\n\n(`T[]`): 削除された要素で構成される新しい配列です。存在しないインデックスについては `undefined` が含まれます。\n"
  },
  {
    "path": "docs/ja/reference/array/reduceAsync.md",
    "content": "# reduceAsync\n\n非同期リデューサー関数を使用して配列を単一の値に縮約します。\n\n```typescript\nconst result = await reduceAsync(array, reducer, initialValue);\n```\n\n## 参照\n\n### `reduceAsync(array, reducer, initialValue)`\n\n各要素を順次処理して配列を1つの値に縮約する場合は、`reduceAsync`を使用してください。リデューサー関数は左から右へ各要素に順次適用され、前の呼び出しの累積結果を次の呼び出しに渡します。\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 各数値の非同期値を取得して合計します。\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + (await fetchValue(n)), 0);\n// 返り値：すべての取得値の合計\n\n// 配列をオブジェクトに変換します。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userMap = await reduceAsync(\n  users,\n  async (acc, user) => {\n    const details = await fetchUserDetails(user.id);\n    acc[user.id] = details;\n    return acc;\n  },\n  {} as Record<number, any>\n);\n// 返り値：{ 1: {...}, 2: {...}, 3: {...} }\n```\n\n他の非同期配列メソッドとは異なり、`reduceAsync`は各要素を順次処理する必要があるため、並行実行をサポートしていません。前のステップの結果が次のステップに必要だからです。\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：縮約する配列です。\n- `reducer` (`(accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>`)：各要素を処理する非同期関数です。累積値と現在の値を受け取り、新しい累積値を返します。\n- `initialValue` (`U`)：アキュムレーターの初期値です。\n\n#### 戻り値\n\n(`Promise<U>`)：最終的な累積値のPromiseを返します。\n\n---\n\n### `reduceAsync(array, reducer)`\n\n初期値なしで配列を縮約する場合、最初の要素が初期値として使用され、2番目の要素からリデューサー関数が適用されます。\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 初期値なしで合計を計算します。\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + n);\n// 返り値：15 (1 + 2 + 3 + 4 + 5)\n\n// 空の配列はundefinedを返します。\nconst emptyArray: number[] = [];\nconst result = await reduceAsync(emptyArray, async (acc, n) => acc + n);\n// 返り値：undefined\n```\n\n初期値なしで空の配列に対して`reduceAsync`を呼び出すと、`undefined`を返します。\n\n#### パラメータ\n\n- `array` (`readonly T[]`)：縮約する配列です。\n- `reducer` (`(accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>`)：各要素を処理する非同期関数です。累積値と現在の値を受け取り、新しい累積値を返します。\n\n#### 戻り値\n\n(`Promise<T | undefined>`)：最終的な累積値のPromiseを返します。配列が空の場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/remove.md",
    "content": "# remove\n\n条件関数に従って配列から要素を削除し、削除された要素を新しい配列として返します。元の配列を直接変更します。\n\n```typescript\nconst removed = remove(arr, shouldRemoveElement);\n```\n\n## 使用法\n\n### `remove(arr, shouldRemoveElement)`\n\n配列から特定の条件に合う要素を削除し、削除された要素を確認したい場合は `remove` を使用してください。この関数は元の配列を変更しながら、削除された要素を別の配列として返します。元の配列を保持したい場合は `filter` メソッドを使用してください。\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// 偶数を削除します。\nconst numbers = [1, 2, 3, 4, 5];\nconst removedNumbers = remove(numbers, value => value % 2 === 0);\nconsole.log(numbers); // [1, 3, 5] (元の配列が変更されます)\nconsole.log(removedNumbers); // [2, 4] (削除された要素)\n\n// 特定の条件のオブジェクトを削除します。\nconst users = [\n  { name: 'john', age: 25 },\n  { name: 'jane', age: 17 },\n  { name: 'bob', age: 30 },\n];\nconst minors = remove(users, user => user.age < 18);\nconsole.log(users); // [{ name: 'john', age: 25 }, { name: 'bob', age: 30 }]\nconsole.log(minors); // [{ name: 'jane', age: 17 }]\n```\n\nインデックスと元の配列情報も使用できます。\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// インデックスに基づいて要素を削除します。\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst removedAtEvenIndex = remove(items, (value, index) => index % 2 === 0);\nconsole.log(items); // ['b', 'd']\nconsole.log(removedAtEvenIndex); // ['a', 'c', 'e']\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 変更する配列です。\n- `shouldRemoveElement` (`(value: T, index: number, array: T[]) => boolean`): 各要素に対して呼び出される条件関数です。`true` を返すと要素が削除されます。\n  - `value`: 現在処理中の要素です。\n  - `index`: 現在の要素のインデックスです。\n  - `array`: 元の配列です。\n\n#### 戻り値\n\n(`T[]`): 削除された要素で構成される新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/sample.md",
    "content": "# sample\n\n配列から無作為に選択された1つの要素を返します。\n\n```typescript\nconst randomElement = sample(arr);\n```\n\n## 使用法\n\n### `sample(arr)`\n\n配列から無作為に1つの要素を取得したい場合は `sample` を使用してください。ゲームでランダムアイテムを選択したり、テスト用データを無作為に取得したり、抽選を行うときに便利です。\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 数値配列から無作為に1つを選択します。\nconst numbers = [1, 2, 3, 4, 5];\nconst randomNumber = sample(numbers);\n// Returns: 1, 2, 3, 4, 5 のいずれか\n\n// 文字列配列から無作為に1つを選択します。\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst randomFruit = sample(fruits);\n// Returns: 'apple', 'banana', 'cherry', 'date' のいずれか\n\n// オブジェクト配列から無作為に1つを選択します。\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst randomUser = sample(users);\n// Returns: 3人のユーザーから無作為に1人\n```\n\n様々な型の配列でも使用できます。\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 真偽値配列\nconst booleans = [true, false];\nconst randomBoolean = sample(booleans);\n// Returns: true または false\n\n// 混合型配列\nconst mixed = [1, 'hello', { key: 'value' }, [1, 2, 3]];\nconst randomItem = sample(mixed);\n// Returns: 配列にある要素のいずれか\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 無作為に要素を選択する配列です。\n\n#### 戻り値\n\n(`T`): 配列から無作為に選択された要素です。\n"
  },
  {
    "path": "docs/ja/reference/array/sampleSize.md",
    "content": "# sampleSize\n\n配列から指定された個数だけ無作為に選択された要素で構成される新しい配列を返します。\n\n```typescript\nconst sampled = sampleSize(array, size);\n```\n\n## 使用法\n\n### `sampleSize(array, size)`\n\n配列から複数の要素を無作為にサンプリングしたい場合は `sampleSize` を使用してください。Floydのアルゴリズムを使用して効率的に重複のないランダムサンプルを生成します。アンケート調査でサンプルを抽出したり、ゲームで複数のアイテムを無作為に選択するときに便利です。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\n// 数値配列から3つを無作為に選択します。\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst randomNumbers = sampleSize(numbers, 3);\n// Returns: [2, 7, 9] (例、実際には無作為)\n\n// 文字列配列から2つを無作為に選択します。\nconst fruits = ['apple', 'banana', 'cherry', 'date', 'elderberry'];\nconst randomFruits = sampleSize(fruits, 2);\n// Returns: ['cherry', 'apple'] (例、実際には無作為)\n```\n\n様々なサイズでサンプリングできます。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\n\n// 1つ選択\nconst single = sampleSize(items, 1);\n// Returns: ['c'] (例)\n\n// 配列全体のサイズと同じ数を選択(シャッフル効果)\nconst all = sampleSize(items, 5);\n// Returns: ['b', 'd', 'a', 'e', 'c'] (例)\n\n// 空の配列を選択\nconst none = sampleSize(items, 0);\n// Returns: []\n```\n\n#### パラメータ\n\n- `array` (`readonly T[]`): サンプリングする配列です。\n- `size` (`number`): 選択する要素の個数です。\n\n#### 戻り値\n\n(`T[]`): 無作為に選択された要素で構成される新しい配列を返します。\n\n#### エラー\n\n`size` が配列の長さより大きい場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/array/shuffle.md",
    "content": "# shuffle\n\n配列の要素の順序を無作為に入れ替えた新しい配列を返します。\n\n```typescript\nconst shuffled = shuffle(arr);\n```\n\n## 使用法\n\n### `shuffle(arr)`\n\n配列の要素を無作為に入れ替えたい場合は `shuffle` を使用してください。Fisher-Yatesアルゴリズムを使用してすべての順列が等しい確率で現れるように完璧な無作為シャッフルを保証します。カードゲームでデッキをシャッフルしたり、クイズ問題の順序をランダム化したり、プレイリストをシャッフルするときに便利です。\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// 数値配列をシャッフルします。\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffledNumbers = shuffle(numbers);\n// Returns: [3, 1, 4, 5, 2] (例、実際には無作為)\nconsole.log(numbers); // [1, 2, 3, 4, 5] (元の配列は変更されません)\n\n// 文字列配列をシャッフルします。\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffledFruits = shuffle(fruits);\n// Returns: ['cherry', 'apple', 'date', 'banana'] (例、実際には無作為)\n```\n\n様々な型の配列をシャッフルできます。\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// オブジェクト配列をシャッフルします。\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst shuffledUsers = shuffle(users);\n// Returns: ユーザーオブジェクトが無作為な順序でシャッフルされた新しい配列\n\n// 混合型配列をシャッフルします。\nconst mixed = [1, 'hello', true, { key: 'value' }];\nconst shuffledMixed = shuffle(mixed);\n// Returns: 要素が無作為な順序でシャッフルされた新しい配列\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): シャッフルする配列です。\n\n#### 戻り値\n\n(`T[]`): 要素が無作為な順序でシャッフルされた新しい配列を返します。元の配列は変更されません。\n"
  },
  {
    "path": "docs/ja/reference/array/sortBy.md",
    "content": "# sortBy\n\n与えられた基準に従ってオブジェクト配列を昇順にソートした新しい配列を返します。\n\n```typescript\nconst sorted = sortBy(arr, criteria);\n```\n\n## 使用法\n\n### `sortBy(arr, criteria)`\n\nオブジェクト配列を複数のプロパティまたは計算された値を基準にソートしたい場合は `sortBy` を使用してください。プロパティ名または変換関数を配列で提供すると、その順序で優先順位を付けて昇順にソートします。テーブルデータをソートしたり、複雑なソートロジックが必要なときに便利です。\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 単一のプロパティでソートします。\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 35 },\n];\nconst byAge = sortBy(users, ['age']);\n// Returns: [{ name: 'jane', age: 25 }, { name: 'john', age: 30 }, { name: 'bob', age: 35 }]\n\n// 複数のプロパティでソートします。\nconst employees = [\n  { name: 'john', department: 'engineering', age: 30 },\n  { name: 'jane', department: 'hr', age: 25 },\n  { name: 'bob', department: 'engineering', age: 35 },\n  { name: 'alice', department: 'engineering', age: 25 },\n];\nconst sorted = sortBy(employees, ['department', 'age']);\n// Returns: 部署が最初、次に年齢順でソート\n// [\n//   { name: 'alice', department: 'engineering', age: 25 },\n//   { name: 'john', department: 'engineering', age: 30 },\n//   { name: 'bob', department: 'engineering', age: 35 },\n//   { name: 'jane', department: 'hr', age: 25 }\n// ]\n```\n\n関数を使用して複雑なソート基準を作成できます。\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 関数とプロパティを混ぜて使用します。\nconst products = [\n  { name: 'laptop', price: 1000, category: 'electronics' },\n  { name: 'shirt', price: 50, category: 'clothing' },\n  { name: 'phone', price: 800, category: 'electronics' },\n];\n\nconst sorted = sortBy(products, [\n  'category',\n  item => -item.price, // 価格は降順で\n]);\n// Returns: カテゴリが最初、次に価格の高い順でソート\n\n// 計算された値でソートします。\nconst words = ['hello', 'a', 'wonderful', 'world'];\nconst byLength = sortBy(\n  words.map(word => ({ word, length: word.length })),\n  ['length']\n);\n// Returns: 文字列の長さ順でソートされたオブジェクト配列\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): ソートするオブジェクト配列です。\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): ソート基準です。オブジェクトのプロパティ名または変換関数の配列で、前にある基準が優先順位が高くなります。\n\n#### 戻り値\n\n(`T[]`): 指定された基準に従って昇順にソートされた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/tail.md",
    "content": "# tail\n\n配列の最初の要素を除いたすべての要素で構成される新しい配列を返します。\n\n```typescript\nconst result = tail(arr);\n```\n\n## 使用法\n\n### `tail(arr)`\n\n配列から最初の要素だけを除いて残りのすべての要素を取得したい場合は `tail` を使用してください。配列が空であるか要素が1つだけの場合は空の配列を返します。スタックやキューで最初の要素を除いた残りを処理するときに便利です。\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 数値配列から最初の要素を除きます。\nconst numbers = [1, 2, 3, 4, 5];\ntail(numbers);\n// Returns: [2, 3, 4, 5]\n\n// 文字列配列から最初の要素を除きます。\nconst strings = ['first', 'second', 'third'];\ntail(strings);\n// Returns: ['second', 'third']\n\n// 要素が1つだけの配列は空の配列を返します。\nconst single = [42];\ntail(single);\n// Returns: []\n```\n\n空の配列や特殊なケースも安全に処理します。\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 空の配列は空の配列を返します。\nconst empty: number[] = [];\ntail(empty);\n// Returns: []\n\n// 入れ子配列も処理できます。\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ntail(nested);\n// Returns: [[3, 4], [5, 6]]\n\n// オブジェクト配列も処理できます。\nconst users = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\ntail(users);\n// Returns: [{ id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 最初の要素を除く配列です。\n\n#### 戻り値\n\n(`T[]`): 最初の要素を除いた新しい配列を返します。入力配列が空であるか要素が1つだけの場合は空の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/take.md",
    "content": "# take\n\n配列の最初から指定された個数だけ要素を取得して新しい配列を作ります。\n\n```typescript\nconst taken = take(arr, count);\n```\n\n## 使用法\n\n### `take(arr, count?)`\n\n配列の前から何個かの要素だけが必要な場合は `take` を使用してください。要求された個数が配列の長さより大きい場合は配列全体を返します。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\n// 最初の3つの要素を取得します。\ntake([1, 2, 3, 4, 5], 3);\n// Returns: [1, 2, 3]\n\n// 最初の2つの要素を取得します。\ntake(['a', 'b', 'c'], 2);\n// Returns: ['a', 'b']\n```\n\n配列より多い個数を要求すると配列全体を返します。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n`count` を省略すると最初の要素だけを取得します。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3]);\n// Returns: [1]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を取得する配列です。\n- `count` (`number`, オプション): 取得する要素の個数です。デフォルト値は `1` です。\n\n#### 戻り値\n\n(`T[]`): 配列の最初から `count` 個の要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/takeRight.md",
    "content": "# takeRight\n\n配列の最後から指定された個数だけ要素を取得して新しい配列を作ります。\n\n```typescript\nconst taken = takeRight(arr, count);\n```\n\n## 使用法\n\n### `takeRight(arr, count?)`\n\n配列の最後から何個かの要素だけが必要な場合は `takeRight` を使用してください。要求された個数が配列の長さより大きい場合は配列全体を返します。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\n// 最後の2つの要素を取得します。\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 最後の2つの要素を取得します。\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n```\n\n配列より多い個数を要求すると配列全体を返します。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n`count` を省略すると最後の要素だけを取得します。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3]);\n// Returns: [3]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を取得する配列です。\n- `count` (`number`, オプション): 取得する要素の個数です。デフォルト値は `1` です。\n\n#### 戻り値\n\n(`T[]`): 配列の最後から `count` 個の要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/takeRightWhile.md",
    "content": "# takeRightWhile\n\n条件関数が真を返す間、配列の最後から要素を取得して新しい配列を返します。\n\n```typescript\nconst result = takeRightWhile(arr, shouldContinueTaking);\n```\n\n## 使用法\n\n### `takeRightWhile(arr, shouldContinueTaking)`\n\n配列の最後から条件を満たす要素を取得したい場合は `takeRightWhile` を使用してください。条件関数が偽を返す最初の要素に出会うと停止します。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/array';\n\n// 4より小さい数字を最後から取得します\ntakeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n// 結果: [3, 2, 1]\n\n// 3より大きい数字を最後から取得します\ntakeRightWhile([1, 2, 3], n => n > 3);\n// 結果: []\n\n// 文字列の長さが5以下の要素を取得します\ntakeRightWhile(['hello', 'world', 'foo', 'bar'], str => str.length <= 5);\n// 結果: ['hello', 'world', 'foo', 'bar']\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を取得する配列です。\n- `shouldContinueTaking` (`(item: T, index: number, array: T[]) => boolean`): 各要素、インデックス、配列と共に呼び出される条件関数です。この関数が真を返す間、要素が結果に含まれます。\n\n#### 戻り値\n\n(`T[]`): 条件関数が真を返す間、配列の最後から取得した要素を含む新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/array/takeWhile.md",
    "content": "# takeWhile\n\n条件関数が真を返す間、配列の最初から要素を取得して新しい配列を作ります。\n\n```typescript\nconst taken = takeWhile(arr, predicate);\n```\n\n## 使用法\n\n### `takeWhile(arr, predicate)`\n\n配列の最初から特定の条件を満たす要素だけが必要な場合は `takeWhile` を使用してください。条件を満たさない最初の要素に出会うと取得を停止します。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\n// 3より小さい要素だけを取得します。\ntakeWhile([1, 2, 3, 4], x => x < 3);\n// Returns: [1, 2]\n\n// 3より大きい要素は最初からないので空の配列を返します。\ntakeWhile([1, 2, 3, 4], x => x > 3);\n// Returns: []\n```\n\nオブジェクト配列でも使用できます。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n  { name: 'David', age: 40 },\n];\n\n// 30歳未満のユーザーだけを取得します。\ntakeWhile(users, user => user.age < 30);\n// Returns: [{ name: 'Alice', age: 25 }]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 要素を取得する配列です。\n- `predicate` (`(element: T, index: number, array: T[]) => boolean`): 各要素、インデックス、配列と共に呼び出される条件関数です。この関数が真を返す間、要素を取得します。\n\n#### 戻り値\n\n(`T[]`): 条件関数が真を返す間、最初から取得した要素を含む新しい配列を返します。\n\n## Lodash 互換性\n\n`es-toolkit/compat` から `takeWhile` をインポートすると、Lodash と互換になります。\n\n要素を取得する条件を指定でき、条件が真のような値と評価される限り配列の先頭から要素を取得します。\n\n- **検査関数**: 配列の各要素に適用される検査関数を指定できます。関数が真のような値を返す間、要素を取得し、初めて偽のような値を返すと取得を停止します。\n- **部分オブジェクト**: 部分オブジェクトを指定することもできます。指定されたオブジェクトのプロパティと一致する要素を取得します。\n- **プロパティ-値ペア**: プロパティと値を指定することもできます。指定されたプロパティが値と一致する要素を取得します。\n- **プロパティ名**: 最後にプロパティ名を指定することもできます。そのプロパティが真のような値と評価される要素を取得します。\n\n### 使用法\n\n```typescript\nfunction takeWhile<T>(array: ArrayLike<T> | null | undefined): T[];\nfunction takeWhile<T>(\n  array: ArrayLike<T> | null | undefined,\n  predicate: (item: T, index: number, array: T[]) => unknown\n): T[];\nfunction takeWhile<T>(array: ArrayLike<T> | null | undefined, matches: Partial<T>): T[];\nfunction takeWhile<T>(array: ArrayLike<T> | null | undefined, matchesProperty: [keyof T, unknown]): T[];\nfunction takeWhile<T>(array: ArrayLike<T> | null | undefined, property: PropertyKey): T[];\n```\n\n### 例\n\n```typescript\n// 検査関数を使用した例\nconst array1 = [1, 2, 3, 4, 5];\nconst result1 = takeWhile(array1, x => x < 3);\n// result1 は [1, 2] になります。3より小さい要素は真のような値と評価されるため先頭から取得され、最初に3以上の値が見つかると停止します。\n\n// 部分オブジェクトを使用した例\nconst array2 = [{ a: 3 }, { a: 2 }, { a: 1 }];\nconst result2 = takeWhile(array2, { a: 3 });\n// result2 は [{ a: 3 }] になります。最初のオブジェクトが指定された部分オブジェクトとプロパティが一致するためです。\n\n// プロパティ-値ペアを使用した例\nconst array3 = [{ id: 3 }, { id: 2 }, { id: 1 }];\nconst result3 = takeWhile(array3, ['id', 3]);\n// result3 は [{ id: 3 }] になります。最初のオブジェクトの id プロパティが値 3 と一致するためです。\n\n// プロパティ名を使用した例\nconst array4 = [{ isActive: true }, { isActive: true }, { isActive: false }];\nconst result4 = takeWhile(array4, 'isActive');\n// result4 は [{ isActive: true }, { isActive: true }] になります。isActive プロパティが真のような値と評価される要素を先頭から取得するためです。\n\n// 条件がない場合\nconst array5 = [1, 2, 3];\nconst result5 = takeWhile(array5);\n// result5 は [1, 2, 3] になります。条件がない場合、デフォルトで identity 関数が使用されるためです。\n\n// null または undefined 配列の場合\nconst result6 = takeWhile(null);\n// result6 は [] になります。入力配列が null または undefined のためです。\n```\n"
  },
  {
    "path": "docs/ja/reference/array/toFilled.md",
    "content": "# toFilled\n\n配列の一部または全体を指定された値で埋めて新しい配列を作ります。\n\n```typescript\nconst filled = toFilled(arr, value, start?, end?);\n```\n\n## 使用法\n\n### `toFilled(arr, value, start?, end?)`\n\n配列の特定の範囲を指定された値で埋めたい場合は `toFilled` を使用してください。元の配列を変更せず、新しい配列を作成して返します。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// インデックス2から最後まで'*'で埋めます。\ntoFilled(array, '*', 2);\n// Returns: [1, 2, '*', '*', '*']\n\n// インデックス1から4の前まで'*'で埋めます。\ntoFilled(array, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n開始位置と終了位置を省略すると配列全体を埋めます。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\ntoFilled(array, '*');\n// Returns: ['*', '*', '*', '*', '*']\n```\n\n負のインデックスも使用できます。配列の最後から計算します。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 後ろから4番目から後ろから1番目の前まで'*'で埋めます。\ntoFilled(array, '*', -4, -1);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n#### パラメータ\n\n- `arr` (`T[]`): 元となる配列です。\n- `value` (`U`): 配列を埋める値です。\n- `start` (`number`, オプション): 埋め始める位置です。デフォルト値は `0` です。\n- `end` (`number`, オプション): 埋め終わる位置です。デフォルト値は配列の長さです。\n\n#### 戻り値\n\n(`Array<T | U>`): 指定された範囲が値で埋められた新しい配列を返します。元の配列は変更されません。\n"
  },
  {
    "path": "docs/ja/reference/array/union.md",
    "content": "# union\n\n2つの配列のすべての一意な要素を含む新しい配列を作ります。\n\n```typescript\nconst unified = union(arr1, arr2);\n```\n\n## 使用法\n\n### `union(arr1, arr2)`\n\n複数の配列から重複なくすべての要素を1つにまとめたい場合は `union` を使用してください。2つの配列を合わせた後、重複した値を除いた新しい配列を返します。\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\n// 数値配列の和集合を求めます。\nconst array1 = [1, 2, 3];\nconst array2 = [3, 4, 5];\nunion(array1, array2);\n// Returns: [1, 2, 3, 4, 5]\n\n// 文字列配列の和集合を求めます。\nconst fruits1 = ['apple', 'banana'];\nconst fruits2 = ['banana', 'orange'];\nunion(fruits1, fruits2);\n// Returns: ['apple', 'banana', 'orange']\n```\n\n最初の配列の要素が先に現れ、その次に2番目の配列の一意な要素が追加されます。\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = [2, 3, 4, 5];\nunion(arr1, arr2);\n// Returns: [1, 2, 3, 4, 5]\n// 1, 2, 3はarr1から、4, 5はarr2から来た要素です。\n```\n\n#### パラメータ\n\n- `arr1` (`T[]`): 結合する最初の配列です。\n- `arr2` (`T[]`): 結合する2番目の配列です。\n\n#### 戻り値\n\n(`T[]`): 2つの配列のすべての一意な要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/unionBy.md",
    "content": "# unionBy\n\n特定の関数で変換した値を基準に、2つの配列の一意な要素を含む新しい配列を作ります。\n\n```typescript\nconst unified = unionBy(arr1, arr2, mapper);\n```\n\n## 使用法\n\n### `unionBy(arr1, arr2, mapper)`\n\nオブジェクト配列で特定のプロパティを基準に重複を除きたい場合は `unionBy` を使用してください。`mapper` 関数が返す値が同じであれば同一の要素として扱われます。\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\n// idを基準にオブジェクトの和集合を求めます。\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nunionBy(users1, users2, user => user.id);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n\n// 数値を3で割った余りを基準に和集合を求めます。\nconst nums1 = [1, 2, 3];\nconst nums2 = [4, 5, 6];\nunionBy(nums1, nums2, x => x % 3);\n// Returns: [1, 2, 3]\n// 1 % 3 = 1, 2 % 3 = 2, 3 % 3 = 0で、\n// 4 % 3 = 1, 5 % 3 = 2, 6 % 3 = 0なので、すべて重複します。\n```\n\nカスタム比較関数を使用して複雑な基準でも和集合を求められます。\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\nconst products1 = [\n  { category: 'electronics', price: 100 },\n  { category: 'books', price: 20 },\n];\nconst products2 = [\n  { category: 'electronics', price: 150 },\n  { category: 'toys', price: 30 },\n];\n\n// カテゴリを基準に和集合を求めます。\nunionBy(products1, products2, product => product.category);\n// Returns: [\n//   { category: 'electronics', price: 100 },\n//   { category: 'books', price: 20 },\n//   { category: 'toys', price: 30 }\n// ]\n```\n\n#### パラメータ\n\n- `arr1` (`T[]`): 結合する最初の配列です。\n- `arr2` (`T[]`): 結合する2番目の配列です。\n- `mapper` (`(item: T) => U`): 各要素を比較する値に変換する関数です。\n\n#### 戻り値\n\n(`T[]`): `mapper` 関数が返した値を基準に重複が除かれた2つの配列の和集合を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/unionWith.md",
    "content": "# unionWith\n\nカスタム等価関数を基準に、2つの配列の一意な要素を含む新しい配列を作ります。\n\n```typescript\nconst unified = unionWith(arr1, arr2, areItemsEqual);\n```\n\n## 使用法\n\n### `unionWith(arr1, arr2, areItemsEqual)`\n\n複雑な条件で要素の等価性を判断したい場合は `unionWith` を使用してください。提供された関数が真を返すと2つの要素を同じものと判断して重複を除きます。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// オブジェクトのidを基準に和集合を求めます。\nconst array1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst array2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nconst areItemsEqual = (a, b) => a.id === b.id;\nunionWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\nより複雑な比較ロジックも使用できます。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// 座標を基準に和集合を求めます。\nconst points1 = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n];\nconst points2 = [\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\nconst arePointsEqual = (p1, p2) => p1.x === p2.x && p1.y === p2.y;\nunionWith(points1, points2, arePointsEqual);\n// Returns: [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 }]\n```\n\n大文字小文字を無視した文字列比較の例です。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\nconst words1 = ['Apple', 'banana'];\nconst words2 = ['BANANA', 'orange'];\nconst areWordsEqual = (a, b) => a.toLowerCase() === b.toLowerCase();\nunionWith(words1, words2, areWordsEqual);\n// Returns: ['Apple', 'banana', 'orange']\n// 'banana'と'BANANA'は同じものと判断されるため、最初のものだけが保持されます。\n```\n\n#### パラメータ\n\n- `arr1` (`T[]`): 結合する最初の配列です。\n- `arr2` (`T[]`): 結合する2番目の配列です。\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 2つの要素が同じかを判断する関数です。同じと判断されれば `true` を、そうでなければ `false` を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): カスタム等価関数を基準に重複が除かれた2つの配列の和集合を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/uniq.md",
    "content": "# uniq\n\n配列から重複した要素を除いた新しい配列を返します。\n\n```typescript\nconst uniqueArray = uniq(arr);\n```\n\n## 使用法\n\n### `uniq(arr)`\n\n配列から重複した値を除いて一意な値だけを残したい場合は `uniq` を使用してください。元の配列で最初に現れる順序を保持します。\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\n// 数値配列から重複を除きます。\nconst numbers = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueNumbers = uniq(numbers);\nconsole.log(uniqueNumbers); // [1, 2, 3, 4, 5]\n\n// 文字列配列から重複を除きます。\nconst words = ['apple', 'banana', 'apple', 'cherry', 'banana'];\nconst uniqueWords = uniq(words);\nconsole.log(uniqueWords); // ['apple', 'banana', 'cherry']\n\n// オブジェクト配列から参照が同じオブジェクトを除きます。\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj1, obj3, obj2];\nconst uniqueObjects = uniq(objects);\nconsole.log(uniqueObjects); // [{ id: 1 }, { id: 2 }, { id: 3 }]\n```\n\n空の配列からは空の配列を返します。\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\nconst emptyArray = uniq([]);\nconsole.log(emptyArray); // []\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 重複を除く配列です。\n\n#### 戻り値\n\n(`T[]`): 重複が除かれた新しい配列です。元の配列で最初に現れる順序を保持します。\n"
  },
  {
    "path": "docs/ja/reference/array/uniqBy.md",
    "content": "# uniqBy\n\n変換関数が返す値を基準に、配列から重複した要素を除いた新しい配列を返します。\n\n```typescript\nconst uniqueArray = uniqBy(arr, mapper);\n```\n\n## 使用法\n\n### `uniqBy(arr, mapper)`\n\n配列の要素を特定の基準で変換して重複を判断したい場合は `uniqBy` を使用してください。変換関数が同じ値を返す要素のうち最初に現れるものだけを残します。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\n// 小数を切り捨てて重複を除きます。\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqBy(numbers, Math.floor);\nconsole.log(result); // [1.2, 2.1, 3.2, 5.7, 7.19]\n\n// オブジェクト配列で特定のプロパティを基準に重複を除きます。\nconst users = [\n  { id: 1, name: 'john', age: 30 },\n  { id: 2, name: 'jane', age: 30 },\n  { id: 3, name: 'joe', age: 25 },\n  { id: 4, name: 'jenny', age: 25 },\n];\nconst uniqueByAge = uniqBy(users, user => user.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'john', age: 30 }, { id: 3, name: 'joe', age: 25 }]\n\n// 文字列の長さを基準に重複を除きます。\nconst words = ['apple', 'pie', 'banana', 'cat', 'dog'];\nconst uniqueByLength = uniqBy(words, word => word.length);\nconsole.log(uniqueByLength); // ['apple', 'pie', 'banana']\n```\n\n複雑なオブジェクトでも特定のフィールドの組み合わせを基準にできます。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n  { category: 'fruit', name: 'grape' },\n];\n\n// カテゴリを基準に重複を除きます。\nconst uniqueByCategory = uniqBy(products, item => item.category);\nconsole.log(uniqueByCategory.length); // 2\nconsole.log(uniqueByCategory);\n// [{ category: 'fruit', name: 'apple' }, { category: 'vegetable', name: 'carrot' }]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 重複を除く配列です。\n- `mapper` (`(item: T, index: number, array: readonly T[]) => U`): 各要素を比較する値に変換する関数です。要素、インデックス、配列を引数として受け取ります。\n\n#### 戻り値\n\n(`T[]`): 変換関数の結果を基準に重複が除かれた新しい配列です。元の配列で最初に現れる順序を保持します。\n"
  },
  {
    "path": "docs/ja/reference/array/uniqWith.md",
    "content": "# uniqWith\n\n比較関数を使用して、配列から重複した要素を除いた新しい配列を返します。\n\n```typescript\nconst uniqueArray = uniqWith(arr, areItemsEqual);\n```\n\n## 使用法\n\n### `uniqWith(arr, areItemsEqual)`\n\n2つの要素が同じかを判断するカスタム比較関数を基準に重複を除きたい場合は `uniqWith` を使用してください。比較関数が `true` を返す要素のうち最初に現れるものだけを残します。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\n// 数値の差が1未満の場合、同じものとして扱って重複を除きます。\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqWith(numbers, (a, b) => Math.abs(a - b) < 1);\nconsole.log(result); // [1.2, 3.2, 5.7, 7.19]\n\n// オブジェクトを特定のフィールドを基準に比較して重複を除きます。\nconst users = [\n  { id: 1, name: 'John', age: 30 },\n  { id: 2, name: 'Jane', age: 30 },\n  { id: 3, name: 'Bob', age: 25 },\n];\nconst uniqueByAge = uniqWith(users, (a, b) => a.age === b.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'John', age: 30 }, { id: 3, name: 'Bob', age: 25 }]\n\n// 文字列を大文字小文字を区別せずに比較して重複を除きます。\nconst words = ['Apple', 'APPLE', 'banana', 'Banana', 'cherry'];\nconst uniqueCaseInsensitive = uniqWith(words, (a, b) => a.toLowerCase() === b.toLowerCase());\nconsole.log(uniqueCaseInsensitive); // ['Apple', 'banana', 'cherry']\n```\n\n複雑なオブジェクトの比較も可能です。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\nconst products = [\n  { name: 'iPhone', brand: 'Apple', price: 1000 },\n  { name: 'Galaxy', brand: 'Samsung', price: 900 },\n  { name: 'iPhone', brand: 'Apple', price: 1100 }, // 同じnameとbrand\n  { name: 'Pixel', brand: 'Google', price: 800 },\n];\n\n// 名前とブランドがどちらも同じ場合、重複と判断します。\nconst uniqueProducts = uniqWith(products, (a, b) => a.name === b.name && a.brand === b.brand);\nconsole.log(uniqueProducts);\n// [\n//   { name: 'iPhone', brand: 'Apple', price: 1000 },\n//   { name: 'Galaxy', brand: 'Samsung', price: 900 },\n//   { name: 'Pixel', brand: 'Google', price: 800 }\n// ]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 重複を除く配列です。\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 2つの要素が同じかを判断する比較関数です。2つの要素が同じであれば `true` を、異なれば `false` を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): 比較関数を基準に重複が除かれた新しい配列です。元の配列で最初に現れる順序を保持します。\n"
  },
  {
    "path": "docs/ja/reference/array/unzip.md",
    "content": "# unzip\n\n結合されている配列を解いて、同じ位置の要素同士で新しい配列を作って返します。\n\n```typescript\nconst unzippedArrays = unzip(zipped);\n```\n\n## 使用法\n\n### `unzip(zipped)`\n\n複数の配列が結合されている2次元配列から同じインデックスにある要素を集めて新しい配列を作りたい場合は `unzip` を使用してください。zipの逆の動作です。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\n// 文字列、真偽値、数値が結合された配列を解きます。\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n  ['c', true, 3],\n];\nconst result = unzip(zipped);\nconsole.log(result);\n// [['a', 'b', 'c'], [true, false, true], [1, 2, 3]]\n\n// ユーザー情報が結合された配列を解きます。\nconst users = [\n  ['john', 30, 'engineer'],\n  ['jane', 25, 'designer'],\n  ['bob', 35, 'manager'],\n];\nconst [names, ages, roles] = unzip(users);\nconsole.log(names); // ['john', 'jane', 'bob']\nconsole.log(ages); // [30, 25, 35]\nconsole.log(roles); // ['engineer', 'designer', 'manager']\n```\n\n長さが異なる配列も処理できます。短い配列の場合は `undefined` で埋められます。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst mixed = [[1, 'a'], [2, 'b', true], [3]];\nconst result = unzip(mixed);\nconsole.log(result);\n// [[1, 2, 3], ['a', 'b', undefined], [undefined, true, undefined]]\n```\n\n空の配列を渡すと空の配列を返します。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst empty = unzip([]);\nconsole.log(empty); // []\n```\n\n#### パラメータ\n\n- `zipped` (`ReadonlyArray<[...T]>`): 解く配列が結合されている2次元配列です。\n\n#### 戻り値\n\n(`Unzip<T>`): 同じ位置の要素同士が結合された新しい配列です。元の配列の長さが異なる場合、短い配列の空いた場所は `undefined` で埋められます。\n"
  },
  {
    "path": "docs/ja/reference/array/unzipWith.md",
    "content": "# unzipWith\n\n結合されている配列を解いて、変換関数を適用した新しい配列を返します。\n\n```typescript\nconst transformedArray = unzipWith(target, iteratee);\n```\n\n## 使用法\n\n### `unzipWith(target, iteratee)`\n\n複数の配列が結合されている2次元配列から同じ位置の要素を集めて変換関数を適用した結果を得たい場合は `unzipWith` を使用してください。`unzip` と似ていますが、各グループの要素をカスタム関数で変換できます。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\n// 同じ位置の数値を足します。\nconst numbers = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nconst sums = unzipWith(numbers, (a, b, c) => a + b + c);\nconsole.log(sums); // [9, 12] (1+3+5=9, 2+4+6=12)\n\n// 同じ位置の文字列を連結します。\nconst words = [\n  ['hello', 'world'],\n  ['foo', 'bar'],\n  ['es', 'toolkit'],\n];\nconst combined = unzipWith(words, (a, b, c) => a + b + c);\nconsole.log(combined); // ['hellofooes', 'worldbartoolkit']\n\n// オブジェクト配列から特定のプロパティの平均を求めます。\nconst scores = [\n  [{ score: 80 }, { score: 90 }],\n  [{ score: 85 }, { score: 95 }],\n  [{ score: 75 }, { score: 88 }],\n];\nconst averages = unzipWith(scores, (a, b, c) => (a.score + b.score + c.score) / 3);\nconsole.log(averages); // [80, 91] (80+85+75)/3, (90+95+88)/3\n```\n\n配列の長さが異なる場合はundefinedが渡されます。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst mixed = [\n  [1, 4],\n  [2, 5],\n  [3], // 長さが異なる\n];\nconst result = unzipWith(mixed, (a, b, c) => {\n  // cはundefinedになる可能性があります\n  return (a || 0) + (b || 0) + (c || 0);\n});\nconsole.log(result); // [6, 9] (1+2+3, 4+5+0)\n```\n\n空の配列を渡すとエラーが発生します。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst empty = unzipWith([], (a, b) => a + b);\nconsole.log(empty); // throws Error\n```\n\n#### パラメータ\n\n- `target` (`readonly T[][]`): 解いて変換する配列が結合されている2次元配列です。\n- `iteratee` (`(...args: T[]) => R`): 同じ位置の要素を受け取って新しい値に変換する関数です。\n\n#### 戻り値\n\n(`R[]`): 変換関数を適用した結果で作られた新しい配列です。\n\n## Lodashとの互換性\n\n`es-toolkit/compat`から`unzipWith`をインポートすると、lodashと完全に互換性があります。\n\n互換モードでは以下の機能を提供します：\n\n- **null/undefinedの処理**: 入力配列がnullまたはundefinedの場合、空の配列を返します。\n- **配列風オブジェクト**: 通常の配列の他に、配列風オブジェクト(array-like objects)も処理できます。\n- **iteratee関数**: iteratee関数は再構成された要素を引数として受け取り、任意の型に変換できます。iterateeがnullまたはundefinedの場合、`unzip`のように動作し、変換せずに結合が解かれた配列を返します。\n\n### 使用法\n\n```typescript\nfunction unzipWith<T>(array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined): T[][];\nfunction unzipWith<T>(array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined, iteratee?: null): T[][];\nfunction unzipWith<T, R>(array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined, iteratee: (...args: T[]) => R): R[];\nfunction unzipWith<T>(\n  array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined,\n  iteratee: (...args: any[]) => unknown\n): any[];\n```\n\n### 例\n\n```typescript\n// iteratee関数を使用する例\nconst array1 = [\n  [1, 3],\n  [2, 4],\n];\nconst result1 = unzipWith(array1, (a, b) => a + b);\n// result1は[3, 7]になります。iteratee関数が提供されると、再構成された要素を変換するためです。\n\n// iterateeがnullまたはundefinedの場合\nconst array2 = [\n  [1, 3],\n  [2, 4],\n];\nconst result2 = unzipWith(array2, null);\n// result2は[[1, 2], [3, 4]]になります。iterateeがnullの場合、unzipのように動作するためです。\n\n// 入力がnullまたはundefinedの場合\nconst result3 = unzipWith(null);\n// result3は[]になります。入力配列がnullのためです。\n\n// 配列風オブジェクトを使用する例\nconst arrayLike = { 0: [1, 2], 1: [3, 4], length: 2 };\nconst result4 = unzipWith(arrayLike, (a, b) => a + b);\n// result4は[4, 6]になります。配列風オブジェクトも処理できるためです。\n```\n"
  },
  {
    "path": "docs/ja/reference/array/windowed.md",
    "content": "# windowed\n\n指定されたサイズのウィンドウが配列に沿って一定にスライドしながら、各ウィンドウのスナップショットを含む新しい配列を返します。\n\n```typescript\nconst windows = windowed(arr, size, step?, options?);\n```\n\n## 使用法\n\n### `windowed(arr, size, step?, options?)`\n\n指定されたサイズのウィンドウが配列に沿って一定にスライドしながら、各ウィンドウのスナップショットを含む配列を返したい場合は `windowed` を使用してください。\n\n時系列データ分析で移動平均を計算したり、文字列からn-gramを抽出したり、配列から特定のパターンを見つけるときに便利です。また、データをバッチ単位で処理したり、スライディングウィンドウアルゴリズムを実装するときにも活用できます。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\n// 基本的な使い方 - サイズ3のウィンドウを作ります。\nconst numbers = [1, 2, 3, 4, 5];\nconst result = windowed(numbers, 3);\nconsole.log(result); // [[1, 2, 3], [2, 3, 4], [3, 4, 5]]\n\n// stepを指定してウィンドウ間隔を調整します。\nconst data = [1, 2, 3, 4, 5, 6, 7, 8];\nconst stepped = windowed(data, 3, 2);\nconsole.log(stepped); // [[1, 2, 3], [3, 4, 5], [5, 6, 7]]\n\n// 文字列配列でも使用できます。\nconst words = ['a', 'b', 'c', 'd', 'e'];\nconst wordWindows = windowed(words, 2);\nconsole.log(wordWindows); // [['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']]\n```\n\n部分ウィンドウを含めたい場合は `partialWindows` オプションを使用してください。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst numbers = [1, 2, 3, 4, 5, 6];\n\n// 部分ウィンドウなし（デフォルト）\nconst complete = windowed(numbers, 4, 3);\nconsole.log(complete); // [[1, 2, 3, 4]]\n\n// 部分ウィンドウを含む\nconst withPartial = windowed(numbers, 4, 3, { partialWindows: true });\nconsole.log(withPartial); // [[1, 2, 3, 4], [4, 5, 6]]\n```\n\n各スナップショットは配列形式で提供され、最後のいくつかの配列は指定されたサイズより少ない要素を持つ可能性があります。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst small = [1, 2];\n\n// ウィンドウが配列より大きい場合\nconsole.log(windowed(small, 5)); // []\nconsole.log(windowed(small, 5, 1, { partialWindows: true })); // [[1, 2], [2]]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): ウィンドウを作る配列です。\n- `size` (`number`): 各ウィンドウのサイズです。1より大きい整数である必要があります。\n- `step` (`number`, オプション): ウィンドウ間の間隔です。1より大きい整数である必要があり、デフォルト値は `1` です。\n- `options.partialWindows` (`boolean`, オプション): 配列の最後で完全でないウィンドウも含めるかどうかです。デフォルト値は `false` です。\n\n#### 戻り値\n\n(`T[][]`): 指定されたサイズと間隔で作られたウィンドウの配列です。\n\n#### エラー\n\n- `size` または `step` が正の整数でない場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/array/without.md",
    "content": "# without\n\n配列から特定の値を除外した新しい配列を作成します。\n\n```typescript\nconst filtered = without(arr, ...values);\n```\n\n## 使用法\n\n### `without(arr, ...values)`\n\n配列から不要な特定の値を削除したい場合は `without` を使用してください。元の配列は変更されず、指定した値が削除された新しい配列が返されます。\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\n// 数値配列から特定の値を削除します。\nwithout([1, 2, 3, 4, 5], 2, 4);\n// Returns: [1, 3, 5]\n\n// 文字列配列から特定の値を削除します。\nwithout(['a', 'b', 'c', 'a'], 'a');\n// Returns: ['b', 'c']\n```\n\n`NaN` 値も正しく処理されます。\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\nwithout([1, NaN, 3, NaN, 5], NaN);\n// Returns: [1, 3, 5]\n```\n\n#### パラメータ\n\n- `arr` (`readonly T[]`): 値を削除する配列です。\n- `values` (`...T[]`): 配列から削除する値です。\n\n#### 戻り値\n\n(`T[]`): 指定された値が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/xor.md",
    "content": "# xor\n\n2つの配列のいずれか一方にのみ存在する要素で新しい配列を作成します。\n\n```typescript\nconst result = xor(arr1, arr2);\n```\n\n## 使用法\n\n### `xor(arr1, arr2)`\n\n2つの配列の対称差集合を求めたい場合は `xor` を使用してください。2つの配列のいずれか一方にのみ存在し、交差しない要素で構成された新しい配列を返します。\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\n// 数値配列の対称差集合を求めます。\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// 文字列配列の対称差集合を求めます。\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n```\n\n重複する要素は自動的に削除されます。\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\nxor([1, 2, 2, 3], [3, 4, 4, 5]);\n// Returns: [1, 2, 4, 5]\n```\n\n#### パラメータ\n\n- `arr1` (`readonly T[]`): 比較する最初の配列です。\n- `arr2` (`readonly T[]`): 比較する2番目の配列です。\n\n#### 戻り値\n\n(`T[]`): 2つの配列の対称差集合を表す新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/xorBy.md",
    "content": "# xorBy\n\n与えられた関数で各要素を変換した値を基準に、2つの配列のいずれか一方にのみ存在する要素で新しい配列を作成します。\n\n```typescript\nconst result = xorBy(arr1, arr2, mapper);\n```\n\n## 使用法\n\n### `xorBy(arr1, arr2, mapper)`\n\n2つの配列の要素を特定の基準で比較して対称差集合を求めたい場合は `xorBy` を使用してください。各要素をマッピング関数で変換した後、2つの配列のいずれか一方にのみ存在する要素で新しい配列を作成します。\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\n// オブジェクトのidで対称差集合を求めます。\nxorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], obj => obj.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 文字列の長さで対称差集合を求めます。\nxorBy(['apple', 'banana'], ['grape', 'cherry', 'apple'], str => str.length);\n// Returns: [] (すべての長さが重複)\n```\n\nマッピング関数の結果が同じ要素は1つとして扱われます。\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\nxorBy([1, 2, 3, 4], [3, 4, 5, 6], n => n % 3);\n// Returns: [] (すべての余りが重複)\n```\n\n#### パラメータ\n\n- `arr1` (`readonly T[]`): 比較する最初の配列です。\n- `arr2` (`readonly T[]`): 比較する2番目の配列です。\n- `mapper` (`(item: T) => U`): 各要素を比較可能な値に変換する関数です。\n\n#### 戻り値\n\n(`T[]`): マッピング関数の結果を基準に計算された対称差集合を表す新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/xorWith.md",
    "content": "# xorWith\n\n与えられた比較関数を使用して、2つの配列のいずれか一方にのみ存在する要素で新しい配列を作成します。\n\n```typescript\nconst result = xorWith(arr1, arr2, areElementsEqual);\n```\n\n## 使用法\n\n### `xorWith(arr1, arr2, areElementsEqual)`\n\n複雑なオブジェクトや特別な比較条件で対称差集合を求めたい場合は `xorWith` を使用してください。ユーザー定義の等価性関数で要素を比較し、2つの配列のいずれか一方にのみ存在する要素で新しい配列を作成します。\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// オブジェクトのidで比較します。\nxorWith(\n  [\n    { id: 1, name: 'Alice' },\n    { id: 2, name: 'Bob' },\n  ],\n  [\n    { id: 2, name: 'Bobby' },\n    { id: 3, name: 'Charlie' },\n  ],\n  (a, b) => a.id === b.id\n);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 3, name: 'Charlie' }]\n\n// 大文字小文字を無視して比較します。\nxorWith(['Apple', 'Banana'], ['APPLE', 'Cherry'], (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Banana', 'Cherry']\n```\n\nより複雑な比較も可能です。\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// 絶対値で比較します。\nxorWith([-1, -2, 3], [1, 2, -4], (a, b) => Math.abs(a) === Math.abs(b));\n// Returns: [3, -4]\n\n// 深いオブジェクト比較を行います。\nxorWith(\n  [{ specs: { ram: 8, storage: 256 } }],\n  [{ specs: { ram: 8, storage: 256 } }],\n  (a, b) => a.specs.ram === b.specs.ram && a.specs.storage === b.specs.storage\n);\n// Returns: []\n```\n\n#### パラメータ\n\n- `arr1` (`readonly T[]`): 比較する最初の配列です。\n- `arr2` (`readonly T[]`): 比較する2番目の配列です。\n- `areElementsEqual` (`(item1: T, item2: T) => boolean`): 2つの要素が等しいかどうかを判断する関数です。等しい場合は `true`、異なる場合は `false` を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): ユーザー定義の等価性関数を基準に計算された対称差集合を表す新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/zip.md",
    "content": "# zip\n\n複数の配列を、各配列の同じインデックスの要素をまとめたタプルの配列に変換します。\n\n```typescript\nconst zipped = zip(...arrs);\n```\n\n## 使用法\n\n### `zip(...arrs)`\n\n複数の配列の同じ位置にある要素を1つにまとめたい場合は `zip` を使用してください。各配列の同じインデックスにある要素をタプルにまとめて新しい配列を返します。\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\n// 2つの配列をまとめます。\nzip([1, 2, 3], ['a', 'b', 'c']);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 3つの配列をまとめます。\nzip([1, 2], ['a', 'b', 'c'], [true, false]);\n// Returns: [[1, 'a', true], [2, 'b', false], [undefined, 'c', undefined]]\n```\n\n配列の長さが異なる場合、最も長い配列の長さに合わせられます。短い配列の空の位置は `undefined` で埋められます。\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\nzip([1, 2], ['a', 'b', 'c', 'd']);\n// Returns: [[1, 'a'], [2, 'b'], [undefined, 'c'], [undefined, 'd']]\n```\n\n#### パラメータ\n\n- `arrs` (`Array<readonly T[]>`): まとめる配列です。\n\n#### 戻り値\n\n(`T[][]`): 各入力配列の対応するインデックスの要素をタプルにまとめた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/array/zipObject.md",
    "content": "# zipObject\n\nキー配列と値配列を受け取って1つのオブジェクトを作成します。\n\n```typescript\nconst object = zipObject(keys, values);\n```\n\n## 使用法\n\n### `zipObject(keys, values)`\n\n2つの配列を1つのオブジェクトに結合したい場合は `zipObject` を使用してください。最初の配列の要素がキーとなり、2番目の配列の要素が値となる新しいオブジェクトを返します。\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\n// キーと値をオブジェクトにします。\nzipObject(['a', 'b', 'c'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// キーの方が多い場合、undefinedが値になります。\nzipObject(['a', 'b', 'c', 'd'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3, d: undefined }\n```\n\n値配列の方が長い場合、余分な値は無視されます。\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\nzipObject(['a', 'b'], [1, 2, 3, 4]);\n// Returns: { a: 1, b: 2 }\n```\n\n#### パラメータ\n\n- `keys` (`readonly P[]`): オブジェクトのキーとなる配列です。\n- `values` (`readonly V[]`): 各キーに対応する値の配列です。\n\n#### 戻り値\n\n(`Record<P, V>`): キーと値が結合された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/array/zipWith.md",
    "content": "# zipWith\n\n複数の配列をユーザー定義関数で結合して新しい配列を作成します。\n\n```typescript\nconst result = zipWith(...arrs, combine);\n```\n\n## 使用法\n\n### `zipWith(...arrs, combine)`\n\n複数の配列の同じ位置の要素を希望する方法で結合したい場合は `zipWith` を使用してください。各配列の同じインデックスの要素を結合関数に渡して、その結果で新しい配列を作成します。\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\n// 2つの数値配列を足します。\nzipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// 文字列を結合します。\nzipWith(['a', 'b'], ['c', 'd'], ['e', 'f'], (a, b, c) => `${a}${b}${c}`);\n// Returns: ['ace', 'bdf']\n```\n\n配列の長さが異なる場合、最も長い配列の長さに合わせられます。短い配列の空の位置は `undefined` として渡されます。\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\nzipWith([1, 2], [10, 20, 30], (a, b) => (a ?? 0) + (b ?? 0));\n// Returns: [11, 22, 30]\n```\n\n#### パラメータ\n\n- `arrs` (`Array<readonly T[]>`): 結合する配列です。\n- `combine` (`(...items: [...T[], number]) => R`): 各配列の対応するインデックスの要素と、インデックス自体を受け取って新しい値を返す関数です。\n\n#### 戻り値\n\n(`R[]`): 結合関数を適用した結果で構成された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/castArray.md",
    "content": "# castArray（Lodash 互換性）\n\n::: warning `Array.from()` または配列リテラル（`[value]`）を使用してください\n\nこの `castArray` 関数は引数なしの処理と `undefined` 処理などにより、複雑な動作をします。\n\nより明確でモダンな `Array.from()` または条件付き配列作成（`Array.isArray(value) ? value : [value]`）を使用してください。\n\n:::\n\n値が配列でない場合、配列に変換して返します。\n\n```typescript\nconst result = castArray(value);\n```\n\n## 使用法\n\n### `castArray(value?)`\n\n任意の値を確実に配列にしたい場合は `castArray` を使用します。値がすでに配列の場合はそのまま返し、そうでない場合はその値を含む新しい配列を作成します。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\n// 数値を配列に変換\ncastArray(1);\n// 戻り値: [1]\n\n// 文字列を配列に変換\ncastArray('hello');\n// 戻り値: ['hello']\n\n// オブジェクトを配列に変換\ncastArray({ a: 1 });\n// 戻り値: [{ a: 1 }]\n```\n\nすでに配列である値はそのまま返されます。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray([1, 2, 3]);\n// 戻り値: [1, 2, 3]\n\ncastArray(['a', 'b']);\n// 戻り値: ['a', 'b']\n```\n\n`null` と `undefined` も配列に変換されます。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray(null);\n// 戻り値: [null]\n\ncastArray(undefined);\n// 戻り値: [undefined]\n```\n\n引数なしで呼び出すと、空の配列を返します。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray();\n// 戻り値: []\n```\n\n#### パラメータ\n\n- `value` (`T | readonly T[]`、オプション): 配列に変換する値。引数が提供されない場合は、空の配列を返します。\n\n#### 戻り値\n\n(`T[]`): 入力がすでに配列の場合はその配列を、そうでない場合は入力値を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/chunk.md",
    "content": "# chunk（Lodash 互換性）\n\n::: warning `es-toolkit` の [`chunk`](../../array/chunk.md) を使用してください\n\nこの `chunk` 関数は `null`、`undefined` の処理、`size` のデフォルト値処理などにより動作が遅くなります。\n\nより高速でモダンな実装である `es-toolkit` の [chunk](../../array/chunk.md) を使用してください。\n\n:::\n\n配列を指定されたサイズの小さな配列に分割します。\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## 使用法\n\n### `chunk(arr, size?)`\n\n長い配列を同じサイズの複数の小さな配列に分割したい場合は `chunk` を使用します。配列を均等に分割できない場合、最後の配列に残りの要素が含まれます。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\n// 数値配列をサイズ 2 のチャンクに分割します。\nchunk([1, 2, 3, 4], 2);\n// 戻り値: [[1, 2], [3, 4]]\n\n// 文字列配列をサイズ 3 のチャンクに分割します。\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// 戻り値: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n\n// 均等に分割できない場合\nchunk([1, 2, 3, 4, 5], 2);\n// 戻り値: [[1, 2], [3, 4], [5]]\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk(null, 2);\n// 戻り値: []\n\nchunk(undefined, 2);\n// 戻り値: []\n```\n\nサイズが 0 または負の場合、空の配列を返します。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0);\n// 戻り値: []\n\nchunk([1, 2, 3], -1);\n// 戻り値: []\n```\n\n#### パラメータ\n\n- `arr` (`ArrayLike<T> | null | undefined`): 分割する配列。\n- `size` (`number`, オプション): 各小さな配列のサイズ。デフォルト値は `1`。\n\n#### 戻り値\n\n(`T[][]`): サイズ `size` で分割された二次元配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/compact.md",
    "content": "# compact (Lodash 互換性)\n\n::: warning `es-toolkit`の[`compact`](../../array/compact.md)を使用してください\n\nこの `compact` 関数は、`null` や `undefined` の処理、`size` のデフォルト値処理などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [compact](../../array/compact.md) を使用してください。\n\n:::\n\n配列から偽値と評価される値を削除します。\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 使用法\n\n### `compact(arr)`\n\n配列から `false`、`null`、`0`、`\"\"`、`undefined`、`NaN` のような偽値と評価される値を削除したい場合、`compact` を使用してください。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\n// 偽値と評価される値を削除\ncompact([0, 1, false, 2, '', 3]);\n// Returns: [1, 2, 3]\n\ncompact(['a', null, 'b', undefined, 'c', NaN]);\n// Returns: ['a', 'b', 'c']\n\n// BigInt 0も削除\ncompact([0n, 1n, false, 2n]);\n// Returns: [1n, 2n]\n\n// 空配列も処理\ncompact([]);\n// Returns: []\n\n// すべての値が偽値と評価される場合\ncompact([false, null, 0, '', undefined, NaN]);\n// Returns: []\n```\n\n真値と評価される値はそのまま保持されます。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact([1, 'hello', true, {}, []]);\n// Returns: [1, 'hello', true, {}, []]\n\n// 0以外の数値\ncompact([0, -1, 2, -3]);\n// Returns: [-1, 2, -3]\n```\n\n`null` や `undefined` の配列は空配列として処理されます。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact(null);\n// Returns: []\n\ncompact(undefined);\n// Returns: []\n```\n\n#### パラメータ\n\n- `arr` (`ArrayLike<T> | null | undefined`): 圧縮する配列です。\n\n#### 戻り値\n\n(`T[]`): 偽値と評価される値が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/concat.md",
    "content": "# concat (Lodash 互換性)\n\n::: warning スプレッド演算子または[`Array#concat`](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)を使用してください\n\nこの `concat` 関数は、Lodash での配列連結方式が複雑なため、非効率的に動作します。\n\n代わりに、より直感的で現代的なスプレッド演算子 `[...arr1, ...arr2]` や、`Array#concat` を活用した `arr1.concat(arr2)` を使用してください。\n\n:::\n\n複数の配列と値を1つの配列に結合します。\n\n```typescript\nconst result = concat(...values);\n```\n\n## 使用法\n\n### `concat(...values)`\n\n複数の値と配列を順番に連結して1つの新しい配列を作成したい場合、`concat` を使用してください。配列は展開され、個別の値はそのまま追加されます。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 個別の値を連結\nconcat(1, 2, 3);\n// Returns: [1, 2, 3]\n\n// 配列を連結\nconcat([1, 2], [3, 4]);\n// Returns: [1, 2, 3, 4]\n\n// 値と配列を一緒に連結\nconcat(1, [2, 3], 4);\n// Returns: [1, 2, 3, 4]\n```\n\nネストされた配列は1段階のみ展開されます。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// ネストされた配列は1段階のみ展開\nconcat([1, [2, 3]], 4);\n// Returns: [1, [2, 3], 4]\n\n// より深くネストされた配列\nconcat([1, [2, [3, 4]]], 5);\n// Returns: [1, [2, [3, 4]], 5]\n```\n\n空配列と空の値も処理します。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 空配列と一緒に\nconcat([], [1, 2], [], [3]);\n// Returns: [1, 2, 3]\n\n// 値がない場合\nconcat();\n// Returns: []\n```\n\n#### パラメータ\n\n- `values` (`...(T | readonly T[])`): 連結する値と配列です。各配列は1段階展開されます。\n\n#### 戻り値\n\n(`T[]`): すべての値と配列の要素が順番に連結された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/countBy.md",
    "content": "# countBy (Lodash 互換性)\n\n::: warning `es-toolkit`の`countBy`を使用してください\n\nこの `countBy` 関数は、複雑な変換関数処理と型変換により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [countBy](../../array/countBy.md) を使用してください。\n\n:::\n\n配列やオブジェクトの要素を条件に従って分類し、各分類の個数を数えます。\n\n```typescript\nconst counts = countBy(collection, iteratee);\n```\n\n## 使用法\n\n### `countBy(collection, iteratee?)`\n\n配列やオブジェクトの各要素をある基準でグループ化し、各グループに何個の要素があるかを数えたい場合、`countBy` を使用してください。反復関数が返す値がキーになり、そのキーに該当する要素の個数が値になります。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 数値を小数点以下切り捨てでグループ化\ncountBy([6.1, 4.2, 6.3], Math.floor);\n// Returns: { '4': 1, '6': 2 }\n\n// 文字列を長さでグループ化\ncountBy(['one', 'two', 'three'], 'length');\n// Returns: { '3': 2, '5': 1 }\n\n// ユーザーを年齢代でグループ化\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 35 },\n  { name: 'Charlie', age: 25 },\n];\ncountBy(users, user => Math.floor(user.age / 10) * 10);\n// Returns: { '20': 2, '30': 1 }\n```\n\nオブジェクトも処理できます。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// オブジェクトの値を型で分類\nconst obj = { a: 1, b: 'string', c: 2, d: 'text' };\ncountBy(obj, value => typeof value);\n// Returns: { 'number': 2, 'string': 2 }\n```\n\n反復関数なしで使用すると、値そのものでグループ化されます。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 値そのものでグループ化\ncountBy([1, 2, 1, 3, 2, 1]);\n// Returns: { '1': 3, '2': 2, '3': 1 }\n\n// 真偽値でグループ化\ncountBy([true, false, true, true]);\n// Returns: { 'true': 3, 'false': 1 }\n```\n\n`null` や `undefined` のコレクションは空のオブジェクトを返します。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\ncountBy(null);\n// Returns: {}\n\ncountBy(undefined);\n// Returns: {}\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 処理する配列またはオブジェクトです。\n- `iteratee` (`ValueIteratee<T>`, 選択): 各要素をグループ化する基準を決定する関数です。関数、プロパティ名、または部分オブジェクトを使用できます。\n\n#### 戻り値\n\n(`Record<string, number>`): 各グループのキーとそのグループの要素数を持つオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/difference.md",
    "content": "# difference (Lodash 互換性)\n\n::: warning `es-toolkit`の`difference`を使用してください\n\nこの `difference` 関数は、`null` や `undefined` の処理、複数の配列引数処理により、複雑に動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [difference](../../array/difference.md) を使用してください。\n\n:::\n\n最初の配列から他の配列の値を除いた差集合を求めます。\n\n```typescript\nconst result = difference(arr, ...values);\n```\n\n## 使用法\n\n### `difference(arr, ...values)`\n\n最初の配列から残りの配列に含まれる値をすべて削除したい場合、`difference` を使用してください。順序は最初の配列の順序を保持します。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\nconst array3 = [5, 6];\ndifference(array1, array2, array3);\n// Returns: [1, 3]\n\n// 文字列配列\ndifference(['a', 'b', 'c'], ['b'], ['c', 'd']);\n// Returns: ['a']\n\n// 重複する値の処理\ndifference([1, 2, 2, 3], [2]);\n// Returns: [1, 3]\n```\n\n空配列や空の差集合も処理します。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 空配列との差集合\ndifference([1, 2, 3], []);\n// Returns: [1, 2, 3]\n\n// すべての値が除外される場合\ndifference([1, 2, 3], [1, 2, 3]);\n// Returns: []\n\n// 重複する値がない場合\ndifference([1, 2], [3, 4]);\n// Returns: [1, 2]\n```\n\n`null` や `undefined` の配列は空配列として処理されます。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\ndifference(null, [1, 2]);\n// Returns: []\n\ndifference(undefined, [1, 2]);\n// Returns: []\n\ndifference([1, 2, 3], null, undefined);\n// Returns: [1, 2, 3] (nullとundefinedは無視されます)\n```\n\n配列風オブジェクトもサポートします。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 配列風オブジェクト\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 4, length: 2 };\ndifference(arrayLike1, arrayLike2);\n// Returns: [1, 3]\n```\n\n#### パラメータ\n\n- `arr` (`ArrayLike<T> | null | undefined`): 差集合を求める基準配列です。\n- `values` (`...ArrayLike<T>[]`): 除外する値を含む配列です。\n\n#### 戻り値\n\n(`T[]`): 最初の配列から他の配列の値を除いた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/differenceBy.md",
    "content": "# differenceBy (Lodash 互換性)\n\n::: warning `es-toolkit`の`differenceBy`を使用してください\n\nこの `differenceBy` 関数は、複雑な引数処理と反復子変換により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [differenceBy](../../array/differenceBy.md) を使用してください。\n\n:::\n\n反復関数で変換した値を基準に、最初の配列から他の配列の要素を除いた差集合を求めます。\n\n```typescript\nconst result = differenceBy(array, ...values, iteratee);\n```\n\n## 使用法\n\n### `differenceBy(array, ...values, iteratee)`\n\n最初の配列の各要素と除外する配列の要素を反復関数で変換した後、同じ値になる要素を削除したい場合、`differenceBy` を使用してください。オブジェクト配列で特定のプロパティ値や変換された値を基準に比較する際に便利です。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 小数点以下切り捨てで比較\ndifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n// Returns: [1.2] (Math.floor(2.1) === Math.floor(2.3)のため2.1を除外)\n\n// 文字列の長さで比較\ndifferenceBy(['one', 'two', 'three'], ['four', 'eight'], 'length');\n// Returns: ['one', 'two'] (threeとeightは長さが同じためthreeを除外)\n\n// オブジェクトのプロパティで比較\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [{ id: 1, name: 'Different Alice' }];\ndifferenceBy(users1, users2, 'id');\n// Returns: [{ id: 2, name: 'Bob' }] (idが1のオブジェクトを除外)\n```\n\n複数の配列を一度に除外できます。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 複数の配列から除外\ndifferenceBy([2.1, 1.2, 3.5], [2.3], [1.4], [3.2], Math.floor);\n// Returns: [] (すべての要素が除外されます)\n\n// 文字列配列を長さで比較\ndifferenceBy(['a', 'bb', 'ccc'], ['x'], ['yy'], ['zzz'], 'length');\n// Returns: [] (長さ1、2、3がすべて除外されます)\n```\n\n反復関数がない場合、通常の `difference` のように動作します。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 反復関数なしで使用\ndifferenceBy([1, 2, 3], [2, 4]);\n// Returns: [1, 3]\n```\n\n`null` や `undefined` の配列は空配列として処理されます。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\ndifferenceBy(null, [1, 2], Math.floor);\n// Returns: []\n\ndifferenceBy(undefined, [1, 2], x => x);\n// Returns: []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 差集合を求める基準配列です。\n- `values` (`...ArrayLike<T>[]`): 除外する値を含む配列です。\n- `iteratee` (`ValueIteratee<T>`): 各要素を比較する値に変換する関数です。関数、プロパティ名、または部分オブジェクトを使用できます。\n\n#### 戻り値\n\n(`T[]`): 反復関数で変換した値を基準に除外された要素を除いた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/differenceWith.md",
    "content": "# differenceWith (Lodash 互換性)\n\n::: warning `es-toolkit`の`differenceWith`を使用してください\n\nこの `differenceWith` 関数は、`null` や `undefined` の処理、複数の配列処理、`ArrayLike` 型の処理などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [differenceWith](../../array/differenceWith.md) を使用してください。\n\n:::\n\n比較関数を使用して、最初の配列から他の配列に含まれる要素を削除します。\n\n```typescript\nconst result = differenceWith(array, ...values, comparator);\n```\n\n## 使用法\n\n### `differenceWith(array, ...values, comparator)`\n\n各要素を比較関数で比較して差を求めたい場合、`differenceWith` を使用してください。最後の引数が比較関数になります。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// オブジェクトをidで比較します。\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst others = [{ id: 2 }];\nconst comparator = (a, b) => a.id === b.id;\n\ndifferenceWith(objects, others, comparator);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 複数の配列を一度に除外します。\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\n\ndifferenceWith(array, values1, values2, comparator);\n// Returns: [{ id: 1 }, { id: 4 }]\n```\n\n比較関数を提供しない場合、通常の `difference` のように動作します。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 比較関数なしで使用すると通常の比較を行います。\ndifferenceWith([1, 2, 3], [2], [3]);\n// Returns: [1]\n```\n\n複雑な比較ロジックも使用できます。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'alice', age: 25 },\n  { name: 'bob', age: 30 },\n  { name: 'charlie', age: 35 },\n];\nconst excludeUsers = [{ name: 'bob', age: 25 }]; // 異なる年齢\n\n// 名前のみで比較します。\nconst compareByName = (a, b) => a.name === b.name;\ndifferenceWith(users, excludeUsers, compareByName);\n// Returns: [{ name: 'alice', age: 25 }, { name: 'charlie', age: 35 }]\n// bobが除外されます（年齢が違っても名前が同じため）\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 差を求める基準配列です。\n- `...values` (`Array<ArrayLike<T>>` + `(a: T, b: T) => boolean`): 除外する要素を含む配列と最後に比較関数です。\n\n#### 戻り値\n\n(`T[]`): 比較関数を使用して最初の配列から残りの配列の要素を削除した新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/drop.md",
    "content": "# drop (Lodash 互換性)\n\n::: warning `es-toolkit` の `drop` を使用してください\n\nこの `drop` 関数は、`null` や `undefined` の処理、`toInteger` 変換などにより複雑に動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`drop`](../../array/drop.md) を使用してください。\n\n:::\n\n配列の先頭から指定された個数の要素を削除します。\n\n```typescript\nconst result = drop(array, n);\n```\n\n## 使用法\n\n### `drop(array, n?)`\n\n配列の先頭からいくつかの要素を削除し、残りを取得したい場合に `drop` を使用します。デフォルトでは、最初の要素を1つ削除します。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 基本的な使用法(最初の要素を削除)\ndrop([1, 2, 3, 4, 5]);\n// 戻り値: [2, 3, 4, 5]\n\n// 最初の2つの要素を削除\ndrop([1, 2, 3, 4, 5], 2);\n// 戻り値: [3, 4, 5]\n\n// 最初の3つの要素を削除\ndrop(['a', 'b', 'c', 'd'], 3);\n// 戻り値: ['d']\n```\n\n0または負の数を指定すると、元の配列をそのまま返します。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 0個削除\ndrop([1, 2, 3], 0);\n// 戻り値: [1, 2, 3]\n\n// 負の数を指定\ndrop([1, 2, 3], -1);\n// 戻り値: [1, 2, 3]\n```\n\n配列より大きい数を指定すると、空の配列を返します。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 配列のサイズより大きい数を指定\ndrop([1, 2, 3], 5);\n// 戻り値: []\n\n// 空の配列から削除\ndrop([], 1);\n// 戻り値: []\n```\n\n`null` または `undefined` の配列は空の配列として処理されます。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\ndrop(null, 1);\n// 戻り値: []\n\ndrop(undefined, 2);\n// 戻り値: []\n```\n\n配列風オブジェクトもサポートされています。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 配列風オブジェクト\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\ndrop(arrayLike, 1);\n// 戻り値: ['b', 'c']\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を削除する配列です。\n- `n` (`number`, オプション): 削除する要素の個数です。デフォルトは `1` です。\n\n#### 戻り値\n\n(`T[]`): 先頭から指定された個数の要素が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/dropRight.md",
    "content": "# dropRight (Lodash 互換性)\n\n::: warning `es-toolkit` の `dropRight` を使用してください\n\nこの `dropRight` 関数は、`null` や `undefined` の処理、`guard` パラメータ処理、`toInteger` 変換などにより遅く動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`dropRight`](../../array/dropRight.md) を使用してください。\n\n:::\n\n配列の末尾から指定された個数の要素を削除した新しい配列を返します。\n\n```typescript\nconst result = dropRight(array, itemsCount);\n```\n\n## 使用法\n\n### `dropRight(array, itemsCount)`\n\n配列の末尾から特定の個数の要素を削除し、残りの要素で新しい配列を作成したい場合に `dropRight` を使用します。\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\n// 数値配列から末尾の2つの要素を削除します。\ndropRight([1, 2, 3, 4, 5], 2);\n// 戻り値: [1, 2, 3]\n\n// 文字列配列から末尾の1つの要素を削除します。\ndropRight(['a', 'b', 'c'], 1);\n// 戻り値: ['a', 'b']\n\n// 削除する個数を指定しない場合、デフォルト値1が使用されます。\ndropRight([1, 2, 3]);\n// 戻り値: [1, 2]\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\ndropRight(null, 2); // []\ndropRight(undefined, 2); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を削除する配列です。\n- `itemsCount` (`number`, オプション): 配列の末尾から削除する要素の個数です。デフォルトは `1` です。\n\n#### 戻り値\n\n(`T[]`): 末尾から `itemsCount` 個の要素が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/dropRightWhile.md",
    "content": "# dropRightWhile (Lodash 互換性)\n\n::: warning `es-toolkit` の `dropRightWhile` を使用してください\n\nこの `dropRightWhile` 関数は、`null` や `undefined` の処理、`ArrayLike` 型の処理、様々な条件関数形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`dropRightWhile`](../../array/dropRightWhile.md) を使用してください。\n\n:::\n\n条件関数に基づいて配列の末尾から要素を削除します。\n\n```typescript\nconst result = dropRightWhile(array, predicate);\n```\n\n## 使用法\n\n### `dropRightWhile(array, predicate)`\n\n配列の末尾から特定の条件を満たす要素を連続して削除したい場合に `dropRightWhile` を使用します。条件関数が `false` を返すと削除を中断します。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\n// 関数を条件として使用します。\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ndropRightWhile(users, user => !user.active);\n// 戻り値: [{ user: 'barney', active: true }]\n\n// オブジェクトパターンでマッチングします。\ndropRightWhile(users, { user: 'pebbles', active: false });\n// 戻り値: [{ user: 'barney', active: true }, { user: 'fred', active: false }]\n\n// 配列形式でプロパティと値を指定します。\ndropRightWhile(users, ['active', false]);\n// 戻り値: [{ user: 'barney', active: true }]\n\n// プロパティ名で条件を確認します。\ndropRightWhile(users, 'active');\n// 戻り値: [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\ndropRightWhile(null, x => x > 0); // []\ndropRightWhile(undefined, x => x > 0); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を削除する配列です。\n- `predicate` (`ListIteratee<T>`, オプション): 各要素に適用する条件関数です。関数、オブジェクトパターン、配列パターン、またはプロパティ名を受け取ることができます。\n\n#### 戻り値\n\n(`T[]`): 条件を満たさない最初の要素からの新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/dropWhile.md",
    "content": "# dropWhile (Lodash 互換性)\n\n::: warning `es-toolkit` の `dropWhile` を使用してください\n\nこの `dropWhile` 関数は、`null` や `undefined` の処理、`ArrayLike` 型の処理、様々な条件関数形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`dropWhile`](../../array/dropWhile.md) を使用してください。\n\n:::\n\n条件関数に基づいて配列の先頭から要素を削除します。\n\n```typescript\nconst result = dropWhile(array, predicate);\n```\n\n## 使用法\n\n### `dropWhile(array, predicate)`\n\n配列の先頭から特定の条件を満たす要素を連続して削除したい場合に `dropWhile` を使用します。条件関数が `false` を返すと削除を中断します。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\n// 関数を条件として使用します。\ndropWhile([1, 2, 3, 4, 5], n => n < 3);\n// 戻り値: [3, 4, 5]\n\n// オブジェクトパターンでマッチングします。\nconst users = [\n  { name: 'alice', active: false },\n  { name: 'bob', active: false },\n  { name: 'charlie', active: true },\n];\n\ndropWhile(users, { active: false });\n// 戻り値: [{ name: 'charlie', active: true }]\n\n// 配列形式でプロパティと値を指定します。\ndropWhile(users, ['active', false]);\n// 戻り値: [{ name: 'charlie', active: true }]\n\n// プロパティ名で条件を確認します。\nconst items = [{ visible: false }, { visible: false }, { visible: true }];\n\ndropWhile(items, 'visible');\n// 戻り値: [{ visible: false }, { visible: false }, { visible: true }]\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\ndropWhile(null, x => x > 0); // []\ndropWhile(undefined, x => x > 0); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を削除する配列です。\n- `predicate` (`ListIteratee<T>`, オプション): 各要素に適用する条件関数です。関数、オブジェクトパターン、配列パターン、またはプロパティ名を受け取ることができます。デフォルトは `identity` です。\n\n#### 戻り値\n\n(`T[]`): 条件を満たさない最初の要素からの新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/each.md",
    "content": "# each (Lodash 互換性)\n\n::: warning `Array.prototype.forEach` を使用してください\n\nこの `each` 関数は、複雑な型処理と様々なコレクション型のサポートにより遅く動作します。\n\n代わりに、より高速で現代的な `Array.prototype.forEach` を使用してください。\n\n:::\n\n配列またはオブジェクトの各要素に対して反復操作を実行します。\n\n```typescript\nconst result = each(collection, iteratee);\n```\n\n## 使用法\n\n### `each(collection, iteratee)`\n\n配列、オブジェクト、文字列の各要素を順回しながら与えられた関数を実行します。配列の場合はインデックス順に、オブジェクトの場合は列挙可能なプロパティを順回します。\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\n// 配列を順回\neach([1, 2, 3], (value, index) => console.log(value, index));\n// ログ: 1 0, 2 1, 3 2\n\n// オブジェクトを順回\neach({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// ログ: 'a' 1, 'b' 2\n\n// 文字列を順回\neach('hello', (char, index) => console.log(char, index));\n// ログ: 'h' 0, 'e' 1, 'l' 2, 'l' 3, 'o' 4\n```\n\n関数が `false` を返すと順回を中断します。\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\neach([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 2で中断\n});\n// ログ: 1, 2\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 順回するコレクションです。\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, オプション): 各要素に対して実行する関数です。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 元のコレクションを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/eachRight.md",
    "content": "# eachRight (Lodash 互換性)\n\n::: warning `es-toolkit` の `forEachRight` を使用してください\n\nこの `eachRight` 関数は、`null` や `undefined` の処理、`ArrayLike` 型の処理、様々な条件関数形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`forEachRight`](../../array/forEachRight.md) を使用してください。\n\n:::\n\n配列またはオブジェクトの各要素に対して右から左へ反復操作を実行します。\n\n```typescript\nconst result = eachRight(collection, iteratee);\n```\n\n## 使用法\n\n### `eachRight(collection, iteratee)`\n\n配列、オブジェクト、文字列の各要素を右から左へ順回しながら与えられた関数を実行します。配列の場合は最後のインデックスから逆順に、オブジェクトの場合は列挙可能なプロパティを逆順に順回します。\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\n// 配列を逆順に順回\neachRight([1, 2, 3], (value, index) => console.log(value, index));\n// ログ: 3 2, 2 1, 1 0\n\n// オブジェクトを逆順に順回\neachRight({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// ログ: 'b' 2, 'a' 1\n\n// 文字列を逆順に順回\neachRight('hello', (char, index) => console.log(char, index));\n// ログ: 'o' 4, 'l' 3, 'l' 2, 'e' 1, 'h' 0\n```\n\n関数が `false` を返すと順回を中断します。\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\neachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 2で中断\n});\n// ログ: 4, 3, 2\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 順回するコレクションです。\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, オプション): 各要素に対して実行する関数です。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 元のコレクションを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/every.md",
    "content": "# every (Lodash 互換性)\n\n::: warning `Array.prototype.every()` を使用してください\n\nこの `every` 関数は、複雑なオブジェクト処理、様々な条件形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `Array.prototype.every()` を使用してください。\n\n:::\n\n配列またはオブジェクトのすべての値が与えられた条件に合うかを返します。\n\n```typescript\nconst result = every(collection, predicate);\n```\n\n## 使用法\n\n### `every(collection, predicate?)`\n\n配列またはオブジェクトのすべての要素が特定の条件を満たすか確認したい場合に `every` を使用します。条件は関数、部分オブジェクト、プロパティ-値ペア、プロパティ名など、様々な形式で指定できます。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\n// 検査関数を使用\nconst numbers = [2, 4, 6, 8];\nevery(numbers, x => x % 2 === 0);\n// 戻り値: true\n\n// プロパティ名を使用\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n];\nevery(users, 'active');\n// 戻り値: true\n\n// 部分オブジェクトを使用\nevery(users, { active: true });\n// 戻り値: true\n\n// プロパティ-値ペアを使用\nevery(users, ['active', true]);\n// 戻り値: true\n```\n\nオブジェクトに対しても同じように動作します。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 85, science: 92 };\nevery(scores, score => score >= 80);\n// 戻り値: true\n```\n\n`null` または `undefined` は空のコレクションとして処理され `true` を返します。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nevery(null);\n// 戻り値: true\n\nevery(undefined);\n// 戻り値: true\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 検査する配列またはオブジェクトです。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, オプション): 検査条件です。関数、部分オブジェクト、プロパティ-値ペア、プロパティ名を使用できます。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`boolean`): すべての要素が条件を満たせば `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/fill.md",
    "content": "# fill (Lodash 互換性)\n\n::: warning `es-toolkit` の `fill` を使用してください\n\nこの `fill` 関数は、`null` や `undefined` の処理、配列風オブジェクトのサポートなどにより複雑に動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [`fill`](../../array/fill.md) を使用してください。\n\n:::\n\n配列の要素を指定された値で埋めます。\n\n```typescript\nconst result = fill(array, value, start, end);\n```\n\n## 使用法\n\n### `fill(array, value, start?, end?)`\n\n配列の特定の範囲または全体を同じ値で埋めたい場合に `fill` を使用します。元の配列を直接変更します。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\n// 配列全体を埋める\nconst arr1 = [1, 2, 3];\nfill(arr1, 'a');\n// 戻り値: ['a', 'a', 'a']\n\n// 特定の範囲を埋める\nconst arr2 = [1, 2, 3, 4, 5];\nfill(arr2, '*', 1, 4);\n// 戻り値: [1, '*', '*', '*', 5]\n\n// 負のインデックスを使用\nconst arr3 = [1, 2, 3, 4, 5];\nfill(arr3, 'x', -3, -1);\n// 戻り値: [1, 2, 'x', 'x', 5]\n```\n\n配列風オブジェクトもサポートされています。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 1, 1: 2, 2: 3, length: 3 };\nfill(arrayLike, 'a', 1, 2);\n// 戻り値: { 0: 1, 1: 'a', 2: 3, length: 3 }\n```\n\n`null` または `undefined` の配列は空の配列として処理されます。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill(null, 'a');\n// 戻り値: []\n\nfill(undefined, 'a');\n// 戻り値: []\n```\n\n文字列は読み取り専用なのでそのまま返します。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill('abc', 'x');\n// 戻り値: 'abc' (変更されません)\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 埋める配列です。\n- `value` (`U`): 配列を埋める値です。\n- `start` (`number`, オプション): 開始位置です。デフォルトは `0` です。\n- `end` (`number`, オプション): 終了位置です(含まれません)。デフォルトは `array.length` です。\n\n#### 戻り値\n\n(`ArrayLike<T | U>`): 値で埋められた配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/filter.md",
    "content": "# filter (Lodash 互換性)\n\n::: warning `Array.prototype.filter()` を使用してください\n\nこの `filter` 関数は、複雑なオブジェクト処理、様々な条件形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `Array.prototype.filter()` を使用してください。\n\n:::\n\n与えられた条件を満たす要素で新しい配列を作ります。\n\n```typescript\nconst result = filter(collection, predicate);\n```\n\n## 使用法\n\n### `filter(collection, predicate)`\n\n配列またはオブジェクトから特定の条件を満たす要素だけをフィルタリングしたい場合に `filter` を使用します。条件は関数、部分オブジェクト、プロパティ-値ペア、プロパティ名など、様々な形式で指定できます。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\n// 検査関数を使用\nconst numbers = [1, 2, 3, 4, 5];\nfilter(numbers, x => x % 2 === 0);\n// 戻り値: [2, 4]\n\n// プロパティ名を使用\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nfilter(users, 'active');\n// 戻り値: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// 部分オブジェクトを使用\nfilter(users, { active: true });\n// 戻り値: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// プロパティ-値ペアを使用\nfilter(users, ['active', true]);\n// 戻り値: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n```\n\nオブジェクトに対しても同じように動作し、条件を満たす値の配列を返します。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfilter(scores, score => score >= 80);\n// 戻り値: [90, 85]\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nfilter(null, x => x > 0);\n// 戻り値: []\n\nfilter(undefined, x => x > 0);\n// 戻り値: []\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): フィルタリングする配列またはオブジェクトです。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): フィルタリング条件です。関数、部分オブジェクト、プロパティ-値ペア、プロパティ名を使用できます。\n\n#### 戻り値\n\n(`T[]`): 条件を満たす要素で構成された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/find.md",
    "content": "# find (Lodash 互換性)\n\n::: warning `Array.prototype.find()` を使用してください\n\nこの `find` 関数は、複雑なオブジェクト処理、様々な条件形式のサポートなどにより遅く動作します。\n\n代わりに、より高速で現代的な `Array.prototype.find()` を使用してください。\n\n:::\n\n配列またはオブジェクトから条件に合う最初の要素を探します。\n\n```typescript\nconst result = find(collection, predicate, fromIndex);\n```\n\n## 使用法\n\n### `find(collection, predicate, fromIndex?)`\n\n配列またはオブジェクトから特定の条件を満たす最初の要素を探したい場合に `find` を使用します。条件は関数、部分オブジェクト、プロパティ-値ペア、プロパティ名など、様々な形式で指定できます。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\n// 検査関数を使用\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 3);\n// 戻り値: 4\n\n// プロパティ名を使用\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n];\nfind(users, 'active');\n// 戻り値: { name: 'Bob', active: true }\n\n// 部分オブジェクトを使用\nfind(users, { active: true });\n// 戻り値: { name: 'Bob', active: true }\n\n// プロパティ-値ペアを使用\nfind(users, ['name', 'Charlie']);\n// 戻り値: { name: 'Charlie', active: true }\n```\n\n開始インデックスを指定できます。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 2, 2);\n// 戻り値: 3 (インデックス2から検索開始)\n```\n\nオブジェクトに対しても同じように動作します。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfind(scores, score => score >= 80);\n// 戻り値: 90\n```\n\n`null` または `undefined` は空のコレクションとして処理され `undefined` を返します。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nfind(null, x => x > 0);\n// 戻り値: undefined\n\nfind(undefined, x => x > 0);\n// 戻り値: undefined\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 検索する配列またはオブジェクトです。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): 検索条件です。関数、部分オブジェクト、プロパティ-値ペア、プロパティ名を使用できます。\n- `fromIndex` (`number`, オプション): 検索を開始するインデックスです。デフォルトは `0` です。\n\n#### 戻り値\n\n(`T | undefined`): 条件を満たす最初の要素を返します。見つからなければ `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/findIndex.md",
    "content": "# findIndex（Lodash 互換性）\n\n::: warning `Array.prototype.findIndex` を使用してください\n\nこの `findIndex` 関数は、さまざまな条件形式の処理や `fromIndex` 処理などの追加機能により、動作が遅くなります。\n\n代わりに、より高速で現代的な `Array.prototype.findIndex` を使用してください。\n\n:::\n\n配列内で条件に一致する最初の要素のインデックスを検索します。\n\n```typescript\nconst index = findIndex(arr, doesMatch, fromIndex);\n```\n\n## 使用法\n\n### `findIndex(arr, doesMatch, fromIndex)`\n\n配列内で特定の条件に一致する最初の要素の位置を見つけたい場合は `findIndex` を使用してください。さまざまな方法で条件を指定できます。条件に一致する要素がない場合は `-1` を返します。\n\n条件を関数として指定すると、各要素に対して関数を実行し、true を返す最初の要素のインデックスを返します。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { id: 1, name: 'Alice', active: false },\n  { id: 2, name: 'Bob', active: true },\n  { id: 3, name: 'Charlie', active: true },\n];\n\n// 関数で条件を指定\nfindIndex(users, user => user.active);\n// Returns: 1\n```\n\n条件を部分オブジェクトとして指定すると、それらのプロパティが一致する最初の要素のインデックスを返します。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 部分オブジェクトで条件を指定\nfindIndex(users, { name: 'Bob', active: true });\n// Returns: 1\n```\n\n条件をプロパティ名と値の配列として指定すると、そのプロパティがその値と一致する最初の要素のインデックスを返します。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// [プロパティ名, 値] 配列で条件を指定\nfindIndex(users, ['active', true]);\n// Returns: 1\n```\n\nプロパティ名のみを指定すると、そのプロパティが真と評価される最初の要素のインデックスを返します。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// プロパティ名で条件を指定\nfindIndex(users, 'active');\n// Returns: 1\n```\n\n`fromIndex` を指定すると、そのインデックスから検索を開始します。負の値を使用すると、配列の末尾から計算されます。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// インデックス 2 から検索開始\nfindIndex(users, user => user.active, 2);\n// Returns: 2\n\n// 配列の末尾から2番目から検索\nfindIndex(users, user => user.active, -2);\n// Returns: 1\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nfindIndex(null, user => user.active); // -1\nfindIndex(undefined, 'active'); // -1\n```\n\n#### パラメータ\n\n- `arr` (`ArrayLike<T> | null | undefined`): 検索する配列です。\n- `doesMatch` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, オプション): 一致条件です。関数、部分オブジェクト、キーと値のペア、またはプロパティ名を指定できます。\n- `fromIndex` (`number`, オプション): 検索を開始するインデックスです。デフォルトは `0` です。\n\n#### 戻り値\n\n(`number`): 条件に一致する最初の要素のインデックスを返します。一致する要素がない場合は `-1` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/findLast.md",
    "content": "# findLast (Lodash互換性)\n\n::: warning `Array.prototype.findLast`を使用してください\n\nこの`findLast`関数は、さまざまな型と特殊な条件処理により複雑で動作が遅くなります。\n\n代わりに、より高速で現代的な`Array.prototype.findLast`を使用してください。\n\n:::\n\n配列またはオブジェクトで条件を満たす最後の要素を見つけます。\n\n```typescript\nconst lastEven = findLast(array, predicate);\n```\n\n## 使用法\n\n### `findLast(collection, predicate?, fromIndex?)`\n\n配列またはオブジェクトで与えられた条件を満たす最後の要素を見つけます。配列の末尾から逆順に検索し、条件を満たす最初の要素を返します。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\n// 関数で条件を指定\nconst users = [\n  { user: 'barney', age: 36 },\n  { user: 'fred', age: 40 },\n  { user: 'pebbles', age: 18 },\n];\nfindLast(users, o => o.age < 40);\n// => { user: 'pebbles', age: 18 }\n\n// オブジェクトで条件を指定\nfindLast(users, { age: 36 });\n// => { user: 'barney', age: 36 }\n\n// キー値ペアで条件を指定\nfindLast(users, ['age', 18]);\n// => { user: 'pebbles', age: 18 }\n\n// プロパティ名で条件を指定（真として評価される値を持つ最後の要素）\nfindLast(users, 'age');\n// => { user: 'fred', age: 40 }\n```\n\n検索開始インデックスを指定することもできます。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5, 4, 3, 2, 1];\nfindLast(numbers, n => n > 3, 6); // インデックス6から逆順検索\n// => 4\n```\n\n`null`または`undefined`は空の結果を返します。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nfindLast(null, x => x > 0); // undefined\nfindLast(undefined, x => x > 0); // undefined\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 検索する配列またはオブジェクトです。\n- `predicate` (`ListIterateeCustom<T, boolean>`, オプション): 各要素に適用する条件です。関数、オブジェクト、キー値ペア、またはプロパティ名を使用できます。デフォルトは`identity`関数です。\n- `fromIndex` (`number`, オプション): 検索を開始するインデックスです。負の場合は末尾から計算します。デフォルトは配列の最後のインデックスです。\n\n#### 戻り値\n\n(`T | undefined`): 条件を満たす最後の要素を返します。条件を満たす要素がない場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/findLastIndex.md",
    "content": "# findLastIndex (Lodash 互換性)\n\n::: warning `Array.prototype.findLastIndex`を使用してください\n\nこの`findLastIndex`関数は、`null`や`undefined`の処理、部分オブジェクトのマッチング、プロパティ名のマッチングなどの追加機能により、動作が遅くなります。\n\n代わりに、より高速で現代的な`Array.prototype.findLastIndex`を使用してください。\n\n:::\n\n配列で条件を満たす最後の要素のインデックスを見つけます。\n\n```typescript\nconst lastIndex = findLastIndex(array, predicate, fromIndex);\n```\n\n## 使用法\n\n### `findLastIndex(array, predicate, fromIndex)`\n\n配列の末尾から開始して、与えられた条件に一致する最初の要素のインデックスを見つけたい場合は`findLastIndex`を使用してください。条件を満たす要素がない場合は`-1`を返します。\n\nこの関数は様々な方法で条件を指定できます。関数を渡すと各要素に対して関数を実行し、部分オブジェクトを渡すと要素がそのプロパティを持っているかを確認します。配列形式のキー値ペアを渡すと特定のプロパティが与えられた値と一致するかを確認し、文字列を渡すとそのプロパティが真と評価される値かを確認します。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\n// 関数を使用して条件を指定します\nfindLastIndex(users, o => o.user === 'pebbles');\n// Returns: 2\n\n// 部分オブジェクトを使用して一致する要素を見つけます\nfindLastIndex(users, { user: 'barney', active: true });\n// Returns: 0\n\n// プロパティ-値ペアを使用して一致する要素を見つけます\nfindLastIndex(users, ['active', false]);\n// Returns: 2\n\n// プロパティ名を使用して真と評価される値を持つ要素を見つけます\nfindLastIndex(users, 'active');\n// Returns: 0\n```\n\n検索開始位置を指定することもできます。`fromIndex`が負の場合は配列の末尾から計算します。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// インデックス3から逆方向に検索します\nfindLastIndex(numbers, n => n < 4, 2);\n// Returns: 2\n\n// 負のインデックスを使用すると末尾から計算します\nfindLastIndex(numbers, n => n > 2, -2);\n// Returns: 3\n```\n\n`null`または`undefined`は空の配列として処理されます。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nfindLastIndex(null, n => n > 0); // -1\nfindLastIndex(undefined, n => n > 0); // -1\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 検索する配列です。\n- `predicate` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, オプション): 各要素をテストする条件です。関数、部分オブジェクト、プロパティ-値ペア、またはプロパティ名を使用できます。デフォルトは恒等関数です。\n- `fromIndex` (`number`, オプション): 検索を開始するインデックスです。負の場合は配列の末尾から計算します。デフォルトは`array.length - 1`です。\n\n#### 戻り値\n\n(`number`): 条件を満たす最後の要素のインデックスを返します。条件を満たす要素がない場合は`-1`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/first.md",
    "content": "# first (Lodash 互換性)\n\n::: warning `es-toolkit`の`head`を使用してください\n\nこの`first`関数は、`null`や`undefined`の処理と配列のようなオブジェクトの変換により、動作が遅くなります。`es-toolkit`の`head`関数は、これらの追加処理なしで、より高速かつシンプルに動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[head](../../array/head.md)を使用してください。\n\n:::\n\n配列の最初の要素を返します。\n\n```typescript\nconst firstElement = first(array);\n```\n\n## 使用法\n\n### `first(array)`\n\n配列の最初の要素を取得したい場合は`first`を使用してください。配列が空であるか、`null`、`undefined`の場合は`undefined`を返します。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\n// 通常の配列から最初の要素を取得\nfirst([1, 2, 3]);\n// Returns: 1\n\n// 文字列配列から最初の要素を取得\nfirst(['a', 'b', 'c']);\n// Returns: 'a'\n\n// 空の配列\nfirst([]);\n// Returns: undefined\n```\n\n`null`または`undefined`は`undefined`を返します。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nfirst(null); // undefined\nfirst(undefined); // undefined\n```\n\n配列のようなオブジェクトでも使用できます。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\nfirst(arrayLike);\n// Returns: 'a'\n\n// 文字列も配列のように処理されます\nfirst('hello');\n// Returns: 'h'\n```\n\n型が保証されたタプルでは、正確な型を返します。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst tuple = [1, 'two', true] as const;\nfirst(tuple);\n// Returns: 1 (型は1と推論されます)\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 最初の要素を取得する配列です。\n\n#### 戻り値\n\n(`T | undefined`): 配列の最初の要素を返します。配列が空または無効な場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flatMap.md",
    "content": "# flatMap (Lodash 互換性)\n\n::: warning `es-toolkit`の`flatMap`を使用してください\n\nこの`flatMap`関数は、`null`や`undefined`の処理、`ArrayLike`型の処理、様々な条件関数形式のサポートなどにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[flatMap](../../array/flatMap.md)を使用してください。\n\n:::\n\n各要素に関数を適用した後、結果を平坦化します。\n\n```typescript\nconst result = flatMap(collection, iteratee);\n```\n\n## 使用法\n\n### `flatMap(collection, iteratee)`\n\nコレクションの各要素にイテレータ関数を適用した後、1段階平坦化した配列を返します。配列、オブジェクト、文字列をサポートし、様々な形式のイテレータを使用できます。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\n// 配列に関数を適用\nfunction duplicate(n) {\n  return [n, n];\n}\nflatMap([1, 2], duplicate);\n// 結果: [1, 1, 2, 2]\n\n// オブジェクトに関数を適用\nconst obj = { a: 1, b: 2 };\nflatMap(obj, (value, key) => [key, value]);\n// 結果: ['a', 1, 'b', 2]\n\n// 文字列プロパティでマッピング\nconst users = [\n  { user: 'barney', hobbies: ['hiking', 'coding'] },\n  { user: 'fred', hobbies: ['reading'] },\n];\nflatMap(users, 'hobbies');\n// 結果: ['hiking', 'coding', 'reading']\n```\n\nイテレータなしで使用すると、値を1段階平坦化します。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst obj = { a: [1, 2], b: [3, 4] };\nflatMap(obj);\n// 結果: [1, 2, 3, 4]\n```\n\n部分オブジェクトで条件マッピングも可能です。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', age: 36, active: true },\n  { user: 'fred', age: 40, active: false },\n];\nflatMap(users, { active: false });\n// 結果: [false, true] (activeがfalseの要素のマッチング結果)\n```\n\n#### パラメータ\n\n- `collection` (`object | null | undefined`): 反復処理するコレクションです。配列、オブジェクト、文字列が可能です。\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, オプション): 各要素に適用するイテレータです。関数、プロパティ名、または部分オブジェクトが可能です。\n\n#### 戻り値\n\n(`any[]`): マッピング後1段階平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flatMapDeep.md",
    "content": "# flatMapDeep (Lodash 互換性)\n\n::: warning `es-toolkit`の[`flatMapDeep`](../../array/flatMapDeep.md)を使用してください\n\nこの`flatMapDeep`関数は、複雑なコレクション型の処理と深い平坦化ロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[flatMapDeep](../../array/flatMapDeep.md)を使用してください。\n\n:::\n\n各要素に関数を適用した後、結果を再帰的に平坦化します。\n\n```typescript\nconst result = flatMapDeep(collection, iteratee);\n```\n\n## 使用法\n\n### `flatMapDeep(collection, iteratee)`\n\nコレクションの各要素にイテレータ関数を適用した後、無限の深さまで平坦化した配列を返します。ネストされた配列構造がすべて平坦化されて1次元配列になります。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\n// 配列に関数を適用して深く平坦化\nfunction duplicate(n) {\n  return [[[n, n]]];\n}\nflatMapDeep([1, 2], duplicate);\n// 結果: [1, 1, 2, 2]\n\n// オブジェクトに関数を適用して深く平坦化\nconst obj = { a: 1, b: 2 };\nflatMapDeep(obj, (value, key) => [[[key, value]]]);\n// 結果: ['a', 1, 'b', 2]\n\n// 文字列プロパティでマッピングして深く平坦化\nconst users = [\n  { user: 'barney', hobbies: [['hiking', 'coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDeep(users, 'hobbies');\n// 結果: ['hiking', 'coding', 'reading']\n```\n\nイテレータなしで使用すると、値を再帰的に平坦化します。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst obj = { a: [[1, 2]], b: [[[3]]] };\nflatMapDeep(obj);\n// 結果: [1, 2, 3]\n```\n\n部分オブジェクトで条件マッピングも可能です。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: [true, false] },\n  { user: 'fred', active: [false] },\n];\nflatMapDeep(users, { active: [false] });\n// 結果: [true, true] (active配列に[false]が含まれる要素のマッチング結果)\n```\n\n#### パラメータ\n\n- `collection` (`object | null | undefined`): 反復処理するコレクションです。配列、オブジェクト、文字列が可能です。\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, オプション): 各要素に適用するイテレータです。関数、プロパティ名、または部分オブジェクトが可能です。\n\n#### 戻り値\n\n(`any[]`): マッピング後再帰的に平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flatMapDepth.md",
    "content": "# flatMapDepth (Lodash 互換性)\n\n::: warning `es-toolkit`の[flatMap](../../array/flatMap.md)を使用してください\n\nこの`flatMapDepth`関数は、Lodashとの互換性のために様々な形式のイテレータをサポートし、`null`や`undefined`の処理などにより複雑に実装されています。メインライブラリの`flatMap`関数はシンプルな関数イテレータのみをサポートするため、より高速に動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[flatMap](../../array/flatMap.md)を使用してください。\n\n:::\n\n配列の各要素をイテレータ関数で変換した後、指定された深さまで平坦化します。\n\n```typescript\nconst result = flatMapDepth(collection, iteratee, depth);\n```\n\n## 使用法\n\n### `flatMapDepth(collection, iteratee, depth)`\n\n配列またはオブジェクトの各要素を与えられた関数で変換した後、結果を指定された深さまで平坦化して新しい配列として返します。ネストされた配列構造を望む深さまでのみ平坦化したいときに便利です。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 配列を変換して深さ2まで平坦化\nflatMapDepth([1, 2], n => [[n, n]], 2);\n// => [1, 1, 2, 2]\n\n// 深さ1に制限すると完全に平坦化されません\nflatMapDepth([1, 2], n => [[n, n]], 1);\n// => [[1, 1], [2, 2]]\n\n// オブジェクトから値を抽出して平坦化\nconst users = [\n  { user: 'barney', hobbies: [['hiking'], ['coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDepth(users, 'hobbies', 2);\n// => ['hiking', 'coding', 'reading']\n```\n\nこの関数は様々な形式のイテレータをサポートします。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 関数を使用した変換\nflatMapDepth([1, 2, 3], n => [[n, n]], 2);\n\n// プロパティ名で値を抽出\nconst objects = [{ items: [['a'], ['b']] }, { items: [['c']] }];\nflatMapDepth(objects, 'items', 2);\n// => ['a', 'b', 'c']\n\n// オブジェクトの部分一致\nconst users = [{ active: [[true], [false]] }, { active: [[false]] }];\nflatMapDepth(users, { active: [[false]] }, 2);\n// => [true, true]\n```\n\n`null`または`undefined`は空の配列として処理されます。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\nflatMapDepth(null, n => [n], 1); // => []\nflatMapDepth(undefined, n => [n], 1); // => []\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, any> | Record<number, any> | object | null | undefined`): 反復処理する配列またはオブジェクトです。\n- `iteratee` (`((value: T, index: number, collection: any) => any) | string | object`, オプション): 各要素に対して実行する変換関数またはプロパティ名です。デフォルトは`identity`です。\n- `depth` (`number`, オプション): 平坦化する最大深さです。デフォルトは`1`です。\n\n#### 戻り値\n\n(`T[]`): イテレータで変換された後、指定された深さまで平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flatten.md",
    "content": "# flatten (Lodash 互換性)\n\n::: warning `es-toolkit`の`flatten`を使用してください\n\nこの`flatten`関数は、`null`や`undefined`の処理、`ArrayLike`型の処理、様々な条件関数形式のサポートなどにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[flatten](../../array/flatten.md)を使用してください。\n\n:::\n\n配列を1段階平坦化します。\n\n```typescript\nconst result = flatten(array, depth);\n```\n\n## 使用法\n\n### `flatten(value, depth)`\n\nネストされた配列を指定された深さだけ平坦化します。デフォルトでは1段階のみ平坦化し、ArgumentsオブジェクトやSymbol.isConcatSpreadableを持つオブジェクトもサポートします。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\n// 基本的な平坦化(1段階)\nflatten([1, [2, [3, [4]], 5]]);\n// 結果: [1, 2, [3, [4]], 5]\n\n// 深さを指定\nflatten([1, [2, [3, [4]], 5]], 2);\n// 結果: [1, 2, 3, [4], 5]\n\n// Argumentsオブジェクトのサポート\nfunction example() {\n  return flatten(arguments);\n}\nexample(1, [2, 3], [[4]]);\n// 結果: [1, 2, 3, [4]]\n```\n\n空の配列やnull、undefinedは空の配列を返します。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nflatten(null); // []\nflatten(undefined); // []\nflatten([]); // []\n```\n\nSymbol.isConcatSpreadableを持つオブジェクトも配列のように平坦化されます。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nconst spreadable = { 0: 'a', 1: 'b', length: 2, [Symbol.isConcatSpreadable]: true };\nflatten([1, spreadable, 3]);\n// 結果: [1, 'a', 'b', 3]\n```\n\n#### パラメータ\n\n- `value` (`ArrayLike<T> | null | undefined`): 平坦化する配列です。\n- `depth` (`number`, オプション): 平坦化する最大深さです。デフォルトは`1`です。\n\n#### 戻り値\n\n(`T[]`): 平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flattenDeep.md",
    "content": "# flattenDeep (Lodash 互換性)\n\n::: warning `es-toolkit`の`flattenDeep`を使用してください\n\nこの`flattenDeep`関数は、`null`や`undefined`の処理、`ArrayLike`型の処理、様々な条件関数形式のサポートなどにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[flattenDeep](../../array/flattenDeep.md)を使用してください。\n\n:::\n\n配列を完全に平坦化します。\n\n```typescript\nconst result = flattenDeep(array);\n```\n\n## 使用法\n\n### `flattenDeep(value)`\n\nネストされた配列をすべての深さで再帰的に平坦化します。すべてのネストレベルが削除され、完全に平坦化された1次元配列を返します。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\n// 深くネストされた配列を完全に平坦化\nflattenDeep([1, [2, [3, [4]], 5]]);\n// 結果: [1, 2, 3, 4, 5]\n\n// 複雑なネスト構造も完全に平坦化\nflattenDeep([1, [2, [3, [[[[4]]]]], 5]]);\n// 結果: [1, 2, 3, 4, 5]\n\n// 混合された型もサポート\nflattenDeep(['a', ['b', ['c', [['d']]]]]);\n// 結果: ['a', 'b', 'c', 'd']\n```\n\n空の配列やnull、undefinedは空の配列を返します。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep(null); // []\nflattenDeep(undefined); // []\nflattenDeep([]); // []\n```\n\nすでに平坦化された配列はそのままコピーされます。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep([1, 2, 3, 4, 5]);\n// 結果: [1, 2, 3, 4, 5]\n```\n\n#### パラメータ\n\n- `value` (`ListOfRecursiveArraysOrValues<T> | null | undefined`): 完全に平坦化する配列です。\n\n#### 戻り値\n\n(`Array<T>`): すべてのネストが削除された完全に平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/flattenDepth.md",
    "content": "# flattenDepth (Lodash 互換性)\n\n::: warning `es-toolkit`の`flatten`を使用してください\n\nこの`flattenDepth`関数は、`null`や`undefined`の処理などにより、動作が遅くなります。`es-toolkit`の`flatten`関数は、これらの追加処理なしで、より高速かつシンプルに動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[flatten](../../array/flatten.md)を使用してください。\n\n:::\n\n配列を指定した深さまで平坦化します。\n\n```typescript\nconst flattened = flattenDepth(array, depth);\n```\n\n## 使用法\n\n### `flattenDepth(array, depth)`\n\nネストされた配列を望む深さまで平坦化したい場合は`flattenDepth`を使用してください。深さを指定すると、その深さまでのみネストされた配列を平坦化します。\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\n// 深さ1まで平坦化します\nflattenDepth([1, [2, [3, [4]], 5]], 1);\n// Returns: [1, 2, [3, [4]], 5]\n\n// 深さ2まで平坦化します\nflattenDepth([1, [2, [3, [4]], 5]], 2);\n// Returns: [1, 2, 3, [4], 5]\n\n// 深さを指定しない場合、デフォルト値1で平坦化します\nflattenDepth([1, [2, [3, [4]], 5]]);\n// Returns: [1, 2, [3, [4]], 5]\n```\n\n`null`または`undefined`は空の配列として処理されます。\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\nflattenDepth(null, 2); // []\nflattenDepth(undefined, 2); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 平坦化する配列です。\n- `depth` (`number`, オプション): 平坦化する最大深さです。デフォルトは`1`です。\n\n#### 戻り値\n\n(`T[]`): 指定した深さまで平坦化された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/forEach.md",
    "content": "# forEach (Lodash 互換性)\n\n::: warning `Array.prototype.forEach()`を使用してください\n\nこの`forEach`関数は、複雑なオブジェクト処理、早期終了ロジックなどにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`Array.prototype.forEach()`を使用してください。\n\n:::\n\n配列またはオブジェクトの各要素に対して関数を実行します。\n\n```typescript\nforEach(collection, callback);\n```\n\n## 使用法\n\n### `forEach(collection, callback)`\n\n配列またはオブジェクトのすべての要素を走査し、各要素に対してコールバック関数を実行したい場合は`forEach`を使用してください。コールバックが`false`を返すと走査を中断します。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\n// 配列の走査\nconst numbers = [1, 2, 3, 4, 5];\nconst results: number[] = [];\n\nforEach(numbers, value => {\n  results.push(value * 2);\n});\n// resultsは[2, 4, 6, 8, 10]\n\n// 早期終了\nconst numbers2 = [1, 2, 3, 4, 5];\nconst results2: number[] = [];\n\nforEach(numbers2, value => {\n  if (value > 3) {\n    return false; // 走査を中断\n  }\n  results2.push(value);\n});\n// results2は[1, 2, 3]\n```\n\nオブジェクトに対しても同様に動作します。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nconst keys: string[] = [];\nconst values: number[] = [];\n\nforEach(obj, (value, key) => {\n  keys.push(key);\n  values.push(value);\n});\n// keysは['a', 'b', 'c']\n// valuesは[1, 2, 3]\n```\n\n`null`または`undefined`は空のコレクションとして扱われます。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nforEach(null, value => {\n  console.log(value); // 実行されません\n});\n\nforEach(undefined, value => {\n  console.log(value); // 実行されません\n});\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 走査する配列またはオブジェクトです。\n- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 各要素に対して実行する関数です。`false`を返すと走査を中断します。\n\n#### 戻り値\n\n(`T`): 走査した元のコレクションを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/forEachRight.md",
    "content": "# forEachRight (Lodash 互換性)\n\n::: warning `es-toolkit`の`forEachRight`を使用してください\n\nこの`forEachRight`関数は、`null`や`undefined`の処理、`ArrayLike`タイプの処理、さまざまな条件関数形式のサポートなどにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[forEachRight](../../array/forEachRight.md)を使用してください。\n\n:::\n\n配列またはオブジェクトの要素を右から左に走査し、各要素に対して関数を実行します。\n\n```typescript\nforEachRight(collection, callback);\n```\n\n## 使用法\n\n### `forEachRight(collection, callback)`\n\n配列、オブジェクト、文字列を右から左の順序で走査し、各要素に対してコールバック関数を実行します。コールバックが`false`を返すと走査を中断します。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\n// 配列を逆順で走査します\nforEachRight([1, 2, 3], (value, index) => {\n  console.log(value, index);\n});\n// 出力: 3 2, 2 1, 1 0\n\n// 文字列を逆順で走査します\nforEachRight('abc', (char, index) => {\n  console.log(char, index);\n});\n// 出力: 'c' 2, 'b' 1, 'a' 0\n\n// オブジェクトを逆順で走査します\nforEachRight({ a: 1, b: 2, c: 3 }, (value, key) => {\n  console.log(value, key);\n});\n// 出力: 3 'c', 2 'b', 1 'a'\n```\n\n`null`または`undefined`はそのまま返します。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight(null, value => console.log(value)); // null\nforEachRight(undefined, value => console.log(value)); // undefined\n```\n\nコールバックが`false`を返すと走査を中断します。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  if (value === 2) {\n    return false; // 走査を中断\n  }\n});\n// 出力: 4, 3, 2\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 走査するコレクションです。配列、オブジェクト、文字列、またはnull/undefinedを指定できます。\n- `callback` (`(item: any, index: any, arr: any) => unknown`, 選択): 各要素に対して実行する関数です。`false`を返すと走査を中断します。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 元のコレクションをそのまま返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/groupBy.md",
    "content": "# groupBy (Lodash 互換性)\n\n::: warning `es-toolkit`の[groupBy](../../array/groupBy.md)を使用してください\n\nこの`groupBy`関数は、`null`や`undefined`の処理、オブジェクトのサポート、複雑な型処理などにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[groupBy](../../array/groupBy.md)を使用してください。\n\n:::\n\n配列またはオブジェクトの要素を与えられた条件に従ってグループ化します。\n\n```typescript\nconst grouped = groupBy(collection, iteratee);\n```\n\n## 使用法\n\n### `groupBy(collection, iteratee)`\n\n配列またはオブジェクトの各要素を与えられた条件関数に従ってグループ化し、グループ別に分類されたオブジェクトを返します。条件は関数、プロパティ名、部分オブジェクトなど、さまざまな形式で提供できます。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\n// 関数でグループ化\nconst array = [6.1, 4.2, 6.3];\nconst result = groupBy(array, Math.floor);\n// resultは{ '4': [4.2], '6': [6.1, 6.3] }\n\n// プロパティ名でグループ化\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 30 },\n];\nconst byAge = groupBy(users, 'age');\n// byAgeは{ '25': [{ name: 'jane', age: 25 }], '30': [{ name: 'john', age: 30 }, { name: 'bob', age: 30 }] }\n\n// オブジェクトからグループ化\nconst obj = { a: 6.1, b: 4.2, c: 6.3 };\nconst groupedObj = groupBy(obj, Math.floor);\n// groupedObjは{ '4': [4.2], '6': [6.1, 6.3] }\n```\n\n`null`または`undefined`は空のオブジェクトとして扱われます。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\ngroupBy(null, x => x); // {}\ngroupBy(undefined, x => x); // {}\n```\n\n部分オブジェクトやプロパティ-値ペアでもグループ化できます。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\n// 部分オブジェクトでグループ化\nconst byCategory = groupBy(products, { category: 'fruit' });\n// プロパティ-値ペアでグループ化\nconst byName = groupBy(products, ['name', 'apple']);\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, T> | null | undefined`): グループ化する配列またはオブジェクトです。\n- `iteratee` (`Function | PropertyKey | Array | Object`, 選択): グループ化する条件です。関数、プロパティ名、プロパティ-値ペア、または部分オブジェクトを指定できます。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`Record<string, T[]>`): 各キーがグループの条件値で、値がそのグループに属する要素の配列であるオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/head.md",
    "content": "# head (Lodash 互換性)\n\n::: warning `es-toolkit`の[head](../../array/head.md)を使用してください\n\nこの`head`関数は、`ArrayLike`オブジェクトの処理と配列変換プロセスにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[head](../../array/head.md)を使用してください。\n\n:::\n\n配列の最初の要素を返します。\n\n```typescript\nconst firstElement = head(array);\n```\n\n## 使用法\n\n### `head(array)`\n\n配列または配列のようなオブジェクトの最初の要素を返します。配列が空または無効な場合は`undefined`を返します。\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\n// 数値配列の最初の要素\nconst numbers = [1, 2, 3, 4];\nconst first = head(numbers);\n// firstは1\n\n// 文字列配列の最初の要素\nconst strings = ['a', 'b', 'c'];\nconst firstChar = head(strings);\n// firstCharは'a'\n\n// 配列のようなオブジェクト\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst firstItem = head(arrayLike);\n// firstItemは'x'\n```\n\n空の配列または無効な入力は`undefined`を返します。\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst noElement = head(emptyArray);\n// noElementはundefined\n\nhead(null); // undefined\nhead(undefined); // undefined\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 最初の要素を取得する配列または配列のようなオブジェクトです。\n\n#### 戻り値\n\n(`T | undefined`): 配列の最初の要素を返し、配列が空または無効な場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/includes.md",
    "content": "# includes (Lodash 互換性)\n\n::: warning `Array.prototype.includes`を使用してください\n\nこの`includes`関数は、オブジェクトの走査とSameValueZero比較処理により、動作が遅くなります。配列の場合、JavaScriptのネイティブ`Array.prototype.includes`メソッドの方が高速で標準化されています。\n\n代わりに、より高速でモダンな`Array.prototype.includes`を使用してください。\n\n:::\n\n配列、オブジェクト、または文字列に特定の値が含まれているかを確認します。\n\n```typescript\nconst hasValue = includes(collection, target, fromIndex);\n```\n\n## 使用法\n\n### `includes(collection, target, fromIndex)`\n\n配列、オブジェクト、文字列に特定の値が存在するかを確認したい場合は`includes`を使用してください。SameValueZero方式で値を比較します。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 配列で値を検索\nincludes([1, 2, 3], 2);\n// Returns: true\n\n// オブジェクトの値から検索\nincludes({ a: 1, b: 'a', c: NaN }, 'a');\n// Returns: true\n\n// 文字列で部分文字列を検索\nincludes('hello world', 'world');\n// Returns: true\n```\n\n特定のインデックスから検索を開始できます。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// インデックス2から検索\nincludes([1, 2, 3, 2], 2, 2);\n// Returns: true (インデックス3にあります)\n\n// 負のインデックスは末尾から計算\nincludes([1, 2, 3], 2, -2);\n// Returns: true\n```\n\n`null`または`undefined`は常に`false`を返します。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes(null, 1); // false\nincludes(undefined, 1); // false\n```\n\n文字列で部分文字列を検索することもできます。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 最初から検索\nincludes('hello', 'e');\n// Returns: true\n\n// 特定の位置から検索\nincludes('hello', 'e', 2);\n// Returns: false (インデックス2以降に'e'はありません)\n```\n\n`NaN`値も正しく見つけることができます。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes([1, 2, NaN], NaN);\n// Returns: true\n\nincludes({ a: 1, b: NaN }, NaN);\n// Returns: true\n```\n\n#### パラメータ\n\n- `collection` (`Array | Record<string, any> | string | null | undefined`): 検索する配列、オブジェクト、または文字列です。\n- `target` (`any`): 見つける値です。\n- `fromIndex` (`number`, 選択): 検索を開始するインデックスです。負の値は末尾から計算します。デフォルトは`0`です。\n\n#### 戻り値\n\n(`boolean`): 値が存在する場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/indexOf.md",
    "content": "# indexOf (Lodash 互換性)\n\n::: warning `Array.prototype.indexOf` または `Array.prototype.findIndex` を使用してください\n\nこの`indexOf`関数は、`NaN`処理のための追加ロジックにより、動作が遅くなります。\n\n`NaN`を探していない場合は、より高速な`Array.prototype.indexOf`を使用してください。`NaN`を見つける場合は、`Array.prototype.findIndex`と`Number.isNaN`を使用してください。\n\n:::\n\n配列内で指定された要素が最初に一致するインデックスを見つけます。\n\n```typescript\nconst index = indexOf(array, searchElement, fromIndex);\n```\n\n## 使用法\n\n### `indexOf(array, searchElement, fromIndex?)`\n\n`Array.prototype.indexOf` とほぼ同じように動作しますが、`NaN` 値を見つけることができます。配列内の特定の値の位置を知る必要がある場合に使用してください。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\n// 数値配列で要素を検索\nconst array = [1, 2, 3, 4];\nindexOf(array, 3); // => 2\n\n// NaN 値を検索（Array.prototype.indexOf では見つけられません）\nconst arrayWithNaN = [1, 2, NaN, 4];\nindexOf(arrayWithNaN, NaN); // => 2\n```\n\n特定のインデックスから検索を開始できます。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 1, 2, 3];\nindexOf(array, 2, 2); // => 4（インデックス 2 から検索開始）\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nindexOf(null, 1); // => -1\nindexOf(undefined, 1); // => -1\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 検索対象の配列。\n\n::: info `array` は `ArrayLike<T>` または `null` または `undefined` である可能性があります\n\nlodash と完全に互換性があるように、`indexOf` 関数は `array` を次のように処理します。\n\n- `array` が `ArrayLike<T>` の場合、配列に変換するために `Array.from(...)` を使用します。\n- `array` が `null` または `undefined` の場合、空の配列と見なされます。\n\n:::\n\n- `searchElement` (`T`): 検索する値です。\n- `fromIndex` (`number`, オプション): 検索を開始するインデックスです。負の数の場合、配列の末尾から計算されます。デフォルト値は `0` です。\n\n#### 戻り値\n\n(`number`): 配列内で指定された値と最初に一致する要素のインデックスを返します。一致する要素が見つからない場合は `-1` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/initial.md",
    "content": "# initial (Lodash 互換性)\n\n::: warning `es-toolkit`の[initial](../../array/initial.md)を使用してください\n\nこの`initial`関数は、`ArrayLike`オブジェクトの処理と配列変換プロセスにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[initial](../../array/initial.md)を使用してください。\n\n:::\n\n配列から最後の要素を除くすべての要素を新しい配列として返します。\n\n```typescript\nconst result = initial(array);\n```\n\n## 使用法\n\n### `initial(array)`\n\n配列または配列のようなオブジェクトから最後の要素を除くすべての要素を含む新しい配列を返します。配列が空または要素が1つだけの場合は空の配列を返します。\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\n// 数値配列から最後の要素を除外\nconst numbers = [1, 2, 3, 4];\nconst result = initial(numbers);\n// resultは[1, 2, 3]\n\n// 文字列配列から最後の要素を除外\nconst strings = ['a', 'b', 'c', 'd'];\nconst withoutLast = initial(strings);\n// withoutLastは['a', 'b', 'c']\n\n// 配列のようなオブジェクト\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst items = initial(arrayLike);\n// itemsは['x', 'y']\n```\n\n空の配列または無効な入力は空の配列を返します。\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst result = initial(emptyArray);\n// resultは[]\n\nconst singleItem = [42];\nconst onlyOne = initial(singleItem);\n// onlyOneは[]\n\ninitial(null); // []\ninitial(undefined); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 最後の要素を除外する配列または配列のようなオブジェクトです。\n\n#### 戻り値\n\n(`T[]`): 最後の要素を除外した新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/intersection.md",
    "content": "# intersection (Lodash 互換性)\n\n::: warning `es-toolkit`の[intersection](../../array/intersection.md)を使用してください\n\nこの`intersection`関数は、`null`や`undefined`の処理、複数配列のサポート、重複除去プロセスにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[intersection](../../array/intersection.md)を使用してください。\n\n:::\n\n複数の配列の共通部分を求めます。\n\n```typescript\nconst result = intersection(...arrays);\n```\n\n## 使用法\n\n### `intersection(...arrays)`\n\n複数の配列で共通に存在する要素を見つけて新しい配列として返します。結果は重複が除去され、最初の配列の順序を維持します。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\n// 2つの配列の共通部分\nconst array1 = [1, 2, 3, 4];\nconst array2 = [2, 3, 5, 6];\nconst result = intersection(array1, array2);\n// resultは[2, 3]\n\n// 3つの配列の共通部分\nconst array3 = [3, 4, 7, 8];\nconst multiResult = intersection(array1, array2, array3);\n// multiResultは[3]\n\n// 文字列配列\nconst strings1 = ['a', 'b', 'c'];\nconst strings2 = ['b', 'c', 'd'];\nconst stringResult = intersection(strings1, strings2);\n// stringResultは['b', 'c']\n\n// 配列のようなオブジェクト\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 3, 2: 4, length: 3 };\nconst likeResult = intersection(arrayLike1, arrayLike2);\n// likeResultは[2, 3]\n```\n\n`null`または`undefined`配列は空の配列として扱われます。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 2, 3];\nconst result1 = intersection(array1, null);\n// result1は[]\n\nconst result2 = intersection(null, undefined);\n// result2は[]\n```\n\n重複した要素は結果から除去されます。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 1, 2, 3];\nconst array2 = [1, 2, 2, 4];\nconst result = intersection(array1, array2);\n// resultは[1, 2]（重複除去されます）\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 共通部分を求める配列です。配列のようなオブジェクトやnull/undefinedも許可されます。\n\n#### 戻り値\n\n(`T[]`): すべての配列で共通に存在する要素の新しい配列を返します。重複は除去され、最初の配列の順序に従います。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/intersectionBy.md",
    "content": "# intersectionBy (Lodash 互換性)\n\n::: warning `es-toolkit`の[intersectionBy](../../array/intersectionBy.md)を使用してください\n\nこの`intersectionBy`関数は、複雑な条件処理、複数配列のサポート、プロパティパスの解析などにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[intersectionBy](../../array/intersectionBy.md)を使用してください。\n\n:::\n\n与えられた条件関数を使用して複数の配列の共通部分を求めます。\n\n```typescript\nconst result = intersectionBy(...arrays, iteratee);\n```\n\n## 使用法\n\n### `intersectionBy(...arrays, iteratee)`\n\n複数の配列で、各要素を与えられた条件関数で変換した値を基準に共通部分を求めます。条件は関数、プロパティ名、部分オブジェクトなど、さまざまな形式で提供できます。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\n// 関数で共通部分を求める\nconst array1 = [2.1, 1.2];\nconst array2 = [2.3, 3.4];\nconst result = intersectionBy(array1, array2, Math.floor);\n// resultは[2.1]（Math.floor基準で2が共通）\n\n// プロパティで共通部分を求める\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst byId = intersectionBy(users1, users2, 'id');\n// byIdは[{ id: 2, name: 'jane' }]\n\n// 3つの配列の共通部分\nconst array3 = [2.5, 4.1];\nconst multiResult = intersectionBy(array1, array2, array3, Math.floor);\n// multiResultは[2.1]\n\n// 配列のようなオブジェクト\nconst arrayLike1 = { 0: { x: 1 }, 1: { x: 2 }, length: 2 };\nconst arrayLike2 = { 0: { x: 2 }, 1: { x: 3 }, length: 2 };\nconst byProperty = intersectionBy(arrayLike1, arrayLike2, 'x');\n// byPropertyは[{ x: 2 }]\n```\n\n`null`または`undefined`配列は空の配列として扱われます。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst result = intersectionBy(array1, null, 'x');\n// resultは[]\n```\n\n部分オブジェクトやプロパティ-値ペアでも条件を指定できます。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst products1 = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'vegetable', name: 'carrot' },\n];\nconst products2 = [\n  { category: 'fruit', name: 'banana' },\n  { category: 'meat', name: 'beef' },\n];\n\n// 部分オブジェクトで条件を指定\nconst byCategory = intersectionBy(products1, products2, { category: 'fruit' });\n// プロパティ-値ペアで条件を指定\nconst byCategoryPair = intersectionBy(products1, products2, ['category', 'fruit']);\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 共通部分を求める配列です。\n- `iteratee` (`Function | PropertyKey | Array | Object`): 各要素を変換する条件です。関数、プロパティ名、プロパティ-値ペア、または部分オブジェクトを指定できます。\n\n#### 戻り値\n\n(`T[]`): 変換された値を基準にすべての配列で共通に存在する要素の新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/intersectionWith.md",
    "content": "# intersectionWith (Lodash 互換性)\n\n::: warning `es-toolkit`の[intersectionWith](../../array/intersectionWith.md)を使用してください\n\nこの`intersectionWith`関数は、`null`や`undefined`の処理、さまざまなオーバーロードのサポートなどにより、動作が遅くなります。\n\n代わりに、より高速でモダンな`es-toolkit`の[intersectionWith](../../array/intersectionWith.md)を使用してください。\n\n:::\n\nカスタム比較関数を使用して、すべての配列に含まれる共通要素の配列を作成します。\n\n```typescript\nconst result = intersectionWith(array, ...otherArrays, comparator);\n```\n\n## 使用法\n\n### `intersectionWith(array, ...otherArrays, comparator)`\n\nカスタム比較関数を使用して、最初の配列と残りの配列の共通部分を求めます。比較関数で各要素が等しいかを判断し、すべての配列に含まれる要素のみを返します。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nconst objects = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst others = [\n  { id: 1, name: 'john' },\n  { id: 3, name: 'joe' },\n];\n\nintersectionWith(objects, others, (a, b) => a.id === b.id);\n// => [{ id: 1, name: 'john' }]\n\n// 複数の配列と比較することもできます\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst array2 = [{ x: 1 }, { x: 3 }];\nconst array3 = [{ x: 1 }, { x: 4 }];\n\nintersectionWith(array1, array2, array3, (a, b) => a.x === b.x);\n// => [{ x: 1 }]\n```\n\n`null`または`undefined`は空の配列として扱われます。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nintersectionWith(null, [1, 2], (a, b) => a === b); // []\nintersectionWith([1, 2], undefined, (a, b) => a === b); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 比較する最初の配列です。\n- `...otherArrays` (`Array<ArrayLike<U> | ((a: T, b: T | U) => boolean)>`): 比較する他の配列と、最後の要素として比較関数です。\n- `comparator` (`(a: T, b: T | U) => boolean`): 2つの要素が等しいかを判断する関数です。\n\n#### 戻り値\n\n(`T[]`): すべての配列で共通に見つかった要素の新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/invokeMap.md",
    "content": "# invokeMap (Lodash 互換性)\n\n::: warning `Array.map` と `Object.values(...).map` を使用してください\n\nこの `invokeMap` 関数は、`null` や `undefined` の処理、メソッド検索などにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Array.map` と `Object.values(...).map` を使用してください。\n\n例えば、`invokeMap([1, 2, 3], 'toString')` は `[1, 2, 3].map(x => x.toString())` のように書けます。\n\n:::\n\n配列またはオブジェクトの各要素で指定されたメソッドを呼び出し、結果の配列を返します。\n\n```typescript\nconst result = invokeMap(collection, method, ...args);\n```\n\n## 使用法\n\n### `invokeMap(collection, method, ...args)`\n\n配列またはオブジェクトの各要素で指定されたメソッドを呼び出します。メソッド名を文字列として渡すか、関数を直接渡すことができます。追加の引数は各メソッド呼び出しに渡されます。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\n// 配列の各要素でメソッドを呼び出す\ninvokeMap(\n  [\n    [5, 1, 7],\n    [3, 2, 1],\n  ],\n  'sort'\n);\n// => [[5, 1, 7].sort(), [3, 2, 1].sort()]\n// => [[1, 5, 7], [1, 2, 3]]\n\n// 引数を使用してメソッドを呼び出す\ninvokeMap([123, 456], 'toString', 2);\n// => [(123).toString(2), (456).toString(2)]\n// => ['1111011', '111001000']\n\n// 関数を直接渡す\ninvokeMap(['a', 'b', 'c'], String.prototype.toUpperCase);\n// => [String.prototype.toUpperCase('a'), String.prototype.toUpperCase('b'), String.prototype.toUpperCase('c')]\n// => ['A', 'B', 'C']\n```\n\nオブジェクトの場合、各値でメソッドを呼び出します。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\nconst obj = { a: 1.1, b: 2.2, c: 3.3 };\ninvokeMap(obj, 'toFixed', 1);\n// => ['1.1', '2.2', '3.3']\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\ninvokeMap(null, 'toString'); // []\ninvokeMap(undefined, 'toString'); // []\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): メソッドを呼び出す配列またはオブジェクトです。\n- `method` (`string | ((...args: any[]) => R)`): 呼び出すメソッド名または関数です。\n- `...args` (`any[]`): 各メソッド呼び出しに渡す追加の引数です。\n\n#### 戻り値\n\n(`Array<R | undefined>`): 各メソッド呼び出しの結果を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/join.md",
    "content": "# join (Lodash 互換性)\n\n::: warning `Array.prototype.join()` を使用してください\n\nこの `join` 関数は、ArrayLike オブジェクトの処理、null/undefined の処理などにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Array.prototype.join()` を使用してください。\n\n:::\n\n配列の要素を文字列に結合します。\n\n```typescript\nconst result = join(array, separator);\n```\n\n## 使用法\n\n### `join(array, separator?)`\n\n`join` を使用して、配列のすべての要素を1つの文字列に結合します。各要素の間にセパレータを挿入して連結します。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\n// 文字列配列を結合\nconst arr = ['a', 'b', 'c'];\njoin(arr, '~'); // => \"a~b~c\"\n\n// 数値配列を結合\nconst numbers = [1, 2, 3];\njoin(numbers, '-'); // => \"1-2-3\"\n```\n\nセパレータを省略すると、デフォルトでカンマ（`,`）が使用されます。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(['a', 'b', 'c']); // => \"a,b,c\"\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(null, '-'); // => \"\"\njoin(undefined, '-'); // => \"\"\n```\n\n#### パラメータ\n\n- `array` (`T[]`) - 結合する配列です。\n\n::: info `array` は `ArrayLike<T>` であるか、`null` または `undefined` である可能性があります\n\nlodash と完全に互換性があるように、`join` 関数は `array` を次のように処理します。\n\n- `array` が `ArrayLike<T>` の場合、`Array.from(...)` を使用して配列に変換します。\n- `array` が `null` または `undefined` の場合、空の配列と見なされます。\n\n:::\n\n- `separator` (`string`, オプション) - 要素を結合するために使用するセパレータです。デフォルト値は `,` です。\n\n#### 戻り値\n\n(`string`): 指定されたセパレータで結合された配列のすべての要素を含む文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/keyBy.md",
    "content": "# keyBy (Lodash 互換性)\n\n::: warning `es-toolkit` の [keyBy](../../array/keyBy.md) を使用してください\n\nこの `keyBy` 関数は、`null` や `undefined` の処理、さまざまなパラメータ型の処理などにより動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [keyBy](../../array/keyBy.md) を使用してください。\n\n:::\n\nコレクションの要素を指定されたキーに基づいてオブジェクトに構成します。\n\n```typescript\nconst result = keyBy(collection, iteratee);\n```\n\n## 使用法\n\n### `keyBy(collection, iteratee)`\n\n配列またはオブジェクトの各要素を、指定されたキー生成関数またはプロパティ名を使用してオブジェクトに構成します。同じキーを持つ要素が複数ある場合は、最後の要素が使用されます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\n// プロパティ名でキーを生成する\nconst array = [\n  { dir: 'left', code: 97 },\n  { dir: 'right', code: 100 },\n];\n\nkeyBy(array, 'dir');\n// => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } }\n\n// 関数でキーを生成する\nkeyBy(array, o => String.fromCharCode(o.code));\n// => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n\n// オブジェクトでも使用可能\nconst obj = {\n  a: { id: 1, name: 'john' },\n  b: { id: 2, name: 'jane' },\n};\nkeyBy(obj, 'name');\n// => { john: { id: 1, name: 'john' }, jane: { id: 2, name: 'jane' } }\n```\n\n`null` または `undefined` は空のオブジェクトとして扱われます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\nkeyBy(null, 'id'); // {}\nkeyBy(undefined, 'id'); // {}\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | null | undefined`): キーで構成する配列またはオブジェクトです。\n- `iteratee` (`ValueIterateeCustom<T, PropertyKey>`, オプション): キーを生成する関数またはプロパティ名です。省略すると、要素自体がキーとして使用されます。\n\n#### 戻り値\n\n(`Record<string, T>`): 各要素が生成されたキーにマッピングされた新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/last.md",
    "content": "# last (Lodash互換性)\n\n::: warning `es-toolkit`の[last](../../array/last.md)を使用してください\n\nこの`last`関数は`null`や`undefined`の処理により複雑に動作します。\n\n代わりに、より高速でモダンな`es-toolkit`の[last](../../array/last.md)を使用してください。\n\n:::\n\n配列の最後の要素を返します。\n\n```typescript\nconst lastElement = last(array);\n```\n\n## 使用法\n\n### `last(array)`\n\n配列の最後の要素を取得したいときに`last`を使用してください。配列が空の場合は`undefined`を返します。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 数値配列の最後の要素\nlast([1, 2, 3, 4, 5]);\n// Returns: 5\n\n// 文字列配列の最後の要素\nlast(['a', 'b', 'c']);\n// Returns: 'c'\n\n// オブジェクト配列の最後の要素\nconst users = [{ name: 'Alice' }, { name: 'Bob' }];\nlast(users);\n// Returns: { name: 'Bob' }\n```\n\n空の配列や`null`、`undefined`は`undefined`を返します。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 空の配列\nlast([]);\n// Returns: undefined\n\n// null配列\nlast(null);\n// Returns: undefined\n\n// undefined配列\nlast(undefined);\n// Returns: undefined\n```\n\n配列風オブジェクトもサポートしています。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 配列風オブジェクト\nconst arrayLike = { 0: 'first', 1: 'second', length: 2 };\nlast(arrayLike);\n// Returns: 'second'\n\n// 文字列も配列風オブジェクト\nlast('hello');\n// Returns: 'o'\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 最後の要素を取得する配列です。\n\n#### 戻り値\n\n(`T | undefined`): 配列の最後の要素を返し、配列が空または`null`、`undefined`の場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/lastIndexOf.md",
    "content": "# lastIndexOf (Lodash互換性)\n\n::: warning `Array.lastIndexOf`を使用してください\n\nこの`lastIndexOf`関数は`null`や`undefined`の処理、`NaN`値の検索などにより遅く動作します。\n\n代わりに、より高速でモダンな`Array.lastIndexOf`を使用してください。\n\n:::\n\n配列で指定された要素が最後に現れるインデックスを見つけます。\n\n```typescript\nconst index = lastIndexOf(array, searchElement, fromIndex);\n```\n\n## 使用法\n\n### `lastIndexOf(array, searchElement, fromIndex)`\n\n配列で指定された要素が最後に現れるインデックスを返します。ネイティブの`Array.lastIndexOf`と似ていますが、`NaN`値も見つけることができます。\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\n// 一般的な使用\nlastIndexOf([1, 2, 1, 2], 2);\n// => 3\n\n// 開始インデックスの指定\nlastIndexOf([1, 2, 1, 2], 2, 2);\n// => 1\n\n// NaN値を見つける（ネイティブのlastIndexOfはNaNを見つけられません）\nlastIndexOf([1, 2, NaN, 4, NaN], NaN);\n// => 4\n\n// 負のインデックスを使用\nlastIndexOf([1, 2, 3, 4], 3, -2);\n// => 2\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\nlastIndexOf(null, 1); // -1\nlastIndexOf(undefined, 1); // -1\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 検索する配列です。\n- `searchElement` (`T`): 見つける要素です。\n- `fromIndex` (`true | number`, オプション): 検索を開始するインデックスです。`true`を渡すと配列の最後から検索します。デフォルト値は`array.length - 1`です。\n\n#### 戻り値\n\n(`number`): 最後に一致する要素のインデックスを返します。見つからない場合は`-1`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/map.md",
    "content": "# map (Lodash互換性)\n\n::: warning `Array.prototype.map`を使用してください\n\nこの`map`関数は`null`や`undefined`の処理、オブジェクトの反復処理、プロパティ抽出などの追加機能により遅く動作します。配列を変換する場合、JavaScriptの組み込み`Array.prototype.map`メソッドの方が高速でシンプルです。\n\n代わりに、より高速でモダンな`Array.prototype.map`を使用してください。\n\n:::\n\n配列またはオブジェクトの各要素を変換して新しい配列を作成します。\n\n```typescript\nconst mapped = map(collection, iteratee);\n```\n\n## 使用法\n\n### `map(collection, iteratee)`\n\n配列、オブジェクト、または配列風オブジェクトの各要素を変換したいときに`map`を使用してください。各要素に対して反復関数を実行し、結果を新しい配列として返します。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\n// 配列の各要素を2倍にする\nmap([1, 2, 3], x => x * 2);\n// Returns: [2, 4, 6]\n\n// オブジェクトの値を変換する\nconst obj = { a: 1, b: 2 };\nmap(obj, (value, key) => `${key}:${value}`);\n// Returns: ['a:1', 'b:2']\n\n// プロパティを抽出する\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, 'name');\n// Returns: ['John', 'Jane']\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nmap(null, x => x); // []\nmap(undefined, x => x); // []\n```\n\n文字列でプロパティパスを指定すると、ネストされたプロパティも抽出できます。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [{ info: { name: 'John' } }, { info: { name: 'Jane' } }];\nmap(users, 'info.name');\n// Returns: ['John', 'Jane']\n```\n\nオブジェクトを渡すと、各要素がそのオブジェクトと一致するかを確認します。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, { age: 30 });\n// Returns: [true, false]\n```\n\n#### パラメータ\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 反復処理する配列またはオブジェクトです。\n- `iteratee` (`function | string | object`, オプション): 各要素に対して実行する関数、プロパティパス、または一致させるオブジェクトです。提供しない場合、各要素をそのまま返します。\n  - 関数の場合、`(value, key, collection)`の形式で呼び出されます。\n  - 文字列の場合、そのプロパティを抽出します。\n  - オブジェクトの場合、各要素がオブジェクトと一致するかを確認します。\n\n#### 戻り値\n\n(`U[]`): 変換された値の新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/nth.md",
    "content": "# nth (Lodash 互換性)\n\n::: warning 配列インデックスアクセスを使用してください\n\nこの `nth` 関数は、`null` や `undefined` の処理、整数変換などにより動作が遅くなります。\n\n代わりに、より高速で現代的な配列インデックスアクセス (`array[index]` または `array.at(index)`) を使用してください。\n\n:::\n\n配列の指定されたインデックスにある要素を取得します。\n\n```typescript\nconst element = nth(array, index);\n```\n\n## 使用法\n\n### `nth(array, index)`\n\n配列の指定されたインデックスにある要素を返します。負のインデックスを使用すると、配列の末尾から計算します。インデックスが範囲外の場合は `undefined` を返します。\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 正のインデックス\nnth(array, 1);\n// => 2\n\n// 負のインデックス (末尾から)\nnth(array, -1);\n// => 5\n\nnth(array, -2);\n// => 4\n\n// 範囲外のインデックス\nnth(array, 10);\n// => undefined\n\nnth(array, -10);\n// => undefined\n```\n\n`null` または `undefined` は `undefined` として扱われます。\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nnth(null, 0); // undefined\nnth(undefined, 0); // undefined\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を取得する配列です。\n- `index` (`number`, オプション): 取得する要素のインデックスです。負の場合は末尾から計算します。デフォルトは `0` です。\n\n#### 戻り値\n\n(`T | undefined`): 指定されたインデックスの要素を返します。インデックスが範囲外の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/orderBy.md",
    "content": "# orderBy (Lodash 互換性)\n\n::: warning `es-toolkit` の [orderBy](../../array/orderBy.md) を使用してください\n\nこの `orderBy` 関数は、`null` や `undefined` の処理、複雑なパス探索、様々なソート条件の処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [orderBy](../../array/orderBy.md) を使用してください。\n\n:::\n\n複数の条件でコレクションの要素をソートします。\n\n```typescript\nconst result = orderBy(collection, criteria, orders);\n```\n\n## 使用法\n\n### `orderBy(collection, criteria, orders)`\n\n指定された条件とソート順に従って、配列またはオブジェクトの要素をソートします。複数の条件を使用でき、各条件に対して昇順 (`'asc'`) または降順 (`'desc'`) のソートを指定できます。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'fred', age: 48 },\n  { name: 'barney', age: 34 },\n  { name: 'fred', age: 40 },\n  { name: 'barney', age: 36 },\n];\n\n// 名前昇順、年齢降順でソート\norderBy(users, ['name', 'age'], ['asc', 'desc']);\n// => [\n//   { name: 'barney', age: 36 },\n//   { name: 'barney', age: 34 },\n//   { name: 'fred', age: 48 },\n//   { name: 'fred', age: 40 }\n// ]\n\n// 関数でソート条件を指定\norderBy(users, [user => user.name, user => user.age], ['asc', 'desc']);\n// => 上記と同じ結果\n\n// 単一の条件でソート\norderBy(users, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'fred', age: 40 }, ...]\n```\n\nオブジェクトの場合、値をソートします。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { name: 'fred', age: 48 },\n  b: { name: 'barney', age: 34 },\n};\n\norderBy(obj, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'barney', age: 34 }]\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\norderBy(null, 'name'); // []\norderBy(undefined, 'age'); // []\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): ソートする配列またはオブジェクトです。\n- `criteria` (`Criterion<T> | Array<Criterion<T>>`, オプション): ソート条件です。プロパティ名、プロパティパス、関数などを使用できます。デフォルトは `[null]` です。\n- `orders` (`unknown | unknown[]`, オプション): 各条件のソート順です。`'asc'`(昇順)、`'desc'`(降順)、`true`(昇順)、`false`(降順)を使用できます。デフォルトは `[]` です。\n\n#### 戻り値\n\n(`T[]`): 新しくソートされた配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/partition.md",
    "content": "# partition (Lodash 互換性)\n\n::: warning `es-toolkit` の [partition](../../array/partition.md) を使用してください\n\nこの `partition` 関数は、`null` や `undefined` の処理、様々な条件タイプにより動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [partition](../../array/partition.md) を使用してください。\n\n:::\n\n条件に基づいてコレクションの要素を2つのグループに分けます。\n\n```typescript\nconst [truthy, falsy] = partition(collection, predicate);\n```\n\n## 使用法\n\n### `partition(collection, predicate)`\n\n与えられた条件関数に基づいて、配列またはオブジェクトの要素を2つのグループに分けます。最初のグループには条件が真である要素が含まれ、2番目のグループには条件が偽である要素が含まれます。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\n// 数値配列を偶数と奇数に分ける\npartition([1, 2, 3, 4, 5, 6], n => n % 2 === 0);\n// => [[2, 4, 6], [1, 3, 5]]\n\n// プロパティ名で条件を指定\nconst users = [\n  { name: 'john', active: true },\n  { name: 'jane', active: false },\n  { name: 'bob', active: true },\n];\n\npartition(users, 'active');\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// オブジェクト条件でフィルタリング\npartition(users, { active: true });\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// 配列条件でフィルタリング\npartition(users, ['name', 'john']);\n// => [\n//   [{ name: 'john', active: true }],\n//   [{ name: 'jane', active: false }, { name: 'bob', active: true }]\n// ]\n```\n\nオブジェクトの場合、値を分割します。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { score: 90 },\n  b: { score: 40 },\n  c: { score: 80 },\n};\n\npartition(obj, item => item.score >= 80);\n// => [[{ score: 90 }, { score: 80 }], [{ score: 40 }]]\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\npartition(null, x => x > 0); // [[], []]\npartition(undefined, 'active'); // [[], []]\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): 分割する配列またはオブジェクトです。\n- `predicate` (`((value: T) => unknown) | Partial<T> | [PropertyKey, any] | PropertyKey`, オプション): 各要素をテストする条件です。関数、部分オブジェクト、プロパティ-値配列、またはプロパティ名を使用できます。デフォルトは `identity` です。\n\n#### 戻り値\n\n(`[T[], T[]]`): 条件を満たす要素の配列と満たさない要素の配列を含む配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/pull.md",
    "content": "# pull (Lodash 互換性)\n\n::: warning `es-toolkit` の [pull](../../array/pull.md) を使用してください\n\nこの `pull` 関数は Lodash 互換性のための関数であり、より複雑な型処理とオーバーロードにより動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [pull](../../array/pull.md) を使用してください。\n\n:::\n\n配列から指定された値をすべて削除します。\n\n```typescript\nconst result = pull(array, ...valuesToRemove);\n```\n\n## 使用法\n\n### `pull(array, ...valuesToRemove)`\n\n配列から指定された値をすべて削除し、元の配列を変更します。配列をコピーせずに元の配列を直接変更することでメモリを節約できます。\n\n```typescript\nimport { pull } from 'es-toolkit/compat';\n\n// 数値配列から特定の値を削除\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npull(numbers, 2, 3);\nconsole.log(numbers); // [1, 4, 5]\n\n// 文字列配列から特定の値を削除\nconst fruits = ['apple', 'banana', 'apple', 'cherry'];\npull(fruits, 'apple');\nconsole.log(fruits); // ['banana', 'cherry']\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 変更する配列です。\n- `...valuesToRemove` (`T[]`): 配列から削除する値です。\n\n#### 戻り値\n\n(`T[]`): 変更された元の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/pullAll.md",
    "content": "# pullAll (Lodash 互換性)\n\n指定された値を含む配列のすべての値を配列から削除します。\n\n```typescript\nconst result = pullAll(array, valuesToRemove);\n```\n\n## 使用法\n\n### `pullAll(array, valuesToRemove)`\n\n`valuesToRemove` 配列に含まれるすべての値を配列から削除し、元の配列を変更します。`pull` 関数と似ていますが、削除する値を配列として受け取ります。\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\n// 数値配列から特定の値を削除\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npullAll(numbers, [2, 3]);\nconsole.log(numbers); // [1, 4, 5]\n\n// 文字列配列から特定の値を削除\nconst fruits = ['apple', 'banana', 'apple', 'cherry', 'banana'];\npullAll(fruits, ['apple', 'banana']);\nconsole.log(fruits); // ['cherry']\n```\n\n空の配列、`null`、または `undefined` を渡すと、何も削除されません。\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3];\npullAll(numbers, []);\nconsole.log(numbers); // [1, 2, 3]\n\npullAll(numbers, null);\nconsole.log(numbers); // [1, 2, 3]\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 変更する配列です。\n- `valuesToRemove` (`ArrayLike<T>`, オプション): 配列から削除する値を含む配列です。デフォルトは `[]` です。\n\n#### 戻り値\n\n(`T[]`): 変更された元の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/pullAllBy.md",
    "content": "# pullAllBy (Lodash 互換性)\n\niterateeで変換された値を基準に指定された値を配列から削除します。\n\n```typescript\nconst modified = pullAllBy(array, valuesToRemove, iteratee);\n```\n\n## 使用法\n\n### `pullAllBy(array, values, iteratee)`\n\n提供されたiteratee関数を通じて各要素を変換した値を基準に配列から指定された値を削除します。元の配列が変更され、変更された配列が返されます。\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\n// プロパティ値で比較して削除\nconst array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\npullAllBy(array, [{ x: 1 }, { x: 3 }], 'x');\nconsole.log(array); // [{ x: 2 }]\n\n// 関数で値を変換して比較\nconst numbers = [1, 2, 3, 4, 5];\npullAllBy(numbers, [2, 4], n => n % 2);\nconsole.log(numbers); // [1, 3, 5] (奇数のみ残る)\n```\n\n配列が空、`null`、または `undefined` の場合、元の配列をそのまま返します。\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\npullAllBy([], [1, 2], x => x); // []\npullAllBy(null as any, [1, 2], x => x); // null\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 変更する配列です。\n- `values` (`ArrayLike<T>`, オプション): 削除する値の配列です。\n- `iteratee` (`ValueIteratee<T>`, オプション): 各要素に適用するiteratee関数です。プロパティ名、部分オブジェクト、または関数を使用できます。\n\n#### 戻り値\n\n(`T[]`): 指定された値が削除された元の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/pullAllWith.md",
    "content": "# pullAllWith (Lodash 互換性)\n\n比較関数を使用して、指定された値を配列から削除します。\n\n```typescript\nconst modified = pullAllWith(array, valuesToRemove, comparator);\n```\n\n## 使用法\n\n### `pullAllWith(array, values, comparator)`\n\n提供された比較関数を使用して、配列から指定された値を削除します。元の配列が変更され、変更された配列が返されます。\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\n// オブジェクトの比較で削除\nconst array = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\npullAllWith(array, [{ x: 3, y: 4 }], (a, b) => a.x === b.x && a.y === b.y);\nconsole.log(array); // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n\n// 文字列の長さで比較して削除\nconst words = ['hello', 'world', 'test', 'code'];\npullAllWith(words, ['hi'], (a, b) => a.length === b.length);\nconsole.log(words); // ['hello', 'world', 'code'] ('test'が'hi'と同じ長さのため削除される)\n```\n\n配列が空または `null`、`undefined` の場合、元の配列がそのまま返されます。\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\npullAllWith([], [1], (a, b) => a === b); // []\npullAllWith(null as any, [1], (a, b) => a === b); // null\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 変更する配列です。\n- `values` (`ArrayLike<T>`, オプション): 削除する値の配列です。\n- `comparator` (`(a: T, b: T) => boolean`, オプション): 2つの要素を比較する関数です。2つの要素が等しいと判断される場合は `true` を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): 指定された値が削除された元の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/pullAt.md",
    "content": "# pullAt (Lodash 互換性)\n\n::: warning `es-toolkit` の [pullAt](../../array/pullAt.md) を使用してください\n\nこの `pullAt` 関数は、複雑な型処理とオーバーロードにより動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [pullAt](../../array/pullAt.md) を使用してください。\n\n:::\n\n指定されたインデックスにある要素を配列から削除し、削除された要素を返します。\n\n```typescript\nconst removed = pullAt(array, ...indexes);\n```\n\n## 使用法\n\n### `pullAt(array, ...indexes)`\n\n指定されたインデックスにある要素を配列から削除し、削除された要素の配列を返します。元の配列は変更されます。\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\n// 個別のインデックスで削除\nconst array = [1, 2, 3, 4, 5];\nconst removed = pullAt(array, 1, 3);\nconsole.log(array); // [1, 3, 5]\nconsole.log(removed); // [2, 4]\n\n// インデックスの配列で削除\nconst colors = ['red', 'green', 'blue', 'yellow'];\nconst removedColors = pullAt(colors, [0, 2]);\nconsole.log(colors); // ['green', 'yellow']\nconsole.log(removedColors); // ['red', 'blue']\n```\n\n存在しないインデックスは `undefined` として扱われます。\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\nconst numbers = [10, 20, 30];\nconst removed = pullAt(numbers, 1, 5);\nconsole.log(numbers); // [10, 30]\nconsole.log(removed); // [20, undefined]\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T>`): 変更する配列です。\n- `...indexes` (`Array<number | number[]>`): 削除する要素のインデックスです。個別の数値または数値の配列として渡すことができます。\n\n#### 戻り値\n\n(`ArrayLike<T>`): 削除された要素の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/reduce.md",
    "content": "# reduce (Lodash 互換性)\n\n::: warning `Array.prototype.reduce`または`Object.values`と`reduce`を使用してください\n\nこの`reduce`関数は、複雑な型処理と様々な入力形式のサポートにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`Array.prototype.reduce`メソッド、またはオブジェクトの場合は`Object.values`と一緒に使用してください。\n\n:::\n\n配列またはオブジェクトを1つの値に縮小します。\n\n```typescript\nconst result = reduce(collection, iteratee, initialValue);\n```\n\n## 使用法\n\n### `reduce(collection, iteratee, initialValue)`\n\n配列またはオブジェクトのすべての要素を1つずつ反復処理しながら累積値を計算します。初期値を提供するとその値から始まり、そうでない場合は最初の要素から始まります。\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\n// 配列の合計を計算\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value, 0);\nconsole.log(sum); // 10\n\n// オブジェクト値の合計を計算\nconst scores = { math: 95, english: 87, science: 92 };\nconst totalScore = reduce(scores, (acc, value) => acc + value, 0);\nconsole.log(totalScore); // 274\n```\n\n初期値を提供しない場合、最初の要素が初期値となり、2番目の要素から反復処理を開始します。\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (1 + 2 + 3 + 4)\n\n// 空の配列はundefinedを返します\nconst empty = [];\nconst result = reduce(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### パラメータ\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 反復処理する配列またはオブジェクトです。\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 各要素に対して呼び出す関数です。累積値、現在の値、インデックス/キー、元の配列/オブジェクトを受け取ります。\n- `initialValue` (`any`, オプション): 累積値の初期値です。提供しない場合、最初の要素が初期値になります。\n\n#### 戻り値\n\n(`any`): すべての要素を処理した後の最終累積値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/reduceRight.md",
    "content": "# reduceRight (Lodash 互換性)\n\n::: warning `Array.prototype.reduceRight`または`Object.values`と`reduceRight`を使用してください\n\nこの`reduceRight`関数は、複雑な型処理と様々な入力形式のサポートにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`Array.prototype.reduceRight`メソッド、またはオブジェクトの場合は`Object.values`と`reduceRight`を一緒に使用してください。\n\n:::\n\n配列またはオブジェクトを右から左へ反復処理して1つの値に縮小します。\n\n```typescript\nconst result = reduceRight(collection, iteratee, initialValue);\n```\n\n## 使用法\n\n### `reduceRight(collection, iteratee, initialValue)`\n\n配列またはオブジェクトのすべての要素を右から左へ反復処理しながら累積値を計算します。初期値を提供するとその値から始まり、そうでない場合は最後の要素から始まります。\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\n// 配列を文字列に結合(右から)\nconst letters = ['a', 'b', 'c', 'd'];\nconst result = reduceRight(letters, (acc, value) => acc + value, '');\nconsole.log(result); // 'dcba'\n\n// オブジェクト値の乗算(キー順序の逆)\nconst numbers = { x: 2, y: 3, z: 4 };\nconst product = reduceRight(numbers, (acc, value) => acc * value, 1);\nconsole.log(product); // 24 (1 * 4 * 3 * 2)\n```\n\n初期値を提供しない場合、最後の要素が初期値となり、後ろから2番目の要素から反復処理を開始します。\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduceRight(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (4 + 3 + 2 + 1)\n\n// 空の配列はundefinedを返します\nconst empty = [];\nconst result = reduceRight(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### パラメータ\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 反復処理する配列またはオブジェクトです。\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 各要素に対して呼び出す関数です。累積値、現在の値、インデックス/キー、元の配列/オブジェクトを受け取ります。\n- `initialValue` (`any`, オプション): 累積値の初期値です。提供しない場合、最後の要素が初期値になります。\n\n#### 戻り値\n\n(`any`): すべての要素を処理した後の最終累積値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/reject.md",
    "content": "# reject (Lodash 互換性)\n\n::: warning `Array.filter()`を使用してください\n\nこの`reject`関数は、Lodashとの互換性のために様々な形式のpredicateをサポートするため、複雑に実装されています。シンプルな関数predicateを使用する場合は、`Array.filter()`の方がよりシンプルで高速に動作します。\n\n代わりに、より高速で現代的な`Array.filter()`を使用してください。例えば、`reject(arr, func)`は`arr.filter(item => !func(item))`に置き換えることができます。\n\n:::\n\nコレクションを走査し、条件関数に一致しない要素を新しい配列として返します。\n\n```typescript\nconst filtered = reject(collection, predicate);\n```\n\n## 使用法\n\n### `reject(collection, predicate)`\n\n配列、オブジェクト、または文字列から、与えられた条件に一致しない要素のみを選んで新しい配列として返します。`filter`の反対の動作を実行します。\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 偶数でない数字をフィルタリングします\nreject([1, 2, 3, 4, 5], n => n % 2 === 0);\n// => [1, 3, 5]\n\n// 特定のプロパティを持たないオブジェクトをフィルタリングします\nreject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n// => [{ b: 1 }]\n\n// 特定のプロパティ値を持たないオブジェクトをフィルタリングします\nreject([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// => [{ a: 1 }, { a: 3 }]\n\n// 文字列から特定の文字でない文字をフィルタリングします\nreject('abc', char => char === 'b');\n// => ['a', 'c']\n```\n\nこの関数は様々な形式のpredicateをサポートしています。\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 関数を使用した条件\nreject(users, user => user.age < 18);\n\n// オブジェクトの部分マッチング\nreject(users, { active: false });\n\n// プロパティ-値配列\nreject(users, ['status', 'pending']);\n\n// プロパティ名でtruthy値を確認\nreject(users, 'premium');\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 走査するコレクションです。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, オプション): 各要素に対して実行する条件です。デフォルト値は`identity`です。\n\n#### 戻り値\n\n(`T[]`): predicate条件に一致しない要素で構成された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/remove.md",
    "content": "# remove (Lodash 互換性)\n\n::: warning `es-toolkit`の`remove`を使用してください\n\nこの`remove`関数は、Lodashとの互換性のために様々な形式の述語をサポートするため、複雑に実装されています。メインライブラリの`remove`関数はシンプルな関数述語のみをサポートするため、より高速に動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[remove](../../array/remove.md)を使用してください。\n\n:::\n\n配列から条件に一致する要素を削除し、削除された要素を配列として返します。\n\n```typescript\nconst removedElements = remove(array, predicate);\n```\n\n## 使用法\n\n### `remove(array, predicate)`\n\n配列を反復処理し、与えられた条件に一致する要素を元の配列から削除し、削除された要素を新しい配列として返します。元の配列が直接変更されることに注意してください。\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 関数を使用した条件で削除\nconst numbers = [1, 2, 3, 4, 5];\nconst evens = remove(numbers, n => n % 2 === 0);\nconsole.log(numbers); // => [1, 3, 5]\nconsole.log(evens); // => [2, 4]\n\n// 部分オブジェクトのマッチングで削除\nconst objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\nconst removed = remove(objects, { a: 1 });\nconsole.log(objects); // => [{ a: 2 }, { a: 3 }]\nconsole.log(removed); // => [{ a: 1 }]\n\n// プロパティ-値ペアで削除\nconst items = [{ name: 'apple' }, { name: 'banana' }, { name: 'cherry' }];\nconst cherries = remove(items, ['name', 'cherry']);\nconsole.log(items); // => [{ name: 'apple' }, { name: 'banana' }]\nconsole.log(cherries); // => [{ name: 'cherry' }]\n```\n\nこの関数は様々な形式の述語をサポートします。\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 関数を使用した条件\nremove(users, user => user.active === false);\n\n// 部分オブジェクトのマッチング\nremove(users, { status: 'inactive' });\n\n// プロパティ-値配列\nremove(users, ['type', 'guest']);\n\n// プロパティ名で真値を確認\nremove(users, 'isDeleted');\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T>`): 変更する配列です。\n- `predicate` (`((value: T, index: number, array: ArrayLike<T>) => boolean) | Partial<T> | [keyof T, unknown] | keyof T`, オプション): 各要素に対して実行する条件です。デフォルトは`identity`です。\n\n#### 戻り値\n\n(`T[]`): 条件に一致して削除された要素で構成された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/reverse.md",
    "content": "# reverse（Lodash 互換性）\n\n::: warning `Array.prototype.reverse()` を使用してください\n\nこの `reverse` 関数は、Lodash との互換性のために `null` や `undefined` の処理を含んでいます。単純な配列の逆順だけが必要な場合は、ネイティブ JavaScript の `Array.prototype.reverse()` メソッドがより直感的で高速に動作します。\n\nより高速でモダンな `Array.prototype.reverse()` を使用してください。\n\n:::\n\n配列の要素をその場で反転します。\n\n```typescript\nconst reversed = reverse(array);\n```\n\n## 使用法\n\n### `reverse(array)`\n\n配列の順序を逆にして、最初の要素が最後に、最後の要素が最初になるようにします。元の配列を直接変更し、変更された配列を返します。\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\n// 数値配列を反転\nconst numbers = [1, 2, 3, 4, 5];\nconst reversed = reverse(numbers);\nconsole.log(numbers); // => [5, 4, 3, 2, 1]\nconsole.log(reversed); // => [5, 4, 3, 2, 1]\n\n// 文字列配列を反転\nconst words = ['apple', 'banana', 'cherry'];\nreverse(words);\nconsole.log(words); // => ['cherry', 'banana', 'apple']\n\n// 空の配列や null/undefined はそのまま返される\nreverse([]); // => []\nreverse(null); // => null\nreverse(undefined); // => undefined\n```\n\nこの関数は元の配列を直接変更する点に注意が必要です。\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\nconst original = [1, 2, 3];\nconst result = reverse(original);\n\nconsole.log(original === result); // => true（同じ配列オブジェクト）\nconsole.log(original); // => [3, 2, 1]（元が変更される）\n```\n\n#### パラメータ\n\n- `array` (`T[] | null | undefined`): 反転する配列。`null` や `undefined` の場合はそのまま返します。\n\n#### 戻り値\n\n(`T[] | null | undefined`): 反転された配列を返します。入力が `null` や `undefined` の場合、その値をそのまま返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sample.md",
    "content": "# sample（Lodash 互換性）\n\n::: warning `es-toolkit` の [sample](../../array/sample.md) を使用してください\n\nこの `sample` 関数は、`null` や `undefined` の処理、オブジェクト値の処理などにより、遅く動作します。\n\nより高速でモダンな `es-toolkit` の [sample](../../array/sample.md) を使用してください。\n\n:::\n\n配列またはオブジェクトからランダムな要素を1つ取得します。\n\n```typescript\nconst randomItem = sample(collection);\n```\n\n## 使用法\n\n### `sample(collection)`\n\n配列またはオブジェクトからランダムな要素を1つ選択する場合は `sample` を使用します。配列ではランダムな要素を返し、オブジェクトではランダムな値を返します。\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\n// 配列からランダムな要素を取得\nsample([1, 2, 3, 4, 5]);\n// 1から5の中からランダムな数値を1つ返します\n\n// オブジェクトからランダムな値を取得\nsample({ a: 1, b: 2, c: 3 });\n// 1、2、3の中からランダムな値を1つ返します\n\n// 文字列も処理します\nsample('hello');\n// 'h'、'e'、'l'、'l'、'o'の中からランダムな文字を1つ返します\n```\n\n`null` や `undefined` は `undefined` を返します。\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\nsample(null); // undefined\nsample(undefined); // undefined\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): サンプリングする配列またはオブジェクト。\n\n#### 戻り値\n\n(`T | string | undefined`): 配列またはオブジェクトからランダムに選択された要素を返します。コレクションが空であるか `null`、`undefined` の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sampleSize.md",
    "content": "# sampleSize（Lodash 互換性）\n\n::: warning `es-toolkit` の [sampleSize](../../array/sampleSize.md) を使用してください\n\nこの `sampleSize` 関数は、`null` や `undefined` の処理、オブジェクトのサポート、デフォルト値の処理などにより、遅く動作します。\n\nより高速でモダンな `es-toolkit` の [sampleSize](../../array/sampleSize.md) を使用してください。\n\n:::\n\n配列またはオブジェクトから指定された数だけランダムに要素を選択します。\n\n```typescript\nconst sampled = sampleSize(collection, size);\n```\n\n## 使用法\n\n### `sampleSize(collection, size?)`\n\n配列またはオブジェクトからランダムに要素を選択する場合は `sampleSize` を使用します。Floyd アルゴリズムを使用して重複なく効率的にサンプリングします。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\n// 配列から3個の要素をランダムに選択します。\nsampleSize([1, 2, 3, 4, 5], 3);\n// 戻り値：[2, 4, 5]（実際の結果は異なる場合があります）\n\n// オブジェクトから2個の値をランダムに選択します。\nsampleSize({ a: 1, b: 2, c: 3, d: 4 }, 2);\n// 戻り値：[2, 4]（実際の結果は異なる場合があります）\n```\n\n`null` や `undefined` は空の配列として処理します。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\nsampleSize(null, 2);\n// 戻り値：[]\n\nsampleSize(undefined, 2);\n// 戻り値：[]\n```\n\n#### パラメータ\n\n- `collection` (`Record<string, T> | Record<number, T> | T | null | undefined`): サンプリングする配列またはオブジェクト。\n- `size` (`number`、オプション): 選択する要素の個数。デフォルトは `1` です。\n\n#### 戻り値\n\n(`T[]`)：ランダムに選択された要素で構成される新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/shuffle.md",
    "content": "# shuffle（Lodash 互換性）\n\n::: warning `es-toolkit` の `shuffle` を使用してください\n\nこの `shuffle` 関数は、Lodash との互換性のために追加の処理が含まれており、遅く動作します。\n\nより高速でモダンな `es-toolkit` の [shuffle](../../array/shuffle.md) を使用してください。\n\n:::\n\n配列またはオブジェクトの要素をランダムにシャッフルして新しい配列を返します。\n\n```typescript\nconst result = shuffle(collection);\n```\n\n## 使用法\n\n### `shuffle(collection)`\n\nFisher-Yates アルゴリズムを使用して配列またはオブジェクトの要素をランダムにシャッフルし、新しい配列を返します。元は変更されません。\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\n// 数値配列をシャッフル\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffled1 = shuffle(numbers);\n// 戻り値：例えば [3, 1, 5, 2, 4]（毎回異なる順序）\n\n// 文字列配列をシャッフル\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffled2 = shuffle(fruits);\n// 戻り値：例えば ['cherry', 'apple', 'date', 'banana']\n\n// オブジェクトの値をシャッフル\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst shuffled3 = shuffle(obj);\n// 戻り値：例えば [3, 1, 4, 2]（オブジェクトの値がランダムにシャッフルされる）\n```\n\n`null` や `undefined` は空の配列として処理します。\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\nshuffle(null);\n// 戻り値：[]\n\nshuffle(undefined);\n// 戻り値：[]\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): シャッフルする配列またはオブジェクト。\n\n#### 戻り値\n\n(`T[]`)：要素がランダムにシャッフルされた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/size.md",
    "content": "# size（Lodash 互換性）\n\n::: warning `.length` プロパティを使用してください\n\nこの `size` 関数は、`null`、`undefined` の処理と様々な型のサポートにより、複雑に動作します。\n\nより高速でモダンな `.length` プロパティまたは `Object.keys().length` を使用してください。\n\n:::\n\n配列、文字列、オブジェクトのサイズを返します。\n\n```typescript\nconst length = size(collection);\n```\n\n## 使用法\n\n### `size(collection)`\n\n配列、文字列、オブジェクト、Map、Set のサイズを確認する場合は `size` を使用します。様々な型のコレクションに対して一貫したサイズ情報を提供します。\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\n// 配列の要素数\nsize([1, 2, 3]);\n// 3を返します\n\n// 文字列の文字数\nsize('hello');\n// 5を返します\n\n// オブジェクトの列挙可能なプロパティ数\nsize({ a: 1, b: 2, c: 3 });\n// 3を返します\n\n// Map の要素数\nsize(\n  new Map([\n    ['a', 1],\n    ['b', 2],\n  ])\n);\n// 2を返します\n\n// Set の要素数\nsize(new Set([1, 2, 3]));\n// 3を返します\n```\n\n`null` や `undefined` は 0 を返します。\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\nsize(null); // 0\nsize(undefined); // 0\nsize({}); // 0\nsize([]); // 0\n```\n\n#### パラメータ\n\n- `collection` (`object | string | null | undefined`): サイズを確認する配列、文字列、オブジェクト、Map、Set。\n\n#### 戻り値\n\n(`number`)：コレクションのサイズを返します。`null` や `undefined` の場合は 0 を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/slice.md",
    "content": "# slice（Lodash 互換性）\n\n::: warning `Array.prototype.slice` を使用してください\n\nこの `slice` 関数は、`null` や `undefined` の処理とスパース配列の特別な処理により、遅く動作します。JavaScript のネイティブ `Array.prototype.slice` メソッドはより高速で標準化されています。\n\nより高速でモダンな `Array.prototype.slice` を使用してください。\n\n:::\n\n配列の一部を切り取って新しい配列を作成します。\n\n```typescript\nconst sliced = slice(array, start, end);\n```\n\n## 使用法\n\n### `slice(array, start, end)`\n\n配列の特定の部分だけが必要な場合は `slice` を使用します。開始位置から終了位置の直前までの要素を含む新しい配列を作成します。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\n// インデックス1から2まで切り取り\nslice([1, 2, 3, 4], 1, 3);\n// 戻り値：[2, 3]\n\n// 負のインデックスを使用\nslice([1, 2, 3, 4], -2);\n// 戻り値：[3, 4]\n\n// 開始位置のみ指定\nslice([1, 2, 3, 4], 2);\n// 戻り値：[3, 4]\n```\n\n`null` や `undefined` は空の配列として処理します。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice(null); // []\nslice(undefined); // []\n```\n\nスパース配列を処理する場合、空のスロットは `undefined` で埋められます。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nconst sparse = new Array(3);\nsparse[1] = 'b';\nslice(sparse);\n// 戻り値：[undefined, 'b', undefined]\n```\n\n負のインデックスを使用すると配列の末尾から計算します。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice([1, 2, 3, 4, 5], -3, -1);\n// 戻り値：[3, 4]\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 切り取る配列。\n- `start` (`number`、オプション): 開始位置。負の値は末尾から計算します。デフォルトは `0` です。\n- `end` (`number`、オプション): 終了位置（含まない）。負の値は末尾から計算します。デフォルトは配列の長さです。\n\n#### 戻り値\n\n(`T[]`)：`start` から `end` の直前までの要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/some.md",
    "content": "# some (Lodash 互換性)\n\n::: warning `Array.prototype.some()`メソッドを使用してください\n\nこの`some`関数は、さまざまな型の条件処理とオブジェクトのサポートにより、複雑に動作します。\n\n代わりに、より高速でモダンな`Array.prototype.some()`メソッドを使用してください。\n\n:::\n\n配列またはオブジェクトの要素のうち、与えられた条件を満たす要素が1つでもあるかを確認します。\n\n```typescript\nconst hasMatch = some(collection, predicate);\n```\n\n## 使用法\n\n### `some(collection, predicate)`\n\n配列またはオブジェクトで条件を満たす要素が1つでもあるかを確認する場合は`some`を使用してください。さまざまな形式の条件をサポートします。\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\n// 配列で条件関数を使用\nsome([1, 2, 3, 4], n => n % 2 === 0);\n// trueを返します（2と4が偶数）\n\n// 配列で部分オブジェクトでマッチング\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// trueを返します\n\n// 配列でプロパティ-値ペアでマッチング\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n// trueを返します\n\n// 配列でプロパティ名で真かを確認\nsome([{ a: 0 }, { a: 1 }, { a: 0 }], 'a');\n// trueを返します（aが1の要素があります）\n\n// オブジェクトで条件関数を使用\nsome({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n// trueを返します（2が偶数）\n```\n\n条件が提供されない場合、真と評価される値があるかを確認します。\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\nsome([0, 1, 2]); // true（1と2が真と評価されます）\nsome([false, null, undefined]); // false（すべての値が偽と評価されます）\nsome(null); // false（空の配列として扱われます）\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 確認する配列またはオブジェクトです。\n- `predicate` (選択): 条件を確認する関数、部分オブジェクト、プロパティ-値ペア、またはプロパティ名です。\n\n#### 戻り値\n\n(`boolean`): 条件を満たす要素が1つでもあれば`true`、なければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortBy.md",
    "content": "# sortBy (Lodash 互換性)\n\n::: warning `Array.prototype.sort` メソッドを使用してください\n\nこの `sortBy` 関数は、さまざまなタイプの条件処理とオブジェクトサポートにより複雑に動作します。\n\n代わりに、より速く現代的な `Array.prototype.sort` メソッドを使用してください。\n\n:::\n\n複数の基準に従って配列を昇順にソートします。\n\n```typescript\nconst sorted = sortBy(collection, ...iteratees);\n```\n\n## 使用法\n\n### `sortBy(collection, ...iteratees)`\n\n複数の基準を使用して配列またはオブジェクトを昇順にソートする場合は `sortBy` を使用してください。各要素に対してソート基準関数を実行し、その結果値を基準にソートします。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\n// ユーザーを名前でソートします。\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\nsortBy(users, ['user']);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n\n// 関数を使用してソートします。\nsortBy(users, [\n  function (o) {\n    return o.user;\n  },\n]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n```\n\n複数の基準を同時に使用することもできます。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\n// 名前で最初にソートし、次に年齢でソートします。\nsortBy(users, ['user', item => item.age]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 40 },\n//   { user: 'fred', age: 48 },\n// ]\n```\n\n`null` や `undefined` は空の配列として処理されます。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nsortBy(null, ['key']); // []\nsortBy(undefined, ['key']); // []\n```\n\n#### パラメータ\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): ソートする配列またはオブジェクトです。\n- `...iteratees` (`Array<Many<ListIteratee<T> | ObjectIteratee<T>>>`): ソート基準を決定する関数またはプロパティ名です。\n\n#### 戻り値\n\n(`T[]`): 昇順にソートされた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedIndex.md",
    "content": "# sortedIndex (Lodash 互換性)\n\n::: warning バイナリ検索を直接実装してください\n\nこの `sortedIndex` 関数は、`null`、`undefined` の処理とさまざまな型のサポートにより複雑に動作します。\n\n代わりに、より高速で現代的なバイナリ検索を直接実装するか、専用のライブラリを使用してください。\n\n:::\n\nソートされた配列に値を挿入すべき最も低いインデックスを見つけます。\n\n```typescript\nconst index = sortedIndex(array, value);\n```\n\n## 使用法\n\n### `sortedIndex(array, value)`\n\nソートされた配列に値を挿入する位置を見つけるときに `sortedIndex` を使用してください。バイナリ検索を使用して高速に位置を見つけます。\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\n// 数値配列で挿入位置を見つける\nsortedIndex([30, 50], 40);\n// 1を返します（40は30と50の間に位置します）\n\n// 文字列配列で挿入位置を見つける\nsortedIndex(['a', 'c'], 'b');\n// 1を返します（'b'は'a'と'c'の間に位置します）\n\n// 同じ値が存在する場合、最初の位置を返します\nsortedIndex([1, 2, 2, 3], 2);\n// 1を返します（最初の2の位置）\n```\n\n`null` または `undefined` 配列は0を返します。\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\nsortedIndex(null, 1); // 0\nsortedIndex(undefined, 1); // 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 挿入する値です。\n\n#### 戻り値\n\n(`number`): 値を挿入すべき最も低いインデックスを返します。配列が `null` または `undefined` の場合は0を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedIndexBy.md",
    "content": "# sortedIndexBy (Lodash 互換性)\n\n::: warning バイナリ検索と変換関数を直接実装してください\n\nこの `sortedIndexBy` 関数は、複雑なiteratee処理と型変換により遅く動作します。\n\n代わりに、より高速で現代的なバイナリ検索と変換関数を直接実装してください。\n\n:::\n\nソートされた配列に変換関数を適用した後、値を挿入すべき最も低いインデックスを見つけます。\n\n```typescript\nconst index = sortedIndexBy(array, value, iteratee);\n```\n\n## 使用法\n\n### `sortedIndexBy(array, value, iteratee)`\n\nソートされた配列に変換関数を適用した後、値の挿入位置を見つけるときに `sortedIndexBy` を使用してください。各要素と探す値に変換関数を適用して比較します。\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\n// プロパティでソートされたオブジェクト配列で挿入位置を見つける\nconst objects = [{ x: 4 }, { x: 5 }];\nsortedIndexBy(objects, { x: 4 }, 'x');\n// 0を返します\n\n// 関数を使用して変換\nconst numbers = [10, 20, 30];\nsortedIndexBy(numbers, 25, n => n);\n// 2を返します\n\n// プロパティ-値配列で変換\nconst users = [{ name: 'alice' }, { name: 'bob' }];\nsortedIndexBy(users, { name: 'bob' }, ['name', 'bob']);\n// 1を返します (これは [false, true] に true を挿入するのと同等です)\n```\n\n`null` または `undefined` 配列は0を返します。\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\nsortedIndexBy(null, { x: 1 }, 'x'); // 0\nsortedIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 挿入する値です。\n- `iteratee` (オプション): 各要素と値に適用する変換関数、プロパティ名、またはプロパティ-値配列です。\n\n#### 戻り値\n\n(`number`): 値を挿入すべき最も低いインデックスを返します。配列が `null` または `undefined` の場合は0を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedIndexOf.md",
    "content": "# sortedIndexOf (Lodash 互換性)\n\n::: warning バイナリ検索を直接実装してください\n\nこの `sortedIndexOf` 関数は、複雑なバイナリ検索処理と型検証により遅く動作します。\n\n代わりに、より高速で現代的なバイナリ検索を直接実装するか、`Array.prototype.indexOf()` を使用してください。\n\n:::\n\nソートされた配列で値が最初に現れるインデックスを見つけます。\n\n```typescript\nconst index = sortedIndexOf(array, value);\n```\n\n## 使用法\n\n### `sortedIndexOf(array, value)`\n\nソートされた配列で特定の値が最初に現れるインデックスを見つけるときに `sortedIndexOf` を使用してください。バイナリ検索を使用して高速に値を見つけます。\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\n// 数値配列で値を見つける\nsortedIndexOf([11, 22, 33, 44, 55], 33);\n// 2を返します\n\n// 値が存在しない場合\nsortedIndexOf([11, 22, 33, 44, 55], 30);\n// -1を返します\n\n// 重複した値がある場合、最初のインデックスを返します\nsortedIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 3を返します（最初の3の位置）\n\n// 0と-0は同じように扱われます\nsortedIndexOf([-0, 0], 0);\n// 0を返します\n```\n\n空の配列、`null`、または `undefined` は-1を返します。\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\nsortedIndexOf([], 1); // -1\nsortedIndexOf(null, 1); // -1\nsortedIndexOf(undefined, 1); // -1\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 探す値です。\n\n#### 戻り値\n\n(`number`): 値が最初に現れるインデックスを返します。値が存在しない場合は-1を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedLastIndex.md",
    "content": "# sortedLastIndex (Lodash 互換性)\n\n::: warning バイナリ検索を直接実装してください\n\nこの `sortedLastIndex` 関数は、複雑なバイナリ検索処理と型検証により遅く動作します。\n\n代わりに、より高速で現代的なバイナリ検索を直接実装してください。\n\n:::\n\nソートされた配列に値を挿入すべき最も高いインデックスを見つけます。\n\n```typescript\nconst index = sortedLastIndex(array, value);\n```\n\n## 使用法\n\n### `sortedLastIndex(array, value)`\n\nソートされた配列に値を挿入する最も高い位置を見つけるときに `sortedLastIndex` を使用してください。重複した値がある場合、最後の位置の後のインデックスを返します。\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\n// 重複した値がある配列で最後の挿入位置を見つける\nsortedLastIndex([4, 5, 5, 5, 6], 5);\n// 4を返します（最後の5の後の位置）\n\n// 新しい値の挿入位置を見つける\nsortedLastIndex([10, 20, 30], 25);\n// 2を返します（25は30の前に位置します）\n\n// 値が存在しない場合\nsortedLastIndex([1, 2, 3], 0);\n// 0を返します（最前面に位置します）\n```\n\n`null` または `undefined` 配列は0を返します。\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\nsortedLastIndex(null, 1); // 0\nsortedLastIndex(undefined, 1); // 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 挿入する値です。\n\n#### 戻り値\n\n(`number`): 値を挿入すべき最も高いインデックスを返します。配列が `null` または `undefined` の場合は0を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedLastIndexBy.md",
    "content": "# sortedLastIndexBy (Lodash 互換性)\n\n::: warning バイナリ検索と変換関数を直接実装してください\n\nこの `sortedLastIndexBy` 関数は、複雑なiteratee処理と型変換により遅く動作します。\n\n代わりに、より高速で現代的なバイナリ検索と変換関数を直接実装してください。\n\n:::\n\nソートされた配列に変換関数を適用した後、値を挿入すべき最も高いインデックスを見つけます。\n\n```typescript\nconst index = sortedLastIndexBy(array, value, iteratee);\n```\n\n## 使用法\n\n### `sortedLastIndexBy(array, value, iteratee)`\n\nソートされた配列に変換関数を適用した後、値の最も高い挿入位置を見つけるときに `sortedLastIndexBy` を使用してください。重複した値がある場合、最後の値の後のインデックスを返します。\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\n// プロパティでソートされたオブジェクト配列で最後の挿入位置を見つける\nconst objects = [{ x: 4 }, { x: 5 }, { x: 5 }];\nsortedLastIndexBy(objects, { x: 5 }, 'x');\n// 3を返します（最後のx: 5の後の位置）\n\n// 関数を使用して変換\nconst numbers = [10, 20, 20, 30];\nsortedLastIndexBy(numbers, 20, n => n);\n// 3を返します\n```\n\n`null` または `undefined` 配列は0を返します。\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\nsortedLastIndexBy(null, { x: 1 }, 'x'); // 0\nsortedLastIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 挿入する値です。\n- `iteratee` (オプション): 各要素と値に適用する変換関数、プロパティ名、またはプロパティ-値配列です。\n\n#### 戻り値\n\n(`number`): 値を挿入すべき最も高いインデックスを返します。配列が `null` または `undefined` の場合は0を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/sortedLastIndexOf.md",
    "content": "# sortedLastIndexOf (Lodash 互換性)\n\n::: warning バイナリ検索を直接実装してください\n\nこの `sortedLastIndexOf` 関数は、複雑なバイナリ検索処理と型検証により遅く動作します。\n\n代わりに、より高速で現代的なバイナリ検索を直接実装するか、`Array.prototype.lastIndexOf()` を使用してください。\n\n:::\n\nソートされた配列で値が最後に現れるインデックスを見つけます。\n\n```typescript\nconst index = sortedLastIndexOf(array, value);\n```\n\n## 使用法\n\n### `sortedLastIndexOf(array, value)`\n\nソートされた配列で特定の値が最後に現れるインデックスを見つけるときに `sortedLastIndexOf` を使用してください。バイナリ検索を使用して高速に値を見つけます。\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\n// 数値配列で値を見つける\nsortedLastIndexOf([1, 2, 3, 4, 5], 3);\n// 2を返します\n\n// 値が存在しない場合\nsortedLastIndexOf([1, 2, 3, 4, 5], 6);\n// -1を返します\n\n// 重複した値がある場合、最後のインデックスを返します\nsortedLastIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 5を返します（最後の3の位置）\n\n// 0と-0は同じように扱われます\nsortedLastIndexOf([-0, 0], 0);\n// 1を返します\n```\n\n空の配列、`null`、または `undefined` は-1を返します。\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\nsortedLastIndexOf([], 1); // -1\nsortedLastIndexOf(null, 1); // -1\nsortedLastIndexOf(undefined, 1); // -1\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): ソートされた配列です。ソートされていない配列を使用すると、誤った結果が得られる可能性があります。\n- `value` (`T`): 探す値です。\n\n#### 戻り値\n\n(`number`): 値が最後に現れるインデックスを返します。値が存在しない場合は-1を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/tail.md",
    "content": "# tail (Lodash 互換性)\n\n::: warning `es-toolkit`の[tail](../../array/tail.md)を使用してください\n\nこの`tail`関数は、`null`や`undefined`の処理などにより遅く動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[tail](../../array/tail.md)を使用してください。\n\n:::\n\n配列の最初の要素を除いた残りの要素を返します。\n\n```typescript\nconst result = tail(array);\n```\n\n## 使用法\n\n### `tail(array)`\n\n配列の最初の要素を除いたすべての要素を含む新しい配列を作成したい場合は`tail`を使用してください。入力配列が空または要素が1つだけの場合は空の配列を返します。\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\n// 数値配列から最初の要素を削除します。\ntail([1, 2, 3]);\n// Returns: [2, 3]\n\n// 文字列配列から最初の要素を削除します。\ntail(['a', 'b', 'c']);\n// Returns: ['b', 'c']\n\n// 要素が1つだけの配列です。\ntail([1]);\n// Returns: []\n\n// 空の配列です。\ntail([]);\n// Returns: []\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\ntail(null); // []\ntail(undefined); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 最初の要素を削除する配列です。\n\n#### 戻り値\n\n(`T[]`): 最初の要素を除いた残りの要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/take.md",
    "content": "# take (Lodash 互換性)\n\n::: warning `es-toolkit`の[take](../../array/take.md)を使用してください\n\nこの`take`関数は、Lodashとの互換性のための追加処理が含まれているため遅く動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[take](../../array/take.md)を使用してください。\n\n:::\n\n配列の先頭から指定された個数の要素を取得して新しい配列を作成します。\n\n```typescript\nconst result = take([1, 2, 3, 4, 5], 3);\n// resultは[1, 2, 3]になります。\n```\n\n## 使用法\n\n### `take(array, count)`\n\n配列の先頭から指定された個数の要素を取得して新しい配列を返します。`count`が配列の長さより大きい場合は、配列全体を返します。\n\n```typescript\nimport { take } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst numbers = [1, 2, 3, 4, 5];\nconst result1 = take(numbers, 3);\n// Returns: [1, 2, 3]\n\n// 配列の長さより大きい個数を要求\nconst result2 = take(numbers, 10);\n// Returns: [1, 2, 3, 4, 5] (配列全体)\n\n// 0個を要求\nconst result3 = take(numbers, 0);\n// Returns: []\n\n// 空の配列を処理\nconst result4 = take([], 3);\n// Returns: []\n\n// 負の数を処理\nconst result5 = take(numbers, -1);\n// Returns: []\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 要素を取得する配列です。\n- `count` (`number`): 取得する要素の個数です。デフォルト値は1です。\n\n#### 戻り値\n\n(`T[]`): 先頭から指定された個数の要素を含む新しい配列です。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/takeRight.md",
    "content": "# takeRight (Lodash 互換性)\n\n::: warning `es-toolkit`の[takeRight](../../array/takeRight.md)を使用してください\n\nこの`takeRight`関数は、`null`や`undefined`の処理などにより遅く動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[takeRight](../../array/takeRight.md)を使用してください。\n\n:::\n\n配列の末尾から指定された個数の要素を取得します。\n\n```typescript\nconst result = takeRight(array, count);\n```\n\n## 使用法\n\n### `takeRight(array, count)`\n\n配列の末尾から指定された個数の要素を取得して新しい配列を作成したい場合は`takeRight`を使用してください。要求された個数が配列の長さより大きい場合は、配列全体を返します。\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\n// 数値配列から末尾の2個の要素を取得します。\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 文字列配列から末尾の3個の要素を取得します。\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n\n// 要求された個数が配列の長さより大きい場合\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n\n// 0個を要求\ntakeRight([1, 2, 3], 0);\n// Returns: []\n\n// 負の数を要求\ntakeRight([1, 2, 3], -1);\n// Returns: []\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\ntakeRight(null, 2); // []\ntakeRight(undefined, 2); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 要素を取得する配列です。\n- `count` (`number`, オプション): 取得する要素の個数です。デフォルト値は`1`です。\n\n#### 戻り値\n\n(`T[]`): 末尾から指定された個数の要素を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/takeRightWhile.md",
    "content": "# takeRightWhile (Lodash 互換性)\n\n::: warning `es-toolkit`の[takeRightWhile](../../array/takeRightWhile.md)を使用してください\n\nこの`takeRightWhile`関数は、`null`や`undefined`の処理などにより遅く動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[takeRightWhile](../../array/takeRightWhile.md)を使用してください。\n\n:::\n\n条件を満たす間、配列の末尾から要素を取得します。\n\n```typescript\nconst result = takeRightWhile(array, predicate);\n```\n\n## 使用法\n\n### `takeRightWhile(array, predicate)`\n\n配列の末尾から開始して条件を満たす間、要素を取得して新しい配列を作成したい場合は`takeRightWhile`を使用してください。条件が偽と評価されると停止します。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\n// 関数条件を使用\nconst numbers = [1, 2, 3, 4, 5];\ntakeRightWhile(numbers, x => x > 3);\n// Returns: [4, 5]\n\n// オブジェクトプロパティ条件を使用\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ntakeRightWhile(users, o => !o.active);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// 部分オブジェクトで条件マッチング\ntakeRightWhile(users, { active: false });\n// Returns: [{ user: 'pebbles', active: false }]\n\n// プロパティ-値配列で条件マッチング\ntakeRightWhile(users, ['active', false]);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// プロパティ名で真と評価される値を確認\nconst items = [{ active: false }, { active: true }, { active: true }];\ntakeRightWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\ntakeRightWhile(null, x => x > 0); // []\ntakeRightWhile(undefined, x => x > 0); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 処理する配列です。\n- `predicate` (`ListIteratee<T>`, オプション): 各要素に対して実行する条件です。関数、部分オブジェクト、プロパティ-値配列、プロパティ名を使用できます。デフォルトは恒等関数です。\n\n#### 戻り値\n\n(`T[]`): 条件を満たす間、配列の末尾から取得した要素の新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/takeWhile.md",
    "content": "# takeWhile (Lodash 互換性)\n\n::: warning `es-toolkit`の[takeWhile](../../array/takeWhile.md)を使用してください\n\nこの`takeWhile`関数は、`null`や`undefined`の処理などにより遅く動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[takeWhile](../../array/takeWhile.md)を使用してください。\n\n:::\n\n条件を満たす間、配列の先頭から要素を取得します。\n\n```typescript\nconst result = takeWhile(array, predicate);\n```\n\n## 使用法\n\n### `takeWhile(array, predicate)`\n\n配列の開始から条件を満たす間、要素を取得して新しい配列を作成したい場合は`takeWhile`を使用してください。条件が偽と評価されると停止します。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\n// 関数条件を使用\nconst numbers = [1, 2, 3, 4, 5];\ntakeWhile(numbers, x => x < 3);\n// Returns: [1, 2]\n\n// オブジェクトプロパティ条件を使用\nconst users = [\n  { user: 'barney', active: false },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: true },\n];\n\ntakeWhile(users, o => !o.active);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// 部分オブジェクトで条件マッチング\ntakeWhile(users, { active: false });\n// Returns: [{ user: 'barney', active: false }]\n\n// プロパティ-値配列で条件マッチング\ntakeWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// プロパティ名で真と評価される値を確認\nconst items = [{ active: true }, { active: true }, { active: false }];\ntakeWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null`や`undefined`は空の配列として扱われます。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\ntakeWhile(null, x => x > 0); // []\ntakeWhile(undefined, x => x > 0); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 処理する配列です。\n- `predicate` (`ListIteratee<T>`, オプション): 各要素に対して実行する条件です。関数、部分オブジェクト、プロパティ-値配列、プロパティ名を使用できます。デフォルトは恒等関数です。\n\n#### 戻り値\n\n(`T[]`): 条件を満たす間、配列の先頭から取得した要素の新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/union.md",
    "content": "# union (Lodash互換)\n\n::: warning `es-toolkit`の[union](../../array/union.md)を使用してください\n\nこの`union`関数は複雑な配列処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[union](../../array/union.md)を使用してください。\n\n:::\n\n複数の配列からユニークな値のみを集めて新しい配列を作成します。\n\n```typescript\nconst result = union(...arrays);\n```\n\n## 使用法\n\n### `union(...arrays)`\n\n複数の配列をマージして重複を削除し、ユニークな値のみを含む新しい配列を作成したい場合は`union`を使用してください。各値が最初に出現する順序を保持します。\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\n// 数値配列をマージ\nunion([2], [1, 2]);\n// 戻り値: [2, 1]\n\n// 複数の配列をマージ\nunion([2], [1, 2], [2, 3]);\n// 戻り値: [2, 1, 3]\n\n// ネストした配列は平坦化されません\nunion([1, 3, 2], [1, [5]], [2, [4]]);\n// 戻り値: [1, 3, 2, [5], [4]]\n\n// 配列でない値は無視されます\nunion([0], 3, { '0': 1 }, null, [2, 1]);\n// 戻り値: [0, 2, 1]\n\n// 配列のようなオブジェクトも処理されます\nunion([0], { 0: 'a', length: 1 }, [2, 1]);\n// 戻り値: [0, 'a', 2, 1]\n```\n\n`null`または`undefined`は無視されます。\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\nunion([1, 2], null, undefined, [3, 4]);\n// 戻り値: [1, 2, 3, 4]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): マージする配列。配列でない値は無視されます。\n\n#### 戻り値\n\n(`T[]`): すべての配列のユニークな値を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/unionBy.md",
    "content": "# unionBy (Lodash互換)\n\n::: warning `es-toolkit`の[unionBy](../../array/unionBy.md)を使用してください\n\nこの`unionBy`関数は複雑な処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[unionBy](../../array/unionBy.md)を使用してください。\n\n:::\n\n複数の配列をマージし、指定された基準に基づいてユニークな値のみを残します。\n\n```typescript\nconst result = unionBy(...arrays, iteratee);\n```\n\n## 使用法\n\n### `unionBy(...arrays, iteratee)`\n\n複数の配列をマージし、与えられた基準関数に基づいて重複を削除してユニークな値のみを含む新しい配列を作成したい場合は`unionBy`を使用してください。各値が最初に出現する順序を保持します。\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\n// 小数を切り捨てて比較\nunionBy([2.1], [1.2, 2.3], Math.floor);\n// 戻り値: [2.1, 1.2]\n\n// オブジェクトのプロパティで比較\nunionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// 戻り値: [{ x: 1 }, { x: 2 }]\n\n// 関数で比較\nunionBy(\n  [{ id: 1, name: 'a' }],\n  [\n    { id: 2, name: 'b' },\n    { id: 1, name: 'c' },\n  ],\n  item => item.id\n);\n// 戻り値: [{ id: 1, name: 'a' }, { id: 2, name: 'b' }]\n\n// 部分オブジェクトで比較\nunionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], { x: 1 });\n// 戻り値: [{ x: 1, y: 1 }]\n```\n\n`null`または`undefined`配列は無視されます。\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\nunionBy([1, 2], null, undefined, [3, 4], x => x);\n// 戻り値: [1, 2, 3, 4]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): マージする配列。\n- `iteratee` (`ValueIteratee<T>`): ユニーク性を決定する基準。関数、プロパティ名、部分オブジェクト、またはプロパティ-値配列を使用できます。\n\n#### 戻り値\n\n(`T[]`): 指定された基準に基づいて重複を削除したユニークな値を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/unionWith.md",
    "content": "# unionWith (Lodash互換)\n\n::: warning `es-toolkit`の[unionWith](../../array/unionWith.md)を使用してください\n\nこの`unionWith`関数は複雑な処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[unionWith](../../array/unionWith.md)を使用してください。\n\n:::\n\n複数の配列をマージし、比較関数を使用してユニークな値のみを残します。\n\n```typescript\nconst result = unionWith(...arrays, comparator);\n```\n\n## 使用法\n\n### `unionWith(...arrays, comparator)`\n\n複数の配列をマージし、カスタム比較関数を使用して重複を削除し、ユニークな値のみを含む新しい配列を作成したい場合は`unionWith`を使用してください。各値が最初に出現する順序を保持します。\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\n// カスタム比較関数を使用\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\n\nunionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// 戻り値: [{ x: 1, y: 2 }, { x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 単純な等価比較\nunionWith([1, 2], [2, 3], (a, b) => a === b);\n// 戻り値: [1, 2, 3]\n\n// 文字列の長さで比較\nunionWith(['ab', 'cd'], ['ef', 'gh', 'ab'], (a, b) => a.length === b.length);\n// 戻り値: ['ab']\n```\n\n`null`または`undefined`配列は無視されます。\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\nunionWith([1, 2], null, undefined, [3, 4], (a, b) => a === b);\n// 戻り値: [1, 2, 3, 4]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): マージする配列。\n- `comparator` (`(a: T, b: T) => boolean`): 2つの値が等しいかどうかを判断する比較関数。\n\n#### 戻り値\n\n(`T[]`): 比較関数を使用して重複を削除したユニークな値を含む新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/uniq.md",
    "content": "# uniq (Lodash互換)\n\n::: warning `es-toolkit`の[uniq](../../array/uniq.md)を使用してください\n\nこの`uniq`関数はLodash互換性のための追加処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[uniq](../../array/uniq.md)を使用してください。\n\n:::\n\n配列から重複する要素を削除してユニークな要素のみを残した新しい配列を作成します。\n\n```typescript\nconst result = uniq([1, 2, 2, 3, 3, 4]);\n// resultは[1, 2, 3, 4]になります。\n```\n\n## 使用法\n\n### `uniq(array)`\n\n配列から重複する要素を削除してユニークな要素のみを含む新しい配列を返します。最初に出現する要素のみが保持され、順序は保たれます。\n\n```typescript\nimport { uniq } from 'es-toolkit/compat';\n\n// 数値配列から重複を削除\nconst numbers = [1, 2, 2, 3, 3, 4, 1];\nconst result1 = uniq(numbers);\n// 戻り値: [1, 2, 3, 4]\n\n// 文字列配列から重複を削除\nconst strings = ['a', 'b', 'b', 'c', 'a'];\nconst result2 = uniq(strings);\n// 戻り値: ['a', 'b', 'c']\n\n// オブジェクト配列から重複を削除（参照値比較）\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst objects = [obj1, obj2, obj1];\nconst result3 = uniq(objects);\n// 戻り値: [{ id: 1 }, { id: 2 }]\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 処理する配列。\n\n#### 戻り値\n\n(`T[]`): 重複が削除された新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/uniqBy.md",
    "content": "# uniqBy (Lodash互換)\n\n::: warning `es-toolkit`の[uniqBy](../../array/uniqBy.md)を使用してください\n\nこの`uniqBy`関数は`null`または`undefined`の処理、複雑な引数タイプ処理などにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[uniqBy](../../array/uniqBy.md)を使用してください。\n\n:::\n\n配列で変換関数が返す値に基づいて重複を削除し、ユニークな要素で構成される新しい配列を作成します。\n\n```typescript\nconst result = uniqBy(array, iteratee);\n```\n\n## 使用法\n\n### `uniqBy(array, iteratee)`\n\n配列の各要素に変換関数を適用し、変換結果が同じ要素の中で最初の要素のみを保持します。オブジェクト配列で特定のプロパティを基準に重複を削除したり、数値配列で特定の計算結果を基準に重複を削除するときに便利です。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\n// 数値配列でMath.floor結果により重複を削除\nuniqBy([2.1, 1.2, 2.3], Math.floor);\n// 戻り値: [2.1, 1.2]\n\n// オブジェクト配列でプロパティにより重複を削除\nuniqBy([{ x: 1 }, { x: 2 }, { x: 1 }], 'x');\n// 戻り値: [{ x: 1 }, { x: 2 }]\n\n// 関数で重複を削除\nuniqBy([{ name: 'John' }, { name: 'Jane' }, { name: 'John' }], obj => obj.name);\n// 戻り値: [{ name: 'John' }, { name: 'Jane' }]\n```\n\n`null`または`undefined`は空配列として扱われます。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\nuniqBy(null, Math.floor); // []\nuniqBy(undefined, 'x'); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 重複を削除する配列。\n- `iteratee` (`ValueIteratee<T>`): 各要素に適用する変換関数。関数、プロパティ名、部分オブジェクトなどを使用できます。\n\n#### 戻り値\n\n(`T[]`): 変換関数の結果を基準に重複が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/uniqWith.md",
    "content": "# uniqWith (Lodash互換)\n\n::: warning `es-toolkit`の[uniqWith](../../array/uniqWith.md)を使用してください\n\nこの`uniqWith`関数は`null`または`undefined`の処理、複雑な引数タイプ処理などにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[uniqWith](../../array/uniqWith.md)を使用してください。\n\n:::\n\n配列で比較関数を使用して重複を削除し、ユニークな要素で構成される新しい配列を作成します。\n\n```typescript\nconst result = uniqWith(array, comparator);\n```\n\n## 使用法\n\n### `uniqWith(array, comparator)`\n\n配列の各要素を比較関数で比較して重複を削除します。比較関数が`true`を返すと2つの要素が同じと判断され、最初に出現する要素のみが保持されます。比較関数を提供しない場合、デフォルトで浅い等価比較を使用します。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\n// 比較関数なしで使用（浅い等価比較）\nuniqWith([1, 2, 2, 3]);\n// 戻り値: [1, 2, 3]\n\n// カスタム比較関数で奇数/偶数基準により重複を削除\nuniqWith([1, 2, 3, 4], (a, b) => a % 2 === b % 2);\n// 戻り値: [1, 2]\n\n// オブジェクト配列でプロパティ基準により重複を削除\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n  { x: 1, y: 2 },\n];\nuniqWith(objects, (a, b) => a.x === b.x && a.y === b.y);\n// 戻り値: [{ x: 1, y: 2 }, { x: 2, y: 1 }]\n```\n\n`null`または`undefined`は空配列として扱われます。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\nuniqWith(null); // []\nuniqWith(undefined); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 重複を削除する配列。\n- `comparator` (`(a: T, b: T) => boolean`, 選択): 2つの要素が等しいか比較する関数。`true`を返すと同じと判断されます。デフォルトは浅い等価比較です。\n\n#### 戻り値\n\n(`T[]`): 比較関数の結果を基準に重複が削除された新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/unzip.md",
    "content": "# unzip (Lodash互換)\n\n::: warning `es-toolkit`の[unzip](../../array/unzip.md)を使用してください\n\nこの`unzip`関数は`null`または`undefined`の処理、配列でない値のフィルタリングなどにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[unzip](../../array/unzip.md)を使用してください。\n\n:::\n\nグループ化された配列の同じ位置にある要素を集めて新しい配列を作成します。\n\n```typescript\nconst result = unzip(array);\n```\n\n## 使用法\n\n### `unzip(array)`\n\nネストした配列の同じインデックスにある要素を集めて新しい配列として返します。`zip`関数の逆の操作を実行します。行列を転置したり構造化データを再編成するときに便利です。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\n// 文字列、ブール値、数値が混在した配列をアンジップ\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n];\nconst result = unzip(zipped);\n// 戻り値: [['a', 'b'], [true, false], [1, 2]]\n\n// 数値配列をアンジップ\nconst numbers = [\n  [1, 4],\n  [2, 5],\n  [3, 6],\n];\nunzip(numbers);\n// 戻り値: [[1, 2, 3], [4, 5, 6]]\n\n// 長さが異なる配列も処理\nconst uneven = [\n  ['a', 1],\n  ['b', 2, true],\n];\nunzip(uneven);\n// 戻り値: [['a', 'b'], [1, 2], [undefined, true]]\n```\n\n`null`、`undefined`、または空配列は空配列として扱われます。\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\nunzip(null); // []\nunzip(undefined); // []\nunzip([]); // []\n```\n\n#### パラメータ\n\n- `array` (`T[][] | ArrayLike<ArrayLike<T>> | null | undefined`): アンジップするネストした配列。各内部配列の同じ位置の要素が集められます。\n\n#### 戻り値\n\n(`T[][]`): 同じ位置の要素が集められた新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/unzipWith.md",
    "content": "# unzipWith (Lodash互換)\n\n::: warning `es-toolkit`の`unzipWith`を使用してください\n\nこの`unzipWith`関数は`null`または`undefined`の処理、`ArrayLike`タイプ処理、さまざまな条件関数形式のサポートなどにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[unzipWith](../../array/unzipWith.md)を使用してください。\n\n:::\n\nグループ化された配列の同じ位置にある要素を集めて変換関数を適用した新しい配列を作成します。\n\n```typescript\nconst result = unzipWith(array, iteratee);\n```\n\n## 使用法\n\n### `unzipWith(array, iteratee)`\n\nネストした配列の同じインデックスにある要素を集めて変換関数を適用します。`unzip`関数と似ていますが、各グループに変換関数を適用できます。変換関数を提供しない場合、デフォルトの`unzip`操作を実行します。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\n// 同じ位置の要素を足す\nunzipWith(\n  [\n    [1, 10, 100],\n    [2, 20, 200],\n  ],\n  (a, b) => a + b\n);\n// 戻り値: [3, 30, 300]\n\n// 変換関数なしで使用（デフォルトunzip操作）\nunzipWith([\n  [1, 4],\n  [2, 5],\n  [3, 6],\n]);\n// 戻り値: [[1, 2, 3], [4, 5, 6]]\n\n// 文字列連結\nunzipWith(\n  [\n    ['a', 'x'],\n    ['b', 'y'],\n    ['c', 'z'],\n  ],\n  (a, b) => a + b\n);\n// 戻り値: ['abc', 'xyz']\n\n// 最大値を探す\nunzipWith(\n  [\n    [1, 10],\n    [2, 20],\n    [3, 5],\n  ],\n  Math.max\n);\n// 戻り値: [3, 20]\n```\n\n`null`、`undefined`、または空配列は空配列として扱われます。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\nunzipWith(null, (a, b) => a + b); // []\nunzipWith(undefined, (a, b) => a + b); // []\nunzipWith([], (a, b) => a + b); // []\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<ArrayLike<T>> | null | undefined`): アンジップするネストした配列。\n- `iteratee` (`(...values: T[]) => R`, 選択): 各グループの要素に適用する変換関数。提供しない場合、デフォルトの`unzip`操作を実行します。\n\n#### 戻り値\n\n(`R[]`または`T[][]`): 変換関数がある場合は変換された結果の配列を、ない場合はアンジップされた配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/without.md",
    "content": "# without (Lodash互換)\n\n::: warning `es-toolkit`の[without](../../array/without.md)を使用してください\n\nこの`without`関数はLodash互換性のための追加処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[without](../../array/without.md)を使用してください。\n\n:::\n\n配列から指定された値を除外した新しい配列を作成します。\n\n```typescript\nconst result = without([1, 2, 3, 4, 5], 2, 4);\n// resultは[1, 3, 5]になります。\n```\n\n## 使用法\n\n### `without(array, ...values)`\n\n配列から指定された値を削除した新しい配列を返します。元の配列は変更されません。\n\n```typescript\nimport { without } from 'es-toolkit/compat';\n\n// 数値配列から複数の値を削除\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\nconst result1 = without(numbers, 2, 4);\n// 戻り値: [1, 3, 5]\n\n// 文字列配列から値を削除\nconst fruits = ['apple', 'banana', 'cherry', 'banana'];\nconst result2 = without(fruits, 'banana');\n// 戻り値: ['apple', 'cherry']\n\n// 空配列を処理\nconst result3 = without([], 1, 2, 3);\n// 戻り値: []\n```\n\n#### パラメータ\n\n- `array` (`T[]`): 処理する元の配列。\n- `...values` (`T[]`): 削除する値。\n\n#### 戻り値\n\n(`T[]`): 指定された値を削除した新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/xor.md",
    "content": "# xor (Lodash互換)\n\n::: warning `es-toolkit`の[xor](../../array/xor.md)を使用してください\n\nこの`xor`関数は`null`または`undefined`の処理、複雑な重複計算ロジックなどにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[xor](../../array/xor.md)を使用してください。\n\n:::\n\n複数の配列で正確に1つの配列にのみ存在する要素で構成される新しい配列を作成します。\n\n```typescript\nconst result = xor(...arrays);\n```\n\n## 使用法\n\n### `xor(...arrays)`\n\n複数の配列の対称差集合を計算します。つまり、与えられた配列の中で正確に1つの配列にのみ存在する要素を返します。2つ以上の配列を比較する際に重複しないユニークな要素を見つけたい場合に便利です。\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\n// 2つの配列の対称差集合\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// 戻り値: [1, 2, 5, 6]\n\n// 3つの配列の対称差集合\nxor([1, 2], [2, 3], [4, 5]);\n// 戻り値: [1, 3, 4, 5]\n\n// 文字列配列\nxor(['a', 'b'], ['b', 'c']);\n// 戻り値: ['a', 'c']\n\n// 1つの配列のみを提供\nxor([1, 2, 3]);\n// 戻り値: [1, 2, 3]\n```\n\n`null`、`undefined`、または空配列は無視され、有効な配列のみが処理されます。\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\nxor([1, 2], null, [2, 3]);\n// 戻り値: [1, 3]\n\nxor([], [1, 2], [2, 3]);\n// 戻り値: [1, 3]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 対称差集合を計算する配列。`null`または`undefined`は無視されます。\n\n#### 戻り値\n\n(`T[]`): 正確に1つの配列にのみ存在する要素で構成される新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/xorBy.md",
    "content": "# xorBy (Lodash互換)\n\n::: warning `es-toolkit`の[xorBy](../../array/xorBy.md)を使用してください\n\nこの`xorBy`関数は`null`または`undefined`の処理、複雑な重複計算ロジックなどにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[xorBy](../../array/xorBy.md)を使用してください。\n\n:::\n\n複数の配列で変換関数を基準に正確に1つの配列にのみ存在する要素で構成される新しい配列を作成します。\n\n```typescript\nconst result = xorBy(...arrays, iteratee);\n```\n\n## 使用法\n\n### `xorBy(...arrays, iteratee)`\n\n複数の配列の対称差集合を変換関数を基準に計算します。各要素に変換関数を適用した結果が正確に1つの配列にのみ存在する要素を返します。オブジェクト配列で特定のプロパティを基準に比較したり、数値配列で特定の計算結果を基準に比較するときに便利です。\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\n// Math.floor結果により対称差集合を計算\nxorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n// 戻り値: [1.2, 4.3]\n\n// オブジェクトのプロパティにより対称差集合を計算\nxorBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// 戻り値: [{ x: 2 }]\n\n// 関数で対称差集合を計算\nconst users1 = [{ name: 'John', age: 30 }];\nconst users2 = [\n  { name: 'Jane', age: 25 },\n  { name: 'John', age: 30 },\n];\nxorBy(users1, users2, user => user.name);\n// 戻り値: [{ name: 'Jane', age: 25 }]\n\n// 3つの配列の対称差集合\nxorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);\n// 戻り値: [1.2, 2.3, 3.4, 4.5, 5.6, 6.7]\n```\n\n`null`または`undefined`は無視されます。\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\nxorBy([2.1, 1.2], null, [4.3, 2.4], Math.floor);\n// 戻り値: [1.2, 4.3]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ValueIteratee<T>>`): 対称差集合を計算する配列と最後の変換関数。関数、プロパティ名、部分オブジェクトなどを使用できます。\n\n#### 戻り値\n\n(`T[]`): 変換関数の結果を基準に正確に1つの配列にのみ存在する要素で構成される新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/xorWith.md",
    "content": "# xorWith (Lodash互換)\n\n::: warning `es-toolkit`の[xorWith](../../array/xorWith.md)を使用してください\n\nこの`xorWith`関数は`null`または`undefined`の処理、複雑な重複計算ロジックなどにより動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[xorWith](../../array/xorWith.md)を使用してください。\n\n:::\n\n複数の配列で比較関数を使用して正確に1つの配列にのみ存在する要素で構成される新しい配列を作成します。\n\n```typescript\nconst result = xorWith(...arrays, comparator);\n```\n\n## 使用法\n\n### `xorWith(...arrays, comparator)`\n\n複数の配列の対称差集合を比較関数を使用して計算します。比較関数が`true`を返すと2つの要素が同じと判断され、正確に1つの配列にのみ存在する要素を返します。複雑なオブジェクトやカスタム比較ロジックが必要な場合に便利です。\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\n// 単純な数値比較\nxorWith([1, 2], [2, 3], (a, b) => a === b);\n// 戻り値: [1, 3]\n\n// オブジェクトのプロパティを比較\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\nxorWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// 戻り値: [{ x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 3つの配列の対称差集合\nxorWith([1], [2], [3], (a, b) => a === b);\n// 戻り値: [1, 2, 3]\n\n// 文字列の長さで比較\nxorWith(['hello'], ['world', 'hi'], (a, b) => a.length === b.length);\n// 戻り値: ['hi']\n```\n\n比較関数を提供しない場合、デフォルトで浅い等価比較を使用します。\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\nxorWith([1, 2], [2, 3]);\n// 戻り値: [1, 3]\n```\n\n#### パラメータ\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>`): 対称差集合を計算する配列と最後の比較関数。比較関数は2つの要素が等しい場合に`true`を返す必要があります。\n\n#### 戻り値\n\n(`T[]`): 比較関数の結果を基準に正確に1つの配列にのみ存在する要素で構成される新しい配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/zip.md",
    "content": "# zip (Lodash互換)\n\n::: warning `es-toolkit`の[zip](../../array/zip.md)を使用してください\n\nこの`zip`関数はLodash互換性のための追加処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[zip](../../array/zip.md)を使用してください。\n\n:::\n\n複数の配列を1つのタプルの配列に結合します。\n\n```typescript\nconst result = zip([1, 2], ['a', 'b']);\n// resultは[[1, 'a'], [2, 'b']]になります。\n```\n\n## 使用法\n\n### `zip(...arrs)`\n\n複数の配列を受け取り、各インデックスの要素を1つのタプルにまとめて新しい配列を作成します。入力配列の長さが異なる場合、結果の配列の長さは最も長い入力配列の長さとなり、欠落した要素は`undefined`で埋められます。\n\n```typescript\nimport { zip } from 'es-toolkit/compat';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = ['a', 'b', 'c'];\nconst result = zip(arr1, arr2);\n// 戻り値: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 長さが異なる配列\nconst arr3 = [true, false];\nconst result2 = zip(arr1, arr2, arr3);\n// 戻り値: [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n\n// 空配列が含まれる場合\nzip([1, 2], [], ['a', 'b']);\n// 戻り値: [[1, undefined, 'a'], [2, undefined, 'b']]\n```\n\n#### パラメータ\n\n- `...arrs` (`any[][]`): 結合する配列。\n\n#### 戻り値\n\n(`any[][]`): 入力配列の各インデックスの要素を含むタプルの新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/zipObject.md",
    "content": "# zipObject (Lodash互換)\n\n::: warning `es-toolkit`の[zipObject](../../array/zipObject.md)を使用してください\n\nこの`zipObject`関数はLodash互換性のための追加処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[zipObject](../../array/zipObject.md)を使用してください。\n\n:::\n\n2つの配列を使用してオブジェクトを作成します。最初の配列はプロパティ名として、2番目の配列は対応する値として使用されます。\n\n```typescript\nconst result = zipObject(keys, values);\n```\n\n## 使用法\n\n### `zipObject(keys, values)`\n\nキー配列と値配列から1つのオブジェクトを作成したい場合は`zipObject`を使用してください。最初の配列の要素をプロパティ名として、2番目の配列の要素を対応する値として使用してオブジェクトを作成します。APIレスポンスの処理やデータの変換時に特に便利です。\n\n```typescript\nimport { zipObject } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst keys = ['a', 'b', 'c'];\nconst values = [1, 2, 3];\nconst result = zipObject(keys, values);\n// 戻り値: { a: 1, b: 2, c: 3 }\n\n// 長さが異なる配列\nconst keys2 = ['x', 'y', 'z'];\nconst values2 = [10, 20];\nconst result2 = zipObject(keys2, values2);\n// 戻り値: { x: 10, y: 20, z: undefined }\n\n// 空配列が提供された場合\nconst result3 = zipObject([], []);\n// 戻り値: {}\n```\n\n#### パラメータ\n\n- `keys` (`PropertyKey[]`): プロパティ名として使用する配列。\n- `values` (`T[]`): プロパティ値として使用する配列。\n\n#### 戻り値\n\n(`Record<PropertyKey, T>`): 作成されたオブジェクト。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/zipObjectDeep.md",
    "content": "# zipObjectDeep (Lodash互換)\n\nパス配列と値配列を使用して深くネストしたオブジェクトを作成します。\n\n```typescript\nconst result = zipObjectDeep(keys, values);\n```\n\n## 使用法\n\n### `zipObjectDeep(keys, values)`\n\n最初の配列のパスと2番目の配列の値を使用して深くネストしたオブジェクトを生成します。パスはドット表記文字列またはプロパティ名の配列として提供できます。複雑なネストしたデータ構造を生成したり、フラットなキー値ペアを階層オブジェクトに変換するときに便利です。\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\n// パスをドット表記文字列として指定\nconst paths = ['a.b.c', 'd.e.f'];\nconst values = [1, 2];\nconst result = zipObjectDeep(paths, values);\n// 戻り値: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// パスを配列として指定\nconst pathArrays = [\n  ['a', 'b', 'c'],\n  ['d', 'e', 'f'],\n];\nconst values2 = [1, 2];\nconst result2 = zipObjectDeep(pathArrays, values2);\n// 戻り値: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// 配列インデックスを含むパス\nconst arrayPaths = ['a.b[0].c', 'a.b[1].d'];\nconst values3 = [1, 2];\nconst result3 = zipObjectDeep(arrayPaths, values3);\n// 戻り値: { a: { b: [{ c: 1 }, { d: 2 }] } }\n```\n\n`null`または`undefined`のキー配列は空オブジェクトとして扱われます。\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\nzipObjectDeep(null, [1, 2]); // {}\nzipObjectDeep(undefined, [1, 2]); // {}\n```\n\n#### パラメータ\n\n- `keys` (`ArrayLike<PropertyPath> | null | undefined`): プロパティパスの配列。ドット表記文字列またはプロパティ名の配列を使用できます。\n- `values` (`ArrayLike<any>`, 選択): 対応する値の配列。提供しない場合、空配列として扱われます。\n\n#### 戻り値\n\n(`object`): 与えられたパスと値で構成された深くネストしたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/array/zipWith.md",
    "content": "# zipWith (Lodash互換)\n\n::: warning `es-toolkit`の[zipWith](../../array/zipWith.md)を使用してください\n\nこの`zipWith`関数はLodash互換性のための追加処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[zipWith](../../array/zipWith.md)を使用してください。\n\n:::\n\n複数の配列の要素を結合関数を使用して新しい配列に結合します。\n\n```typescript\nconst result = zipWith([1, 2], [3, 4], (a, b) => a + b);\n// resultは[4, 6]になります。\n```\n\n## 使用法\n\n### `zipWith(...arrs, iteratee)`\n\n複数の配列を受け取り、各インデックスの要素を提供された関数で結合して新しい配列を作成します。配列の長さが異なる場合、最も長い配列の長さまで処理し、欠落した値には`undefined`が渡されます。\n\n```typescript\nimport { zipWith } from 'es-toolkit/compat';\n\n// 2つの配列の要素を足す\nconst result1 = zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// 戻り値: [5, 7, 9]\n\n// 3つの配列の要素を結合\nconst result2 = zipWith([1, 2], [3, 4], [5, 6], (a, b, c) => a + b + c);\n// 戻り値: [9, 12]\n\n// 長さが異なる配列\nconst result3 = zipWith([1, 2, 3], [4, 5], (a, b) => (a || 0) + (b || 0));\n// 戻り値: [5, 7, 3]\n```\n\n#### パラメータ\n\n- `...arrs` (`any[][]`): 結合する配列。\n- `iteratee` (`Function`): 各インデックスの要素を結合する関数。\n\n#### 戻り値\n\n(`any[]`): 結合関数を適用した結果からなる新しい配列。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/after.md",
    "content": "# after (Lodash 互換性)\n\n::: warning `es-toolkit` の [`after`](../../function/after.md) を使用してください\n\nこの `after` 関数は、複雑な型検証と整数変換処理により動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [after](../../function/after.md) を使用してください。\n\n:::\n\n指定された回数呼び出された後にのみ実行される関数を作成します。\n\n```typescript\nconst restrictedFunction = after(n, func);\n```\n\n## 使用法\n\n### `after(n, func)`\n\n関数が特定の回数呼び出された後にのみ実行されるように制限したい場合は、`after` を使用してください。複数の非同期操作が完了した後にコールバックを実行したり、初期化段階を経た後に関数を有効化する際に便利です。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst logAfterThree = after(3, () => {\n  console.log('3回目の呼び出しから実行されます!');\n});\n\nlogAfterThree(); // 実行されない\nlogAfterThree(); // 実行されない\nlogAfterThree(); // \"3回目の呼び出しから実行されます!\" が出力される\nlogAfterThree(); // \"3回目の呼び出しから実行されます!\" が出力される (実行が続く)\n```\n\n複数の非同期操作がすべて完了した後に特定のコールバックを実行する際にも使用できます。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst tasks = ['task1', 'task2', 'task3'];\nconst allTasksComplete = after(tasks.length, () => {\n  console.log('すべてのタスクが完了しました!');\n});\n\n// 各タスクが完了するたびに呼び出される\ntasks.forEach(task => {\n  performAsyncTask(task, () => {\n    console.log(`${task} 完了`);\n    allTasksComplete(); // 3回目の呼び出しで \"すべてのタスクが完了しました!\" が出力される\n  });\n});\n```\n\n0または負の数を渡すと、最初の呼び出しからすぐに実行されます。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst immediate = after(0, () => console.log('すぐに実行'));\nimmediate(); // \"すぐに実行\"\n\nconst negative = after(-1, () => console.log('すぐに実行'));\nnegative(); // \"すぐに実行\"\n```\n\n#### パラメータ\n\n- `n` (`number`): 関数が実行される前に必要な呼び出し回数です。\n- `func` (`TFunc`): 制限する関数です。\n\n#### 戻り値\n\n(`TFunc`): n回目の呼び出しから元の関数を実行する新しい制限された関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/ary.md",
    "content": "# ary (Lodash 互換性)\n\n::: warning `es-toolkit` の [`ary`](../../function/ary.md) を使用してください\n\nこの `ary` 関数は、複雑なパラメータ検証により動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [ary](../../function/ary.md) を使用してください。\n\n:::\n\n関数が受け取ることができる引数の数を制限する関数を作成します。\n\n```typescript\nconst cappedFunction = ary(func, n);\n```\n\n## 使用法\n\n### `ary(func, n)`\n\n関数が受け取る引数の数を制限したい場合は、`ary` を使用してください。あまりにも多くの引数を受け取る関数を安全に使用したり、コールバック関数で不要な引数を無視する際に便利です。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction greet(name, age, city) {\n  return `こんにちは、${name}さん! ${age}歳、${city}からいらっしゃいました。`;\n}\n\nconst limitedGreet = ary(greet, 2);\nconsole.log(limitedGreet('田中', 30, '東京', '追加引数'));\n// \"こんにちは、田中さん! 30歳、undefinedからいらっしゃいました。\"\n// 3番目の引数以降は無視される\n```\n\n配列メソッドと一緒に使用する際、コールバック関数に不要な引数が渡されないようにできます。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// parseIntは第2引数(基数)を受け取るが、mapのコールバックは3つの引数を渡す\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// 誤った使用法 - parseIntがインデックスを基数として受け取る\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN]\n\n// aryを使用して最初の引数のみ渡す\nconsole.log(numbers.map(ary(parseInt, 1))); // [1, 2, 3, 4, 5]\n```\n\n関数が希望するパラメータ引数の数だけを受け取るように制限できます。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nfunction sum(...args) {\n  return args.reduce((total, num) => total + num, 0);\n}\n\nconst sum0 = ary(sum, 0);\nconst sum1 = ary(sum, 1);\nconst sum2 = ary(sum, 2);\nconst sum3 = ary(sum, 3);\n\nconsole.log(sum0(1, 2, 3, 4, 5)); // 0 (引数なし)\nconsole.log(sum1(1, 2, 3, 4, 5)); // 1 (最初の引数のみ)\nconsole.log(sum2(1, 2, 3, 4, 5)); // 3 (最初の2つの引数のみ)\nconsole.log(sum3(1, 2, 3, 4, 5)); // 6 (最初の3つの引数のみ)\n```\n\n負の数や `NaN` を渡すと、0として扱われ、すべての引数が無視されます。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nconst func = (a, b, c) => [a, b, c];\n\nconsole.log(ary(func, -1)(1, 2, 3)); // [] (負数は0として扱われる)\nconsole.log(ary(func, NaN)(1, 2, 3)); // [] (NaNは0として扱われる)\n```\n\n#### パラメータ\n\n- `func` (`Function`): 引数の数を制限する関数です。\n- `n` (`number`, オプション): 許可する最大引数数です。省略した場合、関数の `length` プロパティを使用します。\n\n#### 戻り値\n\n(`Function`): 最大 `n` 個の引数のみを受け取る新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/attempt.md",
    "content": "# attempt (Lodash 互換性)\n\n::: warning `es-toolkit` の [`attempt`](../../util/attempt.md) 関数または try-catch ブロックを使用してください\n\nこの `attempt` 関数は、エラーと戻り値を区別せずに返すため、使用時に混乱する可能性があります。\n\n代わりに、より直接的で明確な [`attempt`](../../util/attempt.md) 関数または try-catch ブロックを使用してください。\n\n:::\n\n関数を実行し、エラーが発生した場合にエラーオブジェクトを返す関数です。\n\n```typescript\nconst result = attempt(func, ...args);\n```\n\n## 使用法\n\n### `attempt(func, ...args)`\n\n関数を安全に実行したい場合は `attempt` を使用してください。エラーが発生する可能性のある関数を実行する際に、プログラムがクラッシュするのを防ぎ、エラーを戻り値として処理するのに便利です。\n\n```typescript\nimport { attempt } from 'es-toolkit/compat';\n\n// 基本的な使用法 - 成功する場合\nconst result = attempt((x, y) => x + y, 2, 3);\nconsole.log(result); // 5\n\n// エラーが発生する場合\nconst errorResult = attempt(() => {\n  throw new Error('何かがうまくいきませんでした');\n});\nconsole.log(errorResult); // Error: 何かがうまくいきませんでした\n```\n\ntry-catch ブロックの使用との違いは次のとおりです。\n\n```typescript\n// attempt を使用\nimport { attempt } from 'es-toolkit/compat';\n\nconst result = attempt(riskyFunction, arg1, arg2);\nif (result instanceof Error) {\n  console.log('エラーが発生しました:', result.message);\n} else {\n  console.log('結果:', result);\n}\n\n// try-catch を使用 (より直接的)\ntry {\n  const result = riskyFunction(arg1, arg2);\n  console.log('結果:', result);\n} catch (error) {\n  console.log('エラーが発生しました:', error.message);\n}\n```\n\n#### パラメータ\n\n- `func` (`Function`): 実行する関数です。\n- `args` (`...any[]`): 関数に渡す引数です。\n\n#### 戻り値\n\n(`ReturnType<F> | Error`): 関数が成功した場合は戻り値を、エラーが発生した場合は Error オブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/before.md",
    "content": "# before (Lodash 互換性)\n\n::: warning `es-toolkit` の [`before`](../../function/before.md) を使用してください\n\nこの `before` 関数は、複雑な型検証と整数変換処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [before](../../function/before.md) を使用してください。\n\n:::\n\n指定された回数まで元の関数を実行し、その後は最後の結果を返す関数を作成します。\n\n```typescript\nconst limitedFunction = before(n, func);\n```\n\n## 使用法\n\n### `before(n, func)`\n\n関数を特定の回数まで実行するように制限したい場合は `before` を使用してください。関数呼び出し回数を制限したり、初期設定段階でのみ関数を実行したい場合に便利です。\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 基本的な使い方\nlet count = 0;\nconst beforeThree = before(3, () => ++count);\n\nconsole.log(beforeThree()); // 1 (最初の呼び出し)\nconsole.log(beforeThree()); // 2 (2回目の呼び出し)\nconsole.log(beforeThree()); // 2 (3回目以降は最後の結果を返す)\nconsole.log(beforeThree()); // 2 (引き続き最後の結果を返す)\n```\n\nクロージャを使用した代替案：\n\n```typescript\n// before を使用\nconst beforeThree = before(3, myFunction);\n\n// クロージャを使用（よりシンプルで高速）\nfunction createBefore(limit, callback) {\n  let callCount = 0;\n  let lastResult;\n\n  return function (...args) {\n    if (callCount < limit - 1) {\n      lastResult = callback.apply(this, args);\n      callCount++;\n    }\n    return lastResult;\n  };\n}\n\nconst beforeThreeAlternative = createBefore(3, myFunction);\n```\n\n初期化関数として活用：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nclass Database {\n  constructor() {\n    this.isInitialized = false;\n\n    // 初期化は一度だけ実行\n    this.initialize = before(2, () => {\n      console.log('データベースを初期化中...');\n      this.setupConnection();\n      this.isInitialized = true;\n      return '初期化完了';\n    });\n  }\n\n  setupConnection() {\n    // 実際の接続設定ロジック\n  }\n\n  query(sql) {\n    const initResult = this.initialize();\n    console.log(initResult); // 最初の呼び出し: \"初期化完了\"、以降：同じ結果\n\n    // クエリ実行ロジック\n    return `クエリを実行: ${sql}`;\n  }\n}\n\nconst db = new Database();\ndb.query('SELECT * FROM users'); // 初期化実行\ndb.query('SELECT * FROM products'); // 初期化は実行されない\n```\n\nAPI 呼び出しの制限：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// API 呼び出しを最大5回まで許可\nconst limitedApiCall = before(6, endpoint => {\n  console.log(`API 呼び出し: ${endpoint}`);\n  return fetch(endpoint).then(res => res.json());\n});\n\n// 最初の5回は実際の API 呼び出し\nlimitedApiCall('/api/data1'); // 実際の呼び出し\nlimitedApiCall('/api/data2'); // 実際の呼び出し\nlimitedApiCall('/api/data3'); // 実際の呼び出し\nlimitedApiCall('/api/data4'); // 実際の呼び出し\nlimitedApiCall('/api/data5'); // 実際の呼び出し\nlimitedApiCall('/api/data6'); // 最後の結果を返す（API 呼び出しなし）\n```\n\nイベントリスナーの制限：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// クリックイベントを3回まで処理\nconst limitedClickHandler = before(4, event => {\n  console.log('クリック処理:', event.target.id);\n  return `処理完了: ${Date.now()}`;\n});\n\ndocument.getElementById('button').addEventListener('click', limitedClickHandler);\n// 最初の3回のクリックのみ処理され、その後は最後の結果を返す\n```\n\nパラメータと戻り値の処理：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst limitedCalculator = before(3, (operation, a, b) => {\n  const result = operation === 'add' ? a + b : a - b;\n  console.log(`計算: ${a} ${operation} ${b} = ${result}`);\n  return result;\n});\n\nconsole.log(limitedCalculator('add', 5, 3)); // \"計算: 5 add 3 = 8\"、返す: 8\nconsole.log(limitedCalculator('subtract', 10, 4)); // \"計算: 10 subtract 4 = 6\"、返す: 6\nconsole.log(limitedCalculator('multiply', 7, 2)); // 計算しない、返す: 6（最後の結果）\n```\n\n0または1を渡すと関数が実行されません：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst neverCalled = before(0, () => {\n  console.log('この関数は実行されません');\n  return '結果';\n});\n\nconst onceOnly = before(1, () => {\n  console.log('この関数も実行されません');\n  return '結果';\n});\n\nconsole.log(neverCalled()); // undefined\nconsole.log(onceOnly()); // undefined\n```\n\nリソースクリーンアップの最適化：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 関数参照が自動的にクリーンアップされてメモリリークを防止\nconst limitedProcessor = before(2, data => {\n  // 複雑なデータ処理\n  return processComplexData(data);\n});\n\n// 2回目の呼び出し後、元の関数参照が削除される（ガベージコレクション）\n```\n\n#### パラメータ\n\n- `n` (`number`): 関数を実行する最大回数。n-1回まで実行され、n回目以降は最後の結果を返します。\n- `func` (`Function`): 制限する関数。\n\n#### 戻り値\n\n(`Function`): 指定された回数まで元の関数を実行し、その後は最後の結果を返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/bind.md",
    "content": "# bind (Lodash 互換性)\n\n::: warning `Function.prototype.bind()` を使用してください\n\nこの `bind` 関数は、複雑なプレースホルダー処理、コンストラクタ関数のチェック、引数のマージロジックにより、動作が遅くなります。プレースホルダーが不要な場合は、ネイティブの `Function.prototype.bind()` の方が高速でシンプルです。\n\nより高速で標準的な `Function.prototype.bind()` を使用してください。\n\n:::\n\n関数の `this` コンテキストを固定し、一部の引数を事前に提供する関数を作成します。\n\n```typescript\nconst boundFunction = bind(func, thisObj, ...partialArgs);\n```\n\n## 使用法\n\n### `bind(func, thisObj, ...partialArgs)`\n\n関数の `this` コンテキストを固定したり、一部の引数を事前に提供したい場合は `bind` を使用してください。特に、プレースホルダーを使用して特定の位置の引数を後で提供したい場合に便利です。\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction greet(greeting, punctuation) {\n  return greeting + ' ' + this.user + punctuation;\n}\n\nconst object = { user: '田中' };\nconst boundGreet = bind(greet, object, 'こんにちは');\n\nconsole.log(boundGreet('!')); // \"こんにちは 田中!\"\nconsole.log(boundGreet('~')); // \"こんにちは 田中~\"\n```\n\nネイティブ bind との比較:\n\n```typescript\n// bind を使用\nimport { bind } from 'es-toolkit/compat';\n\nconst boundFn1 = bind(func, thisObj, 'arg1');\n\n// ネイティブ bind を使用（より高速）\nconst boundFn2 = func.bind(thisObj, 'arg1');\n\n// 結果は同じだがネイティブの方が高速\n```\n\nプレースホルダー機能の使用:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction calculate(operation, a, b, suffix) {\n  return `${a} ${operation} ${b} = ${operation === '+' ? a + b : a - b}${suffix}`;\n}\n\n// プレースホルダーで特定の位置の引数を後で提供\nconst calcWithSuffix = bind(\n  calculate,\n  null,\n  bind.placeholder, // operation は後で提供\n  bind.placeholder, // a は後で提供\n  bind.placeholder, // b は後で提供\n  '点' // suffix は事前に提供\n);\n\nconsole.log(calcWithSuffix('+', 5, 3)); // \"5 + 3 = 8点\"\nconsole.log(calcWithSuffix('-', 10, 4)); // \"10 - 4 = 6点\"\n```\n\nより実用的なプレースホルダーの例:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction apiRequest(method, url, options, callback) {\n  // API リクエストロジック\n  console.log(`${method} ${url}`, options);\n  callback(`${method} リクエスト完了`);\n}\n\n// POST リクエスト用の部分適用関数を作成\nconst postRequest = bind(\n  apiRequest,\n  null,\n  'POST', // method を固定\n  bind.placeholder, // url は後で提供\n  { 'Content-Type': 'application/json' }, // options を固定\n  bind.placeholder // callback は後で提供\n);\n\npostRequest('/api/users', result => {\n  console.log(result); // \"POST リクエスト完了\"\n});\n\npostRequest('/api/products', result => {\n  console.log(result); // \"POST リクエスト完了\"\n});\n```\n\nメソッドのバインディング:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass Logger {\n  constructor(prefix) {\n    this.prefix = prefix;\n  }\n\n  log(level, message) {\n    console.log(`[${this.prefix}] ${level}: ${message}`);\n  }\n}\n\nconst logger = new Logger('MyApp');\n\n// 別のコンテキストで使用するためにメソッドをバインド\nconst logError = bind(logger.log, logger, 'ERROR');\nconst logInfo = bind(logger.log, logger, 'INFO');\n\n// 独立して使用可能\nsetTimeout(() => logError('サーバー接続失敗'), 1000);\nsetTimeout(() => logInfo('アプリケーション起動'), 2000);\n```\n\nイベントハンドラーでの活用:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass ButtonHandler {\n  constructor(name) {\n    this.name = name;\n    this.clickCount = 0;\n  }\n\n  handleClick(event, customData) {\n    this.clickCount++;\n    console.log(`${this.name} ボタンクリック #${this.clickCount}`);\n    console.log('カスタムデータ:', customData);\n    console.log('イベントタイプ:', event.type);\n  }\n}\n\nconst handler = new ButtonHandler('メニュー');\n\n// カスタムデータは事前に提供し、イベントは後で渡す\nconst boundHandler = bind(\n  handler.handleClick,\n  handler,\n  bind.placeholder, // event は後で\n  'メニュー選択済み' // customData は事前に提供\n);\n\n// DOM イベントに接続（event が自動的に最初の引数として渡される）\ndocument.getElementById('menu-btn')?.addEventListener('click', boundHandler);\n```\n\nコンストラクタ関数もサポート:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city || 'ソウル';\n}\n\n// ソウル居住者を作成するコンストラクタ\nconst SeoulPerson = bind(Person, null, bind.placeholder, bind.placeholder, 'ソウル');\n\nconst person1 = new SeoulPerson('田中', 30);\nconst person2 = new SeoulPerson('鈴木', 25);\n\nconsole.log(person1); // Person { name: '田中', age: 30, city: 'ソウル' }\nconsole.log(person2); // Person { name: '鈴木', age: 25, city: 'ソウル' }\n```\n\n関数型プログラミングでの活用:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// parseInt の基数を 10 に固定\nconst parseDecimal = bind(parseInt, null, bind.placeholder, 10);\n\n// map で安全に使用\nconst parsed = ['1', '2', '3'].map(parseDecimal);\nconsole.log(parsed); // [1, 2, 3]\n\n// 通常の parseInt 使用時の問題\nconst problematic = ['1', '2', '3'].map(parseInt); // [1, NaN, NaN]\n```\n\n#### パラメータ\n\n- `func` (`Function`): バインドする関数。\n- `thisObj` (`any`, オプション): 関数にバインドする `this` 値。\n- `partialArgs` (`...any[]`): 事前に提供する引数。`bind.placeholder` を使用して後で提供する位置を指定できます。\n\n#### 戻り値\n\n(`Function`): `this` が固定され、一部の引数が事前に適用された新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/bindKey.md",
    "content": "# bindKey (Lodash 互換性)\n\n::: warning アロー関数や `bind` メソッドを使用してください\nこの `bindKey` 関数は、動的メソッドバインディングとプレースホルダー処理により、複雑で遅く動作します。JavaScriptのネイティブ `bind` メソッドやアロー関数を使用すると、よりシンプルでパフォーマンスが向上します。\n\n代わりに、より高速で現代的なアロー関数や `Function.prototype.bind` を使用してください。\n:::\n\nオブジェクトのメソッドをバインドしながら、後で再定義される可能性のあるメソッドを参照できるようにします。\n\n```typescript\nconst bound = bindKey(object, key, ...partialArgs);\n```\n\n## 使用法\n\n### `bindKey(object, key, ...partialArgs)`\n\nオブジェクトのメソッドをバインドしながら、メソッドが後で変更される可能性を残したい場合は `bindKey` を使用してください。通常の `bind` とは異なり、メソッドを呼び出すたびに最新のメソッドを参照します。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// メソッドをバインドします。\nlet bound = bindKey(object, 'greet', 'hi');\nbound('!');\n// 戻り値: 'hi fred!'\n\n// メソッドを再定義します。\nobject.greet = function (greeting, punctuation) {\n  return greeting + 'ya ' + this.user + punctuation;\n};\n\n// バインドされた関数が新しいメソッドを呼び出します。\nbound('!');\n// 戻り値: 'hiya fred!'\n```\n\nプレースホルダーを使用して引数の位置を予約できます。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// プレースホルダーを使用します。\nconst bound = bindKey(object, 'greet', bindKey.placeholder, '!');\nbound('hi');\n// 戻り値: 'hi fred!'\n```\n\n部分適用された引数が最初に渡され、その後に呼び出し時に渡された引数が追加されます。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  add: function (a, b, c) {\n    return a + b + c;\n  },\n};\n\n// 最初の引数を事前に設定します。\nconst bound = bindKey(object, 'add', 10);\nbound(20, 30);\n// 戻り値: 60 (10 + 20 + 30)\n```\n\n#### パラメータ\n\n- `object` (`object`): メソッドを呼び出すオブジェクトです。\n- `key` (`string`): 呼び出すメソッドのキーです。\n- `...partialArgs` (`any[]`, オプション): メソッドに事前に渡す引数です。`bindKey.placeholder` を使用して引数の位置を予約できます。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): バインドされた新しい関数を返します。この関数は呼び出されるたびにオブジェクトの最新のメソッドを参照します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/curry.md",
    "content": "# curry (Lodash 互換性)\n\n::: warning `es-toolkit` の `curry` または手動クロージャを使用してください\nこの `curry` 関数は、複雑なプレースホルダー処理、引数個数検証、引数合成ロジックにより、動作が遅くなります。\n\nプレースホルダーが必要ない場合は、より高速な `es-toolkit` の [`curry`](../../function/curry.md) またはシンプルなクロージャを使用してください。\n:::\n\n関数をカリー化して、引数を一つずつ受け取るか、複数個を一度に受け取ることができる関数を作成します。\n\n```typescript\nconst curriedFunction = curry(func, arity);\n```\n\n## 使用法\n\n### `curry(func, arity)`\n\n部分適用を容易にするために関数をカリー化したい場合に `curry` を使用します。引数を段階的に提供する場合や、プレースホルダーを使用して特定の位置の引数を後で提供する場合に便利です。\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction add(a, b, c) {\n  return a + b + c;\n}\n\nconst curriedAdd = curry(add);\n\n// さまざまな方法で呼び出し可能\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(curriedAdd(1, 2)(3)); // 6\nconsole.log(curriedAdd(1)(2, 3)); // 6\nconsole.log(curriedAdd(1, 2, 3)); // 6\n```\n\nメインライブラリの curry との比較:\n\n```typescript\n// compat バージョン (柔軟、ただし遅い)\nimport { curry } from 'es-toolkit/compat';\nconst curriedCompat = curry(add);\ncurriedCompat(1, 2)(3); // サポート\ncurriedCompat(1)(curry.placeholder, 3)(2); // プレースホルダーサポート\n\n// メインライブラリバージョン (より速い、ただし一度に一つずつのみ)\nimport { curry } from 'es-toolkit';\nconst curriedMain = curry(add);\ncurriedMain(1)(2)(3); // サポート\ncurriedMain(1, 2)(3); // サポートされていない\n```\n\nプレースホルダー機能の使用:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction greet(greeting, name, punctuation) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst curriedGreet = curry(greet);\n\n// プレースホルダーで中間引数をスキップ\nconst greetWithExclamation = curriedGreet(curry.placeholder, curry.placeholder, '!');\nconsole.log(greetWithExclamation('Hello', 'John')); // \"Hello, John!\"\n\nconst sayHello = curriedGreet('Hello');\nconsole.log(sayHello(curry.placeholder, '~')('Jane')); // \"Hello, Jane~\"\n```\n\n関数型プログラミングでの活用:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// マッピング関数を作成\nconst map = curry((fn, array) => array.map(fn));\nconst filter = curry((predicate, array) => array.filter(predicate));\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 再利用可能な関数を生成\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\n\nconst mapDouble = map(double);\nconst filterEven = filter(isEven);\n\nconsole.log(mapDouble(numbers)); // [2, 4, 6, 8, 10]\nconsole.log(filterEven(numbers)); // [2, 4]\n\n// 関数合成\nconst processNumbers = nums => mapDouble(filterEven(nums));\nconsole.log(processNumbers(numbers)); // [4, 8]\n```\n\nAPI クライアントの構成:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction apiRequest(method, baseUrl, endpoint, options) {\n  return fetch(`${baseUrl}${endpoint}`, {\n    method,\n    ...options,\n  });\n}\n\nconst curriedApiRequest = curry(apiRequest);\n\n// デフォルト設定で特化した関数を生成\nconst apiGet = curriedApiRequest('GET', 'https://api.example.com');\nconst apiPost = curriedApiRequest('POST', 'https://api.example.com');\n\n// 認証ヘッダーを含む\nconst authenticatedPost = apiPost(curry.placeholder, {\n  headers: { Authorization: 'Bearer token123' },\n});\n\n// 使用\napiGet('/users'); // GET https://api.example.com/users\nauthenticatedPost('/users'); // POST with auth headers\n```\n\n数学演算関数:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nconst calculate = curry((operation, a, b) => {\n  switch (operation) {\n    case '+':\n      return a + b;\n    case '-':\n      return a - b;\n    case '*':\n      return a * b;\n    case '/':\n      return a / b;\n    default:\n      throw new Error('サポートされていない演算');\n  }\n});\n\n// 特化した演算関数\nconst add = calculate('+');\nconst subtract = calculate('-');\nconst multiply = calculate('*');\n\nconsole.log(add(5, 3)); // 8\nconsole.log(subtract(10)(4)); // 6\nconsole.log(multiply(3, 4)); // 12\n\n// プレースホルダーで第二オペランドを固定\nconst addFive = calculate('+', curry.placeholder, 5);\nconsole.log(addFive(10)); // 15\n```\n\n引数個数の指定:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return [a, b, c, rest];\n}\n\n// 引数個数を 3 に制限\nconst curriedFixed = curry(variableArgsFunction, 3);\n\nconsole.log(curriedFixed(1)(2)(3)); // [1, 2, 3, []]\nconsole.log(curriedFixed(1, 2)(3)); // [1, 2, 3, []]\n\n// 引数個数なしで使用 (デフォルト値: function.length)\nconst curriedDefault = curry(variableArgsFunction); // arity = 3\n```\n\nシンプルなカリー化の代替:\n\n```typescript\n// curry を使用\nconst curriedAdd = curry((a, b, c) => a + b + c);\n\n// 手動クロージャ (より速い)\nconst manualCurry = a => b => c => a + b + c;\n\n// どちらも同じ結果\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(manualCurry(1)(2)(3)); // 6\n```\n\nコンストラクタ関数もサポート:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city;\n}\n\nconst CurriedPerson = curry(Person);\nconst SeoulPerson = CurriedPerson(curry.placeholder, curry.placeholder, 'Seoul');\n\nconst person1 = new SeoulPerson('John', 30);\nconst person2 = new SeoulPerson('Jane', 25);\n\nconsole.log(person1.city); // \"Seoul\"\nconsole.log(person2.city); // \"Seoul\"\n```\n\n#### パラメータ\n\n- `func` (`Function`): カリー化する関数。\n- `arity` (`number`, オプション): 関数の引数個数。省略すると `func.length` が使用されます。\n\n#### 戻り値\n\n(`Function & { placeholder: symbol }`): カリー化された関数を返します。`placeholder` プロパティで引数の位置を制御できます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/curryRight.md",
    "content": "# curryRight (Lodash 互換性)\n\n::: warning `es-toolkit` の [`curryRight`](../../function/curryRight.md) または手動クロージャを使用してください\n\nこの `curryRight` 関数は、複雑なプレースホルダー処理、引数数の検証、引数合成ロジックにより動作が遅くなります。\n\nプレースホルダーが不要な場合は、より高速な `es-toolkit` の [`curryRight`](../../function/curryRight.md) またはシンプルなクロージャを使用してください。\n\n:::\n\n関数を右からカリー化し、最後の引数から1つずつまたは複数ずつ受け取ることができる関数を作成します。\n\n```typescript\nconst curriedFunction = curryRight(func, arity);\n```\n\n## 使用法\n\n### `curryRight(func, arity)`\n\n関数を右からカリー化し、最後の引数から部分適用したい場合は `curryRight` を使用します。通常の `curry` とは異なり、最後の引数から先に処理します。\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction subtract(a, b, c) {\n  return a - b - c;\n}\n\nconst curriedSubtract = curryRight(subtract);\n\n// 右から(最後の引数から)カリー化\nconsole.log(curriedSubtract(1)(2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1, 2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1)(2, 5)); // 2 - 5 - 1 = -4\nconsole.log(curriedSubtract(1, 2, 5)); // 1 - 2 - 5 = -6\n```\n\n`curry` と `curryRight` の違い:\n\n```typescript\nimport { curry, curryRight } from 'es-toolkit/compat';\n\nfunction divide(a, b, c) {\n  return a / b / c;\n}\n\n// 通常の curry(左から)\nconst leftCurried = curry(divide);\nconsole.log(leftCurried(12)(3)(2)); // ((12 / 3) / 2) = 2\n\n// curryRight(右から)\nconst rightCurried = curryRight(divide);\nconsole.log(rightCurried(2)(3)(12)); // ((12 / 3) / 2) = 2\n// 最後に渡した 12 が最初の引数(a)になる\n```\n\nメインライブラリとの比較:\n\n```typescript\n// compat バージョン(柔軟だが遅い)\nimport { curryRight } from 'es-toolkit/compat';\nconst curriedCompat = curryRight(subtract);\ncurriedCompat(1, 2)(3); // サポート\ncurriedCompat(1)(curryRight.placeholder, 3)(2); // プレースホルダーサポート\n\n// メインライブラリバージョン(より高速だが一度に1つのみ)\nimport { curryRight } from 'es-toolkit';\nconst curriedMain = curryRight(subtract);\ncurriedMain(1)(2)(3); // サポート\ncurriedMain(1, 2)(3); // サポートされていない\n```\n\nプレースホルダー機能の使用:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction formatMessage(name, action, time) {\n  return `${name}さんが${action}を${time}に行いました`;\n}\n\nconst curriedFormat = curryRight(formatMessage);\n\n// プレースホルダーで特定の位置をスキップ\nconst todayAction = curriedFormat('今日');\nconst todayLoginAction = todayAction(curryRight.placeholder, 'ログイン');\n\nconsole.log(todayLoginAction('田中'));\n// \"田中さんがログインを今日に行いました\"\n\n// 時間を先に固定\nconst morningFormat = curriedFormat('朝9時');\nconsole.log(morningFormat('コメント作成', '佐藤'));\n// \"佐藤さんがコメント作成を朝9時に行いました\"\n```\n\n配列処理での活用:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 配列の末尾から特定の数だけ取得\nfunction takeFromEnd(array, count, separator = ', ') {\n  return array.slice(-count).join(separator);\n}\n\nconst curriedTake = curryRight(takeFromEnd);\n\n// カンマ区切りの関数を作成\nconst takeWithComma = curriedTake(', ');\n\n// 最後の3つを取得\nconst takeLast3 = takeWithComma(3);\n\nconst fruits = ['りんご', 'バナナ', 'オレンジ', 'ぶどう', 'キウイ'];\nconsole.log(takeLast3(fruits)); // \"オレンジ, ぶどう, キウイ\"\n\n// 異なる区切り文字を使用\nconst takeWithDash = curriedTake(' - ');\nconsole.log(takeWithDash(2, fruits)); // \"ぶどう - キウイ\"\n```\n\n関数合成での活用:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// ログ出力関数\nfunction logWithPrefix(message, level, timestamp) {\n  return `[${timestamp}] ${level}: ${message}`;\n}\n\nconst curriedLog = curryRight(logWithPrefix);\n\n// 現在時刻で固定\nconst currentTimeLog = curriedLog(new Date().toISOString());\n\n// レベル別のロガーを作成\nconst errorLog = currentTimeLog('ERROR');\nconst infoLog = currentTimeLog('INFO');\nconst debugLog = currentTimeLog('DEBUG');\n\n// 使用\nconsole.log(errorLog('データベース接続失敗'));\nconsole.log(infoLog('サーバー起動'));\nconsole.log(debugLog('ユーザーリクエスト処理中'));\n```\n\n関数型プログラミングパイプライン:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// データ変換関数\nconst mapWith = curryRight((array, fn) => array.map(fn));\nconst filterWith = curryRight((array, predicate) => array.filter(predicate));\nconst reduceWith = curryRight((array, reducer, initial) => array.reduce(reducer, initial));\n\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n// 変換関数を定義\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\nconst sum = (acc, val) => acc + val;\n\n// パイプラインを構成(右から優先)\nconst processNumbers = nums => {\n  return reduceWith(filterWith(mapWith(nums, double), isEven), sum, 0);\n};\n\nconsole.log(processNumbers(numbers)); // すべての数を2倍にして偶数のみフィルタリングして合計\n```\n\nAPI リクエストビルダー:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction makeRequest(url, method, headers, body) {\n  return fetch(url, { method, headers, body });\n}\n\nconst curriedRequest = curryRight(makeRequest);\n\n// body から設定\nconst withJsonBody = curriedRequest(JSON.stringify({ data: 'test' }));\n\n// headers を追加\nconst withHeaders = withJsonBody({\n  'Content-Type': 'application/json',\n  Authorization: 'Bearer token123',\n});\n\n// POST メソッドを設定\nconst postRequest = withHeaders('POST');\n\n// 最終的な使用\npostRequest('/api/data')\n  .then(response => response.json())\n  .then(data => console.log(data));\n```\n\n手動カリー化の代替:\n\n```typescript\n// curryRight を使用\nconst curriedSubtract = curryRight((a, b, c) => a - b - c);\n\n// 手動クロージャ(より高速、右から)\nconst manualCurryRight = c => b => a => a - b - c;\n\n// 両方とも同じ結果\nconsole.log(curriedSubtract(1)(2)(5)); // 2\nconsole.log(manualCurryRight(1)(2)(5)); // 2\n```\n\n引数数の指定:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return { a, b, c, rest };\n}\n\n// 引数数を3に制限(rest は無視)\nconst curriedFixed = curryRight(variableArgsFunction, 3);\n\n// 右から c, b, a の順序で受け取る\nconsole.log(curriedFixed(3)(2)(1)); // { a: 1, b: 2, c: 3, rest: [] }\n```\n\n#### パラメータ\n\n- `func` (`Function`): 右からカリー化する関数です。\n- `arity` (`number`, オプション): 関数の引数数です。省略すると `func.length` が使用されます。\n\n#### 戻り値\n\n(`Function & { placeholder: symbol }`): 右からカリー化された関数を返します。`placeholder` プロパティで引数の位置を制御できます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/debounce.md",
    "content": "# debounce (Lodash 互換)\n\n::: warning `es-toolkit` の [`debounce`](../../function/debounce.md) を使用してください\n\nこの `debounce` 関数は、複雑な `maxWait` 処理と Lodash 互換のオプション構造によるオーバーヘッドがあります。\n\n代わりに、より高速で現代的な `es-toolkit` の [`debounce`](../../function/debounce.md) を使用してください。\n\n:::\n\n関数呼び出しを遅延させ、最後の呼び出しから指定された時間が経過した後にのみ実行されるデバウンス関数を作成します。\n\n```typescript\nconst debouncedFunction = debounce(func, wait, options);\n```\n\n## 使用法\n\n### `debounce(func, wait, options)`\n\n関数呼び出しを遅延させたい場合は `debounce` を使用してください。検索入力、スクロールイベント、ボタンクリックなどでの過度な呼び出しを防ぐのに便利です。\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst searchFunction = debounce(query => {\n  console.log('検索:', query);\n}, 300);\n\n// 300ms 以内に再度呼び出されなければ実行される\nsearchFunction('React'); // 実行されない\nsearchFunction('Vue'); // 実行されない\nsearchFunction('Angular'); // 300ms 後に \"検索: Angular\" と出力\n```\n\nメインライブラリの debounce との比較:\n\n```typescript\n// compat バージョン(Lodash 互換、maxWait などの追加オプション)\nimport { debounce } from 'es-toolkit/compat';\nconst debouncedCompat = debounce(func, 300, {\n  leading: true,\n  trailing: false,\n  maxWait: 1000\n});\n\n// メインライブラリバージョン(より高速でシンプル)\nimport { debounce } from 'es-toolkit';\nconst debouncedMain = debounce(func, 300, {\n  edges: ['leading'] // leading/trailing の代わりに edges を使用\n});\n```\n\nleading と trailing オプション:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst func = () => console.log('実行されました');\n\n// leading: true - 最初の呼び出し時に即座に実行\nconst leadingDebounce = debounce(func, 1000, { leading: true });\nleadingDebounce(); // 即座に \"実行されました\" と出力\nleadingDebounce(); // 1秒待機\n// 1秒後に追加の実行なし\n\n// trailing: true(デフォルト) - 最後の呼び出し後の遅延時間後に実行\nconst trailingDebounce = debounce(func, 1000, { trailing: true });\ntrailingDebounce(); // 1秒待機\ntrailingDebounce(); // 1秒待機(前のタイマーをキャンセル)\n// 1秒後に \"実行されました\" と出力\n\n// 両方とも true - 開始時と終了時に実行\nconst bothDebounce = debounce(func, 1000, {\n  leading: true,\n  trailing: true,\n});\nbothDebounce(); // 即座に \"実行されました\" と出力\nbothDebounce(); // 1秒待機\n// 1秒後に \"実行されました\" と出力(trailing)\n```\n\nmaxWait オプション:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 最大2秒ごとには必ず実行\nconst debouncedWithMaxWait = debounce(() => console.log('保存されました'), 500, { maxWait: 2000 });\n\n// 高速に連続呼び出しされても、最大2秒ごとに実行される\nsetInterval(() => {\n  debouncedWithMaxWait();\n}, 100); // 100ms ごとに呼び出されるが、2秒ごとに \"保存されました\" と出力\n```\n\n実際の検索例:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass SearchComponent {\n  constructor() {\n    this.searchInput = document.getElementById('search');\n\n    // ユーザー入力を 300ms デバウンス\n    this.debouncedSearch = debounce(this.performSearch.bind(this), 300, {\n      leading: false, // 入力開始時に即座に検索しない\n      trailing: true, // 入力停止後に検索\n    });\n\n    this.searchInput.addEventListener('input', e => {\n      this.debouncedSearch(e.target.value);\n    });\n  }\n\n  performSearch(query) {\n    if (query.length < 2) return;\n\n    console.log('API 呼び出し:', query);\n    // fetch(`/api/search?q=${query}`)...\n  }\n}\n```\n\nスクロールイベントの最適化:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// スクロールイベントを 100ms デバウンスするが、最大 500ms ごとには実行\nconst optimizedScrollHandler = debounce(\n  () => {\n    const scrollTop = window.pageYOffset;\n    console.log('スクロール位置:', scrollTop);\n\n    // ヘッダーの非表示/表示ロジック\n    if (scrollTop > 100) {\n      document.header.classList.add('hidden');\n    } else {\n      document.header.classList.remove('hidden');\n    }\n  },\n  100,\n  { maxWait: 500 }\n);\n\nwindow.addEventListener('scroll', optimizedScrollHandler);\n```\n\nAPI 呼び出しの制限:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass AutoSave {\n  constructor() {\n    // 500ms デバウンス、最大5秒ごとには保存\n    this.debouncedSave = debounce(this.saveToServer.bind(this), 500, { maxWait: 5000 });\n  }\n\n  onTextChange(content) {\n    this.pendingContent = content;\n    this.debouncedSave();\n  }\n\n  saveToServer() {\n    if (!this.pendingContent) return;\n\n    console.log('サーバーに保存:', this.pendingContent);\n    // fetch('/api/save', { ... })\n\n    this.pendingContent = null;\n  }\n}\n```\n\ncancel と flush メソッド:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst debouncedFunc = debounce(() => {\n  console.log('実行されました');\n}, 1000);\n\ndebouncedFunc(); // 1秒待機中\n\n// 待機中の実行をキャンセル\ndebouncedFunc.cancel();\n\n// または即座に実行\ndebouncedFunc(); // 1秒待機開始\ndebouncedFunc.flush(); // 即座に \"実行されました\" と出力し、タイマーをキャンセル\n```\n\nボタンクリックの重複防止:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleSubmit = debounce(\n  async formData => {\n    console.log('フォーム送信中...');\n    try {\n      const response = await fetch('/api/submit', {\n        method: 'POST',\n        body: formData,\n      });\n      console.log('送信完了');\n    } catch (error) {\n      console.error('送信失敗:', error);\n    }\n  },\n  1000,\n  { leading: true, trailing: false } // 最初のクリックのみ処理\n);\n\ndocument.getElementById('submit-btn').addEventListener('click', e => {\n  const formData = new FormData(e.target.form);\n  handleSubmit(formData);\n});\n```\n\nリサイズイベント処理:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleResize = debounce(\n  () => {\n    const width = window.innerWidth;\n    const height = window.innerHeight;\n\n    console.log('ウィンドウサイズ変更:', { width, height });\n\n    // レイアウトの再計算\n    recalculateLayout();\n  },\n  250,\n  { leading: false, trailing: true }\n);\n\nwindow.addEventListener('resize', handleResize);\n\n// ページ終了時にクリーンアップ\nwindow.addEventListener('beforeunload', () => {\n  handleResize.cancel();\n});\n```\n\n#### パラメータ\n\n- `func` (`Function`): デバウンスする関数です。\n- `wait` (`number`, オプション): 遅延するミリ秒数です。デフォルトは `0` です。\n- `options` (`DebounceSettings`, オプション): オプションオブジェクトです。\n  - `leading` (`boolean`): `true` の場合、遅延開始時点で関数を実行します。デフォルトは `false` です。\n  - `trailing` (`boolean`): `true` の場合、遅延終了時点で関数を実行します。デフォルトは `true` です。\n  - `maxWait` (`number`): 関数実行が遅延できる最大時間です。デフォルトは `Infinity` です。\n\n#### 戻り値\n\n(`DebouncedFunc`): デバウンスされた関数を返します。`cancel()` と `flush()` メソッドが含まれています。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/defer.md",
    "content": "# defer (Lodash 互換性)\n\n::: warning `setTimeout`を使用してください\n\nこの `defer` 関数は、内部的に `setTimeout(func, 1, ...args)` を呼び出す単純なラッパー関数です。\n\n代わりに、より直接的で現代的な `setTimeout` を使用してください。\n\n:::\n\n関数を次のイベントループで実行するように遅延させます。\n\n```typescript\nconst timerId = defer(func, ...args);\n```\n\n## 使用法\n\n### `defer(func, ...args)`\n\n現在のコールスタックが終了した後に関数を実行したい場合は、`defer`を使用してください。関数の実行を次のイベントループに遅らせながら、追加の引数を関数に渡すことができます。\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// コンソール出力を遅延させます\ndefer(console.log, 'deferred message');\n// 現在のコールスタックが終了した後に 'deferred message' を出力します\n\n// 関数と引数を一緒に遅延実行します\nconst greet = (name: string, greeting: string) => {\n  console.log(`${greeting}, ${name}!`);\n};\n\ndefer(greet, 'John', 'Hello');\n// 現在のコールスタックが終了した後に 'Hello, John!' を出力します\n```\n\n内部的に `setTimeout(func, 1, ...args)` を使用して、1ミリ秒後に関数を実行します。\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// 次の2つのコードは同じように動作します\ndefer(console.log, 'message');\nsetTimeout(console.log, 1, 'message');\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): 遅延実行する関数です。\n- `...args` (`any[]`): 関数に渡す引数です。\n\n#### 戻り値\n\n(`number`): `setTimeout`から返されたタイマーIDを返します。`clearTimeout`で実行をキャンセルできます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/delay.md",
    "content": "# delay (Lodash 互換性)\n\n::: warning `setTimeout`を使用してください\n\nこの `delay` 関数は `setTimeout` の単純なラッパーですが、追加の型検証と数値変換によりわずかなオーバーヘッドがあります。\n\n代わりに、より高速で標準的な `setTimeout` を直接使用してください。\n\n:::\n\n指定された時間後に関数を実行するタイマーを設定します。\n\n```typescript\nconst timerId = delay(func, wait, ...args);\n```\n\n## 使用法\n\n### `delay(func, wait, ...args)`\n\n関数の実行を特定の時間だけ遅延させたい場合は `delay` を使用してください。アニメーションのタイミング、ユーザーフィードバックの遅延、非同期操作のスケジューリングに便利です。\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\n// 基本的な使い方\nconst timerId = delay(() => {\n  console.log('1秒後に実行されました');\n}, 1000);\n\n// 引数と一緒に使用\ndelay(\n  (name, age) => {\n    console.log(`こんにちは、${age}歳の${name}さん！`);\n  },\n  2000,\n  '山田太郎',\n  30\n);\n// 2秒後：「こんにちは、30歳の山田太郎さん！」を出力\n```\n\n`setTimeout` との比較：\n\n```typescript\n// delay を使用\nimport { delay } from 'es-toolkit/compat';\n\nconst timerId1 = delay(myFunction, 1000, 'arg1', 'arg2');\n\n// setTimeout を使用（より高速、標準）\nconst timerId2 = setTimeout(myFunction, 1000, 'arg1', 'arg2');\n\n// またはアロー関数で\nconst timerId3 = setTimeout(() => myFunction('arg1', 'arg2'), 1000);\n```\n\nアニメーションシーケンス：\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass AnimationSequence {\n  constructor(element) {\n    this.element = element;\n  }\n\n  fadeInSequence() {\n    // 即座に開始\n    this.element.style.opacity = '0';\n    this.element.style.display = 'block';\n\n    // 100ms後にフェードイン開始\n    delay(() => {\n      this.element.style.transition = 'opacity 500ms ease-in';\n      this.element.style.opacity = '1';\n    }, 100);\n\n    // 1秒後にスケールアニメーション\n    delay(() => {\n      this.element.style.transform = 'scale(1.1)';\n    }, 1000);\n\n    // 1.5秒後に元のサイズに\n    delay(() => {\n      this.element.style.transform = 'scale(1)';\n    }, 1500);\n  }\n}\n```\n\nタイマーのキャンセル：\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass TimerManager {\n  constructor() {\n    this.timers = new Map();\n  }\n\n  setDelayedTask(id, task, delayMs) {\n    // 既存のタイマーがあればキャンセル\n    this.cancelTask(id);\n\n    const timerId = delay(task, delayMs);\n    this.timers.set(id, timerId);\n\n    return timerId;\n  }\n\n  cancelTask(id) {\n    const timerId = this.timers.get(id);\n    if (timerId) {\n      clearTimeout(timerId);\n      this.timers.delete(id);\n      return true;\n    }\n    return false;\n  }\n\n  cancelAllTasks() {\n    this.timers.forEach(timerId => clearTimeout(timerId));\n    this.timers.clear();\n  }\n}\n\nconst timerManager = new TimerManager();\n\n// タスクをスケジュール\ntimerManager.setDelayedTask(\n  'save',\n  () => {\n    console.log('自動保存されました');\n  },\n  5000\n);\n\ntimerManager.setDelayedTask(\n  'cleanup',\n  () => {\n    console.log('クリーンアップ完了');\n  },\n  10000\n);\n\n// 必要に応じて特定のタスクをキャンセル\n// timerManager.cancelTask('save');\n\n// ページのアンロード時にすべてのタイマーをクリーンアップ\nwindow.addEventListener('beforeunload', () => {\n  timerManager.cancelAllTasks();\n});\n```\n\n#### パラメータ\n\n- `func` (`Function`): 遅延後に実行する関数です。\n- `wait` (`number`): 遅延するミリ秒数です。\n- `args` (`...any[]`): 関数実行時に渡す引数です。\n\n#### 戻り値\n\n(`number`): タイマーIDを返します。`clearTimeout()`でキャンセルできます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/flip.md",
    "content": "# flip (Lodash 互換性)\n\n::: warning 直接的な引数の反転を使用してください\nこの `flip` 関数は、単に関数の引数の順序を逆にするだけです。ほとんどの場合、より簡単な方法で置き換えることができます。\n\n代わりに、より高速で現代的な `(...args) => func(...args.reverse())` や直接的な引数の渡し方を使用してください。\n:::\n\n与えられた関数の引数の順序を逆にする関数を作成します。\n\n```typescript\nconst flippedFunc = flip(func);\n```\n\n## 使用法\n\n### `flip(func)`\n\n引数の順序を逆にして新しい関数を作成したい場合は `flip` を使用してください。元の関数が最初の引数から順に受け取っていたものを、最後の引数から受け取るように変更します。\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst flipped = flip(greet);\nflipped('John', 'Hello'); // 'Hello, John!'\n\n// 元の関数は (greeting, name) の順序ですが\n// 反転した関数は (name, greeting) の順序で受け取ります\n```\n\n複数の引数を受け取る関数でも、すべての引数の順序が逆になります。\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction fn(a: string, b: string, c: string, d: string) {\n  return [a, b, c, d];\n}\n\nconst flipped = flip(fn);\nflipped('1', '2', '3', '4'); // ['4', '3', '2', '1']\n```\n\n#### パラメータ\n\n- `func` (`F`): 引数の順序を逆にする関数です。\n\n#### 戻り値\n\n(`(...args: Reversed<Parameters<F>>) => ReturnType<F>`): 引数の順序が逆になった新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/flow.md",
    "content": "# flow (Lodash 互換性)\n\n::: warning `es-toolkit` の `flow` を使用してください\nこの `flow` 関数は Lodash 互換性のために配列のフラット化処理が追加されており、複雑です。\n\n代わりに、より高速で現代的な `es-toolkit` の [flow](../../function/flow.md) を使用してください。\n:::\n\n与えられた関数を左から右へ順次実行する新しい関数を作成します。\n\n```typescript\nconst combinedFunc = flow(...functions);\n```\n\n## 使用法\n\n### `flow(...functions)`\n\n複数の関数を左から右へ順次実行する1つの合成関数を作成したい場合は `flow` を使用してください。データ変換パイプラインを作成する際に便利です。\n\n```typescript\nimport { flow } from 'es-toolkit/compat';\n\n// 基本的な使い方\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 左から右へ実行: double(square(add(x, y)))\nconst calculate = flow(add, square, double);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 配列で関数を渡す\nconst calculate2 = flow([add, square], double);\nconsole.log(calculate2(2, 3)); // 50\n\n// 現代的な代替案（推奨）\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// パイプ演算子を使用（将来の JavaScript）\nconst pipeCalculate = (x, y) => add(x, y) |> square |> double;\n\n// またはチェーンパターン\nclass Calculator {\n  constructor(value) {\n    this.value = value;\n  }\n\n  add(n) {\n    this.value += n;\n    return this;\n  }\n\n  square() {\n    this.value *= this.value;\n    return this;\n  }\n\n  double() {\n    this.value *= 2;\n    return this;\n  }\n\n  valueOf() {\n    return this.value;\n  }\n}\n\nconst chainedResult = new Calculator(3).square().double().valueOf(); // 18\n```\n\n#### パラメータ\n\n- `...functions` (`Array<Function | Function[]>`): 左から右へ実行する関数です。配列で渡すこともできます。\n\n#### 戻り値\n\n(`Function`): すべての関数を左から右へ順次実行する新しい合成関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/flowRight.md",
    "content": "# flowRight (Lodash 互換性)\n\n::: warning `es-toolkit` の `flowRight` を使用してください\nこの `flowRight` 関数は Lodash 互換性のために配列のフラット化処理が追加されており、複雑です。\n\n代わりに、より高速で現代的な `es-toolkit` の [flowRight](../../function/flowRight.md) を使用してください。\n:::\n\n与えられた関数を右から左へ順次実行する新しい関数を作成します。\n\n```typescript\nconst combinedFunc = flowRight(...functions);\n```\n\n## 使用法\n\n### `flowRight(...functions)`\n\n複数の関数を右から左へ順次実行する1つの合成関数を作成したい場合は `flowRight` を使用してください。データ変換パイプラインを作成する際に便利です。\n\n```typescript\nimport { flowRight } from 'es-toolkit/compat';\n\n// 基本的な使い方\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 右から左へ実行: double(square(add(x, y)))\nconst calculate = flowRight(double, square, add);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 配列で関数を渡す\nconst calculate2 = flowRight([double, square], add);\nconsole.log(calculate2(2, 3)); // 50\n\n// 現代的な代替案（推奨）\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// または関数チェーンを使用\nconst chainedCalculate = (x, y) => [x, y]\n  .reduce((acc, val, idx) => idx === 0 ? val : acc + val)\n  .valueOf()\n  |> (n => n * n)\n  |> (n => n * 2);\n```\n\n一般的に `flow` と反対の順序で動作します。合成関数と似た方式で動作するため直感的です。\n\n#### パラメータ\n\n- `...functions` (`Array<Function | Function[]>`): 右から左へ実行する関数です。配列で渡すこともできます。\n\n#### 戻り値\n\n(`Function`): すべての関数を右から左へ順次実行する新しい合成関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/identity.md",
    "content": "# identity (Lodash 互換性)\n\n::: warning `es-toolkit` の `identity` を使用してください\nこの `identity` 関数は `es-toolkit` のメインライブラリにも同じ機能の関数があります。単に入力値をそのまま返す機能です。\n\n代わりに、より高速で現代的な `es-toolkit` の [identity](../../function/identity.md) を使用してください。\n:::\n\n受け取った値をそのまま返します。\n\n```typescript\nconst result = identity(value);\n```\n\n## 使用法\n\n### `identity(value)`\n\n受け取った値をそのまま返したい場合は `identity` を使用してください。主にデフォルト値やプレースホルダー関数として使用され、関数型プログラミングでよく使われます。\n\n```typescript\nimport { identity } from 'es-toolkit/compat';\n\n// 基本的な使い方\nconsole.log(identity(5)); // 5\nconsole.log(identity('hello')); // 'hello'\nconsole.log(identity({ key: 'value' })); // { key: 'value' }\n\n// 配列の map と一緒に使用（値のコピー）\nconst numbers = [1, 2, 3, 4, 5];\nconst copied = numbers.map(identity);\nconsole.log(copied); // [1, 2, 3, 4, 5]\n\n// フィルタリングでデフォルト値として使用\nconst values = [1, 0, '', 'hello', null, undefined, false, true];\nconst filtered = values.filter(identity); // 真と評価される値だけを残す\nconsole.log(filtered); // [1, 'hello', true]\n\n// デフォルトの変換関数として使用\nfunction processData(data, transform = identity) {\n  return transform(data);\n}\n\nconsole.log(processData('hello')); // 'hello'\nconsole.log(processData('hello', x => x.toUpperCase())); // 'HELLO'\n```\n\nほとんどの場合、より簡単なアロー関数 `x => x` で置き換えることができます:\n\n```typescript\n// identity の代わりにアロー関数を使用（推奨）\nconst copied = numbers.map(x => x);\nconst filtered = values.filter(x => x);\n```\n\n#### パラメータ\n\n- `value` (`T`): 返す値です。\n\n#### 戻り値\n\n(`T`): 受け取った値をそのまま返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/memoize.md",
    "content": "# memoize (Lodash 互換性)\n\n::: warning `es-toolkit` の `memoize` を使用してください\nこの `memoize` 関数は `resolver` 関数の `null` チェック、`MapCache` インターフェースの複雑な型処理、そして Lodash 互換性のための追加のオーバーヘッドにより遅く動作します。\n\n代わりに、より高速で現代的な `es-toolkit` の [memoize](../../function/memoize.md) を使用してください。\n:::\n\n関数の結果をキャッシュして、同じ引数で呼び出されたときにパフォーマンスを向上させます。\n\n```typescript\nconst memoizedFunc = memoize(func, resolver);\n```\n\n## 使用法\n\n### `memoize(func, resolver)`\n\n関数の結果をメモ化して、同じ引数で呼び出されたときに以前の結果を再利用したい場合は `memoize` を使用してください。コストのかかる計算や API 呼び出しに便利です。\n\n```typescript\nimport { memoize } from 'es-toolkit/compat';\n\n// 基本的な使い方\nfunction expensiveCalculation(n) {\n  console.log('計算中...', n);\n  return n * n;\n}\n\nconst memoizedCalc = memoize(expensiveCalculation);\n\nconsole.log(memoizedCalc(5)); // '計算中... 5', 25\nconsole.log(memoizedCalc(5)); // 25 (キャッシュされた結果、計算しない)\nconsole.log(memoizedCalc(10)); // '計算中... 10', 100\n\n// カスタムリゾルバーを使用\nfunction fetchUserData(userId, includeProfile) {\n  console.log('ユーザーデータを取得中...', userId, includeProfile);\n  return { id: userId, profile: includeProfile ? 'プロフィールデータ' : null };\n}\n\n// すべての引数を考慮したキャッシュキーを生成\nconst memoizedFetch = memoize(fetchUserData, (userId, includeProfile) => {\n  return `${userId}_${includeProfile}`;\n});\n\nmemoizedFetch(1, true); // 'ユーザーデータを取得中... 1 true'\nmemoizedFetch(1, true); // キャッシュされた結果を使用\nmemoizedFetch(1, false); // 'ユーザーデータを取得中... 1 false' (異なるキャッシュキー)\n\n// キャッシュへのアクセスと変更\nconsole.log(memoizedCalc.cache.get(5)); // 25\nmemoizedCalc.cache.set(7, 49); // 手動でキャッシュを設定\nconsole.log(memoizedCalc(7)); // 49 (計算せずにキャッシュされた値を使用)\n```\n\nほとんどの場合、基本的なハッシュマップを使用しますが、必要に応じてカスタムキャッシュ実装を使用することもできます。\n\n#### パラメータ\n\n- `func` (`Function`): メモ化する関数です。\n- `resolver` (`Function`, オプション): キャッシュキーを決定する関数です。提供されない場合は最初の引数をキーとして使用します。\n\n#### 戻り値\n\n(`Function & { cache: MapCache }`): メモ化された関数を返します。返された関数には `cache` プロパティがあり、キャッシュに直接アクセスできます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/negate.md",
    "content": "# negate (Lodash 互換性)\n\n::: warning 論理否定演算子を使用してください\n\nこの `negate` 関数は単に関数の結果を否定するだけです。ほとんどの場合、論理否定演算子(`!`)を直接使用する方が簡単で高速です。\n\n代わりに、より高速で現代的な `!predicate(...args)` または `(...args) => !predicate(...args)` を使用してください。\n\n:::\n\n与えられた関数の結果を否定する新しい関数を作成します。\n\n```typescript\nconst negatedFunc = negate(predicate);\n```\n\n## 使用法\n\n### `negate(predicate)`\n\n関数の結果を否定する新しい関数を作成したい場合は、`negate` を使用してください。フィルタリングや条件文で反対の条件をチェックする際に便利です。\n\n```typescript\nimport { negate } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\nconst isOdd = negate(isEven);\nconsole.log(isOdd(3)); // true\nconsole.log(isOdd(4)); // false\n\n// 配列フィルタリングでの使用\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n\n// 現代的な代替案(推奨)\nconst modernOddNumbers = numbers.filter(n => !isEven(n));\n// または\nconst isOddModern = n => !isEven(n);\nconst modernOddNumbers2 = numbers.filter(isOddModern);\n\n// 複雑な例\nfunction isEmpty(str) {\n  return str.trim().length === 0;\n}\n\nconst hasContent = negate(isEmpty);\nconst messages = ['', ' ', 'hello', '  ', 'world'];\nconst validMessages = messages.filter(hasContent);\nconsole.log(validMessages); // ['hello', 'world']\n```\n\n主に配列フィルタリングや条件ロジックで使用されますが、ほとんどの場合、論理否定演算子を直接使用する方が直感的です。\n\n#### パラメータ\n\n- `predicate` (`Function`): 結果を否定する関数です。必ずブール値を返す必要があります。\n\n#### 戻り値\n\n(`Function`): 元の関数の結果を否定した値を返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/noop.md",
    "content": "# noop (Lodash 互換性)\n\n::: warning `es-toolkit` の `noop` を使用してください\n\n`es-toolkit` にも同じ動作をする [noop](../../function/noop.md) 関数があります。\n\n:::\n\n何もしない空の関数です。\n\n```typescript\nnoop();\n```\n\n## 使用法\n\n### `noop(...args)`\n\n何もしないプレースホルダー関数が必要な場合は `noop` を使用してください。デフォルト値やコールバック関数としてよく使われます。\n\n```typescript\nimport { noop } from 'es-toolkit/compat';\n\n// 基本的な使用法\nnoop(); // 何もしない\nnoop(1, 2, 3); // 引数を受け取るが何もしない\n\n// デフォルトのコールバックとして使用\nfunction processData(data, callback = noop) {\n  // データ処理\n  console.log('データ処理中...', data);\n\n  // コールバック呼び出し(提供されていなければ noop)\n  callback(data);\n}\n\nprocessData('テスト'); // コールバックが提供されていなくてもエラーなく動作\n\n// 現代的な代替案(推奨)\nfunction modernProcessData(data, callback = () => {}) {\n  console.log('データ処理中...', data);\n  callback(data);\n}\n\n// またはオプショナルなコールバックを使用\nfunction processDataOptional(data, callback) {\n  console.log('データ処理中...', data);\n  callback?.(data); // コールバックが提供された場合のみ呼び出し\n}\n```\n\nデフォルト値やプレースホルダーが必要な状況で便利ですが、現代の JavaScript ではオプショナルチェイニング(`?.`)やデフォルトパラメータを使用する方が一般的です。\n\n#### パラメータ\n\n- `...args` (`any[]`): どんな引数でも受け取れますが、すべて無視されます。\n\n#### 戻り値\n\n(`void`): 何も返しません。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/nthArg.md",
    "content": "# nthArg (Lodash 互換性)\n\n::: warning アロー関数を使用してください\n\nこの `nthArg` 関数は単に特定のインデックスの引数を返すラッパー関数を作成するだけです。アロー関数を使用すれば、より簡潔で明確に同じ機能を実装できます。\n\n代わりに、より高速で現代的なアロー関数を使用してください。\n\n:::\n\n指定したインデックスの引数を返す関数を生成します。\n\n```typescript\nconst getNthArg = nthArg(n);\n```\n\n## 使用法\n\n### `nthArg(n)`\n\n関数の特定の位置にある引数だけが必要な場合は `nthArg` を使用してください。負のインデックスを使用すると、末尾から計算します。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 2番目の引数を取得する関数を生成\nconst getSecondArg = nthArg(1);\ngetSecondArg('a', 'b', 'c', 'd');\n// Returns: 'b'\n\n// 最後から2番目の引数を取得する関数を生成\nconst getPenultimateArg = nthArg(-2);\ngetPenultimateArg('a', 'b', 'c', 'd');\n// Returns: 'c'\n\n// 最初の引数を取得する関数を生成(デフォルト)\nconst getFirstArg = nthArg();\ngetFirstArg('a', 'b', 'c');\n// Returns: 'a'\n```\n\n配列メソッドと一緒に使用すると便利です。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 各配列の2番目の要素のみを抽出\nconst arrays = [\n  [1, 2, 3],\n  [4, 5, 6],\n  [7, 8, 9],\n];\narrays.map(nthArg(1));\n// Returns: [2, 5, 8]\n```\n\n負のインデックスは末尾から計算します。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 最後の引数を取得する関数\nconst getLastArg = nthArg(-1);\ngetLastArg('first', 'middle', 'last');\n// Returns: 'last'\n```\n\n#### パラメータ\n\n- `n` (`number`, オプション): 返す引数のインデックスです。負の値は末尾から計算します。デフォルト値は `0` です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 指定したインデックスの引数を返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/once.md",
    "content": "# once (Lodash 互換性)\n\n::: warning `es-toolkit` の `once` を使用してください\n\nこの `once` 関数は、`es-toolkit` のメインライブラリ [once](../../function/once.md) 関数と同じ機能を持っています。\n\n:::\n\n関数が1回だけ呼び出されるように制限します。\n\n```typescript\nconst limitedFunc = once(func);\n```\n\n## 使用法\n\n### `once(func)`\n\n関数を1回だけ呼び出すように制限したい場合は `once` を使用してください。最初の呼び出し後は結果がキャッシュされ、同じ値を返します。\n\n```typescript\nimport { once } from 'es-toolkit/compat';\n\n// 基本的な使用法\nlet count = 0;\nconst increment = once(() => {\n  count++;\n  console.log('カウンター増加:', count);\n  return count;\n});\n\nincrement(); // 'カウンター増加: 1' を出力、1 を返す\nincrement(); // 何も出力しない、1 を返す\nincrement(); // 何も出力しない、1 を返す\n\n// 実用的な例 - 初期化関数\nconst initialize = once(() => {\n  console.log('アプリケーション初期化中...');\n  // コストのかかる初期化操作\n  return '初期化完了';\n});\n\n// 複数回呼び出しても、初期化は1回だけ実行される\ninitialize(); // 'アプリケーション初期化中...' を出力\ninitialize(); // 何も出力しない\n```\n\nコストのかかる初期化操作やセットアップ関数を作成する際に便利です。例えば、データベース接続、APIトークンの初期化などに使用できます。\n\n#### パラメータ\n\n- `func` (`Function`): 1回だけ呼び出すように制限する関数です。\n\n#### 戻り値\n\n(`Function`): 1回だけ呼び出される新しい関数を返します。2回目の呼び出し以降は、最初の呼び出しの結果を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/overArgs.md",
    "content": "# overArgs (Lodash 互換性)\n\n::: warning アロー関数と直接変換を使用してください\n\nこの `overArgs` 関数は各引数を変換する複雑なラッパーを作成し、パフォーマンスが遅くなります。アロー関数を使用して引数を直接変換すれば、より明確で高速なコードを書くことができます。\n\n代わりに、より高速で現代的なアロー関数と直接変換を使用してください。\n\n:::\n\n関数の各引数を対応する変換関数で変換した後実行する新しい関数を生成します。\n\n```typescript\nconst wrapped = overArgs(func, transforms);\n```\n\n## 使用法\n\n### `overArgs(func, ...transforms)`\n\n関数を呼び出す前に各引数を変換したい場合は `overArgs` を使用してください。各引数は対応する変換関数によって処理されます。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nfunction doubled(n) {\n  return n * 2;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\n// 最初の引数は2倍、2番目の引数は二乗\nconst func = overArgs((x, y) => [x, y], [doubled, square]);\nfunc(5, 3);\n// Returns: [10, 9]\n```\n\n文字列を使用してプロパティを抽出することもできます。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst user1 = { name: 'John', age: 30 };\nconst user2 = { name: 'Jane', age: 25 };\n\n// 各オブジェクトからプロパティを抽出\nconst getUserInfo = overArgs((name, age) => `${name} is ${age} years old`, ['name', 'age']);\ngetUserInfo(user1, user2);\n// Returns: \"John is 25 years old\"\n```\n\n変換関数が提供されていないか `null`/`undefined` の場合、引数はそのまま渡されます。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2, null, n => n * 3]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 45]\n```\n\n変換関数の数より多い引数はそのまま渡されます。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 15]\n```\n\nオブジェクトとの一致を確認することもできます。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((match1, match2) => [match1, match2], [{ age: 30 }, { active: true }]);\n\nfunc({ name: 'John', age: 30 }, { active: true, status: 'online' });\n// Returns: [true, true]\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): ラップする関数です。\n- `...transforms` (`Array<(...args: any[]) => any | string | object | array>`): 引数を変換する関数です。各変換は次のいずれかになります:\n  - 値を受け取って返す関数\n  - プロパティ値を取得する文字列(例: 'name' は name プロパティを取得)\n  - 引数がプロパティと一致するか確認するオブジェクト\n  - プロパティの一致を確認する [プロパティ, 値] 配列\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 引数を変換した後元の関数を呼び出す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/partial.md",
    "content": "# partial (Lodash 互換性)\n\n::: warning `es-toolkit` の `partial` を使用してください\n\nこの `partial` 関数は多くのオーバーロードとユニオン型処理により非効率的です。また、ほとんどの場合、より簡単なアロー関数で代替できます。\n\n代わりに、より高速で現代的な `es-toolkit` の [`partial`](../../function/partial.md) を使用してください。\n\n:::\n\n関数の引数を事前に埋めて部分適用された関数を作成します。\n\n```typescript\nconst partialFunc = partial(func, ...args);\n```\n\n## 使用法\n\n### `partial(func, ...args)`\n\n関数の引数を事前に埋めて部分適用された関数を作成したい場合は `partial` を使用してください。主に引数の順序が重要な関数で最初の引数を固定する際に便利です。\n\n```typescript\nimport { partial } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 最初の引数を事前設定\nconst sayHello = partial(greet, 'Hello');\nsayHello('Alice', '!'); // 'Hello Alice!'\n\n// 複数の引数を事前設定\nconst greetAlice = partial(greet, 'Hello', 'Alice');\ngreetAlice('!'); // 'Hello Alice!'\n\n// placeholder を使用して引数の順序を調整\nconst greetWithExclamation = partial(greet, partial.placeholder, 'Alice', '!');\ngreetWithExclamation('Hi'); // 'Hi Alice!'\n```\n\nほとんどの場合、アロー関数で代替できます:\n\n```typescript\n// partial の代わりにアロー関数を使用(推奨)\nconst sayHello = (name, punctuation) => greet('Hello', name, punctuation);\nconst greetAlice = punctuation => greet('Hello', 'Alice', punctuation);\n```\n\n#### パラメータ\n\n- `func` (`Function`): 部分適用する関数です。\n- `...args` (`any[]`): 事前に埋める引数です。`partial.placeholder` を使用して引数の順序を調整できます。\n\n#### 戻り値\n\n(`Function`): 引数が事前に埋められた新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/partialRight.md",
    "content": "# partialRight (Lodash 互換性)\n\n::: warning `es-toolkit` の `partialRight` を使用してください\n\nこの `partialRight` 関数は多くのオーバーロードとユニオン型処理により非効率的です。また、ほとんどの場合、より簡単なアロー関数で代替できます。\n\n代わりに、より高速で現代的な `es-toolkit` の [`partialRight`](../../function/partialRight.md) を使用してください。\n\n:::\n\n関数の右側から引数を事前に埋めて部分適用された関数を作成します。\n\n```typescript\nconst partialFunc = partialRight(func, ...args);\n```\n\n## 使用法\n\n### `partialRight(func, ...args)`\n\n関数の右側から引数を事前に埋めて部分適用された関数を作成したい場合は `partialRight` を使用してください。主に引数の順序が重要な関数で最後の引数を固定する際に便利です。\n\n```typescript\nimport { partialRight } from 'es-toolkit/compat';\n\n// 基本的な使用法\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 最後の引数を事前設定\nconst greetWithExclamation = partialRight(greet, '!');\ngreetWithExclamation('Hello', 'Alice'); // 'Hello Alice!'\n\n// 複数の引数を事前設定\nconst sayHiToAlice = partialRight(greet, 'Alice', '!');\nsayHiToAlice('Hi'); // 'Hi Alice!'\n\n// placeholder を使用して引数の順序を調整\nconst greetAliceWithCustom = partialRight(greet, 'Alice', partialRight.placeholder);\ngreetAliceWithCustom('Hello', '?'); // 'Hello Alice?'\n```\n\nほとんどの場合、アロー関数で代替できます:\n\n```typescript\n// partialRight の代わりにアロー関数を使用(推奨)\nconst greetWithExclamation = (greeting, name) => greet(greeting, name, '!');\nconst sayHiToAlice = greeting => greet(greeting, 'Alice', '!');\n```\n\n#### パラメータ\n\n- `func` (`Function`): 部分適用する関数です。\n- `...args` (`any[]`): 事前に埋める引数です。`partialRight.placeholder` を使用して引数の順序を調整できます。\n\n#### 戻り値\n\n(`Function`): 右側から引数が事前に埋められた新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/rearg.md",
    "content": "# rearg (Lodash 互換性)\n\n::: warning アロー関数を使用してください\n\nこの `rearg` 関数は、引数の順序を並び替える複雑なラッパーを作成するため、動作が遅くなります。アロー関数を使用して引数の順序を直接並び替えると、より明確で高速なコードを書くことができます。\n\n代わりに、より高速で現代的なアロー関数を使用してください。\n\n:::\n\n関数の引数を指定した順序で並び替える新しい関数を作成します。\n\n```typescript\nconst rearranged = rearg(func, ...indices);\n```\n\n## 使用法\n\n### `rearg(func, ...indices)`\n\n関数を呼び出すときに引数の順序を変更したい場合は、`rearg` を使用してください。指定されたインデックスの順序で引数を並び替えて、元の関数を呼び出します。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst greet = (greeting, name) => `${greeting}, ${name}!`;\n\n// 引数の順序を入れ替える(1番目、0番目)\nconst rearrangedGreet = rearg(greet, 1, 0);\nrearrangedGreet('World', 'Hello');\n// 戻り値: \"Hello, World!\"\n\n// 元の関数はそのまま\ngreet('Hello', 'World');\n// 戻り値: \"Hello, World!\"\n```\n\n配列でインデックスを渡すこともできます。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 配列でインデックスを指定\nconst rearranged = rearg(fn, [2, 0, 1]);\nrearranged('a', 'b', 'c');\n// 戻り値: ['c', 'a', 'b']\n```\n\n一部の引数のみを並び替えて、残りはそのままにすることができます。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// 最初の2つの引数のみを並び替え\nconst rearranged = rearg(fn, 1, 0);\nrearranged('first', 'second', 'third', 'fourth');\n// 戻り値: ['second', 'first', 'third', 'fourth']\n```\n\n存在しないインデックスは `undefined` として処理されます。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 存在しないインデックス5を含む\nconst rearranged = rearg(fn, 5, 1, 0);\nrearranged('a', 'b', 'c');\n// 戻り値: [undefined, 'b', 'a']\n```\n\nネストされた配列も平坦化して処理されます。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// ネストされた配列インデックス\nconst rearranged = rearg(fn, [1, [2, 0]], 3);\nrearranged('a', 'b', 'c', 'd');\n// 戻り値: ['b', 'c', 'a', 'd']\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): 引数の順序を並び替える関数です。\n- `...indices` (`Array<number | number[]>`): 並び替える引数のインデックスです。ネストされた配列もサポートされています。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 引数の順序が並び替えられた新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/rest.md",
    "content": "# rest (Lodash 互換性)\n\n::: warning `es-toolkit` の `rest` を使用してください\n\nこの `rest` 関数は、デフォルト値処理やインデックス検証などの追加ロジックにより、パフォーマンスが低下する可能性があります。\n\n代わりに、より高速で現代的な `es-toolkit` の [rest](../../function/rest.md) を使用してください。\n\n:::\n\n指定されたインデックスから残りの引数を配列にグループ化する関数を作成します。\n\n```typescript\nconst restFunc = rest(func, start);\n```\n\n## 使用法\n\n### `rest(func, start)`\n\n指定されたインデックスから残りの引数を配列にグループ化して関数の引数を変換したい場合は、`rest` を使用してください。可変長引数を受け取る関数を作成するのに便利です。\n\n```typescript\nimport { rest } from 'es-toolkit/compat';\n\n// 基本的な使用法 - 最後の引数を配列にグループ化\nfunction logMessage(level, message, ...details) {\n  console.log(`[${level}] ${message}`, details);\n}\n\nconst restLogger = rest(logMessage, 2);\nrestLogger('ERROR', 'エラーが発生しました', '詳細情報 1', '詳細情報 2');\n// 内部的に logMessage('ERROR', 'エラーが発生しました', [['詳細情報 1', '詳細情報 2']]) として呼び出されます\n\n// 別のインデックスの例\nfunction process(action, target, ...args) {\n  return { action, target, args };\n}\n\nconst restProcess = rest(process, 1);\nrestProcess('update', 'user', 'name', 'John', 'age', 25);\n// { action: 'update', target: ['user', 'name', 'John', 'age', 25], args: [] }\n```\n\n関数の最後の引数を配列として受け取りたい場合に使用します。現代の JavaScript では、残余パラメータ構文(`...args`)を使用するのがより一般的です。\n\n#### パラメータ\n\n- `func` (`Function`): 変換する関数です。\n- `start` (`number`, オプション): 配列へのグループ化を開始するインデックスです。デフォルト値は `func.length - 1` です。\n\n#### 戻り値\n\n(`Function`): 指定されたインデックスから残りの引数を配列にグループ化する新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/spread.md",
    "content": "# spread (Lodash 互換性)\n\n::: warning 現代的なスプレッド演算子を使用してください\n\nこの `spread` 関数は、特定のインデックスの配列引数を個別の引数に展開する複雑なロジックを処理するため、処理速度が遅くなる可能性があります。\n\n代わりに、より高速で現代的なスプレッド演算子(`...`)を直接使用してください。\n\n:::\n\n配列引数を個別の引数に展開して関数を呼び出す新しい関数を作成します。\n\n```typescript\nconst spreadFunc = spread(func, argsIndex);\n```\n\n## 使用法\n\n### `spread(func, argsIndex)`\n\n配列引数を個別の引数に展開して関数を呼び出したい場合は、`spread` を使用してください。配列の位置を指定できるため、他の引数と一緒に使用できます。\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\n// 基本的な使用法 - 最初の引数が配列\nfunction add(a, b) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nspreadAdd([1, 2]); // 3\n\n// 2番目の引数が配列の場合\nfunction greet(greeting, names) {\n  return `${greeting}, ${names.join(' and ')}!`;\n}\n\nconst spreadGreet = spread(greet, 1);\nspreadGreet('Hello', ['Alice', 'Bob']); // 'Hello, Alice and Bob!'\n\n// 現代的なスプレッド演算子の使用例(推奨)\nfunction modernAdd(a, b) {\n  return a + b;\n}\n\nconst numbers = [1, 2];\nmodernAdd(...numbers); // 3 - よりシンプルで高速\n```\n\n特に配列を関数の引数として渡すときに便利ですが、現代の JavaScript では、スプレッド演算子を使用するのがより一般的です。\n\n#### パラメータ\n\n- `func` (`Function`): 変換する関数です。\n- `argsIndex` (`number`, オプション): 配列引数の位置です。デフォルト値は `0` です。\n\n#### 戻り値\n\n(`Function`): 配列引数を展開して呼び出す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/throttle.md",
    "content": "# throttle (Lodash 互換性)\n\n::: warning `es-toolkit` の `throttle` を使用してください\n\nこの `throttle` 関数は、Lodash 互換性のために内部的に debounce 関数を使用しているため、少し複雑になっています。また、デフォルト値やオプションの処理もより複雑です。\n\n代わりに、より高速で現代的な `es-toolkit` の [throttle](../../function/throttle.md) を使用してください。\n\n:::\n\n関数呼び出しを指定された時間間隔で最大1回実行されるように制限します。\n\n```typescript\nconst throttledFunc = throttle(func, wait, options);\n```\n\n## 使用法\n\n### `throttle(func, wait, options)`\n\n関数呼び出しを指定された時間間隔で最大1回実行されるように制限したい場合は、`throttle` を使用してください。イベントハンドラーや API 呼び出しの頻度を制限するのに便利です。\n\n```typescript\nimport { throttle } from 'es-toolkit/compat';\n\n// 基本的な使用法 - 1秒に最大1回実行\nconst throttledLog = throttle(() => {\n  console.log('イベント発生!');\n}, 1000);\n\n// オプションを使用した例\nconst throttledScroll = throttle(handleScroll, 100, {\n  leading: true, // 最初にすぐ実行\n  trailing: false, // 最後に実行しない\n});\n\nwindow.addEventListener('scroll', throttledScroll);\n```\n\nスクロールイベントやリサイズイベントのように速く発生するイベントを処理する際、パフォーマンスのために必須です。\n\n#### パラメータ\n\n- `func` (`Function`): スロットリングする関数です。\n- `wait` (`number`, オプション): ミリ秒単位の待機時間です。デフォルト値は `0` です。\n- `options` (`ThrottleSettings`, オプション): スロットリングオプションです。\n  - `leading` (`boolean`): 最初の呼び出しですぐに実行するかどうかです。デフォルト値は `true` です。\n  - `trailing` (`boolean`): 最後の呼び出し後に実行するかどうかです。デフォルト値は `true` です。\n\n#### 戻り値\n\n(`DebouncedFunc`): スロットリングされた関数を返します。`cancel()` メソッドで待機中の実行をキャンセルできます。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/unary.md",
    "content": "# unary (Lodash 互換性)\n\n::: warning `es-toolkit` の `ary` を使用してください\n\nこの `unary` 関数は `ary` 関数の特殊なケースとして実装されています。より多くの制御が必要な場合は、`es-toolkit` の [ary](../../function/ary.md) を直接使用する方が効率的です。\n\n代わりに、より高速で現代的な `es-toolkit` の [ary](../../function/ary.md) を使用してください。\n\n:::\n\n関数が最大1つの引数のみを受け取るように制限します。\n\n```typescript\nconst limitedFunc = unary(func);\n```\n\n## 使用法\n\n### `unary(func)`\n\n関数が最大1つの引数のみを受け取るように制限したい場合は、`unary` を使用してください。追加で渡される引数はすべて無視されます。\n\n```typescript\nimport { unary } from 'es-toolkit/compat';\n\nfunction greet(name, greeting, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 最初の引数のみを受け取る関数に変換\nconst greetOne = unary(greet);\ngreetOne('Alice', 'Hello', '!'); // greet('Alice') と同じように動作\n\n// 配列の map 関数と一緒に使用すると便利\nconst numbers = ['1', '2', '3'];\nnumbers.map(parseInt); // [1, NaN, NaN] - 予期しない結果\nnumbers.map(unary(parseInt)); // [1, 2, 3] - 正しい結果\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): 引数を制限する関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 最大1つの引数のみを受け取る新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/function/wrap.md",
    "content": "# wrap (Lodash 互換性)\n\n::: warning 高階関数を使用してください\n\nこの `wrap` 関数は、単に関数をラップする機能です。ほとんどの場合、よりシンプルな高階関数やクロージャを使用する方が明確です。\n\n代わりに、より高速で現代的なクロージャや直接的な関数定義を使用してください。\n\n:::\n\n与えられた値または関数をラップする新しい関数を作成します。\n\n```typescript\nconst wrappedFunc = wrap(value, wrapper);\n```\n\n## 使用法\n\n### `wrap(value, wrapper)`\n\n値や関数に追加のロジックを適用したい場合は、`wrap` を使用してください。元の値を最初の引数として受け取るラッパー関数を通じて、新しい動作を定義できます。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 関数をラップしてログ機能を追加\nconst greet = (name: string) => `Hi, ${name}`;\nconst loggedGreet = wrap(greet, (originalFunc, name) => {\n  const result = originalFunc(name);\n  console.log(`[LOG] ${result}`);\n  return result;\n});\n\nloggedGreet('Alice'); // コンソールに \"[LOG] Hi, Alice\" を出力し、\"Hi, Alice\" を返します\n```\n\n関数でない値もラップできます。値はラッパー関数の最初の引数として渡されます。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 文字列を HTML タグでラップする関数を作成\nconst htmlWrapper = wrap('Hello World', (text, tag) => `<${tag}>${text}</${tag}>`);\nconsole.log(htmlWrapper('h1')); // \"<h1>Hello World</h1>\"\n\n// 数値を計算に使用する関数を作成\nconst calculate = wrap(10, (baseValue, multiplier) => baseValue * multiplier);\nconsole.log(calculate(5)); // 50\n```\n\nより複雑な関数ラッピングの例です。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\nconst add = (a: number, b: number) => a + b;\n\n// パフォーマンス測定を追加した関数を作成\nconst timedAdd = wrap(add, (originalAdd, a, b) => {\n  const start = Date.now();\n  const result = originalAdd(a, b);\n  const end = Date.now();\n  console.log(`実行時間: ${end - start}ms`);\n  return result;\n});\n\ntimedAdd(3, 7); // 実行時間をコンソールに出力し、10 を返します\n```\n\n#### パラメータ\n\n- `value` (`T`): ラップする値または関数です。\n- `wrapper` (`(value: T, ...args: U[]) => V`): 元の値を最初の引数として受け取り、追加のロジックを適用する関数です。\n\n#### 戻り値\n\n(`(...args: U[]) => V`): ラッパー関数が適用された新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/add.md",
    "content": "# add (Lodash 互換性)\n\n::: warning `+` 演算子を使用してください\n\nこの `add` 関数は複雑な型変換と文字列処理により動作が遅くなります。\n\n代わりに、より高速でシンプルな `+` 演算子を使用してください。\n\n:::\n\n2つの値を加算します。\n\n```typescript\nconst result = add(value, other);\n```\n\n## 使用法\n\n### `add(value, other)`\n\n2つの値を加算したい場合は `add` を使用してください。数値だけでなく文字列も処理できます。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\n// 数値の加算\nadd(2, 3);\n// Returns: 5\n\nadd(1.5, 2.5);\n// Returns: 4\n\n// NaN の処理\nadd(NaN, 5);\n// Returns: NaN\n\nadd(10, NaN);\n// Returns: NaN\n```\n\n文字列が含まれる場合は文字列連結として動作します。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd('2', 3);\n// Returns: '23'\n\nadd(1, '5');\n// Returns: '15'\n\nadd('hello', 'world');\n// Returns: 'helloworld'\n```\n\n`undefined` 値は特別に処理されます。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd(undefined, undefined);\n// Returns: 0\n\nadd(5, undefined);\n// Returns: 5\n\nadd(undefined, 3);\n// Returns: 3\n```\n\n#### パラメータ\n\n- `value` (`number`): 加算する最初の値です。\n- `other` (`number`): 加算する2番目の値です。\n\n#### 戻り値\n\n(`number | string`): 2つの値の合計を返します。文字列が含まれる場合は文字列を返し、そうでなければ数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/ceil.md",
    "content": "# ceil (Lodash 互換性)\n\n::: warning `Math.ceil`を使用してください\n\nこの `ceil` 関数は小数点桁数の計算と内部関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Math.ceil` を使用してください。\n\n:::\n\n数値を指定された小数点桁数で切り上げます。\n\n```typescript\nconst result = ceil(number, precision);\n```\n\n## 使用法\n\n### `ceil(number, precision?)`\n\n数値を特定の小数点桁数で切り上げたい場合は `ceil` を使用してください。\n\n```typescript\nimport { ceil } from 'es-toolkit/compat';\n\n// 基本的な切り上げ（整数へ）\nceil(4.006);\n// Returns: 5\n\nceil(4.1);\n// Returns: 5\n\n// 小数点第2位で切り上げ\nceil(6.004, 2);\n// Returns: 6.01\n\nceil(6.001, 2);\n// Returns: 6.01\n\n// 負の桁数で切り上げ（10の単位）\nceil(6040, -2);\n// Returns: 6100\n\nceil(1234, -2);\n// Returns: 1300\n\n// 負の数も切り上げ\nceil(-4.1);\n// Returns: -4\n\nceil(-6.004, 2);\n// Returns: -6.00\n```\n\n#### パラメータ\n\n- `number` (`number`): 切り上げる数値です。\n- `precision` (`number`, オプション): 切り上げる小数点桁数です。デフォルトは `0` です。\n\n#### 戻り値\n\n(`number`): 指定された小数点桁数で切り上げられた数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/clamp.md",
    "content": "# clamp (Lodash 互換性)\n\n::: warning `es-toolkit`の[clamp](../../math/clamp.md)を使用してください\n\nこの `clamp` 関数はNaN検証と処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [clamp](../../math/clamp.md) を使用してください。\n\n:::\n\n数値を指定された範囲内に制限します。\n\n```typescript\nconst clamped = clamp(number, lower, upper);\n```\n\n## 使用法\n\n### `clamp(number, lower, upper)`\n\n数値を指定された最小値と最大値の間に制限したい場合は `clamp` を使用してください。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 基本的な使用法\nclamp(3, 2, 4);\n// Returns: 3 (範囲内にある)\n\nclamp(0, 5, 10);\n// Returns: 5 (最小値で制限)\n\nclamp(15, 5, 10);\n// Returns: 10 (最大値で制限)\n\n// 負の数も処理\nclamp(-5, -10, -1);\n// Returns: -5\n\nclamp(-15, -10, -1);\n// Returns: -10 (最小値で制限)\n```\n\n### `clamp(number, upper)`\n\n1つの引数のみを提供すると、その値を最大値として使用します。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 最大値のみ指定\nclamp(5, 3);\n// Returns: 3 (最大値で制限)\n\nclamp(2, 3);\n// Returns: 2 (範囲内にある)\n\nclamp(1, 5);\n// Returns: 1\n```\n\nNaN値は0として処理されます。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\nclamp(5, NaN, 10);\n// Returns: 5 (NaNが0として処理され、範囲は0〜10)\n\nclamp(5, 2, NaN);\n// Returns: 2 (NaNが0として処理され、範囲は0〜2)\n```\n\n#### パラメータ\n\n- `number` (`number`): 制限する数値です。\n- `lower` (`number`): 最小値です。2番目のパラメータのみがある場合は最大値になります。\n- `upper` (`number`, オプション): 最大値です。\n\n#### 戻り値\n\n(`number`): 指定された範囲内に制限された数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/divide.md",
    "content": "# divide (Lodash 互換性)\n\n::: warning `/` 演算子を使用してください\n\nこの `divide` 関数は追加の関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速でシンプルな `/` 演算子を使用してください。\n\n:::\n\n2つの数値を除算します。\n\n```typescript\nconst result = divide(value, other);\n```\n\n## 使用法\n\n### `divide(value, other)`\n\n2つの数値を除算したい場合は `divide` を使用してください。\n\n```typescript\nimport { divide } from 'es-toolkit/compat';\n\n// 基本的な除算\ndivide(6, 3);\n// Returns: 2\n\ndivide(10, 5);\n// Returns: 2\n\n// 小数除算\ndivide(7, 2);\n// Returns: 3.5\n\ndivide(1, 3);\n// Returns: 0.3333333333333333\n\n// 0での除算\ndivide(6, 0);\n// Returns: Infinity\n\ndivide(-6, 0);\n// Returns: -Infinity\n\n// NaN の処理\ndivide(2, NaN);\n// Returns: NaN\n\ndivide(NaN, 3);\n// Returns: NaN\n\ndivide(NaN, NaN);\n// Returns: NaN\n```\n\n#### パラメータ\n\n- `value` (`number`): 除算の被除数（分けられる数）です。\n- `other` (`number`): 除算の除数（分ける数）です。\n\n#### 戻り値\n\n(`number`): 最初の数値を2番目の数値で除算した結果を返します。どちらか一方でもNaNの場合はNaNを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/floor.md",
    "content": "# floor (Lodash 互換性)\n\n::: warning `Math.floor`を使用してください\n\nこの `floor` 関数は小数点桁数の計算と内部関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Math.floor` を使用してください。\n\n:::\n\n数値を指定された小数点桁数で切り捨てます。\n\n```typescript\nconst result = floor(number, precision);\n```\n\n## 使用法\n\n### `floor(number, precision?)`\n\n数値を特定の小数点桁数で切り捨てたい場合は `floor` を使用してください。\n\n```typescript\nimport { floor } from 'es-toolkit/compat';\n\n// 基本的な切り捨て（整数へ）\nfloor(4.9);\n// Returns: 4\n\nfloor(4.1);\n// Returns: 4\n\n// 小数点第2位で切り捨て\nfloor(6.994, 2);\n// Returns: 6.99\n\nfloor(6.999, 2);\n// Returns: 6.99\n\n// 負の桁数で切り捨て（10の単位）\nfloor(6040, -2);\n// Returns: 6000\n\nfloor(1234, -2);\n// Returns: 1200\n\n// 負の数も切り捨て\nfloor(-4.1);\n// Returns: -5\n\nfloor(-6.994, 2);\n// Returns: -7.00\n```\n\n#### パラメータ\n\n- `number` (`number`): 切り捨てる数値です。\n- `precision` (`number`, オプション): 切り捨てる小数点桁数です。デフォルトは `0` です。\n\n#### 戻り値\n\n(`number`): 指定された小数点桁数で切り捨てられた数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/inRange.md",
    "content": "# inRange (Lodash 互換性)\n\n::: warning `es-toolkit`の[inRange](../../math/inRange.md)を使用してください\n\nこの `inRange` 関数は複雑な型変換とnull/undefined処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [inRange](../../math/inRange.md) を使用してください。\n\n:::\n\n数値が指定された範囲内にあるかを確認します。\n\n```typescript\nconst result = inRange(value, minimum, maximum);\n```\n\n## 使用法\n\n### `inRange(value, minimum, maximum?)`\n\n数値が特定の範囲内にあるかを確認したい場合は `inRange` を使用してください。最小値は含まれ、最大値は含まれません。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 基本的な使用法\ninRange(3, 2, 4);\n// Returns: true (2 ≤ 3 < 4)\n\ninRange(1, 2, 5);\n// Returns: false (1 < 2)\n\ninRange(5, 2, 5);\n// Returns: false (5は含まれない)\n\n// 範囲境界値\ninRange(2, 2, 4);\n// Returns: true (最小値は含まれる)\n\ninRange(4, 2, 4);\n// Returns: false (最大値は含まれない)\n```\n\n### `inRange(value, maximum)`\n\n2つの引数のみを提供すると、0からmaximumまでの範囲として処理されます。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5);\n// Returns: true (0 ≤ 3 < 5)\n\ninRange(-1, 5);\n// Returns: false (-1 < 0)\n\ninRange(0, 5);\n// Returns: true (0 ≤ 0 < 5)\n\ninRange(5, 5);\n// Returns: false (5は含まれない)\n```\n\n最小値が最大値より大きい場合は自動的に交換されます。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5, 2);\n// Returns: true (範囲が2〜5に変更され、2 ≤ 3 < 5)\n\ninRange(1, 5, 2);\n// Returns: false (1 < 2)\n```\n\n不正な値は適切に変換されます。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 文字列数値変換\ninRange(3, '2', '4');\n// Returns: true\n\n// falsy値は0として処理\ninRange(1, null, 5);\n// Returns: true (nullが0として処理され、0〜5の範囲)\n\ninRange(3, false, 5);\n// Returns: true (falseが0として処理)\n```\n\n#### パラメータ\n\n- `value` (`number`): 範囲内にあるかを確認する数値です。\n- `minimum` (`number`): 範囲の最小値です（含まれる）。`maximum`がない場合、この値が最大値になります。\n- `maximum` (`number`, オプション): 範囲の最大値です（含まれない）。\n\n#### 戻り値\n\n(`boolean`): 値が指定された範囲内にある場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/max.md",
    "content": "# max (Lodash 互換性)\n\n::: warning `Math.max`を使用してください\n\nこの `max` 関数は追加の関数呼び出しと `null`/`undefined` 処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `Math.max(...array)` を使用してください。\n\n:::\n\n配列から最大値を見つけます。\n\n```typescript\nconst result = max(items);\n```\n\n## 使用法\n\n### `max(items?)`\n\n配列から最も大きい値を見つけたい場合は `max` を使用してください。\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\n// 数値配列から最大値\nmax([1, 2, 3]);\n// Returns: 3\n\nmax([10, 5, 8, 20]);\n// Returns: 20\n\n// 文字列配列から最大値（辞書順）\nmax(['a', 'b', 'c']);\n// Returns: 'c'\n\nmax(['apple', 'banana', 'cherry']);\n// Returns: 'cherry'\n\n// 空の配列やnull/undefined\nmax([]);\n// Returns: undefined\n\nmax(null);\n// Returns: undefined\n\nmax(undefined);\n// Returns: undefined\n```\n\n負の数も正しく処理されます。\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\nmax([-1, -5, -3]);\n// Returns: -1\n\nmax([0, -2, 5, -10]);\n// Returns: 5\n```\n\n#### パラメータ\n\n- `items` (`ArrayLike<T> | null | undefined`, オプション): 最大値を見つける配列です。\n\n#### 戻り値\n\n(`T | undefined`): 配列から最も大きい値を返します。配列が空またはnull/undefinedの場合はundefinedを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/maxBy.md",
    "content": "# maxBy (Lodash 互換性)\n\n::: warning es-toolkitの[maxBy](../../array/maxBy.md)を使用してください\n\nこの `maxBy` 関数はiteratee関数処理と型変換により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [maxBy](../../array/maxBy.md) を使用してください。\n\n:::\n\n条件に合う値の中から最大値要素を見つけます。\n\n```typescript\nconst maxItem = maxBy(array, iteratee);\n```\n\n## 使用法\n\n### `maxBy(array, iteratee)`\n\n配列から関数で計算した値が最も大きい要素を見つけます。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\n// オブジェクト配列から特定のプロパティが最大の要素\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nmaxBy(people, person => person.age);\n// Returns: { name: '이영희', age: 35 }\n\n// プロパティ名でも可能\nmaxBy(people, 'age');\n// Returns: { name: '이영희', age: 35 }\n```\n\n関数で値を変換して最大値を見つけます。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmaxBy(items, x => x.a);\n// Returns: { a: 3 }\n\nconst numbers = [-1, -2, -3];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: -3 (絶対値が最も大きい要素)\n```\n\n配列要素でアクセスします。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nmaxBy(arrays, 0); // 最初の要素が最大の配列\n// Returns: [3, 4]\n\nmaxBy(arrays, 1); // 2番目の要素が最大の配列\n// Returns: [0, 5]\n```\n\nオブジェクトの特定プロパティと値が一致する場合を見つけます。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '홍길동', age: 25, active: true },\n  { name: '김철수', age: 30, active: false },\n  { name: '이영희', age: 35, active: true },\n];\n\n// activeがtrueの要素の中から最初のもの\nmaxBy(users, ['active', true]);\n// Returns: { name: '홍길동', age: 25, active: true }\n\n// オブジェクトで条件指定\nmaxBy(users, { active: true });\n// Returns: { name: '홍길동', age: 25, active: true }\n```\n\n空の配列はundefinedを返します。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nmaxBy([], x => x.a);\n// Returns: undefined\n\nmaxBy(null);\n// Returns: undefined\n\nmaxBy(undefined);\n// Returns: undefined\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 検索する配列です。\n- `iteratee` (`ValueIteratee<T>`, オプション): 各要素に適用する関数、プロパティ名、または条件です。\n\n#### 戻り値\n\n(`T | undefined`): 条件に合う値が最も大きい要素を返します。空の配列の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/mean.md",
    "content": "# mean (Lodash 互換性)\n\n::: warning es-toolkitの[mean](../../math/mean.md)を使用してください\n\nこの `mean` 関数は型変換とnull/undefined処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [mean](../../math/mean.md) を使用してください。\n\n:::\n\n配列の平均値を計算します。\n\n```typescript\nconst average = mean(array);\n```\n\n## 使用法\n\n### `mean(array)`\n\n数値配列の平均値を計算します。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\n// 数値配列\nmean([1, 2, 3, 4, 5]);\n// Returns: 3\n\nmean([10, 20, 30]);\n// Returns: 20\n\nmean([1.5, 2.5, 3.5]);\n// Returns: 2.5\n```\n\n空の配列はNaNを返します。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([]);\n// Returns: NaN\n\nmean(null);\n// Returns: NaN\n\nmean(undefined);\n// Returns: NaN\n```\n\n無効な値は0として扱われ、計算に含まれます。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([1, undefined, 2, null, 3]);\n// Returns: 1.2 (1 + 2 + 3) / 5 = 1.2\n```\n\n文字列は連結されます。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean(['1', '2', '3']);\n// Returns: 41 (123 / 3 = 41)\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<any> | null | undefined`): 平均を計算する数値が含まれる配列です。\n\n#### 戻り値\n\n(`number`): 配列の平均値を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/meanBy.md",
    "content": "# meanBy (Lodash 互換性)\n\n::: warning es-toolkitの[meanBy](../../math/meanBy.md)を使用してください\n\nこの `meanBy` 関数はiteratee関数処理と型変換により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [meanBy](../../math/meanBy.md) を使用してください。\n\n:::\n\n条件に合う値の平均を計算します。\n\n```typescript\nconst average = meanBy(array, iteratee);\n```\n\n## 使用法\n\n### `meanBy(array, iteratee)`\n\n配列の各要素に関数を適用した結果の平均を計算します。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\n// オブジェクト配列から特定プロパティの平均\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nmeanBy(people, person => person.age);\n// Returns: 30\n\n// プロパティ名でも可能\nmeanBy(people, 'age');\n// Returns: 30\n```\n\n関数で値を変換して平均を計算します。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst numbers = [1.5, 2.7, 3.2, 4.8];\nmeanBy(numbers, x => Math.floor(x));\n// Returns: 2.5 (1 + 2 + 3 + 4) / 4\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmeanBy(items, x => x.a);\n// Returns: 2\n```\n\n配列要素でアクセスします。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst arrays = [[2], [3], [1]];\nmeanBy(arrays, 0); // 最初の要素の平均\n// Returns: 2\n```\n\nオブジェクトの特定プロパティと値が一致する場合のみ計算します。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '홍길동', age: 25, active: true },\n  { name: '김철수', age: 30, active: false },\n  { name: '이영희', age: 35, active: true },\n];\n\n// activeがtrueの人のみ\nmeanBy(users, { active: true });\n// Returns: 0.6666666 (active が true の人の割合)\n```\n\n空の配列はNaNを返します。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nmeanBy([], x => x.a);\n// Returns: NaN\n\nmeanBy(null);\n// Returns: NaN\n\nmeanBy(undefined);\n// Returns: NaN\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 処理する配列です。\n- `iteratee` (`ValueIteratee<T>`, オプション): 各要素に適用する関数、プロパティ名、または条件です。\n\n#### 戻り値\n\n(`number`): 条件に合う値の平均を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/min.md",
    "content": "# min (Lodash 互換性)\n\n::: warning `Math.min`を使用してください\n\nこの `min` 関数は追加の関数呼び出しとnull/undefined処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `Math.min(...array)` を使用してください。\n\n:::\n\n配列から最小値を見つけます。\n\n```typescript\nconst result = min(items);\n```\n\n## 使用法\n\n### `min(items?)`\n\n配列から最も小さい値を見つけたい場合は `min` を使用してください。\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\n// 数値配列から最小値\nmin([3, 1, 4, 1, 5, 9]);\n// Returns: 1\n\nmin([10, 5, 8, 20]);\n// Returns: 5\n\n// 文字列配列から最小値（辞書順）\nmin(['c', 'a', 'b']);\n// Returns: 'a'\n\nmin(['cherry', 'apple', 'banana']);\n// Returns: 'apple'\n\n// 空の配列やnull/undefined\nmin([]);\n// Returns: undefined\n\nmin(null);\n// Returns: undefined\n\nmin(undefined);\n// Returns: undefined\n```\n\n負の数も正しく処理されます。\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\nmin([0, -3, 2, 8, 7]);\n// Returns: -3\n\nmin([-1, -5, -3]);\n// Returns: -5\n```\n\n#### パラメータ\n\n- `items` (`ArrayLike<T> | null | undefined`, オプション): 最小値を見つける配列です。\n\n#### 戻り値\n\n(`T | undefined`): 配列から最も小さい値を返します。配列が空またはnull/undefinedの場合はundefinedを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/minBy.md",
    "content": "# minBy (Lodash 互換性)\n\n::: warning es-toolkitの[minBy](../../array/minBy.md)を使用してください\n\nこの `minBy` 関数はiteratee関数処理と型変換により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [minBy](../../array/minBy.md) を使用してください。\n\n:::\n\n条件に合致する値の中で最小値要素を見つけます。\n\n```typescript\nconst minItem = minBy(array, iteratee);\n```\n\n## 使用法\n\n### `minBy(array, iteratee)`\n\n配列から関数で計算した値が最小の要素を見つけます。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\n// オブジェクト配列から特定のプロパティが最小の要素\nconst people = [\n  { name: 'ホンギルドン', age: 25 },\n  { name: 'キムチョルス', age: 30 },\n  { name: 'イヨンヒ', age: 35 },\n];\n\nminBy(people, person => person.age);\n// Returns: { name: 'ホンギルドン', age: 25 }\n\n// プロパティ名でも可能\nminBy(people, 'age');\n// Returns: { name: 'ホンギルドン', age: 25 }\n```\n\n関数で値を変換して最小値を見つけます。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nminBy(items, x => x.a);\n// Returns: { a: 1 }\n\nconst numbers = [-1, -2, -3];\nminBy(numbers, x => Math.abs(x));\n// Returns: -1 (絶対値が最小の要素)\n```\n\n配列要素でアクセスします。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nminBy(arrays, 0); // 最初の要素が最小の配列\n// Returns: [0, 5]\n\nminBy(arrays, 1); // 2番目の要素が最小の配列\n// Returns: [1, 2]\n```\n\nオブジェクトの特定プロパティと値が一致する場合を見つけます。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'ホンギルドン', age: 25, active: true },\n  { name: 'キムチョルス', age: 30, active: false },\n  { name: 'イヨンヒ', age: 35, active: true },\n];\n\n// activeがtrueの要素の中で最初ではないものを見つける\nminBy(users, ['active', true]);\n// Returns: { name: 'キムチョルス', age: 30, active: false }\n\n// オブジェクトで条件を指定\nminBy(users, { active: true });\n// Returns: { name: 'キムチョルス', age: 30, active: false }\n```\n\n空の配列はundefinedを返します。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nminBy([], x => x.a);\n// Returns: undefined\n\nminBy(null);\n// Returns: undefined\n\nminBy(undefined);\n// Returns: undefined\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 検索する配列です。\n- `iteratee` (`ValueIteratee<T>`, オプション): 各要素に適用する関数、プロパティ名、または条件です。\n\n#### 戻り値\n\n(`T | undefined`): 条件に合致する値が最小の要素を返します。空の配列の場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/multiply.md",
    "content": "# multiply (Lodash 互換性)\n\n::: warning `*` 演算子を使用してください\n\nこの `multiply` 関数は追加の関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速でシンプルな `*` 演算子を使用してください。\n\n:::\n\n2つの数値を乗算します。\n\n```typescript\nconst result = multiply(value, other);\n```\n\n## 使用法\n\n### `multiply(value, other)`\n\n2つの数値を乗算したい場合は `multiply` を使用してください。\n\n```typescript\nimport { multiply } from 'es-toolkit/compat';\n\n// 基本的な乗算\nmultiply(2, 3);\n// Returns: 6\n\nmultiply(4, 5);\n// Returns: 20\n\n// 負の数の処理\nmultiply(2, -3);\n// Returns: -6\n\nmultiply(-4, -5);\n// Returns: 20\n\n// 小数の処理\nmultiply(2.5, 4);\n// Returns: 10\n\n// NaN の処理\nmultiply(NaN, 3);\n// Returns: NaN\n\nmultiply(2, NaN);\n// Returns: NaN\n\nmultiply(NaN, NaN);\n// Returns: NaN\n```\n\n#### パラメータ\n\n- `value` (`number`): 乗算の最初の数値です。\n- `other` (`number`): 乗算の2番目の数値です。\n\n#### 戻り値\n\n(`number`): 2つの数値を乗算した結果を返します。どちらか一方でもNaNの場合はNaNを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/parseInt.md",
    "content": "# parseInt (Lodash 互換性)\n\n::: warning `parseInt`を使用してください\n\nこの `parseInt` 関数は追加の関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速で現代的なネイティブ `parseInt` を使用してください。\n\n:::\n\n文字列を整数に変換します。\n\n```typescript\nconst result = parseInt(string, radix);\n```\n\n## 使用法\n\n### `parseInt(string, radix?)`\n\n文字列を整数に変換したい場合は `parseInt` を使用してください。基数を指定して異なる進法として解釈できます。\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\n// 基本的な10進数解析\nparseInt('123');\n// Returns: 123\n\nparseInt('08');\n// Returns: 8\n\n// 16進数自動認識\nparseInt('0x20');\n// Returns: 32\n\n// 明示的な基数指定\nparseInt('08', 10);\n// Returns: 8\n\nparseInt('0x20', 16);\n// Returns: 32\n\nparseInt('1010', 2);\n// Returns: 10\n\n// 配列での使用\n['6', '08', '10'].map(parseInt);\n// Returns: [6, 8, 10]\n```\n\n不正な形式の文字列はNaNを返します。\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\nparseInt('abc');\n// Returns: NaN\n\nparseInt('');\n// Returns: NaN\n\nparseInt('123abc');\n// Returns: 123 (前の部分のみ解析)\n```\n\n#### パラメータ\n\n- `string` (`string`): 整数に変換する文字列です。\n- `radix` (`number`, オプション): 変換時に使用する基数です。デフォルトは `0` で、この場合文字列形式に応じて自動的に決定されます。\n\n#### 戻り値\n\n(`number`): 変換された整数を返します。変換できない場合はNaNを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/random.md",
    "content": "# random (Lodash 互換性)\n\n::: warning `Math.random()`を使用してください\n\nこの `random` 関数は複雑な引数処理と型変換により動作が遅くなります。\n\n代わりに、より高速な `Math.random()` を使用してください。\n\n:::\n\n範囲内でランダムな数値を生成します。\n\n```typescript\nconst result = random(min, max, floating);\n```\n\n## 使用法\n\n### `random(floating?)`\n\n0と1の間のランダムな数値を生成します。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom();\n// Returns: 0.123456789 (0~1の間の小数)\n\nrandom(true);\n// Returns: 0.987654321 (小数で返す)\n\nrandom(false);\n// Returns: 0 または 1 (整数で返す)\n```\n\n### `random(max, floating?)`\n\n0からmaxまでのランダムな数値を生成します。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5);\n// Returns: 3.456789 (0~5の間の小数)\n\nrandom(10, true);\n// Returns: 7.123456 (0~10の間の小数)\n\nrandom(3, false);\n// Returns: 2 (0~3の間の整数)\n```\n\n### `random(min, max, floating?)`\n\nminからmaxまでのランダムな数値を生成します。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(1, 5);\n// Returns: 3.456789 (1~5の間の小数)\n\nrandom(0, 10, true);\n// Returns: 6.789012 (0~10の間の小数)\n\nrandom(1, 6, false);\n// Returns: 4 (1~6の間の整数)\n```\n\n範囲が逆の場合は自動的に交換されます。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5, 1);\n// Returns: 3.456789 (範囲が1~5に変更される)\n```\n\nguardオブジェクトで特別なケースを処理します。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nconst guard = { 5: 5 };\nrandom(5, 5, guard);\n// Returns: 2.345678 (0~5の間の小数)\n```\n\n#### パラメータ\n\n- `floating` (`boolean`, オプション): 小数を返すかどうかを決定します。デフォルトは `true` です。\n- `max` (`number`): 範囲の最大値です（含まれません）。\n- `min` (`number`): 範囲の最小値です（含まれます）。\n- `index` (`string | number`): guardオブジェクトで確認するキーです。\n- `guard` (`object`): パラメータを検証するguardオブジェクトです。\n\n#### 戻り値\n\n(`number`): 指定された範囲内のランダムな数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/range.md",
    "content": "# range (Lodash 互換性)\n\n::: warning es-toolkitの[range](../../math/range.md)を使用してください\n\nこの `range` 関数は複雑な引数処理と型変換により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [range](../../math/range.md) を使用してください。\n\n:::\n\n数値範囲の配列を作成します。\n\n```typescript\nconst numbers = range(start, end, step);\n```\n\n## 使用法\n\n### `range(end)`\n\n0からendまで1ずつ増加する配列を作成します。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(4);\n// Returns: [0, 1, 2, 3]\n\nrange(0);\n// Returns: []\n\nrange(-4);\n// Returns: [0, -1, -2, -3]\n```\n\n### `range(start, end)`\n\nstartからendまで1ずつ増加する配列を作成します。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(1, 5);\n// Returns: [1, 2, 3, 4]\n\nrange(5, 1);\n// Returns: [5, 4, 3, 2] (自動的に-1ずつ減少)\n\nrange(-2, 3);\n// Returns: [-2, -1, 0, 1, 2]\n```\n\n### `range(start, end, step)`\n\nstartからendまでstepずつ増加する配列を作成します。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 20, 5);\n// Returns: [0, 5, 10, 15]\n\nrange(0, -4, -1);\n// Returns: [0, -1, -2, -3]\n\nrange(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n小数のstepも可能です。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 1, 0.2);\n// Returns: [0, 0.2, 0.4, 0.6, 0.8]\n\nrange(1, 0, -0.25);\n// Returns: [1, 0.75, 0.5, 0.25]\n```\n\niterateeとして使用する場合はguardオブジェクトで処理されます。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\n[1, 2, 3].map(range);\n// Returns: [[0], [0, 1], [0, 1, 2]]\n```\n\n#### パラメータ\n\n- `start` (`number`): 範囲の開始値です（含まれます）。`end`がない場合、この値がendになります。\n- `end` (`number`, オプション): 範囲の終了値です（含まれません）。\n- `step` (`number`, オプション): 増加幅です。デフォルトは1または-1です。\n\n#### 戻り値\n\n(`number[]`): 指定された範囲の数値配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/rangeRight.md",
    "content": "# rangeRight (Lodash 互換性)\n\n::: warning es-toolkitの[rangeRight](../../math/rangeRight.md)を使用してください\n\nこの `rangeRight` 関数は複雑な引数処理と型変換により動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [rangeRight](../../math/rangeRight.md) を使用してください。\n\n:::\n\n数値範囲の配列を逆順で作成します。\n\n```typescript\nconst numbers = rangeRight(start, end, step);\n```\n\n## 使用法\n\n### `rangeRight(end)`\n\n0からendまで1ずつ増加させた後、逆順で配列を作成します。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(4);\n// Returns: [3, 2, 1, 0]\n\nrangeRight(0);\n// Returns: []\n\nrangeRight(-4);\n// Returns: [-3, -2, -1, 0]\n```\n\n### `rangeRight(start, end)`\n\nstartからendまで1ずつ増加させた後、逆順で配列を作成します。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(1, 5);\n// Returns: [4, 3, 2, 1]\n\nrangeRight(5, 1);\n// Returns: [2, 3, 4, 5] (自動的に-1ずつ減少してから逆順)\n\nrangeRight(-2, 3);\n// Returns: [2, 1, 0, -1, -2]\n```\n\n### `rangeRight(start, end, step)`\n\nstartからendまでstepずつ増加させた後、逆順で配列を作成します。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 8, 2);\n// Returns: [6, 4, 2, 0]\n\nrangeRight(0, -4, -1);\n// Returns: [-3, -2, -1, 0]\n\nrangeRight(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n小数のstepも可能です。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 1, 0.2);\n// Returns: [0.8, 0.6, 0.4, 0.2, 0]\n\nrangeRight(1, 0, -0.25);\n// Returns: [0.25, 0.5, 0.75, 1]\n```\n\niterateeとして使用する場合はguardオブジェクトで処理されます。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\n[1, 2, 3].map(rangeRight);\n// Returns: [[0], [1, 0], [2, 1, 0]]\n```\n\n#### パラメータ\n\n- `start` (`number`): 範囲の開始値です（含まれます）。`end`がない場合、この値がendになります。\n- `end` (`number`, オプション): 範囲の終了値です（含まれません）。\n- `step` (`number`, オプション): 増加幅です。デフォルトは1または-1です。\n\n#### 戻り値\n\n(`number[]`): 指定された範囲の数値配列を逆順で返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/round.md",
    "content": "# round (Lodash 互換性)\n\n::: warning `Math.round()`を使用してください\n\nこの`round`関数は精度処理により動作が遅いです。\n\n代わりに`Math.round()`を使用するか、希望する小数点で計算してください。\n\n:::\n\n数値を四捨五入します。\n\n```typescript\nconst rounded = round(number, precision);\n```\n\n## 使用法\n\n### `round(number, precision?)`\n\n数値を指定した小数点以下の桁数まで四捨五入します。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 基本の四捨五入（小数点以下0桁）\nround(4.006);\n// Returns: 4\n\nround(4.6);\n// Returns: 5\n\n// 小数点指定\nround(4.006, 2);\n// Returns: 4.01\n\nround(4.123456, 3);\n// Returns: 4.123\n```\n\n負の精度も可能です。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 十の位で四捨五入\nround(4060, -2);\n// Returns: 4100\n\nround(1234, -1);\n// Returns: 1230\n\nround(1234, -3);\n// Returns: 1000\n```\n\n負の数も処理します。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\nround(-4.006);\n// Returns: -4\n\nround(-4.006, 2);\n// Returns: -4.01\n\nround(-1234, -2);\n// Returns: -1200\n```\n\n#### パラメータ\n\n- `number` (`number`): 四捨五入する数値です。\n- `precision` (`number`, オプション): 四捨五入する小数点以下の桁数です。デフォルト値は`0`です。\n\n#### 戻り値\n\n(`number`): 四捨五入された数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/subtract.md",
    "content": "# subtract (Lodash 互換性)\n\n::: warning `-` 演算子を使用してください\n\nこの `subtract` 関数は追加の関数呼び出しにより動作が遅くなります。\n\n代わりに、より高速でシンプルな `-` 演算子を使用してください。\n\n:::\n\n2つの数値を減算します。\n\n```typescript\nconst result = subtract(value, other);\n```\n\n## 使用法\n\n### `subtract(value, other)`\n\n2つの数値を減算したい場合は `subtract` を使用してください。\n\n```typescript\nimport { subtract } from 'es-toolkit/compat';\n\n// 基本的な減算\nsubtract(6, 4);\n// Returns: 2\n\nsubtract(10, 3);\n// Returns: 7\n\n// 負の数の処理\nsubtract(-6, 4);\n// Returns: -10\n\nsubtract(6, -4);\n// Returns: 10\n\n// NaN の処理\nsubtract(NaN, 4);\n// Returns: NaN\n\nsubtract(6, NaN);\n// Returns: NaN\n\nsubtract(NaN, NaN);\n// Returns: NaN\n```\n\n#### パラメータ\n\n- `value` (`number`): 減算の基準となる最初の数値です。\n- `other` (`number`): 減算する2番目の数値です。\n\n#### 戻り値\n\n(`number`): 最初の数値から2番目の数値を減算した結果を返します。どちらか一方でもNaNの場合はNaNを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/sum.md",
    "content": "# sum (Lodash 互換性)\n\n::: warning es-toolkitの[sum](../../math/sum.md)を使用してください\n\nこの`sum`関数は型変換とnull/undefined処理により動作が遅いです。\n\n代わりにより高速で現代的な`es-toolkit`の[sum](../../math/sum.md)を使用してください。\n\n:::\n\n配列のすべての値を足します。\n\n```typescript\nconst total = sum(array);\n```\n\n## 使用法\n\n### `sum(array)`\n\n配列内のすべての数値を足して合計を求めます。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// 数値配列\nsum([1, 2, 3]);\n// Returns: 6\n\nsum([1.5, 2.5, 3]);\n// Returns: 7\n\n// 空配列\nsum([]);\n// Returns: 0\n```\n\nBigIntと文字列も処理します。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// BigInt配列\nsum([1n, 2n, 3n]);\n// Returns: 6n\n\n// 文字列配列（連結される）\nsum(['1', '2']);\n// Returns: '12'\n```\n\n無効な値は無視します。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\nsum([1, undefined, 2]);\n// Returns: 3 (undefinedを無視)\n\nsum(null);\n// Returns: 0\n\nsum(undefined);\n// Returns: 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<any> | null | undefined`): 足す値が含まれる配列です。\n\n#### 戻り値\n\n(`number`): すべての値を足した合計を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/math/sumBy.md",
    "content": "# sumBy (Lodash 互換性)\n\n::: warning es-toolkitの[sumBy](../../math/sumBy.md)を使用してください\n\nこの`sumBy`関数はiteratee関数処理と型変換により動作が遅いです。\n\n代わりにより高速で現代的な`es-toolkit`の[sumBy](../../math/sumBy.md)を使用してください。\n\n:::\n\n条件に合う値を足します。\n\n```typescript\nconst total = sumBy(array, iteratee);\n```\n\n## 使用法\n\n### `sumBy(array, iteratee)`\n\n配列の各要素に関数を適用した結果を足します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\n// 数値配列\nsumBy([1, 2, 3], value => value);\n// Returns: 6\n\nsumBy([1.5, 2.5, 3.5], value => Math.floor(value));\n// Returns: 6 (1 + 2 + 3)\n\n// 空配列\nsumBy([], value => value);\n// Returns: 0\n```\n\n### `sumBy(array)`\n\n関数を渡さない場合、配列の値をそのまま足します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, 2, 3]);\n// Returns: 6\n\nsumBy([1n, 2n, 3n]);\n// Returns: 6n\n```\n\nオブジェクト配列から特定のプロパティを足します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst people = [\n  { name: '田中太郎', age: 25 },\n  { name: '佐藤次郎', age: 30 },\n  { name: '鈴木花子', age: 35 },\n];\n\nsumBy(people, person => person.age);\n// Returns: 90\n\n// プロパティ名でも可能\nsumBy(people, 'age');\n// Returns: 90\n```\n\n文字列も連結します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst items = [{ a: '1' }, { a: '2' }];\nsumBy(items, obj => obj.a);\n// Returns: '12'\n```\n\n無効な値は無視します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, undefined, 2], value => value);\n// Returns: 3 (undefinedを無視)\n\nsumBy(null);\n// Returns: 0\n\nsumBy(undefined);\n// Returns: 0\n```\n\n#### パラメータ\n\n- `array` (`ArrayLike<T> | null | undefined`): 処理する配列です。\n- `iteratee` (`((value: T) => number) | string`, オプション): 各要素に適用する関数またはプロパティ名です。\n\n#### 戻り値\n\n(`number`): 条件に合う値を足した合計を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/assign.md",
    "content": "# assign (Lodash 互換性)\n\n::: warning `Object.assign`を使用してください\n\nこの `assign` 関数は、値が等しいかどうかをチェックする追加ロジックにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.assign` を使用してください。\n\n:::\n\nソースオブジェクトのプロパティをターゲットオブジェクトに割り当てます。\n\n```typescript\nconst result = assign(target, ...sources);\n```\n\n## 使用法\n\n### `assign(target, ...sources)`\n\n1つ以上のソースオブジェクトのプロパティをターゲットオブジェクトにコピーしたい場合は、`assign`を使用してください。同じキーがある場合、後のソースの値が前の値を上書きします。\n\n```typescript\nimport { assign } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assign(target, source);\n// 結果: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (ターゲットオブジェクトが変更される)\n\n// 複数のソースオブジェクトをマージ\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nconst source3 = { d: 4 };\nassign(target2, source1, source2, source3);\n// 結果: { a: 1, b: 2, c: 3, d: 4 }\n\n// プロパティの上書き\nconst target3 = { x: 1, y: 2 };\nconst source4 = { y: 3, z: 4 };\nconst source5 = { y: 5 };\nassign(target3, source4, source5);\n// 結果: { x: 1, y: 5, z: 4 } (yは最後の値で上書きされます)\n```\n\nこの関数は、オブジェクトの固有のプロパティのみをコピーし、継承されたプロパティはコピーしません。また、値が同じ場合は上書きしない最適化があります。\n\n#### パラメータ\n\n- `target` (`any`): プロパティがコピーされるターゲットオブジェクトです。\n- `...sources` (`any[]`): プロパティをコピーするソースオブジェクトです。\n\n#### 戻り値\n\n(`any`): 修正されたターゲットオブジェクトを返します。ターゲットオブジェクト自体が変更されて返されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/assignIn.md",
    "content": "# assignIn (Lodash 互換性)\n\n::: warning `Object.assign`を使用してください\n\nこの `assignIn` 関数は、継承されたプロパティをコピーする追加処理と値比較ロジックにより動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.assign` を使用してください。\n\n:::\n\nソースオブジェクトのすべてのプロパティ(継承されたプロパティを含む)をターゲットオブジェクトに割り当てます。\n\n```typescript\nconst result = assignIn(target, ...sources);\n```\n\n## 使用法\n\n### `assignIn(target, ...sources)`\n\nソースオブジェクトの固有のプロパティと継承されたプロパティの両方をターゲットオブジェクトにコピーしたい場合は、`assignIn`を使用してください。`assign`とは異なり、プロトタイプチェーンのプロパティも含まれます。\n\n```typescript\nimport { assignIn } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assignIn(target, source);\n// 結果: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (ターゲットオブジェクトが変更される)\n\n// 複数のソースオブジェクトをマージ\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nassignIn(target2, source1, source2);\n// 結果: { a: 1, b: 2, c: 3 }\n\n// 継承されたプロパティもコピー\nfunction Parent() {}\nParent.prototype.inherited = 'inheritedValue';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = {};\nassignIn(target3, child);\n// 結果: { own: 'ownValue', inherited: 'inheritedValue' }\n\n// 配列のインデックスプロパティとlengthなどもコピー\nconst arr = [1, 2, 3];\narr.customProp = 'custom';\nconst target4 = {};\nassignIn(target4, arr);\n// 結果: { '0': 1, '1': 2, '2': 3, customProp: 'custom' }\n```\n\nこの関数は、`assign`とは異なり、継承されたプロパティも含めてコピーします。値が同じ場合は上書きしない最適化もあります。\n\n#### パラメータ\n\n- `target` (`any`): プロパティがコピーされるターゲットオブジェクトです。\n- `...sources` (`any[]`): プロパティをコピーするソースオブジェクトです。固有のプロパティと継承されたプロパティの両方がコピーされます。\n\n#### 戻り値\n\n(`any`): 修正されたターゲットオブジェクトを返します。ターゲットオブジェクト自体が変更されて返されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/assignInWith.md",
    "content": "# assignInWith (Lodash 互換性)\n\n::: warning カスタムロジックの実装を推奨します\n\nこの `assignInWith` 関数は、継承されたプロパティの処理とカスタマイザー関数の呼び出しにより、複雑で動作が遅くなります。\n\n代わりに、`Object.assign` とカスタムロジックを直接実装する方法を使用してください。\n\n:::\n\nカスタマイザー関数を使用して、ソースオブジェクトのすべてのプロパティ(継承プロパティを含む)をターゲットオブジェクトに割り当てます。\n\n```typescript\nconst result = assignInWith(target, ...sources, customizer);\n```\n\n## 使用法\n\n### `assignInWith(target, ...sources, customizer)`\n\n継承されたプロパティを含めながらプロパティの割り当て方法をカスタマイズしたい場合は、`assignInWith`を使用してください。カスタマイザー関数が各プロパティの最終値を決定します。\n\n```typescript\nimport { assignInWith } from 'es-toolkit/compat';\n\n// 基本的な使用法 - undefinedの場合のみ割り当て\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignInWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 結果: { a: 1, b: 2, c: 3 }\n\n// 配列の値をマージするカスタマイザー\nconst target2 = { numbers: [1, 2] };\nconst source2 = { numbers: [3, 4], name: 'test' };\nassignInWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue) && Array.isArray(srcValue)) {\n    return objValue.concat(srcValue);\n  }\n  return srcValue;\n});\n// 結果: { numbers: [1, 2, 3, 4], name: 'test' }\n\n// 継承されたプロパティも含めて処理\nfunction Parent() {}\nParent.prototype.inherited = 'value';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = { existing: 'data' };\nassignInWith(target3, child, (objValue, srcValue, key) => {\n  if (objValue === undefined) {\n    return `processed_${srcValue}`;\n  }\n  return objValue;\n});\n// 結果: { existing: 'data', own: 'processed_ownValue', inherited: 'processed_value' }\n```\n\nカスタマイザー関数が `undefined` を返す場合、デフォルトの割り当て動作が使用されます。この関数は、`assignIn`とは異なり、各プロパティにカスタムロジックを適用できます。\n\n#### パラメータ\n\n- `target` (`any`): プロパティがコピーされるターゲットオブジェクトです。\n- `...sources` (`any[]`): プロパティをコピーするソースオブジェクトです。固有のプロパティと継承されたプロパティの両方がコピーされます。\n- `customizer` (`function`): 割り当てる値を決定する関数です。`(objValue, srcValue, key, object, source) => any` の形式で、`undefined` を返すとデフォルトの割り当て動作を使用します。\n\n#### 戻り値\n\n(`any`): 修正されたターゲットオブジェクトを返します。ターゲットオブジェクト自体が変更されて返されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/assignWith.md",
    "content": "# assignWith (Lodash 互換性)\n\n::: warning カスタムロジックの実装を推奨します\n\nこの `assignWith` 関数は、複雑なカスタマイザー関数の処理により相対的に遅くなります。\n\n代わりに、`Object.assign` とカスタムロジックを直接実装する方法を使用してください。\n\n:::\n\nカスタマイザー関数を使用して、ソースオブジェクトのプロパティをターゲットオブジェクトに割り当てます。\n\n```typescript\nconst result = assignWith(target, source1, source2, customizer);\n```\n\n## 使用法\n\n### `assignWith(object, ...sources, customizer)`\n\nプロパティの割り当て方法をカスタマイズしたい場合は、`assignWith`を使用してください。カスタマイザー関数が各プロパティの最終値を決定します。\n\n```typescript\nimport { assignWith } from 'es-toolkit/compat';\n\n// 基本的な使用法 - undefinedの場合のみ割り当て\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 配列のマージ\nconst target2 = { users: ['alice'] };\nconst source2 = { users: ['bob', 'charlie'] };\nconst result2 = assignWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Returns: { users: ['alice', 'bob', 'charlie'] }\n\n// 複数のソースとカスタマイザー\nconst target3 = { a: 1 };\nconst result3 = assignWith(target3, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n```\n\n#### パラメータ\n\n- `object` (`any`): プロパティが割り当てられるターゲットオブジェクトです。\n- `...sources` (`any[]`): プロパティをコピーするソースオブジェクトです。\n- `customizer` (`function`): 割り当てる値を決定する関数です。`(objValue, srcValue, key, object, source) => any` の形式です。\n\n#### 戻り値\n\n(`any`): カスタマイザー関数によって決定された値が割り当てられたターゲットオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/at.md",
    "content": "# at (Lodash 互換性)\n\n::: warning 分割代入を使用してください\n\nこの `at` 関数は、複雑なパス処理とさまざまな引数型の処理により相対的に遅くなります。\n\n代わりに、分割代入または直接プロパティアクセスを使用してください。\n\n:::\n\nオブジェクトの指定されたパスの値を配列として返します。\n\n```typescript\nconst result = at(object, ...paths);\n```\n\n## 使用法\n\n### `at(object, ...paths)`\n\nオブジェクトから複数のパスの値を一度に取得したい場合は、`at`を使用してください。各パスに対応する値を配列として返します。\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst object = { a: 1, b: 2, c: 3 };\nconst result = at(object, 'a', 'c');\n// Returns: [1, 3]\n\n// ネストされたオブジェクト\nconst nested = {\n  a: {\n    b: {\n      c: 4,\n    },\n  },\n  x: [1, 2, 3],\n};\nconst result2 = at(nested, 'a.b.c', 'x[1]');\n// Returns: [4, 2]\n\n// パスを配列として渡す\nconst paths = ['a', 'c'];\nconst result3 = at(object, paths);\n// Returns: [1, 3]\n\n// 存在しないパス\nconst result4 = at(object, 'nonexistent', 'a');\n// Returns: [undefined, 1]\n```\n\n`null` または `undefined` オブジェクトは、`undefined` の配列を返します。\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\nat(null, 'a', 'b'); // [undefined, undefined]\nat(undefined, 'a', 'b'); // [undefined, undefined]\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): 値を取得するオブジェクトです。\n- `...paths` (`Array<PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>>`): 取得する値のパスです。個別の引数として渡すか、配列として渡すことができます。\n\n#### 戻り値\n\n(`unknown[]`): 指定されたパスに対応する値の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/clone.md",
    "content": "# clone (Lodash 互換性)\n\n::: warning `es-toolkit`の`clone`を使用してください\n\nこの `clone` 関数は、特殊なオブジェクトタイプを処理する複雑なロジックにより相対的に遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [clone](../../object/clone.md) を使用してください。\n\n:::\n\nオブジェクトの浅いコピーを作成します。\n\n```typescript\nconst cloned = clone(value);\n```\n\n## 使用法\n\n### `clone(value)`\n\n値の浅いコピーを作成したい場合は、`clone`を使用してください。さまざまなタイプのオブジェクトと原始値をコピーできます。\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\n// 原始値のコピー\nconst num = 42;\nconst clonedNum = clone(num);\n// Returns: 42 (同じ値)\n\n// 配列のコピー\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\n// Returns: [1, 2, 3] (新しい配列インスタンス)\n\n// オブジェクトのコピー\nconst obj = { a: 1, b: 'hello' };\nconst clonedObj = clone(obj);\n// Returns: { a: 1, b: 'hello' } (新しいオブジェクトインスタンス)\n\n// Dateオブジェクトのコピー\nconst date = new Date('2023-01-01');\nconst clonedDate = clone(date);\n// Returns: new Date('2023-01-01') (新しいDateインスタンス)\n\n// 正規表現のコピー\nconst regex = /hello/gi;\nregex.lastIndex = 3;\nconst clonedRegex = clone(regex);\n// Returns: /hello/gi with lastIndex = 3\n\n// Mapのコピー\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nconst clonedMap = clone(map);\n// Returns: new Map([['a', 1], ['b', 2]])\n\n// Setのコピー\nconst set = new Set([1, 2, 3]);\nconst clonedSet = clone(set);\n// Returns: new Set([1, 2, 3])\n```\n\nネストされたオブジェクトは浅いコピーのみが行われます。\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\nconst nested = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst clonedNested = clone(nested);\n\nconsole.log(clonedNested !== nested); // true (異なるオブジェクト)\nconsole.log(clonedNested.b === nested.b); // true (ネストされたオブジェクトは同じ参照)\n```\n\n#### パラメータ\n\n- `value` (`T`): コピーする値です。\n\n#### 戻り値\n\n(`T`): コピーされた値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/cloneDeep.md",
    "content": "# cloneDeep (Lodash 互換性)\n\n::: warning `es-toolkit`の`cloneDeep`を使用してください\n\nこの `cloneDeep` 関数は、特殊なオブジェクトタイプを処理する複雑なロジックにより相対的に遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [cloneDeep](../../object/cloneDeep.md) を使用してください。\n\n:::\n\nオブジェクトの深いコピーを作成します。\n\n```typescript\nconst cloned = cloneDeep(value);\n```\n\n## 使用法\n\n### `cloneDeep(value)`\n\n値の深いコピーを作成したい場合は、`cloneDeep`を使用してください。ネストされたオブジェクトと配列を完全に新しいインスタンスとしてコピーします。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\n// 原始値のコピー\nconst num = 42;\nconst clonedNum = cloneDeep(num);\n// Returns: 42 (同じ値)\n\n// 配列の深いコピー\nconst arr = [1, [2, 3], { a: 4 }];\nconst clonedArr = cloneDeep(arr);\nclonedArr[1][0] = 99;\nconsole.log(arr[1][0]); // 2 (元の値は変更されない)\nconsole.log(clonedArr[1][0]); // 99\n\n// オブジェクトの深いコピー\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n    d: {\n      e: 3,\n    },\n  },\n};\nconst clonedObj = cloneDeep(obj);\nclonedObj.b.d.e = 99;\nconsole.log(obj.b.d.e); // 3 (元の値は変更されない)\nconsole.log(clonedObj.b.d.e); // 99\n\n// Dateオブジェクトの深いコピー\nconst date = new Date('2023-01-01');\nconst clonedDate = cloneDeep(date);\n// Returns: new Date('2023-01-01') (新しいDateインスタンス)\n\n// 複雑なネスト構造\nconst complex = {\n  arr: [1, { nested: true }],\n  map: new Map([['key', { value: 1 }]]),\n  set: new Set([{ item: 1 }]),\n  date: new Date(),\n};\nconst clonedComplex = cloneDeep(complex);\n// すべてのネストされたオブジェクトが完全に新しいインスタンスとしてコピーされる\n```\n\n循環参照も正しく処理されます。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nobj.self = obj; // 循環参照\n\nconst cloned = cloneDeep(obj);\nconsole.log(cloned !== obj); // true\nconsole.log(cloned.self === cloned); // true (循環参照が保持される)\n```\n\n#### パラメータ\n\n- `value` (`T`): 深くコピーする値です。\n\n#### 戻り値\n\n(`T`): 深くコピーされた値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/cloneDeepWith.md",
    "content": "# cloneDeepWith (Lodash 互換性)\n\n::: warning カスタムロジックの実装を推奨します\n\nこの `cloneDeepWith` 関数は、複雑なカスタマイザー関数と深いコピー処理により相対的に遅くなります。\n\n代わりに、`cloneDeep` とカスタムロジックを直接実装する方法を使用してください。\n\n:::\n\nカスタマイザー関数を使用してオブジェクトの深いコピーを作成します。\n\n```typescript\nconst cloned = cloneDeepWith(value, customizer);\n```\n\n## 使用法\n\n### `cloneDeepWith(value, customizer?)`\n\n深いコピーの動作をカスタマイズしたい場合は、`cloneDeepWith`を使用してください。カスタマイザー関数が特定の値のコピー方法を制御します。\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\n// 基本的な使用法(カスタマイザーなし)\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst cloned = cloneDeepWith(obj);\n// Returns: { a: 1, b: { c: 2 } } (完全に新しいインスタンス)\n\n// Dateオブジェクトの特別処理\nconst obj2 = {\n  name: 'test',\n  createdAt: new Date('2023-01-01'),\n  nested: {\n    updatedAt: new Date('2023-12-31'),\n  },\n};\nconst cloned2 = cloneDeepWith(obj2, value => {\n  if (value instanceof Date) {\n    // Dateをタイムスタンプ数値に変換\n    return value.getTime();\n  }\n  // undefinedを返すとデフォルトの深いコピー動作を使用\n});\n// Returns: {\n//   name: 'test',\n//   createdAt: 1672531200000,\n//   nested: { updatedAt: 1703980800000 }\n// }\n\n// 配列要素の変換\nconst arr = [1, [2, 3], { a: 4, b: [5, 6] }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value * 10;\n  }\n});\n// Returns: [10, [20, 30], { a: 40, b: [50, 60] }]\n\n// 関数の処理\nconst objWithFunc = {\n  data: { count: 1 },\n  increment: function () {\n    this.data.count++;\n  },\n};\nconst clonedWithFunc = cloneDeepWith(objWithFunc, value => {\n  if (typeof value === 'function') {\n    // 関数を文字列に変換\n    return value.toString();\n  }\n});\n// Returns: {\n//   data: { count: 1 },\n//   increment: \"function() { this.data.count++; }\"\n// }\n```\n\n循環参照とカスタマイザーの組み合わせ:\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nobj.b.self = obj; // 循環参照\n\nconst cloned = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value + 100;\n  }\n});\n\nconsole.log(cloned.a); // 101\nconsole.log(cloned.b.c); // 102\nconsole.log(cloned.b.self === cloned); // true (循環参照が保持される)\n```\n\n#### パラメータ\n\n- `value` (`T`): 深くコピーする値です。\n- `customizer` (`function`, オプション): コピー方法を決定する関数です。`(value: any, key?: string, object?: any, stack?: Map<any, any>) => any` の形式です。\n\n#### 戻り値\n\n(`T`): カスタマイザーによって処理された深いコピーを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/cloneWith.md",
    "content": "# cloneWith (Lodash 互換性)\n\n::: warning カスタムロジックの実装を推奨します\n\nこの `cloneWith` 関数は、複雑なカスタマイザー関数の処理により相対的に遅くなります。\n\n代わりに、`clone` とカスタムロジックを直接実装する方法を使用してください。\n\n:::\n\nカスタマイザー関数を使用してオブジェクトの浅いコピーを作成します。\n\n```typescript\nconst cloned = cloneWith(value, customizer);\n```\n\n## 使用法\n\n### `cloneWith(value, customizer?)`\n\nコピーの動作をカスタマイズしたい場合は、`cloneWith`を使用してください。カスタマイザー関数が特定の値のコピー方法を制御します。\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\n// 基本的な使用法(カスタマイザーなし)\nconst obj = { a: 1, b: 'hello' };\nconst cloned = cloneWith(obj);\n// Returns: { a: 1, b: 'hello' } (新しいオブジェクトインスタンス)\n\n// 数値の変換\nconst obj2 = { a: 1, b: 2, c: 'text' };\nconst cloned2 = cloneWith(obj2, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (typeof val === 'number') {\n      obj[key] = val * 2;\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { a: 2, b: 4, c: 'text' }\n\n// 配列要素の変換\nconst arr = [1, 2, 3];\nconst clonedArr = cloneWith(arr, value => {\n  return value.map(x => x + 10);\n});\n// Returns: [11, 12, 13]\n\n// 特定のタイプの処理\nconst complex = {\n  date: new Date('2023-01-01'),\n  number: 42,\n  text: 'hello',\n};\nconst clonedComplex = cloneWith(complex, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (val instanceof Date) {\n      obj[key] = val.toISOString();\n    } else if (typeof val === 'string') {\n      obj[key] = val.toUpperCase();\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { date: '2023-01-01T00:00:00.000Z', number: 42, text: 'HELLO' }\n```\n\nカスタマイザーが `undefined` を返す場合、デフォルトのコピー動作が使用されます。\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nconst cloned = cloneWith(obj, value => {\n  // すべての値に対してundefinedを返す = デフォルトのコピー\n  return undefined;\n});\n// Returns: { a: 1, b: { c: 2 } } (cloneと同じ結果)\n```\n\n#### パラメータ\n\n- `value` (`T`): コピーする値です。\n- `customizer` (`function`, オプション): コピー方法を決定する関数です。`(value: any) => any` の形式です。\n\n#### 戻り値\n\n(`T`): カスタマイザーによって処理された浅いコピーを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/create.md",
    "content": "# create (Lodash 互換性)\n\n::: warning `Object.create`を使用してください\n\nこの `create` 関数は、複雑なプロパティ処理ロジックにより相対的に遅くなります。\n\n代わりに、より高速で現代的な `Object.create` を使用してください。\n\n:::\n\n与えられたプロトタイプを継承する新しいオブジェクトを作成します。\n\n```typescript\nconst obj = create(prototype, properties);\n```\n\n## 使用法\n\n### `create(prototype, properties?)`\n\nプロトタイプに基づいて新しいオブジェクトを作成したい場合は、`create`を使用してください。オプションでプロパティを追加することもできます。\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst person = {\n  greet() {\n    console.log(`Hello, my name is ${this.name}`);\n  },\n};\n\nconst john = create(person, { name: 'John' });\njohn.greet(); // \"Hello, my name is John\"\n\n// メソッド継承の確認\nconsole.log('greet' in john); // true\nconsole.log(john.hasOwnProperty('greet')); // false (継承されたプロパティ)\nconsole.log(john.hasOwnProperty('name')); // true (固有のプロパティ)\n\n// 複雑なプロトタイプ\nconst animal = {\n  type: 'animal',\n  makeSound() {\n    console.log('Some generic sound');\n  },\n};\n\nconst dog = create(animal, {\n  breed: 'Golden Retriever',\n  name: 'Buddy',\n  makeSound() {\n    console.log('Woof!');\n  },\n});\n\nconsole.log(dog.type); // 'animal' (継承された)\nconsole.log(dog.breed); // 'Golden Retriever' (固有のプロパティ)\ndog.makeSound(); // 'Woof!' (オーバーライドされたメソッド)\n\n// nullプロトタイプ\nconst cleanObj = create(null, { data: 'value' });\nconsole.log(cleanObj.toString); // ƒ toString() { [native code] } (nullは{}と同等)\n\n// 空のオブジェクトの継承\nconst empty = create({});\nconsole.log(Object.getPrototypeOf(empty)); // {} (空のオブジェクト)\n```\n\nプロパティには、列挙可能な文字列キーのみがコピーされます。\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\nconst proto = { inherited: true };\nconst props = {\n  visible: 'yes',\n  [Symbol('hidden')]: 'no', // Symbolキーはコピーされない\n};\n\n// 列挙不可能なプロパティを追加\nObject.defineProperty(props, 'hidden', {\n  value: 'secret',\n  enumerable: false,\n});\n\nconst obj = create(proto, props);\nconsole.log(obj.visible); // 'yes'\nconsole.log(obj.hidden); // undefined (列挙不可能)\nconsole.log(obj[Symbol('hidden')]); // undefined (Symbolキー)\nconsole.log(obj.inherited); // true (継承された)\n```\n\n#### パラメータ\n\n- `prototype` (`T extends object`): 継承するプロトタイプオブジェクトです。\n- `properties` (`U extends object`, オプション): 新しいオブジェクトに追加するプロパティです。\n\n#### 戻り値\n\n(`T & U`): プロトタイプを継承し、指定されたプロパティを持つ新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/defaults.md",
    "content": "# defaults (Lodash 互換性)\n\n::: warning `Object.assign()` を使用してください\n\nこの `defaults` 関数は、`undefined` と `Object.prototype` から継承されたプロパティを特別に処理する複雑なロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.assign()` を使用してください。\n\n:::\n\nオブジェクトの `undefined` プロパティをデフォルト値で埋めます。\n\n```typescript\nconst result = defaults(object, source);\n```\n\n## 使用法\n\n### `defaults(object, ...sources)`\n\nオブジェクトの `undefined` プロパティや `Object.prototype` から継承されたプロパティにデフォルト値を設定したい場合は、`defaults` を使用してください。複数のデフォルト値オブジェクトを渡すことができ、左から右の順に適用されます。\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\n// デフォルト値で undefined プロパティを埋める\ndefaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 });\n// 戻り値: { a: 1, b: 2, c: 3 }\n\n// undefined プロパティのみがデフォルト値で埋められます\ndefaults({ a: undefined }, { a: 1 });\n// 戻り値: { a: 1 }\n\n// null 値はそのまま保持されます\ndefaults({ a: null }, { a: 1 });\n// 戻り値: { a: null }\n```\n\nプロパティがすでに値を持っている場合、デフォルト値で上書きされません。\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\ndefaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n// 戻り値: { a: 1, b: 2, c: 3 }\n```\n\n#### パラメータ\n\n- `object` (`any`): デフォルト値を設定する対象オブジェクトです。\n- `...sources` (`any[]`): デフォルト値を提供するソースオブジェクトです。\n\n#### 戻り値\n\n(`any`): デフォルト値が設定されたオブジェクトを返します。最初の引数 `object` が変更されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/defaultsDeep.md",
    "content": "# defaultsDeep (Lodash 互換性)\n\n::: warning 分割代入と `Object.assign()` を使用してください\n\nこの `defaultsDeep` 関数は、ネストされたオブジェクトの再帰的なマージと循環参照の処理により、複雑で遅く動作します。\n\n代わりに、より高速で現代的な分割代入と `Object.assign()` を使用してください。\n\n:::\n\nネストされたオブジェクトに再帰的にデフォルト値を設定します。\n\n```typescript\nconst result = defaultsDeep(target, ...sources);\n```\n\n## 使用法\n\n### `defaultsDeep(target, ...sources)`\n\nネストされたオブジェクトの `undefined` プロパティに再帰的にデフォルト値を設定したい場合は、`defaultsDeep` を使用してください。`defaults` と似ていますが、ネストされたオブジェクトもマージします。\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\n// ネストされたオブジェクトのデフォルト値設定\ndefaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 });\n// 戻り値: { a: { b: 2, c: 3 }, d: 4 }\n\n// undefined プロパティのみがデフォルト値で埋められます\ndefaultsDeep({ a: { b: undefined } }, { a: { b: 1 } });\n// 戻り値: { a: { b: 1 } }\n\n// null 値はそのまま保持されます\ndefaultsDeep({ a: null }, { a: { b: 1 } });\n// 戻り値: { a: null }\n```\n\n複数のソースオブジェクトを渡して、デフォルト値を段階的に適用できます。\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\ndefaultsDeep({ a: { b: 2 } }, { a: { c: 3 } }, { a: { d: 4 }, e: 5 });\n// 戻り値: { a: { b: 2, c: 3, d: 4 }, e: 5 }\n```\n\n#### パラメータ\n\n- `target` (`any`): デフォルト値を設定する対象オブジェクトです。\n- `...sources` (`any[]`): デフォルト値を提供するソースオブジェクトです。\n\n#### 戻り値\n\n(`any`): デフォルト値が再帰的に設定されたオブジェクトを返します。最初の引数 `target` が変更されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/extend.md",
    "content": "# extend (Lodash 互換性)\n\n::: warning `Object.assign()` を使用してください\n\nこの `extend` 関数は、プロトタイプチェーンから継承されたプロパティを処理する複雑なロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.assign()` を使用してください。\n\n:::\n\nオブジェクトの固有プロパティと継承されたプロパティを別のオブジェクトにコピーします。\n\n```typescript\nconst result = extend(object, source);\n```\n\n## 使用法\n\n### `extend(object, ...sources)`\n\nあるオブジェクトから別のオブジェクトにプロパティをコピーするには、`extend` を使用してください。`Object.assign()` と似ていますが、継承されたプロパティもコピーします。この関数は `assignIn` のエイリアスです。\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\n// 基本的なプロパティのコピー\nconst target = { a: 1 };\nextend(target, { b: 2 }, { c: 3 });\n// 戻り値: { a: 1, b: 2, c: 3 }\n\n// 継承されたプロパティもコピーします\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.b = 2;\n\nconst source = new Parent();\nextend({}, source);\n// 戻り値: { a: 1, b: 2 }\n```\n\n同じプロパティが存在する場合、後のソースオブジェクトの値で上書きされます。\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\nextend({ a: 1, b: 2 }, { b: 3 }, { c: 4 });\n// 戻り値: { a: 1, b: 3, c: 4 }\n```\n\n#### パラメータ\n\n- `object` (`any`): プロパティをコピーされる対象オブジェクトです。\n- `...sources` (`any[]`): プロパティを提供するソースオブジェクトです。\n\n#### 戻り値\n\n(`any`): プロパティがコピーされたオブジェクトを返します。最初の引数である `object` が変更されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/extendWith.md",
    "content": "# extendWith (Lodash 互換性)\n\n::: warning 代わりに `Object.assign()` とカスタム関数を使用してください\n\nこの `extendWith` 関数は、プロトタイプチェーンから継承されたプロパティの処理とカスタムマージロジックにより、複雑で遅く動作します。\n\n代わりに、より高速で現代的な `Object.assign()` とカスタム関数を使用してください。\n\n:::\n\nオブジェクトの固有プロパティと継承されたプロパティをカスタム関数で処理して、他のオブジェクトにコピーします。\n\n```typescript\nconst result = extendWith(object, source, customizer);\n```\n\n## 使用法\n\n### `extendWith(object, ...sources, customizer)`\n\nオブジェクトのプロパティをカスタムロジックでマージする場合は `extendWith` を使用してください。`extend` と似ていますが、各プロパティをどのようにマージするかを自分で決定できます。この関数は `assignInWith` のエイリアスです。\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\n// カスタムマージロジックでプロパティをコピー\nconst target = { a: 1, b: 2 };\nextendWith(target, { b: 3, c: 4 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 戻り値: { a: 1, b: 2, c: 4 }\n\n// 配列を連結するカスタムマージ\nconst obj1 = { a: [1, 2] };\nconst obj2 = { a: [3, 4], b: [5, 6] };\nextendWith(obj1, obj2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 戻り値: { a: [1, 2, 3, 4], b: [5, 6] }\n```\n\n複数のソースオブジェクトを使用できます。\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\nextendWith({ a: 1 }, { b: 2 }, { c: 3 }, (objValue, srcValue) => srcValue * 2);\n// 戻り値: { a: 1, b: 4, c: 6 }\n```\n\n#### パラメータ\n\n- `object` (`any`): プロパティをコピーされるターゲットオブジェクトです。\n- `...sources` (`any[]`): プロパティを提供するソースオブジェクトです。\n- `customizer` (`function`): 各プロパティに割り当てる値を決定する関数です。`(objValue, srcValue, key, object, source)` を受け取ります。\n\n#### 戻り値\n\n(`any`): プロパティがコピーされたオブジェクトを返します。最初の引数である `object` が変更されます。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/findKey.md",
    "content": "# findKey (Lodash 互換性)\n\n::: warning `es-toolkit`の`findKey`を使用してください\n\nこの`findKey`関数は、さまざまな条件タイプの処理と互換性ロジックにより、複雑に動作します。\n\n代わりに、より高速で現代的な`es-toolkit`の[findKey](../../object/findKey.md)を使用してください。\n\n:::\n\n条件に一致する最初の要素のキーを検索します。\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 使用法\n\n### `findKey(obj, predicate)`\n\nオブジェクト内で条件に一致する最初の要素のキーを検索するには`findKey`を使用してください。関数、オブジェクト、配列、文字列など、さまざまな形式の条件を使用できます。\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\n// 関数条件でキーを検索\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindKey(users, user => user.age > 30);\n// 戻り値: 'charlie'\n\n// オブジェクト条件でキーを検索\nfindKey(users, { active: false });\n// 戻り値: 'bob'\n\n// プロパティパスでキーを検索\nfindKey(users, 'active');\n// 戻り値: 'alice'\n```\n\n条件に一致する要素がない場合は`undefined`を返します。\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\nfindKey({ a: 1, b: 2 }, value => value > 5);\n// 戻り値: undefined\n```\n\n#### パラメータ\n\n- `obj` (`T | null | undefined`): 検索するオブジェクトです。\n- `predicate` (`ObjectIteratee<T>`, オプション): 各要素に適用する条件です。関数、オブジェクト、配列、文字列を指定できます。\n\n#### 戻り値\n\n(`string | undefined`): 条件に一致する最初の要素のキーを返します。一致するものがない場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/findLastKey.md",
    "content": "# findLastKey (Lodash 互換性)\n\n::: warning `Array.findLast()`と`Object.keys()`を使用してください\n\nこの `findLastKey` 関数は、様々な条件タイプの処理と互換性ロジックにより複雑に動作します。\n\n代わりに、より高速で現代的な `Array.findLast()` と `Object.keys()` を使用してください。\n\n:::\n\n条件に一致する最後の要素のキーを末尾から探します。\n\n```typescript\nconst key = findLastKey(obj, predicate);\n```\n\n## 使用法\n\n### `findLastKey(obj, predicate)`\n\nオブジェクトで条件に一致する最後の要素のキーを見つけるために `findLastKey` を使用してください。`findKey` とは逆に、末尾から検索します。関数、オブジェクト、配列、文字列など、様々な形式の条件を使用できます。\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\n// 関数条件でキーを見つける\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindLastKey(users, user => user.active);\n// 戻り値: 'charlie' (末尾から見つけた最初の active: true)\n\n// オブジェクト条件でキーを見つける\nfindLastKey(users, { active: true });\n// 戻り値: 'charlie'\n\n// プロパティパスでキーを見つける\nfindLastKey(users, 'active');\n// 戻り値: 'charlie'\n\n// プロパティ-値配列でキーを見つける\nfindLastKey(users, ['active', false]);\n// 戻り値: 'bob'\n```\n\n条件に一致する要素がない場合は `undefined` を返します。\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\nfindLastKey({ a: 1, b: 2 }, value => value > 5);\n// 戻り値: undefined\n```\n\n#### パラメータ\n\n- `obj` (`T | null | undefined`): 検索するオブジェクトです。\n- `predicate` (`ObjectIteratee<T>`, オプション): 各要素に適用する条件です。関数、オブジェクト、配列、文字列が使用できます。\n\n#### 戻り値\n\n(`string | undefined`): 条件に一致する最後の要素のキーを返します。見つからない場合は `undefined` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/forIn.md",
    "content": "# forIn (Lodash 互換性)\n\n::: warning `Object.keys` と `for...in` ループを使用してください\n\nこの `forIn` 関数は、`null` や `undefined` の処理、デフォルトの `iteratee` 設定などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.keys` と `for...in` ループを使用してください。\n\n:::\n\nオブジェクトのすべてのプロパティ(継承されたプロパティを含む)を反復処理し、各プロパティに対して関数を呼び出します。\n\n```typescript\nconst result = forIn(obj, iteratee);\n```\n\n## 使用法\n\n### `forIn(object, iteratee)`\n\nオブジェクトのすべてのプロパティを反復処理し、`iteratee` 関数を呼び出します。オブジェクトの固有プロパティだけでなく、プロトタイプチェーンを通じて継承されたプロパティもすべて反復処理します。`iteratee` 関数が `false` を返すと、反復処理を停止します。\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\n// オブジェクトのすべてのプロパティを反復処理\nconst obj = { a: 1, b: 2 };\nforIn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'a' 1, 'b' 2\n\n// 継承されたプロパティも含めて反復処理\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforIn(child, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'inherited' 'value', 'own' 'ownValue', 'protoProperty' 'proto'\n\n// 条件による早期終了\nforIn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' の後で停止\n});\n// 出力: 'a' 1\n```\n\n`null` または `undefined` はそのまま返されます。\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\nforIn(null, iteratee); // null\nforIn(undefined, iteratee); // undefined\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): 反復処理するオブジェクトです。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, オプション): 各プロパティに対して呼び出す関数です。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`T | null | undefined`): 元のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/forInRight.md",
    "content": "# forInRight (Lodash 互換性)\n\n::: warning `Object.keys` と `for...in` ループを使用してください\n\nこの `forInRight` 関数は、キー配列の生成、逆順の走査、`null` や `undefined` の処理などにより、パフォーマンスが遅くなります。\n\n代わりに、より高速で現代的な `Object.keys` と `for...in` ループを使用してください。\n\n:::\n\nオブジェクトのすべてのプロパティ(継承されたプロパティを含む)を逆順で反復し、各プロパティに対して関数を呼び出します。\n\n```typescript\nconst result = forInRight(obj, iteratee);\n```\n\n## 使用法\n\n### `forInRight(object, iteratee)`\n\nオブジェクトのすべてのプロパティを逆順で反復し、`iteratee` 関数を呼び出します。オブジェクトの固有プロパティだけでなく、プロトタイプチェーンを通じて継承されたプロパティも反復します。キーを配列に収集してから逆順で走査するため、通常の反復よりも遅くなります。`iteratee` 関数が `false` を返すと、反復を停止します。\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\n// すべてのプロパティを逆順で反復\nconst obj = { a: 1, b: 2 };\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'b' 2, 'a' 1\n\n// 継承されたプロパティも含めて逆順で反復\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforInRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'protoProperty' 'proto', 'own' 'ownValue', 'inherited' 'value'\n\n// 条件に基づく早期終了\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' で停止\n});\n// 出力: 'b' 2, 'a' 1\n```\n\n`null` または `undefined` はそのまま返されます。\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\nforInRight(null, iteratee); // null\nforInRight(undefined, iteratee); // undefined\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): 反復するオブジェクト。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, オプション): 各プロパティに対して呼び出す関数。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`T | null | undefined`): 元のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/forOwn.md",
    "content": "# forOwn (Lodash 互換性)\n\n::: warning 代わりに `Object.keys` とループを使用してください\n\nこの `forOwn` 関数は、内部的に `keys` 関数を呼び出し、オブジェクト変換プロセス、`null` や `undefined` の処理などにより、動作が遅くなります。\n\n代わりに、より高速でモダンな `Object.keys` とループを使用してください。\n\n:::\n\nオブジェクトの固有プロパティのみを反復し、各プロパティに対して関数を呼び出します。\n\n```typescript\nconst result = forOwn(obj, iteratee);\n```\n\n## 使用法\n\n### `forOwn(object, iteratee)`\n\nオブジェクトの固有プロパティのみを反復し、`iteratee` 関数を呼び出します。継承されたプロパティや `Symbol` キーを除外し、オブジェクトが直接所有しているプロパティのみを反復します。`iteratee` 関数が `false` を返すと、反復を中断します。\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\n// オブジェクトの固有プロパティのみを反復\nconst obj = { a: 1, b: 2 };\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'a' 1, 'b' 2\n\n// 継承されたプロパティは除外\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwn(child, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'inherited' 'value', 'own' 'ownValue' (protoProperty は除外)\n\n// 条件に応じた早期終了\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' の後で中断\n});\n// 出力: 'a' 1\n```\n\n`null` や `undefined` はそのまま返されます。\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\nforOwn(null, iteratee); // null\nforOwn(undefined, iteratee); // undefined\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): 反復するオブジェクトです。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, オプション): 各プロパティに対して呼び出す関数です。デフォルト値は `identity` 関数です。\n\n#### 戻り値\n\n(`T | null | undefined`): 元のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/forOwnRight.md",
    "content": "# forOwnRight (Lodash 互換性)\n\n::: warning `Object.keys` とループを使用してください\nこの `forOwnRight` 関数は、内部的に `keys` 関数を呼び出し、オブジェクト変換プロセスや逆順走査などにより遅く動作します。\n\n代わりに、より速く、より現代的な `Object.keys` とループを使用してください。\n\n:::\n\nオブジェクトの固有プロパティのみを逆順で反復処理し、各プロパティに対して関数を呼び出します。\n\n```typescript\nconst result = forOwnRight(obj, iteratee);\n```\n\n## 使用法\n\n### `forOwnRight(object, iteratee)`\n\nオブジェクトの固有プロパティのみを逆順で反復処理し、`iteratee` 関数を呼び出します。継承されたプロパティや `Symbol` キーを除外し、オブジェクトが直接所有するプロパティのみを逆順で反復処理します。キーを配列に収集してから逆順で走査するため、通常の走査よりも遅くなります。`iteratee` 関数が `false` を返すと、反復処理が停止します。\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\n// オブジェクトの固有プロパティのみを逆順で反復処理\nconst obj = { a: 1, b: 2 };\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'b' 2, 'a' 1\n\n// 継承されたプロパティを除外して逆順で反復処理\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwnRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 出力: 'own' 'ownValue', 'inherited' 'value' (protoProperty は除外)\n\n// 条件に基づく早期終了\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' で停止\n});\n// 出力: 'b' 2, 'a' 1\n```\n\n`null` または `undefined` はそのまま返されます。\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\nforOwnRight(null, iteratee); // null\nforOwnRight(undefined, iteratee); // undefined\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): 反復処理するオブジェクトです。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, オプション): 各プロパティに対して呼び出す関数です。デフォルトは `identity` 関数です。\n\n#### 戻り値\n\n(`T | null | undefined`): 元のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/fromPairs.md",
    "content": "# fromPairs (Lodash 互換性)\n\n::: warning `Object.fromEntries`を使用してください\n\nこの `fromPairs` 関数は、配列様オブジェクトのチェックと反復処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.fromEntries` を使用してください。\n\n:::\n\nキーと値のペアの配列をオブジェクトに変換します。\n\n```typescript\nconst result = fromPairs(pairs);\n```\n\n## 使用法\n\n### `fromPairs(pairs)`\n\nキーと値のペアからなる配列を受け取り、オブジェクトに変換します。各キーと値のペアは2つの要素を持つ配列である必要があります。最初の要素がキーになり、2番目の要素が値になります。データを整理または変換する際に便利です。\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\n// 基本的なキーと値のペアの変換\nconst pairs = [\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n];\nconst result = fromPairs(pairs);\n// 結果: { a: 1, b: 2, c: 3 }\n\n// 様々な値の型を処理\nconst mixedPairs = [\n  ['name', 'John'],\n  ['age', 30],\n  ['active', true],\n];\nconst user = fromPairs(mixedPairs);\n// 結果: { name: 'John', age: 30, active: true }\n```\n\n`null`、`undefined`、または配列様オブジェクトでない値は空のオブジェクトとして処理されます。\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\nfromPairs(null); // {}\nfromPairs(undefined); // {}\nfromPairs('invalid'); // {}\n```\n\n#### パラメータ\n\n- `pairs` (`ArrayLike<[PropertyName, T]> | ArrayLike<any[]> | null | undefined`): オブジェクトに変換するキーと値のペアの配列です。\n\n#### 戻り値\n\n(`Record<string, any> | Record<string, T>`): キーと値のペアから生成されたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/functions.md",
    "content": "# functions (Lodash 互換性)\n\n::: warning `Object.keys` と `typeof` チェックを使用してください\n\nこの `functions` 関数は内部的に `keys` 関数とフィルタリング処理を経由するため、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.keys` と `typeof` チェックを使用してください。\n\n:::\n\nオブジェクトの固有プロパティのうち、関数であるプロパティの名前を配列として返します。\n\n```typescript\nconst functionNames = functions(obj);\n```\n\n## 使用法\n\n### `functions(object)`\n\nオブジェクトの固有プロパティを確認し、関数であるプロパティの名前のみを配列として返します。継承されたプロパティや `Symbol` キーを除外し、オブジェクトが直接所有する文字列キープロパティのみを確認します。オブジェクトのメソッドを見つけたり、関数プロパティのみを個別に処理したりする際に便利です。\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\n// 基本的な使い方\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functions(obj);\n// 結果: ['greet', 'calculate']\n\n// クラスインスタンスで関数を探す\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst methods = functions(calc);\n// 結果: ['add'] (継承された multiply、divide は除外)\n\n// 関数がないオブジェクト\nconst data = { x: 1, y: 2, z: 'text' };\nconst noFunctions = functions(data);\n// 結果: []\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\nfunctions(null); // []\nfunctions(undefined); // []\n```\n\n#### パラメータ\n\n- `object` (`any`): 確認するオブジェクトです。\n\n#### 戻り値\n\n(`string[]`): 関数であるプロパティの名前で構成された配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/functionsIn.md",
    "content": "# functionsIn (Lodash 互換性)\n\n::: warning `for...in` ループと `typeof` チェックを使用してください\n\nこの `functionsIn` 関数は `for...in` ループと関数チェック処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `for...in` ループと `typeof` チェックを使用してください。\n\n:::\n\nオブジェクトのすべてのプロパティ(継承されたプロパティを含む)の中から、関数型のプロパティ名を配列として返します。\n\n```typescript\nconst functionNames = functionsIn(obj);\n```\n\n## 使用法\n\n### `functionsIn(object)`\n\nオブジェクトのすべてのプロパティを確認し、関数型のプロパティ名のみを配列として返します。オブジェクト自身のプロパティだけでなく、プロトタイプチェーンを通じて継承されたプロパティもすべて確認します。オブジェクトのすべてのメソッド(継承されたメソッドを含む)を見つけるのに便利です。\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functionsIn(obj);\n// 結果: ['greet', 'calculate']\n\n// 継承された関数も含む\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst allMethods = functionsIn(calc);\n// 結果: ['add', 'divide'] (`multiply` は非列挙型)\n\n// プロトタイプチェーンを通じた継承\nfunction Parent() {\n  this.parentMethod = function () {\n    return 'parent';\n  };\n}\nParent.prototype.protoMethod = function () {\n  return 'proto';\n};\n\nfunction Child() {\n  Parent.call(this);\n  this.childMethod = function () {\n    return 'child';\n  };\n}\nChild.prototype = Object.create(Parent.prototype);\n\nconst child = new Child();\nconst inheritedFunctions = functionsIn(child);\n// 結果: ['parentMethod', 'childMethod', 'protoMethod']\n```\n\n`null` または `undefined` は空配列として扱われます。\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\nfunctionsIn(null); // []\nfunctionsIn(undefined); // []\n```\n\n#### パラメータ\n\n- `object` (`any`): 確認するオブジェクトです。\n\n#### 戻り値\n\n(`string[]`): 関数型のプロパティ名(継承された関数を含む)で構成された配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/get.md",
    "content": "# get (Lodash 互換性)\n\n::: warning ドット表記法またはブラケット表記法を使用してください\n\nこの `get` 関数は、複雑なパス解析、`null` または `undefined` の処理、デフォルト値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的なドット表記法 (`.`)、ブラケット表記法 (`[]`)、またはオプショナルチェイニング (`?.`) を使用してください。\n\n:::\n\nオブジェクトの指定されたパスにある値を取得します。\n\n```typescript\nconst value = get(object, path, defaultValue);\n```\n\n## 使用法\n\n### `get(object, path, defaultValue?)`\n\nオブジェクトのパスから安全に値を取得するには `get` を使用してください。パスが存在しない場合や値が `undefined` の場合は、デフォルト値を返します。\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\n// ドット表記法でネストされたオブジェクトにアクセス\nconst object = { a: { b: { c: 3 } } };\nget(object, 'a.b.c');\n// => 3\n\n// 配列表記法でアクセス\nget(object, ['a', 'b', 'c']);\n// => 3\n\n// 存在しないパスにデフォルト値を提供\nget(object, 'a.b.d', 'default');\n// => 'default'\n\n// 配列インデックスを含むパス\nconst arrayObject = { users: [{ name: 'john' }, { name: 'jane' }] };\nget(arrayObject, 'users[0].name');\n// => 'john'\n```\n\n`null` または `undefined` のオブジェクトに安全にアクセスします。\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\nget(null, 'a.b.c', 'default');\n// => 'default'\n\nget(undefined, ['a', 'b'], 'default');\n// => 'default'\n```\n\n#### パラメータ\n\n- `object` (`any`): 照会するオブジェクトです。\n- `path` (`PropertyPath`): 取得するプロパティのパスです。文字列、数値、シンボル、または配列で表すことができます。\n- `defaultValue` (`any`, オプション): 値が `undefined` のときに返すデフォルト値です。\n\n#### 戻り値\n\n(`any`): 解決された値またはデフォルト値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/has.md",
    "content": "# has (Lodash互換性)\n\n::: warning `Object.hasOwn` または `in` 演算子を使用してください\n\nこの `has` 関数は、複雑なパス解析や配列インデックス処理により動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.hasOwn()` または `in` 演算子を使用してください。\n\n:::\n\nオブジェクトに指定されたパスのプロパティが存在するかどうかを確認します。\n\n```typescript\nconst exists = has(object, path);\n```\n\n## 使用法\n\n### `has(object, path)`\n\nオブジェクトに特定のパスのプロパティがあるかどうかを確認したい場合は、`has` を使用してください。自身のプロパティ(own property)のみを確認し、継承されたプロパティは確認しません。\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\n// 単純なプロパティの確認\nconst object = { a: 1, b: 2 };\nhas(object, 'a');\n// => true\n\n// ネストされたオブジェクトの確認\nconst nested = { a: { b: { c: 3 } } };\nhas(nested, 'a.b.c');\n// => true\nhas(nested, ['a', 'b', 'c']);\n// => true\n\n// 存在しないプロパティ\nhas(nested, 'a.b.d');\n// => false\n\n// 配列インデックスの確認\nconst array = [1, 2, 3];\nhas(array, 2);\n// => true\nhas(array, 5);\n// => false\n```\n\n疎配列(sparse array)でも正しく動作します。\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\nconst sparse = [1, , 3]; // インデックス1が空\nhas(sparse, 0); // true\nhas(sparse, 1); // true - 実際には存在しますが、値はundefined\nhas(sparse, 2); // true\n```\n\n#### パラメータ\n\n- `object` (`any`): 検査するオブジェクト。\n- `path` (`PropertyPath`): 確認するプロパティのパス。文字列、数値、シンボル、または配列で表すことができます。\n\n#### 戻り値\n\n(`boolean`): パスのプロパティが存在する場合は `true`、そうでない場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/hasIn.md",
    "content": "# hasIn (Lodash 互換性)\n\n::: warning `in` 演算子を使用してください\n\nこの `hasIn` 関数は、複雑なパス解析とプロトタイプチェーンのチェックにより動作が遅くなります。\n\n代わりに、より高速でモダンな `in` 演算子または `Object.hasOwn()` 関数を使用してください。\n\n:::\n\nオブジェクトに指定されたパスのプロパティが存在するか、継承されたプロパティも含めて確認します。\n\n```typescript\nconst exists = hasIn(object, path);\n```\n\n## 使用法\n\n### `hasIn(object, path)`\n\nオブジェクトに特定のパスのプロパティがあるか確認したい場合は `hasIn` を使用します。`has` とは異なり、継承されたプロパティ(プロトタイプチェーンのプロパティ)も一緒に確認します。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// 自身のプロパティを確認\nconst object = { a: 1, b: 2 };\nhasIn(object, 'a');\n// => true\n\n// ネストされたオブジェクトを確認\nconst nested = { a: { b: { c: 3 } } };\nhasIn(nested, 'a.b.c');\n// => true\nhasIn(nested, ['a', 'b', 'c']);\n// => true\n\n// 存在しないプロパティ\nhasIn(nested, 'a.b.d');\n// => false\n\n// 配列のインデックスを確認\nconst array = [1, 2, 3];\nhasIn(array, 2);\n// => true\nhasIn(array, 5);\n// => false\n```\n\n継承されたプロパティも確認します。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// プロトタイプチェーンのプロパティを確認\nfunction Rectangle() {}\nRectangle.prototype.area = function () {};\n\nconst rect = new Rectangle();\nhasIn(rect, 'area'); // true - 継承されたプロパティも見つかる\nhas(rect, 'area'); // false - has は自身のプロパティのみ確認\n```\n\n`null` や `undefined` を安全に処理します。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\nhasIn(null, 'a');\n// => false\n\nhasIn(undefined, 'b');\n// => false\n```\n\n#### パラメータ\n\n- `object` (`any`): 検査するオブジェクトです。\n- `path` (`PropertyPath`): 確認するプロパティのパスです。文字列、数値、シンボル、または配列で表すことができます。\n\n#### 戻り値\n\n(`boolean`): パスのプロパティが存在する場合(自身のプロパティでも継承されたプロパティでも) `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/invert.md",
    "content": "# invert (Lodash 互換性)\n\n::: warning `es-toolkit`の`invert`を使用してください\n\nこの`invert`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`invert`](../../object/invert.md)を使用してください。\n\n:::\n\nオブジェクトのキーと値を入れ替えます。\n\n```typescript\nconst inverted = invert(object);\n```\n\n## 使用法\n\n### `invert(object)`\n\nオブジェクトのキーと値を入れ替えたい場合は`invert`を使用してください。元のオブジェクトのキーは新しいオブジェクトの値になり、元のオブジェクトの値は新しいオブジェクトのキーになります。\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 基本的なキー・値の入れ替え\nconst object = { a: 1, b: 2, c: 3 };\ninvert(object);\n// => { '1': 'a', '2': 'b', '3': 'c' }\n\n// 文字列値の入れ替え\nconst colors = { red: '#ff0000', green: '#00ff00', blue: '#0000ff' };\ninvert(colors);\n// => { '#ff0000': 'red', '#00ff00': 'green', '#0000ff': 'blue' }\n\n// 混合キーと値のタイプ\nconst mixed = { a: 1, 2: 'b', c: 3, 4: 'd' };\ninvert(mixed);\n// => { '1': 'a', 'b': '2', '3': 'c', 'd': '4' }\n```\n\n重複した値がある場合、最後のキーが使用されます。\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 重複した値がある場合\nconst object = { a: 1, b: 1, c: 2 };\ninvert(object);\n// => { '1': 'b', '2': 'c' }\n// 'a'は上書きされて失われます\n```\n\n#### パラメータ\n\n- `object` (`object`): 入れ替えるオブジェクトです。\n\n#### 戻り値\n\n(`Record<string, string>`): キーと値が入れ替わった新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/invertBy.md",
    "content": "# invertBy (Lodash 互換性)\n\n::: warning 現代的な JavaScript API を使用してください\n\nこの `invertBy` 関数は、複雑なイテレータ処理とグループ化ロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.entries()` と `reduce()` または `Map` を使用してください。\n\n:::\n\nオブジェクトのキーと値を反転し、同じ値を配列にグループ化します。\n\n```typescript\nconst inverted = invertBy(object, iteratee);\n```\n\n## 使用法\n\n### `invertBy(object, iteratee?)`\n\nオブジェクトのキーと値を反転し、同じ値を持つキーを配列にグループ化したい場合は、`invertBy` を使用してください。オプションでイテレータ関数を提供して値を変換できます。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// 基本的なキーと値の反転(同じ値が配列にグループ化されます)\nconst object = { a: 1, b: 2, c: 1 };\ninvertBy(object);\n// => { '1': ['a', 'c'], '2': ['b'] }\n\n// イテレータ関数を使用した値の変換\nconst ages = { john: 25, jane: 30, bob: 25 };\ninvertBy(ages, age => `age_${age}`);\n// => { 'age_25': ['john', 'bob'], 'age_30': ['jane'] }\n\n// 文字列の長さでグループ化\nconst words = { a: 'hello', b: 'world', c: 'hi', d: 'test' };\ninvertBy(words, word => word.length);\n// => { '5': ['a', 'b'], '2': ['c'], '4': ['d'] }\n```\n\nオブジェクトのプロパティでグループ化することもできます。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// オブジェクトのプロパティでグループ化\nconst users = {\n  user1: { department: 'IT', age: 30 },\n  user2: { department: 'HR', age: 25 },\n  user3: { department: 'IT', age: 35 },\n};\n\ninvertBy(users, user => user.department);\n// => { 'IT': ['user1', 'user3'], 'HR': ['user2'] }\n```\n\n`null` または `undefined` を安全に処理します。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\ninvertBy(null);\n// => {}\n\ninvertBy(undefined);\n// => {}\n```\n\n#### パラメータ\n\n- `object` (`object`): 反転するオブジェクトです。\n- `iteratee` (`ValueIteratee`, オプション): 値を変換する関数です。デフォルトは値をそのまま使用する関数です。\n\n#### 戻り値\n\n(`Record<string, string[]>`): 変換された値をキーとし、元のキーの配列を値とする新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/keys.md",
    "content": "# keys (Lodash 互換性)\n\n::: warning `Object.keys`を使用してください\n\nこの `keys` 関数は、配列風オブジェクトの処理、プロトタイプオブジェクトの処理などの複雑なロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `Object.keys()` を使用してください。\n\n:::\n\nオブジェクト自身の列挙可能なプロパティ名を配列として返します。\n\n```typescript\nconst keyArray = keys(object);\n```\n\n## 使用法\n\n### `keys(object)`\n\nオブジェクト自身のプロパティ名を取得したい場合は `keys` を使用します。継承されたプロパティは含まず、自身のプロパティのみを返します。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// 基本オブジェクトのキー\nconst object = { a: 1, b: 2, c: 3 };\nkeys(object);\n// => ['a', 'b', 'c']\n\n// 配列のインデックス\nconst array = [1, 2, 3];\nkeys(array);\n// => ['0', '1', '2']\n\n// 文字列のインデックス\nkeys('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n関数やコンストラクタから継承されたプロパティは除外されます。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeys(new Foo());\n// => ['a', 'b'] ('c'はプロトタイプのプロパティなので除外されます)\n```\n\n配列風オブジェクトは特別に処理されます。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeys(typedArray);\n// => ['0', '1', '2']\n\n// arguments オブジェクト\nfunction example() {\n  return keys(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n`null` や `undefined` を安全に処理します。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nkeys(null);\n// => []\n\nkeys(undefined);\n// => []\n```\n\n#### パラメータ\n\n- `object` (`any`): キーを取得するオブジェクトです。\n\n#### 戻り値\n\n(`string[]`): オブジェクト自身の列挙可能なプロパティ名の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/keysIn.md",
    "content": "# keysIn (Lodash 互換性)\n\n::: warning `for...in` ループまたは `Object.keys` を使用してください\n\nこの `keysIn` 関数は、配列のようなオブジェクトの処理やプロトタイプチェーンの走査などの複雑なロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `for...in` ループまたは必要に応じて `Object.keys()` を使用してください。\n\n:::\n\nオブジェクトのすべての列挙可能なプロパティ名を継承されたプロパティも含めて配列で返します。\n\n```typescript\nconst allKeys = keysIn(object);\n```\n\n## 使用法\n\n### `keysIn(object)`\n\nオブジェクトのすべてのプロパティ名を継承されたプロパティも含めて取得したい場合は `keysIn` を使用してください。`keys` とは異なり、プロトタイプチェーンのプロパティも一緒に返します。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// 基本オブジェクトのキー\nconst object = { a: 1, b: 2 };\nkeysIn(object);\n// => ['a', 'b']\n\n// 配列のインデックス\nconst array = [1, 2, 3];\nkeysIn(array);\n// => ['0', '1', '2']\n\n// 文字列のインデックス\nkeysIn('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n継承されたプロパティも含まれます。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeysIn(new Foo());\n// => ['a', 'b', 'c'] (プロトタイプのプロパティ 'c' も含む)\n\n// constructor は除外されます\nclass MyClass {\n  constructor() {\n    this.prop = 1;\n  }\n  method() {}\n}\nMyClass.prototype.inherited = 2;\n\nkeysIn(new MyClass());\n// => ['prop', 'method', 'inherited'] (constructor は除外される)\n```\n\n配列のようなオブジェクトを特別に処理します。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeysIn(typedArray);\n// => ['0', '1', '2'] (buffer、byteLength などは除外)\n\n// arguments オブジェクト\nfunction example() {\n  return keysIn(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n`null` または `undefined` を安全に処理します。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nkeysIn(null);\n// => []\n\nkeysIn(undefined);\n// => []\n```\n\n#### パラメータ\n\n- `object` (`any`): キーを取得するオブジェクトです。\n\n#### 戻り値\n\n(`string[]`): オブジェクトのすべての列挙可能なプロパティ名(自身のプロパティと継承されたプロパティの両方を含む)の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/mapKeys.md",
    "content": "# mapKeys (Lodash 互換性)\n\n::: warning `es-toolkit`の`mapKeys`を使用してください\n\nこの `mapKeys` 関数は、`null`や`undefined`の処理、`iteratee`変換過程により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`mapKeys`](../../object/mapKeys.md)を使用してください。\n\n:::\n\n値をそのままにしてキーを変換し、新しいオブジェクトを作成します。\n\n```typescript\nconst result = mapKeys(obj, iteratee);\n```\n\n## 使用法\n\n### `mapKeys(object, iteratee)`\n\n`iteratee`関数を使用してオブジェクト内の各キーを変換し、新しいオブジェクトを作成します。値は変更されず、キーのみが変更されます。オブジェクトのキーを変換または正規化する際に便利です。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\n// キーに接頭辞を追加\nconst obj = { a: 1, b: 2, c: 3 };\nconst result = mapKeys(obj, (value, key) => 'prefix_' + key);\n// 結果: { prefix_a: 1, prefix_b: 2, prefix_c: 3 }\n\n// キーを大文字に変換\nconst data = { name: 'John', age: 30 };\nconst uppercased = mapKeys(data, (value, key) => key.toUpperCase());\n// 結果: { NAME: 'John', AGE: 30 }\n\n// 配列のインデックスをキーに変換\nconst arr = ['apple', 'banana', 'orange'];\nconst indexed = mapKeys(arr, (value, index) => `item_${index}`);\n// 結果: { item_0: 'apple', item_1: 'banana', item_2: 'orange' }\n\n// キーと値を組み合わせて新しいキーを生成\nconst scores = { math: 90, science: 85, english: 92 };\nconst detailed = mapKeys(scores, (value, key) => `${key}_score_${value}`);\n// 結果: { math_score_90: 90, science_score_85: 85, english_score_92: 92 }\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\nmapKeys(null, iteratee); // {}\nmapKeys(undefined, iteratee); // {}\n```\n\n#### パラメータ\n\n- `object` (`ArrayLike<T> | T | null | undefined`): キーを変換するオブジェクトまたは配列です。\n- `iteratee` (`ListIteratee<T> | ObjectIteratee<T>`, オプション): 各キーを変換する関数です。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`Record<string, T> | Record<string, T[keyof T]>`): 変換されたキーを持つ新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/mapValues.md",
    "content": "# mapValues (Lodash 互換性)\n\n::: warning `es-toolkit`の`mapValues`を使用してください\n\nこの `mapValues` 関数は、`null`や`undefined`の処理、`iteratee`変換過程により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`mapValues`](../../object/mapValues.md)を使用してください。\n\n:::\n\nキーをそのままにして値を変換し、新しいオブジェクトを作成します。\n\n```typescript\nconst result = mapValues(obj, iteratee);\n```\n\n## 使用法\n\n### `mapValues(object, iteratee)`\n\n`iteratee`関数を使用してオブジェクト内の各値を変換し、新しいオブジェクトを作成します。キーは変更されず、値のみが変更されます。文字列、配列、オブジェクトすべてを処理できます。データを変換または計算する際に便利です。\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\n// オブジェクトの値を変換\nconst obj = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(obj, value => value * 2);\n// 結果: { a: 2, b: 4, c: 6 }\n\n// 文字列を大文字に変換\nconst names = { first: 'john', last: 'doe' };\nconst uppercased = mapValues(names, value => value.toUpperCase());\n// 結果: { first: 'JOHN', last: 'DOE' }\n\n// 文字列の各文字を変換\nconst str = 'abc';\nconst charMap = mapValues(str, char => char.toUpperCase());\n// 結果: { '0': 'A', '1': 'B', '2': 'C' }\n\n// 配列をオブジェクトに変換\nconst arr = [10, 20, 30];\nconst arrMap = mapValues(arr, (value, index) => value + index);\n// 結果: { '0': 10, '1': 21, '2': 32 }\n\n// プロパティパスで値を抽出\nconst users = {\n  user1: { profile: { name: 'Alice' } },\n  user2: { profile: { name: 'Bob' } },\n};\nconst userNames = mapValues(users, 'profile.name');\n// 結果: { user1: 'Alice', user2: 'Bob' }\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\nmapValues(null, iteratee); // {}\nmapValues(undefined, iteratee); // {}\n```\n\n#### パラメータ\n\n- `object` (`string | T[] | T | null | undefined`): 値を変換するオブジェクト、配列、または文字列です。\n- `iteratee` (`ValueIteratee<any>`, オプション): 各値を変換する関数、プロパティパス、またはマッチングオブジェクトです。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`Record<number, T> | { [P in keyof T]: U } | Record<string, boolean> | Record<string, any> | Partial<T>`): 変換された値を持つ新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/merge.md",
    "content": "# merge (Lodash 互換性)\n\n::: warning `es-toolkit`の`merge`を使用してください\n\nこの `merge` 関数は、内部的に複雑な `mergeWith` 関数を呼び出すため相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`merge`](../../object/merge.ts)を使用してください。\n\n:::\n\n複数のオブジェクトを深くマージして1つのオブジェクトにします。\n\n```typescript\nconst result = merge(target, ...sources);\n```\n\n## 使用法\n\n### `merge(object, ...sources)`\n\nターゲットオブジェクトに1つ以上のソースオブジェクトを深くマージします。ネストされたオブジェクトと配列は再帰的にマージされます。ソースオブジェクトのプロパティが`undefined`の場合、ターゲットオブジェクトの既存の値は上書きされません。オブジェクト設定のマージやデフォルト値の適用に便利です。\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\n// 基本的なオブジェクトのマージ\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// 結果: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// 配列のマージ\nconst obj1 = { arr: [1, 2] };\nconst obj2 = { arr: [3, 4] };\nconst merged = merge(obj1, obj2);\n// 結果: { arr: [3, 4] } (配列は置き換えられる)\n\n// 複数のオブジェクトをマージ\nconst base = { a: 1 };\nconst ext1 = { b: 2 };\nconst ext2 = { c: 3 };\nconst ext3 = { d: 4 };\nconst combined = merge(base, ext1, ext2, ext3);\n// 結果: { a: 1, b: 2, c: 3, d: 4 }\n\n// ネストされたオブジェクトのマージ\nconst config = {\n  api: { url: 'https://api.example.com', timeout: 5000 },\n  features: { auth: true },\n};\nconst overrides = {\n  api: { timeout: 10000, retries: 3 },\n  features: { analytics: true },\n};\nconst finalConfig = merge(config, overrides);\n// 結果: {\n//   api: { url: 'https://api.example.com', timeout: 10000, retries: 3 },\n//   features: { auth: true, analytics: true }\n// }\n```\n\nターゲットオブジェクトは変更されるため、元を保持したい場合は空のオブジェクトを使用してください。\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\nconst original = { a: 1, b: { x: 1 } };\nconst source = { b: { y: 2 } };\n\n// 元を保持\nconst result = merge({}, original, source);\n// original は変更されない\n```\n\n#### パラメータ\n\n- `object` (`any`): マージ先となるターゲットオブジェクトです。このオブジェクトは変更されます。\n- `...sources` (`any[]`): マージするソースオブジェクトです。\n\n#### 戻り値\n\n(`any`): マージされたターゲットオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/mergeWith.md",
    "content": "# mergeWith (Lodash 互換性)\n\n::: warning `es-toolkit`の`mergeWith`を使用してください\n\nこの `mergeWith` 関数は、複雑な型チェック、循環参照処理、特殊オブジェクト処理により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`mergeWith`](../../object/mergeWith.md)を使用してください。\n\n:::\n\nカスタマイザー関数でマージ方法を制御しながら、複数のオブジェクトを深くマージします。\n\n```typescript\nconst result = mergeWith(target, ...sources, customizer);\n```\n\n## 使用法\n\n### `mergeWith(object, ...sources, customizer)`\n\nターゲットオブジェクトに1つ以上のソースオブジェクトを深くマージしますが、カスタマイザー関数でマージ方法を制御します。カスタマイザー関数が`undefined`を返す場合、デフォルトのマージロジックが使用されます。配列の連結や特別なマージルールが必要な場合に便利です。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\n// 数値を加算\nconst obj1 = { a: 1, b: 2 };\nconst obj2 = { b: 3, c: 4 };\nconst result = mergeWith(obj1, obj2, (objValue, srcValue) => {\n  if (typeof objValue === 'number' && typeof srcValue === 'number') {\n    return objValue + srcValue;\n  }\n});\n// 結果: { a: 1, b: 5, c: 4 }\n\n// 配列を連結\nconst arr1 = { items: [1, 2] };\nconst arr2 = { items: [3, 4] };\nconst merged = mergeWith(arr1, arr2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 結果: { items: [1, 2, 3, 4] }\n\n// 文字列を連結\nconst str1 = { message: 'Hello' };\nconst str2 = { message: 'World' };\nconst combined = mergeWith(str1, str2, (objValue, srcValue, key) => {\n  if (key === 'message' && typeof objValue === 'string') {\n    return objValue + ' ' + srcValue;\n  }\n});\n// 結果: { message: 'Hello World' }\n\n// 複数のソースオブジェクトとカスタマイザー\nconst base = { scores: [80] };\nconst quiz1 = { scores: [90] };\nconst quiz2 = { scores: [85] };\nconst final = mergeWith(base, quiz1, quiz2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 結果: { scores: [80, 90, 85] }\n```\n\nカスタマイザー関数は様々なパラメータを受け取ります。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\nconst customizer = (objValue, srcValue, key, object, source, stack) => {\n  console.log('マージ中:', key, objValue, '->', srcValue);\n\n  // 特定のキーに対してのみカスタマイズ\n  if (key === 'specialField') {\n    return `${objValue}_${srcValue}`;\n  }\n\n  // undefinedを返すとデフォルトのマージロジックを使用\n  return undefined;\n};\n```\n\n#### パラメータ\n\n- `object` (`any`): マージ先となるターゲットオブジェクトです。このオブジェクトは変更されます。\n- `...sources` (`any[]`): マージするソースオブジェクトです。\n- `customizer` (`MergeWithCustomizer`): 値の割り当てをカスタマイズする関数です。形式: `(objValue, srcValue, key, object, source, stack) => any`。\n\n#### 戻り値\n\n(`any`): マージされたターゲットオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/omit.md",
    "content": "# omit (Lodash 互換性)\n\n::: warning `es-toolkit`の`omit`を使用してください\n\nこの `omit` 関数は、深いコピーと `unset` 関数の呼び出しにより相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`omit`](../../object/omit.md)を使用してください。\n\n:::\n\nオブジェクトから指定されたキーを除外した新しいオブジェクトを作成します。\n\n```typescript\nconst result = omit(obj, ...keys);\n```\n\n## 使用法\n\n### `omit(object, ...paths)`\n\nオブジェクトから指定されたキーを除外した新しいオブジェクトを作成します。深いキーパスをサポートし、配列を使用して一度に複数のキーを指定することもできます。オブジェクトから機密情報を削除したり、必要なプロパティのみを選択する際に便利です。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\n// 基本的なキーの削除\nconst user = { id: 1, name: 'John', email: 'john@example.com', password: 'secret' };\nconst publicUser = omit(user, 'password', 'email');\n// 結果: { id: 1, name: 'John' }\n\n// 配列で複数のキーを削除\nconst data = { a: 1, b: 2, c: 3, d: 4 };\nconst filtered = omit(data, ['a', 'c']);\n// 結果: { b: 2, d: 4 }\n\n// 深いキーパスの削除\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst result = omit(nested, 'user.profile.age', 'admin');\n// 結果: { user: { profile: { name: 'John' }, settings: { theme: 'dark' } } }\n\n// ネストされた配列とキーの組み合わせ\nconst complex = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst simplified = omit(complex, 'a', ['b', 'c'], 'd.f');\n// 結果: { d: { e: 4 } }\n```\n\n配列、文字列、キーパスを自由に組み合わせることができます。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nconst config = {\n  api: { url: 'https://api.example.com', key: 'secret', timeout: 5000 },\n  ui: { theme: 'dark', language: 'en' },\n  debug: true,\n};\n\n// 複数の方法でキーを指定\nconst cleaned = omit(config, 'api.key', ['debug'], 'ui.language');\n// 結果: { api: { url: 'https://api.example.com', timeout: 5000 }, ui: { theme: 'dark' } }\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nomit(null, 'key'); // {}\nomit(undefined, 'key'); // {}\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): キーを削除する元のオブジェクトです。\n- `...paths` (`Array<Many<PropertyKey>>`): 削除するキーです。単一のキー、キーの配列、または深いキーパスを指定できます。\n\n#### 戻り値\n\n(`Partial<T>`): 指定されたキーが削除された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/omitBy.md",
    "content": "# omitBy (Lodash 互換性)\n\n::: warning `es-toolkit`の`omitBy`を使用してください\n\nこの `omitBy` 関数は、配列様オブジェクトのチェック、`iteratee`変換、キー変換過程により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`omitBy`](../../object/omitBy.md)を使用してください。\n\n:::\n\n述語関数がtrueを返すプロパティを除外した新しいオブジェクトを作成します。\n\n```typescript\nconst result = omitBy(obj, predicate);\n```\n\n## 使用法\n\n### `omitBy(object, predicate)`\n\nオブジェクトの各プロパティに対して述語関数を実行し、述語がtrueを返すプロパティを除外した新しいオブジェクトを作成します。条件に基づいてプロパティを動的にフィルタリングする際に便利です。\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\n// 特定の型の値を削除\nconst data = { a: 1, b: 'remove', c: 3, d: 'keep' };\nconst numbers = omitBy(data, value => typeof value === 'string');\n// 結果: { a: 1, c: 3 }\n\n// 条件に基づいてプロパティを削除\nconst user = { id: 1, name: 'John', age: 0, active: false, email: '' };\nconst validData = omitBy(user, value => !value);\n// 結果: { id: 1, name: 'John' } (偽値を削除)\n\n// キー名でフィルタリング\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = omitBy(settings, (value, key) => key.startsWith('admin'));\n// 結果: { userSetting: true, debugMode: true }\n\n// 数値プロパティのみ削除\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst noNumbers = omitBy(mixed, value => typeof value === 'number');\n// 結果: { str: 'hello', bool: true, obj: {} }\n\n// 配列でも使用可能\nconst arr = [1, 2, 3, 4, 5];\nconst filtered = omitBy(arr, value => value % 2 === 0);\n// 結果: { '0': 1, '2': 3, '4': 5 } (偶数インデックスの奇数値)\n\n// 値、キー、元のオブジェクトをすべて活用\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst passingGrades = omitBy(scores, (value, key, obj) => {\n  console.log(`${key}: ${value} (平均: ${Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length})`);\n  return value < 80;\n});\n// 結果: { math: 90, english: 85 }\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\nomitBy(null, () => true); // {}\nomitBy(undefined, () => true); // {}\n```\n\n#### パラメータ\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): フィルタリングする元のオブジェクトです。\n- `predicate` (`ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, オプション): 各プロパティに対して実行する述語関数です。これがtrueを返すプロパティは削除されます。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 条件に合致しないプロパティで構成された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/pick.md",
    "content": "# pick (Lodash 互換性)\n\n::: warning `es-toolkit`の`pick`を使用してください\n\nこの `pick` 関数は、複雑なパス処理、`get`/`set`関数の呼び出し、`null`/`undefined`の処理により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`pick`](../../object/pick.md)を使用してください。\n\n:::\n\nオブジェクトから指定したプロパティのみを選択して新しいオブジェクトを作成します。\n\n```typescript\nconst result = pick(obj, ...keys);\n```\n\n## 使用法\n\n### `pick(object, ...props)`\n\nオブジェクトから必要なプロパティのみを選んで新しいオブジェクトを作りたい場合は`pick`を使用してください。配列で複数のキーを一度に渡すか、個別の引数として1つずつ渡すことができます。深いキーパスもサポートしているため、ネストされたプロパティも選択できます。\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// 結果: { a: 1, c: 3 }\n\n// 個別の引数として渡す\nconst result2 = pick(obj, 'a', 'c');\n// 結果: { a: 1, c: 3 }\n\n// 深いパスを選択\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst userInfo = pick(nested, 'user.profile.name', 'admin');\n// 結果: { user: { profile: { name: 'John' } }, admin: true }\n\n// 配列と個別のキーを混在\nconst mixed = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst selected = pick(mixed, ['a', 'b'], 'c', 'd.e');\n// 結果: { a: 1, b: 2, c: 3, d: { e: 4 } }\n\n// ドット表記キーと実際のドット付きキーを区別\nconst ambiguous = {\n  'a.b': 1, // 実際のキー 'a.b'\n  a: { b: 2, c: 3 }, // ネストされたオブジェクト\n};\nconst dotKey = pick(ambiguous, 'a.b');\n// 結果: { 'a.b': 1 } (実際のキーが優先)\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\npick(null, ['a', 'b']); // {}\npick(undefined, ['a', 'b']); // {}\n```\n\n#### パラメータ\n\n- `object` (`T | null | undefined`): プロパティを選択するオブジェクトです。\n- `...props` (`Array<Many<PropertyPath>>`): 選択するプロパティのキーです。単一のキー、キーの配列、または深いキーパスを指定できます。\n\n#### 戻り値\n\n(`Pick<T, U> | Partial<T>`): 指定されたプロパティのみを含む新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/pickBy.md",
    "content": "# pickBy (Lodash 互換性)\n\n::: warning `es-toolkit`の`pickBy`を使用してください\n\nこの `pickBy` 関数は、配列様オブジェクトのチェック、`iteratee`変換、キー変換過程により相対的に遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[`pickBy`](../../object/pickBy.md)を使用してください。\n\n:::\n\n述語関数がtrueを返すプロパティのみを選択して新しいオブジェクトを作成します。\n\n```typescript\nconst result = pickBy(obj, predicate);\n```\n\n## 使用法\n\n### `pickBy(object, predicate)`\n\nオブジェクトの各プロパティに対して述語関数を実行し、述語がtrueを返すプロパティのみを含む新しいオブジェクトを作成します。条件に基づいてプロパティを動的に選択する際に便利です。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\n// 特定の型の値のみを選択\nconst data = { a: 1, b: 'keep', c: 3, d: 'select' };\nconst strings = pickBy(data, value => typeof value === 'string');\n// 結果: { b: 'keep', d: 'select' }\n\n// 条件に基づいてプロパティを選択\nconst user = { id: 1, name: 'John', age: 0, active: true, email: '' };\nconst validData = pickBy(user, value => Boolean(value));\n// 結果: { id: 1, name: 'John', active: true } (真値のみ)\n\n// キー名でフィルタリング\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = pickBy(settings, (value, key) => key.startsWith('user'));\n// 結果: { userSetting: true }\n\n// 数値プロパティのみを選択\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst numbersOnly = pickBy(mixed, value => typeof value === 'number');\n// 結果: { num1: 42, num2: 0 }\n\n// 配列でも使用可能\nconst arr = [1, 2, 3, 4, 5];\nconst evens = pickBy(arr, value => value % 2 === 0);\n// 結果: { '1': 2, '3': 4 } (偶数のインデックスと値)\n\n// 値、キー、元のオブジェクトをすべて活用\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst highScores = pickBy(scores, (value, key, obj) => {\n  const average = Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length;\n  return value > average;\n});\n// 結果: { math: 90, english: 85 }\n```\n\n述語関数なしで呼び出すと、真値のみが選択されます。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: '', c: 0, d: 'hello', e: null, f: true };\nconst truthyValues = pickBy(data);\n// 結果: { a: 1, d: 'hello', f: true }\n```\n\n`null`または`undefined`は空のオブジェクトとして処理されます。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\npickBy(null, () => true); // {}\npickBy(undefined, () => true); // {}\n```\n\n#### パラメータ\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): フィルタリングする元のオブジェクトです。\n- `predicate` (`ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, オプション): 各プロパティに対して実行する述語関数です。これがtrueを返すプロパティが選択されます。デフォルトは`identity`関数です。\n\n#### 戻り値\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 条件に合致するプロパティで構成された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/property.md",
    "content": "# property (Lodash 互換性)\n\n::: warning `get`関数を直接使用してください\n\nこの `property` 関数は内部的に `get` 関数を呼び出すラッパー関数で、追加の関数呼び出しオーバーヘッドが発生します。\n\n代わりに、より高速で現代的な `get` 関数を直接使用するか、オプショナルチェーニング(`?.`)を使用してください。\n\n:::\n\n指定されたパスの値を取得する関数を作成します。\n\n```typescript\nconst getter = property(path);\n```\n\n## 使用法\n\n### `property(path)`\n\n特定のパスから値を取得する関数を作成したい場合は`property`を使用してください。作成された関数は複数のオブジェクトで再利用でき、配列メソッドと一緒に使用するのに便利です。\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst getName = property('name');\nconst user = { name: 'John', age: 30 };\nconst result = getName(user);\n// 結果: 'John'\n\n// 深いパスへのアクセス\nconst getNestedValue = property('user.profile.name');\nconst data = { user: { profile: { name: 'Alice', age: 25 } } };\nconst nestedResult = getNestedValue(data);\n// 結果: 'Alice'\n\n// 配列パスを使用\nconst getByArray = property(['user', 'profile', 'name']);\nconst arrayResult = getByArray(data);\n// 結果: 'Alice'\n\n// 配列メソッドと一緒に使用\nconst users = [\n  { user: { profile: { name: 'John' } } },\n  { user: { profile: { name: 'Jane' } } },\n  { user: { profile: { name: 'Bob' } } },\n];\nconst names = users.map(property('user.profile.name'));\n// 結果: ['John', 'Jane', 'Bob']\n\n// 配列インデックスアクセス\nconst getFirstItem = property('[0]');\nconst items = ['first', 'second', 'third'];\nconst firstItem = getFirstItem(items);\n// 結果: 'first'\n\n// 数値キーアクセス\nconst getIndex = property(1);\nconst arr = ['a', 'b', 'c'];\nconst secondItem = getIndex(arr);\n// 結果: 'b'\n```\n\nパスが存在しない場合は`undefined`を返します。\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\nconst getMissing = property('nonexistent.path');\nconst result = getMissing({ some: 'data' });\n// 結果: undefined\n```\n\n#### パラメータ\n\n- `path` (`PropertyPath`): 値を取得するパスです。文字列、数値、シンボル、またはこれらの配列を指定できます。\n\n#### 戻り値\n\n(`(object: T) => R`): 与えられたオブジェクトから指定されたパスの値を返す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/propertyOf.md",
    "content": "# propertyOf (Lodash 互換性)\n\n::: warning `get`関数を直接使用してください\n\nこの `propertyOf` 関数は内部的に `get` 関数を呼び出すラッパー関数で、追加の関数呼び出しオーバーヘッドが発生します。\n\n代わりに、より高速で現代的な `get` 関数を直接使用するか、オプショナルチェーニング(`?.`)を使用してください。\n\n:::\n\n特定のオブジェクトから様々なパスの値を取得する関数を作成します。\n\n```typescript\nconst getter = propertyOf(obj);\n```\n\n## 使用法\n\n### `propertyOf(object)`\n\n1つのオブジェクトから複数のパスの値を取得する関数を作りたい場合は`propertyOf`を使用してください。`property`とは逆に、オブジェクトを先に固定し、様々なパスをクエリできます。\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst data = { name: 'John', age: 30, city: 'New York' };\nconst getValue = propertyOf(data);\n\nconst name = getValue('name');\n// 結果: 'John'\n\nconst age = getValue('age');\n// 結果: 30\n\n// 深いパスへのアクセス\nconst complexData = {\n  user: { profile: { name: 'Alice', age: 25 } },\n  settings: { theme: 'dark', lang: 'en' },\n};\nconst getComplexValue = propertyOf(complexData);\n\nconst userName = getComplexValue('user.profile.name');\n// 結果: 'Alice'\n\nconst theme = getComplexValue('settings.theme');\n// 結果: 'dark'\n\n// 配列パスを使用\nconst arrayPath = getComplexValue(['user', 'profile', 'age']);\n// 結果: 25\n\n// 複数のパスを配列で処理\nconst paths = ['user.profile.name', 'settings.theme', 'settings.lang'];\nconst values = paths.map(getComplexValue);\n// 結果: ['Alice', 'dark', 'en'] (各パスの値)\n\n// 配列インデックスアクセス\nconst arrayData = [10, 20, 30];\nconst getArrayValue = propertyOf(arrayData);\nconst firstItem = getArrayValue(0);\n// 結果: 10\n\nconst secondItem = getArrayValue('[1]');\n// 結果: 20\n```\n\nパスが存在しない場合は`undefined`を返します。\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: 2 };\nconst getValue = propertyOf(data);\nconst missing = getValue('nonexistent.path');\n// 結果: undefined\n```\n\n#### パラメータ\n\n- `object` (`T`): 値を取得する対象のオブジェクトです。\n\n#### 戻り値\n\n(`(path: PropertyPath) => any`): 与えられたパスでオブジェクトの値を返す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/result.md",
    "content": "# result (Lodash 互換性)\n\n::: warning `get` 関数またはオプショナルチェイニングを使用してください\n\nこの `result` 関数は複雑なパス処理と関数呼び出しロジックにより動作が遅くなります。\n\n代わりに、より高速で現代的な `get` 関数またはオプショナルチェイニング(`?.`)を使用してください。\n\n:::\n\nオブジェクトのパスから値を取得しますが、関数に遭遇した場合は呼び出して結果を返します。\n\n```typescript\nconst result = result(obj, path, defaultValue);\n```\n\n## 使用法\n\n### `result(object, path, defaultValue)`\n\nオブジェクトのパスから値を取得し、パス上の関数を自動的に呼び出したい場合は `result` を使用してください。`get` 関数と似ていますが、遭遇した関数を実行し、最終値も関数であれば呼び出して結果を返します。\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\n// 基本的な使用法(通常の値)\nconst obj = { a: { b: { c: 3 } } };\nconst value = result(obj, 'a.b.c');\n// 結果: 3\n\n// 自動関数呼び出し\nconst objWithFunc = {\n  compute: () => ({ value: 42 }),\n  getValue: function () {\n    return this.compute().value;\n  },\n};\nconst computed = result(objWithFunc, 'getValue');\n// 結果: 42 (getValue 関数が呼び出される)\n\n// パス上の関数呼び出し\nconst nested = {\n  data: () => ({ user: { getName: () => 'John' } }),\n};\nconst name = result(nested, 'data.user.getName');\n// 結果: 'John' (data() と getName() の両方が呼び出される)\n\n// デフォルト値の使用\nconst incomplete = { a: { b: null } };\nconst withDefault = result(incomplete, 'a.b.c', 'default value');\n// 結果: 'default value'\n\n// デフォルト値が関数の場合\nconst withFuncDefault = result(incomplete, 'a.b.c', () => 'computed default');\n// 結果: 'computed default' (デフォルト値の関数が呼び出される)\n\n// 配列パスの使用\nconst arrayPath = result(objWithFunc, ['getValue']);\n// 結果: 42\n\n// 動的デフォルト値\nconst dynamic = result(incomplete, 'missing.path', function () {\n  return `Generated at ${new Date().toISOString()}`;\n});\n// 結果: 現在時刻を含む文字列\n```\n\n関数呼び出し時に `this` コンテキストが保持されます。\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\nconst calculator = {\n  multiplier: 2,\n  compute: function () {\n    return 10 * this.multiplier;\n  },\n};\n\nconst calculatedValue = result(calculator, 'compute');\n// 結果: 20 (this.multiplier が正しく参照される)\n```\n\n#### パラメータ\n\n- `object` (`any`): クエリを実行するオブジェクトです。\n- `path` (`PropertyPath`): 取得するプロパティのパスです。文字列、配列、またはキーの配列を指定できます。\n- `defaultValue` (`R | ((...args: any[]) => R)`, オプション): 値が `undefined` の場合に返すデフォルト値です。関数の場合は呼び出して結果を返します。\n\n#### 戻り値\n\n(`R`): 解決された値を返します。パス上の関数が呼び出され、最終値も関数であれば呼び出した結果を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/set.md",
    "content": "# set (Lodash 互換性)\n\n::: warning 直接代入を使用してください\n\nこの `set` 関数は内部的に `updateWith` 関数を呼び出し、複雑なパス処理とオブジェクト作成ロジックにより遅く動作します。\n\n代わりに、より高速で現代的な直接代入や分割代入を使用してください。\n\n:::\n\nオブジェクトの指定されたパスに値を設定します。\n\n```typescript\nconst result = set(obj, path, value);\n```\n\n## 使用法\n\n### `set(object, path, value)`\n\nオブジェクトの特定のパスに値を設定したい場合は、`set` を使用してください。パスの一部が存在しない場合は自動的に作成されます。ネストされたオブジェクトや配列を扱う際に便利です。\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\n// 基本的な使い方\nconst obj = { a: { b: { c: 3 } } };\nset(obj, 'a.b.c', 4);\nconsole.log(obj.a.b.c); // 4\n\n// 配列に値を設定\nconst arr = [1, 2, 3];\nset(arr, '1', 4);\nconsole.log(arr[1]); // 4\n\n// 存在しないパスを作成\nconst empty = {};\nset(empty, 'user.profile.name', 'John');\nconsole.log(empty);\n// 結果: { user: { profile: { name: 'John' } } }\n\n// 配列パスを使用\nconst data = {};\nset(data, ['nested', 'array', 0], 'first item');\nconsole.log(data);\n// 結果: { nested: { array: ['first item'] } }\n\n// 配列インデックスを自動作成\nconst list = {};\nset(list, 'items[0]', 'first');\nset(list, 'items[2]', 'third');\nconsole.log(list);\n// 結果: { items: ['first', undefined, 'third'] }\n\n// ネストされたオブジェクトと配列の混合\nconst complex = {};\nset(complex, 'users[0].profile.settings.theme', 'dark');\nconsole.log(complex);\n// 結果: { users: [{ profile: { settings: { theme: 'dark' } } }] }\n\n// 数値キーの処理\nconst numeric = {};\nset(numeric, 123, 'number key');\nconsole.log(numeric[123]); // 'number key'\n\n// 既存の値を上書き\nconst existing = { a: { b: 'old' } };\nset(existing, 'a.b', 'new');\nconsole.log(existing.a.b); // 'new'\n```\n\n元のオブジェクトが直接変更されて返されます。\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\nconst original = { x: 1 };\nconst result = set(original, 'y', 2);\n\nconsole.log(original === result); // true\nconsole.log(original); // { x: 1, y: 2 }\n```\n\n#### パラメータ\n\n- `object` (`T`): 値を設定するオブジェクト。\n- `path` (`PropertyPath`): 値を設定するプロパティのパス。文字列、配列、またはキーの配列にすることができます。\n- `value` (`any`): 設定する値。\n\n#### 戻り値\n\n(`T`): 変更されたオブジェクトを返します(元のオブジェクトと同じ)。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/setWith.md",
    "content": "# setWith (Lodash 互換性)\n\n::: warning 直接代入を使用してください\n\nこの `setWith` 関数は内部的に `updateWith` 関数を呼び出し、複雑なパス処理とカスタマイザーロジックにより遅く動作します。\n\n代わりに、より高速で現代的な直接代入や分割代入を使用してください。\n\n:::\n\nカスタマイザー関数でオブジェクトの作成方法を制御しながら、指定されたパスに値を設定します。\n\n```typescript\nconst result = setWith(obj, path, value, customizer);\n```\n\n## 使用法\n\n### `setWith(object, path, value, customizer)`\n\nオブジェクトの特定のパスに値を設定し、カスタマイザー関数で中間に作成されるオブジェクトのタイプを制御したい場合は、`setWith` を使用してください。カスタマイザーが `undefined` を返すと、デフォルトのロジック(配列インデックスなら配列、それ以外はオブジェクト)が使用されます。\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\n// 基本的な使い方(カスタマイザーなし)\nconst obj1 = {};\nsetWith(obj1, 'a.b.c', 4);\nconsole.log(obj1);\n// 結果: { a: { b: { c: 4 } } }\n\n// 配列の作成を強制するカスタマイザー\nconst obj2 = {};\nsetWith(obj2, '[0][1]', 'value', () => []);\nconsole.log(obj2);\n// 結果: { '0': [undefined, 'value'] }\n\n// 特定条件でのみカスタマイズ\nconst obj3 = {};\nsetWith(obj3, 'a[0].b.c', 'nested', (value, key) => {\n  // 数値キー(配列インデックス)の場合のみ空オブジェクトを返す\n  return typeof key === 'string' && /^\\d+$/.test(key) ? {} : undefined;\n});\nconsole.log(obj3);\n// 結果: { a: { '0': { b: { c: 'nested' } } } }\n\n// Object コンストラクタをカスタマイザーとして使用\nconst obj4 = {};\nsetWith(obj4, 'x[0].y', 42, Object);\nconsole.log(obj4);\n// 結果: { x: { '0': { y: 42 } } }\n\n// 複雑なカスタマイザーロジック\nconst obj5 = {};\nsetWith(obj5, 'data.items[0].props.config', 'value', (value, key, object) => {\n  console.log('Creating:', key, 'in', object);\n\n  // 特定のキーでは Map を使用\n  if (key === 'props') {\n    return new Map();\n  }\n\n  // 数値キーなら配列\n  if (typeof key === 'string' && /^\\d+$/.test(key)) {\n    return [];\n  }\n\n  // デフォルトは通常のオブジェクト\n  return {};\n});\n\n// WeakMap を中間オブジェクトとして使用\nconst obj6 = {};\nsetWith(obj6, 'cache.user.profile', 'data', (value, key) => {\n  if (key === 'cache') {\n    return new WeakMap();\n  }\n  return undefined; // デフォルトの動作を使用\n});\n```\n\nカスタマイザー関数は3つのパラメータを受け取ります。\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\nconst obj = {};\nsetWith(obj, 'a.b[0].c', 'value', (nsValue, key, nsObject) => {\n  console.log('nsValue:', nsValue); // 現在の値(通常は undefined)\n  console.log('key:', key); // 作成するキー\n  console.log('nsObject:', nsObject); // 親オブジェクト\n\n  // 特定の条件に応じて異なるオブジェクトタイプを返す\n  return key === 'b' ? [] : {};\n});\n```\n\n#### パラメータ\n\n- `object` (`T`): 値を設定するオブジェクト。\n- `path` (`PropertyPath`): 値を設定するプロパティのパス。\n- `value` (`any`): 設定する値。\n- `customizer` (`(nsValue: any, key: string, nsObject: T) => any`, オプション): 中間オブジェクトの作成をカスタマイズする関数。\n\n#### 戻り値\n\n(`T | R`): 変更されたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/toDefaulted.md",
    "content": "# toDefaulted (Lodash 互換性)\n\n::: warning スプレッド演算子または `Object.assign` を使用してください\n\nこの `toDefaulted` 関数は深いクローンと複雑なデフォルト値処理により遅く動作します。\n\n代わりに、より高速で現代的なスプレッド演算子(`...`)または `Object.assign()` を使用してください。\n\n:::\n\nオブジェクトにデフォルト値を適用した新しいオブジェクトを作成します。\n\n```typescript\nconst defaulted = toDefaulted(object, ...sources);\n```\n\n## 使用法\n\n### `toDefaulted(object, ...sources)`\n\n対象オブジェクトに1つ以上のソースオブジェクトからデフォルト値を適用した新しいオブジェクトを作成したい場合は、`toDefaulted` を使用してください。`undefined` であるプロパティまたは `Object.prototype` から継承されるプロパティにのみデフォルト値が設定されます。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\n// 基本的なデフォルト値の設定\nconst user = { name: 'John' };\nconst defaults = { name: 'Anonymous', age: 25, role: 'user' };\ntoDefaulted(user, defaults);\n// => { name: 'John', age: 25, role: 'user' }\n\n// 複数のソースからデフォルト値を適用\nconst config = { theme: 'dark' };\nconst defaults1 = { theme: 'light', lang: 'en' };\nconst defaults2 = { lang: 'ko', region: 'Asia' };\ntoDefaulted(config, defaults1, defaults2);\n// => { theme: 'dark', lang: 'en', region: 'Asia' }\n```\n\n`undefined` 値のみがデフォルト値で置き換えられ、`null` 値は維持されます。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst data = {\n  name: undefined,\n  age: null,\n  active: false,\n};\nconst defaults = {\n  name: 'Default',\n  age: 18,\n  active: true,\n  role: 'user',\n};\n\ntoDefaulted(data, defaults);\n// => { name: 'Default', age: null, active: false, role: 'user' }\n```\n\n元のオブジェクトは変更されず、新しいオブジェクトが返されます。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst original = { a: 1 };\nconst result = toDefaulted(original, { a: 2, b: 3 });\n\nconsole.log(original); // { a: 1 } (変更されない)\nconsole.log(result); // { a: 1, b: 3 } (新しいオブジェクト)\n```\n\n#### パラメータ\n\n- `object` (`object`): デフォルト値を受け取る対象オブジェクト。\n- `sources` (`object[]`): デフォルト値を提供するソースオブジェクト。左から右の順序で適用されます。\n\n#### 戻り値\n\n(`object`): デフォルト値が適用された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/toPairs.md",
    "content": "# toPairs (Lodash 互換性)\n\n::: warning `Object.entries` を使用してください\n\nこの `toPairs` 関数は `Map` と `Set` の処理、配列風オブジェクトの処理などの複雑なロジックにより遅く動作します。\n\n代わりに、より高速で現代的な `Object.entries()` を使用してください。\n\n:::\n\nオブジェクトをキー値ペアの配列に変換します。\n\n```typescript\nconst pairs = toPairs(object);\n```\n\n## 使用法\n\n### `toPairs(object)`\n\nオブジェクトの自身の列挙可能なプロパティを `[キー, 値]` 形式の配列に変換したい場合は、`toPairs` を使用してください。継承されたプロパティは含まれません。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// 基本的なオブジェクトの変換\nconst object = { a: 1, b: 2, c: 3 };\ntoPairs(object);\n// => [['a', 1], ['b', 2], ['c', 3]]\n\n// 数値キーを持つオブジェクト\nconst numbers = { 0: 'zero', 1: 'one', 2: 'two' };\ntoPairs(numbers);\n// => [['0', 'zero'], ['1', 'one'], ['2', 'two']]\n```\n\n`Map` と `Set` も処理できます。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// Map オブジェクトの変換\nconst map = new Map();\nmap.set('name', 'John');\nmap.set('age', 30);\ntoPairs(map);\n// => [['name', 'John'], ['age', 30]]\n\n// Set オブジェクトの変換(値がキーと同じ)\nconst set = new Set([1, 2, 3]);\ntoPairs(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n`null` または `undefined` を安全に処理します。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\ntoPairs(null);\n// => []\n\ntoPairs(undefined);\n// => []\n```\n\n#### パラメータ\n\n- `object` (`object`): 変換するオブジェクト、Map、または Set。\n\n#### 戻り値\n\n(`Array<[string, any]>`): キー値ペアの配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/toPairsIn.md",
    "content": "# toPairsIn (Lodash 互換性)\n\n::: warning `Object.entries` または `for...in` ループを使用してください\n\nこの `toPairsIn` 関数は継承されたプロパティの処理、`Map` と `Set` の処理などの複雑なロジックにより遅く動作します。\n\n代わりに、より高速で現代的な `Object.entries()` を使用するか、継承されたプロパティが必要な場合は `for...in` ループを使用してください。\n\n:::\n\nオブジェクトをキー値ペアの配列に変換し、継承されたプロパティも含めます。\n\n```typescript\nconst pairs = toPairsIn(object);\n```\n\n## 使用法\n\n### `toPairsIn(object)`\n\nオブジェクトのすべての列挙可能なプロパティ(継承されたプロパティを含む)を `[キー, 値]` 形式の配列に変換したい場合は、`toPairsIn` を使用してください。`toPairs` とは異なり、プロトタイプチェーンのプロパティも一緒に含まれます。\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// 基本的なオブジェクトの変換\nconst object = { a: 1, b: 2 };\ntoPairsIn(object);\n// => [['a', 1], ['b', 2]]\n\n// 継承されたプロパティも含む\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.proto = 'property';\n\nconst child = new Parent();\nchild.own = 'own';\ntoPairsIn(child);\n// => [['inherited', 'value'], ['own', 'own'], ['proto', 'property']]\n```\n\n`Map` と `Set` も処理できます。\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// Map オブジェクトの変換\nconst map = new Map([\n  ['key1', 'value1'],\n  ['key2', 'value2'],\n]);\ntoPairsIn(map);\n// => [['key1', 'value1'], ['key2', 'value2']]\n\n// Set オブジェクトの変換\nconst set = new Set([1, 2, 3]);\ntoPairsIn(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n#### パラメータ\n\n- `object` (`object`): 変換するオブジェクト、Map、または Set。\n\n#### 戻り値\n\n(`Array<[string, any]>`): キー値ペアの配列を返します(継承されたプロパティを含む)。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/transform.md",
    "content": "# transform (Lodash 互換性)\n\n::: warning `reduce` または `Object.entries` を使用してください\n\nこの `transform` 関数は複雑な内部ロジックにより遅く動作します。ほとんどの場合、JavaScript の組み込みメソッドでより簡単に実装できます。\n\n代わりに、より高速で現代的な `reduce` または `Object.entries` を使用してください。\n\n:::\n\n配列またはオブジェクトを反復処理し、アキュムレータを使用して値を蓄積して新しい値を作成します。\n\n```typescript\nconst result = transform(object, iteratee, accumulator);\n```\n\n## 使用法\n\n### `transform(object, iteratee, accumulator)`\n\n配列またはオブジェクトの各要素を反復処理し、アキュムレータに値を蓄積したい場合は、`transform` を使用してください。`iteratee` 関数が `false` を返すと反復が停止します。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 配列を変換\nconst numbers = [2, 3, 4];\nconst doubled = transform(\n  numbers,\n  (acc, value) => {\n    acc.push(value * 2);\n  },\n  []\n);\n// 返値: [4, 6, 8]\n\n// オブジェクトを変換\nconst obj = { a: 1, b: 2, c: 1 };\nconst grouped = transform(\n  obj,\n  (result, value, key) => {\n    (result[value] || (result[value] = [])).push(key);\n  },\n  {}\n);\n// 返値: { '1': ['a', 'c'], '2': ['b'] }\n```\n\nアキュムレータを省略すると、空の配列または空のオブジェクトが自動的に作成されます。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 配列の場合は空配列が作成される\nconst result1 = transform([1, 2, 3], (acc, value) => {\n  acc.push(value * 2);\n});\n// 返値: [2, 4, 6]\n\n// オブジェクトの場合は空オブジェクトが作成される\nconst result2 = transform({ a: 1, b: 2 }, (acc, value, key) => {\n  acc[key] = value * 2;\n});\n// 返値: { a: 2, b: 4 }\n```\n\n`iteratee` 関数で `false` を返すと反復を停止できます。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nconst result = transform(\n  numbers,\n  (acc, value) => {\n    if (value > 3) {\n      return false; // 反復を停止\n    }\n    acc.push(value * 2);\n  },\n  []\n);\n// 返値: [2, 4, 6] (4と5は処理されない)\n```\n\n`iteratee` 関数を省略すると、空のオブジェクトまたは配列が返されます。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3];\nconst copy1 = transform(array);\n// 返値: []\n\nconst obj = { a: 1, b: 2 };\nconst copy2 = transform(obj);\n// 返値: {}\n```\n\n#### パラメータ\n\n- `object` (`readonly T[] | T`, オプション): 反復処理する配列またはオブジェクト。\n- `iteratee` (`(accumulator: U, value: T | T[keyof T], key: any, object: readonly T[] | T) => unknown`, オプション): 各要素に対して実行する関数。`false` を返すと反復が停止します。デフォルトは `identity` 関数です。\n- `accumulator` (`U`, オプション): 初期値。省略すると、配列の場合は空配列、オブジェクトの場合は空オブジェクトが作成されます。\n\n#### 戻り値\n\n(`U | any[] | Record<string, any>`): 累積された結果を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/unset.md",
    "content": "# unset (Lodash 互換性)\n\n::: warning `delete` 演算子を使用してください\n\nこの `unset` 関数は複雑なパス解析とネストされたオブジェクト処理により遅く動作します。\n\n代わりに、より高速で現代的な `delete` 演算子を直接使用してください。\n\n:::\n\nオブジェクトの指定されたパスにあるプロパティを削除します。\n\n```typescript\nconst success = unset(obj, path);\n```\n\n## 使用法\n\n### `unset(obj, path)`\n\nネストされたオブジェクトから特定のパスのプロパティを削除したい場合に `unset` を使用してください。パスは文字列または配列で指定できます。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\n// 文字列パスでネストされたプロパティを削除\nconst obj = { a: { b: { c: 42 } } };\nunset(obj, 'a.b.c'); // => true\nconsole.log(obj); // { a: { b: {} } }\n\n// 配列パスでネストされたプロパティを削除\nconst obj2 = { a: { b: { c: 42 } } };\nunset(obj2, ['a', 'b', 'c']); // => true\nconsole.log(obj2); // { a: { b: {} } }\n```\n\n配列のインデックスで要素を削除することもできます。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst arr = [1, 2, 3, 4];\nunset(arr, 1); // => true\nconsole.log(arr); // [1, undefined, 3, 4]（要素が削除され undefined になります）\n```\n\nプロパティが存在しない場合や既に削除されている場合でも `true` を返します。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst obj = { a: { b: 1 } };\nunset(obj, 'a.c'); // => true（存在しないプロパティ）\n```\n\n`null` または `undefined` のオブジェクトは安全に処理されます。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nunset(null, 'a.b'); // => true\nunset(undefined, 'a.b'); // => true\n```\n\n#### パラメータ\n\n- `obj` (`any`): 変更するオブジェクトです。\n- `path` (`PropertyKey | PropertyKey[]`): 削除するプロパティのパスです。\n\n#### 戻り値\n\n(`boolean`): プロパティが削除された場合は `true` を返し、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/update.md",
    "content": "# update (Lodash 互換性)\n\n::: warning 直接代入を使用してください\n\nこの `update` 関数は複雑なパス解析とネストされたオブジェクト作成ロジックにより遅く動作します。\n\n代わりに、より高速で現代的な直接プロパティ代入またはオプショナルチェーンを使用してください。\n\n:::\n\nオブジェクトの指定されたパスにある値を更新関数で変更します。\n\n```typescript\nconst updated = update(obj, path, updater);\n```\n\n## 使用法\n\n### `update(obj, path, updater)`\n\nネストされたオブジェクトの特定のパスにある値を関数で変換したい場合に `update` を使用してください。パスが存在しない場合は自動的に作成されます。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// ネストされたプロパティ値を変換\nconst object = { a: [{ b: { c: 3 } }] };\nupdate(object, 'a[0].b.c', n => (n as number) * 2);\n// => { a: [{ b: { c: 6 } }] }\n\n// 配列パスで更新\nupdate(object, ['a', 0, 'b', 'c'], n => (n as number) + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\nパスが存在しない場合、必要なネストされた構造が自動的に作成されます。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// 空のオブジェクトにネストされた構造を作成\nupdate({}, 'a.b.c', () => 'hello');\n// => { a: { b: { c: 'hello' } } }\n\n// 配列も自動作成されます\nupdate({}, 'a.b[0]', () => 'value');\n// => { a: { b: ['value'] } }\n```\n\n既存の値に基づいて新しい値を計算できます。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\nconst stats = { score: 100 };\nupdate(stats, 'score', score => score * 1.1); // 10% 増加\n// => { score: 110 }\n```\n\n#### パラメータ\n\n- `obj` (`object`): 変更するオブジェクトです。\n- `path` (`PropertyKey | PropertyKey[]`): 更新するプロパティのパスです。文字列または配列で指定できます。\n- `updater` (`(value: any) => any`): 既存の値を受け取って新しい値を返す関数です。\n\n#### 戻り値\n\n(`any`): 変更されたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/updateWith.md",
    "content": "# updateWith (Lodash 互換性)\n\n::: warning 直接代入を使用してください\n\nこの `updateWith` 関数は複雑なパス解析とカスタマイザー処理により遅く動作します。\n\n代わりに、より高速で現代的な直接プロパティ代入またはオプショナルチェーンを使用してください。\n\n:::\n\nオブジェクトの指定されたパスにある値を更新関数で変更し、カスタマイザーでパスの作成を制御します。\n\n```typescript\nconst updated = updateWith(obj, path, updater, customizer);\n```\n\n## 使用法\n\n### `updateWith(obj, path, updater, customizer?)`\n\n`update` と似ていますが、パスが存在しない場合に作成される中間オブジェクトの形状をカスタマイザー関数で制御できます。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\n// 基本動作（update と同じ）\nconst object = { a: [{ b: { c: 3 } }] };\nupdateWith(object, 'a[0].b.c', n => n * n);\n// => { a: [{ b: { c: 9 } }] }\n\n// 配列パスで更新\nupdateWith(object, ['a', 0, 'b', 'c'], n => n + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\nカスタマイザーを使用して作成される中間オブジェクトの形状を制御できます。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = {};\n\n// Object コンストラクタをカスタマイザーとして使用（配列の代わりにオブジェクトを作成）\nupdateWith(object, '[0][1]', () => 'a', Object);\n// => { '0': { '1': 'a' } }\n// （デフォルトの動作では { '0': ['a'] } になります）\n```\n\nカスタマイザーは作成する値、キー、オブジェクトを引数として受け取ります。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst customizer = (value: any, key: string, object: any) => {\n  // 数値キーの場合は配列ではなくオブジェクトを作成\n  if (!isNaN(Number(key))) {\n    return {};\n  }\n};\n\nconst result = {};\nupdateWith(result, '[0][1]', () => 'value', customizer);\n// => { '0': { '1': 'value' } }\n```\n\nパスが既に存在する場合、カスタマイザーは呼び出されません。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = { a: { b: 1 } };\nupdateWith(\n  object,\n  'a.b',\n  n => n * 2,\n  () => {\n    console.log('Not called'); // 呼び出されません\n    return {};\n  }\n);\n// => { a: { b: 2 } }\n```\n\n#### パラメータ\n\n- `obj` (`T`): 変更するオブジェクトです。\n- `path` (`PropertyKey | readonly PropertyKey[]`): 更新するプロパティのパスです。文字列または配列で指定できます。\n- `updater` (`(oldValue: any) => any`): 既存の値を受け取って新しい値を返す関数です。\n- `customizer` (`(value: any, key: string, object: T) => any`, オプション): パスが存在しない場合に作成する中間オブジェクトを返す関数です。`undefined` を返すとデフォルトの動作を使用します。\n\n#### 戻り値\n\n(`T`): 変更されたオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/values.md",
    "content": "# values (Lodash 互換性)\n\n::: warning `Object.values` を使用してください\n\nこの `values` 関数は単に `Object.values` を呼び出すだけで、不必要なオーバーヘッドがあります。\n\n代わりに、より高速で現代的な `Object.values()` を直接使用してください。\n\n:::\n\nオブジェクトの自身の列挙可能なプロパティ値の配列を返します。\n\n```typescript\nconst valueArray = values(obj);\n```\n\n## 使用法\n\n### `values(obj)`\n\nオブジェクトのすべてのプロパティ値を配列として取得したい場合に `values` を使用してください。`Object.values` と同じように動作しますが、`null` または `undefined` を安全に処理します。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// オブジェクトの値を取得\nconst obj = { a: 1, b: 2, c: 3 };\nvalues(obj); // => [1, 2, 3]\n\n// 数値キーを持つオブジェクト\nconst numberKeyObj = { 0: 'a', 1: 'b', 2: 'c' };\nvalues(numberKeyObj); // => ['a', 'b', 'c']\n```\n\n配列や配列風のオブジェクトも処理できます。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// 配列\nvalues([1, 2, 3]); // => [1, 2, 3]\n\n// 文字列（配列風のオブジェクト）\nvalues('hello'); // => ['h', 'e', 'l', 'l', 'o']\n```\n\n`null` または `undefined` は空の配列として処理されます。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nvalues(null); // => []\nvalues(undefined); // => []\n```\n\n列挙可能なプロパティのみが返されます。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nconst obj = Object.create(\n  { inherited: 'not included' },\n  {\n    own: { value: 'included', enumerable: true },\n    nonEnum: { value: 'not included', enumerable: false },\n  }\n);\n\nvalues(obj); // => ['included']\n```\n\n#### パラメータ\n\n- `obj` (`Record<PropertyKey, T> | ArrayLike<T> | null | undefined`): プロパティ値を取得するオブジェクトです。\n\n#### 戻り値\n\n(`T[]`): オブジェクトの列挙可能なプロパティ値の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/object/valuesIn.md",
    "content": "# valuesIn (Lodash 互換性)\n\n::: warning `Object.values` を使用してください\n\nこの `valuesIn` 関数はプロトタイププロパティを処理する複雑なロジックにより遅く動作します。\n\n代わりに、より高速で現代的な `Object.values` を使用してください。\n\n:::\n\nオブジェクトのすべてのプロパティ値を配列として返し、継承されたプロトタイププロパティも含めます。\n\n```typescript\nconst values = valuesIn(obj);\n```\n\n## 使用法\n\n### `valuesIn(object)`\n\nオブジェクトからすべてのプロパティ値を配列として取得したい場合は、`valuesIn` を使用してください。通常の `Object.values` とは異なり、プロトタイプチェーンから継承されたプロパティの値も一緒に含まれます。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nvaluesIn(obj); // [1, 2, 3]\n\n// 配列も処理できる\nvaluesIn([1, 2, 3]); // [1, 2, 3]\n```\n\nプロトタイプから継承されたプロパティも含まれます。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.inherited = 'fromParent';\n\nfunction Child() {\n  Parent.call(this);\n  this.b = 2;\n}\nChild.prototype = Object.create(Parent.prototype);\nChild.prototype.childProp = 'childValue';\n\nconst obj = new Child();\nvaluesIn(obj); // [1, 2, 'childValue', 'fromParent'] (constructor は除外)\n```\n\n`null` または `undefined` は空配列として処理されます。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nvaluesIn(null); // []\nvaluesIn(undefined); // []\n```\n\n#### パラメータ\n\n- `object` (`any`): 値を取得するオブジェクト。\n\n#### 戻り値\n\n(`any[]`): オブジェクトのすべてのプロパティ値を含む配列を返します。継承されたプロトタイププロパティの値も含まれます。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/conforms.md",
    "content": "# conforms (Lodash互換性)\n\n条件関数を持つオブジェクトを受け取り、別のオブジェクトがすべての条件を満たすかどうかを確認する関数を作成します。\n\n```typescript\nconst checker = conforms(predicates);\n```\n\n## 使用法\n\n### `conforms(source)`\n\n複数のプロパティに対する条件を一度に確認したい場合は`conforms`を使用してください。この関数は検証関数を生成し、後で複数のオブジェクトを検査する際に便利です。\n\n```typescript\nimport { conforms } from 'es-toolkit/compat';\n\n// 条件関数の定義\nconst isPositive = n => n > 0;\nconst isEven = n => n % 2 === 0;\nconst isString = s => typeof s === 'string';\n\n// 複数の条件を含む検証関数の生成\nconst validator = conforms({\n  a: isPositive,\n  b: isEven,\n  c: isString,\n});\n\n// オブジェクトの検証\nvalidator({ a: 2, b: 4, c: 'hello' }); // true (すべての条件を満たす)\nvalidator({ a: -1, b: 4, c: 'hello' }); // false (aが正数ではない)\nvalidator({ a: 2, b: 3, c: 'hello' }); // false (bが偶数ではない)\nvalidator({ a: 2, b: 4, c: 123 }); // false (cが文字列ではない)\n\n// 配列フィルタリングでの使用\nconst users = [\n  { age: 25, score: 80, name: 'Alice' },\n  { age: 17, score: 95, name: 'Bob' },\n  { age: 30, score: 75, name: 'Charlie' },\n];\n\nconst adultHighScorer = conforms({\n  age: n => n >= 18,\n  score: n => n >= 80,\n});\n\nconst filteredUsers = users.filter(adultHighScorer);\n// [{ age: 25, score: 80, name: 'Alice' }]\n```\n\n#### パラメータ\n\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): プロパティ別の条件関数を持つオブジェクトです。\n\n#### 戻り値\n\n(`(object: Record<PropertyKey, any>) => boolean`): 与えられたオブジェクトがすべての条件を満たすかどうかを確認する関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/conformsTo.md",
    "content": "# conformsTo (Lodash互換性)\n\nオブジェクトが指定された条件関数をすべて満たすかどうかを確認します。\n\n```typescript\nconst result = conformsTo(target, source);\n```\n\n## 使用法\n\n### `conformsTo(target, source)`\n\nオブジェクトのプロパティが指定された条件をすべて満たすかどうかを確認したい場合は`conformsTo`を使用してください。各プロパティに対して該当する条件関数を適用して結果を確認します。\n\n```typescript\nimport { conformsTo } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst object = { a: 1, b: 2 };\nconst conditions = {\n  a: n => n > 0,\n  b: n => n > 1,\n};\n\nconformsTo(object, conditions); // true (すべての条件を満たす)\n\n// 様々な条件\nconst user = { name: 'Alice', age: 25, active: true };\nconst userValidation = {\n  name: s => typeof s === 'string' && s.length > 0,\n  age: n => typeof n === 'number' && n >= 18,\n  active: b => typeof b === 'boolean',\n};\n\nconformsTo(user, userValidation); // true\n\n// 条件を満たさない場合\nconst invalidUser = { name: '', age: 15, active: 'yes' };\nconformsTo(invalidUser, userValidation); // false\n\n// 部分的な条件確認\nconst partialConditions = {\n  age: n => n >= 21,\n};\nconformsTo(user, partialConditions); // true (ageのみ確認)\n\n// プロパティが存在しない場合\nconst incompleteObject = { a: 1 }; // bプロパティなし\nconst strictConditions = {\n  a: n => n > 0,\n  b: n => n > 0,\n};\nconformsTo(incompleteObject, strictConditions); // false (bプロパティが存在しない)\n```\n\n#### パラメータ\n\n- `target` (`Record<PropertyKey, any>`): 検査するオブジェクトです。\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): プロパティ別の条件関数を持つオブジェクトです。\n\n#### 戻り値\n\n(`boolean`): オブジェクトがすべての条件を満たす場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isArguments.md",
    "content": "# isArguments (Lodash互換性)\n\n値がargumentsオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isArguments(value);\n```\n\n## 使用法\n\n### `isArguments(value)`\n\n指定された値が関数のargumentsオブジェクトかどうかを確認したい場合は`isArguments`を使用してください。この関数はTypeScriptでタイプガードとしても動作し、値の型を`IArguments`に絞り込みます。\n\n```typescript\nimport { isArguments } from 'es-toolkit/compat';\n\n// 通常の関数で\nfunction normalFunction() {\n  return isArguments(arguments); // true\n}\n\n// 厳密モードで\nfunction strictFunction() {\n  'use strict';\n  return isArguments(arguments); // true\n}\n\n// argumentsではない値\nisArguments([1, 2, 3]); // false\nisArguments({ 0: 'a', 1: 'b', length: 2 }); // false\nisArguments(null); // false\nisArguments(undefined); // false\n\n// 実際の使用例\nfunction example() {\n  if (isArguments(arguments)) {\n    console.log('This is an arguments object');\n    console.log('Length:', arguments.length);\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がargumentsオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isArray.md",
    "content": "# isArray (Lodash互換性)\n\n::: warning `Array.isArray`を使用してください\n\nこの`isArray`関数は追加の関数呼び出しにより動作が遅くなります。\n\n代わりに、より速く現代的な`Array.isArray`を使用してください。\n\n:::\n\n値が配列かどうかを確認します。\n\n```typescript\nconst result = isArray(value);\n```\n\n## 使用法\n\n### `isArray(value)`\n\n値が配列かどうかを確認したい場合は`isArray`を使用してください。この関数はTypeScriptでタイプガードとしても使用できます。\n\n```typescript\nimport { isArray } from 'es-toolkit/compat';\n\n// 配列の確認\nisArray([1, 2, 3]);\n// Returns: true\n\nisArray('abc');\n// Returns: false\n\nisArray(() => {});\n// Returns: false\n\n// オブジェクトとの区別\nisArray({ 0: 'a', 1: 'b', length: 2 });\n// Returns: false\n\nisArray(null);\n// Returns: false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 配列かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is any[]`): 値が配列の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer (Lodash互換性)\n\n::: warning es-toolkitの[isArrayBuffer](../../predicate/isArrayBuffer.md)を使用してください\nこの`isArrayBuffer`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isArrayBuffer](../../predicate/isArrayBuffer.md)を使用してください。\n:::\n\n値がArrayBufferかどうかを確認します。\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 使用法\n\n### `isArrayBuffer(value)`\n\n値がArrayBufferかどうかを型安全に確認したい場合は`isArrayBuffer`を使用してください。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/compat';\n\n// ArrayBufferの確認\nconst buffer = new ArrayBuffer(16);\nisArrayBuffer(buffer); // true\n\n// 他の型はfalse\nisArrayBuffer(new Array()); // false\nisArrayBuffer(new Map()); // false\nisArrayBuffer({}); // false\nisArrayBuffer('hello'); // false\nisArrayBuffer(123); // false\nisArrayBuffer(null); // false\nisArrayBuffer(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): ArrayBufferかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is ArrayBuffer`): 値がArrayBufferの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isArrayLike.md",
    "content": "# isArrayLike (Lodash互換性)\n\n値が配列のようなオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isArrayLike(value);\n```\n\n## 使用法\n\n### `isArrayLike(value)`\n\n指定された値が配列のようなオブジェクトかどうかを確認したい場合は`isArrayLike`を使用してください。配列、文字列、argumentsオブジェクト、NodeListなどが配列のようなオブジェクトに該当します。\n\n```typescript\nimport { isArrayLike } from 'es-toolkit/compat';\n\n// 配列と文字列\nisArrayLike([1, 2, 3]); // true\nisArrayLike('abc'); // true\nisArrayLike(''); // true\n\n// 配列のようなオブジェクト\nisArrayLike({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLike({ length: 0 }); // true\n\n// argumentsオブジェクト\nfunction example() {\n  return isArrayLike(arguments); // true\n}\n\n// 配列ではないもの\nisArrayLike({}); // false\nisArrayLike({ length: 'invalid' }); // false\nisArrayLike(null); // false\nisArrayLike(undefined); // false\nisArrayLike(() => {}); // false\nisArrayLike(123); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が配列のようなオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isArrayLikeObject.md",
    "content": "# isArrayLikeObject (Lodash互換性)\n\n値がプリミティブではない配列のようなオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isArrayLikeObject(value);\n```\n\n## 使用法\n\n### `isArrayLikeObject(value)`\n\n指定された値がプリミティブではない配列のようなオブジェクトかどうかを確認したい場合は`isArrayLikeObject`を使用してください。配列、argumentsオブジェクト、NodeListなどが該当しますが、文字列はプリミティブ値なので除外されます。\n\n```typescript\nimport { isArrayLikeObject } from 'es-toolkit/compat';\n\n// 配列のようなオブジェクト（プリミティブではない）\nisArrayLikeObject([1, 2, 3]); // true\nisArrayLikeObject({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLikeObject({ length: 0 }); // true\n\n// argumentsオブジェクト\nfunction example() {\n  return isArrayLikeObject(arguments); // true\n}\n\n// NodeListやHTMLCollection（ブラウザで）\nisArrayLikeObject(document.querySelectorAll('div')); // true\n\n// プリミティブ値はfalse（文字列を含む）\nisArrayLikeObject('abc'); // false\nisArrayLikeObject(''); // false\nisArrayLikeObject(123); // false\nisArrayLikeObject(true); // false\n\n// その他のオブジェクト\nisArrayLikeObject({}); // false\nisArrayLikeObject(null); // false\nisArrayLikeObject(undefined); // false\nisArrayLikeObject(() => {}); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がプリミティブではない配列のようなオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isBoolean.md",
    "content": "# isBoolean (Lodash互換性)\n\n::: warning `typeof`演算子を使用してください\nこの`isBoolean`関数はBooleanオブジェクトラッパーの処理により複雑になります。\n\n代わりに、よりシンプルで現代的な`typeof value === 'boolean'`を使用してください。\n:::\n\n値がboolean型かどうかを確認します。\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 使用法\n\n### `isBoolean(value)`\n\n値がboolean型かどうかを型安全に確認したい場合は`isBoolean`を使用してください。プリミティブのboolean値とBooleanオブジェクトラッパーの両方を確認します。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/compat';\n\n// プリミティブboolean値\nisBoolean(true); // true\nisBoolean(false); // true\n\n// Booleanオブジェクトラッパー\nisBoolean(new Boolean(true)); // true\nisBoolean(new Boolean(false)); // true\n\n// 他の型はfalse\nisBoolean(0); // false\nisBoolean(1); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\nisBoolean(null); // false\nisBoolean(undefined); // false\nisBoolean({}); // false\nisBoolean([]); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): boolean型かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is boolean`): 値がboolean型の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isBuffer.md",
    "content": "# isBuffer (Lodash互換性)\n\n::: warning es-toolkitの[isBuffer](../../predicate/isBuffer.md)を使用してください\nこの`isBuffer`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isBuffer](../../predicate/isBuffer.md)を使用してください。\n:::\n\n値がBufferインスタンスかどうかを確認します。\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 使用法\n\n### `isBuffer(value)`\n\n値がBufferインスタンスかどうかを型安全に確認したい場合は`isBuffer`を使用してください。Node.js環境でBufferオブジェクトを扱う際に便利です。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/compat';\n\n// Bufferインスタンスの確認\nconst buffer = Buffer.from('hello');\nisBuffer(buffer); // true\n\n// 他の型はfalse\nisBuffer('hello'); // false\nisBuffer([1, 2, 3]); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer({}); // false\nisBuffer(null); // false\nisBuffer(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Bufferインスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がBufferインスタンスの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isDate.md",
    "content": "# isDate (Lodash互換性)\n\n::: warning es-toolkitの[isDate](../../predicate/isDate.md)を使用してください\nこの`isDate`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isDate](../../predicate/isDate.md)を使用してください。\n:::\n\n値がDateオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isDate(value);\n```\n\n## 使用法\n\n### `isDate(value)`\n\n値がDateオブジェクトかどうかを型安全に確認したい場合は`isDate`を使用してください。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isDate } from 'es-toolkit/compat';\n\n// Dateオブジェクトの確認\nconst date = new Date();\nisDate(date); // true\n\n// 無効なDateもDateオブジェクトとして認識します\nconst invalidDate = new Date('invalid');\nisDate(invalidDate); // true\n\n// 他の型はfalse\nisDate('2024-01-01'); // false\nisDate(1640995200000); // false\nisDate({}); // false\nisDate(null); // false\nisDate(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Dateオブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Date`): 値がDateオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isElement.md",
    "content": "# isElement (Lodash互換性)\n\n::: warning `instanceof HTMLElement`を使用してください\n\nこの`isElement`関数は構造的検査により正確性が低下し、動作が遅くなります。\n\n代わりに、より正確で現代的な`instanceof HTMLElement`または`element.nodeType === 1`検査を使用してください。\n\n:::\n\n値がDOM要素かどうかを確認します。\n\n```typescript\nconst result = isElement(value);\n```\n\n## 使用法\n\n### `isElement(value)`\n\n指定された値がDOM要素かどうかを確認したい場合は`isElement`を使用してください。この関数は構造的に確認するため、結果が完全に正確でない場合があります。\n\n```typescript\nimport { isElement } from 'es-toolkit/compat';\n\n// DOM要素\nисElement(document.body); // true\nisElement(document.createElement('div')); // true\nisElement(document.querySelector('p')); // true (要素が存在する場合)\n\n// DOM要素でない値\nisElement('<body>'); // false\nisElement({}); // false\nisElement(null); // false\nisElement(undefined); // false\n\n// テキストノードや他のノードタイプ\nisElement(document.createTextNode('text')); // false\nisElement(document.createComment('comment')); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がDOM要素として認識される場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isEmpty.md",
    "content": "# isEmpty (Lodash互換性)\n\n指定された値が空かどうかを確認します。\n\n```typescript\nconst result = isEmpty(value);\n```\n\n## 使用法\n\n### `isEmpty(value)`\n\n様々な型の値が空かどうかを確認したい場合は`isEmpty`を使用してください。文字列、配列、オブジェクト、Map、Setなどをすべて処理できます。\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\n// 文字列の確認\nisEmpty(''); // true\nisEmpty('hello'); // false\n\n// 配列の確認\nisEmpty([]); // true\nisEmpty([1, 2, 3]); // false\n\n// オブジェクトの確認\nisEmpty({}); // true\nisEmpty({ a: 1 }); // false\n\n// MapとSetの確認\nisEmpty(new Map()); // true\nisEmpty(new Set()); // true\nisEmpty(new Map([['key', 'value']])); // false\nisEmpty(new Set([1, 2, 3])); // false\n\n// nullとundefined\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(); // true\n\n// 配列のようなオブジェクト\nisEmpty({ 0: 'a', length: 1 }); // false\nisEmpty({ length: 0 }); // false\n```\n\nプリミティブ値はすべて空の値として処理されます:\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\nisEmpty(0); // true\nisEmpty(false); // true\nisEmpty(123); // true\nisEmpty('text'); // false (文字列は長さで判定)\n```\n\n#### パラメータ\n\n- `value` (`unknown`, 任意): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が空の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isEqual.md",
    "content": "# isEqual (Lodash互換性)\n\n::: warning `es-toolkit`の[isEqual](../../predicate/isEqual.md)を使用してください\nこの`isEqual`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isEqual](../../predicate/isEqual.md)を使用してください。\n:::\n\n二つの値が同じかどうかを深く比較して確認します。\n\n```typescript\nconst result = isEqual(value1, value2);\n```\n\n## 使用法\n\n### `isEqual(a, b)`\n\n二つの値が同じかどうかを深く比較して確認したい場合は`isEqual`を使用してください。Date、RegExp、オブジェクト、配列などの複雑な型も内容まで比較します。\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\n// 基本型の比較\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// オブジェクトの深い比較\nisEqual({ a: 1, b: 2 }, { a: 1, b: 2 }); // true\nisEqual({ a: 1, b: 2 }, { b: 2, a: 1 }); // true\nisEqual({ a: 1 }, { a: 1, b: undefined }); // false\n\n// 配列の深い比較\nisEqual([1, 2, 3], [1, 2, 3]); // true\nisEqual([1, [2, 3]], [1, [2, 3]]); // true\n\n// Dateオブジェクトの比較\nisEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\nisEqual(new Date('2020-01-01'), new Date('2020-01-02')); // false\n\n// RegExpオブジェクトの比較\nisEqual(/abc/g, /abc/g); // true\nisEqual(/abc/g, /abc/i); // false\n```\n\nネストされたオブジェクトや配列も再帰的に比較します。\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\nconst obj1 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nconst obj2 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nisEqual(obj1, obj2); // true\n```\n\n#### パラメータ\n\n- `a` (`unknown`): 比較する最初の値です。\n- `b` (`unknown`): 比較する2番目の値です。\n\n#### 戻り値\n\n(`boolean`): 二つの値が同じ場合は`true`、異なる場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isEqualWith.md",
    "content": "# isEqualWith (Lodash互換性)\n\n::: warning es-toolkitの[isEqualWith](../../predicate/isEqualWith.md)を使用してください\nこの`isEqualWith`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isEqualWith](../../predicate/isEqualWith.md)を使用してください。\n:::\n\nカスタム比較関数を使用して二つの値が同じかどうかを確認します。\n\n```typescript\nconst result = isEqualWith(a, b, customizer);\n```\n\n## 使用法\n\n### `isEqualWith(a, b, areValuesEqual?)`\n\nカスタム比較関数を使用して二つの値を深く比較します。カスタム関数がboolean値を返す場合はその結果を使用し、`undefined`を返す場合はデフォルトの等価性比較を使用します。\n\nカスタム比較関数はオブジェクト、配列、Map、Setなどの複雑な構造の内部の値を比較する際にも使用され、深い比較を保証します。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\n// 大文字小文字を無視した文字列比較\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', customizer); // true\nisEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n\n// 数値の絶対値で比較\nconst absCustomizer = (a: any, b: any) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a) === Math.abs(b);\n  }\n};\n\nisEqualWith([-1, 2], [1, -2], absCustomizer); // true\n\n// 複雑なオブジェクトの比較\nconst obj1 = {\n  name: 'JOHN',\n  details: { age: 30, city: 'NYC' },\n};\nconst obj2 = {\n  name: 'john',\n  details: { age: 30, city: 'nyc' },\n};\n\nisEqualWith(obj1, obj2, customizer); // true\n```\n\nMapとSetに対しては特別な処理を行います。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nconst map1 = new Map([['KEY', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqualWith(map1, map2, customizer); // true\n\nconst set1 = new Set(['HELLO']);\nconst set2 = new Set(['hello']);\nisEqualWith(set1, set2, customizer); // true\n```\n\n#### パラメータ\n\n- `a` (`any`): 比較する最初の値です。\n- `b` (`any`): 比較する2番目の値です。\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): カスタム比較関数です。\n  - `x`: 最初のオブジェクト`a`からの値\n  - `y`: 2番目のオブジェクト`b`からの値\n  - `property`: `x`と`y`を取得する際に使用したプロパティキー\n  - `xParent`: 最初の値`x`の親オブジェクト\n  - `yParent`: 2番目の値`y`の親オブジェクト\n  - `stack`: 循環参照を処理する内部スタック (Map)\n\n#### 戻り値\n\n(`boolean`): カスタム関数によって二つの値が同じ場合は`true`、異なる場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isError.md",
    "content": "# isError (Lodash互換性)\n\n::: warning es-toolkitの[isError](../../predicate/isError.md)を使用してください\nこの`isError`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isError](../../predicate/isError.md)を使用してください。\n:::\n\n値がErrorオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isError(value);\n```\n\n## 使用法\n\n### `isError(value)`\n\n値がErrorオブジェクトかどうかを型安全に確認したい場合は`isError`を使用してください。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isError } from 'es-toolkit/compat';\n\n// Errorオブジェクトの確認\nisError(new Error()); // true\nisError(new TypeError('Type error')); // true\nisError(new ReferenceError('Reference error')); // true\n\n// Errorを継承したカスタムエラー\nclass CustomError extends Error {}\nisError(new CustomError()); // true\n\n// 他の型はfalse\nisError('Error'); // false\nisError({ name: 'Error', message: 'Something went wrong' }); // false\nisError({}); // false\nisError(null); // false\nisError(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Errorオブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Error`): 値がErrorオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isFinite.md",
    "content": "# isFinite (Lodash互換性)\n\n::: warning `Number.isFinite`を使用してください\n\nこの`isFinite`関数は追加の型チェックオーバーヘッドにより動作が遅くなります。\n\n代わりに、より速く現代的な`Number.isFinite`を使用してください。\n\n:::\n\n値が有限な数値かどうかを確認します。\n\n```typescript\nconst result = isFinite(value);\n```\n\n## 使用法\n\n### `isFinite(value)`\n\n指定された値が有限な数値かどうかを確認したい場合は`isFinite`を使用してください。この関数はTypeScriptでタイプガードとしても動作し、値の型を`number`に絞り込みます。\n\n```typescript\nimport { isFinite } from 'es-toolkit/compat';\n\n// 有限な数値\nisFinite(100); // true\nisFinite(-50); // true\nisFinite(3.14); // true\nisFinite(0); // true\n\n// 無限大はfalse\nisFinite(Infinity); // false\nisFinite(-Infinity); // false\n\n// NaNもfalse\nisFinite(NaN); // false\n\n// 他の型もfalse\nisFinite('100'); // false\nisFinite([]); // false\nisFinite({}); // false\nisFinite(null); // false\nisFinite(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`value is number`): 値が有限な数値の場合は`true`、そうでない場合は`false`を返します。  \n`true`を返す場合、TypeScriptは`value`の型を`number`に絞り込みます。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isFunction.md",
    "content": "# isFunction (Lodash互換性)\n\n::: warning es-toolkitの[isFunction](../../predicate/isFunction.md)を使用してください\nこの`isFunction`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isFunction](../../predicate/isFunction.md)を使用してください。\n:::\n\n値が関数かどうかを確認します。\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 使用法\n\n### `isFunction(value)`\n\n値が関数かどうかを型安全に確認したい場合は`isFunction`を使用してください。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isFunction } from 'es-toolkit/compat';\n\n// 通常の関数\nisFunction(function () {}); // true\nisFunction(() => {}); // true\n\n// 内蔵関数とコンストラクタ\nisFunction(Array.prototype.slice); // true\nisFunction(Proxy); // true\nisFunction(Int8Array); // true\n\n// 非同期関数とジェネレータ関数\nisFunction(async function () {}); // true\nisFunction(function* () {}); // true\n\n// 他の型はfalse\nisFunction('function'); // false\nisFunction({}); // false\nisFunction([]); // false\nisFunction(null); // false\nisFunction(undefined); // false\nisFunction(123); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 関数かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is (...args: any[]) => any`): 値が関数の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isInteger.md",
    "content": "# isInteger (Lodash互換性)\n\n::: warning `Number.isInteger`を使用してください\n\nこの`isInteger`関数は追加の型チェックオーバーヘッドにより動作が遅くなります。\n\n代わりに、より速く現代的な`Number.isInteger`を使用してください。\n\n:::\n\n値が整数かどうかを確認します。\n\n```typescript\nconst result = isInteger(value);\n```\n\n## 使用法\n\n### `isInteger(value)`\n\n指定された値が整数かどうかを確認したい場合は`isInteger`を使用してください。この関数はTypeScriptでタイプガードとしても動作し、値の型を`number`に絞り込みます。\n\n```typescript\nimport { isInteger } from 'es-toolkit/compat';\n\n// 整数値の確認\nisInteger(3); // true\nisInteger(-5); // true\nisInteger(0); // true\n\n// 小数値はfalse\nisInteger(3.14); // false\nisInteger(-2.5); // false\n\n// 無限大はfalse\nisInteger(Infinity); // false\nisInteger(-Infinity); // false\n\n// 他の型もfalse\nisInteger('3'); // false\nisInteger([]); // false\nisInteger({}); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が整数の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isLength.md",
    "content": "# isLength (Lodash互換性)\n\n::: warning es-toolkitの[isLength](../../predicate/isLength.md)を使用してください\nこの`isLength`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isLength](../../predicate/isLength.md)を使用してください。\n:::\n\n値が有効な長さかどうかを確認します。\n\n```typescript\nconst result = isLength(value);\n```\n\n## 使用法\n\n### `isLength(value)`\n\n値が有効な長さかどうかを確認したい場合は`isLength`を使用してください。有効な長さは数値型で、非負の整数であり、JavaScriptの最大安全整数(`Number.MAX_SAFE_INTEGER`)以下である必要があります。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\n// 有効な長さ\nisLength(0); // true\nisLength(42); // true\nisLength(100); // true\nisLength(Number.MAX_SAFE_INTEGER); // true\n\n// 無効な長さ\nisLength(-1); // false (負数)\nisLength(1.5); // false (整数ではない)\nisLength(Number.MAX_SAFE_INTEGER + 1); // false (安全範囲超過)\nisLength('3'); // false (文字列)\nisLength(null); // false\nisLength(undefined); // false\nisLength({}); // false\nisLength([]); // false\n```\n\n配列や文字列のlengthプロパティが有効かどうかを確認する際に便利です。\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\nfunction validateArrayLength(arr: any[]) {\n  if (isLength(arr.length)) {\n    console.log(`配列の長さ${arr.length}は有効です`);\n    return true;\n  }\n  return false;\n}\n\nvalidateArrayLength([1, 2, 3]); // \"配列の長さ3は有効です\"\n```\n\n#### パラメータ\n\n- `value` (`any`): 有効な長さかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が有効な長さの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isMap.md",
    "content": "# isMap (Lodash互換性)\n\n::: warning es-toolkitの[isMap](../../predicate/isMap.md)を使用してください\n\nこの`isMap`関数はLodash互換性のための複雑な処理により動作が遅くなります。\n\n代わりに、より速く現代的な`es-toolkit`の[isMap](../../predicate/isMap.md)を使用してください。\n\n:::\n\n値がMapかどうかを確認します。\n\n```typescript\nconst result = isMap(value);\n```\n\n## 使用法\n\n### `isMap(value)`\n\n値がMapかどうかを型安全に確認したい場合は`isMap`を使用してください。TypeScriptでタイプガードとしても動作します。\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Mapの確認\nconst map = new Map();\nisMap(map); // true\n\n// 他の型はfalse\nisMap(new Set()); // false\nisMap(new WeakMap()); // false\nisMap({}); // false\nisMap([]); // false\nisMap('map'); // false\nisMap(123); // false\nisMap(null); // false\nisMap(undefined); // false\n```\n\nMapと似た他のコレクションとも区別します。\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map vs Set vs WeakMap\nisMap(new Map([['key', 'value']])); // true\nisMap(new Set(['value'])); // false\nisMap(new WeakMap()); // false\n\n// Map vs 通常のオブジェクト\nisMap({}); // false\nisMap({ key: 'value' }); // false\nisMap(Object.create(null)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Mapかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Map<any, any>`): 値がMapの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isMatch.md",
    "content": "# isMatch (Lodash 互換性)\n\nオブジェクトが他のオブジェクトの形状と値に部分的に一致するかどうかを確認します。\n\n```typescript\nconst result = isMatch(target, source);\n```\n\n## 使用法\n\n### `isMatch(target, source)`\n\nオブジェクトや配列が他のオブジェクトの構造と値に部分的に一致するかどうかを確認する際に `isMatch` を使用してください。全体が同一である必要はなく、sourceのすべてのプロパティがtargetに存在し、同じ値を持っていれば十分です。\n\n```typescript\nimport { isMatch } from 'es-toolkit/compat';\n\n// オブジェクトの部分一致\nisMatch({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }); // true (a, bが一致)\nisMatch({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 }); // false (cがtargetにない)\n\n// ネストしたオブジェクト\nisMatch({ user: { name: 'Alice', age: 25, city: 'Seoul' } }, { user: { name: 'Alice', age: 25 } }); // true\n\n// 配列の部分一致（順序無関）\nisMatch([1, 2, 3, 4], [2, 4]); // true (2と4が配列にある)\nisMatch([1, 2, 3], [1, 2, 3]); // true (完全一致)\nisMatch([1, 2], [1, 2, 3]); // false (3がtargetにない)\n\n// Mapの部分一致\nconst targetMap = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\nconst sourceMap = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nisMatch(targetMap, sourceMap); // true\n\n// Setの部分一致\nconst targetSet = new Set([1, 2, 3, 4]);\nconst sourceSet = new Set([2, 4]);\nisMatch(targetSet, sourceSet); // true\n\n// 空のsourceは常にtrue\nisMatch({ a: 1 }, {}); // true\nisMatch([1, 2, 3], []); // true\n```\n\nより直接的で高速な方法：\n\n```typescript\n// 完全等価性の確認（より高速）\nimport { isEqual } from 'es-toolkit';\n\nisEqual(obj1, obj2);\n\n// 特定のプロパティの確認（より明確）\ntarget.a === source.a && target.b === source.b;\n\n// オブジェクト構造の確認\nObject.keys(source).every(key => target[key] === source[key]);\n```\n\n#### パラメータ\n\n- `target` (`unknown`): 一致するかどうかを確認するオブジェクトです。\n- `source` (`unknown`): 一致パターンとなるオブジェクトです。\n\n#### 戻り値\n\n(`boolean`): targetがsourceの形状と値に部分的に一致する場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isMatchWith.md",
    "content": "# isMatchWith (Lodash 互換性)\n\nカスタム比較関数を使用してオブジェクトが部分的に一致するかどうかを確認します。\n\n```typescript\nconst result = isMatchWith(target, source, customizer);\n```\n\n## 使用法\n\n### `isMatchWith(target, source, customizer)`\n\nカスタム比較ロジックが必要な場合に `isMatchWith` を使用してください。各プロパティの比較について直接制御することができます。\n\n```typescript\nimport { isMatchWith } from 'es-toolkit/compat';\n\n// 大文字小文字を区別しない文字列比較\nconst caseInsensitiveCompare = (objVal, srcVal) => {\n  if (typeof objVal === 'string' && typeof srcVal === 'string') {\n    return objVal.toLowerCase() === srcVal.toLowerCase();\n  }\n  return undefined; // デフォルト動作を使用\n};\n\nisMatchWith({ name: 'ALICE', age: 25 }, { name: 'alice' }, caseInsensitiveCompare); // true\n\n// 数値範囲比較\nconst rangeCompare = (objVal, srcVal, key) => {\n  if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n    return objVal >= srcVal.min && objVal <= srcVal.max;\n  }\n  return undefined;\n};\n\nisMatchWith({ name: 'John', age: 25 }, { age: { min: 18, max: 30 } }, rangeCompare); // true\n\n// 配列長比較\nconst lengthCompare = (objVal, srcVal, key) => {\n  if (key === 'items' && Array.isArray(objVal) && typeof srcVal === 'number') {\n    return objVal.length === srcVal;\n  }\n  return undefined;\n};\n\nisMatchWith({ items: ['a', 'b', 'c'], count: 3 }, { items: 3 }, lengthCompare); // true\n\n// 複雑な条件付き比較\nconst conditionalCompare = (objVal, srcVal, key, object, source) => {\n  // 特定のキーでのみ特別なロジックを適用\n  if (key === 'status') {\n    return srcVal === 'active' || objVal === 'any';\n  }\n\n  // ネストしたオブジェクトでの特別な処理\n  if (typeof srcVal === 'object' && srcVal !== null && objVal?.special) {\n    return srcVal.id === objVal.special;\n  }\n\n  return undefined; // デフォルト動作\n};\n\nisMatchWith({ user: { special: 123 }, status: 'any' }, { user: { id: 123, status: 'active' } }, conditionalCompare); // true\n```\n\n#### パラメータ\n\n- `target` (`unknown`): 一致するかどうかを確認するオブジェクトです。\n- `source` (`unknown`): 一致パターンとなるオブジェクトです。\n- `customizer` (`function`, オプション): 比較ロジックをカスタマイズする関数です。`true`、`false`、または `undefined` を返す必要があります。\n\n#### 戻り値\n\n(`boolean`): targetがsourceにカスタムロジックで部分的に一致する場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isNaN.md",
    "content": "# isNaN (Lodash 互換性)\n\n::: warning `Number.isNaN`を使用してください\n\nこの `isNaN` 関数は追加の関数呼び出しにより遅く動作します。\n\n代わりにより高速で現代的な `Number.isNaN` を使用してください。\n\n:::\n\n値が `NaN` かどうかを確認します。\n\n```typescript\nconst result = isNaN(value);\n```\n\n## 使用法\n\n### `isNaN(value)`\n\n値が `NaN` かどうかを確認したい場合に `isNaN` を使用してください。\n\n```typescript\nimport { isNaN } from 'es-toolkit/compat';\n\n// NaN確認\nisNaN(NaN);\n// Returns: true\n\nisNaN(Number.NaN);\n// Returns: true\n\n// その他の値\nisNaN(undefined);\n// Returns: false\n\nisNaN(null);\n// Returns: false\n\nisNaN(0);\n// Returns: false\n\nisNaN('NaN');\n// Returns: false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): NaNかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がNaNの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isNative.md",
    "content": "# isNative (Lodash 互換性)\n\n値がJavaScript エンジンのネイティブ関数かどうかを確認します。\n\n```typescript\nconst result = isNative(value);\n```\n\n## 使用法\n\n### `isNative(value)`\n\n与えられた値がJavaScript エンジンで実装されたネイティブ関数かどうかを確認する際に `isNative` を使用してください。ブラウザやNode.jsで提供される内蔵関数を区別することができます。\n\n```typescript\nimport { isNative } from 'es-toolkit/compat';\n\n// ネイティブ関数\nisNative(Array.prototype.push); // true\nisNative(Object.keys); // true\nisNative(Math.max); // true\nisNative(JSON.parse); // true\nisNative(console.log); // true（ブラウザ/Node.js環境で）\n\n// ユーザー定義関数\nisNative(function () {}); // false\nisNative(() => {}); // false\nisNative(function customFunction() {}); // false\n\n// ライブラリ関数\nisNative(require('lodash').map); // false\nisNative(require('es-toolkit').chunk); // false\n\n// 関数でない値\nisNative({}); // false\nisNative([]); // false\nisNative('function'); // false\nisNative(123); // false\nisNative(null); // false\n\n// バインドされた関数\nconst boundFunction = Array.prototype.push.bind([]);\nisNative(boundFunction); // true（バインドされた関数はネイティブです）\n\n// メソッド\nconst obj = { method: Array.prototype.push };\nisNative(obj.method); // true（依然としてネイティブ関数）\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がネイティブ関数と見える場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isNil.md",
    "content": "# isNil (Lodash 互換性)\n\n::: warning es-toolkitの [isNil](../../predicate/isNil.md)を使用してください\n\nこの `isNil` 関数はLodash互換性のための複雑な処理により遅く動作します。\n\n代わりにより高速で現代的な `es-toolkit` の [isNil](../../predicate/isNil.md) を使用してください。\n\n:::\n\n値が `null` または `undefined` かどうかを確認します。\n\n```typescript\nconst result = isNil(value);\n```\n\n## 使用法\n\n### `isNil(x)`\n\n値が `null` または `undefined` かどうかを型安全に確認したい場合に `isNil` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// nullとundefinedはtrue\nisNil(null); // true\nisNil(undefined); // true\n\n// その他すべての値はfalse\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil([]); // false\nisNil({}); // false\nisNil('hello'); // false\nisNil(42); // false\n```\n\nfalsy として評価されるが `null` や `undefined` でない値と区別します。\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// falsyとして評価されるがnull/undefinedでない値\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil(NaN); // false\n\n// nullとundefinedのみtrue\nisNil(null); // true\nisNil(undefined); // true\n```\n\n#### パラメータ\n\n- `x` (`any`): `null` または `undefined` かどうかを確認する値です。\n\n#### 戻り値\n\n(`x is null | undefined`): 値が `null` または `undefined` の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isNull.md",
    "content": "# isNull (Lodash 互換性)\n\n::: warning es-toolkitの [isNull](../../predicate/isNull.md)を使用してください\n\nこの `isNull` 関数はLodash互換性のための関数ですが、メインライブラリと同じ実装です。\n\n代わりにより高速で現代的な `es-toolkit` の [isNull](../../predicate/isNull.md) を使用してください。\n\n:::\n\n値が `null` かどうかを確認します。\n\n```typescript\nconst result = isNull(value);\n```\n\n## 使用法\n\n### `isNull(value)`\n\n値が正確に `null` かどうかを型安全に確認したい場合に `isNull` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\n// nullのみtrue\nisNull(null); // true\n\n// undefinedもfalse\nisNull(undefined); // false\n\n// その他すべての値もfalse\nisNull(0); // false\nisNull(''); // false\nisNull(false); // false\nisNull([]); // false\nisNull({}); // false\nisNull('null'); // false\nisNull(NaN); // false\n```\n\n`null` と `undefined` を区別して確認することができます。\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    console.log('値が明示的にnullです');\n  } else if (value === undefined) {\n    console.log('値がundefinedです');\n  } else {\n    console.log(`値があります: ${value}`);\n  }\n}\n\nhandleValue(null); // \"値が明示的にnullです\"\nhandleValue(undefined); // \"値がundefinedです\"\nhandleValue('hello'); // \"値があります: hello\"\n```\n\n#### パラメータ\n\n- `value` (`any`): `null` かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is null`): 値が `null` の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isNumber.md",
    "content": "# isNumber (Lodash 互換性)\n\n::: warning `typeof` 演算子を使用してください\n\nこの `isNumber` 関数はNumber オブジェクトラッパーの処理により複雑です。\n\n代わりにより簡単で現代的な `typeof value === 'number'` を使用してください。\n\n:::\n\n値が数値かどうかを確認します。\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 使用法\n\n### `isNumber(value)`\n\n値が数値かどうかを確認したい場合に `isNumber` を使用してください。この関数はプリミティブ数値とNumberオブジェクトの両方を数値として認識します。\n\n```typescript\nimport { isNumber } from 'es-toolkit/compat';\n\n// プリミティブ数値\nisNumber(123);\n// Returns: true\n\nisNumber(3.14);\n// Returns: true\n\nisNumber(NaN);\n// Returns: true\n\n// Number オブジェクト\nisNumber(new Number(42));\n// Returns: true\n\n// その他の型\nisNumber('123');\n// Returns: false\n\nisNumber(true);\n// Returns: false\n\nisNumber(null);\n// Returns: false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 数値かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is number`): 値が数値の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isObject.md",
    "content": "# isObject (Lodash 互換性)\n\n値がオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isObject(value);\n```\n\n## 使用法\n\n### `isObject(value)`\n\n値がオブジェクトかどうかを確認したい場合に `isObject` を使用してください。JavaScript では配列、関数、オブジェクト、正規表現、Date などがすべてオブジェクトとして扱われます。\n\n```typescript\nimport { isObject } from 'es-toolkit/compat';\n\n// 一般オブジェクト\nisObject({});\n// Returns: true\n\n// 配列もオブジェクト\nisObject([1, 2, 3]);\n// Returns: true\n\n// 関数もオブジェクト\nisObject(() => {});\n// Returns: true\n\n// Dateもオブジェクト\nisObject(new Date());\n// Returns: true\n\n// nullはオブジェクトでない\nisObject(null);\n// Returns: false\n\n// プリミティブ型はオブジェクトでない\nisObject('string');\n// Returns: false\n\nisObject(123);\n// Returns: false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): オブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is object`): 値がオブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isObjectLike.md",
    "content": "# isObjectLike (Lodash 互換性)\n\n値がオブジェクトライクかどうかを確認します。\n\n```typescript\nconst result = isObjectLike(value);\n```\n\n## 使用法\n\n### `isObjectLike(value)`\n\n与えられた値がオブジェクトライクな値かどうかを確認する際に `isObjectLike` を使用してください。オブジェクトライクな値は `typeof` 演算の結果が `'object'` で、`null` でない値です。\n\n```typescript\nimport { isObjectLike } from 'es-toolkit/compat';\n\n// オブジェクトライクな値\nisObjectLike({ a: 1 }); // true\nisObjectLike([1, 2, 3]); // true\nisObjectLike(new Date()); // true\nisObjectLike(/regex/); // true\nisObjectLike(new Map()); // true\nisObjectLike(new Set()); // true\n\n// オブジェクトライクでない値\nisObjectLike('abc'); // false\nisObjectLike(123); // false\nisObjectLike(true); // false\nisObjectLike(() => {}); // false\nisObjectLike(Symbol('sym')); // false\n\n// 特別なケース\nisObjectLike(null); // false (nullはtypeofが'object'だがオブジェクトライクでない)\nisObjectLike(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がオブジェクトライクの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isPlainObject.md",
    "content": "# isPlainObject (Lodash 互換性)\n\n::: warning es-toolkitの [isPlainObject](../../predicate/isPlainObject.md)を使用してください\n\nこの `isPlainObject` 関数はLodash互換性のための複雑な処理により遅く動作します。\n\n代わりにより高速で現代的な `es-toolkit` の [isPlainObject](../../predicate/isPlainObject.md) を使用してください。\n\n:::\n\n値がプレーンオブジェクトかどうかを確認します。\n\n```typescript\nconst result = isPlainObject(object);\n```\n\n## 使用法\n\n### `isPlainObject(object)`\n\n値がプレーンオブジェクトかどうかを確認したい場合に `isPlainObject` を使用してください。プレーンオブジェクトは `{}` リテラル、`new Object()`、または `Object.create(null)` で生成されたオブジェクトです。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// プレーンオブジェクト\nisPlainObject({}); // true\nisPlainObject(new Object()); // true\nisPlainObject(Object.create(null)); // true\nisPlainObject({ name: 'John', age: 30 }); // true\n\n// プレーンオブジェクトでない値\nisPlainObject([]); // false (配列)\nisPlainObject(new Date()); // false (Date インスタンス)\nisPlainObject(new Map()); // false (Map インスタンス)\nisPlainObject(new Set()); // false (Set インスタンス)\nisPlainObject(/regex/); // false (正規表現)\nisPlainObject(function () {}); // false (関数)\nisPlainObject(null); // false\nisPlainObject(undefined); // false\nisPlainObject('object'); // false (文字列)\nisPlainObject(42); // false (数値)\n```\n\nクラスインスタンスとプレーンオブジェクトを区別します。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\nclass Person {\n  name: string;\n  constructor(name: string) {\n    this.name = name;\n  }\n}\n\nconst person = new Person('John');\nconst plainObj = { name: 'John' };\n\nisPlainObject(person); // false (クラスインスタンス)\nisPlainObject(plainObj); // true (プレーンオブジェクト)\n```\n\nカスタム `Symbol.toStringTag` プロパティも正しく処理します。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// 書き込み可能な Symbol.toStringTag\nconst obj1 = {};\nobj1[Symbol.toStringTag] = 'CustomObject';\nisPlainObject(obj1); // true\n\n// 読み取り専用 Symbol.toStringTag（内蔵オブジェクト）\nconst date = new Date();\nisPlainObject(date); // false\n```\n\n#### パラメータ\n\n- `object` (`any`): プレーンオブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値がプレーンオブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isRegExp.md",
    "content": "# isRegExp (Lodash 互換性)\n\n::: warning es-toolkitの [isRegExp](../../predicate/isRegExp.md)を使用してください\n\nこの `isRegExp` 関数はLodash互換性のための関数ですが、単純な型確認です。\n\n代わりにより高速で現代的な `es-toolkit` の [isRegExp](../../predicate/isRegExp.md) を使用してください。\n\n:::\n\n値が正規表現かどうかを確認します。\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 使用法\n\n### `isRegExp(value)`\n\n値が正規表現かどうかを型安全に確認したい場合に `isRegExp` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 正規表現\nisRegExp(/abc/); // true\nisRegExp(new RegExp('abc')); // true\nisRegExp(/[a-z]+/g); // true\nisRegExp(/pattern/gi); // true\n\n// その他の型はfalse\nisRegExp('/abc/'); // false (文字列)\nisRegExp('pattern'); // false (文字列)\nisRegExp({}); // false (オブジェクト)\nisRegExp([]); // false (配列)\nisRegExp(null); // false\nisRegExp(undefined); // false\nisRegExp(123); // false (数値)\n```\n\n正規表現文字列と実際の正規表現オブジェクトを区別します。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 正規表現 vs 正規表現文字列\nisRegExp(/test/); // true\nisRegExp('/test/'); // false\nisRegExp('\\\\d+'); // false\nisRegExp('/\\\\d+/g'); // false\n\n// 様々な正規表現フラグ\nisRegExp(/test/i); // true (大文字小文字無視)\nisRegExp(/test/g); // true (グローバル検索)\nisRegExp(/test/m); // true (複数行)\nisRegExp(/test/gim); // true (すべてのフラグの組み合わせ)\n```\n\n動的に生成された正規表現も認識します。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// RegExp コンストラクタで作成した正規表現\nconst dynamicRegex = new RegExp('\\\\d{3}-\\\\d{4}', 'g');\nisRegExp(dynamicRegex); // true\n\n// 文字列を通じて生成した正規表現\nconst pattern = 'hello';\nconst flags = 'gi';\nconst regex = new RegExp(pattern, flags);\nisRegExp(regex); // true\n```\n\n#### パラメータ\n\n- `value` (`any`): 正規表現かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is RegExp`): 値が正規表現の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isSafeInteger.md",
    "content": "# isSafeInteger (Lodash 互換性)\n\n::: warning `Number.isSafeInteger`を使用してください\n\nこの `isSafeInteger` 関数は追加の型チェックオーバーヘッドにより遅く動作します。\n\n代わりにより高速で現代的な `Number.isSafeInteger` を使用してください。\n\n:::\n\n値が安全な整数かどうかを確認します。\n\n```typescript\nconst result = isSafeInteger(value);\n```\n\n## 使用法\n\n### `isSafeInteger(value)`\n\n与えられた値が安全な整数かどうかを確認する際に `isSafeInteger` を使用してください。安全な整数は -(2^53 - 1) と (2^53 - 1) の間の整数で、JavaScript で正確に表現できる整数です。\n\n```typescript\nimport { isSafeInteger } from 'es-toolkit/compat';\n\n// 安全な整数\nisSafeInteger(3); // true\nisSafeInteger(-42); // true\nisSafeInteger(0); // true\nisSafeInteger(Number.MAX_SAFE_INTEGER); // true (9007199254740991)\nisSafeInteger(Number.MIN_SAFE_INTEGER); // true (-9007199254740991)\n\n// 安全でない整数\nisSafeInteger(Number.MAX_SAFE_INTEGER + 1); // false\nisSafeInteger(Number.MIN_SAFE_INTEGER - 1); // false\nisSafeInteger(9007199254740992); // false\n\n// 整数でない値\nisSafeInteger(3.14); // false\nisSafeInteger('3'); // false\nisSafeInteger(1n); // false (BigInt)\nisSafeInteger([]); // false\nisSafeInteger({}); // false\nisSafeInteger(null); // false\nisSafeInteger(undefined); // false\n\n// 無限大とNaN\nisSafeInteger(Infinity); // false\nisSafeInteger(-Infinity); // false\nisSafeInteger(NaN); // false\n```\n\n#### パラメータ\n\n- `value` (`any`): 確認する値です。\n\n#### 戻り値\n\n(`value is number`): 値が安全な整数の場合は `true`、そうでなければ `false` を返します。  \n`true` を返す場合、TypeScript は `value` の型を `number` に絞り込みます。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isSet.md",
    "content": "# isSet (Lodash 互換性)\n\n::: warning `es-toolkit`の [isSet](../../predicate/isSet.md)を使用してください\n\nこの `isSet` 関数はLodash互換性のための関数ですが、メインライブラリと同じ実装です。\n\n代わりにより高速で現代的な `es-toolkit` の [isSet](../../predicate/isSet.md) を使用してください。\n\n:::\n\n値がSetかどうかを確認します。\n\n```typescript\nconst result = isSet(value);\n```\n\n## 使用法\n\n### `isSet(value)`\n\n値がSetかどうかを型安全に確認したい場合に `isSet` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set確認\nconst set = new Set();\nisSet(set); // true\n\n// その他の型はfalse\nisSet(new Map()); // false\nisSet(new WeakSet()); // false\nisSet([]); // false\nisSet({}); // false\nisSet('set'); // false\nisSet(123); // false\nisSet(null); // false\nisSet(undefined); // false\n```\n\nSetと似た他のコレクションとも区別します。\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set vs Map vs WeakSet\nisSet(new Set([1, 2, 3])); // true\nisSet(new Map([['key', 'value']])); // false\nisSet(new WeakSet()); // false\n\n// Set vs 配列\nisSet(new Set([1, 2, 3])); // true\nisSet([1, 2, 3]); // false\n\n// Set vs 一般オブジェクト\nisSet(new Set()); // true\nisSet({}); // false\nisSet(Object.create(null)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Setかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Set<any>`): 値がSetの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isString.md",
    "content": "# isString (Lodash 互換性)\n\n::: warning `typeof` 演算子を使用してください\n\nこの `isString` 関数はString オブジェクトラッパーの処理により複雑です。\n\n代わりにより簡単で現代的な `typeof value === 'string'` を使用してください。\n\n:::\n\n値が文字列かどうかを確認します。\n\n```typescript\nconst result = isString(value);\n```\n\n## 使用法\n\n### `isString(value)`\n\n値が文字列かどうかを型安全に確認したい場合に `isString` を使用してください。プリミティブ文字列とStringオブジェクトラッパーの両方を確認します。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// プリミティブ文字列\nisString('hello'); // true\nisString(''); // true\nisString('123'); // true\n\n// String オブジェクトラッパー\nisString(new String('hello')); // true\nisString(new String('')); // true\n\n// その他の型はfalse\nisString(123); // false\nisString(true); // false\nisString(null); // false\nisString(undefined); // false\nisString({}); // false\nisString([]); // false\nisString(Symbol('test')); // false\n```\n\n文字列と似て見える他の型と区別します。\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// 文字列 vs 数値\nisString('123'); // true\nisString(123); // false\n\n// 文字列 vs 真偽値\nisString('true'); // true\nisString(true); // false\n\n// 文字列 vs null/undefined\nisString('null'); // true\nisString(null); // false\nisString('undefined'); // true\nisString(undefined); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 文字列かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is string`): 値が文字列の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isSymbol.md",
    "content": "# isSymbol (Lodash 互換性)\n\n::: warning `typeof` 演算子を使用してください\n\nこの `isSymbol` 関数はSymbol オブジェクトラッパーの処理により複雑です。\n\n代わりにより簡単で現代的な `typeof value === 'symbol'` を使用してください。\n\n:::\n\n値がシンボル（symbol）かどうかを確認します。\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 使用法\n\n### `isSymbol(value)`\n\n値がシンボルかどうかを型安全に確認したい場合に `isSymbol` を使用してください。プリミティブシンボルとSymbolオブジェクトラッパーの両方を確認します。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// プリミティブシンボル\nisSymbol(Symbol('test')); // true\nisSymbol(Symbol.for('global')); // true\nisSymbol(Symbol.iterator); // true\n\n// Symbol オブジェクトラッパー\nisSymbol(Object(Symbol('test'))); // true\n\n// その他の型はfalse\nisSymbol('symbol'); // false\nisSymbol(123); // false\nisSymbol(true); // false\nisSymbol(null); // false\nisSymbol(undefined); // false\nisSymbol({}); // false\nisSymbol([]); // false\n```\n\n様々な内蔵シンボルも正しく認識します。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// よく知られたシンボル\nisSymbol(Symbol.iterator); // true\nisSymbol(Symbol.asyncIterator); // true\nisSymbol(Symbol.toStringTag); // true\nisSymbol(Symbol.hasInstance); // true\nisSymbol(Symbol.toPrimitive); // true\n\n// グローバルシンボル\nisSymbol(Symbol.for('myGlobalSymbol')); // true\n\n// ユーザー定義シンボル\nconst mySymbol = Symbol('mySymbol');\nisSymbol(mySymbol); // true\n```\n\n#### パラメータ\n\n- `value` (`unknown`): シンボルかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is symbol`): 値がシンボルの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isTypedArray.md",
    "content": "# isTypedArray (Lodash 互換性)\n\n::: warning `ArrayBuffer.isView()` または `instanceof` 演算子を使用してください\n\nこの `isTypedArray` 関数はLodash互換性のための関数ですが、単純な型確認です。\n\n代わりにより簡単で現代的な `ArrayBuffer.isView(value)` または `value instanceof Int8Array` などを使用してください。\n\n:::\n\n値が型付き配列（TypedArray）かどうかを確認します。\n\n```typescript\nconst result = isTypedArray(x);\n```\n\n## 使用法\n\n### `isTypedArray(x)`\n\n値が型付き配列かどうかを確認したい場合に `isTypedArray` を使用してください。型付き配列はバイナリデータを扱う特殊な配列型です。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 型付き配列\nisTypedArray(new Uint8Array([1, 2, 3])); // true\nisTypedArray(new Int16Array([1, 2, 3])); // true\nisTypedArray(new Float32Array([1.1, 2.2])); // true\nisTypedArray(new BigInt64Array([1n, 2n])); // true\n\n// その他の型はfalse\nisTypedArray([1, 2, 3]); // false (通常の配列)\nisTypedArray(new ArrayBuffer(16)); // false (ArrayBuffer)\nisTypedArray(new DataView(new ArrayBuffer(16))); // false (DataView)\nisTypedArray('array'); // false (文字列)\nisTypedArray({}); // false (オブジェクト)\nisTypedArray(null); // false\nisTypedArray(undefined); // false\n```\n\n様々な種類の型付き配列をすべて認識します。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 整数型付き配列\nisTypedArray(new Int8Array()); // true\nisTypedArray(new Int16Array()); // true\nisTypedArray(new Int32Array()); // true\nisTypedArray(new Uint8Array()); // true\nisTypedArray(new Uint16Array()); // true\nisTypedArray(new Uint32Array()); // true\nisTypedArray(new Uint8ClampedArray()); // true\n\n// 浮動小数点型付き配列\nisTypedArray(new Float32Array()); // true\nisTypedArray(new Float64Array()); // true\n\n// BigInt型付き配列\nisTypedArray(new BigInt64Array()); // true\nisTypedArray(new BigUint64Array()); // true\n```\n\n型付き配列と似た他のオブジェクトと区別します。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nconst buffer = new ArrayBuffer(16);\nconst view = new DataView(buffer);\nconst typedArray = new Uint8Array(buffer);\nconst regularArray = [1, 2, 3, 4];\n\nisTypedArray(buffer); // false (ArrayBuffer)\nisTypedArray(view); // false (DataView)\nisTypedArray(typedArray); // true (TypedArray)\nisTypedArray(regularArray); // false (通常の配列)\n```\n\nバイナリデータ処理で型を区別する際に便利です。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nfunction processData(data: unknown) {\n  if (isTypedArray(data)) {\n    console.log(`型付き配列長: ${data.length}`);\n    console.log(`バイト長: ${data.byteLength}`);\n    console.log(`バイトオフセット: ${data.byteOffset}`);\n    console.log(`コンストラクタ: ${data.constructor.name}`);\n\n    // 最初の値を出力\n    if (data.length > 0) {\n      console.log(`最初の値: ${data[0]}`);\n    }\n  } else if (Array.isArray(data)) {\n    console.log('通常の配列です');\n  } else {\n    console.log('配列ではありません');\n  }\n}\n\nprocessData(new Uint8Array([1, 2, 3])); // 型付き配列情報を出力\nprocessData([1, 2, 3]); // \"通常の配列です\"\nprocessData('not an array'); // \"配列ではありません\"\n```\n\n#### パラメータ\n\n- `x` (`any`): 型付き配列かどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が型付き配列の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isUndefined.md",
    "content": "# isUndefined (Lodash 互換性)\n\n::: warning es-toolkitの [isUndefined](../../predicate/isUndefined.md)を使用してください\n\nこの `isUndefined` 関数はLodash互換性のための複雑な処理により遅く動作します。\n\n代わりにより高速で現代的な `es-toolkit` の [isUndefined](../../predicate/isUndefined.md) を使用してください。\n\n:::\n\n値が `undefined` かどうかを確認します。\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 使用法\n\n### `isUndefined(x)`\n\n値が正確に `undefined` かどうかを型安全に確認したい場合に `isUndefined` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\n// undefinedのみtrue\nisUndefined(undefined); // true\n\n// nullもfalse\nisUndefined(null); // false\n\n// その他すべての値もfalse\nisUndefined(0); // false\nisUndefined(''); // false\nisUndefined(false); // false\nisUndefined([]); // false\nisUndefined({}); // false\nisUndefined('undefined'); // false\nisUndefined(NaN); // false\n```\n\n`undefined` と `null` を区別して確認することができます。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isUndefined(value)) {\n    console.log('値がundefinedです');\n  } else if (value === null) {\n    console.log('値が明示的にnullです');\n  } else {\n    console.log(`値があります: ${value}`);\n  }\n}\n\nhandleValue(undefined); // \"値がundefinedです\"\nhandleValue(null); // \"値が明示的にnullです\"\nhandleValue('hello'); // \"値があります: hello\"\n```\n\n宣言されていない変数や初期化されていないプロパティを確認する際に便利です。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nconst obj: { name?: string; age?: number } = { name: 'John' };\n\nif (isUndefined(obj.age)) {\n  console.log('年齢が設定されていません');\n  obj.age = 25; // デフォルト値を設定\n}\n\n// 関数パラメータのデフォルト値処理\nfunction greet(name: string, title?: string) {\n  if (isUndefined(title)) {\n    title = 'さん';\n  }\n  console.log(`こんにちは、${name}${title}!`);\n}\n\ngreet('田中'); // \"こんにちは、田中さん!\"\ngreet('田中', '先生'); // \"こんにちは、田中先生!\"\n```\n\n#### パラメータ\n\n- `x` (`any`): `undefined` かどうかを確認する値です。\n\n#### 戻り値\n\n(`x is undefined`): 値が `undefined` の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isWeakMap.md",
    "content": "# isWeakMap (Lodash 互換性)\n\n::: warning `instanceof` 演算子を使用してください\n\nこの `isWeakMap` 関数はLodash互換性のための関数ですが、単純な型確認です。\n\n代わりにより簡単で現代的な `value instanceof WeakMap` を使用してください。\n\n:::\n\n値がWeakMapかどうかを確認します。\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 使用法\n\n### `isWeakMap(value)`\n\n値がWeakMapかどうかを型安全に確認したい場合に `isWeakMap` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap確認\nconst weakMap = new WeakMap();\nisWeakMap(weakMap); // true\n\n// その他の型はfalse\nisWeakMap(new Map()); // false\nisWeakMap(new Set()); // false\nisWeakMap(new WeakSet()); // false\nisWeakMap({}); // false\nisWeakMap([]); // false\nisWeakMap('weakmap'); // false\nisWeakMap(123); // false\nisWeakMap(null); // false\nisWeakMap(undefined); // false\n```\n\nWeakMapと似た他のコレクションとも区別します。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap vs Map\nconst obj = {};\nconst weakMap = new WeakMap([[obj, 'value']]);\nconst map = new Map([[obj, 'value']]);\n\nisWeakMap(weakMap); // true\nisWeakMap(map); // false\n\n// WeakMap vs WeakSet\nisWeakMap(new WeakMap()); // true\nisWeakMap(new WeakSet()); // false\n\n// WeakMap vs 一般オブジェクト\nisWeakMap(new WeakMap()); // true\nisWeakMap({}); // false\n```\n\nWeakMapの特別な属性を活用する際に便利です。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\nfunction setupWeakReference(collection: unknown, key: object, value: any) {\n  if (isWeakMap(collection)) {\n    // WeakMapはオブジェクトのみをキーとして使用でき、弱い参照を保持します\n    collection.set(key, value);\n    console.log('WeakMapに弱い参照として保存しました');\n\n    // WeakMapはサイズを知ることができません\n    console.log('WeakMapはサイズ情報がありません');\n  } else {\n    console.log('WeakMapではありません');\n  }\n}\n\nconst weakMap = new WeakMap();\nconst regularMap = new Map();\nconst obj = { id: 1 };\n\nsetupWeakReference(weakMap, obj, 'data'); // \"WeakMapに弱い参照として保存しました\"\nsetupWeakReference(regularMap, obj, 'data'); // \"WeakMapではありません\"\n```\n\n#### パラメータ\n\n- `value` (`unknown`): WeakMapかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is WeakMap<object, any>`): 値がWeakMapの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/isWeakSet.md",
    "content": "# isWeakSet (Lodash 互換性)\n\n::: warning `instanceof` 演算子を使用してください\n\nこの `isWeakSet` 関数はLodash互換性のための関数ですが、単純な型確認です。\n\n代わりにより簡単で現代的な `value instanceof WeakSet` を使用してください。\n\n:::\n\n値がWeakSetかどうかを確認します。\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 使用法\n\n### `isWeakSet(value)`\n\n値がWeakSetかどうかを型安全に確認したい場合に `isWeakSet` を使用してください。TypeScript で型ガードとしても動作します。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet確認\nconst weakSet = new WeakSet();\nisWeakSet(weakSet); // true\n\n// その他の型はfalse\nisWeakSet(new Set()); // false\nisWeakSet(new Map()); // false\nisWeakSet(new WeakMap()); // false\nisWeakSet([]); // false\nisWeakSet({}); // false\nisWeakSet('weakset'); // false\nisWeakSet(123); // false\nisWeakSet(null); // false\nisWeakSet(undefined); // false\n```\n\nWeakSetと似た他のコレクションとも区別します。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet vs Set\nconst obj = {};\nconst weakSet = new WeakSet([obj]);\nconst set = new Set([obj]);\n\nisWeakSet(weakSet); // true\nisWeakSet(set); // false\n\n// WeakSet vs WeakMap\nisWeakSet(new WeakSet()); // true\nisWeakSet(new WeakMap()); // false\n\n// WeakSet vs 配列\nisWeakSet(new WeakSet()); // true\nisWeakSet([]); // false\n```\n\nWeakSetの特別な属性を活用する際に便利です。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\nfunction addWeakReference(collection: unknown, item: object) {\n  if (isWeakSet(collection)) {\n    // WeakSetはオブジェクトのみを保存でき、弱い参照を保持します\n    collection.add(item);\n    console.log('WeakSetに弱い参照として保存しました');\n\n    // WeakSetはサイズを知ることができず、反復処理もできません\n    console.log('WeakSetはサイズ情報がなく反復処理できません');\n  } else {\n    console.log('WeakSetではありません');\n  }\n}\n\nconst weakSet = new WeakSet();\nconst regularSet = new Set();\nconst obj = { id: 1 };\n\naddWeakReference(weakSet, obj); // \"WeakSetに弱い参照として保存しました\"\naddWeakReference(regularSet, obj); // \"WeakSetではありません\"\n```\n\nメモリリーク防止のためのオブジェクト追跡に便利です。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// DOM要素追跡の例\nfunction trackDOMElement(tracker: unknown, element: Element) {\n  if (isWeakSet(tracker)) {\n    // DOM要素が削除されるとWeakSetからも自動的に削除されます\n    tracker.add(element);\n    console.log('DOM要素の追跡を開始しました');\n\n    // 後で追跡状況を確認\n    if (tracker.has(element)) {\n      console.log('この要素は追跡中です');\n    }\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): WeakSetかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is WeakSet<object>`): 値がWeakSetの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/matches.md",
    "content": "# matches (Lodash 互換性)\n\n与えられたパターンと部分的に一致するかどうかを確認する関数を作成します。\n\n```typescript\nconst matcher = matches(pattern);\n```\n\n## 使用法\n\n### `matches(source)`\n\nオブジェクトや配列の構造と値が特定のパターンと一致するかどうかを確認する関数を作成する際に `matches` を使用してください。配列のフィルタリングやオブジェクト検索で便利です。\n\n```typescript\nimport { matches } from 'es-toolkit/compat';\n\n// オブジェクトパターンマッチング\nconst userMatcher = matches({ age: 25, department: 'Engineering' });\n\nconst users = [\n  { name: 'Alice', age: 25, department: 'Engineering' },\n  { name: 'Bob', age: 30, department: 'Marketing' },\n  { name: 'Charlie', age: 25, department: 'Engineering' },\n];\n\nconst engineeringUsers = users.filter(userMatcher);\n// [{ name: 'Alice', age: 25, department: 'Engineering' },\n//  { name: 'Charlie', age: 25, department: 'Engineering' }]\n\n// ネストしたオブジェクトパターン\nconst profileMatcher = matches({\n  profile: { city: 'Seoul', verified: true },\n});\n\nconst profiles = [\n  { name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } },\n  { name: 'Lee', profile: { city: 'Busan', verified: true } },\n  { name: 'Park', profile: { city: 'Seoul', verified: false } },\n];\n\nconst seoulVerifiedUsers = profiles.filter(profileMatcher);\n// [{ name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } }]\n\n// 配列パターンマッチング\nconst arrayMatcher = matches([2, 4]);\nconst arrays = [\n  [1, 2, 3, 4, 5],\n  [2, 4, 6],\n  [1, 3, 5],\n];\nconst matchingArrays = arrays.filter(arrayMatcher);\n// [[1, 2, 3, 4, 5], [2, 4, 6]]\n\n// 空のパターンはすべての値とマッチ\nconst emptyMatcher = matches({});\nemptyMatcher({ anything: 'value' }); // true\nemptyMatcher([]); // true\nemptyMatcher(null); // true\n```\n\n#### パラメータ\n\n- `source` (`unknown`): 一致パターンとなるオブジェクトや値です。\n\n#### 戻り値\n\n(`(target: unknown) => boolean`): 与えられた値がパターンと部分的に一致するかどうかを確認する関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/predicate/matchesProperty.md",
    "content": "# matchesProperty (Lodash 互換性)\n\n特定のプロパティが与えられた値と一致するかどうかを確認する関数を作成します。\n\n```typescript\nconst checker = matchesProperty(path, value);\n```\n\n## 使用法\n\n### `matchesProperty(property, source)`\n\nオブジェクトの特定のプロパティが与えられた値と一致するかどうかを確認する関数を作成する際に `matchesProperty` を使用してください。配列のフィルタリングやオブジェクト検索で便利です。\n\n```typescript\nimport { matchesProperty } from 'es-toolkit/compat';\n\n// 単純なプロパティ確認\nconst checkName = matchesProperty('name', 'Alice');\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Alice', age: 35 },\n];\n\nconst aliceUsers = users.filter(checkName);\n// [{ name: 'Alice', age: 25 }, { name: 'Alice', age: 35 }]\n\n// ネストしたプロパティ確認（配列パス）\nconst checkCity = matchesProperty(['address', 'city'], 'Seoul');\n\nconst profiles = [\n  { name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n  { name: 'Lee', address: { city: 'Busan', district: 'Haeundae' } },\n  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } },\n];\n\nconst seoulUsers = profiles.filter(checkCity);\n// [{ name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n//  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } }]\n\n// 深いパスを文字列で表現\nconst checkScore = matchesProperty('stats.game.score', 100);\n\nconst players = [\n  { name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n  { name: 'Player2', stats: { game: { score: 95, level: 4 } } },\n  { name: 'Player3', stats: { game: { score: 100, level: 6 } } },\n];\n\nconst perfectScorers = players.filter(checkScore);\n// [{ name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n//  { name: 'Player3', stats: { game: { score: 100, level: 6 } } }]\n\n// 複雑なオブジェクトとマッチング\nconst checkRole = matchesProperty('role', { type: 'admin', permissions: ['read', 'write'] });\n\nconst accounts = [\n  { user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n  { user: 'Bob', role: { type: 'user', permissions: ['read'] } },\n  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } },\n];\n\nconst admins = accounts.filter(checkRole);\n// [{ user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n//  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } }]\n```\n\n#### パラメータ\n\n- `property` (`PropertyKey | PropertyKey[]`): 確認するプロパティのパスです。文字列、配列、またはドットで区切られたパスを使用できます。\n- `source` (`unknown`): プロパティ値と比較する値です。\n\n#### 戻り値\n\n(`(target: unknown) => boolean`): 与えられたオブジェクトのプロパティが値と一致するかどうかを確認する関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/camelCase.md",
    "content": "# camelCase (Lodash 互換性)\n\n::: warning `es-toolkit` の `camelCase` を使用してください\n\nこの `camelCase` 関数は、文字列以外の入力値の処理と短縮アポストロフィの除去などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [camelCase](../../string/camelCase.md) を使用してください。\n\n:::\n\n文字列をキャメルケースに変換します。\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 使用法\n\n### `camelCase(str)`\n\n文字列をキャメルケースに変換します。キャメルケースは、最初の単語を小文字で始め、後続の単語の最初の文字を大文字にして、スペースなしで連結する命名規則です。\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase('camelCase'); // 'camelCase'\ncamelCase('some whitespace'); // 'someWhitespace'\ncamelCase('hyphen-text'); // 'hyphenText'\ncamelCase('HTTPRequest'); // 'httpRequest'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase(123); // '123'\ncamelCase(null); // ''\ncamelCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string | object`,オプション): キャメルケースに変換する値です。\n\n#### 戻り値\n\n(`string`): キャメルケースに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/capitalize.md",
    "content": "# capitalize (Lodash 互換性)\n\n::: warning `es-toolkit` の `capitalize` を使用してください\n\nこの `capitalize` 関数は、文字列以外の入力値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [capitalize](../../string/capitalize.md) を使用してください。\n\n:::\n\n文字列の最初の文字を大文字に、残りの文字を小文字に変換します。\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 使用法\n\n### `capitalize(str)`\n\n文字列の最初の文字を大文字に、残りの文字を小文字に変換します。単語の第一印象を良くしたり、タイトル形式にする際に便利です。\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize('fred'); // 'Fred'\ncapitalize('FRED'); // 'Fred'\ncapitalize('fRED'); // 'Fred'\n```\n\n空文字列や文字列以外の値も処理できます。\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize(''); // ''\ncapitalize(123); // '123'\ncapitalize(null); // ''\ncapitalize(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 最初の文字を大文字に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 最初の文字が大文字で残りが小文字の文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/deburr.md",
    "content": "# deburr (Lodash 互換性)\n\n::: warning `es-toolkit` の `deburr` を使用してください\n\nこの `deburr` 関数は、文字列以外の入力値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [deburr](../../string/deburr.md) を使用してください。\n\n:::\n\n文字列内の特殊文字と発音区別記号をASCII文字に変換します。\n\n```typescript\nconst result = deburr(str);\n```\n\n## 使用法\n\n### `deburr(str)`\n\n文字列内の特殊文字と発音区別記号をASCII文字に変換します。多言語テキストを検索やソートに使いやすくする際に便利です。\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr('Æthelred'); // 'Aethelred'\ndeburr('München'); // 'Munchen'\ndeburr('Crème brûlée'); // 'Creme brulee'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr(123); // '123'\ndeburr(null); // ''\ndeburr(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 特殊文字を削除する文字列です。\n\n#### 戻り値\n\n(`string`): 特殊文字と発音区別記号がASCII文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/endsWith.md",
    "content": "# endsWith (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.endsWith` を使用してください\n\nこの `endsWith` 関数は、`null` や `undefined` の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript の `String.prototype.endsWith` を使用してください。\n\n:::\n\n文字列が指定された文字列で終わるかどうかを確認します。\n\n```typescript\nconst result = endsWith(str, target);\n```\n\n## 使用法\n\n### `endsWith(str, target, position?)`\n\n文字列が特定の文字列で終わるかどうかを確認したい場合は `endsWith` を使用してください。検索する位置も指定できます。\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\n// 文字列の終わりを確認\nendsWith('fooBar', 'Bar');\n// Returns: true\n\nendsWith('fooBar', 'foo');\n// Returns: false\n\n// 特定の位置まで確認\nendsWith('fooBar', 'foo', 3);\n// Returns: true (最初の3文字'foo'が'foo'で終わるか確認)\n```\n\n`null` や `undefined` は `false` を返します。\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\nendsWith(null, 'test');\n// Returns: false\n\nendsWith('test', null);\n// Returns: false\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 確認する文字列です。\n- `target` (`string`,オプション): 終わりにあるか探す文字列です。\n- `position` (`number`,オプション): 検索を終了する位置です。デフォルトは文字列全体の長さです。\n\n#### 戻り値\n\n(`boolean`): 文字列が指定された文字列で終わる場合は `true`,そうでない場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/escape.md",
    "content": "# escape (Lodash 互換性)\n\n::: warning `es-toolkit` の `escape` を使用してください\n\nこの `escape` 関数は、文字列以外の入力値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [escape](../../string/escape.md) を使用してください。\n\n:::\n\n文字列内のHTML特殊文字をHTMLエンティティに変換します。\n\n```typescript\nconst result = escape(str);\n```\n\n## 使用法\n\n### `escape(str)`\n\n文字列内の `&`、`<`、`>`、`\"`、`'` 文字を対応するHTMLエンティティに変換します。HTML文書にテキストを安全に挿入する際にXSS攻撃を防ぐのに便利です。\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape('This is a <div> element.'); // 'This is a &lt;div&gt; element.'\nescape('This is a \"quote\"'); // 'This is a &quot;quote&quot;'\nescape(\"This is a 'quote'\"); // 'This is a &#39;quote&#39;'\nescape('This is a & symbol'); // 'This is a &amp; symbol'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape(123); // '123'\nescape(null); // ''\nescape(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): HTML特殊文字をエスケープする文字列です。\n\n#### 戻り値\n\n(`string`): HTML特殊文字がエンティティに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/escapeRegExp.md",
    "content": "# escapeRegExp (Lodash 互換性)\n\n::: warning `es-toolkit` の `escapeRegExp` を使用してください\n\nこの `escapeRegExp` 関数は、文字列以外の入力値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [escapeRegExp](../../string/escapeRegExp.md) を使用してください。\n\n:::\n\n文字列内の正規表現特殊文字をエスケープします。\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 使用法\n\n### `escapeRegExp(str)`\n\n文字列内の正規表現特殊文字 `^`、`$`、`\\`、`.`、`*`、`+`、`?`、`(`、`)`、`[`、`]`、`{`、`}`、`|` をエスケープします。動的に正規表現を生成する際に文字列を文字通り処理したい場合に便利です。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp('[es-toolkit](https://es-toolkit.dev/)');\n// '\\\\[es-toolkit\\\\]\\\\(https://es-toolkit\\\\.dev/\\\\)'\n\nescapeRegExp('$^{}.+*?()[]|\\\\');\n// '\\\\$\\\\^\\\\{\\\\}\\\\.\\\\+\\\\*\\\\?\\\\(\\\\)\\\\[\\\\]\\\\|\\\\\\\\'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp(123); // '123'\nescapeRegExp(null); // ''\nescapeRegExp(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 正規表現特殊文字をエスケープする文字列です。\n\n#### 戻り値\n\n(`string`): 正規表現特殊文字がエスケープされた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/kebabCase.md",
    "content": "# kebabCase (Lodash 互換性)\n\n::: warning `es-toolkit` の `kebabCase` を使用してください\n\nこの `kebabCase` 関数は、文字列以外の入力値の処理と短縮アポストロフィの除去などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [kebabCase](../../string/kebabCase.md) を使用してください。\n\n:::\n\n文字列をケバブケースに変換します。\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 使用法\n\n### `kebabCase(str)`\n\n文字列をケバブケースに変換します。ケバブケースは、各単語を小文字で書き、ダッシュ(-)文字で連結する命名規則です。URLやCSSクラス名で主に使用されます。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase('camelCase'); // 'camel-case'\nkebabCase('some whitespace'); // 'some-whitespace'\nkebabCase('hyphen-text'); // 'hyphen-text'\nkebabCase('HTTPRequest'); // 'http-request'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase(123); // '123'\nkebabCase(null); // ''\nkebabCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string | object`,オプション): ケバブケースに変換する値です。\n\n#### 戻り値\n\n(`string`): ケバブケースに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/lowerCase.md",
    "content": "# lowerCase (Lodash 互換性)\n\n::: warning `es-toolkit` の `lowerCase` を使用してください\n\nこの `lowerCase` 関数は、文字列以外の入力値の処理と短縮アポストロフィの除去などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [lowerCase](../../string/lowerCase.md) を使用してください。\n\n:::\n\n文字列を小文字の単語にスペースで区切って変換します。\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 使用法\n\n### `lowerCase(str)`\n\n文字列を小文字の単語にスペースで区切って変換します。各単語は小文字に変換され、スペース文字で連結されます。人間が読みやすいテキスト形式にする際に便利です。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase('camelCase'); // 'camel case'\nlowerCase('some whitespace'); // 'some whitespace'\nlowerCase('hyphen-text'); // 'hyphen text'\nlowerCase('HTTPRequest'); // 'http request'\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase(123); // '123'\nlowerCase(null); // ''\nlowerCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string | object`,オプション): 小文字形式に変換する値です。\n\n#### 戻り値\n\n(`string`): 小文字の単語がスペースで区切られた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/lowerFirst.md",
    "content": "# lowerFirst (Lodash 互換性)\n\n::: warning `es-toolkit` の `lowerFirst` を使用してください\n\nこの `lowerFirst` 関数は、文字列以外の入力値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [lowerFirst](../../string/lowerFirst.md) を使用してください。\n\n:::\n\n文字列の最初の文字を小文字に変換します。\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 使用法\n\n### `lowerFirst(str)`\n\n文字列の最初の文字を小文字に変換します。残りの文字はそのまま維持されます。camelCase変数名を作成したり、最初の文字だけ小文字にしたい場合に便利です。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst('fred'); // 'fred'\nlowerFirst('Fred'); // 'fred'\nlowerFirst('FRED'); // 'fRED'\nlowerFirst(''); // ''\n```\n\n文字列以外の値も文字列に変換して処理します。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst(123); // '123'\nlowerFirst(null); // ''\nlowerFirst(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 最初の文字を小文字に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 最初の文字が小文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/pad.md",
    "content": "# pad (Lodash 互換性)\n\n::: warning `es-toolkit` の `pad` を使用してください\n\nこの `pad` 関数は、`null` や `undefined` の処理などにより、動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [pad](../../string/pad.md) を使用してください。\n\n:::\n\n文字列の前後にパディング文字を追加して、指定された長さに合わせます。\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 使用法\n\n### `pad(str, length, chars)`\n\n文字列が希望する長さより短い場合に、前後にパディング文字を追加して長さを合わせたい場合は `pad` を使用してください。パディング文字が均等に分割されない場合、追加の文字は右側に配置されます。\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\n// デフォルトの空白でパディング\npad('abc', 8);\n// Returns: '  abc   '\n\n// 指定した文字でパディング\npad('abc', 8, '_-');\n// Returns: '_-abc_-_'\n\n// すでに十分な長さならそのまま返す\npad('abc', 3);\n// Returns: 'abc'\n\n// 長さがより短いならそのまま返す\npad('abc', 2);\n// Returns: 'abc'\n```\n\n`null` や `undefined` は空文字列として処理されます。\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\npad(null, 5); // '     '\npad(undefined, 3, '*'); // '***'\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): パディングする文字列です。\n- `length` (`number`,オプション): 目標の長さです。デフォルトは `0` です。\n- `chars` (`string`,オプション): パディングに使用する文字です。デフォルトは空白 `' '` です。\n\n#### 戻り値\n\n(`string`): 指定された長さまでパディングされた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/padEnd.md",
    "content": "# padEnd (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.padEnd` を使用してください\n\nこの `padEnd` 関数は、文字列以外の値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript の `String.prototype.padEnd` を使用してください。\n\n:::\n\n文字列の後ろにパディングを追加して、指定された長さまで伸ばします。\n\n```typescript\nconst padded = padEnd(str, length, chars);\n```\n\n## 使用法\n\n### `padEnd(str, length?, chars?)`\n\n文字列が希望する長さより短い場合に、後ろにパディング文字を追加して長さを合わせたい場合は `padEnd` を使用してください。\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\n// 空白でパディング\npadEnd('abc', 6);\n// Returns: 'abc   '\n\n// 特定の文字でパディング\npadEnd('abc', 6, '_-');\n// Returns: 'abc_-_'\n\n// 元の長さがより長い場合はそのまま返す\npadEnd('abc', 3);\n// Returns: 'abc'\n```\n\n`null` や `undefined` は空文字列として処理されます。\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\npadEnd(null, 5, '*');\n// Returns: '*****'\n\npadEnd(undefined, 3);\n// Returns: '   '\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): パディングを追加する文字列です。\n- `length` (`number`,オプション): 希望する最終的な文字列の長さです。デフォルトは `0` です。\n- `chars` (`string`,オプション): パディングに使用する文字です。デフォルトは `' '`(空白)です。\n\n#### 戻り値\n\n(`string`): 後ろにパディングが追加された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/padStart.md",
    "content": "# padStart (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.padStart` を使用してください\n\nこの `padStart` 関数は、文字列以外の値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript の `String.prototype.padStart` を使用してください。\n\n:::\n\n文字列の前にパディングを追加して、指定された長さまで伸ばします。\n\n```typescript\nconst padded = padStart(str, length, chars);\n```\n\n## 使用法\n\n### `padStart(str, length?, chars?)`\n\n文字列が希望する長さより短い場合に、前にパディング文字を追加して長さを合わせたい場合は `padStart` を使用してください。\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\n// 空白でパディング\npadStart('abc', 6);\n// Returns: '   abc'\n\n// 特定の文字でパディング\npadStart('abc', 6, '_-');\n// Returns: '_-_abc'\n\n// 元の長さがより長い場合はそのまま返す\npadStart('abc', 3);\n// Returns: 'abc'\n```\n\n`null` や `undefined` は空文字列として処理されます。\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\npadStart(null, 5, '*');\n// Returns: '*****'\n\npadStart(undefined, 3);\n// Returns: '   '\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): パディングを追加する文字列です。\n- `length` (`number`,オプション): 希望する最終的な文字列の長さです。デフォルトは `0` です。\n- `chars` (`string`,オプション): パディングに使用する文字です。デフォルトは `' '`(空白)です。\n\n#### 戻り値\n\n(`string`): 前にパディングが追加された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/repeat.md",
    "content": "# repeat (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.repeat` を使用してください\n\nこの `repeat` 関数は、文字列以外の値の処理と整数変換により、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript の `String.prototype.repeat` を使用してください。\n\n:::\n\n文字列を指定された回数だけ繰り返します。\n\n```typescript\nconst repeated = repeat(str, n);\n```\n\n## 使用法\n\n### `repeat(str, n?)`\n\n文字列を複数回繰り返して新しい文字列を作成したい場合は `repeat` を使用してください。繰り返し回数が1未満の場合は空文字列を返します。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\n// 文字列を繰り返す\nrepeat('abc', 2);\n// Returns: 'abcabc'\n\nrepeat('hello', 3);\n// Returns: 'hellohellohello'\n\n// 0回繰り返すと空文字列\nrepeat('abc', 0);\n// Returns: ''\n```\n\n`null` や `undefined` は空文字列として処理されます。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat(null, 3);\n// Returns: ''\n\nrepeat(undefined, 2);\n// Returns: ''\n```\n\n繰り返し回数を指定しない場合は1回繰り返します。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat('abc');\n// Returns: 'abc'\n```\n\n#### パラメータ\n\n- `str` (`string`,オプション): 繰り返す文字列です。\n- `n` (`number`,オプション): 繰り返す回数です。デフォルトは `1` です。\n\n#### 戻り値\n\n(`string`): 指定された回数だけ繰り返された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/replace.md",
    "content": "# replace (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.replace` を使用してください\n\nこの `replace` 関数は、文字列以外の値の処理により、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript の `String.prototype.replace` を使用してください。\n\n:::\n\n文字列内の一致するパターンを他の文字列に置き換えます。\n\n```typescript\nconst replaced = replace(target, pattern, replacement);\n```\n\n## 使用法\n\n### `replace(target, pattern, replacement)`\n\n文字列内の特定のパターンを見つけて他の文字列に置き換えたい場合は `replace` を使用してください。文字列または正規表現パターンを使用でき、置換内容は文字列または関数で指定できます。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 文字列パターンで置換\nreplace('abcde', 'de', '123');\n// Returns: 'abc123'\n\n// 正規表現パターンで置換\nreplace('abcde', /[bd]/g, '-');\n// Returns: 'a-c-e'\n```\n\n関数を使用して動的に置換内容を決定することもできます。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 関数で置換内容を決定\nreplace('abcde', 'de', match => match.toUpperCase());\n// Returns: 'abcDE'\n\n// 正規表現と関数の組み合わせ\nreplace('abcde', /[bd]/g, match => match.toUpperCase());\n// Returns: 'aBcDe'\n```\n\n`null` や `undefined` の対象は空文字列として処理されます。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\nreplace(null, 'test', 'replaced');\n// Returns: ''\n\nreplace(undefined, /test/g, 'replaced');\n// Returns: ''\n```\n\n#### パラメータ\n\n- `target` (`string`): 置換する対象の文字列です。\n- `pattern` (`string | RegExp`): 探すパターンです。\n- `replacement` (`string | Function`): 置換内容です。関数の場合、マッチした文字列を受け取って置換文字列を返す必要があります。\n\n#### 戻り値\n\n(`string`): パターンが置き換えられた新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/snakeCase.md",
    "content": "# snakeCase (Lodash 互換性)\n\n::: warning `es-toolkit` の `snakeCase` を使用してください\n\nこの `snakeCase` 関数は、`null` または `undefined` を処理するための正規化ロジックにより動作が遅くなります。\n\n代わりに、より高速で現代的な `es-toolkit` の [snakeCase](../../string/snakeCase.md) を使用してください。\n\n:::\n\n文字列をスネークケースに変換します。\n\n```typescript\nconst snakeCased = snakeCase(str);\n```\n\n## 使用法\n\n### `snakeCase(str)`\n\n文字列をスネークケース (snake*case) に変換したい場合は `snakeCase` を使用してください。スネークケースは、各単語を小文字で書き、アンダースコア (*) で連結する命名規則です。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\n// キャメルケースの変換\nsnakeCase('camelCase');\n// Returns: 'camel_case'\n\n// 空白で区切られた文字列の変換\nsnakeCase('some whitespace');\n// Returns: 'some_whitespace'\n\n// ハイフンで区切られた文字列の変換\nsnakeCase('hyphen-text');\n// Returns: 'hyphen_text'\n\n// 連続する大文字の処理\nsnakeCase('HTTPRequest');\n// Returns: 'http_request'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\nsnakeCase(null); // ''\nsnakeCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): スネークケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): スネークケースに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/split.md",
    "content": "# split (Lodash 互換性)\n\n::: warning JavaScriptの`String.prototype.split`を使用してください\n\nこの`split`関数は、`null`または`undefined`の処理により動作が遅くなります。\n\n代わりに、より高速で現代的なJavaScriptの`String.prototype.split`を使用してください。\n\n:::\n\n区切り文字を使用して文字列を配列に分割します。\n\n```typescript\nconst segments = split(str, separator);\n```\n\n## 使用法\n\n### `split(string, separator?, limit?)`\n\n特定の区切り文字を使用して文字列を配列に分割したい場合は、`split`を使用してください。結果配列の最大長を制限することもできます。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\n// ハイフンで分割\nsplit('a-b-c', '-');\n// 戻り値: ['a', 'b', 'c']\n\n// 結果の数を制限\nsplit('a-b-c-d', '-', 2);\n// 戻り値: ['a', 'b']\n\n// 正規表現で分割\nsplit('hello world', /\\s/);\n// 戻り値: ['hello', 'world']\n```\n\n区切り文字を指定しない場合、文字列全体が配列の最初の要素になります。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit('hello');\n// 戻り値: ['hello']\n```\n\n`null`または`undefined`は空文字列として扱われます。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit(null);\n// 戻り値: ['']\n\nsplit(undefined);\n// 戻り値: ['']\n```\n\n#### パラメータ\n\n- `string` (`string`, オプション): 分割する文字列です。デフォルトは空文字列です。\n- `separator` (`RegExp | string`, オプション): 分割の基準となる区切り文字です。\n- `limit` (`number`, オプション): 結果配列の最大長です。\n\n#### 戻り値\n\n(`string[]`): 区切り文字で分割された文字列配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/startCase.md",
    "content": "# startCase (Lodash 互換性)\n\n::: warning `es-toolkit`の`startCase`を使用してください\n\nこの`startCase`関数は、`null`または`undefined`を処理するための正規化ロジックにより、動作が遅くなります。\n\n代わりに、より高速で現代的な`es-toolkit`の[startCase](../../string/startCase.md)を使用してください。\n\n:::\n\n文字列をスタートケースに変換します。\n\n```typescript\nconst startCased = startCase(str);\n```\n\n## 使用法\n\n### `startCase(str)`\n\n文字列をスタートケース(Start Case)に変換したい場合は、`startCase`を使用してください。スタートケースは、各単語の最初の文字を大文字にし、スペースで区切る命名規則です。\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\n// 通常の文字列を変換\nstartCase('hello world');\n// 戻り値: 'Hello World'\n\n// すでに大文字の単語はそのまま保持\nstartCase('HELLO WORLD');\n// 戻り値: 'HELLO WORLD'\n\n// ハイフンで区切られた文字列を変換\nstartCase('hello-world');\n// 戻り値: 'Hello World'\n\n// アンダースコアで区切られた文字列を変換\nstartCase('hello_world');\n// 戻り値: 'Hello World'\n```\n\n`null`または`undefined`は空文字列として処理されます。\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\nstartCase(null); // ''\nstartCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): スタートケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): スタートケースに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/startsWith.md",
    "content": "# startsWith (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.startsWith` を使用してください\n\nこの `startsWith` 関数は `null` や `undefined` の処理により動作が遅くなります。\n\nより高速で現代的な JavaScript の `String.prototype.startsWith` を使用してください。\n\n:::\n\n文字列が指定された文字列で始まるかどうかを確認します。\n\n```typescript\nconst result = startsWith(str, target);\n```\n\n## 使用法\n\n### `startsWith(str, target, position?)`\n\n文字列が特定の文字列で始まるかどうかを確認したい場合は `startsWith` を使用してください。検索を開始する位置も指定できます。\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\n// 文字列の開始を確認\nstartsWith('fooBar', 'foo');\n// 戻り値: true\n\nstartsWith('fooBar', 'bar');\n// 戻り値: false\n\n// 特定の位置から確認\nstartsWith('fooBar', 'Bar', 3);\n// 戻り値: true (3番目の位置から 'Bar' で始まるかどうかを確認)\n```\n\n`null` や `undefined` は `false` を返します。\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\nstartsWith(null, 'test');\n// 戻り値: false\n\nstartsWith('test', null);\n// 戻り値: false\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): 確認する文字列です。\n- `target` (`string`, オプション): 先頭にあるかどうかを探す文字列です。\n- `position` (`number`, オプション): 検索を開始する位置です。デフォルトは `0` です。\n\n#### 戻り値\n\n(`boolean`): 文字列が指定された文字列で始まる場合は `true`、そうでない場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/template.md",
    "content": "# template (Lodash 互換性)\n\n::: warning JavaScript テンプレートリテラルを使用してください\n\nこの `template` 関数は複雑な文字列処理のため、動作が遅くなります。\n\n代わりに、より高速で現代的な JavaScript テンプレートリテラルを使用してください。\n\n:::\n\n文字列テンプレートに値を挿入して新しい文字列を生成する関数を作成します。\n\n```typescript\nconst compiled = template(templateString);\n```\n\n## 使用法\n\n### `template(string, options?)`\n\n文字列テンプレートにデータを挿入して完成した文字列を作成したい場合は、`template` を使用してください。値を安全にエスケープしたり、そのまま挿入したり、JavaScript コードを実行したりできます。\n\n基本的な使い方で値を挿入またはエスケープできます。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 値をそのまま挿入\nconst compiled = template('<%= value %>');\ncompiled({ value: 'Hello, World!' });\n// 戻り値: 'Hello, World!'\n\n// HTML を安全にエスケープ\nconst safeCompiled = template('<%- value %>');\nsafeCompiled({ value: '<script>alert(\"xss\")</script>' });\n// 戻り値: '&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;'\n```\n\nJavaScript コードを実行することもできます。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 条件文を使用\nconst compiled = template('<% if (user) { %>こんにちは <%= user %>さん!<% } %>');\ncompiled({ user: 'es-toolkit' });\n// 戻り値: 'こんにちは es-toolkitさん!'\n\n// ループを使用\nconst listTemplate = template('<% users.forEach(function(user) { %><li><%= user %></li><% }); %>');\nlistTemplate({ users: ['太郎', '花子', '次郎'] });\n// 戻り値: '<li>太郎</li><li>花子</li><li>次郎</li>'\n```\n\n変数名を指定して安全に使用できます。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= data.name %>さんの年齢は <%= data.age %>歳です', {\n  variable: 'data',\n});\ncompiled({ name: '太郎', age: 25 });\n// 戻り値: '太郎さんの年齢は 25歳です'\n```\n\n外部関数をインポートして使用できます。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= _.toUpper(message) %>', {\n  imports: { _: { toUpper: str => str.toUpperCase() } },\n});\ncompiled({ message: 'hello world' });\n// 戻り値: 'HELLO WORLD'\n```\n\nカスタム区切り文字も作成できます。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// カスタム区切り文字で値を挿入\nconst compiled = template('{{ message }}', {\n  interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n});\ncompiled({ message: 'こんにちは!' });\n// 戻り値: 'こんにちは!'\n\n// カスタム区切り文字でエスケープ\nconst safeCompiled = template('[- html -]', {\n  escape: /\\[-([\\s\\S]+?)-\\]/g,\n});\nsafeCompiled({ html: '<div>内容</div>' });\n// 戻り値: '&lt;div&gt;内容&lt;/div&gt;'\n```\n\n#### パラメータ\n\n- `string` (`string`): テンプレート文字列です。\n- `options` (`object`, オプション): 設定オブジェクトです。\n  - `options.escape` (`RegExp`, オプション): HTML をエスケープする区切り文字の正規表現です。デフォルトは `<%-([\\s\\S]+?)%>` です。\n  - `options.evaluate` (`RegExp`, オプション): JavaScript コードを実行する区切り文字の正規表現です。デフォルトは `<%([\\s\\S]+?)%>` です。\n  - `options.interpolate` (`RegExp`, オプション): 値を挿入する区切り文字の正規表現です。デフォルトは `<%=([\\s\\S]+?)%>` です。\n  - `options.variable` (`string`, オプション): データオブジェクトの変数名です。\n  - `options.imports` (`object`, オプション): テンプレートで使用する関数です。\n  - `options.sourceURL` (`string`, オプション): デバッグ用のソース URL です。\n\n#### 戻り値\n\n(`TemplateExecutor`): データオブジェクトを受け取って完成した文字列を返す関数です。生成された関数コードは `source` プロパティで確認できます。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/toLower.md",
    "content": "# toLower (Lodash 互換性)\n\n::: warning JavaScriptの `String.prototype.toLowerCase` を使用してください\n\nこの `toLower` 関数は、文字列以外の値の処理により動作が遅くなります。\n\n代わりに、より高速で現代的なJavaScriptの `String.prototype.toLowerCase` を使用してください。\n\n:::\n\n値を文字列に変換した後、小文字に変換します。\n\n```typescript\nconst lowercased = toLower(value);\n```\n\n## 使用法\n\n### `toLower(value?)`\n\n値を小文字の文字列に変換したい場合は `toLower` を使用してください。任意の型の値をまず文字列に変換してから小文字にします。\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\n// 文字列を小文字に変換\ntoLower('--FOO-BAR--');\n// Returns: '--foo-bar--'\n\ntoLower('Hello World');\n// Returns: 'hello world'\n\n// 数値を変換\ntoLower(123);\n// Returns: '123'\n\n// 配列を変換\ntoLower([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\ntoLower(null);\n// Returns: ''\n\ntoLower(undefined);\n// Returns: ''\n\ntoLower();\n// Returns: ''\n```\n\n#### パラメータ\n\n- `value` (`unknown`, オプション): 小文字に変換する値です。\n\n#### 戻り値\n\n(`string`): 小文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/toUpper.md",
    "content": "# toUpper (Lodash 互換性)\n\n::: warning JavaScriptの`String.prototype.toUpperCase`を使用してください\n\nこの`toUpper`関数は文字列以外の値の処理により動作が遅くなります。\n\n代わりに、より高速で現代的なJavaScriptの`String.prototype.toUpperCase`を使用してください。\n\n:::\n\n値を文字列に変換した後、大文字に変換します。\n\n```typescript\nconst uppercased = toUpper(value);\n```\n\n## 使用法\n\n### `toUpper(value?)`\n\n値を大文字の文字列に変換したい場合は`toUpper`を使用してください。どんなタイプの値でも、まず文字列に変換してから大文字にします。\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\n// 文字列を大文字に変換\ntoUpper('--foo-bar--');\n// Returns: '--FOO-BAR--'\n\ntoUpper('Hello World');\n// Returns: 'HELLO WORLD'\n\n// 数値を変換\ntoUpper(123);\n// Returns: '123'\n\n// 配列を変換\ntoUpper([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null`や`undefined`は空文字列として処理されます。\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\ntoUpper(null);\n// Returns: ''\n\ntoUpper(undefined);\n// Returns: ''\n\ntoUpper();\n// Returns: ''\n```\n\n#### パラメータ\n\n- `value` (`unknown`, オプション): 大文字に変換する値です。\n\n#### 戻り値\n\n(`string`): 大文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/trim.md",
    "content": "# trim (Lodash 互換性)\n\n::: warning `es-toolkit` の `trim` を使用してください\n\nこの `trim` 関数は、`null` や `undefined` の処理、配列型の `chars` 処理などにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [trim](../../string/trim.md) を使用してください。\n\n:::\n\n文字列の先頭と末尾の空白または指定された文字を削除します。\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 使用法\n\n### `trim(str, chars)`\n\n文字列の先頭と末尾から空白または特定の文字を削除したい場合は `trim` を使用します。`chars` を指定しない場合は、先頭と末尾の空白のみが削除されます。\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\n// 先頭と末尾の空白を削除\ntrim('  hello  ');\n// 戻り値: 'hello'\n\n// 指定された文字を削除\ntrim('--hello--', '-');\n// 戻り値: 'hello'\n\n// 配列で複数の文字を削除\ntrim('##hello##', ['#', 'o']);\n// 戻り値: 'hell'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\ntrim(null); // ''\ntrim(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): トリミングする文字列。\n- `chars` (`string`, オプション): 削除する文字。指定しない場合は空白が削除されます。\n\n#### 戻り値\n\n(`string`): 先頭と末尾から指定された文字が削除された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/trimEnd.md",
    "content": "# trimEnd (Lodash 互換性)\n\n::: warning `es-toolkit` の `trimEnd` を使用してください\n\nこの `trimEnd` 関数は、`null` や `undefined` の処理、パラメータの順序変更などにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [trimEnd](../../string/trimEnd.md) を使用してください。\n\n:::\n\n文字列の末尾の空白または指定された文字を削除します。\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 使用法\n\n### `trimEnd(str, chars)`\n\n文字列の末尾から空白または特定の文字を削除したい場合は `trimEnd` を使用します。`chars` を指定しない場合は、末尾の空白のみが削除されます。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\n// 末尾の空白を削除\ntrimEnd('  abc  ');\n// 戻り値: '  abc'\n\n// 指定された文字を削除\ntrimEnd('-_-abc-_-', '_-');\n// 戻り値: '-_-abc'\n\n// 文字列の末尾にのみ適用\ntrimEnd('abc', 'a');\n// 戻り値: 'abc'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\ntrimEnd(null); // ''\ntrimEnd(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): 末尾をトリミングする文字列。\n- `chars` (`string`, オプション): 削除する文字。指定しない場合は空白が削除されます。\n\n#### 戻り値\n\n(`string`): 末尾から指定された文字が削除された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/trimStart.md",
    "content": "# trimStart (Lodash 互換性)\n\n::: warning `es-toolkit` の `trimStart` を使用してください\n\nこの `trimStart` 関数は、`null` や `undefined` の処理、パラメータの順序変更などにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [trimStart](../../string/trimStart.md) を使用してください。\n\n:::\n\n文字列の先頭の空白または指定された文字を削除します。\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 使用法\n\n### `trimStart(str, chars)`\n\n文字列の先頭から空白または特定の文字を削除したい場合は `trimStart` を使用します。`chars` を指定しない場合は、先頭の空白のみが削除されます。\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\n// 先頭の空白を削除\ntrimStart('  abc  ');\n// 戻り値: 'abc  '\n\n// 指定された文字を削除\ntrimStart('-_-abc-_-', '_-');\n// 戻り値: 'abc-_-'\n\n// 文字列の先頭にのみ適用\ntrimStart('abc', 'c');\n// 戻り値: 'abc'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\ntrimStart(null); // ''\ntrimStart(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): 先頭をトリミングする文字列。\n- `chars` (`string`, オプション): 削除する文字。指定しない場合は空白が削除されます。\n\n#### 戻り値\n\n(`string`): 先頭から指定された文字が削除された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/truncate.md",
    "content": "# truncate (Lodash 互換性)\n\n::: warning JavaScript の `String.prototype.slice` を使用してください\n\nこの `truncate` 関数は、複雑な Unicode 処理と正規表現チェックにより動作が遅くなります。\n\n代わりに、より高速でモダンな JavaScript の `String.prototype.slice` を使用してください。\n\n:::\n\n文字列が指定された最大長より長い場合、切り詰めて省略文字列を追加します。\n\n```typescript\nconst truncated = truncate(str, options);\n```\n\n## 使用法\n\n### `truncate(string, options?)`\n\n長い文字列を指定された長さに切り詰めたい場合は `truncate` を使用します。切り詰められた部分は省略文字列(デフォルト: `\"...\"`)に置き換えられます。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 基本的な使用法 (最大30文字)\ntruncate('hi-diddly-ho there, neighborino');\n// 戻り値: 'hi-diddly-ho there, neighbo...'\n\n// 長さを指定\ntruncate('hi-diddly-ho there, neighborino', { length: 24 });\n// 戻り値: 'hi-diddly-ho there, n...'\n\n// 省略文字列を変更\ntruncate('hi-diddly-ho there, neighborino', { omission: ' [...]' });\n// 戻り値: 'hi-diddly-ho there, neig [...]'\n```\n\nセパレーターを指定すると、その位置で切り詰めることができます。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 空白セパレーターで単語境界で切り詰め\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: ' ',\n});\n// 戻り値: 'hi-diddly-ho there,...'\n\n// 正規表現でセパレーターを指定\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: /,? +/,\n});\n// 戻り値: 'hi-diddly-ho there...'\n```\n\nUnicode 文字も正しく処理されます。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\ntruncate('¥§✈✉🤓', { length: 5 });\n// 戻り値: '¥§✈✉🤓'\n\ntruncate('¥§✈✉🤓', { length: 4, omission: '…' });\n// 戻り値: '¥§✈…'\n```\n\n#### パラメータ\n\n- `string` (`string`, オプション): 切り詰める文字列。\n- `options` (`object`, オプション): オプションオブジェクト。\n  - `options.length` (`number`, オプション): 最大文字列長。デフォルトは `30`。\n  - `options.omission` (`string`, オプション): テキストが省略されたことを示す文字列。デフォルトは `'...'`。\n  - `options.separator` (`RegExp | string`, オプション): 切り詰める位置を決定するセパレーターパターン。\n\n#### 戻り値\n\n(`string`): 切り詰められた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/unescape.md",
    "content": "# unescape (Lodash 互換性)\n\n::: warning `es-toolkit` の `unescape` を使用してください\n\nこの `unescape` 関数は、`null` や `undefined` の処理のための変換ロジックにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [unescape](../../string/unescape.md) を使用してください。\n\n:::\n\nHTML エンティティを元の文字に変換します。\n\n```typescript\nconst unescaped = unescape(str);\n```\n\n## 使用法\n\n### `unescape(str)`\n\nHTML エンティティ `&amp;`、`&lt;`、`&gt;`、`&quot;`、`&#39;` を元の文字に戻したい場合は `unescape` を使用します。これは `escape` 関数の逆の操作です。\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\n// HTML タグをアンエスケープ\nunescape('This is a &lt;div&gt; element.');\n// 戻り値: 'This is a <div> element.'\n\n// 引用符をアンエスケープ\nunescape('This is a &quot;quote&quot;');\n// 戻り値: 'This is a \"quote\"'\n\n// アポストロフィをアンエスケープ\nunescape('This is a &#39;quote&#39;');\n// 戻り値: 'This is a 'quote''\n\n// アンパサンドをアンエスケープ\nunescape('This is a &amp; symbol');\n// 戻り値: 'This is a & symbol'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\nunescape(null); // ''\nunescape(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): アンエスケープする文字列。\n\n#### 戻り値\n\n(`string`): HTML エンティティが元の文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/upperCase.md",
    "content": "# upperCase (Lodash 互換性)\n\n::: warning `es-toolkit` の `upperCase` を使用してください\n\nこの `upperCase` 関数は、`null` や `undefined` の処理のための正規化ロジックにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [upperCase](../../string/upperCase.md) を使用してください。\n\n:::\n\n文字列をアッパーケースに変換します。\n\n```typescript\nconst upperCased = upperCase(str);\n```\n\n## 使用法\n\n### `upperCase(str)`\n\n文字列をアッパーケース (UPPER CASE) に変換したい場合は `upperCase` を使用します。アッパーケースは、各単語を大文字で書き、スペースで接続する命名規則です。\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\n// キャメルケースを変換\nupperCase('camelCase');\n// 戻り値: 'CAMEL CASE'\n\n// スペース区切りの文字列を変換\nupperCase('some whitespace');\n// 戻り値: 'SOME WHITESPACE'\n\n// ハイフン区切りの文字列を変換\nupperCase('hyphen-text');\n// 戻り値: 'HYPHEN TEXT'\n\n// 大文字が連続して現れる場合\nupperCase('HTTPRequest');\n// 戻り値: 'HTTP REQUEST'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\nupperCase(null); // ''\nupperCase(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): アッパーケースに変換する文字列。\n\n#### 戻り値\n\n(`string`): アッパーケースに変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/upperFirst.md",
    "content": "# upperFirst (Lodash 互換性)\n\n::: warning `es-toolkit` の `upperFirst` を使用してください\n\nこの `upperFirst` 関数は、`null` や `undefined` の処理のための変換ロジックにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [upperFirst](../../string/upperFirst.md) を使用してください。\n\n:::\n\n文字列の最初の文字を大文字に変換します。\n\n```typescript\nconst upperCased = upperFirst(str);\n```\n\n## 使用法\n\n### `upperFirst(str)`\n\n文字列の最初の文字のみを大文字にしたい場合は `upperFirst` を使用します。残りの文字はそのまま保持されます。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\n// 小文字で始まる文字列\nupperFirst('fred');\n// 戻り値: 'Fred'\n\n// すでに大文字で始まる文字列\nupperFirst('Fred');\n// 戻り値: 'Fred'\n\n// すべて大文字の文字列\nupperFirst('FRED');\n// 戻り値: 'FRED'\n```\n\n`null` または `undefined` は空文字列として扱われます。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\nupperFirst(null); // ''\nupperFirst(undefined); // ''\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): 最初の文字を大文字に変換する文字列。\n\n#### 戻り値\n\n(`string`): 最初の文字が大文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/string/words.md",
    "content": "# words (Lodash 互換性)\n\n::: warning `es-toolkit` の `words` を使用してください\n\nこの `words` 関数は、`null` や `undefined` の処理、複雑な Unicode サポートなどにより動作が遅くなります。\n\n代わりに、より高速でモダンな `es-toolkit` の [words](../../string/words.md) を使用してください。\n\n:::\n\n文字列を単語の配列に分割します。\n\n```typescript\nconst wordArray = words(str, pattern);\n```\n\n## 使用法\n\n### `words(str, pattern)`\n\n文字列を単語単位で分割したい場合は `words` を使用します。デフォルトでは、英字、数字、絵文字などを認識して単語を抽出します。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 基本的な単語抽出\nwords('fred, barney, & pebbles');\n// 戻り値: ['fred', 'barney', 'pebbles']\n\n// キャメルケースから単語を抽出\nwords('camelCaseWord');\n// 戻り値: ['camel', 'Case', 'Word']\n\n// 数字を含む文字列\nwords('hello123world');\n// 戻り値: ['hello', '123', 'world']\n```\n\nカスタムパターンを使用して単語を抽出することもできます。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 正規表現を使用した単語抽出\nwords('hello world', /\\w+/g);\n// 戻り値: ['hello', 'world']\n\n// 文字列パターンを使用\nwords('one-two-three', '-');\n// 戻り値: ['-']\n```\n\n`null` または `undefined` は空の配列として扱われます。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\nwords(null); // []\nwords(undefined); // []\n```\n\n#### パラメータ\n\n- `str` (`string`, オプション): 単語に分割する文字列。\n- `pattern` (`RegExp | string`, オプション): 単語にマッチするパターン。デフォルトは組み込みの Unicode 単語パターン。\n\n#### 戻り値\n\n(`string[]`): 抽出された単語の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/bindAll.md",
    "content": "# bindAll (Lodash 互換性)\n\nオブジェクトのメソッドをオブジェクト自身にバインドします。\n\n```typescript\nconst boundObject = bindAll(object, methodNames);\n```\n\n## 使用法\n\n### `bindAll(object, ...methodNames)`\n\nオブジェクトの特定のメソッドの`this`値を該当オブジェクトに固定したい時に`bindAll`を使用してください。イベントハンドラーやコールバック関数としてメソッドを渡す際に`this`コンテキストを維持するのに役立ちます。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst view = {\n  label: 'docs',\n  click: function () {\n    console.log('clicked ' + this.label);\n  },\n};\n\n// メソッドをオブジェクトにバインド\nbindAll(view, 'click');\ndocument.addEventListener('click', view.click);\n// => クリック時 'clicked docs' 出力\n```\n\n複数のメソッドを一度にバインドできます。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  name: 'example',\n  greet() {\n    return `Hello, ${this.name}!`;\n  },\n  farewell() {\n    return `Goodbye, ${this.name}!`;\n  },\n};\n\n// 配列で複数のメソッドをバインド\nbindAll(obj, ['greet', 'farewell']);\n\nconst greet = obj.greet;\ngreet(); // 'Hello, example!' (thisが正しくバインドされました)\n```\n\n数値や特殊キーも処理できます。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  '-0': function () {\n    return 'negative zero';\n  },\n  '0': function () {\n    return 'zero';\n  },\n};\n\nbindAll(obj, -0);\nobj['-0'](); // 'negative zero'\n```\n\n#### パラメータ\n\n- `object` (`Object`): メソッドをバインドするオブジェクトです。\n- `methodNames` (`...(string | string[] | number | IArguments)`): バインドするメソッド名です。個別の文字列、配列、数値、Arguments オブジェクトで指定できます。\n\n#### 戻り値\n\n(`Object`): メソッドがバインドされた元のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/cond.md",
    "content": "# cond (Lodash 互換性)\n\n::: warning if-else文やswitch文を使用してください\n\nこの`cond`関数は複雑なiteratee処理、配列変換、関数検証などにより動作が遅くなります。\n\n代わりにより高速で明確なif-else文やswitch文を使用してください。\n\n:::\n\n条件と関数のペアの配列を受け取り、条件を順序に確認して最初に真となる条件に対応する関数を実行する関数を作成します。\n\n```typescript\nconst conditionFunction = cond(pairs);\n```\n\n## 使用法\n\n### `cond(pairs)`\n\n複数の条件を順序に確認しながら最初に真となる条件に対応する関数を実行したい時に`cond`を使用してください。複雑な条件分岐ロジックを関数型で表現する際に役立ちます。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst getValue = cond([\n  [x => x > 10, x => 'big'],\n  [x => x > 5, x => 'medium'],\n  [x => x > 0, x => 'small'],\n  [() => true, () => 'zero or negative'],\n]);\n\nconsole.log(getValue(15)); // \"big\"\nconsole.log(getValue(8)); // \"medium\"\nconsole.log(getValue(3)); // \"small\"\nconsole.log(getValue(-1)); // \"zero or negative\"\n```\n\nオブジェクトパターンマッチングにも活用できます。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst processUser = cond([\n  [user => user.role === 'admin', user => `管理者: ${user.name}`],\n  [user => user.role === 'user', user => `ユーザー: ${user.name}`],\n  [user => user.role === 'guest', user => `ゲスト: ${user.name}`],\n  [() => true, () => '不明な役割'],\n]);\n\nconsole.log(processUser({ name: '田中太郎', role: 'admin' })); // \"管理者: 田中太郎\"\nconsole.log(processUser({ name: '佐藤花子', role: 'user' })); // \"ユーザー: 佐藤花子\"\n```\n\n最初に真となる条件のみが実行され、すべての条件が偽の場合は`undefined`を返します。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst checkValue = cond([\n  [x => x > 10, x => 'greater than 10'],\n  [x => x < 5, x => 'less than 5'],\n]);\n\nconsole.log(checkValue(15)); // \"greater than 10\"\nconsole.log(checkValue(3)); // \"less than 5\"\nconsole.log(checkValue(7)); // undefined (条件に合致しません)\n```\n\n#### パラメータ\n\n- `pairs` (`Array<[predicate, func]>`): 条件関数と実行する関数のペアからなる配列です。\n\n#### 戻り値\n\n(`(...args: any[]) => unknown`): 条件を確認して最初に真となる条件に対応する関数を実行する新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/constant.md",
    "content": "# constant (Lodash 互換性)\n\n::: warning アロー関数を使用してください\n\nこの`constant`関数は単純な作業のために追加の関数ラッパーを作成し、不要なオーバーヘッドが発生します。\n\n代わりにより簡単で直感的なアロー関数を使用してください。\n\n:::\n\n与えられた値を常に返す関数を作成します。\n\n```typescript\nconst constantFunction = constant(value);\n```\n\n## 使用法\n\n### `constant(value)`\n\n特定の値を常に返す関数が必要な時に`constant`を使用してください。関数型プログラミングでデフォルト値を提供したりコールバック関数として使用する際に役立ちます。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconst always42 = constant(42);\nconsole.log(always42()); // 42\n\nconst alwaysHello = constant('hello');\nconsole.log(alwaysHello()); // \"hello\"\n```\n\n配列のmapや他の高階関数と一緒に使用する際に便利です。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// すべての要素を0で埋める\nconst numbers = [1, 2, 3, 4, 5];\nconst zeros = numbers.map(constant(0));\nconsole.log(zeros); // [0, 0, 0, 0, 0]\n\n// すべての要素を同じオブジェクトに変更\nconst users = ['alice', 'bob', 'charlie'];\nconst defaultUser = users.map(constant({ role: 'user', active: true }));\nconsole.log(defaultUser);\n// [{ role: 'user', active: true }, { role: 'user', active: true }, { role: 'user', active: true }]\n```\n\n条件付きデフォルト値の提供にも活用できます。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nfunction processData(data, fallback = constant('デフォルト値')) {\n  return data || fallback();\n}\n\nconsole.log(processData(null)); // \"デフォルト値\"\nconsole.log(processData('実際のデータ')); // \"実際のデータ\"\n```\n\nオブジェクト参照を維持します。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nconst getObj = constant(obj);\n\nconsole.log(getObj() === obj); // true (同じオブジェクト参照)\n```\n\n#### パラメータ\n\n- `value` (`T`, オプション): 関数が返す値です。提供しなければ`undefined`を返します。\n\n#### 戻り値\n\n(`() => T | undefined`): 与えられた値を常に返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/defaultTo.md",
    "content": "# defaultTo (Lodash 互換性)\n\n`null`、`undefined`、`NaN`の値に対してデフォルト値を返します。\n\n```typescript\nconst result = defaultTo(value, defaultValue);\n```\n\n## 使用法\n\n### `defaultTo(value, defaultValue)`\n\n値が`null`、`undefined`、または`NaN`の時にデフォルト値を提供したい時に`defaultTo`を使用してください。APIレスポンスやユーザー入力で無効な値を処理する際に役立ちます。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\n// 基本的な使用法\nconsole.log(defaultTo(null, 'default')); // 'default'\nconsole.log(defaultTo(undefined, 'default')); // 'default'\nconsole.log(defaultTo(NaN, 0)); // 0\nconsole.log(defaultTo('actual', 'default')); // 'actual'\nconsole.log(defaultTo(123, 0)); // 123\n```\n\nAPIレスポンス処理に活用できます。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nfunction processUserData(response) {\n  return {\n    name: defaultTo(response.name, '名前なし'),\n    age: defaultTo(response.age, 0),\n    score: defaultTo(response.score, 0), // NaN処理も含む\n  };\n}\n\n// APIが不完全なデータを返す場合\nconst userData = processUserData({\n  name: null,\n  age: undefined,\n  score: NaN,\n});\n\nconsole.log(userData);\n// { name: '名前なし', age: 0, score: 0 }\n```\n\n配列やオブジェクトにも使用できます。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nconst users = defaultTo(response.users, []);\nconst metadata = defaultTo(response.metadata, {});\n\n// 空の配列やオブジェクトではなくnull/undefined/NaNのみを処理します\nconsole.log(defaultTo([], ['default'])); // [] (空の配列ですが有効な値)\nconsole.log(defaultTo({}, { default: true })); // {} (空のオブジェクトですが有効な値)\n```\n\n#### パラメータ\n\n- `value` (`T | null | undefined`): 確認する値です。\n- `defaultValue` (`D`): 値が`null`、`undefined`または`NaN`の場合に返すデフォルト値です。\n\n#### 戻り値\n\n(`T | D`): 値が有効であれば元の値を、そうでなければデフォルト値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/eq.md",
    "content": "# eq (Lodash 互換性)\n\n二つの値がSameValueZero比較方式で同等かどうかを確認します。\n\n```typescript\nconst isEqual = eq(value, other);\n```\n\n## 使用法\n\n### `eq(value, other)`\n\n二つの値が同等かどうかを確認したい時に`eq`を使用してください。一般的な`===`比較とは異なり、`NaN`同士の比較で`true`を返します。\n\n```typescript\nimport { eq } from 'es-toolkit/compat';\n\n// 基本使用法\nconsole.log(eq(1, 1)); // true\nconsole.log(eq(0, -0)); // true (SameValueZeroでは0と-0を同じとみなす)\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq('a', 'a')); // true\nconsole.log(eq('a', 'b')); // false\n```\n\n`Object.is()`とは異なって動作します。\n\n```typescript\n// eq 使用\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq(0, -0)); // true\n\n// Object.is 使用 (より高速)\nconsole.log(Object.is(NaN, NaN)); // true\nconsole.log(Object.is(0, -0)); // false (Object.isは0と-0を異なるとみなす)\n\n// === 使用\nconsole.log(NaN === NaN); // false\nconsole.log(0 === -0); // true\n```\n\n#### パラメータ\n\n- `value` (`any`): 比較する最初の値です。\n- `other` (`any`): 比較する二番目の値です。\n\n#### 戻り値\n\n(`boolean`): 二つの値が同等であれば`true`を、そうでなければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/gt.md",
    "content": "# gt (Lodash 互換性)\n\n::: warning `>` 演算子を使用してください\n\nこの `gt` 関数は `toNumber` 関数呼び出しと文字列型確認などの追加処理により遅く動作します。\n\n代わりに、より高速で現代的な `>` 演算子を使用してください。\n\n:::\n\n値が他の値より大きいかどうかを確認します。\n\n```typescript\nconst result = gt(value, other);\n```\n\n## 使用法\n\n### `gt(value, other)`\n\n二つの値を比較して最初の値が二番目の値より大きいかどうかを確認したい時に`gt`を使用してください。文字列同士は辞書順で比較し、他の型は数値に変換して比較します。\n\n```typescript\nimport { gt } from 'es-toolkit/compat';\n\ngt(3, 1);\n// Returns: true\n\ngt(3, 3);\n// Returns: false\n\ngt(1, 3);\n// Returns: false\n\n// 文字列比較 (辞書順)\ngt('def', 'abc');\n// Returns: true\n\ngt('abc', 'def');\n// Returns: false\n\n// 他の型は数値に変換されて比較\ngt('10', 5);\n// Returns: true (10 > 5)\n\ngt(1, null);\n// Returns: true (1 > 0)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 比較する最初の値です。\n- `other` (`unknown`): 比較する二番目の値です。\n\n#### 戻り値\n\n(`boolean`): 最初の値が二番目の値より大きければ`true`、そうでなければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/gte.md",
    "content": "# gte (Lodash 互換性)\n\n::: warning `>=` 演算子を使用してください\n\nこの `gte` 関数は `toNumber` 関数呼び出しと文字列型確認などの追加処理により遅く動作します。\n\n代わりに、より高速で現代的な `>=` 演算子を使用してください。\n\n:::\n\n値が他の値より大きいか等しいかどうかを確認します。\n\n```typescript\nconst result = gte(value, other);\n```\n\n## 使用法\n\n### `gte(value, other)`\n\n二つの値を比較して最初の値が二番目の値より大きいか等しいかどうかを確認したい時に`gte`を使用してください。文字列同士は辞書順で比較し、他の型は数値に変換して比較します。\n\n```typescript\nimport { gte } from 'es-toolkit/compat';\n\ngte(3, 1);\n// Returns: true\n\ngte(3, 3);\n// Returns: true\n\ngte(1, 3);\n// Returns: false\n\n// 文字列比較 (辞書順)\ngte('def', 'abc');\n// Returns: true\n\ngte('abc', 'def');\n// Returns: false\n\n// 他の型は数値に変換されて比較\ngte('10', 5);\n// Returns: true (10 >= 5)\n\ngte(1, null);\n// Returns: true (1 >= 0)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 比較する最初の値です。\n- `other` (`unknown`): 比較する二番目の値です。\n\n#### 戻り値\n\n(`boolean`): 最初の値が二番目の値より大きいか等しければ`true`、そうでなければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/invoke.md",
    "content": "# invoke (Lodash 互換性)\n\n::: warning 直接メソッドを呼び出してください\n\nこの `invoke` 関数はパス解析、オブジェクト探索、`get` 関数呼び出しなどの複雑な処理により遅く動作します。\n\n代わりに、より高速で現代的な直接メソッド呼び出しを使用してください。\n\n:::\n\nオブジェクトのパスにあるメソッドを与えられた引数で呼び出します。\n\n```typescript\nconst result = invoke(object, path, args);\n```\n\n## 使用法\n\n### `invoke(object, path, args)`\n\nオブジェクトの特定のパスにあるメソッドを引数と一緒に呼び出したい時に`invoke`を使用してください。パスはドット表記文字列やプロパティキー配列で指定できます。\n\n```typescript\nimport { invoke } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// ドット表記でパス指定\ninvoke(object, 'a.b', [1, 2]);\n// Returns: 3\n\n// 配列でパス指定\ninvoke(object, ['a', 'b'], [1, 2]);\n// Returns: 3\n\n// 存在しないパス\ninvoke(object, 'a.c.d', [1, 2]);\n// Returns: undefined\n\n// 様々な型の引数\nconst obj = {\n  calculate: {\n    sum: function (...numbers) {\n      return numbers.reduce((a, b) => a + b, 0);\n    },\n    multiply: function (a, b) {\n      return a * b;\n    },\n  },\n};\n\ninvoke(obj, 'calculate.sum', [1, 2, 3, 4]);\n// Returns: 10\n\ninvoke(obj, ['calculate', 'multiply'], [5, 6]);\n// Returns: 30\n```\n\n#### パラメータ\n\n- `object` (`unknown`): メソッドを呼び出すオブジェクトです。\n- `path` (`PropertyKey | PropertyKey[]`): 呼び出すメソッドのパスです。文字列、シンボル、数値やこれらの配列にできます。\n- `args` (`any[]`): メソッドを呼び出す時に使用する引数配列です。\n\n#### 戻り値\n\n(`any`): 呼び出されたメソッドの結果を返します。メソッドが存在しなければ`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/iteratee.md",
    "content": "# iteratee (Lodash 互換性)\n\n::: warning 直接的な関数やプロパティアクセスを使用してください\n\nこの `iteratee` 関数は複雑な型変換と様々なケース処理により遅く動作します。\n\n代わりに、より高速で現代的な直接的な関数やプロパティアクセスを使用してください。\n\n:::\n\n要素から値を返す関数を作ります。\n\n```typescript\nconst getter = iteratee(source);\n```\n\n## 使用法\n\n### `iteratee(value?)`\n\nコレクションの要素から値を抽出したり条件を確認する関数を作りたい時に`iteratee`を使用してください。提供する引数の型によって異なる動作を実行します。\n\n```typescript\nimport { iteratee } from 'es-toolkit/compat';\n\n// 関数: 与えられた関数をそのまま返す\nconst func = iteratee(object => object.a);\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(func);\n// Returns: [1, 2, 3]\n\n// プロパティ名: そのプロパティの値を返す関数\nconst getA = iteratee('a');\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(getA);\n// Returns: [1, 2, 3]\n\n// オブジェクト: 与えられたオブジェクトと一致するかを確認する関数\nconst matchesObj = iteratee({ a: 1 });\n[\n  { a: 1, b: 2 },\n  { a: 2, b: 3 },\n  { a: 1, c: 4 },\n].find(matchesObj);\n// Returns: { a: 1, b: 2 }\n\n// プロパティ-値ペア: そのプロパティが特定の値と一致するかを確認する関数\nconst matchesProperty = iteratee(['a', 1]);\n[{ a: 1 }, { a: 2 }, { a: 3 }].find(matchesProperty);\n// Returns: { a: 1 }\n\n// nullや引数なし: 要素をそのまま返す関数\nconst identity = iteratee();\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(identity);\n// Returns: [{ a: 1 }, { a: 2 }, { a: 3 }]\n```\n\n引数の種類による動作:\n\n- **関数**: 与えられた関数をそのまま返します。\n- **プロパティ名**: 要素から与えられたプロパティの値を返します。\n- **プロパティ-値ペア**: 要素のプロパティが与えられた値と一致するかどうかを示すブール値を返します。\n- **部分オブジェクト**: 要素が部分オブジェクトのプロパティと値に一致するかどうかを示すブール値を返します。\n- **nullや引数なし**: 要素をそのまま返す関数を返します。\n\n#### パラメータ\n\n- `value` (`symbol | number | string | object | null | ((...args: any[]) => unknown)`, オプション): イテレータに変換する値です。デフォルト値は`null`です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 新しいイテレータ関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/lt.md",
    "content": "# lt (Lodash 互換性)\n\n::: warning `<` 演算子を使用してください\n\nこの `lt` 関数は `toNumber` 関数呼び出しと文字列型確認などの追加処理により遅く動作します。\n\n代わりに、より高速で現代的な `<` 演算子を使用してください。\n\n:::\n\n値が他の値より小さいかどうかを確認します。\n\n```typescript\nconst result = lt(value, other);\n```\n\n## 使用法\n\n### `lt(value, other)`\n\n二つの値を比較して最初の値が二番目の値より小さいかどうかを確認したい時に`lt`を使用してください。文字列同士は辞書順で比較し、他の型は数値に変換して比較します。\n\n```typescript\nimport { lt } from 'es-toolkit/compat';\n\nlt(1, 3);\n// Returns: true\n\nlt(3, 3);\n// Returns: false\n\nlt(3, 1);\n// Returns: false\n\n// 文字列比較 (辞書順)\nlt('abc', 'def');\n// Returns: true\n\nlt('def', 'abc');\n// Returns: false\n\n// 他の型は数値に変換されて比較\nlt('5', 10);\n// Returns: true (5 < 10)\n\nlt(null, 1);\n// Returns: true (0 < 1)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 比較する最初の値です。\n- `other` (`unknown`): 比較する二番目の値です。\n\n#### 戻り値\n\n(`boolean`): 最初の値が二番目の値より小さければ`true`、そうでなければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/lte.md",
    "content": "# lte (Lodash 互換性)\n\n::: warning `<=` 演算子を使用してください\n\nこの `lte` 関数は `toNumber` 関数呼び出しと文字列型確認などの追加処理により遅く動作します。\n\n代わりに、より高速で現代的な `<=` 演算子を使用してください。\n\n:::\n\n値が他の値より小さいか等しいかどうかを確認します。\n\n```typescript\nconst result = lte(value, other);\n```\n\n## 使用法\n\n### `lte(value, other)`\n\n二つの値を比較して最初の値が二番目の値より小さいか等しいかどうかを確認したい時に`lte`を使用してください。文字列同士は辞書順で比較し、他の型は数値に変換して比較します。\n\n```typescript\nimport { lte } from 'es-toolkit/compat';\n\nlte(1, 3);\n// Returns: true\n\nlte(3, 3);\n// Returns: true\n\nlte(3, 1);\n// Returns: false\n\n// 文字列比較 (辞書順)\nlte('abc', 'def');\n// Returns: true\n\nlte('def', 'abc');\n// Returns: false\n\n// 他の型は数値に変換されて比較\nlte('10', 5);\n// Returns: false (10 <= 5)\n\nlte(null, 0);\n// Returns: true (0 <= 0)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 比較する最初の値です。\n- `other` (`unknown`): 比較する二番目の値です。\n\n#### 戻り値\n\n(`boolean`): 最初の値が二番目の値より小さいか等しければ`true`、そうでなければ`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/method.md",
    "content": "# method (Lodash 互換性)\n\n指定されたパスのメソッドを引数と一緒に呼び出す関数を作ります。\n\n```typescript\nconst methodFunc = method(path, ...args);\n```\n\n## 使用法\n\n### `method(path, ...args)`\n\nオブジェクトで特定のパスのメソッドを事前に定義された引数と一緒に呼び出す関数を生成します。関数型プログラミングでメソッド呼び出しを再利用したり配列の`map`などで便利です。\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// メソッド呼び出し関数を作る\nconst add = method('a.b', 1, 2);\nconsole.log(add(object)); // => 3\n\n// 配列で各オブジェクトのメソッドを呼び出す\nconst objects = [{ calc: { sum: (a, b) => a + b } }, { calc: { sum: (a, b) => a * b } }];\n\nconst calculate = method('calc.sum', 5, 3);\nobjects.map(calculate); // => [8, 15]\n```\n\nネストしたパスも処理できます。\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst obj = {\n  users: {\n    getName: function (prefix) {\n      return prefix + this.name;\n    },\n    name: 'John',\n  },\n};\n\nconst getUserName = method('users.getName', 'Mr. ');\ngetUserName(obj); // => 'Mr. John'\n```\n\n#### パラメータ\n\n- `path` (`PropertyKey | PropertyKey[]`): 呼び出すメソッドのパスです。\n- `...args` (`any[]`): メソッドに渡す引数です。\n\n#### 戻り値\n\n(`(object: any) => any`): オブジェクトを受け取って指定されたパスのメソッドを引数と一緒に呼び出す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/methodOf.md",
    "content": "# methodOf (Lodash 互換性)\n\n与えられたオブジェクトからパスを受け取ってメソッドを引数と一緒に呼び出す関数を作ります。\n\n```typescript\nconst pathInvoker = methodOf(object, ...args);\n```\n\n## 使用法\n\n### `methodOf(object, ...args)`\n\n特定のオブジェクトのメソッドを事前に定義された引数と一緒に呼び出す関数を生成します。`method`とは逆にオブジェクトは固定してパスを後で指定する時に便利です。\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// オブジェクトと引数を事前にバインドする\nconst callMethod = methodOf(object, 1, 2);\nconsole.log(callMethod('a.b')); // => 3\n\n// 複数のパスに対して同じオブジェクトと引数で呼び出す\nconst calculator = {\n  add: (a, b) => a + b,\n  multiply: (a, b) => a * b,\n  subtract: (a, b) => a - b,\n};\n\nconst compute = methodOf(calculator, 10, 5);\nconsole.log(compute('add')); // => 15\nconsole.log(compute('multiply')); // => 50\nconsole.log(compute('subtract')); // => 5\n```\n\nネストしたオブジェクトでも使用できます。\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst data = {\n  users: {\n    findById: function (id) {\n      return `User ${id}`;\n    },\n    findByName: function (name) {\n      return `Found ${name}`;\n    },\n  },\n};\n\nconst userFinder = methodOf(data, 'john');\nuserFinder('users.findById'); // => 'User john'\nuserFinder('users.findByName'); // => 'Found john'\n```\n\n#### パラメータ\n\n- `object` (`object`): メソッドを呼び出すオブジェクトです。\n- `...args` (`any[]`): メソッドに渡す引数です。\n\n#### 戻り値\n\n(`(path: PropertyKey | PropertyKey[]) => any`): パスを受け取って指定されたオブジェクトのメソッドを引数と一緒に呼び出す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/now.md",
    "content": "# now (Lodash 互換性)\n\n::: warning `Date.now()`を使用してください\n\nこの `now` 関数は単純に`Date.now()`を呼び出すラッパー関数で不要な抽象化です。\n\n代わりに、より高速で直接的な`Date.now()`を使用してください。\n\n:::\n\n現在時刻をミリ秒単位で返します。\n\n```typescript\nconst currentTime = now();\n```\n\n## 使用法\n\n### `now()`\n\n1970年1月1日00:00:00 UTCから経過したミリ秒数を返します。時間測定やタイムスタンプ生成に便利です。\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\n// 現在時刻を取得する\nconst currentTime = now();\nconsole.log(currentTime); // => 1703925600000 (例)\n\n// 実行時間を測定する\nconst startTime = now();\n// 時間がかかる作業\nconst endTime = now();\nconsole.log(`作業時間: ${endTime - startTime}ms`);\n\n// タイムスタンプとして使用する\nconst timestamp = now();\nconst logMessage = `[${timestamp}] 作業完了`;\n```\n\n`Date.now()`と同じ結果を返します。\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\nconsole.log(now() === Date.now()); // => true (同じ時点で呼び出された場合)\n```\n\n#### パラメータ\n\nパラメータはありません。\n\n#### 戻り値\n\n(`number`): 1970年1月1日00:00:00 UTCから現在までのミリ秒数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/over.md",
    "content": "# over (Lodash互換性)\n\n::: warning 配列メソッドを直接使用してください\n\nこの`over`関数は、関数を配列にマッピングする過程で追加のオーバーヘッドが発生します。\n\n代わりに、より高速で現代的な配列の`map`メソッドを使用してください。\n\n:::\n\n与えられた関数に同じ引数を渡してそれぞれの結果を配列として返す関数を作成します。\n\n```typescript\nconst multiCall = over(funcs);\n```\n\n## 使用法\n\n### `over(...iteratees)`\n\n複数の関数を受け取って同じ引数でそれぞれを呼び出し、結果を配列として返す関数を生成します。同じデータで複数の計算を実行する場合に便利です。\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\n// 数学関数を一緒に使用します\nconst mathOperations = over([Math.max, Math.min]);\nmathOperations(1, 2, 3, 4);\n// => [4, 1]\n\n// 個別の関数として渡すこともできます\nconst operations = over(Math.max, Math.min);\noperations(1, 2, 3, 4);\n// => [4, 1]\n\n// オブジェクトのプロパティを抽出します\nconst getProperties = over(['name', 'age']);\ngetProperties({ name: 'John', age: 30 });\n// => ['John', 30]\n\n// 条件を検査します\nconst validators = over([\n  { name: 'John' }, // オブジェクトマッチング\n  { age: 30 },\n]);\nvalidators({ name: 'John', age: 30 });\n// => [true, true]\n```\n\nネストされたパスも処理できます。\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\nconst data = {\n  user: { name: 'John', profile: { age: 30 } },\n  settings: { theme: 'dark' },\n};\n\nconst getInfo = over(['user.name', 'user.profile.age', 'settings.theme']);\ngetInfo(data);\n// => ['John', 30, 'dark']\n```\n\n#### パラメータ\n\n- `...iteratees` (`Array<Function | string | object | Array>`): 呼び出す関数またはプロパティパスです。配列として渡すか、個別の引数として渡すことができます。\n\n#### 戻り値\n\n(`(...args: any[]) => any[]`): 引数を受け取って各関数の結果を配列として返す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/overEvery.md",
    "content": "# overEvery (Lodash互換性)\n\n::: warning `Array.every`を使用してください\n\nこの`overEvery`関数は、条件関数を変換して検査する過程で追加のオーバーヘッドが発生します。\n\n代わりに、より高速で現代的な`Array.every`メソッドを使用してください。\n\n:::\n\nすべての条件関数が真と評価される値を返すかどうかを確認する関数を作成します。\n\n```typescript\nconst allValidator = overEvery(predicates);\n```\n\n## 使用法\n\n### `overEvery(...predicates)`\n\n複数の条件関数を受け取って与えられた値がすべての条件を満たすかどうかを確認する関数を生成します。複合条件検査やデータ検証に便利です。\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// 文字列の条件を検査します\nconst isValidString = overEvery([\n  value => typeof value === 'string',\n  value => value.length > 3,\n  value => value.includes('o'),\n]);\n\nisValidString('hello'); // => true\nisValidString('hi'); // => false (長さが3以下)\nisValidString('test'); // => false ('o'がない)\n\n// 数値範囲を検査します\nconst isInRange = overEvery([\n  num => num >= 0,\n  num => num <= 100,\n  num => num % 1 === 0, // 整数かどうかを確認\n]);\n\nisInRange(50); // => true\nisInRange(-5); // => false (0未満)\nisInRange(150); // => false (100超過)\nisInRange(50.5); // => false (整数ではない)\n```\n\nオブジェクトのプロパティも検査できます。\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// オブジェクトのプロパティを検査します\nconst isValidUser = overEvery([\n  'name', // nameプロパティが真と評価されるか\n  { age: 30 }, // ageが30か\n  ['active', true], // activeがtrueか\n]);\n\nisValidUser({ name: 'John', age: 30, active: true }); // => true\nisValidUser({ name: '', age: 30, active: true }); // => false (nameが空文字列)\nisValidUser({ name: 'John', age: 25, active: true }); // => false (ageが異なる)\n```\n\n#### パラメータ\n\n- `...predicates` (`Array<Function | string | object | Array>`): 検査する条件関数です。関数、プロパティ名、オブジェクト、プロパティ-値ペアなどになります。\n\n#### 戻り値\n\n(`(...args: any[]) => boolean`): すべての条件を満たせば`true`、一つでも満たさなければ`false`を返す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/overSome.md",
    "content": "# overSome (Lodash互換性)\n\n::: warning `Array.some`を使用してください\n\nこの`overSome`関数は、条件関数を変換して検査する過程で追加のオーバーヘッドが発生します。\n\n代わりに、より高速で現代的な`Array.some`メソッドを使用してください。\n\n:::\n\n条件関数のうち一つでも真と評価される値を返すかどうかを確認する関数を作成します。\n\n```typescript\nconst anyValidator = overSome(predicates);\n```\n\n## 使用法\n\n### `overSome(...predicates)`\n\n複数の条件関数を受け取って与えられた値が条件のうち一つでも満たすかどうかを確認する関数を生成します。柔軟な条件検査や代替検証に便利です。\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 文字列または数値かどうかを確認します\nconst isStringOrNumber = overSome([value => typeof value === 'string', value => typeof value === 'number']);\n\nisStringOrNumber('hello'); // => true\nisStringOrNumber(42); // => true\nisStringOrNumber(true); // => false\n\n// 複数の条件のうち一つでも満たすかどうかを確認します\nconst hasValidProperty = overSome([\n  obj => obj.name && obj.name.length > 0,\n  obj => obj.email && obj.email.includes('@'),\n  obj => obj.phone && obj.phone.length >= 10,\n]);\n\nhasValidProperty({ name: 'John' }); // => true\nhasValidProperty({ email: 'john@example.com' }); // => true\nhasValidProperty({ phone: '1234567890' }); // => true\nhasValidProperty({ age: 30 }); // => false\n```\n\nオブジェクトのプロパティも検査できます。\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 複数の条件のうち一つでもマッチするかどうかを確認します\nconst matchesAnyCondition = overSome([\n  'isActive', // isActiveプロパティが真と評価されるか\n  { role: 'admin' }, // roleが'admin'か\n  ['status', 'vip'], // statusが'vip'か\n]);\n\nmatchesAnyCondition({ isActive: true }); // => true\nmatchesAnyCondition({ role: 'admin' }); // => true\nmatchesAnyCondition({ status: 'vip' }); // => true\nmatchesAnyCondition({ role: 'user', status: 'normal' }); // => false\n```\n\n#### パラメータ\n\n- `...predicates` (`Array<Function | string | object | Array>`): 検査する条件関数です。関数、プロパティ名、オブジェクト、プロパティ-値ペアなどになります。\n\n#### 戻り値\n\n(`(...args: any[]) => boolean`): 条件のうち一つでも満たせば`true`、すべて満たさなければ`false`を返す関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/stubArray.md",
    "content": "# stubArray (Lodash 互換性)\n\n::: warning `[]`を直接使用してください\n\nこの `stubArray` 関数は単純に空の配列を返すラッパー関数で不要な抽象化です。\n\n代わりに、より高速で直接的な`[]`を使用してください。\n\n:::\n\n常に新しい空の配列を返します。\n\n```typescript\nconst emptyArray = stubArray();\n```\n\n## 使用法\n\n### `stubArray()`\n\n常に新しい空の配列を返す関数です。デフォルト値として空の配列が必要な時や関数型プログラミングで一貫した戻り値が必要な時に使用します。\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\n// 空の配列を返す\nconst emptyArray = stubArray();\nconsole.log(emptyArray); // => []\n\n// 配列メソッドでデフォルト値として使用する\nconst items = [1, 2, 3];\nconst result = items.filter(x => x > 5) || stubArray();\nconsole.log(result); // => []\n\n// 関数型プログラミングで使用する\nconst getData = () => stubArray();\nconst data = getData();\ndata.push('item'); // 新しい配列なので安全\n```\n\n毎回新しい配列インスタンスを返します。\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\nconst arr1 = stubArray();\nconst arr2 = stubArray();\n\nconsole.log(arr1 === arr2); // => false (異なるインスタンス)\nconsole.log(Array.isArray(arr1)); // => true\nconsole.log(arr1.length); // => 0\n```\n\n#### パラメータ\n\nパラメータはありません。\n\n#### 戻り値\n\n(`any[]`): 新しい空の配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/stubFalse.md",
    "content": "# stubFalse (Lodash 互換性)\n\n::: warning `false`を直接使用してください\n\nこの `stubFalse` 関数は単純に`false`を返すラッパー関数で不要な抽象化です。\n\n代わりに、より高速で直接的な`false`値を使用してください。\n\n:::\n\n常に`false`を返します。\n\n```typescript\nconst falseValue = stubFalse();\n```\n\n## 使用法\n\n### `stubFalse()`\n\n常に`false`を返す関数です。関数型プログラミングで一貫した偽値が必要な時や条件付きコールバックでデフォルト値として使用する時に便利です。\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\n// falseを返す\nconst result = stubFalse();\nconsole.log(result); // => false\n\n// 配列フィルタリングでデフォルト条件として使用する\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = numbers.filter(stubFalse); // すべての要素を除去\nconsole.log(evenNumbers); // => []\n\n// 関数型プログラミングで使用する\nconst isValid = condition => (condition ? someValidation : stubFalse);\nconst validator = isValid(false);\nconsole.log(validator()); // => false\n```\n\n毎回同じ`false`値を返します。\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\nconst result1 = stubFalse();\nconst result2 = stubFalse();\n\nconsole.log(result1 === result2); // => true\nconsole.log(typeof result1); // => 'boolean'\nconsole.log(result1); // => false\n```\n\n#### パラメータ\n\nパラメータはありません。\n\n#### 戻り値\n\n(`false`): 常に`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/stubObject.md",
    "content": "# stubObject (Lodash 互換性)\n\n::: warning `{}`を直接使用してください\n\nこの `stubObject` 関数は単純に空のオブジェクトを返すラッパー関数で不要な抽象化です。\n\n代わりに、より高速で直接的な`{}`を使用してください。\n\n:::\n\n常に新しい空のオブジェクトを返します。\n\n```typescript\nconst emptyObject = stubObject();\n```\n\n## 使用法\n\n### `stubObject()`\n\n常に新しい空のオブジェクトを返す関数です。デフォルト値として空のオブジェクトが必要な時や関数型プログラミングで一貫した戻り値が必要な時に使用します。\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\n// 空のオブジェクトを返す\nconst emptyObject = stubObject();\nconsole.log(emptyObject); // => {}\n\n// デフォルト値として使用する\nfunction processData(data = stubObject()) {\n  return { ...data, processed: true };\n}\n\nconsole.log(processData()); // => { processed: true }\nconsole.log(processData({ name: 'John' })); // => { name: 'John', processed: true }\n\n// 関数型プログラミングで使用する\nconst createEmpty = () => stubObject();\nconst obj = createEmpty();\nobj.newProperty = 'value'; // 新しいオブジェクトなので安全\n```\n\n毎回新しいオブジェクトインスタンスを返します。\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\nconst obj1 = stubObject();\nconst obj2 = stubObject();\n\nconsole.log(obj1 === obj2); // => false (異なるインスタンス)\nconsole.log(typeof obj1); // => 'object'\nconsole.log(Object.keys(obj1).length); // => 0\n```\n\n#### パラメータ\n\nパラメータはありません。\n\n#### 戻り値\n\n(`any`): 新しい空のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/stubString.md",
    "content": "# stubString (Lodash 互換性)\n\n::: warning `''`を直接使用してください\n\nこの`stubString`関数は単純に空文字列を返すラッパー関数で不要な抽象化です。\n\n代わりにより高速で直接的な`''`を使用してください。\n\n:::\n\n常に空文字列を返します。\n\n```typescript\nconst emptyString = stubString();\n```\n\n## 使用法\n\n### `stubString()`\n\n常に空文字列を返す関数です。デフォルト値として空文字列が必要な場合や関数型プログラミングで一貫した戻り値が必要な時に使用します。\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\n// 空文字列を返します\nconst emptyString = stubString();\nconsole.log(emptyString); // => ''\n\n// デフォルト値として使用します\nfunction formatMessage(message = stubString()) {\n  return message || 'デフォルトメッセージ';\n}\n\nconsole.log(formatMessage()); // => 'デフォルトメッセージ'\nconsole.log(formatMessage('こんにちは')); // => 'こんにちは'\n\n// 関数型プログラミングで使用します\nconst createEmpty = () => stubString();\nconst str = createEmpty();\nconsole.log(str.length); // => 0\n```\n\n毎回同じ空文字列を返します。\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\nconst str1 = stubString();\nconst str2 = stubString();\n\nconsole.log(str1 === str2); // => true\nconsole.log(typeof str1); // => 'string'\nconsole.log(str1.length); // => 0\n```\n\n#### パラメータ\n\nなし。\n\n#### 戻り値\n\n(`string`): 常に空文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/stubTrue.md",
    "content": "# stubTrue (Lodash 互換性)\n\n::: warning `true`リテラルを使用してください\n\nこの`stubTrue`関数は不要な関数呼び出しにより動作が遅くなります。\n\n代わりにより高速で現代的な`true`リテラルを使用してください。\n\n:::\n\n常に`true`値を返します。\n\n```typescript\nconst result = stubTrue();\n```\n\n## 使用法\n\n### `stubTrue()`\n\n常に`true`値が必要なコールバック関数やデフォルト値として使用する時に`stubTrue`を使用してください。配列メソッドのフィルタリングや条件分岐ロジックで一貫した`true`値を提供する際に役立ちます。\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// 配列ですべての要素を保持するフィルター\nconst items = [1, 2, 3, 4, 5];\nconst allItems = items.filter(stubTrue);\nconsole.log(allItems); // [1, 2, 3, 4, 5]\n```\n\n条件付き設定でデフォルト値としても使用できます。\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// デフォルトで有効化されたオプション\nconst defaultOptions = {\n  enableFeatureA: stubTrue(),\n  enableFeatureB: stubTrue(),\n  enableFeatureC: stubTrue(),\n};\n\nconsole.log(defaultOptions); // { enableFeatureA: true, enableFeatureB: true, enableFeatureC: true }\n```\n\n#### パラメータ\n\nパラメータはありません。\n\n#### 戻り値\n\n(`boolean`): 常に`true`を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/times.md",
    "content": "# times (Lodash 互換性)\n\n指定された回数だけ関数を実行し、結果を配列として返します。\n\n```typescript\nconst result = times(n, iteratee);\n```\n\n## 使用法\n\n### `times(n, iteratee)`\n\n指定された回数だけ反復関数を実行し、結果を配列として返します。各反復で現在のインデックスを関数に渡します。\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\n// 0から2までのインデックスに2を掛けた値の配列\ntimes(3, i => i * 2);\n// Returns: [0, 2, 4]\n\n// 同じ値を複数回生成\ntimes(2, () => 'es-toolkit');\n// Returns: ['es-toolkit', 'es-toolkit']\n```\n\n関数を渡さない場合、インデックス配列を返します。\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\ntimes(3);\n// Returns: [0, 1, 2]\n```\n\n#### パラメータ\n\n- `n` (`number`): 反復する回数です。整数に変換され、1より小さいか安全でない整数の場合は空の配列を返します。\n- `iteratee` (`(num: number) => T`, オプション): 各反復で実行する関数です。インデックスを引数として受け取ります。提供しない場合はインデックスをそのまま返します。\n\n#### 戻り値\n\n(`T[]`): 各反復で実行した関数の結果からなる配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toArray.md",
    "content": "# toArray (Lodash 互換性)\n\n::: warning Object.valuesとArray.fromを使用してください\n\nこの`toArray`関数は複雑な型検証と様々な入力処理により遅く動作します。\n\n代わりにより高速で現代的なObject.valuesやArray.fromを使用してください。\n\n:::\n\n値を配列に変換します。\n\n```typescript\nconst array = toArray(value);\n```\n\n## 使用法\n\n### `toArray(value)`\n\n様々な値を配列に変換します。オブジェクトは値の配列に、配列のようなオブジェクトは配列に、その他は空の配列に変換します。\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\n// オブジェクトを値の配列に変換\ntoArray({ a: 1, b: 2 });\n// Returns: [1, 2]\n\n// 文字列を文字配列に変換\ntoArray('abc');\n// Returns: ['a', 'b', 'c']\n\n// Mapを値の配列に変換\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\ntoArray(map);\n// Returns: [['a', 1], ['b', 2]]\n```\n\nnullやundefinedは空の配列に変換します。\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\ntoArray(null);\n// Returns: []\n\ntoArray(undefined);\n// Returns: []\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 配列に変換する値です。\n\n#### 戻り値\n\n(`any[]`): 変換された配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toFinite.md",
    "content": "# toFinite (Lodash 互換性)\n\n値を有限な数値に変換します。\n\n```typescript\nconst finite = toFinite(value);\n```\n\n## 使用法\n\n### `toFinite(value)`\n\n値を有限な数値に変換します。無限大はNumber.MAX_VALUEに、NaNは0に処理します。\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\n// 通常の数値はそのまま返す\ntoFinite(3.2);\n// Returns: 3.2\n\n// 無限大はMAX_VALUEに変換\ntoFinite(Infinity);\n// Returns: 1.7976931348623157e+308\n\ntoFinite(-Infinity);\n// Returns: -1.7976931348623157e+308\n\n// 文字列数値は数値に変換\ntoFinite('3.2');\n// Returns: 3.2\n```\n\n無効な値は0に変換します。\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\ntoFinite(NaN);\n// Returns: 0\n\ntoFinite(Symbol.iterator);\n// Returns: 0\n\ntoFinite(null);\n// Returns: 0\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 変換する値です。\n\n#### 戻り値\n\n(`number`): 変換された有限な数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toInteger.md",
    "content": "# toInteger (Lodash 互換性)\n\n値を整数に変換します。\n\n```typescript\nconst integer = toInteger(value);\n```\n\n## 使用法\n\n### `toInteger(value)`\n\n値を整数に変換します。小数部分は切り捨てて整数のみ残します。\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\n// 小数を整数に変換\ntoInteger(3.2);\n// Returns: 3\n\n// 文字列数値を整数に変換\ntoInteger('3.2');\n// Returns: 3\n\n// 非常に小さい数は0になる\ntoInteger(Number.MIN_VALUE);\n// Returns: 0\n\n// 無限大はMAX_VALUEになる\ntoInteger(Infinity);\n// Returns: 1.7976931348623157e+308\n```\n\n無効な値は0に変換します。\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\ntoInteger(NaN);\n// Returns: 0\n\ntoInteger(Symbol.iterator);\n// Returns: 0\n\ntoInteger(null);\n// Returns: 0\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 変換する値です。\n\n#### 戻り値\n\n(`number`): 変換された整数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toLength.md",
    "content": "# toLength (Lodash 互換性)\n\n値を有効な配列インデックスに変換します。\n\n```typescript\nconst length = toLength(value);\n```\n\n## 使用法\n\n### `toLength(value)`\n\n値を有効な配列インデックスに変換します。0以上2^32-1以下の整数に制限します。\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\n// 小数を整数に変換\ntoLength(3.2);\n// Returns: 3\n\n// 負数は0に変換\ntoLength(-1);\n// Returns: 0\n\n// 文字列数値を変換\ntoLength('42');\n// Returns: 42\n\n// 非常に大きい数は制限値に変換\ntoLength(Number.MAX_VALUE);\n// Returns: 4294967295\n```\n\nnullやundefinedは0に変換します。\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\ntoLength(null);\n// Returns: 0\n\ntoLength(undefined);\n// Returns: 0\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 変換する値です。\n\n#### 戻り値\n\n(`number`): 0以上2^32-1以下の有効な配列インデックスを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toNumber.md",
    "content": "# toNumber (Lodash 互換性)\n\n::: warning Numberコンストラクタを使用してください\n\nこの`toNumber`関数はシンボル型検証と追加処理により遅く動作します。\n\n代わりにより高速で現代的なNumberコンストラクタを使用してください。\n\n:::\n\n値を数値に変換します。\n\n```typescript\nconst number = toNumber(value);\n```\n\n## 使用法\n\n### `toNumber(value)`\n\n値を数値に変換します。シンボルはNaNとして処理します。\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\n// 通常の数値はそのまま返す\ntoNumber(3.2);\n// Returns: 3.2\n\n// 文字列数値を変換\ntoNumber('3.2');\n// Returns: 3.2\n\n// 無限大もそのまま返す\ntoNumber(Infinity);\n// Returns: Infinity\n\n// 非常に小さい数もそのまま返す\ntoNumber(Number.MIN_VALUE);\n// Returns: 5e-324\n```\n\nシンボルとNaNはNaNに変換します。\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\ntoNumber(Symbol.iterator);\n// Returns: NaN\n\ntoNumber(NaN);\n// Returns: NaN\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 変換する値です。\n\n#### 戻り値\n\n(`number`): 変換された数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toPath.md",
    "content": "# toPath (Lodash 互換性)\n\n深いキー文字列をパス配列に変換します。\n\n```typescript\nconst path = toPath(deepKey);\n```\n\n## 使用法\n\n### `toPath(deepKey)`\n\n深いキー文字列をパス配列に変換します。ドット記法とブラケット記法の両方をサポートします。\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// ドット記法\ntoPath('a.b.c');\n// Returns: ['a', 'b', 'c']\n\n// ブラケット記法\ntoPath('a[b][c]');\n// Returns: ['a', 'b', 'c']\n\n// 混合記法\ntoPath('a.b[c].d');\n// Returns: ['a', 'b', 'c', 'd']\n\n// 引用符で囲まれたキー\ntoPath('a[\"b.c\"].d');\n// Returns: ['a', 'b.c', 'd']\n```\n\n先頭のドットや空のキーも処理します。\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// 先頭にドットがある場合\ntoPath('.a.b.c');\n// Returns: ['', 'a', 'b', 'c']\n\n// 空の文字列\ntoPath('');\n// Returns: []\n\n// 複雑なパス\ntoPath('.a[b].c.d[e][\"f.g\"].h');\n// Returns: ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n```\n\n#### パラメータ\n\n- `deepKey` (`any`): パス配列に変換する深いキー文字列です。\n\n#### 戻り値\n\n(`string[]`): パスの各部分からなる文字列配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toPlainObject.md",
    "content": "# toPlainObject (Lodash 互換性)\n\n::: warning Object.assignやスプレッド演算子を使用してください\n\nこの`toPlainObject`関数は複雑なプロトタイプ処理とキー列挙により遅く動作します。\n\n代わりにより高速で現代的なObject.assign({}, obj)や{...obj}を使用してください。\n\n:::\n\n値を普通のオブジェクトに変換します。\n\n```typescript\nconst plainObj = toPlainObject(value);\n```\n\n## 使用法\n\n### `toPlainObject(value)`\n\n値を普通のオブジェクトに変換します。継承された列挙可能な文字列キー属性を自身の属性として平坦化します。\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// コンストラクタ関数とプロトタイプ\nfunction Foo() {\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nconst foo = new Foo();\ntoPlainObject(foo);\n// Returns: { b: 2, c: 3 }\n\n// 配列をオブジェクトに変換\ntoPlainObject([1, 2, 3]);\n// Returns: { 0: 1, 1: 2, 2: 3 }\n```\n\n様々なオブジェクト型を処理します。\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// 文字列をオブジェクトに変換\ntoPlainObject('abc');\n// Returns: { 0: 'a', 1: 'b', 2: 'c' }\n\n// 既に普通のオブジェクトの場合\nconst obj = { a: 1, b: 2 };\ntoPlainObject(obj);\n// Returns: { a: 1, b: 2 }\n```\n\n#### パラメータ\n\n- `value` (`any`): 変換する値です。\n\n#### 戻り値\n\n(`any`): 継承された列挙可能な属性が自身の属性として平坦化された普通のオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toSafeInteger.md",
    "content": "# toSafeInteger (Lodash 互換性)\n\n値を安全な整数に変換します。\n\n```typescript\nconst result = toSafeInteger(value);\n```\n\n## 使用法\n\n### `toSafeInteger(value)`\n\n値を安全な整数に変換したいときに`toSafeInteger`を使用します。安全な整数はJavaScriptで正確に表現可能な整数で、`Number.MIN_SAFE_INTEGER`と`Number.MAX_SAFE_INTEGER`の範囲内の値です。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(3.2);\n// Returns: 3\n\ntoSafeInteger(Infinity);\n// Returns: 9007199254740991\n\ntoSafeInteger('3.2');\n// Returns: 3\n\n// 文字列変換\ntoSafeInteger('abc');\n// Returns: 0\n\n// 特殊値処理\ntoSafeInteger(NaN);\n// Returns: 0\n\ntoSafeInteger(null);\n// Returns: 0\n\ntoSafeInteger(undefined);\n// Returns: 0\n```\n\n無限大値も安全な範囲に制限します。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(-Infinity);\n// Returns: -9007199254740991 (Number.MIN_SAFE_INTEGER)\n\ntoSafeInteger(Number.MAX_VALUE);\n// Returns: 9007199254740991\n```\n\n配列インデックスやID値として使用するときに便利です。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\nfunction getArrayItem(arr: any[], index: any) {\n  const safeIndex = toSafeInteger(index);\n  return arr[safeIndex];\n}\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconsole.log(getArrayItem(items, '2.7')); // 'c' (インデックス2)\nconsole.log(getArrayItem(items, Infinity)); // undefined (範囲外)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 変換する値です。\n\n#### 戻り値\n\n(`number`): 変換された安全な整数を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/toString.md",
    "content": "# toString (Lodash 互換性)\n\n::: warning Stringコンストラクタを使用してください\n\nこの`toString`関数は複雑な配列処理と-0特殊ケース処理により遅く動作します。\n\n代わりにより高速で現代的なString(value)を使用してください。\n\n:::\n\n値を文字列に変換します。\n\n```typescript\nconst str = toString(value);\n```\n\n## 使用法\n\n### `toString(value)`\n\n値を文字列に変換します。nullとundefinedは空の文字列に、-0の符号は保存します。\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 基本型\ntoString(null);\n// Returns: ''\n\ntoString(undefined);\n// Returns: ''\n\ntoString('hello');\n// Returns: 'hello'\n\ntoString(123);\n// Returns: '123'\n\n// -0の符号保存\ntoString(-0);\n// Returns: '-0'\n```\n\n配列は再帰的に変換します。\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 配列を文字列に変換\ntoString([1, 2, 3]);\n// Returns: '1,2,3'\n\n// ネストした配列\ntoString([1, [2, 3], 4]);\n// Returns: '1,2,3,4'\n\n// -0を含む配列\ntoString([1, 2, -0]);\n// Returns: '1,2,-0'\n\n// シンボルを含む配列\ntoString([Symbol('a'), Symbol('b')]);\n// Returns: 'Symbol(a),Symbol(b)'\n```\n\n#### パラメータ\n\n- `value` (`any`): 変換する値です。\n\n#### 戻り値\n\n(`string`): 変換された文字列を返します。nullとundefinedは空の文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/compat/util/uniqueId.md",
    "content": "# uniqueId (Lodash 互換性)\n\n::: warning crypto.randomUUID使用推奨\n\n一意の識別子を生成するときはcrypto.randomUUID()を使用するのがより安全で標準的な方式です。\n\n代わりにより高速で現代的なcrypto.randomUUID()を使用してください。\n\n:::\n\n一意な文字列識別子を生成します。\n\n```typescript\nconst result = uniqueId('contact_');\n```\n\n## 使用法\n\n### `uniqueId(prefix?: string): string`\n\n一意な文字列識別子を生成します。内部カウンターを増加させて一意性を保証します。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 接頭辞と一緒に一意ID生成\nuniqueId('contact_'); // => 'contact_1'\nuniqueId('user_'); // => 'user_2'\n\n// 接頭辞なしで一意ID生成\nuniqueId(); // => '3'\nuniqueId(); // => '4'\n```\n\n連続した呼び出しごとに内部カウンターが増加します。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 各呼び出しごとに異なるID生成\nconst ids = Array.from({ length: 5 }, () => uniqueId('item_'));\nconsole.log(ids);\n// => ['item_1', 'item_2', 'item_3', 'item_4', 'item_5']\n```\n\nDOM要素の一意ID生成に便利です。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// フォーム要素の一意ID生成\nconst inputId = uniqueId('input_');\nconst labelId = uniqueId('label_');\n\nconsole.log(inputId); // => 'input_6'\nconsole.log(labelId); // => 'label_7'\n```\n\n#### パラメータ\n\n- `prefix` (`string`, オプション): IDの前に付く接頭辞文字列。提供しない場合は数値のみ返します。\n\n#### 戻り値\n\n(`string`): 一意識別子文字列。接頭辞がある場合は`接頭辞 + 番号`形式、ない場合は番号のみ返します。\n"
  },
  {
    "path": "docs/ja/reference/error/AbortError.md",
    "content": "# AbortError\n\n中断またはキャンセルされた操作を表すエラークラスです。\n\n```typescript\nconst error = new AbortError(message);\n```\n\n## 使用法\n\n### `new AbortError(message?)`\n\n操作が中断またはキャンセルされた時に使用するエラークラスです。[debounce](../function/debounce.md)や[delay](../promise/delay.md)などの操作が`AbortSignal`でキャンセルされた時にスローされます。\n\n```typescript\nimport { AbortError } from 'es-toolkit/error';\n\n// デフォルトメッセージでエラーを作成します。\nthrow new AbortError();\n// エラーメッセージ: 'The operation was aborted'\n\n// カスタムメッセージでエラーを作成します。\nthrow new AbortError('ファイルアップロードがキャンセルされました');\n// エラーメッセージ: 'ファイルアップロードがキャンセルされました'\n```\n\nAbortSignalと一緒に使用する例です。\n\n```typescript\nimport { AbortError, delay } from 'es-toolkit';\n\nasync function fetchData(signal: AbortSignal) {\n  try {\n    await delay(1000, { signal });\n    return 'データ読み込み完了';\n  } catch (error) {\n    if (error instanceof AbortError) {\n      console.log('操作がキャンセルされました');\n    }\n    throw error;\n  }\n}\n\nconst controller = new AbortController();\ncontroller.abort(); // 操作をキャンセル\nawait fetchData(controller.signal); // AbortErrorをスロー\n```\n\n#### パラメータ\n\n- `message` (`string`, オプション): エラーメッセージです。デフォルト値は`'The operation was aborted'`です。\n\n#### 戻り値\n\n(`AbortError`): 中断された操作を表すエラーインスタンスを返します。`Error`を継承しており、`name`プロパティは`'AbortError'`です。\n"
  },
  {
    "path": "docs/ja/reference/error/TimeoutError.md",
    "content": "# TimeoutError\n\nタイムアウトした操作を表すエラークラスです。\n\n```typescript\nconst error = new TimeoutError(message);\n```\n\n## 使用法\n\n### `new TimeoutError(message?)`\n\n操作の制限時間が過ぎた時に使用するエラークラスです。[timeout](../promise/timeout.md)や[withTimeout](../promise/withTimeout.md)などの操作の制限時間が過ぎた時にスローされます。\n\n```typescript\nimport { TimeoutError } from 'es-toolkit/error';\n\n// デフォルトメッセージでエラーを作成します。\nthrow new TimeoutError();\n// エラーメッセージ: 'The operation was timed out'\n\n// カスタムメッセージでエラーを作成します。\nthrow new TimeoutError('APIリクエストがタイムアウトしました');\n// エラーメッセージ: 'APIリクエストがタイムアウトしました'\n```\n\nタイムアウトと一緒に使用する例です。\n\n```typescript\nimport { timeout, TimeoutError } from 'es-toolkit';\n\nasync function fetchWithTimeout(url: string) {\n  try {\n    const response = await timeout(() => fetch(url), 3000);\n    return response;\n  } catch (error) {\n    if (error instanceof TimeoutError) {\n      console.log('リクエストがタイムアウトしました');\n    }\n    throw error;\n  }\n}\n\n// 3秒以上かかると TimeoutError をスロー\nawait fetchWithTimeout('https://example.com/api/slow');\n```\n\n#### パラメータ\n\n- `message` (`string`, オプション): エラーメッセージです。デフォルト値は`'The operation was timed out'`です。\n\n#### 戻り値\n\n(`TimeoutError`): タイムアウトした操作を表すエラーインスタンスを返します。`Error`を継承しており、`name`プロパティは`'TimeoutError'`です。\n"
  },
  {
    "path": "docs/ja/reference/function/after.md",
    "content": "# after\n\n`n` 回目の呼び出しから関数を実行する新しい関数を作成します。\n\n```typescript\nconst afterFunc = after(n, func);\n```\n\n## 使用法\n\n### `after(n, func)`\n\n最初の数回の呼び出しを無視し、`n` 回目から関数を実行したい場合は `after` を使用してください。イベントや非同期操作で特定の回数の後にのみ動作を実行する必要がある場合に便利です。\n\n```typescript\nimport { after } from 'es-toolkit/function';\n\nconst afterFn = after(3, () => {\n  console.log('executed');\n});\n\n// 何もログに記録しません\nafterFn();\n// 何もログに記録しません\nafterFn();\n// 'executed'をログに記録します\nafterFn();\n// 'executed'をログに記録します\nafterFn();\n```\n\n#### パラメータ\n\n- `n` (`number`): `func` が実行されるために必要な呼び出し回数です。\n- `func` (`F`): 実行される関数です。\n\n#### 戻り値\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 呼び出し回数を追跡し、`n` 回目の呼び出しから `func` を実行する新しい関数です。`n` 回目より前の呼び出しでは `undefined` を返します。\n\n#### エラー\n\n`n` が整数でないか負の数の場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/function/ary.md",
    "content": "# ary\n\n関数が受け取れる引数の個数を制限する新しい関数を作成します。\n\n```typescript\nconst limitedFunc = ary(func, n);\n```\n\n## 使用法\n\n### `ary(func, n)`\n\n関数が受け取れる引数の個数を制限したいときに`ary`を使用してください。追加で渡された引数は無視されます。関数型プログラミングでコールバック関数が予期しない引数を受け取ることを防ぐときに特に便利です。\n\n```typescript\nimport { ary } from 'es-toolkit/function';\n\nfunction fn(a: number, b: number, c: number) {\n  return Array.from(arguments);\n}\n\n// 引数を受け取らないように制限\nary(fn, 0)(1, 2, 3);\n// Returns: []\n\n// 1つの引数のみ受け取るように制限\nary(fn, 1)(1, 2, 3);\n// Returns: [1]\n\n// 2つの引数のみ受け取るように制限\nary(fn, 2)(1, 2, 3);\n// Returns: [1, 2]\n```\n\n`map`のような配列メソッドと一緒に使用するときに特に便利です。\n\n```typescript\n// parseIntは2つの引数を受け取りますが、mapは3つを渡します\n['1', '2', '3'].map(parseInt);\n// Returns: [1, NaN, NaN]\n\n['1', '2', '3'].map(parseInt);\n// 結果: [1, NaN, NaN]\n// なぜならparseInt('2', 1)、parseInt('3', 2)が実行されるからです。\n\n// aryを使用して最初の引数のみを渡すように制限\n['1', '2', '3'].map(ary(parseInt, 1));\n// 結果: [1, 2, 3] ✅\n```\n\n#### パラメータ\n\n- `func` (`F`): 引数の個数を制限する関数です。\n- `n` (`number`): 最大で受け取る引数の個数です。\n\n#### 戻り値\n\n(`(...args: any[]) => ReturnType<F>`): 最大`n`個の引数のみを受け取る新しい関数です。\n"
  },
  {
    "path": "docs/ja/reference/function/asyncNoop.md",
    "content": "# asyncNoop\n\n非同期で何もしない関数です。\n\n```typescript\nconst promise = asyncNoop();\n```\n\n::: info [`noop`](./noop.md) 関数\n\n同期的に何もしない関数が必要な場合は、直接`void`を返す`noop`関数を使用してください。\n\n:::\n\n## 使用法\n\n### `asyncNoop()`\n\n非同期関数が必要な場所に空白を埋めたりデフォルト値として使用したいときに`asyncNoop`を使用してください。`undefined`で解決する`Promise`を返します。\n\n```typescript\nimport { asyncNoop } from 'es-toolkit/function';\n\n// デフォルト値として使用する例\ninterface Props {\n  fetchData?: () => Promise<void>;\n}\n\nfunction MyComponent({ fetchData = asyncNoop }: Props) {\n  const handleFetchData = async () => {\n    // fetchDataは常に関数なので安全に呼び出せます\n    await fetchData();\n  };\n\n  handleFetchData();\n}\n\n// 直接呼び出す例\nasyncNoop();\n// Returns: Promise<void>\n\nawait asyncNoop();\n// Returns: undefined\n```\n\n#### 戻り値\n\n(`Promise<void>`): `undefined`で解決する`Promise`です。\n"
  },
  {
    "path": "docs/ja/reference/function/before.md",
    "content": "# before\n\n関数の呼び出し回数を制限する新しい関数を作成します。\n\n```typescript\nconst limitedFunc = before(n, func);\n```\n\n## 使用法\n\n### `before(n, func)`\n\n関数が特定の回数まで実行されるように制限したいときに`before`を使用してください。`n-1`回目の呼び出しまで関数が実行され、`n`回目からは実行されなくなります。\n\n```typescript\nimport { before } from 'es-toolkit/function';\n\nconst beforeFn = before(3, () => {\n  console.log('実行されました');\n});\n\n// '実行されました'をログ出力します\nbeforeFn();\n\n// '実行されました'をログ出力します\nbeforeFn();\n\n// 何もログ出力しません\nbeforeFn();\n\n// 何もログ出力しません\nbeforeFn();\n```\n\n初期化や設定のように一度だけ実行されるべき作業に便利です。\n\n```typescript\nlet initialized = false;\n\nconst initialize = before(2, () => {\n  console.log('初期化中...');\n  initialized = true;\n});\n\n// '初期化中...'をログ出力して初期化を実行します\ninitialize();\n\n// すでに初期化されているので何もしません\ninitialize();\n```\n\n#### パラメータ\n\n- `n` (`number`): 返される関数が`func`を呼び出せる最大回数です。`n`が0の場合、`func`は呼び出されません。正の整数の場合、最大`n-1`回呼び出されます。\n- `func` (`F`): 呼び出し回数が制限される関数です。\n\n#### 戻り値\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 呼び出し回数を追跡し、`n-1`回目まで`func`を実行する新しい関数です。`n`回目以降の呼び出しでは`undefined`を返します。\n\n#### エラー\n\n`n`が整数でない場合や負数の場合はエラーを発生させます。\n"
  },
  {
    "path": "docs/ja/reference/function/curry.md",
    "content": "# curry\n\n関数をカリー化して一度に一つの引数で呼び出せるようにします。\n\n```typescript\nconst curriedFunc = curry(func);\n```\n\n## 使用法\n\n### `curry(func)`\n\n関数を部分的に適用したいときに`curry`を使用してください。カリー化された関数は必要なすべての引数を受け取るまで新しい関数を返します。すべての引数が提供されると元の関数が実行されます。\n\n```typescript\nimport { curry } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curry(sum);\n\n// 引数`a`に値`10`を提供します\nconst sum10 = curriedSum(10);\n\n// 引数`b`に値`15`を提供します\nconst sum25 = sum10(15);\n\n// 引数`c`に値`5`を提供します\n// すべての引数を受け取ったので値を返します\nconst result = sum25(5);\n// Returns: 30\n```\n\n再利用可能な関数を作成するときに便利です。\n\n```typescript\nfunction multiply(a: number, b: number) {\n  return a * b;\n}\n\nconst curriedMultiply = curry(multiply);\nconst double = curriedMultiply(2);\nconst triple = curriedMultiply(3);\n\ndouble(5); // Returns: 10\ntriple(5); // Returns: 15\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): カリー化する関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 一度に一つの引数で呼び出せるカリー化された関数です。\n"
  },
  {
    "path": "docs/ja/reference/function/curryRight.md",
    "content": "# curryRight\n\n関数を右から左にカリー化して一度に一つの引数で呼び出せるようにします。\n\n```typescript\nconst curriedFunc = curryRight(func);\n```\n\n## 使用法\n\n### `curryRight(func)`\n\n関数を右から左に部分適用したいときに`curryRight`を使用してください。通常の`curry`とは異なり、最後の引数から受け取ります。\n\n```typescript\nimport { curryRight } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curryRight(sum);\n\n// 引数`c`に値`10`を提供します\nconst add10 = curriedSum(10);\n\n// 引数`b`に値`15`を提供します\nconst add25 = add10(15);\n\n// 引数`a`に値`5`を提供します\n// すべての引数を受け取ったので値を返します\nconst result = add25(5);\n// Returns: 30\n```\n\n右から左に引数を適用する方がより自然な場合に便利です。\n\n```typescript\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst curriedGreet = curryRight(greet);\nconst greetJohn = curriedGreet('John');\n\ngreetJohn('Hello'); // Returns: 'Hello, John!'\ngreetJohn('Hi'); // Returns: 'Hi, John!'\n```\n\n#### パラメータ\n\n- `func` (`(...args: any[]) => any`): カリー化する関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 右から左に一度に一つの引数で呼び出せるカリー化された関数です。\n"
  },
  {
    "path": "docs/ja/reference/function/debounce.md",
    "content": "# debounce\n\n提供された関数の呼び出しを遅延させるデバウンスされた関数を生成します。\n\n```typescript\nconst debouncedFunc = debounce(func, debounceMs, options);\n```\n\n## 使用法\n\n### `debounce(func, debounceMs, options)`\n\n連続した呼び出しを1つにまとめたいときに `debounce` を使用してください。デバウンスされた関数は、最後の呼び出し後、指定された時間が経過してから実行されます。検索入力やウィンドウサイズ変更のような高速なイベント処理に便利です。\n\n```typescript\nimport { debounce } from 'es-toolkit/function';\n\nconst debouncedFunction = debounce(() => {\n  console.log('実行されました');\n}, 1000);\n\n// 1秒以内に再度呼び出されなければ、'実行されました'をログに記録します\ndebouncedFunction();\n\n// 前回の呼び出しをキャンセルします\ndebouncedFunction.cancel();\n\n// 待機中の関数を即座に実行します\ndebouncedFunction.flush();\n```\n\nユーザー入力に応じて検索のような重い API を呼び出す場合に便利です。\n\n```typescript\nconst searchInput = document.getElementById('search');\nconst searchResults = debounce(async (query: string) => {\n  const results = await fetchSearchResults(query);\n  displayResults(results);\n}, 300);\n\nsearchInput.addEventListener('input', e => {\n  searchResults(e.target.value);\n});\n```\n\n[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) を使用してデバウンスされた関数の呼び出しをキャンセルできます。\n\n```typescript\nconst controller = new AbortController();\nconst debouncedWithSignalFunction = debounce(\n  () => {\n    console.log('Function executed');\n  },\n  1000,\n  { signal: controller.signal }\n);\n\n// 1秒以内に再度呼び出されなければ、'実行されました'をログに記録します\ndebouncedWithSignalFunction();\n\n// debounce 関数の呼び出しをキャンセルします\ncontroller.abort();\n```\n\n#### パラメータ\n\n- `func` (`F`): デバウンスされた関数を作成する関数。\n- `debounceMs`(`number`): デバウンスで遅延させるミリ秒。\n- `options` (`DebounceOptions`, オプション): オプションオブジェクト。\n  - `signal` (`AbortSignal`, オプション): デバウンスされた関数をキャンセルするためのオプションの `AbortSignal`。\n  - `edges` (`Array<'leading' | 'trailing'>`, オプション): 元の関数をいつ実行するかを示す配列。デフォルトは `['trailing']` です。\n    - `'leading'` が含まれている場合、デバウンスされた関数が最初に呼び出されたときに即座に元の関数を実行します。\n    - `'trailing'` が含まれている場合、最後のデバウンスされた関数の呼び出しから `debounceMs` ミリ秒が経過した後に元の関数を実行します。\n    - `'leading'` と `'trailing'` の両方が含まれている場合、元の関数は遅延の開始時と終了時の両方で呼び出されます。ただし、両方の時点で呼び出されるためには、デバウンスされた関数が `debounceMs` ミリ秒の間に少なくとも2回呼び出される必要があります。デバウンスされた関数を1回呼び出して元の関数を2回呼び出すことはできません。\n\n#### 戻り値\n\n(`DebouncedFunction<F>`): デバウンスされた関数で、次のメソッドを持っています。\n\n- `cancel()`: 予定された呼び出しをキャンセルします。\n- `flush()`: 待機中の関数を即座に実行します。\n- `schedule()`: 関数の実行を再スケジュールします。\n\n## 例\n\n### 基本的な使用法\n\n```typescript\nconst debouncedFunction = debounce(() => {\n  console.log('実行されました');\n}, 1000);\n\n// 1秒以内に再度呼び出されなければ、'実行されました'をログに記録します\ndebouncedFunction();\n\n// 前回の呼び出しがキャンセルされたため、何もログに記録しません\ndebouncedFunction.cancel();\n```\n\n### AbortSignalの使用法\n\n```typescript\nconst controller = new AbortController();\nconst signal = controller.signal;\nconst debouncedWithSignalFunction = debounce(\n  () => {\n    console.log('関数が実行されました');\n  },\n  1000,\n  { signal }\n);\n\n// 1秒以内に再度呼び出されなければ、'関数が実行されました'をログに記録します\ndebouncedWithSignalFunction();\n\n// デバウンス関数の呼び出しをキャンセルします\ncontroller.abort();\n```\n\n## Lodashとの互換性\n\n`es-toolkit/compat`から`debounce`をインポートすると、lodashと完全に互換性があります。\n\n- `debounce`関数は`leading`と`trailing`オプションを受け取ります。\n\n  - `leading`: デバウンスされた関数を最初に呼び出したときに即座に元の関数を実行するかどうかです。デフォルトは`false`です。\n  - `trailing`: 最後のデバウンスされた関数の呼び出しから`debounceMs`ミリ秒が経過した後に元の関数を実行するかどうかです。デフォルトは`true`です。\n\n- `debounce`関数は`maxWait`オプションも受け取ります。\n\n  - 元の関数の呼び出しが最大で遅延されるミリ秒です。デフォルトは`Infinity`です。\n\n- `debounceMs`オプションのデフォルト値は`0`です。関数の呼び出しが次のティックまで遅延されることを意味します。\n\n::: info `{ leading: true }`オプションの意味\n\n`trailing`はデフォルトで`true`なので、デバウンスを`{ leading: true }`に設定すると、`leading`と`trailing`の両方が`true`になります。\n\n:::\n\n```typescript\n// leadingオプションの例\nconst leadingFn = debounce(\n  () => {\n    console.log('Leading function executed');\n  },\n  1000,\n  { leading: true }\n);\n\n// 'Leading function executed'をすぐにログに記録します。\nleadingFn();\n\n// trailingオプションの例\nconst trailingFn = debounce(\n  () => {\n    console.log('Trailing function executed');\n  },\n  1000,\n  { trailing: true }\n);\n\n// デバウンスされた関数がその間に呼び出されなければ、'Trailing function executed'を1秒後にログに記録します。\ntrailingFn();\n\n// maxWaitオプションの例\nconst maxWaitFn = debounce(\n  () => {\n    console.log('MaxWait function executed');\n  },\n  1000,\n  { maxWait: 2000 }\n);\n\n// 'MaxWait function executed'を2秒以内に必ずログに記録します。\nmaxWaitFn();\nsetTimeout(maxWaitFn, 500);\nsetTimeout(maxWaitFn, 1000);\nsetTimeout(maxWaitFn, 1500);\nsetTimeout(maxWaitFn, 2000);\nsetTimeout(maxWaitFn, 2500);\nsetTimeout(maxWaitFn, 3000);\n```\n"
  },
  {
    "path": "docs/ja/reference/function/flow.md",
    "content": "# flow\n\n複数の関数を順番に実行する新しい関数を作成します。\n\n```typescript\nconst combinedFunc = flow(func1, func2, func3);\n```\n\n## 使用法\n\n### `flow(...funcs)`\n\n関数を連結してパイプラインを作成したいときに`flow`を使用してください。前の関数の結果が次の関数の入力になります。データを複数の段階で変換するときに便利です。\n\n```typescript\nimport { flow } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\nconst combined = flow(add, square, double);\n\n// まずadd(1, 2) = 3\n// 次にsquare(3) = 9\n// 最後にdouble(9) = 18\ncombined(1, 2);\n// Returns: 18\n```\n\nデータ変換パイプラインを作成するときに特に便利です。\n\n```typescript\nconst processData = flow(\n  (text: string) => text.trim(),\n  (text: string) => text.toLowerCase(),\n  (text: string) => text.split(' '),\n  (words: string[]) => words.filter(word => word.length > 3)\n);\n\nprocessData('  Hello World JavaScript  ');\n// Returns: ['hello', 'world', 'javascript']\n```\n\n#### パラメータ\n\n- `funcs` (`Array<(...args: any[]) => any>`): 順番に実行する関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 与えられた関数を順番に実行する新しい関数です。最初の関数は複数の引数を受け取ることができ、残りの関数は前の関数の結果を受け取ります。\n"
  },
  {
    "path": "docs/ja/reference/function/flowRight.md",
    "content": "# flowRight\n\n与えられた関数を右から左に順番に実行する新しい関数を作成します。\n\n```typescript\nconst combined = flowRight(func1, func2, func3);\n```\n\n## 使用法\n\n### `flowRight(...funcs)`\n\n複数の関数を右から左に順番に実行する新しい関数を作成したいときに`flowRight`を使用してください。前の関数の戻り値が次の関数のパラメータとして渡されます。\n\n関数を逆順に組み合わせてデータ変換パイプラインを作成するときに便利です。`flow`と逆の方向で関数を実行します。\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\n// 右から左に実行: double -> square -> add\nconst combined = flowRight(double, square, add);\nconsole.log(combined(1, 2)); // 18\n// 実行順序: add(1, 2) = 3, square(3) = 9, double(9) = 18\n\n// 単一関数でも使用可能\nconst single = flowRight((x: number) => x + 1);\nconsole.log(single(5)); // 6\n```\n\n`this`コンテキストも関数に渡されます。\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst context = {\n  multiplier: 3,\n};\n\nfunction multiply(this: typeof context, x: number) {\n  return x * this.multiplier;\n}\n\nconst add = (x: number) => x + 10;\n\nconst combined = flowRight(multiply, add).bind(context);\nconsole.log(combined(5)); // 45\n// 実行順序: add(5) = 15, multiply(15) = 45\n```\n\n#### パラメータ\n\n- `funcs` (`(...args: any[]) => any`): 組み合わせる関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => any`): 与えられた関数を右から左に順番に実行する新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/identity.md",
    "content": "# identity\n\n入力された値をそのまま返します。\n\n```typescript\nconst result = identity(value);\n```\n\n## 使用法\n\n### `identity(value)`\n\nある値を変更せずにそのまま返したいときに`identity`を使用してください。\n\n引数として与えられる関数のデフォルト値として使用するときに便利です。配列の`map`や`filter`で値自体を返したり、関数型プログラミングでプレースホルダーの役割として使用します。\n\n```typescript\nimport { identity } from 'es-toolkit/function';\n\n// 数値をそのまま返します\nconst num = identity(5);\nconsole.log(num); // 5\n\n// 文字列をそのまま返します\nconst str = identity('hello');\nconsole.log(str); // 'hello'\n\n// オブジェクトをそのまま返します\nconst obj = identity({ key: 'value' });\nconsole.log(obj); // { key: 'value' }\n\n// 配列で使用する例\nconst numbers = [1, 2, 3, 4, 5];\nconst same = numbers.map(identity);\nconsole.log(same); // [1, 2, 3, 4, 5]\n```\n\n#### パラメータ\n\n- `value` (`T`): 返す値です。\n\n#### 戻り値\n\n(`T`): 入力された値をそのまま返します。\n"
  },
  {
    "path": "docs/ja/reference/function/memoize.md",
    "content": "# memoize\n\n関数の結果をキャッシュして、同じ引数で再度呼び出すときにより高速に実行できるようにします。\n\n```typescript\nconst memoizedFunc = memoize(func, options);\n```\n\n## 使用法\n\n### `memoize(func, options?)`\n\n関数の実行結果をキャッシュしてパフォーマンスを最適化したいときに `memoize` を使用してください。同じ引数で再度呼び出すと、キャッシュされた結果を返して重複計算を避けることができます。\n\n1つのパラメータのみを受け取る関数で使用してください。複数の引数を受け取る関数の場合は、1つのオブジェクトまたは配列にまとめて渡してください。\n\n配列やオブジェクトのように参照で比較される値を引数として使用する場合は、`getCacheKey` 関数を提供して適切なキャッシュキーを生成する必要があります。\n\n```typescript\nimport { memoize } from 'es-toolkit/function';\n\n// 基本的な使い方\nconst add = (x: number) => x + 10;\nconst memoizedAdd = memoize(add);\n\nconsole.log(memoizedAdd(5)); // 15 (計算されました)\nconsole.log(memoizedAdd(5)); // 15 (キャッシュされた結果)\nconsole.log(memoizedAdd.cache.size); // 1\n\n// 配列引数のキャッシュキーを提供\nconst sum = (arr: number[]) => arr.reduce((sum, n) => sum + n, 0);\nconst memoizedSum = memoize(sum, {\n  getCacheKey: (arr: number[]) => arr.join(','),\n});\n\nconsole.log(memoizedSum([1, 2, 3])); // 6 (計算されました)\nconsole.log(memoizedSum([1, 2, 3])); // 6 (キャッシュされた結果)\n```\n\nカスタムキャッシュを使用することもできます。\n\n```typescript\nimport { memoize, MemoizeCache } from 'es-toolkit/function';\n\nclass LRUCache<K, V> implements MemoizeCache<K, V> {\n  private cache = new Map<K, V>();\n  private maxSize = 100;\n\n  set(key: K, value: V): void {\n    if (this.cache.size >= this.maxSize) {\n      const firstKey = this.cache.keys().next().value;\n      this.cache.delete(firstKey);\n    }\n    this.cache.set(key, value);\n  }\n\n  get(key: K): V | undefined {\n    return this.cache.get(key);\n  }\n\n  has(key: K): boolean {\n    return this.cache.has(key);\n  }\n\n  delete(key: K): boolean {\n    return this.cache.delete(key);\n  }\n\n  clear(): void {\n    this.cache.clear();\n  }\n\n  get size(): number {\n    return this.cache.size;\n  }\n}\n\nconst customCache = new LRUCache<string, number>();\nconst memoizedWithCustomCache = memoize(expensiveFunction, {\n  cache: customCache,\n});\n```\n\n#### パラメータ\n\n- `func` (`F`): メモ化する関数です。1つの引数のみを受け取る必要があります。\n- `options` (オブジェクト, オプション): メモ化設定オプションです。\n  - `cache` (`MemoizeCache<any, ReturnType<F>>`, オプション): 結果を保存するキャッシュオブジェクトです。デフォルト値は新しい `Map` です。\n  - `getCacheKey` (`(arg: Parameters<F>[0]) => unknown`, オプション): キャッシュキーを生成する関数です。非プリミティブ値を引数として使用する場合に必要です。\n\n#### 戻り値\n\n(`F & { cache: MemoizeCache<any, ReturnType<F>> }`): メモ化された関数を返します。内部キャッシュにアクセスできる `cache` プロパティも含まれています。\n\n## 例\n\n```typescript\nimport { memoize, MemoizeCache } from 'es-toolkit/function';\n\n// 基本的な使用法\nconst add = (x: number) => x + 10;\nconst memoizedAdd = memoize(add);\n\nconsole.log(memoizedAdd(5)); // 15\nconsole.log(memoizedAdd(5)); // 15 (キャッシュされた結果)\nconsole.log(memoizedAdd.cache.size); // 1\n\n// カスタム`getCacheKey`の定義\nconst sum = (arr: number[]) => arr.reduce((x, y) => x + y, 0);\nconst memoizedSum = memoize(sum, { getCacheKey: (arr: number[]) => arr.join(',') });\nconsole.log(memoizedSum([1, 2])); // 3\nconsole.log(memoizedSum([1, 2])); // 3 (キャッシュされた結果)\nconsole.log(memoizedSum.cache.size); // 1\n\n// カスタム`MemoizeCache`の定義\nclass CustomCache<K, T> implements MemoizeCache<K, T> {\n  private cache = new Map<K, T>();\n  set(key: K, value: T): void {\n    this.cache.set(key, value);\n  }\n  get(key: K): T | undefined {\n    return this.cache.get(key);\n  }\n  has(key: K): boolean {\n    return this.cache.has(key);\n  }\n  delete(key: K): boolean {\n    return this.cache.delete(key);\n  }\n  clear(): void {\n    this.cache.clear();\n  }\n  get size(): number {\n    return this.cache.size;\n  }\n}\nconst customCache = new CustomCache<string, number>();\nconst memoizedSumWithCustomCache = memoize(sum, { cache: customCache });\nconsole.log(memoizedSumWithCustomCache([1, 2])); // 3\nconsole.log(memoizedSumWithCustomCache([1, 2])); // 3 (キャッシュされた結果)\nconsole.log(memoizedAddWithCustomCache.cache.size); // 1\n```\n"
  },
  {
    "path": "docs/ja/reference/function/negate.md",
    "content": "# negate\n\n真または偽を返す関数の戻り値を反対に変更する新しい関数を作成します。\n\n```typescript\nconst negatedFunc = negate(booleanFunc);\n```\n\n## 使用法\n\n### `negate(func)`\n\n真または偽の値を返す関数の結果を反対に変更したいときに`negate`を使用してください。\n\n条件付き関数やフィルタリングロジックを反転させるときに便利です。例えば、偶数を見つける関数を奇数を見つける関数に変更できます。\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\n// 基本的な使用法\nconst isEven = (n: number) => n % 2 === 0;\nconst isOdd = negate(isEven);\n\nconsole.log(isEven(2)); // true\nconsole.log(isOdd(2)); // false\n\nconsole.log(isEven(3)); // false\nconsole.log(isOdd(3)); // true\n\n// 配列フィルタリングで使用\nconst numbers = [1, 2, 3, 4, 5, 6];\n\nconst evenNumbers = numbers.filter(isEven);\nconsole.log(evenNumbers); // [2, 4, 6]\n\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n```\n\n複雑な条件関数も反転できます。\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\nconst isLongString = (str: string) => str.length > 5;\nconst isShortString = negate(isLongString);\n\nconst words = ['hi', 'hello', 'world', 'javascript'];\n\nconst longWords = words.filter(isLongString);\nconsole.log(longWords); // ['javascript']\n\nconst shortWords = words.filter(isShortString);\nconsole.log(shortWords); // ['hi', 'hello', 'world']\n```\n\n#### パラメータ\n\n- `func` (`F`): ブール値を返す関数です。\n\n#### 戻り値\n\n(`F`): 元の関数と同じ引数を受け取りますが、反対のブール値を返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/noop.md",
    "content": "# noop\n\n何もしない空の関数です。\n\n```typescript\nnoop();\n```\n\n::: info [`asyncNoop`](./asyncNoop.md) 関数\n\n非同期で何もしない関数が必要な場合は、直接`Promise<void>`を返す`asyncNoop`関数を使用してください。\n\n:::\n\n## 使用法\n\n### `noop()`\n\n何の動作もしない関数が必要なときに`noop`を使用してください。\n\n関数が必須の場所でデフォルト値として使用したり、コールバック関数を無効化したいときに便利です。プレースホルダーの役割や初期化段階でよく使用されます。\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 選択的なコールバックのデフォルト値として使用\ninterface EventHandlers {\n  onSuccess?: () => void;\n  onError?: () => void;\n}\n\nfunction processData({ onSuccess = noop, onError = noop }: EventHandlers = {}) {\n  try {\n    // データ処理ロジック\n    console.log('データ処理完了');\n    onSuccess(); // 安全に呼び出し可能\n  } catch (error) {\n    onError(); // 安全に呼び出し可能\n  }\n}\n\n// undefinedチェックなしで安全に使用\nprocessData({\n  onSuccess: () => console.log('成功!'),\n  // onErrorはnoopとしてデフォルト処理される\n});\n```\n\n配列のメソッドでも使用できます。\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 条件付きで関数を実行\nconst operations = [\n  () => console.log('最初の作業'),\n  shouldRunSecond ? () => console.log('2番目の作業') : noop,\n  () => console.log('3番目の作業'),\n];\n\noperations.forEach(op => op()); // すべての作業を安全に実行\n```\n\n#### 戻り値\n\n(`void`): 何も返しません。\n"
  },
  {
    "path": "docs/ja/reference/function/once.md",
    "content": "# once\n\n関数を一度だけ実行するように制限する新しい関数を作成します。\n\n```typescript\nconst onceFunc = once(func);\n```\n\n## 使用法\n\n### `once(func)`\n\n関数が一度だけ実行されるように制限したいときに`once`を使用してください。以降の呼び出しでは最初の呼び出しの結果をそのまま返します。\n\n初期化関数やイベントハンドラーなど一度だけ実行されるべきロジックに便利です。重複実行を防ぎ、一貫した結果を保証します。\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\n// 初期化関数の例\nconst initialize = once(() => {\n  console.log('アプリを初期化します');\n  return { status: 'initialized' };\n});\n\nconsole.log(initialize()); // 'アプリを初期化します'がログ出力され、{ status: 'initialized' }を返す\nconsole.log(initialize()); // ログなしで{ status: 'initialized' }を返す\nconsole.log(initialize()); // ログなしで{ status: 'initialized' }を返す\n\n// API呼び出しの例\nconst fetchConfig = once(async () => {\n  console.log('設定を取得します');\n  const response = await fetch('/api/config');\n  return response.json();\n});\n\n// 最初の呼び出しでのみ実際のAPIリクエストが実行される\nconst config1 = await fetchConfig();\nconst config2 = await fetchConfig(); // キャッシュされた結果を返す\n```\n\n引数がある関数も使用できます。\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\nconst logOnce = once((message: string) => {\n  console.log(`重要なメッセージ: ${message}`);\n});\n\nlogOnce('こんにちは'); // '重要なメッセージ: こんにちは'を出力\nlogOnce('もう一度こんにちは'); // 出力されない(すでに呼び出し済み)\nlogOnce('またこんにちは'); // 出力されない(すでに呼び出し済み)\n```\n\n#### パラメータ\n\n- `func` (`F`): 一度だけ呼び出されるように制限する関数です。\n\n#### 戻り値\n\n(`F`): 最初の呼び出し後に結果をキャッシュし、以降の呼び出しで同じ結果を返す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/partial.md",
    "content": "# partial\n\n一部の引数を事前に適用した新しい関数を作成します。\n\n```typescript\nconst partialFunc = partial(func, arg1, arg2);\n```\n\n## 使用法\n\n### `partial(func, ...args)`\n\n関数の一部の引数を事前に固定したいときに`partial`を使用してください。事前に提供された引数が関数の前方に配置され、後で渡される引数は後方に追加されます。\n\n関数型プログラミングでよく使用されるカリー化(currying)と似た概念です。`bind`とは異なり`this`コンテキストを固定しません。\n\n`partial.placeholder`を使用すると特定の位置の引数を後で渡すことができます。\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\n// 基本的な使用法\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst sayHello = partial(greet, 'Hello');\nconsole.log(sayHello('John')); // 'Hello, John!'\nconsole.log(sayHello('Jane')); // 'Hello, Jane!'\n\n// 複数の引数を適用\nfunction multiply(a: number, b: number, c: number) {\n  return a * b * c;\n}\n\nconst double = partial(multiply, 2);\nconsole.log(double(3, 4)); // 24\n\nconst doubleAndTriple = partial(multiply, 2, 3);\nconsole.log(doubleAndTriple(4)); // 24\n```\n\nプレースホルダーを使用して引数の順序を調整できます。\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\n// 2番目の引数のみ固定し、1番目と3番目は後で渡す\nconst subtractFrom5 = partial(subtract, partial.placeholder, 5, partial.placeholder);\nconsole.log(subtractFrom5(10, 2)); // 10 - 5 - 2 = 3\n\n// 配列メソッドと一緒に使用\nconst numbers = [1, 2, 3, 4, 5];\nconst addTen = partial((x: number, y: number) => x + y, 10);\nconst result = numbers.map(addTen);\nconsole.log(result); // [11, 12, 13, 14, 15]\n```\n\n#### パラメータ\n\n- `func` (`F`): 引数を部分的に適用する関数です。\n- `args` (`any[]`, 選択): 事前に適用する引数です。\n\n#### 戻り値\n\n(`(...args: any[]) => ReturnType<F>`): 一部の引数が事前に適用された新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/partialRight.md",
    "content": "# partialRight\n\n一部のパラメータを後方から事前に適用した新しい関数を作成します。\n\n```typescript\nconst partialRightFunc = partialRight(func, arg1, arg2);\n```\n\n## 使用法\n\n### `partialRight(func, ...args)`\n\n関数の一部のパラメータを後方から固定したいときに`partialRight`を使用してください。`partial`とは逆に、事前に提供されたパラメータが関数の後方に配置され、後で渡されるパラメータは前方に追加されます。\n\n関数の最後のパラメータを固定し、前方のパラメータのみを動的に変更したいときに便利です。\n\n`partialRight.placeholder`を使用すると特定の位置のパラメータを後で渡すことができます。\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\n// 基本的な使用法\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst greetJohn = partialRight(greet, 'John');\nconsole.log(greetJohn('Hello')); // 'Hello, John!'\nconsole.log(greetJohn('Hi')); // 'Hi, John!'\n\n// 複数のパラメータを適用\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\nconst subtractFrom10And5 = partialRight(subtract, 5, 2);\nconsole.log(subtractFrom10And5(10)); // 10 - 5 - 2 = 3\n\n// 数学演算で定数を適用\nfunction divide(dividend: number, divisor: number) {\n  return dividend / divisor;\n}\n\nconst divideBy2 = partialRight(divide, 2);\nconsole.log(divideBy2(10)); // 10 / 2 = 5\nconsole.log(divideBy2(20)); // 20 / 2 = 10\n```\n\nプレースホルダーを使用してパラメータの順序を調整できます。\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\nfunction formatMessage(level: string, message: string, timestamp: string) {\n  return `[${level}] ${message} at ${timestamp}`;\n}\n\n// 最後のパラメータのみ固定し、残りは後で渡す\nconst logWithTime = partialRight(formatMessage, partialRight.placeholder, '2023-01-01');\nconsole.log(logWithTime('INFO', 'Application started'));\n// '[INFO] Application started at 2023-01-01'\n\n// 配列と一緒に使用\nconst numbers = [1, 2, 3, 4, 5];\nconst appendSuffix = partialRight((num: number, suffix: string) => `${num}${suffix}`, 'th');\nconst result = numbers.map(appendSuffix);\nconsole.log(result); // ['1th', '2th', '3th', '4th', '5th']\n```\n\n#### パラメータ\n\n- `func` (`F`): パラメータを部分的に適用する関数です。\n- `args` (`any[]`, 選択): 後方から事前に適用するパラメータです。\n\n#### 戻り値\n\n(`(...args: any[]) => ReturnType<F>`): 一部のパラメータが後方から事前に適用された新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/rest.md",
    "content": "# rest\n\n特定のインデックスからのパラメータを配列にまとめて関数に渡す新しい関数を作成します。\n\n```typescript\nconst restFunc = rest(func, startIndex);\n```\n\n## 使用法\n\n### `rest(func, startIndex?)`\n\n関数の残りのパラメータを配列にまとめて渡したい場合は `rest` を使用します。特定のインデックス以前のパラメータは個別に渡され、それ以降のパラメータは配列にまとめて渡されます。\n\n可変長パラメータを受け取る関数を作成したり、既存の関数のパラメータ処理方法を変更したりする際に便利です。\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\n// 基本的な使用法 (最後のパラメータから配列にまとめる)\nfunction sum(a: number, b: number, numbers: number[]) {\n  return a + b + numbers.reduce((sum, n) => sum + n, 0);\n}\n\nconst restSum = rest(sum); // startIndex はデフォルトで func.length - 1 (2)\nconsole.log(restSum(1, 2, 3, 4, 5)); // 1 + 2 + (3 + 4 + 5) = 15\n// sum 関数は [1, 2, [3, 4, 5]] として呼び出されます\n\n// 別のインデックスから配列にまとめる\nfunction logMessage(level: string, messages: string[]) {\n  console.log(`[${level}] ${messages.join(' ')}`);\n}\n\nconst restLog = rest(logMessage, 1); // 1番目のインデックスから配列にまとめる\nrestLog('INFO', 'Application', 'started', 'successfully');\n// logMessage('INFO', ['Application', 'started', 'successfully']) の形式で呼び出されます\n\n// 実用的な例: 最初のパラメータは個別に、残りは配列として\nfunction format(template: string, values: any[]) {\n  return values.reduce((result, value, index) => {\n    return result.replace(`{${index}}`, value);\n  }, template);\n}\n\nconst restFormat = rest(format, 1);\nconsole.log(restFormat('Hello {0}, welcome to {1}!', 'John', 'our site'));\n// 'Hello John, welcome to our site!'\n```\n\nパラメータが不足している場合の処理も自動的に行われます。\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\nfunction greet(greeting: string, name: string, extras: string[]) {\n  const extraText = extras.length > 0 ? ` ${extras.join(' ')}` : '';\n  return `${greeting} ${name}!${extraText}`;\n}\n\nconst restGreet = rest(greet);\n\nconsole.log(restGreet('Hello', 'Alice', 'Have a great day!'));\n// 'Hello Alice! Have a great day!'\n\nconsole.log(restGreet('Hi', 'Bob'));\n// 'Hi Bob!' (extras は空の配列になります)\n\nconsole.log(restGreet('Hey'));\n// 'Hey undefined!' (name は undefined、extras は空の配列)\n```\n\n#### パラメータ\n\n- `func` (`F`): パラメータ処理方法を変更する関数です。\n- `startIndex` (`number`, オプション): 配列にまとめ始めるインデックスです。デフォルトは `func.length - 1` で、最後のパラメータから配列にまとめます。\n\n#### 戻り値\n\n(`(...args: any[]) => ReturnType<F>`): 特定のインデックスからのパラメータを配列にまとめて元の関数に渡す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/function/retry.md",
    "content": "# retry\n\nPromise を返す関数が成功するまで繰り返し実行します。\n\n```typescript\nconst result = await retry(asyncFunc, options);\n```\n\n## 使用法\n\n### `retry(func, options?)`\n\n非同期関数が失敗したときに自動的に再試行したい場合は `retry` を使用します。API 呼び出しやネットワークリクエストのように一時的に失敗する可能性のある操作に便利です。\n\n再試行回数、再試行間隔、キャンセルシグナルを設定できます。再試行間隔は固定値または再試行回数に応じて動的に計算する関数を使用できます。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\n// 基本的な使用法 (無限再試行)\nconst data1 = await retry(async () => {\n  const response = await fetch('/api/data');\n  if (!response.ok) throw new Error('Failed to fetch');\n  return response.json();\n});\n\n// 再試行回数の制限\nconst data2 = await retry(async () => {\n  return await fetchData();\n}, 3);\n\n// 再試行間隔の設定 (100ms)\nconst data3 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 3,\n    delay: 100,\n  }\n);\n\n// 動的な再試行間隔 (指数バックオフ)\nconst data4 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 5,\n    delay: attempts => Math.min(100 * Math.pow(2, attempts), 5000),\n  }\n);\n```\n\n特定のエラーでのみ再試行したい場合は `shouldRetry` オプションを使用できます。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nclass NetworkError extends Error {\n  constructor(public status: number) {\n    super(`Network error: ${status}`);\n  }\n}\n\n// 500エラー以上でのみ再試行\nconst data5 = await retry(\n  async () => {\n    const response = await fetch('/api/data');\n    if (!response.ok) {\n      throw new NetworkError(response.status);\n    }\n    return response.json();\n  },\n  {\n    retries: 3,\n    shouldRetry: (error, attempt) => error instanceof NetworkError && error.status >= 500,\n  }\n);\n```\n\nAbortSignal を使用して再試行をキャンセルすることもできます。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nconst controller = new AbortController();\n\n// 5秒後に再試行をキャンセル\nsetTimeout(() => controller.abort(), 5000);\n\ntry {\n  const data = await retry(\n    async () => {\n      return await fetchData();\n    },\n    {\n      retries: 10,\n      delay: 1000,\n      signal: controller.signal,\n    }\n  );\n  console.log(data);\n} catch (error) {\n  console.log('再試行がキャンセルされたか失敗しました:', error);\n}\n```\n\n#### パラメータ\n\n- `func` (`() => Promise<T>`): 再試行する非同期関数です。\n- `options` (`number | RetryOptions`, オプション): 再試行回数またはオプションオブジェクトです。\n  - `retries` (`number`, オプション): 再試行する回数です。デフォルトは `Infinity` で無限に再試行します。\n  - `delay` (`number | (attempts: number) => number`, オプション): 再試行間隔(ミリ秒)です。数値または関数を使用できます。デフォルトは `0` です。\n  - `signal` (`AbortSignal`, オプション): 再試行をキャンセルできるシグナルです。\n  - `shouldRetry` (`(error: unknown, attempt: number) => boolean`, オプション): 再試行するかどうかを決定する関数です。`false` を返すと即座にエラーをスローします。\n    - `error`: 発生したエラーオブジェクトです。\n    - `attempt`: 現在の試行回数です (0から開始)。\n\n#### 戻り値\n\n(`Promise<T>`): 関数が正常に実行された結果の値を返します。\n\n#### エラー\n\n再試行回数を超えたり AbortSignal でキャンセルされたりすると、最後のエラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/function/spread.md",
    "content": "# spread\n\nパラメータ配列を展開して関数の個別のパラメータとして渡す新しい関数を作成します。\n\n```typescript\nconst spreadFunc = spread(func);\n```\n\n## 使用法\n\n### `spread(func)`\n\n配列形式のパラメータを個別のパラメータとして展開して関数に渡したい場合は `spread` を使用します。\n\nJavaScript のスプレッド演算子(`...`)と似た役割を果たしますが、関数を変換して配列を受け取るようにする方式です。`apply` メソッドを頻繁に使用する状況で便利です。\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\n// 基本的な使用法\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nconsole.log(spreadAdd([5, 3])); // 8\n\n// 複数のパラメータがある関数\nfunction greet(greeting: string, name: string, punctuation: string) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst spreadGreet = spread(greet);\nconsole.log(spreadGreet(['Hello', 'World', '!'])); // 'Hello, World!'\n\n// Math 関数と一緒に使用\nconst numbers = [1, 2, 3, 4, 5];\nconst spreadMax = spread(Math.max);\nconsole.log(spreadMax(numbers)); // 5\n\nconst spreadMin = spread(Math.min);\nconsole.log(spreadMin(numbers)); // 1\n```\n\n`this` コンテキストも保持されます。\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\nconst calculator = {\n  multiply: function (a: number, b: number, c: number) {\n    return a * b * c;\n  },\n};\n\nconst spreadMultiply = spread(calculator.multiply);\nconsole.log(spreadMultiply.call(calculator, [2, 3, 4])); // 24\n```\n\n#### パラメータ\n\n- `func` (`F`): 配列を個別のパラメータとして展開して受け取る関数です。\n\n#### 戻り値\n\n(`(args: Parameters<F>) => ReturnType<F>`): パラメータ配列を受け取って展開された形式で元の関数に渡す新しい関数を返します。\n\n## Lodash との互換性\n\n`es-toolkit/compat` から `spread` をインポートすると lodash と互換性があります。\n\n- `spread` は `argsIndex` という数値引数を追加で受け取ります。この引数は展開する引数配列が与えられたインデックスを表します。\n  - `argsIndex` が負の値または `NaN` の場合、デフォルト値 `0` として扱われます。小数の場合は、最も近い整数に切り捨てられます。\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\nfunction fn(a: unknown, b: unknown, c: unknown) {\n  return Array.from(arguments);\n}\n\nspread(fn, -1)([1, 2]); // Returns [1, 2]\nspread(fn, NaN)([1, 2]); // Returns [1, 2]\nspread(fn, 'a')([1, 2]); // Returns [1, 2]\nspread(fn, 1.6)(1, [2, 3]); // Returns [1, 2, 3]\n```\n"
  },
  {
    "path": "docs/ja/reference/function/throttle.md",
    "content": "# throttle\n\n関数を指定された時間ごとに最大1回だけ実行されるように制限します。\n\n```typescript\nconst throttledFunc = throttle(func, throttleMs, options);\n```\n\n## 使用法\n\n### `throttle(func, throttleMs, options?)`\n\n関数呼び出しを一定の時間間隔で制限したい場合は `throttle` を使用します。スクロール、リサイズ、マウス移動のように頻繁に発生するイベントを処理する際にパフォーマンスを最適化するのに便利です。\n\n`debounce` とは異なり、throttle は指定された時間内に関数が少なくとも1回は実行されることを保証します。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// 基本的な使用法 (1秒ごとに最大1回実行)\nconst throttledLog = throttle(() => {\n  console.log('関数が実行されました!');\n}, 1000);\n\n// 最初の呼び出し: 即座に実行\nthrottledLog(); // '関数が実行されました!' を出力\n\n// 1秒以内の追加呼び出し: 無視されます\nthrottledLog();\nthrottledLog();\n\n// 1秒後に最後の呼び出しが trailing として実行されます\n\n// スクロールイベントの最適化\nconst handleScroll = throttle(() => {\n  console.log('スクロール位置:', window.scrollY);\n}, 100); // 100ms ごとに最大1回\n\nwindow.addEventListener('scroll', handleScroll);\n\n// API 呼び出しの最適化\nconst searchThrottled = throttle(async (query: string) => {\n  const results = await fetch(`/api/search?q=${query}`);\n  console.log('検索結果:', await results.json());\n}, 300);\n\n// 入力するたびに呼び出しても 300ms ごとにのみ実際の検索を実行\nsearchThrottled('hello');\nsearchThrottled('hello w');\nsearchThrottled('hello world');\n```\n\nleading と trailing オプションを調整できます。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// leading のみ有効 (開始時のみ実行)\nconst leadingOnly = throttle(() => console.log('Leading only'), 1000, { edges: ['leading'] });\n\n// trailing のみ有効 (終了時のみ実行)\nconst trailingOnly = throttle(() => console.log('Trailing only'), 1000, { edges: ['trailing'] });\n\nleadingOnly(); // 即座に実行\nleadingOnly(); // 無視されます\nleadingOnly(); // 無視されます\n\ntrailingOnly(); // 即座には実行されません\ntrailingOnly(); // 無視されます\ntrailingOnly(); // 1秒後に実行されます\n```\n\n手動で制御することもできます。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\nconst throttledFunc = throttle(() => console.log('実行されました'), 1000);\n\nthrottledFunc(); // 即座に実行\nthrottledFunc(); // 待機中\n\n// 待機中の実行を即座に処理\nthrottledFunc.flush();\n\n// 待機中の実行をキャンセル\nthrottledFunc.cancel();\n```\n\n#### パラメータ\n\n- `func` (`F`): 実行を制限する関数です。\n- `throttleMs` (`number`): 実行を制限する時間間隔(ミリ秒)です。\n- `options` (`ThrottleOptions`, オプション): 追加オプションです。\n  - `signal` (`AbortSignal`, オプション): 関数実行をキャンセルできるシグナルです。\n  - `edges` (`Array<'leading' | 'trailing'>`, オプション): 関数実行のタイミングを決定します。デフォルトは `['leading', 'trailing']` です。\n\n#### 戻り値\n\n(`ThrottledFunction<F>`): 実行が制限された新しい関数を返します。`cancel` と `flush` メソッドを含みます。\n\n## Lodash との互換性\n\n`es-toolkit/compat` から `throttle` をインポートすると lodash と完全に互換性があります。\n\n- `throttle` 関数は `leading` と `trailing` オプションを受け取ります。\n\n  - `leading`: スロットル化された関数を最初に呼び出したときに即座に元の関数を実行するかどうかです。デフォルトは `true` です。\n  - `trailing`: 最後のスロットル化された関数の呼び出しから `throttleMs` ミリ秒が経過した後に元の関数を実行するかどうかです。デフォルトは `true` です。\n\n- `throttleMs` オプションのデフォルト値は `0` です。関数呼び出しが次のティックまでのみ遅延されることを意味します。\n\n::: info `throttle` の `leading` と `trailing` オプション\n\nデフォルトで `throttle` の `leading` と `trailing` オプションは `true` です。そのため `{ leading: true }` や `{ trailing: true }` のようなオプションは関数の動作を変更しません。\n\n:::\n\n```typescript\n// leading オプションの例\nconst leadingFn = throttle(\n  () => {\n    console.log('Leading function executed');\n  },\n  1000,\n  { leading: true }\n);\n\n// 'Leading function executed' をすぐにログに記録します。\n// 続けて呼び出しても、1秒ごとに 'Leading function executed' をログに記録します。\nleadingFn();\n\n// trailing オプションの例\nconst trailingFn = throttle(\n  () => {\n    console.log('Trailing function executed');\n  },\n  1000,\n  { trailing: true }\n);\n\n// 'Trailing function executed' をすぐにログに記録します。\n// 続けて呼び出しても、1秒ごとに 'Trailing function executed' をログに記録します。\ntrailingFn();\n\n// leading: false, trailing: true オプションの例\nconst trailingOnlyFn = throttle(\n  () => {\n    console.log('Trailing-only function executed');\n  },\n  1000,\n  { leading: false, trailing: true }\n);\n\n// 'Trailing-only function executed' は最初にはログに記録されません。\n// 続けて呼び出しても、1秒ごとに 'Trailing-only function executed' をログに記録します。\ntrailingOnlyFn();\n```\n"
  },
  {
    "path": "docs/ja/reference/function/unary.md",
    "content": "# unary\n\n関数が最初のパラメータのみを受け取るように制限する新しい関数を作成します。\n\n```typescript\nconst unaryFunc = unary(func);\n```\n\n## 使用法\n\n### `unary(func)`\n\n関数が1つのパラメータのみを受け取るように制限したい場合は `unary` を使用します。追加で渡されるパラメータはすべて無視されます。\n\n配列の `map`、`filter`、`forEach` のようなメソッドでコールバック関数が予想以上に多くのパラメータを受け取るのを防ぐ際に便利です。\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 基本的な使用法\nfunction greet(name: string, age?: number, city?: string) {\n  console.log(`こんにちは、${name}さん!`);\n  if (age) console.log(`年齢: ${age}`);\n  if (city) console.log(`都市: ${city}`);\n}\n\nconst greetOnlyName = unary(greet);\ngreetOnlyName('太郎', 25, '東京'); // 'こんにちは、太郎さん!' のみ出力\n\n// 配列メソッドと一緒に使用\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// parseInt は2番目のパラメータとして基数を受け取りますが、\n// map のコールバックは (value, index, array) を渡します\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN] (予期しない結果)\n\n// unary を使用して最初のパラメータのみを渡す\nconsole.log(numbers.map(unary(parseInt))); // [1, 2, 3, 4, 5] (期待される結果)\n\n// 別の例: 関数が複数のパラメータを受け取るが1つだけ使いたい場合\nfunction logValue(value: any, prefix: string = 'Value:', suffix: string = '') {\n  console.log(`${prefix} ${value} ${suffix}`);\n}\n\nconst data = ['apple', 'banana', 'cherry'];\n\n// prefix と suffix なしで値のみを出力したい場合\ndata.forEach(unary(logValue));\n// Value: apple\n// Value: banana\n// Value: cherry\n```\n\n関数合成でも便利です。\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 複数のパラメータを受け取る関数\nfunction multiply(a: number, b: number = 1, c: number = 1) {\n  return a * b * c;\n}\n\n// 最初のパラメータのみを使用するように制限\nconst multiplyOne = unary(multiply);\n\nconst numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map(x => multiplyOne(x, 2, 3)); // b と c は無視されます\nconsole.log(doubled); // [1, 2, 3, 4, 5] (1 * 1 * 1 の結果)\n```\n\n#### パラメータ\n\n- `func` (`F`): 最初のパラメータのみを受け取るように制限する関数です。\n\n#### 戻り値\n\n(`(...args: any[]) => ReturnType<F>`): 最初のパラメータのみを元の関数に渡す新しい関数を返します。\n"
  },
  {
    "path": "docs/ja/reference/map/countBy.md",
    "content": "# countBy (`Map`)\n\n変換関数に基づいてMapの項目の出現回数をカウントします。\n\n```typescript\nconst counts = countBy(map, mapper);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `countBy(map, mapper)`\n\nMapのエントリが異なるカテゴリにどれだけ属しているかをカウントしたい場合は `countBy` を使用してください。各値とキーのペアからキーを生成する関数を提供すると、生成されたキーとその個数を値とするMapを返します。変換が同じキーを生成する各エントリに対してカウントが増加します。\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 1],\n]);\n\nconst result = countBy(map, value => value);\n// 結果: Map(2) { 1 => 2, 2 => 1 }\n```\n\n様々な基準でエントリをカウントできます。\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\n// 値のプロパティでカウントします。\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25, department: 'Engineering' }],\n  ['user2', { name: 'Bob', age: 30, department: 'Engineering' }],\n  ['user3', { name: 'Charlie', age: 35, department: 'Sales' }],\n]);\n\nconst byDepartment = countBy(users, user => user.department);\n// 結果: Map(2) { 'Engineering' => 2, 'Sales' => 1 }\n\n// 派生値でカウントします。\nconst ages = new Map([\n  ['p1', 25],\n  ['p2', 30],\n  ['p3', 25],\n  ['p4', 40],\n]);\n\nconst ageGroups = countBy(ages, age => (age < 30 ? 'young' : 'senior'));\n// 結果: Map(2) { 'young' => 2, 'senior' => 2 }\n\n// 値とキーの両方を使用してカウントします。\nconst items = new Map([\n  ['alice', 20],\n  ['bob', 30],\n  ['carol', 20],\n]);\n\nconst firstLetter = countBy(items, (value, key) => key[0]);\n// 結果: Map(3) { 'a' => 1, 'b' => 1, 'c' => 1 }\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 出現回数をカウントするMapです。\n- `mapper` (`(value: V, key: K, object: Map<K, V>) => K2`): カウント用のキーを生成する関数です。\n\n#### 戻り値\n\n(`Map<K2, number>`): マッピングされたキーとその個数を含むMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/every.md",
    "content": "# every (`Map`)\n\nMapのすべてのエントリが提供された述語関数を満たすかどうかをテストします。\n\n```typescript\nconst allMatch = every(map, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `every(map, doesMatch)`\n\nMapのすべてのエントリが特定の条件を満たすかどうかを確認したい場合は `every` を使用してください。各エントリをテストする述語関数を提供すると、すべてのエントリが述語を満たす場合はtrueを、そうでない場合はfalseを返します。\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 10],\n  ['b', 20],\n  ['c', 30],\n]);\n\nconst result = every(map, value => value > 5);\n// 結果: true\n\nconst result2 = every(map, value => value > 15);\n// 結果: false\n```\n\n様々な条件をテストできます。\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\n// すべての値が基準を満たすかチェックします。\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 8, inStock: true }],\n]);\n\nconst allInStock = every(inventory, item => item.inStock);\n// 結果: true\n\n// すべてのキーがパターンに一致するかチェックします。\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['api.host', 'localhost'],\n]);\n\nconst allApiSettings = every(settings, (value, key) => key.startsWith('api.'));\n// 結果: true\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): テストするMapです。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 各エントリをテストする述語関数です。\n\n#### 戻り値\n\n(`boolean`): すべてのエントリが述語を満たす場合はtrue、そうでない場合はfalseを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/filter.md",
    "content": "# filter (`Map`)\n\n述語関数に基づいてMapをフィルタリングします。\n\n```typescript\nconst filtered = filter(map, callback);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `filter(map, callback)`\n\n特定の条件を満たすエントリのみを含む新しいMapを作成したい場合は `filter` を使用してください。各エントリをテストする述語関数を提供すると、述語がtrueを返すエントリのみで構成された新しいMapを返します。\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n  ['d', 4],\n]);\n\nconst result = filter(map, value => value > 2);\n// 結果:\n// Map(2) {\n//   'c' => 3,\n//   'd' => 4\n// }\n```\n\n様々な基準でフィルタリングできます。\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\n// 値の型でフィルタリングします。\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 0, inStock: false }],\n  ['orange', { quantity: 5, inStock: true }],\n]);\n\nconst inStockItems = filter(inventory, item => item.inStock);\n// 結果: 'apple'と'orange'のエントリを含むMap\n\n// キーのパターンでフィルタリングします。\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['admin_1', 'Bob'],\n  ['user_2', 'Charlie'],\n]);\n\nconst users = filter(data, (value, key) => key.startsWith('user_'));\n// 結果: 'user_1'と'user_2'のエントリを含むMap\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): フィルタリングするMapです。\n- `callback` (`(value: V, key: K, map: Map<K, V>) => boolean`): 各エントリをテストする述語関数です。\n\n#### 戻り値\n\n(`Map<K, V>`): 述語を満たすエントリのみを含む新しいMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/findKey.md",
    "content": "# findKey (`Map`)\n\n述語関数がtrueを返すMapの最初のキーを見つけます。\n\n```typescript\nconst key = findKey(map, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `findKey(map, doesMatch)`\n\n特定の条件に一致する最初のエントリのキーを見つけたい場合は `findKey` を使用してください。各エントリをテストする述語関数を提供すると、最初に一致したエントリのキーを返すか、見つからない場合はundefinedを返します。\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findKey(map, value => value.quantity > 10);\n// 結果: 'grape'\n```\n\n様々な基準で検索できます。\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\n// 値のプロパティで検索します。\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n  ['user3', { name: 'Charlie', age: 35 }],\n]);\n\nconst seniorUser = findKey(users, user => user.age >= 35);\n// 結果: 'user3'\n\n// キーのパターンで検索します。\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['db.host', 'localhost'],\n]);\n\nconst dbSetting = findKey(settings, (value, key) => key.startsWith('db.'));\n// 結果: 'db.host'\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 検索するMapです。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 各エントリをテストする述語関数です。\n\n#### 戻り値\n\n(`K | undefined`): 述語を満たす最初のエントリのキーを返すか、見つからない場合はundefinedを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/findValue.md",
    "content": "# findValue (`Map`)\n\n述語関数がtrueを返すMapの最初の値を見つけます。\n\n```typescript\nconst value = findValue(map, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `findValue(map, doesMatch)`\n\n特定の条件に一致する最初のエントリの値を見つけたい場合は `findValue` を使用してください。各エントリをテストする述語関数を提供すると、最初に一致したエントリの値を返すか、見つからない場合はundefinedを返します。\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findValue(map, value => value.quantity > 10);\n// 結果: { color: 'purple', quantity: 15 }\n```\n\n様々な基準で検索できます。\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\n// 値のプロパティで検索します。\nconst products = new Map([\n  ['p1', { name: 'Laptop', price: 1000, inStock: true }],\n  ['p2', { name: 'Mouse', price: 25, inStock: false }],\n  ['p3', { name: 'Keyboard', price: 75, inStock: true }],\n]);\n\nconst expensiveProduct = findValue(products, product => product.price > 500);\n// 結果: { name: 'Laptop', price: 1000, inStock: true }\n\n// キーのパターンで検索します。\nconst cache = new Map([\n  ['temp_1', { data: 'foo', timestamp: 100 }],\n  ['perm_1', { data: 'bar', timestamp: 200 }],\n  ['temp_2', { data: 'baz', timestamp: 300 }],\n]);\n\nconst permanent = findValue(cache, (value, key) => key.startsWith('perm_'));\n// 結果: { data: 'bar', timestamp: 200 }\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 検索するMapです。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 各エントリをテストする述語関数です。\n\n#### 戻り値\n\n(`V | undefined`): 述語を満たす最初のエントリの値を返すか、見つからない場合はundefinedを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/forEach.md",
    "content": "# forEach (`Map`)\n\nMapの各エントリに対して提供された関数を一度ずつ実行します。\n\n```typescript\nforEach(map, callback);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `forEach(map, callback)`\n\nMapの各エントリに対して関数を実行したい場合は `forEach` を使用してください。コールバック関数は値、キー、そしてMap自体を引数として受け取ります。ログ出力、外部状態の更新、または各エントリに対する操作の実行などの副作用に便利です。\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nforEach(map, (value, key) => {\n  console.log(`${key}: ${value}`);\n});\n// 出力:\n// a: 1\n// b: 2\n// c: 3\n```\n\n各エントリに対して様々な操作を実行できます。\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\n// 値を累積します。\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nlet total = 0;\nforEach(prices, value => {\n  total += value;\n});\n// totalは4.25になります\n\n// エントリを配列に収集します。\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n]);\n\nconst userList: string[] = [];\nforEach(users, (value, key) => {\n  userList.push(`${key}: ${value.name} (${value.age})`);\n});\n// userList: ['user1: Alice (25)', 'user2: Bob (30)']\n\n// 条件に基づいて外部Mapを更新します。\nconst inventory = new Map([\n  ['item1', { stock: 10, price: 5 }],\n  ['item2', { stock: 0, price: 10 }],\n  ['item3', { stock: 5, price: 15 }],\n]);\n\nconst outOfStock = new Map<string, any>();\nforEach(inventory, (value, key) => {\n  if (value.stock === 0) {\n    outOfStock.set(key, value);\n  }\n});\n// outOfStockにはitem2が含まれます\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 反復処理するMapです。\n- `callback` (`(value: V, key: K, map: Map<K, V>) => void`): 各エントリに対して実行する関数です。\n\n#### 戻り値\n\n(`void`): この関数は値を返しません。\n"
  },
  {
    "path": "docs/ja/reference/map/hasValue.md",
    "content": "# hasValue (`Map`)\n\nMapが特定の値を含むかどうかをチェックします。\n\n```typescript\nconst exists = hasValue(map, searchElement);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `hasValue(map, searchElement)`\n\nMapが特定の値を含むかどうかを確認したい場合は `hasValue` を使用してください。この関数はSameValueZero比較を使用します(Array.prototype.includesと同様)。つまり、NaNはNaNと等しいと見なされます。\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = hasValue(map, 2);\n// 結果: true\n\nconst result2 = hasValue(map, 5);\n// 結果: false\n```\n\n様々な値の型を検索できます。\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\n// NaNを検索します(SameValueZero比較を使用)\nconst numbers = new Map([\n  ['a', 1],\n  ['b', NaN],\n  ['c', 3],\n]);\n\nconst hasNaN = hasValue(numbers, NaN);\n// 結果: true\n\n// オブジェクトを検索します(参照の等価性)\nconst obj = { id: 1 };\nconst objects = new Map([\n  ['first', obj],\n  ['second', { id: 2 }],\n]);\n\nconst hasObj = hasValue(objects, obj);\n// 結果: true\n\nconst hasSimilar = hasValue(objects, { id: 1 });\n// 結果: false (異なる参照)\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 検索するMapです。\n- `searchElement` (`V`): 検索する値です。\n\n#### 戻り値\n\n(`boolean`): Mapが値を含む場合はtrue、そうでない場合はfalseを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/keyBy.md",
    "content": "# keyBy (`Map`)\n\n提供されたキー生成関数に基づいてMapの各エントリをマッピングします。\n\n```typescript\nconst result = keyBy(map, getKeyFromEntry);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `keyBy(map, getKeyFromEntry)`\n\n値から新しいキーを生成してMapを再構成したい場合は `keyBy` を使用してください。各値とキーのペアからキーを生成する関数を提供すると、キー関数によって生成されたキーと元のマップの対応する値で構成された新しいMapを返します。複数のエントリが同じキーを生成する場合、最後に見つかった値が使用されます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['x', { type: 'fruit', name: 'apple' }],\n  ['y', { type: 'fruit', name: 'banana' }],\n  ['z', { type: 'vegetable', name: 'carrot' }],\n]);\n\nconst result = keyBy(map, item => item.type);\n// 結果:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 注: 'banana'は最後の'fruit'だったため保持されます\n```\n\n様々な基準でデータを再構成できます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\n// IDプロパティでインデックス化します。\nconst users = new Map([\n  ['user1', { id: 101, name: 'Alice', role: 'admin' }],\n  ['user2', { id: 102, name: 'Bob', role: 'user' }],\n  ['user3', { id: 103, name: 'Charlie', role: 'user' }],\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 結果: キーが101, 102, 103のMap\n\n// ロール別にインデックス化します(ロールごとの最後のユーザーが選択されます)\nconst byRole = keyBy(users, user => user.role);\n// 結果: Map(2) {\n//   'admin' => { id: 101, name: 'Alice', role: 'admin' },\n//   'user' => { id: 103, name: 'Charlie', role: 'user' }\n// }\n\n// 値と元のキーの両方を使用してキーを変換します。\nconst inventory = new Map([\n  ['item_1', { category: 'electronics', price: 100 }],\n  ['item_2', { category: 'electronics', price: 200 }],\n]);\n\nconst categorized = keyBy(inventory, (value, key) => `${value.category}_${key}`);\n// 結果: キーが'electronics_item_1', 'electronics_item_2'のMap\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): マッピングするエントリのマップです。\n- `getKeyFromEntry` (`(value: V, key: K, object: Map<K, V>) => K2`): 値とキーのペアからキーを生成する関数です。\n\n#### 戻り値\n\n(`Map<K2, V>`): 生成されたキーが各エントリの値にマッピングされたMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/mapKeys.md",
    "content": "# mapKeys (`Map`)\n\n提供された関数でキーを変換し、値は同じままの新しいMapを作成します。\n\n```typescript\nconst transformed = mapKeys(map, getNewKey);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `mapKeys(map, getNewKey)`\n\nMapのキーを変換しながら値を変更せずに保持したい場合は `mapKeys` を使用してください。各エントリから新しいキーを生成する関数を提供すると、変換されたキーを持つ新しいMapを返します。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapKeys(map, (value, key) => key.toUpperCase());\n// 結果:\n// Map(3) {\n//   'A' => 1,\n//   'B' => 2,\n//   'C' => 3\n// }\n```\n\n様々な方法でキーを変換できます。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\n// キーに接頭辞を追加します。\nconst categories = new Map([\n  ['fruit', ['apple', 'banana']],\n  ['vegetable', ['carrot', 'potato']],\n]);\n\nconst prefixed = mapKeys(categories, (value, key) => `category_${key}`);\n// 結果: 'category_fruit', 'category_vegetable'のキーを持つMap\n\n// 値に基づいて変換します。\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst ranked = mapKeys(scores, (value, key) => (value >= 90 ? `top_${key}` : key));\n// 結果: 'top_alice', 'bob', 'top_charlie'のキーを持つMap\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 変換するMapです。\n- `getNewKey` (`(value: V, key: K, object: Map<K, V>) => K`): 値とキーのペアから新しいキーを生成する関数です。\n\n#### 戻り値\n\n(`Map<K, V>`): 変換されたキーと同じ値を持つ新しいMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/mapValues.md",
    "content": "# mapValues (`Map`)\n\n提供された関数で値を変換し、キーは同じままの新しいMapを作成します。\n\n```typescript\nconst transformed = mapValues(map, getNewValue);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `mapValues(map, getNewValue)`\n\nMapの値を変換しながらキーを変更せずに保持したい場合は `mapValues` を使用してください。各エントリから新しい値を生成する関数を提供すると、変換された値を持つ新しいMapを返します。\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapValues(map, value => value * 2);\n// 結果:\n// Map(3) {\n//   'a' => 2,\n//   'b' => 4,\n//   'c' => 6\n// }\n```\n\n様々な方法で値を変換できます。\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\n// 値をフォーマットします。\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nconst formatted = mapValues(prices, value => `$${value.toFixed(2)}`);\n// 結果: '$1.50', '$0.75', '$2.00'の値を持つMap\n\n// キーに基づいて変換します。\nconst inventory = new Map([\n  ['premium_item', 10],\n  ['standard_item', 20],\n  ['basic_item', 30],\n]);\n\nconst adjusted = mapValues(inventory, (value, key) => (key.startsWith('premium_') ? value * 1.5 : value));\n// 結果: 15, 20, 30の値を持つMap\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 変換するMapです。\n- `getNewValue` (`(value: V, key: K, object: Map<K, V>) => V`): 値とキーのペアから新しい値を生成する関数です。\n\n#### 戻り値\n\n(`Map<K, V>`): 同じキーと変換された値を持つ新しいMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/map/reduce.md",
    "content": "# reduce (`Map`)\n\nMapのエントリを反復処理してコールバック関数を適用し、単一の値に縮小します。\n\n```typescript\nconst result = reduce(map, callback, initialValue);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `reduce(map, callback, initialValue?)`\n\n各エントリから結果を蓄積してMapを単一の値に変換したい場合は `reduce` を使用してください。各エントリを処理してアキュムレータを更新するコールバック関数を提供してください。初期値が提供されると、アキュムレータの開始値として使用されます。初期値が提供されずMapが空の場合、TypeErrorがスローされます。\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = reduce(map, (acc, value) => acc + value, 0);\n// 結果: 6\n```\n\n様々な方法でMapを縮小できます。\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\n// 初期値を使用して合計を計算します。\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst totalScore = reduce(scores, (acc, score) => acc + score, 0);\n// 結果: 274\n\n// 初期値なし(最初の値を使用)\nconst numbers = new Map([\n  ['a', 10],\n  ['b', 20],\n]);\n\nconst sum = reduce(numbers, (acc, value) => acc + value);\n// 結果: 30 (最初の値10から開始)\n\n// Mapからオブジェクトを構築します。\nconst settings = new Map([\n  ['theme', 'dark'],\n  ['lang', 'en'],\n  ['notifications', true],\n]);\n\nconst config = reduce(settings, (acc, value, key) => ({ ...acc, [key]: value }), {} as Record<string, any>);\n// 結果: { theme: 'dark', lang: 'en', notifications: true }\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): 縮小するMapです。\n- `callback` (`(accumulator: A, value: V, key: K, map: Map<K, V>) => A`): 各エントリを処理してアキュムレータを更新する関数です。\n- `initialValue` (`A`, オプション): アキュムレータの初期値です。提供されない場合、Mapの最初の値が使用されます。\n\n#### 戻り値\n\n(`A`): 最終的に蓄積された値を返します。\n\n#### 例外\n\n(`TypeError`): Mapが空で初期値が提供されない場合にスローされます。\n"
  },
  {
    "path": "docs/ja/reference/map/some.md",
    "content": "# some (`Map`)\n\nMapの少なくとも1つのエントリが提供された述語関数を満たすかどうかをテストします。\n\n```typescript\nconst anyMatch = some(map, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/map`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `some(map, doesMatch)`\n\nMapの少なくとも1つのエントリが特定の条件を満たすかどうかを確認したい場合は `some` を使用してください。各エントリをテストする述語関数を提供すると、少なくとも1つのエントリが述語を満たす場合はtrueを、そうでない場合はfalseを返します。\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = some(map, value => value > 2);\n// 結果: true\n\nconst result2 = some(map, value => value > 5);\n// 結果: false\n```\n\n様々な条件をテストできます。\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\n// いずれかの値が基準を満たすかチェックします。\nconst inventory = new Map([\n  ['apple', { quantity: 0, inStock: false }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 0, inStock: false }],\n]);\n\nconst hasStock = some(inventory, item => item.inStock);\n// 結果: true\n\n// いずれかのキーがパターンに一致するかチェックします。\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['user_2', 'Bob'],\n  ['group_1', 'Admins'],\n]);\n\nconst hasAdmin = some(data, (value, key) => key.startsWith('admin_'));\n// 結果: false\n```\n\n#### パラメータ\n\n- `map` (`Map<K, V>`): テストするMapです。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 各エントリをテストする述語関数です。\n\n#### 戻り値\n\n(`boolean`): 少なくとも1つのエントリが述語を満たす場合はtrue、そうでない場合はfalseを返します。\n"
  },
  {
    "path": "docs/ja/reference/math/clamp.md",
    "content": "# clamp\n\n数値を指定された範囲内に固定します。\n\n```typescript\nconst clamped = clamp(value, maximum);\nconst clamped = clamp(value, minimum, maximum);\n```\n\n## 使用法\n\n### `clamp(value, maximum)`\n\n数値を与えられた最大値以下に制限したい場合は`clamp`を使用してください。値が最大値を超える場合は最大値に固定され、そうでない場合は元の値を返します。\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 最大値で制限\nconst result1 = clamp(10, 5); // result1 は 5 になります (10が最大値5に制限される)\nconst result2 = clamp(3, 5); // result2 は 3 になります (5より小さいのでそのまま)\n```\n\n#### パラメータ\n\n- `value` (`number`): 固定する数値です。\n- `maximum` (`number`): 最大値です。\n\n#### 戻り値\n\n(`number`): 最大値以下に固定された数値を返します。\n\n### `clamp(value, minimum, maximum)`\n\n数値を与えられた最小値と最大値の範囲内に固定したい場合は`clamp`を使用してください。値が範囲を外れる場合は、最も近い境界値に制限されます。\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 最小値と最大値の範囲内に固定\nconst result1 = clamp(10, 5, 15); // result1 は 10 になります (5と15の範囲内)\nconst result2 = clamp(2, 5, 15); // result2 は 5 になります (最小値5に制限される)\nconst result3 = clamp(20, 5, 15); // result3 は 15 になります (最大値15に制限される)\n```\n\n#### パラメータ\n\n- `value` (`number`): 固定する数値です。\n- `minimum` (`number`): 最小値です。\n- `maximum` (`number`): 最大値です。\n\n#### 戻り値\n\n(`number`): 指定された範囲内で固定された数値を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/inRange.md",
    "content": "# inRange\n\n値が指定された範囲内にあるかを確認します。\n\n```typescript\nconst result = inRange(value, maximum);\nconst result = inRange(value, minimum, maximum);\n```\n\n## 使用法\n\n### `inRange(value, maximum)`\n\n値が0から最大値未満の範囲内にあるかを確認したい場合は `inRange` を使用してください。最小値は自動的に0になります。\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 0から5未満の範囲で確認します\nconst result1 = inRange(3, 5); // result1はtrueになります (0 <= 3 < 5)\nconst result2 = inRange(5, 5); // result2はfalseになります (5は5未満ではない)\nconst result3 = inRange(-1, 5); // result3はfalseになります (-1 < 0)\n```\n\n#### パラメータ\n\n- `value` (`number`): 確認する値です。\n- `maximum` (`number`): 範囲の最大値(含まない)です。\n\n#### 戻り値\n\n(`boolean`): 値が0以上最大値未満の範囲内にある場合は `true`、そうでない場合は `false` を返します。\n\n### `inRange(value, minimum, maximum)`\n\n値が指定された最小値と最大値の範囲内にあるかを確認したい場合は `inRange` を使用してください。\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 最小値と最大値の範囲で確認します\nconst result1 = inRange(3, 2, 5); // result1はtrueになります (2 <= 3 < 5)\nconst result2 = inRange(1, 2, 5); // result2はfalseになります (1 < 2)\nconst result3 = inRange(5, 2, 5); // result3はfalseになります (5は5未満ではない)\n\n// 負数範囲でも使用できます\nconst result4 = inRange(-3, -5, -1); // result4はtrueになります (-5 <= -3 < -1)\n```\n\n#### パラメータ\n\n- `value` (`number`): 確認する値です。\n- `minimum` (`number`): 範囲の最小値(含む)です。\n- `maximum` (`number`): 範囲の最大値(含まない)です。\n\n#### 戻り値\n\n(`boolean`): 値が指定された範囲内にある場合は `true`、そうでない場合は `false` を返します。\n\n#### エラー\n\n最小値が最大値より大きいか等しい場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/mean.md",
    "content": "# mean\n\n数値配列の平均を計算します。\n\n```typescript\nconst average = mean(nums);\n```\n\n## 使用法\n\n### `mean(nums)`\n\n数値配列の平均値を求めたい場合は `mean` を使用してください。すべての数値を足し合わせて配列の長さで割ることで平均を計算します。空の配列が与えられた場合は `NaN` を返します。\n\n```typescript\nimport { mean } from 'es-toolkit/math';\n\n// 数値配列の平均を計算します\nconst numbers = [1, 2, 3, 4, 5];\nconst result = mean(numbers);\n// resultは3になります ((1 + 2 + 3 + 4 + 5) / 5 = 15 / 5 = 3)\n\n// 小数点がある数値の平均を計算します\nconst decimals = [1.5, 2.5, 3.5];\nconst decimalResult = mean(decimals);\n// decimalResultは2.5になります\n\n// 空の配列の場合はNaNを返します\nconst emptyResult = mean([]);\n// emptyResultはNaNになります\n```\n\n#### パラメータ\n\n- `nums` (`readonly number[]`): 平均を計算する数値配列です。\n\n#### 戻り値\n\n(`number`): 配列内のすべての数値の平均を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/meanBy.md",
    "content": "# meanBy\n\n各要素に `getValue` 関数を適用して配列の平均を計算します。\n\n```typescript\nconst average = meanBy(items, getValue);\n```\n\n## 使用法\n\n### `meanBy(items, getValue)`\n\n配列の各要素に関数を適用した結果の平均を求めたい場合は `meanBy` を使用してください。オブジェクト配列から特定のプロパティの平均を計算したり、各要素を変換した後で平均を求めたりするのに便利です。空の配列が与えられた場合は `NaN` を返します。\n\n```typescript\nimport { meanBy } from 'es-toolkit/math';\n\n// オブジェクト配列から特定のプロパティの平均を計算します\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }];\nconst averageAge = meanBy(people, person => person.age);\n// averageAgeは25になります ((23 + 25 + 27) / 3 = 75 / 3 = 25)\n\n// 文字列の長さの平均を計算します\nconst words = ['apple', 'banana', 'cherry'];\nconst averageLength = meanBy(words, word => word.length);\n// averageLengthは約5.67になります ((5 + 6 + 6) / 3 ≈ 5.67)\n\n// 空の配列の場合はNaNを返します\nconst emptyResult = meanBy([], x => x);\n// emptyResultはNaNになります\n```\n\n#### パラメータ\n\n- `items` (`readonly T[]`): 平均を計算する配列です。\n- `getValue` (`(element: T) => number`): 各要素から数値を選択する関数です。\n\n#### 戻り値\n\n(`number`): `getValue` 関数を基準に、配列内のすべての値の平均を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/median.md",
    "content": "# median\n\n数値配列の中央値を計算します。\n\n```typescript\nconst middle = median(nums);\n```\n\n## 使用法\n\n### `median(nums)`\n\n数値配列の中央値を求めたい場合は `median` を使用してください。配列を昇順に並び替えた後、真ん中に位置する値を見つけます。奇数個の要素を持つ配列の場合は正確に真ん中の値を、偶数個の要素を持つ配列の場合は真ん中の2つの値の平均を返します。空の配列が与えられた場合は `NaN` を返します。\n\n```typescript\nimport { median } from 'es-toolkit/math';\n\n// 奇数個の要素がある配列の中央値を計算します\nconst oddNumbers = [1, 2, 3, 4, 5];\nconst oddResult = median(oddNumbers);\n// oddResultは3になります (ソートされた配列 [1, 2, 3, 4, 5] の真ん中の値)\n\n// 偶数個の要素がある配列の中央値を計算します\nconst evenNumbers = [1, 2, 3, 4];\nconst evenResult = median(evenNumbers);\n// evenResultは2.5になります ((2 + 3) / 2 = 2.5)\n\n// ソートされていない配列も自動的にソートします\nconst unordered = [3, 1, 4, 1, 5];\nconst unorderedResult = median(unordered);\n// unorderedResultは3になります (ソート後 [1, 1, 3, 4, 5] の真ん中の値)\n\n// 空の配列の場合はNaNを返します\nconst emptyResult = median([]);\n// emptyResultはNaNになります\n```\n\n#### パラメータ\n\n- `nums` (`readonly number[]`): 中央値を計算する数値配列です。\n\n#### 戻り値\n\n(`number`): 配列内のすべての数値の中央値を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/medianBy.md",
    "content": "# medianBy\n\n各要素に `getValue` 関数を適用して配列の中央値を計算します。\n\n```typescript\nconst middle = medianBy(items, getValue);\n```\n\n## 使用法\n\n### `medianBy(items, getValue)`\n\n配列の各要素に関数を適用した結果の中央値を求めたい場合は `medianBy` を使用してください。オブジェクト配列から特定のプロパティの中央値を計算したり、各要素を変換した後で中央値を求めたりするのに便利です。奇数個の要素を持つ配列の場合は正確に真ん中の値を、偶数個の要素を持つ配列の場合は真ん中の2つの値の平均を返します。空の配列が与えられた場合は `NaN` を返します。\n\n```typescript\nimport { medianBy } from 'es-toolkit/math';\n\n// オブジェクト配列から特定のプロパティの中央値を計算します(奇数個)\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }, { age: 29 }, { age: 31 }];\nconst medianAge = medianBy(people, person => person.age);\n// medianAgeは27になります (ソートされたages [23, 25, 27, 29, 31] の真ん中の値)\n\n// オブジェクト配列から特定のプロパティの中央値を計算します(偶数個)\nconst scores = [{ score: 80 }, { score: 90 }, { score: 85 }, { score: 95 }];\nconst medianScore = medianBy(scores, item => item.score);\n// medianScoreは87.5になります (ソートされたscores [80, 85, 90, 95] で (85 + 90) / 2)\n\n// 文字列の長さの中央値を計算します\nconst words = ['cat', 'elephant', 'dog', 'butterfly', 'ant'];\nconst medianLength = medianBy(words, word => word.length);\n// medianLengthは3になります (lengths [3, 8, 3, 9, 3] をソートすると [3, 3, 3, 8, 9] で真ん中の値)\n\n// 空の配列の場合はNaNを返します\nconst emptyResult = medianBy([], x => x);\n// emptyResultはNaNになります\n```\n\n#### パラメータ\n\n- `items` (`readonly T[]`): 中央値を計算する配列です。\n- `getValue` (`(element: T) => number`): 各要素から数値を選択する関数です。\n\n#### 戻り値\n\n(`number`): `getValue` 関数を基準に、配列内のすべての値の中央値を返します。空の配列の場合は `NaN` を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/random.md",
    "content": "# random\n\n指定された範囲内でランダムな数値を生成します。生成される数値は小数点を含む数値です。\n\n```typescript\nconst randomNumber = random(min, max);\n```\n\n## 使用法\n\n### `random(maximum)` / `random(minimum, maximum)`\n\nランダムな数値が必要な場合は `random` を使用してください。小数点がある数値を生成します。\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 0以上5未満のランダムな小数を生成します。\nconst num1 = random(5);\nconsole.log(num1); // 例: 2.718281828\n\n// 2以上10未満のランダムな小数を生成します。\nconst num2 = random(2, 10);\nconsole.log(num2); // 例: 7.158765432\n\n// 負数範囲でも使用できます。\nconst num3 = random(-5, -1);\nconsole.log(num3); // 例: -3.842134567\n\n// 小数範囲も可能です。\nconst num4 = random(1.5, 2.5);\nconsole.log(num4); // 例: 1.923456789\n```\n\n範囲が正しくない場合はエラーをスローします。\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 最大値が0以下の場合はエラーが発生します。\ntry {\n  random(0);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n\n// 最小値が最大値より大きいか等しい場合はエラーが発生します。\ntry {\n  random(5, 3);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n```\n\n#### パラメータ\n\n- `maximum` (`number`): 単一パラメータ使用時の最大値(含まない)です。0より大きくなければなりません。\n- `minimum` (`number`): 最小値(含む)です。\n- `maximum` (`number`): 最大値(含まない)です。最小値より大きくなければなりません。\n\n#### 戻り値\n\n(`number`): 指定された範囲内のランダムな小数を返します。\n\n#### エラー\n\n最大値が最小値より小さいか等しい場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/randomInt.md",
    "content": "# randomInt\n\n指定された範囲内でランダムな整数を生成します。\n\n```typescript\nconst randomInteger = randomInt(min, max);\n```\n\n## 使用法\n\n### `randomInt(maximum)` / `randomInt(minimum, maximum)`\n\nランダムな整数が必要な場合は `randomInt` を使用してください。小数点のない整数のみを返します。\n\n```typescript\nimport { randomInt } from 'es-toolkit/math';\n\n// 0以上5未満のランダムな整数を生成します。\nconst num1 = randomInt(5);\nconsole.log(num1); // 例: 3\n\n// 2以上10未満のランダムな整数を生成します。\nconst num2 = randomInt(2, 10);\nconsole.log(num2); // 例: 7\n\n// 負数範囲でも使用できます。\nconst num3 = randomInt(-5, -1);\nconsole.log(num3); // 例: -3\n\n// サイコロのシミュレーション(1-6)\nconst diceRoll = randomInt(1, 7);\nconsole.log(diceRoll); // 例: 4\n\n// 配列からランダムなインデックスを選択\nconst items = ['apple', 'banana', 'cherry', 'date'];\nconst randomIndex = randomInt(items.length);\nconsole.log(items[randomIndex]); // 例: 'banana'\n```\n\n#### パラメータ\n\n- `maximum` (`number`): 単一パラメータ使用時の最大値(含まない)です。0より大きくなければなりません。\n- `minimum` (`number`): 最小値(含む)です。\n- `maximum` (`number`): 最大値(含まない)です。最小値より大きくなければなりません。\n\n#### 戻り値\n\n(`number`): 指定された範囲内のランダムな整数を返します。\n\n#### エラー\n\n最大値が最小値より小さいか等しい場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/range.md",
    "content": "# range\n\n指定された範囲とステップで数値配列を生成します。\n\n```typescript\nconst numbers = range(end);\nconst numbers = range(start, end, step);\n```\n\n## 使用法\n\n### `range(end)`\n\n0から指定された終了値までの連続した数値配列が必要な場合は `range` を使用してください。ループで便利です。\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 0から3までの配列を作成します。\nconst numbers1 = range(4);\nconsole.log(numbers1); // [0, 1, 2, 3]\n\n// 10個の要素を持つ配列のインデックス\nconst indices = range(10);\nconsole.log(indices); // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\n// forEachの代わりに使用できます。\nrange(5).forEach(i => {\n  console.log(`反復 ${i}`); // 反復 0, 反復 1, 反復 2, 反復 3, 反復 4\n});\n```\n\n#### パラメータ\n\n- `end` (`number`): 終了値(含まない)です。0から始まります。\n\n#### 戻り値\n\n(`number[]`): 0から終了値まで生成された数値配列を返します。\n\n### `range(start, end, step?)`\n\n指定された開始値、終了値、ステップで連続した数値配列が必要な場合は `range` を使用してください。ループで便利です。\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 1から4までの配列を作成します。\nconst numbers2 = range(1, 5);\nconsole.log(numbers2); // [1, 2, 3, 4]\n\n// 0から20まで5ずつ増加する配列を作成します。\nconst numbers3 = range(0, 20, 5);\nconsole.log(numbers3); // [0, 5, 10, 15]\n\n// 負の方向にも作成できます。\nconst numbers4 = range(0, -5, -1);\nconsole.log(numbers4); // [0, -1, -2, -3, -4]\n\n// 大きい数から小さい数へも可能です。\nconst numbers5 = range(5, 0, -1);\nconsole.log(numbers5); // [5, 4, 3, 2, 1]\n\n// 特定範囲のページ番号を作成\nconst pageNumbers = range(1, 11);\nconsole.log(pageNumbers); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n```\n\n#### パラメータ\n\n- `start` (`number`): 開始値です。結果配列に含まれます。\n- `end` (`number`): 終了値です。結果配列に含まれません。\n- `step` (`number`, 選択): 各数値間の増分です。ゼロ以外の整数である必要があり、デフォルト値は `1` です。\n\n#### 戻り値\n\n(`number[]`): 指定された範囲とステップで生成された数値配列を返します。\n\n#### エラー\n\n- `step` が0または整数でない場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/rangeRight.md",
    "content": "# rangeRight\n\n指定された範囲とステップで逆順の数値配列を生成します。\n\n```typescript\nconst numbers = rangeRight(end);\nconst numbers = rangeRight(start, end, step?);\n```\n\n## 使用法\n\n### `rangeRight(end)`\n\n終了値から0まで逆順の連続した数値配列が必要な場合は `rangeRight` を使用してください。`range` と同じですが、結果が後ろから出てきます。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 3から0まで逆順の配列を作成します。\nconst numbers1 = rangeRight(4);\nconsole.log(numbers1); // [3, 2, 1, 0]\n\n// 配列の逆順インデックス\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst reverseIndices = rangeRight(items.length);\nreverseIndices.forEach(i => {\n  console.log(items[i]); // 'e', 'd', 'c', 'b', 'a' の順に出力\n});\n```\n\n#### パラメータ\n\n- `end` (`number`): 終了値(含まない)です。0から始まります。\n\n#### 戻り値\n\n(`number[]`): 終了値から0まで生成された逆順の数値配列を返します。\n\n### `rangeRight(start, end, step?)`\n\n指定された開始値、終了値、ステップで逆順の連続した数値配列が必要な場合は `rangeRight` を使用してください。`range` と同じですが、結果が後ろから出てきます。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 4から1まで逆順の配列を作成します。\nconst numbers2 = rangeRight(1, 5);\nconsole.log(numbers2); // [4, 3, 2, 1]\n\n// 15から0まで5ずつ減少する配列を作成します。\nconst numbers3 = rangeRight(0, 20, 5);\nconsole.log(numbers3); // [15, 10, 5, 0]\n\n// 負の方向にも作成できます。\nconst numbers4 = rangeRight(-5, 0, 1);\nconsole.log(numbers4); // [-1, -2, -3, -4, -5]\n\n// 小さい数から大きい数へも可能です。\nconst numbers5 = rangeRight(5, 0, -1);\nconsole.log(numbers5); // [1, 2, 3, 4, 5]\n```\n\nカウントダウンやページネーションで逆順が必要な場合に便利です。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// カウントダウンを作成\nconst countdown = rangeRight(0, 11);\nconsole.log(countdown); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n\n// ページネーションで最後のページから最初のページへ\nconst pageNumbers = rangeRight(1, 11);\nconsole.log(pageNumbers); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n```\n\n#### パラメータ\n\n- `start` (`number`): 開始値です。結果配列に含まれます。\n- `end` (`number`): 終了値です。結果配列に含まれません。\n- `step` (`number`, 選択): 各数値間の増分です。ゼロ以外の整数である必要があり、デフォルト値は `1` です。\n\n#### 戻り値\n\n(`number[]`): 指定された範囲とステップで生成された逆順の数値配列を返します。\n\n#### エラー\n\n- `step` が0または整数でない場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/round.md",
    "content": "# round\n\n数値を指定された小数点以下の桁数に四捨五入します。\n\n```typescript\nconst rounded = round(value, precision?);\n```\n\n## 使用法\n\n### `round(value, precision?)`\n\n数値を特定の小数点以下の桁数に四捨五入したい場合は `round` を使用してください。正確な計算のための数学関数です。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// デフォルト - 整数に四捨五入します。\nconst num1 = round(1.2345);\nconsole.log(num1); // 1\n\n// 小数点以下第2位まで四捨五入します。\nconst num2 = round(1.2345, 2);\nconsole.log(num2); // 1.23\n\n// 小数点以下第3位まで四捨五入します。\nconst num3 = round(1.2387, 3);\nconsole.log(num3); // 1.239\n\n// 負の数も四捨五入できます。\nconst num4 = round(-1.2345, 2);\nconsole.log(num4); // -1.23\n\n// 大きい数値も処理します。\nconst num5 = round(123.456789, 4);\nconsole.log(num5); // 123.4568\n```\n\n価格計算や統計で便利です。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 価格計算(小数点以下第2位まで)\nconst price = 19.999;\nconst finalPrice = round(price, 2);\nconsole.log(finalPrice); // 20.00\n\n// パーセント計算(小数点以下第1位まで)\nconst percentage = 66.66666;\nconst displayPercentage = round(percentage, 1);\nconsole.log(displayPercentage); // 66.7\n\n// 評価計算(小数点以下第1位まで)\nconst rating = 4.267;\nconst displayRating = round(rating, 1);\nconsole.log(displayRating); // 4.3\n```\n\n精度が重要な計算で四捨五入します。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 数学計算結果を整理\nconst result = Math.PI * 2;\nconst cleanResult = round(result, 5);\nconsole.log(cleanResult); // 6.28318\n\n// 測定値を四捨五入\nconst measurement = 15.789123;\nconst rounded = round(measurement, 3);\nconsole.log(rounded); // 15.789\n```\n\n無効な precision 値はエラーをスローします。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// precisionが整数でない場合、エラーが発生します。\ntry {\n  round(1.23, 2.5);\n} catch (error) {\n  console.error(error.message); // 'Precision must be an integer.'\n}\n```\n\n#### パラメータ\n\n- `value` (`number`): 四捨五入する数値です。\n- `precision` (`number`, 選択): 小数点以下の桁数です。整数である必要があり、デフォルト値は `0` です。\n\n#### 戻り値\n\n(`number`): 指定された精度に四捨五入された数値を返します。\n\n#### エラー\n\n- `precision` が整数でない場合、エラーをスローします。\n"
  },
  {
    "path": "docs/ja/reference/math/sum.md",
    "content": "# sum\n\n数値配列のすべての要素を足した合計を返します。\n\n```typescript\nconst total = sum(numbers);\n```\n\n## 使用法\n\n### `sum(nums)`\n\n数値の合計を求めたい場合は `sum` を使用してください。配列のすべての数値を足して合計を計算します。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 基本的な数値の合計\nconst numbers = [1, 2, 3, 4, 5];\nconst total = sum(numbers);\nconsole.log(total); // 15\n\n// 小数の合計\nconst prices = [19.99, 25.5, 3.75];\nconst totalPrice = sum(prices);\nconsole.log(totalPrice); // 49.24\n\n// 負の数と正の数が混在した合計\nconst values = [-10, 5, -3, 8];\nconst result = sum(values);\nconsole.log(result); // 0\n\n// 単一の数値配列\nconst single = [42];\nconst singleSum = sum(single);\nconsole.log(singleSum); // 42\n```\n\n空配列と実際の使用例です。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 空配列は0を返します。\nconst empty = sum([]);\nconsole.log(empty); // 0\n\n// スコアの合計を計算\nconst scores = [85, 92, 78, 96, 88];\nconst totalScore = sum(scores);\nconst averageScore = totalScore / scores.length;\nconsole.log(totalScore); // 439\nconsole.log(averageScore); // 87.8\n\n// 月次売上の合計\nconst monthlySales = [12000, 15000, 18000, 14000, 16000];\nconst totalSales = sum(monthlySales);\nconsole.log(totalSales); // 75000\n\n// ショッピングカートの合計金額\nconst cartItems = [29.99, 15.5, 8.75, 42.0];\nconst cartTotal = sum(cartItems);\nconsole.log(cartTotal); // 96.24\n```\n\n計算結果を他の関数と一緒に使用できます。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\nimport { round } from 'es-toolkit/math';\n\n// 合計後に四捨五入\nconst measurements = [1.234, 2.567, 3.891];\nconst total = sum(measurements);\nconst rounded = round(total, 2);\nconsole.log(rounded); // 7.69\n\n// パーセント計算\nconst votes = [45, 32, 23];\nconst totalVotes = sum(votes);\nconst percentages = votes.map(vote => round((vote / totalVotes) * 100, 1));\nconsole.log(percentages); // [45.0, 32.0, 23.0]\n```\n\n#### パラメータ\n\n- `nums` (`readonly number[]`): 合計を計算する数値配列です。\n\n#### 戻り値\n\n(`number`): 配列内のすべての数値の合計を返します。空配列の場合は `0` を返します。\n"
  },
  {
    "path": "docs/ja/reference/math/sumBy.md",
    "content": "# sumBy\n\n変換関数を使用して配列要素の合計を計算します。\n\n```typescript\nconst total = sumBy(items, getValue);\n```\n\n## 使用法\n\n### `sumBy(items, getValue)`\n\n配列の各要素を数値に変換して合計を求めたい場合は `sumBy` を使用してください。オブジェクト配列から特定のプロパティの合計を求める際に便利です。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// オブジェクト配列から特定のプロパティの合計\nconst products = [\n  { name: 'laptop', price: 1000 },\n  { name: 'mouse', price: 25 },\n  { name: 'keyboard', price: 75 },\n];\nconst totalPrice = sumBy(products, item => item.price);\nconsole.log(totalPrice); // 1100\n\n// ユーザーの年齢の合計\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst totalAge = sumBy(users, user => user.age);\nconsole.log(totalAge); // 90\n\n// 文字列長の合計\nconst words = ['hello', 'world', 'test'];\nconst totalLength = sumBy(words, word => word.length);\nconsole.log(totalLength); // 14\n```\n\n複雑な計算も可能です。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 重み付けスコアの合計\nconst scores = [\n  { subject: 'math', score: 90, weight: 0.3 },\n  { subject: 'english', score: 85, weight: 0.2 },\n  { subject: 'science', score: 95, weight: 0.5 },\n];\nconst weightedSum = sumBy(scores, item => item.score * item.weight);\nconsole.log(weightedSum); // 91\n\n// 配列の配列から長さの合計\nconst arrays = [[1, 2], [3, 4, 5], [6]];\nconst totalElements = sumBy(arrays, arr => arr.length);\nconsole.log(totalElements); // 6\n\n// 条件付き計算\nconst orders = [\n  { id: 1, amount: 100, status: 'completed' },\n  { id: 2, amount: 200, status: 'pending' },\n  { id: 3, amount: 150, status: 'completed' },\n];\nconst completedTotal = sumBy(orders, order => (order.status === 'completed' ? order.amount : 0));\nconsole.log(completedTotal); // 250\n```\n\n実際の使用例です。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 月次売上の合計\nconst monthlyReports = [\n  { month: 'January', sales: 12000, expenses: 8000 },\n  { month: 'February', sales: 15000, expenses: 9000 },\n  { month: 'March', sales: 18000, expenses: 11000 },\n];\nconst totalSales = sumBy(monthlyReports, report => report.sales);\nconst totalExpenses = sumBy(monthlyReports, report => report.expenses);\nconst totalProfit = totalSales - totalExpenses;\nconsole.log(totalSales); // 45000\nconsole.log(totalExpenses); // 28000\nconsole.log(totalProfit); // 17000\n\n// 学生の平均点数計算のための総点\nconst students = [\n  { name: 'Alice', tests: [85, 90, 88] },\n  { name: 'Bob', tests: [92, 87, 95] },\n  { name: 'Charlie', tests: [78, 85, 82] },\n];\nconst totalTestScores = sumBy(students, student => student.tests.reduce((sum, score) => sum + score, 0));\nconsole.log(totalTestScores); // 762\n```\n\n空配列は0を返します。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\nconst emptyArray = [];\nconst result = sumBy(emptyArray, x => x.value);\nconsole.log(result); // 0\n```\n\n#### パラメータ\n\n- `items` (`readonly T[]`): 合計を計算する配列です。\n- `getValue` (`(element: T) => number`): 各要素を数値に変換する関数です。\n\n#### 戻り値\n\n(`number`): 変換関数を適用した値の合計を返します。空配列の場合は `0` を返します。\n"
  },
  {
    "path": "docs/ja/reference/object/clone.md",
    "content": "# clone\n\n与えられた値をシャローコピーします。\n\n```typescript\nconst cloned = clone(obj);\n```\n\n## 使用法\n\n### `clone(obj)`\n\nオブジェクト、配列、Date、RegExp などの値をシャローコピーしたい場合は `clone` を使用してください。シャローコピーは、最上位レベルのプロパティのみが新しくコピーされ、ネストされたオブジェクトや配列は元の値と参照を共有します。\n\n```typescript\nimport { clone } from 'es-toolkit/object';\n\n// プリミティブ値はそのまま返されます\nconst num = 29;\nconst clonedNum = clone(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// 配列をシャローコピー\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\nconsole.log(clonedArr); // [1, 2, 3]\nconsole.log(clonedArr === arr); // false\n\n// オブジェクトをシャローコピー\nconst obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\nconst clonedObj = clone(obj);\nconsole.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.c === obj.c); // true (シャローコピーのため、ネストされた配列は参照を共有)\n```\n\n`Date`、`RegExp`、`Map`、`Set` などのさまざまな JavaScript 型をサポートしています。\n\n```typescript\n// Date オブジェクト\nconst date = new Date();\nconst clonedDate = clone(date);\nconsole.log(clonedDate !== date); // true\nconsole.log(clonedDate.getTime() === date.getTime()); // true\n\n// RegExp オブジェクト\nconst regex = /abc/gi;\nconst clonedRegex = clone(regex);\nconsole.log(clonedRegex !== regex); // true\nconsole.log(clonedRegex.source === regex.source); // true\n\n// Map と Set\nconst map = new Map([['key', 'value']]);\nconst clonedMap = clone(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key')); // 'value'\n```\n\n#### パラメータ\n\n- `obj` (`T`):コピーする値です。オブジェクト、配列、プリミティブ値など、すべての型が可能です。\n\n#### 戻り値\n\n(`T`):与えられた値のシャローコピーです。\n"
  },
  {
    "path": "docs/ja/reference/object/cloneDeep.md",
    "content": "# cloneDeep\n\n与えられた値をディープコピーします。\n\n```typescript\nconst deepCloned = cloneDeep(obj);\n```\n\n## 使用法\n\n### `cloneDeep(obj)`\n\nオブジェクトや配列を、ネストされた構造まですべて新しくコピーしたい場合は `cloneDeep` を使用してください。ディープコピーは、すべてのネストされたオブジェクトと配列を完全に独立してコピーするため、元の値とコピーはお互いに影響しません。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/object';\n\n// プリミティブ値はそのまま返されます\nconst num = 29;\nconst clonedNum = cloneDeep(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// ネストされたオブジェクトをディープコピー\nconst obj = { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] };\nconst clonedObj = cloneDeep(obj);\nconsole.log(clonedObj); // { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.a === obj.a); // false (ネストされたオブジェクトも新しくコピーされます)\nconsole.log(clonedObj.d === obj.d); // false (ネストされた配列も新しくコピーされます)\nconsole.log(clonedObj.d[2] === obj.d[2]); // false (配列内のオブジェクトも新しくコピーされます)\n\n// 元の値を修正してもコピーに影響しません\nconst original = { a: { count: 1 } };\nconst copied = cloneDeep(original);\noriginal.a.count = 2;\nconsole.log(copied.a.count); // 1 (変わりません)\n```\n\n`Map` や `Set` などのさまざまな JavaScript 型をサポートし、循環参照も安全に処理します。\n\n```typescript\n// Map と Set をディープコピー\nconst map = new Map([['key', { nested: 'value' }]]);\nconst clonedMap = cloneDeep(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key') !== map.get('key')); // true (ネストされたオブジェクトも新しくコピーされます)\n\n// 循環参照も安全に処理\nconst circular: any = { name: 'test' };\ncircular.self = circular;\nconst clonedCircular = cloneDeep(circular);\nconsole.log(clonedCircular !== circular); // true\nconsole.log(clonedCircular.self === clonedCircular); // true (循環参照が維持されます)\n```\n\ngetter として定義された読み取り専用プロパティの場合、コピーされたオブジェクトには getter の戻り値が通常のプロパティとして保存されます。\n\n```typescript\nconst source = {\n  get computedValue() {\n    return 42;\n  },\n  normalValue: 'hello',\n};\n\nconst cloned = cloneDeep(source);\nconsole.log(cloned); // { computedValue: 42, normalValue: 'hello' }\n```\n\n#### パラメータ\n\n- `obj` (`T`):ディープコピーする値です。オブジェクト、配列、プリミティブ値など、すべての型が可能です。\n\n#### 戻り値\n\n(`T`):与えられた値のディープコピーです。\n"
  },
  {
    "path": "docs/ja/reference/object/cloneDeepWith.md",
    "content": "# cloneDeepWith\n\n与えられた値をカスタム関数を通じてディープコピーします。\n\n```typescript\nconst customCloned = cloneDeepWith(obj, cloneValue);\n```\n\n## 使用法\n\n### `cloneDeepWith(obj, cloneValue)`\n\nオブジェクトや配列をディープコピーする際、特定の値についてはカスタム方式でコピーしたい時に`cloneDeepWith`を使用してください。カスタム関数`cloneValue`が値を返すとその値を使用し、`undefined`を返すとデフォルトの方式でコピーします。\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/object';\n\n// 数値を2倍にしてコピー\nconst obj = { a: 1, b: { c: 2, d: 'text' } };\nconst clonedObj = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value * 2;\n  }\n  // undefinedを返すとデフォルトの方式でコピー\n});\nconsole.log(clonedObj); // { a: 2, b: { c: 4, d: 'text' } }\n\n// 配列のすべての要素に1を加えてコピー\nconst arr = [1, [2, 3], { num: 4 }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value + 1;\n  }\n});\nconsole.log(clonedArr); // [2, [3, 4], { num: 5 }]\n```\n\nカスタム関数には現在の値、キー、元のオブジェクト、内部スタック情報がパラメータとして提供されます。\n\n```typescript\nconst data = {\n  user: { name: 'Alice', age: 30 },\n  settings: { theme: 'dark', lang: 'ko' },\n};\n\nconst result = cloneDeepWith(data, (value, key, obj, stack) => {\n  // 'user'オブジェクトは特別な方式でコピー\n  if (key === 'user' && typeof value === 'object') {\n    return { ...value, cloned: true };\n  }\n\n  // 文字列にprefixを追加\n  if (typeof value === 'string') {\n    return `cloned_${value}`;\n  }\n});\n\nconsole.log(result);\n// {\n//   user: { name: 'cloned_Alice', age: 30, cloned: true },\n//   settings: { theme: 'cloned_dark', lang: 'cloned_ko' }\n// }\n```\n\nカスタム関数を使用すると、オブジェクトをコピーする方法を自由に設定できます。例えば、次のように`Date`オブジェクトを1年後の時点にコピーできます。\n\n```typescript\nconst data = {\n  created: new Date('2023-01-01'),\n  updated: new Date('2023-12-31'),\n  name: 'Document',\n};\n\nconst cloned = cloneDeepWith(data, value => {\n  // Dateオブジェクトは時間を1年後に設定\n  if (value instanceof Date) {\n    const newDate = new Date(value);\n    newDate.setFullYear(newDate.getFullYear() + 1);\n    return newDate;\n  }\n});\n\nconsole.log(cloned.created.getFullYear()); // 2024\nconsole.log(cloned.updated.getFullYear()); // 2024\n```\n\n#### パラメータ\n\n- `obj` (`T`): ディープコピーする値です。\n- `cloneValue` (`(value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any`): カスタムコピー関数です。コピーする値を返すか、デフォルトの方式を使用するには`undefined`を返してください。\n  - `value`: 現在コピーされている値です。\n  - `key`: 現在コピーされている値のプロパティ名です。\n  - `obj`: コピーする元のオブジェクトです。\n  - `stack`: 循環参照を処理するための内部スタックです。\n\n#### 戻り値\n\n(`T`): カスタム関数を通じて処理されたディープコピーです。\n"
  },
  {
    "path": "docs/ja/reference/object/findKey.md",
    "content": "# findKey\n\n与えられた条件を満たす最初の要素のキーを見つけます。\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 使用法\n\n### `findKey(obj, predicate)`\n\nオブジェクトで特定の条件を満たす最初の要素のキーを見つけたい時に`findKey`を使用してください。条件関数が`true`を返す最初の値のキーを返します。\n\n```typescript\nimport { findKey } from 'es-toolkit/object';\n\n// 年齢が30未満の最初のユーザーを見つける\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nconst youngUserKey = findKey(users, user => user.age < 30);\nconsole.log(youngUserKey); // 'alice'\n\n// 非アクティブユーザーを見つける\nconst inactiveUserKey = findKey(users, user => !user.active);\nconsole.log(inactiveUserKey); // 'bob'\n\n// 条件を満たす要素がない場合\nconst seniorUserKey = findKey(users, user => user.age > 50);\nconsole.log(seniorUserKey); // undefined\n```\n\n条件関数は現在の値、キー、全体のオブジェクトを受け取ります。\n\n```typescript\nconst data = {\n  item1: { priority: 'high', status: 'pending' },\n  item2: { priority: 'low', status: 'done' },\n  item3: { priority: 'high', status: 'done' },\n};\n\n// キー名と値の両方を考慮した検索\nconst result = findKey(data, (value, key, obj) => {\n  return key.includes('2') && value.status === 'done';\n});\nconsole.log(result); // 'item2'\n```\n\n複雑なオブジェクト構造でも使用できます。\n\n```typescript\nconst products = {\n  laptop: {\n    specs: { ram: 16, cpu: 'Intel i7' },\n    price: 1200,\n    available: true,\n  },\n  phone: {\n    specs: { ram: 8, cpu: 'Snapdragon' },\n    price: 800,\n    available: false,\n  },\n  tablet: {\n    specs: { ram: 12, cpu: 'Apple M1' },\n    price: 1000,\n    available: true,\n  },\n};\n\nconst affordableKey = findKey(products, product => product.price < 1000 && product.available);\nconsole.log(affordableKey); // undefined (条件を満たす製品なし)\n\nconst highRamKey = findKey(products, product => product.specs.ram >= 12);\nconsole.log(highRamKey); // 'laptop'\n```\n\n#### パラメータ\n\n- `obj` (`T extends Record<any, any>`): 検索するオブジェクトです。\n- `predicate` (`(value: T[keyof T], key: keyof T, obj: T) => boolean`): 各要素に対して実行する条件関数です。`true`を返す最初の要素のキーを見つけます。\n\n#### 戻り値\n\n(`keyof T | undefined`): 条件を満たす最初の要素のキーです。条件を満たす要素がない場合は`undefined`を返します。\n"
  },
  {
    "path": "docs/ja/reference/object/flattenObject.md",
    "content": "# flattenObject\n\nネストされたオブジェクトをフラットなオブジェクトに変換します。\n\n```typescript\nconst flattened = flattenObject(object, options?);\n```\n\n## 使用法\n\n### `flattenObject(object, options?)`\n\n深くネストされたオブジェクトや配列をドット(`.`)記法を使用したキーでフラット化したい時に`flattenObject`を使用してください。各ネストされたプロパティが区切り文字で連結されたキーを持つ単一レベルのオブジェクトになります。\n\n```typescript\nimport { flattenObject } from 'es-toolkit/object';\n\n// ネストされたオブジェクトをフラット化\nconst nestedObject = {\n  a: {\n    b: {\n      c: 1,\n    },\n  },\n  d: [2, 3],\n  e: 'simple',\n};\n\nconst flattened = flattenObject(nestedObject);\nconsole.log(flattened);\n// {\n//   'a.b.c': 1,\n//   'd.0': 2,\n//   'd.1': 3,\n//   'e': 'simple'\n// }\n\n// カスタム区切り文字を使用\nconst withCustomDelimiter = flattenObject(nestedObject, { delimiter: '/' });\nconsole.log(withCustomDelimiter);\n// {\n//   'a/b/c': 1,\n//   'd/0': 2,\n//   'd/1': 3,\n//   'e': 'simple'\n// }\n```\n\n次のように設定オブジェクトをフラット化する時に便利に使用できます。\n\n```typescript\n// 設定オブジェクトをフラット化\nconst config = {\n  database: {\n    host: 'localhost',\n    port: 5432,\n    credentials: {\n      username: 'admin',\n      password: 'secret',\n    },\n  },\n  features: ['auth', 'logging'],\n  debug: true,\n};\n\nconst flatConfig = flattenObject(config);\nconsole.log(flatConfig);\n// {\n//   'database.host': 'localhost',\n//   'database.port': 5432,\n//   'database.credentials.username': 'admin',\n//   'database.credentials.password': 'secret',\n//   'features.0': 'auth',\n//   'features.1': 'logging',\n//   'debug': true\n// }\n```\n\n`options.delimiter`オプションを使用すると、ドット(`.`)ではなくアンダースコア(`_`)のようなカスタム文字でオブジェクトをフラット化できます。\n\n```typescript\n// アンダースコアで連結された環境変数スタイルに\nconst envStyle = flattenObject(config, { delimiter: '_' });\nconsole.log(envStyle);\n// {\n//   'database_host': 'localhost',\n//   'database_port': 5432,\n//   'database_credentials_username': 'admin',\n//   'database_credentials_password': 'secret',\n//   'features_0': 'auth',\n//   'features_1': 'logging',\n//   'debug': true\n// }\n```\n\n空のオブジェクトと特殊なケースも適切に処理します。\n\n```typescript\n// 空のオブジェクトや配列\nconst emptyCase = {\n  empty: {},\n  emptyArray: [],\n  nullValue: null,\n  undefinedValue: undefined,\n};\n\nconst result = flattenObject(emptyCase);\nconsole.log(result);\n// {\n//   'empty': {},\n//   'emptyArray: [],\n//   'nullValue': null,\n//   'undefinedValue': undefined\n// }\n// 空のオブジェクトや空の配列もキーとして表示されます\n```\n\n#### パラメータ\n\n- `object` (`object`): フラット化するオブジェクトです。\n- `options` (`FlattenObjectOptions`, 選択): フラット化オプションです。\n  - `delimiter` (`string`, 選択): ネストされたキーを連結する区切り文字です。デフォルトは`'.'`です。\n\n#### 戻り値\n\n(`Record<string, any>`): すべてのネストされたプロパティがフラット化された新しいオブジェクトです。\n"
  },
  {
    "path": "docs/ja/reference/object/invert.md",
    "content": "# invert\n\nオブジェクトのキーと値を入れ替えた新しいオブジェクトを生成します。\n\n```typescript\nconst inverted = invert(obj);\n```\n\n## 使用法\n\n### `invert(obj)`\n\nオブジェクトのキーと値を入れ替えた新しいオブジェクトを作りたい時に`invert`を使用してください。元のオブジェクトのキーは新しいオブジェクトの値になり、元のオブジェクトの値は新しいオブジェクトのキーになります。重複した値がある場合、後に出現するキーが使用されます。\n\n```typescript\nimport { invert } from 'es-toolkit/object';\n\n// 基本的な使い方\nconst original = { a: 1, b: 2, c: 3 };\nconst inverted = invert(original);\nconsole.log(inverted); // { 1: 'a', 2: 'b', 3: 'c' }\n\n// 重複した値がある場合\nconst withDuplicates = { a: 1, b: 1, c: 2 };\nconst result = invert(withDuplicates);\nconsole.log(result); // { 1: 'b', 2: 'c' } (後に出現する'b'がキー1の値として使用される)\n\n// 文字列キーと数値の値\nconst grades = { alice: 85, bob: 92, charlie: 88 };\nconst invertedGrades = invert(grades);\nconsole.log(invertedGrades); // { 85: 'alice', 92: 'bob', 88: 'charlie' }\n```\n\n様々な型のキーと値で使用できます。\n\n```typescript\n// 数値キーと文字列の値\nconst statusCodes = { 200: 'OK', 404: 'Not Found', 500: 'Internal Server Error' };\nconst invertedCodes = invert(statusCodes);\nconsole.log(invertedCodes);\n// { 'OK': '200', 'Not Found': '404', 'Internal Server Error': '500' }\n\n// 逆方向の検索が必要な場合に便利です\nconst userRoles = { admin: 'administrator', user: 'regular_user', guest: 'visitor' };\nconst roleToKey = invert(userRoles);\nconsole.log(roleToKey);\n// { 'administrator': 'admin', 'regular_user': 'user', 'visitor': 'guest' }\n\n// これで値でキーを見つけることができます\nfunction findRoleKey(roleName: string) {\n  return roleToKey[roleName];\n}\nconsole.log(findRoleKey('administrator')); // 'admin'\n```\n\n列挙型(Enum)や定数オブジェクトと一緒に使用すると便利です。\n\n```typescript\n// 色コードマッピング\nconst colorCodes = {\n  red: '#FF0000',\n  green: '#00FF00',\n  blue: '#0000FF',\n};\n\nconst codeToColor = invert(colorCodes);\nconsole.log(codeToColor);\n// { '#FF0000': 'red', '#00FF00': 'green', '#0000FF': 'blue' }\n\n// これで色コードで色名を見つけることができます\nfunction getColorName(code: string) {\n  return codeToColor[code] || 'unknown';\n}\nconsole.log(getColorName('#FF0000')); // 'red'\n```\n\n#### パラメータ\n\n- `obj` (`Record<K, V>`): キーと値を入れ替えるオブジェクトです。キーと値の両方が文字列、数値、またはシンボルである必要があります。\n\n#### 戻り値\n\n(`Record<V, K>`): 元のオブジェクトのキーと値が入れ替わった新しいオブジェクトです。\n"
  },
  {
    "path": "docs/ja/reference/object/mapKeys.md",
    "content": "# mapKeys\n\nオブジェクトのキーを関数を通じて変換した新しいオブジェクトを返します。\n\n```typescript\nconst newObj = mapKeys(object, getNewKey);\n```\n\n## 使用法\n\n### `mapKeys(object, getNewKey)`\n\nオブジェクトの各キーを変換して新しいオブジェクトを作りたい時に`mapKeys`を使用してください。値はそのまま維持され、キーのみが`getNewKey`関数の結果に変更されます。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/object';\n\n// キーに接頭辞を追加\nconst obj = { a: 1, b: 2 };\nconst prefixed = mapKeys(obj, (value, key) => `prefix_${key}`);\n// prefixedは{ prefix_a: 1, prefix_b: 2 }になります\n\n// キーと値を組み合わせて新しいキーを作成\nconst combined = mapKeys(obj, (value, key) => `${key}${value}`);\n// combinedは{ a1: 1, b2: 2 }になります\n\n// キーを大文字に変換\nconst uppercased = mapKeys(obj, (value, key) => key.toString().toUpperCase());\n// uppercasedは{ A: 1, B: 2 }になります\n```\n\n#### パラメータ\n\n- `object` (`T extends Record<PropertyKey, any>`): キーを変換するオブジェクトです。\n- `getNewKey` (`(value: T[keyof T], key: keyof T, object: T) => K`): 新しいキーを生成する関数です。値、キー、全体のオブジェクトをパラメータとして受け取ります。\n\n#### 戻り値\n\n(`Record<K, T[keyof T]>`): キーが変換された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/mapValues.md",
    "content": "# mapValues\n\nオブジェクトの値を関数を通じて変換した新しいオブジェクトを返します。\n\n```typescript\nconst newObj = mapValues(object, getNewValue);\n```\n\n## 使用法\n\n### `mapValues(object, getNewValue)`\n\nオブジェクトの各値を変換して新しいオブジェクトを作りたい時に`mapValues`を使用してください。キーはそのまま維持され、値のみが`getNewValue`関数の結果に変更されます。\n\n```typescript\nimport { mapValues } from 'es-toolkit/object';\n\n// すべての値を2倍に\nconst numbers = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(numbers, value => value * 2);\n// doubledは{ a: 2, b: 4, c: 6 }になります\n\n// 文字列の値を大文字に変換\nconst strings = { first: 'hello', second: 'world' };\nconst uppercased = mapValues(strings, value => value.toUpperCase());\n// uppercasedは{ first: 'HELLO', second: 'WORLD' }になります\n\n// キーと値を一緒に活用\nconst scores = { alice: 85, bob: 90, charlie: 95 };\nconst grades = mapValues(scores, (value, key) => `${key}: ${value >= 90 ? 'A' : 'B'}`);\n// gradesは{ alice: 'alice: B', bob: 'bob: A', charlie: 'charlie: A' }になります\n```\n\n#### パラメータ\n\n- `object` (`T extends object`): 値を変換するオブジェクトです。\n- `getNewValue` (`(value: T[K], key: K, object: T) => V`): 新しい値を生成する関数です。値、キー、全体のオブジェクトをパラメータとして受け取ります。\n\n#### 戻り値\n\n(`Record<K, V>`): 値が変換された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/merge.md",
    "content": "# merge\n\nソースオブジェクトをターゲットオブジェクトに深くマージしてターゲットオブジェクトを修正します。\n\n```typescript\nconst result = merge(target, source);\n```\n\n## 使用法\n\n### `merge(target, source)`\n\n2つのオブジェクトを深くマージしたい時に`merge`を使用してください。ネストされたオブジェクトと配列も再帰的にマージされます。[toMerged](./toMerged.md)とは異なり、元の`target`オブジェクトが修正されます。\n\n```typescript\nimport { merge } from 'es-toolkit/object';\n\n// 基本的なオブジェクトマージ\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// resultとtargetの両方が{ a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }になります\n\n// 配列もマージされます\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nmerge(arrayTarget, arraySource);\n// arrayTargetは{ a: [3, 2], b: { x: 1, y: 2 } }になります\n\n// null値も適切に処理します\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nmerge(nullTarget, nullSource);\n// nullTargetは{ a: [1, 2, 3] }になります\n```\n\n`undefined`値は既存の値を上書きしません。\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nmerge(target, source);\n// targetは{ a: 1, b: 2, c: 3 }になります (bは上書きされません)\n```\n\n#### パラメータ\n\n- `target` (`T extends Record<PropertyKey, any>`): ソースオブジェクトをマージするターゲットオブジェクトです。このオブジェクトが修正されます。\n- `source` (`S extends Record<PropertyKey, any>`): ターゲットオブジェクトにマージするソースオブジェクトです。\n\n#### 戻り値\n\n(`T & S`): ソースオブジェクトがマージされたターゲットオブジェクトを返します。\n\n## 例\n\n```typescript\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n// 戻り値: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\nconst target = { a: [1, 2], b: { x: 1 } };\nconst source = { a: [3], b: { y: 2 } };\nconst result = merge(target, source);\nconsole.log(result);\n// 戻り値: { a: [3, 2], b: { x: 1, y: 2 } }\n\nconst target = { a: null };\nconst source = { a: [1, 2, 3] };\nconst result = merge(target, source);\nconsole.log(result);\n// 戻り値: { a: [1, 2, 3] }\n```\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { merge } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n```\n\n:::\n\n## パフォーマンス比較\n\n|                   | [バンドルサイズ](../../bundle-size.md) | [ランタイムパフォーマンス](../../performance.md) |\n| ----------------- | -------------------------------------- | ------------------------------------------------ |\n| es-toolkit        | 271 bytes (97.8% smaller)              | 1,952,436 times (3.65× faster)                   |\n| es-toolkit/compat | 4,381 bytes (64.9% smaller)            | 706,558 times (1.32× faster)                     |\n| lodash-es         | 12,483 bytes                           | 533,484 times                                    |\n"
  },
  {
    "path": "docs/ja/reference/object/mergeWith.md",
    "content": "# mergeWith\n\nカスタムマージ関数を使用してソースオブジェクトをターゲットオブジェクトに深くマージしてターゲットオブジェクトを修正します。\n\n```typescript\nconst result = mergeWith(target, source, mergeFunction);\n```\n\n## 使用法\n\n### `mergeWith(target, source, merge)`\n\n2つのオブジェクトをマージする際、各プロパティに対してカスタムマージロジックを適用したい時に`mergeWith`を使用してください。マージ関数が`undefined`を返すと、デフォルトの深いマージロジックを使用します。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/object';\n\n// 数値の値を加算してマージ\nconst target = { a: 1, b: 2, c: { x: 10 } };\nconst source = { b: 3, c: { x: 20, y: 30 }, d: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue, key) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue; // 数値は加算\n  }\n  // undefinedを返すとデフォルトのマージロジックを使用\n});\n// resultとtargetの両方が{ a: 1, b: 5, c: { x: 30, y: 30 }, d: 4 }になります\n\n// 配列を連結してマージ\nconst arrayTarget = { items: [1, 2], metadata: { count: 2 } };\nconst arraySource = { items: [3, 4], metadata: { count: 2 } };\n\nmergeWith(arrayTarget, arraySource, (targetValue, sourceValue) => {\n  if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n    return targetValue.concat(sourceValue);\n  }\n});\n// arrayTargetは{ items: [1, 2, 3, 4], metadata: { count: 2 } }になります\n\n// キーに応じて異なるマージロジックを適用\nconst config = { timeout: 1000, retries: 3, features: { featureA: true } };\nconst updates = { timeout: 2000, retries: 5, features: { featureB: false } };\n\nmergeWith(config, updates, (targetValue, sourceValue, key) => {\n  if (key === 'timeout') {\n    return Math.max(targetValue, sourceValue); // timeoutは大きい値を選択\n  }\n  if (key === 'retries') {\n    return Math.min(targetValue, sourceValue); // retriesは小さい値を選択\n  }\n  // 他のプロパティはデフォルトのマージロジックを使用\n});\n// configは{ timeout: 2000, retries: 3, features: { featureA: true, featureB: false } }になります\n```\n\n#### パラメータ\n\n- `target` (`T extends Record<PropertyKey, any>`): ソースオブジェクトをマージするターゲットオブジェクトです。このオブジェクトが修正されます。\n- `source` (`S extends Record<PropertyKey, any>`): ターゲットオブジェクトにマージするソースオブジェクトです。\n- `merge` (`(targetValue: any, sourceValue: any, key: string, target: T, source: S) => any`): カスタムマージ関数です。\n  - `targetValue`: ターゲットオブジェクトの現在の値\n  - `sourceValue`: ソースオブジェクトの値\n  - `key`: マージ中のプロパティのキー\n  - `target`: ターゲットオブジェクト\n  - `source`: ソースオブジェクト\n\n#### 戻り値\n\n(`T & S`): ソースオブジェクトがマージされたターゲットオブジェクトを返します。\n\n## 例\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nmergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\n// 戻り値: { a: 1, b: 5, c: 4 }\n\nconst target = { a: [1], b: [2] };\nconst source = { a: [3], b: [4] };\n\nconst result = mergeWith(target, source, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 戻り値: { a: [1, 3], b: [2, 4] })\n```\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { mergeWith } from 'es-toolkit';\n\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/ja/reference/object/omit.md",
    "content": "# omit\n\n指定されたキーを除外した新しいオブジェクトを返します。\n\n```typescript\nconst result = omit(obj, keys);\n```\n\n## 使用法\n\n### `omit(obj, keys)`\n\nオブジェクトから特定のキーだけを除外したい時に`omit`を使用してください。指定されたキーに対応するプロパティを削除した新しいオブジェクトを返します。\n\n```typescript\nimport { omit } from 'es-toolkit/object';\n\n// 特定のキーを除外\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = omit(obj, ['b', 'c']);\n// resultは{ a: 1, d: 4 }になります\n\n// 存在しないキーを指定してもエラーは発生しません\nconst safe = omit(obj, ['b', 'nonexistent']);\n// safeは{ a: 1, c: 3, d: 4 }になります\n```\n\n#### パラメータ\n\n- `obj` (`T extends Record<string, any>`): キーを除外するオブジェクトです。\n- `keys` (`readonly K[]`): オブジェクトから除外するキーの配列です。\n\n#### 戻り値\n\n(`Omit<T, K>`): 指定されたキーが除外された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/omitBy.md",
    "content": "# omitBy\n\n条件関数を満たすプロパティを除外した新しいオブジェクトを返します。\n\n```typescript\nconst result = omitBy(obj, shouldOmit);\n```\n\n## 使用法\n\n### `omitBy(obj, shouldOmit)`\n\n条件関数を基にオブジェクトのプロパティを選択的に除外したい時に`omitBy`を使用してください。条件関数が`true`を返すプロパティは除外され、`false`を返すプロパティのみが含まれた新しいオブジェクトを返します。\n\n```typescript\nimport { omitBy } from 'es-toolkit/object';\n\n// 文字列の値を持つプロパティを除外\nconst obj = { a: 1, b: 'remove', c: 3, d: 'also remove' };\nconst result = omitBy(obj, value => typeof value === 'string');\n// resultは{ a: 1, c: 3 }になります\n\n// 偶数の値のみを除外\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst odds = omitBy(numbers, value => value % 2 === 0);\n// oddsは{ a: 1, c: 3 }になります\n\n// キーと値の両方を活用\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst nonAdmins = omitBy(data, (value, key) => key.startsWith('admin'));\n// nonAdminsは{ user1: 25, user2: 17 }になります\n```\n\n#### パラメータ\n\n- `obj` (`T extends Record<string, any>`): プロパティをフィルタリングするオブジェクトです。\n- `shouldOmit` (`(value: T[keyof T], key: keyof T) => boolean`): プロパティを除外するかを決定する条件関数です。値とキーを受け取り、除外する場合は`true`、維持する場合は`false`を返します。\n\n#### 戻り値\n\n(`Partial<T>`): 条件関数を満たさないプロパティで構成された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/pick.md",
    "content": "# pick\n\n指定されたキーに対応するプロパティのみを含む新しいオブジェクトを返します。\n\n```typescript\nconst result = pick(obj, keys);\n```\n\n## 使用法\n\n### `pick(obj, keys)`\n\nオブジェクトから特定のキーに対応するプロパティのみを選択したい時に`pick`を使用してください。指定されたキーに対応するプロパティのみを含む新しいオブジェクトを返します。\n\n```typescript\nimport { pick } from 'es-toolkit/object';\n\n// 特定のキーのみを選択\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// resultは{ a: 1, c: 3 }になります\n\n// 存在しないキーを指定しても無視されます\nconst safe = pick(obj, ['a', 'nonexistent']);\n// safeは{ a: 1 }になります\n\n// ネストされたオブジェクトでも使用できます\nconst nested = {\n  user: { name: 'John', age: 30 },\n  posts: ['post1', 'post2'],\n  settings: { theme: 'dark' },\n};\nconst picked = pick(nested, ['user', 'settings']);\n// pickedは{ user: { name: 'John', age: 30 }, settings: { theme: 'dark' } }になります\n```\n\n#### パラメータ\n\n- `obj` (`T extends Record<string, any>`): プロパティを選択するオブジェクトです。\n- `keys` (`readonly K[]`): オブジェクトから選択するキーの配列です。\n\n#### 戻り値\n\n(`Pick<T, K>`): 指定されたキーに対応するプロパティのみを含む新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/pickBy.md",
    "content": "# pickBy\n\n条件関数を満たすプロパティのみを含む新しいオブジェクトを返します。\n\n```typescript\nconst result = pickBy(obj, shouldPick);\n```\n\n## 使用法\n\n### `pickBy(obj, shouldPick)`\n\n条件関数を基にオブジェクトのプロパティを選択的に選択したい時に`pickBy`を使用してください。条件関数が`true`を返すプロパティのみが含まれた新しいオブジェクトを返します。\n\n```typescript\nimport { pickBy } from 'es-toolkit/object';\n\n// 文字列の値を持つプロパティのみを選択\nconst obj = { a: 1, b: 'select', c: 3, d: 'also select' };\nconst result = pickBy(obj, value => typeof value === 'string');\n// resultは{ b: 'select', d: 'also select' }になります\n\n// 偶数の値のみを選択\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst evens = pickBy(numbers, value => value % 2 === 0);\n// evensは{ b: 2, d: 4 }になります\n\n// キーと値の両方を活用\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst admins = pickBy(data, (value, key) => key.startsWith('admin') && value > 25);\n// adminsは{ admin1: 30, admin2: 28 }になります\n```\n\n#### パラメータ\n\n- `obj` (`T extends Record<string, any>`): プロパティをフィルタリングするオブジェクトです。\n- `shouldPick` (`(value: T[keyof T], key: keyof T) => boolean`): プロパティを選択するかを決定する条件関数です。値とキーを受け取り、選択する場合は`true`、除外する場合は`false`を返します。\n\n#### 戻り値\n\n(`Partial<T>`): 条件関数を満たすプロパティのみを含む新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/toCamelCaseKeys.md",
    "content": "# toCamelCaseKeys\n\nオブジェクトと配列のすべてのキーをキャメルケース表記に変換した新しいオブジェクトを返します。\n\nキャメルケース表記は、複数の単語で構成される識別子の最初の単語を小文字で書き、続く単語の最初の文字を大文字で連結する命名規則です。例えば`camelCase`のように書きます。\n\n```typescript\nconst camelCased = toCamelCaseKeys(obj);\n```\n\n## 使用法\n\n### `toCamelCaseKeys(obj)`\n\nオブジェクトのすべてのキーをキャメルケースに変換したい時に `toCamelCaseKeys` を使用してください。ネストされたオブジェクトと配列内のオブジェクトも再帰的に変換されます。\n\n例えば、オブジェクトのキーは次のように変換されます。\n\n- `snake_case` → `camelCase`（例: `user_id` → `userId`）\n- `PascalCase` → `camelCase`（例: `UserId` → `userId`）\n- `uppercase keys` → `camelCase`（例: `FIRST_NAME` → `firstName`, `LAST` → `last`）\n\n```typescript\nimport { toCamelCaseKeys } from 'es-toolkit/object';\n\n// 基本的なオブジェクト変換\nconst obj = { user_id: 1, first_name: 'John', last_name: 'Doe' };\nconst result = toCamelCaseKeys(obj);\n// resultは{ userId: 1, firstName: 'John', lastName: 'Doe' }になります\n\n// 配列内のオブジェクトも変換\nconst users = [\n  { user_id: 1, first_name: 'John' },\n  { user_id: 2, first_name: 'Jane' },\n];\nconst convertedUsers = toCamelCaseKeys(users);\n// convertedUsersは[{ userId: 1, firstName: 'John' }, { userId: 2, firstName: 'Jane' }]になります\n\n// ネストされたオブジェクトも完全に変換\nconst nested = {\n  user_data: {\n    user_id: 1,\n    contact_info: {\n      email_address: 'john@example.com',\n      phone_number: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toCamelCaseKeys(nested);\n// nestedResultは{\n//   userData: {\n//     userId: 1,\n//     contactInfo: {\n//       emailAddress: 'john@example.com',\n//       phoneNumber: '123-456-7890'\n//     }\n//   }\n// }になります\n\n// PascalCase と uppercase keys のキーも変換されます\nconst raw = { UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' };\nconst converted = toCamelCaseKeys(raw);\n// converted は { userId: 1, firstName: 'JinHo', last: 'Yeom' } になります\n```\n\n#### パラメータ\n\n- `obj` (`T`): キーをcamelCaseに変換するオブジェクト、配列、またはプリミティブ値です。\n\n#### 戻り値\n\n(`ToCamelCaseKeys<T>`): すべてのキーがcamelCaseに変換された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/object/toMerged.md",
    "content": "# toMerged\n\nターゲットオブジェクトのコピーにソースオブジェクトを深くマージした新しいオブジェクトを返します。\n\n```typescript\nconst result = toMerged(target, source);\n```\n\n## 使用法\n\n### `toMerged(target, source)`\n\n2つのオブジェクトを深くマージするが元のオブジェクトを修正したくない時に`toMerged`を使用してください。[merge](./merge.md)とは異なり、元の`target`オブジェクトは修正されず、新しいオブジェクトが返されます。\n\n```typescript\nimport { toMerged } from 'es-toolkit/object';\n\n// 基本的なオブジェクトマージ\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\n// resultは{ a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }になります\n// targetはそのまま{ a: 1, b: { x: 1, y: 2 } }で維持されます\n\n// 配列もマージされます\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nconst arrayResult = toMerged(arrayTarget, arraySource);\n// arrayResultは{ a: [3, 2], b: { x: 1, y: 2 } }になります\n// arrayTargetは変更されません\n\n// null値も適切に処理します\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nconst nullResult = toMerged(nullTarget, nullSource);\n// nullResultは{ a: [1, 2, 3] }になります\n```\n\n`undefined`値は既存の値を上書きしません。\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nconst result = toMerged(target, source);\n// resultは{ a: 1, b: 2, c: 3 }になります (bは上書きされません)\n```\n\n#### パラメータ\n\n- `target` (`T extends Record<PropertyKey, any>`): マージされるターゲットオブジェクトです。このオブジェクトは修正されません。\n- `source` (`S extends Record<PropertyKey, any>`): ターゲットオブジェクトにマージするソースオブジェクトです。\n\n#### 戻り値\n\n(`T & S`): ターゲットオブジェクトとソースオブジェクトがマージされた新しいオブジェクトを返します。\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { toMerged } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/ja/reference/object/toSnakeCaseKeys.md",
    "content": "# toSnakeCaseKeys\n\nオブジェクトと配列のすべてのキーをスネークケース表記に変換した新しいオブジェクトを返します。\n\nスネークケース表記は、複数の単語で構成される識別子の各単語を小文字で書き、単語の間をアンダースコア(`_`)で連結する命名規則です。例えば`snake_case`のように書きます。\n\n```typescript\nconst snakeCased = toSnakeCaseKeys(obj);\n```\n\n## 使用法\n\n### `toSnakeCaseKeys(obj)`\n\nオブジェクトのすべてのキーをsnake_caseに変換したい時に`toSnakeCaseKeys`を使用してください。ネストされたオブジェクトと配列内のオブジェクトも再帰的に変換されます。\n\n例えば、オブジェクトのキーは次のように変換されます。\n\n- `camelCase` → `snake_case`（例: `userId` → `user_id`）\n- `PascalCase` → `snake_case`（例: `UserId` → `user_id`）\n- `UPPERCASE_KEYS` → `snake_case`（例: `FIRST_NAME` → `first_name`, `LAST` → `last`）\n\n```typescript\nimport { toSnakeCaseKeys } from 'es-toolkit/object';\n\n// 基本的なオブジェクト変換\nconst obj = { userId: 1, firstName: 'John', lastName: 'Doe' };\nconst result = toSnakeCaseKeys(obj);\n// resultは{ user_id: 1, first_name: 'John', last_name: 'Doe' }になります\n\n// 配列内のオブジェクトも変換\nconst users = [\n  { userId: 1, firstName: 'John' },\n  { userId: 2, firstName: 'Jane' },\n];\nconst convertedUsers = toSnakeCaseKeys(users);\n// convertedUsersは[{ user_id: 1, first_name: 'John' }, { user_id: 2, first_name: 'Jane' }]になります\n\n// ネストされたオブジェクトも完全に変換\nconst nested = {\n  userData: {\n    userId: 1,\n    contactInfo: {\n      emailAddress: 'john@example.com',\n      phoneNumber: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toSnakeCaseKeys(nested);\n// nestedResultは{\n//   user_data: {\n//     user_id: 1,\n//     contact_info: {\n//       email_address: 'john@example.com',\n//       phone_number: '123-456-7890'\n//     }\n//   }\n// }になります\n```\n\n#### パラメータ\n\n- `obj` (`T`): キーをsnake_caseに変換するオブジェクト、配列、またはプリミティブ値です。\n\n#### 戻り値\n\n(`ToSnakeCaseKeys<T>`): すべてのキーがsnake_caseに変換された新しいオブジェクトを返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer\n\n与えられた値が `ArrayBuffer` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 使用法\n\n### `isArrayBuffer(value)`\n\n値が `ArrayBuffer` かどうかを確認したい場合に `isArrayBuffer` を使用してください。TypeScript で型ガードとしても活用できます。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// ArrayBuffer インスタンスの確認\nconst buffer = new ArrayBuffer(16);\nconst notBuffer = new Array(16);\n\nconsole.log(isArrayBuffer(buffer)); // true\nconsole.log(isArrayBuffer(notBuffer)); // false\n\n// バイナリデータ処理時に便利です\nconst data: unknown = getDataFromAPI();\nif (isArrayBuffer(data)) {\n  // TypeScript で data は ArrayBuffer に型が絞り込まれます\n  const uint8View = new Uint8Array(data);\n  console.log(`Buffer size: ${data.byteLength} bytes`);\n}\n\n// さまざまな型との比較\nconsole.log(isArrayBuffer(new ArrayBuffer(8))); // true\nconsole.log(isArrayBuffer(new Uint8Array(8))); // false\nconsole.log(isArrayBuffer(new DataView(new ArrayBuffer(8)))); // false\nconsole.log(isArrayBuffer([])); // false\nconsole.log(isArrayBuffer({})); // false\nconsole.log(isArrayBuffer(null)); // false\nconsole.log(isArrayBuffer(undefined)); // false\n```\n\nファイル処理やネットワーク通信でよく使用されます。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// ファイル読み取り結果の処理\nasync function processFileData(file: File) {\n  const result = await file.arrayBuffer();\n\n  if (isArrayBuffer(result)) {\n    console.log(`ファイルサイズ: ${result.byteLength} バイト`);\n\n    // バイナリデータの処理\n    const view = new DataView(result);\n    const header = view.getUint32(0, true);\n    console.log(`ファイルヘッダー: ${header.toString(16)}`);\n  }\n}\n\n// WebSocket で受信したデータの確認\nfunction handleWebSocketMessage(data: unknown) {\n  if (isArrayBuffer(data)) {\n    console.log('バイナリメッセージを受信しました');\n    const bytes = new Uint8Array(data);\n    // バイトデータの処理\n  } else if (typeof data === 'string') {\n    console.log('テキストメッセージを受信しました');\n    // 文字列データの処理\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): `ArrayBuffer` かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is ArrayBuffer`): 値が `ArrayBuffer` の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isBlob.md",
    "content": "# isBlob\n\n与えられた値が Blob インスタンスかどうかを確認します。\n\n```typescript\nconst result = isBlob(value);\n```\n\n## 使用法\n\n### `isBlob(value)`\n\n値が Blob インスタンスかどうかを確認したい場合に `isBlob` を使用してください。ブラウザ環境でファイルやバイナリデータを扱う際に便利です。\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// 基本的な Blob インスタンス\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconst file = new File(['content'], 'example.txt', { type: 'text/plain' });\n\nconsole.log(isBlob(blob)); // true\nconsole.log(isBlob(file)); // true (File は Blob を継承します)\n\n// Blob でない値\nconsole.log(isBlob(new ArrayBuffer(8))); // false\nconsole.log(isBlob('text data')); // false\nconsole.log(isBlob({})); // false\nconsole.log(isBlob(null)); // false\n```\n\nファイル処理や API レスポンスの検証に便利です。\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// ファイルアップロードの処理\nfunction processUploadedFile(file: unknown) {\n  if (isBlob(file)) {\n    // TypeScript が file を Blob として推論します\n    console.log(`ファイルサイズ: ${file.size} バイト`);\n    console.log(`MIME タイプ: ${file.type}`);\n\n    // Blob のメソッドを安全に使用できます\n    file.text().then(text => console.log('内容:', text));\n  } else {\n    console.log('有効なファイルではありません');\n  }\n}\n\n// ダウンロード機能の実装\nasync function handleDownload(data: unknown, filename: string) {\n  if (isBlob(data)) {\n    const url = URL.createObjectURL(data);\n    const link = document.createElement('a');\n    link.href = url;\n    link.download = filename;\n    link.click();\n    URL.revokeObjectURL(url);\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Blob インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Blob`): 値が Blob インスタンスの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isBoolean.md",
    "content": "# isBoolean\n\n与えられた値が真偽値かどうかを確認します。\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 使用法\n\n### `isBoolean(value)`\n\n値が正確に `true` または `false` かどうかを確認したい場合に `isBoolean` を使用してください。TypeScript で型ガードとして動作し、値の型を `boolean` に絞り込みます。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// 基本的な真偽値の確認\nisBoolean(true); // true\nisBoolean(false); // true\n\n// 他の型との区別\nisBoolean(1); // false\nisBoolean(0); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\n```\n\nTypeScript で型ガードとして使用する場合に特に便利です。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\nfunction processValue(value: unknown) {\n  if (isBoolean(value)) {\n    // value は boolean に型が絞り込まれます\n    console.log(value ? '真です' : '偽です');\n  } else {\n    console.log('真偽値ではありません');\n  }\n}\n```\n\nAPI レスポンスやユーザー入力の検証にも活用できます。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// API レスポンスの検証\ninterface APIResponse {\n  success: unknown;\n  data: any;\n}\n\nfunction validateResponse(response: APIResponse) {\n  if (isBoolean(response.success)) {\n    console.log(`API 呼び出し ${response.success ? '成功' : '失敗'}`);\n    return response.success;\n  }\n  console.log('不正なレスポンス形式です');\n  return false;\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 真偽値かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is boolean`): 値が `true` または `false` の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isBrowser.md",
    "content": "# isBrowser\n\n現在の実行環境がブラウザかどうかを確認します。\n\n```typescript\nconst result = isBrowser();\n```\n\n## 使用法\n\n### `isBrowser()`\n\nブラウザ環境でのみ実行されるべきコードがある場合に `isBrowser` を使用してください。`window.document` の存在を確認することでブラウザ環境かどうかを判断します。SSR（サーバーサイドレンダリング）や Node.js 環境で便利です。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\n// ブラウザ環境でのみ DOM 操作\nif (isBrowser()) {\n  document.getElementById('app').innerHTML = 'Hello World';\n  console.log('ブラウザ環境で実行中');\n} else {\n  console.log('サーバー環境で実行中');\n}\n```\n\n環境に応じた条件付きロジックの実装に活用できます。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction getWindowWidth() {\n  if (isBrowser()) {\n    return window.innerWidth;\n  }\n  return 0; // サーバーではデフォルト値を返す\n}\n\n// イベントリスナーの登録\nfunction addWindowListener() {\n  if (isBrowser()) {\n    window.addEventListener('resize', () => {\n      console.log('ウィンドウサイズが変更されました');\n    });\n  }\n}\n```\n\nNext.js、Nuxt.js のような SSR フレームワークで特に便利です。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction initializeAnalytics() {\n  if (isBrowser()) {\n    // ブラウザでのみ分析スクリプトを読み込む\n    const script = document.createElement('script');\n    script.src = 'https://analytics.example.com/script.js';\n    document.head.appendChild(script);\n  }\n}\n\n// ローカルストレージへのアクセス\nfunction getStoredValue(key: string) {\n  if (isBrowser()) {\n    return localStorage.getItem(key);\n  }\n  return null;\n}\n```\n\n#### 戻り値\n\n(`boolean`): 現在の環境がブラウザの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isBuffer.md",
    "content": "# isBuffer\n\n与えられた値が Buffer インスタンスかどうかを確認します。\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 使用法\n\n### `isBuffer(value)`\n\nNode.js 環境で Buffer オブジェクトかどうかを確認したい場合に `isBuffer` を使用してください。ファイル処理、ネットワーク通信、バイナリデータ操作時に便利です。TypeScript で型ガードとして動作し、値の型を `Buffer` に絞り込みます。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// Buffer インスタンスの確認\nconst buffer = Buffer.from('hello world', 'utf8');\nisBuffer(buffer); // true\n\n// 他の型との区別\nisBuffer('hello world'); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer(new ArrayBuffer(8)); // false\n```\n\nTypeScript で型ガードとして使用する場合に特に便利です。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\nfunction processData(data: unknown) {\n  if (isBuffer(data)) {\n    // data は Buffer に型が絞り込まれます\n    console.log(`Buffer サイズ: ${data.length} バイト`);\n    console.log(`Buffer 内容: ${data.toString('utf8')}`);\n\n    // Buffer のメソッドを安全に使用できます\n    const slice = data.slice(0, 10);\n  }\n}\n```\n\nファイル処理やネットワーク通信でよく使用されます。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// ファイルデータの処理\nfunction readFileData(data: unknown) {\n  if (isBuffer(data)) {\n    const text = data.toString('utf8');\n    const header = data.readUInt32BE(0);\n    console.log('ファイル内容:', text);\n  }\n}\n\n// ネットワークデータの処理\nfunction handleNetworkData(chunk: unknown) {\n  if (isBuffer(chunk)) {\n    console.log(`受信データサイズ: ${chunk.length} バイト`);\n    const processed = Buffer.concat([chunk, Buffer.from('\\n')]);\n    return processed;\n  }\n  return null;\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Buffer インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が Buffer インスタンスの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isDate.md",
    "content": "# isDate\n\n与えられた値が Date オブジェクトかどうかを確認します。\n\n```typescript\nconst result = isDate(value);\n```\n\n## 使用法\n\n### `isDate(value)`\n\n日付オブジェクトかどうかを確認したい場合に `isDate` を使用してください。文字列や数値で表された日付と Date オブジェクトを区別する際に便利です。TypeScript で型ガードとして動作し、値の型を `Date` に絞り込みます。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// Date オブジェクトの確認\nconst date = new Date();\nisDate(date); // true\n\n// 他の型との区別\nisDate('2024-01-01'); // false - 文字列\nisDate(1640995200000); // false - タイムスタンプ\nisDate({}); // false\n```\n\nTypeScript で型ガードとして使用する場合に特に便利です。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\nfunction formatDate(value: unknown): string {\n  if (isDate(value)) {\n    // value は Date に型が絞り込まれます\n    return value.toISOString();\n  }\n  return '有効な日付ではありません';\n}\n```\n\nAPI レスポンスの処理やユーザー入力の検証に活用できます。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// API レスポンスの処理\nfunction processResponse(response: { createdAt: unknown }) {\n  if (isDate(response.createdAt)) {\n    console.log(`作成時刻: ${response.createdAt.toLocaleDateString()}`);\n  }\n}\n\n// 日付の妥当性検証\nfunction validateBirthDate(value: unknown): boolean {\n  if (isDate(value)) {\n    const now = new Date();\n    const minAge = new Date(now.getFullYear() - 150, now.getMonth(), now.getDate());\n\n    return value <= now && value >= minAge;\n  }\n  return false;\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Date オブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Date`): 値が Date オブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isEmptyObject.md",
    "content": "# isEmptyObject\n\nプロパティが一つもないプレーンオブジェクト(`{}`)かどうかを確認します。\n\n```typescript\nconst result = isEmptyObject(value);\n```\n\n## 使用法\n\n### `isEmptyObject(value)`\n\n`{}`のようにプロパティが一つもないプレーンオブジェクトかどうかを確認したい場合に `isEmptyObject` を使用してください。配列、Map、Setなどの他のオブジェクト型は `false` を返します。\n\n```typescript\nimport { isEmptyObject } from 'es-toolkit';\n\n// プロパティがないプレーンオブジェクト\nisEmptyObject({}); // true\nisEmptyObject(new Object()); // true\nisEmptyObject(Object.create(null)); // true\n\n// プロパティがあるオブジェクト\nisEmptyObject({ a: 1 }); // false\nisEmptyObject({ key: 'value' }); // false\n\n// プレーンオブジェクトではない型\nisEmptyObject([]); // false (配列)\nisEmptyObject(null); // false\nisEmptyObject(new Map()); // false\nisEmptyObject(new Set()); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 確認する値です。\n\n#### 戻り値\n\n(`value is Record<PropertyKey, never>`): プロパティがないプレーンオブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isEqual.md",
    "content": "# isEqual\n\n二つの値が深く等しいかどうかを確認します。\n\n```typescript\nconst result = isEqual(a, b);\n```\n\n## 使用法\n\n### `isEqual(a, b)`\n\nオブジェクト、配列、Date、RegExp などを含めて二つの値が深く等しいかどうかを確認したい場合に `isEqual` を使用してください。参照が異なっていても内容が同じであれば `true` を返します。単体テストやデータ比較に便利です。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// プリミティブ型の比較\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// 特殊値の処理\nisEqual(NaN, NaN); // true\nisEqual(+0, -0); // true\n```\n\nオブジェクトと配列の深い比較をサポートします。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 深いオブジェクトの比較\nconst obj1 = { a: 1, b: { c: 2, d: [3, 4] } };\nconst obj2 = { a: 1, b: { c: 2, d: [3, 4] } };\nisEqual(obj1, obj2); // true\n\n// 配列の比較\nconst arr1 = [1, 2, [3, 4]];\nconst arr2 = [1, 2, [3, 4]];\nisEqual(arr1, arr2); // true\n```\n\nDate、RegExp、Map、Set などのオブジェクトも比較できます。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 日付の比較\nconst date1 = new Date('2020-01-01');\nconst date2 = new Date('2020-01-01');\nisEqual(date1, date2); // true\n\n// 正規表現の比較\nconst regex1 = /hello/g;\nconst regex2 = /hello/g;\nisEqual(regex1, regex2); // true\n\n// Map と Set の比較\nconst map1 = new Map([['key', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqual(map1, map2); // true\n\nconst set1 = new Set([1, 2, 3]);\nconst set2 = new Set([1, 2, 3]);\nisEqual(set1, set2); // true\n```\n\n単体テストでよく使用されます。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\nfunction testApiResponse() {\n  const expected = { status: 200, data: { message: 'success' } };\n  const actual = { status: 200, data: { message: 'success' } };\n\n  if (isEqual(expected, actual)) {\n    console.log('テスト合格！');\n  } else {\n    console.log('テスト失敗！');\n  }\n}\n```\n\n#### パラメータ\n\n- `a` (`unknown`): 比較する最初の値です。\n- `b` (`unknown`): 比較する2番目の値です。\n\n#### 戻り値\n\n(`boolean`): 二つの値が深く等しい場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isEqualWith.md",
    "content": "# isEqualWith\n\nカスタム比較関数を使用して二つの値が等しいかどうかを確認します。\n\n```typescript\nconst result = isEqualWith(a, b, areValuesEqual);\n```\n\n## 使用法\n\n### `isEqualWith(a, b, areValuesEqual)`\n\n特別な比較ロジックが必要な場合に `isEqualWith` を使用してください。カスタム関数が `true` または `false` を返す場合はその結果を使用し、`undefined` を返す場合はデフォルトの比較方式を使用します。大文字小文字の無視、特定のプロパティの除外、近似値の比較などに便利です。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 大文字小文字を区別しない文字列比較\nconst caseInsensitiveCompare = (a, b) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', caseInsensitiveCompare); // true\nisEqualWith({ name: 'Alice' }, { name: 'ALICE' }, caseInsensitiveCompare); // true\n```\n\n数値の近似値比較にも活用できます。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 浮動小数点の誤差を許容する比較\nconst approximateCompare = (a, b) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a - b) < 0.01; // 0.01 以下の差は等しいとして扱う\n  }\n};\n\nisEqualWith(0.1 + 0.2, 0.3, approximateCompare); // true\nisEqualWith({ price: 10.01 }, { price: 10.02 }, approximateCompare); // true\n```\n\n特定のプロパティを無視して比較したい場合にも便利です。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 特定のプロパティを無視して比較\nconst ignoreTimestamp = (a, b, property) => {\n  if (property === 'timestamp') {\n    return true; // timestamp プロパティは常に等しいとして扱う\n  }\n};\n\nconst obj1 = { id: 1, name: 'Test', timestamp: 1000 };\nconst obj2 = { id: 1, name: 'Test', timestamp: 2000 };\nisEqualWith(obj1, obj2, ignoreTimestamp); // true\n```\n\n複雑なカスタム比較ロジックも実装できます。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\nconst areValuesEqual = (a, b, property) => {\n  // ID は無視\n  if (property === 'id') {\n    return true;\n  }\n\n  // 名前は大文字小文字を区別せずに比較\n  if (property === 'name' && typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n\n  // それ以外はデフォルトの比較方式を使用\n  return undefined;\n};\n\nconst user1 = { id: 1, name: 'Alice', age: 25 };\nconst user2 = { id: 999, name: 'ALICE', age: 25 };\nisEqualWith(user1, user2, areValuesEqual); // true\n```\n\n#### パラメータ\n\n- `a` (`unknown`): 比較する最初の値です。\n- `b` (`unknown`): 比較する2番目の値です。\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): カスタム比較関数です。`true` または `false` を返す場合はその結果を使用し、`undefined` を返す場合はデフォルトの比較方式を使用します。\n\n#### 戻り値\n\n(`boolean`): カスタム基準に従って二つの値が等しい場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isError.md",
    "content": "# isError\n\n与えられた値が `Error` オブジェクトかどうかを確認します。\n\n```typescript\nconst result = isError(value);\n```\n\n## 使用法\n\n### `isError(value)`\n\n与えられた値が `Error` オブジェクトかどうかを確認したい場合に `isError` を使用してください。TypeScript で型ガードとして活用し、値の型を `Error` に絞り込むことができます。try-catch ブロックや API レスポンスを処理する際に特に便利です。\n\n```typescript\nimport { isError } from 'es-toolkit/predicate';\n\n// Error オブジェクトの確認\nisError(new Error('Something went wrong')); // true\nisError(new TypeError('Type error')); // true\n\n// 他の型との区別\nisError('error'); // false\nisError({ name: 'Error', message: 'Custom error' }); // false\n```\n\nTypeScript で型ガードとして使用すると、値の型が絞り込まれます。\n\n```typescript\nfunction handleError(value: unknown) {\n  if (isError(value)) {\n    // value は Error に型が絞り込まれます\n    console.log(`エラーが発生しました: ${value.message}`);\n    return value.name;\n  }\n  return 'エラーではありません';\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): `Error` オブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Error`): 値が `Error` オブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isFile.md",
    "content": "# isFile\n\n与えられた値が File オブジェクトかどうかを確認します。\n\n```typescript\nconst result = isFile(value);\n```\n\n## 使用法\n\n### `isFile(value)`\n\n値が File インスタンスかどうかを確認したい場合に `isFile` を使用してください。File オブジェクトは、ユーザーがアップロードしたファイルやファイルシステムから取得したファイルを表す Web API の一部です。Blob オブジェクトとは異なり、ファイル名や最終更新時刻などの追加情報が含まれます。\n\n```typescript\nimport { isFile } from 'es-toolkit/predicate';\n\n// File オブジェクトの確認\nconst file = new File(['hello'], 'example.txt', { type: 'text/plain' });\nconsole.log(isFile(file)); // true\n\n// Blob オブジェクトは File ではありません\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconsole.log(isFile(blob)); // false\n\n// 一般的なオブジェクト\nconsole.log(isFile({})); // false\nconsole.log(isFile([])); // false\nconsole.log(isFile('text')); // false\nconsole.log(isFile(null)); // false\nconsole.log(isFile(undefined)); // false\n```\n\n与えられた引数が有効なファイルかどうかを検証する際に使用できます。\n\n```typescript\n// ファイルアップロードハンドラー\nfunction handleFileUpload(input: unknown) {\n  if (isFile(input)) {\n    console.log(`ファイル名: ${input.name}`);\n    console.log(`ファイルサイズ: ${input.size} bytes`);\n    console.log(`ファイルタイプ: ${input.type}`);\n    console.log(`最終更新: ${input.lastModified}`);\n\n    // File であることが確実なので、安全にファイル関連のプロパティにアクセスできます\n    return input;\n  }\n\n  throw new Error('有効なファイルではありません');\n}\n```\n\nJavaScript 実行環境で `File` がサポートされていない場合も安全に処理します。\n\n```typescript\n// Node.js 環境や File をサポートしていない環境でも安全\nconsole.log(isFile(new Date())); // false\n\n// File が定義されていない環境でもエラーが発生しません\nif (typeof File === 'undefined') {\n  console.log(isFile({})); // false\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): File オブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is File`): 値が File オブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isFunction.md",
    "content": "# isFunction\n\n与えられた値が関数かどうかを確認します。\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 使用法\n\n### `isFunction(value)`\n\n値が関数かどうかを確認したい場合に `isFunction` を使用してください。一般的な関数、非同期関数、ジェネレーター関数、コンストラクタ関数など、すべての種類の関数を検出できます。\n\n```typescript\nimport { isFunction } from 'es-toolkit/predicate';\n\n// 一般的な関数\nconsole.log(isFunction(function () {})); // true\nconsole.log(isFunction(() => {})); // true\nconsole.log(isFunction(Array.prototype.slice)); // true\n\n// 非同期関数\nconsole.log(isFunction(async function () {})); // true\nconsole.log(isFunction(async () => {})); // true\n\n// ジェネレーター関数\nconsole.log(isFunction(function* () {})); // true\n\n// コンストラクタ関数\nconsole.log(isFunction(Array)); // true\nconsole.log(isFunction(Date)); // true\nconsole.log(isFunction(RegExp)); // true\nconsole.log(isFunction(Promise)); // true\n```\n\n組み込み JavaScript 関数とクラスも検出します。\n\n```typescript\n// 組み込みコンストラクタ\nconsole.log(isFunction(Object)); // true\nconsole.log(isFunction(String)); // true\nconsole.log(isFunction(Number)); // true\nconsole.log(isFunction(Boolean)); // true\n\n// 型付き配列コンストラクタ\nconsole.log(isFunction(Int8Array)); // true\nconsole.log(isFunction(Uint8Array)); // true\nconsole.log(isFunction(Float32Array)); // true\n\n// Proxy と Reflect\nconsole.log(isFunction(Proxy)); // true\nconsole.log(isFunction(Reflect.get)); // true\n```\n\n関数でない値と区別します。\n\n```typescript\n// 関数でないもの\nconsole.log(isFunction({})); // false\nconsole.log(isFunction([])); // false\nconsole.log(isFunction('text')); // false\nconsole.log(isFunction(42)); // false\nconsole.log(isFunction(null)); // false\nconsole.log(isFunction(undefined)); // false\n\n// 関数のように見えても関数でないもの\nconsole.log(isFunction({ call: function () {} })); // false\n```\n\nコールバック関数の検証や動的な関数呼び出しで便利です。\n\n```typescript\n// コールバック関数の検証\nfunction processData(data: any[], callback?: unknown) {\n  const result = data.map(item => item * 2);\n\n  if (isFunction(callback)) {\n    // callback が関数であることが確実なので、安全に呼び出せます\n    callback(result);\n  }\n\n  return result;\n}\n\n// 動的な関数実行\nfunction executeIfFunction(fn: unknown, ...args: any[]) {\n  if (isFunction(fn)) {\n    return fn(...args);\n  }\n\n  console.log('与えられた値は関数ではありません');\n  return null;\n}\n\n// メソッドチェーンでの関数確認\nconst utils = {\n  data: [1, 2, 3],\n  process(fn: unknown) {\n    if (isFunction(fn)) {\n      this.data = this.data.map(fn);\n    }\n    return this;\n  },\n};\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 関数かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is (...args: any[]) => any`): 値が関数の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isJSON.md",
    "content": "# isJSON\n\n与えられた値が有効な JSON 文字列かどうかを確認します。\n\n```typescript\nconst result = isJSON(value);\n```\n\n## 使用法\n\n### `isJSON(value)`\n\n文字列が有効な JSON 形式かどうかを確認したい場合に `isJSON` を使用してください。この関数は `JSON.parse()` でパースできる文字列かどうかを検査します。JSON 仕様に従い、オブジェクト、配列、文字列、数値、真偽値、`null` を表現するすべての文字列が有効です。\n\n```typescript\nimport { isJSON } from 'es-toolkit/predicate';\n\n// 有効な JSON 文字列\nconsole.log(isJSON('{\"name\":\"John\",\"age\":30}')); // true\nconsole.log(isJSON('[1,2,3]')); // true\nconsole.log(isJSON('\"hello world\"')); // true\nconsole.log(isJSON('42')); // true\nconsole.log(isJSON('true')); // true\nconsole.log(isJSON('false')); // true\nconsole.log(isJSON('null')); // true\n\n// 無効な JSON 文字列\nconsole.log(isJSON('undefined')); // false\nconsole.log(isJSON('function() {}')); // false\nconsole.log(isJSON('{name: \"John\"}')); // false (キーに引用符がない)\nconsole.log(isJSON(\"{'name': 'John'}\")); // false (シングルクォートを使用)\nconsole.log(isJSON('{}')); // true (空のオブジェクトは有効)\nconsole.log(isJSON('[]')); // true (空の配列は有効)\n```\n\n文字列でない値はすべて `false` を返します。\n\n```typescript\n// 文字列でない値\nconsole.log(isJSON({ name: 'John' })); // false\nconsole.log(isJSON([1, 2, 3])); // false\nconsole.log(isJSON(42)); // false\nconsole.log(isJSON(true)); // false\nconsole.log(isJSON(null)); // false\nconsole.log(isJSON(undefined)); // false\n```\n\nAPI レスポンスやユーザー入力の検証で便利です。\n\n```typescript\n// API レスポンスの検証\nfunction processApiResponse(response: unknown) {\n  if (isJSON(response)) {\n    try {\n      const data = JSON.parse(response);\n      console.log('パースされたデータ:', data);\n      return data;\n    } catch (error) {\n      // isJSON が true を返したので、ここは実行されません\n      console.error('パース失敗:', error);\n    }\n  }\n\n  console.log('有効な JSON 文字列ではありません');\n  return null;\n}\n\n// ユーザー入力の検証\nfunction validateJsonInput(input: unknown): string | null {\n  if (isJSON(input)) {\n    // TypeScript が input を string として型推論します\n    return input;\n  }\n\n  throw new Error('入力値は有効な JSON 文字列である必要があります');\n}\n\n// 設定ファイルの検証\nfunction loadConfig(configString: unknown) {\n  if (isJSON(configString)) {\n    const config = JSON.parse(configString);\n    return {\n      isValid: true,\n      config,\n      error: null,\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Invalid JSON format',\n  };\n}\n```\n\n複雑な JSON 構造も正確に検出します。\n\n```typescript\nconst complexJson = `{\n  \"users\": [\n    {\n      \"id\": 1,\n      \"name\": \"Alice\",\n      \"preferences\": {\n        \"theme\": \"dark\",\n        \"notifications\": true\n      }\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"page\": 1\n  }\n}`;\n\nconsole.log(isJSON(complexJson)); // true\n\n// 不正な形式\nconsole.log(isJSON('{ \"name\": \"John\", }')); // false (trailing comma)\nconsole.log(isJSON('{ name: \"John\" }')); // false (unquoted key)\nconsole.log(isJSON(\"{ 'name': 'John' }\")); // false (single quotes)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 有効な JSON 文字列かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is string`): 値が有効な JSON 文字列の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isJSONArray.md",
    "content": "# isJSONArray\n\n与えられた値が有効な JSON 配列かどうかを確認します。\n\n```typescript\nconst result = isJSONArray(value);\n```\n\n## 使用法\n\n### `isJSONArray(value)`\n\n配列のすべての要素が有効な JSON 値かどうかを確認したい場合に `isJSONArray` を使用してください。有効な JSON 配列とは、すべての項目が JSON としてシリアライズ可能な値（`null`、オブジェクト、配列、文字列、数値、真偽値）のみで構成された配列です。\n\n```typescript\nimport { isJSONArray } from 'es-toolkit/predicate';\n\n// 有効な JSON 配列\nconsole.log(isJSONArray([1, 2, 3])); // true\nconsole.log(isJSONArray(['hello', 'world'])); // true\nconsole.log(isJSONArray([true, false, null])); // true\nconsole.log(isJSONArray([{ name: 'John' }, { name: 'Jane' }])); // true\nconsole.log(\n  isJSONArray([\n    [1, 2],\n    [3, 4],\n  ])\n); // true (ネストされた配列)\nconsole.log(isJSONArray([])); // true (空の配列)\n\n// 複合的な有効な JSON 配列\nconst complexArray = [42, 'text', true, null, { key: 'value' }, [1, 2, 3]];\nconsole.log(isJSONArray(complexArray)); // true\n```\n\n無効な JSON 配列と区別します。\n\n```typescript\n// 関数が含まれる配列 - 無効\nconsole.log(isJSONArray([1, 2, () => {}])); // false\nconsole.log(isJSONArray([function () {}])); // false\n\n// undefined が含まれる配列 - 無効\nconsole.log(isJSONArray([1, undefined, 3])); // false\n\n// Symbol が含まれる配列 - 無効\nconsole.log(isJSONArray([Symbol('test')])); // false\n\n// Date オブジェクトが含まれる配列 - 無効（JSON では文字列に変換する必要がある）\nconsole.log(isJSONArray([new Date()])); // false\n\n// 配列でない値\nconsole.log(isJSONArray('not an array')); // false\nconsole.log(isJSONArray({ 0: 'a', 1: 'b', length: 2 })); // false (配列風オブジェクト)\nconsole.log(isJSONArray(42)); // false\nconsole.log(isJSONArray(null)); // false\n```\n\nAPI レスポンスの検証やデータシリアライズ前の検証で便利です。\n\n```typescript\n// API レスポンスの検証\nfunction processApiArray(data: unknown) {\n  if (isJSONArray(data)) {\n    // 安全に JSON.stringify を使用できます\n    const jsonString = JSON.stringify(data);\n    console.log('シリアライズされた配列:', jsonString);\n    return data;\n  }\n\n  throw new Error('有効な JSON 配列ではありません');\n}\n\n// ユーザー入力データの検証\nfunction validateUserList(input: unknown): any[] {\n  if (isJSONArray(input)) {\n    // TypeScript が input を any[] として型推論します\n    return input;\n  }\n\n  return [];\n}\n\n// 設定配列の検証\nfunction loadArrayConfig(config: unknown) {\n  if (isJSONArray(config)) {\n    return {\n      isValid: true,\n      items: config,\n      count: config.length,\n    };\n  }\n\n  return {\n    isValid: false,\n    items: [],\n    count: 0,\n  };\n}\n\n// ネストされた構造でも動作します\nconst nestedData = [{ users: [{ name: 'Alice' }, { name: 'Bob' }] }, { users: [{ name: 'Charlie' }] }];\nconsole.log(isJSONArray(nestedData)); // true\n```\n\n関数を要素として持つ配列や、`TypedArray` オブジェクトのように JSON としてシリアライズできない配列に対しては `false` を返します。\n\n```typescript\n// 一般的な配列 vs JSON 配列\nconst regularArray = [1, 2, function () {}]; // 通常は有効な配列\nconst jsonArray = [1, 2, 3]; // JSON シリアライズ可能な配列\n\nconsole.log(Array.isArray(regularArray)); // true (一般的な配列チェック)\nconsole.log(isJSONArray(regularArray)); // false (JSON 配列チェック)\n\nconsole.log(Array.isArray(jsonArray)); // true\nconsole.log(isJSONArray(jsonArray)); // true\n\n// TypedArray は JSON 配列ではありません\nconst typedArray = new Int32Array([1, 2, 3]);\nconsole.log(Array.isArray(typedArray)); // false\nconsole.log(isJSONArray(typedArray)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 有効な JSON 配列かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is any[]`): 値が有効な JSON 配列の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isJSONObject.md",
    "content": "# isJSONObject\n\n与えられた値が有効な JSON オブジェクトかどうかを確認します。\n\n```typescript\nconst result = isJSONObject(value);\n```\n\n## 使用法\n\n### `isJSONObject(value)`\n\nオブジェクトのすべてのキーが文字列で、すべての値が有効な JSON 値かどうかを確認したい場合に `isJSONObject` を使用してください。有効な JSON オブジェクトとは、文字列キーと JSON としてシリアライズ可能な値（`null`、オブジェクト、配列、文字列、数値、真偽値）のみで構成されたプレーンオブジェクトです。\n\n```typescript\nimport { isJSONObject } from 'es-toolkit/predicate';\n\n// 有効な JSON オブジェクト\nconsole.log(isJSONObject({ name: 'John', age: 30 })); // true\nconsole.log(isJSONObject({ active: true, score: null })); // true\nconsole.log(isJSONObject({})); // true (空のオブジェクト)\n\n// ネストされた構造も検証します\nconst nested = {\n  user: {\n    name: 'Alice',\n    preferences: {\n      theme: 'dark',\n      notifications: true,\n    },\n  },\n  data: [1, 2, 3],\n  timestamp: null,\n};\nconsole.log(isJSONObject(nested)); // true\n\n// 複合的な有効な JSON オブジェクト\nconst complex = {\n  id: 42,\n  title: 'Example',\n  published: true,\n  tags: ['javascript', 'tutorial'],\n  author: {\n    name: 'Developer',\n    email: 'dev@example.com',\n  },\n  metadata: null,\n};\nconsole.log(isJSONObject(complex)); // true\n```\n\n関数、`Symbol`、`Date` オブジェクト、`undefined` のような JSON としてシリアライズできない値やクラスインスタンスが含まれる無効な JSON オブジェクトを正確に区別します。\n\n```typescript\n// 関数が含まれるオブジェクト - 無効\nconsole.log(isJSONObject({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONObject({ method: function () {} })); // false\n\n// undefined が含まれるオブジェクト - 無効\nconsole.log(isJSONObject({ name: 'John', age: undefined })); // false\n\n// Symbol キーまたは値が含まれるオブジェクト - 無効\nconsole.log(isJSONObject({ [Symbol('key')]: 'value' })); // false\nconsole.log(isJSONObject({ name: Symbol('name') })); // false\n\n// Date、RegExp などのオブジェクト - 無効\nconsole.log(isJSONObject({ created: new Date() })); // false\nconsole.log(isJSONObject({ pattern: /test/ })); // false\n\n// クラスインスタンス - 無効\nclass Person {\n  constructor(public name: string) {}\n}\nconsole.log(isJSONObject(new Person('John'))); // false\n\n// オブジェクトでない値\nconsole.log(isJSONObject('not an object')); // false\nconsole.log(isJSONObject(42)); // false\nconsole.log(isJSONObject([1, 2, 3])); // false\nconsole.log(isJSONObject(null)); // false\n```\n\n`JSON.stringify` を安全に使用できるかどうかを検証するために使用できます。\n\n```typescript\n// API レスポンスの検証\nfunction processApiResponse(data: unknown) {\n  if (isJSONObject(data)) {\n    // 安全に JSON.stringify を使用できます\n    const jsonString = JSON.stringify(data);\n    console.log('シリアライズされたオブジェクト:', jsonString);\n\n    // TypeScript が data を Record<string, any> として型推論します\n    return data;\n  }\n\n  throw new Error('有効な JSON オブジェクトではありません');\n}\n\n// 設定オブジェクトの検証\nfunction loadConfig(config: unknown) {\n  if (isJSONObject(config)) {\n    return {\n      isValid: true,\n      config,\n      keys: Object.keys(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: {},\n    keys: [],\n  };\n}\n\n// ユーザー入力データの検証\nfunction validateUserData(input: unknown): Record<string, any> {\n  if (isJSONObject(input)) {\n    // すべてのプロパティが JSON シリアライズ可能であることを保証します\n    return input;\n  }\n\n  throw new Error('ユーザーデータは有効な JSON オブジェクトである必要があります');\n}\n\n// ネストされたオブジェクトの検証\nfunction validateNestedConfig(data: unknown) {\n  if (isJSONObject(data)) {\n    // ネストされたすべてのオブジェクトと配列も JSON の妥当性が保証されます\n    console.log('設定が完全に JSON 互換です');\n    return data;\n  }\n\n  return null;\n}\n```\n\n`isJSONObject` は他のオブジェクトチェック関数とは異なる目的を持ちます。`isPlainObject` はプレーンオブジェクトかどうかを確認しますが、`isJSONObject` は JSON としてシリアライズできるオブジェクトかどうかを確認します。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\nconst objectWithFunction = {\n  name: 'John',\n  greet: function () {\n    return 'Hello';\n  },\n};\n\nconst plainJsonObject = {\n  name: 'John',\n  age: 30,\n};\n\n// プレーンオブジェクト vs JSON オブジェクト\nconsole.log(isPlainObject(objectWithFunction)); // true (プレーンオブジェクト)\nconsole.log(isJSONObject(objectWithFunction)); // false (関数が含まれるため JSON オブジェクトではない)\n\nconsole.log(isPlainObject(plainJsonObject)); // true\nconsole.log(isJSONObject(plainJsonObject)); // true\n\n// 組み込みオブジェクト\nconsole.log(isPlainObject(new Date())); // false\nconsole.log(isJSONObject(new Date())); // false\n\n// 配列\nconsole.log(isPlainObject([])); // false\nconsole.log(isJSONObject([])); // false (配列は JSON 値ですが JSON \"オブジェクト\" ではありません)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 有効な JSON オブジェクトかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Record<string, any>`): 値が有効な JSON オブジェクトの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isJSONValue.md",
    "content": "# isJSONValue\n\n与えられた値が有効な JSON 値かどうかを確認します。\n\n```typescript\nconst result = isJSONValue(value);\n```\n\n## 使用法\n\n### `isJSONValue(value)`\n\n値が JSON としてシリアライズ可能な有効な値かどうかを確認したい場合に `isJSONValue` を使用してください。JSON 仕様に従い、有効な値は `null`、オブジェクト、配列、文字列、数値、真偽値です。この関数は他の JSON 関連型ガードの基礎となる関数です。\n\n```typescript\nimport { isJSONValue } from 'es-toolkit/predicate';\n\n// プリミティブな JSON 値\nconsole.log(isJSONValue(null)); // true\nconsole.log(isJSONValue('hello')); // true\nconsole.log(isJSONValue(42)); // true\nconsole.log(isJSONValue(true)); // true\nconsole.log(isJSONValue(false)); // true\n\n// オブジェクトと配列（内部の値もすべて有効である必要があります）\nconsole.log(isJSONValue({ name: 'John', age: 30 })); // true\nconsole.log(isJSONValue([1, 2, 3, 'text'])); // true\nconsole.log(isJSONValue([])); // true (空の配列)\nconsole.log(isJSONValue({})); // true (空のオブジェクト)\n\n// ネストされた構造\nconst complexData = {\n  user: {\n    name: 'Alice',\n    active: true,\n    scores: [95, 87, 92],\n  },\n  metadata: null,\n};\nconsole.log(isJSONValue(complexData)); // true\n```\n\nJSON としてシリアライズできない値を正確に区別します。関数、`undefined`、`Symbol`、クラスインスタンスなどは JSON 仕様でサポートされていない型なので `false` を返します。\n\n```typescript\n// undefined は JSON でサポートされていません\nconsole.log(isJSONValue(undefined)); // false\n\n// 関数は JSON としてシリアライズできません\nconsole.log(isJSONValue(() => {})); // false\nconsole.log(isJSONValue(function () {})); // false\n\n// Symbol は JSON でサポートされていません\nconsole.log(isJSONValue(Symbol('test'))); // false\n\n// Date オブジェクトは JSON では文字列に変換する必要があります\nconsole.log(isJSONValue(new Date())); // false\n\n// RegExp オブジェクトも JSON でサポートされていません\nconsole.log(isJSONValue(/pattern/)); // false\n\n// 関数や undefined が含まれるオブジェクト/配列\nconsole.log(isJSONValue({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONValue([1, 2, undefined])); // false\n\n// BigInt は JSON でサポートされていません\nconsole.log(isJSONValue(BigInt(123))); // false\n```\n\nJSON シリアライズ前のデータ検証で便利です。\n\n```typescript\n// 安全な JSON シリアライズ\nfunction safeJsonStringify(data: unknown): string | null {\n  if (isJSONValue(data)) {\n    // data が有効な JSON 値であることが保証されます\n    return JSON.stringify(data);\n  }\n\n  console.warn('データが JSON シリアライズ可能ではありません');\n  return null;\n}\n\n// API リクエストデータの検証\nfunction sendApiRequest(data: unknown) {\n  if (isJSONValue(data)) {\n    const jsonPayload = JSON.stringify(data);\n    // API リクエストの送信\n    console.log('送信するデータ:', jsonPayload);\n    return fetch('/api/data', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: jsonPayload,\n    });\n  }\n\n  throw new Error('API データは JSON シリアライズ可能である必要があります');\n}\n\n// localStorage への保存前の検証\nfunction saveToStorage(key: string, value: unknown) {\n  if (isJSONValue(value)) {\n    localStorage.setItem(key, JSON.stringify(value));\n    return true;\n  }\n\n  console.error('localStorage に保存できないデータ型です');\n  return false;\n}\n\n// 設定ファイルの検証\nfunction validateConfig(config: unknown) {\n  if (isJSONValue(config)) {\n    return {\n      isValid: true,\n      config,\n      serialized: JSON.stringify(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Config must be a valid JSON value',\n  };\n}\n```\n\n他の型ガードと組み合わせて使用できます。\n\n```typescript\n// 具体的な JSON 型の確認\nfunction processJsonData(data: unknown) {\n  if (!isJSONValue(data)) {\n    throw new Error('Invalid JSON value');\n  }\n\n  // これで data が有効な JSON 値であることが保証されます\n  if (isJSONObject(data)) {\n    console.log('JSON オブジェクトです:', Object.keys(data));\n  } else if (isJSONArray(data)) {\n    console.log('JSON 配列です:', data.length, '個の項目');\n  } else {\n    console.log('プリミティブな JSON 値です:', typeof data, data);\n  }\n}\n\n// ネストされたデータの検証\nconst testData = {\n  valid: { name: 'test', values: [1, 2, 3] },\n  invalid: { name: 'test', callback: () => {} },\n};\n\nconsole.log(isJSONValue(testData.valid)); // true\nconsole.log(isJSONValue(testData.invalid)); // false\n```\n\nエッジケース:\n\n```typescript\n// 特殊な数値\nconsole.log(isJSONValue(Infinity)); // false (JSON では null に変換されます)\nconsole.log(isJSONValue(-Infinity)); // false\nconsole.log(isJSONValue(NaN)); // false (JSON では null に変換されます)\n\n// 空の値\nconsole.log(isJSONValue('')); // true (空の文字列)\nconsole.log(isJSONValue(0)); // true\nconsole.log(isJSONValue(false)); // true\n\n// プロトタイプを持つオブジェクト\nconst obj = Object.create({ inherited: 'value' });\nobj.own = 'property';\nconsole.log(isJSONValue(obj)); // true (プレーンオブジェクトとして扱われます)\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 有効な JSON 値かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Record<string, any> | any[] | string | number | boolean | null`): 値が有効な JSON 値の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isLength.md",
    "content": "# isLength\n\n値が有効な配列の長さかどうかを確認します。\n\n```typescript\nconst result = isLength(value);\n```\n\n## 使用法\n\n### `isLength(value)`\n\n値が有効な配列の長さかどうかを確認したい場合に `isLength` を使用してください。有効な長さは 0 以上で `Number.MAX_SAFE_INTEGER` 以下の整数である必要があります。\n\n```typescript\nimport { isLength } from 'es-toolkit/predicate';\n\n// 有効な長さ\nconsole.log(isLength(0)); // true\nconsole.log(isLength(42)); // true\nconsole.log(isLength(Number.MAX_SAFE_INTEGER)); // true\n\n// 無効な長さ\nconsole.log(isLength(-1)); // false (負の数)\nconsole.log(isLength(1.5)); // false (小数)\nconsole.log(isLength(Number.MAX_SAFE_INTEGER + 1)); // false (安全でない整数)\nconsole.log(isLength('42')); // false (文字列)\nconsole.log(isLength(null)); // false (null)\n```\n\nTypeScript で型ガードとしても使用できます。\n\n```typescript\nfunction processLength(value: unknown) {\n  if (isLength(value)) {\n    // これで value は number 型に絞り込まれます\n    console.log(value.toFixed(2));\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 有効な長さかどうかを確認する値です。\n\n#### 戻り値\n\n(`boolean`): 値が有効な長さの場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isMap.md",
    "content": "# isMap\n\n値がMapかどうかを確認します。\n\n```typescript\nconst result = isMap(value);\n```\n\n## 使用法\n\n### `isMap(value)`\n\n値がMapインスタンスかどうかを確認したい場合は`isMap`を使用してください。`instanceof`演算子を使用して`Map`かどうかを検査します。\n\n```typescript\nimport { isMap } from 'es-toolkit/predicate';\n\n// Mapインスタンス\nconst map = new Map([['key', 'value']]);\nconsole.log(isMap(map)); // true\n\n// Mapではない値\nconsole.log(isMap(new Set())); // false\nconsole.log(isMap(new WeakMap())); // false\nconsole.log(isMap({})); // false\nconsole.log(isMap([])); // false\nconsole.log(isMap(null)); // false\n```\n\nTypeScriptでタイプガードとしても使用できます。\n\n```typescript\nfunction processValue(value: unknown) {\n  if (isMap(value)) {\n    // ここでvalueはMap<any, any>型に絞り込まれます\n    console.log(value.size);\n    value.set('new-key', 'new-value');\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): `Map`かどうか確認する値です。\n\n#### 戻り値\n\n(`value is Map<any, any>`): 値がMapの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isNil.md",
    "content": "# isNil\n\n値が`null`または`undefined`であるかを確認します。\n\n```typescript\nconst result = isNil(value);\n```\n\n## 使用法\n\n### `isNil(value)`\n\n値が`null`や`undefined`であるかを確認したい場合は、`isNil`を使用してください。\n\n```typescript\nimport { isNil } from 'es-toolkit/predicate';\n\n// null または undefined の値\nconsole.log(isNil(null)); // true\nconsole.log(isNil(undefined)); // true\n\n// その他の値\nconsole.log(isNil(0)); // false\nconsole.log(isNil('')); // false\nconsole.log(isNil(false)); // false\nconsole.log(isNil([])); // false\nconsole.log(isNil({})); // false\n```\n\nTypeScriptの型ガードとしても使用できます：\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNil(value)) {\n    // valueはnull | undefined型に絞り込まれます\n    console.log('値が空です');\n  } else {\n    // valueはstring型に絞り込まれます\n    console.log(value.toUpperCase());\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): `null`または`undefined`であるかを確認する値です。\n\n#### 戻り値\n\n(`value is null | undefined`): 値が`null`または`undefined`の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isNode.md",
    "content": "# isNode\n\n現在の実行環境がNode.jsであるかを確認します。\n\n```typescript\nconst result = isNode();\n```\n\n## 使用法\n\n### `isNode()`\n\n現在のコードがNode.js環境で実行されているかを確認したい場合は、`isNode`を使用してください。Node.js専用のAPIを使用する前に環境を確認する際に便利です。\n\n```typescript\nimport { isNode } from 'es-toolkit/predicate';\n\nif (isNode()) {\n  // Node.js専用コード\n  console.log('このコードはNode.jsで実行されています');\n  const fs = await import('node:fs');\n  const path = await import('node:path');\n} else {\n  // ブラウザ環境でのみ使用可能なコード\n  console.log('このコードはブラウザで実行されています');\n  const response = await fetch('/api/data');\n}\n```\n\n条件付きでNode.jsモジュールを使用する場合にも便利です：\n\n```typescript\nfunction getEnvironmentInfo() {\n  if (isNode()) {\n    return {\n      platform: process.platform,\n      nodeVersion: process.version,\n      environment: 'Node.js',\n    };\n  } else {\n    return {\n      userAgent: navigator.userAgent,\n      environment: 'Browser',\n    };\n  }\n}\n```\n\n#### 戻り値\n\n(`boolean`): 現在の環境がNode.jsの場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isNotNil.md",
    "content": "# isNotNil\n\n値が`null`でも`undefined`でもないかを確認します。\n\n```typescript\nconst result = isNotNil(value);\n```\n\n## 使用法\n\n### `isNotNil(value)`\n\n値が`null`や`undefined`でないかを確認したい場合は、`isNotNil`を使用してください。配列から`null`や`undefined`の値をフィルタリングする際に特に便利です。\n\n```typescript\nimport { isNotNil } from 'es-toolkit/predicate';\n\n// 基本的な使用例\nconsole.log(isNotNil(42)); // true\nconsole.log(isNotNil('hello')); // true\nconsole.log(isNotNil([])); // true\nconsole.log(isNotNil({})); // true\n\nconsole.log(isNotNil(null)); // false\nconsole.log(isNotNil(undefined)); // false\n\n// 配列のフィルタリングで便利です\nconst mixedArray = [1, null, 'hello', undefined, true, 0];\nconst filteredArray = mixedArray.filter(isNotNil);\n// filteredArrayは[1, 'hello', true, 0]になります（nullとundefinedが除外されます）\n```\n\nTypeScriptの型ガードとしても使用できます。\n\n```typescript\nfunction processItems(items: (string | null | undefined)[]) {\n  // isNotNilでフィルタリングすると型がstring[]に絞り込まれます\n  const validItems = items.filter(isNotNil);\n\n  validItems.forEach(item => {\n    // itemはstring型として保証されます\n    console.log(item.toUpperCase());\n  });\n}\n```\n\n#### パラメータ\n\n- `value` (`T | null | undefined`): `null`や`undefined`でないかを確認する値です。\n\n#### 戻り値\n\n(`value is T`): 値が`null`でも`undefined`でもない場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isNull.md",
    "content": "# isNull\n\n値が`null`であるかを確認します。\n\n```typescript\nconst result = isNull(value);\n```\n\n## 使用法\n\n### `isNull(value)`\n\n値が正確に`null`であるかを確認したい場合は、`isNull`を使用してください。厳密等価（`===`）を使用して`null`のみを認識し、undefinedは認識しません。\n\n```typescript\nimport { isNull } from 'es-toolkit/predicate';\n\n// null値\nconsole.log(isNull(null)); // true\n\n// null以外の値\nconsole.log(isNull(undefined)); // false\nconsole.log(isNull(0)); // false\nconsole.log(isNull('')); // false\nconsole.log(isNull(false)); // false\nconsole.log(isNull([])); // false\nconsole.log(isNull({})); // false\n```\n\nTypeScriptの型ガードとしても使用できます。\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    // valueはnull型に絞り込まれます\n    console.log('値がnullです');\n  } else {\n    // valueはstring | undefined型に絞り込まれます\n    console.log('値がnullではありません：', value);\n  }\n}\n```\n\n`isNull`は[`isNil`](./isNil.md)と異なり、`undefined`を`false`として扱います。\n\n```typescript\nimport { isNil, isNull } from 'es-toolkit/predicate';\n\nconsole.log(isNull(undefined)); // false\nconsole.log(isNil(undefined)); // true\n```\n\n#### パラメータ\n\n- `value` (`unknown`): `null`であるかを確認する値です。\n\n#### 戻り値\n\n(`value is null`): 値が`null`の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isNumber.md",
    "content": "# isNumber\n\n与えられた値が数値型かどうかを確認します。\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 使用法\n\n### `isNumber(value)`\n\n値が数値かどうかを確認したい場合に `isNumber` を使用してください。\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\n// 基本的な数値の確認\nisNumber(123); // true\nisNumber(3.14); // true\nisNumber(NaN); // true\nisNumber(Infinity); // true\n\n// 他の型との区別\nisNumber('123'); // false\nisNumber(true); // false\nisNumber(null); // false\nisNumber(undefined); // false\n```\n\nTypeScript で型ガードとして使用する場合に特に便利です。\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\nfunction processValue(value: unknown) {\n  if (isNumber(value)) {\n    // value は number に型が絞り込まれます\n    console.log(value * 2);\n  } else {\n    console.log('数値ではありません');\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 数値型かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is number`): 値が数値の場合は `true`、そうでなければ `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isPlainObject.md",
    "content": "# isPlainObject\n\n値が純粋なオブジェクト（plain object）であるかを確認します。\n\n```typescript\nconst result = isPlainObject(value);\n```\n\n## 使用法\n\n### `isPlainObject(value)`\n\n値が純粋なオブジェクトであるかを確認したい場合は、`isPlainObject`を使用してください。純粋なオブジェクトは、オブジェクトリテラル（`{}`）または`Object`コンストラクタで作成されたオブジェクトを指します。クラスインスタンス、配列、またはその他の特殊なオブジェクトは純粋なオブジェクトではありません。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\n// 純粋なオブジェクト\nconsole.log(isPlainObject({})); // true\nconsole.log(isPlainObject({ name: 'John', age: 30 })); // true\nconsole.log(isPlainObject(Object.create(null))); // true\nconsole.log(isPlainObject(new Object())); // true\n\n// 純粋なオブジェクトではないもの\nconsole.log(isPlainObject([])); // false（配列）\nconsole.log(isPlainObject(new Date())); // false（Dateオブジェクト）\nconsole.log(isPlainObject(new Set())); // false（Setオブジェクト）\nconsole.log(isPlainObject(new Map())); // false（Mapオブジェクト）\nconsole.log(isPlainObject(null)); // false（null）\nconsole.log(isPlainObject(42)); // false（数値）\nconsole.log(isPlainObject('hello')); // false（文字列）\n\n// クラスインスタンス\nclass MyClass {}\nconsole.log(isPlainObject(new MyClass())); // false\n```\n\nデータをシリアライズしたり、設定オブジェクトを検証したりする際に便利です。\n\n```typescript\nfunction processConfig(config: unknown) {\n  if (isPlainObject(config)) {\n    // configはRecord<PropertyKey, any>型に絞り込まれます\n    console.log('有効な設定オブジェクト');\n    Object.keys(config).forEach(key => {\n      console.log(`${key}: ${config[key]}`);\n    });\n  } else {\n    throw new Error('設定は純粋なオブジェクトである必要があります');\n  }\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 純粋なオブジェクトであるかを確認する値です。\n\n#### 戻り値\n\n(`value is Record<PropertyKey, any>`): 値が純粋なオブジェクトの場合は`true`、そうでない場合は`false`を返します。\n\n## パフォーマンス比較\n\n|                   | [バンドルサイズ](../../bundle-size.md) | [ランタイム性能](../../performance.md) |\n| ----------------- | -------------------------------------- | -------------------------------------- |\n| es-toolkit        | 279 バイト（82.4% 小さい）             | 1,505,684 回（1.70× 速い）             |\n| es-toolkit/compat | 435 バイト（72.5% 小さい）             | 2,013,760 回（2.28× 速い）             |\n| lodash-es         | 1,586 バイト                           | 882,669 回                             |\n"
  },
  {
    "path": "docs/ja/reference/predicate/isPrimitive.md",
    "content": "# isPrimitive\n\n与えられた値がJavaScriptの原始値であるかを確認します。\n\n```typescript\nconst result = isPrimitive(value);\n```\n\n## 使用法\n\n### `isPrimitive(value)`\n\n値がJavaScriptの原始値であるかを確認したい場合は、`isPrimitive`を使用してください。JavaScriptの原始値は`null`、`undefined`、文字列、数値、真偽値、シンボル、`BigInt`を含みます。オブジェクトや関数などの参照型と区別する際に便利です。\n\n```typescript\nimport { isPrimitive } from 'es-toolkit/predicate';\n\n// 原始値\nconsole.log(isPrimitive(null)); // true\nconsole.log(isPrimitive(undefined)); // true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\nconsole.log(isPrimitive(false)); // true\nconsole.log(isPrimitive(Symbol('test'))); // true\nconsole.log(isPrimitive(123n)); // true\n\n// 参照型（原始値ではない）\nconsole.log(isPrimitive({})); // false\nconsole.log(isPrimitive([])); // false\nconsole.log(isPrimitive(new Date())); // false\nconsole.log(isPrimitive(new Map())); // false\nconsole.log(isPrimitive(new Set())); // false\nconsole.log(isPrimitive(() => {})); // false\nconsole.log(isPrimitive(/regex/)); // false\n```\n\n深いコピーのロジックを実装する際に便利です。\n\n```typescript\n// 原始値とオブジェクトを異なる方法で処理\nfunction deepClone(value: any): any {\n  if (isPrimitive(value)) {\n    // 原始値はそのまま返す\n    return value;\n  }\n\n  // オブジェクトの複製ロジックを実行\n  if (Array.isArray(value)) {\n    return value.map(deepClone);\n  }\n\n  const result: any = {};\n  for (const key in value) {\n    result[key] = deepClone(value[key]);\n  }\n  return result;\n}\n\n// 値の比較で使用\nfunction isEqual(a: unknown, b: unknown): boolean {\n  if (isPrimitive(a) && isPrimitive(b)) {\n    return a === b;\n  }\n\n  // 複雑なオブジェクト比較ロジック...\n  return false;\n}\n\n// ログでの安全な文字列変換\nfunction safeLog(value: unknown) {\n  if (isPrimitive(value)) {\n    console.log('原始値:', value);\n  } else {\n    console.log('オブジェクト:', typeof value, Object.prototype.toString.call(value));\n  }\n}\n```\n\n型ガードとして活用して安全にコードを書くことができます。\n\n```typescript\nfunction processValue(input: unknown) {\n  if (isPrimitive(input)) {\n    // TypeScriptがinputを原始型として推論\n    console.log('原始値の型:', typeof input);\n    console.log('原始値:', input);\n    return input;\n  }\n\n  // ここでinputはオブジェクト型として推論される\n  console.log('オブジェクト型です');\n  return null;\n}\n\n// APIレスポンスの検証\nfunction validateApiResponse(data: unknown) {\n  if (isPrimitive(data)) {\n    return {\n      type: 'primitive',\n      value: data,\n      serializable: true,\n    };\n  }\n\n  return {\n    type: 'object',\n    value: data,\n    serializable: false, // 追加の検証が必要\n  };\n}\n\n// 設定値の処理\nfunction normalizeConfigValue(value: unknown) {\n  if (isPrimitive(value)) {\n    // 原始値は安全に文字列に変換可能\n    return String(value);\n  }\n\n  // オブジェクトはJSONとしてシリアライズ\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return '[複雑なオブジェクト]';\n  }\n}\n```\n\n`String`、`Number`、`Boolean`のようなラッパーオブジェクトと原始値を区別できます。\n\n```typescript\n// ラッパーオブジェクトは原始値ではない\nconsole.log(isPrimitive(new String('hello'))); // false\nconsole.log(isPrimitive(new Number(42))); // false\nconsole.log(isPrimitive(new Boolean(true))); // false\n\n// しかし実際の原始値はtrue\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\n\n// valueOf()で原始値を抽出可能\nconst strObj = new String('hello');\nconsole.log(isPrimitive(strObj.valueOf())); // true\n```\n\n#### パラメータ\n\n- `value` (`unknown`): JavaScript原始値であるかを確認する値です。\n\n#### 戻り値\n\n(`value is null | undefined | string | number | boolean | symbol | bigint`): 値が原始値の場合は`true`、そうでない場合は`false`を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isPromise.md",
    "content": "# isPromise\n\n与えられた値が `Promise` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isPromise(value);\n```\n\n## 使用法\n\n### `isPromise(value)`\n\n値が `Promise` インスタンスかどうかを確認したい場合は `isPromise` を使用してください。非同期コードで `Promise` オブジェクトを他の値と区別する必要がある場合や、条件付きで `await` を使用する必要がある場合に便利です。\n\n```typescript\nimport { isPromise } from 'es-toolkit/predicate';\n\n// Promise インスタンス\nconst promise1 = new Promise(resolve => resolve('done'));\nconst promise2 = Promise.resolve(42);\nconst promise3 = Promise.reject(new Error('failed'));\n\nconsole.log(isPromise(promise1)); // true\nconsole.log(isPromise(promise2)); // true\nconsole.log(isPromise(promise3)); // true\n\n// Promise でない値\nconsole.log(isPromise({})); // false\nconsole.log(isPromise('hello')); // false\nconsole.log(isPromise(42)); // false\nconsole.log(isPromise(null)); // false\nconsole.log(isPromise(undefined)); // false\n```\n\n非同期関数で条件に応じてロジックを実行する際に便利です。\n\n```typescript\n// 値が Promise かどうかを確認して適切に処理\nasync function processValue(input: unknown) {\n  if (isPromise(input)) {\n    // TypeScript が input を Promise<any> として推論\n    const result = await input;\n    console.log('Promise の結果:', result);\n    return result;\n  }\n\n  // Promise でない値はそのまま返す\n  console.log('通常の値:', input);\n  return input;\n}\n\n// API レスポンスの処理\nfunction handleApiCall(response: unknown) {\n  if (isPromise(response)) {\n    return response.then(data => ({ success: true, data })).catch(error => ({ success: false, error: error.message }));\n  }\n\n  // すでに解決された値\n  return { success: true, data: response };\n}\n\n// ユーティリティ関数での活用\nfunction toPromise<T>(value: T | Promise<T>): Promise<T> {\n  if (isPromise(value)) {\n    return value;\n  }\n\n  return Promise.resolve(value);\n}\n```\n\n`Promise` のようなオブジェクトと実際の `Promise` を区別できます。\n\n```typescript\n// thenable オブジェクトは Promise ではない\nconst thenable = {\n  then: (resolve: Function) => resolve('not a promise'),\n};\n\nconsole.log(isPromise(thenable)); // false\n\n// async 関数の結果は Promise\nasync function asyncFunction() {\n  return 'async result';\n}\n\nconsole.log(isPromise(asyncFunction())); // true\n\n// 通常の関数は Promise ではない\nfunction normalFunction() {\n  return 'normal result';\n}\n\nconsole.log(isPromise(normalFunction())); // false\n```\n\nエラー処理にも使用できます。\n\n```typescript\nfunction safeExecute(fn: () => any) {\n  try {\n    const result = fn();\n\n    if (isPromise(result)) {\n      return result.catch(error => {\n        console.error('非同期関数の実行中にエラー:', error);\n        return null;\n      });\n    }\n\n    return result;\n  } catch (error) {\n    console.error('同期関数の実行中にエラー:', error);\n    return null;\n  }\n}\n\n// タイムアウト処理\nfunction withTimeout<T>(valueOrPromise: T | Promise<T>, timeoutMs: number) {\n  if (!isPromise(valueOrPromise)) {\n    return valueOrPromise;\n  }\n\n  const timeoutPromise = new Promise((_, reject) => {\n    setTimeout(() => reject(new Error('Timeout')), timeoutMs);\n  });\n\n  return Promise.race([valueOrPromise, timeoutPromise]);\n}\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Promise インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Promise<any>`): 値が Promise インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isRegExp.md",
    "content": "# isRegExp\n\n与えられた値が `RegExp` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 使用法\n\n### `isRegExp(value)`\n\n値が `RegExp` インスタンスかどうかを確認したい場合は `isRegExp` を使用してください。正規表現オブジェクトを通常の文字列や他のオブジェクトと区別する際に便利です。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/predicate';\n\n// RegExp インスタンス\nconst regex1 = /abc/;\nconst regex2 = new RegExp('abc');\nconst regex3 = new RegExp('\\\\d+', 'g');\n\nconsole.log(isRegExp(regex1)); // true\nconsole.log(isRegExp(regex2)); // true\nconsole.log(isRegExp(regex3)); // true\n\n// RegExp でない値\nconsole.log(isRegExp('/abc/')); // false (文字列)\nconsole.log(isRegExp('abc')); // false\nconsole.log(isRegExp({})); // false\nconsole.log(isRegExp(null)); // false\nconsole.log(isRegExp(undefined)); // false\n```\n\n正規表現パターンの検証や文字列処理に便利です:\n\n```typescript\n// 動的パターン検証\nfunction validatePattern(pattern: unknown, text: string) {\n  if (isRegExp(pattern)) {\n    // TypeScript が pattern を RegExp として推論\n    return pattern.test(text);\n  }\n\n  // 文字列パターンを正規表現に変換\n  if (typeof pattern === 'string') {\n    const regex = new RegExp(pattern);\n    return regex.test(text);\n  }\n\n  return false;\n}\n\n// 使用例\nconsole.log(validatePattern(/hello/, 'hello world')); // true\nconsole.log(validatePattern('\\\\d+', '123')); // true\nconsole.log(validatePattern('invalid', 'text')); // false\n\n// フォーム検証での活用\nfunction createValidator(rule: unknown) {\n  if (isRegExp(rule)) {\n    return (value: string) => rule.test(value);\n  }\n\n  // 他のルールタイプ...\n  return () => false;\n}\n\n// メール検証器を作成\nconst emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst emailValidator = createValidator(emailRegex);\n\nconsole.log(emailValidator('test@example.com')); // true\nconsole.log(emailValidator('invalid-email')); // false\n```\n\n条件付き文字列処理での使用:\n\n```typescript\n// テキスト処理ユーティリティ\nfunction processText(input: string, processor: unknown) {\n  if (isRegExp(processor)) {\n    // 正規表現でマッチする部分を抽出\n    const matches = input.match(processor);\n    return matches ? matches : [];\n  }\n\n  // 他のプロセッサータイプ...\n  return [input];\n}\n\n// 数字を抽出\nconst numberRegex = /\\d+/g;\nconst numbers = processText('価格: 1000円, 割引: 200円', numberRegex);\nconsole.log(numbers); // ['1000', '200']\n\n// URL を抽出\nconst urlRegex = /https?:\\/\\/[^\\s]+/g;\nconst urls = processText('サイト: https://example.com 参考', urlRegex);\nconsole.log(urls); // ['https://example.com']\n\n// 設定ベースのテキスト検証\nclass TextValidator {\n  private rules: Array<{ name: string; rule: unknown }> = [];\n\n  addRule(name: string, rule: unknown) {\n    this.rules.push({ name, rule });\n  }\n\n  validate(text: string) {\n    const results: Array<{ rule: string; passed: boolean }> = [];\n\n    for (const { name, rule } of this.rules) {\n      if (isRegExp(rule)) {\n        results.push({\n          rule: name,\n          passed: rule.test(text),\n        });\n      } else {\n        results.push({\n          rule: name,\n          passed: false,\n        });\n      }\n    }\n\n    return results;\n  }\n}\n\n// 使用例\nconst validator = new TextValidator();\nvalidator.addRule('英字のみ', /^[a-zA-Z]+$/);\nvalidator.addRule('数字を含む', /\\d/);\nvalidator.addRule('特殊文字禁止', /^[^!@#$%^&*()]+$/);\n\nconsole.log(validator.validate('Hello123'));\n// [\n//   { rule: '英字のみ', passed: false },\n//   { rule: '数字を含む', passed: true },\n//   { rule: '特殊文字禁止', passed: true }\n// ]\n```\n\n文字列と正規表現を区別する:\n\n```typescript\n// 検索機能での活用\nfunction searchText(content: string, query: unknown) {\n  if (isRegExp(query)) {\n    // 正規表現検索 - 高度なパターンマッチング\n    const matches = content.match(query);\n    return matches ? matches.length : 0;\n  }\n\n  if (typeof query === 'string') {\n    // 通常の文字列検索\n    const regex = new RegExp(query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n    const matches = content.match(regex);\n    return matches ? matches.length : 0;\n  }\n\n  return 0;\n}\n\n// 使用例\nconst text = 'Hello world! Hello everyone!';\n\nconsole.log(searchText(text, /hello/gi)); // 2 (正規表現)\nconsole.log(searchText(text, 'Hello')); // 2 (文字列、エスケープ済み)\nconsole.log(searchText(text, /h.llo/i)); // 2 (パターンマッチング)\n\n// 動的フィルタリング\nfunction createFilter(patterns: unknown[]) {\n  const regexPatterns = patterns.filter(isRegExp);\n\n  return (text: string) => {\n    return regexPatterns.some(pattern => pattern.test(text));\n  };\n}\n\n// スパムフィルターの例\nconst spamPatterns = [\n  /\\b(広告|宣伝)\\b/,\n  /\\d{3}-\\d{4}-\\d{4}/, // 電話番号パターン\n  'invalid', // RegExp ではない、フィルターから除外\n  /\\$\\d+/, // 価格パターン\n];\n\nconst spamFilter = createFilter(spamPatterns);\nconsole.log(spamFilter('緊急広告です!')); // true\nconsole.log(spamFilter('こんにちは')); // false\n```\n\n正規表現のフラグとプロパティを活用:\n\n```typescript\n// RegExp プロパティを確認\nfunction analyzeRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return {\n      source: value.source,\n      flags: value.flags,\n      global: value.global,\n      ignoreCase: value.ignoreCase,\n      multiline: value.multiline,\n      unicode: value.unicode,\n      sticky: value.sticky,\n    };\n  }\n\n  return null;\n}\n\n// 使用例\nconst regex = /hello/gim;\nconst analysis = analyzeRegex(regex);\nconsole.log(analysis);\n// {\n//   source: 'hello',\n//   flags: 'gim',\n//   global: true,\n//   ignoreCase: true,\n//   multiline: true,\n//   unicode: false,\n//   sticky: false\n// }\n\n// 正規表現を複製\nfunction cloneRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return new RegExp(value.source, value.flags);\n  }\n\n  return null;\n}\n\nconst originalRegex = /test/gi;\nconst clonedRegex = cloneRegex(originalRegex);\nconsole.log(clonedRegex?.test('TEST')); // true\n```\n\n#### パラメータ\n\n- `value` (`unknown`): RegExp インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is RegExp`): 値が RegExp インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isSet.md",
    "content": "# isSet\n\n与えられた値が `Set` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isSet(value);\n```\n\n## 使用法\n\n### `isSet(value)`\n\n値が `Set` インスタンスかどうかを確認したい場合は `isSet` を使用してください。`Set` オブジェクトを他のオブジェクトと区別する際に便利です。\n\n```typescript\nimport { isSet } from 'es-toolkit/predicate';\n\n// Set インスタンス\nconst set1 = new Set();\nconst set2 = new Set([1, 2, 3]);\nconst set3 = new Set(['a', 'b', 'c']);\n\nconsole.log(isSet(set1)); // true\nconsole.log(isSet(set2)); // true\nconsole.log(isSet(set3)); // true\n\n// Set でない値\nconsole.log(isSet(new Map())); // false\nconsole.log(isSet(new WeakSet())); // false\nconsole.log(isSet([])); // false\nconsole.log(isSet({})); // false\nconsole.log(isSet(null)); // false\nconsole.log(isSet(undefined)); // false\n```\n\n`Set`、`Array`、`Map` などの JavaScript 組み込みオブジェクトごとに異なるロジックを実行する際に便利です。\n\n```typescript\n// コレクションサイズの計算\nfunction getCollectionSize(collection: unknown): number {\n  if (isSet(collection)) {\n    // TypeScript が collection を Set<any> として推論\n    return collection.size;\n  }\n\n  if (Array.isArray(collection)) {\n    return collection.length;\n  }\n\n  if (collection && typeof collection === 'object') {\n    return Object.keys(collection).length;\n  }\n\n  return 0;\n}\n\n// 使用例\nconsole.log(getCollectionSize(new Set([1, 2, 3]))); // 3\nconsole.log(getCollectionSize([1, 2, 3])); // 3\nconsole.log(getCollectionSize({ a: 1, b: 2 })); // 2\n\n// 重複削除ユーティリティ\nfunction removeDuplicates(data: unknown) {\n  if (isSet(data)) {\n    // すでに Set ならそのまま返す\n    return data;\n  }\n\n  if (Array.isArray(data)) {\n    return new Set(data);\n  }\n\n  // 他のタイプは変換しない\n  return data;\n}\n\nconst duplicatedArray = [1, 2, 2, 3, 3, 3];\nconst uniqueSet = removeDuplicates(duplicatedArray);\nconsole.log(uniqueSet); // Set { 1, 2, 3 }\n\nconst existingSet = new Set(['a', 'b']);\nconsole.log(removeDuplicates(existingSet)); // Set { 'a', 'b' } (同じ Set を返す)\n```\n\nSet の操作やデータ変換にも幅広く活用できます。\n\n```typescript\n// ユニバーサルコレクションのマージ\nfunction mergeCollections(...collections: unknown[]): Set<any> {\n  const result = new Set();\n\n  for (const collection of collections) {\n    if (isSet(collection)) {\n      // Set のすべての値を結果に追加\n      for (const item of collection) {\n        result.add(item);\n      }\n    } else if (Array.isArray(collection)) {\n      // 配列のすべての値を追加\n      for (const item of collection) {\n        result.add(item);\n      }\n    }\n  }\n\n  return result;\n}\n\n// 使用例\nconst set1 = new Set([1, 2, 3]);\nconst array1 = [3, 4, 5];\nconst set2 = new Set(['a', 'b']);\n\nconst merged = mergeCollections(set1, array1, set2);\nconsole.log(merged); // Set { 1, 2, 3, 4, 5, 'a', 'b' }\n\n// コレクションの交差を計算\nfunction getIntersection(coll1: unknown, coll2: unknown): Set<any> {\n  const set1 = isSet(coll1) ? coll1 : new Set(Array.isArray(coll1) ? coll1 : []);\n  const set2 = isSet(coll2) ? coll2 : new Set(Array.isArray(coll2) ? coll2 : []);\n\n  const intersection = new Set();\n\n  for (const item of set1) {\n    if (set2.has(item)) {\n      intersection.add(item);\n    }\n  }\n\n  return intersection;\n}\n\n// 使用例\nconst setA = new Set([1, 2, 3, 4]);\nconst arrayB = [3, 4, 5, 6];\n\nconst intersection = getIntersection(setA, arrayB);\nconsole.log(intersection); // Set { 3, 4 }\n```\n\n#### パラメータ\n\n- `value` (`unknown`): Set インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Set<any>`): 値が Set インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isString.md",
    "content": "# isString\n\n与えられた値が文字列かどうかを確認します。\n\n```typescript\nconst result = isString(value);\n```\n\n## 使用法\n\n### `isString(value)`\n\n値が文字列かどうかを確認したい場合は `isString` を使用してください。文字列タイプを他のプリミティブ型やオブジェクトと区別する際に便利です。\n\n```typescript\nimport { isString } from 'es-toolkit/predicate';\n\n// 文字列の値\nconsole.log(isString('hello')); // true\nconsole.log(isString('')); // true\nconsole.log(isString('123')); // true\nconsole.log(isString('true')); // true\n\n// 文字列でない値\nconsole.log(isString(123)); // false\nconsole.log(isString(true)); // false\nconsole.log(isString(null)); // false\nconsole.log(isString(undefined)); // false\nconsole.log(isString([])); // false\nconsole.log(isString({})); // false\nconsole.log(isString(new String('hello'))); // false (String オブジェクト)\n```\n\nデータ検証や型安全な文字列処理に便利です:\n\n```typescript\n// 安全な文字列操作\nfunction processText(input: unknown): string {\n  if (isString(input)) {\n    // TypeScript が input を string として推論\n    return input.trim().toLowerCase();\n  }\n\n  // 他のタイプを文字列に変換\n  return String(input);\n}\n\n// 使用例\nconsole.log(processText('  HELLO  ')); // 'hello'\nconsole.log(processText(123)); // '123'\nconsole.log(processText(true)); // 'true'\nconsole.log(processText(null)); // 'null'\n\n// フォームデータの検証\nfunction validateForm(data: Record<string, unknown>) {\n  const errors: string[] = [];\n\n  if (!isString(data.name) || data.name.length === 0) {\n    errors.push('名前は必須入力項目です');\n  }\n\n  if (!isString(data.email) || !data.email.includes('@')) {\n    errors.push('有効なメールアドレスを入力してください');\n  }\n\n  return {\n    isValid: errors.length === 0,\n    errors,\n  };\n}\n\n// 使用例\nconsole.log(validateForm({ name: 'John', email: 'john@example.com' }));\n// { isValid: true, errors: [] }\n\nconsole.log(validateForm({ name: 123, email: 'invalid-email' }));\n// { isValid: false, errors: ['名前は必須入力項目です', '有効なメールアドレスを入力してください'] }\n```\n\n#### パラメータ\n\n- `value` (`unknown`): 文字列かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is string`): 値が文字列の場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isSymbol.md",
    "content": "# isSymbol\n\n与えられた値が `symbol` かどうかを確認します。\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 使用法\n\n### `isSymbol(value)`\n\n値が `symbol` かどうかを確認したい場合は `isSymbol` を使用してください。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/predicate';\n\n// symbol の値\nconst sym1 = Symbol('description');\nconst sym2 = Symbol.for('global');\nconst sym3 = Symbol.iterator;\n\nconsole.log(isSymbol(sym1)); // true\nconsole.log(isSymbol(sym2)); // true\nconsole.log(isSymbol(sym3)); // true\n\n// symbol でない値\nconsole.log(isSymbol('symbol')); // false\nconsole.log(isSymbol(123)); // false\nconsole.log(isSymbol(true)); // false\nconsole.log(isSymbol(null)); // false\nconsole.log(isSymbol(undefined)); // false\nconsole.log(isSymbol({})); // false\nconsole.log(isSymbol([])); // false\n```\n\nオブジェクトのプロパティに安全にアクセスしたり、メタデータを管理する際に便利です。\n\n```typescript\n// 安全なプロパティアクセス\nfunction getPropertyValue(obj: object, key: unknown) {\n  if (isSymbol(key)) {\n    // TypeScript が key を symbol として推論\n    return (obj as any)[key];\n  }\n\n  if (typeof key === 'string') {\n    return (obj as any)[key];\n  }\n\n  return undefined;\n}\n\n// 使用例\nconst mySymbol = Symbol('myKey');\nconst obj = {\n  name: 'John',\n  [mySymbol]: 'secret value',\n};\n\nconsole.log(getPropertyValue(obj, 'name')); // 'John'\nconsole.log(getPropertyValue(obj, mySymbol)); // 'secret value'\nconsole.log(getPropertyValue(obj, 123)); // undefined\n\n// メタデータストレージ\nclass MetadataManager {\n  private metadata = new Map<symbol, any>();\n\n  setMetadata(key: unknown, value: any): boolean {\n    if (isSymbol(key)) {\n      this.metadata.set(key, value);\n      return true;\n    }\n    return false;\n  }\n\n  getMetadata(key: unknown): any {\n    if (isSymbol(key)) {\n      return this.metadata.get(key);\n    }\n    return undefined;\n  }\n\n  hasMetadata(key: unknown): boolean {\n    if (isSymbol(key)) {\n      return this.metadata.has(key);\n    }\n    return false;\n  }\n}\n\n// 使用例\nconst manager = new MetadataManager();\nconst typeSymbol = Symbol('type');\nconst versionSymbol = Symbol('version');\n\nmanager.setMetadata(typeSymbol, 'user');\nmanager.setMetadata(versionSymbol, '1.0');\nmanager.setMetadata('invalid', 'value'); // false, symbol ではない\n\nconsole.log(manager.getMetadata(typeSymbol)); // 'user'\nconsole.log(manager.hasMetadata(versionSymbol)); // true\n```\n\n#### パラメータ\n\n- `value` (`unknown`): symbol かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is symbol`): 値が symbol の場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isTypedArray.md",
    "content": "# isTypedArray\n\n与えられた値が `TypedArray` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isTypedArray(value);\n```\n\n## 使用法\n\n### `isTypedArray(value)`\n\n値が [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) インスタンスかどうかを確認したい場合は `isTypedArray` を使用してください。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/predicate';\n\n// TypedArray インスタンス\nconst uint8 = new Uint8Array([1, 2, 3]);\nconst int16 = new Int16Array([1000, 2000]);\nconst float32 = new Float32Array([1.5, 2.5]);\nconst bigUint64 = new BigUint64Array([1n, 2n]);\n\nconsole.log(isTypedArray(uint8)); // true\nconsole.log(isTypedArray(int16)); // true\nconsole.log(isTypedArray(float32)); // true\nconsole.log(isTypedArray(bigUint64)); // true\n\n// TypedArray でない値\nconsole.log(isTypedArray([1, 2, 3])); // false (通常の配列)\nconsole.log(isTypedArray(new ArrayBuffer(8))); // false (ArrayBuffer)\nconsole.log(isTypedArray(new DataView(new ArrayBuffer(8)))); // false (DataView)\nconsole.log(isTypedArray({})); // false\nconsole.log(isTypedArray(null)); // false\nconsole.log(isTypedArray(undefined)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): TypedArray インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Float32Array | Float64Array`): 値が TypedArray インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isUndefined.md",
    "content": "# isUndefined\n\n与えられた値が `undefined` かどうかを確認します。\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 使用法\n\n### `isUndefined(value)`\n\n値が `undefined` かどうかを確認したい場合は `isUndefined` を使用してください。変数が初期化されているかどうかや、オプショナルプロパティが存在するかどうかを確認する際に便利です。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/predicate';\n\n// undefined の値\nconsole.log(isUndefined(undefined)); // true\nconsole.log(isUndefined(void 0)); // true\n\nlet uninitialized: string;\nconsole.log(isUndefined(uninitialized)); // true\n\n// undefined でない値\nconsole.log(isUndefined(null)); // false\nconsole.log(isUndefined('')); // false\nconsole.log(isUndefined(0)); // false\nconsole.log(isUndefined(false)); // false\nconsole.log(isUndefined({})); // false\nconsole.log(isUndefined([])); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): undefined かどうかを確認する値です。\n\n#### 戻り値\n\n(`value is undefined`): 値が undefined の場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isWeakMap.md",
    "content": "# isWeakMap\n\n与えられた値が `WeakMap` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 使用法\n\n### `isWeakMap(value)`\n\n値が `WeakMap` インスタンスかどうかを確認したい場合は `isWeakMap` を使用してください。`WeakMap` はオブジェクトをキーとする弱参照のキーバリューストアで、メモリリークを防ぐのに役立ちます。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/predicate';\n\n// WeakMap インスタンス\nconst weakMap1 = new WeakMap();\nconst weakMap2 = new WeakMap([[{}, 'value']]);\n\nconsole.log(isWeakMap(weakMap1)); // true\nconsole.log(isWeakMap(weakMap2)); // true\n\n// WeakMap でない値\nconsole.log(isWeakMap(new Map())); // false\nconsole.log(isWeakMap(new Set())); // false\nconsole.log(isWeakMap(new WeakSet())); // false\nconsole.log(isWeakMap({})); // false\nconsole.log(isWeakMap([])); // false\nconsole.log(isWeakMap(null)); // false\nconsole.log(isWeakMap(undefined)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): WeakMap インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is WeakMap<WeakKey, any>`): 値が WeakMap インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/predicate/isWeakSet.md",
    "content": "# isWeakSet\n\n与えられた値が `WeakSet` インスタンスかどうかを確認します。\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 使用法\n\n### `isWeakSet(value)`\n\n値が WeakSet インスタンスかどうかを確認したい場合は `isWeakSet` を使用してください。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/predicate';\n\n// WeakSet インスタンス\nconst weakSet1 = new WeakSet();\nconst weakSet2 = new WeakSet([{}, []]);\n\nconsole.log(isWeakSet(weakSet1)); // true\nconsole.log(isWeakSet(weakSet2)); // true\n\n// WeakSet でない値\nconsole.log(isWeakSet(new Set())); // false\nconsole.log(isWeakSet(new Map())); // false\nconsole.log(isWeakSet(new WeakMap())); // false\nconsole.log(isWeakSet([])); // false\nconsole.log(isWeakSet({})); // false\nconsole.log(isWeakSet(null)); // false\nconsole.log(isWeakSet(undefined)); // false\n```\n\n#### パラメータ\n\n- `value` (`unknown`): WeakSet インスタンスかどうかを確認する値です。\n\n#### 戻り値\n\n(`value is WeakSet<WeakKey>`): 値が WeakSet インスタンスの場合は `true`、それ以外の場合は `false` を返します。\n"
  },
  {
    "path": "docs/ja/reference/promise/Mutex.md",
    "content": "# Mutex\n\n複数の非同期タスクが同時に実行されないよう順序を守ります。\n\n```typescript\nconst mutex = new Mutex();\n```\n\n## 使用法\n\n### `Mutex()`\n\n複数の非同期タスクが同時に実行されることを防ぎたい場合に`Mutex`を使用します。データベース接続、ファイルシステムアクセス、API呼び出し制限など、同時実行を制御する必要がある状況で便利です。\n\n```typescript\nimport { Mutex } from 'es-toolkit';\n\nconst mutex = new Mutex();\n\n// API呼び出し制限の例\nasync function callAPI() {\n  await mutex.acquire();\n  try {\n    // 同時に複数のAPI呼び出しが発生することを防止\n    const response = await fetch('/api/data');\n    return response.json();\n  } finally {\n    mutex.release();\n  }\n}\n\n// ファイルシステムアクセスの例\nasync function writeToFile(data: string) {\n  await mutex.acquire();\n  try {\n    // 同時に同じファイルへの書き込み操作が発生することを防止\n    await fs.writeFile('data.txt', data);\n    console.log('ファイル書き込み完了');\n  } finally {\n    mutex.release();\n  }\n}\n\n// 複数のタスクを同時に呼び出しても順次実行される\ncallAPI();\ncallAPI(); // 最初のタスクが終わるまで待機\nwriteToFile(); // 前のタスクが終わるまで待機\n```\n\n#### プロパティ\n\n- `isLocked` (`boolean`): 現在ミューテックスが使用中かどうか。`true`の場合、すでに実行中の非同期タスクがあることを意味します。\n\n#### メソッド\n\n- `acquire` (`() => Promise<void>`): 許可を得て非同期タスクを実行するか、許可を得られるまで待機します。\n- `release` (`() => void`): 待機中の次のタスクが実行できるようにします。\n"
  },
  {
    "path": "docs/ja/reference/promise/Semaphore.md",
    "content": "# Semaphore\n\n同時に実行される非同期タスクの数を制限します。\n\n```typescript\nconst semaphore = new Semaphore(capacity);\n```\n\n## 使用法\n\n### `Semaphore(capacity)`\n\n同時に実行できる非同期タスクの数を制限したい場合に`Semaphore`を使用します。特にデータベース接続プール、API呼び出し制限、ファイルダウンロード制限など、リソース使用量を制御する必要がある状況で便利です。\n\n```typescript\nimport { Semaphore } from 'es-toolkit';\n\nconst semaphore = new Semaphore(3);\n\n// API呼び出し制限の例(最大3つまで同時実行)\nasync function callAPI(id: number) {\n  await semaphore.acquire();\n  try {\n    console.log(`API呼び出し開始: ${id}`);\n    const response = await fetch(`/api/data/${id}`);\n    return response.json();\n  } finally {\n    semaphore.release();\n    console.log(`API呼び出し完了: ${id}`);\n  }\n}\n\n// ファイルダウンロード制限の例\nasync function downloadFile(url: string) {\n  await semaphore.acquire();\n  try {\n    console.log(`ダウンロード開始: ${url}`);\n    // ファイルダウンロードロジック\n    await fetch(url);\n  } finally {\n    semaphore.release();\n    console.log(`ダウンロード完了: ${url}`);\n  }\n}\n\n// 5つのタスクを同時に呼び出しても最大3つまでしか同時実行されない\ncallAPI(1);\ncallAPI(2);\ncallAPI(3);\ncallAPI(4); // 前のタスクのいずれかが終わるまで待機\ncallAPI(5); // 前のタスクのいずれかが終わるまで待機\n```\n\n#### パラメータ\n\n- `capacity` (`number`): 同時に実行できるタスクの最大数です。1より大きい整数である必要があります。\n\n#### プロパティ\n\n- `capacity` (`number`): 同時に実行できるタスクの最大数です。\n- `available` (`number`): 現在利用可能な許可の数です。`0`の場合、すべての許可が使用中であることを意味します。\n\n#### メソッド\n\n- `acquire` (`() => Promise<void>`): 許可を得て非同期タスクを実行するか、許可を得られるまで待機します。\n- `release` (`() => void`): 許可を返却して、待機中の次のタスクが実行できるようにします。\n"
  },
  {
    "path": "docs/ja/reference/promise/delay.md",
    "content": "# delay\n\n指定された時間だけコードの実行を遅らせます。\n\n```typescript\nawait delay(ms, options?);\n```\n\n## 使用法\n\n### `delay(ms, options?)`\n\nコードの実行を特定の時間だけ停止したい場合に`delay`を使用します。async/awaitと一緒に使用して、一定時間後に次のコードが実行されるようにできます。必要に応じて`AbortSignal`を通じて遅延をキャンセルすることもできます。\n\n```typescript\nimport { delay } from 'es-toolkit/promise';\n\nasync function example() {\n  console.log('開始');\n  await delay(1000); // 1秒間実行を遅らせます\n  console.log('1秒後に実行されます');\n\n  await delay(500); // さらに0.5秒遅らせます\n  console.log('さらに0.5秒後に実行されます');\n}\n\nexample();\n```\n\nAbortSignalを使用して遅延をキャンセルすることもできます:\n\n```typescript\nasync function cancellableDelay() {\n  const controller = new AbortController();\n  const { signal } = controller;\n\n  // 50ms後に遅延をキャンセルします\n  setTimeout(() => controller.abort(), 50);\n\n  try {\n    await delay(1000, { signal });\n    console.log('1秒が経過しました'); // このコードは実行されません\n  } catch (error) {\n    console.log('遅延がキャンセルされました'); // AbortErrorが発生します\n  }\n}\n```\n\nテストで非同期動作をシミュレートする際にも便利です。\n\n```typescript\nasync function simulateNetworkRequest() {\n  console.log('ネットワークリクエスト開始...');\n  await delay(2000); // 2秒間ネットワーク遅延をシミュレート\n  console.log('レスポンスを受信!');\n  return { data: 'test' };\n}\n```\n\n#### パラメータ\n\n- `ms` (`number`): 遅延させるミリ秒単位の時間です。\n- `options` (`DelayOptions`, オプション): 遅延オプションです。\n  - `signal` (`AbortSignal`, オプション): 遅延をキャンセルできるAbortSignalです。\n\n#### 戻り値\n\n(`Promise<void>`): 指定された時間後に完了するPromiseを返します。\n\n#### エラー\n\nAbortSignalが有効化されると`AbortError`をスローします。\n"
  },
  {
    "path": "docs/ja/reference/promise/timeout.md",
    "content": "# timeout\n\n指定された時間後に`TimeoutError`を発生させる`Promise`を返します。\n\n```typescript\nawait timeout(ms);\n```\n\n## 使用法\n\n### `timeout(ms)`\n\n特定の時間が経過した後にタイムアウトエラーを発生させたい場合に`timeout`を使用します。他のPromiseと`Promise.race()`を一緒に使用して、タスクに時間制限を設定する際に便利です。\n\n```typescript\nimport { timeout } from 'es-toolkit/promise';\n\n// 基本的な使用 - 1秒後にTimeoutErrorが発生\ntry {\n  await timeout(1000);\n  console.log('このコードは実行されません');\n} catch (error) {\n  console.log('タイムアウトエラー発生:', error.message); // 'The operation was timed out'\n}\n```\n\n`Promise.race()`と一緒に使用してタスクに時間制限を設定できます:\n\n```typescript\nasync function fetchWithTimeout(url: string) {\n  try {\n    const result = await Promise.race([\n      fetch(url),\n      timeout(5000), // 5秒制限\n    ]);\n    return result;\n  } catch (error) {\n    if (error.name === 'TimeoutError') {\n      console.log('リクエストに時間がかかりすぎています');\n    }\n    throw error;\n  }\n}\n```\n\n複数の非同期タスクのいずれかが決められた時間内に完了しない場合、全体のタスクを失敗させたい場合にも使用できます。\n\n```typescript\nasync function multipleOperationsWithTimeout() {\n  try {\n    await Promise.race([\n      Promise.all([fetch('/api/data1'), fetch('/api/data2'), fetch('/api/data3')]),\n      timeout(3000), // 全体のタスクに3秒制限\n    ]);\n    console.log('すべてのタスクが時間内に完了しました');\n  } catch (error) {\n    console.log('タスクが時間内に完了しませんでした');\n  }\n}\n```\n\n#### パラメータ\n\n- `ms` (`number`): `TimeoutError`が発生するまでのミリ秒単位の時間です。\n\n#### 戻り値\n\n(`Promise<never>`): 指定された時間後に`TimeoutError`で拒否されるPromiseを返します。\n\n#### エラー\n\n指定された時間が経過すると`TimeoutError`をスローします。\n"
  },
  {
    "path": "docs/ja/reference/promise/withTimeout.md",
    "content": "# withTimeout\n\n非同期関数に時間制限を設定し、指定された時間内に完了しない場合は`TimeoutError`を発生させます。\n\n```typescript\nawait withTimeout(run, ms);\n```\n\n## 使用法\n\n### `withTimeout(run, ms)`\n\n非同期タスクにタイムアウトを設定したい場合に`withTimeout`を使用します。Promiseが指定された時間内に完了しない場合、`TimeoutError`で拒否されるため、無限に待機する状況を防ぐことができます。\n\n```typescript\nimport { withTimeout } from 'es-toolkit/promise';\n\nasync function fetchData() {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n}\n\ntry {\n  // 1秒以内に完了する必要があります\n  const data = await withTimeout(fetchData, 1000);\n  console.log('データを受信しました:', data);\n} catch (error) {\n  if (error.name === 'TimeoutError') {\n    console.log('リクエストがタイムアウトしました');\n  }\n}\n```\n\nデータベースクエリに時間制限を設定したい場合にも使用できます。\n\n```typescript\nasync function queryDatabase(query: string) {\n  // データベースクエリロジック\n  return await db.execute(query);\n}\n\ntry {\n  const result = await withTimeout(\n    () => queryDatabase('SELECT * FROM users'),\n    5000 // 5秒制限\n  );\n  console.log('クエリ結果:', result);\n} catch (error) {\n  console.log('クエリに時間がかかりすぎたためキャンセルされました');\n}\n```\n\n複数のAPI呼び出しの中で最も速いレスポンスだけを受け取りたい場合にも活用できます。\n\n```typescript\nasync function getFastestResponse() {\n  const apis = [() => fetch('/api/server1'), () => fetch('/api/server2'), () => fetch('/api/server3')];\n\n  try {\n    // 各APIに2秒制限を設定し、最も速く応答したものだけを受け取ります\n    const promises = apis.map(api => withTimeout(api, 2000));\n    const result = await Promise.race(promises);\n    return result.json();\n  } catch (error) {\n    console.log('すべてのAPIがタイムアウトしました');\n  }\n}\n```\n\n#### パラメータ\n\n- `run` (`() => Promise<T>`): 実行する非同期関数です。\n- `ms` (`number`): タイムアウトが発生するまでのミリ秒単位の時間です。\n\n#### 戻り値\n\n(`Promise<T>`): 与えられた非同期関数が返す結果、または時間切れ時にTimeoutErrorで拒否されるPromiseを返します。\n\n#### エラー\n\n指定された時間内に完了しない場合、`TimeoutError`をスローします。\n"
  },
  {
    "path": "docs/ja/reference/set/countBy.md",
    "content": "# countBy (`Set`)\n\n変換関数に基づいてSetの項目の出現回数をカウントします。\n\n```typescript\nconst counts = countBy(set, mapper);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `countBy(set, mapper)`\n\nSetの要素が異なるカテゴリにどれだけ属しているかをカウントしたい場合は `countBy` を使用してください。各値からキーを生成する関数を提供すると、生成されたキーとその個数を値とするMapを返します。変換が同じキーを生成する各要素に対してカウントが増加します。\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = countBy(set, value => (value % 2 === 0 ? 'even' : 'odd'));\n// 結果: Map(2) { 'odd' => 3, 'even' => 2 }\n```\n\n様々な基準で要素をカウントできます。\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\n// 文字列の長さでカウントします。\nconst words = new Set(['apple', 'banana', 'cherry', 'date']);\n\nconst byLength = countBy(words, word => word.length);\n// 結果: Map(3) { 5 => 1, 6 => 2, 4 => 1 }\n\n// プロパティでカウントします。\nconst users = new Set([\n  { name: 'Alice', role: 'admin' },\n  { name: 'Bob', role: 'user' },\n  { name: 'Charlie', role: 'user' },\n  { name: 'Diana', role: 'admin' },\n]);\n\nconst byRole = countBy(users, user => user.role);\n// 結果: Map(2) { 'admin' => 2, 'user' => 2 }\n\n// 派生カテゴリでカウントします。\nconst ages = new Set([15, 25, 35, 45, 55]);\n\nconst ageGroups = countBy(ages, age => {\n  if (age < 18) return 'minor';\n  if (age < 65) return 'adult';\n  return 'senior';\n});\n// 結果: Map(2) { 'minor' => 1, 'adult' => 4 }\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): 出現回数をカウントするSetです。\n- `mapper` (`(value: T, value2: T, set: Set<T>) => K`): カウント用のキーを生成する関数です。\n\n#### 戻り値\n\n(`Map<K, number>`): マッピングされたキーとその個数を含むMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/every.md",
    "content": "# every (`Set`)\n\nSetのすべての要素が提供された述語関数を満たすかどうかをテストします。\n\n```typescript\nconst allMatch = every(set, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `every(set, doesMatch)`\n\nSetのすべての要素が特定の条件を満たすかどうかを確認したい場合は `every` を使用してください。各要素をテストする述語関数を提供すると、すべての要素が述語を満たす場合はtrueを、そうでない場合はfalseを返します。\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\nconst set = new Set([10, 20, 30]);\n\nconst result = every(set, value => value > 5);\n// 結果: true\n\nconst result2 = every(set, value => value > 15);\n// 結果: false\n```\n\n様々な条件をテストできます。\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\n// すべての値が基準を満たすかチェックします。\nconst ages = new Set([25, 30, 35, 40]);\n\nconst allAdults = every(ages, age => age >= 18);\n// 結果: true\n\nconst allSeniors = every(ages, age => age >= 65);\n// 結果: false\n\n// オブジェクトのプロパティをチェックします。\nconst users = new Set([\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n]);\n\nconst allActive = every(users, user => user.active);\n// 結果: true\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): テストするSetです。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 各要素をテストする述語関数です。\n\n#### 戻り値\n\n(`boolean`): すべての要素が述語を満たす場合はtrue、そうでない場合はfalseを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/filter.md",
    "content": "# filter (`Set`)\n\n述語関数に基づいてSetをフィルタリングします。\n\n```typescript\nconst filtered = filter(set, callback);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `filter(set, callback)`\n\n特定の条件を満たす要素のみを含む新しいSetを作成したい場合は `filter` を使用してください。各要素をテストする述語関数を提供すると、述語がtrueを返す要素のみで構成された新しいSetを返します。\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = filter(set, value => value > 2);\n// 結果: Set(3) { 3, 4, 5 }\n```\n\n様々な基準でフィルタリングできます。\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\n// 値の型でフィルタリングします。\nconst numbers = new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n\nconst evenNumbers = filter(numbers, num => num % 2 === 0);\n// 結果: Set(5) { 2, 4, 6, 8, 10 }\n\n// オブジェクトをフィルタリングします。\nconst products = new Set([\n  { name: 'Laptop', price: 1000, available: true },\n  { name: 'Mouse', price: 25, available: false },\n  { name: 'Keyboard', price: 75, available: true },\n]);\n\nconst availableProducts = filter(products, product => product.available);\n// 結果: LaptopとKeyboardを含むSet\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): フィルタリングするSetです。\n- `callback` (`(value: T, value2: T, set: Set<T>) => boolean`): 各要素をテストする述語関数です。\n\n#### 戻り値\n\n(`Set<T>`): 述語を満たす要素のみを含む新しいSetを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/find.md",
    "content": "# find (`Set`)\n\n述語関数がtrueを返すSetの最初の要素を見つけます。\n\n```typescript\nconst element = find(set, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `find(set, doesMatch)`\n\n特定の条件に一致するSetの最初の要素を見つけたい場合は `find` を使用してください。各要素をテストする述語関数を提供すると、最初に一致した要素を返すか、見つからない場合はundefinedを返します。\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\nconst set = new Set([\n  { name: 'apple', quantity: 10 },\n  { name: 'banana', quantity: 5 },\n  { name: 'grape', quantity: 15 },\n]);\n\nconst result = find(set, value => value.quantity > 10);\n// 結果: { name: 'grape', quantity: 15 }\n```\n\n様々な基準で検索できます。\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\n// 値のプロパティで検索します。\nconst users = new Set([\n  { id: 1, name: 'Alice', age: 25 },\n  { id: 2, name: 'Bob', age: 30 },\n  { id: 3, name: 'Charlie', age: 35 },\n]);\n\nconst senior = find(users, user => user.age >= 35);\n// 結果: { id: 3, name: 'Charlie', age: 35 }\n\n// 文字列のパターンで検索します。\nconst emails = new Set(['user@example.com', 'admin@example.com', 'info@company.com']);\n\nconst adminEmail = find(emails, email => email.startsWith('admin'));\n// 結果: 'admin@example.com'\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): 検索するSetです。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 各要素をテストする述語関数です。\n\n#### 戻り値\n\n(`T | undefined`): 述語を満たす最初の要素を返すか、見つからない場合はundefinedを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/forEach.md",
    "content": "# forEach (`Set`)\n\nSetの各要素に対して提供された関数を一度ずつ実行します。\n\n```typescript\nforEach(set, callback);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `forEach(set, callback)`\n\nSetの各要素に対して関数を実行したい場合は `forEach` を使用してください。コールバック関数は値を2回 (Map.forEachとの一貫性のため)、そしてSet自体を引数として受け取ります。ログ出力、外部状態の更新、または各要素に対する操作の実行などの副作用に便利です。\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nforEach(set, value => {\n  console.log(value * 2);\n});\n// 出力:\n// 2\n// 4\n// 6\n```\n\n各要素に対して様々な操作を実行できます。\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\n// 値を累積します。\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nlet sum = 0;\nforEach(numbers, value => {\n  sum += value;\n});\n// sumは15になります\n\n// 変換しながら要素を配列に収集します。\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased: string[] = [];\nforEach(names, value => {\n  uppercased.push(value.toUpperCase());\n});\n// uppercased: ['ALICE', 'BOB', 'CHARLIE']\n\n// 条件に基づいて外部Setを更新します。\nconst scores = new Set([85, 92, 78, 95, 88]);\n\nconst highScores = new Set<number>();\nforEach(scores, value => {\n  if (value >= 90) {\n    highScores.add(value);\n  }\n});\n// highScoresには92と95が含まれます\n\n// オブジェクトを処理します。\nconst users = new Set([\n  { id: 1, name: 'Alice', active: true },\n  { id: 2, name: 'Bob', active: false },\n  { id: 3, name: 'Charlie', active: true },\n]);\n\nconst activeUserIds: number[] = [];\nforEach(users, user => {\n  if (user.active) {\n    activeUserIds.push(user.id);\n  }\n});\n// activeUserIds: [1, 3]\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): 反復処理するSetです。\n- `callback` (`(value: T, value2: T, set: Set<T>) => void`): 各要素に対して実行する関数です。\n\n#### 戻り値\n\n(`void`): この関数は値を返しません。\n"
  },
  {
    "path": "docs/ja/reference/set/keyBy.md",
    "content": "# keyBy (`Set`)\n\n提供されたキー生成関数に基づいてSetの各要素をマッピングします。\n\n```typescript\nconst result = keyBy(set, getKeyFromValue);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `keyBy(set, getKeyFromValue)`\n\n値からキーを生成してSetをMapに変換したい場合は `keyBy` を使用してください。各値からキーを生成する関数を提供すると、キー関数によって生成されたキーと元のセットの対応する値で構成された新しいMapを返します。複数の要素が同じキーを生成する場合、最後に見つかった値が使用されます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\nconst set = new Set([\n  { type: 'fruit', name: 'apple' },\n  { type: 'fruit', name: 'banana' },\n  { type: 'vegetable', name: 'carrot' },\n]);\n\nconst result = keyBy(set, item => item.type);\n// 結果:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 注: 'banana'は最後の'fruit'だったため保持されます\n```\n\n様々な基準でインデックスを作成できます。\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\n// IDでインデックス化します。\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 結果: Map(3) { 1 => {...}, 2 => {...}, 3 => {...} }\n\n// 名前でインデックス化します。\nconst byName = keyBy(users, user => user.name);\n// 結果: キーが'Alice', 'Bob', 'Charlie'のMap\n\n// 派生値でインデックス化します。\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nconst byParity = keyBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 結果: Map(2) {\n//   'odd' => 5,\n//   'even' => 4\n// }\n// 注: 最後の偶数(4)と最後の奇数(5)が保持されます\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): マッピングする要素のSetです。\n- `getKeyFromValue` (`(value: T, value2: T, set: Set<T>) => K`): 値からキーを生成する関数です。\n\n#### 戻り値\n\n(`Map<K, T>`): 生成されたキーが各要素の値にマッピングされたMapを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/map.md",
    "content": "# map (`Set`)\n\n提供された関数で要素を変換した新しいSetを作成します。\n\n```typescript\nconst transformed = map(set, getNewValue);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `map(set, getNewValue)`\n\nSetの要素を変換したい場合は `map` を使用してください。各要素から新しい値を生成する関数を提供すると、変換された要素で構成された新しいSetを返します。\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = map(set, value => value * 2);\n// 結果: Set(3) { 2, 4, 6 }\n```\n\n様々な方法で要素を変換できます。\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\n// 文字列を変換します。\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased = map(names, name => name.toUpperCase());\n// 結果: Set(3) { 'ALICE', 'BOB', 'CHARLIE' }\n\n// オブジェクトに変換します。\nconst prices = new Set([10, 20, 30]);\n\nconst products = map(prices, price => ({ price, currency: 'USD' }));\n// 結果: { price: 10, currency: 'USD' }などのオブジェクトを含むSet\n\n// プロパティを抽出します。\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n]);\n\nconst ids = map(users, user => user.id);\n// 結果: Set(2) { 1, 2 }\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): 変換するSetです。\n- `getNewValue` (`(value: T, value2: T, set: Set<T>) => U`): 要素から新しい値を生成する関数です。\n\n#### 戻り値\n\n(`Set<U>`): 変換された要素を持つ新しいSetを返します。\n"
  },
  {
    "path": "docs/ja/reference/set/reduce.md",
    "content": "# reduce (`Set`)\n\nSetの要素を反復処理してコールバック関数を適用し、単一の値に縮小します。\n\n```typescript\nconst result = reduce(set, callback, initialValue);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `reduce(set, callback, initialValue?)`\n\n各要素から結果を蓄積してSetを単一の値に変換したい場合は `reduce` を使用してください。各要素を処理してアキュムレータを更新するコールバック関数を提供してください。初期値が提供されると、アキュムレータの開始値として使用されます。初期値が提供されずSetが空の場合、TypeErrorがスローされます。\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = reduce(set, (acc, value) => acc + value, 0);\n// 結果: 6\n```\n\n様々な方法でSetを縮小できます。\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\n// 初期値を使用して合計を計算します。\nconst numbers = new Set([10, 20, 30, 40]);\n\nconst total = reduce(numbers, (acc, num) => acc + num, 0);\n// 結果: 100\n\n// 初期値なし(最初の要素を使用)\nconst values = new Set([5, 10]);\n\nconst sum = reduce(values, (acc, value) => acc + value);\n// 結果: 15 (最初の値5から開始)\n\n// Setから配列を構築します。\nconst uniqueNames = new Set(['Alice', 'Bob', 'Charlie']);\n\nconst nameList = reduce(uniqueNames, (acc, name) => [...acc, name.toUpperCase()], [] as string[]);\n// 結果: ['ALICE', 'BOB', 'CHARLIE']\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): 縮小するSetです。\n- `callback` (`(accumulator: A, value: T, value2: T, set: Set<T>) => A`): 各要素を処理してアキュムレータを更新する関数です。\n- `initialValue` (`A`, オプション): アキュムレータの初期値です。提供されない場合、Setの最初の要素が使用されます。\n\n#### 戻り値\n\n(`A`): 最終的に蓄積された値を返します。\n\n#### 例外\n\n(`TypeError`): Setが空で初期値が提供されない場合にスローされます。\n"
  },
  {
    "path": "docs/ja/reference/set/some.md",
    "content": "# some (`Set`)\n\nSetの少なくとも1つの要素が提供された述語関数を満たすかどうかをテストします。\n\n```typescript\nconst anyMatch = some(set, doesMatch);\n```\n\n::: info\n\nこの関数は、他のコレクション型の類似関数との潜在的な競合を避けるため、`es-toolkit/set`から独占的に利用できます。\n\n:::\n\n## 使用法\n\n### `some(set, doesMatch)`\n\nSetの少なくとも1つの要素が特定の条件を満たすかどうかを確認したい場合は `some` を使用してください。各要素をテストする述語関数を提供すると、少なくとも1つの要素が述語を満たす場合はtrueを、そうでない場合はfalseを返します。\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = some(set, value => value > 2);\n// 結果: true\n\nconst result2 = some(set, value => value > 5);\n// 結果: false\n```\n\n様々な条件をテストできます。\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\n// いずれかの値が基準を満たすかチェックします。\nconst numbers = new Set([1, 3, 5, 7, 9]);\n\nconst hasEven = some(numbers, num => num % 2 === 0);\n// 結果: false\n\nconst hasLarge = some(numbers, num => num > 5);\n// 結果: true\n\n// オブジェクトのプロパティをチェックします。\nconst users = new Set([\n  { name: 'Alice', admin: false },\n  { name: 'Bob', admin: true },\n  { name: 'Charlie', admin: false },\n]);\n\nconst hasAdmin = some(users, user => user.admin);\n// 結果: true\n```\n\n#### パラメータ\n\n- `set` (`Set<T>`): テストするSetです。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 各要素をテストする述語関数です。\n\n#### 戻り値\n\n(`boolean`): 少なくとも1つの要素が述語を満たす場合はtrue、そうでない場合はfalseを返します。\n"
  },
  {
    "path": "docs/ja/reference/string/camelCase.md",
    "content": "# camelCase\n\n文字列をキャメルケース(Camel case)に変換します。\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 使用法\n\n### `camelCase(str)`\n\n文字列をキャメルケースに変換したいときは`camelCase`を使用します。キャメルケースは最初の単語を小文字で書き、残りの単語の最初の文字を大文字で連結する命名規則です。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// 様々な形式の文字列をキャメルケースに変換\ncamelCase('hello world'); // returns 'helloWorld'\ncamelCase('some-hyphen-text'); // returns 'someHyphenText'\ncamelCase('CONSTANT_CASE'); // returns 'constantCase'\ncamelCase('PascalCase'); // returns 'pascalCase'\ncamelCase('mixed   SpAcE'); // returns 'mixedSpAcE'\n```\n\n特殊文字や空白、ハイフンのような区切り文字がある文字列をJavaScriptの変数名やオブジェクトのプロパティ名として使用しやすい形式に変換します。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// APIレスポンスから受け取ったキーを変換\nconst apiKey = 'user_first_name';\nconst jsKey = camelCase(apiKey); // 'userFirstName'\n\n// HTML属性をJavaScriptプロパティに変換\nconst cssProperty = 'background-color';\nconst jsProperty = camelCase(cssProperty); // 'backgroundColor'\n```\n\nUnicode文字も保持します。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\ncamelCase('keep unicode 😅'); // returns 'keepUnicode😅'\ncamelCase('한글-테스트'); // returns '한글테스트'\n```\n\n#### パラメータ\n\n- `str` (`string`): キャメルケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): キャメルケースに変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/capitalize.md",
    "content": "# capitalize\n\n文字列の最初の文字を大文字に変換し、残りの文字は小文字に変換します。\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 使用法\n\n### `capitalize(str)`\n\n文字列の最初の文字だけを大文字にして、残りを小文字に統一したいときは`capitalize`を使用します。名前やタイトルを正規化するときに便利です。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// 基本的な使い方\ncapitalize('hello'); // returns 'Hello'\ncapitalize('WORLD'); // returns 'World'\ncapitalize('javaScript'); // returns 'Javascript'\n```\n\n空文字列や1文字の文字列も正しく処理します。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\ncapitalize(''); // returns ''\ncapitalize('a'); // returns 'A'\ncapitalize('A'); // returns 'A'\n```\n\nユーザー入力を正規化したり、タイトルを作成するときに活用できます。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// ユーザー名を正規化\nconst userName = 'john DOE';\nconst formattedName = userName.split(' ').map(capitalize).join(' ');\n// returns 'John Doe'\n\n// タイトルを作成\nconst title = capitalize('welcome to our website');\n// returns 'Welcome to our website'\n```\n\n#### パラメータ\n\n- `str` (`string`): 最初の文字を大文字に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 最初の文字は大文字、残りは小文字に変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/constantCase.md",
    "content": "# constantCase\n\n文字列を定数ケースに変換します。\n\n```typescript\nconst result = constantCase(str);\n```\n\n## 使用法\n\n### `constantCase(str)`\n\n文字列を定数ケースに変換したいときは`constantCase`を使用します。定数ケースはすべての文字を大文字で書き、単語の間をアンダースコア(`_`)で区切る命名規則です。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 様々な形式の文字列を定数ケースに変換\nconstantCase('hello world'); // returns 'HELLO_WORLD'\nconstantCase('camelCase'); // returns 'CAMEL_CASE'\nconstantCase('some-kebab-case'); // returns 'SOME_KEBAB_CASE'\nconstantCase('PascalCase'); // returns 'PASCAL_CASE'\nconstantCase('snake_case'); // returns 'SNAKE_CASE'\n```\n\nJavaScriptや他のプログラミング言語で定数を定義するときによく使用される命名規則です。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 環境変数名を生成\nconst configKey = 'api base url';\nconst envVar = constantCase(configKey); // 'API_BASE_URL'\n\n// 定数名を生成\nconst settingName = 'maximum retry count';\nconst constantName = constantCase(settingName); // 'MAXIMUM_RETRY_COUNT'\n```\n\n空白や特殊文字が含まれる文字列も適切に処理します。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\nconstantCase('HTTP Request'); // returns 'HTTP_REQUEST'\nconstantCase('user-agent-string'); // returns 'USER_AGENT_STRING'\nconstantCase('  multiple   spaces  '); // returns 'MULTIPLE_SPACES'\n```\n\n#### パラメータ\n\n- `str` (`string`): 定数ケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): 定数ケースに変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/deburr.md",
    "content": "# deburr\n\n特殊文字とアクセント記号をASCII文字に変換します。\n\n```typescript\nconst result = deburr(str);\n```\n\n## 使用法\n\n### `deburr(str)`\n\n文字列に含まれる特殊文字やアクセント記号(ダイアクリティカルマーク)をASCII文字に変換したいときは`deburr`を使用します。URLやファイル名、検索機能で文字を正規化するときに便利です。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 基本的な使い方\ndeburr('café'); // returns 'cafe'\ndeburr('résumé'); // returns 'resume'\ndeburr('naïve'); // returns 'naive'\ndeburr('Zürich'); // returns 'Zurich'\n```\n\n様々な言語の特殊文字を処理できます。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// ドイツ語\ndeburr('München'); // returns 'Munchen'\ndeburr('Björk'); // returns 'Bjork'\n\n// フランス語\ndeburr('Crème brûlée'); // returns 'Creme brulee'\ndeburr('naïveté'); // returns 'naivete'\n\n// スペイン語\ndeburr('niño'); // returns 'nino'\ndeburr('mañana'); // returns 'manana'\n```\n\nURL生成やファイル名の整理に活用できます。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// URLスラッグを生成\nconst title = 'Caféの特別なメニュー';\nconst slug = deburr(title).toLowerCase().replace(/\\s+/g, '-');\n// returns 'cafeの-特別な-メニュー'\n\n// ファイル名を整理\nconst fileName = 'résumé-田中太郎.pdf';\nconst cleanName = deburr(fileName); // returns 'resume-田中太郎.pdf'\n```\n\n検索機能で文字列比較を簡単にします。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\nfunction searchMatch(query: string, target: string): boolean {\n  const normalizedQuery = deburr(query.toLowerCase());\n  const normalizedTarget = deburr(target.toLowerCase());\n  return normalizedTarget.includes(normalizedQuery);\n}\n\nsearchMatch('cafe', 'Café Mocha'); // returns true\nsearchMatch('resume', 'résumé.pdf'); // returns true\n```\n\n#### パラメータ\n\n- `str` (`string`): 特殊文字やアクセント記号が含まれる文字列です。\n\n#### 戻り値\n\n(`string`): 特殊文字とアクセント記号がASCII文字に変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/escape.md",
    "content": "# escape\n\nHTMLで特別な意味を持つ文字を安全なエンティティに変換します。\n\n```typescript\nconst result = escape(str);\n```\n\n## 使用法\n\n### `escape(str)`\n\nHTMLにテキストを安全に挿入したいときは`escape`を使用します。`&`、`<`、`>`、`\"`、`'`のような特殊文字をHTMLエンティティに変換して、XSS攻撃を防止し、HTMLが正しく表示されるようにします。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 基本的なHTML特殊文字の処理\nescape('<div>Hello World</div>'); // returns '&lt;div&gt;Hello World&lt;/div&gt;'\nescape('Tom & Jerry'); // returns 'Tom &amp; Jerry'\nescape('\"Hello\"'); // returns '&quot;Hello&quot;'\nescape(\"'Hello'\"); // returns '&#39;Hello&#39;'\n```\n\nユーザー入力をHTMLに表示するときはセキュリティのために必ず使用する必要があります。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// ユーザー入力の処理\nconst userInput = '<script>alert(\"XSS\")</script>';\nconst safeHtml = `<div>${escape(userInput)}</div>`;\n// returns '<div>&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;</div>'\n\n// 動的HTMLの生成\nconst title = 'Article \"How to & Why\"';\nconst html = `<h1>${escape(title)}</h1>`;\n// returns '<h1>Article &quot;How to &amp; Why&quot;</h1>'\n```\n\nテンプレートやコメントシステムで活用できます。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// コメントシステム\nfunction renderComment(comment: string, author: string) {\n  return `\n    <div class=\"comment\">\n      <strong>${escape(author)}</strong>: ${escape(comment)}\n    </div>\n  `;\n}\n\n// 使用例\nconst html = renderComment('I love <coding> & \"programming\"!', 'John Doe');\n// returns '<div class=\"comment\"><strong>John Doe</strong>: I love &lt;coding&gt; &amp; &quot;programming&quot;!</div>'\n```\n\nJSON文字列をHTML属性に入れるときも便利です。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\nconst data = { message: 'Hello & \"welcome\"' };\nconst jsonString = JSON.stringify(data);\nconst htmlAttribute = `<div data-info=\"${escape(jsonString)}\"></div>`;\n// returns '<div data-info=\"{&quot;message&quot;:&quot;Hello &amp; \\\\&quot;welcome\\\\&quot;&quot;}\"></div>'\n```\n\n#### パラメータ\n\n- `str` (`string`): HTMLで安全に使用するために変換する文字列です。\n\n#### 戻り値\n\n(`string`): HTMLエンティティに変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/escapeRegExp.md",
    "content": "# escapeRegExp\n\n正規表現で特別な意味を持つ文字を通常の文字に変換します。\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 使用法\n\n### `escapeRegExp(str)`\n\n文字列を正規表現パターンで安全に使用したいときは`escapeRegExp`を使用します。`^`、`$`、`\\`、`.`、`*`、`+`、`?`、`(`、`)`、`[`、`]`、`{`、`}`、`|`のような正規表現特殊文字をエスケープして、文字通りにマッチングされるようにします。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 基本的な使い方\nescapeRegExp('Hello.'); // returns 'Hello\\\\.'\nescapeRegExp('(test)'); // returns '\\\\(test\\\\)'\nescapeRegExp('user@domain.com'); // returns 'user@domain\\\\.com'\nescapeRegExp('[abc]'); // returns '\\\\[abc\\\\]'\n```\n\nユーザー入力を正規表現パターンとして使用するときは必須です。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// ユーザー検索語を正規表現として使用\nfunction searchInText(text: string, searchTerm: string): boolean {\n  const escapedTerm = escapeRegExp(searchTerm);\n  const regex = new RegExp(escapedTerm, 'i'); // 大文字小文字を区別しない\n  return regex.test(text);\n}\n\nsearchInText('Visit https://example.com', 'https://example.com'); // returns true\nsearchInText('Price: $19.99', '$19.99'); // returns true\n```\n\n文字列置換でも活用できます。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\nfunction replaceAll(text: string, search: string, replacement: string): string {\n  const escapedSearch = escapeRegExp(search);\n  const regex = new RegExp(escapedSearch, 'g');\n  return text.replace(regex, replacement);\n}\n\nconst html = '<div>Hello</div> <span>World</span>';\nconst result = replaceAll(html, '<div>', '<section>');\n// returns '<section>Hello</div> <span>World</span>'\n```\n\nファイルパスやURLの処理に便利です。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// ファイル拡張子の確認\nfunction hasExtension(filename: string, extension: string): boolean {\n  const escapedExt = escapeRegExp(extension);\n  const regex = new RegExp(`\\\\.${escapedExt}$`, 'i');\n  return regex.test(filename);\n}\n\nhasExtension('document.pdf', 'pdf'); // returns true\nhasExtension('image.jpg', 'pdf'); // returns false\n\n// URLマッチング\nfunction matchesUrl(text: string, url: string): boolean {\n  const escapedUrl = escapeRegExp(url);\n  const regex = new RegExp(escapedUrl);\n  return regex.test(text);\n}\n\nconst content = 'Visit our site at https://es-toolkit.dev/ for more info';\nmatchesUrl(content, 'https://es-toolkit.dev/'); // returns true\n```\n\n#### パラメータ\n\n- `str` (`string`): 正規表現特殊文字をエスケープする文字列です。\n\n#### 戻り値\n\n(`string`): 正規表現特殊文字がエスケープされた新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/kebabCase.md",
    "content": "# kebabCase\n\n文字列をケバブケースに変換します。\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 使用法\n\n### `kebabCase(str)`\n\n文字列をケバブケースに変換したい場合は `kebabCase` を使用してください。ケバブケースは、各単語を小文字で書き、単語間をダッシュ（-）で繋ぐ命名規則です。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/string';\n\n// キャメルケースをケバブケースに変換する\nkebabCase('camelCase');\n// 結果：'camel-case'\n\n// 空白を含む文字列を変換する\nkebabCase('some whitespace');\n// 結果：'some-whitespace'\n\n// すでにケバブケースの文字列はそのまま保持する\nkebabCase('hyphen-text');\n// 結果：'hyphen-text'\n\n// 大文字を含む文字列を変換する\nkebabCase('HTTPRequest');\n// 結果：'http-request'\n```\n\nこの関数は、APIエンドポイントやCSSクラス名、HTML属性などを作成する際に便利です。\n\n#### パラメータ\n\n- `str` (`string`)：ケバブケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`)：ケバブケースに変換された文字列です。\n"
  },
  {
    "path": "docs/ja/reference/string/lowerCase.md",
    "content": "# lowerCase\n\n文字列を小文字表記法に変換します。\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 使用法\n\n### `lowerCase(str)`\n\n文字列を小文字表記法に変換したい場合は `lowerCase` を使用してください。小文字表記法は、すべての単語を小文字で書き、単語の間をスペースで区切る命名規則です。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 様々な形式の文字列を小文字表記法に変換\nlowerCase('Hello World'); // returns 'hello world'\nlowerCase('camelCase'); // returns 'camel case'\nlowerCase('some-kebab-case'); // returns 'some kebab case'\nlowerCase('PascalCase'); // returns 'pascal case'\nlowerCase('SCREAMING_SNAKE_CASE'); // returns 'screaming snake case'\n```\n\nユーザーに表示するテキストやタイトルを作成する際に便利です。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// ユーザーインターフェーステキストを生成\nconst fieldName = 'firstName';\nconst label = lowerCase(fieldName); // 'first name'\n\n// API キーをユーザーフレンドリーなテキストに変換\nconst apiKeys = ['userEmail', 'phoneNumber', 'birthDate'];\nconst labels = apiKeys.map(key => lowerCase(key));\n// returns ['user email', 'phone number', 'birth date']\n```\n\n設定やオプション名を表示する際にも活用できます。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 設定メニューを表示\nconst settings = {\n  enableNotifications: true,\n  darkModeEnabled: false,\n  autoSaveInterval: 300,\n};\n\nfor (const [key, value] of Object.entries(settings)) {\n  const displayName = lowerCase(key);\n  console.log(`${displayName}: ${value}`);\n}\n// 出力:\n// enable notifications: true\n// dark mode enabled: false\n// auto save interval: 300\n```\n\n特殊文字やスペースがある文字列も適切に処理します。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\nlowerCase('HTTPSConnection'); // returns 'https connection'\nlowerCase('user_profile-settings'); // returns 'user profile settings'\nlowerCase('  mixed   CASE   text  '); // returns 'mixed case text'\n```\n\n#### パラメータ\n\n- `str` (`string`): 小文字表記法に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 小文字表記法に変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/lowerFirst.md",
    "content": "# lowerFirst\n\n文字列の最初の文字を小文字に変換します。\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 使用法\n\n### `lowerFirst(str)`\n\n文字列の最初の文字だけを小文字にしたい場合は `lowerFirst` を使用してください。残りの文字はそのまま保持されます。変数名やプロパティ名をキャメルケースにする際に便利です。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 基本的な使い方\nlowerFirst('Hello'); // returns 'hello'\nlowerFirst('WORLD'); // returns 'wORLD'\nlowerFirst('JavaScript'); // returns 'javaScript'\n```\n\n空文字列や1文字の文字列も正しく処理します。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\nlowerFirst(''); // returns ''\nlowerFirst('A'); // returns 'a'\nlowerFirst('a'); // returns 'a'\n```\n\nキャメルケース変換に活用できます。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// クラス名をインスタンス変数名に変換\nconst className = 'UserService';\nconst instanceName = lowerFirst(className); // 'userService'\n\n// 定数名をキャメルケースに変換\nconst constantName = 'API_BASE_URL';\nconst camelCase = lowerFirst(constantName.toLowerCase().replace(/_(.)/g, (_, letter) => letter.toUpperCase()));\n// 結果的に 'apiBaseUrl'\n```\n\nAPIレスポンスやデータ変換でも使用できます。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// データベースのカラム名をJavaScriptのプロパティ名に変換\nconst dbColumns = ['UserId', 'FirstName', 'LastName', 'EmailAddress'];\nconst jsProperties = dbColumns.map(column => lowerFirst(column));\n// returns ['userId', 'firstName', 'lastName', 'emailAddress']\n\n// 関数名生成\nfunction createGetter(propertyName: string): string {\n  return `get${propertyName}`;\n}\n\nfunction createSetter(propertyName: string): string {\n  return `set${propertyName}`;\n}\n\nconst property = lowerFirst('UserName'); // 'userName'\nconst getter = createGetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'getUserName'\nconst setter = createSetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'setUserName'\n```\n\n#### パラメータ\n\n- `str` (`string`): 最初の文字を小文字に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 最初の文字が小文字に変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/pad.md",
    "content": "# pad\n\n文字列の両側に文字を追加して指定された長さにします。\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 使用法\n\n### `pad(str, length, chars?)`\n\n文字列が指定された長さよりも短い場合、両側に文字を追加して長さを合わせたいときに `pad` を使用してください。両側に均等に分配できない場合、右側が1文字長くパディングされます。\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\n// デフォルトの空白でパディング\npad('abc', 8);\n// => '  abc   '\n\n// カスタム文字でパディング\npad('abc', 8, '_-');\n// => '_-abc_-_'\n\n// 文字列がすでに目標の長さ以上の場合\npad('abc', 3);\n// => 'abc'\n\npad('abcdef', 3);\n// => 'abcdef'\n```\n\nパディング文字が目標の長さに均等に分配できない場合、右側が長くなります。\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\npad('abc', 9, '123');\n// => '123abc123' (左側3文字、右側3文字)\n\npad('abc', 10, '123');\n// => '123abc1231' (左側3文字、右側4文字)\n```\n\n#### パラメータ\n\n- `str` (`string`): パディングする文字列です。\n- `length` (`number`): 目標の長さです。\n- `chars` (`string`, オプション): パディングに使用する文字です。デフォルト値は `' '` です。\n\n#### 戻り値\n\n(`string`): パディングされた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/pascalCase.md",
    "content": "# pascalCase\n\n文字列をパスカルケースに変換します。\n\n```typescript\nconst converted = pascalCase(str);\n```\n\n## 使用法\n\n### `pascalCase(str)`\n\n文字列をパスカルケースに変換したい場合は `pascalCase` を使用してください。パスカルケースは、各単語の最初の文字を大文字にし、単語間を区切り文字なしで連結する命名規則です。\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 基本的な使用法\npascalCase('pascalCase'); // 'PascalCase'\npascalCase('some whitespace'); // 'SomeWhitespace'\n\n// ハイフンやアンダースコアで連結された単語\npascalCase('hyphen-text'); // 'HyphenText'\npascalCase('snake_case'); // 'SnakeCase'\n\n// 連続する大文字の処理\npascalCase('HTTPRequest'); // 'HttpRequest'\npascalCase('XMLHttpRequest'); // 'XmlHttpRequest'\n```\n\n様々な区切り文字が含まれる文字列も正しく処理します。\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 複数の区切り文字が混在する場合\npascalCase('camelCase-with_mixed.separators'); // 'CamelCaseWithMixedSeparators'\n\n// 数字が含まれる場合\npascalCase('version2.1.0'); // 'Version210'\n\n// 特殊文字が含まれる場合\npascalCase('user@email.com'); // 'UserEmailCom'\n```\n\n#### パラメータ\n\n- `str` (`string`): パスカルケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): パスカルケースに変換された新しい文字列を返します。\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { pascalCase } from 'es-toolkit/string';\n\nconsole.log(pascalCase('pascalCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ja/reference/string/reverseString.md",
    "content": "# reverseString\n\n文字列を反転します。\n\n```typescript\nconst reversed = reverseString(value);\n```\n\n## 使用法\n\n### `reverseString(value)`\n\n文字列の文字順序を反転したいときは `reverseString` を使用してください。Unicode文字と絵文字も正しく処理します。\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 基本的な文字列反転\nreverseString('hello'); // 'olleh'\nreverseString('world'); // 'dlrow'\n\n// 大文字小文字が混在した文字列\nreverseString('PascalCase'); // 'esaClacsaP'\n\n// 空白を含む文字列\nreverseString('hello world'); // 'dlrow olleh'\n```\n\n絵文字と特殊文字も正確に処理します。\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 絵文字を含む文字列\nreverseString('foo 😄 bar'); // 'rab 😄 oof'\nreverseString('안녕하세요'); // '요세하녕안'\n\n// 数字と特殊文字\nreverseString('12345'); // '54321'\nreverseString('a-b-c'); // 'c-b-a'\n```\n\n#### パラメータ\n\n- `value` (`string`): 反転する文字列です。\n\n#### 戻り値\n\n(`string`): 文字順序が反転した新しい文字列を返します。\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { reverseString } from 'es-toolkit';\n\nconsole.log(reverseString('hello'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ja/reference/string/snakeCase.md",
    "content": "# snakeCase\n\n文字列をスネークケースに変換します。\n\n```typescript\nconst converted = snakeCase(str);\n```\n\n## 使用法\n\n### `snakeCase(str)`\n\n文字列をスネークケースに変換したい場合は `snakeCase` を使用してください。スネークケースは、各単語を小文字で記述し、単語間をアンダースコア(\\_)で接続する命名規則です。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 基本的な使い方\nsnakeCase('camelCase'); // 'camel_case'\nsnakeCase('some whitespace'); // 'some_whitespace'\n\n// ハイフンや他の区切り文字で接続された単語\nsnakeCase('hyphen-text'); // 'hyphen_text'\nsnakeCase('PascalCase'); // 'pascal_case'\n\n// 連続する大文字の処理\nsnakeCase('HTTPRequest'); // 'http_request'\nsnakeCase('XMLHttpRequest'); // 'xml_http_request'\n```\n\nさまざまな区切り文字を含む文字列も正しく処理します。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 複数の区切り文字が混在している場合\nsnakeCase('camelCase-with_mixed.separators'); // 'camel_case_with_mixed_separators'\n\n// 数字が含まれている場合\nsnakeCase('version2.1.0'); // 'version_2_1_0'\n\n// 特殊文字が含まれている場合\nsnakeCase('user@email.com'); // 'user_email_com'\n```\n\n#### パラメータ\n\n- `str` (`string`): スネークケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): スネークケースに変換された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/startCase.md",
    "content": "# startCase\n\n文字列の各単語の最初の文字を大文字に変換します。\n\n```typescript\nconst converted = startCase(str);\n```\n\n## 使用法\n\n### `startCase(str)`\n\n文字列をスタートケース(各単語の最初の文字が大文字)に変換したい場合は `startCase` を使用してください。各単語の最初の文字は大文字に、残りは小文字に変換し、単語間を空白で連結します。\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 基本的な使用法\nstartCase('hello world'); // 'Hello World'\nstartCase('HELLO WORLD'); // 'Hello World'\n\n// キャメルケースやパスカルケースの変換\nstartCase('fooBar'); // 'Foo Bar'\nstartCase('PascalCase'); // 'Pascal Case'\n\n// ハイフンやアンダースコアで連結された単語\nstartCase('hello-world'); // 'Hello World'\nstartCase('hello_world'); // 'Hello World'\n```\n\nさまざまな区切り文字や特殊文字を含む文字列も正しく処理します。\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 複数の区切り文字が含まれる場合\nstartCase('--foo-bar--'); // 'Foo Bar'\nstartCase('__FOO_BAR__'); // 'Foo Bar'\n\n// 連続した大文字と数字の処理\nstartCase('XMLHttpRequest'); // 'Xml Http Request'\nstartCase('_abc_123_def'); // 'Abc 123 Def'\n\n// 空文字や意味のない区切り文字のみの場合\nstartCase('_-_-_-_'); // ''\nstartCase('12abc 12ABC'); // '12 Abc 12 Abc'\n```\n\n#### パラメータ\n\n- `str` (`string`): スタートケースに変換する文字列です。\n\n#### 戻り値\n\n(`string`): 各単語の最初の文字が大文字に変換され、空白で連結された新しい文字列を返します。\n\n## デモ\n\n::: sandpack\n\n```ts index.ts\nimport { startCase } from 'es-toolkit/string';\n\nconsole.log(startCase('startCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ja/reference/string/trim.md",
    "content": "# trim\n\n文字列の前後にある空白または指定した文字を削除します。\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 使用法\n\n### `trim(str, chars?)`\n\n文字列の先頭と末尾から不要な文字を削除したい場合は `trim` を使用してください。特定の文字を指定しない場合は、空白文字を削除します。\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 基本的な空白削除\ntrim('  hello  '); // 'hello'\ntrim('\\t\\n  hello  \\r\\n'); // 'hello'\n\n// 特定の文字を削除\ntrim('--hello--', '-'); // 'hello'\ntrim('***hello***', '*'); // 'hello'\n\n// 複数の文字のいずれかに該当する場合に削除\ntrim('##hello##world##', ['#', 'd']); // 'hello##worl'\n```\n\n配列で複数の文字を指定すると、そのいずれかに該当する文字はすべて削除されます。\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 複数の文字を配列で指定\ntrim('!!@@hello@@!!', ['!', '@']); // 'hello'\n\n// 数字と特殊文字を削除\ntrim('123abc123', ['1', '2', '3']); // 'abc'\n\n// 文字と空白を一緒に削除\ntrim('  __hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### パラメータ\n\n- `str` (`string`): 前後から文字を削除する文字列です。\n- `chars` (`string | string[]`, オプション): 削除する文字です。文字列または文字配列を使用できます。デフォルトは空白文字です。\n\n#### 戻り値\n\n(`string`): 指定した文字が前後から削除された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/trimEnd.md",
    "content": "# trimEnd\n\n文字列の末尾にある空白文字または指定された文字を削除します。\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 使用法\n\n### `trimEnd(str, chars?)`\n\n文字列の末尾から不要な文字を削除したい場合は `trimEnd` を使用してください。特定の文字を指定しない場合は、空白文字を削除します。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 基本的な空白文字の削除\ntrimEnd('hello  '); // 'hello'\ntrimEnd('hello\\t\\n  '); // 'hello'\n\n// 特定の文字の削除\ntrimEnd('hello---', '-'); // 'hello'\ntrimEnd('123000', '0'); // '123'\ntrimEnd('abcabcabc', 'c'); // 'abcabcab'\n```\n\n複数の文字を配列として指定すると、そのいずれかに該当する文字がすべて削除されます。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 複数の文字を配列として指定\ntrimEnd('hello!!@@', ['!', '@']); // 'hello'\n\n// 数字と特殊文字の削除\ntrimEnd('abc123', ['1', '2', '3']); // 'abc'\n\n// 文字と空白文字を一緒に削除\ntrimEnd('hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### パラメータ\n\n- `str` (`string`): 末尾から文字を削除する文字列です。\n- `chars` (`string | string[]`, オプション): 削除する文字です。文字列または文字の配列を使用できます。デフォルトは空白文字です。\n\n#### 戻り値\n\n(`string`): 指定された文字が末尾から削除された新しい文字列を返します。\n\n#### エラー\n\n`chars` が文字列で、長さが 1 でない場合はエラーが発生します。\n"
  },
  {
    "path": "docs/ja/reference/string/trimStart.md",
    "content": "# trimStart\n\n文字列の先頭にある空白または指定した文字を削除します。\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 使用法\n\n### `trimStart(str, chars?)`\n\n文字列の先頭から不要な文字を削除したい場合は `trimStart` を使用してください。特定の文字を指定しない場合は空白文字を削除します。\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 基本的な空白削除\ntrimStart('  hello'); // 'hello'\ntrimStart('\\t\\n  hello'); // 'hello'\n\n// 特定の文字を削除\ntrimStart('---hello', '-'); // 'hello'\ntrimStart('000123', '0'); // '123'\ntrimStart('abcabcabc', 'a'); // 'bcabcabc'\n```\n\n複数の文字を配列で指定すると、そのいずれかに該当する文字はすべて削除されます。\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 複数の文字を配列で指定\ntrimStart('!!@@hello', ['!', '@']); // 'hello'\n\n// 数字と特殊文字を削除\ntrimStart('123abc', ['1', '2', '3']); // 'abc'\n\n// 文字と空白を一緒に削除\ntrimStart('  __hello', ['_', ' ']); // 'hello'\n```\n\n#### パラメータ\n\n- `str` (`string`): 先頭から文字を削除する文字列です。\n- `chars` (`string | string[]`, オプション): 削除する文字です。文字列または文字の配列を使用できます。デフォルトは空白文字です。\n\n#### 戻り値\n\n(`string`): 指定した文字が先頭から削除された新しい文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/unescape.md",
    "content": "# unescape\n\nHTMLエンティティ文字を元の文字に変換します。\n\n```typescript\nconst result = unescape(str);\n```\n\n## 使用法\n\n### `unescape(str)`\n\nHTMLで使用されるエンティティ文字を元の文字に変換したい場合は`unescape`を使用してください。`&amp;`、`&lt;`、`&gt;`、`&quot;`、`&#39;`のようなHTMLエンティティを`&`、`<`、`>`、`\"`、`'`文字に変換します。これは[`escape`](./escape.md)関数の逆の操作です。\n\n```typescript\nimport { unescape } from 'es-toolkit/string';\n\n// HTMLタグエンティティを元の文字に変換\nunescape('This is a &lt;div&gt; element.');\n// 戻り値: 'This is a <div> element.'\n\n// 引用符エンティティを元の文字に変換\nunescape('This is a &quot;quote&quot;');\n// 戻り値: 'This is a \"quote\"'\n\n// 単一引用符エンティティを元の文字に変換\nunescape('This is a &#39;quote&#39;');\n// 戻り値: 'This is a 'quote''\n\n// アンパサンドエンティティを元の文字に変換\nunescape('This is a &amp; symbol');\n// 戻り値: 'This is a & symbol'\n```\n\nHTMLフォームやURLから受け取ったデータを処理する際に便利です:\n\n```typescript\n// ユーザー入力からHTMLエンティティを変換\nconst userInput = 'My favorite tag is &lt;button&gt;';\nconst converted = unescape(userInput);\nconsole.log(converted); // 'My favorite tag is <button>'\n\n// 複数のエンティティが混在する文字列も変換可能\nconst mixed = '&quot;Hello &amp; Welcome&quot; &lt;says the &gt; user';\nconst result = unescape(mixed);\nconsole.log(result); // '\"Hello & Welcome\" <says the > user'\n```\n\n#### パラメータ\n\n- `str` (`string`): 変換する文字列です。\n\n#### 戻り値\n\n(`string`): HTMLエンティティが元の文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/upperCase.md",
    "content": "# upperCase\n\n文字列をすべての文字が大文字で単語がスペースで区切られた形式に変換します。\n\n```typescript\nconst result = upperCase(str);\n```\n\n## 使用法\n\n### `upperCase(str)`\n\n文字列を大文字表記に変換したい場合は`upperCase`を使用してください。各単語を大文字に変換し、単語をスペースで連結します。camelCase、kebab-case、snake_caseなど様々な表記法の文字列を処理できます。\n\n```typescript\nimport { upperCase } from 'es-toolkit/string';\n\n// camelCaseを大文字表記に変換\nupperCase('camelCase');\n// 戻り値: 'CAMEL CASE'\n\n// すでに空白がある文字列も変換\nupperCase('some whitespace');\n// 戻り値: 'SOME WHITESPACE'\n\n// kebab-caseを大文字表記に変換\nupperCase('hyphen-text');\n// 戻り値: 'HYPHEN TEXT'\n\n// 連続した大文字がある文字列も処理\nupperCase('HTTPSRequest');\n// 戻り値: 'HTTPS REQUEST'\n```\n\n様々な命名規則を統一された大文字形式に変換する際に便利です:\n\n```typescript\n// APIレスポンスの様々なキー名を統一\nconst apiKeys = ['user_name', 'firstName', 'email-address', 'phoneNumber'];\nconst upperCaseKeys = apiKeys.map(key => upperCase(key));\nconsole.log(upperCaseKeys);\n// ['USER NAME', 'FIRST NAME', 'EMAIL ADDRESS', 'PHONE NUMBER']\n\n// ファイル名を表示する際に使用\nconst fileName = 'profile_image_thumbnail.jpg';\nconst displayName = upperCase(fileName.replace('.jpg', ''));\nconsole.log(displayName); // 'PROFILE IMAGE THUMBNAIL'\n```\n\n#### パラメータ\n\n- `str` (`string`): 大文字表記に変換する文字列です。\n\n#### 戻り値\n\n(`string`): 各単語が大文字に変換され、スペースで区切られた文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/upperFirst.md",
    "content": "# upperFirst\n\n文字列の最初の文字を大文字に変換します。\n\n```typescript\nconst result = upperFirst(str);\n```\n\n## 使用法\n\n### `upperFirst(str)`\n\n文字列の最初の文字だけを大文字にし、残りの文字をそのまま維持したい場合は`upperFirst`を使用してください。文章の始まりを大文字にしたり、名前を整理したりする際に便利です。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/string';\n\n// 小文字で始まる文字列の最初の文字を大文字にする\nupperFirst('fred');\n// 戻り値: 'Fred'\n\n// すでに最初の文字が大文字の場合はそのまま維持\nupperFirst('Fred');\n// 戻り値: 'Fred'\n\n// すべての文字が大文字の場合もそのまま維持\nupperFirst('FRED');\n// 戻り値: 'FRED'\n```\n\nさまざまな状況で活用できます:\n\n```typescript\n// ユーザー名を整理する際\nconst userName = 'john';\nconst displayName = upperFirst(userName);\nconsole.log(displayName); // 'John'\n\n// 文章の最初の文字を大文字にする際\nconst sentence = 'hello world';\nconst capitalizedSentence = upperFirst(sentence);\nconsole.log(capitalizedSentence); // 'Hello world'\n\n// 複数の名前を処理する際\nconst names = ['alice', 'bob', 'charlie'];\nconst capitalizedNames = names.map(name => upperFirst(name));\nconsole.log(capitalizedNames); // ['Alice', 'Bob', 'Charlie']\n\n// camelCase文字列の最初の文字を大文字にする際\nconst camelCase = 'firstName';\nconst pascalCase = upperFirst(camelCase);\nconsole.log(pascalCase); // 'FirstName'\n```\n\n#### パラメータ\n\n- `str` (`string`): 最初の文字を大文字にする文字列です。\n\n#### 戻り値\n\n(`string`): 最初の文字が大文字に変換された文字列を返します。\n"
  },
  {
    "path": "docs/ja/reference/string/words.md",
    "content": "# words\n\n文字列を単語単位で分割し、配列として返します。\n\n```typescript\nconst result = words(str);\n```\n\n## 使用法\n\n### `words(str)`\n\n文字列を個別の単語に分割したい場合は`words`を使用してください。camelCase、kebab-case、空白、句読点などを基準に単語を分割し、絵文字とUnicode文字も正しく認識します。さまざまな命名規則の文字列を処理する際に便利です。\n\n```typescript\nimport { words } from 'es-toolkit/string';\n\n// 句読点と空白で区切られた文字列を単語に分割\nwords('fred, barney, & pebbles');\n// 戻り値: ['fred', 'barney', 'pebbles']\n\n// camelCaseと連続した大文字を正しく分割\nwords('camelCaseHTTPRequest🚀');\n// 戻り値: ['camel', 'Case', 'HTTP', 'Request', '🚀']\n\n// Unicode文字と数字も処理\nwords('Lunedì 18 Set');\n// 戻り値: ['Lunedì', '18', 'Set']\n```\n\nさまざまな状況で文字列を単語に分割する際に活用できます:\n\n```typescript\n// 変数名を単語に分割して他の命名規則に変換\nconst variableName = 'getUserProfile';\nconst wordList = words(variableName);\nconsole.log(wordList); // ['get', 'User', 'Profile']\n\n// snake_caseを単語に分割\nconst snakeCase = 'user_profile_data';\nconst snakeWords = words(snakeCase);\nconsole.log(snakeWords); // ['user', 'profile', 'data']\n\n// kebab-caseを単語に分割\nconst kebabCase = 'user-profile-data';\nconst kebabWords = words(kebabCase);\nconsole.log(kebabWords); // ['user', 'profile', 'data']\n\n// 複雑な文字列も処理\nconst complex = 'XMLHttpRequest2.0_parser-v1.2';\nconst complexWords = words(complex);\nconsole.log(complexWords); // ['XML', 'Http', 'Request', '2', '0', 'parser', 'v', '1', '2']\n```\n\n#### パラメータ\n\n- `str` (`string`): 単語に分割する文字列です。\n\n#### 戻り値\n\n(`string[]`): 文字列を単語単位で分割した配列を返します。\n"
  },
  {
    "path": "docs/ja/reference/util/assert.md",
    "content": "# assert\n\n与えられた条件が真であることを表明します。条件が偽の場合、エラーをスローします。\n\n```typescript\nassert(condition, message);\n```\n\n::: info `invariant` との関係\n\n`assert` は `invariant` 関数と完全に同じ機能を持っています。違いは名前だけです。詳細については、[`invariant`](./invariant.md) のドキュメントを参照してください。\n\n:::\n\n## 使用法\n\n### `assert(condition, message)`\n\nコード内で特定の条件が必ず満たされる必要がある場合に `assert` を使用します。条件が偽の場合、直ちにエラーをスローしてプログラムの実行を停止します。\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// 条件が真の場合、何もしません\nassert(true, 'このメッセージは表示されません');\n\n// 条件が偽の場合、エラーをスローします\nassert(false, 'この条件は偽です'); // Error: この条件は偽です\n\n// 値が null または undefined でないことを確認する場合\nconst value = getValue();\nassert(value !== null && value !== undefined, '値は null または undefined であってはなりません');\n// これで value が null でも undefined でもないことを確信できます\n\n// 数値が正の数であることを確認する場合\nconst number = getNumber();\nassert(number > 0, '数値は正の数でなければなりません');\n```\n\nエラーオブジェクトを直接渡すこともできます。\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// Error オブジェクトを渡す\nassert(false, new Error('カスタムエラーメッセージ'));\n\n// カスタムエラークラスを使用\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\nassert(false, new ValidationError('検証に失敗しました'));\n```\n\n開発中にコードの前提を検証したり、関数の入力値が予想範囲内にあるかを確認する場合に特に便利です。\n\n#### パラメータ\n\n- `condition` (`unknown`): 評価する条件です。偽と評価される値の場合、エラーをスローします。\n- `message` (`string | Error`): 条件が偽の場合にスローするエラーメッセージまたはエラーオブジェクトです。\n\n#### 戻り値\n\n(`void`): 条件が真の場合、何も返しません。\n\n#### エラー\n\n条件が偽と評価された場合、提供されたメッセージまたはエラーオブジェクトをスローします。\n"
  },
  {
    "path": "docs/ja/reference/util/attempt.md",
    "content": "# attempt\n\n関数を実行し、結果またはエラーをタプルとして返します。\n\n```typescript\nconst [error, result] = attempt(func);\n```\n\n## 使用法\n\n### `attempt(func)`\n\n関数を安全に実行したい場合は `attempt` を使用してください。try-catch ブロックでラップせずにエラーを処理できます。\n\n```typescript\nimport { attempt } from 'es-toolkit/util';\n\n// 成功する場合\nconst [error, result] = attempt(() => 42);\n// error は null、result は 42\n\n// エラーが発生する場合\nconst [error, result] = attempt(() => {\n  throw new Error('問題が発生しました');\n});\n// error は Error オブジェクト、result は null\n\n// 型を明示することもできます\nconst [error, names] = attempt<string[], Error>(() => ['Alice', 'Bob']);\n// names は string[] 型として推論されます\n```\n\n::: warning 非同期関数には使用しないでください\n\nこの関数は非同期関数(`Promise` を返す関数)には適していません。非同期関数を渡すと `[null, Promise<T>]` が返されますが、Promise が後で拒否(reject)されてもエラーをキャッチできません。\n\n非同期関数を処理するには、代わりに [`attemptAsync`](./attemptAsync.md) 関数を使用してください。\n\n```typescript\n// 誤った使用法\nconst [error, promise] = attempt(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n\n// 正しい使用法\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n```\n\n:::\n\n#### パラメータ\n\n- `func` (`() => T`):実行する関数です。\n\n#### 戻り値\n\n(`[null, T] | [E, null]`):成功した場合は `[null, 結果値]`、エラーが発生した場合は `[エラー, null]` タプルを返します。\n"
  },
  {
    "path": "docs/ja/reference/util/attemptAsync.md",
    "content": "# attemptAsync\n\n非同期関数を実行し、結果またはエラーをタプルとして返します。\n\n```typescript\nconst [error, result] = await attemptAsync(func);\n```\n\n## 使用法\n\n### `attemptAsync(func)`\n\n非同期関数を安全に実行したい場合は `attemptAsync` を使用してください。async/await ブロックを try-catch でラップすることなくエラーを処理できます。\n\n```typescript\nimport { attemptAsync } from 'es-toolkit/util';\n\n// API リクエストが成功する場合\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n// error は null、data はレスポンスデータ\n\n// ネットワークエラーが発生する場合\nconst [error, data] = await attemptAsync(async () => {\n  throw new Error('ネットワークエラー');\n});\n// error は Error オブジェクト、data は null\n\n// 型を明示することもできます\ninterface User {\n  id: number;\n  name: string;\n}\n\nconst [error, users] = await attemptAsync<User[]>(async () => {\n  const response = await fetch('https://api.example.com/users');\n  return response.json();\n});\n// users は User[] 型として推論されます\n```\n\nデータベースクエリやファイル読み込みなどの非同期操作でエラー処理が必要な場合に特に便利です。\n\n```typescript\n// ファイル読み込みの例\nconst [error, content] = await attemptAsync(async () => {\n  const fs = await import('fs/promises');\n  return fs.readFile('config.json', 'utf8');\n});\n\nif (error) {\n  console.log('ファイルを読み込めません:', error.message);\n} else {\n  console.log('ファイル内容:', content);\n}\n```\n\n::: info 同期関数には attempt を使用してください\n\nこの関数は非同期関数(`Promise` を返す関数)の処理に適しています。同期関数を処理する場合は、[`attempt`](./attempt.md) 関数を使用することをお勧めします。\n\n:::\n\n#### パラメータ\n\n- `func` (`() => Promise<T>`): 実行する非同期関数です。\n\n#### 戻り値\n\n(`Promise<[null, T] | [E, null]>`): 成功時は `[null, 結果値]`、エラー発生時は `[エラー, null]` のタプルに解決される Promise を返します。\n"
  },
  {
    "path": "docs/ja/reference/util/invariant.md",
    "content": "# invariant\n\n与えられた条件が真であることを断言します。条件が偽の場合、エラーを投げます。\n\n```typescript\ninvariant(condition, message);\n```\n\n## 使用法\n\n### `invariant(condition, message)`\n\nコードで特定の条件が必ず満たされなければならない場合に `invariant` を使用してください。条件が偽の場合、即座にエラーを投げてプログラムの実行を中断します。\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// 条件が真の場合、何もしません\ninvariant(true, 'このメッセージは表示されません');\n\n// 条件が偽の場合、エラーを投げます\ninvariant(false, 'この条件は偽です'); // Error: この条件は偽です\n\n// 値が null や undefined でないことを確認する場合\nconst value = getValue();\ninvariant(value !== null && value !== undefined, '値は null や undefined であってはなりません');\n// これで value が null や undefined でないことを確信できます\n\n// 数値が正であることを確認する場合\nconst number = getNumber();\ninvariant(number > 0, '数値は正でなければなりません');\n```\n\nエラーオブジェクトを直接渡すこともできます。\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// Error オブジェクトを渡す\ninvariant(false, new Error('カスタムエラーメッセージ'));\n\n// カスタムエラークラスを使用\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\ninvariant(false, new ValidationError('検証に失敗しました'));\n```\n\n開発中にコードの仮定を検証したり、関数の入力値が期待される範囲にあることを確認する際に特に便利です。\n\n#### パラメータ\n\n- `condition` (`unknown`): 評価する条件です。偽と評価される値の場合、エラーを投げます。\n- `message` (`string | Error`): 条件が偽の場合に投げるエラーメッセージまたはエラーオブジェクトです。\n\n#### 戻り値\n\n(`void`): 条件が真の場合、何も返しません。\n\n#### エラー\n\n条件が偽と評価された場合、提供されたメッセージまたはエラーオブジェクトを投げます。\n"
  },
  {
    "path": "docs/ja/usage.md",
    "content": "---\ndescription: es-toolkitの使用方法\nprev:\n  text: es-toolkitの紹介\n  link: ./intro.md\nnext:\n  text: バンドルサイズへの影響\n  link: ./bundle-size\n---\n\n# インストールと使用方法\n\nNode.jsやBunを使用する場合は、[npm](https://npmjs.com/package/es-toolkit)からインストールできます。Denoでは[JSR](https://jsr.io/@es-toolkit/es-toolkit)からインストールできます。\n\nブラウザで直接使用する場合は、[CDNから取得](#ブラウザ)できます。\n\n## Node.js\n\nes-toolkitはNode.js 18以降のバージョンをサポートしています。es-toolkitをインストールするには、以下のコマンドを使用してください。\n\n::: code-group\n\n```sh [npm]\nnpm install es-toolkit\n```\n\n```sh [pnpm]\npnpm add es-toolkit\n```\n\n```sh [yarn]\nyarn add es-toolkit\n```\n\n:::\n\nes-toolkitの関数を使うには、以下のように`import`して使用できます。\n\n```typescript\nimport { sum } from 'es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Deno\n\nes-toolkitはDenoでも使用できます。[JSR](https://jsr.io/@es-toolkit/es-toolkit)から以下のコマンドでインストールしてください。\n\n```sh\ndeno add @es-toolkit/es-toolkit\n```\n\nDenoで使用する場合、JSRの制限により、NPMとは異なり追加のスコープが必要です。\n\n```typescript\nimport { sum } from '@es-toolkit/es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Bun\n\nes-toolkitはBunでも使用できます。以下のコマンドを使用してください。\n\n```sh\nbun add es-toolkit\n```\n\n## ブラウザ\n\n[jsdelivr](https://www.jsdelivr.com)や[unpkg](https://unpkg.com)などのCDNからes-toolkitを使用できます。Lodashと同様に、`_`変数にすべての関数が含まれています。\n\n::: code-group\n\n```html [jsdelivr]\n<script src=\"https://cdn.jsdelivr.net/npm/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n```html [unpkg]\n<script src=\"https://unpkg.com/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n\nモダンなブラウザでは[esm.sh](https://esm.sh)も使用できます。\n\n::: code-group\n\n```html [esm.sh]\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"es-toolkit\": \"https://esm.sh/es-toolkit@%5E1\"\n    }\n  }\n</script>\n<script type=\"module\">\n  import { chunk } from 'es-toolkit';\n\n  chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/bundle-size.md",
    "content": "---\ndescription: es-toolkit이 가지는 작은 번들 사이즈\n---\n\n# 번들 사이즈\n\n<BundleSizeChart />\n\nes-toolkit은 현대적인 구현을 가지고 있기 때문에, 다른 라이브러리에 비해서 매우 작은 번들 사이즈를 가져요. [lodash](https://lodash.com)와 비교했을 때, 함수에 따라서는 최대 97% 작은 크기를 가져요.\n\n이런 측면에서, es-toolkit은 번들 사이즈를 줄이는 데에 가장 효율적인 선택이에요. 어떤 유틸리티 함수는 100바이트보다 작은 크기를 가져요.\n\n## 번들 사이즈 비교\n\n<BundleSizeTable />\n\n## 번들 사이즈 측정 방법\n\n[esbuild 0.23.0](https://esbuild.github.io)로 번들 사이즈를 측정하고 있어요. 아래와 같은 코드를 사용해요.\n\n```tsx\nimport { chunk } from 'es-toolkit';\n\n// 또는 import { chunk } from 'lodash-es';\n\nconsole.log(chunk);\n```\n\n[번들 사이즈 측정 벤치마크 코드](https://github.com/toss/es-toolkit/tree/main/benchmarks/bundle-size)를 참고하세요.\n"
  },
  {
    "path": "docs/ko/compatibility.md",
    "content": "# Lodash와의 호환성\n\n::: tip ✅ 1.39.3 버전부터 Lodash와 100% 호환성을 보장해요\n\n`es-toolkit/compat`은 Lodash의 모든 함수에 대해서 똑같이 동작하면서 더 가볍고 빨라요.\n\n- Lodash의 실제 테스트 코드로 동일하게 동작하는 것을 보장해요.\n- Storybook, Recharts, CKEditor 등 유명 오픈소스 라이브러리들이 사용하고 있고, Nuxt에서도 추천하고 있어요.\n\n모든 호환성 함수들의 자세한 문서는 [호환성 레퍼런스](/ko/reference/compat/array/castArray)에서 확인할 수 있어요.\n\n:::\n\n```tsx\n// es-toolkit/compat은 lodash와 100% 동일한 동작을 제공하도록 목표하고 있어요\nimport { chunk } from 'es-toolkit/compat';\n\n// es-toolkit은 원래 chunk의 size로 0을 지원하지 않았어요\nchunk([1, 2, 3, 4], 0);\n// es-toolkit/compat은 lodash와 같은 []을 반환해요\n```\n\n`lodash`와 최대 호환성을 위해서는 `es-toolkit/compat` 라이브러리를 사용하세요.\n\n`es-toolkit`은 매끄러운 마이그레이션을 보장하기 위해, 두 라이브러리 사이의 동작 차이가 없는 `es-toolkit/compat` 라이브러리를 개발하고 있어요. `lodash`와 동일한 API와 기능을 제공하여, 수월하게 마이그레이션을 할 수 있도록 도와줄 예정이에요.\n\n`es-toolkit/compat`은 실제 `lodash` 테스트 코드를 이용해서 테스트돼요.\n\n`es-toolkit/compat`은 원래 `es-toolkit`에 비해 런타임 퍼포먼스나 번들 크기가 최적은 아닐 수 있어요. 마이그레이션 중에 사용하는 도구로 생각해 주시고, 새로운 기능은 `es-toolkit`로 개발해주세요.\n\n## 설계 원칙\n\n::: info\n`es-toolkit/compat` 설계 원칙의 방향성은 변경될 수 있어요.\n:::\n\n`es-toolkit/compat`은 다음과 같은 기능들에 대해서 `lodash`와 100% 동일한 기능을 제공하는 것을 목표로 해요.\n\n- `lodash`의 테스트 케이스로 작성된 기능\n- `@types/lodash` 또는 `@types/lodash-es`의 타입에서 추론할 수 있는 기능\n- `lodash`에서 `es-toolkit`으로 코드를 마이그레이션하는 동안 발견된 기능 차이점 ([이슈 페이지](https://github.com/toss/es-toolkit/issues)에 제보해 주세요.)\n\n아래와 같은 기능은 `es-toolkit/compat`에서 지원하지 않아요.\n\n- 암시적 타입 변환: 빈 문자열을 0 또는 false로 변환하는 것과 같은 동작\n- 어떤 경우에 특화된 구현: [sortedUniq](https://lodash.com/docs/4.17.15#sortedUniq)와 같이 정렬된 배열만 받는 함수\n- JavaScript 내장 객체의 프로토타입이 바뀐 경우에 대응하는 코드\n- JavaScript Realm에 대응하는 코드\n- 메서드 체이닝: `_(arr).map(...).filter(...)`와 같은 메서드 체이닝\n\n## 구현 상태\n\n::: info\n아래 이모지로 현재 구현 상태를 나타내고 있어요.\n\n- ✅: 완료 (구현됐고, lodash 테스트 코드를 모두 통과해요.)\n- 📝: 리뷰 중 (구현됐지만, lodash 테스트 코드로 테스트되지는 않았어요.)\n- ❌: 아직 구현되지 않음\n\n\"리뷰 중\"으로 표시되었더라고 하더라도, 이미 lodash와 100% 동일한 기능을 제공하고 있을 수도 있어요.\n:::\n\n<CompatibilityStatus lang=\"ko\"/>\n"
  },
  {
    "path": "docs/ko/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'es-toolkit'\n  text: '현대적인 JavaScript 유틸리티 라이브러리'\n  image:\n    loading: eager\n    fetchpriority: high\n    decoding: async\n    src: /hero.webp\n    alt:\n  actions:\n    - theme: brand\n      text: es-toolkit 알아보기\n      link: /ko/intro\n    - theme: alt\n      text: 레퍼런스\n      link: /ko/reference/array/at\n    - theme: alt\n      text: 설치 및 사용\n      link: /ko/usage\n\nfeatures:\n  - title: 빠른 성능\n    details: 같은 기능을 제공하는 다른 라이브러리와 비교했을 때, 평균 2-3배 빠른 런타임 성능을 제공해요.\n  - title: 작은 번들 사이즈\n    details: 같은 기능의 함수들을 기준으로, 최대 97% 작은 JavaScript 크기를 가져요.\n  - title: 쉬운 Lodash 대체\n    details: es-toolkit은 Lodash를 손쉽게 대체할 수 있는 완전한 호환성 레이어를 제공해요.\n    link: /ko/compatibility\n  - title: 현대적인 구현\n    details: 최신 JavaScript API를 사용하여, 구현이 직관적이고 간단해요.\n  - title: 견고한 타입\n    details: 모든 함수에 대해서 간단하지만 견고한 타입을 제공해요.\n  - title: 테스트 커버리지 100%\n    details: 모든 함수와 분기에 대해서 꼼꼼하게 테스트가 작성되어 있어요.\n  - title: 넓은 사용처\n    details: es-toolkit은 Storybook, Recharts, ink, MUI 및 CKEditor와 같은 인기 있는 오픈 소스 라이브러리에서 널리 사용되고 있어요.\n  - title: 모든 환경에서 사용 가능\n    details: Node.js, Deno, Bun, 그리고 브라우저까지 넓은 JavaScript 환경을 지원해요.\n---\n"
  },
  {
    "path": "docs/ko/intro.md",
    "content": "# es-toolkit 소개\n\nes-toolkit은 일상적인 개발에서 사용하는 다양한 함수들을 모은 현대적인 JavaScript 유틸리티 라이브러리예요.\n\n[lodash](https://lodash.com/)와 같은 다른 라이브러리와 비교했을 때, es-toolkit은 [같은 함수 기준 최대 97% 작은 번들 사이즈](./bundle-size.md)를 제공하며, [2~3배 빠른 속도로](./performance.md) 동작합니다. 최신 JavaScript API를 활용해서 현대적으로 구현한 덕분이죠.\n\nes-toolkit은 견고한 TypeScript 타입을 내장하여 제공하며, 신뢰성을 높일 수 있도록 100% 테스트 커버리지를 목표로 하고 있습니다.\n\n## 제공하는 기능\n\nes-toolkit이 제공하는 기능 목록은 다음과 같습니다.\n\n- **배열**: [uniq](./reference/array/uniq.md)나 [difference](./reference/array/difference.md)와 같이 배열을 다루기 위한 다양한 함수를 제공해요.\n- **함수**: [debounce](./reference/function/debounce.md)나 [throttle](./reference/function/throttle.md)처럼 함수 호출을 다루는 도구를 제공해요.\n- **숫자**: [sum](./reference/math/sum.md)이나 [round](./reference/math/round.md)처럼 숫자를 쉽게 다루는 함수를 제공해요.\n- **객체**: [pick](./reference/object/pick.md)이나 [omit](./reference/object/omit.md)처럼 JavaScript 객체를 다루는 함수를 제공해요.\n- **타입 가드**: [isNotNil](./reference/predicate/isNotNil.md)처럼 특정한 객체가 어떤 상태인지 검사하는 타입 가드 함수를 제공해요.\n- **Promise**: [delay](./reference/promise/delay.md)와 같은 비동기 유틸리티 함수를 제공해요.\n- **문자열**: [snakeCase](./reference/string/snakeCase.md)와 같이 문자열을 다루기 위한 다양한 함수를 제공해요.\n\n## 링크\n\n이 프로젝트에 대해서 더 많은 정보를 얻기 위해서는 아래 링크를 참고하세요.\n\n- [GitHub](https://github.com/toss/es-toolkit)\n"
  },
  {
    "path": "docs/ko/llms-txt.md",
    "content": "# AI 활용\n\nes-toolkit은 AI 에이전트가 라이브러리를 적극적으로 활용할 수 있도록 노력하고 있어요. AI 도구가 es-toolkit을 더 쉽게 이해하고, 참조하고, 사용할 수 있도록 다양한 편의 기능을 제공해 나갈 예정이에요.\n\n## llms.txt\n\n그 첫 번째로, es-toolkit은 [llms.txt](https://llmstxt.org/) 파일을 제공하고 있어요. llms.txt는 AI 어시스턴트와 대규모 언어 모델(LLM)이 프로젝트 문서를 더 효과적으로 이해할 수 있도록 돕는 표준이에요.\n\n### `/llms.txt`\n\nes-toolkit 문서의 구조화된 목차로, 개별 페이지로의 링크를 포함하고 있어요. AI 도구가 특정 함수나 주제를 찾아볼 때 유용해요.\n\n- **URL**: [https://es-toolkit.dev/llms.txt](https://es-toolkit.dev/llms.txt)\n\n### `/llms-full.txt`\n\n모든 문서 페이지의 전체 내용을 하나의 파일로 합친 것이에요. AI 도구에 es-toolkit에 대한 포괄적인 컨텍스트를 제공하고 싶을 때 유용해요.\n\n- **URL**: [https://es-toolkit.dev/llms-full.txt](https://es-toolkit.dev/llms-full.txt)\n\n### AI 도구에서 활용하기\n\n많은 AI 도구와 LLM 기반 애플리케이션이 llms.txt 표준을 지원하고 있어요. 이 엔드포인트를 사용하면 AI 어시스턴트에게 es-toolkit의 API와 기능에 대한 전체 컨텍스트를 제공할 수 있어요.\n\n예를 들어, AI 코딩 어시스턴트에게 URL을 제공하면 코드 작성을 도와줄 때 es-toolkit 문서를 참고할 수 있어요:\n\n```\n유틸리티 함수는 es-toolkit을 사용해 주세요. 문서: https://es-toolkit.dev/llms-full.txt\n```\n"
  },
  {
    "path": "docs/ko/performance.md",
    "content": "---\ndescription: es-toolkit과 다른 라이브러리의 성능 차이\n---\n\n# 성능\n\n![es-toolkit과 lodash 사이의 성능 차이를 보여주는 그래프. es-toolkit은 lodash를 쓸 때보다 최대 11배 높은 성능을 보여요.](/assets/performance.png)\n\nes-toolkit은 설계할 때 성능을 우선적으로 고려하고 있어요. lodash와 같은 다른 라이브러리와 비교했을 때, 평균적으로 2배의 성능 향상을 확인할 수 있었어요. 함수에 따라서는 11배 빠른 성능을 보이기도 했죠.\n현대적인 JavaScript API을 이용하여 구현했기 때문이에요.\n\n## 성능 비교\n\n|                                                           | es-toolkit@0.0.1 | lodash-es@4.17.21 | 차이  |\n| --------------------------------------------------------- | ---------------- | ----------------- | ----- |\n| [omit](./reference/object/omit.md)                        | 4,767,360회      | 403,624회         | 11.8× |\n| [pick](./reference/object/pick.md)                        | 9,121,839회      | 2,663,072회       | 3.43× |\n| [differenceWith](./reference/array/differenceWith.md)     | 9,291,897회      | 4,275,222회       | 2.17× |\n| [difference](./reference/array/difference.md)             | 10,436,101회     | 5,155,631회       | 2.02× |\n| [intersectionWith](./reference/array/intersectionWith.md) | 8,074,722회      | 3,814,479회       | 2.12× |\n| [intersection](./reference/array/intersection.md)         | 9,999,571회      | 4,630,316회       | 2.15× |\n| [unionBy](./reference/array/unionBy.md)                   | 6,435,983회      | 3,794,899회       | 1.69× |\n| [union](./reference/array/union.md)                       | 5,059,209회      | 4,771,400회       | 1.06× |\n| [dropRightWhile](./reference/array/dropRightWhile.md)     | 7,529,559회      | 5,606,439회       | 1.34× |\n| [groupBy](./reference/array/groupBy.md)                   | 5,000,235회      | 5,206,286회       | 0.96× |\n\n테스트 환경은 MacBook Pro 14인치(M1 Max, 2021)예요. [벤치마크 코드](https://github.com/toss/es-toolkit/tree/main/benchmarks)를 참고하세요.\n"
  },
  {
    "path": "docs/ko/reference/array/at.md",
    "content": "# at\n\n배열에서 지정된 인덱스에 있는 요소들을 가져와 새 배열을 반환해요.\n\n```typescript\nconst result = at(arr, indices);\n```\n\n## 사용법\n\n### `at(arr, indices)`\n\n배열에서 특정 위치의 요소들을 선택하고 싶을 때 `at`를 사용하세요. 음수 인덱스를 사용하면 배열의 끝에서부터 요소를 선택할 수 있어요.\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\n// 숫자 배열에서 여러 인덱스의 요소를 가져와요.\nat([10, 20, 30, 40, 50], [1, 3, 4]);\n// Returns: [20, 40, 50]\n\n// 음수 인덱스를 사용해서 끝에서부터 요소를 가져와요.\nat(['a', 'b', 'c', 'd'], [0, -1, -2]);\n// Returns: ['a', 'd', 'c']\n```\n\n정수가 아닌 인덱스는 정수로 변환돼요.\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\nat([1, 2, 3, 4], [1.5, 2.9]); // [2, 3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 가져올 배열이에요.\n- `indices` (`number[]`): 가져올 요소들의 인덱스 배열이에요. 음수 값을 사용하면 배열의 끝에서부터 계산해요.\n\n#### 반환 값\n\n(`T[]`): 지정된 인덱스에 있는 요소들을 담은 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/chunk.md",
    "content": "# chunk\n\n배열을 정해진 크기의 작은 배열들로 나눠 새 2차원 배열을 반환해요.\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## 사용법\n\n### `chunk(arr, size)`\n\n긴 배열을 같은 크기의 여러 작은 배열로 나누고 싶을 때 `chunk`를 사용하세요. 배열을 똑같이 나눌 수 없다면, 마지막 배열이 남은 요소들을 포함해요.\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\n// 숫자 배열을 크기 2로 나눠요.\nchunk([1, 2, 3, 4, 5], 2);\n// Returns: [[1, 2], [3, 4], [5]]\n\n// 문자열 배열을 크기 3으로 나눠요.\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n```\n\n빈 배열을 나누면 빈 배열이 반환돼요.\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\nchunk([], 2); // []\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 나눌 배열이에요.\n- `size` (`number`): 각 작은 배열의 크기예요. 양의 정수여야 해요.\n\n#### 반환 값\n\n(`T[][]`): 크기 `size`로 나눠진 2차원 배열을 반환해요.\n\n#### 에러\n\n`size`가 양의 정수가 아니면 에러를 던져요.\n\n## 사용해보기\n\n::: sandpack\n\n```ts index.ts\nimport { chunk } from 'es-toolkit/array';\n\nconsole.log(chunk([1, 2, 3, 4, 5], 2));\n```\n\n:::\n\n## Lodash 호환성\n\n`es-toolkit/compat`에서 `chunk`를 가져오면 lodash와 호환돼요.\n\n- `size`가 1보다 작으면 빈 배열을 반환해요.\n- `size`에 소수점이 있는 숫자를 제공하더라도, 정수로 내림해요.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0); // Returns []\n```\n\n## 성능 비교\n\n|                   | [번들 사이즈](../../bundle-size.md) | [런타임 성능](../../performance.md) |\n| ----------------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit        | 238 바이트 (92.4% 작음)             | 9,338,821 회 (11% 느림)             |\n| es-toolkit/compat | 307 바이트 (90.2% 작음)             | 9,892,157 회 (5% 느림)              |\n| lodash-es         | 3,153 바이트                        | 10,523,270 회                       |\n"
  },
  {
    "path": "docs/ko/reference/array/compact.md",
    "content": "# compact\n\n거짓으로 평가되는 값들을 제거한 새 배열을 반환해요.\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 사용법\n\n### `compact(arr)`\n\n배열에서 거짓으로 평가되는 값들(`false`, `null`, `0`, `-0`, `0n`, `''`, `undefined`, `NaN`)을 제거하고 싶을 때 `compact`를 사용하세요. 참으로 평가되는 값들만 남은 새 배열이 반환돼요.\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\n// 다양한 거짓 값들을 제거해요.\ncompact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n// Returns: [1, 2, 3, 4, 5]\n\n// 문자열 배열에서 빈 문자열을 제거해요.\ncompact(['hello', '', 'world', '', '!']);\n// Returns: ['hello', 'world', '!']\n```\n\n타입 시스템이 거짓으로 평가되는 타입들을 자동으로 제외해요.\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\nconst mixed: (string | number | false | null)[] = ['text', 0, false, null, 5];\nconst result = compact(mixed);\n// result의 타입은 (string | number)[]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 거짓으로 평가되는 값을 제거할 배열이에요.\n\n#### 반환 값\n\n(`Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>`): 거짓으로 평가되는 값들이 제거된 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/countBy.md",
    "content": "# countBy\n\n배열의 요소들을 변환 함수의 결과값으로 분류하고, 개수를 센 객체를 반환해요.\n\n```typescript\nconst counted = countBy(arr, mapper);\n```\n\n## 사용법\n\n### `countBy(arr, mapper)`\n\n배열의 요소들을 특정 기준으로 분류하고 각 그룹의 개수를 세고 싶을 때 `countBy`를 사용하세요. 변환 함수가 반환하는 값을 키로 사용해서 요소들을 그룹화하고, 각 그룹에 속한 요소의 개수를 계산해요.\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\n// 숫자를 홀수/짝수로 분류해서 개수를 세요.\ncountBy([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));\n// Returns: { odd: 3, even: 2 }\n```\n\n객체 배열의 특정 속성을 기준으로 개수를 셀 수도 있어요.\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 25 },\n  { name: 'David', age: 30 },\n];\n\ncountBy(users, user => user.age);\n// Returns: { '25': 2, '30': 2 }\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소의 개수를 세고자 하는 배열이에요.\n- `mapper` (`(item: T, index: number, array: T[]) => K`): 요소를 분류할 기준이 되는 값을 반환하는 함수예요. 각 요소, 인덱스, 배열과 함께 호출돼요.\n\n#### 반환 값\n\n(`Record<K, number>`): 각 분류 기준별로 요소가 몇 개 있는지를 나타내는 객체예요.\n"
  },
  {
    "path": "docs/ko/reference/array/difference.md",
    "content": "# difference\n\n첫 번째 배열에서 두 번째 배열에 있는 요소들을 제외한 새 배열을 반환해요.\n\n```typescript\nconst result = difference(firstArr, secondArr);\n```\n\n## 사용법\n\n### `difference(firstArr, secondArr)`\n\n두 배열의 차집합을 구하고 싶을 때 `difference`를 사용하세요. 첫 번째 배열에만 있고 두 번째 배열에는 없는 요소들로 이루어진 새 배열이 반환돼요.\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\n// 숫자 배열의 차집합을 구해요.\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\ndifference(array1, array2);\n// Returns: [1, 3, 5]\n// 2와 4는 두 배열 모두에 있어서 제외돼요.\n\n// 문자열 배열의 차집합을 구해요.\nconst colors1 = ['red', 'blue', 'green'];\nconst colors2 = ['blue', 'yellow'];\ndifference(colors1, colors2);\n// Returns: ['red', 'green']\n```\n\n빈 배열과의 차집합은 원래 배열과 같아요.\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\ndifference([1, 2, 3], []); // [1, 2, 3]\ndifference([], [1, 2, 3]); // []\n```\n\n#### 파라미터\n\n- `firstArr` (`T[]`): 차집합을 구할 기준 배열이에요.\n- `secondArr` (`T[]`): 첫 번째 배열에서 제외할 요소들을 포함한 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 첫 번째 배열에만 있고 두 번째 배열에는 없는 요소들로 이루어진 새 배열이에요.\n\n## 성능 비교\n\n|            | [번들 사이즈](../../bundle-size.md) | [성능](../../performance.md) |\n| ---------- | ----------------------------------- | ---------------------------- |\n| es-toolkit | 90 바이트 (92.4% 작음)              | 9,317,227 회 (85% 빠름)      |\n| lodash-es  | 7,958 바이트                        | 5,030,861 회                 |\n"
  },
  {
    "path": "docs/ko/reference/array/differenceBy.md",
    "content": "# differenceBy\n\n두 배열의 요소를 변환 함수로 바꾸고, 차집합을 구해 새 배열을 반환해요.\n\n```typescript\nconst result = differenceBy(firstArr, secondArr, mapper);\n```\n\n## 사용법\n\n### `differenceBy(firstArr, secondArr, mapper)`\n\n두 배열의 요소를 특정 기준으로 비교해서 차집합을 구하고 싶을 때 `differenceBy`를 사용하세요. 각 요소를 변환 함수로 바꾼 값을 기준으로 비교해서, 첫 번째 배열에만 있는 요소들을 반환해요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\n// 객체 배열에서 id를 기준으로 차집합을 구해요.\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\ndifferenceBy(array1, array2, item => item.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n// id가 2인 요소는 두 배열에 모두 있어서 제외돼요.\n\n// 서로 다른 타입의 배열도 비교할 수 있어요.\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\ndifferenceBy(objects, numbers, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\n문자열 길이를 기준으로 차집합을 구할 수도 있어요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\nconst words1 = ['apple', 'banana', 'cherry'];\nconst words2 = ['grape', 'lemon'];\ndifferenceBy(words1, words2, word => word.length);\n// Returns: ['banana', 'cherry']\n// 'apple'은 'grape'나 'lemon'과 길이가 같아서 제외돼요.\n```\n\n#### 파라미터\n\n- `firstArr` (`T[]`): 차집합을 구할 기준 배열이에요.\n- `secondArr` (`U[]`): 첫 번째 배열에서 제외할 요소들을 포함한 배열이에요.\n- `mapper` (`(value: T | U) => unknown`): 두 배열의 요소를 매핑하는 함수예요. 이 함수가 반환한 값을 기준으로 요소를 비교해요.\n\n#### 반환 값\n\n(`T[]`): 변환된 값을 기준으로 첫 번째 배열에만 있는 요소들로 이루어진 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/differenceWith.md",
    "content": "# differenceWith\n\n사용자 정의 비교 함수를 사용해서 두 배열의 차집합을 구해 새 배열을 반환해요.\n\n```typescript\nconst result = differenceWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 사용법\n\n### `differenceWith(firstArr, secondArr, areItemsEqual)`\n\n두 배열의 요소를 사용자 정의 함수로 비교해서 차집합을 구하고 싶을 때 `differenceWith`를 사용하세요. 비교 함수를 통해 두 요소가 같은지 판단하고, 첫 번째 배열에만 있는 요소들을 반환해요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\n// 객체 배열에서 id를 기준으로 차집합을 구해요.\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\nconst areItemsEqual = (a, b) => a.id === b.id;\ndifferenceWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1 }, { id: 3 }]\n// id가 2인 요소는 같다고 판단되어 제외돼요.\n\n// 서로 다른 타입의 배열도 비교할 수 있어요.\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\nconst areItemsEqual2 = (a, b) => a.id === b;\ndifferenceWith(objects, numbers, areItemsEqual2);\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\n복잡한 조건으로 요소를 비교할 수 있어요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\nconst users1 = [\n  { name: 'Alice', age: 30 },\n  { name: 'Bob', age: 25 },\n  { name: 'Charlie', age: 35 },\n];\nconst users2 = [\n  { name: 'Alice', age: 31 }, // 나이가 달라도 이름이 같으면 같은 사용자\n  { name: 'David', age: 25 },\n];\n\nconst areUsersEqual = (a, b) => a.name === b.name;\ndifferenceWith(users1, users2, areUsersEqual);\n// Returns: [{ name: 'Bob', age: 25 }, { name: 'Charlie', age: 35 }]\n```\n\n#### 파라미터\n\n- `firstArr` (`T[]`): 차집합을 구할 기준 배열이에요.\n- `secondArr` (`U[]`): 첫 번째 배열에서 제외할 요소들을 포함한 배열이에요.\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 두 요소가 같은지 판단하는 함수예요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수에 따라 첫 번째 배열에만 있다고 판단된 요소들로 이루어진 새 배열이에요.\n\n## Lodash와 호환성\n\n`es-toolkit/compat`에서 `differenceWith`를 가져오면 lodash와 완전히 호환돼요.\n\n- `differenceWith`는 첫 번째 배열과 비교하기 위해 여러 배열을 받을 수 있어요.\n- `differenceWith`는 유사 배열 객체를 인수로 받을 수 있어요.\n- `differenceWith`는 사용자 정의 비교 함수를 생략할 수 있어요. 생략하면 기본적으로 [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero) 알고리즘이 사용돼요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 예제 1: 여러 배열과 비교하며, 비교 함수를 사용하는 경우\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\nconst comparator = (a, b) => a.id === b.id;\n\nconst result = differenceWith(array, values1, values2, comparator);\n// 결과는 [{ id: 1 }]이에요. 이 요소는 비교 기준에 따라 첫 번째 배열에만 남아 있어요.\n\n// 예제 2: 배열과 유사한 객체를 인수로 받고, 비교 함수를 사용하는 경우\nconst array = { 0: { id: 1 }, 1: { id: 2 }, 2: { id: 3 }, length: 3 };\nconst values = { 0: { id: 2 }, 1: { id: 3 }, length: 2 };\nconst comparator = (a, b) => a.id === b.id;\n\nconst result2 = differenceWith(array, values, comparator);\n// 결과는 [{ id: 1 }]이에요. 이 요소는 비교 기준에 따라 첫 번째 유사 배열 객체만 남아 있어요.\n\n// 예제 3: 사용자 정의 비교 함수 생략\nconst array = [1, 2, 3];\nconst values1 = [2];\nconst values2 = [3];\n\nconst result3 = differenceWith(array, values1, values2);\n// 결과는 [1]이에요. 이 요소는 모든 배열에서 유일하게 존재해요.\n```\n"
  },
  {
    "path": "docs/ko/reference/array/drop.md",
    "content": "# drop\n\n배열의 시작부터 지정된 개수만큼 요소를 제거한 새 배열을 반환해요.\n\n```typescript\nconst dropped = drop(arr, itemsCount);\n```\n\n## 사용법\n\n### `drop(arr, itemsCount)`\n\n배열의 앞부분에서 일부 요소를 제거하고 싶을 때 `drop`을 사용하세요. 지정한 개수만큼 처음 요소들을 제거하고, 나머지 요소들로 이루어진 새 배열을 반환해요.\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\n// 배열의 처음 2개 요소를 제거해요.\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// 제거할 개수가 배열 길이보다 크면 빈 배열을 반환해요.\ndrop([1, 2, 3], 5);\n// Returns: []\n```\n\n음수나 0을 전달하면 원본 배열과 같은 요소를 가진 새 배열을 반환해요.\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\ndrop([1, 2, 3], 0); // [1, 2, 3]\ndrop([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 제거할 배열이에요.\n- `itemsCount` (`number`): 배열의 시작부터 제거할 요소의 개수예요.\n\n#### 반환 값\n\n(`T[]`): 시작부터 지정된 개수만큼 요소가 제거된 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/dropRight.md",
    "content": "# dropRight\n\n배열의 끝에서부터 지정된 개수만큼 요소를 제거한 새 배열을 반환해요.\n\n```typescript\nconst dropped = dropRight(arr, itemsCount);\n```\n\n## 사용법\n\n### `dropRight(arr, itemsCount)`\n\n배열의 뒷부분에서 일부 요소를 제거하고 싶을 때 `dropRight`를 사용하세요. 지정한 개수만큼 마지막 요소들을 제거하고, 나머지 요소들로 이루어진 새 배열을 반환해요.\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\n// 배열의 마지막 2개 요소를 제거해요.\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// 제거할 개수가 배열 길이보다 크면 빈 배열을 반환해요.\ndropRight([1, 2, 3], 5);\n// Returns: []\n```\n\n음수나 0을 전달하면 원본 배열과 같은 요소를 가진 새 배열을 반환해요.\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\ndropRight([1, 2, 3], 0); // [1, 2, 3]\ndropRight([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 제거할 배열이에요.\n- `itemsCount` (`number`): 배열의 끝에서부터 제거할 요소의 개수예요.\n\n#### 반환 값\n\n(`T[]`): 끝에서부터 지정된 개수만큼 요소가 제거된 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/dropRightWhile.md",
    "content": "# dropRightWhile\n\n배열의 끝부터 조건을 만족하는 동안 요소를 제거한 새 배열을 반환해요.\n\n```typescript\nconst result = dropRightWhile(arr, canContinueDropping);\n```\n\n## 사용법\n\n### `dropRightWhile(arr, canContinueDropping)`\n\n배열의 뒤에서부터 특정 조건을 만족하는 요소들을 제거하고 싶을 때 `dropRightWhile`을 사용하세요. 배열의 끝부터 시작해서 조건 함수가 `true`를 반환하는 동안 요소를 제거하고, 조건 함수가 `false`를 반환하면 중단해요.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\n// 끝에서부터 3보다 큰 요소들을 제거해요.\nconst numbers = [1, 2, 3, 4, 5];\ndropRightWhile(numbers, x => x > 3);\n// Returns: [1, 2, 3]\n// 4와 5가 조건을 만족해서 제거되고, 3에서 조건이 false가 되어 중단돼요.\n\n// 객체 배열에서 특정 조건의 요소들을 제거해요.\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: false },\n  { name: 'David', active: false },\n];\ndropRightWhile(users, user => !user.active);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Bob', active: true }]\n```\n\n빈 배열이나 조건을 만족하는 요소가 없으면 원본 배열과 같은 새 배열을 반환해요.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\ndropRightWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropRightWhile([], x => true); // []\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 제거할 배열이에요.\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 요소를 계속 제거할지 결정하는 조건 함수예요. 배열의 각 요소와 인덱스, 전체 배열을 받아서 참 또는 거짓을 반환해요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하지 않는 요소부터 배열의 시작까지를 포함한 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/dropWhile.md",
    "content": "# dropWhile\n\n배열의 시작부터 조건을 만족하는 동안 요소를 제거한 새 배열을 반환해요.\n\n```typescript\nconst result = dropWhile(arr, canContinueDropping);\n```\n\n## 사용법\n\n### `dropWhile(arr, canContinueDropping)`\n\n배열의 앞에서부터 특정 조건을 만족하는 요소들을 제거하고 싶을 때 `dropWhile`을 사용하세요. 배열의 시작부터 조건 함수가 `true`를 반환하는 동안 요소를 제거하고, 조건 함수가 `false`를 반환하면 중단해요.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\n// 시작부터 3보다 작은 요소들을 제거해요.\nconst numbers = [1, 2, 3, 4, 2, 5];\ndropWhile(numbers, x => x < 3);\n// Returns: [3, 4, 2, 5]\n// 1과 2가 조건을 만족해서 제거되고, 3에서 조건이 false가 되어 중단돼요.\n\n// 객체 배열에서 특정 조건의 요소들을 제거해요.\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n  { name: 'David', active: true },\n];\ndropWhile(users, user => !user.active);\n// Returns: [{ name: 'Charlie', active: true }, { name: 'David', active: true }]\n```\n\n빈 배열이나 조건을 만족하는 요소가 없으면 원본 배열과 같은 새 배열을 반환해요.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\ndropWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropWhile([], x => true); // []\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 제거할 배열이에요.\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 요소를 계속 제거할지 결정하는 조건 함수예요. 배열의 각 요소와 인덱스, 전체 배열을 받아서 참 또는 거짓을 반환해요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하지 않는 요소부터 배열의 끝까지를 포함한 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/fill.md",
    "content": "# fill\n\n배열의 요소를 지정된 값으로 채워요. 원본 배열을 직접 수정해요.\n\n```typescript\nconst filled = fill(arr, value, start, end);\n```\n\n::: info 원본 배열을 수정하지 않으려면 [`toFilled`](./toFilled.md)를 사용하세요.\n\n`toFilled`는 원본 배열을 수정하는 대신 새 배열을 반환해요.\n\n:::\n\n## 사용법\n\n### `fill(arr, value, start?, end?)`\n\n배열의 특정 범위를 지정된 값으로 채우고 싶을 때 `fill`을 사용하세요. 시작 위치부터 끝 위치 직전까지의 요소들을 제공된 값으로 대체해요. 시작이나 끝 위치를 지정하지 않으면 배열 전체를 채워요.\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\n// 배열 전체를 'a'로 채워요.\nconst array1 = [1, 2, 3];\nfill(array1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// 빈 배열을 2로 채워요.\nconst array2 = Array(3);\nfill(array2, 2);\n// Returns: [2, 2, 2]\n\n// 인덱스 1부터 3 직전까지 '*'로 채워요.\nconst array3 = [4, 6, 8, 10];\nfill(array3, '*', 1, 3);\n// Returns: [4, '*', '*', 10]\n```\n\n음수 인덱스를 사용할 수도 있어요. 음수 인덱스는 배열의 끝에서부터 계산해요.\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nfill(array, '*', -2, -1);\n// Returns: [1, '*', 3]\n```\n\n#### 파라미터\n\n- `arr` (`Array<T | U>`): 채울 배열이에요.\n- `value` (`U`): 배열을 채울 값이에요.\n- `start` (`number`, 선택): 시작 위치예요. 기본값은 `0`이에요.\n- `end` (`number`, 선택): 끝 위치예요. 기본값은 배열의 길이예요.\n\n#### 반환 값\n\n(`Array<T | U>`): 값으로 채워진 원본 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/filterAsync.md",
    "content": "# filterAsync\n\n배열의 각 요소를 비동기 조건 함수로 검사해서, 조건을 만족하는 요소들만 포함하는 새로운 배열을 반환해요.\n\n```typescript\nconst filtered = await filterAsync(array, predicate);\n```\n\n## 레퍼런스\n\n### `filterAsync(array, predicate, options?)`\n\nAPI 호출이나 데이터베이스 조회 같은 비동기 작업으로 배열을 필터링할 때 `filterAsync`를 사용하세요. 일반 `filter`와 달리 비동기 조건 함수를 지원하고, `concurrency` 옵션으로 동시 실행 수를 제한할 수 있어요.\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// 사용자 상태를 API로 확인해서 활성 사용자만 필터링해요.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst activeUsers = await filterAsync(users, async user => {\n  return await checkUserStatus(user.id);\n});\n// 반환: 활성 상태인 사용자들만 포함된 배열\n\n// 동시 실행 수를 제한해서 서버 부하를 줄일 수 있어요.\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = await filterAsync(numbers, async n => await isEvenAsync(n), { concurrency: 2 });\n// 최대 2개의 작업만 동시에 실행돼요.\n```\n\n`concurrency` 옵션을 사용하면 외부 API 호출 횟수를 제한하거나 시스템 리소스를 효율적으로 관리할 수 있어요. 옵션을 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// 동시에 최대 3개의 API 호출만 실행해요.\nconst items = await filterAsync(largeArray, async item => await validateItem(item), { concurrency: 3 });\n```\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 필터링할 배열이에요.\n- `predicate` (`(item: T, index: number, array: readonly T[]) => Promise<boolean>`): 각 요소를 검사하는 비동기 함수예요. 참으로 평가되는 값을 반환하면 해당 요소가 결과에 포함돼요.\n- `options` (`FilterAsyncOptions`, 선택): 동시 실행을 제어하는 옵션이에요.\n  - `concurrency` (`number`, 선택): 동시에 실행할 수 있는 최대 작업 수예요. 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n#### 반환 값\n\n(`Promise<T[]>`): 조건 함수가 참으로 평가되는 값을 반환한 요소들만 포함하는 새로운 배열의 프로미스를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/flatMap.md",
    "content": "# flatMap\n\n배열의 각 요소를 함수가 반환하는 값으로 바꾼 후, 지정된 깊이까지 평탄화한 새 배열을 반환해요.\n\n```typescript\nconst result = flatMap(arr, iteratee, depth);\n```\n\n## 사용법\n\n### `flatMap(arr, iteratee, depth = 1)`\n\n배열의 각 요소를 변환하면서 동시에 평탄화하고 싶을 때 `flatMap`을 사용하세요. 먼저 각 요소에 함수를 적용한 후, 결과 배열을 지정된 깊이까지 평탄화해요.\n\nJavaScript 언어에 포함된 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)을 [Array#map](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/map)과 함께 `map(iteratee).flat(depth)`으로 호출했을 때와 동일하게 동작하지만, 더 빨라요.\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\n// 숫자 배열의 각 요소를 두 번 복사해요.\nconst arr = [1, 2, 3];\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 깊이 2로 평탄화해요.\nflatMap(arr, item => [[item, item]], 2);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n다양한 깊이로 평탄화할 수 있어요.\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\nconst arr = [1, 2, 3];\n\n// 기본 깊이 1로 평탄화해요.\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 깊이 3으로 평탄화해요.\nflatMap(arr, item => [[[item, item]]], 3);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 변환할 배열이에요.\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 각 배열 요소를 변환하는 함수예요. 요소, 인덱스, 배열을 인자로 받아요.\n- `depth` (`D`, 선택): 평탄화할 깊이예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`Array<FlatArray<U[], D>>`): 각 요소가 변환되고 지정된 깊이까지 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/flatMapAsync.md",
    "content": "# flatMapAsync\n\n배열의 각 요소를 비동기 함수로 변환하고, 결과를 한 단계 평탄화해서 새로운 배열을 반환해요.\n\n```typescript\nconst result = await flatMapAsync(array, callback);\n```\n\n## 레퍼런스\n\n### `flatMapAsync(array, callback, options?)`\n\n각 요소가 여러 값을 반환하는 비동기 변환을 수행할 때 `flatMapAsync`를 사용하세요. `mapAsync`를 호출한 후 `flat()`을 실행하는 것과 같지만, 더 효율적이에요.\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 각 사용자의 게시글을 가져와서 하나의 배열로 합쳐요.\nconst users = [{ id: 1 }, { id: 2 }];\nconst allPosts = await flatMapAsync(users, async user => {\n  return await fetchUserPosts(user.id);\n});\n// 반환: [post1, post2, post3, ...] (모든 사용자의 게시글이 하나의 배열로)\n\n// 동시 실행 수를 제한할 수 있어요.\nconst numbers = [1, 2, 3];\nconst results = await flatMapAsync(numbers, async n => await fetchRelatedItems(n), { concurrency: 2 });\n// 최대 2개의 작업만 동시에 실행돼요.\n```\n\n각 콜백 함수는 배열을 반환해야 하고, 반환된 모든 배열이 하나의 배열로 합쳐져요. `concurrency` 옵션으로 동시 실행 수를 제한해서 서버 부하를 관리할 수 있어요.\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 각 카테고리의 상품 목록을 가져와서 하나의 배열로 만들어요.\nconst categories = ['electronics', 'books', 'clothing'];\nconst products = await flatMapAsync(categories, async category => await fetchProducts(category), { concurrency: 2 });\n// 반환: 모든 카테고리의 상품이 담긴 하나의 배열\n```\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 변환할 배열이에요.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R[]>`): 각 요소를 배열로 변환하는 비동기 함수예요.\n- `options` (`FlatMapAsyncOptions`, 선택): 동시 실행을 제어하는 옵션이에요.\n  - `concurrency` (`number`, 선택): 동시에 실행할 수 있는 최대 작업 수예요. 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n#### 반환 값\n\n(`Promise<R[]>`): 변환된 값들이 한 단계 평탄화된 배열의 프로미스를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/flatMapDeep.md",
    "content": "# flatMapDeep\n\n배열의 각 요소를 함수가 반환하는 값으로 바꾼 후, 모든 깊이를 평탄화한 새 배열을 반환해요.\n\n```typescript\nconst result = flatMapDeep(arr, iteratee);\n```\n\n## 사용법\n\n### `flatMapDeep(arr, iteratee)`\n\n배열의 각 요소를 변환하면서 동시에 모든 중첩 배열을 완전히 평탄화하고 싶을 때 `flatMapDeep`을 사용하세요. 먼저 각 요소에 함수를 적용한 후, 결과 배열을 모든 깊이까지 평탄화해요.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// 각 요소를 두 번 복사한 후 완전히 평탄화해요.\nconst result1 = flatMapDeep([1, 2, 3], item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n아무리 깊게 중첩된 배열도 모든 깊이를 평탄화해요.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// 중첩 배열도 완전히 평탄화해요.\nconst result = flatMapDeep([1, 2, 3], item => [[item, item]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 여러 레벨의 중첩도 모두 평탄화해요.\nconst result2 = flatMapDeep([1, 2, 3], item => [[[item, item]]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 변환할 배열이에요.\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 각 배열 요소를 변환하는 함수예요. 요소, 인덱스, 배열을 인자로 받아요.\n\n#### 반환 값\n\n(`Array<ExtractNestedArrayType<U>>`): 각 요소가 변환되고 모든 깊이가 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/flatten.md",
    "content": "# flatten\n\n중첩된 배열을 지정된 깊이까지 평탄화한 새 배열을 반환해요.\n\n```typescript\nconst result = flatten(arr, depth);\n```\n\n## 사용법\n\n### `flatten(arr, depth = 1)`\n\n중첩된 배열을 특정 깊이까지 평탄화하고 싶을 때 `flatten`을 사용하세요. 배열 안의 배열들을 지정된 레벨까지 풀어서 평면적인 구조로 만들어줘요.\n\nJavaScript 언어에 포함된 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)과 동일하게 동작하지만, 더 빨라요.\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\n// 기본 깊이 1로 평탄화해요.\nconst array = [1, [2, 3], [4, [5, 6]]];\nflatten(array);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 깊이 2로 평탄화해요.\nflatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n깊이를 조절해서 원하는 레벨까지만 평탄화할 수 있어요.\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\nconst array = [1, [2, 3], [4, [5, 6]]];\n\n// 깊이 1로 평탄화 (기본값)\nconst result1 = flatten(array, 1);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 깊이 2로 평탄화\nconst result2 = flatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 평탄화할 중첩 배열이에요.\n- `depth` (`D`, 선택): 평탄화할 깊이예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`Array<FlatArray<T[], D>>`): 지정된 깊이까지 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/flattenDeep.md",
    "content": "# flattenDeep\n\n중첩된 배열의 모든 깊이를 평탄화한 새 배열을 반환해요.\n\n```typescript\nconst result = flattenDeep(arr);\n```\n\n## 사용법\n\n### `flattenDeep(arr)`\n\n중첩된 배열을 아무리 깊더라도 완전히 평탄화하고 싶을 때 `flattenDeep`을 사용하세요. 배열 안의 모든 중첩 배열들을 풀어서 하나의 평면적인 구조로 만들어줘요.\n\nJavaScript 언어에 포함된 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)을 `flat(Infinity)`로 호출했을 때와 동일하게 동작하지만, 더 빨라요.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\n// 모든 중첩 레벨을 평탄화해요.\nconst array = [1, [2, [3]], [4, [5, 6]]];\nconst result = flattenDeep(array);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n아무리 복잡한 중첩 구조도 완전히 평탄화해요.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\nconst complexArray = [1, [2, [3, [4, [5]]]], 6];\nconst result = flattenDeep(complexArray);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 평탄화할 중첩 배열이에요.\n\n#### 반환 값\n\n(`Array<ExtractNestedArrayType<T>>`): 모든 깊이가 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/forEachAsync.md",
    "content": "# forEachAsync\n\n배열의 각 요소에 대해 비동기 함수를 실행해요.\n\n```typescript\nawait forEachAsync(array, callback);\n```\n\n## 레퍼런스\n\n### `forEachAsync(array, callback, options?)`\n\n배열의 각 요소에 대해 부수 효과를 일으키는 비동기 작업을 수행할 때 `forEachAsync`를 사용하세요. 일반 `forEach`와 달리 모든 비동기 작업이 완료될 때까지 기다리는 프로미스를 반환해요.\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// 모든 사용자 정보를 업데이트해요.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nawait forEachAsync(users, async user => {\n  await updateUser(user.id);\n});\n// 모든 사용자 업데이트가 완료되었어요.\n\n// 동시 실행 수를 제한할 수 있어요.\nconst items = [1, 2, 3, 4, 5];\nawait forEachAsync(items, async item => await processItem(item), { concurrency: 2 });\n// 최대 2개의 항목만 동시에 처리돼요.\n```\n\n`concurrency` 옵션으로 동시 실행 수를 제한해서 서버나 데이터베이스에 가해지는 부하를 조절할 수 있어요. 로그 기록, 파일 업로드, 데이터베이스 업데이트처럼 값을 반환하지 않는 작업에 유용해요.\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// 파일을 순차적으로 업로드해요.\nconst files = ['file1.txt', 'file2.txt', 'file3.txt'];\nawait forEachAsync(files, async file => await uploadFile(file), { concurrency: 1 });\n// 한 번에 하나씩만 업로드돼요.\n```\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 반복할 배열이에요.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<void>`): 각 요소에 대해 실행할 비동기 함수예요.\n- `options` (`ForEachAsyncOptions`, 선택): 동시 실행을 제어하는 옵션이에요.\n  - `concurrency` (`number`, 선택): 동시에 실행할 수 있는 최대 작업 수예요. 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n#### 반환 값\n\n(`Promise<void>`): 모든 작업이 완료되면 이행되는 프로미스를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/forEachRight.md",
    "content": "# forEachRight\n\n배열의 요소를 오른쪽에서 왼쪽으로 순회하며 각 요소에 대해 함수를 실행해요.\n\n```typescript\nforEachRight(arr, callback);\n```\n\n## 사용법\n\n### `forEachRight(arr, callback)`\n\n배열을 역순으로 순회하면서 각 요소에 대해 작업을 수행하고 싶을 때 `forEachRight`를 사용하세요. 배열의 마지막 요소부터 첫 번째 요소까지 순서대로 콜백 함수를 호출해요. 역순 처리가 필요한 경우나 배열의 끝에서부터 작업해야 할 때 유용해요.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nconst result: number[] = [];\n\n// forEachRight 함수를 사용하여 배열을 역순으로 순회해요.\nforEachRight(array, value => {\n  result.push(value);\n});\n\nconsole.log(result); // [3, 2, 1]\n```\n\n콜백 함수는 세 가지 파라미터를 받아요.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = ['a', 'b', 'c'];\nforEachRight(array, (value, index, arr) => {\n  console.log(`값: ${value}, 인덱스: ${index}, 배열:`, arr);\n});\n// 출력:\n// 값: c, 인덱스: 2, 배열: ['a', 'b', 'c']\n// 값: b, 인덱스: 1, 배열: ['a', 'b', 'c']\n// 값: a, 인덱스: 0, 배열: ['a', 'b', 'c']\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 순회할 배열이에요.\n- `callback` (`(value: T, index: number, arr: T[]) => void`): 각 요소에 대해 실행될 함수예요.\n  - `value`: 현재 처리 중인 배열 요소예요.\n  - `index`: 현재 처리 중인 요소의 인덱스예요.\n  - `arr`: `forEachRight` 함수가 호출된 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/groupBy.md",
    "content": "# groupBy\n\n키 생성 함수에 따라 배열의 요소들을 그룹으로 나눈 새 객체를 반환해요.\n\n```typescript\nconst grouped = groupBy(arr, getKeyFromItem);\n```\n\n## 사용법\n\n### `groupBy(arr, getKeyFromItem)`\n\n배열의 요소들을 특정 기준에 따라 분류하고 싶을 때 `groupBy`를 사용하세요. 각 요소에서 키를 생성하는 함수를 제공하면, 같은 키를 가진 요소들끼리 묶어서 객체로 반환해줘요. 반환되는 객체의 값은 각 그룹에 속하는 요소들의 배열이에요. 데이터를 카테고리별로 정리하거나 그룹별 분석을 할 때 유용해요.\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// 객체 배열을 카테고리별로 그룹화해요.\nconst items = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\nconst result = groupBy(items, item => item.category);\n// 결과:\n// {\n//   fruit: [\n//     { category: 'fruit', name: 'apple' },\n//     { category: 'fruit', name: 'banana' }\n//   ],\n//   vegetable: [\n//     { category: 'vegetable', name: 'carrot' }\n//   ]\n// }\n```\n\n다양한 기준으로 그룹화할 수 있어요.\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// 문자열 길이별로 그룹화해요.\nconst words = ['one', 'two', 'three', 'four', 'five'];\nconst byLength = groupBy(words, word => word.length);\n// 결과: { 3: ['one', 'two'], 4: ['four', 'five'], 5: ['three'] }\n\n// 짝수/홀수별로 그룹화해요.\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst byParity = groupBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 결과: { odd: [1, 3, 5], even: [2, 4, 6] }\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 그룹화할 배열이에요.\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 각 요소, 인덱스, 배열에서 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Record<K, T[]>`): 키에 따라 요소들이 그룹화된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/head.md",
    "content": "# head\n\n배열의 첫 번째 요소를 반환해요.\n\n```typescript\nconst firstElement = head(arr);\n```\n\n## 사용법\n\n### `head(arr)`\n\n배열의 첫 번째 요소를 가져오고 싶을 때 `head`를 사용하세요. 배열이 비어 있으면 `undefined`를 반환해요. 배열의 시작 부분에 있는 데이터에 접근할 때 유용해요.\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 숫자 배열의 첫 번째 요소를 가져와요.\nconst numbers = [1, 2, 3, 4, 5];\nhead(numbers);\n// Returns: 1\n\n// 문자열 배열의 첫 번째 요소를 가져와요.\nconst strings = ['a', 'b', 'c'];\nhead(strings);\n// Returns: 'a'\n\n// 빈 배열은 undefined를 반환해요.\nconst emptyArray: number[] = [];\nhead(emptyArray);\n// Returns: undefined\n```\n\n타입이 안전하게 처리돼요.\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 비어있지 않은 배열의 경우 타입이 확실해요.\nconst nonEmptyArray = [1, 2, 3] as const;\nhead(nonEmptyArray);\n// Returns: 1 (타입: 1)\n\n// 일반 배열의 경우 undefined 가능성이 있어요.\nconst maybeEmptyArray = [1, 2, 3];\nhead(maybeEmptyArray);\n// Returns: 1 | undefined (타입: number | undefined)\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 첫 번째 요소를 가져올 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열의 첫 번째 요소예요. 배열이 비어 있으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/initial.md",
    "content": "# initial\n\n배열의 마지막 요소를 제외한 모든 요소로 이루어진 새 배열을 반환해요.\n\n```typescript\nconst result = initial(arr);\n```\n\n## 사용법\n\n### `initial(arr)`\n\n배열에서 마지막 요소만 제외하고 나머지 모든 요소를 가져오고 싶을 때 `initial`을 사용하세요. 배열이 비어있거나 요소가 하나뿐이면 빈 배열을 반환해요. 배열의 끝 부분을 제외하고 처리할 때 유용해요.\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 숫자 배열에서 마지막 요소를 제외해요.\nconst numbers = [1, 2, 3, 4, 5];\ninitial(numbers);\n// Returns: [1, 2, 3, 4]\n\n// 문자열 배열에서 마지막 요소를 제외해요.\nconst strings = ['a', 'b', 'c'];\ninitial(strings);\n// Returns: ['a', 'b']\n\n// 요소가 하나뿐인 배열은 빈 배열을 반환해요.\nconst single = [42];\ninitial(single);\n// Returns: []\n```\n\n빈 배열이나 특수한 경우도 안전하게 처리해요.\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 빈 배열은 빈 배열을 반환해요.\nconst empty: number[] = [];\ninitial(empty);\n// Returns: []\n\n// 중첩 배열도 처리할 수 있어요.\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ninitial(nested);\n// Returns: [[1, 2], [3, 4]]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 마지막 요소를 제외할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 마지막 요소를 제외한 새 배열을 반환해요. 입력 배열이 비어있거나 요소가 하나뿐이면 빈 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/intersection.md",
    "content": "# intersection\n\n두 배열에 공통으로 포함된 요소들로 이루어진 새 배열을 반환해요.\n\n```typescript\nconst result = intersection(firstArr, secondArr);\n```\n\n## 사용법\n\n### `intersection(firstArr, secondArr)`\n\n두 배열에서 공통 요소만 찾고 싶을 때 `intersection`을 사용하세요. 첫 번째 배열의 요소 중에서 두 번째 배열에도 존재하는 것들만 새 배열로 반환해요. 두 데이터 세트의 교집합을 구할 때 유용해요.\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 숫자 배열의 교집합을 구해요.\nconst numbers1 = [1, 2, 3, 4, 5];\nconst numbers2 = [3, 4, 5, 6, 7];\nintersection(numbers1, numbers2);\n// Returns: [3, 4, 5]\n\n// 문자열 배열의 교집합을 구해요.\nconst strings1 = ['apple', 'banana', 'cherry'];\nconst strings2 = ['banana', 'cherry', 'date'];\nintersection(strings1, strings2);\n// Returns: ['banana', 'cherry']\n```\n\n교집합이 없거나 특별한 경우도 처리해요.\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 교집합이 없는 경우 빈 배열을 반환해요.\nconst noCommon1 = [1, 2, 3];\nconst noCommon2 = [4, 5, 6];\nintersection(noCommon1, noCommon2);\n// Returns: []\n\n// 한쪽이 빈 배열인 경우도 빈 배열을 반환해요.\nconst numbers = [1, 2, 3];\nconst empty: number[] = [];\nintersection(numbers, empty);\n// Returns: []\n```\n\n#### 파라미터\n\n- `firstArr` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `secondArr` (`readonly T[]`): 비교할 두 번째 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 두 배열에 공통으로 포함된 요소들로 이루어진 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/intersectionBy.md",
    "content": "# intersectionBy\n\n변환 함수의 결과를 기준으로 두 배열의 교집합을 구한 새 배열을 반환해요.\n\n```typescript\nconst result = intersectionBy(firstArr, secondArr, mapper);\n```\n\n## 사용법\n\n### `intersectionBy(firstArr, secondArr, mapper)`\n\n두 배열에서 특정 속성이나 변환된 값을 기준으로 공통 요소를 찾고 싶을 때 `intersectionBy`를 사용하세요. 각 요소를 변환 함수로 처리한 결과를 비교해서 교집합을 구해요. 객체 배열에서 특정 속성으로 비교하거나 복잡한 변환 로직이 필요할 때 유용해요.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// 객체의 id 속성을 기준으로 교집합을 구해요.\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 4, name: 'alice' },\n];\nintersectionBy(users1, users2, user => user.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 서로 다른 타입의 배열도 비교할 수 있어요.\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3, 4];\nintersectionBy(objects, ids, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n복잡한 변환 로직도 적용할 수 있어요.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// 문자열을 소문자로 변환해서 비교해요.\nconst words1 = ['Apple', 'Banana', 'Cherry'];\nconst words2 = ['apple', 'DATE', 'elderberry'];\nintersectionBy(words1, words2, word => word.toLowerCase());\n// Returns: ['Apple']\n\n// 숫자를 절댓값으로 변환해서 비교해요.\nconst numbers1 = [1, -2, 3, -4];\nconst numbers2 = [2, -3, 4, 5];\nintersectionBy(numbers1, numbers2, num => Math.abs(num));\n// Returns: [-2, 3, -4]\n```\n\n#### 파라미터\n\n- `firstArr` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `secondArr` (`readonly U[]`): 비교할 두 번째 배열이에요.\n- `mapper` (`(item: T | U) => unknown`): 각 요소를 변환해서 비교 기준을 만드는 함수예요.\n\n#### 반환 값\n\n(`T[]`): 변환 함수의 결과를 기준으로 두 배열에 공통으로 포함된 요소들로 이루어진 새 배열을 반환해요. 결과는 첫 번째 배열의 요소들로 구성돼요.\n"
  },
  {
    "path": "docs/ko/reference/array/intersectionWith.md",
    "content": "# intersectionWith\n\n사용자 정의 비교 함수를 기준으로 두 배열의 교집합을 구한 새 배열을 반환해요.\n\n```typescript\nconst result = intersectionWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 사용법\n\n### `intersectionWith(firstArr, secondArr, areItemsEqual)`\n\n두 배열에서 사용자가 정의한 비교 함수로 공통 요소를 찾고 싶을 때 `intersectionWith`를 사용하세요. 단순한 값 비교로는 처리하기 어려운 복잡한 객체나 특수한 비교 로직이 필요한 경우에 유용해요.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// 객체의 id 속성으로 비교해요.\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nintersectionWith(users1, users2, (a, b) => a.id === b.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 다른 타입끼리도 비교할 수 있어요.\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3];\nintersectionWith(objects, ids, (obj, id) => obj.id === id);\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n복잡한 비교 로직도 구현할 수 있어요.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// 대소문자를 구분하지 않는 문자열 비교\nconst words1 = ['Apple', 'Banana'];\nconst words2 = ['apple', 'cherry'];\nintersectionWith(words1, words2, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Apple']\n\n// 범위 내 숫자 비교\nconst numbers1 = [1.1, 2.3, 3.7];\nconst numbers2 = [1.0, 2.5, 4.0];\nintersectionWith(numbers1, numbers2, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: [1.1] (1.1과 1.0의 차이가 0.5보다 작음)\n```\n\n#### 파라미터\n\n- `firstArr` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `secondArr` (`readonly U[]`): 비교할 두 번째 배열이에요.\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 두 요소가 같은지 판단하는 함수예요. 같으면 `true`, 다르면 `false`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 사용자 정의 비교 함수를 기준으로 두 배열에 공통으로 포함된 요소들로 이루어진 새 배열을 반환해요. 결과는 첫 번째 배열의 요소들로 구성돼요.\n"
  },
  {
    "path": "docs/ko/reference/array/isSubset.md",
    "content": "# isSubset\n\n한 배열이 다른 배열의 부분집합인지 확인해요.\n\n```typescript\nconst result = isSubset(superset, subset);\n```\n\n## 사용법\n\n### `isSubset(superset, subset)`\n\n한 배열의 모든 요소가 다른 배열에 포함되는지 확인하고 싶을 때 `isSubset`을 사용하세요. 부분집합 관계를 확인할 때나 권한, 기능, 태그 등이 허용된 범위 안에 있는지 검사할 때 유용해요.\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 숫자 배열에서 부분집합 확인\nconst numbers = [1, 2, 3, 4, 5];\nconst subset = [2, 3, 4];\nisSubset(numbers, subset);\n// Returns: true\n\n// 문자열 배열에서 부분집합 확인\nconst permissions = ['read', 'write', 'delete', 'admin'];\nconst userPermissions = ['read', 'write'];\nisSubset(permissions, userPermissions);\n// Returns: true\n\n// 부분집합이 아닌 경우\nconst colors = ['red', 'blue', 'green'];\nconst invalidColors = ['red', 'yellow'];\nisSubset(colors, invalidColors);\n// Returns: false\n```\n\n특별한 경우들도 올바르게 처리해요.\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 빈 배열은 항상 부분집합이에요.\nconst anyArray = [1, 2, 3];\nconst emptyArray: number[] = [];\nisSubset(anyArray, emptyArray);\n// Returns: true\n\n// 같은 배열은 자기 자신의 부분집합이에요.\nconst same = ['a', 'b', 'c'];\nisSubset(same, same);\n// Returns: true\n\n// 중복 요소가 있어도 정상 작동해요.\nconst withDuplicates = [1, 2, 2, 3];\nconst duplicateSubset = [2, 2];\nisSubset(withDuplicates, duplicateSubset);\n// Returns: true\n```\n\n#### 파라미터\n\n- `superset` (`readonly T[]`): 부분집합의 모든 요소를 포함할 수 있는 상위 집합 배열이에요.\n- `subset` (`readonly T[]`): 상위 집합에 포함되는지 확인할 부분집합 배열이에요.\n\n#### 반환 값\n\n(`boolean`): 부분집합의 모든 요소가 상위 집합에 포함되면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/isSubsetWith.md",
    "content": "# isSubsetWith\n\n사용자 정의 비교 함수를 기준으로 한 배열이 다른 배열의 부분집합인지 확인해요.\n\n```typescript\nconst result = isSubsetWith(superset, subset, areItemsEqual);\n```\n\n## 사용법\n\n### `isSubsetWith(superset, subset, areItemsEqual)`\n\n사용자가 정의한 비교 함수로 부분집합 관계를 확인하고 싶을 때 `isSubsetWith`를 사용하세요. 객체를 비교하거나 특별한 비교 로직이 필요한 경우에 유용해요.\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// 객체의 id로 부분집합 확인\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst targetUsers = [\n  { id: 2, name: 'jane' },\n  { id: 1, name: 'john' },\n];\nisSubsetWith(users, targetUsers, (a, b) => a.id === b.id);\n// Returns: true\n\n// 부분집합이 아닌 경우\nconst allUsers = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst someUsers = [{ id: 3, name: 'bob' }];\nisSubsetWith(allUsers, someUsers, (a, b) => a.id === b.id);\n// Returns: false\n```\n\n복잡한 비교 로직도 사용할 수 있어요.\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// 대소문자를 구분하지 않는 문자열 비교\nconst validNames = ['Alice', 'Bob', 'Charlie'];\nconst userNames = ['alice', 'BOB'];\nisSubsetWith(validNames, userNames, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: true\n\n// 범위 내 숫자 비교\nconst validRanges = [1, 2, 3, 4, 5];\nconst testNumbers = [1.1, 2.8];\nisSubsetWith(validRanges, testNumbers, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: true (1.1은 1과, 2.8은 3과 충분히 가까움)\n```\n\n#### 파라미터\n\n- `superset` (`readonly T[]`): 부분집합의 모든 요소를 포함할 수 있는 상위 집합 배열이에요.\n- `subset` (`readonly T[]`): 상위 집합에 포함되는지 확인할 부분집합 배열이에요.\n- `areItemsEqual` (`(x: T, y: T) => boolean`): 두 요소가 같은지 판단하는 함수예요. 같으면 `true`, 다르면 `false`를 반환해야 해요.\n\n#### 반환 값\n\n(`boolean`): 사용자 정의 비교 함수를 기준으로 부분집합의 모든 요소가 상위 집합에 포함되면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/keyBy.md",
    "content": "# keyBy\n\n키 생성 함수를 사용해 배열 요소들을 키-값 쌍의 객체로 바꾼 새 객체를 반환해요.\n\n```typescript\nconst result = keyBy(arr, getKeyFromItem);\n```\n\n## 사용법\n\n### `keyBy(arr, getKeyFromItem)`\n\n배열의 각 요소를 빠르게 찾을 수 있도록 키로 인덱싱된 객체를 만들고 싶을 때 `keyBy`를 사용하세요. 각 요소에서 고유한 키를 생성하는 함수를 제공하면, 그 키를 사용해서 요소에 접근할 수 있는 객체를 만들어줘요. 같은 키를 생성하는 요소가 여러 개 있다면 마지막 요소가 사용돼요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// 객체의 id 속성을 키로 사용해요.\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nkeyBy(users, user => user.id);\n// Returns: {\n//   1: { id: 1, name: 'john' },\n//   2: { id: 2, name: 'jane' },\n//   3: { id: 3, name: 'bob' }\n// }\n\n// 문자열 속성을 키로 사용해요.\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\nkeyBy(products, item => item.category);\n// Returns: {\n//   fruit: { category: 'fruit', name: 'banana' }, // 마지막 fruit 요소\n//   vegetable: { category: 'vegetable', name: 'carrot' }\n// }\n```\n\n복잡한 키 생성 로직도 사용할 수 있어요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// 여러 속성을 조합해서 키를 만들어요.\nconst orders = [\n  { date: '2023-01-01', customerId: 1, amount: 100 },\n  { date: '2023-01-01', customerId: 2, amount: 200 },\n  { date: '2023-01-02', customerId: 1, amount: 150 },\n];\nkeyBy(orders, order => `${order.date}-${order.customerId}`);\n// Returns: {\n//   '2023-01-01-1': { date: '2023-01-01', customerId: 1, amount: 100 },\n//   '2023-01-01-2': { date: '2023-01-01', customerId: 2, amount: 200 },\n//   '2023-01-02-1': { date: '2023-01-02', customerId: 1, amount: 150 }\n// }\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 객체로 변환할 배열이에요.\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 각 요소, 인덱스, 배열에서 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Record<K, T>`): 생성된 키를 속성명으로, 해당 요소를 값으로 하는 객체를 반환해요. 동일한 키를 생성하는 요소가 여러 개 있으면 마지막 요소가 값으로 사용돼요.\n"
  },
  {
    "path": "docs/ko/reference/array/last.md",
    "content": "# last\n\n배열의 마지막 요소를 반환해요.\n\n```typescript\nconst lastElement = last(arr);\n```\n\n## 사용법\n\n### `last(arr)`\n\n배열의 마지막 요소를 가져오고 싶을 때 `last`를 사용하세요. 배열이 비어 있으면 `undefined`를 반환해요. 배열의 끝 부분에 있는 데이터에 접근할 때 유용해요.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 숫자 배열의 마지막 요소를 가져와요.\nconst numbers = [1, 2, 3, 4, 5];\nlast(numbers);\n// Returns: 5\n\n// 문자열 배열의 마지막 요소를 가져와요.\nconst strings = ['a', 'b', 'c'];\nlast(strings);\n// Returns: 'c'\n\n// 빈 배열은 undefined를 반환해요.\nconst emptyArray: number[] = [];\nlast(emptyArray);\n// Returns: undefined\n```\n\n타입이 안전하게 처리돼요.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 비어있지 않은 배열의 경우 타입이 확실해요.\nconst nonEmptyArray = [1, 2, 3] as const;\nlast(nonEmptyArray);\n// Returns: 3 (타입: 3)\n\n// 일반 배열의 경우 undefined 가능성이 있어요.\nconst maybeEmptyArray = [1, 2, 3];\nlast(maybeEmptyArray);\n// Returns: 3 | undefined (타입: number | undefined)\n```\n\n큰 배열에서도 효율적으로 작동해요.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 성능상 최적화되어 있어요.\nconst largeArray = Array(1000000)\n  .fill(0)\n  .map((_, i) => i);\nlast(largeArray);\n// Returns: 999999 (빠른 접근)\n\n// 중첩 배열도 처리할 수 있어요.\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nlast(nested);\n// Returns: [5, 6]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 마지막 요소를 가져올 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열의 마지막 요소예요. 배열이 비어 있으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/limitAsync.md",
    "content": "# limitAsync\n\n비동기 함수의 최대 동시 실행 수를 제한하는 새로운 함수를 만들어요.\n\n```typescript\nconst limitedFunc = limitAsync(asyncFunc, concurrency);\n```\n\n## 레퍼런스\n\n### `limitAsync(callback, concurrency)`\n\n여러 번 호출되는 비동기 함수의 동시 실행 수를 제한하고 싶을 때 `limitAsync`를 사용하세요. 지정한 수만큼만 동시에 실행되고, 추가 호출은 실행 중인 작업이 완료될 때까지 대기해요.\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 최대 3개의 요청만 동시에 실행되도록 제한해요.\nconst limitedFetch = limitAsync(async url => {\n  return await fetch(url);\n}, 3);\n\nconst urls = ['url1', 'url2', 'url3', 'url4', 'url5'];\nawait Promise.all(urls.map(url => limitedFetch(url)));\n// 처음 3개가 먼저 실행되고, 완료되면 나머지가 실행돼요.\n```\n\n외부 API 호출이나 데이터베이스 쿼리처럼 리소스를 많이 사용하는 작업의 부하를 조절할 때 유용해요. 속도 제한이 있는 API를 사용하거나 서버 부하를 관리해야 할 때 특히 효과적이에요.\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 무거운 연산을 최대 2개씩만 처리해요.\nconst processItem = async item => {\n  return await heavyComputation(item);\n};\n\nconst limitedProcess = limitAsync(processItem, 2);\nconst items = [1, 2, 3, 4, 5];\nawait Promise.all(items.map(item => limitedProcess(item)));\n// 최대 2개의 항목만 동시에 처리돼요.\n```\n\n#### 파라미터\n\n- `callback` (`F extends (...args: any[]) => Promise<any>`): 동시 실행 수를 제한할 비동기 함수예요.\n- `concurrency` (`number`): 동시에 실행할 수 있는 최대 작업 수예요.\n\n#### 반환 값\n\n(`F`): 동시 실행 제한이 적용된 새로운 함수를 반환해요. 원본 함수와 같은 인터페이스를 가지고 있어요.\n"
  },
  {
    "path": "docs/ko/reference/array/mapAsync.md",
    "content": "# mapAsync\n\n배열의 각 요소를 비동기 함수로 변환해서 새로운 배열을 반환해요.\n\n```typescript\nconst transformed = await mapAsync(array, callback);\n```\n\n## 레퍼런스\n\n### `mapAsync(array, callback, options?)`\n\n배열의 각 요소에 대해 비동기 변환 작업을 수행할 때 `mapAsync`를 사용하세요. API 호출이나 데이터베이스 조회처럼 각 요소를 비동기적으로 처리해야 할 때 유용해요.\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 각 사용자의 상세 정보를 가져와요.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userDetails = await mapAsync(users, async user => {\n  return await fetchUserDetails(user.id);\n});\n// 반환: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]\n\n// 동시 실행 수를 제한할 수 있어요.\nconst numbers = [1, 2, 3, 4, 5];\nconst results = await mapAsync(numbers, async n => await slowOperation(n), { concurrency: 2 });\n// 최대 2개의 작업만 동시에 실행돼요.\n```\n\n`concurrency` 옵션으로 동시 실행 수를 제한해서 서버 부하를 조절하거나 API 속도 제한을 지킬 수 있어요. 옵션을 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 대량의 이미지를 변환하되, 서버 부하를 고려해서 동시 처리 수를 제한해요.\nconst imageUrls = [...]; // 많은 이미지 URL들\nconst processedImages = await mapAsync(\n  imageUrls,\n  async (url) => await processImage(url),\n  { concurrency: 5 }\n);\n// 한 번에 최대 5개의 이미지만 처리돼요.\n```\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 변환할 배열이에요.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R>`): 각 요소를 변환하는 비동기 함수예요.\n- `options` (`MapAsyncOptions`, 선택): 동시 실행을 제어하는 옵션이에요.\n  - `concurrency` (`number`, 선택): 동시에 실행할 수 있는 최대 작업 수예요. 지정하지 않으면 모든 작업이 동시에 실행돼요.\n\n#### 반환 값\n\n(`Promise<R[]>`): 변환된 값들로 이루어진 새로운 배열의 프로미스를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/maxBy.md",
    "content": "# maxBy\n\n변환 함수가 반환하는 값을 기준으로, 배열에서 최댓값을 가지는 요소를 반환해요.\n\n```typescript\nconst max = maxBy(items, getValue);\n```\n\n## 사용법\n\n### `maxBy(items, getValue)`\n\n배열의 요소들을 변환 함수로 숫자 값으로 바꾸고, 가장 큰 값을 가진 원본 요소를 찾고 싶을 때 `maxBy`를 사용하세요. 빈 배열에서는 `undefined`를 반환해요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\n// 객체 배열에서 특정 속성의 최댓값을 가진 요소를 찾아요.\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nmaxBy(people, person => person.age);\n// Returns: { name: 'john', age: 30 }\n\n// 숫자 배열에서 절댓값이 가장 큰 요소를 찾아요.\nconst numbers = [-10, -5, 0, 5, 15];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: 15\n```\n\n빈 배열에서는 `undefined`를 반환해요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\nmaxBy([], x => x.value); // undefined\n```\n\n#### 파라미터\n\n- `items` (`T[]`): 최댓값을 가지는 요소를 찾을 배열이에요.\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 각 요소를 숫자로 변환하는 함수예요. 요소, 인덱스, 배열을 인자로 받아요.\n\n#### 반환 값\n\n(`T | undefined`): 변환 함수가 반환한 값 중 가장 큰 값을 가진 요소예요. 배열이 비어 있다면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/minBy.md",
    "content": "# minBy\n\n변환 함수가 반환하는 값을 기준으로, 배열에서 최솟값을 가지는 요소를 반환해요.\n\n```typescript\nconst min = minBy(items, getValue);\n```\n\n## 사용법\n\n### `minBy(items, getValue)`\n\n배열의 요소들을 변환 함수로 숫자 값으로 바꾸고, 가장 작은 값을 가진 원본 요소를 찾고 싶을 때 `minBy`를 사용하세요. 빈 배열에서는 `undefined`를 반환해요.\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\n// 객체 배열에서 특정 속성의 최솟값을 가진 요소를 찾아요.\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nminBy(people, person => person.age);\n// Returns: { name: 'joe', age: 26 }\n\n// 숫자 배열에서 절댓값이 가장 작은 요소를 찾아요.\nconst numbers = [-10, -5, 0, 5, 15];\nminBy(numbers, x => Math.abs(x));\n// Returns: 0\n```\n\n빈 배열에서는 `undefined`를 반환해요.\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\nminBy([], x => x.value); // undefined\n```\n\n#### 파라미터\n\n- `items` (`T[]`): 최솟값을 가지는 요소를 찾을 배열이에요.\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 각 요소를 숫자로 변환하는 함수예요. 요소, 인덱스, 배열을 인자로 받아요.\n\n#### 반환 값\n\n(`T | undefined`): 변환 함수가 반환한 값 중 가장 작은 값을 가진 요소예요. 배열이 비어 있다면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/orderBy.md",
    "content": "# orderBy\n\n여러 기준과 정렬 방향에 따라 객체 배열을 정렬한 새 배열을 반환해요.\n\n```typescript\nconst sorted = orderBy(arr, criteria, orders);\n```\n\n## 사용법\n\n### `orderBy(arr, criteria, orders)`\n\n객체 배열을 여러 조건으로 복합 정렬하고 싶을 때 `orderBy`를 사용하세요. 각 조건마다 오름차순이나 내림차순을 지정할 수 있고, 앞의 조건에서 같은 값이면 다음 조건으로 정렬해요.\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\n// 여러 기준으로 사용자 배열을 정렬해요.\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\norderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);\n// Returns:\n// [\n//   { user: 'barney', age: 36 },\n//   { user: 'barney', age: 34 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 }\n// ]\n\n// 속성 이름과 함수를 섞어서 사용할 수 있어요.\nconst products = [\n  { name: 'Apple', category: 'fruit', price: 1.5 },\n  { name: 'Banana', category: 'fruit', price: 0.8 },\n  { name: 'Broccoli', category: 'vegetable', price: 2.0 },\n];\n\norderBy(products, ['category', product => product.name.length], ['asc', 'desc']);\n// Returns: category로 먼저 정렬하고, 같은 category 내에서는 이름 길이 내림차순으로 정렬\n```\n\n정렬 방향의 개수가 조건보다 적으면 마지막 방향을 반복 사용해요.\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\nconst data = [\n  { a: 1, b: 1, c: 1 },\n  { a: 1, b: 2, c: 2 },\n  { a: 2, b: 1, c: 1 },\n];\n\norderBy(data, ['a', 'b', 'c'], ['asc', 'desc']);\n// 'a'는 오름차순, 'b'와 'c'는 내림차순으로 정렬돼요.\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 정렬할 객체 배열이에요.\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): 정렬할 기준들이에요. 객체의 속성 이름이나 값을 반환하는 함수를 사용할 수 있어요.\n- `orders` (`Array<'asc' | 'desc'>`): 각 기준에 대한 정렬 방향 배열이에요. `'asc'`는 오름차순, `'desc'`는 내림차순을 의미해요.\n\n#### 반환 값\n\n(`T[]`): 지정된 기준과 방향에 따라 정렬된 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/partition.md",
    "content": "# partition\n\n조건에 따라 배열을 두 그룹으로 나눈 튜플을 반환해요.\n\n```typescript\nconst [truthy, falsy] = partition(arr, isInTruthy);\n```\n\n## 사용법\n\n### `partition(arr, isInTruthy)`\n\n배열의 요소들을 특정 조건에 따라 두 그룹으로 분리하고 싶을 때 `partition`을 사용하세요. 조건 함수가 `true`를 반환하는 요소들과 `false`를 반환하는 요소들을 각각 다른 배열로 분리해요.\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\n// 숫자 배열을 짝수와 홀수로 나눠요.\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst [evens, odds] = partition(numbers, x => x % 2 === 0);\n// evens: [2, 4, 6]\n// odds: [1, 3, 5]\n\n// 객체 배열을 특정 조건으로 나눠요.\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nconst [activeUsers, inactiveUsers] = partition(users, user => user.active);\n// activeUsers: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n// inactiveUsers: [{ name: 'Bob', active: false }]\n```\n\n빈 배열에서는 두 개의 빈 배열을 반환해요.\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\nconst [truthy, falsy] = partition([], x => x > 0);\n// truthy: []\n// falsy: []\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 두 그룹으로 나눌 배열이에요.\n- `isInTruthy` (`(value: T, index: number, array: readonly T[]) => boolean`): 각 요소가 첫 번째 배열(truthy)에 포함될지, 두 번째 배열(falsy)에 포함될지를 결정하는 조건 함수예요. 값, 인덱스, 전체 배열과 함께 호출돼요.\n\n#### 반환 값\n\n(`[truthy: T[], falsy: T[]]`): 두 배열로 구성된 튜플이에요. 첫 번째 배열은 조건이 `true`인 요소들, 두 번째 배열은 조건이 `false`인 요소들을 담고 있어요.\n"
  },
  {
    "path": "docs/ko/reference/array/pull.md",
    "content": "# pull\n\n배열에서 지정된 값들을 모두 제거해요.\n\n```typescript\nconst result = pull(arr, valuesToRemove);\n```\n\n## 사용법\n\n### `pull(arr, valuesToRemove)`\n\n배열에서 특정 값들을 모두 제거하고 싶을 때 `pull`을 사용하세요. 이 함수는 원본 배열을 직접 수정하고, 수정된 배열을 반환해요.\n\n```typescript\nimport { pull } from 'es-toolkit/array';\n\n// 숫자 배열에서 특정 값들을 제거해요.\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\npull(numbers, [2, 4]);\nconsole.log(numbers); // [1, 3, 5]\n\n// 문자열 배열에서 특정 문자열들을 제거해요.\nconst fruits = ['apple', 'banana', 'cherry', 'banana', 'date'];\npull(fruits, ['banana', 'cherry']);\nconsole.log(fruits); // ['apple', 'date']\n\n// 객체 배열에서 참조가 같은 객체를 제거해요.\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj3, obj1];\npull(objects, [obj1]);\nconsole.log(objects); // [{ id: 2 }, { id: 3 }]\n```\n\n원본 배열을 수정하지 않고 새로운 배열을 만들고 싶다면 `difference` 함수를 사용하세요.\n\n```typescript\nimport { pull } from 'es-toolkit/array';\nimport { difference } from 'es-toolkit/array';\n\nconst original = [1, 2, 3, 4, 5];\n\n// pull은 원본 배열을 수정해요.\nconst arr1 = [...original];\npull(arr1, [2, 4]);\nconsole.log(arr1); // [1, 3, 5]\n\n// difference는 새로운 배열을 반환해요.\nconst arr2 = difference(original, [2, 4]);\nconsole.log(original); // [1, 2, 3, 4, 5] (변경되지 않음)\nconsole.log(arr2); // [1, 3, 5]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 값을 제거할 배열이에요.\n- `valuesToRemove` (`readonly unknown[]`): 배열에서 제거할 값들의 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 지정된 값들이 제거된 원본 배열이에요. 원본 배열이 수정되어 반환돼요.\n"
  },
  {
    "path": "docs/ko/reference/array/pullAt.md",
    "content": "# pullAt\n\n배열에서 지정된 인덱스의 요소들을 제거하고, 제거된 요소들을 반환해요.\n\n```typescript\nconst removed = pullAt(arr, indices);\n```\n\n## 사용법\n\n### `pullAt(arr, indicesToRemove)`\n\n배열의 특정 위치에 있는 요소들을 제거하고 싶을 때 `pullAt`을 사용하세요. 이 함수는 원본 배열을 수정하고, 제거된 요소들을 새로운 배열로 반환해요. 음수 인덱스도 지원하며, 배열의 끝에서부터 계산해요.\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\n// 여러 인덱스의 요소를 한 번에 제거해요.\nconst numbers = [10, 20, 30, 40, 50];\nconst removed = pullAt(numbers, [1, 3, 4]);\nconsole.log(removed); // [20, 40, 50]\nconsole.log(numbers); // [10, 30]\n\n// 중복된 인덱스가 있어도 안전하게 처리해요.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst removedFruits = pullAt(fruits, [1, 2, 1]);\nconsole.log(removedFruits); // ['banana', 'cherry', 'banana']\nconsole.log(fruits); // ['apple', 'date']\n```\n\n존재하지 않는 인덱스를 지정하면 해당 위치에는 `undefined`가 반환돼요.\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\nconst items = [1, 2, 3];\nconst removed = pullAt(items, [0, 5, 2]);\nconsole.log(removed); // [1, undefined, 3]\nconsole.log(items); // [2]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 제거할 배열이에요.\n- `indicesToRemove` (`number[]`): 제거할 요소들의 인덱스 배열이에요. 음수 인덱스는 배열의 끝에서부터 계산돼요.\n\n#### 반환 값\n\n(`T[]`): 제거된 요소들로 구성된 새로운 배열이에요. 존재하지 않는 인덱스에 대해서는 `undefined`가 포함돼요.\n"
  },
  {
    "path": "docs/ko/reference/array/reduceAsync.md",
    "content": "# reduceAsync\n\n배열을 비동기 리듀서 함수로 단일 값으로 합쳐요.\n\n```typescript\nconst result = await reduceAsync(array, reducer, initialValue);\n```\n\n## 레퍼런스\n\n### `reduceAsync(array, reducer, initialValue)`\n\n배열의 각 요소를 순차적으로 처리해서 하나의 값으로 합칠 때 `reduceAsync`를 사용하세요. 리듀서 함수는 왼쪽에서 오른쪽으로 각 요소에 순차적으로 적용되며, 이전 호출의 누적 결과를 다음 호출로 전달해요.\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 각 숫자에 대해 비동기 값을 가져와서 합산해요.\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + (await fetchValue(n)), 0);\n// 반환: 모든 가져온 값의 합계\n\n// 배열을 객체로 변환해요.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userMap = await reduceAsync(\n  users,\n  async (acc, user) => {\n    const details = await fetchUserDetails(user.id);\n    acc[user.id] = details;\n    return acc;\n  },\n  {} as Record<number, any>\n);\n// 반환: { 1: {...}, 2: {...}, 3: {...} }\n```\n\n다른 비동기 배열 메서드와 달리 `reduceAsync`는 각 요소를 순차적으로 처리해야 하므로 동시 실행을 지원하지 않아요. 이전 단계의 결과가 다음 단계에 필요하기 때문이에요.\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 합칠 배열이에요.\n- `reducer` (`(accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>`): 각 요소를 처리하는 비동기 함수예요. 누적된 값과 현재 값을 받아서 새로운 누적 값을 반환해요.\n- `initialValue` (`U`): 누적 값의 초기값이에요.\n\n#### 반환 값\n\n(`Promise<U>`): 최종 누적 값의 프로미스를 반환해요.\n\n---\n\n### `reduceAsync(array, reducer)`\n\n초기값 없이 배열을 합칠 때는 첫 번째 요소가 초기값으로 사용되고, 두 번째 요소부터 리듀서 함수가 적용돼요.\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 초기값 없이 합계 계산해요.\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + n);\n// 반환: 15 (1 + 2 + 3 + 4 + 5)\n\n// 빈 배열은 undefined를 반환해요.\nconst emptyArray: number[] = [];\nconst result = await reduceAsync(emptyArray, async (acc, n) => acc + n);\n// 반환: undefined\n```\n\n빈 배열에 초기값 없이 `reduceAsync`를 호출하면 `undefined`를 반환해요.\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 합칠 배열이에요.\n- `reducer` (`(accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>`): 각 요소를 처리하는 비동기 함수예요. 누적된 값과 현재 값을 받아서 새로운 누적 값을 반환해요.\n\n#### 반환 값\n\n(`Promise<T | undefined>`): 최종 누적 값의 프로미스를 반환해요. 배열이 비어있으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/remove.md",
    "content": "# remove\n\n조건 함수에 따라 배열에서 요소를 제거하고 제거된 요소들을 새 배열로 반환해요. 원본 배열을 직접 수정해요.\n\n```typescript\nconst removed = remove(arr, shouldRemoveElement);\n```\n\n## 사용법\n\n### `remove(arr, shouldRemoveElement)`\n\n배열에서 특정 조건에 맞는 요소들을 제거하고 제거된 요소들을 확인하고 싶을 때 `remove`를 사용하세요. 이 함수는 원본 배열을 수정하면서 제거된 요소들을 별도 배열로 반환해요. 원본 배열을 유지하고 싶다면 `filter` 메서드를 사용하세요.\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// 짝수를 제거해요.\nconst numbers = [1, 2, 3, 4, 5];\nconst removedNumbers = remove(numbers, value => value % 2 === 0);\nconsole.log(numbers); // [1, 3, 5] (원본 배열이 수정됨)\nconsole.log(removedNumbers); // [2, 4] (제거된 요소들)\n\n// 특정 조건의 객체를 제거해요.\nconst users = [\n  { name: 'john', age: 25 },\n  { name: 'jane', age: 17 },\n  { name: 'bob', age: 30 },\n];\nconst minors = remove(users, user => user.age < 18);\nconsole.log(users); // [{ name: 'john', age: 25 }, { name: 'bob', age: 30 }]\nconsole.log(minors); // [{ name: 'jane', age: 17 }]\n```\n\n인덱스와 원본 배열 정보도 사용할 수 있어요.\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// 인덱스 기반으로 요소를 제거해요.\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst removedAtEvenIndex = remove(items, (value, index) => index % 2 === 0);\nconsole.log(items); // ['b', 'd']\nconsole.log(removedAtEvenIndex); // ['a', 'c', 'e']\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 수정할 배열이에요.\n- `shouldRemoveElement` (`(value: T, index: number, array: T[]) => boolean`): 각 요소에 대해 호출되는 조건 함수예요. `true`를 반환하면 요소가 제거돼요.\n  - `value`: 현재 처리 중인 요소예요.\n  - `index`: 현재 요소의 인덱스예요.\n  - `array`: 원본 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 제거된 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/sample.md",
    "content": "# sample\n\n배열에서 무작위로 선택된 하나의 요소를 반환해요.\n\n```typescript\nconst randomElement = sample(arr);\n```\n\n## 사용법\n\n### `sample(arr)`\n\n배열에서 무작위로 하나의 요소를 가져오고 싶을 때 `sample`을 사용하세요. 게임에서 랜덤 아이템을 선택하거나, 테스트용 데이터를 랜덤하게 가져오거나, 추첨을 할 때 유용해요.\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 숫자 배열에서 무작위로 하나를 선택해요.\nconst numbers = [1, 2, 3, 4, 5];\nconst randomNumber = sample(numbers);\n// Returns: 1, 2, 3, 4, 5 중 하나\n\n// 문자열 배열에서 무작위로 하나를 선택해요.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst randomFruit = sample(fruits);\n// Returns: 'apple', 'banana', 'cherry', 'date' 중 하나\n\n// 객체 배열에서 무작위로 하나를 선택해요.\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst randomUser = sample(users);\n// Returns: 세 명의 사용자 중 무작위로 하나\n```\n\n다양한 타입의 배열에서도 사용할 수 있어요.\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 불린 배열\nconst booleans = [true, false];\nconst randomBoolean = sample(booleans);\n// Returns: true 또는 false\n\n// 혼합 타입 배열\nconst mixed = [1, 'hello', { key: 'value' }, [1, 2, 3]];\nconst randomItem = sample(mixed);\n// Returns: 배열에 있는 요소 중 아무거나\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 무작위로 요소를 선택할 배열이에요.\n\n#### 반환 값\n\n(`T`): 배열에서 무작위로 선택된 요소예요.\n"
  },
  {
    "path": "docs/ko/reference/array/sampleSize.md",
    "content": "# sampleSize\n\n배열에서 지정된 크기만큼 무작위로 선택된 요소들로 이루어진 새 배열을 반환해요.\n\n```typescript\nconst sampled = sampleSize(array, size);\n```\n\n## 사용법\n\n### `sampleSize(array, size)`\n\n배열에서 여러 개의 요소를 무작위로 샘플링하고 싶을 때 `sampleSize`를 사용하세요. Floyd의 알고리즘을 사용해서 효율적으로 중복 없는 랜덤 샘플을 생성해요. 설문조사에서 표본을 추출하거나, 게임에서 여러 아이템을 랜덤하게 선택할 때 유용해요.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\n// 숫자 배열에서 3개를 무작위로 선택해요.\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst randomNumbers = sampleSize(numbers, 3);\n// Returns: [2, 7, 9] (예시, 실제로는 무작위)\n\n// 문자열 배열에서 2개를 무작위로 선택해요.\nconst fruits = ['apple', 'banana', 'cherry', 'date', 'elderberry'];\nconst randomFruits = sampleSize(fruits, 2);\n// Returns: ['cherry', 'apple'] (예시, 실제로는 무작위)\n```\n\n다양한 크기로 샘플링할 수 있어요.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\n\n// 1개 선택\nconst single = sampleSize(items, 1);\n// Returns: ['c'] (예시)\n\n// 전체 배열 크기와 같게 선택 (섞은 효과)\nconst all = sampleSize(items, 5);\n// Returns: ['b', 'd', 'a', 'e', 'c'] (예시)\n\n// 빈 배열 선택\nconst none = sampleSize(items, 0);\n// Returns: []\n```\n\n#### 파라미터\n\n- `array` (`readonly T[]`): 샘플링할 배열이에요.\n- `size` (`number`): 선택할 요소의 개수예요.\n\n#### 반환 값\n\n(`T[]`): 무작위로 선택된 요소들로 구성된 새 배열을 반환해요.\n\n#### 에러\n\n`size`가 배열의 길이보다 크면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/array/shuffle.md",
    "content": "# shuffle\n\n배열의 요소 순서를 무작위로 섞은 새 배열을 반환해요.\n\n```typescript\nconst shuffled = shuffle(arr);\n```\n\n## 사용법\n\n### `shuffle(arr)`\n\n배열의 요소들을 무작위로 섞고 싶을 때 `shuffle`을 사용하세요. Fisher-Yates 알고리즘을 사용해서 모든 순열이 동일한 확률로 나타나도록 완벽한 무작위 섞기를 보장해요. 카드 게임에서 덱을 섞거나, 퀴즈 문제 순서를 랜덤화하거나, 플레이리스트를 셔플할 때 유용해요.\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// 숫자 배열을 섞어요.\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffledNumbers = shuffle(numbers);\n// Returns: [3, 1, 4, 5, 2] (예시, 실제로는 무작위)\nconsole.log(numbers); // [1, 2, 3, 4, 5] (원본은 변경되지 않음)\n\n// 문자열 배열을 섞어요.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffledFruits = shuffle(fruits);\n// Returns: ['cherry', 'apple', 'date', 'banana'] (예시, 실제로는 무작위)\n```\n\n다양한 타입의 배열을 섞을 수 있어요.\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// 객체 배열을 섞어요.\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst shuffledUsers = shuffle(users);\n// Returns: 사용자 객체들이 무작위 순서로 섞인 새 배열\n\n// 혼합 타입 배열을 섞어요.\nconst mixed = [1, 'hello', true, { key: 'value' }];\nconst shuffledMixed = shuffle(mixed);\n// Returns: 요소들이 무작위 순서로 섞인 새 배열\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 섞을 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 요소들이 무작위 순서로 섞인 새 배열을 반환해요. 원본 배열은 변경되지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/array/sortBy.md",
    "content": "# sortBy\n\n주어진 기준에 따라 객체 배열을 오름차순으로 정렬한 새 배열을 반환해요.\n\n```typescript\nconst sorted = sortBy(arr, criteria);\n```\n\n## 사용법\n\n### `sortBy(arr, criteria)`\n\n객체 배열을 여러 속성이나 계산된 값을 기준으로 정렬하고 싶을 때 `sortBy`를 사용하세요. 속성 이름이나 변환 함수를 배열로 제공하면, 해당 순서대로 우선순위를 두고 오름차순으로 정렬해요. 테이블 데이터를 정렬하거나 복잡한 정렬 로직이 필요할 때 유용해요.\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 단일 속성으로 정렬해요.\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 35 },\n];\nconst byAge = sortBy(users, ['age']);\n// Returns: [{ name: 'jane', age: 25 }, { name: 'john', age: 30 }, { name: 'bob', age: 35 }]\n\n// 여러 속성으로 정렬해요.\nconst employees = [\n  { name: 'john', department: 'engineering', age: 30 },\n  { name: 'jane', department: 'hr', age: 25 },\n  { name: 'bob', department: 'engineering', age: 35 },\n  { name: 'alice', department: 'engineering', age: 25 },\n];\nconst sorted = sortBy(employees, ['department', 'age']);\n// Returns: 부서 먼저, 그 다음 나이 순으로 정렬\n// [\n//   { name: 'alice', department: 'engineering', age: 25 },\n//   { name: 'john', department: 'engineering', age: 30 },\n//   { name: 'bob', department: 'engineering', age: 35 },\n//   { name: 'jane', department: 'hr', age: 25 }\n// ]\n```\n\n함수를 사용해서 복잡한 정렬 기준을 만들 수 있어요.\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 함수와 속성을 섞어서 사용해요.\nconst products = [\n  { name: 'laptop', price: 1000, category: 'electronics' },\n  { name: 'shirt', price: 50, category: 'clothing' },\n  { name: 'phone', price: 800, category: 'electronics' },\n];\n\nconst sorted = sortBy(products, [\n  'category',\n  item => -item.price, // 가격은 내림차순으로\n]);\n// Returns: 카테고리 먼저, 그 다음 가격 높은 순으로 정렬\n\n// 계산된 값으로 정렬해요.\nconst words = ['hello', 'a', 'wonderful', 'world'];\nconst byLength = sortBy(\n  words.map(word => ({ word, length: word.length })),\n  ['length']\n);\n// Returns: 문자열 길이 순으로 정렬된 객체 배열\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 정렬할 객체 배열이에요.\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): 정렬 기준이에요. 객체 속성 이름이나 변환 함수의 배열로, 앞에 있는 기준이 우선순위가 높아요.\n\n#### 반환 값\n\n(`T[]`): 지정된 기준에 따라 오름차순으로 정렬된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/tail.md",
    "content": "# tail\n\n배열의 첫 번째 요소를 제외한 모든 요소로 이루어진 새 배열을 반환해요.\n\n```typescript\nconst result = tail(arr);\n```\n\n## 사용법\n\n### `tail(arr)`\n\n배열에서 첫 번째 요소만 제외하고 나머지 모든 요소를 가져오고 싶을 때 `tail`을 사용하세요. 배열이 비어있거나 요소가 하나뿐이면 빈 배열을 반환해요. 스택이나 큐에서 첫 번째 요소를 제외한 나머지를 처리할 때 유용해요.\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 숫자 배열에서 첫 번째 요소를 제외해요.\nconst numbers = [1, 2, 3, 4, 5];\ntail(numbers);\n// Returns: [2, 3, 4, 5]\n\n// 문자열 배열에서 첫 번째 요소를 제외해요.\nconst strings = ['first', 'second', 'third'];\ntail(strings);\n// Returns: ['second', 'third']\n\n// 요소가 하나뿐인 배열은 빈 배열을 반환해요.\nconst single = [42];\ntail(single);\n// Returns: []\n```\n\n빈 배열이나 특수한 경우도 안전하게 처리해요.\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 빈 배열은 빈 배열을 반환해요.\nconst empty: number[] = [];\ntail(empty);\n// Returns: []\n\n// 중첩 배열도 처리할 수 있어요.\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ntail(nested);\n// Returns: [[3, 4], [5, 6]]\n\n// 객체 배열도 처리할 수 있어요.\nconst users = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\ntail(users);\n// Returns: [{ id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 첫 번째 요소를 제외할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 첫 번째 요소를 제외한 새 배열을 반환해요. 입력 배열이 비어있거나 요소가 하나뿐이면 빈 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/take.md",
    "content": "# take\n\n배열의 처음부터 지정한 개수만큼 요소를 가져와 새 배열을 만들어요.\n\n```typescript\nconst taken = take(arr, count);\n```\n\n## 사용법\n\n### `take(arr, count?)`\n\n배열의 앞에서 몇 개의 요소만 필요할 때 `take`를 사용하세요. 요청한 개수가 배열 길이보다 크면 전체 배열을 반환해요.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\n// 처음 3개의 요소를 가져와요.\ntake([1, 2, 3, 4, 5], 3);\n// Returns: [1, 2, 3]\n\n// 처음 2개의 요소를 가져와요.\ntake(['a', 'b', 'c'], 2);\n// Returns: ['a', 'b']\n```\n\n배열보다 많은 개수를 요청하면 전체 배열을 반환해요.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n`count`를 생략하면 첫 번째 요소만 가져와요.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3]);\n// Returns: [1]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 가져올 배열이에요.\n- `count` (`number`, 선택): 가져올 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 배열의 처음부터 `count`개의 요소를 포함한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/takeRight.md",
    "content": "# takeRight\n\n배열의 끝에서 지정한 개수만큼 요소를 가져와 새 배열을 만들어요.\n\n```typescript\nconst taken = takeRight(arr, count);\n```\n\n## 사용법\n\n### `takeRight(arr, count?)`\n\n배열의 끝에서 몇 개의 요소만 필요할 때 `takeRight`를 사용하세요. 요청한 개수가 배열 길이보다 크면 전체 배열을 반환해요.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\n// 마지막 2개의 요소를 가져와요.\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 마지막 2개의 요소를 가져와요.\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n```\n\n배열보다 많은 개수를 요청하면 전체 배열을 반환해요.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n`count`를 생략하면 마지막 요소만 가져와요.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3]);\n// Returns: [3]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 가져올 배열이에요.\n- `count` (`number`, 선택): 가져올 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 배열의 끝에서 `count`개의 요소를 포함한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/takeRightWhile.md",
    "content": "# takeRightWhile\n\n조건 함수가 참을 반환하는 동안 배열의 끝에서부터 요소들을 가져와서 새 배열을 반환해요.\n\n```typescript\nconst result = takeRightWhile(arr, shouldContinueTaking);\n```\n\n## 사용법\n\n### `takeRightWhile(arr, shouldContinueTaking)`\n\n배열의 끝에서부터 조건을 만족하는 요소들을 가져오고 싶을 때 `takeRightWhile`을 사용하세요. 조건 함수가 거짓을 반환하는 첫 번째 요소를 만나면 멈춰요.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/array';\n\n// 4보다 작은 숫자들을 끝에서부터 가져와요\ntakeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n// 결과: [3, 2, 1]\n\n// 3보다 큰 숫자들을 끝에서부터 가져와요\ntakeRightWhile([1, 2, 3], n => n > 3);\n// 결과: []\n\n// 문자열 길이가 5 이하인 요소들을 가져와요\ntakeRightWhile(['hello', 'world', 'foo', 'bar'], str => str.length <= 5);\n// 결과: ['hello', 'world', 'foo', 'bar']\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 가져올 배열이에요.\n- `shouldContinueTaking` (`(item: T, index: number, array: T[]) => boolean`): 각 요소, 인덱스, 배열과 함께 호출되는 조건 함수예요. 이 함수가 참을 반환하는 동안 요소들이 결과에 포함돼요.\n\n#### 반환 값\n\n(`T[]`): 조건 함수가 참을 반환하는 동안 배열의 끝에서부터 가져온 요소들을 포함하는 새 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/takeWhile.md",
    "content": "# takeWhile\n\n조건 함수가 참을 반환하는 동안 배열의 처음부터 요소를 가져와 새 배열을 만들어요.\n\n```typescript\nconst taken = takeWhile(arr, predicate);\n```\n\n## 사용법\n\n### `takeWhile(arr, predicate)`\n\n배열의 처음부터 특정 조건을 만족하는 요소들만 필요할 때 `takeWhile`을 사용하세요. 조건을 만족하지 않는 첫 번째 요소를 만나면 가져오기를 멈춰요.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\n// 3보다 작은 요소들만 가져와요.\ntakeWhile([1, 2, 3, 4], x => x < 3);\n// Returns: [1, 2]\n\n// 3보다 큰 요소는 처음부터 없으므로 빈 배열을 반환해요.\ntakeWhile([1, 2, 3, 4], x => x > 3);\n// Returns: []\n```\n\n객체 배열에서도 사용할 수 있어요.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n  { name: 'David', age: 40 },\n];\n\n// 30세 미만의 사용자들만 가져와요.\ntakeWhile(users, user => user.age < 30);\n// Returns: [{ name: 'Alice', age: 25 }]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 요소를 가져올 배열이에요.\n- `predicate` (`(element: T, index: number, array: T[]) => boolean`): 각 요소, 인덱스, 배열과 함께 호출되는 조건 함수예요. 이 함수가 참을 반환하는 동안 요소들을 가져와요.\n\n#### 반환 값\n\n(`T[]`): 조건 함수가 참을 반환하는 동안 처음부터 가져온 요소들을 포함한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/toFilled.md",
    "content": "# toFilled\n\n배열의 일부 또는 전체를 지정한 값으로 채워 새 배열을 만들어요.\n\n```typescript\nconst filled = toFilled(arr, value, start?, end?);\n```\n\n## 사용법\n\n### `toFilled(arr, value, start?, end?)`\n\n배열의 특정 범위를 지정한 값으로 채우고 싶을 때 `toFilled`를 사용하세요. 원본 배열을 수정하지 않고 새 배열을 만들어 반환해요.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 인덱스 2부터 끝까지 '*'로 채워요.\ntoFilled(array, '*', 2);\n// Returns: [1, 2, '*', '*', '*']\n\n// 인덱스 1부터 4 전까지 '*'로 채워요.\ntoFilled(array, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n시작과 끝 위치를 생략하면 전체 배열을 채워요.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\ntoFilled(array, '*');\n// Returns: ['*', '*', '*', '*', '*']\n```\n\n음수 인덱스를 사용할 수도 있어요. 배열의 끝에서부터 계산해요.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 뒤에서 4번째부터 뒤에서 1번째 전까지 '*'로 채워요.\ntoFilled(array, '*', -4, -1);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n#### 파라미터\n\n- `arr` (`T[]`): 기반이 되는 원본 배열이에요.\n- `value` (`U`): 배열을 채울 값이에요.\n- `start` (`number`, 선택): 채우기 시작 위치예요. 기본값은 `0`이에요.\n- `end` (`number`, 선택): 채우기 끝 위치예요. 기본값은 배열의 길이예요.\n\n#### 반환 값\n\n(`Array<T | U>`): 지정된 범위가 값으로 채워진 새 배열을 반환해요. 원본 배열은 수정되지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/array/union.md",
    "content": "# union\n\n두 배열의 모든 고유한 요소를 포함하는 새 배열을 만들어요.\n\n```typescript\nconst unified = union(arr1, arr2);\n```\n\n## 사용법\n\n### `union(arr1, arr2)`\n\n여러 배열에서 중복 없이 모든 요소를 하나로 합치고 싶을 때 `union`을 사용하세요. 두 배열을 합친 후 중복된 값을 제거한 새 배열을 반환해요.\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\n// 숫자 배열의 합집합을 구해요.\nconst array1 = [1, 2, 3];\nconst array2 = [3, 4, 5];\nunion(array1, array2);\n// Returns: [1, 2, 3, 4, 5]\n\n// 문자열 배열의 합집합을 구해요.\nconst fruits1 = ['apple', 'banana'];\nconst fruits2 = ['banana', 'orange'];\nunion(fruits1, fruits2);\n// Returns: ['apple', 'banana', 'orange']\n```\n\n첫 번째 배열의 요소가 먼저 나오고, 그 다음에 두 번째 배열의 고유한 요소가 추가돼요.\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = [2, 3, 4, 5];\nunion(arr1, arr2);\n// Returns: [1, 2, 3, 4, 5]\n// 1, 2, 3은 arr1에서, 4, 5는 arr2에서 온 요소에요.\n```\n\n#### 파라미터\n\n- `arr1` (`T[]`): 합칠 첫 번째 배열이에요.\n- `arr2` (`T[]`): 합칠 두 번째 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 두 배열의 모든 고유한 요소를 포함한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/unionBy.md",
    "content": "# unionBy\n\n특정 함수로 바꾼 값을 기준으로 두 배열의 고유한 요소를 포함하는 새 배열을 만들어요.\n\n```typescript\nconst unified = unionBy(arr1, arr2, mapper);\n```\n\n## 사용법\n\n### `unionBy(arr1, arr2, mapper)`\n\n객체 배열에서 특정 속성을 기준으로 중복을 제거하고 싶을 때 `unionBy`를 사용하세요. `mapper` 함수가 반환하는 값이 같으면 동일한 요소로 처리돼요.\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\n// id를 기준으로 객체들의 합집합을 구해요.\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nunionBy(users1, users2, user => user.id);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n\n// 숫자를 3으로 나눈 나머지를 기준으로 합집합을 구해요.\nconst nums1 = [1, 2, 3];\nconst nums2 = [4, 5, 6];\nunionBy(nums1, nums2, x => x % 3);\n// Returns: [1, 2, 3]\n// 1 % 3 = 1, 2 % 3 = 2, 3 % 3 = 0이고,\n// 4 % 3 = 1, 5 % 3 = 2, 6 % 3 = 0이므로 모두 중복돼요.\n```\n\n사용자 정의 비교 함수를 사용해서 복잡한 기준으로도 합집합을 구할 수 있어요.\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\nconst products1 = [\n  { category: 'electronics', price: 100 },\n  { category: 'books', price: 20 },\n];\nconst products2 = [\n  { category: 'electronics', price: 150 },\n  { category: 'toys', price: 30 },\n];\n\n// 카테고리를 기준으로 합집합을 구해요.\nunionBy(products1, products2, product => product.category);\n// Returns: [\n//   { category: 'electronics', price: 100 },\n//   { category: 'books', price: 20 },\n//   { category: 'toys', price: 30 }\n// ]\n```\n\n#### 파라미터\n\n- `arr1` (`T[]`): 합칠 첫 번째 배열이에요.\n- `arr2` (`T[]`): 합칠 두 번째 배열이에요.\n- `mapper` (`(item: T) => U`): 각 요소를 비교할 값으로 바꾸는 함수예요.\n\n#### 반환 값\n\n(`T[]`): `mapper` 함수가 반환한 값을 기준으로 중복이 제거된 두 배열의 합집합을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/unionWith.md",
    "content": "# unionWith\n\n사용자 정의 동일함수를 기준으로 두 배열의 고유한 요소를 포함하는 새 배열을 만들어요.\n\n```typescript\nconst unified = unionWith(arr1, arr2, areItemsEqual);\n```\n\n## 사용법\n\n### `unionWith(arr1, arr2, areItemsEqual)`\n\n복잡한 조건으로 요소들의 동일함을 판단하고 싶을 때 `unionWith`를 사용하세요. 제공한 함수가 참을 반환하면 두 요소를 같은 것으로 판단해 중복을 제거해요.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// 객체의 id를 기준으로 합집합을 구해요.\nconst array1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst array2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nconst areItemsEqual = (a, b) => a.id === b.id;\nunionWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n더 복잡한 비교 로직도 사용할 수 있어요.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// 좌표를 기준으로 합집합을 구해요.\nconst points1 = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n];\nconst points2 = [\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\nconst arePointsEqual = (p1, p2) => p1.x === p2.x && p1.y === p2.y;\nunionWith(points1, points2, arePointsEqual);\n// Returns: [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 }]\n```\n\n대소문자를 무시한 문자열 비교 예시예요.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\nconst words1 = ['Apple', 'banana'];\nconst words2 = ['BANANA', 'orange'];\nconst areWordsEqual = (a, b) => a.toLowerCase() === b.toLowerCase();\nunionWith(words1, words2, areWordsEqual);\n// Returns: ['Apple', 'banana', 'orange']\n// 'banana'와 'BANANA'는 같은 것으로 판단되어 첫 번째 것만 유지돼요.\n```\n\n#### 파라미터\n\n- `arr1` (`T[]`): 합칠 첫 번째 배열이에요.\n- `arr2` (`T[]`): 합칠 두 번째 배열이에요.\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 두 요소가 같은지 판단하는 함수예요. 같다고 판단되면 `true`를, 아니면 `false`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 사용자 정의 동일함수를 기준으로 중복이 제거된 두 배열의 합집합을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/uniq.md",
    "content": "# uniq\n\n배열에서 중복된 요소들을 제거한 새로운 배열을 반환해요.\n\n```typescript\nconst uniqueArray = uniq(arr);\n```\n\n## 사용법\n\n### `uniq(arr)`\n\n배열에서 중복된 값들을 제거하고 고유한 값들만 남기고 싶을 때 `uniq`를 사용하세요. 원본 배열에서 처음 나타나는 순서를 유지해요.\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\n// 숫자 배열에서 중복을 제거해요.\nconst numbers = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueNumbers = uniq(numbers);\nconsole.log(uniqueNumbers); // [1, 2, 3, 4, 5]\n\n// 문자열 배열에서 중복을 제거해요.\nconst words = ['apple', 'banana', 'apple', 'cherry', 'banana'];\nconst uniqueWords = uniq(words);\nconsole.log(uniqueWords); // ['apple', 'banana', 'cherry']\n\n// 객체 배열에서 참조가 같은 객체를 제거해요.\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj1, obj3, obj2];\nconst uniqueObjects = uniq(objects);\nconsole.log(uniqueObjects); // [{ id: 1 }, { id: 2 }, { id: 3 }]\n```\n\n빈 배열에서는 빈 배열을 반환해요.\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\nconst emptyArray = uniq([]);\nconsole.log(emptyArray); // []\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 중복을 제거할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 중복이 제거된 새로운 배열이에요. 원본 배열에서 처음 나타나는 순서를 유지해요.\n"
  },
  {
    "path": "docs/ko/reference/array/uniqBy.md",
    "content": "# uniqBy\n\n변환 함수가 반환하는 값을 기준으로 배열에서 중복된 요소들을 제거한 새로운 배열을 반환해요.\n\n```typescript\nconst uniqueArray = uniqBy(arr, mapper);\n```\n\n## 사용법\n\n### `uniqBy(arr, mapper)`\n\n배열의 요소들을 특정 기준으로 변환해서 중복을 판단하고 싶을 때 `uniqBy`를 사용하세요. 변환 함수가 같은 값을 반환하는 요소들 중 처음 나타나는 것만 남겨요.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\n// 소수점 숫자들을 내림차순으로 변환해서 중복 제거해요.\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqBy(numbers, Math.floor);\nconsole.log(result); // [1.2, 2.1, 3.2, 5.7, 7.19]\n\n// 객체 배열에서 특정 속성을 기준으로 중복 제거해요.\nconst users = [\n  { id: 1, name: 'john', age: 30 },\n  { id: 2, name: 'jane', age: 30 },\n  { id: 3, name: 'joe', age: 25 },\n  { id: 4, name: 'jenny', age: 25 },\n];\nconst uniqueByAge = uniqBy(users, user => user.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'john', age: 30 }, { id: 3, name: 'joe', age: 25 }]\n\n// 문자열 길이를 기준으로 중복 제거해요.\nconst words = ['apple', 'pie', 'banana', 'cat', 'dog'];\nconst uniqueByLength = uniqBy(words, word => word.length);\nconsole.log(uniqueByLength); // ['apple', 'pie', 'banana']\n```\n\n복잡한 객체에서도 특정 필드의 조합을 기준으로 할 수 있어요.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n  { category: 'fruit', name: 'grape' },\n];\n\n// 카테고리를 기준으로 중복 제거해요.\nconst uniqueByCategory = uniqBy(products, item => item.category);\nconsole.log(uniqueByCategory.length); // 2\nconsole.log(uniqueByCategory);\n// [{ category: 'fruit', name: 'apple' }, { category: 'vegetable', name: 'carrot' }]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 중복을 제거할 배열이에요.\n- `mapper` (`(item: T, index: number, array: readonly T[]) => U`): 각 요소를 비교할 값으로 변환하는 함수예요. 요소, 인덱스, 배열을 인자로 받아요.\n\n#### 반환 값\n\n(`T[]`): 변환 함수의 결과를 기준으로 중복이 제거된 새로운 배열이에요. 원본 배열에서 처음 나타나는 순서를 유지해요.\n"
  },
  {
    "path": "docs/ko/reference/array/uniqWith.md",
    "content": "# uniqWith\n\n비교 함수를 사용해서 배열에서 중복된 요소들을 제거한 새로운 배열을 반환해요.\n\n```typescript\nconst uniqueArray = uniqWith(arr, areItemsEqual);\n```\n\n## 사용법\n\n### `uniqWith(arr, areItemsEqual)`\n\n두 요소가 같은지를 판단하는 사용자 정의 비교 함수를 기준으로 중복을 제거하고 싶을 때 `uniqWith`를 사용하세요. 비교 함수가 `true`를 반환하는 요소들 중 처음 나타나는 것만 남겨요.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\n// 숫자들의 차이가 1 미만인 경우 같은 것으로 취급해서 중복 제거해요.\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqWith(numbers, (a, b) => Math.abs(a - b) < 1);\nconsole.log(result); // [1.2, 3.2, 5.7, 7.19]\n\n// 객체들을 특정 필드를 기준으로 비교해서 중복 제거해요.\nconst users = [\n  { id: 1, name: 'John', age: 30 },\n  { id: 2, name: 'Jane', age: 30 },\n  { id: 3, name: 'Bob', age: 25 },\n];\nconst uniqueByAge = uniqWith(users, (a, b) => a.age === b.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'John', age: 30 }, { id: 3, name: 'Bob', age: 25 }]\n\n// 문자열을 대소문자 구분 없이 비교해서 중복 제거해요.\nconst words = ['Apple', 'APPLE', 'banana', 'Banana', 'cherry'];\nconst uniqueCaseInsensitive = uniqWith(words, (a, b) => a.toLowerCase() === b.toLowerCase());\nconsole.log(uniqueCaseInsensitive); // ['Apple', 'banana', 'cherry']\n```\n\n복잡한 객체 비교도 가능해요.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\nconst products = [\n  { name: 'iPhone', brand: 'Apple', price: 1000 },\n  { name: 'Galaxy', brand: 'Samsung', price: 900 },\n  { name: 'iPhone', brand: 'Apple', price: 1100 }, // 같은 name과 brand\n  { name: 'Pixel', brand: 'Google', price: 800 },\n];\n\n// 이름과 브랜드가 모두 같은 경우 중복으로 판단해요.\nconst uniqueProducts = uniqWith(products, (a, b) => a.name === b.name && a.brand === b.brand);\nconsole.log(uniqueProducts);\n// [\n//   { name: 'iPhone', brand: 'Apple', price: 1000 },\n//   { name: 'Galaxy', brand: 'Samsung', price: 900 },\n//   { name: 'Pixel', brand: 'Google', price: 800 }\n// ]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 중복을 제거할 배열이에요.\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 두 요소가 같은지 판단하는 비교 함수예요. 두 요소가 같다면 `true`를, 다르다면 `false`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수를 기준으로 중복이 제거된 새로운 배열이에요. 원본 배열에서 처음 나타나는 순서를 유지해요.\n"
  },
  {
    "path": "docs/ko/reference/array/unzip.md",
    "content": "# unzip\n\n묶여있는 배열들을 풀어서 같은 위치의 요소들끼리 새로운 배열들로 만들어 반환해요.\n\n```typescript\nconst unzippedArrays = unzip(zipped);\n```\n\n## 사용법\n\n### `unzip(zipped)`\n\n여러 개의 배열이 묶여 있는 2차원 배열에서 같은 인덱스에 있는 요소들을 모아서 새로운 배열들을 만들고 싶을 때 `unzip`을 사용하세요. zip의 반대 동작이에요.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\n// 문자열, 참 또는 거짓, 숫자가 묶인 배열을 풀어요.\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n  ['c', true, 3],\n];\nconst result = unzip(zipped);\nconsole.log(result);\n// [['a', 'b', 'c'], [true, false, true], [1, 2, 3]]\n\n// 사용자 정보가 묶인 배열을 풀어요.\nconst users = [\n  ['john', 30, 'engineer'],\n  ['jane', 25, 'designer'],\n  ['bob', 35, 'manager'],\n];\nconst [names, ages, roles] = unzip(users);\nconsole.log(names); // ['john', 'jane', 'bob']\nconsole.log(ages); // [30, 25, 35]\nconsole.log(roles); // ['engineer', 'designer', 'manager']\n```\n\n길이가 다른 배열들도 처리할 수 있어요. 짧은 배열의 경우 `undefined`로 채워져요.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst mixed = [[1, 'a'], [2, 'b', true], [3]];\nconst result = unzip(mixed);\nconsole.log(result);\n// [[1, 2, 3], ['a', 'b', undefined], [undefined, true, undefined]]\n```\n\n빈 배열을 전달하면 빈 배열을 반환해요.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst empty = unzip([]);\nconsole.log(empty); // []\n```\n\n#### 파라미터\n\n- `zipped` (`ReadonlyArray<[...T]>`): 풀어낼 배열들이 묶여있는 2차원 배열이에요.\n\n#### 반환 값\n\n(`Unzip<T>`): 같은 위치의 요소들끼리 묶인 새로운 배열들이에요. 원본 배열들의 길이가 다르면 짧은 배열의 빈 자리는 `undefined`로 채워져요.\n"
  },
  {
    "path": "docs/ko/reference/array/unzipWith.md",
    "content": "# unzipWith\n\n묶여있는 배열들을 풀고, 변환 함수를 적용해서 새로운 배열을 반환해요.\n\n```typescript\nconst transformedArray = unzipWith(target, iteratee);\n```\n\n## 사용법\n\n### `unzipWith(target, iteratee)`\n\n여러 배열이 묶여 있는 2차원 배열에서 같은 위치의 요소들을 모아서 변환 함수를 적용한 결과를 얻고 싶을 때 `unzipWith`를 사용하세요. `unzip`과 비슷하지만 각 그룹의 요소들을 사용자 정의 함수로 변환할 수 있어요.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\n// 같은 위치의 숫자들을 더해요.\nconst numbers = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nconst sums = unzipWith(numbers, (a, b, c) => a + b + c);\nconsole.log(sums); // [9, 12] (1+3+5=9, 2+4+6=12)\n\n// 같은 위치의 문자열들을 연결해요.\nconst words = [\n  ['hello', 'world'],\n  ['foo', 'bar'],\n  ['es', 'toolkit'],\n];\nconst combined = unzipWith(words, (a, b, c) => a + b + c);\nconsole.log(combined); // ['hellofooes', 'worldbartoolkit']\n\n// 객체 배열에서 특정 속성의 평균을 구해요.\nconst scores = [\n  [{ score: 80 }, { score: 90 }],\n  [{ score: 85 }, { score: 95 }],\n  [{ score: 75 }, { score: 88 }],\n];\nconst averages = unzipWith(scores, (a, b, c) => (a.score + b.score + c.score) / 3);\nconsole.log(averages); // [80, 91] (80+85+75)/3, (90+95+88)/3\n```\n\n배열의 길이가 다른 경우에는 undefined가 전달돼요.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst mixed = [\n  [1, 4],\n  [2, 5],\n  [3], // 길이가 다름\n];\nconst result = unzipWith(mixed, (a, b, c) => {\n  // c는 undefined가 될 수 있어요\n  return (a || 0) + (b || 0) + (c || 0);\n});\nconsole.log(result); // [6, 9] (1+2+3, 4+5+0)\n```\n\n빈 배열을 전달하면 오류가 발생합니다.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst empty = unzipWith([], (a, b) => a + b);\nconsole.log(empty); // throws Error\n```\n\n#### 파라미터\n\n- `target` (`readonly T[][]`): 풀고 변환할 배열들이 묶여있는 2차원 배열이에요.\n- `iteratee` (`(...args: T[]) => R`): 같은 위치의 요소들을 받아서 새로운 값으로 변환하는 함수예요.\n\n#### 반환 값\n\n(`R[]`): 변환 함수를 적용한 결과들로 만들어진 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/array/windowed.md",
    "content": "# windowed\n\n지정된 크기의 윈도우가 배열을 따라 일정하게 슬라이딩하면서 각 윈도우의 스냅샷을 담은 새 배열을 반환해요.\n\n```typescript\nconst windows = windowed(arr, size, step?, options?);\n```\n\n## 사용법\n\n### `windowed(arr, size, step?, options?)`\n\n지정된 크기의 윈도우가 배열을 따라 일정하게 슬라이딩하면서 각 윈도우의 스냅샷을 담은 배열을 반환하고 싶을 때 `windowed`를 사용하세요.\n\n시계열 데이터 분석에서 이동 평균을 계산하거나, 문자열에서 n-gram을 추출하거나, 배열에서 특정 패턴을 찾을 때 유용해요. 또한 데이터를 배치 단위로 처리하거나 슬라이딩 윈도우 알고리즘을 구현할 때도 활용할 수 있어요.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\n// 기본 사용법 - 크기 3의 윈도우를 만들어요.\nconst numbers = [1, 2, 3, 4, 5];\nconst result = windowed(numbers, 3);\nconsole.log(result); // [[1, 2, 3], [2, 3, 4], [3, 4, 5]]\n\n// step을 지정해서 윈도우 간격을 조절해요.\nconst data = [1, 2, 3, 4, 5, 6, 7, 8];\nconst stepped = windowed(data, 3, 2);\nconsole.log(stepped); // [[1, 2, 3], [3, 4, 5], [5, 6, 7]]\n\n// 문자열 배열로도 사용할 수 있어요.\nconst words = ['a', 'b', 'c', 'd', 'e'];\nconst wordWindows = windowed(words, 2);\nconsole.log(wordWindows); // [['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']]\n```\n\n부분 윈도우를 포함하고 싶으면 `partialWindows` 옵션을 사용하세요.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst numbers = [1, 2, 3, 4, 5, 6];\n\n// 부분 윈도우 없이 (기본값)\nconst complete = windowed(numbers, 4, 3);\nconsole.log(complete); // [[1, 2, 3, 4]]\n\n// 부분 윈도우 포함\nconst withPartial = windowed(numbers, 4, 3, { partialWindows: true });\nconsole.log(withPartial); // [[1, 2, 3, 4], [4, 5, 6]]\n```\n\n각 스냅샷은 배열 형태로 제공되며, 마지막 몇 개의 배열은 지정된 크기보다 적은 요소를 가질 수 있어요.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst small = [1, 2];\n\n// 윈도우가 배열보다 큰 경우\nconsole.log(windowed(small, 5)); // []\nconsole.log(windowed(small, 5, 1, { partialWindows: true })); // [[1, 2], [2]]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 윈도우를 만들 배열이에요.\n- `size` (`number`): 각 윈도우의 크기예요. 1보다 큰 정수여야 해요.\n- `step` (`number`, 선택): 윈도우 간의 간격이에요. 1보다 큰 정수여야 하고, 기본값은 `1`이에요.\n- `options.partialWindows` (`boolean`, 선택): 배열 끝에서 완전하지 않은 윈도우도 포함할지 여부예요. 기본값은 `false`예요.\n\n#### 반환 값\n\n(`T[][]`): 지정된 크기와 간격으로 만들어진 윈도우들의 배열이에요.\n\n#### 에러\n\n- `size`나 `step`이 양의 정수가 아닌 경우 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/array/without.md",
    "content": "# without\n\n배열에서 특정 값들을 제외한 새 배열을 만들어요.\n\n```typescript\nconst filtered = without(arr, ...values);\n```\n\n## 사용법\n\n### `without(arr, ...values)`\n\n배열에서 원하지 않는 특정 값들을 제거하고 싶을 때 `without`을 사용하세요. 원본 배열은 수정되지 않고, 지정한 값들이 제거된 새 배열이 반환돼요.\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\n// 숫자 배열에서 특정 값들을 제거해요.\nwithout([1, 2, 3, 4, 5], 2, 4);\n// Returns: [1, 3, 5]\n\n// 문자열 배열에서 특정 값을 제거해요.\nwithout(['a', 'b', 'c', 'a'], 'a');\n// Returns: ['b', 'c']\n```\n\n`NaN` 값도 올바르게 처리해요.\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\nwithout([1, NaN, 3, NaN, 5], NaN);\n// Returns: [1, 3, 5]\n```\n\n#### 파라미터\n\n- `arr` (`readonly T[]`): 값들을 제거할 배열이에요.\n- `values` (`...T[]`): 배열에서 제거할 값들이에요.\n\n#### 반환 값\n\n(`T[]`): 지정된 값들이 제거된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/xor.md",
    "content": "# xor\n\n두 배열 중 하나에만 있는 요소들로 새 배열을 만들어요.\n\n```typescript\nconst result = xor(arr1, arr2);\n```\n\n## 사용법\n\n### `xor(arr1, arr2)`\n\n두 배열의 대칭 차집합을 구하고 싶을 때 `xor`를 사용하세요. 두 배열 중 하나에만 있고 교집합에는 없는 요소들로 구성된 새 배열을 반환해요.\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\n// 숫자 배열의 대칭 차집합을 구해요.\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// 문자열 배열의 대칭 차집합을 구해요.\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n```\n\n중복된 요소는 자동으로 제거돼요.\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\nxor([1, 2, 2, 3], [3, 4, 4, 5]);\n// Returns: [1, 2, 4, 5]\n```\n\n#### 파라미터\n\n- `arr1` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `arr2` (`readonly T[]`): 비교할 두 번째 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 두 배열의 대칭 차집합을 나타내는 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/xorBy.md",
    "content": "# xorBy\n\n주어진 함수로 각 요소를 바꾼 값을 기준으로, 두 배열 중 하나에만 있는 요소들로 새 배열을 만들어요.\n\n```typescript\nconst result = xorBy(arr1, arr2, mapper);\n```\n\n## 사용법\n\n### `xorBy(arr1, arr2, mapper)`\n\n두 배열의 요소를 특정 기준으로 비교해서 대칭 차집합을 구하고 싶을 때 `xorBy`를 사용하세요. 각 요소를 매핑 함수로 변환한 후, 두 배열 중 하나에만 있는 요소들로 새 배열을 만들어요.\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\n// 객체의 id로 대칭 차집합을 구해요.\nxorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], obj => obj.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 문자열의 길이로 대칭 차집합을 구해요.\nxorBy(['apple', 'banana'], ['grape', 'cherry', 'apple'], str => str.length);\n// Returns: [] (모든 길이가 중복된 요소들)\n```\n\n매핑 함수의 결과가 같은 요소는 하나로 취급해요.\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\nxorBy([1, 2, 3, 4], [3, 4, 5, 6], n => n % 3);\n// Returns: [] (모든 나머지가 중복된 요소들)\n```\n\n#### 파라미터\n\n- `arr1` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `arr2` (`readonly T[]`): 비교할 두 번째 배열이에요.\n- `mapper` (`(item: T) => U`): 각 요소를 비교 가능한 값으로 바꾸는 함수예요.\n\n#### 반환 값\n\n(`T[]`): 매핑 함수의 결과를 기준으로 계산된 대칭 차집합을 나타내는 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/xorWith.md",
    "content": "# xorWith\n\n주어진 비교 함수를 사용해서, 두 배열 중 하나에만 있는 요소들로 새 배열을 만들어요.\n\n```typescript\nconst result = xorWith(arr1, arr2, areElementsEqual);\n```\n\n## 사용법\n\n### `xorWith(arr1, arr2, areElementsEqual)`\n\n복잡한 객체나 특별한 비교 조건으로 대칭 차집합을 구하고 싶을 때 `xorWith`를 사용하세요. 사용자가 정의한 동등성 함수로 요소들을 비교해서, 두 배열 중 하나에만 있는 요소들로 새 배열을 만들어요.\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// 객체의 id로 비교해요.\nxorWith(\n  [\n    { id: 1, name: 'Alice' },\n    { id: 2, name: 'Bob' },\n  ],\n  [\n    { id: 2, name: 'Bobby' },\n    { id: 3, name: 'Charlie' },\n  ],\n  (a, b) => a.id === b.id\n);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 3, name: 'Charlie' }]\n\n// 대소문자를 무시하고 비교해요.\nxorWith(['Apple', 'Banana'], ['APPLE', 'Cherry'], (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Banana', 'Cherry']\n```\n\n더 복잡한 비교도 가능해요.\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// 절댓값으로 비교해요.\nxorWith([-1, -2, 3], [1, 2, -4], (a, b) => Math.abs(a) === Math.abs(b));\n// Returns: [3, -4]\n\n// 깊은 객체 비교를 해요.\nxorWith(\n  [{ specs: { ram: 8, storage: 256 } }],\n  [{ specs: { ram: 8, storage: 256 } }],\n  (a, b) => a.specs.ram === b.specs.ram && a.specs.storage === b.specs.storage\n);\n// Returns: []\n```\n\n#### 파라미터\n\n- `arr1` (`readonly T[]`): 비교할 첫 번째 배열이에요.\n- `arr2` (`readonly T[]`): 비교할 두 번째 배열이에요.\n- `areElementsEqual` (`(item1: T, item2: T) => boolean`): 두 요소가 같은지 판단하는 함수예요. 같으면 `true`, 다르면 `false`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 사용자 정의 동등성 함수를 기준으로 계산된 대칭 차집합을 나타내는 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/zip.md",
    "content": "# zip\n\n여러 배열을 각 배열의 같은 인덱스 요소들을 묶은 튜플의 배열로 만들어요.\n\n```typescript\nconst zipped = zip(...arrs);\n```\n\n## 사용법\n\n### `zip(...arrs)`\n\n여러 배열의 같은 위치에 있는 요소들을 하나로 묶고 싶을 때 `zip`을 사용하세요. 각 배열의 같은 인덱스에 있는 요소들을 튜플로 묶어서 새 배열을 반환해요.\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\n// 두 배열을 묶어요.\nzip([1, 2, 3], ['a', 'b', 'c']);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 세 배열을 묶어요.\nzip([1, 2], ['a', 'b', 'c'], [true, false]);\n// Returns: [[1, 'a', true], [2, 'b', false], [undefined, 'c', undefined]]\n```\n\n배열의 길이가 다르면 가장 긴 배열의 길이에 맞춰져요. 짧은 배열의 빈 자리는 `undefined`로 채워져요.\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\nzip([1, 2], ['a', 'b', 'c', 'd']);\n// Returns: [[1, 'a'], [2, 'b'], [undefined, 'c'], [undefined, 'd']]\n```\n\n#### 파라미터\n\n- `arrs` (`Array<readonly T[]>`): 묶을 배열들이에요.\n\n#### 반환 값\n\n(`T[][]`): 각 입력 배열의 해당 인덱스 요소들을 튜플로 묶은 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/zipObject.md",
    "content": "# zipObject\n\n키 배열과 값 배열을 받아서 하나의 객체로 만들어요.\n\n```typescript\nconst object = zipObject(keys, values);\n```\n\n## 사용법\n\n### `zipObject(keys, values)`\n\n배열 두 개를 하나의 객체로 합치고 싶을 때 `zipObject`를 사용하세요. 첫 번째 배열의 요소가 키가 되고, 두 번째 배열의 요소가 값이 되는 새 객체를 반환해요.\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\n// 키와 값을 객체로 만들어요.\nzipObject(['a', 'b', 'c'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 키가 더 많으면 undefined가 값이 돼요.\nzipObject(['a', 'b', 'c', 'd'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3, d: undefined }\n```\n\n값 배열이 더 길면 초과하는 값들은 무시돼요.\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\nzipObject(['a', 'b'], [1, 2, 3, 4]);\n// Returns: { a: 1, b: 2 }\n```\n\n#### 파라미터\n\n- `keys` (`readonly P[]`): 객체의 키가 될 배열이에요.\n- `values` (`readonly V[]`): 각 키에 대응하는 값 배열이에요.\n\n#### 반환 값\n\n(`Record<P, V>`): 키와 값이 결합된 새 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/array/zipWith.md",
    "content": "# zipWith\n\n여러 배열을 사용자 정의 함수로 결합해서 새 배열을 만들어요.\n\n```typescript\nconst result = zipWith(...arrs, combine);\n```\n\n## 사용법\n\n### `zipWith(...arrs, combine)`\n\n여러 배열의 같은 위치 요소들을 원하는 방식으로 결합하고 싶을 때 `zipWith`를 사용하세요. 각 배열의 같은 인덱스 요소들을 결합 함수에 전달해서, 그 결과로 새 배열을 만들어요.\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\n// 두 숫자 배열을 더해요.\nzipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// 문자열을 결합해요.\nzipWith(['a', 'b'], ['c', 'd'], ['e', 'f'], (a, b, c) => `${a}${b}${c}`);\n// Returns: ['ace', 'bdf']\n```\n\n배열의 길이가 다르면 가장 긴 배열의 길이에 맞춰져요. 짧은 배열의 빈 자리는 `undefined`로 전달돼요.\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\nzipWith([1, 2], [10, 20, 30], (a, b) => (a ?? 0) + (b ?? 0));\n// Returns: [11, 22, 30]\n```\n\n#### 파라미터\n\n- `arrs` (`Array<readonly T[]>`): 결합할 배열들이에요.\n- `combine` (`(...items: [...T[], number]) => R`): 각 배열의 해당 인덱스 요소들과 인덱스 자체를 받아서 새 값을 반환하는 함수예요.\n\n#### 반환 값\n\n(`R[]`): 결합 함수를 적용한 결과로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/castArray.md",
    "content": "# castArray (Lodash 호환성)\n\n::: warning `Array.from()` 또는 배열 리터럴(`[value]`)을 사용하세요\n\n이 `castArray` 함수는 인자가 없을 때와 `undefined` 처리 등으로 인해 복잡하게 동작해요.\n\n대신 더 명확하고 현대적인 `Array.from()`이나 조건부 배열 생성(`Array.isArray(value) ? value : [value]`)을 사용하세요.\n\n:::\n\n값이 배열이 아닌 경우 배열로 변환해서 반환해요.\n\n```typescript\nconst result = castArray(value);\n```\n\n## 사용법\n\n### `castArray(value?)`\n\n어떤 값이든 배열로 만들고 싶을 때 `castArray`를 사용하세요. 값이 이미 배열이면 그대로 반환하고, 배열이 아니면 그 값을 포함하는 새 배열을 만들어요.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\n// 숫자를 배열로 변환해요\ncastArray(1);\n// Returns: [1]\n\n// 문자열을 배열로 변환해요\ncastArray('hello');\n// Returns: ['hello']\n\n// 객체를 배열로 변환해요\ncastArray({ a: 1 });\n// Returns: [{ a: 1 }]\n```\n\n이미 배열인 값은 그대로 반환해요.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray([1, 2, 3]);\n// Returns: [1, 2, 3]\n\ncastArray(['a', 'b']);\n// Returns: ['a', 'b']\n```\n\n`null`이나 `undefined`도 배열로 변환해요.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray(null);\n// Returns: [null]\n\ncastArray(undefined);\n// Returns: [undefined]\n```\n\n인자가 없으면 빈 배열을 반환해요.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray();\n// Returns: []\n```\n\n#### 파라미터\n\n- `value` (`T | readonly T[]`, 선택): 배열로 변환할 값이에요. 인자가 없으면 빈 배열을 반환해요.\n\n#### 반환 값\n\n(`T[]`): 입력값이 배열이면 그 배열을, 아니면 입력값을 포함하는 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/chunk.md",
    "content": "# chunk (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`chunk`](../../array/chunk.md)를 사용하세요\n\n이 `chunk` 함수는 `null`이나 `undefined` 처리, `size` 기본값 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [chunk](../../array/chunk.md)를 사용하세요.\n\n:::\n\n배열을 정해진 크기의 작은 배열들로 나눠요.\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## 사용법\n\n### `chunk(arr, size?)`\n\n긴 배열을 같은 크기의 여러 작은 배열로 나누고 싶을 때 `chunk`를 사용하세요. 배열을 똑같이 나눌 수 없다면, 마지막 배열이 남은 요소들을 포함해요.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\n// 숫자 배열을 크기 2로 나눠요.\nchunk([1, 2, 3, 4], 2);\n// Returns: [[1, 2], [3, 4]]\n\n// 문자열 배열을 크기 3으로 나눠요.\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n\n// 나누어떨어지지 않는 경우\nchunk([1, 2, 3, 4, 5], 2);\n// Returns: [[1, 2], [3, 4], [5]]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk(null, 2);\n// Returns: []\n\nchunk(undefined, 2);\n// Returns: []\n```\n\n크기가 0이거나 음수면 빈 배열을 반환해요.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0);\n// Returns: []\n\nchunk([1, 2, 3], -1);\n// Returns: []\n```\n\n#### 파라미터\n\n- `arr` (`ArrayLike<T> | null | undefined`): 나눌 배열이에요.\n- `size` (`number`, 선택): 각 작은 배열의 크기예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[][]`): 크기 `size`로 나눠진 2차원 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/compact.md",
    "content": "# compact (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`compact`](../../array/compact.md)를 사용하세요\n\n이 `compact` 함수는 `null`이나 `undefined` 처리, `size` 기본값 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [compact](../../array/compact.md)를 사용하세요.\n\n:::\n\n배열에서 거짓으로 평가되는 값들을 제거해요.\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 사용법\n\n### `compact(arr)`\n\n배열에서 `false`, `null`, `0`, `\"\"`, `undefined`, `NaN` 같은 거짓으로 평가되는 값들을 제거하고 싶을 때 `compact`를 사용하세요.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\n// 거짓으로 평가되는 값들 제거\ncompact([0, 1, false, 2, '', 3]);\n// Returns: [1, 2, 3]\n\ncompact(['a', null, 'b', undefined, 'c', NaN]);\n// Returns: ['a', 'b', 'c']\n\n// 빅인트 0도 제거\ncompact([0n, 1n, false, 2n]);\n// Returns: [1n, 2n]\n\n// 빈 배열도 처리\ncompact([]);\n// Returns: []\n\n// 모든 값이 거짓으로 평가되는 경우\ncompact([false, null, 0, '', undefined, NaN]);\n// Returns: []\n```\n\n참으로 평가되는 값들은 그대로 유지돼요.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact([1, 'hello', true, {}, []]);\n// Returns: [1, 'hello', true, {}, []]\n\n// 0이 아닌 숫자들\ncompact([0, -1, 2, -3]);\n// Returns: [-1, 2, -3]\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact(null);\n// Returns: []\n\ncompact(undefined);\n// Returns: []\n```\n\n#### 파라미터\n\n- `arr` (`ArrayLike<T> | null | undefined`): 압축할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 거짓으로 평가되는 값들이 제거된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/concat.md",
    "content": "# concat (Lodash 호환성)\n\n::: warning 스프레드 연산자 또는 [`Array#concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)를 사용하세요\n\n이 `concat` 함수는 Lodash에서 배열을 연결하는 방식이 복잡해서 비효율적으로 동작해요.\n\n대신 더 직관적이고 현대적인 스프레드 연산자 `[...arr1, ...arr2]`나, `Array#concat`을 활용한 `arr1.concat(arr2)`를 사용하세요.\n\n:::\n\n여러 배열과 값들을 하나의 배열로 합쳐요.\n\n```typescript\nconst result = concat(...values);\n```\n\n## 사용법\n\n### `concat(...values)`\n\n여러 값들과 배열들을 순서대로 연결해서 하나의 새 배열을 만들고 싶을 때 `concat`을 사용하세요. 배열은 펼쳐지고, 개별 값들은 그대로 추가돼요.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 개별 값들을 연결해요\nconcat(1, 2, 3);\n// Returns: [1, 2, 3]\n\n// 배열들을 연결해요\nconcat([1, 2], [3, 4]);\n// Returns: [1, 2, 3, 4]\n\n// 값과 배열을 함께 연결해요\nconcat(1, [2, 3], 4);\n// Returns: [1, 2, 3, 4]\n```\n\n중첩된 배열은 한 단계만 펼쳐져요.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 중첩 배열은 한 단계만 펼쳐져요\nconcat([1, [2, 3]], 4);\n// Returns: [1, [2, 3], 4]\n\n// 더 깊게 중첩된 배열\nconcat([1, [2, [3, 4]]], 5);\n// Returns: [1, [2, [3, 4]], 5]\n```\n\n빈 배열과 빈 값들도 처리해요.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 빈 배열과 함께\nconcat([], [1, 2], [], [3]);\n// Returns: [1, 2, 3]\n\n// 값이 없는 경우\nconcat();\n// Returns: []\n```\n\n#### 파라미터\n\n- `values` (`...(T | readonly T[])`): 연결할 값들과 배열들이에요. 각 배열은 한 단계 펼쳐져요.\n\n#### 반환 값\n\n(`T[]`): 모든 값들과 배열의 요소들이 순서대로 연결된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/countBy.md",
    "content": "# countBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 `countBy`를 사용하세요\n\n이 `countBy` 함수는 복잡한 변환 함수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [countBy](../../array/countBy.md)를 사용하세요.\n\n:::\n\n배열이나 객체의 요소들을 조건에 따라 분류해서 각 분류의 개수를 세어요.\n\n```typescript\nconst counts = countBy(collection, iteratee);\n```\n\n## 사용법\n\n### `countBy(collection, iteratee?)`\n\n배열이나 객체의 각 요소를 어떤 기준으로 그룹화하고, 각 그룹에 몇 개의 요소가 있는지 세고 싶을 때 `countBy`를 사용하세요. 반복자 함수가 반환하는 값이 키가 되고, 그 키에 해당하는 요소들의 개수가 값이 돼요.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 숫자를 소수점 아래 버림으로 그룹화\ncountBy([6.1, 4.2, 6.3], Math.floor);\n// Returns: { '4': 1, '6': 2 }\n\n// 문자열을 길이로 그룹화\ncountBy(['one', 'two', 'three'], 'length');\n// Returns: { '3': 2, '5': 1 }\n\n// 사용자를 나이대로 그룹화\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 35 },\n  { name: 'Charlie', age: 25 },\n];\ncountBy(users, user => Math.floor(user.age / 10) * 10);\n// Returns: { '20': 2, '30': 1 }\n```\n\n객체도 처리할 수 있어요.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 객체의 값들을 타입으로 분류\nconst obj = { a: 1, b: 'string', c: 2, d: 'text' };\ncountBy(obj, value => typeof value);\n// Returns: { 'number': 2, 'string': 2 }\n```\n\n반복자 함수 없이 사용하면 값 자체로 그룹화해요.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 값 자체로 그룹화\ncountBy([1, 2, 1, 3, 2, 1]);\n// Returns: { '1': 3, '2': 2, '3': 1 }\n\n// 불린 값으로 그룹화\ncountBy([true, false, true, true]);\n// Returns: { 'true': 3, 'false': 1 }\n```\n\n`null`이나 `undefined` 컬렉션은 빈 객체를 반환해요.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\ncountBy(null);\n// Returns: {}\n\ncountBy(undefined);\n// Returns: {}\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 처리할 배열이나 객체예요.\n- `iteratee` (`ValueIteratee<T>`, 선택): 각 요소를 그룹화할 기준을 정하는 함수예요. 함수, 프로퍼티 이름, 또는 부분 객체를 사용할 수 있어요.\n\n#### 반환 값\n\n(`Record<string, number>`): 각 그룹의 키와 해당 그룹의 요소 개수를 가진 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/difference.md",
    "content": "# difference (Lodash 호환성)\n\n::: warning `es-toolkit`의 `difference`를 사용하세요\n\n이 `difference` 함수는 `null`이나 `undefined` 처리, 여러 배열 인자 처리로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [difference](../../array/difference.md)를 사용하세요.\n\n:::\n\n첫 번째 배열에서 다른 배열들의 값들을 제외한 차집합을 구해요.\n\n```typescript\nconst result = difference(arr, ...values);\n```\n\n## 사용법\n\n### `difference(arr, ...values)`\n\n첫 번째 배열에서 나머지 배열들에 포함된 값들을 모두 제거하고 싶을 때 `difference`를 사용하세요. 순서는 첫 번째 배열의 순서를 유지해요.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\nconst array3 = [5, 6];\ndifference(array1, array2, array3);\n// Returns: [1, 3]\n\n// 문자열 배열\ndifference(['a', 'b', 'c'], ['b'], ['c', 'd']);\n// Returns: ['a']\n\n// 중복된 값 처리\ndifference([1, 2, 2, 3], [2]);\n// Returns: [1, 3]\n```\n\n빈 배열이나 빈 차집합도 처리해요.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 빈 배열과의 차집합\ndifference([1, 2, 3], []);\n// Returns: [1, 2, 3]\n\n// 모든 값이 제외되는 경우\ndifference([1, 2, 3], [1, 2, 3]);\n// Returns: []\n\n// 겹치는 값이 없는 경우\ndifference([1, 2], [3, 4]);\n// Returns: [1, 2]\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\ndifference(null, [1, 2]);\n// Returns: []\n\ndifference(undefined, [1, 2]);\n// Returns: []\n\ndifference([1, 2, 3], null, undefined);\n// Returns: [1, 2, 3] (null과 undefined는 무시됨)\n```\n\n유사 배열 객체도 지원해요.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 유사 배열 객체\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 4, length: 2 };\ndifference(arrayLike1, arrayLike2);\n// Returns: [1, 3]\n```\n\n#### 파라미터\n\n- `arr` (`ArrayLike<T> | null | undefined`): 차집합을 구할 기준 배열이에요.\n- `values` (`...ArrayLike<T>[]`): 제외할 값들을 포함한 배열들이에요.\n\n#### 반환 값\n\n(`T[]`): 첫 번째 배열에서 다른 배열들의 값들을 제외한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/differenceBy.md",
    "content": "# differenceBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 `differenceBy`를 사용하세요\n\n이 `differenceBy` 함수는 복잡한 인자 처리와 반복자 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [differenceBy](../../array/differenceBy.md)를 사용하세요.\n\n:::\n\n반복자 함수로 변환한 값들을 기준으로 첫 번째 배열에서 다른 배열들의 요소를 제외한 차집합을 구해요.\n\n```typescript\nconst result = differenceBy(array, ...values, iteratee);\n```\n\n## 사용법\n\n### `differenceBy(array, ...values, iteratee)`\n\n첫 번째 배열의 각 요소와 제외할 배열들의 요소들을 반복자 함수로 변환한 후, 같은 값이 나오는 요소들을 제거하고 싶을 때 `differenceBy`를 사용하세요. 객체 배열에서 특정 프로퍼티 값이나 변환된 값을 기준으로 비교할 때 유용해요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 소수점 버림으로 비교\ndifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n// Returns: [1.2] (Math.floor(2.1) === Math.floor(2.3)이므로 2.1 제외)\n\n// 문자열 길이로 비교\ndifferenceBy(['one', 'two', 'three'], ['four', 'eight'], 'length');\n// Returns: ['one', 'two'] (three와 eight은 길이가 같으므로 three 제외)\n\n// 객체의 프로퍼티로 비교\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [{ id: 1, name: 'Different Alice' }];\ndifferenceBy(users1, users2, 'id');\n// Returns: [{ id: 2, name: 'Bob' }] (id가 1인 객체 제외)\n```\n\n여러 배열을 한 번에 제외할 수 있어요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 여러 배열에서 제외\ndifferenceBy([2.1, 1.2, 3.5], [2.3], [1.4], [3.2], Math.floor);\n// Returns: [] (모든 요소가 제외됨)\n\n// 문자열 배열에서 길이로 비교\ndifferenceBy(['a', 'bb', 'ccc'], ['x'], ['yy'], ['zzz'], 'length');\n// Returns: [] (길이 1, 2, 3 모두 제외됨)\n```\n\n반복자 함수가 없으면 일반 `difference`처럼 동작해요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 반복자 함수 없이 사용\ndifferenceBy([1, 2, 3], [2, 4]);\n// Returns: [1, 3]\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\ndifferenceBy(null, [1, 2], Math.floor);\n// Returns: []\n\ndifferenceBy(undefined, [1, 2], x => x);\n// Returns: []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 차집합을 구할 기준 배열이에요.\n- `values` (`...ArrayLike<T>[]`): 제외할 값들을 포함한 배열들이에요.\n- `iteratee` (`ValueIteratee<T>`): 각 요소를 비교할 값으로 변환하는 함수예요. 함수, 프로퍼티 이름, 또는 부분 객체를 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 반복자 함수로 변환한 값들을 기준으로 제외된 요소들을 뺀 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/differenceWith.md",
    "content": "# differenceWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 `differenceWith`를 사용하세요\n\n이 `differenceWith` 함수는 `null`이나 `undefined` 처리, 여러 배열 처리, `ArrayLike` 타입 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [differenceWith](../../array/differenceWith.md)를 사용하세요.\n\n:::\n\n비교 함수를 사용해서 첫 번째 배열에서 다른 배열들에 포함된 요소들을 제거해요.\n\n```typescript\nconst result = differenceWith(array, ...values, comparator);\n```\n\n## 사용법\n\n### `differenceWith(array, ...values, comparator)`\n\n각 요소를 비교 함수로 비교해서 차이를 구하고 싶을 때 `differenceWith`를 사용하세요. 마지막 인수가 비교 함수가 돼요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 객체를 id로 비교해요.\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst others = [{ id: 2 }];\nconst comparator = (a, b) => a.id === b.id;\n\ndifferenceWith(objects, others, comparator);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 여러 배열을 한 번에 제외해요.\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\n\ndifferenceWith(array, values1, values2, comparator);\n// Returns: [{ id: 1 }, { id: 4 }]\n```\n\n비교 함수를 제공하지 않으면 일반적인 `difference`처럼 동작해요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 비교 함수 없이 사용하면 일반적인 비교를 해요.\ndifferenceWith([1, 2, 3], [2], [3]);\n// Returns: [1]\n```\n\n복잡한 비교 로직도 사용할 수 있어요.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'alice', age: 25 },\n  { name: 'bob', age: 30 },\n  { name: 'charlie', age: 35 },\n];\nconst excludeUsers = [{ name: 'bob', age: 25 }]; // 다른 나이\n\n// 이름만으로 비교해요.\nconst compareByName = (a, b) => a.name === b.name;\ndifferenceWith(users, excludeUsers, compareByName);\n// Returns: [{ name: 'alice', age: 25 }, { name: 'charlie', age: 35 }]\n// bob이 제외돼요 (나이는 달라도 이름이 같아서)\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 차이를 구할 기준 배열이에요.\n- `...values` (`Array<ArrayLike<T>>` + `(a: T, b: T) => boolean`): 제외할 요소들이 포함된 배열들과 마지막에 비교 함수예요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수를 사용해서 첫 번째 배열에서 나머지 배열들의 요소를 제거한 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/drop.md",
    "content": "# drop (Lodash 호환성)\n\n::: warning `es-toolkit`의 `drop`을 사용하세요\n\n이 `drop` 함수는 `null`이나 `undefined` 처리, `toInteger` 변환 등으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [drop](../../array/drop.md)을 사용하세요.\n\n:::\n\n배열의 앞에서부터 지정된 개수만큼 요소들을 제거해요.\n\n```typescript\nconst result = drop(array, n);\n```\n\n## 사용법\n\n### `drop(array, n?)`\n\n배열의 처음 부분에서 몇 개의 요소를 제거하고 나머지를 얻고 싶을 때 `drop`을 사용하세요. 기본적으로 첫 번째 요소 하나를 제거해요.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 기본 사용법 (첫 번째 요소 제거)\ndrop([1, 2, 3, 4, 5]);\n// Returns: [2, 3, 4, 5]\n\n// 처음 2개 요소 제거\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// 처음 3개 요소 제거\ndrop(['a', 'b', 'c', 'd'], 3);\n// Returns: ['d']\n```\n\n0이나 음수를 지정하면 원본 배열을 그대로 반환해요.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 0개 제거\ndrop([1, 2, 3], 0);\n// Returns: [1, 2, 3]\n\n// 음수 지정\ndrop([1, 2, 3], -1);\n// Returns: [1, 2, 3]\n```\n\n배열보다 큰 수를 지정하면 빈 배열을 반환해요.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 배열 크기보다 큰 수 지정\ndrop([1, 2, 3], 5);\n// Returns: []\n\n// 빈 배열에서 제거\ndrop([], 1);\n// Returns: []\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\ndrop(null, 1);\n// Returns: []\n\ndrop(undefined, 2);\n// Returns: []\n```\n\n유사 배열 객체도 지원해요.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 유사 배열 객체\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\ndrop(arrayLike, 1);\n// Returns: ['b', 'c']\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 제거할 배열이에요.\n- `n` (`number`, 선택): 제거할 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 앞에서 지정된 개수만큼 제거된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/dropRight.md",
    "content": "# dropRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 `dropRight`를 사용하세요\n\n이 `dropRight` 함수는 `null`이나 `undefined` 처리, `guard` 파라미터 처리, `toInteger` 변환 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [dropRight](../../array/dropRight.md)를 사용하세요.\n\n:::\n\n배열의 끝에서부터 지정된 개수만큼 요소를 제거한 새로운 배열을 반환해요.\n\n```typescript\nconst result = dropRight(array, itemsCount);\n```\n\n## 사용법\n\n### `dropRight(array, itemsCount)`\n\n배열의 끝부터 특정 개수의 요소를 제거하고 나머지 요소들로 새로운 배열을 만들고 싶을 때 `dropRight`를 사용하세요.\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\n// 숫자 배열에서 끝의 2개 요소를 제거해요.\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// 문자열 배열에서 끝의 1개 요소를 제거해요.\ndropRight(['a', 'b', 'c'], 1);\n// Returns: ['a', 'b']\n\n// 제거할 개수를 지정하지 않으면 기본값 1을 사용해요.\ndropRight([1, 2, 3]);\n// Returns: [1, 2]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\ndropRight(null, 2); // []\ndropRight(undefined, 2); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 제거할 배열이에요.\n- `itemsCount` (`number`, 선택): 배열의 끝에서부터 제거할 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 끝에서부터 `itemsCount`개의 요소가 제거된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/dropRightWhile.md",
    "content": "# dropRightWhile (Lodash 호환성)\n\n::: warning `es-toolkit`의 `dropRightWhile`을 사용하세요\n\n이 `dropRightWhile` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [dropRightWhile](../../array/dropRightWhile.md)을 사용하세요.\n\n:::\n\n조건 함수에 따라 배열의 끝에서부터 요소를 제거해요.\n\n```typescript\nconst result = dropRightWhile(array, predicate);\n```\n\n## 사용법\n\n### `dropRightWhile(array, predicate)`\n\n배열의 끝에서부터 특정 조건을 만족하는 요소들을 연속으로 제거하고 싶을 때 `dropRightWhile`을 사용하세요. 조건 함수가 `false`를 반환하면 제거를 중단해요.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\n// 함수를 조건으로 사용해요.\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ndropRightWhile(users, user => !user.active);\n// Returns: [{ user: 'barney', active: true }]\n\n// 객체 패턴으로 매칭해요.\ndropRightWhile(users, { user: 'pebbles', active: false });\n// Returns: [{ user: 'barney', active: true }, { user: 'fred', active: false }]\n\n// 배열 형태로 속성과 값을 지정해요.\ndropRightWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: true }]\n\n// 속성 이름으로 조건을 확인해요.\ndropRightWhile(users, 'active');\n// Returns: [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\ndropRightWhile(null, x => x > 0); // []\ndropRightWhile(undefined, x => x > 0); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 제거할 배열이에요.\n- `predicate` (`ListIteratee<T>`, 선택): 각 요소에 적용할 조건 함수예요. 함수, 객체 패턴, 배열 패턴, 또는 속성 이름을 받을 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하지 않는 첫 번째 요소부터의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/dropWhile.md",
    "content": "# dropWhile (Lodash 호환성)\n\n::: warning `es-toolkit`의 `dropWhile`을 사용하세요\n\n이 `dropWhile` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [dropWhile](../../array/dropWhile.md)을 사용하세요.\n\n:::\n\n조건 함수에 따라 배열의 시작에서부터 요소를 제거해요.\n\n```typescript\nconst result = dropWhile(array, predicate);\n```\n\n## 사용법\n\n### `dropWhile(array, predicate)`\n\n배열의 시작에서부터 특정 조건을 만족하는 요소들을 연속으로 제거하고 싶을 때 `dropWhile`을 사용하세요. 조건 함수가 `false`를 반환하면 제거를 중단해요.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\n// 함수를 조건으로 사용해요.\ndropWhile([1, 2, 3, 4, 5], n => n < 3);\n// Returns: [3, 4, 5]\n\n// 객체 패턴으로 매칭해요.\nconst users = [\n  { name: 'alice', active: false },\n  { name: 'bob', active: false },\n  { name: 'charlie', active: true },\n];\n\ndropWhile(users, { active: false });\n// Returns: [{ name: 'charlie', active: true }]\n\n// 배열 형태로 속성과 값을 지정해요.\ndropWhile(users, ['active', false]);\n// Returns: [{ name: 'charlie', active: true }]\n\n// 속성 이름으로 조건을 확인해요.\nconst items = [{ visible: false }, { visible: false }, { visible: true }];\n\ndropWhile(items, 'visible');\n// Returns: [{ visible: false }, { visible: false }, { visible: true }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\ndropWhile(null, x => x > 0); // []\ndropWhile(undefined, x => x > 0); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 제거할 배열이에요.\n- `predicate` (`ListIteratee<T>`, 선택): 각 요소에 적용할 조건 함수예요. 함수, 객체 패턴, 배열 패턴, 또는 속성 이름을 받을 수 있어요. 기본값은 `identity`예요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하지 않는 첫 번째 요소부터의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/each.md",
    "content": "# each (Lodash 호환성)\n\n::: warning `Array.prototype.forEach`를 사용하세요\n\n이 `each` 함수는 복잡한 타입 처리와 다양한 컬렉션 타입 지원으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.forEach`를 사용하세요.\n\n:::\n\n배열이나 객체의 각 요소에 대해 반복 작업을 수행해요.\n\n```typescript\nconst result = each(collection, iteratee);\n```\n\n## 사용법\n\n### `each(collection, iteratee)`\n\n배열, 객체, 문자열의 각 요소를 순회하면서 주어진 함수를 실행해요. 배열의 경우 인덱스 순서대로, 객체의 경우 열거 가능한 속성들을 순회해요.\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\n// 배열 순회\neach([1, 2, 3], (value, index) => console.log(value, index));\n// 로그: 1 0, 2 1, 3 2\n\n// 객체 순회\neach({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// 로그: 'a' 1, 'b' 2\n\n// 문자열 순회\neach('hello', (char, index) => console.log(char, index));\n// 로그: 'h' 0, 'e' 1, 'l' 2, 'l' 3, 'o' 4\n```\n\n함수가 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\neach([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 2에서 중단\n});\n// 로그: 1, 2\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 순회할 컬렉션이에요.\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, 선택): 각 요소에 대해 실행할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 원본 컬렉션을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/eachRight.md",
    "content": "# eachRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 `forEachRight`을 사용하세요\n\n이 `eachRight` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [forEachRight](../../array/forEachRight.md)을 사용하세요.\n\n:::\n\n배열이나 객체의 각 요소에 대해 오른쪽부터 왼쪽으로 반복 작업을 수행해요.\n\n```typescript\nconst result = eachRight(collection, iteratee);\n```\n\n## 사용법\n\n### `eachRight(collection, iteratee)`\n\n배열, 객체, 문자열의 각 요소를 오른쪽부터 왼쪽으로 순회하면서 주어진 함수를 실행해요. 배열의 경우 마지막 인덱스부터 역순으로, 객체의 경우 열거 가능한 속성들을 역순으로 순회해요.\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\n// 배열 역순 순회\neachRight([1, 2, 3], (value, index) => console.log(value, index));\n// 로그: 3 2, 2 1, 1 0\n\n// 객체 역순 순회\neachRight({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// 로그: 'b' 2, 'a' 1\n\n// 문자열 역순 순회\neachRight('hello', (char, index) => console.log(char, index));\n// 로그: 'o' 4, 'l' 3, 'l' 2, 'e' 1, 'h' 0\n```\n\n함수가 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\neachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 2에서 중단\n});\n// 로그: 4, 3, 2\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 순회할 컬렉션이에요.\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, 선택): 각 요소에 대해 실행할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 원본 컬렉션을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/every.md",
    "content": "# every (Lodash 호환성)\n\n::: warning `Array.prototype.every()`를 사용하세요\n\n이 `every` 함수는 복잡한 객체 처리, 다양한 조건 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.every()`를 사용하세요.\n\n:::\n\n배열이나 객체의 모든 값이 주어진 조건에 맞는지 반환해요.\n\n```typescript\nconst result = every(collection, predicate);\n```\n\n## 사용법\n\n### `every(collection, predicate?)`\n\n배열이나 객체의 모든 요소가 특정 조건을 만족하는지 확인하고 싶을 때 `every`를 사용하세요. 조건은 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름 등 다양한 형태로 지정할 수 있어요.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\n// 검사 함수 사용\nconst numbers = [2, 4, 6, 8];\nevery(numbers, x => x % 2 === 0);\n// Returns: true\n\n// 프로퍼티 이름 사용\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n];\nevery(users, 'active');\n// Returns: true\n\n// 부분 객체 사용\nevery(users, { active: true });\n// Returns: true\n\n// 프로퍼티-값 쌍 사용\nevery(users, ['active', true]);\n// Returns: true\n```\n\n객체에 대해서도 동일하게 동작해요.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 85, science: 92 };\nevery(scores, score => score >= 80);\n// Returns: true\n```\n\n`null`이나 `undefined`는 빈 컬렉션으로 처리하여 `true`를 반환해요.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nevery(null);\n// Returns: true\n\nevery(undefined);\n// Returns: true\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 검사할 배열이나 객체예요.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 선택): 검사 조건이에요. 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름을 사용할 수 있어요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`boolean`): 모든 요소가 조건을 만족하면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/fill.md",
    "content": "# fill (Lodash 호환성)\n\n::: warning `es-toolkit`의 `fill`을 사용하세요\n\n이 `fill` 함수는 `null`이나 `undefined` 처리, 유사 배열 객체 지원 등으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [fill](../../array/fill.md)을 사용하세요.\n\n:::\n\n배열의 요소들을 지정된 값으로 채워요.\n\n```typescript\nconst result = fill(array, value, start, end);\n```\n\n## 사용법\n\n### `fill(array, value, start?, end?)`\n\n배열의 특정 범위나 전체를 동일한 값으로 채우고 싶을 때 `fill`을 사용하세요. 원본 배열을 직접 수정해요.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\n// 전체 배열 채우기\nconst arr1 = [1, 2, 3];\nfill(arr1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// 특정 범위 채우기\nconst arr2 = [1, 2, 3, 4, 5];\nfill(arr2, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n\n// 음수 인덱스 사용\nconst arr3 = [1, 2, 3, 4, 5];\nfill(arr3, 'x', -3, -1);\n// Returns: [1, 2, 'x', 'x', 5]\n```\n\n유사 배열 객체도 지원해요.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 1, 1: 2, 2: 3, length: 3 };\nfill(arrayLike, 'a', 1, 2);\n// Returns: { 0: 1, 1: 'a', 2: 3, length: 3 }\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill(null, 'a');\n// Returns: []\n\nfill(undefined, 'a');\n// Returns: []\n```\n\n문자열은 읽기 전용이므로 그대로 반환해요.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill('abc', 'x');\n// Returns: 'abc' (변경되지 않음)\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 채울 배열이에요.\n- `value` (`U`): 배열을 채울 값이에요.\n- `start` (`number`, 선택): 시작 위치예요. 기본값은 `0`이에요.\n- `end` (`number`, 선택): 끝 위치예요 (포함되지 않음). 기본값은 `array.length`예요.\n\n#### 반환 값\n\n(`ArrayLike<T | U>`): 값으로 채워진 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/filter.md",
    "content": "# filter (Lodash 호환성)\n\n::: warning `Array.prototype.filter()`를 사용하세요\n\n이 `filter` 함수는 복잡한 객체 처리, 다양한 조건 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.filter()`를 사용하세요.\n\n:::\n\n주어진 조건을 만족하는 요소들로 새로운 배열을 만들어요.\n\n```typescript\nconst result = filter(collection, predicate);\n```\n\n## 사용법\n\n### `filter(collection, predicate)`\n\n배열이나 객체에서 특정 조건을 만족하는 요소들만 걸러내고 싶을 때 `filter`를 사용하세요. 조건은 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름 등 다양한 형태로 지정할 수 있어요.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\n// 검사 함수 사용\nconst numbers = [1, 2, 3, 4, 5];\nfilter(numbers, x => x % 2 === 0);\n// Returns: [2, 4]\n\n// 프로퍼티 이름 사용\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nfilter(users, 'active');\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// 부분 객체 사용\nfilter(users, { active: true });\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// 프로퍼티-값 쌍 사용\nfilter(users, ['active', true]);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n```\n\n객체에 대해서도 동일하게 동작해서 조건을 만족하는 값들의 배열을 반환해요.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfilter(scores, score => score >= 80);\n// Returns: [90, 85]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nfilter(null, x => x > 0);\n// Returns: []\n\nfilter(undefined, x => x > 0);\n// Returns: []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 필터링할 배열이나 객체예요.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): 필터링 조건이에요. 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름을 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하는 요소들로 이루어진 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/find.md",
    "content": "# find (Lodash 호환성)\n\n::: warning `Array.prototype.find()`를 사용하세요\n\n이 `find` 함수는 복잡한 객체 처리, 다양한 조건 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.find()`를 사용하세요.\n\n:::\n\n배열이나 객체에서 조건에 맞는 첫 번째 요소를 찾아요.\n\n```typescript\nconst result = find(collection, predicate, fromIndex);\n```\n\n## 사용법\n\n### `find(collection, predicate, fromIndex?)`\n\n배열이나 객체에서 특정 조건을 만족하는 첫 번째 요소를 찾고 싶을 때 `find`를 사용하세요. 조건은 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름 등 다양한 형태로 지정할 수 있어요.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\n// 검사 함수 사용\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 3);\n// Returns: 4\n\n// 프로퍼티 이름 사용\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n];\nfind(users, 'active');\n// Returns: { name: 'Bob', active: true }\n\n// 부분 객체 사용\nfind(users, { active: true });\n// Returns: { name: 'Bob', active: true }\n\n// 프로퍼티-값 쌍 사용\nfind(users, ['name', 'Charlie']);\n// Returns: { name: 'Charlie', active: true }\n```\n\n시작 인덱스를 지정할 수 있어요.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 2, 2);\n// Returns: 3 (인덱스 2부터 검색 시작)\n```\n\n객체에 대해서도 동일하게 동작해요.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfind(scores, score => score >= 80);\n// Returns: 90\n```\n\n`null`이나 `undefined`는 빈 컬렉션으로 처리해서 `undefined`를 반환해요.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nfind(null, x => x > 0);\n// Returns: undefined\n\nfind(undefined, x => x > 0);\n// Returns: undefined\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 검색할 배열이나 객체예요.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): 검색 조건이에요. 함수, 부분 객체, 프로퍼티-값 쌍, 프로퍼티 이름을 사용할 수 있어요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`T | undefined`): 조건을 만족하는 첫 번째 요소를 반환해요. 찾지 못하면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/findIndex.md",
    "content": "# findIndex (Lodash 호환성)\n\n::: warning `Array.prototype.findIndex`를 사용하세요\n\n이 `findIndex` 함수는 다양한 조건 형식 처리, `fromIndex` 처리 등의 추가 기능으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.findIndex`를 사용하세요.\n\n:::\n\n배열에서 조건에 맞는 첫 번째 요소의 인덱스를 찾아요.\n\n```typescript\nconst index = findIndex(arr, doesMatch, fromIndex);\n```\n\n## 사용법\n\n### `findIndex(arr, doesMatch, fromIndex)`\n\n배열에서 특정 조건에 맞는 첫 번째 요소의 위치를 찾고 싶을 때 `findIndex`를 사용하세요. 다양한 방식으로 조건을 지정할 수 있어요. 조건에 맞는 요소가 없으면 `-1`을 반환해요.\n\n함수로 조건을 지정하면 각 요소에 대해 함수를 실행하고 참을 반환하는 첫 번째 요소의 인덱스를 반환해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { id: 1, name: 'Alice', active: false },\n  { id: 2, name: 'Bob', active: true },\n  { id: 3, name: 'Charlie', active: true },\n];\n\n// 함수로 조건 지정\nfindIndex(users, user => user.active);\n// Returns: 1\n```\n\n부분 객체로 조건을 지정하면 해당 속성들이 일치하는 첫 번째 요소의 인덱스를 반환해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 부분 객체로 조건 지정\nfindIndex(users, { name: 'Bob', active: true });\n// Returns: 1\n```\n\n속성 이름과 값의 배열로 조건을 지정하면 해당 속성이 그 값과 일치하는 첫 번째 요소의 인덱스를 반환해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// [속성명, 값] 배열로 조건 지정\nfindIndex(users, ['active', true]);\n// Returns: 1\n```\n\n속성 이름만 지정하면 해당 속성이 참으로 평가되는 첫 번째 요소의 인덱스를 반환해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 속성 이름으로 조건 지정\nfindIndex(users, 'active');\n// Returns: 1\n```\n\n`fromIndex`를 지정하면 해당 인덱스부터 검색을 시작해요. 음수 값을 사용하면 배열 끝에서부터 계산해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 인덱스 2부터 검색 시작\nfindIndex(users, user => user.active, 2);\n// Returns: 2\n\n// 배열 끝에서 두 번째부터 검색\nfindIndex(users, user => user.active, -2);\n// Returns: 1\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nfindIndex(null, user => user.active); // -1\nfindIndex(undefined, 'active'); // -1\n```\n\n#### 파라미터\n\n- `arr` (`ArrayLike<T> | null | undefined`): 검색할 배열이에요.\n- `doesMatch` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 선택): 일치 조건이에요. 함수, 부분 객체, 키-값 쌍, 또는 속성 이름이 될 수 있어요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 조건에 맞는 첫 번째 요소의 인덱스를 반환해요. 조건에 맞는 요소가 없으면 `-1`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/findLast.md",
    "content": "# findLast (Lodash 호환성)\n\n::: warning `Array.prototype.findLast`를 사용하세요\n\n이 `findLast` 함수는 다양한 타입과 특수한 조건 처리로 인해 복잡하고 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.findLast`를 사용하세요.\n\n:::\n\n배열이나 객체에서 조건을 만족하는 마지막 요소를 찾아요.\n\n```typescript\nconst lastEven = findLast(array, predicate);\n```\n\n## 사용법\n\n### `findLast(collection, predicate?, fromIndex?)`\n\n배열이나 객체에서 주어진 조건을 만족하는 마지막 요소를 찾아요. 배열의 끝에서부터 역순으로 검색하며, 조건을 만족하는 첫 번째 요소를 반환해요.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\n// 함수로 조건 지정\nconst users = [\n  { user: 'barney', age: 36 },\n  { user: 'fred', age: 40 },\n  { user: 'pebbles', age: 18 },\n];\nfindLast(users, o => o.age < 40);\n// => { user: 'pebbles', age: 18 }\n\n// 객체로 조건 지정\nfindLast(users, { age: 36 });\n// => { user: 'barney', age: 36 }\n\n// 키-값 쌍으로 조건 지정\nfindLast(users, ['age', 18]);\n// => { user: 'pebbles', age: 18 }\n\n// 속성 이름으로 조건 지정 (참으로 평가되는 값을 가진 마지막 요소)\nfindLast(users, 'age');\n// => { user: 'fred', age: 40 }\n```\n\n검색 시작 인덱스를 지정할 수도 있어요.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5, 4, 3, 2, 1];\nfindLast(numbers, n => n > 3, 6); // 인덱스 6부터 역순 검색\n// => 4\n```\n\n`null`이나 `undefined`는 빈 결과를 반환해요.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nfindLast(null, x => x > 0); // undefined\nfindLast(undefined, x => x > 0); // undefined\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 검색할 배열이나 객체예요.\n- `predicate` (`ListIterateeCustom<T, boolean>`, 선택): 각 요소에 적용할 조건이에요. 함수, 객체, 키-값 쌍, 또는 속성 이름을 사용할 수 있어요. 기본값은 `identity` 함수예요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 음수인 경우 끝에서부터 계산해요. 기본값은 배열의 마지막 인덱스예요.\n\n#### 반환 값\n\n(`T | undefined`): 조건을 만족하는 마지막 요소를 반환해요. 조건을 만족하는 요소가 없으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/findLastIndex.md",
    "content": "# findLastIndex (Lodash 호환성)\n\n::: warning `Array.prototype.findLastIndex`를 사용하세요\n\n이 `findLastIndex` 함수는 `null`이나 `undefined` 처리, 부분 객체 매칭, 프로퍼티 이름 매칭 등의 추가 기능으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.findLastIndex`를 사용하세요.\n\n:::\n\n배열에서 조건을 만족하는 마지막 요소의 인덱스를 찾아요.\n\n```typescript\nconst lastIndex = findLastIndex(array, predicate, fromIndex);\n```\n\n## 사용법\n\n### `findLastIndex(array, predicate, fromIndex)`\n\n배열의 끝에서부터 시작해서 주어진 조건과 일치하는 첫 번째 요소의 인덱스를 찾고 싶을 때 `findLastIndex`를 사용하세요. 조건을 만족하는 요소가 없으면 `-1`을 반환해요.\n\n이 함수는 다양한 방식으로 조건을 지정할 수 있어요. 함수를 전달하면 각 요소에 대해 함수를 실행하고, 부분 객체를 전달하면 요소가 해당 속성들을 가지고 있는지 확인해요. 배열 형태의 키-값 쌍을 전달하면 특정 프로퍼티가 주어진 값과 일치하는지 확인하고, 문자열을 전달하면 해당 프로퍼티가 참으로 평가되는 값인지 확인해요.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\n// 함수를 사용해서 조건을 지정해요.\nfindLastIndex(users, o => o.user === 'pebbles');\n// Returns: 2\n\n// 부분 객체를 사용해서 일치하는 요소를 찾아요.\nfindLastIndex(users, { user: 'barney', active: true });\n// Returns: 0\n\n// 프로퍼티-값 쌍을 사용해서 일치하는 요소를 찾아요.\nfindLastIndex(users, ['active', false]);\n// Returns: 2\n\n// 프로퍼티 이름을 사용해서 참으로 평가되는 값을 가진 요소를 찾아요.\nfindLastIndex(users, 'active');\n// Returns: 0\n```\n\n검색 시작 위치를 지정할 수도 있어요. `fromIndex`가 음수면 배열의 끝에서부터 계산해요.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 인덱스 3부터 역방향으로 검색해요.\nfindLastIndex(numbers, n => n < 4, 2);\n// Returns: 2\n\n// 음수 인덱스를 사용하면 끝에서부터 계산해요.\nfindLastIndex(numbers, n => n > 2, -2);\n// Returns: 3\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nfindLastIndex(null, n => n > 0); // -1\nfindLastIndex(undefined, n => n > 0); // -1\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 검색할 배열이에요.\n- `predicate` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 선택): 각 요소를 테스트할 조건이에요. 함수, 부분 객체, 프로퍼티-값 쌍, 또는 프로퍼티 이름을 사용할 수 있어요. 기본값은 항등 함수예요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 음수면 배열의 끝에서부터 계산해요. 기본값은 `array.length - 1`이에요.\n\n#### 반환 값\n\n(`number`): 조건을 만족하는 마지막 요소의 인덱스를 반환해요. 조건을 만족하는 요소가 없으면 `-1`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/first.md",
    "content": "# first (Lodash 호환성)\n\n::: warning `es-toolkit`의 `head`를 사용하세요\n\n이 `first` 함수는 `null`이나 `undefined` 처리와 배열 형태의 객체 변환으로 인해 느리게 동작해요. `es-toolkit`의 `head` 함수는 이러한 추가 처리 없이 더 빠르고 간단하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [head](../../array/head.md)를 사용하세요.\n\n:::\n\n배열의 첫 번째 요소를 반환해요.\n\n```typescript\nconst firstElement = first(array);\n```\n\n## 사용법\n\n### `first(array)`\n\n배열의 첫 번째 요소를 가져오고 싶을 때 `first`를 사용하세요. 배열이 비어있거나 `null`, `undefined`인 경우 `undefined`를 반환해요.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\n// 일반 배열에서 첫 번째 요소 가져오기\nfirst([1, 2, 3]);\n// Returns: 1\n\n// 문자열 배열에서 첫 번째 요소 가져오기\nfirst(['a', 'b', 'c']);\n// Returns: 'a'\n\n// 빈 배열\nfirst([]);\n// Returns: undefined\n```\n\n`null`이나 `undefined`는 `undefined`를 반환해요.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nfirst(null); // undefined\nfirst(undefined); // undefined\n```\n\n배열 형태의 객체에서도 사용할 수 있어요.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\nfirst(arrayLike);\n// Returns: 'a'\n\n// 문자열도 배열처럼 처리됨\nfirst('hello');\n// Returns: 'h'\n```\n\n타입이 보장된 튜플에서는 정확한 타입을 반환해요.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst tuple = [1, 'two', true] as const;\nfirst(tuple);\n// Returns: 1 (타입이 1로 추론됨)\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 첫 번째 요소를 가져올 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열의 첫 번째 요소를 반환해요. 배열이 비어있거나 유효하지 않으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flatMap.md",
    "content": "# flatMap (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flatMap`을 사용하세요\n\n이 `flatMap` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flatMap](../../array/flatMap.md)을 사용하세요.\n\n:::\n\n각 요소에 함수를 적용한 후 결과를 평탄화해요.\n\n```typescript\nconst result = flatMap(collection, iteratee);\n```\n\n## 사용법\n\n### `flatMap(collection, iteratee)`\n\n컬렉션의 각 요소에 반복자 함수를 적용한 후 한 단계 평탄화한 배열을 반환해요. 배열, 객체, 문자열을 지원하며 다양한 형태의 반복자를 사용할 수 있어요.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\n// 배열에 함수 적용\nfunction duplicate(n) {\n  return [n, n];\n}\nflatMap([1, 2], duplicate);\n// 결과: [1, 1, 2, 2]\n\n// 객체에 함수 적용\nconst obj = { a: 1, b: 2 };\nflatMap(obj, (value, key) => [key, value]);\n// 결과: ['a', 1, 'b', 2]\n\n// 문자열 속성으로 매핑\nconst users = [\n  { user: 'barney', hobbies: ['hiking', 'coding'] },\n  { user: 'fred', hobbies: ['reading'] },\n];\nflatMap(users, 'hobbies');\n// 결과: ['hiking', 'coding', 'reading']\n```\n\n반복자 없이 사용하면 값들을 한 단계 평탄화해요.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst obj = { a: [1, 2], b: [3, 4] };\nflatMap(obj);\n// 결과: [1, 2, 3, 4]\n```\n\n부분 객체로 조건 매핑도 가능해요.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', age: 36, active: true },\n  { user: 'fred', age: 40, active: false },\n];\nflatMap(users, { active: false });\n// 결과: [false, true] (active가 false인 요소들의 매칭 결과)\n```\n\n#### 파라미터\n\n- `collection` (`object | null | undefined`): 순회할 컬렉션이에요. 배열, 객체, 문자열이 될 수 있어요.\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, 선택): 각 요소에 적용할 반복자예요. 함수, 속성 이름, 또는 부분 객체가 될 수 있어요.\n\n#### 반환 값\n\n(`any[]`): 매핑 후 한 단계 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flatMapDeep.md",
    "content": "# flatMapDeep (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`flatMapDeep`](../../array/flatMapDeep.md)를 사용하세요\n\n이 `flatMapDeep` 함수는 복잡한 컬렉션 타입 처리와 깊은 평탄화 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flatMapDeep](../../array/flatMapDeep.md)를 사용하세요.\n\n:::\n\n각 요소에 함수를 적용한 후 결과를 재귀적으로 평탄화해요.\n\n```typescript\nconst result = flatMapDeep(collection, iteratee);\n```\n\n## 사용법\n\n### `flatMapDeep(collection, iteratee)`\n\n컬렉션의 각 요소에 반복자 함수를 적용한 후 무한 깊이로 평탄화한 배열을 반환해요. 중첩된 배열 구조가 모두 평탄화되어 1차원 배열이 됩니다.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\n// 배열에 함수 적용 후 깊은 평탄화\nfunction duplicate(n) {\n  return [[[n, n]]];\n}\nflatMapDeep([1, 2], duplicate);\n// 결과: [1, 1, 2, 2]\n\n// 객체에 함수 적용 후 깊은 평탄화\nconst obj = { a: 1, b: 2 };\nflatMapDeep(obj, (value, key) => [[[key, value]]]);\n// 결과: ['a', 1, 'b', 2]\n\n// 문자열 속성으로 매핑 후 깊은 평탄화\nconst users = [\n  { user: 'barney', hobbies: [['hiking', 'coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDeep(users, 'hobbies');\n// 결과: ['hiking', 'coding', 'reading']\n```\n\n반복자 없이 사용하면 값들을 재귀적으로 평탄화해요.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst obj = { a: [[1, 2]], b: [[[3]]] };\nflatMapDeep(obj);\n// 결과: [1, 2, 3]\n```\n\n부분 객체로 조건 매핑도 가능해요.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: [true, false] },\n  { user: 'fred', active: [false] },\n];\nflatMapDeep(users, { active: [false] });\n// 결과: [true, true] (active 배열에 [false]가 포함된 요소들의 매칭 결과)\n```\n\n#### 파라미터\n\n- `collection` (`object | null | undefined`): 순회할 컬렉션이에요. 배열, 객체, 문자열이 될 수 있어요.\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, 선택): 각 요소에 적용할 반복자예요. 함수, 속성 이름, 또는 부분 객체가 될 수 있어요.\n\n#### 반환 값\n\n(`any[]`): 매핑 후 재귀적으로 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flatMapDepth.md",
    "content": "# flatMapDepth (Lodash 호환성)\n\n::: warning `es-toolkit`의 [flatMap](../../array/flatMap.md)을 사용하세요\n\n이 `flatMapDepth` 함수는 Lodash와의 호환성을 위해 여러 형태의 iteratee를 지원하고 `null`이나 `undefined` 처리 등으로 인해 복잡하게 구현되어 있어요. 메인 라이브러리의 `flatMap` 함수는 간단한 함수 iteratee만 지원하므로 더 빠르게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flatMap](../../array/flatMap.md)를 사용하세요.\n\n:::\n\n배열의 각 요소를 iteratee 함수로 변환한 후 지정된 깊이까지 평탄화해요.\n\n```typescript\nconst result = flatMapDepth(collection, iteratee, depth);\n```\n\n## 사용법\n\n### `flatMapDepth(collection, iteratee, depth)`\n\n배열이나 객체의 각 요소를 주어진 함수로 변환한 후, 결과를 지정된 깊이까지 평탄화해서 새 배열로 반환해요. 중첩된 배열 구조를 원하는 깊이까지만 평탄화할 때 유용해요.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 배열을 변환하고 깊이 2까지 평탄화\nflatMapDepth([1, 2], n => [[n, n]], 2);\n// => [1, 1, 2, 2]\n\n// 깊이 1로 제한하면 완전히 평탄화되지 않아요\nflatMapDepth([1, 2], n => [[n, n]], 1);\n// => [[1, 1], [2, 2]]\n\n// 객체에서 값을 추출하고 평탄화\nconst users = [\n  { user: 'barney', hobbies: [['hiking'], ['coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDepth(users, 'hobbies', 2);\n// => ['hiking', 'coding', 'reading']\n```\n\n이 함수는 다양한 형태의 iteratee를 지원해요.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 함수를 사용한 변환\nflatMapDepth([1, 2, 3], n => [[n, n]], 2);\n\n// 속성명으로 값 추출\nconst objects = [{ items: [['a'], ['b']] }, { items: [['c']] }];\nflatMapDepth(objects, 'items', 2);\n// => ['a', 'b', 'c']\n\n// 객체의 부분 매칭\nconst users = [{ active: [[true], [false]] }, { active: [[false]] }];\nflatMapDepth(users, { active: [[false]] }, 2);\n// => [true, true]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\nflatMapDepth(null, n => [n], 1); // => []\nflatMapDepth(undefined, n => [n], 1); // => []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, any> | Record<number, any> | object | null | undefined`): 순회할 배열이나 객체예요.\n- `iteratee` (`((value: T, index: number, collection: any) => any) | string | object`, 선택): 각 요소에 대해 실행할 변환 함수나 속성명이에요. 기본값은 `identity`예요.\n- `depth` (`number`, 선택): 평탄화할 최대 깊이예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): iteratee로 변환된 후 지정된 깊이까지 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flatten.md",
    "content": "# flatten (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flatten`을 사용하세요\n\n이 `flatten` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flatten](../../array/flatten.md)을 사용하세요.\n\n:::\n\n배열을 한 단계 평탄화해요.\n\n```typescript\nconst result = flatten(array, depth);\n```\n\n## 사용법\n\n### `flatten(value, depth)`\n\n중첩 배열을 지정된 깊이만큼 평탄화해요. 기본적으로 한 단계만 평탄화하며, Arguments 객체나 Symbol.isConcatSpreadable을 가진 객체도 지원해요.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\n// 기본 평탄화 (한 단계)\nflatten([1, [2, [3, [4]], 5]]);\n// 결과: [1, 2, [3, [4]], 5]\n\n// 깊이 지정\nflatten([1, [2, [3, [4]], 5]], 2);\n// 결과: [1, 2, 3, [4], 5]\n\n// Arguments 객체 지원\nfunction example() {\n  return flatten(arguments);\n}\nexample(1, [2, 3], [[4]]);\n// 결과: [1, 2, 3, [4]]\n```\n\n빈 배열이나 null, undefined는 빈 배열을 반환해요.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nflatten(null); // []\nflatten(undefined); // []\nflatten([]); // []\n```\n\nSymbol.isConcatSpreadable을 가진 객체도 배열처럼 평탄화돼요.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nconst spreadable = { 0: 'a', 1: 'b', length: 2, [Symbol.isConcatSpreadable]: true };\nflatten([1, spreadable, 3]);\n// 결과: [1, 'a', 'b', 3]\n```\n\n#### 파라미터\n\n- `value` (`ArrayLike<T> | null | undefined`): 평탄화할 배열이에요.\n- `depth` (`number`, 선택): 평탄화할 최대 깊이예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flattenDeep.md",
    "content": "# flattenDeep (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flattenDeep`을 사용하세요\n\n이 `flattenDeep` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flattenDeep](../../array/flattenDeep.md)을 사용하세요.\n\n:::\n\n배열을 완전히 평탄화해요.\n\n```typescript\nconst result = flattenDeep(array);\n```\n\n## 사용법\n\n### `flattenDeep(value)`\n\n중첩 배열을 모든 깊이에서 재귀적으로 평탄화해요. 모든 중첩 수준이 제거되어 완전히 평탄화된 1차원 배열을 반환해요.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\n// 깊이 중첩된 배열 완전 평탄화\nflattenDeep([1, [2, [3, [4]], 5]]);\n// 결과: [1, 2, 3, 4, 5]\n\n// 복잡한 중첩 구조도 완전 평탄화\nflattenDeep([1, [2, [3, [[[[4]]]]], 5]]);\n// 결과: [1, 2, 3, 4, 5]\n\n// 혼합된 타입도 지원\nflattenDeep(['a', ['b', ['c', [['d']]]]]);\n// 결과: ['a', 'b', 'c', 'd']\n```\n\n빈 배열이나 null, undefined는 빈 배열을 반환해요.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep(null); // []\nflattenDeep(undefined); // []\nflattenDeep([]); // []\n```\n\n이미 평탄화된 배열은 그대로 복사돼요.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep([1, 2, 3, 4, 5]);\n// 결과: [1, 2, 3, 4, 5]\n```\n\n#### 파라미터\n\n- `value` (`ListOfRecursiveArraysOrValues<T> | null | undefined`): 완전히 평탄화할 배열이에요.\n\n#### 반환 값\n\n(`Array<T>`): 모든 중첩이 제거된 완전히 평탄화된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/flattenDepth.md",
    "content": "# flattenDepth (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flatten`를 사용하세요\n\n이 `flattenDepth` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요. `es-toolkit`의 `flatten` 함수는 이러한 추가 처리 없이 더 빠르고 간단하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flatten](../../array/flatten.md)를 사용하세요.\n\n:::\n\n배열을 지정한 깊이까지 평탄화해요.\n\n```typescript\nconst flattened = flattenDepth(array, depth);\n```\n\n## 사용법\n\n### `flattenDepth(array, depth)`\n\n중첩된 배열을 원하는 깊이까지 평탄화하고 싶을 때 `flattenDepth`를 사용하세요. 깊이를 지정하면 그 깊이까지만 중첩된 배열을 평탄화해요.\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\n// 깊이 1까지 평탄화해요.\nflattenDepth([1, [2, [3, [4]], 5]], 1);\n// Returns: [1, 2, [3, [4]], 5]\n\n// 깊이 2까지 평탄화해요.\nflattenDepth([1, [2, [3, [4]], 5]], 2);\n// Returns: [1, 2, 3, [4], 5]\n\n// 깊이를 지정하지 않으면 기본값 1로 평탄화해요.\nflattenDepth([1, [2, [3, [4]], 5]]);\n// Returns: [1, 2, [3, [4]], 5]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\nflattenDepth(null, 2); // []\nflattenDepth(undefined, 2); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 평탄화할 배열이에요.\n- `depth` (`number`, 선택): 평탄화할 최대 깊이예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 지정한 깊이까지 평탄화된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/forEach.md",
    "content": "# forEach (Lodash 호환성)\n\n::: warning `Array.prototype.forEach()`를 사용하세요\n\n이 `forEach` 함수는 복잡한 객체 처리, 조기 종료 로직 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.forEach()`를 사용하세요.\n\n:::\n\n배열이나 객체의 각 요소에 대해 함수를 실행해요.\n\n```typescript\nforEach(collection, callback);\n```\n\n## 사용법\n\n### `forEach(collection, callback)`\n\n배열이나 객체의 모든 요소를 순회하면서 각 요소에 대해 콜백 함수를 실행하고 싶을 때 `forEach`를 사용하세요. 콜백이 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\n// 배열 순회\nconst numbers = [1, 2, 3, 4, 5];\nconst results: number[] = [];\n\nforEach(numbers, value => {\n  results.push(value * 2);\n});\n// results는 [2, 4, 6, 8, 10]\n\n// 조기 종료\nconst numbers2 = [1, 2, 3, 4, 5];\nconst results2: number[] = [];\n\nforEach(numbers2, value => {\n  if (value > 3) {\n    return false; // 순회 중단\n  }\n  results2.push(value);\n});\n// results2는 [1, 2, 3]\n```\n\n객체에 대해서도 동일하게 동작해요.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nconst keys: string[] = [];\nconst values: number[] = [];\n\nforEach(obj, (value, key) => {\n  keys.push(key);\n  values.push(value);\n});\n// keys는 ['a', 'b', 'c']\n// values는 [1, 2, 3]\n```\n\n`null`이나 `undefined`는 빈 컬렉션으로 처리해요.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nforEach(null, value => {\n  console.log(value); // 실행되지 않음\n});\n\nforEach(undefined, value => {\n  console.log(value); // 실행되지 않음\n});\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 순회할 배열이나 객체예요.\n- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 각 요소에 대해 실행할 함수예요. `false`를 반환하면 순회를 중단해요.\n\n#### 반환 값\n\n(`T`): 순회한 원본 컬렉션을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/forEachRight.md",
    "content": "# forEachRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 `forEachRight`을 사용하세요\n\n이 `forEachRight` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [forEachRight](../../array/forEachRight.md)을 사용하세요.\n\n:::\n\n배열이나 객체의 요소들을 오른쪽에서 왼쪽으로 순회하면서 각 요소에 대해 함수를 실행해요.\n\n```typescript\nforEachRight(collection, callback);\n```\n\n## 사용법\n\n### `forEachRight(collection, callback)`\n\n배열, 객체, 문자열을 오른쪽에서 왼쪽 순서로 순회하면서 각 요소에 대해 콜백 함수를 실행해요. 콜백이 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\n// 배열을 역순으로 순회해요\nforEachRight([1, 2, 3], (value, index) => {\n  console.log(value, index);\n});\n// 출력: 3 2, 2 1, 1 0\n\n// 문자열을 역순으로 순회해요\nforEachRight('abc', (char, index) => {\n  console.log(char, index);\n});\n// 출력: 'c' 2, 'b' 1, 'a' 0\n\n// 객체를 역순으로 순회해요\nforEachRight({ a: 1, b: 2, c: 3 }, (value, key) => {\n  console.log(value, key);\n});\n// 출력: 3 'c', 2 'b', 1 'a'\n```\n\n`null`이나 `undefined`는 그대로 반환해요.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight(null, value => console.log(value)); // null\nforEachRight(undefined, value => console.log(value)); // undefined\n```\n\n콜백이 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  if (value === 2) {\n    return false; // 순회 중단\n  }\n});\n// 출력: 4, 3, 2\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 순회할 컬렉션이에요. 배열, 객체, 문자열, 또는 null/undefined일 수 있어요.\n- `callback` (`(item: any, index: any, arr: any) => unknown`, 선택): 각 요소에 대해 실행할 함수예요. `false`를 반환하면 순회를 중단해요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 원본 컬렉션을 그대로 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/groupBy.md",
    "content": "# groupBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [groupBy](../../array/groupBy.md)를 사용하세요\n\n이 `groupBy` 함수는 `null`이나 `undefined` 처리, 객체 지원, 복잡한 타입 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [groupBy](../../array/groupBy.md)를 사용하세요.\n\n:::\n\n배열이나 객체의 요소들을 주어진 조건에 따라 그룹으로 나눠요.\n\n```typescript\nconst grouped = groupBy(collection, iteratee);\n```\n\n## 사용법\n\n### `groupBy(collection, iteratee)`\n\n배열이나 객체의 각 요소를 주어진 조건 함수에 따라 그룹으로 나누고, 그룹별로 분류된 객체를 반환해요. 조건은 함수, 프로퍼티 이름, 부분 객체 등 다양한 형태로 제공할 수 있어요.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\n// 함수로 그룹 나누기\nconst array = [6.1, 4.2, 6.3];\nconst result = groupBy(array, Math.floor);\n// result는 { '4': [4.2], '6': [6.1, 6.3] }\n\n// 프로퍼티 이름으로 그룹 나누기\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 30 },\n];\nconst byAge = groupBy(users, 'age');\n// byAge는 { '25': [{ name: 'jane', age: 25 }], '30': [{ name: 'john', age: 30 }, { name: 'bob', age: 30 }] }\n\n// 객체에서 그룹 나누기\nconst obj = { a: 6.1, b: 4.2, c: 6.3 };\nconst groupedObj = groupBy(obj, Math.floor);\n// groupedObj는 { '4': [4.2], '6': [6.1, 6.3] }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\ngroupBy(null, x => x); // {}\ngroupBy(undefined, x => x); // {}\n```\n\n부분 객체나 프로퍼티-값 쌍으로도 그룹을 나눌 수 있어요.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\n// 부분 객체로 그룹 나누기\nconst byCategory = groupBy(products, { category: 'fruit' });\n// 프로퍼티-값 쌍으로 그룹 나누기\nconst byName = groupBy(products, ['name', 'apple']);\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, T> | null | undefined`): 그룹으로 나눌 배열이나 객체예요.\n- `iteratee` (`Function | PropertyKey | Array | Object`, 선택): 그룹을 나누는 조건이에요. 함수, 프로퍼티 이름, 프로퍼티-값 쌍, 또는 부분 객체일 수 있어요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`Record<string, T[]>`): 각 키가 그룹의 조건값이고, 값이 해당 그룹에 속하는 요소들의 배열인 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/head.md",
    "content": "# head (Lodash 호환성)\n\n::: warning `es-toolkit`의 [head](../../array/head.md)를 사용하세요\n\n이 `head` 함수는 `ArrayLike` 객체 처리와 배열 변환 과정으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [head](../../array/head.md)를 사용하세요.\n\n:::\n\n배열의 첫 번째 요소를 반환해요.\n\n```typescript\nconst firstElement = head(array);\n```\n\n## 사용법\n\n### `head(array)`\n\n배열이나 배열 형태 객체의 첫 번째 요소를 반환해요. 배열이 비어있거나 유효하지 않으면 `undefined`를 반환해요.\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\n// 숫자 배열의 첫 번째 요소\nconst numbers = [1, 2, 3, 4];\nconst first = head(numbers);\n// first는 1\n\n// 문자열 배열의 첫 번째 요소\nconst strings = ['a', 'b', 'c'];\nconst firstChar = head(strings);\n// firstChar는 'a'\n\n// 배열 형태 객체\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst firstItem = head(arrayLike);\n// firstItem은 'x'\n```\n\n빈 배열이나 유효하지 않은 입력은 `undefined`를 반환해요.\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst noElement = head(emptyArray);\n// noElement는 undefined\n\nhead(null); // undefined\nhead(undefined); // undefined\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 첫 번째 요소를 가져올 배열이나 배열 형태 객체예요.\n\n#### 반환 값\n\n(`T | undefined`): 배열의 첫 번째 요소를 반환하고, 배열이 비어있거나 유효하지 않으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/includes.md",
    "content": "# includes (Lodash 호환성)\n\n::: warning `Array.prototype.includes`를 사용하세요\n\n이 `includes` 함수는 객체 순회와 SameValueZero 비교 처리로 인해 느리게 동작해요. 배열에서는 JavaScript의 기본 `Array.prototype.includes` 메소드가 더 빠르고 표준화되어 있어요.\n\n대신 더 빠르고 현대적인 `Array.prototype.includes`를 사용하세요.\n\n:::\n\n배열, 객체, 또는 문자열에서 특정 값이 포함되어 있는지 확인해요.\n\n```typescript\nconst hasValue = includes(collection, target, fromIndex);\n```\n\n## 사용법\n\n### `includes(collection, target, fromIndex)`\n\n배열, 객체, 문자열에서 특정 값이 존재하는지 확인하고 싶을 때 `includes`를 사용하세요. SameValueZero 방식으로 값을 비교해요.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 배열에서 값 찾기\nincludes([1, 2, 3], 2);\n// Returns: true\n\n// 객체의 값들 중에서 찾기\nincludes({ a: 1, b: 'a', c: NaN }, 'a');\n// Returns: true\n\n// 문자열에서 부분 문자열 찾기\nincludes('hello world', 'world');\n// Returns: true\n```\n\n특정 인덱스부터 검색을 시작할 수 있어요.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 인덱스 2부터 검색\nincludes([1, 2, 3, 2], 2, 2);\n// Returns: true (인덱스 3에 있음)\n\n// 음수 인덱스는 끝에서부터 계산\nincludes([1, 2, 3], 2, -2);\n// Returns: true\n```\n\n`null`이나 `undefined`는 항상 `false`를 반환해요.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes(null, 1); // false\nincludes(undefined, 1); // false\n```\n\n문자열에서도 부분 문자열을 검색할 수 있어요.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 처음부터 검색\nincludes('hello', 'e');\n// Returns: true\n\n// 특정 위치부터 검색\nincludes('hello', 'e', 2);\n// Returns: false (인덱스 2 이후에는 'e'가 없음)\n```\n\n`NaN` 값도 올바르게 찾을 수 있어요.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes([1, 2, NaN], NaN);\n// Returns: true\n\nincludes({ a: 1, b: NaN }, NaN);\n// Returns: true\n```\n\n#### 파라미터\n\n- `collection` (`Array | Record<string, any> | string | null | undefined`): 검색할 배열, 객체, 또는 문자열이에요.\n- `target` (`any`): 찾으려는 값이에요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 음수 값은 끝에서부터 계산해요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 존재하면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/indexOf.md",
    "content": "# indexOf (Lodash 호환성)\n\n::: warning `Array.prototype.indexOf`나 `Array.prototype.findIndex`를 사용하세요\n\n이 `indexOf` 함수는 `NaN` 처리를 위한 추가 로직으로 인해 느리게 동작해요.\n\n`NaN`을 찾지 않는다면 더 빠른 `Array.prototype.indexOf`를, `NaN`을 포함해서 찾으려면 `Array.prototype.findIndex`와 `Number.isNaN`을 사용하세요.\n\n:::\n\n배열에서 주어진 요소가 첫 번째로 일치하는 인덱스를 찾아요.\n\n```typescript\nconst index = indexOf(array, searchElement, fromIndex);\n```\n\n## 사용법\n\n### `indexOf(array, searchElement, fromIndex?)`\n\n`Array.prototype.indexOf`와 거의 같게 동작하는데요, `NaN` 값을 찾을 수 있어요. 배열에서 특정 값의 위치를 알아야 할 때 사용하세요.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\n// 숫자 배열에서 요소 찾기\nconst array = [1, 2, 3, 4];\nindexOf(array, 3); // => 2\n\n// NaN 값 찾기 (Array.prototype.indexOf는 찾지 못해요)\nconst arrayWithNaN = [1, 2, NaN, 4];\nindexOf(arrayWithNaN, NaN); // => 2\n```\n\n특정 인덱스부터 검색을 시작할 수 있어요.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 1, 2, 3];\nindexOf(array, 2, 2); // => 4 (인덱스 2부터 검색 시작)\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nindexOf(null, 1); // => -1\nindexOf(undefined, 1); // => -1\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 검색할 배열.\n\n::: info `array`는 `ArrayLike<T>`이거나 `null` 또는 `undefined`일 수 있어요\n\nlodash와 완전히 호환되도록 `indexOf` 함수는 `array`를 다음과 같이 처리해요.\n\n- `array`가 `ArrayLike<T>`인 경우, 배열로 변환하기 위해 `Array.from(...)`을 사용해요.\n- `array`가 `null` 또는 `undefined`인 경우, 빈 배열로 간주돼요.\n\n:::\n\n- `searchElement` (`T`): 찾을 값이에요.\n- `fromIndex` (`number`, 선택): 검색을 시작할 인덱스예요. 음수를 사용하면 배열 끝에서부터 계산해요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 배열에서 주어진 값과 첫 번째로 일치하는 요소의 인덱스를 반환해요. 일치하는 요소를 찾을 수 없으면 `-1`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/initial.md",
    "content": "# initial (Lodash 호환성)\n\n::: warning `es-toolkit`의 [initial](../../array/initial.md)을 사용하세요\n\n이 `initial` 함수는 `ArrayLike` 객체 처리와 배열 변환 과정으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [initial](../../array/initial.md)을 사용하세요.\n\n:::\n\n배열에서 마지막 요소를 제외한 모든 요소를 새 배열로 반환해요.\n\n```typescript\nconst result = initial(array);\n```\n\n## 사용법\n\n### `initial(array)`\n\n배열이나 배열 형태 객체에서 마지막 요소를 제외한 모든 요소를 포함하는 새 배열을 반환해요. 배열이 비어있거나 요소가 하나뿐이면 빈 배열을 반환해요.\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\n// 숫자 배열에서 마지막 요소 제외\nconst numbers = [1, 2, 3, 4];\nconst result = initial(numbers);\n// result는 [1, 2, 3]\n\n// 문자열 배열에서 마지막 요소 제외\nconst strings = ['a', 'b', 'c', 'd'];\nconst withoutLast = initial(strings);\n// withoutLast는 ['a', 'b', 'c']\n\n// 배열 형태 객체\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst items = initial(arrayLike);\n// items는 ['x', 'y']\n```\n\n빈 배열이나 유효하지 않은 입력은 빈 배열을 반환해요.\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst result = initial(emptyArray);\n// result는 []\n\nconst singleItem = [42];\nconst onlyOne = initial(singleItem);\n// onlyOne은 []\n\ninitial(null); // []\ninitial(undefined); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 마지막 요소를 제외할 배열이나 배열 형태 객체예요.\n\n#### 반환 값\n\n(`T[]`): 마지막 요소를 제외한 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/intersection.md",
    "content": "# intersection (Lodash 호환성)\n\n::: warning `es-toolkit`의 [intersection](../../array/intersection.md)을 사용하세요\n\n이 `intersection` 함수는 `null`이나 `undefined` 처리, 다중 배열 지원, 중복 제거 과정으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [intersection](../../array/intersection.md)을 사용하세요.\n\n:::\n\n여러 배열의 교집합을 구해요.\n\n```typescript\nconst result = intersection(...arrays);\n```\n\n## 사용법\n\n### `intersection(...arrays)`\n\n여러 배열에서 공통으로 존재하는 요소들을 찾아서 새 배열로 반환해요. 결과는 중복이 제거되고 첫 번째 배열의 순서를 유지해요.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\n// 두 배열의 교집합\nconst array1 = [1, 2, 3, 4];\nconst array2 = [2, 3, 5, 6];\nconst result = intersection(array1, array2);\n// result는 [2, 3]\n\n// 세 개 배열의 교집합\nconst array3 = [3, 4, 7, 8];\nconst multiResult = intersection(array1, array2, array3);\n// multiResult는 [3]\n\n// 문자열 배열\nconst strings1 = ['a', 'b', 'c'];\nconst strings2 = ['b', 'c', 'd'];\nconst stringResult = intersection(strings1, strings2);\n// stringResult는 ['b', 'c']\n\n// 배열 형태 객체\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 3, 2: 4, length: 3 };\nconst likeResult = intersection(arrayLike1, arrayLike2);\n// likeResult는 [2, 3]\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 2, 3];\nconst result1 = intersection(array1, null);\n// result1는 []\n\nconst result2 = intersection(null, undefined);\n// result2는 []\n```\n\n중복된 요소가 있어도 결과에서는 제거돼요.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 1, 2, 3];\nconst array2 = [1, 2, 2, 4];\nconst result = intersection(array1, array2);\n// result는 [1, 2] (중복 제거됨)\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 교집합을 구할 배열들이에요. 배열 형태 객체나 null/undefined도 허용해요.\n\n#### 반환 값\n\n(`T[]`): 모든 배열에 공통으로 존재하는 요소들의 새 배열을 반환해요. 중복은 제거되고 첫 번째 배열의 순서를 따라요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/intersectionBy.md",
    "content": "# intersectionBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [intersectionBy](../../array/intersectionBy.md)를 사용하세요\n\n이 `intersectionBy` 함수는 복잡한 조건 처리, 다중 배열 지원, 프로퍼티 경로 해석 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [intersectionBy](../../array/intersectionBy.md)를 사용하세요.\n\n:::\n\n주어진 조건 함수를 사용해서 여러 배열의 교집합을 구해요.\n\n```typescript\nconst result = intersectionBy(...arrays, iteratee);\n```\n\n## 사용법\n\n### `intersectionBy(...arrays, iteratee)`\n\n여러 배열에서 각 요소를 주어진 조건 함수로 변환한 값을 기준으로 교집합을 구해요. 조건은 함수, 프로퍼티 이름, 부분 객체 등 다양한 형태로 제공할 수 있어요.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\n// 함수로 교집합 구하기\nconst array1 = [2.1, 1.2];\nconst array2 = [2.3, 3.4];\nconst result = intersectionBy(array1, array2, Math.floor);\n// result는 [2.1] (Math.floor 기준으로 2가 공통)\n\n// 프로퍼티로 교집합 구하기\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst byId = intersectionBy(users1, users2, 'id');\n// byId는 [{ id: 2, name: 'jane' }]\n\n// 세 개 배열의 교집합\nconst array3 = [2.5, 4.1];\nconst multiResult = intersectionBy(array1, array2, array3, Math.floor);\n// multiResult는 [2.1]\n\n// 배열 형태 객체\nconst arrayLike1 = { 0: { x: 1 }, 1: { x: 2 }, length: 2 };\nconst arrayLike2 = { 0: { x: 2 }, 1: { x: 3 }, length: 2 };\nconst byProperty = intersectionBy(arrayLike1, arrayLike2, 'x');\n// byProperty는 [{ x: 2 }]\n```\n\n`null`이나 `undefined` 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst result = intersectionBy(array1, null, 'x');\n// result는 []\n```\n\n부분 객체나 프로퍼티-값 쌍으로도 조건을 지정할 수 있어요.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst products1 = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'vegetable', name: 'carrot' },\n];\nconst products2 = [\n  { category: 'fruit', name: 'banana' },\n  { category: 'meat', name: 'beef' },\n];\n\n// 부분 객체로 조건 지정\nconst byCategory = intersectionBy(products1, products2, { category: 'fruit' });\n// 프로퍼티-값 쌍으로 조건 지정\nconst byCategoryPair = intersectionBy(products1, products2, ['category', 'fruit']);\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 교집합을 구할 배열들이에요.\n- `iteratee` (`Function | PropertyKey | Array | Object`): 각 요소를 변환할 조건이에요. 함수, 프로퍼티 이름, 프로퍼티-값 쌍, 또는 부분 객체일 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 변환된 값을 기준으로 모든 배열에 공통으로 존재하는 요소들의 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/intersectionWith.md",
    "content": "# intersectionWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 [intersectionWith](../../array/intersectionWith.md)를 사용하세요\n\n이 `intersectionWith` 함수는 `null`이나 `undefined` 처리, 다양한 오버로딩 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [intersectionWith](../../array/intersectionWith.md)를 사용하세요.\n\n:::\n\n사용자 정의 비교 함수를 사용해서 모든 배열에 포함된 공통 요소들의 배열을 만들어요.\n\n```typescript\nconst result = intersectionWith(array, ...otherArrays, comparator);\n```\n\n## 사용법\n\n### `intersectionWith(array, ...otherArrays, comparator)`\n\n사용자 정의 비교 함수를 사용해서 첫 번째 배열과 나머지 배열들의 교집합을 구해요. 비교 함수로 각 요소가 동일한지 판단하고, 모든 배열에 포함된 요소들만 결과로 반환해요.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nconst objects = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst others = [\n  { id: 1, name: 'john' },\n  { id: 3, name: 'joe' },\n];\n\nintersectionWith(objects, others, (a, b) => a.id === b.id);\n// => [{ id: 1, name: 'john' }]\n\n// 여러 배열과 비교할 수도 있어요\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst array2 = [{ x: 1 }, { x: 3 }];\nconst array3 = [{ x: 1 }, { x: 4 }];\n\nintersectionWith(array1, array2, array3, (a, b) => a.x === b.x);\n// => [{ x: 1 }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nintersectionWith(null, [1, 2], (a, b) => a === b); // []\nintersectionWith([1, 2], undefined, (a, b) => a === b); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 비교할 첫 번째 배열이에요.\n- `...otherArrays` (`Array<ArrayLike<U> | ((a: T, b: T | U) => boolean)>`): 비교할 나머지 배열들과 마지막 요소로 비교 함수예요.\n- `comparator` (`(a: T, b: T | U) => boolean`): 두 요소가 같은지 판단하는 함수예요.\n\n#### 반환 값\n\n(`T[]`): 모든 배열에서 공통으로 찾은 요소들의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/invokeMap.md",
    "content": "# invokeMap (Lodash 호환성)\n\n::: warning `Array.map`과 `Object.values(...).map`를 사용하세요\n\n이 `invokeMap` 함수는 `null`이나 `undefined` 처리, 메서드 탐색 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.map`과 `Object.values(...).map`를 사용하세요.\n\n예를 들어, `invokeMap([1, 2, 3], 'toString')` 은 `[1, 2, 3].map(x => x.toString())`처럼 쓸 수 있어요.\n\n:::\n\n배열이나 객체의 각 요소에서 지정한 메서드를 호출하고, 결과를 배열로 반환해요.\n\n```typescript\nconst result = invokeMap(collection, method, ...args);\n```\n\n## 사용법\n\n### `invokeMap(collection, method, ...args)`\n\n배열이나 객체의 각 요소에서 지정한 메서드를 호출해요. 메서드 이름을 문자열로 전달하거나 직접 함수를 전달할 수 있어요. 추가 인자들은 각 메서드 호출 시 전달돼요.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\n// 배열의 각 요소에서 메서드 호출하기\ninvokeMap(\n  [\n    [5, 1, 7],\n    [3, 2, 1],\n  ],\n  'sort'\n);\n// => [[5, 1, 7].sort(), [3, 2, 1].sort()]\n// => [[1, 5, 7], [1, 2, 3]]\n\n// 인자와 함께 메서드 호출하기\ninvokeMap([123, 456], 'toString', 2);\n// => [(123).toString(2), (456).toString(2)]\n// => ['1111011', '111001000']\n\n// 함수를 직접 전달하기\ninvokeMap(['a', 'b', 'c'], String.prototype.toUpperCase);\n// => [String.prototype.toUpperCase('a'), String.prototype.toUpperCase('b'), String.prototype.toUpperCase('c')]\n// => ['A', 'B', 'C']\n```\n\n객체의 경우 각 값에서 메서드를 호출해요.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\nconst obj = { a: 1.1, b: 2.2, c: 3.3 };\ninvokeMap(obj, 'toFixed', 1);\n// => ['1.1', '2.2', '3.3']\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\ninvokeMap(null, 'toString'); // []\ninvokeMap(undefined, 'toString'); // []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 메서드를 호출할 배열이나 객체예요.\n- `method` (`string | ((...args: any[]) => R)`): 호출할 메서드 이름이나 함수예요.\n- `...args` (`any[]`): 각 메서드 호출 시 전달할 추가 인자들이에요.\n\n#### 반환 값\n\n(`Array<R | undefined>`): 각 메서드 호출 결과를 담은 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/join.md",
    "content": "# join (Lodash 호환성)\n\n::: warning `Array.prototype.join()`을 사용하세요\n\n이 `join` 함수는 ArrayLike 객체 처리, null/undefined 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.join()`을 사용하세요.\n\n:::\n\n배열의 요소를 문자열로 결합해요.\n\n```typescript\nconst result = join(array, separator);\n```\n\n## 사용법\n\n### `join(array, separator?)`\n\n배열의 모든 요소를 하나의 문자열로 합칠 때 `join`을 사용하세요. 각 요소 사이에 구분자를 넣어서 연결해요.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\n// 문자열 배열 결합\nconst arr = ['a', 'b', 'c'];\njoin(arr, '~'); // => \"a~b~c\"\n\n// 숫자 배열 결합\nconst numbers = [1, 2, 3];\njoin(numbers, '-'); // => \"1-2-3\"\n```\n\n구분자를 생략하면 쉼표(`,`)가 기본값으로 사용돼요.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(['a', 'b', 'c']); // => \"a,b,c\"\n```\n\n`null`이나 `undefined`는 빈 배열로 처리돼요.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(null, '-'); // => \"\"\njoin(undefined, '-'); // => \"\"\n```\n\n#### 파라미터\n\n- `array` (`T[]`) - 결합할 배열이에요.\n\n::: info `array`는 `ArrayLike<T>`이거나 `null` 또는 `undefined`일 수 있어요\n\nlodash와 완전히 호환되도록 `join` 함수는 `array`를 다음과 같이 처리해요.\n\n- `array`가 `ArrayLike<T>`인 경우, 배열로 변환하기 위해 `Array.from(...)`을 사용해요.\n- `array`가 `null` 또는 `undefined`인 경우, 빈 배열로 간주돼요.\n\n:::\n\n- `separator` (`string`, 선택) - 요소를 결합하는 데 사용하는 구분자예요. 기본값은 쉼표(`,`)예요.\n\n#### 반환 값\n\n(`string`): 지정된 구분자로 배열의 모든 요소가 결합된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/keyBy.md",
    "content": "# keyBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [keyBy](../../array/keyBy.md)를 사용하세요\n\n이 `keyBy` 함수는 `null`이나 `undefined` 처리, 다양한 매개변수 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [keyBy](../../array/keyBy.md)를 사용하세요.\n\n:::\n\n컬렉션의 요소들을 지정된 키를 기준으로 객체로 구성해요.\n\n```typescript\nconst result = keyBy(collection, iteratee);\n```\n\n## 사용법\n\n### `keyBy(collection, iteratee)`\n\n배열이나 객체의 각 요소를 지정된 키 생성 함수나 속성 이름을 사용해서 객체로 구성해요. 같은 키를 가진 요소가 여러 개 있으면 마지막 요소가 사용돼요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\n// 속성 이름으로 키 생성하기\nconst array = [\n  { dir: 'left', code: 97 },\n  { dir: 'right', code: 100 },\n];\n\nkeyBy(array, 'dir');\n// => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } }\n\n// 함수로 키 생성하기\nkeyBy(array, o => String.fromCharCode(o.code));\n// => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n\n// 객체에서도 사용 가능해요\nconst obj = {\n  a: { id: 1, name: 'john' },\n  b: { id: 2, name: 'jane' },\n};\nkeyBy(obj, 'name');\n// => { john: { id: 1, name: 'john' }, jane: { id: 2, name: 'jane' } }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\nkeyBy(null, 'id'); // {}\nkeyBy(undefined, 'id'); // {}\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | null | undefined`): 키로 구성할 배열이나 객체예요.\n- `iteratee` (`ValueIterateeCustom<T, PropertyKey>`, 선택): 키를 생성할 함수나 속성 이름이에요. 생략하면 요소 자체를 키로 사용해요.\n\n#### 반환 값\n\n(`Record<string, T>`): 각 요소가 생성된 키에 매핑된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/last.md",
    "content": "# last (Lodash 호환성)\n\n::: warning `es-toolkit`의 [last](../../array/last.md)를 사용하세요\n\n이 `last` 함수는 `null`이나 `undefined` 처리로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [last](../../array/last.md)를 사용하세요.\n\n:::\n\n배열의 마지막 요소를 반환해요.\n\n```typescript\nconst lastElement = last(array);\n```\n\n## 사용법\n\n### `last(array)`\n\n배열의 맨 뒤 요소를 가져오고 싶을 때 `last`를 사용하세요. 배열이 비어있으면 `undefined`를 반환해요.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 숫자 배열의 마지막 요소\nlast([1, 2, 3, 4, 5]);\n// Returns: 5\n\n// 문자열 배열의 마지막 요소\nlast(['a', 'b', 'c']);\n// Returns: 'c'\n\n// 객체 배열의 마지막 요소\nconst users = [{ name: 'Alice' }, { name: 'Bob' }];\nlast(users);\n// Returns: { name: 'Bob' }\n```\n\n빈 배열이나 `null`, `undefined`는 `undefined`를 반환해요.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 빈 배열\nlast([]);\n// Returns: undefined\n\n// null 배열\nlast(null);\n// Returns: undefined\n\n// undefined 배열\nlast(undefined);\n// Returns: undefined\n```\n\n유사 배열 객체도 지원해요.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 유사 배열 객체\nconst arrayLike = { 0: 'first', 1: 'second', length: 2 };\nlast(arrayLike);\n// Returns: 'second'\n\n// 문자열도 유사 배열 객체\nlast('hello');\n// Returns: 'o'\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 마지막 요소를 가져올 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열의 마지막 요소를 반환하고, 배열이 비어있거나 `null`, `undefined`이면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/lastIndexOf.md",
    "content": "# lastIndexOf (Lodash 호환성)\n\n::: warning `Array.lastIndexOf`를 사용하세요\n\n이 `lastIndexOf` 함수는 `null`이나 `undefined` 처리, `NaN` 값 탐색 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.lastIndexOf`를 사용하세요.\n\n:::\n\n배열에서 지정한 요소가 마지막으로 나타나는 인덱스를 찾아요.\n\n```typescript\nconst index = lastIndexOf(array, searchElement, fromIndex);\n```\n\n## 사용법\n\n### `lastIndexOf(array, searchElement, fromIndex)`\n\n배열에서 지정한 요소가 마지막으로 나타나는 인덱스를 반환해요. 네이티브 `Array.lastIndexOf`와 비슷하지만 `NaN` 값도 찾을 수 있어요.\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\n// 일반적인 사용\nlastIndexOf([1, 2, 1, 2], 2);\n// => 3\n\n// 시작 인덱스 지정하기\nlastIndexOf([1, 2, 1, 2], 2, 2);\n// => 1\n\n// NaN 값 찾기 (네이티브 lastIndexOf는 NaN을 찾을 수 없어요)\nlastIndexOf([1, 2, NaN, 4, NaN], NaN);\n// => 4\n\n// 음수 인덱스 사용하기\nlastIndexOf([1, 2, 3, 4], 3, -2);\n// => 2\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\nlastIndexOf(null, 1); // -1\nlastIndexOf(undefined, 1); // -1\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 검색할 배열이에요.\n- `searchElement` (`T`): 찾을 요소예요.\n- `fromIndex` (`true | number`, 선택): 검색을 시작할 인덱스예요. `true`를 전달하면 배열 끝부터 검색해요. 기본값은 `array.length - 1`이에요.\n\n#### 반환 값\n\n(`number`): 마지막으로 일치하는 요소의 인덱스를 반환해요. 찾을 수 없으면 `-1`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/map.md",
    "content": "# map (Lodash 호환성)\n\n::: warning `Array.prototype.map`을 사용하세요\n\n이 `map` 함수는 `null`이나 `undefined` 처리, 객체 순회, 속성 추출 등 추가 기능으로 인해 느리게 동작해요. 배열을 변환할 때는 JavaScript의 기본 `Array.prototype.map` 메소드가 더 빠르고 간단해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.map`을 사용하세요.\n\n:::\n\n배열이나 객체의 각 요소를 변환하여 새로운 배열을 만들어요.\n\n```typescript\nconst mapped = map(collection, iteratee);\n```\n\n## 사용법\n\n### `map(collection, iteratee)`\n\n배열, 객체, 또는 배열 형태의 객체의 각 요소를 변환하고 싶을 때 `map`을 사용하세요. 각 요소에 대해 반복 함수를 실행하고 결과를 새 배열로 반환해요.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\n// 배열의 각 요소를 두 배로 만들어요.\nmap([1, 2, 3], x => x * 2);\n// Returns: [2, 4, 6]\n\n// 객체의 값들을 변환해요.\nconst obj = { a: 1, b: 2 };\nmap(obj, (value, key) => `${key}:${value}`);\n// Returns: ['a:1', 'b:2']\n\n// 속성을 추출해요.\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, 'name');\n// Returns: ['John', 'Jane']\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nmap(null, x => x); // []\nmap(undefined, x => x); // []\n```\n\n문자열로 속성 경로를 지정하면 중첩된 속성도 추출할 수 있어요.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [{ info: { name: 'John' } }, { info: { name: 'Jane' } }];\nmap(users, 'info.name');\n// Returns: ['John', 'Jane']\n```\n\n객체를 전달하면 각 요소가 그 객체와 일치하는지 확인해요.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, { age: 30 });\n// Returns: [true, false]\n```\n\n#### 파라미터\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 순회할 배열이나 객체예요.\n- `iteratee` (`function | string | object`, 선택): 각 요소에 대해 실행할 함수나 속성 경로, 또는 일치시킬 객체예요. 제공하지 않으면 각 요소를 그대로 반환해요.\n  - 함수인 경우 `(value, key, collection)` 형태로 호출돼요.\n  - 문자열인 경우 해당 속성을 추출해요.\n  - 객체인 경우 각 요소가 객체와 일치하는지 확인해요.\n\n#### 반환 값\n\n(`U[]`): 변환된 값들의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/nth.md",
    "content": "# nth (Lodash 호환성)\n\n::: warning 배열 인덱스 접근을 사용하세요\n\n이 `nth` 함수는 `null`이나 `undefined` 처리, 정수 변환 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 배열 인덱스 접근 (`array[index]` 또는 `array.at(index)`)을 사용하세요.\n\n:::\n\n배열에서 지정한 인덱스의 요소를 가져와요.\n\n```typescript\nconst element = nth(array, index);\n```\n\n## 사용법\n\n### `nth(array, index)`\n\n배열에서 지정한 인덱스의 요소를 반환해요. 음수 인덱스를 사용하면 배열 끝에서부터 계산해요. 인덱스가 범위를 벗어나면 `undefined`를 반환해요.\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 양수 인덱스\nnth(array, 1);\n// => 2\n\n// 음수 인덱스 (끝에서부터)\nnth(array, -1);\n// => 5\n\nnth(array, -2);\n// => 4\n\n// 범위를 벗어난 인덱스\nnth(array, 10);\n// => undefined\n\nnth(array, -10);\n// => undefined\n```\n\n`null`이나 `undefined`는 `undefined`로 처리해요.\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nnth(null, 0); // undefined\nnth(undefined, 0); // undefined\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 가져올 배열이에요.\n- `index` (`number`, 선택): 가져올 요소의 인덱스예요. 음수면 끝에서부터 계산해요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`T | undefined`): 지정한 인덱스의 요소를 반환해요. 인덱스가 범위를 벗어나면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/orderBy.md",
    "content": "# orderBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [orderBy](../../array/orderBy.md)를 사용하세요\n\n이 `orderBy` 함수는 `null`이나 `undefined` 처리, 복잡한 경로 탐색, 다양한 정렬 기준 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [orderBy](../../array/orderBy.md)를 사용하세요.\n\n:::\n\n여러 기준으로 컬렉션의 요소들을 정렬해요.\n\n```typescript\nconst result = orderBy(collection, criteria, orders);\n```\n\n## 사용법\n\n### `orderBy(collection, criteria, orders)`\n\n배열이나 객체의 요소들을 지정된 기준과 정렬 순서에 따라 정렬해요. 여러 기준을 사용할 수 있고, 각 기준마다 오름차순(`'asc'`) 또는 내림차순(`'desc'`) 정렬을 지정할 수 있어요.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'fred', age: 48 },\n  { name: 'barney', age: 34 },\n  { name: 'fred', age: 40 },\n  { name: 'barney', age: 36 },\n];\n\n// 이름 오름차순, 나이 내림차순으로 정렬\norderBy(users, ['name', 'age'], ['asc', 'desc']);\n// => [\n//   { name: 'barney', age: 36 },\n//   { name: 'barney', age: 34 },\n//   { name: 'fred', age: 48 },\n//   { name: 'fred', age: 40 }\n// ]\n\n// 함수로 정렬 기준 지정하기\norderBy(users, [user => user.name, user => user.age], ['asc', 'desc']);\n// => 위와 동일한 결과\n\n// 단일 기준으로 정렬\norderBy(users, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'fred', age: 40 }, ...]\n```\n\n객체의 경우 값들을 정렬해요.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { name: 'fred', age: 48 },\n  b: { name: 'barney', age: 34 },\n};\n\norderBy(obj, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'barney', age: 34 }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\norderBy(null, 'name'); // []\norderBy(undefined, 'age'); // []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 정렬할 배열이나 객체예요.\n- `criteria` (`Criterion<T> | Array<Criterion<T>>`, 선택): 정렬 기준이에요. 속성 이름, 속성 경로, 함수 등을 사용할 수 있어요. 기본값은 `[null]`이에요.\n- `orders` (`unknown | unknown[]`, 선택): 각 기준의 정렬 순서예요. `'asc'`(오름차순), `'desc'`(내림차순), `true`(오름차순), `false`(내림차순)를 사용할 수 있어요. 기본값은 `[]`이에요.\n\n#### 반환 값\n\n(`T[]`): 정렬된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/partition.md",
    "content": "# partition (Lodash 호환성)\n\n::: warning `es-toolkit`의 [partition](../../array/partition.md)를 사용하세요\n\n이 `partition` 함수는 `null`이나 `undefined` 처리, 다양한 조건 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [partition](../../array/partition.md)를 사용하세요.\n\n:::\n\n컬렉션의 요소들을 조건에 따라 두 그룹으로 나누어요.\n\n```typescript\nconst [truthy, falsy] = partition(collection, predicate);\n```\n\n## 사용법\n\n### `partition(collection, predicate)`\n\n배열이나 객체의 요소들을 주어진 조건 함수에 따라 두 그룹으로 나누어요. 첫 번째 그룹은 조건이 참인 요소들이고, 두 번째 그룹은 조건이 거짓인 요소들이에요.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\n// 숫자 배열을 짝수와 홀수로 나누기\npartition([1, 2, 3, 4, 5, 6], n => n % 2 === 0);\n// => [[2, 4, 6], [1, 3, 5]]\n\n// 속성 이름으로 조건 지정하기\nconst users = [\n  { name: 'john', active: true },\n  { name: 'jane', active: false },\n  { name: 'bob', active: true },\n];\n\npartition(users, 'active');\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// 객체 조건으로 필터링하기\npartition(users, { active: true });\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// 배열 조건으로 필터링하기\npartition(users, ['name', 'john']);\n// => [\n//   [{ name: 'john', active: true }],\n//   [{ name: 'jane', active: false }, { name: 'bob', active: true }]\n// ]\n```\n\n객체의 경우 값들을 분할해요.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { score: 90 },\n  b: { score: 40 },\n  c: { score: 80 },\n};\n\npartition(obj, item => item.score >= 80);\n// => [[{ score: 90 }, { score: 80 }], [{ score: 40 }]]\n```\n\n`null`이나 `undefined`는 빈 배열들로 처리해요.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\npartition(null, x => x > 0); // [[], []]\npartition(undefined, 'active'); // [[], []]\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): 분할할 배열이나 객체예요.\n- `predicate` (`((value: T) => unknown) | Partial<T> | [PropertyKey, any] | PropertyKey`, 선택): 각 요소를 테스트할 조건이에요. 함수, 부분 객체, 속성-값 배열, 속성 이름을 사용할 수 있어요. 기본값은 `identity`예요.\n\n#### 반환 값\n\n(`[T[], T[]]`): 조건을 만족하는 요소들의 배열과 만족하지 않는 요소들의 배열로 구성된 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/pull.md",
    "content": "# pull (Lodash 호환성)\n\n::: warning `es-toolkit`의 [pull](../../array/pull.md)을 사용하세요\n\n이 `pull` 함수는 Lodash의 호환성을 위한 함수로, 더 복잡한 타입 처리와 오버로딩으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [pull](../../array/pull.md)을 사용하세요.\n\n:::\n\n배열에서 지정한 값들을 모두 제거해요.\n\n```typescript\nconst result = pull(array, ...valuesToRemove);\n```\n\n## 사용법\n\n### `pull(array, ...valuesToRemove)`\n\n배열에서 지정한 값들을 모두 제거하고 원본 배열을 수정해요. 배열을 복사하지 않고 원본 배열을 직접 변경하므로 메모리를 절약할 수 있어요.\n\n```typescript\nimport { pull } from 'es-toolkit/compat';\n\n// 숫자 배열에서 특정 값들 제거\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npull(numbers, 2, 3);\nconsole.log(numbers); // [1, 4, 5]\n\n// 문자열 배열에서 특정 값들 제거\nconst fruits = ['apple', 'banana', 'apple', 'cherry'];\npull(fruits, 'apple');\nconsole.log(fruits); // ['banana', 'cherry']\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 수정할 배열이에요.\n- `...valuesToRemove` (`T[]`): 배열에서 제거할 값들이에요.\n\n#### 반환 값\n\n(`T[]`): 수정된 원본 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/pullAll.md",
    "content": "# pullAll (Lodash 호환성)\n\n배열에서 지정한 값들을 담은 배열의 모든 값을 제거해요.\n\n```typescript\nconst result = pullAll(array, valuesToRemove);\n```\n\n## 사용법\n\n### `pullAll(array, valuesToRemove)`\n\n배열에서 `valuesToRemove` 배열에 포함된 모든 값을 제거하고 원본 배열을 수정해요. `pull` 함수와 비슷하지만, 제거할 값들을 배열로 받아요.\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\n// 숫자 배열에서 특정 값들 제거\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npullAll(numbers, [2, 3]);\nconsole.log(numbers); // [1, 4, 5]\n\n// 문자열 배열에서 특정 값들 제거\nconst fruits = ['apple', 'banana', 'apple', 'cherry', 'banana'];\npullAll(fruits, ['apple', 'banana']);\nconsole.log(fruits); // ['cherry']\n```\n\n빈 배열이나 `null`, `undefined`를 넣으면 아무것도 제거하지 않아요.\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3];\npullAll(numbers, []);\nconsole.log(numbers); // [1, 2, 3]\n\npullAll(numbers, null);\nconsole.log(numbers); // [1, 2, 3]\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 수정할 배열이에요.\n- `valuesToRemove` (`ArrayLike<T>`, 선택): 배열에서 제거할 값들을 담은 배열이에요. 기본값은 `[]`이에요.\n\n#### 반환 값\n\n(`T[]`): 수정된 원본 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/pullAllBy.md",
    "content": "# pullAllBy (Lodash 호환성)\n\n반복자로 변환된 값을 기준으로 지정된 값들을 배열에서 제거해요.\n\n```typescript\nconst modified = pullAllBy(array, valuesToRemove, iteratee);\n```\n\n## 사용법\n\n### `pullAllBy(array, values, iteratee)`\n\n제공된 iteratee 함수를 통해 각 요소를 변환한 값을 기준으로 배열에서 지정된 값들을 제거하세요. 원본 배열이 변경되고 변경된 배열이 반환돼요.\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\n// 속성값으로 비교해서 제거해요\nconst array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\npullAllBy(array, [{ x: 1 }, { x: 3 }], 'x');\nconsole.log(array); // [{ x: 2 }]\n\n// 함수로 값을 변환해서 비교해요\nconst numbers = [1, 2, 3, 4, 5];\npullAllBy(numbers, [2, 4], n => n % 2);\nconsole.log(numbers); // [1, 3, 5] (홀수만 남음)\n```\n\n배열이 비어있거나 `null`, `undefined`면 원본 배열을 그대로 반환해요.\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\npullAllBy([], [1, 2], x => x); // []\npullAllBy(null as any, [1, 2], x => x); // null\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 변경할 배열이에요.\n- `values` (`ArrayLike<T>`, 선택): 제거할 값들의 배열이에요.\n- `iteratee` (`ValueIteratee<T>`, 선택): 각 요소에 적용할 iteratee 함수예요. 속성 이름, 부분 객체, 또는 함수를 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 지정된 값들이 제거된 원본 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/pullAllWith.md",
    "content": "# pullAllWith (Lodash 호환성)\n\n비교 함수를 사용해서 지정된 값들을 배열에서 제거해요.\n\n```typescript\nconst modified = pullAllWith(array, valuesToRemove, comparator);\n```\n\n## 사용법\n\n### `pullAllWith(array, values, comparator)`\n\n제공된 비교 함수를 사용해서 배열에서 지정된 값들을 제거하세요. 원본 배열이 변경되고 변경된 배열이 반환돼요.\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\n// 객체 비교로 제거해요\nconst array = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\npullAllWith(array, [{ x: 3, y: 4 }], (a, b) => a.x === b.x && a.y === b.y);\nconsole.log(array); // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n\n// 문자열 길이로 비교해서 제거해요\nconst words = ['hello', 'world', 'test', 'code'];\npullAllWith(words, ['hi'], (a, b) => a.length === b.length);\nconsole.log(words); // ['hello', 'world', 'code'] ('test'가 'hi'와 같은 길이라서 제거됨)\n```\n\n배열이 비어있거나 `null`, `undefined`면 원본 배열을 그대로 반환해요.\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\npullAllWith([], [1], (a, b) => a === b); // []\npullAllWith(null as any, [1], (a, b) => a === b); // null\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 변경할 배열이에요.\n- `values` (`ArrayLike<T>`, 선택): 제거할 값들의 배열이에요.\n- `comparator` (`(a: T, b: T) => boolean`, 선택): 두 요소를 비교하는 함수예요. 두 요소가 같다고 판단되면 `true`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 지정된 값들이 제거된 원본 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/pullAt.md",
    "content": "# pullAt (Lodash 호환성)\n\n::: warning `es-toolkit`의 [pullAt](../../array/pullAt.md)을 사용하세요\n\n이 `pullAt` 함수는 복잡한 타입 처리와 오버로딩으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [pullAt](../../array/pullAt.md)을 사용하세요.\n\n:::\n\n지정된 인덱스에 있는 요소들을 배열에서 제거하고 제거된 요소들을 반환해요.\n\n```typescript\nconst removed = pullAt(array, ...indexes);\n```\n\n## 사용법\n\n### `pullAt(array, ...indexes)`\n\n배열에서 지정된 인덱스에 있는 요소들을 제거하고 제거된 요소들의 배열을 반환하세요. 원본 배열이 변경돼요.\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\n// 단일 인덱스로 제거해요\nconst array = [1, 2, 3, 4, 5];\nconst removed = pullAt(array, 1, 3);\nconsole.log(array); // [1, 3, 5]\nconsole.log(removed); // [2, 4]\n\n// 배열 형태의 인덱스로 제거해요\nconst colors = ['red', 'green', 'blue', 'yellow'];\nconst removedColors = pullAt(colors, [0, 2]);\nconsole.log(colors); // ['green', 'yellow']\nconsole.log(removedColors); // ['red', 'blue']\n```\n\n존재하지 않는 인덱스는 `undefined`로 처리돼요.\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\nconst numbers = [10, 20, 30];\nconst removed = pullAt(numbers, 1, 5);\nconsole.log(numbers); // [10, 30]\nconsole.log(removed); // [20, undefined]\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T>`): 변경할 배열이에요.\n- `...indexes` (`Array<number | number[]>`): 제거할 요소들의 인덱스예요. 개별 숫자나 숫자 배열로 전달할 수 있어요.\n\n#### 반환 값\n\n(`ArrayLike<T>`): 제거된 요소들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/reduce.md",
    "content": "# reduce (Lodash 호환성)\n\n::: warning `Array.prototype.reduce`나 `Object.values`와 `reduce`를 사용하세요\n\n이 `reduce` 함수는 복잡한 타입 처리와 다양한 입력 형태 지원으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.reduce` 메서드나 객체의 경우 `Object.values`와 함께 사용하세요.\n\n:::\n\n배열이나 객체를 하나의 값으로 줄여요.\n\n```typescript\nconst result = reduce(collection, iteratee, initialValue);\n```\n\n## 사용법\n\n### `reduce(collection, iteratee, initialValue)`\n\n배열이나 객체의 모든 요소를 하나씩 순회하면서 누적값을 계산하세요. 초기 값을 제공하면 그 값부터 시작하고, 그렇지 않으면 첫 번째 요소부터 시작해요.\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\n// 배열의 합계 구하기\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value, 0);\nconsole.log(sum); // 10\n\n// 객체 값들의 합계 구하기\nconst scores = { math: 95, english: 87, science: 92 };\nconst totalScore = reduce(scores, (acc, value) => acc + value, 0);\nconsole.log(totalScore); // 274\n```\n\n초기 값을 제공하지 않으면 첫 번째 요소가 초기 값이 되고 두 번째 요소부터 순회해요.\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (1 + 2 + 3 + 4)\n\n// 빈 배열이면 undefined가 반환돼요\nconst empty = [];\nconst result = reduce(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### 파라미터\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 순회할 배열이나 객체예요.\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 각 요소에 대해 호출할 함수예요. 누적값, 현재 값, 인덱스/키, 원본 배열/객체를 받아요.\n- `initialValue` (`any`, 선택): 누적값의 초기 값이에요. 제공하지 않으면 첫 번째 요소가 초기 값이 돼요.\n\n#### 반환 값\n\n(`any`): 모든 요소를 처리한 후의 최종 누적값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/reduceRight.md",
    "content": "# reduceRight (Lodash 호환성)\n\n::: warning `Array.prototype.reduceRight`나 `Object.values`와 `reduceRight`를 사용하세요\n\n이 `reduceRight` 함수는 복잡한 타입 처리와 다양한 입력 형태 지원으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.reduceRight` 메서드나 객체의 경우 `Object.values`와 `reduceRight`를 함께 사용하세요.\n\n:::\n\n배열이나 객체를 오른쪽부터 순회해서 하나의 값으로 줄여요.\n\n```typescript\nconst result = reduceRight(collection, iteratee, initialValue);\n```\n\n## 사용법\n\n### `reduceRight(collection, iteratee, initialValue)`\n\n배열이나 객체의 모든 요소를 오른쪽부터 왼쪽으로 순회하면서 누적값을 계산하세요. 초기 값을 제공하면 그 값부터 시작하고, 그렇지 않으면 마지막 요소부터 시작해요.\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\n// 배열을 문자열로 합치기 (오른쪽부터)\nconst letters = ['a', 'b', 'c', 'd'];\nconst result = reduceRight(letters, (acc, value) => acc + value, '');\nconsole.log(result); // 'dcba'\n\n// 객체 값들의 곱셈 (키 순서의 역순)\nconst numbers = { x: 2, y: 3, z: 4 };\nconst product = reduceRight(numbers, (acc, value) => acc * value, 1);\nconsole.log(product); // 24 (1 * 4 * 3 * 2)\n```\n\n초기 값을 제공하지 않으면 마지막 요소가 초기 값이 되고 뒤에서 두 번째 요소부터 순회해요.\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduceRight(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (4 + 3 + 2 + 1)\n\n// 빈 배열이면 undefined가 반환돼요\nconst empty = [];\nconst result = reduceRight(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### 파라미터\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 순회할 배열이나 객체예요.\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 각 요소에 대해 호출할 함수예요. 누적값, 현재 값, 인덱스/키, 원본 배열/객체를 받아요.\n- `initialValue` (`any`, 선택): 누적값의 초기 값이에요. 제공하지 않으면 마지막 요소가 초기 값이 돼요.\n\n#### 반환 값\n\n(`any`): 모든 요소를 처리한 후의 최종 누적값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/reject.md",
    "content": "# reject (Lodash 호환성)\n\n::: warning `Array.filter()`를 사용하세요\n\n이 `reject` 함수는 Lodash와의 호환성을 위해 여러 형태의 predicate를 지원하므로 복잡하게 구현되어 있어요. 간단한 함수 predicate를 사용하는 경우에는 `Array.filter()`가 더 간단하고 빠르게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.filter()`를 사용하세요. 예를 들어, `reject(arr, func)` 는 `arr.filter(item => !func(item))`으로 바꿔쓸 수 있어요.\n\n:::\n\n컬렉션을 순회하며 조건 함수에 맞지 않는 요소들을 새 배열로 반환해요.\n\n```typescript\nconst filtered = reject(collection, predicate);\n```\n\n## 사용법\n\n### `reject(collection, predicate)`\n\n배열, 객체, 또는 문자열에서 주어진 조건에 맞지 않는 요소들만 골라서 새 배열로 반환해요. `filter`의 반대 동작을 수행해요.\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 짝수가 아닌 숫자들을 필터링해요\nreject([1, 2, 3, 4, 5], n => n % 2 === 0);\n// => [1, 3, 5]\n\n// 특정 속성을 가지지 않는 객체들을 필터링해요\nreject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n// => [{ b: 1 }]\n\n// 특정 속성값을 가지지 않는 객체들을 필터링해요\nreject([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// => [{ a: 1 }, { a: 3 }]\n\n// 문자열에서 특정 문자가 아닌 문자들을 필터링해요\nreject('abc', char => char === 'b');\n// => ['a', 'c']\n```\n\n이 함수는 다양한 형태의 predicate를 지원해요.\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 함수를 사용한 조건\nreject(users, user => user.age < 18);\n\n// 객체의 부분 매칭\nreject(users, { active: false });\n\n// 속성-값 배열\nreject(users, ['status', 'pending']);\n\n// 속성명으로 truthy 값 확인\nreject(users, 'premium');\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 순회할 컬렉션이에요.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 선택): 각 요소에 대해 실행할 조건이에요. 기본값은 `identity`예요.\n\n#### 반환 값\n\n(`T[]`): predicate 조건에 맞지 않는 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/remove.md",
    "content": "# remove (Lodash 호환성)\n\n::: warning `es-toolkit`의 `remove`를 사용하세요\n\n이 `remove` 함수는 Lodash와의 호환성을 위해 여러 형태의 predicate를 지원하므로 복잡하게 구현되어 있어요. 메인 라이브러리의 `remove` 함수는 간단한 함수 predicate만 지원하므로 더 빠르게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [remove](../../array/remove.md)를 사용하세요.\n\n:::\n\n배열에서 조건에 맞는 요소들을 제거하고 제거된 요소들을 배열로 반환해요.\n\n```typescript\nconst removedElements = remove(array, predicate);\n```\n\n## 사용법\n\n### `remove(array, predicate)`\n\n배열을 순회하며 주어진 조건에 맞는 요소들을 원본 배열에서 제거하고, 제거된 요소들을 새 배열로 반환해요. 원본 배열이 직접 수정되므로 주의해야 해요.\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 함수를 사용한 조건으로 제거\nconst numbers = [1, 2, 3, 4, 5];\nconst evens = remove(numbers, n => n % 2 === 0);\nconsole.log(numbers); // => [1, 3, 5]\nconsole.log(evens); // => [2, 4]\n\n// 객체의 부분 매칭으로 제거\nconst objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\nconst removed = remove(objects, { a: 1 });\nconsole.log(objects); // => [{ a: 2 }, { a: 3 }]\nconsole.log(removed); // => [{ a: 1 }]\n\n// 속성-값 쌍으로 제거\nconst items = [{ name: 'apple' }, { name: 'banana' }, { name: 'cherry' }];\nconst cherries = remove(items, ['name', 'cherry']);\nconsole.log(items); // => [{ name: 'apple' }, { name: 'banana' }]\nconsole.log(cherries); // => [{ name: 'cherry' }]\n```\n\n이 함수는 다양한 형태의 predicate를 지원해요.\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 함수를 사용한 조건\nremove(users, user => user.active === false);\n\n// 객체의 부분 매칭\nremove(users, { status: 'inactive' });\n\n// 속성-값 배열\nremove(users, ['type', 'guest']);\n\n// 속성명으로 truthy 값 확인\nremove(users, 'isDeleted');\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T>`): 수정할 배열이에요.\n- `predicate` (`((value: T, index: number, array: ArrayLike<T>) => boolean) | Partial<T> | [keyof T, unknown] | keyof T`, 선택): 각 요소에 대해 실행할 조건이에요. 기본값은 `identity`예요.\n\n#### 반환 값\n\n(`T[]`): 조건에 맞아서 제거된 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/reverse.md",
    "content": "# reverse (Lodash 호환성)\n\n::: warning `Array.prototype.reverse()`를 사용하세요\n\n이 `reverse` 함수는 Lodash와의 호환성을 위해 `null`이나 `undefined` 처리를 포함하고 있어요. 간단한 배열 역순 정렬만 필요하다면 네이티브 JavaScript의 `Array.prototype.reverse()` 메서드가 더 직관적이고 빠르게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.reverse()`를 사용하세요.\n\n:::\n\n배열의 요소들을 제자리에서 반전시켜요.\n\n```typescript\nconst reversed = reverse(array);\n```\n\n## 사용법\n\n### `reverse(array)`\n\n배열의 순서를 뒤바꿔서 첫 번째 요소가 마지막이 되고, 마지막 요소가 첫 번째가 되도록 해요. 원본 배열을 직접 수정하며 수정된 배열을 반환해요.\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\n// 숫자 배열을 반전시켜요\nconst numbers = [1, 2, 3, 4, 5];\nconst reversed = reverse(numbers);\nconsole.log(numbers); // => [5, 4, 3, 2, 1]\nconsole.log(reversed); // => [5, 4, 3, 2, 1]\n\n// 문자열 배열을 반전시켜요\nconst words = ['apple', 'banana', 'cherry'];\nreverse(words);\nconsole.log(words); // => ['cherry', 'banana', 'apple']\n\n// 빈 배열이나 null/undefined는 그대로 반환해요\nreverse([]); // => []\nreverse(null); // => null\nreverse(undefined); // => undefined\n```\n\n이 함수는 원본 배열을 직접 수정한다는 점에 주의해야 해요.\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\nconst original = [1, 2, 3];\nconst result = reverse(original);\n\nconsole.log(original === result); // => true (같은 배열 객체)\nconsole.log(original); // => [3, 2, 1] (원본이 수정됨)\n```\n\n#### 파라미터\n\n- `array` (`T[] | null | undefined`): 반전할 배열이에요. `null`이나 `undefined`인 경우 그대로 반환해요.\n\n#### 반환 값\n\n(`T[] | null | undefined`): 반전된 배열을 반환해요. 입력이 `null`이나 `undefined`인 경우 그 값을 그대로 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sample.md",
    "content": "# sample (Lodash 호환성)\n\n::: warning `es-toolkit`의 [sample](../../array/sample.md)을 사용하세요\n\n이 `sample` 함수는 `null`이나 `undefined` 처리, 객체 값 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [sample](../../array/sample.md)을 사용하세요.\n\n:::\n\n배열이나 객체에서 랜덤한 요소 하나를 가져와요.\n\n```typescript\nconst randomItem = sample(collection);\n```\n\n## 사용법\n\n### `sample(collection)`\n\n배열이나 객체에서 랜덤한 요소를 하나 선택할 때 `sample`을 사용하세요. 배열에서는 랜덤한 요소를 반환하고, 객체에서는 랜덤한 값을 반환해요.\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\n// 배열에서 랜덤한 요소 가져오기\nsample([1, 2, 3, 4, 5]);\n// 1부터 5까지 중 랜덤한 숫자 하나를 반환해요\n\n// 객체에서 랜덤한 값 가져오기\nsample({ a: 1, b: 2, c: 3 });\n// 1, 2, 3 중 랜덤한 값 하나를 반환해요\n\n// 문자열도 처리해요\nsample('hello');\n// 'h', 'e', 'l', 'l', 'o' 중 랜덤한 문자 하나를 반환해요\n```\n\n`null`이나 `undefined`는 `undefined`를 반환해요.\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\nsample(null); // undefined\nsample(undefined); // undefined\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 샘플링할 배열이나 객체예요.\n\n#### 반환 값\n\n(`T | string | undefined`): 배열이나 객체에서 랜덤하게 선택된 요소를 반환해요. 컬렉션이 비어있거나 `null`, `undefined`면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sampleSize.md",
    "content": "# sampleSize (Lodash 호환성)\n\n::: warning `es-toolkit`의 [sampleSize](../../array/sampleSize.md)를 사용하세요\n\n이 `sampleSize` 함수는 `null`이나 `undefined` 처리, 객체 지원, 기본값 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [sampleSize](../../array/sampleSize.md)를 사용하세요.\n\n:::\n\n배열이나 객체에서 지정된 개수만큼 무작위로 요소를 선택해요.\n\n```typescript\nconst sampled = sampleSize(collection, size);\n```\n\n## 사용법\n\n### `sampleSize(collection, size?)`\n\n배열이나 객체에서 무작위로 요소를 선택할 때 `sampleSize`를 사용하세요. Floyd 알고리즘을 사용해서 중복 없이 효율적으로 샘플링해요.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\n// 배열에서 3개의 요소를 무작위로 선택해요.\nsampleSize([1, 2, 3, 4, 5], 3);\n// Returns: [2, 4, 5] (실제 결과는 달라질 수 있어요)\n\n// 객체에서 2개의 값을 무작위로 선택해요.\nsampleSize({ a: 1, b: 2, c: 3, d: 4 }, 2);\n// Returns: [2, 4] (실제 결과는 달라질 수 있어요)\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\nsampleSize(null, 2);\n// Returns: []\n\nsampleSize(undefined, 2);\n// Returns: []\n```\n\n#### 파라미터\n\n- `collection` (`Record<string, T> | Record<number, T> | T | null | undefined`): 샘플링할 배열이나 객체예요.\n- `size` (`number`, 선택): 선택할 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 무작위로 선택된 요소들로 구성된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/shuffle.md",
    "content": "# shuffle (Lodash 호환성)\n\n::: warning `es-toolkit`의 `shuffle`을 사용하세요\n\n이 `shuffle` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [shuffle](../../array/shuffle.md)을 사용하세요.\n\n:::\n\n배열이나 객체의 요소들을 무작위로 섞어서 새로운 배열을 반환해요.\n\n```typescript\nconst result = shuffle(collection);\n```\n\n## 사용법\n\n### `shuffle(collection)`\n\nFisher-Yates 알고리즘을 사용하여 배열이나 객체의 요소들을 무작위로 섞어서 새로운 배열을 반환해요. 원본은 변경되지 않아요.\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\n// 숫자 배열 섞기\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffled1 = shuffle(numbers);\n// Returns: 예를 들어 [3, 1, 5, 2, 4] (매번 다른 순서)\n\n// 문자열 배열 섞기\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffled2 = shuffle(fruits);\n// Returns: 예를 들어 ['cherry', 'apple', 'date', 'banana']\n\n// 객체의 값들 섞기\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst shuffled3 = shuffle(obj);\n// Returns: 예를 들어 [3, 1, 4, 2] (객체 값들이 무작위로 섞임)\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\nshuffle(null);\n// Returns: []\n\nshuffle(undefined);\n// Returns: []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): 섞을 배열이나 객체예요.\n\n#### 반환 값\n\n(`T[]`): 요소들이 무작위로 섞인 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/size.md",
    "content": "# size (Lodash 호환성)\n\n::: warning `.length` 속성을 사용하세요\n\n이 `size` 함수는 `null`, `undefined` 처리 및 다양한 타입 지원으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `.length` 속성이나 `Object.keys().length`를 사용하세요.\n\n:::\n\n배열, 문자열, 객체의 크기를 반환해요.\n\n```typescript\nconst length = size(collection);\n```\n\n## 사용법\n\n### `size(collection)`\n\n배열, 문자열, 객체, Map, Set의 크기를 확인할 때 `size`를 사용하세요. 다양한 타입의 컬렉션에 대해 일관된 크기 정보를 제공해요.\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\n// 배열의 요소 개수\nsize([1, 2, 3]);\n// 3을 반환해요\n\n// 문자열의 문자 개수\nsize('hello');\n// 5를 반환해요\n\n// 객체의 열거 가능한 속성 개수\nsize({ a: 1, b: 2, c: 3 });\n// 3을 반환해요\n\n// Map의 요소 개수\nsize(\n  new Map([\n    ['a', 1],\n    ['b', 2],\n  ])\n);\n// 2를 반환해요\n\n// Set의 요소 개수\nsize(new Set([1, 2, 3]));\n// 3을 반환해요\n```\n\n`null`이나 `undefined`는 0을 반환해요.\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\nsize(null); // 0\nsize(undefined); // 0\nsize({}); // 0\nsize([]); // 0\n```\n\n#### 파라미터\n\n- `collection` (`object | string | null | undefined`): 크기를 확인할 배열, 문자열, 객체, Map, Set이에요.\n\n#### 반환 값\n\n(`number`): 컬렉션의 크기를 반환해요. `null`이나 `undefined`면 0을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/slice.md",
    "content": "# slice (Lodash 호환성)\n\n::: warning `Array.prototype.slice`를 사용하세요\n\n이 `slice` 함수는 `null`이나 `undefined` 처리와 희소 배열의 특별한 처리로 인해 느리게 동작해요. JavaScript의 기본 `Array.prototype.slice` 메소드는 더 빠르고 표준화되어 있어요.\n\n대신 더 빠르고 현대적인 `Array.prototype.slice`를 사용하세요.\n\n:::\n\n배열의 일부분을 잘라서 새로운 배열을 만들어요.\n\n```typescript\nconst sliced = slice(array, start, end);\n```\n\n## 사용법\n\n### `slice(array, start, end)`\n\n배열의 특정 부분만 필요할 때 `slice`를 사용하세요. 시작 위치부터 끝 위치 바로 전까지의 요소들을 포함하는 새 배열을 만들어요.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\n// 인덱스 1부터 2까지 자르기\nslice([1, 2, 3, 4], 1, 3);\n// Returns: [2, 3]\n\n// 음수 인덱스 사용\nslice([1, 2, 3, 4], -2);\n// Returns: [3, 4]\n\n// 시작 위치만 지정\nslice([1, 2, 3, 4], 2);\n// Returns: [3, 4]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice(null); // []\nslice(undefined); // []\n```\n\n희소 배열을 처리할 때 빈 슬롯을 `undefined`로 채워요.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nconst sparse = new Array(3);\nsparse[1] = 'b';\nslice(sparse);\n// Returns: [undefined, 'b', undefined]\n```\n\n음수 인덱스를 사용하면 배열의 끝에서부터 계산해요.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice([1, 2, 3, 4, 5], -3, -1);\n// Returns: [3, 4]\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 자를 배열이에요.\n- `start` (`number`, 선택): 시작 위치예요. 음수 값은 끝에서부터 계산해요. 기본값은 `0`이에요.\n- `end` (`number`, 선택): 끝 위치예요 (포함하지 않음). 음수 값은 끝에서부터 계산해요. 기본값은 배열의 길이예요.\n\n#### 반환 값\n\n(`T[]`): `start`부터 `end` 바로 전까지의 요소들을 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/some.md",
    "content": "# some (Lodash 호환성)\n\n::: warning `Array.prototype.some()` 메서드를 사용하세요\n\n이 `some` 함수는 다양한 타입의 조건 처리와 객체 지원으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.some()` 메서드를 사용하세요.\n\n:::\n\n배열이나 객체의 요소 중 주어진 조건을 만족하는 요소가 하나라도 있는지 확인해요.\n\n```typescript\nconst hasMatch = some(collection, predicate);\n```\n\n## 사용법\n\n### `some(collection, predicate)`\n\n배열이나 객체에서 조건을 만족하는 요소가 하나라도 있는지 확인할 때 `some`을 사용하세요. 다양한 형태의 조건을 지원해요.\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\n// 배열에서 조건 함수 사용\nsome([1, 2, 3, 4], n => n % 2 === 0);\n// true를 반환해요 (2, 4가 짝수)\n\n// 배열에서 부분 객체로 매칭\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// true를 반환해요\n\n// 배열에서 속성-값 쌍으로 매칭\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n// true를 반환해요\n\n// 배열에서 속성 이름으로 참인지 확인\nsome([{ a: 0 }, { a: 1 }, { a: 0 }], 'a');\n// true를 반환해요 (a가 1인 요소가 있음)\n\n// 객체에서 조건 함수 사용\nsome({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n// true를 반환해요 (2가 짝수)\n```\n\n조건이 제공되지 않으면 참으로 평가되는 값이 있는지 확인해요.\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\nsome([0, 1, 2]); // true (1, 2가 참으로 평가됨)\nsome([false, null, undefined]); // false (모든 값이 거짓으로 평가됨)\nsome(null); // false (빈 배열로 처리됨)\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 확인할 배열이나 객체예요.\n- `predicate` (선택): 조건을 확인할 함수, 부분 객체, 속성-값 쌍, 또는 속성 이름이에요.\n\n#### 반환 값\n\n(`boolean`): 조건을 만족하는 요소가 하나라도 있으면 `true`, 없으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortBy.md",
    "content": "# sortBy (Lodash 호환성)\n\n::: warning `Array.prototype.sort` 메서드를 사용하세요\n\n이 `sortBy` 함수는 다양한 타입의 조건 처리와 객체 지원으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.prototype.sort` 메서드를 사용하세요.\n\n:::\n\n여러 기준에 따라 배열을 오름차순으로 정렬해요.\n\n```typescript\nconst sorted = sortBy(collection, ...iteratees);\n```\n\n## 사용법\n\n### `sortBy(collection, ...iteratees)`\n\n여러 기준을 사용해서 배열이나 객체를 오름차순으로 정렬할 때 `sortBy`를 사용하세요. 각 요소에 대해 정렬 기준 함수들을 실행하고, 그 결과값을 기준으로 정렬해요.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\n// 사용자들을 이름으로 정렬해요.\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\nsortBy(users, ['user']);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n\n// 함수를 사용해서 정렬해요.\nsortBy(users, [\n  function (o) {\n    return o.user;\n  },\n]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n```\n\n여러 기준을 동시에 사용할 수도 있어요.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\n// 이름으로 먼저 정렬하고, 그 다음 나이로 정렬해요.\nsortBy(users, ['user', item => item.age]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 40 },\n//   { user: 'fred', age: 48 },\n// ]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nsortBy(null, ['key']); // []\nsortBy(undefined, ['key']); // []\n```\n\n#### 파라미터\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 정렬할 배열이나 객체예요.\n- `...iteratees` (`Array<Many<ListIteratee<T> | ObjectIteratee<T>>>`): 정렬 기준을 정하는 함수들이나 속성 이름들이에요.\n\n#### 반환 값\n\n(`T[]`): 오름차순으로 정렬된 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedIndex.md",
    "content": "# sortedIndex (Lodash 호환성)\n\n::: warning 이진 탐색을 직접 구현하세요\n\n이 `sortedIndex` 함수는 `null`, `undefined` 처리와 다양한 타입 지원으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색을 직접 구현하거나 전용 라이브러리를 사용하세요.\n\n:::\n\n정렬된 배열에서 값을 삽입할 가장 낮은 인덱스를 찾아요.\n\n```typescript\nconst index = sortedIndex(array, value);\n```\n\n## 사용법\n\n### `sortedIndex(array, value)`\n\n정렬된 배열에서 값을 삽입할 위치를 찾을 때 `sortedIndex`를 사용하세요. 이진 탐색을 사용해서 빠르게 위치를 찾아요.\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\n// 숫자 배열에서 삽입 위치 찾기\nsortedIndex([30, 50], 40);\n// 1을 반환해요 (40은 30과 50 사이에 위치)\n\n// 문자열 배열에서 삽입 위치 찾기\nsortedIndex(['a', 'c'], 'b');\n// 1을 반환해요 ('b'는 'a'와 'c' 사이에 위치)\n\n// 같은 값이 있는 경우 가장 앞 위치를 반환해요\nsortedIndex([1, 2, 2, 3], 2);\n// 1을 반환해요 (첫 번째 2의 위치)\n```\n\n`null`이나 `undefined` 배열은 0을 반환해요.\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\nsortedIndex(null, 1); // 0\nsortedIndex(undefined, 1); // 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 삽입할 값이에요.\n\n#### 반환 값\n\n(`number`): 값을 삽입할 가장 낮은 인덱스를 반환해요. 배열이 `null`이나 `undefined`면 0을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedIndexBy.md",
    "content": "# sortedIndexBy (Lodash 호환성)\n\n::: warning 이진 탐색과 변환 함수를 직접 구현하세요\n\n이 `sortedIndexBy` 함수는 복잡한 iteratee 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색과 변환 함수를 직접 구현하세요.\n\n:::\n\n정렬된 배열에서 변환 함수를 적용한 후 값을 삽입할 가장 낮은 인덱스를 찾아요.\n\n```typescript\nconst index = sortedIndexBy(array, value, iteratee);\n```\n\n## 사용법\n\n### `sortedIndexBy(array, value, iteratee)`\n\n정렬된 배열에서 변환 함수를 적용한 후 값의 삽입 위치를 찾을 때 `sortedIndexBy`를 사용하세요. 각 요소와 찾을 값에 변환 함수를 적용해서 비교해요.\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\n// 속성으로 정렬된 객체 배열에서 삽입 위치 찾기\nconst objects = [{ x: 4 }, { x: 5 }];\nsortedIndexBy(objects, { x: 4 }, 'x');\n// 0을 반환해요\n\n// 함수를 사용해서 변환\nconst numbers = [10, 20, 30];\nsortedIndexBy(numbers, 25, n => n);\n// 2를 반환해요\n\n// 속성-값 배열로 변환\nconst users = [{ name: 'alice' }, { name: 'bob' }];\nsortedIndexBy(users, { name: 'bob' }, ['name', 'bob']);\n// 1을 반환해요 (이는 [false, true]에 true를 삽입하는 것과 같아요)\n```\n\n`null`이나 `undefined` 배열은 0을 반환해요.\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\nsortedIndexBy(null, { x: 1 }, 'x'); // 0\nsortedIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 삽입할 값이에요.\n- `iteratee` (선택): 각 요소와 값에 적용할 변환 함수, 속성 이름, 또는 속성-값 배열이에요.\n\n#### 반환 값\n\n(`number`): 값을 삽입할 가장 낮은 인덱스를 반환해요. 배열이 `null`이나 `undefined`면 0을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedIndexOf.md",
    "content": "# sortedIndexOf (Lodash 호환성)\n\n::: warning 이진 탐색을 직접 구현하세요\n\n이 `sortedIndexOf` 함수는 복잡한 이진 탐색 처리와 타입 검증으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색을 직접 구현하거나 `Array.prototype.indexOf()`를 사용하세요.\n\n:::\n\n정렬된 배열에서 값이 처음으로 나타나는 인덱스를 찾아요.\n\n```typescript\nconst index = sortedIndexOf(array, value);\n```\n\n## 사용법\n\n### `sortedIndexOf(array, value)`\n\n정렬된 배열에서 특정 값이 처음으로 나타나는 인덱스를 찾을 때 `sortedIndexOf`를 사용하세요. 이진 탐색을 사용해서 빠르게 값을 찾아요.\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\n// 숫자 배열에서 값 찾기\nsortedIndexOf([11, 22, 33, 44, 55], 33);\n// 2를 반환해요\n\n// 값이 없는 경우\nsortedIndexOf([11, 22, 33, 44, 55], 30);\n// -1을 반환해요\n\n// 중복된 값이 있는 경우 첫 번째 인덱스 반환\nsortedIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 3을 반환해요 (첫 번째 3의 위치)\n\n// 0과 -0은 같게 처리해요\nsortedIndexOf([-0, 0], 0);\n// 0을 반환해요\n```\n\n빈 배열이나 `null`, `undefined`는 -1을 반환해요.\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\nsortedIndexOf([], 1); // -1\nsortedIndexOf(null, 1); // -1\nsortedIndexOf(undefined, 1); // -1\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 찾을 값이에요.\n\n#### 반환 값\n\n(`number`): 값이 처음 나타나는 인덱스를 반환해요. 값이 없으면 -1을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedLastIndex.md",
    "content": "# sortedLastIndex (Lodash 호환성)\n\n::: warning 이진 탐색을 직접 구현하세요\n\n이 `sortedLastIndex` 함수는 복잡한 이진 탐색 처리와 타입 검증으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색을 직접 구현하세요.\n\n:::\n\n정렬된 배열에서 값을 삽입할 가장 높은 인덱스를 찾아요.\n\n```typescript\nconst index = sortedLastIndex(array, value);\n```\n\n## 사용법\n\n### `sortedLastIndex(array, value)`\n\n정렬된 배열에서 값을 삽입할 가장 높은 위치를 찾을 때 `sortedLastIndex`를 사용하세요. 중복된 값이 있을 때 마지막 위치 뒤의 인덱스를 반환해요.\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\n// 중복된 값이 있는 배열에서 마지막 삽입 위치 찾기\nsortedLastIndex([4, 5, 5, 5, 6], 5);\n// 4를 반환해요 (마지막 5 뒤의 위치)\n\n// 새로운 값의 삽입 위치 찾기\nsortedLastIndex([10, 20, 30], 25);\n// 2을 반환해요 (25는 30 앞에 위치)\n\n// 값이 없는 경우\nsortedLastIndex([1, 2, 3], 0);\n// 0을 반환해요 (맨 앞에 위치)\n```\n\n`null`이나 `undefined` 배열은 0을 반환해요.\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\nsortedLastIndex(null, 1); // 0\nsortedLastIndex(undefined, 1); // 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 삽입할 값이에요.\n\n#### 반환 값\n\n(`number`): 값을 삽입할 가장 높은 인덱스를 반환해요. 배열이 `null`이나 `undefined`면 0을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedLastIndexBy.md",
    "content": "# sortedLastIndexBy (Lodash 호환성)\n\n::: warning 이진 탐색과 변환 함수를 직접 구현하세요\n\n이 `sortedLastIndexBy` 함수는 복잡한 iteratee 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색과 변환 함수를 직접 구현하세요.\n\n:::\n\n정렬된 배열에서 변환 함수를 적용한 후 값을 삽입할 가장 높은 인덱스를 찾아요.\n\n```typescript\nconst index = sortedLastIndexBy(array, value, iteratee);\n```\n\n## 사용법\n\n### `sortedLastIndexBy(array, value, iteratee)`\n\n정렬된 배열에서 변환 함수를 적용한 후 값의 가장 높은 삽입 위치를 찾을 때 `sortedLastIndexBy`를 사용하세요. 중복된 값이 있을 때 마지막 값 뒤의 인덱스를 반환해요.\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\n// 속성으로 정렬된 객체 배열에서 마지막 삽입 위치 찾기\nconst objects = [{ x: 4 }, { x: 5 }, { x: 5 }];\nsortedLastIndexBy(objects, { x: 5 }, 'x');\n// 3을 반환해요 (마지막 x: 5 뒤의 위치)\n\n// 함수를 사용해서 변환\nconst numbers = [10, 20, 20, 30];\nsortedLastIndexBy(numbers, 20, n => n);\n// 3을 반환해요\n```\n\n`null`이나 `undefined` 배열은 0을 반환해요.\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\nsortedLastIndexBy(null, { x: 1 }, 'x'); // 0\nsortedLastIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 삽입할 값이에요.\n- `iteratee` (선택): 각 요소와 값에 적용할 변환 함수, 속성 이름, 또는 속성-값 배열이에요.\n\n#### 반환 값\n\n(`number`): 값을 삽입할 가장 높은 인덱스를 반환해요. 배열이 `null`이나 `undefined`면 0을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/sortedLastIndexOf.md",
    "content": "# sortedLastIndexOf (Lodash 호환성)\n\n::: warning 이진 탐색을 직접 구현하세요\n\n이 `sortedLastIndexOf` 함수는 복잡한 이진 탐색 처리와 타입 검증으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 이진 탐색을 직접 구현하거나 `Array.prototype.lastIndexOf()`를 사용하세요.\n\n:::\n\n정렬된 배열에서 값이 마지막으로 나타나는 인덱스를 찾아요.\n\n```typescript\nconst index = sortedLastIndexOf(array, value);\n```\n\n## 사용법\n\n### `sortedLastIndexOf(array, value)`\n\n정렬된 배열에서 특정 값이 마지막으로 나타나는 인덱스를 찾을 때 `sortedLastIndexOf`를 사용하세요. 이진 탐색을 사용해서 빠르게 값을 찾아요.\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\n// 숫자 배열에서 값 찾기\nsortedLastIndexOf([1, 2, 3, 4, 5], 3);\n// 2를 반환해요\n\n// 값이 없는 경우\nsortedLastIndexOf([1, 2, 3, 4, 5], 6);\n// -1을 반환해요\n\n// 중복된 값이 있는 경우 마지막 인덱스 반환\nsortedLastIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 5를 반환해요 (마지막 3의 위치)\n\n// 0과 -0은 같게 처리해요\nsortedLastIndexOf([-0, 0], 0);\n// 1을 반환해요\n```\n\n빈 배열이나 `null`, `undefined`는 -1을 반환해요.\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\nsortedLastIndexOf([], 1); // -1\nsortedLastIndexOf(null, 1); // -1\nsortedLastIndexOf(undefined, 1); // -1\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 정렬된 배열이에요. 정렬되지 않은 배열을 사용하면 잘못된 결과를 얻을 수 있어요.\n- `value` (`T`): 찾을 값이에요.\n\n#### 반환 값\n\n(`number`): 값이 마지막으로 나타나는 인덱스를 반환해요. 값이 없으면 -1을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/tail.md",
    "content": "# tail (Lodash 호환성)\n\n::: warning `es-toolkit`의 [tail](../../array/tail.md)을 사용하세요\n\n이 `tail` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [tail](../../array/tail.md)을 사용하세요.\n\n:::\n\n배열의 첫 번째 요소를 제외한 나머지 요소들을 반환해요.\n\n```typescript\nconst result = tail(array);\n```\n\n## 사용법\n\n### `tail(array)`\n\n배열의 첫 번째 요소를 제외한 모든 요소들을 포함하는 새로운 배열을 만들고 싶을 때 `tail`을 사용하세요. 입력 배열이 비어있거나 요소가 하나만 있다면 빈 배열을 반환해요.\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\n// 숫자 배열에서 첫 번째 요소를 제거해요.\ntail([1, 2, 3]);\n// Returns: [2, 3]\n\n// 문자열 배열에서 첫 번째 요소를 제거해요.\ntail(['a', 'b', 'c']);\n// Returns: ['b', 'c']\n\n// 하나의 요소만 있는 배열이에요.\ntail([1]);\n// Returns: []\n\n// 빈 배열이에요.\ntail([]);\n// Returns: []\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\ntail(null); // []\ntail(undefined); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 첫 번째 요소를 제거할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 첫 번째 요소를 제외한 나머지 요소들을 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/take.md",
    "content": "# take (Lodash 호환성)\n\n::: warning `es-toolkit`의 [take](../../array/take.md)를 사용하세요\n\n이 `take` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [take](../../array/take.md)를 사용하세요.\n\n:::\n\n배열의 앞에서부터 지정된 개수만큼의 요소를 가져와서 새로운 배열을 만들어요.\n\n```typescript\nconst result = take([1, 2, 3, 4, 5], 3);\n// result는 [1, 2, 3]이 돼요.\n```\n\n## 사용법\n\n### `take(array, count)`\n\n배열의 앞에서부터 지정된 개수만큼의 요소를 가져와서 새로운 배열을 반환해요. `count`가 배열의 길이보다 크면 전체 배열을 반환해요.\n\n```typescript\nimport { take } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst numbers = [1, 2, 3, 4, 5];\nconst result1 = take(numbers, 3);\n// Returns: [1, 2, 3]\n\n// 배열 길이보다 큰 개수 요청\nconst result2 = take(numbers, 10);\n// Returns: [1, 2, 3, 4, 5] (전체 배열)\n\n// 0개 요청\nconst result3 = take(numbers, 0);\n// Returns: []\n\n// 빈 배열 처리\nconst result4 = take([], 3);\n// Returns: []\n\n// 음수 처리\nconst result5 = take(numbers, -1);\n// Returns: []\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 요소를 가져올 배열이에요.\n- `count` (`number`): 가져올 요소의 개수예요. 기본값은 1이에요.\n\n#### 반환 값\n\n(`T[]`): 앞에서부터 지정된 개수만큼의 요소를 포함하는 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/takeRight.md",
    "content": "# takeRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 [takeRight](../../array/takeRight.md)를 사용하세요\n\n이 `takeRight` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [takeRight](../../array/takeRight.md)를 사용하세요.\n\n:::\n\n배열의 뒤에서부터 지정된 개수만큼의 요소를 가져와요.\n\n```typescript\nconst result = takeRight(array, count);\n```\n\n## 사용법\n\n### `takeRight(array, count)`\n\n배열의 뒤에서부터 지정된 개수만큼의 요소를 가져와서 새로운 배열을 만들고 싶을 때 `takeRight`를 사용하세요. 요청한 개수가 배열의 길이보다 크다면 전체 배열을 반환해요.\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\n// 숫자 배열에서 뒤의 2개 요소를 가져와요.\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 문자열 배열에서 뒤의 3개 요소를 가져와요.\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n\n// 요청한 개수가 배열 길이보다 클 때\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n\n// 0개 요청\ntakeRight([1, 2, 3], 0);\n// Returns: []\n\n// 음수 요청\ntakeRight([1, 2, 3], -1);\n// Returns: []\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\ntakeRight(null, 2); // []\ntakeRight(undefined, 2); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 요소를 가져올 배열이에요.\n- `count` (`number`, 선택): 가져올 요소의 개수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`T[]`): 뒤에서부터 지정된 개수만큼의 요소를 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/takeRightWhile.md",
    "content": "# takeRightWhile (Lodash 호환성)\n\n::: warning `es-toolkit`의 [takeRightWhile](../../array/takeRightWhile.md)를 사용하세요\n\n이 `takeRightWhile` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [takeRightWhile](../../array/takeRightWhile.md)를 사용하세요.\n\n:::\n\n조건을 만족하는 동안 배열의 뒤에서부터 요소들을 가져와요.\n\n```typescript\nconst result = takeRightWhile(array, predicate);\n```\n\n## 사용법\n\n### `takeRightWhile(array, predicate)`\n\n배열의 끝에서부터 시작해서 조건을 만족하는 동안 요소들을 가져와서 새로운 배열을 만들고 싶을 때 `takeRightWhile`를 사용하세요. 조건이 거짓으로 평가되면 멈춰요.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\n// 함수 조건 사용\nconst numbers = [1, 2, 3, 4, 5];\ntakeRightWhile(numbers, x => x > 3);\n// Returns: [4, 5]\n\n// 객체 속성 조건 사용\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ntakeRightWhile(users, o => !o.active);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// 부분 객체로 조건 매칭\ntakeRightWhile(users, { active: false });\n// Returns: [{ user: 'pebbles', active: false }]\n\n// 속성-값 배열로 조건 매칭\ntakeRightWhile(users, ['active', false]);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// 속성명으로 참으로 평가되는 값 확인\nconst items = [{ active: false }, { active: true }, { active: true }];\ntakeRightWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\ntakeRightWhile(null, x => x > 0); // []\ntakeRightWhile(undefined, x => x > 0); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 처리할 배열이에요.\n- `predicate` (`ListIteratee<T>`, 선택): 각 요소에 대해 실행할 조건이에요. 함수, 부분 객체, 속성-값 배열, 속성명을 사용할 수 있어요. 기본값은 항등 함수예요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하는 동안 배열의 뒤에서부터 가져온 요소들의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/takeWhile.md",
    "content": "# takeWhile (Lodash 호환성)\n\n::: warning `es-toolkit`의 [takeWhile](../../array/takeWhile.md)를 사용하세요\n\n이 `takeWhile` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [takeWhile](../../array/takeWhile.md)를 사용하세요.\n\n:::\n\n조건을 만족하는 동안 배열의 앞에서부터 요소들을 가져와요.\n\n```typescript\nconst result = takeWhile(array, predicate);\n```\n\n## 사용법\n\n### `takeWhile(array, predicate)`\n\n배열의 시작에서부터 조건을 만족하는 동안 요소들을 가져와서 새로운 배열을 만들고 싶을 때 `takeWhile`을 사용하세요. 조건이 거짓으로 평가되면 멈춰요.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\n// 함수 조건 사용\nconst numbers = [1, 2, 3, 4, 5];\ntakeWhile(numbers, x => x < 3);\n// Returns: [1, 2]\n\n// 객체 속성 조건 사용\nconst users = [\n  { user: 'barney', active: false },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: true },\n];\n\ntakeWhile(users, o => !o.active);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// 부분 객체로 조건 매칭\ntakeWhile(users, { active: false });\n// Returns: [{ user: 'barney', active: false }]\n\n// 속성-값 배열로 조건 매칭\ntakeWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// 속성명으로 참으로 평가되는 값 확인\nconst items = [{ active: true }, { active: true }, { active: false }];\ntakeWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\ntakeWhile(null, x => x > 0); // []\ntakeWhile(undefined, x => x > 0); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 처리할 배열이에요.\n- `predicate` (`ListIteratee<T>`, 선택): 각 요소에 대해 실행할 조건이에요. 함수, 부분 객체, 속성-값 배열, 속성명을 사용할 수 있어요. 기본값은 항등 함수예요.\n\n#### 반환 값\n\n(`T[]`): 조건을 만족하는 동안 배열의 앞에서부터 가져온 요소들의 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/union.md",
    "content": "# union (Lodash 호환성)\n\n::: warning `es-toolkit`의 [union](../../array/union.md)을 사용하세요\n\n이 `union` 함수는 복잡한 배열 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [union](../../array/union.md)을 사용하세요.\n\n:::\n\n여러 배열에서 고유한 값들만 모아서 새로운 배열을 만들어요.\n\n```typescript\nconst result = union(...arrays);\n```\n\n## 사용법\n\n### `union(...arrays)`\n\n여러 배열들을 합치고 중복을 제거해서 고유한 값들만 포함하는 새로운 배열을 만들고 싶을 때 `union`을 사용하세요. 각 값이 처음 나타나는 순서를 유지해요.\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\n// 숫자 배열들 합치기\nunion([2], [1, 2]);\n// Returns: [2, 1]\n\n// 여러 배열 합치기\nunion([2], [1, 2], [2, 3]);\n// Returns: [2, 1, 3]\n\n// 중첩된 배열은 평평하게 하지 않아요\nunion([1, 3, 2], [1, [5]], [2, [4]]);\n// Returns: [1, 3, 2, [5], [4]]\n\n// 배열이 아닌 값은 무시해요\nunion([0], 3, { '0': 1 }, null, [2, 1]);\n// Returns: [0, 2, 1]\n\n// 배열과 유사한 객체도 처리해요\nunion([0], { 0: 'a', length: 1 }, [2, 1]);\n// Returns: [0, 'a', 2, 1]\n```\n\n`null`이나 `undefined`는 무시해요.\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\nunion([1, 2], null, undefined, [3, 4]);\n// Returns: [1, 2, 3, 4]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 합칠 배열들이에요. 배열이 아닌 값들은 무시돼요.\n\n#### 반환 값\n\n(`T[]`): 모든 배열의 고유한 값들을 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/unionBy.md",
    "content": "# unionBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [unionBy](../../array/unionBy.md)를 사용하세요\n\n이 `unionBy` 함수는 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [unionBy](../../array/unionBy.md)를 사용하세요.\n\n:::\n\n여러 배열을 합치고 지정한 기준으로 고유한 값들만 남겨요.\n\n```typescript\nconst result = unionBy(...arrays, iteratee);\n```\n\n## 사용법\n\n### `unionBy(...arrays, iteratee)`\n\n여러 배열들을 합치고 주어진 기준 함수로 중복을 제거해서 고유한 값들만 포함하는 새로운 배열을 만들고 싶을 때 `unionBy`를 사용하세요. 각 값이 처음 나타나는 순서를 유지해요.\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\n// 소수점을 내림해서 비교\nunionBy([2.1], [1.2, 2.3], Math.floor);\n// Returns: [2.1, 1.2]\n\n// 객체의 속성으로 비교\nunionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 1 }, { x: 2 }]\n\n// 함수로 비교\nunionBy(\n  [{ id: 1, name: 'a' }],\n  [\n    { id: 2, name: 'b' },\n    { id: 1, name: 'c' },\n  ],\n  item => item.id\n);\n// Returns: [{ id: 1, name: 'a' }, { id: 2, name: 'b' }]\n\n// 부분 객체로 비교\nunionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], { x: 1 });\n// Returns: [{ x: 1, y: 1 }]\n```\n\n`null`이나 `undefined` 배열은 무시해요.\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\nunionBy([1, 2], null, undefined, [3, 4], x => x);\n// Returns: [1, 2, 3, 4]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 합칠 배열들이에요.\n- `iteratee` (`ValueIteratee<T>`): 고유성을 결정할 기준이에요. 함수, 속성 이름, 부분 객체, 속성-값 배열을 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 지정한 기준으로 중복을 제거한 고유한 값들을 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/unionWith.md",
    "content": "# unionWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 [unionWith](../../array/unionWith.md)를 사용하세요\n\n이 `unionWith` 함수는 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [unionWith](../../array/unionWith.md)를 사용하세요.\n\n:::\n\n여러 배열을 합치고 비교 함수로 고유한 값들만 남겨요.\n\n```typescript\nconst result = unionWith(...arrays, comparator);\n```\n\n## 사용법\n\n### `unionWith(...arrays, comparator)`\n\n여러 배열들을 합치고 커스텀 비교 함수로 중복을 제거해서 고유한 값들만 포함하는 새로운 배열을 만들고 싶을 때 `unionWith`를 사용하세요. 각 값이 처음 나타나는 순서를 유지해요.\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\n// 커스텀 비교 함수 사용\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\n\nunionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 1, y: 2 }, { x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 간단한 동등성 비교\nunionWith([1, 2], [2, 3], (a, b) => a === b);\n// Returns: [1, 2, 3]\n\n// 문자열 길이로 비교\nunionWith(['ab', 'cd'], ['ef', 'gh', 'ab'], (a, b) => a.length === b.length);\n// Returns: ['ab']\n```\n\n`null`이나 `undefined` 배열은 무시해요.\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\nunionWith([1, 2], null, undefined, [3, 4], (a, b) => a === b);\n// Returns: [1, 2, 3, 4]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 합칠 배열들이에요.\n- `comparator` (`(a: T, b: T) => boolean`): 두 값이 같은지 판단하는 비교 함수예요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수로 중복을 제거한 고유한 값들을 포함하는 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/uniq.md",
    "content": "# uniq (Lodash 호환성)\n\n::: warning `es-toolkit`의 [uniq](../../array/uniq.md)를 사용하세요\n\n이 `uniq` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [uniq](../../array/uniq.md)를 사용하세요.\n\n:::\n\n배열에서 중복된 요소를 제거하여 고유한 요소만 남긴 새로운 배열을 만들어요.\n\n```typescript\nconst result = uniq([1, 2, 2, 3, 3, 4]);\n// result는 [1, 2, 3, 4]가 돼요.\n```\n\n## 사용법\n\n### `uniq(array)`\n\n배열에서 중복된 요소를 제거하고 고유한 요소만 포함하는 새로운 배열을 반환해요. 첫 번째로 나타나는 요소만 유지되고 순서는 보존돼요.\n\n```typescript\nimport { uniq } from 'es-toolkit/compat';\n\n// 숫자 배열에서 중복 제거\nconst numbers = [1, 2, 2, 3, 3, 4, 1];\nconst result1 = uniq(numbers);\n// Returns: [1, 2, 3, 4]\n\n// 문자열 배열에서 중복 제거\nconst strings = ['a', 'b', 'b', 'c', 'a'];\nconst result2 = uniq(strings);\n// Returns: ['a', 'b', 'c']\n\n// 객체 배열에서 중복 제거 (참조값 비교)\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst objects = [obj1, obj2, obj1];\nconst result3 = uniq(objects);\n// Returns: [{ id: 1 }, { id: 2 }]\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 처리할 배열이에요.\n\n#### 반환 값\n\n(`T[]`): 중복이 제거된 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/uniqBy.md",
    "content": "# uniqBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [uniqBy](../../array/uniqBy.md)를 사용하세요\n\n이 `uniqBy` 함수는 `null`이나 `undefined` 처리, 복잡한 인자 타입 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [uniqBy](../../array/uniqBy.md)를 사용하세요.\n\n:::\n\n배열에서 변환 함수가 반환하는 값으로 중복을 제거하여 유일한 요소들로 구성된 새 배열을 만들어요.\n\n```typescript\nconst result = uniqBy(array, iteratee);\n```\n\n## 사용법\n\n### `uniqBy(array, iteratee)`\n\n배열의 각 요소에 변환 함수를 적용하여, 변환 결과가 같은 요소들 중에서 첫 번째 요소만 유지해요. 객체 배열에서 특정 속성을 기준으로 중복을 제거하거나, 숫자 배열에서 특정 계산 결과를 기준으로 중복을 제거할 때 유용해요.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\n// 숫자 배열에서 Math.floor 결과로 중복 제거\nuniqBy([2.1, 1.2, 2.3], Math.floor);\n// Returns: [2.1, 1.2]\n\n// 객체 배열에서 속성으로 중복 제거\nuniqBy([{ x: 1 }, { x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 1 }, { x: 2 }]\n\n// 함수로 중복 제거\nuniqBy([{ name: 'John' }, { name: 'Jane' }, { name: 'John' }], obj => obj.name);\n// Returns: [{ name: 'John' }, { name: 'Jane' }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\nuniqBy(null, Math.floor); // []\nuniqBy(undefined, 'x'); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 중복을 제거할 배열이에요.\n- `iteratee` (`ValueIteratee<T>`): 각 요소에 적용할 변환 함수예요. 함수, 속성 이름, 부분 객체 등을 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 변환 함수 결과를 기준으로 중복이 제거된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/uniqWith.md",
    "content": "# uniqWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 [uniqWith](../../array/uniqWith.md)를 사용하세요\n\n이 `uniqWith` 함수는 `null`이나 `undefined` 처리, 복잡한 인자 타입 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [uniqWith](../../array/uniqWith.md)를 사용하세요.\n\n:::\n\n배열에서 비교 함수를 사용하여 중복을 제거하고 유일한 요소들로 구성된 새 배열을 만들어요.\n\n```typescript\nconst result = uniqWith(array, comparator);\n```\n\n## 사용법\n\n### `uniqWith(array, comparator)`\n\n배열의 각 요소를 비교 함수로 비교하여 중복을 제거해요. 비교 함수가 `true`를 반환하면 두 요소를 같다고 판단하고, 첫 번째로 나타나는 요소만 유지해요. 비교 함수를 제공하지 않으면 기본적으로 얕은 동등성 비교를 사용해요.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\n// 비교 함수 없이 사용 (얕은 동등성 비교)\nuniqWith([1, 2, 2, 3]);\n// Returns: [1, 2, 3]\n\n// 사용자 정의 비교 함수로 홀수/짝수 기준 중복 제거\nuniqWith([1, 2, 3, 4], (a, b) => a % 2 === b % 2);\n// Returns: [1, 2]\n\n// 객체 배열에서 속성 기준 중복 제거\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n  { x: 1, y: 2 },\n];\nuniqWith(objects, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 1, y: 2 }, { x: 2, y: 1 }]\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\nuniqWith(null); // []\nuniqWith(undefined); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 중복을 제거할 배열이에요.\n- `comparator` (`(a: T, b: T) => boolean`, 선택): 두 요소가 같은지 비교할 함수예요. `true`를 반환하면 같다고 판단해요. 기본값은 얕은 동등성 비교예요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수 결과를 기준으로 중복이 제거된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/unzip.md",
    "content": "# unzip (Lodash 호환성)\n\n::: warning `es-toolkit`의 [unzip](../../array/unzip.md)를 사용하세요\n\n이 `unzip` 함수는 `null`이나 `undefined` 처리, 배열이 아닌 값 필터링 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [unzip](../../array/unzip.md)를 사용하세요.\n\n:::\n\n묶여있는 배열의 같은 위치에 있는 요소들을 모아서 새 배열로 만들어요.\n\n```typescript\nconst result = unzip(array);\n```\n\n## 사용법\n\n### `unzip(array)`\n\n중첩된 배열에서 같은 인덱스에 있는 요소들을 모아서 새로운 배열로 반환해요. `zip` 함수의 반대 동작을 수행해요. 행렬을 전치하거나 구조화된 데이터를 재정렬할 때 유용해요.\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\n// 문자열과 불린, 숫자가 섞인 배열 언집\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n];\nconst result = unzip(zipped);\n// Returns: [['a', 'b'], [true, false], [1, 2]]\n\n// 숫자 배열들 언집\nconst numbers = [\n  [1, 4],\n  [2, 5],\n  [3, 6],\n];\nunzip(numbers);\n// Returns: [[1, 2, 3], [4, 5, 6]]\n\n// 길이가 다른 배열들도 처리\nconst uneven = [\n  ['a', 1],\n  ['b', 2, true],\n];\nunzip(uneven);\n// Returns: [['a', 'b'], [1, 2], [undefined, true]]\n```\n\n`null`이나 `undefined`, 빈 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\nunzip(null); // []\nunzip(undefined); // []\nunzip([]); // []\n```\n\n#### 파라미터\n\n- `array` (`T[][] | ArrayLike<ArrayLike<T>> | null | undefined`): 언집할 중첩 배열이에요. 각 내부 배열의 같은 위치 요소들이 모여요.\n\n#### 반환 값\n\n(`T[][]`): 같은 위치의 요소들이 모인 새로운 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/unzipWith.md",
    "content": "# unzipWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 `unzipWith`를 사용하세요\n\n이 `unzipWith` 함수는 `null`이나 `undefined` 처리, `ArrayLike` 타입 처리, 다양한 조건 함수 형태 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [unzipWith](../../array/unzipWith.md)를 사용하세요.\n\n:::\n\n묶여있는 배열의 같은 위치에 있는 요소들을 모아서 변환 함수를 적용한 새 배열을 만들어요.\n\n```typescript\nconst result = unzipWith(array, iteratee);\n```\n\n## 사용법\n\n### `unzipWith(array, iteratee)`\n\n중첩된 배열에서 같은 인덱스에 있는 요소들을 모아서 변환 함수를 적용해요. `unzip` 함수와 비슷하지만, 각 그룹에 변환 함수를 적용할 수 있어요. 변환 함수를 제공하지 않으면 기본 `unzip` 동작을 수행해요.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\n// 같은 위치의 요소들을 더하기\nunzipWith(\n  [\n    [1, 10, 100],\n    [2, 20, 200],\n  ],\n  (a, b) => a + b\n);\n// Returns: [3, 30, 300]\n\n// 변환 함수 없이 사용 (기본 unzip 동작)\nunzipWith([\n  [1, 4],\n  [2, 5],\n  [3, 6],\n]);\n// Returns: [[1, 2, 3], [4, 5, 6]]\n\n// 문자열 연결\nunzipWith(\n  [\n    ['a', 'x'],\n    ['b', 'y'],\n    ['c', 'z'],\n  ],\n  (a, b) => a + b\n);\n// Returns: ['abc', 'xyz']\n\n// 최대값 찾기\nunzipWith(\n  [\n    [1, 10],\n    [2, 20],\n    [3, 5],\n  ],\n  Math.max\n);\n// Returns: [3, 20]\n```\n\n`null`이나 `undefined`, 빈 배열은 빈 배열로 처리해요.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\nunzipWith(null, (a, b) => a + b); // []\nunzipWith(undefined, (a, b) => a + b); // []\nunzipWith([], (a, b) => a + b); // []\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<ArrayLike<T>> | null | undefined`): 언집할 중첩 배열이에요.\n- `iteratee` (`(...values: T[]) => R`, 선택): 각 그룹의 요소들에 적용할 변환 함수예요. 제공하지 않으면 기본 `unzip` 동작을 수행해요.\n\n#### 반환 값\n\n(`R[]` 또는 `T[][]`): 변환 함수가 있으면 변환된 결과 배열을, 없으면 언집된 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/without.md",
    "content": "# without (Lodash 호환성)\n\n::: warning `es-toolkit`의 [without](../../array/without.md)을 사용하세요\n\n이 `without` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [without](../../array/without.md)을 사용하세요.\n\n:::\n\n배열에서 지정된 값들을 제외한 새로운 배열을 만들어요.\n\n```typescript\nconst result = without([1, 2, 3, 4, 5], 2, 4);\n// result는 [1, 3, 5]가 돼요.\n```\n\n## 사용법\n\n### `without(array, ...values)`\n\n배열에서 지정된 값들을 제거한 새로운 배열을 반환해요. 원본 배열은 변경되지 않아요.\n\n```typescript\nimport { without } from 'es-toolkit/compat';\n\n// 숫자 배열에서 여러 값 제거\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\nconst result1 = without(numbers, 2, 4);\n// Returns: [1, 3, 5]\n\n// 문자열 배열에서 값 제거\nconst fruits = ['apple', 'banana', 'cherry', 'banana'];\nconst result2 = without(fruits, 'banana');\n// Returns: ['apple', 'cherry']\n\n// 빈 배열 처리\nconst result3 = without([], 1, 2, 3);\n// Returns: []\n```\n\n#### 파라미터\n\n- `array` (`T[]`): 처리할 원본 배열이에요.\n- `...values` (`T[]`): 제거할 값들이에요.\n\n#### 반환 값\n\n(`T[]`): 지정된 값들을 제거한 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/xor.md",
    "content": "# xor (Lodash 호환성)\n\n::: warning `es-toolkit`의 [xor](../../array/xor.md)을 사용하세요\n\n이 `xor` 함수는 `null`이나 `undefined` 처리, 복잡한 중복 계산 로직 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [xor](../../array/xor.md)를 사용하세요.\n\n:::\n\n여러 배열들에서 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 만들어요.\n\n```typescript\nconst result = xor(...arrays);\n```\n\n## 사용법\n\n### `xor(...arrays)`\n\n여러 배열의 대칭 차집합을 계산해요. 즉, 주어진 배열들 중 정확히 하나의 배열에만 존재하는 요소들을 반환해요. 두 개 이상의 배열을 비교할 때 겹치지 않는 고유한 요소들을 찾고 싶을 때 유용해요.\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\n// 두 배열의 대칭 차집합\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// 세 배열의 대칭 차집합\nxor([1, 2], [2, 3], [4, 5]);\n// Returns: [1, 3, 4, 5]\n\n// 문자열 배열\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n\n// 하나의 배열만 제공\nxor([1, 2, 3]);\n// Returns: [1, 2, 3]\n```\n\n`null`이나 `undefined`, 빈 배열은 무시되고 유효한 배열만 처리해요.\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\nxor([1, 2], null, [2, 3]);\n// Returns: [1, 3]\n\nxor([], [1, 2], [2, 3]);\n// Returns: [1, 3]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 대칭 차집합을 계산할 배열들이에요. `null`이나 `undefined`는 무시돼요.\n\n#### 반환 값\n\n(`T[]`): 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/xorBy.md",
    "content": "# xorBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 [xorBy](../../array/xorBy.md)을 사용하세요\n\n이 `xorBy` 함수는 `null`이나 `undefined` 처리, 복잡한 중복 계산 로직 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [xorBy](../../array/xorBy.md)를 사용하세요.\n\n:::\n\n여러 배열들에서 변환 함수를 기준으로 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 만들어요.\n\n```typescript\nconst result = xorBy(...arrays, iteratee);\n```\n\n## 사용법\n\n### `xorBy(...arrays, iteratee)`\n\n여러 배열의 대칭 차집합을 변환 함수를 기준으로 계산해요. 각 요소에 변환 함수를 적용한 결과가 정확히 하나의 배열에만 존재하는 요소들을 반환해요. 객체 배열에서 특정 속성을 기준으로 비교하거나, 숫자 배열에서 특정 계산 결과를 기준으로 비교할 때 유용해요.\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\n// Math.floor 결과로 대칭 차집합 계산\nxorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n// Returns: [1.2, 4.3]\n\n// 객체 속성으로 대칭 차집합 계산\nxorBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 2 }]\n\n// 함수로 대칭 차집합 계산\nconst users1 = [{ name: 'John', age: 30 }];\nconst users2 = [\n  { name: 'Jane', age: 25 },\n  { name: 'John', age: 30 },\n];\nxorBy(users1, users2, user => user.name);\n// Returns: [{ name: 'Jane', age: 25 }]\n\n// 세 배열의 대칭 차집합\nxorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);\n// Returns: [1.2, 2.3, 3.4, 4.5, 5.6, 6.7]\n```\n\n`null`이나 `undefined`는 무시돼요.\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\nxorBy([2.1, 1.2], null, [4.3, 2.4], Math.floor);\n// Returns: [1.2, 4.3]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ValueIteratee<T>>`): 대칭 차집합을 계산할 배열들과 마지막에 변환 함수예요. 함수, 속성 이름, 부분 객체 등을 사용할 수 있어요.\n\n#### 반환 값\n\n(`T[]`): 변환 함수 결과를 기준으로 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/xorWith.md",
    "content": "# xorWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 [xorWith](../../array/xorWith.md)을 사용하세요\n\n이 `xorWith` 함수는 `null`이나 `undefined` 처리, 복잡한 중복 계산 로직 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [xorWith](../../array/xorWith.md)를 사용하세요.\n\n:::\n\n여러 배열들에서 비교 함수를 사용하여 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 만들어요.\n\n```typescript\nconst result = xorWith(...arrays, comparator);\n```\n\n## 사용법\n\n### `xorWith(...arrays, comparator)`\n\n여러 배열의 대칭 차집합을 비교 함수를 사용하여 계산해요. 비교 함수가 `true`를 반환하면 두 요소를 같다고 판단하고, 정확히 하나의 배열에만 존재하는 요소들을 반환해요. 복잡한 객체나 사용자 정의 비교 로직이 필요할 때 유용해요.\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\n// 간단한 숫자 비교\nxorWith([1, 2], [2, 3], (a, b) => a === b);\n// Returns: [1, 3]\n\n// 객체의 속성 비교\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\nxorWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 세 배열의 대칭 차집합\nxorWith([1], [2], [3], (a, b) => a === b);\n// Returns: [1, 2, 3]\n\n// 문자열 길이로 비교\nxorWith(['hello'], ['world', 'hi'], (a, b) => a.length === b.length);\n// Returns: ['hi']\n```\n\n비교 함수를 제공하지 않으면 기본적으로 얕은 동등성 비교를 사용해요.\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\nxorWith([1, 2], [2, 3]);\n// Returns: [1, 3]\n```\n\n#### 파라미터\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>`): 대칭 차집합을 계산할 배열들과 마지막에 비교 함수예요. 비교 함수는 두 요소가 같으면 `true`를 반환해야 해요.\n\n#### 반환 값\n\n(`T[]`): 비교 함수 결과를 기준으로 정확히 하나의 배열에만 존재하는 요소들로 구성된 새 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/zip.md",
    "content": "# zip (Lodash 호환성)\n\n::: warning `es-toolkit`의 [zip](../../array/zip.md)을 사용하세요\n\n이 `zip` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [zip](../../array/zip.md)을 사용하세요.\n\n:::\n\n여러 배열을 튜플의 단일 배열로 결합해요.\n\n```typescript\nconst result = zip([1, 2], ['a', 'b']);\n// result는 [[1, 'a'], [2, 'b']]가 돼요.\n```\n\n## 사용법\n\n### `zip(...arrs)`\n\n여러 배열을 받아서 각 인덱스의 요소들을 하나의 튜플로 묶어 새로운 배열을 만들어요. 입력 배열의 길이가 다를 경우, 결과 배열의 길이는 가장 긴 입력 배열의 길이를 가지며, 누락된 요소는 `undefined`로 채워져요.\n\n```typescript\nimport { zip } from 'es-toolkit/compat';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = ['a', 'b', 'c'];\nconst result = zip(arr1, arr2);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 길이가 다른 배열들\nconst arr3 = [true, false];\nconst result2 = zip(arr1, arr2, arr3);\n// Returns: [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n\n// 빈 배열이 포함된 경우\nzip([1, 2], [], ['a', 'b']);\n// Returns: [[1, undefined, 'a'], [2, undefined, 'b']]\n```\n\n#### 파라미터\n\n- `...arrs` (`any[][]`): 결합할 배열들이에요.\n\n#### 반환 값\n\n(`any[][]`): 입력 배열들의 각 인덱스 요소들을 포함하는 튜플로 이루어진 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/zipObject.md",
    "content": "# zipObject (Lodash 호환성)\n\n::: warning `es-toolkit`의 [zipObject](../../array/zipObject.md)를 사용하세요\n\n이 `zipObject` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [zipObject](../../array/zipObject.md)를 사용하세요.\n\n:::\n\n두 배열을 사용해서 객체를 만들어요. 첫 번째 배열은 버전망을 프로퍼티 이름으로, 두 번째 배열은 해당 값으로 사용해요.\n\n```typescript\nconst result = zipObject(keys, values);\n```\n\n## 사용법\n\n### `zipObject(keys, values)`\n\n키 배열과 값 배열을 받아서 하나의 객체로 만들고 싶을 때 `zipObject`를 사용하세요. 첫 번째 배열의 요소들을 프로퍼티 이름으로, 두 번째 배열의 요소들을 해당 값으로 사용해서 객체를 만들어요. API 응답을 처리하거나 데이터를 변환할 때 특히 유용해요.\n\n```typescript\nimport { zipObject } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst keys = ['a', 'b', 'c'];\nconst values = [1, 2, 3];\nconst result = zipObject(keys, values);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 길이가 다른 배열들\nconst keys2 = ['x', 'y', 'z'];\nconst values2 = [10, 20];\nconst result2 = zipObject(keys2, values2);\n// Returns: { x: 10, y: 20, z: undefined }\n\n// 빈 배열이 전달된 경우\nconst result3 = zipObject([], []);\n// Returns: {}\n```\n\n#### 파라미터\n\n- `keys` (`PropertyKey[]`): 프로퍼티 이름으로 사용할 배열이에요.\n- `values` (`T[]`): 프로퍼티 값으로 사용할 배열이에요.\n\n#### 반환 값\n\n(`Record<PropertyKey, T>`): 만들어진 객체예요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/zipObjectDeep.md",
    "content": "# zipObjectDeep (Lodash 호환성)\n\n경로 배열과 값 배열을 사용하여 깊이 중첩된 객체를 만들어요.\n\n```typescript\nconst result = zipObjectDeep(keys, values);\n```\n\n## 사용법\n\n### `zipObjectDeep(keys, values)`\n\n첫 번째 배열의 경로와 두 번째 배열의 값을 사용하여 깊이 중첩된 객체를 생성해요. 경로는 점 표기법 문자열이나 속성 이름 배열로 제공할 수 있어요. 복잡한 중첩 구조의 데이터를 생성하거나 평면적인 키-값 쌍을 계층적 객체로 변환할 때 유용해요.\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\n// 점 표기법 문자열로 경로 지정\nconst paths = ['a.b.c', 'd.e.f'];\nconst values = [1, 2];\nconst result = zipObjectDeep(paths, values);\n// Returns: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// 배열로 경로 지정\nconst pathArrays = [\n  ['a', 'b', 'c'],\n  ['d', 'e', 'f'],\n];\nconst values2 = [1, 2];\nconst result2 = zipObjectDeep(pathArrays, values2);\n// Returns: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// 배열 인덱스를 포함한 경로\nconst arrayPaths = ['a.b[0].c', 'a.b[1].d'];\nconst values3 = [1, 2];\nconst result3 = zipObjectDeep(arrayPaths, values3);\n// Returns: { a: { b: [{ c: 1 }, { d: 2 }] } }\n```\n\n`null`이나 `undefined` 키 배열은 빈 객체로 처리해요.\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\nzipObjectDeep(null, [1, 2]); // {}\nzipObjectDeep(undefined, [1, 2]); // {}\n```\n\n#### 파라미터\n\n- `keys` (`ArrayLike<PropertyPath> | null | undefined`): 속성 경로 배열이에요. 점 표기법 문자열이나 속성 이름 배열을 사용할 수 있어요.\n- `values` (`ArrayLike<any>`, 선택): 해당하는 값들의 배열이에요. 제공하지 않으면 빈 배열로 처리해요.\n\n#### 반환 값\n\n(`object`): 주어진 경로와 값으로 구성된 깊이 중첩된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/array/zipWith.md",
    "content": "# zipWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 [zipWith](../../array/zipWith.md)을 사용하세요\n\n이 `zipWith` 함수는 Lodash와의 호환성을 위해 추가적인 처리가 포함되어 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [zipWith](../../array/zipWith.md)을 사용하세요.\n\n:::\n\n여러 배열의 요소를 결합 함수를 사용해서 새로운 배열로 결합해요.\n\n```typescript\nconst result = zipWith([1, 2], [3, 4], (a, b) => a + b);\n// result는 [4, 6]이 돼요.\n```\n\n## 사용법\n\n### `zipWith(...arrs, iteratee)`\n\n여러 배열을 받아서 각 인덱스의 요소들을 제공된 함수로 결합하여 새로운 배열을 만들어요. 배열의 길이가 다를 경우, 가장 긴 배열의 길이까지 처리하며 누락된 값은 `undefined`로 전달돼요.\n\n```typescript\nimport { zipWith } from 'es-toolkit/compat';\n\n// 두 배열의 요소를 더하기\nconst result1 = zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// 세 배열의 요소를 결합\nconst result2 = zipWith([1, 2], [3, 4], [5, 6], (a, b, c) => a + b + c);\n// Returns: [9, 12]\n\n// 길이가 다른 배열들\nconst result3 = zipWith([1, 2, 3], [4, 5], (a, b) => (a || 0) + (b || 0));\n// Returns: [5, 7, 3]\n```\n\n#### 파라미터\n\n- `...arrs` (`any[][]`): 결합할 배열들이에요.\n- `iteratee` (`Function`): 각 인덱스의 요소들을 결합하는 함수예요.\n\n#### 반환 값\n\n(`any[]`): 결합 함수를 적용한 결과로 이루어진 새로운 배열이에요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/after.md",
    "content": "# after (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`after`](../../function/after.md)를 사용하세요\n\n이 `after` 함수는 복잡한 타입 검증과 정수 변환 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [after](../../function/after.md)를 사용하세요.\n\n:::\n\n함수가 지정된 호출 횟수 이후에만 실행되도록 하는 함수를 만들어요.\n\n```typescript\nconst restrictedFunction = after(n, func);\n```\n\n## 사용법\n\n### `after(n, func)`\n\n함수가 특정 횟수만큼 호출된 후에야 실행되도록 제한하고 싶을 때 `after`를 사용하세요. 여러 비동기 작업이 완료된 후 콜백을 실행하거나, 초기화 단계를 거친 후 함수를 활성화할 때 유용해요.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst logAfterThree = after(3, () => {\n  console.log('3번째 호출부터 실행돼요!');\n});\n\nlogAfterThree(); // 실행되지 않음\nlogAfterThree(); // 실행되지 않음\nlogAfterThree(); // \"3번째 호출부터 실행돼요!\" 출력\nlogAfterThree(); // \"3번째 호출부터 실행돼요!\" 출력 (계속 실행됨)\n```\n\n여러 비동기 작업이 모두 완료된 후에 특정 콜백을 실행할 때도 사용할 수 있어요.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst tasks = ['task1', 'task2', 'task3'];\nconst allTasksComplete = after(tasks.length, () => {\n  console.log('모든 작업이 완료되었습니다!');\n});\n\n// 각 작업이 완료될 때마다 호출\ntasks.forEach(task => {\n  performAsyncTask(task, () => {\n    console.log(`${task} 완료`);\n    allTasksComplete(); // 3번째 호출에서 \"모든 작업이 완료되었습니다!\" 출력\n  });\n});\n```\n\n0이나 음수를 전달하면 첫 번째 호출부터 바로 실행돼요.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst immediate = after(0, () => console.log('즉시 실행'));\nimmediate(); // \"즉시 실행\"\n\nconst negative = after(-1, () => console.log('즉시 실행'));\nnegative(); // \"즉시 실행\"\n```\n\n#### 파라미터\n\n- `n` (`number`): 함수가 실행되기 전에 필요한 호출 횟수예요.\n- `func` (`TFunc`): 제한할 함수예요.\n\n#### 반환 값\n\n(`TFunc`): n번째 호출부터 원본 함수를 실행하는 새로운 제한된 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/ary.md",
    "content": "# ary (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`ary`](../../function/ary.md)를 사용하세요\n\n이 `ary` 함수는 파라미터를 복잡하게 검증하고 있어서 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [ary](../../function/ary.md)를 사용하세요.\n\n:::\n\n함수가 받을 수 있는 인수의 개수를 제한하는 함수를 만들어요.\n\n```typescript\nconst cappedFunction = ary(func, n);\n```\n\n## 사용법\n\n### `ary(func, n)`\n\n함수가 받는 인수의 개수를 제한하고 싶을 때 `ary`를 사용하세요. 너무 많은 인수를 받는 함수를 안전하게 사용하거나, 콜백 함수에서 불필요한 인수를 무시할 때 유용해요.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction greet(name, age, city) {\n  return `안녕하세요, ${name}님! ${age}세, ${city}에서 오셨군요.`;\n}\n\nconst limitedGreet = ary(greet, 2);\nconsole.log(limitedGreet('김철수', 30, '서울', '추가인수'));\n// \"안녕하세요, 김철수님! 30세, undefined에서 오셨군요.\"\n// 3번째 인수부터는 무시됨\n```\n\n배열 메서드와 함께 사용할 때 콜백 함수에 불필요한 인자가 전달되지 않도록 할 수 있어요.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// parseInt는 두 번째 인수(기수)를 받지만, map의 콜백은 3개 인수를 전달함\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// 잘못된 사용 - parseInt가 인덱스를 기수로 받음\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN]\n\n// ary를 사용해서 첫 번째 인수만 전달\nconsole.log(numbers.map(ary(parseInt, 1))); // [1, 2, 3, 4, 5]\n```\n\n함수가 원하는 파라미터 인자 숫자만 받도록 제한할 수 있어요.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nfunction sum(...args) {\n  return args.reduce((total, num) => total + num, 0);\n}\n\nconst sum0 = ary(sum, 0);\nconst sum1 = ary(sum, 1);\nconst sum2 = ary(sum, 2);\nconst sum3 = ary(sum, 3);\n\nconsole.log(sum0(1, 2, 3, 4, 5)); // 0 (인수 없음)\nconsole.log(sum1(1, 2, 3, 4, 5)); // 1 (첫 번째 인수만)\nconsole.log(sum2(1, 2, 3, 4, 5)); // 3 (첫 두 인수만)\nconsole.log(sum3(1, 2, 3, 4, 5)); // 6 (첫 세 인수만)\n```\n\n음수나 `NaN`을 전달하면 0으로 처리되어 모든 인수가 무시돼요.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nconst func = (a, b, c) => [a, b, c];\n\nconsole.log(ary(func, -1)(1, 2, 3)); // [] (음수는 0으로 처리)\nconsole.log(ary(func, NaN)(1, 2, 3)); // [] (NaN은 0으로 처리)\n```\n\n#### 파라미터\n\n- `func` (`Function`): 인수 개수를 제한할 함수예요.\n- `n` (`number`, 선택): 허용할 최대 인수 개수예요. 생략하면 함수의 `length` 속성을 사용해요.\n\n#### 반환 값\n\n(`Function`): 최대 `n`개의 인수만 받는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/attempt.md",
    "content": "# attempt (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`attempt`](../../util/attempt.md) 함수나 try-catch 블록을 사용하세요\n\n이 `attempt` 함수는 에러와 반환 값을 구분하지 않고 반환해서 사용할 때 혼란이 있을 수 있어요.\n\n대신 더 직접적이고 명확한 [`attempt`](../../util/attempt.md) 함수나 try-catch 블록을 사용하세요.\n\n:::\n\n함수를 실행하고 에러가 발생하면 에러 객체를 반환하는 함수예요.\n\n```typescript\nconst result = attempt(func, ...args);\n```\n\n## 사용법\n\n### `attempt(func, ...args)`\n\n함수를 안전하게 실행하고 싶을 때 `attempt`를 사용하세요. 에러가 발생할 수 있는 함수를 실행할 때 프로그램이 중단되지 않도록 하고, 에러를 반환값으로 처리할 때 유용해요.\n\n```typescript\nimport { attempt } from 'es-toolkit/compat';\n\n// 기본 사용법 - 성공하는 경우\nconst result = attempt((x, y) => x + y, 2, 3);\nconsole.log(result); // 5\n\n// 에러가 발생하는 경우\nconst errorResult = attempt(() => {\n  throw new Error('뭔가 잘못됐어요');\n});\nconsole.log(errorResult); // Error: 뭔가 잘못됐어요\n```\n\ntry-catch 블록 사용과의 차이점을 살펴보면 다음과 같아요.\n\n```typescript\n// attempt 사용\nimport { attempt } from 'es-toolkit/compat';\n\nconst result = attempt(riskyFunction, arg1, arg2);\nif (result instanceof Error) {\n  console.log('에러 발생:', result.message);\n} else {\n  console.log('결과:', result);\n}\n\n// try-catch 사용 (더 직접적)\ntry {\n  const result = riskyFunction(arg1, arg2);\n  console.log('결과:', result);\n} catch (error) {\n  console.log('에러 발생:', error.message);\n}\n```\n\n#### 파라미터\n\n- `func` (`Function`): 실행할 함수예요.\n- `args` (`...any[]`): 함수에 전달할 인수들이에요.\n\n#### 반환 값\n\n(`ReturnType<F> | Error`): 함수가 성공하면 반환값을, 에러가 발생하면 Error 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/before.md",
    "content": "# before (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`before`](../../function/before.md)를 사용하세요\n\n이 `before` 함수는 복잡한 타입 검증과 정수 변환 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [before](../../function/before.md)를 사용하세요.\n\n:::\n\n함수를 지정된 횟수까지만 실행하고, 그 이후엔 마지막 결과를 반환하는 함수를 만들어요.\n\n```typescript\nconst limitedFunction = before(n, func);\n```\n\n## 사용법\n\n### `before(n, func)`\n\n함수가 특정 횟수까지만 실행되도록 제한하고 싶을 때 `before`를 사용하세요. 함수 호출 횟수를 제한하거나, 초기 설정 단계에서만 함수를 실행하고 싶을 때 유용해요.\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 기본 사용법\nlet count = 0;\nconst beforeThree = before(3, () => ++count);\n\nconsole.log(beforeThree()); // 1 (첫 번째 호출)\nconsole.log(beforeThree()); // 2 (두 번째 호출)\nconsole.log(beforeThree()); // 2 (세 번째 호출부터는 마지막 결과 반환)\nconsole.log(beforeThree()); // 2 (계속 마지막 결과만 반환)\n```\n\n클로저를 사용한 대안:\n\n```typescript\n// before 사용\nconst beforeThree = before(3, myFunction);\n\n// 클로저 사용 (더 간단하고 빠름)\nfunction createBefore(limit, callback) {\n  let callCount = 0;\n  let lastResult;\n\n  return function (...args) {\n    if (callCount < limit - 1) {\n      lastResult = callback.apply(this, args);\n      callCount++;\n    }\n    return lastResult;\n  };\n}\n\nconst beforeThreeAlternative = createBefore(3, myFunction);\n```\n\n초기화 함수로 활용:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nclass Database {\n  constructor() {\n    this.isInitialized = false;\n\n    // 초기화는 한 번만 실행\n    this.initialize = before(2, () => {\n      console.log('데이터베이스 초기화 중...');\n      this.setupConnection();\n      this.isInitialized = true;\n      return '초기화 완료';\n    });\n  }\n\n  setupConnection() {\n    // 실제 연결 설정 로직\n  }\n\n  query(sql) {\n    const initResult = this.initialize();\n    console.log(initResult); // 첫 번째 호출: \"초기화 완료\", 이후: 동일 결과\n\n    // 쿼리 실행 로직\n    return `쿼리 실행: ${sql}`;\n  }\n}\n\nconst db = new Database();\ndb.query('SELECT * FROM users'); // 초기화 실행됨\ndb.query('SELECT * FROM products'); // 초기화는 실행되지 않음\n```\n\nAPI 호출 제한:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// API 호출을 최대 5번까지만 허용\nconst limitedApiCall = before(6, endpoint => {\n  console.log(`API 호출: ${endpoint}`);\n  return fetch(endpoint).then(res => res.json());\n});\n\n// 처음 5번은 실제 API 호출\nlimitedApiCall('/api/data1'); // 실제 호출\nlimitedApiCall('/api/data2'); // 실제 호출\nlimitedApiCall('/api/data3'); // 실제 호출\nlimitedApiCall('/api/data4'); // 실제 호출\nlimitedApiCall('/api/data5'); // 실제 호출\nlimitedApiCall('/api/data6'); // 마지막 결과 반환 (API 호출 안 함)\n```\n\n이벤트 리스너 제한:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 클릭 이벤트를 3번까지만 처리\nconst limitedClickHandler = before(4, event => {\n  console.log('클릭 처리됨:', event.target.id);\n  return `처리 완료: ${Date.now()}`;\n});\n\ndocument.getElementById('button').addEventListener('click', limitedClickHandler);\n// 처음 3번 클릭만 처리되고, 그 이후엔 마지막 결과만 반환\n```\n\n파라미터와 반환값 처리:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst limitedCalculator = before(3, (operation, a, b) => {\n  const result = operation === 'add' ? a + b : a - b;\n  console.log(`계산: ${a} ${operation} ${b} = ${result}`);\n  return result;\n});\n\nconsole.log(limitedCalculator('add', 5, 3)); // \"계산: 5 add 3 = 8\", 반환: 8\nconsole.log(limitedCalculator('subtract', 10, 4)); // \"계산: 10 subtract 4 = 6\", 반환: 6\nconsole.log(limitedCalculator('multiply', 7, 2)); // 계산 안 함, 반환: 6 (마지막 결과)\n```\n\n0 또는 1을 전달하면 함수가 실행되지 않아요:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst neverCalled = before(0, () => {\n  console.log('이 함수는 실행되지 않아요');\n  return '결과';\n});\n\nconst onceOnly = before(1, () => {\n  console.log('이 함수도 실행되지 않아요');\n  return '결과';\n});\n\nconsole.log(neverCalled()); // undefined\nconsole.log(onceOnly()); // undefined\n```\n\n리소스 정리 최적화:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 함수 참조가 자동으로 정리되어 메모리 누수 방지\nconst limitedProcessor = before(2, data => {\n  // 복잡한 데이터 처리\n  return processComplexData(data);\n});\n\n// 2번째 호출 이후에는 원본 함수 참조가 제거됨 (가비지 컬렉션)\n```\n\n#### 파라미터\n\n- `n` (`number`): 함수를 실행할 최대 횟수예요. n-1번째까지 실행되고, n번째부터는 마지막 결과를 반환해요.\n- `func` (`Function`): 제한할 함수예요.\n\n#### 반환 값\n\n(`Function`): 지정된 횟수까지만 원본 함수를 실행하고, 그 이후엔 마지막 결과를 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/bind.md",
    "content": "# bind (Lodash 호환성)\n\n::: warning `Function.prototype.bind()`를 사용하세요\n\n이 `bind` 함수는 복잡한 placeholder 처리, 생성자 함수 검사, 인수 병합 로직으로 인해 느리게 동작해요. placeholder가 필요하지 않다면 네이티브 `Function.prototype.bind()`가 더 빠르고 간단해요.\n\n대신 더 빠르고 표준인 `Function.prototype.bind()`를 사용하세요.\n\n:::\n\n함수의 `this` 컨텍스트를 고정하고 일부 인수를 미리 제공하는 함수를 만들어요.\n\n```typescript\nconst boundFunction = bind(func, thisObj, ...partialArgs);\n```\n\n## 사용법\n\n### `bind(func, thisObj, ...partialArgs)`\n\n함수의 `this` 컨텍스트를 고정하거나 일부 인수를 미리 제공하고 싶을 때 `bind`를 사용하세요. 특히 placeholder를 사용해서 특정 위치의 인수를 나중에 제공하고 싶을 때 유용해요.\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction greet(greeting, punctuation) {\n  return greeting + ' ' + this.user + punctuation;\n}\n\nconst object = { user: '김철수' };\nconst boundGreet = bind(greet, object, '안녕하세요');\n\nconsole.log(boundGreet('!')); // \"안녕하세요 김철수!\"\nconsole.log(boundGreet('~')); // \"안녕하세요 김철수~\"\n```\n\n네이티브 bind와 비교:\n\n```typescript\n// bind 사용\nimport { bind } from 'es-toolkit/compat';\n\nconst boundFn1 = bind(func, thisObj, 'arg1');\n\n// 네이티브 bind 사용 (더 빠름)\nconst boundFn2 = func.bind(thisObj, 'arg1');\n\n// 결과는 동일하지만 네이티브가 더 빠름\n```\n\nplaceholder 기능 사용:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction calculate(operation, a, b, suffix) {\n  return `${a} ${operation} ${b} = ${operation === '+' ? a + b : a - b}${suffix}`;\n}\n\n// placeholder로 특정 위치의 인수를 나중에 제공\nconst calcWithSuffix = bind(\n  calculate,\n  null,\n  bind.placeholder, // operation은 나중에 제공\n  bind.placeholder, // a는 나중에 제공\n  bind.placeholder, // b는 나중에 제공\n  '점' // suffix는 미리 제공\n);\n\nconsole.log(calcWithSuffix('+', 5, 3)); // \"5 + 3 = 8점\"\nconsole.log(calcWithSuffix('-', 10, 4)); // \"10 - 4 = 6점\"\n```\n\n더 실용적인 placeholder 예제:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction apiRequest(method, url, options, callback) {\n  // API 요청 로직\n  console.log(`${method} ${url}`, options);\n  callback(`${method} 요청 완료`);\n}\n\n// POST 요청을 위한 부분 적용 함수 생성\nconst postRequest = bind(\n  apiRequest,\n  null,\n  'POST', // method 고정\n  bind.placeholder, // url은 나중에 제공\n  { 'Content-Type': 'application/json' }, // options 고정\n  bind.placeholder // callback은 나중에 제공\n);\n\npostRequest('/api/users', result => {\n  console.log(result); // \"POST 요청 완료\"\n});\n\npostRequest('/api/products', result => {\n  console.log(result); // \"POST 요청 완료\"\n});\n```\n\n메서드 바인딩:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass Logger {\n  constructor(prefix) {\n    this.prefix = prefix;\n  }\n\n  log(level, message) {\n    console.log(`[${this.prefix}] ${level}: ${message}`);\n  }\n}\n\nconst logger = new Logger('MyApp');\n\n// 메서드를 다른 컨텍스트에서 사용하기 위해 바인딩\nconst logError = bind(logger.log, logger, 'ERROR');\nconst logInfo = bind(logger.log, logger, 'INFO');\n\n// 이제 독립적으로 사용 가능\nsetTimeout(() => logError('서버 연결 실패'), 1000);\nsetTimeout(() => logInfo('애플리케이션 시작됨'), 2000);\n```\n\n이벤트 핸들러에서 활용:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass ButtonHandler {\n  constructor(name) {\n    this.name = name;\n    this.clickCount = 0;\n  }\n\n  handleClick(event, customData) {\n    this.clickCount++;\n    console.log(`${this.name} 버튼 클릭 #${this.clickCount}`);\n    console.log('커스텀 데이터:', customData);\n    console.log('이벤트 타입:', event.type);\n  }\n}\n\nconst handler = new ButtonHandler('메뉴');\n\n// 커스텀 데이터는 미리 제공하고, 이벤트는 나중에 전달\nconst boundHandler = bind(\n  handler.handleClick,\n  handler,\n  bind.placeholder, // event는 나중에\n  '메뉴 선택됨' // customData는 미리 제공\n);\n\n// DOM 이벤트에 연결 (event가 자동으로 첫 번째 인수로 전달됨)\ndocument.getElementById('menu-btn')?.addEventListener('click', boundHandler);\n```\n\n생성자 함수도 지원:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city || '서울';\n}\n\n// 서울 거주자를 만드는 생성자\nconst SeoulPerson = bind(Person, null, bind.placeholder, bind.placeholder, '서울');\n\nconst person1 = new SeoulPerson('김철수', 30);\nconst person2 = new SeoulPerson('이영희', 25);\n\nconsole.log(person1); // Person { name: '김철수', age: 30, city: '서울' }\nconsole.log(person2); // Person { name: '이영희', age: 25, city: '서울' }\n```\n\n함수형 프로그래밍에서 활용:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// parseInt의 기수를 10으로 고정\nconst parseDecimal = bind(parseInt, null, bind.placeholder, 10);\n\n// map에서 안전하게 사용\nconst parsed = ['1', '2', '3'].map(parseDecimal);\nconsole.log(parsed); // [1, 2, 3]\n\n// 일반 parseInt 사용 시 문제\nconst problematic = ['1', '2', '3'].map(parseInt); // [1, NaN, NaN]\n```\n\n#### 파라미터\n\n- `func` (`Function`): 바인딩할 함수예요.\n- `thisObj` (`any`, 선택): 함수에 바인딩할 `this` 값이에요.\n- `partialArgs` (`...any[]`): 미리 제공할 인수들이에요. `bind.placeholder`를 사용해서 나중에 제공할 위치를 지정할 수 있어요.\n\n#### 반환 값\n\n(`Function`): `this`가 고정되고 일부 인수가 미리 적용된 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/bindKey.md",
    "content": "# bindKey (Lodash 호환성)\n\n::: warning 화살표 함수나 `bind` 메소드를 사용하세요\n\n이 `bindKey` 함수는 동적 메소드 바인딩과 플레이스홀더 처리로 인해 복잡하고 느리게 동작해요. JavaScript의 기본 `bind` 메소드나 화살표 함수를 사용하면 더 간단하고 성능이 좋아요.\n\n대신 더 빠르고 현대적인 화살표 함수나 `Function.prototype.bind`를 사용하세요.\n\n:::\n\n객체의 메소드를 바인딩하되, 나중에 재정의될 수 있는 메소드를 참조할 수 있게 해요.\n\n```typescript\nconst bound = bindKey(object, key, ...partialArgs);\n```\n\n## 사용법\n\n### `bindKey(object, key, ...partialArgs)`\n\n객체의 메소드를 바인딩하면서도 메소드가 나중에 변경될 수 있게 하고 싶을 때 `bindKey`를 사용하세요. 일반적인 `bind`와 달리 메소드를 호출할 때마다 최신 메소드를 참조해요.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// 메소드를 바인딩해요.\nlet bound = bindKey(object, 'greet', 'hi');\nbound('!');\n// Returns: 'hi fred!'\n\n// 메소드를 재정의해요.\nobject.greet = function (greeting, punctuation) {\n  return greeting + 'ya ' + this.user + punctuation;\n};\n\n// 바인딩된 함수가 새로운 메소드를 호출해요.\nbound('!');\n// Returns: 'hiya fred!'\n```\n\n플레이스홀더를 사용하여 인자의 위치를 예약할 수 있어요.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// 플레이스홀더를 사용해요.\nconst bound = bindKey(object, 'greet', bindKey.placeholder, '!');\nbound('hi');\n// Returns: 'hi fred!'\n```\n\n부분 적용된 인자들이 먼저 전달되고, 그 다음에 호출 시 전달된 인자가 추가돼요.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  add: function (a, b, c) {\n    return a + b + c;\n  },\n};\n\n// 첫 번째 인자를 미리 설정해요.\nconst bound = bindKey(object, 'add', 10);\nbound(20, 30);\n// Returns: 60 (10 + 20 + 30)\n```\n\n#### 파라미터\n\n- `object` (`object`): 메소드를 호출할 객체예요.\n- `key` (`string`): 호출할 메소드의 키예요.\n- `...partialArgs` (`any[]`, 선택): 메소드에 미리 전달할 인자들이에요. `bindKey.placeholder`를 사용하여 인자 위치를 예약할 수 있어요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 바인딩된 새로운 함수를 반환해요. 이 함수는 호출될 때마다 객체의 최신 메소드를 참조해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/curry.md",
    "content": "# curry (Lodash 호환성)\n\n::: warning `es-toolkit`의 `curry`나 수동 클로저를 사용하세요\n\n이 `curry` 함수는 복잡한 placeholder 처리, arity 검증, 인수 합성 로직으로 인해 느리게 동작해요.\n\nplaceholder가 필요하지 않다면 대신 더 빠른 `es-toolkit`의 [`curry`](../../function/curry.md)나 간단한 클로저를 사용하세요.\n\n:::\n\n함수를 커링해서 인수를 하나씩 받거나 여러 개씩 받을 수 있는 함수를 만들어요.\n\n```typescript\nconst curriedFunction = curry(func, arity);\n```\n\n## 사용법\n\n### `curry(func, arity)`\n\n함수를 커링해서 부분 적용을 쉽게 하고 싶을 때 `curry`를 사용하세요. 인수를 단계적으로 제공하거나 placeholder를 사용해서 특정 위치의 인수를 나중에 제공할 때 유용해요.\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction add(a, b, c) {\n  return a + b + c;\n}\n\nconst curriedAdd = curry(add);\n\n// 다양한 방식으로 호출 가능\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(curriedAdd(1, 2)(3)); // 6\nconsole.log(curriedAdd(1)(2, 3)); // 6\nconsole.log(curriedAdd(1, 2, 3)); // 6\n```\n\n메인 라이브러리 curry와 비교:\n\n```typescript\n// compat 버전 (유연함, 하지만 느림)\nimport { curry } from 'es-toolkit/compat';\nconst curriedCompat = curry(add);\ncurriedCompat(1, 2)(3); // 지원됨\ncurriedCompat(1)(curry.placeholder, 3)(2); // placeholder 지원\n\n// 메인 라이브러리 버전 (더 빠름, 하지만 한 번에 하나씩만)\nimport { curry } from 'es-toolkit';\nconst curriedMain = curry(add);\ncurriedMain(1)(2)(3); // 지원됨\ncurriedMain(1, 2)(3); // 지원되지 않음\n```\n\nplaceholder 기능 사용:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction greet(greeting, name, punctuation) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst curriedGreet = curry(greet);\n\n// placeholder로 중간 인수 건너뛰기\nconst greetWithExclamation = curriedGreet(curry.placeholder, curry.placeholder, '!');\nconsole.log(greetWithExclamation('Hello', '김철수')); // \"Hello, 김철수!\"\n\nconst sayHello = curriedGreet('Hello');\nconsole.log(sayHello(curry.placeholder, '~')('이영희')); // \"Hello, 이영희~\"\n```\n\n함수형 프로그래밍에서 활용:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// 맵핑 함수 만들기\nconst map = curry((fn, array) => array.map(fn));\nconst filter = curry((predicate, array) => array.filter(predicate));\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 재사용 가능한 함수들 생성\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\n\nconst mapDouble = map(double);\nconst filterEven = filter(isEven);\n\nconsole.log(mapDouble(numbers)); // [2, 4, 6, 8, 10]\nconsole.log(filterEven(numbers)); // [2, 4]\n\n// 함수 합성\nconst processNumbers = nums => mapDouble(filterEven(nums));\nconsole.log(processNumbers(numbers)); // [4, 8]\n```\n\nAPI 클라이언트 구성:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction apiRequest(method, baseUrl, endpoint, options) {\n  return fetch(`${baseUrl}${endpoint}`, {\n    method,\n    ...options,\n  });\n}\n\nconst curriedApiRequest = curry(apiRequest);\n\n// 기본 설정으로 특화된 함수들 생성\nconst apiGet = curriedApiRequest('GET', 'https://api.example.com');\nconst apiPost = curriedApiRequest('POST', 'https://api.example.com');\n\n// 인증 헤더 포함\nconst authenticatedPost = apiPost(curry.placeholder, {\n  headers: { Authorization: 'Bearer token123' },\n});\n\n// 사용\napiGet('/users'); // GET https://api.example.com/users\nauthenticatedPost('/users'); // POST with auth headers\n```\n\n수학 연산 함수:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nconst calculate = curry((operation, a, b) => {\n  switch (operation) {\n    case '+':\n      return a + b;\n    case '-':\n      return a - b;\n    case '*':\n      return a * b;\n    case '/':\n      return a / b;\n    default:\n      throw new Error('지원하지 않는 연산');\n  }\n});\n\n// 특화된 연산 함수들\nconst add = calculate('+');\nconst subtract = calculate('-');\nconst multiply = calculate('*');\n\nconsole.log(add(5, 3)); // 8\nconsole.log(subtract(10)(4)); // 6\nconsole.log(multiply(3, 4)); // 12\n\n// placeholder로 두 번째 피연산자 고정\nconst addFive = calculate('+', curry.placeholder, 5);\nconsole.log(addFive(10)); // 15\n```\n\nArity 지정:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return [a, b, c, rest];\n}\n\n// arity를 3으로 제한\nconst curriedFixed = curry(variableArgsFunction, 3);\n\nconsole.log(curriedFixed(1)(2)(3)); // [1, 2, 3, []]\nconsole.log(curriedFixed(1, 2)(3)); // [1, 2, 3, []]\n\n// arity 없이 사용 (기본값: function.length)\nconst curriedDefault = curry(variableArgsFunction); // arity = 3\n```\n\n간단한 커링 대안:\n\n```typescript\n// curry 사용\nconst curriedAdd = curry((a, b, c) => a + b + c);\n\n// 수동 클로저 (더 빠름)\nconst manualCurry = a => b => c => a + b + c;\n\n// 둘 다 같은 결과\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(manualCurry(1)(2)(3)); // 6\n```\n\n생성자 함수도 지원:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city;\n}\n\nconst CurriedPerson = curry(Person);\nconst SeoulPerson = CurriedPerson(curry.placeholder, curry.placeholder, '서울');\n\nconst person1 = new SeoulPerson('김철수', 30);\nconst person2 = new SeoulPerson('이영희', 25);\n\nconsole.log(person1.city); // \"서울\"\nconsole.log(person2.city); // \"서울\"\n```\n\n#### 파라미터\n\n- `func` (`Function`): 커링할 함수예요.\n- `arity` (`number`, 선택): 함수의 arity(인수 개수)예요. 생략하면 `func.length`를 사용해요.\n\n#### 반환 값\n\n(`Function & { placeholder: symbol }`): 커링된 함수를 반환해요. `placeholder` 속성으로 인수 위치를 제어할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/curryRight.md",
    "content": "# curryRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`curryRight`](../../function/curryRight.md)나 수동 클로저를 사용하세요\n\n이 `curryRight` 함수는 복잡한 placeholder 처리, arity 검증, 인수 합성 로직으로 인해 느리게 동작해요.\n\nplaceholder가 필요하지 않다면 대신 더 빠른 `es-toolkit`의 [`curryRight`](../../function/curryRight.md)나 간단한 클로저를 사용하세요.\n\n:::\n\n함수를 오른쪽부터 커링해서 마지막 인수부터 하나씩 받거나 여러 개씩 받을 수 있는 함수를 만들어요.\n\n```typescript\nconst curriedFunction = curryRight(func, arity);\n```\n\n## 사용법\n\n### `curryRight(func, arity)`\n\n함수를 오른쪽부터 커링해서 마지막 인수부터 부분 적용하고 싶을 때 `curryRight`를 사용하세요. 일반적인 `curry`와 달리 마지막 인수부터 먼저 받아서 처리해요.\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction subtract(a, b, c) {\n  return a - b - c;\n}\n\nconst curriedSubtract = curryRight(subtract);\n\n// 오른쪽부터(마지막 인수부터) 커링\nconsole.log(curriedSubtract(1)(2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1, 2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1)(2, 5)); // 2 - 5 - 1 = -4\nconsole.log(curriedSubtract(1, 2, 5)); // 1 - 2 - 5 = -6\n```\n\n`curry`와 `curryRight` 차이점:\n\n```typescript\nimport { curry, curryRight } from 'es-toolkit/compat';\n\nfunction divide(a, b, c) {\n  return a / b / c;\n}\n\n// 일반 curry (왼쪽부터)\nconst leftCurried = curry(divide);\nconsole.log(leftCurried(12)(3)(2)); // ((12 / 3) / 2) = 2\n\n// curryRight (오른쪽부터)\nconst rightCurried = curryRight(divide);\nconsole.log(rightCurried(2)(3)(12)); // ((12 / 3) / 2) = 2\n// 마지막에 전달한 12가 첫 번째 인수(a)가 됨\n```\n\n메인 라이브러리와 비교:\n\n```typescript\n// compat 버전 (유연함, 하지만 느림)\nimport { curryRight } from 'es-toolkit/compat';\nconst curriedCompat = curryRight(subtract);\ncurriedCompat(1, 2)(3); // 지원됨\ncurriedCompat(1)(curryRight.placeholder, 3)(2); // placeholder 지원\n\n// 메인 라이브러리 버전 (더 빠름, 하지만 한 번에 하나씩만)\nimport { curryRight } from 'es-toolkit';\nconst curriedMain = curryRight(subtract);\ncurriedMain(1)(2)(3); // 지원됨\ncurriedMain(1, 2)(3); // 지원되지 않음\n```\n\nplaceholder 기능 사용:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction formatMessage(name, action, time) {\n  return `${name}님이 ${action}을 ${time}에 했습니다`;\n}\n\nconst curriedFormat = curryRight(formatMessage);\n\n// placeholder로 특정 위치 건너뛰기\nconst todayAction = curriedFormat('오늘');\nconst todayLoginAction = todayAction(curryRight.placeholder, '로그인');\n\nconsole.log(todayLoginAction('김철수'));\n// \"김철수님이 로그인을 오늘에 했습니다\"\n\n// 시간을 먼저 고정\nconst morningFormat = curriedFormat('아침 9시');\nconsole.log(morningFormat('댓글 작성', '이영희'));\n// \"이영희님이 댓글 작성을 아침 9시에 했습니다\"\n```\n\n배열 처리에서 활용:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 배열에서 특정 개수만큼 뒤에서 자르기\nfunction takeFromEnd(array, count, separator = ', ') {\n  return array.slice(-count).join(separator);\n}\n\nconst curriedTake = curryRight(takeFromEnd);\n\n// 쉼표로 구분하는 함수 생성\nconst takeWithComma = curriedTake(', ');\n\n// 마지막 3개 가져오기\nconst takeLast3 = takeWithComma(3);\n\nconst fruits = ['사과', '바나나', '오렌지', '포도', '키위'];\nconsole.log(takeLast3(fruits)); // \"오렌지, 포도, 키위\"\n\n// 다른 구분자 사용\nconst takeWithDash = curriedTake(' - ');\nconsole.log(takeWithDash(2, fruits)); // \"포도 - 키위\"\n```\n\n함수 합성에서 활용:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 로그 출력 함수\nfunction logWithPrefix(message, level, timestamp) {\n  return `[${timestamp}] ${level}: ${message}`;\n}\n\nconst curriedLog = curryRight(logWithPrefix);\n\n// 현재 시간으로 고정\nconst currentTimeLog = curriedLog(new Date().toISOString());\n\n// 레벨별 로거 생성\nconst errorLog = currentTimeLog('ERROR');\nconst infoLog = currentTimeLog('INFO');\nconst debugLog = currentTimeLog('DEBUG');\n\n// 사용\nconsole.log(errorLog('데이터베이스 연결 실패'));\nconsole.log(infoLog('서버 시작됨'));\nconsole.log(debugLog('사용자 요청 처리 중'));\n```\n\n함수형 프로그래밍 파이프라인:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 데이터 변환 함수들\nconst mapWith = curryRight((array, fn) => array.map(fn));\nconst filterWith = curryRight((array, predicate) => array.filter(predicate));\nconst reduceWith = curryRight((array, reducer, initial) => array.reduce(reducer, initial));\n\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n// 변환 함수들 정의\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\nconst sum = (acc, val) => acc + val;\n\n// 파이프라인 구성 (오른쪽 먼저)\nconst processNumbers = nums => {\n  return reduceWith(filterWith(mapWith(nums, double), isEven), sum, 0);\n};\n\nconsole.log(processNumbers(numbers)); // 모든 수를 2배 후 짝수만 필터링해서 합계\n```\n\nAPI 요청 빌더:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction makeRequest(url, method, headers, body) {\n  return fetch(url, { method, headers, body });\n}\n\nconst curriedRequest = curryRight(makeRequest);\n\n// body부터 설정\nconst withJsonBody = curriedRequest(JSON.stringify({ data: 'test' }));\n\n// headers 추가\nconst withHeaders = withJsonBody({\n  'Content-Type': 'application/json',\n  Authorization: 'Bearer token123',\n});\n\n// POST 메서드 설정\nconst postRequest = withHeaders('POST');\n\n// 최종 사용\npostRequest('/api/data')\n  .then(response => response.json())\n  .then(data => console.log(data));\n```\n\n수동 커링 대안:\n\n```typescript\n// curryRight 사용\nconst curriedSubtract = curryRight((a, b, c) => a - b - c);\n\n// 수동 클로저 (더 빠름, 오른쪽부터)\nconst manualCurryRight = c => b => a => a - b - c;\n\n// 둘 다 같은 결과\nconsole.log(curriedSubtract(1)(2)(5)); // 2\nconsole.log(manualCurryRight(1)(2)(5)); // 2\n```\n\nArity 지정:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return { a, b, c, rest };\n}\n\n// arity를 3으로 제한 (뒤의 rest는 무시)\nconst curriedFixed = curryRight(variableArgsFunction, 3);\n\n// 오른쪽부터 c, b, a 순서로 받음\nconsole.log(curriedFixed(3)(2)(1)); // { a: 1, b: 2, c: 3, rest: [] }\n```\n\n#### 파라미터\n\n- `func` (`Function`): 오른쪽부터 커링할 함수예요.\n- `arity` (`number`, 선택): 함수의 arity(인수 개수)예요. 생략하면 `func.length`를 사용해요.\n\n#### 반환 값\n\n(`Function & { placeholder: symbol }`): 오른쪽부터 커링된 함수를 반환해요. `placeholder` 속성으로 인수 위치를 제어할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/debounce.md",
    "content": "# debounce (Lodash 호환성)\n\n::: warning `es-toolkit`의 [`debounce`](../../function/debounce.md)를 사용하세요\n\n이 `debounce` 함수는 복잡한 `maxWait` 처리와 Lodash 호환 옵션 구조로 인해 오버헤드가 있어요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [`debounce`](../../function/debounce.md)를 사용하세요.\n\n:::\n\n함수 호출을 지연시키고, 마지막 호출 후 지정된 시간이 경과한 후에만 실행되도록 하는 디바운스 함수를 만들어요.\n\n```typescript\nconst debouncedFunction = debounce(func, wait, options);\n```\n\n## 사용법\n\n### `debounce(func, wait, options)`\n\n함수 호출을 지연시키고 싶을 때 `debounce`를 사용하세요. 검색 입력, 스크롤 이벤트, 버튼 클릭 등에서 과도한 호출을 방지할 때 유용해요.\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst searchFunction = debounce(query => {\n  console.log('검색:', query);\n}, 300);\n\n// 300ms 내에 다시 호출되지 않으면 실행\nsearchFunction('리액트'); // 실행 안됨\nsearchFunction('뷰'); // 실행 안됨\nsearchFunction('앵귤러'); // 300ms 후에 \"검색: 앵귤러\" 출력\n```\n\n메인 라이브러리 debounce와 비교:\n\n```typescript\n// compat 버전 (Lodash 호환, maxWait 등 추가 옵션)\nimport { debounce } from 'es-toolkit/compat';\nconst debouncedCompat = debounce(func, 300, {\n  leading: true,\n  trailing: false,\n  maxWait: 1000\n});\n\n// 메인 라이브러리 버전 (더 빠름, 간단함)\nimport { debounce } from 'es-toolkit';\nconst debouncedMain = debounce(func, 300, {\n  edges: ['leading'] // leading/trailing 대신 edges 사용\n});\n```\n\nleading과 trailing 옵션:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst func = () => console.log('실행됨');\n\n// leading: true - 첫 호출 시 즉시 실행\nconst leadingDebounce = debounce(func, 1000, { leading: true });\nleadingDebounce(); // 즉시 \"실행됨\" 출력\nleadingDebounce(); // 1초 대기\n// 1초 후 추가 실행 없음\n\n// trailing: true (기본값) - 마지막 호출 후 지연 시간 뒤 실행\nconst trailingDebounce = debounce(func, 1000, { trailing: true });\ntrailingDebounce(); // 1초 대기\ntrailingDebounce(); // 1초 대기 (이전 타이머 취소)\n// 1초 후 \"실행됨\" 출력\n\n// 둘 다 true - 시작과 끝에서 실행\nconst bothDebounce = debounce(func, 1000, {\n  leading: true,\n  trailing: true,\n});\nbothDebounce(); // 즉시 \"실행됨\" 출력\nbothDebounce(); // 1초 대기\n// 1초 후 \"실행됨\" 출력 (trailing)\n```\n\nmaxWait 옵션:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 최대 2초마다는 반드시 실행\nconst debouncedWithMaxWait = debounce(() => console.log('저장됨'), 500, { maxWait: 2000 });\n\n// 빠르게 연속 호출해도 최대 2초마다는 실행됨\nsetInterval(() => {\n  debouncedWithMaxWait();\n}, 100); // 100ms마다 호출하지만 2초마다 \"저장됨\" 출력\n```\n\n실제 검색 예제:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass SearchComponent {\n  constructor() {\n    this.searchInput = document.getElementById('search');\n\n    // 사용자 입력을 300ms 디바운스\n    this.debouncedSearch = debounce(this.performSearch.bind(this), 300, {\n      leading: false, // 입력 시작시 즉시 검색하지 않음\n      trailing: true, // 입력 멈춘 후 검색\n    });\n\n    this.searchInput.addEventListener('input', e => {\n      this.debouncedSearch(e.target.value);\n    });\n  }\n\n  performSearch(query) {\n    if (query.length < 2) return;\n\n    console.log('API 호출:', query);\n    // fetch(`/api/search?q=${query}`)...\n  }\n}\n```\n\n스크롤 이벤트 최적화:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 스크롤 이벤트를 100ms 디바운스하되, 최대 500ms마다는 실행\nconst optimizedScrollHandler = debounce(\n  () => {\n    const scrollTop = window.pageYOffset;\n    console.log('스크롤 위치:', scrollTop);\n\n    // 헤더 숨김/표시 로직\n    if (scrollTop > 100) {\n      document.header.classList.add('hidden');\n    } else {\n      document.header.classList.remove('hidden');\n    }\n  },\n  100,\n  { maxWait: 500 }\n);\n\nwindow.addEventListener('scroll', optimizedScrollHandler);\n```\n\nAPI 호출 제한:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass AutoSave {\n  constructor() {\n    // 500ms 디바운스, 최대 5초마다는 저장\n    this.debouncedSave = debounce(this.saveToServer.bind(this), 500, { maxWait: 5000 });\n  }\n\n  onTextChange(content) {\n    this.pendingContent = content;\n    this.debouncedSave();\n  }\n\n  saveToServer() {\n    if (!this.pendingContent) return;\n\n    console.log('서버에 저장:', this.pendingContent);\n    // fetch('/api/save', { ... })\n\n    this.pendingContent = null;\n  }\n}\n```\n\ncancel과 flush 메서드:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst debouncedFunc = debounce(() => {\n  console.log('실행됨');\n}, 1000);\n\ndebouncedFunc(); // 1초 대기 중\n\n// 대기 중인 실행을 취소\ndebouncedFunc.cancel();\n\n// 또는 즉시 실행\ndebouncedFunc(); // 1초 대기 시작\ndebouncedFunc.flush(); // 즉시 \"실행됨\" 출력하고 타이머 취소\n```\n\n버튼 클릭 중복 방지:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleSubmit = debounce(\n  async formData => {\n    console.log('폼 제출 중...');\n    try {\n      const response = await fetch('/api/submit', {\n        method: 'POST',\n        body: formData,\n      });\n      console.log('제출 완료');\n    } catch (error) {\n      console.error('제출 실패:', error);\n    }\n  },\n  1000,\n  { leading: true, trailing: false } // 첫 클릭만 처리\n);\n\ndocument.getElementById('submit-btn').addEventListener('click', e => {\n  const formData = new FormData(e.target.form);\n  handleSubmit(formData);\n});\n```\n\n리사이즈 이벤트 처리:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleResize = debounce(\n  () => {\n    const width = window.innerWidth;\n    const height = window.innerHeight;\n\n    console.log('창 크기 변경:', { width, height });\n\n    // 레이아웃 재계산\n    recalculateLayout();\n  },\n  250,\n  { leading: false, trailing: true }\n);\n\nwindow.addEventListener('resize', handleResize);\n\n// 페이지 종료 시 정리\nwindow.addEventListener('beforeunload', () => {\n  handleResize.cancel();\n});\n```\n\n#### 파라미터\n\n- `func` (`Function`): 디바운스할 함수예요.\n- `wait` (`number`, 선택): 지연할 밀리초 수예요. 기본값은 `0`이에요.\n- `options` (`DebounceSettings`, 선택): 옵션 객체예요.\n  - `leading` (`boolean`): `true`이면 지연 시작 시점에 함수를 실행해요. 기본값은 `false`예요.\n  - `trailing` (`boolean`): `true`이면 지연 종료 시점에 함수를 실행해요. 기본값은 `true`예요.\n  - `maxWait` (`number`): 함수 실행이 지연될 수 있는 최대 시간이에요. 기본값은 `Infinity`예요.\n\n#### 반환 값\n\n(`DebouncedFunc`): 디바운스된 함수를 반환해요. `cancel()`과 `flush()` 메서드가 포함되어 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/defer.md",
    "content": "# defer (Lodash 호환성)\n\n::: warning `setTimeout`을 사용하세요\n\n이 `defer` 함수는 내부적으로 `setTimeout(func, 1, ...args)`를 호출하는 단순한 래퍼 함수예요.\n\n대신 더 직접적이고 현대적인 `setTimeout`을 사용하세요.\n\n:::\n\n함수를 다음 이벤트 루프에서 실행하도록 지연시켜요.\n\n```typescript\nconst timerId = defer(func, ...args);\n```\n\n## 사용법\n\n### `defer(func, ...args)`\n\n현재 콜 스택이 끝난 후에 함수를 실행하고 싶을 때 `defer`를 사용하세요. 함수 실행을 다음 이벤트 루프로 미루면서 추가 인수들을 함수에 전달할 수 있어요.\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// 콘솔 출력을 지연시켜요\ndefer(console.log, 'deferred message');\n// 현재 콜 스택이 끝난 후에 'deferred message'를 출력해요\n\n// 함수와 인수를 함께 지연 실행해요\nconst greet = (name: string, greeting: string) => {\n  console.log(`${greeting}, ${name}!`);\n};\n\ndefer(greet, 'John', 'Hello');\n// 현재 콜 스택이 끝난 후에 'Hello, John!'을 출력해요\n```\n\n내부적으로 `setTimeout(func, 1, ...args)`를 사용해서 1밀리초 후에 함수를 실행해요.\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// 다음 두 코드는 동일하게 동작해요\ndefer(console.log, 'message');\nsetTimeout(console.log, 1, 'message');\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 지연 실행할 함수예요.\n- `...args` (`any[]`): 함수에 전달할 인수들이에요.\n\n#### 반환 값\n\n(`number`): `setTimeout`에서 반환된 타이머 ID를 반환해요. `clearTimeout`으로 실행을 취소할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/delay.md",
    "content": "# delay (Lodash 호환성)\n\n::: warning `setTimeout`을 사용하세요\n\n이 `delay` 함수는 `setTimeout`의 단순한 래퍼이지만 추가적인 타입 검증과 숫자 변환으로 인해 약간의 오버헤드가 있어요.\n\n대신 더 빠르고 표준인 `setTimeout`을 직접 사용하세요.\n\n:::\n\n지정된 시간 후에 함수를 실행하는 타이머를 설정해요.\n\n```typescript\nconst timerId = delay(func, wait, ...args);\n```\n\n## 사용법\n\n### `delay(func, wait, ...args)`\n\n함수 실행을 특정 시간만큼 지연시키고 싶을 때 `delay`를 사용하세요. 애니메이션 타이밍, 사용자 피드백 지연, 비동기 작업 스케줄링에서 유용해요.\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst timerId = delay(() => {\n  console.log('1초 후 실행됨');\n}, 1000);\n\n// 인수와 함께 사용\ndelay(\n  (name, age) => {\n    console.log(`안녕하세요, ${age}세 ${name}님!`);\n  },\n  2000,\n  '김철수',\n  30\n);\n// 2초 후: \"안녕하세요, 30세 김철수님!\" 출력\n```\n\n`setTimeout`과 비교:\n\n```typescript\n// delay 사용\nimport { delay } from 'es-toolkit/compat';\n\nconst timerId1 = delay(myFunction, 1000, 'arg1', 'arg2');\n\n// setTimeout 사용 (더 빠름, 표준)\nconst timerId2 = setTimeout(myFunction, 1000, 'arg1', 'arg2');\n\n// 또는 화살표 함수로\nconst timerId3 = setTimeout(() => myFunction('arg1', 'arg2'), 1000);\n```\n\n애니메이션 시퀀스:\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass AnimationSequence {\n  constructor(element) {\n    this.element = element;\n  }\n\n  fadeInSequence() {\n    // 즉시 시작\n    this.element.style.opacity = '0';\n    this.element.style.display = 'block';\n\n    // 100ms 후 페이드인 시작\n    delay(() => {\n      this.element.style.transition = 'opacity 500ms ease-in';\n      this.element.style.opacity = '1';\n    }, 100);\n\n    // 1초 후 스케일 애니메이션\n    delay(() => {\n      this.element.style.transform = 'scale(1.1)';\n    }, 1000);\n\n    // 1.5초 후 원래 크기로\n    delay(() => {\n      this.element.style.transform = 'scale(1)';\n    }, 1500);\n  }\n}\n```\n\n타이머 취소:\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass TimerManager {\n  constructor() {\n    this.timers = new Map();\n  }\n\n  setDelayedTask(id, task, delayMs) {\n    // 기존 타이머가 있으면 취소\n    this.cancelTask(id);\n\n    const timerId = delay(task, delayMs);\n    this.timers.set(id, timerId);\n\n    return timerId;\n  }\n\n  cancelTask(id) {\n    const timerId = this.timers.get(id);\n    if (timerId) {\n      clearTimeout(timerId);\n      this.timers.delete(id);\n      return true;\n    }\n    return false;\n  }\n\n  cancelAllTasks() {\n    this.timers.forEach(timerId => clearTimeout(timerId));\n    this.timers.clear();\n  }\n}\n\nconst timerManager = new TimerManager();\n\n// 작업 스케줄링\ntimerManager.setDelayedTask(\n  'save',\n  () => {\n    console.log('자동 저장됨');\n  },\n  5000\n);\n\ntimerManager.setDelayedTask(\n  'cleanup',\n  () => {\n    console.log('정리 작업 완료');\n  },\n  10000\n);\n\n// 필요시 특정 작업 취소\n// timerManager.cancelTask('save');\n\n// 페이지 종료시 모든 타이머 정리\nwindow.addEventListener('beforeunload', () => {\n  timerManager.cancelAllTasks();\n});\n```\n\n#### 파라미터\n\n- `func` (`Function`): 지연 후 실행할 함수예요.\n- `wait` (`number`): 지연할 밀리초 수예요.\n- `args` (`...any[]`): 함수 실행 시 전달할 인수들이에요.\n\n#### 반환 값\n\n(`number`): 타이머 ID를 반환해요. `clearTimeout()`으로 취소할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/flip.md",
    "content": "# flip (Lodash 호환성)\n\n::: warning 직접적인 인수 반전을 사용하세요\n\n이 `flip` 함수는 단순히 함수의 인수 순서를 반대로 바꾸는 기능이에요. 대부분의 경우 더 간단한 방법으로 대체할 수 있어요.\n\n대신 더 빠르고 현대적인 `(...args) => func(...args.reverse())`나 직접적인 인수 전달을 사용하세요.\n\n:::\n\n주어진 함수의 인수 순서를 뒤집는 함수를 생성해요.\n\n```typescript\nconst flippedFunc = flip(func);\n```\n\n## 사용법\n\n### `flip(func)`\n\n함수의 인수 순서를 뒤집어서 새로운 함수를 만들고 싶을 때 `flip`을 사용하세요. 원래 함수가 첫 번째 인수부터 순서대로 받던 것을 마지막 인수부터 받도록 바꿔줘요.\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst flipped = flip(greet);\nflipped('John', 'Hello'); // 'Hello, John!'\n\n// 원래 함수는 (greeting, name) 순서지만\n// 뒤집힌 함수는 (name, greeting) 순서로 받아요\n```\n\n여러 인수를 받는 함수에서도 모든 인수의 순서가 뒤바뀌어요.\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction fn(a: string, b: string, c: string, d: string) {\n  return [a, b, c, d];\n}\n\nconst flipped = flip(fn);\nflipped('1', '2', '3', '4'); // ['4', '3', '2', '1']\n```\n\n#### 파라미터\n\n- `func` (`F`): 인수 순서를 뒤집을 함수예요.\n\n#### 반환 값\n\n(`(...args: Reversed<Parameters<F>>) => ReturnType<F>`): 인수 순서가 뒤집힌 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/flow.md",
    "content": "# flow (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flow`를 사용하세요\n\n이 `flow` 함수는 Lodash 호환성을 위해 배열 평탄화 처리가 추가되어 복잡해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flow](../../function/flow.md)를 사용하세요.\n\n:::\n\n주어진 함수들을 왼쪽부터 오른쪽으로 순차적으로 실행하는 새로운 함수를 만들어요.\n\n```typescript\nconst combinedFunc = flow(...functions);\n```\n\n## 사용법\n\n### `flow(...functions)`\n\n여러 함수를 왼쪽부터 오른쪽으로 순차적으로 실행하는 하나의 합성 함수를 만들고 싶을 때 `flow`를 사용하세요. 데이터 변환 파이프라인을 만들 때 유용해요.\n\n```typescript\nimport { flow } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 왼쪽부터 오른쪽으로 실행: double(square(add(x, y)))\nconst calculate = flow(add, square, double);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 배열로 함수 전달\nconst calculate2 = flow([add, square], double);\nconsole.log(calculate2(2, 3)); // 50\n\n// 현대적인 대안 (권장)\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// 파이프 연산자 사용 (미래 JavaScript)\nconst pipeCalculate = (x, y) => add(x, y) |> square |> double;\n\n// 또는 체이닝 패턴\nclass Calculator {\n  constructor(value) {\n    this.value = value;\n  }\n\n  add(n) {\n    this.value += n;\n    return this;\n  }\n\n  square() {\n    this.value *= this.value;\n    return this;\n  }\n\n  double() {\n    this.value *= 2;\n    return this;\n  }\n\n  valueOf() {\n    return this.value;\n  }\n}\n\nconst chainedResult = new Calculator(3).square().double().valueOf(); // 18\n```\n\n#### 파라미터\n\n- `...functions` (`Array<Function | Function[]>`): 왼쪽부터 오른쪽으로 실행할 함수들이에요. 배열로 전달할 수도 있어요.\n\n#### 반환 값\n\n(`Function`): 모든 함수를 왼쪽부터 오른쪽으로 순차적으로 실행하는 새로운 합성 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/flowRight.md",
    "content": "# flowRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 `flowRight`를 사용하세요\n\n이 `flowRight` 함수는 Lodash 호환성을 위해 배열 평탄화 처리가 추가되어 복잡해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [flowRight](../../function/flowRight.md)를 사용하세요.\n\n:::\n\n주어진 함수들을 오른쪽부터 왼쪽으로 순차적으로 실행하는 새로운 함수를 만들어요.\n\n```typescript\nconst combinedFunc = flowRight(...functions);\n```\n\n## 사용법\n\n### `flowRight(...functions)`\n\n여러 함수를 오른쪽부터 왼쪽으로 순차적으로 실행하는 하나의 합성 함수를 만들고 싶을 때 `flowRight`를 사용하세요. 데이터 변환 파이프라인을 만들 때 유용해요.\n\n```typescript\nimport { flowRight } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 오른쪽부터 왼쪽으로 실행: double(square(add(x, y)))\nconst calculate = flowRight(double, square, add);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 배열로 함수 전달\nconst calculate2 = flowRight([double, square], add);\nconsole.log(calculate2(2, 3)); // 50\n\n// 현대적인 대안 (권장)\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// 또는 함수 체이닝 사용\nconst chainedCalculate = (x, y) => [x, y]\n  .reduce((acc, val, idx) => idx === 0 ? val : acc + val)\n  .valueOf()\n  |> (n => n * n)\n  |> (n => n * 2);\n```\n\n일반적으로 `flow`와 반대 순서로 동작해요. 합성 함수와 비슷한 방식으로 동작하여 직관적입니다.\n\n#### 파라미터\n\n- `...functions` (`Array<Function | Function[]>`): 오른쪽부터 왼쪽으로 실행할 함수들이에요. 배열로 전달할 수도 있어요.\n\n#### 반환 값\n\n(`Function`): 모든 함수를 오른쪽부터 왼쪽으로 순차적으로 실행하는 새로운 합성 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/identity.md",
    "content": "# identity (Lodash 호환성)\n\n::: warning `es-toolkit`의 `identity`를 사용하세요\n\n이 `identity` 함수는 `es-toolkit`의 메인 라이브러리에도 동일한 기능의 함수가 있어요. 단순히 입력값을 그대로 반환하는 기능이에요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [identity](../../function/identity.md)를 사용하세요.\n\n:::\n\n입력받은 값을 그대로 반환해요.\n\n```typescript\nconst result = identity(value);\n```\n\n## 사용법\n\n### `identity(value)`\n\n입력받은 값을 그대로 반환하고 싶을 때 `identity`를 사용하세요. 주로 기본값이나 플레이스홀더 함수로 사용되며, 함수형 프로그래밍에서 자주 사용돼요.\n\n```typescript\nimport { identity } from 'es-toolkit/compat';\n\n// 기본 사용법\nconsole.log(identity(5)); // 5\nconsole.log(identity('hello')); // 'hello'\nconsole.log(identity({ key: 'value' })); // { key: 'value' }\n\n// 배열의 map과 함께 사용 (값 복사)\nconst numbers = [1, 2, 3, 4, 5];\nconst copied = numbers.map(identity);\nconsole.log(copied); // [1, 2, 3, 4, 5]\n\n// 필터링에서 기본값으로 사용\nconst values = [1, 0, '', 'hello', null, undefined, false, true];\nconst filtered = values.filter(identity); // 참으로 평가되는 값들만 남김\nconsole.log(filtered); // [1, 'hello', true]\n\n// 기본 변환 함수로 사용\nfunction processData(data, transform = identity) {\n  return transform(data);\n}\n\nconsole.log(processData('hello')); // 'hello'\nconsole.log(processData('hello', x => x.toUpperCase())); // 'HELLO'\n```\n\n대부분의 경우 더 간단한 화살표 함수 `x => x`로 대체할 수 있어요:\n\n```typescript\n// identity 대신 화살표 함수 사용 (권장)\nconst copied = numbers.map(x => x);\nconst filtered = values.filter(x => x);\n```\n\n#### 파라미터\n\n- `value` (`T`): 반환할 값이에요.\n\n#### 반환 값\n\n(`T`): 입력받은 값을 그대로 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/memoize.md",
    "content": "# memoize (Lodash 호환성)\n\n::: warning `es-toolkit`의 `memoize`를 사용하세요\n\n이 `memoize` 함수는 `resolver` 함수의 `null` 체크, `MapCache` 인터페이스의 복잡한 타입 처리, 그리고 Lodash 호환성을 위한 추가적인 오버헤드로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [memoize](../../function/memoize.md)를 사용하세요.\n\n:::\n\n함수의 결과를 캐시하여 동일한 인수로 호출할 때 성능을 향상시켜요.\n\n```typescript\nconst memoizedFunc = memoize(func, resolver);\n```\n\n## 사용법\n\n### `memoize(func, resolver)`\n\n함수의 결과를 메모이제이션하여 동일한 인수로 호출할 때 이전 결과를 재사용하고 싶을 때 `memoize`를 사용하세요. 비용이 많이 드는 계산이나 API 호출에 유용해요.\n\n```typescript\nimport { memoize } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction expensiveCalculation(n) {\n  console.log('계산 중...', n);\n  return n * n;\n}\n\nconst memoizedCalc = memoize(expensiveCalculation);\n\nconsole.log(memoizedCalc(5)); // '계산 중... 5', 25\nconsole.log(memoizedCalc(5)); // 25 (캐시된 결과, 계산하지 않음)\nconsole.log(memoizedCalc(10)); // '계산 중... 10', 100\n\n// 커스텀 리졸버 사용\nfunction fetchUserData(userId, includeProfile) {\n  console.log('사용자 데이터 가져오는 중...', userId, includeProfile);\n  return { id: userId, profile: includeProfile ? '프로필 데이터' : null };\n}\n\n// 모든 인수를 고려한 캐시 키 생성\nconst memoizedFetch = memoize(fetchUserData, (userId, includeProfile) => {\n  return `${userId}_${includeProfile}`;\n});\n\nmemoizedFetch(1, true); // '사용자 데이터 가져오는 중... 1 true'\nmemoizedFetch(1, true); // 캐시된 결과 사용\nmemoizedFetch(1, false); // '사용자 데이터 가져오는 중... 1 false' (다른 캐시 키)\n\n// 캐시 접근 및 수정\nconsole.log(memoizedCalc.cache.get(5)); // 25\nmemoizedCalc.cache.set(7, 49); // 수동으로 캐시 설정\nconsole.log(memoizedCalc(7)); // 49 (계산하지 않고 캐시된 값 사용)\n```\n\n대부분의 경우 기본 해시 맵을 사용하지만, 필요에 따라 커스텀 캐시 구현체를 사용할 수도 있어요.\n\n#### 파라미터\n\n- `func` (`Function`): 메모이제이션할 함수예요.\n- `resolver` (`Function`, 선택): 캐시 키를 결정하는 함수예요. 제공되지 않으면 첫 번째 인수를 키로 사용해요.\n\n#### 반환 값\n\n(`Function & { cache: MapCache }`): 메모이제이션된 함수를 반환해요. 반환된 함수에는 `cache` 프로퍼티가 있어서 캐시에 직접 접근할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/negate.md",
    "content": "# negate (Lodash 호환성)\n\n::: warning 논리 부정 연산자를 사용하세요\n\n이 `negate` 함수는 단순히 함수의 결과를 부정하는 기능이에요. 대부분의 경우 논리 부정 연산자(`!`)를 직접 사용하는 것이 더 간단하고 빨라요.\n\n대신 더 빠르고 현대적인 `!predicate(...args)` 또는 `(...args) => !predicate(...args)`를 사용하세요.\n\n:::\n\n주어진 함수의 결과를 부정하는 새로운 함수를 만들어요.\n\n```typescript\nconst negatedFunc = negate(predicate);\n```\n\n## 사용법\n\n### `negate(predicate)`\n\n함수의 결과를 부정하는 새로운 함수를 만들고 싶을 때 `negate`를 사용하세요. 필터링이나 조건문에서 반대 조건을 체크할 때 유용해요.\n\n```typescript\nimport { negate } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\nconst isOdd = negate(isEven);\nconsole.log(isOdd(3)); // true\nconsole.log(isOdd(4)); // false\n\n// 배열 필터링에서 사용\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n\n// 현대적인 대안 (권장)\nconst modernOddNumbers = numbers.filter(n => !isEven(n));\n// 또는\nconst isOddModern = n => !isEven(n);\nconst modernOddNumbers2 = numbers.filter(isOddModern);\n\n// 복잡한 예시\nfunction isEmpty(str) {\n  return str.trim().length === 0;\n}\n\nconst hasContent = negate(isEmpty);\nconst messages = ['', ' ', 'hello', '  ', 'world'];\nconst validMessages = messages.filter(hasContent);\nconsole.log(validMessages); // ['hello', 'world']\n```\n\n주로 배열 필터링이나 조건부 로직에서 사용되지만, 대부분의 경우 논리 부정 연산자를 직접 사용하는 것이 더 직관적이에요.\n\n#### 파라미터\n\n- `predicate` (`Function`): 결과를 부정할 함수예요. 반드시 불리언 값을 반환해야 해요.\n\n#### 반환 값\n\n(`Function`): 원본 함수의 결과를 부정한 값을 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/noop.md",
    "content": "# noop (Lodash 호환성)\n\n::: warning `es-toolkit`의 `noop`을 사용하세요\n\n`es-toolkit`에도 동일한 동작을 하는 [noop](../../function/noop.md) 함수가 있어요.\n\n:::\n\n아무것도 하지 않는 빈 함수예요.\n\n```typescript\nnoop();\n```\n\n## 사용법\n\n### `noop(...args)`\n\n아무것도 하지 않는 플레이스홀더 함수가 필요할 때 `noop`을 사용하세요. 기본값이나 콜백 함수로 자주 사용돼요.\n\n```typescript\nimport { noop } from 'es-toolkit/compat';\n\n// 기본 사용법\nnoop(); // 아무것도 하지 않음\nnoop(1, 2, 3); // 인수를 받지만 아무것도 하지 않음\n\n// 기본 콜백으로 사용\nfunction processData(data, callback = noop) {\n  // 데이터 처리\n  console.log('데이터 처리 중...', data);\n\n  // 콜백 호출 (제공되지 않았다면 noop)\n  callback(data);\n}\n\nprocessData('테스트'); // 콜백이 제공되지 않았지만 오류 없이 동작\n\n// 현대적인 대안 (권장)\nfunction modernProcessData(data, callback = () => {}) {\n  console.log('데이터 처리 중...', data);\n  callback(data);\n}\n\n// 또는 선택적 콜백 사용\nfunction processDataOptional(data, callback) {\n  console.log('데이터 처리 중...', data);\n  callback?.(data); // 콜백이 제공된 경우만 호출\n}\n```\n\n기본값이나 플레이스홀더가 필요한 상황에서 유용하지만, 현대 JavaScript에서는 선택적 체이닝(`?.`)이나 기본 매개변수를 사용하는 것이 더 일반적이에요.\n\n#### 파라미터\n\n- `...args` (`any[]`): 어떤 인수들이든 받을 수 있지만 모두 무시돼요.\n\n#### 반환 값\n\n(`void`): 아무것도 반환하지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/nthArg.md",
    "content": "# nthArg (Lodash 호환성)\n\n::: warning 화살표 함수를 사용하세요\n\n이 `nthArg` 함수는 단순히 특정 인덱스의 인자를 반환하는 래퍼 함수를 만들 뿐이에요. 화살표 함수를 사용하면 더 간결하고 명확하게 같은 기능을 구현할 수 있어요.\n\n대신 더 빠르고 현대적인 화살표 함수를 사용하세요.\n\n:::\n\n지정한 인덱스의 인자를 반환하는 함수를 생성해요.\n\n```typescript\nconst getNthArg = nthArg(n);\n```\n\n## 사용법\n\n### `nthArg(n)`\n\n함수의 특정 위치에 있는 인자만 필요할 때 `nthArg`를 사용하세요. 음수 인덱스를 사용하면 끝에서부터 계산해요.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 두 번째 인자를 가져오는 함수 생성\nconst getSecondArg = nthArg(1);\ngetSecondArg('a', 'b', 'c', 'd');\n// Returns: 'b'\n\n// 마지막에서 두 번째 인자를 가져오는 함수 생성\nconst getPenultimateArg = nthArg(-2);\ngetPenultimateArg('a', 'b', 'c', 'd');\n// Returns: 'c'\n\n// 첫 번째 인자를 가져오는 함수 생성 (기본값)\nconst getFirstArg = nthArg();\ngetFirstArg('a', 'b', 'c');\n// Returns: 'a'\n```\n\n배열 메소드와 함께 사용하면 유용해요.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 각 배열의 두 번째 요소만 추출\nconst arrays = [\n  [1, 2, 3],\n  [4, 5, 6],\n  [7, 8, 9],\n];\narrays.map(nthArg(1));\n// Returns: [2, 5, 8]\n```\n\n음수 인덱스는 끝에서부터 계산해요.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 마지막 인자를 가져오는 함수\nconst getLastArg = nthArg(-1);\ngetLastArg('first', 'middle', 'last');\n// Returns: 'last'\n```\n\n#### 파라미터\n\n- `n` (`number`, 선택): 반환할 인자의 인덱스예요. 음수 값은 끝에서부터 계산해요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 지정한 인덱스의 인자를 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/once.md",
    "content": "# once (Lodash 호환성)\n\n::: warning `es-toolkit`의 `once`를 사용하세요\n\n이 `once` 함수는 `es-toolkit`의 메인 라이브러리 [once](../../function/once.md) 함수와 동일한 기능을 가지고 있어요.\n\n:::\n\n함수가 한 번만 호출되도록 제한해요.\n\n```typescript\nconst limitedFunc = once(func);\n```\n\n## 사용법\n\n### `once(func)`\n\n함수가 한 번만 호출되도록 제한하고 싶을 때 `once`를 사용하세요. 첫 번째 호출 후에는 결과가 캐시되어 동일한 값을 반환해요.\n\n```typescript\nimport { once } from 'es-toolkit/compat';\n\n// 기본 사용법\nlet count = 0;\nconst increment = once(() => {\n  count++;\n  console.log('카운터 증가:', count);\n  return count;\n});\n\nincrement(); // '카운터 증가: 1' 출력, 1 반환\nincrement(); // 아무것도 출력하지 않음, 1 반환\nincrement(); // 아무것도 출력하지 않음, 1 반환\n\n// 실용 예시 - 초기화 함수\nconst initialize = once(() => {\n  console.log('애플리케이션 초기화 중...');\n  // 비용 많은 초기화 작업\n  return '초기화 완료';\n});\n\n// 여러 번 호출해도 초기화는 한 번만 실행됨\ninitialize(); // '애플리케이션 초기화 중...' 출력\ninitialize(); // 아무것도 출력하지 않음\n```\n\n비용이 많이 드는 초기화 작업이나 설정 함수를 만들 때 유용해요. 예를 들어 데이터베이스 연결, API 토큰 초기화 등에 사용할 수 있어요.\n\n#### 파라미터\n\n- `func` (`Function`): 한 번만 호출되도록 제한할 함수예요.\n\n#### 반환 값\n\n(`Function`): 한 번만 호출되는 새로운 함수를 반환해요. 두 번째 호출부터는 첫 번째 호출의 결과를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/overArgs.md",
    "content": "# overArgs (Lodash 호환성)\n\n::: warning 화살표 함수와 직접 변환을 사용하세요\n\n이 `overArgs` 함수는 각 인자를 변환하는 복잡한 래퍼를 만들어 느리게 동작해요. 화살표 함수를 사용해서 인자를 직접 변환하면 더 명확하고 빠른 코드를 작성할 수 있어요.\n\n대신 더 빠르고 현대적인 화살표 함수와 직접 변환을 사용하세요.\n\n:::\n\n함수의 각 인자를 대응하는 변환 함수로 변환한 후 실행하는 새로운 함수를 생성해요.\n\n```typescript\nconst wrapped = overArgs(func, transforms);\n```\n\n## 사용법\n\n### `overArgs(func, ...transforms)`\n\n함수를 호출하기 전에 각 인자를 변환하고 싶을 때 `overArgs`를 사용하세요. 각 인자는 대응하는 변환 함수에 의해 처리돼요.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nfunction doubled(n) {\n  return n * 2;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\n// 첫 번째 인자는 2배, 두 번째 인자는 제곱\nconst func = overArgs((x, y) => [x, y], [doubled, square]);\nfunc(5, 3);\n// Returns: [10, 9]\n```\n\n문자열로 속성을 추출할 수도 있어요.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst user1 = { name: 'John', age: 30 };\nconst user2 = { name: 'Jane', age: 25 };\n\n// 각 객체에서 속성 추출\nconst getUserInfo = overArgs((name, age) => `${name} is ${age} years old`, ['name', 'age']);\ngetUserInfo(user1, user2);\n// Returns: \"John is 25 years old\"\n```\n\n변환 함수가 제공되지 않거나 `null`/`undefined`인 경우 인자를 그대로 전달해요.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2, null, n => n * 3]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 45]\n```\n\n변환 함수 개수보다 많은 인자는 그대로 전달돼요.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 15]\n```\n\n객체와 일치 여부를 확인할 수도 있어요.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((match1, match2) => [match1, match2], [{ age: 30 }, { active: true }]);\n\nfunc({ name: 'John', age: 30 }, { active: true, status: 'online' });\n// Returns: [true, true]\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 래핑할 함수예요.\n- `...transforms` (`Array<(...args: any[]) => any | string | object | array>`): 인자를 변환할 함수들이에요. 각 변환은 다음 중 하나일 수 있어요:\n  - 값을 받아서 반환하는 함수\n  - 속성 값을 가져올 문자열 (예: 'name'은 name 속성을 가져옴)\n  - 인자가 속성과 일치하는지 확인할 객체\n  - 속성 일치를 확인할 [property, value] 배열\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 인자를 변환한 후 원래 함수를 호출하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/partial.md",
    "content": "# partial (Lodash 호환성)\n\n::: warning `es-toolkit`의 `partial`을 사용하세요\n\n이 `partial` 함수는 많은 오버로드와 공용체 타입 처리로 인해 비효율적이에요. 또한 대부분의 경우 더 간단한 화살표 함수로 대체할 수 있어요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [partial](../../function/partial.md)을 사용하세요.\n\n:::\n\n함수의 인수를 미리 채워서 부분 적용된 함수를 만들어요.\n\n```typescript\nconst partialFunc = partial(func, ...args);\n```\n\n## 사용법\n\n### `partial(func, ...args)`\n\n함수의 인수를 미리 채워서 부분 적용된 함수를 만들고 싶을 때 `partial`을 사용하세요. 주로 인수 순서가 중요한 함수에서 첫 번째 인수들을 고정할 때 유용해요.\n\n```typescript\nimport { partial } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 첫 번째 인수를 미리 설정\nconst sayHello = partial(greet, 'Hello');\nsayHello('Alice', '!'); // 'Hello Alice!'\n\n// 여러 인수를 미리 설정\nconst greetAlice = partial(greet, 'Hello', 'Alice');\ngreetAlice('!'); // 'Hello Alice!'\n\n// placeholder를 사용하여 인수 순서 조절\nconst greetWithExclamation = partial(greet, partial.placeholder, 'Alice', '!');\ngreetWithExclamation('Hi'); // 'Hi Alice!'\n```\n\n대부분의 경우 화살표 함수로 대체할 수 있어요:\n\n```typescript\n// partial 대신 화살표 함수 사용 (권장)\nconst sayHello = (name, punctuation) => greet('Hello', name, punctuation);\nconst greetAlice = punctuation => greet('Hello', 'Alice', punctuation);\n```\n\n#### 파라미터\n\n- `func` (`Function`): 부분 적용할 함수예요.\n- `...args` (`any[]`): 미리 채울 인수들이에요. `partial.placeholder`를 사용해서 인수 순서를 조절할 수 있어요.\n\n#### 반환 값\n\n(`Function`): 인수가 미리 채워진 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/partialRight.md",
    "content": "# partialRight (Lodash 호환성)\n\n::: warning `es-toolkit`의 `partialRight`를 사용하세요\n\n이 `partialRight` 함수는 많은 오버로드와 공용체 타입 처리로 인해 비효율적이에요. 또한 대부분의 경우 더 간단한 냄자마 함수로 대체할 수 있어요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [partialRight](../../function/partialRight.md)를 사용하세요.\n\n:::\n\n함수의 오른쪽부터 인수를 미리 채워서 부분 적용된 함수를 만들어요.\n\n```typescript\nconst partialFunc = partialRight(func, ...args);\n```\n\n## 사용법\n\n### `partialRight(func, ...args)`\n\n함수의 오른쪽부터 인수를 미리 채워서 부분 적용된 함수를 만들고 싶을 때 `partialRight`를 사용하세요. 주로 인수 순서가 중요한 함수에서 마지막 인수들을 고정할 때 유용해요.\n\n```typescript\nimport { partialRight } from 'es-toolkit/compat';\n\n// 기본 사용법\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 마지막 인수를 미리 설정\nconst greetWithExclamation = partialRight(greet, '!');\ngreetWithExclamation('Hello', 'Alice'); // 'Hello Alice!'\n\n// 여러 인수를 미리 설정\nconst sayHiToAlice = partialRight(greet, 'Alice', '!');\nsayHiToAlice('Hi'); // 'Hi Alice!'\n\n// placeholder를 사용하여 인수 순서 조절\nconst greetAliceWithCustom = partialRight(greet, 'Alice', partialRight.placeholder);\ngreetAliceWithCustom('Hello', '?'); // 'Hello Alice?'\n```\n\n대부분의 경우 화살표 함수로 대체할 수 있어요:\n\n```typescript\n// partialRight 대신 화살표 함수 사용 (권장)\nconst greetWithExclamation = (greeting, name) => greet(greeting, name, '!');\nconst sayHiToAlice = greeting => greet(greeting, 'Alice', '!');\n```\n\n#### 파라미터\n\n- `func` (`Function`): 부분 적용할 함수예요.\n- `...args` (`any[]`): 미리 채울 인수들이에요. `partialRight.placeholder`를 사용해서 인수 순서를 조절할 수 있어요.\n\n#### 반환 값\n\n(`Function`): 오른쪽부터 인수가 미리 채워진 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/rearg.md",
    "content": "# rearg (Lodash 호환성)\n\n::: warning 화살표 함수를 사용하세요\n\n이 `rearg` 함수는 인자 순서를 재배열하는 복잡한 래퍼를 만들어 느리게 동작해요. 화살표 함수를 사용해서 인자 순서를 직접 재배열하면 더 명확하고 빠른 코드를 작성할 수 있어요.\n\n대신 더 빠르고 현대적인 화살표 함수를 사용하세요.\n\n:::\n\n함수의 인자 순서를 지정한 순서대로 재배열하는 새로운 함수를 생성해요.\n\n```typescript\nconst rearranged = rearg(func, ...indices);\n```\n\n## 사용법\n\n### `rearg(func, ...indices)`\n\n함수를 호출할 때 인자의 순서를 바꾸고 싶을 때 `rearg`를 사용하세요. 지정한 인덱스 순서대로 인자를 재배열해서 원래 함수를 호출해요.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst greet = (greeting, name) => `${greeting}, ${name}!`;\n\n// 인자 순서를 바꿔요 (1번째, 0번째)\nconst rearrangedGreet = rearg(greet, 1, 0);\nrearrangedGreet('World', 'Hello');\n// Returns: \"Hello, World!\"\n\n// 원래 함수는 그대로\ngreet('Hello', 'World');\n// Returns: \"Hello, World!\"\n```\n\n배열로도 인덱스를 전달할 수 있어요.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 배열로 인덱스 지정\nconst rearranged = rearg(fn, [2, 0, 1]);\nrearranged('a', 'b', 'c');\n// Returns: ['c', 'a', 'b']\n```\n\n일부 인자만 재배열하고 나머지는 그대로 둘 수 있어요.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// 처음 두 인자만 재배열\nconst rearranged = rearg(fn, 1, 0);\nrearranged('first', 'second', 'third', 'fourth');\n// Returns: ['second', 'first', 'third', 'fourth']\n```\n\n존재하지 않는 인덱스는 `undefined`로 처리돼요.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 존재하지 않는 인덱스 5를 포함\nconst rearranged = rearg(fn, 5, 1, 0);\nrearranged('a', 'b', 'c');\n// Returns: [undefined, 'b', 'a']\n```\n\n중첩된 배열도 평탄화해서 처리해요.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// 중첩된 배열 인덱스\nconst rearranged = rearg(fn, [1, [2, 0]], 3);\nrearranged('a', 'b', 'c', 'd');\n// Returns: ['b', 'c', 'a', 'd']\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 인자 순서를 재배열할 함수예요.\n- `...indices` (`Array<number | number[]>`): 재배열할 인자의 인덱스들이에요. 중첩된 배열도 지원해요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 인자 순서가 재배열된 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/rest.md",
    "content": "# rest (Lodash 호환성)\n\n::: warning `es-toolkit`의 `rest`를 사용하세요\n\n이 `rest` 함수는 기본값 처리나 인덱스 유효성 검사 등의 추가 로직으로 인해 성능이 떨어질 수 있어요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [rest](../../function/rest.md)를 사용하세요.\n\n:::\n\n지정된 인덱스부터 나머지 인수들을 배열로 그룹화하는 함수를 만들어요.\n\n```typescript\nconst restFunc = rest(func, start);\n```\n\n## 사용법\n\n### `rest(func, start)`\n\n함수의 인수들을 변환하여 지정된 인덱스부터 나머지 인수들을 배열로 그룹화하고 싶을 때 `rest`를 사용하세요. 가변 인수를 받는 함수를 만들 때 유용해요.\n\n```typescript\nimport { rest } from 'es-toolkit/compat';\n\n// 기본 사용법 - 마지막 인수들을 배열로 그룹화\nfunction logMessage(level, message, ...details) {\n  console.log(`[${level}] ${message}`, details);\n}\n\nconst restLogger = rest(logMessage, 2);\nrestLogger('ERROR', '오류 발생', '상세정보 1', '상세정보 2');\n// 내부적으로 logMessage('ERROR', '오류 발생', [['상세정보 1', '상세정보 2']])로 호출\n\n// 다른 인덱스 예시\nfunction process(action, target, ...args) {\n  return { action, target, args };\n}\n\nconst restProcess = rest(process, 1);\nrestProcess('update', 'user', 'name', 'John', 'age', 25);\n// { action: 'update', target: ['user', 'name', 'John', 'age', 25], args: [] }\n```\n\n함수의 마지막 인수들을 배열로 받고 싶을 때 사용하면 됩니다. 현대 JavaScript에서는 나머지 매개변수 문법(`...args`)을 사용하는 것이 더 일반적이에요.\n\n#### 파라미터\n\n- `func` (`Function`): 변환할 함수예요.\n- `start` (`number`, 선택): 배열로 그룹화를 시작할 인덱스예요. 기본값은 `func.length - 1`이에요.\n\n#### 반환 값\n\n(`Function`): 지정된 인덱스부터 나머지 인수들을 배열로 그룹화하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/spread.md",
    "content": "# spread (Lodash 호환성)\n\n::: warning 현대적인 전개 연산자를 사용하세요\n\n이 `spread` 함수는 특정 인덱스의 배열 인수를 개별 인수로 펼치는 복잡한 로직을 처리해서 처리 속도가 느릴 수 있어요.\n\n대신 더 빠르고 현대적인 전개 연산자(`...`)를 직접 사용하세요.\n\n:::\n\n배열 인수를 개별 인수로 펼쳐서 함수를 호출하는 새로운 함수를 만들어요.\n\n```typescript\nconst spreadFunc = spread(func, argsIndex);\n```\n\n## 사용법\n\n### `spread(func, argsIndex)`\n\n배열 인수를 개별 인수로 펼쳐서 함수를 호출하고 싶을 때 `spread`를 사용하세요. 배열의 위치를 지정할 수 있어서 다른 인수들과 함께 사용할 수 있어요.\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\n// 기본 사용법 - 첫 번째 인수가 배열\nfunction add(a, b) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nspreadAdd([1, 2]); // 3\n\n// 두 번째 인수가 배열인 경우\nfunction greet(greeting, names) {\n  return `${greeting}, ${names.join(' and ')}!`;\n}\n\nconst spreadGreet = spread(greet, 1);\nspreadGreet('Hello', ['Alice', 'Bob']); // 'Hello, Alice and Bob!'\n\n// 현대적인 전개 연산자 사용 예시 (권장)\nfunction modernAdd(a, b) {\n  return a + b;\n}\n\nconst numbers = [1, 2];\nmodernAdd(...numbers); // 3 - 더 간단하고 빠름\n```\n\n특히 배열을 함수 인수로 전달할 때 유용하지만, 현대 JavaScript에서는 전개 연산자를 사용하는 것이 더 일반적이에요.\n\n#### 파라미터\n\n- `func` (`Function`): 변환할 함수예요.\n- `argsIndex` (`number`, 선택): 배열 인수의 위치예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`Function`): 배열 인수를 펼쳐서 호출하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/throttle.md",
    "content": "# throttle (Lodash 호환성)\n\n::: warning `es-toolkit`의 `throttle`을 사용하세요\n\n이 `throttle` 함수는 Lodash 호환성을 위해 debounce 함수를 내부적으로 사용해서 방식이 조금 복잡해요. 또한 기본값 처리나 옵션 처리 등이 더 복잡해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [throttle](../../function/throttle.md)을 사용하세요.\n\n:::\n\n함수 호출을 지정된 시간 간격마다 최대 한 번만 실행되도록 제한해요.\n\n```typescript\nconst throttledFunc = throttle(func, wait, options);\n```\n\n## 사용법\n\n### `throttle(func, wait, options)`\n\n함수 호출을 지정된 시간 간격마다 최대 한 번만 실행되도록 제한하고 싶을 때 `throttle`을 사용하세요. 이벤트 핸들러나 API 호출 빈도를 제한할 때 유용해요.\n\n```typescript\nimport { throttle } from 'es-toolkit/compat';\n\n// 기본 사용법 - 1초마다 최대 한 번 실행\nconst throttledLog = throttle(() => {\n  console.log('이벤트 발생!');\n}, 1000);\n\n// 옵션을 사용한 예시\nconst throttledScroll = throttle(handleScroll, 100, {\n  leading: true, // 처음에 바로 실행\n  trailing: false, // 마지막에 실행하지 않음\n});\n\nwindow.addEventListener('scroll', throttledScroll);\n```\n\n스크롤 이벤트나 리사이즈 이벤트처럼 빠르게 발생하는 이벤트를 처리할 때 성능을 위해 필수적이에요.\n\n#### 파라미터\n\n- `func` (`Function`): 스로틀링할 함수예요.\n- `wait` (`number`, 선택): 밀리세컨드 단위의 대기 시간이에요. 기본값은 `0`이에요.\n- `options` (`ThrottleSettings`, 선택): 스로틀링 옵션이에요.\n  - `leading` (`boolean`): 첫 번째 호출에서 바로 실행할지 여부예요. 기본값은 `true`예요.\n  - `trailing` (`boolean`): 마지막 호출 후에 실행할지 여부예요. 기본값은 `true`예요.\n\n#### 반환 값\n\n(`DebouncedFunc`): 스로틀링된 함수를 반환해요. `cancel()` 메소드로 대기 중인 실행을 취소할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/function/unary.md",
    "content": "# unary (Lodash 호환성)\n\n::: warning `es-toolkit`의 `ary`를 사용하세요\n\n이 `unary` 함수는 `ary` 함수의 특수한 경우로 구현되어 있어요. 더 많은 제어가 필요하다면 `es-toolkit`의 [ary](../../function/ary.md)를 직접 사용하는 것이 더 효율적이에요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [ary](../../function/ary.md)를 사용하세요.\n\n:::\n\n함수가 최대 하나의 인수만 받도록 제한해요.\n\n```typescript\nconst limitedFunc = unary(func);\n```\n\n## 사용법\n\n### `unary(func)`\n\n함수가 최대 하나의 인수만 받도록 제한하고 싶을 때 `unary`를 사용하세요. 추가로 전달되는 인수들은 모두 무시돼요.\n\n```typescript\nimport { unary } from 'es-toolkit/compat';\n\nfunction greet(name, greeting, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 첫 번째 인수만 받는 함수로 변환\nconst greetOne = unary(greet);\ngreetOne('Alice', 'Hello', '!'); // greet('Alice')와 동일하게 동작\n\n// 배열의 map 함수와 함께 사용할 때 유용해요\nconst numbers = ['1', '2', '3'];\nnumbers.map(parseInt); // [1, NaN, NaN] - 예상치 못한 결과\nnumbers.map(unary(parseInt)); // [1, 2, 3] - 올바른 결과\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 인수를 제한할 함수예요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 최대 하나의 인수만 받는 새로운 함수를 반환해요.\nㅇ깆\n"
  },
  {
    "path": "docs/ko/reference/compat/function/wrap.md",
    "content": "# wrap (Lodash 호환성)\n\n::: warning 고차 함수를 사용하세요\n\n이 `wrap` 함수는 단순히 함수를 감싸는 기능이에요. 대부분의 경우 더 간단한 고차 함수나 클로저를 사용하는 것이 더 명확해요.\n\n대신 더 빠르고 현대적인 클로저나 직접적인 함수 정의를 사용하세요.\n\n:::\n\n주어진 값이나 함수를 감싸는 새로운 함수를 만들어요.\n\n```typescript\nconst wrappedFunc = wrap(value, wrapper);\n```\n\n## 사용법\n\n### `wrap(value, wrapper)`\n\n값이나 함수에 추가적인 로직을 적용하고 싶을 때 `wrap`을 사용하세요. 원본 값을 첫 번째 인수로 받는 래퍼 함수를 통해 새로운 동작을 정의할 수 있어요.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 함수를 감싸서 로깅 기능을 추가해요\nconst greet = (name: string) => `Hi, ${name}`;\nconst loggedGreet = wrap(greet, (originalFunc, name) => {\n  const result = originalFunc(name);\n  console.log(`[LOG] ${result}`);\n  return result;\n});\n\nloggedGreet('Alice'); // 콘솔에 \"[LOG] Hi, Alice\" 출력하고 \"Hi, Alice\" 반환\n```\n\n함수가 아닌 값도 감쌀 수 있어요. 값은 래퍼 함수의 첫 번째 인수로 전달돼요.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 문자열을 HTML 태그로 감싸는 함수를 만들어요\nconst htmlWrapper = wrap('Hello World', (text, tag) => `<${tag}>${text}</${tag}>`);\nconsole.log(htmlWrapper('h1')); // \"<h1>Hello World</h1>\"\n\n// 숫자를 계산에 사용하는 함수를 만들어요\nconst calculate = wrap(10, (baseValue, multiplier) => baseValue * multiplier);\nconsole.log(calculate(5)); // 50\n```\n\n더 복잡한 함수 래핑 예시예요.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\nconst add = (a: number, b: number) => a + b;\n\n// 성능 측정을 추가한 함수를 만들어요\nconst timedAdd = wrap(add, (originalAdd, a, b) => {\n  const start = Date.now();\n  const result = originalAdd(a, b);\n  const end = Date.now();\n  console.log(`실행 시간: ${end - start}ms`);\n  return result;\n});\n\ntimedAdd(3, 7); // 실행 시간을 콘솔에 출력하고 10 반환\n```\n\n#### 파라미터\n\n- `value` (`T`): 감쌀 값이나 함수예요.\n- `wrapper` (`(value: T, ...args: U[]) => V`): 원본 값을 첫 번째 인수로 받고 추가 로직을 적용하는 함수예요.\n\n#### 반환 값\n\n(`(...args: U[]) => V`): 래퍼 함수가 적용된 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/add.md",
    "content": "# add (Lodash 호환성)\n\n::: warning `+` 연산자를 사용하세요\n\n이 `add` 함수는 복잡한 타입 변환과 문자열 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 간단한 `+` 연산자를 사용하세요.\n\n:::\n\n두 값을 더해요.\n\n```typescript\nconst result = add(value, other);\n```\n\n## 사용법\n\n### `add(value, other)`\n\n두 값을 더하고 싶을 때 `add`를 사용하세요. 숫자뿐만 아니라 문자열도 처리할 수 있어요.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\n// 숫자 더하기\nadd(2, 3);\n// Returns: 5\n\nadd(1.5, 2.5);\n// Returns: 4\n\n// NaN 처리\nadd(NaN, 5);\n// Returns: NaN\n\nadd(10, NaN);\n// Returns: NaN\n```\n\n문자열이 포함되면 문자열 연결로 동작해요.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd('2', 3);\n// Returns: '23'\n\nadd(1, '5');\n// Returns: '15'\n\nadd('hello', 'world');\n// Returns: 'helloworld'\n```\n\n`undefined` 값은 특별하게 처리해요.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd(undefined, undefined);\n// Returns: 0\n\nadd(5, undefined);\n// Returns: 5\n\nadd(undefined, 3);\n// Returns: 3\n```\n\n#### 파라미터\n\n- `value` (`number`): 더할 첫 번째 값이에요.\n- `other` (`number`): 더할 두 번째 값이에요.\n\n#### 반환 값\n\n(`number | string`): 두 값의 합을 반환해요. 문자열이 포함되면 문자열을 반환하고, 그렇지 않으면 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/ceil.md",
    "content": "# ceil (Lodash 호환성)\n\n::: warning `Math.ceil`을 사용하세요\n\n이 `ceil` 함수는 소수점 자리 계산과 내부 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Math.ceil`을 사용하세요.\n\n:::\n\n숫자를 지정된 소수점 자리로 올림해요.\n\n```typescript\nconst result = ceil(number, precision);\n```\n\n## 사용법\n\n### `ceil(number, precision?)`\n\n숫자를 특정 소수점 자리로 올림하고 싶을 때 `ceil`을 사용하세요.\n\n```typescript\nimport { ceil } from 'es-toolkit/compat';\n\n// 기본 올림 (정수로)\nceil(4.006);\n// Returns: 5\n\nceil(4.1);\n// Returns: 5\n\n// 소수점 둘째 자리로 올림\nceil(6.004, 2);\n// Returns: 6.01\n\nceil(6.001, 2);\n// Returns: 6.01\n\n// 음수 자리로 올림 (10의 단위)\nceil(6040, -2);\n// Returns: 6100\n\nceil(1234, -2);\n// Returns: 1300\n\n// 음수도 올림\nceil(-4.1);\n// Returns: -4\n\nceil(-6.004, 2);\n// Returns: -6.00\n```\n\n#### 파라미터\n\n- `number` (`number`): 올림할 숫자예요.\n- `precision` (`number`, 선택): 올림할 소수점 자리수예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 지정된 소수점 자리로 올림된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/clamp.md",
    "content": "# clamp (Lodash 호환성)\n\n::: warning `es-toolkit`의 [clamp](../../math/clamp.md)를 사용하세요\n\n이 `clamp` 함수는 NaN 검증과 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [clamp](../../math/clamp.md)를 사용하세요.\n\n:::\n\n숫자를 지정된 범위 내로 제한해요.\n\n```typescript\nconst clamped = clamp(number, lower, upper);\n```\n\n## 사용법\n\n### `clamp(number, lower, upper)`\n\n숫자를 지정된 최솟값과 최댓값 사이로 제한하고 싶을 때 `clamp`를 사용하세요.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 기본 사용법\nclamp(3, 2, 4);\n// Returns: 3 (범위 안에 있음)\n\nclamp(0, 5, 10);\n// Returns: 5 (최솟값으로 제한)\n\nclamp(15, 5, 10);\n// Returns: 10 (최댓값으로 제한)\n\n// 음수도 처리\nclamp(-5, -10, -1);\n// Returns: -5\n\nclamp(-15, -10, -1);\n// Returns: -10 (최솟값으로 제한)\n```\n\n### `clamp(number, upper)`\n\n하나의 인수만 제공하면 그 값을 최댓값으로 사용해요.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 최댓값만 지정\nclamp(5, 3);\n// Returns: 3 (최댓값으로 제한)\n\nclamp(2, 3);\n// Returns: 2 (범위 안에 있음)\n\nclamp(1, 5);\n// Returns: 1\n```\n\nNaN 값은 0으로 처리해요.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\nclamp(5, NaN, 10);\n// Returns: 5 (NaN이 0으로 처리되어 범위는 0~10)\n\nclamp(5, 2, NaN);\n// Returns: 2 (NaN이 0으로 처리되어 범위는 0~2)\n```\n\n#### 파라미터\n\n- `number` (`number`): 제한할 숫자예요.\n- `lower` (`number`): 최솟값이에요. 두 번째 파라미터만 있으면 최댓값이 돼요.\n- `upper` (`number`, 선택): 최댓값이에요.\n\n#### 반환 값\n\n(`number`): 지정된 범위 내로 제한된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/divide.md",
    "content": "# divide (Lodash 호환성)\n\n::: warning `/` 연산자를 사용하세요\n\n이 `divide` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 간단한 `/` 연산자를 사용하세요.\n\n:::\n\n두 숫자를 나눠요.\n\n```typescript\nconst result = divide(value, other);\n```\n\n## 사용법\n\n### `divide(value, other)`\n\n두 숫자를 나누고 싶을 때 `divide`를 사용하세요.\n\n```typescript\nimport { divide } from 'es-toolkit/compat';\n\n// 기본 나눗셈\ndivide(6, 3);\n// Returns: 2\n\ndivide(10, 5);\n// Returns: 2\n\n// 소수 나눗셈\ndivide(7, 2);\n// Returns: 3.5\n\ndivide(1, 3);\n// Returns: 0.3333333333333333\n\n// 0으로 나누기\ndivide(6, 0);\n// Returns: Infinity\n\ndivide(-6, 0);\n// Returns: -Infinity\n\n// NaN 처리\ndivide(2, NaN);\n// Returns: NaN\n\ndivide(NaN, 3);\n// Returns: NaN\n\ndivide(NaN, NaN);\n// Returns: NaN\n```\n\n#### 파라미터\n\n- `value` (`number`): 나눗셈의 피제수 (나누어지는 수)예요.\n- `other` (`number`): 나눗셈의 제수 (나누는 수)예요.\n\n#### 반환 값\n\n(`number`): 첫 번째 숫자를 두 번째 숫자로 나눈 결과를 반환해요. 둘 중 하나라도 NaN이면 NaN을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/floor.md",
    "content": "# floor (Lodash 호환성)\n\n::: warning `Math.floor`을 사용하세요\n\n이 `floor` 함수는 소수점 자리 계산과 내부 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Math.floor`을 사용하세요.\n\n:::\n\n숫자를 지정된 소수점 자리로 내림해요.\n\n```typescript\nconst result = floor(number, precision);\n```\n\n## 사용법\n\n### `floor(number, precision?)`\n\n숫자를 특정 소수점 자리로 내림하고 싶을 때 `floor`를 사용하세요.\n\n```typescript\nimport { floor } from 'es-toolkit/compat';\n\n// 기본 내림 (정수로)\nfloor(4.9);\n// Returns: 4\n\nfloor(4.1);\n// Returns: 4\n\n// 소수점 둘째 자리로 내림\nfloor(6.994, 2);\n// Returns: 6.99\n\nfloor(6.999, 2);\n// Returns: 6.99\n\n// 음수 자리로 내림 (10의 단위)\nfloor(6040, -2);\n// Returns: 6000\n\nfloor(1234, -2);\n// Returns: 1200\n\n// 음수도 내림\nfloor(-4.1);\n// Returns: -5\n\nfloor(-6.994, 2);\n// Returns: -7.00\n```\n\n#### 파라미터\n\n- `number` (`number`): 내림할 숫자예요.\n- `precision` (`number`, 선택): 내림할 소수점 자리수예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 지정된 소수점 자리로 내림된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/inRange.md",
    "content": "# inRange (Lodash 호환성)\n\n::: warning `es-toolkit`의 [inRange](../../math/inRange.md)을 사용하세요\n\n이 `inRange` 함수는 복잡한 타입 변환과 null/undefined 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [inRange](../../math/inRange.md)을 사용하세요.\n\n:::\n\n숫자가 지정된 범위 내에 있는지 확인해요.\n\n```typescript\nconst result = inRange(value, minimum, maximum);\n```\n\n## 사용법\n\n### `inRange(value, minimum, maximum?)`\n\n숫자가 특정 범위 안에 있는지 확인하고 싶을 때 `inRange`을 사용하세요. 최솟값은 포함되고 최댓값은 포함되지 않아요.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 기본 사용법\ninRange(3, 2, 4);\n// Returns: true (2 ≤ 3 < 4)\n\ninRange(1, 2, 5);\n// Returns: false (1 < 2)\n\ninRange(5, 2, 5);\n// Returns: false (5는 포함되지 않음)\n\n// 범위 경계값\ninRange(2, 2, 4);\n// Returns: true (최솟값은 포함)\n\ninRange(4, 2, 4);\n// Returns: false (최댓값은 포함되지 않음)\n```\n\n### `inRange(value, maximum)`\n\n두 개의 인수만 제공하면 0부터 maximum까지의 범위로 처리해요.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5);\n// Returns: true (0 ≤ 3 < 5)\n\ninRange(-1, 5);\n// Returns: false (-1 < 0)\n\ninRange(0, 5);\n// Returns: true (0 ≤ 0 < 5)\n\ninRange(5, 5);\n// Returns: false (5는 포함되지 않음)\n```\n\n최솟값이 최댓값보다 크면 자동으로 교체해요.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5, 2);\n// Returns: true (범위가 2~5로 바뀌고, 2 ≤ 3 < 5)\n\ninRange(1, 5, 2);\n// Returns: false (1 < 2)\n```\n\n잘못된 값들은 적절히 변환해요.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 문자열 숫자 변환\ninRange(3, '2', '4');\n// Returns: true\n\n// falsy 값은 0으로 처리\ninRange(1, null, 5);\n// Returns: true (null이 0으로 처리되어 0~5 범위)\n\ninRange(3, false, 5);\n// Returns: true (false가 0으로 처리)\n```\n\n#### 파라미터\n\n- `value` (`number`): 범위 안에 있는지 확인할 숫자예요.\n- `minimum` (`number`): 범위의 최솟값이에요 (포함). `maximum`이 없으면 이 값이 최댓값이 돼요.\n- `maximum` (`number`, 선택): 범위의 최댓값이에요 (포함되지 않음).\n\n#### 반환 값\n\n(`boolean`): 값이 지정된 범위 안에 있으면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/max.md",
    "content": "# max (Lodash 호환성)\n\n::: warning `Math.max`를 사용하세요\n\n이 `max` 함수는 추가적인 함수 호출과 `null`/`undefined` 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Math.max(...array)`를 사용하세요.\n\n:::\n\n배열에서 최댓값을 찾아요.\n\n```typescript\nconst result = max(items);\n```\n\n## 사용법\n\n### `max(items?)`\n\n배열에서 가장 큰 값을 찾고 싶을 때 `max`를 사용하세요.\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\n// 숫자 배열에서 최댓값\nmax([1, 2, 3]);\n// Returns: 3\n\nmax([10, 5, 8, 20]);\n// Returns: 20\n\n// 문자열 배열에서 최댓값 (사전순)\nmax(['a', 'b', 'c']);\n// Returns: 'c'\n\nmax(['apple', 'banana', 'cherry']);\n// Returns: 'cherry'\n\n// 빈 배열이나 null/undefined\nmax([]);\n// Returns: undefined\n\nmax(null);\n// Returns: undefined\n\nmax(undefined);\n// Returns: undefined\n```\n\n음수도 올바르게 처리해요.\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\nmax([-1, -5, -3]);\n// Returns: -1\n\nmax([0, -2, 5, -10]);\n// Returns: 5\n```\n\n#### 파라미터\n\n- `items` (`ArrayLike<T> | null | undefined`, 선택): 최댓값을 찾을 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열에서 가장 큰 값을 반환해요. 배열이 비어있거나 null/undefined면 undefined를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/maxBy.md",
    "content": "# maxBy (Lodash 호환성)\n\n::: warning es-toolkit의 [maxBy](../../array/maxBy.md)를 사용하세요\n\n이 `maxBy` 함수는 iteratee 함수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [maxBy](../../array/maxBy.md)를 사용하세요.\n\n:::\n\n조건에 맞는 값 중에서 최댓값 요소를 찾아요.\n\n```typescript\nconst maxItem = maxBy(array, iteratee);\n```\n\n## 사용법\n\n### `maxBy(array, iteratee)`\n\n배열에서 함수로 계산한 값이 가장 큰 요소를 찾아요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\n// 객체 배열에서 특정 속성이 최대인 요소\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nmaxBy(people, person => person.age);\n// Returns: { name: '이영희', age: 35 }\n\n// 속성명으로도 가능\nmaxBy(people, 'age');\n// Returns: { name: '이영희', age: 35 }\n```\n\n함수로 값을 변환해서 최댓값을 찾아요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmaxBy(items, x => x.a);\n// Returns: { a: 3 }\n\nconst numbers = [-1, -2, -3];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: -3 (절댓값이 가장 큰 요소)\n```\n\n배열 요소로 접근해요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nmaxBy(arrays, 0); // 첫 번째 요소가 최대인 배열\n// Returns: [3, 4]\n\nmaxBy(arrays, 1); // 두 번째 요소가 최대인 배열\n// Returns: [0, 5]\n```\n\n객체의 특정 속성과 값이 일치하는 경우를 찾아요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '홍길동', age: 25, active: true },\n  { name: '김철수', age: 30, active: false },\n  { name: '이영희', age: 35, active: true },\n];\n\n// active가 true인 요소들 중에서 첫 번째\nmaxBy(users, ['active', true]);\n// Returns: { name: '홍길동', age: 25, active: true }\n\n// 객체로 조건 지정\nmaxBy(users, { active: true });\n// Returns: { name: '홍길동', age: 25, active: true }\n```\n\n빈 배열은 undefined를 반환해요.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nmaxBy([], x => x.a);\n// Returns: undefined\n\nmaxBy(null);\n// Returns: undefined\n\nmaxBy(undefined);\n// Returns: undefined\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 검색할 배열이에요.\n- `iteratee` (`ValueIteratee<T>`, 선택): 각 요소에 적용할 함수, 속성명, 또는 조건이에요.\n\n#### 반환 값\n\n(`T | undefined`): 조건에 맞는 값이 가장 큰 요소를 반환해요. 빈 배열이면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/mean.md",
    "content": "# mean (Lodash 호환성)\n\n::: warning es-toolkit의 [mean](../../math/mean.md)를 사용하세요\n\n이 `mean` 함수는 타입 변환과 null/undefined 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [mean](../../math/mean.md)를 사용하세요.\n\n:::\n\n배열의 평균값을 구해요.\n\n```typescript\nconst average = mean(array);\n```\n\n## 사용법\n\n### `mean(array)`\n\n숫자 배열의 평균값을 계산해요.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\n// 숫자 배열\nmean([1, 2, 3, 4, 5]);\n// Returns: 3\n\nmean([10, 20, 30]);\n// Returns: 20\n\nmean([1.5, 2.5, 3.5]);\n// Returns: 2.5\n```\n\n빈 배열은 NaN을 반환해요.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([]);\n// Returns: NaN\n\nmean(null);\n// Returns: NaN\n\nmean(undefined);\n// Returns: NaN\n```\n\n유효하지 않은 값은 0으로 간주되어 계산에 포함돼요.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([1, undefined, 2, null, 3]);\n// Returns: 1.2 (1 + 2 + 3) / 5 = 1.2\n```\n\n문자열 숫자도 처리돼요.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean(['1', '2', '3']);\n// Returns: 41 (123 / 3 = 41)\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<any> | null | undefined`): 평균을 구할 숫자들이 있는 배열이에요.\n\n#### 반환 값\n\n(`number`): 배열의 평균값을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/meanBy.md",
    "content": "# meanBy (Lodash 호환성)\n\n::: warning es-toolkit의 [meanBy](../../math/meanBy.md)를 사용하세요\n\n이 `meanBy` 함수는 iteratee 함수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [meanBy](../../math/meanBy.md)를 사용하세요.\n\n:::\n\n조건에 맞는 값들의 평균을 구해요.\n\n```typescript\nconst average = meanBy(array, iteratee);\n```\n\n## 사용법\n\n### `meanBy(array, iteratee)`\n\n배열의 각 요소에 함수를 적용한 결과의 평균을 계산해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\n// 객체 배열에서 특정 속성의 평균\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nmeanBy(people, person => person.age);\n// Returns: 30\n\n// 속성명으로도 가능\nmeanBy(people, 'age');\n// Returns: 30\n```\n\n함수로 값을 변환해서 평균을 구해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst numbers = [1.5, 2.7, 3.2, 4.8];\nmeanBy(numbers, x => Math.floor(x));\n// Returns: 2.5 (1 + 2 + 3 + 4) / 4\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmeanBy(items, x => x.a);\n// Returns: 2\n```\n\n배열 요소로 접근해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst arrays = [[2], [3], [1]];\nmeanBy(arrays, 0); // 첫 번째 요소들의 평균\n// Returns: 2\n```\n\n객체의 특정 속성과 값이 일치하는 경우만 계산해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '홍길동', age: 25, active: true },\n  { name: '김철수', age: 30, active: false },\n  { name: '이영희', age: 35, active: true },\n];\n\n// active가 true인 사람들만\nmeanBy(users, { active: true });\n// Returns: 0.6666666 (active 가 true 인 사람의 비율)\n```\n\n빈 배열은 NaN을 반환해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nmeanBy([], x => x.a);\n// Returns: NaN\n\nmeanBy(null);\n// Returns: NaN\n\nmeanBy(undefined);\n// Returns: NaN\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 처리할 배열이에요.\n- `iteratee` (`ValueIteratee<T>`, 선택): 각 요소에 적용할 함수, 속성명, 또는 조건이에요.\n\n#### 반환 값\n\n(`number`): 조건에 맞는 값들의 평균을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/min.md",
    "content": "# min (Lodash 호환성)\n\n::: warning `Math.min`을 사용하세요\n\n이 `min` 함수는 추가적인 함수 호출과 null/undefined 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Math.min(...array)`를 사용하세요.\n\n:::\n\n배열에서 최솟값을 찾아요.\n\n```typescript\nconst result = min(items);\n```\n\n## 사용법\n\n### `min(items?)`\n\n배열에서 가장 작은 값을 찾고 싶을 때 `min`을 사용하세요.\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\n// 숫자 배열에서 최솟값\nmin([3, 1, 4, 1, 5, 9]);\n// Returns: 1\n\nmin([10, 5, 8, 20]);\n// Returns: 5\n\n// 문자열 배열에서 최솟값 (사전순)\nmin(['c', 'a', 'b']);\n// Returns: 'a'\n\nmin(['cherry', 'apple', 'banana']);\n// Returns: 'apple'\n\n// 빈 배열이나 null/undefined\nmin([]);\n// Returns: undefined\n\nmin(null);\n// Returns: undefined\n\nmin(undefined);\n// Returns: undefined\n```\n\n음수도 올바르게 처리해요.\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\nmin([0, -3, 2, 8, 7]);\n// Returns: -3\n\nmin([-1, -5, -3]);\n// Returns: -5\n```\n\n#### 파라미터\n\n- `items` (`ArrayLike<T> | null | undefined`, 선택): 최솟값을 찾을 배열이에요.\n\n#### 반환 값\n\n(`T | undefined`): 배열에서 가장 작은 값을 반환해요. 배열이 비어있거나 null/undefined면 undefined를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/minBy.md",
    "content": "# minBy (Lodash 호환성)\n\n::: warning es-toolkit의 [minBy](../../array/minBy.md)를 사용하세요\n\n이 `minBy` 함수는 iteratee 함수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [minBy](../../array/minBy.md)를 사용하세요.\n\n:::\n\n조건에 맞는 값 중에서 최솟값 요소를 찾아요.\n\n```typescript\nconst minItem = minBy(array, iteratee);\n```\n\n## 사용법\n\n### `minBy(array, iteratee)`\n\n배열에서 함수로 계산한 값이 가장 작은 요소를 찾아요.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\n// 객체 배열에서 특정 속성이 최소인 요소\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nminBy(people, person => person.age);\n// Returns: { name: '홍길동', age: 25 }\n\n// 속성명으로도 가능\nminBy(people, 'age');\n// Returns: { name: '홍길동', age: 25 }\n```\n\n함수로 값을 변환해서 최솟값을 찾아요.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nminBy(items, x => x.a);\n// Returns: { a: 1 }\n\nconst numbers = [-1, -2, -3];\nminBy(numbers, x => Math.abs(x));\n// Returns: -1 (절댓값이 가장 작은 요소)\n```\n\n배열 요소로 접근해요.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nminBy(arrays, 0); // 첫 번째 요소가 최소인 배열\n// Returns: [0, 5]\n\nminBy(arrays, 1); // 두 번째 요소가 최소인 배열\n// Returns: [1, 2]\n```\n\n객체의 특정 속성과 값이 일치하는 경우를 찾아요.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '홍길동', age: 25, active: true },\n  { name: '김철수', age: 30, active: false },\n  { name: '이영희', age: 35, active: true },\n];\n\n// active가 true인 요소들 중에서 첫 번째가 아닌 것을 찾음\nminBy(users, ['active', true]);\n// Returns: { name: '김철수', age: 30, active: false }\n\n// 객체로 조건 지정\nminBy(users, { active: true });\n// Returns: { name: '김철수', age: 30, active: false }\n```\n\n빈 배열은 undefined를 반환해요.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nminBy([], x => x.a);\n// Returns: undefined\n\nminBy(null);\n// Returns: undefined\n\nminBy(undefined);\n// Returns: undefined\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 검색할 배열이에요.\n- `iteratee` (`ValueIteratee<T>`, 선택): 각 요소에 적용할 함수, 속성명, 또는 조건이에요.\n\n#### 반환 값\n\n(`T | undefined`): 조건에 맞는 값이 가장 작은 요소를 반환해요. 빈 배열이면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/multiply.md",
    "content": "# multiply (Lodash 호환성)\n\n::: warning `*` 연산자를 사용하세요\n\n이 `multiply` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 간단한 `*` 연산자를 사용하세요.\n\n:::\n\n두 숫자를 곱해요.\n\n```typescript\nconst result = multiply(value, other);\n```\n\n## 사용법\n\n### `multiply(value, other)`\n\n두 숫자를 곱하고 싶을 때 `multiply`를 사용하세요.\n\n```typescript\nimport { multiply } from 'es-toolkit/compat';\n\n// 기본 곱셈\nmultiply(2, 3);\n// Returns: 6\n\nmultiply(4, 5);\n// Returns: 20\n\n// 음수 처리\nmultiply(2, -3);\n// Returns: -6\n\nmultiply(-4, -5);\n// Returns: 20\n\n// 소수 처리\nmultiply(2.5, 4);\n// Returns: 10\n\n// NaN 처리\nmultiply(NaN, 3);\n// Returns: NaN\n\nmultiply(2, NaN);\n// Returns: NaN\n\nmultiply(NaN, NaN);\n// Returns: NaN\n```\n\n#### 파라미터\n\n- `value` (`number`): 곱셈의 첫 번째 숫자예요.\n- `other` (`number`): 곱셈의 두 번째 숫자예요.\n\n#### 반환 값\n\n(`number`): 두 숫자를 곱한 결과를 반환해요. 둘 중 하나라도 NaN이면 NaN을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/parseInt.md",
    "content": "# parseInt (Lodash 호환성)\n\n::: warning `parseInt`를 사용하세요\n\n이 `parseInt` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 네이티브 `parseInt`를 사용하세요.\n\n:::\n\n문자열을 정수로 변환해요.\n\n```typescript\nconst result = parseInt(string, radix);\n```\n\n## 사용법\n\n### `parseInt(string, radix?)`\n\n문자열을 정수로 변환하고 싶을 때 `parseInt`를 사용하세요. 기수를 지정해서 다른 진법으로 해석할 수 있어요.\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\n// 기본 10진수 파싱\nparseInt('123');\n// Returns: 123\n\nparseInt('08');\n// Returns: 8\n\n// 16진수 자동 인식\nparseInt('0x20');\n// Returns: 32\n\n// 명시적 기수 지정\nparseInt('08', 10);\n// Returns: 8\n\nparseInt('0x20', 16);\n// Returns: 32\n\nparseInt('1010', 2);\n// Returns: 10\n\n// 배열에서 사용\n['6', '08', '10'].map(parseInt);\n// Returns: [6, 8, 10]\n```\n\n잘못된 형식의 문자열은 NaN을 반환해요.\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\nparseInt('abc');\n// Returns: NaN\n\nparseInt('');\n// Returns: NaN\n\nparseInt('123abc');\n// Returns: 123 (앞부분만 파싱)\n```\n\n#### 파라미터\n\n- `string` (`string`): 정수로 변환할 문자열이에요.\n- `radix` (`number`, 선택): 변환할 때 사용할 기수예요. 기본값은 `0`이고, 이 경우 문자열 형식에 따라 자동으로 결정돼요.\n\n#### 반환 값\n\n(`number`): 변환된 정수를 반환해요. 변환할 수 없으면 NaN을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/random.md",
    "content": "# random (Lodash 호환성)\n\n::: warning `Math.random()`을 사용하세요\n\n이 `random` 함수는 복잡한 인수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠른 `Math.random()`을 사용하세요.\n\n:::\n\n범위 내에서 랜덤한 숫자를 만들어요.\n\n```typescript\nconst result = random(min, max, floating);\n```\n\n## 사용법\n\n### `random(floating?)`\n\n0과 1 사이의 랜덤한 숫자를 만들어요.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom();\n// Returns: 0.123456789 (0~1 사이 소수)\n\nrandom(true);\n// Returns: 0.987654321 (소수로 반환)\n\nrandom(false);\n// Returns: 0 또는 1 (정수로 반환)\n```\n\n### `random(max, floating?)`\n\n0부터 max까지의 랜덤한 숫자를 만들어요.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5);\n// Returns: 3.456789 (0~5 사이 소수)\n\nrandom(10, true);\n// Returns: 7.123456 (0~10 사이 소수)\n\nrandom(3, false);\n// Returns: 2 (0~3 사이 정수)\n```\n\n### `random(min, max, floating?)`\n\nmin부터 max까지의 랜덤한 숫자를 만들어요.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(1, 5);\n// Returns: 3.456789 (1~5 사이 소수)\n\nrandom(0, 10, true);\n// Returns: 6.789012 (0~10 사이 소수)\n\nrandom(1, 6, false);\n// Returns: 4 (1~6 사이 정수)\n```\n\n범위가 바뀌면 자동으로 교체해요.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5, 1);\n// Returns: 3.456789 (범위가 1~5로 바뀜)\n```\n\nguard 객체로 특별한 경우를 처리해요.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nconst guard = { 5: 5 };\nrandom(5, 5, guard);\n// Returns: 2.345678 (0~5 사이 소수)\n```\n\n#### 파라미터\n\n- `floating` (`boolean`, 선택): 소수를 반환할지 정해요. 기본값은 `true`예요.\n- `max` (`number`): 범위의 최댓값이에요 (포함되지 않음).\n- `min` (`number`): 범위의 최솟값이에요 (포함).\n- `index` (`string | number`): guard 객체에서 확인할 키예요.\n- `guard` (`object`): 파라미터를 검증하는 guard 객체예요.\n\n#### 반환 값\n\n(`number`): 지정된 범위 내의 랜덤한 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/range.md",
    "content": "# range (Lodash 호환성)\n\n::: warning es-toolkit의 [range](../../math/range.md)를 사용하세요\n\n이 `range` 함수는 복잡한 인수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [range](../../math/range.md)를 사용하세요.\n\n:::\n\n숫자 범위 배열을 만들어요.\n\n```typescript\nconst numbers = range(start, end, step);\n```\n\n## 사용법\n\n### `range(end)`\n\n0부터 end까지 1씩 증가하는 배열을 만들어요.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(4);\n// Returns: [0, 1, 2, 3]\n\nrange(0);\n// Returns: []\n\nrange(-4);\n// Returns: [0, -1, -2, -3]\n```\n\n### `range(start, end)`\n\nstart부터 end까지 1씩 증가하는 배열을 만들어요.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(1, 5);\n// Returns: [1, 2, 3, 4]\n\nrange(5, 1);\n// Returns: [5, 4, 3, 2] (자동으로 -1씩 감소)\n\nrange(-2, 3);\n// Returns: [-2, -1, 0, 1, 2]\n```\n\n### `range(start, end, step)`\n\nstart부터 end까지 step만큼 증가하는 배열을 만들어요.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 20, 5);\n// Returns: [0, 5, 10, 15]\n\nrange(0, -4, -1);\n// Returns: [0, -1, -2, -3]\n\nrange(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n소수 step도 가능해요.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 1, 0.2);\n// Returns: [0, 0.2, 0.4, 0.6, 0.8]\n\nrange(1, 0, -0.25);\n// Returns: [1, 0.75, 0.5, 0.25]\n```\n\niteratee로 사용할 때는 guard 객체로 처리해요.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\n[1, 2, 3].map(range);\n// Returns: [[0], [0, 1], [0, 1, 2]]\n```\n\n#### 파라미터\n\n- `start` (`number`): 범위의 시작값이에요 (포함). `end`가 없으면 이 값이 end가 돼요.\n- `end` (`number`, 선택): 범위의 끝값이에요 (포함되지 않음).\n- `step` (`number`, 선택): 증가폭이에요. 기본값은 1 또는 -1이에요.\n\n#### 반환 값\n\n(`number[]`): 지정된 범위의 숫자 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/rangeRight.md",
    "content": "# rangeRight (Lodash 호환성)\n\n::: warning es-toolkit의 [rangeRight](../../math/rangeRight.md)를 사용하세요\n\n이 `rangeRight` 함수는 복잡한 인수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [rangeRight](../../math/rangeRight.md)를 사용하세요.\n\n:::\n\n숫자 범위 배열을 역순으로 만들어요.\n\n```typescript\nconst numbers = rangeRight(start, end, step);\n```\n\n## 사용법\n\n### `rangeRight(end)`\n\n0부터 end까지 1씩 증가한 뒤 역순으로 배열을 만들어요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(4);\n// Returns: [3, 2, 1, 0]\n\nrangeRight(0);\n// Returns: []\n\nrangeRight(-4);\n// Returns: [-3, -2, -1, 0]\n```\n\n### `rangeRight(start, end)`\n\nstart부터 end까지 1씩 증가한 뒤 역순으로 배열을 만들어요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(1, 5);\n// Returns: [4, 3, 2, 1]\n\nrangeRight(5, 1);\n// Returns: [2, 3, 4, 5] (자동으로 -1씩 감소했다가 역순)\n\nrangeRight(-2, 3);\n// Returns: [2, 1, 0, -1, -2]\n```\n\n### `rangeRight(start, end, step)`\n\nstart부터 end까지 step만큼 증가한 뒤 역순으로 배열을 만들어요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 8, 2);\n// Returns: [6, 4, 2, 0]\n\nrangeRight(0, -4, -1);\n// Returns: [-3, -2, -1, 0]\n\nrangeRight(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n소수 step도 가능해요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 1, 0.2);\n// Returns: [0.8, 0.6, 0.4, 0.2, 0]\n\nrangeRight(1, 0, -0.25);\n// Returns: [0.25, 0.5, 0.75, 1]\n```\n\niteratee로 사용할 때는 guard 객체로 처리해요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\n[1, 2, 3].map(rangeRight);\n// Returns: [[0], [1, 0], [2, 1, 0]]\n```\n\n#### 파라미터\n\n- `start` (`number`): 범위의 시작값이에요 (포함). `end`가 없으면 이 값이 end가 돼요.\n- `end` (`number`, 선택): 범위의 끝값이에요 (포함되지 않음).\n- `step` (`number`, 선택): 증가폭이에요. 기본값은 1 또는 -1이에요.\n\n#### 반환 값\n\n(`number[]`): 지정된 범위의 숫자 배열을 역순으로 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/round.md",
    "content": "# round (Lodash 호환성)\n\n::: warning `Math.round()`를 사용하세요\n\n이 `round` 함수는 정밀도 처리로 인해 느리게 동작해요.\n\n대신 `Math.round()`를 사용하거나 원하는 소수점으로 계산하세요.\n\n:::\n\n숫자를 반올림해요.\n\n```typescript\nconst rounded = round(number, precision);\n```\n\n## 사용법\n\n### `round(number, precision?)`\n\n숫자를 지정한 소수점 자리까지 반올림해요.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 기본 반올림 (소수점 0자리)\nround(4.006);\n// Returns: 4\n\nround(4.6);\n// Returns: 5\n\n// 소수점 지정\nround(4.006, 2);\n// Returns: 4.01\n\nround(4.123456, 3);\n// Returns: 4.123\n```\n\n음수 정밀도도 가능해요.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 십의 자리 반올림\nround(4060, -2);\n// Returns: 4100\n\nround(1234, -1);\n// Returns: 1230\n\nround(1234, -3);\n// Returns: 1000\n```\n\n음수도 처리해요.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\nround(-4.006);\n// Returns: -4\n\nround(-4.006, 2);\n// Returns: -4.01\n\nround(-1234, -2);\n// Returns: -1200\n```\n\n#### 파라미터\n\n- `number` (`number`): 반올림할 숫자예요.\n- `precision` (`number`, 선택): 반올림할 소수점 자릿수예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 반올림된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/subtract.md",
    "content": "# subtract (Lodash 호환성)\n\n::: warning `-` 연산자를 사용하세요\n\n이 `subtract` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 간단한 `-` 연산자를 사용하세요.\n\n:::\n\n두 숫자를 빼요.\n\n```typescript\nconst result = subtract(value, other);\n```\n\n## 사용법\n\n### `subtract(value, other)`\n\n두 숫자를 빼고 싶을 때 `subtract`를 사용하세요.\n\n```typescript\nimport { subtract } from 'es-toolkit/compat';\n\n// 기본 빼기\nsubtract(6, 4);\n// Returns: 2\n\nsubtract(10, 3);\n// Returns: 7\n\n// 음수 처리\nsubtract(-6, 4);\n// Returns: -10\n\nsubtract(6, -4);\n// Returns: 10\n\n// NaN 처리\nsubtract(NaN, 4);\n// Returns: NaN\n\nsubtract(6, NaN);\n// Returns: NaN\n\nsubtract(NaN, NaN);\n// Returns: NaN\n```\n\n#### 파라미터\n\n- `value` (`number`): 빼기의 기준이 되는 첫 번째 숫자예요.\n- `other` (`number`): 빼는 두 번째 숫자예요.\n\n#### 반환 값\n\n(`number`): 첫 번째 숫자에서 두 번째 숫자를 뺀 결과를 반환해요. 둘 중 하나라도 NaN이면 NaN을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/sum.md",
    "content": "# sum (Lodash 호환성)\n\n::: warning es-toolkit의 [sum](../../math/sum.md)를 사용하세요\n\n이 `sum` 함수는 타입 변환과 null/undefined 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [sum](../../math/sum.md)를 사용하세요.\n\n:::\n\n배열의 모든 값을 더해요.\n\n```typescript\nconst total = sum(array);\n```\n\n## 사용법\n\n### `sum(array)`\n\n배열 안의 모든 숫자를 더해서 총합을 구해요.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// 숫자 배열\nsum([1, 2, 3]);\n// Returns: 6\n\nsum([1.5, 2.5, 3]);\n// Returns: 7\n\n// 빈 배열\nsum([]);\n// Returns: 0\n```\n\nBigInt와 문자열도 처리해요.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// BigInt 배열\nsum([1n, 2n, 3n]);\n// Returns: 6n\n\n// 문자열 배열 (연결됨)\nsum(['1', '2']);\n// Returns: '12'\n```\n\n잘못된 값들은 무시해요.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\nsum([1, undefined, 2]);\n// Returns: 3 (undefined 무시)\n\nsum(null);\n// Returns: 0\n\nsum(undefined);\n// Returns: 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<any> | null | undefined`): 더할 값들이 있는 배열이에요.\n\n#### 반환 값\n\n(`number`): 모든 값을 더한 총합을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/math/sumBy.md",
    "content": "# sumBy (Lodash 호환성)\n\n::: warning es-toolkit의 [sumBy](../../math/sumBy.md)를 사용하세요\n\n이 `sumBy` 함수는 iteratee 함수 처리와 타입 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [sumBy](../../math/sumBy.md)를 사용하세요.\n\n:::\n\n조건에 맞는 값들을 더해요.\n\n```typescript\nconst total = sumBy(array, iteratee);\n```\n\n## 사용법\n\n### `sumBy(array, iteratee)`\n\n배열의 각 요소에 함수를 적용한 결과를 더해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\n// 숫자 배열\nsumBy([1, 2, 3], value => value);\n// Returns: 6\n\nsumBy([1.5, 2.5, 3.5], value => Math.floor(value));\n// Returns: 6 (1 + 2 + 3)\n\n// 빈 배열\nsumBy([], value => value);\n// Returns: 0\n```\n\n### `sumBy(array)`\n\n함수를 주지 않으면 배열 값을 그대로 더해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, 2, 3]);\n// Returns: 6\n\nsumBy([1n, 2n, 3n]);\n// Returns: 6n\n```\n\n객체 배열에서 특정 속성을 더해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst people = [\n  { name: '홍길동', age: 25 },\n  { name: '김철수', age: 30 },\n  { name: '이영희', age: 35 },\n];\n\nsumBy(people, person => person.age);\n// Returns: 90\n\n// 속성명으로도 가능\nsumBy(people, 'age');\n// Returns: 90\n```\n\n문자열도 연결해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst items = [{ a: '1' }, { a: '2' }];\nsumBy(items, obj => obj.a);\n// Returns: '12'\n```\n\n잘못된 값들은 무시해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, undefined, 2], value => value);\n// Returns: 3 (undefined 무시)\n\nsumBy(null);\n// Returns: 0\n\nsumBy(undefined);\n// Returns: 0\n```\n\n#### 파라미터\n\n- `array` (`ArrayLike<T> | null | undefined`): 처리할 배열이에요.\n- `iteratee` (`((value: T) => number) | string`, 선택): 각 요소에 적용할 함수나 속성명이에요.\n\n#### 반환 값\n\n(`number`): 조건에 맞는 값들을 더한 총합을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/assign.md",
    "content": "# assign (Lodash 호환성)\n\n::: warning `Object.assign`을 사용하세요\n\n이 `assign` 함수는 값이 같은지 비교하는 추가 검사 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.assign`을 사용하세요.\n\n:::\n\n소스 객체들의 속성을 대상 객체에 할당해요.\n\n```typescript\nconst result = assign(target, ...sources);\n```\n\n## 사용법\n\n### `assign(target, ...sources)`\n\n하나 이상의 소스 객체의 속성을 대상 객체에 복사하고 싶을 때 `assign`을 사용하세요. 동일한 키가 있으면 나중에 오는 소스의 값이 이전 값을 덮어써요.\n\n```typescript\nimport { assign } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assign(target, source);\n// 결과: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (대상 객체가 변경됨)\n\n// 여러 소스 객체 병합\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nconst source3 = { d: 4 };\nassign(target2, source1, source2, source3);\n// 결과: { a: 1, b: 2, c: 3, d: 4 }\n\n// 속성 덮어쓰기\nconst target3 = { x: 1, y: 2 };\nconst source4 = { y: 3, z: 4 };\nconst source5 = { y: 5 };\nassign(target3, source4, source5);\n// 결과: { x: 1, y: 5, z: 4 } (y는 가장 마지막 값으로 덮어써짐)\n```\n\n이 함수는 객체의 고유 속성만 복사하고, 상속된 속성은 복사하지 않아요. 또한 값이 같으면 덮어쓰지 않는 최적화가 있어요.\n\n#### 파라미터\n\n- `target` (`any`): 속성을 복사받을 대상 객체예요.\n- `...sources` (`any[]`): 속성을 복사할 소스 객체들이에요.\n\n#### 반환 값\n\n(`any`): 수정된 대상 객체를 반환해요. 대상 객체 자체가 변경되어 반환돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/assignIn.md",
    "content": "# assignIn (Lodash 호환성)\n\n::: warning `Object.assign`을 사용하세요\n\n이 `assignIn` 함수는 상속된 속성까지 복사하는 추가 처리와 값 비교 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.assign`을 사용하세요.\n\n:::\n\n소스 객체들의 모든 속성(상속된 속성 포함)을 대상 객체에 할당해요.\n\n```typescript\nconst result = assignIn(target, ...sources);\n```\n\n## 사용법\n\n### `assignIn(target, ...sources)`\n\n소스 객체의 고유 속성과 상속된 속성을 모두 대상 객체에 복사하고 싶을 때 `assignIn`을 사용하세요. `assign`과 달리 프로토타입 체인의 속성도 포함해요.\n\n```typescript\nimport { assignIn } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assignIn(target, source);\n// 결과: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (대상 객체가 변경됨)\n\n// 여러 소스 객체 병합\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nassignIn(target2, source1, source2);\n// 결과: { a: 1, b: 2, c: 3 }\n\n// 상속된 속성도 복사\nfunction Parent() {}\nParent.prototype.inherited = 'inheritedValue';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = {};\nassignIn(target3, child);\n// 결과: { own: 'ownValue', inherited: 'inheritedValue' }\n\n// 배열의 인덱스 속성과 length 등도 복사\nconst arr = [1, 2, 3];\narr.customProp = 'custom';\nconst target4 = {};\nassignIn(target4, arr);\n// 결과: { '0': 1, '1': 2, '2': 3, customProp: 'custom' }\n```\n\n이 함수는 `assign`과 달리 상속된 속성도 포함하여 복사해요. 값이 같으면 덮어쓰지 않는 최적화도 있어요.\n\n#### 파라미터\n\n- `target` (`any`): 속성을 복사받을 대상 객체예요.\n- `...sources` (`any[]`): 속성을 복사할 소스 객체들이에요. 고유 속성과 상속된 속성 모두 복사돼요.\n\n#### 반환 값\n\n(`any`): 수정된 대상 객체를 반환해요. 대상 객체 자체가 변경되어 반환돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/assignInWith.md",
    "content": "# assignInWith (Lodash 호환성)\n\n::: warning 커스텀 로직 구현을 권장해요\n\n이 `assignInWith` 함수는 상속 속성 처리와 커스터마이저 함수 호출로 인해 복잡하고 느리게 동작해요.\n\n대신 `Object.assign`과 커스텀 로직을 직접 구현하는 방식을 사용하세요.\n\n:::\n\n커스터마이저 함수를 사용해서 소스 객체들의 모든 속성(상속 속성 포함)을 대상 객체에 할당해요.\n\n```typescript\nconst result = assignInWith(target, ...sources, customizer);\n```\n\n## 사용법\n\n### `assignInWith(target, ...sources, customizer)`\n\n속성 할당 방식을 커스터마이징하면서 상속된 속성까지 포함하고 싶을 때 `assignInWith`를 사용하세요. 커스터마이저 함수로 각 속성의 최종 값을 결정할 수 있어요.\n\n```typescript\nimport { assignInWith } from 'es-toolkit/compat';\n\n// 기본 사용법 - undefined일 때만 할당\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignInWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 결과: { a: 1, b: 2, c: 3 }\n\n// 배열 값을 합치는 커스터마이저\nconst target2 = { numbers: [1, 2] };\nconst source2 = { numbers: [3, 4], name: 'test' };\nassignInWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue) && Array.isArray(srcValue)) {\n    return objValue.concat(srcValue);\n  }\n  return srcValue;\n});\n// 결과: { numbers: [1, 2, 3, 4], name: 'test' }\n\n// 상속된 속성도 포함해서 처리\nfunction Parent() {}\nParent.prototype.inherited = 'value';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = { existing: 'data' };\nassignInWith(target3, child, (objValue, srcValue, key) => {\n  if (objValue === undefined) {\n    return `processed_${srcValue}`;\n  }\n  return objValue;\n});\n// 결과: { existing: 'data', own: 'processed_ownValue', inherited: 'processed_value' }\n```\n\n커스터마이저 함수가 `undefined`를 반환하면 기본 할당 동작이 사용돼요. 이 함수는 `assignIn`과 달리 각 속성에 대해 커스텀 로직을 적용할 수 있어요.\n\n#### 파라미터\n\n- `target` (`any`): 속성을 복사받을 대상 객체예요.\n- `...sources` (`any[]`): 속성을 복사할 소스 객체들이에요. 고유 속성과 상속된 속성 모두 복사돼요.\n- `customizer` (`function`): 할당할 값을 결정하는 함수예요. `(objValue, srcValue, key, object, source) => any` 형태로, `undefined`를 반환하면 기본 할당 동작을 사용해요.\n\n#### 반환 값\n\n(`any`): 수정된 대상 객체를 반환해요. 대상 객체 자체가 변경되어 반환돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/assignWith.md",
    "content": "# assignWith (Lodash 호환성)\n\n::: warning 커스텀 로직 구현을 권장해요\n\n이 `assignWith` 함수는 복잡한 커스터마이저 함수 처리로 인해 상대적으로 느려요.\n\n대신 `Object.assign`과 커스텀 로직을 직접 구현하는 방식을 사용하세요.\n\n:::\n\n커스터마이저 함수를 사용해서 소스 객체들의 속성을 대상 객체에 할당해요.\n\n```typescript\nconst result = assignWith(target, source1, source2, customizer);\n```\n\n## 사용법\n\n### `assignWith(object, ...sources, customizer)`\n\n속성 할당 방식을 커스터마이징할 때 `assignWith`를 사용하세요. 커스터마이저 함수로 각 속성의 최종 값을 결정할 수 있어요.\n\n```typescript\nimport { assignWith } from 'es-toolkit/compat';\n\n// 기본 사용법 - undefined일 때만 할당\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 배열 병합\nconst target2 = { users: ['alice'] };\nconst source2 = { users: ['bob', 'charlie'] };\nconst result2 = assignWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Returns: { users: ['alice', 'bob', 'charlie'] }\n\n// 여러 소스와 커스터마이저\nconst target3 = { a: 1 };\nconst result3 = assignWith(target3, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n```\n\n#### 파라미터\n\n- `object` (`any`): 속성이 할당될 대상 객체예요.\n- `...sources` (`any[]`): 속성을 복사할 소스 객체들이에요.\n- `customizer` (`function`): 할당할 값을 결정하는 함수예요. `(objValue, srcValue, key, object, source) => any` 형태예요.\n\n#### 반환 값\n\n(`any`): 커스터마이저 함수에 의해 결정된 값들이 할당된 대상 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/at.md",
    "content": "# at (Lodash 호환성)\n\n::: warning 구조 분해 할당을 사용하세요\n\n이 `at` 함수는 복잡한 경로 처리와 여러 형태의 인수 처리로 인해 상대적으로 느려요.\n\n대신 구조 분해 할당이나 직접 속성 접근을 사용하세요.\n\n:::\n\n객체에서 지정된 경로의 값들을 배열로 반환해요.\n\n```typescript\nconst result = at(object, ...paths);\n```\n\n## 사용법\n\n### `at(object, ...paths)`\n\n객체에서 여러 경로의 값을 한 번에 가져올 때 `at`을 사용하세요. 각 경로에 해당하는 값들을 배열로 반환해요.\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst object = { a: 1, b: 2, c: 3 };\nconst result = at(object, 'a', 'c');\n// Returns: [1, 3]\n\n// 중첩된 객체\nconst nested = {\n  a: {\n    b: {\n      c: 4,\n    },\n  },\n  x: [1, 2, 3],\n};\nconst result2 = at(nested, 'a.b.c', 'x[1]');\n// Returns: [4, 2]\n\n// 배열로 경로 전달\nconst paths = ['a', 'c'];\nconst result3 = at(object, paths);\n// Returns: [1, 3]\n\n// 존재하지 않는 경로\nconst result4 = at(object, 'nonexistent', 'a');\n// Returns: [undefined, 1]\n```\n\n`null`이나 `undefined` 객체는 `undefined` 배열을 반환해요.\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\nat(null, 'a', 'b'); // [undefined, undefined]\nat(undefined, 'a', 'b'); // [undefined, undefined]\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 값을 가져올 객체예요.\n- `...paths` (`Array<PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>>`): 가져올 값의 경로들이에요. 개별 인수로 전달하거나 배열로 전달할 수 있어요.\n\n#### 반환 값\n\n(`unknown[]`): 지정된 경로들에 해당하는 값들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/clone.md",
    "content": "# clone (Lodash 호환성)\n\n::: warning `es-toolkit`의 `clone`을 사용하세요\n\n이 `clone` 함수는 특수한 객체 타입들을 처리하는 복잡한 로직으로 인해 상대적으로 느려요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [clone](../../object/clone.md)을 사용하세요.\n\n:::\n\n객체의 얕은 복사본을 만들어요.\n\n```typescript\nconst cloned = clone(value);\n```\n\n## 사용법\n\n### `clone(value)`\n\n값의 얕은 복사본을 만들고 싶을 때 `clone`을 사용하세요. 다양한 타입의 객체와 원시값을 복사할 수 있어요.\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\n// 원시 값 복사\nconst num = 42;\nconst clonedNum = clone(num);\n// Returns: 42 (같은 값)\n\n// 배열 복사\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\n// Returns: [1, 2, 3] (새로운 배열 인스턴스)\n\n// 객체 복사\nconst obj = { a: 1, b: 'hello' };\nconst clonedObj = clone(obj);\n// Returns: { a: 1, b: 'hello' } (새로운 객체 인스턴스)\n\n// Date 객체 복사\nconst date = new Date('2023-01-01');\nconst clonedDate = clone(date);\n// Returns: new Date('2023-01-01') (새로운 Date 인스턴스)\n\n// 정규 표현식 복사\nconst regex = /hello/gi;\nregex.lastIndex = 3;\nconst clonedRegex = clone(regex);\n// Returns: /hello/gi with lastIndex = 3\n\n// Map 복사\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nconst clonedMap = clone(map);\n// Returns: new Map([['a', 1], ['b', 2]])\n\n// Set 복사\nconst set = new Set([1, 2, 3]);\nconst clonedSet = clone(set);\n// Returns: new Set([1, 2, 3])\n```\n\n중첩된 객체는 얕은 복사만 수행해요.\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\nconst nested = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst clonedNested = clone(nested);\n\nconsole.log(clonedNested !== nested); // true (다른 객체)\nconsole.log(clonedNested.b === nested.b); // true (중첩 객체는 같은 참조)\n```\n\n#### 파라미터\n\n- `value` (`T`): 복사할 값이에요.\n\n#### 반환 값\n\n(`T`): 복사된 값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/cloneDeep.md",
    "content": "# cloneDeep (Lodash 호환성)\n\n::: warning `es-toolkit`의 `cloneDeep`을 사용하세요\n\n이 `cloneDeep` 함수는 특수한 객체 타입들을 처리하는 복잡한 로직으로 인해 상대적으로 느려요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [cloneDeep](../../object/cloneDeep.md)을 사용하세요.\n\n:::\n\n객체의 깊은 복사본을 만들어요.\n\n```typescript\nconst cloned = cloneDeep(value);\n```\n\n## 사용법\n\n### `cloneDeep(value)`\n\n값의 깊은 복사본을 만들고 싶을 때 `cloneDeep`을 사용하세요. 중첩된 객체와 배열까지 완전히 새로운 인스턴스로 복사해요.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\n// 원시 값 복사\nconst num = 42;\nconst clonedNum = cloneDeep(num);\n// Returns: 42 (같은 값)\n\n// 배열 깊은 복사\nconst arr = [1, [2, 3], { a: 4 }];\nconst clonedArr = cloneDeep(arr);\nclonedArr[1][0] = 99;\nconsole.log(arr[1][0]); // 2 (원본은 변경되지 않음)\nconsole.log(clonedArr[1][0]); // 99\n\n// 객체 깊은 복사\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n    d: {\n      e: 3,\n    },\n  },\n};\nconst clonedObj = cloneDeep(obj);\nclonedObj.b.d.e = 99;\nconsole.log(obj.b.d.e); // 3 (원본은 변경되지 않음)\nconsole.log(clonedObj.b.d.e); // 99\n\n// Date 객체 깊은 복사\nconst date = new Date('2023-01-01');\nconst clonedDate = cloneDeep(date);\n// Returns: new Date('2023-01-01') (새로운 Date 인스턴스)\n\n// 복잡한 중첩 구조\nconst complex = {\n  arr: [1, { nested: true }],\n  map: new Map([['key', { value: 1 }]]),\n  set: new Set([{ item: 1 }]),\n  date: new Date(),\n};\nconst clonedComplex = cloneDeep(complex);\n// 모든 중첩된 객체들이 완전히 새로운 인스턴스로 복사됨\n```\n\n순환 참조도 올바르게 처리해요.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nobj.self = obj; // 순환 참조\n\nconst cloned = cloneDeep(obj);\nconsole.log(cloned !== obj); // true\nconsole.log(cloned.self === cloned); // true (순환 참조 유지)\n```\n\n#### 파라미터\n\n- `value` (`T`): 깊은 복사할 값이에요.\n\n#### 반환 값\n\n(`T`): 깊은 복사된 값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/cloneDeepWith.md",
    "content": "# cloneDeepWith (Lodash 호환성)\n\n::: warning 커스텀 로직 구현을 권장해요\n\n이 `cloneDeepWith` 함수는 복잡한 커스터마이저 함수와 깊은 복사 처리로 인해 상대적으로 느려요.\n\n대신 `cloneDeep`과 커스텀 로직을 직접 구현하는 방식을 사용하세요.\n\n:::\n\n커스터마이저 함수를 사용해서 객체의 깊은 복사본을 만들어요.\n\n```typescript\nconst cloned = cloneDeepWith(value, customizer);\n```\n\n## 사용법\n\n### `cloneDeepWith(value, customizer?)`\n\n깊은 복사 방식을 커스터마이징하고 싶을 때 `cloneDeepWith`를 사용하세요. 커스터마이저 함수로 특정 값들의 복사 방식을 제어할 수 있어요.\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\n// 기본 사용법 (커스터마이저 없음)\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst cloned = cloneDeepWith(obj);\n// Returns: { a: 1, b: { c: 2 } } (완전히 새로운 인스턴스들)\n\n// Date 객체 특별 처리\nconst obj2 = {\n  name: 'test',\n  createdAt: new Date('2023-01-01'),\n  nested: {\n    updatedAt: new Date('2023-12-31'),\n  },\n};\nconst cloned2 = cloneDeepWith(obj2, value => {\n  if (value instanceof Date) {\n    // Date를 타임스탬프 숫자로 변환\n    return value.getTime();\n  }\n  // undefined 반환 시 기본 깊은 복사 방식 사용\n});\n// Returns: {\n//   name: 'test',\n//   createdAt: 1672531200000,\n//   nested: { updatedAt: 1703980800000 }\n// }\n\n// 배열 요소 변환\nconst arr = [1, [2, 3], { a: 4, b: [5, 6] }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value * 10;\n  }\n});\n// Returns: [10, [20, 30], { a: 40, b: [50, 60] }]\n\n// 함수 처리\nconst objWithFunc = {\n  data: { count: 1 },\n  increment: function () {\n    this.data.count++;\n  },\n};\nconst clonedWithFunc = cloneDeepWith(objWithFunc, value => {\n  if (typeof value === 'function') {\n    // 함수를 문자열로 변환\n    return value.toString();\n  }\n});\n// Returns: {\n//   data: { count: 1 },\n//   increment: \"function() { this.data.count++; }\"\n// }\n```\n\n순환 참조와 커스터마이저 조합:\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nobj.b.self = obj; // 순환 참조\n\nconst cloned = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value + 100;\n  }\n});\n\nconsole.log(cloned.a); // 101\nconsole.log(cloned.b.c); // 102\nconsole.log(cloned.b.self === cloned); // true (순환 참조 유지)\n```\n\n#### 파라미터\n\n- `value` (`T`): 깊은 복사할 값이에요.\n- `customizer` (`function`, 선택적): 복사 방식을 결정하는 함수예요. `(value: any, key?: string, object?: any, stack?: Map<any, any>) => any` 형태예요.\n\n#### 반환 값\n\n(`T`): 커스터마이저에 의해 처리된 깊은 복사본을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/cloneWith.md",
    "content": "# cloneWith (Lodash 호환성)\n\n::: warning 커스텀 로직 구현을 권장해요\n\n이 `cloneWith` 함수는 복잡한 커스터마이저 함수 처리로 인해 상대적으로 느려요.\n\n대신 `clone`과 커스텀 로직을 직접 구현하는 방식을 사용하세요.\n\n:::\n\n커스터마이저 함수를 사용해서 객체의 얕은 복사본을 만들어요.\n\n```typescript\nconst cloned = cloneWith(value, customizer);\n```\n\n## 사용법\n\n### `cloneWith(value, customizer?)`\n\n복사 방식을 커스터마이징하고 싶을 때 `cloneWith`를 사용하세요. 커스터마이저 함수로 특정 값들의 복사 방식을 제어할 수 있어요.\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\n// 기본 사용법 (커스터마이저 없음)\nconst obj = { a: 1, b: 'hello' };\nconst cloned = cloneWith(obj);\n// Returns: { a: 1, b: 'hello' } (새로운 객체 인스턴스)\n\n// 숫자 값 변환\nconst obj2 = { a: 1, b: 2, c: 'text' };\nconst cloned2 = cloneWith(obj2, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (typeof val === 'number') {\n      obj[key] = val * 2;\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { a: 2, b: 4, c: 'text' }\n\n// 배열 요소 변환\nconst arr = [1, 2, 3];\nconst clonedArr = cloneWith(arr, value => {\n  return value.map(x => x + 10);\n});\n// Returns: [11, 12, 13]\n\n// 특정 타입 처리\nconst complex = {\n  date: new Date('2023-01-01'),\n  number: 42,\n  text: 'hello',\n};\nconst clonedComplex = cloneWith(complex, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (val instanceof Date) {\n      obj[key] = val.toISOString();\n    } else if (typeof val === 'string') {\n      obj[key] = val.toUpperCase();\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { date: '2023-01-01T00:00:00.000Z', number: 42, text: 'HELLO' }\n```\n\n커스터마이저가 `undefined`를 반환하면 기본 복사 방식을 사용해요.\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nconst cloned = cloneWith(obj, value => {\n  // 모든 값에 대해 undefined 반환 = 기본 복사\n  return undefined;\n});\n// Returns: { a: 1, b: { c: 2 } } (clone과 동일한 결과)\n```\n\n#### 파라미터\n\n- `value` (`T`): 복사할 값이에요.\n- `customizer` (`function`, 선택적): 복사 방식을 결정하는 함수예요. `(value: any) => any` 형태예요.\n\n#### 반환 값\n\n(`T`): 커스터마이저에 의해 처리된 얕은 복사본을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/create.md",
    "content": "# create (Lodash 호환성)\n\n::: warning `Object.create`를 사용하세요\n\n이 `create` 함수는 복잡한 속성 처리 로직으로 인해 상대적으로 느려요.\n\n대신 더 빠르고 현대적인 `Object.create`를 사용하세요.\n\n:::\n\n주어진 프로토타입을 상속하는 새로운 객체를 만들어요.\n\n```typescript\nconst obj = create(prototype, properties);\n```\n\n## 사용법\n\n### `create(prototype, properties?)`\n\n프로토타입을 기반으로 새로운 객체를 만들고 싶을 때 `create`를 사용하세요. 선택적으로 속성을 추가할 수도 있어요.\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst person = {\n  greet() {\n    console.log(`Hello, my name is ${this.name}`);\n  },\n};\n\nconst john = create(person, { name: 'John' });\njohn.greet(); // \"Hello, my name is John\"\n\n// 메서드 상속 확인\nconsole.log('greet' in john); // true\nconsole.log(john.hasOwnProperty('greet')); // false (상속된 속성)\nconsole.log(john.hasOwnProperty('name')); // true (고유 속성)\n\n// 복잡한 프로토타입\nconst animal = {\n  type: 'animal',\n  makeSound() {\n    console.log('Some generic sound');\n  },\n};\n\nconst dog = create(animal, {\n  breed: 'Golden Retriever',\n  name: 'Buddy',\n  makeSound() {\n    console.log('Woof!');\n  },\n});\n\nconsole.log(dog.type); // 'animal' (상속됨)\nconsole.log(dog.breed); // 'Golden Retriever' (고유 속성)\ndog.makeSound(); // 'Woof!' (덮어쓴 메서드)\n\n// null 프로토타입\nconst cleanObj = create(null, { data: 'value' });\nconsole.log(cleanObj.toString); // ƒ toString() { [native code] } (null은 {}와 동일)\n\n// 빈 객체 상속\nconst empty = create({});\nconsole.log(Object.getPrototypeOf(empty)); // {} (빈 객체)\n```\n\n속성은 열거 가능한 문자열 키만 복사돼요.\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\nconst proto = { inherited: true };\nconst props = {\n  visible: 'yes',\n  [Symbol('hidden')]: 'no', // Symbol 키는 복사되지 않음\n};\n\n// non-enumerable 속성 추가\nObject.defineProperty(props, 'hidden', {\n  value: 'secret',\n  enumerable: false,\n});\n\nconst obj = create(proto, props);\nconsole.log(obj.visible); // 'yes'\nconsole.log(obj.hidden); // undefined (non-enumerable)\nconsole.log(obj[Symbol('hidden')]); // undefined (Symbol 키)\nconsole.log(obj.inherited); // true (상속됨)\n```\n\n#### 파라미터\n\n- `prototype` (`T extends object`): 상속할 프로토타입 객체예요.\n- `properties` (`U extends object`, 선택적): 새 객체에 추가할 속성들이에요.\n\n#### 반환 값\n\n(`T & U`): 프로토타입을 상속하고 지정된 속성을 가진 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/defaults.md",
    "content": "# defaults (Lodash 호환성)\n\n::: warning `Object.assign()`을 사용하세요\n\n이 `defaults` 함수는 `undefined`와 `Object.prototype`에서 상속된 속성들을 특별히 처리하는 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.assign()`을 사용하세요.\n\n:::\n\n객체에 기본값을 설정해서 `undefined` 속성을 채워요.\n\n```typescript\nconst result = defaults(object, source);\n```\n\n## 사용법\n\n### `defaults(object, ...sources)`\n\n객체의 `undefined` 속성이나 `Object.prototype`에서 상속된 속성에 기본값을 설정할 때 `defaults`를 사용하세요. 여러 개의 기본값 객체를 전달할 수 있고, 왼쪽에서 오른쪽 순서로 적용돼요.\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\n// 기본값으로 undefined 속성 채우기\ndefaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 });\n// 반환값: { a: 1, b: 2, c: 3 }\n\n// undefined 속성만 기본값으로 채워져요\ndefaults({ a: undefined }, { a: 1 });\n// 반환값: { a: 1 }\n\n// null 값은 그대로 유지해요\ndefaults({ a: null }, { a: 1 });\n// 반환값: { a: null }\n```\n\n속성이 이미 값을 가지고 있다면 기본값으로 덮어쓰지 않아요.\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\ndefaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n// 반환값: { a: 1, b: 2, c: 3 }\n```\n\n#### 파라미터\n\n- `object` (`any`): 기본값을 설정할 대상 객체예요.\n- `...sources` (`any[]`): 기본값을 제공하는 소스 객체들이에요.\n\n#### 반환 값\n\n(`any`): 기본값이 설정된 객체를 반환해요. 첫 번째 인수인 `object`가 수정돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/defaultsDeep.md",
    "content": "# defaultsDeep (Lodash 호환성)\n\n::: warning 구조 분해 할당과 `Object.assign()`을 사용하세요\n\n이 `defaultsDeep` 함수는 중첩 객체의 재귀적 병합과 순환 참조 처리로 인해 복잡하고 느리게 동작해요.\n\n대신 더 빠르고 현대적인 구조 분해 할당과 `Object.assign()`을 사용하세요.\n\n:::\n\n중첩된 객체에 재귀적으로 기본값을 설정해요.\n\n```typescript\nconst result = defaultsDeep(target, ...sources);\n```\n\n## 사용법\n\n### `defaultsDeep(target, ...sources)`\n\n중첩된 객체의 `undefined` 속성에 기본값을 재귀적으로 설정할 때 `defaultsDeep`을 사용하세요. `defaults`와 비슷하지만 중첩된 객체도 병합해요.\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\n// 중첩 객체의 기본값 설정\ndefaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 });\n// 반환값: { a: { b: 2, c: 3 }, d: 4 }\n\n// undefined 속성만 기본값으로 채워져요\ndefaultsDeep({ a: { b: undefined } }, { a: { b: 1 } });\n// 반환값: { a: { b: 1 } }\n\n// null 값은 그대로 유지해요\ndefaultsDeep({ a: null }, { a: { b: 1 } });\n// 반환값: { a: null }\n```\n\n여러 소스 객체를 전달해서 기본값을 단계적으로 적용할 수 있어요.\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\ndefaultsDeep({ a: { b: 2 } }, { a: { c: 3 } }, { a: { d: 4 }, e: 5 });\n// 반환값: { a: { b: 2, c: 3, d: 4 }, e: 5 }\n```\n\n#### 파라미터\n\n- `target` (`any`): 기본값을 설정할 대상 객체예요.\n- `...sources` (`any[]`): 기본값을 제공하는 소스 객체들이에요.\n\n#### 반환 값\n\n(`any`): 기본값이 재귀적으로 설정된 객체를 반환해요. 첫 번째 인수인 `target`이 수정돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/extend.md",
    "content": "# extend (Lodash 호환성)\n\n::: warning `Object.assign()`을 사용하세요\n\n이 `extend` 함수는 프로토타입 체인에서 상속된 속성들까지 처리하는 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.assign()`을 사용하세요.\n\n:::\n\n객체의 고유 속성과 상속된 속성을 다른 객체에 복사해요.\n\n```typescript\nconst result = extend(object, source);\n```\n\n## 사용법\n\n### `extend(object, ...sources)`\n\n객체의 속성을 다른 객체로 복사할 때 `extend`를 사용하세요. `Object.assign()`과 비슷하지만 상속된 속성도 함께 복사해요. 이 함수는 `assignIn`의 별칭이에요.\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\n// 기본 속성 복사\nconst target = { a: 1 };\nextend(target, { b: 2 }, { c: 3 });\n// 반환값: { a: 1, b: 2, c: 3 }\n\n// 상속된 속성도 복사해요\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.b = 2;\n\nconst source = new Parent();\nextend({}, source);\n// 반환값: { a: 1, b: 2 }\n```\n\n같은 속성이 있을 때는 나중에 오는 소스 객체의 값으로 덮어써요.\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\nextend({ a: 1, b: 2 }, { b: 3 }, { c: 4 });\n// 반환값: { a: 1, b: 3, c: 4 }\n```\n\n#### 파라미터\n\n- `object` (`any`): 속성을 복사받을 대상 객체예요.\n- `...sources` (`any[]`): 속성을 제공하는 소스 객체들이에요.\n\n#### 반환 값\n\n(`any`): 속성이 복사된 객체를 반환해요. 첫 번째 인수인 `object`가 수정돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/extendWith.md",
    "content": "# extendWith (Lodash 호환성)\n\n::: warning `Object.assign()`과 사용자 정의 함수를 사용하세요\n\n이 `extendWith` 함수는 프로토타입 체인에서 상속된 속성 처리와 사용자 정의 병합 로직으로 인해 복잡하고 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.assign()`과 사용자 정의 함수를 사용하세요.\n\n:::\n\n객체의 고유 속성과 상속된 속성을 사용자 정의 함수로 처리하여 다른 객체에 복사해요.\n\n```typescript\nconst result = extendWith(object, source, customizer);\n```\n\n## 사용법\n\n### `extendWith(object, ...sources, customizer)`\n\n객체의 속성을 사용자 정의 로직으로 병합할 때 `extendWith`를 사용하세요. `extend`와 비슷하지만 각 속성을 어떻게 병합할지 직접 결정할 수 있어요. 이 함수는 `assignInWith`의 별칭이에요.\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\n// 사용자 정의 병합 로직으로 속성 복사\nconst target = { a: 1, b: 2 };\nextendWith(target, { b: 3, c: 4 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 반환값: { a: 1, b: 2, c: 4 }\n\n// 배열을 연결하는 사용자 정의 병합\nconst obj1 = { a: [1, 2] };\nconst obj2 = { a: [3, 4], b: [5, 6] };\nextendWith(obj1, obj2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 반환값: { a: [1, 2, 3, 4], b: [5, 6] }\n```\n\n여러 소스 객체를 사용할 수 있어요.\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\nextendWith({ a: 1 }, { b: 2 }, { c: 3 }, (objValue, srcValue) => srcValue * 2);\n// 반환값: { a: 1, b: 4, c: 6 }\n```\n\n#### 파라미터\n\n- `object` (`any`): 속성을 복사받을 대상 객체예요.\n- `...sources` (`any[]`): 속성을 제공하는 소스 객체들이에요.\n- `customizer` (`function`): 각 속성에 대해 할당할 값을 결정하는 함수예요. `(objValue, srcValue, key, object, source)`를 받아요.\n\n#### 반환 값\n\n(`any`): 속성이 복사된 객체를 반환해요. 첫 번째 인수인 `object`가 수정돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/findKey.md",
    "content": "# findKey (Lodash 호환성)\n\n::: warning `es-toolkit`의 `findKey`를 사용하세요\n\n이 `findKey` 함수는 다양한 조건 타입 처리와 호환성 로직으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [findKey](../../object/findKey.md)를 사용하세요.\n\n:::\n\n조건에 맞는 첫 번째 요소의 키를 찾아요.\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 사용법\n\n### `findKey(obj, predicate)`\n\n객체에서 조건에 맞는 첫 번째 요소의 키를 찾을 때 `findKey`를 사용하세요. 함수, 객체, 배열, 문자열 등 다양한 형태의 조건을 사용할 수 있어요.\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\n// 함수 조건으로 키 찾기\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindKey(users, user => user.age > 30);\n// 반환값: 'charlie'\n\n// 객체 조건으로 키 찾기\nfindKey(users, { active: false });\n// 반환값: 'bob'\n\n// 속성 경로로 키 찾기\nfindKey(users, 'active');\n// 반환값: 'alice'\n```\n\n조건에 맞는 요소가 없으면 `undefined`를 반환해요.\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\nfindKey({ a: 1, b: 2 }, value => value > 5);\n// 반환값: undefined\n```\n\n#### 파라미터\n\n- `obj` (`T | null | undefined`): 검색할 객체예요.\n- `predicate` (`ObjectIteratee<T>`, 선택): 각 요소에 적용할 조건이에요. 함수, 객체, 배열, 문자열이 될 수 있어요.\n\n#### 반환 값\n\n(`string | undefined`): 조건에 맞는 첫 번째 요소의 키를 반환해요. 없으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/findLastKey.md",
    "content": "# findLastKey (Lodash 호환성)\n\n::: warning `Array.findLast()`와 `Object.keys()`를 사용하세요\n\n이 `findLastKey` 함수는 다양한 조건 타입 처리와 호환성 로직으로 인해 복잡하게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.findLast()`와 `Object.keys()`를 사용하세요.\n\n:::\n\n조건에 맞는 마지막 요소의 키를 뒤에서부터 찾아요.\n\n```typescript\nconst key = findLastKey(obj, predicate);\n```\n\n## 사용법\n\n### `findLastKey(obj, predicate)`\n\n객체에서 조건에 맞는 마지막 요소의 키를 찾을 때 `findLastKey`를 사용하세요. `findKey`와 반대로 뒤에서부터 검색해요. 함수, 객체, 배열, 문자열 등 다양한 형태의 조건을 사용할 수 있어요.\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\n// 함수 조건으로 키 찾기\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindLastKey(users, user => user.active);\n// 반환값: 'charlie' (뒤에서부터 찾은 첫 번째 active: true)\n\n// 객체 조건으로 키 찾기\nfindLastKey(users, { active: true });\n// 반환값: 'charlie'\n\n// 속성 경로로 키 찾기\nfindLastKey(users, 'active');\n// 반환값: 'charlie'\n\n// 속성-값 배열로 키 찾기\nfindLastKey(users, ['active', false]);\n// 반환값: 'bob'\n```\n\n조건에 맞는 요소가 없으면 `undefined`를 반환해요.\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\nfindLastKey({ a: 1, b: 2 }, value => value > 5);\n// 반환값: undefined\n```\n\n#### 파라미터\n\n- `obj` (`T | null | undefined`): 검색할 객체예요.\n- `predicate` (`ObjectIteratee<T>`, 선택): 각 요소에 적용할 조건이에요. 함수, 객체, 배열, 문자열이 될 수 있어요.\n\n#### 반환 값\n\n(`string | undefined`): 조건에 맞는 마지막 요소의 키를 반환해요. 없으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/forIn.md",
    "content": "# forIn (Lodash 호환성)\n\n::: warning `Object.keys`와 `for...in` 반복문을 사용하세요\n\n이 `forIn` 함수는 `null`이나 `undefined` 처리, 기본 `iteratee` 설정 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys`와 `for...in` 반복문을 사용하세요.\n\n:::\n\n객체의 모든 속성(상속된 속성 포함)을 반복하면서 각 속성에 대해 함수를 호출해요.\n\n```typescript\nconst result = forIn(obj, iteratee);\n```\n\n## 사용법\n\n### `forIn(object, iteratee)`\n\n객체의 모든 속성을 반복하면서 `iteratee` 함수를 호출해요. 객체의 고유 속성뿐만 아니라 프로토타입 체인을 통해 상속된 속성까지 모두 반복해요. `iteratee` 함수가 `false`를 반환하면 반복을 중단해요.\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\n// 객체의 모든 속성 반복\nconst obj = { a: 1, b: 2 };\nforIn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'a' 1, 'b' 2\n\n// 상속된 속성도 포함하여 반복\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforIn(child, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'inherited' 'value', 'own' 'ownValue', 'protoProperty' 'proto'\n\n// 조건에 따른 조기 종료\nforIn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' 이후 중단\n});\n// 출력: 'a' 1\n```\n\n`null`이나 `undefined`는 그대로 반환해요.\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\nforIn(null, iteratee); // null\nforIn(undefined, iteratee); // undefined\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 반복할 객체예요.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 선택): 각 속성에 대해 호출할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`T | null | undefined`): 원본 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/forInRight.md",
    "content": "# forInRight (Lodash 호환성)\n\n::: warning `Object.keys`와 `for...in` 반복문을 사용하세요\n\n이 `forInRight` 함수는 키 배열 생성과 역순 순회, `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys`와 `for...in` 반복문을 사용하세요.\n\n:::\n\n객체의 모든 속성(상속된 속성 포함)을 역순으로 반복하면서 각 속성에 대해 함수를 호출해요.\n\n```typescript\nconst result = forInRight(obj, iteratee);\n```\n\n## 사용법\n\n### `forInRight(object, iteratee)`\n\n객체의 모든 속성을 역순으로 반복하면서 `iteratee` 함수를 호출해요. 객체의 고유 속성뿐만 아니라 프로토타입 체인을 통해 상속된 속성까지 모두 반복해요. 키를 배열로 모은 뒤 역순으로 순회하기 때문에 일반적인 순회보다 느려요. `iteratee` 함수가 `false`를 반환하면 반복을 중단해요.\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\n// 객체의 모든 속성 역순 반복\nconst obj = { a: 1, b: 2 };\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'b' 2, 'a' 1\n\n// 상속된 속성도 포함하여 역순 반복\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforInRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'protoProperty' 'proto', 'own' 'ownValue', 'inherited' 'value'\n\n// 조건에 따른 조기 종료\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a'에서 중단\n});\n// 출력: 'b' 2, 'a' 1\n```\n\n`null`이나 `undefined`는 그대로 반환해요.\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\nforInRight(null, iteratee); // null\nforInRight(undefined, iteratee); // undefined\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 반복할 객체예요.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 선택): 각 속성에 대해 호출할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`T | null | undefined`): 원본 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/forOwn.md",
    "content": "# forOwn (Lodash 호환성)\n\n::: warning `Object.keys`와 반복문을 사용하세요\n\n이 `forOwn` 함수는 내부적으로 `keys` 함수를 호출하고 객체 변환 과정, `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys`와 반복문을 사용하세요.\n\n:::\n\n객체의 고유 속성만 반복하면서 각 속성에 대해 함수를 호출해요.\n\n```typescript\nconst result = forOwn(obj, iteratee);\n```\n\n## 사용법\n\n### `forOwn(object, iteratee)`\n\n객체의 고유 속성만 반복하면서 `iteratee` 함수를 호출해요. 상속된 속성이나 `Symbol` 키는 제외하고 객체가 직접 소유한 속성만 반복해요. `iteratee` 함수가 `false`를 반환하면 반복을 중단해요.\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\n// 객체의 고유 속성만 반복\nconst obj = { a: 1, b: 2 };\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'a' 1, 'b' 2\n\n// 상속된 속성은 제외\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwn(child, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'inherited' 'value', 'own' 'ownValue' (protoProperty는 제외)\n\n// 조건에 따른 조기 종료\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a' 이후 중단\n});\n// 출력: 'a' 1\n```\n\n`null`이나 `undefined`는 그대로 반환해요.\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\nforOwn(null, iteratee); // null\nforOwn(undefined, iteratee); // undefined\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 반복할 객체예요.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 선택): 각 속성에 대해 호출할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`T | null | undefined`): 원본 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/forOwnRight.md",
    "content": "# forOwnRight (Lodash 호환성)\n\n::: warning `Object.keys`와 반복문을 사용하세요\n\n이 `forOwnRight` 함수는 내부적으로 `keys` 함수를 호출하고 객체 변환 과정, 역순 순회 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys`와 반복문을 사용하세요.\n\n:::\n\n객체의 고유 속성만 역순으로 반복하면서 각 속성에 대해 함수를 호출해요.\n\n```typescript\nconst result = forOwnRight(obj, iteratee);\n```\n\n## 사용법\n\n### `forOwnRight(object, iteratee)`\n\n객체의 고유 속성만 역순으로 반복하면서 `iteratee` 함수를 호출해요. 상속된 속성이나 `Symbol` 키는 제외하고 객체가 직접 소유한 속성만 역순으로 반복해요. 키를 배열로 모은 뒤 역순으로 순회하기 때문에 일반적인 순회보다 느려요. `iteratee` 함수가 `false`를 반환하면 반복을 중단해요.\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\n// 객체의 고유 속성만 역순 반복\nconst obj = { a: 1, b: 2 };\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'b' 2, 'a' 1\n\n// 상속된 속성은 제외하여 역순 반복\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwnRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 출력: 'own' 'ownValue', 'inherited' 'value' (protoProperty는 제외)\n\n// 조건에 따른 조기 종료\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 'a'에서 중단\n});\n// 출력: 'b' 2, 'a' 1\n```\n\n`null`이나 `undefined`는 그대로 반환해요.\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\nforOwnRight(null, iteratee); // null\nforOwnRight(undefined, iteratee); // undefined\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 반복할 객체예요.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 선택): 각 속성에 대해 호출할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`T | null | undefined`): 원본 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/fromPairs.md",
    "content": "# fromPairs (Lodash 호환성)\n\n::: warning `Object.fromEntries`를 사용하세요\n\n이 `fromPairs` 함수는 배열 유사 객체 체크와 반복 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.fromEntries`를 사용하세요.\n\n:::\n\n키-값 쌍의 배열을 객체로 변환해요.\n\n```typescript\nconst result = fromPairs(pairs);\n```\n\n## 사용법\n\n### `fromPairs(pairs)`\n\n키-값 쌍으로 이루어진 배열을 받아서 객체로 변환해요. 각 키-값 쌍은 2개 요소를 가진 배열이어야 해요. 첫 번째 요소는 키가 되고, 두 번째 요소는 값이 돼요. 데이터를 정리하거나 변환할 때 유용해요.\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\n// 기본 키-값 쌍 변환\nconst pairs = [\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n];\nconst result = fromPairs(pairs);\n// 결과: { a: 1, b: 2, c: 3 }\n\n// 다양한 값 타입 처리\nconst mixedPairs = [\n  ['name', 'John'],\n  ['age', 30],\n  ['active', true],\n];\nconst user = fromPairs(mixedPairs);\n// 결과: { name: 'John', age: 30, active: true }\n```\n\n`null`이나 `undefined`, 배열 유사 객체가 아닌 값은 빈 객체로 처리해요.\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\nfromPairs(null); // {}\nfromPairs(undefined); // {}\nfromPairs('invalid'); // {}\n```\n\n#### 파라미터\n\n- `pairs` (`ArrayLike<[PropertyName, T]> | ArrayLike<any[]> | null | undefined`): 객체로 변환할 키-값 쌍의 배열이에요.\n\n#### 반환 값\n\n(`Record<string, any> | Record<string, T>`): 키-값 쌍으로부터 생성된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/functions.md",
    "content": "# functions (Lodash 호환성)\n\n::: warning `Object.keys`와 `typeof` 체크를 사용하세요\n\n이 `functions` 함수는 내부적으로 `keys` 함수와 필터링 과정을 거쳐서 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys`와 `typeof` 체크를 사용하세요.\n\n:::\n\n객체의 고유 속성 중에서 함수인 속성의 이름들을 배열로 반환해요.\n\n```typescript\nconst functionNames = functions(obj);\n```\n\n## 사용법\n\n### `functions(object)`\n\n객체의 고유 속성을 확인해서 함수인 속성의 이름들만 배열로 반환해요. 상속된 속성이나 `Symbol` 키는 제외하고 객체가 직접 소유한 문자열 키 속성만 확인해요. 객체의 메서드를 찾거나 함수 속성만 따로 처리할 때 유용해요.\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functions(obj);\n// 결과: ['greet', 'calculate']\n\n// 클래스 인스턴스에서 함수 찾기\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst methods = functions(calc);\n// 결과: ['add'] (상속된 multiply, divide는 제외)\n\n// 함수가 없는 객체\nconst data = { x: 1, y: 2, z: 'text' };\nconst noFunctions = functions(data);\n// 결과: []\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\nfunctions(null); // []\nfunctions(undefined); // []\n```\n\n#### 파라미터\n\n- `object` (`any`): 확인할 객체예요.\n\n#### 반환 값\n\n(`string[]`): 함수인 속성의 이름들로 구성된 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/functionsIn.md",
    "content": "# functionsIn (Lodash 호환성)\n\n::: warning `for...in` 반복문과 `typeof` 체크를 사용하세요\n\n이 `functionsIn` 함수는 `for...in` 반복문과 함수 체크 과정을 거쳐서 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `for...in` 반복문과 `typeof` 체크를 사용하세요.\n\n:::\n\n객체의 모든 속성(상속된 속성 포함) 중에서 함수인 속성의 이름들을 배열로 반환해요.\n\n```typescript\nconst functionNames = functionsIn(obj);\n```\n\n## 사용법\n\n### `functionsIn(object)`\n\n객체의 모든 속성을 확인해서 함수인 속성의 이름들만 배열로 반환해요. 객체의 고유 속성뿐만 아니라 프로토타입 체인을 통해 상속된 속성까지 모두 확인해요. 객체의 모든 메서드(상속된 메서드 포함)를 찾을 때 유용해요.\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functionsIn(obj);\n// 결과: ['greet', 'calculate']\n\n// 상속된 함수도 포함\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst allMethods = functionsIn(calc);\n// 결과: ['add', 'divide'] (`multiply`는 비열거형)\n\n// 프로토타입 체인을 통한 상속\nfunction Parent() {\n  this.parentMethod = function () {\n    return 'parent';\n  };\n}\nParent.prototype.protoMethod = function () {\n  return 'proto';\n};\n\nfunction Child() {\n  Parent.call(this);\n  this.childMethod = function () {\n    return 'child';\n  };\n}\nChild.prototype = Object.create(Parent.prototype);\n\nconst child = new Child();\nconst inheritedFunctions = functionsIn(child);\n// 결과: ['parentMethod', 'childMethod', 'protoMethod']\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\nfunctionsIn(null); // []\nfunctionsIn(undefined); // []\n```\n\n#### 파라미터\n\n- `object` (`any`): 확인할 객체예요.\n\n#### 반환 값\n\n(`string[]`): 함수인 속성의 이름들(상속된 함수 포함)로 구성된 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/get.md",
    "content": "# get (Lodash 호환성)\n\n::: warning 점 표기법이나 대괄호 표기법을 사용하세요\n\n이 `get` 함수는 복잡한 경로 파싱, `null`이나 `undefined` 처리, 기본값 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 점 표기법(`.`)이나 대괄호 표기법(`[]`) 또는 옵셔널 체이닝(`?.`)을 사용하세요.\n\n:::\n\n객체의 지정된 경로에 있는 값을 가져와요.\n\n```typescript\nconst value = get(object, path, defaultValue);\n```\n\n## 사용법\n\n### `get(object, path, defaultValue?)`\n\n객체의 경로에서 값을 안전하게 가져올 때 `get`을 사용하세요. 경로가 존재하지 않거나 값이 `undefined`일 때는 기본값을 반환해요.\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\n// 점 표기법으로 중첩된 객체에 접근\nconst object = { a: { b: { c: 3 } } };\nget(object, 'a.b.c');\n// => 3\n\n// 배열 표기법으로 접근\nget(object, ['a', 'b', 'c']);\n// => 3\n\n// 존재하지 않는 경로에 기본값 제공\nget(object, 'a.b.d', 'default');\n// => 'default'\n\n// 배열 인덱스를 포함한 경로\nconst arrayObject = { users: [{ name: 'john' }, { name: 'jane' }] };\nget(arrayObject, 'users[0].name');\n// => 'john'\n```\n\n`null`이나 `undefined` 객체에 안전하게 접근해요.\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\nget(null, 'a.b.c', 'default');\n// => 'default'\n\nget(undefined, ['a', 'b'], 'default');\n// => 'default'\n```\n\n#### 파라미터\n\n- `object` (`any`): 조회할 객체예요.\n- `path` (`PropertyPath`): 가져올 속성의 경로예요. 문자열, 숫자, 심볼, 또는 배열로 나타낼 수 있어요.\n- `defaultValue` (`any`, 선택): 값이 `undefined`일 때 반환할 기본값이에요.\n\n#### 반환 값\n\n(`any`): 해결된 값이나 기본값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/has.md",
    "content": "# has (Lodash 호환성)\n\n::: warning `Object.hasOwn` 또는 `in` 연산자를 사용하세요\n\n이 `has` 함수는 복잡한 경로 파싱과 배열 인덱스 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.hasOwn()`이나 `in` 연산자를 사용하세요.\n\n:::\n\n객체에 지정된 경로의 속성이 존재하는지 확인해요.\n\n```typescript\nconst exists = has(object, path);\n```\n\n## 사용법\n\n### `has(object, path)`\n\n객체에 특정 경로의 속성이 있는지 확인하고 싶을 때 `has`를 사용하세요. 자체 속성(own property)만 확인하고 상속된 속성은 확인하지 않아요.\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\n// 단순 속성 확인\nconst object = { a: 1, b: 2 };\nhas(object, 'a');\n// => true\n\n// 중첩된 객체 확인\nconst nested = { a: { b: { c: 3 } } };\nhas(nested, 'a.b.c');\n// => true\nhas(nested, ['a', 'b', 'c']);\n// => true\n\n// 존재하지 않는 속성\nhas(nested, 'a.b.d');\n// => false\n\n// 배열 인덱스 확인\nconst array = [1, 2, 3];\nhas(array, 2);\n// => true\nhas(array, 5);\n// => false\n```\n\n희소 배열(sparse array)에서도 올바르게 동작해요.\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\nconst sparse = [1, , 3]; // 인덱스 1이 비어있음\nhas(sparse, 0); // true\nhas(sparse, 1); // true - 실제로 존재하지만 값은 undefined\nhas(sparse, 2); // true\n```\n\n#### 파라미터\n\n- `object` (`any`): 검사할 객체예요.\n- `path` (`PropertyPath`): 확인할 속성의 경로예요. 문자열, 숫자, 심볼, 또는 배열로 나타낼 수 있어요.\n\n#### 반환 값\n\n(`boolean`): 경로의 속성이 존재하면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/hasIn.md",
    "content": "# hasIn (Lodash 호환성)\n\n::: warning `in` 연산자를 사용하세요\n\n이 `hasIn` 함수는 복잡한 경로 파싱과 프로토타입 체인 검사 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `in` 연산자나 `Object.hasOwn()` 함수를 사용하세요.\n\n:::\n\n객체에 지정된 경로의 속성이 존재하는지 상속된 속성까지 포함해서 확인해요.\n\n```typescript\nconst exists = hasIn(object, path);\n```\n\n## 사용법\n\n### `hasIn(object, path)`\n\n객체에 특정 경로의 속성이 있는지 확인하고 싶을 때 `hasIn`을 사용하세요. `has`와 달리 상속된 속성(프로토타입 체인의 속성)도 함께 확인해요.\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// 자체 속성 확인\nconst object = { a: 1, b: 2 };\nhasIn(object, 'a');\n// => true\n\n// 중첩된 객체 확인\nconst nested = { a: { b: { c: 3 } } };\nhasIn(nested, 'a.b.c');\n// => true\nhasIn(nested, ['a', 'b', 'c']);\n// => true\n\n// 존재하지 않는 속성\nhasIn(nested, 'a.b.d');\n// => false\n\n// 배열 인덱스 확인\nconst array = [1, 2, 3];\nhasIn(array, 2);\n// => true\nhasIn(array, 5);\n// => false\n```\n\n상속된 속성도 확인해요.\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// 프로토타입 체인의 속성 확인\nfunction Rectangle() {}\nRectangle.prototype.area = function () {};\n\nconst rect = new Rectangle();\nhasIn(rect, 'area'); // true - 상속된 속성도 찾음\nhas(rect, 'area'); // false - has는 자체 속성만 확인\n```\n\n`null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\nhasIn(null, 'a');\n// => false\n\nhasIn(undefined, 'b');\n// => false\n```\n\n#### 파라미터\n\n- `object` (`any`): 검사할 객체예요.\n- `path` (`PropertyPath`): 확인할 속성의 경로예요. 문자열, 숫자, 심볼, 또는 배열로 나타낼 수 있어요.\n\n#### 반환 값\n\n(`boolean`): 경로의 속성이 존재하면(자체 속성이든 상속된 속성이든) `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/invert.md",
    "content": "# invert (Lodash 호환성)\n\n::: warning `es-toolkit`의 `invert`를 사용하세요\n\n이 `invert` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [invert](../../object/invert.md)를 사용하세요.\n\n:::\n\n객체의 키와 값을 뒤바꿔요.\n\n```typescript\nconst inverted = invert(object);\n```\n\n## 사용법\n\n### `invert(object)`\n\n객체의 키와 값을 서로 바꾸고 싶을 때 `invert`를 사용하세요. 원래 객체의 키는 새 객체의 값이 되고, 원래 객체의 값은 새 객체의 키가 돼요.\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 기본 키-값 뒤바꾸기\nconst object = { a: 1, b: 2, c: 3 };\ninvert(object);\n// => { '1': 'a', '2': 'b', '3': 'c' }\n\n// 문자열 값들 뒤바꾸기\nconst colors = { red: '#ff0000', green: '#00ff00', blue: '#0000ff' };\ninvert(colors);\n// => { '#ff0000': 'red', '#00ff00': 'green', '#0000ff': 'blue' }\n\n// 혼합된 키와 값 타입\nconst mixed = { a: 1, 2: 'b', c: 3, 4: 'd' };\ninvert(mixed);\n// => { '1': 'a', 'b': '2', '3': 'c', 'd': '4' }\n```\n\n중복된 값이 있을 때는 마지막 키가 사용돼요.\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 중복된 값이 있는 경우\nconst object = { a: 1, b: 1, c: 2 };\ninvert(object);\n// => { '1': 'b', '2': 'c' }\n// 'a'는 덮어쓰여져서 사라져요\n```\n\n#### 파라미터\n\n- `object` (`object`): 뒤바꿀 객체예요.\n\n#### 반환 값\n\n(`Record<string, string>`): 키와 값이 뒤바뀐 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/invertBy.md",
    "content": "# invertBy (Lodash 호환성)\n\n::: warning 현대적인 JavaScript API를 사용하세요\n\n이 `invertBy` 함수는 복잡한 반복자 처리와 그룹핑 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.entries()`와 `reduce()` 또는 `Map`을 사용하세요.\n\n:::\n\n객체의 키와 값을 뒤바꾸면서, 같은 값들을 배열로 그룹화해요.\n\n```typescript\nconst inverted = invertBy(object, iteratee);\n```\n\n## 사용법\n\n### `invertBy(object, iteratee?)`\n\n객체의 키와 값을 뒤바꾸면서 같은 값을 가진 키들을 배열로 묶고 싶을 때 `invertBy`를 사용하세요. 선택적으로 반복자 함수를 제공해서 값을 변환할 수 있어요.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// 기본 키-값 뒤바꾸기 (같은 값들이 배열로 그룹화됨)\nconst object = { a: 1, b: 2, c: 1 };\ninvertBy(object);\n// => { '1': ['a', 'c'], '2': ['b'] }\n\n// 반복자 함수를 사용한 값 변환\nconst ages = { john: 25, jane: 30, bob: 25 };\ninvertBy(ages, age => `age_${age}`);\n// => { 'age_25': ['john', 'bob'], 'age_30': ['jane'] }\n\n// 문자열 길이로 그룹화\nconst words = { a: 'hello', b: 'world', c: 'hi', d: 'test' };\ninvertBy(words, word => word.length);\n// => { '5': ['a', 'b'], '2': ['c'], '4': ['d'] }\n```\n\n객체 속성을 기준으로 그룹화할 수도 있어요.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// 객체 속성으로 그룹화\nconst users = {\n  user1: { department: 'IT', age: 30 },\n  user2: { department: 'HR', age: 25 },\n  user3: { department: 'IT', age: 35 },\n};\n\ninvertBy(users, user => user.department);\n// => { 'IT': ['user1', 'user3'], 'HR': ['user2'] }\n```\n\n`null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\ninvertBy(null);\n// => {}\n\ninvertBy(undefined);\n// => {}\n```\n\n#### 파라미터\n\n- `object` (`object`): 뒤바꿀 객체예요.\n- `iteratee` (`ValueIteratee`, 선택): 값을 변환하는 함수예요. 기본값은 값 자체를 그대로 사용하는 함수예요.\n\n#### 반환 값\n\n(`Record<string, string[]>`): 변환된 값들을 키로 하고, 원래 키들의 배열을 값으로 하는 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/keys.md",
    "content": "# keys (Lodash 호환성)\n\n::: warning `Object.keys`를 사용하세요\n\n이 `keys` 함수는 배열형 객체 처리, 프로토타입 객체 처리 등의 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.keys()`를 사용하세요.\n\n:::\n\n객체의 자체 열거 가능한 속성 이름들을 배열로 반환해요.\n\n```typescript\nconst keyArray = keys(object);\n```\n\n## 사용법\n\n### `keys(object)`\n\n객체의 자체 속성 이름들을 가져오고 싶을 때 `keys`를 사용하세요. 상속된 속성은 포함하지 않고 자체 속성만 반환해요.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// 기본 객체의 키들\nconst object = { a: 1, b: 2, c: 3 };\nkeys(object);\n// => ['a', 'b', 'c']\n\n// 배열의 인덱스들\nconst array = [1, 2, 3];\nkeys(array);\n// => ['0', '1', '2']\n\n// 문자열의 인덱스들\nkeys('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n함수나 생성자에서 상속된 속성은 제외해요.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeys(new Foo());\n// => ['a', 'b'] ('c'는 프로토타입 속성이므로 제외)\n```\n\n배열형 객체들을 특별히 처리해요.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeys(typedArray);\n// => ['0', '1', '2']\n\n// arguments 객체\nfunction example() {\n  return keys(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n`null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nkeys(null);\n// => []\n\nkeys(undefined);\n// => []\n```\n\n#### 파라미터\n\n- `object` (`any`): 키를 가져올 객체예요.\n\n#### 반환 값\n\n(`string[]`): 객체의 자체 열거 가능한 속성 이름들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/keysIn.md",
    "content": "# keysIn (Lodash 호환성)\n\n::: warning `for...in` 루프나 `Object.keys`를 사용하세요\n\n이 `keysIn` 함수는 배열형 객체 처리, 프로토타입 체인 순회 등의 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `for...in` 루프나 필요에 따라 `Object.keys()`를 사용하세요.\n\n:::\n\n객체의 모든 열거 가능한 속성 이름들을 상속된 속성까지 포함해서 배열로 반환해요.\n\n```typescript\nconst allKeys = keysIn(object);\n```\n\n## 사용법\n\n### `keysIn(object)`\n\n객체의 모든 속성 이름들을 상속된 속성까지 포함해서 가져오고 싶을 때 `keysIn`을 사용하세요. `keys`와 달리 프로토타입 체인의 속성들도 함께 반환해요.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// 기본 객체의 키들\nconst object = { a: 1, b: 2 };\nkeysIn(object);\n// => ['a', 'b']\n\n// 배열의 인덱스들\nconst array = [1, 2, 3];\nkeysIn(array);\n// => ['0', '1', '2']\n\n// 문자열의 인덱스들\nkeysIn('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n상속된 속성들도 포함해요.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeysIn(new Foo());\n// => ['a', 'b', 'c'] (프로토타입 속성 'c'도 포함)\n\n// constructor는 제외해요\nclass MyClass {\n  constructor() {\n    this.prop = 1;\n  }\n  method() {}\n}\nMyClass.prototype.inherited = 2;\n\nkeysIn(new MyClass());\n// => ['prop', 'method', 'inherited'] (constructor는 제외됨)\n```\n\n배열형 객체들을 특별히 처리해요.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeysIn(typedArray);\n// => ['0', '1', '2'] (buffer, byteLength 등은 제외)\n\n// arguments 객체\nfunction example() {\n  return keysIn(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n`null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nkeysIn(null);\n// => []\n\nkeysIn(undefined);\n// => []\n```\n\n#### 파라미터\n\n- `object` (`any`): 키를 가져올 객체예요.\n\n#### 반환 값\n\n(`string[]`): 객체의 모든 열거 가능한 속성 이름들(자체 속성과 상속된 속성 모두 포함)의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/mapKeys.md",
    "content": "# mapKeys (Lodash 호환성)\n\n::: warning `es-toolkit`의 `mapKeys`를 사용하세요\n\n이 `mapKeys` 함수는 `null`이나 `undefined` 처리, `iteratee` 변환 과정 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [mapKeys](../../object/mapKeys.md)를 사용하세요.\n\n:::\n\n객체의 값은 그대로 두고 키를 변환해서 새로운 객체를 만들어요.\n\n```typescript\nconst result = mapKeys(obj, iteratee);\n```\n\n## 사용법\n\n### `mapKeys(object, iteratee)`\n\n객체의 각 키를 `iteratee` 함수로 변환해서 새로운 객체를 만들어요. 값은 원래대로 유지되고 키만 변경돼요. 객체의 키를 변환하거나 정규화할 때 유용해요.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\n// 키에 접두사 추가\nconst obj = { a: 1, b: 2, c: 3 };\nconst result = mapKeys(obj, (value, key) => 'prefix_' + key);\n// 결과: { prefix_a: 1, prefix_b: 2, prefix_c: 3 }\n\n// 키를 대문자로 변환\nconst data = { name: 'John', age: 30 };\nconst uppercased = mapKeys(data, (value, key) => key.toUpperCase());\n// 결과: { NAME: 'John', AGE: 30 }\n\n// 배열 인덱스를 키로 변환\nconst arr = ['apple', 'banana', 'orange'];\nconst indexed = mapKeys(arr, (value, index) => `item_${index}`);\n// 결과: { item_0: 'apple', item_1: 'banana', item_2: 'orange' }\n\n// 키와 값을 조합해서 새로운 키 생성\nconst scores = { math: 90, science: 85, english: 92 };\nconst detailed = mapKeys(scores, (value, key) => `${key}_score_${value}`);\n// 결과: { math_score_90: 90, science_score_85: 85, english_score_92: 92 }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\nmapKeys(null, iteratee); // {}\nmapKeys(undefined, iteratee); // {}\n```\n\n#### 파라미터\n\n- `object` (`ArrayLike<T> | T | null | undefined`): 키를 변환할 객체나 배열이에요.\n- `iteratee` (`ListIteratee<T> | ObjectIteratee<T>`, 선택): 각 키를 변환할 함수예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`Record<string, T> | Record<string, T[keyof T]>`): 변환된 키를 가진 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/mapValues.md",
    "content": "# mapValues (Lodash 호환성)\n\n::: warning `es-toolkit`의 `mapValues`를 사용하세요\n\n이 `mapValues` 함수는 `null`이나 `undefined` 처리, `iteratee` 변환 과정 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [mapValues](../../object/mapValues.md)를 사용하세요.\n\n:::\n\n객체의 키는 그대로 두고 값을 변환해서 새로운 객체를 만들어요.\n\n```typescript\nconst result = mapValues(obj, iteratee);\n```\n\n## 사용법\n\n### `mapValues(object, iteratee)`\n\n객체의 각 값을 `iteratee` 함수로 변환해서 새로운 객체를 만들어요. 키는 원래대로 유지되고 값만 변경돼요. 문자열, 배열, 객체 모두 처리할 수 있어요. 데이터를 변환하거나 계산할 때 유용해요.\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\n// 객체의 값을 변환\nconst obj = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(obj, value => value * 2);\n// 결과: { a: 2, b: 4, c: 6 }\n\n// 문자열을 대문자로 변환\nconst names = { first: 'john', last: 'doe' };\nconst uppercased = mapValues(names, value => value.toUpperCase());\n// 결과: { first: 'JOHN', last: 'DOE' }\n\n// 문자열의 각 문자 변환\nconst str = 'abc';\nconst charMap = mapValues(str, char => char.toUpperCase());\n// 결과: { '0': 'A', '1': 'B', '2': 'C' }\n\n// 배열을 객체로 변환\nconst arr = [10, 20, 30];\nconst arrMap = mapValues(arr, (value, index) => value + index);\n// 결과: { '0': 10, '1': 21, '2': 32 }\n\n// 속성 경로로 값 추출\nconst users = {\n  user1: { profile: { name: 'Alice' } },\n  user2: { profile: { name: 'Bob' } },\n};\nconst userNames = mapValues(users, 'profile.name');\n// 결과: { user1: 'Alice', user2: 'Bob' }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\nmapValues(null, iteratee); // {}\nmapValues(undefined, iteratee); // {}\n```\n\n#### 파라미터\n\n- `object` (`string | T[] | T | null | undefined`): 값을 변환할 객체, 배열, 또는 문자열이에요.\n- `iteratee` (`ValueIteratee<any>`, 선택): 각 값을 변환할 함수, 속성 경로, 또는 매칭 객체예요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`Record<number, T> | { [P in keyof T]: U } | Record<string, boolean> | Record<string, any> | Partial<T>`): 변환된 값을 가진 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/merge.md",
    "content": "# merge (Lodash 호환성)\n\n::: warning `es-toolkit`의 `merge`를 사용하세요\n\n이 `merge` 함수는 내부적으로 복잡한 `mergeWith` 함수를 호출하여 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [merge](../../object/merge.ts)를 사용하세요.\n\n:::\n\n여러 객체를 깊게 병합해서 하나의 객체로 만들어요.\n\n```typescript\nconst result = merge(target, ...sources);\n```\n\n## 사용법\n\n### `merge(object, ...sources)`\n\n대상 객체에 하나 이상의 소스 객체를 깊게 병합해요. 중첩된 객체와 배열도 재귀적으로 병합돼요. 소스 객체의 속성이 `undefined`이면 대상 객체의 기존 값을 덮어쓰지 않아요. 객체 설정 병합이나 기본값 적용에 유용해요.\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\n// 기본 객체 병합\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// 결과: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// 배열 병합\nconst obj1 = { arr: [1, 2] };\nconst obj2 = { arr: [3, 4] };\nconst merged = merge(obj1, obj2);\n// 결과: { arr: [3, 4] } (배열은 교체됨)\n\n// 여러 객체 병합\nconst base = { a: 1 };\nconst ext1 = { b: 2 };\nconst ext2 = { c: 3 };\nconst ext3 = { d: 4 };\nconst combined = merge(base, ext1, ext2, ext3);\n// 결과: { a: 1, b: 2, c: 3, d: 4 }\n\n// 중첩된 객체 병합\nconst config = {\n  api: { url: 'https://api.example.com', timeout: 5000 },\n  features: { auth: true },\n};\nconst overrides = {\n  api: { timeout: 10000, retries: 3 },\n  features: { analytics: true },\n};\nconst finalConfig = merge(config, overrides);\n// 결과: {\n//   api: { url: 'https://api.example.com', timeout: 10000, retries: 3 },\n//   features: { auth: true, analytics: true }\n// }\n```\n\n대상 객체가 수정되므로 원본을 보존하려면 빈 객체를 사용하세요.\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\nconst original = { a: 1, b: { x: 1 } };\nconst source = { b: { y: 2 } };\n\n// 원본 보존\nconst result = merge({}, original, source);\n// original은 변경되지 않음\n```\n\n#### 파라미터\n\n- `object` (`any`): 병합 대상이 되는 객체예요. 이 객체가 수정돼요.\n- `...sources` (`any[]`): 병합할 소스 객체들이에요.\n\n#### 반환 값\n\n(`any`): 병합된 대상 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/mergeWith.md",
    "content": "# mergeWith (Lodash 호환성)\n\n::: warning `es-toolkit`의 `mergeWith`를 사용하세요\n\n이 `mergeWith` 함수는 복잡한 타입 체크와 순환 참조 처리, 특수 객체 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [mergeWith](../../object/mergeWith.md)를 사용하세요.\n\n:::\n\n사용자 정의 함수로 병합 방식을 제어하면서 여러 객체를 깊게 병합해요.\n\n```typescript\nconst result = mergeWith(target, ...sources, customizer);\n```\n\n## 사용법\n\n### `mergeWith(object, ...sources, customizer)`\n\n대상 객체에 하나 이상의 소스 객체를 깊게 병합하되, 커스터마이저 함수로 병합 방식을 제어해요. 커스터마이저 함수가 `undefined`를 반환하면 기본 병합 로직이 사용돼요. 배열 합치기나 특별한 병합 규칙이 필요할 때 유용해요.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\n// 숫자 더하기\nconst obj1 = { a: 1, b: 2 };\nconst obj2 = { b: 3, c: 4 };\nconst result = mergeWith(obj1, obj2, (objValue, srcValue) => {\n  if (typeof objValue === 'number' && typeof srcValue === 'number') {\n    return objValue + srcValue;\n  }\n});\n// 결과: { a: 1, b: 5, c: 4 }\n\n// 배열 합치기\nconst arr1 = { items: [1, 2] };\nconst arr2 = { items: [3, 4] };\nconst merged = mergeWith(arr1, arr2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 결과: { items: [1, 2, 3, 4] }\n\n// 문자열 연결\nconst str1 = { message: 'Hello' };\nconst str2 = { message: 'World' };\nconst combined = mergeWith(str1, str2, (objValue, srcValue, key) => {\n  if (key === 'message' && typeof objValue === 'string') {\n    return objValue + ' ' + srcValue;\n  }\n});\n// 결과: { message: 'Hello World' }\n\n// 여러 소스 객체와 커스터마이저\nconst base = { scores: [80] };\nconst quiz1 = { scores: [90] };\nconst quiz2 = { scores: [85] };\nconst final = mergeWith(base, quiz1, quiz2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 결과: { scores: [80, 90, 85] }\n```\n\n커스터마이저 함수는 다양한 매개변수를 받아요.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\nconst customizer = (objValue, srcValue, key, object, source, stack) => {\n  console.log('병합 중:', key, objValue, '->', srcValue);\n\n  // 특정 키에 대해서만 커스터마이징\n  if (key === 'specialField') {\n    return `${objValue}_${srcValue}`;\n  }\n\n  // undefined를 반환하면 기본 병합 로직 사용\n  return undefined;\n};\n```\n\n#### 파라미터\n\n- `object` (`any`): 병합 대상이 되는 객체예요. 이 객체가 수정돼요.\n- `...sources` (`any[]`): 병합할 소스 객체들이에요.\n- `customizer` (`MergeWithCustomizer`): 값 할당을 커스터마이즈하는 함수예요. `(objValue, srcValue, key, object, source, stack) => any` 형태예요.\n\n#### 반환 값\n\n(`any`): 병합된 대상 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/omit.md",
    "content": "# omit (Lodash 호환성)\n\n::: warning `es-toolkit`의 `omit`를 사용하세요\n\n이 `omit` 함수는 깊은 복사와 `unset` 함수 호출 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [omit](../../object/omit.md)를 사용하세요.\n\n:::\n\n객체에서 지정된 키들을 제외한 새로운 객체를 만들어요.\n\n```typescript\nconst result = omit(obj, ...keys);\n```\n\n## 사용법\n\n### `omit(object, ...paths)`\n\n객체에서 지정된 키들을 제외한 새로운 객체를 생성해요. 깊은 키 경로도 지원하며, 배열로 여러 키를 한 번에 지정할 수도 있어요. 객체에서 민감한 정보를 제거하거나 필요한 속성만 선택할 때 유용해요.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\n// 기본 키 제거\nconst user = { id: 1, name: 'John', email: 'john@example.com', password: 'secret' };\nconst publicUser = omit(user, 'password', 'email');\n// 결과: { id: 1, name: 'John' }\n\n// 배열로 여러 키 제거\nconst data = { a: 1, b: 2, c: 3, d: 4 };\nconst filtered = omit(data, ['a', 'c']);\n// 결과: { b: 2, d: 4 }\n\n// 깊은 키 경로 제거\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst result = omit(nested, 'user.profile.age', 'admin');\n// 결과: { user: { profile: { name: 'John' }, settings: { theme: 'dark' } } }\n\n// 중첩된 배열과 키 조합\nconst complex = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst simplified = omit(complex, 'a', ['b', 'c'], 'd.f');\n// 결과: { d: { e: 4 } }\n```\n\n배열이나 문자열, 키 경로를 자유롭게 조합할 수 있어요.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nconst config = {\n  api: { url: 'https://api.example.com', key: 'secret', timeout: 5000 },\n  ui: { theme: 'dark', language: 'en' },\n  debug: true,\n};\n\n// 여러 방식으로 키 지정\nconst cleaned = omit(config, 'api.key', ['debug'], 'ui.language');\n// 결과: { api: { url: 'https://api.example.com', timeout: 5000 }, ui: { theme: 'dark' } }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nomit(null, 'key'); // {}\nomit(undefined, 'key'); // {}\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 키를 제거할 원본 객체예요.\n- `...paths` (`Array<Many<PropertyKey>>`): 제거할 키들이에요. 단일 키, 키 배열, 또는 깊은 키 경로를 지정할 수 있어요.\n\n#### 반환 값\n\n(`Partial<T>`): 지정된 키들이 제거된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/omitBy.md",
    "content": "# omitBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 `omitBy`를 사용하세요\n\n이 `omitBy` 함수는 배열 유사 객체 체크, `iteratee` 변환, 키 변환 과정 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [omitBy](../../object/omitBy.md)를 사용하세요.\n\n:::\n\n조건 함수가 참을 반환하는 속성들을 제외한 새로운 객체를 만들어요.\n\n```typescript\nconst result = omitBy(obj, predicate);\n```\n\n## 사용법\n\n### `omitBy(object, predicate)`\n\n객체의 각 속성에 대해 조건 함수를 실행하고, 조건 함수가 참을 반환하는 속성들을 제외한 새로운 객체를 생성해요. 조건에 따라 동적으로 속성을 필터링할 때 유용해요.\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\n// 특정 타입의 값 제거\nconst data = { a: 1, b: 'remove', c: 3, d: 'keep' };\nconst numbers = omitBy(data, value => typeof value === 'string');\n// 결과: { a: 1, c: 3 }\n\n// 조건에 따른 속성 제거\nconst user = { id: 1, name: 'John', age: 0, active: false, email: '' };\nconst validData = omitBy(user, value => !value);\n// 결과: { id: 1, name: 'John' } (falsy 값들 제거)\n\n// 키 이름으로 필터링\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = omitBy(settings, (value, key) => key.startsWith('admin'));\n// 결과: { userSetting: true, debugMode: true }\n\n// 숫자 속성만 제거\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst noNumbers = omitBy(mixed, value => typeof value === 'number');\n// 결과: { str: 'hello', bool: true, obj: {} }\n\n// 배열에서도 사용 가능\nconst arr = [1, 2, 3, 4, 5];\nconst filtered = omitBy(arr, value => value % 2 === 0);\n// 결과: { '0': 1, '2': 3, '4': 5 } (짝수 인덱스의 홀수 값들)\n\n// 객체와 키, 원본 객체 모두 활용\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst passingGrades = omitBy(scores, (value, key, obj) => {\n  console.log(`${key}: ${value} (평균: ${Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length})`);\n  return value < 80;\n});\n// 결과: { math: 90, english: 85 }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\nomitBy(null, () => true); // {}\nomitBy(undefined, () => true); // {}\n```\n\n#### 파라미터\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): 필터링할 원본 객체예요.\n- `predicate` (`ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, 선택): 각 속성에 대해 실행할 조건 함수예요. 참을 반환하면 해당 속성이 제거돼요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 조건에 맞지 않는 속성들로 구성된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/pick.md",
    "content": "# pick (Lodash 호환성)\n\n::: warning `es-toolkit`의 `pick`을 사용하세요\n\n이 `pick` 함수는 복잡한 경로 처리, `get`/`set` 함수 호출, `null`/`undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [pick](../../object/pick.md)을 사용하세요.\n\n:::\n\n객체에서 지정한 속성들만 선택해서 새로운 객체를 만들어요.\n\n```typescript\nconst result = pick(obj, ...keys);\n```\n\n## 사용법\n\n### `pick(object, ...props)`\n\n객체에서 원하는 속성들만 골라서 새로운 객체를 만들고 싶을 때 `pick`을 사용하세요. 배열로 여러 키를 한번에 전달하거나, 개별 인수로 하나씩 전달할 수 있어요. 깊은 키 경로도 지원하므로 중첩된 속성도 선택할 수 있어요.\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// 결과: { a: 1, c: 3 }\n\n// 개별 인수로 전달\nconst result2 = pick(obj, 'a', 'c');\n// 결과: { a: 1, c: 3 }\n\n// 깊은 경로 선택\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst userInfo = pick(nested, 'user.profile.name', 'admin');\n// 결과: { user: { profile: { name: 'John' } }, admin: true }\n\n// 배열과 개별 키 혼합\nconst mixed = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst selected = pick(mixed, ['a', 'b'], 'c', 'd.e');\n// 결과: { a: 1, b: 2, c: 3, d: { e: 4 } }\n\n// 점 표기법 키와 실제 점이 있는 키 구분\nconst ambiguous = {\n  'a.b': 1, // 실제로 'a.b'라는 키\n  a: { b: 2, c: 3 }, // 중첩된 객체\n};\nconst dotKey = pick(ambiguous, 'a.b');\n// 결과: { 'a.b': 1 } (실제 키를 우선 선택)\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\npick(null, ['a', 'b']); // {}\npick(undefined, ['a', 'b']); // {}\n```\n\n#### 파라미터\n\n- `object` (`T | null | undefined`): 속성을 선택할 객체예요.\n- `...props` (`Array<Many<PropertyPath>>`): 선택할 속성의 키들이에요. 단일 키, 키 배열, 또는 깊은 키 경로를 지정할 수 있어요.\n\n#### 반환 값\n\n(`Pick<T, U> | Partial<T>`): 지정한 속성들만 포함하는 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/pickBy.md",
    "content": "# pickBy (Lodash 호환성)\n\n::: warning `es-toolkit`의 `pickBy`를 사용하세요\n\n이 `pickBy` 함수는 배열 유사 객체 체크, `iteratee` 변환, 키 변환 과정 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [pickBy](../../object/pickBy.md)를 사용하세요.\n\n:::\n\n조건 함수가 참을 반환하는 속성들만 선택해서 새로운 객체를 만들어요.\n\n```typescript\nconst result = pickBy(obj, predicate);\n```\n\n## 사용법\n\n### `pickBy(object, predicate)`\n\n객체의 각 속성에 대해 조건 함수를 실행하고, 조건 함수가 참을 반환하는 속성들만 포함한 새로운 객체를 생성해요. 조건에 따라 동적으로 속성을 선택할 때 유용해요.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\n// 특정 타입의 값만 선택\nconst data = { a: 1, b: 'keep', c: 3, d: 'select' };\nconst strings = pickBy(data, value => typeof value === 'string');\n// 결과: { b: 'keep', d: 'select' }\n\n// 조건에 따른 속성 선택\nconst user = { id: 1, name: 'John', age: 0, active: true, email: '' };\nconst validData = pickBy(user, value => Boolean(value));\n// 결과: { id: 1, name: 'John', active: true } (참으로 평가되는 값들만)\n\n// 키 이름으로 필터링\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = pickBy(settings, (value, key) => key.startsWith('user'));\n// 결과: { userSetting: true }\n\n// 숫자 속성만 선택\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst numbersOnly = pickBy(mixed, value => typeof value === 'number');\n// 결과: { num1: 42, num2: 0 }\n\n// 배열에서도 사용 가능\nconst arr = [1, 2, 3, 4, 5];\nconst evens = pickBy(arr, value => value % 2 === 0);\n// 결과: { '1': 2, '3': 4 } (짝수 값들의 인덱스와 값)\n\n// 객체와 키, 원본 객체 모두 활용\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst highScores = pickBy(scores, (value, key, obj) => {\n  const average = Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length;\n  return value > average;\n});\n// 결과: { math: 90, english: 85 }\n```\n\n조건 함수 없이 호출하면 참으로 평가되는 값들만 선택해요.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: '', c: 0, d: 'hello', e: null, f: true };\nconst truthyValues = pickBy(data);\n// 결과: { a: 1, d: 'hello', f: true }\n```\n\n`null`이나 `undefined`는 빈 객체로 처리해요.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\npickBy(null, () => true); // {}\npickBy(undefined, () => true); // {}\n```\n\n#### 파라미터\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): 필터링할 원본 객체예요.\n- `predicate` (`ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, 선택): 각 속성에 대해 실행할 조건 함수예요. 참을 반환하면 해당 속성이 선택돼요. 기본값은 `identity` 함수예요.\n\n#### 반환 값\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 조건에 맞는 속성들로 구성된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/property.md",
    "content": "# property (Lodash 호환성)\n\n::: warning `get` 함수를 직접 사용하세요\n\n이 `property` 함수는 내부적으로 `get` 함수를 호출하는 래퍼 함수로, 추가적인 함수 호출 오버헤드가 발생해요.\n\n대신 더 빠르고 현대적인 `get` 함수를 직접 사용하거나 옵셔널 체이닝(`?.`)을 사용하세요.\n\n:::\n\n지정된 경로의 값을 가져오는 함수를 생성해요.\n\n```typescript\nconst getter = property(path);\n```\n\n## 사용법\n\n### `property(path)`\n\n특정 경로에서 값을 가져오는 함수를 만들고 싶을 때 `property`를 사용하세요. 생성된 함수를 여러 객체에 재사용할 수 있어 배열 메서드와 함께 사용하기 편해요.\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst getName = property('name');\nconst user = { name: 'John', age: 30 };\nconst result = getName(user);\n// 결과: 'John'\n\n// 깊은 경로 접근\nconst getNestedValue = property('user.profile.name');\nconst data = { user: { profile: { name: 'Alice', age: 25 } } };\nconst nestedResult = getNestedValue(data);\n// 결과: 'Alice'\n\n// 배열 경로 사용\nconst getByArray = property(['user', 'profile', 'name']);\nconst arrayResult = getByArray(data);\n// 결과: 'Alice'\n\n// 배열 메서드와 함께 사용\nconst users = [\n  { user: { profile: { name: 'John' } } },\n  { user: { profile: { name: 'Jane' } } },\n  { user: { profile: { name: 'Bob' } } },\n];\nconst names = users.map(property('user.profile.name'));\n// 결과: ['John', 'Jane', 'Bob']\n\n// 배열 인덱스 접근\nconst getFirstItem = property('[0]');\nconst items = ['first', 'second', 'third'];\nconst firstItem = getFirstItem(items);\n// 결과: 'first'\n\n// 숫자 키 접근\nconst getIndex = property(1);\nconst arr = ['a', 'b', 'c'];\nconst secondItem = getIndex(arr);\n// 결과: 'b'\n```\n\n경로가 존재하지 않으면 `undefined`를 반환해요.\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\nconst getMissing = property('nonexistent.path');\nconst result = getMissing({ some: 'data' });\n// 결과: undefined\n```\n\n#### 파라미터\n\n- `path` (`PropertyPath`): 값을 가져올 경로예요. 문자열, 숫자, 심볼, 또는 이들의 배열이 될 수 있어요.\n\n#### 반환 값\n\n(`(object: T) => R`): 주어진 객체에서 지정된 경로의 값을 반환하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/propertyOf.md",
    "content": "# propertyOf (Lodash 호환성)\n\n::: warning `get` 함수를 직접 사용하세요\n\n이 `propertyOf` 함수는 내부적으로 `get` 함수를 호출하는 래퍼 함수로, 추가적인 함수 호출 오버헤드가 발생해요.\n\n대신 더 빠르고 현대적인 `get` 함수를 직접 사용하거나 옵셔널 체이닝(`?.`)을 사용하세요.\n\n:::\n\n특정 객체에서 다양한 경로의 값을 가져오는 함수를 생성해요.\n\n```typescript\nconst getter = propertyOf(obj);\n```\n\n## 사용법\n\n### `propertyOf(object)`\n\n하나의 객체에서 여러 경로의 값을 가져오는 함수를 만들고 싶을 때 `propertyOf`를 사용하세요. `property`와 반대로, 객체를 먼저 고정하고 다양한 경로를 쿼리할 수 있어요.\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst data = { name: 'John', age: 30, city: 'New York' };\nconst getValue = propertyOf(data);\n\nconst name = getValue('name');\n// 결과: 'John'\n\nconst age = getValue('age');\n// 결과: 30\n\n// 깊은 경로 접근\nconst complexData = {\n  user: { profile: { name: 'Alice', age: 25 } },\n  settings: { theme: 'dark', lang: 'en' },\n};\nconst getComplexValue = propertyOf(complexData);\n\nconst userName = getComplexValue('user.profile.name');\n// 결과: 'Alice'\n\nconst theme = getComplexValue('settings.theme');\n// 결과: 'dark'\n\n// 배열 경로 사용\nconst arrayPath = getComplexValue(['user', 'profile', 'age']);\n// 결과: 25\n\n// 여러 경로를 배열로 처리\nconst paths = ['user.profile.name', 'settings.theme', 'settings.lang'];\nconst values = paths.map(getComplexValue);\n// 결과: ['Alice', 'dark', 'en'] (각 경로의 값들)\n\n// 배열 인덱스 접근\nconst arrayData = [10, 20, 30];\nconst getArrayValue = propertyOf(arrayData);\nconst firstItem = getArrayValue(0);\n// 결과: 10\n\nconst secondItem = getArrayValue('[1]');\n// 결과: 20\n```\n\n경로가 존재하지 않으면 `undefined`를 반환해요.\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: 2 };\nconst getValue = propertyOf(data);\nconst missing = getValue('nonexistent.path');\n// 결과: undefined\n```\n\n#### 파라미터\n\n- `object` (`T`): 값을 가져올 대상 객체예요.\n\n#### 반환 값\n\n(`(path: PropertyPath) => any`): 주어진 경로에서 객체의 값을 반환하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/result.md",
    "content": "# result (Lodash 호환성)\n\n::: warning `get` 함수나 옵셔널 체이닝을 사용하세요\n\n이 `result` 함수는 복잡한 경로 처리와 함수 호출 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `get` 함수나 옵셔널 체이닝(`?.`)을 사용하세요.\n\n:::\n\n객체의 경로에서 값을 가져오되, 함수를 만나면 호출하고 결과를 반환해요.\n\n```typescript\nconst result = result(obj, path, defaultValue);\n```\n\n## 사용법\n\n### `result(object, path, defaultValue)`\n\n객체의 경로에서 값을 가져오는데, 경로상의 함수들을 자동으로 호출하고 싶을 때 `result`를 사용하세요. `get` 함수와 비슷하지만 함수를 만나면 실행하고, 최종 값도 함수라면 호출해서 결과를 반환해요.\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\n// 기본 사용법 (일반 값)\nconst obj = { a: { b: { c: 3 } } };\nconst value = result(obj, 'a.b.c');\n// 결과: 3\n\n// 함수 자동 호출\nconst objWithFunc = {\n  compute: () => ({ value: 42 }),\n  getValue: function () {\n    return this.compute().value;\n  },\n};\nconst computed = result(objWithFunc, 'getValue');\n// 결과: 42 (getValue 함수가 호출됨)\n\n// 경로상의 함수 호출\nconst nested = {\n  data: () => ({ user: { getName: () => 'John' } }),\n};\nconst name = result(nested, 'data.user.getName');\n// 결과: 'John' (data()와 getName() 모두 호출됨)\n\n// 기본값 사용\nconst incomplete = { a: { b: null } };\nconst withDefault = result(incomplete, 'a.b.c', 'default value');\n// 결과: 'default value'\n\n// 기본값이 함수인 경우\nconst withFuncDefault = result(incomplete, 'a.b.c', () => 'computed default');\n// 결과: 'computed default' (기본값 함수가 호출됨)\n\n// 배열 경로 사용\nconst arrayPath = result(objWithFunc, ['getValue']);\n// 결과: 42\n\n// 동적 기본값\nconst dynamic = result(incomplete, 'missing.path', function () {\n  return `Generated at ${new Date().toISOString()}`;\n});\n// 결과: 현재 시간이 포함된 문자열\n```\n\n함수 호출 시 `this` 컨텍스트가 유지돼요.\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\nconst calculator = {\n  multiplier: 2,\n  compute: function () {\n    return 10 * this.multiplier;\n  },\n};\n\nconst calculatedValue = result(calculator, 'compute');\n// 결과: 20 (this.multiplier가 올바르게 참조됨)\n```\n\n#### 파라미터\n\n- `object` (`any`): 값을 검색할 객체예요.\n- `path` (`PropertyPath`): 속성을 가져올 경로예요. 문자열, 배열, 또는 키의 배열이 될 수 있어요.\n- `defaultValue` (`R | ((...args: any[]) => R)`, 선택): 값이 `undefined`일 때 반환할 기본값이에요. 함수인 경우 호출해서 결과를 반환해요.\n\n#### 반환 값\n\n(`R`): 해결된 값을 반환해요. 경로상의 함수들이 호출되고, 최종 값도 함수라면 호출된 결과를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/set.md",
    "content": "# set (Lodash 호환성)\n\n::: warning 직접 할당을 사용하세요\n\n이 `set` 함수는 내부적으로 `updateWith` 함수를 호출하여 복잡한 경로 처리와 객체 생성 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접 할당이나 구조 분해 할당을 사용하세요.\n\n:::\n\n객체의 지정된 경로에 값을 설정해요.\n\n```typescript\nconst result = set(obj, path, value);\n```\n\n## 사용법\n\n### `set(object, path, value)`\n\n객체의 특정 경로에 값을 설정하고 싶을 때 `set`을 사용하세요. 경로의 일부가 존재하지 않으면 자동으로 생성해요. 중첩된 객체나 배열을 다룰 때 유용해요.\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst obj = { a: { b: { c: 3 } } };\nset(obj, 'a.b.c', 4);\nconsole.log(obj.a.b.c); // 4\n\n// 배열에 값 설정\nconst arr = [1, 2, 3];\nset(arr, '1', 4);\nconsole.log(arr[1]); // 4\n\n// 존재하지 않는 경로 생성\nconst empty = {};\nset(empty, 'user.profile.name', 'John');\nconsole.log(empty);\n// 결과: { user: { profile: { name: 'John' } } }\n\n// 배열 경로 사용\nconst data = {};\nset(data, ['nested', 'array', 0], 'first item');\nconsole.log(data);\n// 결과: { nested: { array: ['first item'] } }\n\n// 배열 인덱스 자동 생성\nconst list = {};\nset(list, 'items[0]', 'first');\nset(list, 'items[2]', 'third');\nconsole.log(list);\n// 결과: { items: ['first', undefined, 'third'] }\n\n// 중첩된 객체와 배열 혼합\nconst complex = {};\nset(complex, 'users[0].profile.settings.theme', 'dark');\nconsole.log(complex);\n// 결과: { users: [{ profile: { settings: { theme: 'dark' } } }] }\n\n// 숫자 키 처리\nconst numeric = {};\nset(numeric, 123, 'number key');\nconsole.log(numeric[123]); // 'number key'\n\n// 기존 값 덮어쓰기\nconst existing = { a: { b: 'old' } };\nset(existing, 'a.b', 'new');\nconsole.log(existing.a.b); // 'new'\n```\n\n원본 객체가 직접 수정되고 반환돼요.\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\nconst original = { x: 1 };\nconst result = set(original, 'y', 2);\n\nconsole.log(original === result); // true\nconsole.log(original); // { x: 1, y: 2 }\n```\n\n#### 파라미터\n\n- `object` (`T`): 값을 설정할 객체예요.\n- `path` (`PropertyPath`): 값을 설정할 속성의 경로예요. 문자열, 배열, 또는 키의 배열이 될 수 있어요.\n- `value` (`any`): 설정할 값이에요.\n\n#### 반환 값\n\n(`T`): 수정된 객체를 반환해요 (원본 객체와 동일).\n"
  },
  {
    "path": "docs/ko/reference/compat/object/setWith.md",
    "content": "# setWith (Lodash 호환성)\n\n::: warning 직접 할당을 사용하세요\n\n이 `setWith` 함수는 내부적으로 `updateWith` 함수를 호출하여 복잡한 경로 처리와 커스터마이저 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접 할당이나 구조 분해 할당을 사용하세요.\n\n:::\n\n커스터마이저 함수로 객체 생성 방식을 제어하면서 지정된 경로에 값을 설정해요.\n\n```typescript\nconst result = setWith(obj, path, value, customizer);\n```\n\n## 사용법\n\n### `setWith(object, path, value, customizer)`\n\n객체의 특정 경로에 값을 설정하되, 중간에 생성되는 객체의 타입을 커스터마이저 함수로 제어하고 싶을 때 `setWith`를 사용하세요. 커스터마이저가 `undefined`를 반환하면 기본 로직(배열 인덱스면 배열, 아니면 객체)이 사용돼요.\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\n// 기본 사용법 (커스터마이저 없음)\nconst obj1 = {};\nsetWith(obj1, 'a.b.c', 4);\nconsole.log(obj1);\n// 결과: { a: { b: { c: 4 } } }\n\n// 배열 생성을 강제하는 커스터마이저\nconst obj2 = {};\nsetWith(obj2, '[0][1]', 'value', () => []);\nconsole.log(obj2);\n// 결과: { '0': [undefined, 'value'] }\n\n// 특정 조건에서만 커스터마이징\nconst obj3 = {};\nsetWith(obj3, 'a[0].b.c', 'nested', (value, key) => {\n  // 숫자 키(배열 인덱스)일 때만 빈 객체 반환\n  return typeof key === 'string' && /^\\d+$/.test(key) ? {} : undefined;\n});\nconsole.log(obj3);\n// 결과: { a: { '0': { b: { c: 'nested' } } } }\n\n// Object 생성자를 커스터마이저로 사용\nconst obj4 = {};\nsetWith(obj4, 'x[0].y', 42, Object);\nconsole.log(obj4);\n// 결과: { x: { '0': { y: 42 } } }\n\n// 복잡한 커스터마이저 로직\nconst obj5 = {};\nsetWith(obj5, 'data.items[0].props.config', 'value', (value, key, object) => {\n  console.log('Creating:', key, 'in', object);\n\n  // 특정 키에서는 Map 사용\n  if (key === 'props') {\n    return new Map();\n  }\n\n  // 숫자 키면 배열\n  if (typeof key === 'string' && /^\\d+$/.test(key)) {\n    return [];\n  }\n\n  // 기본적으로는 일반 객체\n  return {};\n});\n\n// WeakMap을 중간 객체로 사용\nconst obj6 = {};\nsetWith(obj6, 'cache.user.profile', 'data', (value, key) => {\n  if (key === 'cache') {\n    return new WeakMap();\n  }\n  return undefined; // 기본 동작 사용\n});\n```\n\n커스터마이저 함수는 세 개의 매개변수를 받아요.\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\nconst obj = {};\nsetWith(obj, 'a.b[0].c', 'value', (nsValue, key, nsObject) => {\n  console.log('nsValue:', nsValue); // 현재 값 (보통 undefined)\n  console.log('key:', key); // 생성할 키\n  console.log('nsObject:', nsObject); // 부모 객체\n\n  // 특정 조건에 따라 다른 객체 타입 반환\n  return key === 'b' ? [] : {};\n});\n```\n\n#### 파라미터\n\n- `object` (`T`): 값을 설정할 객체예요.\n- `path` (`PropertyPath`): 값을 설정할 속성의 경로예요.\n- `value` (`any`): 설정할 값이에요.\n- `customizer` (`(nsValue: any, key: string, nsObject: T) => any`, 선택): 중간 객체 생성을 커스터마이즈하는 함수예요.\n\n#### 반환 값\n\n(`T | R`): 수정된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/toDefaulted.md",
    "content": "# toDefaulted (Lodash 호환성)\n\n::: warning 스프레드 연산자나 `Object.assign`을 사용하세요\n\n이 `toDefaulted` 함수는 깊은 복제와 복잡한 기본값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 스프레드 연산자(`...`)나 `Object.assign()`을 사용하세요.\n\n:::\n\n객체에 기본값들을 적용한 새로운 객체를 만들어요.\n\n```typescript\nconst defaulted = toDefaulted(object, ...sources);\n```\n\n## 사용법\n\n### `toDefaulted(object, ...sources)`\n\n대상 객체에 하나 이상의 소스 객체에서 기본값을 적용한 새로운 객체를 생성하고 싶을 때 `toDefaulted`를 사용하세요. `undefined`인 속성이나 `Object.prototype`에서 오는 속성들에만 기본값이 설정돼요.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\n// 기본적인 기본값 설정\nconst user = { name: 'John' };\nconst defaults = { name: 'Anonymous', age: 25, role: 'user' };\ntoDefaulted(user, defaults);\n// => { name: 'John', age: 25, role: 'user' }\n\n// 여러 소스에서 기본값 적용\nconst config = { theme: 'dark' };\nconst defaults1 = { theme: 'light', lang: 'en' };\nconst defaults2 = { lang: 'ko', region: 'Asia' };\ntoDefaulted(config, defaults1, defaults2);\n// => { theme: 'dark', lang: 'en', region: 'Asia' }\n```\n\n`undefined` 값만 기본값으로 대체하고, `null` 값은 유지해요.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst data = {\n  name: undefined,\n  age: null,\n  active: false,\n};\nconst defaults = {\n  name: 'Default',\n  age: 18,\n  active: true,\n  role: 'user',\n};\n\ntoDefaulted(data, defaults);\n// => { name: 'Default', age: null, active: false, role: 'user' }\n```\n\n원본 객체는 변경되지 않고 새로운 객체가 반환돼요.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst original = { a: 1 };\nconst result = toDefaulted(original, { a: 2, b: 3 });\n\nconsole.log(original); // { a: 1 } (변경되지 않음)\nconsole.log(result); // { a: 1, b: 3 } (새로운 객체)\n```\n\n#### 파라미터\n\n- `object` (`object`): 기본값을 적용받을 대상 객체예요.\n- `sources` (`object[]`): 기본값을 제공하는 소스 객체들이에요. 왼쪽에서 오른쪽 순서로 적용돼요.\n\n#### 반환 값\n\n(`object`): 기본값이 적용된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/toPairs.md",
    "content": "# toPairs (Lodash 호환성)\n\n::: warning `Object.entries`를 사용하세요\n\n이 `toPairs` 함수는 `Map`과 `Set` 처리, 배열형 객체 처리 등의 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.entries()`를 사용하세요.\n\n:::\n\n객체를 키-값 쌍의 배열로 변환해요.\n\n```typescript\nconst pairs = toPairs(object);\n```\n\n## 사용법\n\n### `toPairs(object)`\n\n객체의 자체 열거 가능한 속성들을 `[키, 값]` 형태의 배열로 변환하고 싶을 때 `toPairs`를 사용하세요. 상속된 속성은 포함되지 않아요.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// 기본 객체 변환\nconst object = { a: 1, b: 2, c: 3 };\ntoPairs(object);\n// => [['a', 1], ['b', 2], ['c', 3]]\n\n// 숫자 키를 가진 객체\nconst numbers = { 0: 'zero', 1: 'one', 2: 'two' };\ntoPairs(numbers);\n// => [['0', 'zero'], ['1', 'one'], ['2', 'two']]\n```\n\n`Map`과 `Set`도 처리할 수 있어요.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// Map 객체 변환\nconst map = new Map();\nmap.set('name', 'John');\nmap.set('age', 30);\ntoPairs(map);\n// => [['name', 'John'], ['age', 30]]\n\n// Set 객체 변환 (값이 키와 동일)\nconst set = new Set([1, 2, 3]);\ntoPairs(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n`null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\ntoPairs(null);\n// => []\n\ntoPairs(undefined);\n// => []\n```\n\n#### 파라미터\n\n- `object` (`object`): 변환할 객체, Map, 또는 Set이에요.\n\n#### 반환 값\n\n(`Array<[string, any]>`): 키-값 쌍들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/toPairsIn.md",
    "content": "# toPairsIn (Lodash 호환성)\n\n::: warning `Object.entries`나 `for...in` 루프를 사용하세요\n\n이 `toPairsIn` 함수는 상속된 속성 처리, `Map`과 `Set` 처리 등의 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.entries()`나 상속된 속성이 필요하면 `for...in` 루프를 사용하세요.\n\n:::\n\n객체를 키-값 쌍의 배열로 변환하되, 상속된 속성까지 포함해요.\n\n```typescript\nconst pairs = toPairsIn(object);\n```\n\n## 사용법\n\n### `toPairsIn(object)`\n\n객체의 모든 열거 가능한 속성들(상속된 속성 포함)을 `[키, 값]` 형태의 배열로 변환하고 싶을 때 `toPairsIn`을 사용하세요. `toPairs`와 달리 프로토타입 체인의 속성들도 함께 포함돼요.\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// 기본 객체 변환\nconst object = { a: 1, b: 2 };\ntoPairsIn(object);\n// => [['a', 1], ['b', 2]]\n\n// 상속된 속성도 포함\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.proto = 'property';\n\nconst child = new Parent();\nchild.own = 'own';\ntoPairsIn(child);\n// => [['inherited', 'value'], ['own', 'own'], ['proto', 'property']]\n```\n\n`Map`과 `Set`도 처리할 수 있어요.\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// Map 객체 변환\nconst map = new Map([\n  ['key1', 'value1'],\n  ['key2', 'value2'],\n]);\ntoPairsIn(map);\n// => [['key1', 'value1'], ['key2', 'value2']]\n\n// Set 객체 변환\nconst set = new Set([1, 2, 3]);\ntoPairsIn(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n#### 파라미터\n\n- `object` (`object`): 변환할 객체, Map, 또는 Set이에요.\n\n#### 반환 값\n\n(`Array<[string, any]>`): 키-값 쌍들의 배열을 반환해요(상속된 속성 포함).\n"
  },
  {
    "path": "docs/ko/reference/compat/object/transform.md",
    "content": "# transform (Lodash 호환성)\n\n::: warning `reduce`나 `Object.entries`를 사용하세요\n\n이 `transform` 함수는 복잡한 내부 로직으로 인해 느리게 동작해요. 대부분의 경우 JavaScript의 내장 메서드로 더 간단하게 구현할 수 있어요.\n\n대신 더 빠르고 현대적인 `reduce`나 `Object.entries`를 사용하세요.\n\n:::\n\n배열이나 객체를 순회하면서 누적기를 사용해 새로운 값을 만들어요.\n\n```typescript\nconst result = transform(object, iteratee, accumulator);\n```\n\n## 사용법\n\n### `transform(object, iteratee, accumulator)`\n\n배열이나 객체의 각 요소를 순회하면서 누적기에 값을 쌓아가고 싶을 때 `transform`을 사용하세요. `iteratee` 함수가 `false`를 반환하면 순회를 중단해요.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 배열을 변환해요\nconst numbers = [2, 3, 4];\nconst doubled = transform(\n  numbers,\n  (acc, value) => {\n    acc.push(value * 2);\n  },\n  []\n);\n// Returns: [4, 6, 8]\n\n// 객체를 변환해요\nconst obj = { a: 1, b: 2, c: 1 };\nconst grouped = transform(\n  obj,\n  (result, value, key) => {\n    (result[value] || (result[value] = [])).push(key);\n  },\n  {}\n);\n// Returns: { '1': ['a', 'c'], '2': ['b'] }\n```\n\n누적기를 생략하면 자동으로 빈 배열이나 빈 객체를 만들어줘요.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 배열인 경우 빈 배열이 만들어져요\nconst result1 = transform([1, 2, 3], (acc, value) => {\n  acc.push(value * 2);\n});\n// Returns: [2, 4, 6]\n\n// 객체인 경우 빈 객체가 만들어져요\nconst result2 = transform({ a: 1, b: 2 }, (acc, value, key) => {\n  acc[key] = value * 2;\n});\n// Returns: { a: 2, b: 4 }\n```\n\n`iteratee` 함수에서 `false`를 반환하면 순회를 중단할 수 있어요.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nconst result = transform(\n  numbers,\n  (acc, value) => {\n    if (value > 3) {\n      return false; // 순회 중단\n    }\n    acc.push(value * 2);\n  },\n  []\n);\n// Returns: [2, 4, 6] (4와 5는 처리되지 않음)\n```\n\n`iteratee` 함수를 생략하면 빈 객체나 빈 배열을 반환해요.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3];\nconst copy1 = transform(array);\n// Returns: []\n\nconst obj = { a: 1, b: 2 };\nconst copy2 = transform(obj);\n// Returns: {}\n```\n\n#### 파라미터\n\n- `object` (`readonly T[] | T`, 선택): 순회할 배열이나 객체예요.\n- `iteratee` (`(accumulator: U, value: T | T[keyof T], key: any, object: readonly T[] | T) => unknown`, 선택): 각 요소마다 실행할 함수예요. `false`를 반환하면 순회를 중단해요. 기본값은 `identity` 함수예요.\n- `accumulator` (`U`, 선택): 초기값이에요. 생략하면 배열은 빈 배열, 객체는 빈 객체가 만들어져요.\n\n#### 반환 값\n\n(`U | any[] | Record<string, any>`): 누적된 결과값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/unset.md",
    "content": "# unset (Lodash 호환성)\n\n::: warning `delete` 연산자를 사용하세요\n\n이 `unset` 함수는 복잡한 경로 파싱과 중첩 객체 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `delete` 연산자를 직접 사용하세요.\n\n:::\n\n객체의 지정된 경로에 있는 속성을 제거해요.\n\n```typescript\nconst success = unset(obj, path);\n```\n\n## 사용법\n\n### `unset(obj, path)`\n\n중첩된 객체에서 특정 경로의 속성을 삭제하고 싶을 때 `unset`을 사용하세요. 경로는 문자열이나 배열로 지정할 수 있어요.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\n// 문자열 경로로 중첩 속성 제거\nconst obj = { a: { b: { c: 42 } } };\nunset(obj, 'a.b.c'); // => true\nconsole.log(obj); // { a: { b: {} } }\n\n// 배열 경로로 중첩 속성 제거\nconst obj2 = { a: { b: { c: 42 } } };\nunset(obj2, ['a', 'b', 'c']); // => true\nconsole.log(obj2); // { a: { b: {} } }\n```\n\n배열 인덱스로도 요소를 제거할 수 있어요.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst arr = [1, 2, 3, 4];\nunset(arr, 1); // => true\nconsole.log(arr); // [1, undefined, 3, 4] (요소가 삭제되고 undefined가 됨)\n```\n\n속성이 존재하지 않거나 이미 삭제된 경우에도 `true`를 반환해요.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst obj = { a: { b: 1 } };\nunset(obj, 'a.c'); // => true (존재하지 않는 속성)\n```\n\n`null`이나 `undefined` 객체는 안전하게 처리돼요.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nunset(null, 'a.b'); // => true\nunset(undefined, 'a.b'); // => true\n```\n\n#### 파라미터\n\n- `obj` (`any`): 수정할 객체예요.\n- `path` (`PropertyKey | PropertyKey[]`): 제거할 속성의 경로예요.\n\n#### 반환 값\n\n(`boolean`): 속성이 삭제되면 `true`를 반환하고, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/update.md",
    "content": "# update (Lodash 호환성)\n\n::: warning 직접 할당을 사용하세요\n\n이 `update` 함수는 복잡한 경로 파싱과 중첩 객체 생성 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접 속성 할당이나 옵셔널 체이닝을 사용하세요.\n\n:::\n\n객체의 지정된 경로에 있는 값을 업데이터 함수로 수정해요.\n\n```typescript\nconst updated = update(obj, path, updater);\n```\n\n## 사용법\n\n### `update(obj, path, updater)`\n\n중첩된 객체의 특정 경로에 있는 값을 함수로 변환하고 싶을 때 `update`를 사용하세요. 경로가 존재하지 않으면 자동으로 생성돼요.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// 중첩 속성 값 변환\nconst object = { a: [{ b: { c: 3 } }] };\nupdate(object, 'a[0].b.c', n => (n as number) * 2);\n// => { a: [{ b: { c: 6 } }] }\n\n// 배열 경로로 업데이트\nupdate(object, ['a', 0, 'b', 'c'], n => (n as number) + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\n경로가 존재하지 않으면 필요한 중첩 구조를 자동으로 생성해요.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// 빈 객체에서 중첩 구조 생성\nupdate({}, 'a.b.c', () => 'hello');\n// => { a: { b: { c: 'hello' } } }\n\n// 배열도 자동 생성\nupdate({}, 'a.b[0]', () => 'value');\n// => { a: { b: ['value'] } }\n```\n\n기존 값을 기반으로 새로운 값을 계산할 수 있어요.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\nconst stats = { score: 100 };\nupdate(stats, 'score', score => score * 1.1); // 10% 증가\n// => { score: 110 }\n```\n\n#### 파라미터\n\n- `obj` (`object`): 수정할 객체예요.\n- `path` (`PropertyKey | PropertyKey[]`): 업데이트할 속성의 경로예요. 문자열이나 배열로 지정할 수 있어요.\n- `updater` (`(value: any) => any`): 기존 값을 받아서 새로운 값을 반환하는 함수예요.\n\n#### 반환 값\n\n(`any`): 수정된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/updateWith.md",
    "content": "# updateWith (Lodash 호환성)\n\n::: warning 직접 할당을 사용하세요\n\n이 `updateWith` 함수는 복잡한 경로 파싱과 커스터마이저 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접 속성 할당이나 옵셔널 체이닝을 사용하세요.\n\n:::\n\n객체의 지정된 경로에 있는 값을 업데이터 함수로 수정하되, 커스터마이저로 경로 생성을 제어해요.\n\n```typescript\nconst updated = updateWith(obj, path, updater, customizer);\n```\n\n## 사용법\n\n### `updateWith(obj, path, updater, customizer?)`\n\n`update` 함수와 비슷하지만, 경로가 존재하지 않을 때 생성되는 중간 객체의 형태를 커스터마이저 함수로 제어할 수 있어요.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\n// 기본 동작 (update와 동일)\nconst object = { a: [{ b: { c: 3 } }] };\nupdateWith(object, 'a[0].b.c', n => n * n);\n// => { a: [{ b: { c: 9 } }] }\n\n// 배열 경로로 업데이트\nupdateWith(object, ['a', 0, 'b', 'c'], n => n + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\n커스터마이저를 사용해서 생성되는 중간 객체의 형태를 제어할 수 있어요.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = {};\n\n// Object 생성자를 커스터마이저로 사용 (배열 대신 객체 생성)\nupdateWith(object, '[0][1]', () => 'a', Object);\n// => { '0': { '1': 'a' } }\n// (기본 동작이라면 { '0': ['a'] }가 됨)\n```\n\n커스터마이저는 생성할 값, 키, 객체를 인자로 받아요.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst customizer = (value: any, key: string, object: any) => {\n  // 숫자 키면 배열 대신 객체 생성\n  if (!isNaN(Number(key))) {\n    return {};\n  }\n};\n\nconst result = {};\nupdateWith(result, '[0][1]', () => 'value', customizer);\n// => { '0': { '1': 'value' } }\n```\n\n경로가 이미 존재하면 커스터마이저는 호출되지 않아요.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = { a: { b: 1 } };\nupdateWith(\n  object,\n  'a.b',\n  n => n * 2,\n  () => {\n    console.log('Not called'); // 호출되지 않음\n    return {};\n  }\n);\n// => { a: { b: 2 } }\n```\n\n#### 파라미터\n\n- `obj` (`T`): 수정할 객체예요.\n- `path` (`PropertyKey | readonly PropertyKey[]`): 업데이트할 속성의 경로예요. 문자열이나 배열로 지정할 수 있어요.\n- `updater` (`(oldValue: any) => any`): 기존 값을 받아서 새로운 값을 반환하는 함수예요.\n- `customizer` (`(value: any, key: string, object: T) => any`, 선택): 경로가 존재하지 않을 때 생성될 중간 객체를 반환하는 함수예요. `undefined`를 반환하면 기본 동작을 사용해요.\n\n#### 반환 값\n\n(`T`): 수정된 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/values.md",
    "content": "# values (Lodash 호환성)\n\n::: warning `Object.values`를 사용하세요\n\n이 `values` 함수는 단순히 `Object.values`를 호출하므로 불필요한 오버헤드가 있어요.\n\n대신 더 빠르고 현대적인 `Object.values()`를 직접 사용하세요.\n\n:::\n\n객체의 자체 열거 가능한 속성 값들을 배열로 반환해요.\n\n```typescript\nconst valueArray = values(obj);\n```\n\n## 사용법\n\n### `values(obj)`\n\n객체의 모든 속성 값을 배열로 가져올 때 `values`를 사용하세요. `Object.values`와 동일하게 동작하지만, `null`이나 `undefined`를 안전하게 처리해요.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// 객체의 값 가져오기\nconst obj = { a: 1, b: 2, c: 3 };\nvalues(obj); // => [1, 2, 3]\n\n// 숫자 키를 가진 객체\nconst numberKeyObj = { 0: 'a', 1: 'b', 2: 'c' };\nvalues(numberKeyObj); // => ['a', 'b', 'c']\n```\n\n배열이나 배열과 유사한 객체도 처리할 수 있어요.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// 배열\nvalues([1, 2, 3]); // => [1, 2, 3]\n\n// 문자열 (배열과 유사한 객체)\nvalues('hello'); // => ['h', 'e', 'l', 'l', 'o']\n```\n\n`null`이나 `undefined`는 빈 배열로 처리돼요.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nvalues(null); // => []\nvalues(undefined); // => []\n```\n\n열거 가능한 속성만 반환돼요.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nconst obj = Object.create(\n  { inherited: 'not included' },\n  {\n    own: { value: 'included', enumerable: true },\n    nonEnum: { value: 'not included', enumerable: false },\n  }\n);\n\nvalues(obj); // => ['included']\n```\n\n#### 파라미터\n\n- `obj` (`Record<PropertyKey, T> | ArrayLike<T> | null | undefined`): 속성 값들을 가져올 객체예요.\n\n#### 반환 값\n\n(`T[]`): 객체의 열거 가능한 속성 값들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/object/valuesIn.md",
    "content": "# valuesIn (Lodash 호환성)\n\n::: warning `Object.values`를 사용하세요\n\n이 `valuesIn` 함수는 프로토타입 속성까지 포함해서 처리하는 복잡한 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Object.values`를 사용하세요.\n\n:::\n\n객체의 모든 속성 값들을 배열로 반환하며, 상속된 프로토타입 속성도 포함해요.\n\n```typescript\nconst values = valuesIn(obj);\n```\n\n## 사용법\n\n### `valuesIn(object)`\n\n객체의 모든 속성 값들을 배열로 가져오고 싶을 때 `valuesIn`을 사용하세요. 일반적인 `Object.values`와는 다르게 프로토타입 체인에서 상속된 속성의 값들도 함께 포함해요.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nvaluesIn(obj); // [1, 2, 3]\n\n// 배열도 처리해요\nvaluesIn([1, 2, 3]); // [1, 2, 3]\n```\n\n프로토타입에서 상속된 속성도 포함해요.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.inherited = 'fromParent';\n\nfunction Child() {\n  Parent.call(this);\n  this.b = 2;\n}\nChild.prototype = Object.create(Parent.prototype);\nChild.prototype.childProp = 'childValue';\n\nconst obj = new Child();\nvaluesIn(obj); // [1, 2, 'childValue', 'fromParent'] (constructor 제외)\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nvaluesIn(null); // []\nvaluesIn(undefined); // []\n```\n\n#### 파라미터\n\n- `object` (`any`): 값들을 가져올 객체예요.\n\n#### 반환 값\n\n(`any[]`): 객체의 모든 속성 값들을 포함한 배열을 반환해요. 상속된 프로토타입 속성의 값들도 포함돼요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/conforms.md",
    "content": "# conforms (Lodash 호환성)\n\n조건 함수들을 가진 객체를 받아서, 다른 객체가 모든 조건을 만족하는지 확인하는 함수를 만들어요.\n\n```typescript\nconst checker = conforms(predicates);\n```\n\n## 사용법\n\n### `conforms(source)`\n\n여러 프로퍼티에 대한 조건들을 한 번에 확인할 때 `conforms`를 사용하세요. 이 함수는 검증 함수를 생성해서 나중에 여러 객체들을 검사할 때 유용해요.\n\n```typescript\nimport { conforms } from 'es-toolkit/compat';\n\n// 조건 함수들 정의\nconst isPositive = n => n > 0;\nconst isEven = n => n % 2 === 0;\nconst isString = s => typeof s === 'string';\n\n// 여러 조건을 포함한 검증 함수 생성\nconst validator = conforms({\n  a: isPositive,\n  b: isEven,\n  c: isString,\n});\n\n// 객체들 검증\nvalidator({ a: 2, b: 4, c: 'hello' }); // true (모든 조건 만족)\nvalidator({ a: -1, b: 4, c: 'hello' }); // false (a가 양수가 아님)\nvalidator({ a: 2, b: 3, c: 'hello' }); // false (b가 짝수가 아님)\nvalidator({ a: 2, b: 4, c: 123 }); // false (c가 문자열이 아님)\n\n// 배열 필터링에서 사용\nconst users = [\n  { age: 25, score: 80, name: 'Alice' },\n  { age: 17, score: 95, name: 'Bob' },\n  { age: 30, score: 75, name: 'Charlie' },\n];\n\nconst adultHighScorer = conforms({\n  age: n => n >= 18,\n  score: n => n >= 80,\n});\n\nconst filteredUsers = users.filter(adultHighScorer);\n// [{ age: 25, score: 80, name: 'Alice' }]\n```\n\n#### 파라미터\n\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): 프로퍼티별 조건 함수들을 가진 객체예요.\n\n#### 반환 값\n\n(`(object: Record<PropertyKey, any>) => boolean`): 주어진 객체가 모든 조건을 만족하는지 확인하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/conformsTo.md",
    "content": "# conformsTo (Lodash 호환성)\n\n객체가 주어진 조건 함수들을 모두 만족하는지 확인해요.\n\n```typescript\nconst result = conformsTo(target, source);\n```\n\n## 사용법\n\n### `conformsTo(target, source)`\n\n객체의 프로퍼티들이 지정된 조건들을 모두 만족하는지 확인할 때 `conformsTo`를 사용하세요. 각 프로퍼티에 대해 해당 조건 함수를 적용해서 결과를 확인해요.\n\n```typescript\nimport { conformsTo } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst object = { a: 1, b: 2 };\nconst conditions = {\n  a: n => n > 0,\n  b: n => n > 1,\n};\n\nconformsTo(object, conditions); // true (모든 조건 만족)\n\n// 다양한 조건들\nconst user = { name: 'Alice', age: 25, active: true };\nconst userValidation = {\n  name: s => typeof s === 'string' && s.length > 0,\n  age: n => typeof n === 'number' && n >= 18,\n  active: b => typeof b === 'boolean',\n};\n\nconformsTo(user, userValidation); // true\n\n// 조건을 만족하지 않는 경우\nconst invalidUser = { name: '', age: 15, active: 'yes' };\nconformsTo(invalidUser, userValidation); // false\n\n// 부분적인 조건 확인\nconst partialConditions = {\n  age: n => n >= 21,\n};\nconformsTo(user, partialConditions); // true (age만 확인)\n\n// 프로퍼티가 없는 경우\nconst incompleteObject = { a: 1 }; // b 프로퍼티 없음\nconst strictConditions = {\n  a: n => n > 0,\n  b: n => n > 0,\n};\nconformsTo(incompleteObject, strictConditions); // false (b 프로퍼티가 없음)\n```\n\n#### 파라미터\n\n- `target` (`Record<PropertyKey, any>`): 검사할 객체예요.\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): 프로퍼티별 조건 함수들을 가진 객체예요.\n\n#### 반환 값\n\n(`boolean`): 객체가 모든 조건을 만족하면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isArguments.md",
    "content": "# isArguments (Lodash 호환성)\n\n값이 arguments 객체인지 확인해요.\n\n```typescript\nconst result = isArguments(value);\n```\n\n## 사용법\n\n### `isArguments(value)`\n\n주어진 값이 함수의 arguments 객체인지 확인할 때 `isArguments`를 사용하세요. 이 함수는 TypeScript에서 타입 가드로도 작동해서, 값의 타입을 `IArguments`로 좁혀줘요.\n\n```typescript\nimport { isArguments } from 'es-toolkit/compat';\n\n// 일반 함수에서\nfunction normalFunction() {\n  return isArguments(arguments); // true\n}\n\n// 엄격 모드에서\nfunction strictFunction() {\n  'use strict';\n  return isArguments(arguments); // true\n}\n\n// arguments가 아닌 값들\nisArguments([1, 2, 3]); // false\nisArguments({ 0: 'a', 1: 'b', length: 2 }); // false\nisArguments(null); // false\nisArguments(undefined); // false\n\n// 실제 사용 예시\nfunction example() {\n  if (isArguments(arguments)) {\n    console.log('This is an arguments object');\n    console.log('Length:', arguments.length);\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 arguments 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isArray.md",
    "content": "# isArray (Lodash 호환성)\n\n::: warning `Array.isArray`를 사용하세요\n\n이 `isArray` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Array.isArray`를 사용하세요.\n\n:::\n\n값이 배열인지 확인해요.\n\n```typescript\nconst result = isArray(value);\n```\n\n## 사용법\n\n### `isArray(value)`\n\n값이 배열인지 확인하고 싶을 때 `isArray`를 사용하세요. 이 함수는 TypeScript에서 타입 가드로도 사용할 수 있어요.\n\n```typescript\nimport { isArray } from 'es-toolkit/compat';\n\n// 배열 확인\nisArray([1, 2, 3]);\n// Returns: true\n\nisArray('abc');\n// Returns: false\n\nisArray(() => {});\n// Returns: false\n\n// 객체와 구분\nisArray({ 0: 'a', 1: 'b', length: 2 });\n// Returns: false\n\nisArray(null);\n// Returns: false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 배열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is any[]`): 값이 배열이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer (Lodash 호환성)\n\n::: warning es-toolkit의 [isArrayBuffer](../../predicate/isArrayBuffer.md)를 사용하세요\n이 `isArrayBuffer` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isArrayBuffer](../../predicate/isArrayBuffer.md)를 사용하세요.\n:::\n\n값이 ArrayBuffer인지 확인해요.\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 사용법\n\n### `isArrayBuffer(value)`\n\n값이 ArrayBuffer인지 타입 안전하게 확인하고 싶을 때 `isArrayBuffer`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/compat';\n\n// ArrayBuffer 확인\nconst buffer = new ArrayBuffer(16);\nisArrayBuffer(buffer); // true\n\n// 다른 타입들은 false\nisArrayBuffer(new Array()); // false\nisArrayBuffer(new Map()); // false\nisArrayBuffer({}); // false\nisArrayBuffer('hello'); // false\nisArrayBuffer(123); // false\nisArrayBuffer(null); // false\nisArrayBuffer(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): ArrayBuffer인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is ArrayBuffer`): 값이 ArrayBuffer이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isArrayLike.md",
    "content": "# isArrayLike (Lodash 호환성)\n\n값이 배열 같은 객체인지 확인해요.\n\n```typescript\nconst result = isArrayLike(value);\n```\n\n## 사용법\n\n### `isArrayLike(value)`\n\n주어진 값이 배열 같은 객체인지 확인할 때 `isArrayLike`를 사용하세요. 배열, 문자열, arguments 객체, NodeList 등이 배열 같은 객체에 해당해요.\n\n```typescript\nimport { isArrayLike } from 'es-toolkit/compat';\n\n// 배열과 문자열\nisArrayLike([1, 2, 3]); // true\nisArrayLike('abc'); // true\nisArrayLike(''); // true\n\n// 배열 같은 객체\nisArrayLike({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLike({ length: 0 }); // true\n\n// arguments 객체\nfunction example() {\n  return isArrayLike(arguments); // true\n}\n\n// 배열이 아닌 것들\nisArrayLike({}); // false\nisArrayLike({ length: 'invalid' }); // false\nisArrayLike(null); // false\nisArrayLike(undefined); // false\nisArrayLike(() => {}); // false\nisArrayLike(123); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 배열 같은 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isArrayLikeObject.md",
    "content": "# isArrayLikeObject (Lodash 호환성)\n\n값이 원시값이 아닌 배열 같은 객체인지 확인해요.\n\n```typescript\nconst result = isArrayLikeObject(value);\n```\n\n## 사용법\n\n### `isArrayLikeObject(value)`\n\n주어진 값이 원시값이 아닌 배열 같은 객체인지 확인할 때 `isArrayLikeObject`를 사용하세요. 배열, arguments 객체, NodeList 등이 해당하지만 문자열은 원시값이므로 제외돼요.\n\n```typescript\nimport { isArrayLikeObject } from 'es-toolkit/compat';\n\n// 배열 같은 객체들 (원시값 아님)\nisArrayLikeObject([1, 2, 3]); // true\nisArrayLikeObject({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLikeObject({ length: 0 }); // true\n\n// arguments 객체\nfunction example() {\n  return isArrayLikeObject(arguments); // true\n}\n\n// NodeList나 HTMLCollection (브라우저에서)\nisArrayLikeObject(document.querySelectorAll('div')); // true\n\n// 원시값들은 false (문자열 포함)\nisArrayLikeObject('abc'); // false\nisArrayLikeObject(''); // false\nisArrayLikeObject(123); // false\nisArrayLikeObject(true); // false\n\n// 다른 객체들\nisArrayLikeObject({}); // false\nisArrayLikeObject(null); // false\nisArrayLikeObject(undefined); // false\nisArrayLikeObject(() => {}); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 원시값이 아닌 배열 같은 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isBoolean.md",
    "content": "# isBoolean (Lodash 호환성)\n\n::: warning `typeof` 연산자를 사용하세요\n이 `isBoolean` 함수는 Boolean 객체 래퍼 처리로 인해 복잡해요.\n\n대신 더 간단하고 현대적인 `typeof value === 'boolean'`을 사용하세요.\n:::\n\n값이 불린(boolean) 타입인지 확인해요.\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 사용법\n\n### `isBoolean(value)`\n\n값이 불린 타입인지 타입 안전하게 확인하고 싶을 때 `isBoolean`을 사용하세요. 원시 불린 값과 Boolean 객체 래퍼 둘 다 확인해요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/compat';\n\n// 원시 불린 값\nisBoolean(true); // true\nisBoolean(false); // true\n\n// Boolean 객체 래퍼\nisBoolean(new Boolean(true)); // true\nisBoolean(new Boolean(false)); // true\n\n// 다른 타입들은 false\nisBoolean(0); // false\nisBoolean(1); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\nisBoolean(null); // false\nisBoolean(undefined); // false\nisBoolean({}); // false\nisBoolean([]); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 불린 타입인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is boolean`): 값이 불린 타입이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isBuffer.md",
    "content": "# isBuffer (Lodash 호환성)\n\n::: warning es-toolkit의 [isBuffer](../../predicate/isBuffer.md)를 사용하세요\n이 `isBuffer` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isBuffer](../../predicate/isBuffer.md)를 사용하세요.\n:::\n\n값이 Buffer 인스턴스인지 확인해요.\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 사용법\n\n### `isBuffer(value)`\n\n값이 Buffer 인스턴스인지 타입 안전하게 확인하고 싶을 때 `isBuffer`를 사용하세요. Node.js 환경에서 Buffer 객체를 다룰 때 유용해요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/compat';\n\n// Buffer 인스턴스 확인\nconst buffer = Buffer.from('hello');\nisBuffer(buffer); // true\n\n// 다른 타입들은 false\nisBuffer('hello'); // false\nisBuffer([1, 2, 3]); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer({}); // false\nisBuffer(null); // false\nisBuffer(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Buffer 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 Buffer 인스턴스면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isDate.md",
    "content": "# isDate (Lodash 호환성)\n\n::: warning es-toolkit의 [isDate](../../predicate/isDate.md)를 사용하세요\n이 `isDate` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isDate](../../predicate/isDate.md)를 사용하세요.\n:::\n\n값이 Date 객체인지 확인해요.\n\n```typescript\nconst result = isDate(value);\n```\n\n## 사용법\n\n### `isDate(value)`\n\n값이 Date 객체인지 타입 안전하게 확인하고 싶을 때 `isDate`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isDate } from 'es-toolkit/compat';\n\n// Date 객체 확인\nconst date = new Date();\nisDate(date); // true\n\n// 유효하지 않은 Date도 Date 객체로 인식해요\nconst invalidDate = new Date('invalid');\nisDate(invalidDate); // true\n\n// 다른 타입들은 false\nisDate('2024-01-01'); // false\nisDate(1640995200000); // false\nisDate({}); // false\nisDate(null); // false\nisDate(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Date 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Date`): 값이 Date 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isElement.md",
    "content": "# isElement (Lodash 호환성)\n\n::: warning `instanceof HTMLElement`를 사용하세요\n\n이 `isElement` 함수는 구조적 검사로 인해 정확성이 떨어지고 느리게 동작해요.\n\n대신 더 정확하고 현대적인 `instanceof HTMLElement` 또는 `element.nodeType === 1` 검사를 사용하세요.\n\n:::\n\n값이 DOM 요소인지 확인해요.\n\n```typescript\nconst result = isElement(value);\n```\n\n## 사용법\n\n### `isElement(value)`\n\n주어진 값이 DOM 요소인지 확인할 때 `isElement`를 사용하세요. 이 함수는 구조적으로 확인하기 때문에 결과가 완전히 정확하지 않을 수 있어요.\n\n```typescript\nimport { isElement } from 'es-toolkit/compat';\n\n// DOM 요소들\nisElement(document.body); // true\nisElement(document.createElement('div')); // true\nisElement(document.querySelector('p')); // true (요소가 존재하는 경우)\n\n// DOM 요소가 아닌 값들\nisElement('<body>'); // false\nisElement({}); // false\nisElement(null); // false\nisElement(undefined); // false\n\n// 텍스트 노드나 다른 노드 타입들\nisElement(document.createTextNode('text')); // false\nisElement(document.createComment('comment')); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 DOM 요소로 보이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isEmpty.md",
    "content": "# isEmpty (Lodash 호환성)\n\n주어진 값이 비어 있는지 확인해요.\n\n```typescript\nconst result = isEmpty(value);\n```\n\n## 사용법\n\n### `isEmpty(value)`\n\n다양한 타입의 값이 비어 있는지 확인할 때 `isEmpty`를 사용하세요. 문자열, 배열, 객체, Map, Set 등을 모두 처리할 수 있어요.\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\n// 문자열 확인\nisEmpty(''); // true\nisEmpty('hello'); // false\n\n// 배열 확인\nisEmpty([]); // true\nisEmpty([1, 2, 3]); // false\n\n// 객체 확인\nisEmpty({}); // true\nisEmpty({ a: 1 }); // false\n\n// Map과 Set 확인\nisEmpty(new Map()); // true\nisEmpty(new Set()); // true\nisEmpty(new Map([['key', 'value']])); // false\nisEmpty(new Set([1, 2, 3])); // false\n\n// null과 undefined\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(); // true\n\n// 배열 같은 객체\nisEmpty({ 0: 'a', length: 1 }); // false\nisEmpty({ length: 0 }); // false\n```\n\n원시 값들은 모두 빈 값으로 처리돼요:\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\nisEmpty(0); // true\nisEmpty(false); // true\nisEmpty(123); // true\nisEmpty('text'); // false (문자열은 길이로 판단)\n```\n\n#### 파라미터\n\n- `value` (`unknown`, 선택): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 비어 있으면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isEqual.md",
    "content": "# isEqual (Lodash 호환성)\n\n::: warning `es-toolkit`의 [isEqual](../../predicate/isEqual.md)를 사용하세요\n이 `isEqual` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isEqual](../../predicate/isEqual.md)를 사용하세요.\n:::\n\n두 값이 같은지 깊이 비교해서 확인해요.\n\n```typescript\nconst result = isEqual(value1, value2);\n```\n\n## 사용법\n\n### `isEqual(a, b)`\n\n두 값이 같은지 깊이 비교해서 확인하고 싶을 때 `isEqual`를 사용하세요. Date, RegExp, 객체, 배열 등 복잡한 타입도 내용까지 비교해요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\n// 기본 타입 비교\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// 객체 깊이 비교\nisEqual({ a: 1, b: 2 }, { a: 1, b: 2 }); // true\nisEqual({ a: 1, b: 2 }, { b: 2, a: 1 }); // true\nisEqual({ a: 1 }, { a: 1, b: undefined }); // false\n\n// 배열 깊이 비교\nisEqual([1, 2, 3], [1, 2, 3]); // true\nisEqual([1, [2, 3]], [1, [2, 3]]); // true\n\n// Date 객체 비교\nisEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\nisEqual(new Date('2020-01-01'), new Date('2020-01-02')); // false\n\n// RegExp 객체 비교\nisEqual(/abc/g, /abc/g); // true\nisEqual(/abc/g, /abc/i); // false\n```\n\n중첩된 객체나 배열도 재귀적으로 비교해요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\nconst obj1 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nconst obj2 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nisEqual(obj1, obj2); // true\n```\n\n#### 파라미터\n\n- `a` (`unknown`): 비교할 첫 번째 값이에요.\n- `b` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 두 값이 같으면 `true`, 다르면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isEqualWith.md",
    "content": "# isEqualWith (Lodash 호환성)\n\n::: warning es-toolkit의 [isEqualWith](../../predicate/isEqualWith.md)를 사용하세요\n이 `isEqualWith` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isEqualWith](../../predicate/isEqualWith.md)를 사용하세요.\n:::\n\n사용자 정의 비교 함수를 사용해서 두 값이 같은지 확인해요.\n\n```typescript\nconst result = isEqualWith(a, b, customizer);\n```\n\n## 사용법\n\n### `isEqualWith(a, b, areValuesEqual?)`\n\n사용자 정의 비교 함수를 사용해서 두 값을 깊게 비교해요. 사용자 정의 함수가 불린 값을 반환하면 그 결과를 사용하고, `undefined`를 반환하면 기본 동등성 비교를 사용해요.\n\n사용자 정의 비교 함수는 객체, 배열, Map, Set 등의 복잡한 구조 내부의 값들을 비교할 때도 사용되어서 깊은 비교를 보장해요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\n// 대소문자 무시하는 문자열 비교\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', customizer); // true\nisEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n\n// 숫자의 절댓값으로 비교\nconst absCustomizer = (a: any, b: any) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a) === Math.abs(b);\n  }\n};\n\nisEqualWith([-1, 2], [1, -2], absCustomizer); // true\n\n// 복잡한 객체 비교\nconst obj1 = {\n  name: 'JOHN',\n  details: { age: 30, city: 'NYC' },\n};\nconst obj2 = {\n  name: 'john',\n  details: { age: 30, city: 'nyc' },\n};\n\nisEqualWith(obj1, obj2, customizer); // true\n```\n\nMap과 Set에 대해서는 특별한 처리를 해요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nconst map1 = new Map([['KEY', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqualWith(map1, map2, customizer); // true\n\nconst set1 = new Set(['HELLO']);\nconst set2 = new Set(['hello']);\nisEqualWith(set1, set2, customizer); // true\n```\n\n#### 파라미터\n\n- `a` (`any`): 비교할 첫 번째 값이에요.\n- `b` (`any`): 비교할 두 번째 값이에요.\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): 사용자 정의 비교 함수예요.\n  - `x`: 첫 번째 객체 `a`에서 온 값\n  - `y`: 두 번째 객체 `b`에서 온 값\n  - `property`: `x`와 `y`를 가져올 때 사용한 속성 키\n  - `xParent`: 첫 번째 값 `x`의 부모 객체\n  - `yParent`: 두 번째 값 `y`의 부모 객체\n  - `stack`: 순환 참조를 처리하는 내부 스택 (Map)\n\n#### 반환 값\n\n(`boolean`): 사용자 정의 함수에 따라 두 값이 같으면 `true`, 다르면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isError.md",
    "content": "# isError (Lodash 호환성)\n\n::: warning es-toolkit의 [isError](../../predicate/isError.md)를 사용하세요\n이 `isError` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isError](../../predicate/isError.md)를 사용하세요.\n:::\n\n값이 Error 객체인지 확인해요.\n\n```typescript\nconst result = isError(value);\n```\n\n## 사용법\n\n### `isError(value)`\n\n값이 Error 객체인지 타입 안전하게 확인하고 싶을 때 `isError`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isError } from 'es-toolkit/compat';\n\n// Error 객체 확인\nisError(new Error()); // true\nisError(new TypeError('Type error')); // true\nisError(new ReferenceError('Reference error')); // true\n\n// Error를 상속한 사용자 정의 에러\nclass CustomError extends Error {}\nisError(new CustomError()); // true\n\n// 다른 타입들은 false\nisError('Error'); // false\nisError({ name: 'Error', message: 'Something went wrong' }); // false\nisError({}); // false\nisError(null); // false\nisError(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Error 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Error`): 값이 Error 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isFinite.md",
    "content": "# isFinite (Lodash 호환성)\n\n::: warning `Number.isFinite`를 사용하세요\n\n이 `isFinite` 함수는 추가적인 타입 체크 오버헤드로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Number.isFinite`를 사용하세요.\n\n:::\n\n값이 유한한 숫자인지 확인해요.\n\n```typescript\nconst result = isFinite(value);\n```\n\n## 사용법\n\n### `isFinite(value)`\n\n주어진 값이 유한한 숫자인지 확인할 때 `isFinite`를 사용하세요. 이 함수는 TypeScript에서 타입 가드로도 작동해서, 값의 타입을 `number`로 좁혀줘요.\n\n```typescript\nimport { isFinite } from 'es-toolkit/compat';\n\n// 유한한 숫자들\nisFinite(100); // true\nisFinite(-50); // true\nisFinite(3.14); // true\nisFinite(0); // true\n\n// 무한대는 false\nisFinite(Infinity); // false\nisFinite(-Infinity); // false\n\n// NaN도 false\nisFinite(NaN); // false\n\n// 다른 타입들도 false\nisFinite('100'); // false\nisFinite([]); // false\nisFinite({}); // false\nisFinite(null); // false\nisFinite(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`value is number`): 값이 유한한 숫자이면 `true`, 아니면 `false`를 반환해요.  \n`true`를 반환하면 TypeScript가 `value`의 타입을 `number`로 좁혀줘요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isFunction.md",
    "content": "# isFunction (Lodash 호환성)\n\n::: warning es-toolkit의 [isFunction](../../predicate/isFunction.md)를 사용하세요\n이 `isFunction` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isFunction](../../predicate/isFunction.md)를 사용하세요.\n:::\n\n값이 함수인지 확인해요.\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 사용법\n\n### `isFunction(value)`\n\n값이 함수인지 타입 안전하게 확인하고 싶을 때 `isFunction`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isFunction } from 'es-toolkit/compat';\n\n// 일반 함수\nisFunction(function () {}); // true\nisFunction(() => {}); // true\n\n// 내장 함수와 생성자\nisFunction(Array.prototype.slice); // true\nisFunction(Proxy); // true\nisFunction(Int8Array); // true\n\n// 비동기 함수와 제너레이터 함수\nisFunction(async function () {}); // true\nisFunction(function* () {}); // true\n\n// 다른 타입들은 false\nisFunction('function'); // false\nisFunction({}); // false\nisFunction([]); // false\nisFunction(null); // false\nisFunction(undefined); // false\nisFunction(123); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 함수인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is (...args: any[]) => any`): 값이 함수이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isInteger.md",
    "content": "# isInteger (Lodash 호환성)\n\n::: warning `Number.isInteger`를 사용하세요\n\n이 `isInteger` 함수는 추가적인 타입 체크 오버헤드로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Number.isInteger`를 사용하세요.\n\n:::\n\n값이 정수인지 확인해요.\n\n```typescript\nconst result = isInteger(value);\n```\n\n## 사용법\n\n### `isInteger(value)`\n\n주어진 값이 정수인지 확인할 때 `isInteger`를 사용하세요. 이 함수는 TypeScript에서 타입 가드로도 작동해서, 값의 타입을 `number`로 좁혀줘요.\n\n```typescript\nimport { isInteger } from 'es-toolkit/compat';\n\n// 정수 값 확인\nisInteger(3); // true\nisInteger(-5); // true\nisInteger(0); // true\n\n// 소수 값은 false\nisInteger(3.14); // false\nisInteger(-2.5); // false\n\n// 무한대는 false\nisInteger(Infinity); // false\nisInteger(-Infinity); // false\n\n// 다른 타입들도 false\nisInteger('3'); // false\nisInteger([]); // false\nisInteger({}); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 정수이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isLength.md",
    "content": "# isLength (Lodash 호환성)\n\n::: warning es-toolkit의 [isLength](../../predicate/isLength.md)를 사용하세요\n이 `isLength` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isLength](../../predicate/isLength.md)를 사용하세요.\n:::\n\n값이 유효한 길이인지 확인해요.\n\n```typescript\nconst result = isLength(value);\n```\n\n## 사용법\n\n### `isLength(value)`\n\n값이 유효한 길이인지 확인하고 싶을 때 `isLength`를 사용하세요. 유효한 길이는 숫자 타입이고, 음이 아닌 정수이며, JavaScript의 최대 안전 정수(`Number.MAX_SAFE_INTEGER`) 이하여야 해요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\n// 유효한 길이들\nisLength(0); // true\nisLength(42); // true\nisLength(100); // true\nisLength(Number.MAX_SAFE_INTEGER); // true\n\n// 유효하지 않은 길이들\nisLength(-1); // false (음수)\nisLength(1.5); // false (정수가 아님)\nisLength(Number.MAX_SAFE_INTEGER + 1); // false (안전 범위 초과)\nisLength('3'); // false (문자열)\nisLength(null); // false\nisLength(undefined); // false\nisLength({}); // false\nisLength([]); // false\n```\n\n배열이나 문자열의 length 속성이 유효한지 확인할 때 유용해요.\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\nfunction validateArrayLength(arr: any[]) {\n  if (isLength(arr.length)) {\n    console.log(`배열의 길이 ${arr.length}는 유효해요`);\n    return true;\n  }\n  return false;\n}\n\nvalidateArrayLength([1, 2, 3]); // \"배열의 길이 3는 유효해요\"\n```\n\n#### 파라미터\n\n- `value` (`any`): 유효한 길이인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 유효한 길이이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isMap.md",
    "content": "# isMap (Lodash 호환성)\n\n::: warning es-toolkit의 [isMap](../../predicate/isMap.md)를 사용하세요\n\n이 `isMap` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isMap](../../predicate/isMap.md)를 사용하세요.\n\n:::\n\n값이 Map인지 확인해요.\n\n```typescript\nconst result = isMap(value);\n```\n\n## 사용법\n\n### `isMap(value)`\n\n값이 Map인지 타입 안전하게 확인하고 싶을 때 `isMap`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map 확인\nconst map = new Map();\nisMap(map); // true\n\n// 다른 타입들은 false\nisMap(new Set()); // false\nisMap(new WeakMap()); // false\nisMap({}); // false\nisMap([]); // false\nisMap('map'); // false\nisMap(123); // false\nisMap(null); // false\nisMap(undefined); // false\n```\n\nMap과 비슷한 다른 컬렉션들과도 구분해요.\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map vs Set vs WeakMap\nisMap(new Map([['key', 'value']])); // true\nisMap(new Set(['value'])); // false\nisMap(new WeakMap()); // false\n\n// Map vs 일반 객체\nisMap({}); // false\nisMap({ key: 'value' }); // false\nisMap(Object.create(null)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Map인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Map<any, any>`): 값이 Map이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isMatch.md",
    "content": "# isMatch (Lodash 호환성)\n\n객체가 다른 객체의 모양과 값에 부분적으로 일치하는지 확인해요.\n\n```typescript\nconst result = isMatch(target, source);\n```\n\n## 사용법\n\n### `isMatch(target, source)`\n\n객체나 배열이 다른 객체의 구조와 값에 부분적으로 일치하는지 확인할 때 `isMatch`를 사용하세요. 전체가 동일할 필요는 없고, source의 모든 프로퍼티가 target에 존재하고 같은 값을 가지면 되요.\n\n```typescript\nimport { isMatch } from 'es-toolkit/compat';\n\n// 객체 부분 일치\nisMatch({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }); // true (a, b가 일치)\nisMatch({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 }); // false (c가 target에 없음)\n\n// 중첩 객체\nisMatch({ user: { name: 'Alice', age: 25, city: 'Seoul' } }, { user: { name: 'Alice', age: 25 } }); // true\n\n// 배열 부분 일치 (순서 무관)\nisMatch([1, 2, 3, 4], [2, 4]); // true (2와 4가 배열에 있음)\nisMatch([1, 2, 3], [1, 2, 3]); // true (완전 일치)\nisMatch([1, 2], [1, 2, 3]); // false (3이 target에 없음)\n\n// Map 부분 일치\nconst targetMap = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\nconst sourceMap = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nisMatch(targetMap, sourceMap); // true\n\n// Set 부분 일치\nconst targetSet = new Set([1, 2, 3, 4]);\nconst sourceSet = new Set([2, 4]);\nisMatch(targetSet, sourceSet); // true\n\n// 빈 source는 항상 true\nisMatch({ a: 1 }, {}); // true\nisMatch([1, 2, 3], []); // true\n```\n\n더 직접적이고 빠른 방법들:\n\n```typescript\n// 완전 동등성 확인 (더 빠름)\nimport { isEqual } from 'es-toolkit';\n\nisEqual(obj1, obj2);\n\n// 특정 프로퍼티 확인 (더 명확함)\ntarget.a === source.a && target.b === source.b;\n\n// 객체 구조 확인\nObject.keys(source).every(key => target[key] === source[key]);\n```\n\n#### 파라미터\n\n- `target` (`unknown`): 일치하는지 확인할 객체예요.\n- `source` (`unknown`): 일치 패턴이 되는 객체예요.\n\n#### 반환 값\n\n(`boolean`): target이 source의 모양과 값에 부분적으로 일치하면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isMatchWith.md",
    "content": "# isMatchWith (Lodash 호환성)\n\n커스텀 비교 함수를 사용해서 객체가 부분적으로 일치하는지 확인해요.\n\n```typescript\nconst result = isMatchWith(target, source, customizer);\n```\n\n## 사용법\n\n### `isMatchWith(target, source, customizer)`\n\n커스텀 비교 로직이 필요할 때 `isMatchWith`를 사용하세요. 각 프로퍼티 비교에 대해 직접 제어할 수 있어요.\n\n```typescript\nimport { isMatchWith } from 'es-toolkit/compat';\n\n// 대소문자 구분 없는 문자열 비교\nconst caseInsensitiveCompare = (objVal, srcVal) => {\n  if (typeof objVal === 'string' && typeof srcVal === 'string') {\n    return objVal.toLowerCase() === srcVal.toLowerCase();\n  }\n  return undefined; // 기본 동작 사용\n};\n\nisMatchWith({ name: 'ALICE', age: 25 }, { name: 'alice' }, caseInsensitiveCompare); // true\n\n// 숫자 범위 비교\nconst rangeCompare = (objVal, srcVal, key) => {\n  if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n    return objVal >= srcVal.min && objVal <= srcVal.max;\n  }\n  return undefined;\n};\n\nisMatchWith({ name: 'John', age: 25 }, { age: { min: 18, max: 30 } }, rangeCompare); // true\n\n// 배열 길이 비교\nconst lengthCompare = (objVal, srcVal, key) => {\n  if (key === 'items' && Array.isArray(objVal) && typeof srcVal === 'number') {\n    return objVal.length === srcVal;\n  }\n  return undefined;\n};\n\nisMatchWith({ items: ['a', 'b', 'c'], count: 3 }, { items: 3 }, lengthCompare); // true\n\n// 복잡한 조건부 비교\nconst conditionalCompare = (objVal, srcVal, key, object, source) => {\n  // 특정 키에서만 특별한 로직 적용\n  if (key === 'status') {\n    return srcVal === 'active' || objVal === 'any';\n  }\n\n  // 중첩 객체에서 특별한 처리\n  if (typeof srcVal === 'object' && srcVal !== null && objVal?.special) {\n    return srcVal.id === objVal.special;\n  }\n\n  return undefined; // 기본 동작\n};\n\nisMatchWith({ user: { special: 123 }, status: 'any' }, { user: { id: 123, status: 'active' } }, conditionalCompare); // true\n```\n\n#### 파라미터\n\n- `target` (`unknown`): 일치하는지 확인할 객체예요.\n- `source` (`unknown`): 일치 패턴이 되는 객체예요.\n- `customizer` (`function`, 선택): 비교 로직을 커스터마이징하는 함수예요. `true`, `false`, 또는 `undefined`를 반환해야 해요.\n\n#### 반환 값\n\n(`boolean`): target이 source에 커스텀 로직으로 부분적으로 일치하면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isNaN.md",
    "content": "# isNaN (Lodash 호환성)\n\n::: warning `Number.isNaN`을 사용하세요\n\n이 `isNaN` 함수는 추가적인 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Number.isNaN`을 사용하세요.\n\n:::\n\n값이 `NaN`인지 확인해요.\n\n```typescript\nconst result = isNaN(value);\n```\n\n## 사용법\n\n### `isNaN(value)`\n\n값이 `NaN`인지 확인하고 싶을 때 `isNaN`을 사용하세요.\n\n```typescript\nimport { isNaN } from 'es-toolkit/compat';\n\n// NaN 확인\nisNaN(NaN);\n// Returns: true\n\nisNaN(Number.NaN);\n// Returns: true\n\n// 다른 값들\nisNaN(undefined);\n// Returns: false\n\nisNaN(null);\n// Returns: false\n\nisNaN(0);\n// Returns: false\n\nisNaN('NaN');\n// Returns: false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): NaN인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 NaN이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isNative.md",
    "content": "# isNative (Lodash 호환성)\n\n값이 JavaScript 엔진의 네이티브 함수인지 확인해요.\n\n```typescript\nconst result = isNative(value);\n```\n\n## 사용법\n\n### `isNative(value)`\n\n주어진 값이 JavaScript 엔진에서 구현된 네이티브 함수인지 확인할 때 `isNative`를 사용하세요. 브라우저나 Node.js에서 제공하는 내장 함수들을 구분할 수 있어요.\n\n```typescript\nimport { isNative } from 'es-toolkit/compat';\n\n// 네이티브 함수들\nisNative(Array.prototype.push); // true\nisNative(Object.keys); // true\nisNative(Math.max); // true\nisNative(JSON.parse); // true\nisNative(console.log); // true (브라우저/Node.js 환경에서)\n\n// 사용자 정의 함수들\nisNative(function () {}); // false\nisNative(() => {}); // false\nisNative(function customFunction() {}); // false\n\n// 라이브러리 함수들\nisNative(require('lodash').map); // false\nisNative(require('es-toolkit').chunk); // false\n\n// 함수가 아닌 값들\nisNative({}); // false\nisNative([]); // false\nisNative('function'); // false\nisNative(123); // false\nisNative(null); // false\n\n// 바인딩된 함수들\nconst boundFunction = Array.prototype.push.bind([]);\nisNative(boundFunction); // true (바인딩된 함수들은 네이티브임)\n\n// 메서드들\nconst obj = { method: Array.prototype.push };\nisNative(obj.method); // true (여전히 네이티브 함수)\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 네이티브 함수로 보이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isNil.md",
    "content": "# isNil (Lodash 호환성)\n\n::: warning es-toolkit의 [isNil](../../predicate/isNil.md)를 사용하세요\n\n이 `isNil` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isNil](../../predicate/isNil.md)를 사용하세요.\n\n:::\n\n값이 `null` 또는 `undefined`인지 확인해요.\n\n```typescript\nconst result = isNil(value);\n```\n\n## 사용법\n\n### `isNil(x)`\n\n값이 `null` 또는 `undefined`인지 타입 안전하게 확인하고 싶을 때 `isNil`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// null과 undefined는 true\nisNil(null); // true\nisNil(undefined); // true\n\n// 다른 모든 값들은 false\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil([]); // false\nisNil({}); // false\nisNil('hello'); // false\nisNil(42); // false\n```\n\n참으로 평가되지만 `null`이나 `undefined`가 아닌 값들과 구분해요.\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// 거짓으로 평가되지만 null/undefined가 아닌 값들\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil(NaN); // false\n\n// null과 undefined만 true\nisNil(null); // true\nisNil(undefined); // true\n```\n\n#### 파라미터\n\n- `x` (`any`): `null` 또는 `undefined`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`x is null | undefined`): 값이 `null` 또는 `undefined`이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isNull.md",
    "content": "# isNull (Lodash 호환성)\n\n::: warning es-toolkit의 [isNull](../../predicate/isNull.md)를 사용하세요\n\n이 `isNull` 함수는 Lodash 호환성을 위한 함수이지만, 메인 라이브러리와 같은 구현이에요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isNull](../../predicate/isNull.md)를 사용하세요.\n\n:::\n\n값이 `null`인지 확인해요.\n\n```typescript\nconst result = isNull(value);\n```\n\n## 사용법\n\n### `isNull(value)`\n\n값이 정확히 `null`인지 타입 안전하게 확인하고 싶을 때 `isNull`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\n// null만 true\nisNull(null); // true\n\n// undefined도 false\nisNull(undefined); // false\n\n// 다른 모든 값들도 false\nisNull(0); // false\nisNull(''); // false\nisNull(false); // false\nisNull([]); // false\nisNull({}); // false\nisNull('null'); // false\nisNull(NaN); // false\n```\n\n`null`과 `undefined`를 구분해서 확인할 수 있어요.\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    console.log('값이 명시적으로 null이에요');\n  } else if (value === undefined) {\n    console.log('값이 undefined에요');\n  } else {\n    console.log(`값이 있어요: ${value}`);\n  }\n}\n\nhandleValue(null); // \"값이 명시적으로 null이에요\"\nhandleValue(undefined); // \"값이 undefined에요\"\nhandleValue('hello'); // \"값이 있어요: hello\"\n```\n\n#### 파라미터\n\n- `value` (`any`): `null`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is null`): 값이 `null`이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isNumber.md",
    "content": "# isNumber (Lodash 호환성)\n\n::: warning `typeof` 연산자를 사용하세요\n\n이 `isNumber` 함수는 Number 객체 래퍼 처리로 인해 복잡해요.\n\n대신 더 간단하고 현대적인 `typeof value === 'number'`을 사용하세요.\n\n:::\n\n값이 숫자인지 확인해요.\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 사용법\n\n### `isNumber(value)`\n\n값이 숫자인지 확인하고 싶을 때 `isNumber`를 사용하세요. 이 함수는 원시 숫자와 Number 객체를 모두 숫자로 인식해요.\n\n```typescript\nimport { isNumber } from 'es-toolkit/compat';\n\n// 원시 숫자\nisNumber(123);\n// Returns: true\n\nisNumber(3.14);\n// Returns: true\n\nisNumber(NaN);\n// Returns: true\n\n// Number 객체\nisNumber(new Number(42));\n// Returns: true\n\n// 다른 타입\nisNumber('123');\n// Returns: false\n\nisNumber(true);\n// Returns: false\n\nisNumber(null);\n// Returns: false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 숫자인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is number`): 값이 숫자면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isObject.md",
    "content": "# isObject (Lodash 호환성)\n\n값이 객체인지 확인해요.\n\n```typescript\nconst result = isObject(value);\n```\n\n## 사용법\n\n### `isObject(value)`\n\n값이 객체인지 확인하고 싶을 때 `isObject`를 사용하세요. JavaScript에서는 배열, 함수, 객체, 정규식, Date 등이 모두 객체로 취급돼요.\n\n```typescript\nimport { isObject } from 'es-toolkit/compat';\n\n// 일반 객체\nisObject({});\n// Returns: true\n\n// 배열도 객체\nisObject([1, 2, 3]);\n// Returns: true\n\n// 함수도 객체\nisObject(() => {});\n// Returns: true\n\n// Date도 객체\nisObject(new Date());\n// Returns: true\n\n// null은 객체가 아님\nisObject(null);\n// Returns: false\n\n// 원시 타입은 객체가 아님\nisObject('string');\n// Returns: false\n\nisObject(123);\n// Returns: false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is object`): 값이 객체면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isObjectLike.md",
    "content": "# isObjectLike (Lodash 호환성)\n\n값이 객체 같은지 확인해요.\n\n```typescript\nconst result = isObjectLike(value);\n```\n\n## 사용법\n\n### `isObjectLike(value)`\n\n주어진 값이 객체 같은 값인지 확인할 때 `isObjectLike`를 사용하세요. 객체 같은 값은 `typeof` 연산의 결과가 `'object'`이고 `null`이 아닌 값이에요.\n\n```typescript\nimport { isObjectLike } from 'es-toolkit/compat';\n\n// 객체 같은 값들\nisObjectLike({ a: 1 }); // true\nisObjectLike([1, 2, 3]); // true\nisObjectLike(new Date()); // true\nisObjectLike(/regex/); // true\nisObjectLike(new Map()); // true\nisObjectLike(new Set()); // true\n\n// 객체 같지 않은 값들\nisObjectLike('abc'); // false\nisObjectLike(123); // false\nisObjectLike(true); // false\nisObjectLike(() => {}); // false\nisObjectLike(Symbol('sym')); // false\n\n// 특별한 경우\nisObjectLike(null); // false (null은 typeof가 'object'이지만 객체 같지 않음)\nisObjectLike(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 객체 같으면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isPlainObject.md",
    "content": "# isPlainObject (Lodash 호환성)\n\n::: warning es-toolkit의 [isPlainObject](../../predicate/isPlainObject.md)를 사용하세요\n\n이 `isPlainObject` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isPlainObject](../../predicate/isPlainObject.md)를 사용하세요.\n\n:::\n\n값이 순수 객체인지 확인해요.\n\n```typescript\nconst result = isPlainObject(object);\n```\n\n## 사용법\n\n### `isPlainObject(object)`\n\n값이 순수 객체인지 확인하고 싶을 때 `isPlainObject`를 사용하세요. 순수 객체는 `{}` 리터럴, `new Object()`, 또는 `Object.create(null)`로 생성된 객체예요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// 순수 객체들\nisPlainObject({}); // true\nisPlainObject(new Object()); // true\nisPlainObject(Object.create(null)); // true\nisPlainObject({ name: 'John', age: 30 }); // true\n\n// 순수 객체가 아닌 값들\nisPlainObject([]); // false (배열)\nisPlainObject(new Date()); // false (Date 인스턴스)\nisPlainObject(new Map()); // false (Map 인스턴스)\nisPlainObject(new Set()); // false (Set 인스턴스)\nisPlainObject(/regex/); // false (정규식)\nisPlainObject(function () {}); // false (함수)\nisPlainObject(null); // false\nisPlainObject(undefined); // false\nisPlainObject('object'); // false (문자열)\nisPlainObject(42); // false (숫자)\n```\n\n클래스 인스턴스와 순수 객체를 구분해요.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\nclass Person {\n  name: string;\n  constructor(name: string) {\n    this.name = name;\n  }\n}\n\nconst person = new Person('John');\nconst plainObj = { name: 'John' };\n\nisPlainObject(person); // false (클래스 인스턴스)\nisPlainObject(plainObj); // true (순수 객체)\n```\n\n커스텀 `Symbol.toStringTag` 속성도 올바르게 처리해요.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// 쓰기 가능한 Symbol.toStringTag\nconst obj1 = {};\nobj1[Symbol.toStringTag] = 'CustomObject';\nisPlainObject(obj1); // true\n\n// 읽기 전용 Symbol.toStringTag (내장 객체들)\nconst date = new Date();\nisPlainObject(date); // false\n```\n\n#### 파라미터\n\n- `object` (`any`): 순수 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 순수 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isRegExp.md",
    "content": "# isRegExp (Lodash 호환성)\n\n::: warning es-toolkit의 [isRegExp](../../predicate/isRegExp.md)를 사용하세요\n\n이 `isRegExp` 함수는 Lodash 호환성을 위한 함수이지만, 단순한 타입 확인이에요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isRegExp](../../predicate/isRegExp.md)를 사용하세요.\n\n:::\n\n값이 정규식인지 확인해요.\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 사용법\n\n### `isRegExp(value)`\n\n값이 정규식인지 타입 안전하게 확인하고 싶을 때 `isRegExp`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 정규식들\nisRegExp(/abc/); // true\nisRegExp(new RegExp('abc')); // true\nisRegExp(/[a-z]+/g); // true\nisRegExp(/pattern/gi); // true\n\n// 다른 타입들은 false\nisRegExp('/abc/'); // false (문자열)\nisRegExp('pattern'); // false (문자열)\nisRegExp({}); // false (객체)\nisRegExp([]); // false (배열)\nisRegExp(null); // false\nisRegExp(undefined); // false\nisRegExp(123); // false (숫자)\n```\n\n정규식 문자열과 실제 정규식 객체를 구분해요.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 정규식 vs 정규식 문자열\nisRegExp(/test/); // true\nisRegExp('/test/'); // false\nisRegExp('\\\\d+'); // false\nisRegExp('/\\\\d+/g'); // false\n\n// 다양한 정규식 플래그들\nisRegExp(/test/i); // true (대소문자 무시)\nisRegExp(/test/g); // true (전역 검색)\nisRegExp(/test/m); // true (다중행)\nisRegExp(/test/gim); // true (모든 플래그 조합)\n```\n\n동적으로 생성된 정규식도 인식해요.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// RegExp 생성자로 만든 정규식\nconst dynamicRegex = new RegExp('\\\\d{3}-\\\\d{4}', 'g');\nisRegExp(dynamicRegex); // true\n\n// 문자열을 통해 생성한 정규식\nconst pattern = 'hello';\nconst flags = 'gi';\nconst regex = new RegExp(pattern, flags);\nisRegExp(regex); // true\n```\n\n#### 파라미터\n\n- `value` (`any`): 정규식인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is RegExp`): 값이 정규식이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isSafeInteger.md",
    "content": "# isSafeInteger (Lodash 호환성)\n\n::: warning `Number.isSafeInteger`를 사용하세요\n\n이 `isSafeInteger` 함수는 추가적인 타입 체크 오버헤드로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `Number.isSafeInteger`를 사용하세요.\n\n:::\n\n값이 안전한 정수인지 확인해요.\n\n```typescript\nconst result = isSafeInteger(value);\n```\n\n## 사용법\n\n### `isSafeInteger(value)`\n\n주어진 값이 안전한 정수인지 확인할 때 `isSafeInteger`를 사용하세요. 안전한 정수는 -(2^53 - 1)과 (2^53 - 1) 사이의 정수로, JavaScript에서 정확하게 표현할 수 있는 정수예요.\n\n```typescript\nimport { isSafeInteger } from 'es-toolkit/compat';\n\n// 안전한 정수들\nisSafeInteger(3); // true\nisSafeInteger(-42); // true\nisSafeInteger(0); // true\nisSafeInteger(Number.MAX_SAFE_INTEGER); // true (9007199254740991)\nisSafeInteger(Number.MIN_SAFE_INTEGER); // true (-9007199254740991)\n\n// 안전하지 않은 정수들\nisSafeInteger(Number.MAX_SAFE_INTEGER + 1); // false\nisSafeInteger(Number.MIN_SAFE_INTEGER - 1); // false\nisSafeInteger(9007199254740992); // false\n\n// 정수가 아닌 값들\nisSafeInteger(3.14); // false\nisSafeInteger('3'); // false\nisSafeInteger(1n); // false (BigInt)\nisSafeInteger([]); // false\nisSafeInteger({}); // false\nisSafeInteger(null); // false\nisSafeInteger(undefined); // false\n\n// 무한대와 NaN\nisSafeInteger(Infinity); // false\nisSafeInteger(-Infinity); // false\nisSafeInteger(NaN); // false\n```\n\n#### 파라미터\n\n- `value` (`any`): 확인할 값이에요.\n\n#### 반환 값\n\n(`value is number`): 값이 안전한 정수이면 `true`, 아니면 `false`를 반환해요.  \n`true`를 반환할 때, TypeScript는 `value`의 타입을 `number`로 좁혀요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isSet.md",
    "content": "# isSet (Lodash 호환성)\n\n::: warning `es-toolkit`의 [isSet](../../predicate/isSet.md)를 사용하세요\n\n이 `isSet` 함수는 Lodash 호환성을 위한 함수이지만, 메인 라이브러리와 같은 구현이에요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isSet](../../predicate/isSet.md)를 사용하세요.\n\n:::\n\n값이 Set인지 확인해요.\n\n```typescript\nconst result = isSet(value);\n```\n\n## 사용법\n\n### `isSet(value)`\n\n값이 Set인지 타입 안전하게 확인하고 싶을 때 `isSet`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set 확인\nconst set = new Set();\nisSet(set); // true\n\n// 다른 타입들은 false\nisSet(new Map()); // false\nisSet(new WeakSet()); // false\nisSet([]); // false\nisSet({}); // false\nisSet('set'); // false\nisSet(123); // false\nisSet(null); // false\nisSet(undefined); // false\n```\n\nSet과 비슷한 다른 컬렉션들과도 구분해요.\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set vs Map vs WeakSet\nisSet(new Set([1, 2, 3])); // true\nisSet(new Map([['key', 'value']])); // false\nisSet(new WeakSet()); // false\n\n// Set vs 배열\nisSet(new Set([1, 2, 3])); // true\nisSet([1, 2, 3]); // false\n\n// Set vs 일반 객체\nisSet(new Set()); // true\nisSet({}); // false\nisSet(Object.create(null)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Set인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Set<any>`): 값이 Set이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isString.md",
    "content": "# isString (Lodash 호환성)\n\n::: warning `typeof` 연산자를 사용하세요\n\n이 `isString` 함수는 String 객체 래퍼 처리로 인해 복잡해요.\n\n대신 더 간단하고 현대적인 `typeof value === 'string'`을 사용하세요.\n\n:::\n\n값이 문자열인지 확인해요.\n\n```typescript\nconst result = isString(value);\n```\n\n## 사용법\n\n### `isString(value)`\n\n값이 문자열인지 타입 안전하게 확인하고 싶을 때 `isString`을 사용하세요. 원시 문자열과 String 객체 래퍼 둘 다 확인해요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// 원시 문자열\nisString('hello'); // true\nisString(''); // true\nisString('123'); // true\n\n// String 객체 래퍼\nisString(new String('hello')); // true\nisString(new String('')); // true\n\n// 다른 타입들은 false\nisString(123); // false\nisString(true); // false\nisString(null); // false\nisString(undefined); // false\nisString({}); // false\nisString([]); // false\nisString(Symbol('test')); // false\n```\n\n문자열과 비슷해 보이는 다른 타입들과 구분해요.\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// 문자열 vs 숫자\nisString('123'); // true\nisString(123); // false\n\n// 문자열 vs 불린\nisString('true'); // true\nisString(true); // false\n\n// 문자열 vs null/undefined\nisString('null'); // true\nisString(null); // false\nisString('undefined'); // true\nisString(undefined); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 문자열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is string`): 값이 문자열이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isSymbol.md",
    "content": "# isSymbol (Lodash 호환성)\n\n::: warning `typeof` 연산자를 사용하세요\n\n이 `isSymbol` 함수는 Symbol 객체 래퍼 처리로 인해 복잡해요.\n\n대신 더 간단하고 현대적인 `typeof value === 'symbol'`을 사용하세요.\n\n:::\n\n값이 심볼(symbol)인지 확인해요.\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 사용법\n\n### `isSymbol(value)`\n\n값이 심볼인지 타입 안전하게 확인하고 싶을 때 `isSymbol`을 사용하세요. 원시 심볼과 Symbol 객체 래퍼 둘 다 확인해요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// 원시 심볼\nisSymbol(Symbol('test')); // true\nisSymbol(Symbol.for('global')); // true\nisSymbol(Symbol.iterator); // true\n\n// Symbol 객체 래퍼\nisSymbol(Object(Symbol('test'))); // true\n\n// 다른 타입들은 false\nisSymbol('symbol'); // false\nisSymbol(123); // false\nisSymbol(true); // false\nisSymbol(null); // false\nisSymbol(undefined); // false\nisSymbol({}); // false\nisSymbol([]); // false\n```\n\n다양한 내장 심볼들도 올바르게 인식해요.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// 잘 알려진 심볼들\nisSymbol(Symbol.iterator); // true\nisSymbol(Symbol.asyncIterator); // true\nisSymbol(Symbol.toStringTag); // true\nisSymbol(Symbol.hasInstance); // true\nisSymbol(Symbol.toPrimitive); // true\n\n// 전역 심볼\nisSymbol(Symbol.for('myGlobalSymbol')); // true\n\n// 사용자 정의 심볼\nconst mySymbol = Symbol('mySymbol');\nisSymbol(mySymbol); // true\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 심볼인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is symbol`): 값이 심볼이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isTypedArray.md",
    "content": "# isTypedArray (Lodash 호환성)\n\n::: warning `ArrayBuffer.isView()` 또는 `instanceof` 연산자를 사용하세요\n\n이 `isTypedArray` 함수는 Lodash 호환성을 위한 함수이지만, 단순한 타입 확인이에요.\n\n대신 더 간단하고 현대적인 `ArrayBuffer.isView(value)` 또는 `value instanceof Int8Array` 등을 사용하세요.\n\n:::\n\n값이 타입 배열(TypedArray)인지 확인해요.\n\n```typescript\nconst result = isTypedArray(x);\n```\n\n## 사용법\n\n### `isTypedArray(x)`\n\n값이 타입 배열인지 확인하고 싶을 때 `isTypedArray`를 사용하세요. 타입 배열은 이진 데이터를 다루는 특수한 배열 타입이에요.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 타입 배열들\nisTypedArray(new Uint8Array([1, 2, 3])); // true\nisTypedArray(new Int16Array([1, 2, 3])); // true\nisTypedArray(new Float32Array([1.1, 2.2])); // true\nisTypedArray(new BigInt64Array([1n, 2n])); // true\n\n// 다른 타입들은 false\nisTypedArray([1, 2, 3]); // false (일반 배열)\nisTypedArray(new ArrayBuffer(16)); // false (ArrayBuffer)\nisTypedArray(new DataView(new ArrayBuffer(16))); // false (DataView)\nisTypedArray('array'); // false (문자열)\nisTypedArray({}); // false (객체)\nisTypedArray(null); // false\nisTypedArray(undefined); // false\n```\n\n다양한 종류의 타입 배열들을 모두 인식해요.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 정수 타입 배열들\nisTypedArray(new Int8Array()); // true\nisTypedArray(new Int16Array()); // true\nisTypedArray(new Int32Array()); // true\nisTypedArray(new Uint8Array()); // true\nisTypedArray(new Uint16Array()); // true\nisTypedArray(new Uint32Array()); // true\nisTypedArray(new Uint8ClampedArray()); // true\n\n// 부동소수점 타입 배열들\nisTypedArray(new Float32Array()); // true\nisTypedArray(new Float64Array()); // true\n\n// BigInt 타입 배열들\nisTypedArray(new BigInt64Array()); // true\nisTypedArray(new BigUint64Array()); // true\n```\n\n타입 배열과 비슷한 다른 객체들과 구분해요.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nconst buffer = new ArrayBuffer(16);\nconst view = new DataView(buffer);\nconst typedArray = new Uint8Array(buffer);\nconst regularArray = [1, 2, 3, 4];\n\nisTypedArray(buffer); // false (ArrayBuffer)\nisTypedArray(view); // false (DataView)\nisTypedArray(typedArray); // true (TypedArray)\nisTypedArray(regularArray); // false (일반 배열)\n```\n\n이진 데이터 처리에서 타입을 구분할 때 유용해요.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nfunction processData(data: unknown) {\n  if (isTypedArray(data)) {\n    console.log(`타입 배열 길이: ${data.length}`);\n    console.log(`바이트 길이: ${data.byteLength}`);\n    console.log(`바이트 오프셋: ${data.byteOffset}`);\n    console.log(`생성자: ${data.constructor.name}`);\n\n    // 첫 번째 값 출력\n    if (data.length > 0) {\n      console.log(`첫 번째 값: ${data[0]}`);\n    }\n  } else if (Array.isArray(data)) {\n    console.log('일반 배열이에요');\n  } else {\n    console.log('배열이 아니에요');\n  }\n}\n\nprocessData(new Uint8Array([1, 2, 3])); // 타입 배열 정보 출력\nprocessData([1, 2, 3]); // \"일반 배열이에요\"\nprocessData('not an array'); // \"배열이 아니에요\"\n```\n\n#### 파라미터\n\n- `x` (`any`): 타입 배열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 타입 배열이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isUndefined.md",
    "content": "# isUndefined (Lodash 호환성)\n\n::: warning es-toolkit의 [ isUndefined](../../predicate/isUndefined.md)를 사용하세요\n\n이 `isUndefined` 함수는 Lodash 호환성을 위한 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [isUndefined](../../predicate/isUndefined.md)를 사용하세요.\n\n:::\n\n값이 `undefined`인지 확인해요.\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 사용법\n\n### `isUndefined(x)`\n\n값이 정확히 `undefined`인지 타입 안전하게 확인하고 싶을 때 `isUndefined`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\n// undefined만 true\nisUndefined(undefined); // true\n\n// null도 false\nisUndefined(null); // false\n\n// 다른 모든 값들도 false\nisUndefined(0); // false\nisUndefined(''); // false\nisUndefined(false); // false\nisUndefined([]); // false\nisUndefined({}); // false\nisUndefined('undefined'); // false\nisUndefined(NaN); // false\n```\n\n`undefined`와 `null`을 구분해서 확인할 수 있어요.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isUndefined(value)) {\n    console.log('값이 undefined에요');\n  } else if (value === null) {\n    console.log('값이 명시적으로 null이에요');\n  } else {\n    console.log(`값이 있어요: ${value}`);\n  }\n}\n\nhandleValue(undefined); // \"값이 undefined에요\"\nhandleValue(null); // \"값이 명시적으로 null이에요\"\nhandleValue('hello'); // \"값이 있어요: hello\"\n```\n\n선언되지 않은 변수나 초기화되지 않은 속성을 확인할 때 유용해요.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nconst obj: { name?: string; age?: number } = { name: 'John' };\n\nif (isUndefined(obj.age)) {\n  console.log('나이가 설정되지 않았어요');\n  obj.age = 25; // 기본값 설정\n}\n\n// 함수 매개변수의 기본값 처리\nfunction greet(name: string, title?: string) {\n  if (isUndefined(title)) {\n    title = '님';\n  }\n  console.log(`안녕하세요, ${name}${title}!`);\n}\n\ngreet('김철수'); // \"안녕하세요, 김철수님!\"\ngreet('김철수', '선생'); // \"안녕하세요, 김철수선생!\"\n```\n\n#### 파라미터\n\n- `x` (`any`): `undefined`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`x is undefined`): 값이 `undefined`이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isWeakMap.md",
    "content": "# isWeakMap (Lodash 호환성)\n\n::: warning `instanceof` 연산자를 사용하세요\n\n이 `isWeakMap` 함수는 Lodash 호환성을 위한 함수이지만, 단순한 타입 확인이에요.\n\n대신 더 간단하고 현대적인 `value instanceof WeakMap`을 사용하세요.\n\n:::\n\n값이 WeakMap인지 확인해요.\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 사용법\n\n### `isWeakMap(value)`\n\n값이 WeakMap인지 타입 안전하게 확인하고 싶을 때 `isWeakMap`을 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap 확인\nconst weakMap = new WeakMap();\nisWeakMap(weakMap); // true\n\n// 다른 타입들은 false\nisWeakMap(new Map()); // false\nisWeakMap(new Set()); // false\nisWeakMap(new WeakSet()); // false\nisWeakMap({}); // false\nisWeakMap([]); // false\nisWeakMap('weakmap'); // false\nisWeakMap(123); // false\nisWeakMap(null); // false\nisWeakMap(undefined); // false\n```\n\nWeakMap과 비슷한 다른 컬렉션들과도 구분해요.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap vs Map\nconst obj = {};\nconst weakMap = new WeakMap([[obj, 'value']]);\nconst map = new Map([[obj, 'value']]);\n\nisWeakMap(weakMap); // true\nisWeakMap(map); // false\n\n// WeakMap vs WeakSet\nisWeakMap(new WeakMap()); // true\nisWeakMap(new WeakSet()); // false\n\n// WeakMap vs 일반 객체\nisWeakMap(new WeakMap()); // true\nisWeakMap({}); // false\n```\n\nWeakMap의 특별한 속성들을 활용할 때 유용해요.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\nfunction setupWeakReference(collection: unknown, key: object, value: any) {\n  if (isWeakMap(collection)) {\n    // WeakMap은 객체만 키로 사용할 수 있고, 약한 참조를 유지해요\n    collection.set(key, value);\n    console.log('WeakMap에 약한 참조로 저장했어요');\n\n    // WeakMap은 크기를 알 수 없어요\n    console.log('WeakMap은 크기 정보가 없어요');\n  } else {\n    console.log('WeakMap이 아니에요');\n  }\n}\n\nconst weakMap = new WeakMap();\nconst regularMap = new Map();\nconst obj = { id: 1 };\n\nsetupWeakReference(weakMap, obj, 'data'); // \"WeakMap에 약한 참조로 저장했어요\"\nsetupWeakReference(regularMap, obj, 'data'); // \"WeakMap이 아니에요\"\n```\n\n#### 파라미터\n\n- `value` (`unknown`): WeakMap인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is WeakMap<object, any>`): 값이 WeakMap이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/isWeakSet.md",
    "content": "# isWeakSet (Lodash 호환성)\n\n::: warning `instanceof` 연산자를 사용하세요\n\n이 `isWeakSet` 함수는 Lodash 호환성을 위한 함수이지만, 단순한 타입 확인이에요.\n\n대신 더 간단하고 현대적인 `value instanceof WeakSet`를 사용하세요.\n\n:::\n\n값이 WeakSet인지 확인해요.\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 사용법\n\n### `isWeakSet(value)`\n\n값이 WeakSet인지 타입 안전하게 확인하고 싶을 때 `isWeakSet`를 사용하세요. TypeScript에서 타입 가드로도 동작해요.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet 확인\nconst weakSet = new WeakSet();\nisWeakSet(weakSet); // true\n\n// 다른 타입들은 false\nisWeakSet(new Set()); // false\nisWeakSet(new Map()); // false\nisWeakSet(new WeakMap()); // false\nisWeakSet([]); // false\nisWeakSet({}); // false\nisWeakSet('weakset'); // false\nisWeakSet(123); // false\nisWeakSet(null); // false\nisWeakSet(undefined); // false\n```\n\nWeakSet과 비슷한 다른 컬렉션들과도 구분해요.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet vs Set\nconst obj = {};\nconst weakSet = new WeakSet([obj]);\nconst set = new Set([obj]);\n\nisWeakSet(weakSet); // true\nisWeakSet(set); // false\n\n// WeakSet vs WeakMap\nisWeakSet(new WeakSet()); // true\nisWeakSet(new WeakMap()); // false\n\n// WeakSet vs 배열\nisWeakSet(new WeakSet()); // true\nisWeakSet([]); // false\n```\n\nWeakSet의 특별한 속성들을 활용할 때 유용해요.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\nfunction addWeakReference(collection: unknown, item: object) {\n  if (isWeakSet(collection)) {\n    // WeakSet은 객체만 저장할 수 있고, 약한 참조를 유지해요\n    collection.add(item);\n    console.log('WeakSet에 약한 참조로 저장했어요');\n\n    // WeakSet은 크기를 알 수 없고 순회할 수 없어요\n    console.log('WeakSet은 크기 정보가 없고 순회할 수 없어요');\n  } else {\n    console.log('WeakSet이 아니에요');\n  }\n}\n\nconst weakSet = new WeakSet();\nconst regularSet = new Set();\nconst obj = { id: 1 };\n\naddWeakReference(weakSet, obj); // \"WeakSet에 약한 참조로 저장했어요\"\naddWeakReference(regularSet, obj); // \"WeakSet이 아니에요\"\n```\n\n메모리 누수 방지를 위한 객체 추적에 유용해요.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// DOM 요소 추적 예시\nfunction trackDOMElement(tracker: unknown, element: Element) {\n  if (isWeakSet(tracker)) {\n    // DOM 요소가 제거되면 WeakSet에서도 자동으로 제거돼요\n    tracker.add(element);\n    console.log('DOM 요소를 추적하기 시작했어요');\n\n    // 나중에 추적 여부 확인\n    if (tracker.has(element)) {\n      console.log('이 요소는 추적 중이에요');\n    }\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): WeakSet인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is WeakSet<object>`): 값이 WeakSet이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/matches.md",
    "content": "# matches (Lodash 호환성)\n\n주어진 패턴과 부분적으로 일치하는지 확인하는 함수를 만들어요.\n\n```typescript\nconst matcher = matches(pattern);\n```\n\n## 사용법\n\n### `matches(source)`\n\n객체나 배열의 구조와 값이 특정 패턴과 일치하는지 확인하는 함수를 만들 때 `matches`를 사용하세요. 배열 필터링이나 객체 검색에서 유용해요.\n\n```typescript\nimport { matches } from 'es-toolkit/compat';\n\n// 객체 패턴 매칭\nconst userMatcher = matches({ age: 25, department: 'Engineering' });\n\nconst users = [\n  { name: 'Alice', age: 25, department: 'Engineering' },\n  { name: 'Bob', age: 30, department: 'Marketing' },\n  { name: 'Charlie', age: 25, department: 'Engineering' },\n];\n\nconst engineeringUsers = users.filter(userMatcher);\n// [{ name: 'Alice', age: 25, department: 'Engineering' },\n//  { name: 'Charlie', age: 25, department: 'Engineering' }]\n\n// 중첩된 객체 패턴\nconst profileMatcher = matches({\n  profile: { city: 'Seoul', verified: true },\n});\n\nconst profiles = [\n  { name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } },\n  { name: 'Lee', profile: { city: 'Busan', verified: true } },\n  { name: 'Park', profile: { city: 'Seoul', verified: false } },\n];\n\nconst seoulVerifiedUsers = profiles.filter(profileMatcher);\n// [{ name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } }]\n\n// 배열 패턴 매칭\nconst arrayMatcher = matches([2, 4]);\nconst arrays = [\n  [1, 2, 3, 4, 5],\n  [2, 4, 6],\n  [1, 3, 5],\n];\nconst matchingArrays = arrays.filter(arrayMatcher);\n// [[1, 2, 3, 4, 5], [2, 4, 6]]\n\n// 빈 패턴은 모든 값과 매치\nconst emptyMatcher = matches({});\nemptyMatcher({ anything: 'value' }); // true\nemptyMatcher([]); // true\nemptyMatcher(null); // true\n```\n\n#### 파라미터\n\n- `source` (`unknown`): 일치 패턴이 되는 객체나 값이에요.\n\n#### 반환 값\n\n(`(target: unknown) => boolean`): 주어진 값이 패턴과 부분적으로 일치하는지 확인하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/predicate/matchesProperty.md",
    "content": "# matchesProperty (Lodash 호환성)\n\n특정 프로퍼티가 주어진 값과 일치하는지 확인하는 함수를 만들어요.\n\n```typescript\nconst checker = matchesProperty(path, value);\n```\n\n## 사용법\n\n### `matchesProperty(property, source)`\n\n객체의 특정 프로퍼티가 주어진 값과 일치하는지 확인하는 함수를 만들 때 `matchesProperty`를 사용하세요. 배열 필터링이나 객체 검색에서 유용해요.\n\n```typescript\nimport { matchesProperty } from 'es-toolkit/compat';\n\n// 단순 프로퍼티 확인\nconst checkName = matchesProperty('name', 'Alice');\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Alice', age: 35 },\n];\n\nconst aliceUsers = users.filter(checkName);\n// [{ name: 'Alice', age: 25 }, { name: 'Alice', age: 35 }]\n\n// 중첩된 프로퍼티 확인 (배열 경로)\nconst checkCity = matchesProperty(['address', 'city'], 'Seoul');\n\nconst profiles = [\n  { name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n  { name: 'Lee', address: { city: 'Busan', district: 'Haeundae' } },\n  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } },\n];\n\nconst seoulUsers = profiles.filter(checkCity);\n// [{ name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n//  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } }]\n\n// 깊은 경로를 문자열로 표현\nconst checkScore = matchesProperty('stats.game.score', 100);\n\nconst players = [\n  { name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n  { name: 'Player2', stats: { game: { score: 95, level: 4 } } },\n  { name: 'Player3', stats: { game: { score: 100, level: 6 } } },\n];\n\nconst perfectScorers = players.filter(checkScore);\n// [{ name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n//  { name: 'Player3', stats: { game: { score: 100, level: 6 } } }]\n\n// 복잡한 객체와 매칭\nconst checkRole = matchesProperty('role', { type: 'admin', permissions: ['read', 'write'] });\n\nconst accounts = [\n  { user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n  { user: 'Bob', role: { type: 'user', permissions: ['read'] } },\n  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } },\n];\n\nconst admins = accounts.filter(checkRole);\n// [{ user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n//  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } }]\n```\n\n#### 파라미터\n\n- `property` (`PropertyKey | PropertyKey[]`): 확인할 프로퍼티의 경로예요. 문자열, 배열, 또는 점으로 구분된 경로를 사용할 수 있어요.\n- `source` (`unknown`): 프로퍼티 값과 비교할 값이에요.\n\n#### 반환 값\n\n(`(target: unknown) => boolean`): 주어진 객체의 프로퍼티가 값과 일치하는지 확인하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/camelCase.md",
    "content": "# camelCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `camelCase`를 사용하세요\n\n이 `camelCase` 함수는 문자열이 아닌 입력값 처리와 축약 아포스트로피 제거 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [camelCase](../../string/camelCase.md)를 사용하세요.\n\n:::\n\n문자열을 카멜 케이스로 변환해요.\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 사용법\n\n### `camelCase(str)`\n\n문자열을 카멜 케이스로 변환해요. 카멜 케이스는 첫 번째 단어는 소문자로 시작하고, 이후 단어들의 첫 글자는 대문자로 하여 공백 없이 연결하는 명명 규칙이에요.\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase('camelCase'); // 'camelCase'\ncamelCase('some whitespace'); // 'someWhitespace'\ncamelCase('hyphen-text'); // 'hyphenText'\ncamelCase('HTTPRequest'); // 'httpRequest'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase(123); // '123'\ncamelCase(null); // ''\ncamelCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string | object`, 선택): 카멜 케이스로 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 카멜 케이스로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/capitalize.md",
    "content": "# capitalize (Lodash 호환성)\n\n::: warning `es-toolkit`의 `capitalize`를 사용하세요\n\n이 `capitalize` 함수는 문자열이 아닌 입력값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [capitalize](../../string/capitalize.md)를 사용하세요.\n\n:::\n\n문자열의 첫 글자를 대문자로, 나머지 글자는 소문자로 변환해요.\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 사용법\n\n### `capitalize(str)`\n\n문자열의 첫 글자를 대문자로, 나머지 글자는 소문자로 변환해요. 단어의 첫 인상을 좋게 하거나 제목 형태로 만들 때 유용해요.\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize('fred'); // 'Fred'\ncapitalize('FRED'); // 'Fred'\ncapitalize('fRED'); // 'Fred'\n```\n\n빈 문자열이나 문자열이 아닌 값도 처리할 수 있어요.\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize(''); // ''\ncapitalize(123); // '123'\ncapitalize(null); // ''\ncapitalize(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 첫 글자를 대문자로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 글자가 대문자이고 나머지가 소문자인 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/deburr.md",
    "content": "# deburr (Lodash 호환성)\n\n::: warning `es-toolkit`의 `deburr`를 사용하세요\n\n이 `deburr` 함수는 문자열이 아닌 입력값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [deburr](../../string/deburr.md)를 사용하세요.\n\n:::\n\n문자열에서 특수 문자와 발음 구별 기호를 ASCII 문자로 변환해요.\n\n```typescript\nconst result = deburr(str);\n```\n\n## 사용법\n\n### `deburr(str)`\n\n문자열에서 특수 문자와 발음 구별 기호를 ASCII 문자로 변환해요. 다국어 텍스트를 검색이나 정렬에 사용하기 쉽게 만들 때 유용해요.\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr('Æthelred'); // 'Aethelred'\ndeburr('München'); // 'Munchen'\ndeburr('Crème brûlée'); // 'Creme brulee'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr(123); // '123'\ndeburr(null); // ''\ndeburr(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 특수 문자를 제거할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 특수 문자와 발음 구별 기호가 ASCII 문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/endsWith.md",
    "content": "# endsWith (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.endsWith`를 사용하세요\n\n이 `endsWith` 함수는 `null`이나 `undefined` 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.endsWith`를 사용하세요.\n\n:::\n\n문자열이 지정된 문자열로 끝나는지 확인해요.\n\n```typescript\nconst result = endsWith(str, target);\n```\n\n## 사용법\n\n### `endsWith(str, target, position?)`\n\n문자열이 특정 문자열로 끝나는지 확인하고 싶을 때 `endsWith`를 사용하세요. 검색할 위치도 지정할 수 있어요.\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\n// 문자열 끝 확인\nendsWith('fooBar', 'Bar');\n// Returns: true\n\nendsWith('fooBar', 'foo');\n// Returns: false\n\n// 특정 위치까지만 확인\nendsWith('fooBar', 'foo', 3);\n// Returns: true (처음 3글자 'foo'에서 'foo'로 끝나는지 확인)\n```\n\n`null`이나 `undefined`는 `false`를 반환해요.\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\nendsWith(null, 'test');\n// Returns: false\n\nendsWith('test', null);\n// Returns: false\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 확인할 문자열이에요.\n- `target` (`string`, 선택): 끝에 있는지 찾을 문자열이에요.\n- `position` (`number`, 선택): 검색을 끝낼 위치예요. 기본값은 문자열 전체 길이예요.\n\n#### 반환 값\n\n(`boolean`): 문자열이 지정된 문자열로 끝나면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/escape.md",
    "content": "# escape (Lodash 호환성)\n\n::: warning `es-toolkit`의 `escape`를 사용하세요\n\n이 `escape` 함수는 문자열이 아닌 입력값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [escape](../../string/escape.md)를 사용하세요.\n\n:::\n\n문자열에서 HTML 특수 문자를 HTML 엔티티로 변환해요.\n\n```typescript\nconst result = escape(str);\n```\n\n## 사용법\n\n### `escape(str)`\n\n문자열에서 `&`, `<`, `>`, `\"`, `'` 문자를 해당하는 HTML 엔티티로 변환해요. HTML 문서에 텍스트를 안전하게 삽입할 때 XSS 공격을 방지하는 데 유용해요.\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape('This is a <div> element.'); // 'This is a &lt;div&gt; element.'\nescape('This is a \"quote\"'); // 'This is a &quot;quote&quot;'\nescape(\"This is a 'quote'\"); // 'This is a &#39;quote&#39;'\nescape('This is a & symbol'); // 'This is a &amp; symbol'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape(123); // '123'\nescape(null); // ''\nescape(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): HTML 특수 문자를 이스케이프할 문자열이에요.\n\n#### 반환 값\n\n(`string`): HTML 특수 문자가 엔티티로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/escapeRegExp.md",
    "content": "# escapeRegExp (Lodash 호환성)\n\n::: warning `es-toolkit`의 `escapeRegExp`를 사용하세요\n\n이 `escapeRegExp` 함수는 문자열이 아닌 입력값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [escapeRegExp](../../string/escapeRegExp.md)를 사용하세요.\n\n:::\n\n문자열에서 정규 표현식 특수 문자를 이스케이프해요.\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 사용법\n\n### `escapeRegExp(str)`\n\n문자열에서 정규 표현식 특수 문자 `^`, `$`, `\\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, `|`를 이스케이프해요. 동적으로 정규 표현식을 생성할 때 문자열을 문자 그대로 처리하고 싶을 때 유용해요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp('[es-toolkit](https://es-toolkit.dev/)');\n// '\\\\[es-toolkit\\\\]\\\\(https://es-toolkit\\\\.dev/\\\\)'\n\nescapeRegExp('$^{}.+*?()[]|\\\\');\n// '\\\\$\\\\^\\\\{\\\\}\\\\.\\\\+\\\\*\\\\?\\\\(\\\\)\\\\[\\\\]\\\\|\\\\\\\\'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp(123); // '123'\nescapeRegExp(null); // ''\nescapeRegExp(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 정규 표현식 특수 문자를 이스케이프할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 정규 표현식 특수 문자가 이스케이프된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/kebabCase.md",
    "content": "# kebabCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `kebabCase`를 사용하세요\n\n이 `kebabCase` 함수는 문자열이 아닌 입력값 처리와 축약 아포스트로피 제거 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [kebabCase](../../string/kebabCase.md)를 사용하세요.\n\n:::\n\n문자열을 케밥 케이스로 변환해요.\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 사용법\n\n### `kebabCase(str)`\n\n문자열을 케밥 케이스로 변환해요. 케밥 케이스는 각 단어를 소문자로 쓰고 대시(-) 문자로 연결하는 명명 규칙이에요. URL이나 CSS 클래스 이름에서 주로 사용돼요.\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase('camelCase'); // 'camel-case'\nkebabCase('some whitespace'); // 'some-whitespace'\nkebabCase('hyphen-text'); // 'hyphen-text'\nkebabCase('HTTPRequest'); // 'http-request'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase(123); // '123'\nkebabCase(null); // ''\nkebabCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string | object`, 선택): 케밥 케이스로 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 케밥 케이스로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/lowerCase.md",
    "content": "# lowerCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `lowerCase`를 사용하세요\n\n이 `lowerCase` 함수는 문자열이 아닌 입력값 처리와 축약 아포스트로피 제거 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [lowerCase](../../string/lowerCase.md)를 사용하세요.\n\n:::\n\n문자열을 소문자로 된 단어들을 공백으로 분리한 형태로 변환해요.\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 사용법\n\n### `lowerCase(str)`\n\n문자열을 소문자로 된 단어들을 공백으로 분리한 형태로 변환해요. 각 단어는 소문자로 변환되고 공백 문자로 연결돼요. 사람이 읽기 쉬운 텍스트 형태로 만들 때 유용해요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase('camelCase'); // 'camel case'\nlowerCase('some whitespace'); // 'some whitespace'\nlowerCase('hyphen-text'); // 'hyphen text'\nlowerCase('HTTPRequest'); // 'http request'\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase(123); // '123'\nlowerCase(null); // ''\nlowerCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string | object`, 선택): 소문자 형태로 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 소문자로 된 단어들이 공백으로 분리된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/lowerFirst.md",
    "content": "# lowerFirst (Lodash 호환성)\n\n::: warning `es-toolkit`의 `lowerFirst`를 사용하세요\n\n이 `lowerFirst` 함수는 문자열이 아닌 입력값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [lowerFirst](../../string/lowerFirst.md)를 사용하세요.\n\n:::\n\n문자열의 첫 글자를 소문자로 변환해요.\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 사용법\n\n### `lowerFirst(str)`\n\n문자열의 첫 글자를 소문자로 변환해요. 나머지 글자들은 그대로 유지돼요. 변수명을 camelCase로 만들거나 첫 글자만 소문자로 바꾸고 싶을 때 유용해요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst('fred'); // 'fred'\nlowerFirst('Fred'); // 'fred'\nlowerFirst('FRED'); // 'fRED'\nlowerFirst(''); // ''\n```\n\n문자열이 아닌 값도 문자열로 변환해서 처리해요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst(123); // '123'\nlowerFirst(null); // ''\nlowerFirst(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 첫 글자를 소문자로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 글자가 소문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/pad.md",
    "content": "# pad (Lodash 호환성)\n\n::: warning `es-toolkit`의 `pad`를 사용하세요\n\n이 `pad` 함수는 `null`이나 `undefined` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [pad](../../string/pad.md)를 사용하세요.\n\n:::\n\n문자열의 앞뒤로 패딩 문자를 추가해서 지정된 길이만큼 맞춰요.\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 사용법\n\n### `pad(str, length, chars)`\n\n문자열이 원하는 길이보다 짧을 때 앞뒤로 패딩 문자를 추가해서 길이를 맞추고 싶을 때 `pad`를 사용하세요. 패딩 문자가 균등하게 나누어 떨어지지 않으면, 추가 문자는 오른쪽에 배치돼요.\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\n// 기본 공백으로 패딩\npad('abc', 8);\n// Returns: '  abc   '\n\n// 지정된 문자로 패딩\npad('abc', 8, '_-');\n// Returns: '_-abc_-_'\n\n// 이미 충분한 길이이면 그대로 반환\npad('abc', 3);\n// Returns: 'abc'\n\n// 길이가 더 짧으면 그대로 반환\npad('abc', 2);\n// Returns: 'abc'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\npad(null, 5); // '     '\npad(undefined, 3, '*'); // '***'\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 패딩할 문자열이에요.\n- `length` (`number`, 선택): 목표 길이예요. 기본값은 `0`이에요.\n- `chars` (`string`, 선택): 패딩에 사용할 문자들이에요. 기본값은 공백 `' '`이에요.\n\n#### 반환 값\n\n(`string`): 지정된 길이만큼 패딩된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/padEnd.md",
    "content": "# padEnd (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.padEnd`를 사용하세요\n\n이 `padEnd` 함수는 문자열이 아닌 값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.padEnd`를 사용하세요.\n\n:::\n\n문자열의 뒤쪽에 패딩을 추가해서 지정된 길이까지 늘려요.\n\n```typescript\nconst padded = padEnd(str, length, chars);\n```\n\n## 사용법\n\n### `padEnd(str, length?, chars?)`\n\n문자열이 원하는 길이보다 짧을 때 뒤쪽에 패딩 문자를 추가해서 길이를 맞추고 싶을 때 `padEnd`를 사용하세요.\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\n// 공백으로 패딩\npadEnd('abc', 6);\n// Returns: 'abc   '\n\n// 특정 문자로 패딩\npadEnd('abc', 6, '_-');\n// Returns: 'abc_-_'\n\n// 원래 길이가 더 길면 그대로 반환\npadEnd('abc', 3);\n// Returns: 'abc'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\npadEnd(null, 5, '*');\n// Returns: '*****'\n\npadEnd(undefined, 3);\n// Returns: '   '\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 패딩을 추가할 문자열이에요.\n- `length` (`number`, 선택): 원하는 최종 문자열 길이예요. 기본값은 `0`이에요.\n- `chars` (`string`, 선택): 패딩에 사용할 문자예요. 기본값은 `' '`(공백)이에요.\n\n#### 반환 값\n\n(`string`): 뒤쪽에 패딩이 추가된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/padStart.md",
    "content": "# padStart (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.padStart`를 사용하세요\n\n이 `padStart` 함수는 문자열이 아닌 값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.padStart`를 사용하세요.\n\n:::\n\n문자열의 앞쪽에 패딩을 추가해서 지정된 길이까지 늘려요.\n\n```typescript\nconst padded = padStart(str, length, chars);\n```\n\n## 사용법\n\n### `padStart(str, length?, chars?)`\n\n문자열이 원하는 길이보다 짧을 때 앞쪽에 패딩 문자를 추가해서 길이를 맞추고 싶을 때 `padStart`를 사용하세요.\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\n// 공백으로 패딩\npadStart('abc', 6);\n// Returns: '   abc'\n\n// 특정 문자로 패딩\npadStart('abc', 6, '_-');\n// Returns: '_-_abc'\n\n// 원래 길이가 더 길면 그대로 반환\npadStart('abc', 3);\n// Returns: 'abc'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\npadStart(null, 5, '*');\n// Returns: '*****'\n\npadStart(undefined, 3);\n// Returns: '   '\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 패딩을 추가할 문자열이에요.\n- `length` (`number`, 선택): 원하는 최종 문자열 길이예요. 기본값은 `0`이에요.\n- `chars` (`string`, 선택): 패딩에 사용할 문자예요. 기본값은 `' '`(공백)이에요.\n\n#### 반환 값\n\n(`string`): 앞쪽에 패딩이 추가된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/repeat.md",
    "content": "# repeat (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.repeat`을 사용하세요\n\n이 `repeat` 함수는 문자열이 아닌 값 처리와 정수 변환으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.repeat`을 사용하세요.\n\n:::\n\n문자열을 지정된 횟수만큼 반복해요.\n\n```typescript\nconst repeated = repeat(str, n);\n```\n\n## 사용법\n\n### `repeat(str, n?)`\n\n문자열을 여러 번 반복해서 새로운 문자열을 만들고 싶을 때 `repeat`을 사용하세요. 반복 횟수가 1보다 작으면 빈 문자열을 반환해요.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\n// 문자열 반복\nrepeat('abc', 2);\n// Returns: 'abcabc'\n\nrepeat('hello', 3);\n// Returns: 'hellohellohello'\n\n// 0번 반복하면 빈 문자열\nrepeat('abc', 0);\n// Returns: ''\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat(null, 3);\n// Returns: ''\n\nrepeat(undefined, 2);\n// Returns: ''\n```\n\n반복 횟수를 지정하지 않으면 1번 반복해요.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat('abc');\n// Returns: 'abc'\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 반복할 문자열이에요.\n- `n` (`number`, 선택): 반복할 횟수예요. 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`string`): 지정된 횟수만큼 반복된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/replace.md",
    "content": "# replace (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.replace`를 사용하세요\n\n이 `replace` 함수는 문자열이 아닌 값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.replace`를 사용하세요.\n\n:::\n\n문자열에서 일치하는 패턴을 다른 문자열로 바꿔요.\n\n```typescript\nconst replaced = replace(target, pattern, replacement);\n```\n\n## 사용법\n\n### `replace(target, pattern, replacement)`\n\n문자열에서 특정 패턴을 찾아서 다른 문자열로 바꾸고 싶을 때 `replace`를 사용하세요. 문자열이나 정규식 패턴을 사용할 수 있고, 교체할 내용은 문자열이나 함수로 지정할 수 있어요.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 문자열 패턴으로 교체\nreplace('abcde', 'de', '123');\n// Returns: 'abc123'\n\n// 정규식 패턴으로 교체\nreplace('abcde', /[bd]/g, '-');\n// Returns: 'a-c-e'\n```\n\n함수를 사용해서 동적으로 교체할 수도 있어요.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 함수로 교체 내용 결정\nreplace('abcde', 'de', match => match.toUpperCase());\n// Returns: 'abcDE'\n\n// 정규식과 함수 조합\nreplace('abcde', /[bd]/g, match => match.toUpperCase());\n// Returns: 'aBcDe'\n```\n\n`null`이나 `undefined` 대상은 빈 문자열로 처리해요.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\nreplace(null, 'test', 'replaced');\n// Returns: ''\n\nreplace(undefined, /test/g, 'replaced');\n// Returns: ''\n```\n\n#### 파라미터\n\n- `target` (`string`): 교체할 대상 문자열이에요.\n- `pattern` (`string | RegExp`): 찾을 패턴이에요.\n- `replacement` (`string | Function`): 교체할 내용이에요. 함수인 경우 매치된 문자열을 받아서 교체할 문자열을 반환해야 해요.\n\n#### 반환 값\n\n(`string`): 패턴이 교체된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/snakeCase.md",
    "content": "# snakeCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `snakeCase`를 사용하세요\n\n이 `snakeCase` 함수는 `null`이나 `undefined` 처리를 위한 정규화 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [snakeCase](../../string/snakeCase.md)를 사용하세요.\n\n:::\n\n문자열을 스네이크 케이스로 변환해요.\n\n```typescript\nconst snakeCased = snakeCase(str);\n```\n\n## 사용법\n\n### `snakeCase(str)`\n\n문자열을 스네이크 케이스(snake*case)로 변환하고 싶을 때 `snakeCase`를 사용하세요. 스네이크 케이스는 각 단어를 소문자로 쓰고 밑줄(*)로 연결하는 명명 규칙이에요.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\n// 카멜 케이스 변환\nsnakeCase('camelCase');\n// Returns: 'camel_case'\n\n// 공백으로 구분된 문자열 변환\nsnakeCase('some whitespace');\n// Returns: 'some_whitespace'\n\n// 하이픈으로 구분된 문자열 변환\nsnakeCase('hyphen-text');\n// Returns: 'hyphen_text'\n\n// 대문자가 연속으로 나타나는 경우\nsnakeCase('HTTPRequest');\n// Returns: 'http_request'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\nsnakeCase(null); // ''\nsnakeCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 스네이크 케이스로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 스네이크 케이스로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/split.md",
    "content": "# split (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.split`을 사용하세요\n\n이 `split` 함수는 `null`이나 `undefined` 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.split`을 사용하세요.\n\n:::\n\n문자열을 구분자로 나누어서 배열을 만들어요.\n\n```typescript\nconst segments = split(str, separator);\n```\n\n## 사용법\n\n### `split(string, separator?, limit?)`\n\n문자열을 특정 구분자로 나누어서 배열로 만들고 싶을 때 `split`을 사용하세요. 결과 배열의 최대 길이도 제한할 수 있어요.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\n// 하이픈으로 나누기\nsplit('a-b-c', '-');\n// Returns: ['a', 'b', 'c']\n\n// 결과 개수 제한하기\nsplit('a-b-c-d', '-', 2);\n// Returns: ['a', 'b']\n\n// 정규식으로 나누기\nsplit('hello world', /\\s/);\n// Returns: ['hello', 'world']\n```\n\n구분자를 지정하지 않으면 문자열 전체가 배열의 첫 번째 요소가 돼요.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit('hello');\n// Returns: ['hello']\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit(null);\n// Returns: ['']\n\nsplit(undefined);\n// Returns: ['']\n```\n\n#### 파라미터\n\n- `string` (`string`, 선택): 나눌 문자열이에요. 기본값은 빈 문자열이에요.\n- `separator` (`RegExp | string`, 선택): 나누는 기준이 되는 구분자예요.\n- `limit` (`number`, 선택): 결과 배열의 최대 길이예요.\n\n#### 반환 값\n\n(`string[]`): 구분자로 나누어진 문자열 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/startCase.md",
    "content": "# startCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `startCase`를 사용하세요\n\n이 `startCase` 함수는 `null`이나 `undefined` 처리를 위한 정규화 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [startCase](../../string/startCase.md)를 사용하세요.\n\n:::\n\n문자열을 스타트 케이스로 변환해요.\n\n```typescript\nconst startCased = startCase(str);\n```\n\n## 사용법\n\n### `startCase(str)`\n\n문자열을 스타트 케이스(Start Case)로 변환하고 싶을 때 `startCase`를 사용하세요. 스타트 케이스는 각 단어의 첫 글자를 대문자로 쓰고 공백으로 구분하는 명명 규칙이에요.\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\n// 일반 문자열 변환\nstartCase('hello world');\n// Returns: 'Hello World'\n\n// 이미 대문자인 단어는 그대로 유지\nstartCase('HELLO WORLD');\n// Returns: 'HELLO WORLD'\n\n// 하이픈으로 구분된 문자열 변환\nstartCase('hello-world');\n// Returns: 'Hello World'\n\n// 밑줄로 구분된 문자열 변환\nstartCase('hello_world');\n// Returns: 'Hello World'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\nstartCase(null); // ''\nstartCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 스타트 케이스로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 스타트 케이스로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/startsWith.md",
    "content": "# startsWith (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.startsWith`를 사용하세요\n\n이 `startsWith` 함수는 `null`이나 `undefined` 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.startsWith`를 사용하세요.\n\n:::\n\n문자열이 지정된 문자열로 시작하는지 확인해요.\n\n```typescript\nconst result = startsWith(str, target);\n```\n\n## 사용법\n\n### `startsWith(str, target, position?)`\n\n문자열이 특정 문자열로 시작하는지 확인하고 싶을 때 `startsWith`를 사용하세요. 검색을 시작할 위치도 지정할 수 있어요.\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\n// 문자열 시작 확인\nstartsWith('fooBar', 'foo');\n// Returns: true\n\nstartsWith('fooBar', 'bar');\n// Returns: false\n\n// 특정 위치부터 확인\nstartsWith('fooBar', 'Bar', 3);\n// Returns: true (3번째 위치부터 'Bar'로 시작하는지 확인)\n```\n\n`null`이나 `undefined`는 `false`를 반환해요.\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\nstartsWith(null, 'test');\n// Returns: false\n\nstartsWith('test', null);\n// Returns: false\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 확인할 문자열이에요.\n- `target` (`string`, 선택): 시작 부분에 있는지 찾을 문자열이에요.\n- `position` (`number`, 선택): 검색을 시작할 위치예요. 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`boolean`): 문자열이 지정된 문자열로 시작하면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/template.md",
    "content": "# template (Lodash 호환성)\n\n::: warning JavaScript 템플릿 리터럴을 사용하세요\n\n이 `template` 함수는 복잡한 문자열 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript 템플릿 리터럴을 사용하세요.\n\n:::\n\n문자열 템플릿에 값을 넣어서 새로운 문자열을 만드는 함수를 만들어요.\n\n```typescript\nconst compiled = template(templateString);\n```\n\n## 사용법\n\n### `template(string, options?)`\n\n문자열 템플릿에 데이터를 넣어서 완성된 문자열을 만들고 싶을 때 `template`을 사용하세요. 값을 안전하게 이스케이프하거나, 그대로 넣거나, JavaScript 코드를 실행할 수 있어요.\n\n기본 사용법으로 값을 넣거나 이스케이프할 수 있어요.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 값을 그대로 넣어요\nconst compiled = template('<%= value %>');\ncompiled({ value: 'Hello, World!' });\n// Returns: 'Hello, World!'\n\n// HTML을 안전하게 이스케이프해요\nconst safeCompiled = template('<%- value %>');\nsafeCompiled({ value: '<script>alert(\"xss\")</script>' });\n// Returns: '&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;'\n```\n\nJavaScript 코드를 실행할 수도 있어요.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 조건문 사용\nconst compiled = template('<% if (user) { %>안녕하세요 <%= user %>님!<% } %>');\ncompiled({ user: 'es-toolkit' });\n// Returns: '안녕하세요 es-toolkit님!'\n\n// 반복문 사용\nconst listTemplate = template('<% users.forEach(function(user) { %><li><%= user %></li><% }); %>');\nlistTemplate({ users: ['철수', '영희', '민수'] });\n// Returns: '<li>철수</li><li>영희</li><li>민수</li>'\n```\n\n변수 이름을 지정해서 안전하게 사용할 수 있어요.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= data.name %>님의 나이는 <%= data.age %>세예요', {\n  variable: 'data',\n});\ncompiled({ name: '철수', age: 25 });\n// Returns: '철수님의 나이는 25세예요'\n```\n\n외부 함수를 가져와서 사용할 수 있어요.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= _.toUpper(message) %>', {\n  imports: { _: { toUpper: str => str.toUpperCase() } },\n});\ncompiled({ message: 'hello world' });\n// Returns: 'HELLO WORLD'\n```\n\n사용자 정의 구분자도 만들 수 있어요.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 사용자 정의 구분자로 값 넣기\nconst compiled = template('{{ message }}', {\n  interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n});\ncompiled({ message: '안녕하세요!' });\n// Returns: '안녕하세요!'\n\n// 사용자 정의 구분자로 이스케이프\nconst safeCompiled = template('[- html -]', {\n  escape: /\\[-([\\s\\S]+?)-\\]/g,\n});\nsafeCompiled({ html: '<div>내용</div>' });\n// Returns: '&lt;div&gt;내용&lt;/div&gt;'\n```\n\n#### 파라미터\n\n- `string` (`string`): 템플릿 문자열이에요.\n- `options` (`object`, 선택): 설정 객체예요.\n  - `options.escape` (`RegExp`, 선택): HTML을 이스케이프할 구분자 정규식이에요. 기본값은 `<%-([\\s\\S]+?)%>`이에요.\n  - `options.evaluate` (`RegExp`, 선택): JavaScript 코드를 실행할 구분자 정규식이에요. 기본값은 `<%([\\s\\S]+?)%>`이에요.\n  - `options.interpolate` (`RegExp`, 선택): 값을 넣을 구분자 정규식이에요. 기본값은 `<%=([\\s\\S]+?)%>`이에요.\n  - `options.variable` (`string`, 선택): 데이터 객체의 변수 이름이에요.\n  - `options.imports` (`object`, 선택): 템플릿에서 사용할 함수들이에요.\n  - `options.sourceURL` (`string`, 선택): 디버깅용 소스 URL이에요.\n\n#### 반환 값\n\n(`TemplateExecutor`): 데이터 객체를 받아서 완성된 문자열을 반환하는 함수예요. `source` 속성으로 생성된 함수 코드도 확인할 수 있어요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/toLower.md",
    "content": "# toLower (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.toLowerCase`를 사용하세요\n\n이 `toLower` 함수는 문자열이 아닌 값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.toLowerCase`를 사용하세요.\n\n:::\n\n값을 문자열로 변환한 후 소문자로 바꿔요.\n\n```typescript\nconst lowercased = toLower(value);\n```\n\n## 사용법\n\n### `toLower(value?)`\n\n값을 소문자 문자열로 변환하고 싶을 때 `toLower`를 사용하세요. 어떤 타입의 값이든 먼저 문자열로 변환한 다음 소문자로 만들어요.\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\n// 문자열 소문자 변환\ntoLower('--FOO-BAR--');\n// Returns: '--foo-bar--'\n\ntoLower('Hello World');\n// Returns: 'hello world'\n\n// 숫자 변환\ntoLower(123);\n// Returns: '123'\n\n// 배열 변환\ntoLower([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\ntoLower(null);\n// Returns: ''\n\ntoLower(undefined);\n// Returns: ''\n\ntoLower();\n// Returns: ''\n```\n\n#### 파라미터\n\n- `value` (`unknown`, 선택): 소문자로 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 소문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/toUpper.md",
    "content": "# toUpper (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.toUpperCase`를 사용하세요\n\n이 `toUpper` 함수는 문자열이 아닌 값 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.toUpperCase`를 사용하세요.\n\n:::\n\n값을 문자열로 변환한 후 대문자로 바꿔요.\n\n```typescript\nconst uppercased = toUpper(value);\n```\n\n## 사용법\n\n### `toUpper(value?)`\n\n값을 대문자 문자열로 변환하고 싶을 때 `toUpper`를 사용하세요. 어떤 타입의 값이든 먼저 문자열로 변환한 다음 대문자로 만들어요.\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\n// 문자열 대문자 변환\ntoUpper('--foo-bar--');\n// Returns: '--FOO-BAR--'\n\ntoUpper('Hello World');\n// Returns: 'HELLO WORLD'\n\n// 숫자 변환\ntoUpper(123);\n// Returns: '123'\n\n// 배열 변환\ntoUpper([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\ntoUpper(null);\n// Returns: ''\n\ntoUpper(undefined);\n// Returns: ''\n\ntoUpper();\n// Returns: ''\n```\n\n#### 파라미터\n\n- `value` (`unknown`, 선택): 대문자로 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 대문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/trim.md",
    "content": "# trim (Lodash 호환성)\n\n::: warning `es-toolkit`의 `trim`을 사용하세요\n\n이 `trim` 함수는 `null`이나 `undefined` 처리, 배열 형태의 `chars` 처리 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [trim](../../string/trim.md)을 사용하세요.\n\n:::\n\n문자열의 앞뒤 공백이나 지정된 문자들을 제거해요.\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 사용법\n\n### `trim(str, chars)`\n\n문자열의 앞뒤에서 공백이나 특정 문자들을 제거하고 싶을 때 `trim`을 사용하세요. `chars`를 지정하지 않으면 앞뒤 공백만 제거해요.\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\n// 앞뒤 공백 제거\ntrim('  hello  ');\n// Returns: 'hello'\n\n// 지정된 문자 제거\ntrim('--hello--', '-');\n// Returns: 'hello'\n\n// 배열로 여러 문자 제거\ntrim('##hello##', ['#', 'o']);\n// Returns: 'hell'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\ntrim(null); // ''\ntrim(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 정리할 문자열이에요.\n- `chars` (`string`, 선택): 제거할 문자들이에요. 지정하지 않으면 공백을 제거해요.\n\n#### 반환 값\n\n(`string`): 앞뒤의 지정된 문자들이 제거된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/trimEnd.md",
    "content": "# trimEnd (Lodash 호환성)\n\n::: warning `es-toolkit`의 `trimEnd`를 사용하세요\n\n이 `trimEnd` 함수는 `null`이나 `undefined` 처리, 파라미터 순서 변경 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [trimEnd](../../string/trimEnd.md)를 사용하세요.\n\n:::\n\n문자열의 뒤쪽 공백이나 지정된 문자들을 제거해요.\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 사용법\n\n### `trimEnd(str, chars)`\n\n문자열의 뒤쪽에서 공백이나 특정 문자들을 제거하고 싶을 때 `trimEnd`를 사용하세요. `chars`를 지정하지 않으면 뒤쪽 공백만 제거해요.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\n// 뒤쪽 공백 제거\ntrimEnd('  abc  ');\n// Returns: '  abc'\n\n// 지정된 문자 제거\ntrimEnd('-_-abc-_-', '_-');\n// Returns: '-_-abc'\n\n// 문자열의 뒤쪽에만 적용\ntrimEnd('abc', 'a');\n// Returns: 'abc'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\ntrimEnd(null); // ''\ntrimEnd(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 뒤쪽을 정리할 문자열이에요.\n- `chars` (`string`, 선택): 제거할 문자들이에요. 지정하지 않으면 공백을 제거해요.\n\n#### 반환 값\n\n(`string`): 뒤쪽의 지정된 문자들이 제거된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/trimStart.md",
    "content": "# trimStart (Lodash 호환성)\n\n::: warning `es-toolkit`의 `trimStart`를 사용하세요\n\n이 `trimStart` 함수는 `null`이나 `undefined` 처리, 파라미터 순서 변경 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [trimStart](../../string/trimStart.md)를 사용하세요.\n\n:::\n\n문자열의 앞쪽 공백이나 지정된 문자들을 제거해요.\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 사용법\n\n### `trimStart(str, chars)`\n\n문자열의 앞쪽에서 공백이나 특정 문자들을 제거하고 싶을 때 `trimStart`를 사용하세요. `chars`를 지정하지 않으면 앞쪽 공백만 제거해요.\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\n// 앞쪽 공백 제거\ntrimStart('  abc  ');\n// Returns: 'abc  '\n\n// 지정된 문자 제거\ntrimStart('-_-abc-_-', '_-');\n// Returns: 'abc-_-'\n\n// 문자열의 앞쪽에만 적용\ntrimStart('abc', 'c');\n// Returns: 'abc'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\ntrimStart(null); // ''\ntrimStart(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 앞쪽을 정리할 문자열이에요.\n- `chars` (`string`, 선택): 제거할 문자들이에요. 지정하지 않으면 공백을 제거해요.\n\n#### 반환 값\n\n(`string`): 앞쪽의 지정된 문자들이 제거된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/truncate.md",
    "content": "# truncate (Lodash 호환성)\n\n::: warning JavaScript의 `String.prototype.slice`를 사용하세요\n\n이 `truncate` 함수는 복잡한 유니코드 처리와 정규식 검사로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 JavaScript의 `String.prototype.slice`를 사용하세요.\n\n:::\n\n문자열이 지정된 최대 길이보다 길면 잘라서 생략 문자를 붙여요.\n\n```typescript\nconst truncated = truncate(str, options);\n```\n\n## 사용법\n\n### `truncate(string, options?)`\n\n긴 문자열을 지정된 길이로 자르고 싶을 때 `truncate`를 사용하세요. 잘린 부분은 생략 문자(기본값: `\"...\"`)로 대체돼요.\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 기본 사용법 (최대 30자)\ntruncate('hi-diddly-ho there, neighborino');\n// Returns: 'hi-diddly-ho there, neighbo...'\n\n// 길이 지정\ntruncate('hi-diddly-ho there, neighborino', { length: 24 });\n// Returns: 'hi-diddly-ho there, n...'\n\n// 생략 문자 변경\ntruncate('hi-diddly-ho there, neighborino', { omission: ' [...]' });\n// Returns: 'hi-diddly-ho there, neig [...]'\n```\n\n구분자를 지정하면 해당 위치에서 자를 수 있어요.\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 공백 구분자로 단어 단위로 자르기\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: ' ',\n});\n// Returns: 'hi-diddly-ho there,...'\n\n// 정규식으로 구분자 지정\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: /,? +/,\n});\n// Returns: 'hi-diddly-ho there...'\n```\n\n유니코드 문자도 올바르게 처리해요.\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\ntruncate('¥§✈✉🤓', { length: 5 });\n// Returns: '¥§✈✉🤓'\n\ntruncate('¥§✈✉🤓', { length: 4, omission: '…' });\n// Returns: '¥§✈…'\n```\n\n#### 파라미터\n\n- `string` (`string`, 선택): 자를 문자열이에요.\n- `options` (`object`, 선택): 설정 객체예요.\n  - `options.length` (`number`, 선택): 최대 문자열 길이예요. 기본값은 `30`이에요.\n  - `options.omission` (`string`, 선택): 생략을 나타내는 문자열이에요. 기본값은 `'...'`이에요.\n  - `options.separator` (`RegExp | string`, 선택): 자를 위치를 결정하는 구분자예요.\n\n#### 반환 값\n\n(`string`): 잘린 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/unescape.md",
    "content": "# unescape (Lodash 호환성)\n\n::: warning `es-toolkit`의 `unescape`를 사용하세요\n\n이 `unescape` 함수는 `null`이나 `undefined` 처리를 위한 변환 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [unescape](../../string/unescape.md)를 사용하세요.\n\n:::\n\nHTML 엔터티를 원래 문자로 변환해요.\n\n```typescript\nconst unescaped = unescape(str);\n```\n\n## 사용법\n\n### `unescape(str)`\n\nHTML 엔터티 `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`를 원래 문자로 되돌리고 싶을 때 `unescape`를 사용하세요. 이는 `escape` 함수의 반대 동작을 해요.\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\n// HTML 태그 언이스케이프\nunescape('This is a &lt;div&gt; element.');\n// Returns: 'This is a <div> element.'\n\n// 따옴표 언이스케이프\nunescape('This is a &quot;quote&quot;');\n// Returns: 'This is a \"quote\"'\n\n// 작은따옴표 언이스케이프\nunescape('This is a &#39;quote&#39;');\n// Returns: 'This is a 'quote''\n\n// 앰퍼샌드 언이스케이프\nunescape('This is a &amp; symbol');\n// Returns: 'This is a & symbol'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\nunescape(null); // ''\nunescape(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 언이스케이프할 문자열이에요.\n\n#### 반환 값\n\n(`string`): HTML 엔터티가 원래 문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/upperCase.md",
    "content": "# upperCase (Lodash 호환성)\n\n::: warning `es-toolkit`의 `upperCase`를 사용하세요\n\n이 `upperCase` 함수는 `null`이나 `undefined` 처리를 위한 정규화 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [upperCase](../../string/upperCase.md)를 사용하세요.\n\n:::\n\n문자열을 대문자 케이스로 변환해요.\n\n```typescript\nconst upperCased = upperCase(str);\n```\n\n## 사용법\n\n### `upperCase(str)`\n\n문자열을 대문자 케이스(UPPER CASE)로 변환하고 싶을 때 `upperCase`를 사용하세요. 대문자 케이스는 각 단어를 대문자로 쓰고 공백으로 연결하는 명명 규칙이에요.\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\n// 카멜 케이스 변환\nupperCase('camelCase');\n// Returns: 'CAMEL CASE'\n\n// 공백으로 구분된 문자열 변환\nupperCase('some whitespace');\n// Returns: 'SOME WHITESPACE'\n\n// 하이픈으로 구분된 문자열 변환\nupperCase('hyphen-text');\n// Returns: 'HYPHEN TEXT'\n\n// 대문자가 연속으로 나타나는 경우\nupperCase('HTTPRequest');\n// Returns: 'HTTP REQUEST'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\nupperCase(null); // ''\nupperCase(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 대문자 케이스로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 대문자 케이스로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/upperFirst.md",
    "content": "# upperFirst (Lodash 호환성)\n\n::: warning `es-toolkit`의 `upperFirst`를 사용하세요\n\n이 `upperFirst` 함수는 `null`이나 `undefined` 처리를 위한 변환 로직으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [upperFirst](../../string/upperFirst.md)를 사용하세요.\n\n:::\n\n문자열의 첫 번째 문자를 대문자로 변환해요.\n\n```typescript\nconst upperCased = upperFirst(str);\n```\n\n## 사용법\n\n### `upperFirst(str)`\n\n문자열의 첫 번째 문자만 대문자로 만들고 싶을 때 `upperFirst`를 사용하세요. 나머지 문자들은 그대로 유지돼요.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\n// 소문자로 시작하는 문자열\nupperFirst('fred');\n// Returns: 'Fred'\n\n// 이미 대문자로 시작하는 문자열\nupperFirst('Fred');\n// Returns: 'Fred'\n\n// 모두 대문자인 문자열\nupperFirst('FRED');\n// Returns: 'FRED'\n```\n\n`null`이나 `undefined`는 빈 문자열로 처리해요.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\nupperFirst(null); // ''\nupperFirst(undefined); // ''\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 첫 문자를 대문자로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 문자가 대문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/string/words.md",
    "content": "# words (Lodash 호환성)\n\n::: warning `es-toolkit`의 `words`를 사용하세요\n\n이 `words` 함수는 `null`이나 `undefined` 처리, 복잡한 유니코드 지원 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `es-toolkit`의 [words](../../string/words.md)를 사용하세요.\n\n:::\n\n문자열을 단어들로 나누어요.\n\n```typescript\nconst wordArray = words(str, pattern);\n```\n\n## 사용법\n\n### `words(str, pattern)`\n\n문자열을 단어 단위로 나누고 싶을 때 `words`를 사용하세요. 기본적으로 영문자, 숫자, 이모지 등을 인식하여 단어를 추출해요.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 기본 단어 추출\nwords('fred, barney, & pebbles');\n// Returns: ['fred', 'barney', 'pebbles']\n\n// 카멜 케이스에서 단어 추출\nwords('camelCaseWord');\n// Returns: ['camel', 'Case', 'Word']\n\n// 숫자가 포함된 문자열\nwords('hello123world');\n// Returns: ['hello', '123', 'world']\n```\n\n사용자 정의 패턴을 사용하여 단어를 추출할 수도 있어요.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 정규식을 사용한 단어 추출\nwords('hello world', /\\w+/g);\n// Returns: ['hello', 'world']\n\n// 문자열 패턴 사용\nwords('one-two-three', '-');\n// Returns: ['-']\n```\n\n`null`이나 `undefined`는 빈 배열로 처리해요.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\nwords(null); // []\nwords(undefined); // []\n```\n\n#### 파라미터\n\n- `str` (`string`, 선택): 단어로 나눌 문자열이에요.\n- `pattern` (`RegExp | string`, 선택): 단어를 매치할 패턴이에요. 기본값은 내장 유니코드 단어 패턴이에요.\n\n#### 반환 값\n\n(`string[]`): 추출된 단어들의 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/bindAll.md",
    "content": "# bindAll (Lodash 호환성)\n\n객체의 메서드들을 객체 자신에게 바인딩해요.\n\n```typescript\nconst boundObject = bindAll(object, methodNames);\n```\n\n## 사용법\n\n### `bindAll(object, ...methodNames)`\n\n객체의 특정 메서드들의 `this` 값을 해당 객체로 고정하고 싶을 때 `bindAll`을 사용하세요. 이벤트 핸들러나 콜백 함수로 메서드를 전달할 때 `this` 컨텍스트를 유지하는 데 유용해요.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst view = {\n  label: 'docs',\n  click: function () {\n    console.log('clicked ' + this.label);\n  },\n};\n\n// 메서드를 객체에 바인딩\nbindAll(view, 'click');\ndocument.addEventListener('click', view.click);\n// => 클릭 시 'clicked docs' 출력\n```\n\n여러 메서드를 한 번에 바인딩할 수 있어요.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  name: 'example',\n  greet() {\n    return `Hello, ${this.name}!`;\n  },\n  farewell() {\n    return `Goodbye, ${this.name}!`;\n  },\n};\n\n// 배열로 여러 메서드 바인딩\nbindAll(obj, ['greet', 'farewell']);\n\nconst greet = obj.greet;\ngreet(); // 'Hello, example!' (this가 올바르게 바인딩됨)\n```\n\n숫자나 특수 키도 처리할 수 있어요.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  '-0': function () {\n    return 'negative zero';\n  },\n  '0': function () {\n    return 'zero';\n  },\n};\n\nbindAll(obj, -0);\nobj['-0'](); // 'negative zero'\n```\n\n#### 파라미터\n\n- `object` (`Object`): 메서드를 바인딩할 객체예요.\n- `methodNames` (`...(string | string[] | number | IArguments)`): 바인딩할 메서드 이름들이에요. 개별 문자열, 배열, 숫자, Arguments 객체로 지정할 수 있어요.\n\n#### 반환 값\n\n(`Object`): 메서드가 바인딩된 원본 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/cond.md",
    "content": "# cond (Lodash 호환성)\n\n::: warning if-else 문이나 switch 문을 사용하세요\n\n이 `cond` 함수는 복잡한 iteratee 처리, 배열 변환, 함수 검증 등으로 인해 느리게 동작해요.\n\n대신 더 빠르고 명확한 if-else 문이나 switch 문을 사용하세요.\n\n:::\n\n조건과 함수 쌍들의 배열을 받아서, 조건을 순서대로 확인하며 첫 번째로 참인 조건에 해당하는 함수를 실행하는 함수를 만들어요.\n\n```typescript\nconst conditionFunction = cond(pairs);\n```\n\n## 사용법\n\n### `cond(pairs)`\n\n여러 조건을 순서대로 확인하면서 첫 번째로 참인 조건에 해당하는 함수를 실행하고 싶을 때 `cond`를 사용하세요. 복잡한 조건부 로직을 함수형으로 표현할 때 유용해요.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst getValue = cond([\n  [x => x > 10, x => 'big'],\n  [x => x > 5, x => 'medium'],\n  [x => x > 0, x => 'small'],\n  [() => true, () => 'zero or negative'],\n]);\n\nconsole.log(getValue(15)); // \"big\"\nconsole.log(getValue(8)); // \"medium\"\nconsole.log(getValue(3)); // \"small\"\nconsole.log(getValue(-1)); // \"zero or negative\"\n```\n\n객체 패턴 매칭에도 활용할 수 있어요.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst processUser = cond([\n  [user => user.role === 'admin', user => `관리자: ${user.name}`],\n  [user => user.role === 'user', user => `사용자: ${user.name}`],\n  [user => user.role === 'guest', user => `게스트: ${user.name}`],\n  [() => true, () => '알 수 없는 역할'],\n]);\n\nconsole.log(processUser({ name: '김철수', role: 'admin' })); // \"관리자: 김철수\"\nconsole.log(processUser({ name: '이영희', role: 'user' })); // \"사용자: 이영희\"\n```\n\n첫 번째로 참인 조건만 실행되고, 모든 조건이 거짓이면 `undefined`를 반환해요.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst checkValue = cond([\n  [x => x > 10, x => 'greater than 10'],\n  [x => x < 5, x => 'less than 5'],\n]);\n\nconsole.log(checkValue(15)); // \"greater than 10\"\nconsole.log(checkValue(3)); // \"less than 5\"\nconsole.log(checkValue(7)); // undefined (조건에 맞지 않음)\n```\n\n#### 파라미터\n\n- `pairs` (`Array<[predicate, func]>`): 조건 함수와 실행할 함수의 쌍들로 이루어진 배열이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => unknown`): 조건을 확인하고 첫 번째로 참인 조건에 해당하는 함수를 실행하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/constant.md",
    "content": "# constant (Lodash 호환성)\n\n::: warning 화살표 함수를 사용하세요\n\n이 `constant` 함수는 단순한 작업을 위해 추가적인 함수 래퍼를 만들어서 불필요한 오버헤드가 발생해요.\n\n대신 더 간단하고 직관적인 화살표 함수를 사용하세요.\n\n:::\n\n주어진 값을 항상 반환하는 함수를 만들어요.\n\n```typescript\nconst constantFunction = constant(value);\n```\n\n## 사용법\n\n### `constant(value)`\n\n특정 값을 항상 반환하는 함수가 필요할 때 `constant`를 사용하세요. 함수형 프로그래밍에서 기본값을 제공하거나 콜백 함수로 사용할 때 유용해요.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// 기본 사용법\nconst always42 = constant(42);\nconsole.log(always42()); // 42\n\nconst alwaysHello = constant('hello');\nconsole.log(alwaysHello()); // \"hello\"\n```\n\n배열의 map이나 다른 고차 함수와 함께 사용할 때 편리해요.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// 모든 요소를 0으로 채우기\nconst numbers = [1, 2, 3, 4, 5];\nconst zeros = numbers.map(constant(0));\nconsole.log(zeros); // [0, 0, 0, 0, 0]\n\n// 모든 요소를 같은 객체로 바꾸기\nconst users = ['alice', 'bob', 'charlie'];\nconst defaultUser = users.map(constant({ role: 'user', active: true }));\nconsole.log(defaultUser);\n// [{ role: 'user', active: true }, { role: 'user', active: true }, { role: 'user', active: true }]\n```\n\n조건부 기본값 제공에도 활용할 수 있어요.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nfunction processData(data, fallback = constant('기본값')) {\n  return data || fallback();\n}\n\nconsole.log(processData(null)); // \"기본값\"\nconsole.log(processData('실제 데이터')); // \"실제 데이터\"\n```\n\n객체 참조를 유지해요.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nconst getObj = constant(obj);\n\nconsole.log(getObj() === obj); // true (같은 객체 참조)\n```\n\n#### 파라미터\n\n- `value` (`T`, 선택): 함수가 반환할 값이에요. 제공하지 않으면 `undefined`를 반환해요.\n\n#### 반환 값\n\n(`() => T | undefined`): 주어진 값을 항상 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/defaultTo.md",
    "content": "# defaultTo (Lodash 호환성)\n\n`null`, `undefined`, `NaN`인 값에 대해서 기본값을 반환해요.\n\n```typescript\nconst result = defaultTo(value, defaultValue);\n```\n\n## 사용법\n\n### `defaultTo(value, defaultValue)`\n\n값이 `null`, `undefined`, 또는 `NaN`일 때 기본값을 제공하고 싶을 때 `defaultTo`를 사용하세요. API 응답이나 사용자 입력에서 유효하지 않은 값을 처리할 때 유용해요.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\n// 기본 사용법\nconsole.log(defaultTo(null, 'default')); // 'default'\nconsole.log(defaultTo(undefined, 'default')); // 'default'\nconsole.log(defaultTo(NaN, 0)); // 0\nconsole.log(defaultTo('actual', 'default')); // 'actual'\nconsole.log(defaultTo(123, 0)); // 123\n```\n\nAPI 응답 처리에 활용할 수 있어요.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nfunction processUserData(response) {\n  return {\n    name: defaultTo(response.name, '이름 없음'),\n    age: defaultTo(response.age, 0),\n    score: defaultTo(response.score, 0), // NaN 처리 포함\n  };\n}\n\n// API가 불완전한 데이터를 반환하는 경우\nconst userData = processUserData({\n  name: null,\n  age: undefined,\n  score: NaN,\n});\n\nconsole.log(userData);\n// { name: '이름 없음', age: 0, score: 0 }\n```\n\n배열이나 객체에도 사용할 수 있어요.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nconst users = defaultTo(response.users, []);\nconst metadata = defaultTo(response.metadata, {});\n\n// 빈 배열이나 객체가 아닌 null/undefined/NaN만 처리해요\nconsole.log(defaultTo([], ['default'])); // [] (빈 배열이지만 유효한 값)\nconsole.log(defaultTo({}, { default: true })); // {} (빈 객체이지만 유효한 값)\n```\n\n#### 파라미터\n\n- `value` (`T | null | undefined`): 확인할 값이에요.\n- `defaultValue` (`D`): 값이 `null`, `undefined` 또는 `NaN`인 경우 반환할 기본값이에요.\n\n#### 반환 값\n\n(`T | D`): 값이 유효하면 원래 값을, 그렇지 않으면 기본값을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/eq.md",
    "content": "# eq (Lodash 호환성)\n\n두 값이 SameValueZero 비교 방식으로 동등한지 확인해요.\n\n```typescript\nconst isEqual = eq(value, other);\n```\n\n## 사용법\n\n### `eq(value, other)`\n\n두 값이 동등한지 확인하고 싶을 때 `eq`를 사용하세요. 일반적인 `===` 비교와 달리 `NaN`끼리의 비교에서 `true`를 반환해요.\n\n```typescript\nimport { eq } from 'es-toolkit/compat';\n\n// 기본 사용법\nconsole.log(eq(1, 1)); // true\nconsole.log(eq(0, -0)); // true (SameValueZero에서는 0과 -0을 같다고 봄)\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq('a', 'a')); // true\nconsole.log(eq('a', 'b')); // false\n```\n\n`Object.is()`와 다르게 동작해요.\n\n```typescript\n// eq 사용\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq(0, -0)); // true\n\n// Object.is 사용 (더 빠름)\nconsole.log(Object.is(NaN, NaN)); // true\nconsole.log(Object.is(0, -0)); // false (Object.is는 0과 -0을 다르다고 봄)\n\n// === 사용\nconsole.log(NaN === NaN); // false\nconsole.log(0 === -0); // true\n```\n\n#### 파라미터\n\n- `value` (`any`): 비교할 첫 번째 값이에요.\n- `other` (`any`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 두 값이 동등하면 `true`를, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/gt.md",
    "content": "# gt (Lodash 호환성)\n\n::: warning `>` 연산자를 사용하세요\n\n이 `gt` 함수는 `toNumber` 함수 호출과 문자열 타입 확인 등의 추가 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `>` 연산자를 사용하세요.\n\n:::\n\n값이 다른 값보다 큰지 확인해요.\n\n```typescript\nconst result = gt(value, other);\n```\n\n## 사용법\n\n### `gt(value, other)`\n\n두 값을 비교해서 첫 번째 값이 두 번째 값보다 큰지 확인하고 싶을 때 `gt`를 사용하세요. 문자열끼리는 사전순으로 비교하고, 다른 타입들은 숫자로 변환해서 비교해요.\n\n```typescript\nimport { gt } from 'es-toolkit/compat';\n\ngt(3, 1);\n// Returns: true\n\ngt(3, 3);\n// Returns: false\n\ngt(1, 3);\n// Returns: false\n\n// 문자열 비교 (사전순)\ngt('def', 'abc');\n// Returns: true\n\ngt('abc', 'def');\n// Returns: false\n\n// 다른 타입들은 숫자로 변환되어 비교\ngt('10', 5);\n// Returns: true (10 > 5)\n\ngt(1, null);\n// Returns: true (1 > 0)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 비교할 첫 번째 값이에요.\n- `other` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 첫 번째 값이 두 번째 값보다 크면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/gte.md",
    "content": "# gte (Lodash 호환성)\n\n::: warning `>=` 연산자를 사용하세요\n\n이 `gte` 함수는 `toNumber` 함수 호출과 문자열 타입 확인 등의 추가 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `>=` 연산자를 사용하세요.\n\n:::\n\n값이 다른 값보다 크거나 같은지 확인해요.\n\n```typescript\nconst result = gte(value, other);\n```\n\n## 사용법\n\n### `gte(value, other)`\n\n두 값을 비교해서 첫 번째 값이 두 번째 값보다 크거나 같은지 확인하고 싶을 때 `gte`를 사용하세요. 문자열끼리는 사전순으로 비교하고, 다른 타입들은 숫자로 변환해서 비교해요.\n\n```typescript\nimport { gte } from 'es-toolkit/compat';\n\ngte(3, 1);\n// Returns: true\n\ngte(3, 3);\n// Returns: true\n\ngte(1, 3);\n// Returns: false\n\n// 문자열 비교 (사전순)\ngte('def', 'abc');\n// Returns: true\n\ngte('abc', 'def');\n// Returns: false\n\n// 다른 타입들은 숫자로 변환되어 비교\ngte('10', 5);\n// Returns: true (10 >= 5)\n\ngte(1, null);\n// Returns: true (1 >= 0)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 비교할 첫 번째 값이에요.\n- `other` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 첫 번째 값이 두 번째 값보다 크거나 같으면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/invoke.md",
    "content": "# invoke (Lodash 호환성)\n\n::: warning 직접 메서드를 호출하세요\n\n이 `invoke` 함수는 경로 해석, 객체 탐색, `get` 함수 호출 등의 복잡한 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접 메서드 호출을 사용하세요.\n\n:::\n\n객체의 경로에 있는 메서드를 주어진 인수로 호출해요.\n\n```typescript\nconst result = invoke(object, path, args);\n```\n\n## 사용법\n\n### `invoke(object, path, args)`\n\n객체의 특정 경로에 있는 메서드를 인자들과 함께 호출하고 싶을 때 `invoke`를 사용하세요. 경로는 점 표기법 문자열이나 속성 키 배열로 지정할 수 있어요.\n\n```typescript\nimport { invoke } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 점 표기법으로 경로 지정\ninvoke(object, 'a.b', [1, 2]);\n// Returns: 3\n\n// 배열로 경로 지정\ninvoke(object, ['a', 'b'], [1, 2]);\n// Returns: 3\n\n// 존재하지 않는 경로\ninvoke(object, 'a.c.d', [1, 2]);\n// Returns: undefined\n\n// 다양한 타입의 인자들\nconst obj = {\n  calculate: {\n    sum: function (...numbers) {\n      return numbers.reduce((a, b) => a + b, 0);\n    },\n    multiply: function (a, b) {\n      return a * b;\n    },\n  },\n};\n\ninvoke(obj, 'calculate.sum', [1, 2, 3, 4]);\n// Returns: 10\n\ninvoke(obj, ['calculate', 'multiply'], [5, 6]);\n// Returns: 30\n```\n\n#### 파라미터\n\n- `object` (`unknown`): 메서드를 호출할 객체예요.\n- `path` (`PropertyKey | PropertyKey[]`): 호출할 메서드의 경로예요. 문자열, 심볼, 숫자나 이들의 배열이 될 수 있어요.\n- `args` (`any[]`): 메서드를 호출할 때 사용할 인수 배열이에요.\n\n#### 반환 값\n\n(`any`): 호출된 메서드의 결과를 반환해요. 메서드가 존재하지 않으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/iteratee.md",
    "content": "# iteratee (Lodash 호환성)\n\n::: warning 직접적인 함수나 속성 접근을 사용하세요\n\n이 `iteratee` 함수는 복잡한 타입 변환과 다양한 경우 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 직접적인 함수나 속성 접근을 사용하세요.\n\n:::\n\n요소에서 값을 반환하는 함수를 만들어요.\n\n```typescript\nconst getter = iteratee(source);\n```\n\n## 사용법\n\n### `iteratee(value?)`\n\n컬렉션의 요소에서 값을 추출하거나 조건을 확인하는 함수를 만들고 싶을 때 `iteratee`를 사용하세요. 제공하는 인자의 타입에 따라 다른 동작을 수행해요.\n\n```typescript\nimport { iteratee } from 'es-toolkit/compat';\n\n// 함수: 주어진 함수를 그대로 반환\nconst func = iteratee(object => object.a);\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(func);\n// Returns: [1, 2, 3]\n\n// 속성 이름: 해당 속성의 값을 반환하는 함수\nconst getA = iteratee('a');\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(getA);\n// Returns: [1, 2, 3]\n\n// 객체: 주어진 객체와 일치하는지 확인하는 함수\nconst matchesObj = iteratee({ a: 1 });\n[\n  { a: 1, b: 2 },\n  { a: 2, b: 3 },\n  { a: 1, c: 4 },\n].find(matchesObj);\n// Returns: { a: 1, b: 2 }\n\n// 속성-값 쌍: 해당 속성이 특정 값과 일치하는지 확인하는 함수\nconst matchesProperty = iteratee(['a', 1]);\n[{ a: 1 }, { a: 2 }, { a: 3 }].find(matchesProperty);\n// Returns: { a: 1 }\n\n// null이나 인자 없음: 요소를 그대로 반환하는 함수\nconst identity = iteratee();\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(identity);\n// Returns: [{ a: 1 }, { a: 2 }, { a: 3 }]\n```\n\n인자의 종류에 따른 동작:\n\n- **함수**: 주어진 함수를 있는 그대로 반환해요.\n- **속성 이름**: 요소에서 주어진 속성의 값을 반환해요.\n- **속성-값 쌍**: 요소의 속성이 주어진 값과 일치하는지 여부를 나타내는 참/거짓 값을 반환해요.\n- **부분 객체**: 요소가 부분 객체의 속성과 값에 일치하는지 여부를 나타내는 참/거짓 값을 반환해요.\n- **null이나 인자 없음**: 요소를 있는 그대로 반환하는 함수를 반환해요.\n\n#### 파라미터\n\n- `value` (`symbol | number | string | object | null | ((...args: any[]) => unknown)`, 선택): 반복자로 변환할 값이에요. 기본값은 `null`이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 새로운 반복자 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/lt.md",
    "content": "# lt (Lodash 호환성)\n\n::: warning `<` 연산자를 사용하세요\n\n이 `lt` 함수는 `toNumber` 함수 호출과 문자열 타입 확인 등의 추가 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `<` 연산자를 사용하세요.\n\n:::\n\n값이 다른 값보다 작은지 확인해요.\n\n```typescript\nconst result = lt(value, other);\n```\n\n## 사용법\n\n### `lt(value, other)`\n\n두 값을 비교해서 첫 번째 값이 두 번째 값보다 작은지 확인하고 싶을 때 `lt`를 사용하세요. 문자열끼리는 사전순으로 비교하고, 다른 타입들은 숫자로 변환해서 비교해요.\n\n```typescript\nimport { lt } from 'es-toolkit/compat';\n\nlt(1, 3);\n// Returns: true\n\nlt(3, 3);\n// Returns: false\n\nlt(3, 1);\n// Returns: false\n\n// 문자열 비교 (사전순)\nlt('abc', 'def');\n// Returns: true\n\nlt('def', 'abc');\n// Returns: false\n\n// 다른 타입들은 숫자로 변환되어 비교\nlt('5', 10);\n// Returns: true (5 < 10)\n\nlt(null, 1);\n// Returns: true (0 < 1)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 비교할 첫 번째 값이에요.\n- `other` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 첫 번째 값이 두 번째 값보다 작으면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/lte.md",
    "content": "# lte (Lodash 호환성)\n\n::: warning `<=` 연산자를 사용하세요\n\n이 `lte` 함수는 `toNumber` 함수 호출과 문자열 타입 확인 등의 추가 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `<=` 연산자를 사용하세요.\n\n:::\n\n값이 다른 값보다 작거나 같은지 확인해요.\n\n```typescript\nconst result = lte(value, other);\n```\n\n## 사용법\n\n### `lte(value, other)`\n\n두 값을 비교해서 첫 번째 값이 두 번째 값보다 작거나 같은지 확인하고 싶을 때 `lte`를 사용하세요. 문자열끼리는 사전순으로 비교하고, 다른 타입들은 숫자로 변환해서 비교해요.\n\n```typescript\nimport { lte } from 'es-toolkit/compat';\n\nlte(1, 3);\n// Returns: true\n\nlte(3, 3);\n// Returns: true\n\nlte(3, 1);\n// Returns: false\n\n// 문자열 비교 (사전순)\nlte('abc', 'def');\n// Returns: true\n\nlte('def', 'abc');\n// Returns: false\n\n// 다른 타입들은 숫자로 변환되어 비교\nlte('10', 5);\n// Returns: false (10 <= 5)\n\nlte(null, 0);\n// Returns: true (0 <= 0)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 비교할 첫 번째 값이에요.\n- `other` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 첫 번째 값이 두 번째 값보다 작거나 같으면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/method.md",
    "content": "# method (Lodash 호환성)\n\n지정된 경로의 메서드를 인자와 함께 호출하는 함수를 만들어요.\n\n```typescript\nconst methodFunc = method(path, ...args);\n```\n\n## 사용법\n\n### `method(path, ...args)`\n\n객체에서 특정 경로의 메서드를 미리 정의된 인자와 함께 호출하는 함수를 생성해요. 함수형 프로그래밍에서 메서드 호출을 재사용하거나 배열의 `map` 등에서 유용해요.\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 메서드 호출 함수를 만들어요\nconst add = method('a.b', 1, 2);\nconsole.log(add(object)); // => 3\n\n// 배열에서 각 객체의 메서드를 호출해요\nconst objects = [{ calc: { sum: (a, b) => a + b } }, { calc: { sum: (a, b) => a * b } }];\n\nconst calculate = method('calc.sum', 5, 3);\nobjects.map(calculate); // => [8, 15]\n```\n\n중첩된 경로도 처리할 수 있어요.\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst obj = {\n  users: {\n    getName: function (prefix) {\n      return prefix + this.name;\n    },\n    name: 'John',\n  },\n};\n\nconst getUserName = method('users.getName', 'Mr. ');\ngetUserName(obj); // => 'Mr. John'\n```\n\n#### 파라미터\n\n- `path` (`PropertyKey | PropertyKey[]`): 호출할 메서드의 경로예요.\n- `...args` (`any[]`): 메서드에 전달할 인자들이에요.\n\n#### 반환 값\n\n(`(object: any) => any`): 객체를 받아서 지정된 경로의 메서드를 인자와 함께 호출하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/methodOf.md",
    "content": "# methodOf (Lodash 호환성)\n\n주어진 객체에서 경로를 받아 메서드를 인자와 함께 호출하는 함수를 만들어요.\n\n```typescript\nconst pathInvoker = methodOf(object, ...args);\n```\n\n## 사용법\n\n### `methodOf(object, ...args)`\n\n특정 객체의 메서드를 미리 정의된 인자와 함께 호출하는 함수를 생성해요. `method`와 반대로 객체는 고정하고 경로를 나중에 지정할 때 유용해요.\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 객체와 인자를 미리 바인딩해요\nconst callMethod = methodOf(object, 1, 2);\nconsole.log(callMethod('a.b')); // => 3\n\n// 여러 경로에 대해 동일한 객체와 인자로 호출해요\nconst calculator = {\n  add: (a, b) => a + b,\n  multiply: (a, b) => a * b,\n  subtract: (a, b) => a - b,\n};\n\nconst compute = methodOf(calculator, 10, 5);\nconsole.log(compute('add')); // => 15\nconsole.log(compute('multiply')); // => 50\nconsole.log(compute('subtract')); // => 5\n```\n\n중첩된 객체에서도 사용할 수 있어요.\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst data = {\n  users: {\n    findById: function (id) {\n      return `User ${id}`;\n    },\n    findByName: function (name) {\n      return `Found ${name}`;\n    },\n  },\n};\n\nconst userFinder = methodOf(data, 'john');\nuserFinder('users.findById'); // => 'User john'\nuserFinder('users.findByName'); // => 'Found john'\n```\n\n#### 파라미터\n\n- `object` (`object`): 메서드를 호출할 객체예요.\n- `...args` (`any[]`): 메서드에 전달할 인자들이에요.\n\n#### 반환 값\n\n(`(path: PropertyKey | PropertyKey[]) => any`): 경로를 받아서 지정된 객체의 메서드를 인자와 함께 호출하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/now.md",
    "content": "# now (Lodash 호환성)\n\n::: warning `Date.now()`를 사용하세요\n\n이 `now` 함수는 단순히 `Date.now()`를 호출하는 래퍼 함수로 불필요한 추상화예요.\n\n대신 더 빠르고 직접적인 `Date.now()`를 사용하세요.\n\n:::\n\n현재 시간을 밀리초 단위로 반환해요.\n\n```typescript\nconst currentTime = now();\n```\n\n## 사용법\n\n### `now()`\n\n1970년 1월 1일 00:00:00 UTC부터 경과된 밀리초 수를 반환해요. 시간 측정이나 타임스탬프 생성에 유용해요.\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\n// 현재 시간을 가져와요\nconst currentTime = now();\nconsole.log(currentTime); // => 1703925600000 (예시)\n\n// 실행 시간을 측정해요\nconst startTime = now();\n// 시간이 오래 걸리는 작업\nconst endTime = now();\nconsole.log(`작업 시간: ${endTime - startTime}ms`);\n\n// 타임스탬프로 사용해요\nconst timestamp = now();\nconst logMessage = `[${timestamp}] 작업 완료`;\n```\n\n`Date.now()`와 동일한 결과를 반환해요.\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\nconsole.log(now() === Date.now()); // => true (같은 시점에 호출되면)\n```\n\n#### 파라미터\n\n파라미터는 없어요.\n\n#### 반환 값\n\n(`number`): 1970년 1월 1일 00:00:00 UTC부터 현재까지의 밀리초 수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/over.md",
    "content": "# over (Lodash 호환성)\n\n::: warning 배열 메서드를 직접 사용하세요\n\n이 `over` 함수는 함수들을 배열로 매핑하는 과정에서 추가적인 오버헤드가 발생해요.\n\n대신 더 빠르고 현대적인 배열의 `map` 메서드를 사용하세요.\n\n:::\n\n주어진 함수들에 동일한 인자를 전달하여 각각의 결과를 배열로 반환하는 함수를 만들어요.\n\n```typescript\nconst multiCall = over(funcs);\n```\n\n## 사용법\n\n### `over(...iteratees)`\n\n여러 함수를 받아서 동일한 인자로 각각 호출하고 결과를 배열로 반환하는 함수를 생성해요. 동일한 데이터로 여러 계산을 수행할 때 유용해요.\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\n// 수학 함수들을 함께 사용해요\nconst mathOperations = over([Math.max, Math.min]);\nmathOperations(1, 2, 3, 4);\n// => [4, 1]\n\n// 개별 함수로 전달할 수도 있어요\nconst operations = over(Math.max, Math.min);\noperations(1, 2, 3, 4);\n// => [4, 1]\n\n// 객체 속성을 추출해요\nconst getProperties = over(['name', 'age']);\ngetProperties({ name: 'John', age: 30 });\n// => ['John', 30]\n\n// 조건을 검사해요\nconst validators = over([\n  { name: 'John' }, // 객체 매칭\n  { age: 30 },\n]);\nvalidators({ name: 'John', age: 30 });\n// => [true, true]\n```\n\n중첩 경로도 처리할 수 있어요.\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\nconst data = {\n  user: { name: 'John', profile: { age: 30 } },\n  settings: { theme: 'dark' },\n};\n\nconst getInfo = over(['user.name', 'user.profile.age', 'settings.theme']);\ngetInfo(data);\n// => ['John', 30, 'dark']\n```\n\n#### 파라미터\n\n- `...iteratees` (`Array<Function | string | object | Array>`): 호출할 함수들이나 속성 경로들이에요. 배열로 전달하거나 개별 인자로 전달할 수 있어요.\n\n#### 반환 값\n\n(`(...args: any[]) => any[]`): 인자를 받아서 각 함수의 결과를 배열로 반환하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/overEvery.md",
    "content": "# overEvery (Lodash 호환성)\n\n::: warning `Array.every`를 사용하세요\n\n이 `overEvery` 함수는 조건 함수들을 변환하고 검사하는 과정에서 추가적인 오버헤드가 발생해요.\n\n대신 더 빠르고 현대적인 `Array.every` 메서드를 사용하세요.\n\n:::\n\n모든 조건 함수가 참으로 평가되는 값을 반환하는지 확인하는 함수를 만들어요.\n\n```typescript\nconst allValidator = overEvery(predicates);\n```\n\n## 사용법\n\n### `overEvery(...predicates)`\n\n여러 조건 함수를 받아서 주어진 값이 모든 조건을 만족하는지 확인하는 함수를 생성해요. 복합 조건 검사나 데이터 검증에 유용해요.\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// 문자열 조건들을 검사해요\nconst isValidString = overEvery([\n  value => typeof value === 'string',\n  value => value.length > 3,\n  value => value.includes('o'),\n]);\n\nisValidString('hello'); // => true\nisValidString('hi'); // => false (길이가 3 이하)\nisValidString('test'); // => false ('o'가 없음)\n\n// 숫자 범위를 검사해요\nconst isInRange = overEvery([\n  num => num >= 0,\n  num => num <= 100,\n  num => num % 1 === 0, // 정수인지 확인\n]);\n\nisInRange(50); // => true\nisInRange(-5); // => false (0 미만)\nisInRange(150); // => false (100 초과)\nisInRange(50.5); // => false (정수가 아님)\n```\n\n객체 속성도 검사할 수 있어요.\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// 객체 속성을 검사해요\nconst isValidUser = overEvery([\n  'name', // name 속성이 참으로 평가되는지\n  { age: 30 }, // age가 30인지\n  ['active', true], // active가 true인지\n]);\n\nisValidUser({ name: 'John', age: 30, active: true }); // => true\nisValidUser({ name: '', age: 30, active: true }); // => false (name이 빈 문자열)\nisValidUser({ name: 'John', age: 25, active: true }); // => false (age가 다름)\n```\n\n#### 파라미터\n\n- `...predicates` (`Array<Function | string | object | Array>`): 검사할 조건 함수들이에요. 함수, 속성 이름, 객체, 속성-값 쌍 등이 될 수 있어요.\n\n#### 반환 값\n\n(`(...args: any[]) => boolean`): 모든 조건을 만족하면 `true`, 하나라도 만족하지 않으면 `false`를 반환하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/overSome.md",
    "content": "# overSome (Lodash 호환성)\n\n::: warning `Array.some`을 사용하세요\n\n이 `overSome` 함수는 조건 함수들을 변환하고 검사하는 과정에서 추가적인 오버헤드가 발생해요.\n\n대신 더 빠르고 현대적인 `Array.some` 메서드를 사용하세요.\n\n:::\n\n조건 함수 중 하나라도 참으로 평가되는 값을 반환하는지 확인하는 함수를 만들어요.\n\n```typescript\nconst anyValidator = overSome(predicates);\n```\n\n## 사용법\n\n### `overSome(...predicates)`\n\n여러 조건 함수를 받아서 주어진 값이 조건 중 하나라도 만족하는지 확인하는 함수를 생성해요. 유연한 조건 검사나 대안 검증에 유용해요.\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 문자열이나 숫자인지 확인해요\nconst isStringOrNumber = overSome([value => typeof value === 'string', value => typeof value === 'number']);\n\nisStringOrNumber('hello'); // => true\nisStringOrNumber(42); // => true\nisStringOrNumber(true); // => false\n\n// 여러 조건 중 하나라도 만족하는지 확인해요\nconst hasValidProperty = overSome([\n  obj => obj.name && obj.name.length > 0,\n  obj => obj.email && obj.email.includes('@'),\n  obj => obj.phone && obj.phone.length >= 10,\n]);\n\nhasValidProperty({ name: 'John' }); // => true\nhasValidProperty({ email: 'john@example.com' }); // => true\nhasValidProperty({ phone: '1234567890' }); // => true\nhasValidProperty({ age: 30 }); // => false\n```\n\n객체 속성도 검사할 수 있어요.\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 여러 조건 중 하나라도 매칭되는지 확인해요\nconst matchesAnyCondition = overSome([\n  'isActive', // isActive 속성이 참으로 평가되는지\n  { role: 'admin' }, // role이 'admin'인지\n  ['status', 'vip'], // status가 'vip'인지\n]);\n\nmatchesAnyCondition({ isActive: true }); // => true\nmatchesAnyCondition({ role: 'admin' }); // => true\nmatchesAnyCondition({ status: 'vip' }); // => true\nmatchesAnyCondition({ role: 'user', status: 'normal' }); // => false\n```\n\n#### 파라미터\n\n- `...predicates` (`Array<Function | string | object | Array>`): 검사할 조건 함수들이에요. 함수, 속성 이름, 객체, 속성-값 쌍 등이 될 수 있어요.\n\n#### 반환 값\n\n(`(...args: any[]) => boolean`): 조건 중 하나라도 만족하면 `true`, 모두 만족하지 않으면 `false`를 반환하는 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/stubArray.md",
    "content": "# stubArray (Lodash 호환성)\n\n::: warning `[]`를 직접 사용하세요\n\n이 `stubArray` 함수는 단순히 빈 배열을 반환하는 래퍼 함수로 불필요한 추상화예요.\n\n대신 더 빠르고 직접적인 `[]`를 사용하세요.\n\n:::\n\n항상 새로운 빈 배열을 반환해요.\n\n```typescript\nconst emptyArray = stubArray();\n```\n\n## 사용법\n\n### `stubArray()`\n\n항상 새로운 빈 배열을 반환하는 함수예요. 기본값으로 빈 배열이 필요하거나 함수형 프로그래밍에서 일관된 반환값이 필요할 때 사용해요.\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\n// 빈 배열을 반환해요\nconst emptyArray = stubArray();\nconsole.log(emptyArray); // => []\n\n// 배열 메서드에서 기본값으로 사용해요\nconst items = [1, 2, 3];\nconst result = items.filter(x => x > 5) || stubArray();\nconsole.log(result); // => []\n\n// 함수형 프로그래밍에서 사용해요\nconst getData = () => stubArray();\nconst data = getData();\ndata.push('item'); // 새로운 배열이므로 안전해요\n```\n\n매번 새로운 배열 인스턴스를 반환해요.\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\nconst arr1 = stubArray();\nconst arr2 = stubArray();\n\nconsole.log(arr1 === arr2); // => false (다른 인스턴스)\nconsole.log(Array.isArray(arr1)); // => true\nconsole.log(arr1.length); // => 0\n```\n\n#### 파라미터\n\n파라미터는 없어요.\n\n#### 반환 값\n\n(`any[]`): 새로운 빈 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/stubFalse.md",
    "content": "# stubFalse (Lodash 호환성)\n\n::: warning `false`를 직접 사용하세요\n\n이 `stubFalse` 함수는 단순히 `false`를 반환하는 래퍼 함수로 불필요한 추상화예요.\n\n대신 더 빠르고 직접적인 `false` 값을 사용하세요.\n\n:::\n\n항상 `false`를 반환해요.\n\n```typescript\nconst falseValue = stubFalse();\n```\n\n## 사용법\n\n### `stubFalse()`\n\n항상 `false`를 반환하는 함수예요. 함수형 프로그래밍에서 일관된 거짓 값이 필요하거나 조건부 콜백에서 기본값으로 사용할 때 유용해요.\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\n// false를 반환해요\nconst result = stubFalse();\nconsole.log(result); // => false\n\n// 배열 필터링에서 기본 조건으로 사용해요\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = numbers.filter(stubFalse); // 모든 요소를 제거\nconsole.log(evenNumbers); // => []\n\n// 함수형 프로그래밍에서 사용해요\nconst isValid = condition => (condition ? someValidation : stubFalse);\nconst validator = isValid(false);\nconsole.log(validator()); // => false\n```\n\n매번 동일한 `false` 값을 반환해요.\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\nconst result1 = stubFalse();\nconst result2 = stubFalse();\n\nconsole.log(result1 === result2); // => true\nconsole.log(typeof result1); // => 'boolean'\nconsole.log(result1); // => false\n```\n\n#### 파라미터\n\n파라미터는 없어요.\n\n#### 반환 값\n\n(`false`): 항상 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/stubObject.md",
    "content": "# stubObject (Lodash 호환성)\n\n::: warning `{}`를 직접 사용하세요\n\n이 `stubObject` 함수는 단순히 빈 객체를 반환하는 래퍼 함수로 불필요한 추상화예요.\n\n대신 더 빠르고 직접적인 `{}`를 사용하세요.\n\n:::\n\n항상 새로운 빈 객체를 반환해요.\n\n```typescript\nconst emptyObject = stubObject();\n```\n\n## 사용법\n\n### `stubObject()`\n\n항상 새로운 빈 객체를 반환하는 함수예요. 기본값으로 빈 객체가 필요하거나 함수형 프로그래밍에서 일관된 반환값이 필요할 때 사용해요.\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\n// 빈 객체를 반환해요\nconst emptyObject = stubObject();\nconsole.log(emptyObject); // => {}\n\n// 기본값으로 사용해요\nfunction processData(data = stubObject()) {\n  return { ...data, processed: true };\n}\n\nconsole.log(processData()); // => { processed: true }\nconsole.log(processData({ name: 'John' })); // => { name: 'John', processed: true }\n\n// 함수형 프로그래밍에서 사용해요\nconst createEmpty = () => stubObject();\nconst obj = createEmpty();\nobj.newProperty = 'value'; // 새로운 객체이므로 안전해요\n```\n\n매번 새로운 객체 인스턴스를 반환해요.\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\nconst obj1 = stubObject();\nconst obj2 = stubObject();\n\nconsole.log(obj1 === obj2); // => false (다른 인스턴스)\nconsole.log(typeof obj1); // => 'object'\nconsole.log(Object.keys(obj1).length); // => 0\n```\n\n#### 파라미터\n\n파라미터는 없어요.\n\n#### 반환 값\n\n(`any`): 새로운 빈 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/stubString.md",
    "content": "# stubString (Lodash 호환성)\n\n::: warning `''`를 직접 사용하세요\n\n이 `stubString` 함수는 단순히 빈 문자열을 반환하는 래퍼 함수로 불필요한 추상화예요.\n\n대신 더 빠르고 직접적인 `''`를 사용하세요.\n\n:::\n\n항상 빈 문자열을 반환해요.\n\n```typescript\nconst emptyString = stubString();\n```\n\n## 사용법\n\n### `stubString()`\n\n항상 빈 문자열을 반환하는 함수예요. 기본값으로 빈 문자열이 필요하거나 함수형 프로그래밍에서 일관된 반환값이 필요할 때 사용해요.\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\n// 빈 문자열을 반환해요\nconst emptyString = stubString();\nconsole.log(emptyString); // => ''\n\n// 기본값으로 사용해요\nfunction formatMessage(message = stubString()) {\n  return message || '기본 메시지';\n}\n\nconsole.log(formatMessage()); // => '기본 메시지'\nconsole.log(formatMessage('안녕하세요')); // => '안녕하세요'\n\n// 함수형 프로그래밍에서 사용해요\nconst createEmpty = () => stubString();\nconst str = createEmpty();\nconsole.log(str.length); // => 0\n```\n\n매번 동일한 빈 문자열을 반환해요.\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\nconst str1 = stubString();\nconst str2 = stubString();\n\nconsole.log(str1 === str2); // => true\nconsole.log(typeof str1); // => 'string'\nconsole.log(str1.length); // => 0\n```\n\n#### 파라미터\n\n없음.\n\n#### 반환 값\n\n(`string`): 항상 빈 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/stubTrue.md",
    "content": "# stubTrue (Lodash 호환성)\n\n::: warning `true` 리터럴을 사용하세요\n\n이 `stubTrue` 함수는 불필요한 함수 호출로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 `true` 리터럴을 사용하세요.\n\n:::\n\n항상 `true` 값을 반환해요.\n\n```typescript\nconst result = stubTrue();\n```\n\n## 사용법\n\n### `stubTrue()`\n\n항상 `true` 값이 필요한 콜백 함수나 기본값으로 사용할 때 `stubTrue`를 사용하세요. 배열 메서드의 필터링이나 조건부 로직에서 일관된 `true` 값을 제공할 때 유용해요.\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// 배열에서 모든 요소를 유지하는 필터\nconst items = [1, 2, 3, 4, 5];\nconst allItems = items.filter(stubTrue);\nconsole.log(allItems); // [1, 2, 3, 4, 5]\n```\n\n조건부 설정에서 기본값으로도 사용할 수 있어요.\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// 기본적으로 활성화된 옵션들\nconst defaultOptions = {\n  enableFeatureA: stubTrue(),\n  enableFeatureB: stubTrue(),\n  enableFeatureC: stubTrue(),\n};\n\nconsole.log(defaultOptions); // { enableFeatureA: true, enableFeatureB: true, enableFeatureC: true }\n```\n\n#### 파라미터\n\n파라미터는 없어요.\n\n#### 반환 값\n\n(`boolean`): 항상 `true`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/times.md",
    "content": "# times (Lodash 호환성)\n\n주어진 횟수만큼 함수를 실행하고 결과를 배열로 반환해요.\n\n```typescript\nconst result = times(n, iteratee);\n```\n\n## 사용법\n\n### `times(n, iteratee)`\n\n주어진 횟수만큼 반복 함수를 실행하고 결과를 배열로 반환해요. 각 반복에서 현재 인덱스를 함수에 전달해요.\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\n// 0부터 2까지의 인덱스에 2를 곱한 값들의 배열\ntimes(3, i => i * 2);\n// Returns: [0, 2, 4]\n\n// 같은 값을 여러 번 생성\ntimes(2, () => 'es-toolkit');\n// Returns: ['es-toolkit', 'es-toolkit']\n```\n\n함수를 전달하지 않으면 인덱스 배열을 반환해요.\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\ntimes(3);\n// Returns: [0, 1, 2]\n```\n\n#### 파라미터\n\n- `n` (`number`): 반복할 횟수예요. 정수로 변환되며, 1보다 작거나 안전하지 않은 정수면 빈 배열을 반환해요.\n- `iteratee` (`(num: number) => T`, 선택): 각 반복에서 실행할 함수예요. 인덱스를 인수로 받아요. 제공하지 않으면 인덱스를 그대로 반환해요.\n\n#### 반환 값\n\n(`T[]`): 각 반복에서 실행한 함수의 결과들로 이뤄진 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toArray.md",
    "content": "# toArray (Lodash 호환성)\n\n::: warning Object.values와 Array.from을 사용하세요\n\n이 `toArray` 함수는 복잡한 타입 검증과 다양한 입력 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 Object.values나 Array.from을 사용하세요.\n\n:::\n\n값을 배열로 변환해요.\n\n```typescript\nconst array = toArray(value);\n```\n\n## 사용법\n\n### `toArray(value)`\n\n다양한 값을 배열로 변환해요. 객체는 값들의 배열로, 배열과 유사한 객체는 배열로, 그 외는 빈 배열로 변환해요.\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\n// 객체를 값들의 배열로 변환\ntoArray({ a: 1, b: 2 });\n// Returns: [1, 2]\n\n// 문자열을 문자 배열로 변환\ntoArray('abc');\n// Returns: ['a', 'b', 'c']\n\n// Map을 값들의 배열로 변환\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\ntoArray(map);\n// Returns: [['a', 1], ['b', 2]]\n```\n\nnull이나 undefined는 빈 배열로 변환해요.\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\ntoArray(null);\n// Returns: []\n\ntoArray(undefined);\n// Returns: []\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 배열로 변환할 값이에요.\n\n#### 반환 값\n\n(`any[]`): 변환된 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toFinite.md",
    "content": "# toFinite (Lodash 호환성)\n\n값을 유한한 숫자로 변환해요.\n\n```typescript\nconst finite = toFinite(value);\n```\n\n## 사용법\n\n### `toFinite(value)`\n\n값을 유한한 숫자로 변환해요. 무한대는 Number.MAX_VALUE로, NaN은 0으로 처리해요.\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\n// 일반 숫자는 그대로 반환\ntoFinite(3.2);\n// Returns: 3.2\n\n// 무한대는 MAX_VALUE로 변환\ntoFinite(Infinity);\n// Returns: 1.7976931348623157e+308\n\ntoFinite(-Infinity);\n// Returns: -1.7976931348623157e+308\n\n// 문자열 숫자는 숫자로 변환\ntoFinite('3.2');\n// Returns: 3.2\n```\n\n잘못된 값들은 0으로 변환해요.\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\ntoFinite(NaN);\n// Returns: 0\n\ntoFinite(Symbol.iterator);\n// Returns: 0\n\ntoFinite(null);\n// Returns: 0\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 변환할 값이에요.\n\n#### 반환 값\n\n(`number`): 변환된 유한한 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toInteger.md",
    "content": "# toInteger (Lodash 호환성)\n\n값을 정수로 변환해요.\n\n```typescript\nconst integer = toInteger(value);\n```\n\n## 사용법\n\n### `toInteger(value)`\n\n값을 정수로 변환해요. 소수 부분은 버려서 정수만 남겨요.\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\n// 소수를 정수로 변환\ntoInteger(3.2);\n// Returns: 3\n\n// 문자열 숫자를 정수로 변환\ntoInteger('3.2');\n// Returns: 3\n\n// 매우 작은 수는 0이 됨\ntoInteger(Number.MIN_VALUE);\n// Returns: 0\n\n// 무한대는 MAX_VALUE가 됨\ntoInteger(Infinity);\n// Returns: 1.7976931348623157e+308\n```\n\n잘못된 값들은 0으로 변환해요.\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\ntoInteger(NaN);\n// Returns: 0\n\ntoInteger(Symbol.iterator);\n// Returns: 0\n\ntoInteger(null);\n// Returns: 0\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 변환할 값이에요.\n\n#### 반환 값\n\n(`number`): 변환된 정수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toLength.md",
    "content": "# toLength (Lodash 호환성)\n\n값을 유효한 배열 인덱스로 변환해요.\n\n```typescript\nconst length = toLength(value);\n```\n\n## 사용법\n\n### `toLength(value)`\n\n값을 유효한 배열 인덱스로 변환해요. 0 이상 2^32-1 이하의 정수로 제한해요.\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\n// 소수를 정수로 변환\ntoLength(3.2);\n// Returns: 3\n\n// 음수는 0으로 변환\ntoLength(-1);\n// Returns: 0\n\n// 문자열 숫자를 변환\ntoLength('42');\n// Returns: 42\n\n// 매우 큰 수는 제한값으로 변환\ntoLength(Number.MAX_VALUE);\n// Returns: 4294967295\n```\n\nnull이나 undefined는 0으로 변환해요.\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\ntoLength(null);\n// Returns: 0\n\ntoLength(undefined);\n// Returns: 0\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 변환할 값이에요.\n\n#### 반환 값\n\n(`number`): 0 이상 2^32-1 이하의 유효한 배열 인덱스를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toNumber.md",
    "content": "# toNumber (Lodash 호환성)\n\n::: warning Number 생성자를 사용하세요\n\n이 `toNumber` 함수는 심볼 타입 검증과 추가 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 Number 생성자를 사용하세요.\n\n:::\n\n값을 숫자로 변환해요.\n\n```typescript\nconst number = toNumber(value);\n```\n\n## 사용법\n\n### `toNumber(value)`\n\n값을 숫자로 변환해요. 심볼은 NaN으로 처리해요.\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\n// 일반 숫자는 그대로 반환\ntoNumber(3.2);\n// Returns: 3.2\n\n// 문자열 숫자를 변환\ntoNumber('3.2');\n// Returns: 3.2\n\n// 무한대도 그대로 반환\ntoNumber(Infinity);\n// Returns: Infinity\n\n// 매우 작은 수도 그대로 반환\ntoNumber(Number.MIN_VALUE);\n// Returns: 5e-324\n```\n\n심볼과 NaN은 NaN으로 변환해요.\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\ntoNumber(Symbol.iterator);\n// Returns: NaN\n\ntoNumber(NaN);\n// Returns: NaN\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 변환할 값이에요.\n\n#### 반환 값\n\n(`number`): 변환된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toPath.md",
    "content": "# toPath (Lodash 호환성)\n\n깊은 키 문자열을 경로 배열로 변환해요.\n\n```typescript\nconst path = toPath(deepKey);\n```\n\n## 사용법\n\n### `toPath(deepKey)`\n\n깊은 키 문자열을 경로 배열로 변환해요. 점 표기법과 대괄호 표기법을 모두 지원해요.\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// 점 표기법\ntoPath('a.b.c');\n// Returns: ['a', 'b', 'c']\n\n// 대괄호 표기법\ntoPath('a[b][c]');\n// Returns: ['a', 'b', 'c']\n\n// 혼합 표기법\ntoPath('a.b[c].d');\n// Returns: ['a', 'b', 'c', 'd']\n\n// 따옴표로 감싼 키\ntoPath('a[\"b.c\"].d');\n// Returns: ['a', 'b.c', 'd']\n```\n\n앞에 점이나 빈 키도 처리해요.\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// 앞에 점이 있는 경우\ntoPath('.a.b.c');\n// Returns: ['', 'a', 'b', 'c']\n\n// 빈 문자열\ntoPath('');\n// Returns: []\n\n// 복잡한 경로\ntoPath('.a[b].c.d[e][\"f.g\"].h');\n// Returns: ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n```\n\n#### 파라미터\n\n- `deepKey` (`any`): 경로 배열로 변환할 깊은 키 문자열이에요.\n\n#### 반환 값\n\n(`string[]`): 경로의 각 부분으로 이뤄진 문자열 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toPlainObject.md",
    "content": "# toPlainObject (Lodash 호환성)\n\n::: warning Object.assign이나 스프레드 연산자를 사용하세요\n\n이 `toPlainObject` 함수는 복잡한 프로토타입 처리와 키 열거로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 Object.assign({}, obj)나 {...obj}를 사용하세요.\n\n:::\n\n값을 일반 객체로 변환해요.\n\n```typescript\nconst plainObj = toPlainObject(value);\n```\n\n## 사용법\n\n### `toPlainObject(value)`\n\n값을 일반 객체로 변환해요. 상속받은 열거 가능한 문자열 키 속성들을 자체 속성으로 평탄화해요.\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// 생성자 함수와 프로토타입\nfunction Foo() {\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nconst foo = new Foo();\ntoPlainObject(foo);\n// Returns: { b: 2, c: 3 }\n\n// 배열을 객체로 변환\ntoPlainObject([1, 2, 3]);\n// Returns: { 0: 1, 1: 2, 2: 3 }\n```\n\n다양한 객체 타입을 처리해요.\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// 문자열을 객체로 변환\ntoPlainObject('abc');\n// Returns: { 0: 'a', 1: 'b', 2: 'c' }\n\n// 이미 일반 객체인 경우\nconst obj = { a: 1, b: 2 };\ntoPlainObject(obj);\n// Returns: { a: 1, b: 2 }\n```\n\n#### 파라미터\n\n- `value` (`any`): 변환할 값이에요.\n\n#### 반환 값\n\n(`any`): 상속받은 열거 가능한 속성들이 자체 속성으로 평탄화된 일반 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toSafeInteger.md",
    "content": "# toSafeInteger (Lodash 호환성)\n\n값을 안전한 정수로 변환해요.\n\n```typescript\nconst result = toSafeInteger(value);\n```\n\n## 사용법\n\n### `toSafeInteger(value)`\n\n값을 안전한 정수로 변환하고 싶을 때 `toSafeInteger`를 사용하세요. 안전한 정수는 JavaScript에서 정확하게 표현 가능한 정수로, `Number.MIN_SAFE_INTEGER`와 `Number.MAX_SAFE_INTEGER` 범위 내의 값이에요.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(3.2);\n// Returns: 3\n\ntoSafeInteger(Infinity);\n// Returns: 9007199254740991\n\ntoSafeInteger('3.2');\n// Returns: 3\n\n// 문자열 변환\ntoSafeInteger('abc');\n// Returns: 0\n\n// 특수값 처리\ntoSafeInteger(NaN);\n// Returns: 0\n\ntoSafeInteger(null);\n// Returns: 0\n\ntoSafeInteger(undefined);\n// Returns: 0\n```\n\n무한대 값도 안전한 범위로 제한해요.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(-Infinity);\n// Returns: -9007199254740991 (Number.MIN_SAFE_INTEGER)\n\ntoSafeInteger(Number.MAX_VALUE);\n// Returns: 9007199254740991\n```\n\n배열 인덱스나 ID 값으로 사용할 때 유용해요.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\nfunction getArrayItem(arr: any[], index: any) {\n  const safeIndex = toSafeInteger(index);\n  return arr[safeIndex];\n}\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconsole.log(getArrayItem(items, '2.7')); // 'c' (인덱스 2)\nconsole.log(getArrayItem(items, Infinity)); // undefined (범위를 벗어남)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 변환할 값이에요.\n\n#### 반환 값\n\n(`number`): 변환된 안전한 정수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/toString.md",
    "content": "# toString (Lodash 호환성)\n\n::: warning String 생성자를 사용하세요\n\n이 `toString` 함수는 복잡한 배열 처리와 -0 특수 케이스 처리로 인해 느리게 동작해요.\n\n대신 더 빠르고 현대적인 String(value)를 사용하세요.\n\n:::\n\n값을 문자열로 변환해요.\n\n```typescript\nconst str = toString(value);\n```\n\n## 사용법\n\n### `toString(value)`\n\n값을 문자열로 변환해요. null과 undefined는 빈 문자열로, -0의 부호는 보존해요.\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 기본 타입들\ntoString(null);\n// Returns: ''\n\ntoString(undefined);\n// Returns: ''\n\ntoString('hello');\n// Returns: 'hello'\n\ntoString(123);\n// Returns: '123'\n\n// -0의 부호 보존\ntoString(-0);\n// Returns: '-0'\n```\n\n배열은 재귀적으로 변환해요.\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 배열을 문자열로 변환\ntoString([1, 2, 3]);\n// Returns: '1,2,3'\n\n// 중첩 배열\ntoString([1, [2, 3], 4]);\n// Returns: '1,2,3,4'\n\n// -0을 포함한 배열\ntoString([1, 2, -0]);\n// Returns: '1,2,-0'\n\n// 심볼을 포함한 배열\ntoString([Symbol('a'), Symbol('b')]);\n// Returns: 'Symbol(a),Symbol(b)'\n```\n\n#### 파라미터\n\n- `value` (`any`): 변환할 값이에요.\n\n#### 반환 값\n\n(`string`): 변환된 문자열을 반환해요. null과 undefined는 빈 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/compat/util/uniqueId.md",
    "content": "# uniqueId (Lodash 호환성)\n\n::: warning crypto.randomUUID 사용 권장\n\n고유한 식별자를 생성할 때는 crypto.randomUUID()를 사용하는 것이 더 안전하고 표준적인 방식이에요.\n\n대신 더 빠르고 현대적인 crypto.randomUUID()를 사용하세요.\n\n:::\n\n고유한 문자열 식별자를 생성해요.\n\n```typescript\nconst result = uniqueId('contact_');\n```\n\n## 사용법\n\n### `uniqueId(prefix?: string): string`\n\n고유한 문자열 식별자를 생성해요. 내부 카운터를 증가시켜서 고유성을 보장해요.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 접두사와 함께 고유 ID 생성\nuniqueId('contact_'); // => 'contact_1'\nuniqueId('user_'); // => 'user_2'\n\n// 접두사 없이 고유 ID 생성\nuniqueId(); // => '3'\nuniqueId(); // => '4'\n```\n\n연속적인 호출마다 내부 카운터가 증가해요.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 각 호출마다 다른 ID 생성\nconst ids = Array.from({ length: 5 }, () => uniqueId('item_'));\nconsole.log(ids);\n// => ['item_1', 'item_2', 'item_3', 'item_4', 'item_5']\n```\n\nDOM 요소의 고유 ID 생성에 유용해요.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 폼 요소의 고유 ID 생성\nconst inputId = uniqueId('input_');\nconst labelId = uniqueId('label_');\n\nconsole.log(inputId); // => 'input_6'\nconsole.log(labelId); // => 'label_7'\n```\n\n#### 파라미터\n\n- `prefix` (`string`, 선택): ID 앞에 붙는 접두사 문자열. 제공하지 않으면 숫자만 반환해요.\n\n#### 반환 값\n\n(`string`): 고유 식별자 문자열. 접두사가 있으면 `접두사 + 번호` 형태, 없으면 번호만 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/error/AbortError.md",
    "content": "# AbortError\n\n중단되거나 취소된 작업을 나타내는 에러 클래스예요.\n\n```typescript\nconst error = new AbortError(message);\n```\n\n## 사용법\n\n### `new AbortError(message?)`\n\n작업이 중단되거나 취소되었을 때 사용하는 에러 클래스예요. [debounce](../function/debounce.md)나 [delay](../promise/delay.md)와 같은 작업이 `AbortSignal`로 취소되었을 때 던져져요.\n\n```typescript\nimport { AbortError } from 'es-toolkit/error';\n\n// 기본 메시지로 에러를 생성해요.\nthrow new AbortError();\n// 에러 메시지: 'The operation was aborted'\n\n// 사용자 정의 메시지로 에러를 생성해요.\nthrow new AbortError('파일 업로드가 취소되었어요');\n// 에러 메시지: '파일 업로드가 취소되었어요'\n```\n\nAbortSignal과 함께 사용하는 예시예요.\n\n```typescript\nimport { AbortError, delay } from 'es-toolkit';\n\nasync function fetchData(signal: AbortSignal) {\n  try {\n    await delay(1000, { signal });\n    return '데이터 로드 완료';\n  } catch (error) {\n    if (error instanceof AbortError) {\n      console.log('작업이 취소되었어요');\n    }\n    throw error;\n  }\n}\n\nconst controller = new AbortController();\ncontroller.abort(); // 작업 취소\nawait fetchData(controller.signal); // AbortError 발생\n```\n\n#### 파라미터\n\n- `message` (`string`, 선택): 에러 메시지예요. 기본값은 `'The operation was aborted'`예요.\n\n#### 반환 값\n\n(`AbortError`): 중단된 작업을 나타내는 에러 인스턴스를 반환해요. `Error`를 상속받았으며, `name` 속성은 `'AbortError'`예요.\n"
  },
  {
    "path": "docs/ko/reference/error/TimeoutError.md",
    "content": "# TimeoutError\n\n제한 시간이 지난 작업을 나타내는 에러 클래스예요.\n\n```typescript\nconst error = new TimeoutError(message);\n```\n\n## 사용법\n\n### `new TimeoutError(message?)`\n\n작업의 제한 시간이 지났을 때 사용하는 에러 클래스예요. [timeout](../promise/timeout.md)나 [withTimeout](../promise/withTimeout.md) 같은 작업의 제한 시간이 지났을 때 던져져요.\n\n```typescript\nimport { TimeoutError } from 'es-toolkit/error';\n\n// 기본 메시지로 에러를 생성해요.\nthrow new TimeoutError();\n// 에러 메시지: 'The operation was timed out'\n\n// 사용자 정의 메시지로 에러를 생성해요.\nthrow new TimeoutError('API 요청 시간이 초과되었어요');\n// 에러 메시지: 'API 요청 시간이 초과되었어요'\n```\n\n제한 시간과 함께 사용하는 예시예요.\n\n```typescript\nimport { timeout, TimeoutError } from 'es-toolkit';\n\nasync function fetchWithTimeout(url: string) {\n  try {\n    const response = await timeout(() => fetch(url), 3000);\n    return response;\n  } catch (error) {\n    if (error instanceof TimeoutError) {\n      console.log('요청 시간이 초과되었어요');\n    }\n    throw error;\n  }\n}\n\n// 3초 이상 걸리면 TimeoutError 발생\nawait fetchWithTimeout('https://example.com/api/slow');\n```\n\n#### 파라미터\n\n- `message` (`string`, 선택): 에러 메시지예요. 기본값은 `'The operation was timed out'`예요.\n\n#### 반환 값\n\n(`TimeoutError`): 시간 초과된 작업을 나타내는 에러 인스턴스를 반환해요. `Error`를 상속받았으며, `name` 속성은 `'TimeoutError'`예요.\n"
  },
  {
    "path": "docs/ko/reference/function/after.md",
    "content": "# after\n\n`n`번째 호출부터 함수를 실행하는 새로운 함수를 만들어요.\n\n```typescript\nconst afterFunc = after(n, func);\n```\n\n## 사용법\n\n### `after(n, func)`\n\n처음 몇 번의 호출을 무시하고, `n`번째부터 함수를 실행하고 싶을 때 `after`를 사용하세요. 이벤트나 비동기 작업에서 특정 횟수 이후에만 동작을 실행해야 할 때 유용해요.\n\n```typescript\nimport { after } from 'es-toolkit/function';\n\nconst afterFn = after(3, () => {\n  console.log('실행됨');\n});\n\n// 아무것도 로깅하지 않아요\nafterFn();\n// 아무것도 로깅하지 않아요\nafterFn();\n// '실행됨'을 로깅해요\nafterFn();\n// '실행됨'을 로깅해요\nafterFn();\n```\n\n#### 파라미터\n\n- `n` (`number`): `func`이 실행되기 위해 필요한 호출 횟수예요.\n- `func` (`F`): 실행될 함수예요.\n\n#### 반환 값\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 호출 횟수를 추적하고 `n`번째 호출부터 `func`을 실행하는 새로운 함수예요. `n`번 이전 호출에서는 `undefined`를 반환해요.\n\n#### 에러\n\n`n`이 정수가 아니거나 음수일 때 에러를 발생시켜요.\n"
  },
  {
    "path": "docs/ko/reference/function/ary.md",
    "content": "# ary\n\n함수가 받을 수 있는 인자 개수를 제한하는 새로운 함수를 만들어요.\n\n```typescript\nconst limitedFunc = ary(func, n);\n```\n\n## 사용법\n\n### `ary(func, n)`\n\n함수가 받을 수 있는 인자 개수를 제한하고 싶을 때 `ary`를 사용하세요. 추가로 전달된 인자는 무시돼요. 함수형 프로그래밍에서 콜백 함수가 예상치 않은 인자를 받는 것을 방지할 때 특히 유용해요.\n\n```typescript\nimport { ary } from 'es-toolkit/function';\n\nfunction fn(a: number, b: number, c: number) {\n  return Array.from(arguments);\n}\n\n// 인자를 받지 않도록 제한\nary(fn, 0)(1, 2, 3);\n// Returns: []\n\n// 1개의 인자만 받도록 제한\nary(fn, 1)(1, 2, 3);\n// Returns: [1]\n\n// 2개의 인자만 받도록 제한\nary(fn, 2)(1, 2, 3);\n// Returns: [1, 2]\n```\n\n`map` 같은 배열 메서드와 함께 사용할 때 특히 유용해요.\n\n```typescript\n// parseInt는 두 개의 인자를 받지만 map은 세 개를 전달해요\n['1', '2', '3'].map(parseInt);\n// Returns: [1, NaN, NaN]\n\n['1', '2', '3'].map(parseInt);\n// 결과: [1, NaN, NaN]\n// 왜냐하면 parseInt('2', 1), parseInt('3', 2)가 실행되기 때문이에요.\n\n// ary를 사용해서 첫 번째 인자만 전달하도록 제한\n['1', '2', '3'].map(ary(parseInt, 1));\n// 결과: [1, 2, 3] ✅\n```\n\n#### 파라미터\n\n- `func` (`F`): 인자 개수를 제한할 함수예요.\n- `n` (`number`): 최대로 받을 인자의 개수예요.\n\n#### 반환 값\n\n(`(...args: any[]) => ReturnType<F>`): 최대 `n`개의 인자만 받는 새로운 함수예요.\n"
  },
  {
    "path": "docs/ko/reference/function/asyncNoop.md",
    "content": "# asyncNoop\n\n비동기적으로 아무것도 하지 않는 함수예요.\n\n```typescript\nconst promise = asyncNoop();\n```\n\n::: info [`noop`](./noop.md) 함수\n\n동기적으로 아무것도 하지 않는 함수가 필요하다면, 바로 `void`를 반환하는 `noop` 함수를 사용하세요.\n\n:::\n\n## 사용법\n\n### `asyncNoop()`\n\n비동기 함수가 필요한 곳에 빈 자리를 채우거나 기본값으로 사용하고 싶을 때 `asyncNoop`을 사용하세요. `undefined`로 이행하는 `Promise`를 반환해요.\n\n```typescript\nimport { asyncNoop } from 'es-toolkit/function';\n\n// 기본값으로 사용하는 예시\ninterface Props {\n  fetchData?: () => Promise<void>;\n}\n\nfunction MyComponent({ fetchData = asyncNoop }: Props) {\n  const handleFetchData = async () => {\n    // fetchData는 항상 함수이므로 안전하게 호출할 수 있어요\n    await fetchData();\n  };\n\n  handleFetchData();\n}\n\n// 직접 호출하는 예시\nasyncNoop();\n// Returns: Promise<void>\n\nawait asyncNoop();\n// Returns: undefined\n```\n\n#### 반환 값\n\n(`Promise<void>`): `undefined`로 이행하는 `Promise`예요.\n"
  },
  {
    "path": "docs/ko/reference/function/before.md",
    "content": "# before\n\n함수의 호출 횟수를 제한하는 새로운 함수를 만들어요.\n\n```typescript\nconst limitedFunc = before(n, func);\n```\n\n## 사용법\n\n### `before(n, func)`\n\n함수가 특정 횟수까지만 실행되도록 제한하고 싶을 때 `before`를 사용하세요. `n-1`번째 호출까지만 함수가 실행되고, `n`번째부터는 더 이상 실행되지 않아요.\n\n```typescript\nimport { before } from 'es-toolkit/function';\n\nconst beforeFn = before(3, () => {\n  console.log('실행됨');\n});\n\n// '실행됨'을 로깅해요\nbeforeFn();\n\n// '실행됨'을 로깅해요\nbeforeFn();\n\n// 아무것도 로깅하지 않아요\nbeforeFn();\n\n// 아무것도 로깅하지 않아요\nbeforeFn();\n```\n\n초기화나 설정 같은 한 번만 실행되어야 하는 작업에 유용해요.\n\n```typescript\nlet initialized = false;\n\nconst initialize = before(2, () => {\n  console.log('초기화 중...');\n  initialized = true;\n});\n\n// '초기화 중...'을 로깅하고 초기화를 수행해요\ninitialize();\n\n// 이미 초기화되었으므로 아무것도 하지 않아요\ninitialize();\n```\n\n#### 파라미터\n\n- `n` (`number`): 반환된 함수가 `func`를 호출할 수 있는 최대 횟수예요. `n`이 0이면 `func`는 호출되지 않아요. 양의 정수인 경우 최대 `n-1`번 호출돼요.\n- `func` (`F`): 호출 횟수가 제한될 함수예요.\n\n#### 반환 값\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 호출 횟수를 추적하고 `n-1`번째까지만 `func`를 실행하는 새로운 함수예요. `n`번째 이후 호출에서는 `undefined`를 반환해요.\n\n#### 에러\n\n`n`이 정수가 아니거나 음수일 때 에러를 발생시켜요.\n"
  },
  {
    "path": "docs/ko/reference/function/curry.md",
    "content": "# curry\n\n함수를 커링해서 한 번에 하나의 인자로 호출할 수 있도록 해요.\n\n```typescript\nconst curriedFunc = curry(func);\n```\n\n## 사용법\n\n### `curry(func)`\n\n함수를 부분적으로 적용하고 싶을 때 `curry`를 사용하세요. 커링된 함수는 필요한 모든 인자를 받을 때까지 새로운 함수를 반환해요. 모든 인자가 제공되면 원래 함수가 실행돼요.\n\n```typescript\nimport { curry } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curry(sum);\n\n// 인자 `a`에 값 `10`을 제공해요\nconst sum10 = curriedSum(10);\n\n// 인자 `b`에 값 `15`를 제공해요\nconst sum25 = sum10(15);\n\n// 인자 `c`에 값 `5`를 제공해요\n// 모든 인자를 받았으므로 이제 값을 반환해요\nconst result = sum25(5);\n// Returns: 30\n```\n\n재사용 가능한 함수를 만들 때 유용해요.\n\n```typescript\nfunction multiply(a: number, b: number) {\n  return a * b;\n}\n\nconst curriedMultiply = curry(multiply);\nconst double = curriedMultiply(2);\nconst triple = curriedMultiply(3);\n\ndouble(5); // Returns: 10\ntriple(5); // Returns: 15\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 커링할 함수예요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 한 번에 하나의 인자로 호출할 수 있는 커링된 함수예요.\n"
  },
  {
    "path": "docs/ko/reference/function/curryRight.md",
    "content": "# curryRight\n\n함수를 오른쪽에서 왼쪽으로 커링해서 한 번에 하나의 인자로 호출할 수 있도록 해요.\n\n```typescript\nconst curriedFunc = curryRight(func);\n```\n\n## 사용법\n\n### `curryRight(func)`\n\n함수를 오른쪽에서 왼쪽으로 부분 적용하고 싶을 때 `curryRight`를 사용하세요. 일반 `curry`와 달리 마지막 인자부터 받아요.\n\n```typescript\nimport { curryRight } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curryRight(sum);\n\n// 인자 `c`에 값 `10`을 제공해요\nconst add10 = curriedSum(10);\n\n// 인자 `b`에 값 `15`를 제공해요\nconst add25 = add10(15);\n\n// 인자 `a`에 값 `5`를 제공해요\n// 모든 인자를 받았으므로 이제 값을 반환해요\nconst result = add25(5);\n// Returns: 30\n```\n\n오른쪽에서 왼쪽으로 인자를 적용하는 것이 더 자연스러운 경우에 유용해요.\n\n```typescript\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst curriedGreet = curryRight(greet);\nconst greetJohn = curriedGreet('John');\n\ngreetJohn('Hello'); // Returns: 'Hello, John!'\ngreetJohn('Hi'); // Returns: 'Hi, John!'\n```\n\n#### 파라미터\n\n- `func` (`(...args: any[]) => any`): 커링할 함수예요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 오른쪽에서 왼쪽으로 한 번에 하나의 인자로 호출할 수 있는 커링된 함수예요.\n"
  },
  {
    "path": "docs/ko/reference/function/debounce.md",
    "content": "# debounce\n\n함수 호출을 지연시키는 디바운스된 함수를 만들어요.\n\n```typescript\nconst debouncedFunc = debounce(func, debounceMs, options);\n```\n\n## 사용법\n\n### `debounce(func, debounceMs, options)`\n\n연속된 호출을 하나로 합치고 싶을 때 `debounce`를 사용하세요. 디바운스된 함수는 마지막 호출 후 지정된 시간이 지나야 실행돼요. 검색창 입력이나 창 크기 조절 같은 빠른 이벤트 처리에 유용해요.\n\n```typescript\nimport { debounce } from 'es-toolkit/function';\n\nconst debouncedFunction = debounce(() => {\n  console.log('실행됨');\n}, 1000);\n\n// 1초 안에 다시 호출되지 않으면 '실행됨'을 로깅해요\ndebouncedFunction();\n\n// 이전 호출을 취소해요\ndebouncedFunction.cancel();\n\n// 대기 중인 함수를 즉시 실행해요\ndebouncedFunction.flush();\n```\n\n다음과 같이 사용자 인풋에 따라 검색처럼 무거운 API를 호출할 때 유용하게 사용할 수 있어요.\n\n```typescript\nconst searchInput = document.getElementById('search');\nconst searchResults = debounce(async (query: string) => {\n  const results = await fetchSearchResults(query);\n  displayResults(results);\n}, 300);\n\nsearchInput.addEventListener('input', e => {\n  searchResults(e.target.value);\n});\n```\n\n[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)을 이용해서 디바운스된 함수 호출을 취소할 수 있어요.\n\n```typescript\nconst controller = new AbortController();\nconst debouncedWithSignalFunction = debounce(\n  () => {\n    console.log('Function executed');\n  },\n  1000,\n  { signal: controller.signal }\n);\n\n// 1초 안에 다시 호출되지 않으면, '실행됨'을 로깅해요\ndebouncedWithSignalFunction();\n\n// debounce 함수 호출을 취소해요\ncontroller.abort();\n```\n\n#### 파라미터\n\n- `func` (`F`): debounce된 함수를 만들 함수.\n- `debounceMs`(`number`): debounce로 지연시킬 밀리초.\n- `options` (`DebounceOptions`, optional): 옵션 객체.\n  - `signal` (`AbortSignal`, optional): 디바운스된 함수를 취소하기 위한 선택적 `AbortSignal`.\n  - `edges` (`Array<'leading' | 'trailing'>`, optional): 원래 함수를 언제 실행할지 나타내는 배열. 기본값은 `['trailing']`이에요.\n    - `'leading'`이 포함되면, 디바운스된 함수를 처음으로 호출했을 때 즉시 원래 함수를 실행해요.\n    - `'trailing'`이 포함되면, 마지막 디바운스된 함수 호출로부터 `debounceMs` 밀리세컨드가 지나면 원래 함수를 실행해요.\n    - `'leading'`과 `'trailing'`이 모두 포함된다면, 원래 함수는 실행을 지연하기 시작할 때와 끝날 때 모두 호출돼요. 그렇지만 양쪽 시점 모두에 호출되기 위해서는, 디바운스된 함수가 `debounceMs` 밀리세컨드 사이에 최소 2번은 호출되어야 해요. 디바운스된 함수를 한 번 호출해서 원래 함수를 두 번 호출할 수는 없기 때문이에요.\n\n#### 반환 값\n\n(`DebouncedFunction<F>`): 디바운스된 함수로, 다음 메서드를 가지고 있어요.\n\n- `cancel()`: 예정된 호출을 취소해요.\n- `flush()`: 대기 중인 함수를 즉시 실행해요.\n- `schedule()`: 함수 실행을 다시 예약해요.\n"
  },
  {
    "path": "docs/ko/reference/function/flow.md",
    "content": "# flow\n\n여러 함수를 순서대로 실행하는 새로운 함수를 만들어요.\n\n```typescript\nconst combinedFunc = flow(func1, func2, func3);\n```\n\n## 사용법\n\n### `flow(...funcs)`\n\n함수들을 연결해서 파이프라인을 만들고 싶을 때 `flow`를 사용하세요. 이전 함수의 결과가 다음 함수의 입력이 돼요. 데이터를 여러 단계로 변환할 때 유용해요.\n\n```typescript\nimport { flow } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\nconst combined = flow(add, square, double);\n\n// 먼저 add(1, 2) = 3\n// 그 다음 square(3) = 9\n// 마지막으로 double(9) = 18\ncombined(1, 2);\n// Returns: 18\n```\n\n데이터 변환 파이프라인을 만들 때 특히 유용해요.\n\n```typescript\nconst processData = flow(\n  (text: string) => text.trim(),\n  (text: string) => text.toLowerCase(),\n  (text: string) => text.split(' '),\n  (words: string[]) => words.filter(word => word.length > 3)\n);\n\nprocessData('  Hello World JavaScript  ');\n// Returns: ['hello', 'world', 'javascript']\n```\n\n#### 파라미터\n\n- `funcs` (`Array<(...args: any[]) => any>`): 순서대로 실행할 함수들이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 주어진 함수들을 순서대로 실행하는 새로운 함수예요. 첫 번째 함수는 여러 인자를 받을 수 있고, 나머지 함수들은 이전 함수의 결과를 받아요.\n"
  },
  {
    "path": "docs/ko/reference/function/flowRight.md",
    "content": "# flowRight\n\n주어진 함수들을 오른쪽에서 왼쪽으로 순서대로 실행하는 새로운 함수를 만들어요.\n\n```typescript\nconst combined = flowRight(func1, func2, func3);\n```\n\n## 사용법\n\n### `flowRight(...funcs)`\n\n여러 함수를 오른쪽에서 왼쪽으로 순서대로 실행하는 새로운 함수를 만들고 싶을 때 `flowRight`를 사용하세요. 이전 함수의 반환 값이 다음 함수의 파라미터로 전달돼요.\n\n함수를 역순으로 조합하여 데이터 변환 파이프라인을 만들 때 유용해요. `flow`와 반대 방향으로 함수를 실행해요.\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\n// 오른쪽에서 왼쪽으로 실행: double -> square -> add\nconst combined = flowRight(double, square, add);\nconsole.log(combined(1, 2)); // 18\n// 실행 순서: add(1, 2) = 3, square(3) = 9, double(9) = 18\n\n// 단일 함수로도 사용 가능해요\nconst single = flowRight((x: number) => x + 1);\nconsole.log(single(5)); // 6\n```\n\n`this` 컨텍스트도 함수들에게 전달돼요.\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst context = {\n  multiplier: 3,\n};\n\nfunction multiply(this: typeof context, x: number) {\n  return x * this.multiplier;\n}\n\nconst add = (x: number) => x + 10;\n\nconst combined = flowRight(multiply, add).bind(context);\nconsole.log(combined(5)); // 45\n// 실행 순서: add(5) = 15, multiply(15) = 45\n```\n\n#### 파라미터\n\n- `funcs` (`(...args: any[]) => any`): 조합할 함수들이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => any`): 주어진 함수들을 오른쪽에서 왼쪽으로 순서대로 실행하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/identity.md",
    "content": "# identity\n\n입력받은 값을 그대로 반환해요.\n\n```typescript\nconst result = identity(value);\n```\n\n## 사용법\n\n### `identity(value)`\n\n어떤 값을 변경하지 않고 그대로 반환하고 싶을 때 `identity`를 사용하세요.\n\n인자로 주어지는 함수의 기본값으로 사용할 때 유용해요. 배열의 `map`이나 `filter`에서 값 자체를 반환하거나, 함수형 프로그래밍에서 플레이스홀더 역할로 사용해요.\n\n```typescript\nimport { identity } from 'es-toolkit/function';\n\n// 숫자를 그대로 반환해요\nconst num = identity(5);\nconsole.log(num); // 5\n\n// 문자열을 그대로 반환해요\nconst str = identity('hello');\nconsole.log(str); // 'hello'\n\n// 객체를 그대로 반환해요\nconst obj = identity({ key: 'value' });\nconsole.log(obj); // { key: 'value' }\n\n// 배열에서 사용하는 예시\nconst numbers = [1, 2, 3, 4, 5];\nconst same = numbers.map(identity);\nconsole.log(same); // [1, 2, 3, 4, 5]\n```\n\n#### 파라미터\n\n- `value` (`T`): 반환할 값이에요.\n\n#### 반환 값\n\n(`T`): 입력받은 값을 그대로 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/memoize.md",
    "content": "# memoize\n\n함수 결과를 캐시해서 같은 인수로 다시 호출할 때 더 빠르게 실행되도록 해요.\n\n```typescript\nconst memoizedFunc = memoize(func, options);\n```\n\n## 사용법\n\n### `memoize(func, options?)`\n\n함수의 실행 결과를 캐시하여 성능을 최적화하고 싶을 때 `memoize`를 사용하세요. 같은 인수로 다시 호출하면 캐시된 결과를 반환해서 중복 연산을 피할 수 있어요.\n\n하나의 파라미터만 받는 함수에서 사용해요. 여러 인수를 받는 함수라면 하나의 객체나 배열로 합쳐서 전달하세요.\n\n배열, 객체 같이 레퍼런스로 비교되는 값을 인수로 사용한다면 `getCacheKey` 함수를 제공해서 적절한 캐시 키를 생성하도록 해야 해요.\n\n```typescript\nimport { memoize } from 'es-toolkit/function';\n\n// 기본 사용법\nconst add = (x: number) => x + 10;\nconst memoizedAdd = memoize(add);\n\nconsole.log(memoizedAdd(5)); // 15 (계산됨)\nconsole.log(memoizedAdd(5)); // 15 (캐시된 결과)\nconsole.log(memoizedAdd.cache.size); // 1\n\n// 배열 인수에 대한 캐시 키 제공\nconst sum = (arr: number[]) => arr.reduce((sum, n) => sum + n, 0);\nconst memoizedSum = memoize(sum, {\n  getCacheKey: (arr: number[]) => arr.join(','),\n});\n\nconsole.log(memoizedSum([1, 2, 3])); // 6 (계산됨)\nconsole.log(memoizedSum([1, 2, 3])); // 6 (캐시된 결과)\n```\n\n커스텀 캐시를 사용할 수도 있어요.\n\n```typescript\nimport { memoize, MemoizeCache } from 'es-toolkit/function';\n\nclass LRUCache<K, V> implements MemoizeCache<K, V> {\n  private cache = new Map<K, V>();\n  private maxSize = 100;\n\n  set(key: K, value: V): void {\n    if (this.cache.size >= this.maxSize) {\n      const firstKey = this.cache.keys().next().value;\n      this.cache.delete(firstKey);\n    }\n    this.cache.set(key, value);\n  }\n\n  get(key: K): V | undefined {\n    return this.cache.get(key);\n  }\n\n  has(key: K): boolean {\n    return this.cache.has(key);\n  }\n\n  delete(key: K): boolean {\n    return this.cache.delete(key);\n  }\n\n  clear(): void {\n    this.cache.clear();\n  }\n\n  get size(): number {\n    return this.cache.size;\n  }\n}\n\nconst customCache = new LRUCache<string, number>();\nconst memoizedWithCustomCache = memoize(expensiveFunction, {\n  cache: customCache,\n});\n```\n\n#### 파라미터\n\n- `func` (`F`): 메모이제이션할 함수예요. 하나의 인수만 받아야 해요.\n- `options` (객체, 선택): 메모이제이션 설정 옵션이에요.\n  - `cache` (`MemoizeCache<any, ReturnType<F>>`, 선택): 결과를 저장할 캐시 객체예요. 기본값은 새로운 `Map`이에요.\n  - `getCacheKey` (`(arg: Parameters<F>[0]) => unknown`, 선택): 캐시 키를 생성하는 함수예요. 비원시 값을 인수로 사용할 때 필요해요.\n\n#### 반환 값\n\n(`F & { cache: MemoizeCache<any, ReturnType<F>> }`): 메모이제이션된 함수를 반환해요. 내부 캐시에 접근할 수 있는 `cache` 프로퍼티도 포함돼요.\n"
  },
  {
    "path": "docs/ko/reference/function/negate.md",
    "content": "# negate\n\n참 또는 거짓을 반환하는 함수의 반환 값을 반대로 바꾸는 새로운 함수를 만들어요.\n\n```typescript\nconst negatedFunc = negate(booleanFunc);\n```\n\n## 사용법\n\n### `negate(func)`\n\n참 또는 거짓 값을 반환하는 함수의 결과를 반대로 바꾸고 싶을 때 `negate`를 사용하세요.\n\n조건부 함수나 필터링 로직을 반전시킬 때 유용해요. 예를 들어, 짝수를 찾는 함수를 홀수를 찾는 함수로 바꿀 수 있어요.\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\n// 기본 사용법\nconst isEven = (n: number) => n % 2 === 0;\nconst isOdd = negate(isEven);\n\nconsole.log(isEven(2)); // true\nconsole.log(isOdd(2)); // false\n\nconsole.log(isEven(3)); // false\nconsole.log(isOdd(3)); // true\n\n// 배열 필터링에서 사용\nconst numbers = [1, 2, 3, 4, 5, 6];\n\nconst evenNumbers = numbers.filter(isEven);\nconsole.log(evenNumbers); // [2, 4, 6]\n\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n```\n\n복잡한 조건 함수도 반전시킬 수 있어요.\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\nconst isLongString = (str: string) => str.length > 5;\nconst isShortString = negate(isLongString);\n\nconst words = ['hi', 'hello', 'world', 'javascript'];\n\nconst longWords = words.filter(isLongString);\nconsole.log(longWords); // ['hello', 'javascript']\n\nconst shortWords = words.filter(isShortString);\nconsole.log(shortWords); // ['hi', 'world']\n```\n\n#### 파라미터\n\n- `func` (`F`): 불린 값을 반환하는 함수예요.\n\n#### 반환 값\n\n(`F`): 원래 함수와 같은 인수를 받지만 반대의 불린 값을 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/noop.md",
    "content": "# noop\n\n아무것도 하지 않는 빈 함수예요.\n\n```typescript\nnoop();\n```\n\n::: info [`asyncNoop`](./asyncNoop.md) 함수\n\n비동기적으로 아무것도 하지 않는 함수가 필요하다면, 바로 `Promise<void>`를 반환하는 `asyncNoop` 함수를 사용하세요.\n\n:::\n\n## 사용법\n\n### `noop()`\n\n아무 동작도 하지 않는 함수가 필요할 때 `noop`을 사용하세요.\n\n함수가 필수인 곳에서 기본값으로 사용하거나, 콜백 함수를 비활성화하고 싶을 때 유용해요. 플레이스홀더 역할이나 초기화 단계에서 자주 사용해요.\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 선택적 콜백의 기본값으로 사용\ninterface EventHandlers {\n  onSuccess?: () => void;\n  onError?: () => void;\n}\n\nfunction processData({ onSuccess = noop, onError = noop }: EventHandlers = {}) {\n  try {\n    // 데이터 처리 로직\n    console.log('데이터 처리 완료');\n    onSuccess(); // 안전하게 호출 가능\n  } catch (error) {\n    onError(); // 안전하게 호출 가능\n  }\n}\n\n// undefined 체크 없이 안전하게 사용\nprocessData({\n  onSuccess: () => console.log('성공!'),\n  // onError는 noop으로 기본값 처리됨\n});\n```\n\n배열의 메서드에서도 사용할 수 있어요.\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 조건부로 함수 실행\nconst operations = [\n  () => console.log('첫 번째 작업'),\n  shouldRunSecond ? () => console.log('두 번째 작업') : noop,\n  () => console.log('세 번째 작업'),\n];\n\noperations.forEach(op => op()); // 모든 작업을 안전하게 실행\n```\n\n#### 반환 값\n\n(`void`): 아무것도 반환하지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/function/once.md",
    "content": "# once\n\n함수를 한 번만 실행하도록 제한하는 새로운 함수를 만들어요.\n\n```typescript\nconst onceFunc = once(func);\n```\n\n## 사용법\n\n### `once(func)`\n\n함수가 한 번만 실행되도록 제한하고 싶을 때 `once`를 사용하세요. 이후 호출에서는 첫 번째 호출의 결과를 그대로 반환해요.\n\n초기화 함수나 이벤트 핸들러 등 한 번만 실행되어야 하는 로직에 유용해요. 중복 실행을 방지하고 일관된 결과를 보장해요.\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\n// 초기화 함수 예시\nconst initialize = once(() => {\n  console.log('앱을 초기화합니다');\n  return { status: 'initialized' };\n});\n\nconsole.log(initialize()); // '앱을 초기화합니다' 로그 출력, { status: 'initialized' } 반환\nconsole.log(initialize()); // 로그 없이 { status: 'initialized' } 반환\nconsole.log(initialize()); // 로그 없이 { status: 'initialized' } 반환\n\n// API 호출 예시\nconst fetchConfig = once(async () => {\n  console.log('설정을 가져옵니다');\n  const response = await fetch('/api/config');\n  return response.json();\n});\n\n// 첫 번째 호출에서만 실제 API 요청이 실행됨\nconst config1 = await fetchConfig();\nconst config2 = await fetchConfig(); // 캐시된 결과 반환\n```\n\n인수가 있는 함수도 사용할 수 있어요.\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\nconst logOnce = once((message: string) => {\n  console.log(`중요한 메시지: ${message}`);\n});\n\nlogOnce('안녕하세요'); // '중요한 메시지: 안녕하세요' 출력\nlogOnce('다시 안녕하세요'); // 출력되지 않음 (이미 호출됨)\nlogOnce('또 안녕하세요'); // 출력되지 않음 (이미 호출됨)\n```\n\n#### 파라미터\n\n- `func` (`F`): 한 번만 호출되도록 제한할 함수예요.\n\n#### 반환 값\n\n(`F`): 첫 번째 호출 후 결과를 캐시하고 이후 호출에서 같은 결과를 반환하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/partial.md",
    "content": "# partial\n\n일부 인수를 미리 적용한 새로운 함수를 만들어요.\n\n```typescript\nconst partialFunc = partial(func, arg1, arg2);\n```\n\n## 사용법\n\n### `partial(func, ...args)`\n\n함수의 일부 인수를 미리 고정하고 싶을 때 `partial`을 사용하세요. 미리 제공된 인수들이 함수 앞쪽에 배치되고, 나중에 전달되는 인수들은 뒤쪽에 추가돼요.\n\n함수형 프로그래밍에서 자주 사용되는 커링(currying)과 비슷한 개념이에요. `bind`와 달리 `this` 컨텍스트를 고정하지 않아요.\n\n`partial.placeholder`를 사용하면 특정 위치의 인수를 나중에 전달할 수 있어요.\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\n// 기본 사용법\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst sayHello = partial(greet, 'Hello');\nconsole.log(sayHello('John')); // 'Hello, John!'\nconsole.log(sayHello('Jane')); // 'Hello, Jane!'\n\n// 여러 인수 적용\nfunction multiply(a: number, b: number, c: number) {\n  return a * b * c;\n}\n\nconst double = partial(multiply, 2);\nconsole.log(double(3, 4)); // 24\n\nconst doubleAndTriple = partial(multiply, 2, 3);\nconsole.log(doubleAndTriple(4)); // 24\n```\n\n플레이스홀더를 사용해서 인수 순서를 조정할 수 있어요.\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\n// 두 번째 인수만 고정하고 첫 번째와 세 번째는 나중에 전달\nconst subtractFrom5 = partial(subtract, partial.placeholder, 5, partial.placeholder);\nconsole.log(subtractFrom5(10, 2)); // 10 - 5 - 2 = 3\n\n// 배열 메소드와 함께 사용\nconst numbers = [1, 2, 3, 4, 5];\nconst addTen = partial((x: number, y: number) => x + y, 10);\nconst result = numbers.map(addTen);\nconsole.log(result); // [11, 12, 13, 14, 15]\n```\n\n#### 파라미터\n\n- `func` (`F`): 인수를 부분적으로 적용할 함수예요.\n- `args` (`any[]`, 선택): 미리 적용할 인수들이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => ReturnType<F>`): 일부 인수가 미리 적용된 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/partialRight.md",
    "content": "# partialRight\n\n일부 파라미터를 뒤쪽에서부터 미리 적용한 새로운 함수를 만들어요.\n\n```typescript\nconst partialRightFunc = partialRight(func, arg1, arg2);\n```\n\n## 사용법\n\n### `partialRight(func, ...args)`\n\n함수의 일부 파라미터를 뒤쪽에서부터 고정하고 싶을 때 `partialRight`를 사용하세요. `partial`과 반대로, 미리 제공된 파라미터들이 함수 뒤쪽에 배치되고, 나중에 전달되는 파라미터들은 앞쪽에 추가돼요.\n\n함수의 마지막 파라미터들을 고정하고 앞쪽 파라미터들만 동적으로 변경하고 싶을 때 유용해요.\n\n`partialRight.placeholder`를 사용하면 특정 위치의 파라미터를 나중에 전달할 수 있어요.\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\n// 기본 사용법\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst greetJohn = partialRight(greet, 'John');\nconsole.log(greetJohn('Hello')); // 'Hello, John!'\nconsole.log(greetJohn('Hi')); // 'Hi, John!'\n\n// 여러 파라미터 적용\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\nconst subtractFrom10And5 = partialRight(subtract, 5, 2);\nconsole.log(subtractFrom10And5(10)); // 10 - 5 - 2 = 3\n\n// 수학 연산에서 상수 적용\nfunction divide(dividend: number, divisor: number) {\n  return dividend / divisor;\n}\n\nconst divideBy2 = partialRight(divide, 2);\nconsole.log(divideBy2(10)); // 10 / 2 = 5\nconsole.log(divideBy2(20)); // 20 / 2 = 10\n```\n\n플레이스홀더를 사용해서 파라미터 순서를 조정할 수 있어요.\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\nfunction formatMessage(level: string, message: string, timestamp: string) {\n  return `[${level}] ${message} at ${timestamp}`;\n}\n\n// 마지막 파라미터만 고정하고 나머지는 나중에 전달\nconst logWithTime = partialRight(formatMessage, partialRight.placeholder, '2023-01-01');\nconsole.log(logWithTime('INFO', 'Application started'));\n// '[INFO] Application started at 2023-01-01'\n\n// 배열과 함께 사용\nconst numbers = [1, 2, 3, 4, 5];\nconst appendSuffix = partialRight((num: number, suffix: string) => `${num}${suffix}`, 'th');\nconst result = numbers.map(appendSuffix);\nconsole.log(result); // ['1th', '2th', '3th', '4th', '5th']\n```\n\n#### 파라미터\n\n- `func` (`F`): 파라미터를 부분적으로 적용할 함수예요.\n- `args` (`any[]`, 선택): 뒤쪽부터 미리 적용할 파라미터들이에요.\n\n#### 반환 값\n\n(`(...args: any[]) => ReturnType<F>`): 일부 파라미터가 뒤쪽에서부터 미리 적용된 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/rest.md",
    "content": "# rest\n\n특정 인덱스부터의 파라미터들을 배열로 묶어서 함수에 전달하는 새로운 함수를 만들어요.\n\n```typescript\nconst restFunc = rest(func, startIndex);\n```\n\n## 사용법\n\n### `rest(func, startIndex?)`\n\n함수의 나머지 파라미터들을 배열로 묶어서 전달하고 싶을 때 `rest`를 사용하세요. 특정 인덱스 이전의 파라미터들은 개별로 전달되고, 이후의 파라미터들은 배열로 묶여서 전달돼요.\n\n가변 파라미터를 받는 함수를 만들거나, 기존 함수의 파라미터 처리 방식을 변경할 때 유용해요.\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\n// 기본 사용법 (마지막 파라미터부터 배열로 묶기)\nfunction sum(a: number, b: number, numbers: number[]) {\n  return a + b + numbers.reduce((sum, n) => sum + n, 0);\n}\n\nconst restSum = rest(sum); // startIndex는 기본적으로 func.length - 1 (2)\nconsole.log(restSum(1, 2, 3, 4, 5)); // 1 + 2 + (3 + 4 + 5) = 15\n// sum 함수는 [1, 2, [3, 4, 5]]로 호출됨\n\n// 다른 인덱스부터 배열로 묶기\nfunction logMessage(level: string, messages: string[]) {\n  console.log(`[${level}] ${messages.join(' ')}`);\n}\n\nconst restLog = rest(logMessage, 1); // 1번째 인덱스부터 배열로 묶기\nrestLog('INFO', 'Application', 'started', 'successfully');\n// logMessage('INFO', ['Application', 'started', 'successfully']) 형태로 호출\n\n// 실용적인 예시: 첫 번째 파라미터는 개별로, 나머지는 배열로\nfunction format(template: string, values: any[]) {\n  return values.reduce((result, value, index) => {\n    return result.replace(`{${index}}`, value);\n  }, template);\n}\n\nconst restFormat = rest(format, 1);\nconsole.log(restFormat('Hello {0}, welcome to {1}!', 'John', 'our site'));\n// 'Hello John, welcome to our site!'\n```\n\n파라미터가 부족한 경우의 처리도 자동으로 해줘요.\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\nfunction greet(greeting: string, name: string, extras: string[]) {\n  const extraText = extras.length > 0 ? ` ${extras.join(' ')}` : '';\n  return `${greeting} ${name}!${extraText}`;\n}\n\nconst restGreet = rest(greet);\n\nconsole.log(restGreet('Hello', 'Alice', 'Have a great day!'));\n// 'Hello Alice! Have a great day!'\n\nconsole.log(restGreet('Hi', 'Bob'));\n// 'Hi Bob!' (extras는 빈 배열이 됨)\n\nconsole.log(restGreet('Hey'));\n// 'Hey undefined!' (name은 undefined, extras는 빈 배열)\n```\n\n#### 파라미터\n\n- `func` (`F`): 파라미터 처리 방식을 변경할 함수예요.\n- `startIndex` (`number`, 선택): 배열로 묶기 시작할 인덱스예요. 기본값은 `func.length - 1`으로, 마지막 파라미터부터 배열로 묶어요.\n\n#### 반환 값\n\n(`(...args: any[]) => ReturnType<F>`): 특정 인덱스부터의 파라미터들을 배열로 묶어서 원래 함수에 전달하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/function/retry.md",
    "content": "# retry\n\nPromise를 반환하는 함수가 성공할 때까지 반복해서 실행해요.\n\n```typescript\nconst result = await retry(asyncFunc, options);\n```\n\n## 사용법\n\n### `retry(func, options?)`\n\n비동기 함수가 실패했을 때 자동으로 재시도하고 싶을 때 `retry`를 사용하세요. API 호출이나 네트워크 요청처럼 일시적으로 실패할 수 있는 작업에 유용해요.\n\n재시도 횟수, 재시도 간격, 취소 시그널을 설정할 수 있어요. 재시도 간격은 고정값이거나 재시도 횟수에 따라 동적으로 계산하는 함수를 사용할 수 있어요.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\n// 기본 사용법 (무한 재시도)\nconst data1 = await retry(async () => {\n  const response = await fetch('/api/data');\n  if (!response.ok) throw new Error('Failed to fetch');\n  return response.json();\n});\n\n// 재시도 횟수 제한\nconst data2 = await retry(async () => {\n  return await fetchData();\n}, 3);\n\n// 재시도 간격 설정 (100ms)\nconst data3 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 3,\n    delay: 100,\n  }\n);\n\n// 동적 재시도 간격 (지수 백오프)\nconst data4 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 5,\n    delay: attempts => Math.min(100 * Math.pow(2, attempts), 5000),\n  }\n);\n```\n\n특정 에러에서만 재시도하고 싶을 때 `shouldRetry` 옵션을 사용할 수 있어요.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nclass NetworkError extends Error {\n  constructor(public status: number) {\n    super(`Network error: ${status}`);\n  }\n}\n\n// 500 에러 이상에서만 재시도\nconst data5 = await retry(\n  async () => {\n    const response = await fetch('/api/data');\n    if (!response.ok) {\n      throw new NetworkError(response.status);\n    }\n    return response.json();\n  },\n  {\n    retries: 3,\n    shouldRetry: (error, attempt) => error instanceof NetworkError && error.status >= 500,\n  }\n);\n```\n\nAbortSignal을 사용해서 재시도를 취소할 수도 있어요.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nconst controller = new AbortController();\n\n// 5초 후 재시도 취소\nsetTimeout(() => controller.abort(), 5000);\n\ntry {\n  const data = await retry(\n    async () => {\n      return await fetchData();\n    },\n    {\n      retries: 10,\n      delay: 1000,\n      signal: controller.signal,\n    }\n  );\n  console.log(data);\n} catch (error) {\n  console.log('재시도가 취소되거나 실패했습니다:', error);\n}\n```\n\n#### 파라미터\n\n- `func` (`() => Promise<T>`): 재시도할 비동기 함수예요.\n- `options` (`number | RetryOptions`, 선택): 재시도 횟수나 옵션 객체예요.\n  - `retries` (`number`, 선택): 재시도할 횟수예요. 기본값은 `Infinity`로 무한 재시도해요.\n  - `delay` (`number | (attempts: number) => number`, 선택): 재시도 간격(밀리초)이에요. 숫자나 함수를 사용할 수 있어요. 기본값은 `0`이에요.\n  - `signal` (`AbortSignal`, 선택): 재시도를 취소할 수 있는 시그널이에요.\n  - `shouldRetry` (`(error: unknown, attempt: number) => boolean`, 선택): 재시도 여부를 결정하는 함수예요. `false`를 반환하면 즉시 에러를 던져요.\n    - `error`: 발생한 에러 객체예요.\n    - `attempt`: 현재 시도 횟수예요 (0부터 시작).\n\n#### 반환 값\n\n(`Promise<T>`): 함수가 성공적으로 실행된 결과값을 반환해요.\n\n#### 에러\n\n재시도 횟수가 초과되거나 AbortSignal로 취소되면 마지막 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/function/spread.md",
    "content": "# spread\n\n파라미터 배열을 펼쳐서 함수의 개별 파라미터로 전달하는 새로운 함수를 만들어요.\n\n```typescript\nconst spreadFunc = spread(func);\n```\n\n## 사용법\n\n### `spread(func)`\n\n배열 형태의 파라미터를 개별 파라미터로 펼쳐서 함수에 전달하고 싶을 때 `spread`를 사용하세요.\n\nJavaScript의 스프레드 연산자(`...`)와 비슷한 역할을 하지만, 함수를 변환해서 배열을 받도록 만드는 방식이에요. `apply` 메서드를 자주 사용하는 상황에서 유용해요.\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\n// 기본 사용법\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nconsole.log(spreadAdd([5, 3])); // 8\n\n// 여러 파라미터가 있는 함수\nfunction greet(greeting: string, name: string, punctuation: string) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst spreadGreet = spread(greet);\nconsole.log(spreadGreet(['Hello', 'World', '!'])); // 'Hello, World!'\n\n// Math 함수와 함께 사용\nconst numbers = [1, 2, 3, 4, 5];\nconst spreadMax = spread(Math.max);\nconsole.log(spreadMax(numbers)); // 5\n\nconst spreadMin = spread(Math.min);\nconsole.log(spreadMin(numbers)); // 1\n```\n\n`this` 컨텍스트도 유지돼요.\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\nconst calculator = {\n  multiply: function (a: number, b: number, c: number) {\n    return a * b * c;\n  },\n};\n\nconst spreadMultiply = spread(calculator.multiply);\nconsole.log(spreadMultiply.call(calculator, [2, 3, 4])); // 24\n```\n\n#### 파라미터\n\n- `func` (`F`): 배열을 개별 파라미터로 펼쳐서 받을 함수예요.\n\n#### 반환 값\n\n(`(args: Parameters<F>) => ReturnType<F>`): 파라미터 배열을 받아서 펼쳐진 형태로 원래 함수에 전달하는 새로운 함수를 반환해요.\n\n## Lodash와의 호환성\n\n`es-toolkit/compat`에서 `spread`를 가져오면 lodash와 호환돼요.\n\n- `spread`는 `argsIndex`라고 하는 숫자 인자를 추가로 받아요. 이 인자는 펼칠 인자 배열이 주어진 인덱스를 나타내요.\n  - 만약 `argsIndex`이 음수이거나 `NaN`이라면, 기본값 `0`으로 취급돼요. 소수라면, 가까운 정수로 내림해요.\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\nfunction fn(a: unknown, b: unknown, c: unknown) {\n  return Array.from(arguments);\n}\n\nspread(fn, -1)([1, 2]); // Returns [1, 2]\nspread(fn, NaN)([1, 2]); // Returns [1, 2]\nspread(fn, 'a')([1, 2]); // Returns [1, 2]\nspread(fn, 1.6)(1, [2, 3]); // Returns [1, 2, 3]\n```\n"
  },
  {
    "path": "docs/ko/reference/function/throttle.md",
    "content": "# throttle\n\n함수를 정해진 시간마다 최대 한 번만 실행되도록 제한해요.\n\n```typescript\nconst throttledFunc = throttle(func, throttleMs, options);\n```\n\n## 사용법\n\n### `throttle(func, throttleMs, options?)`\n\n함수 호출을 일정 시간 간격으로 제한하고 싶을 때 `throttle`을 사용하세요. 스크롤, 리사이즈, 마우스 이동 같은 자주 발생하는 이벤트를 처리할 때 성능을 최적화하는 데 유용해요.\n\n`debounce`와 달리 throttle은 지정된 시간 동안 함수가 최소 한 번은 실행되도록 보장해요.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// 기본 사용법 (1초마다 최대 한 번 실행)\nconst throttledLog = throttle(() => {\n  console.log('함수가 실행됐어요!');\n}, 1000);\n\n// 첫 번째 호출: 즉시 실행\nthrottledLog(); // '함수가 실행됐어요!' 출력\n\n// 1초 내 추가 호출: 무시됨\nthrottledLog();\nthrottledLog();\n\n// 1초 후에 마지막 호출이 trailing으로 실행됨\n\n// 스크롤 이벤트 최적화\nconst handleScroll = throttle(() => {\n  console.log('스크롤 위치:', window.scrollY);\n}, 100); // 100ms마다 최대 한 번\n\nwindow.addEventListener('scroll', handleScroll);\n\n// API 호출 최적화\nconst searchThrottled = throttle(async (query: string) => {\n  const results = await fetch(`/api/search?q=${query}`);\n  console.log('검색 결과:', await results.json());\n}, 300);\n\n// 입력할 때마다 호출해도 300ms마다만 실제 검색 실행\nsearchThrottled('hello');\nsearchThrottled('hello w');\nsearchThrottled('hello world');\n```\n\nleading과 trailing 옵션을 조정할 수 있어요.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// leading만 활성화 (시작 시에만 실행)\nconst leadingOnly = throttle(() => console.log('Leading only'), 1000, { edges: ['leading'] });\n\n// trailing만 활성화 (끝날 때만 실행)\nconst trailingOnly = throttle(() => console.log('Trailing only'), 1000, { edges: ['trailing'] });\n\nleadingOnly(); // 즉시 실행\nleadingOnly(); // 무시됨\nleadingOnly(); // 무시됨\n\ntrailingOnly(); // 즉시 실행되지 않음\ntrailingOnly(); // 무시됨\ntrailingOnly(); // 1초 후 실행됨\n```\n\n수동으로 제어할 수도 있어요.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\nconst throttledFunc = throttle(() => console.log('실행됨'), 1000);\n\nthrottledFunc(); // 즉시 실행\nthrottledFunc(); // 대기 중\n\n// 대기 중인 실행을 즉시 처리\nthrottledFunc.flush();\n\n// 대기 중인 실행을 취소\nthrottledFunc.cancel();\n```\n\n#### 파라미터\n\n- `func` (`F`): 실행을 제한할 함수예요.\n- `throttleMs` (`number`): 실행을 제한할 시간 간격(밀리초)이에요.\n- `options` (`ThrottleOptions`, 선택): 추가 옵션이에요.\n  - `signal` (`AbortSignal`, 선택): 함수 실행을 취소할 수 있는 시그널이에요.\n  - `edges` (`Array<'leading' | 'trailing'>`, 선택): 함수 실행 타이밍을 결정해요. 기본값은 `['leading', 'trailing']`이에요.\n\n#### 반환 값\n\n(`ThrottledFunction<F>`): 실행이 제한된 새로운 함수를 반환해요. `cancel`과 `flush` 메서드를 포함해요.\n\n## Lodash와의 호환성\n\n`es-toolkit/compat`에서 `throttle`을 가져오면 lodash와 완전히 호환돼요.\n\n- `throttle` 함수는 `leading` and `trailing` 옵션을 받아요.\n\n  - `leading`: 스로틀링된 함수를 처음으로 호출했을 때 즉시 원래 함수를 실행할지 여부예요. 기본값은 `true`예요.\n  - `trailing`: 마지막 스로틀링된 함수 호출로부터 `throttleMs` 밀리세컨드가 지나면 원래 함수를 실행할지 여부예요. 기본값은 `true`예요.\n\n- `throttleMs` 옵션의 기본값은 `0`이에요. 함수 호출이 다음 틱까지만 지연된다는 뜻이에요.\n\n::: info `throttle`의 `leading`과 `trailing` 옵션\n\n기본적으로 `throttle`의 `leading`과 `trailing` 옵션은 `true`예요. 그래서 `{ leading: true }`나 `{ trailing: true }` 같은 옵션은 함수의 동작을 바꾸지 않아요.\n\n:::\n\n```typescript\n// leading 옵션 예시\nconst leadingFn = throttle(\n  () => {\n    console.log('Leading function executed');\n  },\n  1000,\n  { leading: true }\n);\n\n// 'Leading function executed'를 바로 로깅해요.\n// 계속 호출하더라도 1초마다 'Leading function executed'를 로깅해요.\nleadingFn();\n\n// trailing 옵션 예시\nconst trailingFn = throttle(\n  () => {\n    console.log('Trailing function executed');\n  },\n  1000,\n  { trailing: true }\n);\n\n// 'Trailing function executed'를 바로 로깅해요.\n// 계속 호출하더라도 1초마다 'Trailing function executed'를 로깅해요.\ntrailingFn();\n\n// leading: false, trailing: true 옵션 예시\nconst trailingOnlyFn = throttle(\n  () => {\n    console.log('Trailing-only function executed');\n  },\n  1000,\n  { leading: false, trailing: true }\n);\n\n// 'Trailing-only function executed'는 처음에는 로깅되지 않아요.\n// 계속 호출하더라도 1초마다 'Trailing-only function executed'를 로깅해요.\ntrailingOnlyFn();\n```\n"
  },
  {
    "path": "docs/ko/reference/function/unary.md",
    "content": "# unary\n\n함수가 첫 번째 파라미터만 받도록 제한하는 새로운 함수를 만들어요.\n\n```typescript\nconst unaryFunc = unary(func);\n```\n\n## 사용법\n\n### `unary(func)`\n\n함수가 하나의 파라미터만 받도록 제한하고 싶을 때 `unary`를 사용하세요. 추가로 전달되는 파라미터들은 모두 무시돼요.\n\n배열의 `map`, `filter`, `forEach` 같은 메서드에서 콜백 함수가 예상보다 많은 파라미터를 받는 것을 방지할 때 유용해요.\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 기본 사용법\nfunction greet(name: string, age?: number, city?: string) {\n  console.log(`안녕하세요, ${name}님!`);\n  if (age) console.log(`나이: ${age}`);\n  if (city) console.log(`도시: ${city}`);\n}\n\nconst greetOnlyName = unary(greet);\ngreetOnlyName('철수', 25, '서울'); // '안녕하세요, 철수님!'만 출력\n\n// 배열 메서드와 함께 사용\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// parseInt는 두 번째 파라미터로 기수를 받는데,\n// map의 콜백에서는 (value, index, array)를 전달함\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN] (예상치 못한 결과)\n\n// unary를 사용해서 첫 번째 파라미터만 전달\nconsole.log(numbers.map(unary(parseInt))); // [1, 2, 3, 4, 5] (예상된 결과)\n\n// 다른 예시: 함수가 여러 파라미터를 받지만 하나만 사용하고 싶을 때\nfunction logValue(value: any, prefix: string = 'Value:', suffix: string = '') {\n  console.log(`${prefix} ${value} ${suffix}`);\n}\n\nconst data = ['apple', 'banana', 'cherry'];\n\n// prefix와 suffix 없이 값만 출력하고 싶을 때\ndata.forEach(unary(logValue));\n// Value: apple\n// Value: banana\n// Value: cherry\n```\n\n함수 컴포지션에서도 유용해요.\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 여러 파라미터를 받는 함수\nfunction multiply(a: number, b: number = 1, c: number = 1) {\n  return a * b * c;\n}\n\n// 첫 번째 파라미터만 사용하도록 제한\nconst multiplyOne = unary(multiply);\n\nconst numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map(x => multiplyOne(x, 2, 3)); // b와 c는 무시됨\nconsole.log(doubled); // [1, 2, 3, 4, 5] (1 * 1 * 1의 결과)\n```\n\n#### 파라미터\n\n- `func` (`F`): 첫 번째 파라미터만 받도록 제한할 함수예요.\n\n#### 반환 값\n\n(`(...args: any[]) => ReturnType<F>`): 첫 번째 파라미터만 원래 함수에 전달하는 새로운 함수를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/countBy.md",
    "content": "# countBy (`Map`)\n\n변환 함수를 기반으로 Map의 항목 발생 횟수를 세요.\n\n```typescript\nconst counts = countBy(map, mapper);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `countBy(map, mapper)`\n\nMap의 항목이 서로 다른 카테고리에 얼마나 속하는지 세고 싶을 때 `countBy`를 사용하세요. 각 값-키 쌍에서 키를 생성하는 함수를 제공하면, 생성된 키와 그 개수를 값으로 하는 Map을 반환해요. 변환이 동일한 키를 생성하는 각 항목에 대해 개수가 증가해요.\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 1],\n]);\n\nconst result = countBy(map, value => value);\n// 결과: Map(2) { 1 => 2, 2 => 1 }\n```\n\n다양한 기준으로 항목을 셀 수 있어요.\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\n// 값의 속성으로 세요.\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25, department: 'Engineering' }],\n  ['user2', { name: 'Bob', age: 30, department: 'Engineering' }],\n  ['user3', { name: 'Charlie', age: 35, department: 'Sales' }],\n]);\n\nconst byDepartment = countBy(users, user => user.department);\n// 결과: Map(2) { 'Engineering' => 2, 'Sales' => 1 }\n\n// 파생된 값으로 세요.\nconst ages = new Map([\n  ['p1', 25],\n  ['p2', 30],\n  ['p3', 25],\n  ['p4', 40],\n]);\n\nconst ageGroups = countBy(ages, age => (age < 30 ? 'young' : 'senior'));\n// 결과: Map(2) { 'young' => 2, 'senior' => 2 }\n\n// 값과 키를 모두 사용해서 세요.\nconst items = new Map([\n  ['alice', 20],\n  ['bob', 30],\n  ['carol', 20],\n]);\n\nconst firstLetter = countBy(items, (value, key) => key[0]);\n// 결과: Map(3) { 'a' => 1, 'b' => 1, 'c' => 1 }\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 발생 횟수를 셀 Map이에요.\n- `mapper` (`(value: V, key: K, object: Map<K, V>) => K2`): 카운팅을 위한 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K2, number>`): 매핑된 키와 그 개수를 포함하는 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/every.md",
    "content": "# every (`Map`)\n\nMap의 모든 항목이 제공된 조건 함수를 만족하는지 테스트해요.\n\n```typescript\nconst allMatch = every(map, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `every(map, doesMatch)`\n\nMap의 모든 항목이 특정 조건을 만족하는지 확인하고 싶을 때 `every`를 사용하세요. 각 항목을 테스트하는 조건 함수를 제공하면, 모든 항목이 조건을 만족하면 true를, 그렇지 않으면 false를 반환해줘요.\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 10],\n  ['b', 20],\n  ['c', 30],\n]);\n\nconst result = every(map, value => value > 5);\n// 결과: true\n\nconst result2 = every(map, value => value > 15);\n// 결과: false\n```\n\n다양한 조건을 테스트할 수 있어요.\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\n// 모든 값이 기준을 만족하는지 확인해요.\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 8, inStock: true }],\n]);\n\nconst allInStock = every(inventory, item => item.inStock);\n// 결과: true\n\n// 모든 키가 패턴과 일치하는지 확인해요.\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['api.host', 'localhost'],\n]);\n\nconst allApiSettings = every(settings, (value, key) => key.startsWith('api.'));\n// 결과: true\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 테스트할 Map이에요.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 각 항목을 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`boolean`): 모든 항목이 조건을 만족하면 true를, 그렇지 않으면 false를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/filter.md",
    "content": "# filter (`Map`)\n\n조건 함수에 따라 Map을 필터링해요.\n\n```typescript\nconst filtered = filter(map, callback);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `filter(map, callback)`\n\n특정 조건을 만족하는 항목만 포함하는 새로운 Map을 만들고 싶을 때 `filter`를 사용하세요. 각 항목을 테스트하는 조건 함수를 제공하면, 조건이 true를 반환하는 항목만으로 구성된 새 Map을 반환해줘요.\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n  ['d', 4],\n]);\n\nconst result = filter(map, value => value > 2);\n// 결과:\n// Map(2) {\n//   'c' => 3,\n//   'd' => 4\n// }\n```\n\n다양한 기준으로 필터링할 수 있어요.\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\n// 값 타입으로 필터링해요.\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 0, inStock: false }],\n  ['orange', { quantity: 5, inStock: true }],\n]);\n\nconst inStockItems = filter(inventory, item => item.inStock);\n// 결과: 'apple'과 'orange' 항목이 있는 Map\n\n// 키 패턴으로 필터링해요.\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['admin_1', 'Bob'],\n  ['user_2', 'Charlie'],\n]);\n\nconst users = filter(data, (value, key) => key.startsWith('user_'));\n// 결과: 'user_1'과 'user_2' 항목이 있는 Map\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 필터링할 Map이에요.\n- `callback` (`(value: V, key: K, map: Map<K, V>) => boolean`): 각 항목을 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`Map<K, V>`): 조건을 만족하는 항목만 포함하는 새로운 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/findKey.md",
    "content": "# findKey (`Map`)\n\n조건 함수가 true를 반환하는 Map의 첫 번째 키를 찾아요.\n\n```typescript\nconst key = findKey(map, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `findKey(map, doesMatch)`\n\n특정 조건과 일치하는 첫 번째 항목의 키를 찾고 싶을 때 `findKey`를 사용하세요. 각 항목을 테스트하는 조건 함수를 제공하면, 처음으로 일치하는 항목의 키를 반환하거나 찾지 못하면 undefined를 반환해줘요.\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findKey(map, value => value.quantity > 10);\n// 결과: 'grape'\n```\n\n다양한 기준으로 검색할 수 있어요.\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\n// 값의 속성으로 찾아요.\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n  ['user3', { name: 'Charlie', age: 35 }],\n]);\n\nconst seniorUser = findKey(users, user => user.age >= 35);\n// 결과: 'user3'\n\n// 키 패턴으로 찾아요.\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['db.host', 'localhost'],\n]);\n\nconst dbSetting = findKey(settings, (value, key) => key.startsWith('db.'));\n// 결과: 'db.host'\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 검색할 Map이에요.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 각 항목을 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`K | undefined`): 조건을 만족하는 첫 번째 항목의 키를 반환하거나, 찾지 못하면 undefined를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/findValue.md",
    "content": "# findValue (`Map`)\n\n조건 함수가 true를 반환하는 Map의 첫 번째 값을 찾아요.\n\n```typescript\nconst value = findValue(map, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `findValue(map, doesMatch)`\n\n특정 조건과 일치하는 첫 번째 항목의 값을 찾고 싶을 때 `findValue`를 사용하세요. 각 항목을 테스트하는 조건 함수를 제공하면, 처음으로 일치하는 항목의 값을 반환하거나 찾지 못하면 undefined를 반환해줘요.\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findValue(map, value => value.quantity > 10);\n// 결과: { color: 'purple', quantity: 15 }\n```\n\n다양한 기준으로 검색할 수 있어요.\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\n// 값의 속성으로 찾아요.\nconst products = new Map([\n  ['p1', { name: 'Laptop', price: 1000, inStock: true }],\n  ['p2', { name: 'Mouse', price: 25, inStock: false }],\n  ['p3', { name: 'Keyboard', price: 75, inStock: true }],\n]);\n\nconst expensiveProduct = findValue(products, product => product.price > 500);\n// 결과: { name: 'Laptop', price: 1000, inStock: true }\n\n// 키 패턴으로 찾아요.\nconst cache = new Map([\n  ['temp_1', { data: 'foo', timestamp: 100 }],\n  ['perm_1', { data: 'bar', timestamp: 200 }],\n  ['temp_2', { data: 'baz', timestamp: 300 }],\n]);\n\nconst permanent = findValue(cache, (value, key) => key.startsWith('perm_'));\n// 결과: { data: 'bar', timestamp: 200 }\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 검색할 Map이에요.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 각 항목을 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`V | undefined`): 조건을 만족하는 첫 번째 항목의 값을 반환하거나, 찾지 못하면 undefined를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/forEach.md",
    "content": "# forEach (`Map`)\n\nMap의 각 항목에 대해 제공된 함수를 한 번씩 실행해요.\n\n```typescript\nforEach(map, callbackfn);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `forEach(map, callbackfn)`\n\nMap의 각 항목에 대해 함수를 실행하고 싶을 때 `forEach`를 사용하세요. 콜백 함수는 값, 키, 그리고 Map 자체를 인자로 받아요. 로깅, 외부 상태 업데이트, 또는 각 항목에 대한 작업 수행과 같은 부수 효과에 유용해요.\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nforEach(map, (value, key) => {\n  console.log(`${key}: ${value}`);\n});\n// 출력:\n// a: 1\n// b: 2\n// c: 3\n```\n\n각 항목에 대해 다양한 작업을 수행할 수 있어요.\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\n// 값 누적하기\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nlet total = 0;\nforEach(prices, value => {\n  total += value;\n});\n// total은 이제 4.25예요\n\n// 항목을 배열로 수집하기\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n]);\n\nconst userList: string[] = [];\nforEach(users, (value, key) => {\n  userList.push(`${key}: ${value.name} (${value.age})`);\n});\n// userList: ['user1: Alice (25)', 'user2: Bob (30)']\n\n// 조건에 따라 외부 Map 업데이트하기\nconst inventory = new Map([\n  ['item1', { stock: 10, price: 5 }],\n  ['item2', { stock: 0, price: 10 }],\n  ['item3', { stock: 5, price: 15 }],\n]);\n\nconst outOfStock = new Map<string, any>();\nforEach(inventory, (value, key) => {\n  if (value.stock === 0) {\n    outOfStock.set(key, value);\n  }\n});\n// outOfStock에는 item2가 포함돼요\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 순회할 Map이에요.\n- `callbackfn` (`(value: V, key: K, map: Map<K, V>) => void`): 각 항목에 대해 실행할 함수예요.\n\n#### 반환 값\n\n(`void`): 이 함수는 값을 반환하지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/map/hasValue.md",
    "content": "# hasValue (`Map`)\n\nMap이 특정 값을 포함하는지 확인해요.\n\n```typescript\nconst exists = hasValue(map, searchElement);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `hasValue(map, searchElement)`\n\nMap이 특정 값을 포함하는지 확인하고 싶을 때 `hasValue`를 사용하세요. 이 함수는 SameValueZero 비교 방식을 사용해요 (Array.prototype.includes와 유사). 즉, NaN은 NaN과 같다고 간주해요.\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = hasValue(map, 2);\n// 결과: true\n\nconst result2 = hasValue(map, 5);\n// 결과: false\n```\n\n다양한 값 타입을 검색할 수 있어요.\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\n// NaN 검색 (SameValueZero 비교 사용)\nconst numbers = new Map([\n  ['a', 1],\n  ['b', NaN],\n  ['c', 3],\n]);\n\nconst hasNaN = hasValue(numbers, NaN);\n// 결과: true\n\n// 객체 검색 (참조 동등성)\nconst obj = { id: 1 };\nconst objects = new Map([\n  ['first', obj],\n  ['second', { id: 2 }],\n]);\n\nconst hasObj = hasValue(objects, obj);\n// 결과: true\n\nconst hasSimilar = hasValue(objects, { id: 1 });\n// 결과: false (다른 참조)\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 검색할 Map이에요.\n- `searchElement` (`V`): 검색할 값이에요.\n\n#### 반환 값\n\n(`boolean`): Map이 값을 포함하면 true를, 그렇지 않으면 false를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/keyBy.md",
    "content": "# keyBy (`Map`)\n\n제공된 키 생성 함수를 기반으로 Map의 각 항목을 매핑해요.\n\n```typescript\nconst result = keyBy(map, getKeyFromEntry);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `keyBy(map, getKeyFromEntry)`\n\n값에서 새로운 키를 생성하여 Map을 재구성하고 싶을 때 `keyBy`를 사용하세요. 각 값-키 쌍에서 키를 생성하는 함수를 제공하면, 키 함수에 의해 생성된 키와 원래 맵의 해당 값으로 구성된 새 Map을 반환해요. 여러 항목이 동일한 키를 생성하면 마지막으로 발견된 값이 사용돼요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['x', { type: 'fruit', name: 'apple' }],\n  ['y', { type: 'fruit', name: 'banana' }],\n  ['z', { type: 'vegetable', name: 'carrot' }],\n]);\n\nconst result = keyBy(map, item => item.type);\n// 결과:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 참고: 'banana'가 마지막 'fruit'였기 때문에 유지돼요\n```\n\n다양한 기준으로 데이터를 재구성할 수 있어요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\n// ID 속성으로 인덱싱해요.\nconst users = new Map([\n  ['user1', { id: 101, name: 'Alice', role: 'admin' }],\n  ['user2', { id: 102, name: 'Bob', role: 'user' }],\n  ['user3', { id: 103, name: 'Charlie', role: 'user' }],\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 결과: 키가 101, 102, 103인 Map\n\n// 역할별로 인덱싱해요 (역할당 마지막 사용자가 선택돼요)\nconst byRole = keyBy(users, user => user.role);\n// 결과: Map(2) {\n//   'admin' => { id: 101, name: 'Alice', role: 'admin' },\n//   'user' => { id: 103, name: 'Charlie', role: 'user' }\n// }\n\n// 값과 원래 키를 모두 사용하여 키를 변환해요.\nconst inventory = new Map([\n  ['item_1', { category: 'electronics', price: 100 }],\n  ['item_2', { category: 'electronics', price: 200 }],\n]);\n\nconst categorized = keyBy(inventory, (value, key) => `${value.category}_${key}`);\n// 결과: 키가 'electronics_item_1', 'electronics_item_2'인 Map\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 매핑할 항목의 맵이에요.\n- `getKeyFromEntry` (`(value: V, key: K, object: Map<K, V>) => K2`): 값-키 쌍에서 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K2, V>`): 생성된 키가 각 항목의 값에 매핑된 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/mapKeys.md",
    "content": "# mapKeys (`Map`)\n\n제공된 함수로 키를 변환하되 값은 동일하게 유지하는 새로운 Map을 생성해요.\n\n```typescript\nconst transformed = mapKeys(map, getNewKey);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `mapKeys(map, getNewKey)`\n\nMap의 키를 변환하면서 값은 그대로 유지하고 싶을 때 `mapKeys`를 사용하세요. 각 항목에서 새로운 키를 생성하는 함수를 제공하면, 변환된 키를 가진 새 Map을 반환해줘요.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapKeys(map, (value, key) => key.toUpperCase());\n// 결과:\n// Map(3) {\n//   'A' => 1,\n//   'B' => 2,\n//   'C' => 3\n// }\n```\n\n다양한 방법으로 키를 변환할 수 있어요.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\n// 키에 접두사 추가해요.\nconst categories = new Map([\n  ['fruit', ['apple', 'banana']],\n  ['vegetable', ['carrot', 'potato']],\n]);\n\nconst prefixed = mapKeys(categories, (value, key) => `category_${key}`);\n// 결과: 'category_fruit', 'category_vegetable' 키를 가진 Map\n\n// 값에 따라 변환해요.\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst ranked = mapKeys(scores, (value, key) => (value >= 90 ? `top_${key}` : key));\n// 결과: 'top_alice', 'bob', 'top_charlie' 키를 가진 Map\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 변환할 Map이에요.\n- `getNewKey` (`(value: V, key: K, object: Map<K, V>) => K`): 값-키 쌍에서 새로운 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K, V>`): 변환된 키와 동일한 값을 가진 새로운 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/mapValues.md",
    "content": "# mapValues (`Map`)\n\n제공된 함수로 값을 변환하되 키는 동일하게 유지하는 새로운 Map을 생성해요.\n\n```typescript\nconst transformed = mapValues(map, getNewValue);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `mapValues(map, getNewValue)`\n\nMap의 값을 변환하면서 키는 그대로 유지하고 싶을 때 `mapValues`를 사용하세요. 각 항목에서 새로운 값을 생성하는 함수를 제공하면, 변환된 값을 가진 새 Map을 반환해줘요.\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapValues(map, value => value * 2);\n// 결과:\n// Map(3) {\n//   'a' => 2,\n//   'b' => 4,\n//   'c' => 6\n// }\n```\n\n다양한 방법으로 값을 변환할 수 있어요.\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\n// 값 포맷팅해요.\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nconst formatted = mapValues(prices, value => `$${value.toFixed(2)}`);\n// 결과: '$1.50', '$0.75', '$2.00' 값을 가진 Map\n\n// 키에 따라 변환해요.\nconst inventory = new Map([\n  ['premium_item', 10],\n  ['standard_item', 20],\n  ['basic_item', 30],\n]);\n\nconst adjusted = mapValues(inventory, (value, key) => (key.startsWith('premium_') ? value * 1.5 : value));\n// 결과: 15, 20, 30 값을 가진 Map\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 변환할 Map이에요.\n- `getNewValue` (`(value: V, key: K, object: Map<K, V>) => V`): 값-키 쌍에서 새로운 값을 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K, V>`): 동일한 키와 변환된 값을 가진 새로운 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/map/reduce.md",
    "content": "# reduce (`Map`)\n\nMap의 항목을 순회하며 콜백 함수를 적용하여 하나의 값으로 줄여요.\n\n```typescript\nconst result = reduce(map, callback, initialValue);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `reduce(map, callback, initialValue?)`\n\nMap의 각 항목에서 결과를 누적하여 하나의 값으로 변환하고 싶을 때 `reduce`를 사용하세요. 각 항목을 처리하고 누산기를 업데이트하는 콜백 함수를 제공하세요. 초기값이 제공되면 누산기의 시작값으로 사용돼요. 초기값이 제공되지 않고 Map이 비어있으면 TypeError가 발생해요.\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = reduce(map, (acc, value) => acc + value, 0);\n// 결과: 6\n```\n\n다양한 방법으로 Map을 줄일 수 있어요.\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\n// 초기값과 함께 합계 계산해요.\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst totalScore = reduce(scores, (acc, score) => acc + score, 0);\n// 결과: 274\n\n// 초기값 없이 (첫 번째 값 사용)\nconst numbers = new Map([\n  ['a', 10],\n  ['b', 20],\n]);\n\nconst sum = reduce(numbers, (acc, value) => acc + value);\n// 결과: 30 (첫 번째 값 10부터 시작)\n\n// Map에서 객체 만들기\nconst settings = new Map([\n  ['theme', 'dark'],\n  ['lang', 'en'],\n  ['notifications', true],\n]);\n\nconst config = reduce(settings, (acc, value, key) => ({ ...acc, [key]: value }), {} as Record<string, any>);\n// 결과: { theme: 'dark', lang: 'en', notifications: true }\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 줄일 Map이에요.\n- `callback` (`(accumulator: A, value: V, key: K, map: Map<K, V>) => A`): 각 항목을 처리하고 누산기를 업데이트하는 함수예요.\n- `initialValue` (`A`, 선택): 누산기의 초기값이에요. 제공되지 않으면 Map의 첫 번째 값을 사용해요.\n\n#### 반환 값\n\n(`A`): 최종 누적된 값을 반환해요.\n\n#### 예외\n\n(`TypeError`): Map이 비어있고 초기값이 제공되지 않으면 발생해요.\n"
  },
  {
    "path": "docs/ko/reference/map/some.md",
    "content": "# some (`Map`)\n\nMap의 적어도 하나의 항목이 제공된 조건 함수를 만족하는지 테스트해요.\n\n```typescript\nconst anyMatch = some(map, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/map`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `some(map, doesMatch)`\n\nMap의 적어도 하나의 항목이 특정 조건을 만족하는지 확인하고 싶을 때 `some`을 사용하세요. 각 항목을 테스트하는 조건 함수를 제공하면, 적어도 하나의 항목이 조건을 만족하면 true를, 그렇지 않으면 false를 반환해줘요.\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = some(map, value => value > 2);\n// 결과: true\n\nconst result2 = some(map, value => value > 5);\n// 결과: false\n```\n\n다양한 조건을 테스트할 수 있어요.\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\n// 어떤 값이라도 기준을 만족하는지 확인해요.\nconst inventory = new Map([\n  ['apple', { quantity: 0, inStock: false }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 0, inStock: false }],\n]);\n\nconst hasStock = some(inventory, item => item.inStock);\n// 결과: true\n\n// 어떤 키라도 패턴과 일치하는지 확인해요.\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['user_2', 'Bob'],\n  ['group_1', 'Admins'],\n]);\n\nconst hasAdmin = some(data, (value, key) => key.startsWith('admin_'));\n// 결과: false\n```\n\n#### 파라미터\n\n- `map` (`Map<K, V>`): 테스트할 Map이에요.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 각 항목을 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`boolean`): 적어도 하나의 항목이 조건을 만족하면 true를, 그렇지 않으면 false를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/clamp.md",
    "content": "# clamp\n\n숫자를 지정된 범위 내에 고정해요.\n\n```typescript\nconst clamped = clamp(value, maximum);\nconst clamped = clamp(value, minimum, maximum);\n```\n\n## 사용법\n\n### `clamp(value, maximum)`\n\n숫자를 주어진 최댓값 이하로 제한하고 싶을 때 `clamp`를 사용하세요. 값이 최댓값보다 크면 최댓값으로 고정되고, 그렇지 않으면 원래 값을 반환해요.\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 최댓값으로 제한해요\nconst result1 = clamp(10, 5); // result1은 5가 돼요 (10이 최댓값 5로 제한됨)\nconst result2 = clamp(3, 5); // result2는 3이 돼요 (5보다 작으므로 그대로)\n```\n\n#### 파라미터\n\n- `value` (`number`): 고정할 숫자예요.\n- `maximum` (`number`): 최댓값이에요.\n\n#### 반환 값\n\n(`number`): 최댓값 이하로 고정된 숫자를 반환해요.\n\n### `clamp(value, minimum, maximum)`\n\n숫자를 주어진 최솟값과 최댓값 범위 내에 고정하고 싶을 때 `clamp`를 사용하세요. 값이 범위를 벗어나면 가장 가까운 경계값으로 제한돼요.\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 최솟값과 최댓값 범위 내에 고정해요\nconst result1 = clamp(10, 5, 15); // result1은 10이 돼요 (5와 15 범위 내에 있음)\nconst result2 = clamp(2, 5, 15); // result2는 5가 돼요 (최솟값 5로 제한됨)\nconst result3 = clamp(20, 5, 15); // result3은 15가 돼요 (최댓값 15로 제한됨)\n```\n\n#### 파라미터\n\n- `value` (`number`): 고정할 숫자예요.\n- `minimum` (`number`): 최솟값이에요.\n- `maximum` (`number`): 최댓값이에요.\n\n#### 반환 값\n\n(`number`): 지정된 범위 내에서 고정된 숫자를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/inRange.md",
    "content": "# inRange\n\n값이 지정된 범위 내에 있는지 확인해요.\n\n```typescript\nconst result = inRange(value, maximum);\nconst result = inRange(value, minimum, maximum);\n```\n\n## 사용법\n\n### `inRange(value, maximum)`\n\n값이 0부터 최댓값 미만 범위에 있는지 확인하고 싶을 때 `inRange`를 사용하세요. 최솟값은 자동으로 0이 돼요.\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 0부터 5 미만 범위에서 확인해요\nconst result1 = inRange(3, 5); // result1은 true가 돼요 (0 <= 3 < 5)\nconst result2 = inRange(5, 5); // result2는 false가 돼요 (5는 5 미만이 아님)\nconst result3 = inRange(-1, 5); // result3은 false가 돼요 (-1 < 0)\n```\n\n#### 파라미터\n\n- `value` (`number`): 확인할 값이에요.\n- `maximum` (`number`): 범위의 최댓값(미포함)이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 0 이상 최댓값 미만 범위에 있으면 `true`, 그렇지 않으면 `false`를 반환해요.\n\n### `inRange(value, minimum, maximum)`\n\n값이 지정된 최솟값과 최댓값 범위에 있는지 확인하고 싶을 때 `inRange`를 사용하세요.\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 최솟값과 최댓값 범위에서 확인해요\nconst result1 = inRange(3, 2, 5); // result1은 true가 돼요 (2 <= 3 < 5)\nconst result2 = inRange(1, 2, 5); // result2는 false가 돼요 (1 < 2)\nconst result3 = inRange(5, 2, 5); // result3은 false가 돼요 (5는 5 미만이 아님)\n\n// 음수 범위에서도 사용할 수 있어요\nconst result4 = inRange(-3, -5, -1); // result4는 true가 돼요 (-5 <= -3 < -1)\n```\n\n#### 파라미터\n\n- `value` (`number`): 확인할 값이에요.\n- `minimum` (`number`): 범위의 최솟값(포함)이에요.\n- `maximum` (`number`): 범위의 최댓값(미포함)이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 지정된 범위 내에 있으면 `true`, 그렇지 않으면 `false`를 반환해요.\n\n#### 에러\n\n최솟값이 최댓값보다 크거나 같으면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/mean.md",
    "content": "# mean\n\n숫자 배열의 평균을 계산해요.\n\n```typescript\nconst average = mean(nums);\n```\n\n## 사용법\n\n### `mean(nums)`\n\n숫자 배열의 평균값을 구하고 싶을 때 `mean`을 사용하세요. 모든 숫자를 더한 후 배열의 길이로 나누어 평균을 계산해요. 빈 배열이 주어지면 `NaN`을 반환해요.\n\n```typescript\nimport { mean } from 'es-toolkit/math';\n\n// 숫자 배열의 평균을 계산해요\nconst numbers = [1, 2, 3, 4, 5];\nconst result = mean(numbers);\n// result는 3이 돼요 ((1 + 2 + 3 + 4 + 5) / 5 = 15 / 5 = 3)\n\n// 소수점이 있는 숫자들의 평균을 계산해요\nconst decimals = [1.5, 2.5, 3.5];\nconst decimalResult = mean(decimals);\n// decimalResult는 2.5가 돼요\n\n// 빈 배열의 경우 NaN을 반환해요\nconst emptyResult = mean([]);\n// emptyResult는 NaN이 돼요\n```\n\n#### 파라미터\n\n- `nums` (`readonly number[]`): 평균을 계산할 숫자 배열이에요.\n\n#### 반환 값\n\n(`number`): 배열에 있는 모든 숫자의 평균을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/meanBy.md",
    "content": "# meanBy\n\n`getValue` 함수를 각 요소에 적용하여 배열의 평균을 계산해요.\n\n```typescript\nconst average = meanBy(items, getValue);\n```\n\n## 사용법\n\n### `meanBy(items, getValue)`\n\n배열의 각 요소에 함수를 적용한 결과의 평균을 구하고 싶을 때 `meanBy`를 사용하세요. 객체 배열에서 특정 속성의 평균을 계산하거나, 각 요소를 변환한 후 평균을 구할 때 유용해요. 빈 배열이 주어지면 `NaN`을 반환해요.\n\n```typescript\nimport { meanBy } from 'es-toolkit/math';\n\n// 객체 배열에서 특정 속성의 평균을 계산해요\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }];\nconst averageAge = meanBy(people, person => person.age);\n// averageAge는 25가 돼요 ((23 + 25 + 27) / 3 = 75 / 3 = 25)\n\n// 문자열 길이의 평균을 계산해요\nconst words = ['apple', 'banana', 'cherry'];\nconst averageLength = meanBy(words, word => word.length);\n// averageLength는 5.33...이 돼요 ((5 + 6 + 6) / 3 ≈ 5.67)\n\n// 빈 배열의 경우 NaN을 반환해요\nconst emptyResult = meanBy([], x => x);\n// emptyResult는 NaN이 돼요\n```\n\n#### 파라미터\n\n- `items` (`readonly T[]`): 평균을 계산할 배열이에요.\n- `getValue` (`(element: T) => number`): 각 요소에서 숫자 값을 선택하는 함수예요.\n\n#### 반환 값\n\n(`number`): `getValue` 함수를 기준으로, 배열에 있는 모든 값의 평균을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/median.md",
    "content": "# median\n\n숫자 배열의 중앙값을 계산해요.\n\n```typescript\nconst middle = median(nums);\n```\n\n## 사용법\n\n### `median(nums)`\n\n숫자 배열의 중앙값을 구하고 싶을 때 `median`을 사용하세요. 배열을 오름차순으로 정렬한 후, 가운데에 위치한 값을 찾아요. 홀수 개 요소를 가진 배열이면 정확히 가운데 값을, 짝수 개 요소를 가진 배열이면 가운데 두 값의 평균을 반환해요. 빈 배열이 주어지면 `NaN`을 반환해요.\n\n```typescript\nimport { median } from 'es-toolkit/math';\n\n// 홀수 개 요소가 있는 배열의 중앙값을 계산해요\nconst oddNumbers = [1, 2, 3, 4, 5];\nconst oddResult = median(oddNumbers);\n// oddResult는 3이 돼요 (정렬된 배열 [1, 2, 3, 4, 5]에서 가운데 값)\n\n// 짝수 개 요소가 있는 배열의 중앙값을 계산해요\nconst evenNumbers = [1, 2, 3, 4];\nconst evenResult = median(evenNumbers);\n// evenResult는 2.5가 돼요 ((2 + 3) / 2 = 2.5)\n\n// 정렬되지 않은 배열도 자동으로 정렬해요\nconst unordered = [3, 1, 4, 1, 5];\nconst unorderedResult = median(unordered);\n// unorderedResult는 3이 돼요 (정렬 후 [1, 1, 3, 4, 5]에서 가운데 값)\n\n// 빈 배열의 경우 NaN을 반환해요\nconst emptyResult = median([]);\n// emptyResult는 NaN이 돼요\n```\n\n#### 파라미터\n\n- `nums` (`readonly number[]`): 중앙값을 계산할 숫자 배열이에요.\n\n#### 반환 값\n\n(`number`): 배열에 있는 모든 숫자의 중앙값을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/medianBy.md",
    "content": "# medianBy\n\n`getValue` 함수를 각 요소에 적용하여 배열의 중앙값을 계산해요.\n\n```typescript\nconst middle = medianBy(items, getValue);\n```\n\n## 사용법\n\n### `medianBy(items, getValue)`\n\n배열의 각 요소에 함수를 적용한 결과의 중앙값을 구하고 싶을 때 `medianBy`를 사용하세요. 객체 배열에서 특정 속성의 중앙값을 계산하거나, 각 요소를 변환한 후 중앙값을 구할 때 유용해요. 홀수 개 요소를 가진 배열이면 정확히 가운데 값을, 짝수 개 요소를 가진 배열이면 가운데 두 값의 평균을 반환해요. 빈 배열이 주어지면 `NaN`을 반환해요.\n\n```typescript\nimport { medianBy } from 'es-toolkit/math';\n\n// 객체 배열에서 특정 속성의 중앙값을 계산해요 (홀수 개)\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }, { age: 29 }, { age: 31 }];\nconst medianAge = medianBy(people, person => person.age);\n// medianAge는 27이 돼요 (정렬된 ages [23, 25, 27, 29, 31]에서 가운데 값)\n\n// 객체 배열에서 특정 속성의 중앙값을 계산해요 (짝수 개)\nconst scores = [{ score: 80 }, { score: 90 }, { score: 85 }, { score: 95 }];\nconst medianScore = medianBy(scores, item => item.score);\n// medianScore는 87.5가 돼요 (정렬된 scores [80, 85, 90, 95]에서 (85 + 90) / 2)\n\n// 문자열 길이의 중앙값을 계산해요\nconst words = ['cat', 'elephant', 'dog', 'butterfly', 'ant'];\nconst medianLength = medianBy(words, word => word.length);\n// medianLength는 3이 돼요 (lengths [3, 8, 3, 9, 3]을 정렬하면 [3, 3, 3, 8, 9]에서 가운데 값)\n\n// 빈 배열의 경우 NaN을 반환해요\nconst emptyResult = medianBy([], x => x);\n// emptyResult는 NaN이 돼요\n```\n\n#### 파라미터\n\n- `items` (`readonly T[]`): 중앙값을 계산할 배열이에요.\n- `getValue` (`(element: T) => number`): 각 요소에서 숫자 값을 선택하는 함수예요.\n\n#### 반환 값\n\n(`number`): `getValue` 함수를 기준으로, 배열에 있는 모든 값의 중앙값을 반환해요. 빈 배열이면 `NaN`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/random.md",
    "content": "# random\n\n지정된 범위에서 무작위 숫자를 생성해요. 생성되는 숫자는 소수점을 포함하는 숫자예요.\n\n```typescript\nconst randomNumber = random(min, max);\n```\n\n## 사용법\n\n### `random(maximum)` / `random(minimum, maximum)`\n\n무작위 숫자가 필요할 때 `random`을 사용하세요. 소수점이 있는 숫자를 생성해요.\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 0 이상 5 미만의 무작위 소수를 생성해요.\nconst num1 = random(5);\nconsole.log(num1); // 예: 2.718281828\n\n// 2 이상 10 미만의 무작위 소수를 생성해요.\nconst num2 = random(2, 10);\nconsole.log(num2); // 예: 7.158765432\n\n// 음수 범위에서도 사용할 수 있어요.\nconst num3 = random(-5, -1);\nconsole.log(num3); // 예: -3.842134567\n\n// 소수 범위도 가능해요.\nconst num4 = random(1.5, 2.5);\nconsole.log(num4); // 예: 1.923456789\n```\n\n범위가 잘못된 경우 에러를 던져요.\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 최댓값이 0 이하이면 에러가 발생해요.\ntry {\n  random(0);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n\n// 최솟값이 최댓값보다 크거나 같으면 에러가 발생해요.\ntry {\n  random(5, 3);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n```\n\n#### 파라미터\n\n- `maximum` (`number`): 단일 파라미터 사용 시 최댓값(미포함)이에요. 0보다 커야 해요.\n- `minimum` (`number`): 최솟값(포함)이에요.\n- `maximum` (`number`): 최댓값(미포함)이에요. 최솟값보다 커야 해요.\n\n#### 반환 값\n\n(`number`): 지정된 범위 내의 무작위 소수를 반환해요.\n\n#### 에러\n\n- 최댓값이 최솟값보다 작거나 같으면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/randomInt.md",
    "content": "# randomInt\n\n지정된 범위에서 무작위 정수를 생성해요.\n\n```typescript\nconst randomInteger = randomInt(min, max);\n```\n\n## 사용법\n\n### `randomInt(maximum)` / `randomInt(minimum, maximum)`\n\n무작위 정수가 필요할 때 `randomInt`를 사용하세요. 소수점이 없는 정수만 반환해요.\n\n```typescript\nimport { randomInt } from 'es-toolkit/math';\n\n// 0 이상 5 미만의 무작위 정수를 생성해요.\nconst num1 = randomInt(5);\nconsole.log(num1); // 예: 3\n\n// 2 이상 10 미만의 무작위 정수를 생성해요.\nconst num2 = randomInt(2, 10);\nconsole.log(num2); // 예: 7\n\n// 음수 범위에서도 사용할 수 있어요.\nconst num3 = randomInt(-5, -1);\nconsole.log(num3); // 예: -3\n\n// 주사위 시뮬레이션 (1-6)\nconst diceRoll = randomInt(1, 7);\nconsole.log(diceRoll); // 예: 4\n\n// 배열에서 무작위 인덱스 선택\nconst items = ['apple', 'banana', 'cherry', 'date'];\nconst randomIndex = randomInt(items.length);\nconsole.log(items[randomIndex]); // 예: 'banana'\n```\n\n#### 파라미터\n\n- `maximum` (`number`): 단일 파라미터 사용 시 최댓값(미포함)이에요. 0보다 커야 해요.\n- `minimum` (`number`): 최솟값(포함)이에요.\n- `maximum` (`number`): 최댓값(미포함)이에요. 최솟값보다 커야 해요.\n\n#### 반환 값\n\n(`number`): 지정된 범위 내의 무작위 정수를 반환해요.\n\n#### 에러\n\n- 최댓값이 최솟값보다 작거나 같으면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/range.md",
    "content": "# range\n\n지정된 범위와 간격으로 숫자 배열을 생성해요.\n\n```typescript\nconst numbers = range(end);\nconst numbers = range(start, end, step);\n```\n\n## 사용법\n\n### `range(end)`\n\n0부터 지정된 끝 값까지의 연속된 숫자 배열이 필요할 때 `range`를 사용하세요. 반복문을 쓸 때 유용해요.\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 0부터 3까지의 배열을 만들어요.\nconst numbers1 = range(4);\nconsole.log(numbers1); // [0, 1, 2, 3]\n\n// 10개의 요소를 가진 배열의 인덱스\nconst indices = range(10);\nconsole.log(indices); // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\n// forEach 대신 사용할 수 있어요.\nrange(5).forEach(i => {\n  console.log(`반복 ${i}`); // 반복 0, 반복 1, 반복 2, 반복 3, 반복 4\n});\n```\n\n#### 파라미터\n\n- `end` (`number`): 끝 값(미포함)이에요. 0부터 시작해요.\n\n#### 반환 값\n\n(`number[]`): 0부터 끝 값까지 생성된 숫자 배열을 반환해요.\n\n### `range(start, end, step?)`\n\n지정된 시작값, 끝값, 간격으로 연속된 숫자 배열이 필요할 때 `range`를 사용하세요. 반복문을 쓸 때 유용해요.\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 1부터 4까지의 배열을 만들어요.\nconst numbers2 = range(1, 5);\nconsole.log(numbers2); // [1, 2, 3, 4]\n\n// 0부터 20까지 5씩 증가하는 배열을 만들어요.\nconst numbers3 = range(0, 20, 5);\nconsole.log(numbers3); // [0, 5, 10, 15]\n\n// 음수 방향으로도 만들 수 있어요.\nconst numbers4 = range(0, -5, -1);\nconsole.log(numbers4); // [0, -1, -2, -3, -4]\n\n// 큰 숫자에서 작은 숫자로 갈 때도 가능해요.\nconst numbers5 = range(5, 0, -1);\nconsole.log(numbers5); // [5, 4, 3, 2, 1]\n\n// 특정 범위의 페이지 번호 만들기\nconst pageNumbers = range(1, 11);\nconsole.log(pageNumbers); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n```\n\n#### 파라미터\n\n- `start` (`number`): 시작 값이에요. 결과 배열에 포함돼요.\n- `end` (`number`): 끝 값이에요. 결과 배열에 포함되지 않아요.\n- `step` (`number`, 선택): 각 숫자 사이의 간격이에요. 0이 아닌 정수여야 하고, 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`number[]`): 지정된 범위와 간격으로 생성된 숫자 배열을 반환해요.\n\n#### 에러\n\n- `step`이 0이거나 정수가 아니면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/rangeRight.md",
    "content": "# rangeRight\n\n지정된 범위와 간격으로 역순으로 숫자 배열을 생성해요.\n\n```typescript\nconst numbers = rangeRight(end);\nconst numbers = rangeRight(start, end, step?);\n```\n\n## 사용법\n\n### `rangeRight(end)`\n\n끝 값부터 0까지 역순으로 연속된 숫자 배열이 필요할 때 `rangeRight`를 사용하세요. `range`와 같지만 결과가 뒤에서부터 나와요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 3부터 0까지 역순으로 배열을 만들어요.\nconst numbers1 = rangeRight(4);\nconsole.log(numbers1); // [3, 2, 1, 0]\n\n// 배열의 역순 인덱스\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst reverseIndices = rangeRight(items.length);\nreverseIndices.forEach(i => {\n  console.log(items[i]); // 'e', 'd', 'c', 'b', 'a' 순으로 출력\n});\n```\n\n#### 파라미터\n\n- `end` (`number`): 끝 값(미포함)이에요. 0부터 시작해요.\n\n#### 반환 값\n\n(`number[]`): 끝 값부터 0까지 생성된 역순 숫자 배열을 반환해요.\n\n### `rangeRight(start, end, step?)`\n\n지정된 시작값, 끝값, 간격으로 역순 연속된 숫자 배열이 필요할 때 `rangeRight`를 사용하세요. `range`와 같지만 결과가 뒤에서부터 나와요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 4부터 1까지 역순으로 배열을 만들어요.\nconst numbers2 = rangeRight(1, 5);\nconsole.log(numbers2); // [4, 3, 2, 1]\n\n// 15부터 0까지 5씩 감소하는 배열을 만들어요.\nconst numbers3 = rangeRight(0, 20, 5);\nconsole.log(numbers3); // [15, 10, 5, 0]\n\n// 음수 방향으로도 만들 수 있어요.\nconst numbers4 = rangeRight(-5, 0, 1);\nconsole.log(numbers4); // [-1, -2, -3, -4, -5]\n\n// 큰 숫자에서 작은 숫자로 갈 때도 가능해요.\nconst numbers5 = rangeRight(5, 0, -1);\nconsole.log(numbers5); // [1, 2, 3, 4, 5]\n```\n\n카운트다운이나 페이지네이션에서 역순이 필요할 때 유용해요.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 카운트다운 만들기\nconst countdown = rangeRight(0, 11);\nconsole.log(countdown); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n\n// 페이지네이션에서 마지막 페이지부터 첫 페이지로\nconst pageNumbers = rangeRight(1, 11);\nconsole.log(pageNumbers); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n```\n\n#### 파라미터\n\n- `start` (`number`): 시작 값이에요. 결과 배열에 포함돼요.\n- `end` (`number`): 끝 값이에요. 결과 배열에 포함되지 않아요.\n- `step` (`number`, 선택): 각 숫자 사이의 간격이에요. 0이 아닌 정수여야 하고, 기본값은 `1`이에요.\n\n#### 반환 값\n\n(`number[]`): 지정된 범위와 간격으로 생성된 역순 숫자 배열을 반환해요.\n\n#### 에러\n\n- `step`이 0이거나 정수가 아니면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/round.md",
    "content": "# round\n\n숫자를 지정된 소수점 자릿수로 반올림해요.\n\n```typescript\nconst rounded = round(value, precision?);\n```\n\n## 사용법\n\n### `round(value, precision?)`\n\n숫자를 특정 소수점 자릿수로 반올림하고 싶을 때 `round`를 사용하세요. 정확한 계산을 위한 수학 함수예요.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 기본값 - 정수로 반올림해요.\nconst num1 = round(1.2345);\nconsole.log(num1); // 1\n\n// 소수점 둘째 자리까지 반올림해요.\nconst num2 = round(1.2345, 2);\nconsole.log(num2); // 1.23\n\n// 소수점 셋째 자리까지 반올림해요.\nconst num3 = round(1.2387, 3);\nconsole.log(num3); // 1.239\n\n// 음수도 반올림할 수 있어요.\nconst num4 = round(-1.2345, 2);\nconsole.log(num4); // -1.23\n\n// 큰 숫자도 처리해요.\nconst num5 = round(123.456789, 4);\nconsole.log(num5); // 123.4568\n```\n\n가격 계산이나 통계에서 유용해요.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 가격 계산 (소수점 둘째 자리까지)\nconst price = 19.999;\nconst finalPrice = round(price, 2);\nconsole.log(finalPrice); // 20.00\n\n// 퍼센트 계산 (소수점 첫째 자리까지)\nconst percentage = 66.66666;\nconst displayPercentage = round(percentage, 1);\nconsole.log(displayPercentage); // 66.7\n\n// 평점 계산 (소수점 첫째 자리까지)\nconst rating = 4.267;\nconst displayRating = round(rating, 1);\nconsole.log(displayRating); // 4.3\n```\n\n정확도가 중요한 계산에서 반올림해요.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 수학 계산 결과 정리\nconst result = Math.PI * 2;\nconst cleanResult = round(result, 5);\nconsole.log(cleanResult); // 6.28318\n\n// 측정값 반올림\nconst measurement = 15.789123;\nconst rounded = round(measurement, 3);\nconsole.log(rounded); // 15.789\n```\n\n잘못된 precision 값은 에러를 던져요.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// precision이 정수가 아니면 에러가 발생해요.\ntry {\n  round(1.23, 2.5);\n} catch (error) {\n  console.error(error.message); // 'Precision must be an integer.'\n}\n```\n\n#### 파라미터\n\n- `value` (`number`): 반올림할 숫자예요.\n- `precision` (`number`, 선택): 소수점 자릿수예요. 정수여야 하고, 기본값은 `0`이에요.\n\n#### 반환 값\n\n(`number`): 지정된 자릿수로 반올림된 숫자를 반환해요.\n\n#### 에러\n\n- `precision`이 정수가 아니면 에러를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/math/sum.md",
    "content": "# sum\n\n숫자 배열의 모든 요소를 더한 합계를 반환해요.\n\n```typescript\nconst total = sum(numbers);\n```\n\n## 사용법\n\n### `sum(nums)`\n\n숫자들의 합계를 구하고 싶을 때 `sum`을 사용하세요. 배열의 모든 숫자를 더해서 총합을 계산해요.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 기본적인 숫자 합계\nconst numbers = [1, 2, 3, 4, 5];\nconst total = sum(numbers);\nconsole.log(total); // 15\n\n// 소수점 숫자들의 합계\nconst prices = [19.99, 25.5, 3.75];\nconst totalPrice = sum(prices);\nconsole.log(totalPrice); // 49.24\n\n// 음수와 양수 섞인 합계\nconst values = [-10, 5, -3, 8];\nconst result = sum(values);\nconsole.log(result); // 0\n\n// 단일 숫자 배열\nconst single = [42];\nconst singleSum = sum(single);\nconsole.log(singleSum); // 42\n```\n\n빈 배열이나 실제 사용 예시들이에요.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 빈 배열은 0을 반환해요.\nconst empty = sum([]);\nconsole.log(empty); // 0\n\n// 점수 합계 계산\nconst scores = [85, 92, 78, 96, 88];\nconst totalScore = sum(scores);\nconst averageScore = totalScore / scores.length;\nconsole.log(totalScore); // 439\nconsole.log(averageScore); // 87.8\n\n// 월별 매출 합계\nconst monthlySales = [12000, 15000, 18000, 14000, 16000];\nconst totalSales = sum(monthlySales);\nconsole.log(totalSales); // 75000\n\n// 장바구니 총 금액\nconst cartItems = [29.99, 15.5, 8.75, 42.0];\nconst cartTotal = sum(cartItems);\nconsole.log(cartTotal); // 96.24\n```\n\n계산 결과를 다른 함수와 함께 사용할 수 있어요.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\nimport { round } from 'es-toolkit/math';\n\n// 합계 후 반올림\nconst measurements = [1.234, 2.567, 3.891];\nconst total = sum(measurements);\nconst rounded = round(total, 2);\nconsole.log(rounded); // 7.69\n\n// 퍼센트 계산\nconst votes = [45, 32, 23];\nconst totalVotes = sum(votes);\nconst percentages = votes.map(vote => round((vote / totalVotes) * 100, 1));\nconsole.log(percentages); // [45.0, 32.0, 23.0]\n```\n\n#### 파라미터\n\n- `nums` (`readonly number[]`): 합계를 계산할 숫자 배열이에요.\n\n#### 반환 값\n\n(`number`): 배열에 있는 모든 숫자의 합계를 반환해요. 빈 배열인 경우 `0`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/math/sumBy.md",
    "content": "# sumBy\n\n변환 함수를 사용해서 배열 요소들의 합계를 계산해요.\n\n```typescript\nconst total = sumBy(items, getValue);\n```\n\n## 사용법\n\n### `sumBy(items, getValue)`\n\n배열의 각 요소를 숫자로 변환해서 합계를 구하고 싶을 때 `sumBy`를 사용하세요. 객체 배열에서 특정 속성의 합을 구할 때 유용해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 객체 배열에서 특정 속성의 합계\nconst products = [\n  { name: 'laptop', price: 1000 },\n  { name: 'mouse', price: 25 },\n  { name: 'keyboard', price: 75 },\n];\nconst totalPrice = sumBy(products, item => item.price);\nconsole.log(totalPrice); // 1100\n\n// 사용자 나이의 합계\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst totalAge = sumBy(users, user => user.age);\nconsole.log(totalAge); // 90\n\n// 문자열 길이의 합계\nconst words = ['hello', 'world', 'test'];\nconst totalLength = sumBy(words, word => word.length);\nconsole.log(totalLength); // 14\n```\n\n복잡한 계산도 가능해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 점수에 가중치를 적용한 합계\nconst scores = [\n  { subject: 'math', score: 90, weight: 0.3 },\n  { subject: 'english', score: 85, weight: 0.2 },\n  { subject: 'science', score: 95, weight: 0.5 },\n];\nconst weightedSum = sumBy(scores, item => item.score * item.weight);\nconsole.log(weightedSum); // 91\n\n// 배열의 배열에서 길이의 합\nconst arrays = [[1, 2], [3, 4, 5], [6]];\nconst totalElements = sumBy(arrays, arr => arr.length);\nconsole.log(totalElements); // 6\n\n// 조건부 계산\nconst orders = [\n  { id: 1, amount: 100, status: 'completed' },\n  { id: 2, amount: 200, status: 'pending' },\n  { id: 3, amount: 150, status: 'completed' },\n];\nconst completedTotal = sumBy(orders, order => (order.status === 'completed' ? order.amount : 0));\nconsole.log(completedTotal); // 250\n```\n\n실제 사용 예시들이에요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 월별 매출 합계\nconst monthlyReports = [\n  { month: 'January', sales: 12000, expenses: 8000 },\n  { month: 'February', sales: 15000, expenses: 9000 },\n  { month: 'March', sales: 18000, expenses: 11000 },\n];\nconst totalSales = sumBy(monthlyReports, report => report.sales);\nconst totalExpenses = sumBy(monthlyReports, report => report.expenses);\nconst totalProfit = totalSales - totalExpenses;\nconsole.log(totalSales); // 45000\nconsole.log(totalExpenses); // 28000\nconsole.log(totalProfit); // 17000\n\n// 학생들의 평균 점수 계산을 위한 총점\nconst students = [\n  { name: 'Alice', tests: [85, 90, 88] },\n  { name: 'Bob', tests: [92, 87, 95] },\n  { name: 'Charlie', tests: [78, 85, 82] },\n];\nconst totalTestScores = sumBy(students, student => student.tests.reduce((sum, score) => sum + score, 0));\nconsole.log(totalTestScores); // 762\n```\n\n빈 배열은 0을 반환해요.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\nconst emptyArray = [];\nconst result = sumBy(emptyArray, x => x.value);\nconsole.log(result); // 0\n```\n\n#### 파라미터\n\n- `items` (`readonly T[]`): 합계를 계산할 배열이에요.\n- `getValue` (`(element: T) => number`): 각 요소를 숫자로 변환하는 함수예요.\n\n#### 반환 값\n\n(`number`): 변환 함수를 적용한 값들의 합계를 반환해요. 빈 배열인 경우 `0`을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/clone.md",
    "content": "# clone\n\n주어진 값을 얕게 복사해요.\n\n```typescript\nconst cloned = clone(obj);\n```\n\n## 사용법\n\n### `clone(obj)`\n\n객체, 배열, Date, RegExp 등의 값을 얕게 복사하고 싶을 때 `clone`을 사용하세요. 얇은 복사는 최상위 레벨의 속성들만 새로 복사되고, 중첩된 객체나 배열은 원본과 레퍼런스를 공유해요.\n\n```typescript\nimport { clone } from 'es-toolkit/object';\n\n// 원시 값은 그대로 반환돼요\nconst num = 29;\nconst clonedNum = clone(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// 배열을 얇게 복사해요\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\nconsole.log(clonedArr); // [1, 2, 3]\nconsole.log(clonedArr === arr); // false\n\n// 객체를 얇게 복사해요\nconst obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\nconst clonedObj = clone(obj);\nconsole.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.c === obj.c); // true (얇은 복사이므로 중첩된 배열은 참조 공유)\n```\n\n`Date`, `RegExp`, `Map`, `Set` 같은 다양한 JavaScript 타입들을 지원해요.\n\n```typescript\n// Date 객체\nconst date = new Date();\nconst clonedDate = clone(date);\nconsole.log(clonedDate !== date); // true\nconsole.log(clonedDate.getTime() === date.getTime()); // true\n\n// RegExp 객체\nconst regex = /abc/gi;\nconst clonedRegex = clone(regex);\nconsole.log(clonedRegex !== regex); // true\nconsole.log(clonedRegex.source === regex.source); // true\n\n// Map과 Set\nconst map = new Map([['key', 'value']]);\nconst clonedMap = clone(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key')); // 'value'\n```\n\n#### 파라미터\n\n- `obj` (`T`): 복사할 값이에요. 객체, 배열, 원시값 등 모든 타입이 가능해요.\n\n#### 반환 값\n\n(`T`): 주어진 값의 얇은 복사본이에요.\n"
  },
  {
    "path": "docs/ko/reference/object/cloneDeep.md",
    "content": "# cloneDeep\n\n주어진 값을 깊게 복사해요.\n\n```typescript\nconst deepCloned = cloneDeep(obj);\n```\n\n## 사용법\n\n### `cloneDeep(obj)`\n\n객체나 배열을 중첩된 구조까지 모두 새롭게 복사하고 싶을 때 `cloneDeep`을 사용하세요. 깊은 복사는 모든 중첩된 객체와 배열까지 완전히 독립적으로 복사해서, 원본과 복사본이 서로 영향을 주지 않아요.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/object';\n\n// 원시 값은 그대로 반환돼요\nconst num = 29;\nconst clonedNum = cloneDeep(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// 중첩된 객체를 깊게 복사해요\nconst obj = { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] };\nconst clonedObj = cloneDeep(obj);\nconsole.log(clonedObj); // { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.a === obj.a); // false (중첩된 객체도 새로 복사됨)\nconsole.log(clonedObj.d === obj.d); // false (중첩된 배열도 새로 복사됨)\nconsole.log(clonedObj.d[2] === obj.d[2]); // false (배열 안의 객체도 새로 복사됨)\n\n// 원본을 수정해도 복사본에 영향 없음\nconst original = { a: { count: 1 } };\nconst copied = cloneDeep(original);\noriginal.a.count = 2;\nconsole.log(copied.a.count); // 1 (변하지 않음)\n```\n\n`Map`, `Set` 같은 다양한 JavaScript 타입들을 지원하고, 순환 참조가 있는 객체도 지원해요.\n\n```typescript\n// Map과 Set을 깊게 복사\nconst map = new Map([['key', { nested: 'value' }]]);\nconst clonedMap = cloneDeep(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key') !== map.get('key')); // true (중첩된 객체도 새로 복사)\n\n// 순환 참조도 안전하게 처리\nconst circular: any = { name: 'test' };\ncircular.self = circular;\nconst clonedCircular = cloneDeep(circular);\nconsole.log(clonedCircular !== circular); // true\nconsole.log(clonedCircular.self === clonedCircular); // true (순환 참조 유지)\n```\n\n접근자(getter)로 정의된 읽기 전용 속성의 경우, 복사된 객체에는 접근자의 반환 값이 일반 속성으로 저장돼요.\n\n```typescript\nconst source = {\n  get computedValue() {\n    return 42;\n  },\n  normalValue: 'hello',\n};\n\nconst cloned = cloneDeep(source);\nconsole.log(cloned); // { computedValue: 42, normalValue: 'hello' }\n```\n\n#### 파라미터\n\n- `obj` (`T`): 깊게 복사할 값이에요. 객체, 배열, 원시값 등 모든 타입이 가능해요.\n\n#### 반환 값\n\n(`T`): 주어진 값의 깊은 복사본이에요.\n"
  },
  {
    "path": "docs/ko/reference/object/cloneDeepWith.md",
    "content": "# cloneDeepWith\n\n주어진 값을 사용자 정의 함수를 통해 깊게 복사해요.\n\n```typescript\nconst customCloned = cloneDeepWith(obj, cloneValue);\n```\n\n## 사용법\n\n### `cloneDeepWith(obj, cloneValue)`\n\n객체나 배열을 깊게 복사할 때 특정 값들에 대해서는 사용자 정의 방식으로 복사하고 싶을 때 `cloneDeepWith`를 사용하세요. 사용자 정의 함수 `cloneValue`가 값을 반환하면 그 값을 사용하고, `undefined`를 반환하면 기본 방식으로 복사해요.\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/object';\n\n// 숫자는 2배로 만들어서 복사\nconst obj = { a: 1, b: { c: 2, d: 'text' } };\nconst clonedObj = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value * 2;\n  }\n  // undefined를 반환하면 기본 방식으로 복사\n});\nconsole.log(clonedObj); // { a: 2, b: { c: 4, d: 'text' } }\n\n// 배열의 모든 요소에 1을 더해서 복사\nconst arr = [1, [2, 3], { num: 4 }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value + 1;\n  }\n});\nconsole.log(clonedArr); // [2, [3, 4], { num: 5 }]\n```\n\n사용자 정의 함수에게는 현재 값, 키, 원본 객체, 내부 스택 정보가 파라미터로 제공돼요.\n\n```typescript\nconst data = {\n  user: { name: 'Alice', age: 30 },\n  settings: { theme: 'dark', lang: 'ko' },\n};\n\nconst result = cloneDeepWith(data, (value, key, obj, stack) => {\n  // 'user' 객체는 특별한 방식으로 복사\n  if (key === 'user' && typeof value === 'object') {\n    return { ...value, cloned: true };\n  }\n\n  // 문자열에 prefix 추가\n  if (typeof value === 'string') {\n    return `cloned_${value}`;\n  }\n});\n\nconsole.log(result);\n// {\n//   user: { name: 'cloned_Alice', age: 30, cloned: true },\n//   settings: { theme: 'cloned_dark', lang: 'cloned_ko' }\n// }\n```\n\n사용자 정의 함수를 사용하면, 객체를 복사하는 방법을 자유롭게 설정할 수 있어요. 예를 들어, 다음과 같이 `Date` 객체는 1년 뒤 시점으로 복사할 수 있어요.\n\n```typescript\nconst data = {\n  created: new Date('2023-01-01'),\n  updated: new Date('2023-12-31'),\n  name: 'Document',\n};\n\nconst cloned = cloneDeepWith(data, value => {\n  // Date 객체는 시간을 1년 뒤로 설정\n  if (value instanceof Date) {\n    const newDate = new Date(value);\n    newDate.setFullYear(newDate.getFullYear() + 1);\n    return newDate;\n  }\n});\n\nconsole.log(cloned.created.getFullYear()); // 2024\nconsole.log(cloned.updated.getFullYear()); // 2024\n```\n\n#### 파라미터\n\n- `obj` (`T`): 깊게 복사할 값이에요.\n- `cloneValue` (`(value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any`): 사용자 정의 복사 함수예요. 복사할 값을 반환하거나, 기본 방식을 사용하려면 `undefined`를 반환해주세요.\n  - `value`: 현재 복사되고 있는 값이에요.\n  - `key`: 현재 복사되고 있는 값의 속성 이름이에요.\n  - `obj`: 복사할 원본 객체예요.\n  - `stack`: 순환 참조를 처리하기 위한 내부 스택이에요.\n\n#### 반환 값\n\n(`T`): 사용자 정의 함수를 통해 처리된 깊은 복사본이에요.\n"
  },
  {
    "path": "docs/ko/reference/object/findKey.md",
    "content": "# findKey\n\n주어진 조건을 만족하는 첫 번째 요소의 키를 찾아요.\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 사용법\n\n### `findKey(obj, predicate)`\n\n객체에서 특정 조건을 만족하는 첫 번째 요소의 키를 찾고 싶을 때 `findKey`를 사용하세요. 조건 함수가 `true`를 반환하는 첫 번째 값에 대한 키를 반환해요.\n\n```typescript\nimport { findKey } from 'es-toolkit/object';\n\n// 나이가 30 미만인 첫 번째 사용자 찾기\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nconst youngUserKey = findKey(users, user => user.age < 30);\nconsole.log(youngUserKey); // 'alice'\n\n// 비활성 사용자 찾기\nconst inactiveUserKey = findKey(users, user => !user.active);\nconsole.log(inactiveUserKey); // 'bob'\n\n// 조건을 만족하는 요소가 없는 경우\nconst seniorUserKey = findKey(users, user => user.age > 50);\nconsole.log(seniorUserKey); // undefined\n```\n\n조건 함수는 현재 값, 키, 전체 객체를 받아요.\n\n```typescript\nconst data = {\n  item1: { priority: 'high', status: 'pending' },\n  item2: { priority: 'low', status: 'done' },\n  item3: { priority: 'high', status: 'done' },\n};\n\n// 키 이름과 값을 모두 고려한 검색\nconst result = findKey(data, (value, key, obj) => {\n  return key.includes('2') && value.status === 'done';\n});\nconsole.log(result); // 'item2'\n```\n\n복잡한 객체 구조에서도 사용할 수 있어요.\n\n```typescript\nconst products = {\n  laptop: {\n    specs: { ram: 16, cpu: 'Intel i7' },\n    price: 1200,\n    available: true,\n  },\n  phone: {\n    specs: { ram: 8, cpu: 'Snapdragon' },\n    price: 800,\n    available: false,\n  },\n  tablet: {\n    specs: { ram: 12, cpu: 'Apple M1' },\n    price: 1000,\n    available: true,\n  },\n};\n\nconst affordableKey = findKey(products, product => product.price < 1000 && product.available);\nconsole.log(affordableKey); // undefined (조건을 만족하는 제품 없음)\n\nconst highRamKey = findKey(products, product => product.specs.ram >= 12);\nconsole.log(highRamKey); // 'laptop'\n```\n\n#### 파라미터\n\n- `obj` (`T extends Record<any, any>`): 검색할 객체예요.\n- `predicate` (`(value: T[keyof T], key: keyof T, obj: T) => boolean`): 각 요소에 대해 실행할 조건 함수예요. `true`를 반환하는 첫 번째 요소의 키를 찾아요.\n\n#### 반환 값\n\n(`keyof T | undefined`): 조건을 만족하는 첫 번째 요소의 키예요. 조건을 만족하는 요소가 없으면 `undefined`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/flattenObject.md",
    "content": "# flattenObject\n\n중첩된 객체를 평탄한 객체로 변환해요.\n\n```typescript\nconst flattened = flattenObject(object, options?);\n```\n\n## 사용법\n\n### `flattenObject(object, options?)`\n\n깊이 중첩된 객체나 배열을 점(`.`) 표기법을 사용한 키로 평탄화하고 싶을 때 `flattenObject`를 사용하세요. 각 중첩된 속성이 구분자로 연결된 키를 가진 단일 레벨 객체가 돼요.\n\n```typescript\nimport { flattenObject } from 'es-toolkit/object';\n\n// 중첩된 객체를 평탄화\nconst nestedObject = {\n  a: {\n    b: {\n      c: 1,\n    },\n  },\n  d: [2, 3],\n  e: 'simple',\n};\n\nconst flattened = flattenObject(nestedObject);\nconsole.log(flattened);\n// {\n//   'a.b.c': 1,\n//   'd.0': 2,\n//   'd.1': 3,\n//   'e': 'simple'\n// }\n\n// 사용자 정의 구분자 사용\nconst withCustomDelimiter = flattenObject(nestedObject, { delimiter: '/' });\nconsole.log(withCustomDelimiter);\n// {\n//   'a/b/c': 1,\n//   'd/0': 2,\n//   'd/1': 3,\n//   'e': 'simple'\n// }\n```\n\n다음과 같이 설정 객체를 평탄화할 때 유용하게 사용할 수 있어요.\n\n```typescript\n// 설정 객체 평탄화\nconst config = {\n  database: {\n    host: 'localhost',\n    port: 5432,\n    credentials: {\n      username: 'admin',\n      password: 'secret',\n    },\n  },\n  features: ['auth', 'logging'],\n  debug: true,\n};\n\nconst flatConfig = flattenObject(config);\nconsole.log(flatConfig);\n// {\n//   'database.host': 'localhost',\n//   'database.port': 5432,\n//   'database.credentials.username': 'admin',\n//   'database.credentials.password': 'secret',\n//   'features.0': 'auth',\n//   'features.1': 'logging',\n//   'debug': true\n// }\n```\n\n`options.delimiter` 옵션을 사용하면 점(`.`)이 아니라 언더스코어(`_`) 같은 커스텀 문자로 객체를 평탄화할 수 있어요.\n\n```typescript\n// 언더스코어로 연결된 환경 변수 스타일로\nconst envStyle = flattenObject(config, { delimiter: '_' });\nconsole.log(envStyle);\n// {\n//   'database_host': 'localhost',\n//   'database_port': 5432,\n//   'database_credentials_username': 'admin',\n//   'database_credentials_password': 'secret',\n//   'features_0': 'auth',\n//   'features_1': 'logging',\n//   'debug': true\n// }\n```\n\n빈 객체와 특수한 경우들도 적절히 처리해요.\n\n```typescript\n// 빈 객체나 배열\nconst emptyCase = {\n  empty: {},\n  emptyArray: [],\n  nullValue: null,\n  undefinedValue: undefined,\n};\n\nconst result = flattenObject(emptyCase);\nconsole.log(result);\n// {\n//   'empty': {},\n//   'emptyArray: [],\n//   'nullValue': null,\n//   'undefinedValue': undefined\n// }\n// 빈 객체나 빈 배열은 키로 나타나요\n```\n\n#### 파라미터\n\n- `object` (`object`): 평탄화할 객체예요.\n- `options` (`FlattenObjectOptions`, 선택): 평탄화 옵션이에요.\n  - `delimiter` (`string`, 선택): 중첩된 키를 연결할 구분자예요. 기본값은 `'.'`예요.\n\n#### 반환 값\n\n(`Record<string, any>`): 모든 중첩된 속성이 평탄화된 새 객체예요.\n"
  },
  {
    "path": "docs/ko/reference/object/invert.md",
    "content": "# invert\n\n객체의 키와 값을 뒤바꾼 새 객체를 생성해요.\n\n```typescript\nconst inverted = invert(obj);\n```\n\n## 사용법\n\n### `invert(obj)`\n\n객체의 키와 값을 뒤바꾼 새로운 객체를 만들고 싶을 때 `invert`를 사용하세요. 원본 객체의 키는 새 객체의 값이 되고, 원본 객체의 값은 새 객체의 키가 돼요. 중복된 값이 있으면 나중에 나오는 키가 사용돼요.\n\n```typescript\nimport { invert } from 'es-toolkit/object';\n\n// 기본 사용법\nconst original = { a: 1, b: 2, c: 3 };\nconst inverted = invert(original);\nconsole.log(inverted); // { 1: 'a', 2: 'b', 3: 'c' }\n\n// 중복된 값이 있는 경우\nconst withDuplicates = { a: 1, b: 1, c: 2 };\nconst result = invert(withDuplicates);\nconsole.log(result); // { 1: 'b', 2: 'c' } (나중에 나오는 'b'가 키 1의 값으로 사용됨)\n\n// 문자열 키와 숫자 값\nconst grades = { alice: 85, bob: 92, charlie: 88 };\nconst invertedGrades = invert(grades);\nconsole.log(invertedGrades); // { 85: 'alice', 92: 'bob', 88: 'charlie' }\n```\n\n다양한 타입의 키와 값으로 사용할 수 있어요.\n\n```typescript\n// 숫자 키와 문자열 값\nconst statusCodes = { 200: 'OK', 404: 'Not Found', 500: 'Internal Server Error' };\nconst invertedCodes = invert(statusCodes);\nconsole.log(invertedCodes);\n// { 'OK': '200', 'Not Found': '404', 'Internal Server Error': '500' }\n\n// 역방향 조회가 필요한 경우 유용해요\nconst userRoles = { admin: 'administrator', user: 'regular_user', guest: 'visitor' };\nconst roleToKey = invert(userRoles);\nconsole.log(roleToKey);\n// { 'administrator': 'admin', 'regular_user': 'user', 'visitor': 'guest' }\n\n// 이제 값으로 키를 찾을 수 있어요\nfunction findRoleKey(roleName: string) {\n  return roleToKey[roleName];\n}\nconsole.log(findRoleKey('administrator')); // 'admin'\n```\n\n열거형(Enum)이나 상수 객체와 함께 사용하면 유용해요.\n\n```typescript\n// 색상 코드 매핑\nconst colorCodes = {\n  red: '#FF0000',\n  green: '#00FF00',\n  blue: '#0000FF',\n};\n\nconst codeToColor = invert(colorCodes);\nconsole.log(codeToColor);\n// { '#FF0000': 'red', '#00FF00': 'green', '#0000FF': 'blue' }\n\n// 이제 색상 코드로 색상 이름을 찾을 수 있어요\nfunction getColorName(code: string) {\n  return codeToColor[code] || 'unknown';\n}\nconsole.log(getColorName('#FF0000')); // 'red'\n```\n\n#### 파라미터\n\n- `obj` (`Record<K, V>`): 키와 값을 뒤바꿀 객체예요. 키와 값 모두 문자열, 숫자, 또는 심볼이어야 해요.\n\n#### 반환 값\n\n(`Record<V, K>`): 원본 객체의 키와 값이 뒤바뀐 새 객체예요.\n"
  },
  {
    "path": "docs/ko/reference/object/mapKeys.md",
    "content": "# mapKeys\n\n객체의 키를 함수를 통해 변환한 새로운 객체를 반환해요.\n\n```typescript\nconst newObj = mapKeys(object, getNewKey);\n```\n\n## 사용법\n\n### `mapKeys(object, getNewKey)`\n\n객체의 각 키를 변환하여 새로운 객체를 만들고 싶을 때 `mapKeys`를 사용하세요. 값은 그대로 유지되고, 키만 `getNewKey` 함수의 결과로 변경돼요.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/object';\n\n// 키에 접두사를 추가해요\nconst obj = { a: 1, b: 2 };\nconst prefixed = mapKeys(obj, (value, key) => `prefix_${key}`);\n// prefixed는 { prefix_a: 1, prefix_b: 2 }가 돼요\n\n// 키와 값을 조합해서 새로운 키를 만들어요\nconst combined = mapKeys(obj, (value, key) => `${key}${value}`);\n// combined는 { a1: 1, b2: 2 }가 돼요\n\n// 키를 대문자로 변환해요\nconst uppercased = mapKeys(obj, (value, key) => key.toString().toUpperCase());\n// uppercased는 { A: 1, B: 2 }가 돼요\n```\n\n#### 파라미터\n\n- `object` (`T extends Record<PropertyKey, any>`): 키를 변환할 객체예요.\n- `getNewKey` (`(value: T[keyof T], key: keyof T, object: T) => K`): 새로운 키를 생성하는 함수예요. 값, 키, 전체 객체를 파라미터로 받아요.\n\n#### 반환 값\n\n(`Record<K, T[keyof T]>`): 키가 변환된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/mapValues.md",
    "content": "# mapValues\n\n객체의 값을 함수를 통해 변환한 새로운 객체를 반환해요.\n\n```typescript\nconst newObj = mapValues(object, getNewValue);\n```\n\n## 사용법\n\n### `mapValues(object, getNewValue)`\n\n객체의 각 값을 변환하여 새로운 객체를 만들고 싶을 때 `mapValues`를 사용하세요. 키는 그대로 유지되고, 값만 `getNewValue` 함수의 결과로 변경돼요.\n\n```typescript\nimport { mapValues } from 'es-toolkit/object';\n\n// 모든 값을 두 배로 늘려요\nconst numbers = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(numbers, value => value * 2);\n// doubled는 { a: 2, b: 4, c: 6 }이 돼요\n\n// 문자열 값을 대문자로 변환해요\nconst strings = { first: 'hello', second: 'world' };\nconst uppercased = mapValues(strings, value => value.toUpperCase());\n// uppercased는 { first: 'HELLO', second: 'WORLD' }가 돼요\n\n// 키와 값을 함께 활용해요\nconst scores = { alice: 85, bob: 90, charlie: 95 };\nconst grades = mapValues(scores, (value, key) => `${key}: ${value >= 90 ? 'A' : 'B'}`);\n// grades는 { alice: 'alice: B', bob: 'bob: A', charlie: 'charlie: A' }가 돼요\n```\n\n#### 파라미터\n\n- `object` (`T extends object`): 값을 변환할 객체예요.\n- `getNewValue` (`(value: T[K], key: K, object: T) => V`): 새로운 값을 생성하는 함수예요. 값, 키, 전체 객체를 파라미터로 받아요.\n\n#### 반환 값\n\n(`Record<K, V>`): 값이 변환된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/merge.md",
    "content": "# merge\n\n소스 객체를 대상 객체에 깊게 병합해서 대상 객체를 수정해요.\n\n```typescript\nconst result = merge(target, source);\n```\n\n## 사용법\n\n### `merge(target, source)`\n\n두 객체를 깊게 병합하고 싶을 때 `merge`를 사용하세요. 중첩된 객체와 배열도 재귀적으로 병합돼요. [toMerged](./toMerged.md)와 다르게 원본 `target` 객체가 수정돼요.\n\n```typescript\nimport { merge } from 'es-toolkit/object';\n\n// 기본적인 객체 병합\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// result와 target 모두 { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }가 돼요\n\n// 배열도 병합돼요\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nmerge(arrayTarget, arraySource);\n// arrayTarget은 { a: [3, 2], b: { x: 1, y: 2 } }가 돼요\n\n// null 값도 적절히 처리해요\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nmerge(nullTarget, nullSource);\n// nullTarget은 { a: [1, 2, 3] }이 돼요\n```\n\n`undefined` 값은 기존 값을 덮어쓰지 않아요.\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nmerge(target, source);\n// target은 { a: 1, b: 2, c: 3 }이 돼요 (b는 덮어쓰이지 않음)\n```\n\n#### 파라미터\n\n- `target` (`T extends Record<PropertyKey, any>`): 소스 객체를 병합할 대상 객체예요. 이 객체가 수정돼요.\n- `source` (`S extends Record<PropertyKey, any>`): 대상 객체에 병합할 소스 객체예요.\n\n#### 반환 값\n\n(`T & S`): 소스 객체가 병합된 대상 객체를 반환해요.\n\n## 예시\n\n```typescript\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n// 반환 값: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\nconst target = { a: [1, 2], b: { x: 1 } };\nconst source = { a: [3], b: { y: 2 } };\nconst result = merge(target, source);\nconsole.log(result);\n// 반환 값: { a: [3, 2], b: { x: 1, y: 2 } }\n\nconst target = { a: null };\nconst source = { a: [1, 2, 3] };\nconst result = merge(target, source);\nconsole.log(result);\n// 반환 값: { a: [1, 2, 3] }\n```\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { merge } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n```\n\n:::\n\n## 성능 비교\n\n|                   | [번들 사이즈](../../bundle-size.md) | [런타임 성능](../../performance.md) |\n| ----------------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit        | 271 바이트 (97.8% 작음)             | 1,952,436 회 (3.65× 빠름)           |\n| es-toolkit/compat | 4,381 바이트 (64.9% 작음)           | 706,558 회 (1.32× 빠름)             |\n| lodash-es         | 12,483 바이트                       | 533,484 회                          |\n"
  },
  {
    "path": "docs/ko/reference/object/mergeWith.md",
    "content": "# mergeWith\n\n사용자 정의 병합 함수를 사용해서 소스 객체를 대상 객체에 깊게 병합해서 대상 객체를 수정해요.\n\n```typescript\nconst result = mergeWith(target, source, mergeFunction);\n```\n\n## 사용법\n\n### `mergeWith(target, source, merge)`\n\n두 객체를 병합할 때 각 속성에 대해 사용자 정의 병합 로직을 적용하고 싶을 때 `mergeWith`를 사용하세요. 병합 함수가 `undefined`를 반환하면 기본 깊은 병합 로직을 사용해요.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/object';\n\n// 숫자 값을 더해서 병합해요\nconst target = { a: 1, b: 2, c: { x: 10 } };\nconst source = { b: 3, c: { x: 20, y: 30 }, d: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue, key) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue; // 숫자는 더해요\n  }\n  // undefined를 반환하면 기본 병합 로직을 사용해요\n});\n// result와 target 모두 { a: 1, b: 5, c: { x: 30, y: 30 }, d: 4 }가 돼요\n\n// 배열을 연결해서 병합해요\nconst arrayTarget = { items: [1, 2], metadata: { count: 2 } };\nconst arraySource = { items: [3, 4], metadata: { count: 2 } };\n\nmergeWith(arrayTarget, arraySource, (targetValue, sourceValue) => {\n  if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n    return targetValue.concat(sourceValue);\n  }\n});\n// arrayTarget은 { items: [1, 2, 3, 4], metadata: { count: 2 } }가 돼요\n\n// 키에 따라 다른 병합 로직 적용해요\nconst config = { timeout: 1000, retries: 3, features: { featureA: true } };\nconst updates = { timeout: 2000, retries: 5, features: { featureB: false } };\n\nmergeWith(config, updates, (targetValue, sourceValue, key) => {\n  if (key === 'timeout') {\n    return Math.max(targetValue, sourceValue); // timeout은 더 큰 값 선택\n  }\n  if (key === 'retries') {\n    return Math.min(targetValue, sourceValue); // retries는 더 작은 값 선택\n  }\n  // 다른 속성은 기본 병합 로직 사용\n});\n// config는 { timeout: 2000, retries: 3, features: { featureA: true, featureB: false } }가 돼요\n```\n\n#### 파라미터\n\n- `target` (`T extends Record<PropertyKey, any>`): 소스 객체를 병합할 대상 객체예요. 이 객체가 수정돼요.\n- `source` (`S extends Record<PropertyKey, any>`): 대상 객체에 병합할 소스 객체예요.\n- `merge` (`(targetValue: any, sourceValue: any, key: string, target: T, source: S) => any`): 사용자 정의 병합 함수예요.\n  - `targetValue`: 대상 객체의 현재 값\n  - `sourceValue`: 소스 객체의 값\n  - `key`: 병합 중인 속성의 키\n  - `target`: 대상 객체\n  - `source`: 소스 객체\n\n#### 반환 값\n\n(`T & S`): 소스 객체가 병합된 대상 객체를 반환해요.\n\n## 예시\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nmergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\n// 반환 값: { a: 1, b: 5, c: 4 }\n\nconst target = { a: [1], b: [2] };\nconst source = { a: [3], b: [4] };\n\nconst result = mergeWith(target, source, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 반환 값: { a: [1, 3], b: [2, 4] })\n```\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { mergeWith } from 'es-toolkit';\n\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/object/omit.md",
    "content": "# omit\n\n지정된 키들을 제외한 새로운 객체를 반환해요.\n\n```typescript\nconst result = omit(obj, keys);\n```\n\n## 사용법\n\n### `omit(obj, keys)`\n\n객체에서 특정 키들만 제외하고 싶을 때 `omit`을 사용하세요. 지정된 키에 해당하는 속성들을 제거한 새로운 객체를 반환해요.\n\n```typescript\nimport { omit } from 'es-toolkit/object';\n\n// 특정 키들을 제외해요\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = omit(obj, ['b', 'c']);\n// result는 { a: 1, d: 4 }가 돼요\n\n// 존재하지 않는 키를 지정해도 에러가 발생하지 않아요\nconst safe = omit(obj, ['b', 'nonexistent']);\n// safe는 { a: 1, c: 3, d: 4 }가 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T extends Record<string, any>`): 키를 제외할 객체예요.\n- `keys` (`readonly K[]`): 객체에서 제외할 키들의 배열이에요.\n\n#### 반환 값\n\n(`Omit<T, K>`): 지정된 키들이 제외된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/omitBy.md",
    "content": "# omitBy\n\n조건 함수를 만족하는 속성들을 제외한 새로운 객체를 반환해요.\n\n```typescript\nconst result = omitBy(obj, shouldOmit);\n```\n\n## 사용법\n\n### `omitBy(obj, shouldOmit)`\n\n조건 함수를 기반으로 객체의 속성들을 선택적으로 제외하고 싶을 때 `omitBy`를 사용하세요. 조건 함수가 `true`를 반환하는 속성들은 제외되고, `false`를 반환하는 속성들만 포함된 새로운 객체를 반환해요.\n\n```typescript\nimport { omitBy } from 'es-toolkit/object';\n\n// 문자열 값을 가진 속성들을 제외해요\nconst obj = { a: 1, b: 'remove', c: 3, d: 'also remove' };\nconst result = omitBy(obj, value => typeof value === 'string');\n// result는 { a: 1, c: 3 }이 돼요\n\n// 짝수 값들만 제외해요\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst odds = omitBy(numbers, value => value % 2 === 0);\n// odds는 { a: 1, c: 3 }이 돼요\n\n// 키와 값을 모두 활용해요\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst nonAdmins = omitBy(data, (value, key) => key.startsWith('admin'));\n// nonAdmins는 { user1: 25, user2: 17 }이 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T extends Record<string, any>`): 속성들을 필터링할 객체예요.\n- `shouldOmit` (`(value: T[keyof T], key: keyof T) => boolean`): 속성을 제외할지 결정하는 조건 함수예요. 값과 키를 받아서 제외하려면 `true`, 유지하려면 `false`를 반환해요.\n\n#### 반환 값\n\n(`Partial<T>`): 조건 함수를 만족하지 않는 속성들로 구성된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/pick.md",
    "content": "# pick\n\n지정된 키들에 해당하는 속성들만 포함한 새로운 객체를 반환해요.\n\n```typescript\nconst result = pick(obj, keys);\n```\n\n## 사용법\n\n### `pick(obj, keys)`\n\n객체에서 특정 키들에 해당하는 속성들만 선택하고 싶을 때 `pick`을 사용하세요. 지정된 키에 해당하는 속성들만 포함한 새로운 객체를 반환해요.\n\n```typescript\nimport { pick } from 'es-toolkit/object';\n\n// 특정 키들만 선택해요\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// result는 { a: 1, c: 3 }이 돼요\n\n// 존재하지 않는 키를 지정해도 무시돼요\nconst safe = pick(obj, ['a', 'nonexistent']);\n// safe는 { a: 1 }이 돼요\n\n// 중첵된 객체에서도 사용할 수 있어요\nconst nested = {\n  user: { name: 'John', age: 30 },\n  posts: ['post1', 'post2'],\n  settings: { theme: 'dark' },\n};\nconst picked = pick(nested, ['user', 'settings']);\n// picked는 { user: { name: 'John', age: 30 }, settings: { theme: 'dark' } }가 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T extends Record<string, any>`): 속성들을 선택할 객체예요.\n- `keys` (`readonly K[]`): 객체에서 선택할 키들의 배열이에요.\n\n#### 반환 값\n\n(`Pick<T, K>`): 지정된 키들에 해당하는 속성들만 포함한 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/pickBy.md",
    "content": "# pickBy\n\n조건 함수를 만족하는 속성들만 포함한 새로운 객체를 반환해요.\n\n```typescript\nconst result = pickBy(obj, shouldPick);\n```\n\n## 사용법\n\n### `pickBy(obj, shouldPick)`\n\n조건 함수를 기반으로 객체의 속성들을 선택적으로 선택하고 싶을 때 `pickBy`를 사용하세요. 조건 함수가 `true`를 반환하는 속성들만 포함된 새로운 객체를 반환해요.\n\n```typescript\nimport { pickBy } from 'es-toolkit/object';\n\n// 문자열 값을 가진 속성들만 선택해요\nconst obj = { a: 1, b: 'select', c: 3, d: 'also select' };\nconst result = pickBy(obj, value => typeof value === 'string');\n// result는 { b: 'select', d: 'also select' }이 돼요\n\n// 짝수 값들만 선택해요\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst evens = pickBy(numbers, value => value % 2 === 0);\n// evens는 { b: 2, d: 4 }가 돼요\n\n// 키와 값을 모두 활용해요\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst admins = pickBy(data, (value, key) => key.startsWith('admin') && value > 25);\n// admins는 { admin1: 30, admin2: 28 }이 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T extends Record<string, any>`): 속성들을 필터링할 객체예요.\n- `shouldPick` (`(value: T[keyof T], key: keyof T) => boolean`): 속성을 선택할지 결정하는 조건 함수예요. 값과 키를 받아서 선택하려면 `true`, 제외하려면 `false`를 반환해요.\n\n#### 반환 값\n\n(`Partial<T>`): 조건 함수를 만족하는 속성들만 포함한 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/toCamelCaseKeys.md",
    "content": "# toCamelCaseKeys\n\n객체와 배열의 모든 키를 카멜 표기법으로 변환한 새로운 객체를 반환해요.\n\n카멜 표기법은 여러 단어로 구성된 식별자의 첫 단어를 소문자로 쓰고, 이어지는 단어의 첫 문자를 대문자로 연결하는 명명 규칙이에요. 예를 들어 `camelCase`와 같이 작성해요.\n\n```typescript\nconst camelCased = toCamelCaseKeys(obj);\n```\n\n## 사용법\n\n### `toCamelCaseKeys(obj)`\n\n객체의 모든 키를 카멜 케이스로 변환하고 싶을 때 `toCamelCaseKeys`를 사용하세요. 중첩된 객체와 배열 내의 객체들도 재귀적으로 변환돼요.\n\n예를 들어, 객체의 키는 다음과 같이 변환돼요.\n\n- `snake_case` → `camelCase` (예: `user_id` → `userId`)\n- `PascalCase` → `camelCase` (예: `UserId` → `userId`)\n- `UPPERCASE_KEYS` → `camelCase` (예: `FIRST_NAME` → `firstName`, `LAST` → `last`)\n\n```typescript\nimport { toCamelCaseKeys } from 'es-toolkit/object';\n\n// 기본 객체 변환\nconst obj = { user_id: 1, first_name: 'John', last_name: 'Doe' };\nconst result = toCamelCaseKeys(obj);\n// result는 { userId: 1, firstName: 'John', lastName: 'Doe' }가 돼요\n\n// 배열 내 객체들도 변환해요\nconst users = [\n  { user_id: 1, first_name: 'John' },\n  { user_id: 2, first_name: 'Jane' },\n];\nconst convertedUsers = toCamelCaseKeys(users);\n// convertedUsers는 [{ userId: 1, firstName: 'John' }, { userId: 2, firstName: 'Jane' }]가 돼요\n\n// 중첩된 객체도 완전히 변환돼요\nconst nested = {\n  user_data: {\n    user_id: 1,\n    contact_info: {\n      email_address: 'john@example.com',\n      phone_number: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toCamelCaseKeys(nested);\n// nestedResult는 {\n//   userData: {\n//     userId: 1,\n//     contactInfo: {\n//       emailAddress: 'john@example.com',\n//       phoneNumber: '123-456-7890'\n//     }\n//   }\n// }가 돼요\n\n// PascalCase와 uppercase keys 키도 변환돼요\nconst raw = { UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' };\nconst converted = toCamelCaseKeys(raw);\n// converted는 { userId: 1, firstName: 'JinHo', last: 'Yeom' }가 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T`): 키를 camelCase로 변환할 객체, 배열, 또는 원시 값이에요.\n\n#### 반환 값\n\n(`ToCamelCaseKeys<T>`): 모든 키가 camelCase로 변환된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/object/toMerged.md",
    "content": "# toMerged\n\n대상 객체의 복사본에 소스 객체를 깊게 병합한 새로운 객체를 반환해요.\n\n```typescript\nconst result = toMerged(target, source);\n```\n\n## 사용법\n\n### `toMerged(target, source)`\n\n두 객체를 깊게 병합하지만 원본 객체를 수정하고 싶지 않을 때 `toMerged`를 사용하세요. [merge](./merge.md)와 다르게 원본 `target` 객체는 수정되지 않고, 새로운 객체가 반환돼요.\n\n```typescript\nimport { toMerged } from 'es-toolkit/object';\n\n// 기본적인 객체 병합\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\n// result는 { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }가 돼요\n// target은 그대로 { a: 1, b: { x: 1, y: 2 } }로 유지돼요\n\n// 배열도 병합돼요\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nconst arrayResult = toMerged(arrayTarget, arraySource);\n// arrayResult는 { a: [3, 2], b: { x: 1, y: 2 } }가 돼요\n// arrayTarget은 변경되지 않아요\n\n// null 값도 적절히 처리해요\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nconst nullResult = toMerged(nullTarget, nullSource);\n// nullResult는 { a: [1, 2, 3] }이 돼요\n```\n\n`undefined` 값은 기존 값을 덮어쓰지 않아요.\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nconst result = toMerged(target, source);\n// result는 { a: 1, b: 2, c: 3 }이 돼요 (b는 덮어쓰이지 않음)\n```\n\n#### 파라미터\n\n- `target` (`T extends Record<PropertyKey, any>`): 병합될 대상 객체예요. 이 객체는 수정되지 않아요.\n- `source` (`S extends Record<PropertyKey, any>`): 대상 객체에 병합할 소스 객체예요.\n\n#### 반환 값\n\n(`T & S`): 대상 객체와 소스 객체가 병합된 새로운 객체를 반환해요.\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { toMerged } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/object/toSnakeCaseKeys.md",
    "content": "# toSnakeCaseKeys\n\n객체와 배열의 모든 키를 스네이크 표기법으로 변환한 새로운 객체를 반환해요.\n\n스네이크 표기법은 여러 단어로 구성된 식별자에서 각 단어를 소문자로 작성하고, 단어 사이를 밑줄(`_`)로 연결하는 명명 규칙이에요. 예를 들어서, `snake_case` 처럼 작성해요.\n\n```typescript\nconst snakeCased = toSnakeCaseKeys(obj);\n```\n\n## 사용법\n\n### `toSnakeCaseKeys(obj)`\n\n객체의 모든 키를 snake_case로 변환하고 싶을 때 `toSnakeCaseKeys`를 사용하세요. 중첩된 객체와 배열 내의 객체들도 재귀적으로 변환돼요.\n\n예를 들어, 객체의 키는 다음과 같이 변환돼요.\n\n- `camelCase` → `snake_case` (예: `userId` → `user_id`)\n- `PascalCase` → `snake_case` (예: `UserId` → `user_id`)\n- `UPPERCASE_KEYS` → `snake_case` (예: `FIRST_NAME` → `first_name`, `LAST` → `last`)\n\n```typescript\nimport { toSnakeCaseKeys } from 'es-toolkit/object';\n\n// 기본 객체 변환\nconst obj = { userId: 1, firstName: 'John', lastName: 'Doe' };\nconst result = toSnakeCaseKeys(obj);\n// result는 { user_id: 1, first_name: 'John', last_name: 'Doe' }가 돼요\n\n// 배열 내 객체들도 변환해요\nconst users = [\n  { userId: 1, firstName: 'John' },\n  { userId: 2, firstName: 'Jane' },\n];\nconst convertedUsers = toSnakeCaseKeys(users);\n// convertedUsers는 [{ user_id: 1, first_name: 'John' }, { user_id: 2, first_name: 'Jane' }]가 돼요\n\n// 중첩된 객체도 완전히 변환돼요\nconst nested = {\n  userData: {\n    userId: 1,\n    contactInfo: {\n      emailAddress: 'john@example.com',\n      phoneNumber: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toSnakeCaseKeys(nested);\n// nestedResult는 {\n//   user_data: {\n//     user_id: 1,\n//     contact_info: {\n//       email_address: 'john@example.com',\n//       phone_number: '123-456-7890'\n//     }\n//   }\n// }가 돼요\n```\n\n#### 파라미터\n\n- `obj` (`T`): 키를 snake_case로 변환할 객체, 배열, 또는 원시 값이에요.\n\n#### 반환 값\n\n(`ToSnakeCaseKeys<T>`): 모든 키가 snake_case로 변환된 새로운 객체를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer\n\n주어진 값이 `ArrayBuffer` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 사용법\n\n### `isArrayBuffer(value)`\n\n값이 `ArrayBuffer`인지 확인하고 싶을 때 `isArrayBuffer`를 사용하세요. TypeScript에서 타입 가드로도 활용할 수 있어요.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// ArrayBuffer 인스턴스 확인\nconst buffer = new ArrayBuffer(16);\nconst notBuffer = new Array(16);\n\nconsole.log(isArrayBuffer(buffer)); // true\nconsole.log(isArrayBuffer(notBuffer)); // false\n\n// 바이너리 데이터 처리 시 유용해요\nconst data: unknown = getDataFromAPI();\nif (isArrayBuffer(data)) {\n  // TypeScript에서 data는 ArrayBuffer로 타입이 좁혀져요\n  const uint8View = new Uint8Array(data);\n  console.log(`Buffer size: ${data.byteLength} bytes`);\n}\n\n// 다양한 타입과 비교\nconsole.log(isArrayBuffer(new ArrayBuffer(8))); // true\nconsole.log(isArrayBuffer(new Uint8Array(8))); // false\nconsole.log(isArrayBuffer(new DataView(new ArrayBuffer(8)))); // false\nconsole.log(isArrayBuffer([])); // false\nconsole.log(isArrayBuffer({})); // false\nconsole.log(isArrayBuffer(null)); // false\nconsole.log(isArrayBuffer(undefined)); // false\n```\n\n파일 처리나 네트워크 통신에서 자주 사용해요.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// 파일 읽기 결과 처리\nasync function processFileData(file: File) {\n  const result = await file.arrayBuffer();\n\n  if (isArrayBuffer(result)) {\n    console.log(`파일 크기: ${result.byteLength} 바이트`);\n\n    // 바이너리 데이터 처리\n    const view = new DataView(result);\n    const header = view.getUint32(0, true);\n    console.log(`파일 헤더: ${header.toString(16)}`);\n  }\n}\n\n// WebSocket에서 받은 데이터 확인\nfunction handleWebSocketMessage(data: unknown) {\n  if (isArrayBuffer(data)) {\n    console.log('바이너리 메시지를 받았어요');\n    const bytes = new Uint8Array(data);\n    // 바이트 데이터 처리\n  } else if (typeof data === 'string') {\n    console.log('텍스트 메시지를 받았어요');\n    // 문자열 데이터 처리\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): `ArrayBuffer`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is ArrayBuffer`): 값이 `ArrayBuffer`이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isBlob.md",
    "content": "# isBlob\n\n주어진 값이 Blob 인스턴스인지 확인해요.\n\n```typescript\nconst result = isBlob(value);\n```\n\n## 사용법\n\n### `isBlob(value)`\n\n값이 Blob 인스턴스인지 확인하고 싶을 때 `isBlob`을 사용하세요. 브라우저 환경에서 파일이나 바이너리 데이터를 다룰 때 유용해요.\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// 기본 Blob 인스턴스들\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconst file = new File(['content'], 'example.txt', { type: 'text/plain' });\n\nconsole.log(isBlob(blob)); // true\nconsole.log(isBlob(file)); // true (File은 Blob을 상속함)\n\n// Blob이 아닌 값들\nconsole.log(isBlob(new ArrayBuffer(8))); // false\nconsole.log(isBlob('text data')); // false\nconsole.log(isBlob({})); // false\nconsole.log(isBlob(null)); // false\n```\n\n파일 처리나 API 응답 검증에 유용해요.\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// 파일 업로드 처리\nfunction processUploadedFile(file: unknown) {\n  if (isBlob(file)) {\n    // TypeScript가 file을 Blob으로 추론\n    console.log(`파일 크기: ${file.size} 바이트`);\n    console.log(`MIME 타입: ${file.type}`);\n\n    // Blob 메서드 안전하게 사용\n    file.text().then(text => console.log('내용:', text));\n  } else {\n    console.log('유효하지 않은 파일입니다');\n  }\n}\n\n// 다운로드 기능 구현\nasync function handleDownload(data: unknown, filename: string) {\n  if (isBlob(data)) {\n    const url = URL.createObjectURL(data);\n    const link = document.createElement('a');\n    link.href = url;\n    link.download = filename;\n    link.click();\n    URL.revokeObjectURL(url);\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Blob 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Blob`): 값이 Blob 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isBoolean.md",
    "content": "# isBoolean\n\n주어진 값이 참 또는 거짓 타입인지 확인해요.\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 사용법\n\n### `isBoolean(value)`\n\n값이 정확히 `true` 또는 `false`인지 확인하고 싶을 때 `isBoolean`을 사용하세요. TypeScript에서 타입 가드로 동작해서 값의 타입을 `boolean`으로 좁혀줘요.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// 기본 참 또는 거짓 값 확인\nisBoolean(true); // true\nisBoolean(false); // true\n\n// 다른 타입들과 구분\nisBoolean(1); // false\nisBoolean(0); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\n```\n\nTypeScript에서 타입 가드로 사용할 때 특히 유용해요.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\nfunction processValue(value: unknown) {\n  if (isBoolean(value)) {\n    // value는 boolean으로 타입이 좁혀져요\n    console.log(value ? '참이에요' : '거짓이에요');\n  } else {\n    console.log('참 또는 거짓 값이 아니에요');\n  }\n}\n```\n\nAPI 응답이나 사용자 입력 검증에도 활용할 수 있어요.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// API 응답 검증\ninterface APIResponse {\n  success: unknown;\n  data: any;\n}\n\nfunction validateResponse(response: APIResponse) {\n  if (isBoolean(response.success)) {\n    console.log(`API 호출 ${response.success ? '성공' : '실패'}`);\n    return response.success;\n  }\n  console.log('잘못된 응답 형식이에요');\n  return false;\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 참 또는 거짓 타입인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is boolean`): 값이 `true` 또는 `false`이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isBrowser.md",
    "content": "# isBrowser\n\n현재 실행 환경이 브라우저인지 확인해요.\n\n```typescript\nconst result = isBrowser();\n```\n\n## 사용법\n\n### `isBrowser()`\n\n브라우저 환경에서만 실행되어야 하는 코드가 있을 때 `isBrowser`를 사용하세요. `window.document`의 존재 여부를 확인해서 브라우저 환경인지 판단해요. SSR(서버 사이드 렌더링)이나 Node.js 환경에서 유용해요.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\n// 브라우저 환경에서만 DOM 조작\nif (isBrowser()) {\n  document.getElementById('app').innerHTML = 'Hello World';\n  console.log('브라우저 환경에서 실행 중');\n} else {\n  console.log('서버 환경에서 실행 중');\n}\n```\n\n환경에 따른 조건부 로직 구현에 활용할 수 있어요.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction getWindowWidth() {\n  if (isBrowser()) {\n    return window.innerWidth;\n  }\n  return 0; // 서버에서는 기본값 반환\n}\n\n// 이벤트 리스너 등록\nfunction addWindowListener() {\n  if (isBrowser()) {\n    window.addEventListener('resize', () => {\n      console.log('윈도우 크기가 변경됐어요');\n    });\n  }\n}\n```\n\nNext.js, Nuxt.js 같은 SSR 프레임워크에서 특히 유용해요.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction initializeAnalytics() {\n  if (isBrowser()) {\n    // 브라우저에서만 분석 스크립트 로드\n    const script = document.createElement('script');\n    script.src = 'https://analytics.example.com/script.js';\n    document.head.appendChild(script);\n  }\n}\n\n// 로컬 스토리지 접근\nfunction getStoredValue(key: string) {\n  if (isBrowser()) {\n    return localStorage.getItem(key);\n  }\n  return null;\n}\n```\n\n#### 반환 값\n\n(`boolean`): 현재 환경이 브라우저이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isBuffer.md",
    "content": "# isBuffer\n\n주어진 값이 Buffer 인스턴스인지 확인해요.\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 사용법\n\n### `isBuffer(value)`\n\nNode.js 환경에서 Buffer 객체인지 확인하고 싶을 때 `isBuffer`를 사용하세요. 파일 처리, 네트워크 통신, 바이너리 데이터 조작 시 유용해요. TypeScript에서 타입 가드로 동작해서 값의 타입을 `Buffer`로 좁혀줘요.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// Buffer 인스턴스 확인\nconst buffer = Buffer.from('hello world', 'utf8');\nisBuffer(buffer); // true\n\n// 다른 타입들과 구분\nisBuffer('hello world'); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer(new ArrayBuffer(8)); // false\n```\n\nTypeScript에서 타입 가드로 사용할 때 특히 유용해요.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\nfunction processData(data: unknown) {\n  if (isBuffer(data)) {\n    // data는 Buffer로 타입이 좁혀져요\n    console.log(`Buffer 크기: ${data.length} 바이트`);\n    console.log(`Buffer 내용: ${data.toString('utf8')}`);\n\n    // Buffer 메서드를 안전하게 사용할 수 있어요\n    const slice = data.slice(0, 10);\n  }\n}\n```\n\n파일 처리나 네트워크 통신에서 자주 사용돼요.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// 파일 데이터 처리\nfunction readFileData(data: unknown) {\n  if (isBuffer(data)) {\n    const text = data.toString('utf8');\n    const header = data.readUInt32BE(0);\n    console.log('파일 내용:', text);\n  }\n}\n\n// 네트워크 데이터 처리\nfunction handleNetworkData(chunk: unknown) {\n  if (isBuffer(chunk)) {\n    console.log(`받은 데이터 크기: ${chunk.length} 바이트`);\n    const processed = Buffer.concat([chunk, Buffer.from('\\n')]);\n    return processed;\n  }\n  return null;\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Buffer 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 Buffer 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isDate.md",
    "content": "# isDate\n\n주어진 값이 Date 객체인지 확인해요.\n\n```typescript\nconst result = isDate(value);\n```\n\n## 사용법\n\n### `isDate(value)`\n\n날짜 객체인지 확인하고 싶을 때 `isDate`를 사용하세요. 문자열이나 숫자로 된 날짜 표현과 Date 객체를 구분할 때 유용해요. TypeScript에서 타입 가드로 동작해서 값의 타입을 `Date`로 좁혀줘요.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// Date 객체 확인\nconst date = new Date();\nisDate(date); // true\n\n// 다른 타입들과 구분\nisDate('2024-01-01'); // false - 문자열\nisDate(1640995200000); // false - 타임스탬프\nisDate({}); // false\n```\n\nTypeScript에서 타입 가드로 사용할 때 특히 유용해요.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\nfunction formatDate(value: unknown): string {\n  if (isDate(value)) {\n    // value는 Date로 타입이 좁혀져요\n    return value.toISOString();\n  }\n  return '유효하지 않은 날짜';\n}\n```\n\nAPI 응답 처리나 사용자 입력 검증에 활용할 수 있어요.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// API 응답 처리\nfunction processResponse(response: { createdAt: unknown }) {\n  if (isDate(response.createdAt)) {\n    console.log(`생성 시간: ${response.createdAt.toLocaleDateString()}`);\n  }\n}\n\n// 날짜 유효성 검증\nfunction validateBirthDate(value: unknown): boolean {\n  if (isDate(value)) {\n    const now = new Date();\n    const minAge = new Date(now.getFullYear() - 150, now.getMonth(), now.getDate());\n\n    return value <= now && value >= minAge;\n  }\n  return false;\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Date 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Date`): 값이 Date 객체이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isEmptyObject.md",
    "content": "# isEmptyObject\n\n속성이 하나도 없는 일반 객체(`{}`)인지 확인해요.\n\n```typescript\nconst result = isEmptyObject(value);\n```\n\n## 사용법\n\n### `isEmptyObject(value)`\n\n`{}`처럼 속성이 하나도 없는 일반 객체인지 확인하고 싶을 때 `isEmptyObject`를 사용하세요. 배열, Map, Set 같은 다른 객체 타입은 `false`를 반환해요.\n\n```typescript\nimport { isEmptyObject } from 'es-toolkit';\n\n// 속성이 없는 일반 객체\nisEmptyObject({}); // true\nisEmptyObject(new Object()); // true\nisEmptyObject(Object.create(null)); // true\n\n// 속성이 있는 객체\nisEmptyObject({ a: 1 }); // false\nisEmptyObject({ key: 'value' }); // false\n\n// 일반 객체가 아닌 타입들\nisEmptyObject([]); // false (배열)\nisEmptyObject(null); // false\nisEmptyObject(new Map()); // false\nisEmptyObject(new Set()); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Record<PropertyKey, never>`): 속성이 없는 일반 객체이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isEqual.md",
    "content": "# isEqual\n\n두 값이 깊게 동일한지 확인해요.\n\n```typescript\nconst result = isEqual(a, b);\n```\n\n## 사용법\n\n### `isEqual(a, b)`\n\n객체, 배열, Date, RegExp 등을 포함해서 두 값이 깊게 동일한지 확인하고 싶을 때 `isEqual`을 사용하세요. 참조가 다르더라도 내용이 같으면 `true`를 반환해요. 단위 테스트나 데이터 비교에 유용해요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 원시 타입 비교\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// 특수 값 처리\nisEqual(NaN, NaN); // true\nisEqual(+0, -0); // true\n```\n\n객체와 배열의 깊은 비교를 지원해요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 깊은 객체 비교\nconst obj1 = { a: 1, b: { c: 2, d: [3, 4] } };\nconst obj2 = { a: 1, b: { c: 2, d: [3, 4] } };\nisEqual(obj1, obj2); // true\n\n// 배열 비교\nconst arr1 = [1, 2, [3, 4]];\nconst arr2 = [1, 2, [3, 4]];\nisEqual(arr1, arr2); // true\n```\n\nDate, RegExp, Map, Set 같은 객체들도 비교할 수 있어요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 날짜 비교\nconst date1 = new Date('2020-01-01');\nconst date2 = new Date('2020-01-01');\nisEqual(date1, date2); // true\n\n// 정규식 비교\nconst regex1 = /hello/g;\nconst regex2 = /hello/g;\nisEqual(regex1, regex2); // true\n\n// Map과 Set 비교\nconst map1 = new Map([['key', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqual(map1, map2); // true\n\nconst set1 = new Set([1, 2, 3]);\nconst set2 = new Set([1, 2, 3]);\nisEqual(set1, set2); // true\n```\n\n단위 테스트에서 자주 사용돼요.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\nfunction testApiResponse() {\n  const expected = { status: 200, data: { message: 'success' } };\n  const actual = { status: 200, data: { message: 'success' } };\n\n  if (isEqual(expected, actual)) {\n    console.log('테스트 통과!');\n  } else {\n    console.log('테스트 실패!');\n  }\n}\n```\n\n#### 파라미터\n\n- `a` (`unknown`): 비교할 첫 번째 값이에요.\n- `b` (`unknown`): 비교할 두 번째 값이에요.\n\n#### 반환 값\n\n(`boolean`): 두 값이 깊게 동일하면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isEqualWith.md",
    "content": "# isEqualWith\n\n사용자 정의 비교 함수를 사용해서 두 값이 동일한지 확인해요.\n\n```typescript\nconst result = isEqualWith(a, b, areValuesEqual);\n```\n\n## 사용법\n\n### `isEqualWith(a, b, areValuesEqual)`\n\n특별한 비교 로직이 필요할 때 `isEqualWith`를 사용하세요. 사용자 정의 함수가 `true`나 `false`를 반환하면 그 결과를 사용하고, `undefined`를 반환하면 기본 비교 방식을 사용해요. 대소문자 무시, 특정 속성 제외, 근사값 비교 등에 유용해요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 대소문자 구분하지 않는 문자열 비교\nconst caseInsensitiveCompare = (a, b) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', caseInsensitiveCompare); // true\nisEqualWith({ name: 'Alice' }, { name: 'ALICE' }, caseInsensitiveCompare); // true\n```\n\n숫자의 근사값 비교에도 활용할 수 있어요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 부동소수점 오차 허용 비교\nconst approximateCompare = (a, b) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a - b) < 0.01; // 0.01 이하의 차이는 동일하게 처리\n  }\n};\n\nisEqualWith(0.1 + 0.2, 0.3, approximateCompare); // true\nisEqualWith({ price: 10.01 }, { price: 10.02 }, approximateCompare); // true\n```\n\n특정 속성을 무시하고 비교하고 싶을 때도 유용해요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 특정 프로퍼티 무시하고 비교\nconst ignoreTimestamp = (a, b, property) => {\n  if (property === 'timestamp') {\n    return true; // timestamp 프로퍼티는 항상 같다고 처리\n  }\n};\n\nconst obj1 = { id: 1, name: 'Test', timestamp: 1000 };\nconst obj2 = { id: 1, name: 'Test', timestamp: 2000 };\nisEqualWith(obj1, obj2, ignoreTimestamp); // true\n```\n\n복잡한 사용자 정의 비교 로직도 구현할 수 있어요.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\nconst areValuesEqual = (a, b, property) => {\n  // ID는 무시\n  if (property === 'id') {\n    return true;\n  }\n\n  // 이름은 대소문자 구분 없이 비교\n  if (property === 'name' && typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n\n  // 나머지는 기본 비교 방식 사용\n  return undefined;\n};\n\nconst user1 = { id: 1, name: 'Alice', age: 25 };\nconst user2 = { id: 999, name: 'ALICE', age: 25 };\nisEqualWith(user1, user2, areValuesEqual); // true\n```\n\n#### 파라미터\n\n- `a` (`unknown`): 비교할 첫 번째 값이에요.\n- `b` (`unknown`): 비교할 두 번째 값이에요.\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): 사용자 정의 비교 함수예요. `true`나 `false`를 반환하면 그 결과를 사용하고, `undefined`를 반환하면 기본 비교 방식을 사용해요.\n\n#### 반환 값\n\n(`boolean`): 사용자 정의 기준에 따라 두 값이 동일하면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isError.md",
    "content": "# isError\n\n주어진 값이 `Error` 객체인지 확인해요.\n\n```typescript\nconst result = isError(value);\n```\n\n## 사용법\n\n### `isError(value)`\n\n주어진 값이 `Error` 객체인지 확인하고 싶을 때 `isError`를 사용하세요. TypeScript에서 타입 가드로 활용해서 값의 타입을 `Error`로 좁힐 수 있어요. try-catch 블록이나 API 응답 처리할 때 특히 유용해요.\n\n```typescript\nimport { isError } from 'es-toolkit/predicate';\n\n// Error 객체 확인\nisError(new Error('Something went wrong')); // true\nisError(new TypeError('Type error')); // true\n\n// 다른 타입들과 구분\nisError('error'); // false\nisError({ name: 'Error', message: 'Custom error' }); // false\n```\n\nTypeScript에서 타입 가드로 사용하면 값의 타입이 좁혀져요.\n\n```typescript\nfunction handleError(value: unknown) {\n  if (isError(value)) {\n    // value는 Error로 타입이 좁혀져요\n    console.log(`에러 발생: ${value.message}`);\n    return value.name;\n  }\n  return '에러가 아니에요';\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): `Error` 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Error`): 값이 `Error` 객체이면 `true`, 아니면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isFile.md",
    "content": "# isFile\n\n주어진 값이 File 객체인지 확인해요.\n\n```typescript\nconst result = isFile(value);\n```\n\n## 사용법\n\n### `isFile(value)`\n\n값이 File 인스턴스인지 확인하고 싶을 때 `isFile`을 사용하세요. File 객체는 사용자가 업로드한 파일이나 파일 시스템에서 가져온 파일을 나타내는 웹 API의 일부예요. Blob 객체와는 달리 파일 이름과 마지막 수정 시간 등의 추가 정보를 포함해요.\n\n```typescript\nimport { isFile } from 'es-toolkit/predicate';\n\n// File 객체 확인\nconst file = new File(['hello'], 'example.txt', { type: 'text/plain' });\nconsole.log(isFile(file)); // true\n\n// Blob 객체는 File이 아니에요\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconsole.log(isFile(blob)); // false\n\n// 일반 객체들\nconsole.log(isFile({})); // false\nconsole.log(isFile([])); // false\nconsole.log(isFile('text')); // false\nconsole.log(isFile(null)); // false\nconsole.log(isFile(undefined)); // false\n```\n\n주어진 인자가 유효한 파일인지 검증할 때 사용할 수 있어요.\n\n```typescript\n// 파일 업로드 핸들러\nfunction handleFileUpload(input: unknown) {\n  if (isFile(input)) {\n    console.log(`파일명: ${input.name}`);\n    console.log(`파일 크기: ${input.size} bytes`);\n    console.log(`파일 타입: ${input.type}`);\n    console.log(`마지막 수정: ${input.lastModified}`);\n\n    // File이 확실하므로 안전하게 파일 관련 속성에 접근 가능\n    return input;\n  }\n\n  throw new Error('유효한 파일이 아닙니다');\n}\n```\n\nJavaScript 실행 환경에서 `File`이 지원되지 않는 경우도 안전하게 처리해요.\n\n```typescript\n// Node.js 환경이나 File을 지원하지 않는 환경에서도 안전\nconsole.log(isFile(new Date())); // false\n\n// File이 정의되지 않은 환경에서도 에러가 발생하지 않음\nif (typeof File === 'undefined') {\n  console.log(isFile({})); // false\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): File 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is File`): 값이 File 객체이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isFunction.md",
    "content": "# isFunction\n\n주어진 값이 함수인지 확인해요.\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 사용법\n\n### `isFunction(value)`\n\n값이 함수인지 확인하고 싶을 때 `isFunction`을 사용하세요. 일반 함수, 비동기 함수, 제너레이터 함수, 생성자 함수 등 모든 종류의 함수를 감지할 수 있어요.\n\n```typescript\nimport { isFunction } from 'es-toolkit/predicate';\n\n// 일반 함수들\nconsole.log(isFunction(function () {})); // true\nconsole.log(isFunction(() => {})); // true\nconsole.log(isFunction(Array.prototype.slice)); // true\n\n// 비동기 함수\nconsole.log(isFunction(async function () {})); // true\nconsole.log(isFunction(async () => {})); // true\n\n// 제너레이터 함수\nconsole.log(isFunction(function* () {})); // true\n\n// 생성자 함수들\nconsole.log(isFunction(Array)); // true\nconsole.log(isFunction(Date)); // true\nconsole.log(isFunction(RegExp)); // true\nconsole.log(isFunction(Promise)); // true\n```\n\n내장 JavaScript 함수와 클래스들도 감지해요:\n\n```typescript\n// 내장 생성자들\nconsole.log(isFunction(Object)); // true\nconsole.log(isFunction(String)); // true\nconsole.log(isFunction(Number)); // true\nconsole.log(isFunction(Boolean)); // true\n\n// 타입 배열 생성자들\nconsole.log(isFunction(Int8Array)); // true\nconsole.log(isFunction(Uint8Array)); // true\nconsole.log(isFunction(Float32Array)); // true\n\n// 프록시와 리플렉트\nconsole.log(isFunction(Proxy)); // true\nconsole.log(isFunction(Reflect.get)); // true\n```\n\n함수가 아닌 값들과 구분해요:\n\n```typescript\n// 함수가 아닌 것들\nconsole.log(isFunction({})); // false\nconsole.log(isFunction([])); // false\nconsole.log(isFunction('text')); // false\nconsole.log(isFunction(42)); // false\nconsole.log(isFunction(null)); // false\nconsole.log(isFunction(undefined)); // false\n\n// 함수처럼 보이지만 함수가 아닌 것들\nconsole.log(isFunction({ call: function () {} })); // false\n```\n\n콜백 함수 검증이나 동적 함수 호출에서 유용해요:\n\n```typescript\n// 콜백 함수 검증\nfunction processData(data: any[], callback?: unknown) {\n  const result = data.map(item => item * 2);\n\n  if (isFunction(callback)) {\n    // callback이 함수임이 확실하므로 안전하게 호출 가능\n    callback(result);\n  }\n\n  return result;\n}\n\n// 동적 함수 실행\nfunction executeIfFunction(fn: unknown, ...args: any[]) {\n  if (isFunction(fn)) {\n    return fn(...args);\n  }\n\n  console.log('주어진 값이 함수가 아닙니다');\n  return null;\n}\n\n// 메서드 체이닝에서 함수 확인\nconst utils = {\n  data: [1, 2, 3],\n  process(fn: unknown) {\n    if (isFunction(fn)) {\n      this.data = this.data.map(fn);\n    }\n    return this;\n  },\n};\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 함수인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is (...args: any[]) => any`): 값이 함수이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isJSON.md",
    "content": "# isJSON\n\n주어진 값이 유효한 JSON 문자열인지 확인해요.\n\n```typescript\nconst result = isJSON(value);\n```\n\n## 사용법\n\n### `isJSON(value)`\n\n문자열이 유효한 JSON 형식인지 확인하고 싶을 때 `isJSON`을 사용하세요. 이 함수는 `JSON.parse()`로 파싱할 수 있는 문자열인지 검사해요. JSON 명세에 따라 객체, 배열, 문자열, 숫자, 참/거짓 값, `null`을 표현하는 모든 문자열이 유효해요.\n\n```typescript\nimport { isJSON } from 'es-toolkit/predicate';\n\n// 유효한 JSON 문자열들\nconsole.log(isJSON('{\"name\":\"John\",\"age\":30}')); // true\nconsole.log(isJSON('[1,2,3]')); // true\nconsole.log(isJSON('\"hello world\"')); // true\nconsole.log(isJSON('42')); // true\nconsole.log(isJSON('true')); // true\nconsole.log(isJSON('false')); // true\nconsole.log(isJSON('null')); // true\n\n// 유효하지 않은 JSON 문자열들\nconsole.log(isJSON('undefined')); // false\nconsole.log(isJSON('function() {}')); // false\nconsole.log(isJSON('{name: \"John\"}')); // false (키에 따옴표 없음)\nconsole.log(isJSON(\"{'name': 'John'}\")); // false (작은따옴표 사용)\nconsole.log(isJSON('{}')); // true (빈 객체는 유효)\nconsole.log(isJSON('[]')); // true (빈 배열은 유효)\n```\n\n문자열이 아닌 값들은 모두 `false`를 반환해요:\n\n```typescript\n// 문자열이 아닌 값들\nconsole.log(isJSON({ name: 'John' })); // false\nconsole.log(isJSON([1, 2, 3])); // false\nconsole.log(isJSON(42)); // false\nconsole.log(isJSON(true)); // false\nconsole.log(isJSON(null)); // false\nconsole.log(isJSON(undefined)); // false\n```\n\nAPI 응답이나 사용자 입력 검증에서 유용해요:\n\n```typescript\n// API 응답 검증\nfunction processApiResponse(response: unknown) {\n  if (isJSON(response)) {\n    try {\n      const data = JSON.parse(response);\n      console.log('파싱된 데이터:', data);\n      return data;\n    } catch (error) {\n      // isJSON이 true를 반환했으므로 여기는 실행되지 않음\n      console.error('파싱 실패:', error);\n    }\n  }\n\n  console.log('유효한 JSON 문자열이 아닙니다');\n  return null;\n}\n\n// 사용자 입력 검증\nfunction validateJsonInput(input: unknown): string | null {\n  if (isJSON(input)) {\n    // TypeScript가 input을 string으로 타입 추론\n    return input;\n  }\n\n  throw new Error('입력값은 유효한 JSON 문자열이어야 합니다');\n}\n\n// 설정 파일 검증\nfunction loadConfig(configString: unknown) {\n  if (isJSON(configString)) {\n    const config = JSON.parse(configString);\n    return {\n      isValid: true,\n      config,\n      error: null,\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Invalid JSON format',\n  };\n}\n```\n\n복잡한 JSON 구조도 정확히 감지해요:\n\n```typescript\nconst complexJson = `{\n  \"users\": [\n    {\n      \"id\": 1,\n      \"name\": \"Alice\",\n      \"preferences\": {\n        \"theme\": \"dark\",\n        \"notifications\": true\n      }\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"page\": 1\n  }\n}`;\n\nconsole.log(isJSON(complexJson)); // true\n\n// 잘못된 형식들\nconsole.log(isJSON('{ \"name\": \"John\", }')); // false (trailing comma)\nconsole.log(isJSON('{ name: \"John\" }')); // false (unquoted key)\nconsole.log(isJSON(\"{ 'name': 'John' }\")); // false (single quotes)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 유효한 JSON 문자열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is string`): 값이 유효한 JSON 문자열이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isJSONArray.md",
    "content": "# isJSONArray\n\n주어진 값이 유효한 JSON 배열인지 확인해요.\n\n```typescript\nconst result = isJSONArray(value);\n```\n\n## 사용법\n\n### `isJSONArray(value)`\n\n배열의 모든 요소가 유효한 JSON 값인지 확인하고 싶을 때 `isJSONArray`를 사용하세요. 유효한 JSON 배열이란 모든 항목이 JSON으로 직렬화할 수 있는 값(`null`, 객체, 배열, 문자열, 숫자, 참/거짓)으로만 구성된 배열이에요.\n\n```typescript\nimport { isJSONArray } from 'es-toolkit/predicate';\n\n// 유효한 JSON 배열들\nconsole.log(isJSONArray([1, 2, 3])); // true\nconsole.log(isJSONArray(['hello', 'world'])); // true\nconsole.log(isJSONArray([true, false, null])); // true\nconsole.log(isJSONArray([{ name: 'John' }, { name: 'Jane' }])); // true\nconsole.log(\n  isJSONArray([\n    [1, 2],\n    [3, 4],\n  ])\n); // true (중첩 배열)\nconsole.log(isJSONArray([])); // true (빈 배열)\n\n// 복합적인 유효한 JSON 배열\nconst complexArray = [42, 'text', true, null, { key: 'value' }, [1, 2, 3]];\nconsole.log(isJSONArray(complexArray)); // true\n```\n\n유효하지 않은 JSON 배열들과 구분해요:\n\n```typescript\n// 함수가 포함된 배열 - 유효하지 않음\nconsole.log(isJSONArray([1, 2, () => {}])); // false\nconsole.log(isJSONArray([function () {}])); // false\n\n// undefined가 포함된 배열 - 유효하지 않음\nconsole.log(isJSONArray([1, undefined, 3])); // false\n\n// Symbol이 포함된 배열 - 유효하지 않음\nconsole.log(isJSONArray([Symbol('test')])); // false\n\n// Date 객체가 포함된 배열 - 유효하지 않음 (JSON에서는 문자열로 변환되어야 함)\nconsole.log(isJSONArray([new Date()])); // false\n\n// 배열이 아닌 값들\nconsole.log(isJSONArray('not an array')); // false\nconsole.log(isJSONArray({ 0: 'a', 1: 'b', length: 2 })); // false (유사 배열 객체)\nconsole.log(isJSONArray(42)); // false\nconsole.log(isJSONArray(null)); // false\n```\n\nAPI 응답 검증이나 데이터 직렬화 전 검증에서 유용해요.\n\n```typescript\n// API 응답 검증\nfunction processApiArray(data: unknown) {\n  if (isJSONArray(data)) {\n    // 안전하게 JSON.stringify 사용 가능\n    const jsonString = JSON.stringify(data);\n    console.log('직렬화된 배열:', jsonString);\n    return data;\n  }\n\n  throw new Error('유효한 JSON 배열이 아닙니다');\n}\n\n// 사용자 입력 데이터 검증\nfunction validateUserList(input: unknown): any[] {\n  if (isJSONArray(input)) {\n    // TypeScript가 input을 any[]로 타입 추론\n    return input;\n  }\n\n  return [];\n}\n\n// 설정 배열 검증\nfunction loadArrayConfig(config: unknown) {\n  if (isJSONArray(config)) {\n    return {\n      isValid: true,\n      items: config,\n      count: config.length,\n    };\n  }\n\n  return {\n    isValid: false,\n    items: [],\n    count: 0,\n  };\n}\n\n// 중첩된 구조에서도 동작\nconst nestedData = [{ users: [{ name: 'Alice' }, { name: 'Bob' }] }, { users: [{ name: 'Charlie' }] }];\nconsole.log(isJSONArray(nestedData)); // true\n```\n\n함수를 요소로 가진 배열이나, `TypedArray` 객체처럼 JSON으로 직렬화할 수 없는 배열에 대해서는 `false`를 반환해요.\n\n```typescript\n// 일반 배열 vs JSON 배열\nconst regularArray = [1, 2, function () {}]; // 일반적으로는 유효한 배열\nconst jsonArray = [1, 2, 3]; // JSON 직렬화 가능한 배열\n\nconsole.log(Array.isArray(regularArray)); // true (일반 배열 검사)\nconsole.log(isJSONArray(regularArray)); // false (JSON 배열 검사)\n\nconsole.log(Array.isArray(jsonArray)); // true\nconsole.log(isJSONArray(jsonArray)); // true\n\n// TypedArray는 JSON 배열이 아님\nconst typedArray = new Int32Array([1, 2, 3]);\nconsole.log(Array.isArray(typedArray)); // false\nconsole.log(isJSONArray(typedArray)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 유효한 JSON 배열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is any[]`): 값이 유효한 JSON 배열이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isJSONObject.md",
    "content": "# isJSONObject\n\n주어진 값이 유효한 JSON 객체인지 확인해요.\n\n```typescript\nconst result = isJSONObject(value);\n```\n\n## 사용법\n\n### `isJSONObject(value)`\n\n객체의 모든 키가 문자열이고 모든 값이 유효한 JSON 값인지 확인하고 싶을 때 `isJSONObject`를 사용하세요. 유효한 JSON 객체란 문자열 키와 JSON으로 직렬화할 수 있는 값(`null`, 객체, 배열, 문자열, 숫자, 참/거짓)으로만 구성된 순수 객체예요.\n\n```typescript\nimport { isJSONObject } from 'es-toolkit/predicate';\n\n// 유효한 JSON 객체들\nconsole.log(isJSONObject({ name: 'John', age: 30 })); // true\nconsole.log(isJSONObject({ active: true, score: null })); // true\nconsole.log(isJSONObject({})); // true (빈 객체)\n\n// 중첩된 구조도 검증\nconst nested = {\n  user: {\n    name: 'Alice',\n    preferences: {\n      theme: 'dark',\n      notifications: true,\n    },\n  },\n  data: [1, 2, 3],\n  timestamp: null,\n};\nconsole.log(isJSONObject(nested)); // true\n\n// 복합적인 유효한 JSON 객체\nconst complex = {\n  id: 42,\n  title: 'Example',\n  published: true,\n  tags: ['javascript', 'tutorial'],\n  author: {\n    name: 'Developer',\n    email: 'dev@example.com',\n  },\n  metadata: null,\n};\nconsole.log(isJSONObject(complex)); // true\n```\n\n함수, `Symbol`, `Date` 객체, `undefined` 같은 JSON으로 직렬화할 수 없는 값이나 클래스 인스턴스가 포함된 유효하지 않은 JSON 객체들을 정확하게 구분해요.\n\n```typescript\n// 함수가 포함된 객체 - 유효하지 않음\nconsole.log(isJSONObject({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONObject({ method: function () {} })); // false\n\n// undefined가 포함된 객체 - 유효하지 않음\nconsole.log(isJSONObject({ name: 'John', age: undefined })); // false\n\n// Symbol 키나 값이 포함된 객체 - 유효하지 않음\nconsole.log(isJSONObject({ [Symbol('key')]: 'value' })); // false\nconsole.log(isJSONObject({ name: Symbol('name') })); // false\n\n// Date, RegExp 등의 객체 - 유효하지 않음\nconsole.log(isJSONObject({ created: new Date() })); // false\nconsole.log(isJSONObject({ pattern: /test/ })); // false\n\n// 클래스 인스턴스 - 유효하지 않음\nclass Person {\n  constructor(public name: string) {}\n}\nconsole.log(isJSONObject(new Person('John'))); // false\n\n// 객체가 아닌 값들\nconsole.log(isJSONObject('not an object')); // false\nconsole.log(isJSONObject(42)); // false\nconsole.log(isJSONObject([1, 2, 3])); // false\nconsole.log(isJSONObject(null)); // false\n```\n\n`JSON.stringify` 를 안전하게 사용할 수 있는지 검증하기 위해 사용할 수 있어요.\n\n```typescript\n// API 응답 검증\nfunction processApiResponse(data: unknown) {\n  if (isJSONObject(data)) {\n    // 안전하게 JSON.stringify 사용 가능\n    const jsonString = JSON.stringify(data);\n    console.log('직렬화된 객체:', jsonString);\n\n    // TypeScript가 data를 Record<string, any>로 타입 추론\n    return data;\n  }\n\n  throw new Error('유효한 JSON 객체가 아닙니다');\n}\n\n// 설정 객체 검증\nfunction loadConfig(config: unknown) {\n  if (isJSONObject(config)) {\n    return {\n      isValid: true,\n      config,\n      keys: Object.keys(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: {},\n    keys: [],\n  };\n}\n\n// 사용자 입력 데이터 검증\nfunction validateUserData(input: unknown): Record<string, any> {\n  if (isJSONObject(input)) {\n    // 모든 속성이 JSON 직렬화 가능함을 보장\n    return input;\n  }\n\n  throw new Error('사용자 데이터는 유효한 JSON 객체여야 합니다');\n}\n\n// 중첩된 객체 검증\nfunction validateNestedConfig(data: unknown) {\n  if (isJSONObject(data)) {\n    // 중첩된 모든 객체와 배열도 JSON 유효성이 보장됨\n    console.log('설정이 완전히 JSON 호환됩니다');\n    return data;\n  }\n\n  return null;\n}\n```\n\n`isJSONObject`는 다른 객체 검사 함수들과 다른 목적을 가져요. `isPlainObject`는 순수 객체인지 확인하지만, `isJSONObject`는 JSON으로 직렬화할 수 있는 객체인지 확인해요.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\nconst objectWithFunction = {\n  name: 'John',\n  greet: function () {\n    return 'Hello';\n  },\n};\n\nconst plainJsonObject = {\n  name: 'John',\n  age: 30,\n};\n\n// 순수 객체 vs JSON 객체\nconsole.log(isPlainObject(objectWithFunction)); // true (순수 객체)\nconsole.log(isJSONObject(objectWithFunction)); // false (함수 포함으로 JSON 객체 아님)\n\nconsole.log(isPlainObject(plainJsonObject)); // true\nconsole.log(isJSONObject(plainJsonObject)); // true\n\n// 빌트인 객체들\nconsole.log(isPlainObject(new Date())); // false\nconsole.log(isJSONObject(new Date())); // false\n\n// 배열\nconsole.log(isPlainObject([])); // false\nconsole.log(isJSONObject([])); // false (배열은 JSON 값이지만 JSON \"객체\"는 아님)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 유효한 JSON 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Record<string, any>`): 값이 유효한 JSON 객체이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isJSONValue.md",
    "content": "# isJSONValue\n\n주어진 값이 유효한 JSON 값인지 확인해요.\n\n```typescript\nconst result = isJSONValue(value);\n```\n\n## 사용법\n\n### `isJSONValue(value)`\n\n값이 JSON으로 직렬화할 수 있는 유효한 값인지 확인하고 싶을 때 `isJSONValue`를 사용하세요. JSON 명세에 따라 유효한 값은 `null`, 객체, 배열, 문자열, 숫자, 참/거짓 값이에요. 이 함수는 다른 JSON 관련 타입 가드들의 기반이 되는 함수예요.\n\n```typescript\nimport { isJSONValue } from 'es-toolkit/predicate';\n\n// 원시 JSON 값들\nconsole.log(isJSONValue(null)); // true\nconsole.log(isJSONValue('hello')); // true\nconsole.log(isJSONValue(42)); // true\nconsole.log(isJSONValue(true)); // true\nconsole.log(isJSONValue(false)); // true\n\n// 객체와 배열 (내부 값들도 모두 유효해야 함)\nconsole.log(isJSONValue({ name: 'John', age: 30 })); // true\nconsole.log(isJSONValue([1, 2, 3, 'text'])); // true\nconsole.log(isJSONValue([])); // true (빈 배열)\nconsole.log(isJSONValue({})); // true (빈 객체)\n\n// 중첩된 구조\nconst complexData = {\n  user: {\n    name: 'Alice',\n    active: true,\n    scores: [95, 87, 92],\n  },\n  metadata: null,\n};\nconsole.log(isJSONValue(complexData)); // true\n```\n\nJSON으로 직렬화할 수 없는 값들을 정확하게 구분해요. 함수, `undefined`, `Symbol`, 클래스 인스턴스 등은 JSON 명세에서 지원하지 않는 타입이므로 `false`를 반환해요:\n\n```typescript\n// undefined는 JSON에서 지원되지 않음\nconsole.log(isJSONValue(undefined)); // false\n\n// 함수들은 JSON으로 직렬화할 수 없음\nconsole.log(isJSONValue(() => {})); // false\nconsole.log(isJSONValue(function () {})); // false\n\n// Symbol은 JSON에서 지원되지 않음\nconsole.log(isJSONValue(Symbol('test'))); // false\n\n// Date 객체는 JSON에서 문자열로 변환되어야 함\nconsole.log(isJSONValue(new Date())); // false\n\n// RegExp 객체도 JSON에서 지원되지 않음\nconsole.log(isJSONValue(/pattern/)); // false\n\n// 함수나 undefined가 포함된 객체/배열\nconsole.log(isJSONValue({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONValue([1, 2, undefined])); // false\n\n// BigInt는 JSON에서 지원되지 않음\nconsole.log(isJSONValue(BigInt(123))); // false\n```\n\nJSON 직렬화 전 데이터 검증에서 유용해요:\n\n```typescript\n// 안전한 JSON 직렬화\nfunction safeJsonStringify(data: unknown): string | null {\n  if (isJSONValue(data)) {\n    // data가 유효한 JSON 값임이 보장됨\n    return JSON.stringify(data);\n  }\n\n  console.warn('데이터가 JSON 직렬화 가능하지 않습니다');\n  return null;\n}\n\n// API 요청 데이터 검증\nfunction sendApiRequest(data: unknown) {\n  if (isJSONValue(data)) {\n    const jsonPayload = JSON.stringify(data);\n    // API 요청 전송\n    console.log('전송할 데이터:', jsonPayload);\n    return fetch('/api/data', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: jsonPayload,\n    });\n  }\n\n  throw new Error('API 데이터는 JSON 직렬화 가능해야 합니다');\n}\n\n// localStorage 저장 전 검증\nfunction saveToStorage(key: string, value: unknown) {\n  if (isJSONValue(value)) {\n    localStorage.setItem(key, JSON.stringify(value));\n    return true;\n  }\n\n  console.error('localStorage에 저장할 수 없는 데이터 타입입니다');\n  return false;\n}\n\n// 설정 파일 검증\nfunction validateConfig(config: unknown) {\n  if (isJSONValue(config)) {\n    return {\n      isValid: true,\n      config,\n      serialized: JSON.stringify(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Config must be a valid JSON value',\n  };\n}\n```\n\n다른 타입 가드들과 조합해서 사용할 수 있어요.\n\n```typescript\n// 구체적인 JSON 타입 확인\nfunction processJsonData(data: unknown) {\n  if (!isJSONValue(data)) {\n    throw new Error('Invalid JSON value');\n  }\n\n  // 이제 data는 유효한 JSON 값임이 보장됨\n  if (isJSONObject(data)) {\n    console.log('JSON 객체입니다:', Object.keys(data));\n  } else if (isJSONArray(data)) {\n    console.log('JSON 배열입니다:', data.length, '개 항목');\n  } else {\n    console.log('원시 JSON 값입니다:', typeof data, data);\n  }\n}\n\n// 중첩된 데이터 검증\nconst testData = {\n  valid: { name: 'test', values: [1, 2, 3] },\n  invalid: { name: 'test', callback: () => {} },\n};\n\nconsole.log(isJSONValue(testData.valid)); // true\nconsole.log(isJSONValue(testData.invalid)); // false\n```\n\n엣지 케이스들:\n\n```typescript\n// 특수 숫자 값들\nconsole.log(isJSONValue(Infinity)); // false (JSON에서 null로 변환됨)\nconsole.log(isJSONValue(-Infinity)); // false\nconsole.log(isJSONValue(NaN)); // false (JSON에서 null로 변환됨)\n\n// 빈 값들\nconsole.log(isJSONValue('')); // true (빈 문자열)\nconsole.log(isJSONValue(0)); // true\nconsole.log(isJSONValue(false)); // true\n\n// 프로토타입이 있는 객체들\nconst obj = Object.create({ inherited: 'value' });\nobj.own = 'property';\nconsole.log(isJSONValue(obj)); // true (순수 객체로 처리)\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 유효한 JSON 값인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Record<string, any> | any[] | string | number | boolean | null`): 값이 유효한 JSON 값이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isLength.md",
    "content": "# isLength\n\n값이 유효한 배열 길이인지 확인해요.\n\n```typescript\nconst result = isLength(value);\n```\n\n## 사용법\n\n### `isLength(value)`\n\n값이 유효한 배열 길이인지 확인하고 싶을 때 `isLength`를 사용하세요. 유효한 길이는 0 이상이고 `Number.MAX_SAFE_INTEGER` 이하인 정수여야 해요.\n\n```typescript\nimport { isLength } from 'es-toolkit/predicate';\n\n// 유효한 길이들\nconsole.log(isLength(0)); // true\nconsole.log(isLength(42)); // true\nconsole.log(isLength(Number.MAX_SAFE_INTEGER)); // true\n\n// 무효한 길이들\nconsole.log(isLength(-1)); // false (음수)\nconsole.log(isLength(1.5)); // false (소수)\nconsole.log(isLength(Number.MAX_SAFE_INTEGER + 1)); // false (안전하지 않은 정수)\nconsole.log(isLength('42')); // false (문자열)\nconsole.log(isLength(null)); // false (null)\n```\n\nTypeScript에서 타입 가드로도 사용할 수 있어요.\n\n```typescript\nfunction processLength(value: unknown) {\n  if (isLength(value)) {\n    // 이제 value는 number 타입으로 좁혀져요\n    console.log(value.toFixed(2));\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 유효한 길이인지 확인할 값이에요.\n\n#### 반환 값\n\n(`boolean`): 값이 유효한 길이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isMap.md",
    "content": "# isMap\n\n값이 Map인지 확인해요.\n\n```typescript\nconst result = isMap(value);\n```\n\n## 사용법\n\n### `isMap(value)`\n\n값이 Map 인스턴스인지 확인하고 싶을 때 `isMap`을 사용하세요. `instanceof` 연산자를 사용해서 `Map`인지 검사해요.\n\n```typescript\nimport { isMap } from 'es-toolkit/predicate';\n\n// Map 인스턴스\nconst map = new Map([['key', 'value']]);\nconsole.log(isMap(map)); // true\n\n// Map이 아닌 값들\nconsole.log(isMap(new Set())); // false\nconsole.log(isMap(new WeakMap())); // false\nconsole.log(isMap({})); // false\nconsole.log(isMap([])); // false\nconsole.log(isMap(null)); // false\n```\n\nTypeScript에서 타입 가드로도 사용할 수 있어요.\n\n```typescript\nfunction processValue(value: unknown) {\n  if (isMap(value)) {\n    // 이제 value는 Map<any, any> 타입으로 좁혀져요\n    console.log(value.size);\n    value.set('new-key', 'new-value');\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): `Map`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Map<any, any>`): 값이 Map이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isNil.md",
    "content": "# isNil\n\n값이 `null` 또는 `undefined`인지 확인해요.\n\n```typescript\nconst result = isNil(value);\n```\n\n## 사용법\n\n### `isNil(value)`\n\n값이 `null`이나 `undefined`인지 확인하고 싶을 때 `isNil`을 사용하세요.\n\n```typescript\nimport { isNil } from 'es-toolkit/predicate';\n\n// null 또는 undefined 값들\nconsole.log(isNil(null)); // true\nconsole.log(isNil(undefined)); // true\n\n// 다른 값들\nconsole.log(isNil(0)); // false\nconsole.log(isNil('')); // false\nconsole.log(isNil(false)); // false\nconsole.log(isNil([])); // false\nconsole.log(isNil({})); // false\n```\n\nTypeScript에서 타입 가드로도 사용할 수 있어요:\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNil(value)) {\n    // 이제 value는 null | undefined 타입으로 좁혀져요\n    console.log('값이 비어있습니다');\n  } else {\n    // value는 string 타입으로 좁혀져요\n    console.log(value.toUpperCase());\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): `null` 또는 `undefined`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is null | undefined`): 값이 `null` 또는 `undefined`면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isNode.md",
    "content": "# isNode\n\n현재 실행 환경이 Node.js인지 확인해요.\n\n```typescript\nconst result = isNode();\n```\n\n## 사용법\n\n### `isNode()`\n\n현재 코드가 Node.js 환경에서 실행되고 있는지 확인하고 싶을 때 `isNode`를 사용하세요. Node.js 전용 API를 사용하기 전에 환경을 확인할 때 유용해요.\n\n```typescript\nimport { isNode } from 'es-toolkit/predicate';\n\nif (isNode()) {\n  // Node.js 전용 코드\n  console.log('이 코드는 Node.js에서 실행됩니다');\n  const fs = await import('node:fs');\n  const path = await import('node:path');\n} else {\n  // 브라우저 환경에서만 사용 가능한 코드\n  console.log('이 코드는 브라우저에서 실행됩니다');\n  const response = await fetch('/api/data');\n}\n```\n\n조건부로 Node.js 모듈을 사용할 때도 유용해요:\n\n```typescript\nfunction getEnvironmentInfo() {\n  if (isNode()) {\n    return {\n      platform: process.platform,\n      nodeVersion: process.version,\n      environment: 'Node.js',\n    };\n  } else {\n    return {\n      userAgent: navigator.userAgent,\n      environment: 'Browser',\n    };\n  }\n}\n```\n\n#### 반환 값\n\n(`boolean`): 현재 환경이 Node.js면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isNotNil.md",
    "content": "# isNotNil\n\n값이 `null`도 `undefined`도 아닌지 확인해요.\n\n```typescript\nconst result = isNotNil(value);\n```\n\n## 사용법\n\n### `isNotNil(value)`\n\n값이 `null`이나 `undefined`가 아닌지 확인하고 싶을 때 `isNotNil`을 사용하세요. 배열에서 `null`이나 `undefined` 값들을 필터링할 때 특히 유용해요.\n\n```typescript\nimport { isNotNil } from 'es-toolkit/predicate';\n\n// 기본 사용예시\nconsole.log(isNotNil(42)); // true\nconsole.log(isNotNil('hello')); // true\nconsole.log(isNotNil([])); // true\nconsole.log(isNotNil({})); // true\n\nconsole.log(isNotNil(null)); // false\nconsole.log(isNotNil(undefined)); // false\n\n// 배열 필터링에서 유용해요\nconst mixedArray = [1, null, 'hello', undefined, true, 0];\nconst filteredArray = mixedArray.filter(isNotNil);\n// filteredArray는 [1, 'hello', true, 0]이 돼요 (null과 undefined 제거)\n```\n\nTypeScript에서 타입 가드로도 사용할 수 있어요.\n\n```typescript\nfunction processItems(items: (string | null | undefined)[]) {\n  // isNotNil로 필터링하면 타입이 string[]로 좁혀져요\n  const validItems = items.filter(isNotNil);\n\n  validItems.forEach(item => {\n    // item은 이제 string 타입으로 보장되어요\n    console.log(item.toUpperCase());\n  });\n}\n```\n\n#### 파라미터\n\n- `value` (`T | null | undefined`): `null`이나 `undefined`가 아닌지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is T`): 값이 `null`도 `undefined`도 아니면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isNull.md",
    "content": "# isNull\n\n값이 `null`인지 확인해요.\n\n```typescript\nconst result = isNull(value);\n```\n\n## 사용법\n\n### `isNull(value)`\n\n값이 정확히 `null`인지 확인하고 싶을 때 `isNull`을 사용하세요. 엄격한 비교(`===`)를 사용해서 `null`만 인식하고 undefined는 인식하지 않아요.\n\n```typescript\nimport { isNull } from 'es-toolkit/predicate';\n\n// null 값\nconsole.log(isNull(null)); // true\n\n// null이 아닌 값들\nconsole.log(isNull(undefined)); // false\nconsole.log(isNull(0)); // false\nconsole.log(isNull('')); // false\nconsole.log(isNull(false)); // false\nconsole.log(isNull([])); // false\nconsole.log(isNull({})); // false\n```\n\nTypeScript에서 타입 가드로도 사용할 수 있어요.\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    // 이제 value는 null 타입으로 좁혀져요\n    console.log('값이 null입니다');\n  } else {\n    // value는 string | undefined 타입으로 좁혀져요\n    console.log('값이 null이 아닙니다:', value);\n  }\n}\n```\n\n`isNull`은 [`isNil`](./isNil.md)과 다르게 `undefined`를 `false`로 처리해요.\n\n```typescript\nimport { isNil, isNull } from 'es-toolkit/predicate';\n\nconsole.log(isNull(undefined)); // false\nconsole.log(isNil(undefined)); // true\n```\n\n#### 파라미터\n\n- `value` (`unknown`): `null`인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is null`): 값이 `null`이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isNumber.md",
    "content": "# isNumber\n\n주어진 값이 숫자 타입인지 확인해요.\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 사용법\n\n### `isNumber(value)`\n\n값이 숫자인지 확인하고 싶을 때 `isNumber`를 사용하세요.\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\n// 기본 숫자 값 확인\nisNumber(123); // true\nisNumber(3.14); // true\nisNumber(NaN); // true\nisNumber(Infinity); // true\n\n// 다른 타입들과 구분\nisNumber('123'); // false\nisNumber(true); // false\nisNumber(null); // false\nisNumber(undefined); // false\n```\n\nTypeScript에서 타입 가드로 사용할 때 특히 유용해요.\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\nfunction processValue(value: unknown) {\n  if (isNumber(value)) {\n    // value는 number로 타입이 좁혀져요\n    console.log(value * 2);\n  } else {\n    console.log('숫자가 아니에요');\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 숫자 타입인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is number`): 값이 숫자이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isPlainObject.md",
    "content": "# isPlainObject\n\n값이 순수 객체(plain object)인지 확인해요.\n\n```typescript\nconst result = isPlainObject(value);\n```\n\n## 사용법\n\n### `isPlainObject(value)`\n\n값이 순수 객체인지 확인하고 싶을 때 `isPlainObject`를 사용하세요. 순수 객체는 객체 리터럴(`{}`) 또는 `Object` 생성자로 만들어진 객체를 말해요. 클래스 인스턴스, 배열, 또는 다른 특수 객체는 순수 객체가 아니에요.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\n// 순수 객체들\nconsole.log(isPlainObject({})); // true\nconsole.log(isPlainObject({ name: 'John', age: 30 })); // true\nconsole.log(isPlainObject(Object.create(null))); // true\nconsole.log(isPlainObject(new Object())); // true\n\n// 순수 객체가 아닌 것들\nconsole.log(isPlainObject([])); // false (배열)\nconsole.log(isPlainObject(new Date())); // false (Date 객체)\nconsole.log(isPlainObject(new Set())); // false (Set 객체)\nconsole.log(isPlainObject(new Map())); // false (Map 객체)\nconsole.log(isPlainObject(null)); // false (null)\nconsole.log(isPlainObject(42)); // false (숫자)\nconsole.log(isPlainObject('hello')); // false (문자열)\n\n// 클래스 인스턴스\nclass MyClass {}\nconsole.log(isPlainObject(new MyClass())); // false\n```\n\n데이터를 직렬화하거나 설정 객체를 검증할 때 유용해요.\n\n```typescript\nfunction processConfig(config: unknown) {\n  if (isPlainObject(config)) {\n    // 이제 config는 Record<PropertyKey, any> 타입으로 좁혀져요\n    console.log('Valid configuration object');\n    Object.keys(config).forEach(key => {\n      console.log(`${key}: ${config[key]}`);\n    });\n  } else {\n    throw new Error('Configuration must be a plain object');\n  }\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 순수 객체인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Record<PropertyKey, any>`): 값이 순수 객체면 `true`, 그렇지 않으면 `false`를 반환해요.\n\n## 성능 비교\n\n|                   | [번들 사이즈](../../bundle-size.md) | [런타임 성능](../../performance.md) |\n| ----------------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit        | 279 바이트 (82.4% 작음)             | 1,505,684 회 (1.70× 빠름)           |\n| es-toolkit/compat | 435 바이트 (72.5% 작음)             | 2,013,760 회 (2.28× 빠름)           |\n| lodash-es         | 1,586 바이트                        | 882,669 회                          |\n"
  },
  {
    "path": "docs/ko/reference/predicate/isPrimitive.md",
    "content": "# isPrimitive\n\n주어진 값이 JavaScript 원시 값인지 확인해요.\n\n```typescript\nconst result = isPrimitive(value);\n```\n\n## 사용법\n\n### `isPrimitive(value)`\n\n값이 JavaScript의 원시 값인지 확인하고 싶을 때 `isPrimitive`를 사용하세요. JavaScript의 원시 값은 `null`, `undefined`, 문자열, 숫자, 참/거짓 값, 심볼, `BigInt`를 포함해요. 객체나 함수와 같은 참조 타입과 구분할 때 유용해요.\n\n```typescript\nimport { isPrimitive } from 'es-toolkit/predicate';\n\n// 원시 값들\nconsole.log(isPrimitive(null)); // true\nconsole.log(isPrimitive(undefined)); // true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\nconsole.log(isPrimitive(false)); // true\nconsole.log(isPrimitive(Symbol('test'))); // true\nconsole.log(isPrimitive(123n)); // true\n\n// 참조 타입들 (원시 값 아님)\nconsole.log(isPrimitive({})); // false\nconsole.log(isPrimitive([])); // false\nconsole.log(isPrimitive(new Date())); // false\nconsole.log(isPrimitive(new Map())); // false\nconsole.log(isPrimitive(new Set())); // false\nconsole.log(isPrimitive(() => {})); // false\nconsole.log(isPrimitive(/regex/)); // false\n```\n\n깊은 복사 로직을 구현할 때 유용해요.\n\n```typescript\n// 원시 값과 객체를 다르게 처리\nfunction deepClone(value: any): any {\n  if (isPrimitive(value)) {\n    // 원시 값은 그대로 반환\n    return value;\n  }\n\n  // 객체는 복제 로직 수행\n  if (Array.isArray(value)) {\n    return value.map(deepClone);\n  }\n\n  const result: any = {};\n  for (const key in value) {\n    result[key] = deepClone(value[key]);\n  }\n  return result;\n}\n\n// 값 비교에서 사용\nfunction isEqual(a: unknown, b: unknown): boolean {\n  if (isPrimitive(a) && isPrimitive(b)) {\n    return a === b;\n  }\n\n  // 복잡한 객체 비교 로직...\n  return false;\n}\n\n// 로깅에서 안전한 문자열 변환\nfunction safeLog(value: unknown) {\n  if (isPrimitive(value)) {\n    console.log('원시 값:', value);\n  } else {\n    console.log('객체:', typeof value, Object.prototype.toString.call(value));\n  }\n}\n```\n\n타입 가드로 활용해서 안전하게 코드를 작성할 수 있어요.\n\n```typescript\nfunction processValue(input: unknown) {\n  if (isPrimitive(input)) {\n    // TypeScript가 input을 원시 타입으로 추론\n    console.log('원시 값의 타입:', typeof input);\n    console.log('원시 값:', input);\n    return input;\n  }\n\n  // 여기서 input은 객체 타입으로 추론됨\n  console.log('객체 타입입니다');\n  return null;\n}\n\n// API 응답 검증\nfunction validateApiResponse(data: unknown) {\n  if (isPrimitive(data)) {\n    return {\n      type: 'primitive',\n      value: data,\n      serializable: true,\n    };\n  }\n\n  return {\n    type: 'object',\n    value: data,\n    serializable: false, // 추가 검증 필요\n  };\n}\n\n// 설정 값 처리\nfunction normalizeConfigValue(value: unknown) {\n  if (isPrimitive(value)) {\n    // 원시 값은 안전하게 문자열로 변환 가능\n    return String(value);\n  }\n\n  // 객체는 JSON으로 직렬화\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return '[복잡한 객체]';\n  }\n}\n```\n\n`String`, `Number`, `Boolean` 같은 래퍼 객체와 원시 값을 구분할 수 있어요.\n\n```typescript\n// 래퍼 객체들은 원시 값이 아님\nconsole.log(isPrimitive(new String('hello'))); // false\nconsole.log(isPrimitive(new Number(42))); // false\nconsole.log(isPrimitive(new Boolean(true))); // false\n\n// 하지만 실제 원시 값들은 true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\n\n// valueOf()로 원시 값 추출 가능\nconst strObj = new String('hello');\nconsole.log(isPrimitive(strObj.valueOf())); // true\n```\n\n#### 파라미터\n\n- `value` (`unknown`): JavaScript 원시 값인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is null | undefined | string | number | boolean | symbol | bigint`): 값이 원시 값이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isPromise.md",
    "content": "# isPromise\n\n주어진 값이 `Promise` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isPromise(value);\n```\n\n## 사용법\n\n### `isPromise(value)`\n\n값이 `Promise` 인스턴스인지 확인하고 싶을 때 `isPromise`를 사용하세요. 비동기 코드에서 `Promise` 객체를 다른 값들과 구분해야 할 때나, 조건부로 `await`를 사용해야 할 때 유용해요.\n\n```typescript\nimport { isPromise } from 'es-toolkit/predicate';\n\n// Promise 인스턴스들\nconst promise1 = new Promise(resolve => resolve('done'));\nconst promise2 = Promise.resolve(42);\nconst promise3 = Promise.reject(new Error('failed'));\n\nconsole.log(isPromise(promise1)); // true\nconsole.log(isPromise(promise2)); // true\nconsole.log(isPromise(promise3)); // true\n\n// Promise가 아닌 값들\nconsole.log(isPromise({})); // false\nconsole.log(isPromise('hello')); // false\nconsole.log(isPromise(42)); // false\nconsole.log(isPromise(null)); // false\nconsole.log(isPromise(undefined)); // false\n```\n\n비동기 함수에서 조건에 따라 로직을 실행할 때 유용해요.\n\n```typescript\n// 값이 Promise인지 확인해서 적절히 처리\nasync function processValue(input: unknown) {\n  if (isPromise(input)) {\n    // TypeScript가 input을 Promise<any>로 추론\n    const result = await input;\n    console.log('Promise 결과:', result);\n    return result;\n  }\n\n  // Promise가 아닌 값은 바로 반환\n  console.log('일반 값:', input);\n  return input;\n}\n\n// API 응답 처리\nfunction handleApiCall(response: unknown) {\n  if (isPromise(response)) {\n    return response.then(data => ({ success: true, data })).catch(error => ({ success: false, error: error.message }));\n  }\n\n  // 이미 해결된 값\n  return { success: true, data: response };\n}\n\n// 유틸리티 함수에서 활용\nfunction toPromise<T>(value: T | Promise<T>): Promise<T> {\n  if (isPromise(value)) {\n    return value;\n  }\n\n  return Promise.resolve(value);\n}\n```\n\n`Promise` 처럼 생긴 객체와 실제 `Promise`를 구분할 수 있어요.\n\n```typescript\n// thenable 객체는 Promise가 아님\nconst thenable = {\n  then: (resolve: Function) => resolve('not a promise'),\n};\n\nconsole.log(isPromise(thenable)); // false\n\n// async 함수 결과는 Promise\nasync function asyncFunction() {\n  return 'async result';\n}\n\nconsole.log(isPromise(asyncFunction())); // true\n\n// 일반 함수는 Promise 아님\nfunction normalFunction() {\n  return 'normal result';\n}\n\nconsole.log(isPromise(normalFunction())); // false\n```\n\n오류를 핸들링할 때도 사용할 수 있어요.\n\n```typescript\nfunction safeExecute(fn: () => any) {\n  try {\n    const result = fn();\n\n    if (isPromise(result)) {\n      return result.catch(error => {\n        console.error('비동기 함수 실행 중 에러:', error);\n        return null;\n      });\n    }\n\n    return result;\n  } catch (error) {\n    console.error('동기 함수 실행 중 에러:', error);\n    return null;\n  }\n}\n\n// 타임아웃 처리\nfunction withTimeout<T>(valueOrPromise: T | Promise<T>, timeoutMs: number) {\n  if (!isPromise(valueOrPromise)) {\n    return valueOrPromise;\n  }\n\n  const timeoutPromise = new Promise((_, reject) => {\n    setTimeout(() => reject(new Error('Timeout')), timeoutMs);\n  });\n\n  return Promise.race([valueOrPromise, timeoutPromise]);\n}\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Promise 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Promise<any>`): 값이 Promise 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isRegExp.md",
    "content": "# isRegExp\n\n주어진 값이 `RegExp` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 사용법\n\n### `isRegExp(value)`\n\n값이 `RegExp` 인스턴스인지 확인하고 싶을 때 `isRegExp`를 사용하세요. 정규식 객체를 일반 문자열이나 다른 객체와 구분할 때 유용해요.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/predicate';\n\n// RegExp 인스턴스들\nconst regex1 = /abc/;\nconst regex2 = new RegExp('abc');\nconst regex3 = new RegExp('\\\\d+', 'g');\n\nconsole.log(isRegExp(regex1)); // true\nconsole.log(isRegExp(regex2)); // true\nconsole.log(isRegExp(regex3)); // true\n\n// RegExp가 아닌 값들\nconsole.log(isRegExp('/abc/')); // false (문자열)\nconsole.log(isRegExp('abc')); // false\nconsole.log(isRegExp({})); // false\nconsole.log(isRegExp(null)); // false\nconsole.log(isRegExp(undefined)); // false\n```\n\n정규식 패턴 검증이나 문자열 처리에 유용해요:\n\n```typescript\n// 동적 패턴 검증\nfunction validatePattern(pattern: unknown, text: string) {\n  if (isRegExp(pattern)) {\n    // TypeScript가 pattern을 RegExp로 추론\n    return pattern.test(text);\n  }\n\n  // 문자열 패턴은 정규식으로 변환\n  if (typeof pattern === 'string') {\n    const regex = new RegExp(pattern);\n    return regex.test(text);\n  }\n\n  return false;\n}\n\n// 사용 예시\nconsole.log(validatePattern(/hello/, 'hello world')); // true\nconsole.log(validatePattern('\\\\d+', '123')); // true\nconsole.log(validatePattern('invalid', 'text')); // false\n\n// 폼 검증에서 활용\nfunction createValidator(rule: unknown) {\n  if (isRegExp(rule)) {\n    return (value: string) => rule.test(value);\n  }\n\n  // 다른 타입의 규칙들...\n  return () => false;\n}\n\n// 이메일 검증기 생성\nconst emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst emailValidator = createValidator(emailRegex);\n\nconsole.log(emailValidator('test@example.com')); // true\nconsole.log(emailValidator('invalid-email')); // false\n```\n\n조건부 문자열 처리에서 사용:\n\n```typescript\n// 텍스트 처리 유틸리티\nfunction processText(input: string, processor: unknown) {\n  if (isRegExp(processor)) {\n    // 정규식으로 매칭되는 부분 추출\n    const matches = input.match(processor);\n    return matches ? matches : [];\n  }\n\n  // 다른 처리기 타입들...\n  return [input];\n}\n\n// 숫자 추출\nconst numberRegex = /\\d+/g;\nconst numbers = processText('가격: 1000원, 할인: 200원', numberRegex);\nconsole.log(numbers); // ['1000', '200']\n\n// URL 추출\nconst urlRegex = /https?:\\/\\/[^\\s]+/g;\nconst urls = processText('사이트: https://example.com 참고', urlRegex);\nconsole.log(urls); // ['https://example.com']\n\n// 설정 기반 텍스트 검증\nclass TextValidator {\n  private rules: Array<{ name: string; rule: unknown }> = [];\n\n  addRule(name: string, rule: unknown) {\n    this.rules.push({ name, rule });\n  }\n\n  validate(text: string) {\n    const results: Array<{ rule: string; passed: boolean }> = [];\n\n    for (const { name, rule } of this.rules) {\n      if (isRegExp(rule)) {\n        results.push({\n          rule: name,\n          passed: rule.test(text),\n        });\n      } else {\n        results.push({\n          rule: name,\n          passed: false,\n        });\n      }\n    }\n\n    return results;\n  }\n}\n\n// 사용 예시\nconst validator = new TextValidator();\nvalidator.addRule('영문자만', /^[a-zA-Z]+$/);\nvalidator.addRule('숫자 포함', /\\d/);\nvalidator.addRule('특수문자 금지', /^[^!@#$%^&*()]+$/);\n\nconsole.log(validator.validate('Hello123'));\n// [\n//   { rule: '영문자만', passed: false },\n//   { rule: '숫자 포함', passed: true },\n//   { rule: '특수문자 금지', passed: true }\n// ]\n```\n\n문자열과 정규식 구분하기:\n\n```typescript\n// 검색 기능에서 활용\nfunction searchText(content: string, query: unknown) {\n  if (isRegExp(query)) {\n    // 정규식 검색 - 고급 패턴 매칭\n    const matches = content.match(query);\n    return matches ? matches.length : 0;\n  }\n\n  if (typeof query === 'string') {\n    // 일반 문자열 검색\n    const regex = new RegExp(query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n    const matches = content.match(regex);\n    return matches ? matches.length : 0;\n  }\n\n  return 0;\n}\n\n// 사용 예시\nconst text = 'Hello world! Hello everyone!';\n\nconsole.log(searchText(text, /hello/gi)); // 2 (정규식)\nconsole.log(searchText(text, 'Hello')); // 2 (문자열, 이스케이프됨)\nconsole.log(searchText(text, /h.llo/i)); // 2 (패턴 매칭)\n\n// 동적 필터링\nfunction createFilter(patterns: unknown[]) {\n  const regexPatterns = patterns.filter(isRegExp);\n\n  return (text: string) => {\n    return regexPatterns.some(pattern => pattern.test(text));\n  };\n}\n\n// 스팸 필터 예시\nconst spamPatterns = [\n  /\\b(광고|홍보)\\b/,\n  /\\d{3}-\\d{4}-\\d{4}/, // 전화번호 패턴\n  'invalid', // RegExp가 아님, 필터에서 제외\n  /\\$\\d+/, // 가격 패턴\n];\n\nconst spamFilter = createFilter(spamPatterns);\nconsole.log(spamFilter('긴급 광고입니다!')); // true\nconsole.log(spamFilter('안녕하세요')); // false\n```\n\n정규식 플래그와 속성 활용:\n\n```typescript\n// RegExp 속성 확인\nfunction analyzeRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return {\n      source: value.source,\n      flags: value.flags,\n      global: value.global,\n      ignoreCase: value.ignoreCase,\n      multiline: value.multiline,\n      unicode: value.unicode,\n      sticky: value.sticky,\n    };\n  }\n\n  return null;\n}\n\n// 사용 예시\nconst regex = /hello/gim;\nconst analysis = analyzeRegex(regex);\nconsole.log(analysis);\n// {\n//   source: 'hello',\n//   flags: 'gim',\n//   global: true,\n//   ignoreCase: true,\n//   multiline: true,\n//   unicode: false,\n//   sticky: false\n// }\n\n// 정규식 복제\nfunction cloneRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return new RegExp(value.source, value.flags);\n  }\n\n  return null;\n}\n\nconst originalRegex = /test/gi;\nconst clonedRegex = cloneRegex(originalRegex);\nconsole.log(clonedRegex?.test('TEST')); // true\n```\n\n#### 파라미터\n\n- `value` (`unknown`): RegExp 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is RegExp`): 값이 RegExp 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isSet.md",
    "content": "# isSet\n\n주어진 값이 `Set` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isSet(value);\n```\n\n## 사용법\n\n### `isSet(value)`\n\n값이 `Set` 인스턴스인지 확인하고 싶을 때 `isSet`을 사용하세요. `Set` 객체를 다른 객체와 구분할 때 유용해요.\n\n```typescript\nimport { isSet } from 'es-toolkit/predicate';\n\n// Set 인스턴스들\nconst set1 = new Set();\nconst set2 = new Set([1, 2, 3]);\nconst set3 = new Set(['a', 'b', 'c']);\n\nconsole.log(isSet(set1)); // true\nconsole.log(isSet(set2)); // true\nconsole.log(isSet(set3)); // true\n\n// Set가 아닌 값들\nconsole.log(isSet(new Map())); // false\nconsole.log(isSet(new WeakSet())); // false\nconsole.log(isSet([])); // false\nconsole.log(isSet({})); // false\nconsole.log(isSet(null)); // false\nconsole.log(isSet(undefined)); // false\n```\n\n`Set`, `Array`, `Map` 처럼 JavaScript 내장 객체별로 다른 로직을 실행할 때 유용해요.\n\n```typescript\n// 컬렉션 크기 계산\nfunction getCollectionSize(collection: unknown): number {\n  if (isSet(collection)) {\n    // TypeScript가 collection을 Set<any>로 추론\n    return collection.size;\n  }\n\n  if (Array.isArray(collection)) {\n    return collection.length;\n  }\n\n  if (collection && typeof collection === 'object') {\n    return Object.keys(collection).length;\n  }\n\n  return 0;\n}\n\n// 사용 예시\nconsole.log(getCollectionSize(new Set([1, 2, 3]))); // 3\nconsole.log(getCollectionSize([1, 2, 3])); // 3\nconsole.log(getCollectionSize({ a: 1, b: 2 })); // 2\n\n// 중복 제거 유틸리티\nfunction removeDuplicates(data: unknown) {\n  if (isSet(data)) {\n    // 이미 Set이면 그대로 반환\n    return data;\n  }\n\n  if (Array.isArray(data)) {\n    return new Set(data);\n  }\n\n  // 다른 타입은 변환하지 않음\n  return data;\n}\n\nconst duplicatedArray = [1, 2, 2, 3, 3, 3];\nconst uniqueSet = removeDuplicates(duplicatedArray);\nconsole.log(uniqueSet); // Set { 1, 2, 3 }\n\nconst existingSet = new Set(['a', 'b']);\nconsole.log(removeDuplicates(existingSet)); // Set { 'a', 'b' } (동일한 Set 반환)\n```\n\nSet 조작과 데이터 변환에서도 다양하게 활용할 수 있어요.\n\n```typescript\n// 유니버셜 컬렉션 합치기\nfunction mergeCollections(...collections: unknown[]): Set<any> {\n  const result = new Set();\n\n  for (const collection of collections) {\n    if (isSet(collection)) {\n      // Set의 모든 값을 결과에 추가\n      for (const item of collection) {\n        result.add(item);\n      }\n    } else if (Array.isArray(collection)) {\n      // 배열의 모든 값을 추가\n      for (const item of collection) {\n        result.add(item);\n      }\n    }\n  }\n\n  return result;\n}\n\n// 사용 예시\nconst set1 = new Set([1, 2, 3]);\nconst array1 = [3, 4, 5];\nconst set2 = new Set(['a', 'b']);\n\nconst merged = mergeCollections(set1, array1, set2);\nconsole.log(merged); // Set { 1, 2, 3, 4, 5, 'a', 'b' }\n\n// 컬렉션 교집합 계산\nfunction getIntersection(coll1: unknown, coll2: unknown): Set<any> {\n  const set1 = isSet(coll1) ? coll1 : new Set(Array.isArray(coll1) ? coll1 : []);\n  const set2 = isSet(coll2) ? coll2 : new Set(Array.isArray(coll2) ? coll2 : []);\n\n  const intersection = new Set();\n\n  for (const item of set1) {\n    if (set2.has(item)) {\n      intersection.add(item);\n    }\n  }\n\n  return intersection;\n}\n\n// 사용 예시\nconst setA = new Set([1, 2, 3, 4]);\nconst arrayB = [3, 4, 5, 6];\n\nconst intersection = getIntersection(setA, arrayB);\nconsole.log(intersection); // Set { 3, 4 }\n```\n\n#### 파라미터\n\n- `value` (`unknown`): Set 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Set<any>`): 값이 Set 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isString.md",
    "content": "# isString\n\n주어진 값이 문자열인지 확인해요.\n\n```typescript\nconst result = isString(value);\n```\n\n## 사용법\n\n### `isString(value)`\n\n값이 문자열인지 확인하고 싶을 때 `isString`을 사용하세요. 문자열 타입을 다른 원시 타입이나 객체와 구분할 때 유용해요.\n\n```typescript\nimport { isString } from 'es-toolkit/predicate';\n\n// 문자열 값들\nconsole.log(isString('hello')); // true\nconsole.log(isString('')); // true\nconsole.log(isString('123')); // true\nconsole.log(isString('true')); // true\n\n// 문자열이 아닌 값들\nconsole.log(isString(123)); // false\nconsole.log(isString(true)); // false\nconsole.log(isString(null)); // false\nconsole.log(isString(undefined)); // false\nconsole.log(isString([])); // false\nconsole.log(isString({})); // false\nconsole.log(isString(new String('hello'))); // false (String 객체)\n```\n\n데이터 검증과 타입 안전한 문자열 처리에 유용해요:\n\n```typescript\n// 안전한 문자열 조작\nfunction processText(input: unknown): string {\n  if (isString(input)) {\n    // TypeScript가 input을 string으로 추론\n    return input.trim().toLowerCase();\n  }\n\n  // 다른 타입은 문자열로 변환\n  return String(input);\n}\n\n// 사용 예시\nconsole.log(processText('  HELLO  ')); // 'hello'\nconsole.log(processText(123)); // '123'\nconsole.log(processText(true)); // 'true'\nconsole.log(processText(null)); // 'null'\n\n// 폼 데이터 검증\nfunction validateForm(data: Record<string, unknown>) {\n  const errors: string[] = [];\n\n  if (!isString(data.name) || data.name.length === 0) {\n    errors.push('이름은 필수 입력 항목입니다');\n  }\n\n  if (!isString(data.email) || !data.email.includes('@')) {\n    errors.push('유효한 이메일을 입력해주세요');\n  }\n\n  return {\n    isValid: errors.length === 0,\n    errors,\n  };\n}\n\n// 사용 예시\nconsole.log(validateForm({ name: 'John', email: 'john@example.com' }));\n// { isValid: true, errors: [] }\n\nconsole.log(validateForm({ name: 123, email: 'invalid-email' }));\n// { isValid: false, errors: ['이름은 필수 입력 항목입니다', '유효한 이메일을 입력해주세요'] }\n```\n\n#### 파라미터\n\n- `value` (`unknown`): 문자열인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is string`): 값이 문자열이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isSymbol.md",
    "content": "# isSymbol\n\n주어진 값이 `symbol`인지 확인해요.\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 사용법\n\n### `isSymbol(value)`\n\n값이 `symbol`인지 확인하고 싶을 때 `isSymbol`을 사용하세요.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/predicate';\n\n// symbol 값들\nconst sym1 = Symbol('description');\nconst sym2 = Symbol.for('global');\nconst sym3 = Symbol.iterator;\n\nconsole.log(isSymbol(sym1)); // true\nconsole.log(isSymbol(sym2)); // true\nconsole.log(isSymbol(sym3)); // true\n\n// symbol이 아닌 값들\nconsole.log(isSymbol('symbol')); // false\nconsole.log(isSymbol(123)); // false\nconsole.log(isSymbol(true)); // false\nconsole.log(isSymbol(null)); // false\nconsole.log(isSymbol(undefined)); // false\nconsole.log(isSymbol({})); // false\nconsole.log(isSymbol([])); // false\n```\n\n객체의 프로퍼티에 안전하게 접근하거나 메타데이터를 관리할 때 유용해요.\n\n```typescript\n// 안전한 프로퍼티 접근\nfunction getPropertyValue(obj: object, key: unknown) {\n  if (isSymbol(key)) {\n    // TypeScript가 key를 symbol로 추론\n    return (obj as any)[key];\n  }\n\n  if (typeof key === 'string') {\n    return (obj as any)[key];\n  }\n\n  return undefined;\n}\n\n// 사용 예시\nconst mySymbol = Symbol('myKey');\nconst obj = {\n  name: 'John',\n  [mySymbol]: 'secret value',\n};\n\nconsole.log(getPropertyValue(obj, 'name')); // 'John'\nconsole.log(getPropertyValue(obj, mySymbol)); // 'secret value'\nconsole.log(getPropertyValue(obj, 123)); // undefined\n\n// 메타데이터 저장소\nclass MetadataManager {\n  private metadata = new Map<symbol, any>();\n\n  setMetadata(key: unknown, value: any): boolean {\n    if (isSymbol(key)) {\n      this.metadata.set(key, value);\n      return true;\n    }\n    return false;\n  }\n\n  getMetadata(key: unknown): any {\n    if (isSymbol(key)) {\n      return this.metadata.get(key);\n    }\n    return undefined;\n  }\n\n  hasMetadata(key: unknown): boolean {\n    if (isSymbol(key)) {\n      return this.metadata.has(key);\n    }\n    return false;\n  }\n}\n\n// 사용 예시\nconst manager = new MetadataManager();\nconst typeSymbol = Symbol('type');\nconst versionSymbol = Symbol('version');\n\nmanager.setMetadata(typeSymbol, 'user');\nmanager.setMetadata(versionSymbol, '1.0');\nmanager.setMetadata('invalid', 'value'); // false, symbol이 아님\n\nconsole.log(manager.getMetadata(typeSymbol)); // 'user'\nconsole.log(manager.hasMetadata(versionSymbol)); // true\n```\n\n#### 파라미터\n\n- `value` (`unknown`): symbol인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is symbol`): 값이 symbol이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isTypedArray.md",
    "content": "# isTypedArray\n\n주어진 값이 `TypedArray` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isTypedArray(value);\n```\n\n## 사용법\n\n### `isTypedArray(value)`\n\n값이 [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) 인스턴스인지 확인하고 싶을 때 `isTypedArray`를 사용하세요.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/predicate';\n\n// TypedArray 인스턴스들\nconst uint8 = new Uint8Array([1, 2, 3]);\nconst int16 = new Int16Array([1000, 2000]);\nconst float32 = new Float32Array([1.5, 2.5]);\nconst bigUint64 = new BigUint64Array([1n, 2n]);\n\nconsole.log(isTypedArray(uint8)); // true\nconsole.log(isTypedArray(int16)); // true\nconsole.log(isTypedArray(float32)); // true\nconsole.log(isTypedArray(bigUint64)); // true\n\n// TypedArray가 아닌 값들\nconsole.log(isTypedArray([1, 2, 3])); // false (일반 배열)\nconsole.log(isTypedArray(new ArrayBuffer(8))); // false (ArrayBuffer)\nconsole.log(isTypedArray(new DataView(new ArrayBuffer(8)))); // false (DataView)\nconsole.log(isTypedArray({})); // false\nconsole.log(isTypedArray(null)); // false\nconsole.log(isTypedArray(undefined)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): TypedArray 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Float32Array | Float64Array`): 값이 TypedArray 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isUndefined.md",
    "content": "# isUndefined\n\n주어진 값이 `undefined`인지 확인해요.\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 사용법\n\n### `isUndefined(value)`\n\n값이 `undefined`인지 확인하고 싶을 때 `isUndefined`를 사용하세요. 변수의 초기화 여부나 선택적 프로퍼티의 존재 여부를 확인할 때 유용해요.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/predicate';\n\n// undefined 값들\nconsole.log(isUndefined(undefined)); // true\nconsole.log(isUndefined(void 0)); // true\n\nlet uninitialized: string;\nconsole.log(isUndefined(uninitialized)); // true\n\n// undefined가 아닌 값들\nconsole.log(isUndefined(null)); // false\nconsole.log(isUndefined('')); // false\nconsole.log(isUndefined(0)); // false\nconsole.log(isUndefined(false)); // false\nconsole.log(isUndefined({})); // false\nconsole.log(isUndefined([])); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): undefined인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is undefined`): 값이 undefined이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isWeakMap.md",
    "content": "# isWeakMap\n\n주어진 값이 `WeakMap` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 사용법\n\n### `isWeakMap(value)`\n\n값이 `WeakMap` 인스턴스인지 확인하고 싶을 때 `isWeakMap`을 사용하세요. `WeakMap`은 약한 참조로 객체를 키로 하는 키-값 저장소로, 메모리 누수를 방지할 때 유용해요.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/predicate';\n\n// WeakMap 인스턴스들\nconst weakMap1 = new WeakMap();\nconst weakMap2 = new WeakMap([[{}, 'value']]);\n\nconsole.log(isWeakMap(weakMap1)); // true\nconsole.log(isWeakMap(weakMap2)); // true\n\n// WeakMap이 아닌 값들\nconsole.log(isWeakMap(new Map())); // false\nconsole.log(isWeakMap(new Set())); // false\nconsole.log(isWeakMap(new WeakSet())); // false\nconsole.log(isWeakMap({})); // false\nconsole.log(isWeakMap([])); // false\nconsole.log(isWeakMap(null)); // false\nconsole.log(isWeakMap(undefined)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): WeakMap 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is WeakMap<WeakKey, any>`): 값이 WeakMap 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/predicate/isWeakSet.md",
    "content": "# isWeakSet\n\n주어진 값이 `WeakSet` 인스턴스인지 확인해요.\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 사용법\n\n### `isWeakSet(value)`\n\n값이 WeakSet 인스턴스인지 확인하고 싶을 때 `isWeakSet`을 사용하세요.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/predicate';\n\n// WeakSet 인스턴스들\nconst weakSet1 = new WeakSet();\nconst weakSet2 = new WeakSet([{}, []]);\n\nconsole.log(isWeakSet(weakSet1)); // true\nconsole.log(isWeakSet(weakSet2)); // true\n\n// WeakSet이 아닌 값들\nconsole.log(isWeakSet(new Set())); // false\nconsole.log(isWeakSet(new Map())); // false\nconsole.log(isWeakSet(new WeakMap())); // false\nconsole.log(isWeakSet([])); // false\nconsole.log(isWeakSet({})); // false\nconsole.log(isWeakSet(null)); // false\nconsole.log(isWeakSet(undefined)); // false\n```\n\n#### 파라미터\n\n- `value` (`unknown`): WeakSet 인스턴스인지 확인할 값이에요.\n\n#### 반환 값\n\n(`value is WeakSet<WeakKey>`): 값이 WeakSet 인스턴스이면 `true`, 그렇지 않으면 `false`를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/promise/Mutex.md",
    "content": "# Mutex\n\n여러 비동기 작업이 동시에 실행되지 않도록 순서를 지켜줘요.\n\n```typescript\nconst mutex = new Mutex();\n```\n\n## 사용법\n\n### `Mutex()`\n\n여러 비동기 작업이 동시에 실행되는 것을 방지하고 싶을 때 `Mutex`를 사용하세요. 데이터베이스 연결, 파일 시스템 접근, API 호출 제한 등 동시성을 제어해야 하는 상황에서 유용해요.\n\n```typescript\nimport { Mutex } from 'es-toolkit';\n\nconst mutex = new Mutex();\n\n// API 호출 제한 예시\nasync function callAPI() {\n  await mutex.acquire();\n  try {\n    // 동시에 여러 API 호출이 발생하는 것을 방지\n    const response = await fetch('/api/data');\n    return response.json();\n  } finally {\n    mutex.release();\n  }\n}\n\n// 파일 시스템 접근 예시\nasync function writeToFile(data: string) {\n  await mutex.acquire();\n  try {\n    // 동시에 같은 파일에 쓰기 작업이 일어나는 것을 방지\n    await fs.writeFile('data.txt', data);\n    console.log('파일 쓰기 완료');\n  } finally {\n    mutex.release();\n  }\n}\n\n// 여러 작업을 동시에 호출해도 순차적으로 실행됨\ncallAPI();\ncallAPI(); // 첫 번째 작업이 끝날 때까지 대기\nwriteToFile(); // 앞의 작업들이 끝날 때까지 대기\n```\n\n#### 프로퍼티\n\n- `isLocked` (`boolean`): 현재 뮤텍스가 사용 중인지 여부. `true`라면 이미 실행 중인 비동기 작업이 있다는 뜻이에요.\n\n#### 메서드\n\n- `acquire` (`() => Promise<void>`): 허가를 받고 비동기 작업을 실행하거나, 허가를 받을 때까지 기다려요.\n- `release` (`() => void`): 대기 중인 다음 작업이 실행될 수 있도록 해요.\n"
  },
  {
    "path": "docs/ko/reference/promise/Semaphore.md",
    "content": "# Semaphore\n\n동시에 실행되는 비동기 작업의 개수를 제한해요.\n\n```typescript\nconst semaphore = new Semaphore(capacity);\n```\n\n## 사용법\n\n### `Semaphore(capacity)`\n\n동시에 실행할 수 있는 비동기 작업의 개수를 제한하고 싶을 때 `Semaphore`를 사용하세요. 특히 데이터베이스 연결 풀, API 호출 제한, 파일 다운로드 제한 등 리소스 사용량을 제어해야 하는 상황에서 유용해요.\n\n```typescript\nimport { Semaphore } from 'es-toolkit';\n\nconst semaphore = new Semaphore(3);\n\n// API 호출 제한 예시 (최대 3개까지만 동시 실행)\nasync function callAPI(id: number) {\n  await semaphore.acquire();\n  try {\n    console.log(`API 호출 시작: ${id}`);\n    const response = await fetch(`/api/data/${id}`);\n    return response.json();\n  } finally {\n    semaphore.release();\n    console.log(`API 호출 완료: ${id}`);\n  }\n}\n\n// 파일 다운로드 제한 예시\nasync function downloadFile(url: string) {\n  await semaphore.acquire();\n  try {\n    console.log(`다운로드 시작: ${url}`);\n    // 파일 다운로드 로직\n    await fetch(url);\n  } finally {\n    semaphore.release();\n    console.log(`다운로드 완료: ${url}`);\n  }\n}\n\n// 5개의 작업을 동시에 호출해도 최대 3개까지만 동시 실행됨\ncallAPI(1);\ncallAPI(2);\ncallAPI(3);\ncallAPI(4); // 앞의 작업 중 하나가 끝날 때까지 대기\ncallAPI(5); // 앞의 작업 중 하나가 끝날 때까지 대기\n```\n\n#### 파라미터\n\n- `capacity` (`number`): 동시에 실행할 수 있는 작업의 최대 개수예요. 1보다 큰 정수여야 해요.\n\n#### 프로퍼티\n\n- `capacity` (`number`): 동시에 실행할 수 있는 작업의 최대 개수예요.\n- `available` (`number`): 현재 사용 가능한 허가 개수예요. `0`이면 모든 허가가 사용 중이라는 뜻이에요.\n\n#### 메서드\n\n- `acquire` (`() => Promise<void>`): 허가를 받고 비동기 작업을 실행하거나, 허가를 받을 때까지 기다려요.\n- `release` (`() => void`): 허가를 반납해서 대기 중인 다음 작업이 실행될 수 있도록 해요.\n"
  },
  {
    "path": "docs/ko/reference/promise/delay.md",
    "content": "# delay\n\n코드 실행을 지정된 시간만큼 지연시켜요.\n\n```typescript\nawait delay(ms, options?);\n```\n\n## 사용법\n\n### `delay(ms, options?)`\n\n코드 실행을 특정 시간만큼 멈추고 싶을 때 `delay`를 사용하세요. async/await와 함께 사용해서 일정 시간 후에 다음 코드가 실행되도록 할 수 있어요. 필요한 경우 `AbortSignal`을 통해 지연을 취소할 수도 있어요.\n\n```typescript\nimport { delay } from 'es-toolkit/promise';\n\nasync function example() {\n  console.log('시작');\n  await delay(1000); // 1초 동안 실행을 지연해요\n  console.log('1초 후 실행됩니다');\n\n  await delay(500); // 0.5초 더 지연해요\n  console.log('추가로 0.5초 후 실행됩니다');\n}\n\nexample();\n```\n\nAbortSignal을 사용해서 지연을 취소할 수도 있어요:\n\n```typescript\nasync function cancellableDelay() {\n  const controller = new AbortController();\n  const { signal } = controller;\n\n  // 50ms 후에 지연을 취소해요\n  setTimeout(() => controller.abort(), 50);\n\n  try {\n    await delay(1000, { signal });\n    console.log('1초가 지났습니다'); // 이 코드는 실행되지 않아요\n  } catch (error) {\n    console.log('지연이 취소되었습니다'); // AbortError가 발생해요\n  }\n}\n```\n\n테스트에서 비동기 동작을 시뮬레이션할 때도 유용해요.\n\n```typescript\nasync function simulateNetworkRequest() {\n  console.log('네트워크 요청 시작...');\n  await delay(2000); // 2초간 네트워크 지연 시뮬레이션\n  console.log('응답 받음!');\n  return { data: 'test' };\n}\n```\n\n#### 파라미터\n\n- `ms` (`number`): 지연시킬 밀리초 단위 시간이에요.\n- `options` (`DelayOptions`, 선택): 지연 옵션이에요.\n  - `signal` (`AbortSignal`, 선택): 지연을 취소할 수 있는 AbortSignal이에요.\n\n#### 반환 값\n\n(`Promise<void>`): 지정된 시간 후에 완료되는 Promise를 반환해요.\n\n#### 에러\n\nAbortSignal이 활성화되면 `AbortError`를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/promise/timeout.md",
    "content": "# timeout\n\n지정된 시간 후에 `TimeoutError`를 발생시키는 `Promise`를 반환해요.\n\n```typescript\nawait timeout(ms);\n```\n\n## 사용법\n\n### `timeout(ms)`\n\n특정 시간이 지난 후 타임아웃 에러를 발생시키고 싶을 때 `timeout`을 사용하세요. 다른 Promise와 `Promise.race()`를 함께 사용해서 작업에 시간 제한을 걸 때 유용해요.\n\n```typescript\nimport { timeout } from 'es-toolkit/promise';\n\n// 기본 사용 - 1초 후 TimeoutError 발생\ntry {\n  await timeout(1000);\n  console.log('이 코드는 실행되지 않아요');\n} catch (error) {\n  console.log('타임아웃 에러 발생:', error.message); // 'The operation was timed out'\n}\n```\n\n`Promise.race()`와 함께 사용해서 작업에 시간 제한을 걸 수 있어요:\n\n```typescript\nasync function fetchWithTimeout(url: string) {\n  try {\n    const result = await Promise.race([\n      fetch(url),\n      timeout(5000), // 5초 제한\n    ]);\n    return result;\n  } catch (error) {\n    if (error.name === 'TimeoutError') {\n      console.log('요청이 너무 오래 걸립니다');\n    }\n    throw error;\n  }\n}\n```\n\n여러 비동기 작업 중 하나라도 정해진 시간 안에 완료되지 않으면 전체 작업을 실패시키고 싶을 때도 사용할 수 있어요.\n\n```typescript\nasync function multipleOperationsWithTimeout() {\n  try {\n    await Promise.race([\n      Promise.all([fetch('/api/data1'), fetch('/api/data2'), fetch('/api/data3')]),\n      timeout(3000), // 전체 작업에 3초 제한\n    ]);\n    console.log('모든 작업이 제시간에 완료되었습니다');\n  } catch (error) {\n    console.log('작업이 제시간에 완료되지 못했습니다');\n  }\n}\n```\n\n#### 파라미터\n\n- `ms` (`number`): `TimeoutError`가 발생하기까지의 밀리초 단위 시간이에요.\n\n#### 반환 값\n\n(`Promise<never>`): 지정된 시간 후에 `TimeoutError`로 거부되는 Promise를 반환해요.\n\n#### 에러\n\n지정된 시간이 지나면 `TimeoutError`를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/promise/withTimeout.md",
    "content": "# withTimeout\n\n비동기 함수에 시간 제한을 걸어서, 지정된 시간 내에 완료되지 않으면 `TimeoutError`를 발생시켜요.\n\n```typescript\nawait withTimeout(run, ms);\n```\n\n## 사용법\n\n### `withTimeout(run, ms)`\n\n비동기 작업에 타임아웃을 설정하고 싶을 때 `withTimeout`을 사용하세요. Promise가 지정된 시간 내에 완료되지 않으면 `TimeoutError`로 거부되어서, 무한정 기다리는 상황을 방지할 수 있어요.\n\n```typescript\nimport { withTimeout } from 'es-toolkit/promise';\n\nasync function fetchData() {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n}\n\ntry {\n  // 1초 내에 완료되어야 해요\n  const data = await withTimeout(fetchData, 1000);\n  console.log('데이터를 받았어요:', data);\n} catch (error) {\n  if (error.name === 'TimeoutError') {\n    console.log('요청 시간이 초과되었어요');\n  }\n}\n```\n\n데이터베이스 쿼리에 시간 제한을 걸고 싶을 때도 사용할 수 있어요.\n\n```typescript\nasync function queryDatabase(query: string) {\n  // 데이터베이스 쿼리 로직\n  return await db.execute(query);\n}\n\ntry {\n  const result = await withTimeout(\n    () => queryDatabase('SELECT * FROM users'),\n    5000 // 5초 제한\n  );\n  console.log('쿼리 결과:', result);\n} catch (error) {\n  console.log('쿼리가 너무 오래 걸려서 취소되었어요');\n}\n```\n\n여러 API 호출 중에서 가장 빠른 응답만 받고 싶은 경우에도 활용할 수 있어요.\n\n```typescript\nasync function getFastestResponse() {\n  const apis = [() => fetch('/api/server1'), () => fetch('/api/server2'), () => fetch('/api/server3')];\n\n  try {\n    // 각 API에 2초 제한을 걸고 가장 빨리 응답하는 것만 받아요\n    const promises = apis.map(api => withTimeout(api, 2000));\n    const result = await Promise.race(promises);\n    return result.json();\n  } catch (error) {\n    console.log('모든 API가 시간 초과되었어요');\n  }\n}\n```\n\n#### 파라미터\n\n- `run` (`() => Promise<T>`): 실행할 비동기 함수예요.\n- `ms` (`number`): 타임아웃이 발생하기까지의 밀리초 단위 시간이에요.\n\n#### 반환 값\n\n(`Promise<T>`): 주어진 비동기 함수가 반환하는 결과이거나, 시간 초과 시 TimeoutError로 거부되는 Promise를 반환해요.\n\n#### 에러\n\n지정된 시간 내에 완료되지 않으면 `TimeoutError`를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/set/countBy.md",
    "content": "# countBy (`Set`)\n\n변환 함수를 기반으로 Set의 항목 발생 횟수를 세요.\n\n```typescript\nconst counts = countBy(set, mapper);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `countBy(set, mapper)`\n\nSet의 요소가 서로 다른 카테고리에 얼마나 속하는지 세고 싶을 때 `countBy`를 사용하세요. 각 값에서 키를 생성하는 함수를 제공하면, 생성된 키와 그 개수를 값으로 하는 Map을 반환해요. 변환이 동일한 키를 생성하는 각 요소에 대해 개수가 증가해요.\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = countBy(set, value => (value % 2 === 0 ? 'even' : 'odd'));\n// 결과: Map(2) { 'odd' => 3, 'even' => 2 }\n```\n\n다양한 기준으로 요소를 셀 수 있어요.\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\n// 문자열 길이로 세요.\nconst words = new Set(['apple', 'banana', 'cherry', 'date']);\n\nconst byLength = countBy(words, word => word.length);\n// 결과: Map(3) { 5 => 1, 6 => 2, 4 => 1 }\n\n// 속성으로 세요.\nconst users = new Set([\n  { name: 'Alice', role: 'admin' },\n  { name: 'Bob', role: 'user' },\n  { name: 'Charlie', role: 'user' },\n  { name: 'Diana', role: 'admin' },\n]);\n\nconst byRole = countBy(users, user => user.role);\n// 결과: Map(2) { 'admin' => 2, 'user' => 2 }\n\n// 파생된 카테고리로 세요.\nconst ages = new Set([15, 25, 35, 45, 55]);\n\nconst ageGroups = countBy(ages, age => {\n  if (age < 18) return 'minor';\n  if (age < 65) return 'adult';\n  return 'senior';\n});\n// 결과: Map(2) { 'minor' => 1, 'adult' => 4 }\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 발생 횟수를 셀 Set이에요.\n- `mapper` (`(value: T, value2: T, set: Set<T>) => K`): 카운팅을 위한 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K, number>`): 매핑된 키와 그 개수를 포함하는 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/every.md",
    "content": "# every (`Set`)\n\nSet의 모든 요소가 제공된 조건 함수를 만족하는지 테스트해요.\n\n```typescript\nconst allMatch = every(set, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `every(set, doesMatch)`\n\nSet의 모든 요소가 특정 조건을 만족하는지 확인하고 싶을 때 `every`를 사용하세요. 각 요소를 테스트하는 조건 함수를 제공하면, 모든 요소가 조건을 만족하면 true를, 그렇지 않으면 false를 반환해줘요.\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\nconst set = new Set([10, 20, 30]);\n\nconst result = every(set, value => value > 5);\n// 결과: true\n\nconst result2 = every(set, value => value > 15);\n// 결과: false\n```\n\n다양한 조건을 테스트할 수 있어요.\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\n// 모든 값이 기준을 만족하는지 확인해요.\nconst ages = new Set([25, 30, 35, 40]);\n\nconst allAdults = every(ages, age => age >= 18);\n// 결과: true\n\nconst allSeniors = every(ages, age => age >= 65);\n// 결과: false\n\n// 객체 속성 확인해요.\nconst users = new Set([\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n]);\n\nconst allActive = every(users, user => user.active);\n// 결과: true\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 테스트할 Set이에요.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 각 요소를 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`boolean`): 모든 요소가 조건을 만족하면 true를, 그렇지 않으면 false를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/filter.md",
    "content": "# filter (`Set`)\n\n조건 함수에 따라 Set을 필터링해요.\n\n```typescript\nconst filtered = filter(set, callback);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `filter(set, callback)`\n\n특정 조건을 만족하는 요소만 포함하는 새로운 Set을 만들고 싶을 때 `filter`를 사용하세요. 각 요소를 테스트하는 조건 함수를 제공하면, 조건이 true를 반환하는 요소만으로 구성된 새 Set을 반환해줘요.\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = filter(set, value => value > 2);\n// 결과: Set(3) { 3, 4, 5 }\n```\n\n다양한 기준으로 필터링할 수 있어요.\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\n// 값 타입으로 필터링해요.\nconst numbers = new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n\nconst evenNumbers = filter(numbers, num => num % 2 === 0);\n// 결과: Set(5) { 2, 4, 6, 8, 10 }\n\n// 객체 필터링해요.\nconst products = new Set([\n  { name: 'Laptop', price: 1000, available: true },\n  { name: 'Mouse', price: 25, available: false },\n  { name: 'Keyboard', price: 75, available: true },\n]);\n\nconst availableProducts = filter(products, product => product.available);\n// 결과: Laptop과 Keyboard를 가진 Set\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 필터링할 Set이에요.\n- `callback` (`(value: T, value2: T, set: Set<T>) => boolean`): 각 요소를 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`Set<T>`): 조건을 만족하는 요소만 포함하는 새로운 Set을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/find.md",
    "content": "# find (`Set`)\n\n조건 함수가 true를 반환하는 Set의 첫 번째 요소를 찾아요.\n\n```typescript\nconst element = find(set, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `find(set, doesMatch)`\n\n특정 조건과 일치하는 Set의 첫 번째 요소를 찾고 싶을 때 `find`를 사용하세요. 각 요소를 테스트하는 조건 함수를 제공하면, 처음으로 일치하는 요소를 반환하거나 찾지 못하면 undefined를 반환해줘요.\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\nconst set = new Set([\n  { name: 'apple', quantity: 10 },\n  { name: 'banana', quantity: 5 },\n  { name: 'grape', quantity: 15 },\n]);\n\nconst result = find(set, value => value.quantity > 10);\n// 결과: { name: 'grape', quantity: 15 }\n```\n\n다양한 기준으로 검색할 수 있어요.\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\n// 값의 속성으로 찾아요.\nconst users = new Set([\n  { id: 1, name: 'Alice', age: 25 },\n  { id: 2, name: 'Bob', age: 30 },\n  { id: 3, name: 'Charlie', age: 35 },\n]);\n\nconst senior = find(users, user => user.age >= 35);\n// 결과: { id: 3, name: 'Charlie', age: 35 }\n\n// 문자열 패턴으로 찾아요.\nconst emails = new Set(['user@example.com', 'admin@example.com', 'info@company.com']);\n\nconst adminEmail = find(emails, email => email.startsWith('admin'));\n// 결과: 'admin@example.com'\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 검색할 Set이에요.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 각 요소를 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`T | undefined`): 조건을 만족하는 첫 번째 요소를 반환하거나, 찾지 못하면 undefined를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/forEach.md",
    "content": "# forEach (`Set`)\n\nSet의 각 요소에 대해 제공된 함수를 한 번씩 실행해요.\n\n```typescript\nforEach(set, callbackfn);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `forEach(set, callbackfn)`\n\nSet의 각 요소에 대해 함수를 실행하고 싶을 때 `forEach`를 사용하세요. 콜백 함수는 값을 두 번 (Map.forEach와의 일관성을 위해), 그리고 Set 자체를 인자로 받아요. 로깅, 외부 상태 업데이트, 또는 각 요소에 대한 작업 수행과 같은 부수 효과에 유용해요.\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nforEach(set, value => {\n  console.log(value * 2);\n});\n// 출력:\n// 2\n// 4\n// 6\n```\n\n각 요소에 대해 다양한 작업을 수행할 수 있어요.\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\n// 값 누적하기\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nlet sum = 0;\nforEach(numbers, value => {\n  sum += value;\n});\n// sum은 이제 15예요\n\n// 변환과 함께 요소를 배열로 수집하기\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased: string[] = [];\nforEach(names, value => {\n  uppercased.push(value.toUpperCase());\n});\n// uppercased: ['ALICE', 'BOB', 'CHARLIE']\n\n// 조건에 따라 외부 Set 업데이트하기\nconst scores = new Set([85, 92, 78, 95, 88]);\n\nconst highScores = new Set<number>();\nforEach(scores, value => {\n  if (value >= 90) {\n    highScores.add(value);\n  }\n});\n// highScores에는 92와 95가 포함돼요\n\n// 객체 처리하기\nconst users = new Set([\n  { id: 1, name: 'Alice', active: true },\n  { id: 2, name: 'Bob', active: false },\n  { id: 3, name: 'Charlie', active: true },\n]);\n\nconst activeUserIds: number[] = [];\nforEach(users, user => {\n  if (user.active) {\n    activeUserIds.push(user.id);\n  }\n});\n// activeUserIds: [1, 3]\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 순회할 Set이에요.\n- `callbackfn` (`(value: T, value2: T, set: Set<T>) => void`): 각 요소에 대해 실행할 함수예요.\n\n#### 반환 값\n\n(`void`): 이 함수는 값을 반환하지 않아요.\n"
  },
  {
    "path": "docs/ko/reference/set/keyBy.md",
    "content": "# keyBy (`Set`)\n\n제공된 키 생성 함수를 기반으로 Set의 각 요소를 매핑해요.\n\n```typescript\nconst result = keyBy(set, getKeyFromValue);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `keyBy(set, getKeyFromValue)`\n\n값에서 키를 생성하여 Set을 Map으로 변환하고 싶을 때 `keyBy`를 사용하세요. 각 값에서 키를 생성하는 함수를 제공하면, 키 함수에 의해 생성된 키와 원래 set의 해당 값으로 구성된 새 Map을 반환해요. 여러 요소가 동일한 키를 생성하면 마지막으로 발견된 값이 사용돼요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\nconst set = new Set([\n  { type: 'fruit', name: 'apple' },\n  { type: 'fruit', name: 'banana' },\n  { type: 'vegetable', name: 'carrot' },\n]);\n\nconst result = keyBy(set, item => item.type);\n// 결과:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 참고: 'banana'가 마지막 'fruit'였기 때문에 유지돼요\n```\n\n다양한 기준으로 인덱스를 만들 수 있어요.\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\n// ID로 인덱싱해요.\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 결과: Map(3) { 1 => {...}, 2 => {...}, 3 => {...} }\n\n// 이름으로 인덱싱해요.\nconst byName = keyBy(users, user => user.name);\n// 결과: 키가 'Alice', 'Bob', 'Charlie'인 Map\n\n// 파생된 값으로 인덱싱해요.\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nconst byParity = keyBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 결과: Map(2) {\n//   'odd' => 5,\n//   'even' => 4\n// }\n// 참고: 마지막 짝수(4)와 마지막 홀수(5) 값이 유지돼요\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 매핑할 요소의 Set이에요.\n- `getKeyFromValue` (`(value: T, value2: T, set: Set<T>) => K`): 값에서 키를 생성하는 함수예요.\n\n#### 반환 값\n\n(`Map<K, T>`): 생성된 키가 각 요소의 값에 매핑된 Map을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/map.md",
    "content": "# map (`Set`)\n\n제공된 함수로 요소를 변환한 새로운 Set을 생성해요.\n\n```typescript\nconst transformed = map(set, getNewValue);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `map(set, getNewValue)`\n\nSet의 요소를 변환하고 싶을 때 `map`을 사용하세요. 각 요소에서 새로운 값을 생성하는 함수를 제공하면, 변환된 요소로 구성된 새 Set을 반환해줘요.\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = map(set, value => value * 2);\n// 결과: Set(3) { 2, 4, 6 }\n```\n\n다양한 방법으로 요소를 변환할 수 있어요.\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\n// 문자열 변환해요.\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased = map(names, name => name.toUpperCase());\n// 결과: Set(3) { 'ALICE', 'BOB', 'CHARLIE' }\n\n// 객체로 변환해요.\nconst prices = new Set([10, 20, 30]);\n\nconst products = map(prices, price => ({ price, currency: 'USD' }));\n// 결과: { price: 10, currency: 'USD' } 등의 객체를 가진 Set\n\n// 속성 추출해요.\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n]);\n\nconst ids = map(users, user => user.id);\n// 결과: Set(2) { 1, 2 }\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 변환할 Set이에요.\n- `getNewValue` (`(value: T, value2: T, set: Set<T>) => U`): 요소에서 새로운 값을 생성하는 함수예요.\n\n#### 반환 값\n\n(`Set<U>`): 변환된 요소를 가진 새로운 Set을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/set/reduce.md",
    "content": "# reduce (`Set`)\n\nSet의 요소를 순회하며 콜백 함수를 적용하여 하나의 값으로 줄여요.\n\n```typescript\nconst result = reduce(set, callback, initialValue);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `reduce(set, callback, initialValue?)`\n\nSet의 각 요소에서 결과를 누적하여 하나의 값으로 변환하고 싶을 때 `reduce`를 사용하세요. 각 요소를 처리하고 누산기를 업데이트하는 콜백 함수를 제공하세요. 초기값이 제공되면 누산기의 시작값으로 사용돼요. 초기값이 제공되지 않고 Set이 비어있으면 TypeError가 발생해요.\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = reduce(set, (acc, value) => acc + value, 0);\n// 결과: 6\n```\n\n다양한 방법으로 Set을 줄일 수 있어요.\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\n// 초기값과 함께 합계 계산해요.\nconst numbers = new Set([10, 20, 30, 40]);\n\nconst total = reduce(numbers, (acc, num) => acc + num, 0);\n// 결과: 100\n\n// 초기값 없이 (첫 번째 요소 사용)\nconst values = new Set([5, 10]);\n\nconst sum = reduce(values, (acc, value) => acc + value);\n// 결과: 15 (첫 번째 값 5부터 시작)\n\n// Set에서 배열 만들기\nconst uniqueNames = new Set(['Alice', 'Bob', 'Charlie']);\n\nconst nameList = reduce(uniqueNames, (acc, name) => [...acc, name.toUpperCase()], [] as string[]);\n// 결과: ['ALICE', 'BOB', 'CHARLIE']\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 줄일 Set이에요.\n- `callback` (`(accumulator: A, value: T, value2: T, set: Set<T>) => A`): 각 요소를 처리하고 누산기를 업데이트하는 함수예요.\n- `initialValue` (`A`, 선택): 누산기의 초기값이에요. 제공되지 않으면 Set의 첫 번째 요소를 사용해요.\n\n#### 반환 값\n\n(`A`): 최종 누적된 값을 반환해요.\n\n#### 예외\n\n(`TypeError`): Set이 비어있고 초기값이 제공되지 않으면 발생해요.\n"
  },
  {
    "path": "docs/ko/reference/set/some.md",
    "content": "# some (`Set`)\n\nSet의 적어도 하나의 요소가 제공된 조건 함수를 만족하는지 테스트해요.\n\n```typescript\nconst anyMatch = some(set, doesMatch);\n```\n\n::: info\n\n이 함수는 다른 컬렉션 유형의 유사한 함수와의 잠재적 충돌을 피하기 위해 `es-toolkit/set`에서만 사용할 수 있어요.\n\n:::\n\n## 사용법\n\n### `some(set, doesMatch)`\n\nSet의 적어도 하나의 요소가 특정 조건을 만족하는지 확인하고 싶을 때 `some`을 사용하세요. 각 요소를 테스트하는 조건 함수를 제공하면, 적어도 하나의 요소가 조건을 만족하면 true를, 그렇지 않으면 false를 반환해줘요.\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = some(set, value => value > 2);\n// 결과: true\n\nconst result2 = some(set, value => value > 5);\n// 결과: false\n```\n\n다양한 조건을 테스트할 수 있어요.\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\n// 어떤 값이라도 기준을 만족하는지 확인해요.\nconst numbers = new Set([1, 3, 5, 7, 9]);\n\nconst hasEven = some(numbers, num => num % 2 === 0);\n// 결과: false\n\nconst hasLarge = some(numbers, num => num > 5);\n// 결과: true\n\n// 객체 속성 확인해요.\nconst users = new Set([\n  { name: 'Alice', admin: false },\n  { name: 'Bob', admin: true },\n  { name: 'Charlie', admin: false },\n]);\n\nconst hasAdmin = some(users, user => user.admin);\n// 결과: true\n```\n\n#### 파라미터\n\n- `set` (`Set<T>`): 테스트할 Set이에요.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 각 요소를 테스트하는 조건 함수예요.\n\n#### 반환 값\n\n(`boolean`): 적어도 하나의 요소가 조건을 만족하면 true를, 그렇지 않으면 false를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/camelCase.md",
    "content": "# camelCase\n\n문자열을 카멜 표기법(Camel case)으로 변환해요.\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 사용법\n\n### `camelCase(str)`\n\n문자열을 카멜 표기법으로 바꾸고 싶을 때 `camelCase`를 사용하세요. 카멜 표기법은 첫 번째 단어를 소문자로 쓰고, 나머지 단어들의 첫 글자를 대문자로 연결하는 명명 규칙이에요.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// 다양한 형태의 문자열을 카멜 표기법으로 변환\ncamelCase('hello world'); // returns 'helloWorld'\ncamelCase('some-hyphen-text'); // returns 'someHyphenText'\ncamelCase('CONSTANT_CASE'); // returns 'constantCase'\ncamelCase('PascalCase'); // returns 'pascalCase'\ncamelCase('mixed   SpAcE'); // returns 'mixedSpAcE'\n```\n\n특수 문자나 공백, 하이픈 같은 구분자가 있는 문자열을 자바스크립트 변수명이나 객체 프로퍼티명으로 사용하기 좋은 형태로 바꿔줘요.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// API 응답에서 받은 키를 변환\nconst apiKey = 'user_first_name';\nconst jsKey = camelCase(apiKey); // 'userFirstName'\n\n// HTML 속성을 자바스크립트 프로퍼티로 변환\nconst cssProperty = 'background-color';\nconst jsProperty = camelCase(cssProperty); // 'backgroundColor'\n```\n\n유니코드 문자도 보존해요.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\ncamelCase('keep unicode 😅'); // returns 'keepUnicode😅'\ncamelCase('한글-테스트'); // returns '한글테스트'\n```\n\n#### 파라미터\n\n- `str` (`string`): 카멜 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 카멜 표기법으로 변환된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/capitalize.md",
    "content": "# capitalize\n\n문자열의 첫 번째 문자를 대문자로 바꾸고, 나머지 문자는 소문자로 바꿔요.\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 사용법\n\n### `capitalize(str)`\n\n문자열의 첫 글자만 대문자로 만들고 나머지는 소문자로 통일하고 싶을 때 `capitalize`을 사용하세요. 이름이나 제목을 정규화할 때 유용해요.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// 기본 사용법\ncapitalize('hello'); // returns 'Hello'\ncapitalize('WORLD'); // returns 'World'\ncapitalize('javaScript'); // returns 'Javascript'\n```\n\n빈 문자열이나 한 글자 문자열도 올바르게 처리해요.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\ncapitalize(''); // returns ''\ncapitalize('a'); // returns 'A'\ncapitalize('A'); // returns 'A'\n```\n\n사용자 입력을 정규화하거나 제목을 만들 때 활용할 수 있어요.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// 사용자 이름 정규화\nconst userName = 'john DOE';\nconst formattedName = userName.split(' ').map(capitalize).join(' ');\n// returns 'John Doe'\n\n// 제목 만들기\nconst title = capitalize('welcome to our website');\n// returns 'Welcome to our website'\n```\n\n#### 파라미터\n\n- `str` (`string`): 첫 글자를 대문자로 바꿀 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 글자는 대문자, 나머지는 소문자로 바뀐 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/constantCase.md",
    "content": "# constantCase\n\n문자열을 상수 표기법으로 변환해요.\n\n```typescript\nconst result = constantCase(str);\n```\n\n## 사용법\n\n### `constantCase(str)`\n\n문자열을 상수 표기법으로 바꾸고 싶을 때 `constantCase`를 사용하세요. 상수 표기법은 모든 문자를 대문자로 쓰고 단어 사이를 밑줄(`_`)로 구분하는 명명 규칙이에요.\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 다양한 형태의 문자열을 상수 표기법으로 변환\nconstantCase('hello world'); // returns 'HELLO_WORLD'\nconstantCase('camelCase'); // returns 'CAMEL_CASE'\nconstantCase('some-kebab-case'); // returns 'SOME_KEBAB_CASE'\nconstantCase('PascalCase'); // returns 'PASCAL_CASE'\nconstantCase('snake_case'); // returns 'SNAKE_CASE'\n```\n\n자바스크립트나 다른 프로그래밍 언어에서 상수를 정의할 때 자주 사용하는 명명 규칙이에요.\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 환경 변수명 생성\nconst configKey = 'api base url';\nconst envVar = constantCase(configKey); // 'API_BASE_URL'\n\n// 상수명 생성\nconst settingName = 'maximum retry count';\nconst constantName = constantCase(settingName); // 'MAXIMUM_RETRY_COUNT'\n```\n\n공백이나 특수 문자가 포함된 문자열도 적절히 처리해요.\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\nconstantCase('HTTP Request'); // returns 'HTTP_REQUEST'\nconstantCase('user-agent-string'); // returns 'USER_AGENT_STRING'\nconstantCase('  multiple   spaces  '); // returns 'MULTIPLE_SPACES'\n```\n\n#### 파라미터\n\n- `str` (`string`): 상수 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 상수 표기법으로 변환된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/deburr.md",
    "content": "# deburr\n\n특수문자와 발음 기호를 ASCII 문자로 바꿔요.\n\n```typescript\nconst result = deburr(str);\n```\n\n## 사용법\n\n### `deburr(str)`\n\n문자열에 있는 특수문자나 발음 기호(다이어크리틱)를 ASCII 문자로 바꾸고 싶을 때 `deburr`를 사용하세요. URL이나 파일명, 검색 기능에서 문자를 정규화할 때 유용해요.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 기본 사용법\ndeburr('café'); // returns 'cafe'\ndeburr('résumé'); // returns 'resume'\ndeburr('naïve'); // returns 'naive'\ndeburr('Zürich'); // returns 'Zurich'\n```\n\n다양한 언어의 특수문자를 처리할 수 있어요.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 독일어\ndeburr('München'); // returns 'Munchen'\ndeburr('Björk'); // returns 'Bjork'\n\n// 프랑스어\ndeburr('Crème brûlée'); // returns 'Creme brulee'\ndeburr('naïveté'); // returns 'naivete'\n\n// 스페인어\ndeburr('niño'); // returns 'nino'\ndeburr('mañana'); // returns 'manana'\n```\n\nURL 생성이나 파일명 정리에 활용할 수 있어요.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// URL 슬러그 생성\nconst title = 'Café의 특별한 메뉴';\nconst slug = deburr(title).toLowerCase().replace(/\\s+/g, '-');\n// returns 'cafe의-특별한-메뉴'\n\n// 파일명 정리\nconst fileName = 'résumé-김철수.pdf';\nconst cleanName = deburr(fileName); // returns 'resume-김철수.pdf'\n```\n\n검색 기능에서 문자열 비교를 쉽게 만들어줘요.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\nfunction searchMatch(query: string, target: string): boolean {\n  const normalizedQuery = deburr(query.toLowerCase());\n  const normalizedTarget = deburr(target.toLowerCase());\n  return normalizedTarget.includes(normalizedQuery);\n}\n\nsearchMatch('cafe', 'Café Mocha'); // returns true\nsearchMatch('resume', 'résumé.pdf'); // returns true\n```\n\n#### 파라미터\n\n- `str` (`string`): 특수문자나 발음 기호가 포함된 문자열이에요.\n\n#### 반환 값\n\n(`string`): 특수문자와 발음 기호가 ASCII 문자로 바뀐 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/escape.md",
    "content": "# escape\n\nHTML에서 특별한 의미를 가진 문자들을 안전한 엔티티로 바꿔요.\n\n```typescript\nconst result = escape(str);\n```\n\n## 사용법\n\n### `escape(str)`\n\nHTML에 텍스트를 안전하게 삽입하려고 할 때 `escape`를 사용하세요. `&`, `<`, `>`, `\"`, `'` 같은 특수 문자들을 HTML 엔티티로 변환해서 XSS 공격을 방지하고 HTML이 올바르게 표시되도록 해줘요.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 기본 HTML 특수 문자 처리\nescape('<div>Hello World</div>'); // returns '&lt;div&gt;Hello World&lt;/div&gt;'\nescape('Tom & Jerry'); // returns 'Tom &amp; Jerry'\nescape('\"Hello\"'); // returns '&quot;Hello&quot;'\nescape(\"'Hello'\"); // returns '&#39;Hello&#39;'\n```\n\n사용자 입력을 HTML에 표시할 때 보안을 위해 필수적으로 사용해야 해요.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 사용자 입력 처리\nconst userInput = '<script>alert(\"XSS\")</script>';\nconst safeHtml = `<div>${escape(userInput)}</div>`;\n// returns '<div>&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;</div>'\n\n// 동적 HTML 생성\nconst title = 'Article \"How to & Why\"';\nconst html = `<h1>${escape(title)}</h1>`;\n// returns '<h1>Article &quot;How to &amp; Why&quot;</h1>'\n```\n\n템플릿이나 댓글 시스템에서 활용할 수 있어요.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 댓글 시스템\nfunction renderComment(comment: string, author: string) {\n  return `\n    <div class=\"comment\">\n      <strong>${escape(author)}</strong>: ${escape(comment)}\n    </div>\n  `;\n}\n\n// 사용 예시\nconst html = renderComment('I love <coding> & \"programming\"!', 'John Doe');\n// returns '<div class=\"comment\"><strong>John Doe</strong>: I love &lt;coding&gt; &amp; &quot;programming&quot;!</div>'\n```\n\nJSON 문자열을 HTML 속성에 넣을 때도 유용해요.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\nconst data = { message: 'Hello & \"welcome\"' };\nconst jsonString = JSON.stringify(data);\nconst htmlAttribute = `<div data-info=\"${escape(jsonString)}\"></div>`;\n// returns '<div data-info=\"{&quot;message&quot;:&quot;Hello &amp; \\\\&quot;welcome\\\\&quot;&quot;}\"></div>'\n```\n\n#### 파라미터\n\n- `str` (`string`): HTML에서 안전하게 사용하기 위해 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): HTML 엔티티로 변환된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/escapeRegExp.md",
    "content": "# escapeRegExp\n\n정규식에서 특별한 의미를 가진 문자들을 일반 문자로 바꿔요.\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 사용법\n\n### `escapeRegExp(str)`\n\n문자열을 정규식 패턴에 안전하게 사용하고 싶을 때 `escapeRegExp`를 사용하세요. `^`, `$`, `\\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, `|` 같은 정규식 특수 문자들을 이스케이프해서 문자 그대로 매칭되도록 해줘요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 기본 사용법\nescapeRegExp('Hello.'); // returns 'Hello\\\\.'\nescapeRegExp('(test)'); // returns '\\\\(test\\\\)'\nescapeRegExp('user@domain.com'); // returns 'user@domain\\\\.com'\nescapeRegExp('[abc]'); // returns '\\\\[abc\\\\]'\n```\n\n사용자 입력을 정규식 패턴으로 사용할 때 필수적이에요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 사용자 검색어를 정규식으로 사용\nfunction searchInText(text: string, searchTerm: string): boolean {\n  const escapedTerm = escapeRegExp(searchTerm);\n  const regex = new RegExp(escapedTerm, 'i'); // 대소문자 무관\n  return regex.test(text);\n}\n\nsearchInText('Visit https://example.com', 'https://example.com'); // returns true\nsearchInText('Price: $19.99', '$19.99'); // returns true\n```\n\n문자열 치환에서도 활용할 수 있어요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\nfunction replaceAll(text: string, search: string, replacement: string): string {\n  const escapedSearch = escapeRegExp(search);\n  const regex = new RegExp(escapedSearch, 'g');\n  return text.replace(regex, replacement);\n}\n\nconst html = '<div>Hello</div> <span>World</span>';\nconst result = replaceAll(html, '<div>', '<section>');\n// returns '<section>Hello</div> <span>World</span>'\n```\n\n파일 경로나 URL 처리에 유용해요.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 파일 확장자 검사\nfunction hasExtension(filename: string, extension: string): boolean {\n  const escapedExt = escapeRegExp(extension);\n  const regex = new RegExp(`\\\\.${escapedExt}$`, 'i');\n  return regex.test(filename);\n}\n\nhasExtension('document.pdf', 'pdf'); // returns true\nhasExtension('image.jpg', 'pdf'); // returns false\n\n// URL 매칭\nfunction matchesUrl(text: string, url: string): boolean {\n  const escapedUrl = escapeRegExp(url);\n  const regex = new RegExp(escapedUrl);\n  return regex.test(text);\n}\n\nconst content = 'Visit our site at https://es-toolkit.dev/ for more info';\nmatchesUrl(content, 'https://es-toolkit.dev/'); // returns true\n```\n\n#### 파라미터\n\n- `str` (`string`): 정규식 특수 문자를 이스케이프할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 정규식 특수 문자가 이스케이프된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/kebabCase.md",
    "content": "# kebabCase\n\n문자열을 케밥 표기법으로 변환해요.\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 사용법\n\n### `kebabCase(str)`\n\n문자열을 케밥 표기법으로 변환하고 싶을 때 `kebabCase`를 사용하세요. 케밥 표기법은 각 단어를 소문자로 쓰고 단어 사이를 대시(-)로 연결하는 명명 규칙이에요.\n\n```typescript\nimport { kebabCase } from 'es-toolkit/string';\n\n// 카멜 케이스를 케밥 케이스로 변환해요\nkebabCase('camelCase');\n// 결과: 'camel-case'\n\n// 공백이 있는 문자열을 변환해요\nkebabCase('some whitespace');\n// 결과: 'some-whitespace'\n\n// 이미 케밥 케이스인 문자열은 그대로 유지해요\nkebabCase('hyphen-text');\n// 결과: 'hyphen-text'\n\n// 대문자로 된 문자열을 변환해요\nkebabCase('HTTPRequest');\n// 결과: 'http-request'\n```\n\n이 함수는 API 엔드포인트나 CSS 클래스 이름, HTML 속성 등을 만들 때 유용해요.\n\n#### 파라미터\n\n- `str` (`string`): 케밥 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 케밥 표기법으로 변환된 문자열이에요.\n"
  },
  {
    "path": "docs/ko/reference/string/lowerCase.md",
    "content": "# lowerCase\n\n문자열을 소문자 표기법으로 변환해요.\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 사용법\n\n### `lowerCase(str)`\n\n문자열을 소문자 표기법으로 바꾸고 싶을 때 `lowerCase`를 사용하세요. 소문자 표기법은 모든 단어를 소문자로 쓰고 단어 사이를 공백으로 구분하는 명명 규칙이에요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 다양한 형태의 문자열을 소문자 표기법으로 변환\nlowerCase('Hello World'); // returns 'hello world'\nlowerCase('camelCase'); // returns 'camel case'\nlowerCase('some-kebab-case'); // returns 'some kebab case'\nlowerCase('PascalCase'); // returns 'pascal case'\nlowerCase('SCREAMING_SNAKE_CASE'); // returns 'screaming snake case'\n```\n\n사용자에게 보여주는 텍스트나 제목을 만들 때 유용해요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 사용자 인터페이스 텍스트 생성\nconst fieldName = 'firstName';\nconst label = lowerCase(fieldName); // 'first name'\n\n// API 키를 사용자 친화적 텍스트로 변환\nconst apiKeys = ['userEmail', 'phoneNumber', 'birthDate'];\nconst labels = apiKeys.map(key => lowerCase(key));\n// returns ['user email', 'phone number', 'birth date']\n```\n\n설정이나 옵션 이름을 표시할 때도 활용할 수 있어요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 설정 메뉴 표시\nconst settings = {\n  enableNotifications: true,\n  darkModeEnabled: false,\n  autoSaveInterval: 300,\n};\n\nfor (const [key, value] of Object.entries(settings)) {\n  const displayName = lowerCase(key);\n  console.log(`${displayName}: ${value}`);\n}\n// 출력:\n// enable notifications: true\n// dark mode enabled: false\n// auto save interval: 300\n```\n\n특수 문자나 공백이 있는 문자열도 적절히 처리해요.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\nlowerCase('HTTPSConnection'); // returns 'https connection'\nlowerCase('user_profile-settings'); // returns 'user profile settings'\nlowerCase('  mixed   CASE   text  '); // returns 'mixed case text'\n```\n\n#### 파라미터\n\n- `str` (`string`): 소문자 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 소문자 표기법으로 변환된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/lowerFirst.md",
    "content": "# lowerFirst\n\n문자열의 첫 번째 문자를 소문자로 바꿔요.\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 사용법\n\n### `lowerFirst(str)`\n\n문자열의 첫 글자만 소문자로 만들고 싶을 때 `lowerFirst`를 사용하세요. 나머지 문자들은 그대로 유지해요. 변수명이나 프로퍼티명을 카멜 케이스로 만들 때 유용해요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 기본 사용법\nlowerFirst('Hello'); // returns 'hello'\nlowerFirst('WORLD'); // returns 'wORLD'\nlowerFirst('JavaScript'); // returns 'javaScript'\n```\n\n빈 문자열이나 한 글자 문자열도 올바르게 처리해요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\nlowerFirst(''); // returns ''\nlowerFirst('A'); // returns 'a'\nlowerFirst('a'); // returns 'a'\n```\n\n카멜 케이스 변환에 활용할 수 있어요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 클래스명을 인스턴스 변수명으로 변환\nconst className = 'UserService';\nconst instanceName = lowerFirst(className); // 'userService'\n\n// 상수명을 카멜 케이스로 변환\nconst constantName = 'API_BASE_URL';\nconst camelCase = lowerFirst(constantName.toLowerCase().replace(/_(.)/g, (_, letter) => letter.toUpperCase()));\n// 결과적으로 'apiBaseUrl'\n```\n\nAPI 응답이나 데이터 변환에서도 사용할 수 있어요.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 데이터베이스 컬럼명을 JavaScript 프로퍼티명으로 변환\nconst dbColumns = ['UserId', 'FirstName', 'LastName', 'EmailAddress'];\nconst jsProperties = dbColumns.map(column => lowerFirst(column));\n// returns ['userId', 'firstName', 'lastName', 'emailAddress']\n\n// 함수명 생성\nfunction createGetter(propertyName: string): string {\n  return `get${propertyName}`;\n}\n\nfunction createSetter(propertyName: string): string {\n  return `set${propertyName}`;\n}\n\nconst property = lowerFirst('UserName'); // 'userName'\nconst getter = createGetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'getUserName'\nconst setter = createSetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'setUserName'\n```\n\n#### 파라미터\n\n- `str` (`string`): 첫 글자를 소문자로 바꿀 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 글자가 소문자로 바뀐 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/pad.md",
    "content": "# pad\n\n문자열의 양쪽에 문자를 추가해서 지정한 길이로 만들어요.\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 사용법\n\n### `pad(str, length, chars?)`\n\n문자열이 지정한 길이보다 짧을 때 양쪽에 문자를 추가해서 길이를 맞추고 싶을 때 `pad`를 사용하세요. 양쪽에 똑같이 나누어 추가할 수 없다면 오른쪽이 한 글자 더 길게 패딩돼요.\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\n// 기본 공백으로 패딩하기\npad('abc', 8);\n// => '  abc   '\n\n// 사용자 정의 문자로 패딩하기\npad('abc', 8, '_-');\n// => '_-abc_-_'\n\n// 문자열이 이미 목표 길이보다 길거나 같을 때\npad('abc', 3);\n// => 'abc'\n\npad('abcdef', 3);\n// => 'abcdef'\n```\n\n패딩 문자가 목표 길이에 균등하게 분배될 수 없을 때는 오른쪽이 더 길어져요.\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\npad('abc', 9, '123');\n// => '123abc123' (왼쪽 3글자, 오른쪽 3글자)\n\npad('abc', 10, '123');\n// => '123abc1231' (왼쪽 3글자, 오른쪽 4글자)\n```\n\n#### 파라미터\n\n- `str` (`string`): 패딩할 문자열이에요.\n- `length` (`number`): 목표 길이예요.\n- `chars` (`string`, 선택): 패딩에 사용할 문자예요. 기본값은 `' '`이에요.\n\n#### 반환 값\n\n(`string`): 패딩된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/pascalCase.md",
    "content": "# pascalCase\n\n문자열을 파스칼 표기법으로 변환해요.\n\n```typescript\nconst converted = pascalCase(str);\n```\n\n## 사용법\n\n### `pascalCase(str)`\n\n문자열을 파스칼 표기법으로 변환하고 싶을 때 `pascalCase`를 사용하세요. 파스칼 표기법은 각 단어의 첫 글자를 대문자로 하고 단어 사이를 구분자 없이 연결하는 명명 규칙이에요.\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 기본 사용법\npascalCase('pascalCase'); // 'PascalCase'\npascalCase('some whitespace'); // 'SomeWhitespace'\n\n// 하이픈이나 언더스코어로 연결된 단어들\npascalCase('hyphen-text'); // 'HyphenText'\npascalCase('snake_case'); // 'SnakeCase'\n\n// 연속된 대문자 처리\npascalCase('HTTPRequest'); // 'HttpRequest'\npascalCase('XMLHttpRequest'); // 'XmlHttpRequest'\n```\n\n다양한 구분자가 포함된 문자열도 올바르게 처리해요.\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 여러 구분자가 섞인 경우\npascalCase('camelCase-with_mixed.separators'); // 'CamelCaseWithMixedSeparators'\n\n// 숫자가 포함된 경우\npascalCase('version2.1.0'); // 'Version210'\n\n// 특수 문자가 포함된 경우\npascalCase('user@email.com'); // 'UserEmailCom'\n```\n\n#### 파라미터\n\n- `str` (`string`): 파스칼 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 파스칼 표기법으로 변환된 새로운 문자열을 반환해요.\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { pascalCase } from 'es-toolkit/string';\n\nconsole.log(pascalCase('pascalCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/string/reverseString.md",
    "content": "# reverseString\n\n문자열을 거꾸로 뒤집어요.\n\n```typescript\nconst reversed = reverseString(value);\n```\n\n## 사용법\n\n### `reverseString(value)`\n\n문자열의 글자 순서를 거꾸로 뒤집고 싶을 때 `reverseString`을 사용하세요. 유니코드 문자와 이모지도 올바르게 처리해요.\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 기본 문자열 뒤집기\nreverseString('hello'); // 'olleh'\nreverseString('world'); // 'dlrow'\n\n// 대소문자가 섞인 문자열\nreverseString('PascalCase'); // 'esaClacsaP'\n\n// 공백이 포함된 문자열\nreverseString('hello world'); // 'dlrow olleh'\n```\n\n이모지와 특수 문자도 정확하게 처리해요.\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 이모지가 포함된 문자열\nreverseString('foo 😄 bar'); // 'rab 😄 oof'\nreverseString('안녕하세요'); // '요세하녕안'\n\n// 숫자와 특수 문자\nreverseString('12345'); // '54321'\nreverseString('a-b-c'); // 'c-b-a'\n```\n\n#### 파라미터\n\n- `value` (`string`): 뒤집을 문자열이에요.\n\n#### 반환 값\n\n(`string`): 글자 순서가 뒤집힌 새로운 문자열을 반환해요.\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { reverseString } from 'es-toolkit';\n\nconsole.log(reverseString('hello'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/string/snakeCase.md",
    "content": "# snakeCase\n\n문자열을 스네이크 표기법으로 변환해요.\n\n```typescript\nconst converted = snakeCase(str);\n```\n\n## 사용법\n\n### `snakeCase(str)`\n\n문자열을 스네이크 표기법으로 변환하고 싶을 때 `snakeCase`를 사용하세요. 스네이크 표기법은 각 단어를 소문자로 작성하고 단어 사이를 밑줄(\\_)로 연결하는 명명 규칙이에요.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 기본 사용법\nsnakeCase('camelCase'); // 'camel_case'\nsnakeCase('some whitespace'); // 'some_whitespace'\n\n// 하이픈이나 다른 구분자로 연결된 단어들\nsnakeCase('hyphen-text'); // 'hyphen_text'\nsnakeCase('PascalCase'); // 'pascal_case'\n\n// 연속된 대문자 처리\nsnakeCase('HTTPRequest'); // 'http_request'\nsnakeCase('XMLHttpRequest'); // 'xml_http_request'\n```\n\n다양한 구분자가 포함된 문자열도 올바르게 처리해요.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 여러 구분자가 섞인 경우\nsnakeCase('camelCase-with_mixed.separators'); // 'camel_case_with_mixed_separators'\n\n// 숫자가 포함된 경우\nsnakeCase('version2.1.0'); // 'version_2_1_0'\n\n// 특수 문자가 포함된 경우\nsnakeCase('user@email.com'); // 'user_email_com'\n```\n\n#### 파라미터\n\n- `str` (`string`): 스네이크 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 스네이크 표기법으로 변환된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/startCase.md",
    "content": "# startCase\n\n문자열의 각 단어의 첫 글자를 대문자로 변환해요.\n\n```typescript\nconst converted = startCase(str);\n```\n\n## 사용법\n\n### `startCase(str)`\n\n문자열을 스타트 케이스(각 단어의 첫 글자가 대문자)로 변환하고 싶을 때 `startCase`를 사용하세요. 각 단어의 첫 글자는 대문자로, 나머지는 소문자로 변환하고 단어 사이를 공백으로 연결해요.\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 기본 사용법\nstartCase('hello world'); // 'Hello World'\nstartCase('HELLO WORLD'); // 'Hello World'\n\n// 카멜 케이스나 파스칼 케이스 변환\nstartCase('fooBar'); // 'Foo Bar'\nstartCase('PascalCase'); // 'Pascal Case'\n\n// 하이픈이나 언더스코어로 연결된 단어들\nstartCase('hello-world'); // 'Hello World'\nstartCase('hello_world'); // 'Hello World'\n```\n\n다양한 구분자와 특수 문자가 포함된 문자열도 올바르게 처리해요.\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 여러 구분자가 포함된 경우\nstartCase('--foo-bar--'); // 'Foo Bar'\nstartCase('__FOO_BAR__'); // 'Foo Bar'\n\n// 연속된 대문자와 숫자 처리\nstartCase('XMLHttpRequest'); // 'Xml Http Request'\nstartCase('_abc_123_def'); // 'Abc 123 Def'\n\n// 빈 문자나 의미 없는 구분자만 있는 경우\nstartCase('_-_-_-_'); // ''\nstartCase('12abc 12ABC'); // '12 Abc 12 Abc'\n```\n\n#### 파라미터\n\n- `str` (`string`): 스타트 케이스로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 각 단어의 첫 글자가 대문자로 변환되고 공백으로 연결된 새로운 문자열을 반환해요.\n\n## 데모\n\n::: sandpack\n\n```ts index.ts\nimport { startCase } from 'es-toolkit/string';\n\nconsole.log(startCase('startCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/string/trim.md",
    "content": "# trim\n\n문자열의 앞뒤에 있는 공백이나 지정한 문자를 제거해요.\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 사용법\n\n### `trim(str, chars?)`\n\n문자열의 시작과 끝에서 불필요한 문자를 제거하고 싶을 때 `trim`을 사용하세요. 특정 문자를 지정하지 않으면 공백 문자를 제거해요.\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 기본 공백 제거\ntrim('  hello  '); // 'hello'\ntrim('\\t\\n  hello  \\r\\n'); // 'hello'\n\n// 특정 문자 제거\ntrim('--hello--', '-'); // 'hello'\ntrim('***hello***', '*'); // 'hello'\n\n// 여러 문자 중 하나라도 해당하면 제거\ntrim('##hello##world##', ['#', 'd']); // 'hello##worl'\n```\n\n배열로 여러 문자를 지정하면 그 중 하나라도 해당하는 문자는 모두 제거해요.\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 여러 문자를 배열로 지정\ntrim('!!@@hello@@!!', ['!', '@']); // 'hello'\n\n// 숫자와 특수 문자 제거\ntrim('123abc123', ['1', '2', '3']); // 'abc'\n\n// 문자와 공백을 함께 제거\ntrim('  __hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### 파라미터\n\n- `str` (`string`): 앞뒤에서 문자를 제거할 문자열이에요.\n- `chars` (`string | string[]`, 선택): 제거할 문자예요. 문자열이나 문자 배열을 사용할 수 있어요. 기본값은 공백 문자예요.\n\n#### 반환 값\n\n(`string`): 지정한 문자가 앞뒤에서 제거된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/trimEnd.md",
    "content": "# trimEnd\n\n문자열의 끝에 있는 공백이나 지정한 문자를 제거해요.\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 사용법\n\n### `trimEnd(str, chars?)`\n\n문자열의 끝 부분에서 불필요한 문자를 제거하고 싶을 때 `trimEnd`를 사용하세요. 특정 문자를 지정하지 않으면 공백 문자를 제거해요.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 기본 공백 제거\ntrimEnd('hello  '); // 'hello'\ntrimEnd('hello\\t\\n  '); // 'hello'\n\n// 특정 문자 제거\ntrimEnd('hello---', '-'); // 'hello'\ntrimEnd('123000', '0'); // '123'\ntrimEnd('abcabcabc', 'c'); // 'abcabcab'\n```\n\n여러 문자를 배열로 지정하면 그 중 하나라도 해당하는 문자는 모두 제거해요.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 여러 문자를 배열로 지정\ntrimEnd('hello!!@@', ['!', '@']); // 'hello'\n\n// 숫자와 특수 문자 제거\ntrimEnd('abc123', ['1', '2', '3']); // 'abc'\n\n// 문자와 공백을 함께 제거\ntrimEnd('hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### 파라미터\n\n- `str` (`string`): 끝에서 문자를 제거할 문자열이에요.\n- `chars` (`string | string[]`, 선택): 제거할 문자예요. 문자열이나 문자 배열을 사용할 수 있어요. 기본값은 공백 문자예요.\n\n#### 반환 값\n\n(`string`): 지정한 문자가 끝에서 제거된 새로운 문자열을 반환해요.\n\n#### 에러\n\n`chars`가 문자열일 때 길이가 1이 아니면 에러를 발생시켜요.\n"
  },
  {
    "path": "docs/ko/reference/string/trimStart.md",
    "content": "# trimStart\n\n문자열의 시작에 있는 공백이나 지정한 문자를 제거해요.\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 사용법\n\n### `trimStart(str, chars?)`\n\n문자열의 시작 부분에서 불필요한 문자를 제거하고 싶을 때 `trimStart`를 사용하세요. 특정 문자를 지정하지 않으면 공백 문자를 제거해요.\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 기본 공백 제거\ntrimStart('  hello'); // 'hello'\ntrimStart('\\t\\n  hello'); // 'hello'\n\n// 특정 문자 제거\ntrimStart('---hello', '-'); // 'hello'\ntrimStart('000123', '0'); // '123'\ntrimStart('abcabcabc', 'a'); // 'bcabcabc'\n```\n\n여러 문자를 배열로 지정하면 그 중 하나라도 해당하는 문자는 모두 제거해요.\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 여러 문자를 배열로 지정\ntrimStart('!!@@hello', ['!', '@']); // 'hello'\n\n// 숫자와 특수 문자 제거\ntrimStart('123abc', ['1', '2', '3']); // 'abc'\n\n// 문자와 공백을 함께 제거\ntrimStart('  __hello', ['_', ' ']); // 'hello'\n```\n\n#### 파라미터\n\n- `str` (`string`): 시작에서 문자를 제거할 문자열이에요.\n- `chars` (`string | string[]`, 선택): 제거할 문자예요. 문자열이나 문자 배열을 사용할 수 있어요. 기본값은 공백 문자예요.\n\n#### 반환 값\n\n(`string`): 지정한 문자가 시작에서 제거된 새로운 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/unescape.md",
    "content": "# unescape\n\nHTML 엔티티 문자를 원래 문자로 변환해요.\n\n```typescript\nconst result = unescape(str);\n```\n\n## 사용법\n\n### `unescape(str)`\n\nHTML에서 사용되는 엔티티 문자들을 원래 문자로 바꾸고 싶을 때 `unescape`를 사용하세요. `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;` 같은 HTML 엔티티를 `&`, `<`, `>`, `\"`, `'` 문자로 변환해요. [`escape`](./escape.md) 함수의 반대 동작을 해요.\n\n```typescript\nimport { unescape } from 'es-toolkit/string';\n\n// HTML 태그 엔티티를 원래 문자로 변환해요\nunescape('This is a &lt;div&gt; element.');\n// 반환 값: 'This is a <div> element.'\n\n// 따옴표 엔티티를 원래 문자로 변환해요\nunescape('This is a &quot;quote&quot;');\n// 반환 값: 'This is a \"quote\"'\n\n// 작은따옴표 엔티티를 원래 문자로 변환해요\nunescape('This is a &#39;quote&#39;');\n// 반환 값: 'This is a 'quote''\n\n// 앰퍼샌드 엔티티를 원래 문자로 변환해요\nunescape('This is a &amp; symbol');\n// 반환 값: 'This is a & symbol'\n```\n\nHTML 폼이나 URL에서 받은 데이터를 처리할 때 유용해요:\n\n```typescript\n// 사용자 입력에서 HTML 엔티티를 변환해요\nconst userInput = 'My favorite tag is &lt;button&gt;';\nconst converted = unescape(userInput);\nconsole.log(converted); // 'My favorite tag is <button>'\n\n// 여러 엔티티가 섞인 문자열도 변환할 수 있어요\nconst mixed = '&quot;Hello &amp; Welcome&quot; &lt;says the &gt; user';\nconst result = unescape(mixed);\nconsole.log(result); // '\"Hello & Welcome\" <says the > user'\n```\n\n#### 파라미터\n\n- `str` (`string`): 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): HTML 엔티티가 원래 문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/upperCase.md",
    "content": "# upperCase\n\n문자열을 모든 글자가 대문자이고 단어가 공백으로 구분된 형태로 변환해요.\n\n```typescript\nconst result = upperCase(str);\n```\n\n## 사용법\n\n### `upperCase(str)`\n\n문자열을 대문자 표기법으로 변환하고 싶을 때 `upperCase`를 사용하세요. 각 단어를 대문자로 바꾸고 단어 사이를 공백으로 연결해요. camelCase, kebab-case, snake_case 등 다양한 표기법의 문자열을 처리할 수 있어요.\n\n```typescript\nimport { upperCase } from 'es-toolkit/string';\n\n// camelCase를 대문자 표기법으로 변환해요\nupperCase('camelCase');\n// 반환 값: 'CAMEL CASE'\n\n// 이미 공백이 있는 문자열도 변환해요\nupperCase('some whitespace');\n// 반환 값: 'SOME WHITESPACE'\n\n// kebab-case를 대문자 표기법으로 변환해요\nupperCase('hyphen-text');\n// 반환 값: 'HYPHEN TEXT'\n\n// 연속된 대문자가 있는 문자열도 처리해요\nupperCase('HTTPSRequest');\n// 반환 값: 'HTTPS REQUEST'\n```\n\n다양한 명명 규칙을 통일된 대문자 형식으로 변환할 때 유용해요:\n\n```typescript\n// API 응답의 다양한 키 이름을 통일해요\nconst apiKeys = ['user_name', 'firstName', 'email-address', 'phoneNumber'];\nconst upperCaseKeys = apiKeys.map(key => upperCase(key));\nconsole.log(upperCaseKeys);\n// ['USER NAME', 'FIRST NAME', 'EMAIL ADDRESS', 'PHONE NUMBER']\n\n// 파일 이름을 표시할 때 사용해요\nconst fileName = 'profile_image_thumbnail.jpg';\nconst displayName = upperCase(fileName.replace('.jpg', ''));\nconsole.log(displayName); // 'PROFILE IMAGE THUMBNAIL'\n```\n\n#### 파라미터\n\n- `str` (`string`): 대문자 표기법으로 변환할 문자열이에요.\n\n#### 반환 값\n\n(`string`): 각 단어가 대문자로 변환되고 공백으로 구분된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/upperFirst.md",
    "content": "# upperFirst\n\n문자열의 첫 번째 글자를 대문자로 변환해요.\n\n```typescript\nconst result = upperFirst(str);\n```\n\n## 사용법\n\n### `upperFirst(str)`\n\n문자열의 첫 글자만 대문자로 바꾸고 싶을 때 `upperFirst`를 사용하세요. 나머지 글자들은 그대로 유지해요. 문장의 시작을 대문자로 만들거나 이름을 정리할 때 유용해요.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/string';\n\n// 소문자로 시작하는 문자열의 첫 글자를 대문자로 만들어요\nupperFirst('fred');\n// 반환 값: 'Fred'\n\n// 이미 첫 글자가 대문자인 경우 그대로 유지해요\nupperFirst('Fred');\n// 반환 값: 'Fred'\n\n// 모든 글자가 대문자인 경우에도 그대로 유지해요\nupperFirst('FRED');\n// 반환 값: 'FRED'\n```\n\n다양한 상황에서 활용할 수 있어요:\n\n```typescript\n// 사용자 이름을 정리할 때\nconst userName = 'john';\nconst displayName = upperFirst(userName);\nconsole.log(displayName); // 'John'\n\n// 문장의 첫 글자를 대문자로 만들 때\nconst sentence = 'hello world';\nconst capitalizedSentence = upperFirst(sentence);\nconsole.log(capitalizedSentence); // 'Hello world'\n\n// 여러 이름을 처리할 때\nconst names = ['alice', 'bob', 'charlie'];\nconst capitalizedNames = names.map(name => upperFirst(name));\nconsole.log(capitalizedNames); // ['Alice', 'Bob', 'Charlie']\n\n// camelCase 문자열의 첫 글자를 대문자로 만들 때\nconst camelCase = 'firstName';\nconst pascalCase = upperFirst(camelCase);\nconsole.log(pascalCase); // 'FirstName'\n```\n\n#### 파라미터\n\n- `str` (`string`): 첫 글자를 대문자로 바꿀 문자열이에요.\n\n#### 반환 값\n\n(`string`): 첫 번째 글자가 대문자로 변환된 문자열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/string/words.md",
    "content": "# words\n\n문자열을 단어 단위로 나누어 배열로 반환해요.\n\n```typescript\nconst result = words(str);\n```\n\n## 사용법\n\n### `words(str)`\n\n문자열을 개별 단어로 분리하고 싶을 때 `words`를 사용하세요. camelCase, kebab-case, 공백, 구두점 등을 기준으로 단어를 나누고, 이모지와 유니코드 문자도 올바르게 인식해요. 다양한 명명 규칙의 문자열을 처리할 때 유용해요.\n\n```typescript\nimport { words } from 'es-toolkit/string';\n\n// 구두점과 공백으로 구분된 문자열을 단어로 나눠요\nwords('fred, barney, & pebbles');\n// 반환 값: ['fred', 'barney', 'pebbles']\n\n// camelCase와 연속된 대문자를 올바르게 분리해요\nwords('camelCaseHTTPRequest🚀');\n// 반환 값: ['camel', 'Case', 'HTTP', 'Request', '🚀']\n\n// 유니코드 문자와 숫자도 처리해요\nwords('Lunedì 18 Set');\n// 반환 값: ['Lunedì', '18', 'Set']\n```\n\n다양한 상황에서 문자열을 단어로 분리할 때 활용할 수 있어요:\n\n```typescript\n// 변수명을 단어로 분리해서 다른 명명 규칙으로 변환해요\nconst variableName = 'getUserProfile';\nconst wordList = words(variableName);\nconsole.log(wordList); // ['get', 'User', 'Profile']\n\n// snake_case를 단어로 분리해요\nconst snakeCase = 'user_profile_data';\nconst snakeWords = words(snakeCase);\nconsole.log(snakeWords); // ['user', 'profile', 'data']\n\n// kebab-case를 단어로 분리해요\nconst kebabCase = 'user-profile-data';\nconst kebabWords = words(kebabCase);\nconsole.log(kebabWords); // ['user', 'profile', 'data']\n\n// 복잡한 문자열도 처리해요\nconst complex = 'XMLHttpRequest2.0_parser-v1.2';\nconst complexWords = words(complex);\nconsole.log(complexWords); // ['XML', 'Http', 'Request', '2', '0', 'parser', 'v', '1', '2']\n```\n\n#### 파라미터\n\n- `str` (`string`): 단어로 분리할 문자열이에요.\n\n#### 반환 값\n\n(`string[]`): 문자열을 단어 단위로 나눈 배열을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/util/assert.md",
    "content": "# assert\n\n주어진 조건이 참임을 단언해요. 조건이 거짓이면 에러를 던져요.\n\n```typescript\nassert(condition, message);\n```\n\n::: info `invariant`와의 관계\n\n`assert`는 `invariant` 함수와 완전히 같은 기능을 해요. 단지 이름만 다를 뿐이에요. 더 자세한 내용은 [`invariant`](./invariant.md) 문서를 참고하세요.\n\n:::\n\n## 사용법\n\n### `assert(condition, message)`\n\n코드에서 특정 조건이 반드시 만족되어야 할 때 `assert`를 사용하세요. 조건이 거짓이면 즉시 에러를 던져서 프로그램 실행을 중단해요.\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// 조건이 참이면 아무것도 하지 않아요\nassert(true, '이 메시지는 나타나지 않아요');\n\n// 조건이 거짓이면 에러를 던져요\nassert(false, '이 조건은 거짓이에요'); // Error: 이 조건은 거짓이에요\n\n// 값이 null이나 undefined가 아님을 확인할 때\nconst value = getValue();\nassert(value !== null && value !== undefined, '값이 null이나 undefined면 안 돼요');\n// 이제 value는 null이나 undefined가 아니라고 확신할 수 있어요\n\n// 숫자가 양수인지 확인할 때\nconst number = getNumber();\nassert(number > 0, '숫자는 양수여야 해요');\n```\n\n에러 객체를 직접 전달할 수도 있어요.\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// Error 객체 전달\nassert(false, new Error('커스텀 에러 메시지'));\n\n// 커스텀 에러 클래스 사용\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\nassert(false, new ValidationError('검증에 실패했어요'));\n```\n\n개발 중에 코드의 가정을 검증하거나, 함수의 입력값이 예상 범위에 있는지 확인할 때 특히 유용해요.\n\n#### 파라미터\n\n- `condition` (`unknown`): 평가할 조건이에요. 거짓으로 평가되는 값이면 에러를 던져요.\n- `message` (`string | Error`): 조건이 거짓일 때 던질 에러 메시지나 에러 객체예요.\n\n#### 반환 값\n\n(`void`): 조건이 참이면 아무것도 반환하지 않아요.\n\n#### 에러\n\n조건이 거짓으로 평가되면 제공된 메시지나 에러 객체를 던져요.\n"
  },
  {
    "path": "docs/ko/reference/util/attempt.md",
    "content": "# attempt\n\n함수를 실행하고 결과나 에러를 튜플로 반환해요.\n\n```typescript\nconst [error, result] = attempt(func);\n```\n\n## 사용법\n\n### `attempt(func)`\n\n함수를 안전하게 실행하고 싶을 때 `attempt`를 사용하세요. try-catch 블록으로 감싸지 않고도 에러를 처리할 수 있어요.\n\n```typescript\nimport { attempt } from 'es-toolkit/util';\n\n// 성공하는 경우\nconst [error, result] = attempt(() => 42);\n// error는 null, result는 42\n\n// 에러가 발생하는 경우\nconst [error, result] = attempt(() => {\n  throw new Error('문제가 발생했어요');\n});\n// error는 Error 객체, result는 null\n\n// 타입을 명시할 수도 있어요\nconst [error, names] = attempt<string[], Error>(() => ['Alice', 'Bob']);\n// names는 string[] 타입으로 추론돼요\n```\n\n::: warning 비동기 함수에는 사용하지 마세요\n\n이 함수는 비동기 함수(`Promise`를 반환하는 함수)에는 적합하지 않아요. 비동기 함수를 전달하면 `[null, Promise<T>]`가 반환되지만, Promise가 나중에 거부(reject)되더라도 오류를 포착하지 못해요.\n\n비동기 함수를 처리하려면 [`attemptAsync`](./attemptAsync.md) 함수를 대신 사용하세요.\n\n```typescript\n// 잘못된 사용\nconst [error, promise] = attempt(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n\n// 올바른 사용\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n```\n\n:::\n\n#### 파라미터\n\n- `func` (`() => T`): 실행할 함수예요.\n\n#### 반환 값\n\n(`[null, T] | [E, null]`): 성공하면 `[null, 결과값]`, 에러가 발생하면 `[에러, null]` 튜플을 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/util/attemptAsync.md",
    "content": "# attemptAsync\n\n비동기 함수를 실행하고 결과나 에러를 튜플로 반환해요.\n\n```typescript\nconst [error, result] = await attemptAsync(func);\n```\n\n## 사용법\n\n### `attemptAsync(func)`\n\n비동기 함수를 안전하게 실행하고 싶을 때 `attemptAsync`를 사용하세요. async/await 블록을 try-catch로 감싸지 않고도 에러를 처리할 수 있어요.\n\n```typescript\nimport { attemptAsync } from 'es-toolkit/util';\n\n// API 요청 성공하는 경우\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n// error는 null, data는 응답 데이터\n\n// 네트워크 에러가 발생하는 경우\nconst [error, data] = await attemptAsync(async () => {\n  throw new Error('네트워크 오류');\n});\n// error는 Error 객체, data는 null\n\n// 타입을 명시할 수도 있어요\ninterface User {\n  id: number;\n  name: string;\n}\n\nconst [error, users] = await attemptAsync<User[]>(async () => {\n  const response = await fetch('https://api.example.com/users');\n  return response.json();\n});\n// users는 User[] 타입으로 추론돼요\n```\n\n데이터베이스 쿼리나 파일 읽기 같은 비동기 작업에서 에러 처리가 필요할 때 특히 유용해요.\n\n```typescript\n// 파일 읽기 예시\nconst [error, content] = await attemptAsync(async () => {\n  const fs = await import('fs/promises');\n  return fs.readFile('config.json', 'utf8');\n});\n\nif (error) {\n  console.log('파일을 읽을 수 없어요:', error.message);\n} else {\n  console.log('파일 내용:', content);\n}\n```\n\n::: info 동기 함수에는 attempt를 사용하세요\n\n이 함수는 비동기 함수(`Promise`를 반환하는 함수)를 처리하는데 적합해요. 동기 함수를 처리하려면 [`attempt`](./attempt.md) 함수를 대신 사용하는 것을 권장해요.\n\n:::\n\n#### 파라미터\n\n- `func` (`() => Promise<T>`): 실행할 비동기 함수예요.\n\n#### 반환 값\n\n(`Promise<[null, T] | [E, null]>`): 성공하면 `[null, 결과값]`, 에러가 발생하면 `[에러, null]` 튜플로 해결되는 Promise를 반환해요.\n"
  },
  {
    "path": "docs/ko/reference/util/invariant.md",
    "content": "# invariant\n\n주어진 조건이 참임을 단언해요. 조건이 거짓이면 에러를 던져요.\n\n```typescript\ninvariant(condition, message);\n```\n\n## 사용법\n\n### `invariant(condition, message)`\n\n코드에서 특정 조건이 반드시 만족되어야 할 때 `invariant`를 사용하세요. 조건이 거짓이면 즉시 에러를 던져서 프로그램 실행을 중단해요.\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// 조건이 참이면 아무것도 하지 않아요\ninvariant(true, '이 메시지는 나타나지 않아요');\n\n// 조건이 거짓이면 에러를 던져요\ninvariant(false, '이 조건은 거짓이에요'); // Error: 이 조건은 거짓이에요\n\n// 값이 null이나 undefined가 아님을 확인할 때\nconst value = getValue();\ninvariant(value !== null && value !== undefined, '값이 null이나 undefined면 안 돼요');\n// 이제 value는 null이나 undefined가 아니라고 확신할 수 있어요\n\n// 숫자가 양수인지 확인할 때\nconst number = getNumber();\ninvariant(number > 0, '숫자는 양수여야 해요');\n```\n\n에러 객체를 직접 전달할 수도 있어요.\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// Error 객체 전달\ninvariant(false, new Error('커스텀 에러 메시지'));\n\n// 커스텀 에러 클래스 사용\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\ninvariant(false, new ValidationError('검증에 실패했어요'));\n```\n\n개발 중에 코드의 가정을 검증하거나, 함수의 입력값이 예상 범위에 있는지 확인할 때 특히 유용해요.\n\n#### 파라미터\n\n- `condition` (`unknown`): 평가할 조건이에요. 거짓으로 평가되는 값이면 에러를 던져요.\n- `message` (`string | Error`): 조건이 거짓일 때 던질 에러 메시지나 에러 객체예요.\n\n#### 반환 값\n\n(`void`): 조건이 참이면 아무것도 반환하지 않아요.\n\n#### 에러\n\n조건이 거짓으로 평가되면 제공된 메시지나 에러 객체를 던져요.\n"
  },
  {
    "path": "docs/ko/usage.md",
    "content": "---\ndescription: es-toolkit을 사용하는 방법\nprev:\n  text: es-toolkit 소개\n  link: ./intro.md\nnext:\n  text: 번들 사이즈에 미치는 영향\n  link: ./bundle-size\n---\n\n# 설치 및 사용하기\n\nNode.js나 Bun을 사용하는 경우, [npm](https://npmjs.com/package/es-toolkit)에서 설치할 수 있어요. Deno에서는 [JSR](https://jsr.io/@es-toolkit/es-toolkit)에서 설치할 수 있어요.\n\n브라우저에서 바로 쓰는 경우, [CDN에서 가져올 수](#브라우저) 있어요.\n\n## Node.js\n\nes-toolkit은 Node.js 18 또는 이후 버전을 지원해요. es-toolkit을 설치하기 위해서는 아래 명령어를 사용해주세요.\n\n::: code-group\n\n```sh [npm]\nnpm install es-toolkit\n```\n\n```sh [pnpm]\npnpm add es-toolkit\n```\n\n```sh [yarn]\nyarn add es-toolkit\n```\n\n:::\n\nes-toolkit의 함수를 사용하려면 아래와 같이 `import` 해서 사용하면 돼요.\n\n```typescript\nimport { sum } from 'es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Deno\n\nes-toolkit을 Deno에서도 사용할 수 있어요. [JSR](https://jsr.io/@es-toolkit/es-toolkit)에서 아래 명령어로 설치하세요.\n\n```sh\ndeno add @es-toolkit/es-toolkit\n```\n\nDeno에서 사용하면, JSR에서의 제한으로 인해 NPM과 다르게 추가적인 Scope가 필요해요.\n\n```typescript\nimport { sum } from '@es-toolkit/es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Bun\n\nes-toolkit은 Bun에서도 사용할 수 있어요. 아래 명령어를 사용해주세요.\n\n```sh\nbun add es-toolkit\n```\n\n## 브라우저\n\n[jsdelivr](https://www.jsdelivr.com) 또는 [unpkg](https://unpkg.com) 같은 CDN에서 es-toolkit을 쓸 수 있어요. Lodash와 같이 `_` 변수에 모든 함수가 포함돼요.\n\n::: code-group\n\n```html [jsdelivr]\n<script src=\"https://cdn.jsdelivr.net/npm/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n```html [unpkg]\n<script src=\"https://unpkg.com/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n\n현대적인 브라우저에서는 [esm.sh](https://esm.sh)도 쓸 수 있어요.\n\n::: code-group\n\n```html [esm.sh]\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"es-toolkit\": \"https://esm.sh/es-toolkit@%5E1\"\n    }\n  }\n</script>\n<script type=\"module\">\n  import { chunk } from 'es-toolkit';\n\n  chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n"
  },
  {
    "path": "docs/llms-txt.md",
    "content": "# AI Integration\n\nes-toolkit is committed to helping AI agents make the most of our library. We're actively working on features that make it easier for AI-powered tools to understand, reference, and use es-toolkit effectively.\n\n## llms.txt\n\nAs part of this effort, es-toolkit provides [llms.txt](https://llmstxt.org/) files — a standard that helps AI assistants and large language models (LLMs) understand project documentation more effectively.\n\n### `/llms.txt`\n\nA structured table of contents of es-toolkit's documentation, including links to individual pages. This is useful when an AI tool needs to look up specific functions or topics.\n\n- **URL**: [https://es-toolkit.dev/llms.txt](https://es-toolkit.dev/llms.txt)\n\n### `/llms-full.txt`\n\nThe complete content of all documentation pages combined into a single file. This is useful when you want to provide the AI tool with comprehensive context about es-toolkit.\n\n- **URL**: [https://es-toolkit.dev/llms-full.txt](https://es-toolkit.dev/llms-full.txt)\n\n### Usage with AI Tools\n\nMany AI tools and LLM-powered applications support the llms.txt standard. You can use these endpoints to give AI assistants full context about es-toolkit's API and features.\n\nFor example, you can provide the URL to an AI coding assistant so it can reference es-toolkit's documentation when helping you write code:\n\n```\nUse es-toolkit for utility functions. Documentation: https://es-toolkit.dev/llms-full.txt\n```\n"
  },
  {
    "path": "docs/package.json",
    "content": "{\n  \"name\": \"docs\",\n  \"private\": true,\n  \"scripts\": {\n    \"docs:build\": \"vitepress build\",\n    \"docs:dev\": \"vitepress dev\",\n    \"docs:preview\": \"vitepress preview\"\n  },\n  \"devDependencies\": {\n    \"chart.js\": \"^4.5.1\",\n    \"fast-glob\": \"^3.3.2\",\n    \"markdown-it-container\": \"^4.0.0\",\n    \"vitepress\": \"^1.6.4\",\n    \"vitepress-plugin-llms\": \"^1.10.0\",\n    \"vitepress-plugin-sandpack\": \"^1.1.4\",\n    \"vue\": \"^3.5.13\",\n    \"vue-chartjs\": \"^5.3.3\"\n  }\n}\n"
  },
  {
    "path": "docs/performance.md",
    "content": "---\ndescription: The performance difference between es-toolkit and alternative libraries\n---\n\n# Performance\n\n![Graph showing the difference in performance between es-toolkit and lodash. Using es-toolkit results in a performance gain of up to 11 times.](/assets/performance.png)\n\nDesigned with performance in mind, es-toolkit provides an average of 2× performance improvement compared to alternative libraries like lodash. Some functions achieve up to an 11× performance gain by fully utilizing modern JavaScript APIs.\n\n## Performance Comparison\n\n|                                                           | es-toolkit@0.0.1 | lodash-es@4.17.21 | Difference |\n| --------------------------------------------------------- | ---------------- | ----------------- | ---------- |\n| [omit](./reference/object/omit.md)                        | 4,767,360 times  | 403,624 times     | 11.8×      |\n| [pick](./reference/object/pick.md)                        | 9,121,839 times  | 2,663,072 times   | 3.43×      |\n| [differenceWith](./reference/array/differenceWith.md)     | 9,291,897 times  | 4,275,222 times   | 2.17×      |\n| [difference](./reference/array/difference.md)             | 10,436,101 times | 5,155,631 times   | 2.02×      |\n| [intersectionWith](./reference/array/intersectionWith.md) | 8,074,722 times  | 3,814,479 times   | 2.12×      |\n| [intersection](./reference/array/intersection.md)         | 9,999,571 times  | 4,630,316 times   | 2.15×      |\n| [unionBy](./reference/array/unionBy.md)                   | 6,435,983 times  | 3,794,899 times   | 1.69×      |\n| [union](./reference/array/union.md)                       | 5,059,209 times  | 4,771,400 times   | 1.06×      |\n| [dropRightWhile](./reference/array/dropRightWhile.md)     | 7,529,559 times  | 5,606,439 times   | 1.34×      |\n| [groupBy](./reference/array/groupBy.md)                   | 5,000,235 times  | 5,206,286 times   | 0.96×      |\n\nTested with MacBook Pro 14-inch (M1 Max, 2021). Refer to our [benchmark code](https://github.com/toss/es-toolkit/tree/main/benchmarks).\n"
  },
  {
    "path": "docs/reference/array/at.md",
    "content": "# at\n\nGets the elements at specified indices from an array and returns a new array.\n\n```typescript\nconst result = at(arr, indices);\n```\n\n## Reference\n\n### `at(arr, indices)`\n\nUse `at` when you want to select elements at specific positions from an array. You can use negative indices to select elements from the end of the array.\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\n// Get elements at multiple indices from a number array.\nat([10, 20, 30, 40, 50], [1, 3, 4]);\n// Returns: [20, 40, 50]\n\n// Use negative indices to get elements from the end.\nat(['a', 'b', 'c', 'd'], [0, -1, -2]);\n// Returns: ['a', 'd', 'c']\n```\n\nNon-integer indices are converted to integers.\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\nat([1, 2, 3, 4], [1.5, 2.9]); // [2, 3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to get elements from.\n- `indices` (`number[]`): An array of indices of the elements to get. Negative values count from the end of the array.\n\n#### Returns\n\n(`T[]`): A new array containing the elements at the specified indices.\n"
  },
  {
    "path": "docs/reference/array/chunk.md",
    "content": "# chunk\n\nSplits an array into smaller arrays of a specified size.\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## Usage\n\n### `chunk(arr, size)`\n\nUse `chunk` when you want to split a long array into multiple smaller arrays of the same size. If the array cannot be evenly divided, the last chunk will contain the remaining elements.\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\n// Split a number array into chunks of size 2.\nchunk([1, 2, 3, 4, 5], 2);\n// Returns: [[1, 2], [3, 4], [5]]\n\n// Split a string array into chunks of size 3.\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n```\n\nSplitting an empty array returns an empty array.\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\nchunk([], 2); // []\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to split.\n- `size` (`number`): The size of each chunk. Must be a positive integer.\n\n#### Returns\n\n(`T[][]`): A 2D array split into chunks of size `size`.\n\n#### Throws\n\nThrows an error if `size` is not a positive integer.\n\n## Try It\n\n::: sandpack\n\n```ts index.ts\nimport { chunk } from 'es-toolkit/array';\n\nconsole.log(chunk([1, 2, 3, 4, 5], 2));\n```\n\n:::\n\n## Lodash Compatibility\n\nWhen you import `chunk` from `es-toolkit/compat`, it is compatible with lodash.\n\n- Returns an empty array if `size` is less than 1.\n- Even if you provide a number with decimals for `size`, it will be rounded down to an integer.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0); // Returns []\n```\n\n## Performance Comparison\n\n|                   | [Bundle Size](../../bundle-size.md) | [Runtime Performance](../../performance.md) |\n| ----------------- | ----------------------------------- | ------------------------------------------- |\n| es-toolkit        | 238 bytes (92.4% smaller)           | 9,338,821 times (11% slower)                |\n| es-toolkit/compat | 307 bytes (90.2% smaller)           | 9,892,157 times (5% slower)                 |\n| lodash-es         | 3,153 bytes                         | 10,523,270 times                            |\n"
  },
  {
    "path": "docs/reference/array/compact.md",
    "content": "# compact\n\nReturns a new array with falsy values removed.\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## Usage\n\n### `compact(arr)`\n\nUse `compact` when you want to remove falsy values (`false`, `null`, `0`, `-0`, `0n`, `''`, `undefined`, `NaN`) from an array. A new array containing only truthy values is returned.\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\n// Remove various falsy values.\ncompact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n// Returns: [1, 2, 3, 4, 5]\n\n// Remove empty strings from a string array.\ncompact(['hello', '', 'world', '', '!']);\n// Returns: ['hello', 'world', '!']\n```\n\nThe type system automatically excludes falsy types.\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\nconst mixed: (string | number | false | null)[] = ['text', 0, false, null, 5];\nconst result = compact(mixed);\n// result's type is (string | number)[]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to remove falsy values from.\n\n#### Returns\n\n(`Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>`): A new array with falsy values removed.\n"
  },
  {
    "path": "docs/reference/array/countBy.md",
    "content": "# countBy\n\nCategorizes the elements of an array based on a transformation function result and returns an object with counts.\n\n```typescript\nconst counted = countBy(arr, mapper);\n```\n\n## Usage\n\n### `countBy(arr, mapper)`\n\nUse `countBy` when you want to categorize array elements by a specific criterion and count each group. It groups elements using the value returned by the transformation function as a key and calculates the number of elements in each group.\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\n// Count numbers by odd/even categorization.\ncountBy([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));\n// Returns: { odd: 3, even: 2 }\n```\n\nYou can also count based on a specific property of an object array.\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 25 },\n  { name: 'David', age: 30 },\n];\n\ncountBy(users, user => user.age);\n// Returns: { '25': 2, '30': 2 }\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to count elements from.\n- `mapper` (`(item: T, index: number, array: T[]) => K`): A function that returns the value to use as the categorization criterion, called with each item, its index, and the array.\n\n#### Returns\n\n(`Record<K, number>`): An object representing how many elements exist for each categorization criterion.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst arr = ['a', 'b', 'c', 'd'];\nconst result = countBy(arr, (item, index) => (index < 2 ? 'first' : 'rest'));\n// Returns: { first: 2, rest: 2 }\n\n// Using array parameter\nconst numbers = [1, 2, 3, 4];\nconst result2 = countBy(numbers, (item, index, arr) => (item < arr.length / 2 ? 'small' : 'large'));\n// Returns: { small: 1, large: 3 }\n```\n"
  },
  {
    "path": "docs/reference/array/difference.md",
    "content": "# difference\n\nReturns a new array excluding elements from the first array that are in the second array.\n\n```typescript\nconst result = difference(firstArr, secondArr);\n```\n\n## Usage\n\n### `difference(firstArr, secondArr)`\n\nUse `difference` when you want to find the difference between two arrays. A new array is returned containing elements that are only in the first array and not in the second array.\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\n// Find the difference of number arrays.\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\ndifference(array1, array2);\n// Returns: [1, 3, 5]\n// 2 and 4 are excluded because they are in both arrays.\n\n// Find the difference of string arrays.\nconst colors1 = ['red', 'blue', 'green'];\nconst colors2 = ['blue', 'yellow'];\ndifference(colors1, colors2);\n// Returns: ['red', 'green']\n```\n\nThe difference with an empty array is the same as the original array.\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\ndifference([1, 2, 3], []); // [1, 2, 3]\ndifference([], [1, 2, 3]); // []\n```\n\n#### Parameters\n\n- `firstArr` (`T[]`): The reference array to find the difference from.\n- `secondArr` (`T[]`): The array containing elements to exclude from the first array.\n\n#### Returns\n\n(`T[]`): A new array containing elements that are only in the first array and not in the second array.\n\n## Performance Comparison\n\n|            | [Bundle Size](../../bundle-size.md) | [Performance](../../performance.md) |\n| ---------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit | 90 bytes (92.4% smaller)            | 9,317,227 times (85% faster)        |\n| lodash-es  | 7,958 bytes                         | 5,030,861 times                     |\n"
  },
  {
    "path": "docs/reference/array/differenceBy.md",
    "content": "# differenceBy\n\nTransforms elements of two arrays with a conversion function, computes their difference, and returns a new array.\n\n```typescript\nconst result = differenceBy(firstArr, secondArr, mapper);\n```\n\n## Usage\n\n### `differenceBy(firstArr, secondArr, mapper)`\n\nUse `differenceBy` when you want to compute the difference between two arrays based on a specific criterion. It compares each element after transforming it with the conversion function, and returns the elements that exist only in the first array.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\n// Compute the difference based on the id in object arrays.\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\ndifferenceBy(array1, array2, item => item.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n// Elements with id 2 exist in both arrays and are excluded.\n\n// You can compare arrays of different types.\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\ndifferenceBy(objects, numbers, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\nYou can also compute the difference based on string length.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\nconst words1 = ['apple', 'banana', 'cherry'];\nconst words2 = ['grape', 'lemon'];\ndifferenceBy(words1, words2, word => word.length);\n// Returns: ['banana', 'cherry']\n// 'apple' is excluded because it has the same length as 'grape' or 'lemon'.\n```\n\n#### Parameters\n\n- `firstArr` (`T[]`): The base array to compute the difference from.\n- `secondArr` (`U[]`): The array containing elements to exclude from the first array.\n- `mapper` (`(value: T | U) => unknown`): The function that maps elements of both arrays. Elements are compared based on the values returned by this function.\n\n#### Returns\n\n(`T[]`): A new array containing elements that exist only in the first array, based on the transformed values.\n"
  },
  {
    "path": "docs/reference/array/differenceWith.md",
    "content": "# differenceWith\n\nComputes the difference of two arrays using a custom comparison function and returns a new array.\n\n```typescript\nconst result = differenceWith(firstArr, secondArr, areItemsEqual);\n```\n\n## Usage\n\n### `differenceWith(firstArr, secondArr, areItemsEqual)`\n\nUse `differenceWith` when you want to compute the difference between two arrays using a custom comparison function. It determines if two elements are equal through the comparison function, and returns elements that exist only in the first array.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\n// Compute the difference based on id in object arrays.\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\nconst areItemsEqual = (a, b) => a.id === b.id;\ndifferenceWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1 }, { id: 3 }]\n// Elements with id 2 are considered equal and excluded.\n\n// You can compare arrays of different types.\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\nconst areItemsEqual2 = (a, b) => a.id === b;\ndifferenceWith(objects, numbers, areItemsEqual2);\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\nYou can compare elements with complex conditions.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\nconst users1 = [\n  { name: 'Alice', age: 30 },\n  { name: 'Bob', age: 25 },\n  { name: 'Charlie', age: 35 },\n];\nconst users2 = [\n  { name: 'Alice', age: 31 }, // Same user even if age is different\n  { name: 'David', age: 25 },\n];\n\nconst areUsersEqual = (a, b) => a.name === b.name;\ndifferenceWith(users1, users2, areUsersEqual);\n// Returns: [{ name: 'Bob', age: 25 }, { name: 'Charlie', age: 35 }]\n```\n\n#### Parameters\n\n- `firstArr` (`T[]`): The base array to compute the difference from.\n- `secondArr` (`U[]`): The array containing elements to exclude from the first array.\n- `areItemsEqual` (`(x: T, y: U) => boolean`): The function that determines if two elements are equal.\n\n#### Returns\n\n(`T[]`): A new array containing elements that are determined to exist only in the first array according to the comparison function.\n\n## Lodash Compatibility\n\nWhen you import `differenceWith` from `es-toolkit/compat`, it's fully compatible with lodash.\n\n- `differenceWith` can accept multiple arrays to compare against the first array.\n- `differenceWith` can accept array-like objects as arguments.\n- `differenceWith` can omit the custom comparison function. When omitted, it uses the [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero) algorithm by default.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// Example 1: Comparing with multiple arrays using a comparison function\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\nconst comparator = (a, b) => a.id === b.id;\n\nconst result = differenceWith(array, values1, values2, comparator);\n// The result is [{ id: 1 }]. This element remains in the first array based on the comparison criteria.\n\n// Example 2: Using array-like objects with a comparison function\nconst array = { 0: { id: 1 }, 1: { id: 2 }, 2: { id: 3 }, length: 3 };\nconst values = { 0: { id: 2 }, 1: { id: 3 }, length: 2 };\nconst comparator = (a, b) => a.id === b.id;\n\nconst result2 = differenceWith(array, values, comparator);\n// The result is [{ id: 1 }]. This element remains only in the first array-like object based on the comparison criteria.\n\n// Example 3: Omitting the custom comparison function\nconst array = [1, 2, 3];\nconst values1 = [2];\nconst values2 = [3];\n\nconst result3 = differenceWith(array, values1, values2);\n// The result is [1]. This element exists uniquely across all arrays.\n```\n"
  },
  {
    "path": "docs/reference/array/drop.md",
    "content": "# drop\n\nReturns a new array with the specified number of elements removed from the beginning.\n\n```typescript\nconst dropped = drop(arr, itemsCount);\n```\n\n## Usage\n\n### `drop(arr, itemsCount)`\n\nUse `drop` when you want to remove some elements from the beginning of an array. It removes the specified number of elements from the start and returns a new array with the remaining elements.\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\n// Remove the first 2 elements from the array.\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// If the count is greater than the array length, it returns an empty array.\ndrop([1, 2, 3], 5);\n// Returns: []\n```\n\nIf you pass a negative number or 0, it returns a new array with the same elements as the original.\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\ndrop([1, 2, 3], 0); // [1, 2, 3]\ndrop([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to remove elements from.\n- `itemsCount` (`number`): The number of elements to remove from the beginning of the array.\n\n#### Returns\n\n(`T[]`): A new array with the specified number of elements removed from the beginning.\n"
  },
  {
    "path": "docs/reference/array/dropRight.md",
    "content": "# dropRight\n\nReturns a new array with the specified number of elements removed from the end.\n\n```typescript\nconst dropped = dropRight(arr, itemsCount);\n```\n\n## Usage\n\n### `dropRight(arr, itemsCount)`\n\nUse `dropRight` when you want to remove some elements from the end of an array. It removes the specified number of elements from the end and returns a new array with the remaining elements.\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\n// Remove the last 2 elements from the array.\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// If the count is greater than the array length, it returns an empty array.\ndropRight([1, 2, 3], 5);\n// Returns: []\n```\n\nIf you pass a negative number or 0, it returns a new array with the same elements as the original.\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\ndropRight([1, 2, 3], 0); // [1, 2, 3]\ndropRight([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to remove elements from.\n- `itemsCount` (`number`): The number of elements to remove from the end of the array.\n\n#### Returns\n\n(`T[]`): A new array with the specified number of elements removed from the end.\n"
  },
  {
    "path": "docs/reference/array/dropRightWhile.md",
    "content": "# dropRightWhile\n\nReturns a new array with elements removed from the end while a condition is satisfied.\n\n```typescript\nconst result = dropRightWhile(arr, canContinueDropping);\n```\n\n## Usage\n\n### `dropRightWhile(arr, canContinueDropping)`\n\nUse `dropRightWhile` when you want to remove elements from the end of an array that meet a specific condition. Starting from the end of the array, it removes elements while the condition function returns `true`, and stops when it returns `false`.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\n// Remove elements greater than 3 from the end.\nconst numbers = [1, 2, 3, 4, 5];\ndropRightWhile(numbers, x => x > 3);\n// Returns: [1, 2, 3]\n// 4 and 5 satisfy the condition and are removed, stopping at 3 where the condition becomes false.\n\n// Remove elements matching a specific condition from an object array.\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: false },\n  { name: 'David', active: false },\n];\ndropRightWhile(users, user => !user.active);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Bob', active: true }]\n```\n\nIf the array is empty or no elements satisfy the condition, it returns a new array same as the original.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\ndropRightWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropRightWhile([], x => true); // []\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to remove elements from.\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): The condition function that determines whether to continue removing elements. It receives each element, its index, and the entire array, and returns true or false.\n\n#### Returns\n\n(`T[]`): A new array containing elements from the first element that doesn't satisfy the condition to the beginning of the array.\n"
  },
  {
    "path": "docs/reference/array/dropWhile.md",
    "content": "# dropWhile\n\nReturns a new array with elements removed from the beginning while a condition is satisfied.\n\n```typescript\nconst result = dropWhile(arr, canContinueDropping);\n```\n\n## Usage\n\n### `dropWhile(arr, canContinueDropping)`\n\nUse `dropWhile` when you want to remove elements from the beginning of an array that meet a specific condition. Starting from the beginning of the array, it removes elements while the condition function returns `true`, and stops when it returns `false`.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\n// Remove elements less than 3 from the beginning.\nconst numbers = [1, 2, 3, 4, 2, 5];\ndropWhile(numbers, x => x < 3);\n// Returns: [3, 4, 2, 5]\n// 1 and 2 satisfy the condition and are removed, stopping at 3 where the condition becomes false.\n\n// Remove elements matching a specific condition from an object array.\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n  { name: 'David', active: true },\n];\ndropWhile(users, user => !user.active);\n// Returns: [{ name: 'Charlie', active: true }, { name: 'David', active: true }]\n```\n\nIf the array is empty or no elements satisfy the condition, it returns a new array same as the original.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\ndropWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropWhile([], x => true); // []\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to remove elements from.\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): The condition function that determines whether to continue removing elements. It receives each element, its index, and the entire array, and returns true or false.\n\n#### Returns\n\n(`T[]`): A new array containing elements from the first element that doesn't satisfy the condition to the end of the array.\n"
  },
  {
    "path": "docs/reference/array/fill.md",
    "content": "# fill\n\nFills array elements with a specified value. Modifies the original array directly.\n\n```typescript\nconst filled = fill(arr, value, start, end);\n```\n\n::: info If you don't want to modify the original array, use [`toFilled`](./toFilled.md).\n\n`toFilled` returns a new array instead of modifying the original.\n\n:::\n\n## Usage\n\n### `fill(arr, value, start?, end?)`\n\nUse `fill` when you want to fill a specific range of an array with a specified value. It replaces elements from the start position to just before the end position with the provided value. If you don't specify start or end positions, it fills the entire array.\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\n// Fill the entire array with 'a'.\nconst array1 = [1, 2, 3];\nfill(array1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// Fill an empty array with 2.\nconst array2 = Array(3);\nfill(array2, 2);\n// Returns: [2, 2, 2]\n\n// Fill from index 1 to just before 3 with '*'.\nconst array3 = [4, 6, 8, 10];\nfill(array3, '*', 1, 3);\n// Returns: [4, '*', '*', 10]\n```\n\nYou can also use negative indices. Negative indices count from the end of the array.\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nfill(array, '*', -2, -1);\n// Returns: [1, '*', 3]\n```\n\n#### Parameters\n\n- `arr` (`Array<T | U>`): The array to fill.\n- `value` (`U`): The value to fill the array with.\n- `start` (`number`, optional): The start position. Default is `0`.\n- `end` (`number`, optional): The end position. Default is the array length.\n\n#### Returns\n\n(`Array<T | U>`): Returns the original array filled with values.\n"
  },
  {
    "path": "docs/reference/array/filterAsync.md",
    "content": "# filterAsync\n\nFilters an array using an async predicate function and returns a new array containing only the elements that satisfy the condition.\n\n```typescript\nconst filtered = await filterAsync(array, predicate);\n```\n\n## Reference\n\n### `filterAsync(array, predicate, options?)`\n\nUse `filterAsync` to filter an array with async operations like API calls or database queries. Unlike regular `filter`, it supports async predicate functions and allows you to limit concurrency with the `concurrency` option.\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// Filter for active users by checking their status via API.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst activeUsers = await filterAsync(users, async user => {\n  return await checkUserStatus(user.id);\n});\n// Returns: Array containing only active users\n\n// Limit concurrency to reduce server load.\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = await filterAsync(numbers, async n => await isEvenAsync(n), { concurrency: 2 });\n// Only 2 operations run concurrently at most.\n```\n\nThe `concurrency` option helps limit external API calls or manage system resources efficiently. If not specified, all operations run concurrently.\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// Execute at most 3 API calls concurrently.\nconst items = await filterAsync(largeArray, async item => await validateItem(item), { concurrency: 3 });\n```\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to filter.\n- `predicate` (`(item: T, index: number, array: readonly T[]) => Promise<boolean>`): An async function that tests each element. If it returns a truthy value, the element is included in the result.\n- `options` (`FilterAsyncOptions`, optional): Options to control concurrency.\n  - `concurrency` (`number`, optional): Maximum number of concurrent operations. If not specified, all operations run concurrently.\n\n#### Returns\n\n(`Promise<T[]>`): A promise that resolves to a new array containing only the elements for which the predicate function returned a truthy value.\n"
  },
  {
    "path": "docs/reference/array/flatMap.md",
    "content": "# flatMap\n\nTransforms each element of an array with a function's return value, then flattens to a specified depth and returns a new array.\n\n```typescript\nconst result = flatMap(arr, iteratee, depth);\n```\n\n## Usage\n\n### `flatMap(arr, iteratee, depth = 1)`\n\nUse `flatMap` when you want to transform and flatten an array simultaneously. First, it applies a function to each element, then flattens the resulting array to the specified depth.\n\nIt works identically to calling [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) from JavaScript with [Array#map](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/map) as `map(iteratee).flat(depth)`, but it's faster.\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\n// Duplicate each element twice in a number array.\nconst arr = [1, 2, 3];\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// Flatten with depth 2.\nflatMap(arr, item => [[item, item]], 2);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\nYou can flatten to various depths.\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\nconst arr = [1, 2, 3];\n\n// Flatten with default depth 1.\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// Flatten with depth 3.\nflatMap(arr, item => [[[item, item]]], 3);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to transform.\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): The function that transforms each array element. It receives the element, its index, and the array.\n- `depth` (`D`, optional): The depth to flatten. Default is `1`.\n\n#### Returns\n\n(`Array<FlatArray<U[], D>>`): Returns a new array where each element is transformed and flattened to the specified depth.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst arr = [1, 2, 3];\nflatMap(arr, (item, index) => [item + index]);\n// Returns: [1, 3, 5]\n\n// Using array parameter\nflatMap(arr, (item, _index, array) => [item * array.length]);\n// Returns: [3, 6, 9]\n```\n"
  },
  {
    "path": "docs/reference/array/flatMapAsync.md",
    "content": "# flatMapAsync\n\nTransforms each element in an array using an async function and flattens the result by one level to return a new array.\n\n```typescript\nconst result = await flatMapAsync(array, callback);\n```\n\n## Reference\n\n### `flatMapAsync(array, callback, options?)`\n\nUse `flatMapAsync` when performing async transformations where each element returns multiple values. It's equivalent to calling `mapAsync` followed by `flat()`, but more efficient.\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// Fetch posts for each user and combine into a single array.\nconst users = [{ id: 1 }, { id: 2 }];\nconst allPosts = await flatMapAsync(users, async user => {\n  return await fetchUserPosts(user.id);\n});\n// Returns: [post1, post2, post3, ...] (all users' posts in a single array)\n\n// Limit concurrency.\nconst numbers = [1, 2, 3];\nconst results = await flatMapAsync(numbers, async n => await fetchRelatedItems(n), { concurrency: 2 });\n// Only 2 operations run concurrently at most.\n```\n\nEach callback function must return an array, and all returned arrays are merged into a single array. The `concurrency` option allows you to limit concurrent executions to manage server load.\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// Fetch product lists for each category and combine into a single array.\nconst categories = ['electronics', 'books', 'clothing'];\nconst products = await flatMapAsync(categories, async category => await fetchProducts(category), { concurrency: 2 });\n// Returns: A single array containing products from all categories\n```\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to transform.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R[]>`): An async function that transforms each element into an array.\n- `options` (`FlatMapAsyncOptions`, optional): Options to control concurrency.\n  - `concurrency` (`number`, optional): Maximum number of concurrent operations. If not specified, all operations run concurrently.\n\n#### Returns\n\n(`Promise<R[]>`): A promise that resolves to an array of transformed values flattened by one level.\n"
  },
  {
    "path": "docs/reference/array/flatMapDeep.md",
    "content": "# flatMapDeep\n\nTransforms each element of an array with a function's return value, then flattens all depths and returns a new array.\n\n```typescript\nconst result = flatMapDeep(arr, iteratee);\n```\n\n## Usage\n\n### `flatMapDeep(arr, iteratee)`\n\nUse `flatMapDeep` when you want to transform an array while completely flattening all nested arrays. First, it applies a function to each element, then flattens the resulting array to all depths.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// Duplicate each element twice and flatten completely.\nconst result1 = flatMapDeep([1, 2, 3], item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\nIt flattens all depths no matter how deeply nested.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// Flatten nested arrays completely.\nconst result = flatMapDeep([1, 2, 3], item => [[item, item]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// Flatten multiple levels of nesting.\nconst result2 = flatMapDeep([1, 2, 3], item => [[[item, item]]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to transform.\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): The function that transforms each array element. It receives the element, its index, and the array.\n\n#### Returns\n\n(`Array<ExtractNestedArrayType<U>>`): Returns a new array where each element is transformed and all depths are flattened.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst arr = [1, 2, 3];\nflatMapDeep(arr, (item, index) => [[item + index]]);\n// Returns: [1, 3, 5]\n\n// Using array parameter\nflatMapDeep(arr, (item, _index, array) => [[item * array.length]]);\n// Returns: [3, 6, 9]\n```\n"
  },
  {
    "path": "docs/reference/array/flatten.md",
    "content": "# flatten\n\nReturns a new array that is flattened to the specified depth.\n\n```typescript\nconst result = flatten(arr, depth);\n```\n\n## Usage\n\n### `flatten(arr, depth = 1)`\n\nUse `flatten` when you want to flatten a nested array to a specific depth. It unwinds arrays within arrays to the specified level, creating a flatter structure.\n\nIt works identically to the [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) included in the JavaScript language, but it's faster.\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\n// Flatten with default depth of 1\nconst array = [1, [2, 3], [4, [5, 6]]];\nflatten(array);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// Flatten with depth of 2\nflatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\nYou can control the depth to flatten only to the desired level.\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\nconst array = [1, [2, 3], [4, [5, 6]]];\n\n// Flatten with depth of 1 (default)\nconst result1 = flatten(array, 1);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// Flatten with depth of 2\nconst result2 = flatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The nested array to flatten.\n- `depth` (`D`, optional): The depth to flatten. Defaults to `1`.\n\n#### Returns\n\n(`Array<FlatArray<T[], D>>`): Returns a new array flattened to the specified depth.\n"
  },
  {
    "path": "docs/reference/array/flattenDeep.md",
    "content": "# flattenDeep\n\nReturns a new array with all depths of a nested array flattened.\n\n```typescript\nconst result = flattenDeep(arr);\n```\n\n## Usage\n\n### `flattenDeep(arr)`\n\nUse `flattenDeep` when you want to completely flatten a nested array, no matter how deeply nested it is. It unwinds all nested arrays within the array, creating a single flat structure.\n\nIt works identically to calling [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) as `flat(Infinity)` in the JavaScript language, but it's faster.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\n// Flatten all nested levels\nconst array = [1, [2, [3]], [4, [5, 6]]];\nconst result = flattenDeep(array);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\nIt completely flattens even highly complex nested structures.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\nconst complexArray = [1, [2, [3, [4, [5]]]], 6];\nconst result = flattenDeep(complexArray);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The nested array to flatten.\n\n#### Returns\n\n(`Array<ExtractNestedArrayType<T>>`): Returns a new array with all depths flattened.\n"
  },
  {
    "path": "docs/reference/array/forEachAsync.md",
    "content": "# forEachAsync\n\nExecutes an async function for each element in an array.\n\n```typescript\nawait forEachAsync(array, callback);\n```\n\n## Reference\n\n### `forEachAsync(array, callback, options?)`\n\nUse `forEachAsync` to perform async operations with side effects for each element in an array. Unlike regular `forEach`, it returns a promise that resolves when all async operations complete.\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// Update all user information.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nawait forEachAsync(users, async user => {\n  await updateUser(user.id);\n});\n// All user updates completed.\n\n// Limit concurrency.\nconst items = [1, 2, 3, 4, 5];\nawait forEachAsync(items, async item => await processItem(item), { concurrency: 2 });\n// Only 2 items are processed concurrently at most.\n```\n\nThe `concurrency` option allows you to limit concurrent executions to control load on servers or databases. It's useful for operations that don't return values, like logging, file uploads, or database updates.\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// Upload files sequentially.\nconst files = ['file1.txt', 'file2.txt', 'file3.txt'];\nawait forEachAsync(files, async file => await uploadFile(file), { concurrency: 1 });\n// Only one file is uploaded at a time.\n```\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to iterate over.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<void>`): An async function to execute for each element.\n- `options` (`ForEachAsyncOptions`, optional): Options to control concurrency.\n  - `concurrency` (`number`, optional): Maximum number of concurrent operations. If not specified, all operations run concurrently.\n\n#### Returns\n\n(`Promise<void>`): A promise that resolves when all operations complete.\n"
  },
  {
    "path": "docs/reference/array/forEachRight.md",
    "content": "# forEachRight\n\nIterates over the elements of an array from right to left, executing a function for each element.\n\n```typescript\nforEachRight(arr, callback);\n```\n\n## Usage\n\n### `forEachRight(arr, callback)`\n\nUse `forEachRight` when you want to traverse an array in reverse order and perform an operation on each element. It calls the callback function sequentially from the last element to the first element of the array. This is useful when you need reverse processing or when you need to work from the end of the array.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nconst result: number[] = [];\n\n// Use the forEachRight function to traverse the array in reverse order\nforEachRight(array, value => {\n  result.push(value);\n});\n\nconsole.log(result); // [3, 2, 1]\n```\n\nThe callback function receives three parameters.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = ['a', 'b', 'c'];\nforEachRight(array, (value, index, arr) => {\n  console.log(`Value: ${value}, Index: ${index}, Array:`, arr);\n});\n// Output:\n// Value: c, Index: 2, Array: ['a', 'b', 'c']\n// Value: b, Index: 1, Array: ['a', 'b', 'c']\n// Value: a, Index: 0, Array: ['a', 'b', 'c']\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to iterate over.\n- `callback` (`(value: T, index: number, arr: T[]) => void`): The function to be executed for each element.\n  - `value`: The current array element being processed.\n  - `index`: The index of the current element being processed.\n  - `arr`: The array that the `forEachRight` function was called upon.\n"
  },
  {
    "path": "docs/reference/array/groupBy.md",
    "content": "# groupBy\n\nReturns a new object with array elements grouped according to a key-generating function.\n\n```typescript\nconst grouped = groupBy(arr, getKeyFromItem);\n```\n\n## Usage\n\n### `groupBy(arr, getKeyFromItem)`\n\nUse `groupBy` when you want to classify array elements based on specific criteria. Provide a function that generates a key from each element, and it groups elements with the same key together and returns them as an object. The values in the returned object are arrays of elements belonging to each group. This is useful for organizing data by category or performing group-based analysis.\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// Group an array of objects by category\nconst items = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\nconst result = groupBy(items, item => item.category);\n// Result:\n// {\n//   fruit: [\n//     { category: 'fruit', name: 'apple' },\n//     { category: 'fruit', name: 'banana' }\n//   ],\n//   vegetable: [\n//     { category: 'vegetable', name: 'carrot' }\n//   ]\n// }\n```\n\nYou can group by various criteria.\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// Group by string length\nconst words = ['one', 'two', 'three', 'four', 'five'];\nconst byLength = groupBy(words, word => word.length);\n// Result: { 3: ['one', 'two'], 4: ['four', 'five'], 5: ['three'] }\n\n// Group by even/odd\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst byParity = groupBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// Result: { odd: [1, 3, 5], even: [2, 4, 6] }\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to group.\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): A function that generates a key from each element, its index, and the array.\n\n#### Returns\n\n(`Record<K, T[]>`): Returns an object with elements grouped by key.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst items = ['a', 'b', 'c', 'd'];\nconst result = groupBy(items, (item, index) => (index % 2 === 0 ? 'even' : 'odd'));\n// Result: { even: ['a', 'c'], odd: ['b', 'd'] }\n\n// Using array parameter\nconst numbers = [1, 2, 3, 4];\nconst result2 = groupBy(numbers, (item, index, arr) => (item < arr.length / 2 ? 'small' : 'large'));\n// Result: { small: [1], large: [2, 3, 4] }\n```\n"
  },
  {
    "path": "docs/reference/array/head.md",
    "content": "# head\n\nReturns the first element of an array.\n\n```typescript\nconst firstElement = head(arr);\n```\n\n## Usage\n\n### `head(arr)`\n\nUse `head` when you want to get the first element of an array. If the array is empty, it returns `undefined`. This is useful when accessing data at the beginning of an array.\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// Get the first element of a number array\nconst numbers = [1, 2, 3, 4, 5];\nhead(numbers);\n// Returns: 1\n\n// Get the first element of a string array\nconst strings = ['a', 'b', 'c'];\nhead(strings);\n// Returns: 'a'\n\n// Empty array returns undefined\nconst emptyArray: number[] = [];\nhead(emptyArray);\n// Returns: undefined\n```\n\nType handling is safe.\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// For non-empty arrays, the type is certain\nconst nonEmptyArray = [1, 2, 3] as const;\nhead(nonEmptyArray);\n// Returns: 1 (type: 1)\n\n// For regular arrays, undefined is possible\nconst maybeEmptyArray = [1, 2, 3];\nhead(maybeEmptyArray);\n// Returns: 1 | undefined (type: number | undefined)\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to get the first element.\n\n#### Returns\n\n(`T | undefined`): The first element of the array. Returns `undefined` if the array is empty.\n"
  },
  {
    "path": "docs/reference/array/initial.md",
    "content": "# initial\n\nReturns a new array containing all elements except the last one.\n\n```typescript\nconst result = initial(arr);\n```\n\n## Usage\n\n### `initial(arr)`\n\nUse `initial` when you want to get all elements except the last one from an array. If the array is empty or has only one element, it returns an empty array. This is useful when processing while excluding the end of the array.\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// Exclude the last element from a number array\nconst numbers = [1, 2, 3, 4, 5];\ninitial(numbers);\n// Returns: [1, 2, 3, 4]\n\n// Exclude the last element from a string array\nconst strings = ['a', 'b', 'c'];\ninitial(strings);\n// Returns: ['a', 'b']\n\n// An array with only one element returns an empty array\nconst single = [42];\ninitial(single);\n// Returns: []\n```\n\nIt safely handles empty arrays and special cases.\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// An empty array returns an empty array\nconst empty: number[] = [];\ninitial(empty);\n// Returns: []\n\n// It can also handle nested arrays\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ninitial(nested);\n// Returns: [[1, 2], [3, 4]]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to exclude the last element.\n\n#### Returns\n\n(`T[]`): Returns a new array excluding the last element. If the input array is empty or has only one element, it returns an empty array.\n"
  },
  {
    "path": "docs/reference/array/intersection.md",
    "content": "# intersection\n\nReturns a new array containing elements that are commonly included in both arrays.\n\n```typescript\nconst result = intersection(firstArr, secondArr);\n```\n\n## Usage\n\n### `intersection(firstArr, secondArr)`\n\nUse `intersection` when you want to find only common elements in two arrays. It returns a new array containing only elements from the first array that also exist in the second array. This is useful for finding the intersection of two data sets.\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// Find the intersection of number arrays\nconst numbers1 = [1, 2, 3, 4, 5];\nconst numbers2 = [3, 4, 5, 6, 7];\nintersection(numbers1, numbers2);\n// Returns: [3, 4, 5]\n\n// Find the intersection of string arrays\nconst strings1 = ['apple', 'banana', 'cherry'];\nconst strings2 = ['banana', 'cherry', 'date'];\nintersection(strings1, strings2);\n// Returns: ['banana', 'cherry']\n```\n\nIt also handles cases with no intersection or special cases.\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// Returns an empty array when there's no intersection\nconst noCommon1 = [1, 2, 3];\nconst noCommon2 = [4, 5, 6];\nintersection(noCommon1, noCommon2);\n// Returns: []\n\n// Also returns an empty array when one side is empty\nconst numbers = [1, 2, 3];\nconst empty: number[] = [];\nintersection(numbers, empty);\n// Returns: []\n```\n\n#### Parameters\n\n- `firstArr` (`readonly T[]`): The first array to compare.\n- `secondArr` (`readonly T[]`): The second array to compare.\n\n#### Returns\n\n(`T[]`): Returns a new array containing elements commonly included in both arrays.\n"
  },
  {
    "path": "docs/reference/array/intersectionBy.md",
    "content": "# intersectionBy\n\nReturns a new array containing the intersection of two arrays based on the result of a transformation function.\n\n```typescript\nconst result = intersectionBy(firstArr, secondArr, mapper);\n```\n\n## Usage\n\n### `intersectionBy(firstArr, secondArr, mapper)`\n\nUse `intersectionBy` when you want to find common elements in two arrays based on a specific attribute or transformed value. It compares the results of processing each element with a transformation function to find the intersection. This is useful when comparing by a specific property in object arrays or when complex transformation logic is needed.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// Find intersection based on object's id property\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 4, name: 'alice' },\n];\nintersectionBy(users1, users2, user => user.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// Can also compare arrays of different types\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3, 4];\nintersectionBy(objects, ids, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\nComplex transformation logic can also be applied.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// Compare strings after converting to lowercase\nconst words1 = ['Apple', 'Banana', 'Cherry'];\nconst words2 = ['apple', 'DATE', 'elderberry'];\nintersectionBy(words1, words2, word => word.toLowerCase());\n// Returns: ['Apple']\n\n// Compare numbers after converting to absolute value\nconst numbers1 = [1, -2, 3, -4];\nconst numbers2 = [2, -3, 4, 5];\nintersectionBy(numbers1, numbers2, num => Math.abs(num));\n// Returns: [-2, 3, -4]\n```\n\n#### Parameters\n\n- `firstArr` (`readonly T[]`): The first array to compare.\n- `secondArr` (`readonly U[]`): The second array to compare.\n- `mapper` (`(item: T | U) => unknown`): A function that transforms each element to create comparison criteria.\n\n#### Returns\n\n(`T[]`): Returns a new array containing elements commonly included in both arrays based on the result of the transformation function. The result consists of elements from the first array.\n"
  },
  {
    "path": "docs/reference/array/intersectionWith.md",
    "content": "# intersectionWith\n\nReturns a new array containing the intersection of two arrays based on a custom comparison function.\n\n```typescript\nconst result = intersectionWith(firstArr, secondArr, areItemsEqual);\n```\n\n## Usage\n\n### `intersectionWith(firstArr, secondArr, areItemsEqual)`\n\nUse `intersectionWith` when you want to find common elements in two arrays using a user-defined comparison function. This is useful for complex objects that are difficult to handle with simple value comparisons or when special comparison logic is needed.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// Compare by object's id property\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nintersectionWith(users1, users2, (a, b) => a.id === b.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// Can also compare different types\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3];\nintersectionWith(objects, ids, (obj, id) => obj.id === id);\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\nComplex comparison logic can also be implemented.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// Case-insensitive string comparison\nconst words1 = ['Apple', 'Banana'];\nconst words2 = ['apple', 'cherry'];\nintersectionWith(words1, words2, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Apple']\n\n// Number comparison within a range\nconst numbers1 = [1.1, 2.3, 3.7];\nconst numbers2 = [1.0, 2.5, 4.0];\nintersectionWith(numbers1, numbers2, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: [1.1] (difference between 1.1 and 1.0 is less than 0.5)\n```\n\n#### Parameters\n\n- `firstArr` (`readonly T[]`): The first array to compare.\n- `secondArr` (`readonly U[]`): The second array to compare.\n- `areItemsEqual` (`(x: T, y: U) => boolean`): A function to determine if two elements are equal. Should return `true` if equal, `false` otherwise.\n\n#### Returns\n\n(`T[]`): Returns a new array containing elements commonly included in both arrays based on the custom comparison function. The result consists of elements from the first array.\n"
  },
  {
    "path": "docs/reference/array/isSubset.md",
    "content": "# isSubset\n\nChecks if one array is a subset of another array.\n\n```typescript\nconst result = isSubset(superset, subset);\n```\n\n## Usage\n\n### `isSubset(superset, subset)`\n\nUse `isSubset` when you want to check if all elements of one array are contained in another array. This is useful for verifying subset relationships or checking if permissions, features, tags, etc., are within the allowed range.\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// Check subset in number arrays\nconst numbers = [1, 2, 3, 4, 5];\nconst subset = [2, 3, 4];\nisSubset(numbers, subset);\n// Returns: true\n\n// Check subset in string arrays\nconst permissions = ['read', 'write', 'delete', 'admin'];\nconst userPermissions = ['read', 'write'];\nisSubset(permissions, userPermissions);\n// Returns: true\n\n// When it's not a subset\nconst colors = ['red', 'blue', 'green'];\nconst invalidColors = ['red', 'yellow'];\nisSubset(colors, invalidColors);\n// Returns: false\n```\n\nSpecial cases are also handled correctly.\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// An empty array is always a subset\nconst anyArray = [1, 2, 3];\nconst emptyArray: number[] = [];\nisSubset(anyArray, emptyArray);\n// Returns: true\n\n// The same array is a subset of itself\nconst same = ['a', 'b', 'c'];\nisSubset(same, same);\n// Returns: true\n\n// Works correctly even with duplicate elements\nconst withDuplicates = [1, 2, 2, 3];\nconst duplicateSubset = [2, 2];\nisSubset(withDuplicates, duplicateSubset);\n// Returns: true\n```\n\n#### Parameters\n\n- `superset` (`readonly T[]`): The superset array that may contain all elements of the subset.\n- `subset` (`readonly T[]`): The subset array to check if it's contained in the superset.\n\n#### Returns\n\n(`boolean`): Returns `true` if all elements of the subset are contained in the superset, otherwise returns `false`.\n"
  },
  {
    "path": "docs/reference/array/isSubsetWith.md",
    "content": "# isSubsetWith\n\nChecks if one array is a subset of another array based on a custom comparison function.\n\n```typescript\nconst result = isSubsetWith(superset, subset, areItemsEqual);\n```\n\n## Usage\n\n### `isSubsetWith(superset, subset, areItemsEqual)`\n\nUse `isSubsetWith` when you want to verify a subset relationship using a user-defined comparison function. This is useful when comparing objects or when special comparison logic is needed.\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// Check subset by object's id\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst targetUsers = [\n  { id: 2, name: 'jane' },\n  { id: 1, name: 'john' },\n];\nisSubsetWith(users, targetUsers, (a, b) => a.id === b.id);\n// Returns: true\n\n// When it's not a subset\nconst allUsers = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst someUsers = [{ id: 3, name: 'bob' }];\nisSubsetWith(allUsers, someUsers, (a, b) => a.id === b.id);\n// Returns: false\n```\n\nComplex comparison logic can also be used.\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// Case-insensitive string comparison\nconst validNames = ['Alice', 'Bob', 'Charlie'];\nconst userNames = ['alice', 'BOB'];\nisSubsetWith(validNames, userNames, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: true\n\n// Number comparison within a range\nconst validRanges = [1, 2, 3, 4, 5];\nconst testNumbers = [1.1, 2.8];\nisSubsetWith(validRanges, testNumbers, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: true (1.1 is close enough to 1, 2.8 is close enough to 3)\n```\n\n#### Parameters\n\n- `superset` (`readonly T[]`): The superset array that may contain all elements of the subset.\n- `subset` (`readonly T[]`): The subset array to check if it's contained in the superset.\n- `areItemsEqual` (`(x: T, y: T) => boolean`): A function to determine if two elements are equal. Should return `true` if equal, `false` otherwise.\n\n#### Returns\n\n(`boolean`): Based on the custom comparison function, returns `true` if all elements of the subset are contained in the superset, otherwise returns `false`.\n"
  },
  {
    "path": "docs/reference/array/keyBy.md",
    "content": "# keyBy\n\nReturns a new object with array elements converted to key-value pairs using a key-generating function.\n\n```typescript\nconst result = keyBy(arr, getKeyFromItem);\n```\n\n## Usage\n\n### `keyBy(arr, getKeyFromItem)`\n\nUse `keyBy` when you want to create a key-indexed object for quick lookup of each element in an array. By providing a function that generates a unique key from each element, it creates an object where you can access elements using that key. If multiple elements generate the same key, the last element is used.\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// Use object's id property as key\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nkeyBy(users, user => user.id);\n// Returns: {\n//   1: { id: 1, name: 'john' },\n//   2: { id: 2, name: 'jane' },\n//   3: { id: 3, name: 'bob' }\n// }\n\n// Use string property as key\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\nkeyBy(products, item => item.category);\n// Returns: {\n//   fruit: { category: 'fruit', name: 'banana' }, // Last fruit element\n//   vegetable: { category: 'vegetable', name: 'carrot' }\n// }\n```\n\nComplex key generation logic can also be used.\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// Combine multiple properties to create a key\nconst orders = [\n  { date: '2023-01-01', customerId: 1, amount: 100 },\n  { date: '2023-01-01', customerId: 2, amount: 200 },\n  { date: '2023-01-02', customerId: 1, amount: 150 },\n];\nkeyBy(orders, order => `${order.date}-${order.customerId}`);\n// Returns: {\n//   '2023-01-01-1': { date: '2023-01-01', customerId: 1, amount: 100 },\n//   '2023-01-01-2': { date: '2023-01-01', customerId: 2, amount: 200 },\n//   '2023-01-02-1': { date: '2023-01-02', customerId: 1, amount: 150 }\n// }\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array to convert to an object.\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): A function that generates a key from each element, its index, and the array.\n\n#### Returns\n\n(`Record<K, T>`): Returns an object with the generated keys as property names and the corresponding elements as values. If multiple elements generate the same key, the last element is used as the value.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst items = ['a', 'b', 'c'];\nconst result = keyBy(items, (item, index) => index);\n// Returns: { 0: 'a', 1: 'b', 2: 'c' }\n\n// Using array parameter\nconst numbers = [10, 20, 30];\nconst result2 = keyBy(numbers, (item, index, arr) => (item > arr[0] ? 'large' : 'small'));\n// Returns: { small: 10, large: 30 }\n```\n"
  },
  {
    "path": "docs/reference/array/last.md",
    "content": "# last\n\nReturns the last element of an array.\n\n```typescript\nconst lastElement = last(arr);\n```\n\n## Usage\n\n### `last(arr)`\n\nUse `last` when you want to get the last element of an array. If the array is empty, it returns `undefined`. This is useful when accessing data at the end of an array.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// Get the last element of a number array\nconst numbers = [1, 2, 3, 4, 5];\nlast(numbers);\n// Returns: 5\n\n// Get the last element of a string array\nconst strings = ['a', 'b', 'c'];\nlast(strings);\n// Returns: 'c'\n\n// Empty array returns undefined\nconst emptyArray: number[] = [];\nlast(emptyArray);\n// Returns: undefined\n```\n\nType handling is safe.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// For non-empty arrays, the type is certain\nconst nonEmptyArray = [1, 2, 3] as const;\nlast(nonEmptyArray);\n// Returns: 3 (type: 3)\n\n// For regular arrays, undefined is possible\nconst maybeEmptyArray = [1, 2, 3];\nlast(maybeEmptyArray);\n// Returns: 3 | undefined (type: number | undefined)\n```\n\nIt works efficiently even with large arrays.\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// Performance optimized\nconst largeArray = Array(1000000)\n  .fill(0)\n  .map((_, i) => i);\nlast(largeArray);\n// Returns: 999999 (fast access)\n\n// It can also handle nested arrays\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nlast(nested);\n// Returns: [5, 6]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to get the last element.\n\n#### Returns\n\n(`T | undefined`): The last element of the array. Returns `undefined` if the array is empty.\n"
  },
  {
    "path": "docs/reference/array/limitAsync.md",
    "content": "# limitAsync\n\nCreates a new function that limits the maximum number of concurrent executions of an async function.\n\n```typescript\nconst limitedFunc = limitAsync(asyncFunc, concurrency);\n```\n\n## Reference\n\n### `limitAsync(callback, concurrency)`\n\nUse `limitAsync` when you want to limit the number of concurrent executions of an async function that gets called multiple times. Only the specified number of executions run concurrently, and additional calls wait until running operations complete.\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// Limit to at most 3 concurrent requests.\nconst limitedFetch = limitAsync(async url => {\n  return await fetch(url);\n}, 3);\n\nconst urls = ['url1', 'url2', 'url3', 'url4', 'url5'];\nawait Promise.all(urls.map(url => limitedFetch(url)));\n// The first 3 execute first, then the rest execute as they complete.\n```\n\nIt's useful for controlling load on resource-intensive operations like external API calls or database queries. It's especially effective when working with rate-limited APIs or managing server load.\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// Process heavy computations at most 2 at a time.\nconst processItem = async item => {\n  return await heavyComputation(item);\n};\n\nconst limitedProcess = limitAsync(processItem, 2);\nconst items = [1, 2, 3, 4, 5];\nawait Promise.all(items.map(item => limitedProcess(item)));\n// Only 2 items are processed concurrently at most.\n```\n\n#### Parameters\n\n- `callback` (`F extends (...args: any[]) => Promise<any>`): The async function to limit concurrent executions for.\n- `concurrency` (`number`): Maximum number of concurrent operations.\n\n#### Returns\n\n(`F`): A new function with concurrency limiting applied. It has the same interface as the original function.\n"
  },
  {
    "path": "docs/reference/array/mapAsync.md",
    "content": "# mapAsync\n\nTransforms each element in an array using an async function and returns a new array.\n\n```typescript\nconst transformed = await mapAsync(array, callback);\n```\n\n## Reference\n\n### `mapAsync(array, callback, options?)`\n\nUse `mapAsync` to perform async transformation operations for each element in an array. It's useful when you need to process each element asynchronously, such as API calls or database queries.\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// Fetch detailed information for each user.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userDetails = await mapAsync(users, async user => {\n  return await fetchUserDetails(user.id);\n});\n// Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]\n\n// Limit concurrency.\nconst numbers = [1, 2, 3, 4, 5];\nconst results = await mapAsync(numbers, async n => await slowOperation(n), { concurrency: 2 });\n// Only 2 operations run concurrently at most.\n```\n\nThe `concurrency` option allows you to limit concurrent executions to control server load or respect API rate limits. If not specified, all operations run concurrently.\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// Transform a large number of images, limiting concurrent processing to consider server load.\nconst imageUrls = [...]; // Many image URLs\nconst processedImages = await mapAsync(\n  imageUrls,\n  async (url) => await processImage(url),\n  { concurrency: 5 }\n);\n// Only 5 images are processed at a time at most.\n```\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to transform.\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R>`): An async function that transforms each element.\n- `options` (`MapAsyncOptions`, optional): Options to control concurrency.\n  - `concurrency` (`number`, optional): Maximum number of concurrent operations. If not specified, all operations run concurrently.\n\n#### Returns\n\n(`Promise<R[]>`): A promise that resolves to a new array of transformed values.\n"
  },
  {
    "path": "docs/reference/array/maxBy.md",
    "content": "# maxBy\n\nReturns the element with the maximum value from the array based on the value returned by the transformation function.\n\n```typescript\nconst max = maxBy(items, getValue);\n```\n\n## Usage\n\n### `maxBy(items, getValue)`\n\nUse `maxBy` when you want to transform elements in an array to numeric values using a transformation function and find the original element with the largest value. It returns `undefined` for an empty array.\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\n// Find the element with the maximum value for a specific property in an object array.\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nmaxBy(people, person => person.age);\n// Returns: { name: 'john', age: 30 }\n\n// Find the element with the largest absolute value in a number array.\nconst numbers = [-10, -5, 0, 5, 15];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: 15\n```\n\nIt returns `undefined` for an empty array.\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\nmaxBy([], x => x.value); // undefined\n```\n\n#### Parameters\n\n- `items` (`T[]`): The array to find the element with the maximum value.\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): A function that transforms each element into a number. It receives the element, its index, and the array.\n\n#### Returns\n\n(`T | undefined`): The element with the largest value returned by the transformation function. Returns `undefined` if the array is empty.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst items = [{ value: 10 }, { value: 20 }, { value: 15 }];\nmaxBy(items, (item, index) => item.value + index);\n// Returns: { value: 20 }\n\n// Using array parameter\nmaxBy(items, (item, _index, array) => item.value * array.length);\n// Returns: { value: 20 }\n```\n"
  },
  {
    "path": "docs/reference/array/minBy.md",
    "content": "# minBy\n\nReturns the element with the minimum value from the array based on the value returned by the transformation function.\n\n```typescript\nconst min = minBy(items, getValue);\n```\n\n## Usage\n\n### `minBy(items, getValue)`\n\nUse `minBy` when you want to transform elements in an array to numeric values using a transformation function and find the original element with the smallest value. It returns `undefined` for an empty array.\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\n// Find the element with the minimum value for a specific property in an object array.\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nminBy(people, person => person.age);\n// Returns: { name: 'joe', age: 26 }\n\n// Find the element with the smallest absolute value in a number array.\nconst numbers = [-10, -5, 0, 5, 15];\nminBy(numbers, x => Math.abs(x));\n// Returns: 0\n```\n\nIt returns `undefined` for an empty array.\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\nminBy([], x => x.value); // undefined\n```\n\n#### Parameters\n\n- `items` (`T[]`): The array to find the element with the minimum value.\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): A function that transforms each element into a number. It receives the element, its index, and the array.\n\n#### Returns\n\n(`T | undefined`): The element with the smallest value returned by the transformation function. Returns `undefined` if the array is empty.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst items = [{ value: 10 }, { value: 20 }, { value: 15 }];\nminBy(items, (item, index) => item.value + index);\n// Returns: { value: 10 }\n\n// Using array parameter\nminBy(items, (item, _index, array) => item.value * array.length);\n// Returns: { value: 10 }\n```\n"
  },
  {
    "path": "docs/reference/array/orderBy.md",
    "content": "# orderBy\n\nReturns a new array sorted by multiple criteria and sort directions.\n\n```typescript\nconst sorted = orderBy(arr, criteria, orders);\n```\n\n## Usage\n\n### `orderBy(arr, criteria, orders)`\n\nUse `orderBy` when you want to perform compound sorting on an array of objects with multiple conditions. You can specify ascending or descending order for each criterion, and if values are the same for the first criterion, it sorts by the next criterion.\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\n// Sort a user array by multiple criteria.\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\norderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);\n// Returns:\n// [\n//   { user: 'barney', age: 36 },\n//   { user: 'barney', age: 34 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 }\n// ]\n\n// You can mix property names and functions.\nconst products = [\n  { name: 'Apple', category: 'fruit', price: 1.5 },\n  { name: 'Banana', category: 'fruit', price: 0.8 },\n  { name: 'Broccoli', category: 'vegetable', price: 2.0 },\n];\n\norderBy(products, ['category', product => product.name.length], ['asc', 'desc']);\n// Returns: Sort by category first, then by name length in descending order within the same category\n```\n\nIf the number of sort directions is less than the number of criteria, the last direction is repeated.\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\nconst data = [\n  { a: 1, b: 1, c: 1 },\n  { a: 1, b: 2, c: 2 },\n  { a: 2, b: 1, c: 1 },\n];\n\norderBy(data, ['a', 'b', 'c'], ['asc', 'desc']);\n// 'a' is sorted in ascending order, 'b' and 'c' are sorted in descending order.\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array of objects to sort.\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): The criteria to sort by. You can use property names of objects or functions that return values.\n- `orders` (`Array<'asc' | 'desc'>`): An array of sort directions for each criterion. `'asc'` means ascending order, `'desc'` means descending order.\n\n#### Returns\n\n(`T[]`): A new array sorted by the specified criteria and directions.\n"
  },
  {
    "path": "docs/reference/array/partition.md",
    "content": "# partition\n\nReturns a tuple that splits an array into two groups based on a condition.\n\n```typescript\nconst [truthy, falsy] = partition(arr, isInTruthy);\n```\n\n## Usage\n\n### `partition(arr, isInTruthy)`\n\nUse `partition` when you want to separate elements in an array into two groups based on a specific condition. It separates elements for which the condition function returns `true` and elements for which it returns `false` into different arrays.\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\n// Split a number array into even and odd numbers.\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst [evens, odds] = partition(numbers, x => x % 2 === 0);\n// evens: [2, 4, 6]\n// odds: [1, 3, 5]\n\n// Split an object array by a specific condition.\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nconst [activeUsers, inactiveUsers] = partition(users, user => user.active);\n// activeUsers: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n// inactiveUsers: [{ name: 'Bob', active: false }]\n```\n\nIt returns two empty arrays for an empty array.\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\nconst [truthy, falsy] = partition([], x => x > 0);\n// truthy: []\n// falsy: []\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to split into two groups.\n- `isInTruthy` (`(value: T, index: number, array: readonly T[]) => boolean`): A condition function that determines whether each element should be included in the first array (truthy) or the second array (falsy). The function is called with the value, its index, and the entire array.\n\n#### Returns\n\n(`[truthy: T[], falsy: T[]]`): A tuple consisting of two arrays. The first array contains elements for which the condition is `true`, and the second array contains elements for which the condition is `false`.\n"
  },
  {
    "path": "docs/reference/array/pull.md",
    "content": "# pull\n\nRemoves all specified values from an array.\n\n```typescript\nconst result = pull(arr, valuesToRemove);\n```\n\n## Usage\n\n### `pull(arr, valuesToRemove)`\n\nUse `pull` when you want to remove all occurrences of specific values from an array. This function modifies the original array directly and returns the modified array.\n\n```typescript\nimport { pull } from 'es-toolkit/array';\n\n// Remove specific values from a number array.\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\npull(numbers, [2, 4]);\nconsole.log(numbers); // [1, 3, 5]\n\n// Remove specific strings from a string array.\nconst fruits = ['apple', 'banana', 'cherry', 'banana', 'date'];\npull(fruits, ['banana', 'cherry']);\nconsole.log(fruits); // ['apple', 'date']\n\n// Remove objects with the same reference from an object array.\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj3, obj1];\npull(objects, [obj1]);\nconsole.log(objects); // [{ id: 2 }, { id: 3 }]\n```\n\nIf you want to create a new array without modifying the original, use the `difference` function.\n\n```typescript\nimport { pull } from 'es-toolkit/array';\nimport { difference } from 'es-toolkit/array';\n\nconst original = [1, 2, 3, 4, 5];\n\n// pull modifies the original array.\nconst arr1 = [...original];\npull(arr1, [2, 4]);\nconsole.log(arr1); // [1, 3, 5]\n\n// difference returns a new array.\nconst arr2 = difference(original, [2, 4]);\nconsole.log(original); // [1, 2, 3, 4, 5] (unchanged)\nconsole.log(arr2); // [1, 3, 5]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array from which to remove values.\n- `valuesToRemove` (`readonly unknown[]`): An array of values to remove from the array.\n\n#### Returns\n\n(`T[]`): The original array with the specified values removed. The original array is modified and returned.\n"
  },
  {
    "path": "docs/reference/array/pullAt.md",
    "content": "# pullAt\n\nRemoves elements at specified indices from an array and returns the removed elements.\n\n```typescript\nconst removed = pullAt(arr, indices);\n```\n\n## Usage\n\n### `pullAt(arr, indicesToRemove)`\n\nUse `pullAt` when you want to remove elements at specific positions in an array. This function modifies the original array and returns the removed elements in a new array. It also supports negative indices, which count from the end of the array.\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\n// Remove elements at multiple indices at once.\nconst numbers = [10, 20, 30, 40, 50];\nconst removed = pullAt(numbers, [1, 3, 4]);\nconsole.log(removed); // [20, 40, 50]\nconsole.log(numbers); // [10, 30]\n\n// Safely handle duplicate indices.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst removedFruits = pullAt(fruits, [1, 2, 1]);\nconsole.log(removedFruits); // ['banana', 'cherry', 'banana']\nconsole.log(fruits); // ['apple', 'date']\n```\n\nIf you specify a non-existent index, `undefined` is returned for that position.\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\nconst items = [1, 2, 3];\nconst removed = pullAt(items, [0, 5, 2]);\nconsole.log(removed); // [1, undefined, 3]\nconsole.log(items); // [2]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array from which to remove elements.\n- `indicesToRemove` (`number[]`): An array of indices of elements to remove. Negative indices count from the end of the array.\n\n#### Returns\n\n(`T[]`): A new array containing the removed elements. For non-existent indices, `undefined` is included.\n"
  },
  {
    "path": "docs/reference/array/reduceAsync.md",
    "content": "# reduceAsync\n\nReduces an array to a single value using an async reducer function.\n\n```typescript\nconst result = await reduceAsync(array, reducer, initialValue);\n```\n\n## Reference\n\n### `reduceAsync(array, reducer, initialValue)`\n\nUse `reduceAsync` to reduce an array to a single value by processing each element sequentially. The reducer function is applied sequentially to each element from left to right, passing the accumulated result from one call to the next.\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// Fetch async values for each number and sum them.\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + (await fetchValue(n)), 0);\n// Returns: Sum of all fetched values\n\n// Transform array to object.\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userMap = await reduceAsync(\n  users,\n  async (acc, user) => {\n    const details = await fetchUserDetails(user.id);\n    acc[user.id] = details;\n    return acc;\n  },\n  {} as Record<number, any>\n);\n// Returns: { 1: {...}, 2: {...}, 3: {...} }\n```\n\nUnlike other async array methods, `reduceAsync` must process elements sequentially and does not support concurrent execution, because the result from the previous step is needed for the next step.\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to reduce.\n- `reducer` (`(accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>`): An async function that processes each element. It receives the accumulated value and current value, and returns the new accumulated value.\n- `initialValue` (`U`): The initial value of the accumulator.\n\n#### Returns\n\n(`Promise<U>`): A promise that resolves to the final accumulated value.\n\n---\n\n### `reduceAsync(array, reducer)`\n\nWhen reducing an array without an initial value, the first element is used as the initial value and the reducer function is applied starting from the second element.\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// Calculate sum without initial value.\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + n);\n// Returns: 15 (1 + 2 + 3 + 4 + 5)\n\n// Empty array returns undefined.\nconst emptyArray: number[] = [];\nconst result = await reduceAsync(emptyArray, async (acc, n) => acc + n);\n// Returns: undefined\n```\n\nCalling `reduceAsync` on an empty array without an initial value returns `undefined`.\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to reduce.\n- `reducer` (`(accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>`): An async function that processes each element. It receives the accumulated value and current value, and returns the new accumulated value.\n\n#### Returns\n\n(`Promise<T | undefined>`): A promise that resolves to the final accumulated value. Returns `undefined` if the array is empty.\n"
  },
  {
    "path": "docs/reference/array/remove.md",
    "content": "# remove\n\nRemoves elements from an array based on a condition function and returns the removed elements in a new array. It modifies the original array directly.\n\n```typescript\nconst removed = remove(arr, shouldRemoveElement);\n```\n\n## Usage\n\n### `remove(arr, shouldRemoveElement)`\n\nUse `remove` when you want to remove elements that meet a specific condition from an array and check what elements were removed. This function modifies the original array while returning the removed elements in a separate array. If you want to keep the original array, use the `filter` method.\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// Remove even numbers.\nconst numbers = [1, 2, 3, 4, 5];\nconst removedNumbers = remove(numbers, value => value % 2 === 0);\nconsole.log(numbers); // [1, 3, 5] (original array is modified)\nconsole.log(removedNumbers); // [2, 4] (removed elements)\n\n// Remove objects that meet a specific condition.\nconst users = [\n  { name: 'john', age: 25 },\n  { name: 'jane', age: 17 },\n  { name: 'bob', age: 30 },\n];\nconst minors = remove(users, user => user.age < 18);\nconsole.log(users); // [{ name: 'john', age: 25 }, { name: 'bob', age: 30 }]\nconsole.log(minors); // [{ name: 'jane', age: 17 }]\n```\n\nYou can also use index and original array information.\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// Remove elements based on index.\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst removedAtEvenIndex = remove(items, (value, index) => index % 2 === 0);\nconsole.log(items); // ['b', 'd']\nconsole.log(removedAtEvenIndex); // ['a', 'c', 'e']\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to modify.\n- `shouldRemoveElement` (`(value: T, index: number, array: T[]) => boolean`): A condition function called for each element. Elements for which it returns `true` are removed.\n  - `value`: The element currently being processed.\n  - `index`: The index of the current element.\n  - `array`: The original array.\n\n#### Returns\n\n(`T[]`): Returns a new array containing the removed elements.\n"
  },
  {
    "path": "docs/reference/array/sample.md",
    "content": "# sample\n\nReturns a randomly selected element from an array.\n\n```typescript\nconst randomElement = sample(arr);\n```\n\n## Usage\n\n### `sample(arr)`\n\nUse `sample` when you want to randomly select one element from an array. It's useful for selecting random items in games, randomly fetching test data, or conducting draws.\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// Randomly select one from a number array.\nconst numbers = [1, 2, 3, 4, 5];\nconst randomNumber = sample(numbers);\n// Returns: one of 1, 2, 3, 4, 5\n\n// Randomly select one from a string array.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst randomFruit = sample(fruits);\n// Returns: one of 'apple', 'banana', 'cherry', 'date'\n\n// Randomly select one from an object array.\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst randomUser = sample(users);\n// Returns: one of the three users randomly\n```\n\nIt can also be used with various types of arrays.\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// Boolean array\nconst booleans = [true, false];\nconst randomBoolean = sample(booleans);\n// Returns: true or false\n\n// Mixed type array\nconst mixed = [1, 'hello', { key: 'value' }, [1, 2, 3]];\nconst randomItem = sample(mixed);\n// Returns: any of the elements in the array\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to randomly select an element.\n\n#### Returns\n\n(`T`): A randomly selected element from the array.\n"
  },
  {
    "path": "docs/reference/array/sampleSize.md",
    "content": "# sampleSize\n\nReturns a new array of randomly selected elements with the specified size.\n\n```typescript\nconst sampled = sampleSize(array, size);\n```\n\n## Usage\n\n### `sampleSize(array, size)`\n\nUse `sampleSize` when you want to randomly sample multiple elements from an array. It uses Floyd's algorithm to efficiently generate random samples without duplicates. It's useful for extracting samples in surveys or randomly selecting multiple items in games.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\n// Randomly select 3 from a number array.\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst randomNumbers = sampleSize(numbers, 3);\n// Returns: [2, 7, 9] (example, actually random)\n\n// Randomly select 2 from a string array.\nconst fruits = ['apple', 'banana', 'cherry', 'date', 'elderberry'];\nconst randomFruits = sampleSize(fruits, 2);\n// Returns: ['cherry', 'apple'] (example, actually random)\n```\n\nYou can sample with various sizes.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\n\n// Select 1 element\nconst single = sampleSize(items, 1);\n// Returns: ['c'] (example)\n\n// Select same as entire array size (shuffle effect)\nconst all = sampleSize(items, 5);\n// Returns: ['b', 'd', 'a', 'e', 'c'] (example)\n\n// Select empty array\nconst none = sampleSize(items, 0);\n// Returns: []\n```\n\n#### Parameters\n\n- `array` (`readonly T[]`): The array to sample from.\n- `size` (`number`): The number of elements to select.\n\n#### Returns\n\n(`T[]`): Returns a new array consisting of randomly selected elements.\n\n#### Throws\n\nThrows an error if `size` is greater than the length of the array.\n"
  },
  {
    "path": "docs/reference/array/shuffle.md",
    "content": "# shuffle\n\nReturns a new array with the elements randomly shuffled.\n\n```typescript\nconst shuffled = shuffle(arr);\n```\n\n## Usage\n\n### `shuffle(arr)`\n\nUse `shuffle` when you want to randomly shuffle the elements in an array. It uses the Fisher-Yates algorithm to ensure perfect random shuffling where all permutations appear with equal probability. It's useful for shuffling a deck in card games, randomizing quiz question order, or shuffling a playlist.\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// Shuffle a number array.\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffledNumbers = shuffle(numbers);\n// Returns: [3, 1, 4, 5, 2] (example, actually random)\nconsole.log(numbers); // [1, 2, 3, 4, 5] (original is unchanged)\n\n// Shuffle a string array.\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffledFruits = shuffle(fruits);\n// Returns: ['cherry', 'apple', 'date', 'banana'] (example, actually random)\n```\n\nYou can shuffle various types of arrays.\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// Shuffle an object array.\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst shuffledUsers = shuffle(users);\n// Returns: a new array with user objects shuffled in random order\n\n// Shuffle a mixed type array.\nconst mixed = [1, 'hello', true, { key: 'value' }];\nconst shuffledMixed = shuffle(mixed);\n// Returns: a new array with elements shuffled in random order\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array to shuffle.\n\n#### Returns\n\n(`T[]`): Returns a new array with elements shuffled in random order. The original array is not changed.\n"
  },
  {
    "path": "docs/reference/array/sortBy.md",
    "content": "# sortBy\n\nReturns a new array sorted in ascending order by the given criteria.\n\n```typescript\nconst sorted = sortBy(arr, criteria);\n```\n\n## Usage\n\n### `sortBy(arr, criteria)`\n\nUse `sortBy` when you want to sort an array of objects by multiple properties or computed values. Provide property names or transformation functions as an array, and it sorts in ascending order with priority in that order. It's useful for sorting table data or when complex sorting logic is needed.\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// Sort by a single property.\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 35 },\n];\nconst byAge = sortBy(users, ['age']);\n// Returns: [{ name: 'jane', age: 25 }, { name: 'john', age: 30 }, { name: 'bob', age: 35 }]\n\n// Sort by multiple properties.\nconst employees = [\n  { name: 'john', department: 'engineering', age: 30 },\n  { name: 'jane', department: 'hr', age: 25 },\n  { name: 'bob', department: 'engineering', age: 35 },\n  { name: 'alice', department: 'engineering', age: 25 },\n];\nconst sorted = sortBy(employees, ['department', 'age']);\n// Returns: Sort by department first, then by age\n// [\n//   { name: 'alice', department: 'engineering', age: 25 },\n//   { name: 'john', department: 'engineering', age: 30 },\n//   { name: 'bob', department: 'engineering', age: 35 },\n//   { name: 'jane', department: 'hr', age: 25 }\n// ]\n```\n\nYou can create complex sorting criteria using functions.\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// Mix functions and properties.\nconst products = [\n  { name: 'laptop', price: 1000, category: 'electronics' },\n  { name: 'shirt', price: 50, category: 'clothing' },\n  { name: 'phone', price: 800, category: 'electronics' },\n];\n\nconst sorted = sortBy(products, [\n  'category',\n  item => -item.price, // Sort price in descending order\n]);\n// Returns: Sort by category first, then by highest price\n\n// Sort by computed values.\nconst words = ['hello', 'a', 'wonderful', 'world'];\nconst byLength = sortBy(\n  words.map(word => ({ word, length: word.length })),\n  ['length']\n);\n// Returns: Array of objects sorted by string length\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array of objects to sort.\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): Sorting criteria. An array of object property names or transformation functions, with earlier criteria having higher priority.\n\n#### Returns\n\n(`T[]`): Returns a new array sorted in ascending order by the specified criteria.\n"
  },
  {
    "path": "docs/reference/array/tail.md",
    "content": "# tail\n\nReturns a new array consisting of all elements except the first.\n\n```typescript\nconst result = tail(arr);\n```\n\n## Usage\n\n### `tail(arr)`\n\nUse `tail` when you want to get all elements except the first from an array. If the array is empty or has only one element, it returns an empty array. It's useful when processing all elements except the first in a stack or queue.\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// Exclude the first element from a number array.\nconst numbers = [1, 2, 3, 4, 5];\ntail(numbers);\n// Returns: [2, 3, 4, 5]\n\n// Exclude the first element from a string array.\nconst strings = ['first', 'second', 'third'];\ntail(strings);\n// Returns: ['second', 'third']\n\n// An array with only one element returns an empty array.\nconst single = [42];\ntail(single);\n// Returns: []\n```\n\nIt safely handles empty arrays and special cases.\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// An empty array returns an empty array.\nconst empty: number[] = [];\ntail(empty);\n// Returns: []\n\n// It can also handle nested arrays.\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ntail(nested);\n// Returns: [[3, 4], [5, 6]]\n\n// It can also handle object arrays.\nconst users = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\ntail(users);\n// Returns: [{ id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to exclude the first element.\n\n#### Returns\n\n(`T[]`): Returns a new array excluding the first element. If the input array is empty or has only one element, it returns an empty array.\n"
  },
  {
    "path": "docs/reference/array/take.md",
    "content": "# take\n\nCreates a new array by taking the specified number of elements from the beginning of the array.\n\n```typescript\nconst taken = take(arr, count);\n```\n\n## Usage\n\n### `take(arr, count?)`\n\nUse `take` when you only need a few elements from the front of an array. If the requested count is greater than the array length, it returns the entire array.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\n// Take the first 3 elements.\ntake([1, 2, 3, 4, 5], 3);\n// Returns: [1, 2, 3]\n\n// Take the first 2 elements.\ntake(['a', 'b', 'c'], 2);\n// Returns: ['a', 'b']\n```\n\nIf you request more elements than the array has, it returns the entire array.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\nIf you omit `count`, it takes only the first element.\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3]);\n// Returns: [1]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to take elements from.\n- `count` (`number`, optional): The number of elements to take. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array containing the first `count` elements from the array.\n"
  },
  {
    "path": "docs/reference/array/takeRight.md",
    "content": "# takeRight\n\nCreates a new array by taking the specified number of elements from the end of the array.\n\n```typescript\nconst taken = takeRight(arr, count);\n```\n\n## Usage\n\n### `takeRight(arr, count?)`\n\nUse `takeRight` when you only need a few elements from the end of an array. If the requested count is greater than the array length, it returns the entire array.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\n// Take the last 2 elements.\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// Take the last 2 elements.\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n```\n\nIf you request more elements than the array has, it returns the entire array.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\nIf you omit `count`, it takes only the last element.\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3]);\n// Returns: [3]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to take elements from.\n- `count` (`number`, optional): The number of elements to take. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array containing the last `count` elements from the array.\n"
  },
  {
    "path": "docs/reference/array/takeRightWhile.md",
    "content": "# takeRightWhile\n\nReturns a new array by taking elements from the end of the array while the condition function returns true.\n\n```typescript\nconst result = takeRightWhile(arr, shouldContinueTaking);\n```\n\n## Usage\n\n### `takeRightWhile(arr, shouldContinueTaking)`\n\nUse `takeRightWhile` when you want to take elements from the end of an array that meet a condition. It stops when it encounters the first element for which the condition function returns false.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/array';\n\n// Take numbers less than 4 from the end\ntakeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n// Result: [3, 2, 1]\n\n// Take numbers greater than 3 from the end\ntakeRightWhile([1, 2, 3], n => n > 3);\n// Result: []\n\n// Take elements with string length <= 5\ntakeRightWhile(['hello', 'world', 'foo', 'bar'], str => str.length <= 5);\n// Result: ['hello', 'world', 'foo', 'bar']\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to take elements from.\n- `shouldContinueTaking` (`(item: T, index: number, array: T[]) => boolean`): A condition function called with each element, its index, and the array. Elements are included in the result as long as this function returns true.\n\n#### Returns\n\n(`T[]`): A new array containing the elements taken from the end while the condition function returns true.\n\n## Examples\n\n```typescript\n// Using index parameter\ntakeRightWhile([10, 20, 30, 40], (x, index) => index > 1);\n// Returns: [30, 40]\n\n// Using array parameter\ntakeRightWhile([1, 2, 3, 4], (x, index, arr) => x >= arr.length / 2);\n// Returns: [2, 3, 4]\n```\n"
  },
  {
    "path": "docs/reference/array/takeWhile.md",
    "content": "# takeWhile\n\nCreates a new array by taking elements from the beginning of the array while the condition function returns true.\n\n```typescript\nconst taken = takeWhile(arr, predicate);\n```\n\n## Usage\n\n### `takeWhile(arr, predicate)`\n\nUse `takeWhile` when you only need elements from the beginning of an array that meet a specific condition. It stops taking elements when it encounters the first element that doesn't meet the condition.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\n// Take only elements less than 3.\ntakeWhile([1, 2, 3, 4], x => x < 3);\n// Returns: [1, 2]\n\n// Return an empty array since there are no elements greater than 3 from the beginning.\ntakeWhile([1, 2, 3, 4], x => x > 3);\n// Returns: []\n```\n\nIt can also be used with object arrays.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n  { name: 'David', age: 40 },\n];\n\n// Take only users under 30 years old.\ntakeWhile(users, user => user.age < 30);\n// Returns: [{ name: 'Alice', age: 25 }]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The array to take elements from.\n- `predicate` (`(element: T, index: number, array: T[]) => boolean`): A condition function called for each element with the element, its index, and the array. Elements are taken while this function returns true.\n\n#### Returns\n\n(`T[]`): Returns a new array containing the elements taken from the beginning while the condition function returns true.\n\n## Examples\n\n```typescript\n// Using index parameter\ntakeWhile([10, 20, 30, 40], (x, index) => index < 2);\n// Returns: [10, 20]\n\n// Using array parameter\ntakeWhile([1, 2, 3, 4], (x, index, arr) => x < arr.length);\n// Returns: [1, 2, 3]\n```\n"
  },
  {
    "path": "docs/reference/array/toFilled.md",
    "content": "# toFilled\n\nCreates a new array by filling part or all of it with the specified value.\n\n```typescript\nconst filled = toFilled(arr, value, start?, end?);\n```\n\n## Usage\n\n### `toFilled(arr, value, start?, end?)`\n\nUse `toFilled` when you want to fill a specific range of an array with a specified value. It creates and returns a new array without modifying the original array.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// Fill with '*' from index 2 to the end.\ntoFilled(array, '*', 2);\n// Returns: [1, 2, '*', '*', '*']\n\n// Fill with '*' from index 1 to before index 4.\ntoFilled(array, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n```\n\nIf you omit the start and end positions, it fills the entire array.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\ntoFilled(array, '*');\n// Returns: ['*', '*', '*', '*', '*']\n```\n\nYou can also use negative indices. They count from the end of the array.\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// Fill with '*' from 4th from the end to before 1st from the end.\ntoFilled(array, '*', -4, -1);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n#### Parameters\n\n- `arr` (`T[]`): The original array to base on.\n- `value` (`U`): The value to fill the array with.\n- `start` (`number`, optional): The start position for filling. Default is `0`.\n- `end` (`number`, optional): The end position for filling. Default is the array length.\n\n#### Returns\n\n(`Array<T | U>`): Returns a new array with the specified range filled with the value. The original array is not modified.\n"
  },
  {
    "path": "docs/reference/array/union.md",
    "content": "# union\n\nCreates a new array containing all unique elements from two arrays.\n\n```typescript\nconst unified = union(arr1, arr2);\n```\n\n## Usage\n\n### `union(arr1, arr2)`\n\nUse `union` when you want to combine all elements from multiple arrays without duplicates. It merges two arrays and returns a new array with duplicate values removed.\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\n// Get the union of number arrays.\nconst array1 = [1, 2, 3];\nconst array2 = [3, 4, 5];\nunion(array1, array2);\n// Returns: [1, 2, 3, 4, 5]\n\n// Get the union of string arrays.\nconst fruits1 = ['apple', 'banana'];\nconst fruits2 = ['banana', 'orange'];\nunion(fruits1, fruits2);\n// Returns: ['apple', 'banana', 'orange']\n```\n\nElements from the first array come first, followed by unique elements from the second array.\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = [2, 3, 4, 5];\nunion(arr1, arr2);\n// Returns: [1, 2, 3, 4, 5]\n// 1, 2, 3 are from arr1, 4, 5 are from arr2.\n```\n\n#### Parameters\n\n- `arr1` (`T[]`): The first array to merge.\n- `arr2` (`T[]`): The second array to merge.\n\n#### Returns\n\n(`T[]`): Returns a new array containing all unique elements from both arrays.\n"
  },
  {
    "path": "docs/reference/array/unionBy.md",
    "content": "# unionBy\n\nCreates a new array containing unique elements from two arrays based on values transformed by a specific function.\n\n```typescript\nconst unified = unionBy(arr1, arr2, mapper);\n```\n\n## Usage\n\n### `unionBy(arr1, arr2, mapper)`\n\nUse `unionBy` when you want to remove duplicates based on a specific property from object arrays. Elements are treated as identical if the values returned by the `mapper` function are the same.\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\n// Get the union of objects based on id.\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nunionBy(users1, users2, user => user.id);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n\n// Get the union based on the remainder when dividing by 3.\nconst nums1 = [1, 2, 3];\nconst nums2 = [4, 5, 6];\nunionBy(nums1, nums2, x => x % 3);\n// Returns: [1, 2, 3]\n// 1 % 3 = 1, 2 % 3 = 2, 3 % 3 = 0,\n// 4 % 3 = 1, 5 % 3 = 2, 6 % 3 = 0, so all are duplicates.\n```\n\nYou can also get unions by complex criteria using custom comparison functions.\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\nconst products1 = [\n  { category: 'electronics', price: 100 },\n  { category: 'books', price: 20 },\n];\nconst products2 = [\n  { category: 'electronics', price: 150 },\n  { category: 'toys', price: 30 },\n];\n\n// Get the union based on category.\nunionBy(products1, products2, product => product.category);\n// Returns: [\n//   { category: 'electronics', price: 100 },\n//   { category: 'books', price: 20 },\n//   { category: 'toys', price: 30 }\n// ]\n```\n\n#### Parameters\n\n- `arr1` (`T[]`): The first array to merge.\n- `arr2` (`T[]`): The second array to merge.\n- `mapper` (`(item: T) => U`): A function that transforms each element into a value for comparison.\n\n#### Returns\n\n(`T[]`): Returns the union of the two arrays with duplicates removed based on values returned by the `mapper` function.\n"
  },
  {
    "path": "docs/reference/array/unionWith.md",
    "content": "# unionWith\n\nCreates a new array containing unique elements from two arrays based on a custom equality function.\n\n```typescript\nconst unified = unionWith(arr1, arr2, areItemsEqual);\n```\n\n## Usage\n\n### `unionWith(arr1, arr2, areItemsEqual)`\n\nUse `unionWith` when you want to determine element equality by complex conditions. If the provided function returns true, the two elements are considered the same and duplicates are removed.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// Get the union based on object id.\nconst array1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst array2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nconst areItemsEqual = (a, b) => a.id === b.id;\nunionWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\nYou can also use more complex comparison logic.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// Get the union based on coordinates.\nconst points1 = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n];\nconst points2 = [\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\nconst arePointsEqual = (p1, p2) => p1.x === p2.x && p1.y === p2.y;\nunionWith(points1, points2, arePointsEqual);\n// Returns: [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 }]\n```\n\nHere's an example of case-insensitive string comparison.\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\nconst words1 = ['Apple', 'banana'];\nconst words2 = ['BANANA', 'orange'];\nconst areWordsEqual = (a, b) => a.toLowerCase() === b.toLowerCase();\nunionWith(words1, words2, areWordsEqual);\n// Returns: ['Apple', 'banana', 'orange']\n// 'banana' and 'BANANA' are considered the same, so only the first one is kept.\n```\n\n#### Parameters\n\n- `arr1` (`T[]`): The first array to merge.\n- `arr2` (`T[]`): The second array to merge.\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): A function that determines if two elements are equal. It should return `true` if they are considered equal, and `false` otherwise.\n\n#### Returns\n\n(`T[]`): Returns the union of the two arrays with duplicates removed based on the custom equality function.\n"
  },
  {
    "path": "docs/reference/array/uniq.md",
    "content": "# uniq\n\nReturns a new array with duplicate elements removed.\n\n```typescript\nconst uniqueArray = uniq(arr);\n```\n\n## Usage\n\n### `uniq(arr)`\n\nUse `uniq` when you want to remove duplicate values from an array and keep only unique values. It preserves the order in which they first appear in the original array.\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\n// Remove duplicates from a number array.\nconst numbers = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueNumbers = uniq(numbers);\nconsole.log(uniqueNumbers); // [1, 2, 3, 4, 5]\n\n// Remove duplicates from a string array.\nconst words = ['apple', 'banana', 'apple', 'cherry', 'banana'];\nconst uniqueWords = uniq(words);\nconsole.log(uniqueWords); // ['apple', 'banana', 'cherry']\n\n// Remove objects with the same reference from an object array.\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj1, obj3, obj2];\nconst uniqueObjects = uniq(objects);\nconsole.log(uniqueObjects); // [{ id: 1 }, { id: 2 }, { id: 3 }]\n```\n\nIt returns an empty array for an empty array.\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\nconst emptyArray = uniq([]);\nconsole.log(emptyArray); // []\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to remove duplicates.\n\n#### Returns\n\n(`T[]`): A new array with duplicates removed. Preserves the order in which they first appear in the original array.\n"
  },
  {
    "path": "docs/reference/array/uniqBy.md",
    "content": "# uniqBy\n\nReturns a new array with duplicate elements removed based on values returned by the transformation function.\n\n```typescript\nconst uniqueArray = uniqBy(arr, mapper);\n```\n\n## Usage\n\n### `uniqBy(arr, mapper)`\n\nUse `uniqBy` when you want to transform elements by a specific criterion and determine duplicates. It only keeps the first occurrence among elements for which the transformation function returns the same value.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\n// Remove duplicates by converting decimal numbers downward.\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqBy(numbers, Math.floor);\nconsole.log(result); // [1.2, 2.1, 3.2, 5.7, 7.19]\n\n// Remove duplicates from an object array based on a specific property.\nconst users = [\n  { id: 1, name: 'john', age: 30 },\n  { id: 2, name: 'jane', age: 30 },\n  { id: 3, name: 'joe', age: 25 },\n  { id: 4, name: 'jenny', age: 25 },\n];\nconst uniqueByAge = uniqBy(users, user => user.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'john', age: 30 }, { id: 3, name: 'joe', age: 25 }]\n\n// Remove duplicates based on string length.\nconst words = ['apple', 'pie', 'banana', 'cat', 'dog'];\nconst uniqueByLength = uniqBy(words, word => word.length);\nconsole.log(uniqueByLength); // ['apple', 'pie', 'banana']\n```\n\nYou can also base it on a combination of specific fields in complex objects.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n  { category: 'fruit', name: 'grape' },\n];\n\n// Remove duplicates based on category.\nconst uniqueByCategory = uniqBy(products, item => item.category);\nconsole.log(uniqueByCategory.length); // 2\nconsole.log(uniqueByCategory);\n// [{ category: 'fruit', name: 'apple' }, { category: 'vegetable', name: 'carrot' }]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to remove duplicates.\n- `mapper` (`(item: T, index: number, array: readonly T[]) => U`): A function that transforms each element into a value for comparison. It receives the element, its index, and the array.\n\n#### Returns\n\n(`T[]`): A new array with duplicates removed based on the transformation function's results. Preserves the order in which they first appear in the original array.\n\n## Examples\n\n```typescript\n// Using index parameter\nconst items = [{ value: 1 }, { value: 2 }, { value: 1 }];\nuniqBy(items, (item, index) => item.value + index);\n// Returns: [{ value: 1 }, { value: 2 }, { value: 1 }]\n\n// Using array parameter\nuniqBy(items, (item, _index, array) => item.value * array.length);\n// Returns: [{ value: 1 }]\n```\n"
  },
  {
    "path": "docs/reference/array/uniqWith.md",
    "content": "# uniqWith\n\nReturns a new array with duplicate elements removed using a comparison function.\n\n```typescript\nconst uniqueArray = uniqWith(arr, areItemsEqual);\n```\n\n## Usage\n\n### `uniqWith(arr, areItemsEqual)`\n\nUse `uniqWith` when you want to remove duplicates based on a custom comparison function that determines if two elements are equal. It only keeps the first occurrence among elements for which the comparison function returns `true`.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\n// Treat numbers with a difference less than 1 as equal and remove duplicates.\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqWith(numbers, (a, b) => Math.abs(a - b) < 1);\nconsole.log(result); // [1.2, 3.2, 5.7, 7.19]\n\n// Compare objects by a specific field and remove duplicates.\nconst users = [\n  { id: 1, name: 'John', age: 30 },\n  { id: 2, name: 'Jane', age: 30 },\n  { id: 3, name: 'Bob', age: 25 },\n];\nconst uniqueByAge = uniqWith(users, (a, b) => a.age === b.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'John', age: 30 }, { id: 3, name: 'Bob', age: 25 }]\n\n// Compare strings case-insensitively and remove duplicates.\nconst words = ['Apple', 'APPLE', 'banana', 'Banana', 'cherry'];\nconst uniqueCaseInsensitive = uniqWith(words, (a, b) => a.toLowerCase() === b.toLowerCase());\nconsole.log(uniqueCaseInsensitive); // ['Apple', 'banana', 'cherry']\n```\n\nComplex object comparisons are also possible.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\nconst products = [\n  { name: 'iPhone', brand: 'Apple', price: 1000 },\n  { name: 'Galaxy', brand: 'Samsung', price: 900 },\n  { name: 'iPhone', brand: 'Apple', price: 1100 }, // Same name and brand\n  { name: 'Pixel', brand: 'Google', price: 800 },\n];\n\n// Treat as duplicate if both name and brand are the same.\nconst uniqueProducts = uniqWith(products, (a, b) => a.name === b.name && a.brand === b.brand);\nconsole.log(uniqueProducts);\n// [\n//   { name: 'iPhone', brand: 'Apple', price: 1000 },\n//   { name: 'Galaxy', brand: 'Samsung', price: 900 },\n//   { name: 'Pixel', brand: 'Google', price: 800 }\n// ]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to remove duplicates.\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): A comparison function that determines if two elements are equal. It should return `true` if the elements are considered equal, and `false` otherwise.\n\n#### Returns\n\n(`T[]`): A new array with duplicates removed based on the comparison function. Preserves the order in which they first appear in the original array.\n"
  },
  {
    "path": "docs/reference/array/unzip.md",
    "content": "# unzip\n\nUnpacks grouped arrays and creates new arrays by gathering elements at the same position.\n\n```typescript\nconst unzippedArrays = unzip(zipped);\n```\n\n## Usage\n\n### `unzip(zipped)`\n\nUse `unzip` when you want to create new arrays by collecting elements at the same index from a 2D array where multiple arrays are grouped together. It's the opposite operation of zip.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\n// Unpack arrays grouped with strings, booleans, and numbers.\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n  ['c', true, 3],\n];\nconst result = unzip(zipped);\nconsole.log(result);\n// [['a', 'b', 'c'], [true, false, true], [1, 2, 3]]\n\n// Unpack arrays grouped with user information.\nconst users = [\n  ['john', 30, 'engineer'],\n  ['jane', 25, 'designer'],\n  ['bob', 35, 'manager'],\n];\nconst [names, ages, roles] = unzip(users);\nconsole.log(names); // ['john', 'jane', 'bob']\nconsole.log(ages); // [30, 25, 35]\nconsole.log(roles); // ['engineer', 'designer', 'manager']\n```\n\nIt can also handle arrays of different lengths. For shorter arrays, empty positions are filled with `undefined`.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst mixed = [[1, 'a'], [2, 'b', true], [3]];\nconst result = unzip(mixed);\nconsole.log(result);\n// [[1, 2, 3], ['a', 'b', undefined], [undefined, true, undefined]]\n```\n\nPassing an empty array returns an empty array.\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst empty = unzip([]);\nconsole.log(empty); // []\n```\n\n#### Parameters\n\n- `zipped` (`ReadonlyArray<[...T]>`): A 2D array where multiple arrays are grouped together to be unpacked.\n\n#### Returns\n\n(`Unzip<T>`): New arrays where elements at the same position are grouped together. If the original arrays have different lengths, empty positions in shorter arrays are filled with `undefined`.\n"
  },
  {
    "path": "docs/reference/array/unzipWith.md",
    "content": "# unzipWith\n\nUnpacks grouped arrays and applies a transformation function to return a new array.\n\n```typescript\nconst transformedArray = unzipWith(target, iteratee);\n```\n\n## Usage\n\n### `unzipWith(target, iteratee)`\n\nUse `unzipWith` when you want to collect elements at the same position from a 2D array where multiple arrays are grouped together and apply a transformation function to get the result. It's similar to `unzip` but allows you to transform the elements in each group with a custom function.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\n// Add numbers at the same position.\nconst numbers = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nconst sums = unzipWith(numbers, (a, b, c) => a + b + c);\nconsole.log(sums); // [9, 12] (1+3+5=9, 2+4+6=12)\n\n// Concatenate strings at the same position.\nconst words = [\n  ['hello', 'world'],\n  ['foo', 'bar'],\n  ['es', 'toolkit'],\n];\nconst combined = unzipWith(words, (a, b, c) => a + b + c);\nconsole.log(combined); // ['hellofooes', 'worldbartoolkit']\n\n// Calculate average of specific property from object array.\nconst scores = [\n  [{ score: 80 }, { score: 90 }],\n  [{ score: 85 }, { score: 95 }],\n  [{ score: 75 }, { score: 88 }],\n];\nconst averages = unzipWith(scores, (a, b, c) => (a.score + b.score + c.score) / 3);\nconsole.log(averages); // [80, 91] (80+85+75)/3, (90+95+88)/3\n```\n\nIf arrays have different lengths, undefined is passed.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst mixed = [\n  [1, 4],\n  [2, 5],\n  [3], // Different length\n];\nconst result = unzipWith(mixed, (a, b, c) => {\n  // c can be undefined\n  return (a || 0) + (b || 0) + (c || 0);\n});\nconsole.log(result); // [6, 9] (1+2+3, 4+5+0)\n```\n\nPassing an empty array will throw an error.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst empty = unzipWith([], (a, b) => a + b);\nconsole.log(empty); // throws Error\n```\n\n#### Parameters\n\n- `target` (`readonly T[][]`): A 2D array where multiple arrays are grouped together to be unpacked and transformed.\n- `iteratee` (`(...args: T[]) => R`): A function that receives elements at the same position and transforms them into a new value.\n\n#### Returns\n\n(`R[]`): A new array created by applying the transformation function to the results.\n"
  },
  {
    "path": "docs/reference/array/windowed.md",
    "content": "# windowed\n\nReturns a new array containing snapshots of each window as a window of specified size slides regularly along the array.\n\n```typescript\nconst windows = windowed(arr, size, step?, options?);\n```\n\n## Usage\n\n### `windowed(arr, size, step?, options?)`\n\nUse `windowed` when you want to return an array containing snapshots as a window of specified size slides regularly along an array.\n\nIt's useful for calculating moving averages in time series data analysis, extracting n-grams from strings, or finding specific patterns in arrays. It can also be used for processing data in batch units or implementing sliding window algorithms.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\n// Basic usage - create windows of size 3.\nconst numbers = [1, 2, 3, 4, 5];\nconst result = windowed(numbers, 3);\nconsole.log(result); // [[1, 2, 3], [2, 3, 4], [3, 4, 5]]\n\n// Adjust window spacing by specifying step.\nconst data = [1, 2, 3, 4, 5, 6, 7, 8];\nconst stepped = windowed(data, 3, 2);\nconsole.log(stepped); // [[1, 2, 3], [3, 4, 5], [5, 6, 7]]\n\n// Can also be used with string arrays.\nconst words = ['a', 'b', 'c', 'd', 'e'];\nconst wordWindows = windowed(words, 2);\nconsole.log(wordWindows); // [['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']]\n```\n\nUse the `partialWindows` option if you want to include partial windows.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst numbers = [1, 2, 3, 4, 5, 6];\n\n// Without partial windows (default)\nconst complete = windowed(numbers, 4, 3);\nconsole.log(complete); // [[1, 2, 3, 4]]\n\n// With partial windows\nconst withPartial = windowed(numbers, 4, 3, { partialWindows: true });\nconsole.log(withPartial); // [[1, 2, 3, 4], [4, 5, 6]]\n```\n\nEach snapshot is provided in array form, and the last few arrays may have fewer elements than the specified size.\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst small = [1, 2];\n\n// When window is larger than array\nconsole.log(windowed(small, 5)); // []\nconsole.log(windowed(small, 5, 1, { partialWindows: true })); // [[1, 2], [2]]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array to create windows from.\n- `size` (`number`): The size of each window. Must be an integer greater than 1.\n- `step` (`number`, optional): The spacing between windows. Must be an integer greater than 1. Default is `1`.\n- `options.partialWindows` (`boolean`, optional): Whether to include incomplete windows at the end of the array. Default is `false`.\n\n#### Returns\n\n(`T[][]`): An array of windows created with the specified size and spacing.\n\n#### Throws\n\nThrows an error if `size` or `step` is not a positive integer.\n"
  },
  {
    "path": "docs/reference/array/without.md",
    "content": "# without\n\nCreates a new array excluding specific values from the array.\n\n```typescript\nconst filtered = without(arr, ...values);\n```\n\n## Usage\n\n### `without(arr, ...values)`\n\nUse `without` when you want to remove unwanted specific values from an array. The original array is not modified, and a new array with the specified values removed is returned.\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\n// Remove specific values from a number array.\nwithout([1, 2, 3, 4, 5], 2, 4);\n// Returns: [1, 3, 5]\n\n// Remove specific value from a string array.\nwithout(['a', 'b', 'c', 'a'], 'a');\n// Returns: ['b', 'c']\n```\n\nIt also handles `NaN` values correctly.\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\nwithout([1, NaN, 3, NaN, 5], NaN);\n// Returns: [1, 3, 5]\n```\n\n#### Parameters\n\n- `arr` (`readonly T[]`): The array from which to remove values.\n- `values` (`...T[]`): The values to remove from the array.\n\n#### Returns\n\n(`T[]`): Returns a new array with the specified values removed.\n"
  },
  {
    "path": "docs/reference/array/xor.md",
    "content": "# xor\n\nCreates a new array with elements that exist in only one of two arrays.\n\n```typescript\nconst result = xor(arr1, arr2);\n```\n\n## Usage\n\n### `xor(arr1, arr2)`\n\nUse `xor` when you want to find the symmetric difference of two arrays. It returns a new array consisting of elements that exist in only one of the two arrays and not in their intersection.\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\n// Get the symmetric difference of number arrays.\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// Get the symmetric difference of string arrays.\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n```\n\nDuplicate elements are automatically removed.\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\nxor([1, 2, 2, 3], [3, 4, 4, 5]);\n// Returns: [1, 2, 4, 5]\n```\n\n#### Parameters\n\n- `arr1` (`readonly T[]`): The first array to compare.\n- `arr2` (`readonly T[]`): The second array to compare.\n\n#### Returns\n\n(`T[]`): Returns a new array representing the symmetric difference of the two arrays.\n"
  },
  {
    "path": "docs/reference/array/xorBy.md",
    "content": "# xorBy\n\nCreates a new array with elements that exist in only one of two arrays, based on values transformed by a given function.\n\n```typescript\nconst result = xorBy(arr1, arr2, mapper);\n```\n\n## Usage\n\n### `xorBy(arr1, arr2, mapper)`\n\nUse `xorBy` when you want to find the symmetric difference of two arrays by comparing elements based on a specific criterion. It creates a new array with elements that exist in only one of the two arrays after transforming each element with a mapping function.\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\n// Get symmetric difference by object id.\nxorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], obj => obj.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// Get symmetric difference by string length.\nxorBy(['apple', 'banana'], ['grape', 'cherry', 'apple'], str => str.length);\n// Returns: [] (elements with lengths that are all duplicated)\n```\n\nElements with the same result from the mapping function are treated as one.\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\nxorBy([1, 2, 3, 4], [3, 4, 5, 6], n => n % 3);\n// Returns: [] (elements with remainders that are all duplicated)\n```\n\n#### Parameters\n\n- `arr1` (`readonly T[]`): The first array to compare.\n- `arr2` (`readonly T[]`): The second array to compare.\n- `mapper` (`(item: T) => U`): A function that transforms each element into a value for comparison.\n\n#### Returns\n\n(`T[]`): Returns a new array representing the symmetric difference calculated based on the mapping function's results.\n"
  },
  {
    "path": "docs/reference/array/xorWith.md",
    "content": "# xorWith\n\nCreates a new array with elements that exist in only one of two arrays using a given comparison function.\n\n```typescript\nconst result = xorWith(arr1, arr2, areElementsEqual);\n```\n\n## Usage\n\n### `xorWith(arr1, arr2, areElementsEqual)`\n\nUse `xorWith` when you want to find the symmetric difference with complex objects or special comparison conditions. It creates a new array with elements that exist in only one of the two arrays by comparing elements with a user-defined equality function.\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// Compare by object id.\nxorWith(\n  [\n    { id: 1, name: 'Alice' },\n    { id: 2, name: 'Bob' },\n  ],\n  [\n    { id: 2, name: 'Bobby' },\n    { id: 3, name: 'Charlie' },\n  ],\n  (a, b) => a.id === b.id\n);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 3, name: 'Charlie' }]\n\n// Compare case-insensitively.\nxorWith(['Apple', 'Banana'], ['APPLE', 'Cherry'], (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Banana', 'Cherry']\n```\n\nMore complex comparisons are also possible.\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// Compare by absolute value.\nxorWith([-1, -2, 3], [1, 2, -4], (a, b) => Math.abs(a) === Math.abs(b));\n// Returns: [3, -4]\n\n// Deep object comparison.\nxorWith(\n  [{ specs: { ram: 8, storage: 256 } }],\n  [{ specs: { ram: 8, storage: 256 } }],\n  (a, b) => a.specs.ram === b.specs.ram && a.specs.storage === b.specs.storage\n);\n// Returns: []\n```\n\n#### Parameters\n\n- `arr1` (`readonly T[]`): The first array to compare.\n- `arr2` (`readonly T[]`): The second array to compare.\n- `areElementsEqual` (`(item1: T, item2: T) => boolean`): A function that determines if two elements are equal. It should return `true` if they are the same, and `false` otherwise.\n\n#### Returns\n\n(`T[]`): Returns a new array representing the symmetric difference calculated based on the custom equality function.\n"
  },
  {
    "path": "docs/reference/array/zip.md",
    "content": "# zip\n\nCreates an array of tuples by bundling elements at the same index from multiple arrays.\n\n```typescript\nconst zipped = zip(...arrs);\n```\n\n## Usage\n\n### `zip(...arrs)`\n\nUse `zip` when you want to bundle elements at the same position from multiple arrays together. It returns a new array where elements at the same index from each array are bundled into tuples.\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\n// Bundle two arrays.\nzip([1, 2, 3], ['a', 'b', 'c']);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// Bundle three arrays.\nzip([1, 2], ['a', 'b', 'c'], [true, false]);\n// Returns: [[1, 'a', true], [2, 'b', false], [undefined, 'c', undefined]]\n```\n\nIf the arrays have different lengths, it adjusts to the longest array's length. Empty positions in shorter arrays are filled with `undefined`.\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\nzip([1, 2], ['a', 'b', 'c', 'd']);\n// Returns: [[1, 'a'], [2, 'b'], [undefined, 'c'], [undefined, 'd']]\n```\n\n#### Parameters\n\n- `arrs` (`Array<readonly T[]>`): The arrays to bundle.\n\n#### Returns\n\n(`T[][]`): Returns a new array where elements at the same index from each input array are bundled into tuples.\n"
  },
  {
    "path": "docs/reference/array/zipObject.md",
    "content": "# zipObject\n\nCreates a single object from a keys array and a values array.\n\n```typescript\nconst object = zipObject(keys, values);\n```\n\n## Usage\n\n### `zipObject(keys, values)`\n\nUse `zipObject` when you want to combine two arrays into a single object. It returns a new object where elements from the first array become keys and elements from the second array become values.\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\n// Create an object from keys and values.\nzipObject(['a', 'b', 'c'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// If there are more keys, undefined becomes the value.\nzipObject(['a', 'b', 'c', 'd'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3, d: undefined }\n```\n\nIf the values array is longer, excess values are ignored.\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\nzipObject(['a', 'b'], [1, 2, 3, 4]);\n// Returns: { a: 1, b: 2 }\n```\n\n#### Parameters\n\n- `keys` (`readonly P[]`): The array that will become the object's keys.\n- `values` (`readonly V[]`): The array of values corresponding to each key.\n\n#### Returns\n\n(`Record<P, V>`): Returns a new object with keys and values combined.\n"
  },
  {
    "path": "docs/reference/array/zipWith.md",
    "content": "# zipWith\n\nCreates a new array by combining multiple arrays using a custom function.\n\n```typescript\nconst result = zipWith(...arrs, combine);\n```\n\n## Usage\n\n### `zipWith(...arrs, combine)`\n\nUse `zipWith` when you want to combine elements at the same position from multiple arrays in a desired way. It passes elements at the same index from each array to the combine function and creates a new array from the results.\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\n// Add two number arrays.\nzipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// Concatenate strings.\nzipWith(['a', 'b'], ['c', 'd'], ['e', 'f'], (a, b, c) => `${a}${b}${c}`);\n// Returns: ['ace', 'bdf']\n```\n\nIf the arrays have different lengths, it adjusts to the longest array's length. Empty positions in shorter arrays are passed as `undefined`.\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\nzipWith([1, 2], [10, 20, 30], (a, b) => (a ?? 0) + (b ?? 0));\n// Returns: [11, 22, 30]\n```\n\n#### Parameters\n\n- `arrs` (`Array<readonly T[]>`): The arrays to combine.\n- `combine` (`(...items: [...T[], number]) => R`): A function that receives elements at the same index from each array, followed by the index itself, and returns a new value.\n\n#### Returns\n\n(`R[]`): Returns a new array consisting of results from applying the combine function.\n"
  },
  {
    "path": "docs/reference/compat/array/castArray.md",
    "content": "# castArray (Lodash Compatibility)\n\n::: warning Use `Array.from()` or array literals (`[value]`)\n\nThis `castArray` function behaves complexly due to no-argument handling and `undefined` processing.\n\nInstead, use the clearer and more modern `Array.from()` or conditional array creation (`Array.isArray(value) ? value : [value]`).\n\n:::\n\nConverts a value to an array if it's not already an array.\n\n```typescript\nconst result = castArray(value);\n```\n\n## Usage\n\n### `castArray(value?)`\n\nUse `castArray` when you want to ensure any value becomes an array. If the value is already an array, it returns as is. Otherwise, it creates a new array containing that value.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\n// Convert a number to an array\ncastArray(1);\n// Returns: [1]\n\n// Convert a string to an array\ncastArray('hello');\n// Returns: ['hello']\n\n// Convert an object to an array\ncastArray({ a: 1 });\n// Returns: [{ a: 1 }]\n```\n\nValues that are already arrays are returned as is.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray([1, 2, 3]);\n// Returns: [1, 2, 3]\n\ncastArray(['a', 'b']);\n// Returns: ['a', 'b']\n```\n\n`null` and `undefined` are also converted to arrays.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray(null);\n// Returns: [null]\n\ncastArray(undefined);\n// Returns: [undefined]\n```\n\nWhen called without arguments, returns an empty array.\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray();\n// Returns: []\n```\n\n#### Parameters\n\n- `value` (`T | readonly T[]`, optional): The value to convert to an array. If no argument is provided, returns an empty array.\n\n#### Returns\n\n(`T[]`): Returns the array if the input is already an array, otherwise returns a new array containing the input value.\n"
  },
  {
    "path": "docs/reference/compat/array/chunk.md",
    "content": "# chunk (Lodash Compatibility)\n\n::: warning Use [`chunk`](../../array/chunk.md) from `es-toolkit`\n\nThis `chunk` function operates slower due to handling of `null`, `undefined`, and default `size` values.\n\nFor better performance and a more modern implementation, use [chunk](../../array/chunk.md) from `es-toolkit` instead.\n\n:::\n\nDivides an array into smaller arrays of a specified size.\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## Usage\n\n### `chunk(arr, size?)`\n\nUse `chunk` when you want to split a long array into multiple smaller arrays of the same size. If the array cannot be divided evenly, the last array will contain the remaining elements.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\n// Divide an array of numbers into chunks of size 2.\nchunk([1, 2, 3, 4], 2);\n// Returns: [[1, 2], [3, 4]]\n\n// Divide an array of strings into chunks of size 3.\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n\n// When not evenly divisible\nchunk([1, 2, 3, 4, 5], 2);\n// Returns: [[1, 2], [3, 4], [5]]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk(null, 2);\n// Returns: []\n\nchunk(undefined, 2);\n// Returns: []\n```\n\nIf size is 0 or negative, returns an empty array.\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0);\n// Returns: []\n\nchunk([1, 2, 3], -1);\n// Returns: []\n```\n\n#### Parameters\n\n- `arr` (`ArrayLike<T> | null | undefined`): The array to divide.\n- `size` (`number`, optional): The size of each smaller array. Default is `1`.\n\n#### Returns\n\n(`T[][]`): Returns a two-dimensional array divided by size `size`.\n"
  },
  {
    "path": "docs/reference/compat/array/compact.md",
    "content": "# compact (Lodash compatible)\n\n::: warning Use [`compact`](../../array/compact.md) from `es-toolkit` instead\n\nThis `compact` function operates slowly due to handling `null` or `undefined`, `size` default value processing, and more.\n\nUse the faster and more modern [compact](../../array/compact.md) from `es-toolkit` instead.\n\n:::\n\nRemoves falsy values from an array.\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## Usage\n\n### `compact(arr)`\n\nUse `compact` when you want to remove falsy values like `false`, `null`, `0`, `\"\"`, `undefined`, `NaN` from an array.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\n// Remove falsy values\ncompact([0, 1, false, 2, '', 3]);\n// Returns: [1, 2, 3]\n\ncompact(['a', null, 'b', undefined, 'c', NaN]);\n// Returns: ['a', 'b', 'c']\n\n// BigInt 0 is also removed\ncompact([0n, 1n, false, 2n]);\n// Returns: [1n, 2n]\n\n// Works with empty arrays\ncompact([]);\n// Returns: []\n\n// When all values are falsy\ncompact([false, null, 0, '', undefined, NaN]);\n// Returns: []\n```\n\nTruthy values are preserved.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact([1, 'hello', true, {}, []]);\n// Returns: [1, 'hello', true, {}, []]\n\n// Non-zero numbers\ncompact([0, -1, 2, -3]);\n// Returns: [-1, 2, -3]\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact(null);\n// Returns: []\n\ncompact(undefined);\n// Returns: []\n```\n\n#### Parameters\n\n- `arr` (`ArrayLike<T> | null | undefined`): The array to compact.\n\n#### Returns\n\n(`T[]`): Returns a new array with falsy values removed.\n"
  },
  {
    "path": "docs/reference/compat/array/concat.md",
    "content": "# concat (Lodash compatible)\n\n::: warning Use spread operator or [`Array#concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) instead\n\nThis `concat` function operates inefficiently due to the complex way Lodash handles array concatenation.\n\nUse the more intuitive and modern spread operator `[...arr1, ...arr2]` or `arr1.concat(arr2)` instead.\n\n:::\n\nConcatenates multiple arrays and values into a single array.\n\n```typescript\nconst result = concat(...values);\n```\n\n## Usage\n\n### `concat(...values)`\n\nUse `concat` when you want to concatenate multiple values and arrays in order to create a new array. Arrays are flattened, and individual values are added as is.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// Concatenate individual values\nconcat(1, 2, 3);\n// Returns: [1, 2, 3]\n\n// Concatenate arrays\nconcat([1, 2], [3, 4]);\n// Returns: [1, 2, 3, 4]\n\n// Concatenate values and arrays together\nconcat(1, [2, 3], 4);\n// Returns: [1, 2, 3, 4]\n```\n\nNested arrays are flattened only one level deep.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// Nested arrays are flattened only one level\nconcat([1, [2, 3]], 4);\n// Returns: [1, [2, 3], 4]\n\n// More deeply nested arrays\nconcat([1, [2, [3, 4]]], 5);\n// Returns: [1, [2, [3, 4]], 5]\n```\n\nHandles empty arrays and empty values.\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// With empty arrays\nconcat([], [1, 2], [], [3]);\n// Returns: [1, 2, 3]\n\n// When no values are provided\nconcat();\n// Returns: []\n```\n\n#### Parameters\n\n- `values` (`...(T | readonly T[])`): Values and arrays to concatenate. Each array is flattened one level.\n\n#### Returns\n\n(`T[]`): Returns a new array with all values and array elements concatenated in order.\n"
  },
  {
    "path": "docs/reference/compat/array/countBy.md",
    "content": "# countBy (Lodash compatible)\n\n::: warning Use `countBy` from `es-toolkit` instead\n\nThis `countBy` function operates slowly due to complex transformation function processing and type conversion.\n\nUse the faster and more modern [countBy](../../array/countBy.md) from `es-toolkit` instead.\n\n:::\n\nCounts the occurrences of elements in an array or object, grouped by a criterion.\n\n```typescript\nconst counts = countBy(collection, iteratee);\n```\n\n## Usage\n\n### `countBy(collection, iteratee?)`\n\nUse `countBy` when you want to group elements of an array or object by some criterion and count how many elements are in each group. The value returned by the iteratee function becomes the key, and the count of elements with that key becomes the value.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// Group numbers by floor value\ncountBy([6.1, 4.2, 6.3], Math.floor);\n// Returns: { '4': 1, '6': 2 }\n\n// Group strings by length\ncountBy(['one', 'two', 'three'], 'length');\n// Returns: { '3': 2, '5': 1 }\n\n// Group users by age range\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 35 },\n  { name: 'Charlie', age: 25 },\n];\ncountBy(users, user => Math.floor(user.age / 10) * 10);\n// Returns: { '20': 2, '30': 1 }\n```\n\nWorks with objects too.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// Classify object values by type\nconst obj = { a: 1, b: 'string', c: 2, d: 'text' };\ncountBy(obj, value => typeof value);\n// Returns: { 'number': 2, 'string': 2 }\n```\n\nWhen used without an iteratee function, groups by the value itself.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// Group by value itself\ncountBy([1, 2, 1, 3, 2, 1]);\n// Returns: { '1': 3, '2': 2, '3': 1 }\n\n// Group boolean values\ncountBy([true, false, true, true]);\n// Returns: { 'true': 3, 'false': 1 }\n```\n\n`null` or `undefined` collections return an empty object.\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\ncountBy(null);\n// Returns: {}\n\ncountBy(undefined);\n// Returns: {}\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): The array or object to process.\n- `iteratee` (`ValueIteratee<T>`, optional): The function that defines the grouping criterion for each element. Can be a function, property name, or partial object.\n\n#### Returns\n\n(`Record<string, number>`): Returns an object with keys for each group and values representing the count of elements in that group.\n"
  },
  {
    "path": "docs/reference/compat/array/difference.md",
    "content": "# difference (Lodash compatible)\n\n::: warning Use `difference` from `es-toolkit` instead\n\nThis `difference` function operates in a complex manner due to handling `null` or `undefined` and processing multiple array arguments.\n\nUse the faster and more modern [difference](../../array/difference.md) from `es-toolkit` instead.\n\n:::\n\nComputes the difference between the first array and the other arrays, excluding values from the first array that are present in the other arrays.\n\n```typescript\nconst result = difference(arr, ...values);\n```\n\n## Usage\n\n### `difference(arr, ...values)`\n\nUse `difference` when you want to remove all values from the first array that are present in the other arrays. The order is preserved from the first array.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// Basic usage\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\nconst array3 = [5, 6];\ndifference(array1, array2, array3);\n// Returns: [1, 3]\n\n// String arrays\ndifference(['a', 'b', 'c'], ['b'], ['c', 'd']);\n// Returns: ['a']\n\n// Handling duplicates\ndifference([1, 2, 2, 3], [2]);\n// Returns: [1, 3]\n```\n\nHandles empty arrays or empty differences.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// Difference with empty array\ndifference([1, 2, 3], []);\n// Returns: [1, 2, 3]\n\n// When all values are excluded\ndifference([1, 2, 3], [1, 2, 3]);\n// Returns: []\n\n// When there are no overlapping values\ndifference([1, 2], [3, 4]);\n// Returns: [1, 2]\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\ndifference(null, [1, 2]);\n// Returns: []\n\ndifference(undefined, [1, 2]);\n// Returns: []\n\ndifference([1, 2, 3], null, undefined);\n// Returns: [1, 2, 3] (null and undefined are ignored)\n```\n\nSupports array-like objects.\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// Array-like objects\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 4, length: 2 };\ndifference(arrayLike1, arrayLike2);\n// Returns: [1, 3]\n```\n\n#### Parameters\n\n- `arr` (`ArrayLike<T> | null | undefined`): The base array to compute the difference from.\n- `values` (`...ArrayLike<T>[]`): Arrays containing values to exclude.\n\n#### Returns\n\n(`T[]`): Returns a new array with values from the first array excluding values present in the other arrays.\n"
  },
  {
    "path": "docs/reference/compat/array/differenceBy.md",
    "content": "# differenceBy (Lodash compatible)\n\n::: warning Use `differenceBy` from `es-toolkit` instead\n\nThis `differenceBy` function operates slowly due to complex argument processing and iteratee transformation.\n\nUse the faster and more modern [differenceBy](../../array/differenceBy.md) from `es-toolkit` instead.\n\n:::\n\nComputes the difference between the first array and other arrays after applying an iteratee function to transform the values for comparison.\n\n```typescript\nconst result = differenceBy(array, ...values, iteratee);\n```\n\n## Usage\n\n### `differenceBy(array, ...values, iteratee)`\n\nUse `differenceBy` when you want to remove elements from the first array that have equivalent transformed values in the other arrays. This is useful for comparing arrays of objects by a specific property or transformed value.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// Compare using Math.floor\ndifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n// Returns: [1.2] (2.1 is excluded because Math.floor(2.1) === Math.floor(2.3))\n\n// Compare by string length\ndifferenceBy(['one', 'two', 'three'], ['four', 'eight'], 'length');\n// Returns: ['one', 'two'] (three is excluded because it has the same length as eight)\n\n// Compare objects by property\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [{ id: 1, name: 'Different Alice' }];\ndifferenceBy(users1, users2, 'id');\n// Returns: [{ id: 2, name: 'Bob' }] (excludes object with id 1)\n```\n\nCan exclude from multiple arrays at once.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// Exclude from multiple arrays\ndifferenceBy([2.1, 1.2, 3.5], [2.3], [1.4], [3.2], Math.floor);\n// Returns: [] (all elements are excluded)\n\n// Compare strings by length from multiple arrays\ndifferenceBy(['a', 'bb', 'ccc'], ['x'], ['yy'], ['zzz'], 'length');\n// Returns: [] (lengths 1, 2, 3 are all excluded)\n```\n\nWithout an iteratee function, it behaves like regular `difference`.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// Without iteratee function\ndifferenceBy([1, 2, 3], [2, 4]);\n// Returns: [1, 3]\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\ndifferenceBy(null, [1, 2], Math.floor);\n// Returns: []\n\ndifferenceBy(undefined, [1, 2], x => x);\n// Returns: []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The base array to compute the difference from.\n- `values` (`...ArrayLike<T>[]`): Arrays containing values to exclude.\n- `iteratee` (`ValueIteratee<T>`): The function that transforms each element for comparison. Can be a function, property name, or partial object.\n\n#### Returns\n\n(`T[]`): Returns a new array with elements excluded based on the transformed values.\n"
  },
  {
    "path": "docs/reference/compat/array/differenceWith.md",
    "content": "# differenceWith (Lodash compatible)\n\n::: warning Use `differenceWith` from `es-toolkit` instead\n\nThis `differenceWith` function operates slowly due to handling `null` or `undefined`, processing multiple arrays, and `ArrayLike` type processing.\n\nUse the faster and more modern [differenceWith](../../array/differenceWith.md) from `es-toolkit` instead.\n\n:::\n\nRemoves elements from the first array that are present in the other arrays using a comparator function.\n\n```typescript\nconst result = differenceWith(array, ...values, comparator);\n```\n\n## Usage\n\n### `differenceWith(array, ...values, comparator)`\n\nUse `differenceWith` when you want to compute the difference using a comparator function to compare elements. The last argument becomes the comparator function.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// Compare objects by id\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst others = [{ id: 2 }];\nconst comparator = (a, b) => a.id === b.id;\n\ndifferenceWith(objects, others, comparator);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// Exclude from multiple arrays at once\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\n\ndifferenceWith(array, values1, values2, comparator);\n// Returns: [{ id: 1 }, { id: 4 }]\n```\n\nWithout a comparator function, it behaves like regular `difference`.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// Without comparator, uses regular comparison\ndifferenceWith([1, 2, 3], [2], [3]);\n// Returns: [1]\n```\n\nCan use complex comparison logic.\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'alice', age: 25 },\n  { name: 'bob', age: 30 },\n  { name: 'charlie', age: 35 },\n];\nconst excludeUsers = [{ name: 'bob', age: 25 }]; // Different age\n\n// Compare only by name\nconst compareByName = (a, b) => a.name === b.name;\ndifferenceWith(users, excludeUsers, compareByName);\n// Returns: [{ name: 'alice', age: 25 }, { name: 'charlie', age: 35 }]\n// bob is excluded (even though age is different, name matches)\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The base array to compute the difference from.\n- `...values` (`Array<ArrayLike<T>>` + `(a: T, b: T) => boolean`): Arrays containing elements to exclude, with the last argument being the comparator function.\n\n#### Returns\n\n(`T[]`): Returns a new array with elements from the first array excluding those found in the other arrays using the comparator function.\n"
  },
  {
    "path": "docs/reference/compat/array/drop.md",
    "content": "# drop (Lodash Compatibility)\n\n::: warning Use `drop` from `es-toolkit`\n\nThis `drop` function operates in a complex manner due to handling of `null` or `undefined`, `toInteger` conversion, etc.\n\nInstead, use the faster and more modern [`drop`](../../array/drop.md) from `es-toolkit`.\n\n:::\n\nRemoves a specified number of elements from the beginning of an array.\n\n```typescript\nconst result = drop(array, n);\n```\n\n## Usage\n\n### `drop(array, n?)`\n\nUse `drop` when you want to remove several elements from the beginning of an array and get the rest. By default, it removes the first element.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// Basic usage (removes first element)\ndrop([1, 2, 3, 4, 5]);\n// Returns: [2, 3, 4, 5]\n\n// Remove first 2 elements\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// Remove first 3 elements\ndrop(['a', 'b', 'c', 'd'], 3);\n// Returns: ['d']\n```\n\nWhen specifying 0 or a negative number, it returns the original array as is.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// Remove 0 elements\ndrop([1, 2, 3], 0);\n// Returns: [1, 2, 3]\n\n// Specify negative number\ndrop([1, 2, 3], -1);\n// Returns: [1, 2, 3]\n```\n\nWhen specifying a number larger than the array, it returns an empty array.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// Specify number larger than array size\ndrop([1, 2, 3], 5);\n// Returns: []\n\n// Remove from empty array\ndrop([], 1);\n// Returns: []\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\ndrop(null, 1);\n// Returns: []\n\ndrop(undefined, 2);\n// Returns: []\n```\n\nArray-like objects are also supported.\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// Array-like object\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\ndrop(arrayLike, 1);\n// Returns: ['b', 'c']\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array from which elements will be removed.\n- `n` (`number`, optional): The number of elements to remove. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array with the specified number of elements removed from the beginning.\n"
  },
  {
    "path": "docs/reference/compat/array/dropRight.md",
    "content": "# dropRight (Lodash Compatibility)\n\n::: warning Use `dropRight` from `es-toolkit`\n\nThis `dropRight` function operates slowly due to handling `null` or `undefined`, `guard` parameter processing, `toInteger` conversion, etc.\n\nInstead, use the faster and more modern [`dropRight`](../../array/dropRight.md) from `es-toolkit`.\n\n:::\n\nReturns a new array with a specified number of elements removed from the end.\n\n```typescript\nconst result = dropRight(array, itemsCount);\n```\n\n## Usage\n\n### `dropRight(array, itemsCount)`\n\nUse `dropRight` when you want to remove a certain number of elements from the end of an array and create a new array with the remaining elements.\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\n// Remove the last 2 elements from a number array.\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// Remove the last 1 element from a string array.\ndropRight(['a', 'b', 'c'], 1);\n// Returns: ['a', 'b']\n\n// If the number to remove is not specified, the default value 1 is used.\ndropRight([1, 2, 3]);\n// Returns: [1, 2]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\ndropRight(null, 2); // []\ndropRight(undefined, 2); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove elements from.\n- `itemsCount` (`number`, optional): The number of elements to remove from the end of the array. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array with `itemsCount` elements removed from the end.\n"
  },
  {
    "path": "docs/reference/compat/array/dropRightWhile.md",
    "content": "# dropRightWhile (Lodash Compatibility)\n\n::: warning Use `dropRightWhile` from `es-toolkit`\n\nThis `dropRightWhile` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, support for various predicate function formats, etc.\n\nInstead, use the faster and more modern [`dropRightWhile`](../../array/dropRightWhile.md) from `es-toolkit`.\n\n:::\n\nRemoves elements from the end of an array based on a predicate function.\n\n```typescript\nconst result = dropRightWhile(array, predicate);\n```\n\n## Usage\n\n### `dropRightWhile(array, predicate)`\n\nUse `dropRightWhile` when you want to consecutively remove elements from the end of an array that satisfy a specific condition. Removal stops when the predicate function returns `false`.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\n// Using a function as a predicate.\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ndropRightWhile(users, user => !user.active);\n// Returns: [{ user: 'barney', active: true }]\n\n// Matching with an object pattern.\ndropRightWhile(users, { user: 'pebbles', active: false });\n// Returns: [{ user: 'barney', active: true }, { user: 'fred', active: false }]\n\n// Specifying property and value in array format.\ndropRightWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: true }]\n\n// Checking condition by property name.\ndropRightWhile(users, 'active');\n// Returns: [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\ndropRightWhile(null, x => x > 0); // []\ndropRightWhile(undefined, x => x > 0); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove elements from.\n- `predicate` (`ListIteratee<T>`, optional): The predicate function to apply to each element. Can accept a function, object pattern, array pattern, or property name.\n\n#### Returns\n\n(`T[]`): Returns a new array starting from the first element that does not satisfy the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/dropWhile.md",
    "content": "# dropWhile (Lodash Compatibility)\n\n::: warning Use `dropWhile` from `es-toolkit`\n\nThis `dropWhile` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, support for various predicate function formats, etc.\n\nInstead, use the faster and more modern [`dropWhile`](../../array/dropWhile.md) from `es-toolkit`.\n\n:::\n\nRemoves elements from the beginning of an array based on a predicate function.\n\n```typescript\nconst result = dropWhile(array, predicate);\n```\n\n## Usage\n\n### `dropWhile(array, predicate)`\n\nUse `dropWhile` when you want to consecutively remove elements from the beginning of an array that satisfy a specific condition. Removal stops when the predicate function returns `false`.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\n// Using a function as a predicate.\ndropWhile([1, 2, 3, 4, 5], n => n < 3);\n// Returns: [3, 4, 5]\n\n// Matching with an object pattern.\nconst users = [\n  { name: 'alice', active: false },\n  { name: 'bob', active: false },\n  { name: 'charlie', active: true },\n];\n\ndropWhile(users, { active: false });\n// Returns: [{ name: 'charlie', active: true }]\n\n// Specifying property and value in array format.\ndropWhile(users, ['active', false]);\n// Returns: [{ name: 'charlie', active: true }]\n\n// Checking condition by property name.\nconst items = [{ visible: false }, { visible: false }, { visible: true }];\n\ndropWhile(items, 'visible');\n// Returns: [{ visible: false }, { visible: false }, { visible: true }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\ndropWhile(null, x => x > 0); // []\ndropWhile(undefined, x => x > 0); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove elements from.\n- `predicate` (`ListIteratee<T>`, optional): The predicate function to apply to each element. Can accept a function, object pattern, array pattern, or property name. Default is `identity`.\n\n#### Returns\n\n(`T[]`): Returns a new array starting from the first element that does not satisfy the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/each.md",
    "content": "# each (Lodash Compatibility)\n\n::: warning Use `Array.prototype.forEach`\n\nThis `each` function operates slowly due to complex type processing and support for various collection types.\n\nInstead, use the faster and more modern `Array.prototype.forEach`.\n\n:::\n\nPerforms an iteration operation on each element of an array or object.\n\n```typescript\nconst result = each(collection, iteratee);\n```\n\n## Usage\n\n### `each(collection, iteratee)`\n\nIterates through each element of an array, object, or string and executes the given function. For arrays, it iterates in index order; for objects, it iterates through enumerable properties.\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\n// Iterate array\neach([1, 2, 3], (value, index) => console.log(value, index));\n// Logs: 1 0, 2 1, 3 2\n\n// Iterate object\neach({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// Logs: 'a' 1, 'b' 2\n\n// Iterate string\neach('hello', (char, index) => console.log(char, index));\n// Logs: 'h' 0, 'e' 1, 'l' 2, 'l' 3, 'o' 4\n```\n\nIf the function returns `false`, iteration stops.\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\neach([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // Stop at 2\n});\n// Logs: 1, 2\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): The collection to iterate over.\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, optional): The function to execute for each element. Default is the `identity` function.\n\n#### Returns\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): Returns the original collection.\n"
  },
  {
    "path": "docs/reference/compat/array/eachRight.md",
    "content": "# eachRight (Lodash Compatibility)\n\n::: warning Use `forEachRight` from `es-toolkit`\n\nThis `eachRight` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, support for various predicate function formats, etc.\n\nInstead, use the faster and more modern [`forEachRight`](../../array/forEachRight.md) from `es-toolkit`.\n\n:::\n\nPerforms an iteration operation from right to left on each element of an array or object.\n\n```typescript\nconst result = eachRight(collection, iteratee);\n```\n\n## Usage\n\n### `eachRight(collection, iteratee)`\n\nIterates through each element of an array, object, or string from right to left and executes the given function. For arrays, it iterates in reverse order from the last index; for objects, it iterates through enumerable properties in reverse order.\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\n// Iterate array in reverse order\neachRight([1, 2, 3], (value, index) => console.log(value, index));\n// Logs: 3 2, 2 1, 1 0\n\n// Iterate object in reverse order\neachRight({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// Logs: 'b' 2, 'a' 1\n\n// Iterate string in reverse order\neachRight('hello', (char, index) => console.log(char, index));\n// Logs: 'o' 4, 'l' 3, 'l' 2, 'e' 1, 'h' 0\n```\n\nIf the function returns `false`, iteration stops.\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\neachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // Stop at 2\n});\n// Logs: 4, 3, 2\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): The collection to iterate over.\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, optional): The function to execute for each element. Default is the `identity` function.\n\n#### Returns\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): Returns the original collection.\n"
  },
  {
    "path": "docs/reference/compat/array/every.md",
    "content": "# every (Lodash Compatibility)\n\n::: warning Use `Array.prototype.every()`\n\nThis `every` function operates slowly due to complex object processing, support for various condition formats, etc.\n\nInstead, use the faster and more modern `Array.prototype.every()`.\n\n:::\n\nChecks if all values in an array or object meet the given condition.\n\n```typescript\nconst result = every(collection, predicate);\n```\n\n## Usage\n\n### `every(collection, predicate?)`\n\nUse `every` when you want to check if all elements in an array or object satisfy a specific condition. The condition can be specified in various formats such as a function, partial object, property-value pair, property name, etc.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\n// Using a test function\nconst numbers = [2, 4, 6, 8];\nevery(numbers, x => x % 2 === 0);\n// Returns: true\n\n// Using a property name\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n];\nevery(users, 'active');\n// Returns: true\n\n// Using a partial object\nevery(users, { active: true });\n// Returns: true\n\n// Using a property-value pair\nevery(users, ['active', true]);\n// Returns: true\n```\n\nIt works the same way for objects.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 85, science: 92 };\nevery(scores, score => score >= 80);\n// Returns: true\n```\n\n`null` or `undefined` are treated as empty collections and return `true`.\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nevery(null);\n// Returns: true\n\nevery(undefined);\n// Returns: true\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): The array or object to check.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, optional): The condition to check. Can use a function, partial object, property-value pair, or property name. Defaults to the `identity` function.\n\n#### Returns\n\n(`boolean`): Returns `true` if all elements satisfy the condition, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/array/fill.md",
    "content": "# fill (Lodash Compatibility)\n\n::: warning Use `fill` from `es-toolkit`\n\nThis `fill` function operates with complex behavior due to handling `null` or `undefined`, support for array-like objects, etc.\n\nInstead, use the faster and more modern [`fill`](../../array/fill.md) from `es-toolkit`.\n\n:::\n\nFills the elements of an array with a specified value.\n\n```typescript\nconst result = fill(array, value, start, end);\n```\n\n## Usage\n\n### `fill(array, value, start?, end?)`\n\nUse `fill` when you want to fill a specific range or the entire array with the same value. It modifies the original array directly.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\n// Fill entire array\nconst arr1 = [1, 2, 3];\nfill(arr1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// Fill specific range\nconst arr2 = [1, 2, 3, 4, 5];\nfill(arr2, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n\n// Use negative indices\nconst arr3 = [1, 2, 3, 4, 5];\nfill(arr3, 'x', -3, -1);\n// Returns: [1, 2, 'x', 'x', 5]\n```\n\nArray-like objects are also supported.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 1, 1: 2, 2: 3, length: 3 };\nfill(arrayLike, 'a', 1, 2);\n// Returns: { 0: 1, 1: 'a', 2: 3, length: 3 }\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill(null, 'a');\n// Returns: []\n\nfill(undefined, 'a');\n// Returns: []\n```\n\nStrings are read-only, so they are returned as is.\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill('abc', 'x');\n// Returns: 'abc' (not modified)\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to fill.\n- `value` (`U`): The value to fill the array with.\n- `start` (`number`, optional): The start position. Defaults to `0`.\n- `end` (`number`, optional): The end position (not included). Defaults to `array.length`.\n\n#### Returns\n\n(`ArrayLike<T | U>`): Returns the array filled with the value.\n"
  },
  {
    "path": "docs/reference/compat/array/filter.md",
    "content": "# filter (Lodash Compatibility)\n\n::: warning Use `Array.prototype.filter()`\n\nThis `filter` function operates slowly due to complex object processing, support for various condition formats, etc.\n\nInstead, use the faster and more modern `Array.prototype.filter()`.\n\n:::\n\nCreates a new array with elements that satisfy the given condition.\n\n```typescript\nconst result = filter(collection, predicate);\n```\n\n## Usage\n\n### `filter(collection, predicate)`\n\nUse `filter` when you want to filter out only elements that satisfy a specific condition from an array or object. The condition can be specified in various formats such as a function, partial object, property-value pair, property name, etc.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\n// Using a test function\nconst numbers = [1, 2, 3, 4, 5];\nfilter(numbers, x => x % 2 === 0);\n// Returns: [2, 4]\n\n// Using a property name\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nfilter(users, 'active');\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// Using a partial object\nfilter(users, { active: true });\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// Using a property-value pair\nfilter(users, ['active', true]);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n```\n\nIt works the same way for objects, returning an array of values that satisfy the condition.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfilter(scores, score => score >= 80);\n// Returns: [90, 85]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nfilter(null, x => x > 0);\n// Returns: []\n\nfilter(undefined, x => x > 0);\n// Returns: []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): The array or object to filter.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): The filtering condition. Can use a function, partial object, property-value pair, or property name.\n\n#### Returns\n\n(`T[]`): Returns a new array consisting of elements that satisfy the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/find.md",
    "content": "# find (Lodash Compatibility)\n\n::: warning Use `Array.prototype.find()`\n\nThis `find` function operates slowly due to complex object processing, support for various condition formats, etc.\n\nInstead, use the faster and more modern `Array.prototype.find()`.\n\n:::\n\nFinds the first element in an array or object that matches the condition.\n\n```typescript\nconst result = find(collection, predicate, fromIndex);\n```\n\n## Usage\n\n### `find(collection, predicate, fromIndex?)`\n\nUse `find` when you want to find the first element that satisfies a specific condition in an array or object. The condition can be specified in various formats such as a function, partial object, property-value pair, property name, etc.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\n// Using a test function\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 3);\n// Returns: 4\n\n// Using a property name\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n];\nfind(users, 'active');\n// Returns: { name: 'Bob', active: true }\n\n// Using a partial object\nfind(users, { active: true });\n// Returns: { name: 'Bob', active: true }\n\n// Using a property-value pair\nfind(users, ['name', 'Charlie']);\n// Returns: { name: 'Charlie', active: true }\n```\n\nYou can specify a starting index.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 2, 2);\n// Returns: 3 (starts searching from index 2)\n```\n\nIt works the same way for objects.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfind(scores, score => score >= 80);\n// Returns: 90\n```\n\n`null` or `undefined` are treated as empty collections and return `undefined`.\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nfind(null, x => x > 0);\n// Returns: undefined\n\nfind(undefined, x => x > 0);\n// Returns: undefined\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): The array or object to search.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): The search condition. Can use a function, partial object, property-value pair, or property name.\n- `fromIndex` (`number`, optional): The index to start searching from. Defaults to `0`.\n\n#### Returns\n\n(`T | undefined`): Returns the first element that satisfies the condition. If not found, returns `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/array/findIndex.md",
    "content": "# findIndex (Lodash Compatibility)\n\n::: warning Use `Array.prototype.findIndex`\n\nThis `findIndex` function operates slowly due to additional features such as handling various condition formats and `fromIndex` processing.\n\nUse the faster and more modern `Array.prototype.findIndex` instead.\n\n:::\n\nFinds the index of the first element in an array that matches a condition.\n\n```typescript\nconst index = findIndex(arr, doesMatch, fromIndex);\n```\n\n## Usage\n\n### `findIndex(arr, doesMatch, fromIndex)`\n\nUse `findIndex` when you want to find the position of the first element in an array that matches a specific condition. You can specify the condition in various ways. If no element matches the condition, it returns `-1`.\n\nWhen you specify a condition as a function, it executes the function for each element and returns the index of the first element that returns true.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { id: 1, name: 'Alice', active: false },\n  { id: 2, name: 'Bob', active: true },\n  { id: 3, name: 'Charlie', active: true },\n];\n\n// Specify condition with a function\nfindIndex(users, user => user.active);\n// Returns: 1\n```\n\nWhen you specify a condition as a partial object, it returns the index of the first element that matches those properties.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// Specify condition with a partial object\nfindIndex(users, { name: 'Bob', active: true });\n// Returns: 1\n```\n\nWhen you specify a condition as an array of property name and value, it returns the index of the first element whose property matches that value.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// Specify condition with a [property, value] array\nfindIndex(users, ['active', true]);\n// Returns: 1\n```\n\nWhen you specify only a property name, it returns the index of the first element where that property evaluates to true.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// Specify condition with a property name\nfindIndex(users, 'active');\n// Returns: 1\n```\n\nWhen you specify `fromIndex`, the search starts from that index. Negative values are calculated from the end of the array.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// Start search from index 2\nfindIndex(users, user => user.active, 2);\n// Returns: 2\n\n// Search from the second element from the end\nfindIndex(users, user => user.active, -2);\n// Returns: 1\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nfindIndex(null, user => user.active); // -1\nfindIndex(undefined, 'active'); // -1\n```\n\n#### Parameters\n\n- `arr` (`ArrayLike<T> | null | undefined`): The array to search.\n- `doesMatch` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, optional): The matching condition. Can be a function, partial object, key-value pair, or property name.\n- `fromIndex` (`number`, optional): The index to start the search from. Default is `0`.\n\n#### Returns\n\n(`number`): Returns the index of the first element that matches the condition. Returns `-1` if no element matches.\n"
  },
  {
    "path": "docs/reference/compat/array/findLast.md",
    "content": "# findLast (Lodash Compatibility)\n\n::: warning Use `Array.prototype.findLast`\n\nThis `findLast` function is complex and slow due to handling various types and special conditions.\n\nUse the faster and more modern `Array.prototype.findLast` instead.\n\n:::\n\nFinds the last element in an array or object that satisfies a condition.\n\n```typescript\nconst lastEven = findLast(array, predicate);\n```\n\n## Usage\n\n### `findLast(collection, predicate?, fromIndex?)`\n\nFinds the last element in an array or object that satisfies the given condition. Searches in reverse order from the end of the array and returns the first element that satisfies the condition.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\n// Specify condition with a function\nconst users = [\n  { user: 'barney', age: 36 },\n  { user: 'fred', age: 40 },\n  { user: 'pebbles', age: 18 },\n];\nfindLast(users, o => o.age < 40);\n// => { user: 'pebbles', age: 18 }\n\n// Specify condition with an object\nfindLast(users, { age: 36 });\n// => { user: 'barney', age: 36 }\n\n// Specify condition with a key-value pair\nfindLast(users, ['age', 18]);\n// => { user: 'pebbles', age: 18 }\n\n// Specify condition with a property name (last element with truthy value)\nfindLast(users, 'age');\n// => { user: 'fred', age: 40 }\n```\n\nYou can also specify a starting index for the search.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5, 4, 3, 2, 1];\nfindLast(numbers, n => n > 3, 6); // Search in reverse from index 6\n// => 4\n```\n\n`null` or `undefined` returns empty results.\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nfindLast(null, x => x > 0); // undefined\nfindLast(undefined, x => x > 0); // undefined\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to search.\n- `predicate` (`ListIterateeCustom<T, boolean>`, optional): The condition to apply to each element. Can be a function, object, key-value pair, or property name. Default is the `identity` function.\n- `fromIndex` (`number`, optional): The index to start the search from. If negative, it's calculated from the end. Default is the last index of the array.\n\n#### Returns\n\n(`T | undefined`): Returns the last element that satisfies the condition. Returns `undefined` if no element satisfies the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/findLastIndex.md",
    "content": "# findLastIndex (Lodash Compatibility)\n\n::: warning Use `Array.prototype.findLastIndex`\n\nThis `findLastIndex` function operates slowly due to additional features such as handling `null` or `undefined`, partial object matching, and property name matching.\n\nUse the faster and more modern `Array.prototype.findLastIndex` instead.\n\n:::\n\nFinds the index of the last element in an array that satisfies a condition.\n\n```typescript\nconst lastIndex = findLastIndex(array, predicate, fromIndex);\n```\n\n## Usage\n\n### `findLastIndex(array, predicate, fromIndex)`\n\nUse `findLastIndex` when you want to find the index of the first element that matches a given condition starting from the end of the array. Returns `-1` if no element satisfies the condition.\n\nThis function can specify the condition in various ways. When you pass a function, it executes the function for each element. When you pass a partial object, it checks if the element has those properties. When you pass an array-formatted key-value pair, it checks if a specific property matches the given value. When you pass a string, it checks if that property evaluates to a truthy value.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\n// Specify the condition using a function\nfindLastIndex(users, o => o.user === 'pebbles');\n// Returns: 2\n\n// Find a matching element using a partial object\nfindLastIndex(users, { user: 'barney', active: true });\n// Returns: 0\n\n// Find a matching element using a property-value pair\nfindLastIndex(users, ['active', false]);\n// Returns: 2\n\n// Find an element with a truthy value using a property name\nfindLastIndex(users, 'active');\n// Returns: 0\n```\n\nYou can also specify a starting position for the search. If `fromIndex` is negative, it's calculated from the end of the array.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// Search in reverse from index 3\nfindLastIndex(numbers, n => n < 4, 2);\n// Returns: 2\n\n// If you use a negative index, it's calculated from the end\nfindLastIndex(numbers, n => n > 2, -2);\n// Returns: 3\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nfindLastIndex(null, n => n > 0); // -1\nfindLastIndex(undefined, n => n > 0); // -1\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to search.\n- `predicate` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, optional): The condition to test each element. Can be a function, partial object, property-value pair, or property name. Default is the identity function.\n- `fromIndex` (`number`, optional): The index to start the search from. If negative, it's calculated from the end of the array. Default is `array.length - 1`.\n\n#### Returns\n\n(`number`): Returns the index of the last element that satisfies the condition. Returns `-1` if no element satisfies the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/first.md",
    "content": "# first (Lodash Compatibility)\n\n::: warning Use `head` from `es-toolkit`\n\nThis `first` function operates slowly due to handling `null` or `undefined` and array-like object conversion. The `head` function from `es-toolkit` operates faster and simpler without this additional processing.\n\nUse the faster and more modern [head](../../array/head.md) from `es-toolkit` instead.\n\n:::\n\nReturns the first element of an array.\n\n```typescript\nconst firstElement = first(array);\n```\n\n## Usage\n\n### `first(array)`\n\nUse `first` when you want to get the first element of an array. Returns `undefined` if the array is empty or is `null` or `undefined`.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\n// Get the first element from a regular array\nfirst([1, 2, 3]);\n// Returns: 1\n\n// Get the first element from a string array\nfirst(['a', 'b', 'c']);\n// Returns: 'a'\n\n// Empty array\nfirst([]);\n// Returns: undefined\n```\n\n`null` or `undefined` returns `undefined`.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nfirst(null); // undefined\nfirst(undefined); // undefined\n```\n\nCan be used with array-like objects.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\nfirst(arrayLike);\n// Returns: 'a'\n\n// Strings are also treated like arrays\nfirst('hello');\n// Returns: 'h'\n```\n\nFor type-guaranteed tuples, returns the exact type.\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst tuple = [1, 'two', true] as const;\nfirst(tuple);\n// Returns: 1 (type is inferred as 1)\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to get the first element from.\n\n#### Returns\n\n(`T | undefined`): Returns the first element of the array. Returns `undefined` if the array is empty or invalid.\n"
  },
  {
    "path": "docs/reference/compat/array/flatMap.md",
    "content": "# flatMap (Lodash Compatibility)\n\n::: warning Use `flatMap` from `es-toolkit`\n\nThis `flatMap` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, and supporting various condition function formats.\n\nUse the faster and more modern [flatMap](../../array/flatMap.md) from `es-toolkit` instead.\n\n:::\n\nApplies a function to each element and flattens the result.\n\n```typescript\nconst result = flatMap(collection, iteratee);\n```\n\n## Usage\n\n### `flatMap(collection, iteratee)`\n\nApplies an iteratee function to each element of a collection and returns an array flattened by one level. Supports arrays, objects, and strings, and can use various forms of iteratees.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\n// Apply a function to an array\nfunction duplicate(n) {\n  return [n, n];\n}\nflatMap([1, 2], duplicate);\n// Result: [1, 1, 2, 2]\n\n// Apply a function to an object\nconst obj = { a: 1, b: 2 };\nflatMap(obj, (value, key) => [key, value]);\n// Result: ['a', 1, 'b', 2]\n\n// Map with a string property\nconst users = [\n  { user: 'barney', hobbies: ['hiking', 'coding'] },\n  { user: 'fred', hobbies: ['reading'] },\n];\nflatMap(users, 'hobbies');\n// Result: ['hiking', 'coding', 'reading']\n```\n\nUsing without an iteratee flattens the values by one level.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst obj = { a: [1, 2], b: [3, 4] };\nflatMap(obj);\n// Result: [1, 2, 3, 4]\n```\n\nConditional mapping with a partial object is also possible.\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', age: 36, active: true },\n  { user: 'fred', age: 40, active: false },\n];\nflatMap(users, { active: false });\n// Result: [false, true] (matching result of elements where active is false)\n```\n\n#### Parameters\n\n- `collection` (`object | null | undefined`): The collection to iterate over. Can be an array, object, or string.\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, optional): The iteratee to apply to each element. Can be a function, property name, or partial object.\n\n#### Returns\n\n(`any[]`): Returns a new array flattened by one level after mapping.\n"
  },
  {
    "path": "docs/reference/compat/array/flatMapDeep.md",
    "content": "# flatMapDeep (Lodash Compatibility)\n\n::: warning Use [`flatMapDeep`](../../array/flatMapDeep.md) from `es-toolkit`\n\nThis `flatMapDeep` function operates slowly due to complex collection type handling and deep flattening logic.\n\nUse the faster and more modern [flatMapDeep](../../array/flatMapDeep.md) from `es-toolkit` instead.\n\n:::\n\nApplies a function to each element and recursively flattens the result.\n\n```typescript\nconst result = flatMapDeep(collection, iteratee);\n```\n\n## Usage\n\n### `flatMapDeep(collection, iteratee)`\n\nApplies an iteratee function to each element of a collection and returns an array flattened to infinite depth. All nested array structures are flattened into a one-dimensional array.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\n// Apply a function to an array and deeply flatten\nfunction duplicate(n) {\n  return [[[n, n]]];\n}\nflatMapDeep([1, 2], duplicate);\n// Result: [1, 1, 2, 2]\n\n// Apply a function to an object and deeply flatten\nconst obj = { a: 1, b: 2 };\nflatMapDeep(obj, (value, key) => [[[key, value]]]);\n// Result: ['a', 1, 'b', 2]\n\n// Map with a string property and deeply flatten\nconst users = [\n  { user: 'barney', hobbies: [['hiking', 'coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDeep(users, 'hobbies');\n// Result: ['hiking', 'coding', 'reading']\n```\n\nUsing without an iteratee recursively flattens the values.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst obj = { a: [[1, 2]], b: [[[3]]] };\nflatMapDeep(obj);\n// Result: [1, 2, 3]\n```\n\nConditional mapping with a partial object is also possible.\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: [true, false] },\n  { user: 'fred', active: [false] },\n];\nflatMapDeep(users, { active: [false] });\n// Result: [true, true] (matching result of elements with active array containing [false])\n```\n\n#### Parameters\n\n- `collection` (`object | null | undefined`): The collection to iterate over. Can be an array, object, or string.\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, optional): The iteratee to apply to each element. Can be a function, property name, or partial object.\n\n#### Returns\n\n(`any[]`): Returns a new array recursively flattened after mapping.\n"
  },
  {
    "path": "docs/reference/compat/array/flatMapDepth.md",
    "content": "# flatMapDepth (Lodash Compatibility)\n\n::: warning Use [flatMap](../../array/flatMap.md) from `es-toolkit`\n\nThis `flatMapDepth` function is implemented in a complex way to support various forms of iteratees and handle `null` or `undefined` for Lodash compatibility. The `flatMap` function in the main library only supports simple function iteratees, so it operates faster.\n\nUse the faster and more modern [flatMap](../../array/flatMap.md) from `es-toolkit` instead.\n\n:::\n\nTransforms each element of an array with an iteratee function and flattens to the specified depth.\n\n```typescript\nconst result = flatMapDepth(collection, iteratee, depth);\n```\n\n## Usage\n\n### `flatMapDepth(collection, iteratee, depth)`\n\nTransforms each element of an array or object with the given function, then flattens the result to the specified depth and returns a new array. Useful when you want to flatten nested array structures only to a desired depth.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// Transform an array and flatten to depth 2\nflatMapDepth([1, 2], n => [[n, n]], 2);\n// => [1, 1, 2, 2]\n\n// When limited to depth 1, it's not fully flattened\nflatMapDepth([1, 2], n => [[n, n]], 1);\n// => [[1, 1], [2, 2]]\n\n// Extract values from an object and flatten\nconst users = [\n  { user: 'barney', hobbies: [['hiking'], ['coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDepth(users, 'hobbies', 2);\n// => ['hiking', 'coding', 'reading']\n```\n\nThis function supports various forms of iteratees.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// Transform with a function\nflatMapDepth([1, 2, 3], n => [[n, n]], 2);\n\n// Extract values by property name\nconst objects = [{ items: [['a'], ['b']] }, { items: [['c']] }];\nflatMapDepth(objects, 'items', 2);\n// => ['a', 'b', 'c']\n\n// Partial matching with an object\nconst users = [{ active: [[true], [false]] }, { active: [[false]] }];\nflatMapDepth(users, { active: [[false]] }, 2);\n// => [true, true]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\nflatMapDepth(null, n => [n], 1); // => []\nflatMapDepth(undefined, n => [n], 1); // => []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, any> | Record<number, any> | object | null | undefined`): The array or object to iterate over.\n- `iteratee` (`((value: T, index: number, collection: any) => any) | string | object`, optional): The transformation function or property name to execute for each element. Default is `identity`.\n- `depth` (`number`, optional): The maximum depth to flatten. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array flattened to the specified depth after transformation with the iteratee.\n"
  },
  {
    "path": "docs/reference/compat/array/flatten.md",
    "content": "# flatten (Lodash Compatibility)\n\n::: warning Use `flatten` from `es-toolkit`\n\nThis `flatten` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, and supporting various condition function formats.\n\nUse the faster and more modern [flatten](../../array/flatten.md) from `es-toolkit` instead.\n\n:::\n\nFlattens an array by one level.\n\n```typescript\nconst result = flatten(array, depth);\n```\n\n## Usage\n\n### `flatten(value, depth)`\n\nFlattens a nested array by the specified depth. By default, it flattens only one level, and also supports Arguments objects and objects with Symbol.isConcatSpreadable.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\n// Basic flattening (one level)\nflatten([1, [2, [3, [4]], 5]]);\n// Result: [1, 2, [3, [4]], 5]\n\n// Specify depth\nflatten([1, [2, [3, [4]], 5]], 2);\n// Result: [1, 2, 3, [4], 5]\n\n// Support for Arguments objects\nfunction example() {\n  return flatten(arguments);\n}\nexample(1, [2, 3], [[4]]);\n// Result: [1, 2, 3, [4]]\n```\n\nEmpty arrays, null, or undefined return empty arrays.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nflatten(null); // []\nflatten(undefined); // []\nflatten([]); // []\n```\n\nObjects with Symbol.isConcatSpreadable are also flattened like arrays.\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nconst spreadable = { 0: 'a', 1: 'b', length: 2, [Symbol.isConcatSpreadable]: true };\nflatten([1, spreadable, 3]);\n// Result: [1, 'a', 'b', 3]\n```\n\n#### Parameters\n\n- `value` (`ArrayLike<T> | null | undefined`): The array to flatten.\n- `depth` (`number`, optional): The maximum depth to flatten. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new flattened array.\n"
  },
  {
    "path": "docs/reference/compat/array/flattenDeep.md",
    "content": "# flattenDeep (Lodash Compatibility)\n\n::: warning Use `flattenDeep` from `es-toolkit`\n\nThis `flattenDeep` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, and supporting various condition function formats.\n\nUse the faster and more modern [flattenDeep](../../array/flattenDeep.md) from `es-toolkit` instead.\n\n:::\n\nCompletely flattens an array.\n\n```typescript\nconst result = flattenDeep(array);\n```\n\n## Usage\n\n### `flattenDeep(value)`\n\nRecursively flattens a nested array at all depths. All nesting levels are removed, returning a completely flattened one-dimensional array.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\n// Completely flatten a deeply nested array\nflattenDeep([1, [2, [3, [4]], 5]]);\n// Result: [1, 2, 3, 4, 5]\n\n// Completely flatten a complex nested structure\nflattenDeep([1, [2, [3, [[[[4]]]]], 5]]);\n// Result: [1, 2, 3, 4, 5]\n\n// Support for mixed types\nflattenDeep(['a', ['b', ['c', [['d']]]]]);\n// Result: ['a', 'b', 'c', 'd']\n```\n\nEmpty arrays, null, or undefined return empty arrays.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep(null); // []\nflattenDeep(undefined); // []\nflattenDeep([]); // []\n```\n\nAlready flattened arrays are copied as-is.\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep([1, 2, 3, 4, 5]);\n// Result: [1, 2, 3, 4, 5]\n```\n\n#### Parameters\n\n- `value` (`ListOfRecursiveArraysOrValues<T> | null | undefined`): The array to completely flatten.\n\n#### Returns\n\n(`Array<T>`): Returns a new completely flattened array with all nesting removed.\n"
  },
  {
    "path": "docs/reference/compat/array/flattenDepth.md",
    "content": "# flattenDepth (Lodash Compatibility)\n\n::: warning Use `flatten` from `es-toolkit`\n\nThis `flattenDepth` function operates slowly due to handling `null` or `undefined`. The `flatten` function from `es-toolkit` operates faster and simpler without this additional processing.\n\nUse the faster and more modern [flatten](../../array/flatten.md) from `es-toolkit` instead.\n\n:::\n\nFlattens an array to the specified depth.\n\n```typescript\nconst flattened = flattenDepth(array, depth);\n```\n\n## Usage\n\n### `flattenDepth(array, depth)`\n\nUse `flattenDepth` when you want to flatten a nested array to a desired depth. When you specify a depth, it flattens the nested array only to that depth.\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\n// Flatten to depth 1\nflattenDepth([1, [2, [3, [4]], 5]], 1);\n// Returns: [1, 2, [3, [4]], 5]\n\n// Flatten to depth 2\nflattenDepth([1, [2, [3, [4]], 5]], 2);\n// Returns: [1, 2, 3, [4], 5]\n\n// If no depth is specified, it defaults to 1\nflattenDepth([1, [2, [3, [4]], 5]]);\n// Returns: [1, 2, [3, [4]], 5]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\nflattenDepth(null, 2); // []\nflattenDepth(undefined, 2); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to flatten.\n- `depth` (`number`, optional): The maximum depth to flatten. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array flattened to the specified depth.\n"
  },
  {
    "path": "docs/reference/compat/array/forEach.md",
    "content": "# forEach (Lodash compatible)\n\n::: warning Use `Array.prototype.forEach()` instead\n\nThis `forEach` function operates slowly due to complex object processing, early termination logic, and more.\n\nUse the faster and more modern `Array.prototype.forEach()` instead.\n\n:::\n\nExecutes a function for each element of an array or object.\n\n```typescript\nforEach(collection, callback);\n```\n\n## Usage\n\n### `forEach(collection, callback)`\n\nUse `forEach` when you want to iterate over all elements of an array or object and execute a callback function for each element. The iteration stops if the callback returns `false`.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\n// Iterate over array\nconst numbers = [1, 2, 3, 4, 5];\nconst results: number[] = [];\n\nforEach(numbers, value => {\n  results.push(value * 2);\n});\n// results is [2, 4, 6, 8, 10]\n\n// Early termination\nconst numbers2 = [1, 2, 3, 4, 5];\nconst results2: number[] = [];\n\nforEach(numbers2, value => {\n  if (value > 3) {\n    return false; // Stop iteration\n  }\n  results2.push(value);\n});\n// results2 is [1, 2, 3]\n```\n\nWorks the same way with objects.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nconst keys: string[] = [];\nconst values: number[] = [];\n\nforEach(obj, (value, key) => {\n  keys.push(key);\n  values.push(value);\n});\n// keys is ['a', 'b', 'c']\n// values is [1, 2, 3]\n```\n\n`null` or `undefined` are treated as empty collections.\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nforEach(null, value => {\n  console.log(value); // Not executed\n});\n\nforEach(undefined, value => {\n  console.log(value); // Not executed\n});\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): The array or object to iterate over.\n- `callback` (`(value: T, index: number | string, collection: any) => void | false`): The function to execute for each element. Returns `false` to stop iteration.\n\n#### Returns\n\n(`T`): Returns the original collection that was iterated over.\n"
  },
  {
    "path": "docs/reference/compat/array/forEachRight.md",
    "content": "# forEachRight (Lodash Compatibility)\n\n::: warning Use `forEachRight` from `es-toolkit`\n\nThis `forEachRight` function operates slowly due to handling `null` or `undefined`, `ArrayLike` type processing, support for various predicate function formats, etc.\n\nInstead, use the faster and more modern [`forEachRight`](../../array/forEachRight.md) from `es-toolkit`.\n\n:::\n\nIterates over elements of an array or object from right to left and executes a function for each element.\n\n```typescript\nforEachRight(collection, callback);\n```\n\n## Usage\n\n### `forEachRight(collection, callback)`\n\nIterates through each element of an array, object, or string from right to left and executes the given callback function. The iteration stops if the callback returns `false`.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\n// Iterate array in reverse order\nforEachRight([1, 2, 3], (value, index) => {\n  console.log(value, index);\n});\n// Output: 3 2, 2 1, 1 0\n\n// Iterate string in reverse order\nforEachRight('abc', (char, index) => {\n  console.log(char, index);\n});\n// Output: 'c' 2, 'b' 1, 'a' 0\n\n// Iterate object in reverse order\nforEachRight({ a: 1, b: 2, c: 3 }, (value, key) => {\n  console.log(value, key);\n});\n// Output: 3 'c', 2 'b', 1 'a'\n```\n\n`null` or `undefined` are returned as is.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight(null, value => console.log(value)); // null\nforEachRight(undefined, value => console.log(value)); // undefined\n```\n\nThe iteration stops if the callback returns `false`.\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  if (value === 2) {\n    return false; // Stop iteration\n  }\n});\n// Output: 4, 3, 2\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): The collection to iterate over. Can be an array, object, string, or null/undefined.\n- `callback` (`(item: any, index: any, arr: any) => unknown`, optional): The function to execute for each element. Returns `false` to stop iteration. Default is the `identity` function.\n\n#### Returns\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): Returns the original collection as is.\n"
  },
  {
    "path": "docs/reference/compat/array/groupBy.md",
    "content": "# groupBy (Lodash Compatibility)\n\n::: warning Use [`groupBy`](../../array/groupBy.md) from `es-toolkit`\n\nThis `groupBy` function operates slowly due to handling `null` or `undefined`, object support, complex type processing, etc.\n\nInstead, use the faster and more modern [`groupBy`](../../array/groupBy.md) from `es-toolkit`.\n\n:::\n\nGroups elements of an array or object based on a given condition.\n\n```typescript\nconst grouped = groupBy(collection, iteratee);\n```\n\n## Usage\n\n### `groupBy(collection, iteratee)`\n\nGroups each element of an array or object based on a given condition function and returns an object with groups. The condition can be provided in various forms such as a function, property name, partial object, etc.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\n// Group by function\nconst array = [6.1, 4.2, 6.3];\nconst result = groupBy(array, Math.floor);\n// result is { '4': [4.2], '6': [6.1, 6.3] }\n\n// Group by property name\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 30 },\n];\nconst byAge = groupBy(users, 'age');\n// byAge is { '25': [{ name: 'jane', age: 25 }], '30': [{ name: 'john', age: 30 }, { name: 'bob', age: 30 }] }\n\n// Group from object\nconst obj = { a: 6.1, b: 4.2, c: 6.3 };\nconst groupedObj = groupBy(obj, Math.floor);\n// groupedObj is { '4': [4.2], '6': [6.1, 6.3] }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\ngroupBy(null, x => x); // {}\ngroupBy(undefined, x => x); // {}\n```\n\nYou can also group by partial object or property-value pair.\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\n// Group by partial object\nconst byCategory = groupBy(products, { category: 'fruit' });\n// Group by property-value pair\nconst byName = groupBy(products, ['name', 'apple']);\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, T> | null | undefined`): The array or object to group.\n- `iteratee` (`Function | PropertyKey | Array | Object`, optional): The condition to group by. Can be a function, property name, property-value pair, or partial object. Default is the `identity` function.\n\n#### Returns\n\n(`Record<string, T[]>`): Returns an object where each key is the condition value and the value is an array of elements belonging to that group.\n"
  },
  {
    "path": "docs/reference/compat/array/head.md",
    "content": "# head (Lodash Compatibility)\n\n::: warning Use [`head`](../../array/head.md) from `es-toolkit`\n\nThis `head` function operates slowly due to `ArrayLike` object processing and array conversion process.\n\nInstead, use the faster and more modern [`head`](../../array/head.md) from `es-toolkit`.\n\n:::\n\nReturns the first element of an array.\n\n```typescript\nconst firstElement = head(array);\n```\n\n## Usage\n\n### `head(array)`\n\nReturns the first element of an array or array-like object. Returns `undefined` if the array is empty or invalid.\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\n// First element of number array\nconst numbers = [1, 2, 3, 4];\nconst first = head(numbers);\n// first is 1\n\n// First element of string array\nconst strings = ['a', 'b', 'c'];\nconst firstChar = head(strings);\n// firstChar is 'a'\n\n// Array-like object\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst firstItem = head(arrayLike);\n// firstItem is 'x'\n```\n\nEmpty arrays or invalid inputs return `undefined`.\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst noElement = head(emptyArray);\n// noElement is undefined\n\nhead(null); // undefined\nhead(undefined); // undefined\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array or array-like object to get the first element from.\n\n#### Returns\n\n(`T | undefined`): Returns the first element of the array, or `undefined` if the array is empty or invalid.\n"
  },
  {
    "path": "docs/reference/compat/array/includes.md",
    "content": "# includes (Lodash Compatibility)\n\n::: warning Use `Array.prototype.includes`\n\nThis `includes` function operates slowly due to object iteration and SameValueZero comparison processing. For arrays, JavaScript's native `Array.prototype.includes` method is faster and more standardized.\n\nInstead, use the faster and more modern `Array.prototype.includes`.\n\n:::\n\nChecks if a specific value is included in an array, object, or string.\n\n```typescript\nconst hasValue = includes(collection, target, fromIndex);\n```\n\n## Usage\n\n### `includes(collection, target, fromIndex)`\n\nUse `includes` when you want to check if a specific value exists in an array, object, or string. It compares values using the SameValueZero method.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// Find value in array\nincludes([1, 2, 3], 2);\n// Returns: true\n\n// Find in object values\nincludes({ a: 1, b: 'a', c: NaN }, 'a');\n// Returns: true\n\n// Find substring in string\nincludes('hello world', 'world');\n// Returns: true\n```\n\nYou can start searching from a specific index.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// Search from index 2\nincludes([1, 2, 3, 2], 2, 2);\n// Returns: true (found at index 3)\n\n// Negative index counts from the end\nincludes([1, 2, 3], 2, -2);\n// Returns: true\n```\n\n`null` or `undefined` always return `false`.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes(null, 1); // false\nincludes(undefined, 1); // false\n```\n\nYou can also search for substrings in strings.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// Search from beginning\nincludes('hello', 'e');\n// Returns: true\n\n// Search from specific position\nincludes('hello', 'e', 2);\n// Returns: false (no 'e' after index 2)\n```\n\nIt can correctly find `NaN` values.\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes([1, 2, NaN], NaN);\n// Returns: true\n\nincludes({ a: 1, b: NaN }, NaN);\n// Returns: true\n```\n\n#### Parameters\n\n- `collection` (`Array | Record<string, any> | string | null | undefined`): The array, object, or string to search.\n- `target` (`any`): The value to find.\n- `fromIndex` (`number`, optional): The index to start searching from. Negative values count from the end. Default is `0`.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value exists, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/array/indexOf.md",
    "content": "# indexOf (Lodash Compatibility)\n\n::: warning Use `Array.prototype.indexOf` or `Array.prototype.findIndex`\n\nThis `indexOf` function operates slowly due to additional logic for handling `NaN`.\n\nIf you're not looking for `NaN`, use the faster `Array.prototype.indexOf`. To find `NaN`, use `Array.prototype.findIndex` with `Number.isNaN`.\n\n:::\n\nFinds the index of the first occurrence of a given element in an array.\n\n```typescript\nconst index = indexOf(array, searchElement, fromIndex);\n```\n\n## Usage\n\n### `indexOf(array, searchElement, fromIndex?)`\n\nWorks almost the same as `Array.prototype.indexOf`, but can find `NaN` values. Use this when you need to find the position of a specific value in an array.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\n// Find element in number array\nconst array = [1, 2, 3, 4];\nindexOf(array, 3); // => 2\n\n// Find NaN value (Array.prototype.indexOf cannot find it)\nconst arrayWithNaN = [1, 2, NaN, 4];\nindexOf(arrayWithNaN, NaN); // => 2\n```\n\nYou can start searching from a specific index.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 1, 2, 3];\nindexOf(array, 2, 2); // => 4 (start searching from index 2)\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nindexOf(null, 1); // => -1\nindexOf(undefined, 1); // => -1\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to search.\n\n::: info `array` can be `ArrayLike<T>`, `null`, or `undefined`\n\nTo ensure full compatibility with lodash, the `indexOf` function handles `array` as follows:\n\n- If `array` is `ArrayLike<T>`, it uses `Array.from(...)` to convert it to an array.\n- If `array` is `null` or `undefined`, it's treated as an empty array.\n\n:::\n\n- `searchElement` (`T`): The value to find.\n- `fromIndex` (`number`, optional): The index to start searching from. If negative, it's calculated from the end of the array. Defaults to `0`.\n\n#### Returns\n\n(`number`): Returns the index of the first element in the array that matches the given value. Returns `-1` if no matching element is found.\n"
  },
  {
    "path": "docs/reference/compat/array/initial.md",
    "content": "# initial (Lodash Compatibility)\n\n::: warning Use [`initial`](../../array/initial.md) from `es-toolkit`\n\nThis `initial` function operates slowly due to `ArrayLike` object processing and array conversion process.\n\nInstead, use the faster and more modern [`initial`](../../array/initial.md) from `es-toolkit`.\n\n:::\n\nReturns a new array with all elements except the last one from an array.\n\n```typescript\nconst result = initial(array);\n```\n\n## Usage\n\n### `initial(array)`\n\nReturns a new array containing all elements except the last one from an array or array-like object. Returns an empty array if the array is empty or has only one element.\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\n// Exclude last element from number array\nconst numbers = [1, 2, 3, 4];\nconst result = initial(numbers);\n// result is [1, 2, 3]\n\n// Exclude last element from string array\nconst strings = ['a', 'b', 'c', 'd'];\nconst withoutLast = initial(strings);\n// withoutLast is ['a', 'b', 'c']\n\n// Array-like object\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst items = initial(arrayLike);\n// items is ['x', 'y']\n```\n\nEmpty arrays or invalid inputs return an empty array.\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst result = initial(emptyArray);\n// result is []\n\nconst singleItem = [42];\nconst onlyOne = initial(singleItem);\n// onlyOne is []\n\ninitial(null); // []\ninitial(undefined); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array or array-like object to exclude the last element from.\n\n#### Returns\n\n(`T[]`): Returns a new array with the last element excluded.\n"
  },
  {
    "path": "docs/reference/compat/array/intersection.md",
    "content": "# intersection (Lodash Compatibility)\n\n::: warning Use [`intersection`](../../array/intersection.md) from `es-toolkit`\n\nThis `intersection` function operates slowly due to handling `null` or `undefined`, multiple array support, and duplicate removal process.\n\nInstead, use the faster and more modern [`intersection`](../../array/intersection.md) from `es-toolkit`.\n\n:::\n\nFinds the intersection of multiple arrays.\n\n```typescript\nconst result = intersection(...arrays);\n```\n\n## Usage\n\n### `intersection(...arrays)`\n\nFinds elements that exist in all arrays and returns them as a new array. The result is deduplicated and maintains the order of the first array.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\n// Intersection of two arrays\nconst array1 = [1, 2, 3, 4];\nconst array2 = [2, 3, 5, 6];\nconst result = intersection(array1, array2);\n// result is [2, 3]\n\n// Intersection of three arrays\nconst array3 = [3, 4, 7, 8];\nconst multiResult = intersection(array1, array2, array3);\n// multiResult is [3]\n\n// String arrays\nconst strings1 = ['a', 'b', 'c'];\nconst strings2 = ['b', 'c', 'd'];\nconst stringResult = intersection(strings1, strings2);\n// stringResult is ['b', 'c']\n\n// Array-like objects\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 3, 2: 4, length: 3 };\nconst likeResult = intersection(arrayLike1, arrayLike2);\n// likeResult is [2, 3]\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 2, 3];\nconst result1 = intersection(array1, null);\n// result1 is []\n\nconst result2 = intersection(null, undefined);\n// result2 is []\n```\n\nDuplicate elements are removed from the result.\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 1, 2, 3];\nconst array2 = [1, 2, 2, 4];\nconst result = intersection(array1, array2);\n// result is [1, 2] (duplicates removed)\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to find the intersection of. Array-like objects, null, or undefined are also allowed.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements that exist in all arrays. Duplicates are removed and the order follows the first array.\n"
  },
  {
    "path": "docs/reference/compat/array/intersectionBy.md",
    "content": "# intersectionBy (Lodash Compatibility)\n\n::: warning Use [`intersectionBy`](../../array/intersectionBy.md) from `es-toolkit`\n\nThis `intersectionBy` function operates slowly due to complex condition processing, multiple array support, property path parsing, etc.\n\nInstead, use the faster and more modern [`intersectionBy`](../../array/intersectionBy.md) from `es-toolkit`.\n\n:::\n\nFinds the intersection of multiple arrays using a given condition function.\n\n```typescript\nconst result = intersectionBy(...arrays, iteratee);\n```\n\n## Usage\n\n### `intersectionBy(...arrays, iteratee)`\n\nFinds the intersection of multiple arrays based on values transformed by a given condition function. The condition can be provided in various forms such as a function, property name, partial object, etc.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\n// Intersection by function\nconst array1 = [2.1, 1.2];\nconst array2 = [2.3, 3.4];\nconst result = intersectionBy(array1, array2, Math.floor);\n// result is [2.1] (2 is common based on Math.floor)\n\n// Intersection by property\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst byId = intersectionBy(users1, users2, 'id');\n// byId is [{ id: 2, name: 'jane' }]\n\n// Intersection of three arrays\nconst array3 = [2.5, 4.1];\nconst multiResult = intersectionBy(array1, array2, array3, Math.floor);\n// multiResult is [2.1]\n\n// Array-like objects\nconst arrayLike1 = { 0: { x: 1 }, 1: { x: 2 }, length: 2 };\nconst arrayLike2 = { 0: { x: 2 }, 1: { x: 3 }, length: 2 };\nconst byProperty = intersectionBy(arrayLike1, arrayLike2, 'x');\n// byProperty is [{ x: 2 }]\n```\n\n`null` or `undefined` arrays are treated as empty arrays.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst result = intersectionBy(array1, null, 'x');\n// result is []\n```\n\nYou can also specify conditions with partial objects or property-value pairs.\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst products1 = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'vegetable', name: 'carrot' },\n];\nconst products2 = [\n  { category: 'fruit', name: 'banana' },\n  { category: 'meat', name: 'beef' },\n];\n\n// Specify condition with partial object\nconst byCategory = intersectionBy(products1, products2, { category: 'fruit' });\n// Specify condition with property-value pair\nconst byCategoryPair = intersectionBy(products1, products2, ['category', 'fruit']);\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to find the intersection of.\n- `iteratee` (`Function | PropertyKey | Array | Object`): The condition to transform each element. Can be a function, property name, property-value pair, or partial object.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements that exist in all arrays based on the transformed values.\n"
  },
  {
    "path": "docs/reference/compat/array/intersectionWith.md",
    "content": "# intersectionWith (Lodash Compatibility)\n\n::: warning Use [`intersectionWith`](../../array/intersectionWith.md) from `es-toolkit`\n\nThis `intersectionWith` function operates slowly due to handling `null` or `undefined`, support for various overloads, etc.\n\nInstead, use the faster and more modern [`intersectionWith`](../../array/intersectionWith.md) from `es-toolkit`.\n\n:::\n\nCreates an array of common elements found in all arrays using a custom comparison function.\n\n```typescript\nconst result = intersectionWith(array, ...otherArrays, comparator);\n```\n\n## Usage\n\n### `intersectionWith(array, ...otherArrays, comparator)`\n\nFinds the intersection of the first array with the rest using a custom comparison function. The comparison function determines if elements are equal, and only elements found in all arrays are returned.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nconst objects = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst others = [\n  { id: 1, name: 'john' },\n  { id: 3, name: 'joe' },\n];\n\nintersectionWith(objects, others, (a, b) => a.id === b.id);\n// => [{ id: 1, name: 'john' }]\n\n// You can compare with multiple arrays\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst array2 = [{ x: 1 }, { x: 3 }];\nconst array3 = [{ x: 1 }, { x: 4 }];\n\nintersectionWith(array1, array2, array3, (a, b) => a.x === b.x);\n// => [{ x: 1 }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nintersectionWith(null, [1, 2], (a, b) => a === b); // []\nintersectionWith([1, 2], undefined, (a, b) => a === b); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The first array to compare.\n- `...otherArrays` (`Array<ArrayLike<U> | ((a: T, b: T | U) => boolean)>`): The other arrays to compare and the comparison function as the last element.\n- `comparator` (`(a: T, b: T | U) => boolean`): The function to determine if two elements are equal.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements commonly found in all arrays.\n"
  },
  {
    "path": "docs/reference/compat/array/invokeMap.md",
    "content": "# invokeMap (Lodash Compatibility)\n\n::: warning Use `Array.map` and `Object.values(...).map`\n\nThis `invokeMap` function is slow due to handling `null` or `undefined`, method lookups, etc.\n\nUse the faster and more modern `Array.map` and `Object.values(...).map` instead.\n\nFor example, `invokeMap([1, 2, 3], 'toString')` can be written as `[1, 2, 3].map(x => x.toString())`.\n\n:::\n\nInvokes the specified method on each element in the array or object and returns an array of results.\n\n```typescript\nconst result = invokeMap(collection, method, ...args);\n```\n\n## Usage\n\n### `invokeMap(collection, method, ...args)`\n\nInvokes the specified method on each element in the array or object. You can pass the method name as a string or pass a function directly. Additional arguments are passed to each method invocation.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\n// Invoke method on each element of the array\ninvokeMap(\n  [\n    [5, 1, 7],\n    [3, 2, 1],\n  ],\n  'sort'\n);\n// => [[5, 1, 7].sort(), [3, 2, 1].sort()]\n// => [[1, 5, 7], [1, 2, 3]]\n\n// Invoke method with arguments\ninvokeMap([123, 456], 'toString', 2);\n// => [(123).toString(2), (456).toString(2)]\n// => ['1111011', '111001000']\n\n// Pass a function directly\ninvokeMap(['a', 'b', 'c'], String.prototype.toUpperCase);\n// => [String.prototype.toUpperCase('a'), String.prototype.toUpperCase('b'), String.prototype.toUpperCase('c')]\n// => ['A', 'B', 'C']\n```\n\nFor objects, the method is invoked on each value.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\nconst obj = { a: 1.1, b: 2.2, c: 3.3 };\ninvokeMap(obj, 'toFixed', 1);\n// => ['1.1', '2.2', '3.3']\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\ninvokeMap(null, 'toString'); // []\ninvokeMap(undefined, 'toString'); // []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to invoke the method on.\n- `method` (`string | ((...args: any[]) => R)`): The method name or function to invoke.\n- `...args` (`any[]`): Additional arguments to pass to each method invocation.\n\n#### Returns\n\n(`Array<R | undefined>`): Returns a new array containing the results of each method invocation.\n"
  },
  {
    "path": "docs/reference/compat/array/join.md",
    "content": "# join (Lodash Compatibility)\n\n::: warning Use `Array.prototype.join()`\n\nThis `join` function is slow due to handling ArrayLike objects, null/undefined, etc.\n\nUse the faster and more modern `Array.prototype.join()` instead.\n\n:::\n\nJoins the elements of an array into a string.\n\n```typescript\nconst result = join(array, separator);\n```\n\n## Usage\n\n### `join(array, separator?)`\n\nUse `join` to combine all elements of an array into a single string. It connects each element with a separator.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\n// Join string array\nconst arr = ['a', 'b', 'c'];\njoin(arr, '~'); // => \"a~b~c\"\n\n// Join number array\nconst numbers = [1, 2, 3];\njoin(numbers, '-'); // => \"1-2-3\"\n```\n\nIf you omit the separator, comma (`,`) is used by default.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(['a', 'b', 'c']); // => \"a,b,c\"\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(null, '-'); // => \"\"\njoin(undefined, '-'); // => \"\"\n```\n\n#### Parameters\n\n- `array` (`T[]`) - The array to join.\n\n::: info `array` can be `ArrayLike<T>` or `null` or `undefined`\n\nTo ensure full compatibility with lodash, the `join` function processes `array` as follows:\n\n- If `array` is `ArrayLike<T>`, it converts it to an array using `Array.from(...)`.\n- If `array` is `null` or `undefined`, it is treated as an empty array.\n\n:::\n\n- `separator` (`string`, optional) - The separator used to join the elements. Defaults to `,`.\n\n#### Returns\n\n(`string`): Returns a string containing all elements of the array joined by the specified separator.\n"
  },
  {
    "path": "docs/reference/compat/array/keyBy.md",
    "content": "# keyBy (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [keyBy](../../array/keyBy.md)\n\nThis `keyBy` function is slow due to handling `null` or `undefined`, various parameter types, etc.\n\nUse the faster and more modern `es-toolkit`'s [keyBy](../../array/keyBy.md) instead.\n\n:::\n\nOrganizes collection elements into an object based on the specified key.\n\n```typescript\nconst result = keyBy(collection, iteratee);\n```\n\n## Usage\n\n### `keyBy(collection, iteratee)`\n\nOrganizes each element in an array or object into an object using the specified key generation function or property name. If multiple elements have the same key, the last element is used.\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\n// Generate keys by property name\nconst array = [\n  { dir: 'left', code: 97 },\n  { dir: 'right', code: 100 },\n];\n\nkeyBy(array, 'dir');\n// => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } }\n\n// Generate keys using a function\nkeyBy(array, o => String.fromCharCode(o.code));\n// => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n\n// Can also be used with objects\nconst obj = {\n  a: { id: 1, name: 'john' },\n  b: { id: 2, name: 'jane' },\n};\nkeyBy(obj, 'name');\n// => { john: { id: 1, name: 'john' }, jane: { id: 2, name: 'jane' } }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\nkeyBy(null, 'id'); // {}\nkeyBy(undefined, 'id'); // {}\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | null | undefined`): The array or object to organize by key.\n- `iteratee` (`ValueIterateeCustom<T, PropertyKey>`, optional): The function or property name to generate keys. If omitted, the element itself is used as the key.\n\n#### Returns\n\n(`Record<string, T>`): Returns a new object where each element is mapped to the generated key.\n"
  },
  {
    "path": "docs/reference/compat/array/last.md",
    "content": "# last (Lodash compatibility)\n\n::: warning Use `es-toolkit`'s [last](../../array/last.md)\n\nThis `last` function behaves complexly due to handling `null` or `undefined`.\n\nInstead, use the faster and more modern `es-toolkit`'s [last](../../array/last.md).\n\n:::\n\nReturns the last element of an array.\n\n```typescript\nconst lastElement = last(array);\n```\n\n## Usage\n\n### `last(array)`\n\nUse `last` when you want to get the last element of an array. Returns `undefined` if the array is empty.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// Last element of a number array\nlast([1, 2, 3, 4, 5]);\n// Returns: 5\n\n// Last element of a string array\nlast(['a', 'b', 'c']);\n// Returns: 'c'\n\n// Last element of an object array\nconst users = [{ name: 'Alice' }, { name: 'Bob' }];\nlast(users);\n// Returns: { name: 'Bob' }\n```\n\nEmpty arrays or `null`, `undefined` return `undefined`.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// Empty array\nlast([]);\n// Returns: undefined\n\n// null array\nlast(null);\n// Returns: undefined\n\n// undefined array\nlast(undefined);\n// Returns: undefined\n```\n\nArray-like objects are also supported.\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// Array-like object\nconst arrayLike = { 0: 'first', 1: 'second', length: 2 };\nlast(arrayLike);\n// Returns: 'second'\n\n// Strings are also array-like objects\nlast('hello');\n// Returns: 'o'\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to get the last element from.\n\n#### Returns\n\n(`T | undefined`): Returns the last element of the array, or `undefined` if the array is empty, `null`, or `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/array/lastIndexOf.md",
    "content": "# lastIndexOf (Lodash compatibility)\n\n::: warning Use `Array.lastIndexOf`\n\nThis `lastIndexOf` function operates slowly due to handling `null` or `undefined`, searching for `NaN` values, etc.\n\nInstead, use the faster and more modern `Array.lastIndexOf`.\n\n:::\n\nFinds the last index at which a given element appears in an array.\n\n```typescript\nconst index = lastIndexOf(array, searchElement, fromIndex);\n```\n\n## Usage\n\n### `lastIndexOf(array, searchElement, fromIndex)`\n\nReturns the last index at which a given element appears in an array. Similar to native `Array.lastIndexOf` but can also find `NaN` values.\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\n// Basic usage\nlastIndexOf([1, 2, 1, 2], 2);\n// => 3\n\n// Specifying a start index\nlastIndexOf([1, 2, 1, 2], 2, 2);\n// => 1\n\n// Finding NaN values (native lastIndexOf cannot find NaN)\nlastIndexOf([1, 2, NaN, 4, NaN], NaN);\n// => 4\n\n// Using negative index\nlastIndexOf([1, 2, 3, 4], 3, -2);\n// => 2\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\nlastIndexOf(null, 1); // -1\nlastIndexOf(undefined, 1); // -1\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to search.\n- `searchElement` (`T`): The element to find.\n- `fromIndex` (`true | number`, optional): The index to start searching from. Passing `true` searches from the end of the array. Defaults to `array.length - 1`.\n\n#### Returns\n\n(`number`): Returns the index of the last matching element. Returns `-1` if not found.\n"
  },
  {
    "path": "docs/reference/compat/array/map.md",
    "content": "# map (Lodash compatibility)\n\n::: warning Use `Array.prototype.map`\n\nThis `map` function operates slowly due to additional features such as handling `null` or `undefined`, object iteration, and property extraction. When transforming arrays, JavaScript's built-in `Array.prototype.map` method is faster and simpler.\n\nInstead, use the faster and more modern `Array.prototype.map`.\n\n:::\n\nTransforms each element of an array or object to create a new array.\n\n```typescript\nconst mapped = map(collection, iteratee);\n```\n\n## Usage\n\n### `map(collection, iteratee)`\n\nUse `map` when you want to transform each element of an array, object, or array-like object. It executes an iteratee function on each element and returns the results as a new array.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\n// Double each element of an array\nmap([1, 2, 3], x => x * 2);\n// Returns: [2, 4, 6]\n\n// Transform object values\nconst obj = { a: 1, b: 2 };\nmap(obj, (value, key) => `${key}:${value}`);\n// Returns: ['a:1', 'b:2']\n\n// Extract properties\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, 'name');\n// Returns: ['John', 'Jane']\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nmap(null, x => x); // []\nmap(undefined, x => x); // []\n```\n\nYou can extract nested properties by specifying a property path as a string.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [{ info: { name: 'John' } }, { info: { name: 'Jane' } }];\nmap(users, 'info.name');\n// Returns: ['John', 'Jane']\n```\n\nWhen passing an object, it checks if each element matches that object.\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, { age: 30 });\n// Returns: [true, false]\n```\n\n#### Parameters\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to iterate over.\n- `iteratee` (`function | string | object`, optional): The function to execute on each element, a property path, or an object to match. If not provided, returns each element as is.\n  - When it's a function, it's called in the form `(value, key, collection)`.\n  - When it's a string, it extracts that property.\n  - When it's an object, it checks if each element matches the object.\n\n#### Returns\n\n(`U[]`): Returns a new array of transformed values.\n"
  },
  {
    "path": "docs/reference/compat/array/nth.md",
    "content": "# nth (Lodash Compatibility)\n\n::: warning Use array index access\nThis `nth` function operates slowly due to handling `null` or `undefined` and integer conversion.\n\nUse the faster and more modern array index access (`array[index]` or `array.at(index)`) instead.\n:::\n\nGets the element at the specified index of an array.\n\n```typescript\nconst element = nth(array, index);\n```\n\n## Usage\n\n### `nth(array, index)`\n\nReturns the element at the specified index of an array. If the index is negative, it counts from the end of the array. If the index is out of range, it returns `undefined`.\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 4, 5];\n\n// Positive index\nnth(array, 1);\n// => 2\n\n// Negative index (from end)\nnth(array, -1);\n// => 5\n\nnth(array, -2);\n// => 4\n\n// Out of range index\nnth(array, 10);\n// => undefined\n\nnth(array, -10);\n// => undefined\n```\n\n`null` or `undefined` are treated as `undefined`.\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nnth(null, 0); // undefined\nnth(undefined, 0); // undefined\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to query.\n- `index` (`number`, optional): The index of the element to get. If negative, it counts from the end. Defaults to `0`.\n\n#### Returns\n\n(`T | undefined`): Returns the element at the specified index. If the index is out of range, it returns `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/array/orderBy.md",
    "content": "# orderBy (Lodash Compatibility)\n\n::: warning Use [orderBy](../../array/orderBy.md) from `es-toolkit` instead\n\nThis `orderBy` function operates slowly due to handling `null` or `undefined`, complex path navigation, and various sorting criteria.\n\nUse the faster and more modern [orderBy](../../array/orderBy.md) from `es-toolkit` instead.\n\n:::\n\nSorts the elements of a collection by multiple criteria.\n\n```typescript\nconst result = orderBy(collection, criteria, orders);\n```\n\n## Usage\n\n### `orderBy(collection, criteria, orders)`\n\nSorts the elements of an array or object according to specified criteria and sort orders. You can use multiple criteria, and specify ascending (`'asc'`) or descending (`'desc'`) order for each criterion.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'fred', age: 48 },\n  { name: 'barney', age: 34 },\n  { name: 'fred', age: 40 },\n  { name: 'barney', age: 36 },\n];\n\n// Sort by name ascending, age descending\norderBy(users, ['name', 'age'], ['asc', 'desc']);\n// => [\n//   { name: 'barney', age: 36 },\n//   { name: 'barney', age: 34 },\n//   { name: 'fred', age: 48 },\n//   { name: 'fred', age: 40 }\n// ]\n\n// Specify sort criteria with functions\norderBy(users, [user => user.name, user => user.age], ['asc', 'desc']);\n// => Same result as above\n\n// Sort by single criterion\norderBy(users, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'fred', age: 40 }, ...]\n```\n\nFor objects, sorts the values.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { name: 'fred', age: 48 },\n  b: { name: 'barney', age: 34 },\n};\n\norderBy(obj, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'barney', age: 34 }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\norderBy(null, 'name'); // []\norderBy(undefined, 'age'); // []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): The array or object to sort.\n- `criteria` (`Criterion<T> | Array<Criterion<T>>`, optional): The sort criteria. Can use property names, property paths, functions, etc. Defaults to `[null]`.\n- `orders` (`unknown | unknown[]`, optional): The sort order for each criterion. Can use `'asc'` (ascending), `'desc'` (descending), `true` (ascending), `false` (descending). Defaults to `[]`.\n\n#### Returns\n\n(`T[]`): Returns a new sorted array.\n"
  },
  {
    "path": "docs/reference/compat/array/partition.md",
    "content": "# partition (Lodash Compatibility)\n\n::: warning Use [partition](../../array/partition.md) from `es-toolkit` instead\n\nThis `partition` function operates slowly due to handling `null` or `undefined` and various predicate types.\n\nUse the faster and more modern [partition](../../array/partition.md) from `es-toolkit` instead.\n\n:::\n\nSplits the elements of a collection into two groups based on a condition.\n\n```typescript\nconst [truthy, falsy] = partition(collection, predicate);\n```\n\n## Usage\n\n### `partition(collection, predicate)`\n\nSplits the elements of an array or object into two groups based on a given predicate function. The first group contains elements where the predicate is true, and the second group contains elements where the predicate is false.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\n// Split number array into even and odd\npartition([1, 2, 3, 4, 5, 6], n => n % 2 === 0);\n// => [[2, 4, 6], [1, 3, 5]]\n\n// Specify condition with property name\nconst users = [\n  { name: 'john', active: true },\n  { name: 'jane', active: false },\n  { name: 'bob', active: true },\n];\n\npartition(users, 'active');\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// Filter with object condition\npartition(users, { active: true });\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// Filter with array condition\npartition(users, ['name', 'john']);\n// => [\n//   [{ name: 'john', active: true }],\n//   [{ name: 'jane', active: false }, { name: 'bob', active: true }]\n// ]\n```\n\nFor objects, partitions the values.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { score: 90 },\n  b: { score: 40 },\n  c: { score: 80 },\n};\n\npartition(obj, item => item.score >= 80);\n// => [[{ score: 90 }, { score: 80 }], [{ score: 40 }]]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\npartition(null, x => x > 0); // [[], []]\npartition(undefined, 'active'); // [[], []]\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): The array or object to partition.\n- `predicate` (`((value: T) => unknown) | Partial<T> | [PropertyKey, any] | PropertyKey`, optional): The condition to test each element. Can be a function, partial object, property-value array, or property name. Defaults to `identity`.\n\n#### Returns\n\n(`[T[], T[]]`): Returns an array containing an array of elements that satisfy the condition and an array of elements that don't.\n"
  },
  {
    "path": "docs/reference/compat/array/pull.md",
    "content": "# pull (Lodash compatibility)\n\n::: warning Use [pull](../../array/pull.md) from `es-toolkit`\n\nThis `pull` function is for Lodash compatibility and operates slower due to more complex type handling and overloading.\n\nInstead, use the faster and more modern [pull](../../array/pull.md) from `es-toolkit`.\n\n:::\n\nRemoves all specified values from the array.\n\n```typescript\nconst result = pull(array, ...valuesToRemove);\n```\n\n## Usage\n\n### `pull(array, ...valuesToRemove)`\n\nRemoves all specified values from the array and modifies the original array. It directly modifies the original array without copying, which can save memory.\n\n```typescript\nimport { pull } from 'es-toolkit/compat';\n\n// Remove specific values from number array\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npull(numbers, 2, 3);\nconsole.log(numbers); // [1, 4, 5]\n\n// Remove specific values from string array\nconst fruits = ['apple', 'banana', 'apple', 'cherry'];\npull(fruits, 'apple');\nconsole.log(fruits); // ['banana', 'cherry']\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to modify.\n- `...valuesToRemove` (`T[]`): The values to remove from the array.\n\n#### Returns\n\n(`T[]`): Returns the modified original array.\n"
  },
  {
    "path": "docs/reference/compat/array/pullAll.md",
    "content": "# pullAll (Lodash compatibility)\n\nRemoves all values from the array that are contained in the array of specified values.\n\n```typescript\nconst result = pullAll(array, valuesToRemove);\n```\n\n## Usage\n\n### `pullAll(array, valuesToRemove)`\n\nRemoves all values contained in the `valuesToRemove` array from the array and modifies the original array. Similar to the `pull` function, but accepts values to remove as an array.\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\n// Remove specific values from number array\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npullAll(numbers, [2, 3]);\nconsole.log(numbers); // [1, 4, 5]\n\n// Remove specific values from string array\nconst fruits = ['apple', 'banana', 'apple', 'cherry', 'banana'];\npullAll(fruits, ['apple', 'banana']);\nconsole.log(fruits); // ['cherry']\n```\n\nIf you pass an empty array, `null`, or `undefined`, nothing will be removed.\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3];\npullAll(numbers, []);\nconsole.log(numbers); // [1, 2, 3]\n\npullAll(numbers, null);\nconsole.log(numbers); // [1, 2, 3]\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to modify.\n- `valuesToRemove` (`ArrayLike<T>`, optional): The array containing values to remove from the array. Defaults to `[]`.\n\n#### Returns\n\n(`T[]`): Returns the modified original array.\n"
  },
  {
    "path": "docs/reference/compat/array/pullAllBy.md",
    "content": "# pullAllBy (Lodash compatibility)\n\nRemoves specified values from the array based on values transformed by an iteratee.\n\n```typescript\nconst modified = pullAllBy(array, valuesToRemove, iteratee);\n```\n\n## Usage\n\n### `pullAllBy(array, values, iteratee)`\n\nRemoves specified values from the array based on values transformed through the provided iteratee function. The original array is modified and the modified array is returned.\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\n// Remove by comparing property values\nconst array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\npullAllBy(array, [{ x: 1 }, { x: 3 }], 'x');\nconsole.log(array); // [{ x: 2 }]\n\n// Compare by transforming values with a function\nconst numbers = [1, 2, 3, 4, 5];\npullAllBy(numbers, [2, 4], n => n % 2);\nconsole.log(numbers); // [1, 3, 5] (only odd numbers remain)\n```\n\nIf the array is empty, `null`, or `undefined`, it returns the original array as is.\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\npullAllBy([], [1, 2], x => x); // []\npullAllBy(null as any, [1, 2], x => x); // null\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to modify.\n- `values` (`ArrayLike<T>`, optional): The array of values to remove.\n- `iteratee` (`ValueIteratee<T>`, optional): The iteratee function to apply to each element. You can use a property name, partial object, or function.\n\n#### Returns\n\n(`T[]`): Returns the original array with the specified values removed.\n"
  },
  {
    "path": "docs/reference/compat/array/pullAllWith.md",
    "content": "# pullAllWith (Lodash Compatibility)\n\nRemoves specified values from an array using a comparison function.\n\n```typescript\nconst modified = pullAllWith(array, valuesToRemove, comparator);\n```\n\n## Usage\n\n### `pullAllWith(array, values, comparator)`\n\nRemoves specified values from an array using the provided comparison function. The original array is modified and the modified array is returned.\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\n// Remove with object comparison\nconst array = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\npullAllWith(array, [{ x: 3, y: 4 }], (a, b) => a.x === b.x && a.y === b.y);\nconsole.log(array); // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n\n// Remove by comparing string length\nconst words = ['hello', 'world', 'test', 'code'];\npullAllWith(words, ['hi'], (a, b) => a.length === b.length);\nconsole.log(words); // ['hello', 'world', 'code'] ('test' removed as it has same length as 'hi')\n```\n\nIf the array is empty or `null`, `undefined`, the original array is returned as is.\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\npullAllWith([], [1], (a, b) => a === b); // []\npullAllWith(null as any, [1], (a, b) => a === b); // null\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to modify.\n- `values` (`ArrayLike<T>`, optional): The array of values to remove.\n- `comparator` (`(a: T, b: T) => boolean`, optional): The function to compare two elements. Should return `true` if the two elements are considered equal.\n\n#### Returns\n\n(`T[]`): Returns the original array with the specified values removed.\n"
  },
  {
    "path": "docs/reference/compat/array/pullAt.md",
    "content": "# pullAt (Lodash Compatibility)\n\n::: warning Use [pullAt](../../array/pullAt.md) from `es-toolkit` instead\n\nThis `pullAt` function operates slowly due to complex type handling and overloading.\n\nUse the faster and more modern [pullAt](../../array/pullAt.md) from `es-toolkit` instead.\n\n:::\n\nRemoves elements at specified indexes from an array and returns the removed elements.\n\n```typescript\nconst removed = pullAt(array, ...indexes);\n```\n\n## Usage\n\n### `pullAt(array, ...indexes)`\n\nRemoves elements at specified indexes from an array and returns an array of the removed elements. The original array is modified.\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\n// Remove by individual indexes\nconst array = [1, 2, 3, 4, 5];\nconst removed = pullAt(array, 1, 3);\nconsole.log(array); // [1, 3, 5]\nconsole.log(removed); // [2, 4]\n\n// Remove by array of indexes\nconst colors = ['red', 'green', 'blue', 'yellow'];\nconst removedColors = pullAt(colors, [0, 2]);\nconsole.log(colors); // ['green', 'yellow']\nconsole.log(removedColors); // ['red', 'blue']\n```\n\nNon-existent indexes are treated as `undefined`.\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\nconst numbers = [10, 20, 30];\nconst removed = pullAt(numbers, 1, 5);\nconsole.log(numbers); // [10, 30]\nconsole.log(removed); // [20, undefined]\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T>`): The array to modify.\n- `...indexes` (`Array<number | number[]>`): The indexes of elements to remove. Can pass individual numbers or arrays of numbers.\n\n#### Returns\n\n(`ArrayLike<T>`): Returns an array of removed elements.\n"
  },
  {
    "path": "docs/reference/compat/array/reduce.md",
    "content": "# reduce (Lodash Compatibility)\n\n::: warning Use `Array.prototype.reduce` or `Object.values` with `reduce`\n\nThis `reduce` function operates slowly due to complex type handling and support for various input formats.\n\nInstead, use the faster and more modern `Array.prototype.reduce` method, or for objects, use it together with `Object.values`.\n\n:::\n\nReduces an array or object to a single value.\n\n```typescript\nconst result = reduce(collection, iteratee, initialValue);\n```\n\n## Usage\n\n### `reduce(collection, iteratee, initialValue)`\n\nIterates through all elements of an array or object to calculate an accumulated value. If an initial value is provided, it starts with that value; otherwise, it starts with the first element.\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\n// Calculate sum of array\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value, 0);\nconsole.log(sum); // 10\n\n// Calculate sum of object values\nconst scores = { math: 95, english: 87, science: 92 };\nconst totalScore = reduce(scores, (acc, value) => acc + value, 0);\nconsole.log(totalScore); // 274\n```\n\nIf no initial value is provided, the first element becomes the initial value and iteration starts from the second element.\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (1 + 2 + 3 + 4)\n\n// Empty array returns undefined\nconst empty = [];\nconst result = reduce(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### Parameters\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to iterate over.\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): The function to call for each element. It receives the accumulated value, current value, index/key, and the original array/object.\n- `initialValue` (`any`, optional): The initial value for the accumulator. If not provided, the first element becomes the initial value.\n\n#### Returns\n\n(`any`): Returns the final accumulated value after processing all elements.\n"
  },
  {
    "path": "docs/reference/compat/array/reduceRight.md",
    "content": "# reduceRight (Lodash Compatibility)\n\n::: warning Use `Array.prototype.reduceRight` or `Object.values` with `reduceRight`\n\nThis `reduceRight` function operates slowly due to complex type handling and support for various input formats.\n\nInstead, use the faster and more modern `Array.prototype.reduceRight` method, or for objects, use `reduceRight` together with `Object.values`.\n\n:::\n\nReduces an array or object to a single value by iterating from right to left.\n\n```typescript\nconst result = reduceRight(collection, iteratee, initialValue);\n```\n\n## Usage\n\n### `reduceRight(collection, iteratee, initialValue)`\n\nIterates through all elements of an array or object from right to left to calculate an accumulated value. If an initial value is provided, it starts with that value; otherwise, it starts with the last element.\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\n// Concatenate array to string (from right)\nconst letters = ['a', 'b', 'c', 'd'];\nconst result = reduceRight(letters, (acc, value) => acc + value, '');\nconsole.log(result); // 'dcba'\n\n// Multiply object values (reverse of key order)\nconst numbers = { x: 2, y: 3, z: 4 };\nconst product = reduceRight(numbers, (acc, value) => acc * value, 1);\nconsole.log(product); // 24 (1 * 4 * 3 * 2)\n```\n\nIf no initial value is provided, the last element becomes the initial value and iteration starts from the second to last element.\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduceRight(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (4 + 3 + 2 + 1)\n\n// Empty array returns undefined\nconst empty = [];\nconst result = reduceRight(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### Parameters\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to iterate over.\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): The function to call for each element. It receives the accumulated value, current value, index/key, and the original array/object.\n- `initialValue` (`any`, optional): The initial value for the accumulator. If not provided, the last element becomes the initial value.\n\n#### Returns\n\n(`any`): Returns the final accumulated value after processing all elements.\n"
  },
  {
    "path": "docs/reference/compat/array/reject.md",
    "content": "# reject (Lodash Compatibility)\n\n::: warning Use `Array.filter()`\n\nThis `reject` function is implemented with complexity to support various predicate forms for compatibility with Lodash. For simple function predicates, `Array.filter()` works more simply and faster.\n\nInstead, use the faster and more modern `Array.filter()`. For example, `reject(arr, func)` can be replaced with `arr.filter(item => !func(item))`.\n\n:::\n\nIterates over a collection and returns a new array of elements that do not match the predicate function.\n\n```typescript\nconst filtered = reject(collection, predicate);\n```\n\n## Usage\n\n### `reject(collection, predicate)`\n\nReturns a new array containing only elements from an array, object, or string that do not match the given condition. It performs the opposite operation of `filter`.\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// Filter out even numbers\nreject([1, 2, 3, 4, 5], n => n % 2 === 0);\n// => [1, 3, 5]\n\n// Filter out objects that have a specific property\nreject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n// => [{ b: 1 }]\n\n// Filter out objects that have a specific property value\nreject([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// => [{ a: 1 }, { a: 3 }]\n\n// Filter out specific characters from a string\nreject('abc', char => char === 'b');\n// => ['a', 'c']\n```\n\nThis function supports various forms of predicates.\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// Condition using a function\nreject(users, user => user.age < 18);\n\n// Partial matching of objects\nreject(users, { active: false });\n\n// Property-value array\nreject(users, ['status', 'pending']);\n\n// Check truthy value by property name\nreject(users, 'premium');\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): The collection to iterate over.\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, optional): The condition to execute for each element. Defaults to `identity`.\n\n#### Returns\n\n(`T[]`): Returns a new array composed of elements that do not match the predicate condition.\n"
  },
  {
    "path": "docs/reference/compat/array/remove.md",
    "content": "# remove (Lodash Compatibility)\n\n::: warning Use `remove` from `es-toolkit`\n\nThis `remove` function is implemented in a complex way to support various forms of predicates for Lodash compatibility. The `remove` function in the main library only supports simple function predicates, so it operates faster.\n\nInstead, use the faster and more modern [remove](../../array/remove.md) from `es-toolkit`.\n\n:::\n\nRemoves elements that match a condition from an array and returns the removed elements.\n\n```typescript\nconst removedElements = remove(array, predicate);\n```\n\n## Usage\n\n### `remove(array, predicate)`\n\nIterates through the array and removes elements that match the given condition from the original array, returning the removed elements as a new array. Note that the original array is directly modified.\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// Remove with function condition\nconst numbers = [1, 2, 3, 4, 5];\nconst evens = remove(numbers, n => n % 2 === 0);\nconsole.log(numbers); // => [1, 3, 5]\nconsole.log(evens); // => [2, 4]\n\n// Remove with partial object matching\nconst objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\nconst removed = remove(objects, { a: 1 });\nconsole.log(objects); // => [{ a: 2 }, { a: 3 }]\nconsole.log(removed); // => [{ a: 1 }]\n\n// Remove with property-value pair\nconst items = [{ name: 'apple' }, { name: 'banana' }, { name: 'cherry' }];\nconst cherries = remove(items, ['name', 'cherry']);\nconsole.log(items); // => [{ name: 'apple' }, { name: 'banana' }]\nconsole.log(cherries); // => [{ name: 'cherry' }]\n```\n\nThis function supports various forms of predicates.\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// Function condition\nremove(users, user => user.active === false);\n\n// Partial object matching\nremove(users, { status: 'inactive' });\n\n// Property-value array\nremove(users, ['type', 'guest']);\n\n// Check truthy value by property name\nremove(users, 'isDeleted');\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T>`): The array to modify.\n- `predicate` (`((value: T, index: number, array: ArrayLike<T>) => boolean) | Partial<T> | [keyof T, unknown] | keyof T`, optional): The condition to execute for each element. Default is `identity`.\n\n#### Returns\n\n(`T[]`): Returns a new array consisting of elements that were removed because they matched the condition.\n"
  },
  {
    "path": "docs/reference/compat/array/reverse.md",
    "content": "# reverse (Lodash Compatibility)\n\n::: warning Use `Array.prototype.reverse()`\n\nThis `reverse` function includes `null` and `undefined` handling for Lodash compatibility. If you only need simple array reversal, the native JavaScript `Array.prototype.reverse()` method is more intuitive and faster.\n\nInstead, use the faster and more modern `Array.prototype.reverse()`.\n\n:::\n\nReverses array elements in place.\n\n```typescript\nconst reversed = reverse(array);\n```\n\n## Usage\n\n### `reverse(array)`\n\nReverses the order of the array so that the first element becomes the last and the last element becomes the first. It directly modifies the original array and returns the modified array.\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\n// Reverse a number array\nconst numbers = [1, 2, 3, 4, 5];\nconst reversed = reverse(numbers);\nconsole.log(numbers); // => [5, 4, 3, 2, 1]\nconsole.log(reversed); // => [5, 4, 3, 2, 1]\n\n// Reverse a string array\nconst words = ['apple', 'banana', 'cherry'];\nreverse(words);\nconsole.log(words); // => ['cherry', 'banana', 'apple']\n\n// Empty arrays or null/undefined are returned as is\nreverse([]); // => []\nreverse(null); // => null\nreverse(undefined); // => undefined\n```\n\nNote that this function directly modifies the original array.\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\nconst original = [1, 2, 3];\nconst result = reverse(original);\n\nconsole.log(original === result); // => true (same array object)\nconsole.log(original); // => [3, 2, 1] (original is modified)\n```\n\n#### Parameters\n\n- `array` (`T[] | null | undefined`): The array to reverse. If `null` or `undefined`, it is returned as is.\n\n#### Returns\n\n(`T[] | null | undefined`): Returns the reversed array. If the input is `null` or `undefined`, that value is returned as is.\n"
  },
  {
    "path": "docs/reference/compat/array/sample.md",
    "content": "# sample (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [sample](../../array/sample.md)\n\nThis `sample` function operates slowly due to `null` or `undefined` handling, object value processing, etc.\n\nInstead, use the faster and more modern `es-toolkit`'s [sample](../../array/sample.md).\n\n:::\n\nGets a random element from an array or object.\n\n```typescript\nconst randomItem = sample(collection);\n```\n\n## Usage\n\n### `sample(collection)`\n\nUse `sample` to select a random element from an array or object. For arrays, it returns a random element, and for objects, it returns a random value.\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\n// Get a random element from an array\nsample([1, 2, 3, 4, 5]);\n// Returns a random number between 1 and 5\n\n// Get a random value from an object\nsample({ a: 1, b: 2, c: 3 });\n// Returns a random value among 1, 2, 3\n\n// Handles strings as well\nsample('hello');\n// Returns a random character among 'h', 'e', 'l', 'l', 'o'\n```\n\n`null` or `undefined` returns `undefined`.\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\nsample(null); // undefined\nsample(undefined); // undefined\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): The array or object to sample from.\n\n#### Returns\n\n(`T | string | undefined`): Returns a randomly selected element from the array or object. Returns `undefined` if the collection is empty or `null`, `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/array/sampleSize.md",
    "content": "# sampleSize (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [sampleSize](../../array/sampleSize.md)\n\nThis `sampleSize` function operates slowly due to `null` or `undefined` handling, object support, default value processing, etc.\n\nInstead, use the faster and more modern `es-toolkit`'s [sampleSize](../../array/sampleSize.md).\n\n:::\n\nRandomly selects a specified number of elements from an array or object.\n\n```typescript\nconst sampled = sampleSize(collection, size);\n```\n\n## Usage\n\n### `sampleSize(collection, size?)`\n\nUse `sampleSize` to randomly select elements from an array or object. It uses Floyd's algorithm to sample efficiently without duplicates.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\n// Randomly select 3 elements from an array.\nsampleSize([1, 2, 3, 4, 5], 3);\n// Returns: [2, 4, 5] (actual results may vary)\n\n// Randomly select 2 values from an object.\nsampleSize({ a: 1, b: 2, c: 3, d: 4 }, 2);\n// Returns: [2, 4] (actual results may vary)\n```\n\n`null` or `undefined` is handled as an empty array.\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\nsampleSize(null, 2);\n// Returns: []\n\nsampleSize(undefined, 2);\n// Returns: []\n```\n\n#### Parameters\n\n- `collection` (`Record<string, T> | Record<number, T> | T | null | undefined`): The array or object to sample from.\n- `size` (`number`, optional): The number of elements to select. The default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array composed of randomly selected elements.\n"
  },
  {
    "path": "docs/reference/compat/array/shuffle.md",
    "content": "# shuffle (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `shuffle`\n\nThis `shuffle` function includes additional processing for Lodash compatibility and operates slowly.\n\nInstead, use the faster and more modern `es-toolkit`'s [shuffle](../../array/shuffle.md).\n\n:::\n\nShuffles the elements of an array or object randomly and returns a new array.\n\n```typescript\nconst result = shuffle(collection);\n```\n\n## Usage\n\n### `shuffle(collection)`\n\nUses the Fisher-Yates algorithm to randomly shuffle the elements of an array or object and returns a new array. The original is not modified.\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\n// Shuffle a number array\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffled1 = shuffle(numbers);\n// Returns: for example [3, 1, 5, 2, 4] (different order each time)\n\n// Shuffle a string array\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffled2 = shuffle(fruits);\n// Returns: for example ['cherry', 'apple', 'date', 'banana']\n\n// Shuffle object values\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst shuffled3 = shuffle(obj);\n// Returns: for example [3, 1, 4, 2] (object values are randomly shuffled)\n```\n\n`null` or `undefined` is handled as an empty array.\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\nshuffle(null);\n// Returns: []\n\nshuffle(undefined);\n// Returns: []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): The array or object to shuffle.\n\n#### Returns\n\n(`T[]`): Returns a new array with elements randomly shuffled.\n"
  },
  {
    "path": "docs/reference/compat/array/size.md",
    "content": "# size (Lodash Compatibility)\n\n::: warning Use `.length` property\n\nThis `size` function operates complexly due to `null`, `undefined` handling and support for various types.\n\nInstead, use the faster and more modern `.length` property or `Object.keys().length`.\n\n:::\n\nReturns the size of arrays, strings, and objects.\n\n```typescript\nconst length = size(collection);\n```\n\n## Usage\n\n### `size(collection)`\n\nUse `size` to check the size of arrays, strings, objects, Maps, and Sets. It provides consistent size information for various types of collections.\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\n// Number of elements in an array\nsize([1, 2, 3]);\n// Returns 3\n\n// Number of characters in a string\nsize('hello');\n// Returns 5\n\n// Number of enumerable properties in an object\nsize({ a: 1, b: 2, c: 3 });\n// Returns 3\n\n// Number of elements in a Map\nsize(\n  new Map([\n    ['a', 1],\n    ['b', 2],\n  ])\n);\n// Returns 2\n\n// Number of elements in a Set\nsize(new Set([1, 2, 3]));\n// Returns 3\n```\n\n`null` or `undefined` returns 0.\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\nsize(null); // 0\nsize(undefined); // 0\nsize({}); // 0\nsize([]); // 0\n```\n\n#### Parameters\n\n- `collection` (`object | string | null | undefined`): The array, string, object, Map, or Set to check the size of.\n\n#### Returns\n\n(`number`): Returns the size of the collection. Returns 0 if `null` or `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/array/slice.md",
    "content": "# slice (Lodash Compatibility)\n\n::: warning Use `Array.prototype.slice`\n\nThis `slice` function operates slowly due to `null` or `undefined` handling and special processing of sparse arrays. JavaScript's native `Array.prototype.slice` method is faster and more standardized.\n\nInstead, use the faster and more modern `Array.prototype.slice`.\n\n:::\n\nSlices a portion of an array to create a new array.\n\n```typescript\nconst sliced = slice(array, start, end);\n```\n\n## Usage\n\n### `slice(array, start, end)`\n\nUse `slice` when you need only a specific portion of an array. It creates a new array containing elements from the start position up to, but not including, the end position.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\n// Slice from index 1 to 2\nslice([1, 2, 3, 4], 1, 3);\n// Returns: [2, 3]\n\n// Use negative indices\nslice([1, 2, 3, 4], -2);\n// Returns: [3, 4]\n\n// Specify only start position\nslice([1, 2, 3, 4], 2);\n// Returns: [3, 4]\n```\n\n`null` or `undefined` is handled as an empty array.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice(null); // []\nslice(undefined); // []\n```\n\nWhen processing sparse arrays, empty slots are filled with `undefined`.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nconst sparse = new Array(3);\nsparse[1] = 'b';\nslice(sparse);\n// Returns: [undefined, 'b', undefined]\n```\n\nUsing negative indices calculates from the end of the array.\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice([1, 2, 3, 4, 5], -3, -1);\n// Returns: [3, 4]\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to slice.\n- `start` (`number`, optional): The start position. Negative values calculate from the end. The default is `0`.\n- `end` (`number`, optional): The end position (not included). Negative values calculate from the end. The default is the array's length.\n\n#### Returns\n\n(`T[]`): Returns a new array containing elements from `start` up to, but not including, `end`.\n"
  },
  {
    "path": "docs/reference/compat/array/some.md",
    "content": "# some (Lodash Compatibility)\n\n::: warning Use `Array.prototype.some()` method\n\nThis `some` function operates in a complex manner due to handling various types of conditions and object support.\n\nInstead, use the faster and more modern `Array.prototype.some()` method.\n\n:::\n\nChecks if any element in an array or object satisfies the given condition.\n\n```typescript\nconst hasMatch = some(collection, predicate);\n```\n\n## Usage\n\n### `some(collection, predicate)`\n\nUse `some` when you want to check if at least one element in an array or object satisfies a condition. It supports various forms of conditions.\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\n// Using a condition function on an array\nsome([1, 2, 3, 4], n => n % 2 === 0);\n// Returns true (2 and 4 are even)\n\n// Matching with partial object on an array\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// Returns true\n\n// Matching with property-value pair on an array\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n// Returns true\n\n// Checking if property is truthy on an array\nsome([{ a: 0 }, { a: 1 }, { a: 0 }], 'a');\n// Returns true (element with a=1 exists)\n\n// Using a condition function on an object\nsome({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n// Returns true (2 is even)\n```\n\nIf no condition is provided, it checks if there are any truthy values.\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\nsome([0, 1, 2]); // true (1 and 2 are truthy)\nsome([false, null, undefined]); // false (all values are falsy)\nsome(null); // false (treated as empty array)\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): The array or object to check.\n- `predicate` (optional): The function to check the condition, partial object, property-value pair, or property name.\n\n#### Returns\n\n(`boolean`): Returns `true` if at least one element satisfies the condition, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/array/sortBy.md",
    "content": "# sortBy (Lodash Compatibility)\n\n::: warning Use the `Array.prototype.sort` method instead\n\nThis `sortBy` function behaves in a complex way due to handling various types of criteria and object support.\n\nInstead, use the faster and more modern `Array.prototype.sort` method.\n\n:::\n\nSorts an array in ascending order based on multiple criteria.\n\n```typescript\nconst sorted = sortBy(collection, ...iteratees);\n```\n\n## Usage\n\n### `sortBy(collection, ...iteratees)`\n\nUse `sortBy` to sort an array or object in ascending order using multiple criteria. It executes the sorting criteria functions for each element and sorts based on the resulting values.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\n// Sort users by name.\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\nsortBy(users, ['user']);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n\n// Sort using a function.\nsortBy(users, [\n  function (o) {\n    return o.user;\n  },\n]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n```\n\nYou can also use multiple criteria at once.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\n// Sort by name first, then by age.\nsortBy(users, ['user', item => item.age]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 40 },\n//   { user: 'fred', age: 48 },\n// ]\n```\n\n`null` and `undefined` are treated as empty arrays.\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nsortBy(null, ['key']); // []\nsortBy(undefined, ['key']); // []\n```\n\n#### Parameters\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): The array or object to sort.\n- `...iteratees` (`Array<Many<ListIteratee<T> | ObjectIteratee<T>>>`): The functions or property names that determine the sorting criteria.\n\n#### Returns\n\n(`T[]`): Returns a new array sorted in ascending order.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedIndex.md",
    "content": "# sortedIndex (Lodash compatibility)\n\n::: warning Implement binary search directly\n\nThis `sortedIndex` function operates with complexity due to handling `null`, `undefined`, and various type support.\n\nInstead, implement a faster, more modern binary search directly or use a dedicated library.\n\n:::\n\nFinds the lowest index at which a value should be inserted into a sorted array.\n\n```typescript\nconst index = sortedIndex(array, value);\n```\n\n## Usage\n\n### `sortedIndex(array, value)`\n\nUse `sortedIndex` to find the position to insert a value in a sorted array. It uses binary search to find the position quickly.\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\n// Find insertion position in number array\nsortedIndex([30, 50], 40);\n// Returns 1 (40 is positioned between 30 and 50)\n\n// Find insertion position in string array\nsortedIndex(['a', 'c'], 'b');\n// Returns 1 ('b' is positioned between 'a' and 'c')\n\n// When the same value exists, returns the first position\nsortedIndex([1, 2, 2, 3], 2);\n// Returns 1 (position of the first 2)\n```\n\nFor `null` or `undefined` arrays, returns 0.\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\nsortedIndex(null, 1); // 0\nsortedIndex(undefined, 1); // 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to insert.\n\n#### Returns\n\n(`number`): Returns the lowest index to insert the value. If the array is `null` or `undefined`, returns 0.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedIndexBy.md",
    "content": "# sortedIndexBy (Lodash compatibility)\n\n::: warning Implement binary search and transformation function directly\n\nThis `sortedIndexBy` function operates slowly due to complex iteratee handling and type conversion.\n\nInstead, implement faster, more modern binary search and transformation functions directly.\n\n:::\n\nFinds the lowest index at which a value should be inserted into a sorted array after applying a transformation function.\n\n```typescript\nconst index = sortedIndexBy(array, value, iteratee);\n```\n\n## Usage\n\n### `sortedIndexBy(array, value, iteratee)`\n\nUse `sortedIndexBy` to find the insertion position of a value in a sorted array after applying a transformation function. It applies the transformation function to each element and the value to compare.\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\n// Find insertion position in object array sorted by property\nconst objects = [{ x: 4 }, { x: 5 }];\nsortedIndexBy(objects, { x: 4 }, 'x');\n// Returns 0\n\n// Transform using function\nconst numbers = [10, 20, 30];\nsortedIndexBy(numbers, 25, n => n);\n// Returns 2\n\n// Transform with property-value array\nconst users = [{ name: 'alice' }, { name: 'bob' }];\nsortedIndexBy(users, { name: 'bob' }, ['name', 'bob']);\n// Returns 1 (equivalent to inserting true into [false, true])\n```\n\nFor `null` or `undefined` arrays, returns 0.\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\nsortedIndexBy(null, { x: 1 }, 'x'); // 0\nsortedIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to insert.\n- `iteratee` (optional): The transformation function, property name, or property-value array to apply to each element and value.\n\n#### Returns\n\n(`number`): Returns the lowest index to insert the value. If the array is `null` or `undefined`, returns 0.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedIndexOf.md",
    "content": "# sortedIndexOf (Lodash compatibility)\n\n::: warning Implement binary search directly\n\nThis `sortedIndexOf` function operates slowly due to complex binary search handling and type validation.\n\nInstead, implement faster, more modern binary search directly or use `Array.prototype.indexOf()`.\n\n:::\n\nFinds the index where a value first appears in a sorted array.\n\n```typescript\nconst index = sortedIndexOf(array, value);\n```\n\n## Usage\n\n### `sortedIndexOf(array, value)`\n\nUse `sortedIndexOf` to find the index where a specific value first appears in a sorted array. It uses binary search to find the value quickly.\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\n// Find value in number array\nsortedIndexOf([11, 22, 33, 44, 55], 33);\n// Returns 2\n\n// When value doesn't exist\nsortedIndexOf([11, 22, 33, 44, 55], 30);\n// Returns -1\n\n// When duplicate values exist, returns the first index\nsortedIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// Returns 3 (position of the first 3)\n\n// 0 and -0 are treated as equal\nsortedIndexOf([-0, 0], 0);\n// Returns 0\n```\n\nEmpty arrays, `null`, or `undefined` return -1.\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\nsortedIndexOf([], 1); // -1\nsortedIndexOf(null, 1); // -1\nsortedIndexOf(undefined, 1); // -1\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to find.\n\n#### Returns\n\n(`number`): Returns the index where the value first appears. If the value doesn't exist, returns -1.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedLastIndex.md",
    "content": "# sortedLastIndex (Lodash compatibility)\n\n::: warning Implement binary search directly\n\nThis `sortedLastIndex` function operates slowly due to complex binary search handling and type validation.\n\nInstead, implement faster, more modern binary search directly.\n\n:::\n\nFinds the highest index at which a value should be inserted into a sorted array.\n\n```typescript\nconst index = sortedLastIndex(array, value);\n```\n\n## Usage\n\n### `sortedLastIndex(array, value)`\n\nUse `sortedLastIndex` to find the highest position to insert a value in a sorted array. When duplicate values exist, it returns the index after the last position.\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\n// Find last insertion position in array with duplicate values\nsortedLastIndex([4, 5, 5, 5, 6], 5);\n// Returns 4 (position after the last 5)\n\n// Find insertion position for new value\nsortedLastIndex([10, 20, 30], 25);\n// Returns 2 (25 is positioned before 30)\n\n// When value doesn't exist\nsortedLastIndex([1, 2, 3], 0);\n// Returns 0 (positioned at the front)\n```\n\nFor `null` or `undefined` arrays, returns 0.\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\nsortedLastIndex(null, 1); // 0\nsortedLastIndex(undefined, 1); // 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to insert.\n\n#### Returns\n\n(`number`): Returns the highest index to insert the value. If the array is `null` or `undefined`, returns 0.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedLastIndexBy.md",
    "content": "# sortedLastIndexBy (Lodash compatibility)\n\n::: warning Implement binary search and transformation function directly\n\nThis `sortedLastIndexBy` function operates slowly due to complex iteratee handling and type conversion.\n\nInstead, implement faster, more modern binary search and transformation functions directly.\n\n:::\n\nFinds the highest index at which a value should be inserted into a sorted array after applying a transformation function.\n\n```typescript\nconst index = sortedLastIndexBy(array, value, iteratee);\n```\n\n## Usage\n\n### `sortedLastIndexBy(array, value, iteratee)`\n\nUse `sortedLastIndexBy` to find the highest insertion position of a value in a sorted array after applying a transformation function. When duplicate values exist, it returns the index after the last value.\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\n// Find last insertion position in object array sorted by property\nconst objects = [{ x: 4 }, { x: 5 }, { x: 5 }];\nsortedLastIndexBy(objects, { x: 5 }, 'x');\n// Returns 3 (position after the last x: 5)\n\n// Transform using function\nconst numbers = [10, 20, 20, 30];\nsortedLastIndexBy(numbers, 20, n => n);\n// Returns 3\n```\n\nFor `null` or `undefined` arrays, returns 0.\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\nsortedLastIndexBy(null, { x: 1 }, 'x'); // 0\nsortedLastIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to insert.\n- `iteratee` (optional): The transformation function, property name, or property-value array to apply to each element and value.\n\n#### Returns\n\n(`number`): Returns the highest index to insert the value. If the array is `null` or `undefined`, returns 0.\n"
  },
  {
    "path": "docs/reference/compat/array/sortedLastIndexOf.md",
    "content": "# sortedLastIndexOf (Lodash compatibility)\n\n::: warning Implement binary search directly\n\nThis `sortedLastIndexOf` function operates slowly due to complex binary search handling and type validation.\n\nInstead, implement faster, more modern binary search directly or use `Array.prototype.lastIndexOf()`.\n\n:::\n\nFinds the index where a value last appears in a sorted array.\n\n```typescript\nconst index = sortedLastIndexOf(array, value);\n```\n\n## Usage\n\n### `sortedLastIndexOf(array, value)`\n\nUse `sortedLastIndexOf` to find the index where a specific value last appears in a sorted array. It uses binary search to find the value quickly.\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\n// Find value in number array\nsortedLastIndexOf([1, 2, 3, 4, 5], 3);\n// Returns 2\n\n// When value doesn't exist\nsortedLastIndexOf([1, 2, 3, 4, 5], 6);\n// Returns -1\n\n// When duplicate values exist, returns the last index\nsortedLastIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// Returns 5 (position of the last 3)\n\n// 0 and -0 are treated as equal\nsortedLastIndexOf([-0, 0], 0);\n// Returns 1\n```\n\nEmpty arrays, `null`, or `undefined` return -1.\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\nsortedLastIndexOf([], 1); // -1\nsortedLastIndexOf(null, 1); // -1\nsortedLastIndexOf(undefined, 1); // -1\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The sorted array. Using an unsorted array can produce incorrect results.\n- `value` (`T`): The value to find.\n\n#### Returns\n\n(`number`): Returns the index where the value last appears. If the value doesn't exist, returns -1.\n"
  },
  {
    "path": "docs/reference/compat/array/tail.md",
    "content": "# tail (Lodash compatibility)\n\n::: warning Please use [tail](../../array/tail.md) from `es-toolkit`\n\nThis `tail` function operates slowly due to handling `null` or `undefined`.\n\nPlease use the faster and modern [tail](../../array/tail.md) from `es-toolkit` instead.\n\n:::\n\nReturns all elements of an array except the first one.\n\n```typescript\nconst result = tail(array);\n```\n\n## Usage\n\n### `tail(array)`\n\nUse `tail` when you want to create a new array containing all elements except the first one from the input array. If the input array is empty or has only one element, it returns an empty array.\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\n// Remove the first element from a number array.\ntail([1, 2, 3]);\n// Returns: [2, 3]\n\n// Remove the first element from a string array.\ntail(['a', 'b', 'c']);\n// Returns: ['b', 'c']\n\n// Array with only one element.\ntail([1]);\n// Returns: []\n\n// Empty array.\ntail([]);\n// Returns: []\n```\n\n`null` or `undefined` is treated as an empty array.\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\ntail(null); // []\ntail(undefined); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove the first element from.\n\n#### Returns\n\n(`T[]`): Returns a new array containing all elements except the first one.\n"
  },
  {
    "path": "docs/reference/compat/array/take.md",
    "content": "# take (Lodash compatibility)\n\n::: warning Please use [take](../../array/take.md) from `es-toolkit`\n\nThis `take` function operates slowly due to additional processing for compatibility with Lodash.\n\nPlease use the faster and modern [take](../../array/take.md) from `es-toolkit` instead.\n\n:::\n\nTakes a specified number of elements from the beginning of an array and creates a new array.\n\n```typescript\nconst result = take([1, 2, 3, 4, 5], 3);\n// result becomes [1, 2, 3].\n```\n\n## Usage\n\n### `take(array, count)`\n\nTakes a specified number of elements from the beginning of an array and returns a new array. If `count` is greater than the array length, returns the entire array.\n\n```typescript\nimport { take } from 'es-toolkit/compat';\n\n// Basic usage\nconst numbers = [1, 2, 3, 4, 5];\nconst result1 = take(numbers, 3);\n// Returns: [1, 2, 3]\n\n// Request count greater than array length\nconst result2 = take(numbers, 10);\n// Returns: [1, 2, 3, 4, 5] (entire array)\n\n// Request 0 elements\nconst result3 = take(numbers, 0);\n// Returns: []\n\n// Handle empty array\nconst result4 = take([], 3);\n// Returns: []\n\n// Handle negative number\nconst result5 = take(numbers, -1);\n// Returns: []\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to take elements from.\n- `count` (`number`): The number of elements to take. Default is 1.\n\n#### Returns\n\n(`T[]`): A new array containing the specified number of elements from the beginning.\n"
  },
  {
    "path": "docs/reference/compat/array/takeRight.md",
    "content": "# takeRight (Lodash compatibility)\n\n::: warning Please use [takeRight](../../array/takeRight.md) from `es-toolkit`\n\nThis `takeRight` function operates slowly due to handling `null` or `undefined`.\n\nPlease use the faster and modern [takeRight](../../array/takeRight.md) from `es-toolkit` instead.\n\n:::\n\nTakes a specified number of elements from the end of an array.\n\n```typescript\nconst result = takeRight(array, count);\n```\n\n## Usage\n\n### `takeRight(array, count)`\n\nUse `takeRight` when you want to create a new array by taking a specified number of elements from the end of an array. If the requested count is greater than the array length, returns the entire array.\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\n// Take the last 2 elements from a number array.\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// Take the last 3 elements from a string array.\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n\n// When requested count is greater than array length\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n\n// Request 0 elements\ntakeRight([1, 2, 3], 0);\n// Returns: []\n\n// Request negative number\ntakeRight([1, 2, 3], -1);\n// Returns: []\n```\n\n`null` or `undefined` is treated as an empty array.\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\ntakeRight(null, 2); // []\ntakeRight(undefined, 2); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to take elements from.\n- `count` (`number`, optional): The number of elements to take. Default is `1`.\n\n#### Returns\n\n(`T[]`): Returns a new array containing the specified number of elements from the end.\n"
  },
  {
    "path": "docs/reference/compat/array/takeRightWhile.md",
    "content": "# takeRightWhile (Lodash compatibility)\n\n::: warning Please use [takeRightWhile](../../array/takeRightWhile.md) from `es-toolkit`\n\nThis `takeRightWhile` function operates slowly due to handling `null` or `undefined`.\n\nPlease use the faster and modern [takeRightWhile](../../array/takeRightWhile.md) from `es-toolkit` instead.\n\n:::\n\nTakes elements from the end of an array while the condition is satisfied.\n\n```typescript\nconst result = takeRightWhile(array, predicate);\n```\n\n## Usage\n\n### `takeRightWhile(array, predicate)`\n\nUse `takeRightWhile` when you want to create a new array by taking elements from the end of an array while the condition is satisfied. It stops when the condition evaluates to false.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\n// Using function condition\nconst numbers = [1, 2, 3, 4, 5];\ntakeRightWhile(numbers, x => x > 3);\n// Returns: [4, 5]\n\n// Using object property condition\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ntakeRightWhile(users, o => !o.active);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// Matching with partial object\ntakeRightWhile(users, { active: false });\n// Returns: [{ user: 'pebbles', active: false }]\n\n// Matching with property-value array\ntakeRightWhile(users, ['active', false]);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// Checking for truthy value by property name\nconst items = [{ active: false }, { active: true }, { active: true }];\ntakeRightWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null` or `undefined` is treated as an empty array.\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\ntakeRightWhile(null, x => x > 0); // []\ntakeRightWhile(undefined, x => x > 0); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to process.\n- `predicate` (`ListIteratee<T>`, optional): The condition to run for each element. Can be a function, partial object, property-value array, or property name. Default is the identity function.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements taken from the end while the condition is satisfied.\n"
  },
  {
    "path": "docs/reference/compat/array/takeWhile.md",
    "content": "# takeWhile (Lodash compatibility)\n\n::: warning Please use [takeWhile](../../array/takeWhile.md) from `es-toolkit`\n\nThis `takeWhile` function operates slowly due to handling `null` or `undefined`.\n\nPlease use the faster and modern [takeWhile](../../array/takeWhile.md) from `es-toolkit` instead.\n\n:::\n\nTakes elements from the beginning of an array while the condition is satisfied.\n\n```typescript\nconst result = takeWhile(array, predicate);\n```\n\n## Usage\n\n### `takeWhile(array, predicate)`\n\nUse `takeWhile` when you want to create a new array by taking elements from the beginning of an array while the condition is satisfied. It stops when the condition evaluates to false.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\n// Using function condition\nconst numbers = [1, 2, 3, 4, 5];\ntakeWhile(numbers, x => x < 3);\n// Returns: [1, 2]\n\n// Using object property condition\nconst users = [\n  { user: 'barney', active: false },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: true },\n];\n\ntakeWhile(users, o => !o.active);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// Matching with partial object\ntakeWhile(users, { active: false });\n// Returns: [{ user: 'barney', active: false }]\n\n// Matching with property-value array\ntakeWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// Checking for truthy value by property name\nconst items = [{ active: true }, { active: true }, { active: false }];\ntakeWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null` or `undefined` is treated as an empty array.\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\ntakeWhile(null, x => x > 0); // []\ntakeWhile(undefined, x => x > 0); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to process.\n- `predicate` (`ListIteratee<T>`, optional): The condition to run for each element. Can be a function, partial object, property-value array, or property name. Default is the identity function.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements taken from the beginning while the condition is satisfied.\n"
  },
  {
    "path": "docs/reference/compat/array/union.md",
    "content": "# union (Lodash Compatibility)\n\n::: warning Use [union](../../array/union.md) from `es-toolkit`\n\nThis `union` function operates slowly due to complex array processing.\n\nInstead, use the faster and more modern [union](../../array/union.md) from `es-toolkit`.\n\n:::\n\nCreates a new array containing only unique values from multiple arrays.\n\n```typescript\nconst result = union(...arrays);\n```\n\n## Usage\n\n### `union(...arrays)`\n\nUse `union` when you want to merge multiple arrays and remove duplicates to create a new array containing only unique values. The order of first appearance of each value is preserved.\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\n// Merging number arrays\nunion([2], [1, 2]);\n// Returns: [2, 1]\n\n// Merging multiple arrays\nunion([2], [1, 2], [2, 3]);\n// Returns: [2, 1, 3]\n\n// Nested arrays are not flattened\nunion([1, 3, 2], [1, [5]], [2, [4]]);\n// Returns: [1, 3, 2, [5], [4]]\n\n// Non-array values are ignored\nunion([0], 3, { '0': 1 }, null, [2, 1]);\n// Returns: [0, 2, 1]\n\n// Array-like objects are also processed\nunion([0], { 0: 'a', length: 1 }, [2, 1]);\n// Returns: [0, 'a', 2, 1]\n```\n\n`null` or `undefined` are ignored.\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\nunion([1, 2], null, undefined, [3, 4]);\n// Returns: [1, 2, 3, 4]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to merge. Non-array values are ignored.\n\n#### Returns\n\n(`T[]`): Returns a new array containing unique values from all arrays.\n"
  },
  {
    "path": "docs/reference/compat/array/unionBy.md",
    "content": "# unionBy (Lodash Compatibility)\n\n::: warning Use [unionBy](../../array/unionBy.md) from `es-toolkit`\n\nThis `unionBy` function operates slowly due to complex processing.\n\nInstead, use the faster and more modern [unionBy](../../array/unionBy.md) from `es-toolkit`.\n\n:::\n\nMerges multiple arrays and keeps only unique values based on a specified criterion.\n\n```typescript\nconst result = unionBy(...arrays, iteratee);\n```\n\n## Usage\n\n### `unionBy(...arrays, iteratee)`\n\nUse `unionBy` when you want to merge multiple arrays and remove duplicates based on a given criterion function to create a new array containing only unique values. The order of first appearance of each value is preserved.\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\n// Compare by flooring decimal numbers\nunionBy([2.1], [1.2, 2.3], Math.floor);\n// Returns: [2.1, 1.2]\n\n// Compare by object property\nunionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 1 }, { x: 2 }]\n\n// Compare with function\nunionBy(\n  [{ id: 1, name: 'a' }],\n  [\n    { id: 2, name: 'b' },\n    { id: 1, name: 'c' },\n  ],\n  item => item.id\n);\n// Returns: [{ id: 1, name: 'a' }, { id: 2, name: 'b' }]\n\n// Compare with partial object\nunionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], { x: 1 });\n// Returns: [{ x: 1, y: 1 }]\n```\n\n`null` or `undefined` arrays are ignored.\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\nunionBy([1, 2], null, undefined, [3, 4], x => x);\n// Returns: [1, 2, 3, 4]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to merge.\n- `iteratee` (`ValueIteratee<T>`): The criterion to determine uniqueness. Can be a function, property name, partial object, or property-value array.\n\n#### Returns\n\n(`T[]`): Returns a new array containing unique values with duplicates removed based on the specified criterion.\n"
  },
  {
    "path": "docs/reference/compat/array/unionWith.md",
    "content": "# unionWith (Lodash Compatibility)\n\n::: warning Use [unionWith](../../array/unionWith.md) from `es-toolkit`\n\nThis `unionWith` function operates slowly due to complex processing.\n\nInstead, use the faster and more modern [unionWith](../../array/unionWith.md) from `es-toolkit`.\n\n:::\n\nMerges multiple arrays and keeps only unique values using a comparison function.\n\n```typescript\nconst result = unionWith(...arrays, comparator);\n```\n\n## Usage\n\n### `unionWith(...arrays, comparator)`\n\nUse `unionWith` when you want to merge multiple arrays and remove duplicates using a custom comparison function to create a new array containing only unique values. The order of first appearance of each value is preserved.\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\n// Using a custom comparison function\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\n\nunionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 1, y: 2 }, { x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// Simple equality comparison\nunionWith([1, 2], [2, 3], (a, b) => a === b);\n// Returns: [1, 2, 3]\n\n// Compare by string length\nunionWith(['ab', 'cd'], ['ef', 'gh', 'ab'], (a, b) => a.length === b.length);\n// Returns: ['ab']\n```\n\n`null` or `undefined` arrays are ignored.\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\nunionWith([1, 2], null, undefined, [3, 4], (a, b) => a === b);\n// Returns: [1, 2, 3, 4]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to merge.\n- `comparator` (`(a: T, b: T) => boolean`): The comparison function that determines if two values are equal.\n\n#### Returns\n\n(`T[]`): Returns a new array containing unique values with duplicates removed using the comparison function.\n"
  },
  {
    "path": "docs/reference/compat/array/uniq.md",
    "content": "# uniq (Lodash Compatibility)\n\n::: warning Use [uniq](../../array/uniq.md) from `es-toolkit`\n\nThis `uniq` function operates slowly due to additional processing for Lodash compatibility.\n\nInstead, use the faster and more modern [uniq](../../array/uniq.md) from `es-toolkit`.\n\n:::\n\nCreates a new array with only unique elements by removing duplicates from an array.\n\n```typescript\nconst result = uniq([1, 2, 2, 3, 3, 4]);\n// result is [1, 2, 3, 4].\n```\n\n## Usage\n\n### `uniq(array)`\n\nReturns a new array containing only unique elements by removing duplicates from the array. Only the first occurrence of each element is kept and the order is preserved.\n\n```typescript\nimport { uniq } from 'es-toolkit/compat';\n\n// Remove duplicates from number array\nconst numbers = [1, 2, 2, 3, 3, 4, 1];\nconst result1 = uniq(numbers);\n// Returns: [1, 2, 3, 4]\n\n// Remove duplicates from string array\nconst strings = ['a', 'b', 'b', 'c', 'a'];\nconst result2 = uniq(strings);\n// Returns: ['a', 'b', 'c']\n\n// Remove duplicates from object array (reference value comparison)\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst objects = [obj1, obj2, obj1];\nconst result3 = uniq(objects);\n// Returns: [{ id: 1 }, { id: 2 }]\n```\n\n#### Parameters\n\n- `array` (`T[]`): The array to process.\n\n#### Returns\n\n(`T[]`): A new array with duplicates removed.\n"
  },
  {
    "path": "docs/reference/compat/array/uniqBy.md",
    "content": "# uniqBy (Lodash Compatibility)\n\n::: warning Use [uniqBy](../../array/uniqBy.md) from `es-toolkit`\n\nThis `uniqBy` function operates slowly due to handling of `null` or `undefined`, complex argument type processing, etc.\n\nInstead, use the faster and more modern [uniqBy](../../array/uniqBy.md) from `es-toolkit`.\n\n:::\n\nCreates a new array of unique elements by removing duplicates based on the values returned by a transformation function.\n\n```typescript\nconst result = uniqBy(array, iteratee);\n```\n\n## Usage\n\n### `uniqBy(array, iteratee)`\n\nApplies a transformation function to each element of the array and keeps only the first element among those with the same transformation result. This is useful when removing duplicates based on a specific property in an object array or based on a specific calculation result in a number array.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\n// Remove duplicates by Math.floor result in number array\nuniqBy([2.1, 1.2, 2.3], Math.floor);\n// Returns: [2.1, 1.2]\n\n// Remove duplicates by property in object array\nuniqBy([{ x: 1 }, { x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 1 }, { x: 2 }]\n\n// Remove duplicates with function\nuniqBy([{ name: 'John' }, { name: 'Jane' }, { name: 'John' }], obj => obj.name);\n// Returns: [{ name: 'John' }, { name: 'Jane' }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\nuniqBy(null, Math.floor); // []\nuniqBy(undefined, 'x'); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove duplicates from.\n- `iteratee` (`ValueIteratee<T>`): The transformation function to apply to each element. Can be a function, property name, partial object, etc.\n\n#### Returns\n\n(`T[]`): Returns a new array with duplicates removed based on the transformation function result.\n"
  },
  {
    "path": "docs/reference/compat/array/uniqWith.md",
    "content": "# uniqWith (Lodash Compatibility)\n\n::: warning Use [uniqWith](../../array/uniqWith.md) from `es-toolkit`\n\nThis `uniqWith` function operates slowly due to handling of `null` or `undefined`, complex argument type processing, etc.\n\nInstead, use the faster and more modern [uniqWith](../../array/uniqWith.md) from `es-toolkit`.\n\n:::\n\nCreates a new array of unique elements by removing duplicates using a comparison function.\n\n```typescript\nconst result = uniqWith(array, comparator);\n```\n\n## Usage\n\n### `uniqWith(array, comparator)`\n\nRemoves duplicates by comparing each element of the array with a comparison function. When the comparison function returns `true`, the two elements are considered equal, and only the first occurring element is kept. If no comparison function is provided, it uses shallow equality comparison by default.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\n// Use without comparison function (shallow equality comparison)\nuniqWith([1, 2, 2, 3]);\n// Returns: [1, 2, 3]\n\n// Remove duplicates based on odd/even criterion with custom comparison function\nuniqWith([1, 2, 3, 4], (a, b) => a % 2 === b % 2);\n// Returns: [1, 2]\n\n// Remove duplicates based on property in object array\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n  { x: 1, y: 2 },\n];\nuniqWith(objects, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 1, y: 2 }, { x: 2, y: 1 }]\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\nuniqWith(null); // []\nuniqWith(undefined); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to remove duplicates from.\n- `comparator` (`(a: T, b: T) => boolean`, optional): The function to compare if two elements are equal. Returns `true` if they are considered equal. Default is shallow equality comparison.\n\n#### Returns\n\n(`T[]`): Returns a new array with duplicates removed based on the comparison function result.\n"
  },
  {
    "path": "docs/reference/compat/array/unzip.md",
    "content": "# unzip (Lodash Compatibility)\n\n::: warning Use [unzip](../../array/unzip.md) from `es-toolkit`\n\nThis `unzip` function operates slowly due to handling of `null` or `undefined`, filtering of non-array values, etc.\n\nInstead, use the faster and more modern [unzip](../../array/unzip.md) from `es-toolkit`.\n\n:::\n\nCollects elements at the same positions in grouped arrays into new arrays.\n\n```typescript\nconst result = unzip(array);\n```\n\n## Usage\n\n### `unzip(array)`\n\nCollects elements at the same index in nested arrays and returns them as a new array. Performs the opposite operation of the `zip` function. This is useful when transposing matrices or reorganizing structured data.\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\n// Unzip arrays with mixed strings, booleans, and numbers\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n];\nconst result = unzip(zipped);\n// Returns: [['a', 'b'], [true, false], [1, 2]]\n\n// Unzip number arrays\nconst numbers = [\n  [1, 4],\n  [2, 5],\n  [3, 6],\n];\nunzip(numbers);\n// Returns: [[1, 2, 3], [4, 5, 6]]\n\n// Handle arrays with different lengths\nconst uneven = [\n  ['a', 1],\n  ['b', 2, true],\n];\nunzip(uneven);\n// Returns: [['a', 'b'], [1, 2], [undefined, true]]\n```\n\n`null`, `undefined`, or empty arrays are treated as empty arrays.\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\nunzip(null); // []\nunzip(undefined); // []\nunzip([]); // []\n```\n\n#### Parameters\n\n- `array` (`T[][] | ArrayLike<ArrayLike<T>> | null | undefined`): The nested array to unzip. Elements at the same position in each inner array are collected together.\n\n#### Returns\n\n(`T[][]`): Returns a new array with elements at the same positions collected together.\n"
  },
  {
    "path": "docs/reference/compat/array/unzipWith.md",
    "content": "# unzipWith (Lodash Compatibility)\n\n::: warning Use `unzipWith` from `es-toolkit`\n\nThis `unzipWith` function operates slowly due to handling of `null` or `undefined`, `ArrayLike` type processing, support for various condition function forms, etc.\n\nInstead, use the faster and more modern [unzipWith](../../array/unzipWith.md) from `es-toolkit`.\n\n:::\n\nCollects elements at the same positions in grouped arrays and applies a transformation function to create a new array.\n\n```typescript\nconst result = unzipWith(array, iteratee);\n```\n\n## Usage\n\n### `unzipWith(array, iteratee)`\n\nCollects elements at the same index in nested arrays and applies a transformation function. Similar to the `unzip` function, but can apply a transformation function to each group. If no transformation function is provided, it performs the default `unzip` operation.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\n// Add elements at the same positions\nunzipWith(\n  [\n    [1, 10, 100],\n    [2, 20, 200],\n  ],\n  (a, b) => a + b\n);\n// Returns: [3, 30, 300]\n\n// Use without transformation function (default unzip operation)\nunzipWith([\n  [1, 4],\n  [2, 5],\n  [3, 6],\n]);\n// Returns: [[1, 2, 3], [4, 5, 6]]\n\n// String concatenation\nunzipWith(\n  [\n    ['a', 'x'],\n    ['b', 'y'],\n    ['c', 'z'],\n  ],\n  (a, b) => a + b\n);\n// Returns: ['abc', 'xyz']\n\n// Find maximum values\nunzipWith(\n  [\n    [1, 10],\n    [2, 20],\n    [3, 5],\n  ],\n  Math.max\n);\n// Returns: [3, 20]\n```\n\n`null`, `undefined`, or empty arrays are treated as empty arrays.\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\nunzipWith(null, (a, b) => a + b); // []\nunzipWith(undefined, (a, b) => a + b); // []\nunzipWith([], (a, b) => a + b); // []\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<ArrayLike<T>> | null | undefined`): The nested array to unzip.\n- `iteratee` (`(...values: T[]) => R`, optional): The transformation function to apply to each group of elements. If not provided, performs the default `unzip` operation.\n\n#### Returns\n\n(`R[]` or `T[][]`): Returns an array of transformed results if a transformation function is provided, or an unzipped array if not.\n"
  },
  {
    "path": "docs/reference/compat/array/without.md",
    "content": "# without (Lodash Compatibility)\n\n::: warning Use [without](../../array/without.md) from `es-toolkit`\n\nThis `without` function operates slowly due to additional processing for Lodash compatibility.\n\nInstead, use the faster and more modern [without](../../array/without.md) from `es-toolkit`.\n\n:::\n\nCreates a new array excluding specified values from an array.\n\n```typescript\nconst result = without([1, 2, 3, 4, 5], 2, 4);\n// result is [1, 3, 5].\n```\n\n## Usage\n\n### `without(array, ...values)`\n\nReturns a new array with the specified values removed from the array. The original array is not modified.\n\n```typescript\nimport { without } from 'es-toolkit/compat';\n\n// Remove multiple values from number array\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\nconst result1 = without(numbers, 2, 4);\n// Returns: [1, 3, 5]\n\n// Remove values from string array\nconst fruits = ['apple', 'banana', 'cherry', 'banana'];\nconst result2 = without(fruits, 'banana');\n// Returns: ['apple', 'cherry']\n\n// Handle empty array\nconst result3 = without([], 1, 2, 3);\n// Returns: []\n```\n\n#### Parameters\n\n- `array` (`T[]`): The original array to process.\n- `...values` (`T[]`): The values to remove.\n\n#### Returns\n\n(`T[]`): A new array with the specified values removed.\n"
  },
  {
    "path": "docs/reference/compat/array/xor.md",
    "content": "# xor (Lodash Compatibility)\n\n::: warning Use [xor](../../array/xor.md) from `es-toolkit`\n\nThis `xor` function operates slowly due to handling of `null` or `undefined`, complex duplicate calculation logic, etc.\n\nInstead, use the faster and more modern [xor](../../array/xor.md) from `es-toolkit`.\n\n:::\n\nCreates a new array of elements that exist in exactly one of the multiple arrays.\n\n```typescript\nconst result = xor(...arrays);\n```\n\n## Usage\n\n### `xor(...arrays)`\n\nComputes the symmetric difference of multiple arrays. In other words, returns elements that exist in exactly one of the given arrays. This is useful when you want to find non-overlapping unique elements when comparing two or more arrays.\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\n// Symmetric difference of two arrays\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// Symmetric difference of three arrays\nxor([1, 2], [2, 3], [4, 5]);\n// Returns: [1, 3, 4, 5]\n\n// String arrays\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n\n// Providing only one array\nxor([1, 2, 3]);\n// Returns: [1, 2, 3]\n```\n\n`null`, `undefined`, or empty arrays are ignored and only valid arrays are processed.\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\nxor([1, 2], null, [2, 3]);\n// Returns: [1, 3]\n\nxor([], [1, 2], [2, 3]);\n// Returns: [1, 3]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): The arrays to compute the symmetric difference from. `null` or `undefined` are ignored.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements that exist in exactly one of the arrays.\n"
  },
  {
    "path": "docs/reference/compat/array/xorBy.md",
    "content": "# xorBy (Lodash Compatibility)\n\n::: warning Use [xorBy](../../array/xorBy.md) from `es-toolkit`\n\nThis `xorBy` function operates slowly due to handling of `null` or `undefined`, complex duplicate calculation logic, etc.\n\nInstead, use the faster and more modern [xorBy](../../array/xorBy.md) from `es-toolkit`.\n\n:::\n\nCreates a new array of elements that exist in exactly one of the multiple arrays based on a transformation function.\n\n```typescript\nconst result = xorBy(...arrays, iteratee);\n```\n\n## Usage\n\n### `xorBy(...arrays, iteratee)`\n\nComputes the symmetric difference of multiple arrays based on a transformation function. Returns elements whose transformation result exists in exactly one of the arrays. This is useful when comparing based on a specific property in object arrays or based on a specific calculation result in number arrays.\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\n// Compute symmetric difference by Math.floor result\nxorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n// Returns: [1.2, 4.3]\n\n// Compute symmetric difference by object property\nxorBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// Returns: [{ x: 2 }]\n\n// Compute symmetric difference with function\nconst users1 = [{ name: 'John', age: 30 }];\nconst users2 = [\n  { name: 'Jane', age: 25 },\n  { name: 'John', age: 30 },\n];\nxorBy(users1, users2, user => user.name);\n// Returns: [{ name: 'Jane', age: 25 }]\n\n// Symmetric difference of three arrays\nxorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);\n// Returns: [1.2, 2.3, 3.4, 4.5, 5.6, 6.7]\n```\n\n`null` or `undefined` are ignored.\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\nxorBy([2.1, 1.2], null, [4.3, 2.4], Math.floor);\n// Returns: [1.2, 4.3]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ValueIteratee<T>>`): The arrays to compute the symmetric difference from and the transformation function at the end. Can be a function, property name, partial object, etc.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements that exist in exactly one of the arrays based on the transformation function result.\n"
  },
  {
    "path": "docs/reference/compat/array/xorWith.md",
    "content": "# xorWith (Lodash Compatibility)\n\n::: warning Use [xorWith](../../array/xorWith.md) from `es-toolkit`\n\nThis `xorWith` function operates slowly due to handling of `null` or `undefined`, complex duplicate calculation logic, etc.\n\nInstead, use the faster and more modern [xorWith](../../array/xorWith.md) from `es-toolkit`.\n\n:::\n\nCreates a new array of elements that exist in exactly one of the multiple arrays using a comparison function.\n\n```typescript\nconst result = xorWith(...arrays, comparator);\n```\n\n## Usage\n\n### `xorWith(...arrays, comparator)`\n\nComputes the symmetric difference of multiple arrays using a comparison function. When the comparison function returns `true`, the two elements are considered equal, and returns elements that exist in exactly one of the arrays. This is useful when dealing with complex objects or when custom comparison logic is needed.\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\n// Simple number comparison\nxorWith([1, 2], [2, 3], (a, b) => a === b);\n// Returns: [1, 3]\n\n// Compare object properties\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\nxorWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// Returns: [{ x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// Symmetric difference of three arrays\nxorWith([1], [2], [3], (a, b) => a === b);\n// Returns: [1, 2, 3]\n\n// Compare by string length\nxorWith(['hello'], ['world', 'hi'], (a, b) => a.length === b.length);\n// Returns: ['hi']\n```\n\nIf no comparison function is provided, it uses shallow equality comparison by default.\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\nxorWith([1, 2], [2, 3]);\n// Returns: [1, 3]\n```\n\n#### Parameters\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>`): The arrays to compute the symmetric difference from and the comparison function at the end. The comparison function should return `true` if two elements are equal.\n\n#### Returns\n\n(`T[]`): Returns a new array of elements that exist in exactly one of the arrays based on the comparison function result.\n"
  },
  {
    "path": "docs/reference/compat/array/zip.md",
    "content": "# zip (Lodash Compatibility)\n\n::: warning Use [zip](../../array/zip.md) from `es-toolkit`\n\nThis `zip` function operates slowly due to additional processing for Lodash compatibility.\n\nInstead, use the faster and more modern [zip](../../array/zip.md) from `es-toolkit`.\n\n:::\n\nCombines multiple arrays into a single array of tuples.\n\n```typescript\nconst result = zip([1, 2], ['a', 'b']);\n// result is [[1, 'a'], [2, 'b']].\n```\n\n## Usage\n\n### `zip(...arrs)`\n\nTakes multiple arrays and groups the elements at each index into a single tuple to create a new array. If the input arrays have different lengths, the result array will have the length of the longest input array, with missing elements filled with `undefined`.\n\n```typescript\nimport { zip } from 'es-toolkit/compat';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = ['a', 'b', 'c'];\nconst result = zip(arr1, arr2);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// Arrays with different lengths\nconst arr3 = [true, false];\nconst result2 = zip(arr1, arr2, arr3);\n// Returns: [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n\n// Including empty array\nzip([1, 2], [], ['a', 'b']);\n// Returns: [[1, undefined, 'a'], [2, undefined, 'b']]\n```\n\n#### Parameters\n\n- `...arrs` (`any[][]`): The arrays to combine.\n\n#### Returns\n\n(`any[][]`): A new array of tuples containing elements from each index of the input arrays.\n"
  },
  {
    "path": "docs/reference/compat/array/zipObject.md",
    "content": "# zipObject (Lodash Compatibility)\n\n::: warning Use [zipObject](../../array/zipObject.md) from `es-toolkit`\n\nThis `zipObject` function operates slowly due to additional processing for Lodash compatibility.\n\nInstead, use the faster and more modern [zipObject](../../array/zipObject.md) from `es-toolkit`.\n\n:::\n\nCreates an object using two arrays. The first array is used as property names, and the second array is used as the corresponding values.\n\n```typescript\nconst result = zipObject(keys, values);\n```\n\n## Usage\n\n### `zipObject(keys, values)`\n\nUse `zipObject` when you want to create a single object from a key array and a value array. It uses elements from the first array as property names and elements from the second array as their corresponding values. This is especially useful when processing API responses or transforming data.\n\n```typescript\nimport { zipObject } from 'es-toolkit/compat';\n\n// Basic usage\nconst keys = ['a', 'b', 'c'];\nconst values = [1, 2, 3];\nconst result = zipObject(keys, values);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// Arrays with different lengths\nconst keys2 = ['x', 'y', 'z'];\nconst values2 = [10, 20];\nconst result2 = zipObject(keys2, values2);\n// Returns: { x: 10, y: 20, z: undefined }\n\n// Empty arrays provided\nconst result3 = zipObject([], []);\n// Returns: {}\n```\n\n#### Parameters\n\n- `keys` (`PropertyKey[]`): The array to use as property names.\n- `values` (`T[]`): The array to use as property values.\n\n#### Returns\n\n(`Record<PropertyKey, T>`): The created object.\n"
  },
  {
    "path": "docs/reference/compat/array/zipObjectDeep.md",
    "content": "# zipObjectDeep (Lodash Compatibility)\n\nCreates a deeply nested object using a path array and a value array.\n\n```typescript\nconst result = zipObjectDeep(keys, values);\n```\n\n## Usage\n\n### `zipObjectDeep(keys, values)`\n\nCreates a deeply nested object using paths from the first array and values from the second array. Paths can be provided as dot notation strings or property name arrays. This is useful when generating complex nested data structures or converting flat key-value pairs into hierarchical objects.\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\n// Specify paths as dot notation strings\nconst paths = ['a.b.c', 'd.e.f'];\nconst values = [1, 2];\nconst result = zipObjectDeep(paths, values);\n// Returns: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// Specify paths as arrays\nconst pathArrays = [\n  ['a', 'b', 'c'],\n  ['d', 'e', 'f'],\n];\nconst values2 = [1, 2];\nconst result2 = zipObjectDeep(pathArrays, values2);\n// Returns: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// Paths including array indices\nconst arrayPaths = ['a.b[0].c', 'a.b[1].d'];\nconst values3 = [1, 2];\nconst result3 = zipObjectDeep(arrayPaths, values3);\n// Returns: { a: { b: [{ c: 1 }, { d: 2 }] } }\n```\n\n`null` or `undefined` key arrays are treated as empty objects.\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\nzipObjectDeep(null, [1, 2]); // {}\nzipObjectDeep(undefined, [1, 2]); // {}\n```\n\n#### Parameters\n\n- `keys` (`ArrayLike<PropertyPath> | null | undefined`): An array of property paths. Can use dot notation strings or property name arrays.\n- `values` (`ArrayLike<any>`, optional): An array of corresponding values. If not provided, treated as an empty array.\n\n#### Returns\n\n(`object`): Returns a deeply nested object constructed from the given paths and values.\n"
  },
  {
    "path": "docs/reference/compat/array/zipWith.md",
    "content": "# zipWith (Lodash Compatibility)\n\n::: warning Use [zipWith](../../array/zipWith.md) from `es-toolkit`\n\nThis `zipWith` function operates slowly due to additional processing for Lodash compatibility.\n\nInstead, use the faster and more modern [zipWith](../../array/zipWith.md) from `es-toolkit`.\n\n:::\n\nCombines elements from multiple arrays using a combining function into a new array.\n\n```typescript\nconst result = zipWith([1, 2], [3, 4], (a, b) => a + b);\n// result is [4, 6].\n```\n\n## Usage\n\n### `zipWith(...arrs, iteratee)`\n\nTakes multiple arrays and combines elements at each index using a provided function to create a new array. If arrays have different lengths, it processes up to the length of the longest array, passing `undefined` for missing values.\n\n```typescript\nimport { zipWith } from 'es-toolkit/compat';\n\n// Add elements from two arrays\nconst result1 = zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// Combine elements from three arrays\nconst result2 = zipWith([1, 2], [3, 4], [5, 6], (a, b, c) => a + b + c);\n// Returns: [9, 12]\n\n// Arrays with different lengths\nconst result3 = zipWith([1, 2, 3], [4, 5], (a, b) => (a || 0) + (b || 0));\n// Returns: [5, 7, 3]\n```\n\n#### Parameters\n\n- `...arrs` (`any[][]`): The arrays to combine.\n- `iteratee` (`Function`): The function to combine elements at each index.\n\n#### Returns\n\n(`any[]`): A new array of results from applying the combining function.\n"
  },
  {
    "path": "docs/reference/compat/function/after.md",
    "content": "# after (Lodash Compatibility)\n\n::: warning Use [`after`](../../function/after.md) from `es-toolkit`\n\nThis `after` function operates slowly due to complex type validation and integer conversion handling.\n\nInstead, use the faster and more modern [after](../../function/after.md) from `es-toolkit`.\n\n:::\n\nCreates a function that only executes after being called a specified number of times.\n\n```typescript\nconst restrictedFunction = after(n, func);\n```\n\n## Usage\n\n### `after(n, func)`\n\nUse `after` when you want to restrict a function to execute only after it has been called a certain number of times. It's useful for executing callbacks after multiple asynchronous operations are complete or activating a function after an initialization phase.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\n// Basic usage\nconst logAfterThree = after(3, () => {\n  console.log('Executed from the 3rd call!');\n});\n\nlogAfterThree(); // Not executed\nlogAfterThree(); // Not executed\nlogAfterThree(); // Logs \"Executed from the 3rd call!\"\nlogAfterThree(); // Logs \"Executed from the 3rd call!\" (continues to execute)\n```\n\nYou can also use it to execute a specific callback after all asynchronous operations are complete.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst tasks = ['task1', 'task2', 'task3'];\nconst allTasksComplete = after(tasks.length, () => {\n  console.log('All tasks completed!');\n});\n\n// Called when each task completes\ntasks.forEach(task => {\n  performAsyncTask(task, () => {\n    console.log(`${task} complete`);\n    allTasksComplete(); // Logs \"All tasks completed!\" on the 3rd call\n  });\n});\n```\n\nWhen you pass 0 or a negative number, it executes immediately from the first call.\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst immediate = after(0, () => console.log('Executed immediately'));\nimmediate(); // \"Executed immediately\"\n\nconst negative = after(-1, () => console.log('Executed immediately'));\nnegative(); // \"Executed immediately\"\n```\n\n#### Parameters\n\n- `n` (`number`): The number of calls required before the function executes.\n- `func` (`TFunc`): The function to restrict.\n\n#### Returns\n\n(`TFunc`): Returns a new restricted function that executes the original function from the nth call onwards.\n"
  },
  {
    "path": "docs/reference/compat/function/ary.md",
    "content": "# ary (Lodash Compatibility)\n\n::: warning Use [`ary`](../../function/ary.md) from `es-toolkit`\n\nThis `ary` function operates slowly due to complex parameter validation.\n\nInstead, use the faster and more modern [ary](../../function/ary.md) from `es-toolkit`.\n\n:::\n\nCreates a function that limits the number of arguments it can receive.\n\n```typescript\nconst cappedFunction = ary(func, n);\n```\n\n## Usage\n\n### `ary(func, n)`\n\nUse `ary` when you want to limit the number of arguments a function receives. It's useful for safely using functions that receive too many arguments or ignoring unnecessary arguments in callback functions.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// Basic usage\nfunction greet(name, age, city) {\n  return `Hello, ${name}! ${age} years old, from ${city}.`;\n}\n\nconst limitedGreet = ary(greet, 2);\nconsole.log(limitedGreet('John', 30, 'Seoul', 'extraArg'));\n// \"Hello, John! 30 years old, from undefined.\"\n// Arguments from the 3rd onwards are ignored\n```\n\nYou can prevent unnecessary arguments from being passed to callback functions when using them with array methods.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// parseInt accepts a second argument (radix), but map's callback passes 3 arguments\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// Incorrect usage - parseInt receives the index as radix\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN]\n\n// Use ary to pass only the first argument\nconsole.log(numbers.map(ary(parseInt, 1))); // [1, 2, 3, 4, 5]\n```\n\nYou can limit functions to receive only the desired number of parameter arguments.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nfunction sum(...args) {\n  return args.reduce((total, num) => total + num, 0);\n}\n\nconst sum0 = ary(sum, 0);\nconst sum1 = ary(sum, 1);\nconst sum2 = ary(sum, 2);\nconst sum3 = ary(sum, 3);\n\nconsole.log(sum0(1, 2, 3, 4, 5)); // 0 (no arguments)\nconsole.log(sum1(1, 2, 3, 4, 5)); // 1 (first argument only)\nconsole.log(sum2(1, 2, 3, 4, 5)); // 3 (first two arguments only)\nconsole.log(sum3(1, 2, 3, 4, 5)); // 6 (first three arguments only)\n```\n\nWhen passing a negative number or `NaN`, it's treated as 0 and all arguments are ignored.\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nconst func = (a, b, c) => [a, b, c];\n\nconsole.log(ary(func, -1)(1, 2, 3)); // [] (negative treated as 0)\nconsole.log(ary(func, NaN)(1, 2, 3)); // [] (NaN treated as 0)\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to cap arguments for.\n- `n` (`number`, optional): The maximum number of arguments to allow. If omitted, uses the function's `length` property.\n\n#### Returns\n\n(`Function`): Returns a new function that accepts at most `n` arguments.\n"
  },
  {
    "path": "docs/reference/compat/function/attempt.md",
    "content": "# attempt (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [`attempt`](../../util/attempt.md) function or try-catch blocks instead\n\nThis `attempt` function can be confusing because it returns both errors and return values without distinction.\n\nInstead, use the more direct and clear [`attempt`](../../util/attempt.md) function or try-catch blocks.\n\n:::\n\nA function that executes a function and returns an error object if an error occurs.\n\n```typescript\nconst result = attempt(func, ...args);\n```\n\n## Usage\n\n### `attempt(func, ...args)`\n\nUse `attempt` when you want to safely execute a function. It's useful when executing a function that may throw errors, preventing the program from crashing and handling errors as return values.\n\n```typescript\nimport { attempt } from 'es-toolkit/compat';\n\n// Basic usage - successful case\nconst result = attempt((x, y) => x + y, 2, 3);\nconsole.log(result); // 5\n\n// Error case\nconst errorResult = attempt(() => {\n  throw new Error('Something went wrong');\n});\nconsole.log(errorResult); // Error: Something went wrong\n```\n\nHere's the difference compared to using try-catch blocks.\n\n```typescript\n// Using attempt\nimport { attempt } from 'es-toolkit/compat';\n\nconst result = attempt(riskyFunction, arg1, arg2);\nif (result instanceof Error) {\n  console.log('Error occurred:', result.message);\n} else {\n  console.log('Result:', result);\n}\n\n// Using try-catch (more direct)\ntry {\n  const result = riskyFunction(arg1, arg2);\n  console.log('Result:', result);\n} catch (error) {\n  console.log('Error occurred:', error.message);\n}\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to execute.\n- `args` (`...any[]`): The arguments to pass to the function.\n\n#### Returns\n\n(`ReturnType<F> | Error`): Returns the return value if the function succeeds, or an Error object if an error occurs.\n"
  },
  {
    "path": "docs/reference/compat/function/before.md",
    "content": "# before (Lodash Compatibility)\n\n::: warning Use [`before`](../../function/before.md) from `es-toolkit`\n\nThis `before` function operates slower due to complex type validation and integer conversion handling.\n\nInstead, use the faster and more modern [before](../../function/before.md) from `es-toolkit`.\n\n:::\n\nCreates a function that executes the original function up to a specified number of times, then returns the last result for subsequent calls.\n\n```typescript\nconst limitedFunction = before(n, func);\n```\n\n## Usage\n\n### `before(n, func)`\n\nUse `before` when you want to restrict a function to execute only up to a certain number of times. This is useful for limiting function call counts or when you want to execute a function only during the initial setup phase.\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// Basic usage\nlet count = 0;\nconst beforeThree = before(3, () => ++count);\n\nconsole.log(beforeThree()); // 1 (first call)\nconsole.log(beforeThree()); // 2 (second call)\nconsole.log(beforeThree()); // 2 (from third call onwards, returns last result)\nconsole.log(beforeThree()); // 2 (continues to return last result)\n```\n\nAlternative using closures:\n\n```typescript\n// Using before\nconst beforeThree = before(3, myFunction);\n\n// Using closures (simpler and faster)\nfunction createBefore(limit, callback) {\n  let callCount = 0;\n  let lastResult;\n\n  return function (...args) {\n    if (callCount < limit - 1) {\n      lastResult = callback.apply(this, args);\n      callCount++;\n    }\n    return lastResult;\n  };\n}\n\nconst beforeThreeAlternative = createBefore(3, myFunction);\n```\n\nUsing as an initialization function:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nclass Database {\n  constructor() {\n    this.isInitialized = false;\n\n    // Initialization executes only once\n    this.initialize = before(2, () => {\n      console.log('Initializing database...');\n      this.setupConnection();\n      this.isInitialized = true;\n      return 'Initialization complete';\n    });\n  }\n\n  setupConnection() {\n    // Actual connection setup logic\n  }\n\n  query(sql) {\n    const initResult = this.initialize();\n    console.log(initResult); // First call: \"Initialization complete\", subsequent: same result\n\n    // Query execution logic\n    return `Query executed: ${sql}`;\n  }\n}\n\nconst db = new Database();\ndb.query('SELECT * FROM users'); // Initialization executed\ndb.query('SELECT * FROM products'); // Initialization not executed\n```\n\nLimiting API calls:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// Allow API calls up to 5 times maximum\nconst limitedApiCall = before(6, endpoint => {\n  console.log(`API call: ${endpoint}`);\n  return fetch(endpoint).then(res => res.json());\n});\n\n// First 5 calls execute actual API calls\nlimitedApiCall('/api/data1'); // Actual call\nlimitedApiCall('/api/data2'); // Actual call\nlimitedApiCall('/api/data3'); // Actual call\nlimitedApiCall('/api/data4'); // Actual call\nlimitedApiCall('/api/data5'); // Actual call\nlimitedApiCall('/api/data6'); // Returns last result (no API call)\n```\n\nLimiting event listeners:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// Process click events up to 3 times\nconst limitedClickHandler = before(4, event => {\n  console.log('Click processed:', event.target.id);\n  return `Processed: ${Date.now()}`;\n});\n\ndocument.getElementById('button').addEventListener('click', limitedClickHandler);\n// Only the first 3 clicks are processed, subsequent calls return the last result\n```\n\nHandling parameters and return values:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst limitedCalculator = before(3, (operation, a, b) => {\n  const result = operation === 'add' ? a + b : a - b;\n  console.log(`Calculation: ${a} ${operation} ${b} = ${result}`);\n  return result;\n});\n\nconsole.log(limitedCalculator('add', 5, 3)); // \"Calculation: 5 add 3 = 8\", returns: 8\nconsole.log(limitedCalculator('subtract', 10, 4)); // \"Calculation: 10 subtract 4 = 6\", returns: 6\nconsole.log(limitedCalculator('multiply', 7, 2)); // No calculation, returns: 6 (last result)\n```\n\nPassing 0 or 1 prevents the function from executing:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst neverCalled = before(0, () => {\n  console.log('This function will not execute');\n  return 'result';\n});\n\nconst onceOnly = before(1, () => {\n  console.log('This function will also not execute');\n  return 'result';\n});\n\nconsole.log(neverCalled()); // undefined\nconsole.log(onceOnly()); // undefined\n```\n\nResource cleanup optimization:\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// Function references are automatically cleaned up to prevent memory leaks\nconst limitedProcessor = before(2, data => {\n  // Complex data processing\n  return processComplexData(data);\n});\n\n// After the 2nd call, the original function reference is removed (garbage collection)\n```\n\n#### Parameters\n\n- `n` (`number`): The maximum number of times to execute the function. It executes up to n-1 times, and from the nth call onwards, returns the last result.\n- `func` (`Function`): The function to restrict.\n\n#### Returns\n\n(`Function`): Returns a new function that executes the original function up to the specified number of times, and thereafter returns the last result.\n"
  },
  {
    "path": "docs/reference/compat/function/bind.md",
    "content": "# bind (Lodash Compatibility)\n\n::: warning Use `Function.prototype.bind()`\n\nThis `bind` function operates slowly due to complex placeholder handling, constructor function checking, and argument merging logic. If you don't need placeholders, the native `Function.prototype.bind()` is faster and simpler.\n\nUse the faster and standard `Function.prototype.bind()` instead.\n\n:::\n\nCreates a function that fixes the `this` context and provides some arguments in advance.\n\n```typescript\nconst boundFunction = bind(func, thisObj, ...partialArgs);\n```\n\n## Usage\n\n### `bind(func, thisObj, ...partialArgs)`\n\nUse `bind` when you want to fix the `this` context of a function or provide some arguments in advance. It's especially useful when you want to use placeholders to provide arguments at specific positions later.\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\n// Basic usage\nfunction greet(greeting, punctuation) {\n  return greeting + ' ' + this.user + punctuation;\n}\n\nconst object = { user: 'John' };\nconst boundGreet = bind(greet, object, 'Hello');\n\nconsole.log(boundGreet('!')); // \"Hello John!\"\nconsole.log(boundGreet('~')); // \"Hello John~\"\n```\n\nComparison with native bind:\n\n```typescript\n// Using bind\nimport { bind } from 'es-toolkit/compat';\n\nconst boundFn1 = bind(func, thisObj, 'arg1');\n\n// Using native bind (faster)\nconst boundFn2 = func.bind(thisObj, 'arg1');\n\n// Results are the same but native is faster\n```\n\nUsing placeholder functionality:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction calculate(operation, a, b, suffix) {\n  return `${a} ${operation} ${b} = ${operation === '+' ? a + b : a - b}${suffix}`;\n}\n\n// Provide arguments at specific positions later using placeholders\nconst calcWithSuffix = bind(\n  calculate,\n  null,\n  bind.placeholder, // operation will be provided later\n  bind.placeholder, // a will be provided later\n  bind.placeholder, // b will be provided later\n  ' points' // suffix is provided in advance\n);\n\nconsole.log(calcWithSuffix('+', 5, 3)); // \"5 + 3 = 8 points\"\nconsole.log(calcWithSuffix('-', 10, 4)); // \"10 - 4 = 6 points\"\n```\n\nMore practical placeholder example:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction apiRequest(method, url, options, callback) {\n  // API request logic\n  console.log(`${method} ${url}`, options);\n  callback(`${method} request complete`);\n}\n\n// Create a partially applied function for POST requests\nconst postRequest = bind(\n  apiRequest,\n  null,\n  'POST', // method fixed\n  bind.placeholder, // url will be provided later\n  { 'Content-Type': 'application/json' }, // options fixed\n  bind.placeholder // callback will be provided later\n);\n\npostRequest('/api/users', result => {\n  console.log(result); // \"POST request complete\"\n});\n\npostRequest('/api/products', result => {\n  console.log(result); // \"POST request complete\"\n});\n```\n\nMethod binding:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass Logger {\n  constructor(prefix) {\n    this.prefix = prefix;\n  }\n\n  log(level, message) {\n    console.log(`[${this.prefix}] ${level}: ${message}`);\n  }\n}\n\nconst logger = new Logger('MyApp');\n\n// Bind method to use in a different context\nconst logError = bind(logger.log, logger, 'ERROR');\nconst logInfo = bind(logger.log, logger, 'INFO');\n\n// Now can be used independently\nsetTimeout(() => logError('Server connection failed'), 1000);\nsetTimeout(() => logInfo('Application started'), 2000);\n```\n\nUsing in event handlers:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass ButtonHandler {\n  constructor(name) {\n    this.name = name;\n    this.clickCount = 0;\n  }\n\n  handleClick(event, customData) {\n    this.clickCount++;\n    console.log(`${this.name} button clicked #${this.clickCount}`);\n    console.log('Custom data:', customData);\n    console.log('Event type:', event.type);\n  }\n}\n\nconst handler = new ButtonHandler('Menu');\n\n// Provide custom data in advance, pass event later\nconst boundHandler = bind(\n  handler.handleClick,\n  handler,\n  bind.placeholder, // event comes later\n  'Menu selected' // customData provided in advance\n);\n\n// Connect to DOM event (event is automatically passed as first argument)\ndocument.getElementById('menu-btn')?.addEventListener('click', boundHandler);\n```\n\nConstructor functions are also supported:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city || 'Seoul';\n}\n\n// Constructor for creating Seoul residents\nconst SeoulPerson = bind(Person, null, bind.placeholder, bind.placeholder, 'Seoul');\n\nconst person1 = new SeoulPerson('John', 30);\nconst person2 = new SeoulPerson('Jane', 25);\n\nconsole.log(person1); // Person { name: 'John', age: 30, city: 'Seoul' }\nconsole.log(person2); // Person { name: 'Jane', age: 25, city: 'Seoul' }\n```\n\nUsing in functional programming:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// Fix parseInt radix to 10\nconst parseDecimal = bind(parseInt, null, bind.placeholder, 10);\n\n// Safe to use in map\nconst parsed = ['1', '2', '3'].map(parseDecimal);\nconsole.log(parsed); // [1, 2, 3]\n\n// Problem when using regular parseInt\nconst problematic = ['1', '2', '3'].map(parseInt); // [1, NaN, NaN]\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to bind.\n- `thisObj` (`any`, optional): The `this` value to bind to the function.\n- `partialArgs` (`...any[]`): The arguments to provide in advance. You can use `bind.placeholder` to specify positions to be provided later.\n\n#### Returns\n\n(`Function`): Returns a new function with `this` fixed and some arguments applied in advance.\n"
  },
  {
    "path": "docs/reference/compat/function/bindKey.md",
    "content": "# bindKey (Lodash Compatibility)\n\n::: warning Use arrow functions or the `bind` method\nThis `bindKey` function operates in a complex and slow manner due to dynamic method binding and placeholder handling. Using JavaScript's native `bind` method or arrow functions is simpler and performs better.\n\nInstead, use the faster and more modern arrow functions or `Function.prototype.bind`.\n:::\n\nBinds a method of an object, allowing it to reference methods that may be redefined later.\n\n```typescript\nconst bound = bindKey(object, key, ...partialArgs);\n```\n\n## Usage\n\n### `bindKey(object, key, ...partialArgs)`\n\nUse `bindKey` when you want to bind a method of an object while allowing the method to be changed later. Unlike regular `bind`, it references the latest method each time it's called.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// Bind the method.\nlet bound = bindKey(object, 'greet', 'hi');\nbound('!');\n// Returns: 'hi fred!'\n\n// Redefine the method.\nobject.greet = function (greeting, punctuation) {\n  return greeting + 'ya ' + this.user + punctuation;\n};\n\n// The bound function calls the new method.\nbound('!');\n// Returns: 'hiya fred!'\n```\n\nYou can use placeholders to reserve argument positions.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// Use a placeholder.\nconst bound = bindKey(object, 'greet', bindKey.placeholder, '!');\nbound('hi');\n// Returns: 'hi fred!'\n```\n\nPartially applied arguments are passed first, followed by arguments provided at call time.\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  add: function (a, b, c) {\n    return a + b + c;\n  },\n};\n\n// Set the first argument in advance.\nconst bound = bindKey(object, 'add', 10);\nbound(20, 30);\n// Returns: 60 (10 + 20 + 30)\n```\n\n#### Parameters\n\n- `object` (`object`): The object to invoke the method on.\n- `key` (`string`): The key of the method to call.\n- `...partialArgs` (`any[]`, optional): The arguments to be partially applied to the method. You can use `bindKey.placeholder` to reserve argument positions.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new bound function. This function references the latest method of the object each time it's called.\n"
  },
  {
    "path": "docs/reference/compat/function/curry.md",
    "content": "# curry (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `curry` or manual closures\nThis `curry` function performs slowly due to complex placeholder handling, arity validation, and argument composition logic.\n\nIf you don't need placeholders, use the faster `es-toolkit`'s [`curry`](../../function/curry.md) or simple closures instead.\n:::\n\nCurries a function so it can accept arguments one at a time or multiple at once.\n\n```typescript\nconst curriedFunction = curry(func, arity);\n```\n\n## Usage\n\n### `curry(func, arity)`\n\nUse `curry` when you want to curry a function to make partial application easier. It's useful for providing arguments step by step or using placeholders to provide arguments at specific positions later.\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// Basic usage\nfunction add(a, b, c) {\n  return a + b + c;\n}\n\nconst curriedAdd = curry(add);\n\n// Can be called in various ways\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(curriedAdd(1, 2)(3)); // 6\nconsole.log(curriedAdd(1)(2, 3)); // 6\nconsole.log(curriedAdd(1, 2, 3)); // 6\n```\n\nComparison with main library curry:\n\n```typescript\n// compat version (flexible, but slower)\nimport { curry } from 'es-toolkit/compat';\nconst curriedCompat = curry(add);\ncurriedCompat(1, 2)(3); // supported\ncurriedCompat(1)(curry.placeholder, 3)(2); // placeholder support\n\n// main library version (faster, but one at a time only)\nimport { curry } from 'es-toolkit';\nconst curriedMain = curry(add);\ncurriedMain(1)(2)(3); // supported\ncurriedMain(1, 2)(3); // not supported\n```\n\nUsing placeholder feature:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction greet(greeting, name, punctuation) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst curriedGreet = curry(greet);\n\n// Skip middle arguments with placeholder\nconst greetWithExclamation = curriedGreet(curry.placeholder, curry.placeholder, '!');\nconsole.log(greetWithExclamation('Hello', 'John')); // \"Hello, John!\"\n\nconst sayHello = curriedGreet('Hello');\nconsole.log(sayHello(curry.placeholder, '~')('Jane')); // \"Hello, Jane~\"\n```\n\nUsing in functional programming:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// Create mapping functions\nconst map = curry((fn, array) => array.map(fn));\nconst filter = curry((predicate, array) => array.filter(predicate));\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// Create reusable functions\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\n\nconst mapDouble = map(double);\nconst filterEven = filter(isEven);\n\nconsole.log(mapDouble(numbers)); // [2, 4, 6, 8, 10]\nconsole.log(filterEven(numbers)); // [2, 4]\n\n// Function composition\nconst processNumbers = nums => mapDouble(filterEven(nums));\nconsole.log(processNumbers(numbers)); // [4, 8]\n```\n\nConfiguring API client:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction apiRequest(method, baseUrl, endpoint, options) {\n  return fetch(`${baseUrl}${endpoint}`, {\n    method,\n    ...options,\n  });\n}\n\nconst curriedApiRequest = curry(apiRequest);\n\n// Create specialized functions with default settings\nconst apiGet = curriedApiRequest('GET', 'https://api.example.com');\nconst apiPost = curriedApiRequest('POST', 'https://api.example.com');\n\n// Include authentication headers\nconst authenticatedPost = apiPost(curry.placeholder, {\n  headers: { Authorization: 'Bearer token123' },\n});\n\n// Usage\napiGet('/users'); // GET https://api.example.com/users\nauthenticatedPost('/users'); // POST with auth headers\n```\n\nMathematical operation functions:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nconst calculate = curry((operation, a, b) => {\n  switch (operation) {\n    case '+':\n      return a + b;\n    case '-':\n      return a - b;\n    case '*':\n      return a * b;\n    case '/':\n      return a / b;\n    default:\n      throw new Error('Unsupported operation');\n  }\n});\n\n// Specialized operation functions\nconst add = calculate('+');\nconst subtract = calculate('-');\nconst multiply = calculate('*');\n\nconsole.log(add(5, 3)); // 8\nconsole.log(subtract(10)(4)); // 6\nconsole.log(multiply(3, 4)); // 12\n\n// Fix second operand with placeholder\nconst addFive = calculate('+', curry.placeholder, 5);\nconsole.log(addFive(10)); // 15\n```\n\nSpecifying arity:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return [a, b, c, rest];\n}\n\n// Limit arity to 3\nconst curriedFixed = curry(variableArgsFunction, 3);\n\nconsole.log(curriedFixed(1)(2)(3)); // [1, 2, 3, []]\nconsole.log(curriedFixed(1, 2)(3)); // [1, 2, 3, []]\n\n// Use without arity (default: function.length)\nconst curriedDefault = curry(variableArgsFunction); // arity = 3\n```\n\nSimple currying alternative:\n\n```typescript\n// Using curry\nconst curriedAdd = curry((a, b, c) => a + b + c);\n\n// Manual closure (faster)\nconst manualCurry = a => b => c => a + b + c;\n\n// Both produce the same result\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(manualCurry(1)(2)(3)); // 6\n```\n\nConstructor functions are also supported:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city;\n}\n\nconst CurriedPerson = curry(Person);\nconst SeoulPerson = CurriedPerson(curry.placeholder, curry.placeholder, 'Seoul');\n\nconst person1 = new SeoulPerson('John', 30);\nconst person2 = new SeoulPerson('Jane', 25);\n\nconsole.log(person1.city); // \"Seoul\"\nconsole.log(person2.city); // \"Seoul\"\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to curry.\n- `arity` (`number`, optional): The arity (number of arguments) of the function. If omitted, `func.length` is used.\n\n#### Returns\n\n(`Function & { placeholder: symbol }`): Returns the curried function. The `placeholder` property allows you to control argument positions.\n"
  },
  {
    "path": "docs/reference/compat/function/curryRight.md",
    "content": "# curryRight (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [`curryRight`](../../function/curryRight.md) or manual closures instead\n\nThis `curryRight` function operates slowly due to complex placeholder handling, arity validation, and argument composition logic.\n\nIf you don't need placeholders, use the faster `es-toolkit`'s [`curryRight`](../../function/curryRight.md) or simple closures instead.\n\n:::\n\nCurries a function from right to left, creating a function that accepts arguments one at a time or several at a time, starting from the last argument.\n\n```typescript\nconst curriedFunction = curryRight(func, arity);\n```\n\n## Usage\n\n### `curryRight(func, arity)`\n\nUse `curryRight` when you want to curry a function from right to left and partially apply arguments starting from the last one. Unlike regular `curry`, it processes arguments starting from the last one first.\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// Basic usage\nfunction subtract(a, b, c) {\n  return a - b - c;\n}\n\nconst curriedSubtract = curryRight(subtract);\n\n// Currying from right (starting from last argument)\nconsole.log(curriedSubtract(1)(2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1, 2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1)(2, 5)); // 2 - 5 - 1 = -4\nconsole.log(curriedSubtract(1, 2, 5)); // 1 - 2 - 5 = -6\n```\n\nDifference between `curry` and `curryRight`:\n\n```typescript\nimport { curry, curryRight } from 'es-toolkit/compat';\n\nfunction divide(a, b, c) {\n  return a / b / c;\n}\n\n// Regular curry (from left)\nconst leftCurried = curry(divide);\nconsole.log(leftCurried(12)(3)(2)); // ((12 / 3) / 2) = 2\n\n// curryRight (from right)\nconst rightCurried = curryRight(divide);\nconsole.log(rightCurried(2)(3)(12)); // ((12 / 3) / 2) = 2\n// The last provided 12 becomes the first argument (a)\n```\n\nComparison with main library:\n\n```typescript\n// compat version (flexible, but slower)\nimport { curryRight } from 'es-toolkit/compat';\nconst curriedCompat = curryRight(subtract);\ncurriedCompat(1, 2)(3); // supported\ncurriedCompat(1)(curryRight.placeholder, 3)(2); // placeholder supported\n\n// main library version (faster, but one at a time only)\nimport { curryRight } from 'es-toolkit';\nconst curriedMain = curryRight(subtract);\ncurriedMain(1)(2)(3); // supported\ncurriedMain(1, 2)(3); // not supported\n```\n\nUsing placeholder feature:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction formatMessage(name, action, time) {\n  return `${name} did ${action} at ${time}`;\n}\n\nconst curriedFormat = curryRight(formatMessage);\n\n// Skip specific positions with placeholder\nconst todayAction = curriedFormat('today');\nconst todayLoginAction = todayAction(curryRight.placeholder, 'login');\n\nconsole.log(todayLoginAction('John'));\n// \"John did login at today\"\n\n// Fix time first\nconst morningFormat = curriedFormat('9 AM');\nconsole.log(morningFormat('comment', 'Jane'));\n// \"Jane did comment at 9 AM\"\n```\n\nUsing in array processing:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// Take a specific number of items from the end of an array\nfunction takeFromEnd(array, count, separator = ', ') {\n  return array.slice(-count).join(separator);\n}\n\nconst curriedTake = curryRight(takeFromEnd);\n\n// Create function that separates with comma\nconst takeWithComma = curriedTake(', ');\n\n// Get last 3 items\nconst takeLast3 = takeWithComma(3);\n\nconst fruits = ['apple', 'banana', 'orange', 'grape', 'kiwi'];\nconsole.log(takeLast3(fruits)); // \"orange, grape, kiwi\"\n\n// Use different separator\nconst takeWithDash = curriedTake(' - ');\nconsole.log(takeWithDash(2, fruits)); // \"grape - kiwi\"\n```\n\nUsing in function composition:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// Log output function\nfunction logWithPrefix(message, level, timestamp) {\n  return `[${timestamp}] ${level}: ${message}`;\n}\n\nconst curriedLog = curryRight(logWithPrefix);\n\n// Fix with current time\nconst currentTimeLog = curriedLog(new Date().toISOString());\n\n// Create loggers by level\nconst errorLog = currentTimeLog('ERROR');\nconst infoLog = currentTimeLog('INFO');\nconst debugLog = currentTimeLog('DEBUG');\n\n// Usage\nconsole.log(errorLog('Database connection failed'));\nconsole.log(infoLog('Server started'));\nconsole.log(debugLog('Processing user request'));\n```\n\nFunctional programming pipeline:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// Data transformation functions\nconst mapWith = curryRight((array, fn) => array.map(fn));\nconst filterWith = curryRight((array, predicate) => array.filter(predicate));\nconst reduceWith = curryRight((array, reducer, initial) => array.reduce(reducer, initial));\n\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n// Define transformation functions\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\nconst sum = (acc, val) => acc + val;\n\n// Compose pipeline (right first)\nconst processNumbers = nums => {\n  return reduceWith(filterWith(mapWith(nums, double), isEven), sum, 0);\n};\n\nconsole.log(processNumbers(numbers)); // Double all numbers, filter even ones, then sum\n```\n\nAPI request builder:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction makeRequest(url, method, headers, body) {\n  return fetch(url, { method, headers, body });\n}\n\nconst curriedRequest = curryRight(makeRequest);\n\n// Set body first\nconst withJsonBody = curriedRequest(JSON.stringify({ data: 'test' }));\n\n// Add headers\nconst withHeaders = withJsonBody({\n  'Content-Type': 'application/json',\n  Authorization: 'Bearer token123',\n});\n\n// Set POST method\nconst postRequest = withHeaders('POST');\n\n// Final usage\npostRequest('/api/data')\n  .then(response => response.json())\n  .then(data => console.log(data));\n```\n\nManual currying alternative:\n\n```typescript\n// Using curryRight\nconst curriedSubtract = curryRight((a, b, c) => a - b - c);\n\n// Manual closure (faster, from right)\nconst manualCurryRight = c => b => a => a - b - c;\n\n// Both give same result\nconsole.log(curriedSubtract(1)(2)(5)); // 2\nconsole.log(manualCurryRight(1)(2)(5)); // 2\n```\n\nSpecifying arity:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return { a, b, c, rest };\n}\n\n// Limit arity to 3 (ignore rest)\nconst curriedFixed = curryRight(variableArgsFunction, 3);\n\n// Receive in order c, b, a from right\nconsole.log(curriedFixed(3)(2)(1)); // { a: 1, b: 2, c: 3, rest: [] }\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to curry from right to left.\n- `arity` (`number`, optional): The arity (number of arguments) of the function. If omitted, `func.length` is used.\n\n#### Returns\n\n(`Function & { placeholder: symbol }`): Returns a function curried from right to left. The `placeholder` property can be used to control argument positions.\n"
  },
  {
    "path": "docs/reference/compat/function/debounce.md",
    "content": "# debounce (Lodash compatibility)\n\n::: warning Use [`debounce`](../../function/debounce.md) from `es-toolkit`\n\nThis `debounce` function has overhead due to complex `maxWait` handling and Lodash-compatible option structure.\n\nInstead, use the faster and more modern [`debounce`](../../function/debounce.md) from `es-toolkit`.\n\n:::\n\nCreates a debounced function that delays invoking the provided function until after `wait` milliseconds have elapsed since the last time it was invoked.\n\n```typescript\nconst debouncedFunction = debounce(func, wait, options);\n```\n\n## Usage\n\n### `debounce(func, wait, options)`\n\nUse `debounce` when you want to delay function invocation. It's useful for preventing excessive calls in search inputs, scroll events, button clicks, etc.\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// Basic usage\nconst searchFunction = debounce(query => {\n  console.log('Searching:', query);\n}, 300);\n\n// Only executes if not called again within 300ms\nsearchFunction('React'); // Not executed\nsearchFunction('Vue'); // Not executed\nsearchFunction('Angular'); // Logs \"Searching: Angular\" after 300ms\n```\n\nComparison with main library debounce:\n\n```typescript\n// compat version (Lodash compatible, additional options like maxWait)\nimport { debounce } from 'es-toolkit/compat';\nconst debouncedCompat = debounce(func, 300, {\n  leading: true,\n  trailing: false,\n  maxWait: 1000\n});\n\n// Main library version (faster, simpler)\nimport { debounce } from 'es-toolkit';\nconst debouncedMain = debounce(func, 300, {\n  edges: ['leading'] // Uses edges instead of leading/trailing\n});\n```\n\nLeading and trailing options:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst func = () => console.log('Executed');\n\n// leading: true - Execute immediately on first call\nconst leadingDebounce = debounce(func, 1000, { leading: true });\nleadingDebounce(); // Immediately logs \"Executed\"\nleadingDebounce(); // Wait 1 second\n// No additional execution after 1 second\n\n// trailing: true (default) - Execute after delay following last call\nconst trailingDebounce = debounce(func, 1000, { trailing: true });\ntrailingDebounce(); // Wait 1 second\ntrailingDebounce(); // Wait 1 second (cancels previous timer)\n// Logs \"Executed\" after 1 second\n\n// Both true - Execute at start and end\nconst bothDebounce = debounce(func, 1000, {\n  leading: true,\n  trailing: true,\n});\nbothDebounce(); // Immediately logs \"Executed\"\nbothDebounce(); // Wait 1 second\n// Logs \"Executed\" after 1 second (trailing)\n```\n\nmaxWait option:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// Guarantees execution at least every 2 seconds\nconst debouncedWithMaxWait = debounce(() => console.log('Saved'), 500, { maxWait: 2000 });\n\n// Even with rapid consecutive calls, executes every 2 seconds\nsetInterval(() => {\n  debouncedWithMaxWait();\n}, 100); // Calls every 100ms but logs \"Saved\" every 2 seconds\n```\n\nReal-world search example:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass SearchComponent {\n  constructor() {\n    this.searchInput = document.getElementById('search');\n\n    // Debounce user input by 300ms\n    this.debouncedSearch = debounce(this.performSearch.bind(this), 300, {\n      leading: false, // Don't search immediately on input start\n      trailing: true, // Search after input stops\n    });\n\n    this.searchInput.addEventListener('input', e => {\n      this.debouncedSearch(e.target.value);\n    });\n  }\n\n  performSearch(query) {\n    if (query.length < 2) return;\n\n    console.log('API call:', query);\n    // fetch(`/api/search?q=${query}`)...\n  }\n}\n```\n\nScroll event optimization:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// Debounce scroll events by 100ms, but execute at least every 500ms\nconst optimizedScrollHandler = debounce(\n  () => {\n    const scrollTop = window.pageYOffset;\n    console.log('Scroll position:', scrollTop);\n\n    // Header hide/show logic\n    if (scrollTop > 100) {\n      document.header.classList.add('hidden');\n    } else {\n      document.header.classList.remove('hidden');\n    }\n  },\n  100,\n  { maxWait: 500 }\n);\n\nwindow.addEventListener('scroll', optimizedScrollHandler);\n```\n\nAPI call throttling:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass AutoSave {\n  constructor() {\n    // Debounce by 500ms, save at least every 5 seconds\n    this.debouncedSave = debounce(this.saveToServer.bind(this), 500, { maxWait: 5000 });\n  }\n\n  onTextChange(content) {\n    this.pendingContent = content;\n    this.debouncedSave();\n  }\n\n  saveToServer() {\n    if (!this.pendingContent) return;\n\n    console.log('Saving to server:', this.pendingContent);\n    // fetch('/api/save', { ... })\n\n    this.pendingContent = null;\n  }\n}\n```\n\ncancel and flush methods:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst debouncedFunc = debounce(() => {\n  console.log('Executed');\n}, 1000);\n\ndebouncedFunc(); // Waiting 1 second\n\n// Cancel pending execution\ndebouncedFunc.cancel();\n\n// Or execute immediately\ndebouncedFunc(); // Start waiting 1 second\ndebouncedFunc.flush(); // Immediately logs \"Executed\" and cancels timer\n```\n\nPreventing duplicate button clicks:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleSubmit = debounce(\n  async formData => {\n    console.log('Submitting form...');\n    try {\n      const response = await fetch('/api/submit', {\n        method: 'POST',\n        body: formData,\n      });\n      console.log('Submission complete');\n    } catch (error) {\n      console.error('Submission failed:', error);\n    }\n  },\n  1000,\n  { leading: true, trailing: false } // Only handle first click\n);\n\ndocument.getElementById('submit-btn').addEventListener('click', e => {\n  const formData = new FormData(e.target.form);\n  handleSubmit(formData);\n});\n```\n\nResize event handling:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleResize = debounce(\n  () => {\n    const width = window.innerWidth;\n    const height = window.innerHeight;\n\n    console.log('Window resized:', { width, height });\n\n    // Recalculate layout\n    recalculateLayout();\n  },\n  250,\n  { leading: false, trailing: true }\n);\n\nwindow.addEventListener('resize', handleResize);\n\n// Cleanup on page unload\nwindow.addEventListener('beforeunload', () => {\n  handleResize.cancel();\n});\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to debounce.\n- `wait` (`number`, optional): The number of milliseconds to delay. Defaults to `0`.\n- `options` (`DebounceSettings`, optional): An options object.\n  - `leading` (`boolean`): If `true`, executes the function at the start of the delay. Defaults to `false`.\n  - `trailing` (`boolean`): If `true`, executes the function at the end of the delay. Defaults to `true`.\n  - `maxWait` (`number`): The maximum time the function execution can be delayed. Defaults to `Infinity`.\n\n#### Returns\n\n(`DebouncedFunc`): Returns the debounced function. It includes `cancel()` and `flush()` methods.\n"
  },
  {
    "path": "docs/reference/compat/function/defer.md",
    "content": "# defer (Lodash Compatibility)\n\n::: warning Use `setTimeout` instead\n\nThis `defer` function is a simple wrapper that internally calls `setTimeout(func, 1, ...args)`.\n\nUse the more direct and modern `setTimeout` instead.\n\n:::\n\nDefers the execution of a function to the next event loop.\n\n```typescript\nconst timerId = defer(func, ...args);\n```\n\n## Usage\n\n### `defer(func, ...args)`\n\nUse `defer` when you want to execute a function after the current call stack has ended. You can defer the function's execution to the next event loop while passing additional arguments to the function.\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// Defer console output\ndefer(console.log, 'deferred message');\n// Outputs 'deferred message' after the current call stack ends\n\n// Defer execution with function and arguments\nconst greet = (name: string, greeting: string) => {\n  console.log(`${greeting}, ${name}!`);\n};\n\ndefer(greet, 'John', 'Hello');\n// Outputs 'Hello, John!' after the current call stack ends\n```\n\nInternally, it uses `setTimeout(func, 1, ...args)` to execute the function after 1 millisecond.\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// These two codes work identically\ndefer(console.log, 'message');\nsetTimeout(console.log, 1, 'message');\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function to defer execution.\n- `...args` (`any[]`): The arguments to pass to the function.\n\n#### Returns\n\n(`number`): Returns the timer ID returned from `setTimeout`. You can cancel execution with `clearTimeout`.\n"
  },
  {
    "path": "docs/reference/compat/function/delay.md",
    "content": "# delay (Lodash Compatibility)\n\n::: warning Use `setTimeout`\n\nThis `delay` function is a simple wrapper around `setTimeout`, but has slight overhead due to additional type validation and number conversion.\n\nUse the faster and standard `setTimeout` directly instead.\n\n:::\n\nSets a timer to execute a function after a specified amount of time.\n\n```typescript\nconst timerId = delay(func, wait, ...args);\n```\n\n## Usage\n\n### `delay(func, wait, ...args)`\n\nUse `delay` when you want to defer function execution by a specific amount of time. It's useful for animation timing, delaying user feedback, or scheduling asynchronous operations.\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\n// Basic usage\nconst timerId = delay(() => {\n  console.log('Executed after 1 second');\n}, 1000);\n\n// Using with arguments\ndelay(\n  (name, age) => {\n    console.log(`Hello, ${name}, age ${age}!`);\n  },\n  2000,\n  'John Doe',\n  30\n);\n// After 2 seconds: Prints \"Hello, John Doe, age 30!\"\n```\n\nComparison with `setTimeout`:\n\n```typescript\n// Using delay\nimport { delay } from 'es-toolkit/compat';\n\nconst timerId1 = delay(myFunction, 1000, 'arg1', 'arg2');\n\n// Using setTimeout (faster, standard)\nconst timerId2 = setTimeout(myFunction, 1000, 'arg1', 'arg2');\n\n// Or with arrow function\nconst timerId3 = setTimeout(() => myFunction('arg1', 'arg2'), 1000);\n```\n\nAnimation sequence:\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass AnimationSequence {\n  constructor(element) {\n    this.element = element;\n  }\n\n  fadeInSequence() {\n    // Start immediately\n    this.element.style.opacity = '0';\n    this.element.style.display = 'block';\n\n    // Start fade-in after 100ms\n    delay(() => {\n      this.element.style.transition = 'opacity 500ms ease-in';\n      this.element.style.opacity = '1';\n    }, 100);\n\n    // Scale animation after 1 second\n    delay(() => {\n      this.element.style.transform = 'scale(1.1)';\n    }, 1000);\n\n    // Back to original size after 1.5 seconds\n    delay(() => {\n      this.element.style.transform = 'scale(1)';\n    }, 1500);\n  }\n}\n```\n\nCanceling timers:\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass TimerManager {\n  constructor() {\n    this.timers = new Map();\n  }\n\n  setDelayedTask(id, task, delayMs) {\n    // Cancel existing timer if it exists\n    this.cancelTask(id);\n\n    const timerId = delay(task, delayMs);\n    this.timers.set(id, timerId);\n\n    return timerId;\n  }\n\n  cancelTask(id) {\n    const timerId = this.timers.get(id);\n    if (timerId) {\n      clearTimeout(timerId);\n      this.timers.delete(id);\n      return true;\n    }\n    return false;\n  }\n\n  cancelAllTasks() {\n    this.timers.forEach(timerId => clearTimeout(timerId));\n    this.timers.clear();\n  }\n}\n\nconst timerManager = new TimerManager();\n\n// Schedule tasks\ntimerManager.setDelayedTask(\n  'save',\n  () => {\n    console.log('Auto-saved');\n  },\n  5000\n);\n\ntimerManager.setDelayedTask(\n  'cleanup',\n  () => {\n    console.log('Cleanup completed');\n  },\n  10000\n);\n\n// Cancel a specific task if needed\n// timerManager.cancelTask('save');\n\n// Clean up all timers when page unloads\nwindow.addEventListener('beforeunload', () => {\n  timerManager.cancelAllTasks();\n});\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to execute after the delay.\n- `wait` (`number`): The number of milliseconds to delay.\n- `args` (`...any[]`): The arguments to pass to the function when it executes.\n\n#### Returns\n\n(`number`): Returns the timer ID. Can be canceled with `clearTimeout()`.\n"
  },
  {
    "path": "docs/reference/compat/function/flip.md",
    "content": "# flip (Lodash Compatibility)\n\n::: warning Use direct argument reversal\nThis `flip` function simply reverses the order of function arguments. In most cases, it can be replaced with simpler approaches.\n\nInstead, use the faster and more modern `(...args) => func(...args.reverse())` or direct argument passing.\n:::\n\nCreates a function that reverses the order of arguments for the given function.\n\n```typescript\nconst flippedFunc = flip(func);\n```\n\n## Usage\n\n### `flip(func)`\n\nUse `flip` when you want to create a new function by reversing the order of arguments. It changes the function to receive arguments from the last one first instead of the original order from the first one.\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst flipped = flip(greet);\nflipped('John', 'Hello'); // 'Hello, John!'\n\n// The original function takes (greeting, name) order\n// But the flipped function takes (name, greeting) order\n```\n\nFor functions that accept multiple arguments, all arguments are reversed.\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction fn(a: string, b: string, c: string, d: string) {\n  return [a, b, c, d];\n}\n\nconst flipped = flip(fn);\nflipped('1', '2', '3', '4'); // ['4', '3', '2', '1']\n```\n\n#### Parameters\n\n- `func` (`F`): The function to reverse arguments for.\n\n#### Returns\n\n(`(...args: Reversed<Parameters<F>>) => ReturnType<F>`): Returns a new function with reversed arguments.\n"
  },
  {
    "path": "docs/reference/compat/function/flow.md",
    "content": "# flow (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `flow`\nThis `flow` function has become complex with added array flattening for Lodash compatibility.\n\nInstead, use the faster and more modern `es-toolkit`'s [flow](../../function/flow.md).\n:::\n\nCreates a new function that executes the given functions from left to right sequentially.\n\n```typescript\nconst combinedFunc = flow(...functions);\n```\n\n## Usage\n\n### `flow(...functions)`\n\nUse `flow` when you want to create a single composed function that executes multiple functions from left to right sequentially. It's useful for creating data transformation pipelines.\n\n```typescript\nimport { flow } from 'es-toolkit/compat';\n\n// Basic usage\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// Executes from left to right: double(square(add(x, y)))\nconst calculate = flow(add, square, double);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// Passing functions as an array\nconst calculate2 = flow([add, square], double);\nconsole.log(calculate2(2, 3)); // 50\n\n// Modern alternative (recommended)\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// Using pipe operator (future JavaScript)\nconst pipeCalculate = (x, y) => add(x, y) |> square |> double;\n\n// Or chaining pattern\nclass Calculator {\n  constructor(value) {\n    this.value = value;\n  }\n\n  add(n) {\n    this.value += n;\n    return this;\n  }\n\n  square() {\n    this.value *= this.value;\n    return this;\n  }\n\n  double() {\n    this.value *= 2;\n    return this;\n  }\n\n  valueOf() {\n    return this.value;\n  }\n}\n\nconst chainedResult = new Calculator(3).square().double().valueOf(); // 18\n```\n\n#### Parameters\n\n- `...functions` (`Array<Function | Function[]>`): Functions to execute from left to right. Can be passed as arrays.\n\n#### Returns\n\n(`Function`): Returns a new composed function that executes all functions from left to right sequentially.\n"
  },
  {
    "path": "docs/reference/compat/function/flowRight.md",
    "content": "# flowRight (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `flowRight`\nThis `flowRight` function has become complex with added array flattening for Lodash compatibility.\n\nInstead, use the faster and more modern `es-toolkit`'s [flowRight](../../function/flowRight.md).\n:::\n\nCreates a new function that executes the given functions from right to left sequentially.\n\n```typescript\nconst combinedFunc = flowRight(...functions);\n```\n\n## Usage\n\n### `flowRight(...functions)`\n\nUse `flowRight` when you want to create a single composed function that executes multiple functions from right to left sequentially. It's useful for creating data transformation pipelines.\n\n```typescript\nimport { flowRight } from 'es-toolkit/compat';\n\n// Basic usage\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// Executes from right to left: double(square(add(x, y)))\nconst calculate = flowRight(double, square, add);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// Passing functions as an array\nconst calculate2 = flowRight([double, square], add);\nconsole.log(calculate2(2, 3)); // 50\n\n// Modern alternative (recommended)\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// Or using function chaining\nconst chainedCalculate = (x, y) => [x, y]\n  .reduce((acc, val, idx) => idx === 0 ? val : acc + val)\n  .valueOf()\n  |> (n => n * n)\n  |> (n => n * 2);\n```\n\nGenerally works in the opposite order of `flow`. It works similarly to function composition, making it intuitive.\n\n#### Parameters\n\n- `...functions` (`Array<Function | Function[]>`): Functions to execute from right to left. Can be passed as arrays.\n\n#### Returns\n\n(`Function`): Returns a new composed function that executes all functions from right to left sequentially.\n"
  },
  {
    "path": "docs/reference/compat/function/identity.md",
    "content": "# identity (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `identity`\nThis `identity` function has the same functionality in the main `es-toolkit` library. It simply returns the input value as is.\n\nInstead, use the faster and more modern `es-toolkit`'s [identity](../../function/identity.md).\n:::\n\nReturns the received value as is.\n\n```typescript\nconst result = identity(value);\n```\n\n## Usage\n\n### `identity(value)`\n\nUse `identity` when you want to return the received value as is. It's mainly used as a default value or placeholder function, and is frequently used in functional programming.\n\n```typescript\nimport { identity } from 'es-toolkit/compat';\n\n// Basic usage\nconsole.log(identity(5)); // 5\nconsole.log(identity('hello')); // 'hello'\nconsole.log(identity({ key: 'value' })); // { key: 'value' }\n\n// Use with array's map (value copy)\nconst numbers = [1, 2, 3, 4, 5];\nconst copied = numbers.map(identity);\nconsole.log(copied); // [1, 2, 3, 4, 5]\n\n// Use as default value in filtering\nconst values = [1, 0, '', 'hello', null, undefined, false, true];\nconst filtered = values.filter(identity); // Keep only truthy values\nconsole.log(filtered); // [1, 'hello', true]\n\n// Use as default transformation function\nfunction processData(data, transform = identity) {\n  return transform(data);\n}\n\nconsole.log(processData('hello')); // 'hello'\nconsole.log(processData('hello', x => x.toUpperCase())); // 'HELLO'\n```\n\nIn most cases, it can be replaced with a simpler arrow function `x => x`:\n\n```typescript\n// Using arrow function instead of identity (recommended)\nconst copied = numbers.map(x => x);\nconst filtered = values.filter(x => x);\n```\n\n#### Parameters\n\n- `value` (`T`): The value to return.\n\n#### Returns\n\n(`T`): Returns the received value as is.\n"
  },
  {
    "path": "docs/reference/compat/function/memoize.md",
    "content": "# memoize (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `memoize`\nThis `memoize` function operates slowly due to `null` checks in the `resolver` function, complex type handling for the `MapCache` interface, and additional overhead for Lodash compatibility.\n\nInstead, use the faster and more modern `es-toolkit`'s [memoize](../../function/memoize.md).\n:::\n\nCaches function results to improve performance when called with the same arguments.\n\n```typescript\nconst memoizedFunc = memoize(func, resolver);\n```\n\n## Usage\n\n### `memoize(func, resolver)`\n\nUse `memoize` when you want to memoize function results to reuse previous results when called with the same arguments. It's useful for expensive calculations or API calls.\n\n```typescript\nimport { memoize } from 'es-toolkit/compat';\n\n// Basic usage\nfunction expensiveCalculation(n) {\n  console.log('Calculating...', n);\n  return n * n;\n}\n\nconst memoizedCalc = memoize(expensiveCalculation);\n\nconsole.log(memoizedCalc(5)); // 'Calculating... 5', 25\nconsole.log(memoizedCalc(5)); // 25 (cached result, no calculation)\nconsole.log(memoizedCalc(10)); // 'Calculating... 10', 100\n\n// Using custom resolver\nfunction fetchUserData(userId, includeProfile) {\n  console.log('Fetching user data...', userId, includeProfile);\n  return { id: userId, profile: includeProfile ? 'Profile data' : null };\n}\n\n// Generate cache key considering all arguments\nconst memoizedFetch = memoize(fetchUserData, (userId, includeProfile) => {\n  return `${userId}_${includeProfile}`;\n});\n\nmemoizedFetch(1, true); // 'Fetching user data... 1 true'\nmemoizedFetch(1, true); // Uses cached result\nmemoizedFetch(1, false); // 'Fetching user data... 1 false' (different cache key)\n\n// Accessing and modifying cache\nconsole.log(memoizedCalc.cache.get(5)); // 25\nmemoizedCalc.cache.set(7, 49); // Manually set cache\nconsole.log(memoizedCalc(7)); // 49 (uses cached value without calculation)\n```\n\nIn most cases, it uses a basic hash map, but you can also use custom cache implementations as needed.\n\n#### Parameters\n\n- `func` (`Function`): The function to memoize.\n- `resolver` (`Function`, optional): The function to determine the cache key. If not provided, uses the first argument as the key.\n\n#### Returns\n\n(`Function & { cache: MapCache }`): Returns the memoized function. The returned function has a `cache` property for direct cache access.\n"
  },
  {
    "path": "docs/reference/compat/function/negate.md",
    "content": "# negate (Lodash Compatibility)\n\n::: warning Use the logical NOT operator\n\nThis `negate` function simply negates the result of a function. In most cases, it's simpler and faster to use the logical NOT operator (`!`) directly.\n\nInstead, use the faster and more modern `!predicate(...args)` or `(...args) => !predicate(...args)`.\n\n:::\n\nCreates a new function that negates the result of the given function.\n\n```typescript\nconst negatedFunc = negate(predicate);\n```\n\n## Usage\n\n### `negate(predicate)`\n\nUse `negate` when you want to create a new function that negates the result of a function. It's useful for checking opposite conditions in filtering or conditional statements.\n\n```typescript\nimport { negate } from 'es-toolkit/compat';\n\n// Basic usage\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\nconst isOdd = negate(isEven);\nconsole.log(isOdd(3)); // true\nconsole.log(isOdd(4)); // false\n\n// Using in array filtering\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n\n// Modern alternative (recommended)\nconst modernOddNumbers = numbers.filter(n => !isEven(n));\n// or\nconst isOddModern = n => !isEven(n);\nconst modernOddNumbers2 = numbers.filter(isOddModern);\n\n// Complex example\nfunction isEmpty(str) {\n  return str.trim().length === 0;\n}\n\nconst hasContent = negate(isEmpty);\nconst messages = ['', ' ', 'hello', '  ', 'world'];\nconst validMessages = messages.filter(hasContent);\nconsole.log(validMessages); // ['hello', 'world']\n```\n\nIt's primarily used in array filtering or conditional logic, but in most cases, using the logical NOT operator directly is more intuitive.\n\n#### Parameters\n\n- `predicate` (`Function`): The function whose result should be negated. It must return a boolean value.\n\n#### Returns\n\n(`Function`): Returns a new function that returns the negated result of the original function.\n"
  },
  {
    "path": "docs/reference/compat/function/noop.md",
    "content": "# noop (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `noop`\n\n`es-toolkit` also has a [noop](../../function/noop.md) function that behaves the same.\n\n:::\n\nAn empty function that does nothing.\n\n```typescript\nnoop();\n```\n\n## Usage\n\n### `noop(...args)`\n\nUse `noop` when you need a placeholder function that does nothing. It's often used as a default value or callback function.\n\n```typescript\nimport { noop } from 'es-toolkit/compat';\n\n// Basic usage\nnoop(); // Does nothing\nnoop(1, 2, 3); // Accepts arguments but does nothing\n\n// Use as default callback\nfunction processData(data, callback = noop) {\n  // Process data\n  console.log('Processing data...', data);\n\n  // Call callback (noop if not provided)\n  callback(data);\n}\n\nprocessData('test'); // Works without errors even if callback not provided\n\n// Modern alternative (recommended)\nfunction modernProcessData(data, callback = () => {}) {\n  console.log('Processing data...', data);\n  callback(data);\n}\n\n// Or use optional callback\nfunction processDataOptional(data, callback) {\n  console.log('Processing data...', data);\n  callback?.(data); // Only call if callback is provided\n}\n```\n\nUseful in situations where a default value or placeholder is needed, but in modern JavaScript, it's more common to use optional chaining (`?.`) or default parameters.\n\n#### Parameters\n\n- `...args` (`any[]`): Can accept any arguments, but all are ignored.\n\n#### Returns\n\n(`void`): Returns nothing.\n"
  },
  {
    "path": "docs/reference/compat/function/nthArg.md",
    "content": "# nthArg (Lodash Compatibility)\n\n::: warning Use arrow functions\n\nThis `nthArg` function simply creates a wrapper function that returns the argument at a specific index. You can implement the same functionality more concisely and clearly using arrow functions.\n\nInstead, use the faster and more modern arrow functions.\n\n:::\n\nCreates a function that returns the argument at the specified index.\n\n```typescript\nconst getNthArg = nthArg(n);\n```\n\n## Usage\n\n### `nthArg(n)`\n\nUse `nthArg` when you need only the argument at a specific position of a function. If you use a negative index, it counts from the end.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// Create a function to get the second argument\nconst getSecondArg = nthArg(1);\ngetSecondArg('a', 'b', 'c', 'd');\n// Returns: 'b'\n\n// Create a function to get the penultimate argument\nconst getPenultimateArg = nthArg(-2);\ngetPenultimateArg('a', 'b', 'c', 'd');\n// Returns: 'c'\n\n// Create a function to get the first argument (default)\nconst getFirstArg = nthArg();\ngetFirstArg('a', 'b', 'c');\n// Returns: 'a'\n```\n\nIt's useful when used with array methods.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// Extract only the second element from each array\nconst arrays = [\n  [1, 2, 3],\n  [4, 5, 6],\n  [7, 8, 9],\n];\narrays.map(nthArg(1));\n// Returns: [2, 5, 8]\n```\n\nNegative indices count from the end.\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// Function to get the last argument\nconst getLastArg = nthArg(-1);\ngetLastArg('first', 'middle', 'last');\n// Returns: 'last'\n```\n\n#### Parameters\n\n- `n` (`number`, optional): The index of the argument to return. Negative values count from the end. Default is `0`.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new function that returns the argument at the specified index.\n"
  },
  {
    "path": "docs/reference/compat/function/once.md",
    "content": "# once (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `once`\n\nThis `once` function has the same functionality as the main library [once](../../function/once.md) function in `es-toolkit`.\n\n:::\n\nRestricts a function to be called only once.\n\n```typescript\nconst limitedFunc = once(func);\n```\n\n## Usage\n\n### `once(func)`\n\nUse `once` when you want to restrict a function to be called only once. After the first call, the result is cached and the same value is returned.\n\n```typescript\nimport { once } from 'es-toolkit/compat';\n\n// Basic usage\nlet count = 0;\nconst increment = once(() => {\n  count++;\n  console.log('Counter incremented:', count);\n  return count;\n});\n\nincrement(); // Outputs 'Counter incremented: 1', returns 1\nincrement(); // Outputs nothing, returns 1\nincrement(); // Outputs nothing, returns 1\n\n// Practical example - initialization function\nconst initialize = once(() => {\n  console.log('Initializing application...');\n  // Expensive initialization operations\n  return 'Initialization complete';\n});\n\n// Even if called multiple times, initialization runs only once\ninitialize(); // Outputs 'Initializing application...'\ninitialize(); // Outputs nothing\n```\n\nIt's useful when creating expensive initialization operations or setup functions. For example, it can be used for database connections, API token initialization, etc.\n\n#### Parameters\n\n- `func` (`Function`): The function to restrict to only one call.\n\n#### Returns\n\n(`Function`): Returns a new function that is called only once. From the second call onwards, it returns the result of the first call.\n"
  },
  {
    "path": "docs/reference/compat/function/overArgs.md",
    "content": "# overArgs (Lodash Compatibility)\n\n::: warning Use arrow functions and direct transformation\n\nThis `overArgs` function creates a complex wrapper that transforms each argument, resulting in slow performance. Using arrow functions to transform arguments directly results in clearer and faster code.\n\nInstead, use the faster and more modern arrow functions and direct transformation.\n\n:::\n\nCreates a new function that transforms each argument of a function with the corresponding transform function and then executes it.\n\n```typescript\nconst wrapped = overArgs(func, transforms);\n```\n\n## Usage\n\n### `overArgs(func, ...transforms)`\n\nUse `overArgs` when you want to transform each argument before calling a function. Each argument is processed by the corresponding transform function.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nfunction doubled(n) {\n  return n * 2;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\n// First argument is doubled, second argument is squared\nconst func = overArgs((x, y) => [x, y], [doubled, square]);\nfunc(5, 3);\n// Returns: [10, 9]\n```\n\nYou can also extract properties using strings.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst user1 = { name: 'John', age: 30 };\nconst user2 = { name: 'Jane', age: 25 };\n\n// Extract properties from each object\nconst getUserInfo = overArgs((name, age) => `${name} is ${age} years old`, ['name', 'age']);\ngetUserInfo(user1, user2);\n// Returns: \"John is 25 years old\"\n```\n\nIf a transform function is not provided or is `null`/`undefined`, the argument is passed as is.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2, null, n => n * 3]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 45]\n```\n\nArguments that exceed the number of transform functions are passed as is.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 15]\n```\n\nYou can also check if arguments match objects.\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((match1, match2) => [match1, match2], [{ age: 30 }, { active: true }]);\n\nfunc({ name: 'John', age: 30 }, { active: true, status: 'online' });\n// Returns: [true, true]\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function to wrap.\n- `...transforms` (`Array<(...args: any[]) => any | string | object | array>`): The functions to transform arguments. Each transform can be one of the following:\n  - A function that accepts and returns a value\n  - A string to get a property value (e.g., 'name' gets the name property)\n  - An object to check if the argument matches the properties\n  - A [property, value] array to check property matching\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new function that transforms the arguments and then calls the original function.\n"
  },
  {
    "path": "docs/reference/compat/function/partial.md",
    "content": "# partial (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `partial`\n\nThis `partial` function is inefficient due to many overloads and union type handling. In most cases, it can be replaced with a simpler arrow function.\n\nInstead, use the faster and more modern [`partial`](../../function/partial.md) from `es-toolkit`.\n\n:::\n\nCreates a partially applied function by pre-filling some arguments.\n\n```typescript\nconst partialFunc = partial(func, ...args);\n```\n\n## Usage\n\n### `partial(func, ...args)`\n\nUse `partial` when you want to create a partially applied function by pre-filling some arguments. It's mainly useful for fixing the first arguments when argument order matters.\n\n```typescript\nimport { partial } from 'es-toolkit/compat';\n\n// Basic usage\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// Pre-set the first argument\nconst sayHello = partial(greet, 'Hello');\nsayHello('Alice', '!'); // 'Hello Alice!'\n\n// Pre-set multiple arguments\nconst greetAlice = partial(greet, 'Hello', 'Alice');\ngreetAlice('!'); // 'Hello Alice!'\n\n// Use placeholder to control argument order\nconst greetWithExclamation = partial(greet, partial.placeholder, 'Alice', '!');\ngreetWithExclamation('Hi'); // 'Hi Alice!'\n```\n\nIn most cases, it can be replaced with arrow functions:\n\n```typescript\n// Use arrow functions instead of partial (recommended)\nconst sayHello = (name, punctuation) => greet('Hello', name, punctuation);\nconst greetAlice = punctuation => greet('Hello', 'Alice', punctuation);\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to partially apply.\n- `...args` (`any[]`): The arguments to pre-fill. Use `partial.placeholder` to control argument order.\n\n#### Returns\n\n(`Function`): Returns a new function with pre-filled arguments.\n"
  },
  {
    "path": "docs/reference/compat/function/partialRight.md",
    "content": "# partialRight (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s `partialRight`\n\nThis `partialRight` function is inefficient due to many overloads and union type handling. In most cases, it can be replaced with a simpler arrow function.\n\nInstead, use the faster and more modern [`partialRight`](../../function/partialRight.md) from `es-toolkit`.\n\n:::\n\nCreates a partially applied function by pre-filling arguments from the right.\n\n```typescript\nconst partialFunc = partialRight(func, ...args);\n```\n\n## Usage\n\n### `partialRight(func, ...args)`\n\nUse `partialRight` when you want to create a partially applied function by pre-filling arguments from the right. It's mainly useful for fixing the last arguments when argument order matters.\n\n```typescript\nimport { partialRight } from 'es-toolkit/compat';\n\n// Basic usage\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// Pre-set the last argument\nconst greetWithExclamation = partialRight(greet, '!');\ngreetWithExclamation('Hello', 'Alice'); // 'Hello Alice!'\n\n// Pre-set multiple arguments\nconst sayHiToAlice = partialRight(greet, 'Alice', '!');\nsayHiToAlice('Hi'); // 'Hi Alice!'\n\n// Use placeholder to control argument order\nconst greetAliceWithCustom = partialRight(greet, 'Alice', partialRight.placeholder);\ngreetAliceWithCustom('Hello', '?'); // 'Hello Alice?'\n```\n\nIn most cases, it can be replaced with arrow functions:\n\n```typescript\n// Use arrow functions instead of partialRight (recommended)\nconst greetWithExclamation = (greeting, name) => greet(greeting, name, '!');\nconst sayHiToAlice = greeting => greet(greeting, 'Alice', '!');\n```\n\n#### Parameters\n\n- `func` (`Function`): The function to partially apply.\n- `...args` (`any[]`): The arguments to pre-fill. Use `partialRight.placeholder` to control argument order.\n\n#### Returns\n\n(`Function`): Returns a new function with arguments pre-filled from the right.\n"
  },
  {
    "path": "docs/reference/compat/function/rearg.md",
    "content": "# rearg (Lodash Compatibility)\n\n::: warning Use arrow functions instead\n\nThis `rearg` function creates a complex wrapper that rearranges argument order, which can be slow. You can write clearer and faster code by directly rearranging argument order using arrow functions.\n\nUse faster, more modern arrow functions instead.\n\n:::\n\nCreates a new function that rearranges the arguments of the original function in the specified order.\n\n```typescript\nconst rearranged = rearg(func, ...indices);\n```\n\n## Usage\n\n### `rearg(func, ...indices)`\n\nUse `rearg` when you want to change the order of arguments when calling a function. It rearranges the arguments in the order specified by the indices and calls the original function.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst greet = (greeting, name) => `${greeting}, ${name}!`;\n\n// Swap argument order (1st, 0th)\nconst rearrangedGreet = rearg(greet, 1, 0);\nrearrangedGreet('World', 'Hello');\n// Returns: \"Hello, World!\"\n\n// Original function remains unchanged\ngreet('Hello', 'World');\n// Returns: \"Hello, World!\"\n```\n\nYou can also pass indices as an array.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// Specify indices using an array\nconst rearranged = rearg(fn, [2, 0, 1]);\nrearranged('a', 'b', 'c');\n// Returns: ['c', 'a', 'b']\n```\n\nYou can rearrange only some arguments and leave the rest as is.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// Rearrange only the first two arguments\nconst rearranged = rearg(fn, 1, 0);\nrearranged('first', 'second', 'third', 'fourth');\n// Returns: ['second', 'first', 'third', 'fourth']\n```\n\nNon-existent indices are treated as `undefined`.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// Include non-existent index 5\nconst rearranged = rearg(fn, 5, 1, 0);\nrearranged('a', 'b', 'c');\n// Returns: [undefined, 'b', 'a']\n```\n\nNested arrays are also flattened and processed.\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// Nested array indices\nconst rearranged = rearg(fn, [1, [2, 0]], 3);\nrearranged('a', 'b', 'c', 'd');\n// Returns: ['b', 'c', 'a', 'd']\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function whose arguments will be rearranged.\n- `...indices` (`Array<number | number[]>`): The indices of the arguments to rearrange. Nested arrays are also supported.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new function with rearranged arguments.\n"
  },
  {
    "path": "docs/reference/compat/function/rest.md",
    "content": "# rest (Lodash Compatibility)\n\n::: warning Use `rest` from `es-toolkit` instead\n\nThis `rest` function may have reduced performance due to additional logic such as default value handling and index validation.\n\nUse faster, more modern [rest](../../function/rest.md) from `es-toolkit` instead.\n\n:::\n\nCreates a function that groups the remaining arguments from a specified index into an array.\n\n```typescript\nconst restFunc = rest(func, start);\n```\n\n## Usage\n\n### `rest(func, start)`\n\nUse `rest` when you want to transform function arguments by grouping the remaining arguments from a specified index into an array. It's useful for creating variadic functions.\n\n```typescript\nimport { rest } from 'es-toolkit/compat';\n\n// Basic usage - group the last arguments into an array\nfunction logMessage(level, message, ...details) {\n  console.log(`[${level}] ${message}`, details);\n}\n\nconst restLogger = rest(logMessage, 2);\nrestLogger('ERROR', 'Error occurred', 'Detail 1', 'Detail 2');\n// Internally calls logMessage('ERROR', 'Error occurred', [['Detail 1', 'Detail 2']])\n\n// Different index example\nfunction process(action, target, ...args) {\n  return { action, target, args };\n}\n\nconst restProcess = rest(process, 1);\nrestProcess('update', 'user', 'name', 'John', 'age', 25);\n// { action: 'update', target: ['user', 'name', 'John', 'age', 25], args: [] }\n```\n\nUse this when you want the last arguments of a function to be received as an array. In modern JavaScript, it's more common to use rest parameter syntax (`...args`).\n\n#### Parameters\n\n- `func` (`Function`): The function to transform.\n- `start` (`number`, optional): The index from which to start grouping arguments into an array. Default is `func.length - 1`.\n\n#### Returns\n\n(`Function`): Returns a new function that groups the remaining arguments from the specified index into an array.\n"
  },
  {
    "path": "docs/reference/compat/function/spread.md",
    "content": "# spread (Lodash Compatibility)\n\n::: warning Use modern spread operator instead\n\nThis `spread` function handles complex logic to spread array arguments at a specific index into individual arguments, which can be slow.\n\nUse the faster, more modern spread operator (`...`) directly instead.\n\n:::\n\nCreates a new function that spreads array arguments into individual arguments when calling the function.\n\n```typescript\nconst spreadFunc = spread(func, argsIndex);\n```\n\n## Usage\n\n### `spread(func, argsIndex)`\n\nUse `spread` when you want to call a function by spreading an array argument into individual arguments. You can specify the position of the array, allowing it to work with other arguments.\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\n// Basic usage - first argument is an array\nfunction add(a, b) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nspreadAdd([1, 2]); // 3\n\n// When the second argument is an array\nfunction greet(greeting, names) {\n  return `${greeting}, ${names.join(' and ')}!`;\n}\n\nconst spreadGreet = spread(greet, 1);\nspreadGreet('Hello', ['Alice', 'Bob']); // 'Hello, Alice and Bob!'\n\n// Modern spread operator example (recommended)\nfunction modernAdd(a, b) {\n  return a + b;\n}\n\nconst numbers = [1, 2];\nmodernAdd(...numbers); // 3 - simpler and faster\n```\n\nIt's especially useful when passing arrays as function arguments, but in modern JavaScript, using the spread operator is more common.\n\n#### Parameters\n\n- `func` (`Function`): The function to transform.\n- `argsIndex` (`number`, optional): The position of the array argument. Default is `0`.\n\n#### Returns\n\n(`Function`): Returns a new function that spreads the array argument when called.\n"
  },
  {
    "path": "docs/reference/compat/function/throttle.md",
    "content": "# throttle (Lodash Compatibility)\n\n::: warning Use `throttle` from `es-toolkit` instead\n\nThis `throttle` function uses the debounce function internally for Lodash compatibility, making it somewhat complex. It also has more complex default and option handling.\n\nUse faster, more modern [throttle](../../function/throttle.md) from `es-toolkit` instead.\n\n:::\n\nLimits function calls to execute at most once per specified time interval.\n\n```typescript\nconst throttledFunc = throttle(func, wait, options);\n```\n\n## Usage\n\n### `throttle(func, wait, options)`\n\nUse `throttle` when you want to limit function calls to execute at most once per specified time interval. It's useful for limiting the frequency of event handlers or API calls.\n\n```typescript\nimport { throttle } from 'es-toolkit/compat';\n\n// Basic usage - execute at most once per second\nconst throttledLog = throttle(() => {\n  console.log('Event occurred!');\n}, 1000);\n\n// Example with options\nconst throttledScroll = throttle(handleScroll, 100, {\n  leading: true, // Execute immediately on first call\n  trailing: false, // Don't execute on last call\n});\n\nwindow.addEventListener('scroll', throttledScroll);\n```\n\nIt's essential for performance when handling rapidly occurring events like scroll or resize events.\n\n#### Parameters\n\n- `func` (`Function`): The function to throttle.\n- `wait` (`number`, optional): The wait time in milliseconds. Default is `0`.\n- `options` (`ThrottleSettings`, optional): Throttling options.\n  - `leading` (`boolean`): Whether to execute on the first call. Default is `true`.\n  - `trailing` (`boolean`): Whether to execute after the last call. Default is `true`.\n\n#### Returns\n\n(`DebouncedFunc`): Returns the throttled function. You can cancel pending executions with the `cancel()` method.\n"
  },
  {
    "path": "docs/reference/compat/function/unary.md",
    "content": "# unary (Lodash Compatibility)\n\n::: warning Use `ary` from `es-toolkit` instead\n\nThis `unary` function is implemented as a special case of the `ary` function. If you need more control, it's more efficient to use [ary](../../function/ary.md) from `es-toolkit` directly.\n\nUse faster, more modern [ary](../../function/ary.md) from `es-toolkit` instead.\n\n:::\n\nLimits a function to accept at most one argument.\n\n```typescript\nconst limitedFunc = unary(func);\n```\n\n## Usage\n\n### `unary(func)`\n\nUse `unary` when you want to limit a function to accept at most one argument. Any additional arguments passed will be ignored.\n\n```typescript\nimport { unary } from 'es-toolkit/compat';\n\nfunction greet(name, greeting, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// Convert to a function that accepts only the first argument\nconst greetOne = unary(greet);\ngreetOne('Alice', 'Hello', '!'); // Works the same as greet('Alice')\n\n// Useful when used with array's map function\nconst numbers = ['1', '2', '3'];\nnumbers.map(parseInt); // [1, NaN, NaN] - unexpected result\nnumbers.map(unary(parseInt)); // [1, 2, 3] - correct result\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function to limit arguments for.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new function that accepts at most one argument.\n"
  },
  {
    "path": "docs/reference/compat/function/wrap.md",
    "content": "# wrap (Lodash Compatibility)\n\n::: warning Use higher-order functions instead\n\nThis `wrap` function simply wraps a function. In most cases, it's clearer to use simpler higher-order functions or closures.\n\nUse faster, more modern closures or direct function definitions instead.\n\n:::\n\nCreates a new function that wraps the given value or function.\n\n```typescript\nconst wrappedFunc = wrap(value, wrapper);\n```\n\n## Usage\n\n### `wrap(value, wrapper)`\n\nUse `wrap` when you want to apply additional logic to a value or function. You can define new behavior through a wrapper function that receives the original value as its first argument.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// Wrap a function to add logging functionality\nconst greet = (name: string) => `Hi, ${name}`;\nconst loggedGreet = wrap(greet, (originalFunc, name) => {\n  const result = originalFunc(name);\n  console.log(`[LOG] ${result}`);\n  return result;\n});\n\nloggedGreet('Alice'); // Logs \"[LOG] Hi, Alice\" to console and returns \"Hi, Alice\"\n```\n\nYou can also wrap non-function values. The value is passed as the first argument to the wrapper function.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// Create a function that wraps a string in HTML tags\nconst htmlWrapper = wrap('Hello World', (text, tag) => `<${tag}>${text}</${tag}>`);\nconsole.log(htmlWrapper('h1')); // \"<h1>Hello World</h1>\"\n\n// Create a function that uses a number in calculations\nconst calculate = wrap(10, (baseValue, multiplier) => baseValue * multiplier);\nconsole.log(calculate(5)); // 50\n```\n\nHere's a more complex function wrapping example.\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\nconst add = (a: number, b: number) => a + b;\n\n// Create a function with performance measurement\nconst timedAdd = wrap(add, (originalAdd, a, b) => {\n  const start = Date.now();\n  const result = originalAdd(a, b);\n  const end = Date.now();\n  console.log(`Execution time: ${end - start}ms`);\n  return result;\n});\n\ntimedAdd(3, 7); // Logs execution time to console and returns 10\n```\n\n#### Parameters\n\n- `value` (`T`): The value or function to wrap.\n- `wrapper` (`(value: T, ...args: U[]) => V`): The function that receives the original value as its first argument and applies additional logic.\n\n#### Returns\n\n(`(...args: U[]) => V`): Returns a new function with the wrapper function applied.\n"
  },
  {
    "path": "docs/reference/compat/math/add.md",
    "content": "# add (Lodash Compatibility)\n\n::: warning Use the `+` operator\n\nThis `add` function operates slowly due to complex type conversion and string handling.\n\nUse the faster and simpler `+` operator instead.\n\n:::\n\nAdds two values.\n\n```typescript\nconst result = add(value, other);\n```\n\n## Usage\n\n### `add(value, other)`\n\nUse `add` when you want to add two values. It can handle not only numbers but also strings.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\n// Adding numbers\nadd(2, 3);\n// Returns: 5\n\nadd(1.5, 2.5);\n// Returns: 4\n\n// Handling NaN\nadd(NaN, 5);\n// Returns: NaN\n\nadd(10, NaN);\n// Returns: NaN\n```\n\nWhen strings are included, it operates as string concatenation.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd('2', 3);\n// Returns: '23'\n\nadd(1, '5');\n// Returns: '15'\n\nadd('hello', 'world');\n// Returns: 'helloworld'\n```\n\n`undefined` values are handled specially.\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd(undefined, undefined);\n// Returns: 0\n\nadd(5, undefined);\n// Returns: 5\n\nadd(undefined, 3);\n// Returns: 3\n```\n\n#### Parameters\n\n- `value` (`number`): The first value to add.\n- `other` (`number`): The second value to add.\n\n#### Returns\n\n(`number | string`): Returns the sum of two values. Returns a string if strings are included, otherwise returns a number.\n"
  },
  {
    "path": "docs/reference/compat/math/ceil.md",
    "content": "# ceil (Lodash Compatibility)\n\n::: warning Use `Math.ceil`\n\nThis `ceil` function operates slowly due to decimal place calculations and internal function calls.\n\nUse the faster and more modern `Math.ceil` instead.\n\n:::\n\nRounds a number up to the specified decimal places.\n\n```typescript\nconst result = ceil(number, precision);\n```\n\n## Usage\n\n### `ceil(number, precision?)`\n\nUse `ceil` when you want to round a number up to a specific decimal place.\n\n```typescript\nimport { ceil } from 'es-toolkit/compat';\n\n// Basic ceiling (to integer)\nceil(4.006);\n// Returns: 5\n\nceil(4.1);\n// Returns: 5\n\n// Ceiling to 2 decimal places\nceil(6.004, 2);\n// Returns: 6.01\n\nceil(6.001, 2);\n// Returns: 6.01\n\n// Ceiling with negative precision (units of 10)\nceil(6040, -2);\n// Returns: 6100\n\nceil(1234, -2);\n// Returns: 1300\n\n// Negative numbers are also rounded up\nceil(-4.1);\n// Returns: -4\n\nceil(-6.004, 2);\n// Returns: -6.00\n```\n\n#### Parameters\n\n- `number` (`number`): The number to round up.\n- `precision` (`number`, optional): The number of decimal places to round up to. Defaults to `0`.\n\n#### Returns\n\n(`number`): Returns the number rounded up to the specified decimal places.\n"
  },
  {
    "path": "docs/reference/compat/math/clamp.md",
    "content": "# clamp (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [clamp](../../math/clamp.md)\n\nThis `clamp` function operates slowly due to NaN validation and handling.\n\nUse the faster and more modern `es-toolkit`'s [clamp](../../math/clamp.md) instead.\n\n:::\n\nClamps a number within the specified range.\n\n```typescript\nconst clamped = clamp(number, lower, upper);\n```\n\n## Usage\n\n### `clamp(number, lower, upper)`\n\nUse `clamp` when you want to restrict a number between a specified minimum and maximum value.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// Basic usage\nclamp(3, 2, 4);\n// Returns: 3 (within range)\n\nclamp(0, 5, 10);\n// Returns: 5 (clamped to minimum)\n\nclamp(15, 5, 10);\n// Returns: 10 (clamped to maximum)\n\n// Handles negative numbers\nclamp(-5, -10, -1);\n// Returns: -5\n\nclamp(-15, -10, -1);\n// Returns: -10 (clamped to minimum)\n```\n\n### `clamp(number, upper)`\n\nWhen only one argument is provided, it's used as the maximum value.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// Specifying only maximum\nclamp(5, 3);\n// Returns: 3 (clamped to maximum)\n\nclamp(2, 3);\n// Returns: 2 (within range)\n\nclamp(1, 5);\n// Returns: 1\n```\n\nNaN values are treated as 0.\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\nclamp(5, NaN, 10);\n// Returns: 5 (NaN is treated as 0, so range is 0-10)\n\nclamp(5, 2, NaN);\n// Returns: 2 (NaN is treated as 0, so range is 0-2)\n```\n\n#### Parameters\n\n- `number` (`number`): The number to clamp.\n- `lower` (`number`): The minimum value. If only the second parameter is provided, it becomes the maximum value.\n- `upper` (`number`, optional): The maximum value.\n\n#### Returns\n\n(`number`): Returns the number clamped within the specified range.\n"
  },
  {
    "path": "docs/reference/compat/math/divide.md",
    "content": "# divide (Lodash Compatibility)\n\n::: warning Use the `/` operator\n\nThis `divide` function operates slowly due to additional function calls.\n\nUse the faster and simpler `/` operator instead.\n\n:::\n\nDivides two numbers.\n\n```typescript\nconst result = divide(value, other);\n```\n\n## Usage\n\n### `divide(value, other)`\n\nUse `divide` when you want to divide two numbers.\n\n```typescript\nimport { divide } from 'es-toolkit/compat';\n\n// Basic division\ndivide(6, 3);\n// Returns: 2\n\ndivide(10, 5);\n// Returns: 2\n\n// Decimal division\ndivide(7, 2);\n// Returns: 3.5\n\ndivide(1, 3);\n// Returns: 0.3333333333333333\n\n// Division by zero\ndivide(6, 0);\n// Returns: Infinity\n\ndivide(-6, 0);\n// Returns: -Infinity\n\n// NaN handling\ndivide(2, NaN);\n// Returns: NaN\n\ndivide(NaN, 3);\n// Returns: NaN\n\ndivide(NaN, NaN);\n// Returns: NaN\n```\n\n#### Parameters\n\n- `value` (`number`): The dividend (number being divided).\n- `other` (`number`): The divisor (number dividing by).\n\n#### Returns\n\n(`number`): Returns the result of dividing the first number by the second. If either value is NaN, returns NaN.\n"
  },
  {
    "path": "docs/reference/compat/math/floor.md",
    "content": "# floor (Lodash Compatibility)\n\n::: warning Use `Math.floor`\n\nThis `floor` function operates slowly due to decimal place calculations and internal function calls.\n\nUse the faster and more modern `Math.floor` instead.\n\n:::\n\nRounds a number down to the specified decimal places.\n\n```typescript\nconst result = floor(number, precision);\n```\n\n## Usage\n\n### `floor(number, precision?)`\n\nUse `floor` when you want to round a number down to a specific decimal place.\n\n```typescript\nimport { floor } from 'es-toolkit/compat';\n\n// Basic floor (to integer)\nfloor(4.9);\n// Returns: 4\n\nfloor(4.1);\n// Returns: 4\n\n// Floor to 2 decimal places\nfloor(6.994, 2);\n// Returns: 6.99\n\nfloor(6.999, 2);\n// Returns: 6.99\n\n// Floor with negative precision (units of 10)\nfloor(6040, -2);\n// Returns: 6000\n\nfloor(1234, -2);\n// Returns: 1200\n\n// Negative numbers are also floored\nfloor(-4.1);\n// Returns: -5\n\nfloor(-6.994, 2);\n// Returns: -7.00\n```\n\n#### Parameters\n\n- `number` (`number`): The number to round down.\n- `precision` (`number`, optional): The number of decimal places to round down to. Defaults to `0`.\n\n#### Returns\n\n(`number`): Returns the number rounded down to the specified decimal places.\n"
  },
  {
    "path": "docs/reference/compat/math/inRange.md",
    "content": "# inRange (Lodash Compatibility)\n\n::: warning Use [inRange](../../math/inRange.md) from `es-toolkit`\n\nThis `inRange` function works slowly due to complex type conversion and null/undefined handling.\n\nUse the faster and more modern [inRange](../../math/inRange.md) from `es-toolkit` instead.\n\n:::\n\nChecks if a number is within a specified range.\n\n```typescript\nconst result = inRange(value, minimum, maximum);\n```\n\n## Usage\n\n### `inRange(value, minimum, maximum?)`\n\nUse `inRange` when you want to check if a number is within a specific range. The minimum value is inclusive and the maximum value is exclusive.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// Basic usage\ninRange(3, 2, 4);\n// Returns: true (2 ≤ 3 < 4)\n\ninRange(1, 2, 5);\n// Returns: false (1 < 2)\n\ninRange(5, 2, 5);\n// Returns: false (5 is not included)\n\n// Range boundary values\ninRange(2, 2, 4);\n// Returns: true (minimum value is included)\n\ninRange(4, 2, 4);\n// Returns: false (maximum value is not included)\n```\n\n### `inRange(value, maximum)`\n\nWhen only two arguments are provided, it treats the range as from 0 to maximum.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5);\n// Returns: true (0 ≤ 3 < 5)\n\ninRange(-1, 5);\n// Returns: false (-1 < 0)\n\ninRange(0, 5);\n// Returns: true (0 ≤ 0 < 5)\n\ninRange(5, 5);\n// Returns: false (5 is not included)\n```\n\nIf the minimum value is greater than the maximum value, they are automatically swapped.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5, 2);\n// Returns: true (range becomes 2~5, and 2 ≤ 3 < 5)\n\ninRange(1, 5, 2);\n// Returns: false (1 < 2)\n```\n\nInvalid values are appropriately converted.\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// String number conversion\ninRange(3, '2', '4');\n// Returns: true\n\n// Falsy values are treated as 0\ninRange(1, null, 5);\n// Returns: true (null is treated as 0, so range is 0~5)\n\ninRange(3, false, 5);\n// Returns: true (false is treated as 0)\n```\n\n#### Parameters\n\n- `value` (`number`): The number to check if it's within the range.\n- `minimum` (`number`): The minimum value of the range (inclusive). If `maximum` is not provided, this value becomes the maximum.\n- `maximum` (`number`, optional): The maximum value of the range (exclusive).\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is within the specified range, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/math/max.md",
    "content": "# max (Lodash Compatibility)\n\n::: warning Use `Math.max`\n\nThis `max` function works slowly due to additional function calls and `null`/`undefined` handling.\n\nUse the faster and more modern `Math.max(...array)` instead.\n\n:::\n\nFinds the maximum value in an array.\n\n```typescript\nconst result = max(items);\n```\n\n## Usage\n\n### `max(items?)`\n\nUse `max` when you want to find the largest value in an array.\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\n// Maximum value in number array\nmax([1, 2, 3]);\n// Returns: 3\n\nmax([10, 5, 8, 20]);\n// Returns: 20\n\n// Maximum value in string array (lexicographical order)\nmax(['a', 'b', 'c']);\n// Returns: 'c'\n\nmax(['apple', 'banana', 'cherry']);\n// Returns: 'cherry'\n\n// Empty array or null/undefined\nmax([]);\n// Returns: undefined\n\nmax(null);\n// Returns: undefined\n\nmax(undefined);\n// Returns: undefined\n```\n\nNegative numbers are also handled correctly.\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\nmax([-1, -5, -3]);\n// Returns: -1\n\nmax([0, -2, 5, -10]);\n// Returns: 5\n```\n\n#### Parameters\n\n- `items` (`ArrayLike<T> | null | undefined`, optional): The array to find the maximum value from.\n\n#### Returns\n\n(`T | undefined`): Returns the largest value in the array. If the array is empty or null/undefined, returns undefined.\n"
  },
  {
    "path": "docs/reference/compat/math/maxBy.md",
    "content": "# maxBy (Lodash Compatibility)\n\n::: warning Use [maxBy](../../array/maxBy.md) from es-toolkit\n\nThis `maxBy` function works slowly due to iteratee function processing and type conversion.\n\nUse the faster and more modern [maxBy](../../array/maxBy.md) from `es-toolkit` instead.\n\n:::\n\nFinds the element with the maximum value based on a condition.\n\n```typescript\nconst maxItem = maxBy(array, iteratee);\n```\n\n## Usage\n\n### `maxBy(array, iteratee)`\n\nFinds the element in an array that has the largest value when computed by a function.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\n// Find element with maximum property in object array\nconst people = [\n  { name: 'John', age: 25 },\n  { name: 'Jane', age: 30 },\n  { name: 'Bob', age: 35 },\n];\n\nmaxBy(people, person => person.age);\n// Returns: { name: 'Bob', age: 35 }\n\n// Can also use property name\nmaxBy(people, 'age');\n// Returns: { name: 'Bob', age: 35 }\n```\n\nTransform values with a function to find the maximum.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmaxBy(items, x => x.a);\n// Returns: { a: 3 }\n\nconst numbers = [-1, -2, -3];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: -3 (element with largest absolute value)\n```\n\nAccess array elements by index.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nmaxBy(arrays, 0); // Array with maximum first element\n// Returns: [3, 4]\n\nmaxBy(arrays, 1); // Array with maximum second element\n// Returns: [0, 5]\n```\n\nFind elements matching specific property values.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 25, active: true },\n  { name: 'Jane', age: 30, active: false },\n  { name: 'Bob', age: 35, active: true },\n];\n\n// First element among those with active: true\nmaxBy(users, ['active', true]);\n// Returns: { name: 'John', age: 25, active: true }\n\n// Specify condition as object\nmaxBy(users, { active: true });\n// Returns: { name: 'John', age: 25, active: true }\n```\n\nEmpty arrays return undefined.\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nmaxBy([], x => x.a);\n// Returns: undefined\n\nmaxBy(null);\n// Returns: undefined\n\nmaxBy(undefined);\n// Returns: undefined\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to search.\n- `iteratee` (`ValueIteratee<T>`, optional): The function, property name, or condition to apply to each element.\n\n#### Returns\n\n(`T | undefined`): Returns the element with the largest value based on the condition. Returns `undefined` if the array is empty.\n"
  },
  {
    "path": "docs/reference/compat/math/mean.md",
    "content": "# mean (Lodash Compatibility)\n\n::: warning Use [mean](../../math/mean.md) from es-toolkit\n\nThis `mean` function works slowly due to type conversion and null/undefined handling.\n\nUse the faster and more modern [mean](../../math/mean.md) from `es-toolkit` instead.\n\n:::\n\nCalculates the average value of an array.\n\n```typescript\nconst average = mean(array);\n```\n\n## Usage\n\n### `mean(array)`\n\nCalculates the average value of a number array.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\n// Number array\nmean([1, 2, 3, 4, 5]);\n// Returns: 3\n\nmean([10, 20, 30]);\n// Returns: 20\n\nmean([1.5, 2.5, 3.5]);\n// Returns: 2.5\n```\n\nEmpty arrays return NaN.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([]);\n// Returns: NaN\n\nmean(null);\n// Returns: NaN\n\nmean(undefined);\n// Returns: NaN\n```\n\nInvalid values are treated as 0 and included in the calculation.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([1, undefined, 2, null, 3]);\n// Returns: 1.2 (1 + 2 + 3) / 5 = 1.2\n```\n\nStrings will be concatenated.\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean(['1', '2', '3']);\n// Returns: 41 (123 / 3 = 41)\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<any> | null | undefined`): The array containing numbers to calculate the average from.\n\n#### Returns\n\n(`number`): Returns the average value of the array. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/compat/math/meanBy.md",
    "content": "# meanBy (Lodash Compatibility)\n\n::: warning Use [meanBy](../../math/meanBy.md) from es-toolkit\n\nThis `meanBy` function works slowly due to iteratee function processing and type conversion.\n\nUse the faster and more modern [meanBy](../../math/meanBy.md) from `es-toolkit` instead.\n\n:::\n\nCalculates the average of values that meet a condition.\n\n```typescript\nconst average = meanBy(array, iteratee);\n```\n\n## Usage\n\n### `meanBy(array, iteratee)`\n\nCalculates the average of the results of applying a function to each element in an array.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\n// Average of specific property in object array\nconst people = [\n  { name: 'John', age: 25 },\n  { name: 'Jane', age: 30 },\n  { name: 'Bob', age: 35 },\n];\n\nmeanBy(people, person => person.age);\n// Returns: 30\n\n// Can also use property name\nmeanBy(people, 'age');\n// Returns: 30\n```\n\nTransform values with a function to calculate the average.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst numbers = [1.5, 2.7, 3.2, 4.8];\nmeanBy(numbers, x => Math.floor(x));\n// Returns: 2.5 (1 + 2 + 3 + 4) / 4\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmeanBy(items, x => x.a);\n// Returns: 2\n```\n\nAccess array elements by index.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst arrays = [[2], [3], [1]];\nmeanBy(arrays, 0); // Average of first elements\n// Returns: 2\n```\n\nCalculate only for elements matching specific property values.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 25, active: true },\n  { name: 'Jane', age: 30, active: false },\n  { name: 'Bob', age: 35, active: true },\n];\n\n// Only active users\nmeanBy(users, { active: true });\n// Returns: 0.6666666 (2 out of 3 users are active)\n```\n\nEmpty arrays return NaN.\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nmeanBy([], x => x.a);\n// Returns: NaN\n\nmeanBy(null);\n// Returns: NaN\n\nmeanBy(undefined);\n// Returns: NaN\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to process.\n- `iteratee` (`ValueIteratee<T>`, optional): The function, property name, or condition to apply to each element.\n\n#### Returns\n\n(`number`): Returns the average of values that meet the condition. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/compat/math/min.md",
    "content": "# min (Lodash Compatibility)\n\n::: warning Use `Math.min`\n\nThis `min` function works slowly due to additional function calls and null/undefined handling.\n\nUse the faster and more modern `Math.min(...array)` instead.\n\n:::\n\nFinds the minimum value in an array.\n\n```typescript\nconst result = min(items);\n```\n\n## Usage\n\n### `min(items?)`\n\nUse `min` when you want to find the smallest value in an array.\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\n// Minimum value in number array\nmin([3, 1, 4, 1, 5, 9]);\n// Returns: 1\n\nmin([10, 5, 8, 20]);\n// Returns: 5\n\n// Minimum value in string array (lexicographical order)\nmin(['c', 'a', 'b']);\n// Returns: 'a'\n\nmin(['cherry', 'apple', 'banana']);\n// Returns: 'apple'\n\n// Empty array or null/undefined\nmin([]);\n// Returns: undefined\n\nmin(null);\n// Returns: undefined\n\nmin(undefined);\n// Returns: undefined\n```\n\nNegative numbers are also handled correctly.\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\nmin([0, -3, 2, 8, 7]);\n// Returns: -3\n\nmin([-1, -5, -3]);\n// Returns: -5\n```\n\n#### Parameters\n\n- `items` (`ArrayLike<T> | null | undefined`, optional): The array to find the minimum value from.\n\n#### Returns\n\n(`T | undefined`): Returns the smallest value in the array. If the array is empty or null/undefined, returns undefined.\n"
  },
  {
    "path": "docs/reference/compat/math/minBy.md",
    "content": "# minBy (Lodash Compatibility)\n\n::: warning Use [minBy](../../array/minBy.md) from es-toolkit\n\nThis `minBy` function works slowly due to iteratee function processing and type conversion.\n\nUse the faster and more modern [minBy](../../array/minBy.md) from `es-toolkit` instead.\n\n:::\n\nFinds the element with the minimum value based on a condition.\n\n```typescript\nconst minItem = minBy(array, iteratee);\n```\n\n## Usage\n\n### `minBy(array, iteratee)`\n\nFinds the element in an array that has the smallest value when computed by a function.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\n// Find element with minimum property in object array\nconst people = [\n  { name: 'John', age: 25 },\n  { name: 'Jane', age: 30 },\n  { name: 'Bob', age: 35 },\n];\n\nminBy(people, person => person.age);\n// Returns: { name: 'John', age: 25 }\n\n// Can also use property name\nminBy(people, 'age');\n// Returns: { name: 'John', age: 25 }\n```\n\nTransform values with a function to find the minimum.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nminBy(items, x => x.a);\n// Returns: { a: 1 }\n\nconst numbers = [-1, -2, -3];\nminBy(numbers, x => Math.abs(x));\n// Returns: -1 (element with smallest absolute value)\n```\n\nAccess array elements by index.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nminBy(arrays, 0); // Array with minimum first element\n// Returns: [0, 5]\n\nminBy(arrays, 1); // Array with minimum second element\n// Returns: [1, 2]\n```\n\nFind elements matching specific property values.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 25, active: true },\n  { name: 'Jane', age: 30, active: false },\n  { name: 'Bob', age: 35, active: true },\n];\n\n// First element among those with active: true\nminBy(users, ['active', true]);\n// Returns: { name: 'Jane', age: 30, active: false }\n\n// Specify condition as object\nminBy(users, { active: true });\n// Returns: { name: 'Jane', age: 30, active: false }\n```\n\nEmpty arrays return undefined.\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nminBy([], x => x.a);\n// Returns: undefined\n\nminBy(null);\n// Returns: undefined\n\nminBy(undefined);\n// Returns: undefined\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to search.\n- `iteratee` (`ValueIteratee<T>`, optional): The function, property name, or condition to apply to each element.\n\n#### Returns\n\n(`T | undefined`): Returns the element with the smallest value based on the condition. Returns `undefined` if the array is empty.\n"
  },
  {
    "path": "docs/reference/compat/math/multiply.md",
    "content": "# multiply (Lodash Compatibility)\n\n::: warning Use `*` operator\n\nThis `multiply` function works slowly due to additional function calls.\n\nUse the faster and simpler `*` operator instead.\n\n:::\n\nMultiplies two numbers.\n\n```typescript\nconst result = multiply(value, other);\n```\n\n## Usage\n\n### `multiply(value, other)`\n\nUse `multiply` when you want to multiply two numbers.\n\n```typescript\nimport { multiply } from 'es-toolkit/compat';\n\n// Basic multiplication\nmultiply(2, 3);\n// Returns: 6\n\nmultiply(4, 5);\n// Returns: 20\n\n// Negative number handling\nmultiply(2, -3);\n// Returns: -6\n\nmultiply(-4, -5);\n// Returns: 20\n\n// Decimal number handling\nmultiply(2.5, 4);\n// Returns: 10\n\n// NaN handling\nmultiply(NaN, 3);\n// Returns: NaN\n\nmultiply(2, NaN);\n// Returns: NaN\n\nmultiply(NaN, NaN);\n// Returns: NaN\n```\n\n#### Parameters\n\n- `value` (`number`): The first number in the multiplication.\n- `other` (`number`): The second number in the multiplication.\n\n#### Returns\n\n(`number`): Returns the result of multiplying the two numbers. If either is NaN, returns NaN.\n"
  },
  {
    "path": "docs/reference/compat/math/parseInt.md",
    "content": "# parseInt (Lodash Compatibility)\n\n::: warning Use `parseInt`\n\nThis `parseInt` function works slowly due to additional function calls.\n\nUse the faster and more modern native `parseInt` instead.\n\n:::\n\nConverts a string to an integer.\n\n```typescript\nconst result = parseInt(string, radix);\n```\n\n## Usage\n\n### `parseInt(string, radix?)`\n\nUse `parseInt` when you want to convert a string to an integer. You can specify a radix to interpret it in a different base.\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\n// Basic decimal parsing\nparseInt('123');\n// Returns: 123\n\nparseInt('08');\n// Returns: 8\n\n// Automatic hexadecimal recognition\nparseInt('0x20');\n// Returns: 32\n\n// Explicit radix specification\nparseInt('08', 10);\n// Returns: 8\n\nparseInt('0x20', 16);\n// Returns: 32\n\nparseInt('1010', 2);\n// Returns: 10\n\n// Use in arrays\n['6', '08', '10'].map(parseInt);\n// Returns: [6, 8, 10]\n```\n\nInvalid format strings return NaN.\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\nparseInt('abc');\n// Returns: NaN\n\nparseInt('');\n// Returns: NaN\n\nparseInt('123abc');\n// Returns: 123 (parses only the beginning)\n```\n\n#### Parameters\n\n- `string` (`string`): The string to convert to an integer.\n- `radix` (`number`, optional): The radix to use for conversion. Default is `0`, which automatically determines based on string format.\n\n#### Returns\n\n(`number`): Returns the converted integer. Returns NaN if conversion is not possible.\n"
  },
  {
    "path": "docs/reference/compat/math/random.md",
    "content": "# random (Lodash Compatibility)\n\n::: warning Use `Math.random()`\n\nThis `random` function works slowly due to complex argument processing and type conversion.\n\nUse the faster `Math.random()` instead.\n\n:::\n\nCreates a random number within a range.\n\n```typescript\nconst result = random(min, max, floating);\n```\n\n## Usage\n\n### `random(floating?)`\n\nCreates a random number between 0 and 1.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom();\n// Returns: 0.123456789 (decimal between 0~1)\n\nrandom(true);\n// Returns: 0.987654321 (returns as decimal)\n\nrandom(false);\n// Returns: 0 or 1 (returns as integer)\n```\n\n### `random(max, floating?)`\n\nCreates a random number from 0 to max.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5);\n// Returns: 3.456789 (decimal between 0~5)\n\nrandom(10, true);\n// Returns: 7.123456 (decimal between 0~10)\n\nrandom(3, false);\n// Returns: 2 (integer between 0~3)\n```\n\n### `random(min, max, floating?)`\n\nCreates a random number from min to max.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(1, 5);\n// Returns: 3.456789 (decimal between 1~5)\n\nrandom(0, 10, true);\n// Returns: 6.789012 (decimal between 0~10)\n\nrandom(1, 6, false);\n// Returns: 4 (integer between 1~6)\n```\n\nRange is automatically swapped if reversed.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5, 1);\n// Returns: 3.456789 (range becomes 1~5)\n```\n\nGuard object handles special cases.\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nconst guard = { 5: 5 };\nrandom(5, 5, guard);\n// Returns: 2.345678 (decimal between 0~5)\n```\n\n#### Parameters\n\n- `floating` (`boolean`, optional): Whether to return a decimal. Default is `true`.\n- `max` (`number`): The maximum value of the range (exclusive).\n- `min` (`number`): The minimum value of the range (inclusive).\n- `index` (`string | number`): The key to check in the guard object.\n- `guard` (`object`): The guard object that validates parameters.\n\n#### Returns\n\n(`number`): Returns a random number within the specified range.\n"
  },
  {
    "path": "docs/reference/compat/math/range.md",
    "content": "# range (Lodash Compatibility)\n\n::: warning Use [range](../../math/range.md) from es-toolkit\n\nThis `range` function works slowly due to complex argument processing and type conversion.\n\nUse the faster and more modern [range](../../math/range.md) from `es-toolkit` instead.\n\n:::\n\nCreates an array of numbers in a range.\n\n```typescript\nconst numbers = range(start, end, step);\n```\n\n## Usage\n\n### `range(end)`\n\nCreates an array of numbers from 0 to end, incrementing by 1.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(4);\n// Returns: [0, 1, 2, 3]\n\nrange(0);\n// Returns: []\n\nrange(-4);\n// Returns: [0, -1, -2, -3]\n```\n\n### `range(start, end)`\n\nCreates an array of numbers from start to end, incrementing by 1.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(1, 5);\n// Returns: [1, 2, 3, 4]\n\nrange(5, 1);\n// Returns: [5, 4, 3, 2] (automatically decrements by -1)\n\nrange(-2, 3);\n// Returns: [-2, -1, 0, 1, 2]\n```\n\n### `range(start, end, step)`\n\nCreates an array of numbers from start to end, incrementing by step.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 20, 5);\n// Returns: [0, 5, 10, 15]\n\nrange(0, -4, -1);\n// Returns: [0, -1, -2, -3]\n\nrange(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\nDecimal steps are also possible.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 1, 0.2);\n// Returns: [0, 0.2, 0.4, 0.6, 0.8]\n\nrange(1, 0, -0.25);\n// Returns: [1, 0.75, 0.5, 0.25]\n```\n\nWhen used as an iteratee, it's handled with a guard object.\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\n[1, 2, 3].map(range);\n// Returns: [[0], [0, 1], [0, 1, 2]]\n```\n\n#### Parameters\n\n- `start` (`number`): The start value of the range (inclusive). If `end` is not provided, this becomes the end value.\n- `end` (`number`, optional): The end value of the range (exclusive).\n- `step` (`number`, optional): The increment step. Default is 1 or -1.\n\n#### Returns\n\n(`number[]`): Returns an array of numbers in the specified range.\n"
  },
  {
    "path": "docs/reference/compat/math/rangeRight.md",
    "content": "# rangeRight (Lodash Compatibility)\n\n::: warning Use [rangeRight](../../math/rangeRight.md) from es-toolkit\n\nThis `rangeRight` function works slowly due to complex argument processing and type conversion.\n\nUse the faster and more modern [rangeRight](../../math/rangeRight.md) from `es-toolkit` instead.\n\n:::\n\nCreates an array of numbers in a range in reverse order.\n\n```typescript\nconst numbers = rangeRight(start, end, step);\n```\n\n## Usage\n\n### `rangeRight(end)`\n\nCreates an array of numbers from 0 to end, incrementing by 1, then reverses the order.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(4);\n// Returns: [3, 2, 1, 0]\n\nrangeRight(0);\n// Returns: []\n\nrangeRight(-4);\n// Returns: [-3, -2, -1, 0]\n```\n\n### `rangeRight(start, end)`\n\nCreates an array of numbers from start to end, incrementing by 1, then reverses the order.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(1, 5);\n// Returns: [4, 3, 2, 1]\n\nrangeRight(5, 1);\n// Returns: [2, 3, 4, 5] (automatically decrements by -1, then reverses)\n\nrangeRight(-2, 3);\n// Returns: [2, 1, 0, -1, -2]\n```\n\n### `rangeRight(start, end, step)`\n\nCreates an array of numbers from start to end, incrementing by step, then reverses the order.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 8, 2);\n// Returns: [6, 4, 2, 0]\n\nrangeRight(0, -4, -1);\n// Returns: [-3, -2, -1, 0]\n\nrangeRight(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\nDecimal steps are also possible.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 1, 0.2);\n// Returns: [0.8, 0.6, 0.4, 0.2, 0]\n\nrangeRight(1, 0, -0.25);\n// Returns: [0.25, 0.5, 0.75, 1]\n```\n\nWhen used as an iteratee, it's handled with a guard object.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\n[1, 2, 3].map(rangeRight);\n// Returns: [[0], [1, 0], [2, 1, 0]]\n```\n\n#### Parameters\n\n- `start` (`number`): The start value of the range (inclusive). If `end` is not provided, this becomes the end value.\n- `end` (`number`, optional): The end value of the range (exclusive).\n- `step` (`number`, optional): The increment step. Default is 1 or -1.\n\n#### Returns\n\n(`number[]`): Returns an array of numbers in the specified range in reverse order.\n"
  },
  {
    "path": "docs/reference/compat/math/round.md",
    "content": "# round (Lodash Compatibility)\n\n::: warning Use `Math.round()`\n\nThis `round` function works slowly due to precision handling.\n\nUse `Math.round()` instead or calculate to the desired decimal places.\n\n:::\n\nRounds a number.\n\n```typescript\nconst rounded = round(number, precision);\n```\n\n## Usage\n\n### `round(number, precision?)`\n\nRounds a number to the specified decimal places.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// Basic rounding (0 decimal places)\nround(4.006);\n// Returns: 4\n\nround(4.6);\n// Returns: 5\n\n// Specify decimal places\nround(4.006, 2);\n// Returns: 4.01\n\nround(4.123456, 3);\n// Returns: 4.123\n```\n\nNegative precision is also possible.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// Round to tens place\nround(4060, -2);\n// Returns: 4100\n\nround(1234, -1);\n// Returns: 1230\n\nround(1234, -3);\n// Returns: 1000\n```\n\nHandles negative numbers as well.\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\nround(-4.006);\n// Returns: -4\n\nround(-4.006, 2);\n// Returns: -4.01\n\nround(-1234, -2);\n// Returns: -1200\n```\n\n#### Parameters\n\n- `number` (`number`): The number to round.\n- `precision` (`number`, optional): The number of decimal places to round to. Default is `0`.\n\n#### Returns\n\n(`number`): Returns the rounded number.\n"
  },
  {
    "path": "docs/reference/compat/math/subtract.md",
    "content": "# subtract (Lodash Compatibility)\n\n::: warning Use `-` operator\n\nThis `subtract` function works slowly due to additional function calls.\n\nUse the faster and simpler `-` operator instead.\n\n:::\n\nSubtracts two numbers.\n\n```typescript\nconst result = subtract(value, other);\n```\n\n## Usage\n\n### `subtract(value, other)`\n\nUse `subtract` when you want to subtract two numbers.\n\n```typescript\nimport { subtract } from 'es-toolkit/compat';\n\n// Basic subtraction\nsubtract(6, 4);\n// Returns: 2\n\nsubtract(10, 3);\n// Returns: 7\n\n// Negative number handling\nsubtract(-6, 4);\n// Returns: -10\n\nsubtract(6, -4);\n// Returns: 10\n\n// NaN handling\nsubtract(NaN, 4);\n// Returns: NaN\n\nsubtract(6, NaN);\n// Returns: NaN\n\nsubtract(NaN, NaN);\n// Returns: NaN\n```\n\n#### Parameters\n\n- `value` (`number`): The base number for subtraction.\n- `other` (`number`): The number to subtract.\n\n#### Returns\n\n(`number`): Returns the result of subtracting the second number from the first. If either is NaN, returns NaN.\n"
  },
  {
    "path": "docs/reference/compat/math/sum.md",
    "content": "# sum (Lodash Compatibility)\n\n::: warning Use [sum](../../math/sum.md) from es-toolkit\n\nThis `sum` function works slowly due to type conversion and null/undefined handling.\n\nUse the faster and more modern [sum](../../math/sum.md) from `es-toolkit` instead.\n\n:::\n\nAdds all values in an array.\n\n```typescript\nconst total = sum(array);\n```\n\n## Usage\n\n### `sum(array)`\n\nAdds all numbers in an array to get the total sum.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// Number array\nsum([1, 2, 3]);\n// Returns: 6\n\nsum([1.5, 2.5, 3]);\n// Returns: 7\n\n// Empty array\nsum([]);\n// Returns: 0\n```\n\nHandles BigInt and strings as well.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// BigInt array\nsum([1n, 2n, 3n]);\n// Returns: 6n\n\n// String array (concatenated)\nsum(['1', '2']);\n// Returns: '12'\n```\n\nInvalid values are ignored.\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\nsum([1, undefined, 2]);\n// Returns: 3 (undefined ignored)\n\nsum(null);\n// Returns: 0\n\nsum(undefined);\n// Returns: 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<any> | null | undefined`): The array containing values to add.\n\n#### Returns\n\n(`number`): Returns the total sum of all values.\n"
  },
  {
    "path": "docs/reference/compat/math/sumBy.md",
    "content": "# sumBy (Lodash Compatibility)\n\n::: warning Use [sumBy](../../math/sumBy.md) from es-toolkit\n\nThis `sumBy` function works slowly due to iteratee function processing and type conversion.\n\nUse the faster and more modern [sumBy](../../math/sumBy.md) from `es-toolkit` instead.\n\n:::\n\nAdds values that meet a condition.\n\n```typescript\nconst total = sumBy(array, iteratee);\n```\n\n## Usage\n\n### `sumBy(array, iteratee)`\n\nAdds the results of applying a function to each element in an array.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\n// Number array\nsumBy([1, 2, 3], value => value);\n// Returns: 6\n\nsumBy([1.5, 2.5, 3.5], value => Math.floor(value));\n// Returns: 6 (1 + 2 + 3)\n\n// Empty array\nsumBy([], value => value);\n// Returns: 0\n```\n\n### `sumBy(array)`\n\nIf no function is provided, it adds the array values directly.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, 2, 3]);\n// Returns: 6\n\nsumBy([1n, 2n, 3n]);\n// Returns: 6n\n```\n\nAdd specific properties from object arrays.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst people = [\n  { name: 'John', age: 25 },\n  { name: 'Jane', age: 30 },\n  { name: 'Bob', age: 35 },\n];\n\nsumBy(people, person => person.age);\n// Returns: 90\n\n// Can also use property name\nsumBy(people, 'age');\n// Returns: 90\n```\n\nConcatenates strings as well.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst items = [{ a: '1' }, { a: '2' }];\nsumBy(items, obj => obj.a);\n// Returns: '12'\n```\n\nInvalid values are ignored.\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, undefined, 2], value => value);\n// Returns: 3 (undefined ignored)\n\nsumBy(null);\n// Returns: 0\n\nsumBy(undefined);\n// Returns: 0\n```\n\n#### Parameters\n\n- `array` (`ArrayLike<T> | null | undefined`): The array to process.\n- `iteratee` (`((value: T) => number) | string`, optional): The function or property name to apply to each element.\n\n#### Returns\n\n(`number`): Returns the total sum of values that meet the condition.\n"
  },
  {
    "path": "docs/reference/compat/object/assign.md",
    "content": "# assign (Lodash compatibility)\n\n::: warning Use `Object.assign` instead\n\nThis `assign` function operates slowly due to additional logic that checks whether values are equal.\n\nUse the faster and more modern `Object.assign` instead.\n\n:::\n\nAssigns properties from source objects to a target object.\n\n```typescript\nconst result = assign(target, ...sources);\n```\n\n## Usage\n\n### `assign(target, ...sources)`\n\nUse `assign` when you want to copy properties from one or more source objects to a target object. If there are duplicate keys, values from later sources will overwrite earlier ones.\n\n```typescript\nimport { assign } from 'es-toolkit/compat';\n\n// Basic usage\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assign(target, source);\n// Result: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (target object is modified)\n\n// Merging multiple source objects\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nconst source3 = { d: 4 };\nassign(target2, source1, source2, source3);\n// Result: { a: 1, b: 2, c: 3, d: 4 }\n\n// Overwriting properties\nconst target3 = { x: 1, y: 2 };\nconst source4 = { y: 3, z: 4 };\nconst source5 = { y: 5 };\nassign(target3, source4, source5);\n// Result: { x: 1, y: 5, z: 4 } (y is overwritten with the last value)\n```\n\nThis function only copies own properties of objects, not inherited properties. It also has an optimization that doesn't overwrite if values are the same.\n\n#### Parameters\n\n- `target` (`any`): The target object to which properties will be copied.\n- `...sources` (`any[]`): The source objects from which properties will be copied.\n\n#### Returns\n\n(`any`): Returns the modified target object. The target object itself is modified and returned.\n"
  },
  {
    "path": "docs/reference/compat/object/assignIn.md",
    "content": "# assignIn (Lodash compatibility)\n\n::: warning Use `Object.assign` instead\n\nThis `assignIn` function operates slowly due to additional processing for copying inherited properties and value comparison logic.\n\nUse the faster and more modern `Object.assign` instead.\n\n:::\n\nAssigns all properties (including inherited properties) from source objects to a target object.\n\n```typescript\nconst result = assignIn(target, ...sources);\n```\n\n## Usage\n\n### `assignIn(target, ...sources)`\n\nUse `assignIn` when you want to copy both own and inherited properties from source objects to a target object. Unlike `assign`, it includes properties from the prototype chain.\n\n```typescript\nimport { assignIn } from 'es-toolkit/compat';\n\n// Basic usage\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assignIn(target, source);\n// Result: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (target object is modified)\n\n// Merging multiple source objects\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nassignIn(target2, source1, source2);\n// Result: { a: 1, b: 2, c: 3 }\n\n// Copying inherited properties too\nfunction Parent() {}\nParent.prototype.inherited = 'inheritedValue';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = {};\nassignIn(target3, child);\n// Result: { own: 'ownValue', inherited: 'inheritedValue' }\n\n// Also copies array index properties and length\nconst arr = [1, 2, 3];\narr.customProp = 'custom';\nconst target4 = {};\nassignIn(target4, arr);\n// Result: { '0': 1, '1': 2, '2': 3, customProp: 'custom' }\n```\n\nUnlike `assign`, this function copies inherited properties as well. It also has an optimization that doesn't overwrite if values are the same.\n\n#### Parameters\n\n- `target` (`any`): The target object to which properties will be copied.\n- `...sources` (`any[]`): The source objects from which properties will be copied. Both own and inherited properties are copied.\n\n#### Returns\n\n(`any`): Returns the modified target object. The target object itself is modified and returned.\n"
  },
  {
    "path": "docs/reference/compat/object/assignInWith.md",
    "content": "# assignInWith (Lodash compatibility)\n\n::: warning Implementing custom logic is recommended\n\nThis `assignInWith` function operates slowly and in a complex manner due to inherited property processing and customizer function calls.\n\nInstead, use `Object.assign` and implement custom logic directly.\n\n:::\n\nAssigns all properties (including inherited properties) from source objects to a target object using a customizer function.\n\n```typescript\nconst result = assignInWith(target, ...sources, customizer);\n```\n\n## Usage\n\n### `assignInWith(target, ...sources, customizer)`\n\nUse `assignInWith` when you want to customize how properties are assigned while including inherited properties. The customizer function determines the final value for each property.\n\n```typescript\nimport { assignInWith } from 'es-toolkit/compat';\n\n// Basic usage - assign only when undefined\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignInWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Result: { a: 1, b: 2, c: 3 }\n\n// Customizer that merges array values\nconst target2 = { numbers: [1, 2] };\nconst source2 = { numbers: [3, 4], name: 'test' };\nassignInWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue) && Array.isArray(srcValue)) {\n    return objValue.concat(srcValue);\n  }\n  return srcValue;\n});\n// Result: { numbers: [1, 2, 3, 4], name: 'test' }\n\n// Processing inherited properties too\nfunction Parent() {}\nParent.prototype.inherited = 'value';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = { existing: 'data' };\nassignInWith(target3, child, (objValue, srcValue, key) => {\n  if (objValue === undefined) {\n    return `processed_${srcValue}`;\n  }\n  return objValue;\n});\n// Result: { existing: 'data', own: 'processed_ownValue', inherited: 'processed_value' }\n```\n\nIf the customizer function returns `undefined`, the default assignment behavior is used. Unlike `assignIn`, this function allows you to apply custom logic to each property.\n\n#### Parameters\n\n- `target` (`any`): The target object to which properties will be copied.\n- `...sources` (`any[]`): The source objects from which properties will be copied. Both own and inherited properties are copied.\n- `customizer` (`function`): A function that determines the value to assign. In the form `(objValue, srcValue, key, object, source) => any`. If it returns `undefined`, the default assignment behavior is used.\n\n#### Returns\n\n(`any`): Returns the modified target object. The target object itself is modified and returned.\n"
  },
  {
    "path": "docs/reference/compat/object/assignWith.md",
    "content": "# assignWith (Lodash compatibility)\n\n::: warning Implementing custom logic is recommended\n\nThis `assignWith` function is relatively slow due to complex customizer function processing.\n\nInstead, use `Object.assign` and implement custom logic directly.\n\n:::\n\nAssigns properties from source objects to a target object using a customizer function.\n\n```typescript\nconst result = assignWith(target, source1, source2, customizer);\n```\n\n## Usage\n\n### `assignWith(object, ...sources, customizer)`\n\nUse `assignWith` when you want to customize how properties are assigned. The customizer function determines the final value for each property.\n\n```typescript\nimport { assignWith } from 'es-toolkit/compat';\n\n// Basic usage - assign only when undefined\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n\n// Array merging\nconst target2 = { users: ['alice'] };\nconst source2 = { users: ['bob', 'charlie'] };\nconst result2 = assignWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Returns: { users: ['alice', 'bob', 'charlie'] }\n\n// Multiple sources with customizer\nconst target3 = { a: 1 };\nconst result3 = assignWith(target3, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to which properties will be assigned.\n- `...sources` (`any[]`): The source objects from which properties will be copied.\n- `customizer` (`function`): A function that determines the value to assign. In the form `(objValue, srcValue, key, object, source) => any`.\n\n#### Returns\n\n(`any`): Returns the target object with values determined by the customizer function.\n"
  },
  {
    "path": "docs/reference/compat/object/at.md",
    "content": "# at (Lodash compatibility)\n\n::: warning Use destructuring assignment instead\n\nThis `at` function is relatively slow due to complex path processing and handling of various argument types.\n\nInstead, use destructuring assignment or direct property access.\n\n:::\n\nReturns values at specified paths of an object as an array.\n\n```typescript\nconst result = at(object, ...paths);\n```\n\n## Usage\n\n### `at(object, ...paths)`\n\nUse `at` when you want to retrieve values from multiple paths in an object at once. It returns the values corresponding to each path as an array.\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\n// Basic usage\nconst object = { a: 1, b: 2, c: 3 };\nconst result = at(object, 'a', 'c');\n// Returns: [1, 3]\n\n// Nested objects\nconst nested = {\n  a: {\n    b: {\n      c: 4,\n    },\n  },\n  x: [1, 2, 3],\n};\nconst result2 = at(nested, 'a.b.c', 'x[1]');\n// Returns: [4, 2]\n\n// Passing paths as an array\nconst paths = ['a', 'c'];\nconst result3 = at(object, paths);\n// Returns: [1, 3]\n\n// Non-existent paths\nconst result4 = at(object, 'nonexistent', 'a');\n// Returns: [undefined, 1]\n```\n\n`null` or `undefined` objects return an array of `undefined`.\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\nat(null, 'a', 'b'); // [undefined, undefined]\nat(undefined, 'a', 'b'); // [undefined, undefined]\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object from which to retrieve values.\n- `...paths` (`Array<PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>>`): The paths of values to retrieve. Can be passed as individual arguments or as arrays.\n\n#### Returns\n\n(`unknown[]`): Returns an array of values corresponding to the specified paths.\n"
  },
  {
    "path": "docs/reference/compat/object/clone.md",
    "content": "# clone (Lodash compatibility)\n\n::: warning Use `clone` from `es-toolkit` instead\n\nThis `clone` function is relatively slow due to complex logic that handles special object types.\n\nUse the faster and more modern [clone](../../object/clone.md) from `es-toolkit` instead.\n\n:::\n\nCreates a shallow copy of an object.\n\n```typescript\nconst cloned = clone(value);\n```\n\n## Usage\n\n### `clone(value)`\n\nUse `clone` when you want to create a shallow copy of a value. It can copy various types of objects and primitive values.\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\n// Copying primitive values\nconst num = 42;\nconst clonedNum = clone(num);\n// Returns: 42 (same value)\n\n// Copying arrays\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\n// Returns: [1, 2, 3] (new array instance)\n\n// Copying objects\nconst obj = { a: 1, b: 'hello' };\nconst clonedObj = clone(obj);\n// Returns: { a: 1, b: 'hello' } (new object instance)\n\n// Copying Date objects\nconst date = new Date('2023-01-01');\nconst clonedDate = clone(date);\n// Returns: new Date('2023-01-01') (new Date instance)\n\n// Copying regular expressions\nconst regex = /hello/gi;\nregex.lastIndex = 3;\nconst clonedRegex = clone(regex);\n// Returns: /hello/gi with lastIndex = 3\n\n// Copying Map\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nconst clonedMap = clone(map);\n// Returns: new Map([['a', 1], ['b', 2]])\n\n// Copying Set\nconst set = new Set([1, 2, 3]);\nconst clonedSet = clone(set);\n// Returns: new Set([1, 2, 3])\n```\n\nNested objects are only shallowly copied.\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\nconst nested = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst clonedNested = clone(nested);\n\nconsole.log(clonedNested !== nested); // true (different objects)\nconsole.log(clonedNested.b === nested.b); // true (nested objects have same reference)\n```\n\n#### Parameters\n\n- `value` (`T`): The value to clone.\n\n#### Returns\n\n(`T`): Returns the cloned value.\n"
  },
  {
    "path": "docs/reference/compat/object/cloneDeep.md",
    "content": "# cloneDeep (Lodash compatibility)\n\n::: warning Use `cloneDeep` from `es-toolkit` instead\n\nThis `cloneDeep` function is relatively slow due to complex logic that handles special object types.\n\nUse the faster and more modern [cloneDeep](../../object/cloneDeep.md) from `es-toolkit` instead.\n\n:::\n\nCreates a deep copy of an object.\n\n```typescript\nconst cloned = cloneDeep(value);\n```\n\n## Usage\n\n### `cloneDeep(value)`\n\nUse `cloneDeep` when you want to create a deep copy of a value. It copies nested objects and arrays completely as new instances.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\n// Copying primitive values\nconst num = 42;\nconst clonedNum = cloneDeep(num);\n// Returns: 42 (same value)\n\n// Deep copying arrays\nconst arr = [1, [2, 3], { a: 4 }];\nconst clonedArr = cloneDeep(arr);\nclonedArr[1][0] = 99;\nconsole.log(arr[1][0]); // 2 (original is not changed)\nconsole.log(clonedArr[1][0]); // 99\n\n// Deep copying objects\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n    d: {\n      e: 3,\n    },\n  },\n};\nconst clonedObj = cloneDeep(obj);\nclonedObj.b.d.e = 99;\nconsole.log(obj.b.d.e); // 3 (original is not changed)\nconsole.log(clonedObj.b.d.e); // 99\n\n// Deep copying Date objects\nconst date = new Date('2023-01-01');\nconst clonedDate = cloneDeep(date);\n// Returns: new Date('2023-01-01') (new Date instance)\n\n// Complex nested structures\nconst complex = {\n  arr: [1, { nested: true }],\n  map: new Map([['key', { value: 1 }]]),\n  set: new Set([{ item: 1 }]),\n  date: new Date(),\n};\nconst clonedComplex = cloneDeep(complex);\n// All nested objects are copied as completely new instances\n```\n\nCircular references are also handled correctly.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nobj.self = obj; // circular reference\n\nconst cloned = cloneDeep(obj);\nconsole.log(cloned !== obj); // true\nconsole.log(cloned.self === cloned); // true (circular reference preserved)\n```\n\n#### Parameters\n\n- `value` (`T`): The value to deep clone.\n\n#### Returns\n\n(`T`): Returns the deeply cloned value.\n"
  },
  {
    "path": "docs/reference/compat/object/cloneDeepWith.md",
    "content": "# cloneDeepWith (Lodash compatibility)\n\n::: warning Implementing custom logic is recommended\n\nThis `cloneDeepWith` function is relatively slow due to complex customizer function and deep copy processing.\n\nInstead, use `cloneDeep` and implement custom logic directly.\n\n:::\n\nCreates a deep copy of an object using a customizer function.\n\n```typescript\nconst cloned = cloneDeepWith(value, customizer);\n```\n\n## Usage\n\n### `cloneDeepWith(value, customizer?)`\n\nUse `cloneDeepWith` when you want to customize how deep copying works. The customizer function controls how specific values are copied.\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\n// Basic usage (without customizer)\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst cloned = cloneDeepWith(obj);\n// Returns: { a: 1, b: { c: 2 } } (completely new instances)\n\n// Special handling for Date objects\nconst obj2 = {\n  name: 'test',\n  createdAt: new Date('2023-01-01'),\n  nested: {\n    updatedAt: new Date('2023-12-31'),\n  },\n};\nconst cloned2 = cloneDeepWith(obj2, value => {\n  if (value instanceof Date) {\n    // Convert Date to timestamp number\n    return value.getTime();\n  }\n  // Returning undefined uses default deep copy behavior\n});\n// Returns: {\n//   name: 'test',\n//   createdAt: 1672531200000,\n//   nested: { updatedAt: 1703980800000 }\n// }\n\n// Transforming array elements\nconst arr = [1, [2, 3], { a: 4, b: [5, 6] }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value * 10;\n  }\n});\n// Returns: [10, [20, 30], { a: 40, b: [50, 60] }]\n\n// Handling functions\nconst objWithFunc = {\n  data: { count: 1 },\n  increment: function () {\n    this.data.count++;\n  },\n};\nconst clonedWithFunc = cloneDeepWith(objWithFunc, value => {\n  if (typeof value === 'function') {\n    // Convert function to string\n    return value.toString();\n  }\n});\n// Returns: {\n//   data: { count: 1 },\n//   increment: \"function() { this.data.count++; }\"\n// }\n```\n\nCombining circular references and customizer:\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nobj.b.self = obj; // circular reference\n\nconst cloned = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value + 100;\n  }\n});\n\nconsole.log(cloned.a); // 101\nconsole.log(cloned.b.c); // 102\nconsole.log(cloned.b.self === cloned); // true (circular reference preserved)\n```\n\n#### Parameters\n\n- `value` (`T`): The value to deep clone.\n- `customizer` (`function`, optional): A function that determines how to copy. In the form `(value: any, key?: string, object?: any, stack?: Map<any, any>) => any`.\n\n#### Returns\n\n(`T`): Returns the deep copy processed by the customizer.\n"
  },
  {
    "path": "docs/reference/compat/object/cloneWith.md",
    "content": "# cloneWith (Lodash compatibility)\n\n::: warning Implementing custom logic is recommended\n\nThis `cloneWith` function is relatively slow due to complex customizer function processing.\n\nInstead, use `clone` and implement custom logic directly.\n\n:::\n\nCreates a shallow copy of an object using a customizer function.\n\n```typescript\nconst cloned = cloneWith(value, customizer);\n```\n\n## Usage\n\n### `cloneWith(value, customizer?)`\n\nUse `cloneWith` when you want to customize how copying works. The customizer function controls how specific values are copied.\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\n// Basic usage (without customizer)\nconst obj = { a: 1, b: 'hello' };\nconst cloned = cloneWith(obj);\n// Returns: { a: 1, b: 'hello' } (new object instance)\n\n// Transforming number values\nconst obj2 = { a: 1, b: 2, c: 'text' };\nconst cloned2 = cloneWith(obj2, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (typeof val === 'number') {\n      obj[key] = val * 2;\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { a: 2, b: 4, c: 'text' }\n\n// Transforming array elements\nconst arr = [1, 2, 3];\nconst clonedArr = cloneWith(arr, value => {\n  return value.map(x => x + 10);\n});\n// Returns: [11, 12, 13]\n\n// Handling specific types\nconst complex = {\n  date: new Date('2023-01-01'),\n  number: 42,\n  text: 'hello',\n};\nconst clonedComplex = cloneWith(complex, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (val instanceof Date) {\n      obj[key] = val.toISOString();\n    } else if (typeof val === 'string') {\n      obj[key] = val.toUpperCase();\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { date: '2023-01-01T00:00:00.000Z', number: 42, text: 'HELLO' }\n```\n\nIf the customizer returns `undefined`, the default copy behavior is used.\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nconst cloned = cloneWith(obj, value => {\n  // Return undefined for all values = use default copy\n  return undefined;\n});\n// Returns: { a: 1, b: { c: 2 } } (same result as clone)\n```\n\n#### Parameters\n\n- `value` (`T`): The value to clone.\n- `customizer` (`function`, optional): A function that determines how to copy. In the form `(value: any) => any`.\n\n#### Returns\n\n(`T`): Returns the shallow copy processed by the customizer.\n"
  },
  {
    "path": "docs/reference/compat/object/create.md",
    "content": "# create (Lodash compatibility)\n\n::: warning Use `Object.create` instead\n\nThis `create` function is relatively slow due to complex property processing logic.\n\nUse the faster and more modern `Object.create` instead.\n\n:::\n\nCreates a new object that inherits from the given prototype.\n\n```typescript\nconst obj = create(prototype, properties);\n```\n\n## Usage\n\n### `create(prototype, properties?)`\n\nUse `create` when you want to create a new object based on a prototype. You can optionally add properties as well.\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\n// Basic usage\nconst person = {\n  greet() {\n    console.log(`Hello, my name is ${this.name}`);\n  },\n};\n\nconst john = create(person, { name: 'John' });\njohn.greet(); // \"Hello, my name is John\"\n\n// Checking method inheritance\nconsole.log('greet' in john); // true\nconsole.log(john.hasOwnProperty('greet')); // false (inherited property)\nconsole.log(john.hasOwnProperty('name')); // true (own property)\n\n// Complex prototype\nconst animal = {\n  type: 'animal',\n  makeSound() {\n    console.log('Some generic sound');\n  },\n};\n\nconst dog = create(animal, {\n  breed: 'Golden Retriever',\n  name: 'Buddy',\n  makeSound() {\n    console.log('Woof!');\n  },\n});\n\nconsole.log(dog.type); // 'animal' (inherited)\nconsole.log(dog.breed); // 'Golden Retriever' (own property)\ndog.makeSound(); // 'Woof!' (overridden method)\n\n// null prototype\nconst cleanObj = create(null, { data: 'value' });\nconsole.log(cleanObj.toString); // ƒ toString() { [native code] } (null is equivalent to {})\n\n// Inheriting empty object\nconst empty = create({});\nconsole.log(Object.getPrototypeOf(empty)); // {} (empty object)\n```\n\nOnly enumerable string keys are copied for properties.\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\nconst proto = { inherited: true };\nconst props = {\n  visible: 'yes',\n  [Symbol('hidden')]: 'no', // Symbol keys are not copied\n};\n\n// Add non-enumerable property\nObject.defineProperty(props, 'hidden', {\n  value: 'secret',\n  enumerable: false,\n});\n\nconst obj = create(proto, props);\nconsole.log(obj.visible); // 'yes'\nconsole.log(obj.hidden); // undefined (non-enumerable)\nconsole.log(obj[Symbol('hidden')]); // undefined (Symbol key)\nconsole.log(obj.inherited); // true (inherited)\n```\n\n#### Parameters\n\n- `prototype` (`T extends object`): The prototype object to inherit from.\n- `properties` (`U extends object`, optional): Properties to add to the new object.\n\n#### Returns\n\n(`T & U`): Returns a new object that inherits from the prototype and has the specified properties.\n"
  },
  {
    "path": "docs/reference/compat/object/defaults.md",
    "content": "# defaults (Lodash Compatibility)\n\n::: warning Use `Object.assign()` instead\n\nThis `defaults` function operates slowly due to complex logic that handles `undefined` and properties inherited from `Object.prototype` specially.\n\nUse faster, more modern `Object.assign()` instead.\n\n:::\n\nFills in `undefined` properties in an object by setting default values.\n\n```typescript\nconst result = defaults(object, source);\n```\n\n## Usage\n\n### `defaults(object, ...sources)`\n\nUse `defaults` when you want to set default values for `undefined` properties or properties inherited from `Object.prototype` in an object. You can pass multiple default value objects, and they are applied in order from left to right.\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\n// Fill undefined properties with default values\ndefaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 });\n// Returns: { a: 1, b: 2, c: 3 }\n\n// Only undefined properties are filled with default values\ndefaults({ a: undefined }, { a: 1 });\n// Returns: { a: 1 }\n\n// null values are preserved\ndefaults({ a: null }, { a: 1 });\n// Returns: { a: null }\n```\n\nIf a property already has a value, it won't be overwritten with the default value.\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\ndefaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n// Returns: { a: 1, b: 2, c: 3 }\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to set default values on.\n- `...sources` (`any[]`): The source objects that provide default values.\n\n#### Returns\n\n(`any`): Returns the object with default values set. The first argument `object` is modified.\n"
  },
  {
    "path": "docs/reference/compat/object/defaultsDeep.md",
    "content": "# defaultsDeep (Lodash Compatibility)\n\n::: warning Use destructuring assignment and `Object.assign()` instead\n\nThis `defaultsDeep` function operates slowly and complexly due to recursive merging of nested objects and circular reference handling.\n\nUse faster, more modern destructuring assignment and `Object.assign()` instead.\n\n:::\n\nRecursively sets default values on nested objects.\n\n```typescript\nconst result = defaultsDeep(target, ...sources);\n```\n\n## Usage\n\n### `defaultsDeep(target, ...sources)`\n\nUse `defaultsDeep` when you want to recursively set default values for `undefined` properties in nested objects. Similar to `defaults`, but it also merges nested objects.\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\n// Setting default values in nested objects\ndefaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 });\n// Returns: { a: { b: 2, c: 3 }, d: 4 }\n\n// Only undefined properties are filled with default values\ndefaultsDeep({ a: { b: undefined } }, { a: { b: 1 } });\n// Returns: { a: { b: 1 } }\n\n// null values are preserved\ndefaultsDeep({ a: null }, { a: { b: 1 } });\n// Returns: { a: null }\n```\n\nYou can pass multiple source objects to apply default values in stages.\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\ndefaultsDeep({ a: { b: 2 } }, { a: { c: 3 } }, { a: { d: 4 }, e: 5 });\n// Returns: { a: { b: 2, c: 3, d: 4 }, e: 5 }\n```\n\n#### Parameters\n\n- `target` (`any`): The target object to set default values on.\n- `...sources` (`any[]`): The source objects that provide default values.\n\n#### Returns\n\n(`any`): Returns the object with default values recursively set. The first argument `target` is modified.\n"
  },
  {
    "path": "docs/reference/compat/object/extend.md",
    "content": "# extend (Lodash Compatibility)\n\n::: warning Use `Object.assign()` instead\n\nThis `extend` function performs slower due to complex logic that handles properties inherited from the prototype chain.\n\nUse the faster and more modern `Object.assign()` instead.\n\n:::\n\nCopies own and inherited properties from source objects to a target object.\n\n```typescript\nconst result = extend(object, source);\n```\n\n## Usage\n\n### `extend(object, ...sources)`\n\nUse `extend` to copy properties from one object to another. Similar to `Object.assign()`, but also copies inherited properties. This function is an alias of `assignIn`.\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\n// Copy basic properties\nconst target = { a: 1 };\nextend(target, { b: 2 }, { c: 3 });\n// Returns: { a: 1, b: 2, c: 3 }\n\n// Also copies inherited properties\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.b = 2;\n\nconst source = new Parent();\nextend({}, source);\n// Returns: { a: 1, b: 2 }\n```\n\nWhen there are duplicate properties, later source objects overwrite earlier ones.\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\nextend({ a: 1, b: 2 }, { b: 3 }, { c: 4 });\n// Returns: { a: 1, b: 3, c: 4 }\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to receive properties.\n- `...sources` (`any[]`): The source objects that provide properties.\n\n#### Returns\n\n(`any`): Returns the object with copied properties. The first argument `object` is modified.\n"
  },
  {
    "path": "docs/reference/compat/object/extendWith.md",
    "content": "# extendWith (Lodash compatibility)\n\n::: warning Use `Object.assign()` with a custom function instead\n\nThis `extendWith` function is complex and slow due to handling inherited properties from the prototype chain and custom merge logic.\n\nUse the faster and more modern `Object.assign()` with a custom function instead.\n\n:::\n\nCopies own and inherited properties of objects to another object with custom logic.\n\n```typescript\nconst result = extendWith(object, source, customizer);\n```\n\n## Usage\n\n### `extendWith(object, ...sources, customizer)`\n\nUse `extendWith` to merge object properties with custom logic. It's similar to `extend` but allows you to decide how each property should be merged. This function is an alias for `assignInWith`.\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\n// Copy properties with custom merge logic\nconst target = { a: 1, b: 2 };\nextendWith(target, { b: 3, c: 4 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 4 }\n\n// Custom merge that concatenates arrays\nconst obj1 = { a: [1, 2] };\nconst obj2 = { a: [3, 4], b: [5, 6] };\nextendWith(obj1, obj2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Returns: { a: [1, 2, 3, 4], b: [5, 6] }\n```\n\nYou can use multiple source objects.\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\nextendWith({ a: 1 }, { b: 2 }, { c: 3 }, (objValue, srcValue) => srcValue * 2);\n// Returns: { a: 1, b: 4, c: 6 }\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to receive properties.\n- `...sources` (`any[]`): The source objects that provide properties.\n- `customizer` (`function`): The function that determines the value to assign for each property. It receives `(objValue, srcValue, key, object, source)`.\n\n#### Returns\n\n(`any`): Returns the object with copied properties. The first argument `object` is modified.\n"
  },
  {
    "path": "docs/reference/compat/object/findKey.md",
    "content": "# findKey (Lodash compatibility)\n\n::: warning Use `es-toolkit`'s `findKey`\n\nThis `findKey` function operates in a complex manner due to various condition type handling and compatibility logic.\n\nInstead, use the faster and more modern [findKey](../../object/findKey.md) from `es-toolkit`.\n\n:::\n\nFinds the key of the first element that matches the predicate.\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## Usage\n\n### `findKey(obj, predicate)`\n\nUse `findKey` to find the key of the first element in an object that matches the predicate. You can use various types of predicates such as functions, objects, arrays, and strings.\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\n// Find key with a function predicate\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindKey(users, user => user.age > 30);\n// Returns: 'charlie'\n\n// Find key with an object predicate\nfindKey(users, { active: false });\n// Returns: 'bob'\n\n// Find key with a property path\nfindKey(users, 'active');\n// Returns: 'alice'\n```\n\nIf no element matches the predicate, it returns `undefined`.\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\nfindKey({ a: 1, b: 2 }, value => value > 5);\n// Returns: undefined\n```\n\n#### Parameters\n\n- `obj` (`T | null | undefined`): The object to search.\n- `predicate` (`ObjectIteratee<T>`, optional): The predicate to apply to each element. Can be a function, object, array, or string.\n\n#### Returns\n\n(`string | undefined`): Returns the key of the first element that matches the predicate. Returns `undefined` if no match is found.\n"
  },
  {
    "path": "docs/reference/compat/object/findLastKey.md",
    "content": "# findLastKey (Lodash Compatibility)\n\n::: warning Use `Array.findLast()` and `Object.keys()` instead\n\nThis `findLastKey` function operates in a complex manner due to various condition type handling and compatibility logic.\n\nInstead, use the faster and more modern `Array.findLast()` and `Object.keys()`.\n\n:::\n\nFinds the key of the last element matching a predicate, searching from the end.\n\n```typescript\nconst key = findLastKey(obj, predicate);\n```\n\n## Usage\n\n### `findLastKey(obj, predicate)`\n\nUse `findLastKey` to find the key of the last element matching a predicate in an object. Unlike `findKey`, it searches from the end. You can use various forms of predicates including functions, objects, arrays, and strings.\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\n// Find key using a function predicate\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindLastKey(users, user => user.active);\n// Returns: 'charlie' (first active: true found from the end)\n\n// Find key using an object predicate\nfindLastKey(users, { active: true });\n// Returns: 'charlie'\n\n// Find key using a property path\nfindLastKey(users, 'active');\n// Returns: 'charlie'\n\n// Find key using a property-value array\nfindLastKey(users, ['active', false]);\n// Returns: 'bob'\n```\n\nIf no element matches the predicate, it returns `undefined`.\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\nfindLastKey({ a: 1, b: 2 }, value => value > 5);\n// Returns: undefined\n```\n\n#### Parameters\n\n- `obj` (`T | null | undefined`): The object to search.\n- `predicate` (`ObjectIteratee<T>`, optional): The predicate to apply to each element. Can be a function, object, array, or string.\n\n#### Returns\n\n(`string | undefined`): Returns the key of the last element matching the predicate. Returns `undefined` if none found.\n"
  },
  {
    "path": "docs/reference/compat/object/forIn.md",
    "content": "# forIn (Lodash Compatibility)\n\n::: warning Use `Object.keys` and `for...in` loop instead\n\nThis `forIn` function operates slowly due to handling `null` or `undefined`, setting up default `iteratee`, and more.\n\nInstead, use the faster and more modern `Object.keys` and `for...in` loop.\n\n:::\n\nIterates over all properties of an object (including inherited properties) and invokes a function for each property.\n\n```typescript\nconst result = forIn(obj, iteratee);\n```\n\n## Usage\n\n### `forIn(object, iteratee)`\n\nIterates over all properties of an object and invokes the `iteratee` function. It iterates not only over the object's own properties but also over properties inherited through the prototype chain. If the `iteratee` function returns `false`, the iteration stops.\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\n// Iterate over all properties of an object\nconst obj = { a: 1, b: 2 };\nforIn(obj, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'a' 1, 'b' 2\n\n// Iterate including inherited properties\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforIn(child, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'inherited' 'value', 'own' 'ownValue', 'protoProperty' 'proto'\n\n// Early exit based on condition\nforIn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // Stop after 'a'\n});\n// Output: 'a' 1\n```\n\n`null` or `undefined` is returned as is.\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\nforIn(null, iteratee); // null\nforIn(undefined, iteratee); // undefined\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object to iterate over.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, optional): The function to invoke for each property. Defaults to the `identity` function.\n\n#### Returns\n\n(`T | null | undefined`): Returns the original object.\n"
  },
  {
    "path": "docs/reference/compat/object/forInRight.md",
    "content": "# forInRight (Lodash compatibility)\n\n::: warning Use `Object.keys` and `for...in` loops instead\n\nThis `forInRight` function performs slowly due to creating key arrays, reverse iteration, and handling `null` or `undefined`.\n\nInstead, use the faster and more modern `Object.keys` and `for...in` loops.\n\n:::\n\nIterates over all properties of an object (including inherited properties) in reverse order, calling a function for each property.\n\n```typescript\nconst result = forInRight(obj, iteratee);\n```\n\n## Usage\n\n### `forInRight(object, iteratee)`\n\nIterates over all properties of the object in reverse order, calling the `iteratee` function. It iterates not only over the object's own properties but also over properties inherited through the prototype chain. Since it collects keys into an array and then iterates in reverse order, it's slower than normal iteration. If the `iteratee` function returns `false`, the iteration stops.\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\n// Iterate over all properties in reverse order\nconst obj = { a: 1, b: 2 };\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'b' 2, 'a' 1\n\n// Iterate in reverse order including inherited properties\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforInRight(child, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'protoProperty' 'proto', 'own' 'ownValue', 'inherited' 'value'\n\n// Early termination based on condition\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // Stop at 'a'\n});\n// Output: 'b' 2, 'a' 1\n```\n\n`null` or `undefined` is returned as is.\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\nforInRight(null, iteratee); // null\nforInRight(undefined, iteratee); // undefined\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object to iterate over.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, optional): The function to call for each property. Defaults to the `identity` function.\n\n#### Returns\n\n(`T | null | undefined`): Returns the original object.\n"
  },
  {
    "path": "docs/reference/compat/object/forOwn.md",
    "content": "# forOwn (Lodash compatibility)\n\n::: warning Use `Object.keys` with a loop instead\n\nThis `forOwn` function operates slowly due to internally calling the `keys` function, object conversion processes, and handling of `null` or `undefined`.\n\nInstead, use the faster and more modern `Object.keys` with a loop.\n\n:::\n\nIterates over only the object's own properties, calling a function for each property.\n\n```typescript\nconst result = forOwn(obj, iteratee);\n```\n\n## Usage\n\n### `forOwn(object, iteratee)`\n\nIterates over only the object's own properties, calling the `iteratee` function. It iterates only over properties directly owned by the object, excluding inherited properties and `Symbol` keys. If the `iteratee` function returns `false`, iteration stops.\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\n// Iterate over only own properties of the object\nconst obj = { a: 1, b: 2 };\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'a' 1, 'b' 2\n\n// Exclude inherited properties\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwn(child, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'inherited' 'value', 'own' 'ownValue' (protoProperty is excluded)\n\n// Early termination based on condition\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // Stop after 'a'\n});\n// Output: 'a' 1\n```\n\nReturns `null` or `undefined` as is.\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\nforOwn(null, iteratee); // null\nforOwn(undefined, iteratee); // undefined\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object to iterate over.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, optional): The function to call for each property. Defaults to the `identity` function.\n\n#### Returns\n\n(`T | null | undefined`): Returns the original object.\n"
  },
  {
    "path": "docs/reference/compat/object/forOwnRight.md",
    "content": "# forOwnRight (Lodash compatibility)\n\n::: warning Use `Object.keys` and loops\nThis `forOwnRight` function operates slowly due to internal calls to the `keys` function, object transformation processes, and reverse iteration.\n\nInstead, use the faster and more modern `Object.keys` with loops.\n\n:::\n\nIterates over only own properties of an object in reverse order, calling a function for each property.\n\n```typescript\nconst result = forOwnRight(obj, iteratee);\n```\n\n## Usage\n\n### `forOwnRight(object, iteratee)`\n\nIterates over only own properties of an object in reverse order, calling the `iteratee` function. It iterates only over properties directly owned by the object in reverse order, excluding inherited properties and `Symbol` keys. Since it collects keys into an array and then iterates in reverse order, it is slower than normal iteration. If the `iteratee` function returns `false`, iteration is stopped.\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\n// Iterate only own properties in reverse order\nconst obj = { a: 1, b: 2 };\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'b' 2, 'a' 1\n\n// Iterate in reverse order excluding inherited properties\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwnRight(child, (value, key) => {\n  console.log(key, value);\n});\n// Output: 'own' 'ownValue', 'inherited' 'value' (protoProperty is excluded)\n\n// Early termination based on condition\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // Stop at 'a'\n});\n// Output: 'b' 2, 'a' 1\n```\n\n`null` or `undefined` is returned as is.\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\nforOwnRight(null, iteratee); // null\nforOwnRight(undefined, iteratee); // undefined\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object to iterate over.\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, optional): The function to call for each property. Defaults to the `identity` function.\n\n#### Returns\n\n(`T | null | undefined`): Returns the original object.\n"
  },
  {
    "path": "docs/reference/compat/object/fromPairs.md",
    "content": "# fromPairs (Lodash compatibility)\n\n::: warning Use `Object.fromEntries`\n\nThis `fromPairs` function operates slowly due to array-like object checks and iteration processing.\n\nUse the faster and more modern `Object.fromEntries` instead.\n\n:::\n\nConverts an array of key-value pairs into an object.\n\n```typescript\nconst result = fromPairs(pairs);\n```\n\n## Usage\n\n### `fromPairs(pairs)`\n\nTakes an array of key-value pairs and converts them into an object. Each key-value pair must be an array with 2 elements. The first element becomes the key, and the second element becomes the value. This is useful when organizing or transforming data.\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\n// Basic key-value pair conversion\nconst pairs = [\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n];\nconst result = fromPairs(pairs);\n// Result: { a: 1, b: 2, c: 3 }\n\n// Handling various value types\nconst mixedPairs = [\n  ['name', 'John'],\n  ['age', 30],\n  ['active', true],\n];\nconst user = fromPairs(mixedPairs);\n// Result: { name: 'John', age: 30, active: true }\n```\n\nValues that are `null`, `undefined`, or not array-like objects are treated as empty objects.\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\nfromPairs(null); // {}\nfromPairs(undefined); // {}\nfromPairs('invalid'); // {}\n```\n\n#### Parameters\n\n- `pairs` (`ArrayLike<[PropertyName, T]> | ArrayLike<any[]> | null | undefined`): An array of key-value pairs to convert into an object.\n\n#### Returns\n\n(`Record<string, any> | Record<string, T>`): Returns an object created from the key-value pairs.\n"
  },
  {
    "path": "docs/reference/compat/object/functions.md",
    "content": "# functions (Lodash compatibility)\n\n::: warning Use `Object.keys` and `typeof` check\n\nThis `functions` function operates slowly as it internally goes through the `keys` function and filtering process.\n\nInstead, use the faster and more modern `Object.keys` and `typeof` check.\n\n:::\n\nReturns an array of the names of the object's own properties that are functions.\n\n```typescript\nconst functionNames = functions(obj);\n```\n\n## Usage\n\n### `functions(object)`\n\nChecks the object's own properties and returns an array of only the names of properties that are functions. It excludes inherited properties and `Symbol` keys, checking only string key properties that the object directly owns. This is useful when finding methods of an object or handling only function properties separately.\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\n// Basic usage\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functions(obj);\n// Result: ['greet', 'calculate']\n\n// Finding functions in a class instance\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst methods = functions(calc);\n// Result: ['add'] (inherited multiply, divide are excluded)\n\n// Object with no functions\nconst data = { x: 1, y: 2, z: 'text' };\nconst noFunctions = functions(data);\n// Result: []\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\nfunctions(null); // []\nfunctions(undefined); // []\n```\n\n#### Parameters\n\n- `object` (`any`): The object to check.\n\n#### Returns\n\n(`string[]`): Returns an array of the names of properties that are functions.\n"
  },
  {
    "path": "docs/reference/compat/object/functionsIn.md",
    "content": "# functionsIn (Lodash compatibility)\n\n::: warning Use `for...in` loop and `typeof` check instead\n\nThis `functionsIn` function operates slowly due to the `for...in` loop and function checking process.\n\nInstead, use the faster and more modern `for...in` loop and `typeof` check.\n\n:::\n\nReturns an array of the names of all properties (including inherited properties) of an object that are functions.\n\n```typescript\nconst functionNames = functionsIn(obj);\n```\n\n## Usage\n\n### `functionsIn(object)`\n\nChecks all properties of an object and returns an array of only the names of properties that are functions. It checks not only the object's own properties but also all properties inherited through the prototype chain. This is useful for finding all methods (including inherited methods) of an object.\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\n// Basic usage\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functionsIn(obj);\n// Result: ['greet', 'calculate']\n\n// Including inherited functions\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst allMethods = functionsIn(calc);\n// Result: ['add', 'divide'] (`multiply` is non-enumerable)\n\n// Inheritance through prototype chain\nfunction Parent() {\n  this.parentMethod = function () {\n    return 'parent';\n  };\n}\nParent.prototype.protoMethod = function () {\n  return 'proto';\n};\n\nfunction Child() {\n  Parent.call(this);\n  this.childMethod = function () {\n    return 'child';\n  };\n}\nChild.prototype = Object.create(Parent.prototype);\n\nconst child = new Child();\nconst inheritedFunctions = functionsIn(child);\n// Result: ['parentMethod', 'childMethod', 'protoMethod']\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\nfunctionsIn(null); // []\nfunctionsIn(undefined); // []\n```\n\n#### Parameters\n\n- `object` (`any`): The object to inspect.\n\n#### Returns\n\n(`string[]`): Returns an array of the names of properties that are functions (including inherited functions).\n"
  },
  {
    "path": "docs/reference/compat/object/get.md",
    "content": "# get (Lodash Compatibility)\n\n::: warning Use dot notation or bracket notation instead\n\nThis `get` function performs slowly due to complex path parsing, handling `null` or `undefined`, and default value processing.\n\nInstead, use the faster and more modern dot notation (`.`), bracket notation (`[]`), or optional chaining (`?.`).\n\n:::\n\nGets the value at the specified path of an object.\n\n```typescript\nconst value = get(object, path, defaultValue);\n```\n\n## Usage\n\n### `get(object, path, defaultValue?)`\n\nUse `get` to safely retrieve a value from an object path. When the path doesn't exist or the value is `undefined`, it returns the default value.\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\n// Access nested object with dot notation\nconst object = { a: { b: { c: 3 } } };\nget(object, 'a.b.c');\n// => 3\n\n// Access with array notation\nget(object, ['a', 'b', 'c']);\n// => 3\n\n// Provide default value for non-existent path\nget(object, 'a.b.d', 'default');\n// => 'default'\n\n// Path with array index\nconst arrayObject = { users: [{ name: 'john' }, { name: 'jane' }] };\nget(arrayObject, 'users[0].name');\n// => 'john'\n```\n\nSafely accesses `null` or `undefined` objects.\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\nget(null, 'a.b.c', 'default');\n// => 'default'\n\nget(undefined, ['a', 'b'], 'default');\n// => 'default'\n```\n\n#### Parameters\n\n- `object` (`any`): The object to query.\n- `path` (`PropertyPath`): The path of the property to get. Can be represented as a string, number, symbol, or array.\n- `defaultValue` (`any`, optional): The default value to return when the value is `undefined`.\n\n#### Returns\n\n(`any`): Returns the resolved value or the default value.\n"
  },
  {
    "path": "docs/reference/compat/object/has.md",
    "content": "# has (Lodash Compatibility)\n\n::: warning Use `Object.hasOwn` or `in` operator instead\n\nThis `has` function is slow due to complex path parsing and array index handling.\n\nInstead, use the faster and more modern `Object.hasOwn()` or the `in` operator.\n\n:::\n\nChecks if a property at the specified path exists in an object.\n\n```typescript\nconst exists = has(object, path);\n```\n\n## Usage\n\n### `has(object, path)`\n\nUse `has` to check if an object has a property at a specific path. It only checks own properties and does not check inherited properties.\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\n// Simple property check\nconst object = { a: 1, b: 2 };\nhas(object, 'a');\n// => true\n\n// Nested object check\nconst nested = { a: { b: { c: 3 } } };\nhas(nested, 'a.b.c');\n// => true\nhas(nested, ['a', 'b', 'c']);\n// => true\n\n// Non-existent property\nhas(nested, 'a.b.d');\n// => false\n\n// Array index check\nconst array = [1, 2, 3];\nhas(array, 2);\n// => true\nhas(array, 5);\n// => false\n```\n\nIt works correctly with sparse arrays too.\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\nconst sparse = [1, , 3]; // index 1 is empty\nhas(sparse, 0); // true\nhas(sparse, 1); // true - actually exists, but value is undefined\nhas(sparse, 2); // true\n```\n\n#### Parameters\n\n- `object` (`any`): The object to query.\n- `path` (`PropertyPath`): The path of the property to check. Can be represented as a string, number, symbol, or array.\n\n#### Returns\n\n(`boolean`): Returns `true` if the property exists at the path, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/object/hasIn.md",
    "content": "# hasIn (Lodash compatibility)\n\n::: warning Use the `in` operator instead\n\nThis `hasIn` function performs slowly due to complex path parsing and prototype chain checking.\n\nInstead, use the faster and more modern `in` operator or `Object.hasOwn()` function.\n\n:::\n\nChecks if a property at the specified path exists in the object, including inherited properties.\n\n```typescript\nconst exists = hasIn(object, path);\n```\n\n## Usage\n\n### `hasIn(object, path)`\n\nUse `hasIn` when you want to check if an object has a property at a specific path. Unlike `has`, it also checks inherited properties (properties in the prototype chain).\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// Check own properties\nconst object = { a: 1, b: 2 };\nhasIn(object, 'a');\n// => true\n\n// Check nested objects\nconst nested = { a: { b: { c: 3 } } };\nhasIn(nested, 'a.b.c');\n// => true\nhasIn(nested, ['a', 'b', 'c']);\n// => true\n\n// Non-existent property\nhasIn(nested, 'a.b.d');\n// => false\n\n// Check array indices\nconst array = [1, 2, 3];\nhasIn(array, 2);\n// => true\nhasIn(array, 5);\n// => false\n```\n\nIt also checks inherited properties.\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// Check properties in the prototype chain\nfunction Rectangle() {}\nRectangle.prototype.area = function () {};\n\nconst rect = new Rectangle();\nhasIn(rect, 'area'); // true - finds inherited properties too\nhas(rect, 'area'); // false - has only checks own properties\n```\n\nSafely handles `null` and `undefined`.\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\nhasIn(null, 'a');\n// => false\n\nhasIn(undefined, 'b');\n// => false\n```\n\n#### Parameters\n\n- `object` (`any`): The object to inspect.\n- `path` (`PropertyPath`): The path of the property to check. This can be represented as a string, number, symbol, or array.\n\n#### Returns\n\n(`boolean`): Returns `true` if the property at the path exists (whether it's an own property or inherited property), otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/object/invert.md",
    "content": "# invert (Lodash compatibility)\n\n::: warning Use `invert` from `es-toolkit`\n\nThis `invert` function operates slower due to the complex processing required for Lodash compatibility.\n\nInstead, use the faster and more modern [`invert`](../../object/invert.md) from `es-toolkit`.\n\n:::\n\nInverts the keys and values of an object.\n\n```typescript\nconst inverted = invert(object);\n```\n\n## Usage\n\n### `invert(object)`\n\nUse `invert` when you want to swap the keys and values of an object. The original object's keys become the values in the new object, and the original object's values become the keys in the new object.\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// Basic key-value inversion\nconst object = { a: 1, b: 2, c: 3 };\ninvert(object);\n// => { '1': 'a', '2': 'b', '3': 'c' }\n\n// Inverting string values\nconst colors = { red: '#ff0000', green: '#00ff00', blue: '#0000ff' };\ninvert(colors);\n// => { '#ff0000': 'red', '#00ff00': 'green', '#0000ff': 'blue' }\n\n// Mixed key and value types\nconst mixed = { a: 1, 2: 'b', c: 3, 4: 'd' };\ninvert(mixed);\n// => { '1': 'a', 'b': '2', '3': 'c', 'd': '4' }\n```\n\nWhen there are duplicate values, the last key is used.\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// Case with duplicate values\nconst object = { a: 1, b: 1, c: 2 };\ninvert(object);\n// => { '1': 'b', '2': 'c' }\n// 'a' is overwritten and lost\n```\n\n#### Parameters\n\n- `object` (`object`): The object to invert.\n\n#### Returns\n\n(`Record<string, string>`): Returns a new object with keys and values inverted.\n"
  },
  {
    "path": "docs/reference/compat/object/invertBy.md",
    "content": "# invertBy (Lodash compatibility)\n\n::: warning Use modern JavaScript APIs\n\nThis `invertBy` function operates slowly due to complex iterator processing and grouping logic.\n\nInstead, use the faster and more modern `Object.entries()` with `reduce()` or `Map`.\n\n:::\n\nInverts the keys and values of an object while grouping identical values into arrays.\n\n```typescript\nconst inverted = invertBy(object, iteratee);\n```\n\n## Usage\n\n### `invertBy(object, iteratee?)`\n\nUse `invertBy` when you want to invert the keys and values of an object and group keys with the same value into arrays. You can optionally provide an iteratee function to transform the values.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// Basic key-value inversion (identical values are grouped into arrays)\nconst object = { a: 1, b: 2, c: 1 };\ninvertBy(object);\n// => { '1': ['a', 'c'], '2': ['b'] }\n\n// Value transformation using iteratee function\nconst ages = { john: 25, jane: 30, bob: 25 };\ninvertBy(ages, age => `age_${age}`);\n// => { 'age_25': ['john', 'bob'], 'age_30': ['jane'] }\n\n// Grouping by string length\nconst words = { a: 'hello', b: 'world', c: 'hi', d: 'test' };\ninvertBy(words, word => word.length);\n// => { '5': ['a', 'b'], '2': ['c'], '4': ['d'] }\n```\n\nYou can also group by object properties.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// Grouping by object property\nconst users = {\n  user1: { department: 'IT', age: 30 },\n  user2: { department: 'HR', age: 25 },\n  user3: { department: 'IT', age: 35 },\n};\n\ninvertBy(users, user => user.department);\n// => { 'IT': ['user1', 'user3'], 'HR': ['user2'] }\n```\n\nSafely handles `null` or `undefined`.\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\ninvertBy(null);\n// => {}\n\ninvertBy(undefined);\n// => {}\n```\n\n#### Parameters\n\n- `object` (`object`): The object to invert.\n- `iteratee` (`ValueIteratee`, optional): The function to transform values. Defaults to a function that uses the value as-is.\n\n#### Returns\n\n(`Record<string, string[]>`): Returns a new object with transformed values as keys and arrays of original keys as values.\n"
  },
  {
    "path": "docs/reference/compat/object/keys.md",
    "content": "# keys (Lodash compatibility)\n\n::: warning Use `Object.keys`\n\nThis `keys` function operates slowly due to complex logic for handling array-like objects, prototype objects, etc.\n\nInstead, use the faster and more modern `Object.keys()`.\n\n:::\n\nReturns an array of the object's own enumerable property names.\n\n```typescript\nconst keyArray = keys(object);\n```\n\n## Usage\n\n### `keys(object)`\n\nUse `keys` when you want to get the object's own property names. It returns only own properties, excluding inherited properties.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// Keys of a basic object\nconst object = { a: 1, b: 2, c: 3 };\nkeys(object);\n// => ['a', 'b', 'c']\n\n// Indices of an array\nconst array = [1, 2, 3];\nkeys(array);\n// => ['0', '1', '2']\n\n// Indices of a string\nkeys('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\nProperties inherited from functions or constructors are excluded.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeys(new Foo());\n// => ['a', 'b'] ('c' is excluded as it's a prototype property)\n```\n\nArray-like objects are handled specially.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeys(typedArray);\n// => ['0', '1', '2']\n\n// arguments object\nfunction example() {\n  return keys(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\nHandles `null` and `undefined` safely.\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nkeys(null);\n// => []\n\nkeys(undefined);\n// => []\n```\n\n#### Parameters\n\n- `object` (`any`): The object to get keys from.\n\n#### Returns\n\n(`string[]`): Returns an array of the object's own enumerable property names.\n"
  },
  {
    "path": "docs/reference/compat/object/keysIn.md",
    "content": "# keysIn (Lodash compatibility)\n\n::: warning Use `for...in` loop or `Object.keys`\n\nThis `keysIn` function operates slowly due to complex logic such as handling array-like objects and traversing the prototype chain.\n\nUse the faster and more modern `for...in` loop or `Object.keys()` as needed instead.\n\n:::\n\nReturns an array of all enumerable property names of an object, including inherited properties.\n\n```typescript\nconst allKeys = keysIn(object);\n```\n\n## Usage\n\n### `keysIn(object)`\n\nUse `keysIn` when you want to get all property names of an object including inherited properties. Unlike `keys`, it also returns properties from the prototype chain.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// Keys of a basic object\nconst object = { a: 1, b: 2 };\nkeysIn(object);\n// => ['a', 'b']\n\n// Indices of an array\nconst array = [1, 2, 3];\nkeysIn(array);\n// => ['0', '1', '2']\n\n// Indices of a string\nkeysIn('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\nIt also includes inherited properties.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeysIn(new Foo());\n// => ['a', 'b', 'c'] (includes prototype property 'c')\n\n// constructor is excluded\nclass MyClass {\n  constructor() {\n    this.prop = 1;\n  }\n  method() {}\n}\nMyClass.prototype.inherited = 2;\n\nkeysIn(new MyClass());\n// => ['prop', 'method', 'inherited'] (constructor is excluded)\n```\n\nIt specially handles array-like objects.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeysIn(typedArray);\n// => ['0', '1', '2'] (excludes buffer, byteLength, etc.)\n\n// arguments object\nfunction example() {\n  return keysIn(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\nIt safely handles `null` or `undefined`.\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nkeysIn(null);\n// => []\n\nkeysIn(undefined);\n// => []\n```\n\n#### Parameters\n\n- `object` (`any`): The object to get keys from.\n\n#### Returns\n\n(`string[]`): Returns an array of all enumerable property names (including both own and inherited properties) of the object.\n"
  },
  {
    "path": "docs/reference/compat/object/mapKeys.md",
    "content": "# mapKeys (Lodash compatibility)\n\n::: warning Use `mapKeys` from `es-toolkit`\n\nThis `mapKeys` function is relatively slow due to handling `null` or `undefined` and the `iteratee` conversion process.\n\nUse the faster and more modern [`mapKeys`](../../object/mapKeys.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object by transforming keys while keeping values the same.\n\n```typescript\nconst result = mapKeys(obj, iteratee);\n```\n\n## Usage\n\n### `mapKeys(object, iteratee)`\n\nTransforms each key in an object using the `iteratee` function to create a new object. Values remain unchanged while only keys are modified. Useful for transforming or normalizing object keys.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\n// Add prefix to keys\nconst obj = { a: 1, b: 2, c: 3 };\nconst result = mapKeys(obj, (value, key) => 'prefix_' + key);\n// Result: { prefix_a: 1, prefix_b: 2, prefix_c: 3 }\n\n// Convert keys to uppercase\nconst data = { name: 'John', age: 30 };\nconst uppercased = mapKeys(data, (value, key) => key.toUpperCase());\n// Result: { NAME: 'John', AGE: 30 }\n\n// Convert array indices to keys\nconst arr = ['apple', 'banana', 'orange'];\nconst indexed = mapKeys(arr, (value, index) => `item_${index}`);\n// Result: { item_0: 'apple', item_1: 'banana', item_2: 'orange' }\n\n// Create new keys by combining key and value\nconst scores = { math: 90, science: 85, english: 92 };\nconst detailed = mapKeys(scores, (value, key) => `${key}_score_${value}`);\n// Result: { math_score_90: 90, science_score_85: 85, english_score_92: 92 }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\nmapKeys(null, iteratee); // {}\nmapKeys(undefined, iteratee); // {}\n```\n\n#### Parameters\n\n- `object` (`ArrayLike<T> | T | null | undefined`): The object or array to transform keys from.\n- `iteratee` (`ListIteratee<T> | ObjectIteratee<T>`, optional): The function to transform each key. Defaults to the `identity` function.\n\n#### Returns\n\n(`Record<string, T> | Record<string, T[keyof T]>`): Returns a new object with transformed keys.\n"
  },
  {
    "path": "docs/reference/compat/object/mapValues.md",
    "content": "# mapValues (Lodash compatibility)\n\n::: warning Use `mapValues` from `es-toolkit`\n\nThis `mapValues` function is relatively slow due to handling `null` or `undefined` and the `iteratee` conversion process.\n\nUse the faster and more modern [`mapValues`](../../object/mapValues.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object by transforming values while keeping keys the same.\n\n```typescript\nconst result = mapValues(obj, iteratee);\n```\n\n## Usage\n\n### `mapValues(object, iteratee)`\n\nTransforms each value in an object using the `iteratee` function to create a new object. Keys remain unchanged while only values are modified. Can handle strings, arrays, and objects. Useful for transforming or calculating data.\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\n// Transform object values\nconst obj = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(obj, value => value * 2);\n// Result: { a: 2, b: 4, c: 6 }\n\n// Convert strings to uppercase\nconst names = { first: 'john', last: 'doe' };\nconst uppercased = mapValues(names, value => value.toUpperCase());\n// Result: { first: 'JOHN', last: 'DOE' }\n\n// Transform each character in a string\nconst str = 'abc';\nconst charMap = mapValues(str, char => char.toUpperCase());\n// Result: { '0': 'A', '1': 'B', '2': 'C' }\n\n// Convert array to object\nconst arr = [10, 20, 30];\nconst arrMap = mapValues(arr, (value, index) => value + index);\n// Result: { '0': 10, '1': 21, '2': 32 }\n\n// Extract values using property path\nconst users = {\n  user1: { profile: { name: 'Alice' } },\n  user2: { profile: { name: 'Bob' } },\n};\nconst userNames = mapValues(users, 'profile.name');\n// Result: { user1: 'Alice', user2: 'Bob' }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\nmapValues(null, iteratee); // {}\nmapValues(undefined, iteratee); // {}\n```\n\n#### Parameters\n\n- `object` (`string | T[] | T | null | undefined`): The object, array, or string to transform values from.\n- `iteratee` (`ValueIteratee<any>`, optional): The function, property path, or matching object to transform each value. Defaults to the `identity` function.\n\n#### Returns\n\n(`Record<number, T> | { [P in keyof T]: U } | Record<string, boolean> | Record<string, any> | Partial<T>`): Returns a new object with transformed values.\n"
  },
  {
    "path": "docs/reference/compat/object/merge.md",
    "content": "# merge (Lodash compatibility)\n\n::: warning Use `merge` from `es-toolkit`\n\nThis `merge` function is relatively slow as it internally calls the complex `mergeWith` function.\n\nUse the faster and more modern [`merge`](../../object/merge.ts) from `es-toolkit` instead.\n\n:::\n\nDeeply merges multiple objects into a single object.\n\n```typescript\nconst result = merge(target, ...sources);\n```\n\n## Usage\n\n### `merge(object, ...sources)`\n\nDeeply merges one or more source objects into the target object. Nested objects and arrays are recursively merged. If a source object property is `undefined`, it won't overwrite the existing value in the target object. Useful for merging object configurations or applying defaults.\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\n// Basic object merge\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// Result: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// Array merge\nconst obj1 = { arr: [1, 2] };\nconst obj2 = { arr: [3, 4] };\nconst merged = merge(obj1, obj2);\n// Result: { arr: [3, 4] } (arrays are replaced)\n\n// Multiple object merge\nconst base = { a: 1 };\nconst ext1 = { b: 2 };\nconst ext2 = { c: 3 };\nconst ext3 = { d: 4 };\nconst combined = merge(base, ext1, ext2, ext3);\n// Result: { a: 1, b: 2, c: 3, d: 4 }\n\n// Nested object merge\nconst config = {\n  api: { url: 'https://api.example.com', timeout: 5000 },\n  features: { auth: true },\n};\nconst overrides = {\n  api: { timeout: 10000, retries: 3 },\n  features: { analytics: true },\n};\nconst finalConfig = merge(config, overrides);\n// Result: {\n//   api: { url: 'https://api.example.com', timeout: 10000, retries: 3 },\n//   features: { auth: true, analytics: true }\n// }\n```\n\nThe target object is modified, so use an empty object to preserve the original.\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\nconst original = { a: 1, b: { x: 1 } };\nconst source = { b: { y: 2 } };\n\n// Preserve original\nconst result = merge({}, original, source);\n// original is not modified\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to merge into. This object is modified.\n- `...sources` (`any[]`): The source objects to merge from.\n\n#### Returns\n\n(`any`): Returns the merged target object.\n"
  },
  {
    "path": "docs/reference/compat/object/mergeWith.md",
    "content": "# mergeWith (Lodash compatibility)\n\n::: warning Use `mergeWith` from `es-toolkit`\n\nThis `mergeWith` function is relatively slow due to complex type checking, circular reference handling, and special object processing.\n\nUse the faster and more modern [`mergeWith`](../../object/mergeWith.md) from `es-toolkit` instead.\n\n:::\n\nDeeply merges multiple objects while controlling the merge behavior with a custom function.\n\n```typescript\nconst result = mergeWith(target, ...sources, customizer);\n```\n\n## Usage\n\n### `mergeWith(object, ...sources, customizer)`\n\nDeeply merges one or more source objects into the target object, controlling the merge behavior with a customizer function. If the customizer function returns `undefined`, the default merge logic is used. Useful for concatenating arrays or applying special merge rules.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\n// Add numbers\nconst obj1 = { a: 1, b: 2 };\nconst obj2 = { b: 3, c: 4 };\nconst result = mergeWith(obj1, obj2, (objValue, srcValue) => {\n  if (typeof objValue === 'number' && typeof srcValue === 'number') {\n    return objValue + srcValue;\n  }\n});\n// Result: { a: 1, b: 5, c: 4 }\n\n// Concatenate arrays\nconst arr1 = { items: [1, 2] };\nconst arr2 = { items: [3, 4] };\nconst merged = mergeWith(arr1, arr2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Result: { items: [1, 2, 3, 4] }\n\n// Concatenate strings\nconst str1 = { message: 'Hello' };\nconst str2 = { message: 'World' };\nconst combined = mergeWith(str1, str2, (objValue, srcValue, key) => {\n  if (key === 'message' && typeof objValue === 'string') {\n    return objValue + ' ' + srcValue;\n  }\n});\n// Result: { message: 'Hello World' }\n\n// Multiple source objects with customizer\nconst base = { scores: [80] };\nconst quiz1 = { scores: [90] };\nconst quiz2 = { scores: [85] };\nconst final = mergeWith(base, quiz1, quiz2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Result: { scores: [80, 90, 85] }\n```\n\nThe customizer function receives various parameters.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\nconst customizer = (objValue, srcValue, key, object, source, stack) => {\n  console.log('Merging:', key, objValue, '->', srcValue);\n\n  // Customize only for specific keys\n  if (key === 'specialField') {\n    return `${objValue}_${srcValue}`;\n  }\n\n  // Return undefined to use default merge logic\n  return undefined;\n};\n```\n\n#### Parameters\n\n- `object` (`any`): The target object to merge into. This object is modified.\n- `...sources` (`any[]`): The source objects to merge from.\n- `customizer` (`MergeWithCustomizer`): The function to customize value assignment. Format: `(objValue, srcValue, key, object, source, stack) => any`.\n\n#### Returns\n\n(`any`): Returns the merged target object.\n"
  },
  {
    "path": "docs/reference/compat/object/omit.md",
    "content": "# omit (Lodash compatibility)\n\n::: warning Use `omit` from `es-toolkit`\n\nThis `omit` function is relatively slow due to deep copying and calling the `unset` function.\n\nUse the faster and more modern [`omit`](../../object/omit.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object excluding specified keys from an object.\n\n```typescript\nconst result = omit(obj, ...keys);\n```\n\n## Usage\n\n### `omit(object, ...paths)`\n\nCreates a new object excluding specified keys from an object. Supports deep key paths and can specify multiple keys at once using arrays. Useful for removing sensitive information from objects or selecting only needed properties.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\n// Remove basic keys\nconst user = { id: 1, name: 'John', email: 'john@example.com', password: 'secret' };\nconst publicUser = omit(user, 'password', 'email');\n// Result: { id: 1, name: 'John' }\n\n// Remove multiple keys with array\nconst data = { a: 1, b: 2, c: 3, d: 4 };\nconst filtered = omit(data, ['a', 'c']);\n// Result: { b: 2, d: 4 }\n\n// Remove deep key paths\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst result = omit(nested, 'user.profile.age', 'admin');\n// Result: { user: { profile: { name: 'John' }, settings: { theme: 'dark' } } }\n\n// Combine nested arrays and keys\nconst complex = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst simplified = omit(complex, 'a', ['b', 'c'], 'd.f');\n// Result: { d: { e: 4 } }\n```\n\nYou can freely combine arrays, strings, and key paths.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nconst config = {\n  api: { url: 'https://api.example.com', key: 'secret', timeout: 5000 },\n  ui: { theme: 'dark', language: 'en' },\n  debug: true,\n};\n\n// Specify keys in multiple ways\nconst cleaned = omit(config, 'api.key', ['debug'], 'ui.language');\n// Result: { api: { url: 'https://api.example.com', timeout: 5000 }, ui: { theme: 'dark' } }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nomit(null, 'key'); // {}\nomit(undefined, 'key'); // {}\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The source object to remove keys from.\n- `...paths` (`Array<Many<PropertyKey>>`): The keys to remove. Can specify single keys, arrays of keys, or deep key paths.\n\n#### Returns\n\n(`Partial<T>`): Returns a new object with specified keys removed.\n"
  },
  {
    "path": "docs/reference/compat/object/omitBy.md",
    "content": "# omitBy (Lodash compatibility)\n\n::: warning Use `omitBy` from `es-toolkit`\n\nThis `omitBy` function is relatively slow due to array-like object checking, `iteratee` conversion, and key transformation processes.\n\nUse the faster and more modern [`omitBy`](../../object/omitBy.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object excluding properties for which the predicate function returns true.\n\n```typescript\nconst result = omitBy(obj, predicate);\n```\n\n## Usage\n\n### `omitBy(object, predicate)`\n\nExecutes a predicate function for each property of the object and creates a new object excluding properties for which the predicate returns true. Useful for dynamically filtering properties based on conditions.\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\n// Remove values of specific type\nconst data = { a: 1, b: 'remove', c: 3, d: 'keep' };\nconst numbers = omitBy(data, value => typeof value === 'string');\n// Result: { a: 1, c: 3 }\n\n// Remove properties based on condition\nconst user = { id: 1, name: 'John', age: 0, active: false, email: '' };\nconst validData = omitBy(user, value => !value);\n// Result: { id: 1, name: 'John' } (removes falsy values)\n\n// Filter by key name\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = omitBy(settings, (value, key) => key.startsWith('admin'));\n// Result: { userSetting: true, debugMode: true }\n\n// Remove only number properties\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst noNumbers = omitBy(mixed, value => typeof value === 'number');\n// Result: { str: 'hello', bool: true, obj: {} }\n\n// Can also be used with arrays\nconst arr = [1, 2, 3, 4, 5];\nconst filtered = omitBy(arr, value => value % 2 === 0);\n// Result: { '0': 1, '2': 3, '4': 5 } (odd values at even indices)\n\n// Utilize value, key, and original object\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst passingGrades = omitBy(scores, (value, key, obj) => {\n  console.log(`${key}: ${value} (average: ${Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length})`);\n  return value < 80;\n});\n// Result: { math: 90, english: 85 }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\nomitBy(null, () => true); // {}\nomitBy(undefined, () => true); // {}\n```\n\n#### Parameters\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): The source object to filter.\n- `predicate` (`ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, optional): The predicate function to execute for each property. Properties for which this returns true are removed. Defaults to the `identity` function.\n\n#### Returns\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): Returns a new object consisting of properties that don't match the condition.\n"
  },
  {
    "path": "docs/reference/compat/object/pick.md",
    "content": "# pick (Lodash compatibility)\n\n::: warning Use `pick` from `es-toolkit`\n\nThis `pick` function is relatively slow due to complex path processing, calling `get`/`set` functions, and handling `null`/`undefined`.\n\nUse the faster and more modern [`pick`](../../object/pick.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object by selecting only specified properties from an object.\n\n```typescript\nconst result = pick(obj, ...keys);\n```\n\n## Usage\n\n### `pick(object, ...props)`\n\nUse `pick` when you want to create a new object containing only the desired properties from an object. You can pass multiple keys at once using an array, or pass them one by one as individual arguments. Supports deep key paths so you can also select nested properties.\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\n// Basic usage\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// Result: { a: 1, c: 3 }\n\n// Pass as individual arguments\nconst result2 = pick(obj, 'a', 'c');\n// Result: { a: 1, c: 3 }\n\n// Select deep paths\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst userInfo = pick(nested, 'user.profile.name', 'admin');\n// Result: { user: { profile: { name: 'John' } }, admin: true }\n\n// Mix arrays and individual keys\nconst mixed = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst selected = pick(mixed, ['a', 'b'], 'c', 'd.e');\n// Result: { a: 1, b: 2, c: 3, d: { e: 4 } }\n\n// Distinguish between dot notation keys and actual dotted keys\nconst ambiguous = {\n  'a.b': 1, // Actual key 'a.b'\n  a: { b: 2, c: 3 }, // Nested object\n};\nconst dotKey = pick(ambiguous, 'a.b');\n// Result: { 'a.b': 1 } (actual key takes priority)\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\npick(null, ['a', 'b']); // {}\npick(undefined, ['a', 'b']); // {}\n```\n\n#### Parameters\n\n- `object` (`T | null | undefined`): The object to select properties from.\n- `...props` (`Array<Many<PropertyPath>>`): The property keys to select. Can specify single keys, arrays of keys, or deep key paths.\n\n#### Returns\n\n(`Pick<T, U> | Partial<T>`): Returns a new object containing only the specified properties.\n"
  },
  {
    "path": "docs/reference/compat/object/pickBy.md",
    "content": "# pickBy (Lodash compatibility)\n\n::: warning Use `pickBy` from `es-toolkit`\n\nThis `pickBy` function is relatively slow due to array-like object checking, `iteratee` conversion, and key transformation processes.\n\nUse the faster and more modern [`pickBy`](../../object/pickBy.md) from `es-toolkit` instead.\n\n:::\n\nCreates a new object selecting only properties for which the predicate function returns true.\n\n```typescript\nconst result = pickBy(obj, predicate);\n```\n\n## Usage\n\n### `pickBy(object, predicate)`\n\nExecutes a predicate function for each property of the object and creates a new object containing only properties for which the predicate returns true. Useful for dynamically selecting properties based on conditions.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\n// Select only values of specific type\nconst data = { a: 1, b: 'keep', c: 3, d: 'select' };\nconst strings = pickBy(data, value => typeof value === 'string');\n// Result: { b: 'keep', d: 'select' }\n\n// Select properties based on condition\nconst user = { id: 1, name: 'John', age: 0, active: true, email: '' };\nconst validData = pickBy(user, value => Boolean(value));\n// Result: { id: 1, name: 'John', active: true } (only truthy values)\n\n// Filter by key name\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = pickBy(settings, (value, key) => key.startsWith('user'));\n// Result: { userSetting: true }\n\n// Select only number properties\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst numbersOnly = pickBy(mixed, value => typeof value === 'number');\n// Result: { num1: 42, num2: 0 }\n\n// Can also be used with arrays\nconst arr = [1, 2, 3, 4, 5];\nconst evens = pickBy(arr, value => value % 2 === 0);\n// Result: { '1': 2, '3': 4 } (indices and values of even numbers)\n\n// Utilize value, key, and original object\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst highScores = pickBy(scores, (value, key, obj) => {\n  const average = Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length;\n  return value > average;\n});\n// Result: { math: 90, english: 85 }\n```\n\nWhen called without a predicate function, it selects only truthy values.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: '', c: 0, d: 'hello', e: null, f: true };\nconst truthyValues = pickBy(data);\n// Result: { a: 1, d: 'hello', f: true }\n```\n\n`null` or `undefined` are treated as empty objects.\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\npickBy(null, () => true); // {}\npickBy(undefined, () => true); // {}\n```\n\n#### Parameters\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): The source object to filter.\n- `predicate` (`ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, optional): The predicate function to execute for each property. Properties for which this returns true are selected. Defaults to the `identity` function.\n\n#### Returns\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): Returns a new object consisting of properties that match the condition.\n"
  },
  {
    "path": "docs/reference/compat/object/property.md",
    "content": "# property (Lodash compatibility)\n\n::: warning Use `get` function directly\n\nThis `property` function is a wrapper function that internally calls the `get` function, causing additional function call overhead.\n\nUse the faster and more modern `get` function directly or use optional chaining (`?.`) instead.\n\n:::\n\nCreates a function that retrieves the value at a specified path.\n\n```typescript\nconst getter = property(path);\n```\n\n## Usage\n\n### `property(path)`\n\nUse `property` when you want to create a function that retrieves values from a specific path. The created function can be reused across multiple objects, making it convenient to use with array methods.\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\n// Basic usage\nconst getName = property('name');\nconst user = { name: 'John', age: 30 };\nconst result = getName(user);\n// Result: 'John'\n\n// Deep path access\nconst getNestedValue = property('user.profile.name');\nconst data = { user: { profile: { name: 'Alice', age: 25 } } };\nconst nestedResult = getNestedValue(data);\n// Result: 'Alice'\n\n// Using array path\nconst getByArray = property(['user', 'profile', 'name']);\nconst arrayResult = getByArray(data);\n// Result: 'Alice'\n\n// Use with array methods\nconst users = [\n  { user: { profile: { name: 'John' } } },\n  { user: { profile: { name: 'Jane' } } },\n  { user: { profile: { name: 'Bob' } } },\n];\nconst names = users.map(property('user.profile.name'));\n// Result: ['John', 'Jane', 'Bob']\n\n// Array index access\nconst getFirstItem = property('[0]');\nconst items = ['first', 'second', 'third'];\nconst firstItem = getFirstItem(items);\n// Result: 'first'\n\n// Number key access\nconst getIndex = property(1);\nconst arr = ['a', 'b', 'c'];\nconst secondItem = getIndex(arr);\n// Result: 'b'\n```\n\nReturns `undefined` if the path doesn't exist.\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\nconst getMissing = property('nonexistent.path');\nconst result = getMissing({ some: 'data' });\n// Result: undefined\n```\n\n#### Parameters\n\n- `path` (`PropertyPath`): The path to retrieve the value from. Can be a string, number, symbol, or an array of these.\n\n#### Returns\n\n(`(object: T) => R`): Returns a function that returns the value at the specified path from a given object.\n"
  },
  {
    "path": "docs/reference/compat/object/propertyOf.md",
    "content": "# propertyOf (Lodash compatibility)\n\n::: warning Use `get` function directly\n\nThis `propertyOf` function is a wrapper function that internally calls the `get` function, causing additional function call overhead.\n\nUse the faster and more modern `get` function directly or use optional chaining (`?.`) instead.\n\n:::\n\nCreates a function that retrieves values from various paths in a specific object.\n\n```typescript\nconst getter = propertyOf(obj);\n```\n\n## Usage\n\n### `propertyOf(object)`\n\nUse `propertyOf` when you want to create a function that retrieves values from multiple paths in a single object. Unlike `property`, it fixes the object first and allows you to query various paths.\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\n// Basic usage\nconst data = { name: 'John', age: 30, city: 'New York' };\nconst getValue = propertyOf(data);\n\nconst name = getValue('name');\n// Result: 'John'\n\nconst age = getValue('age');\n// Result: 30\n\n// Deep path access\nconst complexData = {\n  user: { profile: { name: 'Alice', age: 25 } },\n  settings: { theme: 'dark', lang: 'en' },\n};\nconst getComplexValue = propertyOf(complexData);\n\nconst userName = getComplexValue('user.profile.name');\n// Result: 'Alice'\n\nconst theme = getComplexValue('settings.theme');\n// Result: 'dark'\n\n// Using array path\nconst arrayPath = getComplexValue(['user', 'profile', 'age']);\n// Result: 25\n\n// Process multiple paths as array\nconst paths = ['user.profile.name', 'settings.theme', 'settings.lang'];\nconst values = paths.map(getComplexValue);\n// Result: ['Alice', 'dark', 'en'] (values from each path)\n\n// Array index access\nconst arrayData = [10, 20, 30];\nconst getArrayValue = propertyOf(arrayData);\nconst firstItem = getArrayValue(0);\n// Result: 10\n\nconst secondItem = getArrayValue('[1]');\n// Result: 20\n```\n\nReturns `undefined` if the path doesn't exist.\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: 2 };\nconst getValue = propertyOf(data);\nconst missing = getValue('nonexistent.path');\n// Result: undefined\n```\n\n#### Parameters\n\n- `object` (`T`): The target object to retrieve values from.\n\n#### Returns\n\n(`(path: PropertyPath) => any`): Returns a function that returns the object's value at a given path.\n"
  },
  {
    "path": "docs/reference/compat/object/result.md",
    "content": "# result (Lodash Compatibility)\n\n::: warning Use the `get` function or optional chaining\n\nThis `result` function performs slowly due to complex path handling and function invocation logic.\n\nInstead, use the faster and more modern `get` function or optional chaining (`?.`).\n\n:::\n\nRetrieves a value from a path in an object, but if it encounters a function, it calls it and returns the result.\n\n```typescript\nconst result = result(obj, path, defaultValue);\n```\n\n## Usage\n\n### `result(object, path, defaultValue)`\n\nUse `result` when you want to retrieve a value from a path in an object and automatically call any functions along the path. It's similar to the `get` function, but it executes functions it encounters and returns the result if the final value is also a function.\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\n// Basic usage (regular values)\nconst obj = { a: { b: { c: 3 } } };\nconst value = result(obj, 'a.b.c');\n// Result: 3\n\n// Automatic function invocation\nconst objWithFunc = {\n  compute: () => ({ value: 42 }),\n  getValue: function () {\n    return this.compute().value;\n  },\n};\nconst computed = result(objWithFunc, 'getValue');\n// Result: 42 (getValue function is called)\n\n// Function invocation along the path\nconst nested = {\n  data: () => ({ user: { getName: () => 'John' } }),\n};\nconst name = result(nested, 'data.user.getName');\n// Result: 'John' (both data() and getName() are called)\n\n// Using default value\nconst incomplete = { a: { b: null } };\nconst withDefault = result(incomplete, 'a.b.c', 'default value');\n// Result: 'default value'\n\n// When default value is a function\nconst withFuncDefault = result(incomplete, 'a.b.c', () => 'computed default');\n// Result: 'computed default' (default value function is called)\n\n// Using array path\nconst arrayPath = result(objWithFunc, ['getValue']);\n// Result: 42\n\n// Dynamic default value\nconst dynamic = result(incomplete, 'missing.path', function () {\n  return `Generated at ${new Date().toISOString()}`;\n});\n// Result: string with current time\n```\n\nThe `this` context is preserved when calling functions.\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\nconst calculator = {\n  multiplier: 2,\n  compute: function () {\n    return 10 * this.multiplier;\n  },\n};\n\nconst calculatedValue = result(calculator, 'compute');\n// Result: 20 (this.multiplier is correctly referenced)\n```\n\n#### Parameters\n\n- `object` (`any`): The object to query.\n- `path` (`PropertyPath`): The path of the property to get. Can be a string, array, or array of keys.\n- `defaultValue` (`R | ((...args: any[]) => R)`, optional): The default value to return if the value is `undefined`. If it's a function, it calls and returns the result.\n\n#### Returns\n\n(`R`): Returns the resolved value. Functions along the path are called, and if the final value is also a function, it returns the result of calling it.\n"
  },
  {
    "path": "docs/reference/compat/object/set.md",
    "content": "# set (Lodash Compatibility)\n\n::: warning Use direct assignment instead\n\nThis `set` function internally calls the `updateWith` function and operates slowly due to complex path processing and object creation logic.\n\nUse faster and more modern direct assignment or destructuring assignment instead.\n\n:::\n\nSets the value at the specified path of the object.\n\n```typescript\nconst result = set(obj, path, value);\n```\n\n## Usage\n\n### `set(object, path, value)`\n\nUse `set` when you want to set a value at a specific path in an object. If any part of the path doesn't exist, it's automatically created. Useful when dealing with nested objects or arrays.\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\n// Basic usage\nconst obj = { a: { b: { c: 3 } } };\nset(obj, 'a.b.c', 4);\nconsole.log(obj.a.b.c); // 4\n\n// Set value in array\nconst arr = [1, 2, 3];\nset(arr, '1', 4);\nconsole.log(arr[1]); // 4\n\n// Create non-existent path\nconst empty = {};\nset(empty, 'user.profile.name', 'John');\nconsole.log(empty);\n// Result: { user: { profile: { name: 'John' } } }\n\n// Use array path\nconst data = {};\nset(data, ['nested', 'array', 0], 'first item');\nconsole.log(data);\n// Result: { nested: { array: ['first item'] } }\n\n// Auto-create array indices\nconst list = {};\nset(list, 'items[0]', 'first');\nset(list, 'items[2]', 'third');\nconsole.log(list);\n// Result: { items: ['first', undefined, 'third'] }\n\n// Mix nested objects and arrays\nconst complex = {};\nset(complex, 'users[0].profile.settings.theme', 'dark');\nconsole.log(complex);\n// Result: { users: [{ profile: { settings: { theme: 'dark' } } }] }\n\n// Handle numeric keys\nconst numeric = {};\nset(numeric, 123, 'number key');\nconsole.log(numeric[123]); // 'number key'\n\n// Overwrite existing values\nconst existing = { a: { b: 'old' } };\nset(existing, 'a.b', 'new');\nconsole.log(existing.a.b); // 'new'\n```\n\nThe original object is directly modified and returned.\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\nconst original = { x: 1 };\nconst result = set(original, 'y', 2);\n\nconsole.log(original === result); // true\nconsole.log(original); // { x: 1, y: 2 }\n```\n\n#### Parameters\n\n- `object` (`T`): The object to set the value in.\n- `path` (`PropertyPath`): The path of the property to set. Can be a string, array, or array of keys.\n- `value` (`any`): The value to set.\n\n#### Returns\n\n(`T`): Returns the modified object (same as the original object).\n"
  },
  {
    "path": "docs/reference/compat/object/setWith.md",
    "content": "# setWith (Lodash Compatibility)\n\n::: warning Use direct assignment instead\n\nThis `setWith` function internally calls the `updateWith` function and operates slowly due to complex path processing and customizer logic.\n\nUse faster and more modern direct assignment or destructuring assignment instead.\n\n:::\n\nSets a value at the specified path while controlling how objects are created with a customizer function.\n\n```typescript\nconst result = setWith(obj, path, value, customizer);\n```\n\n## Usage\n\n### `setWith(object, path, value, customizer)`\n\nUse `setWith` when you want to set a value at a specific path in an object while controlling the type of intermediate objects created with a customizer function. If the customizer returns `undefined`, the default logic (array for array indices, object otherwise) is used.\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\n// Basic usage (no customizer)\nconst obj1 = {};\nsetWith(obj1, 'a.b.c', 4);\nconsole.log(obj1);\n// Result: { a: { b: { c: 4 } } }\n\n// Customizer forcing array creation\nconst obj2 = {};\nsetWith(obj2, '[0][1]', 'value', () => []);\nconsole.log(obj2);\n// Result: { '0': [undefined, 'value'] }\n\n// Customize only under specific conditions\nconst obj3 = {};\nsetWith(obj3, 'a[0].b.c', 'nested', (value, key) => {\n  // Return empty object only for numeric keys (array indices)\n  return typeof key === 'string' && /^\\d+$/.test(key) ? {} : undefined;\n});\nconsole.log(obj3);\n// Result: { a: { '0': { b: { c: 'nested' } } } }\n\n// Use Object constructor as customizer\nconst obj4 = {};\nsetWith(obj4, 'x[0].y', 42, Object);\nconsole.log(obj4);\n// Result: { x: { '0': { y: 42 } } }\n\n// Complex customizer logic\nconst obj5 = {};\nsetWith(obj5, 'data.items[0].props.config', 'value', (value, key, object) => {\n  console.log('Creating:', key, 'in', object);\n\n  // Use Map for specific keys\n  if (key === 'props') {\n    return new Map();\n  }\n\n  // Array for numeric keys\n  if (typeof key === 'string' && /^\\d+$/.test(key)) {\n    return [];\n  }\n\n  // Regular object by default\n  return {};\n});\n\n// Use WeakMap as intermediate object\nconst obj6 = {};\nsetWith(obj6, 'cache.user.profile', 'data', (value, key) => {\n  if (key === 'cache') {\n    return new WeakMap();\n  }\n  return undefined; // Use default behavior\n});\n```\n\nThe customizer function receives three parameters.\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\nconst obj = {};\nsetWith(obj, 'a.b[0].c', 'value', (nsValue, key, nsObject) => {\n  console.log('nsValue:', nsValue); // Current value (usually undefined)\n  console.log('key:', key); // Key to create\n  console.log('nsObject:', nsObject); // Parent object\n\n  // Return different object types based on specific conditions\n  return key === 'b' ? [] : {};\n});\n```\n\n#### Parameters\n\n- `object` (`T`): The object to set the value in.\n- `path` (`PropertyPath`): The path of the property to set.\n- `value` (`any`): The value to set.\n- `customizer` (`(nsValue: any, key: string, nsObject: T) => any`, optional): Function to customize the creation of intermediate objects.\n\n#### Returns\n\n(`T | R`): Returns the modified object.\n"
  },
  {
    "path": "docs/reference/compat/object/toDefaulted.md",
    "content": "# toDefaulted (Lodash Compatibility)\n\n::: warning Use spread operator or `Object.assign` instead\n\nThis `toDefaulted` function operates slowly due to deep cloning and complex default value handling.\n\nUse faster and more modern spread operator (`...`) or `Object.assign()` instead.\n\n:::\n\nCreates a new object by applying default values to an object.\n\n```typescript\nconst defaulted = toDefaulted(object, ...sources);\n```\n\n## Usage\n\n### `toDefaulted(object, ...sources)`\n\nUse `toDefaulted` when you want to create a new object by applying default values from one or more source objects to a target object. Default values are only set for properties that are `undefined` or come from `Object.prototype`.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\n// Basic default value assignment\nconst user = { name: 'John' };\nconst defaults = { name: 'Anonymous', age: 25, role: 'user' };\ntoDefaulted(user, defaults);\n// => { name: 'John', age: 25, role: 'user' }\n\n// Apply defaults from multiple sources\nconst config = { theme: 'dark' };\nconst defaults1 = { theme: 'light', lang: 'en' };\nconst defaults2 = { lang: 'ko', region: 'Asia' };\ntoDefaulted(config, defaults1, defaults2);\n// => { theme: 'dark', lang: 'en', region: 'Asia' }\n```\n\nOnly `undefined` values are replaced with defaults, while `null` values are preserved.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst data = {\n  name: undefined,\n  age: null,\n  active: false,\n};\nconst defaults = {\n  name: 'Default',\n  age: 18,\n  active: true,\n  role: 'user',\n};\n\ntoDefaulted(data, defaults);\n// => { name: 'Default', age: null, active: false, role: 'user' }\n```\n\nThe original object is not modified; a new object is returned.\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst original = { a: 1 };\nconst result = toDefaulted(original, { a: 2, b: 3 });\n\nconsole.log(original); // { a: 1 } (not modified)\nconsole.log(result); // { a: 1, b: 3 } (new object)\n```\n\n#### Parameters\n\n- `object` (`object`): The target object that will receive default values.\n- `sources` (`object[]`): The source objects that provide default values. Applied in left-to-right order.\n\n#### Returns\n\n(`object`): Returns a new object with the default values applied.\n"
  },
  {
    "path": "docs/reference/compat/object/toPairs.md",
    "content": "# toPairs (Lodash Compatibility)\n\n::: warning Use `Object.entries` instead\n\nThis `toPairs` function operates slowly due to complex logic for handling `Map` and `Set`, array-like object processing, etc.\n\nUse faster and more modern `Object.entries()` instead.\n\n:::\n\nConverts an object to an array of key-value pairs.\n\n```typescript\nconst pairs = toPairs(object);\n```\n\n## Usage\n\n### `toPairs(object)`\n\nUse `toPairs` when you want to convert an object's own enumerable properties to an array of `[key, value]` pairs. Inherited properties are not included.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// Basic object conversion\nconst object = { a: 1, b: 2, c: 3 };\ntoPairs(object);\n// => [['a', 1], ['b', 2], ['c', 3]]\n\n// Object with numeric keys\nconst numbers = { 0: 'zero', 1: 'one', 2: 'two' };\ntoPairs(numbers);\n// => [['0', 'zero'], ['1', 'one'], ['2', 'two']]\n```\n\nCan also handle `Map` and `Set`.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// Map object conversion\nconst map = new Map();\nmap.set('name', 'John');\nmap.set('age', 30);\ntoPairs(map);\n// => [['name', 'John'], ['age', 30]]\n\n// Set object conversion (value is the same as key)\nconst set = new Set([1, 2, 3]);\ntoPairs(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\nSafely handles `null` or `undefined`.\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\ntoPairs(null);\n// => []\n\ntoPairs(undefined);\n// => []\n```\n\n#### Parameters\n\n- `object` (`object`): The object, Map, or Set to convert.\n\n#### Returns\n\n(`Array<[string, any]>`): Returns an array of key-value pairs.\n"
  },
  {
    "path": "docs/reference/compat/object/toPairsIn.md",
    "content": "# toPairsIn (Lodash Compatibility)\n\n::: warning Use `Object.entries` or `for...in` loop instead\n\nThis `toPairsIn` function operates slowly due to complex logic for handling inherited properties, `Map` and `Set` processing, etc.\n\nUse faster and more modern `Object.entries()` or a `for...in` loop if you need inherited properties.\n\n:::\n\nConverts an object to an array of key-value pairs, including inherited properties.\n\n```typescript\nconst pairs = toPairsIn(object);\n```\n\n## Usage\n\n### `toPairsIn(object)`\n\nUse `toPairsIn` when you want to convert all enumerable properties of an object (including inherited properties) to an array of `[key, value]` pairs. Unlike `toPairs`, properties in the prototype chain are also included.\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// Basic object conversion\nconst object = { a: 1, b: 2 };\ntoPairsIn(object);\n// => [['a', 1], ['b', 2]]\n\n// Include inherited properties\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.proto = 'property';\n\nconst child = new Parent();\nchild.own = 'own';\ntoPairsIn(child);\n// => [['inherited', 'value'], ['own', 'own'], ['proto', 'property']]\n```\n\nCan also handle `Map` and `Set`.\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// Map object conversion\nconst map = new Map([\n  ['key1', 'value1'],\n  ['key2', 'value2'],\n]);\ntoPairsIn(map);\n// => [['key1', 'value1'], ['key2', 'value2']]\n\n// Set object conversion\nconst set = new Set([1, 2, 3]);\ntoPairsIn(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n#### Parameters\n\n- `object` (`object`): The object, Map, or Set to convert.\n\n#### Returns\n\n(`Array<[string, any]>`): Returns an array of key-value pairs (including inherited properties).\n"
  },
  {
    "path": "docs/reference/compat/object/transform.md",
    "content": "# transform (Lodash Compatibility)\n\n::: warning Use `reduce` or `Object.entries` instead\n\nThis `transform` function operates slowly due to complex internal logic. In most cases, it can be implemented more simply using JavaScript's built-in methods.\n\nUse faster and more modern `reduce` or `Object.entries` instead.\n\n:::\n\nIterates over an array or object, accumulating values in an accumulator to create a new value.\n\n```typescript\nconst result = transform(object, iteratee, accumulator);\n```\n\n## Usage\n\n### `transform(object, iteratee, accumulator)`\n\nUse `transform` when you want to iterate over each element of an array or object, accumulating values in an accumulator. The iteration stops when the `iteratee` function returns `false`.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// Transform an array\nconst numbers = [2, 3, 4];\nconst doubled = transform(\n  numbers,\n  (acc, value) => {\n    acc.push(value * 2);\n  },\n  []\n);\n// Returns: [4, 6, 8]\n\n// Transform an object\nconst obj = { a: 1, b: 2, c: 1 };\nconst grouped = transform(\n  obj,\n  (result, value, key) => {\n    (result[value] || (result[value] = [])).push(key);\n  },\n  {}\n);\n// Returns: { '1': ['a', 'c'], '2': ['b'] }\n```\n\nIf accumulator is omitted, an empty array or empty object is automatically created.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// Empty array is created for arrays\nconst result1 = transform([1, 2, 3], (acc, value) => {\n  acc.push(value * 2);\n});\n// Returns: [2, 4, 6]\n\n// Empty object is created for objects\nconst result2 = transform({ a: 1, b: 2 }, (acc, value, key) => {\n  acc[key] = value * 2;\n});\n// Returns: { a: 2, b: 4 }\n```\n\nYou can stop the iteration by returning `false` in the `iteratee` function.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nconst result = transform(\n  numbers,\n  (acc, value) => {\n    if (value > 3) {\n      return false; // Stop iteration\n    }\n    acc.push(value * 2);\n  },\n  []\n);\n// Returns: [2, 4, 6] (4 and 5 are not processed)\n```\n\nIf the `iteratee` function is omitted, it returns an empty object or array.\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3];\nconst copy1 = transform(array);\n// Returns: []\n\nconst obj = { a: 1, b: 2 };\nconst copy2 = transform(obj);\n// Returns: {}\n```\n\n#### Parameters\n\n- `object` (`readonly T[] | T`, optional): The array or object to iterate over.\n- `iteratee` (`(accumulator: U, value: T | T[keyof T], key: any, object: readonly T[] | T) => unknown`, optional): The function to execute for each element. Returning `false` stops the iteration. Default is the `identity` function.\n- `accumulator` (`U`, optional): The initial value. If omitted, an empty array is created for arrays, and an empty object for objects.\n\n#### Returns\n\n(`U | any[] | Record<string, any>`): Returns the accumulated result.\n"
  },
  {
    "path": "docs/reference/compat/object/unset.md",
    "content": "# unset (Lodash Compatibility)\n\n::: warning Use the `delete` operator instead\n\nThis `unset` function operates slowly due to complex path parsing and nested object handling.\n\nUse the faster and more modern `delete` operator directly instead.\n\n:::\n\nRemoves the property at the specified path of the object.\n\n```typescript\nconst success = unset(obj, path);\n```\n\n## Usage\n\n### `unset(obj, path)`\n\nUse `unset` when you want to delete a property at a specific path in a nested object. The path can be specified as a string or array.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\n// Remove nested property with string path\nconst obj = { a: { b: { c: 42 } } };\nunset(obj, 'a.b.c'); // => true\nconsole.log(obj); // { a: { b: {} } }\n\n// Remove nested property with array path\nconst obj2 = { a: { b: { c: 42 } } };\nunset(obj2, ['a', 'b', 'c']); // => true\nconsole.log(obj2); // { a: { b: {} } }\n```\n\nYou can also remove elements by array index.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst arr = [1, 2, 3, 4];\nunset(arr, 1); // => true\nconsole.log(arr); // [1, undefined, 3, 4] (element is deleted and becomes undefined)\n```\n\nReturns `true` even if the property doesn't exist or is already deleted.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst obj = { a: { b: 1 } };\nunset(obj, 'a.c'); // => true (non-existent property)\n```\n\n`null` or `undefined` objects are handled safely.\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nunset(null, 'a.b'); // => true\nunset(undefined, 'a.b'); // => true\n```\n\n#### Parameters\n\n- `obj` (`any`): The object to modify.\n- `path` (`PropertyKey | PropertyKey[]`): The path of the property to remove.\n\n#### Returns\n\n(`boolean`): Returns `true` if the property is deleted, otherwise returns `false`.\n"
  },
  {
    "path": "docs/reference/compat/object/update.md",
    "content": "# update (Lodash Compatibility)\n\n::: warning Use direct assignment instead\n\nThis `update` function operates slowly due to complex path parsing and nested object creation logic.\n\nUse faster and more modern direct property assignment or optional chaining instead.\n\n:::\n\nUpdates the value at the specified path of the object with an updater function.\n\n```typescript\nconst updated = update(obj, path, updater);\n```\n\n## Usage\n\n### `update(obj, path, updater)`\n\nUse `update` when you want to transform a value at a specific path in a nested object with a function. If the path doesn't exist, it will be created automatically.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// Transform nested property value\nconst object = { a: [{ b: { c: 3 } }] };\nupdate(object, 'a[0].b.c', n => (n as number) * 2);\n// => { a: [{ b: { c: 6 } }] }\n\n// Update with array path\nupdate(object, ['a', 0, 'b', 'c'], n => (n as number) + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\nIf the path doesn't exist, the necessary nested structure is created automatically.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// Create nested structure in empty object\nupdate({}, 'a.b.c', () => 'hello');\n// => { a: { b: { c: 'hello' } } }\n\n// Arrays are also created automatically\nupdate({}, 'a.b[0]', () => 'value');\n// => { a: { b: ['value'] } }\n```\n\nYou can calculate new values based on existing values.\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\nconst stats = { score: 100 };\nupdate(stats, 'score', score => score * 1.1); // Increase by 10%\n// => { score: 110 }\n```\n\n#### Parameters\n\n- `obj` (`object`): The object to modify.\n- `path` (`PropertyKey | PropertyKey[]`): The path of the property to update. Can be specified as a string or array.\n- `updater` (`(value: any) => any`): A function that receives the existing value and returns the new value.\n\n#### Returns\n\n(`any`): Returns the modified object.\n"
  },
  {
    "path": "docs/reference/compat/object/updateWith.md",
    "content": "# updateWith (Lodash Compatibility)\n\n::: warning Use direct assignment instead\n\nThis `updateWith` function operates slowly due to complex path parsing and customizer handling.\n\nUse faster and more modern direct property assignment or optional chaining instead.\n\n:::\n\nUpdates the value at the specified path of the object with an updater function, while controlling path creation with a customizer.\n\n```typescript\nconst updated = updateWith(obj, path, updater, customizer);\n```\n\n## Usage\n\n### `updateWith(obj, path, updater, customizer?)`\n\nSimilar to `update`, but you can control the shape of intermediate objects created when the path doesn't exist using a customizer function.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\n// Basic behavior (same as update)\nconst object = { a: [{ b: { c: 3 } }] };\nupdateWith(object, 'a[0].b.c', n => n * n);\n// => { a: [{ b: { c: 9 } }] }\n\n// Update with array path\nupdateWith(object, ['a', 0, 'b', 'c'], n => n + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\nYou can control the shape of intermediate objects created using a customizer.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = {};\n\n// Use Object constructor as customizer (creates objects instead of arrays)\nupdateWith(object, '[0][1]', () => 'a', Object);\n// => { '0': { '1': 'a' } }\n// (default behavior would be { '0': ['a'] })\n```\n\nThe customizer receives the value to create, key, and object as arguments.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst customizer = (value: any, key: string, object: any) => {\n  // Create objects instead of arrays for numeric keys\n  if (!isNaN(Number(key))) {\n    return {};\n  }\n};\n\nconst result = {};\nupdateWith(result, '[0][1]', () => 'value', customizer);\n// => { '0': { '1': 'value' } }\n```\n\nThe customizer is not called if the path already exists.\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = { a: { b: 1 } };\nupdateWith(\n  object,\n  'a.b',\n  n => n * 2,\n  () => {\n    console.log('Not called'); // Not called\n    return {};\n  }\n);\n// => { a: { b: 2 } }\n```\n\n#### Parameters\n\n- `obj` (`T`): The object to modify.\n- `path` (`PropertyKey | readonly PropertyKey[]`): The path of the property to update. Can be specified as a string or array.\n- `updater` (`(oldValue: any) => any`): A function that receives the existing value and returns the new value.\n- `customizer` (`(value: any, key: string, object: T) => any`, optional): A function that returns the intermediate object to be created when the path doesn't exist. Returns `undefined` to use default behavior.\n\n#### Returns\n\n(`T`): Returns the modified object.\n"
  },
  {
    "path": "docs/reference/compat/object/values.md",
    "content": "# values (Lodash Compatibility)\n\n::: warning Use `Object.values` instead\n\nThis `values` function simply calls `Object.values` with unnecessary overhead.\n\nUse the faster and more modern `Object.values()` directly instead.\n\n:::\n\nReturns an array of the object's own enumerable property values.\n\n```typescript\nconst valueArray = values(obj);\n```\n\n## Usage\n\n### `values(obj)`\n\nUse `values` when you want to get all property values of an object as an array. It works the same as `Object.values` but safely handles `null` or `undefined`.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// Get object values\nconst obj = { a: 1, b: 2, c: 3 };\nvalues(obj); // => [1, 2, 3]\n\n// Object with numeric keys\nconst numberKeyObj = { 0: 'a', 1: 'b', 2: 'c' };\nvalues(numberKeyObj); // => ['a', 'b', 'c']\n```\n\nCan also handle arrays or array-like objects.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// Array\nvalues([1, 2, 3]); // => [1, 2, 3]\n\n// String (array-like object)\nvalues('hello'); // => ['h', 'e', 'l', 'l', 'o']\n```\n\n`null` or `undefined` are treated as empty arrays.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nvalues(null); // => []\nvalues(undefined); // => []\n```\n\nOnly enumerable properties are returned.\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nconst obj = Object.create(\n  { inherited: 'not included' },\n  {\n    own: { value: 'included', enumerable: true },\n    nonEnum: { value: 'not included', enumerable: false },\n  }\n);\n\nvalues(obj); // => ['included']\n```\n\n#### Parameters\n\n- `obj` (`Record<PropertyKey, T> | ArrayLike<T> | null | undefined`): The object to get property values from.\n\n#### Returns\n\n(`T[]`): Returns an array of the object's enumerable property values.\n"
  },
  {
    "path": "docs/reference/compat/object/valuesIn.md",
    "content": "# valuesIn (Lodash Compatibility)\n\n::: warning Use `Object.values` instead\n\nThis `valuesIn` function operates slowly due to complex logic for processing prototype properties.\n\nUse the faster and more modern `Object.values` instead.\n\n:::\n\nReturns an array of all property values from the object, including inherited prototype properties.\n\n```typescript\nconst values = valuesIn(obj);\n```\n\n## Usage\n\n### `valuesIn(object)`\n\nUse `valuesIn` when you want to get all property values as an array from an object. Unlike regular `Object.values`, it also includes values of properties inherited from the prototype chain.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nvaluesIn(obj); // [1, 2, 3]\n\n// Also handles arrays\nvaluesIn([1, 2, 3]); // [1, 2, 3]\n```\n\nIncludes properties inherited from the prototype.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.inherited = 'fromParent';\n\nfunction Child() {\n  Parent.call(this);\n  this.b = 2;\n}\nChild.prototype = Object.create(Parent.prototype);\nChild.prototype.childProp = 'childValue';\n\nconst obj = new Child();\nvaluesIn(obj); // [1, 2, 'childValue', 'fromParent'] (constructor excluded)\n```\n\nHandles `null` or `undefined` as empty arrays.\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nvaluesIn(null); // []\nvaluesIn(undefined); // []\n```\n\n#### Parameters\n\n- `object` (`any`): The object to query for values.\n\n#### Returns\n\n(`any[]`): Returns an array containing all property values from the object. Includes values of inherited prototype properties.\n"
  },
  {
    "path": "docs/reference/compat/predicate/conforms.md",
    "content": "# conforms (Lodash Compatibility)\n\nCreates a function that checks if an object satisfies all the conditions defined in the given predicate object.\n\n```typescript\nconst checker = conforms(predicates);\n```\n\n## Usage\n\n### `conforms(source)`\n\nUse `conforms` when you need to check multiple properties against their respective conditions at once. This function generates a validation function that's useful for testing multiple objects later.\n\n```typescript\nimport { conforms } from 'es-toolkit/compat';\n\n// Define condition functions\nconst isPositive = n => n > 0;\nconst isEven = n => n % 2 === 0;\nconst isString = s => typeof s === 'string';\n\n// Create a validator with multiple conditions\nconst validator = conforms({\n  a: isPositive,\n  b: isEven,\n  c: isString,\n});\n\n// Validate objects\nvalidator({ a: 2, b: 4, c: 'hello' }); // true (all conditions met)\nvalidator({ a: -1, b: 4, c: 'hello' }); // false (a is not positive)\nvalidator({ a: 2, b: 3, c: 'hello' }); // false (b is not even)\nvalidator({ a: 2, b: 4, c: 123 }); // false (c is not a string)\n\n// Use in array filtering\nconst users = [\n  { age: 25, score: 80, name: 'Alice' },\n  { age: 17, score: 95, name: 'Bob' },\n  { age: 30, score: 75, name: 'Charlie' },\n];\n\nconst adultHighScorer = conforms({\n  age: n => n >= 18,\n  score: n => n >= 80,\n});\n\nconst filteredUsers = users.filter(adultHighScorer);\n// [{ age: 25, score: 80, name: 'Alice' }]\n```\n\n#### Parameters\n\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): An object containing predicate functions for each property.\n\n#### Returns\n\n(`(object: Record<PropertyKey, any>) => boolean`): Returns a function that checks if a given object satisfies all the conditions.\n"
  },
  {
    "path": "docs/reference/compat/predicate/conformsTo.md",
    "content": "# conformsTo (Lodash Compatibility)\n\nChecks if an object satisfies all given condition functions.\n\n```typescript\nconst result = conformsTo(target, source);\n```\n\n## Usage\n\n### `conformsTo(target, source)`\n\nUse `conformsTo` when you need to check if an object's properties satisfy all specified conditions. It applies each condition function to the corresponding property to check the results.\n\n```typescript\nimport { conformsTo } from 'es-toolkit/compat';\n\n// Basic usage\nconst object = { a: 1, b: 2 };\nconst conditions = {\n  a: n => n > 0,\n  b: n => n > 1,\n};\n\nconformsTo(object, conditions); // true (all conditions satisfied)\n\n// Various conditions\nconst user = { name: 'Alice', age: 25, active: true };\nconst userValidation = {\n  name: s => typeof s === 'string' && s.length > 0,\n  age: n => typeof n === 'number' && n >= 18,\n  active: b => typeof b === 'boolean',\n};\n\nconformsTo(user, userValidation); // true\n\n// When conditions are not satisfied\nconst invalidUser = { name: '', age: 15, active: 'yes' };\nconformsTo(invalidUser, userValidation); // false\n\n// Partial condition checking\nconst partialConditions = {\n  age: n => n >= 21,\n};\nconformsTo(user, partialConditions); // true (only checks age)\n\n// When property is missing\nconst incompleteObject = { a: 1 }; // no b property\nconst strictConditions = {\n  a: n => n > 0,\n  b: n => n > 0,\n};\nconformsTo(incompleteObject, strictConditions); // false (b property is missing)\n```\n\n#### Parameters\n\n- `target` (`Record<PropertyKey, any>`): The object to inspect.\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): An object with condition functions for each property.\n\n#### Returns\n\n(`boolean`): Returns `true` if the object satisfies all conditions, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isArguments.md",
    "content": "# isArguments (Lodash Compatibility)\n\nChecks if a value is an arguments object.\n\n```typescript\nconst result = isArguments(value);\n```\n\n## Usage\n\n### `isArguments(value)`\n\nUse `isArguments` when you need to check if a given value is a function's arguments object. This function also works as a type guard in TypeScript, narrowing the type of the value to `IArguments`.\n\n```typescript\nimport { isArguments } from 'es-toolkit/compat';\n\n// In regular functions\nfunction normalFunction() {\n  return isArguments(arguments); // true\n}\n\n// In strict mode\nfunction strictFunction() {\n  'use strict';\n  return isArguments(arguments); // true\n}\n\n// Non-arguments values\nisArguments([1, 2, 3]); // false\nisArguments({ 0: 'a', 1: 'b', length: 2 }); // false\nisArguments(null); // false\nisArguments(undefined); // false\n\n// Practical usage example\nfunction example() {\n  if (isArguments(arguments)) {\n    console.log('This is an arguments object');\n    console.log('Length:', arguments.length);\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is an arguments object, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isArray.md",
    "content": "# isArray (Lodash Compatibility)\n\n::: warning Use `Array.isArray`\n\nThis `isArray` function operates slowly due to additional function calls.\n\nInstead, use the faster and modern `Array.isArray`.\n\n:::\n\nChecks if a value is an array.\n\n```typescript\nconst result = isArray(value);\n```\n\n## Usage\n\n### `isArray(value)`\n\nUse `isArray` when you want to check if a value is an array. This function also works as a type guard in TypeScript.\n\n```typescript\nimport { isArray } from 'es-toolkit/compat';\n\n// Array check\nisArray([1, 2, 3]);\n// Returns: true\n\nisArray('abc');\n// Returns: false\n\nisArray(() => {});\n// Returns: false\n\n// Distinguish from objects\nisArray({ 0: 'a', 1: 'b', length: 2 });\n// Returns: false\n\nisArray(null);\n// Returns: false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an array.\n\n#### Returns\n\n(`value is any[]`): Returns `true` if the value is an array, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer (Lodash Compatibility)\n\n::: warning Use es-toolkit's [isArrayBuffer](../../predicate/isArrayBuffer.md)\n\nThis `isArrayBuffer` function operates slowly due to complex handling for Lodash compatibility.\n\nInstead, use the faster and modern [isArrayBuffer](../../predicate/isArrayBuffer.md) from `es-toolkit`.\n\n:::\n\nChecks if a value is an ArrayBuffer.\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## Usage\n\n### `isArrayBuffer(value)`\n\nUse `isArrayBuffer` when you want to type-safely check if a value is an ArrayBuffer. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/compat';\n\n// ArrayBuffer check\nconst buffer = new ArrayBuffer(16);\nisArrayBuffer(buffer); // true\n\n// Other types return false\nisArrayBuffer(new Array()); // false\nisArrayBuffer(new Map()); // false\nisArrayBuffer({}); // false\nisArrayBuffer('hello'); // false\nisArrayBuffer(123); // false\nisArrayBuffer(null); // false\nisArrayBuffer(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an ArrayBuffer.\n\n#### Returns\n\n(`value is ArrayBuffer`): Returns `true` if the value is an ArrayBuffer, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isArrayLike.md",
    "content": "# isArrayLike (Lodash Compatibility)\n\nChecks if a value is an array-like object.\n\n```typescript\nconst result = isArrayLike(value);\n```\n\n## Usage\n\n### `isArrayLike(value)`\n\nUse `isArrayLike` when you need to check if a given value is an array-like object. Arrays, strings, arguments objects, and NodeLists are all considered array-like objects.\n\n```typescript\nimport { isArrayLike } from 'es-toolkit/compat';\n\n// Arrays and strings\nisArrayLike([1, 2, 3]); // true\nisArrayLike('abc'); // true\nisArrayLike(''); // true\n\n// Array-like objects\nisArrayLike({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLike({ length: 0 }); // true\n\n// arguments object\nfunction example() {\n  return isArrayLike(arguments); // true\n}\n\n// Non-array-like values\nisArrayLike({}); // false\nisArrayLike({ length: 'invalid' }); // false\nisArrayLike(null); // false\nisArrayLike(undefined); // false\nisArrayLike(() => {}); // false\nisArrayLike(123); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is an array-like object, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isArrayLikeObject.md",
    "content": "# isArrayLikeObject (Lodash Compatibility)\n\nChecks if a value is an array-like object that is not a primitive.\n\n```typescript\nconst result = isArrayLikeObject(value);\n```\n\n## Usage\n\n### `isArrayLikeObject(value)`\n\nUse `isArrayLikeObject` when you need to check if a given value is an array-like object that is not a primitive. This includes arrays, arguments objects, NodeLists, etc., but excludes strings since they are primitive values.\n\n```typescript\nimport { isArrayLikeObject } from 'es-toolkit/compat';\n\n// Array-like objects (not primitives)\nisArrayLikeObject([1, 2, 3]); // true\nisArrayLikeObject({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLikeObject({ length: 0 }); // true\n\n// arguments object\nfunction example() {\n  return isArrayLikeObject(arguments); // true\n}\n\n// NodeList or HTMLCollection (in browsers)\nisArrayLikeObject(document.querySelectorAll('div')); // true\n\n// Primitives are false (including strings)\nisArrayLikeObject('abc'); // false\nisArrayLikeObject(''); // false\nisArrayLikeObject(123); // false\nisArrayLikeObject(true); // false\n\n// Other objects\nisArrayLikeObject({}); // false\nisArrayLikeObject(null); // false\nisArrayLikeObject(undefined); // false\nisArrayLikeObject(() => {}); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is an array-like object that is not a primitive, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isBoolean.md",
    "content": "# isBoolean (Lodash Compatibility)\n\n::: warning Use `typeof` operator\n\nThis `isBoolean` function is complex due to handling Boolean object wrappers.\n\nInstead, use the simpler and modern `typeof value === 'boolean'`.\n\n:::\n\nChecks if a value is of boolean type.\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## Usage\n\n### `isBoolean(value)`\n\nUse `isBoolean` when you want to type-safely check if a value is of boolean type. It checks both primitive boolean values and Boolean object wrappers. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/compat';\n\n// Primitive boolean values\nisBoolean(true); // true\nisBoolean(false); // true\n\n// Boolean object wrappers\nisBoolean(new Boolean(true)); // true\nisBoolean(new Boolean(false)); // true\n\n// Other types return false\nisBoolean(0); // false\nisBoolean(1); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\nisBoolean(null); // false\nisBoolean(undefined); // false\nisBoolean({}); // false\nisBoolean([]); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's of boolean type.\n\n#### Returns\n\n(`value is boolean`): Returns `true` if the value is of boolean type, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isBuffer.md",
    "content": "# isBuffer (Lodash Compatibility)\n\n::: warning Use es-toolkit's [isBuffer](../../predicate/isBuffer.md) instead\nThis `isBuffer` function operates slowly due to complex processing for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isBuffer](../../predicate/isBuffer.md) instead.\n:::\n\nChecks if a value is a Buffer instance.\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## Usage\n\n### `isBuffer(value)`\n\nUse `isBuffer` when you want to type-safely check if a value is a Buffer instance. It's useful when working with Buffer objects in Node.js environments. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/compat';\n\n// Check Buffer instance\nconst buffer = Buffer.from('hello');\nisBuffer(buffer); // true\n\n// Other types return false\nisBuffer('hello'); // false\nisBuffer([1, 2, 3]); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer({}); // false\nisBuffer(null); // false\nisBuffer(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Buffer instance.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a Buffer instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isDate.md",
    "content": "# isDate (Lodash Compatibility)\n\n::: warning Use es-toolkit's [isDate](../../predicate/isDate.md) instead\nThis `isDate` function operates slowly due to complex processing for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isDate](../../predicate/isDate.md) instead.\n:::\n\nChecks if a value is a Date object.\n\n```typescript\nconst result = isDate(value);\n```\n\n## Usage\n\n### `isDate(value)`\n\nUse `isDate` when you want to type-safely check if a value is a Date object. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isDate } from 'es-toolkit/compat';\n\n// Check Date object\nconst date = new Date();\nisDate(date); // true\n\n// Invalid Date is also recognized as a Date object\nconst invalidDate = new Date('invalid');\nisDate(invalidDate); // true\n\n// Other types return false\nisDate('2024-01-01'); // false\nisDate(1640995200000); // false\nisDate({}); // false\nisDate(null); // false\nisDate(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Date object.\n\n#### Returns\n\n(`value is Date`): Returns `true` if the value is a Date object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isElement.md",
    "content": "# isElement (Lodash Compatibility)\n\n::: warning Use `instanceof HTMLElement`\n\nThis `isElement` function performs structural checks which can be inaccurate and slow.\n\nInstead, use the more accurate and modern `instanceof HTMLElement` or `element.nodeType === 1` checks.\n\n:::\n\nChecks if a value is a DOM element.\n\n```typescript\nconst result = isElement(value);\n```\n\n## Usage\n\n### `isElement(value)`\n\nUse `isElement` when you need to check if a given value is a DOM element. This function performs structural checks, so the results may not be completely accurate.\n\n```typescript\nimport { isElement } from 'es-toolkit/compat';\n\n// DOM elements\nisElement(document.body); // true\nisElement(document.createElement('div')); // true\nisElement(document.querySelector('p')); // true (if element exists)\n\n// Non-DOM element values\nisElement('<body>'); // false\nisElement({}); // false\nisElement(null); // false\nisElement(undefined); // false\n\n// Text nodes or other node types\nisElement(document.createTextNode('text')); // false\nisElement(document.createComment('comment')); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value appears to be a DOM element, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isEmpty.md",
    "content": "# isEmpty (Lodash Compatibility)\n\nChecks if a given value is empty.\n\n```typescript\nconst result = isEmpty(value);\n```\n\n## Usage\n\n### `isEmpty(value)`\n\nUse `isEmpty` when you want to check if various types of values are empty. It can handle strings, arrays, objects, Maps, Sets, and more.\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\n// String checks\nisEmpty(''); // true\nisEmpty('hello'); // false\n\n// Array checks\nisEmpty([]); // true\nisEmpty([1, 2, 3]); // false\n\n// Object checks\nisEmpty({}); // true\nisEmpty({ a: 1 }); // false\n\n// Map and Set checks\nisEmpty(new Map()); // true\nisEmpty(new Set()); // true\nisEmpty(new Map([['key', 'value']])); // false\nisEmpty(new Set([1, 2, 3])); // false\n\n// null and undefined\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(); // true\n\n// Array-like objects\nisEmpty({ 0: 'a', length: 1 }); // false\nisEmpty({ length: 0 }); // false\n```\n\nAll primitive values are treated as empty:\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\nisEmpty(0); // true\nisEmpty(false); // true\nisEmpty(123); // true\nisEmpty('text'); // false (strings are judged by length)\n```\n\n#### Parameters\n\n- `value` (`unknown`, optional): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is empty, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isEqual.md",
    "content": "# isEqual (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isEqual](../../predicate/isEqual.md)\n\nThis `isEqual` function operates slowly due to complex handling for Lodash compatibility.\n\nInstead, use the faster and modern [isEqual](../../predicate/isEqual.md) from `es-toolkit`.\n\n:::\n\nPerforms a deep comparison between two values to determine if they are equal.\n\n```typescript\nconst result = isEqual(value1, value2);\n```\n\n## Usage\n\n### `isEqual(a, b)`\n\nUse `isEqual` when you want to perform a deep comparison between two values. It compares complex types like Date, RegExp, objects, and arrays by their content.\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\n// Basic type comparison\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// Object deep comparison\nisEqual({ a: 1, b: 2 }, { a: 1, b: 2 }); // true\nisEqual({ a: 1, b: 2 }, { b: 2, a: 1 }); // true\nisEqual({ a: 1 }, { a: 1, b: undefined }); // false\n\n// Array deep comparison\nisEqual([1, 2, 3], [1, 2, 3]); // true\nisEqual([1, [2, 3]], [1, [2, 3]]); // true\n\n// Date object comparison\nisEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\nisEqual(new Date('2020-01-01'), new Date('2020-01-02')); // false\n\n// RegExp object comparison\nisEqual(/abc/g, /abc/g); // true\nisEqual(/abc/g, /abc/i); // false\n```\n\nIt also recursively compares nested objects and arrays.\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\nconst obj1 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nconst obj2 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nisEqual(obj1, obj2); // true\n```\n\n#### Parameters\n\n- `a` (`unknown`): The first value to compare.\n- `b` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the values are equal, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isEqualWith.md",
    "content": "# isEqualWith (Lodash Compatibility)\n\n::: warning Use es-toolkit's [isEqualWith](../../predicate/isEqualWith.md) instead\nThis `isEqualWith` function operates slowly due to complex processing for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isEqualWith](../../predicate/isEqualWith.md) instead.\n:::\n\nChecks if two values are equal using a custom comparison function.\n\n```typescript\nconst result = isEqualWith(a, b, customizer);\n```\n\n## Usage\n\n### `isEqualWith(a, b, areValuesEqual?)`\n\nDeeply compares two values using a custom comparison function. If the custom function returns a boolean value, that result is used. If it returns `undefined`, the default equality comparison is used.\n\nThe custom comparison function is also used when comparing values inside complex structures like objects, arrays, Map, Set, etc., ensuring deep comparison.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\n// Case-insensitive string comparison\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', customizer); // true\nisEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n\n// Compare numbers by absolute value\nconst absCustomizer = (a: any, b: any) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a) === Math.abs(b);\n  }\n};\n\nisEqualWith([-1, 2], [1, -2], absCustomizer); // true\n\n// Complex object comparison\nconst obj1 = {\n  name: 'JOHN',\n  details: { age: 30, city: 'NYC' },\n};\nconst obj2 = {\n  name: 'john',\n  details: { age: 30, city: 'nyc' },\n};\n\nisEqualWith(obj1, obj2, customizer); // true\n```\n\nSpecial handling for Map and Set:\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nconst map1 = new Map([['KEY', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqualWith(map1, map2, customizer); // true\n\nconst set1 = new Set(['HELLO']);\nconst set2 = new Set(['hello']);\nisEqualWith(set1, set2, customizer); // true\n```\n\n#### Parameters\n\n- `a` (`any`): The first value to compare.\n- `b` (`any`): The second value to compare.\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): The custom comparison function.\n  - `x`: Value from the first object `a`\n  - `y`: Value from the second object `b`\n  - `property`: The property key used to get `x` and `y`\n  - `xParent`: The parent object of the first value `x`\n  - `yParent`: The parent object of the second value `y`\n  - `stack`: Internal stack (Map) for handling circular references\n\n#### Returns\n\n(`boolean`): Returns `true` if the values are equal according to the custom function, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isError.md",
    "content": "# isError (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isError](../../predicate/isError.md) instead\nThis `isError` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isError](../../predicate/isError.md) instead.\n:::\n\nChecks if a value is an Error object.\n\n```typescript\nconst result = isError(value);\n```\n\n## Usage\n\n### `isError(value)`\n\nUse `isError` when you want to type-safely check if a value is an Error object. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isError } from 'es-toolkit/compat';\n\n// Error object checking\nisError(new Error()); // true\nisError(new TypeError('Type error')); // true\nisError(new ReferenceError('Reference error')); // true\n\n// Custom errors that inherit from Error\nclass CustomError extends Error {}\nisError(new CustomError()); // true\n\n// Other types return false\nisError('Error'); // false\nisError({ name: 'Error', message: 'Something went wrong' }); // false\nisError({}); // false\nisError(null); // false\nisError(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an Error object.\n\n#### Returns\n\n(`value is Error`): Returns `true` if the value is an Error object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isFinite.md",
    "content": "# isFinite (Lodash Compatibility)\n\n::: warning Use `Number.isFinite`\n\nThis `isFinite` function operates slowly due to additional type checking overhead.\n\nInstead, use the faster and modern `Number.isFinite`.\n\n:::\n\nChecks if a value is a finite number.\n\n```typescript\nconst result = isFinite(value);\n```\n\n## Usage\n\n### `isFinite(value)`\n\nUse `isFinite` when you need to check if a given value is a finite number. This function also works as a type guard in TypeScript, narrowing the type of the value to `number`.\n\n```typescript\nimport { isFinite } from 'es-toolkit/compat';\n\n// Finite numbers\nisFinite(100); // true\nisFinite(-50); // true\nisFinite(3.14); // true\nisFinite(0); // true\n\n// Infinity is false\nisFinite(Infinity); // false\nisFinite(-Infinity); // false\n\n// NaN is also false\nisFinite(NaN); // false\n\n// Other types are also false\nisFinite('100'); // false\nisFinite([]); // false\nisFinite({}); // false\nisFinite(null); // false\nisFinite(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`value is number`): Returns `true` if the value is a finite number, otherwise `false`.  \nWhen `true`, TypeScript narrows the type of `value` to `number`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isFunction.md",
    "content": "# isFunction (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isFunction](../../predicate/isFunction.md) instead\nThis `isFunction` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isFunction](../../predicate/isFunction.md) instead.\n:::\n\nChecks if a value is a function.\n\n```typescript\nconst result = isFunction(value);\n```\n\n## Usage\n\n### `isFunction(value)`\n\nUse `isFunction` when you want to type-safely check if a value is a function. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isFunction } from 'es-toolkit/compat';\n\n// Regular functions\nisFunction(function () {}); // true\nisFunction(() => {}); // true\n\n// Built-in functions and constructors\nisFunction(Array.prototype.slice); // true\nisFunction(Proxy); // true\nisFunction(Int8Array); // true\n\n// Async functions and generator functions\nisFunction(async function () {}); // true\nisFunction(function* () {}); // true\n\n// Other types return false\nisFunction('function'); // false\nisFunction({}); // false\nisFunction([]); // false\nisFunction(null); // false\nisFunction(undefined); // false\nisFunction(123); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a function.\n\n#### Returns\n\n(`value is (...args: any[]) => any`): Returns `true` if the value is a function, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isInteger.md",
    "content": "# isInteger (Lodash Compatibility)\n\n::: warning Use `Number.isInteger`\n\nThis `isInteger` function operates slowly due to additional type checking overhead.\n\nInstead, use the faster and modern `Number.isInteger`.\n\n:::\n\nChecks if a value is an integer.\n\n```typescript\nconst result = isInteger(value);\n```\n\n## Usage\n\n### `isInteger(value)`\n\nUse `isInteger` when you need to check if a given value is an integer. This function also works as a type guard in TypeScript, narrowing the type of the value to `number`.\n\n```typescript\nimport { isInteger } from 'es-toolkit/compat';\n\n// Integer value checks\nisInteger(3); // true\nisInteger(-5); // true\nisInteger(0); // true\n\n// Decimal values are false\nisInteger(3.14); // false\nisInteger(-2.5); // false\n\n// Infinity is false\nisInteger(Infinity); // false\nisInteger(-Infinity); // false\n\n// Other types are also false\nisInteger('3'); // false\nisInteger([]); // false\nisInteger({}); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is an integer, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isLength.md",
    "content": "# isLength (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isLength](../../predicate/isLength.md) instead\nThis `isLength` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isLength](../../predicate/isLength.md) instead.\n:::\n\nChecks if a value is a valid length.\n\n```typescript\nconst result = isLength(value);\n```\n\n## Usage\n\n### `isLength(value)`\n\nUse `isLength` when you want to check if a value is a valid length. A valid length is a number type, non-negative integer, and below JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`). It also works as a type guard in TypeScript.\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\n// Valid lengths\nisLength(0); // true\nisLength(42); // true\nisLength(100); // true\nisLength(Number.MAX_SAFE_INTEGER); // true\n\n// Invalid lengths\nisLength(-1); // false (negative)\nisLength(1.5); // false (not an integer)\nisLength(Number.MAX_SAFE_INTEGER + 1); // false (exceeds safe range)\nisLength('3'); // false (string)\nisLength(null); // false\nisLength(undefined); // false\nisLength({}); // false\nisLength([]); // false\n```\n\nIt's useful for validating the length property of arrays or strings.\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\nfunction validateArrayLength(arr: any[]) {\n  if (isLength(arr.length)) {\n    console.log(`Array length ${arr.length} is valid`);\n    return true;\n  }\n  return false;\n}\n\nvalidateArrayLength([1, 2, 3]); // \"Array length 3 is valid\"\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check if it's a valid length.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a valid length, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isMap.md",
    "content": "# isMap (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isMap](../../predicate/isMap.md) instead\n\nThis `isMap` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isMap](../../predicate/isMap.md) instead.\n\n:::\n\nChecks if a value is a Map.\n\n```typescript\nconst result = isMap(value);\n```\n\n## Usage\n\n### `isMap(value)`\n\nUse `isMap` when you want to type-safely check if a value is a Map. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map checking\nconst map = new Map();\nisMap(map); // true\n\n// Other types return false\nisMap(new Set()); // false\nisMap(new WeakMap()); // false\nisMap({}); // false\nisMap([]); // false\nisMap('map'); // false\nisMap(123); // false\nisMap(null); // false\nisMap(undefined); // false\n```\n\nIt also distinguishes from other similar collections.\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map vs Set vs WeakMap\nisMap(new Map([['key', 'value']])); // true\nisMap(new Set(['value'])); // false\nisMap(new WeakMap()); // false\n\n// Map vs regular objects\nisMap({}); // false\nisMap({ key: 'value' }); // false\nisMap(Object.create(null)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Map.\n\n#### Returns\n\n(`value is Map<any, any>`): Returns `true` if the value is a Map, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isMatch.md",
    "content": "# isMatch (Lodash Compatibility)\n\nChecks if an object partially matches another object's shape and values.\n\n```typescript\nconst result = isMatch(target, source);\n```\n\n## Usage\n\n### `isMatch(target, source)`\n\nUse `isMatch` when you need to check if an object or array partially matches another object's structure and values. They don't need to be completely identical - all properties of source must exist in target with the same values.\n\n```typescript\nimport { isMatch } from 'es-toolkit/compat';\n\n// Object partial matching\nisMatch({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }); // true (a, b match)\nisMatch({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 }); // false (c is not in target)\n\n// Nested objects\nisMatch({ user: { name: 'Alice', age: 25, city: 'Seoul' } }, { user: { name: 'Alice', age: 25 } }); // true\n\n// Array partial matching (order independent)\nisMatch([1, 2, 3, 4], [2, 4]); // true (2 and 4 are in the array)\nisMatch([1, 2, 3], [1, 2, 3]); // true (complete match)\nisMatch([1, 2], [1, 2, 3]); // false (3 is not in target)\n\n// Map partial matching\nconst targetMap = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\nconst sourceMap = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nisMatch(targetMap, sourceMap); // true\n\n// Set partial matching\nconst targetSet = new Set([1, 2, 3, 4]);\nconst sourceSet = new Set([2, 4]);\nisMatch(targetSet, sourceSet); // true\n\n// Empty source always returns true\nisMatch({ a: 1 }, {}); // true\nisMatch([1, 2, 3], []); // true\n```\n\nMore direct and faster alternatives:\n\n```typescript\n// Complete equality check (faster)\nimport { isEqual } from 'es-toolkit';\n\nisEqual(obj1, obj2);\n\n// Specific property checks (clearer)\ntarget.a === source.a && target.b === source.b;\n\n// Object structure check\nObject.keys(source).every(key => target[key] === source[key]);\n```\n\n#### Parameters\n\n- `target` (`unknown`): The object to check for matching.\n- `source` (`unknown`): The object serving as the match pattern.\n\n#### Returns\n\n(`boolean`): Returns `true` if target partially matches source's shape and values, else `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isMatchWith.md",
    "content": "# isMatchWith (Lodash Compatibility)\n\nChecks if an object partially matches using a custom comparison function.\n\n```typescript\nconst result = isMatchWith(target, source, customizer);\n```\n\n## Usage\n\n### `isMatchWith(target, source, customizer)`\n\nUse `isMatchWith` when you need custom comparison logic. You have direct control over how each property is compared.\n\n```typescript\nimport { isMatchWith } from 'es-toolkit/compat';\n\n// Case-insensitive string comparison\nconst caseInsensitiveCompare = (objVal, srcVal) => {\n  if (typeof objVal === 'string' && typeof srcVal === 'string') {\n    return objVal.toLowerCase() === srcVal.toLowerCase();\n  }\n  return undefined; // Use default behavior\n};\n\nisMatchWith({ name: 'ALICE', age: 25 }, { name: 'alice' }, caseInsensitiveCompare); // true\n\n// Number range comparison\nconst rangeCompare = (objVal, srcVal, key) => {\n  if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n    return objVal >= srcVal.min && objVal <= srcVal.max;\n  }\n  return undefined;\n};\n\nisMatchWith({ name: 'John', age: 25 }, { age: { min: 18, max: 30 } }, rangeCompare); // true\n\n// Array length comparison\nconst lengthCompare = (objVal, srcVal, key) => {\n  if (key === 'items' && Array.isArray(objVal) && typeof srcVal === 'number') {\n    return objVal.length === srcVal;\n  }\n  return undefined;\n};\n\nisMatchWith({ items: ['a', 'b', 'c'], count: 3 }, { items: 3 }, lengthCompare); // true\n\n// Complex conditional comparison\nconst conditionalCompare = (objVal, srcVal, key, object, source) => {\n  // Apply special logic only to specific keys\n  if (key === 'status') {\n    return srcVal === 'active' || objVal === 'any';\n  }\n\n  // Special handling in nested objects\n  if (typeof srcVal === 'object' && srcVal !== null && objVal?.special) {\n    return srcVal.id === objVal.special;\n  }\n\n  return undefined; // Default behavior\n};\n\nisMatchWith({ user: { special: 123 }, status: 'any' }, { user: { id: 123, status: 'active' } }, conditionalCompare); // true\n```\n\n#### Parameters\n\n- `target` (`unknown`): The object to check for matching.\n- `source` (`unknown`): The object serving as the match pattern.\n- `customizer` (`function`, optional): Function to customize comparison logic. Should return `true`, `false`, or `undefined`.\n\n#### Returns\n\n(`boolean`): Returns `true` if target partially matches source using custom logic, else `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isNaN.md",
    "content": "# isNaN (Lodash Compatibility)\n\n::: warning Use `Number.isNaN`\n\nThis `isNaN` function operates slowly due to additional function calls.\n\nInstead, use the faster and modern `Number.isNaN`.\n\n:::\n\nChecks if a value is `NaN`.\n\n```typescript\nconst result = isNaN(value);\n```\n\n## Usage\n\n### `isNaN(value)`\n\nUse `isNaN` when you want to check if a value is `NaN`.\n\n```typescript\nimport { isNaN } from 'es-toolkit/compat';\n\n// NaN checks\nisNaN(NaN);\n// Returns: true\n\nisNaN(Number.NaN);\n// Returns: true\n\n// Other values\nisNaN(undefined);\n// Returns: false\n\nisNaN(null);\n// Returns: false\n\nisNaN(0);\n// Returns: false\n\nisNaN('NaN');\n// Returns: false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's NaN.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is NaN, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isNative.md",
    "content": "# isNative (Lodash Compatibility)\n\nChecks if a value is a native function of the JavaScript engine.\n\n```typescript\nconst result = isNative(value);\n```\n\n## Usage\n\n### `isNative(value)`\n\nUse `isNative` when you need to check if a given value is a native function implemented in the JavaScript engine. You can distinguish built-in functions provided by browsers or Node.js.\n\n```typescript\nimport { isNative } from 'es-toolkit/compat';\n\n// Native functions\nisNative(Array.prototype.push); // true\nisNative(Object.keys); // true\nisNative(Math.max); // true\nisNative(JSON.parse); // true\nisNative(console.log); // true (in browser/Node.js environment)\n\n// User-defined functions\nisNative(function () {}); // false\nisNative(() => {}); // false\nisNative(function customFunction() {}); // false\n\n// Library functions\nisNative(require('lodash').map); // false\nisNative(require('es-toolkit').chunk); // false\n\n// Non-function values\nisNative({}); // false\nisNative([]); // false\nisNative('function'); // false\nisNative(123); // false\nisNative(null); // false\n\n// Bound functions\nconst boundFunction = Array.prototype.push.bind([]);\nisNative(boundFunction); // true (bound functions are native)\n\n// Methods\nconst obj = { method: Array.prototype.push };\nisNative(obj.method); // true (still a native function)\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value appears to be a native function, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isNil.md",
    "content": "# isNil (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isNil](../../predicate/isNil.md) instead\n\nThis `isNil` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isNil](../../predicate/isNil.md) instead.\n\n:::\n\nChecks if a value is `null` or `undefined`.\n\n```typescript\nconst result = isNil(value);\n```\n\n## Usage\n\n### `isNil(x)`\n\nUse `isNil` when you want to type-safely check if a value is `null` or `undefined`. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// null and undefined return true\nisNil(null); // true\nisNil(undefined); // true\n\n// All other values return false\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil([]); // false\nisNil({}); // false\nisNil('hello'); // false\nisNil(42); // false\n```\n\nIt distinguishes from values that are truthy but not `null` or `undefined`.\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// Values that are falsy but not null/undefined\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil(NaN); // false\n\n// Only null and undefined return true\nisNil(null); // true\nisNil(undefined); // true\n```\n\n#### Parameters\n\n- `x` (`any`): The value to check if it's `null` or `undefined`.\n\n#### Returns\n\n(`x is null | undefined`): Returns `true` if the value is `null` or `undefined`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isNull.md",
    "content": "# isNull (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isNull](../../predicate/isNull.md) instead\n\nThis `isNull` function is a Lodash compatibility function, but has the same implementation as the main library.\n\nUse the faster and more modern `es-toolkit`'s [isNull](../../predicate/isNull.md) instead.\n\n:::\n\nChecks if a value is `null`.\n\n```typescript\nconst result = isNull(value);\n```\n\n## Usage\n\n### `isNull(value)`\n\nUse `isNull` when you want to type-safely check if a value is exactly `null`. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\n// Only null returns true\nisNull(null); // true\n\n// undefined also returns false\nisNull(undefined); // false\n\n// All other values also return false\nisNull(0); // false\nisNull(''); // false\nisNull(false); // false\nisNull([]); // false\nisNull({}); // false\nisNull('null'); // false\nisNull(NaN); // false\n```\n\nYou can distinguish between `null` and `undefined`.\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    console.log('Value is explicitly null');\n  } else if (value === undefined) {\n    console.log('Value is undefined');\n  } else {\n    console.log(`Value exists: ${value}`);\n  }\n}\n\nhandleValue(null); // \"Value is explicitly null\"\nhandleValue(undefined); // \"Value is undefined\"\nhandleValue('hello'); // \"Value exists: hello\"\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check if it's `null`.\n\n#### Returns\n\n(`value is null`): Returns `true` if the value is `null`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isNumber.md",
    "content": "# isNumber (Lodash Compatibility)\n\n::: warning Use `typeof` operator\n\nThis `isNumber` function is complex due to handling Number object wrappers.\n\nInstead, use the simpler and modern `typeof value === 'number'`.\n\n:::\n\nChecks if a value is a number.\n\n```typescript\nconst result = isNumber(value);\n```\n\n## Usage\n\n### `isNumber(value)`\n\nUse `isNumber` when you want to check if a value is a number. This function recognizes both primitive numbers and Number objects as numbers.\n\n```typescript\nimport { isNumber } from 'es-toolkit/compat';\n\n// Primitive numbers\nisNumber(123);\n// Returns: true\n\nisNumber(3.14);\n// Returns: true\n\nisNumber(NaN);\n// Returns: true\n\n// Number objects\nisNumber(new Number(42));\n// Returns: true\n\n// Other types\nisNumber('123');\n// Returns: false\n\nisNumber(true);\n// Returns: false\n\nisNumber(null);\n// Returns: false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a number.\n\n#### Returns\n\n(`value is number`): Returns `true` if the value is a number, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isObject.md",
    "content": "# isObject (Lodash Compatibility)\n\nChecks if a value is an object.\n\n```typescript\nconst result = isObject(value);\n```\n\n## Usage\n\n### `isObject(value)`\n\nUse `isObject` when you want to check if a value is an object. In JavaScript, arrays, functions, objects, regular expressions, dates, etc. are all treated as objects.\n\n```typescript\nimport { isObject } from 'es-toolkit/compat';\n\n// Plain objects\nisObject({});\n// Returns: true\n\n// Arrays are also objects\nisObject([1, 2, 3]);\n// Returns: true\n\n// Functions are also objects\nisObject(() => {});\n// Returns: true\n\n// Dates are also objects\nisObject(new Date());\n// Returns: true\n\n// null is not an object\nisObject(null);\n// Returns: false\n\n// Primitive types are not objects\nisObject('string');\n// Returns: false\n\nisObject(123);\n// Returns: false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an object.\n\n#### Returns\n\n(`value is object`): Returns `true` if the value is an object, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isObjectLike.md",
    "content": "# isObjectLike (Lodash Compatibility)\n\nChecks if a value is object-like.\n\n```typescript\nconst result = isObjectLike(value);\n```\n\n## Usage\n\n### `isObjectLike(value)`\n\nUse `isObjectLike` when you need to check if a given value is object-like. An object-like value is a value where the result of the `typeof` operation is `'object'` and is not `null`.\n\n```typescript\nimport { isObjectLike } from 'es-toolkit/compat';\n\n// Object-like values\nisObjectLike({ a: 1 }); // true\nisObjectLike([1, 2, 3]); // true\nisObjectLike(new Date()); // true\nisObjectLike(/regex/); // true\nisObjectLike(new Map()); // true\nisObjectLike(new Set()); // true\n\n// Non object-like values\nisObjectLike('abc'); // false\nisObjectLike(123); // false\nisObjectLike(true); // false\nisObjectLike(() => {}); // false\nisObjectLike(Symbol('sym')); // false\n\n// Special cases\nisObjectLike(null); // false (null has typeof 'object' but is not object-like)\nisObjectLike(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is object-like, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isPlainObject.md",
    "content": "# isPlainObject (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isPlainObject](../../predicate/isPlainObject.md) instead\n\nThis `isPlainObject` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isPlainObject](../../predicate/isPlainObject.md) instead.\n\n:::\n\nChecks if a value is a plain object.\n\n```typescript\nconst result = isPlainObject(object);\n```\n\n## Usage\n\n### `isPlainObject(object)`\n\nUse `isPlainObject` when you want to check if a value is a plain object. A plain object is an object created by the `{}` literal, `new Object()`, or `Object.create(null)`. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// Plain objects\nisPlainObject({}); // true\nisPlainObject(new Object()); // true\nisPlainObject(Object.create(null)); // true\nisPlainObject({ name: 'John', age: 30 }); // true\n\n// Not plain objects\nisPlainObject([]); // false (array)\nisPlainObject(new Date()); // false (Date instance)\nisPlainObject(new Map()); // false (Map instance)\nisPlainObject(new Set()); // false (Set instance)\nisPlainObject(/regex/); // false (regular expression)\nisPlainObject(function () {}); // false (function)\nisPlainObject(null); // false\nisPlainObject(undefined); // false\nisPlainObject('object'); // false (string)\nisPlainObject(42); // false (number)\n```\n\nIt distinguishes between class instances and plain objects.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\nclass Person {\n  name: string;\n  constructor(name: string) {\n    this.name = name;\n  }\n}\n\nconst person = new Person('John');\nconst plainObj = { name: 'John' };\n\nisPlainObject(person); // false (class instance)\nisPlainObject(plainObj); // true (plain object)\n```\n\nIt also correctly handles custom `Symbol.toStringTag` properties.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// Writable Symbol.toStringTag\nconst obj1 = {};\nobj1[Symbol.toStringTag] = 'CustomObject';\nisPlainObject(obj1); // true\n\n// Read-only Symbol.toStringTag (built-in objects)\nconst date = new Date();\nisPlainObject(date); // false\n```\n\n#### Parameters\n\n- `object` (`any`): The value to check if it's a plain object.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a plain object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isRegExp.md",
    "content": "# isRegExp (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isRegExp](../../predicate/isRegExp.md) instead\n\nThis `isRegExp` function is a Lodash compatibility function, but is a simple type check.\n\nUse the faster and more modern `es-toolkit`'s [isRegExp](../../predicate/isRegExp.md) instead.\n\n:::\n\nChecks if a value is a regular expression.\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## Usage\n\n### `isRegExp(value)`\n\nUse `isRegExp` when you want to type-safely check if a value is a regular expression. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// Regular expressions\nisRegExp(/abc/); // true\nisRegExp(new RegExp('abc')); // true\nisRegExp(/[a-z]+/g); // true\nisRegExp(/pattern/gi); // true\n\n// Other types return false\nisRegExp('/abc/'); // false (string)\nisRegExp('pattern'); // false (string)\nisRegExp({}); // false (object)\nisRegExp([]); // false (array)\nisRegExp(null); // false\nisRegExp(undefined); // false\nisRegExp(123); // false (number)\n```\n\nIt distinguishes between regex strings and actual regex objects.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// Regular expression vs regex string\nisRegExp(/test/); // true\nisRegExp('/test/'); // false\nisRegExp('\\\\d+'); // false\nisRegExp('/\\\\d+/g'); // false\n\n// Various regex flags\nisRegExp(/test/i); // true (case insensitive)\nisRegExp(/test/g); // true (global search)\nisRegExp(/test/m); // true (multiline)\nisRegExp(/test/gim); // true (all flags combined)\n```\n\nIt also recognizes dynamically created regular expressions.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// Regex created with RegExp constructor\nconst dynamicRegex = new RegExp('\\\\d{3}-\\\\d{4}', 'g');\nisRegExp(dynamicRegex); // true\n\n// Regex created through strings\nconst pattern = 'hello';\nconst flags = 'gi';\nconst regex = new RegExp(pattern, flags);\nisRegExp(regex); // true\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check if it's a regular expression.\n\n#### Returns\n\n(`value is RegExp`): Returns `true` if the value is a regular expression, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isSafeInteger.md",
    "content": "# isSafeInteger (Lodash Compatibility)\n\n::: warning Use `Number.isSafeInteger`\n\nThis `isSafeInteger` function operates slowly due to additional type checking overhead.\n\nInstead, use the faster and modern `Number.isSafeInteger`.\n\n:::\n\nChecks if a value is a safe integer.\n\n```typescript\nconst result = isSafeInteger(value);\n```\n\n## Usage\n\n### `isSafeInteger(value)`\n\nUse `isSafeInteger` when you need to check if a given value is a safe integer. A safe integer is an integer between -(2^53 - 1) and (2^53 - 1), which can be accurately represented in JavaScript.\n\n```typescript\nimport { isSafeInteger } from 'es-toolkit/compat';\n\n// Safe integers\nisSafeInteger(3); // true\nisSafeInteger(-42); // true\nisSafeInteger(0); // true\nisSafeInteger(Number.MAX_SAFE_INTEGER); // true (9007199254740991)\nisSafeInteger(Number.MIN_SAFE_INTEGER); // true (-9007199254740991)\n\n// Unsafe integers\nisSafeInteger(Number.MAX_SAFE_INTEGER + 1); // false\nisSafeInteger(Number.MIN_SAFE_INTEGER - 1); // false\nisSafeInteger(9007199254740992); // false\n\n// Non-integer values\nisSafeInteger(3.14); // false\nisSafeInteger('3'); // false\nisSafeInteger(1n); // false (BigInt)\nisSafeInteger([]); // false\nisSafeInteger({}); // false\nisSafeInteger(null); // false\nisSafeInteger(undefined); // false\n\n// Infinity and NaN\nisSafeInteger(Infinity); // false\nisSafeInteger(-Infinity); // false\nisSafeInteger(NaN); // false\n```\n\n#### Parameters\n\n- `value` (`any`): The value to check.\n\n#### Returns\n\n(`value is number`) Returns `true` if the value is a safe integer, otherwise `false`.  \nWhen `true`, TypeScript narrows the type of `value` to `number`.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isSet.md",
    "content": "# isSet (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isSet](../../predicate/isSet.md) instead\n\nThis `isSet` function is a Lodash compatibility function, but has the same implementation as the main library.\n\nUse the faster and more modern `es-toolkit`'s [isSet](../../predicate/isSet.md) instead.\n\n:::\n\nChecks if a value is a Set.\n\n```typescript\nconst result = isSet(value);\n```\n\n## Usage\n\n### `isSet(value)`\n\nUse `isSet` when you want to type-safely check if a value is a Set. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set checking\nconst set = new Set();\nisSet(set); // true\n\n// Other types return false\nisSet(new Map()); // false\nisSet(new WeakSet()); // false\nisSet([]); // false\nisSet({}); // false\nisSet('set'); // false\nisSet(123); // false\nisSet(null); // false\nisSet(undefined); // false\n```\n\nIt also distinguishes from other similar collections.\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set vs Map vs WeakSet\nisSet(new Set([1, 2, 3])); // true\nisSet(new Map([['key', 'value']])); // false\nisSet(new WeakSet()); // false\n\n// Set vs array\nisSet(new Set([1, 2, 3])); // true\nisSet([1, 2, 3]); // false\n\n// Set vs regular objects\nisSet(new Set()); // true\nisSet({}); // false\nisSet(Object.create(null)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Set.\n\n#### Returns\n\n(`value is Set<any>`): Returns `true` if the value is a Set, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isString.md",
    "content": "# isString (Lodash Compatibility)\n\n::: warning Use `typeof` operator instead\n\nThis `isString` function is complex due to String object wrapper handling.\n\nUse the simpler and more modern `typeof value === 'string'` instead.\n\n:::\n\nChecks if a value is a string.\n\n```typescript\nconst result = isString(value);\n```\n\n## Usage\n\n### `isString(value)`\n\nUse `isString` when you want to type-safely check if a value is a string. It checks both primitive strings and String object wrappers. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// Primitive strings\nisString('hello'); // true\nisString(''); // true\nisString('123'); // true\n\n// String object wrappers\nisString(new String('hello')); // true\nisString(new String('')); // true\n\n// Other types return false\nisString(123); // false\nisString(true); // false\nisString(null); // false\nisString(undefined); // false\nisString({}); // false\nisString([]); // false\nisString(Symbol('test')); // false\n```\n\nIt distinguishes from other types that may look like strings.\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// String vs number\nisString('123'); // true\nisString(123); // false\n\n// String vs boolean\nisString('true'); // true\nisString(true); // false\n\n// String vs null/undefined\nisString('null'); // true\nisString(null); // false\nisString('undefined'); // true\nisString(undefined); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a string.\n\n#### Returns\n\n(`value is string`): Returns `true` if the value is a string, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isSymbol.md",
    "content": "# isSymbol (Lodash Compatibility)\n\n::: warning Use `typeof` operator instead\n\nThis `isSymbol` function is complex due to Symbol object wrapper handling.\n\nUse the simpler and more modern `typeof value === 'symbol'` instead.\n\n:::\n\nChecks if a value is a symbol.\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## Usage\n\n### `isSymbol(value)`\n\nUse `isSymbol` when you want to type-safely check if a value is a symbol. It checks both primitive symbols and Symbol object wrappers. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// Primitive symbols\nisSymbol(Symbol('test')); // true\nisSymbol(Symbol.for('global')); // true\nisSymbol(Symbol.iterator); // true\n\n// Symbol object wrappers\nisSymbol(Object(Symbol('test'))); // true\n\n// Other types return false\nisSymbol('symbol'); // false\nisSymbol(123); // false\nisSymbol(true); // false\nisSymbol(null); // false\nisSymbol(undefined); // false\nisSymbol({}); // false\nisSymbol([]); // false\n```\n\nIt also correctly recognizes various built-in symbols.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// Well-known symbols\nisSymbol(Symbol.iterator); // true\nisSymbol(Symbol.asyncIterator); // true\nisSymbol(Symbol.toStringTag); // true\nisSymbol(Symbol.hasInstance); // true\nisSymbol(Symbol.toPrimitive); // true\n\n// Global symbols\nisSymbol(Symbol.for('myGlobalSymbol')); // true\n\n// Custom symbols\nconst mySymbol = Symbol('mySymbol');\nisSymbol(mySymbol); // true\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a symbol.\n\n#### Returns\n\n(`value is symbol`): Returns `true` if the value is a symbol, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isTypedArray.md",
    "content": "# isTypedArray (Lodash Compatibility)\n\n::: warning Use `ArrayBuffer.isView()` or `instanceof` operator instead\n\nThis `isTypedArray` function is a Lodash compatibility function, but is a simple type check.\n\nUse the simpler and more modern `ArrayBuffer.isView(value)` or `value instanceof Int8Array` etc. instead.\n\n:::\n\nChecks if a value is a TypedArray.\n\n```typescript\nconst result = isTypedArray(x);\n```\n\n## Usage\n\n### `isTypedArray(x)`\n\nUse `isTypedArray` when you want to check if a value is a TypedArray. TypedArrays are special array types for handling binary data.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// TypedArrays\nisTypedArray(new Uint8Array([1, 2, 3])); // true\nisTypedArray(new Int16Array([1, 2, 3])); // true\nisTypedArray(new Float32Array([1.1, 2.2])); // true\nisTypedArray(new BigInt64Array([1n, 2n])); // true\n\n// Other types return false\nisTypedArray([1, 2, 3]); // false (regular array)\nisTypedArray(new ArrayBuffer(16)); // false (ArrayBuffer)\nisTypedArray(new DataView(new ArrayBuffer(16))); // false (DataView)\nisTypedArray('array'); // false (string)\nisTypedArray({}); // false (object)\nisTypedArray(null); // false\nisTypedArray(undefined); // false\n```\n\nIt recognizes all kinds of TypedArrays.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// Integer TypedArrays\nisTypedArray(new Int8Array()); // true\nisTypedArray(new Int16Array()); // true\nisTypedArray(new Int32Array()); // true\nisTypedArray(new Uint8Array()); // true\nisTypedArray(new Uint16Array()); // true\nisTypedArray(new Uint32Array()); // true\nisTypedArray(new Uint8ClampedArray()); // true\n\n// Floating-point TypedArrays\nisTypedArray(new Float32Array()); // true\nisTypedArray(new Float64Array()); // true\n\n// BigInt TypedArrays\nisTypedArray(new BigInt64Array()); // true\nisTypedArray(new BigUint64Array()); // true\n```\n\nIt distinguishes from other similar objects.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nconst buffer = new ArrayBuffer(16);\nconst view = new DataView(buffer);\nconst typedArray = new Uint8Array(buffer);\nconst regularArray = [1, 2, 3, 4];\n\nisTypedArray(buffer); // false (ArrayBuffer)\nisTypedArray(view); // false (DataView)\nisTypedArray(typedArray); // true (TypedArray)\nisTypedArray(regularArray); // false (regular array)\n```\n\nIt's useful for type distinction when processing binary data.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nfunction processData(data: unknown) {\n  if (isTypedArray(data)) {\n    console.log(`TypedArray length: ${data.length}`);\n    console.log(`Byte length: ${data.byteLength}`);\n    console.log(`Byte offset: ${data.byteOffset}`);\n    console.log(`Constructor: ${data.constructor.name}`);\n\n    // Output first value\n    if (data.length > 0) {\n      console.log(`First value: ${data[0]}`);\n    }\n  } else if (Array.isArray(data)) {\n    console.log('Regular array');\n  } else {\n    console.log('Not an array');\n  }\n}\n\nprocessData(new Uint8Array([1, 2, 3])); // TypedArray information output\nprocessData([1, 2, 3]); // \"Regular array\"\nprocessData('not an array'); // \"Not an array\"\n```\n\n#### Parameters\n\n- `x` (`any`): The value to check if it's a TypedArray.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a TypedArray, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isUndefined.md",
    "content": "# isUndefined (Lodash Compatibility)\n\n::: warning Use `es-toolkit`'s [isUndefined](../../predicate/isUndefined.md) instead\n\nThis `isUndefined` function operates slowly due to complex handling for Lodash compatibility.\n\nUse the faster and more modern `es-toolkit`'s [isUndefined](../../predicate/isUndefined.md) instead.\n\n:::\n\nChecks if a value is `undefined`.\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## Usage\n\n### `isUndefined(x)`\n\nUse `isUndefined` when you want to type-safely check if a value is exactly `undefined`. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\n// Only undefined returns true\nisUndefined(undefined); // true\n\n// null also returns false\nisUndefined(null); // false\n\n// All other values also return false\nisUndefined(0); // false\nisUndefined(''); // false\nisUndefined(false); // false\nisUndefined([]); // false\nisUndefined({}); // false\nisUndefined('undefined'); // false\nisUndefined(NaN); // false\n```\n\nYou can distinguish between `undefined` and `null`.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isUndefined(value)) {\n    console.log('Value is undefined');\n  } else if (value === null) {\n    console.log('Value is explicitly null');\n  } else {\n    console.log(`Value exists: ${value}`);\n  }\n}\n\nhandleValue(undefined); // \"Value is undefined\"\nhandleValue(null); // \"Value is explicitly null\"\nhandleValue('hello'); // \"Value exists: hello\"\n```\n\nIt's useful for checking undeclared variables or uninitialized properties.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nconst obj: { name?: string; age?: number } = { name: 'John' };\n\nif (isUndefined(obj.age)) {\n  console.log('Age is not set');\n  obj.age = 25; // Set default value\n}\n\n// Default value handling for function parameters\nfunction greet(name: string, title?: string) {\n  if (isUndefined(title)) {\n    title = 'Mr./Ms.';\n  }\n  console.log(`Hello, ${title} ${name}!`);\n}\n\ngreet('Kim'); // \"Hello, Mr./Ms. Kim!\"\ngreet('Kim', 'Dr.'); // \"Hello, Dr. Kim!\"\n```\n\n#### Parameters\n\n- `x` (`any`): The value to check if it's `undefined`.\n\n#### Returns\n\n(`x is undefined`): Returns `true` if the value is `undefined`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isWeakMap.md",
    "content": "# isWeakMap (Lodash Compatibility)\n\n::: warning Use `instanceof` operator instead\n\nThis `isWeakMap` function is a Lodash compatibility function, but is a simple type check.\n\nUse the simpler and more modern `value instanceof WeakMap` instead.\n\n:::\n\nChecks if a value is a WeakMap.\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## Usage\n\n### `isWeakMap(value)`\n\nUse `isWeakMap` when you want to type-safely check if a value is a WeakMap. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap checking\nconst weakMap = new WeakMap();\nisWeakMap(weakMap); // true\n\n// Other types return false\nisWeakMap(new Map()); // false\nisWeakMap(new Set()); // false\nisWeakMap(new WeakSet()); // false\nisWeakMap({}); // false\nisWeakMap([]); // false\nisWeakMap('weakmap'); // false\nisWeakMap(123); // false\nisWeakMap(null); // false\nisWeakMap(undefined); // false\n```\n\nIt also distinguishes from other similar collections.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap vs Map\nconst obj = {};\nconst weakMap = new WeakMap([[obj, 'value']]);\nconst map = new Map([[obj, 'value']]);\n\nisWeakMap(weakMap); // true\nisWeakMap(map); // false\n\n// WeakMap vs WeakSet\nisWeakMap(new WeakMap()); // true\nisWeakMap(new WeakSet()); // false\n\n// WeakMap vs regular objects\nisWeakMap(new WeakMap()); // true\nisWeakMap({}); // false\n```\n\nIt's useful when utilizing WeakMap's special properties.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\nfunction setupWeakReference(collection: unknown, key: object, value: any) {\n  if (isWeakMap(collection)) {\n    // WeakMap can only use objects as keys and maintains weak references\n    collection.set(key, value);\n    console.log('Stored with weak reference in WeakMap');\n\n    // WeakMap does not have size information\n    console.log('WeakMap has no size information');\n  } else {\n    console.log('Not a WeakMap');\n  }\n}\n\nconst weakMap = new WeakMap();\nconst regularMap = new Map();\nconst obj = { id: 1 };\n\nsetupWeakReference(weakMap, obj, 'data'); // \"Stored with weak reference in WeakMap\"\nsetupWeakReference(regularMap, obj, 'data'); // \"Not a WeakMap\"\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a WeakMap.\n\n#### Returns\n\n(`value is WeakMap<object, any>`): Returns `true` if the value is a WeakMap, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/isWeakSet.md",
    "content": "# isWeakSet (Lodash Compatibility)\n\n::: warning Use `instanceof` operator instead\n\nThis `isWeakSet` function is a Lodash compatibility function, but is a simple type check.\n\nUse the simpler and more modern `value instanceof WeakSet` instead.\n\n:::\n\nChecks if a value is a WeakSet.\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## Usage\n\n### `isWeakSet(value)`\n\nUse `isWeakSet` when you want to type-safely check if a value is a WeakSet. It also works as a type guard in TypeScript.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet checking\nconst weakSet = new WeakSet();\nisWeakSet(weakSet); // true\n\n// Other types return false\nisWeakSet(new Set()); // false\nisWeakSet(new Map()); // false\nisWeakSet(new WeakMap()); // false\nisWeakSet([]); // false\nisWeakSet({}); // false\nisWeakSet('weakset'); // false\nisWeakSet(123); // false\nisWeakSet(null); // false\nisWeakSet(undefined); // false\n```\n\nIt also distinguishes from other similar collections.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet vs Set\nconst obj = {};\nconst weakSet = new WeakSet([obj]);\nconst set = new Set([obj]);\n\nisWeakSet(weakSet); // true\nisWeakSet(set); // false\n\n// WeakSet vs WeakMap\nisWeakSet(new WeakSet()); // true\nisWeakSet(new WeakMap()); // false\n\n// WeakSet vs array\nisWeakSet(new WeakSet()); // true\nisWeakSet([]); // false\n```\n\nIt's useful when utilizing WeakSet's special properties.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\nfunction addWeakReference(collection: unknown, item: object) {\n  if (isWeakSet(collection)) {\n    // WeakSet can only store objects and maintains weak references\n    collection.add(item);\n    console.log('Stored with weak reference in WeakSet');\n\n    // WeakSet has no size information and cannot be iterated\n    console.log('WeakSet has no size information and cannot be iterated');\n  } else {\n    console.log('Not a WeakSet');\n  }\n}\n\nconst weakSet = new WeakSet();\nconst regularSet = new Set();\nconst obj = { id: 1 };\n\naddWeakReference(weakSet, obj); // \"Stored with weak reference in WeakSet\"\naddWeakReference(regularSet, obj); // \"Not a WeakSet\"\n```\n\nIt's useful for object tracking to prevent memory leaks.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// DOM element tracking example\nfunction trackDOMElement(tracker: unknown, element: Element) {\n  if (isWeakSet(tracker)) {\n    // When DOM elements are removed, they're automatically removed from WeakSet\n    tracker.add(element);\n    console.log('Started tracking DOM element');\n\n    // Check tracking status later\n    if (tracker.has(element)) {\n      console.log('This element is being tracked');\n    }\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a WeakSet.\n\n#### Returns\n\n(`value is WeakSet<object>`): Returns `true` if the value is a WeakSet, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/predicate/matches.md",
    "content": "# matches (Lodash Compatibility)\n\nCreates a function that checks for partial matching with a given pattern.\n\n```typescript\nconst matcher = matches(pattern);\n```\n\n## Usage\n\n### `matches(source)`\n\nUse `matches` when you need to create a function that checks if objects or arrays match a specific pattern in structure and values. Useful for array filtering or object searching.\n\n```typescript\nimport { matches } from 'es-toolkit/compat';\n\n// Object pattern matching\nconst userMatcher = matches({ age: 25, department: 'Engineering' });\n\nconst users = [\n  { name: 'Alice', age: 25, department: 'Engineering' },\n  { name: 'Bob', age: 30, department: 'Marketing' },\n  { name: 'Charlie', age: 25, department: 'Engineering' },\n];\n\nconst engineeringUsers = users.filter(userMatcher);\n// [{ name: 'Alice', age: 25, department: 'Engineering' },\n//  { name: 'Charlie', age: 25, department: 'Engineering' }]\n\n// Nested object pattern\nconst profileMatcher = matches({\n  profile: { city: 'Seoul', verified: true },\n});\n\nconst profiles = [\n  { name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } },\n  { name: 'Lee', profile: { city: 'Busan', verified: true } },\n  { name: 'Park', profile: { city: 'Seoul', verified: false } },\n];\n\nconst seoulVerifiedUsers = profiles.filter(profileMatcher);\n// [{ name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } }]\n\n// Array pattern matching\nconst arrayMatcher = matches([2, 4]);\nconst arrays = [\n  [1, 2, 3, 4, 5],\n  [2, 4, 6],\n  [1, 3, 5],\n];\nconst matchingArrays = arrays.filter(arrayMatcher);\n// [[1, 2, 3, 4, 5], [2, 4, 6]]\n\n// Empty pattern matches all values\nconst emptyMatcher = matches({});\nemptyMatcher({ anything: 'value' }); // true\nemptyMatcher([]); // true\nemptyMatcher(null); // true\n```\n\n#### Parameters\n\n- `source` (`unknown`): The object or value that serves as the match pattern.\n\n#### Returns\n\n(`(target: unknown) => boolean`): Returns a function that checks if the given value partially matches the pattern.\n"
  },
  {
    "path": "docs/reference/compat/predicate/matchesProperty.md",
    "content": "# matchesProperty (Lodash Compatibility)\n\nCreates a function that checks if a specific property matches a given value.\n\n```typescript\nconst checker = matchesProperty(path, value);\n```\n\n## Usage\n\n### `matchesProperty(property, source)`\n\nUse `matchesProperty` when you need to create a function that checks if an object's specific property matches a given value. Useful for array filtering or object searching.\n\n```typescript\nimport { matchesProperty } from 'es-toolkit/compat';\n\n// Simple property check\nconst checkName = matchesProperty('name', 'Alice');\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Alice', age: 35 },\n];\n\nconst aliceUsers = users.filter(checkName);\n// [{ name: 'Alice', age: 25 }, { name: 'Alice', age: 35 }]\n\n// Nested property check (array path)\nconst checkCity = matchesProperty(['address', 'city'], 'Seoul');\n\nconst profiles = [\n  { name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n  { name: 'Lee', address: { city: 'Busan', district: 'Haeundae' } },\n  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } },\n];\n\nconst seoulUsers = profiles.filter(checkCity);\n// [{ name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n//  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } }]\n\n// Deep path as string\nconst checkScore = matchesProperty('stats.game.score', 100);\n\nconst players = [\n  { name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n  { name: 'Player2', stats: { game: { score: 95, level: 4 } } },\n  { name: 'Player3', stats: { game: { score: 100, level: 6 } } },\n];\n\nconst perfectScorers = players.filter(checkScore);\n// [{ name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n//  { name: 'Player3', stats: { game: { score: 100, level: 6 } } }]\n\n// Matching with complex objects\nconst checkRole = matchesProperty('role', { type: 'admin', permissions: ['read', 'write'] });\n\nconst accounts = [\n  { user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n  { user: 'Bob', role: { type: 'user', permissions: ['read'] } },\n  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } },\n];\n\nconst admins = accounts.filter(checkRole);\n// [{ user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n//  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } }]\n```\n\n#### Parameters\n\n- `property` (`PropertyKey | PropertyKey[]`): The property path to check. Can be a string, array, or dot-separated path.\n- `source` (`unknown`): The value to compare against the property value.\n\n#### Returns\n\n(`(target: unknown) => boolean`): Returns a function that checks if the given object's property matches the value.\n"
  },
  {
    "path": "docs/reference/compat/string/camelCase.md",
    "content": "# camelCase (Lodash compatibility)\n\n::: warning Use `camelCase` from `es-toolkit`\n\nThis `camelCase` function operates slower due to handling non-string input values and removing contracted apostrophes.\n\nInstead, use the faster and more modern [camelCase](../../string/camelCase.md) from `es-toolkit`.\n\n:::\n\nConverts a string to camel case.\n\n```typescript\nconst result = camelCase(str);\n```\n\n## Usage\n\n### `camelCase(str)`\n\nConverts a string to camel case. Camel case is a naming convention where the first word starts with a lowercase letter and subsequent words begin with uppercase letters, all without spaces.\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase('camelCase'); // 'camelCase'\ncamelCase('some whitespace'); // 'someWhitespace'\ncamelCase('hyphen-text'); // 'hyphenText'\ncamelCase('HTTPRequest'); // 'httpRequest'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase(123); // '123'\ncamelCase(null); // ''\ncamelCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string | object`, optional): The value to convert to camel case.\n\n#### Returns\n\n(`string`): Returns the string converted to camel case.\n"
  },
  {
    "path": "docs/reference/compat/string/capitalize.md",
    "content": "# capitalize (Lodash compatibility)\n\n::: warning Use `capitalize` from `es-toolkit`\n\nThis `capitalize` function operates slower due to handling non-string input values.\n\nInstead, use the faster and more modern [capitalize](../../string/capitalize.md) from `es-toolkit`.\n\n:::\n\nConverts the first character of a string to uppercase and the remaining characters to lowercase.\n\n```typescript\nconst result = capitalize(str);\n```\n\n## Usage\n\n### `capitalize(str)`\n\nConverts the first character of a string to uppercase and the remaining characters to lowercase. This is useful for making the first impression of a word better or formatting it as a title.\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize('fred'); // 'Fred'\ncapitalize('FRED'); // 'Fred'\ncapitalize('fRED'); // 'Fred'\n```\n\nEmpty strings and non-string values can also be handled.\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize(''); // ''\ncapitalize(123); // '123'\ncapitalize(null); // ''\ncapitalize(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to capitalize.\n\n#### Returns\n\n(`string`): Returns the string with the first character capitalized and the remaining characters in lowercase.\n"
  },
  {
    "path": "docs/reference/compat/string/deburr.md",
    "content": "# deburr (Lodash compatibility)\n\n::: warning Use `deburr` from `es-toolkit`\n\nThis `deburr` function operates slower due to handling non-string input values.\n\nInstead, use the faster and more modern [deburr](../../string/deburr.md) from `es-toolkit`.\n\n:::\n\nConverts special characters and diacritical marks in a string to ASCII characters.\n\n```typescript\nconst result = deburr(str);\n```\n\n## Usage\n\n### `deburr(str)`\n\nConverts special characters and diacritical marks in a string to ASCII characters. This is useful for making multilingual text easier to search or sort.\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr('Æthelred'); // 'Aethelred'\ndeburr('München'); // 'Munchen'\ndeburr('Crème brûlée'); // 'Creme brulee'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr(123); // '123'\ndeburr(null); // ''\ndeburr(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to remove special characters from.\n\n#### Returns\n\n(`string`): Returns the string with special characters and diacritical marks converted to ASCII characters.\n"
  },
  {
    "path": "docs/reference/compat/string/endsWith.md",
    "content": "# endsWith (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.endsWith`\n\nThis `endsWith` function operates slower due to handling `null` or `undefined`.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.endsWith`.\n\n:::\n\nChecks if a string ends with a given target string.\n\n```typescript\nconst result = endsWith(str, target);\n```\n\n## Usage\n\n### `endsWith(str, target, position?)`\n\nUse `endsWith` when you want to check if a string ends with a specific string. You can also specify the position to search up to.\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\n// Check string ending\nendsWith('fooBar', 'Bar');\n// Returns: true\n\nendsWith('fooBar', 'foo');\n// Returns: false\n\n// Check up to a specific position\nendsWith('fooBar', 'foo', 3);\n// Returns: true (checks if first 3 characters 'foo' ends with 'foo')\n```\n\n`null` or `undefined` returns `false`.\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\nendsWith(null, 'test');\n// Returns: false\n\nendsWith('test', null);\n// Returns: false\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to search in.\n- `target` (`string`, optional): The string to search for at the end.\n- `position` (`number`, optional): The position to end the search. Defaults to the full length of the string.\n\n#### Returns\n\n(`boolean`): Returns `true` if the string ends with the target string, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/string/escape.md",
    "content": "# escape (Lodash compatibility)\n\n::: warning Use `escape` from `es-toolkit`\n\nThis `escape` function operates slower due to handling non-string input values.\n\nInstead, use the faster and more modern [escape](../../string/escape.md) from `es-toolkit`.\n\n:::\n\nConverts HTML special characters in a string to HTML entities.\n\n```typescript\nconst result = escape(str);\n```\n\n## Usage\n\n### `escape(str)`\n\nConverts the characters `&`, `<`, `>`, `\"`, `'` in a string to their corresponding HTML entities. This is useful for preventing XSS attacks when inserting text into HTML documents.\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape('This is a <div> element.'); // 'This is a &lt;div&gt; element.'\nescape('This is a \"quote\"'); // 'This is a &quot;quote&quot;'\nescape(\"This is a 'quote'\"); // 'This is a &#39;quote&#39;'\nescape('This is a & symbol'); // 'This is a &amp; symbol'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape(123); // '123'\nescape(null); // ''\nescape(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to escape HTML special characters.\n\n#### Returns\n\n(`string`): Returns the string with HTML special characters converted to entities.\n"
  },
  {
    "path": "docs/reference/compat/string/escapeRegExp.md",
    "content": "# escapeRegExp (Lodash compatibility)\n\n::: warning Use `escapeRegExp` from `es-toolkit`\n\nThis `escapeRegExp` function operates slower due to handling non-string input values.\n\nInstead, use the faster and more modern [escapeRegExp](../../string/escapeRegExp.md) from `es-toolkit`.\n\n:::\n\nEscapes regular expression special characters in a string.\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## Usage\n\n### `escapeRegExp(str)`\n\nEscapes regular expression special characters `^`, `$`, `\\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, `|` in a string. This is useful when you want to treat a string literally when dynamically creating regular expressions.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp('[es-toolkit](https://es-toolkit.dev/)');\n// '\\\\[es-toolkit\\\\]\\\\(https://es-toolkit\\\\.dev/\\\\)'\n\nescapeRegExp('$^{}.+*?()[]|\\\\');\n// '\\\\$\\\\^\\\\{\\\\}\\\\.\\\\+\\\\*\\\\?\\\\(\\\\)\\\\[\\\\]\\\\|\\\\\\\\'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp(123); // '123'\nescapeRegExp(null); // ''\nescapeRegExp(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to escape regular expression special characters.\n\n#### Returns\n\n(`string`): Returns the string with regular expression special characters escaped.\n"
  },
  {
    "path": "docs/reference/compat/string/kebabCase.md",
    "content": "# kebabCase (Lodash compatibility)\n\n::: warning Use `kebabCase` from `es-toolkit`\n\nThis `kebabCase` function operates slower due to handling non-string input values and removing contracted apostrophes.\n\nInstead, use the faster and more modern [kebabCase](../../string/kebabCase.md) from `es-toolkit`.\n\n:::\n\nConverts a string to kebab case.\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## Usage\n\n### `kebabCase(str)`\n\nConverts a string to kebab case. Kebab case is a naming convention where each word is written in lowercase and connected with a dash (-) character. It's commonly used in URLs and CSS class names.\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase('camelCase'); // 'camel-case'\nkebabCase('some whitespace'); // 'some-whitespace'\nkebabCase('hyphen-text'); // 'hyphen-text'\nkebabCase('HTTPRequest'); // 'http-request'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase(123); // '123'\nkebabCase(null); // ''\nkebabCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string | object`, optional): The value to convert to kebab case.\n\n#### Returns\n\n(`string`): Returns the string converted to kebab case.\n"
  },
  {
    "path": "docs/reference/compat/string/lowerCase.md",
    "content": "# lowerCase (Lodash compatibility)\n\n::: warning Use `lowerCase` from `es-toolkit`\n\nThis `lowerCase` function operates slower due to handling non-string input values and removing contracted apostrophes.\n\nInstead, use the faster and more modern [lowerCase](../../string/lowerCase.md) from `es-toolkit`.\n\n:::\n\nConverts a string to lowercase words separated by spaces.\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## Usage\n\n### `lowerCase(str)`\n\nConverts a string to lowercase words separated by spaces. Each word is converted to lowercase and connected with space characters. This is useful for creating human-readable text.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase('camelCase'); // 'camel case'\nlowerCase('some whitespace'); // 'some whitespace'\nlowerCase('hyphen-text'); // 'hyphen text'\nlowerCase('HTTPRequest'); // 'http request'\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase(123); // '123'\nlowerCase(null); // ''\nlowerCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string | object`, optional): The value to convert to lowercase format.\n\n#### Returns\n\n(`string`): Returns the string with lowercase words separated by spaces.\n"
  },
  {
    "path": "docs/reference/compat/string/lowerFirst.md",
    "content": "# lowerFirst (Lodash compatibility)\n\n::: warning Use `lowerFirst` from `es-toolkit`\n\nThis `lowerFirst` function operates slower due to handling non-string input values.\n\nInstead, use the faster and more modern [lowerFirst](../../string/lowerFirst.md) from `es-toolkit`.\n\n:::\n\nConverts the first character of a string to lowercase.\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## Usage\n\n### `lowerFirst(str)`\n\nConverts the first character of a string to lowercase. The remaining characters are kept as is. This is useful for creating camelCase variable names or when you only want to lowercase the first character.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst('fred'); // 'fred'\nlowerFirst('Fred'); // 'fred'\nlowerFirst('FRED'); // 'fRED'\nlowerFirst(''); // ''\n```\n\nNon-string values are also converted to strings before processing.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst(123); // '123'\nlowerFirst(null); // ''\nlowerFirst(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to convert the first character to lowercase.\n\n#### Returns\n\n(`string`): Returns the string with the first character converted to lowercase.\n"
  },
  {
    "path": "docs/reference/compat/string/pad.md",
    "content": "# pad (Lodash compatibility)\n\n::: warning Use `pad` from `es-toolkit`\n\nThis `pad` function operates slower due to handling `null` or `undefined`.\n\nInstead, use the faster and more modern [pad](../../string/pad.md) from `es-toolkit`.\n\n:::\n\nPads a string on both sides with padding characters to reach the specified length.\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## Usage\n\n### `pad(str, length, chars)`\n\nUse `pad` when you want to pad a string on both sides to match a desired length. If the padding characters don't divide evenly, extra characters are placed on the right.\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\n// Pad with default spaces\npad('abc', 8);\n// Returns: '  abc   '\n\n// Pad with specified characters\npad('abc', 8, '_-');\n// Returns: '_-abc_-_'\n\n// Return as is if already long enough\npad('abc', 3);\n// Returns: 'abc'\n\n// Return as is if length is shorter\npad('abc', 2);\n// Returns: 'abc'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\npad(null, 5); // '     '\npad(undefined, 3, '*'); // '***'\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to pad.\n- `length` (`number`, optional): The target length. Defaults to `0`.\n- `chars` (`string`, optional): The characters to use for padding. Defaults to space `' '`.\n\n#### Returns\n\n(`string`): Returns the string padded to the specified length.\n"
  },
  {
    "path": "docs/reference/compat/string/padEnd.md",
    "content": "# padEnd (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.padEnd`\n\nThis `padEnd` function operates slower due to handling non-string values.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.padEnd`.\n\n:::\n\nPads the end of a string to extend it to the specified length.\n\n```typescript\nconst padded = padEnd(str, length, chars);\n```\n\n## Usage\n\n### `padEnd(str, length?, chars?)`\n\nUse `padEnd` when you want to pad the end of a string to match a desired length.\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\n// Pad with spaces\npadEnd('abc', 6);\n// Returns: 'abc   '\n\n// Pad with specific characters\npadEnd('abc', 6, '_-');\n// Returns: 'abc_-_'\n\n// Return as is if original length is longer\npadEnd('abc', 3);\n// Returns: 'abc'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\npadEnd(null, 5, '*');\n// Returns: '*****'\n\npadEnd(undefined, 3);\n// Returns: '   '\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to add padding to.\n- `length` (`number`, optional): The desired final string length. Defaults to `0`.\n- `chars` (`string`, optional): The character to use for padding. Defaults to `' '` (space).\n\n#### Returns\n\n(`string`): Returns the string with padding added to the end.\n"
  },
  {
    "path": "docs/reference/compat/string/padStart.md",
    "content": "# padStart (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.padStart`\n\nThis `padStart` function operates slower due to handling non-string values.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.padStart`.\n\n:::\n\nPads the start of a string to extend it to the specified length.\n\n```typescript\nconst padded = padStart(str, length, chars);\n```\n\n## Usage\n\n### `padStart(str, length?, chars?)`\n\nUse `padStart` when you want to pad the start of a string to match a desired length.\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\n// Pad with spaces\npadStart('abc', 6);\n// Returns: '   abc'\n\n// Pad with specific characters\npadStart('abc', 6, '_-');\n// Returns: '_-_abc'\n\n// Return as is if original length is longer\npadStart('abc', 3);\n// Returns: 'abc'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\npadStart(null, 5, '*');\n// Returns: '*****'\n\npadStart(undefined, 3);\n// Returns: '   '\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to add padding to.\n- `length` (`number`, optional): The desired final string length. Defaults to `0`.\n- `chars` (`string`, optional): The character to use for padding. Defaults to `' '` (space).\n\n#### Returns\n\n(`string`): Returns the string with padding added to the start.\n"
  },
  {
    "path": "docs/reference/compat/string/repeat.md",
    "content": "# repeat (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.repeat`\n\nThis `repeat` function operates slower due to handling non-string values and integer conversion.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.repeat`.\n\n:::\n\nRepeats a string a specified number of times.\n\n```typescript\nconst repeated = repeat(str, n);\n```\n\n## Usage\n\n### `repeat(str, n?)`\n\nUse `repeat` when you want to repeat a string multiple times to create a new string. If the repeat count is less than 1, it returns an empty string.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\n// Repeat string\nrepeat('abc', 2);\n// Returns: 'abcabc'\n\nrepeat('hello', 3);\n// Returns: 'hellohellohello'\n\n// Repeating 0 times returns empty string\nrepeat('abc', 0);\n// Returns: ''\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat(null, 3);\n// Returns: ''\n\nrepeat(undefined, 2);\n// Returns: ''\n```\n\nIf you don't specify the repeat count, it repeats once.\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat('abc');\n// Returns: 'abc'\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to repeat.\n- `n` (`number`, optional): The number of times to repeat. Defaults to `1`.\n\n#### Returns\n\n(`string`): Returns the string repeated the specified number of times.\n"
  },
  {
    "path": "docs/reference/compat/string/replace.md",
    "content": "# replace (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.replace`\n\nThis `replace` function operates slower due to handling non-string values.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.replace`.\n\n:::\n\nReplaces matching patterns in a string with another string.\n\n```typescript\nconst replaced = replace(target, pattern, replacement);\n```\n\n## Usage\n\n### `replace(target, pattern, replacement)`\n\nUse `replace` when you want to find a specific pattern in a string and replace it with another string. You can use a string or regular expression pattern, and the replacement can be specified as a string or function.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// Replace with string pattern\nreplace('abcde', 'de', '123');\n// Returns: 'abc123'\n\n// Replace with regular expression pattern\nreplace('abcde', /[bd]/g, '-');\n// Returns: 'a-c-e'\n```\n\nYou can also use a function to dynamically decide the replacement.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// Decide replacement content with function\nreplace('abcde', 'de', match => match.toUpperCase());\n// Returns: 'abcDE'\n\n// Combination of regular expression and function\nreplace('abcde', /[bd]/g, match => match.toUpperCase());\n// Returns: 'aBcDe'\n```\n\n`null` or `undefined` targets are treated as empty strings.\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\nreplace(null, 'test', 'replaced');\n// Returns: ''\n\nreplace(undefined, /test/g, 'replaced');\n// Returns: ''\n```\n\n#### Parameters\n\n- `target` (`string`): The target string to replace.\n- `pattern` (`string | RegExp`): The pattern to find.\n- `replacement` (`string | Function`): The replacement content. If a function, it receives the matched string and should return the replacement string.\n\n#### Returns\n\n(`string`): Returns a new string with the pattern replaced.\n"
  },
  {
    "path": "docs/reference/compat/string/snakeCase.md",
    "content": "# snakeCase (Lodash compatibility)\n\n::: warning Use `snakeCase` from `es-toolkit`\n\nThis `snakeCase` function operates slowly due to normalization logic for handling `null` or `undefined`.\n\nInstead, use the faster and more modern [snakeCase](../../string/snakeCase.md) from `es-toolkit`.\n\n:::\n\nConverts a string to snake case.\n\n```typescript\nconst snakeCased = snakeCase(str);\n```\n\n## Usage\n\n### `snakeCase(str)`\n\nUse `snakeCase` when you want to convert a string to snake*case. Snake case is a naming convention where each word is written in lowercase and connected with underscores (*).\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\n// Convert camel case\nsnakeCase('camelCase');\n// Returns: 'camel_case'\n\n// Convert space-separated string\nsnakeCase('some whitespace');\n// Returns: 'some_whitespace'\n\n// Convert hyphen-separated string\nsnakeCase('hyphen-text');\n// Returns: 'hyphen_text'\n\n// Handle consecutive uppercase letters\nsnakeCase('HTTPRequest');\n// Returns: 'http_request'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\nsnakeCase(null); // ''\nsnakeCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to convert to snake case.\n\n#### Returns\n\n(`string`): Returns the converted string in snake case.\n"
  },
  {
    "path": "docs/reference/compat/string/split.md",
    "content": "# split (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.split`\n\nThis `split` function operates slowly due to handling `null` or `undefined`.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.split`.\n\n:::\n\nSplits a string into an array using a separator.\n\n```typescript\nconst segments = split(str, separator);\n```\n\n## Usage\n\n### `split(string, separator?, limit?)`\n\nUse `split` when you want to divide a string into an array using a specific separator. You can also limit the maximum length of the resulting array.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\n// Split by hyphen\nsplit('a-b-c', '-');\n// Returns: ['a', 'b', 'c']\n\n// Limit the number of results\nsplit('a-b-c-d', '-', 2);\n// Returns: ['a', 'b']\n\n// Split by regular expression\nsplit('hello world', /\\s/);\n// Returns: ['hello', 'world']\n```\n\nIf no separator is specified, the entire string becomes the first element of the array.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit('hello');\n// Returns: ['hello']\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit(null);\n// Returns: ['']\n\nsplit(undefined);\n// Returns: ['']\n```\n\n#### Parameters\n\n- `string` (`string`, optional): The string to split. Defaults to an empty string.\n- `separator` (`RegExp | string`, optional): The separator to use for splitting.\n- `limit` (`number`, optional): The maximum length of the resulting array.\n\n#### Returns\n\n(`string[]`): Returns an array of strings split by the separator.\n"
  },
  {
    "path": "docs/reference/compat/string/startCase.md",
    "content": "# startCase (Lodash compatibility)\n\n::: warning Use `startCase` from `es-toolkit`\n\nThis `startCase` function runs slower due to normalization logic for handling `null` or `undefined`.\n\nInstead, use the faster and more modern [startCase](../../string/startCase.md) from `es-toolkit`.\n\n:::\n\nConverts a string to start case.\n\n```typescript\nconst startCased = startCase(str);\n```\n\n## Usage\n\n### `startCase(str)`\n\nUse `startCase` when you want to convert a string to Start Case. Start Case is a naming convention where the first letter of each word is capitalized and separated by spaces.\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\n// Convert regular string\nstartCase('hello world');\n// Returns: 'Hello World'\n\n// Keep words that are already uppercase\nstartCase('HELLO WORLD');\n// Returns: 'HELLO WORLD'\n\n// Convert hyphen-separated string\nstartCase('hello-world');\n// Returns: 'Hello World'\n\n// Convert underscore-separated string\nstartCase('hello_world');\n// Returns: 'Hello World'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\nstartCase(null); // ''\nstartCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to convert to start case.\n\n#### Returns\n\n(`string`): Returns the start case converted string.\n"
  },
  {
    "path": "docs/reference/compat/string/startsWith.md",
    "content": "# startsWith (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.startsWith`\n\nThis `startsWith` function is slower due to handling `null` or `undefined`.\n\nUse the faster and more modern JavaScript's `String.prototype.startsWith` instead.\n\n:::\n\nChecks if a string starts with a given string.\n\n```typescript\nconst result = startsWith(str, target);\n```\n\n## Usage\n\n### `startsWith(str, target, position?)`\n\nUse `startsWith` when you want to check if a string starts with a specific string. You can also specify the position to start the search.\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\n// Check if string starts with target\nstartsWith('fooBar', 'foo');\n// Returns: true\n\nstartsWith('fooBar', 'bar');\n// Returns: false\n\n// Check from a specific position\nstartsWith('fooBar', 'Bar', 3);\n// Returns: true (checks if it starts with 'Bar' from position 3)\n```\n\nReturns `false` for `null` or `undefined`.\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\nstartsWith(null, 'test');\n// Returns: false\n\nstartsWith('test', null);\n// Returns: false\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to check.\n- `target` (`string`, optional): The string to search for at the start.\n- `position` (`number`, optional): The position to start the search. Defaults to `0`.\n\n#### Returns\n\n(`boolean`): Returns `true` if the string starts with the given string, otherwise `false`.\n"
  },
  {
    "path": "docs/reference/compat/string/template.md",
    "content": "# template (Lodash compatibility)\n\n::: warning Use JavaScript template literals\n\nThis `template` function operates slowly due to complex string processing.\n\nUse faster and more modern JavaScript template literals instead.\n\n:::\n\nCreates a function that interpolates values into a string template to generate a new string.\n\n```typescript\nconst compiled = template(templateString);\n```\n\n## Usage\n\n### `template(string, options?)`\n\nUse `template` when you want to interpolate data into a string template to create a completed string. You can safely escape values, interpolate them as-is, or execute JavaScript code.\n\nBasic usage allows you to interpolate or escape values.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// Interpolate values as-is\nconst compiled = template('<%= value %>');\ncompiled({ value: 'Hello, World!' });\n// Returns: 'Hello, World!'\n\n// Safely escape HTML\nconst safeCompiled = template('<%- value %>');\nsafeCompiled({ value: '<script>alert(\"xss\")</script>' });\n// Returns: '&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;'\n```\n\nYou can also execute JavaScript code.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// Using conditional statements\nconst compiled = template('<% if (user) { %>Hello <%= user %>!<% } %>');\ncompiled({ user: 'es-toolkit' });\n// Returns: 'Hello es-toolkit!'\n\n// Using loops\nconst listTemplate = template('<% users.forEach(function(user) { %><li><%= user %></li><% }); %>');\nlistTemplate({ users: ['Alice', 'Bob', 'Charlie'] });\n// Returns: '<li>Alice</li><li>Bob</li><li>Charlie</li>'\n```\n\nYou can specify variable names for safer usage.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= data.name %> is <%= data.age %> years old', {\n  variable: 'data',\n});\ncompiled({ name: 'Alice', age: 25 });\n// Returns: 'Alice is 25 years old'\n```\n\nYou can import and use external functions.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= _.toUpper(message) %>', {\n  imports: { _: { toUpper: str => str.toUpperCase() } },\n});\ncompiled({ message: 'hello world' });\n// Returns: 'HELLO WORLD'\n```\n\nYou can also create custom delimiters.\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// Interpolate with custom delimiters\nconst compiled = template('{{ message }}', {\n  interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n});\ncompiled({ message: 'Hello!' });\n// Returns: 'Hello!'\n\n// Escape with custom delimiters\nconst safeCompiled = template('[- html -]', {\n  escape: /\\[-([\\s\\S]+?)-\\]/g,\n});\nsafeCompiled({ html: '<div>content</div>' });\n// Returns: '&lt;div&gt;content&lt;/div&gt;'\n```\n\n#### Parameters\n\n- `string` (`string`): The template string.\n- `options` (`object`, optional): Configuration object.\n  - `options.escape` (`RegExp`, optional): Regular expression delimiter for HTML escaping. Default is `<%-([\\s\\S]+?)%>`.\n  - `options.evaluate` (`RegExp`, optional): Regular expression delimiter for executing JavaScript code. Default is `<%([\\s\\S]+?)%>`.\n  - `options.interpolate` (`RegExp`, optional): Regular expression delimiter for value interpolation. Default is `<%=([\\s\\S]+?)%>`.\n  - `options.variable` (`string`, optional): Variable name for the data object.\n  - `options.imports` (`object`, optional): Functions to be used in the template.\n  - `options.sourceURL` (`string`, optional): Source URL for debugging purposes.\n\n#### Returns\n\n(`TemplateExecutor`): A function that takes a data object and returns the completed string. The generated function code can also be accessed via the `source` property.\n"
  },
  {
    "path": "docs/reference/compat/string/toLower.md",
    "content": "# toLower (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.toLowerCase`\n\nThis `toLower` function operates slowly due to handling non-string values.\n\nUse JavaScript's `String.prototype.toLowerCase` instead, which is faster and more modern.\n\n:::\n\nConverts a value to a string and then transforms it to lowercase.\n\n```typescript\nconst lowercased = toLower(value);\n```\n\n## Usage\n\n### `toLower(value?)`\n\nUse `toLower` when you want to convert a value to a lowercase string. It first converts any type of value to a string and then transforms it to lowercase.\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\n// Convert string to lowercase\ntoLower('--FOO-BAR--');\n// Returns: '--foo-bar--'\n\ntoLower('Hello World');\n// Returns: 'hello world'\n\n// Convert number\ntoLower(123);\n// Returns: '123'\n\n// Convert array\ntoLower([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null` or `undefined` are treated as empty strings.\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\ntoLower(null);\n// Returns: ''\n\ntoLower(undefined);\n// Returns: ''\n\ntoLower();\n// Returns: ''\n```\n\n#### Parameters\n\n- `value` (`unknown`, optional): The value to convert to lowercase.\n\n#### Returns\n\n(`string`): Returns the lowercased string.\n"
  },
  {
    "path": "docs/reference/compat/string/toUpper.md",
    "content": "# toUpper (Lodash compatibility)\n\n::: warning Use JavaScript's `String.prototype.toUpperCase`\n\nThis `toUpper` function performs slower due to handling non-string values.\n\nInstead, use the faster and more modern JavaScript's `String.prototype.toUpperCase`.\n\n:::\n\nConverts a value to a string and then to uppercase.\n\n```typescript\nconst uppercased = toUpper(value);\n```\n\n## Usage\n\n### `toUpper(value?)`\n\nUse `toUpper` when you want to convert a value to an uppercase string. It first converts any type of value to a string, then converts it to uppercase.\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\n// Convert string to uppercase\ntoUpper('--foo-bar--');\n// Returns: '--FOO-BAR--'\n\ntoUpper('Hello World');\n// Returns: 'HELLO WORLD'\n\n// Convert number\ntoUpper(123);\n// Returns: '123'\n\n// Convert array\ntoUpper([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null` and `undefined` are treated as empty strings.\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\ntoUpper(null);\n// Returns: ''\n\ntoUpper(undefined);\n// Returns: ''\n\ntoUpper();\n// Returns: ''\n```\n\n#### Parameters\n\n- `value` (`unknown`, optional): The value to convert to uppercase.\n\n#### Returns\n\n(`string`): Returns the uppercase string.\n"
  },
  {
    "path": "docs/reference/compat/string/trim.md",
    "content": "# trim (Lodash Compatibility)\n\n::: warning Use `trim` from `es-toolkit`\n\nThis `trim` function operates slowly due to handling `null` or `undefined` and array-type `chars`.\n\nUse the faster and more modern [trim](../../string/trim.md) from `es-toolkit` instead.\n\n:::\n\nRemoves leading and trailing whitespace or specified characters from a string.\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## Usage\n\n### `trim(str, chars)`\n\nUse `trim` when you want to remove whitespace or specific characters from the beginning and end of a string. If `chars` is not specified, only leading and trailing whitespace will be removed.\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\n// Remove leading and trailing whitespace\ntrim('  hello  ');\n// Returns: 'hello'\n\n// Remove specified characters\ntrim('--hello--', '-');\n// Returns: 'hello'\n\n// Remove multiple characters with an array\ntrim('##hello##', ['#', 'o']);\n// Returns: 'hell'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\ntrim(null); // ''\ntrim(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to trim.\n- `chars` (`string`, optional): The characters to remove. If not specified, whitespace will be removed.\n\n#### Returns\n\n(`string`): Returns the string with specified characters removed from the beginning and end.\n"
  },
  {
    "path": "docs/reference/compat/string/trimEnd.md",
    "content": "# trimEnd (Lodash Compatibility)\n\n::: warning Use `trimEnd` from `es-toolkit`\n\nThis `trimEnd` function operates slowly due to handling `null` or `undefined` and parameter order changes.\n\nUse the faster and more modern [trimEnd](../../string/trimEnd.md) from `es-toolkit` instead.\n\n:::\n\nRemoves trailing whitespace or specified characters from a string.\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## Usage\n\n### `trimEnd(str, chars)`\n\nUse `trimEnd` when you want to remove whitespace or specific characters from the end of a string. If `chars` is not specified, only trailing whitespace will be removed.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\n// Remove trailing whitespace\ntrimEnd('  abc  ');\n// Returns: '  abc'\n\n// Remove specified characters\ntrimEnd('-_-abc-_-', '_-');\n// Returns: '-_-abc'\n\n// Only applies to the end of the string\ntrimEnd('abc', 'a');\n// Returns: 'abc'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\ntrimEnd(null); // ''\ntrimEnd(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to trim from the end.\n- `chars` (`string`, optional): The characters to remove. If not specified, whitespace will be removed.\n\n#### Returns\n\n(`string`): Returns the string with specified characters removed from the end.\n"
  },
  {
    "path": "docs/reference/compat/string/trimStart.md",
    "content": "# trimStart (Lodash Compatibility)\n\n::: warning Use `trimStart` from `es-toolkit`\n\nThis `trimStart` function operates slowly due to handling `null` or `undefined` and parameter order changes.\n\nUse the faster and more modern [trimStart](../../string/trimStart.md) from `es-toolkit` instead.\n\n:::\n\nRemoves leading whitespace or specified characters from a string.\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## Usage\n\n### `trimStart(str, chars)`\n\nUse `trimStart` when you want to remove whitespace or specific characters from the beginning of a string. If `chars` is not specified, only leading whitespace will be removed.\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\n// Remove leading whitespace\ntrimStart('  abc  ');\n// Returns: 'abc  '\n\n// Remove specified characters\ntrimStart('-_-abc-_-', '_-');\n// Returns: 'abc-_-'\n\n// Only applies to the beginning of the string\ntrimStart('abc', 'c');\n// Returns: 'abc'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\ntrimStart(null); // ''\ntrimStart(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to trim from the beginning.\n- `chars` (`string`, optional): The characters to remove. If not specified, whitespace will be removed.\n\n#### Returns\n\n(`string`): Returns the string with specified characters removed from the beginning.\n"
  },
  {
    "path": "docs/reference/compat/string/truncate.md",
    "content": "# truncate (Lodash Compatibility)\n\n::: warning Use JavaScript's `String.prototype.slice`\n\nThis `truncate` function operates slowly due to complex Unicode handling and regex checking.\n\nUse the faster and more modern JavaScript's `String.prototype.slice` instead.\n\n:::\n\nTruncates a string if it's longer than the specified maximum length and appends an omission string.\n\n```typescript\nconst truncated = truncate(str, options);\n```\n\n## Usage\n\n### `truncate(string, options?)`\n\nUse `truncate` when you want to cut a long string to a specified length. The truncated part is replaced with an omission string (default: `\"...\"`).\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// Basic usage (max 30 characters)\ntruncate('hi-diddly-ho there, neighborino');\n// Returns: 'hi-diddly-ho there, neighbo...'\n\n// Specify length\ntruncate('hi-diddly-ho there, neighborino', { length: 24 });\n// Returns: 'hi-diddly-ho there, n...'\n\n// Change omission string\ntruncate('hi-diddly-ho there, neighborino', { omission: ' [...]' });\n// Returns: 'hi-diddly-ho there, neig [...]'\n```\n\nYou can specify a separator to truncate at that position.\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// Truncate at word boundaries with space separator\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: ' ',\n});\n// Returns: 'hi-diddly-ho there,...'\n\n// Specify separator with regex\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: /,? +/,\n});\n// Returns: 'hi-diddly-ho there...'\n```\n\nUnicode characters are also handled correctly.\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\ntruncate('¥§✈✉🤓', { length: 5 });\n// Returns: '¥§✈✉🤓'\n\ntruncate('¥§✈✉🤓', { length: 4, omission: '…' });\n// Returns: '¥§✈…'\n```\n\n#### Parameters\n\n- `string` (`string`, optional): The string to truncate.\n- `options` (`object`, optional): The options object.\n  - `options.length` (`number`, optional): The maximum string length. Defaults to `30`.\n  - `options.omission` (`string`, optional): The string to indicate text is omitted. Defaults to `'...'`.\n  - `options.separator` (`RegExp | string`, optional): The separator pattern to truncate to.\n\n#### Returns\n\n(`string`): Returns the truncated string.\n"
  },
  {
    "path": "docs/reference/compat/string/unescape.md",
    "content": "# unescape (Lodash Compatibility)\n\n::: warning Use `unescape` from `es-toolkit`\n\nThis `unescape` function operates slowly due to conversion logic for handling `null` or `undefined`.\n\nUse the faster and more modern [unescape](../../string/unescape.md) from `es-toolkit` instead.\n\n:::\n\nConverts HTML entities to their original characters.\n\n```typescript\nconst unescaped = unescape(str);\n```\n\n## Usage\n\n### `unescape(str)`\n\nUse `unescape` when you want to convert HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;` back to their original characters. This is the reverse operation of the `escape` function.\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\n// Unescape HTML tags\nunescape('This is a &lt;div&gt; element.');\n// Returns: 'This is a <div> element.'\n\n// Unescape quotes\nunescape('This is a &quot;quote&quot;');\n// Returns: 'This is a \"quote\"'\n\n// Unescape apostrophes\nunescape('This is a &#39;quote&#39;');\n// Returns: 'This is a 'quote''\n\n// Unescape ampersands\nunescape('This is a &amp; symbol');\n// Returns: 'This is a & symbol'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\nunescape(null); // ''\nunescape(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to unescape.\n\n#### Returns\n\n(`string`): Returns the string with HTML entities converted to their original characters.\n"
  },
  {
    "path": "docs/reference/compat/string/upperCase.md",
    "content": "# upperCase (Lodash Compatibility)\n\n::: warning Use `upperCase` from `es-toolkit`\n\nThis `upperCase` function operates slowly due to normalization logic for handling `null` or `undefined`.\n\nUse the faster and more modern [upperCase](../../string/upperCase.md) from `es-toolkit` instead.\n\n:::\n\nConverts a string to upper case.\n\n```typescript\nconst upperCased = upperCase(str);\n```\n\n## Usage\n\n### `upperCase(str)`\n\nUse `upperCase` when you want to convert a string to upper case (UPPER CASE). Upper case is a naming convention where each word is written in uppercase and connected with spaces.\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\n// Convert camel case\nupperCase('camelCase');\n// Returns: 'CAMEL CASE'\n\n// Convert space-separated string\nupperCase('some whitespace');\n// Returns: 'SOME WHITESPACE'\n\n// Convert hyphen-separated string\nupperCase('hyphen-text');\n// Returns: 'HYPHEN TEXT'\n\n// When uppercase letters appear consecutively\nupperCase('HTTPRequest');\n// Returns: 'HTTP REQUEST'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\nupperCase(null); // ''\nupperCase(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to convert to upper case.\n\n#### Returns\n\n(`string`): Returns the string converted to upper case.\n"
  },
  {
    "path": "docs/reference/compat/string/upperFirst.md",
    "content": "# upperFirst (Lodash Compatibility)\n\n::: warning Use `upperFirst` from `es-toolkit`\n\nThis `upperFirst` function operates slowly due to conversion logic for handling `null` or `undefined`.\n\nUse the faster and more modern [upperFirst](../../string/upperFirst.md) from `es-toolkit` instead.\n\n:::\n\nConverts the first character of a string to uppercase.\n\n```typescript\nconst upperCased = upperFirst(str);\n```\n\n## Usage\n\n### `upperFirst(str)`\n\nUse `upperFirst` when you want to capitalize only the first character of a string. The remaining characters stay unchanged.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\n// String starting with lowercase\nupperFirst('fred');\n// Returns: 'Fred'\n\n// String already starting with uppercase\nupperFirst('Fred');\n// Returns: 'Fred'\n\n// All uppercase string\nupperFirst('FRED');\n// Returns: 'FRED'\n```\n\n`null` or `undefined` is treated as an empty string.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\nupperFirst(null); // ''\nupperFirst(undefined); // ''\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to convert the first character to uppercase.\n\n#### Returns\n\n(`string`): Returns the string with the first character converted to uppercase.\n"
  },
  {
    "path": "docs/reference/compat/string/words.md",
    "content": "# words (Lodash Compatibility)\n\n::: warning Use `words` from `es-toolkit`\n\nThis `words` function operates slowly due to handling `null` or `undefined` and complex Unicode support.\n\nUse the faster and more modern [words](../../string/words.md) from `es-toolkit` instead.\n\n:::\n\nSplits a string into an array of words.\n\n```typescript\nconst wordArray = words(str, pattern);\n```\n\n## Usage\n\n### `words(str, pattern)`\n\nUse `words` when you want to split a string into words. By default, it recognizes English letters, numbers, emojis, etc., to extract words.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// Basic word extraction\nwords('fred, barney, & pebbles');\n// Returns: ['fred', 'barney', 'pebbles']\n\n// Extract words from camel case\nwords('camelCaseWord');\n// Returns: ['camel', 'Case', 'Word']\n\n// String with numbers\nwords('hello123world');\n// Returns: ['hello', '123', 'world']\n```\n\nYou can also extract words using a custom pattern.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// Extract words using regex\nwords('hello world', /\\w+/g);\n// Returns: ['hello', 'world']\n\n// Use string pattern\nwords('one-two-three', '-');\n// Returns: ['-']\n```\n\n`null` or `undefined` is treated as an empty array.\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\nwords(null); // []\nwords(undefined); // []\n```\n\n#### Parameters\n\n- `str` (`string`, optional): The string to split into words.\n- `pattern` (`RegExp | string`, optional): The pattern to match words. Defaults to a built-in Unicode word pattern.\n\n#### Returns\n\n(`string[]`): Returns an array of extracted words.\n"
  },
  {
    "path": "docs/reference/compat/util/bindAll.md",
    "content": "# bindAll (Lodash Compatibility)\n\nBinds methods of an object to the object itself.\n\n```typescript\nconst boundObject = bindAll(object, methodNames);\n```\n\n## Usage\n\n### `bindAll(object, ...methodNames)`\n\nUse `bindAll` when you want to fix the `this` value of specific methods to the object itself. This is useful for maintaining the `this` context when passing methods as event handlers or callbacks.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst view = {\n  label: 'docs',\n  click: function () {\n    console.log('clicked ' + this.label);\n  },\n};\n\n// Bind method to object\nbindAll(view, 'click');\ndocument.addEventListener('click', view.click);\n// => Logs 'clicked docs' when clicked\n```\n\nYou can bind multiple methods at once.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  name: 'example',\n  greet() {\n    return `Hello, ${this.name}!`;\n  },\n  farewell() {\n    return `Goodbye, ${this.name}!`;\n  },\n};\n\n// Bind multiple methods with array\nbindAll(obj, ['greet', 'farewell']);\n\nconst greet = obj.greet;\ngreet(); // 'Hello, example!' (this is correctly bound)\n```\n\nIt can handle numeric and special keys.\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  '-0': function () {\n    return 'negative zero';\n  },\n  '0': function () {\n    return 'zero';\n  },\n};\n\nbindAll(obj, -0);\nobj['-0'](); // 'negative zero'\n```\n\n#### Parameters\n\n- `object` (`Object`): The object to bind methods to.\n- `methodNames` (`...(string | string[] | number | IArguments)`): The method names to bind. Can be specified as individual strings, arrays, numbers, or Arguments objects.\n\n#### Returns\n\n(`Object`): Returns the original object with bound methods.\n"
  },
  {
    "path": "docs/reference/compat/util/cond.md",
    "content": "# cond (Lodash Compatibility)\n\n::: warning Use if-else or switch statements instead\n\nThis `cond` function performs slowly due to complex iteratee processing, array transformations, and function validation.\n\nUse faster and clearer if-else or switch statements instead.\n\n:::\n\nCreates a function that iterates through condition-function pairs, checking conditions in order and executing the first matching function.\n\n```typescript\nconst conditionFunction = cond(pairs);\n```\n\n## Usage\n\n### `cond(pairs)`\n\nUse `cond` when you want to check multiple conditions in order and execute the function corresponding to the first true condition. This is useful for expressing complex conditional logic in a functional style.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\n// Basic usage\nconst getValue = cond([\n  [x => x > 10, x => 'big'],\n  [x => x > 5, x => 'medium'],\n  [x => x > 0, x => 'small'],\n  [() => true, () => 'zero or negative'],\n]);\n\nconsole.log(getValue(15)); // \"big\"\nconsole.log(getValue(8)); // \"medium\"\nconsole.log(getValue(3)); // \"small\"\nconsole.log(getValue(-1)); // \"zero or negative\"\n```\n\nYou can also use it for object pattern matching.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst processUser = cond([\n  [user => user.role === 'admin', user => `Admin: ${user.name}`],\n  [user => user.role === 'user', user => `User: ${user.name}`],\n  [user => user.role === 'guest', user => `Guest: ${user.name}`],\n  [() => true, () => 'Unknown role'],\n]);\n\nconsole.log(processUser({ name: 'John', role: 'admin' })); // \"Admin: John\"\nconsole.log(processUser({ name: 'Jane', role: 'user' })); // \"User: Jane\"\n```\n\nOnly the first true condition is executed. If all conditions are false, it returns `undefined`.\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst checkValue = cond([\n  [x => x > 10, x => 'greater than 10'],\n  [x => x < 5, x => 'less than 5'],\n]);\n\nconsole.log(checkValue(15)); // \"greater than 10\"\nconsole.log(checkValue(3)); // \"less than 5\"\nconsole.log(checkValue(7)); // undefined (no matching condition)\n```\n\n#### Parameters\n\n- `pairs` (`Array<[predicate, func]>`): An array of pairs consisting of condition functions and functions to execute.\n\n#### Returns\n\n(`(...args: any[]) => unknown`): Returns a new function that checks conditions and executes the first matching function.\n"
  },
  {
    "path": "docs/reference/compat/util/constant.md",
    "content": "# constant (Lodash Compatibility)\n\n::: warning Use arrow functions instead\n\nThis `constant` function creates an unnecessary function wrapper for simple tasks, which creates unnecessary overhead.\n\nInstead, use a simpler and more intuitive arrow function.\n\n:::\n\nCreates a function that always returns the given value.\n\n```typescript\nconst constantFunction = constant(value);\n```\n\n## Usage\n\n### `constant(value)`\n\nUse `constant` when you need a function that always returns a specific value. It's useful in functional programming when providing default values or as callback functions.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// Basic usage\nconst always42 = constant(42);\nconsole.log(always42()); // 42\n\nconst alwaysHello = constant('hello');\nconsole.log(alwaysHello()); // \"hello\"\n```\n\nIt's convenient when used with array map or other higher-order functions.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// Fill all elements with 0\nconst numbers = [1, 2, 3, 4, 5];\nconst zeros = numbers.map(constant(0));\nconsole.log(zeros); // [0, 0, 0, 0, 0]\n\n// Replace all elements with the same object\nconst users = ['alice', 'bob', 'charlie'];\nconst defaultUser = users.map(constant({ role: 'user', active: true }));\nconsole.log(defaultUser);\n// [{ role: 'user', active: true }, { role: 'user', active: true }, { role: 'user', active: true }]\n```\n\nCan also be used for providing conditional default values.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nfunction processData(data, fallback = constant('default value')) {\n  return data || fallback();\n}\n\nconsole.log(processData(null)); // \"default value\"\nconsole.log(processData('actual data')); // \"actual data\"\n```\n\nMaintains object references.\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nconst getObj = constant(obj);\n\nconsole.log(getObj() === obj); // true (same object reference)\n```\n\n#### Parameters\n\n- `value` (`T`, optional): The value the function should return. If not provided, returns `undefined`.\n\n#### Returns\n\n(`() => T | undefined`): Returns a new function that always returns the given value.\n"
  },
  {
    "path": "docs/reference/compat/util/defaultTo.md",
    "content": "# defaultTo (Lodash Compatibility)\n\nReturns the default value for values that are `null`, `undefined`, or `NaN`.\n\n```typescript\nconst result = defaultTo(value, defaultValue);\n```\n\n## Usage\n\n### `defaultTo(value, defaultValue)`\n\nUse `defaultTo` when you want to provide a default value when a value is `null`, `undefined`, or `NaN`. It's useful for handling invalid values from API responses or user input.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\n// Basic usage\nconsole.log(defaultTo(null, 'default')); // 'default'\nconsole.log(defaultTo(undefined, 'default')); // 'default'\nconsole.log(defaultTo(NaN, 0)); // 0\nconsole.log(defaultTo('actual', 'default')); // 'actual'\nconsole.log(defaultTo(123, 0)); // 123\n```\n\nCan be used for processing API responses.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nfunction processUserData(response) {\n  return {\n    name: defaultTo(response.name, 'No name'),\n    age: defaultTo(response.age, 0),\n    score: defaultTo(response.score, 0), // Includes NaN handling\n  };\n}\n\n// When API returns incomplete data\nconst userData = processUserData({\n  name: null,\n  age: undefined,\n  score: NaN,\n});\n\nconsole.log(userData);\n// { name: 'No name', age: 0, score: 0 }\n```\n\nCan also be used with arrays or objects.\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nconst users = defaultTo(response.users, []);\nconst metadata = defaultTo(response.metadata, {});\n\n// Only handles null/undefined/NaN, not empty arrays or objects\nconsole.log(defaultTo([], ['default'])); // [] (empty array but valid value)\nconsole.log(defaultTo({}, { default: true })); // {} (empty object but valid value)\n```\n\n#### Parameters\n\n- `value` (`T | null | undefined`): The value to check.\n- `defaultValue` (`D`): The default value to return when the value is `null`, `undefined`, or `NaN`.\n\n#### Returns\n\n(`T | D`): Returns the original value if valid, otherwise returns the default value.\n"
  },
  {
    "path": "docs/reference/compat/util/eq.md",
    "content": "# eq (Lodash Compatibility)\n\nChecks if two values are equivalent using SameValueZero comparison.\n\n```typescript\nconst isEqual = eq(value, other);\n```\n\n## Usage\n\n### `eq(value, other)`\n\nUse `eq` when you want to check if two values are equivalent. Unlike regular `===` comparison, it returns `true` when comparing `NaN` with `NaN`.\n\n```typescript\nimport { eq } from 'es-toolkit/compat';\n\n// Basic usage\nconsole.log(eq(1, 1)); // true\nconsole.log(eq(0, -0)); // true (SameValueZero considers 0 and -0 equal)\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq('a', 'a')); // true\nconsole.log(eq('a', 'b')); // false\n```\n\nBehaves differently from `Object.is()`.\n\n```typescript\n// Using eq\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq(0, -0)); // true\n\n// Using Object.is (faster)\nconsole.log(Object.is(NaN, NaN)); // true\nconsole.log(Object.is(0, -0)); // false (Object.is considers 0 and -0 different)\n\n// Using ===\nconsole.log(NaN === NaN); // false\nconsole.log(0 === -0); // true\n```\n\n#### Parameters\n\n- `value` (`any`): The first value to compare.\n- `other` (`any`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the values are equivalent, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/util/gt.md",
    "content": "# gt (Lodash Compatibility)\n\n::: warning Use the `>` operator instead\n\nThis `gt` function performs slower due to additional processing like `toNumber` function calls and string type checking.\n\nInstead, use the faster and more modern `>` operator.\n\n:::\n\nChecks if value is greater than other.\n\n```typescript\nconst result = gt(value, other);\n```\n\n## Usage\n\n### `gt(value, other)`\n\nUse `gt` when you want to compare two values to check if the first value is greater than the second. Strings are compared lexicographically, and other types are converted to numbers for comparison.\n\n```typescript\nimport { gt } from 'es-toolkit/compat';\n\ngt(3, 1);\n// Returns: true\n\ngt(3, 3);\n// Returns: false\n\ngt(1, 3);\n// Returns: false\n\n// String comparison (lexicographical)\ngt('def', 'abc');\n// Returns: true\n\ngt('abc', 'def');\n// Returns: false\n\n// Other types are converted to numbers for comparison\ngt('10', 5);\n// Returns: true (10 > 5)\n\ngt(1, null);\n// Returns: true (1 > 0)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The first value to compare.\n- `other` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the first value is greater than the second, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/util/gte.md",
    "content": "# gte (Lodash Compatibility)\n\n::: warning Use the `>=` operator instead\n\nThis `gte` function performs slower due to additional processing like `toNumber` function calls and string type checking.\n\nInstead, use the faster and more modern `>=` operator.\n\n:::\n\nChecks if value is greater than or equal to other.\n\n```typescript\nconst result = gte(value, other);\n```\n\n## Usage\n\n### `gte(value, other)`\n\nUse `gte` when you want to compare two values to check if the first value is greater than or equal to the second. Strings are compared lexicographically, and other types are converted to numbers for comparison.\n\n```typescript\nimport { gte } from 'es-toolkit/compat';\n\ngte(3, 1);\n// Returns: true\n\ngte(3, 3);\n// Returns: true\n\ngte(1, 3);\n// Returns: false\n\n// String comparison (lexicographical)\ngte('def', 'abc');\n// Returns: true\n\ngte('abc', 'def');\n// Returns: false\n\n// Other types are converted to numbers for comparison\ngte('10', 5);\n// Returns: true (10 >= 5)\n\ngte(1, null);\n// Returns: true (1 >= 0)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The first value to compare.\n- `other` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the first value is greater than or equal to the second, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/util/invoke.md",
    "content": "# invoke (Lodash Compatibility)\n\n::: warning Call methods directly\n\nThis `invoke` function performs slower due to complex processing like path resolution, object traversal, and `get` function calls.\n\nInstead, use faster and more modern direct method calls.\n\n:::\n\nInvokes the method at the path of the object with the given arguments.\n\n```typescript\nconst result = invoke(object, path, args);\n```\n\n## Usage\n\n### `invoke(object, path, args)`\n\nUse `invoke` when you want to call a method at a specific path of an object with arguments. The path can be specified as a dot notation string or an array of property keys.\n\n```typescript\nimport { invoke } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// Specify path using dot notation\ninvoke(object, 'a.b', [1, 2]);\n// Returns: 3\n\n// Specify path using array\ninvoke(object, ['a', 'b'], [1, 2]);\n// Returns: 3\n\n// Non-existent path\ninvoke(object, 'a.c.d', [1, 2]);\n// Returns: undefined\n\n// Various types of arguments\nconst obj = {\n  calculate: {\n    sum: function (...numbers) {\n      return numbers.reduce((a, b) => a + b, 0);\n    },\n    multiply: function (a, b) {\n      return a * b;\n    },\n  },\n};\n\ninvoke(obj, 'calculate.sum', [1, 2, 3, 4]);\n// Returns: 10\n\ninvoke(obj, ['calculate', 'multiply'], [5, 6]);\n// Returns: 30\n```\n\n#### Parameters\n\n- `object` (`unknown`): The object to invoke the method on.\n- `path` (`PropertyKey | PropertyKey[]`): The path of the method to invoke. Can be a string, symbol, number, or an array of these.\n- `args` (`any[]`): The array of arguments to invoke the method with.\n\n#### Returns\n\n(`any`): Returns the result of the invoked method. If the method doesn't exist, returns `undefined`.\n"
  },
  {
    "path": "docs/reference/compat/util/iteratee.md",
    "content": "# iteratee (Lodash Compatibility)\n\n::: warning Use direct functions or property access instead\n\nThis `iteratee` function performs slowly due to complex type conversions and handling of various cases.\n\nInstead, use faster and more modern direct functions or property access.\n\n:::\n\nCreates a function that returns a value from an element.\n\n```typescript\nconst getter = iteratee(source);\n```\n\n## Usage\n\n### `iteratee(value?)`\n\nUse `iteratee` when you want to create a function that extracts values from collection elements or checks conditions. It performs different actions based on the type of argument provided.\n\n```typescript\nimport { iteratee } from 'es-toolkit/compat';\n\n// Function: Returns the given function as-is\nconst func = iteratee(object => object.a);\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(func);\n// Returns: [1, 2, 3]\n\n// Property name: Function that returns the value of that property\nconst getA = iteratee('a');\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(getA);\n// Returns: [1, 2, 3]\n\n// Object: Function that checks if it matches the given object\nconst matchesObj = iteratee({ a: 1 });\n[\n  { a: 1, b: 2 },\n  { a: 2, b: 3 },\n  { a: 1, c: 4 },\n].find(matchesObj);\n// Returns: { a: 1, b: 2 }\n\n// Property-value pair: Function that checks if the property matches a specific value\nconst matchesProperty = iteratee(['a', 1]);\n[{ a: 1 }, { a: 2 }, { a: 3 }].find(matchesProperty);\n// Returns: { a: 1 }\n\n// null or no argument: Function that returns the element as-is\nconst identity = iteratee();\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(identity);\n// Returns: [{ a: 1 }, { a: 2 }, { a: 3 }]\n```\n\nActions based on argument type:\n\n- **Function**: Returns the given function as-is.\n- **Property name**: Returns the value of the given property from the element.\n- **Property-value pair**: Returns a boolean indicating whether the element's property matches the given value.\n- **Partial object**: Returns a boolean indicating whether the element matches the partial object's properties and values.\n- **null or no argument**: Returns a function that returns the element as-is.\n\n#### Parameters\n\n- `value` (`symbol | number | string | object | null | ((...args: any[]) => unknown)`, optional): The value to convert to an iteratee. Default is `null`.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns the new iteratee function.\n"
  },
  {
    "path": "docs/reference/compat/util/lt.md",
    "content": "# lt (Lodash Compatibility)\n\n::: warning Use the `<` operator instead\n\nThis `lt` function performs slower due to additional processing like `toNumber` function calls and string type checking.\n\nInstead, use the faster and more modern `<` operator.\n\n:::\n\nChecks if value is less than other.\n\n```typescript\nconst result = lt(value, other);\n```\n\n## Usage\n\n### `lt(value, other)`\n\nUse `lt` when you want to compare two values to check if the first value is less than the second. Strings are compared lexicographically, and other types are converted to numbers for comparison.\n\n```typescript\nimport { lt } from 'es-toolkit/compat';\n\nlt(1, 3);\n// Returns: true\n\nlt(3, 3);\n// Returns: false\n\nlt(3, 1);\n// Returns: false\n\n// String comparison (lexicographical)\nlt('abc', 'def');\n// Returns: true\n\nlt('def', 'abc');\n// Returns: false\n\n// Other types are converted to numbers for comparison\nlt('5', 10);\n// Returns: true (5 < 10)\n\nlt(null, 1);\n// Returns: true (0 < 1)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The first value to compare.\n- `other` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the first value is less than the second, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/util/lte.md",
    "content": "# lte (Lodash Compatibility)\n\n::: warning Use the `<=` operator instead\n\nThis `lte` function performs slower due to additional processing like `toNumber` function calls and string type checking.\n\nInstead, use the faster and more modern `<=` operator.\n\n:::\n\nChecks if value is less than or equal to other.\n\n```typescript\nconst result = lte(value, other);\n```\n\n## Usage\n\n### `lte(value, other)`\n\nUse `lte` when you want to compare two values to check if the first value is less than or equal to the second. Strings are compared lexicographically, and other types are converted to numbers for comparison.\n\n```typescript\nimport { lte } from 'es-toolkit/compat';\n\nlte(1, 3);\n// Returns: true\n\nlte(3, 3);\n// Returns: true\n\nlte(3, 1);\n// Returns: false\n\n// String comparison (lexicographical)\nlte('abc', 'def');\n// Returns: true\n\nlte('def', 'abc');\n// Returns: false\n\n// Other types are converted to numbers for comparison\nlte('10', 5);\n// Returns: false (10 <= 5)\n\nlte(null, 0);\n// Returns: true (0 <= 0)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The first value to compare.\n- `other` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the first value is less than or equal to the second, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/compat/util/method.md",
    "content": "# method (Lodash Compatibility)\n\nCreates a function that invokes a method at the specified path with the given arguments.\n\n```typescript\nconst methodFunc = method(path, ...args);\n```\n\n## Usage\n\n### `method(path, ...args)`\n\nCreates a function that calls a method at a specific path on an object with predefined arguments. This is useful for reusing method calls in functional programming or with array methods like `map`.\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// Create a method calling function\nconst add = method('a.b', 1, 2);\nconsole.log(add(object)); // => 3\n\n// Call methods on each object in an array\nconst objects = [{ calc: { sum: (a, b) => a + b } }, { calc: { sum: (a, b) => a * b } }];\n\nconst calculate = method('calc.sum', 5, 3);\nobjects.map(calculate); // => [8, 15]\n```\n\nIt can handle nested paths as well.\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst obj = {\n  users: {\n    getName: function (prefix) {\n      return prefix + this.name;\n    },\n    name: 'John',\n  },\n};\n\nconst getUserName = method('users.getName', 'Mr. ');\ngetUserName(obj); // => 'Mr. John'\n```\n\n#### Parameters\n\n- `path` (`PropertyKey | PropertyKey[]`): The path of the method to invoke.\n- `...args` (`any[]`): The arguments to pass to the method.\n\n#### Returns\n\n(`(object: any) => any`): Returns a function that takes an object and calls the method at the specified path with the given arguments.\n"
  },
  {
    "path": "docs/reference/compat/util/methodOf.md",
    "content": "# methodOf (Lodash Compatibility)\n\nCreates a function that takes a path and invokes a method on the given object with predefined arguments.\n\n```typescript\nconst pathInvoker = methodOf(object, ...args);\n```\n\n## Usage\n\n### `methodOf(object, ...args)`\n\nCreates a function that calls a method on a specific object with predefined arguments. Unlike `method`, this fixes the object and allows you to specify the path later. This is useful when you want to call different methods on the same object with the same arguments.\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// Pre-bind the object and arguments\nconst callMethod = methodOf(object, 1, 2);\nconsole.log(callMethod('a.b')); // => 3\n\n// Call multiple paths with the same object and arguments\nconst calculator = {\n  add: (a, b) => a + b,\n  multiply: (a, b) => a * b,\n  subtract: (a, b) => a - b,\n};\n\nconst compute = methodOf(calculator, 10, 5);\nconsole.log(compute('add')); // => 15\nconsole.log(compute('multiply')); // => 50\nconsole.log(compute('subtract')); // => 5\n```\n\nIt can also be used with nested objects.\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst data = {\n  users: {\n    findById: function (id) {\n      return `User ${id}`;\n    },\n    findByName: function (name) {\n      return `Found ${name}`;\n    },\n  },\n};\n\nconst userFinder = methodOf(data, 'john');\nuserFinder('users.findById'); // => 'User john'\nuserFinder('users.findByName'); // => 'Found john'\n```\n\n#### Parameters\n\n- `object` (`object`): The object to invoke methods on.\n- `...args` (`any[]`): The arguments to pass to the methods.\n\n#### Returns\n\n(`(path: PropertyKey | PropertyKey[]) => any`): Returns a function that takes a path and calls the method at the specified path on the object with the given arguments.\n"
  },
  {
    "path": "docs/reference/compat/util/now.md",
    "content": "# now (Lodash Compatibility)\n\n::: warning Use `Date.now()` instead\n\nThis `now` function is a simple wrapper that calls `Date.now()` and represents unnecessary abstraction.\n\nUse the faster and more direct `Date.now()` instead.\n\n:::\n\nReturns the current time in milliseconds.\n\n```typescript\nconst currentTime = now();\n```\n\n## Usage\n\n### `now()`\n\nReturns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. This is useful for time measurement and timestamp generation.\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\n// Get the current time\nconst currentTime = now();\nconsole.log(currentTime); // => 1703925600000 (example)\n\n// Measure execution time\nconst startTime = now();\n// Some time-consuming operation\nconst endTime = now();\nconsole.log(`Operation time: ${endTime - startTime}ms`);\n\n// Use as timestamp\nconst timestamp = now();\nconst logMessage = `[${timestamp}] Operation completed`;\n```\n\nReturns the same result as `Date.now()`.\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\nconsole.log(now() === Date.now()); // => true (when called at the same time)\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`number`): Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC to the present.\n"
  },
  {
    "path": "docs/reference/compat/util/over.md",
    "content": "# over (Lodash Compatibility)\n\n::: warning Use array methods directly instead\n\nThis `over` function incurs additional overhead in the process of mapping functions to arrays.\n\nUse the faster and more modern array `map` method instead.\n\n:::\n\nCreates a function that passes the same arguments to given functions and returns the results as an array.\n\n```typescript\nconst multiCall = over(funcs);\n```\n\n## Usage\n\n### `over(...iteratees)`\n\nTakes multiple functions and creates a function that calls each with the same arguments and returns the results as an array. This is useful for performing multiple calculations on the same data.\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\n// Use math functions together\nconst mathOperations = over([Math.max, Math.min]);\nmathOperations(1, 2, 3, 4);\n// => [4, 1]\n\n// Can also pass individual functions\nconst operations = over(Math.max, Math.min);\noperations(1, 2, 3, 4);\n// => [4, 1]\n\n// Extract object properties\nconst getProperties = over(['name', 'age']);\ngetProperties({ name: 'John', age: 30 });\n// => ['John', 30]\n\n// Check conditions\nconst validators = over([\n  { name: 'John' }, // Object matching\n  { age: 30 },\n]);\nvalidators({ name: 'John', age: 30 });\n// => [true, true]\n```\n\nIt can also handle nested paths.\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\nconst data = {\n  user: { name: 'John', profile: { age: 30 } },\n  settings: { theme: 'dark' },\n};\n\nconst getInfo = over(['user.name', 'user.profile.age', 'settings.theme']);\ngetInfo(data);\n// => ['John', 30, 'dark']\n```\n\n#### Parameters\n\n- `...iteratees` (`Array<Function | string | object | Array>`): The functions to call or property paths. Can be passed as an array or individual arguments.\n\n#### Returns\n\n(`(...args: any[]) => any[]`): Returns a function that takes arguments and returns an array of results from each function.\n"
  },
  {
    "path": "docs/reference/compat/util/overEvery.md",
    "content": "# overEvery (Lodash Compatibility)\n\n::: warning Use `Array.every` instead\n\nThis `overEvery` function incurs additional overhead in the process of converting and checking predicate functions.\n\nUse the faster and more modern `Array.every` method instead.\n\n:::\n\nCreates a function that checks if all predicate functions return truthy for the given value.\n\n```typescript\nconst allValidator = overEvery(predicates);\n```\n\n## Usage\n\n### `overEvery(...predicates)`\n\nTakes multiple predicate functions and creates a function that checks if the given value satisfies all conditions. This is useful for compound condition checking or data validation.\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// Check string conditions\nconst isValidString = overEvery([\n  value => typeof value === 'string',\n  value => value.length > 3,\n  value => value.includes('o'),\n]);\n\nisValidString('hello'); // => true\nisValidString('hi'); // => false (length is 3 or less)\nisValidString('test'); // => false (no 'o')\n\n// Check number range\nconst isInRange = overEvery([\n  num => num >= 0,\n  num => num <= 100,\n  num => num % 1 === 0, // Check if integer\n]);\n\nisInRange(50); // => true\nisInRange(-5); // => false (less than 0)\nisInRange(150); // => false (greater than 100)\nisInRange(50.5); // => false (not an integer)\n```\n\nYou can also check object properties.\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// Check object properties\nconst isValidUser = overEvery([\n  'name', // Check if name property is truthy\n  { age: 30 }, // Check if age is 30\n  ['active', true], // Check if active is true\n]);\n\nisValidUser({ name: 'John', age: 30, active: true }); // => true\nisValidUser({ name: '', age: 30, active: true }); // => false (name is empty string)\nisValidUser({ name: 'John', age: 25, active: true }); // => false (age is different)\n```\n\n#### Parameters\n\n- `...predicates` (`Array<Function | string | object | Array>`): The predicate functions to check. Can be functions, property names, objects, or property-value pairs.\n\n#### Returns\n\n(`(...args: any[]) => boolean`): Returns a function that returns `true` if all conditions are satisfied, `false` if any condition is not satisfied.\n"
  },
  {
    "path": "docs/reference/compat/util/overSome.md",
    "content": "# overSome (Lodash Compatibility)\n\n::: warning Use `Array.some` instead\n\nThis `overSome` function incurs additional overhead in the process of converting and checking predicate functions.\n\nUse the faster and more modern `Array.some` method instead.\n\n:::\n\nCreates a function that checks if any of the predicate functions return truthy for the given value.\n\n```typescript\nconst anyValidator = overSome(predicates);\n```\n\n## Usage\n\n### `overSome(...predicates)`\n\nTakes multiple predicate functions and creates a function that checks if the given value satisfies any of the conditions. This is useful for flexible condition checking or alternative validation.\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// Check if value is string or number\nconst isStringOrNumber = overSome([value => typeof value === 'string', value => typeof value === 'number']);\n\nisStringOrNumber('hello'); // => true\nisStringOrNumber(42); // => true\nisStringOrNumber(true); // => false\n\n// Check if any of multiple conditions are satisfied\nconst hasValidProperty = overSome([\n  obj => obj.name && obj.name.length > 0,\n  obj => obj.email && obj.email.includes('@'),\n  obj => obj.phone && obj.phone.length >= 10,\n]);\n\nhasValidProperty({ name: 'John' }); // => true\nhasValidProperty({ email: 'john@example.com' }); // => true\nhasValidProperty({ phone: '1234567890' }); // => true\nhasValidProperty({ age: 30 }); // => false\n```\n\nYou can also check object properties.\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// Check if any condition matches\nconst matchesAnyCondition = overSome([\n  'isActive', // Check if isActive property is truthy\n  { role: 'admin' }, // Check if role is 'admin'\n  ['status', 'vip'], // Check if status is 'vip'\n]);\n\nmatchesAnyCondition({ isActive: true }); // => true\nmatchesAnyCondition({ role: 'admin' }); // => true\nmatchesAnyCondition({ status: 'vip' }); // => true\nmatchesAnyCondition({ role: 'user', status: 'normal' }); // => false\n```\n\n#### Parameters\n\n- `...predicates` (`Array<Function | string | object | Array>`): The predicate functions to check. Can be functions, property names, objects, or property-value pairs.\n\n#### Returns\n\n(`(...args: any[]) => boolean`): Returns a function that returns `true` if any condition is satisfied, `false` if none are satisfied.\n"
  },
  {
    "path": "docs/reference/compat/util/stubArray.md",
    "content": "# stubArray (Lodash Compatibility)\n\n::: warning Use `[]` directly instead\n\nThis `stubArray` function is a simple wrapper that returns an empty array and represents unnecessary abstraction.\n\nUse the faster and more direct `[]` instead.\n\n:::\n\nAlways returns a new empty array.\n\n```typescript\nconst emptyArray = stubArray();\n```\n\n## Usage\n\n### `stubArray()`\n\nA function that always returns a new empty array. Use this when you need an empty array as a default value or when you need consistent return values in functional programming.\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\n// Returns an empty array\nconst emptyArray = stubArray();\nconsole.log(emptyArray); // => []\n\n// Use as default value in array methods\nconst items = [1, 2, 3];\nconst result = items.filter(x => x > 5) || stubArray();\nconsole.log(result); // => []\n\n// Use in functional programming\nconst getData = () => stubArray();\nconst data = getData();\ndata.push('item'); // Safe because it's a new array\n```\n\nReturns a new array instance each time.\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\nconst arr1 = stubArray();\nconst arr2 = stubArray();\n\nconsole.log(arr1 === arr2); // => false (different instances)\nconsole.log(Array.isArray(arr1)); // => true\nconsole.log(arr1.length); // => 0\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`any[]`): Returns a new empty array.\n"
  },
  {
    "path": "docs/reference/compat/util/stubFalse.md",
    "content": "# stubFalse (Lodash Compatibility)\n\n::: warning Use `false` directly instead\n\nThis `stubFalse` function is a simple wrapper that returns `false` and represents unnecessary abstraction.\n\nUse the faster and more direct `false` value instead.\n\n:::\n\nAlways returns `false`.\n\n```typescript\nconst falseValue = stubFalse();\n```\n\n## Usage\n\n### `stubFalse()`\n\nA function that always returns `false`. This is useful when you need a consistent false value in functional programming or as a default value in conditional callbacks.\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\n// Returns false\nconst result = stubFalse();\nconsole.log(result); // => false\n\n// Use as default condition in array filtering\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = numbers.filter(stubFalse); // Removes all elements\nconsole.log(evenNumbers); // => []\n\n// Use in functional programming\nconst isValid = condition => (condition ? someValidation : stubFalse);\nconst validator = isValid(false);\nconsole.log(validator()); // => false\n```\n\nReturns the same `false` value every time.\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\nconst result1 = stubFalse();\nconst result2 = stubFalse();\n\nconsole.log(result1 === result2); // => true\nconsole.log(typeof result1); // => 'boolean'\nconsole.log(result1); // => false\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`false`): Always returns `false`.\n"
  },
  {
    "path": "docs/reference/compat/util/stubObject.md",
    "content": "# stubObject (Lodash Compatibility)\n\n::: warning Use `{}` directly instead\n\nThis `stubObject` function is a simple wrapper that returns an empty object and represents unnecessary abstraction.\n\nUse the faster and more direct `{}` instead.\n\n:::\n\nAlways returns a new empty object.\n\n```typescript\nconst emptyObject = stubObject();\n```\n\n## Usage\n\n### `stubObject()`\n\nA function that always returns a new empty object. Use this when you need an empty object as a default value or when you need consistent return values in functional programming.\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\n// Returns an empty object\nconst emptyObject = stubObject();\nconsole.log(emptyObject); // => {}\n\n// Use as default value\nfunction processData(data = stubObject()) {\n  return { ...data, processed: true };\n}\n\nconsole.log(processData()); // => { processed: true }\nconsole.log(processData({ name: 'John' })); // => { name: 'John', processed: true }\n\n// Use in functional programming\nconst createEmpty = () => stubObject();\nconst obj = createEmpty();\nobj.newProperty = 'value'; // Safe because it's a new object\n```\n\nReturns a new object instance each time.\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\nconst obj1 = stubObject();\nconst obj2 = stubObject();\n\nconsole.log(obj1 === obj2); // => false (different instances)\nconsole.log(typeof obj1); // => 'object'\nconsole.log(Object.keys(obj1).length); // => 0\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`any`): Returns a new empty object.\n"
  },
  {
    "path": "docs/reference/compat/util/stubString.md",
    "content": "# stubString (Lodash Compatibility)\n\n::: warning Use `''` directly instead\n\nThis `stubString` function is a simple wrapper that returns an empty string and represents unnecessary abstraction.\n\nUse the faster and more direct `''` instead.\n\n:::\n\nAlways returns an empty string.\n\n```typescript\nconst emptyString = stubString();\n```\n\n## Usage\n\n### `stubString()`\n\nA function that always returns an empty string. Use this when you need an empty string as a default value or when you need consistent return values in functional programming.\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\n// Returns an empty string\nconst emptyString = stubString();\nconsole.log(emptyString); // => ''\n\n// Use as default value\nfunction formatMessage(message = stubString()) {\n  return message || 'Default message';\n}\n\nconsole.log(formatMessage()); // => 'Default message'\nconsole.log(formatMessage('Hello')); // => 'Hello'\n\n// Use in functional programming\nconst createEmpty = () => stubString();\nconst str = createEmpty();\nconsole.log(str.length); // => 0\n```\n\nReturns the same empty string every time.\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\nconst str1 = stubString();\nconst str2 = stubString();\n\nconsole.log(str1 === str2); // => true\nconsole.log(typeof str1); // => 'string'\nconsole.log(str1.length); // => 0\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`string`): Always returns an empty string.\n"
  },
  {
    "path": "docs/reference/compat/util/stubTrue.md",
    "content": "# stubTrue (Lodash Compatibility)\n\n::: warning Use `true` literal instead\n\nThis `stubTrue` function performs slowly due to unnecessary function calls.\n\nUse the faster and more modern `true` literal instead.\n\n:::\n\nAlways returns the `true` value.\n\n```typescript\nconst result = stubTrue();\n```\n\n## Usage\n\n### `stubTrue()`\n\nUse `stubTrue` when you need a callback function or default value that always returns `true`. This is useful for providing a consistent `true` value in array method filtering or conditional logic.\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// Filter that keeps all elements in an array\nconst items = [1, 2, 3, 4, 5];\nconst allItems = items.filter(stubTrue);\nconsole.log(allItems); // [1, 2, 3, 4, 5]\n```\n\nIt can also be used as a default value in conditional settings.\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// Options that are enabled by default\nconst defaultOptions = {\n  enableFeatureA: stubTrue(),\n  enableFeatureB: stubTrue(),\n  enableFeatureC: stubTrue(),\n};\n\nconsole.log(defaultOptions); // { enableFeatureA: true, enableFeatureB: true, enableFeatureC: true }\n```\n\n#### Parameters\n\nNone.\n\n#### Returns\n\n(`boolean`): Always returns `true`.\n"
  },
  {
    "path": "docs/reference/compat/util/times.md",
    "content": "# times (Lodash Compatibility)\n\nExecutes a function the given number of times and returns the results as an array.\n\n```typescript\nconst result = times(n, iteratee);\n```\n\n## Usage\n\n### `times(n, iteratee)`\n\nExecutes the iteratee function the given number of times and returns the results as an array. The current index is passed to the function in each iteration.\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\n// Array of indices from 0 to 2 multiplied by 2\ntimes(3, i => i * 2);\n// Returns: [0, 2, 4]\n\n// Generate the same value multiple times\ntimes(2, () => 'es-toolkit');\n// Returns: ['es-toolkit', 'es-toolkit']\n```\n\nIf no function is provided, it returns an array of indices.\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\ntimes(3);\n// Returns: [0, 1, 2]\n```\n\n#### Parameters\n\n- `n` (`number`): The number of times to iterate. Converted to an integer. Returns an empty array if less than 1 or not a safe integer.\n- `iteratee` (`(num: number) => T`, optional): The function to execute for each iteration. Receives the index as an argument. If not provided, returns the index as is.\n\n#### Returns\n\n(`T[]`): Returns an array of results from executing the function in each iteration.\n"
  },
  {
    "path": "docs/reference/compat/util/toArray.md",
    "content": "# toArray (Lodash Compatibility)\n\n::: warning Use Object.values and Array.from instead\n\nThis `toArray` function performs slowly due to complex type validation and handling of various inputs.\n\nInstead, use faster and more modern Object.values or Array.from.\n\n:::\n\nConverts a value to an array.\n\n```typescript\nconst array = toArray(value);\n```\n\n## Usage\n\n### `toArray(value)`\n\nConverts various values to arrays. Objects are converted to arrays of their values, array-like objects are converted to arrays, and everything else becomes an empty array.\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\n// Convert object to array of values\ntoArray({ a: 1, b: 2 });\n// Returns: [1, 2]\n\n// Convert string to array of characters\ntoArray('abc');\n// Returns: ['a', 'b', 'c']\n\n// Convert Map to array of values\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\ntoArray(map);\n// Returns: [['a', 1], ['b', 2]]\n```\n\nnull or undefined are converted to empty arrays.\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\ntoArray(null);\n// Returns: []\n\ntoArray(undefined);\n// Returns: []\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert to an array.\n\n#### Returns\n\n(`any[]`): Returns the converted array.\n"
  },
  {
    "path": "docs/reference/compat/util/toFinite.md",
    "content": "# toFinite (Lodash Compatibility)\n\nConverts a value to a finite number.\n\n```typescript\nconst finite = toFinite(value);\n```\n\n## Usage\n\n### `toFinite(value)`\n\nConverts a value to a finite number. Infinity values are converted to Number.MAX_VALUE, and NaN is treated as 0.\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\n// Regular numbers are returned as is\ntoFinite(3.2);\n// Returns: 3.2\n\n// Infinity is converted to MAX_VALUE\ntoFinite(Infinity);\n// Returns: 1.7976931348623157e+308\n\ntoFinite(-Infinity);\n// Returns: -1.7976931348623157e+308\n\n// String numbers are converted to numbers\ntoFinite('3.2');\n// Returns: 3.2\n```\n\nInvalid values are converted to 0.\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\ntoFinite(NaN);\n// Returns: 0\n\ntoFinite(Symbol.iterator);\n// Returns: 0\n\ntoFinite(null);\n// Returns: 0\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert.\n\n#### Returns\n\n(`number`): Returns the converted finite number.\n"
  },
  {
    "path": "docs/reference/compat/util/toInteger.md",
    "content": "# toInteger (Lodash Compatibility)\n\nConverts a value to an integer.\n\n```typescript\nconst integer = toInteger(value);\n```\n\n## Usage\n\n### `toInteger(value)`\n\nConverts a value to an integer. The decimal part is discarded, leaving only the integer part.\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\n// Convert decimal to integer\ntoInteger(3.2);\n// Returns: 3\n\n// Convert string number to integer\ntoInteger('3.2');\n// Returns: 3\n\n// Very small numbers become 0\ntoInteger(Number.MIN_VALUE);\n// Returns: 0\n\n// Infinity becomes MAX_VALUE\ntoInteger(Infinity);\n// Returns: 1.7976931348623157e+308\n```\n\nInvalid values are converted to 0.\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\ntoInteger(NaN);\n// Returns: 0\n\ntoInteger(Symbol.iterator);\n// Returns: 0\n\ntoInteger(null);\n// Returns: 0\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert.\n\n#### Returns\n\n(`number`): Returns the converted integer.\n"
  },
  {
    "path": "docs/reference/compat/util/toLength.md",
    "content": "# toLength (Lodash Compatibility)\n\nConverts a value to a valid array index.\n\n```typescript\nconst length = toLength(value);\n```\n\n## Usage\n\n### `toLength(value)`\n\nConverts a value to a valid array index. Limits to an integer between 0 and 2^32-1.\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\n// Convert decimal to integer\ntoLength(3.2);\n// Returns: 3\n\n// Negative numbers become 0\ntoLength(-1);\n// Returns: 0\n\n// Convert string numbers\ntoLength('42');\n// Returns: 42\n\n// Very large numbers are limited to the maximum value\ntoLength(Number.MAX_VALUE);\n// Returns: 4294967295\n```\n\nnull or undefined are converted to 0.\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\ntoLength(null);\n// Returns: 0\n\ntoLength(undefined);\n// Returns: 0\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert.\n\n#### Returns\n\n(`number`): Returns a valid array index between 0 and 2^32-1.\n"
  },
  {
    "path": "docs/reference/compat/util/toNumber.md",
    "content": "# toNumber (Lodash Compatibility)\n\n::: warning Use Number constructor instead\n\nThis `toNumber` function performs slowly due to symbol type validation and additional processing.\n\nUse the faster and more modern Number constructor instead.\n\n:::\n\nConverts a value to a number.\n\n```typescript\nconst number = toNumber(value);\n```\n\n## Usage\n\n### `toNumber(value)`\n\nConverts a value to a number. Symbols are treated as NaN.\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\n// Regular numbers are returned as is\ntoNumber(3.2);\n// Returns: 3.2\n\n// Convert string numbers\ntoNumber('3.2');\n// Returns: 3.2\n\n// Infinity is also returned as is\ntoNumber(Infinity);\n// Returns: Infinity\n\n// Very small numbers are also returned as is\ntoNumber(Number.MIN_VALUE);\n// Returns: 5e-324\n```\n\nSymbols and NaN are converted to NaN.\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\ntoNumber(Symbol.iterator);\n// Returns: NaN\n\ntoNumber(NaN);\n// Returns: NaN\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert.\n\n#### Returns\n\n(`number`): Returns the converted number.\n"
  },
  {
    "path": "docs/reference/compat/util/toPath.md",
    "content": "# toPath (Lodash Compatibility)\n\nConverts a deep key string to a path array.\n\n```typescript\nconst path = toPath(deepKey);\n```\n\n## Usage\n\n### `toPath(deepKey)`\n\nConverts a deep key string to a path array. Supports both dot notation and bracket notation.\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// Dot notation\ntoPath('a.b.c');\n// Returns: ['a', 'b', 'c']\n\n// Bracket notation\ntoPath('a[b][c]');\n// Returns: ['a', 'b', 'c']\n\n// Mixed notation\ntoPath('a.b[c].d');\n// Returns: ['a', 'b', 'c', 'd']\n\n// Quoted keys\ntoPath('a[\"b.c\"].d');\n// Returns: ['a', 'b.c', 'd']\n```\n\nIt also handles leading dots and empty keys.\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// Leading dot\ntoPath('.a.b.c');\n// Returns: ['', 'a', 'b', 'c']\n\n// Empty string\ntoPath('');\n// Returns: []\n\n// Complex path\ntoPath('.a[b].c.d[e][\"f.g\"].h');\n// Returns: ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n```\n\n#### Parameters\n\n- `deepKey` (`any`): The deep key string to convert to a path array.\n\n#### Returns\n\n(`string[]`): Returns an array of strings representing each part of the path.\n"
  },
  {
    "path": "docs/reference/compat/util/toPlainObject.md",
    "content": "# toPlainObject (Lodash Compatibility)\n\n::: warning Use Object.assign or spread operator instead\n\nThis `toPlainObject` function performs slowly due to complex prototype handling and key enumeration.\n\nUse the faster and more modern Object.assign({}, obj) or {...obj} instead.\n\n:::\n\nConverts a value to a plain object.\n\n```typescript\nconst plainObj = toPlainObject(value);\n```\n\n## Usage\n\n### `toPlainObject(value)`\n\nConverts a value to a plain object. Flattens inherited enumerable string key properties to own properties.\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// Constructor function and prototype\nfunction Foo() {\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nconst foo = new Foo();\ntoPlainObject(foo);\n// Returns: { b: 2, c: 3 }\n\n// Convert array to object\ntoPlainObject([1, 2, 3]);\n// Returns: { 0: 1, 1: 2, 2: 3 }\n```\n\nIt handles various object types.\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// Convert string to object\ntoPlainObject('abc');\n// Returns: { 0: 'a', 1: 'b', 2: 'c' }\n\n// Already plain object\nconst obj = { a: 1, b: 2 };\ntoPlainObject(obj);\n// Returns: { a: 1, b: 2 }\n```\n\n#### Parameters\n\n- `value` (`any`): The value to convert.\n\n#### Returns\n\n(`any`): Returns a plain object with inherited enumerable properties flattened to own properties.\n"
  },
  {
    "path": "docs/reference/compat/util/toSafeInteger.md",
    "content": "# toSafeInteger (Lodash Compatibility)\n\nConverts a value to a safe integer.\n\n```typescript\nconst result = toSafeInteger(value);\n```\n\n## Usage\n\n### `toSafeInteger(value)`\n\nUse `toSafeInteger` when you want to convert a value to a safe integer. A safe integer is an integer that can be accurately represented in JavaScript, within the range of `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER`.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(3.2);\n// Returns: 3\n\ntoSafeInteger(Infinity);\n// Returns: 9007199254740991\n\ntoSafeInteger('3.2');\n// Returns: 3\n\n// String conversion\ntoSafeInteger('abc');\n// Returns: 0\n\n// Handle special values\ntoSafeInteger(NaN);\n// Returns: 0\n\ntoSafeInteger(null);\n// Returns: 0\n\ntoSafeInteger(undefined);\n// Returns: 0\n```\n\nInfinity values are also limited to the safe range.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(-Infinity);\n// Returns: -9007199254740991 (Number.MIN_SAFE_INTEGER)\n\ntoSafeInteger(Number.MAX_VALUE);\n// Returns: 9007199254740991\n```\n\nUseful when using as array indices or ID values.\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\nfunction getArrayItem(arr: any[], index: any) {\n  const safeIndex = toSafeInteger(index);\n  return arr[safeIndex];\n}\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconsole.log(getArrayItem(items, '2.7')); // 'c' (index 2)\nconsole.log(getArrayItem(items, Infinity)); // undefined (out of range)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to convert.\n\n#### Returns\n\n(`number`): Returns the converted safe integer.\n"
  },
  {
    "path": "docs/reference/compat/util/toString.md",
    "content": "# toString (Lodash Compatibility)\n\n::: warning Use String constructor instead\n\nThis `toString` function performs slowly due to complex array handling and -0 special case processing.\n\nUse the faster and more modern String(value) instead.\n\n:::\n\nConverts a value to a string.\n\n```typescript\nconst str = toString(value);\n```\n\n## Usage\n\n### `toString(value)`\n\nConverts a value to a string. null and undefined become empty strings, and the sign of -0 is preserved.\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// Basic types\ntoString(null);\n// Returns: ''\n\ntoString(undefined);\n// Returns: ''\n\ntoString('hello');\n// Returns: 'hello'\n\ntoString(123);\n// Returns: '123'\n\n// Preserve -0 sign\ntoString(-0);\n// Returns: '-0'\n```\n\nArrays are converted recursively.\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// Convert array to string\ntoString([1, 2, 3]);\n// Returns: '1,2,3'\n\n// Nested arrays\ntoString([1, [2, 3], 4]);\n// Returns: '1,2,3,4'\n\n// Array containing -0\ntoString([1, 2, -0]);\n// Returns: '1,2,-0'\n\n// Array containing symbols\ntoString([Symbol('a'), Symbol('b')]);\n// Returns: 'Symbol(a),Symbol(b)'\n```\n\n#### Parameters\n\n- `value` (`any`): The value to convert.\n\n#### Returns\n\n(`string`): Returns the converted string. null and undefined return empty strings.\n"
  },
  {
    "path": "docs/reference/compat/util/uniqueId.md",
    "content": "# uniqueId (Lodash Compatibility)\n\n::: warning Recommend using crypto.randomUUID\n\nWhen generating unique identifiers, using crypto.randomUUID() is a safer and more standard approach.\n\nUse the faster and more modern crypto.randomUUID() instead.\n\n:::\n\nGenerates a unique string identifier.\n\n```typescript\nconst result = uniqueId('contact_');\n```\n\n## Usage\n\n### `uniqueId(prefix?: string): string`\n\nGenerates a unique string identifier. Guarantees uniqueness by incrementing an internal counter.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// Generate unique ID with prefix\nuniqueId('contact_'); // => 'contact_1'\nuniqueId('user_'); // => 'user_2'\n\n// Generate unique ID without prefix\nuniqueId(); // => '3'\nuniqueId(); // => '4'\n```\n\nThe internal counter increments with each successive call.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// Generate different IDs with each call\nconst ids = Array.from({ length: 5 }, () => uniqueId('item_'));\nconsole.log(ids);\n// => ['item_1', 'item_2', 'item_3', 'item_4', 'item_5']\n```\n\nUseful for generating unique IDs for DOM elements.\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// Generate unique IDs for form elements\nconst inputId = uniqueId('input_');\nconst labelId = uniqueId('label_');\n\nconsole.log(inputId); // => 'input_6'\nconsole.log(labelId); // => 'label_7'\n```\n\n#### Parameters\n\n- `prefix` (`string`, optional): The prefix string to prepend to the ID. If not provided, returns only the number.\n\n#### Returns\n\n(`string`): A unique identifier string. If a prefix is provided, returns in the format `prefix + number`, otherwise just the number.\n"
  },
  {
    "path": "docs/reference/error/AbortError.md",
    "content": "# AbortError\n\nAn error class representing an aborted or canceled operation.\n\n```typescript\nconst error = new AbortError(message);\n```\n\n## Usage\n\n### `new AbortError(message?)`\n\nAn error class used when an operation is aborted or canceled. It is thrown when operations like [debounce](../function/debounce.md) or [delay](../promise/delay.md) are canceled with an `AbortSignal`.\n\n```typescript\nimport { AbortError } from 'es-toolkit/error';\n\n// Create an error with the default message.\nthrow new AbortError();\n// Error message: 'The operation was aborted'\n\n// Create an error with a custom message.\nthrow new AbortError('File upload was canceled');\n// Error message: 'File upload was canceled'\n```\n\nAn example of using it with AbortSignal.\n\n```typescript\nimport { AbortError, delay } from 'es-toolkit';\n\nasync function fetchData(signal: AbortSignal) {\n  try {\n    await delay(1000, { signal });\n    return 'Data loaded';\n  } catch (error) {\n    if (error instanceof AbortError) {\n      console.log('Operation was canceled');\n    }\n    throw error;\n  }\n}\n\nconst controller = new AbortController();\ncontroller.abort(); // Cancel operation\nawait fetchData(controller.signal); // Throws AbortError\n```\n\n#### Parameters\n\n- `message` (`string`, optional): The error message. Defaults to `'The operation was aborted'`.\n\n#### Returns\n\n(`AbortError`): Returns an error instance representing an aborted operation. It inherits from `Error` and the `name` property is `'AbortError'`.\n"
  },
  {
    "path": "docs/reference/error/TimeoutError.md",
    "content": "# TimeoutError\n\nAn error class representing an operation that has timed out.\n\n```typescript\nconst error = new TimeoutError(message);\n```\n\n## Usage\n\n### `new TimeoutError(message?)`\n\nAn error class used when an operation's time limit has been exceeded. It is thrown when operations like [timeout](../promise/timeout.md) or [withTimeout](../promise/withTimeout.md) have timed out.\n\n```typescript\nimport { TimeoutError } from 'es-toolkit/error';\n\n// Create an error with the default message.\nthrow new TimeoutError();\n// Error message: 'The operation was timed out'\n\n// Create an error with a custom message.\nthrow new TimeoutError('API request has timed out');\n// Error message: 'API request has timed out'\n```\n\nAn example of using it with timeout.\n\n```typescript\nimport { timeout, TimeoutError } from 'es-toolkit';\n\nasync function fetchWithTimeout(url: string) {\n  try {\n    const response = await timeout(() => fetch(url), 3000);\n    return response;\n  } catch (error) {\n    if (error instanceof TimeoutError) {\n      console.log('Request has timed out');\n    }\n    throw error;\n  }\n}\n\n// Throws TimeoutError if it takes more than 3 seconds\nawait fetchWithTimeout('https://example.com/api/slow');\n```\n\n#### Parameters\n\n- `message` (`string`, optional): The error message. Defaults to `'The operation was timed out'`.\n\n#### Returns\n\n(`TimeoutError`): Returns an error instance representing a timed out operation. It inherits from `Error` and the `name` property is `'TimeoutError'`.\n"
  },
  {
    "path": "docs/reference/function/after.md",
    "content": "# after\n\nCreates a new function that invokes the original function starting from the `n`-th call.\n\n```typescript\nconst afterFunc = after(n, func);\n```\n\n## Usage\n\n### `after(n, func)`\n\nUse `after` when you want to ignore the first few calls and execute the function starting from the `n`-th call. This is useful when you need to perform an action only after a specific number of occurrences in events or asynchronous operations.\n\n```typescript\nimport { after } from 'es-toolkit/function';\n\nconst afterFn = after(3, () => {\n  console.log('executed');\n});\n\n// logs nothing\nafterFn();\n// logs nothing\nafterFn();\n// logs 'executed'\nafterFn();\n// logs 'executed'\nafterFn();\n```\n\n#### Parameters\n\n- `n` (`number`): The number of calls required before `func` is executed.\n- `func` (`F`): The function to be executed.\n\n#### Returns\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): A new function that tracks the number of calls and executes `func` starting from the `n`-th call. Returns `undefined` for calls before the `n`-th call.\n\n#### Throws\n\nThrows an error when `n` is not an integer or is negative.\n"
  },
  {
    "path": "docs/reference/function/ary.md",
    "content": "# ary\n\nCreates a new function that limits the number of arguments a function can accept.\n\n```typescript\nconst limitedFunc = ary(func, n);\n```\n\n## Usage\n\n### `ary(func, n)`\n\nUse `ary` when you want to limit the number of arguments a function can accept. Additional arguments passed are ignored. This is especially useful in functional programming to prevent callback functions from receiving unexpected arguments.\n\n```typescript\nimport { ary } from 'es-toolkit/function';\n\nfunction fn(a: number, b: number, c: number) {\n  return Array.from(arguments);\n}\n\n// Limit to accept no arguments\nary(fn, 0)(1, 2, 3);\n// Returns: []\n\n// Limit to accept only 1 argument\nary(fn, 1)(1, 2, 3);\n// Returns: [1]\n\n// Limit to accept only 2 arguments\nary(fn, 2)(1, 2, 3);\n// Returns: [1, 2]\n```\n\nThis is especially useful when used with array methods like `map`.\n\n```typescript\n// parseInt accepts two arguments, but map passes three\n['1', '2', '3'].map(parseInt);\n// Returns: [1, NaN, NaN]\n\n['1', '2', '3'].map(parseInt);\n// Result: [1, NaN, NaN]\n// Because parseInt('2', 1), parseInt('3', 2) are executed.\n\n// Use ary to limit to only the first argument\n['1', '2', '3'].map(ary(parseInt, 1));\n// Result: [1, 2, 3] ✅\n```\n\n#### Parameters\n\n- `func` (`F`): The function to limit the number of arguments.\n- `n` (`number`): The maximum number of arguments to accept.\n\n#### Returns\n\n(`(...args: any[]) => ReturnType<F>`): A new function that accepts at most `n` arguments.\n"
  },
  {
    "path": "docs/reference/function/asyncNoop.md",
    "content": "# asyncNoop\n\nA function that asynchronously does nothing.\n\n```typescript\nconst promise = asyncNoop();\n```\n\n::: info [`noop`](./noop.md) function\n\nIf you need a function that synchronously does nothing, use the `noop` function which immediately returns `void`.\n\n:::\n\n## Usage\n\n### `asyncNoop()`\n\nUse `asyncNoop` when you need to fill a placeholder or use as a default value where an asynchronous function is required. It returns a `Promise` that resolves to `undefined`.\n\n```typescript\nimport { asyncNoop } from 'es-toolkit/function';\n\n// Example using as a default value\ninterface Props {\n  fetchData?: () => Promise<void>;\n}\n\nfunction MyComponent({ fetchData = asyncNoop }: Props) {\n  const handleFetchData = async () => {\n    // fetchData is always a function, so it's safe to call\n    await fetchData();\n  };\n\n  handleFetchData();\n}\n\n// Example of direct invocation\nasyncNoop();\n// Returns: Promise<void>\n\nawait asyncNoop();\n// Returns: undefined\n```\n\n#### Returns\n\n(`Promise<void>`): A `Promise` that resolves to `undefined`.\n"
  },
  {
    "path": "docs/reference/function/before.md",
    "content": "# before\n\nCreates a new function that limits the number of times a function can be called.\n\n```typescript\nconst limitedFunc = before(n, func);\n```\n\n## Usage\n\n### `before(n, func)`\n\nUse `before` when you want to limit a function to be executed only up to a specific number of times. The function will execute until the `n-1`-th call, and from the `n`-th call onwards, it will no longer execute.\n\n```typescript\nimport { before } from 'es-toolkit/function';\n\nconst beforeFn = before(3, () => {\n  console.log('executed');\n});\n\n// Logs 'executed'\nbeforeFn();\n\n// Logs 'executed'\nbeforeFn();\n\n// Logs nothing\nbeforeFn();\n\n// Logs nothing\nbeforeFn();\n```\n\nThis is useful for tasks that should only be executed once, such as initialization or setup.\n\n```typescript\nlet initialized = false;\n\nconst initialize = before(2, () => {\n  console.log('Initializing...');\n  initialized = true;\n});\n\n// Logs 'Initializing...' and performs initialization\ninitialize();\n\n// Does nothing as it's already initialized\ninitialize();\n```\n\n#### Parameters\n\n- `n` (`number`): The maximum number of times the returned function can call `func`. If `n` is 0, `func` will not be called. If it's a positive integer, it will be called up to `n-1` times.\n- `func` (`F`): The function whose invocation count will be limited.\n\n#### Returns\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): A new function that tracks the number of calls and executes `func` only up to the `n-1`-th call. Returns `undefined` for calls from the `n`-th onwards.\n\n#### Throws\n\nThrows an error when `n` is not an integer or is negative.\n"
  },
  {
    "path": "docs/reference/function/curry.md",
    "content": "# curry\n\nCurries a function so it can be called with one argument at a time.\n\n```typescript\nconst curriedFunc = curry(func);\n```\n\n## Usage\n\n### `curry(func)`\n\nUse `curry` when you want to partially apply a function. The curried function returns a new function until it receives all required arguments. Once all arguments are provided, the original function is executed.\n\n```typescript\nimport { curry } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curry(sum);\n\n// Provide value `10` for argument `a`\nconst sum10 = curriedSum(10);\n\n// Provide value `15` for argument `b`\nconst sum25 = sum10(15);\n\n// Provide value `5` for argument `c`\n// All arguments have been received, so now it returns the value\nconst result = sum25(5);\n// Returns: 30\n```\n\nThis is useful for creating reusable functions.\n\n```typescript\nfunction multiply(a: number, b: number) {\n  return a * b;\n}\n\nconst curriedMultiply = curry(multiply);\nconst double = curriedMultiply(2);\nconst triple = curriedMultiply(3);\n\ndouble(5); // Returns: 10\ntriple(5); // Returns: 15\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function to curry.\n\n#### Returns\n\n(`(...args: any[]) => any`): A curried function that can be called with one argument at a time.\n"
  },
  {
    "path": "docs/reference/function/curryRight.md",
    "content": "# curryRight\n\nCurries a function from right to left so it can be called with one argument at a time.\n\n```typescript\nconst curriedFunc = curryRight(func);\n```\n\n## Usage\n\n### `curryRight(func)`\n\nUse `curryRight` when you want to partially apply a function from right to left. Unlike regular `curry`, it receives arguments starting from the last one.\n\n```typescript\nimport { curryRight } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curryRight(sum);\n\n// Provide value `10` for argument `c`\nconst add10 = curriedSum(10);\n\n// Provide value `15` for argument `b`\nconst add25 = add10(15);\n\n// Provide value `5` for argument `a`\n// All arguments have been received, so now it returns the value\nconst result = add25(5);\n// Returns: 30\n```\n\nThis is useful when applying arguments from right to left feels more natural.\n\n```typescript\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst curriedGreet = curryRight(greet);\nconst greetJohn = curriedGreet('John');\n\ngreetJohn('Hello'); // Returns: 'Hello, John!'\ngreetJohn('Hi'); // Returns: 'Hi, John!'\n```\n\n#### Parameters\n\n- `func` (`(...args: any[]) => any`): The function to curry.\n\n#### Returns\n\n(`(...args: any[]) => any`): A curried function that can be called with one argument at a time from right to left.\n"
  },
  {
    "path": "docs/reference/function/debounce.md",
    "content": "# debounce\n\nCreates a debounced function that delays the invocation of a function.\n\n```typescript\nconst debouncedFunc = debounce(func, debounceMs, options);\n```\n\n## Usage\n\n### `debounce(func, debounceMs, options)`\n\nUse `debounce` when you want to combine consecutive calls into one. The debounced function executes after the specified time has passed since the last call. This is useful for handling rapid events like search input or window resizing.\n\n```typescript\nimport { debounce } from 'es-toolkit/function';\n\nconst debouncedFunction = debounce(() => {\n  console.log('executed');\n}, 1000);\n\n// Logs 'executed' if not called again within 1 second\ndebouncedFunction();\n\n// Cancels the previous call\ndebouncedFunction.cancel();\n\n// Immediately executes the pending function\ndebouncedFunction.flush();\n```\n\nThis can be useful for calling heavy APIs in response to user input, such as search.\n\n```typescript\nconst searchInput = document.getElementById('search');\nconst searchResults = debounce(async (query: string) => {\n  const results = await fetchSearchResults(query);\n  displayResults(results);\n}, 300);\n\nsearchInput.addEventListener('input', e => {\n  searchResults(e.target.value);\n});\n```\n\nYou can cancel debounced function calls using [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).\n\n```typescript\nconst controller = new AbortController();\nconst debouncedWithSignalFunction = debounce(\n  () => {\n    console.log('Function executed');\n  },\n  1000,\n  { signal: controller.signal }\n);\n\n// Logs 'executed' if not called again within 1 second\ndebouncedWithSignalFunction();\n\n// Cancels the debounce function call\ncontroller.abort();\n```\n\n#### Parameters\n\n- `func` (`F`): The function to create a debounced function from.\n- `debounceMs`(`number`): The number of milliseconds to delay.\n- `options` (`DebounceOptions`, optional): An options object.\n  - `signal` (`AbortSignal`, optional): An optional `AbortSignal` to cancel the debounced function.\n  - `edges` (`Array<'leading' | 'trailing'>`, optional): An array indicating when to execute the original function. Defaults to `['trailing']`.\n    - If `'leading'` is included, the original function is executed immediately on the first call to the debounced function.\n    - If `'trailing'` is included, the original function is executed after `debounceMs` milliseconds have passed since the last call to the debounced function.\n    - If both `'leading'` and `'trailing'` are included, the original function is called at both the start and end of the delay. However, the debounced function must be called at least twice within `debounceMs` milliseconds for this to happen, as a single call to the debounced function cannot trigger the original function twice.\n\n#### Returns\n\n(`DebouncedFunction<F>`): A debounced function with the following methods:\n\n- `cancel()`: Cancels the scheduled invocation.\n- `flush()`: Immediately executes the pending function.\n- `schedule()`: Reschedules the function execution.\n"
  },
  {
    "path": "docs/reference/function/flow.md",
    "content": "# flow\n\nCreates a new function that executes multiple functions in sequence.\n\n```typescript\nconst combinedFunc = flow(func1, func2, func3);\n```\n\n## Usage\n\n### `flow(...funcs)`\n\nUse `flow` when you want to chain functions together to create a pipeline. The result of the previous function becomes the input of the next function. This is useful for transforming data through multiple steps.\n\n```typescript\nimport { flow } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\nconst combined = flow(add, square, double);\n\n// First add(1, 2) = 3\n// Then square(3) = 9\n// Finally double(9) = 18\ncombined(1, 2);\n// Returns: 18\n```\n\nThis is especially useful for creating data transformation pipelines.\n\n```typescript\nconst processData = flow(\n  (text: string) => text.trim(),\n  (text: string) => text.toLowerCase(),\n  (text: string) => text.split(' '),\n  (words: string[]) => words.filter(word => word.length > 3)\n);\n\nprocessData('  Hello World JavaScript  ');\n// Returns: ['hello', 'world', 'javascript']\n```\n\n#### Parameters\n\n- `funcs` (`Array<(...args: any[]) => any>`): The functions to execute in sequence.\n\n#### Returns\n\n(`(...args: any[]) => any`): A new function that executes the given functions in sequence. The first function can accept multiple arguments, and the remaining functions receive the result of the previous function.\n"
  },
  {
    "path": "docs/reference/function/flowRight.md",
    "content": "# flowRight\n\nCreates a new function that executes the given functions in sequence from right to left.\n\n```typescript\nconst combined = flowRight(func1, func2, func3);\n```\n\n## Usage\n\n### `flowRight(...funcs)`\n\nUse `flowRight` when you want to create a new function that executes multiple functions from right to left in sequence. The return value of the previous function is passed as a parameter to the next function.\n\nThis is useful for creating data transformation pipelines by composing functions in reverse order. It executes functions in the opposite direction to `flow`.\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\n// Executes from right to left: double -> square -> add\nconst combined = flowRight(double, square, add);\nconsole.log(combined(1, 2)); // 18\n// Execution order: add(1, 2) = 3, square(3) = 9, double(9) = 18\n\n// Can also be used with a single function\nconst single = flowRight((x: number) => x + 1);\nconsole.log(single(5)); // 6\n```\n\nThe `this` context is also passed to the functions.\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst context = {\n  multiplier: 3,\n};\n\nfunction multiply(this: typeof context, x: number) {\n  return x * this.multiplier;\n}\n\nconst add = (x: number) => x + 10;\n\nconst combined = flowRight(multiply, add).bind(context);\nconsole.log(combined(5)); // 45\n// Execution order: add(5) = 15, multiply(15) = 45\n```\n\n#### Parameters\n\n- `funcs` (`(...args: any[]) => any`): The functions to compose.\n\n#### Returns\n\n(`(...args: any[]) => any`): Returns a new function that executes the given functions from right to left in sequence.\n"
  },
  {
    "path": "docs/reference/function/identity.md",
    "content": "# identity\n\nReturns the input value as is.\n\n```typescript\nconst result = identity(value);\n```\n\n## Usage\n\n### `identity(value)`\n\nUse `identity` when you want to return a value without modifying it.\n\nThis is useful as a default value for functions passed as arguments. It's commonly used to return the value itself in array `map` or `filter` operations, or as a placeholder in functional programming.\n\n```typescript\nimport { identity } from 'es-toolkit/function';\n\n// Returns the number as is\nconst num = identity(5);\nconsole.log(num); // 5\n\n// Returns the string as is\nconst str = identity('hello');\nconsole.log(str); // 'hello'\n\n// Returns the object as is\nconst obj = identity({ key: 'value' });\nconsole.log(obj); // { key: 'value' }\n\n// Example using with an array\nconst numbers = [1, 2, 3, 4, 5];\nconst same = numbers.map(identity);\nconsole.log(same); // [1, 2, 3, 4, 5]\n```\n\n#### Parameters\n\n- `value` (`T`): The value to return.\n\n#### Returns\n\n(`T`): Returns the input value as is.\n"
  },
  {
    "path": "docs/reference/function/memoize.md",
    "content": "# memoize\n\nCaches function results so it runs faster when called again with the same arguments.\n\n```typescript\nconst memoizedFunc = memoize(func, options);\n```\n\n## Usage\n\n### `memoize(func, options?)`\n\nUse `memoize` when you want to optimize performance by caching a function's execution results. When called again with the same arguments, it returns the cached result to avoid duplicate computations.\n\nUse this with functions that take a single parameter. If your function takes multiple arguments, combine them into a single object or array.\n\nIf the argument is compared by reference, such as arrays or objects, you should provide a `getCacheKey` function to generate an appropriate cache key.\n\n```typescript\nimport { memoize } from 'es-toolkit/function';\n\n// Basic usage\nconst add = (x: number) => x + 10;\nconst memoizedAdd = memoize(add);\n\nconsole.log(memoizedAdd(5)); // 15 (computed)\nconsole.log(memoizedAdd(5)); // 15 (cached result)\nconsole.log(memoizedAdd.cache.size); // 1\n\n// Providing a cache key for array arguments\nconst sum = (arr: number[]) => arr.reduce((sum, n) => sum + n, 0);\nconst memoizedSum = memoize(sum, {\n  getCacheKey: (arr: number[]) => arr.join(','),\n});\n\nconsole.log(memoizedSum([1, 2, 3])); // 6 (computed)\nconsole.log(memoizedSum([1, 2, 3])); // 6 (cached result)\n```\n\nYou can also use a custom cache.\n\n```typescript\nimport { memoize, MemoizeCache } from 'es-toolkit/function';\n\nclass LRUCache<K, V> implements MemoizeCache<K, V> {\n  private cache = new Map<K, V>();\n  private maxSize = 100;\n\n  set(key: K, value: V): void {\n    if (this.cache.size >= this.maxSize) {\n      const firstKey = this.cache.keys().next().value;\n      this.cache.delete(firstKey);\n    }\n    this.cache.set(key, value);\n  }\n\n  get(key: K): V | undefined {\n    return this.cache.get(key);\n  }\n\n  has(key: K): boolean {\n    return this.cache.has(key);\n  }\n\n  delete(key: K): boolean {\n    return this.cache.delete(key);\n  }\n\n  clear(): void {\n    this.cache.clear();\n  }\n\n  get size(): number {\n    return this.cache.size;\n  }\n}\n\nconst customCache = new LRUCache<string, number>();\nconst memoizedWithCustomCache = memoize(expensiveFunction, {\n  cache: customCache,\n});\n```\n\n#### Parameters\n\n- `func` (`F`): The function to memoize. It must accept only one argument.\n- `options` (object, optional): Memoization configuration options.\n  - `cache` (`MemoizeCache<any, ReturnType<F>>`, optional): The cache object to store results. Defaults to a new `Map`.\n  - `getCacheKey` (`(arg: Parameters<F>[0]) => unknown`, optional): A function to generate cache keys. Required when using non-primitive values as arguments.\n\n#### Returns\n\n(`F & { cache: MemoizeCache<any, ReturnType<F>> }`): Returns the memoized function. It includes a `cache` property to access the internal cache.\n"
  },
  {
    "path": "docs/reference/function/negate.md",
    "content": "# negate\n\nCreates a new function that inverts the return value of a function that returns true or false.\n\n```typescript\nconst negatedFunc = negate(booleanFunc);\n```\n\n## Usage\n\n### `negate(func)`\n\nUse `negate` when you want to invert the result of a function that returns true or false.\n\nThis is useful for inverting conditional functions or filtering logic. For example, you can turn a function that finds even numbers into a function that finds odd numbers.\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\n// Basic usage\nconst isEven = (n: number) => n % 2 === 0;\nconst isOdd = negate(isEven);\n\nconsole.log(isEven(2)); // true\nconsole.log(isOdd(2)); // false\n\nconsole.log(isEven(3)); // false\nconsole.log(isOdd(3)); // true\n\n// Using in array filtering\nconst numbers = [1, 2, 3, 4, 5, 6];\n\nconst evenNumbers = numbers.filter(isEven);\nconsole.log(evenNumbers); // [2, 4, 6]\n\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n```\n\nYou can also invert complex conditional functions.\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\nconst isLongString = (str: string) => str.length > 5;\nconst isShortString = negate(isLongString);\n\nconst words = ['hi', 'hello', 'world', 'javascript'];\n\nconst longWords = words.filter(isLongString);\nconsole.log(longWords); // ['hello', 'javascript']\n\nconst shortWords = words.filter(isShortString);\nconsole.log(shortWords); // ['hi', 'world']\n```\n\n#### Parameters\n\n- `func` (`F`): A function that returns a boolean value.\n\n#### Returns\n\n(`F`): Returns a new function that accepts the same arguments as the original function but returns the opposite boolean value.\n"
  },
  {
    "path": "docs/reference/function/noop.md",
    "content": "# noop\n\nAn empty function that does nothing.\n\n```typescript\nnoop();\n```\n\n::: info [`asyncNoop`](./asyncNoop.md) function\n\nIf you need a function that asynchronously does nothing, use the `asyncNoop` function which immediately returns a `Promise<void>`.\n\n:::\n\n## Usage\n\n### `noop()`\n\nUse `noop` when you need a function that performs no operation.\n\nThis is useful as a default value where a function is required or when you want to disable a callback function. It's frequently used as a placeholder or during initialization.\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// Using as a default value for optional callbacks\ninterface EventHandlers {\n  onSuccess?: () => void;\n  onError?: () => void;\n}\n\nfunction processData({ onSuccess = noop, onError = noop }: EventHandlers = {}) {\n  try {\n    // Data processing logic\n    console.log('Data processing complete');\n    onSuccess(); // Safe to call\n  } catch (error) {\n    onError(); // Safe to call\n  }\n}\n\n// Safe to use without undefined checks\nprocessData({\n  onSuccess: () => console.log('Success!'),\n  // onError is handled as noop by default\n});\n```\n\nIt can also be used with array methods.\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// Conditionally execute functions\nconst operations = [\n  () => console.log('First task'),\n  shouldRunSecond ? () => console.log('Second task') : noop,\n  () => console.log('Third task'),\n];\n\noperations.forEach(op => op()); // Execute all operations safely\n```\n\n#### Returns\n\n(`void`): Returns nothing.\n"
  },
  {
    "path": "docs/reference/function/once.md",
    "content": "# once\n\nCreates a new function that limits a function to be executed only once.\n\n```typescript\nconst onceFunc = once(func);\n```\n\n## Usage\n\n### `once(func)`\n\nUse `once` when you want to limit a function to be executed only once. Subsequent calls will return the result from the first call.\n\nThis is useful for logic that should only be executed once, such as initialization functions or event handlers. It prevents duplicate execution and ensures consistent results.\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\n// Example of an initialization function\nconst initialize = once(() => {\n  console.log('Initializing app');\n  return { status: 'initialized' };\n});\n\nconsole.log(initialize()); // Logs 'Initializing app', returns { status: 'initialized' }\nconsole.log(initialize()); // Returns { status: 'initialized' } without logging\nconsole.log(initialize()); // Returns { status: 'initialized' } without logging\n\n// Example of an API call\nconst fetchConfig = once(async () => {\n  console.log('Fetching configuration');\n  const response = await fetch('/api/config');\n  return response.json();\n});\n\n// Only the first call makes the actual API request\nconst config1 = await fetchConfig();\nconst config2 = await fetchConfig(); // Returns cached result\n```\n\nYou can also use it with functions that take arguments.\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\nconst logOnce = once((message: string) => {\n  console.log(`Important message: ${message}`);\n});\n\nlogOnce('Hello'); // Logs 'Important message: Hello'\nlogOnce('Hello again'); // Not logged (already called)\nlogOnce('Hello once more'); // Not logged (already called)\n```\n\n#### Parameters\n\n- `func` (`F`): The function to restrict to a single execution.\n\n#### Returns\n\n(`F`): Returns a new function that caches the result after the first call and returns the same result for subsequent calls.\n"
  },
  {
    "path": "docs/reference/function/partial.md",
    "content": "# partial\n\nCreates a new function with some arguments pre-applied.\n\n```typescript\nconst partialFunc = partial(func, arg1, arg2);\n```\n\n## Usage\n\n### `partial(func, ...args)`\n\nUse `partial` when you want to fix some arguments of a function in advance. Pre-provided arguments are placed at the front of the function, and arguments passed later are added to the back.\n\nThis is similar to the concept of currying, which is frequently used in functional programming. Unlike `bind`, it doesn't fix the `this` context.\n\nYou can use `partial.placeholder` to pass specific arguments later.\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\n// Basic usage\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst sayHello = partial(greet, 'Hello');\nconsole.log(sayHello('John')); // 'Hello, John!'\nconsole.log(sayHello('Jane')); // 'Hello, Jane!'\n\n// Applying multiple arguments\nfunction multiply(a: number, b: number, c: number) {\n  return a * b * c;\n}\n\nconst double = partial(multiply, 2);\nconsole.log(double(3, 4)); // 24\n\nconst doubleAndTriple = partial(multiply, 2, 3);\nconsole.log(doubleAndTriple(4)); // 24\n```\n\nYou can adjust the argument order using placeholders.\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\n// Fix only the second argument, pass the first and third later\nconst subtractFrom5 = partial(subtract, partial.placeholder, 5, partial.placeholder);\nconsole.log(subtractFrom5(10, 2)); // 10 - 5 - 2 = 3\n\n// Using with array methods\nconst numbers = [1, 2, 3, 4, 5];\nconst addTen = partial((x: number, y: number) => x + y, 10);\nconst result = numbers.map(addTen);\nconsole.log(result); // [11, 12, 13, 14, 15]\n```\n\n#### Parameters\n\n- `func` (`F`): The function to partially apply arguments to.\n- `args` (`any[]`, optional): The arguments to pre-apply.\n\n#### Returns\n\n(`(...args: any[]) => ReturnType<F>`): Returns a new function with some arguments pre-applied.\n"
  },
  {
    "path": "docs/reference/function/partialRight.md",
    "content": "# partialRight\n\nCreates a new function with some parameters pre-applied from the right.\n\n```typescript\nconst partialRightFunc = partialRight(func, arg1, arg2);\n```\n\n## Usage\n\n### `partialRight(func, ...args)`\n\nUse `partialRight` when you want to fix some parameters of a function from the right. Opposite to `partial`, pre-provided parameters are placed at the back of the function, and parameters passed later are added to the front.\n\nThis is useful when you want to fix the last parameters and dynamically change only the front parameters.\n\nYou can use `partialRight.placeholder` to pass specific parameters later.\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\n// Basic usage\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst greetJohn = partialRight(greet, 'John');\nconsole.log(greetJohn('Hello')); // 'Hello, John!'\nconsole.log(greetJohn('Hi')); // 'Hi, John!'\n\n// Applying multiple parameters\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\nconst subtractFrom10And5 = partialRight(subtract, 5, 2);\nconsole.log(subtractFrom10And5(10)); // 10 - 5 - 2 = 3\n\n// Applying constants in mathematical operations\nfunction divide(dividend: number, divisor: number) {\n  return dividend / divisor;\n}\n\nconst divideBy2 = partialRight(divide, 2);\nconsole.log(divideBy2(10)); // 10 / 2 = 5\nconsole.log(divideBy2(20)); // 20 / 2 = 10\n```\n\nYou can adjust the parameter order using placeholders.\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\nfunction formatMessage(level: string, message: string, timestamp: string) {\n  return `[${level}] ${message} at ${timestamp}`;\n}\n\n// Fix only the last parameter and pass the others later\nconst logWithTime = partialRight(formatMessage, partialRight.placeholder, '2023-01-01');\nconsole.log(logWithTime('INFO', 'Application started'));\n// '[INFO] Application started at 2023-01-01'\n\n// Using with arrays\nconst numbers = [1, 2, 3, 4, 5];\nconst appendSuffix = partialRight((num: number, suffix: string) => `${num}${suffix}`, 'th');\nconst result = numbers.map(appendSuffix);\nconsole.log(result); // ['1th', '2th', '3th', '4th', '5th']\n```\n\n#### Parameters\n\n- `func` (`F`): The function to partially apply parameters to.\n- `args` (`any[]`, optional): The parameters to pre-apply from the right.\n\n#### Returns\n\n(`(...args: any[]) => ReturnType<F>`): Returns a new function with some parameters pre-applied from the right.\n"
  },
  {
    "path": "docs/reference/function/rest.md",
    "content": "# rest\n\nCreates a new function that bundles parameters from a specific index into an array and passes them to the function.\n\n```typescript\nconst restFunc = rest(func, startIndex);\n```\n\n## Usage\n\n### `rest(func, startIndex?)`\n\nUse `rest` when you want to bundle the remaining parameters into an array. Parameters before the specific index are passed individually, and parameters after are bundled into an array.\n\nThis is useful for creating functions that accept variable parameters or when you want to change how existing functions handle parameters.\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\n// Basic usage (bundle from the last parameter into an array)\nfunction sum(a: number, b: number, numbers: number[]) {\n  return a + b + numbers.reduce((sum, n) => sum + n, 0);\n}\n\nconst restSum = rest(sum); // startIndex defaults to func.length - 1 (2)\nconsole.log(restSum(1, 2, 3, 4, 5)); // 1 + 2 + (3 + 4 + 5) = 15\n// The sum function is called with [1, 2, [3, 4, 5]]\n\n// Bundle into an array starting from a different index\nfunction logMessage(level: string, messages: string[]) {\n  console.log(`[${level}] ${messages.join(' ')}`);\n}\n\nconst restLog = rest(logMessage, 1); // Bundle from index 1\nrestLog('INFO', 'Application', 'started', 'successfully');\n// Called as logMessage('INFO', ['Application', 'started', 'successfully'])\n\n// Practical example: first parameter individual, rest as an array\nfunction format(template: string, values: any[]) {\n  return values.reduce((result, value, index) => {\n    return result.replace(`{${index}}`, value);\n  }, template);\n}\n\nconst restFormat = rest(format, 1);\nconsole.log(restFormat('Hello {0}, welcome to {1}!', 'John', 'our site'));\n// 'Hello John, welcome to our site!'\n```\n\nIt also handles cases where there are fewer parameters.\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\nfunction greet(greeting: string, name: string, extras: string[]) {\n  const extraText = extras.length > 0 ? ` ${extras.join(' ')}` : '';\n  return `${greeting} ${name}!${extraText}`;\n}\n\nconst restGreet = rest(greet);\n\nconsole.log(restGreet('Hello', 'Alice', 'Have a great day!'));\n// 'Hello Alice! Have a great day!'\n\nconsole.log(restGreet('Hi', 'Bob'));\n// 'Hi Bob!' (extras becomes an empty array)\n\nconsole.log(restGreet('Hey'));\n// 'Hey undefined!' (name is undefined, extras is an empty array)\n```\n\n#### Parameters\n\n- `func` (`F`): The function to change parameter handling.\n- `startIndex` (`number`, optional): The index from which to start bundling into an array. Defaults to `func.length - 1`, bundling from the last parameter.\n\n#### Returns\n\n(`(...args: any[]) => ReturnType<F>`): Returns a new function that bundles parameters from a specific index into an array and passes them to the original function.\n"
  },
  {
    "path": "docs/reference/function/retry.md",
    "content": "# retry\n\nRetries a Promise-returning function until it succeeds.\n\n```typescript\nconst result = await retry(asyncFunc, options);\n```\n\n## Usage\n\n### `retry(func, options?)`\n\nUse `retry` when you want to automatically retry an asynchronous function that fails. This is useful for operations that can temporarily fail, such as API calls or network requests.\n\nYou can configure the number of retries, retry interval, and cancellation signal. The retry interval can be a fixed value or a function that dynamically calculates based on the retry count.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\n// Basic usage (infinite retries)\nconst data1 = await retry(async () => {\n  const response = await fetch('/api/data');\n  if (!response.ok) throw new Error('Failed to fetch');\n  return response.json();\n});\n\n// Limit retry count\nconst data2 = await retry(async () => {\n  return await fetchData();\n}, 3);\n\n// Set retry interval (100ms)\nconst data3 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 3,\n    delay: 100,\n  }\n);\n\n// Dynamic retry interval (exponential backoff)\nconst data4 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 5,\n    delay: attempts => Math.min(100 * Math.pow(2, attempts), 5000),\n  }\n);\n```\n\nYou can use `shouldRetry` option when you want to retry only on specific errors.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nclass NetworkError extends Error {\n  constructor(public status: number) {\n    super(`Network error: ${status}`);\n  }\n}\n\n// Retry only on 500+ errors\nconst data5 = await retry(\n  async () => {\n    const response = await fetch('/api/data');\n    if (!response.ok) {\n      throw new NetworkError(response.status);\n    }\n    return response.json();\n  },\n  {\n    retries: 3,\n    shouldRetry: (error, attempt) => error instanceof NetworkError && error.status >= 500,\n  }\n);\n```\n\nYou can also cancel retries using AbortSignal.\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nconst controller = new AbortController();\n\n// Cancel retry after 5 seconds\nsetTimeout(() => controller.abort(), 5000);\n\ntry {\n  const data = await retry(\n    async () => {\n      return await fetchData();\n    },\n    {\n      retries: 10,\n      delay: 1000,\n      signal: controller.signal,\n    }\n  );\n  console.log(data);\n} catch (error) {\n  console.log('Retry was canceled or failed:', error);\n}\n```\n\n#### Parameters\n\n- `func` (`() => Promise<T>`): The asynchronous function to retry.\n- `options` (`number | RetryOptions`, optional): The number of retries or options object.\n  - `retries` (`number`, optional): The number of times to retry. Defaults to `Infinity` for infinite retries.\n  - `delay` (`number | (attempts: number) => number`, optional): The retry interval (in milliseconds). Can be a number or a function. Defaults to `0`.\n  - `signal` (`AbortSignal`, optional): A signal that can cancel retries.\n  - `shouldRetry` (`(error: unknown, attempt: number) => boolean`, optional): A function that determines whether to retry. If it returns `false`, the error is thrown immediately.\n    - `error`: The error object that occurred.\n    - `attempt`: The current attempt count (starting from 0).\n\n#### Returns\n\n(`Promise<T>`): Returns the result of the successfully executed function.\n\n#### Throws\n\nThrows the last error when the retry count is exceeded or when canceled by AbortSignal.\n"
  },
  {
    "path": "docs/reference/function/spread.md",
    "content": "# spread\n\nCreates a new function that spreads a parameter array into individual parameters of the function.\n\n```typescript\nconst spreadFunc = spread(func);\n```\n\n## Usage\n\n### `spread(func)`\n\nUse `spread` when you want to spread an array-form parameter into individual parameters to pass to a function.\n\nThis plays a similar role to JavaScript's spread operator (`...`), but it transforms the function to accept an array instead. This is useful in situations where you frequently use the `apply` method.\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\n// Basic usage\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nconsole.log(spreadAdd([5, 3])); // 8\n\n// Function with multiple parameters\nfunction greet(greeting: string, name: string, punctuation: string) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst spreadGreet = spread(greet);\nconsole.log(spreadGreet(['Hello', 'World', '!'])); // 'Hello, World!'\n\n// Using with Math functions\nconst numbers = [1, 2, 3, 4, 5];\nconst spreadMax = spread(Math.max);\nconsole.log(spreadMax(numbers)); // 5\n\nconst spreadMin = spread(Math.min);\nconsole.log(spreadMin(numbers)); // 1\n```\n\nThe `this` context is also maintained.\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\nconst calculator = {\n  multiply: function (a: number, b: number, c: number) {\n    return a * b * c;\n  },\n};\n\nconst spreadMultiply = spread(calculator.multiply);\nconsole.log(spreadMultiply.call(calculator, [2, 3, 4])); // 24\n```\n\n#### Parameters\n\n- `func` (`F`): The function to accept a parameter array spread into individual parameters.\n\n#### Returns\n\n(`(args: Parameters<F>) => ReturnType<F>`): Returns a new function that accepts a parameter array and passes it to the original function in spread form.\n"
  },
  {
    "path": "docs/reference/function/throttle.md",
    "content": "# throttle\n\nLimits a function to be executed at most once per specified time interval.\n\n```typescript\nconst throttledFunc = throttle(func, throttleMs, options);\n```\n\n## Usage\n\n### `throttle(func, throttleMs, options?)`\n\nUse `throttle` when you want to limit function calls to a specific time interval. This is useful for optimizing performance when handling frequently occurring events like scrolling, resizing, or mouse movement.\n\nUnlike `debounce`, throttle ensures the function is executed at least once during the specified time period.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// Basic usage (execute at most once per second)\nconst throttledLog = throttle(() => {\n  console.log('Function executed!');\n}, 1000);\n\n// First call: executes immediately\nthrottledLog(); // Logs 'Function executed!'\n\n// Additional calls within 1 second: ignored\nthrottledLog();\nthrottledLog();\n\n// After 1 second, the last call executes as trailing\n\n// Scroll event optimization\nconst handleScroll = throttle(() => {\n  console.log('Scroll position:', window.scrollY);\n}, 100); // At most once per 100ms\n\nwindow.addEventListener('scroll', handleScroll);\n\n// API call optimization\nconst searchThrottled = throttle(async (query: string) => {\n  const results = await fetch(`/api/search?q=${query}`);\n  console.log('Search results:', await results.json());\n}, 300);\n\n// Even if called on every input, actual search executes only every 300ms\nsearchThrottled('hello');\nsearchThrottled('hello w');\nsearchThrottled('hello world');\n```\n\nYou can adjust the leading and trailing options.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// Enable only leading (execute only at start)\nconst leadingOnly = throttle(() => console.log('Leading only'), 1000, { edges: ['leading'] });\n\n// Enable only trailing (execute only at end)\nconst trailingOnly = throttle(() => console.log('Trailing only'), 1000, { edges: ['trailing'] });\n\nleadingOnly(); // Executes immediately\nleadingOnly(); // Ignored\nleadingOnly(); // Ignored\n\ntrailingOnly(); // Does not execute immediately\ntrailingOnly(); // Ignored\ntrailingOnly(); // Executes after 1 second\n```\n\nYou can also control it manually.\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\nconst throttledFunc = throttle(() => console.log('executed'), 1000);\n\nthrottledFunc(); // Executes immediately\nthrottledFunc(); // Waiting\n\n// Immediately process pending execution\nthrottledFunc.flush();\n\n// Cancel pending execution\nthrottledFunc.cancel();\n```\n\n#### Parameters\n\n- `func` (`F`): The function to throttle.\n- `throttleMs` (`number`): The time interval (in milliseconds) to throttle execution.\n- `options` (`ThrottleOptions`, optional): Additional options.\n  - `signal` (`AbortSignal`, optional): A signal that can cancel function execution.\n  - `edges` (`Array<'leading' | 'trailing'>`, optional): Determines when to execute the function. Defaults to `['leading', 'trailing']`.\n\n#### Returns\n\n(`ThrottledFunction<F>`): Returns a new throttled function with `cancel` and `flush` methods.\n"
  },
  {
    "path": "docs/reference/function/unary.md",
    "content": "# unary\n\nCreates a new function that limits a function to accept only the first parameter.\n\n```typescript\nconst unaryFunc = unary(func);\n```\n\n## Usage\n\n### `unary(func)`\n\nUse `unary` when you want to limit a function to accept only one parameter. Any additional parameters passed are ignored.\n\nThis is useful for preventing callback functions from receiving more parameters than expected in array methods like `map`, `filter`, and `forEach`.\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// Basic usage\nfunction greet(name: string, age?: number, city?: string) {\n  console.log(`Hello, ${name}!`);\n  if (age) console.log(`Age: ${age}`);\n  if (city) console.log(`City: ${city}`);\n}\n\nconst greetOnlyName = unary(greet);\ngreetOnlyName('Cheolsu', 25, 'Seoul'); // Only logs 'Hello, Cheolsu!'\n\n// Using with array methods\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// parseInt accepts radix as a second parameter,\n// but map's callback passes (value, index, array)\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN] (unexpected result)\n\n// Use unary to pass only the first parameter\nconsole.log(numbers.map(unary(parseInt))); // [1, 2, 3, 4, 5] (expected result)\n\n// Another example: when a function accepts multiple parameters but you want to use only one\nfunction logValue(value: any, prefix: string = 'Value:', suffix: string = '') {\n  console.log(`${prefix} ${value} ${suffix}`);\n}\n\nconst data = ['apple', 'banana', 'cherry'];\n\n// When you want to log only the value without prefix and suffix\ndata.forEach(unary(logValue));\n// Value: apple\n// Value: banana\n// Value: cherry\n```\n\nIt's also useful in function composition.\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// Function that accepts multiple parameters\nfunction multiply(a: number, b: number = 1, c: number = 1) {\n  return a * b * c;\n}\n\n// Limit to use only the first parameter\nconst multiplyOne = unary(multiply);\n\nconst numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map(x => multiplyOne(x, 2, 3)); // b and c are ignored\nconsole.log(doubled); // [1, 2, 3, 4, 5] (result of 1 * 1 * 1)\n```\n\n#### Parameters\n\n- `func` (`F`): The function to limit to accept only the first parameter.\n\n#### Returns\n\n(`(...args: any[]) => ReturnType<F>`): Returns a new function that passes only the first parameter to the original function.\n"
  },
  {
    "path": "docs/reference/map/countBy.md",
    "content": "# countBy (for `Map`s)\n\nCounts the occurrences of items in a Map based on a transformation function.\n\n```typescript\nconst counts = countBy(map, mapper);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `countBy(map, mapper)`\n\nUse `countBy` when you want to count how many entries in a Map fall into different categories. Provide a function that generates a key from each value-key pair, and it returns a Map with the generated keys and their counts as values. The count is incremented for each entry for which the transformation produces the same key.\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 1],\n]);\n\nconst result = countBy(map, value => value);\n// Result: Map(2) { 1 => 2, 2 => 1 }\n```\n\nYou can count entries based on various criteria.\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\n// Count by value property\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25, department: 'Engineering' }],\n  ['user2', { name: 'Bob', age: 30, department: 'Engineering' }],\n  ['user3', { name: 'Charlie', age: 35, department: 'Sales' }],\n]);\n\nconst byDepartment = countBy(users, user => user.department);\n// Result: Map(2) { 'Engineering' => 2, 'Sales' => 1 }\n\n// Count by derived value\nconst ages = new Map([\n  ['p1', 25],\n  ['p2', 30],\n  ['p3', 25],\n  ['p4', 40],\n]);\n\nconst ageGroups = countBy(ages, age => (age < 30 ? 'young' : 'senior'));\n// Result: Map(2) { 'young' => 2, 'senior' => 2 }\n\n// Count using both value and key\nconst items = new Map([\n  ['alice', 20],\n  ['bob', 30],\n  ['carol', 20],\n]);\n\nconst firstLetter = countBy(items, (value, key) => key[0]);\n// Result: Map(3) { 'a' => 1, 'b' => 1, 'c' => 1 }\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to count occurrences from.\n- `mapper` (`(value: V, key: K, object: Map<K, V>) => K2`): The function to produce a key for counting.\n\n#### Returns\n\n(`Map<K2, number>`): A Map containing the mapped keys and their counts.\n"
  },
  {
    "path": "docs/reference/map/every.md",
    "content": "# every (for `Map`s)\n\nTests whether all entries in a Map satisfy the provided predicate function.\n\n```typescript\nconst allMatch = every(map, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `every(map, doesMatch)`\n\nUse `every` when you want to check if all entries in a Map meet a specific condition. Provide a predicate function that tests each entry, and it returns true if the predicate is satisfied for all entries, and false otherwise.\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 10],\n  ['b', 20],\n  ['c', 30],\n]);\n\nconst result = every(map, value => value > 5);\n// Result: true\n\nconst result2 = every(map, value => value > 15);\n// Result: false\n```\n\nYou can test various conditions.\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\n// Check if all values meet criteria\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 8, inStock: true }],\n]);\n\nconst allInStock = every(inventory, item => item.inStock);\n// Result: true\n\n// Check if all keys match pattern\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['api.host', 'localhost'],\n]);\n\nconst allApiSettings = every(settings, (value, key) => key.startsWith('api.'));\n// Result: true\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to test.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): A predicate function that tests each entry.\n\n#### Returns\n\n(`boolean`): true if all entries satisfy the predicate, false otherwise.\n"
  },
  {
    "path": "docs/reference/map/filter.md",
    "content": "# filter (for `Map`s)\n\nFilters a Map based on a predicate function.\n\n```typescript\nconst filtered = filter(map, callback);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `filter(map, callback)`\n\nUse `filter` when you want to create a new Map containing only the entries that satisfy a specific condition. Provide a predicate function that tests each entry, and it returns a new Map with only the entries for which the predicate returns true.\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n  ['d', 4],\n]);\n\nconst result = filter(map, value => value > 2);\n// Result:\n// Map(2) {\n//   'c' => 3,\n//   'd' => 4\n// }\n```\n\nYou can filter based on various criteria.\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\n// Filter by value type\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 0, inStock: false }],\n  ['orange', { quantity: 5, inStock: true }],\n]);\n\nconst inStockItems = filter(inventory, item => item.inStock);\n// Result: Map with 'apple' and 'orange' entries\n\n// Filter by key pattern\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['admin_1', 'Bob'],\n  ['user_2', 'Charlie'],\n]);\n\nconst users = filter(data, (value, key) => key.startsWith('user_'));\n// Result: Map with 'user_1' and 'user_2' entries\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to filter.\n- `callback` (`(value: V, key: K, map: Map<K, V>) => boolean`): A predicate function that tests each entry.\n\n#### Returns\n\n(`Map<K, V>`): A new Map containing only the entries that satisfy the predicate.\n"
  },
  {
    "path": "docs/reference/map/findKey.md",
    "content": "# findKey (for `Map`s)\n\nFinds the first key in a Map for which the predicate function returns true.\n\n```typescript\nconst key = findKey(map, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `findKey(map, doesMatch)`\n\nUse `findKey` when you want to find the key of the first entry that matches a specific condition. Provide a predicate function that tests each entry, and it returns the key of the first matching entry or undefined if none is found.\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findKey(map, value => value.quantity > 10);\n// Result: 'grape'\n```\n\nYou can search based on various criteria.\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\n// Find by value property\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n  ['user3', { name: 'Charlie', age: 35 }],\n]);\n\nconst seniorUser = findKey(users, user => user.age >= 35);\n// Result: 'user3'\n\n// Find by key pattern\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['db.host', 'localhost'],\n]);\n\nconst dbSetting = findKey(settings, (value, key) => key.startsWith('db.'));\n// Result: 'db.host'\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to search.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): A predicate function that tests each entry.\n\n#### Returns\n\n(`K | undefined`): The key of the first entry that satisfies the predicate, or undefined if none found.\n"
  },
  {
    "path": "docs/reference/map/findValue.md",
    "content": "# findValue (for `Map`s)\n\nFinds the first value in a Map for which the predicate function returns true.\n\n```typescript\nconst value = findValue(map, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `findValue(map, doesMatch)`\n\nUse `findValue` when you want to find the value of the first entry that matches a specific condition. Provide a predicate function that tests each entry, and it returns the value of the first matching entry or undefined if none is found.\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findValue(map, value => value.quantity > 10);\n// Result: { color: 'purple', quantity: 15 }\n```\n\nYou can search based on various criteria.\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\n// Find by value property\nconst products = new Map([\n  ['p1', { name: 'Laptop', price: 1000, inStock: true }],\n  ['p2', { name: 'Mouse', price: 25, inStock: false }],\n  ['p3', { name: 'Keyboard', price: 75, inStock: true }],\n]);\n\nconst expensiveProduct = findValue(products, product => product.price > 500);\n// Result: { name: 'Laptop', price: 1000, inStock: true }\n\n// Find by key pattern\nconst cache = new Map([\n  ['temp_1', { data: 'foo', timestamp: 100 }],\n  ['perm_1', { data: 'bar', timestamp: 200 }],\n  ['temp_2', { data: 'baz', timestamp: 300 }],\n]);\n\nconst permanent = findValue(cache, (value, key) => key.startsWith('perm_'));\n// Result: { data: 'bar', timestamp: 200 }\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to search.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): A predicate function that tests each entry.\n\n#### Returns\n\n(`V | undefined`): The value of the first entry that satisfies the predicate, or undefined if none found.\n"
  },
  {
    "path": "docs/reference/map/forEach.md",
    "content": "# forEach (for `Map`s)\n\nExecutes a provided function once for each entry in a Map.\n\n```typescript\nforEach(map, callback);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `forEach(map, callback)`\n\nUse `forEach` when you want to execute a function for each entry in a Map. The callback function receives the value, key, and the Map itself as arguments. This is useful for side effects like logging, updating external state, or performing operations on each entry.\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nforEach(map, (value, key) => {\n  console.log(`${key}: ${value}`);\n});\n// Output:\n// a: 1\n// b: 2\n// c: 3\n```\n\nYou can perform various operations on each entry.\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\n// Accumulate values\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nlet total = 0;\nforEach(prices, value => {\n  total += value;\n});\n// total is now 4.25\n\n// Collect entries into an array\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n]);\n\nconst userList: string[] = [];\nforEach(users, (value, key) => {\n  userList.push(`${key}: ${value.name} (${value.age})`);\n});\n// userList: ['user1: Alice (25)', 'user2: Bob (30)']\n\n// Update external Map based on conditions\nconst inventory = new Map([\n  ['item1', { stock: 10, price: 5 }],\n  ['item2', { stock: 0, price: 10 }],\n  ['item3', { stock: 5, price: 15 }],\n]);\n\nconst outOfStock = new Map<string, any>();\nforEach(inventory, (value, key) => {\n  if (value.stock === 0) {\n    outOfStock.set(key, value);\n  }\n});\n// outOfStock contains item2\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to iterate over.\n- `callback` (`(value: V, key: K, map: Map<K, V>) => void`): A function to execute for each entry.\n\n#### Returns\n\n(`void`): This function does not return a value.\n"
  },
  {
    "path": "docs/reference/map/hasValue.md",
    "content": "# hasValue (for `Map`s)\n\nChecks if a Map contains a specific value.\n\n```typescript\nconst exists = hasValue(map, searchElement);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `hasValue(map, searchElement)`\n\nUse `hasValue` when you want to check if a Map contains a specific value. This function uses SameValueZero comparison (similar to Array.prototype.includes), which means that NaN is considered equal to NaN.\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = hasValue(map, 2);\n// Result: true\n\nconst result2 = hasValue(map, 5);\n// Result: false\n```\n\nYou can search for various value types.\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\n// Search for NaN (using SameValueZero comparison)\nconst numbers = new Map([\n  ['a', 1],\n  ['b', NaN],\n  ['c', 3],\n]);\n\nconst hasNaN = hasValue(numbers, NaN);\n// Result: true\n\n// Search for objects (reference equality)\nconst obj = { id: 1 };\nconst objects = new Map([\n  ['first', obj],\n  ['second', { id: 2 }],\n]);\n\nconst hasObj = hasValue(objects, obj);\n// Result: true\n\nconst hasSimilar = hasValue(objects, { id: 1 });\n// Result: false (different reference)\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to search.\n- `searchElement` (`V`): The value to search for.\n\n#### Returns\n\n(`boolean`): true if the Map contains the value, false otherwise.\n"
  },
  {
    "path": "docs/reference/map/keyBy.md",
    "content": "# keyBy (for `Map`s)\n\nMaps each entry of a Map based on a provided key-generating function.\n\n```typescript\nconst result = keyBy(map, getKeyFromEntry);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `keyBy(map, getKeyFromEntry)`\n\nUse `keyBy` when you want to reorganize a Map by generating new keys from the values. Provide a function that generates a key from each value-key pair, and it returns a new Map where the keys are generated by the key function and the values are the corresponding values from the original map. If multiple entries produce the same key, the last value encountered will be used.\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['x', { type: 'fruit', name: 'apple' }],\n  ['y', { type: 'fruit', name: 'banana' }],\n  ['z', { type: 'vegetable', name: 'carrot' }],\n]);\n\nconst result = keyBy(map, item => item.type);\n// Result:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// Note: 'banana' is kept because it was the last 'fruit' encountered\n```\n\nYou can reorganize data based on various criteria.\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\n// Index by ID property\nconst users = new Map([\n  ['user1', { id: 101, name: 'Alice', role: 'admin' }],\n  ['user2', { id: 102, name: 'Bob', role: 'user' }],\n  ['user3', { id: 103, name: 'Charlie', role: 'user' }],\n]);\n\nconst byId = keyBy(users, user => user.id);\n// Result: Map with keys 101, 102, 103\n\n// Index by role (last user per role wins)\nconst byRole = keyBy(users, user => user.role);\n// Result: Map(2) {\n//   'admin' => { id: 101, name: 'Alice', role: 'admin' },\n//   'user' => { id: 103, name: 'Charlie', role: 'user' }\n// }\n\n// Transform keys using both value and original key\nconst inventory = new Map([\n  ['item_1', { category: 'electronics', price: 100 }],\n  ['item_2', { category: 'electronics', price: 200 }],\n]);\n\nconst categorized = keyBy(inventory, (value, key) => `${value.category}_${key}`);\n// Result: Map with keys 'electronics_item_1', 'electronics_item_2'\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The map of entries to be mapped.\n- `getKeyFromEntry` (`(value: V, key: K, object: Map<K, V>) => K2`): A function that generates a key from a value-key pair.\n\n#### Returns\n\n(`Map<K2, V>`): A Map where the generated keys are mapped to each entry's value.\n"
  },
  {
    "path": "docs/reference/map/mapKeys.md",
    "content": "# mapKeys (for `Map`s)\n\nCreates a new Map with the same values but with keys transformed by the provided function.\n\n```typescript\nconst transformed = mapKeys(map, getNewKey);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `mapKeys(map, getNewKey)`\n\nUse `mapKeys` when you want to transform the keys of a Map while keeping the values unchanged. Provide a function that generates a new key from each entry, and it returns a new Map with the transformed keys.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapKeys(map, (value, key) => key.toUpperCase());\n// Result:\n// Map(3) {\n//   'A' => 1,\n//   'B' => 2,\n//   'C' => 3\n// }\n```\n\nYou can transform keys in various ways.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\n// Add prefix to keys\nconst categories = new Map([\n  ['fruit', ['apple', 'banana']],\n  ['vegetable', ['carrot', 'potato']],\n]);\n\nconst prefixed = mapKeys(categories, (value, key) => `category_${key}`);\n// Result: Map with keys 'category_fruit', 'category_vegetable'\n\n// Transform based on value\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst ranked = mapKeys(scores, (value, key) => (value >= 90 ? `top_${key}` : key));\n// Result: Map with keys 'top_alice', 'bob', 'top_charlie'\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to transform.\n- `getNewKey` (`(value: V, key: K, object: Map<K, V>) => K`): A function that generates a new key from a value-key pair.\n\n#### Returns\n\n(`Map<K, V>`): A new Map with transformed keys and the same values.\n"
  },
  {
    "path": "docs/reference/map/mapValues.md",
    "content": "# mapValues (for `Map`s)\n\nCreates a new Map with the same keys but with values transformed by the provided function.\n\n```typescript\nconst transformed = mapValues(map, getNewValue);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `mapValues(map, getNewValue)`\n\nUse `mapValues` when you want to transform the values of a Map while keeping the keys unchanged. Provide a function that generates a new value from each entry, and it returns a new Map with the transformed values.\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapValues(map, value => value * 2);\n// Result:\n// Map(3) {\n//   'a' => 2,\n//   'b' => 4,\n//   'c' => 6\n// }\n```\n\nYou can transform values in various ways.\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\n// Format values\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nconst formatted = mapValues(prices, value => `$${value.toFixed(2)}`);\n// Result: Map with values '$1.50', '$0.75', '$2.00'\n\n// Transform based on key\nconst inventory = new Map([\n  ['premium_item', 10],\n  ['standard_item', 20],\n  ['basic_item', 30],\n]);\n\nconst adjusted = mapValues(inventory, (value, key) => (key.startsWith('premium_') ? value * 1.5 : value));\n// Result: Map with values 15, 20, 30\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to transform.\n- `getNewValue` (`(value: V, key: K, object: Map<K, V>) => V`): A function that generates a new value from a value-key pair.\n\n#### Returns\n\n(`Map<K, V>`): A new Map with the same keys and transformed values.\n"
  },
  {
    "path": "docs/reference/map/reduce.md",
    "content": "# reduce (for `Map`s)\n\nReduces a Map to a single value by iterating through its entries and applying a callback function.\n\n```typescript\nconst result = reduce(map, callback, initialValue);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `reduce(map, callback, initialValue?)`\n\nUse `reduce` when you want to transform a Map into a single value by accumulating results from each entry. Provide a callback function that processes each entry and updates the accumulator. If an initial value is provided, it is used as the starting accumulator value. If no initial value is provided and the Map is empty, a TypeError is thrown.\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = reduce(map, (acc, value) => acc + value, 0);\n// Result: 6\n```\n\nYou can reduce a Map in various ways.\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\n// Sum with initial value\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst totalScore = reduce(scores, (acc, score) => acc + score, 0);\n// Result: 274\n\n// Without initial value (uses first value)\nconst numbers = new Map([\n  ['a', 10],\n  ['b', 20],\n]);\n\nconst sum = reduce(numbers, (acc, value) => acc + value);\n// Result: 30 (starts with first value 10)\n\n// Build an object from Map\nconst settings = new Map([\n  ['theme', 'dark'],\n  ['lang', 'en'],\n  ['notifications', true],\n]);\n\nconst config = reduce(settings, (acc, value, key) => ({ ...acc, [key]: value }), {} as Record<string, any>);\n// Result: { theme: 'dark', lang: 'en', notifications: true }\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to reduce.\n- `callback` (`(accumulator: A, value: V, key: K, map: Map<K, V>) => A`): A function that processes each entry and updates the accumulator.\n- `initialValue` (`A`, optional): The initial value for the accumulator. If not provided, the first value in the Map is used.\n\n#### Returns\n\n(`A`): The final accumulated value.\n\n#### Throws\n\n(`TypeError`): If the Map is empty and no initial value is provided.\n"
  },
  {
    "path": "docs/reference/map/some.md",
    "content": "# some (for `Map`s)\n\nTests whether at least one entry in a Map satisfies the provided predicate function.\n\n```typescript\nconst anyMatch = some(map, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/map` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `some(map, doesMatch)`\n\nUse `some` when you want to check if at least one entry in a Map meets a specific condition. Provide a predicate function that tests each entry, and it returns true if the predicate is satisfied for at least one entry, and false otherwise.\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = some(map, value => value > 2);\n// Result: true\n\nconst result2 = some(map, value => value > 5);\n// Result: false\n```\n\nYou can test various conditions.\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\n// Check if any value meets criteria\nconst inventory = new Map([\n  ['apple', { quantity: 0, inStock: false }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 0, inStock: false }],\n]);\n\nconst hasStock = some(inventory, item => item.inStock);\n// Result: true\n\n// Check if any key matches pattern\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['user_2', 'Bob'],\n  ['group_1', 'Admins'],\n]);\n\nconst hasAdmin = some(data, (value, key) => key.startsWith('admin_'));\n// Result: false\n```\n\n#### Parameters\n\n- `map` (`Map<K, V>`): The Map to test.\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): A predicate function that tests each entry.\n\n#### Returns\n\n(`boolean`): true if at least one entry satisfies the predicate, false otherwise.\n"
  },
  {
    "path": "docs/reference/math/clamp.md",
    "content": "# clamp\n\nClamps a number within a specified range.\n\n```typescript\nconst clamped = clamp(value, maximum);\nconst clamped = clamp(value, minimum, maximum);\n```\n\n## Usage\n\n### `clamp(value, maximum)`\n\nUse `clamp` when you want to restrict a number to be at most a given maximum value. If the value exceeds the maximum, it's clamped to the maximum; otherwise, it returns the original value.\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// Clamp to maximum value\nconst result1 = clamp(10, 5); // result1 is 5 (10 is clamped to maximum 5)\nconst result2 = clamp(3, 5); // result2 is 3 (less than 5, so unchanged)\n```\n\n#### Parameters\n\n- `value` (`number`): The number to clamp.\n- `maximum` (`number`): The maximum value.\n\n#### Returns\n\n(`number`): Returns the number clamped to be at most the maximum value.\n\n### `clamp(value, minimum, maximum)`\n\nUse `clamp` when you want to restrict a number within a given minimum and maximum range. If the value falls outside the range, it's clamped to the nearest boundary.\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// Clamp within minimum and maximum range\nconst result1 = clamp(10, 5, 15); // result1 is 10 (within range 5-15)\nconst result2 = clamp(2, 5, 15); // result2 is 5 (clamped to minimum 5)\nconst result3 = clamp(20, 5, 15); // result3 is 15 (clamped to maximum 15)\n```\n\n#### Parameters\n\n- `value` (`number`): The number to clamp.\n- `minimum` (`number`): The minimum value.\n- `maximum` (`number`): The maximum value.\n\n#### Returns\n\n(`number`): Returns the number clamped within the specified range.\n"
  },
  {
    "path": "docs/reference/math/inRange.md",
    "content": "# inRange\n\nChecks if a value is within a specified range.\n\n```typescript\nconst result = inRange(value, maximum);\nconst result = inRange(value, minimum, maximum);\n```\n\n## Usage\n\n### `inRange(value, maximum)`\n\nUse `inRange` when you want to check if a value is within the range from 0 to less than the maximum value. The minimum value is automatically set to 0.\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// Check within the range from 0 to less than 5\nconst result1 = inRange(3, 5); // result1 is true (0 <= 3 < 5)\nconst result2 = inRange(5, 5); // result2 is false (5 is not less than 5)\nconst result3 = inRange(-1, 5); // result3 is false (-1 < 0)\n```\n\n#### Parameters\n\n- `value` (`number`): The value to check.\n- `maximum` (`number`): The maximum value of the range (exclusive).\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is within the range from 0 (inclusive) to the maximum value (exclusive), otherwise `false`.\n\n### `inRange(value, minimum, maximum)`\n\nUse `inRange` when you want to check if a value is within a specified minimum and maximum range.\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// Check within the minimum and maximum range\nconst result1 = inRange(3, 2, 5); // result1 is true (2 <= 3 < 5)\nconst result2 = inRange(1, 2, 5); // result2 is false (1 < 2)\nconst result3 = inRange(5, 2, 5); // result3 is false (5 is not less than 5)\n\n// Can be used with negative ranges\nconst result4 = inRange(-3, -5, -1); // result4 is true (-5 <= -3 < -1)\n```\n\n#### Parameters\n\n- `value` (`number`): The value to check.\n- `minimum` (`number`): The minimum value of the range (inclusive).\n- `maximum` (`number`): The maximum value of the range (exclusive).\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is within the specified range, otherwise `false`.\n\n#### Throws\n\nThrows an error if the minimum is greater than or equal to the maximum.\n"
  },
  {
    "path": "docs/reference/math/mean.md",
    "content": "# mean\n\nCalculates the average of an array of numbers.\n\n```typescript\nconst average = mean(nums);\n```\n\n## Usage\n\n### `mean(nums)`\n\nUse `mean` when you want to find the average value of an array of numbers. It calculates the average by adding all numbers together and dividing by the length of the array. If given an empty array, it returns `NaN`.\n\n```typescript\nimport { mean } from 'es-toolkit/math';\n\n// Calculate the average of an array of numbers\nconst numbers = [1, 2, 3, 4, 5];\nconst result = mean(numbers);\n// result is 3 ((1 + 2 + 3 + 4 + 5) / 5 = 15 / 5 = 3)\n\n// Calculate the average of decimal numbers\nconst decimals = [1.5, 2.5, 3.5];\nconst decimalResult = mean(decimals);\n// decimalResult is 2.5\n\n// Returns NaN for an empty array\nconst emptyResult = mean([]);\n// emptyResult is NaN\n```\n\n#### Parameters\n\n- `nums` (`readonly number[]`): An array of numbers to calculate the average.\n\n#### Returns\n\n(`number`): Returns the average of all numbers in the array. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/math/meanBy.md",
    "content": "# meanBy\n\nCalculates the average of an array by applying the `getValue` function to each element.\n\n```typescript\nconst average = meanBy(items, getValue);\n```\n\n## Usage\n\n### `meanBy(items, getValue)`\n\nUse `meanBy` when you want to find the average of the results of applying a function to each element of an array. It's useful for calculating the average of a specific property from an array of objects or for finding the average after transforming each element. If given an empty array, it returns `NaN`.\n\n```typescript\nimport { meanBy } from 'es-toolkit/math';\n\n// Calculate the average of a specific property from an array of objects\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }];\nconst averageAge = meanBy(people, person => person.age);\n// averageAge is 25 ((23 + 25 + 27) / 3 = 75 / 3 = 25)\n\n// Calculate the average of string lengths\nconst words = ['apple', 'banana', 'cherry'];\nconst averageLength = meanBy(words, word => word.length);\n// averageLength is approximately 5.67 ((5 + 6 + 6) / 3 ≈ 5.67)\n\n// Returns NaN for an empty array\nconst emptyResult = meanBy([], x => x);\n// emptyResult is NaN\n```\n\n#### Parameters\n\n- `items` (`readonly T[]`): An array to calculate the average.\n- `getValue` (`(element: T) => number`): A function that selects a numeric value from each element.\n\n#### Returns\n\n(`number`): Returns the average of all values as determined by the `getValue` function. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/math/median.md",
    "content": "# median\n\nCalculates the median of an array of numbers.\n\n```typescript\nconst middle = median(nums);\n```\n\n## Usage\n\n### `median(nums)`\n\nUse `median` when you want to find the median value of an array of numbers. After sorting the array in ascending order, it finds the value located in the middle. For an array with an odd number of elements, it returns the exact middle value, and for an array with an even number of elements, it returns the average of the two middle values. If given an empty array, it returns `NaN`.\n\n```typescript\nimport { median } from 'es-toolkit/math';\n\n// Calculate the median of an array with an odd number of elements\nconst oddNumbers = [1, 2, 3, 4, 5];\nconst oddResult = median(oddNumbers);\n// oddResult is 3 (the middle value in the sorted array [1, 2, 3, 4, 5])\n\n// Calculate the median of an array with an even number of elements\nconst evenNumbers = [1, 2, 3, 4];\nconst evenResult = median(evenNumbers);\n// evenResult is 2.5 ((2 + 3) / 2 = 2.5)\n\n// Unsorted arrays are automatically sorted\nconst unordered = [3, 1, 4, 1, 5];\nconst unorderedResult = median(unordered);\n// unorderedResult is 3 (the middle value after sorting to [1, 1, 3, 4, 5])\n\n// Returns NaN for an empty array\nconst emptyResult = median([]);\n// emptyResult is NaN\n```\n\n#### Parameters\n\n- `nums` (`readonly number[]`): An array of numbers to calculate the median.\n\n#### Returns\n\n(`number`): Returns the median of all numbers in the array. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/math/medianBy.md",
    "content": "# medianBy\n\nCalculates the median of an array by applying the `getValue` function to each element.\n\n```typescript\nconst middle = medianBy(items, getValue);\n```\n\n## Usage\n\n### `medianBy(items, getValue)`\n\nUse `medianBy` when you want to find the median of the results of applying a function to each element of an array. It's useful for calculating the median of a specific property from an array of objects or for finding the median after transforming each element. For an array with an odd number of elements, it returns the exact middle value, and for an array with an even number of elements, it returns the average of the two middle values. If given an empty array, it returns `NaN`.\n\n```typescript\nimport { medianBy } from 'es-toolkit/math';\n\n// Calculate the median of a specific property from an array of objects (odd number)\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }, { age: 29 }, { age: 31 }];\nconst medianAge = medianBy(people, person => person.age);\n// medianAge is 27 (the middle value in the sorted ages [23, 25, 27, 29, 31])\n\n// Calculate the median of a specific property from an array of objects (even number)\nconst scores = [{ score: 80 }, { score: 90 }, { score: 85 }, { score: 95 }];\nconst medianScore = medianBy(scores, item => item.score);\n// medianScore is 87.5 ((85 + 90) / 2 in the sorted scores [80, 85, 90, 95])\n\n// Calculate the median of string lengths\nconst words = ['cat', 'elephant', 'dog', 'butterfly', 'ant'];\nconst medianLength = medianBy(words, word => word.length);\n// medianLength is 3 (the middle value when lengths [3, 8, 3, 9, 3] are sorted to [3, 3, 3, 8, 9])\n\n// Returns NaN for an empty array\nconst emptyResult = medianBy([], x => x);\n// emptyResult is NaN\n```\n\n#### Parameters\n\n- `items` (`readonly T[]`): An array to calculate the median.\n- `getValue` (`(element: T) => number`): A function that selects a numeric value from each element.\n\n#### Returns\n\n(`number`): Returns the median of all values as determined by the `getValue` function. Returns `NaN` if the array is empty.\n"
  },
  {
    "path": "docs/reference/math/random.md",
    "content": "# random\n\nGenerates a random number within a specified range. The number can include decimals.\n\n```typescript\nconst randomNumber = random(min, max);\n```\n\n## Usage\n\n### `random(maximum)` / `random(minimum, maximum)`\n\nUse `random` when you need a random number. It generates numbers with decimal points.\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// Generate a random decimal between 0 and 5 (exclusive).\nconst num1 = random(5);\nconsole.log(num1); // e.g., 2.718281828\n\n// Generate a random decimal between 2 and 10 (exclusive).\nconst num2 = random(2, 10);\nconsole.log(num2); // e.g., 7.158765432\n\n// Can be used with negative ranges.\nconst num3 = random(-5, -1);\nconsole.log(num3); // e.g., -3.842134567\n\n// Decimal ranges are also possible.\nconst num4 = random(1.5, 2.5);\nconsole.log(num4); // e.g., 1.923456789\n```\n\nThrows an error if the range is invalid.\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// An error occurs if the maximum value is 0 or less.\ntry {\n  random(0);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n\n// An error occurs if the minimum value is greater than or equal to the maximum value.\ntry {\n  random(5, 3);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n```\n\n#### Parameters\n\n- `maximum` (`number`): The maximum value (exclusive) when using a single parameter. Must be greater than 0.\n- `minimum` (`number`): The minimum value (inclusive).\n- `maximum` (`number`): The maximum value (exclusive). Must be greater than the minimum value.\n\n#### Returns\n\n(`number`): Returns a random decimal within the specified range.\n\n#### Throws\n\nThrows an error if the maximum value is less than or equal to the minimum value.\n"
  },
  {
    "path": "docs/reference/math/randomInt.md",
    "content": "# randomInt\n\nGenerates a random integer within a specified range.\n\n```typescript\nconst randomInteger = randomInt(min, max);\n```\n\n## Usage\n\n### `randomInt(maximum)` / `randomInt(minimum, maximum)`\n\nUse `randomInt` when you need a random integer. It returns only integers without decimal points.\n\n```typescript\nimport { randomInt } from 'es-toolkit/math';\n\n// Generate a random integer between 0 and 5 (exclusive).\nconst num1 = randomInt(5);\nconsole.log(num1); // e.g., 3\n\n// Generate a random integer between 2 and 10 (exclusive).\nconst num2 = randomInt(2, 10);\nconsole.log(num2); // e.g., 7\n\n// Can be used with negative ranges.\nconst num3 = randomInt(-5, -1);\nconsole.log(num3); // e.g., -3\n\n// Simulate a dice roll (1-6)\nconst diceRoll = randomInt(1, 7);\nconsole.log(diceRoll); // e.g., 4\n\n// Select a random index from an array\nconst items = ['apple', 'banana', 'cherry', 'date'];\nconst randomIndex = randomInt(items.length);\nconsole.log(items[randomIndex]); // e.g., 'banana'\n```\n\n#### Parameters\n\n- `maximum` (`number`): The maximum value (exclusive) when using a single parameter. Must be greater than 0.\n- `minimum` (`number`): The minimum value (inclusive).\n- `maximum` (`number`): The maximum value (exclusive). Must be greater than the minimum value.\n\n#### Returns\n\n(`number`): Returns a random integer within the specified range.\n\n#### Throws\n\nThrows an error if the maximum value is less than or equal to the minimum value.\n"
  },
  {
    "path": "docs/reference/math/range.md",
    "content": "# range\n\nCreates an array of numbers within a specified range and step.\n\n```typescript\nconst numbers = range(end);\nconst numbers = range(start, end, step);\n```\n\n## Usage\n\n### `range(end)`\n\nUse `range` when you need a consecutive array of numbers from 0 to a specified end value. It's useful for loops.\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// Create an array from 0 to 3.\nconst numbers1 = range(4);\nconsole.log(numbers1); // [0, 1, 2, 3]\n\n// Indices for an array with 10 elements\nconst indices = range(10);\nconsole.log(indices); // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\n// Can be used instead of forEach.\nrange(5).forEach(i => {\n  console.log(`Iteration ${i}`); // Iteration 0, Iteration 1, Iteration 2, Iteration 3, Iteration 4\n});\n```\n\n#### Parameters\n\n- `end` (`number`): The end value (exclusive). Starts from 0.\n\n#### Returns\n\n(`number[]`): Returns an array of numbers generated from 0 to the end value.\n\n### `range(start, end, step?)`\n\nUse `range` when you need a consecutive array of numbers with a specified start value, end value, and step. It's useful for loops.\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// Create an array from 1 to 4.\nconst numbers2 = range(1, 5);\nconsole.log(numbers2); // [1, 2, 3, 4]\n\n// Create an array from 0 to 20 with increments of 5.\nconst numbers3 = range(0, 20, 5);\nconsole.log(numbers3); // [0, 5, 10, 15]\n\n// Can also go in the negative direction.\nconst numbers4 = range(0, -5, -1);\nconsole.log(numbers4); // [0, -1, -2, -3, -4]\n\n// Can go from larger to smaller numbers.\nconst numbers5 = range(5, 0, -1);\nconsole.log(numbers5); // [5, 4, 3, 2, 1]\n\n// Create page numbers in a specific range\nconst pageNumbers = range(1, 11);\nconsole.log(pageNumbers); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n```\n\n#### Parameters\n\n- `start` (`number`): The start value. Included in the result array.\n- `end` (`number`): The end value. Not included in the result array.\n- `step` (`number`, optional): The increment between each number. Must be a non-zero integer. Defaults to `1`.\n\n#### Returns\n\n(`number[]`): Returns an array of numbers generated with the specified range and step.\n\n#### Throws\n\n- Throws an error if `step` is 0 or not an integer.\n"
  },
  {
    "path": "docs/reference/math/rangeRight.md",
    "content": "# rangeRight\n\nCreates an array of numbers in reverse order within a specified range and step.\n\n```typescript\nconst numbers = rangeRight(end);\nconst numbers = rangeRight(start, end, step?);\n```\n\n## Usage\n\n### `rangeRight(end)`\n\nUse `rangeRight` when you need a consecutive array of numbers in reverse order from the end value to 0. It's like `range` but the result comes from the back.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// Create an array from 3 to 0 in reverse order.\nconst numbers1 = rangeRight(4);\nconsole.log(numbers1); // [3, 2, 1, 0]\n\n// Reverse indices of an array\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst reverseIndices = rangeRight(items.length);\nreverseIndices.forEach(i => {\n  console.log(items[i]); // Outputs 'e', 'd', 'c', 'b', 'a' in order\n});\n```\n\n#### Parameters\n\n- `end` (`number`): The end value (exclusive). Starts from 0.\n\n#### Returns\n\n(`number[]`): Returns a reverse array of numbers generated from the end value to 0.\n\n### `rangeRight(start, end, step?)`\n\nUse `rangeRight` when you need a consecutive array of numbers in reverse order with a specified start value, end value, and step. It's like `range` but the result comes from the back.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// Create an array from 4 to 1 in reverse order.\nconst numbers2 = rangeRight(1, 5);\nconsole.log(numbers2); // [4, 3, 2, 1]\n\n// Create an array from 15 to 0 with decrements of 5.\nconst numbers3 = rangeRight(0, 20, 5);\nconsole.log(numbers3); // [15, 10, 5, 0]\n\n// Can also go in the negative direction.\nconst numbers4 = rangeRight(-5, 0, 1);\nconsole.log(numbers4); // [-1, -2, -3, -4, -5]\n\n// Can go from smaller to larger numbers.\nconst numbers5 = rangeRight(5, 0, -1);\nconsole.log(numbers5); // [1, 2, 3, 4, 5]\n```\n\nUseful when you need reverse order for countdowns or pagination.\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// Create a countdown\nconst countdown = rangeRight(0, 11);\nconsole.log(countdown); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n\n// Pagination from last page to first page\nconst pageNumbers = rangeRight(1, 11);\nconsole.log(pageNumbers); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n```\n\n#### Parameters\n\n- `start` (`number`): The start value. Included in the result array.\n- `end` (`number`): The end value. Not included in the result array.\n- `step` (`number`, optional): The increment between each number. Must be a non-zero integer. Defaults to `1`.\n\n#### Returns\n\n(`number[]`): Returns a reverse array of numbers generated with the specified range and step.\n\n#### Throws\n\n- Throws an error if `step` is 0 or not an integer.\n"
  },
  {
    "path": "docs/reference/math/round.md",
    "content": "# round\n\nRounds a number to a specified number of decimal places.\n\n```typescript\nconst rounded = round(value, precision?);\n```\n\n## Usage\n\n### `round(value, precision?)`\n\nUse `round` when you want to round a number to a specific number of decimal places. It's a mathematical function for precise calculations.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// Default - rounds to integer.\nconst num1 = round(1.2345);\nconsole.log(num1); // 1\n\n// Round to 2 decimal places.\nconst num2 = round(1.2345, 2);\nconsole.log(num2); // 1.23\n\n// Round to 3 decimal places.\nconst num3 = round(1.2387, 3);\nconsole.log(num3); // 1.239\n\n// Can also round negative numbers.\nconst num4 = round(-1.2345, 2);\nconsole.log(num4); // -1.23\n\n// Handles large numbers too.\nconst num5 = round(123.456789, 4);\nconsole.log(num5); // 123.4568\n```\n\nUseful in price calculations and statistics.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// Price calculation (to 2 decimal places)\nconst price = 19.999;\nconst finalPrice = round(price, 2);\nconsole.log(finalPrice); // 20.00\n\n// Percentage calculation (to 1 decimal place)\nconst percentage = 66.66666;\nconst displayPercentage = round(percentage, 1);\nconsole.log(displayPercentage); // 66.7\n\n// Rating calculation (to 1 decimal place)\nconst rating = 4.267;\nconst displayRating = round(rating, 1);\nconsole.log(displayRating); // 4.3\n```\n\nRound in calculations where accuracy matters.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// Clean up math calculation results\nconst result = Math.PI * 2;\nconst cleanResult = round(result, 5);\nconsole.log(cleanResult); // 6.28318\n\n// Round measurement values\nconst measurement = 15.789123;\nconst rounded = round(measurement, 3);\nconsole.log(rounded); // 15.789\n```\n\nInvalid precision values throw an error.\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// Error occurs if precision is not an integer.\ntry {\n  round(1.23, 2.5);\n} catch (error) {\n  console.error(error.message); // 'Precision must be an integer.'\n}\n```\n\n#### Parameters\n\n- `value` (`number`): The number to round.\n- `precision` (`number`, optional): The number of decimal places. Must be an integer. Defaults to `0`.\n\n#### Returns\n\n(`number`): Returns the number rounded to the specified precision.\n\n#### Throws\n\n- Throws an error if `precision` is not an integer.\n"
  },
  {
    "path": "docs/reference/math/sum.md",
    "content": "# sum\n\nReturns the sum of all elements in an array of numbers.\n\n```typescript\nconst total = sum(numbers);\n```\n\n## Usage\n\n### `sum(nums)`\n\nUse `sum` when you want to calculate the total of numbers. It adds up all numbers in an array to compute the sum.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// Basic number sum\nconst numbers = [1, 2, 3, 4, 5];\nconst total = sum(numbers);\nconsole.log(total); // 15\n\n// Sum of decimal numbers\nconst prices = [19.99, 25.5, 3.75];\nconst totalPrice = sum(prices);\nconsole.log(totalPrice); // 49.24\n\n// Sum with negative and positive numbers mixed\nconst values = [-10, 5, -3, 8];\nconst result = sum(values);\nconsole.log(result); // 0\n\n// Single number array\nconst single = [42];\nconst singleSum = sum(single);\nconsole.log(singleSum); // 42\n```\n\nEmpty arrays and real-world examples.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// Empty array returns 0.\nconst empty = sum([]);\nconsole.log(empty); // 0\n\n// Calculate score total\nconst scores = [85, 92, 78, 96, 88];\nconst totalScore = sum(scores);\nconst averageScore = totalScore / scores.length;\nconsole.log(totalScore); // 439\nconsole.log(averageScore); // 87.8\n\n// Calculate monthly sales total\nconst monthlySales = [12000, 15000, 18000, 14000, 16000];\nconst totalSales = sum(monthlySales);\nconsole.log(totalSales); // 75000\n\n// Calculate shopping cart total\nconst cartItems = [29.99, 15.5, 8.75, 42.0];\nconst cartTotal = sum(cartItems);\nconsole.log(cartTotal); // 96.24\n```\n\nCalculation results can be used with other functions.\n\n```typescript\nimport { sum } from 'es-toolkit/math';\nimport { round } from 'es-toolkit/math';\n\n// Round after summing\nconst measurements = [1.234, 2.567, 3.891];\nconst total = sum(measurements);\nconst rounded = round(total, 2);\nconsole.log(rounded); // 7.69\n\n// Calculate percentages\nconst votes = [45, 32, 23];\nconst totalVotes = sum(votes);\nconst percentages = votes.map(vote => round((vote / totalVotes) * 100, 1));\nconsole.log(percentages); // [45.0, 32.0, 23.0]\n```\n\n#### Parameters\n\n- `nums` (`readonly number[]`): The array of numbers to sum.\n\n#### Returns\n\n(`number`): Returns the sum of all numbers in the array. Returns `0` for empty arrays.\n"
  },
  {
    "path": "docs/reference/math/sumBy.md",
    "content": "# sumBy\n\nCalculates the sum of array elements using a transformation function.\n\n```typescript\nconst total = sumBy(items, getValue);\n```\n\n## Usage\n\n### `sumBy(items, getValue)`\n\nUse `sumBy` when you want to convert each element of an array to a number and calculate the sum. It's useful for summing specific properties from an array of objects.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// Sum a specific property from an array of objects\nconst products = [\n  { name: 'laptop', price: 1000 },\n  { name: 'mouse', price: 25 },\n  { name: 'keyboard', price: 75 },\n];\nconst totalPrice = sumBy(products, item => item.price);\nconsole.log(totalPrice); // 1100\n\n// Sum user ages\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst totalAge = sumBy(users, user => user.age);\nconsole.log(totalAge); // 90\n\n// Sum string lengths\nconst words = ['hello', 'world', 'test'];\nconst totalLength = sumBy(words, word => word.length);\nconsole.log(totalLength); // 14\n```\n\nComplex calculations are also possible.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// Sum with weighted scores\nconst scores = [\n  { subject: 'math', score: 90, weight: 0.3 },\n  { subject: 'english', score: 85, weight: 0.2 },\n  { subject: 'science', score: 95, weight: 0.5 },\n];\nconst weightedSum = sumBy(scores, item => item.score * item.weight);\nconsole.log(weightedSum); // 91\n\n// Sum lengths of arrays\nconst arrays = [[1, 2], [3, 4, 5], [6]];\nconst totalElements = sumBy(arrays, arr => arr.length);\nconsole.log(totalElements); // 6\n\n// Conditional calculation\nconst orders = [\n  { id: 1, amount: 100, status: 'completed' },\n  { id: 2, amount: 200, status: 'pending' },\n  { id: 3, amount: 150, status: 'completed' },\n];\nconst completedTotal = sumBy(orders, order => (order.status === 'completed' ? order.amount : 0));\nconsole.log(completedTotal); // 250\n```\n\nReal-world use case examples.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// Sum monthly sales\nconst monthlyReports = [\n  { month: 'January', sales: 12000, expenses: 8000 },\n  { month: 'February', sales: 15000, expenses: 9000 },\n  { month: 'March', sales: 18000, expenses: 11000 },\n];\nconst totalSales = sumBy(monthlyReports, report => report.sales);\nconst totalExpenses = sumBy(monthlyReports, report => report.expenses);\nconst totalProfit = totalSales - totalExpenses;\nconsole.log(totalSales); // 45000\nconsole.log(totalExpenses); // 28000\nconsole.log(totalProfit); // 17000\n\n// Calculate total score for averaging student grades\nconst students = [\n  { name: 'Alice', tests: [85, 90, 88] },\n  { name: 'Bob', tests: [92, 87, 95] },\n  { name: 'Charlie', tests: [78, 85, 82] },\n];\nconst totalTestScores = sumBy(students, student => student.tests.reduce((sum, score) => sum + score, 0));\nconsole.log(totalTestScores); // 762\n```\n\nEmpty arrays return 0.\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\nconst emptyArray = [];\nconst result = sumBy(emptyArray, x => x.value);\nconsole.log(result); // 0\n```\n\n#### Parameters\n\n- `items` (`readonly T[]`): The array to calculate the sum from.\n- `getValue` (`(element: T) => number`): A function that converts each element to a number.\n\n#### Returns\n\n(`number`): Returns the sum of values after applying the transformation function. Returns `0` for empty arrays.\n"
  },
  {
    "path": "docs/reference/object/clone.md",
    "content": "# clone\n\nCreates a shallow copy of the given value.\n\n```typescript\nconst cloned = clone(obj);\n```\n\n## Usage\n\n### `clone(obj)`\n\nUse `clone` when you want to create a shallow copy of objects, arrays, Dates, RegExps, and other values. A shallow copy means only the top-level properties are copied, and nested objects or arrays share references with the original.\n\n```typescript\nimport { clone } from 'es-toolkit/object';\n\n// Primitive values are returned as-is\nconst num = 29;\nconst clonedNum = clone(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// Shallow copy of an array\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\nconsole.log(clonedArr); // [1, 2, 3]\nconsole.log(clonedArr === arr); // false\n\n// Shallow copy of an object\nconst obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\nconst clonedObj = clone(obj);\nconsole.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.c === obj.c); // true (nested array shares reference due to shallow copy)\n```\n\nIt supports various JavaScript types like `Date`, `RegExp`, `Map`, and `Set`.\n\n```typescript\n// Date object\nconst date = new Date();\nconst clonedDate = clone(date);\nconsole.log(clonedDate !== date); // true\nconsole.log(clonedDate.getTime() === date.getTime()); // true\n\n// RegExp object\nconst regex = /abc/gi;\nconst clonedRegex = clone(regex);\nconsole.log(clonedRegex !== regex); // true\nconsole.log(clonedRegex.source === regex.source); // true\n\n// Map and Set\nconst map = new Map([['key', 'value']]);\nconst clonedMap = clone(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key')); // 'value'\n```\n\n#### Parameters\n\n- `obj` (`T`): The value to clone. It can be any type, such as objects, arrays, or primitive values.\n\n#### Returns\n\n(`T`): A shallow copy of the given value.\n"
  },
  {
    "path": "docs/reference/object/cloneDeep.md",
    "content": "# cloneDeep\n\nCreates a deep copy of the given value.\n\n```typescript\nconst deepCloned = cloneDeep(obj);\n```\n\n## Usage\n\n### `cloneDeep(obj)`\n\nUse `cloneDeep` when you want to completely copy an object or array, including all nested structures. A deep copy creates new copies of all nested objects and arrays, making the original and the copy completely independent.\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/object';\n\n// Primitive values are returned as-is\nconst num = 29;\nconst clonedNum = cloneDeep(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// Deep copy of nested objects\nconst obj = { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] };\nconst clonedObj = cloneDeep(obj);\nconsole.log(clonedObj); // { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.a === obj.a); // false (nested objects are also copied)\nconsole.log(clonedObj.d === obj.d); // false (nested arrays are also copied)\nconsole.log(clonedObj.d[2] === obj.d[2]); // false (objects within arrays are also copied)\n\n// Modifying the original doesn't affect the copy\nconst original = { a: { count: 1 } };\nconst copied = cloneDeep(original);\noriginal.a.count = 2;\nconsole.log(copied.a.count); // 1 (unchanged)\n```\n\nIt supports various JavaScript types like `Map` and `Set`, and handles circular references safely.\n\n```typescript\n// Deep copy of Map and Set\nconst map = new Map([['key', { nested: 'value' }]]);\nconst clonedMap = cloneDeep(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key') !== map.get('key')); // true (nested object is also copied)\n\n// Handles circular references safely\nconst circular: any = { name: 'test' };\ncircular.self = circular;\nconst clonedCircular = cloneDeep(circular);\nconsole.log(clonedCircular !== circular); // true\nconsole.log(clonedCircular.self === clonedCircular); // true (circular reference is maintained)\n```\n\nFor read-only properties defined by getters, the return value of the getter is stored as a regular property in the copied object.\n\n```typescript\nconst source = {\n  get computedValue() {\n    return 42;\n  },\n  normalValue: 'hello',\n};\n\nconst cloned = cloneDeep(source);\nconsole.log(cloned); // { computedValue: 42, normalValue: 'hello' }\n```\n\n#### Parameters\n\n- `obj` (`T`): The value to deeply copy. It can be any type, such as objects, arrays, or primitive values.\n\n#### Returns\n\n(`T`): A deep copy of the given value.\n"
  },
  {
    "path": "docs/reference/object/cloneDeepWith.md",
    "content": "# cloneDeepWith\n\nDeeply clones the given value with a custom cloning function.\n\n```typescript\nconst customCloned = cloneDeepWith(obj, cloneValue);\n```\n\n## Usage\n\n### `cloneDeepWith(obj, cloneValue)`\n\nUse `cloneDeepWith` when you want to deeply copy an object or array with custom logic for specific values. If the custom function `cloneValue` returns a value, that value is used; if it returns `undefined`, the default deep copying method is used.\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/object';\n\n// Double numbers during cloning\nconst obj = { a: 1, b: { c: 2, d: 'text' } };\nconst clonedObj = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value * 2;\n  }\n  // Return undefined to use default cloning\n});\nconsole.log(clonedObj); // { a: 2, b: { c: 4, d: 'text' } }\n\n// Add 1 to all array elements during cloning\nconst arr = [1, [2, 3], { num: 4 }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value + 1;\n  }\n});\nconsole.log(clonedArr); // [2, [3, 4], { num: 5 }]\n```\n\nThe custom function receives the current value, key, original object, and internal stack information as parameters.\n\n```typescript\nconst data = {\n  user: { name: 'Alice', age: 30 },\n  settings: { theme: 'dark', lang: 'en' },\n};\n\nconst result = cloneDeepWith(data, (value, key, obj, stack) => {\n  // Clone 'user' object with special handling\n  if (key === 'user' && typeof value === 'object') {\n    return { ...value, cloned: true };\n  }\n\n  // Add prefix to strings\n  if (typeof value === 'string') {\n    return `cloned_${value}`;\n  }\n});\n\nconsole.log(result);\n// {\n//   user: { name: 'cloned_Alice', age: 30, cloned: true },\n//   settings: { theme: 'cloned_dark', lang: 'cloned_en' }\n// }\n```\n\nUsing a custom function allows you to freely configure how objects are cloned. For example, you can copy `Date` objects to be one year in the future.\n\n```typescript\nconst data = {\n  created: new Date('2023-01-01'),\n  updated: new Date('2023-12-31'),\n  name: 'Document',\n};\n\nconst cloned = cloneDeepWith(data, value => {\n  // Set Date objects to one year in the future\n  if (value instanceof Date) {\n    const newDate = new Date(value);\n    newDate.setFullYear(newDate.getFullYear() + 1);\n    return newDate;\n  }\n});\n\nconsole.log(cloned.created.getFullYear()); // 2024\nconsole.log(cloned.updated.getFullYear()); // 2024\n```\n\n#### Parameters\n\n- `obj` (`T`): The value to deeply copy.\n- `cloneValue` (`(value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any`): A custom cloning function. Return the value to clone, or return `undefined` to use the default method.\n  - `value`: The current value being cloned.\n  - `key`: The property name of the current value.\n  - `obj`: The original object to clone.\n  - `stack`: An internal stack to handle circular references.\n\n#### Returns\n\n(`T`): A deep copy processed through the custom function.\n"
  },
  {
    "path": "docs/reference/object/findKey.md",
    "content": "# findKey\n\nFinds the key of the first element that satisfies the given condition.\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## Usage\n\n### `findKey(obj, predicate)`\n\nUse `findKey` when you want to find the key of the first element in an object that satisfies a specific condition. It returns the key for the first value where the condition function returns `true`.\n\n```typescript\nimport { findKey } from 'es-toolkit/object';\n\n// Find the first user under 30 years old\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nconst youngUserKey = findKey(users, user => user.age < 30);\nconsole.log(youngUserKey); // 'alice'\n\n// Find an inactive user\nconst inactiveUserKey = findKey(users, user => !user.active);\nconsole.log(inactiveUserKey); // 'bob'\n\n// When no element satisfies the condition\nconst seniorUserKey = findKey(users, user => user.age > 50);\nconsole.log(seniorUserKey); // undefined\n```\n\nThe condition function receives the current value, key, and the entire object.\n\n```typescript\nconst data = {\n  item1: { priority: 'high', status: 'pending' },\n  item2: { priority: 'low', status: 'done' },\n  item3: { priority: 'high', status: 'done' },\n};\n\n// Search considering both key name and value\nconst result = findKey(data, (value, key, obj) => {\n  return key.includes('2') && value.status === 'done';\n});\nconsole.log(result); // 'item2'\n```\n\nCan also be used with complex object structures.\n\n```typescript\nconst products = {\n  laptop: {\n    specs: { ram: 16, cpu: 'Intel i7' },\n    price: 1200,\n    available: true,\n  },\n  phone: {\n    specs: { ram: 8, cpu: 'Snapdragon' },\n    price: 800,\n    available: false,\n  },\n  tablet: {\n    specs: { ram: 12, cpu: 'Apple M1' },\n    price: 1000,\n    available: true,\n  },\n};\n\nconst affordableKey = findKey(products, product => product.price < 1000 && product.available);\nconsole.log(affordableKey); // undefined (no product satisfies the condition)\n\nconst highRamKey = findKey(products, product => product.specs.ram >= 12);\nconsole.log(highRamKey); // 'laptop'\n```\n\n#### Parameters\n\n- `obj` (`T extends Record<any, any>`): The object to search.\n- `predicate` (`(value: T[keyof T], key: keyof T, obj: T) => boolean`): A condition function to execute for each element. Finds the key of the first element that returns `true`.\n\n#### Returns\n\n(`keyof T | undefined`): The key of the first element that satisfies the condition. Returns `undefined` if no element satisfies the condition.\n"
  },
  {
    "path": "docs/reference/object/flattenObject.md",
    "content": "# flattenObject\n\nConverts a nested object into a flat object.\n\n```typescript\nconst flattened = flattenObject(object, options?);\n```\n\n## Usage\n\n### `flattenObject(object, options?)`\n\nUse `flattenObject` when you want to flatten deeply nested objects or arrays using dot (`.`) notation for keys. Each nested property becomes a single-level object with keys connected by a delimiter.\n\n```typescript\nimport { flattenObject } from 'es-toolkit/object';\n\n// Flatten a nested object\nconst nestedObject = {\n  a: {\n    b: {\n      c: 1,\n    },\n  },\n  d: [2, 3],\n  e: 'simple',\n};\n\nconst flattened = flattenObject(nestedObject);\nconsole.log(flattened);\n// {\n//   'a.b.c': 1,\n//   'd.0': 2,\n//   'd.1': 3,\n//   'e': 'simple'\n// }\n\n// Use a custom delimiter\nconst withCustomDelimiter = flattenObject(nestedObject, { delimiter: '/' });\nconsole.log(withCustomDelimiter);\n// {\n//   'a/b/c': 1,\n//   'd/0': 2,\n//   'd/1': 3,\n//   'e': 'simple'\n// }\n```\n\nIt's useful for flattening configuration objects like this:\n\n```typescript\n// Flatten a configuration object\nconst config = {\n  database: {\n    host: 'localhost',\n    port: 5432,\n    credentials: {\n      username: 'admin',\n      password: 'secret',\n    },\n  },\n  features: ['auth', 'logging'],\n  debug: true,\n};\n\nconst flatConfig = flattenObject(config);\nconsole.log(flatConfig);\n// {\n//   'database.host': 'localhost',\n//   'database.port': 5432,\n//   'database.credentials.username': 'admin',\n//   'database.credentials.password': 'secret',\n//   'features.0': 'auth',\n//   'features.1': 'logging',\n//   'debug': true\n// }\n```\n\nUsing `options.delimiter`, you can flatten the object with custom characters like underscores (`_`) instead of dots (`.`).\n\n```typescript\n// Environment variable style with underscores\nconst envStyle = flattenObject(config, { delimiter: '_' });\nconsole.log(envStyle);\n// {\n//   'database_host': 'localhost',\n//   'database_port': 5432,\n//   'database_credentials_username': 'admin',\n//   'database_credentials_password': 'secret',\n//   'features_0': 'auth',\n//   'features_1': 'logging',\n//   'debug': true\n// }\n```\n\nEmpty objects and special cases are handled appropriately.\n\n```typescript\n// Empty objects or arrays\nconst emptyCase = {\n  empty: {},\n  emptyArray: [],\n  nullValue: null,\n  undefinedValue: undefined,\n};\n\nconst result = flattenObject(emptyCase);\nconsole.log(result);\n// {\n//   'empty': {},\n//   'emptyArray: [],\n//   'nullValue': null,\n//   'undefinedValue': undefined\n// }\n// Empty objects and empty arrays appear as keys\n```\n\n#### Parameters\n\n- `object` (`object`): The object to flatten.\n- `options` (`FlattenObjectOptions`, optional): Flattening options.\n  - `delimiter` (`string`, optional): The delimiter to connect nested keys. Defaults to `'.'`.\n\n#### Returns\n\n(`Record<string, any>`): A new object with all nested properties flattened.\n"
  },
  {
    "path": "docs/reference/object/invert.md",
    "content": "# invert\n\nCreates a new object with keys and values swapped.\n\n```typescript\nconst inverted = invert(obj);\n```\n\n## Usage\n\n### `invert(obj)`\n\nUse `invert` when you want to create a new object with keys and values swapped. The keys of the original object become the values of the new object, and the values of the original object become the keys of the new object. If there are duplicate values, the key that appears later will be used.\n\n```typescript\nimport { invert } from 'es-toolkit/object';\n\n// Basic usage\nconst original = { a: 1, b: 2, c: 3 };\nconst inverted = invert(original);\nconsole.log(inverted); // { 1: 'a', 2: 'b', 3: 'c' }\n\n// When there are duplicate values\nconst withDuplicates = { a: 1, b: 1, c: 2 };\nconst result = invert(withDuplicates);\nconsole.log(result); // { 1: 'b', 2: 'c' } (later appearing 'b' is used as the value for key 1)\n\n// String keys and number values\nconst grades = { alice: 85, bob: 92, charlie: 88 };\nconst invertedGrades = invert(grades);\nconsole.log(invertedGrades); // { 85: 'alice', 92: 'bob', 88: 'charlie' }\n```\n\nCan be used with various types of keys and values.\n\n```typescript\n// Number keys and string values\nconst statusCodes = { 200: 'OK', 404: 'Not Found', 500: 'Internal Server Error' };\nconst invertedCodes = invert(statusCodes);\nconsole.log(invertedCodes);\n// { 'OK': '200', 'Not Found': '404', 'Internal Server Error': '500' }\n\n// Useful when reverse lookup is needed\nconst userRoles = { admin: 'administrator', user: 'regular_user', guest: 'visitor' };\nconst roleToKey = invert(userRoles);\nconsole.log(roleToKey);\n// { 'administrator': 'admin', 'regular_user': 'user', 'visitor': 'guest' }\n\n// Now you can find keys by values\nfunction findRoleKey(roleName: string) {\n  return roleToKey[roleName];\n}\nconsole.log(findRoleKey('administrator')); // 'admin'\n```\n\nUseful when used with enums or constant objects.\n\n```typescript\n// Color code mapping\nconst colorCodes = {\n  red: '#FF0000',\n  green: '#00FF00',\n  blue: '#0000FF',\n};\n\nconst codeToColor = invert(colorCodes);\nconsole.log(codeToColor);\n// { '#FF0000': 'red', '#00FF00': 'green', '#0000FF': 'blue' }\n\n// Now you can find color names by color codes\nfunction getColorName(code: string) {\n  return codeToColor[code] || 'unknown';\n}\nconsole.log(getColorName('#FF0000')); // 'red'\n```\n\n#### Parameters\n\n- `obj` (`Record<K, V>`): The object to swap keys and values. Both keys and values must be strings, numbers, or symbols.\n\n#### Returns\n\n(`Record<V, K>`): A new object with the keys and values of the original object swapped.\n"
  },
  {
    "path": "docs/reference/object/mapKeys.md",
    "content": "# mapKeys\n\nReturns a new object with keys transformed through a function.\n\n```typescript\nconst newObj = mapKeys(object, getNewKey);\n```\n\n## Usage\n\n### `mapKeys(object, getNewKey)`\n\nUse `mapKeys` when you want to create a new object by transforming each key. Values remain the same, and only the keys are changed to the results of the `getNewKey` function.\n\n```typescript\nimport { mapKeys } from 'es-toolkit/object';\n\n// Add prefix to keys\nconst obj = { a: 1, b: 2 };\nconst prefixed = mapKeys(obj, (value, key) => `prefix_${key}`);\n// prefixed becomes { prefix_a: 1, prefix_b: 2 }\n\n// Combine key and value to create new keys\nconst combined = mapKeys(obj, (value, key) => `${key}${value}`);\n// combined becomes { a1: 1, b2: 2 }\n\n// Convert keys to uppercase\nconst uppercased = mapKeys(obj, (value, key) => key.toString().toUpperCase());\n// uppercased becomes { A: 1, B: 2 }\n```\n\n#### Parameters\n\n- `object` (`T extends Record<PropertyKey, any>`): The object to transform keys from.\n- `getNewKey` (`(value: T[keyof T], key: keyof T, object: T) => K`): A function that generates new keys. Receives value, key, and the entire object as parameters.\n\n#### Returns\n\n(`Record<K, T[keyof T]>`): Returns a new object with transformed keys.\n"
  },
  {
    "path": "docs/reference/object/mapValues.md",
    "content": "# mapValues\n\nReturns a new object with values transformed through a function.\n\n```typescript\nconst newObj = mapValues(object, getNewValue);\n```\n\n## Usage\n\n### `mapValues(object, getNewValue)`\n\nUse `mapValues` when you want to create a new object by transforming each value. Keys remain the same, and only the values are changed to the results of the `getNewValue` function.\n\n```typescript\nimport { mapValues } from 'es-toolkit/object';\n\n// Double all values\nconst numbers = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(numbers, value => value * 2);\n// doubled becomes { a: 2, b: 4, c: 6 }\n\n// Convert string values to uppercase\nconst strings = { first: 'hello', second: 'world' };\nconst uppercased = mapValues(strings, value => value.toUpperCase());\n// uppercased becomes { first: 'HELLO', second: 'WORLD' }\n\n// Use both key and value\nconst scores = { alice: 85, bob: 90, charlie: 95 };\nconst grades = mapValues(scores, (value, key) => `${key}: ${value >= 90 ? 'A' : 'B'}`);\n// grades becomes { alice: 'alice: B', bob: 'bob: A', charlie: 'charlie: A' }\n```\n\n#### Parameters\n\n- `object` (`T extends object`): The object to transform values from.\n- `getNewValue` (`(value: T[K], key: K, object: T) => V`): A function that generates new values. Receives value, key, and the entire object as parameters.\n\n#### Returns\n\n(`Record<K, V>`): Returns a new object with transformed values.\n"
  },
  {
    "path": "docs/reference/object/merge.md",
    "content": "# merge\n\nDeeply merges the source object into the target object, modifying the target object.\n\n```typescript\nconst result = merge(target, source);\n```\n\n## Usage\n\n### `merge(target, source)`\n\nUse `merge` when you want to deeply merge two objects. Nested objects and arrays are also merged recursively. Unlike [toMerged](./toMerged.md), this function modifies the original `target` object.\n\n```typescript\nimport { merge } from 'es-toolkit/object';\n\n// Basic object merging\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// Both result and target become { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// Arrays are also merged\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nmerge(arrayTarget, arraySource);\n// arrayTarget becomes { a: [3, 2], b: { x: 1, y: 2 } }\n\n// null values are handled appropriately\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nmerge(nullTarget, nullSource);\n// nullTarget becomes { a: [1, 2, 3] }\n```\n\n`undefined` values do not overwrite existing values.\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nmerge(target, source);\n// target becomes { a: 1, b: 2, c: 3 } (b is not overwritten)\n```\n\n#### Parameters\n\n- `target` (`T extends Record<PropertyKey, any>`): The target object to merge the source object into. This object is modified.\n- `source` (`S extends Record<PropertyKey, any>`): The source object to merge into the target object.\n\n#### Returns\n\n(`T & S`): Returns the target object with the source object merged in.\n\n## Examples\n\n```typescript\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n// Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\nconst target = { a: [1, 2], b: { x: 1 } };\nconst source = { a: [3], b: { y: 2 } };\nconst result = merge(target, source);\nconsole.log(result);\n// Output: { a: [3, 2], b: { x: 1, y: 2 } }\n\nconst target = { a: null };\nconst source = { a: [1, 2, 3] };\nconst result = merge(target, source);\nconsole.log(result);\n// Output: { a: [1, 2, 3] }\n```\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { merge } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n```\n\n:::\n\n## Performance Comparison\n\n|                   | [Bundle Size](../../bundle-size.md) | [Performance](../../performance.md) |\n| ----------------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit        | 271 bytes (97.8% smaller)           | 1,952,436 times (3.65× faster)      |\n| es-toolkit/compat | 4,381 bytes (64.9% smaller)         | 706,558 times (1.32× faster)        |\n| lodash-es         | 12,483 bytes                        | 533,484 times                       |\n"
  },
  {
    "path": "docs/reference/object/mergeWith.md",
    "content": "# mergeWith\n\nDeeply merges the source object into the target object using a custom merge function, modifying the target object.\n\n```typescript\nconst result = mergeWith(target, source, mergeFunction);\n```\n\n## Usage\n\n### `mergeWith(target, source, merge)`\n\nUse `mergeWith` when you want to apply custom merge logic for each property when merging two objects. If the merge function returns `undefined`, the default deep merge logic is used.\n\n```typescript\nimport { mergeWith } from 'es-toolkit/object';\n\n// Add number values during merge\nconst target = { a: 1, b: 2, c: { x: 10 } };\nconst source = { b: 3, c: { x: 20, y: 30 }, d: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue, key) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue; // Add numbers\n  }\n  // Returning undefined uses default merge logic\n});\n// Both result and target become { a: 1, b: 5, c: { x: 30, y: 30 }, d: 4 }\n\n// Concatenate arrays during merge\nconst arrayTarget = { items: [1, 2], metadata: { count: 2 } };\nconst arraySource = { items: [3, 4], metadata: { count: 2 } };\n\nmergeWith(arrayTarget, arraySource, (targetValue, sourceValue) => {\n  if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n    return targetValue.concat(sourceValue);\n  }\n});\n// arrayTarget becomes { items: [1, 2, 3, 4], metadata: { count: 2 } }\n\n// Apply different merge logic based on key\nconst config = { timeout: 1000, retries: 3, features: { featureA: true } };\nconst updates = { timeout: 2000, retries: 5, features: { featureB: false } };\n\nmergeWith(config, updates, (targetValue, sourceValue, key) => {\n  if (key === 'timeout') {\n    return Math.max(targetValue, sourceValue); // Use larger value for timeout\n  }\n  if (key === 'retries') {\n    return Math.min(targetValue, sourceValue); // Use smaller value for retries\n  }\n  // Use default merge logic for other properties\n});\n// config becomes { timeout: 2000, retries: 3, features: { featureA: true, featureB: false } }\n```\n\n#### Parameters\n\n- `target` (`T extends Record<PropertyKey, any>`): The target object to merge the source object into. This object is modified.\n- `source` (`S extends Record<PropertyKey, any>`): The source object to merge into the target object.\n- `merge` (`(targetValue: any, sourceValue: any, key: string, target: T, source: S) => any`): A custom merge function.\n  - `targetValue`: The current value in the target object\n  - `sourceValue`: The value in the source object\n  - `key`: The key of the property being merged\n  - `target`: The target object\n  - `source`: The source object\n\n#### Returns\n\n(`T & S`): Returns the target object with the source object merged in.\n\n## Examples\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nmergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\n// Output: { a: 1, b: 5, c: 4 }\n\nconst target = { a: [1], b: [2] };\nconst source = { a: [3], b: [4] };\n\nconst result = mergeWith(target, source, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Output: { a: [1, 3], b: [2, 4] })\n```\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { mergeWith } from 'es-toolkit';\n\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/object/omit.md",
    "content": "# omit\n\nReturns a new object excluding the specified keys.\n\n```typescript\nconst result = omit(obj, keys);\n```\n\n## Usage\n\n### `omit(obj, keys)`\n\nUse `omit` when you want to exclude specific keys from an object. It returns a new object with the properties corresponding to the specified keys removed.\n\n```typescript\nimport { omit } from 'es-toolkit/object';\n\n// Exclude specific keys\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = omit(obj, ['b', 'c']);\n// result is { a: 1, d: 4 }\n\n// Specifying non-existent keys doesn't cause an error\nconst safe = omit(obj, ['b', 'nonexistent']);\n// safe is { a: 1, c: 3, d: 4 }\n```\n\n#### Parameters\n\n- `obj` (`T extends Record<string, any>`): The object to exclude keys from.\n- `keys` (`readonly K[]`): An array of keys to exclude from the object.\n\n#### Returns\n\n(`Omit<T, K>`): A new object with the specified keys excluded.\n"
  },
  {
    "path": "docs/reference/object/omitBy.md",
    "content": "# omitBy\n\nReturns a new object containing only the properties that do not satisfy the condition function.\n\n```typescript\nconst result = omitBy(obj, shouldOmit);\n```\n\n## Usage\n\n### `omitBy(obj, shouldOmit)`\n\nUse `omitBy` when you want to selectively exclude properties from an object based on a condition function. Properties for which the condition function returns `true` are excluded, and only properties that return `false` are included in the new object.\n\n```typescript\nimport { omitBy } from 'es-toolkit/object';\n\n// Exclude properties with string values\nconst obj = { a: 1, b: 'remove', c: 3, d: 'also remove' };\nconst result = omitBy(obj, value => typeof value === 'string');\n// result is { a: 1, c: 3 }\n\n// Exclude only even values\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst odds = omitBy(numbers, value => value % 2 === 0);\n// odds is { a: 1, c: 3 }\n\n// Use both key and value\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst nonAdmins = omitBy(data, (value, key) => key.startsWith('admin'));\n// nonAdmins is { user1: 25, user2: 17 }\n```\n\n#### Parameters\n\n- `obj` (`T extends Record<string, any>`): The object to filter properties from.\n- `shouldOmit` (`(value: T[keyof T], key: keyof T) => boolean`): A condition function that determines whether to exclude a property. Receives the value and key, and returns `true` to exclude, `false` to keep.\n\n#### Returns\n\n(`Partial<T>`): A new object consisting of properties that do not satisfy the condition function.\n"
  },
  {
    "path": "docs/reference/object/pick.md",
    "content": "# pick\n\nReturns a new object containing only the properties corresponding to the specified keys.\n\n```typescript\nconst result = pick(obj, keys);\n```\n\n## Usage\n\n### `pick(obj, keys)`\n\nUse `pick` when you want to select only specific keys from an object. It returns a new object containing only the properties corresponding to the specified keys.\n\n```typescript\nimport { pick } from 'es-toolkit/object';\n\n// Select specific keys\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// result is { a: 1, c: 3 }\n\n// Non-existent keys are ignored\nconst safe = pick(obj, ['a', 'nonexistent']);\n// safe is { a: 1 }\n\n// Can be used with nested objects\nconst nested = {\n  user: { name: 'John', age: 30 },\n  posts: ['post1', 'post2'],\n  settings: { theme: 'dark' },\n};\nconst picked = pick(nested, ['user', 'settings']);\n// picked is { user: { name: 'John', age: 30 }, settings: { theme: 'dark' } }\n```\n\n#### Parameters\n\n- `obj` (`T extends Record<string, any>`): The object to select properties from.\n- `keys` (`readonly K[]`): An array of keys to select from the object.\n\n#### Returns\n\n(`Pick<T, K>`): A new object containing only the properties corresponding to the specified keys.\n"
  },
  {
    "path": "docs/reference/object/pickBy.md",
    "content": "# pickBy\n\nReturns a new object containing only the properties that satisfy the condition function.\n\n```typescript\nconst result = pickBy(obj, shouldPick);\n```\n\n## Usage\n\n### `pickBy(obj, shouldPick)`\n\nUse `pickBy` when you want to selectively pick properties from an object based on a condition function. Only properties for which the condition function returns `true` are included in the new object.\n\n```typescript\nimport { pickBy } from 'es-toolkit/object';\n\n// Pick only properties with string values\nconst obj = { a: 1, b: 'select', c: 3, d: 'also select' };\nconst result = pickBy(obj, value => typeof value === 'string');\n// result is { b: 'select', d: 'also select' }\n\n// Pick only even values\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst evens = pickBy(numbers, value => value % 2 === 0);\n// evens is { b: 2, d: 4 }\n\n// Use both key and value\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst admins = pickBy(data, (value, key) => key.startsWith('admin') && value > 25);\n// admins is { admin1: 30, admin2: 28 }\n```\n\n#### Parameters\n\n- `obj` (`T extends Record<string, any>`): The object to filter properties from.\n- `shouldPick` (`(value: T[keyof T], key: keyof T) => boolean`): A condition function that determines whether to pick a property. Receives the value and key, and returns `true` to pick, `false` to exclude.\n\n#### Returns\n\n(`Partial<T>`): A new object containing only the properties that satisfy the condition function.\n"
  },
  {
    "path": "docs/reference/object/toCamelCaseKeys.md",
    "content": "# toCamelCaseKeys\n\nReturns a new object with all keys in objects and arrays converted to camelCase.\n\nCamel case is a naming convention where the first word is lowercase and the first letter of subsequent words is capitalized and concatenated. For example, it's written as `camelCase`.\n\n```typescript\nconst camelCased = toCamelCaseKeys(obj);\n```\n\n## Usage\n\n### `toCamelCaseKeys(obj)`\n\nUse `toCamelCaseKeys` when you want to convert all keys of an object to camel case. Nested objects and objects within arrays are also converted recursively.\n\nFor example, object keys are converted as follows:\n\n- `snake_case` → `camelCase` (e.g. `user_id` → `userId`)\n- `PascalCase` → `camelCase` (e.g. `UserId` → `userId`)\n- `uppercase keys` → `camelCase` (e.g. `FIRST_NAME` → `firstName`, `LAST` → `last`)\n\n```typescript\nimport { toCamelCaseKeys } from 'es-toolkit/object';\n\n// Basic object conversion\nconst obj = { user_id: 1, first_name: 'John', last_name: 'Doe' };\nconst result = toCamelCaseKeys(obj);\n// result is { userId: 1, firstName: 'John', lastName: 'Doe' }\n\n// Objects within arrays are also converted\nconst users = [\n  { user_id: 1, first_name: 'John' },\n  { user_id: 2, first_name: 'Jane' },\n];\nconst convertedUsers = toCamelCaseKeys(users);\n// convertedUsers is [{ userId: 1, firstName: 'John' }, { userId: 2, firstName: 'Jane' }]\n\n// Nested objects are fully converted\nconst nested = {\n  user_data: {\n    user_id: 1,\n    contact_info: {\n      email_address: 'john@example.com',\n      phone_number: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toCamelCaseKeys(nested);\n// nestedResult is {\n//   userData: {\n//     userId: 1,\n//     contactInfo: {\n//       emailAddress: 'john@example.com',\n//       phoneNumber: '123-456-7890'\n//     }\n//   }\n// }\n\n// PascalCase and uppercase keys are also converted\nconst raw = { UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' };\nconst converted = toCamelCaseKeys(raw);\n// converted is { userId: 1, firstName: 'JinHo', last: 'Yeom' }\n```\n\n#### Parameters\n\n- `obj` (`T`): The object, array, or primitive value to convert keys to camelCase.\n\n#### Returns\n\n(`ToCamelCaseKeys<T>`): Returns a new object with all keys converted to camelCase.\n"
  },
  {
    "path": "docs/reference/object/toMerged.md",
    "content": "# toMerged\n\nReturns a new object with the source object deeply merged into a copy of the target object.\n\n```typescript\nconst result = toMerged(target, source);\n```\n\n## Usage\n\n### `toMerged(target, source)`\n\nUse `toMerged` when you want to deeply merge two objects but don't want to modify the original object. Unlike [merge](./merge.md), this function does not modify the original `target` object and returns a new object.\n\n```typescript\nimport { toMerged } from 'es-toolkit/object';\n\n// Basic object merging\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\n// result is { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n// target remains { a: 1, b: { x: 1, y: 2 } }\n\n// Arrays are also merged\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nconst arrayResult = toMerged(arrayTarget, arraySource);\n// arrayResult is { a: [3, 2], b: { x: 1, y: 2 } }\n// arrayTarget is not modified\n\n// null values are handled appropriately\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nconst nullResult = toMerged(nullTarget, nullSource);\n// nullResult is { a: [1, 2, 3] }\n```\n\n`undefined` values do not overwrite existing values.\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nconst result = toMerged(target, source);\n// result is { a: 1, b: 2, c: 3 } (b is not overwritten)\n```\n\n#### Parameters\n\n- `target` (`T extends Record<PropertyKey, any>`): The target object to be merged. This object is not modified.\n- `source` (`S extends Record<PropertyKey, any>`): The source object to merge into the target object.\n\n#### Returns\n\n(`T & S`): Returns a new object with the target and source objects merged.\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { toMerged } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/object/toSnakeCaseKeys.md",
    "content": "# toSnakeCaseKeys\n\nReturns a new object with all keys in objects and arrays converted to snake_case.\n\nSnake case is a naming convention where each word in an identifier is written in lowercase and connected with underscores (`_`). For example, it's written as `snake_case`.\n\n```typescript\nconst snakeCased = toSnakeCaseKeys(obj);\n```\n\n## Usage\n\n### `toSnakeCaseKeys(obj)`\n\nUse `toSnakeCaseKeys` when you want to convert all keys of an object to snake_case. Nested objects and objects within arrays are also converted recursively.\n\nFor example, object keys are converted as follows:\n\n- `camelCase` → `snake_case` (e.g. `userId` → `user_id`)\n- `PascalCase` → `snake_case` (e.g. `UserId` → `user_id`)\n- `UPPERCASE_KEYS` → `snake_case` (e.g. `FIRST_NAME` → `first_name`, `LAST` → `last`)\n\n```typescript\nimport { toSnakeCaseKeys } from 'es-toolkit/object';\n\n// Basic object conversion\nconst obj = { userId: 1, firstName: 'John', lastName: 'Doe' };\nconst result = toSnakeCaseKeys(obj);\n// result is { user_id: 1, first_name: 'John', last_name: 'Doe' }\n\n// Objects within arrays are also converted\nconst users = [\n  { userId: 1, firstName: 'John' },\n  { userId: 2, firstName: 'Jane' },\n];\nconst convertedUsers = toSnakeCaseKeys(users);\n// convertedUsers is [{ user_id: 1, first_name: 'John' }, { user_id: 2, first_name: 'Jane' }]\n\n// Nested objects are fully converted\nconst nested = {\n  userData: {\n    userId: 1,\n    contactInfo: {\n      emailAddress: 'john@example.com',\n      phoneNumber: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toSnakeCaseKeys(nested);\n// nestedResult is {\n//   user_data: {\n//     user_id: 1,\n//     contact_info: {\n//       email_address: 'john@example.com',\n//       phone_number: '123-456-7890'\n//     }\n//   }\n// }\n```\n\n#### Parameters\n\n- `obj` (`T`): The object, array, or primitive value to convert keys to snake_case.\n\n#### Returns\n\n(`ToSnakeCaseKeys<T>`): Returns a new object with all keys converted to snake_case.\n"
  },
  {
    "path": "docs/reference/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer\n\nChecks if a value is an `ArrayBuffer` instance.\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## Usage\n\n### `isArrayBuffer(value)`\n\nUse `isArrayBuffer` when you want to check if a value is an `ArrayBuffer`. It can also be used as a type guard in TypeScript.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// Checking ArrayBuffer instances\nconst buffer = new ArrayBuffer(16);\nconst notBuffer = new Array(16);\n\nconsole.log(isArrayBuffer(buffer)); // true\nconsole.log(isArrayBuffer(notBuffer)); // false\n\n// Useful when processing binary data\nconst data: unknown = getDataFromAPI();\nif (isArrayBuffer(data)) {\n  // In TypeScript, data is narrowed to ArrayBuffer\n  const uint8View = new Uint8Array(data);\n  console.log(`Buffer size: ${data.byteLength} bytes`);\n}\n\n// Comparison with various types\nconsole.log(isArrayBuffer(new ArrayBuffer(8))); // true\nconsole.log(isArrayBuffer(new Uint8Array(8))); // false\nconsole.log(isArrayBuffer(new DataView(new ArrayBuffer(8)))); // false\nconsole.log(isArrayBuffer([])); // false\nconsole.log(isArrayBuffer({})); // false\nconsole.log(isArrayBuffer(null)); // false\nconsole.log(isArrayBuffer(undefined)); // false\n```\n\nFrequently used in file processing and network communication.\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// Processing file read results\nasync function processFileData(file: File) {\n  const result = await file.arrayBuffer();\n\n  if (isArrayBuffer(result)) {\n    console.log(`File size: ${result.byteLength} bytes`);\n\n    // Process binary data\n    const view = new DataView(result);\n    const header = view.getUint32(0, true);\n    console.log(`File header: ${header.toString(16)}`);\n  }\n}\n\n// Checking data received from WebSocket\nfunction handleWebSocketMessage(data: unknown) {\n  if (isArrayBuffer(data)) {\n    console.log('Received binary message');\n    const bytes = new Uint8Array(data);\n    // Process byte data\n  } else if (typeof data === 'string') {\n    console.log('Received text message');\n    // Process string data\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an `ArrayBuffer`.\n\n#### Returns\n\n(`value is ArrayBuffer`): Returns `true` if the value is an `ArrayBuffer`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isBlob.md",
    "content": "# isBlob\n\nChecks if a value is a Blob instance.\n\n```typescript\nconst result = isBlob(value);\n```\n\n## Usage\n\n### `isBlob(value)`\n\nUse `isBlob` when you want to check if a value is a Blob instance. Useful when handling files or binary data in browser environments.\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// Basic Blob instances\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconst file = new File(['content'], 'example.txt', { type: 'text/plain' });\n\nconsole.log(isBlob(blob)); // true\nconsole.log(isBlob(file)); // true (File extends Blob)\n\n// Non-Blob values\nconsole.log(isBlob(new ArrayBuffer(8))); // false\nconsole.log(isBlob('text data')); // false\nconsole.log(isBlob({})); // false\nconsole.log(isBlob(null)); // false\n```\n\nUseful for file processing and API response validation.\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// Processing uploaded files\nfunction processUploadedFile(file: unknown) {\n  if (isBlob(file)) {\n    // TypeScript infers file as Blob\n    console.log(`File size: ${file.size} bytes`);\n    console.log(`MIME type: ${file.type}`);\n\n    // Safely use Blob methods\n    file.text().then(text => console.log('Content:', text));\n  } else {\n    console.log('Invalid file');\n  }\n}\n\n// Implementing download functionality\nasync function handleDownload(data: unknown, filename: string) {\n  if (isBlob(data)) {\n    const url = URL.createObjectURL(data);\n    const link = document.createElement('a');\n    link.href = url;\n    link.download = filename;\n    link.click();\n    URL.revokeObjectURL(url);\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Blob instance.\n\n#### Returns\n\n(`value is Blob`): Returns `true` if the value is a Blob instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isBoolean.md",
    "content": "# isBoolean\n\nChecks if a value is a boolean type.\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## Usage\n\n### `isBoolean(value)`\n\nUse `isBoolean` when you want to check if a value is exactly `true` or `false`. It acts as a type guard in TypeScript, narrowing the value's type to `boolean`.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// Checking basic boolean values\nisBoolean(true); // true\nisBoolean(false); // true\n\n// Distinguishing from other types\nisBoolean(1); // false\nisBoolean(0); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\n```\n\nParticularly useful when used as a type guard in TypeScript.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\nfunction processValue(value: unknown) {\n  if (isBoolean(value)) {\n    // value is narrowed to boolean\n    console.log(value ? \"It's true\" : \"It's false\");\n  } else {\n    console.log('Not a boolean value');\n  }\n}\n```\n\nCan also be used for validating API responses or user input.\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// Validating API response\ninterface APIResponse {\n  success: unknown;\n  data: any;\n}\n\nfunction validateResponse(response: APIResponse) {\n  if (isBoolean(response.success)) {\n    console.log(`API call ${response.success ? 'succeeded' : 'failed'}`);\n    return response.success;\n  }\n  console.log('Invalid response format');\n  return false;\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a boolean type.\n\n#### Returns\n\n(`value is boolean`): Returns `true` if the value is `true` or `false`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isBrowser.md",
    "content": "# isBrowser\n\nChecks if the current execution environment is a browser.\n\n```typescript\nconst result = isBrowser();\n```\n\n## Usage\n\n### `isBrowser()`\n\nUse `isBrowser` when you have code that should only run in browser environments. It determines if the environment is a browser by checking for the existence of `window.document`. Useful in SSR (Server-Side Rendering) or Node.js environments.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\n// Manipulate DOM only in browser environment\nif (isBrowser()) {\n  document.getElementById('app').innerHTML = 'Hello World';\n  console.log('Running in browser environment');\n} else {\n  console.log('Running in server environment');\n}\n```\n\nCan be used to implement conditional logic based on the environment.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction getWindowWidth() {\n  if (isBrowser()) {\n    return window.innerWidth;\n  }\n  return 0; // Return default value on server\n}\n\n// Registering event listeners\nfunction addWindowListener() {\n  if (isBrowser()) {\n    window.addEventListener('resize', () => {\n      console.log('Window size changed');\n    });\n  }\n}\n```\n\nParticularly useful in SSR frameworks like Next.js or Nuxt.js.\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction initializeAnalytics() {\n  if (isBrowser()) {\n    // Load analytics script only in browser\n    const script = document.createElement('script');\n    script.src = 'https://analytics.example.com/script.js';\n    document.head.appendChild(script);\n  }\n}\n\n// Accessing local storage\nfunction getStoredValue(key: string) {\n  if (isBrowser()) {\n    return localStorage.getItem(key);\n  }\n  return null;\n}\n```\n\n#### Returns\n\n(`boolean`): Returns `true` if the current environment is a browser, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isBuffer.md",
    "content": "# isBuffer\n\nChecks if a value is a Buffer instance.\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## Usage\n\n### `isBuffer(value)`\n\nUse `isBuffer` when you want to check if a value is a Buffer object in Node.js environments. Useful for file processing, network communication, and binary data manipulation. It acts as a type guard in TypeScript, narrowing the value's type to `Buffer`.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// Checking Buffer instances\nconst buffer = Buffer.from('hello world', 'utf8');\nisBuffer(buffer); // true\n\n// Distinguishing from other types\nisBuffer('hello world'); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer(new ArrayBuffer(8)); // false\n```\n\nParticularly useful when used as a type guard in TypeScript.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\nfunction processData(data: unknown) {\n  if (isBuffer(data)) {\n    // data is narrowed to Buffer\n    console.log(`Buffer size: ${data.length} bytes`);\n    console.log(`Buffer content: ${data.toString('utf8')}`);\n\n    // Can safely use Buffer methods\n    const slice = data.slice(0, 10);\n  }\n}\n```\n\nFrequently used in file processing and network communication.\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// Processing file data\nfunction readFileData(data: unknown) {\n  if (isBuffer(data)) {\n    const text = data.toString('utf8');\n    const header = data.readUInt32BE(0);\n    console.log('File content:', text);\n  }\n}\n\n// Processing network data\nfunction handleNetworkData(chunk: unknown) {\n  if (isBuffer(chunk)) {\n    console.log(`Received data size: ${chunk.length} bytes`);\n    const processed = Buffer.concat([chunk, Buffer.from('\\n')]);\n    return processed;\n  }\n  return null;\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Buffer instance.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a Buffer instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isDate.md",
    "content": "# isDate\n\nChecks if a value is a Date object.\n\n```typescript\nconst result = isDate(value);\n```\n\n## Usage\n\n### `isDate(value)`\n\nUse `isDate` when you want to check if a value is a date object. Useful for distinguishing Date objects from string or number representations of dates. It acts as a type guard in TypeScript, narrowing the value's type to `Date`.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// Checking Date objects\nconst date = new Date();\nisDate(date); // true\n\n// Distinguishing from other types\nisDate('2024-01-01'); // false - string\nisDate(1640995200000); // false - timestamp\nisDate({}); // false\n```\n\nParticularly useful when used as a type guard in TypeScript.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\nfunction formatDate(value: unknown): string {\n  if (isDate(value)) {\n    // value is narrowed to Date\n    return value.toISOString();\n  }\n  return 'Invalid date';\n}\n```\n\nCan be used for processing API responses or validating user input.\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// Processing API response\nfunction processResponse(response: { createdAt: unknown }) {\n  if (isDate(response.createdAt)) {\n    console.log(`Created at: ${response.createdAt.toLocaleDateString()}`);\n  }\n}\n\n// Validating date\nfunction validateBirthDate(value: unknown): boolean {\n  if (isDate(value)) {\n    const now = new Date();\n    const minAge = new Date(now.getFullYear() - 150, now.getMonth(), now.getDate());\n\n    return value <= now && value >= minAge;\n  }\n  return false;\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Date object.\n\n#### Returns\n\n(`value is Date`): Returns `true` if the value is a Date object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isEmptyObject.md",
    "content": "# isEmptyObject\n\nChecks if a plain object has no properties (`{}`).\n\n```typescript\nconst result = isEmptyObject(value);\n```\n\n## Usage\n\n### `isEmptyObject(value)`\n\nUse `isEmptyObject` when you want to check if a plain object has no properties like `{}`. Returns `false` for other object types like arrays, Map, or Set.\n\n```typescript\nimport { isEmptyObject } from 'es-toolkit';\n\n// Plain objects with no properties\nisEmptyObject({}); // true\nisEmptyObject(new Object()); // true\nisEmptyObject(Object.create(null)); // true\n\n// Objects with properties\nisEmptyObject({ a: 1 }); // false\nisEmptyObject({ key: 'value' }); // false\n\n// Non-plain object types\nisEmptyObject([]); // false (array)\nisEmptyObject(null); // false\nisEmptyObject(new Map()); // false\nisEmptyObject(new Set()); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check.\n\n#### Returns\n\n(`value is Record<PropertyKey, never>`): Returns `true` if it's a plain object with no properties, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isEqual.md",
    "content": "# isEqual\n\nPerforms a deep comparison to check if two values are equal.\n\n```typescript\nconst result = isEqual(a, b);\n```\n\n## Usage\n\n### `isEqual(a, b)`\n\nUse `isEqual` when you want to check if two values are deeply equal, including objects, arrays, Date, RegExp, etc. Returns `true` if the contents are the same even if the references are different. Useful for unit testing and data comparison.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// Primitive type comparison\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// Special value handling\nisEqual(NaN, NaN); // true\nisEqual(+0, -0); // true\n```\n\nSupports deep comparison of objects and arrays.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// Deep object comparison\nconst obj1 = { a: 1, b: { c: 2, d: [3, 4] } };\nconst obj2 = { a: 1, b: { c: 2, d: [3, 4] } };\nisEqual(obj1, obj2); // true\n\n// Array comparison\nconst arr1 = [1, 2, [3, 4]];\nconst arr2 = [1, 2, [3, 4]];\nisEqual(arr1, arr2); // true\n```\n\nCan also compare objects like Date, RegExp, Map, Set.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// Date comparison\nconst date1 = new Date('2020-01-01');\nconst date2 = new Date('2020-01-01');\nisEqual(date1, date2); // true\n\n// RegExp comparison\nconst regex1 = /hello/g;\nconst regex2 = /hello/g;\nisEqual(regex1, regex2); // true\n\n// Map and Set comparison\nconst map1 = new Map([['key', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqual(map1, map2); // true\n\nconst set1 = new Set([1, 2, 3]);\nconst set2 = new Set([1, 2, 3]);\nisEqual(set1, set2); // true\n```\n\nFrequently used in unit testing.\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\nfunction testApiResponse() {\n  const expected = { status: 200, data: { message: 'success' } };\n  const actual = { status: 200, data: { message: 'success' } };\n\n  if (isEqual(expected, actual)) {\n    console.log('Test passed!');\n  } else {\n    console.log('Test failed!');\n  }\n}\n```\n\n#### Parameters\n\n- `a` (`unknown`): The first value to compare.\n- `b` (`unknown`): The second value to compare.\n\n#### Returns\n\n(`boolean`): Returns `true` if the two values are deeply equal, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isEqualWith.md",
    "content": "# isEqualWith\n\nChecks if two values are equal using a custom comparison function.\n\n```typescript\nconst result = isEqualWith(a, b, areValuesEqual);\n```\n\n## Usage\n\n### `isEqualWith(a, b, areValuesEqual)`\n\nUse `isEqualWith` when you need special comparison logic. If the custom function returns `true` or `false`, that result is used; if it returns `undefined`, the default comparison method is used. Useful for case-insensitive comparison, excluding specific properties, approximate value comparison, etc.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// Case-insensitive string comparison\nconst caseInsensitiveCompare = (a, b) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', caseInsensitiveCompare); // true\nisEqualWith({ name: 'Alice' }, { name: 'ALICE' }, caseInsensitiveCompare); // true\n```\n\nCan also be used for approximate number comparison.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// Floating-point error tolerance comparison\nconst approximateCompare = (a, b) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a - b) < 0.01; // Treat differences under 0.01 as equal\n  }\n};\n\nisEqualWith(0.1 + 0.2, 0.3, approximateCompare); // true\nisEqualWith({ price: 10.01 }, { price: 10.02 }, approximateCompare); // true\n```\n\nUseful when you want to ignore specific properties during comparison.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// Ignoring specific properties during comparison\nconst ignoreTimestamp = (a, b, property) => {\n  if (property === 'timestamp') {\n    return true; // Always treat timestamp property as equal\n  }\n};\n\nconst obj1 = { id: 1, name: 'Test', timestamp: 1000 };\nconst obj2 = { id: 1, name: 'Test', timestamp: 2000 };\nisEqualWith(obj1, obj2, ignoreTimestamp); // true\n```\n\nCan implement complex custom comparison logic.\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\nconst areValuesEqual = (a, b, property) => {\n  // Ignore ID\n  if (property === 'id') {\n    return true;\n  }\n\n  // Compare name case-insensitively\n  if (property === 'name' && typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n\n  // Use default comparison for the rest\n  return undefined;\n};\n\nconst user1 = { id: 1, name: 'Alice', age: 25 };\nconst user2 = { id: 999, name: 'ALICE', age: 25 };\nisEqualWith(user1, user2, areValuesEqual); // true\n```\n\n#### Parameters\n\n- `a` (`unknown`): The first value to compare.\n- `b` (`unknown`): The second value to compare.\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): A custom comparison function. If it returns `true` or `false`, that result is used; if it returns `undefined`, the default comparison method is used.\n\n#### Returns\n\n(`boolean`): Returns `true` if the two values are equal according to the custom criteria, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isError.md",
    "content": "# isError\n\nChecks if a value is an `Error` object.\n\n```typescript\nconst result = isError(value);\n```\n\n## Usage\n\n### `isError(value)`\n\nUse `isError` when you want to check if a value is an `Error` object. It can be used as a type guard in TypeScript to narrow the value's type to `Error`. Particularly useful in try-catch blocks or API response processing.\n\n```typescript\nimport { isError } from 'es-toolkit/predicate';\n\n// Checking Error objects\nisError(new Error('Something went wrong')); // true\nisError(new TypeError('Type error')); // true\n\n// Distinguishing from other types\nisError('error'); // false\nisError({ name: 'Error', message: 'Custom error' }); // false\n```\n\nWhen used as a type guard in TypeScript, the value's type is narrowed.\n\n```typescript\nfunction handleError(value: unknown) {\n  if (isError(value)) {\n    // value is narrowed to Error\n    console.log(`Error occurred: ${value.message}`);\n    return value.name;\n  }\n  return 'Not an error';\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's an `Error` object.\n\n#### Returns\n\n(`value is Error`): Returns `true` if the value is an `Error` object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isFile.md",
    "content": "# isFile\n\nChecks if a value is a File object.\n\n```typescript\nconst result = isFile(value);\n```\n\n## Usage\n\n### `isFile(value)`\n\nUse `isFile` when you want to check if a value is a File instance. A File object represents a file uploaded by a user or obtained from the file system as part of the web API. Unlike Blob objects, it contains additional information such as the filename and last modified time.\n\n```typescript\nimport { isFile } from 'es-toolkit/predicate';\n\n// Checking File objects\nconst file = new File(['hello'], 'example.txt', { type: 'text/plain' });\nconsole.log(isFile(file)); // true\n\n// Blob objects are not Files\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconsole.log(isFile(blob)); // false\n\n// Regular objects\nconsole.log(isFile({})); // false\nconsole.log(isFile([])); // false\nconsole.log(isFile('text')); // false\nconsole.log(isFile(null)); // false\nconsole.log(isFile(undefined)); // false\n```\n\nCan be used to validate if a given argument is a valid file.\n\n```typescript\n// File upload handler\nfunction handleFileUpload(input: unknown) {\n  if (isFile(input)) {\n    console.log(`Filename: ${input.name}`);\n    console.log(`File size: ${input.size} bytes`);\n    console.log(`File type: ${input.type}`);\n    console.log(`Last modified: ${input.lastModified}`);\n\n    // Since it's confirmed to be a File, can safely access file-related properties\n    return input;\n  }\n\n  throw new Error('Not a valid file');\n}\n```\n\nSafely handles environments where `File` is not supported in JavaScript.\n\n```typescript\n// Safe in Node.js environment or environments without File support\nconsole.log(isFile(new Date())); // false\n\n// Does not error even in environments where File is not defined\nif (typeof File === 'undefined') {\n  console.log(isFile({})); // false\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a File object.\n\n#### Returns\n\n(`value is File`): Returns `true` if the value is a File object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isFunction.md",
    "content": "# isFunction\n\nChecks if a value is a function.\n\n```typescript\nconst result = isFunction(value);\n```\n\n## Usage\n\n### `isFunction(value)`\n\nUse `isFunction` when you want to check if a value is a function. Can detect all types of functions including regular functions, async functions, generator functions, and constructor functions.\n\n```typescript\nimport { isFunction } from 'es-toolkit/predicate';\n\n// Regular functions\nconsole.log(isFunction(function () {})); // true\nconsole.log(isFunction(() => {})); // true\nconsole.log(isFunction(Array.prototype.slice)); // true\n\n// Async functions\nconsole.log(isFunction(async function () {})); // true\nconsole.log(isFunction(async () => {})); // true\n\n// Generator functions\nconsole.log(isFunction(function* () {})); // true\n\n// Constructors\nconsole.log(isFunction(Array)); // true\nconsole.log(isFunction(Date)); // true\nconsole.log(isFunction(RegExp)); // true\nconsole.log(isFunction(Promise)); // true\n```\n\nAlso detects built-in JavaScript functions and classes:\n\n```typescript\n// Built-in constructors\nconsole.log(isFunction(Object)); // true\nconsole.log(isFunction(String)); // true\nconsole.log(isFunction(Number)); // true\nconsole.log(isFunction(Boolean)); // true\n\n// Typed array constructors\nconsole.log(isFunction(Int8Array)); // true\nconsole.log(isFunction(Uint8Array)); // true\nconsole.log(isFunction(Float32Array)); // true\n\n// Proxy and Reflect\nconsole.log(isFunction(Proxy)); // true\nconsole.log(isFunction(Reflect.get)); // true\n```\n\nDistinguishes from non-function values:\n\n```typescript\n// Non-functions\nconsole.log(isFunction({})); // false\nconsole.log(isFunction([])); // false\nconsole.log(isFunction('text')); // false\nconsole.log(isFunction(42)); // false\nconsole.log(isFunction(null)); // false\nconsole.log(isFunction(undefined)); // false\n\n// Function-like but not functions\nconsole.log(isFunction({ call: function () {} })); // false\n```\n\nUseful for callback function validation or dynamic function invocation:\n\n```typescript\n// Callback function validation\nfunction processData(data: any[], callback?: unknown) {\n  const result = data.map(item => item * 2);\n\n  if (isFunction(callback)) {\n    // Can safely call callback since it's confirmed to be a function\n    callback(result);\n  }\n\n  return result;\n}\n\n// Dynamic function execution\nfunction executeIfFunction(fn: unknown, ...args: any[]) {\n  if (isFunction(fn)) {\n    return fn(...args);\n  }\n\n  console.log('Given value is not a function');\n  return null;\n}\n\n// Checking functions in method chaining\nconst utils = {\n  data: [1, 2, 3],\n  process(fn: unknown) {\n    if (isFunction(fn)) {\n      this.data = this.data.map(fn);\n    }\n    return this;\n  },\n};\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a function.\n\n#### Returns\n\n(`value is (...args: any[]) => any`): Returns `true` if the value is a function, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isJSON.md",
    "content": "# isJSON\n\nChecks if a value is a valid JSON string.\n\n```typescript\nconst result = isJSON(value);\n```\n\n## Usage\n\n### `isJSON(value)`\n\nUse `isJSON` when you want to check if a string is a valid JSON format. This function verifies if it can be parsed with `JSON.parse()`. According to JSON specifications, strings representing objects, arrays, strings, numbers, booleans, and `null` are all valid.\n\n```typescript\nimport { isJSON } from 'es-toolkit/predicate';\n\n// Valid JSON strings\nconsole.log(isJSON('{\"name\":\"John\",\"age\":30}')); // true\nconsole.log(isJSON('[1,2,3]')); // true\nconsole.log(isJSON('\"hello world\"')); // true\nconsole.log(isJSON('42')); // true\nconsole.log(isJSON('true')); // true\nconsole.log(isJSON('false')); // true\nconsole.log(isJSON('null')); // true\n\n// Invalid JSON strings\nconsole.log(isJSON('undefined')); // false\nconsole.log(isJSON('function() {}')); // false\nconsole.log(isJSON('{name: \"John\"}')); // false (keys without quotes)\nconsole.log(isJSON(\"{'name': 'John'}\")); // false (single quotes)\nconsole.log(isJSON('{}')); // true (empty object is valid)\nconsole.log(isJSON('[]')); // true (empty array is valid)\n```\n\nAll non-string values return `false`:\n\n```typescript\n// Non-string values\nconsole.log(isJSON({ name: 'John' })); // false\nconsole.log(isJSON([1, 2, 3])); // false\nconsole.log(isJSON(42)); // false\nconsole.log(isJSON(true)); // false\nconsole.log(isJSON(null)); // false\nconsole.log(isJSON(undefined)); // false\n```\n\nUseful for API response or user input validation:\n\n```typescript\n// API response validation\nfunction processApiResponse(response: unknown) {\n  if (isJSON(response)) {\n    try {\n      const data = JSON.parse(response);\n      console.log('Parsed data:', data);\n      return data;\n    } catch (error) {\n      // Won't execute here since isJSON returned true\n      console.error('Parsing failed:', error);\n    }\n  }\n\n  console.log('Not a valid JSON string');\n  return null;\n}\n\n// User input validation\nfunction validateJsonInput(input: unknown): string | null {\n  if (isJSON(input)) {\n    // TypeScript infers input as string\n    return input;\n  }\n\n  throw new Error('Input must be a valid JSON string');\n}\n\n// Configuration file validation\nfunction loadConfig(configString: unknown) {\n  if (isJSON(configString)) {\n    const config = JSON.parse(configString);\n    return {\n      isValid: true,\n      config,\n      error: null,\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Invalid JSON format',\n  };\n}\n```\n\nAccurately detects complex JSON structures:\n\n```typescript\nconst complexJson = `{\n  \"users\": [\n    {\n      \"id\": 1,\n      \"name\": \"Alice\",\n      \"preferences\": {\n        \"theme\": \"dark\",\n        \"notifications\": true\n      }\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"page\": 1\n  }\n}`;\n\nconsole.log(isJSON(complexJson)); // true\n\n// Invalid formats\nconsole.log(isJSON('{ \"name\": \"John\", }')); // false (trailing comma)\nconsole.log(isJSON('{ name: \"John\" }')); // false (unquoted key)\nconsole.log(isJSON(\"{ 'name': 'John' }\")); // false (single quotes)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a valid JSON string.\n\n#### Returns\n\n(`value is string`): Returns `true` if the value is a valid JSON string, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isJSONArray.md",
    "content": "# isJSONArray\n\nChecks if a value is a valid JSON array.\n\n```typescript\nconst result = isJSONArray(value);\n```\n\n## Usage\n\n### `isJSONArray(value)`\n\nUse `isJSONArray` when you want to check if all elements of an array are valid JSON values. A valid JSON array is an array consisting only of values that can be JSON-serialized (`null`, objects, arrays, strings, numbers, booleans).\n\n```typescript\nimport { isJSONArray } from 'es-toolkit/predicate';\n\n// Valid JSON arrays\nconsole.log(isJSONArray([1, 2, 3])); // true\nconsole.log(isJSONArray(['hello', 'world'])); // true\nconsole.log(isJSONArray([true, false, null])); // true\nconsole.log(isJSONArray([{ name: 'John' }, { name: 'Jane' }])); // true\nconsole.log(\n  isJSONArray([\n    [1, 2],\n    [3, 4],\n  ])\n); // true (nested arrays)\nconsole.log(isJSONArray([])); // true (empty array)\n\n// Complex valid JSON array\nconst complexArray = [42, 'text', true, null, { key: 'value' }, [1, 2, 3]];\nconsole.log(isJSONArray(complexArray)); // true\n```\n\nDistinguishes from invalid JSON arrays:\n\n```typescript\n// Arrays containing functions - invalid\nconsole.log(isJSONArray([1, 2, () => {}])); // false\nconsole.log(isJSONArray([function () {}])); // false\n\n// Arrays containing undefined - invalid\nconsole.log(isJSONArray([1, undefined, 3])); // false\n\n// Arrays containing Symbols - invalid\nconsole.log(isJSONArray([Symbol('test')])); // false\n\n// Arrays containing Date objects - invalid (must be converted to string in JSON)\nconsole.log(isJSONArray([new Date()])); // false\n\n// Non-array values\nconsole.log(isJSONArray('not an array')); // false\nconsole.log(isJSONArray({ 0: 'a', 1: 'b', length: 2 })); // false (array-like object)\nconsole.log(isJSONArray(42)); // false\nconsole.log(isJSONArray(null)); // false\n```\n\nUseful for API response validation or pre-serialization data verification.\n\n```typescript\n// API response validation\nfunction processApiArray(data: unknown) {\n  if (isJSONArray(data)) {\n    // Can safely use JSON.stringify\n    const jsonString = JSON.stringify(data);\n    console.log('Serialized array:', jsonString);\n    return data;\n  }\n\n  throw new Error('Not a valid JSON array');\n}\n\n// User input data validation\nfunction validateUserList(input: unknown): any[] {\n  if (isJSONArray(input)) {\n    // TypeScript infers input as any[]\n    return input;\n  }\n\n  return [];\n}\n\n// Configuration array validation\nfunction loadArrayConfig(config: unknown) {\n  if (isJSONArray(config)) {\n    return {\n      isValid: true,\n      items: config,\n      count: config.length,\n    };\n  }\n\n  return {\n    isValid: false,\n    items: [],\n    count: 0,\n  };\n}\n\n// Works with nested structures\nconst nestedData = [{ users: [{ name: 'Alice' }, { name: 'Bob' }] }, { users: [{ name: 'Charlie' }] }];\nconsole.log(isJSONArray(nestedData)); // true\n```\n\nReturns `false` for arrays with functions as elements or objects like `TypedArray` that cannot be JSON-serialized.\n\n```typescript\n// Regular array vs JSON array\nconst regularArray = [1, 2, function () {}]; // Valid as regular array\nconst jsonArray = [1, 2, 3]; // JSON-serializable array\n\nconsole.log(Array.isArray(regularArray)); // true (regular array check)\nconsole.log(isJSONArray(regularArray)); // false (JSON array check)\n\nconsole.log(Array.isArray(jsonArray)); // true\nconsole.log(isJSONArray(jsonArray)); // true\n\n// TypedArray is not a JSON array\nconst typedArray = new Int32Array([1, 2, 3]);\nconsole.log(Array.isArray(typedArray)); // false\nconsole.log(isJSONArray(typedArray)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a valid JSON array.\n\n#### Returns\n\n(`value is any[]`): Returns `true` if the value is a valid JSON array, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isJSONObject.md",
    "content": "# isJSONObject\n\nChecks if a value is a valid JSON object.\n\n```typescript\nconst result = isJSONObject(value);\n```\n\n## Usage\n\n### `isJSONObject(value)`\n\nUse `isJSONObject` when you want to check if an object has string keys and all values are valid JSON values. A valid JSON object is a plain object consisting only of string keys and JSON-serializable values (`null`, objects, arrays, strings, numbers, booleans).\n\n```typescript\nimport { isJSONObject } from 'es-toolkit/predicate';\n\n// Valid JSON objects\nconsole.log(isJSONObject({ name: 'John', age: 30 })); // true\nconsole.log(isJSONObject({ active: true, score: null })); // true\nconsole.log(isJSONObject({})); // true (empty object)\n\n// Validates nested structures\nconst nested = {\n  user: {\n    name: 'Alice',\n    preferences: {\n      theme: 'dark',\n      notifications: true,\n    },\n  },\n  data: [1, 2, 3],\n  timestamp: null,\n};\nconsole.log(isJSONObject(nested)); // true\n\n// Complex valid JSON object\nconst complex = {\n  id: 42,\n  title: 'Example',\n  published: true,\n  tags: ['javascript', 'tutorial'],\n  author: {\n    name: 'Developer',\n    email: 'dev@example.com',\n  },\n  metadata: null,\n};\nconsole.log(isJSONObject(complex)); // true\n```\n\nAccurately distinguishes invalid JSON objects containing non-JSON-serializable values like functions, `Symbol`, `Date` objects, `undefined`, or class instances.\n\n```typescript\n// Objects containing functions - invalid\nconsole.log(isJSONObject({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONObject({ method: function () {} })); // false\n\n// Objects containing undefined - invalid\nconsole.log(isJSONObject({ name: 'John', age: undefined })); // false\n\n// Objects with Symbol keys or values - invalid\nconsole.log(isJSONObject({ [Symbol('key')]: 'value' })); // false\nconsole.log(isJSONObject({ name: Symbol('name') })); // false\n\n// Objects like Date, RegExp - invalid\nconsole.log(isJSONObject({ created: new Date() })); // false\nconsole.log(isJSONObject({ pattern: /test/ })); // false\n\n// Class instances - invalid\nclass Person {\n  constructor(public name: string) {}\n}\nconsole.log(isJSONObject(new Person('John'))); // false\n\n// Non-object values\nconsole.log(isJSONObject('not an object')); // false\nconsole.log(isJSONObject(42)); // false\nconsole.log(isJSONObject([1, 2, 3])); // false\nconsole.log(isJSONObject(null)); // false\n```\n\nCan be used to validate safe usage of `JSON.stringify`.\n\n```typescript\n// API response validation\nfunction processApiResponse(data: unknown) {\n  if (isJSONObject(data)) {\n    // Can safely use JSON.stringify\n    const jsonString = JSON.stringify(data);\n    console.log('Serialized object:', jsonString);\n\n    // TypeScript infers data as Record<string, any>\n    return data;\n  }\n\n  throw new Error('Not a valid JSON object');\n}\n\n// Configuration object validation\nfunction loadConfig(config: unknown) {\n  if (isJSONObject(config)) {\n    return {\n      isValid: true,\n      config,\n      keys: Object.keys(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: {},\n    keys: [],\n  };\n}\n\n// User input data validation\nfunction validateUserData(input: unknown): Record<string, any> {\n  if (isJSONObject(input)) {\n    // All properties are guaranteed to be JSON-serializable\n    return input;\n  }\n\n  throw new Error('User data must be a valid JSON object');\n}\n\n// Nested object validation\nfunction validateNestedConfig(data: unknown) {\n  if (isJSONObject(data)) {\n    // All nested objects and arrays are also guaranteed to be JSON-valid\n    console.log('Configuration is fully JSON-compatible');\n    return data;\n  }\n\n  return null;\n}\n```\n\n`isJSONObject` has a different purpose than other object checking functions. `isPlainObject` checks if it's a plain object, while `isJSONObject` checks if it's an object that can be JSON-serialized.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\nconst objectWithFunction = {\n  name: 'John',\n  greet: function () {\n    return 'Hello';\n  },\n};\n\nconst plainJsonObject = {\n  name: 'John',\n  age: 30,\n};\n\n// Plain object vs JSON object\nconsole.log(isPlainObject(objectWithFunction)); // true (plain object)\nconsole.log(isJSONObject(objectWithFunction)); // false (not JSON object due to function)\n\nconsole.log(isPlainObject(plainJsonObject)); // true\nconsole.log(isJSONObject(plainJsonObject)); // true\n\n// Built-in objects\nconsole.log(isPlainObject(new Date())); // false\nconsole.log(isJSONObject(new Date())); // false\n\n// Arrays\nconsole.log(isPlainObject([])); // false\nconsole.log(isJSONObject([])); // false (arrays are JSON values but not JSON \"objects\")\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a valid JSON object.\n\n#### Returns\n\n(`value is Record<string, any>`): Returns `true` if the value is a valid JSON object, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isJSONValue.md",
    "content": "# isJSONValue\n\nChecks if a value is a valid JSON value.\n\n```typescript\nconst result = isJSONValue(value);\n```\n\n## Usage\n\n### `isJSONValue(value)`\n\nUse `isJSONValue` when you want to check if a value can be JSON-serialized. According to JSON specifications, valid values are `null`, objects, arrays, strings, numbers, and booleans. This function is the foundation for other JSON-related type guards.\n\n```typescript\nimport { isJSONValue } from 'es-toolkit/predicate';\n\n// Primitive JSON values\nconsole.log(isJSONValue(null)); // true\nconsole.log(isJSONValue('hello')); // true\nconsole.log(isJSONValue(42)); // true\nconsole.log(isJSONValue(true)); // true\nconsole.log(isJSONValue(false)); // true\n\n// Objects and arrays (all internal values must also be valid)\nconsole.log(isJSONValue({ name: 'John', age: 30 })); // true\nconsole.log(isJSONValue([1, 2, 3, 'text'])); // true\nconsole.log(isJSONValue([])); // true (empty array)\nconsole.log(isJSONValue({})); // true (empty object)\n\n// Nested structures\nconst complexData = {\n  user: {\n    name: 'Alice',\n    active: true,\n    scores: [95, 87, 92],\n  },\n  metadata: null,\n};\nconsole.log(isJSONValue(complexData)); // true\n```\n\nAccurately distinguishes values that cannot be JSON-serialized. Functions, `undefined`, `Symbol`, class instances, etc. are not supported by JSON specifications and return `false`:\n\n```typescript\n// undefined is not supported in JSON\nconsole.log(isJSONValue(undefined)); // false\n\n// Functions cannot be JSON-serialized\nconsole.log(isJSONValue(() => {})); // false\nconsole.log(isJSONValue(function () {})); // false\n\n// Symbol is not supported in JSON\nconsole.log(isJSONValue(Symbol('test'))); // false\n\n// Date objects must be converted to strings in JSON\nconsole.log(isJSONValue(new Date())); // false\n\n// RegExp objects are not supported in JSON\nconsole.log(isJSONValue(/pattern/)); // false\n\n// Objects/arrays containing functions or undefined\nconsole.log(isJSONValue({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONValue([1, 2, undefined])); // false\n\n// BigInt is not supported in JSON\nconsole.log(isJSONValue(BigInt(123))); // false\n```\n\nUseful for data validation before JSON serialization:\n\n```typescript\n// Safe JSON serialization\nfunction safeJsonStringify(data: unknown): string | null {\n  if (isJSONValue(data)) {\n    // Data is guaranteed to be a valid JSON value\n    return JSON.stringify(data);\n  }\n\n  console.warn('Data is not JSON-serializable');\n  return null;\n}\n\n// API request data validation\nfunction sendApiRequest(data: unknown) {\n  if (isJSONValue(data)) {\n    const jsonPayload = JSON.stringify(data);\n    // Send API request\n    console.log('Data to send:', jsonPayload);\n    return fetch('/api/data', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: jsonPayload,\n    });\n  }\n\n  throw new Error('API data must be JSON-serializable');\n}\n\n// localStorage validation before saving\nfunction saveToStorage(key: string, value: unknown) {\n  if (isJSONValue(value)) {\n    localStorage.setItem(key, JSON.stringify(value));\n    return true;\n  }\n\n  console.error('Cannot save non-JSON-serializable data type to localStorage');\n  return false;\n}\n\n// Configuration file validation\nfunction validateConfig(config: unknown) {\n  if (isJSONValue(config)) {\n    return {\n      isValid: true,\n      config,\n      serialized: JSON.stringify(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Config must be a valid JSON value',\n  };\n}\n```\n\nCan be combined with other type guards.\n\n```typescript\n// Specific JSON type checking\nfunction processJsonData(data: unknown) {\n  if (!isJSONValue(data)) {\n    throw new Error('Invalid JSON value');\n  }\n\n  // Now data is guaranteed to be a valid JSON value\n  if (isJSONObject(data)) {\n    console.log('Is a JSON object:', Object.keys(data));\n  } else if (isJSONArray(data)) {\n    console.log('Is a JSON array:', data.length, 'items');\n  } else {\n    console.log('Is a primitive JSON value:', typeof data, data);\n  }\n}\n\n// Nested data validation\nconst testData = {\n  valid: { name: 'test', values: [1, 2, 3] },\n  invalid: { name: 'test', callback: () => {} },\n};\n\nconsole.log(isJSONValue(testData.valid)); // true\nconsole.log(isJSONValue(testData.invalid)); // false\n```\n\nEdge cases:\n\n```typescript\n// Special number values\nconsole.log(isJSONValue(Infinity)); // false (converted to null in JSON)\nconsole.log(isJSONValue(-Infinity)); // false\nconsole.log(isJSONValue(NaN)); // false (converted to null in JSON)\n\n// Empty values\nconsole.log(isJSONValue('')); // true (empty string)\nconsole.log(isJSONValue(0)); // true\nconsole.log(isJSONValue(false)); // true\n\n// Objects with prototypes\nconst obj = Object.create({ inherited: 'value' });\nobj.own = 'property';\nconsole.log(isJSONValue(obj)); // true (treated as plain object)\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a valid JSON value.\n\n#### Returns\n\n(`value is Record<string, any> | any[] | string | number | boolean | null`): Returns `true` if the value is a valid JSON value, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isLength.md",
    "content": "# isLength\n\nChecks if a value is a valid array length.\n\n```typescript\nconst result = isLength(value);\n```\n\n## Usage\n\n### `isLength(value)`\n\nUse `isLength` when you want to check if a value is a valid array length. A valid length must be an integer between 0 and `Number.MAX_SAFE_INTEGER`.\n\n```typescript\nimport { isLength } from 'es-toolkit/predicate';\n\n// Valid lengths\nconsole.log(isLength(0)); // true\nconsole.log(isLength(42)); // true\nconsole.log(isLength(Number.MAX_SAFE_INTEGER)); // true\n\n// Invalid lengths\nconsole.log(isLength(-1)); // false (negative)\nconsole.log(isLength(1.5)); // false (decimal)\nconsole.log(isLength(Number.MAX_SAFE_INTEGER + 1)); // false (unsafe integer)\nconsole.log(isLength('42')); // false (string)\nconsole.log(isLength(null)); // false (null)\n```\n\nCan also be used as a type guard in TypeScript.\n\n```typescript\nfunction processLength(value: unknown) {\n  if (isLength(value)) {\n    // Now value is narrowed to number type\n    console.log(value.toFixed(2));\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a valid length.\n\n#### Returns\n\n(`boolean`): Returns `true` if the value is a valid length, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isMap.md",
    "content": "# isMap\n\nChecks if a value is a Map.\n\n```typescript\nconst result = isMap(value);\n```\n\n## Usage\n\n### `isMap(value)`\n\nUse `isMap` when you want to check if a value is a Map instance. It uses the `instanceof` operator to check if it's a `Map`.\n\n```typescript\nimport { isMap } from 'es-toolkit/predicate';\n\n// Map instance\nconst map = new Map([['key', 'value']]);\nconsole.log(isMap(map)); // true\n\n// Non-Map values\nconsole.log(isMap(new Set())); // false\nconsole.log(isMap(new WeakMap())); // false\nconsole.log(isMap({})); // false\nconsole.log(isMap([])); // false\nconsole.log(isMap(null)); // false\n```\n\nIt can also be used as a type guard in TypeScript.\n\n```typescript\nfunction processValue(value: unknown) {\n  if (isMap(value)) {\n    // Now value is narrowed to Map<any, any> type\n    console.log(value.size);\n    value.set('new-key', 'new-value');\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a `Map`.\n\n#### Returns\n\n(`value is Map<any, any>`): Returns `true` if the value is a Map, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isNil.md",
    "content": "# isNil\n\nChecks if a value is `null` or `undefined`.\n\n```typescript\nconst result = isNil(value);\n```\n\n## Usage\n\n### `isNil(value)`\n\nUse `isNil` when you want to check if a value is `null` or `undefined`.\n\n```typescript\nimport { isNil } from 'es-toolkit/predicate';\n\n// null or undefined values\nconsole.log(isNil(null)); // true\nconsole.log(isNil(undefined)); // true\n\n// Other values\nconsole.log(isNil(0)); // false\nconsole.log(isNil('')); // false\nconsole.log(isNil(false)); // false\nconsole.log(isNil([])); // false\nconsole.log(isNil({})); // false\n```\n\nIt can also be used as a type guard in TypeScript:\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNil(value)) {\n    // value is now narrowed to null | undefined\n    console.log('Value is empty');\n  } else {\n    // value is narrowed to string\n    console.log(value.toUpperCase());\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's `null` or `undefined`.\n\n#### Returns\n\n(`value is null | undefined`): Returns `true` if the value is `null` or `undefined`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isNode.md",
    "content": "# isNode\n\nChecks if the current runtime environment is Node.js.\n\n```typescript\nconst result = isNode();\n```\n\n## Usage\n\n### `isNode()`\n\nUse `isNode` when you want to check if the current code is running in a Node.js environment. It's useful for verifying the environment before using Node.js-specific APIs.\n\n```typescript\nimport { isNode } from 'es-toolkit/predicate';\n\nif (isNode()) {\n  // Node.js-specific code\n  console.log('This code is running in Node.js');\n  const fs = await import('node:fs');\n  const path = await import('node:path');\n} else {\n  // Browser-only code\n  console.log('This code is running in a browser');\n  const response = await fetch('/api/data');\n}\n```\n\nIt's also useful when conditionally using Node.js modules:\n\n```typescript\nfunction getEnvironmentInfo() {\n  if (isNode()) {\n    return {\n      platform: process.platform,\n      nodeVersion: process.version,\n      environment: 'Node.js',\n    };\n  } else {\n    return {\n      userAgent: navigator.userAgent,\n      environment: 'Browser',\n    };\n  }\n}\n```\n\n#### Returns\n\n(`boolean`): Returns `true` if the current environment is Node.js, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isNotNil.md",
    "content": "# isNotNil\n\nChecks if a value is neither `null` nor `undefined`.\n\n```typescript\nconst result = isNotNil(value);\n```\n\n## Usage\n\n### `isNotNil(value)`\n\nUse `isNotNil` when you want to check if a value is neither `null` nor `undefined`. It's particularly useful for filtering out `null` or `undefined` values from arrays.\n\n```typescript\nimport { isNotNil } from 'es-toolkit/predicate';\n\n// Basic usage\nconsole.log(isNotNil(42)); // true\nconsole.log(isNotNil('hello')); // true\nconsole.log(isNotNil([])); // true\nconsole.log(isNotNil({})); // true\n\nconsole.log(isNotNil(null)); // false\nconsole.log(isNotNil(undefined)); // false\n\n// Useful for array filtering\nconst mixedArray = [1, null, 'hello', undefined, true, 0];\nconst filteredArray = mixedArray.filter(isNotNil);\n// filteredArray becomes [1, 'hello', true, 0] (null and undefined removed)\n```\n\nIt can also be used as a type guard in TypeScript.\n\n```typescript\nfunction processItems(items: (string | null | undefined)[]) {\n  // Filtering with isNotNil narrows the type to string[]\n  const validItems = items.filter(isNotNil);\n\n  validItems.forEach(item => {\n    // item is now guaranteed to be of type string\n    console.log(item.toUpperCase());\n  });\n}\n```\n\n#### Parameters\n\n- `value` (`T | null | undefined`): The value to check if it's neither `null` nor `undefined`.\n\n#### Returns\n\n(`value is T`): Returns `true` if the value is neither `null` nor `undefined`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isNull.md",
    "content": "# isNull\n\nChecks if a value is `null`.\n\n```typescript\nconst result = isNull(value);\n```\n\n## Usage\n\n### `isNull(value)`\n\nUse `isNull` when you want to check if a value is exactly `null`. It uses strict equality (`===`) to recognize only `null` and not undefined.\n\n```typescript\nimport { isNull } from 'es-toolkit/predicate';\n\n// null value\nconsole.log(isNull(null)); // true\n\n// Non-null values\nconsole.log(isNull(undefined)); // false\nconsole.log(isNull(0)); // false\nconsole.log(isNull('')); // false\nconsole.log(isNull(false)); // false\nconsole.log(isNull([])); // false\nconsole.log(isNull({})); // false\n```\n\nIt can also be used as a type guard in TypeScript.\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    // value is now narrowed to null\n    console.log('Value is null');\n  } else {\n    // value is narrowed to string | undefined\n    console.log('Value is not null:', value);\n  }\n}\n```\n\n`isNull` is different from [`isNil`](./isNil.md) in that it treats `undefined` as `false`.\n\n```typescript\nimport { isNil, isNull } from 'es-toolkit/predicate';\n\nconsole.log(isNull(undefined)); // false\nconsole.log(isNil(undefined)); // true\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's `null`.\n\n#### Returns\n\n(`value is null`): Returns `true` if the value is `null`, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isNumber.md",
    "content": "# isNumber\n\nChecks if a value is a number type.\n\n```typescript\nconst result = isNumber(value);\n```\n\n## Usage\n\n### `isNumber(value)`\n\nUse `isNumber` when you want to check if a value is a number.\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\n// Checking basic number values\nisNumber(123); // true\nisNumber(3.14); // true\nisNumber(NaN); // true\nisNumber(Infinity); // true\n\n// Distinguishing from other types\nisNumber('123'); // false\nisNumber(true); // false\nisNumber(null); // false\nisNumber(undefined); // false\n```\n\nParticularly useful when used as a type guard in TypeScript.\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\nfunction processValue(value: unknown) {\n  if (isNumber(value)) {\n    // value is narrowed to number\n    console.log(value * 2);\n  } else {\n    console.log('Not a number');\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a number type.\n\n#### Returns\n\n(`value is number`): Returns `true` if the value is a number, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isPlainObject.md",
    "content": "# isPlainObject\n\nChecks if a value is a plain object.\n\n```typescript\nconst result = isPlainObject(value);\n```\n\n## Usage\n\n### `isPlainObject(value)`\n\nUse `isPlainObject` when you want to check if a value is a plain object. A plain object is an object created with an object literal (`{}`) or the `Object` constructor. Class instances, arrays, or other special objects are not plain objects.\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\n// Plain objects\nconsole.log(isPlainObject({})); // true\nconsole.log(isPlainObject({ name: 'John', age: 30 })); // true\nconsole.log(isPlainObject(Object.create(null))); // true\nconsole.log(isPlainObject(new Object())); // true\n\n// Non-plain objects\nconsole.log(isPlainObject([])); // false (array)\nconsole.log(isPlainObject(new Date())); // false (Date object)\nconsole.log(isPlainObject(new Set())); // false (Set object)\nconsole.log(isPlainObject(new Map())); // false (Map object)\nconsole.log(isPlainObject(null)); // false (null)\nconsole.log(isPlainObject(42)); // false (number)\nconsole.log(isPlainObject('hello')); // false (string)\n\n// Class instances\nclass MyClass {}\nconsole.log(isPlainObject(new MyClass())); // false\n```\n\nIt's useful when serializing data or validating configuration objects.\n\n```typescript\nfunction processConfig(config: unknown) {\n  if (isPlainObject(config)) {\n    // config is now narrowed to Record<PropertyKey, any>\n    console.log('Valid configuration object');\n    Object.keys(config).forEach(key => {\n      console.log(`${key}: ${config[key]}`);\n    });\n  } else {\n    throw new Error('Configuration must be a plain object');\n  }\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a plain object.\n\n#### Returns\n\n(`value is Record<PropertyKey, any>`): Returns `true` if the value is a plain object, `false` otherwise.\n\n## Performance Comparison\n\n|                   | [Bundle Size](../../bundle-size.md) | [Runtime Performance](../../performance.md) |\n| ----------------- | ----------------------------------- | ------------------------------------------- |\n| es-toolkit        | 279 bytes (82.4% smaller)           | 1,505,684 times (1.70× faster)              |\n| es-toolkit/compat | 435 bytes (72.5% smaller)           | 2,013,760 times (2.28× faster)              |\n| lodash-es         | 1,586 bytes                         | 882,669 times                               |\n"
  },
  {
    "path": "docs/reference/predicate/isPrimitive.md",
    "content": "# isPrimitive\n\nChecks if a given value is a JavaScript primitive.\n\n```typescript\nconst result = isPrimitive(value);\n```\n\n## Usage\n\n### `isPrimitive(value)`\n\nUse `isPrimitive` when you want to check if a value is a JavaScript primitive. JavaScript primitives include `null`, `undefined`, strings, numbers, booleans, symbols, and `BigInt`. It's useful for distinguishing from reference types like objects or functions.\n\n```typescript\nimport { isPrimitive } from 'es-toolkit/predicate';\n\n// Primitive values\nconsole.log(isPrimitive(null)); // true\nconsole.log(isPrimitive(undefined)); // true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\nconsole.log(isPrimitive(false)); // true\nconsole.log(isPrimitive(Symbol('test'))); // true\nconsole.log(isPrimitive(123n)); // true\n\n// Reference types (not primitives)\nconsole.log(isPrimitive({})); // false\nconsole.log(isPrimitive([])); // false\nconsole.log(isPrimitive(new Date())); // false\nconsole.log(isPrimitive(new Map())); // false\nconsole.log(isPrimitive(new Set())); // false\nconsole.log(isPrimitive(() => {})); // false\nconsole.log(isPrimitive(/regex/)); // false\n```\n\nIt's useful when implementing deep copy logic.\n\n```typescript\n// Handle primitives and objects differently\nfunction deepClone(value: any): any {\n  if (isPrimitive(value)) {\n    // Return primitives as-is\n    return value;\n  }\n\n  // Perform cloning logic for objects\n  if (Array.isArray(value)) {\n    return value.map(deepClone);\n  }\n\n  const result: any = {};\n  for (const key in value) {\n    result[key] = deepClone(value[key]);\n  }\n  return result;\n}\n\n// Use in value comparison\nfunction isEqual(a: unknown, b: unknown): boolean {\n  if (isPrimitive(a) && isPrimitive(b)) {\n    return a === b;\n  }\n\n  // Complex object comparison logic...\n  return false;\n}\n\n// Safe string conversion for logging\nfunction safeLog(value: unknown) {\n  if (isPrimitive(value)) {\n    console.log('Primitive value:', value);\n  } else {\n    console.log('Object:', typeof value, Object.prototype.toString.call(value));\n  }\n}\n```\n\nYou can use it as a type guard to write safe code.\n\n```typescript\nfunction processValue(input: unknown) {\n  if (isPrimitive(input)) {\n    // TypeScript infers input as a primitive type\n    console.log('Type of primitive:', typeof input);\n    console.log('Primitive value:', input);\n    return input;\n  }\n\n  // Here input is inferred as an object type\n  console.log('It is an object type');\n  return null;\n}\n\n// API response validation\nfunction validateApiResponse(data: unknown) {\n  if (isPrimitive(data)) {\n    return {\n      type: 'primitive',\n      value: data,\n      serializable: true,\n    };\n  }\n\n  return {\n    type: 'object',\n    value: data,\n    serializable: false, // Needs additional validation\n  };\n}\n\n// Configuration value processing\nfunction normalizeConfigValue(value: unknown) {\n  if (isPrimitive(value)) {\n    // Primitives can be safely converted to strings\n    return String(value);\n  }\n\n  // Serialize objects as JSON\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return '[Complex Object]';\n  }\n}\n```\n\nYou can distinguish wrapper objects like `String`, `Number`, `Boolean` from primitive values.\n\n```typescript\n// Wrapper objects are not primitives\nconsole.log(isPrimitive(new String('hello'))); // false\nconsole.log(isPrimitive(new Number(42))); // false\nconsole.log(isPrimitive(new Boolean(true))); // false\n\n// But actual primitives are true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\n\n// You can extract primitive values with valueOf()\nconst strObj = new String('hello');\nconsole.log(isPrimitive(strObj.valueOf())); // true\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a JavaScript primitive.\n\n#### Returns\n\n(`value is null | undefined | string | number | boolean | symbol | bigint`): Returns `true` if the value is a primitive, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isPromise.md",
    "content": "# isPromise\n\nChecks if a given value is a `Promise` instance.\n\n```typescript\nconst result = isPromise(value);\n```\n\n## Usage\n\n### `isPromise(value)`\n\nUse `isPromise` when you want to check if a value is a `Promise` instance. It's useful when you need to distinguish `Promise` objects from other values in asynchronous code, or when you need to conditionally use `await`.\n\n```typescript\nimport { isPromise } from 'es-toolkit/predicate';\n\n// Promise instances\nconst promise1 = new Promise(resolve => resolve('done'));\nconst promise2 = Promise.resolve(42);\nconst promise3 = Promise.reject(new Error('failed'));\n\nconsole.log(isPromise(promise1)); // true\nconsole.log(isPromise(promise2)); // true\nconsole.log(isPromise(promise3)); // true\n\n// Non-Promise values\nconsole.log(isPromise({})); // false\nconsole.log(isPromise('hello')); // false\nconsole.log(isPromise(42)); // false\nconsole.log(isPromise(null)); // false\nconsole.log(isPromise(undefined)); // false\n```\n\nIt's useful when executing logic conditionally in asynchronous functions.\n\n```typescript\n// Check if value is a Promise and handle appropriately\nasync function processValue(input: unknown) {\n  if (isPromise(input)) {\n    // TypeScript infers input as Promise<any>\n    const result = await input;\n    console.log('Promise result:', result);\n    return result;\n  }\n\n  // Non-Promise values are returned immediately\n  console.log('Regular value:', input);\n  return input;\n}\n\n// Handle API responses\nfunction handleApiCall(response: unknown) {\n  if (isPromise(response)) {\n    return response.then(data => ({ success: true, data })).catch(error => ({ success: false, error: error.message }));\n  }\n\n  // Already resolved value\n  return { success: true, data: response };\n}\n\n// Use in utility function\nfunction toPromise<T>(value: T | Promise<T>): Promise<T> {\n  if (isPromise(value)) {\n    return value;\n  }\n\n  return Promise.resolve(value);\n}\n```\n\nYou can distinguish between Promise-like objects and actual Promises.\n\n```typescript\n// thenable objects are not Promises\nconst thenable = {\n  then: (resolve: Function) => resolve('not a promise'),\n};\n\nconsole.log(isPromise(thenable)); // false\n\n// async function results are Promises\nasync function asyncFunction() {\n  return 'async result';\n}\n\nconsole.log(isPromise(asyncFunction())); // true\n\n// Regular functions are not Promises\nfunction normalFunction() {\n  return 'normal result';\n}\n\nconsole.log(isPromise(normalFunction())); // false\n```\n\nIt can also be used for error handling.\n\n```typescript\nfunction safeExecute(fn: () => any) {\n  try {\n    const result = fn();\n\n    if (isPromise(result)) {\n      return result.catch(error => {\n        console.error('Error in async function:', error);\n        return null;\n      });\n    }\n\n    return result;\n  } catch (error) {\n    console.error('Error in sync function:', error);\n    return null;\n  }\n}\n\n// Timeout handling\nfunction withTimeout<T>(valueOrPromise: T | Promise<T>, timeoutMs: number) {\n  if (!isPromise(valueOrPromise)) {\n    return valueOrPromise;\n  }\n\n  const timeoutPromise = new Promise((_, reject) => {\n    setTimeout(() => reject(new Error('Timeout')), timeoutMs);\n  });\n\n  return Promise.race([valueOrPromise, timeoutPromise]);\n}\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Promise instance.\n\n#### Returns\n\n(`value is Promise<any>`): Returns `true` if the value is a Promise instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isRegExp.md",
    "content": "# isRegExp\n\nChecks if a given value is a `RegExp` instance.\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## Usage\n\n### `isRegExp(value)`\n\nUse `isRegExp` when you want to check if a value is a `RegExp` instance. It's useful for distinguishing regular expression objects from regular strings or other objects.\n\n```typescript\nimport { isRegExp } from 'es-toolkit/predicate';\n\n// RegExp instances\nconst regex1 = /abc/;\nconst regex2 = new RegExp('abc');\nconst regex3 = new RegExp('\\\\d+', 'g');\n\nconsole.log(isRegExp(regex1)); // true\nconsole.log(isRegExp(regex2)); // true\nconsole.log(isRegExp(regex3)); // true\n\n// Non-RegExp values\nconsole.log(isRegExp('/abc/')); // false (string)\nconsole.log(isRegExp('abc')); // false\nconsole.log(isRegExp({})); // false\nconsole.log(isRegExp(null)); // false\nconsole.log(isRegExp(undefined)); // false\n```\n\nUseful for regex pattern validation or string processing:\n\n```typescript\n// Dynamic pattern validation\nfunction validatePattern(pattern: unknown, text: string) {\n  if (isRegExp(pattern)) {\n    // TypeScript infers pattern as RegExp\n    return pattern.test(text);\n  }\n\n  // Convert string patterns to regex\n  if (typeof pattern === 'string') {\n    const regex = new RegExp(pattern);\n    return regex.test(text);\n  }\n\n  return false;\n}\n\n// Usage examples\nconsole.log(validatePattern(/hello/, 'hello world')); // true\nconsole.log(validatePattern('\\\\d+', '123')); // true\nconsole.log(validatePattern('invalid', 'text')); // false\n\n// Use in form validation\nfunction createValidator(rule: unknown) {\n  if (isRegExp(rule)) {\n    return (value: string) => rule.test(value);\n  }\n\n  // Other rule types...\n  return () => false;\n}\n\n// Create email validator\nconst emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst emailValidator = createValidator(emailRegex);\n\nconsole.log(emailValidator('test@example.com')); // true\nconsole.log(emailValidator('invalid-email')); // false\n```\n\nUse in conditional string processing:\n\n```typescript\n// Text processing utility\nfunction processText(input: string, processor: unknown) {\n  if (isRegExp(processor)) {\n    // Extract matching parts with regex\n    const matches = input.match(processor);\n    return matches ? matches : [];\n  }\n\n  // Other processor types...\n  return [input];\n}\n\n// Extract numbers\nconst numberRegex = /\\d+/g;\nconst numbers = processText('Price: 1000 won, Discount: 200 won', numberRegex);\nconsole.log(numbers); // ['1000', '200']\n\n// Extract URLs\nconst urlRegex = /https?:\\/\\/[^\\s]+/g;\nconst urls = processText('Website: https://example.com reference', urlRegex);\nconsole.log(urls); // ['https://example.com']\n\n// Configuration-based text validation\nclass TextValidator {\n  private rules: Array<{ name: string; rule: unknown }> = [];\n\n  addRule(name: string, rule: unknown) {\n    this.rules.push({ name, rule });\n  }\n\n  validate(text: string) {\n    const results: Array<{ rule: string; passed: boolean }> = [];\n\n    for (const { name, rule } of this.rules) {\n      if (isRegExp(rule)) {\n        results.push({\n          rule: name,\n          passed: rule.test(text),\n        });\n      } else {\n        results.push({\n          rule: name,\n          passed: false,\n        });\n      }\n    }\n\n    return results;\n  }\n}\n\n// Usage example\nconst validator = new TextValidator();\nvalidator.addRule('Letters only', /^[a-zA-Z]+$/);\nvalidator.addRule('Contains number', /\\d/);\nvalidator.addRule('No special chars', /^[^!@#$%^&*()]+$/);\n\nconsole.log(validator.validate('Hello123'));\n// [\n//   { rule: 'Letters only', passed: false },\n//   { rule: 'Contains number', passed: true },\n//   { rule: 'No special chars', passed: true }\n// ]\n```\n\nDistinguishing between strings and regular expressions:\n\n```typescript\n// Use in search functionality\nfunction searchText(content: string, query: unknown) {\n  if (isRegExp(query)) {\n    // Regex search - advanced pattern matching\n    const matches = content.match(query);\n    return matches ? matches.length : 0;\n  }\n\n  if (typeof query === 'string') {\n    // Regular string search\n    const regex = new RegExp(query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n    const matches = content.match(regex);\n    return matches ? matches.length : 0;\n  }\n\n  return 0;\n}\n\n// Usage examples\nconst text = 'Hello world! Hello everyone!';\n\nconsole.log(searchText(text, /hello/gi)); // 2 (regex)\nconsole.log(searchText(text, 'Hello')); // 2 (string, escaped)\nconsole.log(searchText(text, /h.llo/i)); // 2 (pattern matching)\n\n// Dynamic filtering\nfunction createFilter(patterns: unknown[]) {\n  const regexPatterns = patterns.filter(isRegExp);\n\n  return (text: string) => {\n    return regexPatterns.some(pattern => pattern.test(text));\n  };\n}\n\n// Spam filter example\nconst spamPatterns = [\n  /\\b(ad|promo)\\b/,\n  /\\d{3}-\\d{4}-\\d{4}/, // Phone number pattern\n  'invalid', // Not a RegExp, excluded from filter\n  /\\$\\d+/, // Price pattern\n];\n\nconst spamFilter = createFilter(spamPatterns);\nconsole.log(spamFilter('Urgent ad!')); // true\nconsole.log(spamFilter('Hello')); // false\n```\n\nUsing regex flags and properties:\n\n```typescript\n// Check RegExp properties\nfunction analyzeRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return {\n      source: value.source,\n      flags: value.flags,\n      global: value.global,\n      ignoreCase: value.ignoreCase,\n      multiline: value.multiline,\n      unicode: value.unicode,\n      sticky: value.sticky,\n    };\n  }\n\n  return null;\n}\n\n// Usage example\nconst regex = /hello/gim;\nconst analysis = analyzeRegex(regex);\nconsole.log(analysis);\n// {\n//   source: 'hello',\n//   flags: 'gim',\n//   global: true,\n//   ignoreCase: true,\n//   multiline: true,\n//   unicode: false,\n//   sticky: false\n// }\n\n// Clone regex\nfunction cloneRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return new RegExp(value.source, value.flags);\n  }\n\n  return null;\n}\n\nconst originalRegex = /test/gi;\nconst clonedRegex = cloneRegex(originalRegex);\nconsole.log(clonedRegex?.test('TEST')); // true\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a RegExp instance.\n\n#### Returns\n\n(`value is RegExp`): Returns `true` if the value is a RegExp instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isSet.md",
    "content": "# isSet\n\nChecks if a given value is a `Set` instance.\n\n```typescript\nconst result = isSet(value);\n```\n\n## Usage\n\n### `isSet(value)`\n\nUse `isSet` when you want to check if a value is a `Set` instance. It's useful for distinguishing `Set` objects from other objects.\n\n```typescript\nimport { isSet } from 'es-toolkit/predicate';\n\n// Set instances\nconst set1 = new Set();\nconst set2 = new Set([1, 2, 3]);\nconst set3 = new Set(['a', 'b', 'c']);\n\nconsole.log(isSet(set1)); // true\nconsole.log(isSet(set2)); // true\nconsole.log(isSet(set3)); // true\n\n// Non-Set values\nconsole.log(isSet(new Map())); // false\nconsole.log(isSet(new WeakSet())); // false\nconsole.log(isSet([])); // false\nconsole.log(isSet({})); // false\nconsole.log(isSet(null)); // false\nconsole.log(isSet(undefined)); // false\n```\n\nUseful when executing different logic for JavaScript built-in objects like `Set`, `Array`, and `Map`.\n\n```typescript\n// Calculate collection size\nfunction getCollectionSize(collection: unknown): number {\n  if (isSet(collection)) {\n    // TypeScript infers collection as Set<any>\n    return collection.size;\n  }\n\n  if (Array.isArray(collection)) {\n    return collection.length;\n  }\n\n  if (collection && typeof collection === 'object') {\n    return Object.keys(collection).length;\n  }\n\n  return 0;\n}\n\n// Usage examples\nconsole.log(getCollectionSize(new Set([1, 2, 3]))); // 3\nconsole.log(getCollectionSize([1, 2, 3])); // 3\nconsole.log(getCollectionSize({ a: 1, b: 2 })); // 2\n\n// Deduplication utility\nfunction removeDuplicates(data: unknown) {\n  if (isSet(data)) {\n    // Already a Set, return as is\n    return data;\n  }\n\n  if (Array.isArray(data)) {\n    return new Set(data);\n  }\n\n  // Don't convert other types\n  return data;\n}\n\nconst duplicatedArray = [1, 2, 2, 3, 3, 3];\nconst uniqueSet = removeDuplicates(duplicatedArray);\nconsole.log(uniqueSet); // Set { 1, 2, 3 }\n\nconst existingSet = new Set(['a', 'b']);\nconsole.log(removeDuplicates(existingSet)); // Set { 'a', 'b' } (same Set returned)\n```\n\nCan also be used extensively in Set manipulation and data transformation.\n\n```typescript\n// Universal collection merging\nfunction mergeCollections(...collections: unknown[]): Set<any> {\n  const result = new Set();\n\n  for (const collection of collections) {\n    if (isSet(collection)) {\n      // Add all values from Set to result\n      for (const item of collection) {\n        result.add(item);\n      }\n    } else if (Array.isArray(collection)) {\n      // Add all values from array\n      for (const item of collection) {\n        result.add(item);\n      }\n    }\n  }\n\n  return result;\n}\n\n// Usage examples\nconst set1 = new Set([1, 2, 3]);\nconst array1 = [3, 4, 5];\nconst set2 = new Set(['a', 'b']);\n\nconst merged = mergeCollections(set1, array1, set2);\nconsole.log(merged); // Set { 1, 2, 3, 4, 5, 'a', 'b' }\n\n// Calculate collection intersection\nfunction getIntersection(coll1: unknown, coll2: unknown): Set<any> {\n  const set1 = isSet(coll1) ? coll1 : new Set(Array.isArray(coll1) ? coll1 : []);\n  const set2 = isSet(coll2) ? coll2 : new Set(Array.isArray(coll2) ? coll2 : []);\n\n  const intersection = new Set();\n\n  for (const item of set1) {\n    if (set2.has(item)) {\n      intersection.add(item);\n    }\n  }\n\n  return intersection;\n}\n\n// Usage examples\nconst setA = new Set([1, 2, 3, 4]);\nconst arrayB = [3, 4, 5, 6];\n\nconst intersection = getIntersection(setA, arrayB);\nconsole.log(intersection); // Set { 3, 4 }\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a Set instance.\n\n#### Returns\n\n(`value is Set<any>`): Returns `true` if the value is a Set instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isString.md",
    "content": "# isString\n\nChecks if a given value is a string.\n\n```typescript\nconst result = isString(value);\n```\n\n## Usage\n\n### `isString(value)`\n\nUse `isString` when you want to check if a value is a string. It's useful for distinguishing string types from other primitive types or objects.\n\n```typescript\nimport { isString } from 'es-toolkit/predicate';\n\n// String values\nconsole.log(isString('hello')); // true\nconsole.log(isString('')); // true\nconsole.log(isString('123')); // true\nconsole.log(isString('true')); // true\n\n// Non-string values\nconsole.log(isString(123)); // false\nconsole.log(isString(true)); // false\nconsole.log(isString(null)); // false\nconsole.log(isString(undefined)); // false\nconsole.log(isString([])); // false\nconsole.log(isString({})); // false\nconsole.log(isString(new String('hello'))); // false (String object)\n```\n\nUseful for data validation and type-safe string processing:\n\n```typescript\n// Safe string manipulation\nfunction processText(input: unknown): string {\n  if (isString(input)) {\n    // TypeScript infers input as string\n    return input.trim().toLowerCase();\n  }\n\n  // Convert other types to string\n  return String(input);\n}\n\n// Usage examples\nconsole.log(processText('  HELLO  ')); // 'hello'\nconsole.log(processText(123)); // '123'\nconsole.log(processText(true)); // 'true'\nconsole.log(processText(null)); // 'null'\n\n// Form data validation\nfunction validateForm(data: Record<string, unknown>) {\n  const errors: string[] = [];\n\n  if (!isString(data.name) || data.name.length === 0) {\n    errors.push('Name is required');\n  }\n\n  if (!isString(data.email) || !data.email.includes('@')) {\n    errors.push('Please enter a valid email');\n  }\n\n  return {\n    isValid: errors.length === 0,\n    errors,\n  };\n}\n\n// Usage examples\nconsole.log(validateForm({ name: 'John', email: 'john@example.com' }));\n// { isValid: true, errors: [] }\n\nconsole.log(validateForm({ name: 123, email: 'invalid-email' }));\n// { isValid: false, errors: ['Name is required', 'Please enter a valid email'] }\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a string.\n\n#### Returns\n\n(`value is string`): Returns `true` if the value is a string, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isSymbol.md",
    "content": "# isSymbol\n\nChecks if a given value is a `symbol`.\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## Usage\n\n### `isSymbol(value)`\n\nUse `isSymbol` when you want to check if a value is a `symbol`.\n\n```typescript\nimport { isSymbol } from 'es-toolkit/predicate';\n\n// symbol values\nconst sym1 = Symbol('description');\nconst sym2 = Symbol.for('global');\nconst sym3 = Symbol.iterator;\n\nconsole.log(isSymbol(sym1)); // true\nconsole.log(isSymbol(sym2)); // true\nconsole.log(isSymbol(sym3)); // true\n\n// Non-symbol values\nconsole.log(isSymbol('symbol')); // false\nconsole.log(isSymbol(123)); // false\nconsole.log(isSymbol(true)); // false\nconsole.log(isSymbol(null)); // false\nconsole.log(isSymbol(undefined)); // false\nconsole.log(isSymbol({})); // false\nconsole.log(isSymbol([])); // false\n```\n\nUseful for safely accessing object properties or managing metadata.\n\n```typescript\n// Safe property access\nfunction getPropertyValue(obj: object, key: unknown) {\n  if (isSymbol(key)) {\n    // TypeScript infers key as symbol\n    return (obj as any)[key];\n  }\n\n  if (typeof key === 'string') {\n    return (obj as any)[key];\n  }\n\n  return undefined;\n}\n\n// Usage examples\nconst mySymbol = Symbol('myKey');\nconst obj = {\n  name: 'John',\n  [mySymbol]: 'secret value',\n};\n\nconsole.log(getPropertyValue(obj, 'name')); // 'John'\nconsole.log(getPropertyValue(obj, mySymbol)); // 'secret value'\nconsole.log(getPropertyValue(obj, 123)); // undefined\n\n// Metadata storage\nclass MetadataManager {\n  private metadata = new Map<symbol, any>();\n\n  setMetadata(key: unknown, value: any): boolean {\n    if (isSymbol(key)) {\n      this.metadata.set(key, value);\n      return true;\n    }\n    return false;\n  }\n\n  getMetadata(key: unknown): any {\n    if (isSymbol(key)) {\n      return this.metadata.get(key);\n    }\n    return undefined;\n  }\n\n  hasMetadata(key: unknown): boolean {\n    if (isSymbol(key)) {\n      return this.metadata.has(key);\n    }\n    return false;\n  }\n}\n\n// Usage examples\nconst manager = new MetadataManager();\nconst typeSymbol = Symbol('type');\nconst versionSymbol = Symbol('version');\n\nmanager.setMetadata(typeSymbol, 'user');\nmanager.setMetadata(versionSymbol, '1.0');\nmanager.setMetadata('invalid', 'value'); // false, not a symbol\n\nconsole.log(manager.getMetadata(typeSymbol)); // 'user'\nconsole.log(manager.hasMetadata(versionSymbol)); // true\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a symbol.\n\n#### Returns\n\n(`value is symbol`): Returns `true` if the value is a symbol, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isTypedArray.md",
    "content": "# isTypedArray\n\nChecks if a given value is a `TypedArray` instance.\n\n```typescript\nconst result = isTypedArray(value);\n```\n\n## Usage\n\n### `isTypedArray(value)`\n\nUse `isTypedArray` when you want to check if a value is a [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/predicate';\n\n// TypedArray instances\nconst uint8 = new Uint8Array([1, 2, 3]);\nconst int16 = new Int16Array([1000, 2000]);\nconst float32 = new Float32Array([1.5, 2.5]);\nconst bigUint64 = new BigUint64Array([1n, 2n]);\n\nconsole.log(isTypedArray(uint8)); // true\nconsole.log(isTypedArray(int16)); // true\nconsole.log(isTypedArray(float32)); // true\nconsole.log(isTypedArray(bigUint64)); // true\n\n// Non-TypedArray values\nconsole.log(isTypedArray([1, 2, 3])); // false (regular array)\nconsole.log(isTypedArray(new ArrayBuffer(8))); // false (ArrayBuffer)\nconsole.log(isTypedArray(new DataView(new ArrayBuffer(8)))); // false (DataView)\nconsole.log(isTypedArray({})); // false\nconsole.log(isTypedArray(null)); // false\nconsole.log(isTypedArray(undefined)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a TypedArray instance.\n\n#### Returns\n\n(`value is Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Float32Array | Float64Array`): Returns `true` if the value is a TypedArray instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isUndefined.md",
    "content": "# isUndefined\n\nChecks if a given value is `undefined`.\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## Usage\n\n### `isUndefined(value)`\n\nUse `isUndefined` when you want to check if a value is `undefined`. It's useful for checking whether a variable is initialized or whether an optional property exists.\n\n```typescript\nimport { isUndefined } from 'es-toolkit/predicate';\n\n// undefined values\nconsole.log(isUndefined(undefined)); // true\nconsole.log(isUndefined(void 0)); // true\n\nlet uninitialized: string;\nconsole.log(isUndefined(uninitialized)); // true\n\n// Non-undefined values\nconsole.log(isUndefined(null)); // false\nconsole.log(isUndefined('')); // false\nconsole.log(isUndefined(0)); // false\nconsole.log(isUndefined(false)); // false\nconsole.log(isUndefined({})); // false\nconsole.log(isUndefined([])); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's undefined.\n\n#### Returns\n\n(`value is undefined`): Returns `true` if the value is undefined, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isWeakMap.md",
    "content": "# isWeakMap\n\nChecks if a given value is a `WeakMap` instance.\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## Usage\n\n### `isWeakMap(value)`\n\nUse `isWeakMap` when you want to check if a value is a `WeakMap` instance. `WeakMap` is a key-value store with weak references to objects as keys, useful for preventing memory leaks.\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/predicate';\n\n// WeakMap instances\nconst weakMap1 = new WeakMap();\nconst weakMap2 = new WeakMap([[{}, 'value']]);\n\nconsole.log(isWeakMap(weakMap1)); // true\nconsole.log(isWeakMap(weakMap2)); // true\n\n// Non-WeakMap values\nconsole.log(isWeakMap(new Map())); // false\nconsole.log(isWeakMap(new Set())); // false\nconsole.log(isWeakMap(new WeakSet())); // false\nconsole.log(isWeakMap({})); // false\nconsole.log(isWeakMap([])); // false\nconsole.log(isWeakMap(null)); // false\nconsole.log(isWeakMap(undefined)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a WeakMap instance.\n\n#### Returns\n\n(`value is WeakMap<WeakKey, any>`): Returns `true` if the value is a WeakMap instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/predicate/isWeakSet.md",
    "content": "# isWeakSet\n\nChecks if a given value is a `WeakSet` instance.\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## Usage\n\n### `isWeakSet(value)`\n\nUse `isWeakSet` when you want to check if a value is a WeakSet instance.\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/predicate';\n\n// WeakSet instances\nconst weakSet1 = new WeakSet();\nconst weakSet2 = new WeakSet([{}, []]);\n\nconsole.log(isWeakSet(weakSet1)); // true\nconsole.log(isWeakSet(weakSet2)); // true\n\n// Non-WeakSet values\nconsole.log(isWeakSet(new Set())); // false\nconsole.log(isWeakSet(new Map())); // false\nconsole.log(isWeakSet(new WeakMap())); // false\nconsole.log(isWeakSet([])); // false\nconsole.log(isWeakSet({})); // false\nconsole.log(isWeakSet(null)); // false\nconsole.log(isWeakSet(undefined)); // false\n```\n\n#### Parameters\n\n- `value` (`unknown`): The value to check if it's a WeakSet instance.\n\n#### Returns\n\n(`value is WeakSet<WeakKey>`): Returns `true` if the value is a WeakSet instance, `false` otherwise.\n"
  },
  {
    "path": "docs/reference/promise/Mutex.md",
    "content": "# Mutex\n\nEnsures that multiple asynchronous tasks do not execute simultaneously.\n\n```typescript\nconst mutex = new Mutex();\n```\n\n## Usage\n\n### `Mutex()`\n\nUse `Mutex` when you want to prevent multiple asynchronous tasks from running concurrently. It's useful in situations where you need to control concurrency, such as database connections, file system access, or API call rate limiting.\n\n```typescript\nimport { Mutex } from 'es-toolkit';\n\nconst mutex = new Mutex();\n\n// API call rate limiting example\nasync function callAPI() {\n  await mutex.acquire();\n  try {\n    // Prevents multiple API calls from happening simultaneously\n    const response = await fetch('/api/data');\n    return response.json();\n  } finally {\n    mutex.release();\n  }\n}\n\n// File system access example\nasync function writeToFile(data: string) {\n  await mutex.acquire();\n  try {\n    // Prevents concurrent writes to the same file\n    await fs.writeFile('data.txt', data);\n    console.log('File write completed');\n  } finally {\n    mutex.release();\n  }\n}\n\n// Even if multiple tasks are called simultaneously, they execute sequentially\ncallAPI();\ncallAPI(); // Waits until the first task completes\nwriteToFile(); // Waits until all previous tasks complete\n```\n\n#### Properties\n\n- `isLocked` (`boolean`): Whether the mutex is currently in use. If `true`, it means there's already an asynchronous task running.\n\n#### Methods\n\n- `acquire` (`() => Promise<void>`): Acquires permission to execute an asynchronous task, or waits until permission is granted.\n- `release` (`() => void`): Allows the next waiting task to execute.\n"
  },
  {
    "path": "docs/reference/promise/Semaphore.md",
    "content": "# Semaphore\n\nLimits the number of asynchronous tasks that can execute simultaneously.\n\n```typescript\nconst semaphore = new Semaphore(capacity);\n```\n\n## Usage\n\n### `Semaphore(capacity)`\n\nUse `Semaphore` when you want to limit the number of asynchronous tasks that can execute concurrently. It's particularly useful in situations where you need to control resource usage, such as database connection pools, API call rate limiting, or file download limits.\n\n```typescript\nimport { Semaphore } from 'es-toolkit';\n\nconst semaphore = new Semaphore(3);\n\n// API call rate limiting example (maximum 3 concurrent executions)\nasync function callAPI(id: number) {\n  await semaphore.acquire();\n  try {\n    console.log(`Starting API call: ${id}`);\n    const response = await fetch(`/api/data/${id}`);\n    return response.json();\n  } finally {\n    semaphore.release();\n    console.log(`Completed API call: ${id}`);\n  }\n}\n\n// File download limiting example\nasync function downloadFile(url: string) {\n  await semaphore.acquire();\n  try {\n    console.log(`Starting download: ${url}`);\n    // File download logic\n    await fetch(url);\n  } finally {\n    semaphore.release();\n    console.log(`Completed download: ${url}`);\n  }\n}\n\n// Even if 5 tasks are called simultaneously, only 3 execute concurrently\ncallAPI(1);\ncallAPI(2);\ncallAPI(3);\ncallAPI(4); // Waits until one of the previous tasks completes\ncallAPI(5); // Waits until one of the previous tasks completes\n```\n\n#### Parameters\n\n- `capacity` (`number`): The maximum number of tasks that can execute concurrently. Must be an integer greater than 1.\n\n#### Properties\n\n- `capacity` (`number`): The maximum number of tasks that can execute concurrently.\n- `available` (`number`): The number of currently available permits. If `0`, all permits are in use.\n\n#### Methods\n\n- `acquire` (`() => Promise<void>`): Acquires permission to execute an asynchronous task, or waits until permission is granted.\n- `release` (`() => void`): Returns permission so that the next waiting task can execute.\n"
  },
  {
    "path": "docs/reference/promise/delay.md",
    "content": "# delay\n\nDelays code execution for a specified amount of time.\n\n```typescript\nawait delay(ms, options?);\n```\n\n## Usage\n\n### `delay(ms, options?)`\n\nUse `delay` when you want to pause code execution for a specific amount of time. You can use it with async/await to make the next code execute after a certain time. If needed, you can also cancel the delay through an `AbortSignal`.\n\n```typescript\nimport { delay } from 'es-toolkit/promise';\n\nasync function example() {\n  console.log('Start');\n  await delay(1000); // Delays execution for 1 second\n  console.log('Executed after 1 second');\n\n  await delay(500); // Delays for an additional 0.5 seconds\n  console.log('Executed after an additional 0.5 seconds');\n}\n\nexample();\n```\n\nYou can also cancel the delay using AbortSignal:\n\n```typescript\nasync function cancellableDelay() {\n  const controller = new AbortController();\n  const { signal } = controller;\n\n  // Cancel the delay after 50ms\n  setTimeout(() => controller.abort(), 50);\n\n  try {\n    await delay(1000, { signal });\n    console.log('1 second has passed'); // This code won't execute\n  } catch (error) {\n    console.log('Delay was cancelled'); // AbortError is thrown\n  }\n}\n```\n\nIt's also useful for simulating asynchronous behavior in tests.\n\n```typescript\nasync function simulateNetworkRequest() {\n  console.log('Starting network request...');\n  await delay(2000); // Simulates a 2-second network delay\n  console.log('Response received!');\n  return { data: 'test' };\n}\n```\n\n#### Parameters\n\n- `ms` (`number`): The amount of time to delay in milliseconds.\n- `options` (`DelayOptions`, optional): Delay options.\n  - `signal` (`AbortSignal`, optional): An AbortSignal to cancel the delay.\n\n#### Returns\n\n(`Promise<void>`): Returns a Promise that completes after the specified time.\n\n#### Errors\n\nThrows `AbortError` when the AbortSignal is activated.\n"
  },
  {
    "path": "docs/reference/promise/timeout.md",
    "content": "# timeout\n\nReturns a `Promise` that throws a `TimeoutError` after the specified time.\n\n```typescript\nawait timeout(ms);\n```\n\n## Usage\n\n### `timeout(ms)`\n\nUse `timeout` when you want to throw a timeout error after a specific time has passed. It's useful when used together with `Promise.race()` to set time limits on tasks.\n\n```typescript\nimport { timeout } from 'es-toolkit/promise';\n\n// Basic usage - throws TimeoutError after 1 second\ntry {\n  await timeout(1000);\n  console.log('This code will not execute');\n} catch (error) {\n  console.log('Timeout error occurred:', error.message); // 'The operation was timed out'\n}\n```\n\nYou can use it with `Promise.race()` to set time limits on tasks:\n\n```typescript\nasync function fetchWithTimeout(url: string) {\n  try {\n    const result = await Promise.race([\n      fetch(url),\n      timeout(5000), // 5 second limit\n    ]);\n    return result;\n  } catch (error) {\n    if (error.name === 'TimeoutError') {\n      console.log('Request is taking too long');\n    }\n    throw error;\n  }\n}\n```\n\nYou can also use it when you want to fail the entire operation if any of multiple asynchronous tasks don't complete within the specified time.\n\n```typescript\nasync function multipleOperationsWithTimeout() {\n  try {\n    await Promise.race([\n      Promise.all([fetch('/api/data1'), fetch('/api/data2'), fetch('/api/data3')]),\n      timeout(3000), // 3 second limit for all tasks\n    ]);\n    console.log('All tasks completed on time');\n  } catch (error) {\n    console.log('Tasks did not complete on time');\n  }\n}\n```\n\n#### Parameters\n\n- `ms` (`number`): The amount of time in milliseconds until the `TimeoutError` is thrown.\n\n#### Returns\n\n(`Promise<never>`): Returns a Promise that rejects with a `TimeoutError` after the specified time.\n\n#### Errors\n\nThrows `TimeoutError` after the specified time has passed.\n"
  },
  {
    "path": "docs/reference/promise/withTimeout.md",
    "content": "# withTimeout\n\nSets a time limit on an asynchronous function, throwing a `TimeoutError` if it doesn't complete within the specified time.\n\n```typescript\nawait withTimeout(run, ms);\n```\n\n## Usage\n\n### `withTimeout(run, ms)`\n\nUse `withTimeout` when you want to set a timeout on an asynchronous task. If the Promise doesn't complete within the specified time, it's rejected with a `TimeoutError`, preventing indefinite waiting.\n\n```typescript\nimport { withTimeout } from 'es-toolkit/promise';\n\nasync function fetchData() {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n}\n\ntry {\n  // Must complete within 1 second\n  const data = await withTimeout(fetchData, 1000);\n  console.log('Received data:', data);\n} catch (error) {\n  if (error.name === 'TimeoutError') {\n    console.log('Request timed out');\n  }\n}\n```\n\nYou can also use it when you want to set a time limit on database queries.\n\n```typescript\nasync function queryDatabase(query: string) {\n  // Database query logic\n  return await db.execute(query);\n}\n\ntry {\n  const result = await withTimeout(\n    () => queryDatabase('SELECT * FROM users'),\n    5000 // 5 second limit\n  );\n  console.log('Query result:', result);\n} catch (error) {\n  console.log('Query took too long and was cancelled');\n}\n```\n\nYou can also use it when you want to receive only the fastest response among multiple API calls.\n\n```typescript\nasync function getFastestResponse() {\n  const apis = [() => fetch('/api/server1'), () => fetch('/api/server2'), () => fetch('/api/server3')];\n\n  try {\n    // Set a 2 second limit on each API and receive only the fastest response\n    const promises = apis.map(api => withTimeout(api, 2000));\n    const result = await Promise.race(promises);\n    return result.json();\n  } catch (error) {\n    console.log('All APIs timed out');\n  }\n}\n```\n\n#### Parameters\n\n- `run` (`() => Promise<T>`): The asynchronous function to execute.\n- `ms` (`number`): The amount of time in milliseconds until the timeout occurs.\n\n#### Returns\n\n(`Promise<T>`): Returns the result of the given asynchronous function, or a Promise that's rejected with a TimeoutError if it times out.\n\n#### Errors\n\nThrows `TimeoutError` if not completed within the specified time.\n"
  },
  {
    "path": "docs/reference/set/countBy.md",
    "content": "# countBy (for `Set`s)\n\nCounts the occurrences of items in a Set based on a transformation function.\n\n```typescript\nconst counts = countBy(set, mapper);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `countBy(set, mapper)`\n\nUse `countBy` when you want to count how many elements in a Set fall into different categories. Provide a function that generates a key from each value, and it returns a Map with the generated keys and their counts as values. The count is incremented for each element for which the transformation produces the same key.\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = countBy(set, value => (value % 2 === 0 ? 'even' : 'odd'));\n// Result: Map(2) { 'odd' => 3, 'even' => 2 }\n```\n\nYou can count elements based on various criteria.\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\n// Count by string length\nconst words = new Set(['apple', 'banana', 'cherry', 'date']);\n\nconst byLength = countBy(words, word => word.length);\n// Result: Map(3) { 5 => 1, 6 => 2, 4 => 1 }\n\n// Count by property\nconst users = new Set([\n  { name: 'Alice', role: 'admin' },\n  { name: 'Bob', role: 'user' },\n  { name: 'Charlie', role: 'user' },\n  { name: 'Diana', role: 'admin' },\n]);\n\nconst byRole = countBy(users, user => user.role);\n// Result: Map(2) { 'admin' => 2, 'user' => 2 }\n\n// Count by derived category\nconst ages = new Set([15, 25, 35, 45, 55]);\n\nconst ageGroups = countBy(ages, age => {\n  if (age < 18) return 'minor';\n  if (age < 65) return 'adult';\n  return 'senior';\n});\n// Result: Map(2) { 'minor' => 1, 'adult' => 4 }\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to count occurrences from.\n- `mapper` (`(value: T, value2: T, set: Set<T>) => K`): The function to produce a key for counting.\n\n#### Returns\n\n(`Map<K, number>`): A Map containing the mapped keys and their counts.\n"
  },
  {
    "path": "docs/reference/set/every.md",
    "content": "# every (for `Set`s)\n\nTests whether all elements in a Set satisfy the provided predicate function.\n\n```typescript\nconst allMatch = every(set, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `every(set, doesMatch)`\n\nUse `every` when you want to check if all elements in a Set meet a specific condition. Provide a predicate function that tests each element, and it returns true if the predicate is satisfied for all elements, and false otherwise.\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\nconst set = new Set([10, 20, 30]);\n\nconst result = every(set, value => value > 5);\n// Result: true\n\nconst result2 = every(set, value => value > 15);\n// Result: false\n```\n\nYou can test various conditions.\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\n// Check if all values meet criteria\nconst ages = new Set([25, 30, 35, 40]);\n\nconst allAdults = every(ages, age => age >= 18);\n// Result: true\n\nconst allSeniors = every(ages, age => age >= 65);\n// Result: false\n\n// Check object properties\nconst users = new Set([\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n]);\n\nconst allActive = every(users, user => user.active);\n// Result: true\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to test.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): A predicate function that tests each element.\n\n#### Returns\n\n(`boolean`): true if all elements satisfy the predicate, false otherwise.\n"
  },
  {
    "path": "docs/reference/set/filter.md",
    "content": "# filter (for `Set`s)\n\nFilters a Set based on a predicate function.\n\n```typescript\nconst filtered = filter(set, callback);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `filter(set, callback)`\n\nUse `filter` when you want to create a new Set containing only the elements that satisfy a specific condition. Provide a predicate function that tests each element, and it returns a new Set with only the elements for which the predicate returns true.\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = filter(set, value => value > 2);\n// Result: Set(3) { 3, 4, 5 }\n```\n\nYou can filter based on various criteria.\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\n// Filter by value type\nconst numbers = new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n\nconst evenNumbers = filter(numbers, num => num % 2 === 0);\n// Result: Set(5) { 2, 4, 6, 8, 10 }\n\n// Filter objects\nconst products = new Set([\n  { name: 'Laptop', price: 1000, available: true },\n  { name: 'Mouse', price: 25, available: false },\n  { name: 'Keyboard', price: 75, available: true },\n]);\n\nconst availableProducts = filter(products, product => product.available);\n// Result: Set with Laptop and Keyboard\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to filter.\n- `callback` (`(value: T, value2: T, set: Set<T>) => boolean`): A predicate function that tests each element.\n\n#### Returns\n\n(`Set<T>`): A new Set containing only the elements that satisfy the predicate.\n"
  },
  {
    "path": "docs/reference/set/find.md",
    "content": "# find (for `Set`s)\n\nFinds the first element in a Set for which the predicate function returns true.\n\n```typescript\nconst element = find(set, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `find(set, doesMatch)`\n\nUse `find` when you want to find the first element in a Set that matches a specific condition. Provide a predicate function that tests each element, and it returns the first matching element or undefined if none is found.\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\nconst set = new Set([\n  { name: 'apple', quantity: 10 },\n  { name: 'banana', quantity: 5 },\n  { name: 'grape', quantity: 15 },\n]);\n\nconst result = find(set, value => value.quantity > 10);\n// Result: { name: 'grape', quantity: 15 }\n```\n\nYou can search based on various criteria.\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\n// Find by value property\nconst users = new Set([\n  { id: 1, name: 'Alice', age: 25 },\n  { id: 2, name: 'Bob', age: 30 },\n  { id: 3, name: 'Charlie', age: 35 },\n]);\n\nconst senior = find(users, user => user.age >= 35);\n// Result: { id: 3, name: 'Charlie', age: 35 }\n\n// Find by string pattern\nconst emails = new Set(['user@example.com', 'admin@example.com', 'info@company.com']);\n\nconst adminEmail = find(emails, email => email.startsWith('admin'));\n// Result: 'admin@example.com'\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to search.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): A predicate function that tests each element.\n\n#### Returns\n\n(`T | undefined`): The first element that satisfies the predicate, or undefined if none found.\n"
  },
  {
    "path": "docs/reference/set/forEach.md",
    "content": "# forEach (for `Set`s)\n\nExecutes a provided function once for each element in a Set.\n\n```typescript\nforEach(set, callback);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `forEach(set, callback)`\n\nUse `forEach` when you want to execute a function for each element in a Set. The callback function receives the value twice (for consistency with Map.forEach) and the Set itself as arguments. This is useful for side effects like logging, updating external state, or performing operations on each element.\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nforEach(set, value => {\n  console.log(value * 2);\n});\n// Output:\n// 2\n// 4\n// 6\n```\n\nYou can perform various operations on each element.\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\n// Accumulate values\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nlet sum = 0;\nforEach(numbers, value => {\n  sum += value;\n});\n// sum is now 15\n\n// Collect elements into an array with transformation\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased: string[] = [];\nforEach(names, value => {\n  uppercased.push(value.toUpperCase());\n});\n// uppercased: ['ALICE', 'BOB', 'CHARLIE']\n\n// Update external Set based on conditions\nconst scores = new Set([85, 92, 78, 95, 88]);\n\nconst highScores = new Set<number>();\nforEach(scores, value => {\n  if (value >= 90) {\n    highScores.add(value);\n  }\n});\n// highScores contains 92 and 95\n\n// Process objects\nconst users = new Set([\n  { id: 1, name: 'Alice', active: true },\n  { id: 2, name: 'Bob', active: false },\n  { id: 3, name: 'Charlie', active: true },\n]);\n\nconst activeUserIds: number[] = [];\nforEach(users, user => {\n  if (user.active) {\n    activeUserIds.push(user.id);\n  }\n});\n// activeUserIds: [1, 3]\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to iterate over.\n- `callback` (`(value: T, value2: T, set: Set<T>) => void`): A function to execute for each element.\n\n#### Returns\n\n(`void`): This function does not return a value.\n"
  },
  {
    "path": "docs/reference/set/keyBy.md",
    "content": "# keyBy (for `Set`s)\n\nMaps each element of a Set based on a provided key-generating function.\n\n```typescript\nconst result = keyBy(set, getKeyFromValue);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `keyBy(set, getKeyFromValue)`\n\nUse `keyBy` when you want to convert a Set into a Map by generating keys from the values. Provide a function that generates a key from each value, and it returns a new Map where the keys are generated by the key function and the values are the corresponding values from the original set. If multiple elements produce the same key, the last value encountered will be used.\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\nconst set = new Set([\n  { type: 'fruit', name: 'apple' },\n  { type: 'fruit', name: 'banana' },\n  { type: 'vegetable', name: 'carrot' },\n]);\n\nconst result = keyBy(set, item => item.type);\n// Result:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// Note: 'banana' is kept because it was the last 'fruit' encountered\n```\n\nYou can create indexes based on various criteria.\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\n// Index by ID\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n]);\n\nconst byId = keyBy(users, user => user.id);\n// Result: Map(3) { 1 => {...}, 2 => {...}, 3 => {...} }\n\n// Index by name\nconst byName = keyBy(users, user => user.name);\n// Result: Map with keys 'Alice', 'Bob', 'Charlie'\n\n// Index by derived value\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nconst byParity = keyBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// Result: Map(2) {\n//   'odd' => 5,\n//   'even' => 4\n// }\n// Note: Last even (4) and last odd (5) values are kept\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The set of elements to be mapped.\n- `getKeyFromValue` (`(value: T, value2: T, set: Set<T>) => K`): A function that generates a key from a value.\n\n#### Returns\n\n(`Map<K, T>`): A Map where the generated keys are mapped to each element's value.\n"
  },
  {
    "path": "docs/reference/set/map.md",
    "content": "# map (for `Set`s)\n\nCreates a new Set with elements transformed by the provided function.\n\n```typescript\nconst transformed = map(set, getNewValue);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `map(set, getNewValue)`\n\nUse `map` when you want to transform the elements of a Set. Provide a function that generates a new value from each element, and it returns a new Set with the transformed elements.\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = map(set, value => value * 2);\n// Result: Set(3) { 2, 4, 6 }\n```\n\nYou can transform elements in various ways.\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\n// Transform strings\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased = map(names, name => name.toUpperCase());\n// Result: Set(3) { 'ALICE', 'BOB', 'CHARLIE' }\n\n// Transform objects\nconst prices = new Set([10, 20, 30]);\n\nconst products = map(prices, price => ({ price, currency: 'USD' }));\n// Result: Set with objects { price: 10, currency: 'USD' }, etc.\n\n// Extract properties\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n]);\n\nconst ids = map(users, user => user.id);\n// Result: Set(2) { 1, 2 }\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to transform.\n- `getNewValue` (`(value: T, value2: T, set: Set<T>) => U`): A function that generates a new value from an element.\n\n#### Returns\n\n(`Set<U>`): A new Set with transformed elements.\n"
  },
  {
    "path": "docs/reference/set/reduce.md",
    "content": "# reduce (for `Set`s)\n\nReduces a Set to a single value by iterating through its elements and applying a callback function.\n\n```typescript\nconst result = reduce(set, callback, initialValue);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `reduce(set, callback, initialValue?)`\n\nUse `reduce` when you want to transform a Set into a single value by accumulating results from each element. Provide a callback function that processes each element and updates the accumulator. If an initial value is provided, it is used as the starting accumulator value. If no initial value is provided and the Set is empty, a TypeError is thrown.\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = reduce(set, (acc, value) => acc + value, 0);\n// Result: 6\n```\n\nYou can reduce a Set in various ways.\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\n// Sum with initial value\nconst numbers = new Set([10, 20, 30, 40]);\n\nconst total = reduce(numbers, (acc, num) => acc + num, 0);\n// Result: 100\n\n// Without initial value (uses first element)\nconst values = new Set([5, 10]);\n\nconst sum = reduce(values, (acc, value) => acc + value);\n// Result: 15 (starts with first value 5)\n\n// Build an array from Set\nconst uniqueNames = new Set(['Alice', 'Bob', 'Charlie']);\n\nconst nameList = reduce(uniqueNames, (acc, name) => [...acc, name.toUpperCase()], [] as string[]);\n// Result: ['ALICE', 'BOB', 'CHARLIE']\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to reduce.\n- `callback` (`(accumulator: A, value: T, value2: T, set: Set<T>) => A`): A function that processes each element and updates the accumulator.\n- `initialValue` (`A`, optional): The initial value for the accumulator. If not provided, the first element in the Set is used.\n\n#### Returns\n\n(`A`): The final accumulated value.\n\n#### Throws\n\n(`TypeError`): If the Set is empty and no initial value is provided.\n"
  },
  {
    "path": "docs/reference/set/some.md",
    "content": "# some (for `Set`s)\n\nTests whether at least one element in a Set satisfies the provided predicate function.\n\n```typescript\nconst anyMatch = some(set, doesMatch);\n```\n\n::: info\n\nThis function is available exclusively from `es-toolkit/set` to avoid potential conflicts with similar functions for other collection types.\n\n:::\n\n## Usage\n\n### `some(set, doesMatch)`\n\nUse `some` when you want to check if at least one element in a Set meets a specific condition. Provide a predicate function that tests each element, and it returns true if the predicate is satisfied for at least one element, and false otherwise.\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = some(set, value => value > 2);\n// Result: true\n\nconst result2 = some(set, value => value > 5);\n// Result: false\n```\n\nYou can test various conditions.\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\n// Check if any value meets criteria\nconst numbers = new Set([1, 3, 5, 7, 9]);\n\nconst hasEven = some(numbers, num => num % 2 === 0);\n// Result: false\n\nconst hasLarge = some(numbers, num => num > 5);\n// Result: true\n\n// Check object properties\nconst users = new Set([\n  { name: 'Alice', admin: false },\n  { name: 'Bob', admin: true },\n  { name: 'Charlie', admin: false },\n]);\n\nconst hasAdmin = some(users, user => user.admin);\n// Result: true\n```\n\n#### Parameters\n\n- `set` (`Set<T>`): The Set to test.\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): A predicate function that tests each element.\n\n#### Returns\n\n(`boolean`): true if at least one element satisfies the predicate, false otherwise.\n"
  },
  {
    "path": "docs/reference/string/camelCase.md",
    "content": "# camelCase\n\nConverts a string to camel case.\n\n```typescript\nconst result = camelCase(str);\n```\n\n## Usage\n\n### `camelCase(str)`\n\nUse `camelCase` when you want to convert a string to camel case. Camel case is a naming convention where the first word is lowercase and the first letter of each subsequent word is capitalized.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// Convert various string formats to camel case\ncamelCase('hello world'); // returns 'helloWorld'\ncamelCase('some-hyphen-text'); // returns 'someHyphenText'\ncamelCase('CONSTANT_CASE'); // returns 'constantCase'\ncamelCase('PascalCase'); // returns 'pascalCase'\ncamelCase('mixed   SpAcE'); // returns 'mixedSpAcE'\n```\n\nIt converts strings with special characters, spaces, hyphens, and other separators into a format suitable for JavaScript variable names or object property names.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// Convert keys from API responses\nconst apiKey = 'user_first_name';\nconst jsKey = camelCase(apiKey); // 'userFirstName'\n\n// Convert HTML attributes to JavaScript properties\nconst cssProperty = 'background-color';\nconst jsProperty = camelCase(cssProperty); // 'backgroundColor'\n```\n\nIt also preserves Unicode characters.\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\ncamelCase('keep unicode 😅'); // returns 'keepUnicode😅'\ncamelCase('한글-테스트'); // returns '한글테스트'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to camel case.\n\n#### Returns\n\n(`string`): Returns a new string converted to camel case.\n"
  },
  {
    "path": "docs/reference/string/capitalize.md",
    "content": "# capitalize\n\nConverts the first character of a string to uppercase and the remaining characters to lowercase.\n\n```typescript\nconst result = capitalize(str);\n```\n\n## Usage\n\n### `capitalize(str)`\n\nUse `capitalize` when you want to make only the first letter uppercase and convert the rest to lowercase. It's useful for normalizing names or titles.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// Basic usage\ncapitalize('hello'); // returns 'Hello'\ncapitalize('WORLD'); // returns 'World'\ncapitalize('javaScript'); // returns 'Javascript'\n```\n\nIt also handles empty strings and single character strings correctly.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\ncapitalize(''); // returns ''\ncapitalize('a'); // returns 'A'\ncapitalize('A'); // returns 'A'\n```\n\nYou can use it to normalize user input or create titles.\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// Normalize user names\nconst userName = 'john DOE';\nconst formattedName = userName.split(' ').map(capitalize).join(' ');\n// returns 'John Doe'\n\n// Create titles\nconst title = capitalize('welcome to our website');\n// returns 'Welcome to our website'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to capitalize the first character.\n\n#### Returns\n\n(`string`): Returns a new string with the first character capitalized and the rest in lowercase.\n"
  },
  {
    "path": "docs/reference/string/constantCase.md",
    "content": "# constantCase\n\nConverts a string to constant case.\n\n```typescript\nconst result = constantCase(str);\n```\n\n## Usage\n\n### `constantCase(str)`\n\nUse `constantCase` when you want to convert a string to constant case. Constant case is a naming convention where all characters are uppercase and words are separated by underscores (`_`).\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// Convert various string formats to constant case\nconstantCase('hello world'); // returns 'HELLO_WORLD'\nconstantCase('camelCase'); // returns 'CAMEL_CASE'\nconstantCase('some-kebab-case'); // returns 'SOME_KEBAB_CASE'\nconstantCase('PascalCase'); // returns 'PASCAL_CASE'\nconstantCase('snake_case'); // returns 'SNAKE_CASE'\n```\n\nIt's a commonly used naming convention when defining constants in JavaScript or other programming languages.\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// Generate environment variable names\nconst configKey = 'api base url';\nconst envVar = constantCase(configKey); // 'API_BASE_URL'\n\n// Generate constant names\nconst settingName = 'maximum retry count';\nconst constantName = constantCase(settingName); // 'MAXIMUM_RETRY_COUNT'\n```\n\nIt also properly handles strings with spaces or special characters.\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\nconstantCase('HTTP Request'); // returns 'HTTP_REQUEST'\nconstantCase('user-agent-string'); // returns 'USER_AGENT_STRING'\nconstantCase('  multiple   spaces  '); // returns 'MULTIPLE_SPACES'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to constant case.\n\n#### Returns\n\n(`string`): Returns a new string converted to constant case.\n"
  },
  {
    "path": "docs/reference/string/deburr.md",
    "content": "# deburr\n\nConverts special characters and diacritics to ASCII characters.\n\n```typescript\nconst result = deburr(str);\n```\n\n## Usage\n\n### `deburr(str)`\n\nUse `deburr` when you want to convert special characters or diacritics in a string to ASCII characters. It's useful for normalizing characters in URLs, filenames, or search functionality.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// Basic usage\ndeburr('café'); // returns 'cafe'\ndeburr('résumé'); // returns 'resume'\ndeburr('naïve'); // returns 'naive'\ndeburr('Zürich'); // returns 'Zurich'\n```\n\nIt can handle special characters from various languages.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// German\ndeburr('München'); // returns 'Munchen'\ndeburr('Björk'); // returns 'Bjork'\n\n// French\ndeburr('Crème brûlée'); // returns 'Creme brulee'\ndeburr('naïveté'); // returns 'naivete'\n\n// Spanish\ndeburr('niño'); // returns 'nino'\ndeburr('mañana'); // returns 'manana'\n```\n\nYou can use it for URL generation or filename cleaning.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// Generate URL slug\nconst title = 'Café의 특별한 메뉴';\nconst slug = deburr(title).toLowerCase().replace(/\\s+/g, '-');\n// returns 'cafe의-특별한-메뉴'\n\n// Clean filename\nconst fileName = 'résumé-김철수.pdf';\nconst cleanName = deburr(fileName); // returns 'resume-김철수.pdf'\n```\n\nIt makes string comparison easier in search functionality.\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\nfunction searchMatch(query: string, target: string): boolean {\n  const normalizedQuery = deburr(query.toLowerCase());\n  const normalizedTarget = deburr(target.toLowerCase());\n  return normalizedTarget.includes(normalizedQuery);\n}\n\nsearchMatch('cafe', 'Café Mocha'); // returns true\nsearchMatch('resume', 'résumé.pdf'); // returns true\n```\n\n#### Parameters\n\n- `str` (`string`): The string containing special characters or diacritics.\n\n#### Returns\n\n(`string`): Returns a new string with special characters and diacritics converted to ASCII characters.\n"
  },
  {
    "path": "docs/reference/string/escape.md",
    "content": "# escape\n\nConverts characters with special meaning in HTML to safe entities.\n\n```typescript\nconst result = escape(str);\n```\n\n## Usage\n\n### `escape(str)`\n\nUse `escape` when you want to safely insert text into HTML. It converts special characters like `&`, `<`, `>`, `\"`, and `'` to HTML entities to prevent XSS attacks and ensure HTML is displayed correctly.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// Handle basic HTML special characters\nescape('<div>Hello World</div>'); // returns '&lt;div&gt;Hello World&lt;/div&gt;'\nescape('Tom & Jerry'); // returns 'Tom &amp; Jerry'\nescape('\"Hello\"'); // returns '&quot;Hello&quot;'\nescape(\"'Hello'\"); // returns '&#39;Hello&#39;'\n```\n\nIt's essential for security when displaying user input in HTML.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// Handle user input\nconst userInput = '<script>alert(\"XSS\")</script>';\nconst safeHtml = `<div>${escape(userInput)}</div>`;\n// returns '<div>&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;</div>'\n\n// Generate dynamic HTML\nconst title = 'Article \"How to & Why\"';\nconst html = `<h1>${escape(title)}</h1>`;\n// returns '<h1>Article &quot;How to &amp; Why&quot;</h1>'\n```\n\nYou can use it in templates or comment systems.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// Comment system\nfunction renderComment(comment: string, author: string) {\n  return `\n    <div class=\"comment\">\n      <strong>${escape(author)}</strong>: ${escape(comment)}\n    </div>\n  `;\n}\n\n// Usage example\nconst html = renderComment('I love <coding> & \"programming\"!', 'John Doe');\n// returns '<div class=\"comment\"><strong>John Doe</strong>: I love &lt;coding&gt; &amp; &quot;programming&quot;!</div>'\n```\n\nIt's also useful when putting JSON strings in HTML attributes.\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\nconst data = { message: 'Hello & \"welcome\"' };\nconst jsonString = JSON.stringify(data);\nconst htmlAttribute = `<div data-info=\"${escape(jsonString)}\"></div>`;\n// returns '<div data-info=\"{&quot;message&quot;:&quot;Hello &amp; \\\\&quot;welcome\\\\&quot;&quot;}\"></div>'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert for safe use in HTML.\n\n#### Returns\n\n(`string`): Returns a new string with characters converted to HTML entities.\n"
  },
  {
    "path": "docs/reference/string/escapeRegExp.md",
    "content": "# escapeRegExp\n\nEscapes characters with special meaning in regular expressions to literal characters.\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## Usage\n\n### `escapeRegExp(str)`\n\nUse `escapeRegExp` when you want to safely use a string in a regular expression pattern. It escapes regex special characters like `^`, `$`, `\\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, and `|` so they match literally.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// Basic usage\nescapeRegExp('Hello.'); // returns 'Hello\\\\.'\nescapeRegExp('(test)'); // returns '\\\\(test\\\\)'\nescapeRegExp('user@domain.com'); // returns 'user@domain\\\\.com'\nescapeRegExp('[abc]'); // returns '\\\\[abc\\\\]'\n```\n\nIt's essential when using user input as a regex pattern.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// Use user search term as regex\nfunction searchInText(text: string, searchTerm: string): boolean {\n  const escapedTerm = escapeRegExp(searchTerm);\n  const regex = new RegExp(escapedTerm, 'i'); // case insensitive\n  return regex.test(text);\n}\n\nsearchInText('Visit https://example.com', 'https://example.com'); // returns true\nsearchInText('Price: $19.99', '$19.99'); // returns true\n```\n\nYou can also use it for string replacement.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\nfunction replaceAll(text: string, search: string, replacement: string): string {\n  const escapedSearch = escapeRegExp(search);\n  const regex = new RegExp(escapedSearch, 'g');\n  return text.replace(regex, replacement);\n}\n\nconst html = '<div>Hello</div> <span>World</span>';\nconst result = replaceAll(html, '<div>', '<section>');\n// returns '<section>Hello</div> <span>World</span>'\n```\n\nIt's useful for handling file paths or URLs.\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// Check file extension\nfunction hasExtension(filename: string, extension: string): boolean {\n  const escapedExt = escapeRegExp(extension);\n  const regex = new RegExp(`\\\\.${escapedExt}$`, 'i');\n  return regex.test(filename);\n}\n\nhasExtension('document.pdf', 'pdf'); // returns true\nhasExtension('image.jpg', 'pdf'); // returns false\n\n// URL matching\nfunction matchesUrl(text: string, url: string): boolean {\n  const escapedUrl = escapeRegExp(url);\n  const regex = new RegExp(escapedUrl);\n  return regex.test(text);\n}\n\nconst content = 'Visit our site at https://es-toolkit.dev/ for more info';\nmatchesUrl(content, 'https://es-toolkit.dev/'); // returns true\n```\n\n#### Parameters\n\n- `str` (`string`): The string to escape regex special characters.\n\n#### Returns\n\n(`string`): Returns a new string with regex special characters escaped.\n"
  },
  {
    "path": "docs/reference/string/kebabCase.md",
    "content": "# kebabCase\n\nConverts a string to kebab case.\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## Usage\n\n### `kebabCase(str)`\n\nUse `kebabCase` when you want to convert a string to kebab case. Kebab case is a naming convention where each word is written in lowercase and connected with dashes (-).\n\n```typescript\nimport { kebabCase } from 'es-toolkit/string';\n\n// Convert camel case to kebab case\nkebabCase('camelCase');\n// Result: 'camel-case'\n\n// Convert a string with whitespace\nkebabCase('some whitespace');\n// Result: 'some-whitespace'\n\n// Keep strings that are already in kebab case as is\nkebabCase('hyphen-text');\n// Result: 'hyphen-text'\n\n// Convert strings with uppercase letters\nkebabCase('HTTPRequest');\n// Result: 'http-request'\n```\n\nThis function is useful when creating API endpoints, CSS class names, HTML attributes, etc.\n\n#### Parameters\n\n- `str` (`string`): The string to convert to kebab case.\n\n#### Returns\n\n(`string`): The string converted to kebab case.\n"
  },
  {
    "path": "docs/reference/string/lowerCase.md",
    "content": "# lowerCase\n\nConverts a string to lower case format.\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## Usage\n\n### `lowerCase(str)`\n\nUse `lowerCase` when you want to convert a string to lower case format. Lower case format is a naming convention where all words are written in lowercase and separated by spaces.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// Convert various string formats to lower case\nlowerCase('Hello World'); // returns 'hello world'\nlowerCase('camelCase'); // returns 'camel case'\nlowerCase('some-kebab-case'); // returns 'some kebab case'\nlowerCase('PascalCase'); // returns 'pascal case'\nlowerCase('SCREAMING_SNAKE_CASE'); // returns 'screaming snake case'\n```\n\nIt's useful when creating user-facing text or titles.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// Generate user interface text\nconst fieldName = 'firstName';\nconst label = lowerCase(fieldName); // 'first name'\n\n// Convert API keys to user-friendly text\nconst apiKeys = ['userEmail', 'phoneNumber', 'birthDate'];\nconst labels = apiKeys.map(key => lowerCase(key));\n// returns ['user email', 'phone number', 'birth date']\n```\n\nIt can also be used when displaying configuration or option names.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// Display settings menu\nconst settings = {\n  enableNotifications: true,\n  darkModeEnabled: false,\n  autoSaveInterval: 300,\n};\n\nfor (const [key, value] of Object.entries(settings)) {\n  const displayName = lowerCase(key);\n  console.log(`${displayName}: ${value}`);\n}\n// Output:\n// enable notifications: true\n// dark mode enabled: false\n// auto save interval: 300\n```\n\nIt properly handles strings with special characters or spaces.\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\nlowerCase('HTTPSConnection'); // returns 'https connection'\nlowerCase('user_profile-settings'); // returns 'user profile settings'\nlowerCase('  mixed   CASE   text  '); // returns 'mixed case text'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to lower case format.\n\n#### Returns\n\n(`string`): Returns a new string converted to lower case format.\n"
  },
  {
    "path": "docs/reference/string/lowerFirst.md",
    "content": "# lowerFirst\n\nConverts the first character of a string to lowercase.\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## Usage\n\n### `lowerFirst(str)`\n\nUse `lowerFirst` when you want to make only the first letter of a string lowercase. The remaining characters are kept as-is. It's useful for creating camelCase variable names or property names.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// Basic usage\nlowerFirst('Hello'); // returns 'hello'\nlowerFirst('WORLD'); // returns 'wORLD'\nlowerFirst('JavaScript'); // returns 'javaScript'\n```\n\nIt correctly handles empty strings and single-character strings.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\nlowerFirst(''); // returns ''\nlowerFirst('A'); // returns 'a'\nlowerFirst('a'); // returns 'a'\n```\n\nYou can use it for camelCase conversion.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// Convert class name to instance variable name\nconst className = 'UserService';\nconst instanceName = lowerFirst(className); // 'userService'\n\n// Convert constant name to camelCase\nconst constantName = 'API_BASE_URL';\nconst camelCase = lowerFirst(constantName.toLowerCase().replace(/_(.)/g, (_, letter) => letter.toUpperCase()));\n// results in 'apiBaseUrl'\n```\n\nIt can also be used for API responses or data transformation.\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// Convert database column names to JavaScript property names\nconst dbColumns = ['UserId', 'FirstName', 'LastName', 'EmailAddress'];\nconst jsProperties = dbColumns.map(column => lowerFirst(column));\n// returns ['userId', 'firstName', 'lastName', 'emailAddress']\n\n// Generate function names\nfunction createGetter(propertyName: string): string {\n  return `get${propertyName}`;\n}\n\nfunction createSetter(propertyName: string): string {\n  return `set${propertyName}`;\n}\n\nconst property = lowerFirst('UserName'); // 'userName'\nconst getter = createGetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'getUserName'\nconst setter = createSetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'setUserName'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert the first character to lowercase.\n\n#### Returns\n\n(`string`): Returns a new string with the first character converted to lowercase.\n"
  },
  {
    "path": "docs/reference/string/pad.md",
    "content": "# pad\n\nPads a string on both sides to reach a specified length.\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## Usage\n\n### `pad(str, length, chars?)`\n\nUse `pad` when you want to pad both sides of a string with characters to match a specified length when the string is shorter than the target length. If the padding cannot be evenly distributed on both sides, the right side will have one more character.\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\n// Padding with default whitespace\npad('abc', 8);\n// => '  abc   '\n\n// Padding with custom characters\npad('abc', 8, '_-');\n// => '_-abc_-_'\n\n// When the string is already longer than or equal to the target length\npad('abc', 3);\n// => 'abc'\n\npad('abcdef', 3);\n// => 'abcdef'\n```\n\nWhen padding characters cannot be evenly distributed to the target length, the right side will be longer.\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\npad('abc', 9, '123');\n// => '123abc123' (left 3 characters, right 3 characters)\n\npad('abc', 10, '123');\n// => '123abc1231' (left 3 characters, right 4 characters)\n```\n\n#### Parameters\n\n- `str` (`string`): The string to pad.\n- `length` (`number`): The target length.\n- `chars` (`string`, optional): The characters to use for padding. Defaults to `' '`.\n\n#### Returns\n\n(`string`): Returns the padded string.\n"
  },
  {
    "path": "docs/reference/string/pascalCase.md",
    "content": "# pascalCase\n\nConverts a string to pascal case.\n\n```typescript\nconst converted = pascalCase(str);\n```\n\n## Usage\n\n### `pascalCase(str)`\n\nUse `pascalCase` when you want to convert a string to pascal case. Pascal case is a naming convention where the first letter of each word is capitalized and words are joined without separators.\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// Basic usage\npascalCase('pascalCase'); // 'PascalCase'\npascalCase('some whitespace'); // 'SomeWhitespace'\n\n// Words connected with hyphens or underscores\npascalCase('hyphen-text'); // 'HyphenText'\npascalCase('snake_case'); // 'SnakeCase'\n\n// Handling consecutive uppercase letters\npascalCase('HTTPRequest'); // 'HttpRequest'\npascalCase('XMLHttpRequest'); // 'XmlHttpRequest'\n```\n\nIt also correctly handles strings with various separators.\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// Mixed separators\npascalCase('camelCase-with_mixed.separators'); // 'CamelCaseWithMixedSeparators'\n\n// With numbers\npascalCase('version2.1.0'); // 'Version210'\n\n// With special characters\npascalCase('user@email.com'); // 'UserEmailCom'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to pascal case.\n\n#### Returns\n\n(`string`): Returns a new string converted to pascal case.\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { pascalCase } from 'es-toolkit/string';\n\nconsole.log(pascalCase('pascalCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/string/reverseString.md",
    "content": "# reverseString\n\nReverses a string.\n\n```typescript\nconst reversed = reverseString(value);\n```\n\n## Usage\n\n### `reverseString(value)`\n\nUse `reverseString` when you want to reverse the order of characters in a string. It correctly handles Unicode characters and emojis.\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// Basic string reversal\nreverseString('hello'); // 'olleh'\nreverseString('world'); // 'dlrow'\n\n// Mixed case strings\nreverseString('PascalCase'); // 'esaClacsaP'\n\n// Strings with spaces\nreverseString('hello world'); // 'dlrow olleh'\n```\n\nIt accurately handles emojis and special characters.\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// Strings with emojis\nreverseString('foo 😄 bar'); // 'rab 😄 oof'\nreverseString('안녕하세요'); // '요세하녕안'\n\n// Numbers and special characters\nreverseString('12345'); // '54321'\nreverseString('a-b-c'); // 'c-b-a'\n```\n\n#### Parameters\n\n- `value` (`string`): The string to reverse.\n\n#### Returns\n\n(`string`): Returns a new string with the characters in reverse order.\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { reverseString } from 'es-toolkit';\n\nconsole.log(reverseString('hello'));\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/string/snakeCase.md",
    "content": "# snakeCase\n\nConverts a string to snake case.\n\n```typescript\nconst converted = snakeCase(str);\n```\n\n## Usage\n\n### `snakeCase(str)`\n\nUse `snakeCase` when you want to convert a string to snake case. Snake case is a naming convention where each word is written in lowercase and words are connected with underscores (\\_).\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// Basic usage\nsnakeCase('camelCase'); // 'camel_case'\nsnakeCase('some whitespace'); // 'some_whitespace'\n\n// Words connected with hyphens or other separators\nsnakeCase('hyphen-text'); // 'hyphen_text'\nsnakeCase('PascalCase'); // 'pascal_case'\n\n// Handling consecutive uppercase letters\nsnakeCase('HTTPRequest'); // 'http_request'\nsnakeCase('XMLHttpRequest'); // 'xml_http_request'\n```\n\nIt also correctly handles strings with various separators.\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// Mixed separators\nsnakeCase('camelCase-with_mixed.separators'); // 'camel_case_with_mixed_separators'\n\n// With numbers\nsnakeCase('version2.1.0'); // 'version_2_1_0'\n\n// With special characters\nsnakeCase('user@email.com'); // 'user_email_com'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to snake case.\n\n#### Returns\n\n(`string`): Returns a new string converted to snake case.\n"
  },
  {
    "path": "docs/reference/string/startCase.md",
    "content": "# startCase\n\nConverts the first letter of each word in a string to uppercase.\n\n```typescript\nconst converted = startCase(str);\n```\n\n## Usage\n\n### `startCase(str)`\n\nUse `startCase` when you want to convert a string to start case (where the first letter of each word is capitalized). It capitalizes the first letter of each word, converts the rest to lowercase, and joins the words with spaces.\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// Basic usage\nstartCase('hello world'); // 'Hello World'\nstartCase('HELLO WORLD'); // 'Hello World'\n\n// Converting camelCase or PascalCase\nstartCase('fooBar'); // 'Foo Bar'\nstartCase('PascalCase'); // 'Pascal Case'\n\n// Words connected with hyphens or underscores\nstartCase('hello-world'); // 'Hello World'\nstartCase('hello_world'); // 'Hello World'\n```\n\nIt also correctly handles strings with various delimiters and special characters.\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// Cases with multiple delimiters\nstartCase('--foo-bar--'); // 'Foo Bar'\nstartCase('__FOO_BAR__'); // 'Foo Bar'\n\n// Handling consecutive uppercase letters and numbers\nstartCase('XMLHttpRequest'); // 'Xml Http Request'\nstartCase('_abc_123_def'); // 'Abc 123 Def'\n\n// Cases with empty strings or only meaningless delimiters\nstartCase('_-_-_-_'); // ''\nstartCase('12abc 12ABC'); // '12 Abc 12 Abc'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to start case.\n\n#### Returns\n\n(`string`): Returns a new string with the first letter of each word capitalized and joined with spaces.\n\n## Demo\n\n::: sandpack\n\n```ts index.ts\nimport { startCase } from 'es-toolkit/string';\n\nconsole.log(startCase('startCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/string/trim.md",
    "content": "# trim\n\nRemoves whitespace or specified characters from the beginning and end of a string.\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## Usage\n\n### `trim(str, chars?)`\n\nUse `trim` when you want to remove unnecessary characters from the start and end of a string. If no specific characters are specified, it removes whitespace characters.\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// Basic whitespace removal\ntrim('  hello  '); // 'hello'\ntrim('\\t\\n  hello  \\r\\n'); // 'hello'\n\n// Removing specific characters\ntrim('--hello--', '-'); // 'hello'\ntrim('***hello***', '*'); // 'hello'\n\n// Removing if any of multiple characters match\ntrim('##hello##world##', ['#', 'd']); // 'hello##worl'\n```\n\nWhen you specify multiple characters as an array, all characters that match any of them are removed.\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// Specifying multiple characters as an array\ntrim('!!@@hello@@!!', ['!', '@']); // 'hello'\n\n// Removing numbers and special characters\ntrim('123abc123', ['1', '2', '3']); // 'abc'\n\n// Removing characters and spaces together\ntrim('  __hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to remove characters from the beginning and end.\n- `chars` (`string | string[]`, optional): The characters to remove. Can use a string or character array. Defaults to whitespace characters.\n\n#### Returns\n\n(`string`): Returns a new string with the specified characters removed from the beginning and end.\n"
  },
  {
    "path": "docs/reference/string/trimEnd.md",
    "content": "# trimEnd\n\nRemoves whitespace or specified characters from the end of a string.\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## Usage\n\n### `trimEnd(str, chars?)`\n\nUse `trimEnd` when you want to remove unnecessary characters from the end of a string. If no specific characters are specified, it removes whitespace characters.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// Basic whitespace removal\ntrimEnd('hello  '); // 'hello'\ntrimEnd('hello\\t\\n  '); // 'hello'\n\n// Removing specific characters\ntrimEnd('hello---', '-'); // 'hello'\ntrimEnd('123000', '0'); // '123'\ntrimEnd('abcabcabc', 'c'); // 'abcabcab'\n```\n\nWhen you specify multiple characters as an array, all characters that match any of them will be removed.\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// Specifying multiple characters as an array\ntrimEnd('hello!!@@', ['!', '@']); // 'hello'\n\n// Removing numbers and special characters\ntrimEnd('abc123', ['1', '2', '3']); // 'abc'\n\n// Removing characters and whitespace together\ntrimEnd('hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### Parameters\n\n- `str` (`string`): The string from which to remove characters from the end.\n- `chars` (`string | string[]`, optional): The characters to remove. Can be a string or an array of characters. Defaults to whitespace characters.\n\n#### Returns\n\n(`string`): Returns a new string with the specified characters removed from the end.\n\n#### Errors\n\nThrows an error if `chars` is a string with a length other than 1.\n"
  },
  {
    "path": "docs/reference/string/trimStart.md",
    "content": "# trimStart\n\nRemoves whitespace or specified characters from the start of a string.\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## Usage\n\n### `trimStart(str, chars?)`\n\nUse `trimStart` when you want to remove unnecessary characters from the beginning of a string. If no specific characters are specified, it removes whitespace characters.\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// Remove default whitespace\ntrimStart('  hello'); // 'hello'\ntrimStart('\\t\\n  hello'); // 'hello'\n\n// Remove specific characters\ntrimStart('---hello', '-'); // 'hello'\ntrimStart('000123', '0'); // '123'\ntrimStart('abcabcabc', 'a'); // 'bcabcabc'\n```\n\nIf you specify multiple characters as an array, all characters matching any of them will be removed.\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// Specify multiple characters as an array\ntrimStart('!!@@hello', ['!', '@']); // 'hello'\n\n// Remove numbers and special characters\ntrimStart('123abc', ['1', '2', '3']); // 'abc'\n\n// Remove characters and whitespace together\ntrimStart('  __hello', ['_', ' ']); // 'hello'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to remove characters from the start.\n- `chars` (`string | string[]`, optional): The characters to remove. Can be a string or an array of characters. Defaults to whitespace characters.\n\n#### Returns\n\n(`string`): Returns a new string with the specified characters removed from the start.\n"
  },
  {
    "path": "docs/reference/string/unescape.md",
    "content": "# unescape\n\nConverts HTML entity characters to their original characters.\n\n```typescript\nconst result = unescape(str);\n```\n\n## Usage\n\n### `unescape(str)`\n\nUse `unescape` when you want to convert HTML entity characters back to their original characters. It converts HTML entities like `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;` to `&`, `<`, `>`, `\"`, `'` characters. This is the inverse operation of the [`escape`](./escape.md) function.\n\n```typescript\nimport { unescape } from 'es-toolkit/string';\n\n// Convert HTML tag entities to original characters\nunescape('This is a &lt;div&gt; element.');\n// Returns: 'This is a <div> element.'\n\n// Convert quote entities to original characters\nunescape('This is a &quot;quote&quot;');\n// Returns: 'This is a \"quote\"'\n\n// Convert single quote entities to original characters\nunescape('This is a &#39;quote&#39;');\n// Returns: 'This is a 'quote''\n\n// Convert ampersand entities to original characters\nunescape('This is a &amp; symbol');\n// Returns: 'This is a & symbol'\n```\n\nUseful when processing data from HTML forms or URLs:\n\n```typescript\n// Convert HTML entities from user input\nconst userInput = 'My favorite tag is &lt;button&gt;';\nconst converted = unescape(userInput);\nconsole.log(converted); // 'My favorite tag is <button>'\n\n// Can also convert strings with mixed entities\nconst mixed = '&quot;Hello &amp; Welcome&quot; &lt;says the &gt; user';\nconst result = unescape(mixed);\nconsole.log(result); // '\"Hello & Welcome\" <says the > user'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert.\n\n#### Returns\n\n(`string`): Returns a string with HTML entities converted to their original characters.\n"
  },
  {
    "path": "docs/reference/string/upperCase.md",
    "content": "# upperCase\n\nConverts a string to a format where all letters are uppercase and words are separated by spaces.\n\n```typescript\nconst result = upperCase(str);\n```\n\n## Usage\n\n### `upperCase(str)`\n\nUse `upperCase` when you want to convert a string to uppercase notation. It converts each word to uppercase and connects words with spaces. It can handle strings in various notations like camelCase, kebab-case, snake_case, etc.\n\n```typescript\nimport { upperCase } from 'es-toolkit/string';\n\n// Convert camelCase to uppercase notation\nupperCase('camelCase');\n// Returns: 'CAMEL CASE'\n\n// Convert strings that already have spaces\nupperCase('some whitespace');\n// Returns: 'SOME WHITESPACE'\n\n// Convert kebab-case to uppercase notation\nupperCase('hyphen-text');\n// Returns: 'HYPHEN TEXT'\n\n// Handle strings with consecutive uppercase letters\nupperCase('HTTPSRequest');\n// Returns: 'HTTPS REQUEST'\n```\n\nUseful when converting various naming conventions to a unified uppercase format:\n\n```typescript\n// Unify various key names from API responses\nconst apiKeys = ['user_name', 'firstName', 'email-address', 'phoneNumber'];\nconst upperCaseKeys = apiKeys.map(key => upperCase(key));\nconsole.log(upperCaseKeys);\n// ['USER NAME', 'FIRST NAME', 'EMAIL ADDRESS', 'PHONE NUMBER']\n\n// Use when displaying file names\nconst fileName = 'profile_image_thumbnail.jpg';\nconst displayName = upperCase(fileName.replace('.jpg', ''));\nconsole.log(displayName); // 'PROFILE IMAGE THUMBNAIL'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to convert to uppercase notation.\n\n#### Returns\n\n(`string`): Returns a string with each word converted to uppercase and separated by spaces.\n"
  },
  {
    "path": "docs/reference/string/upperFirst.md",
    "content": "# upperFirst\n\nConverts the first character of a string to uppercase.\n\n```typescript\nconst result = upperFirst(str);\n```\n\n## Usage\n\n### `upperFirst(str)`\n\nUse `upperFirst` when you want to capitalize only the first letter of a string while keeping the rest of the letters unchanged. It's useful for capitalizing the beginning of sentences or formatting names.\n\n```typescript\nimport { upperFirst } from 'es-toolkit/string';\n\n// Capitalize the first letter of a lowercase string\nupperFirst('fred');\n// Returns: 'Fred'\n\n// Keep the string as is if first letter is already uppercase\nupperFirst('Fred');\n// Returns: 'Fred'\n\n// Keep the string as is even if all letters are uppercase\nupperFirst('FRED');\n// Returns: 'FRED'\n```\n\nUseful in various situations:\n\n```typescript\n// Format user names\nconst userName = 'john';\nconst displayName = upperFirst(userName);\nconsole.log(displayName); // 'John'\n\n// Capitalize the first letter of a sentence\nconst sentence = 'hello world';\nconst capitalizedSentence = upperFirst(sentence);\nconsole.log(capitalizedSentence); // 'Hello world'\n\n// Process multiple names\nconst names = ['alice', 'bob', 'charlie'];\nconst capitalizedNames = names.map(name => upperFirst(name));\nconsole.log(capitalizedNames); // ['Alice', 'Bob', 'Charlie']\n\n// Convert camelCase to PascalCase\nconst camelCase = 'firstName';\nconst pascalCase = upperFirst(camelCase);\nconsole.log(pascalCase); // 'FirstName'\n```\n\n#### Parameters\n\n- `str` (`string`): The string to capitalize the first letter of.\n\n#### Returns\n\n(`string`): Returns a string with the first letter converted to uppercase.\n"
  },
  {
    "path": "docs/reference/string/words.md",
    "content": "# words\n\nSplits a string into an array of words.\n\n```typescript\nconst result = words(str);\n```\n\n## Usage\n\n### `words(str)`\n\nUse `words` when you want to split a string into individual words. It splits words based on camelCase, kebab-case, spaces, punctuation, and correctly recognizes emojis and Unicode characters. It's useful when processing strings with various naming conventions.\n\n```typescript\nimport { words } from 'es-toolkit/string';\n\n// Split strings separated by punctuation and spaces into words\nwords('fred, barney, & pebbles');\n// Returns: ['fred', 'barney', 'pebbles']\n\n// Correctly split camelCase and consecutive uppercase letters\nwords('camelCaseHTTPRequest🚀');\n// Returns: ['camel', 'Case', 'HTTP', 'Request', '🚀']\n\n// Handle Unicode characters and numbers\nwords('Lunedì 18 Set');\n// Returns: ['Lunedì', '18', 'Set']\n```\n\nUseful for splitting strings into words in various situations:\n\n```typescript\n// Split variable names into words to convert to different naming conventions\nconst variableName = 'getUserProfile';\nconst wordList = words(variableName);\nconsole.log(wordList); // ['get', 'User', 'Profile']\n\n// Split snake_case into words\nconst snakeCase = 'user_profile_data';\nconst snakeWords = words(snakeCase);\nconsole.log(snakeWords); // ['user', 'profile', 'data']\n\n// Split kebab-case into words\nconst kebabCase = 'user-profile-data';\nconst kebabWords = words(kebabCase);\nconsole.log(kebabWords); // ['user', 'profile', 'data']\n\n// Handle complex strings\nconst complex = 'XMLHttpRequest2.0_parser-v1.2';\nconst complexWords = words(complex);\nconsole.log(complexWords); // ['XML', 'Http', 'Request', '2', '0', 'parser', 'v', '1', '2']\n```\n\n#### Parameters\n\n- `str` (`string`): The string to split into words.\n\n#### Returns\n\n(`string[]`): Returns an array of words split from the string.\n"
  },
  {
    "path": "docs/reference/util/assert.md",
    "content": "# assert\n\nAsserts that a given condition is true. If the condition is false, it throws an error.\n\n```typescript\nassert(condition, message);\n```\n\n::: info Relationship with `invariant`\n\n`assert` has exactly the same functionality as the `invariant` function. The only difference is the name. For more details, see the [`invariant`](./invariant.md) documentation.\n\n:::\n\n## Usage\n\n### `assert(condition, message)`\n\nUse `assert` when a specific condition must be satisfied in your code. If the condition is false, it immediately throws an error and stops program execution.\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// If the condition is true, nothing happens\nassert(true, 'This message will not appear');\n\n// If the condition is false, it throws an error\nassert(false, 'This condition is false'); // Error: This condition is false\n\n// When checking that a value is not null or undefined\nconst value = getValue();\nassert(value !== null && value !== undefined, 'Value must not be null or undefined');\n// Now you can be sure that value is neither null nor undefined\n\n// When checking if a number is positive\nconst number = getNumber();\nassert(number > 0, 'Number must be positive');\n```\n\nYou can also pass an error object directly.\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// Passing an Error object\nassert(false, new Error('Custom error message'));\n\n// Using a custom error class\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\nassert(false, new ValidationError('Validation failed'));\n```\n\nIt's especially useful for verifying code assumptions during development or checking that function inputs are within expected ranges.\n\n#### Parameters\n\n- `condition` (`unknown`): The condition to evaluate. If it evaluates to a falsy value, an error is thrown.\n- `message` (`string | Error`): The error message or error object to throw when the condition is false.\n\n#### Returns\n\n(`void`): Returns nothing if the condition is true.\n\n#### Throws\n\nThrows the provided message or error object if the condition evaluates to false.\n"
  },
  {
    "path": "docs/reference/util/attempt.md",
    "content": "# attempt\n\nExecutes a function and returns the result or error as a tuple.\n\n```typescript\nconst [error, result] = attempt(func);\n```\n\n## Usage\n\n### `attempt(func)`\n\nUse `attempt` when you want to safely execute a function. It allows you to handle errors without wrapping code in try-catch blocks.\n\n```typescript\nimport { attempt } from 'es-toolkit/util';\n\n// Success case\nconst [error, result] = attempt(() => 42);\n// error is null, result is 42\n\n// Error case\nconst [error, result] = attempt(() => {\n  throw new Error('Something went wrong');\n});\n// error is an Error object, result is null\n\n// You can also specify types\nconst [error, names] = attempt<string[], Error>(() => ['Alice', 'Bob']);\n// names is inferred as string[] type\n```\n\n::: warning Do not use with async functions\n\nThis function is not suitable for async functions (functions that return a `Promise`). If you pass an async function, it will return `[null, Promise<T>]`, but it won't catch the error even if the Promise is rejected later.\n\nFor async functions, use the [`attemptAsync`](./attemptAsync.md) function instead.\n\n```typescript\n// Incorrect usage\nconst [error, promise] = attempt(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n\n// Correct usage\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n```\n\n:::\n\n#### Parameters\n\n- `func` (`() => T`): The function to execute.\n\n#### Returns\n\n(`[null, T] | [E, null]`): Returns `[null, result]` tuple on success, or `[error, null]` tuple on error.\n"
  },
  {
    "path": "docs/reference/util/attemptAsync.md",
    "content": "# attemptAsync\n\nExecutes an async function and returns the result or error as a tuple.\n\n```typescript\nconst [error, result] = await attemptAsync(func);\n```\n\n## Usage\n\n### `attemptAsync(func)`\n\nUse `attemptAsync` when you want to safely execute an async function. You can handle errors without wrapping async/await blocks in try-catch.\n\n```typescript\nimport { attemptAsync } from 'es-toolkit/util';\n\n// When API request succeeds\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n// error is null, data contains response data\n\n// When network error occurs\nconst [error, data] = await attemptAsync(async () => {\n  throw new Error('Network error');\n});\n// error is Error object, data is null\n\n// You can also specify types\ninterface User {\n  id: number;\n  name: string;\n}\n\nconst [error, users] = await attemptAsync<User[]>(async () => {\n  const response = await fetch('https://api.example.com/users');\n  return response.json();\n});\n// users is inferred as User[] type\n```\n\nIt's especially useful when you need error handling in async operations like database queries or file reading.\n\n```typescript\n// File reading example\nconst [error, content] = await attemptAsync(async () => {\n  const fs = await import('fs/promises');\n  return fs.readFile('config.json', 'utf8');\n});\n\nif (error) {\n  console.log('Cannot read file:', error.message);\n} else {\n  console.log('File content:', content);\n}\n```\n\n::: info Use attempt for synchronous functions\n\nThis function is suitable for handling async functions (functions that return `Promise`). If you want to handle synchronous functions, we recommend using the [`attempt`](./attempt.md) function instead.\n\n:::\n\n#### Parameters\n\n- `func` (`() => Promise<T>`): The async function to execute.\n\n#### Returns\n\n(`Promise<[null, T] | [E, null]>`): Returns a Promise that resolves to `[null, result]` on success, or `[error, null]` if an error occurs.\n"
  },
  {
    "path": "docs/reference/util/invariant.md",
    "content": "# invariant\n\nAsserts that a given condition is true. If the condition is false, it throws an error.\n\n```typescript\ninvariant(condition, message);\n```\n\n## Usage\n\n### `invariant(condition, message)`\n\nUse `invariant` when a specific condition must be satisfied in your code. If the condition is false, it immediately throws an error to stop program execution.\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// If the condition is true, nothing happens\ninvariant(true, 'This message will not appear');\n\n// If the condition is false, it throws an error\ninvariant(false, 'This condition is false'); // Error: This condition is false\n\n// When checking that a value is not null or undefined\nconst value = getValue();\ninvariant(value !== null && value !== undefined, 'Value must not be null or undefined');\n// Now you can be sure that value is neither null nor undefined\n\n// When checking if a number is positive\nconst number = getNumber();\ninvariant(number > 0, 'Number must be positive');\n```\n\nYou can also pass an error object directly.\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// Passing an Error object\ninvariant(false, new Error('Custom error message'));\n\n// Using a custom error class\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\ninvariant(false, new ValidationError('Validation failed'));\n```\n\nIt is particularly useful for validating code assumptions during development or ensuring that function inputs are within expected ranges.\n\n#### Parameters\n\n- `condition` (`unknown`): The condition to evaluate. If it evaluates to a falsy value, an error is thrown.\n- `message` (`string | Error`): The error message or error object to throw when the condition is false.\n\n#### Returns\n\n(`void`): Returns nothing if the condition is true.\n\n#### Errors\n\nThrows the provided message or error object if the condition evaluates to false.\n"
  },
  {
    "path": "docs/usage.md",
    "content": "---\ndescription: How to use es-toolkit\nprev:\n  text: Introduction to es-toolkit\n  link: ./intro.md\nnext:\n  text: Impact on Bundle Size\n  link: ./bundle-size\n---\n\n# Installation & Usage\n\nes-toolkit is available via [npm](https://npmjs.com/package/es-toolkit) for Node.js and Bun, and through [JSR](https://jsr.io/@es-toolkit/es-toolkit) for Deno.\n\nYou can also use es-toolkit in browsers by [importing them in CDNs](#browsers).\n\n## Node.js\n\nes-toolkit supports Node.js 18 or later. Install es-toolkit with the following command:\n\n::: code-group\n\n```sh [npm]\nnpm install es-toolkit\n```\n\n```sh [pnpm]\npnpm add es-toolkit\n```\n\n```sh [yarn]\nyarn add es-toolkit\n```\n\n:::\n\nTo use a function from es-toolkit, simply import it and use as shown below.\n\n```typescript\nimport { sum } from 'es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Deno\n\nes-toolkit is also available via [JSR](https://jsr.io/@es-toolkit/es-toolkit) for Deno. To install es-toolkit, use the following command:\n\n```sh\ndeno add jsr:@es-toolkit/es-toolkit\n```\n\nNote that the package name includes an additional scope, distinct from npm, as per JSR restrictions.\n\n```typescript\nimport { sum } from '@es-toolkit/es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Bun\n\nes-toolkit is also available on Bun. You can install it via the following command:\n\n```sh\nbun add es-toolkit\n```\n\n## Browsers\n\nYou can find es-toolkit on CDNs such as [jsdelivr](https://www.jsdelivr.com), [unpkg](https://unpkg.com). We define `_` to include all functions, similar to Lodash.\n\n::: code-group\n\n```html [jsdelivr]\n<script src=\"https://cdn.jsdelivr.net/npm/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n```html [unpkg]\n<script src=\"https://unpkg.com/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n\nes-toolkit is also available on [esm.sh](https://esm.sh) for modern browsers.\n\n::: code-group\n\n```html [esm.sh]\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"es-toolkit\": \"https://esm.sh/es-toolkit@%5E1\"\n    }\n  }\n</script>\n<script type=\"module\">\n  import { chunk } from 'es-toolkit';\n\n  chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n"
  },
  {
    "path": "docs/vercel.json",
    "content": "{\n  \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n  \"git\": {\n    \"deploymentEnabled\": {\n      \"main\": false\n    }\n  }\n}\n"
  },
  {
    "path": "docs/zh_hans/bundle-size.md",
    "content": "---\ndescription: es-toolkit提供的最小包体积\n---\n\n# 包体积\n\n<BundleSizeChart />\n\n通过其现代化的实现，es-toolkit显著减少了其包体积，与 [lodash](https://lodash.com) 等其他库相比，可以减少高达97%。\n\n这使得es-toolkit在包体积方面成为最高效的选择，其中一些实用函数的体积甚至少于100字节。\n\n## 包体积比较\n\n<BundleSizeTable />\n\n## 包体积测试方法\n\n我们的包体积是使用 [esbuild 0.23.0](https://esbuild.github.io) 测量的，通过分析如下代码的大小：\n\n```tsx\nimport { chunk } from 'es-toolkit';\n\n// 或 import { chunk } from 'lodash-es';\n\nconsole.log(chunk);\n```\n\n有关详细信息，请参见我们的[包体积基准代码](https://github.com/toss/es-toolkit/tree/main/benchmarks/bundle-size)。\n"
  },
  {
    "path": "docs/zh_hans/compatibility.md",
    "content": "# 与 Lodash 兼容性\n\n::: tip ✅ 从1.39.3版本开始，我们确保与Lodash 100%兼容\n\n`es-toolkit/compat`在所有Lodash函数上表现相同，同时更轻更快。\n\n- 确保与Lodash的实际测试代码行为一致。\n- 被Storybook、Recharts、CKEditor等知名开源库使用，并受到Nuxt的推荐。\n\n所有兼容性函数的详细文档可以在[兼容性参考](/zh_hans/reference/compat/array/castArray)中查看。\n\n:::\n\n```tsx\n// es-toolkit/compat 的目标是提供与 lodash 百分之百的功能兼容性\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3, 4], 0);\n// 返回 [], 与 lodash 完全相同\n```\n\n为了最大限度地兼容 `lodash`，请使用 `es-toolkit/compat`，这是一个弥合这两个库之间差距的兼容性层。\n\n该模块旨在提供与 `lodash` 相同的 API，使得在这两个库之间能够更加容易地进行切换。\n\n`es-toolkit/compat` 已经对 `lodash` 的实际测试用例进行了全面测试。\n\n需要注意的是，与原始 `es-toolkit` 相比，`es-toolkit/compat` 可能会对性能产生轻微影响，并且包大小可能会更大。该模块旨在促进平滑过渡，一旦迁移完成，应替换回原始的 `es-toolkit` 以获得最佳性能。\n\n## 设计原则\n\n::: info\n设计原则可能会发生变化。\n:::\n\n我们的兼容层旨在实现以下功能百分之百的特性一致性：\n\n- 作为 lodash 测试用例编写的功能。\n- 可以从 `@types/lodash` 或 `@types/lodash-es` 的类型推断出的功能。\n- 在从 `lodash` 迁移到 `es-toolkit` 的过程中发现的功能差异（请在[问题页面](https://github.com/toss/es-toolkit/issues)报告。）\n\n然而，以下内容不在 `es-toolkit/compat` 的范围之内：\n\n- 隐式类型转换，例如将空字符串转换为零或假。\n- 对特定类型数组有专门实现的函数，比如 [sortedUniq](https://lodash.com/docs/4.17.15#sortedUniq)。\n- 处理内部对象原型（例如 `Array.prototype`）被修改的情况。\n- 处理涉及 JavaScript 领域(Realms)的情况。\n- 通过 \"Seq\" 方法支持方法链。\n\n## 实现状态\n\n::: info\n以下表情符号表示每个功能的状态：\n\n- ✅: 已完成（该功能已完全实现，并通过了所有lodash测试代码。）\n- 📝: 审查中（该功能已实现，但尚未使用lodash测试代码进行测试。）\n- ❌: 未实现（该功能尚未实现。）\n\n即使某个功能标记为“审查中”，它也可能已经在审查中，以确保其与lodash完全一致，并且可能已经提供了相同的功能。\n:::\n\n<CompatibilityStatus lang=\"zh_hans\"/>\n"
  },
  {
    "path": "docs/zh_hans/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'es-toolkit'\n  text: '最先进的JavaScript工具库'\n  image:\n    loading: eager\n    fetchpriority: high\n    decoding: async\n    src: /hero.webp\n    alt:\n  actions:\n    - theme: brand\n      text: 关于 es-toolkit\n      link: /zh_hans/intro\n    - theme: alt\n      text: 参考文档\n      link: /zh_hans/reference/array/at\n    - theme: alt\n      text: 使用指南\n      link: /zh_hans/usage\n\nfeatures:\n  - title: 最佳性能\n    details: es-toolkit在现代JavaScript运行时中的性能比其他库提高了2-3倍。\n  - title: 小型包体积\n    details: 与其他替代库相比，es-toolkit的JavaScript代码体积最多减少了97%。\n  - title: 简单替代Lodash\n    details: es-toolkit提供了一个完整的兼容层，可以轻松替代Lodash。\n    link: /zh_hans/compatibility\n  - title: 现代化实现\n    details: es-toolkit充分利用现代JavaScript API进行简单且无错误的实现。\n  - title: 强大的类型支持\n    details: es-toolkit为所有函数提供简单而强大的类型支持。\n  - title: 经过实战验证\n    details: es-toolkit具有100%的测试覆盖率，确保最大的健壮性。\n  - title: 广泛采用\n    details: es-toolkit被多个流行的开源项目所信任和使用，例如Storybook、Recharts、ink、MUI和CKEditor。\n  - title: 全面的运行时支持\n    details: es-toolkit支持包括Node.js、Deno、Bun和浏览器在内的所有JavaScript环境。\n---\n"
  },
  {
    "path": "docs/zh_hans/intro.md",
    "content": "# 关于 es-toolkit\n\nes-toolkit 是一个现代的 JavaScript 实用库，提供了一系列强大的函数供日常使用。\n\n与 lodash 等替代品相比，es-toolkit 提供了 [显著更小的包体积](./bundle-size.md)（最多减少97%）和 [2-3倍更快的运行时性能](./performance.md)。这是通过利用最新的 JavaScript 特性实现的。\n\nes-toolkit 内置 TypeScript 类型，并经过严格测试，确保了100%的测试覆盖率，以保证最大的可靠性。\n\n## 功能特点\n\n以下是 es-toolkit 提供的一些功能特点：\n\n- **Array**: 数组操作工具，如 [uniq](./reference/array/uniq.md) 和 [difference](./reference/array/difference.md)。\n- **Function**: 控制函数执行的工具，包括 [debounce](./reference/function/debounce.md) 和 [throttle](./reference/function/throttle.md)。\n- **Math**: 数值操作工具，如 [sum](./reference/math/sum.md) 和 [round](./reference/math/round.md)。\n- **Object**: 操作 JavaScript 对象的工具，如 [pick](./reference/object/pick.md) 和 [omit](./reference/object/omit.md)。\n- **Predicate**: 类型保护函数，如 [isNotNil](./reference/predicate/isNotNil.md)。\n- **Promise**: 异步操作工具，如 [delay](./reference/promise/delay.md)。\n- **String**: 字符串操作工具，如 [snakeCase](./reference/string/snakeCase.md)。\n\n## 链接\n\n请参考以下链接获取有关该项目的更多信息。\n\n- [GitHub](https://github.com/toss/es-toolkit)\n"
  },
  {
    "path": "docs/zh_hans/llms-txt.md",
    "content": "# AI 集成\n\nes-toolkit 致力于帮助 AI 代理充分利用我们的库。我们正在积极开发各种功能，让 AI 工具能够更轻松地理解、引用和使用 es-toolkit。\n\n## llms.txt\n\n作为第一步，es-toolkit 提供了 [llms.txt](https://llmstxt.org/) 文件。llms.txt 是一种帮助 AI 助手和大语言模型（LLM）更有效地理解项目文档的标准。\n\n### `/llms.txt`\n\nes-toolkit 文档的结构化目录，包含各个页面的链接。当 AI 工具需要查找特定函数或主题时非常有用。\n\n- **URL**: [https://es-toolkit.dev/llms.txt](https://es-toolkit.dev/llms.txt)\n\n### `/llms-full.txt`\n\n将所有文档页面的完整内容合并为一个文件。当您想要为 AI 工具提供关于 es-toolkit 的全面上下文时非常有用。\n\n- **URL**: [https://es-toolkit.dev/llms-full.txt](https://es-toolkit.dev/llms-full.txt)\n\n### 在 AI 工具中使用\n\n许多 AI 工具和基于 LLM 的应用程序支持 llms.txt 标准。您可以使用这些端点为 AI 助手提供关于 es-toolkit API 和功能的完整上下文。\n\n例如，您可以向 AI 编程助手提供 URL，以便它在帮助您编写代码时参考 es-toolkit 的文档：\n\n```\n请使用 es-toolkit 作为工具函数库。文档：https://es-toolkit.dev/llms-full.txt\n```\n"
  },
  {
    "path": "docs/zh_hans/performance.md",
    "content": "---\ndescription: es-toolkit与替代库之间的性能差异\n---\n\n# 性能\n\n![图表显示es-toolkit与lodash之间性能差异。使用es-toolkit可获得高达11倍的性能提升。](/assets/performance.png)\n\nes-toolkit 设计时考虑了性能，与类似 lodash 的替代库相比，平均性能提升了2倍。通过充分利用现代 JavaScript API，部分函数甚至可以获得高达11倍的性能提升。\n\n## 性能比较\n\n|                                                           | es-toolkit@0.0.1 | lodash-es@4.17.21 | Difference |\n| --------------------------------------------------------- | ---------------- | ----------------- | ---------- |\n| [omit](./reference/object/omit.md)                        | 4,767,360 times  | 403,624 times     | 11.8×      |\n| [pick](./reference/object/pick.md)                        | 9,121,839 times  | 2,663,072 times   | 3.43×      |\n| [differenceWith](./reference/array/differenceWith.md)     | 9,291,897 times  | 4,275,222 times   | 2.17×      |\n| [difference](./reference/array/difference.md)             | 10,436,101 times | 5,155,631 times   | 2.02×      |\n| [intersectionWith](./reference/array/intersectionWith.md) | 8,074,722 times  | 3,814,479 times   | 2.12×      |\n| [intersection](./reference/array/intersection.md)         | 9,999,571 times  | 4,630,316 times   | 2.15×      |\n| [unionBy](./reference/array/unionBy.md)                   | 6,435,983 times  | 3,794,899 times   | 1.69×      |\n| [union](./reference/array/union.md)                       | 5,059,209 times  | 4,771,400 times   | 1.06×      |\n| [dropRightWhile](./reference/array/dropRightWhile.md)     | 7,529,559 times  | 5,606,439 times   | 1.34×      |\n| [groupBy](./reference/array/groupBy.md)                   | 5,000,235 times  | 5,206,286 times   | 0.96×      |\n\n在 MacBook Pro 14-inch (M1 Max, 2021) 上进行了测试。请参考我们的 [基准测试代码](https://github.com/toss/es-toolkit/tree/main/benchmarks)。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/at.md",
    "content": "# at\n\n从数组中获取指定索引处的元素并返回一个新数组。\n\n```typescript\nconst result = at(arr, indices);\n```\n\n## 用法\n\n### `at(arr, indices)`\n\n当您想从数组中选择特定位置的元素时,请使用 `at`。您可以使用负索引从数组末尾选择元素。\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\n// 从数字数组中获取多个索引处的元素。\nat([10, 20, 30, 40, 50], [1, 3, 4]);\n// 返回: [20, 40, 50]\n\n// 使用负索引从末尾获取元素。\nat(['a', 'b', 'c', 'd'], [0, -1, -2]);\n// 返回: ['a', 'd', 'c']\n```\n\n非整数索引会被转换为整数。\n\n```typescript\nimport { at } from 'es-toolkit/array';\n\nat([1, 2, 3, 4], [1.5, 2.9]); // [2, 3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要获取元素的数组。\n- `indices` (`number[]`): 要获取的元素的索引数组。负值从数组末尾开始计算。\n\n#### 返回值\n\n(`T[]`): 包含指定索引处元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/chunk.md",
    "content": "# chunk\n\n将数组拆分为指定大小的较小数组。\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## 用法\n\n### `chunk(arr, size)`\n\n当您想将一个长数组拆分成多个大小相同的较小数组时,请使用 `chunk`。如果数组无法平均分割,最后一个块将包含剩余的元素。\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\n// 将数字数组拆分为大小为 2 的块。\nchunk([1, 2, 3, 4, 5], 2);\n// 返回: [[1, 2], [3, 4], [5]]\n\n// 将字符串数组拆分为大小为 3 的块。\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// 返回: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n```\n\n拆分空数组会返回空数组。\n\n```typescript\nimport { chunk } from 'es-toolkit/array';\n\nchunk([], 2); // []\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要拆分的数组。\n- `size` (`number`): 每个块的大小。必须是正整数。\n\n#### 返回值\n\n(`T[][]`): 被拆分成大小为 `size` 的块的二维数组。\n\n#### 抛出错误\n\n如果 `size` 不是正整数,则抛出错误。\n\n## 试一试\n\n::: sandpack\n\n```ts index.ts\nimport { chunk } from 'es-toolkit/array';\n\nconsole.log(chunk([1, 2, 3, 4, 5], 2));\n```\n\n:::\n\n## Lodash 兼容性\n\n从 `es-toolkit/compat` 导入 `chunk` 时,它与 lodash 兼容。\n\n- 如果 `size` 小于 1,则返回空数组。\n- 即使为 `size` 提供了带小数的数字,也会向下舍入为整数。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0); // 返回 []\n```\n\n## 性能对比\n\n|                   | [Bundle Size](../../bundle-size.md) | [Runtime Performance](../../performance.md) |\n| ----------------- | ----------------------------------- | ------------------------------------------- |\n| es-toolkit        | 238 字节 (小 92.4%)                 | 9,338,821 次 (慢 11%)                       |\n| es-toolkit/compat | 307 字节 (小 90.2%)                 | 9,892,157 次 (慢 5%)                        |\n| lodash-es         | 3,153 字节                          | 10,523,270 次                               |\n"
  },
  {
    "path": "docs/zh_hans/reference/array/compact.md",
    "content": "# compact\n\n返回一个移除了假值的新数组。\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 参考\n\n### `compact(arr)`\n\n当您想从数组中移除假值（`false`、`null`、`0`、`-0`、`0n`、`''`、`undefined`、`NaN`）时,请使用 `compact`。返回一个只包含真值的新数组。\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\n// 移除各种假值。\ncompact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n// 返回: [1, 2, 3, 4, 5]\n\n// 从字符串数组中移除空字符串。\ncompact(['hello', '', 'world', '', '!']);\n// 返回: ['hello', 'world', '!']\n```\n\n类型系统会自动排除假值类型。\n\n```typescript\nimport { compact } from 'es-toolkit/array';\n\nconst mixed: (string | number | false | null)[] = ['text', 0, false, null, 5];\nconst result = compact(mixed);\n// result 的类型是 (string | number)[]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除假值的数组。\n\n#### 返回值\n\n(`Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>`): 移除了假值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/countBy.md",
    "content": "# countBy\n\n根据转换函数的结果对数组元素进行分类,并返回一个统计各分类数量的对象。\n\n```typescript\nconst counted = countBy(arr, mapper);\n```\n\n## 用法\n\n### `countBy(arr, mapper)`\n\n当您想按特定标准对数组元素进行分类并统计每组数量时,请使用 `countBy`。使用转换函数返回的值作为键对元素进行分组,并计算每组中的元素数量。\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\n// 将数字分类为奇数/偶数并统计数量。\ncountBy([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));\n// 返回: { odd: 3, even: 2 }\n```\n\n也可以根据对象数组的特定属性进行统计。\n\n```typescript\nimport { countBy } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 25 },\n  { name: 'David', age: 30 },\n];\n\ncountBy(users, user => user.age);\n// 返回: { '25': 2, '30': 2 }\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要统计元素数量的数组。\n- `mapper` (`(item: T, index: number, array: T[]) => K`): 返回用于分类元素的值的函数,会传入每个元素、索引和数组。\n\n#### 返回值\n\n(`Record<K, number>`): 表示每个分类标准下有多少个元素的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/difference.md",
    "content": "# difference\n\n返回一个新数组,包含第一个数组中排除第二个数组元素后的结果。\n\n```typescript\nconst result = difference(firstArr, secondArr);\n```\n\n## 用法\n\n### `difference(firstArr, secondArr)`\n\n当您想求两个数组的差集时,请使用 `difference`。返回一个新数组,包含只在第一个数组中存在而第二个数组中不存在的元素。\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\n// 求数字数组的差集。\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\ndifference(array1, array2);\n// 返回: [1, 3, 5]\n// 2 和 4 在两个数组中都存在,所以被排除。\n\n// 求字符串数组的差集。\nconst colors1 = ['red', 'blue', 'green'];\nconst colors2 = ['blue', 'yellow'];\ndifference(colors1, colors2);\n// 返回: ['red', 'green']\n```\n\n与空数组的差集等于原数组。\n\n```typescript\nimport { difference } from 'es-toolkit/array';\n\ndifference([1, 2, 3], []); // [1, 2, 3]\ndifference([], [1, 2, 3]); // []\n```\n\n#### 参数\n\n- `firstArr` (`T[]`): 作为差集基准的数组。\n- `secondArr` (`T[]`): 包含要从第一个数组中排除的元素的数组。\n\n#### 返回值\n\n(`T[]`): 包含只在第一个数组中存在而第二个数组中不存在的元素的新数组。\n\n## 性能对比\n\n|            | [Bundle Size](../../bundle-size.md) | [Performance](../../performance.md) |\n| ---------- | ----------------------------------- | ----------------------------------- |\n| es-toolkit | 90 字节 (小 92.4%)                  | 9,317,227 次 (快 85%)               |\n| lodash-es  | 7,958 字节                          | 5,030,861 次                        |\n"
  },
  {
    "path": "docs/zh_hans/reference/array/differenceBy.md",
    "content": "# differenceBy\n\n将两个数组的元素通过转换函数转换后求差集,返回一个新数组。\n\n```typescript\nconst result = differenceBy(firstArr, secondArr, mapper);\n```\n\n## 用法\n\n### `differenceBy(firstArr, secondArr, mapper)`\n\n当您想根据特定标准比较两个数组的元素并求差集时,请使用 `differenceBy`。根据转换函数转换每个元素后的值进行比较,返回只在第一个数组中存在的元素。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\n// 根据 id 对对象数组求差集。\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\ndifferenceBy(array1, array2, item => item.id);\n// 返回: [{ id: 1 }, { id: 3 }]\n// id 为 2 的元素在两个数组中都存在,所以被排除。\n\n// 也可以比较不同类型的数组。\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\ndifferenceBy(objects, numbers, item => (typeof item === 'object' ? item.id : item));\n// 返回: [{ id: 1 }, { id: 3 }]\n```\n\n也可以根据字符串长度求差集。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/array';\n\nconst words1 = ['apple', 'banana', 'cherry'];\nconst words2 = ['grape', 'lemon'];\ndifferenceBy(words1, words2, word => word.length);\n// 返回: ['banana', 'cherry']\n// 'apple' 与 'grape' 或 'lemon' 长度相同,所以被排除。\n```\n\n#### 参数\n\n- `firstArr` (`T[]`): 作为差集基准的数组。\n- `secondArr` (`U[]`): 包含要从第一个数组中排除的元素的数组。\n- `mapper` (`(value: T | U) => unknown`): 映射两个数组元素的函数。根据此函数返回的值比较元素。\n\n#### 返回值\n\n(`T[]`): 根据转换后的值,包含只在第一个数组中存在的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/differenceWith.md",
    "content": "# differenceWith\n\n使用自定义比较函数求两个数组的差集,返回一个新数组。\n\n```typescript\nconst result = differenceWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 用法\n\n### `differenceWith(firstArr, secondArr, areItemsEqual)`\n\n当您想使用自定义函数比较两个数组的元素并求差集时,请使用 `differenceWith`。通过比较函数判断两个元素是否相同,返回只在第一个数组中存在的元素。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\n// 根据 id 对对象数组求差集\nconst array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst array2 = [{ id: 2 }, { id: 4 }];\nconst areItemsEqual = (a, b) => a.id === b.id;\ndifferenceWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1 }, { id: 3 }]\n// id 为 2 的元素被判断为相同,所以被排除\n\n// 也可以比较不同类型的数组\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst numbers = [2, 4];\nconst areItemsEqual2 = (a, b) => a.id === b;\ndifferenceWith(objects, numbers, areItemsEqual2);\n// Returns: [{ id: 1 }, { id: 3 }]\n```\n\n可以使用复杂条件比较元素。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/array';\n\nconst users1 = [\n  { name: 'Alice', age: 30 },\n  { name: 'Bob', age: 25 },\n  { name: 'Charlie', age: 35 },\n];\nconst users2 = [\n  { name: 'Alice', age: 31 }, // 即使年龄不同,名字相同就是同一个用户\n  { name: 'David', age: 25 },\n];\n\nconst areUsersEqual = (a, b) => a.name === b.name;\ndifferenceWith(users1, users2, areUsersEqual);\n// Returns: [{ name: 'Bob', age: 25 }, { name: 'Charlie', age: 35 }]\n```\n\n#### 参数\n\n- `firstArr` (`T[]`): 作为差集基准的数组。\n- `secondArr` (`U[]`): 包含要从第一个数组中排除的元素的数组。\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 判断两个元素是否相同的函数。\n\n#### 返回值\n\n(`T[]`): 根据比较函数判断只在第一个数组中存在的元素的新数组。\n\n## Lodash 兼容性\n\n从 `es-toolkit/compat` 导入 `differenceWith` 时,与 lodash 完全兼容。\n\n- `differenceWith` 可以接受多个数组与第一个数组进行比较。\n- `differenceWith` 可以接受类数组对象作为参数。\n- `differenceWith` 可以省略自定义比较函数。省略时,默认使用 [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero) 算法。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 示例 1: 与多个数组比较并使用比较函数的情况\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\nconst comparator = (a, b) => a.id === b.id;\n\nconst result = differenceWith(array, values1, values2, comparator);\n// 结果为 [{ id: 1 }]。根据比较标准,此元素只存在于第一个数组中。\n\n// 示例 2: 接受类数组对象作为参数并使用比较函数的情况\nconst array = { 0: { id: 1 }, 1: { id: 2 }, 2: { id: 3 }, length: 3 };\nconst values = { 0: { id: 2 }, 1: { id: 3 }, length: 2 };\nconst comparator = (a, b) => a.id === b.id;\n\nconst result2 = differenceWith(array, values, comparator);\n// 结果为 [{ id: 1 }]。根据比较标准,此元素只存在于第一个类数组对象中。\n\n// 示例 3: 省略自定义比较函数\nconst array = [1, 2, 3];\nconst values1 = [2];\nconst values2 = [3];\n\nconst result3 = differenceWith(array, values1, values2);\n// 结果为 [1]。此元素在所有数组中唯一存在。\n```\n"
  },
  {
    "path": "docs/zh_hans/reference/array/drop.md",
    "content": "# drop\n\n从数组开头移除指定数量的元素,返回一个新数组。\n\n```typescript\nconst dropped = drop(arr, itemsCount);\n```\n\n## 用法\n\n### `drop(arr, itemsCount)`\n\n当您想从数组前面移除一部分元素时,请使用 `drop`。移除指定数量的开头元素,返回一个包含剩余元素的新数组。\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\n// 移除数组的前 2 个元素\ndrop([1, 2, 3, 4, 5], 2);\n// Returns: [3, 4, 5]\n\n// 如果要移除的数量大于数组长度,则返回空数组\ndrop([1, 2, 3], 5);\n// Returns: []\n```\n\n传入负数或 0 时,返回一个包含与原数组相同元素的新数组。\n\n```typescript\nimport { drop } from 'es-toolkit/array';\n\ndrop([1, 2, 3], 0); // [1, 2, 3]\ndrop([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除元素的数组。\n- `itemsCount` (`number`): 从数组开头要移除的元素数量。\n\n#### 返回值\n\n(`T[]`): 从开头移除指定数量元素后的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/dropRight.md",
    "content": "# dropRight\n\n从数组末尾移除指定数量的元素,返回一个新数组。\n\n```typescript\nconst dropped = dropRight(arr, itemsCount);\n```\n\n## 用法\n\n### `dropRight(arr, itemsCount)`\n\n当您想从数组后面移除一部分元素时,请使用 `dropRight`。移除指定数量的末尾元素,返回一个包含剩余元素的新数组。\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\n// 移除数组的最后 2 个元素\ndropRight([1, 2, 3, 4, 5], 2);\n// Returns: [1, 2, 3]\n\n// 如果要移除的数量大于数组长度,则返回空数组\ndropRight([1, 2, 3], 5);\n// Returns: []\n```\n\n传入负数或 0 时,返回一个包含与原数组相同元素的新数组。\n\n```typescript\nimport { dropRight } from 'es-toolkit/array';\n\ndropRight([1, 2, 3], 0); // [1, 2, 3]\ndropRight([1, 2, 3], -2); // [1, 2, 3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除元素的数组。\n- `itemsCount` (`number`): 从数组末尾要移除的元素数量。\n\n#### 返回值\n\n(`T[]`): 从末尾移除指定数量元素后的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/dropRightWhile.md",
    "content": "# dropRightWhile\n\n从数组末尾开始,在满足条件期间移除元素,返回一个新数组。\n\n```typescript\nconst result = dropRightWhile(arr, canContinueDropping);\n```\n\n## 用法\n\n### `dropRightWhile(arr, canContinueDropping)`\n\n当您想从数组后面移除满足特定条件的元素时,请使用 `dropRightWhile`。从数组末尾开始,在条件函数返回 `true` 期间移除元素,当条件函数返回 `false` 时停止。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\n// 从末尾开始移除大于 3 的元素\nconst numbers = [1, 2, 3, 4, 5];\ndropRightWhile(numbers, x => x > 3);\n// Returns: [1, 2, 3]\n// 4 和 5 满足条件被移除,在 3 处条件变为 false 而停止\n\n// 从对象数组中移除满足特定条件的元素\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: false },\n  { name: 'David', active: false },\n];\ndropRightWhile(users, user => !user.active);\n// Returns: [{ name: 'Alice', active: true }, { name: 'Bob', active: true }]\n```\n\n如果是空数组或没有满足条件的元素,则返回与原数组相同的新数组。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/array';\n\ndropRightWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropRightWhile([], x => true); // []\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除元素的数组。\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 决定是否继续移除元素的条件函数。接收数组的每个元素、索引和整个数组,返回真或假。\n\n#### 返回值\n\n(`T[]`): 从不满足条件的元素到数组开头的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/dropWhile.md",
    "content": "# dropWhile\n\n从数组开头开始,在满足条件期间移除元素,返回一个新数组。\n\n```typescript\nconst result = dropWhile(arr, canContinueDropping);\n```\n\n## 用法\n\n### `dropWhile(arr, canContinueDropping)`\n\n当您想从数组前面移除满足特定条件的元素时,请使用 `dropWhile`。从数组开头开始,在条件函数返回 `true` 期间移除元素,当条件函数返回 `false` 时停止。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\n// 从开头开始移除小于 3 的元素\nconst numbers = [1, 2, 3, 4, 2, 5];\ndropWhile(numbers, x => x < 3);\n// Returns: [3, 4, 2, 5]\n// 1 和 2 满足条件被移除,在 3 处条件变为 false 而停止\n\n// 从对象数组中移除满足特定条件的元素\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n  { name: 'David', active: true },\n];\ndropWhile(users, user => !user.active);\n// Returns: [{ name: 'Charlie', active: true }, { name: 'David', active: true }]\n```\n\n如果是空数组或没有满足条件的元素,则返回与原数组相同的新数组。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/array';\n\ndropWhile([1, 2, 3], x => x > 5); // [1, 2, 3]\ndropWhile([], x => true); // []\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除元素的数组。\n- `canContinueDropping` (`(item: T, index: number, arr: T[]) => boolean`): 决定是否继续移除元素的条件函数。接收数组的每个元素、索引和整个数组,返回真或假。\n\n#### 返回值\n\n(`T[]`): 从不满足条件的元素到数组末尾的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/fill.md",
    "content": "# fill\n\n用指定的值填充数组的元素。直接修改原数组。\n\n```typescript\nconst filled = fill(arr, value, start, end);\n```\n\n::: info 如果不想修改原数组,请使用 [`toFilled`](./toFilled.md)。\n\n`toFilled` 返回一个新数组,而不是修改原数组。\n\n:::\n\n## 用法\n\n### `fill(arr, value, start?, end?)`\n\n当您想用指定的值填充数组的特定范围时,请使用 `fill`。从开始位置到结束位置之前的元素将被替换为提供的值。如果不指定开始或结束位置,将填充整个数组。\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\n// 用 'a' 填充整个数组\nconst array1 = [1, 2, 3];\nfill(array1, 'a');\n// Returns: ['a', 'a', 'a']\n\n// 用 2 填充空数组\nconst array2 = Array(3);\nfill(array2, 2);\n// Returns: [2, 2, 2]\n\n// 用 '*' 填充索引 1 到 3 之前的位置\nconst array3 = [4, 6, 8, 10];\nfill(array3, '*', 1, 3);\n// Returns: [4, '*', '*', 10]\n```\n\n也可以使用负数索引。负数索引从数组末尾开始计算。\n\n```typescript\nimport { fill } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nfill(array, '*', -2, -1);\n// Returns: [1, '*', 3]\n```\n\n#### 参数\n\n- `arr` (`Array<T | U>`): 要填充的数组。\n- `value` (`U`): 用于填充数组的值。\n- `start` (`number`, 可选): 开始位置。默认值为 `0`。\n- `end` (`number`, 可选): 结束位置。默认值为数组的长度。\n\n#### 返回值\n\n(`Array<T | U>`): 返回用值填充的原数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/filterAsync.md",
    "content": "# filterAsync\n\n使用异步条件函数过滤数组，返回仅包含满足条件的元素的新数组。\n\n```typescript\nconst filtered = await filterAsync(array, predicate);\n```\n\n## 参考\n\n### `filterAsync(array, predicate, options?)`\n\n当需要使用 API 调用或数据库查询等异步操作过滤数组时，使用 `filterAsync`。与常规的 `filter` 不同，它支持异步条件函数，并可以通过 `concurrency` 选项限制并发执行数。\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// 通过 API 检查用户状态，过滤出活跃用户。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst activeUsers = await filterAsync(users, async user => {\n  return await checkUserStatus(user.id);\n});\n// 返回：仅包含活跃用户的数组\n\n// 限制并发数以减少服务器负载。\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = await filterAsync(numbers, async n => await isEvenAsync(n), { concurrency: 2 });\n// 最多同时执行 2 个操作。\n```\n\n`concurrency` 选项有助于限制外部 API 调用或有效管理系统资源。如果未指定，所有操作将并发执行。\n\n```typescript\nimport { filterAsync } from 'es-toolkit/array';\n\n// 最多同时执行 3 个 API 调用。\nconst items = await filterAsync(largeArray, async item => await validateItem(item), { concurrency: 3 });\n```\n\n#### 参数\n\n- `array` (`readonly T[]`)：要过滤的数组。\n- `predicate` (`(item: T, index: number, array: readonly T[]) => Promise<boolean>`)：测试每个元素的异步函数。如果返回真值，该元素将包含在结果中。\n- `options` (`FilterAsyncOptions`, 可选)：控制并发的选项。\n  - `concurrency` (`number`, 可选)：最大并发操作数。如果未指定，所有操作将并发执行。\n\n#### 返回值\n\n(`Promise<T[]>`)：一个 Promise，解析为仅包含条件函数返回真值的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/flatMap.md",
    "content": "# flatMap\n\n将数组的每个元素转换为函数返回的值,然后扁平化到指定深度,返回一个新数组。\n\n```typescript\nconst result = flatMap(arr, iteratee, depth);\n```\n\n## 用法\n\n### `flatMap(arr, iteratee, depth = 1)`\n\n当您想在转换数组的每个元素的同时进行扁平化时,请使用 `flatMap`。首先对每个元素应用函数,然后将结果数组扁平化到指定深度。\n\n与 JavaScript 内置的 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) 和 [Array#map](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/map) 组合调用 `map(iteratee).flat(depth)` 的效果相同,但速度更快。\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\n// 将数字数组的每个元素复制两次\nconst arr = [1, 2, 3];\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 扁平化深度为 2\nflatMap(arr, item => [[item, item]], 2);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n可以使用不同的深度进行扁平化。\n\n```typescript\nimport { flatMap } from 'es-toolkit/array';\n\nconst arr = [1, 2, 3];\n\n// 使用默认深度 1 进行扁平化\nflatMap(arr, item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 使用深度 3 进行扁平化\nflatMap(arr, item => [[[item, item]]], 3);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要转换的数组。\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 转换每个数组元素的函数。它接收元素、索引和数组作为参数。\n- `depth` (`D`, 可选): 扁平化的深度。默认值为 `1`。\n\n#### 返回值\n\n(`Array<FlatArray<U[], D>>`): 返回每个元素被转换并扁平化到指定深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/flatMapAsync.md",
    "content": "# flatMapAsync\n\n使用异步函数转换数组的每个元素，并将结果展平一层以返回新数组。\n\n```typescript\nconst result = await flatMapAsync(array, callback);\n```\n\n## 参考\n\n### `flatMapAsync(array, callback, options?)`\n\n当执行每个元素返回多个值的异步转换时，使用 `flatMapAsync`。它等同于调用 `mapAsync` 后再调用 `flat()`，但更高效。\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 获取每个用户的帖子并合并到一个数组中。\nconst users = [{ id: 1 }, { id: 2 }];\nconst allPosts = await flatMapAsync(users, async user => {\n  return await fetchUserPosts(user.id);\n});\n// 返回：[post1, post2, post3, ...]（所有用户的帖子在一个数组中）\n\n// 限制并发数。\nconst numbers = [1, 2, 3];\nconst results = await flatMapAsync(numbers, async n => await fetchRelatedItems(n), { concurrency: 2 });\n// 最多同时执行 2 个操作。\n```\n\n每个回调函数必须返回一个数组，所有返回的数组将合并到一个数组中。`concurrency` 选项允许您限制并发执行以管理服务器负载。\n\n```typescript\nimport { flatMapAsync } from 'es-toolkit/array';\n\n// 获取每个类别的产品列表并合并到一个数组中。\nconst categories = ['electronics', 'books', 'clothing'];\nconst products = await flatMapAsync(categories, async category => await fetchProducts(category), { concurrency: 2 });\n// 返回：包含所有类别产品的单个数组\n```\n\n#### 参数\n\n- `array` (`readonly T[]`)：要转换的数组。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R[]>`)：将每个元素转换为数组的异步函数。\n- `options` (`FlatMapAsyncOptions`, 可选)：控制并发的选项。\n  - `concurrency` (`number`, 可选)：最大并发操作数。如果未指定，所有操作将并发执行。\n\n#### 返回值\n\n(`Promise<R[]>`)：一个 Promise，解析为展平一层的转换值数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/flatMapDeep.md",
    "content": "# flatMapDeep\n\n将数组的每个元素转换为函数返回的值,然后完全扁平化所有深度,返回一个新数组。\n\n```typescript\nconst result = flatMapDeep(arr, iteratee);\n```\n\n## 用法\n\n### `flatMapDeep(arr, iteratee)`\n\n当您想在转换数组的每个元素的同时完全扁平化所有嵌套数组时,请使用 `flatMapDeep`。首先对每个元素应用函数,然后将结果数组扁平化到所有深度。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// 将每个元素复制两次后完全扁平化\nconst result1 = flatMapDeep([1, 2, 3], item => [item, item]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n无论嵌套多深的数组都会完全扁平化。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/array';\n\n// 嵌套数组也会完全扁平化\nconst result = flatMapDeep([1, 2, 3], item => [[item, item]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n\n// 多层嵌套也会全部扁平化\nconst result2 = flatMapDeep([1, 2, 3], item => [[[item, item]]]);\n// Returns: [1, 1, 2, 2, 3, 3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要转换的数组。\n- `iteratee` (`(item: T, index: number, array: readonly T[]) => U`): 转换每个数组元素的函数。它接收元素、索引和数组作为参数。\n\n#### 返回值\n\n(`Array<ExtractNestedArrayType<U>>`): 返回每个元素被转换并完全扁平化所有深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/flatten.md",
    "content": "# flatten\n\n将嵌套数组扁平化到指定深度,返回一个新数组。\n\n```typescript\nconst result = flatten(arr, depth);\n```\n\n## 用法\n\n### `flatten(arr, depth = 1)`\n\n当您想将嵌套数组扁平化到特定深度时,请使用 `flatten`。它将数组内的数组展开到指定级别,形成平面结构。\n\n与 JavaScript 内置的 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) 效果相同,但速度更快。\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\n// 使用默认深度 1 进行扁平化\nconst array = [1, [2, 3], [4, [5, 6]]];\nflatten(array);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 使用深度 2 进行扁平化\nflatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n可以调整深度,只扁平化到想要的级别。\n\n```typescript\nimport { flatten } from 'es-toolkit/array';\n\nconst array = [1, [2, 3], [4, [5, 6]]];\n\n// 使用深度 1 进行扁平化(默认值)\nconst result1 = flatten(array, 1);\n// Returns: [1, 2, 3, 4, [5, 6]]\n\n// 使用深度 2 进行扁平化\nconst result2 = flatten(array, 2);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要扁平化的嵌套数组。\n- `depth` (`D`, 可选): 扁平化的深度。默认值为 `1`。\n\n#### 返回值\n\n(`Array<FlatArray<T[], D>>`): 返回扁平化到指定深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/flattenDeep.md",
    "content": "# flattenDeep\n\n完全扁平化嵌套数组的所有深度,返回一个新数组。\n\n```typescript\nconst result = flattenDeep(arr);\n```\n\n## 用法\n\n### `flattenDeep(arr)`\n\n当您想完全扁平化嵌套数组,无论嵌套多深时,请使用 `flattenDeep`。它将数组内的所有嵌套数组展开,形成一个平面结构。\n\n与 JavaScript 内置的 [Array#flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) 调用 `flat(Infinity)` 的效果相同,但速度更快。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\n// 扁平化所有嵌套级别\nconst array = [1, [2, [3]], [4, [5, 6]]];\nconst result = flattenDeep(array);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n无论多复杂的嵌套结构都会完全扁平化。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/array';\n\nconst complexArray = [1, [2, [3, [4, [5]]]], 6];\nconst result = flattenDeep(complexArray);\n// Returns: [1, 2, 3, 4, 5, 6]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要扁平化的嵌套数组。\n\n#### 返回值\n\n(`Array<ExtractNestedArrayType<T>>`): 返回完全扁平化所有深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/forEachAsync.md",
    "content": "# forEachAsync\n\n对数组的每个元素执行异步函数。\n\n```typescript\nawait forEachAsync(array, callback);\n```\n\n## 参考\n\n### `forEachAsync(array, callback, options?)`\n\n当需要对数组的每个元素执行具有副作用的异步操作时，使用 `forEachAsync`。与常规的 `forEach` 不同，它返回一个在所有异步操作完成时解析的 Promise。\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// 更新所有用户信息。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nawait forEachAsync(users, async user => {\n  await updateUser(user.id);\n});\n// 所有用户更新已完成。\n\n// 限制并发数。\nconst items = [1, 2, 3, 4, 5];\nawait forEachAsync(items, async item => await processItem(item), { concurrency: 2 });\n// 最多同时处理 2 个项目。\n```\n\n`concurrency` 选项允许您限制并发执行以控制服务器或数据库的负载。它适用于不返回值的操作，如日志记录、文件上传或数据库更新。\n\n```typescript\nimport { forEachAsync } from 'es-toolkit/array';\n\n// 顺序上传文件。\nconst files = ['file1.txt', 'file2.txt', 'file3.txt'];\nawait forEachAsync(files, async file => await uploadFile(file), { concurrency: 1 });\n// 一次只上传一个文件。\n```\n\n#### 参数\n\n- `array` (`readonly T[]`)：要迭代的数组。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<void>`)：要为每个元素执行的异步函数。\n- `options` (`ForEachAsyncOptions`, 可选)：控制并发的选项。\n  - `concurrency` (`number`, 可选)：最大并发操作数。如果未指定，所有操作将并发执行。\n\n#### 返回值\n\n(`Promise<void>`)：一个在所有操作完成时解析的 Promise。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/forEachRight.md",
    "content": "# forEachRight\n\n从右到左遍历数组元素,对每个元素执行函数。\n\n```typescript\nforEachRight(arr, callback);\n```\n\n## 用法\n\n### `forEachRight(arr, callback)`\n\n当您想逆序遍历数组并对每个元素执行操作时,请使用 `forEachRight`。它从数组的最后一个元素到第一个元素依次调用回调函数。在需要逆序处理或从数组末尾开始工作时很有用。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = [1, 2, 3];\nconst result: number[] = [];\n\n// 使用 forEachRight 函数逆序遍历数组\nforEachRight(array, value => {\n  result.push(value);\n});\n\nconsole.log(result); // [3, 2, 1]\n```\n\n回调函数接收三个参数。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/array';\n\nconst array = ['a', 'b', 'c'];\nforEachRight(array, (value, index, arr) => {\n  console.log(`值: ${value}, 索引: ${index}, 数组:`, arr);\n});\n// 输出:\n// 值: c, 索引: 2, 数组: ['a', 'b', 'c']\n// 值: b, 索引: 1, 数组: ['a', 'b', 'c']\n// 值: a, 索引: 0, 数组: ['a', 'b', 'c']\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要遍历的数组。\n- `callback` (`(value: T, index: number, arr: T[]) => void`): 对每个元素执行的函数。\n  - `value`: 当前正在处理的数组元素。\n  - `index`: 当前正在处理的元素的索引。\n  - `arr`: 调用 `forEachRight` 函数的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/groupBy.md",
    "content": "# groupBy\n\n根据键生成函数将数组元素分组,返回一个新对象。\n\n```typescript\nconst grouped = groupBy(arr, getKeyFromItem);\n```\n\n## 用法\n\n### `groupBy(arr, getKeyFromItem)`\n\n当您想根据特定标准对数组元素进行分类时,请使用 `groupBy`。提供一个从每个元素生成键的函数,它将具有相同键的元素分组在一起并作为对象返回。返回对象的值是属于每个组的元素数组。在按类别整理数据或进行分组分析时很有用。\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// 按类别对对象数组进行分组\nconst items = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\nconst result = groupBy(items, item => item.category);\n// 结果:\n// {\n//   fruit: [\n//     { category: 'fruit', name: 'apple' },\n//     { category: 'fruit', name: 'banana' }\n//   ],\n//   vegetable: [\n//     { category: 'vegetable', name: 'carrot' }\n//   ]\n// }\n```\n\n可以按各种标准进行分组。\n\n```typescript\nimport { groupBy } from 'es-toolkit/array';\n\n// 按字符串长度分组\nconst words = ['one', 'two', 'three', 'four', 'five'];\nconst byLength = groupBy(words, word => word.length);\n// 结果: { 3: ['one', 'two'], 4: ['four', 'five'], 5: ['three'] }\n\n// 按奇数/偶数分组\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst byParity = groupBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 结果: { odd: [1, 3, 5], even: [2, 4, 6] }\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要分组的数组。\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 从每个元素、索引和数组生成键的函数。\n\n#### 返回值\n\n(`Record<K, T[]>`): 返回按键分组元素的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/head.md",
    "content": "# head\n\n返回数组的第一个元素。\n\n```typescript\nconst firstElement = head(arr);\n```\n\n## 用法\n\n### `head(arr)`\n\n当您想获取数组的第一个元素时,请使用 `head`。如果数组为空,则返回 `undefined`。在访问数组开头的数据时很有用。\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 获取数字数组的第一个元素\nconst numbers = [1, 2, 3, 4, 5];\nhead(numbers);\n// Returns: 1\n\n// 获取字符串数组的第一个元素\nconst strings = ['a', 'b', 'c'];\nhead(strings);\n// Returns: 'a'\n\n// 空数组返回 undefined\nconst emptyArray: number[] = [];\nhead(emptyArray);\n// Returns: undefined\n```\n\n类型处理很安全。\n\n```typescript\nimport { head } from 'es-toolkit/array';\n\n// 非空数组的情况下类型明确\nconst nonEmptyArray = [1, 2, 3] as const;\nhead(nonEmptyArray);\n// Returns: 1 (类型: 1)\n\n// 普通数组的情况下可能为 undefined\nconst maybeEmptyArray = [1, 2, 3];\nhead(maybeEmptyArray);\n// Returns: 1 | undefined (类型: number | undefined)\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要获取第一个元素的数组。\n\n#### 返回值\n\n(`T | undefined`): 数组的第一个元素。如果数组为空,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/initial.md",
    "content": "# initial\n\n返回一个由除最后一个元素外的所有元素组成的新数组。\n\n```typescript\nconst result = initial(arr);\n```\n\n## 用法\n\n### `initial(arr)`\n\n当您想获取除最后一个元素外的所有元素时,请使用 `initial`。如果数组为空或只有一个元素,则返回空数组。在需要排除数组末尾进行处理时很有用。\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 从数字数组中排除最后一个元素\nconst numbers = [1, 2, 3, 4, 5];\ninitial(numbers);\n// Returns: [1, 2, 3, 4]\n\n// 从字符串数组中排除最后一个元素\nconst strings = ['a', 'b', 'c'];\ninitial(strings);\n// Returns: ['a', 'b']\n\n// 只有一个元素的数组返回空数组\nconst single = [42];\ninitial(single);\n// Returns: []\n```\n\n空数组或特殊情况也能安全处理。\n\n```typescript\nimport { initial } from 'es-toolkit/array';\n\n// 空数组返回空数组\nconst empty: number[] = [];\ninitial(empty);\n// Returns: []\n\n// 也可以处理嵌套数组\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ninitial(nested);\n// Returns: [[1, 2], [3, 4]]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要排除最后一个元素的数组。\n\n#### 返回值\n\n(`T[]`): 返回排除最后一个元素的新数组。如果输入数组为空或只有一个元素,则返回空数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/intersection.md",
    "content": "# intersection\n\n返回一个由两个数组共同包含的元素组成的新数组。\n\n```typescript\nconst result = intersection(firstArr, secondArr);\n```\n\n## 用法\n\n### `intersection(firstArr, secondArr)`\n\n当您想只查找两个数组的共同元素时,请使用 `intersection`。它从第一个数组的元素中,只返回第二个数组中也存在的元素组成的新数组。在求两个数据集的交集时很有用。\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 求数字数组的交集\nconst numbers1 = [1, 2, 3, 4, 5];\nconst numbers2 = [3, 4, 5, 6, 7];\nintersection(numbers1, numbers2);\n// Returns: [3, 4, 5]\n\n// 求字符串数组的交集\nconst strings1 = ['apple', 'banana', 'cherry'];\nconst strings2 = ['banana', 'cherry', 'date'];\nintersection(strings1, strings2);\n// Returns: ['banana', 'cherry']\n```\n\n也能处理没有交集或特殊情况。\n\n```typescript\nimport { intersection } from 'es-toolkit/array';\n\n// 没有交集时返回空数组\nconst noCommon1 = [1, 2, 3];\nconst noCommon2 = [4, 5, 6];\nintersection(noCommon1, noCommon2);\n// Returns: []\n\n// 一方为空数组时也返回空数组\nconst numbers = [1, 2, 3];\nconst empty: number[] = [];\nintersection(numbers, empty);\n// Returns: []\n```\n\n#### 参数\n\n- `firstArr` (`readonly T[]`): 要比较的第一个数组。\n- `secondArr` (`readonly T[]`): 要比较的第二个数组。\n\n#### 返回值\n\n(`T[]`): 返回由两个数组共同包含的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/intersectionBy.md",
    "content": "# intersectionBy\n\n根据转换函数的结果为标准求两个数组的交集,返回一个新数组。\n\n```typescript\nconst result = intersectionBy(firstArr, secondArr, mapper);\n```\n\n## 用法\n\n### `intersectionBy(firstArr, secondArr, mapper)`\n\n当您想根据特定属性或转换后的值查找两个数组的共同元素时,请使用 `intersectionBy`。它比较用转换函数处理每个元素后的结果来求交集。在对象数组中按特定属性比较或需要复杂转换逻辑时很有用。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// 根据对象的 id 属性求交集\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 4, name: 'alice' },\n];\nintersectionBy(users1, users2, user => user.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 也可以比较不同类型的数组\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3, 4];\nintersectionBy(objects, ids, item => (typeof item === 'object' ? item.id : item));\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n也可以应用复杂的转换逻辑。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/array';\n\n// 转换为小写后比较字符串\nconst words1 = ['Apple', 'Banana', 'Cherry'];\nconst words2 = ['apple', 'DATE', 'elderberry'];\nintersectionBy(words1, words2, word => word.toLowerCase());\n// Returns: ['Apple']\n\n// 转换为绝对值后比较数字\nconst numbers1 = [1, -2, 3, -4];\nconst numbers2 = [2, -3, 4, 5];\nintersectionBy(numbers1, numbers2, num => Math.abs(num));\n// Returns: [-2, 3, -4]\n```\n\n#### 参数\n\n- `firstArr` (`readonly T[]`): 要比较的第一个数组。\n- `secondArr` (`readonly U[]`): 要比较的第二个数组。\n- `mapper` (`(item: T | U) => unknown`): 转换每个元素以创建比较标准的函数。\n\n#### 返回值\n\n(`T[]`): 返回根据转换函数的结果为标准,由两个数组共同包含的元素组成的新数组。结果由第一个数组的元素组成。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/intersectionWith.md",
    "content": "# intersectionWith\n\n根据自定义比较函数为标准求两个数组的交集,返回一个新数组。\n\n```typescript\nconst result = intersectionWith(firstArr, secondArr, areItemsEqual);\n```\n\n## 用法\n\n### `intersectionWith(firstArr, secondArr, areItemsEqual)`\n\n当您想用自定义的比较函数查找两个数组的共同元素时,请使用 `intersectionWith`。在单纯的值比较难以处理的复杂对象或需要特殊比较逻辑的情况下很有用。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// 按对象的 id 属性比较\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nintersectionWith(users1, users2, (a, b) => a.id === b.id);\n// Returns: [{ id: 2, name: 'jane' }]\n\n// 也可以比较不同类型\nconst objects = [\n  { id: 1, name: 'apple' },\n  { id: 2, name: 'banana' },\n];\nconst ids = [2, 3];\nintersectionWith(objects, ids, (obj, id) => obj.id === id);\n// Returns: [{ id: 2, name: 'banana' }]\n```\n\n也可以实现复杂的比较逻辑。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/array';\n\n// 不区分大小写的字符串比较\nconst words1 = ['Apple', 'Banana'];\nconst words2 = ['apple', 'cherry'];\nintersectionWith(words1, words2, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Apple']\n\n// 范围内的数字比较\nconst numbers1 = [1.1, 2.3, 3.7];\nconst numbers2 = [1.0, 2.5, 4.0];\nintersectionWith(numbers1, numbers2, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: [1.1] (1.1 和 1.0 的差小于 0.5)\n```\n\n#### 参数\n\n- `firstArr` (`readonly T[]`): 要比较的第一个数组。\n- `secondArr` (`readonly U[]`): 要比较的第二个数组。\n- `areItemsEqual` (`(x: T, y: U) => boolean`): 判断两个元素是否相同的函数。相同时应返回 `true`,不同时返回 `false`。\n\n#### 返回值\n\n(`T[]`): 返回根据自定义比较函数为标准,由两个数组共同包含的元素组成的新数组。结果由第一个数组的元素组成。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/isSubset.md",
    "content": "# isSubset\n\n检查一个数组是否是另一个数组的子集。\n\n```typescript\nconst result = isSubset(superset, subset);\n```\n\n## 用法\n\n### `isSubset(superset, subset)`\n\n当您想确认一个数组的所有元素是否都包含在另一个数组中时,请使用 `isSubset`。在确认子集关系或检查权限、功能、标签等是否在允许范围内时很有用。\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 检查数字数组的子集\nconst numbers = [1, 2, 3, 4, 5];\nconst subset = [2, 3, 4];\nisSubset(numbers, subset);\n// Returns: true\n\n// 检查字符串数组的子集\nconst permissions = ['read', 'write', 'delete', 'admin'];\nconst userPermissions = ['read', 'write'];\nisSubset(permissions, userPermissions);\n// Returns: true\n\n// 不是子集的情况\nconst colors = ['red', 'blue', 'green'];\nconst invalidColors = ['red', 'yellow'];\nisSubset(colors, invalidColors);\n// Returns: false\n```\n\n特殊情况也能正确处理。\n\n```typescript\nimport { isSubset } from 'es-toolkit/array';\n\n// 空数组始终是子集\nconst anyArray = [1, 2, 3];\nconst emptyArray: number[] = [];\nisSubset(anyArray, emptyArray);\n// Returns: true\n\n// 相同的数组是自己的子集\nconst same = ['a', 'b', 'c'];\nisSubset(same, same);\n// Returns: true\n\n// 即使有重复元素也能正常工作\nconst withDuplicates = [1, 2, 2, 3];\nconst duplicateSubset = [2, 2];\nisSubset(withDuplicates, duplicateSubset);\n// Returns: true\n```\n\n#### 参数\n\n- `superset` (`readonly T[]`): 可以包含子集所有元素的超集数组。\n- `subset` (`readonly T[]`): 要确认是否包含在超集中的子集数组。\n\n#### 返回值\n\n(`boolean`): 如果子集的所有元素都包含在超集中,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/isSubsetWith.md",
    "content": "# isSubsetWith\n\n根据自定义比较函数检查一个数组是否是另一个数组的子集。\n\n```typescript\nconst result = isSubsetWith(superset, subset, areItemsEqual);\n```\n\n## 用法\n\n### `isSubsetWith(superset, subset, areItemsEqual)`\n\n当您想用自定义的比较函数确认子集关系时,请使用 `isSubsetWith`。在比较对象或需要特殊比较逻辑时很有用。\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// 根据对象的 id 检查子集\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst targetUsers = [\n  { id: 2, name: 'jane' },\n  { id: 1, name: 'john' },\n];\nisSubsetWith(users, targetUsers, (a, b) => a.id === b.id);\n// Returns: true\n\n// 不是子集的情况\nconst allUsers = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst someUsers = [{ id: 3, name: 'bob' }];\nisSubsetWith(allUsers, someUsers, (a, b) => a.id === b.id);\n// Returns: false\n```\n\n也可以使用复杂的比较逻辑。\n\n```typescript\nimport { isSubsetWith } from 'es-toolkit/array';\n\n// 不区分大小写的字符串比较\nconst validNames = ['Alice', 'Bob', 'Charlie'];\nconst userNames = ['alice', 'BOB'];\nisSubsetWith(validNames, userNames, (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: true\n\n// 范围内的数字比较\nconst validRanges = [1, 2, 3, 4, 5];\nconst testNumbers = [1.1, 2.8];\nisSubsetWith(validRanges, testNumbers, (a, b) => Math.abs(a - b) < 0.5);\n// Returns: true (1.1 与 1 足够接近,2.8 与 3 足够接近)\n```\n\n#### 参数\n\n- `superset` (`readonly T[]`): 可以包含子集所有元素的超集数组。\n- `subset` (`readonly T[]`): 要确认是否包含在超集中的子集数组。\n- `areItemsEqual` (`(x: T, y: T) => boolean`): 判断两个元素是否相同的函数。相同时应返回 `true`,不同时返回 `false`。\n\n#### 返回值\n\n(`boolean`): 根据自定义比较函数,如果子集的所有元素都包含在超集中,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/keyBy.md",
    "content": "# keyBy\n\n使用键生成函数将数组元素转换为键值对对象,返回一个新对象。\n\n```typescript\nconst result = keyBy(arr, getKeyFromItem);\n```\n\n## 用法\n\n### `keyBy(arr, getKeyFromItem)`\n\n当您想创建一个以键索引的对象以便快速查找数组的每个元素时,请使用 `keyBy`。提供一个从每个元素生成唯一键的函数,即可创建一个可以用该键访问元素的对象。如果有多个元素生成相同的键,则使用最后一个元素。\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// 使用对象的 id 属性作为键\nconst users = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nkeyBy(users, user => user.id);\n// Returns: {\n//   1: { id: 1, name: 'john' },\n//   2: { id: 2, name: 'jane' },\n//   3: { id: 3, name: 'bob' }\n// }\n\n// 使用字符串属性作为键\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\nkeyBy(products, item => item.category);\n// Returns: {\n//   fruit: { category: 'fruit', name: 'banana' }, // 最后一个 fruit 元素\n//   vegetable: { category: 'vegetable', name: 'carrot' }\n// }\n```\n\n也可以使用复杂的键生成逻辑。\n\n```typescript\nimport { keyBy } from 'es-toolkit/array';\n\n// 组合多个属性创建键\nconst orders = [\n  { date: '2023-01-01', customerId: 1, amount: 100 },\n  { date: '2023-01-01', customerId: 2, amount: 200 },\n  { date: '2023-01-02', customerId: 1, amount: 150 },\n];\nkeyBy(orders, order => `${order.date}-${order.customerId}`);\n// Returns: {\n//   '2023-01-01-1': { date: '2023-01-01', customerId: 1, amount: 100 },\n//   '2023-01-01-2': { date: '2023-01-01', customerId: 2, amount: 200 },\n//   '2023-01-02-1': { date: '2023-01-02', customerId: 1, amount: 150 }\n// }\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要转换为对象的数组。\n- `getKeyFromItem` (`(item: T, index: number, array: T[]) => K`): 从每个元素、索引和数组生成键的函数。\n\n#### 返回值\n\n(`Record<K, T>`): 返回一个对象,以生成的键作为属性名,对应元素作为值。如果有多个元素生成相同的键,则最后一个元素将作为值使用。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/last.md",
    "content": "# last\n\n返回数组的最后一个元素。\n\n```typescript\nconst lastElement = last(arr);\n```\n\n## 用法\n\n### `last(arr)`\n\n当您想获取数组的最后一个元素时,请使用 `last`。如果数组为空,则返回 `undefined`。在访问数组末尾的数据时很有用。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 获取数字数组的最后一个元素\nconst numbers = [1, 2, 3, 4, 5];\nlast(numbers);\n// Returns: 5\n\n// 获取字符串数组的最后一个元素\nconst strings = ['a', 'b', 'c'];\nlast(strings);\n// Returns: 'c'\n\n// 空数组返回 undefined\nconst emptyArray: number[] = [];\nlast(emptyArray);\n// Returns: undefined\n```\n\n类型处理很安全。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 非空数组的情况下类型明确\nconst nonEmptyArray = [1, 2, 3] as const;\nlast(nonEmptyArray);\n// Returns: 3 (类型: 3)\n\n// 普通数组的情况下可能为 undefined\nconst maybeEmptyArray = [1, 2, 3];\nlast(maybeEmptyArray);\n// Returns: 3 | undefined (类型: number | undefined)\n```\n\n在大数组中也能高效工作。\n\n```typescript\nimport { last } from 'es-toolkit/array';\n\n// 性能已优化\nconst largeArray = Array(1000000)\n  .fill(0)\n  .map((_, i) => i);\nlast(largeArray);\n// Returns: 999999 (快速访问)\n\n// 也可以处理嵌套数组\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nlast(nested);\n// Returns: [5, 6]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要获取最后一个元素的数组。\n\n#### 返回值\n\n(`T | undefined`): 数组的最后一个元素。如果数组为空,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/limitAsync.md",
    "content": "# limitAsync\n\n创建一个新函数，限制异步函数的最大并发执行数。\n\n```typescript\nconst limitedFunc = limitAsync(asyncFunc, concurrency);\n```\n\n## 参考\n\n### `limitAsync(callback, concurrency)`\n\n当您想限制多次调用的异步函数的并发执行数时，使用 `limitAsync`。只有指定数量的执行会并发运行，额外的调用会等待正在运行的操作完成。\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 限制最多 3 个并发请求。\nconst limitedFetch = limitAsync(async url => {\n  return await fetch(url);\n}, 3);\n\nconst urls = ['url1', 'url2', 'url3', 'url4', 'url5'];\nawait Promise.all(urls.map(url => limitedFetch(url)));\n// 前 3 个首先执行，然后在它们完成时执行其余的。\n```\n\n它对控制资源密集型操作（如外部 API 调用或数据库查询）的负载很有用。当使用有速率限制的 API 或管理服务器负载时特别有效。\n\n```typescript\nimport { limitAsync } from 'es-toolkit/array';\n\n// 一次最多处理 2 个重计算。\nconst processItem = async item => {\n  return await heavyComputation(item);\n};\n\nconst limitedProcess = limitAsync(processItem, 2);\nconst items = [1, 2, 3, 4, 5];\nawait Promise.all(items.map(item => limitedProcess(item)));\n// 最多同时处理 2 个项目。\n```\n\n#### 参数\n\n- `callback` (`F extends (...args: any[]) => Promise<any>`)：要限制并发执行的异步函数。\n- `concurrency` (`number`)：最大并发操作数。\n\n#### 返回值\n\n(`F`)：一个应用了并发限制的新函数。它与原始函数具有相同的接口。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/mapAsync.md",
    "content": "# mapAsync\n\n使用异步函数转换数组的每个元素并返回新数组。\n\n```typescript\nconst transformed = await mapAsync(array, callback);\n```\n\n## 参考\n\n### `mapAsync(array, callback, options?)`\n\n当需要对数组的每个元素执行异步转换操作时，使用 `mapAsync`。当您需要异步处理每个元素（如 API 调用或数据库查询）时很有用。\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 获取每个用户的详细信息。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userDetails = await mapAsync(users, async user => {\n  return await fetchUserDetails(user.id);\n});\n// 返回：[{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]\n\n// 限制并发数。\nconst numbers = [1, 2, 3, 4, 5];\nconst results = await mapAsync(numbers, async n => await slowOperation(n), { concurrency: 2 });\n// 最多同时执行 2 个操作。\n```\n\n`concurrency` 选项允许您限制并发执行以控制服务器负载或遵守 API 速率限制。如果未指定，所有操作将并发执行。\n\n```typescript\nimport { mapAsync } from 'es-toolkit/array';\n\n// 转换大量图像，限制并发处理以考虑服务器负载。\nconst imageUrls = [...]; // 许多图像 URL\nconst processedImages = await mapAsync(\n  imageUrls,\n  async (url) => await processImage(url),\n  { concurrency: 5 }\n);\n// 一次最多处理 5 个图像。\n```\n\n#### 参数\n\n- `array` (`readonly T[]`)：要转换的数组。\n- `callback` (`(item: T, index: number, array: readonly T[]) => Promise<R>`)：转换每个元素的异步函数。\n- `options` (`MapAsyncOptions`, 可选)：控制并发的选项。\n  - `concurrency` (`number`, 可选)：最大并发操作数。如果未指定，所有操作将并发执行。\n\n#### 返回值\n\n(`Promise<R[]>`)：一个 Promise，解析为转换值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/maxBy.md",
    "content": "# maxBy\n\n根据转换函数返回的值,返回数组中具有最大值的元素。\n\n```typescript\nconst max = maxBy(items, getValue);\n```\n\n## 用法\n\n### `maxBy(items, getValue)`\n\n当您想用转换函数将数组元素转换为数值,并找到具有最大值的原始元素时,请使用 `maxBy`。对于空数组返回 `undefined`。\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\n// 从对象数组中找到特定属性具有最大值的元素\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nmaxBy(people, person => person.age);\n// Returns: { name: 'john', age: 30 }\n\n// 从数字数组中找到绝对值最大的元素\nconst numbers = [-10, -5, 0, 5, 15];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: 15\n```\n\n对于空数组返回 `undefined`。\n\n```typescript\nimport { maxBy } from 'es-toolkit/array';\n\nmaxBy([], x => x.value); // undefined\n```\n\n#### 参数\n\n- `items` (`T[]`): 要查找具有最大值的元素的数组。\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 将每个元素转换为数字的函数。它接收元素、索引和数组作为参数。\n\n#### 返回值\n\n(`T | undefined`): 转换函数返回的值中具有最大值的元素。如果数组为空,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/minBy.md",
    "content": "# minBy\n\n根据转换函数返回的值,返回数组中具有最小值的元素。\n\n```typescript\nconst min = minBy(items, getValue);\n```\n\n## 用法\n\n### `minBy(items, getValue)`\n\n当您想用转换函数将数组元素转换为数值,并找到具有最小值的原始元素时,请使用 `minBy`。对于空数组返回 `undefined`。\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\n// 从对象数组中找到特定属性具有最小值的元素\nconst people = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 28 },\n  { name: 'joe', age: 26 },\n];\nminBy(people, person => person.age);\n// Returns: { name: 'joe', age: 26 }\n\n// 从数字数组中找到绝对值最小的元素\nconst numbers = [-10, -5, 0, 5, 15];\nminBy(numbers, x => Math.abs(x));\n// Returns: 0\n```\n\n对于空数组返回 `undefined`。\n\n```typescript\nimport { minBy } from 'es-toolkit/array';\n\nminBy([], x => x.value); // undefined\n```\n\n#### 参数\n\n- `items` (`T[]`): 要查找具有最小值的元素的数组。\n- `getValue` (`(element: T, index: number, array: readonly T[]) => number`): 将每个元素转换为数字的函数。它接收元素、索引和数组作为参数。\n\n#### 返回值\n\n(`T | undefined`): 转换函数返回的值中具有最小值的元素。如果数组为空,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/orderBy.md",
    "content": "# orderBy\n\n根据多个标准和排序方向对对象数组进行排序,返回一个新数组。\n\n```typescript\nconst sorted = orderBy(arr, criteria, orders);\n```\n\n## 用法\n\n### `orderBy(arr, criteria, orders)`\n\n当您想对对象数组进行多条件复合排序时,请使用 `orderBy`。可以为每个条件指定升序或降序,如果前面的条件值相同,则按下一个条件排序。\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\n// 根据多个标准对用户数组进行排序\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\norderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);\n// Returns:\n// [\n//   { user: 'barney', age: 36 },\n//   { user: 'barney', age: 34 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 }\n// ]\n\n// 可以混合使用属性名和函数\nconst products = [\n  { name: 'Apple', category: 'fruit', price: 1.5 },\n  { name: 'Banana', category: 'fruit', price: 0.8 },\n  { name: 'Broccoli', category: 'vegetable', price: 2.0 },\n];\n\norderBy(products, ['category', product => product.name.length], ['asc', 'desc']);\n// Returns: 先按 category 排序,在相同 category 内按名称长度降序排序\n```\n\n如果排序方向的数量少于条件数量,则重复使用最后一个方向。\n\n```typescript\nimport { orderBy } from 'es-toolkit/array';\n\nconst data = [\n  { a: 1, b: 1, c: 1 },\n  { a: 1, b: 2, c: 2 },\n  { a: 2, b: 1, c: 1 },\n];\n\norderBy(data, ['a', 'b', 'c'], ['asc', 'desc']);\n// 'a' 升序,'b' 和 'c' 降序排序\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要排序的对象数组。\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): 排序标准。可以使用对象的属性名或返回值的函数。\n- `orders` (`Array<'asc' | 'desc'>`): 每个标准的排序方向数组。`'asc'` 表示升序,`'desc'` 表示降序。\n\n#### 返回值\n\n(`T[]`): 根据指定标准和方向排序的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/partition.md",
    "content": "# partition\n\n根据条件将数组分为两组,返回一个元组。\n\n```typescript\nconst [truthy, falsy] = partition(arr, isInTruthy);\n```\n\n## 用法\n\n### `partition(arr, isInTruthy)`\n\n当您想根据特定条件将数组元素分为两组时,请使用 `partition`。将条件函数返回 `true` 的元素和返回 `false` 的元素分别放入不同的数组。\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\n// 将数字数组分为偶数和奇数\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst [evens, odds] = partition(numbers, x => x % 2 === 0);\n// evens: [2, 4, 6]\n// odds: [1, 3, 5]\n\n// 根据特定条件分割对象数组\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nconst [activeUsers, inactiveUsers] = partition(users, user => user.active);\n// activeUsers: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n// inactiveUsers: [{ name: 'Bob', active: false }]\n```\n\n对于空数组返回两个空数组。\n\n```typescript\nimport { partition } from 'es-toolkit/array';\n\nconst [truthy, falsy] = partition([], x => x > 0);\n// truthy: []\n// falsy: []\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要分为两组的数组。\n- `isInTruthy` (`(value: T, index: number, array: readonly T[]) => boolean`): 决定每个元素应包含在第一个数组(truthy)还是第二个数组(falsy)中的条件函数。该函数接收值、索引和整个数组作为参数。\n\n#### 返回值\n\n(`[truthy: T[], falsy: T[]]`): 由两个数组组成的元组。第一个数组包含条件为 `true` 的元素,第二个数组包含条件为 `false` 的元素。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/pull.md",
    "content": "# pull\n\n从数组中移除所有指定的值。\n\n```typescript\nconst result = pull(arr, valuesToRemove);\n```\n\n## 用法\n\n### `pull(arr, valuesToRemove)`\n\n当您想从数组中移除所有特定值时,请使用 `pull`。此函数直接修改原数组,并返回修改后的数组。\n\n```typescript\nimport { pull } from 'es-toolkit/array';\n\n// 从数字数组中移除特定值\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\npull(numbers, [2, 4]);\nconsole.log(numbers); // [1, 3, 5]\n\n// 从字符串数组中移除特定字符串\nconst fruits = ['apple', 'banana', 'cherry', 'banana', 'date'];\npull(fruits, ['banana', 'cherry']);\nconsole.log(fruits); // ['apple', 'date']\n\n// 从对象数组中移除引用相同的对象\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj3, obj1];\npull(objects, [obj1]);\nconsole.log(objects); // [{ id: 2 }, { id: 3 }]\n```\n\n如果不想修改原数组而是创建新数组,请使用 `difference` 函数。\n\n```typescript\nimport { pull } from 'es-toolkit/array';\nimport { difference } from 'es-toolkit/array';\n\nconst original = [1, 2, 3, 4, 5];\n\n// pull 修改原数组\nconst arr1 = [...original];\npull(arr1, [2, 4]);\nconsole.log(arr1); // [1, 3, 5]\n\n// difference 返回新数组\nconst arr2 = difference(original, [2, 4]);\nconsole.log(original); // [1, 2, 3, 4, 5] (未改变)\nconsole.log(arr2); // [1, 3, 5]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除值的数组。\n- `valuesToRemove` (`readonly unknown[]`): 要从数组中移除的值的数组。\n\n#### 返回值\n\n(`T[]`): 移除了指定值的原数组。原数组被修改后返回。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/pullAt.md",
    "content": "# pullAt\n\n从数组中移除指定索引的元素,并返回被移除的元素。\n\n```typescript\nconst removed = pullAt(arr, indices);\n```\n\n## 用法\n\n### `pullAt(arr, indicesToRemove)`\n\n当您想移除数组特定位置的元素时,请使用 `pullAt`。此函数修改原数组,并将被移除的元素作为新数组返回。也支持负数索引,从数组末尾开始计算。\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\n// 一次移除多个索引的元素\nconst numbers = [10, 20, 30, 40, 50];\nconst removed = pullAt(numbers, [1, 3, 4]);\nconsole.log(removed); // [20, 40, 50]\nconsole.log(numbers); // [10, 30]\n\n// 即使有重复的索引也能安全处理\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst removedFruits = pullAt(fruits, [1, 2, 1]);\nconsole.log(removedFruits); // ['banana', 'cherry', 'banana']\nconsole.log(fruits); // ['apple', 'date']\n```\n\n如果指定了不存在的索引,该位置将返回 `undefined`。\n\n```typescript\nimport { pullAt } from 'es-toolkit/array';\n\nconst items = [1, 2, 3];\nconst removed = pullAt(items, [0, 5, 2]);\nconsole.log(removed); // [1, undefined, 3]\nconsole.log(items); // [2]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要移除元素的数组。\n- `indicesToRemove` (`number[]`): 要移除的元素的索引数组。负数索引从数组末尾开始计算。\n\n#### 返回值\n\n(`T[]`): 由被移除的元素组成的新数组。对于不存在的索引包含 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/reduceAsync.md",
    "content": "# reduceAsync\n\n使用异步归约函数将数组归约为单个值。\n\n```typescript\nconst result = await reduceAsync(array, reducer, initialValue);\n```\n\n## 参考\n\n### `reduceAsync(array, reducer, initialValue)`\n\n当需要通过顺序处理每个元素将数组归约为单个值时，使用 `reduceAsync`。归约函数从左到右顺序应用于每个元素，将一个调用的累积结果传递给下一个调用。\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 获取每个数字的异步值并求和。\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + (await fetchValue(n)), 0);\n// 返回：所有获取值的总和\n\n// 将数组转换为对象。\nconst users = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst userMap = await reduceAsync(\n  users,\n  async (acc, user) => {\n    const details = await fetchUserDetails(user.id);\n    acc[user.id] = details;\n    return acc;\n  },\n  {} as Record<number, any>\n);\n// 返回：{ 1: {...}, 2: {...}, 3: {...} }\n```\n\n与其他异步数组方法不同，`reduceAsync` 必须顺序处理元素，不支持并发执行，因为下一步需要上一步的结果。\n\n#### 参数\n\n- `array` (`readonly T[]`)：要归约的数组。\n- `reducer` (`(accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>`)：处理每个元素的异步函数。它接收累积值和当前值，并返回新的累积值。\n- `initialValue` (`U`)：累加器的初始值。\n\n#### 返回值\n\n(`Promise<U>`)：一个解析为最终累积值的 Promise。\n\n---\n\n### `reduceAsync(array, reducer)`\n\n在没有初始值的情况下归约数组时，第一个元素用作初始值，归约函数从第二个元素开始应用。\n\n```typescript\nimport { reduceAsync } from 'es-toolkit/array';\n\n// 在没有初始值的情况下计算总和。\nconst numbers = [1, 2, 3, 4, 5];\nconst sum = await reduceAsync(numbers, async (acc, n) => acc + n);\n// 返回：15 (1 + 2 + 3 + 4 + 5)\n\n// 空数组返回 undefined。\nconst emptyArray: number[] = [];\nconst result = await reduceAsync(emptyArray, async (acc, n) => acc + n);\n// 返回：undefined\n```\n\n在没有初始值的情况下对空数组调用 `reduceAsync` 会返回 `undefined`。\n\n#### 参数\n\n- `array` (`readonly T[]`)：要归约的数组。\n- `reducer` (`(accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>`)：处理每个元素的异步函数。它接收累积值和当前值，并返回新的累积值。\n\n#### 返回值\n\n(`Promise<T | undefined>`)：一个解析为最终累积值的 Promise。如果数组为空，则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/remove.md",
    "content": "# remove\n\n根据条件函数从数组中移除元素,并将被移除的元素作为新数组返回。此函数会直接修改原数组。\n\n```typescript\nconst removed = remove(arr, shouldRemoveElement);\n```\n\n## 用法\n\n### `remove(arr, shouldRemoveElement)`\n\n当您想从数组中移除满足特定条件的元素并查看被移除的元素时,请使用 `remove`。此函数在修改原数组的同时,将被移除的元素作为单独的数组返回。如果想保持原数组不变,请使用 `filter` 方法。\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// 移除偶数\nconst numbers = [1, 2, 3, 4, 5];\nconst removedNumbers = remove(numbers, value => value % 2 === 0);\nconsole.log(numbers); // [1, 3, 5] (原数组被修改)\nconsole.log(removedNumbers); // [2, 4] (被移除的元素)\n\n// 移除满足特定条件的对象\nconst users = [\n  { name: 'john', age: 25 },\n  { name: 'jane', age: 17 },\n  { name: 'bob', age: 30 },\n];\nconst minors = remove(users, user => user.age < 18);\nconsole.log(users); // [{ name: 'john', age: 25 }, { name: 'bob', age: 30 }]\nconsole.log(minors); // [{ name: 'jane', age: 17 }]\n```\n\n也可以使用索引和原数组信息。\n\n```typescript\nimport { remove } from 'es-toolkit/array';\n\n// 基于索引移除元素\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst removedAtEvenIndex = remove(items, (value, index) => index % 2 === 0);\nconsole.log(items); // ['b', 'd']\nconsole.log(removedAtEvenIndex); // ['a', 'c', 'e']\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要修改的数组。\n- `shouldRemoveElement` (`(value: T, index: number, array: T[]) => boolean`): 对每个元素调用的条件函数。返回 `true` 时该元素会被移除。\n  - `value`: 当前正在处理的元素。\n  - `index`: 当前元素的索引。\n  - `array`: 原数组。\n\n#### 返回值\n\n(`T[]`): 返回由被移除元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/sample.md",
    "content": "# sample\n\n从数组中随机返回一个元素。\n\n```typescript\nconst randomElement = sample(arr);\n```\n\n## 用法\n\n### `sample(arr)`\n\n当您想从数组中随机获取一个元素时,请使用 `sample`。在游戏中选择随机道具、随机获取测试数据或进行抽签时非常有用。\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 从数字数组中随机选择一个\nconst numbers = [1, 2, 3, 4, 5];\nconst randomNumber = sample(numbers);\n// Returns: 1, 2, 3, 4, 5 中的一个\n\n// 从字符串数组中随机选择一个\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst randomFruit = sample(fruits);\n// Returns: 'apple', 'banana', 'cherry', 'date' 中的一个\n\n// 从对象数组中随机选择一个\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst randomUser = sample(users);\n// Returns: 三个用户中随机选择一个\n```\n\n也可以用于各种类型的数组。\n\n```typescript\nimport { sample } from 'es-toolkit/array';\n\n// 布尔数组\nconst booleans = [true, false];\nconst randomBoolean = sample(booleans);\n// Returns: true 或 false\n\n// 混合类型数组\nconst mixed = [1, 'hello', { key: 'value' }, [1, 2, 3]];\nconst randomItem = sample(mixed);\n// Returns: 数组中的任意元素\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要随机选择元素的数组。\n\n#### 返回值\n\n(`T`): 从数组中随机选择的元素。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/sampleSize.md",
    "content": "# sampleSize\n\n从数组中随机选择指定数量的元素,返回由这些元素组成的新数组。\n\n```typescript\nconst sampled = sampleSize(array, size);\n```\n\n## 用法\n\n### `sampleSize(array, size)`\n\n当您想从数组中随机抽样多个元素时,请使用 `sampleSize`。使用 Floyd 算法高效生成无重复的随机样本。在问卷调查中抽取样本或游戏中随机选择多个道具时非常有用。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\n// 从数字数组中随机选择3个\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst randomNumbers = sampleSize(numbers, 3);\n// Returns: [2, 7, 9] (示例,实际是随机的)\n\n// 从字符串数组中随机选择2个\nconst fruits = ['apple', 'banana', 'cherry', 'date', 'elderberry'];\nconst randomFruits = sampleSize(fruits, 2);\n// Returns: ['cherry', 'apple'] (示例,实际是随机的)\n```\n\n可以按不同大小进行抽样。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/array';\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\n\n// 选择1个\nconst single = sampleSize(items, 1);\n// Returns: ['c'] (示例)\n\n// 选择与整个数组大小相同的数量(洗牌效果)\nconst all = sampleSize(items, 5);\n// Returns: ['b', 'd', 'a', 'e', 'c'] (示例)\n\n// 选择空数组\nconst none = sampleSize(items, 0);\n// Returns: []\n```\n\n#### 参数\n\n- `array` (`readonly T[]`): 要进行抽样的数组。\n- `size` (`number`): 要选择的元素数量。\n\n#### 返回值\n\n(`T[]`): 返回由随机选择的元素组成的新数组。\n\n#### 错误\n\n如果 `size` 大于数组的长度,会抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/shuffle.md",
    "content": "# shuffle\n\n返回一个元素顺序被随机打乱的新数组。\n\n```typescript\nconst shuffled = shuffle(arr);\n```\n\n## 用法\n\n### `shuffle(arr)`\n\n当您想随机打乱数组中的元素顺序时,请使用 `shuffle`。使用 Fisher-Yates 算法保证完美的随机洗牌,使所有排列都以相同的概率出现。在纸牌游戏中洗牌、随机化测验题目顺序或播放列表随机播放时非常有用。\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// 打乱数字数组\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffledNumbers = shuffle(numbers);\n// Returns: [3, 1, 4, 5, 2] (示例,实际是随机的)\nconsole.log(numbers); // [1, 2, 3, 4, 5] (原数组未改变)\n\n// 打乱字符串数组\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffledFruits = shuffle(fruits);\n// Returns: ['cherry', 'apple', 'date', 'banana'] (示例,实际是随机的)\n```\n\n可以打乱各种类型的数组。\n\n```typescript\nimport { shuffle } from 'es-toolkit/array';\n\n// 打乱对象数组\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst shuffledUsers = shuffle(users);\n// Returns: 用户对象以随机顺序排列的新数组\n\n// 打乱混合类型数组\nconst mixed = [1, 'hello', true, { key: 'value' }];\nconst shuffledMixed = shuffle(mixed);\n// Returns: 元素以随机顺序排列的新数组\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要打乱的数组。\n\n#### 返回值\n\n(`T[]`): 返回元素以随机顺序排列的新数组。原数组不会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/sortBy.md",
    "content": "# sortBy\n\n根据给定的标准对对象数组进行升序排序,返回一个新数组。\n\n```typescript\nconst sorted = sortBy(arr, criteria);\n```\n\n## 用法\n\n### `sortBy(arr, criteria)`\n\n当您想根据多个属性或计算值对对象数组进行排序时,请使用 `sortBy`。提供属性名或转换函数的数组,会按照该顺序设置优先级并进行升序排序。在对表格数据排序或需要复杂排序逻辑时非常有用。\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 按单个属性排序\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 35 },\n];\nconst byAge = sortBy(users, ['age']);\n// Returns: [{ name: 'jane', age: 25 }, { name: 'john', age: 30 }, { name: 'bob', age: 35 }]\n\n// 按多个属性排序\nconst employees = [\n  { name: 'john', department: 'engineering', age: 30 },\n  { name: 'jane', department: 'hr', age: 25 },\n  { name: 'bob', department: 'engineering', age: 35 },\n  { name: 'alice', department: 'engineering', age: 25 },\n];\nconst sorted = sortBy(employees, ['department', 'age']);\n// Returns: 先按部门排序,然后按年龄排序\n// [\n//   { name: 'alice', department: 'engineering', age: 25 },\n//   { name: 'john', department: 'engineering', age: 30 },\n//   { name: 'bob', department: 'engineering', age: 35 },\n//   { name: 'jane', department: 'hr', age: 25 }\n// ]\n```\n\n可以使用函数创建复杂的排序标准。\n\n```typescript\nimport { sortBy } from 'es-toolkit/array';\n\n// 混合使用函数和属性\nconst products = [\n  { name: 'laptop', price: 1000, category: 'electronics' },\n  { name: 'shirt', price: 50, category: 'clothing' },\n  { name: 'phone', price: 800, category: 'electronics' },\n];\n\nconst sorted = sortBy(products, [\n  'category',\n  item => -item.price, // 价格按降序排序\n]);\n// Returns: 先按类别排序,然后按价格从高到低排序\n\n// 按计算值排序\nconst words = ['hello', 'a', 'wonderful', 'world'];\nconst byLength = sortBy(\n  words.map(word => ({ word, length: word.length })),\n  ['length']\n);\n// Returns: 按字符串长度排序的对象数组\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要排序的对象数组。\n- `criteria` (`Array<((item: T) => unknown) | keyof T>`): 排序标准。可以是对象属性名或转换函数的数组,前面的标准优先级更高。\n\n#### 返回值\n\n(`T[]`): 返回根据指定标准按升序排序的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/tail.md",
    "content": "# tail\n\n返回一个新数组,包含除第一个元素外的所有元素。\n\n```typescript\nconst result = tail(arr);\n```\n\n## 用法\n\n### `tail(arr)`\n\n当您想要获取数组中除第一个元素外的所有元素时,请使用 `tail`。如果数组为空或只有一个元素,则返回空数组。这在处理栈或队列中除第一个元素外的其余元素时很有用。\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 从数字数组中排除第一个元素。\nconst numbers = [1, 2, 3, 4, 5];\ntail(numbers);\n// Returns: [2, 3, 4, 5]\n\n// 从字符串数组中排除第一个元素。\nconst strings = ['first', 'second', 'third'];\ntail(strings);\n// Returns: ['second', 'third']\n\n// 只有一个元素的数组返回空数组。\nconst single = [42];\ntail(single);\n// Returns: []\n```\n\n它可以安全地处理空数组和特殊情况。\n\n```typescript\nimport { tail } from 'es-toolkit/array';\n\n// 空数组返回空数组。\nconst empty: number[] = [];\ntail(empty);\n// Returns: []\n\n// 也可以处理嵌套数组。\nconst nested = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\ntail(nested);\n// Returns: [[3, 4], [5, 6]]\n\n// 也可以处理对象数组。\nconst users = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\ntail(users);\n// Returns: [{ id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要排除第一个元素的数组。\n\n#### 返回值\n\n(`T[]`): 返回排除第一个元素的新数组。如果输入数组为空或只有一个元素,则返回空数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/take.md",
    "content": "# take\n\n从数组的开头获取指定数量的元素,创建一个新数组。\n\n```typescript\nconst taken = take(arr, count);\n```\n\n## 用法\n\n### `take(arr, count?)`\n\n当您只需要数组前面的几个元素时,请使用 `take`。如果请求的数量大于数组长度,则返回整个数组。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\n// 获取前3个元素。\ntake([1, 2, 3, 4, 5], 3);\n// Returns: [1, 2, 3]\n\n// 获取前2个元素。\ntake(['a', 'b', 'c'], 2);\n// Returns: ['a', 'b']\n```\n\n如果请求的数量多于数组的元素,则返回整个数组。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n如果省略 `count`,则只获取第一个元素。\n\n```typescript\nimport { take } from 'es-toolkit/array';\n\ntake([1, 2, 3]);\n// Returns: [1]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要获取元素的数组。\n- `count` (`number`, 可选): 要获取的元素数量。默认值为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回包含从数组开头开始的 `count` 个元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/takeRight.md",
    "content": "# takeRight\n\n从数组的末尾获取指定数量的元素,创建一个新数组。\n\n```typescript\nconst taken = takeRight(arr, count);\n```\n\n## 用法\n\n### `takeRight(arr, count?)`\n\n当您只需要数组末尾的几个元素时,请使用 `takeRight`。如果请求的数量大于数组长度,则返回整个数组。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\n// 获取最后2个元素。\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 获取最后2个元素。\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n```\n\n如果请求的数量多于数组的元素,则返回整个数组。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n```\n\n如果省略 `count`,则只获取最后一个元素。\n\n```typescript\nimport { takeRight } from 'es-toolkit/array';\n\ntakeRight([1, 2, 3]);\n// Returns: [3]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要获取元素的数组。\n- `count` (`number`, 可选): 要获取的元素数量。默认值为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回包含从数组末尾开始的 `count` 个元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/takeRightWhile.md",
    "content": "# takeRightWhile\n\n从数组的末尾开始获取元素,直到条件函数返回假为止,返回一个新数组。\n\n```typescript\nconst result = takeRightWhile(arr, shouldContinueTaking);\n```\n\n## 用法\n\n### `takeRightWhile(arr, shouldContinueTaking)`\n\n当您想从数组的末尾开始获取满足条件的元素时,请使用 `takeRightWhile`。遇到条件函数返回假的第一个元素时会停止。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/array';\n\n// 从末尾开始获取小于4的数字\ntakeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n// 结果: [3, 2, 1]\n\n// 从末尾开始获取大于3的数字\ntakeRightWhile([1, 2, 3], n => n > 3);\n// 结果: []\n\n// 获取字符串长度小于等于5的元素\ntakeRightWhile(['hello', 'world', 'foo', 'bar'], str => str.length <= 5);\n// 结果: ['hello', 'world', 'foo', 'bar']\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要获取元素的数组。\n- `shouldContinueTaking` (`(item: T, index: number, array: T[]) => boolean`): 与每个元素、索引和数组一起调用的条件函数。只要此函数返回真,元素就会被包含在结果中。\n\n#### 返回值\n\n(`T[]`): 包含从数组末尾开始获取的、条件函数返回真的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/takeWhile.md",
    "content": "# takeWhile\n\n从数组的开头获取元素,直到条件函数返回假为止,创建一个新数组。\n\n```typescript\nconst taken = takeWhile(arr, predicate);\n```\n\n## 用法\n\n### `takeWhile(arr, predicate)`\n\n当您只需要从数组开头开始满足特定条件的元素时,请使用 `takeWhile`。遇到不满足条件的第一个元素时会停止获取。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\n// 只获取小于3的元素。\ntakeWhile([1, 2, 3, 4], x => x < 3);\n// Returns: [1, 2]\n\n// 从开头就没有大于3的元素,因此返回空数组。\ntakeWhile([1, 2, 3, 4], x => x > 3);\n// Returns: []\n```\n\n也可以用于对象数组。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/array';\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n  { name: 'David', age: 40 },\n];\n\n// 只获取30岁以下的用户。\ntakeWhile(users, user => user.age < 30);\n// Returns: [{ name: 'Alice', age: 25 }]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 要获取元素的数组。\n- `predicate` (`(element: T, index: number, array: T[]) => boolean`): 与每个元素、索引和数组一起调用的条件函数。只要此函数返回真,就会获取元素。\n\n#### 返回值\n\n(`T[]`): 返回包含从开头开始获取的、条件函数返回真的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/toFilled.md",
    "content": "# toFilled\n\n用指定的值填充数组的一部分或全部,创建一个新数组。\n\n```typescript\nconst filled = toFilled(arr, value, start?, end?);\n```\n\n## 用法\n\n### `toFilled(arr, value, start?, end?)`\n\n当您想用指定的值填充数组的特定范围时,请使用 `toFilled`。它不会修改原数组,而是创建并返回一个新数组。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 从索引2到末尾用'*'填充。\ntoFilled(array, '*', 2);\n// Returns: [1, 2, '*', '*', '*']\n\n// 从索引1到4之前用'*'填充。\ntoFilled(array, '*', 1, 4);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n如果省略起始和结束位置,则填充整个数组。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\ntoFilled(array, '*');\n// Returns: ['*', '*', '*', '*', '*']\n```\n\n也可以使用负索引。从数组末尾开始计算。\n\n```typescript\nimport { toFilled } from 'es-toolkit/array';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 从倒数第4个到倒数第1个之前用'*'填充。\ntoFilled(array, '*', -4, -1);\n// Returns: [1, '*', '*', '*', 5]\n```\n\n#### 参数\n\n- `arr` (`T[]`): 作为基础的原数组。\n- `value` (`U`): 用于填充数组的值。\n- `start` (`number`, 可选): 填充的起始位置。默认值为 `0`。\n- `end` (`number`, 可选): 填充的结束位置。默认值为数组的长度。\n\n#### 返回值\n\n(`Array<T | U>`): 返回指定范围已用值填充的新数组。原数组不会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/union.md",
    "content": "# union\n\n创建一个包含两个数组所有唯一元素的新数组。\n\n```typescript\nconst unified = union(arr1, arr2);\n```\n\n## 用法\n\n### `union(arr1, arr2)`\n\n当您想将多个数组的所有元素合并为一个且不重复时,请使用 `union`。它将两个数组合并后,返回一个去除重复值的新数组。\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\n// 求数字数组的并集。\nconst array1 = [1, 2, 3];\nconst array2 = [3, 4, 5];\nunion(array1, array2);\n// Returns: [1, 2, 3, 4, 5]\n\n// 求字符串数组的并集。\nconst fruits1 = ['apple', 'banana'];\nconst fruits2 = ['banana', 'orange'];\nunion(fruits1, fruits2);\n// Returns: ['apple', 'banana', 'orange']\n```\n\n第一个数组的元素先出现,然后添加第二个数组的唯一元素。\n\n```typescript\nimport { union } from 'es-toolkit/array';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = [2, 3, 4, 5];\nunion(arr1, arr2);\n// Returns: [1, 2, 3, 4, 5]\n// 1, 2, 3来自arr1,4, 5来自arr2。\n```\n\n#### 参数\n\n- `arr1` (`T[]`): 要合并的第一个数组。\n- `arr2` (`T[]`): 要合并的第二个数组。\n\n#### 返回值\n\n(`T[]`): 返回包含两个数组所有唯一元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/unionBy.md",
    "content": "# unionBy\n\n根据特定函数转换后的值,创建一个包含两个数组唯一元素的新数组。\n\n```typescript\nconst unified = unionBy(arr1, arr2, mapper);\n```\n\n## 用法\n\n### `unionBy(arr1, arr2, mapper)`\n\n当您想根据特定属性从对象数组中去除重复项时,请使用 `unionBy`。如果 `mapper` 函数返回的值相同,则将其视为相同元素。\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\n// 根据id求对象的并集。\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nunionBy(users1, users2, user => user.id);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n\n// 根据数字除以3的余数求并集。\nconst nums1 = [1, 2, 3];\nconst nums2 = [4, 5, 6];\nunionBy(nums1, nums2, x => x % 3);\n// Returns: [1, 2, 3]\n// 1 % 3 = 1, 2 % 3 = 2, 3 % 3 = 0,\n// 4 % 3 = 1, 5 % 3 = 2, 6 % 3 = 0,所以都重复了。\n```\n\n使用自定义比较函数也可以根据复杂标准求并集。\n\n```typescript\nimport { unionBy } from 'es-toolkit/array';\n\nconst products1 = [\n  { category: 'electronics', price: 100 },\n  { category: 'books', price: 20 },\n];\nconst products2 = [\n  { category: 'electronics', price: 150 },\n  { category: 'toys', price: 30 },\n];\n\n// 根据类别求并集。\nunionBy(products1, products2, product => product.category);\n// Returns: [\n//   { category: 'electronics', price: 100 },\n//   { category: 'books', price: 20 },\n//   { category: 'toys', price: 30 }\n// ]\n```\n\n#### 参数\n\n- `arr1` (`T[]`): 要合并的第一个数组。\n- `arr2` (`T[]`): 要合并的第二个数组。\n- `mapper` (`(item: T) => U`): 将每个元素转换为用于比较的值的函数。\n\n#### 返回值\n\n(`T[]`): 返回根据 `mapper` 函数返回的值去除重复后的两个数组的并集。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/unionWith.md",
    "content": "# unionWith\n\n根据自定义相等函数,创建一个包含两个数组唯一元素的新数组。\n\n```typescript\nconst unified = unionWith(arr1, arr2, areItemsEqual);\n```\n\n## 用法\n\n### `unionWith(arr1, arr2, areItemsEqual)`\n\n当您想根据复杂条件判断元素是否相等时,请使用 `unionWith`。如果提供的函数返回真,则将两个元素判断为相同并去除重复。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// 根据对象的id求并集。\nconst array1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst array2 = [\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n];\nconst areItemsEqual = (a, b) => a.id === b.id;\nunionWith(array1, array2, areItemsEqual);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]\n```\n\n也可以使用更复杂的比较逻辑。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\n// 根据坐标求并集。\nconst points1 = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n];\nconst points2 = [\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\nconst arePointsEqual = (p1, p2) => p1.x === p2.x && p1.y === p2.y;\nunionWith(points1, points2, arePointsEqual);\n// Returns: [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 }]\n```\n\n忽略大小写的字符串比较示例。\n\n```typescript\nimport { unionWith } from 'es-toolkit/array';\n\nconst words1 = ['Apple', 'banana'];\nconst words2 = ['BANANA', 'orange'];\nconst areWordsEqual = (a, b) => a.toLowerCase() === b.toLowerCase();\nunionWith(words1, words2, areWordsEqual);\n// Returns: ['Apple', 'banana', 'orange']\n// 'banana'和'BANANA'被判断为相同,因此只保留第一个。\n```\n\n#### 参数\n\n- `arr1` (`T[]`): 要合并的第一个数组。\n- `arr2` (`T[]`): 要合并的第二个数组。\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 判断两个元素是否相同的函数。如果判断为相同则应返回 `true`,否则返回 `false`。\n\n#### 返回值\n\n(`T[]`): 返回根据自定义相等函数去除重复后的两个数组的并集。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/uniq.md",
    "content": "# uniq\n\n返回去除数组中重复元素后的新数组。\n\n```typescript\nconst uniqueArray = uniq(arr);\n```\n\n## 用法\n\n### `uniq(arr)`\n\n当您想去除数组中的重复值,只保留唯一值时,请使用 `uniq`。它会保持原数组中首次出现的顺序。\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\n// 从数字数组中去除重复项。\nconst numbers = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueNumbers = uniq(numbers);\nconsole.log(uniqueNumbers); // [1, 2, 3, 4, 5]\n\n// 从字符串数组中去除重复项。\nconst words = ['apple', 'banana', 'apple', 'cherry', 'banana'];\nconst uniqueWords = uniq(words);\nconsole.log(uniqueWords); // ['apple', 'banana', 'cherry']\n\n// 从对象数组中去除引用相同的对象。\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst obj3 = { id: 3 };\nconst objects = [obj1, obj2, obj1, obj3, obj2];\nconst uniqueObjects = uniq(objects);\nconsole.log(uniqueObjects); // [{ id: 1 }, { id: 2 }, { id: 3 }]\n```\n\n对于空数组返回空数组。\n\n```typescript\nimport { uniq } from 'es-toolkit/array';\n\nconst emptyArray = uniq([]);\nconsole.log(emptyArray); // []\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要去除重复项的数组。\n\n#### 返回值\n\n(`T[]`): 去除重复项后的新数组。保持原数组中首次出现的顺序。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/uniqBy.md",
    "content": "# uniqBy\n\n根据转换函数返回的值,返回去除数组中重复元素后的新数组。\n\n```typescript\nconst uniqueArray = uniqBy(arr, mapper);\n```\n\n## 用法\n\n### `uniqBy(arr, mapper)`\n\n当您想根据特定标准转换数组元素来判断重复时,请使用 `uniqBy`。对于转换函数返回相同值的元素,只保留首次出现的元素。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\n// 将小数向下取整转换后去除重复项。\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqBy(numbers, Math.floor);\nconsole.log(result); // [1.2, 2.1, 3.2, 5.7, 7.19]\n\n// 根据对象数组的特定属性去除重复项。\nconst users = [\n  { id: 1, name: 'john', age: 30 },\n  { id: 2, name: 'jane', age: 30 },\n  { id: 3, name: 'joe', age: 25 },\n  { id: 4, name: 'jenny', age: 25 },\n];\nconst uniqueByAge = uniqBy(users, user => user.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'john', age: 30 }, { id: 3, name: 'joe', age: 25 }]\n\n// 根据字符串长度去除重复项。\nconst words = ['apple', 'pie', 'banana', 'cat', 'dog'];\nconst uniqueByLength = uniqBy(words, word => word.length);\nconsole.log(uniqueByLength); // ['apple', 'pie', 'banana']\n```\n\n对于复杂对象也可以根据特定字段的组合进行去重。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/array';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n  { category: 'fruit', name: 'grape' },\n];\n\n// 根据类别去除重复项。\nconst uniqueByCategory = uniqBy(products, item => item.category);\nconsole.log(uniqueByCategory.length); // 2\nconsole.log(uniqueByCategory);\n// [{ category: 'fruit', name: 'apple' }, { category: 'vegetable', name: 'carrot' }]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要去除重复项的数组。\n- `mapper` (`(item: T, index: number, array: readonly T[]) => U`): 将每个元素转换为用于比较的值的函数。它接收元素、索引和数组作为参数。\n\n#### 返回值\n\n(`T[]`): 根据转换函数的结果去除重复项后的新数组。保持原数组中首次出现的顺序。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/uniqWith.md",
    "content": "# uniqWith\n\n使用比较函数去除数组中重复元素后,返回一个新数组。\n\n```typescript\nconst uniqueArray = uniqWith(arr, areItemsEqual);\n```\n\n## 用法\n\n### `uniqWith(arr, areItemsEqual)`\n\n当您想根据自定义比较函数判断两个元素是否相等来去除重复时,请使用 `uniqWith`。对于比较函数返回 `true` 的元素,只保留首次出现的元素。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\n// 将差值小于1的数字视为相同来去除重复项。\nconst numbers = [1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19];\nconst result = uniqWith(numbers, (a, b) => Math.abs(a - b) < 1);\nconsole.log(result); // [1.2, 3.2, 5.7, 7.19]\n\n// 根据特定字段比较对象来去除重复项。\nconst users = [\n  { id: 1, name: 'John', age: 30 },\n  { id: 2, name: 'Jane', age: 30 },\n  { id: 3, name: 'Bob', age: 25 },\n];\nconst uniqueByAge = uniqWith(users, (a, b) => a.age === b.age);\nconsole.log(uniqueByAge);\n// [{ id: 1, name: 'John', age: 30 }, { id: 3, name: 'Bob', age: 25 }]\n\n// 不区分大小写比较字符串来去除重复项。\nconst words = ['Apple', 'APPLE', 'banana', 'Banana', 'cherry'];\nconst uniqueCaseInsensitive = uniqWith(words, (a, b) => a.toLowerCase() === b.toLowerCase());\nconsole.log(uniqueCaseInsensitive); // ['Apple', 'banana', 'cherry']\n```\n\n也可以进行复杂的对象比较。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/array';\n\nconst products = [\n  { name: 'iPhone', brand: 'Apple', price: 1000 },\n  { name: 'Galaxy', brand: 'Samsung', price: 900 },\n  { name: 'iPhone', brand: 'Apple', price: 1100 }, // 相同的name和brand\n  { name: 'Pixel', brand: 'Google', price: 800 },\n];\n\n// 当名称和品牌都相同时判断为重复。\nconst uniqueProducts = uniqWith(products, (a, b) => a.name === b.name && a.brand === b.brand);\nconsole.log(uniqueProducts);\n// [\n//   { name: 'iPhone', brand: 'Apple', price: 1000 },\n//   { name: 'Galaxy', brand: 'Samsung', price: 900 },\n//   { name: 'Pixel', brand: 'Google', price: 800 }\n// ]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要去除重复项的数组。\n- `areItemsEqual` (`(item1: T, item2: T) => boolean`): 判断两个元素是否相同的比较函数。如果两个元素相同应返回 `true`,否则返回 `false`。\n\n#### 返回值\n\n(`T[]`): 根据比较函数去除重复项后的新数组。保持原数组中首次出现的顺序。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/unzip.md",
    "content": "# unzip\n\n将绑定在一起的数组解开,将相同位置的元素收集成新数组并返回。\n\n```typescript\nconst unzippedArrays = unzip(zipped);\n```\n\n## 用法\n\n### `unzip(zipped)`\n\n当您想从绑定在一起的二维数组中收集相同索引的元素创建新数组时,请使用 `unzip`。这是 zip 的相反操作。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\n// 解开绑定了字符串、布尔值、数字的数组。\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n  ['c', true, 3],\n];\nconst result = unzip(zipped);\nconsole.log(result);\n// [['a', 'b', 'c'], [true, false, true], [1, 2, 3]]\n\n// 解开绑定了用户信息的数组。\nconst users = [\n  ['john', 30, 'engineer'],\n  ['jane', 25, 'designer'],\n  ['bob', 35, 'manager'],\n];\nconst [names, ages, roles] = unzip(users);\nconsole.log(names); // ['john', 'jane', 'bob']\nconsole.log(ages); // [30, 25, 35]\nconsole.log(roles); // ['engineer', 'designer', 'manager']\n```\n\n也可以处理长度不同的数组。较短数组的空位会用 `undefined` 填充。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst mixed = [[1, 'a'], [2, 'b', true], [3]];\nconst result = unzip(mixed);\nconsole.log(result);\n// [[1, 2, 3], ['a', 'b', undefined], [undefined, true, undefined]]\n```\n\n传入空数组返回空数组。\n\n```typescript\nimport { unzip } from 'es-toolkit/array';\n\nconst empty = unzip([]);\nconsole.log(empty); // []\n```\n\n#### 参数\n\n- `zipped` (`ReadonlyArray<[...T]>`): 要解开的绑定在一起的二维数组。\n\n#### 返回值\n\n(`Unzip<T>`): 将相同位置的元素收集在一起的新数组。如果原数组长度不同,较短数组的空位会用 `undefined` 填充。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/unzipWith.md",
    "content": "# unzipWith\n\n解开绑定在一起的数组,并应用转换函数,返回一个新数组。\n\n```typescript\nconst transformedArray = unzipWith(target, iteratee);\n```\n\n## 用法\n\n### `unzipWith(target, iteratee)`\n\n当您想从绑定在一起的二维数组中收集相同位置的元素并应用转换函数获得结果时,请使用 `unzipWith`。它与 `unzip` 类似,但可以用自定义函数转换每组元素。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\n// 将相同位置的数字相加。\nconst numbers = [\n  [1, 2],\n  [3, 4],\n  [5, 6],\n];\nconst sums = unzipWith(numbers, (a, b, c) => a + b + c);\nconsole.log(sums); // [9, 12] (1+3+5=9, 2+4+6=12)\n\n// 将相同位置的字符串连接起来。\nconst words = [\n  ['hello', 'world'],\n  ['foo', 'bar'],\n  ['es', 'toolkit'],\n];\nconst combined = unzipWith(words, (a, b, c) => a + b + c);\nconsole.log(combined); // ['hellofooes', 'worldbartoolkit']\n\n// 计算对象数组中特定属性的平均值。\nconst scores = [\n  [{ score: 80 }, { score: 90 }],\n  [{ score: 85 }, { score: 95 }],\n  [{ score: 75 }, { score: 88 }],\n];\nconst averages = unzipWith(scores, (a, b, c) => (a.score + b.score + c.score) / 3);\nconsole.log(averages); // [80, 91] (80+85+75)/3, (90+95+88)/3\n```\n\n如果数组长度不同,会传递 undefined。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst mixed = [\n  [1, 4],\n  [2, 5],\n  [3], // 长度不同\n];\nconst result = unzipWith(mixed, (a, b, c) => {\n  // c可能为undefined\n  return (a || 0) + (b || 0) + (c || 0);\n});\nconsole.log(result); // [6, 9] (1+2+3, 4+5+0)\n```\n\n传入空数组将会抛出异常。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/array';\n\nconst empty = unzipWith([], (a, b) => a + b);\nconsole.log(empty); // 抛出异常\n```\n\n#### 参数\n\n- `target` (`readonly T[][]`): 要解开和转换的绑定在一起的二维数组。\n- `iteratee` (`(...args: T[]) => R`): 接收相同位置的元素并转换为新值的函数。\n\n#### 返回值\n\n(`R[]`): 应用转换函数后生成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/windowed.md",
    "content": "# windowed\n\n指定大小的窗口沿着数组均匀滑动,返回包含每个窗口快照的新数组。\n\n```typescript\nconst windows = windowed(arr, size, step?, options?);\n```\n\n## 用法\n\n### `windowed(arr, size, step?, options?)`\n\n当您想让指定大小的窗口沿着数组均匀滑动并返回包含每个窗口快照的数组时,请使用 `windowed`。\n\n在时间序列数据分析中计算移动平均值、从字符串中提取 n-gram、或在数组中查找特定模式时很有用。也可以用于按批次处理数据或实现滑动窗口算法。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\n// 基本用法 - 创建大小为3的窗口。\nconst numbers = [1, 2, 3, 4, 5];\nconst result = windowed(numbers, 3);\nconsole.log(result); // [[1, 2, 3], [2, 3, 4], [3, 4, 5]]\n\n// 指定step来调整窗口间隔。\nconst data = [1, 2, 3, 4, 5, 6, 7, 8];\nconst stepped = windowed(data, 3, 2);\nconsole.log(stepped); // [[1, 2, 3], [3, 4, 5], [5, 6, 7]]\n\n// 也可以用于字符串数组。\nconst words = ['a', 'b', 'c', 'd', 'e'];\nconst wordWindows = windowed(words, 2);\nconsole.log(wordWindows); // [['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']]\n```\n\n如果想包含部分窗口,请使用 `partialWindows` 选项。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst numbers = [1, 2, 3, 4, 5, 6];\n\n// 不包含部分窗口(默认)\nconst complete = windowed(numbers, 4, 3);\nconsole.log(complete); // [[1, 2, 3, 4]]\n\n// 包含部分窗口\nconst withPartial = windowed(numbers, 4, 3, { partialWindows: true });\nconsole.log(withPartial); // [[1, 2, 3, 4], [4, 5, 6]]\n```\n\n每个快照以数组形式提供,最后几个数组可能包含的元素少于指定大小。\n\n```typescript\nimport { windowed } from 'es-toolkit/array';\n\nconst small = [1, 2];\n\n// 当窗口大于数组时\nconsole.log(windowed(small, 5)); // []\nconsole.log(windowed(small, 5, 1, { partialWindows: true })); // [[1, 2], [2]]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要创建窗口的数组。\n- `size` (`number`): 每个窗口的大小。必须是大于1的整数。\n- `step` (`number`, 可选): 窗口之间的间隔。必须是大于1的整数,默认值为 `1`。\n- `options.partialWindows` (`boolean`, 可选): 是否在数组末尾包含不完整的窗口。默认值为 `false`。\n\n#### 返回值\n\n(`T[][]`): 以指定大小和间隔创建的窗口数组。\n\n#### 错误\n\n- 当 `size` 或 `step` 不是正整数时会抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/without.md",
    "content": "# without\n\n创建一个排除特定值的新数组。\n\n```typescript\nconst filtered = without(arr, ...values);\n```\n\n## 用法\n\n### `without(arr, ...values)`\n\n当您想从数组中删除不需要的特定值时,请使用 `without`。原数组不会被修改,返回已删除指定值的新数组。\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\n// 从数字数组中删除特定值。\nwithout([1, 2, 3, 4, 5], 2, 4);\n// Returns: [1, 3, 5]\n\n// 从字符串数组中删除特定值。\nwithout(['a', 'b', 'c', 'a'], 'a');\n// Returns: ['b', 'c']\n```\n\n也能正确处理 `NaN` 值。\n\n```typescript\nimport { without } from 'es-toolkit/array';\n\nwithout([1, NaN, 3, NaN, 5], NaN);\n// Returns: [1, 3, 5]\n```\n\n#### 参数\n\n- `arr` (`readonly T[]`): 要删除值的数组。\n- `values` (`...T[]`): 要从数组中删除的值。\n\n#### 返回值\n\n(`T[]`): 返回已删除指定值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/xor.md",
    "content": "# xor\n\n创建一个只包含两个数组中的一个数组中存在的元素的新数组。\n\n```typescript\nconst result = xor(arr1, arr2);\n```\n\n## 用法\n\n### `xor(arr1, arr2)`\n\n当您想求两个数组的对称差集时,请使用 `xor`。返回一个由只存在于两个数组之一且不在交集中的元素组成的新数组。\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\n// 求数字数组的对称差集。\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// Returns: [1, 2, 5, 6]\n\n// 求字符串数组的对称差集。\nxor(['a', 'b'], ['b', 'c']);\n// Returns: ['a', 'c']\n```\n\n重复元素会自动删除。\n\n```typescript\nimport { xor } from 'es-toolkit/array';\n\nxor([1, 2, 2, 3], [3, 4, 4, 5]);\n// Returns: [1, 2, 4, 5]\n```\n\n#### 参数\n\n- `arr1` (`readonly T[]`): 要比较的第一个数组。\n- `arr2` (`readonly T[]`): 要比较的第二个数组。\n\n#### 返回值\n\n(`T[]`): 返回表示两个数组对称差集的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/xorBy.md",
    "content": "# xorBy\n\n根据给定函数转换每个元素后的值,创建一个只包含两个数组中的一个数组中存在的元素的新数组。\n\n```typescript\nconst result = xorBy(arr1, arr2, mapper);\n```\n\n## 用法\n\n### `xorBy(arr1, arr2, mapper)`\n\n当您想根据特定标准比较两个数组的元素并求对称差集时,请使用 `xorBy`。用映射函数转换每个元素后,创建一个只存在于两个数组之一的元素的新数组。\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\n// 根据对象的id求对称差集。\nxorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], obj => obj.id);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 根据字符串长度求对称差集。\nxorBy(['apple', 'banana'], ['grape', 'cherry', 'apple'], str => str.length);\n// Returns: [] (所有长度都重复)\n```\n\n映射函数结果相同的元素被视为一个。\n\n```typescript\nimport { xorBy } from 'es-toolkit/array';\n\n// 映射函数结果相同的元素被视为一个。\nxorBy([1, 2, 3, 4], [3, 4, 5, 6], n => n % 3);\n// Returns: [] (所有余数都重复)\n```\n\n#### 参数\n\n- `arr1` (`readonly T[]`): 要比较的第一个数组。\n- `arr2` (`readonly T[]`): 要比较的第二个数组。\n- `mapper` (`(item: T) => U`): 将每个元素转换为可比较值的函数。\n\n#### 返回值\n\n(`T[]`): 返回根据映射函数的结果计算的对称差集的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/xorWith.md",
    "content": "# xorWith\n\n使用给定的比较函数,创建一个只包含两个数组中的一个数组中存在的元素的新数组。\n\n```typescript\nconst result = xorWith(arr1, arr2, areElementsEqual);\n```\n\n## 用法\n\n### `xorWith(arr1, arr2, areElementsEqual)`\n\n当您想用复杂对象或特殊比较条件求对称差集时,请使用 `xorWith`。用用户定义的相等函数比较元素,创建一个只存在于两个数组之一的元素的新数组。\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// 根据对象的id进行比较。\nxorWith(\n  [\n    { id: 1, name: 'Alice' },\n    { id: 2, name: 'Bob' },\n  ],\n  [\n    { id: 2, name: 'Bobby' },\n    { id: 3, name: 'Charlie' },\n  ],\n  (a, b) => a.id === b.id\n);\n// Returns: [{ id: 1, name: 'Alice' }, { id: 3, name: 'Charlie' }]\n\n// 忽略大小写进行比较。\nxorWith(['Apple', 'Banana'], ['APPLE', 'Cherry'], (a, b) => a.toLowerCase() === b.toLowerCase());\n// Returns: ['Banana', 'Cherry']\n```\n\n也可以进行更复杂的比较。\n\n```typescript\nimport { xorWith } from 'es-toolkit/array';\n\n// 根据绝对值进行比较。\nxorWith([-1, -2, 3], [1, 2, -4], (a, b) => Math.abs(a) === Math.abs(b));\n// Returns: [3, -4]\n\n// 进行深层对象比较。\nxorWith(\n  [{ specs: { ram: 8, storage: 256 } }],\n  [{ specs: { ram: 8, storage: 256 } }],\n  (a, b) => a.specs.ram === b.specs.ram && a.specs.storage === b.specs.storage\n);\n// Returns: []\n```\n\n#### 参数\n\n- `arr1` (`readonly T[]`): 要比较的第一个数组。\n- `arr2` (`readonly T[]`): 要比较的第二个数组。\n- `areElementsEqual` (`(item1: T, item2: T) => boolean`): 判断两个元素是否相同的函数。如果相同应返回 `true`,否则返回 `false`。\n\n#### 返回值\n\n(`T[]`): 返回根据自定义相等函数计算的对称差集的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/zip.md",
    "content": "# zip\n\n将多个数组转换为每个数组相同索引元素组成的元组数组。\n\n```typescript\nconst zipped = zip(...arrs);\n```\n\n## 用法\n\n### `zip(...arrs)`\n\n当您想将多个数组中相同位置的元素绑定在一起时,请使用 `zip`。返回一个将每个数组相同索引的元素组成元组的新数组。\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\n// 绑定两个数组。\nzip([1, 2, 3], ['a', 'b', 'c']);\n// Returns: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 绑定三个数组。\nzip([1, 2], ['a', 'b', 'c'], [true, false]);\n// Returns: [[1, 'a', true], [2, 'b', false], [undefined, 'c', undefined]]\n```\n\n如果数组长度不同,会按最长数组的长度对齐。较短数组的空位会用 `undefined` 填充。\n\n```typescript\nimport { zip } from 'es-toolkit/array';\n\nzip([1, 2], ['a', 'b', 'c', 'd']);\n// Returns: [[1, 'a'], [2, 'b'], [undefined, 'c'], [undefined, 'd']]\n```\n\n#### 参数\n\n- `arrs` (`Array<readonly T[]>`): 要绑定的数组。\n\n#### 返回值\n\n(`T[][]`): 返回将每个输入数组对应索引元素组成元组的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/zipObject.md",
    "content": "# zipObject\n\n接收键数组和值数组,创建一个对象。\n\n```typescript\nconst object = zipObject(keys, values);\n```\n\n## 用法\n\n### `zipObject(keys, values)`\n\n当您想将两个数组合并为一个对象时,请使用 `zipObject`。返回一个新对象,第一个数组的元素作为键,第二个数组的元素作为值。\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\n// 将键和值创建为对象。\nzipObject(['a', 'b', 'c'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 如果键更多,值会是undefined。\nzipObject(['a', 'b', 'c', 'd'], [1, 2, 3]);\n// Returns: { a: 1, b: 2, c: 3, d: undefined }\n```\n\n如果值数组更长,超出的值会被忽略。\n\n```typescript\nimport { zipObject } from 'es-toolkit/array';\n\nzipObject(['a', 'b'], [1, 2, 3, 4]);\n// Returns: { a: 1, b: 2 }\n```\n\n#### 参数\n\n- `keys` (`readonly P[]`): 将成为对象键的数组。\n- `values` (`readonly V[]`): 与每个键对应的值数组。\n\n#### 返回值\n\n(`Record<P, V>`): 返回键和值结合的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/array/zipWith.md",
    "content": "# zipWith\n\n用自定义函数结合多个数组,创建一个新数组。\n\n```typescript\nconst result = zipWith(...arrs, combine);\n```\n\n## 用法\n\n### `zipWith(...arrs, combine)`\n\n当您想以期望的方式结合多个数组的相同位置元素时,请使用 `zipWith`。将每个数组相同索引的元素传递给结合函数,用其结果创建新数组。\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\n// 将两个数字数组相加。\nzipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// Returns: [5, 7, 9]\n\n// 连接字符串。\nzipWith(['a', 'b'], ['c', 'd'], ['e', 'f'], (a, b, c) => `${a}${b}${c}`);\n// Returns: ['ace', 'bdf']\n```\n\n如果数组长度不同,会按最长数组的长度对齐。较短数组的空位会传递 `undefined`。\n\n```typescript\nimport { zipWith } from 'es-toolkit/array';\n\nzipWith([1, 2], [10, 20, 30], (a, b) => (a ?? 0) + (b ?? 0));\n// Returns: [11, 22, 30]\n```\n\n#### 参数\n\n- `arrs` (`Array<readonly T[]>`): 要结合的数组。\n- `combine` (`(...items: [...T[], number]) => R`): 接收每个数组对应索引元素,以及索引本身,并返回新值的函数。\n\n#### 返回值\n\n(`R[]`): 返回应用结合函数后组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/castArray.md",
    "content": "# castArray（Lodash 兼容性）\n\n::: warning 使用 `Array.from()` 或数组字面量（`[value]`）\n\n此 `castArray` 函数由于无参数处理和 `undefined` 处理等原因，行为复杂。\n\n请使用更清晰、更现代的 `Array.from()` 或条件数组创建（`Array.isArray(value) ? value : [value]`）。\n\n:::\n\n如果值不是数组，则将其转换为数组。\n\n```typescript\nconst result = castArray(value);\n```\n\n## 用法\n\n### `castArray(value?)`\n\n当你想要确保任何值都变成数组时，使用 `castArray`。如果值已经是数组，则原样返回。否则，创建一个包含该值的新数组。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\n// 将数字转换为数组\ncastArray(1);\n// 返回值：[1]\n\n// 将字符串转换为数组\ncastArray('hello');\n// 返回值：['hello']\n\n// 将对象转换为数组\ncastArray({ a: 1 });\n// 返回值：[{ a: 1 }]\n```\n\n已经是数组的值将原样返回。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray([1, 2, 3]);\n// 返回值：[1, 2, 3]\n\ncastArray(['a', 'b']);\n// 返回值：['a', 'b']\n```\n\n`null` 和 `undefined` 也会转换为数组。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray(null);\n// 返回值：[null]\n\ncastArray(undefined);\n// 返回值：[undefined]\n```\n\n不带参数调用时，返回空数组。\n\n```typescript\nimport { castArray } from 'es-toolkit/compat';\n\ncastArray();\n// 返回值：[]\n```\n\n#### 参数\n\n- `value` (`T | readonly T[]`，可选）：要转换为数组的值。如果不提供参数，则返回空数组。\n\n#### 返回值\n\n(`T[]`)：如果输入已经是数组，则返回该数组；否则返回包含输入值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/chunk.md",
    "content": "# chunk（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 [`chunk`](../../array/chunk.md)\n\n此 `chunk` 函数由于处理 `null`、`undefined` 和默认 `size` 值等原因运行较慢。\n\n请使用 `es-toolkit` 中更快、更现代的 [chunk](../../array/chunk.md) 实现。\n\n:::\n\n将数组划分为指定大小的较小数组。\n\n```typescript\nconst chunked = chunk(arr, size);\n```\n\n## 用法\n\n### `chunk(arr, size?)`\n\n当你想要将一个长数组分割成多个相同大小的较小数组时，使用 `chunk`。如果数组不能被均匀分割，最后一个数组将包含剩余的元素。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\n// 将数字数组分成大小为 2 的块。\nchunk([1, 2, 3, 4], 2);\n// 返回值：[[1, 2], [3, 4]]\n\n// 将字符串数组分成大小为 3 的块。\nchunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n// 返回值：[['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n\n// 当不能均匀分割时\nchunk([1, 2, 3, 4, 5], 2);\n// 返回值：[[1, 2], [3, 4], [5]]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk(null, 2);\n// 返回值：[]\n\nchunk(undefined, 2);\n// 返回值：[]\n```\n\n如果大小为 0 或负数，返回空数组。\n\n```typescript\nimport { chunk } from 'es-toolkit/compat';\n\nchunk([1, 2, 3], 0);\n// 返回值：[]\n\nchunk([1, 2, 3], -1);\n// 返回值：[]\n```\n\n#### 参数\n\n- `arr` (`ArrayLike<T> | null | undefined`): 要划分的数组。\n- `size` (`number`, 可选): 每个较小数组的大小。默认值为 `1`。\n\n#### 返回值\n\n(`T[][]`): 返回按大小 `size` 划分的二维数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/compact.md",
    "content": "# compact（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 [`compact`](../../array/compact.md)\n\n此 `compact` 函数由于处理 `null` 和 `undefined` 值、`size` 默认值处理等原因运行较慢。\n\n请使用 `es-toolkit` 中更快、更现代的 [compact](../../array/compact.md) 实现。\n\n:::\n\n从数组中移除假值。\n\n```typescript\nconst compacted = compact(arr);\n```\n\n## 用法\n\n### `compact(arr)`\n\n当你想要从数组中移除像 `false`、`null`、`0`、`\"\"`、`undefined` 和 `NaN` 这样的假值时,使用 `compact`。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\n// 移除假值\ncompact([0, 1, false, 2, '', 3]);\n// Returns: [1, 2, 3]\n\ncompact(['a', null, 'b', undefined, 'c', NaN]);\n// Returns: ['a', 'b', 'c']\n\n// 也会移除 bigint 0\ncompact([0n, 1n, false, 2n]);\n// Returns: [1n, 2n]\n\n// 处理空数组\ncompact([]);\n// Returns: []\n\n// 当所有值都是假值时\ncompact([false, null, 0, '', undefined, NaN]);\n// Returns: []\n```\n\n真值会保持原样。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact([1, 'hello', true, {}, []]);\n// Returns: [1, 'hello', true, {}, []]\n\n// 非零数字\ncompact([0, -1, 2, -3]);\n// Returns: [-1, 2, -3]\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { compact } from 'es-toolkit/compat';\n\ncompact(null);\n// Returns: []\n\ncompact(undefined);\n// Returns: []\n```\n\n#### 参数\n\n- `arr` (`ArrayLike<T> | null | undefined`): 要压缩的数组。\n\n#### 返回值\n\n(`T[]`): 返回移除假值后的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/concat.md",
    "content": "# concat（Lodash 兼容性）\n\n::: warning 使用展开运算符或 [`Array#concat`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)\n\n此 `concat` 函数由于 Lodash 数组连接方式复杂而效率低下。\n\n请使用更直观、更现代的展开运算符 `[...arr1, ...arr2]` 或使用 `Array#concat` 的 `arr1.concat(arr2)`。\n\n:::\n\n将多个数组和值合并为一个数组。\n\n```typescript\nconst result = concat(...values);\n```\n\n## 用法\n\n### `concat(...values)`\n\n当你想要按顺序连接多个值和数组来创建一个新数组时,使用 `concat`。数组会被展开,单个值会直接添加。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 连接单个值\nconcat(1, 2, 3);\n// Returns: [1, 2, 3]\n\n// 连接数组\nconcat([1, 2], [3, 4]);\n// Returns: [1, 2, 3, 4]\n\n// 连接值和数组\nconcat(1, [2, 3], 4);\n// Returns: [1, 2, 3, 4]\n```\n\n嵌套数组只展开一层。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 嵌套数组只展开一层\nconcat([1, [2, 3]], 4);\n// Returns: [1, [2, 3], 4]\n\n// 更深层嵌套的数组\nconcat([1, [2, [3, 4]]], 5);\n// Returns: [1, [2, [3, 4]], 5]\n```\n\n也可以处理空数组和空值。\n\n```typescript\nimport { concat } from 'es-toolkit/compat';\n\n// 与空数组一起\nconcat([], [1, 2], [], [3]);\n// Returns: [1, 2, 3]\n\n// 没有值的情况\nconcat();\n// Returns: []\n```\n\n#### 参数\n\n- `values` (`...(T | readonly T[])`): 要连接的值和数组。每个数组都会展开一层。\n\n#### 返回值\n\n(`T[]`): 返回按顺序连接所有值和数组元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/countBy.md",
    "content": "# countBy（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 `countBy`\n\n此 `countBy` 函数由于复杂的转换函数处理和类型转换而运行较慢。\n\n请使用 `es-toolkit` 中更快、更现代的 [countBy](../../array/countBy.md)。\n\n:::\n\n根据条件对数组或对象的元素进行分类并计算每个分类的数量。\n\n```typescript\nconst counts = countBy(collection, iteratee);\n```\n\n## 用法\n\n### `countBy(collection, iteratee?)`\n\n当你想要按某个标准对数组或对象的每个元素进行分组,并计算每个组中有多少个元素时,使用 `countBy`。迭代函数返回的值将成为键,该键对应的元素数量将成为值。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 按向下取整对数字分组\ncountBy([6.1, 4.2, 6.3], Math.floor);\n// Returns: { '4': 1, '6': 2 }\n\n// 按长度对字符串分组\ncountBy(['one', 'two', 'three'], 'length');\n// Returns: { '3': 2, '5': 1 }\n\n// 按年龄段对用户分组\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 35 },\n  { name: 'Charlie', age: 25 },\n];\ncountBy(users, user => Math.floor(user.age / 10) * 10);\n// Returns: { '20': 2, '30': 1 }\n```\n\n也可以处理对象。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 按类型对对象的值进行分类\nconst obj = { a: 1, b: 'string', c: 2, d: 'text' };\ncountBy(obj, value => typeof value);\n// Returns: { 'number': 2, 'string': 2 }\n```\n\n不使用迭代函数时,会按值本身分组。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\n// 按值本身分组\ncountBy([1, 2, 1, 3, 2, 1]);\n// Returns: { '1': 3, '2': 2, '3': 1 }\n\n// 按布尔值分组\ncountBy([true, false, true, true]);\n// Returns: { 'true': 3, 'false': 1 }\n```\n\n`null` 或 `undefined` 集合返回空对象。\n\n```typescript\nimport { countBy } from 'es-toolkit/compat';\n\ncountBy(null);\n// Returns: {}\n\ncountBy(undefined);\n// Returns: {}\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 要处理的数组或对象。\n- `iteratee` (`ValueIteratee<T>`, 可选): 决定每个元素分组标准的函数。可以使用函数、属性名或部分对象。\n\n#### 返回值\n\n(`Record<string, number>`): 返回包含每个组的键和该组元素数量的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/difference.md",
    "content": "# difference（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 `difference`\n\n此 `difference` 函数由于处理 `null` 和 `undefined`、多个数组参数处理而变得复杂。\n\n请使用 `es-toolkit` 中更快、更现代的 [difference](../../array/difference.md)。\n\n:::\n\n从第一个数组中排除其他数组的值,求差集。\n\n```typescript\nconst result = difference(arr, ...values);\n```\n\n## 用法\n\n### `difference(arr, ...values)`\n\n当你想要从第一个数组中删除所有包含在其余数组中的值时,使用 `difference`。顺序保持第一个数组的顺序。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 基本用法\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4];\nconst array3 = [5, 6];\ndifference(array1, array2, array3);\n// Returns: [1, 3]\n\n// 字符串数组\ndifference(['a', 'b', 'c'], ['b'], ['c', 'd']);\n// Returns: ['a']\n\n// 处理重复值\ndifference([1, 2, 2, 3], [2]);\n// Returns: [1, 3]\n```\n\n也可以处理空数组或空差集。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 与空数组的差集\ndifference([1, 2, 3], []);\n// Returns: [1, 2, 3]\n\n// 所有值都被排除的情况\ndifference([1, 2, 3], [1, 2, 3]);\n// Returns: []\n\n// 没有重叠值的情况\ndifference([1, 2], [3, 4]);\n// Returns: [1, 2]\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\ndifference(null, [1, 2]);\n// Returns: []\n\ndifference(undefined, [1, 2]);\n// Returns: []\n\ndifference([1, 2, 3], null, undefined);\n// Returns: [1, 2, 3] (null和undefined被忽略)\n```\n\n也支持类数组对象。\n\n```typescript\nimport { difference } from 'es-toolkit/compat';\n\n// 类数组对象\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 4, length: 2 };\ndifference(arrayLike1, arrayLike2);\n// Returns: [1, 3]\n```\n\n#### 参数\n\n- `arr` (`ArrayLike<T> | null | undefined`): 求差集的基准数组。\n- `values` (`...ArrayLike<T>[]`): 包含要排除的值的数组。\n\n#### 返回值\n\n(`T[]`): 返回从第一个数组中排除其他数组值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/differenceBy.md",
    "content": "# differenceBy（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 `differenceBy`\n\n此 `differenceBy` 函数由于复杂的参数处理和迭代器转换而运行较慢。\n\n请使用 `es-toolkit` 中更快、更现代的 [differenceBy](../../array/differenceBy.md)。\n\n:::\n\n根据迭代函数转换的值,从第一个数组中排除其他数组的元素,求差集。\n\n```typescript\nconst result = differenceBy(array, ...values, iteratee);\n```\n\n## 用法\n\n### `differenceBy(array, ...values, iteratee)`\n\n当你想要将第一个数组的每个元素和要排除的数组的元素通过迭代函数转换后,删除产生相同值的元素时,使用 `differenceBy`。在对象数组中按特定属性值或转换值进行比较时很有用。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 按向下取整比较\ndifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n// Returns: [1.2] (因为Math.floor(2.1) === Math.floor(2.3),所以排除2.1)\n\n// 按字符串长度比较\ndifferenceBy(['one', 'two', 'three'], ['four', 'eight'], 'length');\n// Returns: ['one', 'two'] (因为three和eight长度相同,所以排除three)\n\n// 按对象属性比较\nconst users1 = [\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n];\nconst users2 = [{ id: 1, name: 'Different Alice' }];\ndifferenceBy(users1, users2, 'id');\n// Returns: [{ id: 2, name: 'Bob' }] (排除id为1的对象)\n```\n\n可以一次排除多个数组。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 从多个数组中排除\ndifferenceBy([2.1, 1.2, 3.5], [2.3], [1.4], [3.2], Math.floor);\n// Returns: [] (所有元素都被排除)\n\n// 按长度比较字符串数组\ndifferenceBy(['a', 'bb', 'ccc'], ['x'], ['yy'], ['zzz'], 'length');\n// Returns: [] (长度1、2、3都被排除)\n```\n\n没有迭代函数时,像普通 `difference` 一样工作。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\n// 不使用迭代函数\ndifferenceBy([1, 2, 3], [2, 4]);\n// Returns: [1, 3]\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { differenceBy } from 'es-toolkit/compat';\n\ndifferenceBy(null, [1, 2], Math.floor);\n// Returns: []\n\ndifferenceBy(undefined, [1, 2], x => x);\n// Returns: []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 求差集的基准数组。\n- `values` (`...ArrayLike<T>[]`): 包含要排除的值的数组。\n- `iteratee` (`ValueIteratee<T>`): 将每个元素转换为比较值的函数。可以使用函数、属性名或部分对象。\n\n#### 返回值\n\n(`T[]`): 返回根据迭代函数转换的值排除元素后的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/differenceWith.md",
    "content": "# differenceWith（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 `differenceWith`\n\n此 `differenceWith` 函数由于处理 `null` 和 `undefined`、多个数组处理、`ArrayLike` 类型处理等而运行较慢。\n\n请使用 `es-toolkit` 中更快、更现代的 [differenceWith](../../array/differenceWith.md)。\n\n:::\n\n使用比较函数从第一个数组中删除其他数组中包含的元素。\n\n```typescript\nconst result = differenceWith(array, ...values, comparator);\n```\n\n## 用法\n\n### `differenceWith(array, ...values, comparator)`\n\n当你想要用比较函数比较每个元素来求差时,使用 `differenceWith`。最后一个参数成为比较函数。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 按id比较对象\nconst objects = [{ id: 1 }, { id: 2 }, { id: 3 }];\nconst others = [{ id: 2 }];\nconst comparator = (a, b) => a.id === b.id;\n\ndifferenceWith(objects, others, comparator);\n// Returns: [{ id: 1 }, { id: 3 }]\n\n// 一次排除多个数组\nconst array = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\nconst values1 = [{ id: 2 }];\nconst values2 = [{ id: 3 }];\n\ndifferenceWith(array, values1, values2, comparator);\n// Returns: [{ id: 1 }, { id: 4 }]\n```\n\n不提供比较函数时,像普通 `difference` 一样工作。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\n// 不使用比较函数时进行普通比较\ndifferenceWith([1, 2, 3], [2], [3]);\n// Returns: [1]\n```\n\n也可以使用复杂的比较逻辑。\n\n```typescript\nimport { differenceWith } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'alice', age: 25 },\n  { name: 'bob', age: 30 },\n  { name: 'charlie', age: 35 },\n];\nconst excludeUsers = [{ name: 'bob', age: 25 }]; // 不同的年龄\n\n// 只按名称比较\nconst compareByName = (a, b) => a.name === b.name;\ndifferenceWith(users, excludeUsers, compareByName);\n// Returns: [{ name: 'alice', age: 25 }, { name: 'charlie', age: 35 }]\n// bob被排除(即使年龄不同,名称相同)\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 求差的基准数组。\n- `...values` (`Array<ArrayLike<T>>` + `(a: T, b: T) => boolean`): 包含要排除的元素的数组,最后是比较函数。\n\n#### 返回值\n\n(`T[]`): 返回使用比较函数从第一个数组中删除其余数组元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/drop.md",
    "content": "# drop (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `drop`\n\n此 `drop` 函数由于处理 `null` 或 `undefined`、`toInteger` 转换等原因而表现复杂。\n\n请改用更快、更现代的 `es-toolkit` 的 [`drop`](../../array/drop.md)。\n\n:::\n\n从数组的开头删除指定数量的元素。\n\n```typescript\nconst result = drop(array, n);\n```\n\n## 用法\n\n### `drop(array, n?)`\n\n当您想从数组的开头删除几个元素并获取其余元素时,使用 `drop`。默认情况下,它会删除第一个元素。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 基本用法(删除第一个元素)\ndrop([1, 2, 3, 4, 5]);\n// 返回: [2, 3, 4, 5]\n\n// 删除前 2 个元素\ndrop([1, 2, 3, 4, 5], 2);\n// 返回: [3, 4, 5]\n\n// 删除前 3 个元素\ndrop(['a', 'b', 'c', 'd'], 3);\n// 返回: ['d']\n```\n\n指定 0 或负数时,返回原始数组。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 删除 0 个元素\ndrop([1, 2, 3], 0);\n// 返回: [1, 2, 3]\n\n// 指定负数\ndrop([1, 2, 3], -1);\n// 返回: [1, 2, 3]\n```\n\n指定大于数组的数字时,返回空数组。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 指定大于数组大小的数字\ndrop([1, 2, 3], 5);\n// 返回: []\n\n// 从空数组中删除\ndrop([], 1);\n// 返回: []\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\ndrop(null, 1);\n// 返回: []\n\ndrop(undefined, 2);\n// 返回: []\n```\n\n也支持类数组对象。\n\n```typescript\nimport { drop } from 'es-toolkit/compat';\n\n// 类数组对象\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\ndrop(arrayLike, 1);\n// 返回: ['b', 'c']\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要删除元素的数组。\n- `n` (`number`, 可选): 要删除的元素数量。默认为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回从开头删除指定数量元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/dropRight.md",
    "content": "# dropRight (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `dropRight`\n\n此 `dropRight` 函数由于处理 `null` 或 `undefined`、`guard` 参数处理、`toInteger` 转换等原因而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`dropRight`](../../array/dropRight.md)。\n\n:::\n\n从数组的末尾删除指定数量的元素,返回一个新数组。\n\n```typescript\nconst result = dropRight(array, itemsCount);\n```\n\n## 用法\n\n### `dropRight(array, itemsCount)`\n\n当您想从数组的末尾删除特定数量的元素并创建一个包含剩余元素的新数组时,使用 `dropRight`。\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\n// 从数字数组中删除末尾的 2 个元素。\ndropRight([1, 2, 3, 4, 5], 2);\n// 返回: [1, 2, 3]\n\n// 从字符串数组中删除末尾的 1 个元素。\ndropRight(['a', 'b', 'c'], 1);\n// 返回: ['a', 'b']\n\n// 如果未指定要删除的数量,则使用默认值 1。\ndropRight([1, 2, 3]);\n// 返回: [1, 2]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { dropRight } from 'es-toolkit/compat';\n\ndropRight(null, 2); // []\ndropRight(undefined, 2); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要删除元素的数组。\n- `itemsCount` (`number`, 可选): 要从数组末尾删除的元素数量。默认为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回从末尾删除 `itemsCount` 个元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/dropRightWhile.md",
    "content": "# dropRightWhile (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `dropRightWhile`\n\n此 `dropRightWhile` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等原因而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`dropRightWhile`](../../array/dropRightWhile.md)。\n\n:::\n\n根据条件函数从数组的末尾删除元素。\n\n```typescript\nconst result = dropRightWhile(array, predicate);\n```\n\n## 用法\n\n### `dropRightWhile(array, predicate)`\n\n当您想从数组的末尾连续删除满足特定条件的元素时,使用 `dropRightWhile`。当条件函数返回 `false` 时停止删除。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\n// 使用函数作为条件。\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ndropRightWhile(users, user => !user.active);\n// 返回: [{ user: 'barney', active: true }]\n\n// 使用对象模式进行匹配。\ndropRightWhile(users, { user: 'pebbles', active: false });\n// 返回: [{ user: 'barney', active: true }, { user: 'fred', active: false }]\n\n// 以数组形式指定属性和值。\ndropRightWhile(users, ['active', false]);\n// 返回: [{ user: 'barney', active: true }]\n\n// 通过属性名检查条件。\ndropRightWhile(users, 'active');\n// 返回: [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { dropRightWhile } from 'es-toolkit/compat';\n\ndropRightWhile(null, x => x > 0); // []\ndropRightWhile(undefined, x => x > 0); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要删除元素的数组。\n- `predicate` (`ListIteratee<T>`, 可选): 应用于每个元素的条件函数。可以接受函数、对象模式、数组模式或属性名。\n\n#### 返回值\n\n(`T[]`): 返回从第一个不满足条件的元素开始的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/dropWhile.md",
    "content": "# dropWhile (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `dropWhile`\n\n此 `dropWhile` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等原因而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`dropWhile`](../../array/dropWhile.md)。\n\n:::\n\n根据条件函数从数组的开头删除元素。\n\n```typescript\nconst result = dropWhile(array, predicate);\n```\n\n## 用法\n\n### `dropWhile(array, predicate)`\n\n当您想从数组的开头连续删除满足特定条件的元素时,使用 `dropWhile`。当条件函数返回 `false` 时停止删除。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\n// 使用函数作为条件。\ndropWhile([1, 2, 3, 4, 5], n => n < 3);\n// 返回: [3, 4, 5]\n\n// 使用对象模式进行匹配。\nconst users = [\n  { name: 'alice', active: false },\n  { name: 'bob', active: false },\n  { name: 'charlie', active: true },\n];\n\ndropWhile(users, { active: false });\n// 返回: [{ name: 'charlie', active: true }]\n\n// 以数组形式指定属性和值。\ndropWhile(users, ['active', false]);\n// 返回: [{ name: 'charlie', active: true }]\n\n// 通过属性名检查条件。\nconst items = [{ visible: false }, { visible: false }, { visible: true }];\n\ndropWhile(items, 'visible');\n// 返回: [{ visible: false }, { visible: false }, { visible: true }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { dropWhile } from 'es-toolkit/compat';\n\ndropWhile(null, x => x > 0); // []\ndropWhile(undefined, x => x > 0); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要删除元素的数组。\n- `predicate` (`ListIteratee<T>`, 可选): 应用于每个元素的条件函数。可以接受函数、对象模式、数组模式或属性名。默认为 `identity`。\n\n#### 返回值\n\n(`T[]`): 返回从第一个不满足条件的元素开始的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/each.md",
    "content": "# each (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.forEach`\n\n此 `each` 函数由于复杂的类型处理和对各种集合类型的支持而运行缓慢。\n\n请改用更快、更现代的 `Array.prototype.forEach`。\n\n:::\n\n对数组或对象的每个元素执行迭代操作。\n\n```typescript\nconst result = each(collection, iteratee);\n```\n\n## 用法\n\n### `each(collection, iteratee)`\n\n遍历数组、对象或字符串的每个元素并执行给定的函数。对于数组,按索引顺序迭代;对于对象,遍历可枚举属性。\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\n// 遍历数组\neach([1, 2, 3], (value, index) => console.log(value, index));\n// 日志: 1 0, 2 1, 3 2\n\n// 遍历对象\neach({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// 日志: 'a' 1, 'b' 2\n\n// 遍历字符串\neach('hello', (char, index) => console.log(char, index));\n// 日志: 'h' 0, 'e' 1, 'l' 2, 'l' 3, 'o' 4\n```\n\n如果函数返回 `false`,则停止迭代。\n\n```typescript\nimport { each } from 'es-toolkit/compat';\n\neach([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 在 2 处停止\n});\n// 日志: 1, 2\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 要遍历的集合。\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, 可选): 对每个元素执行的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 返回原始集合。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/eachRight.md",
    "content": "# eachRight (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `forEachRight`\n\n此 `eachRight` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等原因而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`forEachRight`](../../array/forEachRight.md)。\n\n:::\n\n对数组或对象的每个元素从右到左执行迭代操作。\n\n```typescript\nconst result = eachRight(collection, iteratee);\n```\n\n## 用法\n\n### `eachRight(collection, iteratee)`\n\n从右到左遍历数组、对象或字符串的每个元素并执行给定的函数。对于数组,从最后一个索引开始逆序迭代;对于对象,以逆序遍历可枚举属性。\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\n// 逆序遍历数组\neachRight([1, 2, 3], (value, index) => console.log(value, index));\n// 日志: 3 2, 2 1, 1 0\n\n// 逆序遍历对象\neachRight({ a: 1, b: 2 }, (value, key) => console.log(key, value));\n// 日志: 'b' 2, 'a' 1\n\n// 逆序遍历字符串\neachRight('hello', (char, index) => console.log(char, index));\n// 日志: 'o' 4, 'l' 3, 'l' 2, 'e' 1, 'h' 0\n```\n\n如果函数返回 `false`,则停止迭代。\n\n```typescript\nimport { eachRight } from 'es-toolkit/compat';\n\neachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  return value !== 2; // 在 2 处停止\n});\n// 日志: 4, 3, 2\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 要遍历的集合。\n- `iteratee` (`(item: any, index: any, collection: any) => unknown`, 可选): 对每个元素执行的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 返回原始集合。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/every.md",
    "content": "# every (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.every()`\n\n此 `every` 函数由于复杂的对象处理、支持各种条件格式等原因而运行缓慢。\n\n请改用更快、更现代的 `Array.prototype.every()`。\n\n:::\n\n检查数组或对象的所有值是否满足给定条件。\n\n```typescript\nconst result = every(collection, predicate);\n```\n\n## 用法\n\n### `every(collection, predicate?)`\n\n当您想检查数组或对象的所有元素是否满足特定条件时,使用 `every`。条件可以以各种格式指定,如函数、部分对象、属性-值对、属性名称等。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\n// 使用检查函数\nconst numbers = [2, 4, 6, 8];\nevery(numbers, x => x % 2 === 0);\n// 返回: true\n\n// 使用属性名称\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n];\nevery(users, 'active');\n// 返回: true\n\n// 使用部分对象\nevery(users, { active: true });\n// 返回: true\n\n// 使用属性-值对\nevery(users, ['active', true]);\n// 返回: true\n```\n\n对象的操作方式相同。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 85, science: 92 };\nevery(scores, score => score >= 80);\n// 返回: true\n```\n\n`null` 或 `undefined` 被视为空集合并返回 `true`。\n\n```typescript\nimport { every } from 'es-toolkit/compat';\n\nevery(null);\n// 返回: true\n\nevery(undefined);\n// 返回: true\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 要检查的数组或对象。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 可选): 检查条件。可以使用函数、部分对象、属性-值对或属性名称。默认为 `identity` 函数。\n\n#### 返回值\n\n(`boolean`): 如果所有元素满足条件则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/fill.md",
    "content": "# fill (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `fill`\n\n此 `fill` 函数由于处理 `null` 或 `undefined`、支持类数组对象等原因而表现复杂。\n\n请改用更快、更现代的 `es-toolkit` 的 [`fill`](../../array/fill.md)。\n\n:::\n\n用指定的值填充数组的元素。\n\n```typescript\nconst result = fill(array, value, start, end);\n```\n\n## 用法\n\n### `fill(array, value, start?, end?)`\n\n当您想用相同的值填充数组的特定范围或整个数组时,使用 `fill`。它会直接修改原始数组。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\n// 填充整个数组\nconst arr1 = [1, 2, 3];\nfill(arr1, 'a');\n// 返回: ['a', 'a', 'a']\n\n// 填充特定范围\nconst arr2 = [1, 2, 3, 4, 5];\nfill(arr2, '*', 1, 4);\n// 返回: [1, '*', '*', '*', 5]\n\n// 使用负数索引\nconst arr3 = [1, 2, 3, 4, 5];\nfill(arr3, 'x', -3, -1);\n// 返回: [1, 2, 'x', 'x', 5]\n```\n\n也支持类数组对象。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 1, 1: 2, 2: 3, length: 3 };\nfill(arrayLike, 'a', 1, 2);\n// 返回: { 0: 1, 1: 'a', 2: 3, length: 3 }\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill(null, 'a');\n// 返回: []\n\nfill(undefined, 'a');\n// 返回: []\n```\n\n字符串是只读的,因此按原样返回。\n\n```typescript\nimport { fill } from 'es-toolkit/compat';\n\nfill('abc', 'x');\n// 返回: 'abc' (未修改)\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要填充的数组。\n- `value` (`U`): 用于填充数组的值。\n- `start` (`number`, 可选): 起始位置。默认为 `0`。\n- `end` (`number`, 可选): 结束位置(不包括)。默认为 `array.length`。\n\n#### 返回值\n\n(`ArrayLike<T | U>`): 返回用值填充的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/filter.md",
    "content": "# filter (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.filter()`\n\n此 `filter` 函数由于复杂的对象处理、支持各种条件格式等原因而运行缓慢。\n\n请改用更快、更现代的 `Array.prototype.filter()`。\n\n:::\n\n创建一个包含满足给定条件的元素的新数组。\n\n```typescript\nconst result = filter(collection, predicate);\n```\n\n## 用法\n\n### `filter(collection, predicate)`\n\n当您想从数组或对象中筛选出满足特定条件的元素时,使用 `filter`。条件可以以各种格式指定,如函数、部分对象、属性-值对、属性名称等。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\n// 使用检查函数\nconst numbers = [1, 2, 3, 4, 5];\nfilter(numbers, x => x % 2 === 0);\n// 返回: [2, 4]\n\n// 使用属性名称\nconst users = [\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: false },\n  { name: 'Charlie', active: true },\n];\nfilter(users, 'active');\n// 返回: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// 使用部分对象\nfilter(users, { active: true });\n// 返回: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n\n// 使用属性-值对\nfilter(users, ['active', true]);\n// 返回: [{ name: 'Alice', active: true }, { name: 'Charlie', active: true }]\n```\n\n对象的操作方式相同,返回满足条件的值的数组。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfilter(scores, score => score >= 80);\n// 返回: [90, 85]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { filter } from 'es-toolkit/compat';\n\nfilter(null, x => x > 0);\n// 返回: []\n\nfilter(undefined, x => x > 0);\n// 返回: []\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 要过滤的数组或对象。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): 过滤条件。可以使用函数、部分对象、属性-值对或属性名称。\n\n#### 返回值\n\n(`T[]`): 返回由满足条件的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/find.md",
    "content": "# find (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.find()`\n\n此 `find` 函数由于复杂的对象处理、支持各种条件格式等原因而运行缓慢。\n\n请改用更快、更现代的 `Array.prototype.find()`。\n\n:::\n\n在数组或对象中查找满足条件的第一个元素。\n\n```typescript\nconst result = find(collection, predicate, fromIndex);\n```\n\n## 用法\n\n### `find(collection, predicate, fromIndex?)`\n\n当您想在数组或对象中查找满足特定条件的第一个元素时,使用 `find`。条件可以以各种格式指定,如函数、部分对象、属性-值对、属性名称等。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\n// 使用检查函数\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 3);\n// 返回: 4\n\n// 使用属性名称\nconst users = [\n  { name: 'Alice', active: false },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n];\nfind(users, 'active');\n// 返回: { name: 'Bob', active: true }\n\n// 使用部分对象\nfind(users, { active: true });\n// 返回: { name: 'Bob', active: true }\n\n// 使用属性-值对\nfind(users, ['name', 'Charlie']);\n// 返回: { name: 'Charlie', active: true }\n```\n\n可以指定起始索引。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nfind(numbers, x => x > 2, 2);\n// 返回: 3 (从索引 2 开始搜索)\n```\n\n对象的操作方式相同。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nconst scores = { math: 90, english: 75, science: 85 };\nfind(scores, score => score >= 80);\n// 返回: 90\n```\n\n`null` 或 `undefined` 被视为空集合并返回 `undefined`。\n\n```typescript\nimport { find } from 'es-toolkit/compat';\n\nfind(null, x => x > 0);\n// 返回: undefined\n\nfind(undefined, x => x > 0);\n// 返回: undefined\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 要搜索的数组或对象。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`): 搜索条件。可以使用函数、部分对象、属性-值对或属性名称。\n- `fromIndex` (`number`, 可选): 开始搜索的索引。默认为 `0`。\n\n#### 返回值\n\n(`T | undefined`): 返回满足条件的第一个元素。如果未找到则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/findIndex.md",
    "content": "# findIndex（Lodash 兼容性）\n\n::: warning 使用 `Array.prototype.findIndex`\n\n此 `findIndex` 函数由于支持各种条件格式处理和 `fromIndex` 处理等附加功能而运行较慢。\n\n请使用更快、更现代的 `Array.prototype.findIndex`。\n\n:::\n\n查找数组中满足条件的第一个元素的索引。\n\n```typescript\nconst index = findIndex(arr, doesMatch, fromIndex);\n```\n\n## 用法\n\n### `findIndex(arr, doesMatch, fromIndex)`\n\n当您想要查找数组中满足特定条件的第一个元素的位置时,使用 `findIndex`。您可以通过多种方式指定条件。如果没有元素满足条件,则返回 `-1`。\n\n当您将条件指定为函数时,它会对每个元素执行该函数,并返回第一个返回 true 的元素的索引。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { id: 1, name: 'Alice', active: false },\n  { id: 2, name: 'Bob', active: true },\n  { id: 3, name: 'Charlie', active: true },\n];\n\n// 使用函数指定条件\nfindIndex(users, user => user.active);\n// Returns: 1\n```\n\n当您将条件指定为部分对象时,它会返回第一个匹配这些属性的元素的索引。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 使用部分对象指定条件\nfindIndex(users, { name: 'Bob', active: true });\n// Returns: 1\n```\n\n当您将条件指定为属性名和值的数组时,它会返回第一个该属性与该值匹配的元素的索引。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 使用 [属性, 值] 数组指定条件\nfindIndex(users, ['active', true]);\n// Returns: 1\n```\n\n当您只指定属性名时,它会返回第一个该属性值为真的元素的索引。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 使用属性名指定条件\nfindIndex(users, 'active');\n// Returns: 1\n```\n\n当您指定 `fromIndex` 时,搜索将从该索引开始。负值从数组末尾开始计算。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\n// 从索引 2 开始搜索\nfindIndex(users, user => user.active, 2);\n// Returns: 2\n\n// 从倒数第二个元素开始搜索\nfindIndex(users, user => user.active, -2);\n// Returns: 1\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { findIndex } from 'es-toolkit/compat';\n\nfindIndex(null, user => user.active); // -1\nfindIndex(undefined, 'active'); // -1\n```\n\n#### 参数\n\n- `arr` (`ArrayLike<T> | null | undefined`): 要搜索的数组。\n- `doesMatch` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 可选): 匹配条件。可以是函数、部分对象、键值对或属性名。\n- `fromIndex` (`number`, 可选): 开始搜索的索引。默认为 `0`。\n\n#### 返回值\n\n(`number`): 返回满足条件的第一个元素的索引。如果没有元素匹配,则返回 `-1`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/findLast.md",
    "content": "# findLast (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.findLast`\n\n由于处理各种类型和特殊条件,此 `findLast` 函数复杂且运行较慢。\n\n请改用更快、更现代的 `Array.prototype.findLast`。\n\n:::\n\n在数组或对象中查找满足条件的最后一个元素。\n\n```typescript\nconst lastEven = findLast(array, predicate);\n```\n\n## 用法\n\n### `findLast(collection, predicate?, fromIndex?)`\n\n在数组或对象中查找满足给定条件的最后一个元素。从数组末尾开始逆序搜索,并返回满足条件的第一个元素。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\n// 使用函数指定条件\nconst users = [\n  { user: 'barney', age: 36 },\n  { user: 'fred', age: 40 },\n  { user: 'pebbles', age: 18 },\n];\nfindLast(users, o => o.age < 40);\n// => { user: 'pebbles', age: 18 }\n\n// 使用对象指定条件\nfindLast(users, { age: 36 });\n// => { user: 'barney', age: 36 }\n\n// 使用键值对指定条件\nfindLast(users, ['age', 18]);\n// => { user: 'pebbles', age: 18 }\n\n// 使用属性名指定条件(具有真值的最后一个元素)\nfindLast(users, 'age');\n// => { user: 'fred', age: 40 }\n```\n\n也可以指定搜索起始索引。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5, 4, 3, 2, 1];\nfindLast(numbers, n => n > 3, 6); // 从索引6开始逆序搜索\n// => 4\n```\n\n`null` 或 `undefined` 返回空结果。\n\n```typescript\nimport { findLast } from 'es-toolkit/compat';\n\nfindLast(null, x => x > 0); // undefined\nfindLast(undefined, x => x > 0); // undefined\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 要搜索的数组或对象。\n- `predicate` (`ListIterateeCustom<T, boolean>`, 可选): 应用于每个元素的条件。可以使用函数、对象、键值对或属性名。默认为 `identity` 函数。\n- `fromIndex` (`number`, 可选): 开始搜索的索引。负值从末尾计算。默认为数组的最后一个索引。\n\n#### 返回值\n\n(`T | undefined`): 返回满足条件的最后一个元素。如果没有元素满足条件,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/findLastIndex.md",
    "content": "# findLastIndex (Lodash 兼容性)\n\n::: warning 使用 `Array.prototype.findLastIndex`\n\n此 `findLastIndex` 函数由于处理 `null` 或 `undefined`、部分对象匹配、属性名匹配等附加功能而运行较慢。\n\n请使用更快、更现代的 `Array.prototype.findLastIndex`。\n\n:::\n\n查找数组中满足条件的最后一个元素的索引。\n\n```typescript\nconst lastIndex = findLastIndex(array, predicate, fromIndex);\n```\n\n## 用法\n\n### `findLastIndex(array, predicate, fromIndex)`\n\n当您想要从数组末尾开始查找满足给定条件的第一个元素的索引时,使用 `findLastIndex`。如果没有元素满足条件,则返回 `-1`。\n\n此函数可以通过多种方式指定条件。当您传递函数时,它会对每个元素执行该函数。当您传递部分对象时,它会检查元素是否具有这些属性。当您传递数组格式的键值对时,它会检查特定属性是否与给定值匹配。当您传递字符串时,它会检查该属性是否值为真。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\n// 使用函数指定条件\nfindLastIndex(users, o => o.user === 'pebbles');\n// Returns: 2\n\n// 使用部分对象查找匹配的元素\nfindLastIndex(users, { user: 'barney', active: true });\n// Returns: 0\n\n// 使用属性值对查找匹配的元素\nfindLastIndex(users, ['active', false]);\n// Returns: 2\n\n// 使用属性名查找具有真值的元素\nfindLastIndex(users, 'active');\n// Returns: 0\n```\n\n也可以指定搜索的起始位置。如果 `fromIndex` 为负数,则从数组末尾开始计算。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 从索引3开始逆向搜索\nfindLastIndex(numbers, n => n < 4, 2);\n// Returns: 2\n\n// 如果使用负索引,则从末尾开始计算\nfindLastIndex(numbers, n => n > 2, -2);\n// Returns: 3\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { findLastIndex } from 'es-toolkit/compat';\n\nfindLastIndex(null, n => n > 0); // -1\nfindLastIndex(undefined, n => n > 0); // -1\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要搜索的数组。\n- `predicate` (`((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 可选): 测试每个元素的条件。可以是函数、部分对象、属性值对或属性名。默认为恒等函数。\n- `fromIndex` (`number`, 可选): 开始搜索的索引。如果为负数,则从数组末尾开始计算。默认为 `array.length - 1`。\n\n#### 返回值\n\n(`number`): 返回满足条件的最后一个元素的索引。如果没有元素满足条件,则返回 `-1`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/first.md",
    "content": "# first (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `head`\n\n此 `first` 函数由于处理 `null` 或 `undefined` 和类数组对象转换而运行较慢。`es-toolkit` 的 `head` 函数没有这些额外处理,运行更快、更简单。\n\n请改用更快、更现代的 `es-toolkit` 的 [head](../../array/head.md)。\n\n:::\n\n返回数组的第一个元素。\n\n```typescript\nconst firstElement = first(array);\n```\n\n## 用法\n\n### `first(array)`\n\n当您想要获取数组的第一个元素时使用 `first`。如果数组为空或为 `null` 或 `undefined`,则返回 `undefined`。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\n// 从常规数组获取第一个元素\nfirst([1, 2, 3]);\n// Returns: 1\n\n// 从字符串数组获取第一个元素\nfirst(['a', 'b', 'c']);\n// Returns: 'a'\n\n// 空数组\nfirst([]);\n// Returns: undefined\n```\n\n`null` 或 `undefined` 返回 `undefined`。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nfirst(null); // undefined\nfirst(undefined); // undefined\n```\n\n可用于类数组对象。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst arrayLike = { 0: 'a', 1: 'b', 2: 'c', length: 3 };\nfirst(arrayLike);\n// Returns: 'a'\n\n// 字符串也被视为数组\nfirst('hello');\n// Returns: 'h'\n```\n\n对于类型保证的元组,返回确切的类型。\n\n```typescript\nimport { first } from 'es-toolkit/compat';\n\nconst tuple = [1, 'two', true] as const;\nfirst(tuple);\n// Returns: 1 (类型推断为 1)\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要获取第一个元素的数组。\n\n#### 返回值\n\n(`T | undefined`): 返回数组的第一个元素。如果数组为空或无效,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flatMap.md",
    "content": "# flatMap (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flatMap`\n\n此 `flatMap` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等而运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [flatMap](../../array/flatMap.md)。\n\n:::\n\n对每个元素应用函数并展平结果。\n\n```typescript\nconst result = flatMap(collection, iteratee);\n```\n\n## 用法\n\n### `flatMap(collection, iteratee)`\n\n对集合的每个元素应用迭代函数并返回展平一层的数组。支持数组、对象和字符串,可以使用各种形式的迭代器。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\n// 对数组应用函数\nfunction duplicate(n) {\n  return [n, n];\n}\nflatMap([1, 2], duplicate);\n// 结果: [1, 1, 2, 2]\n\n// 对对象应用函数\nconst obj = { a: 1, b: 2 };\nflatMap(obj, (value, key) => [key, value]);\n// 结果: ['a', 1, 'b', 2]\n\n// 使用字符串属性映射\nconst users = [\n  { user: 'barney', hobbies: ['hiking', 'coding'] },\n  { user: 'fred', hobbies: ['reading'] },\n];\nflatMap(users, 'hobbies');\n// 结果: ['hiking', 'coding', 'reading']\n```\n\n不使用迭代器时将值展平一层。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst obj = { a: [1, 2], b: [3, 4] };\nflatMap(obj);\n// 结果: [1, 2, 3, 4]\n```\n\n也可以使用部分对象进行条件映射。\n\n```typescript\nimport { flatMap } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', age: 36, active: true },\n  { user: 'fred', age: 40, active: false },\n];\nflatMap(users, { active: false });\n// 结果: [false, true] (active 为 false 的元素的匹配结果)\n```\n\n#### 参数\n\n- `collection` (`object | null | undefined`): 要迭代的集合。可以是数组、对象或字符串。\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, 可选): 应用于每个元素的迭代器。可以是函数、属性名或部分对象。\n\n#### 返回值\n\n(`any[]`): 返回映射后展平一层的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flatMapDeep.md",
    "content": "# flatMapDeep (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [`flatMapDeep`](../../array/flatMapDeep.md)\n\n此 `flatMapDeep` 函数由于复杂的集合类型处理和深度展平逻辑而运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [flatMapDeep](../../array/flatMapDeep.md)。\n\n:::\n\n对每个元素应用函数并递归展平结果。\n\n```typescript\nconst result = flatMapDeep(collection, iteratee);\n```\n\n## 用法\n\n### `flatMapDeep(collection, iteratee)`\n\n对集合的每个元素应用迭代函数并返回展平到无限深度的数组。所有嵌套的数组结构都将被展平为一维数组。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\n// 对数组应用函数并深度展平\nfunction duplicate(n) {\n  return [[[n, n]]];\n}\nflatMapDeep([1, 2], duplicate);\n// 结果: [1, 1, 2, 2]\n\n// 对对象应用函数并深度展平\nconst obj = { a: 1, b: 2 };\nflatMapDeep(obj, (value, key) => [[[key, value]]]);\n// 结果: ['a', 1, 'b', 2]\n\n// 使用字符串属性映射并深度展平\nconst users = [\n  { user: 'barney', hobbies: [['hiking', 'coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDeep(users, 'hobbies');\n// 结果: ['hiking', 'coding', 'reading']\n```\n\n不使用迭代器时递归展平值。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst obj = { a: [[1, 2]], b: [[[3]]] };\nflatMapDeep(obj);\n// 结果: [1, 2, 3]\n```\n\n也可以使用部分对象进行条件映射。\n\n```typescript\nimport { flatMapDeep } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'barney', active: [true, false] },\n  { user: 'fred', active: [false] },\n];\nflatMapDeep(users, { active: [false] });\n// 结果: [true, true] (active 数组包含 [false] 的元素的匹配结果)\n```\n\n#### 参数\n\n- `collection` (`object | null | undefined`): 要迭代的集合。可以是数组、对象或字符串。\n- `iteratee` (`ListIterator | ObjectIterator | string | object`, 可选): 应用于每个元素的迭代器。可以是函数、属性名或部分对象。\n\n#### 返回值\n\n(`any[]`): 返回映射后递归展平的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flatMapDepth.md",
    "content": "# flatMapDepth (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [flatMap](../../array/flatMap.md)\n\n此 `flatMapDepth` 函数为了 Lodash 兼容性支持各种形式的迭代器和处理 `null` 或 `undefined`,实现较为复杂。主库中的 `flatMap` 函数仅支持简单的函数迭代器,因此运行更快。\n\n请改用更快、更现代的 `es-toolkit` 的 [flatMap](../../array/flatMap.md)。\n\n:::\n\n使用迭代函数转换数组的每个元素并展平到指定深度。\n\n```typescript\nconst result = flatMapDepth(collection, iteratee, depth);\n```\n\n## 用法\n\n### `flatMapDepth(collection, iteratee, depth)`\n\n使用给定函数转换数组或对象的每个元素,然后将结果展平到指定深度并返回新数组。当您想将嵌套的数组结构仅展平到所需深度时很有用。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 转换数组并展平到深度2\nflatMapDepth([1, 2], n => [[n, n]], 2);\n// => [1, 1, 2, 2]\n\n// 限制为深度1时不会完全展平\nflatMapDepth([1, 2], n => [[n, n]], 1);\n// => [[1, 1], [2, 2]]\n\n// 从对象提取值并展平\nconst users = [\n  { user: 'barney', hobbies: [['hiking'], ['coding']] },\n  { user: 'fred', hobbies: [['reading']] },\n];\nflatMapDepth(users, 'hobbies', 2);\n// => ['hiking', 'coding', 'reading']\n```\n\n此函数支持各种形式的迭代器。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\n// 使用函数转换\nflatMapDepth([1, 2, 3], n => [[n, n]], 2);\n\n// 按属性名提取值\nconst objects = [{ items: [['a'], ['b']] }, { items: [['c']] }];\nflatMapDepth(objects, 'items', 2);\n// => ['a', 'b', 'c']\n\n// 使用对象部分匹配\nconst users = [{ active: [[true], [false]] }, { active: [[false]] }];\nflatMapDepth(users, { active: [[false]] }, 2);\n// => [true, true]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { flatMapDepth } from 'es-toolkit/compat';\n\nflatMapDepth(null, n => [n], 1); // => []\nflatMapDepth(undefined, n => [n], 1); // => []\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, any> | Record<number, any> | object | null | undefined`): 要迭代的数组或对象。\n- `iteratee` (`((value: T, index: number, collection: any) => any) | string | object`, 可选): 对每个元素执行的转换函数或属性名。默认为 `identity`。\n- `depth` (`number`, 可选): 要展平的最大深度。默认为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回使用迭代器转换后展平到指定深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flatten.md",
    "content": "# flatten (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flatten`\n\n此 `flatten` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等而运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [flatten](../../array/flatten.md)。\n\n:::\n\n将数组展平一层。\n\n```typescript\nconst result = flatten(array, depth);\n```\n\n## 用法\n\n### `flatten(value, depth)`\n\n按指定深度展平嵌套数组。默认情况下只展平一层,并且还支持 Arguments 对象和具有 Symbol.isConcatSpreadable 的对象。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\n// 基本展平(一层)\nflatten([1, [2, [3, [4]], 5]]);\n// 结果: [1, 2, [3, [4]], 5]\n\n// 指定深度\nflatten([1, [2, [3, [4]], 5]], 2);\n// 结果: [1, 2, 3, [4], 5]\n\n// 支持 Arguments 对象\nfunction example() {\n  return flatten(arguments);\n}\nexample(1, [2, 3], [[4]]);\n// 结果: [1, 2, 3, [4]]\n```\n\n空数组、null 或 undefined 返回空数组。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nflatten(null); // []\nflatten(undefined); // []\nflatten([]); // []\n```\n\n具有 Symbol.isConcatSpreadable 的对象也像数组一样被展平。\n\n```typescript\nimport { flatten } from 'es-toolkit/compat';\n\nconst spreadable = { 0: 'a', 1: 'b', length: 2, [Symbol.isConcatSpreadable]: true };\nflatten([1, spreadable, 3]);\n// 结果: [1, 'a', 'b', 3]\n```\n\n#### 参数\n\n- `value` (`ArrayLike<T> | null | undefined`): 要展平的数组。\n- `depth` (`number`, 可选): 要展平的最大深度。默认为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回新的展平数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flattenDeep.md",
    "content": "# flattenDeep (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flattenDeep`\n\n此 `flattenDeep` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数格式等而运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [flattenDeep](../../array/flattenDeep.md)。\n\n:::\n\n完全展平数组。\n\n```typescript\nconst result = flattenDeep(array);\n```\n\n## 用法\n\n### `flattenDeep(value)`\n\n在所有深度递归展平嵌套数组。移除所有嵌套级别,返回完全展平的一维数组。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\n// 完全展平深层嵌套数组\nflattenDeep([1, [2, [3, [4]], 5]]);\n// 结果: [1, 2, 3, 4, 5]\n\n// 完全展平复杂嵌套结构\nflattenDeep([1, [2, [3, [[[[4]]]]], 5]]);\n// 结果: [1, 2, 3, 4, 5]\n\n// 支持混合类型\nflattenDeep(['a', ['b', ['c', [['d']]]]]);\n// 结果: ['a', 'b', 'c', 'd']\n```\n\n空数组、null 或 undefined 返回空数组。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep(null); // []\nflattenDeep(undefined); // []\nflattenDeep([]); // []\n```\n\n已经展平的数组按原样复制。\n\n```typescript\nimport { flattenDeep } from 'es-toolkit/compat';\n\nflattenDeep([1, 2, 3, 4, 5]);\n// 结果: [1, 2, 3, 4, 5]\n```\n\n#### 参数\n\n- `value` (`ListOfRecursiveArraysOrValues<T> | null | undefined`): 要完全展平的数组。\n\n#### 返回值\n\n(`Array<T>`): 返回移除所有嵌套的完全展平的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/flattenDepth.md",
    "content": "# flattenDepth (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flatten`\n\n此 `flattenDepth` 函数由于处理 `null` 或 `undefined` 而运行较慢。`es-toolkit` 的 `flatten` 函数没有这些额外处理,运行更快、更简单。\n\n请改用更快、更现代的 `es-toolkit` 的 [flatten](../../array/flatten.md)。\n\n:::\n\n将数组展平到指定深度。\n\n```typescript\nconst flattened = flattenDepth(array, depth);\n```\n\n## 用法\n\n### `flattenDepth(array, depth)`\n\n当您想将嵌套数组展平到所需深度时使用 `flattenDepth`。指定深度后,它只会将嵌套数组展平到该深度。\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\n// 展平到深度1\nflattenDepth([1, [2, [3, [4]], 5]], 1);\n// Returns: [1, 2, [3, [4]], 5]\n\n// 展平到深度2\nflattenDepth([1, [2, [3, [4]], 5]], 2);\n// Returns: [1, 2, 3, [4], 5]\n\n// 如果未指定深度,默认为1\nflattenDepth([1, [2, [3, [4]], 5]]);\n// Returns: [1, 2, [3, [4]], 5]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { flattenDepth } from 'es-toolkit/compat';\n\nflattenDepth(null, 2); // []\nflattenDepth(undefined, 2); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要展平的数组。\n- `depth` (`number`, 可选): 要展平的最大深度。默认为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回展平到指定深度的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/forEach.md",
    "content": "# forEach (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.forEach()`\n\n此 `forEach` 函数由于复杂的对象处理、提前终止逻辑等原因运行缓慢。\n\n请使用更快、更现代的 `Array.prototype.forEach()`。\n\n:::\n\n对数组或对象的每个元素执行函数。\n\n```typescript\nforEach(collection, callback);\n```\n\n## 用法\n\n### `forEach(collection, callback)`\n\n当您想遍历数组或对象的所有元素并对每个元素执行回调函数时，请使用 `forEach`。如果回调返回 `false`，则停止遍历。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\n// 遍历数组\nconst numbers = [1, 2, 3, 4, 5];\nconst results: number[] = [];\n\nforEach(numbers, value => {\n  results.push(value * 2);\n});\n// results 为 [2, 4, 6, 8, 10]\n\n// 提前终止\nconst numbers2 = [1, 2, 3, 4, 5];\nconst results2: number[] = [];\n\nforEach(numbers2, value => {\n  if (value > 3) {\n    return false; // 停止遍历\n  }\n  results2.push(value);\n});\n// results2 为 [1, 2, 3]\n```\n\n对象的工作方式相同。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nconst keys: string[] = [];\nconst values: number[] = [];\n\nforEach(obj, (value, key) => {\n  keys.push(key);\n  values.push(value);\n});\n// keys 为 ['a', 'b', 'c']\n// values 为 [1, 2, 3]\n```\n\n`null` 或 `undefined` 被视为空集合。\n\n```typescript\nimport { forEach } from 'es-toolkit/compat';\n\nforEach(null, value => {\n  console.log(value); // 不会执行\n});\n\nforEach(undefined, value => {\n  console.log(value); // 不会执行\n});\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 要遍历的数组或对象。\n- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 对每个元素执行的函数。返回 `false` 以停止遍历。\n\n#### 返回值\n\n(`T`): 返回遍历的原始集合。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/forEachRight.md",
    "content": "# forEachRight (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `forEachRight`\n\n此 `forEachRight` 函数由于处理 `null` 或 `undefined`、处理 `ArrayLike` 类型、支持各种条件函数形式等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [forEachRight](../../array/forEachRight.md)。\n\n:::\n\n从右到左遍历数组或对象的元素，并对每个元素执行函数。\n\n```typescript\nforEachRight(collection, callback);\n```\n\n## 用法\n\n### `forEachRight(collection, callback)`\n\n从右到左顺序遍历数组、对象或字符串，并对每个元素执行回调函数。如果回调返回 `false`，则停止遍历。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\n// 逆序遍历数组\nforEachRight([1, 2, 3], (value, index) => {\n  console.log(value, index);\n});\n// 输出: 3 2, 2 1, 1 0\n\n// 逆序遍历字符串\nforEachRight('abc', (char, index) => {\n  console.log(char, index);\n});\n// 输出: 'c' 2, 'b' 1, 'a' 0\n\n// 逆序遍历对象\nforEachRight({ a: 1, b: 2, c: 3 }, (value, key) => {\n  console.log(value, key);\n});\n// 输出: 3 'c', 2 'b', 1 'a'\n```\n\n`null` 或 `undefined` 按原样返回。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight(null, value => console.log(value)); // null\nforEachRight(undefined, value => console.log(value)); // undefined\n```\n\n如果回调返回 `false`，则停止遍历。\n\n```typescript\nimport { forEachRight } from 'es-toolkit/compat';\n\nforEachRight([1, 2, 3, 4], value => {\n  console.log(value);\n  if (value === 2) {\n    return false; // 停止遍历\n  }\n});\n// 输出: 4, 3, 2\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 要遍历的集合。可以是数组、对象、字符串或 null/undefined。\n- `callback` (`(item: any, index: any, arr: any) => unknown`, 选择): 对每个元素执行的函数。返回 `false` 以停止遍历。默认值是 `identity` 函数。\n\n#### 返回值\n\n(`ArrayLike<T> | Record<any, any> | string | null | undefined`): 按原样返回原始集合。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/groupBy.md",
    "content": "# groupBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [groupBy](../../array/groupBy.md)\n\n此 `groupBy` 函数由于处理 `null` 或 `undefined`、对象支持、复杂类型处理等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [groupBy](../../array/groupBy.md)。\n\n:::\n\n根据给定条件将数组或对象的元素分组。\n\n```typescript\nconst grouped = groupBy(collection, iteratee);\n```\n\n## 用法\n\n### `groupBy(collection, iteratee)`\n\n根据给定的条件函数对数组或对象的每个元素进行分组，并返回按组分类的对象。条件可以以各种形式提供，如函数、属性名、部分对象等。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\n// 按函数分组\nconst array = [6.1, 4.2, 6.3];\nconst result = groupBy(array, Math.floor);\n// result 为 { '4': [4.2], '6': [6.1, 6.3] }\n\n// 按属性名分组\nconst users = [\n  { name: 'john', age: 30 },\n  { name: 'jane', age: 25 },\n  { name: 'bob', age: 30 },\n];\nconst byAge = groupBy(users, 'age');\n// byAge 为 { '25': [{ name: 'jane', age: 25 }], '30': [{ name: 'john', age: 30 }, { name: 'bob', age: 30 }] }\n\n// 从对象分组\nconst obj = { a: 6.1, b: 4.2, c: 6.3 };\nconst groupedObj = groupBy(obj, Math.floor);\n// groupedObj 为 { '4': [4.2], '6': [6.1, 6.3] }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\ngroupBy(null, x => x); // {}\ngroupBy(undefined, x => x); // {}\n```\n\n也可以按部分对象或属性-值对进行分组。\n\n```typescript\nimport { groupBy } from 'es-toolkit/compat';\n\nconst products = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'fruit', name: 'banana' },\n  { category: 'vegetable', name: 'carrot' },\n];\n\n// 按部分对象分组\nconst byCategory = groupBy(products, { category: 'fruit' });\n// 按属性-值对分组\nconst byName = groupBy(products, ['name', 'apple']);\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, T> | null | undefined`): 要分组的数组或对象。\n- `iteratee` (`Function | PropertyKey | Array | Object`, 选择): 分组条件。可以是函数、属性名、属性-值对或部分对象。默认值是 `identity` 函数。\n\n#### 返回值\n\n(`Record<string, T[]>`): 返回一个对象，其中每个键是组的条件值，值是属于该组的元素数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/head.md",
    "content": "# head (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [head](../../array/head.md)\n\n此 `head` 函数由于 `ArrayLike` 对象处理和数组转换过程而运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [head](../../array/head.md)。\n\n:::\n\n返回数组的第一个元素。\n\n```typescript\nconst firstElement = head(array);\n```\n\n## 用法\n\n### `head(array)`\n\n返回数组或类数组对象的第一个元素。如果数组为空或无效，则返回 `undefined`。\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\n// 数字数组的第一个元素\nconst numbers = [1, 2, 3, 4];\nconst first = head(numbers);\n// first 为 1\n\n// 字符串数组的第一个元素\nconst strings = ['a', 'b', 'c'];\nconst firstChar = head(strings);\n// firstChar 为 'a'\n\n// 类数组对象\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst firstItem = head(arrayLike);\n// firstItem 为 'x'\n```\n\n空数组或无效输入返回 `undefined`。\n\n```typescript\nimport { head } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst noElement = head(emptyArray);\n// noElement 为 undefined\n\nhead(null); // undefined\nhead(undefined); // undefined\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要获取第一个元素的数组或类数组对象。\n\n#### 返回值\n\n(`T | undefined`): 返回数组的第一个元素，如果数组为空或无效，则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/includes.md",
    "content": "# includes (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.includes`\n\n此 `includes` 函数由于对象迭代和 SameValueZero 比较处理而运行缓慢。对于数组，JavaScript 的原生 `Array.prototype.includes` 方法更快且更标准化。\n\n请使用更快、更现代的 `Array.prototype.includes`。\n\n:::\n\n检查数组、对象或字符串中是否包含特定值。\n\n```typescript\nconst hasValue = includes(collection, target, fromIndex);\n```\n\n## 用法\n\n### `includes(collection, target, fromIndex)`\n\n当您想检查数组、对象或字符串中是否存在特定值时，请使用 `includes`。它使用 SameValueZero 方式比较值。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 在数组中查找值\nincludes([1, 2, 3], 2);\n// Returns: true\n\n// 在对象的值中查找\nincludes({ a: 1, b: 'a', c: NaN }, 'a');\n// Returns: true\n\n// 在字符串中查找子字符串\nincludes('hello world', 'world');\n// Returns: true\n```\n\n可以从特定索引开始搜索。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 从索引 2 开始搜索\nincludes([1, 2, 3, 2], 2, 2);\n// Returns: true (在索引 3 处找到)\n\n// 负索引从末尾计算\nincludes([1, 2, 3], 2, -2);\n// Returns: true\n```\n\n`null` 或 `undefined` 始终返回 `false`。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes(null, 1); // false\nincludes(undefined, 1); // false\n```\n\n也可以在字符串中搜索子字符串。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\n// 从头开始搜索\nincludes('hello', 'e');\n// Returns: true\n\n// 从特定位置搜索\nincludes('hello', 'e', 2);\n// Returns: false (索引 2 之后没有 'e')\n```\n\n可以正确找到 `NaN` 值。\n\n```typescript\nimport { includes } from 'es-toolkit/compat';\n\nincludes([1, 2, NaN], NaN);\n// Returns: true\n\nincludes({ a: 1, b: NaN }, NaN);\n// Returns: true\n```\n\n#### 参数\n\n- `collection` (`Array | Record<string, any> | string | null | undefined`): 要搜索的数组、对象或字符串。\n- `target` (`any`): 要查找的值。\n- `fromIndex` (`number`, 选择): 开始搜索的索引。负值从末尾计算。默认值为 `0`。\n\n#### 返回值\n\n(`boolean`): 如果值存在则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/indexOf.md",
    "content": "# indexOf (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.indexOf` 或 `Array.prototype.findIndex`\n\n此 `indexOf` 函数由于处理 `NaN` 的额外逻辑而运行缓慢。\n\n如果不查找 `NaN`，请使用更快的 `Array.prototype.indexOf`。要查找 `NaN`，请使用 `Array.prototype.findIndex` 和 `Number.isNaN`。\n\n:::\n\n查找数组中第一个出现的值的索引。\n\n```typescript\nconst index = indexOf(array, searchElement, fromIndex);\n```\n\n## 用法\n\n### `indexOf(array, searchElement, fromIndex?)`\n\n与 `Array.prototype.indexOf` 几乎相同，但可以找到 `NaN` 值。当您需要在数组中查找特定值的位置时使用此方法。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\n// 在数字数组中查找元素\nconst array = [1, 2, 3, 4];\nindexOf(array, 3); // => 2\n\n// 查找 NaN 值（Array.prototype.indexOf 无法找到）\nconst arrayWithNaN = [1, 2, NaN, 4];\nindexOf(arrayWithNaN, NaN); // => 2\n```\n\n可以从特定索引开始搜索。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 1, 2, 3];\nindexOf(array, 2, 2); // => 4（从索引 2 开始搜索）\n```\n\n`null` 或 `undefined` 会被视为空数组。\n\n```typescript\nimport { indexOf } from 'es-toolkit/compat';\n\nindexOf(null, 1); // => -1\nindexOf(undefined, 1); // => -1\n```\n\n#### 参数\n\n- `array` (`T[]`): 要搜索的数组。\n\n::: info `array` 可以是 `ArrayLike<T>` 或 `null` 或 `undefined`\n\n为了确保与 lodash 的完全兼容性，`indexOf` 函数会按照以下方式处理 `array`：\n\n- 如果 `array` 是 `ArrayLike<T>`，它会使用 `Array.from(...)` 将其转换为数组。\n- 如果 `array` 是 `null` 或 `undefined`，它会被视为一个空数组。\n\n:::\n\n- `searchElement` (`T`): 要查找的值。\n- `fromIndex` (`number`, 可选): 开始搜索的索引。如果为负数，则从数组末尾开始计算。默认值为 `0`。\n\n#### 返回值\n\n(`number`): 返回数组中第一个匹配给定值的元素的索引。如果未找到匹配元素，则返回 `-1`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/initial.md",
    "content": "# initial (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [initial](../../array/initial.md)\n\n此 `initial` 函数由于 `ArrayLike` 对象处理和数组转换过程而运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [initial](../../array/initial.md)。\n\n:::\n\n返回一个新数组，其中包含数组中除最后一个元素外的所有元素。\n\n```typescript\nconst result = initial(array);\n```\n\n## 用法\n\n### `initial(array)`\n\n返回一个新数组，其中包含数组或类数组对象中除最后一个元素外的所有元素。如果数组为空或只有一个元素，则返回空数组。\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\n// 从数字数组中排除最后一个元素\nconst numbers = [1, 2, 3, 4];\nconst result = initial(numbers);\n// result 为 [1, 2, 3]\n\n// 从字符串数组中排除最后一个元素\nconst strings = ['a', 'b', 'c', 'd'];\nconst withoutLast = initial(strings);\n// withoutLast 为 ['a', 'b', 'c']\n\n// 类数组对象\nconst arrayLike = { 0: 'x', 1: 'y', 2: 'z', length: 3 };\nconst items = initial(arrayLike);\n// items 为 ['x', 'y']\n```\n\n空数组或无效输入返回空数组。\n\n```typescript\nimport { initial } from 'es-toolkit/compat';\n\nconst emptyArray: number[] = [];\nconst result = initial(emptyArray);\n// result 为 []\n\nconst singleItem = [42];\nconst onlyOne = initial(singleItem);\n// onlyOne 为 []\n\ninitial(null); // []\ninitial(undefined); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要排除最后一个元素的数组或类数组对象。\n\n#### 返回值\n\n(`T[]`): 返回排除最后一个元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/intersection.md",
    "content": "# intersection (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [intersection](../../array/intersection.md)\n\n此 `intersection` 函数由于处理 `null` 或 `undefined`、多数组支持、去重过程等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [intersection](../../array/intersection.md)。\n\n:::\n\n查找多个数组的交集。\n\n```typescript\nconst result = intersection(...arrays);\n```\n\n## 用法\n\n### `intersection(...arrays)`\n\n查找在所有数组中都存在的元素，并将它们作为新数组返回。结果已去重并保持第一个数组的顺序。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\n// 两个数组的交集\nconst array1 = [1, 2, 3, 4];\nconst array2 = [2, 3, 5, 6];\nconst result = intersection(array1, array2);\n// result 为 [2, 3]\n\n// 三个数组的交集\nconst array3 = [3, 4, 7, 8];\nconst multiResult = intersection(array1, array2, array3);\n// multiResult 为 [3]\n\n// 字符串数组\nconst strings1 = ['a', 'b', 'c'];\nconst strings2 = ['b', 'c', 'd'];\nconst stringResult = intersection(strings1, strings2);\n// stringResult 为 ['b', 'c']\n\n// 类数组对象\nconst arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\nconst arrayLike2 = { 0: 2, 1: 3, 2: 4, length: 3 };\nconst likeResult = intersection(arrayLike1, arrayLike2);\n// likeResult 为 [2, 3]\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 2, 3];\nconst result1 = intersection(array1, null);\n// result1 为 []\n\nconst result2 = intersection(null, undefined);\n// result2 为 []\n```\n\n重复元素会从结果中删除。\n\n```typescript\nimport { intersection } from 'es-toolkit/compat';\n\nconst array1 = [1, 1, 2, 3];\nconst array2 = [1, 2, 2, 4];\nconst result = intersection(array1, array2);\n// result 为 [1, 2]（已去重）\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要查找交集的数组。也允许类数组对象、null 或 undefined。\n\n#### 返回值\n\n(`T[]`): 返回在所有数组中都存在的元素的新数组。已去重并遵循第一个数组的顺序。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/intersectionBy.md",
    "content": "# intersectionBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [intersectionBy](../../array/intersectionBy.md)\n\n此 `intersectionBy` 函数由于复杂的条件处理、多数组支持、属性路径解析等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [intersectionBy](../../array/intersectionBy.md)。\n\n:::\n\n使用给定的条件函数查找多个数组的交集。\n\n```typescript\nconst result = intersectionBy(...arrays, iteratee);\n```\n\n## 用法\n\n### `intersectionBy(...arrays, iteratee)`\n\n根据给定条件函数转换后的值，查找多个数组的交集。条件可以以各种形式提供，如函数、属性名、部分对象等。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\n// 按函数查找交集\nconst array1 = [2.1, 1.2];\nconst array2 = [2.3, 3.4];\nconst result = intersectionBy(array1, array2, Math.floor);\n// result 为 [2.1]（基于 Math.floor，2 是共同的）\n\n// 按属性查找交集\nconst users1 = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst users2 = [\n  { id: 2, name: 'jane' },\n  { id: 3, name: 'bob' },\n];\nconst byId = intersectionBy(users1, users2, 'id');\n// byId 为 [{ id: 2, name: 'jane' }]\n\n// 三个数组的交集\nconst array3 = [2.5, 4.1];\nconst multiResult = intersectionBy(array1, array2, array3, Math.floor);\n// multiResult 为 [2.1]\n\n// 类数组对象\nconst arrayLike1 = { 0: { x: 1 }, 1: { x: 2 }, length: 2 };\nconst arrayLike2 = { 0: { x: 2 }, 1: { x: 3 }, length: 2 };\nconst byProperty = intersectionBy(arrayLike1, arrayLike2, 'x');\n// byProperty 为 [{ x: 2 }]\n```\n\n`null` 或 `undefined` 数组被视为空数组。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst result = intersectionBy(array1, null, 'x');\n// result 为 []\n```\n\n也可以使用部分对象或属性-值对指定条件。\n\n```typescript\nimport { intersectionBy } from 'es-toolkit/compat';\n\nconst products1 = [\n  { category: 'fruit', name: 'apple' },\n  { category: 'vegetable', name: 'carrot' },\n];\nconst products2 = [\n  { category: 'fruit', name: 'banana' },\n  { category: 'meat', name: 'beef' },\n];\n\n// 使用部分对象指定条件\nconst byCategory = intersectionBy(products1, products2, { category: 'fruit' });\n// 使用属性-值对指定条件\nconst byCategoryPair = intersectionBy(products1, products2, ['category', 'fruit']);\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要查找交集的数组。\n- `iteratee` (`Function | PropertyKey | Array | Object`): 转换每个元素的条件。可以是函数、属性名、属性-值对或部分对象。\n\n#### 返回值\n\n(`T[]`): 返回基于转换值在所有数组中都存在的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/intersectionWith.md",
    "content": "# intersectionWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [intersectionWith](../../array/intersectionWith.md)\n\n此 `intersectionWith` 函数由于处理 `null` 或 `undefined`、支持各种重载等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [intersectionWith](../../array/intersectionWith.md)。\n\n:::\n\n使用自定义比较函数创建在所有数组中找到的共同元素的数组。\n\n```typescript\nconst result = intersectionWith(array, ...otherArrays, comparator);\n```\n\n## 用法\n\n### `intersectionWith(array, ...otherArrays, comparator)`\n\n使用自定义比较函数查找第一个数组与其余数组的交集。比较函数确定元素是否相等，只返回在所有数组中找到的元素。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nconst objects = [\n  { id: 1, name: 'john' },\n  { id: 2, name: 'jane' },\n];\nconst others = [\n  { id: 1, name: 'john' },\n  { id: 3, name: 'joe' },\n];\n\nintersectionWith(objects, others, (a, b) => a.id === b.id);\n// => [{ id: 1, name: 'john' }]\n\n// 您可以与多个数组进行比较\nconst array1 = [{ x: 1 }, { x: 2 }];\nconst array2 = [{ x: 1 }, { x: 3 }];\nconst array3 = [{ x: 1 }, { x: 4 }];\n\nintersectionWith(array1, array2, array3, (a, b) => a.x === b.x);\n// => [{ x: 1 }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { intersectionWith } from 'es-toolkit/compat';\n\nintersectionWith(null, [1, 2], (a, b) => a === b); // []\nintersectionWith([1, 2], undefined, (a, b) => a === b); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要比较的第一个数组。\n- `...otherArrays` (`Array<ArrayLike<U> | ((a: T, b: T | U) => boolean)>`): 要比较的其他数组和作为最后一个元素的比较函数。\n- `comparator` (`(a: T, b: T | U) => boolean`): 确定两个元素是否相等的函数。\n\n#### 返回值\n\n(`T[]`): 返回在所有数组中共同找到的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/invokeMap.md",
    "content": "# invokeMap (Lodash 兼容性)\n\n::: warning 使用 `Array.map` 和 `Object.values(...).map`\n\n由于需要处理 `null` 或 `undefined`、方法查找等,这个 `invokeMap` 函数运行缓慢。\n\n请改用更快、更现代的 `Array.map` 和 `Object.values(...).map`。\n\n例如,`invokeMap([1, 2, 3], 'toString')` 可以写成 `[1, 2, 3].map(x => x.toString())`。\n\n:::\n\n在数组或对象的每个元素上调用指定的方法,并返回结果数组。\n\n```typescript\nconst result = invokeMap(collection, method, ...args);\n```\n\n## 用法\n\n### `invokeMap(collection, method, ...args)`\n\n在数组或对象的每个元素上调用指定的方法。可以将方法名作为字符串传递,也可以直接传递函数。额外的参数会传递给每次方法调用。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\n// 在数组的每个元素上调用方法\ninvokeMap(\n  [\n    [5, 1, 7],\n    [3, 2, 1],\n  ],\n  'sort'\n);\n// => [[5, 1, 7].sort(), [3, 2, 1].sort()]\n// => [[1, 5, 7], [1, 2, 3]]\n\n// 使用参数调用方法\ninvokeMap([123, 456], 'toString', 2);\n// => [(123).toString(2), (456).toString(2)]\n// => ['1111011', '111001000']\n\n// 直接传递函数\ninvokeMap(['a', 'b', 'c'], String.prototype.toUpperCase);\n// => [String.prototype.toUpperCase('a'), String.prototype.toUpperCase('b'), String.prototype.toUpperCase('c')]\n// => ['A', 'B', 'C']\n```\n\n对于对象,在每个值上调用方法。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\nconst obj = { a: 1.1, b: 2.2, c: 3.3 };\ninvokeMap(obj, 'toFixed', 1);\n// => ['1.1', '2.2', '3.3']\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { invokeMap } from 'es-toolkit/compat';\n\ninvokeMap(null, 'toString'); // []\ninvokeMap(undefined, 'toString'); // []\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`): 要调用方法的数组或对象。\n- `method` (`string | ((...args: any[]) => R)`): 要调用的方法名或函数。\n- `...args` (`any[]`): 传递给每次方法调用的额外参数。\n\n#### 返回值\n\n(`Array<R | undefined>`): 返回包含每次方法调用结果的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/join.md",
    "content": "# join (Lodash 兼容性)\n\n::: warning 使用 `Array.prototype.join()`\n\n由于需要处理 ArrayLike 对象、null/undefined 等,这个 `join` 函数运行缓慢。\n\n请改用更快、更现代的 `Array.prototype.join()`。\n\n:::\n\n将数组中的元素连接成一个字符串。\n\n```typescript\nconst result = join(array, separator);\n```\n\n## 用法\n\n### `join(array, separator?)`\n\n使用 `join` 将数组的所有元素组合成一个字符串。它使用分隔符连接每个元素。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\n// 连接字符串数组\nconst arr = ['a', 'b', 'c'];\njoin(arr, '~'); // => \"a~b~c\"\n\n// 连接数字数组\nconst numbers = [1, 2, 3];\njoin(numbers, '-'); // => \"1-2-3\"\n```\n\n如果省略分隔符，默认使用逗号（`,`）。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(['a', 'b', 'c']); // => \"a,b,c\"\n```\n\n`null` 或 `undefined` 会被视为空数组。\n\n```typescript\nimport { join } from 'es-toolkit/compat';\n\njoin(null, '-'); // => \"\"\njoin(undefined, '-'); // => \"\"\n```\n\n#### 参数\n\n- `array` (`T[]`) - 要连接的数组。\n\n::: info `array` 可以是 `ArrayLike<T>` 或 `null` 或 `undefined`\n\n为了确保与 lodash 的完全兼容性,`join` 函数会按照以下方式处理 `array`:\n\n- 如果 `array` 是 `ArrayLike<T>`,它会使用 `Array.from(...)` 将其转换为数组。\n- 如果 `array` 是 `null` 或 `undefined`,它会被视为一个空数组。\n\n:::\n\n- `separator` (`string`, 可选) - 用于连接元素的分隔符。默认值为 `,`。\n\n#### 返回值\n\n(`string`): 返回一个包含所有通过指定分隔符连接的数组元素的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/keyBy.md",
    "content": "# keyBy (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [keyBy](../../array/keyBy.md)\n\n由于需要处理 `null` 或 `undefined`、各种参数类型等,这个 `keyBy` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [keyBy](../../array/keyBy.md)。\n\n:::\n\n将集合的元素按指定键组织成对象。\n\n```typescript\nconst result = keyBy(collection, iteratee);\n```\n\n## 用法\n\n### `keyBy(collection, iteratee)`\n\n使用指定的键生成函数或属性名将数组或对象的每个元素组织成对象。如果有多个元素具有相同的键,则使用最后一个元素。\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\n// 通过属性名生成键\nconst array = [\n  { dir: 'left', code: 97 },\n  { dir: 'right', code: 100 },\n];\n\nkeyBy(array, 'dir');\n// => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } }\n\n// 使用函数生成键\nkeyBy(array, o => String.fromCharCode(o.code));\n// => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n\n// 也可以用于对象\nconst obj = {\n  a: { id: 1, name: 'john' },\n  b: { id: 2, name: 'jane' },\n};\nkeyBy(obj, 'name');\n// => { john: { id: 1, name: 'john' }, jane: { id: 2, name: 'jane' } }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { keyBy } from 'es-toolkit/compat';\n\nkeyBy(null, 'id'); // {}\nkeyBy(undefined, 'id'); // {}\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | null | undefined`): 要按键组织的数组或对象。\n- `iteratee` (`ValueIterateeCustom<T, PropertyKey>`, 可选): 用于生成键的函数或属性名。如果省略,则使用元素本身作为键。\n\n#### 返回值\n\n(`Record<string, T>`): 返回一个新对象,其中每个元素映射到生成的键。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/last.md",
    "content": "# last (Lodash兼容性)\n\n::: warning 使用`es-toolkit`的[last](../../array/last.md)\n\n此`last`函数由于处理`null`或`undefined`而变得复杂。\n\n请使用更快、更现代的`es-toolkit`的[last](../../array/last.md)。\n\n:::\n\n返回数组的最后一个元素。\n\n```typescript\nconst lastElement = last(array);\n```\n\n## 用法\n\n### `last(array)`\n\n当您想获取数组的最后一个元素时使用`last`。如果数组为空，则返回`undefined`。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 数字数组的最后一个元素\nlast([1, 2, 3, 4, 5]);\n// Returns: 5\n\n// 字符串数组的最后一个元素\nlast(['a', 'b', 'c']);\n// Returns: 'c'\n\n// 对象数组的最后一个元素\nconst users = [{ name: 'Alice' }, { name: 'Bob' }];\nlast(users);\n// Returns: { name: 'Bob' }\n```\n\n空数组或`null`、`undefined`返回`undefined`。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 空数组\nlast([]);\n// Returns: undefined\n\n// null数组\nlast(null);\n// Returns: undefined\n\n// undefined数组\nlast(undefined);\n// Returns: undefined\n```\n\n也支持类数组对象。\n\n```typescript\nimport { last } from 'es-toolkit/compat';\n\n// 类数组对象\nconst arrayLike = { 0: 'first', 1: 'second', length: 2 };\nlast(arrayLike);\n// Returns: 'second'\n\n// 字符串也是类数组对象\nlast('hello');\n// Returns: 'o'\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要获取最后一个元素的数组。\n\n#### 返回值\n\n(`T | undefined`): 返回数组的最后一个元素，如果数组为空、`null`或`undefined`，则返回`undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/lastIndexOf.md",
    "content": "# lastIndexOf (Lodash兼容性)\n\n::: warning 使用`Array.lastIndexOf`\n\n此`lastIndexOf`函数由于处理`null`或`undefined`、搜索`NaN`值等原因运行缓慢。\n\n请使用更快、更现代的`Array.lastIndexOf`。\n\n:::\n\n查找数组中指定元素最后出现的索引。\n\n```typescript\nconst index = lastIndexOf(array, searchElement, fromIndex);\n```\n\n## 用法\n\n### `lastIndexOf(array, searchElement, fromIndex)`\n\n返回数组中指定元素最后出现的索引。与原生`Array.lastIndexOf`类似，但也可以找到`NaN`值。\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\n// 基本用法\nlastIndexOf([1, 2, 1, 2], 2);\n// => 3\n\n// 指定起始索引\nlastIndexOf([1, 2, 1, 2], 2, 2);\n// => 1\n\n// 查找NaN值（原生lastIndexOf无法找到NaN）\nlastIndexOf([1, 2, NaN, 4, NaN], NaN);\n// => 4\n\n// 使用负索引\nlastIndexOf([1, 2, 3, 4], 3, -2);\n// => 2\n```\n\n`null`或`undefined`被视为空数组。\n\n```typescript\nimport { lastIndexOf } from 'es-toolkit/compat';\n\nlastIndexOf(null, 1); // -1\nlastIndexOf(undefined, 1); // -1\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要搜索的数组。\n- `searchElement` (`T`): 要查找的元素。\n- `fromIndex` (`true | number`, 可选): 开始搜索的索引。传递`true`从数组末尾开始搜索。默认值为`array.length - 1`。\n\n#### 返回值\n\n(`number`): 返回最后一个匹配元素的索引。如果找不到则返回`-1`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/map.md",
    "content": "# map (Lodash兼容性)\n\n::: warning 使用`Array.prototype.map`\n\n此`map`函数由于处理`null`或`undefined`、对象遍历、属性提取等附加功能而运行缓慢。在转换数组时，JavaScript的内置`Array.prototype.map`方法更快、更简单。\n\n请使用更快、更现代的`Array.prototype.map`。\n\n:::\n\n转换数组或对象的每个元素以创建一个新数组。\n\n```typescript\nconst mapped = map(collection, iteratee);\n```\n\n## 用法\n\n### `map(collection, iteratee)`\n\n当您想要转换数组、对象或类数组对象的每个元素时使用`map`。它对每个元素执行迭代函数，并将结果作为新数组返回。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\n// 将数组的每个元素加倍\nmap([1, 2, 3], x => x * 2);\n// Returns: [2, 4, 6]\n\n// 转换对象的值\nconst obj = { a: 1, b: 2 };\nmap(obj, (value, key) => `${key}:${value}`);\n// Returns: ['a:1', 'b:2']\n\n// 提取属性\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, 'name');\n// Returns: ['John', 'Jane']\n```\n\n`null`或`undefined`被视为空数组。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nmap(null, x => x); // []\nmap(undefined, x => x); // []\n```\n\n通过将属性路径指定为字符串，还可以提取嵌套属性。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [{ info: { name: 'John' } }, { info: { name: 'Jane' } }];\nmap(users, 'info.name');\n// Returns: ['John', 'Jane']\n```\n\n传递对象时，会检查每个元素是否与该对象匹配。\n\n```typescript\nimport { map } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'John', age: 30 },\n  { name: 'Jane', age: 25 },\n];\nmap(users, { age: 30 });\n// Returns: [true, false]\n```\n\n#### 参数\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 要遍历的数组或对象。\n- `iteratee` (`function | string | object`, 可选): 对每个元素执行的函数、属性路径或要匹配的对象。如果不提供，则按原样返回每个元素。\n  - 当它是函数时，以`(value, key, collection)`的形式调用。\n  - 当它是字符串时，提取该属性。\n  - 当它是对象时，检查每个元素是否与对象匹配。\n\n#### 返回值\n\n(`U[]`): 返回转换后的值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/nth.md",
    "content": "# nth (Lodash 兼容性)\n\n::: warning 使用数组索引访问\n\n由于需要处理 `null` 或 `undefined` 和整数转换,这个 `nth` 函数运行缓慢。\n\n请改用更快、更现代的数组索引访问 (`array[index]` 或 `array.at(index)`)。\n\n:::\n\n获取数组指定索引处的元素。\n\n```typescript\nconst element = nth(array, index);\n```\n\n## 用法\n\n### `nth(array, index)`\n\n返回数组指定索引处的元素。如果索引为负数,则从数组末尾开始计算。如果索引超出范围,则返回 `undefined`。\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3, 4, 5];\n\n// 正索引\nnth(array, 1);\n// => 2\n\n// 负索引 (从末尾开始)\nnth(array, -1);\n// => 5\n\nnth(array, -2);\n// => 4\n\n// 超出范围的索引\nnth(array, 10);\n// => undefined\n\nnth(array, -10);\n// => undefined\n```\n\n`null` 或 `undefined` 被视为 `undefined`。\n\n```typescript\nimport { nth } from 'es-toolkit/compat';\n\nnth(null, 0); // undefined\nnth(undefined, 0); // undefined\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要获取元素的数组。\n- `index` (`number`, 可选): 要获取的元素的索引。如果为负数,则从末尾开始计算。默认为 `0`。\n\n#### 返回值\n\n(`T | undefined`): 返回指定索引处的元素。如果索引超出范围,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/orderBy.md",
    "content": "# orderBy (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [orderBy](../../array/orderBy.md)\n\n由于需要处理 `null` 或 `undefined`、复杂路径导航和各种排序条件,这个 `orderBy` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [orderBy](../../array/orderBy.md)。\n\n:::\n\n按多个条件对集合的元素进行排序。\n\n```typescript\nconst result = orderBy(collection, criteria, orders);\n```\n\n## 用法\n\n### `orderBy(collection, criteria, orders)`\n\n根据指定的条件和排序顺序对数组或对象的元素进行排序。您可以使用多个条件,并为每个条件指定升序 (`'asc'`) 或降序 (`'desc'`) 排序。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: 'fred', age: 48 },\n  { name: 'barney', age: 34 },\n  { name: 'fred', age: 40 },\n  { name: 'barney', age: 36 },\n];\n\n// 按名称升序、年龄降序排序\norderBy(users, ['name', 'age'], ['asc', 'desc']);\n// => [\n//   { name: 'barney', age: 36 },\n//   { name: 'barney', age: 34 },\n//   { name: 'fred', age: 48 },\n//   { name: 'fred', age: 40 }\n// ]\n\n// 使用函数指定排序条件\norderBy(users, [user => user.name, user => user.age], ['asc', 'desc']);\n// => 与上面相同的结果\n\n// 按单个条件排序\norderBy(users, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'fred', age: 40 }, ...]\n```\n\n对于对象,对值进行排序。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { name: 'fred', age: 48 },\n  b: { name: 'barney', age: 34 },\n};\n\norderBy(obj, 'age', 'desc');\n// => [{ name: 'fred', age: 48 }, { name: 'barney', age: 34 }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { orderBy } from 'es-toolkit/compat';\n\norderBy(null, 'name'); // []\norderBy(undefined, 'age'); // []\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 要排序的数组或对象。\n- `criteria` (`Criterion<T> | Array<Criterion<T>>`, 可选): 排序条件。可以使用属性名称、属性路径、函数等。默认为 `[null]`。\n- `orders` (`unknown | unknown[]`, 可选): 每个条件的排序顺序。可以使用 `'asc'`(升序)、`'desc'`(降序)、`true`(升序)、`false`(降序)。默认为 `[]`。\n\n#### 返回值\n\n(`T[]`): 返回一个新的已排序数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/partition.md",
    "content": "# partition (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [partition](../../array/partition.md)\n\n由于需要处理 `null` 或 `undefined` 和各种条件类型,这个 `partition` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [partition](../../array/partition.md)。\n\n:::\n\n根据条件将集合的元素分成两组。\n\n```typescript\nconst [truthy, falsy] = partition(collection, predicate);\n```\n\n## 用法\n\n### `partition(collection, predicate)`\n\n根据给定的条件函数将数组或对象的元素分成两组。第一组包含条件为真的元素,第二组包含条件为假的元素。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\n// 将数字数组分成偶数和奇数\npartition([1, 2, 3, 4, 5, 6], n => n % 2 === 0);\n// => [[2, 4, 6], [1, 3, 5]]\n\n// 使用属性名称指定条件\nconst users = [\n  { name: 'john', active: true },\n  { name: 'jane', active: false },\n  { name: 'bob', active: true },\n];\n\npartition(users, 'active');\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// 使用对象条件过滤\npartition(users, { active: true });\n// => [\n//   [{ name: 'john', active: true }, { name: 'bob', active: true }],\n//   [{ name: 'jane', active: false }]\n// ]\n\n// 使用数组条件过滤\npartition(users, ['name', 'john']);\n// => [\n//   [{ name: 'john', active: true }],\n//   [{ name: 'jane', active: false }, { name: 'bob', active: true }]\n// ]\n```\n\n对于对象,分割值。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\nconst obj = {\n  a: { score: 90 },\n  b: { score: 40 },\n  c: { score: 80 },\n};\n\npartition(obj, item => item.score >= 80);\n// => [[{ score: 90 }, { score: 80 }], [{ score: 40 }]]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { partition } from 'es-toolkit/compat';\n\npartition(null, x => x > 0); // [[], []]\npartition(undefined, 'active'); // [[], []]\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | T | null | undefined`): 要分割的数组或对象。\n- `predicate` (`((value: T) => unknown) | Partial<T> | [PropertyKey, any] | PropertyKey`, 可选): 测试每个元素的条件。可以是函数、部分对象、属性-值数组或属性名称。默认为 `identity`。\n\n#### 返回值\n\n(`[T[], T[]]`): 返回一个数组,包含满足条件的元素数组和不满足条件的元素数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/pull.md",
    "content": "# pull (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [pull](../../array/pull.md)\n\n此 `pull` 函数用于 Lodash 兼容性,由于更复杂的类型处理和重载而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [pull](../../array/pull.md)。\n\n:::\n\n从数组中删除所有指定的值。\n\n```typescript\nconst result = pull(array, ...valuesToRemove);\n```\n\n## 用法\n\n### `pull(array, ...valuesToRemove)`\n\n从数组中删除所有指定的值并修改原始数组。通过直接修改原始数组而不是复制它可以节省内存。\n\n```typescript\nimport { pull } from 'es-toolkit/compat';\n\n// 从数字数组中删除特定值\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npull(numbers, 2, 3);\nconsole.log(numbers); // [1, 4, 5]\n\n// 从字符串数组中删除特定值\nconst fruits = ['apple', 'banana', 'apple', 'cherry'];\npull(fruits, 'apple');\nconsole.log(fruits); // ['banana', 'cherry']\n```\n\n#### 参数\n\n- `array` (`T[]`): 要修改的数组。\n- `...valuesToRemove` (`T[]`): 要从数组中删除的值。\n\n#### 返回值\n\n(`T[]`): 返回修改后的原始数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/pullAll.md",
    "content": "# pullAll (Lodash 兼容性)\n\n从数组中删除包含在指定值数组中的所有值。\n\n```typescript\nconst result = pullAll(array, valuesToRemove);\n```\n\n## 用法\n\n### `pullAll(array, valuesToRemove)`\n\n从数组中删除 `valuesToRemove` 数组中包含的所有值并修改原始数组。类似于 `pull` 函数,但将要删除的值作为数组接收。\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\n// 从数字数组中删除特定值\nconst numbers = [1, 2, 3, 2, 4, 2, 5];\npullAll(numbers, [2, 3]);\nconsole.log(numbers); // [1, 4, 5]\n\n// 从字符串数组中删除特定值\nconst fruits = ['apple', 'banana', 'apple', 'cherry', 'banana'];\npullAll(fruits, ['apple', 'banana']);\nconsole.log(fruits); // ['cherry']\n```\n\n如果传入空数组、`null` 或 `undefined`,则不会删除任何内容。\n\n```typescript\nimport { pullAll } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3];\npullAll(numbers, []);\nconsole.log(numbers); // [1, 2, 3]\n\npullAll(numbers, null);\nconsole.log(numbers); // [1, 2, 3]\n```\n\n#### 参数\n\n- `array` (`T[]`): 要修改的数组。\n- `valuesToRemove` (`ArrayLike<T>`, 可选): 包含要从数组中删除的值的数组。默认为 `[]`。\n\n#### 返回值\n\n(`T[]`): 返回修改后的原始数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/pullAllBy.md",
    "content": "# pullAllBy (Lodash 兼容性)\n\n根据迭代器转换后的值从数组中删除指定的值。\n\n```typescript\nconst modified = pullAllBy(array, valuesToRemove, iteratee);\n```\n\n## 用法\n\n### `pullAllBy(array, values, iteratee)`\n\n根据通过提供的iteratee函数转换后的值从数组中删除指定的值。原始数组会被修改,并返回修改后的数组。\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\n// 通过比较属性值来删除\nconst array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\npullAllBy(array, [{ x: 1 }, { x: 3 }], 'x');\nconsole.log(array); // [{ x: 2 }]\n\n// 通过函数转换值来比较\nconst numbers = [1, 2, 3, 4, 5];\npullAllBy(numbers, [2, 4], n => n % 2);\nconsole.log(numbers); // [1, 3, 5] (只剩奇数)\n```\n\n如果数组为空、`null` 或 `undefined`,则原样返回原始数组。\n\n```typescript\nimport { pullAllBy } from 'es-toolkit/compat';\n\npullAllBy([], [1, 2], x => x); // []\npullAllBy(null as any, [1, 2], x => x); // null\n```\n\n#### 参数\n\n- `array` (`T[]`): 要修改的数组。\n- `values` (`ArrayLike<T>`, 可选): 要删除的值的数组。\n- `iteratee` (`ValueIteratee<T>`, 可选): 应用于每个元素的iteratee函数。可以使用属性名、部分对象或函数。\n\n#### 返回值\n\n(`T[]`): 返回删除了指定值的原始数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/pullAllWith.md",
    "content": "# pullAllWith (Lodash 兼容性)\n\n使用比较函数从数组中删除指定的值。\n\n```typescript\nconst modified = pullAllWith(array, valuesToRemove, comparator);\n```\n\n## 用法\n\n### `pullAllWith(array, values, comparator)`\n\n使用提供的比较函数从数组中删除指定的值。原始数组会被修改，并返回修改后的数组。\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\n// 通过对象比较删除\nconst array = [\n  { x: 1, y: 2 },\n  { x: 3, y: 4 },\n  { x: 5, y: 6 },\n];\npullAllWith(array, [{ x: 3, y: 4 }], (a, b) => a.x === b.x && a.y === b.y);\nconsole.log(array); // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n\n// 通过字符串长度比较删除\nconst words = ['hello', 'world', 'test', 'code'];\npullAllWith(words, ['hi'], (a, b) => a.length === b.length);\nconsole.log(words); // ['hello', 'world', 'code'] ('test' 因与 'hi' 长度相同而被删除)\n```\n\n如果数组为空或为 `null`、`undefined`，则按原样返回原始数组。\n\n```typescript\nimport { pullAllWith } from 'es-toolkit/compat';\n\npullAllWith([], [1], (a, b) => a === b); // []\npullAllWith(null as any, [1], (a, b) => a === b); // null\n```\n\n#### 参数\n\n- `array` (`T[]`): 要修改的数组。\n- `values` (`ArrayLike<T>`, 可选): 要删除的值的数组。\n- `comparator` (`(a: T, b: T) => boolean`, 可选): 比较两个元素的函数。如果认为两个元素相等，应返回 `true`。\n\n#### 返回值\n\n(`T[]`): 返回删除了指定值的原始数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/pullAt.md",
    "content": "# pullAt (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [pullAt](../../array/pullAt.md)\n\n由于复杂的类型处理和重载，这个 `pullAt` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [pullAt](../../array/pullAt.md)。\n\n:::\n\n从数组中删除指定索引处的元素并返回已删除的元素。\n\n```typescript\nconst removed = pullAt(array, ...indexes);\n```\n\n## 用法\n\n### `pullAt(array, ...indexes)`\n\n从数组中删除指定索引处的元素并返回已删除元素的数组。原始数组会被修改。\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\n// 通过单个索引删除\nconst array = [1, 2, 3, 4, 5];\nconst removed = pullAt(array, 1, 3);\nconsole.log(array); // [1, 3, 5]\nconsole.log(removed); // [2, 4]\n\n// 通过索引数组删除\nconst colors = ['red', 'green', 'blue', 'yellow'];\nconst removedColors = pullAt(colors, [0, 2]);\nconsole.log(colors); // ['green', 'yellow']\nconsole.log(removedColors); // ['red', 'blue']\n```\n\n不存在的索引被视为 `undefined`。\n\n```typescript\nimport { pullAt } from 'es-toolkit/compat';\n\nconst numbers = [10, 20, 30];\nconst removed = pullAt(numbers, 1, 5);\nconsole.log(numbers); // [10, 30]\nconsole.log(removed); // [20, undefined]\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T>`): 要修改的数组。\n- `...indexes` (`Array<number | number[]>`): 要删除的元素的索引。可以传递单个数字或数字数组。\n\n#### 返回值\n\n(`ArrayLike<T>`): 返回已删除元素的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/reduce.md",
    "content": "# reduce (Lodash 兼容性)\n\n::: warning 使用 `Array.prototype.reduce` 或 `Object.values` 与 `reduce`\n\n此 `reduce` 函数由于复杂的类型处理和支持各种输入格式而运行较慢。\n\n请改用更快、更现代的 `Array.prototype.reduce` 方法,或对于对象,与 `Object.values` 一起使用。\n\n:::\n\n将数组或对象归约为单个值。\n\n```typescript\nconst result = reduce(collection, iteratee, initialValue);\n```\n\n## 用法\n\n### `reduce(collection, iteratee, initialValue)`\n\n遍历数组或对象的所有元素以计算累积值。如果提供初始值,则从该值开始;否则从第一个元素开始。\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\n// 计算数组总和\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value, 0);\nconsole.log(sum); // 10\n\n// 计算对象值的总和\nconst scores = { math: 95, english: 87, science: 92 };\nconst totalScore = reduce(scores, (acc, value) => acc + value, 0);\nconsole.log(totalScore); // 274\n```\n\n如果不提供初始值,第一个元素将成为初始值,并从第二个元素开始迭代。\n\n```typescript\nimport { reduce } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduce(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (1 + 2 + 3 + 4)\n\n// 空数组返回 undefined\nconst empty = [];\nconst result = reduce(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### 参数\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 要迭代的数组或对象。\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 对每个元素调用的函数。它接收累积值、当前值、索引/键和原始数组/对象。\n- `initialValue` (`any`, 可选): 累加器的初始值。如果未提供,第一个元素将成为初始值。\n\n#### 返回值\n\n(`any`): 返回处理所有元素后的最终累积值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/reduceRight.md",
    "content": "# reduceRight (Lodash 兼容性)\n\n::: warning 使用 `Array.prototype.reduceRight` 或 `Object.values` 与 `reduceRight`\n\n此 `reduceRight` 函数由于复杂的类型处理和支持各种输入格式而运行较慢。\n\n请改用更快、更现代的 `Array.prototype.reduceRight` 方法,或对于对象,将 `reduceRight` 与 `Object.values` 一起使用。\n\n:::\n\n通过从右到左迭代将数组或对象归约为单个值。\n\n```typescript\nconst result = reduceRight(collection, iteratee, initialValue);\n```\n\n## 用法\n\n### `reduceRight(collection, iteratee, initialValue)`\n\n从右到左遍历数组或对象的所有元素以计算累积值。如果提供初始值,则从该值开始;否则从最后一个元素开始。\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\n// 将数组连接成字符串(从右侧)\nconst letters = ['a', 'b', 'c', 'd'];\nconst result = reduceRight(letters, (acc, value) => acc + value, '');\nconsole.log(result); // 'dcba'\n\n// 对象值的乘法(键顺序的逆序)\nconst numbers = { x: 2, y: 3, z: 4 };\nconst product = reduceRight(numbers, (acc, value) => acc * value, 1);\nconsole.log(product); // 24 (1 * 4 * 3 * 2)\n```\n\n如果不提供初始值,最后一个元素将成为初始值,并从倒数第二个元素开始迭代。\n\n```typescript\nimport { reduceRight } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4];\nconst sum = reduceRight(numbers, (acc, value) => acc + value);\nconsole.log(sum); // 10 (4 + 3 + 2 + 1)\n\n// 空数组返回 undefined\nconst empty = [];\nconst result = reduceRight(empty, (acc, value) => acc + value);\nconsole.log(result); // undefined\n```\n\n#### 参数\n\n- `collection` (`T[] | ArrayLike<T> | Record<string, T> | null | undefined`): 要迭代的数组或对象。\n- `iteratee` (`(accumulator: any, value: any, index: PropertyKey, collection: any) => any`): 对每个元素调用的函数。它接收累积值、当前值、索引/键和原始数组/对象。\n- `initialValue` (`any`, 可选): 累加器的初始值。如果未提供,最后一个元素将成为初始值。\n\n#### 返回值\n\n(`any`): 返回处理所有元素后的最终累积值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/reject.md",
    "content": "# reject (Lodash 兼容性)\n\n::: warning 使用 `Array.filter()`\n\n此 `reject` 函数为了与 Lodash 兼容而支持多种形式的 predicate，因此实现较为复杂。对于简单的函数 predicate，使用 `Array.filter()` 会更简单和更快。\n\n请使用更快、更现代的 `Array.filter()`。例如，`reject(arr, func)` 可以替换为 `arr.filter(item => !func(item))`。\n\n:::\n\n遍历集合并返回一个由不符合条件函数的元素组成的新数组。\n\n```typescript\nconst filtered = reject(collection, predicate);\n```\n\n## 用法\n\n### `reject(collection, predicate)`\n\n从数组、对象或字符串中选出不符合给定条件的元素，并返回一个新数组。执行与 `filter` 相反的操作。\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 过滤出不是偶数的数字\nreject([1, 2, 3, 4, 5], n => n % 2 === 0);\n// => [1, 3, 5]\n\n// 过滤出不具有特定属性的对象\nreject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n// => [{ b: 1 }]\n\n// 过滤出不具有特定属性值的对象\nreject([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// => [{ a: 1 }, { a: 3 }]\n\n// 从字符串中过滤出不是特定字符的字符\nreject('abc', char => char === 'b');\n// => ['a', 'c']\n```\n\n此函数支持多种形式的 predicate。\n\n```typescript\nimport { reject } from 'es-toolkit/compat';\n\n// 使用函数条件\nreject(users, user => user.age < 18);\n\n// 对象的部分匹配\nreject(users, { active: false });\n\n// 属性-值数组\nreject(users, ['status', 'pending']);\n\n// 通过属性名检查 truthy 值\nreject(users, 'premium');\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | string | null | undefined`): 要遍历的集合。\n- `predicate` (`((item: T, index: number, collection: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey`, 可选): 对每个元素执行的条件。默认值为 `identity`。\n\n#### 返回值\n\n(`T[]`): 返回一个由不符合 predicate 条件的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/remove.md",
    "content": "# remove (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `remove`\n\n此 `remove` 函数为了 Lodash 兼容性支持各种形式的谓词,因此实现较为复杂。主库中的 `remove` 函数仅支持简单的函数谓词,因此运行更快。\n\n请改用更快、更现代的 `es-toolkit` 的 [remove](../../array/remove.md)。\n\n:::\n\n从数组中删除匹配条件的元素并返回被删除的元素。\n\n```typescript\nconst removedElements = remove(array, predicate);\n```\n\n## 用法\n\n### `remove(array, predicate)`\n\n遍历数组并从原始数组中删除满足给定条件的元素,将删除的元素作为新数组返回。请注意,原始数组会被直接修改。\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 使用函数条件删除\nconst numbers = [1, 2, 3, 4, 5];\nconst evens = remove(numbers, n => n % 2 === 0);\nconsole.log(numbers); // => [1, 3, 5]\nconsole.log(evens); // => [2, 4]\n\n// 使用部分对象匹配删除\nconst objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\nconst removed = remove(objects, { a: 1 });\nconsole.log(objects); // => [{ a: 2 }, { a: 3 }]\nconsole.log(removed); // => [{ a: 1 }]\n\n// 使用属性-值对删除\nconst items = [{ name: 'apple' }, { name: 'banana' }, { name: 'cherry' }];\nconst cherries = remove(items, ['name', 'cherry']);\nconsole.log(items); // => [{ name: 'apple' }, { name: 'banana' }]\nconsole.log(cherries); // => [{ name: 'cherry' }]\n```\n\n此函数支持各种形式的谓词。\n\n```typescript\nimport { remove } from 'es-toolkit/compat';\n\n// 使用函数条件\nremove(users, user => user.active === false);\n\n// 部分对象匹配\nremove(users, { status: 'inactive' });\n\n// 属性-值数组\nremove(users, ['type', 'guest']);\n\n// 按属性名检查真值\nremove(users, 'isDeleted');\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T>`): 要修改的数组。\n- `predicate` (`((value: T, index: number, array: ArrayLike<T>) => boolean) | Partial<T> | [keyof T, unknown] | keyof T`, 可选): 对每个元素执行的条件。默认为 `identity`。\n\n#### 返回值\n\n(`T[]`): 返回由因匹配条件而被删除的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/reverse.md",
    "content": "# reverse（Lodash 兼容性）\n\n::: warning 使用 `Array.prototype.reverse()`\n\n此 `reverse` 函数为了与 Lodash 兼容而包含 `null` 和 `undefined` 处理。如果只需要简单的数组反转，原生 JavaScript 的 `Array.prototype.reverse()` 方法更直观、更快。\n\n请使用更快、更现代的 `Array.prototype.reverse()`。\n\n:::\n\n就地反转数组元素。\n\n```typescript\nconst reversed = reverse(array);\n```\n\n## 用法\n\n### `reverse(array)`\n\n反转数组的顺序，使第一个元素成为最后一个，最后一个元素成为第一个。它直接修改原始数组并返回修改后的数组。\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\n// 反转数字数组\nconst numbers = [1, 2, 3, 4, 5];\nconst reversed = reverse(numbers);\nconsole.log(numbers); // => [5, 4, 3, 2, 1]\nconsole.log(reversed); // => [5, 4, 3, 2, 1]\n\n// 反转字符串数组\nconst words = ['apple', 'banana', 'cherry'];\nreverse(words);\nconsole.log(words); // => ['cherry', 'banana', 'apple']\n\n// 空数组或 null/undefined 原样返回\nreverse([]); // => []\nreverse(null); // => null\nreverse(undefined); // => undefined\n```\n\n请注意，此函数会直接修改原始数组。\n\n```typescript\nimport { reverse } from 'es-toolkit/compat';\n\nconst original = [1, 2, 3];\nconst result = reverse(original);\n\nconsole.log(original === result); // => true（同一个数组对象）\nconsole.log(original); // => [3, 2, 1]（原数组被修改）\n```\n\n#### 参数\n\n- `array` (`T[] | null | undefined`)：要反转的数组。如果是 `null` 或 `undefined`，则原样返回。\n\n#### 返回值\n\n(`T[] | null | undefined`)：返回反转后的数组。如果输入是 `null` 或 `undefined`，则原样返回该值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sample.md",
    "content": "# sample（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 [sample](../../array/sample.md)\n\n此 `sample` 函数由于 `null` 或 `undefined` 处理、对象值处理等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [sample](../../array/sample.md)。\n\n:::\n\n从数组或对象中获取一个随机元素。\n\n```typescript\nconst randomItem = sample(collection);\n```\n\n## 用法\n\n### `sample(collection)`\n\n当需要从数组或对象中选择一个随机元素时，使用 `sample`。对于数组，返回一个随机元素，对于对象，返回一个随机值。\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\n// 从数组中获取随机元素\nsample([1, 2, 3, 4, 5]);\n// 返回1到5之间的随机数字\n\n// 从对象中获取随机值\nsample({ a: 1, b: 2, c: 3 });\n// 返回1、2、3中的随机值\n\n// 也可以处理字符串\nsample('hello');\n// 返回 'h'、'e'、'l'、'l'、'o' 中的随机字符\n```\n\n`null` 或 `undefined` 返回 `undefined`。\n\n```typescript\nimport { sample } from 'es-toolkit/compat';\n\nsample(null); // undefined\nsample(undefined); // undefined\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<string, T> | null | undefined`)：要采样的数组或对象。\n\n#### 返回值\n\n(`T | string | undefined`)：返回从数组或对象中随机选择的元素。如果集合为空或为 `null`、`undefined`，则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sampleSize.md",
    "content": "# sampleSize（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 [sampleSize](../../array/sampleSize.md)\n\n此 `sampleSize` 函数由于 `null` 或 `undefined` 处理、对象支持、默认值处理等原因运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [sampleSize](../../array/sampleSize.md)。\n\n:::\n\n从数组或对象中随机选择指定数量的元素。\n\n```typescript\nconst sampled = sampleSize(collection, size);\n```\n\n## 用法\n\n### `sampleSize(collection, size?)`\n\n当需要从数组或对象中随机选择元素时，使用 `sampleSize`。它使用 Floyd 算法进行高效的无重复采样。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\n// 从数组中随机选择3个元素。\nsampleSize([1, 2, 3, 4, 5], 3);\n// 返回值：[2, 4, 5]（实际结果可能不同）\n\n// 从对象中随机选择2个值。\nsampleSize({ a: 1, b: 2, c: 3, d: 4 }, 2);\n// 返回值：[2, 4]（实际结果可能不同）\n```\n\n`null` 或 `undefined` 作为空数组处理。\n\n```typescript\nimport { sampleSize } from 'es-toolkit/compat';\n\nsampleSize(null, 2);\n// 返回值：[]\n\nsampleSize(undefined, 2);\n// 返回值：[]\n```\n\n#### 参数\n\n- `collection` (`Record<string, T> | Record<number, T> | T | null | undefined`)：要采样的数组或对象。\n- `size` (`number`，可选）：要选择的元素数量。默认值为 `1`。\n\n#### 返回值\n\n(`T[]`)：返回由随机选择的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/shuffle.md",
    "content": "# shuffle（Lodash 兼容性）\n\n::: warning 使用 `es-toolkit` 的 `shuffle`\n\n此 `shuffle` 函数为了与 Lodash 兼容而包含额外的处理，运行缓慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [shuffle](../../array/shuffle.md)。\n\n:::\n\n随机打乱数组或对象的元素并返回新数组。\n\n```typescript\nconst result = shuffle(collection);\n```\n\n## 用法\n\n### `shuffle(collection)`\n\n使用 Fisher-Yates 算法随机打乱数组或对象的元素并返回新数组。不会修改原数组。\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\n// 打乱数字数组\nconst numbers = [1, 2, 3, 4, 5];\nconst shuffled1 = shuffle(numbers);\n// 返回值：例如 [3, 1, 5, 2, 4]（每次顺序不同）\n\n// 打乱字符串数组\nconst fruits = ['apple', 'banana', 'cherry', 'date'];\nconst shuffled2 = shuffle(fruits);\n// 返回值：例如 ['cherry', 'apple', 'date', 'banana']\n\n// 打乱对象的值\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst shuffled3 = shuffle(obj);\n// 返回值：例如 [3, 1, 4, 2]（对象值被随机打乱）\n```\n\n`null` 或 `undefined` 作为空数组处理。\n\n```typescript\nimport { shuffle } from 'es-toolkit/compat';\n\nshuffle(null);\n// 返回值：[]\n\nshuffle(undefined);\n// 返回值：[]\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | T | null | undefined`)：要打乱的数组或对象。\n\n#### 返回值\n\n(`T[]`)：返回元素被随机打乱的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/size.md",
    "content": "# size（Lodash 兼容性）\n\n::: warning 使用 `.length` 属性\n\n此 `size` 函数由于 `null`、`undefined` 处理和多种类型支持而运行复杂。\n\n请使用更快、更现代的 `.length` 属性或 `Object.keys().length`。\n\n:::\n\n返回数组、字符串、对象的大小。\n\n```typescript\nconst length = size(collection);\n```\n\n## 用法\n\n### `size(collection)`\n\n当需要检查数组、字符串、对象、Map、Set 的大小时，使用 `size`。它为各种类型的集合提供一致的大小信息。\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\n// 数组的元素个数\nsize([1, 2, 3]);\n// 返回 3\n\n// 字符串的字符个数\nsize('hello');\n// 返回 5\n\n// 对象的可枚举属性个数\nsize({ a: 1, b: 2, c: 3 });\n// 返回 3\n\n// Map 的元素个数\nsize(\n  new Map([\n    ['a', 1],\n    ['b', 2],\n  ])\n);\n// 返回 2\n\n// Set 的元素个数\nsize(new Set([1, 2, 3]));\n// 返回 3\n```\n\n`null` 或 `undefined` 返回 0。\n\n```typescript\nimport { size } from 'es-toolkit/compat';\n\nsize(null); // 0\nsize(undefined); // 0\nsize({}); // 0\nsize([]); // 0\n```\n\n#### 参数\n\n- `collection` (`object | string | null | undefined`)：要检查大小的数组、字符串、对象、Map、Set。\n\n#### 返回值\n\n(`number`)：返回集合的大小。如果是 `null` 或 `undefined`，则返回 0。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/slice.md",
    "content": "# slice（Lodash 兼容性）\n\n::: warning 使用 `Array.prototype.slice`\n\n此 `slice` 函数由于 `null` 或 `undefined` 处理和稀疏数组的特殊处理而运行缓慢。JavaScript 的原生 `Array.prototype.slice` 方法更快且更标准化。\n\n请使用更快、更现代的 `Array.prototype.slice`。\n\n:::\n\n切割数组的一部分以创建新数组。\n\n```typescript\nconst sliced = slice(array, start, end);\n```\n\n## 用法\n\n### `slice(array, start, end)`\n\n当只需要数组的特定部分时，使用 `slice`。它创建一个新数组，包含从开始位置到结束位置之前的元素。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\n// 从索引1到2进行切割\nslice([1, 2, 3, 4], 1, 3);\n// 返回值：[2, 3]\n\n// 使用负索引\nslice([1, 2, 3, 4], -2);\n// 返回值：[3, 4]\n\n// 仅指定开始位置\nslice([1, 2, 3, 4], 2);\n// 返回值：[3, 4]\n```\n\n`null` 或 `undefined` 作为空数组处理。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice(null); // []\nslice(undefined); // []\n```\n\n处理稀疏数组时，空槽会用 `undefined` 填充。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nconst sparse = new Array(3);\nsparse[1] = 'b';\nslice(sparse);\n// 返回值：[undefined, 'b', undefined]\n```\n\n使用负索引会从数组末尾开始计算。\n\n```typescript\nimport { slice } from 'es-toolkit/compat';\n\nslice([1, 2, 3, 4, 5], -3, -1);\n// 返回值：[3, 4]\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`)：要切割的数组。\n- `start` (`number`，可选）：开始位置。负值从末尾计算。默认值为 `0`。\n- `end` (`number`，可选）：结束位置（不包含）。负值从末尾计算。默认值为数组的长度。\n\n#### 返回值\n\n(`T[]`)：返回包含从 `start` 到 `end` 之前的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/some.md",
    "content": "# some (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.some()` 方法\n\n此 `some` 函数由于处理各种类型的条件和对象支持而以复杂的方式运行。\n\n请使用更快、更现代的 `Array.prototype.some()` 方法。\n\n:::\n\n检查数组或对象的元素中是否至少有一个满足给定条件。\n\n```typescript\nconst hasMatch = some(collection, predicate);\n```\n\n## 用法\n\n### `some(collection, predicate)`\n\n当您想检查数组或对象中是否至少有一个元素满足条件时，请使用 `some`。它支持各种形式的条件。\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\n// 在数组上使用条件函数\nsome([1, 2, 3, 4], n => n % 2 === 0);\n// 返回 true（2 和 4 是偶数）\n\n// 在数组上使用部分对象匹配\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n// 返回 true\n\n// 在数组上使用属性-值对匹配\nsome([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n// 返回 true\n\n// 在数组上检查属性是否为真\nsome([{ a: 0 }, { a: 1 }, { a: 0 }], 'a');\n// 返回 true（存在 a=1 的元素）\n\n// 在对象上使用条件函数\nsome({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n// 返回 true（2 是偶数）\n```\n\n如果未提供条件，则检查是否有任何值为真的元素。\n\n```typescript\nimport { some } from 'es-toolkit/compat';\n\nsome([0, 1, 2]); // true（1 和 2 为真）\nsome([false, null, undefined]); // false（所有值都为假）\nsome(null); // false（被视为空数组）\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | Record<any, any> | null | undefined`): 要检查的数组或对象。\n- `predicate` (选择): 检查条件的函数、部分对象、属性-值对或属性名。\n\n#### 返回值\n\n(`boolean`): 如果至少有一个元素满足条件则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortBy.md",
    "content": "# sortBy (Lodash 兼容性)\n\n::: warning 请使用 `Array.prototype.sort` 方法\n\n这个 `sortBy` 函数由于处理各种类型的条件和对象支持而表现复杂。\n\n请使用更快、更现代的 `Array.prototype.sort` 方法。\n\n:::\n\n根据多个条件按升序对数组进行排序。\n\n```typescript\nconst sorted = sortBy(collection, ...iteratees);\n```\n\n## 用法\n\n### `sortBy(collection, ...iteratees)`\n\n使用 `sortBy` 来使用多个条件按升序对数组或对象进行排序。它对每个元素执行排序条件函数,并根据结果值进行排序。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\n// 按名称对用户进行排序。\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\nsortBy(users, ['user']);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n\n// 使用函数进行排序。\nsortBy(users, [\n  function (o) {\n    return o.user;\n  },\n]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 48 },\n//   { user: 'fred', age: 40 },\n// ]\n```\n\n您也可以同时使用多个条件。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nconst users = [\n  { user: 'fred', age: 48 },\n  { user: 'barney', age: 34 },\n  { user: 'fred', age: 40 },\n  { user: 'barney', age: 36 },\n];\n\n// 首先按名称排序,然后按年龄排序。\nsortBy(users, ['user', item => item.age]);\n// Returns: [\n//   { user: 'barney', age: 34 },\n//   { user: 'barney', age: 36 },\n//   { user: 'fred', age: 40 },\n//   { user: 'fred', age: 48 },\n// ]\n```\n\n`null` 和 `undefined` 被视为空数组。\n\n```typescript\nimport { sortBy } from 'es-toolkit/compat';\n\nsortBy(null, ['key']); // []\nsortBy(undefined, ['key']); // []\n```\n\n#### 参数\n\n- `collection` (`ArrayLike<T> | object | null | undefined`): 要排序的数组或对象。\n- `...iteratees` (`Array<Many<ListIteratee<T> | ObjectIteratee<T>>>`): 确定排序条件的函数或属性名称。\n\n#### 返回值\n\n(`T[]`): 返回按升序排序的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedIndex.md",
    "content": "# sortedIndex (Lodash 兼容性)\n\n::: warning 请直接实现二分查找\n\n这个 `sortedIndex` 函数由于处理 `null`、`undefined` 和各种类型支持而具有复杂性。\n\n相反，请直接实现更快、更现代的二分查找或使用专用库。\n\n:::\n\n查找应将值插入已排序数组的最低索引。\n\n```typescript\nconst index = sortedIndex(array, value);\n```\n\n## 用法\n\n### `sortedIndex(array, value)`\n\n在已排序数组中查找插入值的位置时，请使用 `sortedIndex`。它使用二分查找快速找到位置。\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\n// 在数字数组中查找插入位置\nsortedIndex([30, 50], 40);\n// 返回 1（40位于30和50之间）\n\n// 在字符串数组中查找插入位置\nsortedIndex(['a', 'c'], 'b');\n// 返回 1（'b'位于'a'和'c'之间）\n\n// 当存在相同值时，返回第一个位置\nsortedIndex([1, 2, 2, 3], 2);\n// 返回 1（第一个2的位置）\n```\n\n对于 `null` 或 `undefined` 数组，返回 0。\n\n```typescript\nimport { sortedIndex } from 'es-toolkit/compat';\n\nsortedIndex(null, 1); // 0\nsortedIndex(undefined, 1); // 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要插入的值。\n\n#### 返回值\n\n(`number`): 返回应插入值的最低索引。如果数组为 `null` 或 `undefined`，则返回 0。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedIndexBy.md",
    "content": "# sortedIndexBy (Lodash 兼容性)\n\n::: warning 请直接实现二分查找和转换函数\n\n这个 `sortedIndexBy` 函数由于复杂的迭代处理和类型转换而运行缓慢。\n\n相反，请直接实现更快、更现代的二分查找和转换函数。\n\n:::\n\n在应用转换函数后，查找应将值插入已排序数组的最低索引。\n\n```typescript\nconst index = sortedIndexBy(array, value, iteratee);\n```\n\n## 用法\n\n### `sortedIndexBy(array, value, iteratee)`\n\n在应用转换函数后查找值在已排序数组中的插入位置时，请使用 `sortedIndexBy`。它对每个元素和值应用转换函数进行比较。\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\n// 在按属性排序的对象数组中查找插入位置\nconst objects = [{ x: 4 }, { x: 5 }];\nsortedIndexBy(objects, { x: 4 }, 'x');\n// 返回 0\n\n// 使用函数进行转换\nconst numbers = [10, 20, 30];\nsortedIndexBy(numbers, 25, n => n);\n// 返回 2\n\n// 使用属性值数组进行转换\nconst users = [{ name: 'alice' }, { name: 'bob' }];\nsortedIndexBy(users, { name: 'bob' }, ['name', 'bob']);\n// 返回 1 (等价于向 [false, true] 中插入 true)\n```\n\n对于 `null` 或 `undefined` 数组，返回 0。\n\n```typescript\nimport { sortedIndexBy } from 'es-toolkit/compat';\n\nsortedIndexBy(null, { x: 1 }, 'x'); // 0\nsortedIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要插入的值。\n- `iteratee` (可选): 要应用于每个元素和值的转换函数、属性名称或属性值数组。\n\n#### 返回值\n\n(`number`): 返回应插入值的最低索引。如果数组为 `null` 或 `undefined`，则返回 0。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedIndexOf.md",
    "content": "# sortedIndexOf (Lodash 兼容性)\n\n::: warning 请直接实现二分查找\n\n这个 `sortedIndexOf` 函数由于复杂的二分查找处理和类型验证而运行缓慢。\n\n相反，请直接实现更快、更现代的二分查找或使用 `Array.prototype.indexOf()`。\n\n:::\n\n查找值在已排序数组中首次出现的索引。\n\n```typescript\nconst index = sortedIndexOf(array, value);\n```\n\n## 用法\n\n### `sortedIndexOf(array, value)`\n\n在已排序数组中查找特定值首次出现的索引时，请使用 `sortedIndexOf`。它使用二分查找快速找到值。\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\n// 在数字数组中查找值\nsortedIndexOf([11, 22, 33, 44, 55], 33);\n// 返回 2\n\n// 当值不存在时\nsortedIndexOf([11, 22, 33, 44, 55], 30);\n// 返回 -1\n\n// 当存在重复值时，返回第一个索引\nsortedIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 返回 3（第一个3的位置）\n\n// 0和-0被视为相等\nsortedIndexOf([-0, 0], 0);\n// 返回 0\n```\n\n空数组、`null` 或 `undefined` 返回 -1。\n\n```typescript\nimport { sortedIndexOf } from 'es-toolkit/compat';\n\nsortedIndexOf([], 1); // -1\nsortedIndexOf(null, 1); // -1\nsortedIndexOf(undefined, 1); // -1\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要查找的值。\n\n#### 返回值\n\n(`number`): 返回值首次出现的索引。如果值不存在，则返回 -1。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedLastIndex.md",
    "content": "# sortedLastIndex (Lodash 兼容性)\n\n::: warning 请直接实现二分查找\n\n这个 `sortedLastIndex` 函数由于复杂的二分查找处理和类型验证而运行缓慢。\n\n相反，请直接实现更快、更现代的二分查找。\n\n:::\n\n查找应将值插入已排序数组的最高索引。\n\n```typescript\nconst index = sortedLastIndex(array, value);\n```\n\n## 用法\n\n### `sortedLastIndex(array, value)`\n\n在已排序数组中查找插入值的最高位置时，请使用 `sortedLastIndex`。当存在重复值时，它返回最后位置之后的索引。\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\n// 在具有重复值的数组中查找最后插入位置\nsortedLastIndex([4, 5, 5, 5, 6], 5);\n// 返回 4（最后一个5之后的位置）\n\n// 查找新值的插入位置\nsortedLastIndex([10, 20, 30], 25);\n// 返回 2（25位于30之前）\n\n// 当值不存在时\nsortedLastIndex([1, 2, 3], 0);\n// 返回 0（位于最前面）\n```\n\n对于 `null` 或 `undefined` 数组，返回 0。\n\n```typescript\nimport { sortedLastIndex } from 'es-toolkit/compat';\n\nsortedLastIndex(null, 1); // 0\nsortedLastIndex(undefined, 1); // 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要插入的值。\n\n#### 返回值\n\n(`number`): 返回应插入值的最高索引。如果数组为 `null` 或 `undefined`，则返回 0。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedLastIndexBy.md",
    "content": "# sortedLastIndexBy (Lodash 兼容性)\n\n::: warning 请直接实现二分查找和转换函数\n\n这个 `sortedLastIndexBy` 函数由于复杂的迭代处理和类型转换而运行缓慢。\n\n相反，请直接实现更快、更现代的二分查找和转换函数。\n\n:::\n\n在应用转换函数后，查找应将值插入已排序数组的最高索引。\n\n```typescript\nconst index = sortedLastIndexBy(array, value, iteratee);\n```\n\n## 用法\n\n### `sortedLastIndexBy(array, value, iteratee)`\n\n在应用转换函数后查找值在已排序数组中的最高插入位置时，请使用 `sortedLastIndexBy`。当存在重复值时，它返回最后值之后的索引。\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\n// 在按属性排序的对象数组中查找最后插入位置\nconst objects = [{ x: 4 }, { x: 5 }, { x: 5 }];\nsortedLastIndexBy(objects, { x: 5 }, 'x');\n// 返回 3（最后一个 x: 5 之后的位置）\n\n// 使用函数进行转换\nconst numbers = [10, 20, 20, 30];\nsortedLastIndexBy(numbers, 20, n => n);\n// 返回 3\n```\n\n对于 `null` 或 `undefined` 数组，返回 0。\n\n```typescript\nimport { sortedLastIndexBy } from 'es-toolkit/compat';\n\nsortedLastIndexBy(null, { x: 1 }, 'x'); // 0\nsortedLastIndexBy(undefined, { x: 1 }, 'x'); // 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要插入的值。\n- `iteratee` (可选): 要应用于每个元素和值的转换函数、属性名称或属性值数组。\n\n#### 返回值\n\n(`number`): 返回应插入值的最高索引。如果数组为 `null` 或 `undefined`，则返回 0。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/sortedLastIndexOf.md",
    "content": "# sortedLastIndexOf (Lodash 兼容性)\n\n::: warning 请直接实现二分查找\n\n这个 `sortedLastIndexOf` 函数由于复杂的二分查找处理和类型验证而运行缓慢。\n\n相反，请直接实现更快、更现代的二分查找或使用 `Array.prototype.lastIndexOf()`。\n\n:::\n\n查找值在已排序数组中最后一次出现的索引。\n\n```typescript\nconst index = sortedLastIndexOf(array, value);\n```\n\n## 用法\n\n### `sortedLastIndexOf(array, value)`\n\n在已排序数组中查找特定值最后一次出现的索引时，请使用 `sortedLastIndexOf`。它使用二分查找快速找到值。\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\n// 在数字数组中查找值\nsortedLastIndexOf([1, 2, 3, 4, 5], 3);\n// 返回 2\n\n// 当值不存在时\nsortedLastIndexOf([1, 2, 3, 4, 5], 6);\n// 返回 -1\n\n// 当存在重复值时，返回最后一个索引\nsortedLastIndexOf([1, 2, 2, 3, 3, 3, 4], 3);\n// 返回 5（最后一个3的位置）\n\n// 0和-0被视为相等\nsortedLastIndexOf([-0, 0], 0);\n// 返回 1\n```\n\n空数组、`null` 或 `undefined` 返回 -1。\n\n```typescript\nimport { sortedLastIndexOf } from 'es-toolkit/compat';\n\nsortedLastIndexOf([], 1); // -1\nsortedLastIndexOf(null, 1); // -1\nsortedLastIndexOf(undefined, 1); // -1\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 已排序的数组。使用未排序的数组可能会产生错误的结果。\n- `value` (`T`): 要查找的值。\n\n#### 返回值\n\n(`number`): 返回值最后一次出现的索引。如果值不存在，则返回 -1。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/tail.md",
    "content": "# tail (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [tail](../../array/tail.md)\n\n这个 `tail` 函数由于处理 `null` 或 `undefined` 等原因运行较慢。\n\n请使用更快且现代的 `es-toolkit` 的 [tail](../../array/tail.md) 代替。\n\n:::\n\n返回数组中除第一个元素外的所有元素。\n\n```typescript\nconst result = tail(array);\n```\n\n## 用法\n\n### `tail(array)`\n\n当您想要创建一个包含输入数组中除第一个元素外所有元素的新数组时,使用 `tail`。如果输入数组为空或只有一个元素,则返回空数组。\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\n// 从数字数组中删除第一个元素。\ntail([1, 2, 3]);\n// Returns: [2, 3]\n\n// 从字符串数组中删除第一个元素。\ntail(['a', 'b', 'c']);\n// Returns: ['b', 'c']\n\n// 只有一个元素的数组。\ntail([1]);\n// Returns: []\n\n// 空数组。\ntail([]);\n// Returns: []\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { tail } from 'es-toolkit/compat';\n\ntail(null); // []\ntail(undefined); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要删除第一个元素的数组。\n\n#### 返回值\n\n(`T[]`): 返回包含除第一个元素外的所有元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/take.md",
    "content": "# take (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [take](../../array/take.md)\n\n这个 `take` 函数由于包含与 Lodash 兼容的额外处理而运行较慢。\n\n请使用更快且现代的 `es-toolkit` 的 [take](../../array/take.md) 代替。\n\n:::\n\n从数组开头获取指定数量的元素并创建一个新数组。\n\n```typescript\nconst result = take([1, 2, 3, 4, 5], 3);\n// result 变为 [1, 2, 3]。\n```\n\n## 用法\n\n### `take(array, count)`\n\n从数组开头获取指定数量的元素并返回一个新数组。如果 `count` 大于数组长度,则返回整个数组。\n\n```typescript\nimport { take } from 'es-toolkit/compat';\n\n// 基本用法\nconst numbers = [1, 2, 3, 4, 5];\nconst result1 = take(numbers, 3);\n// Returns: [1, 2, 3]\n\n// 请求的数量大于数组长度\nconst result2 = take(numbers, 10);\n// Returns: [1, 2, 3, 4, 5] (整个数组)\n\n// 请求 0 个元素\nconst result3 = take(numbers, 0);\n// Returns: []\n\n// 处理空数组\nconst result4 = take([], 3);\n// Returns: []\n\n// 处理负数\nconst result5 = take(numbers, -1);\n// Returns: []\n```\n\n#### 参数\n\n- `array` (`T[]`): 要获取元素的数组。\n- `count` (`number`): 要获取的元素数量。默认值为 1。\n\n#### 返回值\n\n(`T[]`): 包含从开头获取的指定数量元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/takeRight.md",
    "content": "# takeRight (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [takeRight](../../array/takeRight.md)\n\n这个 `takeRight` 函数由于处理 `null` 或 `undefined` 等原因运行较慢。\n\n请使用更快且现代的 `es-toolkit` 的 [takeRight](../../array/takeRight.md) 代替。\n\n:::\n\n从数组末尾获取指定数量的元素。\n\n```typescript\nconst result = takeRight(array, count);\n```\n\n## 用法\n\n### `takeRight(array, count)`\n\n当您想要从数组末尾获取指定数量的元素来创建新数组时,使用 `takeRight`。如果请求的数量大于数组长度,则返回整个数组。\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\n// 从数字数组中获取末尾的 2 个元素。\ntakeRight([1, 2, 3, 4, 5], 2);\n// Returns: [4, 5]\n\n// 从字符串数组中获取末尾的 3 个元素。\ntakeRight(['a', 'b', 'c'], 2);\n// Returns: ['b', 'c']\n\n// 当请求的数量大于数组长度时\ntakeRight([1, 2, 3], 5);\n// Returns: [1, 2, 3]\n\n// 请求 0 个元素\ntakeRight([1, 2, 3], 0);\n// Returns: []\n\n// 请求负数\ntakeRight([1, 2, 3], -1);\n// Returns: []\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { takeRight } from 'es-toolkit/compat';\n\ntakeRight(null, 2); // []\ntakeRight(undefined, 2); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要获取元素的数组。\n- `count` (`number`, 可选): 要获取的元素数量。默认值为 `1`。\n\n#### 返回值\n\n(`T[]`): 返回包含从末尾获取的指定数量元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/takeRightWhile.md",
    "content": "# takeRightWhile (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [takeRightWhile](../../array/takeRightWhile.md)\n\n这个 `takeRightWhile` 函数由于处理 `null` 或 `undefined` 等原因运行较慢。\n\n请使用更快且现代的 `es-toolkit` 的 [takeRightWhile](../../array/takeRightWhile.md) 代替。\n\n:::\n\n在条件满足时从数组末尾获取元素。\n\n```typescript\nconst result = takeRightWhile(array, predicate);\n```\n\n## 用法\n\n### `takeRightWhile(array, predicate)`\n\n当您想要从数组末尾开始在条件满足时获取元素来创建新数组时,使用 `takeRightWhile`。当条件评估为 false 时停止。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\n// 使用函数条件\nconst numbers = [1, 2, 3, 4, 5];\ntakeRightWhile(numbers, x => x > 3);\n// Returns: [4, 5]\n\n// 使用对象属性条件\nconst users = [\n  { user: 'barney', active: true },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: false },\n];\n\ntakeRightWhile(users, o => !o.active);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// 使用部分对象进行条件匹配\ntakeRightWhile(users, { active: false });\n// Returns: [{ user: 'pebbles', active: false }]\n\n// 使用属性-值数组进行条件匹配\ntakeRightWhile(users, ['active', false]);\n// Returns: [{ user: 'fred', active: false }, { user: 'pebbles', active: false }]\n\n// 使用属性名检查真值\nconst items = [{ active: false }, { active: true }, { active: true }];\ntakeRightWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { takeRightWhile } from 'es-toolkit/compat';\n\ntakeRightWhile(null, x => x > 0); // []\ntakeRightWhile(undefined, x => x > 0); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要处理的数组。\n- `predicate` (`ListIteratee<T>`, 可选): 对每个元素执行的条件。可以是函数、部分对象、属性-值数组或属性名。默认值为恒等函数。\n\n#### 返回值\n\n(`T[]`): 返回在条件满足时从数组末尾获取的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/takeWhile.md",
    "content": "# takeWhile (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [takeWhile](../../array/takeWhile.md)\n\n这个 `takeWhile` 函数由于处理 `null` 或 `undefined` 等原因运行较慢。\n\n请使用更快且现代的 `es-toolkit` 的 [takeWhile](../../array/takeWhile.md) 代替。\n\n:::\n\n在条件满足时从数组开头获取元素。\n\n```typescript\nconst result = takeWhile(array, predicate);\n```\n\n## 用法\n\n### `takeWhile(array, predicate)`\n\n当您想要从数组开头开始在条件满足时获取元素来创建新数组时,使用 `takeWhile`。当条件评估为 false 时停止。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\n// 使用函数条件\nconst numbers = [1, 2, 3, 4, 5];\ntakeWhile(numbers, x => x < 3);\n// Returns: [1, 2]\n\n// 使用对象属性条件\nconst users = [\n  { user: 'barney', active: false },\n  { user: 'fred', active: false },\n  { user: 'pebbles', active: true },\n];\n\ntakeWhile(users, o => !o.active);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// 使用部分对象进行条件匹配\ntakeWhile(users, { active: false });\n// Returns: [{ user: 'barney', active: false }]\n\n// 使用属性-值数组进行条件匹配\ntakeWhile(users, ['active', false]);\n// Returns: [{ user: 'barney', active: false }, { user: 'fred', active: false }]\n\n// 使用属性名检查真值\nconst items = [{ active: true }, { active: true }, { active: false }];\ntakeWhile(items, 'active');\n// Returns: [{ active: true }, { active: true }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { takeWhile } from 'es-toolkit/compat';\n\ntakeWhile(null, x => x > 0); // []\ntakeWhile(undefined, x => x > 0); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要处理的数组。\n- `predicate` (`ListIteratee<T>`, 可选): 对每个元素执行的条件。可以是函数、部分对象、属性-值数组或属性名。默认值为恒等函数。\n\n#### 返回值\n\n(`T[]`): 返回在条件满足时从数组开头获取的元素的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/union.md",
    "content": "# union (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [union](../../array/union.md)\n\n此 `union` 函数由于复杂的数组处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [union](../../array/union.md)。\n\n:::\n\n从多个数组中创建一个仅包含唯一值的新数组。\n\n```typescript\nconst result = union(...arrays);\n```\n\n## 用法\n\n### `union(...arrays)`\n\n当您想要合并多个数组并去除重复项以创建仅包含唯一值的新数组时，请使用 `union`。保留每个值首次出现的顺序。\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\n// 合并数字数组\nunion([2], [1, 2]);\n// 返回: [2, 1]\n\n// 合并多个数组\nunion([2], [1, 2], [2, 3]);\n// 返回: [2, 1, 3]\n\n// 嵌套数组不会被展平\nunion([1, 3, 2], [1, [5]], [2, [4]]);\n// 返回: [1, 3, 2, [5], [4]]\n\n// 非数组值会被忽略\nunion([0], 3, { '0': 1 }, null, [2, 1]);\n// 返回: [0, 2, 1]\n\n// 类数组对象也会被处理\nunion([0], { 0: 'a', length: 1 }, [2, 1]);\n// 返回: [0, 'a', 2, 1]\n```\n\n`null` 或 `undefined` 会被忽略。\n\n```typescript\nimport { union } from 'es-toolkit/compat';\n\nunion([1, 2], null, undefined, [3, 4]);\n// 返回: [1, 2, 3, 4]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要合并的数组。非数组值会被忽略。\n\n#### 返回值\n\n(`T[]`): 返回一个包含所有数组唯一值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/unionBy.md",
    "content": "# unionBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [unionBy](../../array/unionBy.md)\n\n此 `unionBy` 函数由于复杂的处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [unionBy](../../array/unionBy.md)。\n\n:::\n\n合并多个数组并根据指定的标准仅保留唯一值。\n\n```typescript\nconst result = unionBy(...arrays, iteratee);\n```\n\n## 用法\n\n### `unionBy(...arrays, iteratee)`\n\n当您想要合并多个数组并根据给定的标准函数去除重复项以创建仅包含唯一值的新数组时，请使用 `unionBy`。保留每个值首次出现的顺序。\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\n// 通过向下取整比较小数\nunionBy([2.1], [1.2, 2.3], Math.floor);\n// 返回: [2.1, 1.2]\n\n// 通过对象属性比较\nunionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// 返回: [{ x: 1 }, { x: 2 }]\n\n// 使用函数比较\nunionBy(\n  [{ id: 1, name: 'a' }],\n  [\n    { id: 2, name: 'b' },\n    { id: 1, name: 'c' },\n  ],\n  item => item.id\n);\n// 返回: [{ id: 1, name: 'a' }, { id: 2, name: 'b' }]\n\n// 使用部分对象比较\nunionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], { x: 1 });\n// 返回: [{ x: 1, y: 1 }]\n```\n\n`null` 或 `undefined` 数组会被忽略。\n\n```typescript\nimport { unionBy } from 'es-toolkit/compat';\n\nunionBy([1, 2], null, undefined, [3, 4], x => x);\n// 返回: [1, 2, 3, 4]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要合并的数组。\n- `iteratee` (`ValueIteratee<T>`): 确定唯一性的标准。可以是函数、属性名称、部分对象或属性-值数组。\n\n#### 返回值\n\n(`T[]`): 返回一个根据指定标准去除重复项的唯一值新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/unionWith.md",
    "content": "# unionWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [unionWith](../../array/unionWith.md)\n\n此 `unionWith` 函数由于复杂的处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [unionWith](../../array/unionWith.md)。\n\n:::\n\n合并多个数组并使用比较函数仅保留唯一值。\n\n```typescript\nconst result = unionWith(...arrays, comparator);\n```\n\n## 用法\n\n### `unionWith(...arrays, comparator)`\n\n当您想要合并多个数组并使用自定义比较函数去除重复项以创建仅包含唯一值的新数组时,请使用 `unionWith`。保留每个值首次出现的顺序。\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\n// 使用自定义比较函数\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\n\nunionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// 返回: [{ x: 1, y: 2 }, { x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 简单的相等性比较\nunionWith([1, 2], [2, 3], (a, b) => a === b);\n// 返回: [1, 2, 3]\n\n// 按字符串长度比较\nunionWith(['ab', 'cd'], ['ef', 'gh', 'ab'], (a, b) => a.length === b.length);\n// 返回: ['ab']\n```\n\n`null` 或 `undefined` 数组会被忽略。\n\n```typescript\nimport { unionWith } from 'es-toolkit/compat';\n\nunionWith([1, 2], null, undefined, [3, 4], (a, b) => a === b);\n// 返回: [1, 2, 3, 4]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要合并的数组。\n- `comparator` (`(a: T, b: T) => boolean`): 确定两个值是否相等的比较函数。\n\n#### 返回值\n\n(`T[]`): 返回一个使用比较函数去除重复项的唯一值新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/uniq.md",
    "content": "# uniq (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [uniq](../../array/uniq.md)\n\n此 `uniq` 函数由于为 Lodash 兼容性进行额外处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [uniq](../../array/uniq.md)。\n\n:::\n\n通过从数组中去除重复项来创建一个仅包含唯一元素的新数组。\n\n```typescript\nconst result = uniq([1, 2, 2, 3, 3, 4]);\n// result 是 [1, 2, 3, 4]。\n```\n\n## 用法\n\n### `uniq(array)`\n\n通过从数组中去除重复项返回一个仅包含唯一元素的新数组。仅保留每个元素的第一次出现,并保留顺序。\n\n```typescript\nimport { uniq } from 'es-toolkit/compat';\n\n// 从数字数组中去除重复项\nconst numbers = [1, 2, 2, 3, 3, 4, 1];\nconst result1 = uniq(numbers);\n// 返回: [1, 2, 3, 4]\n\n// 从字符串数组中去除重复项\nconst strings = ['a', 'b', 'b', 'c', 'a'];\nconst result2 = uniq(strings);\n// 返回: ['a', 'b', 'c']\n\n// 从对象数组中去除重复项(引用值比较)\nconst obj1 = { id: 1 };\nconst obj2 = { id: 2 };\nconst objects = [obj1, obj2, obj1];\nconst result3 = uniq(objects);\n// 返回: [{ id: 1 }, { id: 2 }]\n```\n\n#### 参数\n\n- `array` (`T[]`): 要处理的数组。\n\n#### 返回值\n\n(`T[]`): 去除重复项的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/uniqBy.md",
    "content": "# uniqBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [uniqBy](../../array/uniqBy.md)\n\n此 `uniqBy` 函数由于处理 `null` 或 `undefined`、复杂参数类型处理等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [uniqBy](../../array/uniqBy.md)。\n\n:::\n\n根据转换函数返回的值去除重复项来创建一个唯一元素的新数组。\n\n```typescript\nconst result = uniqBy(array, iteratee);\n```\n\n## 用法\n\n### `uniqBy(array, iteratee)`\n\n对数组的每个元素应用转换函数,并仅保留转换结果相同的元素中的第一个元素。这在根据对象数组中的特定属性或数字数组中的特定计算结果去除重复项时很有用。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\n// 在数字数组中通过 Math.floor 结果去除重复项\nuniqBy([2.1, 1.2, 2.3], Math.floor);\n// 返回: [2.1, 1.2]\n\n// 在对象数组中通过属性去除重复项\nuniqBy([{ x: 1 }, { x: 2 }, { x: 1 }], 'x');\n// 返回: [{ x: 1 }, { x: 2 }]\n\n// 使用函数去除重复项\nuniqBy([{ name: 'John' }, { name: 'Jane' }, { name: 'John' }], obj => obj.name);\n// 返回: [{ name: 'John' }, { name: 'Jane' }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { uniqBy } from 'es-toolkit/compat';\n\nuniqBy(null, Math.floor); // []\nuniqBy(undefined, 'x'); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要去除重复项的数组。\n- `iteratee` (`ValueIteratee<T>`): 要应用于每个元素的转换函数。可以是函数、属性名称、部分对象等。\n\n#### 返回值\n\n(`T[]`): 返回一个根据转换函数结果去除重复项的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/uniqWith.md",
    "content": "# uniqWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [uniqWith](../../array/uniqWith.md)\n\n此 `uniqWith` 函数由于处理 `null` 或 `undefined`、复杂参数类型处理等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [uniqWith](../../array/uniqWith.md)。\n\n:::\n\n使用比较函数去除重复项来创建一个唯一元素的新数组。\n\n```typescript\nconst result = uniqWith(array, comparator);\n```\n\n## 用法\n\n### `uniqWith(array, comparator)`\n\n使用比较函数比较数组的每个元素来去除重复项。当比较函数返回 `true` 时,两个元素被视为相等,仅保留第一次出现的元素。如果未提供比较函数,默认使用浅相等性比较。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\n// 不使用比较函数(浅相等性比较)\nuniqWith([1, 2, 2, 3]);\n// 返回: [1, 2, 3]\n\n// 使用自定义比较函数根据奇偶性标准去除重复项\nuniqWith([1, 2, 3, 4], (a, b) => a % 2 === b % 2);\n// 返回: [1, 2]\n\n// 在对象数组中根据属性去除重复项\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n  { x: 1, y: 2 },\n];\nuniqWith(objects, (a, b) => a.x === b.x && a.y === b.y);\n// 返回: [{ x: 1, y: 2 }, { x: 2, y: 1 }]\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { uniqWith } from 'es-toolkit/compat';\n\nuniqWith(null); // []\nuniqWith(undefined); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要去除重复项的数组。\n- `comparator` (`(a: T, b: T) => boolean`, 可选): 比较两个元素是否相等的函数。如果相等则返回 `true`。默认为浅相等性比较。\n\n#### 返回值\n\n(`T[]`): 返回一个根据比较函数结果去除重复项的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/unzip.md",
    "content": "# unzip (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [unzip](../../array/unzip.md)\n\n此 `unzip` 函数由于处理 `null` 或 `undefined`、过滤非数组值等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [unzip](../../array/unzip.md)。\n\n:::\n\n将分组数组中相同位置的元素收集到新数组中。\n\n```typescript\nconst result = unzip(array);\n```\n\n## 用法\n\n### `unzip(array)`\n\n收集嵌套数组中相同索引处的元素并将它们作为新数组返回。执行与 `zip` 函数相反的操作。这在转置矩阵或重组结构化数据时很有用。\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\n// 解压混合字符串、布尔值和数字的数组\nconst zipped = [\n  ['a', true, 1],\n  ['b', false, 2],\n];\nconst result = unzip(zipped);\n// 返回: [['a', 'b'], [true, false], [1, 2]]\n\n// 解压数字数组\nconst numbers = [\n  [1, 4],\n  [2, 5],\n  [3, 6],\n];\nunzip(numbers);\n// 返回: [[1, 2, 3], [4, 5, 6]]\n\n// 处理不同长度的数组\nconst uneven = [\n  ['a', 1],\n  ['b', 2, true],\n];\nunzip(uneven);\n// 返回: [['a', 'b'], [1, 2], [undefined, true]]\n```\n\n`null`、`undefined` 或空数组被视为空数组。\n\n```typescript\nimport { unzip } from 'es-toolkit/compat';\n\nunzip(null); // []\nunzip(undefined); // []\nunzip([]); // []\n```\n\n#### 参数\n\n- `array` (`T[][] | ArrayLike<ArrayLike<T>> | null | undefined`): 要解压的嵌套数组。每个内部数组中相同位置的元素被收集在一起。\n\n#### 返回值\n\n(`T[][]`): 返回一个将相同位置的元素收集在一起的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/unzipWith.md",
    "content": "# unzipWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `unzipWith`\n\n此 `unzipWith` 函数由于处理 `null` 或 `undefined`、`ArrayLike` 类型处理、支持各种条件函数形式等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [unzipWith](../../array/unzipWith.md)。\n\n:::\n\n收集分组数组中相同位置的元素并应用转换函数来创建一个新数组。\n\n```typescript\nconst result = unzipWith(array, iteratee);\n```\n\n## 用法\n\n### `unzipWith(array, iteratee)`\n\n收集嵌套数组中相同索引处的元素并应用转换函数。类似于 `unzip` 函数,但可以对每个组应用转换函数。如果未提供转换函数,则执行默认的 `unzip` 操作。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\n// 将相同位置的元素相加\nunzipWith(\n  [\n    [1, 10, 100],\n    [2, 20, 200],\n  ],\n  (a, b) => a + b\n);\n// 返回: [3, 30, 300]\n\n// 不使用转换函数(默认 unzip 操作)\nunzipWith([\n  [1, 4],\n  [2, 5],\n  [3, 6],\n]);\n// 返回: [[1, 2, 3], [4, 5, 6]]\n\n// 字符串连接\nunzipWith(\n  [\n    ['a', 'x'],\n    ['b', 'y'],\n    ['c', 'z'],\n  ],\n  (a, b) => a + b\n);\n// 返回: ['abc', 'xyz']\n\n// 查找最大值\nunzipWith(\n  [\n    [1, 10],\n    [2, 20],\n    [3, 5],\n  ],\n  Math.max\n);\n// 返回: [3, 20]\n```\n\n`null`、`undefined` 或空数组被视为空数组。\n\n```typescript\nimport { unzipWith } from 'es-toolkit/compat';\n\nunzipWith(null, (a, b) => a + b); // []\nunzipWith(undefined, (a, b) => a + b); // []\nunzipWith([], (a, b) => a + b); // []\n```\n\n#### 参数\n\n- `array` (`ArrayLike<ArrayLike<T>> | null | undefined`): 要解压的嵌套数组。\n- `iteratee` (`(...values: T[]) => R`, 可选): 要应用于每组元素的转换函数。如果未提供,执行默认的 `unzip` 操作。\n\n#### 返回值\n\n(`R[]` 或 `T[][]`): 如果提供了转换函数则返回转换结果数组,否则返回解压数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/without.md",
    "content": "# without (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [without](../../array/without.md)\n\n此 `without` 函数由于为 Lodash 兼容性进行额外处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [without](../../array/without.md)。\n\n:::\n\n创建一个从数组中排除指定值的新数组。\n\n```typescript\nconst result = without([1, 2, 3, 4, 5], 2, 4);\n// result 是 [1, 3, 5]。\n```\n\n## 用法\n\n### `without(array, ...values)`\n\n返回一个从数组中删除指定值的新数组。原始数组不会被修改。\n\n```typescript\nimport { without } from 'es-toolkit/compat';\n\n// 从数字数组中删除多个值\nconst numbers = [1, 2, 3, 4, 5, 2, 4];\nconst result1 = without(numbers, 2, 4);\n// 返回: [1, 3, 5]\n\n// 从字符串数组中删除值\nconst fruits = ['apple', 'banana', 'cherry', 'banana'];\nconst result2 = without(fruits, 'banana');\n// 返回: ['apple', 'cherry']\n\n// 处理空数组\nconst result3 = without([], 1, 2, 3);\n// 返回: []\n```\n\n#### 参数\n\n- `array` (`T[]`): 要处理的原始数组。\n- `...values` (`T[]`): 要删除的值。\n\n#### 返回值\n\n(`T[]`): 删除指定值的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/xor.md",
    "content": "# xor (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [xor](../../array/xor.md)\n\n此 `xor` 函数由于处理 `null` 或 `undefined`、复杂的重复计算逻辑等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [xor](../../array/xor.md)。\n\n:::\n\n创建一个由恰好存在于多个数组中的一个数组中的元素组成的新数组。\n\n```typescript\nconst result = xor(...arrays);\n```\n\n## 用法\n\n### `xor(...arrays)`\n\n计算多个数组的对称差集。换句话说,返回恰好存在于给定数组中的一个数组中的元素。这在比较两个或多个数组时查找不重叠的唯一元素时很有用。\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\n// 两个数组的对称差集\nxor([1, 2, 3, 4], [3, 4, 5, 6]);\n// 返回: [1, 2, 5, 6]\n\n// 三个数组的对称差集\nxor([1, 2], [2, 3], [4, 5]);\n// 返回: [1, 3, 4, 5]\n\n// 字符串数组\nxor(['a', 'b'], ['b', 'c']);\n// 返回: ['a', 'c']\n\n// 仅提供一个数组\nxor([1, 2, 3]);\n// 返回: [1, 2, 3]\n```\n\n`null`、`undefined` 或空数组被忽略,只处理有效数组。\n\n```typescript\nimport { xor } from 'es-toolkit/compat';\n\nxor([1, 2], null, [2, 3]);\n// 返回: [1, 3]\n\nxor([], [1, 2], [2, 3]);\n// 返回: [1, 3]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined>`): 要计算对称差集的数组。`null` 或 `undefined` 被忽略。\n\n#### 返回值\n\n(`T[]`): 返回一个由恰好存在于数组中的一个数组中的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/xorBy.md",
    "content": "# xorBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [xorBy](../../array/xorBy.md)\n\n此 `xorBy` 函数由于处理 `null` 或 `undefined`、复杂的重复计算逻辑等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [xorBy](../../array/xorBy.md)。\n\n:::\n\n根据转换函数创建一个由恰好存在于多个数组中的一个数组中的元素组成的新数组。\n\n```typescript\nconst result = xorBy(...arrays, iteratee);\n```\n\n## 用法\n\n### `xorBy(...arrays, iteratee)`\n\n根据转换函数计算多个数组的对称差集。返回其转换结果恰好存在于数组中的一个数组中的元素。这在根据对象数组中的特定属性或数字数组中的特定计算结果进行比较时很有用。\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\n// 通过 Math.floor 结果计算对称差集\nxorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n// 返回: [1.2, 4.3]\n\n// 通过对象属性计算对称差集\nxorBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n// 返回: [{ x: 2 }]\n\n// 使用函数计算对称差集\nconst users1 = [{ name: 'John', age: 30 }];\nconst users2 = [\n  { name: 'Jane', age: 25 },\n  { name: 'John', age: 30 },\n];\nxorBy(users1, users2, user => user.name);\n// 返回: [{ name: 'Jane', age: 25 }]\n\n// 三个数组的对称差集\nxorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);\n// 返回: [1.2, 2.3, 3.4, 4.5, 5.6, 6.7]\n```\n\n`null` 或 `undefined` 被忽略。\n\n```typescript\nimport { xorBy } from 'es-toolkit/compat';\n\nxorBy([2.1, 1.2], null, [4.3, 2.4], Math.floor);\n// 返回: [1.2, 4.3]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ValueIteratee<T>>`): 要计算对称差集的数组和末尾的转换函数。可以是函数、属性名称、部分对象等。\n\n#### 返回值\n\n(`T[]`): 返回一个根据转换函数结果由恰好存在于数组中的一个数组中的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/xorWith.md",
    "content": "# xorWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [xorWith](../../array/xorWith.md)\n\n此 `xorWith` 函数由于处理 `null` 或 `undefined`、复杂的重复计算逻辑等而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [xorWith](../../array/xorWith.md)。\n\n:::\n\n使用比较函数创建一个由恰好存在于多个数组中的一个数组中的元素组成的新数组。\n\n```typescript\nconst result = xorWith(...arrays, comparator);\n```\n\n## 用法\n\n### `xorWith(...arrays, comparator)`\n\n使用比较函数计算多个数组的对称差集。当比较函数返回 `true` 时,两个元素被视为相等,并返回恰好存在于数组中的一个数组中的元素。这在处理复杂对象或需要自定义比较逻辑时很有用。\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\n// 简单数字比较\nxorWith([1, 2], [2, 3], (a, b) => a === b);\n// 返回: [1, 3]\n\n// 比较对象属性\nconst objects = [\n  { x: 1, y: 2 },\n  { x: 2, y: 1 },\n];\nconst others = [\n  { x: 1, y: 1 },\n  { x: 1, y: 2 },\n];\nxorWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n// 返回: [{ x: 2, y: 1 }, { x: 1, y: 1 }]\n\n// 三个数组的对称差集\nxorWith([1], [2], [3], (a, b) => a === b);\n// 返回: [1, 2, 3]\n\n// 按字符串长度比较\nxorWith(['hello'], ['world', 'hi'], (a, b) => a.length === b.length);\n// 返回: ['hi']\n```\n\n如果未提供比较函数,默认使用浅相等性比较。\n\n```typescript\nimport { xorWith } from 'es-toolkit/compat';\n\nxorWith([1, 2], [2, 3]);\n// 返回: [1, 3]\n```\n\n#### 参数\n\n- `...arrays` (`Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>`): 要计算对称差集的数组和末尾的比较函数。比较函数应在两个元素相等时返回 `true`。\n\n#### 返回值\n\n(`T[]`): 返回一个根据比较函数结果由恰好存在于数组中的一个数组中的元素组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/zip.md",
    "content": "# zip (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [zip](../../array/zip.md)\n\n此 `zip` 函数由于为 Lodash 兼容性进行额外处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [zip](../../array/zip.md)。\n\n:::\n\n将多个数组组合成一个元组数组。\n\n```typescript\nconst result = zip([1, 2], ['a', 'b']);\n// result 是 [[1, 'a'], [2, 'b']]。\n```\n\n## 用法\n\n### `zip(...arrs)`\n\n接受多个数组并将每个索引处的元素分组为一个元组来创建一个新数组。如果输入数组的长度不同,结果数组的长度将与最长输入数组的长度相匹配,缺失的元素用 `undefined` 填充。\n\n```typescript\nimport { zip } from 'es-toolkit/compat';\n\nconst arr1 = [1, 2, 3];\nconst arr2 = ['a', 'b', 'c'];\nconst result = zip(arr1, arr2);\n// 返回: [[1, 'a'], [2, 'b'], [3, 'c']]\n\n// 不同长度的数组\nconst arr3 = [true, false];\nconst result2 = zip(arr1, arr2, arr3);\n// 返回: [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n\n// 包含空数组\nzip([1, 2], [], ['a', 'b']);\n// 返回: [[1, undefined, 'a'], [2, undefined, 'b']]\n```\n\n#### 参数\n\n- `...arrs` (`any[][]`): 要组合的数组。\n\n#### 返回值\n\n(`any[][]`): 包含输入数组每个索引元素的元组的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/zipObject.md",
    "content": "# zipObject (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [zipObject](../../array/zipObject.md)\n\n此 `zipObject` 函数由于为 Lodash 兼容性进行额外处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [zipObject](../../array/zipObject.md)。\n\n:::\n\n使用两个数组创建一个对象。第一个数组用作属性名称,第二个数组用作相应的值。\n\n```typescript\nconst result = zipObject(keys, values);\n```\n\n## 用法\n\n### `zipObject(keys, values)`\n\n当您想要从键数组和值数组创建单个对象时,请使用 `zipObject`。它使用第一个数组的元素作为属性名称,第二个数组的元素作为其相应的值。这在处理 API 响应或转换数据时特别有用。\n\n```typescript\nimport { zipObject } from 'es-toolkit/compat';\n\n// 基本用法\nconst keys = ['a', 'b', 'c'];\nconst values = [1, 2, 3];\nconst result = zipObject(keys, values);\n// 返回: { a: 1, b: 2, c: 3 }\n\n// 不同长度的数组\nconst keys2 = ['x', 'y', 'z'];\nconst values2 = [10, 20];\nconst result2 = zipObject(keys2, values2);\n// 返回: { x: 10, y: 20, z: undefined }\n\n// 提供空数组\nconst result3 = zipObject([], []);\n// 返回: {}\n```\n\n#### 参数\n\n- `keys` (`PropertyKey[]`): 用作属性名称的数组。\n- `values` (`T[]`): 用作属性值的数组。\n\n#### 返回值\n\n(`Record<PropertyKey, T>`): 创建的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/zipObjectDeep.md",
    "content": "# zipObjectDeep (Lodash 兼容性)\n\n使用路径数组和值数组创建一个深层嵌套的对象。\n\n```typescript\nconst result = zipObjectDeep(keys, values);\n```\n\n## 用法\n\n### `zipObjectDeep(keys, values)`\n\n使用第一个数组的路径和第二个数组的值创建一个深层嵌套的对象。路径可以作为点符号字符串或属性名称数组提供。这在生成复杂的嵌套数据结构或将平面键值对转换为分层对象时很有用。\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\n// 将路径指定为点符号字符串\nconst paths = ['a.b.c', 'd.e.f'];\nconst values = [1, 2];\nconst result = zipObjectDeep(paths, values);\n// 返回: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// 将路径指定为数组\nconst pathArrays = [\n  ['a', 'b', 'c'],\n  ['d', 'e', 'f'],\n];\nconst values2 = [1, 2];\nconst result2 = zipObjectDeep(pathArrays, values2);\n// 返回: { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n\n// 包含数组索引的路径\nconst arrayPaths = ['a.b[0].c', 'a.b[1].d'];\nconst values3 = [1, 2];\nconst result3 = zipObjectDeep(arrayPaths, values3);\n// 返回: { a: { b: [{ c: 1 }, { d: 2 }] } }\n```\n\n`null` 或 `undefined` 键数组被视为空对象。\n\n```typescript\nimport { zipObjectDeep } from 'es-toolkit/compat';\n\nzipObjectDeep(null, [1, 2]); // {}\nzipObjectDeep(undefined, [1, 2]); // {}\n```\n\n#### 参数\n\n- `keys` (`ArrayLike<PropertyPath> | null | undefined`): 属性路径数组。可以使用点符号字符串或属性名称数组。\n- `values` (`ArrayLike<any>`, 可选): 相应值的数组。如果未提供,则视为空数组。\n\n#### 返回值\n\n(`object`): 返回由给定路径和值构造的深层嵌套对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/array/zipWith.md",
    "content": "# zipWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [zipWith](../../array/zipWith.md)\n\n此 `zipWith` 函数由于为 Lodash 兼容性进行额外处理而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [zipWith](../../array/zipWith.md)。\n\n:::\n\n使用组合函数将多个数组的元素组合成一个新数组。\n\n```typescript\nconst result = zipWith([1, 2], [3, 4], (a, b) => a + b);\n// result 是 [4, 6]。\n```\n\n## 用法\n\n### `zipWith(...arrs, iteratee)`\n\n接受多个数组并使用提供的函数组合每个索引处的元素来创建一个新数组。如果数组的长度不同,它将处理到最长数组的长度,对于缺失的值传递 `undefined`。\n\n```typescript\nimport { zipWith } from 'es-toolkit/compat';\n\n// 将两个数组的元素相加\nconst result1 = zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b);\n// 返回: [5, 7, 9]\n\n// 组合三个数组的元素\nconst result2 = zipWith([1, 2], [3, 4], [5, 6], (a, b, c) => a + b + c);\n// 返回: [9, 12]\n\n// 不同长度的数组\nconst result3 = zipWith([1, 2, 3], [4, 5], (a, b) => (a || 0) + (b || 0));\n// 返回: [5, 7, 3]\n```\n\n#### 参数\n\n- `...arrs` (`any[][]`): 要组合的数组。\n- `iteratee` (`Function`): 组合每个索引处元素的函数。\n\n#### 返回值\n\n(`any[]`): 应用组合函数的结果组成的新数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/after.md",
    "content": "# after (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [`after`](../../function/after.md)\n\n由于复杂的类型验证和整数转换处理,此 `after` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [after](../../function/after.md)。\n\n:::\n\n创建一个只在被调用指定次数后才执行的函数。\n\n```typescript\nconst restrictedFunction = after(n, func);\n```\n\n## 用法\n\n### `after(n, func)`\n\n当您想限制函数仅在被调用特定次数后才执行时,请使用 `after`。它在多个异步操作完成后执行回调,或在初始化阶段后激活函数时非常有用。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\n// 基本用法\nconst logAfterThree = after(3, () => {\n  console.log('从第3次调用开始执行!');\n});\n\nlogAfterThree(); // 不执行\nlogAfterThree(); // 不执行\nlogAfterThree(); // 输出 \"从第3次调用开始执行!\"\nlogAfterThree(); // 输出 \"从第3次调用开始执行!\" (继续执行)\n```\n\n您还可以使用它在所有异步操作完成后执行特定回调。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst tasks = ['task1', 'task2', 'task3'];\nconst allTasksComplete = after(tasks.length, () => {\n  console.log('所有任务已完成!');\n});\n\n// 每个任务完成时调用\ntasks.forEach(task => {\n  performAsyncTask(task, () => {\n    console.log(`${task} 完成`);\n    allTasksComplete(); // 第3次调用时输出 \"所有任务已完成!\"\n  });\n});\n```\n\n当传递0或负数时,从第一次调用开始立即执行。\n\n```typescript\nimport { after } from 'es-toolkit/compat';\n\nconst immediate = after(0, () => console.log('立即执行'));\nimmediate(); // \"立即执行\"\n\nconst negative = after(-1, () => console.log('立即执行'));\nnegative(); // \"立即执行\"\n```\n\n#### 参数\n\n- `n` (`number`): 函数执行前所需的调用次数。\n- `func` (`TFunc`): 要限制的函数。\n\n#### 返回值\n\n(`TFunc`): 返回一个新的受限函数,从第 n 次调用开始执行原始函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/ary.md",
    "content": "# ary (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [`ary`](../../function/ary.md)\n\n由于复杂的参数验证,此 `ary` 函数运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [ary](../../function/ary.md)。\n\n:::\n\n创建一个限制可接收参数数量的函数。\n\n```typescript\nconst cappedFunction = ary(func, n);\n```\n\n## 用法\n\n### `ary(func, n)`\n\n当您想限制函数接收的参数数量时,请使用 `ary`。它在安全地使用接收太多参数的函数或在回调函数中忽略不必要的参数时非常有用。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// 基本用法\nfunction greet(name, age, city) {\n  return `你好, ${name}! ${age}岁, 来自${city}。`;\n}\n\nconst limitedGreet = ary(greet, 2);\nconsole.log(limitedGreet('张三', 30, '北京', '额外参数'));\n// \"你好, 张三! 30岁, 来自undefined。\"\n// 第3个参数之后被忽略\n```\n\n与数组方法一起使用时,可以防止不必要的参数传递给回调函数。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\n// parseInt接受第二个参数(基数),但map的回调传递3个参数\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// 错误用法 - parseInt将索引作为基数接收\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN]\n\n// 使用ary只传递第一个参数\nconsole.log(numbers.map(ary(parseInt, 1))); // [1, 2, 3, 4, 5]\n```\n\n可以限制函数只接收所需数量的参数。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nfunction sum(...args) {\n  return args.reduce((total, num) => total + num, 0);\n}\n\nconst sum0 = ary(sum, 0);\nconst sum1 = ary(sum, 1);\nconst sum2 = ary(sum, 2);\nconst sum3 = ary(sum, 3);\n\nconsole.log(sum0(1, 2, 3, 4, 5)); // 0 (无参数)\nconsole.log(sum1(1, 2, 3, 4, 5)); // 1 (仅第一个参数)\nconsole.log(sum2(1, 2, 3, 4, 5)); // 3 (仅前两个参数)\nconsole.log(sum3(1, 2, 3, 4, 5)); // 6 (仅前三个参数)\n```\n\n当传递负数或 `NaN` 时,会被视为0,所有参数都被忽略。\n\n```typescript\nimport { ary } from 'es-toolkit/compat';\n\nconst func = (a, b, c) => [a, b, c];\n\nconsole.log(ary(func, -1)(1, 2, 3)); // [] (负数视为0)\nconsole.log(ary(func, NaN)(1, 2, 3)); // [] (NaN视为0)\n```\n\n#### 参数\n\n- `func` (`Function`): 要限制参数数量的函数。\n- `n` (`number`, 可选): 允许的最大参数数量。如果省略,则使用函数的 `length` 属性。\n\n#### 返回值\n\n(`Function`): 返回一个最多接受 `n` 个参数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/attempt.md",
    "content": "# attempt (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [`attempt`](../../util/attempt.md) 函数或 try-catch 块\n\n此 `attempt` 函数可能会让人困惑，因为它不区分地返回错误和返回值。\n\n请改用更直接和清晰的 [`attempt`](../../util/attempt.md) 函数或 try-catch 块。\n\n:::\n\n执行函数并在发生错误时返回错误对象的函数。\n\n```typescript\nconst result = attempt(func, ...args);\n```\n\n## 用法\n\n### `attempt(func, ...args)`\n\n当您想安全地执行函数时使用 `attempt`。在执行可能抛出错误的函数时，它很有用，可以防止程序崩溃并将错误作为返回值处理。\n\n```typescript\nimport { attempt } from 'es-toolkit/compat';\n\n// 基本用法 - 成功的情况\nconst result = attempt((x, y) => x + y, 2, 3);\nconsole.log(result); // 5\n\n// 错误情况\nconst errorResult = attempt(() => {\n  throw new Error('出错了');\n});\nconsole.log(errorResult); // Error: 出错了\n```\n\n以下是与使用 try-catch 块的区别。\n\n```typescript\n// 使用 attempt\nimport { attempt } from 'es-toolkit/compat';\n\nconst result = attempt(riskyFunction, arg1, arg2);\nif (result instanceof Error) {\n  console.log('发生错误:', result.message);\n} else {\n  console.log('结果:', result);\n}\n\n// 使用 try-catch (更直接)\ntry {\n  const result = riskyFunction(arg1, arg2);\n  console.log('结果:', result);\n} catch (error) {\n  console.log('发生错误:', error.message);\n}\n```\n\n#### 参数\n\n- `func` (`Function`): 要执行的函数。\n- `args` (`...any[]`): 要传递给函数的参数。\n\n#### 返回值\n\n(`ReturnType<F> | Error`): 如果函数成功则返回返回值，如果发生错误则返回 Error 对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/before.md",
    "content": "# before (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [`before`](../../function/before.md)\n\n由于复杂的类型验证和整数转换处理，这个 `before` 函数的运行速度较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [before](../../function/before.md)。\n\n:::\n\n创建一个函数，该函数在指定次数内执行原始函数，之后返回最后一次的结果。\n\n```typescript\nconst limitedFunction = before(n, func);\n```\n\n## 用法\n\n### `before(n, func)`\n\n当您想要限制函数只执行到特定次数时，请使用 `before`。这对于限制函数调用次数或只在初始设置阶段执行函数时非常有用。\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 基本用法\nlet count = 0;\nconst beforeThree = before(3, () => ++count);\n\nconsole.log(beforeThree()); // 1 (第一次调用)\nconsole.log(beforeThree()); // 2 (第二次调用)\nconsole.log(beforeThree()); // 2 (从第三次调用开始返回最后结果)\nconsole.log(beforeThree()); // 2 (继续返回最后结果)\n```\n\n使用闭包的替代方案：\n\n```typescript\n// 使用 before\nconst beforeThree = before(3, myFunction);\n\n// 使用闭包（更简单更快）\nfunction createBefore(limit, callback) {\n  let callCount = 0;\n  let lastResult;\n\n  return function (...args) {\n    if (callCount < limit - 1) {\n      lastResult = callback.apply(this, args);\n      callCount++;\n    }\n    return lastResult;\n  };\n}\n\nconst beforeThreeAlternative = createBefore(3, myFunction);\n```\n\n用作初始化函数：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nclass Database {\n  constructor() {\n    this.isInitialized = false;\n\n    // 初始化只执行一次\n    this.initialize = before(2, () => {\n      console.log('正在初始化数据库...');\n      this.setupConnection();\n      this.isInitialized = true;\n      return '初始化完成';\n    });\n  }\n\n  setupConnection() {\n    // 实际连接设置逻辑\n  }\n\n  query(sql) {\n    const initResult = this.initialize();\n    console.log(initResult); // 第一次调用: \"初始化完成\"，之后：相同结果\n\n    // 查询执行逻辑\n    return `执行查询: ${sql}`;\n  }\n}\n\nconst db = new Database();\ndb.query('SELECT * FROM users'); // 执行初始化\ndb.query('SELECT * FROM products'); // 不执行初始化\n```\n\n限制 API 调用：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 最多允许 5 次 API 调用\nconst limitedApiCall = before(6, endpoint => {\n  console.log(`API 调用: ${endpoint}`);\n  return fetch(endpoint).then(res => res.json());\n});\n\n// 前 5 次执行实际的 API 调用\nlimitedApiCall('/api/data1'); // 实际调用\nlimitedApiCall('/api/data2'); // 实际调用\nlimitedApiCall('/api/data3'); // 实际调用\nlimitedApiCall('/api/data4'); // 实际调用\nlimitedApiCall('/api/data5'); // 实际调用\nlimitedApiCall('/api/data6'); // 返回最后结果（不进行 API 调用）\n```\n\n限制事件监听器：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 最多处理 3 次点击事件\nconst limitedClickHandler = before(4, event => {\n  console.log('处理点击:', event.target.id);\n  return `处理完成: ${Date.now()}`;\n});\n\ndocument.getElementById('button').addEventListener('click', limitedClickHandler);\n// 只处理前 3 次点击，之后返回最后结果\n```\n\n处理参数和返回值：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst limitedCalculator = before(3, (operation, a, b) => {\n  const result = operation === 'add' ? a + b : a - b;\n  console.log(`计算: ${a} ${operation} ${b} = ${result}`);\n  return result;\n});\n\nconsole.log(limitedCalculator('add', 5, 3)); // \"计算: 5 add 3 = 8\"，返回: 8\nconsole.log(limitedCalculator('subtract', 10, 4)); // \"计算: 10 subtract 4 = 6\"，返回: 6\nconsole.log(limitedCalculator('multiply', 7, 2)); // 不计算，返回: 6（最后结果）\n```\n\n传递 0 或 1 会使函数不执行：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\nconst neverCalled = before(0, () => {\n  console.log('此函数不会执行');\n  return '结果';\n});\n\nconst onceOnly = before(1, () => {\n  console.log('此函数也不会执行');\n  return '结果';\n});\n\nconsole.log(neverCalled()); // undefined\nconsole.log(onceOnly()); // undefined\n```\n\n资源清理优化：\n\n```typescript\nimport { before } from 'es-toolkit/compat';\n\n// 函数引用会自动清理以防止内存泄漏\nconst limitedProcessor = before(2, data => {\n  // 复杂的数据处理\n  return processComplexData(data);\n});\n\n// 第 2 次调用后，原始函数引用被移除（垃圾回收）\n```\n\n#### 参数\n\n- `n` (`number`): 函数执行的最大次数。执行到 n-1 次，从第 n 次调用开始返回最后结果。\n- `func` (`Function`): 要限制的函数。\n\n#### 返回值\n\n(`Function`): 返回一个新函数，该函数在指定次数内执行原始函数，之后返回最后一次的结果。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/bind.md",
    "content": "# bind (Lodash 兼容性)\n\n::: warning 请使用 `Function.prototype.bind()`\n\n这个 `bind` 函数由于复杂的占位符处理、构造函数检查和参数合并逻辑而运行缓慢。如果不需要占位符，原生 `Function.prototype.bind()` 更快更简单。\n\n请使用更快且标准的 `Function.prototype.bind()`。\n\n:::\n\n创建一个固定 `this` 上下文并预先提供部分参数的函数。\n\n```typescript\nconst boundFunction = bind(func, thisObj, ...partialArgs);\n```\n\n## 用法\n\n### `bind(func, thisObj, ...partialArgs)`\n\n当您想要固定函数的 `this` 上下文或预先提供部分参数时，使用 `bind`。当您想使用占位符在特定位置稍后提供参数时特别有用。\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\n// 基本用法\nfunction greet(greeting, punctuation) {\n  return greeting + ' ' + this.user + punctuation;\n}\n\nconst object = { user: '张三' };\nconst boundGreet = bind(greet, object, '你好');\n\nconsole.log(boundGreet('!')); // \"你好 张三!\"\nconsole.log(boundGreet('~')); // \"你好 张三~\"\n```\n\n与原生 bind 比较:\n\n```typescript\n// 使用 bind\nimport { bind } from 'es-toolkit/compat';\n\nconst boundFn1 = bind(func, thisObj, 'arg1');\n\n// 使用原生 bind（更快）\nconst boundFn2 = func.bind(thisObj, 'arg1');\n\n// 结果相同但原生更快\n```\n\n使用占位符功能:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction calculate(operation, a, b, suffix) {\n  return `${a} ${operation} ${b} = ${operation === '+' ? a + b : a - b}${suffix}`;\n}\n\n// 使用占位符稍后在特定位置提供参数\nconst calcWithSuffix = bind(\n  calculate,\n  null,\n  bind.placeholder, // operation 稍后提供\n  bind.placeholder, // a 稍后提供\n  bind.placeholder, // b 稍后提供\n  '分' // suffix 预先提供\n);\n\nconsole.log(calcWithSuffix('+', 5, 3)); // \"5 + 3 = 8分\"\nconsole.log(calcWithSuffix('-', 10, 4)); // \"10 - 4 = 6分\"\n```\n\n更实用的占位符示例:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction apiRequest(method, url, options, callback) {\n  // API 请求逻辑\n  console.log(`${method} ${url}`, options);\n  callback(`${method} 请求完成`);\n}\n\n// 为 POST 请求创建部分应用函数\nconst postRequest = bind(\n  apiRequest,\n  null,\n  'POST', // 固定 method\n  bind.placeholder, // url 稍后提供\n  { 'Content-Type': 'application/json' }, // 固定 options\n  bind.placeholder // callback 稍后提供\n);\n\npostRequest('/api/users', result => {\n  console.log(result); // \"POST 请求完成\"\n});\n\npostRequest('/api/products', result => {\n  console.log(result); // \"POST 请求完成\"\n});\n```\n\n方法绑定:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass Logger {\n  constructor(prefix) {\n    this.prefix = prefix;\n  }\n\n  log(level, message) {\n    console.log(`[${this.prefix}] ${level}: ${message}`);\n  }\n}\n\nconst logger = new Logger('MyApp');\n\n// 绑定方法以在不同上下文中使用\nconst logError = bind(logger.log, logger, 'ERROR');\nconst logInfo = bind(logger.log, logger, 'INFO');\n\n// 现在可以独立使用\nsetTimeout(() => logError('服务器连接失败'), 1000);\nsetTimeout(() => logInfo('应用程序已启动'), 2000);\n```\n\n在事件处理器中使用:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nclass ButtonHandler {\n  constructor(name) {\n    this.name = name;\n    this.clickCount = 0;\n  }\n\n  handleClick(event, customData) {\n    this.clickCount++;\n    console.log(`${this.name} 按钮点击 #${this.clickCount}`);\n    console.log('自定义数据:', customData);\n    console.log('事件类型:', event.type);\n  }\n}\n\nconst handler = new ButtonHandler('菜单');\n\n// 预先提供自定义数据，稍后传递事件\nconst boundHandler = bind(\n  handler.handleClick,\n  handler,\n  bind.placeholder, // event 稍后传入\n  '菜单已选择' // customData 预先提供\n);\n\n// 连接到 DOM 事件（event 自动作为第一个参数传递）\ndocument.getElementById('menu-btn')?.addEventListener('click', boundHandler);\n```\n\n也支持构造函数:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city || '首尔';\n}\n\n// 创建首尔居民的构造函数\nconst SeoulPerson = bind(Person, null, bind.placeholder, bind.placeholder, '首尔');\n\nconst person1 = new SeoulPerson('张三', 30);\nconst person2 = new SeoulPerson('李四', 25);\n\nconsole.log(person1); // Person { name: '张三', age: 30, city: '首尔' }\nconsole.log(person2); // Person { name: '李四', age: 25, city: '首尔' }\n```\n\n在函数式编程中使用:\n\n```typescript\nimport { bind } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 将 parseInt 基数固定为 10\nconst parseDecimal = bind(parseInt, null, bind.placeholder, 10);\n\n// 在 map 中安全使用\nconst parsed = ['1', '2', '3'].map(parseDecimal);\nconsole.log(parsed); // [1, 2, 3]\n\n// 使用普通 parseInt 时的问题\nconst problematic = ['1', '2', '3'].map(parseInt); // [1, NaN, NaN]\n```\n\n#### 参数\n\n- `func` (`Function`): 要绑定的函数。\n- `thisObj` (`any`, 可选): 要绑定到函数的 `this` 值。\n- `partialArgs` (`...any[]`): 要预先提供的参数。可以使用 `bind.placeholder` 来指定稍后提供的位置。\n\n#### 返回值\n\n(`Function`): 返回一个 `this` 已固定且部分参数已预先应用的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/bindKey.md",
    "content": "# bindKey (Lodash 兼容性)\n\n::: warning 请使用箭头函数或 `bind` 方法\n这个 `bindKey` 函数由于动态方法绑定和占位符处理而变得复杂和缓慢。使用 JavaScript 的原生 `bind` 方法或箭头函数更简单，性能更好。\n\n请使用更快、更现代的箭头函数或 `Function.prototype.bind`。\n:::\n\n绑定对象的方法，允许引用可能在以后被重新定义的方法。\n\n```typescript\nconst bound = bindKey(object, key, ...partialArgs);\n```\n\n## 用法\n\n### `bindKey(object, key, ...partialArgs)`\n\n当您想绑定对象的方法，同时允许该方法在以后被更改时，请使用 `bindKey`。与普通的 `bind` 不同，它每次调用时都会引用最新的方法。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// 绑定方法。\nlet bound = bindKey(object, 'greet', 'hi');\nbound('!');\n// 返回: 'hi fred!'\n\n// 重新定义方法。\nobject.greet = function (greeting, punctuation) {\n  return greeting + 'ya ' + this.user + punctuation;\n};\n\n// 绑定的函数调用新方法。\nbound('!');\n// 返回: 'hiya fred!'\n```\n\n您可以使用占位符来保留参数位置。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  user: 'fred',\n  greet: function (greeting, punctuation) {\n    return greeting + ' ' + this.user + punctuation;\n  },\n};\n\n// 使用占位符。\nconst bound = bindKey(object, 'greet', bindKey.placeholder, '!');\nbound('hi');\n// 返回: 'hi fred!'\n```\n\n部分应用的参数会首先传递，然后是调用时提供的参数。\n\n```typescript\nimport { bindKey } from 'es-toolkit/compat';\n\nconst object = {\n  add: function (a, b, c) {\n    return a + b + c;\n  },\n};\n\n// 预先设置第一个参数。\nconst bound = bindKey(object, 'add', 10);\nbound(20, 30);\n// 返回: 60 (10 + 20 + 30)\n```\n\n#### 参数\n\n- `object` (`object`): 要调用方法的对象。\n- `key` (`string`): 要调用的方法的键。\n- `...partialArgs` (`any[]`, 可选): 要部分应用到方法的参数。您可以使用 `bindKey.placeholder` 来保留参数位置。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回一个新的绑定函数。此函数每次调用时都会引用对象的最新方法。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/curry.md",
    "content": "# curry (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `curry` 或手动闭包\n此 `curry` 函数由于复杂的占位符处理、参数个数验证和参数组合逻辑而运行缓慢。\n\n如果不需要占位符，请改用更快的 `es-toolkit` 的 [`curry`](../../function/curry.md) 或简单闭包。\n:::\n\n对函数进行柯里化，使其可以一次接受一个参数或一次接受多个参数。\n\n```typescript\nconst curriedFunction = curry(func, arity);\n```\n\n## 用法\n\n### `curry(func, arity)`\n\n当您想要对函数进行柯里化以便更容易地进行部分应用时，使用 `curry`。它对于逐步提供参数或使用占位符稍后在特定位置提供参数非常有用。\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// 基本用法\nfunction add(a, b, c) {\n  return a + b + c;\n}\n\nconst curriedAdd = curry(add);\n\n// 可以用各种方式调用\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(curriedAdd(1, 2)(3)); // 6\nconsole.log(curriedAdd(1)(2, 3)); // 6\nconsole.log(curriedAdd(1, 2, 3)); // 6\n```\n\n与主库 curry 的比较:\n\n```typescript\n// compat 版本 (灵活，但较慢)\nimport { curry } from 'es-toolkit/compat';\nconst curriedCompat = curry(add);\ncurriedCompat(1, 2)(3); // 支持\ncurriedCompat(1)(curry.placeholder, 3)(2); // 支持占位符\n\n// 主库版本 (更快，但只能一次一个)\nimport { curry } from 'es-toolkit';\nconst curriedMain = curry(add);\ncurriedMain(1)(2)(3); // 支持\ncurriedMain(1, 2)(3); // 不支持\n```\n\n使用占位符功能:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction greet(greeting, name, punctuation) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst curriedGreet = curry(greet);\n\n// 使用占位符跳过中间参数\nconst greetWithExclamation = curriedGreet(curry.placeholder, curry.placeholder, '!');\nconsole.log(greetWithExclamation('Hello', 'John')); // \"Hello, John!\"\n\nconst sayHello = curriedGreet('Hello');\nconsole.log(sayHello(curry.placeholder, '~')('Jane')); // \"Hello, Jane~\"\n```\n\n在函数式编程中使用:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\n// 创建映射函数\nconst map = curry((fn, array) => array.map(fn));\nconst filter = curry((predicate, array) => array.filter(predicate));\n\nconst numbers = [1, 2, 3, 4, 5];\n\n// 创建可重用的函数\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\n\nconst mapDouble = map(double);\nconst filterEven = filter(isEven);\n\nconsole.log(mapDouble(numbers)); // [2, 4, 6, 8, 10]\nconsole.log(filterEven(numbers)); // [2, 4]\n\n// 函数组合\nconst processNumbers = nums => mapDouble(filterEven(nums));\nconsole.log(processNumbers(numbers)); // [4, 8]\n```\n\n配置 API 客户端:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction apiRequest(method, baseUrl, endpoint, options) {\n  return fetch(`${baseUrl}${endpoint}`, {\n    method,\n    ...options,\n  });\n}\n\nconst curriedApiRequest = curry(apiRequest);\n\n// 使用默认设置创建专用函数\nconst apiGet = curriedApiRequest('GET', 'https://api.example.com');\nconst apiPost = curriedApiRequest('POST', 'https://api.example.com');\n\n// 包含认证标头\nconst authenticatedPost = apiPost(curry.placeholder, {\n  headers: { Authorization: 'Bearer token123' },\n});\n\n// 使用\napiGet('/users'); // GET https://api.example.com/users\nauthenticatedPost('/users'); // POST with auth headers\n```\n\n数学运算函数:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nconst calculate = curry((operation, a, b) => {\n  switch (operation) {\n    case '+':\n      return a + b;\n    case '-':\n      return a - b;\n    case '*':\n      return a * b;\n    case '/':\n      return a / b;\n    default:\n      throw new Error('不支持的操作');\n  }\n});\n\n// 专用操作函数\nconst add = calculate('+');\nconst subtract = calculate('-');\nconst multiply = calculate('*');\n\nconsole.log(add(5, 3)); // 8\nconsole.log(subtract(10)(4)); // 6\nconsole.log(multiply(3, 4)); // 12\n\n// 使用占位符固定第二个操作数\nconst addFive = calculate('+', curry.placeholder, 5);\nconsole.log(addFive(10)); // 15\n```\n\n指定参数个数:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return [a, b, c, rest];\n}\n\n// 将参数个数限制为 3\nconst curriedFixed = curry(variableArgsFunction, 3);\n\nconsole.log(curriedFixed(1)(2)(3)); // [1, 2, 3, []]\nconsole.log(curriedFixed(1, 2)(3)); // [1, 2, 3, []]\n\n// 不指定参数个数使用 (默认值: function.length)\nconst curriedDefault = curry(variableArgsFunction); // arity = 3\n```\n\n简单的柯里化替代方案:\n\n```typescript\n// 使用 curry\nconst curriedAdd = curry((a, b, c) => a + b + c);\n\n// 手动闭包 (更快)\nconst manualCurry = a => b => c => a + b + c;\n\n// 两者产生相同的结果\nconsole.log(curriedAdd(1)(2)(3)); // 6\nconsole.log(manualCurry(1)(2)(3)); // 6\n```\n\n也支持构造函数:\n\n```typescript\nimport { curry } from 'es-toolkit/compat';\n\nfunction Person(name, age, city) {\n  this.name = name;\n  this.age = age;\n  this.city = city;\n}\n\nconst CurriedPerson = curry(Person);\nconst SeoulPerson = CurriedPerson(curry.placeholder, curry.placeholder, 'Seoul');\n\nconst person1 = new SeoulPerson('John', 30);\nconst person2 = new SeoulPerson('Jane', 25);\n\nconsole.log(person1.city); // \"Seoul\"\nconsole.log(person2.city); // \"Seoul\"\n```\n\n#### 参数\n\n- `func` (`Function`): 要柯里化的函数。\n- `arity` (`number`, 可选): 函数的参数个数。如果省略，使用 `func.length`。\n\n#### 返回值\n\n(`Function & { placeholder: symbol }`): 返回柯里化的函数。`placeholder` 属性允许您控制参数位置。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/curryRight.md",
    "content": "# curryRight (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [`curryRight`](../../function/curryRight.md) 或手动闭包\n\n由于复杂的占位符处理、参数数量验证和参数组合逻辑,这个 `curryRight` 函数运行较慢。\n\n如果不需要占位符,请使用更快的 `es-toolkit` 的 [`curryRight`](../../function/curryRight.md) 或简单的闭包。\n\n:::\n\n从右到左柯里化一个函数,创建一个可以一次接受一个或多个参数的函数,从最后一个参数开始。\n\n```typescript\nconst curriedFunction = curryRight(func, arity);\n```\n\n## 用法\n\n### `curryRight(func, arity)`\n\n当您想要从右到左柯里化一个函数并从最后一个参数开始部分应用参数时,请使用 `curryRight`。与常规的 `curry` 不同,它首先从最后一个参数开始处理。\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 基本用法\nfunction subtract(a, b, c) {\n  return a - b - c;\n}\n\nconst curriedSubtract = curryRight(subtract);\n\n// 从右开始柯里化(从最后一个参数开始)\nconsole.log(curriedSubtract(1)(2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1, 2)(5)); // 5 - 2 - 1 = 2\nconsole.log(curriedSubtract(1)(2, 5)); // 2 - 5 - 1 = -4\nconsole.log(curriedSubtract(1, 2, 5)); // 1 - 2 - 5 = -6\n```\n\n`curry` 和 `curryRight` 的区别:\n\n```typescript\nimport { curry, curryRight } from 'es-toolkit/compat';\n\nfunction divide(a, b, c) {\n  return a / b / c;\n}\n\n// 常规 curry(从左开始)\nconst leftCurried = curry(divide);\nconsole.log(leftCurried(12)(3)(2)); // ((12 / 3) / 2) = 2\n\n// curryRight(从右开始)\nconst rightCurried = curryRight(divide);\nconsole.log(rightCurried(2)(3)(12)); // ((12 / 3) / 2) = 2\n// 最后提供的 12 成为第一个参数(a)\n```\n\n与主库的比较:\n\n```typescript\n// compat 版本(灵活,但较慢)\nimport { curryRight } from 'es-toolkit/compat';\nconst curriedCompat = curryRight(subtract);\ncurriedCompat(1, 2)(3); // 支持\ncurriedCompat(1)(curryRight.placeholder, 3)(2); // 支持占位符\n\n// 主库版本(更快,但一次只能一个)\nimport { curryRight } from 'es-toolkit';\nconst curriedMain = curryRight(subtract);\ncurriedMain(1)(2)(3); // 支持\ncurriedMain(1, 2)(3); // 不支持\n```\n\n使用占位符功能:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction formatMessage(name, action, time) {\n  return `${name} 在 ${time} ${action}了`;\n}\n\nconst curriedFormat = curryRight(formatMessage);\n\n// 使用占位符跳过特定位置\nconst todayAction = curriedFormat('今天');\nconst todayLoginAction = todayAction(curryRight.placeholder, '登录');\n\nconsole.log(todayLoginAction('张三'));\n// \"张三 在 今天 登录了\"\n\n// 首先固定时间\nconst morningFormat = curriedFormat('早上9点');\nconsole.log(morningFormat('评论', '李四'));\n// \"李四 在 早上9点 评论了\"\n```\n\n在数组处理中使用:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 从数组末尾获取特定数量的项\nfunction takeFromEnd(array, count, separator = ', ') {\n  return array.slice(-count).join(separator);\n}\n\nconst curriedTake = curryRight(takeFromEnd);\n\n// 创建用逗号分隔的函数\nconst takeWithComma = curriedTake(', ');\n\n// 获取最后3项\nconst takeLast3 = takeWithComma(3);\n\nconst fruits = ['苹果', '香蕉', '橙子', '葡萄', '猕猴桃'];\nconsole.log(takeLast3(fruits)); // \"橙子, 葡萄, 猕猴桃\"\n\n// 使用不同的分隔符\nconst takeWithDash = curriedTake(' - ');\nconsole.log(takeWithDash(2, fruits)); // \"葡萄 - 猕猴桃\"\n```\n\n在函数组合中使用:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 日志输出函数\nfunction logWithPrefix(message, level, timestamp) {\n  return `[${timestamp}] ${level}: ${message}`;\n}\n\nconst curriedLog = curryRight(logWithPrefix);\n\n// 用当前时间固定\nconst currentTimeLog = curriedLog(new Date().toISOString());\n\n// 按级别创建记录器\nconst errorLog = currentTimeLog('ERROR');\nconst infoLog = currentTimeLog('INFO');\nconst debugLog = currentTimeLog('DEBUG');\n\n// 使用\nconsole.log(errorLog('数据库连接失败'));\nconsole.log(infoLog('服务器已启动'));\nconsole.log(debugLog('正在处理用户请求'));\n```\n\n函数式编程管道:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\n// 数据转换函数\nconst mapWith = curryRight((array, fn) => array.map(fn));\nconst filterWith = curryRight((array, predicate) => array.filter(predicate));\nconst reduceWith = curryRight((array, reducer, initial) => array.reduce(reducer, initial));\n\nconst numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n// 定义转换函数\nconst double = x => x * 2;\nconst isEven = x => x % 2 === 0;\nconst sum = (acc, val) => acc + val;\n\n// 组合管道(右侧优先)\nconst processNumbers = nums => {\n  return reduceWith(filterWith(mapWith(nums, double), isEven), sum, 0);\n};\n\nconsole.log(processNumbers(numbers)); // 所有数字翻倍,过滤偶数,然后求和\n```\n\nAPI 请求构建器:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction makeRequest(url, method, headers, body) {\n  return fetch(url, { method, headers, body });\n}\n\nconst curriedRequest = curryRight(makeRequest);\n\n// 首先设置 body\nconst withJsonBody = curriedRequest(JSON.stringify({ data: 'test' }));\n\n// 添加 headers\nconst withHeaders = withJsonBody({\n  'Content-Type': 'application/json',\n  Authorization: 'Bearer token123',\n});\n\n// 设置 POST 方法\nconst postRequest = withHeaders('POST');\n\n// 最终使用\npostRequest('/api/data')\n  .then(response => response.json())\n  .then(data => console.log(data));\n```\n\n手动柯里化替代方案:\n\n```typescript\n// 使用 curryRight\nconst curriedSubtract = curryRight((a, b, c) => a - b - c);\n\n// 手动闭包(更快,从右开始)\nconst manualCurryRight = c => b => a => a - b - c;\n\n// 两者结果相同\nconsole.log(curriedSubtract(1)(2)(5)); // 2\nconsole.log(manualCurryRight(1)(2)(5)); // 2\n```\n\n指定参数数量:\n\n```typescript\nimport { curryRight } from 'es-toolkit/compat';\n\nfunction variableArgsFunction(a, b, c, ...rest) {\n  return { a, b, c, rest };\n}\n\n// 将参数数量限制为3(忽略 rest)\nconst curriedFixed = curryRight(variableArgsFunction, 3);\n\n// 从右侧按 c, b, a 的顺序接收\nconsole.log(curriedFixed(3)(2)(1)); // { a: 1, b: 2, c: 3, rest: [] }\n```\n\n#### 参数\n\n- `func` (`Function`): 要从右到左柯里化的函数。\n- `arity` (`number`, 可选): 函数的参数数量。如果省略,则使用 `func.length`。\n\n#### 返回值\n\n(`Function & { placeholder: symbol }`): 返回从右到左柯里化的函数。可以使用 `placeholder` 属性控制参数位置。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/debounce.md",
    "content": "# debounce (Lodash 兼容)\n\n::: warning 请使用 `es-toolkit` 的 [`debounce`](../../function/debounce.md)\n\n这个 `debounce` 函数由于复杂的 `maxWait` 处理和 Lodash 兼容的选项结构而存在开销。\n\n请使用更快、更现代的 `es-toolkit` 的 [`debounce`](../../function/debounce.md)。\n\n:::\n\n创建一个防抖函数,延迟调用提供的函数,直到自上次调用后经过 `wait` 毫秒。\n\n```typescript\nconst debouncedFunction = debounce(func, wait, options);\n```\n\n## 用法\n\n### `debounce(func, wait, options)`\n\n当您想要延迟函数调用时,使用 `debounce`。它对于防止搜索输入、滚动事件、按钮点击等中的过度调用很有用。\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 基本用法\nconst searchFunction = debounce(query => {\n  console.log('搜索:', query);\n}, 300);\n\n// 仅当在 300ms 内未再次调用时执行\nsearchFunction('React'); // 不执行\nsearchFunction('Vue'); // 不执行\nsearchFunction('Angular'); // 300ms 后输出 \"搜索: Angular\"\n```\n\n与主库 debounce 的比较:\n\n```typescript\n// compat 版本(Lodash 兼容,包含 maxWait 等额外选项)\nimport { debounce } from 'es-toolkit/compat';\nconst debouncedCompat = debounce(func, 300, {\n  leading: true,\n  trailing: false,\n  maxWait: 1000\n});\n\n// 主库版本(更快、更简单)\nimport { debounce } from 'es-toolkit';\nconst debouncedMain = debounce(func, 300, {\n  edges: ['leading'] // 使用 edges 而不是 leading/trailing\n});\n```\n\nleading 和 trailing 选项:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst func = () => console.log('执行了');\n\n// leading: true - 首次调用时立即执行\nconst leadingDebounce = debounce(func, 1000, { leading: true });\nleadingDebounce(); // 立即输出 \"执行了\"\nleadingDebounce(); // 等待 1 秒\n// 1 秒后没有额外执行\n\n// trailing: true(默认) - 最后一次调用后延迟执行\nconst trailingDebounce = debounce(func, 1000, { trailing: true });\ntrailingDebounce(); // 等待 1 秒\ntrailingDebounce(); // 等待 1 秒(取消之前的计时器)\n// 1 秒后输出 \"执行了\"\n\n// 两者都为 true - 在开始和结束时执行\nconst bothDebounce = debounce(func, 1000, {\n  leading: true,\n  trailing: true,\n});\nbothDebounce(); // 立即输出 \"执行了\"\nbothDebounce(); // 等待 1 秒\n// 1 秒后输出 \"执行了\"(trailing)\n```\n\nmaxWait 选项:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 保证至少每 2 秒执行一次\nconst debouncedWithMaxWait = debounce(() => console.log('已保存'), 500, { maxWait: 2000 });\n\n// 即使快速连续调用,也会每 2 秒执行一次\nsetInterval(() => {\n  debouncedWithMaxWait();\n}, 100); // 每 100ms 调用一次,但每 2 秒输出 \"已保存\"\n```\n\n实际搜索示例:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass SearchComponent {\n  constructor() {\n    this.searchInput = document.getElementById('search');\n\n    // 将用户输入防抖 300ms\n    this.debouncedSearch = debounce(this.performSearch.bind(this), 300, {\n      leading: false, // 输入开始时不立即搜索\n      trailing: true, // 输入停止后搜索\n    });\n\n    this.searchInput.addEventListener('input', e => {\n      this.debouncedSearch(e.target.value);\n    });\n  }\n\n  performSearch(query) {\n    if (query.length < 2) return;\n\n    console.log('API 调用:', query);\n    // fetch(`/api/search?q=${query}`)...\n  }\n}\n```\n\n滚动事件优化:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\n// 将滚动事件防抖 100ms,但至少每 500ms 执行一次\nconst optimizedScrollHandler = debounce(\n  () => {\n    const scrollTop = window.pageYOffset;\n    console.log('滚动位置:', scrollTop);\n\n    // 头部隐藏/显示逻辑\n    if (scrollTop > 100) {\n      document.header.classList.add('hidden');\n    } else {\n      document.header.classList.remove('hidden');\n    }\n  },\n  100,\n  { maxWait: 500 }\n);\n\nwindow.addEventListener('scroll', optimizedScrollHandler);\n```\n\nAPI 调用限制:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nclass AutoSave {\n  constructor() {\n    // 防抖 500ms,至少每 5 秒保存一次\n    this.debouncedSave = debounce(this.saveToServer.bind(this), 500, { maxWait: 5000 });\n  }\n\n  onTextChange(content) {\n    this.pendingContent = content;\n    this.debouncedSave();\n  }\n\n  saveToServer() {\n    if (!this.pendingContent) return;\n\n    console.log('保存到服务器:', this.pendingContent);\n    // fetch('/api/save', { ... })\n\n    this.pendingContent = null;\n  }\n}\n```\n\ncancel 和 flush 方法:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst debouncedFunc = debounce(() => {\n  console.log('执行了');\n}, 1000);\n\ndebouncedFunc(); // 等待 1 秒\n\n// 取消待执行的调用\ndebouncedFunc.cancel();\n\n// 或立即执行\ndebouncedFunc(); // 开始等待 1 秒\ndebouncedFunc.flush(); // 立即输出 \"执行了\" 并取消计时器\n```\n\n防止重复按钮点击:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleSubmit = debounce(\n  async formData => {\n    console.log('正在提交表单...');\n    try {\n      const response = await fetch('/api/submit', {\n        method: 'POST',\n        body: formData,\n      });\n      console.log('提交完成');\n    } catch (error) {\n      console.error('提交失败:', error);\n    }\n  },\n  1000,\n  { leading: true, trailing: false } // 仅处理第一次点击\n);\n\ndocument.getElementById('submit-btn').addEventListener('click', e => {\n  const formData = new FormData(e.target.form);\n  handleSubmit(formData);\n});\n```\n\n调整大小事件处理:\n\n```typescript\nimport { debounce } from 'es-toolkit/compat';\n\nconst handleResize = debounce(\n  () => {\n    const width = window.innerWidth;\n    const height = window.innerHeight;\n\n    console.log('窗口已调整大小:', { width, height });\n\n    // 重新计算布局\n    recalculateLayout();\n  },\n  250,\n  { leading: false, trailing: true }\n);\n\nwindow.addEventListener('resize', handleResize);\n\n// 页面卸载时清理\nwindow.addEventListener('beforeunload', () => {\n  handleResize.cancel();\n});\n```\n\n#### 参数\n\n- `func` (`Function`): 要防抖的函数。\n- `wait` (`number`, 可选): 要延迟的毫秒数。默认为 `0`。\n- `options` (`DebounceSettings`, 可选): 选项对象。\n  - `leading` (`boolean`): 如果为 `true`,则在延迟开始时执行函数。默认为 `false`。\n  - `trailing` (`boolean`): 如果为 `true`,则在延迟结束时执行函数。默认为 `true`。\n  - `maxWait` (`number`): 函数执行可以延迟的最大时间。默认为 `Infinity`。\n\n#### 返回值\n\n(`DebouncedFunc`): 返回防抖函数。它包含 `cancel()` 和 `flush()` 方法。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/defer.md",
    "content": "# defer (Lodash 兼容性)\n\n::: warning 请使用 `setTimeout`\n\n这个 `defer` 函数是一个简单的包装器，内部调用 `setTimeout(func, 1, ...args)`。\n\n请使用更直接和现代的 `setTimeout`。\n\n:::\n\n将函数的执行延迟到下一个事件循环。\n\n```typescript\nconst timerId = defer(func, ...args);\n```\n\n## 用法\n\n### `defer(func, ...args)`\n\n当您想在当前调用栈结束后执行函数时，请使用 `defer`。您可以将函数执行延迟到下一个事件循环，同时向函数传递额外的参数。\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// 延迟控制台输出\ndefer(console.log, 'deferred message');\n// 在当前调用栈结束后输出 'deferred message'\n\n// 延迟执行函数和参数\nconst greet = (name: string, greeting: string) => {\n  console.log(`${greeting}, ${name}!`);\n};\n\ndefer(greet, 'John', 'Hello');\n// 在当前调用栈结束后输出 'Hello, John!'\n```\n\n内部使用 `setTimeout(func, 1, ...args)` 在 1 毫秒后执行函数。\n\n```typescript\nimport { defer } from 'es-toolkit/compat';\n\n// 以下两段代码的工作方式相同\ndefer(console.log, 'message');\nsetTimeout(console.log, 1, 'message');\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要延迟执行的函数。\n- `...args` (`any[]`): 要传递给函数的参数。\n\n#### 返回值\n\n(`number`): 返回从 `setTimeout` 返回的计时器 ID。您可以使用 `clearTimeout` 取消执行。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/delay.md",
    "content": "# delay (Lodash 兼容性)\n\n::: warning 请使用 `setTimeout`\n\n这个 `delay` 函数只是 `setTimeout` 的简单包装器，但由于额外的类型验证和数字转换会产生轻微的开销。\n\n请直接使用更快且标准的 `setTimeout`。\n\n:::\n\n设置一个定时器，在指定时间后执行函数。\n\n```typescript\nconst timerId = delay(func, wait, ...args);\n```\n\n## 用法\n\n### `delay(func, wait, ...args)`\n\n当您想要将函数执行延迟特定时间时，请使用 `delay`。它对于动画定时、延迟用户反馈或调度异步操作很有用。\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\n// 基本用法\nconst timerId = delay(() => {\n  console.log('1秒后执行');\n}, 1000);\n\n// 带参数使用\ndelay(\n  (name, age) => {\n    console.log(`你好，${age}岁的${name}！`);\n  },\n  2000,\n  '张三',\n  30\n);\n// 2秒后：打印 \"你好，30岁的张三！\"\n```\n\n与 `setTimeout` 比较：\n\n```typescript\n// 使用 delay\nimport { delay } from 'es-toolkit/compat';\n\nconst timerId1 = delay(myFunction, 1000, 'arg1', 'arg2');\n\n// 使用 setTimeout（更快，标准）\nconst timerId2 = setTimeout(myFunction, 1000, 'arg1', 'arg2');\n\n// 或使用箭头函数\nconst timerId3 = setTimeout(() => myFunction('arg1', 'arg2'), 1000);\n```\n\n动画序列：\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass AnimationSequence {\n  constructor(element) {\n    this.element = element;\n  }\n\n  fadeInSequence() {\n    // 立即开始\n    this.element.style.opacity = '0';\n    this.element.style.display = 'block';\n\n    // 100ms 后开始淡入\n    delay(() => {\n      this.element.style.transition = 'opacity 500ms ease-in';\n      this.element.style.opacity = '1';\n    }, 100);\n\n    // 1秒后缩放动画\n    delay(() => {\n      this.element.style.transform = 'scale(1.1)';\n    }, 1000);\n\n    // 1.5秒后恢复原始大小\n    delay(() => {\n      this.element.style.transform = 'scale(1)';\n    }, 1500);\n  }\n}\n```\n\n取消定时器：\n\n```typescript\nimport { delay } from 'es-toolkit/compat';\n\nclass TimerManager {\n  constructor() {\n    this.timers = new Map();\n  }\n\n  setDelayedTask(id, task, delayMs) {\n    // 如果存在现有定时器则取消\n    this.cancelTask(id);\n\n    const timerId = delay(task, delayMs);\n    this.timers.set(id, timerId);\n\n    return timerId;\n  }\n\n  cancelTask(id) {\n    const timerId = this.timers.get(id);\n    if (timerId) {\n      clearTimeout(timerId);\n      this.timers.delete(id);\n      return true;\n    }\n    return false;\n  }\n\n  cancelAllTasks() {\n    this.timers.forEach(timerId => clearTimeout(timerId));\n    this.timers.clear();\n  }\n}\n\nconst timerManager = new TimerManager();\n\n// 调度任务\ntimerManager.setDelayedTask(\n  'save',\n  () => {\n    console.log('自动保存');\n  },\n  5000\n);\n\ntimerManager.setDelayedTask(\n  'cleanup',\n  () => {\n    console.log('清理完成');\n  },\n  10000\n);\n\n// 必要时取消特定任务\n// timerManager.cancelTask('save');\n\n// 页面卸载时清理所有定时器\nwindow.addEventListener('beforeunload', () => {\n  timerManager.cancelAllTasks();\n});\n```\n\n#### 参数\n\n- `func` (`Function`): 延迟后要执行的函数。\n- `wait` (`number`): 要延迟的毫秒数。\n- `args` (`...any[]`): 执行函数时要传递的参数。\n\n#### 返回值\n\n(`number`): 返回定时器 ID。可以使用 `clearTimeout()` 取消。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/flip.md",
    "content": "# flip (Lodash 兼容性)\n\n::: warning 使用直接的参数反转\n这个 `flip` 函数只是简单地反转函数参数的顺序。在大多数情况下，它可以用更简单的方法替代。\n\n建议使用更快、更现代的 `(...args) => func(...args.reverse())` 或直接传递参数。\n:::\n\n创建一个函数,该函数反转给定函数的参数顺序。\n\n```typescript\nconst flippedFunc = flip(func);\n```\n\n## 用法\n\n### `flip(func)`\n\n当您想要通过反转参数顺序来创建新函数时,请使用 `flip`。它将原本从第一个参数开始按顺序接收的函数改为从最后一个参数开始接收。\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst flipped = flip(greet);\nflipped('John', 'Hello'); // 'Hello, John!'\n\n// 原始函数按 (greeting, name) 顺序接收参数\n// 但反转后的函数按 (name, greeting) 顺序接收参数\n```\n\n对于接受多个参数的函数,所有参数的顺序都会反转。\n\n```typescript\nimport { flip } from 'es-toolkit/compat';\n\nfunction fn(a: string, b: string, c: string, d: string) {\n  return [a, b, c, d];\n}\n\nconst flipped = flip(fn);\nflipped('1', '2', '3', '4'); // ['4', '3', '2', '1']\n```\n\n#### 参数\n\n- `func` (`F`): 要反转参数的函数。\n\n#### 返回值\n\n(`(...args: Reversed<Parameters<F>>) => ReturnType<F>`): 返回参数顺序已反转的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/flow.md",
    "content": "# flow (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flow`\n这个 `flow` 函数为了 Lodash 兼容性添加了数组扁平化处理，变得复杂了。\n\n建议使用更快、更现代的 `es-toolkit` 的 [flow](../../function/flow.md)。\n:::\n\n创建一个新函数，从左到右依次执行给定的函数。\n\n```typescript\nconst combinedFunc = flow(...functions);\n```\n\n## 用法\n\n### `flow(...functions)`\n\n当您想要创建一个从左到右依次执行多个函数的组合函数时，请使用 `flow`。它对于创建数据转换管道很有用。\n\n```typescript\nimport { flow } from 'es-toolkit/compat';\n\n// 基本用法\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 从左到右执行: double(square(add(x, y)))\nconst calculate = flow(add, square, double);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 以数组形式传递函数\nconst calculate2 = flow([add, square], double);\nconsole.log(calculate2(2, 3)); // 50\n\n// 现代替代方案（推荐）\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// 使用管道操作符（未来的 JavaScript）\nconst pipeCalculate = (x, y) => add(x, y) |> square |> double;\n\n// 或使用链式模式\nclass Calculator {\n  constructor(value) {\n    this.value = value;\n  }\n\n  add(n) {\n    this.value += n;\n    return this;\n  }\n\n  square() {\n    this.value *= this.value;\n    return this;\n  }\n\n  double() {\n    this.value *= 2;\n    return this;\n  }\n\n  valueOf() {\n    return this.value;\n  }\n}\n\nconst chainedResult = new Calculator(3).square().double().valueOf(); // 18\n```\n\n#### 参数\n\n- `...functions` (`Array<Function | Function[]>`): 要从左到右执行的函数。也可以以数组形式传递。\n\n#### 返回值\n\n(`Function`): 返回一个新的组合函数，从左到右依次执行所有函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/flowRight.md",
    "content": "# flowRight (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `flowRight`\n这个 `flowRight` 函数为了 Lodash 兼容性添加了数组扁平化处理，变得复杂了。\n\n建议使用更快、更现代的 `es-toolkit` 的 [flowRight](../../function/flowRight.md)。\n:::\n\n创建一个新函数，从右到左依次执行给定的函数。\n\n```typescript\nconst combinedFunc = flowRight(...functions);\n```\n\n## 用法\n\n### `flowRight(...functions)`\n\n当您想要创建一个从右到左依次执行多个函数的组合函数时，请使用 `flowRight`。它对于创建数据转换管道很有用。\n\n```typescript\nimport { flowRight } from 'es-toolkit/compat';\n\n// 基本用法\nfunction add(x, y) {\n  return x + y;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\nfunction double(n) {\n  return n * 2;\n}\n\n// 从右到左执行: double(square(add(x, y)))\nconst calculate = flowRight(double, square, add);\nconsole.log(calculate(1, 2)); // double(square(add(1, 2))) = double(square(3)) = double(9) = 18\n\n// 以数组形式传递函数\nconst calculate2 = flowRight([double, square], add);\nconsole.log(calculate2(2, 3)); // 50\n\n// 现代替代方案（推荐）\nconst modernCalculate = (x, y) => double(square(add(x, y)));\nconsole.log(modernCalculate(1, 2)); // 18\n\n// 或使用函数链\nconst chainedCalculate = (x, y) => [x, y]\n  .reduce((acc, val, idx) => idx === 0 ? val : acc + val)\n  .valueOf()\n  |> (n => n * n)\n  |> (n => n * 2);\n```\n\n通常以与 `flow` 相反的顺序工作。它的工作方式类似于函数组合，因此很直观。\n\n#### 参数\n\n- `...functions` (`Array<Function | Function[]>`): 要从右到左执行的函数。也可以以数组形式传递。\n\n#### 返回值\n\n(`Function`): 返回一个新的组合函数，从右到左依次执行所有函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/identity.md",
    "content": "# identity (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `identity`\n这个 `identity` 函数在 `es-toolkit` 的主库中也有相同功能的函数。它只是简单地返回输入值。\n\n建议使用更快、更现代的 `es-toolkit` 的 [identity](../../function/identity.md)。\n:::\n\n返回接收到的值。\n\n```typescript\nconst result = identity(value);\n```\n\n## 用法\n\n### `identity(value)`\n\n当您想要原样返回接收到的值时,请使用 `identity`。它主要用作默认值或占位符函数,在函数式编程中经常使用。\n\n```typescript\nimport { identity } from 'es-toolkit/compat';\n\n// 基本用法\nconsole.log(identity(5)); // 5\nconsole.log(identity('hello')); // 'hello'\nconsole.log(identity({ key: 'value' })); // { key: 'value' }\n\n// 与数组的 map 一起使用（值复制）\nconst numbers = [1, 2, 3, 4, 5];\nconst copied = numbers.map(identity);\nconsole.log(copied); // [1, 2, 3, 4, 5]\n\n// 在过滤中用作默认值\nconst values = [1, 0, '', 'hello', null, undefined, false, true];\nconst filtered = values.filter(identity); // 只保留真值\nconsole.log(filtered); // [1, 'hello', true]\n\n// 用作默认转换函数\nfunction processData(data, transform = identity) {\n  return transform(data);\n}\n\nconsole.log(processData('hello')); // 'hello'\nconsole.log(processData('hello', x => x.toUpperCase())); // 'HELLO'\n```\n\n在大多数情况下,可以用更简单的箭头函数 `x => x` 替代:\n\n```typescript\n// 使用箭头函数而不是 identity（推荐）\nconst copied = numbers.map(x => x);\nconst filtered = values.filter(x => x);\n```\n\n#### 参数\n\n- `value` (`T`): 要返回的值。\n\n#### 返回值\n\n(`T`): 原样返回接收到的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/memoize.md",
    "content": "# memoize (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `memoize`\n这个 `memoize` 函数由于 `resolver` 函数的 `null` 检查、`MapCache` 接口的复杂类型处理以及为了 Lodash 兼容性而产生的额外开销，导致运行缓慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [memoize](../../function/memoize.md)。\n:::\n\n缓存函数结果，以在使用相同参数调用时提高性能。\n\n```typescript\nconst memoizedFunc = memoize(func, resolver);\n```\n\n## 用法\n\n### `memoize(func, resolver)`\n\n当您想要缓存函数结果以在使用相同参数调用时重用之前的结果时，请使用 `memoize`。它对于昂贵的计算或 API 调用很有用。\n\n```typescript\nimport { memoize } from 'es-toolkit/compat';\n\n// 基本用法\nfunction expensiveCalculation(n) {\n  console.log('计算中...', n);\n  return n * n;\n}\n\nconst memoizedCalc = memoize(expensiveCalculation);\n\nconsole.log(memoizedCalc(5)); // '计算中... 5', 25\nconsole.log(memoizedCalc(5)); // 25 (缓存的结果，不计算)\nconsole.log(memoizedCalc(10)); // '计算中... 10', 100\n\n// 使用自定义解析器\nfunction fetchUserData(userId, includeProfile) {\n  console.log('获取用户数据...', userId, includeProfile);\n  return { id: userId, profile: includeProfile ? '个人资料数据' : null };\n}\n\n// 生成考虑所有参数的缓存键\nconst memoizedFetch = memoize(fetchUserData, (userId, includeProfile) => {\n  return `${userId}_${includeProfile}`;\n});\n\nmemoizedFetch(1, true); // '获取用户数据... 1 true'\nmemoizedFetch(1, true); // 使用缓存的结果\nmemoizedFetch(1, false); // '获取用户数据... 1 false' (不同的缓存键)\n\n// 访问和修改缓存\nconsole.log(memoizedCalc.cache.get(5)); // 25\nmemoizedCalc.cache.set(7, 49); // 手动设置缓存\nconsole.log(memoizedCalc(7)); // 49 (使用缓存值，不计算)\n```\n\n在大多数情况下使用基本哈希映射，但根据需要也可以使用自定义缓存实现。\n\n#### 参数\n\n- `func` (`Function`): 要记忆化的函数。\n- `resolver` (`Function`, 可选): 确定缓存键的函数。如果未提供，使用第一个参数作为键。\n\n#### 返回值\n\n(`Function & { cache: MapCache }`): 返回记忆化的函数。返回的函数具有 `cache` 属性，可直接访问缓存。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/negate.md",
    "content": "# negate (Lodash 兼容性)\n\n::: warning 使用逻辑非运算符\n\n这个 `negate` 函数只是对函数的结果进行取反。在大多数情况下,直接使用逻辑非运算符(`!`)更简单且更快。\n\n建议使用更快且更现代的 `!predicate(...args)` 或 `(...args) => !predicate(...args)`。\n\n:::\n\n创建一个对给定函数的结果进行取反的新函数。\n\n```typescript\nconst negatedFunc = negate(predicate);\n```\n\n## 用法\n\n### `negate(predicate)`\n\n当您想创建一个对函数结果进行取反的新函数时,使用 `negate`。在过滤或条件语句中检查相反条件时很有用。\n\n```typescript\nimport { negate } from 'es-toolkit/compat';\n\n// 基本用法\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\nconst isOdd = negate(isEven);\nconsole.log(isOdd(3)); // true\nconsole.log(isOdd(4)); // false\n\n// 在数组过滤中使用\nconst numbers = [1, 2, 3, 4, 5, 6];\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n\n// 现代替代方案(推荐)\nconst modernOddNumbers = numbers.filter(n => !isEven(n));\n// 或\nconst isOddModern = n => !isEven(n);\nconst modernOddNumbers2 = numbers.filter(isOddModern);\n\n// 复杂示例\nfunction isEmpty(str) {\n  return str.trim().length === 0;\n}\n\nconst hasContent = negate(isEmpty);\nconst messages = ['', ' ', 'hello', '  ', 'world'];\nconst validMessages = messages.filter(hasContent);\nconsole.log(validMessages); // ['hello', 'world']\n```\n\n主要用于数组过滤或条件逻辑,但在大多数情况下,直接使用逻辑非运算符更直观。\n\n#### 参数\n\n- `predicate` (`Function`): 要对其结果进行取反的函数。必须返回布尔值。\n\n#### 返回值\n\n(`Function`): 返回一个新函数,该函数返回原函数结果的取反值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/noop.md",
    "content": "# noop (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `noop`\n\n`es-toolkit` 也有相同行为的 [noop](../../function/noop.md) 函数。\n\n:::\n\n什么都不做的空函数。\n\n```typescript\nnoop();\n```\n\n## 用法\n\n### `noop(...args)`\n\n当您需要一个什么都不做的占位符函数时,使用 `noop`。它通常用作默认值或回调函数。\n\n```typescript\nimport { noop } from 'es-toolkit/compat';\n\n// 基本用法\nnoop(); // 什么都不做\nnoop(1, 2, 3); // 接受参数但什么都不做\n\n// 用作默认回调\nfunction processData(data, callback = noop) {\n  // 处理数据\n  console.log('处理数据中...', data);\n\n  // 调用回调(如果未提供则为 noop)\n  callback(data);\n}\n\nprocessData('测试'); // 即使未提供回调也能正常工作\n\n// 现代替代方案(推荐)\nfunction modernProcessData(data, callback = () => {}) {\n  console.log('处理数据中...', data);\n  callback(data);\n}\n\n// 或使用可选回调\nfunction processDataOptional(data, callback) {\n  console.log('处理数据中...', data);\n  callback?.(data); // 仅在提供回调时调用\n}\n```\n\n在需要默认值或占位符的情况下很有用,但在现代 JavaScript 中,使用可选链(`?.`)或默认参数更常见。\n\n#### 参数\n\n- `...args` (`any[]`): 可以接受任何参数,但都会被忽略。\n\n#### 返回值\n\n(`void`): 不返回任何内容。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/nthArg.md",
    "content": "# nthArg (Lodash 兼容性)\n\n::: warning 使用箭头函数\n\n这个 `nthArg` 函数只是创建一个返回特定索引参数的包装函数。使用箭头函数可以更简洁清晰地实现相同的功能。\n\n建议使用更快且更现代的箭头函数。\n\n:::\n\n创建一个返回指定索引参数的函数。\n\n```typescript\nconst getNthArg = nthArg(n);\n```\n\n## 用法\n\n### `nthArg(n)`\n\n当您只需要函数特定位置的参数时,使用 `nthArg`。如果使用负索引,则从末尾开始计数。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 创建一个获取第二个参数的函数\nconst getSecondArg = nthArg(1);\ngetSecondArg('a', 'b', 'c', 'd');\n// Returns: 'b'\n\n// 创建一个获取倒数第二个参数的函数\nconst getPenultimateArg = nthArg(-2);\ngetPenultimateArg('a', 'b', 'c', 'd');\n// Returns: 'c'\n\n// 创建一个获取第一个参数的函数(默认)\nconst getFirstArg = nthArg();\ngetFirstArg('a', 'b', 'c');\n// Returns: 'a'\n```\n\n与数组方法一起使用时很有用。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 从每个数组中只提取第二个元素\nconst arrays = [\n  [1, 2, 3],\n  [4, 5, 6],\n  [7, 8, 9],\n];\narrays.map(nthArg(1));\n// Returns: [2, 5, 8]\n```\n\n负索引从末尾开始计数。\n\n```typescript\nimport { nthArg } from 'es-toolkit/compat';\n\n// 获取最后一个参数的函数\nconst getLastArg = nthArg(-1);\ngetLastArg('first', 'middle', 'last');\n// Returns: 'last'\n```\n\n#### 参数\n\n- `n` (`number`, 可选): 要返回的参数的索引。负值从末尾开始计数。默认值为 `0`。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回一个新函数,该函数返回指定索引处的参数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/once.md",
    "content": "# once (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `once`\n\n这个 `once` 函数与 `es-toolkit` 主库的 [once](../../function/once.md) 函数具有相同的功能。\n\n:::\n\n限制函数只能被调用一次。\n\n```typescript\nconst limitedFunc = once(func);\n```\n\n## 用法\n\n### `once(func)`\n\n当您想限制函数只能被调用一次时,使用 `once`。第一次调用后,结果会被缓存并返回相同的值。\n\n```typescript\nimport { once } from 'es-toolkit/compat';\n\n// 基本用法\nlet count = 0;\nconst increment = once(() => {\n  count++;\n  console.log('计数器递增:', count);\n  return count;\n});\n\nincrement(); // 输出 '计数器递增: 1',返回 1\nincrement(); // 不输出任何内容,返回 1\nincrement(); // 不输出任何内容,返回 1\n\n// 实用示例 - 初始化函数\nconst initialize = once(() => {\n  console.log('正在初始化应用程序...');\n  // 昂贵的初始化操作\n  return '初始化完成';\n});\n\n// 即使多次调用,初始化也只执行一次\ninitialize(); // 输出 '正在初始化应用程序...'\ninitialize(); // 不输出任何内容\n```\n\n在创建昂贵的初始化操作或设置函数时很有用。例如,可以用于数据库连接、API 令牌初始化等。\n\n#### 参数\n\n- `func` (`Function`): 要限制为只调用一次的函数。\n\n#### 返回值\n\n(`Function`): 返回一个新函数,该函数只被调用一次。从第二次调用开始,返回第一次调用的结果。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/overArgs.md",
    "content": "# overArgs (Lodash 兼容性)\n\n::: warning 使用箭头函数和直接转换\n\n这个 `overArgs` 函数创建了一个转换每个参数的复杂包装器,导致性能缓慢。使用箭头函数直接转换参数可以获得更清晰、更快速的代码。\n\n建议使用更快且更现代的箭头函数和直接转换。\n\n:::\n\n创建一个新函数,该函数使用对应的转换函数转换函数的每个参数后执行。\n\n```typescript\nconst wrapped = overArgs(func, transforms);\n```\n\n## 用法\n\n### `overArgs(func, ...transforms)`\n\n当您想在调用函数之前转换每个参数时,使用 `overArgs`。每个参数由对应的转换函数处理。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nfunction doubled(n) {\n  return n * 2;\n}\n\nfunction square(n) {\n  return n * n;\n}\n\n// 第一个参数加倍,第二个参数平方\nconst func = overArgs((x, y) => [x, y], [doubled, square]);\nfunc(5, 3);\n// Returns: [10, 9]\n```\n\n也可以使用字符串提取属性。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst user1 = { name: 'John', age: 30 };\nconst user2 = { name: 'Jane', age: 25 };\n\n// 从每个对象中提取属性\nconst getUserInfo = overArgs((name, age) => `${name} is ${age} years old`, ['name', 'age']);\ngetUserInfo(user1, user2);\n// Returns: \"John is 25 years old\"\n```\n\n如果未提供转换函数或为 `null`/`undefined`,则参数将按原样传递。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2, null, n => n * 3]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 45]\n```\n\n超过转换函数数量的参数将按原样传递。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((a, b, c) => [a, b, c], [n => n * 2]);\nfunc(5, 10, 15);\n// Returns: [10, 10, 15]\n```\n\n也可以检查参数是否与对象匹配。\n\n```typescript\nimport { overArgs } from 'es-toolkit/compat';\n\nconst func = overArgs((match1, match2) => [match1, match2], [{ age: 30 }, { active: true }]);\n\nfunc({ name: 'John', age: 30 }, { active: true, status: 'online' });\n// Returns: [true, true]\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要包装的函数。\n- `...transforms` (`Array<(...args: any[]) => any | string | object | array>`): 用于转换参数的函数。每个转换可以是以下之一:\n  - 接受并返回值的函数\n  - 用于获取属性值的字符串(例如,'name' 获取 name 属性)\n  - 用于检查参数是否与属性匹配的对象\n  - 用于检查属性匹配的 [属性, 值] 数组\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回一个新函数,该函数转换参数后调用原始函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/partial.md",
    "content": "# partial (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `partial`\n\n这个 `partial` 函数由于许多重载和联合类型处理而效率低下。此外,在大多数情况下可以用更简单的箭头函数替代。\n\n建议使用更快且更现代的 `es-toolkit` 的 [`partial`](../../function/partial.md)。\n\n:::\n\n通过预填充参数来创建部分应用的函数。\n\n```typescript\nconst partialFunc = partial(func, ...args);\n```\n\n## 用法\n\n### `partial(func, ...args)`\n\n当您想通过预填充参数来创建部分应用的函数时,使用 `partial`。主要在参数顺序重要的函数中固定前面的参数时很有用。\n\n```typescript\nimport { partial } from 'es-toolkit/compat';\n\n// 基本用法\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 预设第一个参数\nconst sayHello = partial(greet, 'Hello');\nsayHello('Alice', '!'); // 'Hello Alice!'\n\n// 预设多个参数\nconst greetAlice = partial(greet, 'Hello', 'Alice');\ngreetAlice('!'); // 'Hello Alice!'\n\n// 使用 placeholder 控制参数顺序\nconst greetWithExclamation = partial(greet, partial.placeholder, 'Alice', '!');\ngreetWithExclamation('Hi'); // 'Hi Alice!'\n```\n\n在大多数情况下可以用箭头函数替代:\n\n```typescript\n// 使用箭头函数代替 partial(推荐)\nconst sayHello = (name, punctuation) => greet('Hello', name, punctuation);\nconst greetAlice = punctuation => greet('Hello', 'Alice', punctuation);\n```\n\n#### 参数\n\n- `func` (`Function`): 要部分应用的函数。\n- `...args` (`any[]`): 要预填充的参数。使用 `partial.placeholder` 可以控制参数顺序。\n\n#### 返回值\n\n(`Function`): 返回一个预填充了参数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/partialRight.md",
    "content": "# partialRight (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 `partialRight`\n\n这个 `partialRight` 函数由于许多重载和联合类型处理而效率低下。此外,在大多数情况下可以用更简单的箭头函数替代。\n\n建议使用更快且更现代的 `es-toolkit` 的 [`partialRight`](../../function/partialRight.md)。\n\n:::\n\n通过从右侧预填充参数来创建部分应用的函数。\n\n```typescript\nconst partialFunc = partialRight(func, ...args);\n```\n\n## 用法\n\n### `partialRight(func, ...args)`\n\n当您想通过从右侧预填充参数来创建部分应用的函数时,使用 `partialRight`。主要在参数顺序重要的函数中固定最后的参数时很有用。\n\n```typescript\nimport { partialRight } from 'es-toolkit/compat';\n\n// 基本用法\nfunction greet(greeting, name, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 预设最后一个参数\nconst greetWithExclamation = partialRight(greet, '!');\ngreetWithExclamation('Hello', 'Alice'); // 'Hello Alice!'\n\n// 预设多个参数\nconst sayHiToAlice = partialRight(greet, 'Alice', '!');\nsayHiToAlice('Hi'); // 'Hi Alice!'\n\n// 使用 placeholder 控制参数顺序\nconst greetAliceWithCustom = partialRight(greet, 'Alice', partialRight.placeholder);\ngreetAliceWithCustom('Hello', '?'); // 'Hello Alice?'\n```\n\n在大多数情况下可以用箭头函数替代:\n\n```typescript\n// 使用箭头函数代替 partialRight(推荐)\nconst greetWithExclamation = (greeting, name) => greet(greeting, name, '!');\nconst sayHiToAlice = greeting => greet(greeting, 'Alice', '!');\n```\n\n#### 参数\n\n- `func` (`Function`): 要部分应用的函数。\n- `...args` (`any[]`): 要预填充的参数。使用 `partialRight.placeholder` 可以控制参数顺序。\n\n#### 返回值\n\n(`Function`): 返回一个从右侧预填充了参数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/rearg.md",
    "content": "# rearg (Lodash 兼容性)\n\n::: warning 请使用箭头函数\n\n此 `rearg` 函数创建了一个复杂的包装器来重新排列参数顺序,这可能会导致性能下降。通过使用箭头函数直接重新排列参数顺序,您可以编写更清晰、更快的代码。\n\n请改用更快、更现代的箭头函数。\n\n:::\n\n创建一个新函数,按指定顺序重新排列原函数的参数。\n\n```typescript\nconst rearranged = rearg(func, ...indices);\n```\n\n## 用法\n\n### `rearg(func, ...indices)`\n\n当您想在调用函数时更改参数顺序时,请使用 `rearg`。它会按照指定的索引顺序重新排列参数,然后调用原函数。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst greet = (greeting, name) => `${greeting}, ${name}!`;\n\n// 交换参数顺序(第1个,第0个)\nconst rearrangedGreet = rearg(greet, 1, 0);\nrearrangedGreet('World', 'Hello');\n// 返回值: \"Hello, World!\"\n\n// 原函数保持不变\ngreet('Hello', 'World');\n// 返回值: \"Hello, World!\"\n```\n\n您也可以将索引作为数组传递。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 使用数组指定索引\nconst rearranged = rearg(fn, [2, 0, 1]);\nrearranged('a', 'b', 'c');\n// 返回值: ['c', 'a', 'b']\n```\n\n您可以只重新排列部分参数,其余参数保持原样。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// 只重新排列前两个参数\nconst rearranged = rearg(fn, 1, 0);\nrearranged('first', 'second', 'third', 'fourth');\n// 返回值: ['second', 'first', 'third', 'fourth']\n```\n\n不存在的索引会被处理为 `undefined`。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c) => [a, b, c];\n\n// 包含不存在的索引 5\nconst rearranged = rearg(fn, 5, 1, 0);\nrearranged('a', 'b', 'c');\n// 返回值: [undefined, 'b', 'a']\n```\n\n嵌套数组也会被展平处理。\n\n```typescript\nimport { rearg } from 'es-toolkit/compat';\n\nconst fn = (a, b, c, d) => [a, b, c, d];\n\n// 嵌套数组索引\nconst rearranged = rearg(fn, [1, [2, 0]], 3);\nrearranged('a', 'b', 'c', 'd');\n// 返回值: ['b', 'c', 'a', 'd']\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要重新排列参数的函数。\n- `...indices` (`Array<number | number[]>`): 要重新排列的参数索引。也支持嵌套数组。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回参数已重新排列的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/rest.md",
    "content": "# rest (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `rest`\n\n此 `rest` 函数由于额外的逻辑(如默认值处理和索引验证)可能会导致性能下降。\n\n请改用更快、更现代的 `es-toolkit` 的 [rest](../../function/rest.md)。\n\n:::\n\n创建一个函数,从指定索引开始将剩余参数分组到数组中。\n\n```typescript\nconst restFunc = rest(func, start);\n```\n\n## 用法\n\n### `rest(func, start)`\n\n当您想通过将指定索引开始的剩余参数分组到数组中来转换函数参数时,请使用 `rest`。它对于创建可变参数函数很有用。\n\n```typescript\nimport { rest } from 'es-toolkit/compat';\n\n// 基本用法 - 将最后的参数分组到数组中\nfunction logMessage(level, message, ...details) {\n  console.log(`[${level}] ${message}`, details);\n}\n\nconst restLogger = rest(logMessage, 2);\nrestLogger('ERROR', '发生错误', '详细信息 1', '详细信息 2');\n// 内部调用 logMessage('ERROR', '发生错误', [['详细信息 1', '详细信息 2']])\n\n// 不同索引的示例\nfunction process(action, target, ...args) {\n  return { action, target, args };\n}\n\nconst restProcess = rest(process, 1);\nrestProcess('update', 'user', 'name', 'John', 'age', 25);\n// { action: 'update', target: ['user', 'name', 'John', 'age', 25], args: [] }\n```\n\n当您想将函数的最后参数作为数组接收时使用它。在现代 JavaScript 中,使用剩余参数语法(`...args`)更为常见。\n\n#### 参数\n\n- `func` (`Function`): 要转换的函数。\n- `start` (`number`, 可选): 开始将参数分组到数组中的索引。默认值为 `func.length - 1`。\n\n#### 返回值\n\n(`Function`): 返回一个新函数,从指定索引开始将剩余参数分组到数组中。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/spread.md",
    "content": "# spread (Lodash 兼容性)\n\n::: warning 请使用现代展开运算符\n\n此 `spread` 函数处理复杂的逻辑,在特定索引处将数组参数展开为单个参数,这可能会导致性能下降。\n\n请改用更快、更现代的展开运算符(`...`)直接使用。\n\n:::\n\n创建一个新函数,在调用函数时将数组参数展开为单个参数。\n\n```typescript\nconst spreadFunc = spread(func, argsIndex);\n```\n\n## 用法\n\n### `spread(func, argsIndex)`\n\n当您想通过将数组参数展开为单个参数来调用函数时,请使用 `spread`。您可以指定数组的位置,允许它与其他参数一起使用。\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\n// 基本用法 - 第一个参数是数组\nfunction add(a, b) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nspreadAdd([1, 2]); // 3\n\n// 当第二个参数是数组时\nfunction greet(greeting, names) {\n  return `${greeting}, ${names.join(' and ')}!`;\n}\n\nconst spreadGreet = spread(greet, 1);\nspreadGreet('Hello', ['Alice', 'Bob']); // 'Hello, Alice and Bob!'\n\n// 现代展开运算符示例(推荐)\nfunction modernAdd(a, b) {\n  return a + b;\n}\n\nconst numbers = [1, 2];\nmodernAdd(...numbers); // 3 - 更简单、更快\n```\n\n在将数组作为函数参数传递时特别有用,但在现代 JavaScript 中,使用展开运算符更为常见。\n\n#### 参数\n\n- `func` (`Function`): 要转换的函数。\n- `argsIndex` (`number`, 可选): 数组参数的位置。默认值为 `0`。\n\n#### 返回值\n\n(`Function`): 返回一个新函数,在调用时展开数组参数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/throttle.md",
    "content": "# throttle (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `throttle`\n\n此 `throttle` 函数为了 Lodash 兼容性在内部使用 debounce 函数,使其变得有些复杂。它还具有更复杂的默认值和选项处理。\n\n请改用更快、更现代的 `es-toolkit` 的 [throttle](../../function/throttle.md)。\n\n:::\n\n限制函数调用,使其在指定时间间隔内最多执行一次。\n\n```typescript\nconst throttledFunc = throttle(func, wait, options);\n```\n\n## 用法\n\n### `throttle(func, wait, options)`\n\n当您想限制函数调用在指定时间间隔内最多执行一次时,请使用 `throttle`。它对于限制事件处理程序或 API 调用的频率很有用。\n\n```typescript\nimport { throttle } from 'es-toolkit/compat';\n\n// 基本用法 - 每秒最多执行一次\nconst throttledLog = throttle(() => {\n  console.log('事件发生!');\n}, 1000);\n\n// 使用选项的示例\nconst throttledScroll = throttle(handleScroll, 100, {\n  leading: true, // 首次调用时立即执行\n  trailing: false, // 最后一次调用后不执行\n});\n\nwindow.addEventListener('scroll', throttledScroll);\n```\n\n在处理快速发生的事件(如滚动或调整大小事件)时,这对于性能至关重要。\n\n#### 参数\n\n- `func` (`Function`): 要节流的函数。\n- `wait` (`number`, 可选): 等待时间(毫秒)。默认值为 `0`。\n- `options` (`ThrottleSettings`, 可选): 节流选项。\n  - `leading` (`boolean`): 是否在首次调用时执行。默认值为 `true`。\n  - `trailing` (`boolean`): 是否在最后一次调用后执行。默认值为 `true`。\n\n#### 返回值\n\n(`DebouncedFunc`): 返回节流函数。您可以使用 `cancel()` 方法取消待处理的执行。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/unary.md",
    "content": "# unary (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `ary`\n\n此 `unary` 函数是作为 `ary` 函数的特殊情况实现的。如果您需要更多控制,直接使用 `es-toolkit` 的 [ary](../../function/ary.md) 会更高效。\n\n请改用更快、更现代的 `es-toolkit` 的 [ary](../../function/ary.md)。\n\n:::\n\n限制函数最多接受一个参数。\n\n```typescript\nconst limitedFunc = unary(func);\n```\n\n## 用法\n\n### `unary(func)`\n\n当您想限制函数最多接受一个参数时,请使用 `unary`。传递的任何额外参数都将被忽略。\n\n```typescript\nimport { unary } from 'es-toolkit/compat';\n\nfunction greet(name, greeting, punctuation) {\n  return `${greeting} ${name}${punctuation}`;\n}\n\n// 转换为只接受第一个参数的函数\nconst greetOne = unary(greet);\ngreetOne('Alice', 'Hello', '!'); // 与 greet('Alice') 相同\n\n// 与数组的 map 函数一起使用时很有用\nconst numbers = ['1', '2', '3'];\nnumbers.map(parseInt); // [1, NaN, NaN] - 意外结果\nnumbers.map(unary(parseInt)); // [1, 2, 3] - 正确结果\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要限制参数的函数。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回最多接受一个参数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/function/wrap.md",
    "content": "# wrap (Lodash 兼容性)\n\n::: warning 请使用高阶函数\n\n此 `wrap` 函数只是简单地包装一个函数。在大多数情况下,使用更简单的高阶函数或闭包更清晰。\n\n请改用更快、更现代的闭包或直接函数定义。\n\n:::\n\n创建一个包装给定值或函数的新函数。\n\n```typescript\nconst wrappedFunc = wrap(value, wrapper);\n```\n\n## 用法\n\n### `wrap(value, wrapper)`\n\n当您想对值或函数应用额外的逻辑时,请使用 `wrap`。您可以通过包装函数定义新的行为,该函数将原始值作为第一个参数接收。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 包装函数以添加日志功能\nconst greet = (name: string) => `Hi, ${name}`;\nconst loggedGreet = wrap(greet, (originalFunc, name) => {\n  const result = originalFunc(name);\n  console.log(`[LOG] ${result}`);\n  return result;\n});\n\nloggedGreet('Alice'); // 在控制台输出 \"[LOG] Hi, Alice\" 并返回 \"Hi, Alice\"\n```\n\n您也可以包装非函数值。该值将作为第一个参数传递给包装函数。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\n// 创建一个将字符串包装在 HTML 标签中的函数\nconst htmlWrapper = wrap('Hello World', (text, tag) => `<${tag}>${text}</${tag}>`);\nconsole.log(htmlWrapper('h1')); // \"<h1>Hello World</h1>\"\n\n// 创建一个在计算中使用数字的函数\nconst calculate = wrap(10, (baseValue, multiplier) => baseValue * multiplier);\nconsole.log(calculate(5)); // 50\n```\n\n这是一个更复杂的函数包装示例。\n\n```typescript\nimport { wrap } from 'es-toolkit/compat';\n\nconst add = (a: number, b: number) => a + b;\n\n// 创建一个带有性能测量的函数\nconst timedAdd = wrap(add, (originalAdd, a, b) => {\n  const start = Date.now();\n  const result = originalAdd(a, b);\n  const end = Date.now();\n  console.log(`执行时间: ${end - start}ms`);\n  return result;\n});\n\ntimedAdd(3, 7); // 在控制台输出执行时间并返回 10\n```\n\n#### 参数\n\n- `value` (`T`): 要包装的值或函数。\n- `wrapper` (`(value: T, ...args: U[]) => V`): 接收原始值作为第一个参数并应用额外逻辑的函数。\n\n#### 返回值\n\n(`(...args: U[]) => V`): 返回应用了包装函数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/add.md",
    "content": "# add (Lodash 兼容性)\n\n::: warning 使用 `+` 运算符\n\n由于复杂的类型转换和字符串处理，此 `add` 函数运行缓慢。\n\n请改用更快、更简单的 `+` 运算符。\n\n:::\n\n将两个值相加。\n\n```typescript\nconst result = add(value, other);\n```\n\n## 用法\n\n### `add(value, other)`\n\n当您想要将两个值相加时，请使用 `add`。它不仅可以处理数字，还可以处理字符串。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\n// 数字相加\nadd(2, 3);\n// Returns: 5\n\nadd(1.5, 2.5);\n// Returns: 4\n\n// 处理 NaN\nadd(NaN, 5);\n// Returns: NaN\n\nadd(10, NaN);\n// Returns: NaN\n```\n\n当包含字符串时，它作为字符串连接操作。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd('2', 3);\n// Returns: '23'\n\nadd(1, '5');\n// Returns: '15'\n\nadd('hello', 'world');\n// Returns: 'helloworld'\n```\n\n`undefined` 值被特殊处理。\n\n```typescript\nimport { add } from 'es-toolkit/compat';\n\nadd(undefined, undefined);\n// Returns: 0\n\nadd(5, undefined);\n// Returns: 5\n\nadd(undefined, 3);\n// Returns: 3\n```\n\n#### 参数\n\n- `value` (`number`): 要相加的第一个值。\n- `other` (`number`): 要相加的第二个值。\n\n#### 返回值\n\n(`number | string`): 返回两个值的和。如果包含字符串，则返回字符串，否则返回数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/ceil.md",
    "content": "# ceil (Lodash 兼容性)\n\n::: warning 请使用 `Math.ceil`\n\n这个 `ceil` 函数由于小数位计算和内部函数调用会运行较慢。\n\n请使用更快、更现代的 `Math.ceil`。\n\n:::\n\n将数字向上舍入到指定的小数位数。\n\n```typescript\nconst result = ceil(number, precision);\n```\n\n## 用法\n\n### `ceil(number, precision?)`\n\n当您想要将数字向上舍入到特定小数位数时，请使用 `ceil`。\n\n```typescript\nimport { ceil } from 'es-toolkit/compat';\n\n// 基本向上舍入（到整数）\nceil(4.006);\n// Returns: 5\n\nceil(4.1);\n// Returns: 5\n\n// 向上舍入到小数点后两位\nceil(6.004, 2);\n// Returns: 6.01\n\nceil(6.001, 2);\n// Returns: 6.01\n\n// 向上舍入到负数位（十位数）\nceil(6040, -2);\n// Returns: 6100\n\nceil(1234, -2);\n// Returns: 1300\n\n// 负数也向上舍入\nceil(-4.1);\n// Returns: -4\n\nceil(-6.004, 2);\n// Returns: -6.00\n```\n\n#### 参数\n\n- `number` (`number`): 要向上舍入的数字。\n- `precision` (`number`, 可选): 要向上舍入的小数位数。默认值为 `0`。\n\n#### 返回值\n\n(`number`): 返回向上舍入到指定小数位数的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/clamp.md",
    "content": "# clamp (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [clamp](../../math/clamp.md)\n\n这个 `clamp` 函数由于 NaN 验证和处理会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [clamp](../../math/clamp.md)。\n\n:::\n\n将数字限制在指定范围内。\n\n```typescript\nconst clamped = clamp(number, lower, upper);\n```\n\n## 用法\n\n### `clamp(number, lower, upper)`\n\n当您想要将数字限制在指定的最小值和最大值之间时，请使用 `clamp`。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 基本用法\nclamp(3, 2, 4);\n// Returns: 3 (在范围内)\n\nclamp(0, 5, 10);\n// Returns: 5 (限制为最小值)\n\nclamp(15, 5, 10);\n// Returns: 10 (限制为最大值)\n\n// 处理负数\nclamp(-5, -10, -1);\n// Returns: -5\n\nclamp(-15, -10, -1);\n// Returns: -10 (限制为最小值)\n```\n\n### `clamp(number, upper)`\n\n如果只提供一个参数，该值将用作最大值。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\n// 只指定最大值\nclamp(5, 3);\n// Returns: 3 (限制为最大值)\n\nclamp(2, 3);\n// Returns: 2 (在范围内)\n\nclamp(1, 5);\n// Returns: 1\n```\n\nNaN 值被处理为 0。\n\n```typescript\nimport { clamp } from 'es-toolkit/compat';\n\nclamp(5, NaN, 10);\n// Returns: 5 (NaN 被处理为 0，范围是 0~10)\n\nclamp(5, 2, NaN);\n// Returns: 2 (NaN 被处理为 0，范围是 0~2)\n```\n\n#### 参数\n\n- `number` (`number`): 要限制的数字。\n- `lower` (`number`): 最小值。如果只有第二个参数，则为最大值。\n- `upper` (`number`, 可选): 最大值。\n\n#### 返回值\n\n(`number`): 返回限制在指定范围内的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/divide.md",
    "content": "# divide (Lodash 兼容性)\n\n::: warning 请使用 `/` 运算符\n\n这个 `divide` 函数由于额外的函数调用会运行较慢。\n\n请使用更快、更简单的 `/` 运算符。\n\n:::\n\n将两个数字相除。\n\n```typescript\nconst result = divide(value, other);\n```\n\n## 用法\n\n### `divide(value, other)`\n\n当您想要将两个数字相除时，请使用 `divide`。\n\n```typescript\nimport { divide } from 'es-toolkit/compat';\n\n// 基本除法\ndivide(6, 3);\n// Returns: 2\n\ndivide(10, 5);\n// Returns: 2\n\n// 小数除法\ndivide(7, 2);\n// Returns: 3.5\n\ndivide(1, 3);\n// Returns: 0.3333333333333333\n\n// 除以零\ndivide(6, 0);\n// Returns: Infinity\n\ndivide(-6, 0);\n// Returns: -Infinity\n\n// NaN 处理\ndivide(2, NaN);\n// Returns: NaN\n\ndivide(NaN, 3);\n// Returns: NaN\n\ndivide(NaN, NaN);\n// Returns: NaN\n```\n\n#### 参数\n\n- `value` (`number`): 除法的被除数（被除的数）。\n- `other` (`number`): 除法的除数（除的数）。\n\n#### 返回值\n\n(`number`): 返回第一个数字除以第二个数字的结果。如果其中任何一个是 NaN，则返回 NaN。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/floor.md",
    "content": "# floor (Lodash 兼容性)\n\n::: warning 请使用 `Math.floor`\n\n这个 `floor` 函数由于小数位计算和内部函数调用会运行较慢。\n\n请使用更快、更现代的 `Math.floor`。\n\n:::\n\n将数字向下舍入到指定的小数位数。\n\n```typescript\nconst result = floor(number, precision);\n```\n\n## 用法\n\n### `floor(number, precision?)`\n\n当您想要将数字向下舍入到特定小数位数时，请使用 `floor`。\n\n```typescript\nimport { floor } from 'es-toolkit/compat';\n\n// 基本向下舍入（到整数）\nfloor(4.9);\n// Returns: 4\n\nfloor(4.1);\n// Returns: 4\n\n// 向下舍入到小数点后两位\nfloor(6.994, 2);\n// Returns: 6.99\n\nfloor(6.999, 2);\n// Returns: 6.99\n\n// 向下舍入到负数位（十位数）\nfloor(6040, -2);\n// Returns: 6000\n\nfloor(1234, -2);\n// Returns: 1200\n\n// 负数也向下舍入\nfloor(-4.1);\n// Returns: -5\n\nfloor(-6.994, 2);\n// Returns: -7.00\n```\n\n#### 参数\n\n- `number` (`number`): 要向下舍入的数字。\n- `precision` (`number`, 可选): 要向下舍入的小数位数。默认值为 `0`。\n\n#### 返回值\n\n(`number`): 返回向下舍入到指定小数位数的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/inRange.md",
    "content": "# inRange (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [inRange](../../math/inRange.md)\n\n这个 `inRange` 函数由于复杂的类型转换和 null/undefined 处理会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [inRange](../../math/inRange.md)。\n\n:::\n\n检查数字是否在指定范围内。\n\n```typescript\nconst result = inRange(value, minimum, maximum);\n```\n\n## 用法\n\n### `inRange(value, minimum, maximum?)`\n\n当您想要检查数字是否在特定范围内时，请使用 `inRange`。最小值包含在内，最大值不包含在内。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 基本用法\ninRange(3, 2, 4);\n// Returns: true (2 ≤ 3 < 4)\n\ninRange(1, 2, 5);\n// Returns: false (1 < 2)\n\ninRange(5, 2, 5);\n// Returns: false (5 不包含在内)\n\n// 范围边界值\ninRange(2, 2, 4);\n// Returns: true (最小值包含在内)\n\ninRange(4, 2, 4);\n// Returns: false (最大值不包含在内)\n```\n\n### `inRange(value, maximum)`\n\n如果只提供两个参数，则处理为从 0 到 maximum 的范围。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5);\n// Returns: true (0 ≤ 3 < 5)\n\ninRange(-1, 5);\n// Returns: false (-1 < 0)\n\ninRange(0, 5);\n// Returns: true (0 ≤ 0 < 5)\n\ninRange(5, 5);\n// Returns: false (5 不包含在内)\n```\n\n如果最小值大于最大值，会自动交换。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\ninRange(3, 5, 2);\n// Returns: true (范围变为 2~5，2 ≤ 3 < 5)\n\ninRange(1, 5, 2);\n// Returns: false (1 < 2)\n```\n\n无效值会被适当转换。\n\n```typescript\nimport { inRange } from 'es-toolkit/compat';\n\n// 字符串数字转换\ninRange(3, '2', '4');\n// Returns: true\n\n// falsy 值被处理为 0\ninRange(1, null, 5);\n// Returns: true (null 被处理为 0，范围为 0~5)\n\ninRange(3, false, 5);\n// Returns: true (false 被处理为 0)\n```\n\n#### 参数\n\n- `value` (`number`): 要检查是否在范围内的数字。\n- `minimum` (`number`): 范围的最小值（包含）。如果没有 `maximum`，此值变为最大值。\n- `maximum` (`number`, 可选): 范围的最大值（不包含）。\n\n#### 返回值\n\n(`boolean`): 如果值在指定范围内返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/max.md",
    "content": "# max (Lodash 兼容性)\n\n::: warning 请使用 `Math.max`\n\n这个 `max` 函数由于额外的函数调用和 `null`/`undefined` 处理会运行较慢。\n\n请使用更快、更现代的 `Math.max(...array)`。\n\n:::\n\n在数组中查找最大值。\n\n```typescript\nconst result = max(items);\n```\n\n## 用法\n\n### `max(items?)`\n\n当您想要在数组中查找最大值时，请使用 `max`。\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\n// 数字数组中的最大值\nmax([1, 2, 3]);\n// Returns: 3\n\nmax([10, 5, 8, 20]);\n// Returns: 20\n\n// 字符串数组中的最大值（按字典序）\nmax(['a', 'b', 'c']);\n// Returns: 'c'\n\nmax(['apple', 'banana', 'cherry']);\n// Returns: 'cherry'\n\n// 空数组或 null/undefined\nmax([]);\n// Returns: undefined\n\nmax(null);\n// Returns: undefined\n\nmax(undefined);\n// Returns: undefined\n```\n\n负数也能正确处理。\n\n```typescript\nimport { max } from 'es-toolkit/compat';\n\nmax([-1, -5, -3]);\n// Returns: -1\n\nmax([0, -2, 5, -10]);\n// Returns: 5\n```\n\n#### 参数\n\n- `items` (`ArrayLike<T> | null | undefined`, 可选): 要查找最大值的数组。\n\n#### 返回值\n\n(`T | undefined`): 返回数组中的最大值。如果数组为空或为 null/undefined，则返回 undefined。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/maxBy.md",
    "content": "# maxBy (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [maxBy](../../array/maxBy.md)\n\n这个 `maxBy` 函数由于 iteratee 函数处理和类型转换会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [maxBy](../../array/maxBy.md)。\n\n:::\n\n在符合条件的值中查找最大值元素。\n\n```typescript\nconst maxItem = maxBy(array, iteratee);\n```\n\n## 用法\n\n### `maxBy(array, iteratee)`\n\n在数组中查找函数计算值最大的元素。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\n// 对象数组中特定属性最大的元素\nconst people = [\n  { name: '张三', age: 25 },\n  { name: '李四', age: 30 },\n  { name: '王五', age: 35 },\n];\n\nmaxBy(people, person => person.age);\n// Returns: { name: '王五', age: 35 }\n\n// 也可以使用属性名\nmaxBy(people, 'age');\n// Returns: { name: '王五', age: 35 }\n```\n\n用函数转换值来查找最大值。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmaxBy(items, x => x.a);\n// Returns: { a: 3 }\n\nconst numbers = [-1, -2, -3];\nmaxBy(numbers, x => Math.abs(x));\n// Returns: -3 (绝对值最大的元素)\n```\n\n通过数组元素访问。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nmaxBy(arrays, 0); // 第一个元素最大的数组\n// Returns: [3, 4]\n\nmaxBy(arrays, 1); // 第二个元素最大的数组\n// Returns: [0, 5]\n```\n\n查找对象特定属性和值匹配的情况。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '张三', age: 25, active: true },\n  { name: '李四', age: 30, active: false },\n  { name: '王五', age: 35, active: true },\n];\n\n// active 为 true 的元素中的第一个\nmaxBy(users, ['active', true]);\n// Returns: { name: '张三', age: 25, active: true }\n\n// 用对象指定条件\nmaxBy(users, { active: true });\n// Returns: { name: '张三', age: 25, active: true }\n```\n\n空数组返回 undefined。\n\n```typescript\nimport { maxBy } from 'es-toolkit/compat';\n\nmaxBy([], x => x.a);\n// Returns: undefined\n\nmaxBy(null);\n// Returns: undefined\n\nmaxBy(undefined);\n// Returns: undefined\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要搜索的数组。\n- `iteratee` (`ValueIteratee<T>`, 可选): 应用于每个元素的函数、属性名或条件。\n\n#### 返回值\n\n(`T | undefined`): 返回符合条件的值最大的元素。如果是空数组则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/mean.md",
    "content": "# mean (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [mean](../../math/mean.md)\n\n这个 `mean` 函数由于类型转换和 null/undefined 处理会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [mean](../../math/mean.md)。\n\n:::\n\n计算数组的平均值。\n\n```typescript\nconst average = mean(array);\n```\n\n## 用法\n\n### `mean(array)`\n\n计算数字数组的平均值。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\n// 数字数组\nmean([1, 2, 3, 4, 5]);\n// Returns: 3\n\nmean([10, 20, 30]);\n// Returns: 20\n\nmean([1.5, 2.5, 3.5]);\n// Returns: 2.5\n```\n\n空数组返回 NaN。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([]);\n// Returns: NaN\n\nmean(null);\n// Returns: NaN\n\nmean(undefined);\n// Returns: NaN\n```\n\n无效值会被视作 0 并计算。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean([1, undefined, 2, null, 3]);\n// Returns: 1.2 (1 + 2 + 3) / 5 = 1.2\n```\n\n字符串将会被拼接。\n\n```typescript\nimport { mean } from 'es-toolkit/compat';\n\nmean(['1', '2', '3']);\n// Returns: 41 (123 / 3 = 41)\n```\n\n#### 参数\n\n- `array` (`ArrayLike<any> | null | undefined`): 包含要计算平均值的数字数组。\n\n#### 返回值\n\n(`number`): 返回数组的平均值。如果是空数组则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/meanBy.md",
    "content": "# meanBy (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [meanBy](../../math/meanBy.md)\n\n这个 `meanBy` 函数由于 iteratee 函数处理和类型转换会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [meanBy](../../math/meanBy.md)。\n\n:::\n\n计算符合条件的值的平均值。\n\n```typescript\nconst average = meanBy(array, iteratee);\n```\n\n## 用法\n\n### `meanBy(array, iteratee)`\n\n计算数组中每个元素应用函数后结果的平均值。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\n// 对象数组中特定属性的平均值\nconst people = [\n  { name: '张三', age: 25 },\n  { name: '李四', age: 30 },\n  { name: '王五', age: 35 },\n];\n\nmeanBy(people, person => person.age);\n// Returns: 30\n\n// 也可以使用属性名\nmeanBy(people, 'age');\n// Returns: 30\n```\n\n用函数转换值来计算平均值。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst numbers = [1.5, 2.7, 3.2, 4.8];\nmeanBy(numbers, x => Math.floor(x));\n// Returns: 2.5 (1 + 2 + 3 + 4) / 4\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nmeanBy(items, x => x.a);\n// Returns: 2\n```\n\n通过数组元素访问。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst arrays = [[2], [3], [1]];\nmeanBy(arrays, 0); // 第一个元素的平均值\n// Returns: 2\n```\n\n只计算对象特定属性和值匹配的情况。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '张三', age: 25, active: true },\n  { name: '李四', age: 30, active: false },\n  { name: '王五', age: 35, active: true },\n];\n\n// 只有 active 为 true 的人\nmeanBy(users, { active: true });\n// Returns: 0.6666666 (active 为 true 的人占总人数的比例)\n```\n\n空数组返回 NaN。\n\n```typescript\nimport { meanBy } from 'es-toolkit/compat';\n\nmeanBy([], x => x.a);\n// Returns: NaN\n\nmeanBy(null);\n// Returns: NaN\n\nmeanBy(undefined);\n// Returns: NaN\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要处理的数组。\n- `iteratee` (`ValueIteratee<T>`, 可选): 应用于每个元素的函数、属性名或条件。\n\n#### 返回值\n\n(`number`): 返回符合条件的值的平均值。如果是空数组则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/min.md",
    "content": "# min (Lodash 兼容性)\n\n::: warning 请使用 `Math.min`\n\n这个 `min` 函数由于额外的函数调用和 null/undefined 处理会运行较慢。\n\n请使用更快、更现代的 `Math.min(...array)`。\n\n:::\n\n在数组中查找最小值。\n\n```typescript\nconst result = min(items);\n```\n\n## 用法\n\n### `min(items?)`\n\n当您想要在数组中查找最小值时，请使用 `min`。\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\n// 数字数组中的最小值\nmin([3, 1, 4, 1, 5, 9]);\n// Returns: 1\n\nmin([10, 5, 8, 20]);\n// Returns: 5\n\n// 字符串数组中的最小值（按字典序）\nmin(['c', 'a', 'b']);\n// Returns: 'a'\n\nmin(['cherry', 'apple', 'banana']);\n// Returns: 'apple'\n\n// 空数组或 null/undefined\nmin([]);\n// Returns: undefined\n\nmin(null);\n// Returns: undefined\n\nmin(undefined);\n// Returns: undefined\n```\n\n负数也能正确处理。\n\n```typescript\nimport { min } from 'es-toolkit/compat';\n\nmin([0, -3, 2, 8, 7]);\n// Returns: -3\n\nmin([-1, -5, -3]);\n// Returns: -5\n```\n\n#### 参数\n\n- `items` (`ArrayLike<T> | null | undefined`, 可选): 要查找最小值的数组。\n\n#### 返回值\n\n(`T | undefined`): 返回数组中的最小值。如果数组为空或为 null/undefined，则返回 undefined。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/minBy.md",
    "content": "# minBy（Lodash 兼容性）\n\n::: warning 请使用 es-toolkit 的 [minBy](../../array/minBy.md)\n\n这个 `minBy` 函数由于 iteratee 函数处理和类型转换会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [minBy](../../array/minBy.md)。\n\n:::\n\n在满足条件的值中找到最小值元素。\n\n```typescript\nconst minItem = minBy(array, iteratee);\n```\n\n## 用法\n\n### `minBy(array, iteratee)`\n\n在数组中找到通过函数计算后值最小的元素。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\n// 对象数组中特定属性最小的元素\nconst people = [\n  { name: '张三', age: 25 },\n  { name: '李四', age: 30 },\n  { name: '王五', age: 35 },\n];\n\nminBy(people, person => person.age);\n// Returns: { name: '张三', age: 25 }\n\n// 也可以使用属性名\nminBy(people, 'age');\n// Returns: { name: '张三', age: 25 }\n```\n\n通过函数转换值来找到最小值。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst items = [{ a: 1 }, { a: 2 }, { a: 3 }];\nminBy(items, x => x.a);\n// Returns: { a: 1 }\n\nconst numbers = [-1, -2, -3];\nminBy(numbers, x => Math.abs(x));\n// Returns: -1 (绝对值最小的元素)\n```\n\n通过数组元素访问。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst arrays = [\n  [1, 2],\n  [3, 4],\n  [0, 5],\n];\nminBy(arrays, 0); // 第一个元素最小的数组\n// Returns: [0, 5]\n\nminBy(arrays, 1); // 第二个元素最小的数组\n// Returns: [1, 2]\n```\n\n查找对象的特定属性和值匹配的情况。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nconst users = [\n  { name: '张三', age: 25, active: true },\n  { name: '李四', age: 30, active: false },\n  { name: '王五', age: 35, active: true },\n];\n\n// 在 active 为 true 的元素中找到不是第一个的元素\nminBy(users, ['active', true]);\n// Returns: { name: '李四', age: 30, active: false }\n\n// 使用对象指定条件\nminBy(users, { active: true });\n// Returns: { name: '李四', age: 30, active: false }\n```\n\n空数组返回 undefined。\n\n```typescript\nimport { minBy } from 'es-toolkit/compat';\n\nminBy([], x => x.a);\n// Returns: undefined\n\nminBy(null);\n// Returns: undefined\n\nminBy(undefined);\n// Returns: undefined\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要搜索的数组。\n- `iteratee` (`ValueIteratee<T>`, 可选): 应用于每个元素的函数、属性名或条件。\n\n#### 返回值\n\n(`T | undefined`): 返回满足条件的值最小的元素。如果是空数组则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/multiply.md",
    "content": "# multiply (Lodash 兼容性)\n\n::: warning 请使用 `*` 运算符\n\n这个 `multiply` 函数由于额外的函数调用会运行较慢。\n\n请使用更快、更简单的 `*` 运算符。\n\n:::\n\n将两个数字相乘。\n\n```typescript\nconst result = multiply(value, other);\n```\n\n## 用法\n\n### `multiply(value, other)`\n\n当您想要将两个数字相乘时，请使用 `multiply`。\n\n```typescript\nimport { multiply } from 'es-toolkit/compat';\n\n// 基本乘法\nmultiply(2, 3);\n// Returns: 6\n\nmultiply(4, 5);\n// Returns: 20\n\n// 负数处理\nmultiply(2, -3);\n// Returns: -6\n\nmultiply(-4, -5);\n// Returns: 20\n\n// 小数处理\nmultiply(2.5, 4);\n// Returns: 10\n\n// NaN 处理\nmultiply(NaN, 3);\n// Returns: NaN\n\nmultiply(2, NaN);\n// Returns: NaN\n\nmultiply(NaN, NaN);\n// Returns: NaN\n```\n\n#### 参数\n\n- `value` (`number`): 乘法的第一个数字。\n- `other` (`number`): 乘法的第二个数字。\n\n#### 返回值\n\n(`number`): 返回两个数字相乘的结果。如果其中任何一个是 NaN，则返回 NaN。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/parseInt.md",
    "content": "# parseInt (Lodash 兼容性)\n\n::: warning 请使用 `parseInt`\n\n这个 `parseInt` 函数由于额外的函数调用会运行较慢。\n\n请使用更快、更现代的原生 `parseInt`。\n\n:::\n\n将字符串转换为整数。\n\n```typescript\nconst result = parseInt(string, radix);\n```\n\n## 用法\n\n### `parseInt(string, radix?)`\n\n当您想要将字符串转换为整数时，请使用 `parseInt`。可以指定基数来解析不同进制。\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\n// 基本十进制解析\nparseInt('123');\n// Returns: 123\n\nparseInt('08');\n// Returns: 8\n\n// 十六进制自动识别\nparseInt('0x20');\n// Returns: 32\n\n// 明确指定基数\nparseInt('08', 10);\n// Returns: 8\n\nparseInt('0x20', 16);\n// Returns: 32\n\nparseInt('1010', 2);\n// Returns: 10\n\n// 在数组中使用\n['6', '08', '10'].map(parseInt);\n// Returns: [6, 8, 10]\n```\n\n格式错误的字符串返回 NaN。\n\n```typescript\nimport { parseInt } from 'es-toolkit/compat';\n\nparseInt('abc');\n// Returns: NaN\n\nparseInt('');\n// Returns: NaN\n\nparseInt('123abc');\n// Returns: 123 (只解析前面部分)\n```\n\n#### 参数\n\n- `string` (`string`): 要转换为整数的字符串。\n- `radix` (`number`, 可选): 转换时使用的基数。默认值为 `0`，此时根据字符串格式自动确定。\n\n#### 返回值\n\n(`number`): 返回转换后的整数。如果无法转换则返回 NaN。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/random.md",
    "content": "# random（Lodash 兼容性）\n\n::: warning 请使用 `Math.random()`\n\n这个 `random` 函数由于复杂的参数处理和类型转换而运行缓慢。\n\n请使用更快的 `Math.random()`。\n\n:::\n\n在范围内生成随机数字。\n\n```typescript\nconst result = random(min, max, floating);\n```\n\n## 用法\n\n### `random(floating?)`\n\n生成 0 和 1 之间的随机数字。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom();\n// Returns: 0.123456789 (0~1 之间的小数)\n\nrandom(true);\n// Returns: 0.987654321 (返回小数)\n\nrandom(false);\n// Returns: 0 或 1 (返回整数)\n```\n\n### `random(max, floating?)`\n\n生成从 0 到 max 的随机数字。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5);\n// Returns: 3.456789 (0~5 之间的小数)\n\nrandom(10, true);\n// Returns: 7.123456 (0~10 之间的小数)\n\nrandom(3, false);\n// Returns: 2 (0~3 之间的整数)\n```\n\n### `random(min, max, floating?)`\n\n生成从 min 到 max 的随机数字。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(1, 5);\n// Returns: 3.456789 (1~5 之间的小数)\n\nrandom(0, 10, true);\n// Returns: 6.789012 (0~10 之间的小数)\n\nrandom(1, 6, false);\n// Returns: 4 (1~6 之间的整数)\n```\n\n范围颠倒时会自动交换。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nrandom(5, 1);\n// Returns: 3.456789 (范围变为 1~5)\n```\n\n使用 guard 对象处理特殊情况。\n\n```typescript\nimport { random } from 'es-toolkit/compat';\n\nconst guard = { 5: 5 };\nrandom(5, 5, guard);\n// Returns: 2.345678 (0~5 之间的小数)\n```\n\n#### 参数\n\n- `floating` (`boolean`, 可选): 决定是否返回小数。默认值为 `true`。\n- `max` (`number`): 范围的最大值（不包含）。\n- `min` (`number`): 范围的最小值（包含）。\n- `index` (`string | number`): 在 guard 对象中要检查的键。\n- `guard` (`object`): 验证参数的 guard 对象。\n\n#### 返回值\n\n(`number`): 返回指定范围内的随机数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/range.md",
    "content": "# range（Lodash 兼容性）\n\n::: warning 请使用 es-toolkit 的 [range](../../math/range.md)\n\n这个 `range` 函数由于复杂的参数处理和类型转换而运行缓慢。\n\n请使用更快更现代的 `es-toolkit` 的 [range](../../math/range.md)。\n\n:::\n\n创建数字范围数组。\n\n```typescript\nconst numbers = range(start, end, step);\n```\n\n## 用法\n\n### `range(end)`\n\n创建从 0 到 end 以 1 递增的数组。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(4);\n// Returns: [0, 1, 2, 3]\n\nrange(0);\n// Returns: []\n\nrange(-4);\n// Returns: [0, -1, -2, -3]\n```\n\n### `range(start, end)`\n\n创建从 start 到 end 以 1 递增的数组。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(1, 5);\n// Returns: [1, 2, 3, 4]\n\nrange(5, 1);\n// Returns: [5, 4, 3, 2] (自动以 -1 递减)\n\nrange(-2, 3);\n// Returns: [-2, -1, 0, 1, 2]\n```\n\n### `range(start, end, step)`\n\n创建从 start 到 end 以 step 递增的数组。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 20, 5);\n// Returns: [0, 5, 10, 15]\n\nrange(0, -4, -1);\n// Returns: [0, -1, -2, -3]\n\nrange(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n小数 step 也可以使用。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\nrange(0, 1, 0.2);\n// Returns: [0, 0.2, 0.4, 0.6, 0.8]\n\nrange(1, 0, -0.25);\n// Returns: [1, 0.75, 0.5, 0.25]\n```\n\n用作 iteratee 时通过 guard 对象处理。\n\n```typescript\nimport { range } from 'es-toolkit/compat';\n\n[1, 2, 3].map(range);\n// Returns: [[0], [0, 1], [0, 1, 2]]\n```\n\n#### 参数\n\n- `start` (`number`): 范围的起始值（包含）。如果没有 `end`，此值将成为 end。\n- `end` (`number`, 可选): 范围的结束值（不包含）。\n- `step` (`number`, 可选): 递增幅度。默认值为 1 或 -1。\n\n#### 返回值\n\n(`number[]`): 返回指定范围的数字数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/rangeRight.md",
    "content": "# rangeRight（Lodash 兼容性）\n\n::: warning 请使用 es-toolkit 的 [rangeRight](../../math/rangeRight.md)\n\n这个 `rangeRight` 函数由于复杂的参数处理和类型转换而运行缓慢。\n\n请使用更快更现代的 `es-toolkit` 的 [rangeRight](../../math/rangeRight.md)。\n\n:::\n\n创建数字范围数组（逆序）。\n\n```typescript\nconst numbers = rangeRight(start, end, step);\n```\n\n## 用法\n\n### `rangeRight(end)`\n\n创建从 0 到 end 以 1 递增后逆序的数组。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(4);\n// Returns: [3, 2, 1, 0]\n\nrangeRight(0);\n// Returns: []\n\nrangeRight(-4);\n// Returns: [-3, -2, -1, 0]\n```\n\n### `rangeRight(start, end)`\n\n创建从 start 到 end 以 1 递增后逆序的数组。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(1, 5);\n// Returns: [4, 3, 2, 1]\n\nrangeRight(5, 1);\n// Returns: [2, 3, 4, 5] (自动以 -1 递减后逆序)\n\nrangeRight(-2, 3);\n// Returns: [2, 1, 0, -1, -2]\n```\n\n### `rangeRight(start, end, step)`\n\n创建从 start 到 end 以 step 递增后逆序的数组。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 8, 2);\n// Returns: [6, 4, 2, 0]\n\nrangeRight(0, -4, -1);\n// Returns: [-3, -2, -1, 0]\n\nrangeRight(1, 4, 0);\n// Returns: [1, 1, 1]\n```\n\n小数 step 也可以使用。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\nrangeRight(0, 1, 0.2);\n// Returns: [0.8, 0.6, 0.4, 0.2, 0]\n\nrangeRight(1, 0, -0.25);\n// Returns: [0.25, 0.5, 0.75, 1]\n```\n\n用作 iteratee 时通过 guard 对象处理。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/compat';\n\n[1, 2, 3].map(rangeRight);\n// Returns: [[0], [1, 0], [2, 1, 0]]\n```\n\n#### 参数\n\n- `start` (`number`): 范围的起始值（包含）。如果没有 `end`，此值将成为 end。\n- `end` (`number`, 可选): 范围的结束值（不包含）。\n- `step` (`number`, 可选): 递增幅度。默认值为 1 或 -1。\n\n#### 返回值\n\n(`number[]`): 返回指定范围的数字数组（逆序）。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/round.md",
    "content": "# round (Lodash 兼容性)\n\n::: warning 请使用 `Math.round()`\n\n这个 `round` 函数由于精度处理会运行较慢。\n\n请使用 `Math.round()` 或按所需的小数位计算。\n\n:::\n\n将数字四舍五入。\n\n```typescript\nconst rounded = round(number, precision);\n```\n\n## 用法\n\n### `round(number, precision?)`\n\n将数字四舍五入到指定的小数位数。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 基本四舍五入（小数点后 0 位）\nround(4.006);\n// Returns: 4\n\nround(4.6);\n// Returns: 5\n\n// 指定小数位\nround(4.006, 2);\n// Returns: 4.01\n\nround(4.123456, 3);\n// Returns: 4.123\n```\n\n负数精度也可以。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\n// 十位数四舍五入\nround(4060, -2);\n// Returns: 4100\n\nround(1234, -1);\n// Returns: 1230\n\nround(1234, -3);\n// Returns: 1000\n```\n\n负数也能处理。\n\n```typescript\nimport { round } from 'es-toolkit/compat';\n\nround(-4.006);\n// Returns: -4\n\nround(-4.006, 2);\n// Returns: -4.01\n\nround(-1234, -2);\n// Returns: -1200\n```\n\n#### 参数\n\n- `number` (`number`): 要四舍五入的数字。\n- `precision` (`number`, 可选): 要四舍五入的小数位数。默认值为 `0`。\n\n#### 返回值\n\n(`number`): 返回四舍五入后的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/subtract.md",
    "content": "# subtract (Lodash 兼容性)\n\n::: warning 请使用 `-` 运算符\n\n这个 `subtract` 函数由于额外的函数调用会运行较慢。\n\n请使用更快、更简单的 `-` 运算符。\n\n:::\n\n将两个数字相减。\n\n```typescript\nconst result = subtract(value, other);\n```\n\n## 用法\n\n### `subtract(value, other)`\n\n当您想要将两个数字相减时，请使用 `subtract`。\n\n```typescript\nimport { subtract } from 'es-toolkit/compat';\n\n// 基本减法\nsubtract(6, 4);\n// Returns: 2\n\nsubtract(10, 3);\n// Returns: 7\n\n// 负数处理\nsubtract(-6, 4);\n// Returns: -10\n\nsubtract(6, -4);\n// Returns: 10\n\n// NaN 处理\nsubtract(NaN, 4);\n// Returns: NaN\n\nsubtract(6, NaN);\n// Returns: NaN\n\nsubtract(NaN, NaN);\n// Returns: NaN\n```\n\n#### 参数\n\n- `value` (`number`): 减法的基准第一个数字。\n- `other` (`number`): 要减去的第二个数字。\n\n#### 返回值\n\n(`number`): 返回第一个数字减去第二个数字的结果。如果其中任何一个是 NaN，则返回 NaN。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/sum.md",
    "content": "# sum (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [sum](../../math/sum.md)\n\n这个 `sum` 函数由于类型转换和 null/undefined 处理会运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [sum](../../math/sum.md)。\n\n:::\n\n将数组的所有值相加。\n\n```typescript\nconst total = sum(array);\n```\n\n## 用法\n\n### `sum(array)`\n\n将数组中的所有数字相加得到总和。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// 数字数组\nsum([1, 2, 3]);\n// Returns: 6\n\nsum([1.5, 2.5, 3]);\n// Returns: 7\n\n// 空数组\nsum([]);\n// Returns: 0\n```\n\nBigInt 和字符串也能处理。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\n// BigInt 数组\nsum([1n, 2n, 3n]);\n// Returns: 6n\n\n// 字符串数组（连接）\nsum(['1', '2']);\n// Returns: '12'\n```\n\n无效值会被忽略。\n\n```typescript\nimport { sum } from 'es-toolkit/compat';\n\nsum([1, undefined, 2]);\n// Returns: 3 (忽略 undefined)\n\nsum(null);\n// Returns: 0\n\nsum(undefined);\n// Returns: 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<any> | null | undefined`): 包含要相加值的数组。\n\n#### 返回值\n\n(`number`): 返回所有值相加的总和。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/math/sumBy.md",
    "content": "# sumBy（Lodash 兼容性）\n\n::: warning 请使用 es-toolkit 的 [sumBy](../../math/sumBy.md)\n\n这个 `sumBy` 函数由于 iteratee 函数处理和类型转换而运行缓慢。\n\n请使用更快更现代的 `es-toolkit` 的 [sumBy](../../math/sumBy.md)。\n\n:::\n\n将满足条件的值相加。\n\n```typescript\nconst total = sumBy(array, iteratee);\n```\n\n## 用法\n\n### `sumBy(array, iteratee)`\n\n对数组的每个元素应用函数后将结果相加。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\n// 数字数组\nsumBy([1, 2, 3], value => value);\n// Returns: 6\n\nsumBy([1.5, 2.5, 3.5], value => Math.floor(value));\n// Returns: 6 (1 + 2 + 3)\n\n// 空数组\nsumBy([], value => value);\n// Returns: 0\n```\n\n### `sumBy(array)`\n\n不提供函数时直接将数组值相加。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, 2, 3]);\n// Returns: 6\n\nsumBy([1n, 2n, 3n]);\n// Returns: 6n\n```\n\n将对象数组中的特定属性相加。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst people = [\n  { name: '张三', age: 25 },\n  { name: '李四', age: 30 },\n  { name: '王五', age: 35 },\n];\n\nsumBy(people, person => person.age);\n// Returns: 90\n\n// 也可以使用属性名\nsumBy(people, 'age');\n// Returns: 90\n```\n\n字符串也会被连接。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nconst items = [{ a: '1' }, { a: '2' }];\nsumBy(items, obj => obj.a);\n// Returns: '12'\n```\n\n无效值会被忽略。\n\n```typescript\nimport { sumBy } from 'es-toolkit/compat';\n\nsumBy([1, undefined, 2], value => value);\n// Returns: 3 (忽略 undefined)\n\nsumBy(null);\n// Returns: 0\n\nsumBy(undefined);\n// Returns: 0\n```\n\n#### 参数\n\n- `array` (`ArrayLike<T> | null | undefined`): 要处理的数组。\n- `iteratee` (`((value: T) => number) | string`, 可选): 应用于每个元素的函数或属性名。\n\n#### 返回值\n\n(`number`): 返回满足条件的值的总和。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/assign.md",
    "content": "# assign (Lodash 兼容性)\n\n::: warning 请使用 `Object.assign`\n\n这个 `assign` 函数由于需要检查值是否相等的额外逻辑而运行缓慢。\n\n请改用更快、更现代的 `Object.assign`。\n\n:::\n\n将源对象的属性分配给目标对象。\n\n```typescript\nconst result = assign(target, ...sources);\n```\n\n## 用法\n\n### `assign(target, ...sources)`\n\n当您想将一个或多个源对象的属性复制到目标对象时,请使用 `assign`。如果有相同的键,后面的源的值将覆盖前面的值。\n\n```typescript\nimport { assign } from 'es-toolkit/compat';\n\n// 基本用法\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assign(target, source);\n// 结果: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (目标对象被修改)\n\n// 合并多个源对象\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nconst source3 = { d: 4 };\nassign(target2, source1, source2, source3);\n// 结果: { a: 1, b: 2, c: 3, d: 4 }\n\n// 覆盖属性\nconst target3 = { x: 1, y: 2 };\nconst source4 = { y: 3, z: 4 };\nconst source5 = { y: 5 };\nassign(target3, source4, source5);\n// 结果: { x: 1, y: 5, z: 4 } (y 被最后一个值覆盖)\n```\n\n此函数仅复制对象的自有属性,不复制继承的属性。如果值相同,它还会进行优化,不会覆盖。\n\n#### 参数\n\n- `target` (`any`): 将接收属性的目标对象。\n- `...sources` (`any[]`): 要复制属性的源对象。\n\n#### 返回值\n\n(`any`): 返回修改后的目标对象。目标对象本身被修改并返回。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/assignIn.md",
    "content": "# assignIn (Lodash 兼容性)\n\n::: warning 请使用 `Object.assign`\n\n这个 `assignIn` 函数由于需要复制继承属性的额外处理和值比较逻辑而运行缓慢。\n\n请改用更快、更现代的 `Object.assign`。\n\n:::\n\n将源对象的所有属性(包括继承的属性)分配给目标对象。\n\n```typescript\nconst result = assignIn(target, ...sources);\n```\n\n## 用法\n\n### `assignIn(target, ...sources)`\n\n当您想将源对象的自有属性和继承属性都复制到目标对象时,请使用 `assignIn`。与 `assign` 不同,它包括原型链中的属性。\n\n```typescript\nimport { assignIn } from 'es-toolkit/compat';\n\n// 基本用法\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\nconst result = assignIn(target, source);\n// 结果: { a: 1, b: 3, c: 4 }\nconsole.log(target === result); // true (目标对象被修改)\n\n// 合并多个源对象\nconst target2 = { a: 1 };\nconst source1 = { b: 2 };\nconst source2 = { c: 3 };\nassignIn(target2, source1, source2);\n// 结果: { a: 1, b: 2, c: 3 }\n\n// 也复制继承的属性\nfunction Parent() {}\nParent.prototype.inherited = 'inheritedValue';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = {};\nassignIn(target3, child);\n// 结果: { own: 'ownValue', inherited: 'inheritedValue' }\n\n// 也复制数组的索引属性和length等\nconst arr = [1, 2, 3];\narr.customProp = 'custom';\nconst target4 = {};\nassignIn(target4, arr);\n// 结果: { '0': 1, '1': 2, '2': 3, customProp: 'custom' }\n```\n\n与 `assign` 不同,此函数也复制继承的属性。如果值相同,它还会进行优化,不会覆盖。\n\n#### 参数\n\n- `target` (`any`): 将接收属性的目标对象。\n- `...sources` (`any[]`): 要复制属性的源对象。自有属性和继承属性都会被复制。\n\n#### 返回值\n\n(`any`): 返回修改后的目标对象。目标对象本身被修改并返回。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/assignInWith.md",
    "content": "# assignInWith (Lodash 兼容性)\n\n::: warning 建议实现自定义逻辑\n\n这个 `assignInWith` 函数由于继承属性处理和自定义函数调用而以复杂且缓慢的方式运行。\n\n请改用 `Object.assign` 并直接实现自定义逻辑。\n\n:::\n\n使用自定义函数将源对象的所有属性(包括继承属性)分配给目标对象。\n\n```typescript\nconst result = assignInWith(target, ...sources, customizer);\n```\n\n## 用法\n\n### `assignInWith(target, ...sources, customizer)`\n\n当您想要在包含继承属性的同时自定义属性分配方式时,请使用 `assignInWith`。自定义函数决定每个属性的最终值。\n\n```typescript\nimport { assignInWith } from 'es-toolkit/compat';\n\n// 基本用法 - 仅在undefined时分配\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignInWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 结果: { a: 1, b: 2, c: 3 }\n\n// 合并数组值的自定义函数\nconst target2 = { numbers: [1, 2] };\nconst source2 = { numbers: [3, 4], name: 'test' };\nassignInWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue) && Array.isArray(srcValue)) {\n    return objValue.concat(srcValue);\n  }\n  return srcValue;\n});\n// 结果: { numbers: [1, 2, 3, 4], name: 'test' }\n\n// 也处理继承的属性\nfunction Parent() {}\nParent.prototype.inherited = 'value';\nconst child = Object.create(Parent.prototype);\nchild.own = 'ownValue';\n\nconst target3 = { existing: 'data' };\nassignInWith(target3, child, (objValue, srcValue, key) => {\n  if (objValue === undefined) {\n    return `processed_${srcValue}`;\n  }\n  return objValue;\n});\n// 结果: { existing: 'data', own: 'processed_ownValue', inherited: 'processed_value' }\n```\n\n如果自定义函数返回 `undefined`,则使用默认的分配行为。与 `assignIn` 不同,此函数允许您对每个属性应用自定义逻辑。\n\n#### 参数\n\n- `target` (`any`): 将接收属性的目标对象。\n- `...sources` (`any[]`): 要复制属性的源对象。自有属性和继承属性都会被复制。\n- `customizer` (`function`): 决定要分配的值的函数。格式为 `(objValue, srcValue, key, object, source) => any`。如果返回 `undefined`,则使用默认的分配行为。\n\n#### 返回值\n\n(`any`): 返回修改后的目标对象。目标对象本身被修改并返回。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/assignWith.md",
    "content": "# assignWith (Lodash 兼容性)\n\n::: warning 建议实现自定义逻辑\n\n这个 `assignWith` 函数由于复杂的自定义函数处理而相对较慢。\n\n请改用 `Object.assign` 并直接实现自定义逻辑。\n\n:::\n\n使用自定义函数将源对象的属性分配给目标对象。\n\n```typescript\nconst result = assignWith(target, source1, source2, customizer);\n```\n\n## 用法\n\n### `assignWith(object, ...sources, customizer)`\n\n当您想要自定义属性分配方式时,请使用 `assignWith`。自定义函数决定每个属性的最终值。\n\n```typescript\nimport { assignWith } from 'es-toolkit/compat';\n\n// 基本用法 - 仅在undefined时分配\nconst target = { a: 1, b: undefined };\nconst source = { b: 2, c: 3 };\nconst result = assignWith(target, source, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n\n// 数组合并\nconst target2 = { users: ['alice'] };\nconst source2 = { users: ['bob', 'charlie'] };\nconst result2 = assignWith(target2, source2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// Returns: { users: ['alice', 'bob', 'charlie'] }\n\n// 多个源与自定义函数\nconst target3 = { a: 1 };\nconst result3 = assignWith(target3, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// Returns: { a: 1, b: 2, c: 3 }\n```\n\n#### 参数\n\n- `object` (`any`): 将被分配属性的目标对象。\n- `...sources` (`any[]`): 要复制属性的源对象。\n- `customizer` (`function`): 决定要分配的值的函数。格式为 `(objValue, srcValue, key, object, source) => any`。\n\n#### 返回值\n\n(`any`): 返回由自定义函数决定值的目标对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/at.md",
    "content": "# at (Lodash 兼容性)\n\n::: warning 请使用解构赋值\n\n这个 `at` 函数由于复杂的路径处理和各种参数类型的处理而相对较慢。\n\n请改用解构赋值或直接属性访问。\n\n:::\n\n返回对象中指定路径的值作为数组。\n\n```typescript\nconst result = at(object, ...paths);\n```\n\n## 用法\n\n### `at(object, ...paths)`\n\n当您想要一次从对象中获取多个路径的值时,请使用 `at`。它返回与每个路径对应的值作为数组。\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\n// 基本用法\nconst object = { a: 1, b: 2, c: 3 };\nconst result = at(object, 'a', 'c');\n// Returns: [1, 3]\n\n// 嵌套对象\nconst nested = {\n  a: {\n    b: {\n      c: 4,\n    },\n  },\n  x: [1, 2, 3],\n};\nconst result2 = at(nested, 'a.b.c', 'x[1]');\n// Returns: [4, 2]\n\n// 将路径作为数组传递\nconst paths = ['a', 'c'];\nconst result3 = at(object, paths);\n// Returns: [1, 3]\n\n// 不存在的路径\nconst result4 = at(object, 'nonexistent', 'a');\n// Returns: [undefined, 1]\n```\n\n`null` 或 `undefined` 对象返回 `undefined` 数组。\n\n```typescript\nimport { at } from 'es-toolkit/compat';\n\nat(null, 'a', 'b'); // [undefined, undefined]\nat(undefined, 'a', 'b'); // [undefined, undefined]\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要获取值的对象。\n- `...paths` (`Array<PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>>`): 要获取值的路径。可以作为单独的参数或数组传递。\n\n#### 返回值\n\n(`unknown[]`): 返回与指定路径对应的值数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/clone.md",
    "content": "# clone (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `clone`\n\n这个 `clone` 函数由于处理特殊对象类型的复杂逻辑而相对较慢。\n\n请改用 `es-toolkit` 的更快、更现代的 [clone](../../object/clone.md)。\n\n:::\n\n创建对象的浅拷贝。\n\n```typescript\nconst cloned = clone(value);\n```\n\n## 用法\n\n### `clone(value)`\n\n当您想要创建值的浅拷贝时,请使用 `clone`。它可以复制各种类型的对象和原始值。\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\n// 复制原始值\nconst num = 42;\nconst clonedNum = clone(num);\n// Returns: 42 (相同的值)\n\n// 复制数组\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\n// Returns: [1, 2, 3] (新的数组实例)\n\n// 复制对象\nconst obj = { a: 1, b: 'hello' };\nconst clonedObj = clone(obj);\n// Returns: { a: 1, b: 'hello' } (新的对象实例)\n\n// 复制Date对象\nconst date = new Date('2023-01-01');\nconst clonedDate = clone(date);\n// Returns: new Date('2023-01-01') (新的Date实例)\n\n// 复制正则表达式\nconst regex = /hello/gi;\nregex.lastIndex = 3;\nconst clonedRegex = clone(regex);\n// Returns: /hello/gi with lastIndex = 3\n\n// 复制Map\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nconst clonedMap = clone(map);\n// Returns: new Map([['a', 1], ['b', 2]])\n\n// 复制Set\nconst set = new Set([1, 2, 3]);\nconst clonedSet = clone(set);\n// Returns: new Set([1, 2, 3])\n```\n\n嵌套对象仅进行浅拷贝。\n\n```typescript\nimport { clone } from 'es-toolkit/compat';\n\nconst nested = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst clonedNested = clone(nested);\n\nconsole.log(clonedNested !== nested); // true (不同的对象)\nconsole.log(clonedNested.b === nested.b); // true (嵌套对象具有相同的引用)\n```\n\n#### 参数\n\n- `value` (`T`): 要复制的值。\n\n#### 返回值\n\n(`T`): 返回复制的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/cloneDeep.md",
    "content": "# cloneDeep (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `cloneDeep`\n\n这个 `cloneDeep` 函数由于处理特殊对象类型的复杂逻辑而相对较慢。\n\n请改用 `es-toolkit` 的更快、更现代的 [cloneDeep](../../object/cloneDeep.md)。\n\n:::\n\n创建对象的深拷贝。\n\n```typescript\nconst cloned = cloneDeep(value);\n```\n\n## 用法\n\n### `cloneDeep(value)`\n\n当您想要创建值的深拷贝时,请使用 `cloneDeep`。它将嵌套的对象和数组完全复制为新实例。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\n// 复制原始值\nconst num = 42;\nconst clonedNum = cloneDeep(num);\n// Returns: 42 (相同的值)\n\n// 深拷贝数组\nconst arr = [1, [2, 3], { a: 4 }];\nconst clonedArr = cloneDeep(arr);\nclonedArr[1][0] = 99;\nconsole.log(arr[1][0]); // 2 (原始值未更改)\nconsole.log(clonedArr[1][0]); // 99\n\n// 深拷贝对象\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n    d: {\n      e: 3,\n    },\n  },\n};\nconst clonedObj = cloneDeep(obj);\nclonedObj.b.d.e = 99;\nconsole.log(obj.b.d.e); // 3 (原始值未更改)\nconsole.log(clonedObj.b.d.e); // 99\n\n// 深拷贝Date对象\nconst date = new Date('2023-01-01');\nconst clonedDate = cloneDeep(date);\n// Returns: new Date('2023-01-01') (新的Date实例)\n\n// 复杂的嵌套结构\nconst complex = {\n  arr: [1, { nested: true }],\n  map: new Map([['key', { value: 1 }]]),\n  set: new Set([{ item: 1 }]),\n  date: new Date(),\n};\nconst clonedComplex = cloneDeep(complex);\n// 所有嵌套对象都作为完全新的实例被复制\n```\n\n循环引用也得到正确处理。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nobj.self = obj; // 循环引用\n\nconst cloned = cloneDeep(obj);\nconsole.log(cloned !== obj); // true\nconsole.log(cloned.self === cloned); // true (保留循环引用)\n```\n\n#### 参数\n\n- `value` (`T`): 要深拷贝的值。\n\n#### 返回值\n\n(`T`): 返回深拷贝的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/cloneDeepWith.md",
    "content": "# cloneDeepWith (Lodash 兼容性)\n\n::: warning 建议实现自定义逻辑\n\n这个 `cloneDeepWith` 函数由于复杂的自定义函数和深拷贝处理而相对较慢。\n\n请改用 `cloneDeep` 并直接实现自定义逻辑。\n\n:::\n\n使用自定义函数创建对象的深拷贝。\n\n```typescript\nconst cloned = cloneDeepWith(value, customizer);\n```\n\n## 用法\n\n### `cloneDeepWith(value, customizer?)`\n\n当您想要自定义深拷贝的工作方式时,请使用 `cloneDeepWith`。自定义函数控制特定值的复制方式。\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\n// 基本用法(没有自定义函数)\nconst obj = {\n  a: 1,\n  b: {\n    c: 2,\n  },\n};\nconst cloned = cloneDeepWith(obj);\n// Returns: { a: 1, b: { c: 2 } } (完全新的实例)\n\n// 特殊处理Date对象\nconst obj2 = {\n  name: 'test',\n  createdAt: new Date('2023-01-01'),\n  nested: {\n    updatedAt: new Date('2023-12-31'),\n  },\n};\nconst cloned2 = cloneDeepWith(obj2, value => {\n  if (value instanceof Date) {\n    // 将Date转换为时间戳数字\n    return value.getTime();\n  }\n  // 返回undefined使用默认的深拷贝行为\n});\n// Returns: {\n//   name: 'test',\n//   createdAt: 1672531200000,\n//   nested: { updatedAt: 1703980800000 }\n// }\n\n// 转换数组元素\nconst arr = [1, [2, 3], { a: 4, b: [5, 6] }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value * 10;\n  }\n});\n// Returns: [10, [20, 30], { a: 40, b: [50, 60] }]\n\n// 处理函数\nconst objWithFunc = {\n  data: { count: 1 },\n  increment: function () {\n    this.data.count++;\n  },\n};\nconst clonedWithFunc = cloneDeepWith(objWithFunc, value => {\n  if (typeof value === 'function') {\n    // 将函数转换为字符串\n    return value.toString();\n  }\n});\n// Returns: {\n//   data: { count: 1 },\n//   increment: \"function() { this.data.count++; }\"\n// }\n```\n\n结合循环引用和自定义函数:\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nobj.b.self = obj; // 循环引用\n\nconst cloned = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value + 100;\n  }\n});\n\nconsole.log(cloned.a); // 101\nconsole.log(cloned.b.c); // 102\nconsole.log(cloned.b.self === cloned); // true (保留循环引用)\n```\n\n#### 参数\n\n- `value` (`T`): 要深拷贝的值。\n- `customizer` (`function`, 可选): 决定复制方式的函数。格式为 `(value: any, key?: string, object?: any, stack?: Map<any, any>) => any`。\n\n#### 返回值\n\n(`T`): 返回由自定义函数处理的深拷贝。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/cloneWith.md",
    "content": "# cloneWith (Lodash 兼容性)\n\n::: warning 建议实现自定义逻辑\n\n这个 `cloneWith` 函数由于复杂的自定义函数处理而相对较慢。\n\n请改用 `clone` 并直接实现自定义逻辑。\n\n:::\n\n使用自定义函数创建对象的浅拷贝。\n\n```typescript\nconst cloned = cloneWith(value, customizer);\n```\n\n## 用法\n\n### `cloneWith(value, customizer?)`\n\n当您想要自定义复制工作方式时,请使用 `cloneWith`。自定义函数控制特定值的复制方式。\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\n// 基本用法(没有自定义函数)\nconst obj = { a: 1, b: 'hello' };\nconst cloned = cloneWith(obj);\n// Returns: { a: 1, b: 'hello' } (新的对象实例)\n\n// 转换数字值\nconst obj2 = { a: 1, b: 2, c: 'text' };\nconst cloned2 = cloneWith(obj2, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (typeof val === 'number') {\n      obj[key] = val * 2;\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { a: 2, b: 4, c: 'text' }\n\n// 转换数组元素\nconst arr = [1, 2, 3];\nconst clonedArr = cloneWith(arr, value => {\n  return value.map(x => x + 10);\n});\n// Returns: [11, 12, 13]\n\n// 处理特定类型\nconst complex = {\n  date: new Date('2023-01-01'),\n  number: 42,\n  text: 'hello',\n};\nconst clonedComplex = cloneWith(complex, value => {\n  const obj = {};\n  for (const key in value) {\n    const val = value[key];\n    if (val instanceof Date) {\n      obj[key] = val.toISOString();\n    } else if (typeof val === 'string') {\n      obj[key] = val.toUpperCase();\n    } else {\n      obj[key] = val;\n    }\n  }\n  return obj;\n});\n// Returns: { date: '2023-01-01T00:00:00.000Z', number: 42, text: 'HELLO' }\n```\n\n如果自定义函数返回 `undefined`,则使用默认的复制行为。\n\n```typescript\nimport { cloneWith } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: { c: 2 } };\nconst cloned = cloneWith(obj, value => {\n  // 对所有值返回undefined = 使用默认复制\n  return undefined;\n});\n// Returns: { a: 1, b: { c: 2 } } (与clone相同的结果)\n```\n\n#### 参数\n\n- `value` (`T`): 要复制的值。\n- `customizer` (`function`, 可选): 决定复制方式的函数。格式为 `(value: any) => any`。\n\n#### 返回值\n\n(`T`): 返回由自定义函数处理的浅拷贝。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/create.md",
    "content": "# create (Lodash 兼容性)\n\n::: warning 请使用 `Object.create`\n\n这个 `create` 函数由于复杂的属性处理逻辑而相对较慢。\n\n请改用更快、更现代的 `Object.create`。\n\n:::\n\n创建一个继承给定原型的新对象。\n\n```typescript\nconst obj = create(prototype, properties);\n```\n\n## 用法\n\n### `create(prototype, properties?)`\n\n当您想要基于原型创建新对象时,请使用 `create`。您也可以选择添加属性。\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\n// 基本用法\nconst person = {\n  greet() {\n    console.log(`Hello, my name is ${this.name}`);\n  },\n};\n\nconst john = create(person, { name: 'John' });\njohn.greet(); // \"Hello, my name is John\"\n\n// 检查方法继承\nconsole.log('greet' in john); // true\nconsole.log(john.hasOwnProperty('greet')); // false (继承的属性)\nconsole.log(john.hasOwnProperty('name')); // true (自有属性)\n\n// 复杂的原型\nconst animal = {\n  type: 'animal',\n  makeSound() {\n    console.log('Some generic sound');\n  },\n};\n\nconst dog = create(animal, {\n  breed: 'Golden Retriever',\n  name: 'Buddy',\n  makeSound() {\n    console.log('Woof!');\n  },\n});\n\nconsole.log(dog.type); // 'animal' (继承的)\nconsole.log(dog.breed); // 'Golden Retriever' (自有属性)\ndog.makeSound(); // 'Woof!' (覆盖的方法)\n\n// null原型\nconst cleanObj = create(null, { data: 'value' });\nconsole.log(cleanObj.toString); // ƒ toString() { [native code] } (null 等价于 {})\n\n// 继承空对象\nconst empty = create({});\nconsole.log(Object.getPrototypeOf(empty)); // {} (空对象)\n```\n\n只有可枚举的字符串键才会被复制。\n\n```typescript\nimport { create } from 'es-toolkit/compat';\n\nconst proto = { inherited: true };\nconst props = {\n  visible: 'yes',\n  [Symbol('hidden')]: 'no', // Symbol键不会被复制\n};\n\n// 添加不可枚举属性\nObject.defineProperty(props, 'hidden', {\n  value: 'secret',\n  enumerable: false,\n});\n\nconst obj = create(proto, props);\nconsole.log(obj.visible); // 'yes'\nconsole.log(obj.hidden); // undefined (不可枚举)\nconsole.log(obj[Symbol('hidden')]); // undefined (Symbol键)\nconsole.log(obj.inherited); // true (继承的)\n```\n\n#### 参数\n\n- `prototype` (`T extends object`): 要继承的原型对象。\n- `properties` (`U extends object`, 可选): 要添加到新对象的属性。\n\n#### 返回值\n\n(`T & U`): 返回一个继承原型并具有指定属性的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/defaults.md",
    "content": "# defaults (Lodash 兼容性)\n\n::: warning 请使用 `Object.assign()` 代替\n\n此 `defaults` 函数由于特殊处理 `undefined` 和从 `Object.prototype` 继承的属性的复杂逻辑而运行缓慢。\n\n请改用更快、更现代的 `Object.assign()`。\n\n:::\n\n通过设置默认值来填充对象中的 `undefined` 属性。\n\n```typescript\nconst result = defaults(object, source);\n```\n\n## 用法\n\n### `defaults(object, ...sources)`\n\n当您想为对象中的 `undefined` 属性或从 `Object.prototype` 继承的属性设置默认值时,请使用 `defaults`。您可以传递多个默认值对象,它们将按从左到右的顺序应用。\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\n// 用默认值填充 undefined 属性\ndefaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 });\n// 返回值: { a: 1, b: 2, c: 3 }\n\n// 只有 undefined 属性会用默认值填充\ndefaults({ a: undefined }, { a: 1 });\n// 返回值: { a: 1 }\n\n// null 值保持不变\ndefaults({ a: null }, { a: 1 });\n// 返回值: { a: null }\n```\n\n如果属性已经有值,则不会用默认值覆盖。\n\n```typescript\nimport { defaults } from 'es-toolkit/compat';\n\ndefaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n// 返回值: { a: 1, b: 2, c: 3 }\n```\n\n#### 参数\n\n- `object` (`any`): 要设置默认值的目标对象。\n- `...sources` (`any[]`): 提供默认值的源对象。\n\n#### 返回值\n\n(`any`): 返回设置了默认值的对象。第一个参数 `object` 会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/defaultsDeep.md",
    "content": "# defaultsDeep (Lodash 兼容性)\n\n::: warning 请使用解构赋值和 `Object.assign()` 代替\n\n此 `defaultsDeep` 函数由于嵌套对象的递归合并和循环引用处理而运行缓慢且复杂。\n\n请改用更快、更现代的解构赋值和 `Object.assign()`。\n\n:::\n\n对嵌套对象递归设置默认值。\n\n```typescript\nconst result = defaultsDeep(target, ...sources);\n```\n\n## 用法\n\n### `defaultsDeep(target, ...sources)`\n\n当您想对嵌套对象中的 `undefined` 属性递归设置默认值时,请使用 `defaultsDeep`。与 `defaults` 类似,但它也会合并嵌套对象。\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\n// 在嵌套对象中设置默认值\ndefaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 });\n// 返回值: { a: { b: 2, c: 3 }, d: 4 }\n\n// 只有 undefined 属性会用默认值填充\ndefaultsDeep({ a: { b: undefined } }, { a: { b: 1 } });\n// 返回值: { a: { b: 1 } }\n\n// null 值保持不变\ndefaultsDeep({ a: null }, { a: { b: 1 } });\n// 返回值: { a: null }\n```\n\n您可以传递多个源对象以分阶段应用默认值。\n\n```typescript\nimport { defaultsDeep } from 'es-toolkit/compat';\n\ndefaultsDeep({ a: { b: 2 } }, { a: { c: 3 } }, { a: { d: 4 }, e: 5 });\n// 返回值: { a: { b: 2, c: 3, d: 4 }, e: 5 }\n```\n\n#### 参数\n\n- `target` (`any`): 要设置默认值的目标对象。\n- `...sources` (`any[]`): 提供默认值的源对象。\n\n#### 返回值\n\n(`any`): 返回递归设置了默认值的对象。第一个参数 `target` 会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/extend.md",
    "content": "# extend (Lodash 兼容性)\n\n::: warning 请使用 `Object.assign()`\n\n这个 `extend` 函数由于处理从原型链继承的属性的复杂逻辑而运行较慢。\n\n请使用更快、更现代的 `Object.assign()`。\n\n:::\n\n将对象的自有属性和继承属性复制到另一个对象。\n\n```typescript\nconst result = extend(object, source);\n```\n\n## 用法\n\n### `extend(object, ...sources)`\n\n使用 `extend` 将属性从一个对象复制到另一个对象。类似于 `Object.assign()`,但也会复制继承的属性。此函数是 `assignIn` 的别名。\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\n// 复制基本属性\nconst target = { a: 1 };\nextend(target, { b: 2 }, { c: 3 });\n// 返回值: { a: 1, b: 2, c: 3 }\n\n// 也会复制继承的属性\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.b = 2;\n\nconst source = new Parent();\nextend({}, source);\n// 返回值: { a: 1, b: 2 }\n```\n\n当存在相同属性时,后面的源对象的值会覆盖前面的。\n\n```typescript\nimport { extend } from 'es-toolkit/compat';\n\nextend({ a: 1, b: 2 }, { b: 3 }, { c: 4 });\n// 返回值: { a: 1, b: 3, c: 4 }\n```\n\n#### 参数\n\n- `object` (`any`): 接收属性的目标对象。\n- `...sources` (`any[]`): 提供属性的源对象。\n\n#### 返回值\n\n(`any`): 返回复制了属性的对象。第一个参数 `object` 会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/extendWith.md",
    "content": "# extendWith (Lodash 兼容性)\n\n::: warning 请使用 `Object.assign()` 和自定义函数\n\n此 `extendWith` 函数由于处理原型链中的继承属性和自定义合并逻辑,运行复杂且缓慢。\n\n请使用更快、更现代的 `Object.assign()` 和自定义函数。\n\n:::\n\n使用自定义函数将对象的自有属性和继承属性复制到另一个对象。\n\n```typescript\nconst result = extendWith(object, source, customizer);\n```\n\n## 用法\n\n### `extendWith(object, ...sources, customizer)`\n\n使用 `extendWith` 通过自定义逻辑合并对象属性。它类似于 `extend`,但允许您决定如何合并每个属性。此函数是 `assignInWith` 的别名。\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\n// 使用自定义合并逻辑复制属性\nconst target = { a: 1, b: 2 };\nextendWith(target, { b: 3, c: 4 }, (objValue, srcValue) => {\n  return objValue === undefined ? srcValue : objValue;\n});\n// 返回值: { a: 1, b: 2, c: 4 }\n\n// 连接数组的自定义合并\nconst obj1 = { a: [1, 2] };\nconst obj2 = { a: [3, 4], b: [5, 6] };\nextendWith(obj1, obj2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 返回值: { a: [1, 2, 3, 4], b: [5, 6] }\n```\n\n可以使用多个源对象。\n\n```typescript\nimport { extendWith } from 'es-toolkit/compat';\n\nextendWith({ a: 1 }, { b: 2 }, { c: 3 }, (objValue, srcValue) => srcValue * 2);\n// 返回值: { a: 1, b: 4, c: 6 }\n```\n\n#### 参数\n\n- `object` (`any`): 接收属性的目标对象。\n- `...sources` (`any[]`): 提供属性的源对象。\n- `customizer` (`function`): 确定每个属性要分配的值的函数。它接收 `(objValue, srcValue, key, object, source)`。\n\n#### 返回值\n\n(`any`): 返回复制了属性的对象。第一个参数 `object` 会被修改。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/findKey.md",
    "content": "# findKey (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `findKey`\n\n由于需要处理各种条件类型和兼容性逻辑,此 `findKey` 函数的行为较为复杂。\n\n建议使用更快、更现代的 `es-toolkit` 的 [findKey](../../object/findKey.md)。\n\n:::\n\n查找满足条件的第一个元素的键。\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 用法\n\n### `findKey(obj, predicate)`\n\n使用 `findKey` 在对象中查找满足条件的第一个元素的键。可以使用函数、对象、数组、字符串等各种形式的条件。\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\n// 使用函数条件查找键\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindKey(users, user => user.age > 30);\n// 返回值: 'charlie'\n\n// 使用对象条件查找键\nfindKey(users, { active: false });\n// 返回值: 'bob'\n\n// 使用属性路径查找键\nfindKey(users, 'active');\n// 返回值: 'alice'\n```\n\n如果没有匹配的元素,则返回 `undefined`。\n\n```typescript\nimport { findKey } from 'es-toolkit/compat';\n\nfindKey({ a: 1, b: 2 }, value => value > 5);\n// 返回值: undefined\n```\n\n#### 参数\n\n- `obj` (`T | null | undefined`): 要搜索的对象。\n- `predicate` (`ObjectIteratee<T>`, 可选): 应用于每个元素的条件。可以是函数、对象、数组或字符串。\n\n#### 返回值\n\n(`string | undefined`): 返回满足条件的第一个元素的键。如果没有找到匹配项,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/findLastKey.md",
    "content": "# findLastKey (Lodash 兼容性)\n\n::: warning 请使用 `Array.findLast()` 和 `Object.keys()`\n\n这个 `findLastKey` 函数由于需要处理各种条件类型和兼容性逻辑而变得复杂。\n\n建议使用更快、更现代的 `Array.findLast()` 和 `Object.keys()`。\n\n:::\n\n从末尾开始查找符合条件的最后一个元素的键。\n\n```typescript\nconst key = findLastKey(obj, predicate);\n```\n\n## 用法\n\n### `findLastKey(obj, predicate)`\n\n使用 `findLastKey` 在对象中查找符合条件的最后一个元素的键。与 `findKey` 相反,它从末尾开始搜索。可以使用函数、对象、数组、字符串等各种形式的条件。\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\n// 使用函数条件查找键\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nfindLastKey(users, user => user.active);\n// 返回值: 'charlie' (从末尾找到的第一个 active: true)\n\n// 使用对象条件查找键\nfindLastKey(users, { active: true });\n// 返回值: 'charlie'\n\n// 使用属性路径查找键\nfindLastKey(users, 'active');\n// 返回值: 'charlie'\n\n// 使用属性-值数组查找键\nfindLastKey(users, ['active', false]);\n// 返回值: 'bob'\n```\n\n如果没有符合条件的元素,则返回 `undefined`。\n\n```typescript\nimport { findLastKey } from 'es-toolkit/compat';\n\nfindLastKey({ a: 1, b: 2 }, value => value > 5);\n// 返回值: undefined\n```\n\n#### 参数\n\n- `obj` (`T | null | undefined`): 要搜索的对象。\n- `predicate` (`ObjectIteratee<T>`, 可选): 应用于每个元素的条件。可以是函数、对象、数组或字符串。\n\n#### 返回值\n\n(`string | undefined`): 返回符合条件的最后一个元素的键。如果没有找到则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/forIn.md",
    "content": "# forIn (Lodash 兼容性)\n\n::: warning 请使用 `Object.keys` 和 `for...in` 循环\n\n此 `forIn` 函数由于需要处理 `null` 或 `undefined`、设置默认 `iteratee` 等原因,运行速度较慢。\n\n请改用更快、更现代的 `Object.keys` 和 `for...in` 循环。\n\n:::\n\n遍历对象的所有属性(包括继承的属性),并对每个属性调用函数。\n\n```typescript\nconst result = forIn(obj, iteratee);\n```\n\n## 用法\n\n### `forIn(object, iteratee)`\n\n遍历对象的所有属性并调用 `iteratee` 函数。它不仅遍历对象的自有属性,还遍历通过原型链继承的属性。如果 `iteratee` 函数返回 `false`,则停止遍历。\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\n// 遍历对象的所有属性\nconst obj = { a: 1, b: 2 };\nforIn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'a' 1, 'b' 2\n\n// 包括继承属性的遍历\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforIn(child, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'inherited' 'value', 'own' 'ownValue', 'protoProperty' 'proto'\n\n// 根据条件提前退出\nforIn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 在 'a' 之后停止\n});\n// 输出: 'a' 1\n```\n\n`null` 或 `undefined` 会原样返回。\n\n```typescript\nimport { forIn } from 'es-toolkit/compat';\n\nforIn(null, iteratee); // null\nforIn(undefined, iteratee); // undefined\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要遍历的对象。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 可选): 为每个属性调用的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`T | null | undefined`): 返回原始对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/forInRight.md",
    "content": "# forInRight (Lodash 兼容性)\n\n::: warning 使用 `Object.keys` 和 `for...in` 循环\n\n由于需要创建键数组、反向迭代以及处理 `null` 或 `undefined`,这个 `forInRight` 函数的性能较慢。\n\n请使用更快、更现代的 `Object.keys` 和 `for...in` 循环。\n\n:::\n\n按反向顺序迭代对象的所有属性(包括继承的属性),并对每个属性调用函数。\n\n```typescript\nconst result = forInRight(obj, iteratee);\n```\n\n## 用法\n\n### `forInRight(object, iteratee)`\n\n按反向顺序迭代对象的所有属性,调用 `iteratee` 函数。它不仅迭代对象的自有属性,还包括通过原型链继承的属性。由于它将键收集到数组中然后反向迭代,因此比正常迭代慢。如果 `iteratee` 函数返回 `false`,则停止迭代。\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\n// 按反向顺序迭代所有属性\nconst obj = { a: 1, b: 2 };\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'b' 2, 'a' 1\n\n// 包括继承属性的反向迭代\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforInRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'protoProperty' 'proto', 'own' 'ownValue', 'inherited' 'value'\n\n// 根据条件提前终止\nforInRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 在 'a' 处停止\n});\n// 输出: 'b' 2, 'a' 1\n```\n\n`null` 或 `undefined` 会原样返回。\n\n```typescript\nimport { forInRight } from 'es-toolkit/compat';\n\nforInRight(null, iteratee); // null\nforInRight(undefined, iteratee); // undefined\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要迭代的对象。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 可选): 对每个属性调用的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`T | null | undefined`): 返回原始对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/forOwn.md",
    "content": "# forOwn (Lodash 兼容性)\n\n::: warning 请使用 `Object.keys` 和循环代替\n\n这个 `forOwn` 函数由于内部调用 `keys` 函数、对象转换过程以及 `null` 或 `undefined` 处理等原因,运行速度较慢。\n\n请使用更快、更现代的 `Object.keys` 和循环代替。\n\n:::\n\n仅迭代对象的自有属性,并对每个属性调用函数。\n\n```typescript\nconst result = forOwn(obj, iteratee);\n```\n\n## 用法\n\n### `forOwn(object, iteratee)`\n\n仅迭代对象的自有属性,调用 `iteratee` 函数。它只迭代对象直接拥有的属性,排除继承的属性和 `Symbol` 键。如果 `iteratee` 函数返回 `false`,则停止迭代。\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\n// 仅迭代对象的自有属性\nconst obj = { a: 1, b: 2 };\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'a' 1, 'b' 2\n\n// 排除继承的属性\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwn(child, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'inherited' 'value', 'own' 'ownValue' (protoProperty 被排除)\n\n// 根据条件提前终止\nforOwn(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 在 'a' 之后停止\n});\n// 输出: 'a' 1\n```\n\n`null` 或 `undefined` 按原样返回。\n\n```typescript\nimport { forOwn } from 'es-toolkit/compat';\n\nforOwn(null, iteratee); // null\nforOwn(undefined, iteratee); // undefined\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要迭代的对象。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 可选): 为每个属性调用的函数。默认值为 `identity` 函数。\n\n#### 返回值\n\n(`T | null | undefined`): 返回原始对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/forOwnRight.md",
    "content": "# forOwnRight (Lodash 兼容性)\n\n::: warning 使用 `Object.keys` 和循环\n此 `forOwnRight` 函数由于内部调用 `keys` 函数、对象转换过程和反向迭代而运行缓慢。\n\n请使用更快、更现代的 `Object.keys` 和循环。\n\n:::\n\n以相反的顺序仅迭代对象的自有属性,为每个属性调用函数。\n\n```typescript\nconst result = forOwnRight(obj, iteratee);\n```\n\n## 用法\n\n### `forOwnRight(object, iteratee)`\n\n以相反的顺序仅迭代对象的自有属性,调用 `iteratee` 函数。它以相反的顺序仅迭代对象直接拥有的属性,排除继承的属性和 `Symbol` 键。由于它将键收集到数组中然后以相反的顺序迭代,因此比正常迭代慢。如果 `iteratee` 函数返回 `false`,则停止迭代。\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\n// 以相反的顺序仅迭代自有属性\nconst obj = { a: 1, b: 2 };\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'b' 2, 'a' 1\n\n// 以相反的顺序迭代,排除继承的属性\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.protoProperty = 'proto';\n\nconst child = new Parent();\nchild.own = 'ownValue';\n\nforOwnRight(child, (value, key) => {\n  console.log(key, value);\n});\n// 输出: 'own' 'ownValue', 'inherited' 'value' (protoProperty 被排除)\n\n// 根据条件提前终止\nforOwnRight(obj, (value, key) => {\n  console.log(key, value);\n  return key !== 'a'; // 在 'a' 处停止\n});\n// 输出: 'b' 2, 'a' 1\n```\n\n`null` 或 `undefined` 按原样返回。\n\n```typescript\nimport { forOwnRight } from 'es-toolkit/compat';\n\nforOwnRight(null, iteratee); // null\nforOwnRight(undefined, iteratee); // undefined\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要迭代的对象。\n- `iteratee` (`(value: T[keyof T], key: string, collection: T) => any`, 可选): 为每个属性调用的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`T | null | undefined`): 返回原始对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/fromPairs.md",
    "content": "# fromPairs (Lodash 兼容性)\n\n::: warning 请使用 `Object.fromEntries`\n\n由于需要检查类数组对象和迭代处理，这个 `fromPairs` 函数运行较慢。\n\n请使用更快、更现代的 `Object.fromEntries` 代替。\n\n:::\n\n将键值对数组转换为对象。\n\n```typescript\nconst result = fromPairs(pairs);\n```\n\n## 用法\n\n### `fromPairs(pairs)`\n\n接收一个由键值对组成的数组，并将其转换为对象。每个键值对必须是包含 2 个元素的数组。第一个元素成为键，第二个元素成为值。在整理或转换数据时非常有用。\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\n// 基本键值对转换\nconst pairs = [\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n];\nconst result = fromPairs(pairs);\n// 结果: { a: 1, b: 2, c: 3 }\n\n// 处理各种值类型\nconst mixedPairs = [\n  ['name', 'John'],\n  ['age', 30],\n  ['active', true],\n];\nconst user = fromPairs(mixedPairs);\n// 结果: { name: 'John', age: 30, active: true }\n```\n\n`null`、`undefined` 或不是类数组对象的值将被处理为空对象。\n\n```typescript\nimport { fromPairs } from 'es-toolkit/compat';\n\nfromPairs(null); // {}\nfromPairs(undefined); // {}\nfromPairs('invalid'); // {}\n```\n\n#### 参数\n\n- `pairs` (`ArrayLike<[PropertyName, T]> | ArrayLike<any[]> | null | undefined`): 要转换为对象的键值对数组。\n\n#### 返回值\n\n(`Record<string, any> | Record<string, T>`): 返回从键值对创建的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/functions.md",
    "content": "# functions (Lodash 兼容性)\n\n::: warning 请使用 `Object.keys` 和 `typeof` 检查\n\n此 `functions` 函数内部会经过 `keys` 函数和过滤过程,因此运行缓慢。\n\n请使用更快、更现代的 `Object.keys` 和 `typeof` 检查。\n\n:::\n\n返回对象自有属性中函数属性的名称数组。\n\n```typescript\nconst functionNames = functions(obj);\n```\n\n## 用法\n\n### `functions(object)`\n\n检查对象的自有属性,仅返回函数属性的名称数组。排除继承的属性和 `Symbol` 键,只检查对象直接拥有的字符串键属性。在查找对象的方法或单独处理函数属性时很有用。\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\n// 基本用法\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functions(obj);\n// 结果: ['greet', 'calculate']\n\n// 在类实例中查找函数\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst methods = functions(calc);\n// 结果: ['add'] (排除继承的 multiply、divide)\n\n// 没有函数的对象\nconst data = { x: 1, y: 2, z: 'text' };\nconst noFunctions = functions(data);\n// 结果: []\n```\n\n`null` 或 `undefined` 会被处理为空数组。\n\n```typescript\nimport { functions } from 'es-toolkit/compat';\n\nfunctions(null); // []\nfunctions(undefined); // []\n```\n\n#### 参数\n\n- `object` (`any`): 要检查的对象。\n\n#### 返回值\n\n(`string[]`): 返回由函数属性名称组成的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/functionsIn.md",
    "content": "# functionsIn (Lodash 兼容性)\n\n::: warning 请使用 `for...in` 循环和 `typeof` 检查\n\n这个 `functionsIn` 函数由于使用了 `for...in` 循环和函数检查过程,运行速度较慢。\n\n请使用更快、更现代的 `for...in` 循环和 `typeof` 检查。\n\n:::\n\n返回对象的所有属性(包括继承的属性)中函数类型的属性名称数组。\n\n```typescript\nconst functionNames = functionsIn(obj);\n```\n\n## 用法\n\n### `functionsIn(object)`\n\n检查对象的所有属性,返回仅包含函数类型属性名称的数组。不仅检查对象自身的属性,还会通过原型链检查所有继承的属性。适用于查找对象的所有方法(包括继承的方法)。\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\n// 基本用法\nconst obj = {\n  name: 'John',\n  age: 30,\n  greet: () => 'Hello',\n  calculate: function (x, y) {\n    return x + y;\n  },\n};\n\nconst functionNames = functionsIn(obj);\n// 结果: ['greet', 'calculate']\n\n// 包括继承的函数\nclass Calculator {\n  constructor() {\n    this.value = 0;\n    this.add = function (n) {\n      this.value += n;\n    };\n  }\n\n  multiply(n) {\n    this.value *= n;\n  }\n}\n\nCalculator.prototype.divide = function (n) {\n  this.value /= n;\n};\n\nconst calc = new Calculator();\nconst allMethods = functionsIn(calc);\n// 结果: ['add', 'divide'] (`multiply` 不可枚举)\n\n// 通过原型链继承\nfunction Parent() {\n  this.parentMethod = function () {\n    return 'parent';\n  };\n}\nParent.prototype.protoMethod = function () {\n  return 'proto';\n};\n\nfunction Child() {\n  Parent.call(this);\n  this.childMethod = function () {\n    return 'child';\n  };\n}\nChild.prototype = Object.create(Parent.prototype);\n\nconst child = new Child();\nconst inheritedFunctions = functionsIn(child);\n// 结果: ['parentMethod', 'childMethod', 'protoMethod']\n```\n\n`null` 或 `undefined` 将被视为空数组。\n\n```typescript\nimport { functionsIn } from 'es-toolkit/compat';\n\nfunctionsIn(null); // []\nfunctionsIn(undefined); // []\n```\n\n#### 参数\n\n- `object` (`any`): 要检查的对象。\n\n#### 返回值\n\n(`string[]`): 返回由函数类型的属性名称(包括继承的函数)组成的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/get.md",
    "content": "# get (Lodash 兼容性)\n\n::: warning 请使用点表示法或方括号表示法\n\n此 `get` 函数由于复杂的路径解析、处理 `null` 或 `undefined` 以及默认值处理而性能较慢。\n\n请使用更快、更现代的点表示法 (`.`)、方括号表示法 (`[]`) 或可选链 (`?.`)。\n\n:::\n\n获取对象指定路径的值。\n\n```typescript\nconst value = get(object, path, defaultValue);\n```\n\n## 用法\n\n### `get(object, path, defaultValue?)`\n\n使用 `get` 安全地从对象路径获取值。当路径不存在或值为 `undefined` 时,返回默认值。\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\n// 使用点表示法访问嵌套对象\nconst object = { a: { b: { c: 3 } } };\nget(object, 'a.b.c');\n// => 3\n\n// 使用数组表示法访问\nget(object, ['a', 'b', 'c']);\n// => 3\n\n// 为不存在的路径提供默认值\nget(object, 'a.b.d', 'default');\n// => 'default'\n\n// 包含数组索引的路径\nconst arrayObject = { users: [{ name: 'john' }, { name: 'jane' }] };\nget(arrayObject, 'users[0].name');\n// => 'john'\n```\n\n安全地访问 `null` 或 `undefined` 对象。\n\n```typescript\nimport { get } from 'es-toolkit/compat';\n\nget(null, 'a.b.c', 'default');\n// => 'default'\n\nget(undefined, ['a', 'b'], 'default');\n// => 'default'\n```\n\n#### 参数\n\n- `object` (`any`): 要查询的对象。\n- `path` (`PropertyPath`): 要获取的属性路径。可以表示为字符串、数字、符号或数组。\n- `defaultValue` (`any`, 可选): 当值为 `undefined` 时返回的默认值。\n\n#### 返回值\n\n(`any`): 返回解析的值或默认值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/has.md",
    "content": "# has (Lodash 兼容性)\n\n::: warning 请使用 `Object.hasOwn` 或 `in` 运算符\n\n由于复杂的路径解析和数组索引处理,这个 `has` 函数的运行速度较慢。\n\n请使用更快、更现代的 `Object.hasOwn()` 或 `in` 运算符。\n\n:::\n\n检查对象中指定路径的属性是否存在。\n\n```typescript\nconst exists = has(object, path);\n```\n\n## 用法\n\n### `has(object, path)`\n\n当您想检查对象是否具有特定路径的属性时,请使用 `has`。它只检查自有属性(own property),不检查继承的属性。\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\n// 简单属性检查\nconst object = { a: 1, b: 2 };\nhas(object, 'a');\n// => true\n\n// 嵌套对象检查\nconst nested = { a: { b: { c: 3 } } };\nhas(nested, 'a.b.c');\n// => true\nhas(nested, ['a', 'b', 'c']);\n// => true\n\n// 不存在的属性\nhas(nested, 'a.b.d');\n// => false\n\n// 数组索引检查\nconst array = [1, 2, 3];\nhas(array, 2);\n// => true\nhas(array, 5);\n// => false\n```\n\n它在稀疏数组中也能正常工作。\n\n```typescript\nimport { has } from 'es-toolkit/compat';\n\nconst sparse = [1, , 3]; // 索引 1 为空\nhas(sparse, 0); // true\nhas(sparse, 1); // true - 实际上存在,但值为 undefined\nhas(sparse, 2); // true\n```\n\n#### 参数\n\n- `object` (`any`): 要查询的对象。\n- `path` (`PropertyPath`): 要检查的属性路径。可以表示为字符串、数字、符号或数组。\n\n#### 返回值\n\n(`boolean`): 如果路径上的属性存在则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/hasIn.md",
    "content": "# hasIn (Lodash 兼容性)\n\n::: warning 请使用 `in` 运算符\n\n由于复杂的路径解析和原型链检查,这个 `hasIn` 函数的性能较慢。\n\n请使用更快、更现代的 `in` 运算符或 `Object.hasOwn()` 函数。\n\n:::\n\n检查对象中指定路径的属性是否存在,包括继承的属性。\n\n```typescript\nconst exists = hasIn(object, path);\n```\n\n## 用法\n\n### `hasIn(object, path)`\n\n当您想检查对象在特定路径是否有属性时,使用 `hasIn`。与 `has` 不同,它也会检查继承的属性(原型链中的属性)。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// 检查自有属性\nconst object = { a: 1, b: 2 };\nhasIn(object, 'a');\n// => true\n\n// 检查嵌套对象\nconst nested = { a: { b: { c: 3 } } };\nhasIn(nested, 'a.b.c');\n// => true\nhasIn(nested, ['a', 'b', 'c']);\n// => true\n\n// 不存在的属性\nhasIn(nested, 'a.b.d');\n// => false\n\n// 检查数组索引\nconst array = [1, 2, 3];\nhasIn(array, 2);\n// => true\nhasIn(array, 5);\n// => false\n```\n\n它也会检查继承的属性。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\n// 检查原型链中的属性\nfunction Rectangle() {}\nRectangle.prototype.area = function () {};\n\nconst rect = new Rectangle();\nhasIn(rect, 'area'); // true - 也能找到继承的属性\nhas(rect, 'area'); // false - has 只检查自有属性\n```\n\n安全地处理 `null` 和 `undefined`。\n\n```typescript\nimport { hasIn } from 'es-toolkit/compat';\n\nhasIn(null, 'a');\n// => false\n\nhasIn(undefined, 'b');\n// => false\n```\n\n#### 参数\n\n- `object` (`any`): 要检查的对象。\n- `path` (`PropertyPath`): 要检查的属性路径。可以用字符串、数字、符号或数组表示。\n\n#### 返回值\n\n(`boolean`): 如果路径的属性存在(无论是自有属性还是继承的属性),则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/invert.md",
    "content": "# invert (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `invert`\n\n由于 Lodash 兼容性所需的复杂处理,此 `invert` 函数运行较慢。\n\n请使用更快、更现代的 `es-toolkit` 的 [`invert`](../../object/invert.md)。\n\n:::\n\n反转对象的键和值。\n\n```typescript\nconst inverted = invert(object);\n```\n\n## 用法\n\n### `invert(object)`\n\n当您想要交换对象的键和值时,请使用 `invert`。原始对象的键将成为新对象的值,原始对象的值将成为新对象的键。\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 基本键值反转\nconst object = { a: 1, b: 2, c: 3 };\ninvert(object);\n// => { '1': 'a', '2': 'b', '3': 'c' }\n\n// 反转字符串值\nconst colors = { red: '#ff0000', green: '#00ff00', blue: '#0000ff' };\ninvert(colors);\n// => { '#ff0000': 'red', '#00ff00': 'green', '#0000ff': 'blue' }\n\n// 混合键和值类型\nconst mixed = { a: 1, 2: 'b', c: 3, 4: 'd' };\ninvert(mixed);\n// => { '1': 'a', 'b': '2', '3': 'c', 'd': '4' }\n```\n\n当存在重复值时,将使用最后一个键。\n\n```typescript\nimport { invert } from 'es-toolkit/compat';\n\n// 存在重复值的情况\nconst object = { a: 1, b: 1, c: 2 };\ninvert(object);\n// => { '1': 'b', '2': 'c' }\n// 'a' 被覆盖并丢失\n```\n\n#### 参数\n\n- `object` (`object`): 要反转的对象。\n\n#### 返回值\n\n(`Record<string, string>`): 返回键和值反转后的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/invertBy.md",
    "content": "# invertBy (Lodash 兼容性)\n\n::: warning 请使用现代 JavaScript API\n\n由于复杂的迭代器处理和分组逻辑,这个 `invertBy` 函数运行缓慢。\n\n请使用更快、更现代的 `Object.entries()` 与 `reduce()` 或 `Map`。\n\n:::\n\n反转对象的键和值,同时将相同的值分组到数组中。\n\n```typescript\nconst inverted = invertBy(object, iteratee);\n```\n\n## 用法\n\n### `invertBy(object, iteratee?)`\n\n当你想要反转对象的键和值,并将具有相同值的键分组到数组中时,请使用 `invertBy`。你可以选择性地提供一个迭代器函数来转换值。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// 基本的键值反转(相同的值被分组到数组中)\nconst object = { a: 1, b: 2, c: 1 };\ninvertBy(object);\n// => { '1': ['a', 'c'], '2': ['b'] }\n\n// 使用迭代器函数进行值转换\nconst ages = { john: 25, jane: 30, bob: 25 };\ninvertBy(ages, age => `age_${age}`);\n// => { 'age_25': ['john', 'bob'], 'age_30': ['jane'] }\n\n// 按字符串长度分组\nconst words = { a: 'hello', b: 'world', c: 'hi', d: 'test' };\ninvertBy(words, word => word.length);\n// => { '5': ['a', 'b'], '2': ['c'], '4': ['d'] }\n```\n\n你也可以按对象属性分组。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\n// 按对象属性分组\nconst users = {\n  user1: { department: 'IT', age: 30 },\n  user2: { department: 'HR', age: 25 },\n  user3: { department: 'IT', age: 35 },\n};\n\ninvertBy(users, user => user.department);\n// => { 'IT': ['user1', 'user3'], 'HR': ['user2'] }\n```\n\n安全地处理 `null` 或 `undefined`。\n\n```typescript\nimport { invertBy } from 'es-toolkit/compat';\n\ninvertBy(null);\n// => {}\n\ninvertBy(undefined);\n// => {}\n```\n\n#### 参数\n\n- `object` (`object`): 要反转的对象。\n- `iteratee` (`ValueIteratee`, 可选): 用于转换值的函数。默认值是直接使用值本身的函数。\n\n#### 返回值\n\n(`Record<string, string[]>`): 返回一个新对象,以转换后的值作为键,以原始键的数组作为值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/keys.md",
    "content": "# keys (Lodash 兼容性)\n\n::: warning 请使用 `Object.keys`\n\n由于处理类数组对象、原型对象等复杂逻辑,此 `keys` 函数运行较慢。\n\n建议使用更快、更现代的 `Object.keys()`。\n\n:::\n\n返回对象自身可枚举属性名称的数组。\n\n```typescript\nconst keyArray = keys(object);\n```\n\n## 用法\n\n### `keys(object)`\n\n当您想要获取对象的自身属性名称时,使用 `keys`。它只返回自身属性,不包括继承的属性。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// 基本对象的键\nconst object = { a: 1, b: 2, c: 3 };\nkeys(object);\n// => ['a', 'b', 'c']\n\n// 数组的索引\nconst array = [1, 2, 3];\nkeys(array);\n// => ['0', '1', '2']\n\n// 字符串的索引\nkeys('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n从函数或构造函数继承的属性会被排除。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeys(new Foo());\n// => ['a', 'b'] ('c' 被排除,因为它是原型属性)\n```\n\n类数组对象会被特殊处理。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeys(typedArray);\n// => ['0', '1', '2']\n\n// arguments 对象\nfunction example() {\n  return keys(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n安全处理 `null` 和 `undefined`。\n\n```typescript\nimport { keys } from 'es-toolkit/compat';\n\nkeys(null);\n// => []\n\nkeys(undefined);\n// => []\n```\n\n#### 参数\n\n- `object` (`any`): 要获取键的对象。\n\n#### 返回值\n\n(`string[]`): 返回对象自身可枚举属性名称的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/keysIn.md",
    "content": "# keysIn (Lodash 兼容性)\n\n::: warning 请使用 `for...in` 循环或 `Object.keys`\n\n这个 `keysIn` 函数由于处理类数组对象和遍历原型链等复杂逻辑而运行缓慢。\n\n请改用更快、更现代的 `for...in` 循环或根据需要使用 `Object.keys()`。\n\n:::\n\n返回对象的所有可枚举属性名称的数组,包括继承的属性。\n\n```typescript\nconst allKeys = keysIn(object);\n```\n\n## 用法\n\n### `keysIn(object)`\n\n当您想要获取对象的所有属性名称(包括继承的属性)时,请使用 `keysIn`。与 `keys` 不同,它还返回原型链中的属性。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// 基本对象的键\nconst object = { a: 1, b: 2 };\nkeysIn(object);\n// => ['a', 'b']\n\n// 数组的索引\nconst array = [1, 2, 3];\nkeysIn(array);\n// => ['0', '1', '2']\n\n// 字符串的索引\nkeysIn('hello');\n// => ['0', '1', '2', '3', '4']\n```\n\n它也包括继承的属性。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nfunction Foo() {\n  this.a = 1;\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nkeysIn(new Foo());\n// => ['a', 'b', 'c'] (包括原型属性 'c')\n\n// 排除 constructor\nclass MyClass {\n  constructor() {\n    this.prop = 1;\n  }\n  method() {}\n}\nMyClass.prototype.inherited = 2;\n\nkeysIn(new MyClass());\n// => ['prop', 'method', 'inherited'] (排除了 constructor)\n```\n\n它特殊处理类数组对象。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\n// TypedArray\nconst typedArray = new Uint8Array([1, 2, 3]);\nkeysIn(typedArray);\n// => ['0', '1', '2'] (排除 buffer、byteLength 等)\n\n// arguments 对象\nfunction example() {\n  return keysIn(arguments);\n}\nexample('a', 'b', 'c');\n// => ['0', '1', '2']\n```\n\n它安全地处理 `null` 或 `undefined`。\n\n```typescript\nimport { keysIn } from 'es-toolkit/compat';\n\nkeysIn(null);\n// => []\n\nkeysIn(undefined);\n// => []\n```\n\n#### 参数\n\n- `object` (`any`): 要获取键的对象。\n\n#### 返回值\n\n(`string[]`): 返回对象的所有可枚举属性名称(包括自有属性和继承属性)的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/mapKeys.md",
    "content": "# mapKeys (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `mapKeys`\n\n这个 `mapKeys` 函数由于处理 `null` 或 `undefined` 以及 `iteratee` 转换过程而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`mapKeys`](../../object/mapKeys.md)。\n\n:::\n\n通过转换键来创建新对象,同时保持值不变。\n\n```typescript\nconst result = mapKeys(obj, iteratee);\n```\n\n## 用法\n\n### `mapKeys(object, iteratee)`\n\n使用 `iteratee` 函数转换对象中的每个键来创建新对象。值保持不变,只修改键。适用于转换或规范化对象键。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\n// 为键添加前缀\nconst obj = { a: 1, b: 2, c: 3 };\nconst result = mapKeys(obj, (value, key) => 'prefix_' + key);\n// 结果: { prefix_a: 1, prefix_b: 2, prefix_c: 3 }\n\n// 将键转换为大写\nconst data = { name: 'John', age: 30 };\nconst uppercased = mapKeys(data, (value, key) => key.toUpperCase());\n// 结果: { NAME: 'John', AGE: 30 }\n\n// 将数组索引转换为键\nconst arr = ['apple', 'banana', 'orange'];\nconst indexed = mapKeys(arr, (value, index) => `item_${index}`);\n// 结果: { item_0: 'apple', item_1: 'banana', item_2: 'orange' }\n\n// 通过组合键和值创建新键\nconst scores = { math: 90, science: 85, english: 92 };\nconst detailed = mapKeys(scores, (value, key) => `${key}_score_${value}`);\n// 结果: { math_score_90: 90, science_score_85: 85, english_score_92: 92 }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/compat';\n\nmapKeys(null, iteratee); // {}\nmapKeys(undefined, iteratee); // {}\n```\n\n#### 参数\n\n- `object` (`ArrayLike<T> | T | null | undefined`): 要转换键的对象或数组。\n- `iteratee` (`ListIteratee<T> | ObjectIteratee<T>`, 可选): 用于转换每个键的函数。默认为 `identity` 函数。\n\n#### 返回值\n\n(`Record<string, T> | Record<string, T[keyof T]>`): 返回一个具有转换后键的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/mapValues.md",
    "content": "# mapValues (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `mapValues`\n\n这个 `mapValues` 函数由于处理 `null` 或 `undefined` 以及 `iteratee` 转换过程而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`mapValues`](../../object/mapValues.md)。\n\n:::\n\n通过转换值来创建新对象,同时保持键不变。\n\n```typescript\nconst result = mapValues(obj, iteratee);\n```\n\n## 用法\n\n### `mapValues(object, iteratee)`\n\n使用 `iteratee` 函数转换对象中的每个值来创建新对象。键保持不变,只修改值。可以处理字符串、数组和对象。适用于转换或计算数据。\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\n// 转换对象值\nconst obj = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(obj, value => value * 2);\n// 结果: { a: 2, b: 4, c: 6 }\n\n// 将字符串转换为大写\nconst names = { first: 'john', last: 'doe' };\nconst uppercased = mapValues(names, value => value.toUpperCase());\n// 结果: { first: 'JOHN', last: 'DOE' }\n\n// 转换字符串中的每个字符\nconst str = 'abc';\nconst charMap = mapValues(str, char => char.toUpperCase());\n// 结果: { '0': 'A', '1': 'B', '2': 'C' }\n\n// 将数组转换为对象\nconst arr = [10, 20, 30];\nconst arrMap = mapValues(arr, (value, index) => value + index);\n// 结果: { '0': 10, '1': 21, '2': 32 }\n\n// 使用属性路径提取值\nconst users = {\n  user1: { profile: { name: 'Alice' } },\n  user2: { profile: { name: 'Bob' } },\n};\nconst userNames = mapValues(users, 'profile.name');\n// 结果: { user1: 'Alice', user2: 'Bob' }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { mapValues } from 'es-toolkit/compat';\n\nmapValues(null, iteratee); // {}\nmapValues(undefined, iteratee); // {}\n```\n\n#### 参数\n\n- `object` (`string | T[] | T | null | undefined`): 要转换值的对象、数组或字符串。\n- `iteratee` (`ValueIteratee<any>`, 可选): 用于转换每个值的函数、属性路径或匹配对象。默认为 `identity` 函数。\n\n#### 返回值\n\n(`Record<number, T> | { [P in keyof T]: U } | Record<string, boolean> | Record<string, any> | Partial<T>`): 返回一个具有转换后值的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/merge.md",
    "content": "# merge (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `merge`\n\n这个 `merge` 函数由于内部调用复杂的 `mergeWith` 函数而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`merge`](../../object/merge.ts)。\n\n:::\n\n深度合并多个对象为单个对象。\n\n```typescript\nconst result = merge(target, ...sources);\n```\n\n## 用法\n\n### `merge(object, ...sources)`\n\n将一个或多个源对象深度合并到目标对象中。嵌套的对象和数组会递归合并。如果源对象的属性是 `undefined`,则不会覆盖目标对象中的现有值。适用于合并对象配置或应用默认值。\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\n// 基本对象合并\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// 结果: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// 数组合并\nconst obj1 = { arr: [1, 2] };\nconst obj2 = { arr: [3, 4] };\nconst merged = merge(obj1, obj2);\n// 结果: { arr: [3, 4] } (数组被替换)\n\n// 多个对象合并\nconst base = { a: 1 };\nconst ext1 = { b: 2 };\nconst ext2 = { c: 3 };\nconst ext3 = { d: 4 };\nconst combined = merge(base, ext1, ext2, ext3);\n// 结果: { a: 1, b: 2, c: 3, d: 4 }\n\n// 嵌套对象合并\nconst config = {\n  api: { url: 'https://api.example.com', timeout: 5000 },\n  features: { auth: true },\n};\nconst overrides = {\n  api: { timeout: 10000, retries: 3 },\n  features: { analytics: true },\n};\nconst finalConfig = merge(config, overrides);\n// 结果: {\n//   api: { url: 'https://api.example.com', timeout: 10000, retries: 3 },\n//   features: { auth: true, analytics: true }\n// }\n```\n\n目标对象会被修改,因此如需保留原始对象请使用空对象。\n\n```typescript\nimport { merge } from 'es-toolkit/compat';\n\nconst original = { a: 1, b: { x: 1 } };\nconst source = { b: { y: 2 } };\n\n// 保留原始对象\nconst result = merge({}, original, source);\n// original 未被修改\n```\n\n#### 参数\n\n- `object` (`any`): 要合并到的目标对象。此对象会被修改。\n- `...sources` (`any[]`): 要合并的源对象。\n\n#### 返回值\n\n(`any`): 返回合并后的目标对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/mergeWith.md",
    "content": "# mergeWith (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `mergeWith`\n\n这个 `mergeWith` 函数由于复杂的类型检查、循环引用处理和特殊对象处理而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`mergeWith`](../../object/mergeWith.md)。\n\n:::\n\n使用自定义函数控制合并行为,深度合并多个对象。\n\n```typescript\nconst result = mergeWith(target, ...sources, customizer);\n```\n\n## 用法\n\n### `mergeWith(object, ...sources, customizer)`\n\n将一个或多个源对象深度合并到目标对象中,使用自定义函数控制合并行为。如果自定义函数返回 `undefined`,则使用默认合并逻辑。适用于连接数组或应用特殊合并规则。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\n// 数字相加\nconst obj1 = { a: 1, b: 2 };\nconst obj2 = { b: 3, c: 4 };\nconst result = mergeWith(obj1, obj2, (objValue, srcValue) => {\n  if (typeof objValue === 'number' && typeof srcValue === 'number') {\n    return objValue + srcValue;\n  }\n});\n// 结果: { a: 1, b: 5, c: 4 }\n\n// 连接数组\nconst arr1 = { items: [1, 2] };\nconst arr2 = { items: [3, 4] };\nconst merged = mergeWith(arr1, arr2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 结果: { items: [1, 2, 3, 4] }\n\n// 连接字符串\nconst str1 = { message: 'Hello' };\nconst str2 = { message: 'World' };\nconst combined = mergeWith(str1, str2, (objValue, srcValue, key) => {\n  if (key === 'message' && typeof objValue === 'string') {\n    return objValue + ' ' + srcValue;\n  }\n});\n// 结果: { message: 'Hello World' }\n\n// 多个源对象与自定义函数\nconst base = { scores: [80] };\nconst quiz1 = { scores: [90] };\nconst quiz2 = { scores: [85] };\nconst final = mergeWith(base, quiz1, quiz2, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 结果: { scores: [80, 90, 85] }\n```\n\n自定义函数接收各种参数。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/compat';\n\nconst customizer = (objValue, srcValue, key, object, source, stack) => {\n  console.log('合并中:', key, objValue, '->', srcValue);\n\n  // 仅对特定键进行自定义\n  if (key === 'specialField') {\n    return `${objValue}_${srcValue}`;\n  }\n\n  // 返回undefined使用默认合并逻辑\n  return undefined;\n};\n```\n\n#### 参数\n\n- `object` (`any`): 要合并到的目标对象。此对象会被修改。\n- `...sources` (`any[]`): 要合并的源对象。\n- `customizer` (`MergeWithCustomizer`): 自定义值分配的函数。格式: `(objValue, srcValue, key, object, source, stack) => any`。\n\n#### 返回值\n\n(`any`): 返回合并后的目标对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/omit.md",
    "content": "# omit (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `omit`\n\n这个 `omit` 函数由于深拷贝和调用 `unset` 函数而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`omit`](../../object/omit.md)。\n\n:::\n\n创建一个排除指定键的新对象。\n\n```typescript\nconst result = omit(obj, ...keys);\n```\n\n## 用法\n\n### `omit(object, ...paths)`\n\n创建一个排除指定键的新对象。支持深层键路径,可以使用数组一次指定多个键。适用于从对象中删除敏感信息或仅选择需要的属性。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\n// 删除基本键\nconst user = { id: 1, name: 'John', email: 'john@example.com', password: 'secret' };\nconst publicUser = omit(user, 'password', 'email');\n// 结果: { id: 1, name: 'John' }\n\n// 使用数组删除多个键\nconst data = { a: 1, b: 2, c: 3, d: 4 };\nconst filtered = omit(data, ['a', 'c']);\n// 结果: { b: 2, d: 4 }\n\n// 删除深层键路径\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst result = omit(nested, 'user.profile.age', 'admin');\n// 结果: { user: { profile: { name: 'John' }, settings: { theme: 'dark' } } }\n\n// 组合嵌套数组和键\nconst complex = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst simplified = omit(complex, 'a', ['b', 'c'], 'd.f');\n// 结果: { d: { e: 4 } }\n```\n\n您可以自由组合数组、字符串和键路径。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nconst config = {\n  api: { url: 'https://api.example.com', key: 'secret', timeout: 5000 },\n  ui: { theme: 'dark', language: 'en' },\n  debug: true,\n};\n\n// 以多种方式指定键\nconst cleaned = omit(config, 'api.key', ['debug'], 'ui.language');\n// 结果: { api: { url: 'https://api.example.com', timeout: 5000 }, ui: { theme: 'dark' } }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { omit } from 'es-toolkit/compat';\n\nomit(null, 'key'); // {}\nomit(undefined, 'key'); // {}\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要删除键的源对象。\n- `...paths` (`Array<Many<PropertyKey>>`): 要删除的键。可以指定单个键、键数组或深层键路径。\n\n#### 返回值\n\n(`Partial<T>`): 返回删除指定键后的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/omitBy.md",
    "content": "# omitBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `omitBy`\n\n这个 `omitBy` 函数由于类数组对象检查、`iteratee` 转换和键转换过程而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`omitBy`](../../object/omitBy.md)。\n\n:::\n\n创建一个新对象,排除断言函数返回true的属性。\n\n```typescript\nconst result = omitBy(obj, predicate);\n```\n\n## 用法\n\n### `omitBy(object, predicate)`\n\n对对象的每个属性执行断言函数,并创建一个新对象,排除断言返回true的属性。适用于根据条件动态过滤属性。\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\n// 删除特定类型的值\nconst data = { a: 1, b: 'remove', c: 3, d: 'keep' };\nconst numbers = omitBy(data, value => typeof value === 'string');\n// 结果: { a: 1, c: 3 }\n\n// 根据条件删除属性\nconst user = { id: 1, name: 'John', age: 0, active: false, email: '' };\nconst validData = omitBy(user, value => !value);\n// 结果: { id: 1, name: 'John' } (删除假值)\n\n// 按键名过滤\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = omitBy(settings, (value, key) => key.startsWith('admin'));\n// 结果: { userSetting: true, debugMode: true }\n\n// 仅删除数字属性\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst noNumbers = omitBy(mixed, value => typeof value === 'number');\n// 结果: { str: 'hello', bool: true, obj: {} }\n\n// 也可用于数组\nconst arr = [1, 2, 3, 4, 5];\nconst filtered = omitBy(arr, value => value % 2 === 0);\n// 结果: { '0': 1, '2': 3, '4': 5 } (偶数索引处的奇数值)\n\n// 利用值、键和原始对象\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst passingGrades = omitBy(scores, (value, key, obj) => {\n  console.log(`${key}: ${value} (平均: ${Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length})`);\n  return value < 80;\n});\n// 结果: { math: 90, english: 85 }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { omitBy } from 'es-toolkit/compat';\n\nomitBy(null, () => true); // {}\nomitBy(undefined, () => true); // {}\n```\n\n#### 参数\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): 要过滤的源对象。\n- `predicate` (`ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, 可选): 对每个属性执行的断言函数。此函数返回true的属性将被删除。默认为 `identity` 函数。\n\n#### 返回值\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 返回一个由不满足条件的属性组成的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/pick.md",
    "content": "# pick (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `pick`\n\n这个 `pick` 函数由于复杂的路径处理、调用 `get`/`set` 函数以及处理 `null`/`undefined` 而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`pick`](../../object/pick.md)。\n\n:::\n\n通过仅选择指定属性来创建新对象。\n\n```typescript\nconst result = pick(obj, ...keys);\n```\n\n## 用法\n\n### `pick(object, ...props)`\n\n当您想创建一个仅包含对象中所需属性的新对象时,请使用 `pick`。可以使用数组一次传递多个键,或将它们作为单个参数逐个传递。支持深层键路径,因此您也可以选择嵌套属性。\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\n// 基本用法\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// 结果: { a: 1, c: 3 }\n\n// 作为单个参数传递\nconst result2 = pick(obj, 'a', 'c');\n// 结果: { a: 1, c: 3 }\n\n// 选择深层路径\nconst nested = {\n  user: { profile: { name: 'John', age: 30 }, settings: { theme: 'dark' } },\n  admin: true,\n};\nconst userInfo = pick(nested, 'user.profile.name', 'admin');\n// 结果: { user: { profile: { name: 'John' } }, admin: true }\n\n// 混合数组和单个键\nconst mixed = { a: 1, b: 2, c: 3, d: { e: 4, f: 5 } };\nconst selected = pick(mixed, ['a', 'b'], 'c', 'd.e');\n// 结果: { a: 1, b: 2, c: 3, d: { e: 4 } }\n\n// 区分点表示法键和实际带点的键\nconst ambiguous = {\n  'a.b': 1, // 实际键 'a.b'\n  a: { b: 2, c: 3 }, // 嵌套对象\n};\nconst dotKey = pick(ambiguous, 'a.b');\n// 结果: { 'a.b': 1 } (实际键优先)\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { pick } from 'es-toolkit/compat';\n\npick(null, ['a', 'b']); // {}\npick(undefined, ['a', 'b']); // {}\n```\n\n#### 参数\n\n- `object` (`T | null | undefined`): 要选择属性的对象。\n- `...props` (`Array<Many<PropertyPath>>`): 要选择的属性键。可以指定单个键、键数组或深层键路径。\n\n#### 返回值\n\n(`Pick<T, U> | Partial<T>`): 返回仅包含指定属性的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/pickBy.md",
    "content": "# pickBy (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `pickBy`\n\n这个 `pickBy` 函数由于类数组对象检查、`iteratee` 转换和键转换过程而相对较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [`pickBy`](../../object/pickBy.md)。\n\n:::\n\n创建一个新对象,仅选择断言函数返回true的属性。\n\n```typescript\nconst result = pickBy(obj, predicate);\n```\n\n## 用法\n\n### `pickBy(object, predicate)`\n\n对对象的每个属性执行断言函数,并创建一个新对象,仅包含断言返回true的属性。适用于根据条件动态选择属性。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\n// 仅选择特定类型的值\nconst data = { a: 1, b: 'keep', c: 3, d: 'select' };\nconst strings = pickBy(data, value => typeof value === 'string');\n// 结果: { b: 'keep', d: 'select' }\n\n// 根据条件选择属性\nconst user = { id: 1, name: 'John', age: 0, active: true, email: '' };\nconst validData = pickBy(user, value => Boolean(value));\n// 结果: { id: 1, name: 'John', active: true } (仅真值)\n\n// 按键名过滤\nconst settings = { userSetting: true, adminSetting: false, debugMode: true };\nconst userOnly = pickBy(settings, (value, key) => key.startsWith('user'));\n// 结果: { userSetting: true }\n\n// 仅选择数字属性\nconst mixed = { str: 'hello', num1: 42, bool: true, num2: 0, obj: {} };\nconst numbersOnly = pickBy(mixed, value => typeof value === 'number');\n// 结果: { num1: 42, num2: 0 }\n\n// 也可用于数组\nconst arr = [1, 2, 3, 4, 5];\nconst evens = pickBy(arr, value => value % 2 === 0);\n// 结果: { '1': 2, '3': 4 } (偶数的索引和值)\n\n// 利用值、键和原始对象\nconst scores = { math: 90, science: 75, english: 85, art: 60 };\nconst highScores = pickBy(scores, (value, key, obj) => {\n  const average = Object.values(obj).reduce((a, b) => a + b) / Object.keys(obj).length;\n  return value > average;\n});\n// 结果: { math: 90, english: 85 }\n```\n\n不带断言函数调用时,仅选择真值。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: '', c: 0, d: 'hello', e: null, f: true };\nconst truthyValues = pickBy(data);\n// 结果: { a: 1, d: 'hello', f: true }\n```\n\n`null` 或 `undefined` 被视为空对象。\n\n```typescript\nimport { pickBy } from 'es-toolkit/compat';\n\npickBy(null, () => true); // {}\npickBy(undefined, () => true); // {}\n```\n\n#### 参数\n\n- `object` (`Record<string, T> | Record<number, T> | object | null | undefined`): 要过滤的源对象。\n- `predicate` (`ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>`, 可选): 对每个属性执行的断言函数。此函数返回true的属性将被选择。默认为 `identity` 函数。\n\n#### 返回值\n\n(`Record<string, S> | Record<number, S> | Partial<T>`): 返回一个由满足条件的属性组成的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/property.md",
    "content": "# property (Lodash 兼容性)\n\n::: warning 请直接使用 `get` 函数\n\n这个 `property` 函数是一个内部调用 `get` 函数的包装函数,会产生额外的函数调用开销。\n\n请改用更快、更现代的 `get` 函数,或使用可选链(`?.`)。\n\n:::\n\n创建一个检索指定路径值的函数。\n\n```typescript\nconst getter = property(path);\n```\n\n## 用法\n\n### `property(path)`\n\n当您想创建一个从特定路径检索值的函数时,请使用 `property`。创建的函数可以在多个对象中重用,便于与数组方法一起使用。\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\n// 基本用法\nconst getName = property('name');\nconst user = { name: 'John', age: 30 };\nconst result = getName(user);\n// 结果: 'John'\n\n// 深层路径访问\nconst getNestedValue = property('user.profile.name');\nconst data = { user: { profile: { name: 'Alice', age: 25 } } };\nconst nestedResult = getNestedValue(data);\n// 结果: 'Alice'\n\n// 使用数组路径\nconst getByArray = property(['user', 'profile', 'name']);\nconst arrayResult = getByArray(data);\n// 结果: 'Alice'\n\n// 与数组方法一起使用\nconst users = [\n  { user: { profile: { name: 'John' } } },\n  { user: { profile: { name: 'Jane' } } },\n  { user: { profile: { name: 'Bob' } } },\n];\nconst names = users.map(property('user.profile.name'));\n// 结果: ['John', 'Jane', 'Bob']\n\n// 数组索引访问\nconst getFirstItem = property('[0]');\nconst items = ['first', 'second', 'third'];\nconst firstItem = getFirstItem(items);\n// 结果: 'first'\n\n// 数字键访问\nconst getIndex = property(1);\nconst arr = ['a', 'b', 'c'];\nconst secondItem = getIndex(arr);\n// 结果: 'b'\n```\n\n如果路径不存在,则返回 `undefined`。\n\n```typescript\nimport { property } from 'es-toolkit/compat';\n\nconst getMissing = property('nonexistent.path');\nconst result = getMissing({ some: 'data' });\n// 结果: undefined\n```\n\n#### 参数\n\n- `path` (`PropertyPath`): 要检索值的路径。可以是字符串、数字、符号或这些类型的数组。\n\n#### 返回值\n\n(`(object: T) => R`): 返回一个函数,该函数从给定对象返回指定路径处的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/propertyOf.md",
    "content": "# propertyOf (Lodash 兼容性)\n\n::: warning 请直接使用 `get` 函数\n\n这个 `propertyOf` 函数是一个内部调用 `get` 函数的包装函数,会产生额外的函数调用开销。\n\n请改用更快、更现代的 `get` 函数,或使用可选链(`?.`)。\n\n:::\n\n创建一个从特定对象的各种路径检索值的函数。\n\n```typescript\nconst getter = propertyOf(obj);\n```\n\n## 用法\n\n### `propertyOf(object)`\n\n当您想创建一个从单个对象的多个路径检索值的函数时,请使用 `propertyOf`。与 `property` 相反,它先固定对象,允许您查询各种路径。\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\n// 基本用法\nconst data = { name: 'John', age: 30, city: 'New York' };\nconst getValue = propertyOf(data);\n\nconst name = getValue('name');\n// 结果: 'John'\n\nconst age = getValue('age');\n// 结果: 30\n\n// 深层路径访问\nconst complexData = {\n  user: { profile: { name: 'Alice', age: 25 } },\n  settings: { theme: 'dark', lang: 'en' },\n};\nconst getComplexValue = propertyOf(complexData);\n\nconst userName = getComplexValue('user.profile.name');\n// 结果: 'Alice'\n\nconst theme = getComplexValue('settings.theme');\n// 结果: 'dark'\n\n// 使用数组路径\nconst arrayPath = getComplexValue(['user', 'profile', 'age']);\n// 结果: 25\n\n// 将多个路径作为数组处理\nconst paths = ['user.profile.name', 'settings.theme', 'settings.lang'];\nconst values = paths.map(getComplexValue);\n// 结果: ['Alice', 'dark', 'en'] (每个路径的值)\n\n// 数组索引访问\nconst arrayData = [10, 20, 30];\nconst getArrayValue = propertyOf(arrayData);\nconst firstItem = getArrayValue(0);\n// 结果: 10\n\nconst secondItem = getArrayValue('[1]');\n// 结果: 20\n```\n\n如果路径不存在,则返回 `undefined`。\n\n```typescript\nimport { propertyOf } from 'es-toolkit/compat';\n\nconst data = { a: 1, b: 2 };\nconst getValue = propertyOf(data);\nconst missing = getValue('nonexistent.path');\n// 结果: undefined\n```\n\n#### 参数\n\n- `object` (`T`): 要检索值的目标对象。\n\n#### 返回值\n\n(`(path: PropertyPath) => any`): 返回一个函数,该函数在给定路径处返回对象的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/result.md",
    "content": "# result (Lodash 兼容性)\n\n::: warning 使用 `get` 函数或可选链\n\n这个 `result` 函数由于复杂的路径处理和函数调用逻辑而性能缓慢。\n\n建议使用更快且更现代的 `get` 函数或可选链(`?.`)。\n\n:::\n\n从对象的路径中获取值,但如果遇到函数则调用它并返回结果。\n\n```typescript\nconst result = result(obj, path, defaultValue);\n```\n\n## 用法\n\n### `result(object, path, defaultValue)`\n\n当您想从对象的路径中获取值并自动调用路径上的函数时,使用 `result`。它与 `get` 函数类似,但会执行遇到的函数,如果最终值也是函数则调用并返回结果。\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\n// 基本用法(普通值)\nconst obj = { a: { b: { c: 3 } } };\nconst value = result(obj, 'a.b.c');\n// 结果: 3\n\n// 自动函数调用\nconst objWithFunc = {\n  compute: () => ({ value: 42 }),\n  getValue: function () {\n    return this.compute().value;\n  },\n};\nconst computed = result(objWithFunc, 'getValue');\n// 结果: 42 (调用 getValue 函数)\n\n// 路径上的函数调用\nconst nested = {\n  data: () => ({ user: { getName: () => 'John' } }),\n};\nconst name = result(nested, 'data.user.getName');\n// 结果: 'John' (data() 和 getName() 都被调用)\n\n// 使用默认值\nconst incomplete = { a: { b: null } };\nconst withDefault = result(incomplete, 'a.b.c', 'default value');\n// 结果: 'default value'\n\n// 默认值是函数的情况\nconst withFuncDefault = result(incomplete, 'a.b.c', () => 'computed default');\n// 结果: 'computed default' (调用默认值函数)\n\n// 使用数组路径\nconst arrayPath = result(objWithFunc, ['getValue']);\n// 结果: 42\n\n// 动态默认值\nconst dynamic = result(incomplete, 'missing.path', function () {\n  return `Generated at ${new Date().toISOString()}`;\n});\n// 结果: 包含当前时间的字符串\n```\n\n调用函数时 `this` 上下文会被保留。\n\n```typescript\nimport { result } from 'es-toolkit/compat';\n\nconst calculator = {\n  multiplier: 2,\n  compute: function () {\n    return 10 * this.multiplier;\n  },\n};\n\nconst calculatedValue = result(calculator, 'compute');\n// 结果: 20 (this.multiplier 被正确引用)\n```\n\n#### 参数\n\n- `object` (`any`): 要查询的对象。\n- `path` (`PropertyPath`): 要获取的属性路径。可以是字符串、数组或键的数组。\n- `defaultValue` (`R | ((...args: any[]) => R)`, 可选): 当值为 `undefined` 时返回的默认值。如果是函数,则调用并返回结果。\n\n#### 返回值\n\n(`R`): 返回解析的值。路径上的函数会被调用,如果最终值也是函数,则返回调用后的结果。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/set.md",
    "content": "# set (Lodash 兼容性)\n\n::: warning 请使用直接赋值\n\n此 `set` 函数内部调用 `updateWith` 函数,由于复杂的路径处理和对象创建逻辑而运行缓慢。\n\n请使用更快、更现代的直接赋值或解构赋值。\n\n:::\n\n在对象的指定路径设置值。\n\n```typescript\nconst result = set(obj, path, value);\n```\n\n## 用法\n\n### `set(object, path, value)`\n\n当您想在对象的特定路径设置值时,请使用 `set`。如果路径的任何部分不存在,将自动创建。在处理嵌套对象或数组时很有用。\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\n// 基本用法\nconst obj = { a: { b: { c: 3 } } };\nset(obj, 'a.b.c', 4);\nconsole.log(obj.a.b.c); // 4\n\n// 在数组中设置值\nconst arr = [1, 2, 3];\nset(arr, '1', 4);\nconsole.log(arr[1]); // 4\n\n// 创建不存在的路径\nconst empty = {};\nset(empty, 'user.profile.name', 'John');\nconsole.log(empty);\n// 结果: { user: { profile: { name: 'John' } } }\n\n// 使用数组路径\nconst data = {};\nset(data, ['nested', 'array', 0], 'first item');\nconsole.log(data);\n// 结果: { nested: { array: ['first item'] } }\n\n// 自动创建数组索引\nconst list = {};\nset(list, 'items[0]', 'first');\nset(list, 'items[2]', 'third');\nconsole.log(list);\n// 结果: { items: ['first', undefined, 'third'] }\n\n// 混合嵌套对象和数组\nconst complex = {};\nset(complex, 'users[0].profile.settings.theme', 'dark');\nconsole.log(complex);\n// 结果: { users: [{ profile: { settings: { theme: 'dark' } } }] }\n\n// 处理数字键\nconst numeric = {};\nset(numeric, 123, 'number key');\nconsole.log(numeric[123]); // 'number key'\n\n// 覆盖现有值\nconst existing = { a: { b: 'old' } };\nset(existing, 'a.b', 'new');\nconsole.log(existing.a.b); // 'new'\n```\n\n原始对象被直接修改并返回。\n\n```typescript\nimport { set } from 'es-toolkit/compat';\n\nconst original = { x: 1 };\nconst result = set(original, 'y', 2);\n\nconsole.log(original === result); // true\nconsole.log(original); // { x: 1, y: 2 }\n```\n\n#### 参数\n\n- `object` (`T`): 要设置值的对象。\n- `path` (`PropertyPath`): 要设置的属性路径。可以是字符串、数组或键的数组。\n- `value` (`any`): 要设置的值。\n\n#### 返回值\n\n(`T`): 返回修改后的对象(与原始对象相同)。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/setWith.md",
    "content": "# setWith (Lodash 兼容性)\n\n::: warning 请使用直接赋值\n\n此 `setWith` 函数内部调用 `updateWith` 函数,由于复杂的路径处理和自定义函数逻辑而运行缓慢。\n\n请使用更快、更现代的直接赋值或解构赋值。\n\n:::\n\n在指定路径设置值,同时通过自定义函数控制对象的创建方式。\n\n```typescript\nconst result = setWith(obj, path, value, customizer);\n```\n\n## 用法\n\n### `setWith(object, path, value, customizer)`\n\n当您想在对象的特定路径设置值,同时使用自定义函数控制中间对象的类型时,请使用 `setWith`。如果自定义函数返回 `undefined`,则使用默认逻辑(数组索引使用数组,否则使用对象)。\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\n// 基本用法(无自定义函数)\nconst obj1 = {};\nsetWith(obj1, 'a.b.c', 4);\nconsole.log(obj1);\n// 结果: { a: { b: { c: 4 } } }\n\n// 强制创建数组的自定义函数\nconst obj2 = {};\nsetWith(obj2, '[0][1]', 'value', () => []);\nconsole.log(obj2);\n// 结果: { '0': [undefined, 'value'] }\n\n// 仅在特定条件下自定义\nconst obj3 = {};\nsetWith(obj3, 'a[0].b.c', 'nested', (value, key) => {\n  // 仅对数字键(数组索引)返回空对象\n  return typeof key === 'string' && /^\\d+$/.test(key) ? {} : undefined;\n});\nconsole.log(obj3);\n// 结果: { a: { '0': { b: { c: 'nested' } } } }\n\n// 使用 Object 构造函数作为自定义函数\nconst obj4 = {};\nsetWith(obj4, 'x[0].y', 42, Object);\nconsole.log(obj4);\n// 结果: { x: { '0': { y: 42 } } }\n\n// 复杂的自定义函数逻辑\nconst obj5 = {};\nsetWith(obj5, 'data.items[0].props.config', 'value', (value, key, object) => {\n  console.log('Creating:', key, 'in', object);\n\n  // 对特定键使用 Map\n  if (key === 'props') {\n    return new Map();\n  }\n\n  // 对数字键使用数组\n  if (typeof key === 'string' && /^\\d+$/.test(key)) {\n    return [];\n  }\n\n  // 默认使用普通对象\n  return {};\n});\n\n// 使用 WeakMap 作为中间对象\nconst obj6 = {};\nsetWith(obj6, 'cache.user.profile', 'data', (value, key) => {\n  if (key === 'cache') {\n    return new WeakMap();\n  }\n  return undefined; // 使用默认行为\n});\n```\n\n自定义函数接收三个参数。\n\n```typescript\nimport { setWith } from 'es-toolkit/compat';\n\nconst obj = {};\nsetWith(obj, 'a.b[0].c', 'value', (nsValue, key, nsObject) => {\n  console.log('nsValue:', nsValue); // 当前值(通常为 undefined)\n  console.log('key:', key); // 要创建的键\n  console.log('nsObject:', nsObject); // 父对象\n\n  // 根据特定条件返回不同的对象类型\n  return key === 'b' ? [] : {};\n});\n```\n\n#### 参数\n\n- `object` (`T`): 要设置值的对象。\n- `path` (`PropertyPath`): 要设置的属性路径。\n- `value` (`any`): 要设置的值。\n- `customizer` (`(nsValue: any, key: string, nsObject: T) => any`, 可选): 自定义中间对象创建的函数。\n\n#### 返回值\n\n(`T | R`): 返回修改后的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/toDefaulted.md",
    "content": "# toDefaulted (Lodash 兼容性)\n\n::: warning 请使用展开运算符或 `Object.assign`\n\n此 `toDefaulted` 函数由于深度克隆和复杂的默认值处理而运行缓慢。\n\n请使用更快、更现代的展开运算符(`...`)或 `Object.assign()`。\n\n:::\n\n通过向对象应用默认值来创建新对象。\n\n```typescript\nconst defaulted = toDefaulted(object, ...sources);\n```\n\n## 用法\n\n### `toDefaulted(object, ...sources)`\n\n当您想通过将一个或多个源对象的默认值应用到目标对象来创建新对象时,请使用 `toDefaulted`。仅为 `undefined` 的属性或来自 `Object.prototype` 的属性设置默认值。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\n// 基本默认值分配\nconst user = { name: 'John' };\nconst defaults = { name: 'Anonymous', age: 25, role: 'user' };\ntoDefaulted(user, defaults);\n// => { name: 'John', age: 25, role: 'user' }\n\n// 从多个源应用默认值\nconst config = { theme: 'dark' };\nconst defaults1 = { theme: 'light', lang: 'en' };\nconst defaults2 = { lang: 'ko', region: 'Asia' };\ntoDefaulted(config, defaults1, defaults2);\n// => { theme: 'dark', lang: 'en', region: 'Asia' }\n```\n\n只有 `undefined` 值会被默认值替换,`null` 值会保留。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst data = {\n  name: undefined,\n  age: null,\n  active: false,\n};\nconst defaults = {\n  name: 'Default',\n  age: 18,\n  active: true,\n  role: 'user',\n};\n\ntoDefaulted(data, defaults);\n// => { name: 'Default', age: null, active: false, role: 'user' }\n```\n\n原始对象不会被修改;返回一个新对象。\n\n```typescript\nimport { toDefaulted } from 'es-toolkit/compat';\n\nconst original = { a: 1 };\nconst result = toDefaulted(original, { a: 2, b: 3 });\n\nconsole.log(original); // { a: 1 } (未修改)\nconsole.log(result); // { a: 1, b: 3 } (新对象)\n```\n\n#### 参数\n\n- `object` (`object`): 将接收默认值的目标对象。\n- `sources` (`object[]`): 提供默认值的源对象。从左到右的顺序应用。\n\n#### 返回值\n\n(`object`): 返回应用了默认值的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/toPairs.md",
    "content": "# toPairs (Lodash 兼容性)\n\n::: warning 请使用 `Object.entries`\n\n此 `toPairs` 函数由于处理 `Map` 和 `Set`、数组类对象处理等复杂逻辑而运行缓慢。\n\n请使用更快、更现代的 `Object.entries()`。\n\n:::\n\n将对象转换为键值对数组。\n\n```typescript\nconst pairs = toPairs(object);\n```\n\n## 用法\n\n### `toPairs(object)`\n\n当您想将对象自身的可枚举属性转换为 `[键, 值]` 形式的数组时,请使用 `toPairs`。不包括继承的属性。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// 基本对象转换\nconst object = { a: 1, b: 2, c: 3 };\ntoPairs(object);\n// => [['a', 1], ['b', 2], ['c', 3]]\n\n// 具有数字键的对象\nconst numbers = { 0: 'zero', 1: 'one', 2: 'two' };\ntoPairs(numbers);\n// => [['0', 'zero'], ['1', 'one'], ['2', 'two']]\n```\n\n也可以处理 `Map` 和 `Set`。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\n// Map 对象转换\nconst map = new Map();\nmap.set('name', 'John');\nmap.set('age', 30);\ntoPairs(map);\n// => [['name', 'John'], ['age', 30]]\n\n// Set 对象转换(值与键相同)\nconst set = new Set([1, 2, 3]);\ntoPairs(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n安全处理 `null` 或 `undefined`。\n\n```typescript\nimport { toPairs } from 'es-toolkit/compat';\n\ntoPairs(null);\n// => []\n\ntoPairs(undefined);\n// => []\n```\n\n#### 参数\n\n- `object` (`object`): 要转换的对象、Map 或 Set。\n\n#### 返回值\n\n(`Array<[string, any]>`): 返回键值对数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/toPairsIn.md",
    "content": "# toPairsIn (Lodash 兼容性)\n\n::: warning 请使用 `Object.entries` 或 `for...in` 循环\n\n此 `toPairsIn` 函数由于处理继承属性、`Map` 和 `Set` 处理等复杂逻辑而运行缓慢。\n\n请使用更快、更现代的 `Object.entries()`,或者如果需要继承属性,请使用 `for...in` 循环。\n\n:::\n\n将对象转换为键值对数组,包括继承的属性。\n\n```typescript\nconst pairs = toPairsIn(object);\n```\n\n## 用法\n\n### `toPairsIn(object)`\n\n当您想将对象的所有可枚举属性(包括继承的属性)转换为 `[键, 值]` 形式的数组时,请使用 `toPairsIn`。与 `toPairs` 不同,原型链中的属性也会被包含。\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// 基本对象转换\nconst object = { a: 1, b: 2 };\ntoPairsIn(object);\n// => [['a', 1], ['b', 2]]\n\n// 包括继承的属性\nfunction Parent() {\n  this.inherited = 'value';\n}\nParent.prototype.proto = 'property';\n\nconst child = new Parent();\nchild.own = 'own';\ntoPairsIn(child);\n// => [['inherited', 'value'], ['own', 'own'], ['proto', 'property']]\n```\n\n也可以处理 `Map` 和 `Set`。\n\n```typescript\nimport { toPairsIn } from 'es-toolkit/compat';\n\n// Map 对象转换\nconst map = new Map([\n  ['key1', 'value1'],\n  ['key2', 'value2'],\n]);\ntoPairsIn(map);\n// => [['key1', 'value1'], ['key2', 'value2']]\n\n// Set 对象转换\nconst set = new Set([1, 2, 3]);\ntoPairsIn(set);\n// => [[1, 1], [2, 2], [3, 3]]\n```\n\n#### 参数\n\n- `object` (`object`): 要转换的对象、Map 或 Set。\n\n#### 返回值\n\n(`Array<[string, any]>`): 返回键值对数组(包括继承的属性)。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/transform.md",
    "content": "# transform (Lodash 兼容性)\n\n::: warning 请使用 `reduce` 或 `Object.entries`\n\n此 `transform` 函数由于复杂的内部逻辑而运行缓慢。在大多数情况下,可以使用 JavaScript 的内置方法更简单地实现。\n\n请使用更快、更现代的 `reduce` 或 `Object.entries`。\n\n:::\n\n遍历数组或对象,使用累加器累积值以创建新值。\n\n```typescript\nconst result = transform(object, iteratee, accumulator);\n```\n\n## 用法\n\n### `transform(object, iteratee, accumulator)`\n\n当您想遍历数组或对象的每个元素,在累加器中累积值时,请使用 `transform`。当 `iteratee` 函数返回 `false` 时,迭代停止。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 转换数组\nconst numbers = [2, 3, 4];\nconst doubled = transform(\n  numbers,\n  (acc, value) => {\n    acc.push(value * 2);\n  },\n  []\n);\n// 返回: [4, 6, 8]\n\n// 转换对象\nconst obj = { a: 1, b: 2, c: 1 };\nconst grouped = transform(\n  obj,\n  (result, value, key) => {\n    (result[value] || (result[value] = [])).push(key);\n  },\n  {}\n);\n// 返回: { '1': ['a', 'c'], '2': ['b'] }\n```\n\n如果省略累加器,将自动创建空数组或空对象。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\n// 对于数组会创建空数组\nconst result1 = transform([1, 2, 3], (acc, value) => {\n  acc.push(value * 2);\n});\n// 返回: [2, 4, 6]\n\n// 对于对象会创建空对象\nconst result2 = transform({ a: 1, b: 2 }, (acc, value, key) => {\n  acc[key] = value * 2;\n});\n// 返回: { a: 2, b: 4 }\n```\n\n可以通过在 `iteratee` 函数中返回 `false` 来停止迭代。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst numbers = [1, 2, 3, 4, 5];\nconst result = transform(\n  numbers,\n  (acc, value) => {\n    if (value > 3) {\n      return false; // 停止迭代\n    }\n    acc.push(value * 2);\n  },\n  []\n);\n// 返回: [2, 4, 6] (4 和 5 未处理)\n```\n\n如果省略 `iteratee` 函数,则返回一个空对象或空数组。\n\n```typescript\nimport { transform } from 'es-toolkit/compat';\n\nconst array = [1, 2, 3];\nconst copy1 = transform(array);\n// 返回: []\n\nconst obj = { a: 1, b: 2 };\nconst copy2 = transform(obj);\n// 返回: {}\n```\n\n#### 参数\n\n- `object` (`readonly T[] | T`, 可选): 要迭代的数组或对象。\n- `iteratee` (`(accumulator: U, value: T | T[keyof T], key: any, object: readonly T[] | T) => unknown`, 可选): 为每个元素执行的函数。返回 `false` 会停止迭代。默认为 `identity` 函数。\n- `accumulator` (`U`, 可选): 初始值。如果省略,数组会创建空数组,对象会创建空对象。\n\n#### 返回值\n\n(`U | any[] | Record<string, any>`): 返回累积的结果。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/unset.md",
    "content": "# unset (Lodash 兼容性)\n\n::: warning 请使用 `delete` 运算符\n\n此 `unset` 函数由于复杂的路径解析和嵌套对象处理而运行缓慢。\n\n请直接使用更快、更现代的 `delete` 运算符。\n\n:::\n\n删除对象指定路径的属性。\n\n```typescript\nconst success = unset(obj, path);\n```\n\n## 用法\n\n### `unset(obj, path)`\n\n当您想要删除嵌套对象中特定路径的属性时，使用 `unset`。路径可以指定为字符串或数组。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\n// 使用字符串路径删除嵌套属性\nconst obj = { a: { b: { c: 42 } } };\nunset(obj, 'a.b.c'); // => true\nconsole.log(obj); // { a: { b: {} } }\n\n// 使用数组路径删除嵌套属性\nconst obj2 = { a: { b: { c: 42 } } };\nunset(obj2, ['a', 'b', 'c']); // => true\nconsole.log(obj2); // { a: { b: {} } }\n```\n\n也可以通过数组索引删除元素。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst arr = [1, 2, 3, 4];\nunset(arr, 1); // => true\nconsole.log(arr); // [1, undefined, 3, 4]（元素被删除并变为 undefined）\n```\n\n即使属性不存在或已被删除，也会返回 `true`。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nconst obj = { a: { b: 1 } };\nunset(obj, 'a.c'); // => true（不存在的属性）\n```\n\n`null` 或 `undefined` 对象会被安全处理。\n\n```typescript\nimport { unset } from 'es-toolkit/compat';\n\nunset(null, 'a.b'); // => true\nunset(undefined, 'a.b'); // => true\n```\n\n#### 参数\n\n- `obj` (`any`): 要修改的对象。\n- `path` (`PropertyKey | PropertyKey[]`): 要删除的属性路径。\n\n#### 返回值\n\n(`boolean`): 如果属性被删除则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/update.md",
    "content": "# update (Lodash 兼容性)\n\n::: warning 请使用直接赋值\n\n此 `update` 函数由于复杂的路径解析和嵌套对象创建逻辑而运行缓慢。\n\n请使用更快、更现代的直接属性赋值或可选链。\n\n:::\n\n使用更新函数更新对象指定路径的值。\n\n```typescript\nconst updated = update(obj, path, updater);\n```\n\n## 用法\n\n### `update(obj, path, updater)`\n\n当您想要使用函数转换嵌套对象中特定路径的值时，使用 `update`。如果路径不存在，将自动创建。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// 转换嵌套属性值\nconst object = { a: [{ b: { c: 3 } }] };\nupdate(object, 'a[0].b.c', n => (n as number) * 2);\n// => { a: [{ b: { c: 6 } }] }\n\n// 使用数组路径更新\nupdate(object, ['a', 0, 'b', 'c'], n => (n as number) + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\n如果路径不存在，将自动创建必要的嵌套结构。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\n// 在空对象中创建嵌套结构\nupdate({}, 'a.b.c', () => 'hello');\n// => { a: { b: { c: 'hello' } } }\n\n// 数组也会自动创建\nupdate({}, 'a.b[0]', () => 'value');\n// => { a: { b: ['value'] } }\n```\n\n可以基于现有值计算新值。\n\n```typescript\nimport { update } from 'es-toolkit/compat';\n\nconst stats = { score: 100 };\nupdate(stats, 'score', score => score * 1.1); // 增加 10%\n// => { score: 110 }\n```\n\n#### 参数\n\n- `obj` (`object`): 要修改的对象。\n- `path` (`PropertyKey | PropertyKey[]`): 要更新的属性路径。可以指定为字符串或数组。\n- `updater` (`(value: any) => any`): 接收现有值并返回新值的函数。\n\n#### 返回值\n\n(`any`): 返回修改后的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/updateWith.md",
    "content": "# updateWith (Lodash 兼容性)\n\n::: warning 请使用直接赋值\n\n此 `updateWith` 函数由于复杂的路径解析和自定义函数处理而运行缓慢。\n\n请使用更快、更现代的直接属性赋值或可选链。\n\n:::\n\n使用更新函数更新对象指定路径的值,同时使用自定义函数控制路径创建。\n\n```typescript\nconst updated = updateWith(obj, path, updater, customizer);\n```\n\n## 用法\n\n### `updateWith(obj, path, updater, customizer?)`\n\n与 `update` 类似，但可以使用自定义函数控制路径不存在时创建的中间对象的形状。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\n// 基本行为（与 update 相同）\nconst object = { a: [{ b: { c: 3 } }] };\nupdateWith(object, 'a[0].b.c', n => n * n);\n// => { a: [{ b: { c: 9 } }] }\n\n// 使用数组路径更新\nupdateWith(object, ['a', 0, 'b', 'c'], n => n + 10);\n// => { a: [{ b: { c: 13 } }] }\n```\n\n可以使用自定义函数控制创建的中间对象的形状。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = {};\n\n// 使用 Object 构造函数作为自定义函数（创建对象而不是数组）\nupdateWith(object, '[0][1]', () => 'a', Object);\n// => { '0': { '1': 'a' } }\n// （默认行为是 { '0': ['a'] }）\n```\n\n自定义函数接收要创建的值、键和对象作为参数。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst customizer = (value: any, key: string, object: any) => {\n  // 对于数字键创建对象而不是数组\n  if (!isNaN(Number(key))) {\n    return {};\n  }\n};\n\nconst result = {};\nupdateWith(result, '[0][1]', () => 'value', customizer);\n// => { '0': { '1': 'value' } }\n```\n\n如果路径已存在，则不会调用自定义函数。\n\n```typescript\nimport { updateWith } from 'es-toolkit/compat';\n\nconst object = { a: { b: 1 } };\nupdateWith(\n  object,\n  'a.b',\n  n => n * 2,\n  () => {\n    console.log('Not called'); // 不会被调用\n    return {};\n  }\n);\n// => { a: { b: 2 } }\n```\n\n#### 参数\n\n- `obj` (`T`): 要修改的对象。\n- `path` (`PropertyKey | readonly PropertyKey[]`): 要更新的属性路径。可以指定为字符串或数组。\n- `updater` (`(oldValue: any) => any`): 接收现有值并返回新值的函数。\n- `customizer` (`(value: any, key: string, object: T) => any`, 可选): 路径不存在时返回要创建的中间对象的函数。返回 `undefined` 以使用默认行为。\n\n#### 返回值\n\n(`T`): 返回修改后的对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/values.md",
    "content": "# values (Lodash 兼容性)\n\n::: warning 请使用 `Object.values`\n\n此 `values` 函数只是简单调用 `Object.values`,存在不必要的开销。\n\n请直接使用更快、更现代的 `Object.values()`。\n\n:::\n\n返回对象自身可枚举属性值的数组。\n\n```typescript\nconst valueArray = values(obj);\n```\n\n## 用法\n\n### `values(obj)`\n\n当您想要将对象的所有属性值作为数组获取时，使用 `values`。它与 `Object.values` 相同，但可以安全地处理 `null` 或 `undefined`。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// 获取对象值\nconst obj = { a: 1, b: 2, c: 3 };\nvalues(obj); // => [1, 2, 3]\n\n// 具有数字键的对象\nconst numberKeyObj = { 0: 'a', 1: 'b', 2: 'c' };\nvalues(numberKeyObj); // => ['a', 'b', 'c']\n```\n\n也可以处理数组或类数组对象。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\n// 数组\nvalues([1, 2, 3]); // => [1, 2, 3]\n\n// 字符串（类数组对象）\nvalues('hello'); // => ['h', 'e', 'l', 'l', 'o']\n```\n\n`null` 或 `undefined` 会被视为空数组。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nvalues(null); // => []\nvalues(undefined); // => []\n```\n\n仅返回可枚举属性。\n\n```typescript\nimport { values } from 'es-toolkit/compat';\n\nconst obj = Object.create(\n  { inherited: 'not included' },\n  {\n    own: { value: 'included', enumerable: true },\n    nonEnum: { value: 'not included', enumerable: false },\n  }\n);\n\nvalues(obj); // => ['included']\n```\n\n#### 参数\n\n- `obj` (`Record<PropertyKey, T> | ArrayLike<T> | null | undefined`): 要获取属性值的对象。\n\n#### 返回值\n\n(`T[]`): 返回对象的可枚举属性值数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/object/valuesIn.md",
    "content": "# valuesIn (Lodash 兼容性)\n\n::: warning 请使用 `Object.values`\n\n此 `valuesIn` 函数由于处理原型属性的复杂逻辑而运行缓慢。\n\n请使用更快、更现代的 `Object.values`。\n\n:::\n\n返回对象所有属性值的数组,包括继承的原型属性。\n\n```typescript\nconst values = valuesIn(obj);\n```\n\n## 用法\n\n### `valuesIn(object)`\n\n当您想从对象获取所有属性值作为数组时,请使用 `valuesIn`。与普通的 `Object.values` 不同,它还包括从原型链继承的属性值。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nconst obj = { a: 1, b: 2, c: 3 };\nvaluesIn(obj); // [1, 2, 3]\n\n// 也可以处理数组\nvaluesIn([1, 2, 3]); // [1, 2, 3]\n```\n\n包括从原型继承的属性。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nfunction Parent() {\n  this.a = 1;\n}\nParent.prototype.inherited = 'fromParent';\n\nfunction Child() {\n  Parent.call(this);\n  this.b = 2;\n}\nChild.prototype = Object.create(Parent.prototype);\nChild.prototype.childProp = 'childValue';\n\nconst obj = new Child();\nvaluesIn(obj); // [1, 2, 'childValue', 'fromParent'] (排除 constructor)\n```\n\n将 `null` 或 `undefined` 处理为空数组。\n\n```typescript\nimport { valuesIn } from 'es-toolkit/compat';\n\nvaluesIn(null); // []\nvaluesIn(undefined); // []\n```\n\n#### 参数\n\n- `object` (`any`): 要查询值的对象。\n\n#### 返回值\n\n(`any[]`): 返回包含对象所有属性值的数组。包括继承的原型属性的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/conforms.md",
    "content": "# conforms (Lodash 兼容性)\n\n接收一个包含条件函数的对象，创建一个函数来检查其他对象是否满足所有条件。\n\n```typescript\nconst checker = conforms(predicates);\n```\n\n## 用法\n\n### `conforms(source)`\n\n当您需要一次性检查多个属性的条件时，请使用 `conforms`。此函数生成一个验证函数，在后续检查多个对象时非常有用。\n\n```typescript\nimport { conforms } from 'es-toolkit/compat';\n\n// 定义条件函数\nconst isPositive = n => n > 0;\nconst isEven = n => n % 2 === 0;\nconst isString = s => typeof s === 'string';\n\n// 创建包含多个条件的验证函数\nconst validator = conforms({\n  a: isPositive,\n  b: isEven,\n  c: isString,\n});\n\n// 验证对象\nvalidator({ a: 2, b: 4, c: 'hello' }); // true (满足所有条件)\nvalidator({ a: -1, b: 4, c: 'hello' }); // false (a 不是正数)\nvalidator({ a: 2, b: 3, c: 'hello' }); // false (b 不是偶数)\nvalidator({ a: 2, b: 4, c: 123 }); // false (c 不是字符串)\n\n// 在数组过滤中使用\nconst users = [\n  { age: 25, score: 80, name: 'Alice' },\n  { age: 17, score: 95, name: 'Bob' },\n  { age: 30, score: 75, name: 'Charlie' },\n];\n\nconst adultHighScorer = conforms({\n  age: n => n >= 18,\n  score: n => n >= 80,\n});\n\nconst filteredUsers = users.filter(adultHighScorer);\n// [{ age: 25, score: 80, name: 'Alice' }]\n```\n\n#### 参数\n\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): 包含各属性条件函数的对象。\n\n#### 返回值\n\n(`(object: Record<PropertyKey, any>) => boolean`): 返回一个函数，用于检查给定对象是否满足所有条件。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/conformsTo.md",
    "content": "# conformsTo (Lodash 兼容性)\n\n检查对象是否满足给定的所有条件函数。\n\n```typescript\nconst result = conformsTo(target, source);\n```\n\n## 用法\n\n### `conformsTo(target, source)`\n\n当您需要检查对象的属性是否都满足指定条件时，请使用 `conformsTo`。对每个属性应用相应的条件函数并确认结果。\n\n```typescript\nimport { conformsTo } from 'es-toolkit/compat';\n\n// 基本用法\nconst object = { a: 1, b: 2 };\nconst conditions = {\n  a: n => n > 0,\n  b: n => n > 1,\n};\n\nconformsTo(object, conditions); // true (满足所有条件)\n\n// 多种条件\nconst user = { name: 'Alice', age: 25, active: true };\nconst userValidation = {\n  name: s => typeof s === 'string' && s.length > 0,\n  age: n => typeof n === 'number' && n >= 18,\n  active: b => typeof b === 'boolean',\n};\n\nconformsTo(user, userValidation); // true\n\n// 不满足条件的情况\nconst invalidUser = { name: '', age: 15, active: 'yes' };\nconformsTo(invalidUser, userValidation); // false\n\n// 部分条件检查\nconst partialConditions = {\n  age: n => n >= 21,\n};\nconformsTo(user, partialConditions); // true (仅检查 age)\n\n// 缺少属性的情况\nconst incompleteObject = { a: 1 }; // 没有 b 属性\nconst strictConditions = {\n  a: n => n > 0,\n  b: n => n > 0,\n};\nconformsTo(incompleteObject, strictConditions); // false (没有 b 属性)\n```\n\n#### 参数\n\n- `target` (`Record<PropertyKey, any>`): 要检查的对象。\n- `source` (`Record<PropertyKey, (value: any) => boolean>`): 包含各属性条件函数的对象。\n\n#### 返回值\n\n(`boolean`): 如果对象满足所有条件则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isArguments.md",
    "content": "# isArguments (Lodash 兼容性)\n\n检查值是否为 arguments 对象。\n\n```typescript\nconst result = isArguments(value);\n```\n\n## 用法\n\n### `isArguments(value)`\n\n当您需要检查给定值是否为函数的 arguments 对象时，请使用 `isArguments`。此函数在 TypeScript 中也作为类型守卫工作，将值的类型缩小为 `IArguments`。\n\n```typescript\nimport { isArguments } from 'es-toolkit/compat';\n\n// 在普通函数中\nfunction normalFunction() {\n  return isArguments(arguments); // true\n}\n\n// 在严格模式中\nfunction strictFunction() {\n  'use strict';\n  return isArguments(arguments); // true\n}\n\n// 非 arguments 的值\nisArguments([1, 2, 3]); // false\nisArguments({ 0: 'a', 1: 'b', length: 2 }); // false\nisArguments(null); // false\nisArguments(undefined); // false\n\n// 实际使用示例\nfunction example() {\n  if (isArguments(arguments)) {\n    console.log('This is an arguments object');\n    console.log('Length:', arguments.length);\n  }\n}\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值是 arguments 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isArray.md",
    "content": "# isArray (Lodash 兼容性)\n\n::: warning 请使用 `Array.isArray`\n\n此 `isArray` 函数由于额外的函数调用而运行较慢。\n\n请改用更快的现代化 `Array.isArray`。\n\n:::\n\n检查值是否为数组。\n\n```typescript\nconst result = isArray(value);\n```\n\n## 用法\n\n### `isArray(value)`\n\n当您想要检查值是否为数组时，请使用 `isArray`。此函数也可以在 TypeScript 中用作类型守卫。\n\n```typescript\nimport { isArray } from 'es-toolkit/compat';\n\n// 检查数组\nisArray([1, 2, 3]);\n// Returns: true\n\nisArray('abc');\n// Returns: false\n\nisArray(() => {});\n// Returns: false\n\n// 与对象区分\nisArray({ 0: 'a', 1: 'b', length: 2 });\n// Returns: false\n\nisArray(null);\n// Returns: false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为数组的值。\n\n#### 返回值\n\n(`value is any[]`): 如果值是数组则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isArrayBuffer](../../predicate/isArrayBuffer.md)\n此 `isArrayBuffer` 函数由于 Lodash 兼容性的复杂处理而运行较慢。\n\n请改用更快的现代化 `es-toolkit` 的 [isArrayBuffer](../../predicate/isArrayBuffer.md)。\n:::\n\n检查值是否为 ArrayBuffer。\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 用法\n\n### `isArrayBuffer(value)`\n\n当您想要类型安全地检查值是否为 ArrayBuffer 时，请使用 `isArrayBuffer`。在 TypeScript 中也作为类型守卫工作。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/compat';\n\n// 检查 ArrayBuffer\nconst buffer = new ArrayBuffer(16);\nisArrayBuffer(buffer); // true\n\n// 其他类型返回 false\nisArrayBuffer(new Array()); // false\nisArrayBuffer(new Map()); // false\nisArrayBuffer({}); // false\nisArrayBuffer('hello'); // false\nisArrayBuffer(123); // false\nisArrayBuffer(null); // false\nisArrayBuffer(undefined); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 ArrayBuffer 的值。\n\n#### 返回值\n\n(`value is ArrayBuffer`): 如果值是 ArrayBuffer 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isArrayLike.md",
    "content": "# isArrayLike (Lodash 兼容性)\n\n检查值是否为类数组对象。\n\n```typescript\nconst result = isArrayLike(value);\n```\n\n## 用法\n\n### `isArrayLike(value)`\n\n当您需要检查给定值是否为类数组对象时，请使用 `isArrayLike`。数组、字符串、arguments 对象、NodeList 等都属于类数组对象。\n\n```typescript\nimport { isArrayLike } from 'es-toolkit/compat';\n\n// 数组和字符串\nisArrayLike([1, 2, 3]); // true\nisArrayLike('abc'); // true\nisArrayLike(''); // true\n\n// 类数组对象\nisArrayLike({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLike({ length: 0 }); // true\n\n// arguments 对象\nfunction example() {\n  return isArrayLike(arguments); // true\n}\n\n// 非数组对象\nisArrayLike({}); // false\nisArrayLike({ length: 'invalid' }); // false\nisArrayLike(null); // false\nisArrayLike(undefined); // false\nisArrayLike(() => {}); // false\nisArrayLike(123); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值是类数组对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isArrayLikeObject.md",
    "content": "# isArrayLikeObject (Lodash 兼容性)\n\n检查值是否为非原始值的类数组对象。\n\n```typescript\nconst result = isArrayLikeObject(value);\n```\n\n## 用法\n\n### `isArrayLikeObject(value)`\n\n当您需要检查给定值是否为非原始值的类数组对象时，请使用 `isArrayLikeObject`。数组、arguments 对象、NodeList 等属于此类，但字符串由于是原始值而被排除。\n\n```typescript\nimport { isArrayLikeObject } from 'es-toolkit/compat';\n\n// 类数组对象（非原始值）\nisArrayLikeObject([1, 2, 3]); // true\nisArrayLikeObject({ 0: 'a', 1: 'b', length: 2 }); // true\nisArrayLikeObject({ length: 0 }); // true\n\n// arguments 对象\nfunction example() {\n  return isArrayLikeObject(arguments); // true\n}\n\n// NodeList 或 HTMLCollection（在浏览器中）\nisArrayLikeObject(document.querySelectorAll('div')); // true\n\n// 原始值返回 false（包括字符串）\nisArrayLikeObject('abc'); // false\nisArrayLikeObject(''); // false\nisArrayLikeObject(123); // false\nisArrayLikeObject(true); // false\n\n// 其他对象\nisArrayLikeObject({}); // false\nisArrayLikeObject(null); // false\nisArrayLikeObject(undefined); // false\nisArrayLikeObject(() => {}); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值是非原始值的类数组对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isBoolean.md",
    "content": "# isBoolean (Lodash 兼容性)\n\n::: warning 请使用 `typeof` 运算符\n此 `isBoolean` 函数由于 Boolean 对象包装器处理而变得复杂。\n\n请改用更简单的现代化 `typeof value === 'boolean'`。\n:::\n\n检查值是否为布尔（boolean）类型。\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 用法\n\n### `isBoolean(value)`\n\n当您想要类型安全地检查值是否为布尔类型时，请使用 `isBoolean`。检查原始布尔值和 Boolean 对象包装器。在 TypeScript 中也作为类型守卫工作。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/compat';\n\n// 原始布尔值\nisBoolean(true); // true\nisBoolean(false); // true\n\n// Boolean 对象包装器\nisBoolean(new Boolean(true)); // true\nisBoolean(new Boolean(false)); // true\n\n// 其他类型返回 false\nisBoolean(0); // false\nisBoolean(1); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\nisBoolean(null); // false\nisBoolean(undefined); // false\nisBoolean({}); // false\nisBoolean([]); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为布尔类型的值。\n\n#### 返回值\n\n(`value is boolean`): 如果值是布尔类型则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isBuffer.md",
    "content": "# isBuffer (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isBuffer](../../predicate/isBuffer.md)\n此 `isBuffer` 函数由于 Lodash 兼容性的复杂处理而运行较慢。\n\n请改用更快的现代化 `es-toolkit` 的 [isBuffer](../../predicate/isBuffer.md)。\n:::\n\n检查值是否为 Buffer 实例。\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 用法\n\n### `isBuffer(value)`\n\n当您想要类型安全地检查值是否为 Buffer 实例时，请使用 `isBuffer`。在 Node.js 环境中处理 Buffer 对象时很有用。在 TypeScript 中也作为类型守卫工作。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/compat';\n\n// 检查 Buffer 实例\nconst buffer = Buffer.from('hello');\nisBuffer(buffer); // true\n\n// 其他类型返回 false\nisBuffer('hello'); // false\nisBuffer([1, 2, 3]); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer({}); // false\nisBuffer(null); // false\nisBuffer(undefined); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Buffer 实例的值。\n\n#### 返回值\n\n(`boolean`): 如果值是 Buffer 实例则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isDate.md",
    "content": "# isDate (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isDate](../../predicate/isDate.md)\n这个 `isDate` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isDate](../../predicate/isDate.md)。\n:::\n\n检查值是否为 Date 对象。\n\n```typescript\nconst result = isDate(value);\n```\n\n## 用法\n\n### `isDate(value)`\n\n当你想要类型安全地检查值是否为 Date 对象时使用 `isDate`。在 TypeScript 中它也可以作为类型守卫使用。\n\n```typescript\nimport { isDate } from 'es-toolkit/compat';\n\n// 检查 Date 对象\nconst date = new Date();\nisDate(date); // true\n\n// 无效的 Date 也被识别为 Date 对象\nconst invalidDate = new Date('invalid');\nisDate(invalidDate); // true\n\n// 其他类型返回 false\nisDate('2024-01-01'); // false\nisDate(1640995200000); // false\nisDate({}); // false\nisDate(null); // false\nisDate(undefined); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Date 对象的值。\n\n#### 返回值\n\n(`value is Date`): 如果值是 Date 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isElement.md",
    "content": "# isElement (Lodash 兼容性)\n\n::: warning 请使用 `instanceof HTMLElement`\n\n这个 `isElement` 函数由于结构性检查导致准确性较低且性能较慢。\n\n建议使用更准确、更现代的 `instanceof HTMLElement` 或 `element.nodeType === 1` 检查。\n\n:::\n\n检查值是否为 DOM 元素。\n\n```typescript\nconst result = isElement(value);\n```\n\n## 用法\n\n### `isElement(value)`\n\n当需要检查给定值是否为 DOM 元素时使用 `isElement`。由于此函数使用结构性检查，结果可能不完全准确。\n\n```typescript\nimport { isElement } from 'es-toolkit/compat';\n\n// DOM 元素\nisElement(document.body); // true\nisElement(document.createElement('div')); // true\nisElement(document.querySelector('p')); // true (如果元素存在)\n\n// 非 DOM 元素的值\nisElement('<body>'); // false\nisElement({}); // false\nisElement(null); // false\nisElement(undefined); // false\n\n// 文本节点或其他节点类型\nisElement(document.createTextNode('text')); // false\nisElement(document.createComment('comment')); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值看起来像 DOM 元素则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isEmpty.md",
    "content": "# isEmpty (Lodash 兼容性)\n\n检查给定值是否为空。\n\n```typescript\nconst result = isEmpty(value);\n```\n\n## 用法\n\n### `isEmpty(value)`\n\n当您需要检查各种类型的值是否为空时，请使用 `isEmpty`。可以处理字符串、数组、对象、Map、Set 等。\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\n// 检查字符串\nisEmpty(''); // true\nisEmpty('hello'); // false\n\n// 检查数组\nisEmpty([]); // true\nisEmpty([1, 2, 3]); // false\n\n// 检查对象\nisEmpty({}); // true\nisEmpty({ a: 1 }); // false\n\n// 检查 Map 和 Set\nisEmpty(new Map()); // true\nisEmpty(new Set()); // true\nisEmpty(new Map([['key', 'value']])); // false\nisEmpty(new Set([1, 2, 3])); // false\n\n// null 和 undefined\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(); // true\n\n// 类数组对象\nisEmpty({ 0: 'a', length: 1 }); // false\nisEmpty({ length: 0 }); // false\n```\n\n原始值都被视为空值：\n\n```typescript\nimport { isEmpty } from 'es-toolkit/compat';\n\nisEmpty(0); // true\nisEmpty(false); // true\nisEmpty(123); // true\nisEmpty('text'); // false (字符串按长度判断)\n```\n\n#### 参数\n\n- `value` (`unknown`, 可选): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值为空则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isEqual.md",
    "content": "# isEqual (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 [isEqual](../../predicate/isEqual.md)\n这个 `isEqual` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isEqual](../../predicate/isEqual.md)。\n:::\n\n深度比较两个值是否相等。\n\n```typescript\nconst result = isEqual(value1, value2);\n```\n\n## 用法\n\n### `isEqual(a, b)`\n\n当需要深度比较两个值是否相等时使用 `isEqual`。它会比较复杂类型如 Date、RegExp、对象、数组等的内容。\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\n// 基本类型比较\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// 对象深度比较\nisEqual({ a: 1, b: 2 }, { a: 1, b: 2 }); // true\nisEqual({ a: 1, b: 2 }, { b: 2, a: 1 }); // true\nisEqual({ a: 1 }, { a: 1, b: undefined }); // false\n\n// 数组深度比较\nisEqual([1, 2, 3], [1, 2, 3]); // true\nisEqual([1, [2, 3]], [1, [2, 3]]); // true\n\n// Date 对象比较\nisEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\nisEqual(new Date('2020-01-01'), new Date('2020-01-02')); // false\n\n// RegExp 对象比较\nisEqual(/abc/g, /abc/g); // true\nisEqual(/abc/g, /abc/i); // false\n```\n\n它也会递归比较嵌套的对象和数组。\n\n```typescript\nimport { isEqual } from 'es-toolkit/compat';\n\nconst obj1 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nconst obj2 = {\n  user: {\n    name: 'John',\n    details: {\n      age: 30,\n      hobbies: ['reading', 'gaming'],\n    },\n  },\n};\n\nisEqual(obj1, obj2); // true\n```\n\n#### 参数\n\n- `a` (`unknown`): 要比较的第一个值。\n- `b` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果两个值相等则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isEqualWith.md",
    "content": "# isEqualWith (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isEqualWith](../../predicate/isEqualWith.md)\n这个 `isEqualWith` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isEqualWith](../../predicate/isEqualWith.md)。\n:::\n\n使用自定义比较函数检查两个值是否相等。\n\n```typescript\nconst result = isEqualWith(a, b, customizer);\n```\n\n## 用法\n\n### `isEqualWith(a, b, areValuesEqual?)`\n\n使用自定义比较函数深度比较两个值。如果自定义函数返回布尔值，则使用该结果；如果返回 `undefined`，则使用默认相等性比较。\n\n自定义比较函数也会用于比较对象、数组、Map、Set 等复杂结构内部的值，确保深度比较。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\n// 忽略大小写的字符串比较\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', customizer); // true\nisEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n\n// 按绝对值比较数字\nconst absCustomizer = (a: any, b: any) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a) === Math.abs(b);\n  }\n};\n\nisEqualWith([-1, 2], [1, -2], absCustomizer); // true\n\n// 复杂对象比较\nconst obj1 = {\n  name: 'JOHN',\n  details: { age: 30, city: 'NYC' },\n};\nconst obj2 = {\n  name: 'john',\n  details: { age: 30, city: 'nyc' },\n};\n\nisEqualWith(obj1, obj2, customizer); // true\n```\n\n对 Map 和 Set 进行特殊处理。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/compat';\n\nconst customizer = (a: any, b: any) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nconst map1 = new Map([['KEY', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqualWith(map1, map2, customizer); // true\n\nconst set1 = new Set(['HELLO']);\nconst set2 = new Set(['hello']);\nisEqualWith(set1, set2, customizer); // true\n```\n\n#### 参数\n\n- `a` (`any`): 要比较的第一个值。\n- `b` (`any`): 要比较的第二个值。\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): 自定义比较函数。\n  - `x`: 来自第一个对象 `a` 的值\n  - `y`: 来自第二个对象 `b` 的值\n  - `property`: 获取 `x` 和 `y` 时使用的属性键\n  - `xParent`: 第一个值 `x` 的父对象\n  - `yParent`: 第二个值 `y` 的父对象\n  - `stack`: 处理循环引用的内部栈 (Map)\n\n#### 返回值\n\n(`boolean`): 根据自定义函数，如果两个值相等则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isError.md",
    "content": "# isError (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isError](../../predicate/isError.md)\n这个 `isError` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isError](../../predicate/isError.md)。\n:::\n\n检查值是否为 Error 对象。\n\n```typescript\nconst result = isError(value);\n```\n\n## 用法\n\n### `isError(value)`\n\n当需要类型安全地检查值是否为 Error 对象时使用 `isError`。在 TypeScript 中它也可以作为类型守卫使用。\n\n```typescript\nimport { isError } from 'es-toolkit/compat';\n\n// 检查 Error 对象\nisError(new Error()); // true\nisError(new TypeError('Type error')); // true\nisError(new ReferenceError('Reference error')); // true\n\n// 继承 Error 的自定义错误\nclass CustomError extends Error {}\nisError(new CustomError()); // true\n\n// 其他类型返回 false\nisError('Error'); // false\nisError({ name: 'Error', message: 'Something went wrong' }); // false\nisError({}); // false\nisError(null); // false\nisError(undefined); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Error 对象的值。\n\n#### 返回值\n\n(`value is Error`): 如果值是 Error 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isFinite.md",
    "content": "# isFinite (Lodash 兼容性)\n\n::: warning 请使用 `Number.isFinite`\n\n这个 `isFinite` 函数由于额外的类型检查开销而性能较慢。\n\n建议使用更快、更现代的 `Number.isFinite`。\n\n:::\n\n检查值是否为有限数字。\n\n```typescript\nconst result = isFinite(value);\n```\n\n## 用法\n\n### `isFinite(value)`\n\n当需要检查给定值是否为有限数字时使用 `isFinite`。此函数在 TypeScript 中也可以作为类型守卫使用，将值的类型缩小为 `number`。\n\n```typescript\nimport { isFinite } from 'es-toolkit/compat';\n\n// 有限数字\nisFinite(100); // true\nisFinite(-50); // true\nisFinite(3.14); // true\nisFinite(0); // true\n\n// 无穷大返回 false\nisFinite(Infinity); // false\nisFinite(-Infinity); // false\n\n// NaN 也返回 false\nisFinite(NaN); // false\n\n// 其他类型也返回 false\nisFinite('100'); // false\nisFinite([]); // false\nisFinite({}); // false\nisFinite(null); // false\nisFinite(undefined); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`value is number`): 如果值是有限数字则返回 `true`，否则返回 `false`。  \n当返回 `true` 时，TypeScript 会将 `value` 的类型缩小为 `number`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isFunction.md",
    "content": "# isFunction (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isFunction](../../predicate/isFunction.md)\n这个 `isFunction` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isFunction](../../predicate/isFunction.md)。\n:::\n\n检查值是否为函数。\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 用法\n\n### `isFunction(value)`\n\n当需要类型安全地检查值是否为函数时使用 `isFunction`。在 TypeScript 中它也可以作为类型守卫使用。\n\n```typescript\nimport { isFunction } from 'es-toolkit/compat';\n\n// 普通函数\nisFunction(function () {}); // true\nisFunction(() => {}); // true\n\n// 内置函数和构造函数\nisFunction(Array.prototype.slice); // true\nisFunction(Proxy); // true\nisFunction(Int8Array); // true\n\n// 异步函数和生成器函数\nisFunction(async function () {}); // true\nisFunction(function* () {}); // true\n\n// 其他类型返回 false\nisFunction('function'); // false\nisFunction({}); // false\nisFunction([]); // false\nisFunction(null); // false\nisFunction(undefined); // false\nisFunction(123); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为函数的值。\n\n#### 返回值\n\n(`value is (...args: any[]) => any`): 如果值是函数则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isInteger.md",
    "content": "# isInteger (Lodash 兼容性)\n\n::: warning 请使用 `Number.isInteger`\n\n这个 `isInteger` 函数由于额外的类型检查开销而性能较慢。\n\n建议使用更快、更现代的 `Number.isInteger`。\n\n:::\n\n检查值是否为整数。\n\n```typescript\nconst result = isInteger(value);\n```\n\n## 用法\n\n### `isInteger(value)`\n\n当需要检查给定值是否为整数时使用 `isInteger`。此函数在 TypeScript 中也可以作为类型守卫使用，将值的类型缩小为 `number`。\n\n```typescript\nimport { isInteger } from 'es-toolkit/compat';\n\n// 整数值检查\nisInteger(3); // true\nisInteger(-5); // true\nisInteger(0); // true\n\n// 小数值返回 false\nisInteger(3.14); // false\nisInteger(-2.5); // false\n\n// 无穷大返回 false\nisInteger(Infinity); // false\nisInteger(-Infinity); // false\n\n// 其他类型也返回 false\nisInteger('3'); // false\nisInteger([]); // false\nisInteger({}); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值是整数则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isLength.md",
    "content": "# isLength (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isLength](../../predicate/isLength.md)\n这个 `isLength` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isLength](../../predicate/isLength.md)。\n:::\n\n检查值是否为有效长度。\n\n```typescript\nconst result = isLength(value);\n```\n\n## 用法\n\n### `isLength(value)`\n\n当需要检查值是否为有效长度时使用 `isLength`。有效长度必须是数字类型、非负整数，且不超过 JavaScript 的最大安全整数（`Number.MAX_SAFE_INTEGER`）。在 TypeScript 中它也可以作为类型守卫使用。\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\n// 有效长度\nisLength(0); // true\nisLength(42); // true\nisLength(100); // true\nisLength(Number.MAX_SAFE_INTEGER); // true\n\n// 无效长度\nisLength(-1); // false (负数)\nisLength(1.5); // false (非整数)\nisLength(Number.MAX_SAFE_INTEGER + 1); // false (超出安全范围)\nisLength('3'); // false (字符串)\nisLength(null); // false\nisLength(undefined); // false\nisLength({}); // false\nisLength([]); // false\n```\n\n在验证数组或字符串的 length 属性是否有效时很有用。\n\n```typescript\nimport { isLength } from 'es-toolkit/compat';\n\nfunction validateArrayLength(arr: any[]) {\n  if (isLength(arr.length)) {\n    console.log(`数组长度 ${arr.length} 是有效的`);\n    return true;\n  }\n  return false;\n}\n\nvalidateArrayLength([1, 2, 3]); // \"数组长度 3 是有效的\"\n```\n\n#### 参数\n\n- `value` (`any`): 要检查是否为有效长度的值。\n\n#### 返回值\n\n(`boolean`): 如果值是有效长度则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isMap.md",
    "content": "# isMap (Lodash 兼容性)\n\n::: warning 请使用 es-toolkit 的 [isMap](../../predicate/isMap.md)\n\n这个 `isMap` 函数由于 Lodash 兼容性的复杂处理而性能较慢。\n\n建议使用更快、更现代的 `es-toolkit` 的 [isMap](../../predicate/isMap.md)。\n\n:::\n\n检查值是否为 Map。\n\n```typescript\nconst result = isMap(value);\n```\n\n## 用法\n\n### `isMap(value)`\n\n当需要类型安全地检查值是否为 Map 时使用 `isMap`。在 TypeScript 中它也可以作为类型守卫使用。\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// 检查 Map\nconst map = new Map();\nisMap(map); // true\n\n// 其他类型返回 false\nisMap(new Set()); // false\nisMap(new WeakMap()); // false\nisMap({}); // false\nisMap([]); // false\nisMap('map'); // false\nisMap(123); // false\nisMap(null); // false\nisMap(undefined); // false\n```\n\n它也可以区分 Map 和其他类似的集合。\n\n```typescript\nimport { isMap } from 'es-toolkit/compat';\n\n// Map vs Set vs WeakMap\nisMap(new Map([['key', 'value']])); // true\nisMap(new Set(['value'])); // false\nisMap(new WeakMap()); // false\n\n// Map vs 普通对象\nisMap({}); // false\nisMap({ key: 'value' }); // false\nisMap(Object.create(null)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Map 的值。\n\n#### 返回值\n\n(`value is Map<any, any>`): 如果值是 Map 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isMatch.md",
    "content": "# isMatch (Lodash 兼容性)\n\n检查对象是否部分匹配另一个对象的形状和值。\n\n```typescript\nconst result = isMatch(target, source);\n```\n\n## 用法\n\n### `isMatch(target, source)`\n\n使用 `isMatch` 检查对象或数组是否部分匹配另一个对象的结构和值。不需要完全相同，只要 source 的所有属性都存在于 target 中且具有相同的值即可。\n\n```typescript\nimport { isMatch } from 'es-toolkit/compat';\n\n// 对象部分匹配\nisMatch({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }); // true (a, b 匹配)\nisMatch({ a: 1, b: 2 }, { a: 1, b: 2, c: 3 }); // false (target 中没有 c)\n\n// 嵌套对象\nisMatch({ user: { name: 'Alice', age: 25, city: 'Seoul' } }, { user: { name: 'Alice', age: 25 } }); // true\n\n// 数组部分匹配（顺序无关）\nisMatch([1, 2, 3, 4], [2, 4]); // true (数组中有 2 和 4)\nisMatch([1, 2, 3], [1, 2, 3]); // true (完全匹配)\nisMatch([1, 2], [1, 2, 3]); // false (target 中没有 3)\n\n// Map 部分匹配\nconst targetMap = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\nconst sourceMap = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\nisMatch(targetMap, sourceMap); // true\n\n// Set 部分匹配\nconst targetSet = new Set([1, 2, 3, 4]);\nconst sourceSet = new Set([2, 4]);\nisMatch(targetSet, sourceSet); // true\n\n// 空 source 总是返回 true\nisMatch({ a: 1 }, {}); // true\nisMatch([1, 2, 3], []); // true\n```\n\n更直接且快速的方法：\n\n```typescript\n// 完全相等性检查（更快）\nimport { isEqual } from 'es-toolkit';\n\nisEqual(obj1, obj2);\n\n// 特定属性检查（更明确）\ntarget.a === source.a && target.b === source.b;\n\n// 对象结构检查\nObject.keys(source).every(key => target[key] === source[key]);\n```\n\n#### 参数\n\n- `target` (`unknown`): 要检查是否匹配的对象。\n- `source` (`unknown`): 作为匹配模式的对象。\n\n#### 返回值\n\n(`boolean`): 如果 target 部分匹配 source 的形状和值，则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isMatchWith.md",
    "content": "# isMatchWith (Lodash 兼容性)\n\n使用自定义比较函数检查对象是否部分匹配。\n\n```typescript\nconst result = isMatchWith(target, source, customizer);\n```\n\n## 用法\n\n### `isMatchWith(target, source, customizer)`\n\n当需要自定义比较逻辑时使用 `isMatchWith`。您可以直接控制每个属性的比较。\n\n```typescript\nimport { isMatchWith } from 'es-toolkit/compat';\n\n// 不区分大小写的字符串比较\nconst caseInsensitiveCompare = (objVal, srcVal) => {\n  if (typeof objVal === 'string' && typeof srcVal === 'string') {\n    return objVal.toLowerCase() === srcVal.toLowerCase();\n  }\n  return undefined; // 使用默认行为\n};\n\nisMatchWith({ name: 'ALICE', age: 25 }, { name: 'alice' }, caseInsensitiveCompare); // true\n\n// 数字范围比较\nconst rangeCompare = (objVal, srcVal, key) => {\n  if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n    return objVal >= srcVal.min && objVal <= srcVal.max;\n  }\n  return undefined;\n};\n\nisMatchWith({ name: 'John', age: 25 }, { age: { min: 18, max: 30 } }, rangeCompare); // true\n\n// 数组长度比较\nconst lengthCompare = (objVal, srcVal, key) => {\n  if (key === 'items' && Array.isArray(objVal) && typeof srcVal === 'number') {\n    return objVal.length === srcVal;\n  }\n  return undefined;\n};\n\nisMatchWith({ items: ['a', 'b', 'c'], count: 3 }, { items: 3 }, lengthCompare); // true\n\n// 复杂的条件比较\nconst conditionalCompare = (objVal, srcVal, key, object, source) => {\n  // 仅在特定键上应用特殊逻辑\n  if (key === 'status') {\n    return srcVal === 'active' || objVal === 'any';\n  }\n\n  // 嵌套对象中的特殊处理\n  if (typeof srcVal === 'object' && srcVal !== null && objVal?.special) {\n    return srcVal.id === objVal.special;\n  }\n\n  return undefined; // 默认行为\n};\n\nisMatchWith({ user: { special: 123 }, status: 'any' }, { user: { id: 123, status: 'active' } }, conditionalCompare); // true\n```\n\n#### 参数\n\n- `target` (`unknown`): 要检查是否匹配的对象。\n- `source` (`unknown`): 作为匹配模式的对象。\n- `customizer` (`function`, 可选): 自定义比较逻辑的函数。应该返回 `true`、`false` 或 `undefined`。\n\n#### 返回值\n\n(`boolean`): 如果 target 通过自定义逻辑部分匹配 source，则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isNaN.md",
    "content": "# isNaN (Lodash 兼容性)\n\n::: warning 使用 `Number.isNaN`\n这个 `isNaN` 函数由于额外的函数调用而运行较慢。\n\n请使用更快且现代的 `Number.isNaN`。\n:::\n\n检查值是否为 `NaN`。\n\n```typescript\nconst result = isNaN(value);\n```\n\n## 用法\n\n### `isNaN(value)`\n\n当您想检查值是否为 `NaN` 时使用 `isNaN`。\n\n```typescript\nimport { isNaN } from 'es-toolkit/compat';\n\n// NaN 检查\nisNaN(NaN);\n// 返回: true\n\nisNaN(Number.NaN);\n// 返回: true\n\n// 其他值\nisNaN(undefined);\n// 返回: false\n\nisNaN(null);\n// 返回: false\n\nisNaN(0);\n// 返回: false\n\nisNaN('NaN');\n// 返回: false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 NaN 的值。\n\n#### 返回值\n\n(`boolean`): 如果值为 NaN 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isNative.md",
    "content": "# isNative (Lodash 兼容性)\n\n检查值是否为 JavaScript 引擎的原生函数。\n\n```typescript\nconst result = isNative(value);\n```\n\n## 用法\n\n### `isNative(value)`\n\n当您想检查给定值是否为 JavaScript 引擎实现的原生函数时使用 `isNative`。可以区分浏览器或 Node.js 提供的内置函数。\n\n```typescript\nimport { isNative } from 'es-toolkit/compat';\n\n// 原生函数\nisNative(Array.prototype.push); // true\nisNative(Object.keys); // true\nisNative(Math.max); // true\nisNative(JSON.parse); // true\nisNative(console.log); // true (在浏览器/Node.js 环境中)\n\n// 用户定义函数\nisNative(function () {}); // false\nisNative(() => {}); // false\nisNative(function customFunction() {}); // false\n\n// 库函数\nisNative(require('lodash').map); // false\nisNative(require('es-toolkit').chunk); // false\n\n// 非函数值\nisNative({}); // false\nisNative([]); // false\nisNative('function'); // false\nisNative(123); // false\nisNative(null); // false\n\n// 绑定函数\nconst boundFunction = Array.prototype.push.bind([]);\nisNative(boundFunction); // true (绑定函数是原生的)\n\n// 方法\nconst obj = { method: Array.prototype.push };\nisNative(obj.method); // true (仍然是原生函数)\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值看起来是原生函数则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isNil.md",
    "content": "# isNil (Lodash 兼容性)\n\n::: warning 使用 es-toolkit 的 [isNil](../../predicate/isNil.md)\n这个 `isNil` 函数由于 Lodash 兼容性的复杂处理而运行较慢。\n\n请使用更快且现代的 es-toolkit 的 [isNil](../../predicate/isNil.md)。\n:::\n\n检查值是否为 `null` 或 `undefined`。\n\n```typescript\nconst result = isNil(value);\n```\n\n## 用法\n\n### `isNil(x)`\n\n当您想类型安全地检查值是否为 `null` 或 `undefined` 时使用 `isNil`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// null 和 undefined 返回 true\nisNil(null); // true\nisNil(undefined); // true\n\n// 所有其他值返回 false\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil([]); // false\nisNil({}); // false\nisNil('hello'); // false\nisNil(42); // false\n```\n\n与被认为是假值但不是 `null` 或 `undefined` 的值进行区分。\n\n```typescript\nimport { isNil } from 'es-toolkit/compat';\n\n// 被认为是假值但不是 null/undefined 的值\nisNil(0); // false\nisNil(''); // false\nisNil(false); // false\nisNil(NaN); // false\n\n// 只有 null 和 undefined 返回 true\nisNil(null); // true\nisNil(undefined); // true\n```\n\n#### 参数\n\n- `x` (`any`): 要检查是否为 `null` 或 `undefined` 的值。\n\n#### 返回值\n\n(`x is null | undefined`): 如果值为 `null` 或 `undefined` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isNull.md",
    "content": "# isNull (Lodash 兼容性)\n\n::: warning 使用 es-toolkit 的 [isNull](../../predicate/isNull.md)\n这个 `isNull` 函数是 Lodash 兼容性的函数，但与主库具有相同的实现。\n\n请使用更快且现代的 es-toolkit 的 [isNull](../../predicate/isNull.md)。\n:::\n\n检查值是否为 `null`。\n\n```typescript\nconst result = isNull(value);\n```\n\n## 用法\n\n### `isNull(value)`\n\n当您想类型安全地检查值是否恰好为 `null` 时使用 `isNull`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\n// 只有 null 返回 true\nisNull(null); // true\n\n// undefined 也返回 false\nisNull(undefined); // false\n\n// 所有其他值也返回 false\nisNull(0); // false\nisNull(''); // false\nisNull(false); // false\nisNull([]); // false\nisNull({}); // false\nisNull('null'); // false\nisNull(NaN); // false\n```\n\n可以区分检查 `null` 和 `undefined`。\n\n```typescript\nimport { isNull } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    console.log('值明确为 null');\n  } else if (value === undefined) {\n    console.log('值为 undefined');\n  } else {\n    console.log(`有值: ${value}`);\n  }\n}\n\nhandleValue(null); // \"值明确为 null\"\nhandleValue(undefined); // \"值为 undefined\"\nhandleValue('hello'); // \"有值: hello\"\n```\n\n#### 参数\n\n- `value` (`any`): 要检查是否为 `null` 的值。\n\n#### 返回值\n\n(`value is null`): 如果值为 `null` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isNumber.md",
    "content": "# isNumber (Lodash 兼容性)\n\n::: warning 使用 `typeof` 运算符\n这个 `isNumber` 函数由于 Number 对象包装器处理而变得复杂。\n\n请使用更简单且现代的 `typeof value === 'number'`。\n:::\n\n检查值是否为数字。\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 用法\n\n### `isNumber(value)`\n\n当您想检查值是否为数字时使用 `isNumber`。此函数将原始数字和 Number 对象都识别为数字。\n\n```typescript\nimport { isNumber } from 'es-toolkit/compat';\n\n// 原始数字\nisNumber(123);\n// 返回: true\n\nisNumber(3.14);\n// 返回: true\n\nisNumber(NaN);\n// 返回: true\n\n// Number 对象\nisNumber(new Number(42));\n// 返回: true\n\n// 其他类型\nisNumber('123');\n// 返回: false\n\nisNumber(true);\n// 返回: false\n\nisNumber(null);\n// 返回: false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为数字的值。\n\n#### 返回值\n\n(`value is number`): 如果值为数字则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isObject.md",
    "content": "# isObject (Lodash 兼容性)\n\n检查值是否为对象。\n\n```typescript\nconst result = isObject(value);\n```\n\n## 用法\n\n### `isObject(value)`\n\n当您想检查值是否为对象时使用 `isObject`。在 JavaScript 中，数组、函数、对象、正则表达式、Date 等都被视为对象。\n\n```typescript\nimport { isObject } from 'es-toolkit/compat';\n\n// 普通对象\nisObject({});\n// 返回: true\n\n// 数组也是对象\nisObject([1, 2, 3]);\n// 返回: true\n\n// 函数也是对象\nisObject(() => {});\n// 返回: true\n\n// Date 也是对象\nisObject(new Date());\n// 返回: true\n\n// null 不是对象\nisObject(null);\n// 返回: false\n\n// 原始类型不是对象\nisObject('string');\n// 返回: false\n\nisObject(123);\n// 返回: false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为对象的值。\n\n#### 返回值\n\n(`value is object`): 如果值为对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isObjectLike.md",
    "content": "# isObjectLike (Lodash 兼容性)\n\n检查值是否类似对象。\n\n```typescript\nconst result = isObjectLike(value);\n```\n\n## 用法\n\n### `isObjectLike(value)`\n\n当您想检查给定值是否为类似对象的值时使用 `isObjectLike`。类似对象的值是 `typeof` 运算符的结果为 `'object'` 且不为 `null` 的值。\n\n```typescript\nimport { isObjectLike } from 'es-toolkit/compat';\n\n// 类似对象的值\nisObjectLike({ a: 1 }); // true\nisObjectLike([1, 2, 3]); // true\nisObjectLike(new Date()); // true\nisObjectLike(/regex/); // true\nisObjectLike(new Map()); // true\nisObjectLike(new Set()); // true\n\n// 不类似对象的值\nisObjectLike('abc'); // false\nisObjectLike(123); // false\nisObjectLike(true); // false\nisObjectLike(() => {}); // false\nisObjectLike(Symbol('sym')); // false\n\n// 特殊情况\nisObjectLike(null); // false (null 的 typeof 为 'object' 但不是类似对象)\nisObjectLike(undefined); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`boolean`): 如果值类似对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isPlainObject.md",
    "content": "# isPlainObject (Lodash 兼容性)\n\n::: warning 使用 es-toolkit 的 [isPlainObject](../../predicate/isPlainObject.md)\n这个 `isPlainObject` 函数由于 Lodash 兼容性的复杂处理而运行较慢。\n\n请使用更快且现代的 es-toolkit 的 [isPlainObject](../../predicate/isPlainObject.md)。\n:::\n\n检查值是否为纯对象。\n\n```typescript\nconst result = isPlainObject(object);\n```\n\n## 用法\n\n### `isPlainObject(object)`\n\n当您想检查值是否为纯对象时使用 `isPlainObject`。纯对象是通过 `{}` 字面量、`new Object()` 或 `Object.create(null)` 创建的对象。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// 纯对象\nisPlainObject({}); // true\nisPlainObject(new Object()); // true\nisPlainObject(Object.create(null)); // true\nisPlainObject({ name: 'John', age: 30 }); // true\n\n// 不是纯对象的值\nisPlainObject([]); // false (数组)\nisPlainObject(new Date()); // false (Date 实例)\nisPlainObject(new Map()); // false (Map 实例)\nisPlainObject(new Set()); // false (Set 实例)\nisPlainObject(/regex/); // false (正则表达式)\nisPlainObject(function () {}); // false (函数)\nisPlainObject(null); // false\nisPlainObject(undefined); // false\nisPlainObject('object'); // false (字符串)\nisPlainObject(42); // false (数字)\n```\n\n区分类实例和纯对象。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\nclass Person {\n  name: string;\n  constructor(name: string) {\n    this.name = name;\n  }\n}\n\nconst person = new Person('John');\nconst plainObj = { name: 'John' };\n\nisPlainObject(person); // false (类实例)\nisPlainObject(plainObj); // true (纯对象)\n```\n\n正确处理自定义 `Symbol.toStringTag` 属性。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/compat';\n\n// 可写的 Symbol.toStringTag\nconst obj1 = {};\nobj1[Symbol.toStringTag] = 'CustomObject';\nisPlainObject(obj1); // true\n\n// 只读的 Symbol.toStringTag (内置对象)\nconst date = new Date();\nisPlainObject(date); // false\n```\n\n#### 参数\n\n- `object` (`any`): 要检查是否为纯对象的值。\n\n#### 返回值\n\n(`boolean`): 如果值为纯对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isRegExp.md",
    "content": "# isRegExp (Lodash 兼容性)\n\n::: warning 使用 es-toolkit 的 [isRegExp](../../predicate/isRegExp.md)\n这个 `isRegExp` 函数是 Lodash 兼容性的函数，但是简单的类型检查。\n\n请使用更快且现代的 es-toolkit 的 [isRegExp](../../predicate/isRegExp.md)。\n:::\n\n检查值是否为正则表达式。\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 用法\n\n### `isRegExp(value)`\n\n当您想类型安全地检查值是否为正则表达式时使用 `isRegExp`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 正则表达式\nisRegExp(/abc/); // true\nisRegExp(new RegExp('abc')); // true\nisRegExp(/[a-z]+/g); // true\nisRegExp(/pattern/gi); // true\n\n// 其他类型返回 false\nisRegExp('/abc/'); // false (字符串)\nisRegExp('pattern'); // false (字符串)\nisRegExp({}); // false (对象)\nisRegExp([]); // false (数组)\nisRegExp(null); // false\nisRegExp(undefined); // false\nisRegExp(123); // false (数字)\n```\n\n区分正则表达式字符串和实际正则表达式对象。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 正则表达式 vs 正则表达式字符串\nisRegExp(/test/); // true\nisRegExp('/test/'); // false\nisRegExp('\\\\d+'); // false\nisRegExp('/\\\\d+/g'); // false\n\n// 各种正则表达式标志\nisRegExp(/test/i); // true (忽略大小写)\nisRegExp(/test/g); // true (全局搜索)\nisRegExp(/test/m); // true (多行)\nisRegExp(/test/gim); // true (所有标志组合)\n```\n\n也识别动态创建的正则表达式。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/compat';\n\n// 通过 RegExp 构造函数创建的正则表达式\nconst dynamicRegex = new RegExp('\\\\d{3}-\\\\d{4}', 'g');\nisRegExp(dynamicRegex); // true\n\n// 通过字符串创建的正则表达式\nconst pattern = 'hello';\nconst flags = 'gi';\nconst regex = new RegExp(pattern, flags);\nisRegExp(regex); // true\n```\n\n#### 参数\n\n- `value` (`any`): 要检查是否为正则表达式的值。\n\n#### 返回值\n\n(`value is RegExp`): 如果值为正则表达式则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isSafeInteger.md",
    "content": "# isSafeInteger (Lodash 兼容性)\n\n::: warning 使用 `Number.isSafeInteger`\n这个 `isSafeInteger` 函数由于额外的类型检查开销而运行较慢。\n\n请使用更快且现代的 `Number.isSafeInteger`。\n:::\n\n检查值是否为安全整数。\n\n```typescript\nconst result = isSafeInteger(value);\n```\n\n## 用法\n\n### `isSafeInteger(value)`\n\n当您想检查给定值是否为安全整数时使用 `isSafeInteger`。安全整数是介于 -(2^53 - 1) 和 (2^53 - 1) 之间的整数，可以在 JavaScript 中精确表示。\n\n```typescript\nimport { isSafeInteger } from 'es-toolkit/compat';\n\n// 安全整数\nisSafeInteger(3); // true\nisSafeInteger(-42); // true\nisSafeInteger(0); // true\nisSafeInteger(Number.MAX_SAFE_INTEGER); // true (9007199254740991)\nisSafeInteger(Number.MIN_SAFE_INTEGER); // true (-9007199254740991)\n\n// 不安全的整数\nisSafeInteger(Number.MAX_SAFE_INTEGER + 1); // false\nisSafeInteger(Number.MIN_SAFE_INTEGER - 1); // false\nisSafeInteger(9007199254740992); // false\n\n// 非整数值\nisSafeInteger(3.14); // false\nisSafeInteger('3'); // false\nisSafeInteger(1n); // false (BigInt)\nisSafeInteger([]); // false\nisSafeInteger({}); // false\nisSafeInteger(null); // false\nisSafeInteger(undefined); // false\n\n// 无穷大和 NaN\nisSafeInteger(Infinity); // false\nisSafeInteger(-Infinity); // false\nisSafeInteger(NaN); // false\n```\n\n#### 参数\n\n- `value` (`any`): 要检查的值。\n\n#### 返回值\n\n(`value is number`): 如果值为安全整数则返回 `true`，否则返回 `false`。  \n当返回 `true` 时，TypeScript 会将 `value` 的类型缩小为 `number`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isSet.md",
    "content": "# isSet (Lodash 兼容性)\n\n::: warning 使用 `es-toolkit` 的 [isSet](../../predicate/isSet.md)\n这个 `isSet` 函数是 Lodash 兼容性的函数，但与主库具有相同的实现。\n\n请使用更快且现代的 `es-toolkit` 的 [isSet](../../predicate/isSet.md)。\n:::\n\n检查值是否为 Set。\n\n```typescript\nconst result = isSet(value);\n```\n\n## 用法\n\n### `isSet(value)`\n\n当您想类型安全地检查值是否为 Set 时使用 `isSet`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set 检查\nconst set = new Set();\nisSet(set); // true\n\n// 其他类型返回 false\nisSet(new Map()); // false\nisSet(new WeakSet()); // false\nisSet([]); // false\nisSet({}); // false\nisSet('set'); // false\nisSet(123); // false\nisSet(null); // false\nisSet(undefined); // false\n```\n\n也与其他类似 Set 的集合进行区分。\n\n```typescript\nimport { isSet } from 'es-toolkit/compat';\n\n// Set vs Map vs WeakSet\nisSet(new Set([1, 2, 3])); // true\nisSet(new Map([['key', 'value']])); // false\nisSet(new WeakSet()); // false\n\n// Set vs 数组\nisSet(new Set([1, 2, 3])); // true\nisSet([1, 2, 3]); // false\n\n// Set vs 普通对象\nisSet(new Set()); // true\nisSet({}); // false\nisSet(Object.create(null)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Set 的值。\n\n#### 返回值\n\n(`value is Set<any>`): 如果值为 Set 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isString.md",
    "content": "# isString (Lodash 兼容性)\n\n::: warning 使用 `typeof` 运算符\n这个 `isString` 函数由于 String 对象包装器处理而变得复杂。\n\n请使用更简单且现代的 `typeof value === 'string'`。\n:::\n\n检查值是否为字符串。\n\n```typescript\nconst result = isString(value);\n```\n\n## 用法\n\n### `isString(value)`\n\n当您想类型安全地检查值是否为字符串时使用 `isString`。检查原始字符串和 String 对象包装器。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// 原始字符串\nisString('hello'); // true\nisString(''); // true\nisString('123'); // true\n\n// String 对象包装器\nisString(new String('hello')); // true\nisString(new String('')); // true\n\n// 其他类型返回 false\nisString(123); // false\nisString(true); // false\nisString(null); // false\nisString(undefined); // false\nisString({}); // false\nisString([]); // false\nisString(Symbol('test')); // false\n```\n\n与看起来类似字符串的其他类型进行区分。\n\n```typescript\nimport { isString } from 'es-toolkit/compat';\n\n// 字符串 vs 数字\nisString('123'); // true\nisString(123); // false\n\n// 字符串 vs 布尔值\nisString('true'); // true\nisString(true); // false\n\n// 字符串 vs null/undefined\nisString('null'); // true\nisString(null); // false\nisString('undefined'); // true\nisString(undefined); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为字符串的值。\n\n#### 返回值\n\n(`value is string`): 如果值为字符串则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isSymbol.md",
    "content": "# isSymbol (Lodash 兼容性)\n\n::: warning 使用 `typeof` 运算符\n这个 `isSymbol` 函数由于 Symbol 对象包装器处理而变得复杂。\n\n请使用更简单且现代的 `typeof value === 'symbol'`。\n:::\n\n检查值是否为符号(symbol)。\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 用法\n\n### `isSymbol(value)`\n\n当您想类型安全地检查值是否为符号时使用 `isSymbol`。检查原始符号和 Symbol 对象包装器。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// 原始符号\nisSymbol(Symbol('test')); // true\nisSymbol(Symbol.for('global')); // true\nisSymbol(Symbol.iterator); // true\n\n// Symbol 对象包装器\nisSymbol(Object(Symbol('test'))); // true\n\n// 其他类型返回 false\nisSymbol('symbol'); // false\nisSymbol(123); // false\nisSymbol(true); // false\nisSymbol(null); // false\nisSymbol(undefined); // false\nisSymbol({}); // false\nisSymbol([]); // false\n```\n\n也正确识别各种内置符号。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/compat';\n\n// 众所周知的符号\nisSymbol(Symbol.iterator); // true\nisSymbol(Symbol.asyncIterator); // true\nisSymbol(Symbol.toStringTag); // true\nisSymbol(Symbol.hasInstance); // true\nisSymbol(Symbol.toPrimitive); // true\n\n// 全局符号\nisSymbol(Symbol.for('myGlobalSymbol')); // true\n\n// 用户定义符号\nconst mySymbol = Symbol('mySymbol');\nisSymbol(mySymbol); // true\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为符号的值。\n\n#### 返回值\n\n(`value is symbol`): 如果值为符号则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isTypedArray.md",
    "content": "# isTypedArray (Lodash 兼容性)\n\n::: warning 使用 `ArrayBuffer.isView()` 或 `instanceof` 运算符\n这个 `isTypedArray` 函数是 Lodash 兼容性的函数，但是简单的类型检查。\n\n请使用更简单且现代的 `ArrayBuffer.isView(value)` 或 `value instanceof Int8Array` 等。\n:::\n\n检查值是否为类型数组(TypedArray)。\n\n```typescript\nconst result = isTypedArray(x);\n```\n\n## 用法\n\n### `isTypedArray(x)`\n\n当您想检查值是否为类型数组时使用 `isTypedArray`。类型数组是处理二进制数据的特殊数组类型。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 类型数组\nisTypedArray(new Uint8Array([1, 2, 3])); // true\nisTypedArray(new Int16Array([1, 2, 3])); // true\nisTypedArray(new Float32Array([1.1, 2.2])); // true\nisTypedArray(new BigInt64Array([1n, 2n])); // true\n\n// 其他类型返回 false\nisTypedArray([1, 2, 3]); // false (普通数组)\nisTypedArray(new ArrayBuffer(16)); // false (ArrayBuffer)\nisTypedArray(new DataView(new ArrayBuffer(16))); // false (DataView)\nisTypedArray('array'); // false (字符串)\nisTypedArray({}); // false (对象)\nisTypedArray(null); // false\nisTypedArray(undefined); // false\n```\n\n识别各种类型的类型数组。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\n// 整数类型数组\nisTypedArray(new Int8Array()); // true\nisTypedArray(new Int16Array()); // true\nisTypedArray(new Int32Array()); // true\nisTypedArray(new Uint8Array()); // true\nisTypedArray(new Uint16Array()); // true\nisTypedArray(new Uint32Array()); // true\nisTypedArray(new Uint8ClampedArray()); // true\n\n// 浮点类型数组\nisTypedArray(new Float32Array()); // true\nisTypedArray(new Float64Array()); // true\n\n// BigInt 类型数组\nisTypedArray(new BigInt64Array()); // true\nisTypedArray(new BigUint64Array()); // true\n```\n\n与类似类型数组的其他对象进行区分。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nconst buffer = new ArrayBuffer(16);\nconst view = new DataView(buffer);\nconst typedArray = new Uint8Array(buffer);\nconst regularArray = [1, 2, 3, 4];\n\nisTypedArray(buffer); // false (ArrayBuffer)\nisTypedArray(view); // false (DataView)\nisTypedArray(typedArray); // true (TypedArray)\nisTypedArray(regularArray); // false (普通数组)\n```\n\n在二进制数据处理中区分类型时很有用。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/compat';\n\nfunction processData(data: unknown) {\n  if (isTypedArray(data)) {\n    console.log(`类型数组长度: ${data.length}`);\n    console.log(`字节长度: ${data.byteLength}`);\n    console.log(`字节偏移: ${data.byteOffset}`);\n    console.log(`构造函数: ${data.constructor.name}`);\n\n    // 输出第一个值\n    if (data.length > 0) {\n      console.log(`第一个值: ${data[0]}`);\n    }\n  } else if (Array.isArray(data)) {\n    console.log('这是普通数组');\n  } else {\n    console.log('这不是数组');\n  }\n}\n\nprocessData(new Uint8Array([1, 2, 3])); // 输出类型数组信息\nprocessData([1, 2, 3]); // \"这是普通数组\"\nprocessData('not an array'); // \"这不是数组\"\n```\n\n#### 参数\n\n- `x` (`any`): 要检查是否为类型数组的值。\n\n#### 返回值\n\n(`boolean`): 如果值为类型数组则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isUndefined.md",
    "content": "# isUndefined (Lodash 兼容性)\n\n::: warning 使用 es-toolkit 的 [isUndefined](../../predicate/isUndefined.md)\n这个 `isUndefined` 函数由于 Lodash 兼容性的复杂处理而运行较慢。\n\n请使用更快且现代的 es-toolkit 的 [isUndefined](../../predicate/isUndefined.md)。\n:::\n\n检查值是否为 `undefined`。\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 用法\n\n### `isUndefined(x)`\n\n当您想类型安全地检查值是否恰好为 `undefined` 时使用 `isUndefined`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\n// 只有 undefined 返回 true\nisUndefined(undefined); // true\n\n// null 也返回 false\nisUndefined(null); // false\n\n// 所有其他值也返回 false\nisUndefined(0); // false\nisUndefined(''); // false\nisUndefined(false); // false\nisUndefined([]); // false\nisUndefined({}); // false\nisUndefined('undefined'); // false\nisUndefined(NaN); // false\n```\n\n可以区分检查 `undefined` 和 `null`。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nfunction handleValue(value: string | null | undefined) {\n  if (isUndefined(value)) {\n    console.log('值为 undefined');\n  } else if (value === null) {\n    console.log('值明确为 null');\n  } else {\n    console.log(`有值: ${value}`);\n  }\n}\n\nhandleValue(undefined); // \"值为 undefined\"\nhandleValue(null); // \"值明确为 null\"\nhandleValue('hello'); // \"有值: hello\"\n```\n\n在检查未声明的变量或未初始化的属性时很有用。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/compat';\n\nconst obj: { name?: string; age?: number } = { name: 'John' };\n\nif (isUndefined(obj.age)) {\n  console.log('年龄未设置');\n  obj.age = 25; // 设置默认值\n}\n\n// 函数参数的默认值处理\nfunction greet(name: string, title?: string) {\n  if (isUndefined(title)) {\n    title = '先生/女士';\n  }\n  console.log(`您好，${name}${title}!`);\n}\n\ngreet('张三'); // \"您好，张三先生/女士!\"\ngreet('张三', '老师'); // \"您好，张三老师!\"\n```\n\n#### 参数\n\n- `x` (`any`): 要检查是否为 `undefined` 的值。\n\n#### 返回值\n\n(`x is undefined`): 如果值为 `undefined` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isWeakMap.md",
    "content": "# isWeakMap (Lodash 兼容性)\n\n::: warning 使用 `instanceof` 运算符\n这个 `isWeakMap` 函数是 Lodash 兼容性的函数，但是简单的类型检查。\n\n请使用更简单且现代的 `value instanceof WeakMap`。\n:::\n\n检查值是否为 WeakMap。\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 用法\n\n### `isWeakMap(value)`\n\n当您想类型安全地检查值是否为 WeakMap 时使用 `isWeakMap`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap 检查\nconst weakMap = new WeakMap();\nisWeakMap(weakMap); // true\n\n// 其他类型返回 false\nisWeakMap(new Map()); // false\nisWeakMap(new Set()); // false\nisWeakMap(new WeakSet()); // false\nisWeakMap({}); // false\nisWeakMap([]); // false\nisWeakMap('weakmap'); // false\nisWeakMap(123); // false\nisWeakMap(null); // false\nisWeakMap(undefined); // false\n```\n\n也与其他类似的集合进行区分。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\n// WeakMap vs Map\nconst obj = {};\nconst weakMap = new WeakMap([[obj, 'value']]);\nconst map = new Map([[obj, 'value']]);\n\nisWeakMap(weakMap); // true\nisWeakMap(map); // false\n\n// WeakMap vs WeakSet\nisWeakMap(new WeakMap()); // true\nisWeakMap(new WeakSet()); // false\n\n// WeakMap vs 普通对象\nisWeakMap(new WeakMap()); // true\nisWeakMap({}); // false\n```\n\n在利用 WeakMap 的特殊属性时很有用。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/compat';\n\nfunction setupWeakReference(collection: unknown, key: object, value: any) {\n  if (isWeakMap(collection)) {\n    // WeakMap 只能使用对象作为键，并维护弱引用\n    collection.set(key, value);\n    console.log('已存储到 WeakMap 中作为弱引用');\n\n    // WeakMap 没有大小信息\n    console.log('WeakMap 没有大小信息');\n  } else {\n    console.log('不是 WeakMap');\n  }\n}\n\nconst weakMap = new WeakMap();\nconst regularMap = new Map();\nconst obj = { id: 1 };\n\nsetupWeakReference(weakMap, obj, 'data'); // \"已存储到 WeakMap 中作为弱引用\"\nsetupWeakReference(regularMap, obj, 'data'); // \"不是 WeakMap\"\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 WeakMap 的值。\n\n#### 返回值\n\n(`value is WeakMap<object, any>`): 如果值为 WeakMap 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/isWeakSet.md",
    "content": "# isWeakSet (Lodash 兼容性)\n\n::: warning 使用 `instanceof` 运算符\n这个 `isWeakSet` 函数是 Lodash 兼容性的函数，但是简单的类型检查。\n\n请使用更简单且现代的 `value instanceof WeakSet`。\n:::\n\n检查值是否为 WeakSet。\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 用法\n\n### `isWeakSet(value)`\n\n当您想类型安全地检查值是否为 WeakSet 时使用 `isWeakSet`。在 TypeScript 中也可以作为类型守卫使用。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet 检查\nconst weakSet = new WeakSet();\nisWeakSet(weakSet); // true\n\n// 其他类型返回 false\nisWeakSet(new Set()); // false\nisWeakSet(new Map()); // false\nisWeakSet(new WeakMap()); // false\nisWeakSet([]); // false\nisWeakSet({}); // false\nisWeakSet('weakset'); // false\nisWeakSet(123); // false\nisWeakSet(null); // false\nisWeakSet(undefined); // false\n```\n\n也与其他类似的集合进行区分。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// WeakSet vs Set\nconst obj = {};\nconst weakSet = new WeakSet([obj]);\nconst set = new Set([obj]);\n\nisWeakSet(weakSet); // true\nisWeakSet(set); // false\n\n// WeakSet vs WeakMap\nisWeakSet(new WeakSet()); // true\nisWeakSet(new WeakMap()); // false\n\n// WeakSet vs 数组\nisWeakSet(new WeakSet()); // true\nisWeakSet([]); // false\n```\n\n在利用 WeakSet 的特殊属性时很有用。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\nfunction addWeakReference(collection: unknown, item: object) {\n  if (isWeakSet(collection)) {\n    // WeakSet 只能存储对象，并维护弱引用\n    collection.add(item);\n    console.log('已存储到 WeakSet 中作为弱引用');\n\n    // WeakSet 没有大小信息且不可迭代\n    console.log('WeakSet 没有大小信息且不可迭代');\n  } else {\n    console.log('不是 WeakSet');\n  }\n}\n\nconst weakSet = new WeakSet();\nconst regularSet = new Set();\nconst obj = { id: 1 };\n\naddWeakReference(weakSet, obj); // \"已存储到 WeakSet 中作为弱引用\"\naddWeakReference(regularSet, obj); // \"不是 WeakSet\"\n```\n\n对于防止内存泄漏的对象跟踪很有用。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/compat';\n\n// DOM 元素跟踪示例\nfunction trackDOMElement(tracker: unknown, element: Element) {\n  if (isWeakSet(tracker)) {\n    // 当 DOM 元素被删除时，WeakSet 中也会自动删除\n    tracker.add(element);\n    console.log('开始跟踪 DOM 元素');\n\n    // 稍后检查跟踪状态\n    if (tracker.has(element)) {\n      console.log('此元素正在被跟踪');\n    }\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 WeakSet 的值。\n\n#### 返回值\n\n(`value is WeakSet<object>`): 如果值为 WeakSet 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/matches.md",
    "content": "# matches (Lodash 兼容性)\n\n创建一个函数来检查给定模式的部分匹配。\n\n```typescript\nconst matcher = matches(pattern);\n```\n\n## 用法\n\n### `matches(source)`\n\n当您想创建一个函数来检查对象或数组的结构和值是否与特定模式匹配时使用 `matches`。在数组过滤或对象搜索中很有用。\n\n```typescript\nimport { matches } from 'es-toolkit/compat';\n\n// 对象模式匹配\nconst userMatcher = matches({ age: 25, department: 'Engineering' });\n\nconst users = [\n  { name: 'Alice', age: 25, department: 'Engineering' },\n  { name: 'Bob', age: 30, department: 'Marketing' },\n  { name: 'Charlie', age: 25, department: 'Engineering' },\n];\n\nconst engineeringUsers = users.filter(userMatcher);\n// [{ name: 'Alice', age: 25, department: 'Engineering' },\n//  { name: 'Charlie', age: 25, department: 'Engineering' }]\n\n// 嵌套对象模式\nconst profileMatcher = matches({\n  profile: { city: 'Seoul', verified: true },\n});\n\nconst profiles = [\n  { name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } },\n  { name: 'Lee', profile: { city: 'Busan', verified: true } },\n  { name: 'Park', profile: { city: 'Seoul', verified: false } },\n];\n\nconst seoulVerifiedUsers = profiles.filter(profileMatcher);\n// [{ name: 'Kim', profile: { city: 'Seoul', verified: true, score: 100 } }]\n\n// 数组模式匹配\nconst arrayMatcher = matches([2, 4]);\nconst arrays = [\n  [1, 2, 3, 4, 5],\n  [2, 4, 6],\n  [1, 3, 5],\n];\nconst matchingArrays = arrays.filter(arrayMatcher);\n// [[1, 2, 3, 4, 5], [2, 4, 6]]\n\n// 空模式匹配所有值\nconst emptyMatcher = matches({});\nemptyMatcher({ anything: 'value' }); // true\nemptyMatcher([]); // true\nemptyMatcher(null); // true\n```\n\n#### 参数\n\n- `source` (`unknown`): 作为匹配模式的对象或值。\n\n#### 返回值\n\n(`(target: unknown) => boolean`): 返回一个函数，用于检查给定值是否与模式部分匹配。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/predicate/matchesProperty.md",
    "content": "# matchesProperty (Lodash 兼容性)\n\n创建一个函数来检查特定属性是否与给定值匹配。\n\n```typescript\nconst checker = matchesProperty(path, value);\n```\n\n## 用法\n\n### `matchesProperty(property, source)`\n\n当您想创建一个函数来检查对象的特定属性是否与给定值匹配时使用 `matchesProperty`。在数组过滤或对象搜索中很有用。\n\n```typescript\nimport { matchesProperty } from 'es-toolkit/compat';\n\n// 简单属性检查\nconst checkName = matchesProperty('name', 'Alice');\n\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Alice', age: 35 },\n];\n\nconst aliceUsers = users.filter(checkName);\n// [{ name: 'Alice', age: 25 }, { name: 'Alice', age: 35 }]\n\n// 嵌套属性检查（数组路径）\nconst checkCity = matchesProperty(['address', 'city'], 'Seoul');\n\nconst profiles = [\n  { name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n  { name: 'Lee', address: { city: 'Busan', district: 'Haeundae' } },\n  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } },\n];\n\nconst seoulUsers = profiles.filter(checkCity);\n// [{ name: 'Kim', address: { city: 'Seoul', district: 'Gangnam' } },\n//  { name: 'Park', address: { city: 'Seoul', district: 'Mapo' } }]\n\n// 用字符串表示深层路径\nconst checkScore = matchesProperty('stats.game.score', 100);\n\nconst players = [\n  { name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n  { name: 'Player2', stats: { game: { score: 95, level: 4 } } },\n  { name: 'Player3', stats: { game: { score: 100, level: 6 } } },\n];\n\nconst perfectScorers = players.filter(checkScore);\n// [{ name: 'Player1', stats: { game: { score: 100, level: 5 } } },\n//  { name: 'Player3', stats: { game: { score: 100, level: 6 } } }]\n\n// 与复杂对象匹配\nconst checkRole = matchesProperty('role', { type: 'admin', permissions: ['read', 'write'] });\n\nconst accounts = [\n  { user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n  { user: 'Bob', role: { type: 'user', permissions: ['read'] } },\n  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } },\n];\n\nconst admins = accounts.filter(checkRole);\n// [{ user: 'Alice', role: { type: 'admin', permissions: ['read', 'write'] } },\n//  { user: 'Charlie', role: { type: 'admin', permissions: ['read', 'write'] } }]\n```\n\n#### 参数\n\n- `property` (`PropertyKey | PropertyKey[]`): 要检查的属性路径。可以使用字符串、数组或点分隔路径。\n- `source` (`unknown`): 要与属性值比较的值。\n\n#### 返回值\n\n(`(target: unknown) => boolean`): 返回一个函数，用于检查给定对象的属性是否与值匹配。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/camelCase.md",
    "content": "# camelCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `camelCase`\n\n由于处理非字符串输入值和删除缩写撇号等原因,此 `camelCase` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [camelCase](../../string/camelCase.md)。\n\n:::\n\n将字符串转换为驼峰命名法。\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 用法\n\n### `camelCase(str)`\n\n将字符串转换为驼峰命名法。驼峰命名法是一种命名约定,第一个单词以小写字母开头,后续单词的首字母大写,所有单词连接时不带空格。\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase('camelCase'); // 'camelCase'\ncamelCase('some whitespace'); // 'someWhitespace'\ncamelCase('hyphen-text'); // 'hyphenText'\ncamelCase('HTTPRequest'); // 'httpRequest'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { camelCase } from 'es-toolkit/compat';\n\ncamelCase(123); // '123'\ncamelCase(null); // ''\ncamelCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string | object`,可选): 要转换为驼峰命名法的值。\n\n#### 返回值\n\n(`string`): 返回转换为驼峰命名法的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/capitalize.md",
    "content": "# capitalize (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `capitalize`\n\n由于处理非字符串输入值,此 `capitalize` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [capitalize](../../string/capitalize.md)。\n\n:::\n\n将字符串的第一个字符转换为大写,其余字符转换为小写。\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 用法\n\n### `capitalize(str)`\n\n将字符串的第一个字符转换为大写,其余字符转换为小写。这对于改善单词的第一印象或将其格式化为标题形式很有用。\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize('fred'); // 'Fred'\ncapitalize('FRED'); // 'Fred'\ncapitalize('fRED'); // 'Fred'\n```\n\n空字符串和非字符串值也可以处理。\n\n```typescript\nimport { capitalize } from 'es-toolkit/compat';\n\ncapitalize(''); // ''\ncapitalize(123); // '123'\ncapitalize(null); // ''\ncapitalize(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要首字母大写的字符串。\n\n#### 返回值\n\n(`string`): 返回首字母大写、其余字母小写的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/deburr.md",
    "content": "# deburr (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `deburr`\n\n由于处理非字符串输入值,此 `deburr` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [deburr](../../string/deburr.md)。\n\n:::\n\n将字符串中的特殊字符和变音符号转换为ASCII字符。\n\n```typescript\nconst result = deburr(str);\n```\n\n## 用法\n\n### `deburr(str)`\n\n将字符串中的特殊字符和变音符号转换为ASCII字符。这对于使多语言文本更易于搜索或排序很有用。\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr('Æthelred'); // 'Aethelred'\ndeburr('München'); // 'Munchen'\ndeburr('Crème brûlée'); // 'Creme brulee'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { deburr } from 'es-toolkit/compat';\n\ndeburr(123); // '123'\ndeburr(null); // ''\ndeburr(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要删除特殊字符的字符串。\n\n#### 返回值\n\n(`string`): 返回特殊字符和变音符号转换为ASCII字符的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/endsWith.md",
    "content": "# endsWith (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.endsWith`\n\n由于处理 `null` 或 `undefined`,此 `endsWith` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.endsWith`。\n\n:::\n\n检查字符串是否以指定的字符串结尾。\n\n```typescript\nconst result = endsWith(str, target);\n```\n\n## 用法\n\n### `endsWith(str, target, position?)`\n\n当您想检查字符串是否以特定字符串结尾时,请使用 `endsWith`。您还可以指定搜索的位置。\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\n// 检查字符串结尾\nendsWith('fooBar', 'Bar');\n// Returns: true\n\nendsWith('fooBar', 'foo');\n// Returns: false\n\n// 检查到特定位置\nendsWith('fooBar', 'foo', 3);\n// Returns: true (检查前3个字符'foo'是否以'foo'结尾)\n```\n\n`null` 或 `undefined` 返回 `false`。\n\n```typescript\nimport { endsWith } from 'es-toolkit/compat';\n\nendsWith(null, 'test');\n// Returns: false\n\nendsWith('test', null);\n// Returns: false\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要搜索的字符串。\n- `target` (`string`,可选): 要在末尾查找的字符串。\n- `position` (`number`,可选): 结束搜索的位置。默认为字符串的完整长度。\n\n#### 返回值\n\n(`boolean`): 如果字符串以指定字符串结尾则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/escape.md",
    "content": "# escape (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `escape`\n\n由于处理非字符串输入值,此 `escape` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [escape](../../string/escape.md)。\n\n:::\n\n将字符串中的HTML特殊字符转换为HTML实体。\n\n```typescript\nconst result = escape(str);\n```\n\n## 用法\n\n### `escape(str)`\n\n将字符串中的 `&`、`<`、`>`、`\"`、`'` 字符转换为相应的HTML实体。这对于在HTML文档中安全插入文本以防止XSS攻击很有用。\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape('This is a <div> element.'); // 'This is a &lt;div&gt; element.'\nescape('This is a \"quote\"'); // 'This is a &quot;quote&quot;'\nescape(\"This is a 'quote'\"); // 'This is a &#39;quote&#39;'\nescape('This is a & symbol'); // 'This is a &amp; symbol'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { escape } from 'es-toolkit/compat';\n\nescape(123); // '123'\nescape(null); // ''\nescape(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要转义HTML特殊字符的字符串。\n\n#### 返回值\n\n(`string`): 返回HTML特殊字符转换为实体的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/escapeRegExp.md",
    "content": "# escapeRegExp (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `escapeRegExp`\n\n由于处理非字符串输入值,此 `escapeRegExp` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [escapeRegExp](../../string/escapeRegExp.md)。\n\n:::\n\n转义字符串中的正则表达式特殊字符。\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 用法\n\n### `escapeRegExp(str)`\n\n转义字符串中的正则表达式特殊字符 `^`、`$`、`\\`、`.`、`*`、`+`、`?`、`(`、`)`、`[`、`]`、`{`、`}`、`|`。当您想在动态创建正则表达式时将字符串按字面处理时很有用。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp('[es-toolkit](https://es-toolkit.dev/)');\n// '\\\\[es-toolkit\\\\]\\\\(https://es-toolkit\\\\.dev/\\\\)'\n\nescapeRegExp('$^{}.+*?()[]|\\\\');\n// '\\\\$\\\\^\\\\{\\\\}\\\\.\\\\+\\\\*\\\\?\\\\(\\\\)\\\\[\\\\]\\\\|\\\\\\\\'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nescapeRegExp(123); // '123'\nescapeRegExp(null); // ''\nescapeRegExp(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要转义正则表达式特殊字符的字符串。\n\n#### 返回值\n\n(`string`): 返回正则表达式特殊字符被转义的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/kebabCase.md",
    "content": "# kebabCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `kebabCase`\n\n由于处理非字符串输入值和删除缩写撇号等原因,此 `kebabCase` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [kebabCase](../../string/kebabCase.md)。\n\n:::\n\n将字符串转换为短横线命名法。\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 用法\n\n### `kebabCase(str)`\n\n将字符串转换为短横线命名法。短横线命名法是一种命名约定,每个单词以小写字母书写,并用短横线(-)字符连接。它通常用于URL和CSS类名。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase('camelCase'); // 'camel-case'\nkebabCase('some whitespace'); // 'some-whitespace'\nkebabCase('hyphen-text'); // 'hyphen-text'\nkebabCase('HTTPRequest'); // 'http-request'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/compat';\n\nkebabCase(123); // '123'\nkebabCase(null); // ''\nkebabCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string | object`,可选): 要转换为短横线命名法的值。\n\n#### 返回值\n\n(`string`): 返回转换为短横线命名法的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/lowerCase.md",
    "content": "# lowerCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `lowerCase`\n\n由于处理非字符串输入值和删除缩写撇号等原因,此 `lowerCase` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [lowerCase](../../string/lowerCase.md)。\n\n:::\n\n将字符串转换为小写单词并用空格分隔。\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 用法\n\n### `lowerCase(str)`\n\n将字符串转换为小写单词并用空格分隔。每个单词都转换为小写并用空格字符连接。这对于创建人类可读的文本形式很有用。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase('camelCase'); // 'camel case'\nlowerCase('some whitespace'); // 'some whitespace'\nlowerCase('hyphen-text'); // 'hyphen text'\nlowerCase('HTTPRequest'); // 'http request'\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/compat';\n\nlowerCase(123); // '123'\nlowerCase(null); // ''\nlowerCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string | object`,可选): 要转换为小写格式的值。\n\n#### 返回值\n\n(`string`): 返回小写单词用空格分隔的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/lowerFirst.md",
    "content": "# lowerFirst (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `lowerFirst`\n\n由于处理非字符串输入值,此 `lowerFirst` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [lowerFirst](../../string/lowerFirst.md)。\n\n:::\n\n将字符串的第一个字符转换为小写。\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 用法\n\n### `lowerFirst(str)`\n\n将字符串的第一个字符转换为小写。其余字符保持不变。这对于创建驼峰命名变量名或只想将第一个字符小写时很有用。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst('fred'); // 'fred'\nlowerFirst('Fred'); // 'fred'\nlowerFirst('FRED'); // 'fRED'\nlowerFirst(''); // ''\n```\n\n非字符串值也会在处理前转换为字符串。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/compat';\n\nlowerFirst(123); // '123'\nlowerFirst(null); // ''\nlowerFirst(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要将首字母转换为小写的字符串。\n\n#### 返回值\n\n(`string`): 返回首字母转换为小写的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/pad.md",
    "content": "# pad (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `pad`\n\n由于处理 `null` 或 `undefined` 等原因,此 `pad` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [pad](../../string/pad.md)。\n\n:::\n\n在字符串的两侧添加填充字符以达到指定的长度。\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 用法\n\n### `pad(str, length, chars)`\n\n当您想在字符串两侧添加填充以匹配所需长度时,请使用 `pad`。如果填充字符不能均匀分配,额外的字符将放在右侧。\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\n// 用默认空格填充\npad('abc', 8);\n// Returns: '  abc   '\n\n// 用指定字符填充\npad('abc', 8, '_-');\n// Returns: '_-abc_-_'\n\n// 如果已经足够长则原样返回\npad('abc', 3);\n// Returns: 'abc'\n\n// 如果长度更短则原样返回\npad('abc', 2);\n// Returns: 'abc'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { pad } from 'es-toolkit/compat';\n\npad(null, 5); // '     '\npad(undefined, 3, '*'); // '***'\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要填充的字符串。\n- `length` (`number`,可选): 目标长度。默认为 `0`。\n- `chars` (`string`,可选): 用于填充的字符。默认为空格 `' '`。\n\n#### 返回值\n\n(`string`): 返回填充到指定长度的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/padEnd.md",
    "content": "# padEnd (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.padEnd`\n\n由于处理非字符串值,此 `padEnd` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.padEnd`。\n\n:::\n\n在字符串末尾添加填充以扩展到指定的长度。\n\n```typescript\nconst padded = padEnd(str, length, chars);\n```\n\n## 用法\n\n### `padEnd(str, length?, chars?)`\n\n当您想在字符串末尾添加填充以匹配所需长度时,请使用 `padEnd`。\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\n// 用空格填充\npadEnd('abc', 6);\n// Returns: 'abc   '\n\n// 用特定字符填充\npadEnd('abc', 6, '_-');\n// Returns: 'abc_-_'\n\n// 如果原始长度更长则原样返回\npadEnd('abc', 3);\n// Returns: 'abc'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { padEnd } from 'es-toolkit/compat';\n\npadEnd(null, 5, '*');\n// Returns: '*****'\n\npadEnd(undefined, 3);\n// Returns: '   '\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要添加填充的字符串。\n- `length` (`number`,可选): 希望的最终字符串长度。默认为 `0`。\n- `chars` (`string`,可选): 用于填充的字符。默认为 `' '`(空格)。\n\n#### 返回值\n\n(`string`): 返回在末尾添加了填充的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/padStart.md",
    "content": "# padStart (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.padStart`\n\n由于处理非字符串值,此 `padStart` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.padStart`。\n\n:::\n\n在字符串开头添加填充以扩展到指定的长度。\n\n```typescript\nconst padded = padStart(str, length, chars);\n```\n\n## 用法\n\n### `padStart(str, length?, chars?)`\n\n当您想在字符串开头添加填充以匹配所需长度时,请使用 `padStart`。\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\n// 用空格填充\npadStart('abc', 6);\n// Returns: '   abc'\n\n// 用特定字符填充\npadStart('abc', 6, '_-');\n// Returns: '_-_abc'\n\n// 如果原始长度更长则原样返回\npadStart('abc', 3);\n// Returns: 'abc'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { padStart } from 'es-toolkit/compat';\n\npadStart(null, 5, '*');\n// Returns: '*****'\n\npadStart(undefined, 3);\n// Returns: '   '\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要添加填充的字符串。\n- `length` (`number`,可选): 希望的最终字符串长度。默认为 `0`。\n- `chars` (`string`,可选): 用于填充的字符。默认为 `' '`(空格)。\n\n#### 返回值\n\n(`string`): 返回在开头添加了填充的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/repeat.md",
    "content": "# repeat (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.repeat`\n\n由于处理非字符串值和整数转换,此 `repeat` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.repeat`。\n\n:::\n\n将字符串重复指定次数。\n\n```typescript\nconst repeated = repeat(str, n);\n```\n\n## 用法\n\n### `repeat(str, n?)`\n\n当您想多次重复字符串以创建新字符串时,请使用 `repeat`。如果重复次数小于1,则返回空字符串。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\n// 重复字符串\nrepeat('abc', 2);\n// Returns: 'abcabc'\n\nrepeat('hello', 3);\n// Returns: 'hellohellohello'\n\n// 重复0次返回空字符串\nrepeat('abc', 0);\n// Returns: ''\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat(null, 3);\n// Returns: ''\n\nrepeat(undefined, 2);\n// Returns: ''\n```\n\n如果不指定重复次数,则重复1次。\n\n```typescript\nimport { repeat } from 'es-toolkit/compat';\n\nrepeat('abc');\n// Returns: 'abc'\n```\n\n#### 参数\n\n- `str` (`string`,可选): 要重复的字符串。\n- `n` (`number`,可选): 重复次数。默认为 `1`。\n\n#### 返回值\n\n(`string`): 返回重复指定次数的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/replace.md",
    "content": "# replace (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.replace`\n\n由于处理非字符串值,此 `replace` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.replace`。\n\n:::\n\n将字符串中的匹配模式替换为其他字符串。\n\n```typescript\nconst replaced = replace(target, pattern, replacement);\n```\n\n## 用法\n\n### `replace(target, pattern, replacement)`\n\n当您想在字符串中查找特定模式并替换为其他字符串时,请使用 `replace`。您可以使用字符串或正则表达式模式,替换内容可以指定为字符串或函数。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 用字符串模式替换\nreplace('abcde', 'de', '123');\n// Returns: 'abc123'\n\n// 用正则表达式模式替换\nreplace('abcde', /[bd]/g, '-');\n// Returns: 'a-c-e'\n```\n\n您也可以使用函数来动态决定替换内容。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\n// 用函数决定替换内容\nreplace('abcde', 'de', match => match.toUpperCase());\n// Returns: 'abcDE'\n\n// 正则表达式和函数的组合\nreplace('abcde', /[bd]/g, match => match.toUpperCase());\n// Returns: 'aBcDe'\n```\n\n`null` 或 `undefined` 目标被视为空字符串。\n\n```typescript\nimport { replace } from 'es-toolkit/compat';\n\nreplace(null, 'test', 'replaced');\n// Returns: ''\n\nreplace(undefined, /test/g, 'replaced');\n// Returns: ''\n```\n\n#### 参数\n\n- `target` (`string`): 要替换的目标字符串。\n- `pattern` (`string | RegExp`): 要查找的模式。\n- `replacement` (`string | Function`): 替换内容。如果是函数,则接收匹配的字符串并应返回替换字符串。\n\n#### 返回值\n\n(`string`): 返回模式被替换的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/snakeCase.md",
    "content": "# snakeCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `snakeCase`\n\n此 `snakeCase` 函数由于处理 `null` 或 `undefined` 的规范化逻辑而运行缓慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [snakeCase](../../string/snakeCase.md)。\n\n:::\n\n将字符串转换为蛇形命名法。\n\n```typescript\nconst snakeCased = snakeCase(str);\n```\n\n## 用法\n\n### `snakeCase(str)`\n\n当您想将字符串转换为蛇形命名法 (snake*case) 时,请使用 `snakeCase`。蛇形命名法是一种命名约定,其中每个单词都以小写字母书写,并用下划线 (*) 连接。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\n// 转换驼峰命名法\nsnakeCase('camelCase');\n// Returns: 'camel_case'\n\n// 转换空格分隔的字符串\nsnakeCase('some whitespace');\n// Returns: 'some_whitespace'\n\n// 转换连字符分隔的字符串\nsnakeCase('hyphen-text');\n// Returns: 'hyphen_text'\n\n// 处理连续大写字母\nsnakeCase('HTTPRequest');\n// Returns: 'http_request'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/compat';\n\nsnakeCase(null); // ''\nsnakeCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要转换为蛇形命名法的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为蛇形命名法的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/split.md",
    "content": "# split (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.split`\n\n此 `split` 函数由于处理 `null` 或 `undefined` 而运行缓慢。\n\n请使用更快、更现代的 JavaScript 的 `String.prototype.split`。\n\n:::\n\n使用分隔符将字符串拆分为数组。\n\n```typescript\nconst segments = split(str, separator);\n```\n\n## 用法\n\n### `split(string, separator?, limit?)`\n\n当您想使用特定分隔符将字符串拆分为数组时,请使用 `split`。您还可以限制结果数组的最大长度。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\n// 按连字符拆分\nsplit('a-b-c', '-');\n// 返回值: ['a', 'b', 'c']\n\n// 限制结果数量\nsplit('a-b-c-d', '-', 2);\n// 返回值: ['a', 'b']\n\n// 按正则表达式拆分\nsplit('hello world', /\\s/);\n// 返回值: ['hello', 'world']\n```\n\n如果未指定分隔符,整个字符串将成为数组的第一个元素。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit('hello');\n// 返回值: ['hello']\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { split } from 'es-toolkit/compat';\n\nsplit(null);\n// 返回值: ['']\n\nsplit(undefined);\n// 返回值: ['']\n```\n\n#### 参数\n\n- `string` (`string`, 可选): 要拆分的字符串。默认为空字符串。\n- `separator` (`RegExp | string`, 可选): 用于拆分的分隔符。\n- `limit` (`number`, 可选): 结果数组的最大长度。\n\n#### 返回值\n\n(`string[]`): 返回由分隔符拆分的字符串数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/startCase.md",
    "content": "# startCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `startCase`\n\n由于处理 `null` 或 `undefined` 的规范化逻辑,此 `startCase` 函数运行速度较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [startCase](../../string/startCase.md)。\n\n:::\n\n将字符串转换为 start case。\n\n```typescript\nconst startCased = startCase(str);\n```\n\n## 用法\n\n### `startCase(str)`\n\n当您想将字符串转换为 Start Case 时,请使用 `startCase`。Start Case 是一种命名约定,每个单词的首字母大写并用空格分隔。\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\n// 转换普通字符串\nstartCase('hello world');\n// 返回值: 'Hello World'\n\n// 已经大写的单词保持不变\nstartCase('HELLO WORLD');\n// 返回值: 'HELLO WORLD'\n\n// 转换连字符分隔的字符串\nstartCase('hello-world');\n// 返回值: 'Hello World'\n\n// 转换下划线分隔的字符串\nstartCase('hello_world');\n// 返回值: 'Hello World'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { startCase } from 'es-toolkit/compat';\n\nstartCase(null); // ''\nstartCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要转换为 start case 的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为 start case 的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/startsWith.md",
    "content": "# startsWith (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.startsWith`\n\n这个 `startsWith` 函数由于处理 `null` 或 `undefined` 而运行较慢。\n\n请使用更快、更现代的 JavaScript 的 `String.prototype.startsWith`。\n\n:::\n\n检查字符串是否以指定字符串开头。\n\n```typescript\nconst result = startsWith(str, target);\n```\n\n## 用法\n\n### `startsWith(str, target, position?)`\n\n当您想检查字符串是否以特定字符串开头时,使用 `startsWith`。您还可以指定开始搜索的位置。\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\n// 检查字符串开头\nstartsWith('fooBar', 'foo');\n// 返回值: true\n\nstartsWith('fooBar', 'bar');\n// 返回值: false\n\n// 从特定位置开始检查\nstartsWith('fooBar', 'Bar', 3);\n// 返回值: true (检查从第3个位置开始是否以 'Bar' 开头)\n```\n\n对于 `null` 或 `undefined` 返回 `false`。\n\n```typescript\nimport { startsWith } from 'es-toolkit/compat';\n\nstartsWith(null, 'test');\n// 返回值: false\n\nstartsWith('test', null);\n// 返回值: false\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要检查的字符串。\n- `target` (`string`, 可选): 要在开头查找的字符串。\n- `position` (`number`, 可选): 开始搜索的位置。默认为 `0`。\n\n#### 返回值\n\n(`boolean`): 如果字符串以指定字符串开头则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/template.md",
    "content": "# template (Lodash 兼容性)\n\n::: warning 使用 JavaScript 模板字面量\n\n由于复杂的字符串处理,这个 `template` 函数运行较慢。\n\n请使用更快、更现代的 JavaScript 模板字面量。\n\n:::\n\n创建一个函数,将值插入字符串模板以生成新字符串。\n\n```typescript\nconst compiled = template(templateString);\n```\n\n## 用法\n\n### `template(string, options?)`\n\n当您想要将数据插入字符串模板以创建完整字符串时,请使用 `template`。您可以安全地转义值、按原样插入值或执行 JavaScript 代码。\n\n基本用法允许您插入或转义值。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 按原样插入值\nconst compiled = template('<%= value %>');\ncompiled({ value: 'Hello, World!' });\n// 返回: 'Hello, World!'\n\n// 安全转义 HTML\nconst safeCompiled = template('<%- value %>');\nsafeCompiled({ value: '<script>alert(\"xss\")</script>' });\n// 返回: '&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;'\n```\n\n您也可以执行 JavaScript 代码。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 使用条件语句\nconst compiled = template('<% if (user) { %>你好 <%= user %>!<% } %>');\ncompiled({ user: 'es-toolkit' });\n// 返回: '你好 es-toolkit!'\n\n// 使用循环\nconst listTemplate = template('<% users.forEach(function(user) { %><li><%= user %></li><% }); %>');\nlistTemplate({ users: ['小明', '小红', '小刚'] });\n// 返回: '<li>小明</li><li>小红</li><li>小刚</li>'\n```\n\n您可以指定变量名以更安全地使用。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= data.name %> 今年 <%= data.age %> 岁', {\n  variable: 'data',\n});\ncompiled({ name: '小明', age: 25 });\n// 返回: '小明 今年 25 岁'\n```\n\n您可以导入和使用外部函数。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\nconst compiled = template('<%= _.toUpper(message) %>', {\n  imports: { _: { toUpper: str => str.toUpperCase() } },\n});\ncompiled({ message: 'hello world' });\n// 返回: 'HELLO WORLD'\n```\n\n您也可以创建自定义分隔符。\n\n```typescript\nimport { template } from 'es-toolkit/compat';\n\n// 使用自定义分隔符插入值\nconst compiled = template('{{ message }}', {\n  interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n});\ncompiled({ message: '你好!' });\n// 返回: '你好!'\n\n// 使用自定义分隔符转义\nconst safeCompiled = template('[- html -]', {\n  escape: /\\[-([\\s\\S]+?)-\\]/g,\n});\nsafeCompiled({ html: '<div>内容</div>' });\n// 返回: '&lt;div&gt;内容&lt;/div&gt;'\n```\n\n#### 参数\n\n- `string` (`string`): 模板字符串。\n- `options` (`object`, 可选): 配置对象。\n  - `options.escape` (`RegExp`, 可选): 用于 HTML 转义的正则表达式分隔符。默认为 `<%-([\\s\\S]+?)%>`。\n  - `options.evaluate` (`RegExp`, 可选): 用于执行 JavaScript 代码的正则表达式分隔符。默认为 `<%([\\s\\S]+?)%>`。\n  - `options.interpolate` (`RegExp`, 可选): 用于值插入的正则表达式分隔符。默认为 `<%=([\\s\\S]+?)%>`。\n  - `options.variable` (`string`, 可选): 数据对象的变量名。\n  - `options.imports` (`object`, 可选): 模板中使用的函数。\n  - `options.sourceURL` (`string`, 可选): 用于调试的源 URL。\n\n#### 返回值\n\n(`TemplateExecutor`): 一个接收数据对象并返回完整字符串的函数。生成的函数代码也可以通过 `source` 属性访问。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/toLower.md",
    "content": "# toLower (Lodash 兼容性)\n\n::: warning 使用 JavaScript 的 `String.prototype.toLowerCase`\n\n此 `toLower` 函数由于处理非字符串值而运行缓慢。\n\n请使用更快、更现代的 JavaScript 的 `String.prototype.toLowerCase`。\n\n:::\n\n将值转换为字符串后再转换为小写。\n\n```typescript\nconst lowercased = toLower(value);\n```\n\n## 用法\n\n### `toLower(value?)`\n\n当您想将值转换为小写字符串时,请使用 `toLower`。它首先将任何类型的值转换为字符串,然后转换为小写。\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\n// 将字符串转换为小写\ntoLower('--FOO-BAR--');\n// Returns: '--foo-bar--'\n\ntoLower('Hello World');\n// Returns: 'hello world'\n\n// 转换数字\ntoLower(123);\n// Returns: '123'\n\n// 转换数组\ntoLower([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { toLower } from 'es-toolkit/compat';\n\ntoLower(null);\n// Returns: ''\n\ntoLower(undefined);\n// Returns: ''\n\ntoLower();\n// Returns: ''\n```\n\n#### 参数\n\n- `value` (`unknown`,可选): 要转换为小写的值。\n\n#### 返回值\n\n(`string`): 返回转换为小写的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/toUpper.md",
    "content": "# toUpper (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.toUpperCase`\n\n这个 `toUpper` 函数由于处理非字符串值而性能较慢。\n\n请使用更快、更现代的 JavaScript 的 `String.prototype.toUpperCase`。\n\n:::\n\n将值转换为字符串后转换为大写。\n\n```typescript\nconst uppercased = toUpper(value);\n```\n\n## 用法\n\n### `toUpper(value?)`\n\n当您想将值转换为大写字符串时,请使用 `toUpper`。它首先将任何类型的值转换为字符串,然后转换为大写。\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\n// 将字符串转换为大写\ntoUpper('--foo-bar--');\n// Returns: '--FOO-BAR--'\n\ntoUpper('Hello World');\n// Returns: 'HELLO WORLD'\n\n// 转换数字\ntoUpper(123);\n// Returns: '123'\n\n// 转换数组\ntoUpper([1, 2, 3]);\n// Returns: '1,2,3'\n```\n\n`null` 和 `undefined` 被处理为空字符串。\n\n```typescript\nimport { toUpper } from 'es-toolkit/compat';\n\ntoUpper(null);\n// Returns: ''\n\ntoUpper(undefined);\n// Returns: ''\n\ntoUpper();\n// Returns: ''\n```\n\n#### 参数\n\n- `value` (`unknown`, 可选): 要转换为大写的值。\n\n#### 返回值\n\n(`string`): 返回大写字符串.\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/trim.md",
    "content": "# trim (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `trim`\n\n由于需要处理 `null` 或 `undefined` 以及数组类型的 `chars`,此 `trim` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [trim](../../string/trim.md)。\n\n:::\n\n移除字符串开头和结尾的空格或指定字符。\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 用法\n\n### `trim(str, chars)`\n\n当您想要移除字符串开头和结尾的空格或特定字符时,请使用 `trim`。如果未指定 `chars`,则只移除开头和结尾的空格。\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\n// 移除开头和结尾的空格\ntrim('  hello  ');\n// 返回: 'hello'\n\n// 移除指定字符\ntrim('--hello--', '-');\n// 返回: 'hello'\n\n// 使用数组移除多个字符\ntrim('##hello##', ['#', 'o']);\n// 返回: 'hell'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { trim } from 'es-toolkit/compat';\n\ntrim(null); // ''\ntrim(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要修剪的字符串。\n- `chars` (`string`, 可选): 要移除的字符。如果未指定,将移除空格。\n\n#### 返回值\n\n(`string`): 返回从开头和结尾移除指定字符后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/trimEnd.md",
    "content": "# trimEnd (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `trimEnd`\n\n由于需要处理 `null` 或 `undefined` 以及参数顺序变更,此 `trimEnd` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [trimEnd](../../string/trimEnd.md)。\n\n:::\n\n移除字符串结尾的空格或指定字符。\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 用法\n\n### `trimEnd(str, chars)`\n\n当您想要移除字符串结尾的空格或特定字符时,请使用 `trimEnd`。如果未指定 `chars`,则只移除结尾的空格。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\n// 移除结尾的空格\ntrimEnd('  abc  ');\n// 返回: '  abc'\n\n// 移除指定字符\ntrimEnd('-_-abc-_-', '_-');\n// 返回: '-_-abc'\n\n// 仅应用于字符串结尾\ntrimEnd('abc', 'a');\n// 返回: 'abc'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/compat';\n\ntrimEnd(null); // ''\ntrimEnd(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要从结尾修剪的字符串。\n- `chars` (`string`, 可选): 要移除的字符。如果未指定,将移除空格。\n\n#### 返回值\n\n(`string`): 返回从结尾移除指定字符后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/trimStart.md",
    "content": "# trimStart (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `trimStart`\n\n由于需要处理 `null` 或 `undefined` 以及参数顺序变更,此 `trimStart` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [trimStart](../../string/trimStart.md)。\n\n:::\n\n移除字符串开头的空格或指定字符。\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 用法\n\n### `trimStart(str, chars)`\n\n当您想要移除字符串开头的空格或特定字符时,请使用 `trimStart`。如果未指定 `chars`,则只移除开头的空格。\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\n// 移除开头的空格\ntrimStart('  abc  ');\n// 返回: 'abc  '\n\n// 移除指定字符\ntrimStart('-_-abc-_-', '_-');\n// 返回: 'abc-_-'\n\n// 仅应用于字符串开头\ntrimStart('abc', 'c');\n// 返回: 'abc'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { trimStart } from 'es-toolkit/compat';\n\ntrimStart(null); // ''\ntrimStart(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要从开头修剪的字符串。\n- `chars` (`string`, 可选): 要移除的字符。如果未指定,将移除空格。\n\n#### 返回值\n\n(`string`): 返回从开头移除指定字符后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/truncate.md",
    "content": "# truncate (Lodash 兼容性)\n\n::: warning 请使用 JavaScript 的 `String.prototype.slice`\n\n由于复杂的 Unicode 处理和正则表达式检查,此 `truncate` 函数运行较慢。\n\n请改用更快、更现代的 JavaScript 的 `String.prototype.slice`。\n\n:::\n\n如果字符串长度超过指定的最大长度,则截断字符串并附加省略字符串。\n\n```typescript\nconst truncated = truncate(str, options);\n```\n\n## 用法\n\n### `truncate(string, options?)`\n\n当您想要将长字符串截断到指定长度时,请使用 `truncate`。截断部分将替换为省略字符串(默认值: `\"...\"`)。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 基本用法 (最大 30 个字符)\ntruncate('hi-diddly-ho there, neighborino');\n// 返回: 'hi-diddly-ho there, neighbo...'\n\n// 指定长度\ntruncate('hi-diddly-ho there, neighborino', { length: 24 });\n// 返回: 'hi-diddly-ho there, n...'\n\n// 更改省略字符串\ntruncate('hi-diddly-ho there, neighborino', { omission: ' [...]' });\n// 返回: 'hi-diddly-ho there, neig [...]'\n```\n\n您可以指定分隔符以在该位置截断。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\n// 使用空格分隔符在单词边界处截断\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: ' ',\n});\n// 返回: 'hi-diddly-ho there,...'\n\n// 使用正则表达式指定分隔符\ntruncate('hi-diddly-ho there, neighborino', {\n  length: 24,\n  separator: /,? +/,\n});\n// 返回: 'hi-diddly-ho there...'\n```\n\nUnicode 字符也能正确处理。\n\n```typescript\nimport { truncate } from 'es-toolkit/compat';\n\ntruncate('¥§✈✉🤓', { length: 5 });\n// 返回: '¥§✈✉🤓'\n\ntruncate('¥§✈✉🤓', { length: 4, omission: '…' });\n// 返回: '¥§✈…'\n```\n\n#### 参数\n\n- `string` (`string`, 可选): 要截断的字符串。\n- `options` (`object`, 可选): 选项对象。\n  - `options.length` (`number`, 可选): 最大字符串长度。默认值为 `30`。\n  - `options.omission` (`string`, 可选): 表示文本被省略的字符串。默认值为 `'...'`。\n  - `options.separator` (`RegExp | string`, 可选): 决定截断位置的分隔符模式。\n\n#### 返回值\n\n(`string`): 返回截断后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/unescape.md",
    "content": "# unescape (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `unescape`\n\n由于需要处理 `null` 或 `undefined` 的转换逻辑,此 `unescape` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [unescape](../../string/unescape.md)。\n\n:::\n\n将 HTML 实体转换为原始字符。\n\n```typescript\nconst unescaped = unescape(str);\n```\n\n## 用法\n\n### `unescape(str)`\n\n当您想要将 HTML 实体 `&amp;`、`&lt;`、`&gt;`、`&quot;`、`&#39;` 转换回原始字符时,请使用 `unescape`。这是 `escape` 函数的反向操作。\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\n// 反转义 HTML 标签\nunescape('This is a &lt;div&gt; element.');\n// 返回: 'This is a <div> element.'\n\n// 反转义引号\nunescape('This is a &quot;quote&quot;');\n// 返回: 'This is a \"quote\"'\n\n// 反转义撇号\nunescape('This is a &#39;quote&#39;');\n// 返回: 'This is a 'quote''\n\n// 反转义 & 符号\nunescape('This is a &amp; symbol');\n// 返回: 'This is a & symbol'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { unescape } from 'es-toolkit/compat';\n\nunescape(null); // ''\nunescape(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要反转义的字符串。\n\n#### 返回值\n\n(`string`): 返回将 HTML 实体转换为原始字符后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/upperCase.md",
    "content": "# upperCase (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `upperCase`\n\n由于需要处理 `null` 或 `undefined` 的规范化逻辑,此 `upperCase` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [upperCase](../../string/upperCase.md)。\n\n:::\n\n将字符串转换为大写形式。\n\n```typescript\nconst upperCased = upperCase(str);\n```\n\n## 用法\n\n### `upperCase(str)`\n\n当您想要将字符串转换为大写形式 (UPPER CASE) 时,请使用 `upperCase`。大写是一种命名约定,每个单词都用大写字母书写并用空格连接。\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\n// 转换驼峰命名\nupperCase('camelCase');\n// 返回: 'CAMEL CASE'\n\n// 转换空格分隔的字符串\nupperCase('some whitespace');\n// 返回: 'SOME WHITESPACE'\n\n// 转换连字符分隔的字符串\nupperCase('hyphen-text');\n// 返回: 'HYPHEN TEXT'\n\n// 当大写字母连续出现时\nupperCase('HTTPRequest');\n// 返回: 'HTTP REQUEST'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { upperCase } from 'es-toolkit/compat';\n\nupperCase(null); // ''\nupperCase(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要转换为大写形式的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为大写形式的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/upperFirst.md",
    "content": "# upperFirst (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `upperFirst`\n\n由于需要处理 `null` 或 `undefined` 的转换逻辑,此 `upperFirst` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [upperFirst](../../string/upperFirst.md)。\n\n:::\n\n将字符串的第一个字符转换为大写。\n\n```typescript\nconst upperCased = upperFirst(str);\n```\n\n## 用法\n\n### `upperFirst(str)`\n\n当您想要仅将字符串的第一个字符大写时,请使用 `upperFirst`。其余字符保持不变。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\n// 以小写字母开头的字符串\nupperFirst('fred');\n// 返回: 'Fred'\n\n// 已经以大写字母开头的字符串\nupperFirst('Fred');\n// 返回: 'Fred'\n\n// 全大写字符串\nupperFirst('FRED');\n// 返回: 'FRED'\n```\n\n`null` 或 `undefined` 被视为空字符串。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/compat';\n\nupperFirst(null); // ''\nupperFirst(undefined); // ''\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要将第一个字符转换为大写的字符串。\n\n#### 返回值\n\n(`string`): 返回第一个字符转换为大写后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/string/words.md",
    "content": "# words (Lodash 兼容性)\n\n::: warning 请使用 `es-toolkit` 的 `words`\n\n由于需要处理 `null` 或 `undefined` 以及复杂的 Unicode 支持,此 `words` 函数运行较慢。\n\n请改用更快、更现代的 `es-toolkit` 的 [words](../../string/words.md)。\n\n:::\n\n将字符串拆分为单词数组。\n\n```typescript\nconst wordArray = words(str, pattern);\n```\n\n## 用法\n\n### `words(str, pattern)`\n\n当您想要将字符串拆分为单词时,请使用 `words`。默认情况下,它会识别英文字母、数字、表情符号等来提取单词。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 基本单词提取\nwords('fred, barney, & pebbles');\n// 返回: ['fred', 'barney', 'pebbles']\n\n// 从驼峰命名中提取单词\nwords('camelCaseWord');\n// 返回: ['camel', 'Case', 'Word']\n\n// 包含数字的字符串\nwords('hello123world');\n// 返回: ['hello', '123', 'world']\n```\n\n您还可以使用自定义模式提取单词。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\n// 使用正则表达式提取单词\nwords('hello world', /\\w+/g);\n// 返回: ['hello', 'world']\n\n// 使用字符串模式\nwords('one-two-three', '-');\n// 返回: ['-']\n```\n\n`null` 或 `undefined` 被视为空数组。\n\n```typescript\nimport { words } from 'es-toolkit/compat';\n\nwords(null); // []\nwords(undefined); // []\n```\n\n#### 参数\n\n- `str` (`string`, 可选): 要拆分为单词的字符串。\n- `pattern` (`RegExp | string`, 可选): 用于匹配单词的模式。默认为内置的 Unicode 单词模式。\n\n#### 返回值\n\n(`string[]`): 返回提取的单词数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/bindAll.md",
    "content": "# bindAll (Lodash 兼容性)\n\n将对象的方法绑定到对象本身。\n\n```typescript\nconst boundObject = bindAll(object, methodNames);\n```\n\n## 用法\n\n### `bindAll(object, ...methodNames)`\n\n当您想要将特定方法的 `this` 值固定到该对象时，请使用 `bindAll`。当将方法作为事件处理程序或回调函数传递时，这对于维护 `this` 上下文很有用。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst view = {\n  label: 'docs',\n  click: function () {\n    console.log('clicked ' + this.label);\n  },\n};\n\n// 将方法绑定到对象\nbindAll(view, 'click');\ndocument.addEventListener('click', view.click);\n// => 点击时输出 'clicked docs'\n```\n\n您可以一次绑定多个方法。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  name: 'example',\n  greet() {\n    return `Hello, ${this.name}!`;\n  },\n  farewell() {\n    return `Goodbye, ${this.name}!`;\n  },\n};\n\n// 使用数组绑定多个方法\nbindAll(obj, ['greet', 'farewell']);\n\nconst greet = obj.greet;\ngreet(); // 'Hello, example!' (this 已正确绑定)\n```\n\n它可以处理数字和特殊键。\n\n```typescript\nimport { bindAll } from 'es-toolkit/compat';\n\nconst obj = {\n  '-0': function () {\n    return 'negative zero';\n  },\n  '0': function () {\n    return 'zero';\n  },\n};\n\nbindAll(obj, -0);\nobj['-0'](); // 'negative zero'\n```\n\n#### 参数\n\n- `object` (`Object`): 要绑定方法的对象。\n- `methodNames` (`...(string | string[] | number | IArguments)`): 要绑定的方法名。可以指定为单独的字符串、数组、数字或 Arguments 对象。\n\n#### 返回值\n\n(`Object`): 返回已绑定方法的原始对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/cond.md",
    "content": "# cond (Lodash 兼容性)\n\n::: warning 请使用 if-else 语句或 switch 语句\n\n由于复杂的 iteratee 处理、数组转换和函数验证等原因，这个 `cond` 函数运行缓慢。\n\n请使用更快、更清晰的 if-else 语句或 switch 语句。\n\n:::\n\n接收条件和函数对的数组，创建一个按顺序检查条件并执行第一个为真的条件对应函数的函数。\n\n```typescript\nconst conditionFunction = cond(pairs);\n```\n\n## 用法\n\n### `cond(pairs)`\n\n当您想要按顺序检查多个条件并执行第一个为真的条件对应的函数时，请使用 `cond`。在以函数式方式表达复杂条件逻辑时很有用。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\n// 基本用法\nconst getValue = cond([\n  [x => x > 10, x => 'big'],\n  [x => x > 5, x => 'medium'],\n  [x => x > 0, x => 'small'],\n  [() => true, () => 'zero or negative'],\n]);\n\nconsole.log(getValue(15)); // \"big\"\nconsole.log(getValue(8)); // \"medium\"\nconsole.log(getValue(3)); // \"small\"\nconsole.log(getValue(-1)); // \"zero or negative\"\n```\n\n也可以用于对象模式匹配。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst processUser = cond([\n  [user => user.role === 'admin', user => `管理员: ${user.name}`],\n  [user => user.role === 'user', user => `用户: ${user.name}`],\n  [user => user.role === 'guest', user => `访客: ${user.name}`],\n  [() => true, () => '未知角色'],\n]);\n\nconsole.log(processUser({ name: '张三', role: 'admin' })); // \"管理员: 张三\"\nconsole.log(processUser({ name: '李四', role: 'user' })); // \"用户: 李四\"\n```\n\n只执行第一个为真的条件，如果所有条件都为假，则返回 `undefined`。\n\n```typescript\nimport { cond } from 'es-toolkit/compat';\n\nconst checkValue = cond([\n  [x => x > 10, x => 'greater than 10'],\n  [x => x < 5, x => 'less than 5'],\n]);\n\nconsole.log(checkValue(15)); // \"greater than 10\"\nconsole.log(checkValue(3)); // \"less than 5\"\nconsole.log(checkValue(7)); // undefined (不符合条件)\n```\n\n#### 参数\n\n- `pairs` (`Array<[predicate, func]>`): 由条件函数和要执行的函数对组成的数组。\n\n#### 返回值\n\n(`(...args: any[]) => unknown`): 返回一个新函数，检查条件并执行第一个为真的条件对应的函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/constant.md",
    "content": "# constant (Lodash 兼容性)\n\n::: warning 请使用箭头函数\n\n这个 `constant` 函数为简单的任务创建了额外的函数包装器，产生了不必要的开销。\n\n请使用更简单、更直观的箭头函数。\n\n:::\n\n创建一个总是返回给定值的函数。\n\n```typescript\nconst constantFunction = constant(value);\n```\n\n## 用法\n\n### `constant(value)`\n\n当您需要一个总是返回特定值的函数时，请使用 `constant`。在函数式编程中提供默认值或用作回调函数时很有用。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// 基本用法\nconst always42 = constant(42);\nconsole.log(always42()); // 42\n\nconst alwaysHello = constant('hello');\nconsole.log(alwaysHello()); // \"hello\"\n```\n\n与数组的 map 或其他高阶函数一起使用时很方便。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\n// 将所有元素填充为 0\nconst numbers = [1, 2, 3, 4, 5];\nconst zeros = numbers.map(constant(0));\nconsole.log(zeros); // [0, 0, 0, 0, 0]\n\n// 将所有元素替换为相同的对象\nconst users = ['alice', 'bob', 'charlie'];\nconst defaultUser = users.map(constant({ role: 'user', active: true }));\nconsole.log(defaultUser);\n// [{ role: 'user', active: true }, { role: 'user', active: true }, { role: 'user', active: true }]\n```\n\n也可以用于提供条件默认值。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nfunction processData(data, fallback = constant('默认值')) {\n  return data || fallback();\n}\n\nconsole.log(processData(null)); // \"默认值\"\nconsole.log(processData('实际数据')); // \"实际数据\"\n```\n\n保持对象引用。\n\n```typescript\nimport { constant } from 'es-toolkit/compat';\n\nconst obj = { a: 1 };\nconst getObj = constant(obj);\n\nconsole.log(getObj() === obj); // true (相同的对象引用)\n```\n\n#### 参数\n\n- `value` (`T`, 可选): 函数将返回的值。如果不提供，则返回 `undefined`。\n\n#### 返回值\n\n(`() => T | undefined`): 返回一个总是返回给定值的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/defaultTo.md",
    "content": "# defaultTo (Lodash 兼容性)\n\n对于 `null`、`undefined`、`NaN` 的值返回默认值。\n\n```typescript\nconst result = defaultTo(value, defaultValue);\n```\n\n## 用法\n\n### `defaultTo(value, defaultValue)`\n\n当值为 `null`、`undefined` 或 `NaN` 时，您想要提供默认值时，请使用 `defaultTo`。在处理 API 响应或用户输入中的无效值时很有用。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\n// 基本用法\nconsole.log(defaultTo(null, 'default')); // 'default'\nconsole.log(defaultTo(undefined, 'default')); // 'default'\nconsole.log(defaultTo(NaN, 0)); // 0\nconsole.log(defaultTo('actual', 'default')); // 'actual'\nconsole.log(defaultTo(123, 0)); // 123\n```\n\n可以用于处理 API 响应。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nfunction processUserData(response) {\n  return {\n    name: defaultTo(response.name, '无名称'),\n    age: defaultTo(response.age, 0),\n    score: defaultTo(response.score, 0), // 包括 NaN 处理\n  };\n}\n\n// 当 API 返回不完整数据时\nconst userData = processUserData({\n  name: null,\n  age: undefined,\n  score: NaN,\n});\n\nconsole.log(userData);\n// { name: '无名称', age: 0, score: 0 }\n```\n\n也可以用于数组或对象。\n\n```typescript\nimport { defaultTo } from 'es-toolkit/compat';\n\nconst users = defaultTo(response.users, []);\nconst metadata = defaultTo(response.metadata, {});\n\n// 只处理 null/undefined/NaN，不处理空数组或对象\nconsole.log(defaultTo([], ['default'])); // [] (空数组但是有效值)\nconsole.log(defaultTo({}, { default: true })); // {} (空对象但是有效值)\n```\n\n#### 参数\n\n- `value` (`T | null | undefined`): 要检查的值。\n- `defaultValue` (`D`): 当值为 `null`、`undefined` 或 `NaN` 时要返回的默认值。\n\n#### 返回值\n\n(`T | D`): 如果值有效则返回原始值，否则返回默认值。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/eq.md",
    "content": "# eq (Lodash 兼容性)\n\n检查两个值是否使用 SameValueZero 比较方式相等。\n\n```typescript\nconst isEqual = eq(value, other);\n```\n\n## 用法\n\n### `eq(value, other)`\n\n当您想要检查两个值是否相等时，请使用 `eq`。与常规的 `===` 比较不同，它在 `NaN` 之间的比较中返回 `true`。\n\n```typescript\nimport { eq } from 'es-toolkit/compat';\n\n// 基本用法\nconsole.log(eq(1, 1)); // true\nconsole.log(eq(0, -0)); // true (SameValueZero 中 0 和 -0 被视为相等)\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq('a', 'a')); // true\nconsole.log(eq('a', 'b')); // false\n```\n\n与 `Object.is()` 的不同行为。\n\n```typescript\n// 使用 eq\nconsole.log(eq(NaN, NaN)); // true\nconsole.log(eq(0, -0)); // true\n\n// 使用 Object.is (更快)\nconsole.log(Object.is(NaN, NaN)); // true\nconsole.log(Object.is(0, -0)); // false (Object.is 将 0 和 -0 视为不同)\n\n// 使用 ===\nconsole.log(NaN === NaN); // false\nconsole.log(0 === -0); // true\n```\n\n#### 参数\n\n- `value` (`any`): 要比较的第一个值。\n- `other` (`any`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果两个值相等则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/gt.md",
    "content": "# gt (Lodash 兼容性)\n\n::: warning 请使用 `>` 运算符\n\n由于额外的处理，如 `toNumber` 函数调用和字符串类型检查，这个 `gt` 函数运行缓慢。\n\n请使用更快、更现代的 `>` 运算符。\n\n:::\n\n检查值是否大于另一个值。\n\n```typescript\nconst result = gt(value, other);\n```\n\n## 用法\n\n### `gt(value, other)`\n\n当您想要比较两个值并检查第一个值是否大于第二个值时，请使用 `gt`。字符串之间按字典顺序比较，其他类型转换为数字后比较。\n\n```typescript\nimport { gt } from 'es-toolkit/compat';\n\ngt(3, 1);\n// Returns: true\n\ngt(3, 3);\n// Returns: false\n\ngt(1, 3);\n// Returns: false\n\n// 字符串比较 (字典顺序)\ngt('def', 'abc');\n// Returns: true\n\ngt('abc', 'def');\n// Returns: false\n\n// 其他类型转换为数字后比较\ngt('10', 5);\n// Returns: true (10 > 5)\n\ngt(1, null);\n// Returns: true (1 > 0)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要比较的第一个值。\n- `other` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果第一个值大于第二个值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/gte.md",
    "content": "# gte (Lodash 兼容性)\n\n::: warning 请使用 `>=` 运算符\n\n由于额外的处理，如 `toNumber` 函数调用和字符串类型检查，这个 `gte` 函数运行缓慢。\n\n请使用更快、更现代的 `>=` 运算符。\n\n:::\n\n检查值是否大于或等于另一个值。\n\n```typescript\nconst result = gte(value, other);\n```\n\n## 用法\n\n### `gte(value, other)`\n\n当您想要比较两个值并检查第一个值是否大于或等于第二个值时，请使用 `gte`。字符串之间按字典顺序比较，其他类型转换为数字后比较。\n\n```typescript\nimport { gte } from 'es-toolkit/compat';\n\ngte(3, 1);\n// Returns: true\n\ngte(3, 3);\n// Returns: true\n\ngte(1, 3);\n// Returns: false\n\n// 字符串比较 (字典顺序)\ngte('def', 'abc');\n// Returns: true\n\ngte('abc', 'def');\n// Returns: false\n\n// 其他类型转换为数字后比较\ngte('10', 5);\n// Returns: true (10 >= 5)\n\ngte(1, null);\n// Returns: true (1 >= 0)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要比较的第一个值。\n- `other` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果第一个值大于或等于第二个值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/invoke.md",
    "content": "# invoke (Lodash 兼容性)\n\n::: warning 请直接调用方法\n\n由于路径解析、对象遍历、`get` 函数调用等复杂处理，这个 `invoke` 函数运行缓慢。\n\n请使用更快、更现代的直接方法调用。\n\n:::\n\n使用给定的参数调用对象路径上的方法。\n\n```typescript\nconst result = invoke(object, path, args);\n```\n\n## 用法\n\n### `invoke(object, path, args)`\n\n当您想要用参数调用对象特定路径上的方法时，请使用 `invoke`。路径可以指定为点表示法字符串或属性键数组。\n\n```typescript\nimport { invoke } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 使用点表示法指定路径\ninvoke(object, 'a.b', [1, 2]);\n// Returns: 3\n\n// 使用数组指定路径\ninvoke(object, ['a', 'b'], [1, 2]);\n// Returns: 3\n\n// 不存在的路径\ninvoke(object, 'a.c.d', [1, 2]);\n// Returns: undefined\n\n// 各种类型的参数\nconst obj = {\n  calculate: {\n    sum: function (...numbers) {\n      return numbers.reduce((a, b) => a + b, 0);\n    },\n    multiply: function (a, b) {\n      return a * b;\n    },\n  },\n};\n\ninvoke(obj, 'calculate.sum', [1, 2, 3, 4]);\n// Returns: 10\n\ninvoke(obj, ['calculate', 'multiply'], [5, 6]);\n// Returns: 30\n```\n\n#### 参数\n\n- `object` (`unknown`): 要调用方法的对象。\n- `path` (`PropertyKey | PropertyKey[]`): 要调用的方法的路径。可以是字符串、符号、数字或它们的数组。\n- `args` (`any[]`): 调用方法时使用的参数数组。\n\n#### 返回值\n\n(`any`): 返回被调用方法的结果。如果方法不存在则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/iteratee.md",
    "content": "# iteratee (Lodash 兼容性)\n\n::: warning 请使用直接的函数或属性访问\n\n由于复杂的类型转换和各种情况处理，这个 `iteratee` 函数运行缓慢。\n\n请使用更快、更现代的直接函数或属性访问。\n\n:::\n\n创建一个从元素中返回值的函数。\n\n```typescript\nconst getter = iteratee(source);\n```\n\n## 用法\n\n### `iteratee(value?)`\n\n当您想要创建一个从集合元素中提取值或检查条件的函数时，请使用 `iteratee`。根据提供的参数类型执行不同的操作。\n\n```typescript\nimport { iteratee } from 'es-toolkit/compat';\n\n// 函数: 返回给定的函数本身\nconst func = iteratee(object => object.a);\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(func);\n// Returns: [1, 2, 3]\n\n// 属性名: 返回该属性值的函数\nconst getA = iteratee('a');\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(getA);\n// Returns: [1, 2, 3]\n\n// 对象: 检查是否与给定对象匹配的函数\nconst matchesObj = iteratee({ a: 1 });\n[\n  { a: 1, b: 2 },\n  { a: 2, b: 3 },\n  { a: 1, c: 4 },\n].find(matchesObj);\n// Returns: { a: 1, b: 2 }\n\n// 属性-值对: 检查该属性是否与特定值匹配的函数\nconst matchesProperty = iteratee(['a', 1]);\n[{ a: 1 }, { a: 2 }, { a: 3 }].find(matchesProperty);\n// Returns: { a: 1 }\n\n// null 或无参数: 返回元素本身的函数\nconst identity = iteratee();\n[{ a: 1 }, { a: 2 }, { a: 3 }].map(identity);\n// Returns: [{ a: 1 }, { a: 2 }, { a: 3 }]\n```\n\n根据参数类型的操作:\n\n- **函数**: 原样返回给定的函数。\n- **属性名**: 从元素中返回给定属性的值。\n- **属性-值对**: 返回表示元素的属性是否与给定值匹配的真/假值。\n- **部分对象**: 返回表示元素是否与部分对象的属性和值匹配的真/假值。\n- **null 或无参数**: 返回原样返回元素的函数。\n\n#### 参数\n\n- `value` (`symbol | number | string | object | null | ((...args: any[]) => unknown)`, 可选): 要转换为迭代器的值。默认值为 `null`。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回一个新的迭代器函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/lt.md",
    "content": "# lt (Lodash 兼容性)\n\n::: warning 请使用 `<` 运算符\n\n由于额外的处理，如 `toNumber` 函数调用和字符串类型检查，这个 `lt` 函数运行缓慢。\n\n请使用更快、更现代的 `<` 运算符。\n\n:::\n\n检查值是否小于另一个值。\n\n```typescript\nconst result = lt(value, other);\n```\n\n## 用法\n\n### `lt(value, other)`\n\n当您想要比较两个值并检查第一个值是否小于第二个值时，请使用 `lt`。字符串之间按字典顺序比较，其他类型转换为数字后比较。\n\n```typescript\nimport { lt } from 'es-toolkit/compat';\n\nlt(1, 3);\n// Returns: true\n\nlt(3, 3);\n// Returns: false\n\nlt(3, 1);\n// Returns: false\n\n// 字符串比较 (字典顺序)\nlt('abc', 'def');\n// Returns: true\n\nlt('def', 'abc');\n// Returns: false\n\n// 其他类型转换为数字后比较\nlt('5', 10);\n// Returns: true (5 < 10)\n\nlt(null, 1);\n// Returns: true (0 < 1)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要比较的第一个值。\n- `other` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果第一个值小于第二个值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/lte.md",
    "content": "# lte (Lodash 兼容性)\n\n::: warning 请使用 `<=` 运算符\n\n由于额外的处理，如 `toNumber` 函数调用和字符串类型检查，这个 `lte` 函数运行缓慢。\n\n请使用更快、更现代的 `<=` 运算符。\n\n:::\n\n检查值是否小于或等于另一个值。\n\n```typescript\nconst result = lte(value, other);\n```\n\n## 用法\n\n### `lte(value, other)`\n\n当您想要比较两个值并检查第一个值是否小于或等于第二个值时，请使用 `lte`。字符串之间按字典顺序比较，其他类型转换为数字后比较。\n\n```typescript\nimport { lte } from 'es-toolkit/compat';\n\nlte(1, 3);\n// Returns: true\n\nlte(3, 3);\n// Returns: true\n\nlte(3, 1);\n// Returns: false\n\n// 字符串比较 (字典顺序)\nlte('abc', 'def');\n// Returns: true\n\nlte('def', 'abc');\n// Returns: false\n\n// 其他类型转换为数字后比较\nlte('10', 5);\n// Returns: false (10 <= 5)\n\nlte(null, 0);\n// Returns: true (0 <= 0)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要比较的第一个值。\n- `other` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果第一个值小于或等于第二个值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/method.md",
    "content": "# method (Lodash 兼容性)\n\n创建一个使用参数调用指定路径方法的函数。\n\n```typescript\nconst methodFunc = method(path, ...args);\n```\n\n## 用法\n\n### `method(path, ...args)`\n\n创建一个从对象调用特定路径方法并使用预定义参数的函数。在函数式编程中重用方法调用或在数组的 `map` 等中很有用。\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 创建方法调用函数\nconst add = method('a.b', 1, 2);\nconsole.log(add(object)); // => 3\n\n// 对数组中每个对象调用方法\nconst objects = [{ calc: { sum: (a, b) => a + b } }, { calc: { sum: (a, b) => a * b } }];\n\nconst calculate = method('calc.sum', 5, 3);\nobjects.map(calculate); // => [8, 15]\n```\n\n也可以处理嵌套路径。\n\n```typescript\nimport { method } from 'es-toolkit/compat';\n\nconst obj = {\n  users: {\n    getName: function (prefix) {\n      return prefix + this.name;\n    },\n    name: 'John',\n  },\n};\n\nconst getUserName = method('users.getName', 'Mr. ');\ngetUserName(obj); // => 'Mr. John'\n```\n\n#### 参数\n\n- `path` (`PropertyKey | PropertyKey[]`): 要调用的方法的路径。\n- `...args` (`any[]`): 传递给方法的参数。\n\n#### 返回值\n\n(`(object: any) => any`): 返回一个接受对象并使用参数调用指定路径方法的函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/methodOf.md",
    "content": "# methodOf (Lodash 兼容性)\n\n从给定对象接受路径并使用参数调用方法的函数。\n\n```typescript\nconst pathInvoker = methodOf(object, ...args);\n```\n\n## 用法\n\n### `methodOf(object, ...args)`\n\n创建一个使用预定义参数调用特定对象方法的函数。与 `method` 相反，当您想要固定对象并稍后指定路径时很有用。\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst object = {\n  a: {\n    b: function (x, y) {\n      return x + y;\n    },\n  },\n};\n\n// 预先绑定对象和参数\nconst callMethod = methodOf(object, 1, 2);\nconsole.log(callMethod('a.b')); // => 3\n\n// 对多个路径使用相同的对象和参数调用\nconst calculator = {\n  add: (a, b) => a + b,\n  multiply: (a, b) => a * b,\n  subtract: (a, b) => a - b,\n};\n\nconst compute = methodOf(calculator, 10, 5);\nconsole.log(compute('add')); // => 15\nconsole.log(compute('multiply')); // => 50\nconsole.log(compute('subtract')); // => 5\n```\n\n也可以在嵌套对象中使用。\n\n```typescript\nimport { methodOf } from 'es-toolkit/compat';\n\nconst data = {\n  users: {\n    findById: function (id) {\n      return `User ${id}`;\n    },\n    findByName: function (name) {\n      return `Found ${name}`;\n    },\n  },\n};\n\nconst userFinder = methodOf(data, 'john');\nuserFinder('users.findById'); // => 'User john'\nuserFinder('users.findByName'); // => 'Found john'\n```\n\n#### 参数\n\n- `object` (`object`): 要调用方法的对象。\n- `...args` (`any[]`): 传递给方法的参数。\n\n#### 返回值\n\n(`(path: PropertyKey | PropertyKey[]) => any`): 返回一个接受路径并使用参数调用指定对象方法的函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/now.md",
    "content": "# now (Lodash 兼容性)\n\n::: warning 使用 `Date.now()`\n这个 `now` 函数是一个简单调用 `Date.now()` 的包装函数，是不必要的抽象。\n\n请使用更快速、更直接的 `Date.now()`。\n:::\n\n返回当前时间的毫秒数。\n\n```typescript\nconst currentTime = now();\n```\n\n## 用法\n\n### `now()`\n\n返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。对时间测量或时间戳生成很有用。\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\n// 获取当前时间\nconst currentTime = now();\nconsole.log(currentTime); // => 1703925600000（示例）\n\n// 测量执行时间\nconst startTime = now();\n// 耗时操作\nconst endTime = now();\nconsole.log(`操作时间：${endTime - startTime}ms`);\n\n// 用作时间戳\nconst timestamp = now();\nconst logMessage = `[${timestamp}] 操作完成`;\n```\n\n返回与 `Date.now()` 相同的结果。\n\n```typescript\nimport { now } from 'es-toolkit/compat';\n\nconsole.log(now() === Date.now()); // => true（在同一时间调用时）\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`number`): 返回自1970年1月1日00:00:00 UTC以来到现在的毫秒数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/over.md",
    "content": "# over (Lodash 兼容性)\n\n::: warning 直接使用数组方法\n\n这个 `over` 函数在将函数映射到数组的过程中会产生额外的开销。\n\n改为使用更快、更现代的数组 `map` 方法。\n\n:::\n\n创建一个函数，该函数使用相同的参数调用给定的函数并返回每个函数的结果数组。\n\n```typescript\nconst multiCall = over(funcs);\n```\n\n## 用法\n\n### `over(...iteratees)`\n\n接收多个函数，创建一个函数，该函数使用相同的参数调用每个函数并返回结果数组。当需要用相同的数据进行多种计算时很有用。\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\n// 一起使用数学函数\nconst mathOperations = over([Math.max, Math.min]);\nmathOperations(1, 2, 3, 4);\n// => [4, 1]\n\n// 也可以作为单独的函数传递\nconst operations = over(Math.max, Math.min);\noperations(1, 2, 3, 4);\n// => [4, 1]\n\n// 提取对象属性\nconst getProperties = over(['name', 'age']);\ngetProperties({ name: 'John', age: 30 });\n// => ['John', 30]\n\n// 检查条件\nconst validators = over([\n  { name: 'John' }, // 对象匹配\n  { age: 30 },\n]);\nvalidators({ name: 'John', age: 30 });\n// => [true, true]\n```\n\n也可以处理嵌套路径。\n\n```typescript\nimport { over } from 'es-toolkit/compat';\n\nconst data = {\n  user: { name: 'John', profile: { age: 30 } },\n  settings: { theme: 'dark' },\n};\n\nconst getInfo = over(['user.name', 'user.profile.age', 'settings.theme']);\ngetInfo(data);\n// => ['John', 30, 'dark']\n```\n\n#### 参数\n\n- `...iteratees` (`Array<Function | string | object | Array>`): 要调用的函数或属性路径。可以作为数组传递或作为单独的参数传递。\n\n#### 返回值\n\n(`(...args: any[]) => any[]`): 返回一个函数，该函数接受参数并返回每个函数结果的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/overEvery.md",
    "content": "# overEvery (Lodash 兼容性)\n\n::: warning 使用 `Array.every`\n\n这个 `overEvery` 函数在转换和检查条件函数的过程中会产生额外的开销。\n\n改为使用更快、更现代的 `Array.every` 方法。\n\n:::\n\n创建一个函数，该函数检查所有条件函数是否都返回真值。\n\n```typescript\nconst allValidator = overEvery(predicates);\n```\n\n## 用法\n\n### `overEvery(...predicates)`\n\n接收多个条件函数，创建一个函数，该函数检查给定值是否满足所有条件。对复合条件检查或数据验证很有用。\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// 检查字符串条件\nconst isValidString = overEvery([\n  value => typeof value === 'string',\n  value => value.length > 3,\n  value => value.includes('o'),\n]);\n\nisValidString('hello'); // => true\nisValidString('hi'); // => false (长度为3以下)\nisValidString('test'); // => false (没有'o')\n\n// 检查数字范围\nconst isInRange = overEvery([\n  num => num >= 0,\n  num => num <= 100,\n  num => num % 1 === 0, // 检查是否为整数\n]);\n\nisInRange(50); // => true\nisInRange(-5); // => false (小于0)\nisInRange(150); // => false (超过100)\nisInRange(50.5); // => false (不是整数)\n```\n\n也可以检查对象属性。\n\n```typescript\nimport { overEvery } from 'es-toolkit/compat';\n\n// 检查对象属性\nconst isValidUser = overEvery([\n  'name', // name属性是否为真值\n  { age: 30 }, // age是否为30\n  ['active', true], // active是否为true\n]);\n\nisValidUser({ name: 'John', age: 30, active: true }); // => true\nisValidUser({ name: '', age: 30, active: true }); // => false (name为空字符串)\nisValidUser({ name: 'John', age: 25, active: true }); // => false (age不同)\n```\n\n#### 参数\n\n- `...predicates` (`Array<Function | string | object | Array>`): 要检查的条件函数。可以是函数、属性名、对象、属性-值对等。\n\n#### 返回值\n\n(`(...args: any[]) => boolean`): 返回一个函数，如果满足所有条件则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/overSome.md",
    "content": "# overSome (Lodash 兼容性)\n\n::: warning 使用 `Array.some`\n\n这个 `overSome` 函数在转换和检查条件函数的过程中会产生额外的开销。\n\n改为使用更快、更现代的 `Array.some` 方法。\n\n:::\n\n创建一个函数，该函数检查条件函数中是否有任意一个返回真值。\n\n```typescript\nconst anyValidator = overSome(predicates);\n```\n\n## 用法\n\n### `overSome(...predicates)`\n\n接收多个条件函数，创建一个函数，该函数检查给定值是否满足任意一个条件。对灵活的条件检查或替代验证很有用。\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 检查是否为字符串或数字\nconst isStringOrNumber = overSome([value => typeof value === 'string', value => typeof value === 'number']);\n\nisStringOrNumber('hello'); // => true\nisStringOrNumber(42); // => true\nisStringOrNumber(true); // => false\n\n// 检查多个条件中是否有任意一个满足\nconst hasValidProperty = overSome([\n  obj => obj.name && obj.name.length > 0,\n  obj => obj.email && obj.email.includes('@'),\n  obj => obj.phone && obj.phone.length >= 10,\n]);\n\nhasValidProperty({ name: 'John' }); // => true\nhasValidProperty({ email: 'john@example.com' }); // => true\nhasValidProperty({ phone: '1234567890' }); // => true\nhasValidProperty({ age: 30 }); // => false\n```\n\n也可以检查对象属性。\n\n```typescript\nimport { overSome } from 'es-toolkit/compat';\n\n// 检查多个条件中是否有任意一个匹配\nconst matchesAnyCondition = overSome([\n  'isActive', // isActive属性是否为真值\n  { role: 'admin' }, // role是否为'admin'\n  ['status', 'vip'], // status是否为'vip'\n]);\n\nmatchesAnyCondition({ isActive: true }); // => true\nmatchesAnyCondition({ role: 'admin' }); // => true\nmatchesAnyCondition({ status: 'vip' }); // => true\nmatchesAnyCondition({ role: 'user', status: 'normal' }); // => false\n```\n\n#### 参数\n\n- `...predicates` (`Array<Function | string | object | Array>`): 要检查的条件函数。可以是函数、属性名、对象、属性-值对等。\n\n#### 返回值\n\n(`(...args: any[]) => boolean`): 返回一个函数，如果任意一个条件满足则返回 `true`，否则全部不满足则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/stubArray.md",
    "content": "# stubArray (Lodash 兼容性)\n\n::: warning 直接使用 `[]`\n\n这个 `stubArray` 函数是一个简单返回空数组的包装函数，是不必要的抽象。\n\n改为使用更快、更直接的 `[]`。\n\n:::\n\n始终返回新的空数组。\n\n```typescript\nconst emptyArray = stubArray();\n```\n\n## 用法\n\n### `stubArray()`\n\n始终返回新空数组的函数。当需要空数组作为默认值或在函数式编程中需要一致的返回值时使用。\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\n// 返回空数组\nconst emptyArray = stubArray();\nconsole.log(emptyArray); // => []\n\n// 在数组方法中作为默认值使用\nconst items = [1, 2, 3];\nconst result = items.filter(x => x > 5) || stubArray();\nconsole.log(result); // => []\n\n// 在函数式编程中使用\nconst getData = () => stubArray();\nconst data = getData();\ndata.push('item'); // 新数组，所以安全\n```\n\n每次返回新的数组实例。\n\n```typescript\nimport { stubArray } from 'es-toolkit/compat';\n\nconst arr1 = stubArray();\nconst arr2 = stubArray();\n\nconsole.log(arr1 === arr2); // => false (不同实例)\nconsole.log(Array.isArray(arr1)); // => true\nconsole.log(arr1.length); // => 0\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`any[]`): 返回新的空数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/stubFalse.md",
    "content": "# stubFalse (Lodash 兼容性)\n\n::: warning 直接使用 `false`\n\n这个 `stubFalse` 函数是一个简单返回 `false` 的包装函数，是不必要的抽象。\n\n改为使用更快、更直接的 `false` 值。\n\n:::\n\n始终返回 `false`。\n\n```typescript\nconst falseValue = stubFalse();\n```\n\n## 用法\n\n### `stubFalse()`\n\n始终返回 `false` 的函数。在函数式编程中需要一致的假值或在条件回调中作为默认值时很有用。\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\n// 返回 false\nconst result = stubFalse();\nconsole.log(result); // => false\n\n// 在数组过滤中作为默认条件使用\nconst numbers = [1, 2, 3, 4, 5];\nconst evenNumbers = numbers.filter(stubFalse); // 移除所有元素\nconsole.log(evenNumbers); // => []\n\n// 在函数式编程中使用\nconst isValid = condition => (condition ? someValidation : stubFalse);\nconst validator = isValid(false);\nconsole.log(validator()); // => false\n```\n\n每次返回相同的 `false` 值。\n\n```typescript\nimport { stubFalse } from 'es-toolkit/compat';\n\nconst result1 = stubFalse();\nconst result2 = stubFalse();\n\nconsole.log(result1 === result2); // => true\nconsole.log(typeof result1); // => 'boolean'\nconsole.log(result1); // => false\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`false`): 始终返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/stubObject.md",
    "content": "# stubObject (Lodash 兼容性)\n\n::: warning 直接使用 `{}`\n\n这个 `stubObject` 函数是一个简单返回空对象的包装函数，是不必要的抽象。\n\n改为使用更快、更直接的 `{}`。\n\n:::\n:::\n\n始终返回新的空对象。\n\n```typescript\nconst emptyObject = stubObject();\n```\n\n## 用法\n\n### `stubObject()`\n\n始终返回新空对象的函数。当需要空对象作为默认值或在函数式编程中需要一致的返回值时使用。\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\n// 返回空对象\nconst emptyObject = stubObject();\nconsole.log(emptyObject); // => {}\n\n// 作为默认值使用\nfunction processData(data = stubObject()) {\n  return { ...data, processed: true };\n}\n\nconsole.log(processData()); // => { processed: true }\nconsole.log(processData({ name: 'John' })); // => { name: 'John', processed: true }\n\n// 在函数式编程中使用\nconst createEmpty = () => stubObject();\nconst obj = createEmpty();\nobj.newProperty = 'value'; // 新对象，所以安全\n```\n\n每次返回新的对象实例。\n\n```typescript\nimport { stubObject } from 'es-toolkit/compat';\n\nconst obj1 = stubObject();\nconst obj2 = stubObject();\n\nconsole.log(obj1 === obj2); // => false (不同实例)\nconsole.log(typeof obj1); // => 'object'\nconsole.log(Object.keys(obj1).length); // => 0\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`any`): 返回新的空对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/stubString.md",
    "content": "# stubString (Lodash 兼容性)\n\n::: warning 直接使用 `''`\n\n这个 `stubString` 函数是一个简单返回空字符串的包装函数，是不必要的抽象。\n\n改为使用更快、更直接的 `''`。\n\n:::\n\n始终返回空字符串。\n\n```typescript\nconst emptyString = stubString();\n```\n\n## 用法\n\n### `stubString()`\n\n始终返回空字符串的函数。当需要空字符串作为默认值或在函数式编程中需要一致的返回值时使用。\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\n// 返回空字符串\nconst emptyString = stubString();\nconsole.log(emptyString); // => ''\n\n// 作为默认值使用\nfunction formatMessage(message = stubString()) {\n  return message || '默认消息';\n}\n\nconsole.log(formatMessage()); // => '默认消息'\nconsole.log(formatMessage('你好')); // => '你好'\n\n// 在函数式编程中使用\nconst createEmpty = () => stubString();\nconst str = createEmpty();\nconsole.log(str.length); // => 0\n```\n\n每次返回相同的空字符串。\n\n```typescript\nimport { stubString } from 'es-toolkit/compat';\n\nconst str1 = stubString();\nconst str2 = stubString();\n\nconsole.log(str1 === str2); // => true\nconsole.log(typeof str1); // => 'string'\nconsole.log(str1.length); // => 0\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`string`): 始终返回空字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/stubTrue.md",
    "content": "# stubTrue (Lodash 兼容性)\n\n::: warning 使用 `true` 字面量\n\n这个 `stubTrue` 函数由于不必要的函数调用而运行缓慢。\n\n改为使用更快、更现代的 `true` 字面量。\n\n:::\n\n始终返回 `true` 值。\n\n```typescript\nconst result = stubTrue();\n```\n\n## 用法\n\n### `stubTrue()`\n\n当需要始终返回 `true` 值的回调函数或默认值时，使用 `stubTrue`。在数组方法的过滤或条件逻辑中提供一致的 `true` 值时很有用。\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// 保留数组中所有元素的过滤器\nconst items = [1, 2, 3, 4, 5];\nconst allItems = items.filter(stubTrue);\nconsole.log(allItems); // [1, 2, 3, 4, 5]\n```\n\n也可以在条件设置中作为默认值使用。\n\n```typescript\nimport { stubTrue } from 'es-toolkit/compat';\n\n// 默认启用的选项\nconst defaultOptions = {\n  enableFeatureA: stubTrue(),\n  enableFeatureB: stubTrue(),\n  enableFeatureC: stubTrue(),\n};\n\nconsole.log(defaultOptions); // { enableFeatureA: true, enableFeatureB: true, enableFeatureC: true }\n```\n\n#### 参数\n\n无参数。\n\n#### 返回值\n\n(`boolean`): 始终返回 `true`。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/times.md",
    "content": "# times (Lodash 兼容性)\n\n给定次数执行函数并将结果作为数组返回。\n\n```typescript\nconst result = times(n, iteratee);\n```\n\n## 用法\n\n### `times(n, iteratee)`\n\n执行给定次数的迭代函数并将结果作为数组返回。每次迭代时将当前索引传递给函数。\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\n// 从0到2的索引乘以2的值数组\ntimes(3, i => i * 2);\n// 返回：[0, 2, 4]\n\n// 多次生成相同值\ntimes(2, () => 'es-toolkit');\n// 返回：['es-toolkit', 'es-toolkit']\n```\n\n如果不传递函数，则返回索引数组。\n\n```typescript\nimport { times } from 'es-toolkit/compat';\n\ntimes(3);\n// 返回：[0, 1, 2]\n```\n\n#### 参数\n\n- `n` (`number`): 要迭代的次数。转换为整数，如果小于1或不是安全整数则返回空数组。\n- `iteratee` (`(num: number) => T`, 可选): 每次迭代时执行的函数。接受索引作为参数。如果不提供，则直接返回索引。\n\n#### 返回值\n\n(`T[]`): 返回由每次迭代执行函数的结果组成的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toArray.md",
    "content": "# toArray (Lodash 兼容性)\n\n::: warning 使用 Object.values 和 Array.from\n\n这个 `toArray` 函数由于复杂的类型检验和多种输入处理而运行缓慢。\n\n改为使用更快、更现代的 Object.values 或 Array.from。\n\n:::\n\n将值转换为数组。\n\n```typescript\nconst array = toArray(value);\n```\n\n## 用法\n\n### `toArray(value)`\n\n将各种值转换为数组。对象转换为值的数组，类数组对象转换为数组，其他值转换为空数组。\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\n// 将对象转换为值的数组\ntoArray({ a: 1, b: 2 });\n// Returns: [1, 2]\n\n// 将字符串转换为字符数组\ntoArray('abc');\n// Returns: ['a', 'b', 'c']\n\n// 将 Map 转换为值的数组\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n]);\ntoArray(map);\n// Returns: [['a', 1], ['b', 2]]\n```\n\nnull 或 undefined 转换为空数组。\n\n```typescript\nimport { toArray } from 'es-toolkit/compat';\n\ntoArray(null);\n// Returns: []\n\ntoArray(undefined);\n// Returns: []\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换为数组的值。\n\n#### 返回值\n\n(`any[]`): 返回转换后的数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toFinite.md",
    "content": "# toFinite (Lodash 兼容性)\n\n将值转换为有限数字。\n\n```typescript\nconst finite = toFinite(value);\n```\n\n## 用法\n\n### `toFinite(value)`\n\n将值转换为有限数字。无穷大转换为 Number.MAX_VALUE，NaN 转换为 0。\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\n// 普通数字原样返回\ntoFinite(3.2);\n// Returns: 3.2\n\n// 无穷大转换为 MAX_VALUE\ntoFinite(Infinity);\n// Returns: 1.7976931348623157e+308\n\ntoFinite(-Infinity);\n// Returns: -1.7976931348623157e+308\n\n// 字符串数字转换为数字\ntoFinite('3.2');\n// Returns: 3.2\n```\n\n无效值转换为 0。\n\n```typescript\nimport { toFinite } from 'es-toolkit/compat';\n\ntoFinite(NaN);\n// Returns: 0\n\ntoFinite(Symbol.iterator);\n// Returns: 0\n\ntoFinite(null);\n// Returns: 0\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换的值。\n\n#### 返回值\n\n(`number`): 返回转换后的有限数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toInteger.md",
    "content": "# toInteger (Lodash 兼容性)\n\n将值转换为整数。\n\n```typescript\nconst integer = toInteger(value);\n```\n\n## 用法\n\n### `toInteger(value)`\n\n将值转换为整数。小数部分被舍弃，只保留整数部分。\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\n// 将小数转换为整数\ntoInteger(3.2);\n// Returns: 3\n\n// 将字符串数字转换为整数\ntoInteger('3.2');\n// Returns: 3\n\n// 非常小的数变为 0\ntoInteger(Number.MIN_VALUE);\n// Returns: 0\n\n// 无穷大变为 MAX_VALUE\ntoInteger(Infinity);\n// Returns: 1.7976931348623157e+308\n```\n\n无效值转换为 0。\n\n```typescript\nimport { toInteger } from 'es-toolkit/compat';\n\ntoInteger(NaN);\n// Returns: 0\n\ntoInteger(Symbol.iterator);\n// Returns: 0\n\ntoInteger(null);\n// Returns: 0\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换的值。\n\n#### 返回值\n\n(`number`): 返回转换后的整数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toLength.md",
    "content": "# toLength (Lodash 兼容性)\n\n将值转换为有效的数组索引。\n\n```typescript\nconst length = toLength(value);\n```\n\n## 用法\n\n### `toLength(value)`\n\n将值转换为有效的数组索引。限制为 0 以上 2^32-1 以下的整数。\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\n// 将小数转换为整数\ntoLength(3.2);\n// Returns: 3\n\n// 负数转换为 0\ntoLength(-1);\n// Returns: 0\n\n// 字符串数字进行转换\ntoLength('42');\n// Returns: 42\n\n// 非常大的数转换为限制值\ntoLength(Number.MAX_VALUE);\n// Returns: 4294967295\n```\n\nnull 或 undefined 转换为 0。\n\n```typescript\nimport { toLength } from 'es-toolkit/compat';\n\ntoLength(null);\n// Returns: 0\n\ntoLength(undefined);\n// Returns: 0\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换的值。\n\n#### 返回值\n\n(`number`): 返回 0 以上 2^32-1 以下的有效数组索引。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toNumber.md",
    "content": "# toNumber (Lodash 兼容性)\n\n::: warning 使用 Number 构造函数\n\n这个 `toNumber` 函数由于符号类型检验和额外处理而运行缓慢。\n\n改为使用更快、更现代的 Number 构造函数。\n\n:::\n\n将值转换为数字。\n\n```typescript\nconst number = toNumber(value);\n```\n\n## 用法\n\n### `toNumber(value)`\n\n将值转换为数字。符号处理为 NaN。\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\n// 普通数字原样返回\ntoNumber(3.2);\n// Returns: 3.2\n\n// 字符串数字进行转换\ntoNumber('3.2');\n// Returns: 3.2\n\n// 无穷大也原样返回\ntoNumber(Infinity);\n// Returns: Infinity\n\n// 非常小的数也原样返回\ntoNumber(Number.MIN_VALUE);\n// Returns: 5e-324\n```\n\n符号和 NaN 转换为 NaN。\n\n```typescript\nimport { toNumber } from 'es-toolkit/compat';\n\ntoNumber(Symbol.iterator);\n// Returns: NaN\n\ntoNumber(NaN);\n// Returns: NaN\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换的值。\n\n#### 返回值\n\n(`number`): 返回转换后的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toPath.md",
    "content": "# toPath (Lodash 兼容性)\n\n将深层键字符串转换为路径数组。\n\n```typescript\nconst path = toPath(deepKey);\n```\n\n## 用法\n\n### `toPath(deepKey)`\n\n将深层键字符串转换为路径数组。支持点表示法和方括号表示法。\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// 点表示法\ntoPath('a.b.c');\n// Returns: ['a', 'b', 'c']\n\n// 方括号表示法\ntoPath('a[b][c]');\n// Returns: ['a', 'b', 'c']\n\n// 混合表示法\ntoPath('a.b[c].d');\n// Returns: ['a', 'b', 'c', 'd']\n\n// 用引号包围的键\ntoPath('a[\"b.c\"].d');\n// Returns: ['a', 'b.c', 'd']\n```\n\n还能处理前导点或空键。\n\n```typescript\nimport { toPath } from 'es-toolkit/compat';\n\n// 前导点的情况\ntoPath('.a.b.c');\n// Returns: ['', 'a', 'b', 'c']\n\n// 空字符串\ntoPath('');\n// Returns: []\n\n// 复杂路径\ntoPath('.a[b].c.d[e][\"f.g\"].h');\n// Returns: ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n```\n\n#### 参数\n\n- `deepKey` (`any`): 要转换为路径数组的深层键字符串。\n\n#### 返回值\n\n(`string[]`): 返回由路径各部分组成的字符串数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toPlainObject.md",
    "content": "# toPlainObject (Lodash 兼容性)\n\n::: warning 使用 Object.assign 或扩展运算符\n\n这个 `toPlainObject` 函数由于复杂的原型处理和键枚举而运行缓慢。\n\n改为使用更快、更现代的 Object.assign({}, obj) 或 {...obj}。\n\n:::\n\n将值转换为普通对象。\n\n```typescript\nconst plainObj = toPlainObject(value);\n```\n\n## 用法\n\n### `toPlainObject(value)`\n\n将值转换为普通对象。将继承的可枚举字符串键属性扁平化为自身属性。\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// 构造函数和原型\nfunction Foo() {\n  this.b = 2;\n}\nFoo.prototype.c = 3;\n\nconst foo = new Foo();\ntoPlainObject(foo);\n// Returns: { b: 2, c: 3 }\n\n// 将数组转换为对象\ntoPlainObject([1, 2, 3]);\n// Returns: { 0: 1, 1: 2, 2: 3 }\n```\n\n处理各种对象类型。\n\n```typescript\nimport { toPlainObject } from 'es-toolkit/compat';\n\n// 将字符串转换为对象\ntoPlainObject('abc');\n// Returns: { 0: 'a', 1: 'b', 2: 'c' }\n\n// 已经是普通对象的情况\nconst obj = { a: 1, b: 2 };\ntoPlainObject(obj);\n// Returns: { a: 1, b: 2 }\n```\n\n#### 参数\n\n- `value` (`any`): 要转换的值。\n\n#### 返回值\n\n(`any`): 返回普通对象，继承的可枚举属性扁平化为自身属性。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toSafeInteger.md",
    "content": "# toSafeInteger (Lodash 兼容性)\n\n将值转换为安全整数。\n\n```typescript\nconst result = toSafeInteger(value);\n```\n\n## 用法\n\n### `toSafeInteger(value)`\n\n当您想要将值转换为安全整数时，请使用 `toSafeInteger`。安全整数是在 JavaScript 中可以准确表示的整数，在 `Number.MIN_SAFE_INTEGER` 和 `Number.MAX_SAFE_INTEGER` 范围内的值。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(3.2);\n// Returns: 3\n\ntoSafeInteger(Infinity);\n// Returns: 9007199254740991\n\ntoSafeInteger('3.2');\n// Returns: 3\n\n// 字符串转换\ntoSafeInteger('abc');\n// Returns: 0\n\n// 特殊值处理\ntoSafeInteger(NaN);\n// Returns: 0\n\ntoSafeInteger(null);\n// Returns: 0\n\ntoSafeInteger(undefined);\n// Returns: 0\n```\n\n无穷大值也会限制在安全范围内。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\ntoSafeInteger(-Infinity);\n// Returns: -9007199254740991 (Number.MIN_SAFE_INTEGER)\n\ntoSafeInteger(Number.MAX_VALUE);\n// Returns: 9007199254740991\n```\n\n用作数组索引或 ID 值时很有用。\n\n```typescript\nimport { toSafeInteger } from 'es-toolkit/compat';\n\nfunction getArrayItem(arr: any[], index: any) {\n  const safeIndex = toSafeInteger(index);\n  return arr[safeIndex];\n}\n\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconsole.log(getArrayItem(items, '2.7')); // 'c' (索引 2)\nconsole.log(getArrayItem(items, Infinity)); // undefined (超出范围)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要转换的值。\n\n#### 返回值\n\n(`number`): 返回转换后的安全整数。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/toString.md",
    "content": "# toString (Lodash 兼容性)\n\n::: warning 使用 String 构造函数\n\n这个 `toString` 函数由于复杂的数组处理和 -0 特殊情况处理而运行缓慢。\n\n改为使用更快、更现代的 String(value)。\n\n:::\n\n将值转换为字符串。\n\n```typescript\nconst str = toString(value);\n```\n\n## 用法\n\n### `toString(value)`\n\n将值转换为字符串。null 和 undefined 转换为空字符串，保留 -0 的符号。\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 基本类型\ntoString(null);\n// Returns: ''\n\ntoString(undefined);\n// Returns: ''\n\ntoString('hello');\n// Returns: 'hello'\n\ntoString(123);\n// Returns: '123'\n\n// 保留 -0 的符号\ntoString(-0);\n// Returns: '-0'\n```\n\n数组进行递归转换。\n\n```typescript\nimport { toString } from 'es-toolkit/compat';\n\n// 将数组转换为字符串\ntoString([1, 2, 3]);\n// Returns: '1,2,3'\n\n// 嵌套数组\ntoString([1, [2, 3], 4]);\n// Returns: '1,2,3,4'\n\n// 包含 -0 的数组\ntoString([1, 2, -0]);\n// Returns: '1,2,-0'\n\n// 包含符号的数组\ntoString([Symbol('a'), Symbol('b')]);\n// Returns: 'Symbol(a),Symbol(b)'\n```\n\n#### 参数\n\n- `value` (`any`): 要转换的值。\n\n#### 返回值\n\n(`string`): 返回转换后的字符串。null 和 undefined 返回空字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/compat/util/uniqueId.md",
    "content": "# uniqueId (Lodash 兼容性)\n\n::: warning 推荐使用 crypto.randomUUID\n\n生成唯一标识符时，使用 crypto.randomUUID() 是更安全、更标准的方式。\n\n改为使用更快、更现代的 crypto.randomUUID()。\n\n:::\n\n生成唯一的字符串标识符。\n\n```typescript\nconst result = uniqueId('contact_');\n```\n\n## 用法\n\n### `uniqueId(prefix?: string): string`\n\n生成唯一的字符串标识符。通过递增内部计数器来保证唯一性。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 带前缀生成唯一 ID\nuniqueId('contact_'); // => 'contact_1'\nuniqueId('user_'); // => 'user_2'\n\n// 不带前缀生成唯一 ID\nuniqueId(); // => '3'\nuniqueId(); // => '4'\n```\n\n每次连续调用时内部计数器递增。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 每次调用生成不同的 ID\nconst ids = Array.from({ length: 5 }, () => uniqueId('item_'));\nconsole.log(ids);\n// => ['item_1', 'item_2', 'item_3', 'item_4', 'item_5']\n```\n\n对生成 DOM 元素的唯一 ID 很有用。\n\n```typescript\nimport { uniqueId } from 'es-toolkit/compat';\n\n// 生成表单元素的唯一 ID\nconst inputId = uniqueId('input_');\nconst labelId = uniqueId('label_');\n\nconsole.log(inputId); // => 'input_6'\nconsole.log(labelId); // => 'label_7'\n```\n\n#### 参数\n\n- `prefix` (`string`, 可选): ID 前的前缀字符串。如果不提供，只返回数字。\n\n#### 返回值\n\n(`string`): 唯一标识符字符串。有前缀时返回 `前缀 + 编号` 形式，没有则只返回编号。\n"
  },
  {
    "path": "docs/zh_hans/reference/error/AbortError.md",
    "content": "# AbortError\n\n表示已中止或已取消操作的错误类。\n\n```typescript\nconst error = new AbortError(message);\n```\n\n## 用法\n\n### `new AbortError(message?)`\n\n当操作被中止或取消时使用的错误类。当像 [debounce](../function/debounce.md) 或 [delay](../promise/delay.md) 这样的操作被 `AbortSignal` 取消时会抛出此错误。\n\n```typescript\nimport { AbortError } from 'es-toolkit/error';\n\n// 使用默认消息创建错误。\nthrow new AbortError();\n// 错误消息: 'The operation was aborted'\n\n// 使用自定义消息创建错误。\nthrow new AbortError('文件上传已取消');\n// 错误消息: '文件上传已取消'\n```\n\n与 AbortSignal 一起使用的示例。\n\n```typescript\nimport { AbortError, delay } from 'es-toolkit';\n\nasync function fetchData(signal: AbortSignal) {\n  try {\n    await delay(1000, { signal });\n    return '数据加载完成';\n  } catch (error) {\n    if (error instanceof AbortError) {\n      console.log('操作已取消');\n    }\n    throw error;\n  }\n}\n\nconst controller = new AbortController();\ncontroller.abort(); // 取消操作\nawait fetchData(controller.signal); // 抛出 AbortError\n```\n\n#### 参数\n\n- `message` (`string`, 可选): 错误消息。默认为 `'The operation was aborted'`。\n\n#### 返回值\n\n(`AbortError`): 返回表示已中止操作的错误实例。它继承自 `Error`,`name` 属性为 `'AbortError'`。\n"
  },
  {
    "path": "docs/zh_hans/reference/error/TimeoutError.md",
    "content": "# TimeoutError\n\n表示已超时操作的错误类。\n\n```typescript\nconst error = new TimeoutError(message);\n```\n\n## 用法\n\n### `new TimeoutError(message?)`\n\n当操作的时间限制超过时使用的错误类。当像 [timeout](../promise/timeout.md) 或 [withTimeout](../promise/withTimeout.md) 这样的操作超时时会抛出此错误。\n\n```typescript\nimport { TimeoutError } from 'es-toolkit/error';\n\n// 使用默认消息创建错误。\nthrow new TimeoutError();\n// 错误消息: 'The operation was timed out'\n\n// 使用自定义消息创建错误。\nthrow new TimeoutError('API 请求已超时');\n// 错误消息: 'API 请求已超时'\n```\n\n与超时一起使用的示例。\n\n```typescript\nimport { timeout, TimeoutError } from 'es-toolkit';\n\nasync function fetchWithTimeout(url: string) {\n  try {\n    const response = await timeout(() => fetch(url), 3000);\n    return response;\n  } catch (error) {\n    if (error instanceof TimeoutError) {\n      console.log('请求已超时');\n    }\n    throw error;\n  }\n}\n\n// 如果超过3秒则抛出 TimeoutError\nawait fetchWithTimeout('https://example.com/api/slow');\n```\n\n#### 参数\n\n- `message` (`string`, 可选): 错误消息。默认为 `'The operation was timed out'`。\n\n#### 返回值\n\n(`TimeoutError`): 返回表示已超时操作的错误实例。它继承自 `Error`,`name` 属性为 `'TimeoutError'`。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/after.md",
    "content": "# after\n\n创建一个新函数,从第 `n` 次调用开始执行原始函数。\n\n```typescript\nconst afterFunc = after(n, func);\n```\n\n## 用法\n\n### `after(n, func)`\n\n当您想忽略前几次调用并从第 `n` 次调用开始执行函数时,请使用 `after`。这在事件或异步操作中需要在特定次数后才执行操作时非常有用。\n\n```typescript\nimport { after } from 'es-toolkit/function';\n\nconst afterFn = after(3, () => {\n  console.log('executed');\n});\n\n// 不记录任何内容\nafterFn();\n// 不记录任何内容\nafterFn();\n// 记录 'executed'\nafterFn();\n// 记录 'executed'\nafterFn();\n```\n\n#### 参数\n\n- `n` (`number`): 执行 `func` 所需的调用次数。\n- `func` (`F`): 要执行的函数。\n\n#### 返回值\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 一个新函数,跟踪调用次数并从第 `n` 次调用开始执行 `func`。在第 `n` 次调用之前返回 `undefined`。\n\n#### 错误\n\n当 `n` 不是整数或为负数时抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/ary.md",
    "content": "# ary\n\n创建一个限制函数可接收参数数量的新函数。\n\n```typescript\nconst limitedFunc = ary(func, n);\n```\n\n## 用法\n\n### `ary(func, n)`\n\n当您想要限制函数可接收的参数数量时,请使用 `ary`。额外传递的参数将被忽略。这在函数式编程中特别有用,可以防止回调函数接收意外的参数。\n\n```typescript\nimport { ary } from 'es-toolkit/function';\n\nfunction fn(a: number, b: number, c: number) {\n  return Array.from(arguments);\n}\n\n// 限制为不接收任何参数\nary(fn, 0)(1, 2, 3);\n// Returns: []\n\n// 限制为只接收 1 个参数\nary(fn, 1)(1, 2, 3);\n// Returns: [1]\n\n// 限制为只接收 2 个参数\nary(fn, 2)(1, 2, 3);\n// Returns: [1, 2]\n```\n\n与 `map` 等数组方法一起使用时特别有用。\n\n```typescript\n// parseInt 接收两个参数,但 map 会传递三个参数\n['1', '2', '3'].map(parseInt);\n// Returns: [1, NaN, NaN]\n\n['1', '2', '3'].map(parseInt);\n// 结果: [1, NaN, NaN]\n// 因为会执行 parseInt('2', 1), parseInt('3', 2)。\n\n// 使用 ary 限制为只传递第一个参数\n['1', '2', '3'].map(ary(parseInt, 1));\n// 结果: [1, 2, 3] ✅\n```\n\n#### 参数\n\n- `func` (`F`): 要限制参数数量的函数。\n- `n` (`number`): 最多可接收的参数数量。\n\n#### 返回值\n\n(`(...args: any[]) => ReturnType<F>`): 最多只接收 `n` 个参数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/asyncNoop.md",
    "content": "# asyncNoop\n\n异步地什么都不做的函数。\n\n```typescript\nconst promise = asyncNoop();\n```\n\n::: info [`noop`](./noop.md) 函数\n\n如果需要同步地什么都不做的函数,请使用直接返回 `void` 的 `noop` 函数。\n\n:::\n\n## 用法\n\n### `asyncNoop()`\n\n当您想在需要异步函数的地方填充空位或用作默认值时,请使用 `asyncNoop`。它返回一个解析为 `undefined` 的 `Promise`。\n\n```typescript\nimport { asyncNoop } from 'es-toolkit/function';\n\n// 用作默认值的示例\ninterface Props {\n  fetchData?: () => Promise<void>;\n}\n\nfunction MyComponent({ fetchData = asyncNoop }: Props) {\n  const handleFetchData = async () => {\n    // fetchData 始终是一个函数,因此可以安全调用\n    await fetchData();\n  };\n\n  handleFetchData();\n}\n\n// 直接调用的示例\nasyncNoop();\n// Returns: Promise<void>\n\nawait asyncNoop();\n// Returns: undefined\n```\n\n#### 返回值\n\n(`Promise<void>`): 解析为 `undefined` 的 `Promise`。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/before.md",
    "content": "# before\n\n创建一个限制函数调用次数的新函数。\n\n```typescript\nconst limitedFunc = before(n, func);\n```\n\n## 用法\n\n### `before(n, func)`\n\n当您想要限制函数只执行特定次数时,请使用 `before`。函数只会执行到第 `n-1` 次调用,从第 `n` 次开始将不再执行。\n\n```typescript\nimport { before } from 'es-toolkit/function';\n\nconst beforeFn = before(3, () => {\n  console.log('执行了');\n});\n\n// 打印 '执行了'\nbeforeFn();\n\n// 打印 '执行了'\nbeforeFn();\n\n// 不会打印任何内容\nbeforeFn();\n\n// 不会打印任何内容\nbeforeFn();\n```\n\n这在只需执行一次的任务(如初始化或设置)中特别有用。\n\n```typescript\nlet initialized = false;\n\nconst initialize = before(2, () => {\n  console.log('初始化中...');\n  initialized = true;\n});\n\n// 打印 '初始化中...' 并执行初始化\ninitialize();\n\n// 已经初始化,不会执行任何操作\ninitialize();\n```\n\n#### 参数\n\n- `n` (`number`): 返回的函数可以调用 `func` 的最大次数。如果 `n` 为 0,则 `func` 不会被调用。如果是正整数,则最多调用 `n-1` 次。\n- `func` (`F`): 调用次数将被限制的函数。\n\n#### 返回值\n\n(`(...args: Parameters<F>) => ReturnType<F> | undefined`): 跟踪调用次数并只执行到第 `n-1` 次 `func` 调用的新函数。从第 `n` 次调用开始将返回 `undefined`。\n\n#### 错误\n\n当 `n` 不是整数或为负数时会抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/curry.md",
    "content": "# curry\n\n对函数进行柯里化,使其可以一次接收一个参数进行调用。\n\n```typescript\nconst curriedFunc = curry(func);\n```\n\n## 用法\n\n### `curry(func)`\n\n当您想要部分应用函数时,请使用 `curry`。柯里化后的函数会在收到所有必需参数之前返回新函数。一旦提供了所有参数,就会执行原始函数。\n\n```typescript\nimport { curry } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curry(sum);\n\n// 为参数 `a` 提供值 `10`\nconst sum10 = curriedSum(10);\n\n// 为参数 `b` 提供值 `15`\nconst sum25 = sum10(15);\n\n// 为参数 `c` 提供值 `5`\n// 已收到所有参数,现在返回值\nconst result = sum25(5);\n// Returns: 30\n```\n\n这在创建可重用函数时很有用。\n\n```typescript\nfunction multiply(a: number, b: number) {\n  return a * b;\n}\n\nconst curriedMultiply = curry(multiply);\nconst double = curriedMultiply(2);\nconst triple = curriedMultiply(3);\n\ndouble(5); // Returns: 10\ntriple(5); // Returns: 15\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要柯里化的函数。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 可以一次接收一个参数进行调用的柯里化函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/curryRight.md",
    "content": "# curryRight\n\n从右到左对函数进行柯里化,使其可以一次接收一个参数进行调用。\n\n```typescript\nconst curriedFunc = curryRight(func);\n```\n\n## 用法\n\n### `curryRight(func)`\n\n当您想要从右到左部分应用函数时,请使用 `curryRight`。与普通的 `curry` 不同,它从最后一个参数开始接收。\n\n```typescript\nimport { curryRight } from 'es-toolkit/function';\n\nfunction sum(a: number, b: number, c: number) {\n  return a + b + c;\n}\n\nconst curriedSum = curryRight(sum);\n\n// 为参数 `c` 提供值 `10`\nconst add10 = curriedSum(10);\n\n// 为参数 `b` 提供值 `15`\nconst add25 = add10(15);\n\n// 为参数 `a` 提供值 `5`\n// 已收到所有参数,现在返回值\nconst result = add25(5);\n// Returns: 30\n```\n\n这在从右到左应用参数更自然的情况下很有用。\n\n```typescript\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst curriedGreet = curryRight(greet);\nconst greetJohn = curriedGreet('John');\n\ngreetJohn('Hello'); // Returns: 'Hello, John!'\ngreetJohn('Hi'); // Returns: 'Hi, John!'\n```\n\n#### 参数\n\n- `func` (`(...args: any[]) => any`): 要柯里化的函数。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 可以从右到左一次接收一个参数进行调用的柯里化函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/debounce.md",
    "content": "# debounce\n\n创建一个延迟函数调用的防抖函数。\n\n```typescript\nconst debouncedFunc = debounce(func, debounceMs, options);\n```\n\n## 用法\n\n### `debounce(func, debounceMs, options)`\n\n当您想要将连续调用合并为一次时,请使用 `debounce`。防抖函数会在最后一次调用后等待指定时间才执行。这对于处理快速事件(如搜索框输入或窗口调整大小)很有用。\n\n```typescript\nimport { debounce } from 'es-toolkit/function';\n\nconst debouncedFunction = debounce(() => {\n  console.log('执行了');\n}, 1000);\n\n// 如果在 1 秒内没有再次调用,则打印 '执行了'\ndebouncedFunction();\n\n// 取消之前的调用\ndebouncedFunction.cancel();\n\n// 立即执行等待中的函数\ndebouncedFunction.flush();\n```\n\n可以在根据用户输入调用繁重 API(如搜索)时有效使用。\n\n```typescript\nconst searchInput = document.getElementById('search');\nconst searchResults = debounce(async (query: string) => {\n  const results = await fetchSearchResults(query);\n  displayResults(results);\n}, 300);\n\nsearchInput.addEventListener('input', e => {\n  searchResults(e.target.value);\n});\n```\n\n可以使用 [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) 取消防抖函数调用。\n\n```typescript\nconst controller = new AbortController();\nconst debouncedWithSignalFunction = debounce(\n  () => {\n    console.log('Function executed');\n  },\n  1000,\n  { signal: controller.signal }\n);\n\n// 如果在 1 秒内没有再次调用,则打印 '执行了'\ndebouncedWithSignalFunction();\n\n// 取消防抖函数调用\ncontroller.abort();\n```\n\n#### 参数\n\n- `func` (`F`): 要创建防抖函数的函数。\n- `debounceMs`(`number`): 防抖延迟的毫秒数。\n- `options` (`DebounceOptions`, optional): 选项对象。\n  - `signal` (`AbortSignal`, optional): 用于取消防抖函数的可选 `AbortSignal`。\n  - `edges` (`Array<'leading' | 'trailing'>`, optional): 指示何时执行原始函数的数组。默认值为 `['trailing']`。\n    - 如果包含 `'leading'`,则在首次调用防抖函数时立即执行原始函数。\n    - 如果包含 `'trailing'`,则在最后一次调用防抖函数后等待 `debounceMs` 毫秒后执行原始函数。\n    - 如果同时包含 `'leading'` 和 `'trailing'`,则原始函数会在延迟执行开始时和结束时都被调用。但是,要在两个时间点都被调用,防抖函数必须在 `debounceMs` 毫秒内至少被调用 2 次。因为不能通过一次调用防抖函数来调用原始函数两次。\n\n#### 返回值\n\n(`DebouncedFunction<F>`): 防抖函数,具有以下方法。\n\n- `cancel()`: 取消预定的调用。\n- `flush()`: 立即执行等待中的函数。\n- `schedule()`: 重新安排函数执行。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/flow.md",
    "content": "# flow\n\n创建一个按顺序执行多个函数的新函数。\n\n```typescript\nconst combinedFunc = flow(func1, func2, func3);\n```\n\n## 用法\n\n### `flow(...funcs)`\n\n当您想要连接函数以创建管道时,请使用 `flow`。前一个函数的结果成为下一个函数的输入。这在通过多个步骤转换数据时很有用。\n\n```typescript\nimport { flow } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\nconst combined = flow(add, square, double);\n\n// 首先 add(1, 2) = 3\n// 然后 square(3) = 9\n// 最后 double(9) = 18\ncombined(1, 2);\n// Returns: 18\n```\n\n这在创建数据转换管道时特别有用。\n\n```typescript\nconst processData = flow(\n  (text: string) => text.trim(),\n  (text: string) => text.toLowerCase(),\n  (text: string) => text.split(' '),\n  (words: string[]) => words.filter(word => word.length > 3)\n);\n\nprocessData('  Hello World JavaScript  ');\n// Returns: ['hello', 'world', 'javascript']\n```\n\n#### 参数\n\n- `funcs` (`Array<(...args: any[]) => any>`): 要按顺序执行的函数。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 按顺序执行给定函数的新函数。第一个函数可以接收多个参数,其余函数接收前一个函数的结果。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/flowRight.md",
    "content": "# flowRight\n\n创建一个从右到左按顺序执行给定函数的新函数。\n\n```typescript\nconst combined = flowRight(func1, func2, func3);\n```\n\n## 用法\n\n### `flowRight(...funcs)`\n\n当您想要从右到左按顺序执行多个函数以创建新函数时,请使用 `flowRight`。前一个函数的返回值作为下一个函数的参数传递。\n\n这在以相反顺序组合函数创建数据转换管道时很有用。与 `flow` 的执行方向相反。\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst add = (x: number, y: number) => x + y;\nconst square = (n: number) => n * n;\nconst double = (n: number) => n * 2;\n\n// 从右到左执行: double -> square -> add\nconst combined = flowRight(double, square, add);\nconsole.log(combined(1, 2)); // 18\n// 执行顺序: add(1, 2) = 3, square(3) = 9, double(9) = 18\n\n// 也可以使用单个函数\nconst single = flowRight((x: number) => x + 1);\nconsole.log(single(5)); // 6\n```\n\n`this` 上下文也会传递给函数。\n\n```typescript\nimport { flowRight } from 'es-toolkit/function';\n\nconst context = {\n  multiplier: 3,\n};\n\nfunction multiply(this: typeof context, x: number) {\n  return x * this.multiplier;\n}\n\nconst add = (x: number) => x + 10;\n\nconst combined = flowRight(multiply, add).bind(context);\nconsole.log(combined(5)); // 45\n// 执行顺序: add(5) = 15, multiply(15) = 45\n```\n\n#### 参数\n\n- `funcs` (`(...args: any[]) => any`): 要组合的函数。\n\n#### 返回值\n\n(`(...args: any[]) => any`): 返回一个从右到左按顺序执行给定函数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/identity.md",
    "content": "# identity\n\n原样返回接收到的值。\n\n```typescript\nconst result = identity(value);\n```\n\n## 用法\n\n### `identity(value)`\n\n当您想要原样返回某个值而不进行任何更改时,请使用 `identity`。\n\n这在作为函数参数的默认值时很有用。在数组的 `map` 或 `filter` 中返回值本身,或在函数式编程中作为占位符使用。\n\n```typescript\nimport { identity } from 'es-toolkit/function';\n\n// 原样返回数字\nconst num = identity(5);\nconsole.log(num); // 5\n\n// 原样返回字符串\nconst str = identity('hello');\nconsole.log(str); // 'hello'\n\n// 原样返回对象\nconst obj = identity({ key: 'value' });\nconsole.log(obj); // { key: 'value' }\n\n// 在数组中使用的示例\nconst numbers = [1, 2, 3, 4, 5];\nconst same = numbers.map(identity);\nconsole.log(same); // [1, 2, 3, 4, 5]\n```\n\n#### 参数\n\n- `value` (`T`): 要返回的值。\n\n#### 返回值\n\n(`T`): 原样返回接收到的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/memoize.md",
    "content": "# memoize\n\n缓存函数结果,使得使用相同参数再次调用时执行更快。\n\n```typescript\nconst memoizedFunc = memoize(func, options);\n```\n\n## 用法\n\n### `memoize(func, options?)`\n\n当您想要通过缓存函数的执行结果来优化性能时,请使用 `memoize`。使用相同参数再次调用时会返回缓存的结果,从而避免重复计算。\n\n用于只接收一个参数的函数。如果函数接收多个参数,请将它们合并为一个对象或数组传递。\n\n如果参数是像数组、对象这样通过引用进行比较的值,则应提供 `getCacheKey` 函数来生成适当的缓存键。\n\n```typescript\nimport { memoize } from 'es-toolkit/function';\n\n// 基本用法\nconst add = (x: number) => x + 10;\nconst memoizedAdd = memoize(add);\n\nconsole.log(memoizedAdd(5)); // 15 (已计算)\nconsole.log(memoizedAdd(5)); // 15 (缓存结果)\nconsole.log(memoizedAdd.cache.size); // 1\n\n// 为数组参数提供缓存键\nconst sum = (arr: number[]) => arr.reduce((sum, n) => sum + n, 0);\nconst memoizedSum = memoize(sum, {\n  getCacheKey: (arr: number[]) => arr.join(','),\n});\n\nconsole.log(memoizedSum([1, 2, 3])); // 6 (已计算)\nconsole.log(memoizedSum([1, 2, 3])); // 6 (缓存结果)\n```\n\n也可以使用自定义缓存。\n\n```typescript\nimport { memoize, MemoizeCache } from 'es-toolkit/function';\n\nclass LRUCache<K, V> implements MemoizeCache<K, V> {\n  private cache = new Map<K, V>();\n  private maxSize = 100;\n\n  set(key: K, value: V): void {\n    if (this.cache.size >= this.maxSize) {\n      const firstKey = this.cache.keys().next().value;\n      this.cache.delete(firstKey);\n    }\n    this.cache.set(key, value);\n  }\n\n  get(key: K): V | undefined {\n    return this.cache.get(key);\n  }\n\n  has(key: K): boolean {\n    return this.cache.has(key);\n  }\n\n  delete(key: K): boolean {\n    return this.cache.delete(key);\n  }\n\n  clear(): void {\n    this.cache.clear();\n  }\n\n  get size(): number {\n    return this.cache.size;\n  }\n}\n\nconst customCache = new LRUCache<string, number>();\nconst memoizedWithCustomCache = memoize(expensiveFunction, {\n  cache: customCache,\n});\n```\n\n#### 参数\n\n- `func` (`F`): 要进行记忆化的函数。只能接收一个参数。\n- `options` (对象, 可选): 记忆化设置选项。\n  - `cache` (`MemoizeCache<any, ReturnType<F>>`, 可选): 用于存储结果的缓存对象。默认值为新的 `Map`。\n  - `getCacheKey` (`(arg: Parameters<F>[0]) => unknown`, 可选): 生成缓存键的函数。在使用非原始值作为参数时需要。\n\n#### 返回值\n\n(`F & { cache: MemoizeCache<any, ReturnType<F>> }`): 返回记忆化的函数。还包含可访问内部缓存的 `cache` 属性。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/negate.md",
    "content": "# negate\n\n创建一个将返回真或假的函数的返回值反转的新函数。\n\n```typescript\nconst negatedFunc = negate(booleanFunc);\n```\n\n## 用法\n\n### `negate(func)`\n\n当您想要反转返回真或假值的函数的结果时,请使用 `negate`。\n\n这在反转条件函数或过滤逻辑时很有用。例如,可以将查找偶数的函数转换为查找奇数的函数。\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\n// 基本用法\nconst isEven = (n: number) => n % 2 === 0;\nconst isOdd = negate(isEven);\n\nconsole.log(isEven(2)); // true\nconsole.log(isOdd(2)); // false\n\nconsole.log(isEven(3)); // false\nconsole.log(isOdd(3)); // true\n\n// 在数组过滤中使用\nconst numbers = [1, 2, 3, 4, 5, 6];\n\nconst evenNumbers = numbers.filter(isEven);\nconsole.log(evenNumbers); // [2, 4, 6]\n\nconst oddNumbers = numbers.filter(negate(isEven));\nconsole.log(oddNumbers); // [1, 3, 5]\n```\n\n也可以反转复杂的条件函数。\n\n```typescript\nimport { negate } from 'es-toolkit/function';\n\nconst isLongString = (str: string) => str.length > 5;\nconst isShortString = negate(isLongString);\n\nconst words = ['hi', 'hello', 'world', 'javascript'];\n\nconst longWords = words.filter(isLongString);\nconsole.log(longWords); // ['hello', 'javascript']\n\nconst shortWords = words.filter(isShortString);\nconsole.log(shortWords); // ['hi', 'world']\n```\n\n#### 参数\n\n- `func` (`F`): 返回布尔值的函数。\n\n#### 返回值\n\n(`F`): 返回一个接收与原始函数相同参数但返回相反布尔值的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/noop.md",
    "content": "# noop\n\n什么都不做的空函数。\n\n```typescript\nnoop();\n```\n\n::: info [`asyncNoop`](./asyncNoop.md) 函数\n\n如果需要异步地什么都不做的函数,请使用直接返回 `Promise<void>` 的 `asyncNoop` 函数。\n\n:::\n\n## 用法\n\n### `noop()`\n\n当需要不执行任何操作的函数时,请使用 `noop`。\n\n这在函数是必需的地方用作默认值,或当您想要禁用回调函数时很有用。经常用作占位符或在初始化阶段使用。\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 用作可选回调的默认值\ninterface EventHandlers {\n  onSuccess?: () => void;\n  onError?: () => void;\n}\n\nfunction processData({ onSuccess = noop, onError = noop }: EventHandlers = {}) {\n  try {\n    // 数据处理逻辑\n    console.log('数据处理完成');\n    onSuccess(); // 可以安全调用\n  } catch (error) {\n    onError(); // 可以安全调用\n  }\n}\n\n// 无需 undefined 检查即可安全使用\nprocessData({\n  onSuccess: () => console.log('成功!'),\n  // onError 用 noop 作为默认值处理\n});\n```\n\n也可以在数组方法中使用。\n\n```typescript\nimport { noop } from 'es-toolkit/function';\n\n// 有条件地执行函数\nconst operations = [\n  () => console.log('第一个操作'),\n  shouldRunSecond ? () => console.log('第二个操作') : noop,\n  () => console.log('第三个操作'),\n];\n\noperations.forEach(op => op()); // 安全地执行所有操作\n```\n\n#### 返回值\n\n(`void`): 不返回任何内容。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/once.md",
    "content": "# once\n\n创建一个限制函数只执行一次的新函数。\n\n```typescript\nconst onceFunc = once(func);\n```\n\n## 用法\n\n### `once(func)`\n\n当您想要限制函数只执行一次时,请使用 `once`。后续调用将返回第一次调用的结果。\n\n这对于初始化函数或事件处理程序等只需执行一次的逻辑很有用。防止重复执行并保证结果一致。\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\n// 初始化函数示例\nconst initialize = once(() => {\n  console.log('初始化应用');\n  return { status: 'initialized' };\n});\n\nconsole.log(initialize()); // 输出 '初始化应用' 日志,返回 { status: 'initialized' }\nconsole.log(initialize()); // 无日志,返回 { status: 'initialized' }\nconsole.log(initialize()); // 无日志,返回 { status: 'initialized' }\n\n// API 调用示例\nconst fetchConfig = once(async () => {\n  console.log('获取配置');\n  const response = await fetch('/api/config');\n  return response.json();\n});\n\n// 只有在第一次调用时才执行实际的 API 请求\nconst config1 = await fetchConfig();\nconst config2 = await fetchConfig(); // 返回缓存的结果\n```\n\n也可以使用带参数的函数。\n\n```typescript\nimport { once } from 'es-toolkit/function';\n\nconst logOnce = once((message: string) => {\n  console.log(`重要消息: ${message}`);\n});\n\nlogOnce('你好'); // 输出 '重要消息: 你好'\nlogOnce('再次你好'); // 不输出 (已经调用过)\nlogOnce('又是你好'); // 不输出 (已经调用过)\n```\n\n#### 参数\n\n- `func` (`F`): 要限制为只调用一次的函数。\n\n#### 返回值\n\n(`F`): 返回一个在第一次调用后缓存结果并在后续调用中返回相同结果的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/partial.md",
    "content": "# partial\n\n创建一个预先应用部分参数的新函数。\n\n```typescript\nconst partialFunc = partial(func, arg1, arg2);\n```\n\n## 用法\n\n### `partial(func, ...args)`\n\n当您想要预先固定函数的部分参数时,请使用 `partial`。预先提供的参数将放置在函数前面,后续传递的参数将添加到后面。\n\n这是函数式编程中经常使用的柯里化(currying)类似概念。与 `bind` 不同,它不固定 `this` 上下文。\n\n使用 `partial.placeholder` 可以在特定位置的参数稍后传递。\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\n// 基本用法\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst sayHello = partial(greet, 'Hello');\nconsole.log(sayHello('John')); // 'Hello, John!'\nconsole.log(sayHello('Jane')); // 'Hello, Jane!'\n\n// 应用多个参数\nfunction multiply(a: number, b: number, c: number) {\n  return a * b * c;\n}\n\nconst double = partial(multiply, 2);\nconsole.log(double(3, 4)); // 24\n\nconst doubleAndTriple = partial(multiply, 2, 3);\nconsole.log(doubleAndTriple(4)); // 24\n```\n\n可以使用占位符来调整参数顺序。\n\n```typescript\nimport { partial } from 'es-toolkit/function';\n\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\n// 只固定第二个参数,第一个和第三个稍后传递\nconst subtractFrom5 = partial(subtract, partial.placeholder, 5, partial.placeholder);\nconsole.log(subtractFrom5(10, 2)); // 10 - 5 - 2 = 3\n\n// 与数组方法一起使用\nconst numbers = [1, 2, 3, 4, 5];\nconst addTen = partial((x: number, y: number) => x + y, 10);\nconst result = numbers.map(addTen);\nconsole.log(result); // [11, 12, 13, 14, 15]\n```\n\n#### 参数\n\n- `func` (`F`): 要部分应用参数的函数。\n- `args` (`any[]`, 可选): 要预先应用的参数。\n\n#### 返回值\n\n(`(...args: any[]) => ReturnType<F>`): 返回一个部分参数已预先应用的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/partialRight.md",
    "content": "# partialRight\n\n创建一个从后面开始预先应用部分参数的新函数。\n\n```typescript\nconst partialRightFunc = partialRight(func, arg1, arg2);\n```\n\n## 用法\n\n### `partialRight(func, ...args)`\n\n当您想要从后面开始固定函数的部分参数时,请使用 `partialRight`。与 `partial` 相反,预先提供的参数将放置在函数后面,后续传递的参数将添加到前面。\n\n这在想要固定函数的最后参数并只动态更改前面参数时很有用。\n\n使用 `partialRight.placeholder` 可以在特定位置的参数稍后传递。\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\n// 基本用法\nfunction greet(greeting: string, name: string) {\n  return `${greeting}, ${name}!`;\n}\n\nconst greetJohn = partialRight(greet, 'John');\nconsole.log(greetJohn('Hello')); // 'Hello, John!'\nconsole.log(greetJohn('Hi')); // 'Hi, John!'\n\n// 应用多个参数\nfunction subtract(a: number, b: number, c: number) {\n  return a - b - c;\n}\n\nconst subtractFrom10And5 = partialRight(subtract, 5, 2);\nconsole.log(subtractFrom10And5(10)); // 10 - 5 - 2 = 3\n\n// 在数学运算中应用常量\nfunction divide(dividend: number, divisor: number) {\n  return dividend / divisor;\n}\n\nconst divideBy2 = partialRight(divide, 2);\nconsole.log(divideBy2(10)); // 10 / 2 = 5\nconsole.log(divideBy2(20)); // 20 / 2 = 10\n```\n\n可以使用占位符来调整参数顺序。\n\n```typescript\nimport { partialRight } from 'es-toolkit/function';\n\nfunction formatMessage(level: string, message: string, timestamp: string) {\n  return `[${level}] ${message} at ${timestamp}`;\n}\n\n// 只固定最后一个参数,其余稍后传递\nconst logWithTime = partialRight(formatMessage, partialRight.placeholder, '2023-01-01');\nconsole.log(logWithTime('INFO', 'Application started'));\n// '[INFO] Application started at 2023-01-01'\n\n// 与数组一起使用\nconst numbers = [1, 2, 3, 4, 5];\nconst appendSuffix = partialRight((num: number, suffix: string) => `${num}${suffix}`, 'th');\nconst result = numbers.map(appendSuffix);\nconsole.log(result); // ['1th', '2th', '3th', '4th', '5th']\n```\n\n#### 参数\n\n- `func` (`F`): 要部分应用参数的函数。\n- `args` (`any[]`, 可选): 从后面开始预先应用的参数。\n\n#### 返回值\n\n(`(...args: any[]) => ReturnType<F>`): 返回一个部分参数已从后面开始预先应用的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/rest.md",
    "content": "# rest\n\n创建一个将从特定索引开始的参数打包成数组后传递给函数的新函数。\n\n```typescript\nconst restFunc = rest(func, startIndex);\n```\n\n## 用法\n\n### `rest(func, startIndex?)`\n\n当您想要将函数的其余参数打包成数组传递时,请使用 `rest`。特定索引之前的参数单独传递,之后的参数打包成数组传递。\n\n这在创建接收可变参数的函数或更改现有函数的参数处理方式时很有用。\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\n// 基本用法 (从最后一个参数开始打包成数组)\nfunction sum(a: number, b: number, numbers: number[]) {\n  return a + b + numbers.reduce((sum, n) => sum + n, 0);\n}\n\nconst restSum = rest(sum); // startIndex 默认为 func.length - 1 (2)\nconsole.log(restSum(1, 2, 3, 4, 5)); // 1 + 2 + (3 + 4 + 5) = 15\n// sum 函数以 [1, 2, [3, 4, 5]] 的形式调用\n\n// 从其他索引开始打包成数组\nfunction logMessage(level: string, messages: string[]) {\n  console.log(`[${level}] ${messages.join(' ')}`);\n}\n\nconst restLog = rest(logMessage, 1); // 从索引 1 开始打包成数组\nrestLog('INFO', 'Application', 'started', 'successfully');\n// 以 logMessage('INFO', ['Application', 'started', 'successfully']) 的形式调用\n\n// 实用示例: 第一个参数单独传递,其余打包成数组\nfunction format(template: string, values: any[]) {\n  return values.reduce((result, value, index) => {\n    return result.replace(`{${index}}`, value);\n  }, template);\n}\n\nconst restFormat = rest(format, 1);\nconsole.log(restFormat('Hello {0}, welcome to {1}!', 'John', 'our site'));\n// 'Hello John, welcome to our site!'\n```\n\n参数不足的情况也会自动处理。\n\n```typescript\nimport { rest } from 'es-toolkit/function';\n\nfunction greet(greeting: string, name: string, extras: string[]) {\n  const extraText = extras.length > 0 ? ` ${extras.join(' ')}` : '';\n  return `${greeting} ${name}!${extraText}`;\n}\n\nconst restGreet = rest(greet);\n\nconsole.log(restGreet('Hello', 'Alice', 'Have a great day!'));\n// 'Hello Alice! Have a great day!'\n\nconsole.log(restGreet('Hi', 'Bob'));\n// 'Hi Bob!' (extras 为空数组)\n\nconsole.log(restGreet('Hey'));\n// 'Hey undefined!' (name 为 undefined, extras 为空数组)\n```\n\n#### 参数\n\n- `func` (`F`): 要更改参数处理方式的函数。\n- `startIndex` (`number`, 可选): 开始打包成数组的索引。默认值为 `func.length - 1`,从最后一个参数开始打包成数组。\n\n#### 返回值\n\n(`(...args: any[]) => ReturnType<F>`): 返回一个将从特定索引开始的参数打包成数组后传递给原始函数的新函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/retry.md",
    "content": "# retry\n\n重复执行返回 Promise 的函数直到成功。\n\n```typescript\nconst result = await retry(asyncFunc, options);\n```\n\n## 用法\n\n### `retry(func, options?)`\n\n当异步函数失败时想要自动重试时,请使用 `retry`。这对于可能暂时失败的操作(如 API 调用或网络请求)很有用。\n\n可以设置重试次数、重试间隔和取消信号。重试间隔可以是固定值,也可以是根据重试次数动态计算的函数。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\n// 基本用法 (无限重试)\nconst data1 = await retry(async () => {\n  const response = await fetch('/api/data');\n  if (!response.ok) throw new Error('Failed to fetch');\n  return response.json();\n});\n\n// 限制重试次数\nconst data2 = await retry(async () => {\n  return await fetchData();\n}, 3);\n\n// 设置重试间隔 (100ms)\nconst data3 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 3,\n    delay: 100,\n  }\n);\n\n// 动态重试间隔 (指数退避)\nconst data4 = await retry(\n  async () => {\n    return await fetchData();\n  },\n  {\n    retries: 5,\n    delay: attempts => Math.min(100 * Math.pow(2, attempts), 5000),\n  }\n);\n```\n\n当只想在特定错误时重试时,可以使用 `shouldRetry` 选项。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nclass NetworkError extends Error {\n  constructor(public status: number) {\n    super(`Network error: ${status}`);\n  }\n}\n\n// 仅在 500+ 错误时重试\nconst data5 = await retry(\n  async () => {\n    const response = await fetch('/api/data');\n    if (!response.ok) {\n      throw new NetworkError(response.status);\n    }\n    return response.json();\n  },\n  {\n    retries: 3,\n    shouldRetry: (error, attempt) => error instanceof NetworkError && error.status >= 500,\n  }\n);\n```\n\n也可以使用 AbortSignal 取消重试。\n\n```typescript\nimport { retry } from 'es-toolkit/function';\n\nconst controller = new AbortController();\n\n// 5 秒后取消重试\nsetTimeout(() => controller.abort(), 5000);\n\ntry {\n  const data = await retry(\n    async () => {\n      return await fetchData();\n    },\n    {\n      retries: 10,\n      delay: 1000,\n      signal: controller.signal,\n    }\n  );\n  console.log(data);\n} catch (error) {\n  console.log('重试被取消或失败:', error);\n}\n```\n\n#### 参数\n\n- `func` (`() => Promise<T>`): 要重试的异步函数。\n- `options` (`number | RetryOptions`, 可选): 重试次数或选项对象。\n  - `retries` (`number`, 可选): 重试次数。默认值为 `Infinity`,无限重试。\n  - `delay` (`number | (attempts: number) => number`, 可选): 重试间隔(毫秒)。可以使用数字或函数。默认值为 `0`。\n  - `signal` (`AbortSignal`, 可选): 可以取消重试的信号。\n  - `shouldRetry` (`(error: unknown, attempt: number) => boolean`, 可选): 决定是否重试的函数。如果返回 `false`,则立即抛出错误。\n    - `error`: 发生的错误对象。\n    - `attempt`: 当前尝试次数 (从 0 开始)。\n\n#### 返回值\n\n(`Promise<T>`): 返回函数成功执行的结果值。\n\n#### 错误\n\n当重试次数超过或被 AbortSignal 取消时抛出最后的错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/function/spread.md",
    "content": "# spread\n\n创建一个将参数数组展开为函数的单个参数进行传递的新函数。\n\n```typescript\nconst spreadFunc = spread(func);\n```\n\n## 用法\n\n### `spread(func)`\n\n当您想要将数组形式的参数展开为单个参数传递给函数时,请使用 `spread`。\n\n这与 JavaScript 的展开运算符(`...`)类似,但是通过转换函数使其接收数组的方式。在经常使用 `apply` 方法的情况下很有用。\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\n// 基本用法\nfunction add(a: number, b: number) {\n  return a + b;\n}\n\nconst spreadAdd = spread(add);\nconsole.log(spreadAdd([5, 3])); // 8\n\n// 具有多个参数的函数\nfunction greet(greeting: string, name: string, punctuation: string) {\n  return `${greeting}, ${name}${punctuation}`;\n}\n\nconst spreadGreet = spread(greet);\nconsole.log(spreadGreet(['Hello', 'World', '!'])); // 'Hello, World!'\n\n// 与 Math 函数一起使用\nconst numbers = [1, 2, 3, 4, 5];\nconst spreadMax = spread(Math.max);\nconsole.log(spreadMax(numbers)); // 5\n\nconst spreadMin = spread(Math.min);\nconsole.log(spreadMin(numbers)); // 1\n```\n\n`this` 上下文也会保持。\n\n```typescript\nimport { spread } from 'es-toolkit/function';\n\nconst calculator = {\n  multiply: function (a: number, b: number, c: number) {\n    return a * b * c;\n  },\n};\n\nconst spreadMultiply = spread(calculator.multiply);\nconsole.log(spreadMultiply.call(calculator, [2, 3, 4])); // 24\n```\n\n#### 参数\n\n- `func` (`F`): 要将数组展开为单个参数接收的函数。\n\n#### 返回值\n\n(`(args: Parameters<F>) => ReturnType<F>`): 返回一个接收参数数组并以展开形式传递给原始函数的新函数。\n\n## 与 Lodash 的兼容性\n\n从 `es-toolkit/compat` 导入 `spread` 可与 lodash 兼容。\n\n- `spread` 额外接收一个名为 `argsIndex` 的数字参数。此参数表示要展开的参数数组的给定索引。\n  - 如果 `argsIndex` 为负数或 `NaN`,则视为默认值 `0`。如果是小数,则向下舍入到最接近的整数。\n\n```typescript\nimport { spread } from 'es-toolkit/compat';\n\nfunction fn(a: unknown, b: unknown, c: unknown) {\n  return Array.from(arguments);\n}\n\nspread(fn, -1)([1, 2]); // Returns [1, 2]\nspread(fn, NaN)([1, 2]); // Returns [1, 2]\nspread(fn, 'a')([1, 2]); // Returns [1, 2]\nspread(fn, 1.6)(1, [2, 3]); // Returns [1, 2, 3]\n```\n"
  },
  {
    "path": "docs/zh_hans/reference/function/throttle.md",
    "content": "# throttle\n\n限制函数在指定时间内最多执行一次。\n\n```typescript\nconst throttledFunc = throttle(func, throttleMs, options);\n```\n\n## 用法\n\n### `throttle(func, throttleMs, options?)`\n\n当您想要限制函数调用的时间间隔时,请使用 `throttle`。这在处理频繁发生的事件(如滚动、调整大小、鼠标移动)时优化性能很有用。\n\n与 `debounce` 不同,throttle 保证函数在指定时间内至少执行一次。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// 基本用法 (每秒最多执行一次)\nconst throttledLog = throttle(() => {\n  console.log('函数执行了!');\n}, 1000);\n\n// 第一次调用: 立即执行\nthrottledLog(); // 输出 '函数执行了!'\n\n// 1 秒内的额外调用: 被忽略\nthrottledLog();\nthrottledLog();\n\n// 1 秒后最后一次调用作为 trailing 执行\n\n// 优化滚动事件\nconst handleScroll = throttle(() => {\n  console.log('滚动位置:', window.scrollY);\n}, 100); // 每 100ms 最多一次\n\nwindow.addEventListener('scroll', handleScroll);\n\n// 优化 API 调用\nconst searchThrottled = throttle(async (query: string) => {\n  const results = await fetch(`/api/search?q=${query}`);\n  console.log('搜索结果:', await results.json());\n}, 300);\n\n// 即使每次输入都调用,也只每 300ms 执行一次实际搜索\nsearchThrottled('hello');\nsearchThrottled('hello w');\nsearchThrottled('hello world');\n```\n\n可以调整 leading 和 trailing 选项。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\n// 只启用 leading (只在开始时执行)\nconst leadingOnly = throttle(() => console.log('Leading only'), 1000, { edges: ['leading'] });\n\n// 只启用 trailing (只在结束时执行)\nconst trailingOnly = throttle(() => console.log('Trailing only'), 1000, { edges: ['trailing'] });\n\nleadingOnly(); // 立即执行\nleadingOnly(); // 被忽略\nleadingOnly(); // 被忽略\n\ntrailingOnly(); // 不会立即执行\ntrailingOnly(); // 被忽略\ntrailingOnly(); // 1 秒后执行\n```\n\n也可以手动控制。\n\n```typescript\nimport { throttle } from 'es-toolkit/function';\n\nconst throttledFunc = throttle(() => console.log('执行了'), 1000);\n\nthrottledFunc(); // 立即执行\nthrottledFunc(); // 等待中\n\n// 立即处理等待中的执行\nthrottledFunc.flush();\n\n// 取消等待中的执行\nthrottledFunc.cancel();\n```\n\n#### 参数\n\n- `func` (`F`): 要限制执行的函数。\n- `throttleMs` (`number`): 限制执行的时间间隔(毫秒)。\n- `options` (`ThrottleOptions`, 可选): 额外选项。\n  - `signal` (`AbortSignal`, 可选): 可以取消函数执行的信号。\n  - `edges` (`Array<'leading' | 'trailing'>`, 可选): 决定函数执行时机。默认值为 `['leading', 'trailing']`。\n\n#### 返回值\n\n(`ThrottledFunction<F>`): 返回执行被限制的新函数。包含 `cancel` 和 `flush` 方法。\n\n## 与 Lodash 的兼容性\n\n从 `es-toolkit/compat` 导入 `throttle` 可与 lodash 完全兼容。\n\n- `throttle` 函数接收 `leading` 和 `trailing` 选项。\n\n  - `leading`: 首次调用节流函数时是否立即执行原始函数。默认值为 `true`。\n  - `trailing`: 自最后一次调用节流函数后经过 `throttleMs` 毫秒后是否执行原始函数。默认值为 `true`。\n\n- `throttleMs` 选项的默认值为 `0`。意味着函数调用只延迟到下一个 tick。\n\n::: info `throttle` 的 `leading` 和 `trailing` 选项\n\n默认情况下 `throttle` 的 `leading` 和 `trailing` 选项为 `true`。因此像 `{ leading: true }` 或 `{ trailing: true }` 这样的选项不会改变函数的行为。\n\n:::\n\n```typescript\n// leading 选项示例\nconst leadingFn = throttle(\n  () => {\n    console.log('Leading function executed');\n  },\n  1000,\n  { leading: true }\n);\n\n// 立即打印 'Leading function executed'\n// 即使继续调用也每秒打印一次 'Leading function executed'\nleadingFn();\n\n// trailing 选项示例\nconst trailingFn = throttle(\n  () => {\n    console.log('Trailing function executed');\n  },\n  1000,\n  { trailing: true }\n);\n\n// 立即打印 'Trailing function executed'\n// 即使继续调用也每秒打印一次 'Trailing function executed'\ntrailingFn();\n\n// leading: false, trailing: true 选项示例\nconst trailingOnlyFn = throttle(\n  () => {\n    console.log('Trailing-only function executed');\n  },\n  1000,\n  { leading: false, trailing: true }\n);\n\n// 'Trailing-only function executed' 最初不会打印\n// 即使继续调用也每秒打印一次 'Trailing-only function executed'\ntrailingOnlyFn();\n```\n"
  },
  {
    "path": "docs/zh_hans/reference/function/unary.md",
    "content": "# unary\n\n创建一个新函数,限制函数只接受第一个参数。\n\n```typescript\nconst unaryFunc = unary(func);\n```\n\n## 用法\n\n### `unary(func)`\n\n当您想限制函数只接受一个参数时,请使用 `unary`。所有额外传递的参数都会被忽略。\n\n这在数组的 `map`、`filter`、`forEach` 等方法中非常有用,可以防止回调函数接收到比预期更多的参数。\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 基本用法\nfunction greet(name: string, age?: number, city?: string) {\n  console.log(`您好,${name}!`);\n  if (age) console.log(`年龄:${age}`);\n  if (city) console.log(`城市:${city}`);\n}\n\nconst greetOnlyName = unary(greet);\ngreetOnlyName('小明', 25, '北京'); // 只输出 '您好,小明!'\n\n// 与数组方法一起使用\nconst numbers = ['1', '2', '3', '4', '5'];\n\n// parseInt 的第二个参数接受基数,\n// 但 map 的回调会传递 (value, index, array)\nconsole.log(numbers.map(parseInt)); // [1, NaN, NaN, NaN, NaN] (意外的结果)\n\n// 使用 unary 只传递第一个参数\nconsole.log(numbers.map(unary(parseInt))); // [1, 2, 3, 4, 5] (预期的结果)\n\n// 其他示例:当函数接受多个参数但只想使用一个时\nfunction logValue(value: any, prefix: string = 'Value:', suffix: string = '') {\n  console.log(`${prefix} ${value} ${suffix}`);\n}\n\nconst data = ['apple', 'banana', 'cherry'];\n\n// 只想输出值,不要 prefix 和 suffix\ndata.forEach(unary(logValue));\n// Value: apple\n// Value: banana\n// Value: cherry\n```\n\n在函数组合中也很有用。\n\n```typescript\nimport { unary } from 'es-toolkit/function';\n\n// 接受多个参数的函数\nfunction multiply(a: number, b: number = 1, c: number = 1) {\n  return a * b * c;\n}\n\n// 限制为只使用第一个参数\nconst multiplyOne = unary(multiply);\n\nconst numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map(x => multiplyOne(x, 2, 3)); // b 和 c 被忽略\nconsole.log(doubled); // [1, 2, 3, 4, 5] (1 * 1 * 1 的结果)\n```\n\n#### 参数\n\n- `func` (`F`): 要限制为只接受第一个参数的函数。\n\n#### 返回值\n\n(`(...args: any[]) => ReturnType<F>`): 返回一个新函数,只将第一个参数传递给原始函数。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/countBy.md",
    "content": "# countBy (`Map`)\n\n根据转换函数计算Map中项目的出现次数。\n\n```typescript\nconst counts = countBy(map, mapper);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `countBy(map, mapper)`\n\n当您想计算Map中有多少条目属于不同类别时,请使用 `countBy`。提供一个从每个值-键对生成键的函数,它返回一个Map,其中生成的键及其计数作为值。对于转换产生相同键的每个条目,计数会递增。\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 1],\n]);\n\nconst result = countBy(map, value => value);\n// 结果: Map(2) { 1 => 2, 2 => 1 }\n```\n\n可以根据各种标准计算条目。\n\n```typescript\nimport { countBy } from 'es-toolkit/map';\n\n// 按值属性计数\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25, department: 'Engineering' }],\n  ['user2', { name: 'Bob', age: 30, department: 'Engineering' }],\n  ['user3', { name: 'Charlie', age: 35, department: 'Sales' }],\n]);\n\nconst byDepartment = countBy(users, user => user.department);\n// 结果: Map(2) { 'Engineering' => 2, 'Sales' => 1 }\n\n// 按派生值计数\nconst ages = new Map([\n  ['p1', 25],\n  ['p2', 30],\n  ['p3', 25],\n  ['p4', 40],\n]);\n\nconst ageGroups = countBy(ages, age => (age < 30 ? 'young' : 'senior'));\n// 结果: Map(2) { 'young' => 2, 'senior' => 2 }\n\n// 同时使用值和键进行计数\nconst items = new Map([\n  ['alice', 20],\n  ['bob', 30],\n  ['carol', 20],\n]);\n\nconst firstLetter = countBy(items, (value, key) => key[0]);\n// 结果: Map(3) { 'a' => 1, 'b' => 1, 'c' => 1 }\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要计算出现次数的Map。\n- `mapper` (`(value: V, key: K, object: Map<K, V>) => K2`): 生成用于计数的键的函数。\n\n#### 返回值\n\n(`Map<K2, number>`): 返回包含映射键及其计数的Map。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/every.md",
    "content": "# every (`Map`)\n\n测试Map中的所有条目是否满足提供的谓词函数。\n\n```typescript\nconst allMatch = every(map, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `every(map, doesMatch)`\n\n当您想检查Map中的所有条目是否满足特定条件时,请使用 `every`。提供一个测试每个条目的谓词函数,如果所有条目都满足谓词,它返回true,否则返回false。\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 10],\n  ['b', 20],\n  ['c', 30],\n]);\n\nconst result = every(map, value => value > 5);\n// 结果: true\n\nconst result2 = every(map, value => value > 15);\n// 结果: false\n```\n\n您可以测试各种条件。\n\n```typescript\nimport { every } from 'es-toolkit/map';\n\n// 检查所有值是否满足条件\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 8, inStock: true }],\n]);\n\nconst allInStock = every(inventory, item => item.inStock);\n// 结果: true\n\n// 检查所有键是否匹配模式\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['api.host', 'localhost'],\n]);\n\nconst allApiSettings = every(settings, (value, key) => key.startsWith('api.'));\n// 结果: true\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要测试的Map。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 测试每个条目的谓词函数。\n\n#### 返回值\n\n(`boolean`): 如果所有条目都满足谓词则返回true,否则返回false。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/filter.md",
    "content": "# filter (`Map`)\n\n根据谓词函数过滤Map。\n\n```typescript\nconst filtered = filter(map, callback);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `filter(map, callback)`\n\n当您想创建一个仅包含满足特定条件的条目的新Map时,请使用 `filter`。提供一个测试每个条目的谓词函数,它返回一个仅包含谓词返回true的条目的新Map。\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n  ['d', 4],\n]);\n\nconst result = filter(map, value => value > 2);\n// 结果:\n// Map(2) {\n//   'c' => 3,\n//   'd' => 4\n// }\n```\n\n可以根据各种标准进行过滤。\n\n```typescript\nimport { filter } from 'es-toolkit/map';\n\n// 按值类型过滤\nconst inventory = new Map([\n  ['apple', { quantity: 10, inStock: true }],\n  ['banana', { quantity: 0, inStock: false }],\n  ['orange', { quantity: 5, inStock: true }],\n]);\n\nconst inStockItems = filter(inventory, item => item.inStock);\n// 结果: 包含'apple'和'orange'条目的Map\n\n// 按键模式过滤\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['admin_1', 'Bob'],\n  ['user_2', 'Charlie'],\n]);\n\nconst users = filter(data, (value, key) => key.startsWith('user_'));\n// 结果: 包含'user_1'和'user_2'条目的Map\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要过滤的Map。\n- `callback` (`(value: V, key: K, map: Map<K, V>) => boolean`): 测试每个条目的谓词函数。\n\n#### 返回值\n\n(`Map<K, V>`): 返回仅包含满足谓词的条目的新Map。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/findKey.md",
    "content": "# findKey (`Map`)\n\n查找Map中谓词函数返回true的第一个键。\n\n```typescript\nconst key = findKey(map, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `findKey(map, doesMatch)`\n\n当您想查找符合特定条件的第一个条目的键时,请使用 `findKey`。提供一个测试每个条目的谓词函数,它返回第一个匹配条目的键,如果未找到则返回undefined。\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findKey(map, value => value.quantity > 10);\n// 结果: 'grape'\n```\n\n您可以根据各种标准进行搜索。\n\n```typescript\nimport { findKey } from 'es-toolkit/map';\n\n// 按值属性查找\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n  ['user3', { name: 'Charlie', age: 35 }],\n]);\n\nconst seniorUser = findKey(users, user => user.age >= 35);\n// 结果: 'user3'\n\n// 按键模式查找\nconst settings = new Map([\n  ['api.timeout', 5000],\n  ['api.retries', 3],\n  ['db.host', 'localhost'],\n]);\n\nconst dbSetting = findKey(settings, (value, key) => key.startsWith('db.'));\n// 结果: 'db.host'\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要搜索的Map。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 测试每个条目的谓词函数。\n\n#### 返回值\n\n(`K | undefined`): 满足谓词的第一个条目的键,如果未找到则返回undefined。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/findValue.md",
    "content": "# findValue (`Map`)\n\n查找Map中谓词函数返回true的第一个值。\n\n```typescript\nconst value = findValue(map, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `findValue(map, doesMatch)`\n\n当您想查找符合特定条件的第一个条目的值时,请使用 `findValue`。提供一个测试每个条目的谓词函数,它返回第一个匹配条目的值,如果未找到则返回undefined。\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['apple', { color: 'red', quantity: 10 }],\n  ['banana', { color: 'yellow', quantity: 5 }],\n  ['grape', { color: 'purple', quantity: 15 }],\n]);\n\nconst result = findValue(map, value => value.quantity > 10);\n// 结果: { color: 'purple', quantity: 15 }\n```\n\n您可以根据各种标准进行搜索。\n\n```typescript\nimport { findValue } from 'es-toolkit/map';\n\n// 按值属性查找\nconst products = new Map([\n  ['p1', { name: 'Laptop', price: 1000, inStock: true }],\n  ['p2', { name: 'Mouse', price: 25, inStock: false }],\n  ['p3', { name: 'Keyboard', price: 75, inStock: true }],\n]);\n\nconst expensiveProduct = findValue(products, product => product.price > 500);\n// 结果: { name: 'Laptop', price: 1000, inStock: true }\n\n// 按键模式查找\nconst cache = new Map([\n  ['temp_1', { data: 'foo', timestamp: 100 }],\n  ['perm_1', { data: 'bar', timestamp: 200 }],\n  ['temp_2', { data: 'baz', timestamp: 300 }],\n]);\n\nconst permanent = findValue(cache, (value, key) => key.startsWith('perm_'));\n// 结果: { data: 'bar', timestamp: 200 }\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要搜索的Map。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 测试每个条目的谓词函数。\n\n#### 返回值\n\n(`V | undefined`): 满足谓词的第一个条目的值,如果未找到则返回undefined。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/forEach.md",
    "content": "# forEach (`Map`)\n\n对Map中的每个条目执行一次提供的函数。\n\n```typescript\nforEach(map, callback);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `forEach(map, callback)`\n\n当您想对Map中的每个条目执行函数时,请使用 `forEach`。回调函数接收值、键和Map本身作为参数。这对于日志记录、更新外部状态或对每个条目执行操作等副作用很有用。\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nforEach(map, (value, key) => {\n  console.log(`${key}: ${value}`);\n});\n// 输出:\n// a: 1\n// b: 2\n// c: 3\n```\n\n可以对每个条目执行各种操作。\n\n```typescript\nimport { forEach } from 'es-toolkit/map';\n\n// 累积值\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nlet total = 0;\nforEach(prices, value => {\n  total += value;\n});\n// total现在是4.25\n\n// 将条目收集到数组中\nconst users = new Map([\n  ['user1', { name: 'Alice', age: 25 }],\n  ['user2', { name: 'Bob', age: 30 }],\n]);\n\nconst userList: string[] = [];\nforEach(users, (value, key) => {\n  userList.push(`${key}: ${value.name} (${value.age})`);\n});\n// userList: ['user1: Alice (25)', 'user2: Bob (30)']\n\n// 根据条件更新外部Map\nconst inventory = new Map([\n  ['item1', { stock: 10, price: 5 }],\n  ['item2', { stock: 0, price: 10 }],\n  ['item3', { stock: 5, price: 15 }],\n]);\n\nconst outOfStock = new Map<string, any>();\nforEach(inventory, (value, key) => {\n  if (value.stock === 0) {\n    outOfStock.set(key, value);\n  }\n});\n// outOfStock包含item2\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要迭代的Map。\n- `callback` (`(value: V, key: K, map: Map<K, V>) => void`): 对每个条目执行的函数。\n\n#### 返回值\n\n(`void`): 此函数不返回值。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/hasValue.md",
    "content": "# hasValue (`Map`)\n\n检查Map是否包含特定值。\n\n```typescript\nconst exists = hasValue(map, searchElement);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `hasValue(map, searchElement)`\n\n当您想检查Map是否包含特定值时,请使用 `hasValue`。此函数使用SameValueZero比较(类似于Array.prototype.includes),这意味着NaN被认为等于NaN。\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = hasValue(map, 2);\n// 结果: true\n\nconst result2 = hasValue(map, 5);\n// 结果: false\n```\n\n您可以搜索各种值类型。\n\n```typescript\nimport { hasValue } from 'es-toolkit/map';\n\n// 搜索NaN(使用SameValueZero比较)\nconst numbers = new Map([\n  ['a', 1],\n  ['b', NaN],\n  ['c', 3],\n]);\n\nconst hasNaN = hasValue(numbers, NaN);\n// 结果: true\n\n// 搜索对象(引用相等性)\nconst obj = { id: 1 };\nconst objects = new Map([\n  ['first', obj],\n  ['second', { id: 2 }],\n]);\n\nconst hasObj = hasValue(objects, obj);\n// 结果: true\n\nconst hasSimilar = hasValue(objects, { id: 1 });\n// 结果: false(不同的引用)\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要搜索的Map。\n- `searchElement` (`V`): 要搜索的值。\n\n#### 返回值\n\n(`boolean`): 如果Map包含该值则返回true,否则返回false。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/keyBy.md",
    "content": "# keyBy (`Map`)\n\n根据提供的键生成函数映射Map的每个条目。\n\n```typescript\nconst result = keyBy(map, getKeyFromEntry);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `keyBy(map, getKeyFromEntry)`\n\n当您想通过从值生成新键来重组Map时,请使用 `keyBy`。提供一个从每个值-键对生成键的函数,它返回一个新Map,其中键由键函数生成,值是原始映射中的相应值。如果多个条目产生相同的键,则使用最后遇到的值。\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['x', { type: 'fruit', name: 'apple' }],\n  ['y', { type: 'fruit', name: 'banana' }],\n  ['z', { type: 'vegetable', name: 'carrot' }],\n]);\n\nconst result = keyBy(map, item => item.type);\n// 结果:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 注意: 'banana'被保留是因为它是最后一个'fruit'\n```\n\n可以根据各种标准重组数据。\n\n```typescript\nimport { keyBy } from 'es-toolkit/map';\n\n// 按ID属性索引\nconst users = new Map([\n  ['user1', { id: 101, name: 'Alice', role: 'admin' }],\n  ['user2', { id: 102, name: 'Bob', role: 'user' }],\n  ['user3', { id: 103, name: 'Charlie', role: 'user' }],\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 结果: 键为101, 102, 103的Map\n\n// 按角色索引(每个角色的最后一个用户获胜)\nconst byRole = keyBy(users, user => user.role);\n// 结果: Map(2) {\n//   'admin' => { id: 101, name: 'Alice', role: 'admin' },\n//   'user' => { id: 103, name: 'Charlie', role: 'user' }\n// }\n\n// 使用值和原始键转换键\nconst inventory = new Map([\n  ['item_1', { category: 'electronics', price: 100 }],\n  ['item_2', { category: 'electronics', price: 200 }],\n]);\n\nconst categorized = keyBy(inventory, (value, key) => `${value.category}_${key}`);\n// 结果: 键为'electronics_item_1', 'electronics_item_2'的Map\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要映射的条目的Map。\n- `getKeyFromEntry` (`(value: V, key: K, object: Map<K, V>) => K2`): 从值-键对生成键的函数。\n\n#### 返回值\n\n(`Map<K2, V>`): 返回一个Map,其中生成的键映射到每个条目的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/mapKeys.md",
    "content": "# mapKeys (`Map`)\n\n创建一个具有相同值但键已通过提供的函数转换的新Map。\n\n```typescript\nconst transformed = mapKeys(map, getNewKey);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `mapKeys(map, getNewKey)`\n\n当您想要转换Map的键同时保持值不变时,请使用 `mapKeys`。提供一个从每个条目生成新键的函数,它返回一个具有转换后键的新Map。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapKeys(map, (value, key) => key.toUpperCase());\n// 结果:\n// Map(3) {\n//   'A' => 1,\n//   'B' => 2,\n//   'C' => 3\n// }\n```\n\n您可以通过各种方式转换键。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/map';\n\n// 为键添加前缀\nconst categories = new Map([\n  ['fruit', ['apple', 'banana']],\n  ['vegetable', ['carrot', 'potato']],\n]);\n\nconst prefixed = mapKeys(categories, (value, key) => `category_${key}`);\n// 结果: 具有键'category_fruit'、'category_vegetable'的Map\n\n// 根据值转换\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst ranked = mapKeys(scores, (value, key) => (value >= 90 ? `top_${key}` : key));\n// 结果: 具有键'top_alice'、'bob'、'top_charlie'的Map\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要转换的Map。\n- `getNewKey` (`(value: V, key: K, object: Map<K, V>) => K`): 从值-键对生成新键的函数。\n\n#### 返回值\n\n(`Map<K, V>`): 具有转换后的键和相同值的新Map。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/mapValues.md",
    "content": "# mapValues (`Map`)\n\n创建一个具有相同键但值已通过提供的函数转换的新Map。\n\n```typescript\nconst transformed = mapValues(map, getNewValue);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `mapValues(map, getNewValue)`\n\n当您想要转换Map的值同时保持键不变时,请使用 `mapValues`。提供一个从每个条目生成新值的函数,它返回一个具有转换后值的新Map。\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = mapValues(map, value => value * 2);\n// 结果:\n// Map(3) {\n//   'a' => 2,\n//   'b' => 4,\n//   'c' => 6\n// }\n```\n\n您可以通过各种方式转换值。\n\n```typescript\nimport { mapValues } from 'es-toolkit/map';\n\n// 格式化值\nconst prices = new Map([\n  ['apple', 1.5],\n  ['banana', 0.75],\n  ['orange', 2.0],\n]);\n\nconst formatted = mapValues(prices, value => `$${value.toFixed(2)}`);\n// 结果: 具有值'$1.50'、'$0.75'、'$2.00'的Map\n\n// 根据键转换\nconst inventory = new Map([\n  ['premium_item', 10],\n  ['standard_item', 20],\n  ['basic_item', 30],\n]);\n\nconst adjusted = mapValues(inventory, (value, key) => (key.startsWith('premium_') ? value * 1.5 : value));\n// 结果: 具有值15、20、30的Map\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要转换的Map。\n- `getNewValue` (`(value: V, key: K, object: Map<K, V>) => V`): 从值-键对生成新值的函数。\n\n#### 返回值\n\n(`Map<K, V>`): 具有相同键和转换后值的新Map。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/reduce.md",
    "content": "# reduce (`Map`)\n\n通过遍历Map的条目并应用回调函数,将Map归约为单个值。\n\n```typescript\nconst result = reduce(map, callback, initialValue);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `reduce(map, callback, initialValue?)`\n\n当您想通过累积每个条目的结果将Map转换为单个值时,请使用 `reduce`。提供一个处理每个条目并更新累加器的回调函数。如果提供了初始值,它将用作起始累加器值。如果未提供初始值且Map为空,则会抛出TypeError。\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = reduce(map, (acc, value) => acc + value, 0);\n// 结果: 6\n```\n\n您可以通过各种方式归约Map。\n\n```typescript\nimport { reduce } from 'es-toolkit/map';\n\n// 带初始值的求和\nconst scores = new Map([\n  ['alice', 95],\n  ['bob', 87],\n  ['charlie', 92],\n]);\n\nconst totalScore = reduce(scores, (acc, score) => acc + score, 0);\n// 结果: 274\n\n// 不带初始值(使用第一个值)\nconst numbers = new Map([\n  ['a', 10],\n  ['b', 20],\n]);\n\nconst sum = reduce(numbers, (acc, value) => acc + value);\n// 结果: 30(从第一个值10开始)\n\n// 从Map构建对象\nconst settings = new Map([\n  ['theme', 'dark'],\n  ['lang', 'en'],\n  ['notifications', true],\n]);\n\nconst config = reduce(settings, (acc, value, key) => ({ ...acc, [key]: value }), {} as Record<string, any>);\n// 结果: { theme: 'dark', lang: 'en', notifications: true }\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要归约的Map。\n- `callback` (`(accumulator: A, value: V, key: K, map: Map<K, V>) => A`): 处理每个条目并更新累加器的函数。\n- `initialValue` (`A`,可选): 累加器的初始值。如果未提供,则使用Map中的第一个值。\n\n#### 返回值\n\n(`A`): 最终累积的值。\n\n#### 抛出\n\n(`TypeError`): 如果Map为空且未提供初始值。\n"
  },
  {
    "path": "docs/zh_hans/reference/map/some.md",
    "content": "# some (`Map`)\n\n测试Map中是否至少有一个条目满足提供的谓词函数。\n\n```typescript\nconst anyMatch = some(map, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/map` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `some(map, doesMatch)`\n\n当您想检查Map中是否至少有一个条目满足特定条件时,请使用 `some`。提供一个测试每个条目的谓词函数,如果至少有一个条目满足谓词,它返回true,否则返回false。\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\nconst map = new Map([\n  ['a', 1],\n  ['b', 2],\n  ['c', 3],\n]);\n\nconst result = some(map, value => value > 2);\n// 结果: true\n\nconst result2 = some(map, value => value > 5);\n// 结果: false\n```\n\n您可以测试各种条件。\n\n```typescript\nimport { some } from 'es-toolkit/map';\n\n// 检查是否有任何值满足条件\nconst inventory = new Map([\n  ['apple', { quantity: 0, inStock: false }],\n  ['banana', { quantity: 5, inStock: true }],\n  ['orange', { quantity: 0, inStock: false }],\n]);\n\nconst hasStock = some(inventory, item => item.inStock);\n// 结果: true\n\n// 检查是否有任何键匹配模式\nconst data = new Map([\n  ['user_1', 'Alice'],\n  ['user_2', 'Bob'],\n  ['group_1', 'Admins'],\n]);\n\nconst hasAdmin = some(data, (value, key) => key.startsWith('admin_'));\n// 结果: false\n```\n\n#### 参数\n\n- `map` (`Map<K, V>`): 要测试的Map。\n- `doesMatch` (`(value: V, key: K, map: Map<K, V>) => boolean`): 测试每个条目的谓词函数。\n\n#### 返回值\n\n(`boolean`): 如果至少有一个条目满足谓词则返回true,否则返回false。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/clamp.md",
    "content": "# clamp\n\n将数字限制在指定范围内。\n\n```typescript\nconst clamped = clamp(value, maximum);\nconst clamped = clamp(value, minimum, maximum);\n```\n\n## 用法\n\n### `clamp(value, maximum)`\n\n当您想将数字限制为不超过给定最大值时,请使用 `clamp`。如果值超过最大值,则被限制为最大值;否则,返回原始值。\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 限制为最大值\nconst result1 = clamp(10, 5); // result1 是 5 (10 被限制为最大值 5)\nconst result2 = clamp(3, 5); // result2 是 3 (小于 5,保持不变)\n```\n\n#### 参数\n\n- `value` (`number`): 要限制的数字。\n- `maximum` (`number`): 最大值。\n\n#### 返回值\n\n(`number`): 返回被限制为不超过最大值的数字。\n\n### `clamp(value, minimum, maximum)`\n\n当您想将数字限制在给定的最小值和最大值范围内时,请使用 `clamp`。如果值超出范围,则被限制为最近的边界值。\n\n```typescript\nimport { clamp } from 'es-toolkit/math';\n\n// 在最小值和最大值范围内限制\nconst result1 = clamp(10, 5, 15); // result1 是 10 (在 5-15 范围内)\nconst result2 = clamp(2, 5, 15); // result2 是 5 (被限制为最小值 5)\nconst result3 = clamp(20, 5, 15); // result3 是 15 (被限制为最大值 15)\n```\n\n#### 参数\n\n- `value` (`number`): 要限制的数字。\n- `minimum` (`number`): 最小值。\n- `maximum` (`number`): 最大值。\n\n#### 返回值\n\n(`number`): 返回在指定范围内限制的数字。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/inRange.md",
    "content": "# inRange\n\n检查值是否在指定范围内。\n\n```typescript\nconst result = inRange(value, maximum);\nconst result = inRange(value, minimum, maximum);\n```\n\n## 用法\n\n### `inRange(value, maximum)`\n\n当您想检查值是否在从 0 到小于最大值的范围内时,请使用 `inRange`。最小值自动设置为 0。\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 检查从 0 到小于 5 的范围\nconst result1 = inRange(3, 5); // result1 为 true (0 <= 3 < 5)\nconst result2 = inRange(5, 5); // result2 为 false (5 不小于 5)\nconst result3 = inRange(-1, 5); // result3 为 false (-1 < 0)\n```\n\n#### 参数\n\n- `value` (`number`): 要检查的值。\n- `maximum` (`number`): 范围的最大值(不包括)。\n\n#### 返回值\n\n(`boolean`): 如果值在从 0(包括)到最大值(不包括)的范围内,则返回 `true`,否则返回 `false`。\n\n### `inRange(value, minimum, maximum)`\n\n当您想检查值是否在指定的最小值和最大值范围内时,请使用 `inRange`。\n\n```typescript\nimport { inRange } from 'es-toolkit/math';\n\n// 检查最小值和最大值范围内\nconst result1 = inRange(3, 2, 5); // result1 为 true (2 <= 3 < 5)\nconst result2 = inRange(1, 2, 5); // result2 为 false (1 < 2)\nconst result3 = inRange(5, 2, 5); // result3 为 false (5 不小于 5)\n\n// 可以用于负数范围\nconst result4 = inRange(-3, -5, -1); // result4 为 true (-5 <= -3 < -1)\n```\n\n#### 参数\n\n- `value` (`number`): 要检查的值。\n- `minimum` (`number`): 范围的最小值(包括)。\n- `maximum` (`number`): 范围的最大值(不包括)。\n\n#### 返回值\n\n(`boolean`): 如果值在指定范围内,则返回 `true`,否则返回 `false`。\n\n#### 错误\n\n如果最小值大于或等于最大值,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/mean.md",
    "content": "# mean\n\n计算数字数组的平均值。\n\n```typescript\nconst average = mean(nums);\n```\n\n## 用法\n\n### `mean(nums)`\n\n当您想求数字数组的平均值时,请使用 `mean`。它通过将所有数字相加后除以数组的长度来计算平均值。如果给定空数组,则返回 `NaN`。\n\n```typescript\nimport { mean } from 'es-toolkit/math';\n\n// 计算数字数组的平均值\nconst numbers = [1, 2, 3, 4, 5];\nconst result = mean(numbers);\n// result 为 3 ((1 + 2 + 3 + 4 + 5) / 5 = 15 / 5 = 3)\n\n// 计算带小数的数字的平均值\nconst decimals = [1.5, 2.5, 3.5];\nconst decimalResult = mean(decimals);\n// decimalResult 为 2.5\n\n// 空数组返回 NaN\nconst emptyResult = mean([]);\n// emptyResult 为 NaN\n```\n\n#### 参数\n\n- `nums` (`readonly number[]`): 要计算平均值的数字数组。\n\n#### 返回值\n\n(`number`): 返回数组中所有数字的平均值。如果数组为空,则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/meanBy.md",
    "content": "# meanBy\n\n通过对每个元素应用 `getValue` 函数来计算数组的平均值。\n\n```typescript\nconst average = meanBy(items, getValue);\n```\n\n## 用法\n\n### `meanBy(items, getValue)`\n\n当您想求对数组的每个元素应用函数后的结果的平均值时,请使用 `meanBy`。它对于计算对象数组中特定属性的平均值或在转换每个元素后求平均值很有用。如果给定空数组,则返回 `NaN`。\n\n```typescript\nimport { meanBy } from 'es-toolkit/math';\n\n// 计算对象数组中特定属性的平均值\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }];\nconst averageAge = meanBy(people, person => person.age);\n// averageAge 为 25 ((23 + 25 + 27) / 3 = 75 / 3 = 25)\n\n// 计算字符串长度的平均值\nconst words = ['apple', 'banana', 'cherry'];\nconst averageLength = meanBy(words, word => word.length);\n// averageLength 约为 5.67 ((5 + 6 + 6) / 3 ≈ 5.67)\n\n// 空数组返回 NaN\nconst emptyResult = meanBy([], x => x);\n// emptyResult 为 NaN\n```\n\n#### 参数\n\n- `items` (`readonly T[]`): 要计算平均值的数组。\n- `getValue` (`(element: T) => number`): 从每个元素选择数值的函数。\n\n#### 返回值\n\n(`number`): 根据 `getValue` 函数,返回数组中所有值的平均值。如果数组为空,则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/median.md",
    "content": "# median\n\n计算数字数组的中位数。\n\n```typescript\nconst middle = median(nums);\n```\n\n## 用法\n\n### `median(nums)`\n\n当您想求数字数组的中位数时,请使用 `median`。将数组按升序排序后,找到位于中间的值。对于具有奇数个元素的数组,返回正中间的值,对于具有偶数个元素的数组,返回中间两个值的平均值。如果给定空数组,则返回 `NaN`。\n\n```typescript\nimport { median } from 'es-toolkit/math';\n\n// 计算具有奇数个元素的数组的中位数\nconst oddNumbers = [1, 2, 3, 4, 5];\nconst oddResult = median(oddNumbers);\n// oddResult 为 3 (排序数组 [1, 2, 3, 4, 5] 中的中间值)\n\n// 计算具有偶数个元素的数组的中位数\nconst evenNumbers = [1, 2, 3, 4];\nconst evenResult = median(evenNumbers);\n// evenResult 为 2.5 ((2 + 3) / 2 = 2.5)\n\n// 未排序的数组会自动排序\nconst unordered = [3, 1, 4, 1, 5];\nconst unorderedResult = median(unordered);\n// unorderedResult 为 3 (排序后 [1, 1, 3, 4, 5] 中的中间值)\n\n// 空数组返回 NaN\nconst emptyResult = median([]);\n// emptyResult 为 NaN\n```\n\n#### 参数\n\n- `nums` (`readonly number[]`): 要计算中位数的数字数组。\n\n#### 返回值\n\n(`number`): 返回数组中所有数字的中位数。如果数组为空,则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/medianBy.md",
    "content": "# medianBy\n\n通过对每个元素应用 `getValue` 函数来计算数组的中位数。\n\n```typescript\nconst middle = medianBy(items, getValue);\n```\n\n## 用法\n\n### `medianBy(items, getValue)`\n\n当您想求对数组的每个元素应用函数后的结果的中位数时,请使用 `medianBy`。它对于计算对象数组中特定属性的中位数或在转换每个元素后求中位数很有用。对于具有奇数个元素的数组,返回正中间的值,对于具有偶数个元素的数组,返回中间两个值的平均值。如果给定空数组,则返回 `NaN`。\n\n```typescript\nimport { medianBy } from 'es-toolkit/math';\n\n// 计算对象数组中特定属性的中位数(奇数个)\nconst people = [{ age: 23 }, { age: 25 }, { age: 27 }, { age: 29 }, { age: 31 }];\nconst medianAge = medianBy(people, person => person.age);\n// medianAge 为 27 (排序后的ages [23, 25, 27, 29, 31] 中的中间值)\n\n// 计算对象数组中特定属性的中位数(偶数个)\nconst scores = [{ score: 80 }, { score: 90 }, { score: 85 }, { score: 95 }];\nconst medianScore = medianBy(scores, item => item.score);\n// medianScore 为 87.5 (排序后的scores [80, 85, 90, 95] 中 (85 + 90) / 2)\n\n// 计算字符串长度的中位数\nconst words = ['cat', 'elephant', 'dog', 'butterfly', 'ant'];\nconst medianLength = medianBy(words, word => word.length);\n// medianLength 为 3 (长度 [3, 8, 3, 9, 3] 排序后为 [3, 3, 3, 8, 9] 中的中间值)\n\n// 空数组返回 NaN\nconst emptyResult = medianBy([], x => x);\n// emptyResult 为 NaN\n```\n\n#### 参数\n\n- `items` (`readonly T[]`): 要计算中位数的数组。\n- `getValue` (`(element: T) => number`): 从每个元素选择数值的函数。\n\n#### 返回值\n\n(`number`): 根据 `getValue` 函数,返回数组中所有值的中位数。如果数组为空,则返回 `NaN`。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/random.md",
    "content": "# random\n\n在指定范围内生成随机数。生成的数字可以包含小数。\n\n```typescript\nconst randomNumber = random(min, max);\n```\n\n## 用法\n\n### `random(maximum)` / `random(minimum, maximum)`\n\n当您需要随机数时,请使用 `random`。它生成带有小数点的数字。\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 生成0以上5以下的随机小数。\nconst num1 = random(5);\nconsole.log(num1); // 例如: 2.718281828\n\n// 生成2以上10以下的随机小数。\nconst num2 = random(2, 10);\nconsole.log(num2); // 例如: 7.158765432\n\n// 也可以用于负数范围。\nconst num3 = random(-5, -1);\nconsole.log(num3); // 例如: -3.842134567\n\n// 小数范围也可以。\nconst num4 = random(1.5, 2.5);\nconsole.log(num4); // 例如: 1.923456789\n```\n\n如果范围无效,则抛出错误。\n\n```typescript\nimport { random } from 'es-toolkit/math';\n\n// 如果最大值为0或更小,则发生错误。\ntry {\n  random(0);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n\n// 如果最小值大于或等于最大值,则发生错误。\ntry {\n  random(5, 3);\n} catch (error) {\n  console.error(error.message); // 'Invalid input: The maximum value must be greater than the minimum value.'\n}\n```\n\n#### 参数\n\n- `maximum` (`number`): 使用单个参数时的最大值(不包括)。必须大于0。\n- `minimum` (`number`): 最小值(包括)。\n- `maximum` (`number`): 最大值(不包括)。必须大于最小值。\n\n#### 返回值\n\n(`number`): 返回指定范围内的随机小数。\n\n#### 错误\n\n如果最大值小于或等于最小值,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/randomInt.md",
    "content": "# randomInt\n\n在指定范围内生成随机整数。\n\n```typescript\nconst randomInteger = randomInt(min, max);\n```\n\n## 用法\n\n### `randomInt(maximum)` / `randomInt(minimum, maximum)`\n\n当您需要随机整数时,请使用 `randomInt`。它只返回没有小数点的整数。\n\n```typescript\nimport { randomInt } from 'es-toolkit/math';\n\n// 生成0以上5以下的随机整数。\nconst num1 = randomInt(5);\nconsole.log(num1); // 例如: 3\n\n// 生成2以上10以下的随机整数。\nconst num2 = randomInt(2, 10);\nconsole.log(num2); // 例如: 7\n\n// 也可以用于负数范围。\nconst num3 = randomInt(-5, -1);\nconsole.log(num3); // 例如: -3\n\n// 模拟骰子掷骰(1-6)\nconst diceRoll = randomInt(1, 7);\nconsole.log(diceRoll); // 例如: 4\n\n// 从数组中选择随机索引\nconst items = ['apple', 'banana', 'cherry', 'date'];\nconst randomIndex = randomInt(items.length);\nconsole.log(items[randomIndex]); // 例如: 'banana'\n```\n\n#### 参数\n\n- `maximum` (`number`): 使用单个参数时的最大值(不包括)。必须大于0。\n- `minimum` (`number`): 最小值(包括)。\n- `maximum` (`number`): 最大值(不包括)。必须大于最小值。\n\n#### 返回值\n\n(`number`): 返回指定范围内的随机整数。\n\n#### 错误\n\n如果最大值小于或等于最小值,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/range.md",
    "content": "# range\n\n在指定范围和步长内创建数字数组。\n\n```typescript\nconst numbers = range(end);\nconst numbers = range(start, end, step);\n```\n\n## 用法\n\n### `range(end)`\n\n当您需要从 0 到指定结束值的连续数字数组时使用 `range`。它在循环中很有用。\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 创建从 0 到 3 的数组。\nconst numbers1 = range(4);\nconsole.log(numbers1); // [0, 1, 2, 3]\n\n// 具有 10 个元素的数组的索引\nconst indices = range(10);\nconsole.log(indices); // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\n// 可以代替 forEach 使用。\nrange(5).forEach(i => {\n  console.log(`迭代 ${i}`); // 迭代 0, 迭代 1, 迭代 2, 迭代 3, 迭代 4\n});\n```\n\n#### 参数\n\n- `end` (`number`): 结束值(不包含)。从 0 开始。\n\n#### 返回值\n\n(`number[]`): 返回从 0 到结束值生成的数字数组。\n\n### `range(start, end, step?)`\n\n当您需要具有指定起始值、结束值和步长的连续数字数组时使用 `range`。它在循环中很有用。\n\n```typescript\nimport { range } from 'es-toolkit/math';\n\n// 创建从 1 到 4 的数组。\nconst numbers2 = range(1, 5);\nconsole.log(numbers2); // [1, 2, 3, 4]\n\n// 创建从 0 到 20 以 5 递增的数组。\nconst numbers3 = range(0, 20, 5);\nconsole.log(numbers3); // [0, 5, 10, 15]\n\n// 也可以向负方向移动。\nconst numbers4 = range(0, -5, -1);\nconsole.log(numbers4); // [0, -1, -2, -3, -4]\n\n// 也可以从大数到小数。\nconst numbers5 = range(5, 0, -1);\nconsole.log(numbers5); // [5, 4, 3, 2, 1]\n\n// 创建特定范围的页码\nconst pageNumbers = range(1, 11);\nconsole.log(pageNumbers); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n```\n\n#### 参数\n\n- `start` (`number`): 起始值。包含在结果数组中。\n- `end` (`number`): 结束值。不包含在结果数组中。\n- `step` (`number`, 可选): 每个数字之间的增量。必须是非零整数。默认值为 `1`。\n\n#### 返回值\n\n(`number[]`): 返回使用指定范围和步长生成的数字数组。\n\n#### 抛出异常\n\n- 如果 `step` 为 0 或不是整数,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/rangeRight.md",
    "content": "# rangeRight\n\n在指定范围和步长内创建反向数字数组。\n\n```typescript\nconst numbers = rangeRight(end);\nconst numbers = rangeRight(start, end, step?);\n```\n\n## 用法\n\n### `rangeRight(end)`\n\n当您需要从结束值到 0 的反向连续数字数组时使用 `rangeRight`。它与 `range` 类似,但结果是从后面开始的。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 创建从 3 到 0 的反向数组。\nconst numbers1 = rangeRight(4);\nconsole.log(numbers1); // [3, 2, 1, 0]\n\n// 数组的反向索引\nconst items = ['a', 'b', 'c', 'd', 'e'];\nconst reverseIndices = rangeRight(items.length);\nreverseIndices.forEach(i => {\n  console.log(items[i]); // 按 'e', 'd', 'c', 'b', 'a' 顺序输出\n});\n```\n\n#### 参数\n\n- `end` (`number`): 结束值(不包含)。从 0 开始。\n\n#### 返回值\n\n(`number[]`): 返回从结束值到 0 生成的反向数字数组。\n\n### `rangeRight(start, end, step?)`\n\n当您需要具有指定起始值、结束值和步长的反向连续数字数组时使用 `rangeRight`。它与 `range` 类似,但结果是从后面开始的。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 创建从 4 到 1 的反向数组。\nconst numbers2 = rangeRight(1, 5);\nconsole.log(numbers2); // [4, 3, 2, 1]\n\n// 创建从 15 到 0 以 5 递减的数组。\nconst numbers3 = rangeRight(0, 20, 5);\nconsole.log(numbers3); // [15, 10, 5, 0]\n\n// 也可以向负方向移动。\nconst numbers4 = rangeRight(-5, 0, 1);\nconsole.log(numbers4); // [-1, -2, -3, -4, -5]\n\n// 也可以从小数到大数。\nconst numbers5 = rangeRight(5, 0, -1);\nconsole.log(numbers5); // [1, 2, 3, 4, 5]\n```\n\n在需要倒计时或分页中的反向顺序时很有用。\n\n```typescript\nimport { rangeRight } from 'es-toolkit/math';\n\n// 创建倒计时\nconst countdown = rangeRight(0, 11);\nconsole.log(countdown); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n\n// 分页中从最后一页到第一页\nconst pageNumbers = rangeRight(1, 11);\nconsole.log(pageNumbers); // [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n```\n\n#### 参数\n\n- `start` (`number`): 起始值。包含在结果数组中。\n- `end` (`number`): 结束值。不包含在结果数组中。\n- `step` (`number`, 可选): 每个数字之间的增量。必须是非零整数。默认值为 `1`。\n\n#### 返回值\n\n(`number[]`): 返回使用指定范围和步长生成的反向数字数组。\n\n#### 抛出异常\n\n- 如果 `step` 为 0 或不是整数,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/round.md",
    "content": "# round\n\n将数字四舍五入到指定的小数位数。\n\n```typescript\nconst rounded = round(value, precision?);\n```\n\n## 用法\n\n### `round(value, precision?)`\n\n当您想将数字四舍五入到特定小数位数时使用 `round`。它是用于精确计算的数学函数。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 默认 - 四舍五入到整数。\nconst num1 = round(1.2345);\nconsole.log(num1); // 1\n\n// 四舍五入到小数点后 2 位。\nconst num2 = round(1.2345, 2);\nconsole.log(num2); // 1.23\n\n// 四舍五入到小数点后 3 位。\nconst num3 = round(1.2387, 3);\nconsole.log(num3); // 1.239\n\n// 也可以四舍五入负数。\nconst num4 = round(-1.2345, 2);\nconsole.log(num4); // -1.23\n\n// 也可以处理大数。\nconst num5 = round(123.456789, 4);\nconsole.log(num5); // 123.4568\n```\n\n在价格计算和统计中很有用。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 价格计算(到小数点后 2 位)\nconst price = 19.999;\nconst finalPrice = round(price, 2);\nconsole.log(finalPrice); // 20.00\n\n// 百分比计算(到小数点后 1 位)\nconst percentage = 66.66666;\nconst displayPercentage = round(percentage, 1);\nconsole.log(displayPercentage); // 66.7\n\n// 评分计算(到小数点后 1 位)\nconst rating = 4.267;\nconst displayRating = round(rating, 1);\nconsole.log(displayRating); // 4.3\n```\n\n在需要精确的计算中进行四舍五入。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 整理数学计算结果\nconst result = Math.PI * 2;\nconst cleanResult = round(result, 5);\nconsole.log(cleanResult); // 6.28318\n\n// 四舍五入测量值\nconst measurement = 15.789123;\nconst rounded = round(measurement, 3);\nconsole.log(rounded); // 15.789\n```\n\n无效的 precision 值会抛出错误。\n\n```typescript\nimport { round } from 'es-toolkit/math';\n\n// 如果 precision 不是整数,则会发生错误。\ntry {\n  round(1.23, 2.5);\n} catch (error) {\n  console.error(error.message); // 'Precision must be an integer.'\n}\n```\n\n#### 参数\n\n- `value` (`number`): 要四舍五入的数字。\n- `precision` (`number`, 可选): 小数位数。必须是整数。默认值为 `0`。\n\n#### 返回值\n\n(`number`): 返回四舍五入到指定精度的数字。\n\n#### 抛出异常\n\n- 如果 `precision` 不是整数,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/sum.md",
    "content": "# sum\n\n返回数字数组中所有元素的总和。\n\n```typescript\nconst total = sum(numbers);\n```\n\n## 用法\n\n### `sum(nums)`\n\n当您想要计算数字总和时使用 `sum`。它将数组中的所有数字相加以计算总和。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 基本数字求和\nconst numbers = [1, 2, 3, 4, 5];\nconst total = sum(numbers);\nconsole.log(total); // 15\n\n// 小数求和\nconst prices = [19.99, 25.5, 3.75];\nconst totalPrice = sum(prices);\nconsole.log(totalPrice); // 49.24\n\n// 负数和正数混合求和\nconst values = [-10, 5, -3, 8];\nconst result = sum(values);\nconsole.log(result); // 0\n\n// 单个数字数组\nconst single = [42];\nconst singleSum = sum(single);\nconsole.log(singleSum); // 42\n```\n\n空数组和实际使用示例。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\n\n// 空数组返回 0。\nconst empty = sum([]);\nconsole.log(empty); // 0\n\n// 计算分数总和\nconst scores = [85, 92, 78, 96, 88];\nconst totalScore = sum(scores);\nconst averageScore = totalScore / scores.length;\nconsole.log(totalScore); // 439\nconsole.log(averageScore); // 87.8\n\n// 计算月销售额总和\nconst monthlySales = [12000, 15000, 18000, 14000, 16000];\nconst totalSales = sum(monthlySales);\nconsole.log(totalSales); // 75000\n\n// 计算购物车总金额\nconst cartItems = [29.99, 15.5, 8.75, 42.0];\nconst cartTotal = sum(cartItems);\nconsole.log(cartTotal); // 96.24\n```\n\n计算结果可以与其他函数一起使用。\n\n```typescript\nimport { sum } from 'es-toolkit/math';\nimport { round } from 'es-toolkit/math';\n\n// 求和后四舍五入\nconst measurements = [1.234, 2.567, 3.891];\nconst total = sum(measurements);\nconst rounded = round(total, 2);\nconsole.log(rounded); // 7.69\n\n// 计算百分比\nconst votes = [45, 32, 23];\nconst totalVotes = sum(votes);\nconst percentages = votes.map(vote => round((vote / totalVotes) * 100, 1));\nconsole.log(percentages); // [45.0, 32.0, 23.0]\n```\n\n#### 参数\n\n- `nums` (`readonly number[]`): 要求和的数字数组。\n\n#### 返回值\n\n(`number`): 返回数组中所有数字的总和。对于空数组返回 `0`。\n"
  },
  {
    "path": "docs/zh_hans/reference/math/sumBy.md",
    "content": "# sumBy\n\n使用转换函数计算数组元素的总和。\n\n```typescript\nconst total = sumBy(items, getValue);\n```\n\n## 用法\n\n### `sumBy(items, getValue)`\n\n当您想将数组的每个元素转换为数字并计算总和时使用 `sumBy`。它在从对象数组中求特定属性的总和时很有用。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 从对象数组中求特定属性的总和\nconst products = [\n  { name: 'laptop', price: 1000 },\n  { name: 'mouse', price: 25 },\n  { name: 'keyboard', price: 75 },\n];\nconst totalPrice = sumBy(products, item => item.price);\nconsole.log(totalPrice); // 1100\n\n// 用户年龄总和\nconst users = [\n  { name: 'Alice', age: 25 },\n  { name: 'Bob', age: 30 },\n  { name: 'Charlie', age: 35 },\n];\nconst totalAge = sumBy(users, user => user.age);\nconsole.log(totalAge); // 90\n\n// 字符串长度总和\nconst words = ['hello', 'world', 'test'];\nconst totalLength = sumBy(words, word => word.length);\nconsole.log(totalLength); // 14\n```\n\n也可以进行复杂的计算。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 加权分数总和\nconst scores = [\n  { subject: 'math', score: 90, weight: 0.3 },\n  { subject: 'english', score: 85, weight: 0.2 },\n  { subject: 'science', score: 95, weight: 0.5 },\n];\nconst weightedSum = sumBy(scores, item => item.score * item.weight);\nconsole.log(weightedSum); // 91\n\n// 数组的数组中长度的总和\nconst arrays = [[1, 2], [3, 4, 5], [6]];\nconst totalElements = sumBy(arrays, arr => arr.length);\nconsole.log(totalElements); // 6\n\n// 条件计算\nconst orders = [\n  { id: 1, amount: 100, status: 'completed' },\n  { id: 2, amount: 200, status: 'pending' },\n  { id: 3, amount: 150, status: 'completed' },\n];\nconst completedTotal = sumBy(orders, order => (order.status === 'completed' ? order.amount : 0));\nconsole.log(completedTotal); // 250\n```\n\n实际使用示例。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\n// 月销售额总和\nconst monthlyReports = [\n  { month: 'January', sales: 12000, expenses: 8000 },\n  { month: 'February', sales: 15000, expenses: 9000 },\n  { month: 'March', sales: 18000, expenses: 11000 },\n];\nconst totalSales = sumBy(monthlyReports, report => report.sales);\nconst totalExpenses = sumBy(monthlyReports, report => report.expenses);\nconst totalProfit = totalSales - totalExpenses;\nconsole.log(totalSales); // 45000\nconsole.log(totalExpenses); // 28000\nconsole.log(totalProfit); // 17000\n\n// 计算学生平均成绩的总分\nconst students = [\n  { name: 'Alice', tests: [85, 90, 88] },\n  { name: 'Bob', tests: [92, 87, 95] },\n  { name: 'Charlie', tests: [78, 85, 82] },\n];\nconst totalTestScores = sumBy(students, student => student.tests.reduce((sum, score) => sum + score, 0));\nconsole.log(totalTestScores); // 762\n```\n\n空数组返回 0。\n\n```typescript\nimport { sumBy } from 'es-toolkit/math';\n\nconst emptyArray = [];\nconst result = sumBy(emptyArray, x => x.value);\nconsole.log(result); // 0\n```\n\n#### 参数\n\n- `items` (`readonly T[]`): 要计算总和的数组。\n- `getValue` (`(element: T) => number`): 将每个元素转换为数字的函数。\n\n#### 返回值\n\n(`number`): 返回应用转换函数后的值的总和。对于空数组返回 `0`。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/clone.md",
    "content": "# clone\n\n创建给定值的浅拷贝。\n\n```typescript\nconst cloned = clone(obj);\n```\n\n## 用法\n\n### `clone(obj)`\n\n当您想要浅拷贝对象、数组、Date、RegExp 等值时使用 `clone`。浅拷贝意味着只复制顶层属性,嵌套的对象或数组与原始值共享引用。\n\n```typescript\nimport { clone } from 'es-toolkit/object';\n\n// 原始值按原样返回\nconst num = 29;\nconst clonedNum = clone(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// 浅拷贝数组\nconst arr = [1, 2, 3];\nconst clonedArr = clone(arr);\nconsole.log(clonedArr); // [1, 2, 3]\nconsole.log(clonedArr === arr); // false\n\n// 浅拷贝对象\nconst obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\nconst clonedObj = clone(obj);\nconsole.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.c === obj.c); // true (由于浅拷贝,嵌套数组共享引用)\n```\n\n支持各种 JavaScript 类型,如 `Date`、`RegExp`、`Map` 和 `Set`。\n\n```typescript\n// Date 对象\nconst date = new Date();\nconst clonedDate = clone(date);\nconsole.log(clonedDate !== date); // true\nconsole.log(clonedDate.getTime() === date.getTime()); // true\n\n// RegExp 对象\nconst regex = /abc/gi;\nconst clonedRegex = clone(regex);\nconsole.log(clonedRegex !== regex); // true\nconsole.log(clonedRegex.source === regex.source); // true\n\n// Map 和 Set\nconst map = new Map([['key', 'value']]);\nconst clonedMap = clone(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key')); // 'value'\n```\n\n#### 参数\n\n- `obj` (`T`):要复制的值。可以是任何类型,如对象、数组或原始值。\n\n#### 返回值\n\n(`T`):给定值的浅拷贝。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/cloneDeep.md",
    "content": "# cloneDeep\n\n创建给定值的深拷贝。\n\n```typescript\nconst deepCloned = cloneDeep(obj);\n```\n\n## 用法\n\n### `cloneDeep(obj)`\n\n当您想要完整复制对象或数组(包括所有嵌套结构)时使用 `cloneDeep`。深拷贝会完全独立地复制所有嵌套的对象和数组,使原始值和副本互不影响。\n\n```typescript\nimport { cloneDeep } from 'es-toolkit/object';\n\n// 原始值按原样返回\nconst num = 29;\nconst clonedNum = cloneDeep(num);\nconsole.log(clonedNum); // 29\nconsole.log(clonedNum === num); // true\n\n// 深拷贝嵌套对象\nconst obj = { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] };\nconst clonedObj = cloneDeep(obj);\nconsole.log(clonedObj); // { a: { b: { c: 'deep' } }, d: [1, 2, { e: 'nested' }] }\nconsole.log(clonedObj === obj); // false\nconsole.log(clonedObj.a === obj.a); // false (嵌套对象也被复制)\nconsole.log(clonedObj.d === obj.d); // false (嵌套数组也被复制)\nconsole.log(clonedObj.d[2] === obj.d[2]); // false (数组中的对象也被复制)\n\n// 修改原始值不影响副本\nconst original = { a: { count: 1 } };\nconst copied = cloneDeep(original);\noriginal.a.count = 2;\nconsole.log(copied.a.count); // 1 (未改变)\n```\n\n支持各种 JavaScript 类型,如 `Map` 和 `Set`,并能安全处理循环引用。\n\n```typescript\n// 深拷贝 Map 和 Set\nconst map = new Map([['key', { nested: 'value' }]]);\nconst clonedMap = cloneDeep(map);\nconsole.log(clonedMap !== map); // true\nconsole.log(clonedMap.get('key') !== map.get('key')); // true (嵌套对象也被复制)\n\n// 安全处理循环引用\nconst circular: any = { name: 'test' };\ncircular.self = circular;\nconst clonedCircular = cloneDeep(circular);\nconsole.log(clonedCircular !== circular); // true\nconsole.log(clonedCircular.self === clonedCircular); // true (保持循环引用)\n```\n\n对于由 getter 定义的只读属性,getter 的返回值将作为普通属性存储在复制的对象中。\n\n```typescript\nconst source = {\n  get computedValue() {\n    return 42;\n  },\n  normalValue: 'hello',\n};\n\nconst cloned = cloneDeep(source);\nconsole.log(cloned); // { computedValue: 42, normalValue: 'hello' }\n```\n\n#### 参数\n\n- `obj` (`T`):要深拷贝的值。可以是任何类型,如对象、数组或原始值。\n\n#### 返回值\n\n(`T`):给定值的深拷贝。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/cloneDeepWith.md",
    "content": "# cloneDeepWith\n\n通过自定义函数深拷贝给定值。\n\n```typescript\nconst customCloned = cloneDeepWith(obj, cloneValue);\n```\n\n## 用法\n\n### `cloneDeepWith(obj, cloneValue)`\n\n当您想要深拷贝对象或数组时,对特定值使用自定义方式进行拷贝,请使用 `cloneDeepWith`。如果自定义函数 `cloneValue` 返回一个值,则使用该值;如果返回 `undefined`,则使用默认的深拷贝方法。\n\n```typescript\nimport { cloneDeepWith } from 'es-toolkit/object';\n\n// 拷贝时将数字加倍\nconst obj = { a: 1, b: { c: 2, d: 'text' } };\nconst clonedObj = cloneDeepWith(obj, value => {\n  if (typeof value === 'number') {\n    return value * 2;\n  }\n  // 返回 undefined 则使用默认拷贝方式\n});\nconsole.log(clonedObj); // { a: 2, b: { c: 4, d: 'text' } }\n\n// 拷贝时给所有数组元素加 1\nconst arr = [1, [2, 3], { num: 4 }];\nconst clonedArr = cloneDeepWith(arr, value => {\n  if (typeof value === 'number') {\n    return value + 1;\n  }\n});\nconsole.log(clonedArr); // [2, [3, 4], { num: 5 }]\n```\n\n自定义函数接收当前值、键、原始对象和内部栈信息作为参数。\n\n```typescript\nconst data = {\n  user: { name: 'Alice', age: 30 },\n  settings: { theme: 'dark', lang: 'zh' },\n};\n\nconst result = cloneDeepWith(data, (value, key, obj, stack) => {\n  // 以特殊方式拷贝 'user' 对象\n  if (key === 'user' && typeof value === 'object') {\n    return { ...value, cloned: true };\n  }\n\n  // 给字符串添加前缀\n  if (typeof value === 'string') {\n    return `cloned_${value}`;\n  }\n});\n\nconsole.log(result);\n// {\n//   user: { name: 'cloned_Alice', age: 30, cloned: true },\n//   settings: { theme: 'cloned_dark', lang: 'cloned_zh' }\n// }\n```\n\n使用自定义函数可以自由配置对象的拷贝方式。例如,可以将 `Date` 对象拷贝为一年后的时间。\n\n```typescript\nconst data = {\n  created: new Date('2023-01-01'),\n  updated: new Date('2023-12-31'),\n  name: 'Document',\n};\n\nconst cloned = cloneDeepWith(data, value => {\n  // 将 Date 对象设置为一年后\n  if (value instanceof Date) {\n    const newDate = new Date(value);\n    newDate.setFullYear(newDate.getFullYear() + 1);\n    return newDate;\n  }\n});\n\nconsole.log(cloned.created.getFullYear()); // 2024\nconsole.log(cloned.updated.getFullYear()); // 2024\n```\n\n#### 参数\n\n- `obj` (`T`):要深拷贝的值。\n- `cloneValue` (`(value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any`):自定义拷贝函数。返回要拷贝的值,或返回 `undefined` 以使用默认方法。\n  - `value`:当前正在拷贝的值。\n  - `key`:当前值的属性名。\n  - `obj`:要拷贝的原始对象。\n  - `stack`:用于处理循环引用的内部栈。\n\n#### 返回值\n\n(`T`):通过自定义函数处理的深拷贝。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/findKey.md",
    "content": "# findKey\n\n查找满足给定条件的第一个元素的键。\n\n```typescript\nconst key = findKey(obj, predicate);\n```\n\n## 用法\n\n### `findKey(obj, predicate)`\n\n当您想在对象中查找满足特定条件的第一个元素的键时,请使用 `findKey`。它返回条件函数返回 `true` 的第一个值的键。\n\n```typescript\nimport { findKey } from 'es-toolkit/object';\n\n// 查找年龄小于 30 的第一个用户\nconst users = {\n  alice: { age: 25, active: true },\n  bob: { age: 30, active: false },\n  charlie: { age: 35, active: true },\n};\n\nconst youngUserKey = findKey(users, user => user.age < 30);\nconsole.log(youngUserKey); // 'alice'\n\n// 查找非活跃用户\nconst inactiveUserKey = findKey(users, user => !user.active);\nconsole.log(inactiveUserKey); // 'bob'\n\n// 没有满足条件的元素\nconst seniorUserKey = findKey(users, user => user.age > 50);\nconsole.log(seniorUserKey); // undefined\n```\n\n条件函数接收当前值、键和整个对象。\n\n```typescript\nconst data = {\n  item1: { priority: 'high', status: 'pending' },\n  item2: { priority: 'low', status: 'done' },\n  item3: { priority: 'high', status: 'done' },\n};\n\n// 同时考虑键名和值的搜索\nconst result = findKey(data, (value, key, obj) => {\n  return key.includes('2') && value.status === 'done';\n});\nconsole.log(result); // 'item2'\n```\n\n也可以用于复杂的对象结构。\n\n```typescript\nconst products = {\n  laptop: {\n    specs: { ram: 16, cpu: 'Intel i7' },\n    price: 1200,\n    available: true,\n  },\n  phone: {\n    specs: { ram: 8, cpu: 'Snapdragon' },\n    price: 800,\n    available: false,\n  },\n  tablet: {\n    specs: { ram: 12, cpu: 'Apple M1' },\n    price: 1000,\n    available: true,\n  },\n};\n\nconst affordableKey = findKey(products, product => product.price < 1000 && product.available);\nconsole.log(affordableKey); // undefined (没有满足条件的产品)\n\nconst highRamKey = findKey(products, product => product.specs.ram >= 12);\nconsole.log(highRamKey); // 'laptop'\n```\n\n#### 参数\n\n- `obj` (`T extends Record<any, any>`): 要搜索的对象。\n- `predicate` (`(value: T[keyof T], key: keyof T, obj: T) => boolean`): 对每个元素执行的条件函数。查找返回 `true` 的第一个元素的键。\n\n#### 返回值\n\n(`keyof T | undefined`): 满足条件的第一个元素的键。如果没有满足条件的元素,则返回 `undefined`。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/flattenObject.md",
    "content": "# flattenObject\n\n将嵌套对象转换为扁平对象。\n\n```typescript\nconst flattened = flattenObject(object, options?);\n```\n\n## 用法\n\n### `flattenObject(object, options?)`\n\n当您想要使用点(`.`)表示法将深层嵌套的对象或数组扁平化时,请使用 `flattenObject`。每个嵌套属性都将成为一个单层对象,其键由分隔符连接。\n\n```typescript\nimport { flattenObject } from 'es-toolkit/object';\n\n// 扁平化嵌套对象\nconst nestedObject = {\n  a: {\n    b: {\n      c: 1,\n    },\n  },\n  d: [2, 3],\n  e: 'simple',\n};\n\nconst flattened = flattenObject(nestedObject);\nconsole.log(flattened);\n// {\n//   'a.b.c': 1,\n//   'd.0': 2,\n//   'd.1': 3,\n//   'e': 'simple'\n// }\n\n// 使用自定义分隔符\nconst withCustomDelimiter = flattenObject(nestedObject, { delimiter: '/' });\nconsole.log(withCustomDelimiter);\n// {\n//   'a/b/c': 1,\n//   'd/0': 2,\n//   'd/1': 3,\n//   'e': 'simple'\n// }\n```\n\n在扁平化配置对象时非常有用。\n\n```typescript\n// 扁平化配置对象\nconst config = {\n  database: {\n    host: 'localhost',\n    port: 5432,\n    credentials: {\n      username: 'admin',\n      password: 'secret',\n    },\n  },\n  features: ['auth', 'logging'],\n  debug: true,\n};\n\nconst flatConfig = flattenObject(config);\nconsole.log(flatConfig);\n// {\n//   'database.host': 'localhost',\n//   'database.port': 5432,\n//   'database.credentials.username': 'admin',\n//   'database.credentials.password': 'secret',\n//   'features.0': 'auth',\n//   'features.1': 'logging',\n//   'debug': true\n// }\n```\n\n使用 `options.delimiter` 选项可以用下划线(`_`)等自定义字符而不是点(`.`)来扁平化对象。\n\n```typescript\n// 环境变量风格的下划线连接\nconst envStyle = flattenObject(config, { delimiter: '_' });\nconsole.log(envStyle);\n// {\n//   'database_host': 'localhost',\n//   'database_port': 5432,\n//   'database_credentials_username': 'admin',\n//   'database_credentials_password': 'secret',\n//   'features_0': 'auth',\n//   'features_1': 'logging',\n//   'debug': true\n// }\n```\n\n也能适当处理空对象和特殊情况。\n\n```typescript\n// 空对象或数组\nconst emptyCase = {\n  empty: {},\n  emptyArray: [],\n  nullValue: null,\n  undefinedValue: undefined,\n};\n\nconst result = flattenObject(emptyCase);\nconsole.log(result);\n// {\n//   'empty': {},\n//   'emptyArray: [],\n//   'nullValue': null,\n//   'undefinedValue': undefined\n// }\n// 空对象或空数组会作为键显示\n```\n\n#### 参数\n\n- `object` (`object`): 要扁平化的对象。\n- `options` (`FlattenObjectOptions`, 可选): 扁平化选项。\n  - `delimiter` (`string`, 可选): 用于连接嵌套键的分隔符。默认为 `'.'`。\n\n#### 返回值\n\n(`Record<string, any>`): 所有嵌套属性都已扁平化的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/invert.md",
    "content": "# invert\n\n创建一个交换对象键和值的新对象。\n\n```typescript\nconst inverted = invert(obj);\n```\n\n## 用法\n\n### `invert(obj)`\n\n当您想要创建一个交换对象键和值的新对象时,请使用 `invert`。原始对象的键成为新对象的值,原始对象的值成为新对象的键。如果存在重复值,则使用后面出现的键。\n\n```typescript\nimport { invert } from 'es-toolkit/object';\n\n// 基本用法\nconst original = { a: 1, b: 2, c: 3 };\nconst inverted = invert(original);\nconsole.log(inverted); // { 1: 'a', 2: 'b', 3: 'c' }\n\n// 存在重复值的情况\nconst withDuplicates = { a: 1, b: 1, c: 2 };\nconst result = invert(withDuplicates);\nconsole.log(result); // { 1: 'b', 2: 'c' } (后面出现的 'b' 用作键 1 的值)\n\n// 字符串键和数字值\nconst grades = { alice: 85, bob: 92, charlie: 88 };\nconst invertedGrades = invert(grades);\nconsole.log(invertedGrades); // { 85: 'alice', 92: 'bob', 88: 'charlie' }\n```\n\n可以用于各种类型的键和值。\n\n```typescript\n// 数字键和字符串值\nconst statusCodes = { 200: 'OK', 404: 'Not Found', 500: 'Internal Server Error' };\nconst invertedCodes = invert(statusCodes);\nconsole.log(invertedCodes);\n// { 'OK': '200', 'Not Found': '404', 'Internal Server Error': '500' }\n\n// 需要反向查找时很有用\nconst userRoles = { admin: 'administrator', user: 'regular_user', guest: 'visitor' };\nconst roleToKey = invert(userRoles);\nconsole.log(roleToKey);\n// { 'administrator': 'admin', 'regular_user': 'user', 'visitor': 'guest' }\n\n// 现在可以通过值查找键\nfunction findRoleKey(roleName: string) {\n  return roleToKey[roleName];\n}\nconsole.log(findRoleKey('administrator')); // 'admin'\n```\n\n与枚举(Enum)或常量对象一起使用很有用。\n\n```typescript\n// 颜色代码映射\nconst colorCodes = {\n  red: '#FF0000',\n  green: '#00FF00',\n  blue: '#0000FF',\n};\n\nconst codeToColor = invert(colorCodes);\nconsole.log(codeToColor);\n// { '#FF0000': 'red', '#00FF00': 'green', '#0000FF': 'blue' }\n\n// 现在可以通过颜色代码查找颜色名称\nfunction getColorName(code: string) {\n  return codeToColor[code] || 'unknown';\n}\nconsole.log(getColorName('#FF0000')); // 'red'\n```\n\n#### 参数\n\n- `obj` (`Record<K, V>`): 要交换键和值的对象。键和值都必须是字符串、数字或 symbol。\n\n#### 返回值\n\n(`Record<V, K>`): 原始对象的键和值已交换的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/mapKeys.md",
    "content": "# mapKeys\n\n返回一个通过函数转换对象键的新对象。\n\n```typescript\nconst newObj = mapKeys(object, getNewKey);\n```\n\n## 用法\n\n### `mapKeys(object, getNewKey)`\n\n当您想要转换对象的每个键以创建新对象时,请使用 `mapKeys`。值保持不变,只有键根据 `getNewKey` 函数的结果改变。\n\n```typescript\nimport { mapKeys } from 'es-toolkit/object';\n\n// 为键添加前缀\nconst obj = { a: 1, b: 2 };\nconst prefixed = mapKeys(obj, (value, key) => `prefix_${key}`);\n// prefixed 是 { prefix_a: 1, prefix_b: 2 }\n\n// 结合键和值创建新键\nconst combined = mapKeys(obj, (value, key) => `${key}${value}`);\n// combined 是 { a1: 1, b2: 2 }\n\n// 将键转换为大写\nconst uppercased = mapKeys(obj, (value, key) => key.toString().toUpperCase());\n// uppercased 是 { A: 1, B: 2 }\n```\n\n#### 参数\n\n- `object` (`T extends Record<PropertyKey, any>`): 要转换键的对象。\n- `getNewKey` (`(value: T[keyof T], key: keyof T, object: T) => K`): 生成新键的函数。接收值、键和整个对象作为参数。\n\n#### 返回值\n\n(`Record<K, T[keyof T]>`): 返回键已转换的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/mapValues.md",
    "content": "# mapValues\n\n返回一个通过函数转换对象值的新对象。\n\n```typescript\nconst newObj = mapValues(object, getNewValue);\n```\n\n## 用法\n\n### `mapValues(object, getNewValue)`\n\n当您想要转换对象的每个值以创建新对象时,请使用 `mapValues`。键保持不变,只有值根据 `getNewValue` 函数的结果改变。\n\n```typescript\nimport { mapValues } from 'es-toolkit/object';\n\n// 将所有值加倍\nconst numbers = { a: 1, b: 2, c: 3 };\nconst doubled = mapValues(numbers, value => value * 2);\n// doubled 是 { a: 2, b: 4, c: 6 }\n\n// 将字符串值转换为大写\nconst strings = { first: 'hello', second: 'world' };\nconst uppercased = mapValues(strings, value => value.toUpperCase());\n// uppercased 是 { first: 'HELLO', second: 'WORLD' }\n\n// 同时使用键和值\nconst scores = { alice: 85, bob: 90, charlie: 95 };\nconst grades = mapValues(scores, (value, key) => `${key}: ${value >= 90 ? 'A' : 'B'}`);\n// grades 是 { alice: 'alice: B', bob: 'bob: A', charlie: 'charlie: A' }\n```\n\n#### 参数\n\n- `object` (`T extends object`): 要转换值的对象。\n- `getNewValue` (`(value: T[K], key: K, object: T) => V`): 生成新值的函数。接收值、键和整个对象作为参数。\n\n#### 返回值\n\n(`Record<K, V>`): 返回值已转换的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/merge.md",
    "content": "# merge\n\n将源对象深度合并到目标对象中并修改目标对象。\n\n```typescript\nconst result = merge(target, source);\n```\n\n## 用法\n\n### `merge(target, source)`\n\n当您想要深度合并两个对象时,请使用 `merge`。嵌套的对象和数组也会递归合并。与 [toMerged](./toMerged.md) 不同,它会修改原始 `target` 对象。\n\n```typescript\nimport { merge } from 'es-toolkit/object';\n\n// 基本对象合并\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\n// result 和 target 都是 { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\n// 数组也会被合并\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nmerge(arrayTarget, arraySource);\n// arrayTarget 是 { a: [3, 2], b: { x: 1, y: 2 } }\n\n// null 值也会被适当处理\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nmerge(nullTarget, nullSource);\n// nullTarget 是 { a: [1, 2, 3] }\n```\n\n`undefined` 值不会覆盖现有值。\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nmerge(target, source);\n// target 是 { a: 1, b: 2, c: 3 } (b 未被覆盖)\n```\n\n#### 参数\n\n- `target` (`T extends Record<PropertyKey, any>`): 要合并源对象的目标对象。此对象会被修改。\n- `source` (`S extends Record<PropertyKey, any>`): 要合并到目标对象的源对象。\n\n#### 返回值\n\n(`T & S`): 返回已合并源对象的目标对象。\n\n## 示例\n\n```typescript\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n// 返回值: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n\nconst target = { a: [1, 2], b: { x: 1 } };\nconst source = { a: [3], b: { y: 2 } };\nconst result = merge(target, source);\nconsole.log(result);\n// 返回值: { a: [3, 2], b: { x: 1, y: 2 } }\n\nconst target = { a: null };\nconst source = { a: [1, 2, 3] };\nconst result = merge(target, source);\nconsole.log(result);\n// 返回值: { a: [1, 2, 3] }\n```\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { merge } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = merge(target, source);\nconsole.log(result);\n```\n\n:::\n\n## 性能对比\n\n|                   | [包大小](../../bundle-size.md) | [性能](../../performance.md) |\n| ----------------- | ------------------------------ | ---------------------------- |\n| es-toolkit        | 271 字节 (小 97.8%)            | 1,952,436 次 (快 3.65×)      |\n| es-toolkit/compat | 4,381 字节 (小 64.9%)          | 706,558 次 (快 1.32×)        |\n| lodash-es         | 12,483 字节                    | 533,484 次                   |\n"
  },
  {
    "path": "docs/zh_hans/reference/object/mergeWith.md",
    "content": "# mergeWith\n\n使用自定义合并函数将源对象深度合并到目标对象中并修改目标对象。\n\n```typescript\nconst result = mergeWith(target, source, mergeFunction);\n```\n\n## 用法\n\n### `mergeWith(target, source, merge)`\n\n当您想要合并两个对象并对每个属性应用自定义合并逻辑时,请使用 `mergeWith`。如果合并函数返回 `undefined`,则使用默认的深度合并逻辑。\n\n```typescript\nimport { mergeWith } from 'es-toolkit/object';\n\n// 将数字值相加合并\nconst target = { a: 1, b: 2, c: { x: 10 } };\nconst source = { b: 3, c: { x: 20, y: 30 }, d: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue, key) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue; // 数字相加\n  }\n  // 返回 undefined 则使用默认合并逻辑\n});\n// result 和 target 都是 { a: 1, b: 5, c: { x: 30, y: 30 }, d: 4 }\n\n// 连接数组合并\nconst arrayTarget = { items: [1, 2], metadata: { count: 2 } };\nconst arraySource = { items: [3, 4], metadata: { count: 2 } };\n\nmergeWith(arrayTarget, arraySource, (targetValue, sourceValue) => {\n  if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n    return targetValue.concat(sourceValue);\n  }\n});\n// arrayTarget 是 { items: [1, 2, 3, 4], metadata: { count: 2 } }\n\n// 根据键应用不同的合并逻辑\nconst config = { timeout: 1000, retries: 3, features: { featureA: true } };\nconst updates = { timeout: 2000, retries: 5, features: { featureB: false } };\n\nmergeWith(config, updates, (targetValue, sourceValue, key) => {\n  if (key === 'timeout') {\n    return Math.max(targetValue, sourceValue); // timeout 选择较大值\n  }\n  if (key === 'retries') {\n    return Math.min(targetValue, sourceValue); // retries 选择较小值\n  }\n  // 其他属性使用默认合并逻辑\n});\n// config 是 { timeout: 2000, retries: 3, features: { featureA: true, featureB: false } }\n```\n\n#### 参数\n\n- `target` (`T extends Record<PropertyKey, any>`): 要合并源对象的目标对象。此对象会被修改。\n- `source` (`S extends Record<PropertyKey, any>`): 要合并到目标对象的源对象。\n- `merge` (`(targetValue: any, sourceValue: any, key: string, target: T, source: S) => any`): 自定义合并函数。\n  - `targetValue`: 目标对象的当前值\n  - `sourceValue`: 源对象的值\n  - `key`: 正在合并的属性的键\n  - `target`: 目标对象\n  - `source`: 源对象\n\n#### 返回值\n\n(`T & S`): 返回已合并源对象的目标对象。\n\n## 示例\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nmergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\n// 返回值: { a: 1, b: 5, c: 4 }\n\nconst target = { a: [1], b: [2] };\nconst source = { a: [3], b: [4] };\n\nconst result = mergeWith(target, source, (objValue, srcValue) => {\n  if (Array.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n});\n// 返回值: { a: [1, 3], b: [2, 4] })\n```\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { mergeWith } from 'es-toolkit';\n\nconst target = { a: 1, b: 2 };\nconst source = { b: 3, c: 4 };\n\nconst result = mergeWith(target, source, (targetValue, sourceValue) => {\n  if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n    return targetValue + sourceValue;\n  }\n});\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/zh_hans/reference/object/omit.md",
    "content": "# omit\n\n返回一个排除指定键的新对象。\n\n```typescript\nconst result = omit(obj, keys);\n```\n\n## 用法\n\n### `omit(obj, keys)`\n\n当您想要从对象中排除特定键时使用 `omit`。它返回一个新对象,其中删除了与指定键对应的属性。\n\n```typescript\nimport { omit } from 'es-toolkit/object';\n\n// 排除特定键\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = omit(obj, ['b', 'c']);\n// result 是 { a: 1, d: 4 }\n\n// 指定不存在的键不会导致错误\nconst safe = omit(obj, ['b', 'nonexistent']);\n// safe 是 { a: 1, c: 3, d: 4 }\n```\n\n#### 参数\n\n- `obj` (`T extends Record<string, any>`):要排除键的对象。\n- `keys` (`readonly K[]`):要从对象中排除的键的数组。\n\n#### 返回值\n\n(`Omit<T, K>`):排除了指定键的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/omitBy.md",
    "content": "# omitBy\n\n返回一个排除满足条件函数的属性的新对象。\n\n```typescript\nconst result = omitBy(obj, shouldOmit);\n```\n\n## 用法\n\n### `omitBy(obj, shouldOmit)`\n\n当您想基于条件函数选择性地排除对象的属性时,请使用 `omitBy`。它返回一个新对象,该对象仅包含条件函数返回 `false` 的属性,排除返回 `true` 的属性。\n\n```typescript\nimport { omitBy } from 'es-toolkit/object';\n\n// 排除具有字符串值的属性\nconst obj = { a: 1, b: 'remove', c: 3, d: 'also remove' };\nconst result = omitBy(obj, value => typeof value === 'string');\n// result 是 { a: 1, c: 3 }\n\n// 仅排除偶数值\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst odds = omitBy(numbers, value => value % 2 === 0);\n// odds 是 { a: 1, c: 3 }\n\n// 同时使用键和值\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst nonAdmins = omitBy(data, (value, key) => key.startsWith('admin'));\n// nonAdmins 是 { user1: 25, user2: 17 }\n```\n\n#### 参数\n\n- `obj` (`T extends Record<string, any>`): 要过滤属性的对象。\n- `shouldOmit` (`(value: T[keyof T], key: keyof T) => boolean`): 决定是否排除属性的条件函数。接收值和键,返回 `true` 表示排除,返回 `false` 表示保留。\n\n#### 返回值\n\n(`Partial<T>`): 返回一个由不满足条件函数的属性组成的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/pick.md",
    "content": "# pick\n\n返回一个仅包含指定键对应属性的新对象。\n\n```typescript\nconst result = pick(obj, keys);\n```\n\n## 用法\n\n### `pick(obj, keys)`\n\n当您想从对象中仅选择特定键对应的属性时,请使用 `pick`。它返回一个仅包含指定键对应属性的新对象。\n\n```typescript\nimport { pick } from 'es-toolkit/object';\n\n// 仅选择特定键\nconst obj = { a: 1, b: 2, c: 3, d: 4 };\nconst result = pick(obj, ['a', 'c']);\n// result 是 { a: 1, c: 3 }\n\n// 即使指定不存在的键也会被忽略\nconst safe = pick(obj, ['a', 'nonexistent']);\n// safe 是 { a: 1 }\n\n// 也可以用于嵌套对象\nconst nested = {\n  user: { name: 'John', age: 30 },\n  posts: ['post1', 'post2'],\n  settings: { theme: 'dark' },\n};\nconst picked = pick(nested, ['user', 'settings']);\n// picked 是 { user: { name: 'John', age: 30 }, settings: { theme: 'dark' } }\n```\n\n#### 参数\n\n- `obj` (`T extends Record<string, any>`): 要选择属性的对象。\n- `keys` (`readonly K[]`): 要从对象中选择的键的数组。\n\n#### 返回值\n\n(`Pick<T, K>`): 返回一个仅包含指定键对应属性的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/pickBy.md",
    "content": "# pickBy\n\n返回一个仅包含满足条件函数的属性的新对象。\n\n```typescript\nconst result = pickBy(obj, shouldPick);\n```\n\n## 用法\n\n### `pickBy(obj, shouldPick)`\n\n当您想基于条件函数选择性地选择对象的属性时,请使用 `pickBy`。它返回一个仅包含条件函数返回 `true` 的属性的新对象。\n\n```typescript\nimport { pickBy } from 'es-toolkit/object';\n\n// 仅选择具有字符串值的属性\nconst obj = { a: 1, b: 'select', c: 3, d: 'also select' };\nconst result = pickBy(obj, value => typeof value === 'string');\n// result 是 { b: 'select', d: 'also select' }\n\n// 仅选择偶数值\nconst numbers = { a: 1, b: 2, c: 3, d: 4 };\nconst evens = pickBy(numbers, value => value % 2 === 0);\n// evens 是 { b: 2, d: 4 }\n\n// 同时使用键和值\nconst data = { user1: 25, user2: 17, admin1: 30, admin2: 28 };\nconst admins = pickBy(data, (value, key) => key.startsWith('admin') && value > 25);\n// admins 是 { admin1: 30, admin2: 28 }\n```\n\n#### 参数\n\n- `obj` (`T extends Record<string, any>`): 要过滤属性的对象。\n- `shouldPick` (`(value: T[keyof T], key: keyof T) => boolean`): 决定是否选择属性的条件函数。接收值和键,返回 `true` 表示选择,返回 `false` 表示排除。\n\n#### 返回值\n\n(`Partial<T>`): 返回一个仅包含满足条件函数的属性的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/toCamelCaseKeys.md",
    "content": "# toCamelCaseKeys\n\n返回一个将对象和数组的所有键转换为驼峰命名法的新对象。\n\n驼峰命名法是一种将多个单词组成的标识符的首个单词小写,后续单词首字母大写的命名规范。例如 `camelCase`。\n\n```typescript\nconst camelCased = toCamelCaseKeys(obj);\n```\n\n## 用法\n\n### `toCamelCaseKeys(obj)`\n\n当您想要将对象的所有键转换为驼峰命名法时,请使用 `toCamelCaseKeys`。嵌套对象和数组中的对象也会递归转换。\n\n例如，对象的键会按如下方式转换：\n\n- `snake_case` → `camelCase`（例如 `user_id` → `userId`）\n- `PascalCase` → `camelCase`（例如 `UserId` → `userId`）\n- `uppercase keys` → `camelCase`（例如 `FIRST_NAME` → `firstName`, `LAST` → `last`）\n\n```typescript\nimport { toCamelCaseKeys } from 'es-toolkit/object';\n\n// 基本对象转换\nconst obj = { user_id: 1, first_name: 'John', last_name: 'Doe' };\nconst result = toCamelCaseKeys(obj);\n// result 是 { userId: 1, firstName: 'John', lastName: 'Doe' }\n\n// 数组中的对象也会转换\nconst users = [\n  { user_id: 1, first_name: 'John' },\n  { user_id: 2, first_name: 'Jane' },\n];\nconst convertedUsers = toCamelCaseKeys(users);\n// convertedUsers 是 [{ userId: 1, firstName: 'John' }, { userId: 2, firstName: 'Jane' }]\n\n// 嵌套对象也会完全转换\nconst nested = {\n  user_data: {\n    user_id: 1,\n    contact_info: {\n      email_address: 'john@example.com',\n      phone_number: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toCamelCaseKeys(nested);\n// nestedResult 是 {\n//   userData: {\n//     userId: 1,\n//     contactInfo: {\n//       emailAddress: 'john@example.com',\n//       phoneNumber: '123-456-7890'\n//     }\n//   }\n// }\n\n// PascalCase 和 uppercase keys 的键也会被转换\nconst raw = { UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' };\nconst converted = toCamelCaseKeys(raw);\n// converted 是 { userId: 1, firstName: 'JinHo', last: 'Yeom' }\n```\n\n#### 参数\n\n- `obj` (`T`): 要将键转换为 camelCase 的对象、数组或原始值。\n\n#### 返回值\n\n(`ToCamelCaseKeys<T>`): 返回所有键都已转换为 camelCase 的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/object/toMerged.md",
    "content": "# toMerged\n\n返回将源对象深度合并到目标对象副本的新对象。\n\n```typescript\nconst result = toMerged(target, source);\n```\n\n## 用法\n\n### `toMerged(target, source)`\n\n当您想要深度合并两个对象但不想修改原始对象时,请使用 `toMerged`。与 [merge](./merge.md) 不同,它不会修改原始 `target` 对象,而是返回一个新对象。\n\n```typescript\nimport { toMerged } from 'es-toolkit/object';\n\n// 基本对象合并\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\n// result 是 { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n// target 保持为 { a: 1, b: { x: 1, y: 2 } }\n\n// 数组也会被合并\nconst arrayTarget = { a: [1, 2], b: { x: 1 } };\nconst arraySource = { a: [3], b: { y: 2 } };\nconst arrayResult = toMerged(arrayTarget, arraySource);\n// arrayResult 是 { a: [3, 2], b: { x: 1, y: 2 } }\n// arrayTarget 未被修改\n\n// null 值也会被适当处理\nconst nullTarget = { a: null };\nconst nullSource = { a: [1, 2, 3] };\nconst nullResult = toMerged(nullTarget, nullSource);\n// nullResult 是 { a: [1, 2, 3] }\n```\n\n`undefined` 值不会覆盖现有值。\n\n```typescript\nconst target = { a: 1, b: 2 };\nconst source = { b: undefined, c: 3 };\nconst result = toMerged(target, source);\n// result 是 { a: 1, b: 2, c: 3 } (b 未被覆盖)\n```\n\n#### 参数\n\n- `target` (`T extends Record<PropertyKey, any>`): 将被合并的目标对象。此对象不会被修改。\n- `source` (`S extends Record<PropertyKey, any>`): 要合并到目标对象的源对象。\n\n#### 返回值\n\n(`T & S`): 返回目标对象和源对象合并后的新对象。\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { toMerged } from 'es-toolkit';\n\nconst target = { a: 1, b: { x: 1, y: 2 } };\nconst source = { b: { y: 3, z: 4 }, c: 5 };\nconst result = toMerged(target, source);\nconsole.log(result);\n```\n\n:::\n"
  },
  {
    "path": "docs/zh_hans/reference/object/toSnakeCaseKeys.md",
    "content": "# toSnakeCaseKeys\n\n返回一个将对象和数组的所有键转换为蛇形命名法的新对象。\n\n蛇形命名法是一种将多个单词组成的标识符中每个单词小写,并用下划线(`_`)连接的命名规范。例如 `snake_case`。\n\n```typescript\nconst snakeCased = toSnakeCaseKeys(obj);\n```\n\n## 用法\n\n### `toSnakeCaseKeys(obj)`\n\n当您想要将对象的所有键转换为 snake_case 时,请使用 `toSnakeCaseKeys`。嵌套对象和数组中的对象也会递归转换。\n\n例如，对象的键会按如下方式转换：\n\n- `camelCase` → `snake_case`（例如 `userId` → `user_id`）\n- `PascalCase` → `snake_case`（例如 `UserId` → `user_id`）\n- `UPPERCASE_KEYS` → `snake_case`（例如 `FIRST_NAME` → `first_name`, `LAST` → `last`）\n\n```typescript\nimport { toSnakeCaseKeys } from 'es-toolkit/object';\n\n// 基本对象转换\nconst obj = { userId: 1, firstName: 'John', lastName: 'Doe' };\nconst result = toSnakeCaseKeys(obj);\n// result 是 { user_id: 1, first_name: 'John', last_name: 'Doe' }\n\n// 数组中的对象也会转换\nconst users = [\n  { userId: 1, firstName: 'John' },\n  { userId: 2, firstName: 'Jane' },\n];\nconst convertedUsers = toSnakeCaseKeys(users);\n// convertedUsers 是 [{ user_id: 1, first_name: 'John' }, { user_id: 2, first_name: 'Jane' }]\n\n// 嵌套对象也会完全转换\nconst nested = {\n  userData: {\n    userId: 1,\n    contactInfo: {\n      emailAddress: 'john@example.com',\n      phoneNumber: '123-456-7890',\n    },\n  },\n};\nconst nestedResult = toSnakeCaseKeys(nested);\n// nestedResult 是 {\n//   user_data: {\n//     user_id: 1,\n//     contact_info: {\n//       email_address: 'john@example.com',\n//       phone_number: '123-456-7890'\n//     }\n//   }\n// }\n```\n\n#### 参数\n\n- `obj` (`T`): 要将键转换为 snake_case 的对象、数组或原始值。\n\n#### 返回值\n\n(`ToSnakeCaseKeys<T>`): 返回所有键都已转换为 snake_case 的新对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isArrayBuffer.md",
    "content": "# isArrayBuffer\n\n检查给定值是否为 `ArrayBuffer` 实例。\n\n```typescript\nconst result = isArrayBuffer(value);\n```\n\n## 用法\n\n### `isArrayBuffer(value)`\n\n当您想确认某个值是否为 `ArrayBuffer` 时，请使用 `isArrayBuffer`。它可以在 TypeScript 中作为类型守卫使用。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// ArrayBuffer 实例确认\nconst buffer = new ArrayBuffer(16);\nconst notBuffer = new Array(16);\n\nconsole.log(isArrayBuffer(buffer)); // true\nconsole.log(isArrayBuffer(notBuffer)); // false\n\n// 在处理二进制数据时很有用\nconst data: unknown = getDataFromAPI();\nif (isArrayBuffer(data)) {\n  // 在 TypeScript 中，data 类型被缩小为 ArrayBuffer\n  const uint8View = new Uint8Array(data);\n  console.log(`Buffer size: ${data.byteLength} bytes`);\n}\n\n// 与各种类型比较\nconsole.log(isArrayBuffer(new ArrayBuffer(8))); // true\nconsole.log(isArrayBuffer(new Uint8Array(8))); // false\nconsole.log(isArrayBuffer(new DataView(new ArrayBuffer(8)))); // false\nconsole.log(isArrayBuffer([])); // false\nconsole.log(isArrayBuffer({})); // false\nconsole.log(isArrayBuffer(null)); // false\nconsole.log(isArrayBuffer(undefined)); // false\n```\n\n在文件处理或网络通信中经常使用。\n\n```typescript\nimport { isArrayBuffer } from 'es-toolkit/predicate';\n\n// 处理文件读取结果\nasync function processFileData(file: File) {\n  const result = await file.arrayBuffer();\n\n  if (isArrayBuffer(result)) {\n    console.log(`文件大小：${result.byteLength} 字节`);\n\n    // 处理二进制数据\n    const view = new DataView(result);\n    const header = view.getUint32(0, true);\n    console.log(`文件头：${header.toString(16)}`);\n  }\n}\n\n// 检查从 WebSocket 接收的数据\nfunction handleWebSocketMessage(data: unknown) {\n  if (isArrayBuffer(data)) {\n    console.log('收到二进制消息');\n    const bytes = new Uint8Array(data);\n    // 处理字节数据\n  } else if (typeof data === 'string') {\n    console.log('收到文本消息');\n    // 处理字符串数据\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 `ArrayBuffer` 的值。\n\n#### 返回值\n\n(`value is ArrayBuffer`): 如果值为 `ArrayBuffer` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isBlob.md",
    "content": "# isBlob\n\n检查给定值是否为 Blob 实例。\n\n```typescript\nconst result = isBlob(value);\n```\n\n## 用法\n\n### `isBlob(value)`\n\n当您想确认某个值是否为 Blob 实例时，请使用 `isBlob`。在浏览器环境中处理文件或二进制数据时很有用。\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// 基本 Blob 实例\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconst file = new File(['content'], 'example.txt', { type: 'text/plain' });\n\nconsole.log(isBlob(blob)); // true\nconsole.log(isBlob(file)); // true (File 继承自 Blob)\n\n// 非 Blob 值\nconsole.log(isBlob(new ArrayBuffer(8))); // false\nconsole.log(isBlob('text data')); // false\nconsole.log(isBlob({})); // false\nconsole.log(isBlob(null)); // false\n```\n\n在文件处理或 API 响应验证中很有用。\n\n```typescript\nimport { isBlob } from 'es-toolkit/predicate';\n\n// 处理上传的文件\nfunction processUploadedFile(file: unknown) {\n  if (isBlob(file)) {\n    // TypeScript 将 file 推断为 Blob\n    console.log(`文件大小：${file.size} 字节`);\n    console.log(`MIME 类型：${file.type}`);\n\n    // 安全地使用 Blob 方法\n    file.text().then(text => console.log('内容:', text));\n  } else {\n    console.log('无效的文件');\n  }\n}\n\n// 实现下载功能\nasync function handleDownload(data: unknown, filename: string) {\n  if (isBlob(data)) {\n    const url = URL.createObjectURL(data);\n    const link = document.createElement('a');\n    link.href = url;\n    link.download = filename;\n    link.click();\n    URL.revokeObjectURL(url);\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Blob 实例的值。\n\n#### 返回值\n\n(`value is Blob`): 如果值为 Blob 实例则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isBoolean.md",
    "content": "# isBoolean\n\n检查给定值是否为布尔类型。\n\n```typescript\nconst result = isBoolean(value);\n```\n\n## 用法\n\n### `isBoolean(value)`\n\n当您想确认某个值是否为 `true` 或 `false` 时，请使用 `isBoolean`。在 TypeScript 中作为类型守卫工作，将值的类型缩小为 `boolean`。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// 基本布尔值确认\nisBoolean(true); // true\nisBoolean(false); // true\n\n// 与其他类型区分\nisBoolean(1); // false\nisBoolean(0); // false\nisBoolean('true'); // false\nisBoolean('false'); // false\n```\n\n在 TypeScript 中作为类型守卫使用时特别有用。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\nfunction processValue(value: unknown) {\n  if (isBoolean(value)) {\n    // value 类型被缩小为 boolean\n    console.log(value ? '是真' : '是假');\n  } else {\n    console.log('不是布尔值');\n  }\n}\n```\n\n也可以用于 API 响应或用户输入验证。\n\n```typescript\nimport { isBoolean } from 'es-toolkit/predicate';\n\n// API 响应验证\ninterface APIResponse {\n  success: unknown;\n  data: any;\n}\n\nfunction validateResponse(response: APIResponse) {\n  if (isBoolean(response.success)) {\n    console.log(`API 调用${response.success ? '成功' : '失败'}`);\n    return response.success;\n  }\n  console.log('错误的响应格式');\n  return false;\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为布尔类型的值。\n\n#### 返回值\n\n(`value is boolean`): 如果值为 `true` 或 `false` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isBrowser.md",
    "content": "# isBrowser\n\n检查当前执行环境是否为浏览器。\n\n```typescript\nconst result = isBrowser();\n```\n\n## 用法\n\n### `isBrowser()`\n\n当有需要仅在浏览器环境中执行的代码时，请使用 `isBrowser`。它通过检查 `window.document` 的存在来判断是否为浏览器环境。在 SSR（服务端渲染）或 Node.js 环境中很有用。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\n// 仅在浏览器环境中操作 DOM\nif (isBrowser()) {\n  document.getElementById('app').innerHTML = 'Hello World';\n  console.log('在浏览器环境中运行');\n} else {\n  console.log('在服务器环境中运行');\n}\n```\n\n可以用于实现基于环境的条件逻辑。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction getWindowWidth() {\n  if (isBrowser()) {\n    return window.innerWidth;\n  }\n  return 0; // 在服务器端返回默认值\n}\n\n// 注册事件监听器\nfunction addWindowListener() {\n  if (isBrowser()) {\n    window.addEventListener('resize', () => {\n      console.log('窗口大小已改变');\n    });\n  }\n}\n```\n\n在 Next.js、Nuxt.js 等 SSR 框架中特别有用。\n\n```typescript\nimport { isBrowser } from 'es-toolkit/predicate';\n\nfunction initializeAnalytics() {\n  if (isBrowser()) {\n    // 仅在浏览器中加载分析脚本\n    const script = document.createElement('script');\n    script.src = 'https://analytics.example.com/script.js';\n    document.head.appendChild(script);\n  }\n}\n\n// 访问本地存储\nfunction getStoredValue(key: string) {\n  if (isBrowser()) {\n    return localStorage.getItem(key);\n  }\n  return null;\n}\n```\n\n#### 返回值\n\n(`boolean`): 如果当前环境为浏览器则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isBuffer.md",
    "content": "# isBuffer\n\n检查给定值是否为 Buffer 实例。\n\n```typescript\nconst result = isBuffer(value);\n```\n\n## 用法\n\n### `isBuffer(value)`\n\n在 Node.js 环境中想确认某个值是否为 Buffer 对象时，请使用 `isBuffer`。在文件处理、网络通信、二进制数据操作时很有用。在 TypeScript 中作为类型守卫工作，将值的类型缩小为 `Buffer`。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// Buffer 实例确认\nconst buffer = Buffer.from('hello world', 'utf8');\nisBuffer(buffer); // true\n\n// 与其他类型区分\nisBuffer('hello world'); // false\nisBuffer(new Uint8Array([1, 2, 3])); // false\nisBuffer(new ArrayBuffer(8)); // false\n```\n\n在 TypeScript 中作为类型守卫使用时特别有用。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\nfunction processData(data: unknown) {\n  if (isBuffer(data)) {\n    // data 类型被缩小为 Buffer\n    console.log(`Buffer 大小：${data.length} 字节`);\n    console.log(`Buffer 内容：${data.toString('utf8')}`);\n\n    // 可以安全地使用 Buffer 方法\n    const slice = data.slice(0, 10);\n  }\n}\n```\n\n在文件处理或网络通信中经常使用。\n\n```typescript\nimport { isBuffer } from 'es-toolkit/predicate';\n\n// 处理文件数据\nfunction readFileData(data: unknown) {\n  if (isBuffer(data)) {\n    const text = data.toString('utf8');\n    const header = data.readUInt32BE(0);\n    console.log('文件内容:', text);\n  }\n}\n\n// 处理网络数据\nfunction handleNetworkData(chunk: unknown) {\n  if (isBuffer(chunk)) {\n    console.log(`接收数据大小：${chunk.length} 字节`);\n    const processed = Buffer.concat([chunk, Buffer.from('\\n')]);\n    return processed;\n  }\n  return null;\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Buffer 实例的值。\n\n#### 返回值\n\n(`boolean`): 如果值为 Buffer 实例则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isDate.md",
    "content": "# isDate\n\n检查给定值是否为 Date 对象。\n\n```typescript\nconst result = isDate(value);\n```\n\n## 用法\n\n### `isDate(value)`\n\n当您想确认某个值是否为日期对象时，请使用 `isDate`。在区分字符串或数字形式的日期表示与 Date 对象时很有用。在 TypeScript 中作为类型守卫工作，将值的类型缩小为 `Date`。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// Date 对象确认\nconst date = new Date();\nisDate(date); // true\n\n// 与其他类型区分\nisDate('2024-01-01'); // false - 字符串\nisDate(1640995200000); // false - 时间戳\nisDate({}); // false\n```\n\n在 TypeScript 中作为类型守卫使用时特别有用。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\nfunction formatDate(value: unknown): string {\n  if (isDate(value)) {\n    // value 类型被缩小为 Date\n    return value.toISOString();\n  }\n  return '无效日期';\n}\n```\n\n可以用于 API 响应处理或用户输入验证。\n\n```typescript\nimport { isDate } from 'es-toolkit/predicate';\n\n// API 响应处理\nfunction processResponse(response: { createdAt: unknown }) {\n  if (isDate(response.createdAt)) {\n    console.log(`创建时间：${response.createdAt.toLocaleDateString()}`);\n  }\n}\n\n// 日期有效性验证\nfunction validateBirthDate(value: unknown): boolean {\n  if (isDate(value)) {\n    const now = new Date();\n    const minAge = new Date(now.getFullYear() - 150, now.getMonth(), now.getDate());\n\n    return value <= now && value >= minAge;\n  }\n  return false;\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Date 对象的值。\n\n#### 返回值\n\n(`value is Date`): 如果值为 Date 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isEmptyObject.md",
    "content": "# isEmptyObject\n\n检查是否为没有任何属性的纯对象(`{}`)。\n\n```typescript\nconst result = isEmptyObject(value);\n```\n\n## 用法\n\n### `isEmptyObject(value)`\n\n当您想检查是否为像 `{}` 一样没有任何属性的纯对象时使用 `isEmptyObject`。对于数组、Map、Set 等其他对象类型返回 `false`。\n\n```typescript\nimport { isEmptyObject } from 'es-toolkit';\n\n// 没有属性的纯对象\nisEmptyObject({}); // true\nisEmptyObject(new Object()); // true\nisEmptyObject(Object.create(null)); // true\n\n// 有属性的对象\nisEmptyObject({ a: 1 }); // false\nisEmptyObject({ key: 'value' }); // false\n\n// 非纯对象类型\nisEmptyObject([]); // false (数组)\nisEmptyObject(null); // false\nisEmptyObject(new Map()); // false\nisEmptyObject(new Set()); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查的值。\n\n#### 返回值\n\n(`value is Record<PropertyKey, never>`): 如果是没有属性的纯对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isEqual.md",
    "content": "# isEqual\n\n检查两个值是否深度相等。\n\n```typescript\nconst result = isEqual(a, b);\n```\n\n## 用法\n\n### `isEqual(a, b)`\n\n当您想检查包括对象、数组、Date、RegExp 等在内的两个值是否深度相等时，请使用 `isEqual`。即使引用不同，只要内容相同就返回 `true`。在单元测试或数据比较时很有用。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 原始类型比较\nisEqual(1, 1); // true\nisEqual('hello', 'hello'); // true\nisEqual(true, true); // true\n\n// 特殊值处理\nisEqual(NaN, NaN); // true\nisEqual(+0, -0); // true\n```\n\n支持对象和数组的深度比较。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 深度对象比较\nconst obj1 = { a: 1, b: { c: 2, d: [3, 4] } };\nconst obj2 = { a: 1, b: { c: 2, d: [3, 4] } };\nisEqual(obj1, obj2); // true\n\n// 数组比较\nconst arr1 = [1, 2, [3, 4]];\nconst arr2 = [1, 2, [3, 4]];\nisEqual(arr1, arr2); // true\n```\n\n可以比较 Date、RegExp、Map、Set 等对象。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\n// 日期比较\nconst date1 = new Date('2020-01-01');\nconst date2 = new Date('2020-01-01');\nisEqual(date1, date2); // true\n\n// 正则表达式比较\nconst regex1 = /hello/g;\nconst regex2 = /hello/g;\nisEqual(regex1, regex2); // true\n\n// Map 和 Set 比较\nconst map1 = new Map([['key', 'value']]);\nconst map2 = new Map([['key', 'value']]);\nisEqual(map1, map2); // true\n\nconst set1 = new Set([1, 2, 3]);\nconst set2 = new Set([1, 2, 3]);\nisEqual(set1, set2); // true\n```\n\n在单元测试中经常使用。\n\n```typescript\nimport { isEqual } from 'es-toolkit/predicate';\n\nfunction testApiResponse() {\n  const expected = { status: 200, data: { message: 'success' } };\n  const actual = { status: 200, data: { message: 'success' } };\n\n  if (isEqual(expected, actual)) {\n    console.log('测试通过！');\n  } else {\n    console.log('测试失败！');\n  }\n}\n```\n\n#### 参数\n\n- `a` (`unknown`): 要比较的第一个值。\n- `b` (`unknown`): 要比较的第二个值。\n\n#### 返回值\n\n(`boolean`): 如果两个值深度相等则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isEqualWith.md",
    "content": "# isEqualWith\n\n使用自定义比较函数检查两个值是否相等。\n\n```typescript\nconst result = isEqualWith(a, b, areValuesEqual);\n```\n\n## 用法\n\n### `isEqualWith(a, b, areValuesEqual)`\n\n当需要特殊比较逻辑时，请使用 `isEqualWith`。如果自定义函数返回 `true` 或 `false`，则使用该结果；如果返回 `undefined`，则使用默认比较方式。对于忽略大小写、排除特定属性、近似值比较等场景很有用。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 不区分大小写的字符串比较\nconst caseInsensitiveCompare = (a, b) => {\n  if (typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n};\n\nisEqualWith('Hello', 'hello', caseInsensitiveCompare); // true\nisEqualWith({ name: 'Alice' }, { name: 'ALICE' }, caseInsensitiveCompare); // true\n```\n\n也可以用于数字的近似值比较。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 允许浮点数误差的比较\nconst approximateCompare = (a, b) => {\n  if (typeof a === 'number' && typeof b === 'number') {\n    return Math.abs(a - b) < 0.01; // 将 0.01 以下的差异视为相等\n  }\n};\n\nisEqualWith(0.1 + 0.2, 0.3, approximateCompare); // true\nisEqualWith({ price: 10.01 }, { price: 10.02 }, approximateCompare); // true\n```\n\n在想要忽略特定属性进行比较时也很有用。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\n// 忽略特定属性的比较\nconst ignoreTimestamp = (a, b, property) => {\n  if (property === 'timestamp') {\n    return true; // 将 timestamp 属性始终视为相等\n  }\n};\n\nconst obj1 = { id: 1, name: 'Test', timestamp: 1000 };\nconst obj2 = { id: 1, name: 'Test', timestamp: 2000 };\nisEqualWith(obj1, obj2, ignoreTimestamp); // true\n```\n\n也可以实现复杂的自定义比较逻辑。\n\n```typescript\nimport { isEqualWith } from 'es-toolkit/predicate';\n\nconst areValuesEqual = (a, b, property) => {\n  // 忽略 ID\n  if (property === 'id') {\n    return true;\n  }\n\n  // 不区分大小写比较名称\n  if (property === 'name' && typeof a === 'string' && typeof b === 'string') {\n    return a.toLowerCase() === b.toLowerCase();\n  }\n\n  // 对其余使用默认比较方式\n  return undefined;\n};\n\nconst user1 = { id: 1, name: 'Alice', age: 25 };\nconst user2 = { id: 999, name: 'ALICE', age: 25 };\nisEqualWith(user1, user2, areValuesEqual); // true\n```\n\n#### 参数\n\n- `a` (`unknown`): 要比较的第一个值。\n- `b` (`unknown`): 要比较的第二个值。\n- `areValuesEqual` (`(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void`): 自定义比较函数。如果返回 `true` 或 `false`，则使用该结果；如果返回 `undefined`，则使用默认比较方式。\n\n#### 返回值\n\n(`boolean`): 根据自定义标准，如果两个值相等则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isError.md",
    "content": "# isError\n\n检查给定值是否为 `Error` 对象。\n\n```typescript\nconst result = isError(value);\n```\n\n## 用法\n\n### `isError(value)`\n\n当您想确认某个值是否为 `Error` 对象时，请使用 `isError`。在 TypeScript 中作为类型守卫使用，可以将值的类型缩小为 `Error`。在 try-catch 块或 API 响应处理时特别有用。\n\n```typescript\nimport { isError } from 'es-toolkit/predicate';\n\n// Error 对象确认\nisError(new Error('Something went wrong')); // true\nisError(new TypeError('Type error')); // true\n\n// 与其他类型区分\nisError('error'); // false\nisError({ name: 'Error', message: 'Custom error' }); // false\n```\n\n在 TypeScript 中作为类型守卫使用时，值的类型会被缩小。\n\n```typescript\nfunction handleError(value: unknown) {\n  if (isError(value)) {\n    // value 类型被缩小为 Error\n    console.log(`发生错误：${value.message}`);\n    return value.name;\n  }\n  return '不是错误';\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 `Error` 对象的值。\n\n#### 返回值\n\n(`value is Error`): 如果值为 `Error` 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isFile.md",
    "content": "# isFile\n\n检查给定值是否为 File 对象。\n\n```typescript\nconst result = isFile(value);\n```\n\n## 用法\n\n### `isFile(value)`\n\n当您想确认某个值是否为 File 实例时，请使用 `isFile`。File 对象是 Web API 的一部分，表示用户上传的文件或从文件系统获取的文件。与 Blob 对象不同，它包含文件名和最后修改时间等额外信息。\n\n```typescript\nimport { isFile } from 'es-toolkit/predicate';\n\n// File 对象确认\nconst file = new File(['hello'], 'example.txt', { type: 'text/plain' });\nconsole.log(isFile(file)); // true\n\n// Blob 对象不是 File\nconst blob = new Blob(['hello'], { type: 'text/plain' });\nconsole.log(isFile(blob)); // false\n\n// 一般对象\nconsole.log(isFile({})); // false\nconsole.log(isFile([])); // false\nconsole.log(isFile('text')); // false\nconsole.log(isFile(null)); // false\nconsole.log(isFile(undefined)); // false\n```\n\n可用于验证给定参数是否为有效文件。\n\n```typescript\n// 文件上传处理器\nfunction handleFileUpload(input: unknown) {\n  if (isFile(input)) {\n    console.log(`文件名：${input.name}`);\n    console.log(`文件大小：${input.size} bytes`);\n    console.log(`文件类型：${input.type}`);\n    console.log(`最后修改：${input.lastModified}`);\n\n    // 确定是 File，可以安全访问文件相关属性\n    return input;\n  }\n\n  throw new Error('不是有效的文件');\n}\n```\n\n在不支持 `File` 的 JavaScript 执行环境中也能安全处理。\n\n```typescript\n// 在 Node.js 环境或不支持 File 的环境中也安全\nconsole.log(isFile(new Date())); // false\n\n// 在未定义 File 的环境中也不会发生错误\nif (typeof File === 'undefined') {\n  console.log(isFile({})); // false\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 File 对象的值。\n\n#### 返回值\n\n(`value is File`): 如果值为 File 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isFunction.md",
    "content": "# isFunction\n\n检查给定值是否为函数。\n\n```typescript\nconst result = isFunction(value);\n```\n\n## 用法\n\n### `isFunction(value)`\n\n当您想确认某个值是否为函数时，请使用 `isFunction`。可以检测一般函数、异步函数、生成器函数、构造函数等所有类型的函数。\n\n```typescript\nimport { isFunction } from 'es-toolkit/predicate';\n\n// 一般函数\nconsole.log(isFunction(function () {})); // true\nconsole.log(isFunction(() => {})); // true\nconsole.log(isFunction(Array.prototype.slice)); // true\n\n// 异步函数\nconsole.log(isFunction(async function () {})); // true\nconsole.log(isFunction(async () => {})); // true\n\n// 生成器函数\nconsole.log(isFunction(function* () {})); // true\n\n// 构造函数\nconsole.log(isFunction(Array)); // true\nconsole.log(isFunction(Date)); // true\nconsole.log(isFunction(RegExp)); // true\nconsole.log(isFunction(Promise)); // true\n```\n\n也能检测内置 JavaScript 函数和类：\n\n```typescript\n// 内置构造函数\nconsole.log(isFunction(Object)); // true\nconsole.log(isFunction(String)); // true\nconsole.log(isFunction(Number)); // true\nconsole.log(isFunction(Boolean)); // true\n\n// 类型数组构造函数\nconsole.log(isFunction(Int8Array)); // true\nconsole.log(isFunction(Uint8Array)); // true\nconsole.log(isFunction(Float32Array)); // true\n\n// Proxy 和 Reflect\nconsole.log(isFunction(Proxy)); // true\nconsole.log(isFunction(Reflect.get)); // true\n```\n\n与非函数值区分：\n\n```typescript\n// 不是函数的值\nconsole.log(isFunction({})); // false\nconsole.log(isFunction([])); // false\nconsole.log(isFunction('text')); // false\nconsole.log(isFunction(42)); // false\nconsole.log(isFunction(null)); // false\nconsole.log(isFunction(undefined)); // false\n\n// 看起来像函数但不是函数的值\nconsole.log(isFunction({ call: function () {} })); // false\n```\n\n在回调函数验证或动态函数调用中很有用：\n\n```typescript\n// 回调函数验证\nfunction processData(data: any[], callback?: unknown) {\n  const result = data.map(item => item * 2);\n\n  if (isFunction(callback)) {\n    // 确定 callback 是函数，可以安全调用\n    callback(result);\n  }\n\n  return result;\n}\n\n// 动态函数执行\nfunction executeIfFunction(fn: unknown, ...args: any[]) {\n  if (isFunction(fn)) {\n    return fn(...args);\n  }\n\n  console.log('给定的值不是函数');\n  return null;\n}\n\n// 在方法链中检查函数\nconst utils = {\n  data: [1, 2, 3],\n  process(fn: unknown) {\n    if (isFunction(fn)) {\n      this.data = this.data.map(fn);\n    }\n    return this;\n  },\n};\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为函数的值。\n\n#### 返回值\n\n(`value is (...args: any[]) => any`): 如果值为函数则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isJSON.md",
    "content": "# isJSON\n\n检查给定值是否为有效的 JSON 字符串。\n\n```typescript\nconst result = isJSON(value);\n```\n\n## 用法\n\n### `isJSON(value)`\n\n当您想确认某个字符串是否为有效的 JSON 格式时，请使用 `isJSON`。此函数检查字符串是否可以用 `JSON.parse()` 解析。根据 JSON 规范，有效值包括表示对象、数组、字符串、数字、布尔值、`null` 的所有字符串。\n\n```typescript\nimport { isJSON } from 'es-toolkit/predicate';\n\n// 有效的 JSON 字符串\nconsole.log(isJSON('{\"name\":\"John\",\"age\":30}')); // true\nconsole.log(isJSON('[1,2,3]')); // true\nconsole.log(isJSON('\"hello world\"')); // true\nconsole.log(isJSON('42')); // true\nconsole.log(isJSON('true')); // true\nconsole.log(isJSON('false')); // true\nconsole.log(isJSON('null')); // true\n\n// 无效的 JSON 字符串\nconsole.log(isJSON('undefined')); // false\nconsole.log(isJSON('function() {}')); // false\nconsole.log(isJSON('{name: \"John\"}')); // false (键没有引号)\nconsole.log(isJSON(\"{'name': 'John'}\")); // false (使用单引号)\nconsole.log(isJSON('{}')); // true (空对象有效)\nconsole.log(isJSON('[]')); // true (空数组有效)\n```\n\n非字符串值都返回 `false`：\n\n```typescript\n// 非字符串值\nconsole.log(isJSON({ name: 'John' })); // false\nconsole.log(isJSON([1, 2, 3])); // false\nconsole.log(isJSON(42)); // false\nconsole.log(isJSON(true)); // false\nconsole.log(isJSON(null)); // false\nconsole.log(isJSON(undefined)); // false\n```\n\n在 API 响应或用户输入验证中很有用：\n\n```typescript\n// API 响应验证\nfunction processApiResponse(response: unknown) {\n  if (isJSON(response)) {\n    try {\n      const data = JSON.parse(response);\n      console.log('解析的数据:', data);\n      return data;\n    } catch (error) {\n      // isJSON 返回 true，这里不会执行\n      console.error('解析失败:', error);\n    }\n  }\n\n  console.log('不是有效的 JSON 字符串');\n  return null;\n}\n\n// 用户输入验证\nfunction validateJsonInput(input: unknown): string | null {\n  if (isJSON(input)) {\n    // TypeScript 将 input 推断为 string\n    return input;\n  }\n\n  throw new Error('输入值必须是有效的 JSON 字符串');\n}\n\n// 配置文件验证\nfunction loadConfig(configString: unknown) {\n  if (isJSON(configString)) {\n    const config = JSON.parse(configString);\n    return {\n      isValid: true,\n      config,\n      error: null,\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Invalid JSON format',\n  };\n}\n```\n\n也能准确检测复杂的 JSON 结构：\n\n```typescript\nconst complexJson = `{\n  \"users\": [\n    {\n      \"id\": 1,\n      \"name\": \"Alice\",\n      \"preferences\": {\n        \"theme\": \"dark\",\n        \"notifications\": true\n      }\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"page\": 1\n  }\n}`;\n\nconsole.log(isJSON(complexJson)); // true\n\n// 错误的格式\nconsole.log(isJSON('{ \"name\": \"John\", }')); // false (trailing comma)\nconsole.log(isJSON('{ name: \"John\" }')); // false (unquoted key)\nconsole.log(isJSON(\"{ 'name': 'John' }\")); // false (single quotes)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为有效 JSON 字符串的值。\n\n#### 返回值\n\n(`value is string`): 如果值为有效的 JSON 字符串则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isJSONArray.md",
    "content": "# isJSONArray\n\n检查给定值是否为有效的 JSON 数组。\n\n```typescript\nconst result = isJSONArray(value);\n```\n\n## 用法\n\n### `isJSONArray(value)`\n\n当您想确认数组的所有元素是否都是有效的 JSON 值时，请使用 `isJSONArray`。有效的 JSON 数组是指所有项都可以序列化为 JSON 的值（`null`、对象、数组、字符串、数字、布尔值）组成的数组。\n\n```typescript\nimport { isJSONArray } from 'es-toolkit/predicate';\n\n// 有效的 JSON 数组\nconsole.log(isJSONArray([1, 2, 3])); // true\nconsole.log(isJSONArray(['hello', 'world'])); // true\nconsole.log(isJSONArray([true, false, null])); // true\nconsole.log(isJSONArray([{ name: 'John' }, { name: 'Jane' }])); // true\nconsole.log(\n  isJSONArray([\n    [1, 2],\n    [3, 4],\n  ])\n); // true (嵌套数组)\nconsole.log(isJSONArray([])); // true (空数组)\n\n// 复合有效 JSON 数组\nconst complexArray = [42, 'text', true, null, { key: 'value' }, [1, 2, 3]];\nconsole.log(isJSONArray(complexArray)); // true\n```\n\n与无效的 JSON 数组区分：\n\n```typescript\n// 包含函数的数组 - 无效\nconsole.log(isJSONArray([1, 2, () => {}])); // false\nconsole.log(isJSONArray([function () {}])); // false\n\n// 包含 undefined 的数组 - 无效\nconsole.log(isJSONArray([1, undefined, 3])); // false\n\n// 包含 Symbol 的数组 - 无效\nconsole.log(isJSONArray([Symbol('test')])); // false\n\n// 包含 Date 对象的数组 - 无效（在 JSON 中必须转换为字符串）\nconsole.log(isJSONArray([new Date()])); // false\n\n// 非数组值\nconsole.log(isJSONArray('not an array')); // false\nconsole.log(isJSONArray({ 0: 'a', 1: 'b', length: 2 })); // false (类数组对象)\nconsole.log(isJSONArray(42)); // false\nconsole.log(isJSONArray(null)); // false\n```\n\n在 API 响应验证或数据序列化前验证时很有用。\n\n```typescript\n// API 响应验证\nfunction processApiArray(data: unknown) {\n  if (isJSONArray(data)) {\n    // 可以安全使用 JSON.stringify\n    const jsonString = JSON.stringify(data);\n    console.log('序列化的数组:', jsonString);\n    return data;\n  }\n\n  throw new Error('不是有效的 JSON 数组');\n}\n\n// 用户输入数据验证\nfunction validateUserList(input: unknown): any[] {\n  if (isJSONArray(input)) {\n    // TypeScript 将 input 推断为 any[]\n    return input;\n  }\n\n  return [];\n}\n\n// 配置数组验证\nfunction loadArrayConfig(config: unknown) {\n  if (isJSONArray(config)) {\n    return {\n      isValid: true,\n      items: config,\n      count: config.length,\n    };\n  }\n\n  return {\n    isValid: false,\n    items: [],\n    count: 0,\n  };\n}\n\n// 在嵌套结构中也能工作\nconst nestedData = [{ users: [{ name: 'Alice' }, { name: 'Bob' }] }, { users: [{ name: 'Charlie' }] }];\nconsole.log(isJSONArray(nestedData)); // true\n```\n\n对于包含函数作为元素的数组或 `TypedArray` 对象等无法序列化为 JSON 的数组，返回 `false`。\n\n```typescript\n// 一般数组 vs JSON 数组\nconst regularArray = [1, 2, function () {}]; // 一般有效的数组\nconst jsonArray = [1, 2, 3]; // 可序列化为 JSON 的数组\n\nconsole.log(Array.isArray(regularArray)); // true (一般数组检查)\nconsole.log(isJSONArray(regularArray)); // false (JSON 数组检查)\n\nconsole.log(Array.isArray(jsonArray)); // true\nconsole.log(isJSONArray(jsonArray)); // true\n\n// TypedArray 不是 JSON 数组\nconst typedArray = new Int32Array([1, 2, 3]);\nconsole.log(Array.isArray(typedArray)); // false\nconsole.log(isJSONArray(typedArray)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为有效 JSON 数组的值。\n\n#### 返回值\n\n(`value is any[]`): 如果值为有效的 JSON 数组则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isJSONObject.md",
    "content": "# isJSONObject\n\n检查给定值是否为有效的 JSON 对象。\n\n```typescript\nconst result = isJSONObject(value);\n```\n\n## 用法\n\n### `isJSONObject(value)`\n\n当您想确认对象的所有键都是字符串且所有值都是有效的 JSON 值时，请使用 `isJSONObject`。有效的 JSON 对象是指由字符串键和可序列化为 JSON 的值（`null`、对象、数组、字符串、数字、布尔值）组成的纯对象。\n\n```typescript\nimport { isJSONObject } from 'es-toolkit/predicate';\n\n// 有效的 JSON 对象\nconsole.log(isJSONObject({ name: 'John', age: 30 })); // true\nconsole.log(isJSONObject({ active: true, score: null })); // true\nconsole.log(isJSONObject({})); // true (空对象)\n\n// 嵌套结构验证\nconst nested = {\n  user: {\n    name: 'Alice',\n    preferences: {\n      theme: 'dark',\n      notifications: true,\n    },\n  },\n  data: [1, 2, 3],\n  timestamp: null,\n};\nconsole.log(isJSONObject(nested)); // true\n\n// 复合有效 JSON 对象\nconst complex = {\n  id: 42,\n  title: 'Example',\n  published: true,\n  tags: ['javascript', 'tutorial'],\n  author: {\n    name: 'Developer',\n    email: 'dev@example.com',\n  },\n  metadata: null,\n};\nconsole.log(isJSONObject(complex)); // true\n```\n\n准确区分包含函数、`Symbol`、`Date` 对象、`undefined` 等无法序列化为 JSON 的值或类实例的无效 JSON 对象。\n\n```typescript\n// 包含函数的对象 - 无效\nconsole.log(isJSONObject({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONObject({ method: function () {} })); // false\n\n// 包含 undefined 的对象 - 无效\nconsole.log(isJSONObject({ name: 'John', age: undefined })); // false\n\n// 包含 Symbol 键或值的对象 - 无效\nconsole.log(isJSONObject({ [Symbol('key')]: 'value' })); // false\nconsole.log(isJSONObject({ name: Symbol('name') })); // false\n\n// Date、RegExp 等对象 - 无效\nconsole.log(isJSONObject({ created: new Date() })); // false\nconsole.log(isJSONObject({ pattern: /test/ })); // false\n\n// 类实例 - 无效\nclass Person {\n  constructor(public name: string) {}\n}\nconsole.log(isJSONObject(new Person('John'))); // false\n\n// 非对象值\nconsole.log(isJSONObject('not an object')); // false\nconsole.log(isJSONObject(42)); // false\nconsole.log(isJSONObject([1, 2, 3])); // false\nconsole.log(isJSONObject(null)); // false\n```\n\n可用于验证是否可以安全使用 `JSON.stringify`。\n\n```typescript\n// API 响应验证\nfunction processApiResponse(data: unknown) {\n  if (isJSONObject(data)) {\n    // 可以安全使用 JSON.stringify\n    const jsonString = JSON.stringify(data);\n    console.log('序列化的对象:', jsonString);\n\n    // TypeScript 将 data 推断为 Record<string, any>\n    return data;\n  }\n\n  throw new Error('不是有效的 JSON 对象');\n}\n\n// 配置对象验证\nfunction loadConfig(config: unknown) {\n  if (isJSONObject(config)) {\n    return {\n      isValid: true,\n      config,\n      keys: Object.keys(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: {},\n    keys: [],\n  };\n}\n\n// 用户输入数据验证\nfunction validateUserData(input: unknown): Record<string, any> {\n  if (isJSONObject(input)) {\n    // 确保所有属性都可序列化为 JSON\n    return input;\n  }\n\n  throw new Error('用户数据必须是有效的 JSON 对象');\n}\n\n// 嵌套对象验证\nfunction validateNestedConfig(data: unknown) {\n  if (isJSONObject(data)) {\n    // 确保所有嵌套对象和数组也都符合 JSON 有效性\n    console.log('配置完全兼容 JSON');\n    return data;\n  }\n\n  return null;\n}\n```\n\n`isJSONObject` 与其他对象检查函数有不同的目的。`isPlainObject` 检查是否为纯对象，而 `isJSONObject` 检查是否可序列化为 JSON 的对象。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\nconst objectWithFunction = {\n  name: 'John',\n  greet: function () {\n    return 'Hello';\n  },\n};\n\nconst plainJsonObject = {\n  name: 'John',\n  age: 30,\n};\n\n// 纯对象 vs JSON 对象\nconsole.log(isPlainObject(objectWithFunction)); // true (纯对象)\nconsole.log(isJSONObject(objectWithFunction)); // false (包含函数，不是 JSON 对象)\n\nconsole.log(isPlainObject(plainJsonObject)); // true\nconsole.log(isJSONObject(plainJsonObject)); // true\n\n// 内置对象\nconsole.log(isPlainObject(new Date())); // false\nconsole.log(isJSONObject(new Date())); // false\n\n// 数组\nconsole.log(isPlainObject([])); // false\nconsole.log(isJSONObject([])); // false (数组是 JSON 值但不是 JSON \"对象\")\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为有效 JSON 对象的值。\n\n#### 返回值\n\n(`value is Record<string, any>`): 如果值为有效的 JSON 对象则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isJSONValue.md",
    "content": "# isJSONValue\n\n检查给定值是否为有效的 JSON 值。\n\n```typescript\nconst result = isJSONValue(value);\n```\n\n## 用法\n\n### `isJSONValue(value)`\n\n当您想确认某个值是否可序列化为 JSON 的有效值时，请使用 `isJSONValue`。根据 JSON 规范，有效值包括 `null`、对象、数组、字符串、数字、布尔值。此函数是其他 JSON 相关类型守卫的基础函数。\n\n```typescript\nimport { isJSONValue } from 'es-toolkit/predicate';\n\n// 原始 JSON 值\nconsole.log(isJSONValue(null)); // true\nconsole.log(isJSONValue('hello')); // true\nconsole.log(isJSONValue(42)); // true\nconsole.log(isJSONValue(true)); // true\nconsole.log(isJSONValue(false)); // true\n\n// 对象和数组（内部值也都必须有效）\nconsole.log(isJSONValue({ name: 'John', age: 30 })); // true\nconsole.log(isJSONValue([1, 2, 3, 'text'])); // true\nconsole.log(isJSONValue([])); // true (空数组)\nconsole.log(isJSONValue({})); // true (空对象)\n\n// 嵌套结构\nconst complexData = {\n  user: {\n    name: 'Alice',\n    active: true,\n    scores: [95, 87, 92],\n  },\n  metadata: null,\n};\nconsole.log(isJSONValue(complexData)); // true\n```\n\n准确区分无法序列化为 JSON 的值。函数、`undefined`、`Symbol`、类实例等不受 JSON 规范支持的类型会返回 `false`：\n\n```typescript\n// undefined 不受 JSON 支持\nconsole.log(isJSONValue(undefined)); // false\n\n// 函数无法序列化为 JSON\nconsole.log(isJSONValue(() => {})); // false\nconsole.log(isJSONValue(function () {})); // false\n\n// Symbol 不受 JSON 支持\nconsole.log(isJSONValue(Symbol('test'))); // false\n\n// Date 对象在 JSON 中必须转换为字符串\nconsole.log(isJSONValue(new Date())); // false\n\n// RegExp 对象也不受 JSON 支持\nconsole.log(isJSONValue(/pattern/)); // false\n\n// 包含函数或 undefined 的对象/数组\nconsole.log(isJSONValue({ name: 'John', greet: () => {} })); // false\nconsole.log(isJSONValue([1, 2, undefined])); // false\n\n// BigInt 不受 JSON 支持\nconsole.log(isJSONValue(BigInt(123))); // false\n```\n\n在 JSON 序列化前的数据验证中很有用：\n\n```typescript\n// 安全的 JSON 序列化\nfunction safeJsonStringify(data: unknown): string | null {\n  if (isJSONValue(data)) {\n    // 确保 data 是有效的 JSON 值\n    return JSON.stringify(data);\n  }\n\n  console.warn('数据无法序列化为 JSON');\n  return null;\n}\n\n// API 请求数据验证\nfunction sendApiRequest(data: unknown) {\n  if (isJSONValue(data)) {\n    const jsonPayload = JSON.stringify(data);\n    // 发送 API 请求\n    console.log('要发送的数据:', jsonPayload);\n    return fetch('/api/data', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: jsonPayload,\n    });\n  }\n\n  throw new Error('API 数据必须可序列化为 JSON');\n}\n\n// localStorage 保存前验证\nfunction saveToStorage(key: string, value: unknown) {\n  if (isJSONValue(value)) {\n    localStorage.setItem(key, JSON.stringify(value));\n    return true;\n  }\n\n  console.error('无法保存到 localStorage 的数据类型');\n  return false;\n}\n\n// 配置文件验证\nfunction validateConfig(config: unknown) {\n  if (isJSONValue(config)) {\n    return {\n      isValid: true,\n      config,\n      serialized: JSON.stringify(config),\n    };\n  }\n\n  return {\n    isValid: false,\n    config: null,\n    error: 'Config must be a valid JSON value',\n  };\n}\n```\n\n可以与其他类型守卫组合使用。\n\n```typescript\n// 检查具体的 JSON 类型\nfunction processJsonData(data: unknown) {\n  if (!isJSONValue(data)) {\n    throw new Error('Invalid JSON value');\n  }\n\n  // 现在确保 data 是有效的 JSON 值\n  if (isJSONObject(data)) {\n    console.log('是 JSON 对象:', Object.keys(data));\n  } else if (isJSONArray(data)) {\n    console.log('是 JSON 数组:', data.length, '个项目');\n  } else {\n    console.log('是原始 JSON 值:', typeof data, data);\n  }\n}\n\n// 嵌套数据验证\nconst testData = {\n  valid: { name: 'test', values: [1, 2, 3] },\n  invalid: { name: 'test', callback: () => {} },\n};\n\nconsole.log(isJSONValue(testData.valid)); // true\nconsole.log(isJSONValue(testData.invalid)); // false\n```\n\n边界情况：\n\n```typescript\n// 特殊数字值\nconsole.log(isJSONValue(Infinity)); // false (在 JSON 中转换为 null)\nconsole.log(isJSONValue(-Infinity)); // false\nconsole.log(isJSONValue(NaN)); // false (在 JSON 中转换为 null)\n\n// 空值\nconsole.log(isJSONValue('')); // true (空字符串)\nconsole.log(isJSONValue(0)); // true\nconsole.log(isJSONValue(false)); // true\n\n// 具有原型的对象\nconst obj = Object.create({ inherited: 'value' });\nobj.own = 'property';\nconsole.log(isJSONValue(obj)); // true (视为纯对象)\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为有效 JSON 值的值。\n\n#### 返回值\n\n(`value is Record<string, any> | any[] | string | number | boolean | null`): 如果值为有效的 JSON 值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isLength.md",
    "content": "# isLength\n\n检查值是否为有效的数组长度。\n\n```typescript\nconst result = isLength(value);\n```\n\n## 用法\n\n### `isLength(value)`\n\n当您想确认某个值是否为有效的数组长度时，请使用 `isLength`。有效的长度必须是大于等于 0 且小于等于 `Number.MAX_SAFE_INTEGER` 的整数。\n\n```typescript\nimport { isLength } from 'es-toolkit/predicate';\n\n// 有效的长度\nconsole.log(isLength(0)); // true\nconsole.log(isLength(42)); // true\nconsole.log(isLength(Number.MAX_SAFE_INTEGER)); // true\n\n// 无效的长度\nconsole.log(isLength(-1)); // false (负数)\nconsole.log(isLength(1.5)); // false (小数)\nconsole.log(isLength(Number.MAX_SAFE_INTEGER + 1)); // false (不安全的整数)\nconsole.log(isLength('42')); // false (字符串)\nconsole.log(isLength(null)); // false (null)\n```\n\n在 TypeScript 中也可以用作类型守卫。\n\n```typescript\nfunction processLength(value: unknown) {\n  if (isLength(value)) {\n    // 现在 value 类型被缩小为 number\n    console.log(value.toFixed(2));\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为有效长度的值。\n\n#### 返回值\n\n(`boolean`): 如果值为有效长度则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isMap.md",
    "content": "# isMap\n\n检查值是否为Map。\n\n```typescript\nconst result = isMap(value);\n```\n\n## 用法\n\n### `isMap(value)`\n\n当你想检查值是否为Map实例时，使用`isMap`。它使用`instanceof`运算符检查是否为`Map`。\n\n```typescript\nimport { isMap } from 'es-toolkit/predicate';\n\n// Map实例\nconst map = new Map([['key', 'value']]);\nconsole.log(isMap(map)); // true\n\n// 非Map值\nconsole.log(isMap(new Set())); // false\nconsole.log(isMap(new WeakMap())); // false\nconsole.log(isMap({})); // false\nconsole.log(isMap([])); // false\nconsole.log(isMap(null)); // false\n```\n\n在TypeScript中也可以用作类型守卫。\n\n```typescript\nfunction processValue(value: unknown) {\n  if (isMap(value)) {\n    // 现在value被缩小为Map<any, any>类型\n    console.log(value.size);\n    value.set('new-key', 'new-value');\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为`Map`的值。\n\n#### 返回值\n\n(`value is Map<any, any>`): 如果值为Map则返回`true`，否则返回`false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isNil.md",
    "content": "# isNil\n\n检查值是否为 `null` 或 `undefined`。\n\n```typescript\nconst result = isNil(value);\n```\n\n## 用法\n\n### `isNil(value)`\n\n当您想检查值是否为 `null` 或 `undefined` 时，请使用 `isNil`。\n\n```typescript\nimport { isNil } from 'es-toolkit/predicate';\n\n// null 或 undefined 值\nconsole.log(isNil(null)); // true\nconsole.log(isNil(undefined)); // true\n\n// 其他值\nconsole.log(isNil(0)); // false\nconsole.log(isNil('')); // false\nconsole.log(isNil(false)); // false\nconsole.log(isNil([])); // false\nconsole.log(isNil({})); // false\n```\n\n它也可以在 TypeScript 中用作类型守卫：\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNil(value)) {\n    // value 现在被缩小为 null | undefined 类型\n    console.log('值为空');\n  } else {\n    // value 被缩小为 string 类型\n    console.log(value.toUpperCase());\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 `null` 或 `undefined` 的值。\n\n#### 返回值\n\n(`value is null | undefined`): 如果值为 `null` 或 `undefined` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isNode.md",
    "content": "# isNode\n\n检查当前运行环境是否为 Node.js。\n\n```typescript\nconst result = isNode();\n```\n\n## 用法\n\n### `isNode()`\n\n当您想检查当前代码是否在 Node.js 环境中运行时，请使用 `isNode`。在使用 Node.js 特定的 API 之前验证环境时非常有用。\n\n```typescript\nimport { isNode } from 'es-toolkit/predicate';\n\nif (isNode()) {\n  // Node.js 特定代码\n  console.log('此代码在 Node.js 中运行');\n  const fs = await import('node:fs');\n  const path = await import('node:path');\n} else {\n  // 仅浏览器代码\n  console.log('此代码在浏览器中运行');\n  const response = await fetch('/api/data');\n}\n```\n\n在有条件地使用 Node.js 模块时也很有用：\n\n```typescript\nfunction getEnvironmentInfo() {\n  if (isNode()) {\n    return {\n      platform: process.platform,\n      nodeVersion: process.version,\n      environment: 'Node.js',\n    };\n  } else {\n    return {\n      userAgent: navigator.userAgent,\n      environment: 'Browser',\n    };\n  }\n}\n```\n\n#### 返回值\n\n(`boolean`): 如果当前环境为 Node.js，则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isNotNil.md",
    "content": "# isNotNil\n\n检查值是否既不是 `null` 也不是 `undefined`。\n\n```typescript\nconst result = isNotNil(value);\n```\n\n## 用法\n\n### `isNotNil(value)`\n\n当您想检查值是否既不是 `null` 也不是 `undefined` 时，请使用 `isNotNil`。它对于从数组中过滤掉 `null` 或 `undefined` 值特别有用。\n\n```typescript\nimport { isNotNil } from 'es-toolkit/predicate';\n\n// 基本用法\nconsole.log(isNotNil(42)); // true\nconsole.log(isNotNil('hello')); // true\nconsole.log(isNotNil([])); // true\nconsole.log(isNotNil({})); // true\n\nconsole.log(isNotNil(null)); // false\nconsole.log(isNotNil(undefined)); // false\n\n// 在数组过滤中很有用\nconst mixedArray = [1, null, 'hello', undefined, true, 0];\nconst filteredArray = mixedArray.filter(isNotNil);\n// filteredArray 变成 [1, 'hello', true, 0]（null 和 undefined 被移除）\n```\n\n它也可以在 TypeScript 中用作类型守卫。\n\n```typescript\nfunction processItems(items: (string | null | undefined)[]) {\n  // 使用 isNotNil 过滤会将类型缩小为 string[]\n  const validItems = items.filter(isNotNil);\n\n  validItems.forEach(item => {\n    // item 现在被保证是 string 类型\n    console.log(item.toUpperCase());\n  });\n}\n```\n\n#### 参数\n\n- `value` (`T | null | undefined`): 要检查是否既不是 `null` 也不是 `undefined` 的值。\n\n#### 返回值\n\n(`value is T`): 如果值既不是 `null` 也不是 `undefined` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isNull.md",
    "content": "# isNull\n\n检查值是否为 `null`。\n\n```typescript\nconst result = isNull(value);\n```\n\n## 用法\n\n### `isNull(value)`\n\n当您想检查值是否正好是 `null` 时，请使用 `isNull`。它使用严格相等（`===`）仅识别 `null` 而不识别 undefined。\n\n```typescript\nimport { isNull } from 'es-toolkit/predicate';\n\n// null 值\nconsole.log(isNull(null)); // true\n\n// 非 null 值\nconsole.log(isNull(undefined)); // false\nconsole.log(isNull(0)); // false\nconsole.log(isNull('')); // false\nconsole.log(isNull(false)); // false\nconsole.log(isNull([])); // false\nconsole.log(isNull({})); // false\n```\n\n它也可以在 TypeScript 中用作类型守卫。\n\n```typescript\nfunction processValue(value: string | null | undefined) {\n  if (isNull(value)) {\n    // value 现在被缩小为 null 类型\n    console.log('值为 null');\n  } else {\n    // value 被缩小为 string | undefined 类型\n    console.log('值不是 null：', value);\n  }\n}\n```\n\n`isNull` 与 [`isNil`](./isNil.md) 不同，它将 `undefined` 视为 `false`。\n\n```typescript\nimport { isNil, isNull } from 'es-toolkit/predicate';\n\nconsole.log(isNull(undefined)); // false\nconsole.log(isNil(undefined)); // true\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 `null` 的值。\n\n#### 返回值\n\n(`value is null`): 如果值为 `null` 则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isNumber.md",
    "content": "# isNumber\n\n检查给定值是否为数字类型。\n\n```typescript\nconst result = isNumber(value);\n```\n\n## 用法\n\n### `isNumber(value)`\n\n当您想检查值是否为数字时使用 `isNumber`。\n\n```typescript\nimport { isNumber } from 'es-toolkit/predicate';\n\n// 基本数字值检查\nisNumber(123); // true\nisNumber(3.14); // true\nisNumber(NaN); // true\nisNumber(Infinity); // true\n\n// 与其他类型区分\nisNumber('123'); // false\nisNumber(true); // false\nisNumber(null); // false\nisNumber(undefined); // false\n```\n\n在 TypeScript 中作为类型守卫使用时特别有用。\n\n```typescript\nimport { isNumber } from 'es-toolkit';\n\nfunction processValue(value: unknown) {\n  if (isNumber(value)) {\n    // value 类型被缩小为 number\n    console.log(value * 2);\n  } else {\n    console.log('不是数字');\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为数字类型的值。\n\n#### 返回值\n\n(`value is number`): 如果值为数字则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isPlainObject.md",
    "content": "# isPlainObject\n\n检查值是否为普通对象（plain object）。\n\n```typescript\nconst result = isPlainObject(value);\n```\n\n## 用法\n\n### `isPlainObject(value)`\n\n当您想检查值是否为普通对象时，请使用 `isPlainObject`。普通对象是使用对象字面量（`{}`）或 `Object` 构造函数创建的对象。类实例、数组或其他特殊对象不是普通对象。\n\n```typescript\nimport { isPlainObject } from 'es-toolkit/predicate';\n\n// 普通对象\nconsole.log(isPlainObject({})); // true\nconsole.log(isPlainObject({ name: 'John', age: 30 })); // true\nconsole.log(isPlainObject(Object.create(null))); // true\nconsole.log(isPlainObject(new Object())); // true\n\n// 非普通对象\nconsole.log(isPlainObject([])); // false（数组）\nconsole.log(isPlainObject(new Date())); // false（Date 对象）\nconsole.log(isPlainObject(new Set())); // false（Set 对象）\nconsole.log(isPlainObject(new Map())); // false（Map 对象）\nconsole.log(isPlainObject(null)); // false（null）\nconsole.log(isPlainObject(42)); // false（数字）\nconsole.log(isPlainObject('hello')); // false（字符串）\n\n// 类实例\nclass MyClass {}\nconsole.log(isPlainObject(new MyClass())); // false\n```\n\n在序列化数据或验证配置对象时很有用。\n\n```typescript\nfunction processConfig(config: unknown) {\n  if (isPlainObject(config)) {\n    // config 现在被缩小为 Record<PropertyKey, any> 类型\n    console.log('有效的配置对象');\n    Object.keys(config).forEach(key => {\n      console.log(`${key}: ${config[key]}`);\n    });\n  } else {\n    throw new Error('配置必须是普通对象');\n  }\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为普通对象的值。\n\n#### 返回值\n\n(`value is Record<PropertyKey, any>`): 如果值为普通对象则返回 `true`，否则返回 `false`。\n\n## 性能比较\n\n|                   | [包大小](../../bundle-size.md) | [运行时性能](../../performance.md) |\n| ----------------- | ------------------------------ | ---------------------------------- |\n| es-toolkit        | 279 字节（减少 82.4%）         | 1,505,684 次（快 1.70×）           |\n| es-toolkit/compat | 435 字节（减少 72.5%）         | 2,013,760 次（快 2.28×）           |\n| lodash-es         | 1,586 字节                     | 882,669 次                         |\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isPrimitive.md",
    "content": "# isPrimitive\n\n检查给定值是否为 JavaScript 原始值。\n\n```typescript\nconst result = isPrimitive(value);\n```\n\n## 用法\n\n### `isPrimitive(value)`\n\n当您想检查值是否为 JavaScript 原始值时，请使用 `isPrimitive`。JavaScript 的原始值包括 `null`、`undefined`、字符串、数字、布尔值、符号和 `BigInt`。它对于区分对象或函数等引用类型很有用。\n\n```typescript\nimport { isPrimitive } from 'es-toolkit/predicate';\n\n// 原始值\nconsole.log(isPrimitive(null)); // true\nconsole.log(isPrimitive(undefined)); // true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\nconsole.log(isPrimitive(false)); // true\nconsole.log(isPrimitive(Symbol('test'))); // true\nconsole.log(isPrimitive(123n)); // true\n\n// 引用类型（非原始值）\nconsole.log(isPrimitive({})); // false\nconsole.log(isPrimitive([])); // false\nconsole.log(isPrimitive(new Date())); // false\nconsole.log(isPrimitive(new Map())); // false\nconsole.log(isPrimitive(new Set())); // false\nconsole.log(isPrimitive(() => {})); // false\nconsole.log(isPrimitive(/regex/)); // false\n```\n\n在实现深拷贝逻辑时很有用。\n\n```typescript\n// 以不同方式处理原始值和对象\nfunction deepClone(value: any): any {\n  if (isPrimitive(value)) {\n    // 原始值按原样返回\n    return value;\n  }\n\n  // 对对象执行克隆逻辑\n  if (Array.isArray(value)) {\n    return value.map(deepClone);\n  }\n\n  const result: any = {};\n  for (const key in value) {\n    result[key] = deepClone(value[key]);\n  }\n  return result;\n}\n\n// 在值比较中使用\nfunction isEqual(a: unknown, b: unknown): boolean {\n  if (isPrimitive(a) && isPrimitive(b)) {\n    return a === b;\n  }\n\n  // 复杂的对象比较逻辑...\n  return false;\n}\n\n// 用于日志记录的安全字符串转换\nfunction safeLog(value: unknown) {\n  if (isPrimitive(value)) {\n    console.log('原始值:', value);\n  } else {\n    console.log('对象:', typeof value, Object.prototype.toString.call(value));\n  }\n}\n```\n\n您可以将其用作类型守卫来编写安全的代码。\n\n```typescript\nfunction processValue(input: unknown) {\n  if (isPrimitive(input)) {\n    // TypeScript 将 input 推断为原始类型\n    console.log('原始值的类型:', typeof input);\n    console.log('原始值:', input);\n    return input;\n  }\n\n  // 这里 input 被推断为对象类型\n  console.log('这是对象类型');\n  return null;\n}\n\n// API 响应验证\nfunction validateApiResponse(data: unknown) {\n  if (isPrimitive(data)) {\n    return {\n      type: 'primitive',\n      value: data,\n      serializable: true,\n    };\n  }\n\n  return {\n    type: 'object',\n    value: data,\n    serializable: false, // 需要额外验证\n  };\n}\n\n// 配置值处理\nfunction normalizeConfigValue(value: unknown) {\n  if (isPrimitive(value)) {\n    // 原始值可以安全地转换为字符串\n    return String(value);\n  }\n\n  // 将对象序列化为 JSON\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return '[复杂对象]';\n  }\n}\n```\n\n您可以区分 `String`、`Number`、`Boolean` 等包装对象和原始值。\n\n```typescript\n// 包装对象不是原始值\nconsole.log(isPrimitive(new String('hello'))); // false\nconsole.log(isPrimitive(new Number(42))); // false\nconsole.log(isPrimitive(new Boolean(true))); // false\n\n// 但实际的原始值返回 true\nconsole.log(isPrimitive('hello')); // true\nconsole.log(isPrimitive(42)); // true\nconsole.log(isPrimitive(true)); // true\n\n// 可以使用 valueOf() 提取原始值\nconst strObj = new String('hello');\nconsole.log(isPrimitive(strObj.valueOf())); // true\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 JavaScript 原始值的值。\n\n#### 返回值\n\n(`value is null | undefined | string | number | boolean | symbol | bigint`): 如果值为原始值则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isPromise.md",
    "content": "# isPromise\n\n检查给定值是否为 `Promise` 实例。\n\n```typescript\nconst result = isPromise(value);\n```\n\n## 用法\n\n### `isPromise(value)`\n\n当您想检查值是否为 `Promise` 实例时，请使用 `isPromise`。在异步代码中需要区分 `Promise` 对象和其他值，或需要有条件地使用 `await` 时非常有用。\n\n```typescript\nimport { isPromise } from 'es-toolkit/predicate';\n\n// Promise 实例\nconst promise1 = new Promise(resolve => resolve('done'));\nconst promise2 = Promise.resolve(42);\nconst promise3 = Promise.reject(new Error('failed'));\n\nconsole.log(isPromise(promise1)); // true\nconsole.log(isPromise(promise2)); // true\nconsole.log(isPromise(promise3)); // true\n\n// 非 Promise 值\nconsole.log(isPromise({})); // false\nconsole.log(isPromise('hello')); // false\nconsole.log(isPromise(42)); // false\nconsole.log(isPromise(null)); // false\nconsole.log(isPromise(undefined)); // false\n```\n\n在异步函数中根据条件执行逻辑时非常有用。\n\n```typescript\n// 检查值是否为 Promise 并适当处理\nasync function processValue(input: unknown) {\n  if (isPromise(input)) {\n    // TypeScript 将 input 推断为 Promise<any>\n    const result = await input;\n    console.log('Promise 结果:', result);\n    return result;\n  }\n\n  // 非 Promise 值直接返回\n  console.log('普通值:', input);\n  return input;\n}\n\n// API 响应处理\nfunction handleApiCall(response: unknown) {\n  if (isPromise(response)) {\n    return response.then(data => ({ success: true, data })).catch(error => ({ success: false, error: error.message }));\n  }\n\n  // 已解决的值\n  return { success: true, data: response };\n}\n\n// 在工具函数中使用\nfunction toPromise<T>(value: T | Promise<T>): Promise<T> {\n  if (isPromise(value)) {\n    return value;\n  }\n\n  return Promise.resolve(value);\n}\n```\n\n可以区分类似 Promise 的对象和真正的 `Promise`。\n\n```typescript\n// thenable 对象不是 Promise\nconst thenable = {\n  then: (resolve: Function) => resolve('not a promise'),\n};\n\nconsole.log(isPromise(thenable)); // false\n\n// async 函数结果是 Promise\nasync function asyncFunction() {\n  return 'async result';\n}\n\nconsole.log(isPromise(asyncFunction())); // true\n\n// 普通函数不是 Promise\nfunction normalFunction() {\n  return 'normal result';\n}\n\nconsole.log(isPromise(normalFunction())); // false\n```\n\n也可以用于错误处理。\n\n```typescript\nfunction safeExecute(fn: () => any) {\n  try {\n    const result = fn();\n\n    if (isPromise(result)) {\n      return result.catch(error => {\n        console.error('异步函数执行中出错:', error);\n        return null;\n      });\n    }\n\n    return result;\n  } catch (error) {\n    console.error('同步函数执行中出错:', error);\n    return null;\n  }\n}\n\n// 超时处理\nfunction withTimeout<T>(valueOrPromise: T | Promise<T>, timeoutMs: number) {\n  if (!isPromise(valueOrPromise)) {\n    return valueOrPromise;\n  }\n\n  const timeoutPromise = new Promise((_, reject) => {\n    setTimeout(() => reject(new Error('Timeout')), timeoutMs);\n  });\n\n  return Promise.race([valueOrPromise, timeoutPromise]);\n}\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Promise 实例的值。\n\n#### 返回值\n\n(`value is Promise<any>`): 如果值是 Promise 实例，则返回 `true`，否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isRegExp.md",
    "content": "# isRegExp\n\n检查给定值是否为 `RegExp` 实例。\n\n```typescript\nconst result = isRegExp(value);\n```\n\n## 用法\n\n### `isRegExp(value)`\n\n当您想检查值是否为 `RegExp` 实例时,请使用 `isRegExp`。在区分正则表达式对象和普通字符串或其他对象时非常有用。\n\n```typescript\nimport { isRegExp } from 'es-toolkit/predicate';\n\n// RegExp 实例\nconst regex1 = /abc/;\nconst regex2 = new RegExp('abc');\nconst regex3 = new RegExp('\\\\d+', 'g');\n\nconsole.log(isRegExp(regex1)); // true\nconsole.log(isRegExp(regex2)); // true\nconsole.log(isRegExp(regex3)); // true\n\n// 非 RegExp 值\nconsole.log(isRegExp('/abc/')); // false (字符串)\nconsole.log(isRegExp('abc')); // false\nconsole.log(isRegExp({})); // false\nconsole.log(isRegExp(null)); // false\nconsole.log(isRegExp(undefined)); // false\n```\n\n对正则表达式模式验证或字符串处理非常有用:\n\n```typescript\n// 动态模式验证\nfunction validatePattern(pattern: unknown, text: string) {\n  if (isRegExp(pattern)) {\n    // TypeScript 将 pattern 推断为 RegExp\n    return pattern.test(text);\n  }\n\n  // 将字符串模式转换为正则表达式\n  if (typeof pattern === 'string') {\n    const regex = new RegExp(pattern);\n    return regex.test(text);\n  }\n\n  return false;\n}\n\n// 使用示例\nconsole.log(validatePattern(/hello/, 'hello world')); // true\nconsole.log(validatePattern('\\\\d+', '123')); // true\nconsole.log(validatePattern('invalid', 'text')); // false\n\n// 在表单验证中使用\nfunction createValidator(rule: unknown) {\n  if (isRegExp(rule)) {\n    return (value: string) => rule.test(value);\n  }\n\n  // 其他规则类型...\n  return () => false;\n}\n\n// 创建邮箱验证器\nconst emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst emailValidator = createValidator(emailRegex);\n\nconsole.log(emailValidator('test@example.com')); // true\nconsole.log(emailValidator('invalid-email')); // false\n```\n\n在条件字符串处理中使用:\n\n```typescript\n// 文本处理工具\nfunction processText(input: string, processor: unknown) {\n  if (isRegExp(processor)) {\n    // 使用正则表达式提取匹配部分\n    const matches = input.match(processor);\n    return matches ? matches : [];\n  }\n\n  // 其他处理器类型...\n  return [input];\n}\n\n// 提取数字\nconst numberRegex = /\\d+/g;\nconst numbers = processText('价格: 1000元, 折扣: 200元', numberRegex);\nconsole.log(numbers); // ['1000', '200']\n\n// 提取 URL\nconst urlRegex = /https?:\\/\\/[^\\s]+/g;\nconst urls = processText('网站: https://example.com 参考', urlRegex);\nconsole.log(urls); // ['https://example.com']\n\n// 基于配置的文本验证\nclass TextValidator {\n  private rules: Array<{ name: string; rule: unknown }> = [];\n\n  addRule(name: string, rule: unknown) {\n    this.rules.push({ name, rule });\n  }\n\n  validate(text: string) {\n    const results: Array<{ rule: string; passed: boolean }> = [];\n\n    for (const { name, rule } of this.rules) {\n      if (isRegExp(rule)) {\n        results.push({\n          rule: name,\n          passed: rule.test(text),\n        });\n      } else {\n        results.push({\n          rule: name,\n          passed: false,\n        });\n      }\n    }\n\n    return results;\n  }\n}\n\n// 使用示例\nconst validator = new TextValidator();\nvalidator.addRule('仅字母', /^[a-zA-Z]+$/);\nvalidator.addRule('包含数字', /\\d/);\nvalidator.addRule('禁止特殊字符', /^[^!@#$%^&*()]+$/);\n\nconsole.log(validator.validate('Hello123'));\n// [\n//   { rule: '仅字母', passed: false },\n//   { rule: '包含数字', passed: true },\n//   { rule: '禁止特殊字符', passed: true }\n// ]\n```\n\n区分字符串和正则表达式:\n\n```typescript\n// 在搜索功能中使用\nfunction searchText(content: string, query: unknown) {\n  if (isRegExp(query)) {\n    // 正则表达式搜索 - 高级模式匹配\n    const matches = content.match(query);\n    return matches ? matches.length : 0;\n  }\n\n  if (typeof query === 'string') {\n    // 普通字符串搜索\n    const regex = new RegExp(query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n    const matches = content.match(regex);\n    return matches ? matches.length : 0;\n  }\n\n  return 0;\n}\n\n// 使用示例\nconst text = 'Hello world! Hello everyone!';\n\nconsole.log(searchText(text, /hello/gi)); // 2 (正则表达式)\nconsole.log(searchText(text, 'Hello')); // 2 (字符串,已转义)\nconsole.log(searchText(text, /h.llo/i)); // 2 (模式匹配)\n\n// 动态过滤\nfunction createFilter(patterns: unknown[]) {\n  const regexPatterns = patterns.filter(isRegExp);\n\n  return (text: string) => {\n    return regexPatterns.some(pattern => pattern.test(text));\n  };\n}\n\n// 垃圾邮件过滤器示例\nconst spamPatterns = [\n  /\\b(广告|促销)\\b/,\n  /\\d{3}-\\d{4}-\\d{4}/, // 电话号码模式\n  'invalid', // 不是 RegExp,从过滤器中排除\n  /\\$\\d+/, // 价格模式\n];\n\nconst spamFilter = createFilter(spamPatterns);\nconsole.log(spamFilter('紧急广告!')); // true\nconsole.log(spamFilter('你好')); // false\n```\n\n使用正则表达式标志和属性:\n\n```typescript\n// 检查 RegExp 属性\nfunction analyzeRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return {\n      source: value.source,\n      flags: value.flags,\n      global: value.global,\n      ignoreCase: value.ignoreCase,\n      multiline: value.multiline,\n      unicode: value.unicode,\n      sticky: value.sticky,\n    };\n  }\n\n  return null;\n}\n\n// 使用示例\nconst regex = /hello/gim;\nconst analysis = analyzeRegex(regex);\nconsole.log(analysis);\n// {\n//   source: 'hello',\n//   flags: 'gim',\n//   global: true,\n//   ignoreCase: true,\n//   multiline: true,\n//   unicode: false,\n//   sticky: false\n// }\n\n// 克隆正则表达式\nfunction cloneRegex(value: unknown) {\n  if (isRegExp(value)) {\n    return new RegExp(value.source, value.flags);\n  }\n\n  return null;\n}\n\nconst originalRegex = /test/gi;\nconst clonedRegex = cloneRegex(originalRegex);\nconsole.log(clonedRegex?.test('TEST')); // true\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 RegExp 实例的值。\n\n#### 返回值\n\n(`value is RegExp`): 如果值是 RegExp 实例,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isSet.md",
    "content": "# isSet\n\n检查给定值是否为 `Set` 实例。\n\n```typescript\nconst result = isSet(value);\n```\n\n## 用法\n\n### `isSet(value)`\n\n当您想检查值是否为 `Set` 实例时,请使用 `isSet`。在区分 `Set` 对象和其他对象时非常有用。\n\n```typescript\nimport { isSet } from 'es-toolkit/predicate';\n\n// Set 实例\nconst set1 = new Set();\nconst set2 = new Set([1, 2, 3]);\nconst set3 = new Set(['a', 'b', 'c']);\n\nconsole.log(isSet(set1)); // true\nconsole.log(isSet(set2)); // true\nconsole.log(isSet(set3)); // true\n\n// 非 Set 值\nconsole.log(isSet(new Map())); // false\nconsole.log(isSet(new WeakSet())); // false\nconsole.log(isSet([])); // false\nconsole.log(isSet({})); // false\nconsole.log(isSet(null)); // false\nconsole.log(isSet(undefined)); // false\n```\n\n在为 `Set`、`Array`、`Map` 等 JavaScript 内置对象执行不同逻辑时非常有用。\n\n```typescript\n// 计算集合大小\nfunction getCollectionSize(collection: unknown): number {\n  if (isSet(collection)) {\n    // TypeScript 将 collection 推断为 Set<any>\n    return collection.size;\n  }\n\n  if (Array.isArray(collection)) {\n    return collection.length;\n  }\n\n  if (collection && typeof collection === 'object') {\n    return Object.keys(collection).length;\n  }\n\n  return 0;\n}\n\n// 使用示例\nconsole.log(getCollectionSize(new Set([1, 2, 3]))); // 3\nconsole.log(getCollectionSize([1, 2, 3])); // 3\nconsole.log(getCollectionSize({ a: 1, b: 2 })); // 2\n\n// 去重工具\nfunction removeDuplicates(data: unknown) {\n  if (isSet(data)) {\n    // 已经是 Set,直接返回\n    return data;\n  }\n\n  if (Array.isArray(data)) {\n    return new Set(data);\n  }\n\n  // 不转换其他类型\n  return data;\n}\n\nconst duplicatedArray = [1, 2, 2, 3, 3, 3];\nconst uniqueSet = removeDuplicates(duplicatedArray);\nconsole.log(uniqueSet); // Set { 1, 2, 3 }\n\nconst existingSet = new Set(['a', 'b']);\nconsole.log(removeDuplicates(existingSet)); // Set { 'a', 'b' } (返回相同的 Set)\n```\n\n也可以广泛用于 Set 操作和数据转换。\n\n```typescript\n// 通用集合合并\nfunction mergeCollections(...collections: unknown[]): Set<any> {\n  const result = new Set();\n\n  for (const collection of collections) {\n    if (isSet(collection)) {\n      // 将 Set 的所有值添加到结果中\n      for (const item of collection) {\n        result.add(item);\n      }\n    } else if (Array.isArray(collection)) {\n      // 添加数组的所有值\n      for (const item of collection) {\n        result.add(item);\n      }\n    }\n  }\n\n  return result;\n}\n\n// 使用示例\nconst set1 = new Set([1, 2, 3]);\nconst array1 = [3, 4, 5];\nconst set2 = new Set(['a', 'b']);\n\nconst merged = mergeCollections(set1, array1, set2);\nconsole.log(merged); // Set { 1, 2, 3, 4, 5, 'a', 'b' }\n\n// 计算集合交集\nfunction getIntersection(coll1: unknown, coll2: unknown): Set<any> {\n  const set1 = isSet(coll1) ? coll1 : new Set(Array.isArray(coll1) ? coll1 : []);\n  const set2 = isSet(coll2) ? coll2 : new Set(Array.isArray(coll2) ? coll2 : []);\n\n  const intersection = new Set();\n\n  for (const item of set1) {\n    if (set2.has(item)) {\n      intersection.add(item);\n    }\n  }\n\n  return intersection;\n}\n\n// 使用示例\nconst setA = new Set([1, 2, 3, 4]);\nconst arrayB = [3, 4, 5, 6];\n\nconst intersection = getIntersection(setA, arrayB);\nconsole.log(intersection); // Set { 3, 4 }\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 Set 实例的值。\n\n#### 返回值\n\n(`value is Set<any>`): 如果值是 Set 实例,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isString.md",
    "content": "# isString\n\n检查给定值是否为字符串。\n\n```typescript\nconst result = isString(value);\n```\n\n## 用法\n\n### `isString(value)`\n\n当您想检查值是否为字符串时,请使用 `isString`。在区分字符串类型和其他原始类型或对象时非常有用。\n\n```typescript\nimport { isString } from 'es-toolkit/predicate';\n\n// 字符串值\nconsole.log(isString('hello')); // true\nconsole.log(isString('')); // true\nconsole.log(isString('123')); // true\nconsole.log(isString('true')); // true\n\n// 非字符串值\nconsole.log(isString(123)); // false\nconsole.log(isString(true)); // false\nconsole.log(isString(null)); // false\nconsole.log(isString(undefined)); // false\nconsole.log(isString([])); // false\nconsole.log(isString({})); // false\nconsole.log(isString(new String('hello'))); // false (String 对象)\n```\n\n对数据验证和类型安全的字符串处理非常有用:\n\n```typescript\n// 安全的字符串操作\nfunction processText(input: unknown): string {\n  if (isString(input)) {\n    // TypeScript 将 input 推断为 string\n    return input.trim().toLowerCase();\n  }\n\n  // 将其他类型转换为字符串\n  return String(input);\n}\n\n// 使用示例\nconsole.log(processText('  HELLO  ')); // 'hello'\nconsole.log(processText(123)); // '123'\nconsole.log(processText(true)); // 'true'\nconsole.log(processText(null)); // 'null'\n\n// 表单数据验证\nfunction validateForm(data: Record<string, unknown>) {\n  const errors: string[] = [];\n\n  if (!isString(data.name) || data.name.length === 0) {\n    errors.push('姓名为必填项');\n  }\n\n  if (!isString(data.email) || !data.email.includes('@')) {\n    errors.push('请输入有效的电子邮箱');\n  }\n\n  return {\n    isValid: errors.length === 0,\n    errors,\n  };\n}\n\n// 使用示例\nconsole.log(validateForm({ name: 'John', email: 'john@example.com' }));\n// { isValid: true, errors: [] }\n\nconsole.log(validateForm({ name: 123, email: 'invalid-email' }));\n// { isValid: false, errors: ['姓名为必填项', '请输入有效的电子邮箱'] }\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为字符串的值。\n\n#### 返回值\n\n(`value is string`): 如果值是字符串,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isSymbol.md",
    "content": "# isSymbol\n\n检查给定值是否为 `symbol`。\n\n```typescript\nconst result = isSymbol(value);\n```\n\n## 用法\n\n### `isSymbol(value)`\n\n当您想检查值是否为 `symbol` 时,请使用 `isSymbol`。\n\n```typescript\nimport { isSymbol } from 'es-toolkit/predicate';\n\n// symbol 值\nconst sym1 = Symbol('description');\nconst sym2 = Symbol.for('global');\nconst sym3 = Symbol.iterator;\n\nconsole.log(isSymbol(sym1)); // true\nconsole.log(isSymbol(sym2)); // true\nconsole.log(isSymbol(sym3)); // true\n\n// 非 symbol 值\nconsole.log(isSymbol('symbol')); // false\nconsole.log(isSymbol(123)); // false\nconsole.log(isSymbol(true)); // false\nconsole.log(isSymbol(null)); // false\nconsole.log(isSymbol(undefined)); // false\nconsole.log(isSymbol({})); // false\nconsole.log(isSymbol([])); // false\n```\n\n对安全访问对象属性或管理元数据非常有用。\n\n```typescript\n// 安全的属性访问\nfunction getPropertyValue(obj: object, key: unknown) {\n  if (isSymbol(key)) {\n    // TypeScript 将 key 推断为 symbol\n    return (obj as any)[key];\n  }\n\n  if (typeof key === 'string') {\n    return (obj as any)[key];\n  }\n\n  return undefined;\n}\n\n// 使用示例\nconst mySymbol = Symbol('myKey');\nconst obj = {\n  name: 'John',\n  [mySymbol]: 'secret value',\n};\n\nconsole.log(getPropertyValue(obj, 'name')); // 'John'\nconsole.log(getPropertyValue(obj, mySymbol)); // 'secret value'\nconsole.log(getPropertyValue(obj, 123)); // undefined\n\n// 元数据存储\nclass MetadataManager {\n  private metadata = new Map<symbol, any>();\n\n  setMetadata(key: unknown, value: any): boolean {\n    if (isSymbol(key)) {\n      this.metadata.set(key, value);\n      return true;\n    }\n    return false;\n  }\n\n  getMetadata(key: unknown): any {\n    if (isSymbol(key)) {\n      return this.metadata.get(key);\n    }\n    return undefined;\n  }\n\n  hasMetadata(key: unknown): boolean {\n    if (isSymbol(key)) {\n      return this.metadata.has(key);\n    }\n    return false;\n  }\n}\n\n// 使用示例\nconst manager = new MetadataManager();\nconst typeSymbol = Symbol('type');\nconst versionSymbol = Symbol('version');\n\nmanager.setMetadata(typeSymbol, 'user');\nmanager.setMetadata(versionSymbol, '1.0');\nmanager.setMetadata('invalid', 'value'); // false, 不是 symbol\n\nconsole.log(manager.getMetadata(typeSymbol)); // 'user'\nconsole.log(manager.hasMetadata(versionSymbol)); // true\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 symbol 的值。\n\n#### 返回值\n\n(`value is symbol`): 如果值是 symbol,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isTypedArray.md",
    "content": "# isTypedArray\n\n检查给定值是否为 `TypedArray` 实例。\n\n```typescript\nconst result = isTypedArray(value);\n```\n\n## 用法\n\n### `isTypedArray(value)`\n\n当您想检查值是否为 [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) 实例时,请使用 `isTypedArray`。\n\n```typescript\nimport { isTypedArray } from 'es-toolkit/predicate';\n\n// TypedArray 实例\nconst uint8 = new Uint8Array([1, 2, 3]);\nconst int16 = new Int16Array([1000, 2000]);\nconst float32 = new Float32Array([1.5, 2.5]);\nconst bigUint64 = new BigUint64Array([1n, 2n]);\n\nconsole.log(isTypedArray(uint8)); // true\nconsole.log(isTypedArray(int16)); // true\nconsole.log(isTypedArray(float32)); // true\nconsole.log(isTypedArray(bigUint64)); // true\n\n// 非 TypedArray 值\nconsole.log(isTypedArray([1, 2, 3])); // false (普通数组)\nconsole.log(isTypedArray(new ArrayBuffer(8))); // false (ArrayBuffer)\nconsole.log(isTypedArray(new DataView(new ArrayBuffer(8)))); // false (DataView)\nconsole.log(isTypedArray({})); // false\nconsole.log(isTypedArray(null)); // false\nconsole.log(isTypedArray(undefined)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 TypedArray 实例的值。\n\n#### 返回值\n\n(`value is Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Float32Array | Float64Array`): 如果值是 TypedArray 实例,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isUndefined.md",
    "content": "# isUndefined\n\n检查给定值是否为 `undefined`。\n\n```typescript\nconst result = isUndefined(value);\n```\n\n## 用法\n\n### `isUndefined(value)`\n\n当您想检查值是否为 `undefined` 时,请使用 `isUndefined`。在检查变量是否已初始化或可选属性是否存在时非常有用。\n\n```typescript\nimport { isUndefined } from 'es-toolkit/predicate';\n\n// undefined 值\nconsole.log(isUndefined(undefined)); // true\nconsole.log(isUndefined(void 0)); // true\n\nlet uninitialized: string;\nconsole.log(isUndefined(uninitialized)); // true\n\n// 非 undefined 值\nconsole.log(isUndefined(null)); // false\nconsole.log(isUndefined('')); // false\nconsole.log(isUndefined(0)); // false\nconsole.log(isUndefined(false)); // false\nconsole.log(isUndefined({})); // false\nconsole.log(isUndefined([])); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 undefined 的值。\n\n#### 返回值\n\n(`value is undefined`): 如果值是 undefined,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isWeakMap.md",
    "content": "# isWeakMap\n\n检查给定值是否为 `WeakMap` 实例。\n\n```typescript\nconst result = isWeakMap(value);\n```\n\n## 用法\n\n### `isWeakMap(value)`\n\n当您想检查值是否为 `WeakMap` 实例时,请使用 `isWeakMap`。`WeakMap` 是一个以对象作为键的键值存储,使用弱引用,有助于防止内存泄漏。\n\n```typescript\nimport { isWeakMap } from 'es-toolkit/predicate';\n\n// WeakMap 实例\nconst weakMap1 = new WeakMap();\nconst weakMap2 = new WeakMap([[{}, 'value']]);\n\nconsole.log(isWeakMap(weakMap1)); // true\nconsole.log(isWeakMap(weakMap2)); // true\n\n// 非 WeakMap 值\nconsole.log(isWeakMap(new Map())); // false\nconsole.log(isWeakMap(new Set())); // false\nconsole.log(isWeakMap(new WeakSet())); // false\nconsole.log(isWeakMap({})); // false\nconsole.log(isWeakMap([])); // false\nconsole.log(isWeakMap(null)); // false\nconsole.log(isWeakMap(undefined)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 WeakMap 实例的值。\n\n#### 返回值\n\n(`value is WeakMap<WeakKey, any>`): 如果值是 WeakMap 实例,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/predicate/isWeakSet.md",
    "content": "# isWeakSet\n\n检查给定值是否为 `WeakSet` 实例。\n\n```typescript\nconst result = isWeakSet(value);\n```\n\n## 用法\n\n### `isWeakSet(value)`\n\n当您想检查值是否为 WeakSet 实例时,请使用 `isWeakSet`。\n\n```typescript\nimport { isWeakSet } from 'es-toolkit/predicate';\n\n// WeakSet 实例\nconst weakSet1 = new WeakSet();\nconst weakSet2 = new WeakSet([{}, []]);\n\nconsole.log(isWeakSet(weakSet1)); // true\nconsole.log(isWeakSet(weakSet2)); // true\n\n// 非 WeakSet 值\nconsole.log(isWeakSet(new Set())); // false\nconsole.log(isWeakSet(new Map())); // false\nconsole.log(isWeakSet(new WeakMap())); // false\nconsole.log(isWeakSet([])); // false\nconsole.log(isWeakSet({})); // false\nconsole.log(isWeakSet(null)); // false\nconsole.log(isWeakSet(undefined)); // false\n```\n\n#### 参数\n\n- `value` (`unknown`): 要检查是否为 WeakSet 实例的值。\n\n#### 返回值\n\n(`value is WeakSet<WeakKey>`): 如果值是 WeakSet 实例,则返回 `true`,否则返回 `false`。\n"
  },
  {
    "path": "docs/zh_hans/reference/promise/Mutex.md",
    "content": "# Mutex\n\n确保多个异步任务不会同时执行,保持执行顺序。\n\n```typescript\nconst mutex = new Mutex();\n```\n\n## 用法\n\n### `Mutex()`\n\n当您想要防止多个异步任务同时执行时,可以使用 `Mutex`。在需要控制并发的情况下很有用,例如数据库连接、文件系统访问、API 调用限制等。\n\n```typescript\nimport { Mutex } from 'es-toolkit';\n\nconst mutex = new Mutex();\n\n// API 调用限制示例\nasync function callAPI() {\n  await mutex.acquire();\n  try {\n    // 防止多个 API 调用同时发生\n    const response = await fetch('/api/data');\n    return response.json();\n  } finally {\n    mutex.release();\n  }\n}\n\n// 文件系统访问示例\nasync function writeToFile(data: string) {\n  await mutex.acquire();\n  try {\n    // 防止同时对同一文件进行写入操作\n    await fs.writeFile('data.txt', data);\n    console.log('文件写入完成');\n  } finally {\n    mutex.release();\n  }\n}\n\n// 即使同时调用多个任务,也会按顺序执行\ncallAPI();\ncallAPI(); // 等待第一个任务完成\nwriteToFile(); // 等待前面的任务完成\n```\n\n#### 属性\n\n- `isLocked` (`boolean`): 当前互斥锁是否正在使用中。如果为 `true`,表示已有异步任务正在执行。\n\n#### 方法\n\n- `acquire` (`() => Promise<void>`): 获取许可并执行异步任务,或等待直到获得许可。\n- `release` (`() => void`): 释放锁,使等待中的下一个任务可以执行。\n"
  },
  {
    "path": "docs/zh_hans/reference/promise/Semaphore.md",
    "content": "# Semaphore\n\n限制同时执行的异步任务数量。\n\n```typescript\nconst semaphore = new Semaphore(capacity);\n```\n\n## 用法\n\n### `Semaphore(capacity)`\n\n当您想要限制可以同时执行的异步任务数量时,可以使用 `Semaphore`。在需要控制资源使用量的情况下特别有用,例如数据库连接池、API 调用限制、文件下载限制等。\n\n```typescript\nimport { Semaphore } from 'es-toolkit';\n\nconst semaphore = new Semaphore(3);\n\n// API 调用限制示例(最多同时执行 3 个)\nasync function callAPI(id: number) {\n  await semaphore.acquire();\n  try {\n    console.log(`开始 API 调用: ${id}`);\n    const response = await fetch(`/api/data/${id}`);\n    return response.json();\n  } finally {\n    semaphore.release();\n    console.log(`API 调用完成: ${id}`);\n  }\n}\n\n// 文件下载限制示例\nasync function downloadFile(url: string) {\n  await semaphore.acquire();\n  try {\n    console.log(`开始下载: ${url}`);\n    // 文件下载逻辑\n    await fetch(url);\n  } finally {\n    semaphore.release();\n    console.log(`下载完成: ${url}`);\n  }\n}\n\n// 即使同时调用 5 个任务,也最多只能同时执行 3 个\ncallAPI(1);\ncallAPI(2);\ncallAPI(3);\ncallAPI(4); // 等待前面的任务之一完成\ncallAPI(5); // 等待前面的任务之一完成\n```\n\n#### 参数\n\n- `capacity` (`number`): 可以同时执行的任务的最大数量。必须是大于 1 的整数。\n\n#### 属性\n\n- `capacity` (`number`): 可以同时执行的任务的最大数量。\n- `available` (`number`): 当前可用的许可数量。如果为 `0`,表示所有许可都在使用中。\n\n#### 方法\n\n- `acquire` (`() => Promise<void>`): 获取许可并执行异步任务,或等待直到获得许可。\n- `release` (`() => void`): 归还许可,使等待中的下一个任务可以执行。\n"
  },
  {
    "path": "docs/zh_hans/reference/promise/delay.md",
    "content": "# delay\n\n延迟代码执行指定的时间。\n\n```typescript\nawait delay(ms, options?);\n```\n\n## 用法\n\n### `delay(ms, options?)`\n\n当您想要暂停代码执行一定时间时,可以使用 `delay`。它可以与 async/await 一起使用,使下一段代码在一定时间后执行。如有必要,还可以通过 `AbortSignal` 取消延迟。\n\n```typescript\nimport { delay } from 'es-toolkit/promise';\n\nasync function example() {\n  console.log('开始');\n  await delay(1000); // 延迟执行 1 秒\n  console.log('1秒后执行');\n\n  await delay(500); // 再延迟 0.5 秒\n  console.log('额外 0.5 秒后执行');\n}\n\nexample();\n```\n\n您也可以使用 AbortSignal 取消延迟:\n\n```typescript\nasync function cancellableDelay() {\n  const controller = new AbortController();\n  const { signal } = controller;\n\n  // 50ms 后取消延迟\n  setTimeout(() => controller.abort(), 50);\n\n  try {\n    await delay(1000, { signal });\n    console.log('1秒已过'); // 此代码不会执行\n  } catch (error) {\n    console.log('延迟已取消'); // 抛出 AbortError\n  }\n}\n```\n\n在测试中模拟异步行为时也很有用。\n\n```typescript\nasync function simulateNetworkRequest() {\n  console.log('开始网络请求...');\n  await delay(2000); // 模拟 2 秒的网络延迟\n  console.log('收到响应!');\n  return { data: 'test' };\n}\n```\n\n#### 参数\n\n- `ms` (`number`): 要延迟的毫秒数。\n- `options` (`DelayOptions`, 可选): 延迟选项。\n  - `signal` (`AbortSignal`, 可选): 可以取消延迟的 AbortSignal。\n\n#### 返回值\n\n(`Promise<void>`): 返回一个在指定时间后完成的 Promise。\n\n#### 错误\n\n当 AbortSignal 激活时,抛出 `AbortError`。\n"
  },
  {
    "path": "docs/zh_hans/reference/promise/timeout.md",
    "content": "# timeout\n\n返回一个在指定时间后抛出 `TimeoutError` 的 `Promise`。\n\n```typescript\nawait timeout(ms);\n```\n\n## 用法\n\n### `timeout(ms)`\n\n当您想要在特定时间后抛出超时错误时,可以使用 `timeout`。与其他 Promise 配合 `Promise.race()` 使用,可以为任务设置时间限制,非常有用。\n\n```typescript\nimport { timeout } from 'es-toolkit/promise';\n\n// 基本用法 - 1秒后抛出 TimeoutError\ntry {\n  await timeout(1000);\n  console.log('此代码不会执行');\n} catch (error) {\n  console.log('发生超时错误:', error.message); // 'The operation was timed out'\n}\n```\n\n可以与 `Promise.race()` 一起使用,为任务设置时间限制:\n\n```typescript\nasync function fetchWithTimeout(url: string) {\n  try {\n    const result = await Promise.race([\n      fetch(url),\n      timeout(5000), // 5秒限制\n    ]);\n    return result;\n  } catch (error) {\n    if (error.name === 'TimeoutError') {\n      console.log('请求耗时过长');\n    }\n    throw error;\n  }\n}\n```\n\n当您想要在多个异步任务中任何一个未在规定时间内完成时使整个任务失败,也可以使用此方法。\n\n```typescript\nasync function multipleOperationsWithTimeout() {\n  try {\n    await Promise.race([\n      Promise.all([fetch('/api/data1'), fetch('/api/data2'), fetch('/api/data3')]),\n      timeout(3000), // 为整个任务设置 3 秒限制\n    ]);\n    console.log('所有任务均按时完成');\n  } catch (error) {\n    console.log('任务未能按时完成');\n  }\n}\n```\n\n#### 参数\n\n- `ms` (`number`): 抛出 `TimeoutError` 前的毫秒数。\n\n#### 返回值\n\n(`Promise<never>`): 返回一个在指定时间后以 `TimeoutError` 拒绝的 Promise。\n\n#### 错误\n\n指定时间过后,抛出 `TimeoutError`。\n"
  },
  {
    "path": "docs/zh_hans/reference/promise/withTimeout.md",
    "content": "# withTimeout\n\n为异步函数设置时间限制,如果在指定时间内未完成,则抛出 `TimeoutError`。\n\n```typescript\nawait withTimeout(run, ms);\n```\n\n## 用法\n\n### `withTimeout(run, ms)`\n\n当您想要为异步任务设置超时时,可以使用 `withTimeout`。如果 Promise 在指定时间内未完成,将以 `TimeoutError` 拒绝,从而防止无限等待的情况。\n\n```typescript\nimport { withTimeout } from 'es-toolkit/promise';\n\nasync function fetchData() {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n}\n\ntry {\n  // 必须在 1 秒内完成\n  const data = await withTimeout(fetchData, 1000);\n  console.log('收到数据:', data);\n} catch (error) {\n  if (error.name === 'TimeoutError') {\n    console.log('请求超时');\n  }\n}\n```\n\n当您想要为数据库查询设置时间限制时也可以使用。\n\n```typescript\nasync function queryDatabase(query: string) {\n  // 数据库查询逻辑\n  return await db.execute(query);\n}\n\ntry {\n  const result = await withTimeout(\n    () => queryDatabase('SELECT * FROM users'),\n    5000 // 5秒限制\n  );\n  console.log('查询结果:', result);\n} catch (error) {\n  console.log('查询耗时过长已取消');\n}\n```\n\n在多个 API 调用中只想接收最快响应的情况下也可以使用。\n\n```typescript\nasync function getFastestResponse() {\n  const apis = [() => fetch('/api/server1'), () => fetch('/api/server2'), () => fetch('/api/server3')];\n\n  try {\n    // 为每个 API 设置 2 秒限制,只接收最快的响应\n    const promises = apis.map(api => withTimeout(api, 2000));\n    const result = await Promise.race(promises);\n    return result.json();\n  } catch (error) {\n    console.log('所有 API 均已超时');\n  }\n}\n```\n\n#### 参数\n\n- `run` (`() => Promise<T>`): 要执行的异步函数。\n- `ms` (`number`): 超时前的毫秒数。\n\n#### 返回值\n\n(`Promise<T>`): 返回给定异步函数的结果,或在超时时以 TimeoutError 拒绝的 Promise。\n\n#### 错误\n\n如果在指定时间内未完成,抛出 `TimeoutError`。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/countBy.md",
    "content": "# countBy (`Set`)\n\n根据转换函数计算Set中项目的出现次数。\n\n```typescript\nconst counts = countBy(set, mapper);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `countBy(set, mapper)`\n\n当您想计算Set中有多少元素属于不同类别时,请使用 `countBy`。提供一个从每个值生成键的函数,它返回一个Map,其中生成的键及其计数作为值。对于转换产生相同键的每个元素,计数会递增。\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = countBy(set, value => (value % 2 === 0 ? 'even' : 'odd'));\n// 结果: Map(2) { 'odd' => 3, 'even' => 2 }\n```\n\n可以根据各种标准计算元素。\n\n```typescript\nimport { countBy } from 'es-toolkit/set';\n\n// 按字符串长度计数\nconst words = new Set(['apple', 'banana', 'cherry', 'date']);\n\nconst byLength = countBy(words, word => word.length);\n// 结果: Map(3) { 5 => 1, 6 => 2, 4 => 1 }\n\n// 按属性计数\nconst users = new Set([\n  { name: 'Alice', role: 'admin' },\n  { name: 'Bob', role: 'user' },\n  { name: 'Charlie', role: 'user' },\n  { name: 'Diana', role: 'admin' },\n]);\n\nconst byRole = countBy(users, user => user.role);\n// 结果: Map(2) { 'admin' => 2, 'user' => 2 }\n\n// 按派生类别计数\nconst ages = new Set([15, 25, 35, 45, 55]);\n\nconst ageGroups = countBy(ages, age => {\n  if (age < 18) return 'minor';\n  if (age < 65) return 'adult';\n  return 'senior';\n});\n// 结果: Map(2) { 'minor' => 1, 'adult' => 4 }\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要计算出现次数的Set。\n- `mapper` (`(value: T, value2: T, set: Set<T>) => K`): 生成用于计数的键的函数。\n\n#### 返回值\n\n(`Map<K, number>`): 返回包含映射键及其计数的Map。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/every.md",
    "content": "# every (`Set`)\n\n测试Set中的所有元素是否满足提供的谓词函数。\n\n```typescript\nconst allMatch = every(set, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `every(set, doesMatch)`\n\n当您想检查Set中的所有元素是否满足特定条件时,请使用 `every`。提供一个测试每个元素的谓词函数,如果所有元素都满足谓词,它返回true,否则返回false。\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\nconst set = new Set([10, 20, 30]);\n\nconst result = every(set, value => value > 5);\n// 结果: true\n\nconst result2 = every(set, value => value > 15);\n// 结果: false\n```\n\n您可以测试各种条件。\n\n```typescript\nimport { every } from 'es-toolkit/set';\n\n// 检查所有值是否满足条件\nconst ages = new Set([25, 30, 35, 40]);\n\nconst allAdults = every(ages, age => age >= 18);\n// 结果: true\n\nconst allSeniors = every(ages, age => age >= 65);\n// 结果: false\n\n// 检查对象属性\nconst users = new Set([\n  { name: 'Alice', active: true },\n  { name: 'Bob', active: true },\n  { name: 'Charlie', active: true },\n]);\n\nconst allActive = every(users, user => user.active);\n// 结果: true\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要测试的Set。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 测试每个元素的谓词函数。\n\n#### 返回值\n\n(`boolean`): 如果所有元素都满足谓词则返回true,否则返回false。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/filter.md",
    "content": "# filter (`Set`)\n\n根据谓词函数过滤Set。\n\n```typescript\nconst filtered = filter(set, callback);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `filter(set, callback)`\n\n当您想创建一个仅包含满足特定条件的元素的新Set时,请使用 `filter`。提供一个测试每个元素的谓词函数,它返回一个仅包含谓词返回true的元素的新Set。\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3, 4, 5]);\n\nconst result = filter(set, value => value > 2);\n// 结果: Set(3) { 3, 4, 5 }\n```\n\n您可以根据各种标准进行过滤。\n\n```typescript\nimport { filter } from 'es-toolkit/set';\n\n// 按值类型过滤\nconst numbers = new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n\nconst evenNumbers = filter(numbers, num => num % 2 === 0);\n// 结果: Set(5) { 2, 4, 6, 8, 10 }\n\n// 过滤对象\nconst products = new Set([\n  { name: 'Laptop', price: 1000, available: true },\n  { name: 'Mouse', price: 25, available: false },\n  { name: 'Keyboard', price: 75, available: true },\n]);\n\nconst availableProducts = filter(products, product => product.available);\n// 结果: 包含Laptop和Keyboard的Set\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要过滤的Set。\n- `callback` (`(value: T, value2: T, set: Set<T>) => boolean`): 测试每个元素的谓词函数。\n\n#### 返回值\n\n(`Set<T>`): 仅包含满足谓词的元素的新Set。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/find.md",
    "content": "# find (`Set`)\n\n查找Set中谓词函数返回true的第一个元素。\n\n```typescript\nconst element = find(set, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `find(set, doesMatch)`\n\n当您想查找Set中符合特定条件的第一个元素时,请使用 `find`。提供一个测试每个元素的谓词函数,它返回第一个匹配的元素,如果未找到则返回undefined。\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\nconst set = new Set([\n  { name: 'apple', quantity: 10 },\n  { name: 'banana', quantity: 5 },\n  { name: 'grape', quantity: 15 },\n]);\n\nconst result = find(set, value => value.quantity > 10);\n// 结果: { name: 'grape', quantity: 15 }\n```\n\n您可以根据各种标准进行搜索。\n\n```typescript\nimport { find } from 'es-toolkit/set';\n\n// 按值属性查找\nconst users = new Set([\n  { id: 1, name: 'Alice', age: 25 },\n  { id: 2, name: 'Bob', age: 30 },\n  { id: 3, name: 'Charlie', age: 35 },\n]);\n\nconst senior = find(users, user => user.age >= 35);\n// 结果: { id: 3, name: 'Charlie', age: 35 }\n\n// 按字符串模式查找\nconst emails = new Set(['user@example.com', 'admin@example.com', 'info@company.com']);\n\nconst adminEmail = find(emails, email => email.startsWith('admin'));\n// 结果: 'admin@example.com'\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要搜索的Set。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 测试每个元素的谓词函数。\n\n#### 返回值\n\n(`T | undefined`): 满足谓词的第一个元素,如果未找到则返回undefined。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/forEach.md",
    "content": "# forEach (`Set`)\n\n对Set中的每个元素执行一次提供的函数。\n\n```typescript\nforEach(set, callback);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `forEach(set, callback)`\n\n当您想对Set中的每个元素执行函数时,请使用 `forEach`。回调函数接收值两次(为了与Map.forEach保持一致)和Set本身作为参数。这对于日志记录、更新外部状态或对每个元素执行操作等副作用很有用。\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nforEach(set, value => {\n  console.log(value * 2);\n});\n// 输出:\n// 2\n// 4\n// 6\n```\n\n可以对每个元素执行各种操作。\n\n```typescript\nimport { forEach } from 'es-toolkit/set';\n\n// 累积值\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nlet sum = 0;\nforEach(numbers, value => {\n  sum += value;\n});\n// sum现在是15\n\n// 带转换地将元素收集到数组中\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased: string[] = [];\nforEach(names, value => {\n  uppercased.push(value.toUpperCase());\n});\n// uppercased: ['ALICE', 'BOB', 'CHARLIE']\n\n// 根据条件更新外部Set\nconst scores = new Set([85, 92, 78, 95, 88]);\n\nconst highScores = new Set<number>();\nforEach(scores, value => {\n  if (value >= 90) {\n    highScores.add(value);\n  }\n});\n// highScores包含92和95\n\n// 处理对象\nconst users = new Set([\n  { id: 1, name: 'Alice', active: true },\n  { id: 2, name: 'Bob', active: false },\n  { id: 3, name: 'Charlie', active: true },\n]);\n\nconst activeUserIds: number[] = [];\nforEach(users, user => {\n  if (user.active) {\n    activeUserIds.push(user.id);\n  }\n});\n// activeUserIds: [1, 3]\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要迭代的Set。\n- `callback` (`(value: T, value2: T, set: Set<T>) => void`): 对每个元素执行的函数。\n\n#### 返回值\n\n(`void`): 此函数不返回值。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/keyBy.md",
    "content": "# keyBy (`Set`)\n\n根据提供的键生成函数映射Set的每个元素。\n\n```typescript\nconst result = keyBy(set, getKeyFromValue);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `keyBy(set, getKeyFromValue)`\n\n当您想通过从值生成键将Set转换为Map时,请使用 `keyBy`。提供一个从每个值生成键的函数,它返回一个新Map,其中键由键函数生成,值是原始集合中的相应值。如果多个元素产生相同的键,则使用最后遇到的值。\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\nconst set = new Set([\n  { type: 'fruit', name: 'apple' },\n  { type: 'fruit', name: 'banana' },\n  { type: 'vegetable', name: 'carrot' },\n]);\n\nconst result = keyBy(set, item => item.type);\n// 结果:\n// Map(2) {\n//   'fruit' => { type: 'fruit', name: 'banana' },\n//   'vegetable' => { type: 'vegetable', name: 'carrot' }\n// }\n// 注意: 'banana'被保留是因为它是最后一个'fruit'\n```\n\n可以根据各种标准创建索引。\n\n```typescript\nimport { keyBy } from 'es-toolkit/set';\n\n// 按ID索引\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n  { id: 3, name: 'Charlie' },\n]);\n\nconst byId = keyBy(users, user => user.id);\n// 结果: Map(3) { 1 => {...}, 2 => {...}, 3 => {...} }\n\n// 按名称索引\nconst byName = keyBy(users, user => user.name);\n// 结果: 键为'Alice', 'Bob', 'Charlie'的Map\n\n// 按派生值索引\nconst numbers = new Set([1, 2, 3, 4, 5]);\n\nconst byParity = keyBy(numbers, num => (num % 2 === 0 ? 'even' : 'odd'));\n// 结果: Map(2) {\n//   'odd' => 5,\n//   'even' => 4\n// }\n// 注意: 保留最后的偶数(4)和最后的奇数(5)\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要映射的元素的Set。\n- `getKeyFromValue` (`(value: T, value2: T, set: Set<T>) => K`): 从值生成键的函数。\n\n#### 返回值\n\n(`Map<K, T>`): 返回一个Map,其中生成的键映射到每个元素的值。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/map.md",
    "content": "# map (`Set`)\n\n创建一个具有通过提供的函数转换的元素的新Set。\n\n```typescript\nconst transformed = map(set, getNewValue);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `map(set, getNewValue)`\n\n当您想要转换Set的元素时,请使用 `map`。提供一个从每个元素生成新值的函数,它返回一个具有转换后元素的新Set。\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = map(set, value => value * 2);\n// 结果: Set(3) { 2, 4, 6 }\n```\n\n您可以通过各种方式转换元素。\n\n```typescript\nimport { map } from 'es-toolkit/set';\n\n// 转换字符串\nconst names = new Set(['alice', 'bob', 'charlie']);\n\nconst uppercased = map(names, name => name.toUpperCase());\n// 结果: Set(3) { 'ALICE', 'BOB', 'CHARLIE' }\n\n// 转换对象\nconst prices = new Set([10, 20, 30]);\n\nconst products = map(prices, price => ({ price, currency: 'USD' }));\n// 结果: 包含对象{ price: 10, currency: 'USD' }等的Set\n\n// 提取属性\nconst users = new Set([\n  { id: 1, name: 'Alice' },\n  { id: 2, name: 'Bob' },\n]);\n\nconst ids = map(users, user => user.id);\n// 结果: Set(2) { 1, 2 }\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要转换的Set。\n- `getNewValue` (`(value: T, value2: T, set: Set<T>) => U`): 从元素生成新值的函数。\n\n#### 返回值\n\n(`Set<U>`): 具有转换后元素的新Set。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/reduce.md",
    "content": "# reduce (`Set`)\n\n通过遍历Set的元素并应用回调函数,将Set归约为单个值。\n\n```typescript\nconst result = reduce(set, callback, initialValue);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `reduce(set, callback, initialValue?)`\n\n当您想通过累积每个元素的结果将Set转换为单个值时,请使用 `reduce`。提供一个处理每个元素并更新累加器的回调函数。如果提供了初始值,它将用作起始累加器值。如果未提供初始值且Set为空,则会抛出TypeError。\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = reduce(set, (acc, value) => acc + value, 0);\n// 结果: 6\n```\n\n您可以通过各种方式归约Set。\n\n```typescript\nimport { reduce } from 'es-toolkit/set';\n\n// 带初始值的求和\nconst numbers = new Set([10, 20, 30, 40]);\n\nconst total = reduce(numbers, (acc, num) => acc + num, 0);\n// 结果: 100\n\n// 不带初始值(使用第一个元素)\nconst values = new Set([5, 10]);\n\nconst sum = reduce(values, (acc, value) => acc + value);\n// 结果: 15(从第一个值5开始)\n\n// 从Set构建数组\nconst uniqueNames = new Set(['Alice', 'Bob', 'Charlie']);\n\nconst nameList = reduce(uniqueNames, (acc, name) => [...acc, name.toUpperCase()], [] as string[]);\n// 结果: ['ALICE', 'BOB', 'CHARLIE']\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要归约的Set。\n- `callback` (`(accumulator: A, value: T, value2: T, set: Set<T>) => A`): 处理每个元素并更新累加器的函数。\n- `initialValue` (`A`,可选): 累加器的初始值。如果未提供,则使用Set中的第一个元素。\n\n#### 返回值\n\n(`A`): 最终累积的值。\n\n#### 抛出\n\n(`TypeError`): 如果Set为空且未提供初始值。\n"
  },
  {
    "path": "docs/zh_hans/reference/set/some.md",
    "content": "# some (`Set`)\n\n测试Set中是否至少有一个元素满足提供的谓词函数。\n\n```typescript\nconst anyMatch = some(set, doesMatch);\n```\n\n::: info\n\n此函数仅可从 `es-toolkit/set` 获得,以避免与其他集合类型的类似函数发生潜在冲突。\n\n:::\n\n## 用法\n\n### `some(set, doesMatch)`\n\n当您想检查Set中是否至少有一个元素满足特定条件时,请使用 `some`。提供一个测试每个元素的谓词函数,如果至少有一个元素满足谓词,它返回true,否则返回false。\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\nconst set = new Set([1, 2, 3]);\n\nconst result = some(set, value => value > 2);\n// 结果: true\n\nconst result2 = some(set, value => value > 5);\n// 结果: false\n```\n\n您可以测试各种条件。\n\n```typescript\nimport { some } from 'es-toolkit/set';\n\n// 检查是否有任何值满足条件\nconst numbers = new Set([1, 3, 5, 7, 9]);\n\nconst hasEven = some(numbers, num => num % 2 === 0);\n// 结果: false\n\nconst hasLarge = some(numbers, num => num > 5);\n// 结果: true\n\n// 检查对象属性\nconst users = new Set([\n  { name: 'Alice', admin: false },\n  { name: 'Bob', admin: true },\n  { name: 'Charlie', admin: false },\n]);\n\nconst hasAdmin = some(users, user => user.admin);\n// 结果: true\n```\n\n#### 参数\n\n- `set` (`Set<T>`): 要测试的Set。\n- `doesMatch` (`(value: T, value2: T, set: Set<T>) => boolean`): 测试每个元素的谓词函数。\n\n#### 返回值\n\n(`boolean`): 如果至少有一个元素满足谓词则返回true,否则返回false。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/camelCase.md",
    "content": "# camelCase\n\n将字符串转换为驼峰命名法(Camel case)。\n\n```typescript\nconst result = camelCase(str);\n```\n\n## 用法\n\n### `camelCase(str)`\n\n当您想将字符串转换为驼峰命名法时,请使用 `camelCase`。驼峰命名法是一种命名规则,第一个单词以小写字母开头,其余单词的首字母大写并连接在一起。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// 将各种形式的字符串转换为驼峰命名法\ncamelCase('hello world'); // returns 'helloWorld'\ncamelCase('some-hyphen-text'); // returns 'someHyphenText'\ncamelCase('CONSTANT_CASE'); // returns 'constantCase'\ncamelCase('PascalCase'); // returns 'pascalCase'\ncamelCase('mixed   SpAcE'); // returns 'mixedSpAcE'\n```\n\n将包含特殊字符、空格、连字符等分隔符的字符串转换为适合用作JavaScript变量名或对象属性名的形式。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\n// 转换从API响应中接收的键\nconst apiKey = 'user_first_name';\nconst jsKey = camelCase(apiKey); // 'userFirstName'\n\n// 将HTML属性转换为JavaScript属性\nconst cssProperty = 'background-color';\nconst jsProperty = camelCase(cssProperty); // 'backgroundColor'\n```\n\n也会保留Unicode字符。\n\n```typescript\nimport { camelCase } from 'es-toolkit/string';\n\ncamelCase('keep unicode 😅'); // returns 'keepUnicode😅'\ncamelCase('한글-테스트'); // returns '한글테스트'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为驼峰命名法的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为驼峰命名法的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/capitalize.md",
    "content": "# capitalize\n\n将字符串的第一个字符转换为大写,其余字符转换为小写。\n\n```typescript\nconst result = capitalize(str);\n```\n\n## 用法\n\n### `capitalize(str)`\n\n当您想将字符串的第一个字母转换为大写,其余字母统一为小写时,请使用 `capitalize`。在规范化姓名或标题时非常有用。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// 基本用法\ncapitalize('hello'); // returns 'Hello'\ncapitalize('WORLD'); // returns 'World'\ncapitalize('javaScript'); // returns 'Javascript'\n```\n\n也能正确处理空字符串或单字符字符串。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\ncapitalize(''); // returns ''\ncapitalize('a'); // returns 'A'\ncapitalize('A'); // returns 'A'\n```\n\n可以用于规范化用户输入或创建标题。\n\n```typescript\nimport { capitalize } from 'es-toolkit/string';\n\n// 规范化用户姓名\nconst userName = 'john DOE';\nconst formattedName = userName.split(' ').map(capitalize).join(' ');\n// returns 'John Doe'\n\n// 创建标题\nconst title = capitalize('welcome to our website');\n// returns 'Welcome to our website'\n```\n\n#### 参数\n\n- `str` (`string`): 要将第一个字母转换为大写的字符串。\n\n#### 返回值\n\n(`string`): 返回第一个字母为大写,其余字母为小写的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/constantCase.md",
    "content": "# constantCase\n\n将字符串转换为常量命名法。\n\n```typescript\nconst result = constantCase(str);\n```\n\n## 用法\n\n### `constantCase(str)`\n\n当您想将字符串转换为常量命名法时,请使用 `constantCase`。常量命名法是一种命名规则,所有字符都大写,单词之间用下划线(`_`)分隔。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 将各种形式的字符串转换为常量命名法\nconstantCase('hello world'); // returns 'HELLO_WORLD'\nconstantCase('camelCase'); // returns 'CAMEL_CASE'\nconstantCase('some-kebab-case'); // returns 'SOME_KEBAB_CASE'\nconstantCase('PascalCase'); // returns 'PASCAL_CASE'\nconstantCase('snake_case'); // returns 'SNAKE_CASE'\n```\n\n这是在JavaScript或其他编程语言中定义常量时常用的命名规则。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\n// 生成环境变量名\nconst configKey = 'api base url';\nconst envVar = constantCase(configKey); // 'API_BASE_URL'\n\n// 生成常量名\nconst settingName = 'maximum retry count';\nconst constantName = constantCase(settingName); // 'MAXIMUM_RETRY_COUNT'\n```\n\n也能适当处理包含空格或特殊字符的字符串。\n\n```typescript\nimport { constantCase } from 'es-toolkit/string';\n\nconstantCase('HTTP Request'); // returns 'HTTP_REQUEST'\nconstantCase('user-agent-string'); // returns 'USER_AGENT_STRING'\nconstantCase('  multiple   spaces  '); // returns 'MULTIPLE_SPACES'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为常量命名法的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为常量命名法的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/deburr.md",
    "content": "# deburr\n\n将特殊字符和变音符号转换为ASCII字符。\n\n```typescript\nconst result = deburr(str);\n```\n\n## 用法\n\n### `deburr(str)`\n\n当您想将字符串中的特殊字符或变音符号转换为ASCII字符时,请使用 `deburr`。它对于在URL、文件名或搜索功能中规范化字符很有用。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 基本用法\ndeburr('café'); // returns 'cafe'\ndeburr('résumé'); // returns 'resume'\ndeburr('naïve'); // returns 'naive'\ndeburr('Zürich'); // returns 'Zurich'\n```\n\n它可以处理各种语言的特殊字符。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 德语\ndeburr('München'); // returns 'Munchen'\ndeburr('Björk'); // returns 'Bjork'\n\n// 法语\ndeburr('Crème brûlée'); // returns 'Creme brulee'\ndeburr('naïveté'); // returns 'naivete'\n\n// 西班牙语\ndeburr('niño'); // returns 'nino'\ndeburr('mañana'); // returns 'manana'\n```\n\n可以用于URL生成或文件名清理。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\n// 生成URL slug\nconst title = 'Café의 특별한 메뉴';\nconst slug = deburr(title).toLowerCase().replace(/\\s+/g, '-');\n// returns 'cafe의-특별한-메뉴'\n\n// 清理文件名\nconst fileName = 'résumé-김철수.pdf';\nconst cleanName = deburr(fileName); // returns 'resume-김철수.pdf'\n```\n\n它使搜索功能中的字符串比较更容易。\n\n```typescript\nimport { deburr } from 'es-toolkit/string';\n\nfunction searchMatch(query: string, target: string): boolean {\n  const normalizedQuery = deburr(query.toLowerCase());\n  const normalizedTarget = deburr(target.toLowerCase());\n  return normalizedTarget.includes(normalizedQuery);\n}\n\nsearchMatch('cafe', 'Café Mocha'); // returns true\nsearchMatch('resume', 'résumé.pdf'); // returns true\n```\n\n#### 参数\n\n- `str` (`string`): 包含特殊字符或变音符号的字符串。\n\n#### 返回值\n\n(`string`): 返回特殊字符和变音符号转换为ASCII字符的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/escape.md",
    "content": "# escape\n\n将HTML中具有特殊意义的字符转换为安全的实体。\n\n```typescript\nconst result = escape(str);\n```\n\n## 用法\n\n### `escape(str)`\n\n当您想在HTML中安全插入文本时,请使用 `escape`。它将 `&`、`<`、`>`、`\"`、`'` 等特殊字符转换为HTML实体,以防止XSS攻击并确保HTML正确显示。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 处理基本HTML特殊字符\nescape('<div>Hello World</div>'); // returns '&lt;div&gt;Hello World&lt;/div&gt;'\nescape('Tom & Jerry'); // returns 'Tom &amp; Jerry'\nescape('\"Hello\"'); // returns '&quot;Hello&quot;'\nescape(\"'Hello'\"); // returns '&#39;Hello&#39;'\n```\n\n在HTML中显示用户输入时,为了安全必须使用它。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 处理用户输入\nconst userInput = '<script>alert(\"XSS\")</script>';\nconst safeHtml = `<div>${escape(userInput)}</div>`;\n// returns '<div>&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;</div>'\n\n// 生成动态HTML\nconst title = 'Article \"How to & Why\"';\nconst html = `<h1>${escape(title)}</h1>`;\n// returns '<h1>Article &quot;How to &amp; Why&quot;</h1>'\n```\n\n可以在模板或评论系统中使用。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\n// 评论系统\nfunction renderComment(comment: string, author: string) {\n  return `\n    <div class=\"comment\">\n      <strong>${escape(author)}</strong>: ${escape(comment)}\n    </div>\n  `;\n}\n\n// 使用示例\nconst html = renderComment('I love <coding> & \"programming\"!', 'John Doe');\n// returns '<div class=\"comment\"><strong>John Doe</strong>: I love &lt;coding&gt; &amp; &quot;programming&quot;!</div>'\n```\n\n将JSON字符串放入HTML属性时也很有用。\n\n```typescript\nimport { escape } from 'es-toolkit/string';\n\nconst data = { message: 'Hello & \"welcome\"' };\nconst jsonString = JSON.stringify(data);\nconst htmlAttribute = `<div data-info=\"${escape(jsonString)}\"></div>`;\n// returns '<div data-info=\"{&quot;message&quot;:&quot;Hello &amp; \\\\&quot;welcome\\\\&quot;&quot;}\"></div>'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换以在HTML中安全使用的字符串。\n\n#### 返回值\n\n(`string`): 返回字符转换为HTML实体的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/escapeRegExp.md",
    "content": "# escapeRegExp\n\n将正则表达式中具有特殊意义的字符转换为普通字符。\n\n```typescript\nconst result = escapeRegExp(str);\n```\n\n## 用法\n\n### `escapeRegExp(str)`\n\n当您想在正则表达式模式中安全地使用字符串时,请使用 `escapeRegExp`。它转义正则表达式特殊字符,如 `^`、`$`、`\\`、`.`、`*`、`+`、`?`、`(`、`)`、`[`、`]`、`{`、`}` 和 `|`,使它们字面匹配。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 基本用法\nescapeRegExp('Hello.'); // returns 'Hello\\\\.'\nescapeRegExp('(test)'); // returns '\\\\(test\\\\)'\nescapeRegExp('user@domain.com'); // returns 'user@domain\\\\.com'\nescapeRegExp('[abc]'); // returns '\\\\[abc\\\\]'\n```\n\n在将用户输入用作正则表达式模式时这是必不可少的。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 将用户搜索词用作正则表达式\nfunction searchInText(text: string, searchTerm: string): boolean {\n  const escapedTerm = escapeRegExp(searchTerm);\n  const regex = new RegExp(escapedTerm, 'i'); // 不区分大小写\n  return regex.test(text);\n}\n\nsearchInText('Visit https://example.com', 'https://example.com'); // returns true\nsearchInText('Price: $19.99', '$19.99'); // returns true\n```\n\n也可以用于字符串替换。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\nfunction replaceAll(text: string, search: string, replacement: string): string {\n  const escapedSearch = escapeRegExp(search);\n  const regex = new RegExp(escapedSearch, 'g');\n  return text.replace(regex, replacement);\n}\n\nconst html = '<div>Hello</div> <span>World</span>';\nconst result = replaceAll(html, '<div>', '<section>');\n// returns '<section>Hello</div> <span>World</span>'\n```\n\n它对处理文件路径或URL很有用。\n\n```typescript\nimport { escapeRegExp } from 'es-toolkit/string';\n\n// 检查文件扩展名\nfunction hasExtension(filename: string, extension: string): boolean {\n  const escapedExt = escapeRegExp(extension);\n  const regex = new RegExp(`\\\\.${escapedExt}$`, 'i');\n  return regex.test(filename);\n}\n\nhasExtension('document.pdf', 'pdf'); // returns true\nhasExtension('image.jpg', 'pdf'); // returns false\n\n// URL匹配\nfunction matchesUrl(text: string, url: string): boolean {\n  const escapedUrl = escapeRegExp(url);\n  const regex = new RegExp(escapedUrl);\n  return regex.test(text);\n}\n\nconst content = 'Visit our site at https://es-toolkit.dev/ for more info';\nmatchesUrl(content, 'https://es-toolkit.dev/'); // returns true\n```\n\n#### 参数\n\n- `str` (`string`): 要转义正则表达式特殊字符的字符串。\n\n#### 返回值\n\n(`string`): 返回正则表达式特殊字符已转义的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/kebabCase.md",
    "content": "# kebabCase\n\n将字符串转换为短横线命名法。\n\n```typescript\nconst result = kebabCase(str);\n```\n\n## 用法\n\n### `kebabCase(str)`\n\n当您想将字符串转换为短横线命名法时，请使用 `kebabCase`。短横线命名法是一种命名约定，其中每个单词都以小写字母书写，并用短横线（-）连接。\n\n```typescript\nimport { kebabCase } from 'es-toolkit/string';\n\n// 将驼峰命名法转换为短横线命名法\nkebabCase('camelCase');\n// 结果：'camel-case'\n\n// 转换带有空格的字符串\nkebabCase('some whitespace');\n// 结果：'some-whitespace'\n\n// 保持已经是短横线命名法的字符串不变\nkebabCase('hyphen-text');\n// 结果：'hyphen-text'\n\n// 转换包含大写字母的字符串\nkebabCase('HTTPRequest');\n// 结果：'http-request'\n```\n\n此函数在创建 API 端点、CSS 类名、HTML 属性等时非常有用。\n\n#### 参数\n\n- `str` (`string`)：要转换为短横线命名法的字符串。\n\n#### 返回值\n\n(`string`)：转换为短横线命名法的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/lowerCase.md",
    "content": "# lowerCase\n\n将字符串转换为小写格式。\n\n```typescript\nconst result = lowerCase(str);\n```\n\n## 用法\n\n### `lowerCase(str)`\n\n当您想将字符串转换为小写格式时，请使用 `lowerCase`。小写格式是一种命名约定，其中所有单词都用小写字母书写，单词之间用空格分隔。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 将各种格式的字符串转换为小写格式\nlowerCase('Hello World'); // returns 'hello world'\nlowerCase('camelCase'); // returns 'camel case'\nlowerCase('some-kebab-case'); // returns 'some kebab case'\nlowerCase('PascalCase'); // returns 'pascal case'\nlowerCase('SCREAMING_SNAKE_CASE'); // returns 'screaming snake case'\n```\n\n在创建面向用户的文本或标题时非常有用。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 生成用户界面文本\nconst fieldName = 'firstName';\nconst label = lowerCase(fieldName); // 'first name'\n\n// 将 API 键转换为用户友好的文本\nconst apiKeys = ['userEmail', 'phoneNumber', 'birthDate'];\nconst labels = apiKeys.map(key => lowerCase(key));\n// returns ['user email', 'phone number', 'birth date']\n```\n\n在显示配置或选项名称时也可以使用。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\n// 显示设置菜单\nconst settings = {\n  enableNotifications: true,\n  darkModeEnabled: false,\n  autoSaveInterval: 300,\n};\n\nfor (const [key, value] of Object.entries(settings)) {\n  const displayName = lowerCase(key);\n  console.log(`${displayName}: ${value}`);\n}\n// 输出:\n// enable notifications: true\n// dark mode enabled: false\n// auto save interval: 300\n```\n\n它可以正确处理带有特殊字符或空格的字符串。\n\n```typescript\nimport { lowerCase } from 'es-toolkit/string';\n\nlowerCase('HTTPSConnection'); // returns 'https connection'\nlowerCase('user_profile-settings'); // returns 'user profile settings'\nlowerCase('  mixed   CASE   text  '); // returns 'mixed case text'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为小写格式的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为小写格式的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/lowerFirst.md",
    "content": "# lowerFirst\n\n将字符串的第一个字符转换为小写。\n\n```typescript\nconst result = lowerFirst(str);\n```\n\n## 用法\n\n### `lowerFirst(str)`\n\n当您想要将字符串的第一个字母转换为小写时,请使用 `lowerFirst`。其余字符保持不变。这对于创建驼峰式变量名或属性名很有用。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 基本用法\nlowerFirst('Hello'); // returns 'hello'\nlowerFirst('WORLD'); // returns 'wORLD'\nlowerFirst('JavaScript'); // returns 'javaScript'\n```\n\n它可以正确处理空字符串和单字符字符串。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\nlowerFirst(''); // returns ''\nlowerFirst('A'); // returns 'a'\nlowerFirst('a'); // returns 'a'\n```\n\n您可以将其用于驼峰式转换。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 将类名转换为实例变量名\nconst className = 'UserService';\nconst instanceName = lowerFirst(className); // 'userService'\n\n// 将常量名转换为驼峰式\nconst constantName = 'API_BASE_URL';\nconst camelCase = lowerFirst(constantName.toLowerCase().replace(/_(.)/g, (_, letter) => letter.toUpperCase()));\n// 结果为 'apiBaseUrl'\n```\n\n它还可用于 API 响应或数据转换。\n\n```typescript\nimport { lowerFirst } from 'es-toolkit/string';\n\n// 将数据库列名转换为 JavaScript 属性名\nconst dbColumns = ['UserId', 'FirstName', 'LastName', 'EmailAddress'];\nconst jsProperties = dbColumns.map(column => lowerFirst(column));\n// returns ['userId', 'firstName', 'lastName', 'emailAddress']\n\n// 生成函数名\nfunction createGetter(propertyName: string): string {\n  return `get${propertyName}`;\n}\n\nfunction createSetter(propertyName: string): string {\n  return `set${propertyName}`;\n}\n\nconst property = lowerFirst('UserName'); // 'userName'\nconst getter = createGetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'getUserName'\nconst setter = createSetter(property.charAt(0).toUpperCase() + property.slice(1)); // 'setUserName'\n```\n\n#### 参数\n\n- `str` (`string`): 要将第一个字符转换为小写的字符串。\n\n#### 返回值\n\n(`string`): 返回第一个字符已转换为小写的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/pad.md",
    "content": "# pad\n\n在字符串两侧添加字符以达到指定长度。\n\n```typescript\nconst padded = pad(str, length, chars);\n```\n\n## 用法\n\n### `pad(str, length, chars?)`\n\n当字符串长度短于指定长度时，使用 `pad` 在字符串两侧添加字符以匹配目标长度。如果无法在两侧均匀分配填充字符，则右侧会多一个字符。\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\n// 使用默认空格填充\npad('abc', 8);\n// => '  abc   '\n\n// 使用自定义字符填充\npad('abc', 8, '_-');\n// => '_-abc_-_'\n\n// 当字符串已经长于或等于目标长度时\npad('abc', 3);\n// => 'abc'\n\npad('abcdef', 3);\n// => 'abcdef'\n```\n\n当填充字符无法均匀分配到目标长度时，右侧会更长。\n\n```typescript\nimport { pad } from 'es-toolkit/string';\n\npad('abc', 9, '123');\n// => '123abc123' (左侧 3 个字符，右侧 3 个字符)\n\npad('abc', 10, '123');\n// => '123abc1231' (左侧 3 个字符，右侧 4 个字符)\n```\n\n#### 参数\n\n- `str` (`string`): 要填充的字符串。\n- `length` (`number`): 目标长度。\n- `chars` (`string`, 可选): 用于填充的字符。默认值为 `' '`。\n\n#### 返回值\n\n(`string`): 返回填充后的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/pascalCase.md",
    "content": "# pascalCase\n\n将字符串转换为帕斯卡命名法。\n\n```typescript\nconst converted = pascalCase(str);\n```\n\n## 用法\n\n### `pascalCase(str)`\n\n当您想要将字符串转换为帕斯卡命名法时，请使用 `pascalCase`。帕斯卡命名法是一种命名规范，每个单词的首字母大写，单词之间不使用分隔符连接。\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 基本用法\npascalCase('pascalCase'); // 'PascalCase'\npascalCase('some whitespace'); // 'SomeWhitespace'\n\n// 使用连字符或下划线连接的单词\npascalCase('hyphen-text'); // 'HyphenText'\npascalCase('snake_case'); // 'SnakeCase'\n\n// 处理连续的大写字母\npascalCase('HTTPRequest'); // 'HttpRequest'\npascalCase('XMLHttpRequest'); // 'XmlHttpRequest'\n```\n\n它还能正确处理包含各种分隔符的字符串。\n\n```typescript\nimport { pascalCase } from 'es-toolkit/string';\n\n// 混合多种分隔符的情况\npascalCase('camelCase-with_mixed.separators'); // 'CamelCaseWithMixedSeparators'\n\n// 包含数字的情况\npascalCase('version2.1.0'); // 'Version210'\n\n// 包含特殊字符的情况\npascalCase('user@email.com'); // 'UserEmailCom'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为帕斯卡命名法的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为帕斯卡命名法的新字符串。\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { pascalCase } from 'es-toolkit/string';\n\nconsole.log(pascalCase('pascalCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/zh_hans/reference/string/reverseString.md",
    "content": "# reverseString\n\n反转字符串。\n\n```typescript\nconst reversed = reverseString(value);\n```\n\n## 用法\n\n### `reverseString(value)`\n\n当您想要反转字符串中的字符顺序时,请使用 `reverseString`。它可以正确处理 Unicode 字符和表情符号。\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 基本字符串反转\nreverseString('hello'); // 'olleh'\nreverseString('world'); // 'dlrow'\n\n// 混合大小写字符串\nreverseString('PascalCase'); // 'esaClacsaP'\n\n// 包含空格的字符串\nreverseString('hello world'); // 'dlrow olleh'\n```\n\n它可以准确处理表情符号和特殊字符。\n\n```typescript\nimport { reverseString } from 'es-toolkit/string';\n\n// 包含表情符号的字符串\nreverseString('foo 😄 bar'); // 'rab 😄 oof'\nreverseString('안녕하세요'); // '요세하녕안'\n\n// 数字和特殊字符\nreverseString('12345'); // '54321'\nreverseString('a-b-c'); // 'c-b-a'\n```\n\n#### 参数\n\n- `value` (`string`): 要反转的字符串。\n\n#### 返回值\n\n(`string`): 返回一个字符顺序反转的新字符串。\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { reverseString } from 'es-toolkit';\n\nconsole.log(reverseString('hello'));\n```\n\n:::\n"
  },
  {
    "path": "docs/zh_hans/reference/string/snakeCase.md",
    "content": "# snakeCase\n\n将字符串转换为蛇形命名法。\n\n```typescript\nconst converted = snakeCase(str);\n```\n\n## 用法\n\n### `snakeCase(str)`\n\n当您想要将字符串转换为蛇形命名法时，请使用 `snakeCase`。蛇形命名法是一种命名约定，其中每个单词都以小写字母书写，单词之间用下划线(\\_)连接。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 基本用法\nsnakeCase('camelCase'); // 'camel_case'\nsnakeCase('some whitespace'); // 'some_whitespace'\n\n// 用连字符或其他分隔符连接的单词\nsnakeCase('hyphen-text'); // 'hyphen_text'\nsnakeCase('PascalCase'); // 'pascal_case'\n\n// 处理连续大写字母\nsnakeCase('HTTPRequest'); // 'http_request'\nsnakeCase('XMLHttpRequest'); // 'xml_http_request'\n```\n\n它也能正确处理包含各种分隔符的字符串。\n\n```typescript\nimport { snakeCase } from 'es-toolkit/string';\n\n// 混合分隔符的情况\nsnakeCase('camelCase-with_mixed.separators'); // 'camel_case_with_mixed_separators'\n\n// 包含数字的情况\nsnakeCase('version2.1.0'); // 'version_2_1_0'\n\n// 包含特殊字符的情况\nsnakeCase('user@email.com'); // 'user_email_com'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为蛇形命名法的字符串。\n\n#### 返回值\n\n(`string`): 返回转换为蛇形命名法的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/startCase.md",
    "content": "# startCase\n\n将字符串中每个单词的首字母转换为大写。\n\n```typescript\nconst converted = startCase(str);\n```\n\n## 用法\n\n### `startCase(str)`\n\n当您想要将字符串转换为起始大写格式(每个单词的首字母大写)时,请使用 `startCase`。它将每个单词的首字母大写,其余字母转换为小写,并用空格连接单词。\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 基本用法\nstartCase('hello world'); // 'Hello World'\nstartCase('HELLO WORLD'); // 'Hello World'\n\n// 转换驼峰命名或帕斯卡命名\nstartCase('fooBar'); // 'Foo Bar'\nstartCase('PascalCase'); // 'Pascal Case'\n\n// 用连字符或下划线连接的单词\nstartCase('hello-world'); // 'Hello World'\nstartCase('hello_world'); // 'Hello World'\n```\n\n它还能正确处理包含各种分隔符和特殊字符的字符串。\n\n```typescript\nimport { startCase } from 'es-toolkit/string';\n\n// 包含多个分隔符的情况\nstartCase('--foo-bar--'); // 'Foo Bar'\nstartCase('__FOO_BAR__'); // 'Foo Bar'\n\n// 处理连续大写字母和数字\nstartCase('XMLHttpRequest'); // 'Xml Http Request'\nstartCase('_abc_123_def'); // 'Abc 123 Def'\n\n// 空字符串或只有无意义分隔符的情况\nstartCase('_-_-_-_'); // ''\nstartCase('12abc 12ABC'); // '12 Abc 12 Abc'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为起始大写格式的字符串。\n\n#### 返回值\n\n(`string`): 返回一个新字符串,每个单词的首字母大写并用空格连接。\n\n## 演示\n\n::: sandpack\n\n```ts index.ts\nimport { startCase } from 'es-toolkit/string';\n\nconsole.log(startCase('startCase'));\n```\n\n:::\n"
  },
  {
    "path": "docs/zh_hans/reference/string/trim.md",
    "content": "# trim\n\n从字符串的开头和结尾删除空白或指定字符。\n\n```typescript\nconst trimmed = trim(str, chars);\n```\n\n## 用法\n\n### `trim(str, chars?)`\n\n当您想从字符串的开头和结尾删除不必要的字符时,请使用 `trim`。如果未指定特定字符,则删除空白字符。\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 基本空白删除\ntrim('  hello  '); // 'hello'\ntrim('\\t\\n  hello  \\r\\n'); // 'hello'\n\n// 删除特定字符\ntrim('--hello--', '-'); // 'hello'\ntrim('***hello***', '*'); // 'hello'\n\n// 如果多个字符中的任何一个匹配则删除\ntrim('##hello##world##', ['#', 'd']); // 'hello##worl'\n```\n\n当您将多个字符指定为数组时,会删除与其中任何一个匹配的所有字符。\n\n```typescript\nimport { trim } from 'es-toolkit/string';\n\n// 将多个字符指定为数组\ntrim('!!@@hello@@!!', ['!', '@']); // 'hello'\n\n// 删除数字和特殊字符\ntrim('123abc123', ['1', '2', '3']); // 'abc'\n\n// 同时删除字符和空格\ntrim('  __hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### 参数\n\n- `str` (`string`): 要从开头和结尾删除字符的字符串。\n- `chars` (`string | string[]`, 可选): 要删除的字符。可以使用字符串或字符数组。默认为空白字符。\n\n#### 返回值\n\n(`string`): 返回从开头和结尾删除指定字符的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/trimEnd.md",
    "content": "# trimEnd\n\n移除字符串末尾的空白字符或指定字符。\n\n```typescript\nconst trimmed = trimEnd(str, chars);\n```\n\n## 用法\n\n### `trimEnd(str, chars?)`\n\n当您想从字符串末尾删除不必要的字符时,请使用 `trimEnd`。如果未指定特定字符,则删除空白字符。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 基本空白字符删除\ntrimEnd('hello  '); // 'hello'\ntrimEnd('hello\\t\\n  '); // 'hello'\n\n// 删除特定字符\ntrimEnd('hello---', '-'); // 'hello'\ntrimEnd('123000', '0'); // '123'\ntrimEnd('abcabcabc', 'c'); // 'abcabcab'\n```\n\n将多个字符指定为数组时,会删除所有匹配其中任何一个的字符。\n\n```typescript\nimport { trimEnd } from 'es-toolkit/string';\n\n// 将多个字符指定为数组\ntrimEnd('hello!!@@', ['!', '@']); // 'hello'\n\n// 删除数字和特殊字符\ntrimEnd('abc123', ['1', '2', '3']); // 'abc'\n\n// 同时删除字符和空白字符\ntrimEnd('hello__  ', ['_', ' ']); // 'hello'\n```\n\n#### 参数\n\n- `str` (`string`): 要从末尾删除字符的字符串。\n- `chars` (`string | string[]`, 可选): 要删除的字符。可以是字符串或字符数组。默认为空白字符。\n\n#### 返回值\n\n(`string`): 返回从末尾删除指定字符后的新字符串。\n\n#### 错误\n\n如果 `chars` 是字符串且长度不为 1,则抛出错误。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/trimStart.md",
    "content": "# trimStart\n\n删除字符串开头的空白或指定字符。\n\n```typescript\nconst trimmed = trimStart(str, chars);\n```\n\n## 用法\n\n### `trimStart(str, chars?)`\n\n当你想要删除字符串开头的不必要字符时使用 `trimStart`。如果不指定特定字符，则删除空白字符。\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 删除默认空白\ntrimStart('  hello'); // 'hello'\ntrimStart('\\t\\n  hello'); // 'hello'\n\n// 删除特定字符\ntrimStart('---hello', '-'); // 'hello'\ntrimStart('000123', '0'); // '123'\ntrimStart('abcabcabc', 'a'); // 'bcabcabc'\n```\n\n如果将多个字符指定为数组，则删除所有匹配其中任意一个的字符。\n\n```typescript\nimport { trimStart } from 'es-toolkit/string';\n\n// 将多个字符指定为数组\ntrimStart('!!@@hello', ['!', '@']); // 'hello'\n\n// 删除数字和特殊字符\ntrimStart('123abc', ['1', '2', '3']); // 'abc'\n\n// 同时删除字符和空白\ntrimStart('  __hello', ['_', ' ']); // 'hello'\n```\n\n#### 参数\n\n- `str` (`string`): 要从开头删除字符的字符串。\n- `chars` (`string | string[]`, 可选): 要删除的字符。可以是字符串或字符数组。默认为空白字符。\n\n#### 返回值\n\n(`string`): 返回一个从开头删除了指定字符的新字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/unescape.md",
    "content": "# unescape\n\n将HTML实体字符转换为原始字符。\n\n```typescript\nconst result = unescape(str);\n```\n\n## 用法\n\n### `unescape(str)`\n\n当您想将HTML实体字符转换回原始字符时,请使用 `unescape`。它将 `&amp;`、`&lt;`、`&gt;`、`&quot;`、`&#39;` 等HTML实体转换为 `&`、`<`、`>`、`\"`、`'` 字符。这是 [`escape`](./escape.md) 函数的逆操作。\n\n```typescript\nimport { unescape } from 'es-toolkit/string';\n\n// 将HTML标签实体转换为原始字符\nunescape('This is a &lt;div&gt; element.');\n// 返回值: 'This is a <div> element.'\n\n// 将引号实体转换为原始字符\nunescape('This is a &quot;quote&quot;');\n// 返回值: 'This is a \"quote\"'\n\n// 将单引号实体转换为原始字符\nunescape('This is a &#39;quote&#39;');\n// 返回值: 'This is a 'quote''\n\n// 将&符号实体转换为原始字符\nunescape('This is a &amp; symbol');\n// 返回值: 'This is a & symbol'\n```\n\n处理来自HTML表单或URL的数据时很有用:\n\n```typescript\n// 转换用户输入中的HTML实体\nconst userInput = 'My favorite tag is &lt;button&gt;';\nconst converted = unescape(userInput);\nconsole.log(converted); // 'My favorite tag is <button>'\n\n// 也可以转换混合多个实体的字符串\nconst mixed = '&quot;Hello &amp; Welcome&quot; &lt;says the &gt; user';\nconst result = unescape(mixed);\nconsole.log(result); // '\"Hello & Welcome\" <says the > user'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换的字符串。\n\n#### 返回值\n\n(`string`): 返回HTML实体已转换为原始字符的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/upperCase.md",
    "content": "# upperCase\n\n将字符串转换为所有字母都是大写且单词用空格分隔的格式。\n\n```typescript\nconst result = upperCase(str);\n```\n\n## 用法\n\n### `upperCase(str)`\n\n当您想将字符串转换为大写表示法时,请使用 `upperCase`。它将每个单词转换为大写并用空格连接单词。可以处理各种表示法的字符串,如 camelCase、kebab-case、snake_case 等。\n\n```typescript\nimport { upperCase } from 'es-toolkit/string';\n\n// 将camelCase转换为大写表示法\nupperCase('camelCase');\n// 返回值: 'CAMEL CASE'\n\n// 也可以转换已有空格的字符串\nupperCase('some whitespace');\n// 返回值: 'SOME WHITESPACE'\n\n// 将kebab-case转换为大写表示法\nupperCase('hyphen-text');\n// 返回值: 'HYPHEN TEXT'\n\n// 也可以处理连续大写字母的字符串\nupperCase('HTTPSRequest');\n// 返回值: 'HTTPS REQUEST'\n```\n\n将各种命名约定转换为统一的大写格式时很有用:\n\n```typescript\n// 统一API响应中的各种键名\nconst apiKeys = ['user_name', 'firstName', 'email-address', 'phoneNumber'];\nconst upperCaseKeys = apiKeys.map(key => upperCase(key));\nconsole.log(upperCaseKeys);\n// ['USER NAME', 'FIRST NAME', 'EMAIL ADDRESS', 'PHONE NUMBER']\n\n// 显示文件名时使用\nconst fileName = 'profile_image_thumbnail.jpg';\nconst displayName = upperCase(fileName.replace('.jpg', ''));\nconsole.log(displayName); // 'PROFILE IMAGE THUMBNAIL'\n```\n\n#### 参数\n\n- `str` (`string`): 要转换为大写表示法的字符串。\n\n#### 返回值\n\n(`string`): 返回每个单词都转换为大写并用空格分隔的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/upperFirst.md",
    "content": "# upperFirst\n\n将字符串的第一个字符转换为大写。\n\n```typescript\nconst result = upperFirst(str);\n```\n\n## 用法\n\n### `upperFirst(str)`\n\n当您想将字符串的第一个字母大写而其余字母保持不变时,请使用 `upperFirst`。它在首字母大写句子开头或格式化名称时很有用。\n\n```typescript\nimport { upperFirst } from 'es-toolkit/string';\n\n// 将小写字符串的第一个字母大写\nupperFirst('fred');\n// 返回值: 'Fred'\n\n// 如果第一个字母已经是大写,则保持不变\nupperFirst('Fred');\n// 返回值: 'Fred'\n\n// 即使所有字母都是大写也保持不变\nupperFirst('FRED');\n// 返回值: 'FRED'\n```\n\n在各种情况下都很有用:\n\n```typescript\n// 格式化用户名\nconst userName = 'john';\nconst displayName = upperFirst(userName);\nconsole.log(displayName); // 'John'\n\n// 将句子的第一个字母大写\nconst sentence = 'hello world';\nconst capitalizedSentence = upperFirst(sentence);\nconsole.log(capitalizedSentence); // 'Hello world'\n\n// 处理多个名称\nconst names = ['alice', 'bob', 'charlie'];\nconst capitalizedNames = names.map(name => upperFirst(name));\nconsole.log(capitalizedNames); // ['Alice', 'Bob', 'Charlie']\n\n// 将camelCase转换为PascalCase\nconst camelCase = 'firstName';\nconst pascalCase = upperFirst(camelCase);\nconsole.log(pascalCase); // 'FirstName'\n```\n\n#### 参数\n\n- `str` (`string`): 要将第一个字母大写的字符串。\n\n#### 返回值\n\n(`string`): 返回第一个字母转换为大写的字符串。\n"
  },
  {
    "path": "docs/zh_hans/reference/string/words.md",
    "content": "# words\n\n将字符串拆分为单词数组。\n\n```typescript\nconst result = words(str);\n```\n\n## 用法\n\n### `words(str)`\n\n当您想将字符串拆分为单独的单词时,请使用 `words`。它根据 camelCase、kebab-case、空格、标点符号拆分单词,并能正确识别表情符号和 Unicode 字符。在处理各种命名约定的字符串时很有用。\n\n```typescript\nimport { words } from 'es-toolkit/string';\n\n// 将由标点符号和空格分隔的字符串拆分为单词\nwords('fred, barney, & pebbles');\n// 返回值: ['fred', 'barney', 'pebbles']\n\n// 正确拆分 camelCase 和连续的大写字母\nwords('camelCaseHTTPRequest🚀');\n// 返回值: ['camel', 'Case', 'HTTP', 'Request', '🚀']\n\n// 处理 Unicode 字符和数字\nwords('Lunedì 18 Set');\n// 返回值: ['Lunedì', '18', 'Set']\n```\n\n在各种情况下将字符串拆分为单词时都很有用:\n\n```typescript\n// 将变量名拆分为单词以转换为其他命名约定\nconst variableName = 'getUserProfile';\nconst wordList = words(variableName);\nconsole.log(wordList); // ['get', 'User', 'Profile']\n\n// 将 snake_case 拆分为单词\nconst snakeCase = 'user_profile_data';\nconst snakeWords = words(snakeCase);\nconsole.log(snakeWords); // ['user', 'profile', 'data']\n\n// 将 kebab-case 拆分为单词\nconst kebabCase = 'user-profile-data';\nconst kebabWords = words(kebabCase);\nconsole.log(kebabWords); // ['user', 'profile', 'data']\n\n// 处理复杂字符串\nconst complex = 'XMLHttpRequest2.0_parser-v1.2';\nconst complexWords = words(complex);\nconsole.log(complexWords); // ['XML', 'Http', 'Request', '2', '0', 'parser', 'v', '1', '2']\n```\n\n#### 参数\n\n- `str` (`string`): 要拆分为单词的字符串。\n\n#### 返回值\n\n(`string[]`): 返回从字符串中拆分出的单词数组。\n"
  },
  {
    "path": "docs/zh_hans/reference/util/assert.md",
    "content": "# assert\n\n断言给定的条件为真。如果条件为假,则抛出错误。\n\n```typescript\nassert(condition, message);\n```\n\n::: info 与 `invariant` 的关系\n\n`assert` 与 `invariant` 函数具有完全相同的功能。唯一的区别是名称。有关更多详细信息,请参阅 [`invariant`](./invariant.md) 文档。\n\n:::\n\n## 用法\n\n### `assert(condition, message)`\n\n当代码中的特定条件必须满足时使用 `assert`。如果条件为假,它会立即抛出错误并停止程序执行。\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// 如果条件为真,则什么都不做\nassert(true, '此消息不会出现');\n\n// 如果条件为假,则抛出错误\nassert(false, '此条件为假'); // Error: 此条件为假\n\n// 检查值不是 null 或 undefined 时\nconst value = getValue();\nassert(value !== null && value !== undefined, '值不能是 null 或 undefined');\n// 现在可以确定 value 既不是 null 也不是 undefined\n\n// 检查数字是否为正数时\nconst number = getNumber();\nassert(number > 0, '数字必须是正数');\n```\n\n你也可以直接传递错误对象。\n\n```typescript\nimport { assert } from 'es-toolkit/util';\n\n// 传递 Error 对象\nassert(false, new Error('自定义错误消息'));\n\n// 使用自定义错误类\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\nassert(false, new ValidationError('验证失败'));\n```\n\n在开发过程中验证代码假设或检查函数输入是否在预期范围内时特别有用。\n\n#### 参数\n\n- `condition` (`unknown`): 要评估的条件。如果评估为假值,则抛出错误。\n- `message` (`string | Error`): 条件为假时要抛出的错误消息或错误对象。\n\n#### 返回值\n\n(`void`): 如果条件为真,则不返回任何内容。\n\n#### 错误\n\n如果条件评估为假,则抛出提供的消息或错误对象。\n"
  },
  {
    "path": "docs/zh_hans/reference/util/attempt.md",
    "content": "# attempt\n\n执行函数并将结果或错误作为元组返回。\n\n```typescript\nconst [error, result] = attempt(func);\n```\n\n## 用法\n\n### `attempt(func)`\n\n当您想安全地执行函数时,请使用 `attempt`。它允许您在不使用 try-catch 块包装代码的情况下处理错误。\n\n```typescript\nimport { attempt } from 'es-toolkit/util';\n\n// 成功的情况\nconst [error, result] = attempt(() => 42);\n// error 为 null,result 为 42\n\n// 发生错误的情况\nconst [error, result] = attempt(() => {\n  throw new Error('出现问题了');\n});\n// error 是 Error 对象,result 为 null\n\n// 您也可以指定类型\nconst [error, names] = attempt<string[], Error>(() => ['Alice', 'Bob']);\n// names 被推断为 string[] 类型\n```\n\n::: warning 不要与异步函数一起使用\n\n此函数不适用于异步函数(返回 `Promise` 的函数)。如果传递异步函数,它将返回 `[null, Promise<T>]`,但即使 Promise 稍后被拒绝,它也无法捕获错误。\n\n对于异步函数,请改用 [`attemptAsync`](./attemptAsync.md) 函数。\n\n```typescript\n// 错误用法\nconst [error, promise] = attempt(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n\n// 正确用法\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n```\n\n:::\n\n#### 参数\n\n- `func` (`() => T`):要执行的函数。\n\n#### 返回值\n\n(`[null, T] | [E, null]`):成功时返回 `[null, 结果值]` 元组,发生错误时返回 `[错误, null]` 元组。\n"
  },
  {
    "path": "docs/zh_hans/reference/util/attemptAsync.md",
    "content": "# attemptAsync\n\n执行异步函数并将结果或错误作为元组返回。\n\n```typescript\nconst [error, result] = await attemptAsync(func);\n```\n\n## 用法\n\n### `attemptAsync(func)`\n\n当您想要安全地执行异步函数时,请使用 `attemptAsync`。您可以在不用 try-catch 包装 async/await 块的情况下处理错误。\n\n```typescript\nimport { attemptAsync } from 'es-toolkit/util';\n\n// API 请求成功的情况\nconst [error, data] = await attemptAsync(async () => {\n  const response = await fetch('https://api.example.com/data');\n  return response.json();\n});\n// error 为 null,data 包含响应数据\n\n// 发生网络错误的情况\nconst [error, data] = await attemptAsync(async () => {\n  throw new Error('网络错误');\n});\n// error 为 Error 对象,data 为 null\n\n// 您也可以指定类型\ninterface User {\n  id: number;\n  name: string;\n}\n\nconst [error, users] = await attemptAsync<User[]>(async () => {\n  const response = await fetch('https://api.example.com/users');\n  return response.json();\n});\n// users 被推断为 User[] 类型\n```\n\n在需要错误处理的异步操作(如数据库查询或文件读取)中特别有用。\n\n```typescript\n// 文件读取示例\nconst [error, content] = await attemptAsync(async () => {\n  const fs = await import('fs/promises');\n  return fs.readFile('config.json', 'utf8');\n});\n\nif (error) {\n  console.log('无法读取文件:', error.message);\n} else {\n  console.log('文件内容:', content);\n}\n```\n\n::: info 对于同步函数请使用 attempt\n\n此函数适用于处理异步函数(返回 `Promise` 的函数)。如果要处理同步函数,建议使用 [`attempt`](./attempt.md) 函数。\n\n:::\n\n#### 参数\n\n- `func` (`() => Promise<T>`): 要执行的异步函数。\n\n#### 返回值\n\n(`Promise<[null, T] | [E, null]>`): 返回一个 Promise,成功时解析为 `[null, 结果值]`,发生错误时解析为 `[错误, null]`。\n"
  },
  {
    "path": "docs/zh_hans/reference/util/invariant.md",
    "content": "# invariant\n\n断言给定的条件为真。如果条件为假,则抛出错误。\n\n```typescript\ninvariant(condition, message);\n```\n\n## 用法\n\n### `invariant(condition, message)`\n\n当代码中的特定条件必须满足时,请使用 `invariant`。如果条件为假,它会立即抛出错误以停止程序执行。\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// 如果条件为真,则不执行任何操作\ninvariant(true, '此消息不会出现');\n\n// 如果条件为假,则抛出错误\ninvariant(false, '此条件为假'); // Error: 此条件为假\n\n// 检查值不为 null 或 undefined 时\nconst value = getValue();\ninvariant(value !== null && value !== undefined, '值不能为 null 或 undefined');\n// 现在可以确定 value 既不是 null 也不是 undefined\n\n// 检查数字是否为正数时\nconst number = getNumber();\ninvariant(number > 0, '数字必须为正数');\n```\n\n您也可以直接传递错误对象。\n\n```typescript\nimport { invariant } from 'es-toolkit/util';\n\n// 传递 Error 对象\ninvariant(false, new Error('自定义错误消息'));\n\n// 使用自定义错误类\nclass ValidationError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ValidationError';\n  }\n}\n\ninvariant(false, new ValidationError('验证失败'));\n```\n\n它在开发过程中验证代码假设或确保函数输入值在预期范围内时特别有用。\n\n#### 参数\n\n- `condition` (`unknown`): 要评估的条件。如果评估为假值,则抛出错误。\n- `message` (`string | Error`): 当条件为假时要抛出的错误消息或错误对象。\n\n#### 返回值\n\n(`void`): 如果条件为真,则不返回任何内容。\n\n#### 错误\n\n如果条件评估为假,则抛出提供的消息或错误对象。\n"
  },
  {
    "path": "docs/zh_hans/usage.md",
    "content": "---\ndescription: 如何使用 es-toolkit\nprev:\n  text: es-toolkit 简介\n  link: ./intro.md\nnext:\n  text: 包体积对比\n  link: ./bundle-size\n---\n\n# 使用方法\n\nes-toolkit 可通过 [npm](https://npmjs.com/package/es-toolkit) 安装，适用于 Node.js 和 Bun，也可以通过 [JSR](https://jsr.io/@es-toolkit/es-toolkit) 安装到 Deno。\n\n你也可以通过 [从 CDN 导入](#浏览器) 的方式在浏览器中使用 es-toolkit。\n\n## Node.js\n\nes-toolkit 支持 Node.js 18及更高版本。使用以下命令安装 es-toolkit：\n\n::: code-group\n\n```sh [npm]\nnpm install es-toolkit\n```\n\n```sh [pnpm]\npnpm add es-toolkit\n```\n\n```sh [yarn]\nyarn add es-toolkit\n```\n\n:::\n\n要使用 es-toolkit 的函数，只需像下面这样使用 `import` 语句即可。\n\n```typescript\nimport { sum } from 'es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Deno\n\nes-toolkit 也可以通过 [JSR](https://jsr.io/@es-toolkit/es-toolkit) 安装到 Deno。使用以下命令安装 es-toolkit：\n\n```sh\ndeno add @es-toolkit/es-toolkit\n```\n\n请注意，根据 JSR 的限制，包名包含额外的作用域，与 npm 不同。\n\n```typescript\nimport { sum } from '@es-toolkit/es-toolkit';\n\nsum([1, 2, 3]);\n```\n\n## Bun\n\nes-toolkit 也支持 Bun。您可以使用以下命令安装它：\n\n```sh\nbun add es-toolkit\n```\n\n## 浏览器\n\n你可以在诸如 [jsdelivr](https://www.jsdelivr.com) 或 [unpkg](https://unpkg.com) 等CDN上找到 es-toolkit。我们将 `_` 定义为包含所有函数，类似于 Lodash。\n\n::: code-group\n\n```html [jsdelivr]\n<script src=\"https://cdn.jsdelivr.net/npm/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n```html [unpkg]\n<script src=\"https://unpkg.com/es-toolkit@%5E1\"></script>\n<script>\n  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n\nes-toolkit 也可在 [esm.sh](https://esm.sh) 上用于现代浏览器。\n\n::: code-group\n\n```html [esm.sh]\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"es-toolkit\": \"https://esm.sh/es-toolkit@%5E1\"\n    }\n  }\n</script>\n<script type=\"module\">\n  import { chunk } from 'es-toolkit';\n\n  chunk([1, 2, 3, 4, 5, 6], 3);\n</script>\n```\n\n:::\n"
  },
  {
    "path": "eslint.config.mjs",
    "content": "import noForOfArrayPlugin from 'eslint-plugin-no-for-of-array';\nimport prettier from 'eslint-plugin-prettier/recommended';\nimport pluginVue from 'eslint-plugin-vue';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\nimport tseslint from 'typescript-eslint';\nimport pluginJs from '@eslint/js';\nimport vitest from '@vitest/eslint-plugin';\n\nexport default defineConfig(\n  {\n    ignores: [\n      '.yarn/**',\n      'coverage/**',\n      '**/dist/**',\n      '**/cache/**',\n      '.pnp.*',\n      '**/*.d.ts',\n      '**/*.tgz',\n      'node_modules/**',\n    ],\n  },\n  {\n    languageOptions: {\n      globals: {\n        ...globals.node,\n        ...globals.browser,\n        ...globals.jest,\n        ...globals['shared-node-browser'],\n        ...globals.es2015,\n      },\n      parserOptions: {\n        ecmaFeatures: {\n          jsx: true,\n        },\n        parser: tseslint.parser,\n        extraFileExtensions: ['.vue'],\n      },\n    },\n  },\n  pluginJs.configs.recommended,\n  ...tseslint.configs.recommended,\n  {\n    files: ['**/*.spec.ts*'],\n    plugins: { vitest },\n    settings: { vitest: { typecheck: true } },\n    languageOptions: {\n      parser: tseslint.parser,\n      parserOptions: {\n        project: './tsconfig.json',\n        tsconfigRootDir: import.meta.dirname,\n      },\n    },\n    rules: {\n      ...vitest.configs.recommended.rules,\n      'vitest/no-conditional-expect': 'warn',\n      'vitest/no-commented-out-tests': 'warn',\n      'vitest/valid-expect': 'warn',\n    },\n  },\n  prettier,\n  ...pluginVue.configs['flat/recommended'],\n  {\n    files: ['src/**/*.ts'],\n    ignores: ['**/*.spec.ts'],\n    languageOptions: {\n      parser: tseslint.parser,\n      parserOptions: {\n        project: './tsconfig.json',\n        tsconfigRootDir: import.meta.dirname,\n        ecmaFeatures: {\n          jsx: true,\n        },\n      },\n    },\n    plugins: {\n      'no-for-of-array': noForOfArrayPlugin,\n    },\n    rules: {\n      'no-for-of-array/no-for-of-array': 'error',\n      'no-restricted-syntax': [\n        'error',\n        {\n          selector: 'CallExpression[callee.object.name=\"console\"]',\n          message: 'console.log() is not allowed in source code.',\n        },\n        {\n          selector: 'CallExpression[callee.object.name=\"Object\"][callee.property.name=\"entries\"]',\n          message:\n            'Do not use Object.entries for performance. Consider using alternatives like Object.keys() or Object.values().',\n        },\n      ],\n    },\n  },\n  {\n    rules: {\n      'no-implicit-coercion': 'error',\n      'no-warning-comments': [\n        'warn',\n        {\n          terms: ['TODO', 'FIXME', 'XXX', 'BUG'],\n          location: 'anywhere',\n        },\n      ],\n      curly: ['error', 'all'],\n      eqeqeq: ['error', 'always', { null: 'ignore' }],\n\n      '@typescript-eslint/no-explicit-any': 'warn',\n      '@typescript-eslint/no-use-before-define': 'off',\n      '@typescript-eslint/no-empty-interface': 'off',\n      '@typescript-eslint/explicit-function-return-type': 'off',\n      '@typescript-eslint/no-parameter-properties': 'off',\n      '@typescript-eslint/no-require-imports': 'warn',\n      '@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',\n      '@typescript-eslint/no-inferrable-types': 'warn',\n      '@typescript-eslint/no-empty-function': 'off',\n      '@typescript-eslint/naming-convention': [\n        'error',\n        { format: ['camelCase', 'UPPER_CASE', 'PascalCase'], selector: 'variable', leadingUnderscore: 'allow' },\n        { format: ['camelCase', 'PascalCase'], selector: 'function' },\n        { format: ['PascalCase'], selector: 'interface' },\n        { format: ['PascalCase'], selector: 'typeAlias' },\n      ],\n      '@typescript-eslint/explicit-module-boundary-types': 'off',\n      '@typescript-eslint/array-type': ['error', { default: 'array-simple' }],\n      '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true, caughtErrors: 'none' }],\n      '@typescript-eslint/member-ordering': [\n        'error',\n        {\n          default: [\n            'public-static-field',\n            'private-static-field',\n            'public-instance-field',\n            'private-instance-field',\n            'public-constructor',\n            'private-constructor',\n            'public-instance-method',\n            'private-instance-method',\n          ],\n        },\n      ],\n      'vue/multi-word-component-names': 'off',\n      'prefer-object-has-own': 'error',\n    },\n  }\n);\n"
  },
  {
    "path": "jsr.json",
    "content": "{\n  \"name\": \"@es-toolkit/es-toolkit\",\n  \"version\": \"1.45.1\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./compat\": \"./src/compat/index.ts\"\n  },\n  \"publish\": {\n    \"include\": [\"./src/**/*.ts\"]\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"es-toolkit\",\n  \"version\": \"1.45.1\",\n  \"description\": \"A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.\",\n  \"homepage\": \"https://es-toolkit.dev\",\n  \"bugs\": \"https://github.com/toss/es-toolkit/issues\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/toss/es-toolkit.git\"\n  },\n  \"license\": \"MIT\",\n  \"sideEffects\": false,\n  \"packageManager\": \"yarn@4.12.0\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./array\": \"./src/array/index.ts\",\n    \"./compat\": \"./src/compat/index.ts\",\n    \"./error\": \"./src/error/index.ts\",\n    \"./function\": \"./src/function/index.ts\",\n    \"./map\": \"./src/map/index.ts\",\n    \"./math\": \"./src/math/index.ts\",\n    \"./object\": \"./src/object/index.ts\",\n    \"./predicate\": \"./src/predicate/index.ts\",\n    \"./promise\": \"./src/promise/index.ts\",\n    \"./set\": \"./src/set/index.ts\",\n    \"./string\": \"./src/string/index.ts\",\n    \"./util\": \"./src/util/index.ts\",\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"compat\",\n    \"*.d.ts\",\n    \"array.js\",\n    \"compat.js\",\n    \"error.js\",\n    \"function.js\",\n    \"map.js\",\n    \"math.js\",\n    \"object.js\",\n    \"predicate.js\",\n    \"promise.js\",\n    \"set.js\",\n    \"string.js\",\n    \"util.js\"\n  ],\n  \"workspaces\": [\n    \"docs\",\n    \"benchmarks\"\n  ],\n  \"scripts\": {\n    \"bench\": \"vitest bench\",\n    \"build\": \"rollup -c rollup.config.mjs && ./.scripts/postbuild.sh\",\n    \"format\": \"prettier --write .\",\n    \"gen:bundle-size\": \"node ./.scripts/generate-bundle-size.mjs\",\n    \"lint\": \"eslint --config eslint.config.mjs --concurrency=auto\",\n    \"packlint\": \"packlint sort -R\",\n    \"prepack\": \"yarn build\",\n    \"test\": \"vitest --coverage --typecheck\",\n    \"transform\": \"jscodeshift -t ./.scripts/tests/transform-lodash-test.ts $0 && prettier --write $0\",\n    \"typecheck\": \"tsc --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@arethetypeswrong/cli\": \"^0.15.3\",\n    \"@changesets/changelog-github\": \"^0.5.0\",\n    \"@changesets/cli\": \"^2.27.1\",\n    \"@eslint/js\": \"^9.39.2\",\n    \"@rollup/plugin-terser\": \"^0.4.4\",\n    \"@rollup/plugin-typescript\": \"^12.1.0\",\n    \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\n    \"@types/broken-link-checker\": \"^0\",\n    \"@types/jscodeshift\": \"^0.12.0\",\n    \"@types/lodash\": \"^4.17.20\",\n    \"@types/node\": \"^24.10.9\",\n    \"@types/tar\": \"^6.1.13\",\n    \"@typescript-eslint/parser\": \"^8.26.1\",\n    \"@vitest/coverage-istanbul\": \"^4.0.17\",\n    \"@vitest/eslint-plugin\": \"^1.6.6\",\n    \"@vue/compiler-sfc\": \"^3.5.10\",\n    \"broken-link-checker\": \"^0.7.8\",\n    \"eslint\": \"^9.39.2\",\n    \"eslint-config-prettier\": \"^9.1.0\",\n    \"eslint-plugin-no-for-of-array\": \"^0.0.1\",\n    \"eslint-plugin-prettier\": \"^5.2.1\",\n    \"eslint-plugin-vue\": \"^9.28.0\",\n    \"execa\": \"^9.3.0\",\n    \"globals\": \"^15.9.0\",\n    \"happy-dom\": \"^16.7.3\",\n    \"jscodeshift\": \"^17.0.0\",\n    \"packlint\": \"^0.2.4\",\n    \"prettier\": \"^3.2.5\",\n    \"prettier-plugin-sort-re-exports\": \"^0.1.0\",\n    \"rollup\": \"^4.19.0\",\n    \"rollup-plugin-dts\": \"^6.1.1\",\n    \"tar\": \"^6\",\n    \"tslib\": \"^2.6.3\",\n    \"tsx\": \"^4.19.0\",\n    \"typescript\": \"^5.8.2\",\n    \"typescript-eslint\": \"^8.6.0\",\n    \"vercel\": \"^41.4.1\",\n    \"vitest\": \"^4.0.17\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\",\n    \"main\": \"./dist/index.js\",\n    \"browser\": \"./dist/browser.global.js\",\n    \"module\": \"./dist/index.mjs\",\n    \"exports\": {\n      \".\": {\n        \"import\": {\n          \"types\": \"./dist/index.d.mts\",\n          \"default\": \"./dist/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/index.d.ts\",\n          \"default\": \"./dist/index.js\"\n        }\n      },\n      \"./array\": {\n        \"import\": {\n          \"types\": \"./dist/array/index.d.mts\",\n          \"default\": \"./dist/array/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/array/index.d.ts\",\n          \"default\": \"./dist/array/index.js\"\n        }\n      },\n      \"./compat\": {\n        \"import\": {\n          \"types\": \"./dist/compat/index.d.mts\",\n          \"default\": \"./dist/compat/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/compat/index.d.ts\",\n          \"default\": \"./dist/compat/index.js\"\n        }\n      },\n      \"./compat/*\": {\n        \"default\": {\n          \"types\": \"./compat/*.d.ts\",\n          \"default\": \"./compat/*.js\"\n        }\n      },\n      \"./error\": {\n        \"import\": {\n          \"types\": \"./dist/error/index.d.mts\",\n          \"default\": \"./dist/error/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/error/index.d.ts\",\n          \"default\": \"./dist/error/index.js\"\n        }\n      },\n      \"./function\": {\n        \"import\": {\n          \"types\": \"./dist/function/index.d.mts\",\n          \"default\": \"./dist/function/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/function/index.d.ts\",\n          \"default\": \"./dist/function/index.js\"\n        }\n      },\n      \"./map\": {\n        \"import\": {\n          \"types\": \"./dist/map/index.d.mts\",\n          \"default\": \"./dist/map/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/map/index.d.ts\",\n          \"default\": \"./dist/map/index.js\"\n        }\n      },\n      \"./math\": {\n        \"import\": {\n          \"types\": \"./dist/math/index.d.mts\",\n          \"default\": \"./dist/math/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/math/index.d.ts\",\n          \"default\": \"./dist/math/index.js\"\n        }\n      },\n      \"./object\": {\n        \"import\": {\n          \"types\": \"./dist/object/index.d.mts\",\n          \"default\": \"./dist/object/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/object/index.d.ts\",\n          \"default\": \"./dist/object/index.js\"\n        }\n      },\n      \"./predicate\": {\n        \"import\": {\n          \"types\": \"./dist/predicate/index.d.mts\",\n          \"default\": \"./dist/predicate/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/predicate/index.d.ts\",\n          \"default\": \"./dist/predicate/index.js\"\n        }\n      },\n      \"./promise\": {\n        \"import\": {\n          \"types\": \"./dist/promise/index.d.mts\",\n          \"default\": \"./dist/promise/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/promise/index.d.ts\",\n          \"default\": \"./dist/promise/index.js\"\n        }\n      },\n      \"./set\": {\n        \"import\": {\n          \"types\": \"./dist/set/index.d.mts\",\n          \"default\": \"./dist/set/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/set/index.d.ts\",\n          \"default\": \"./dist/set/index.js\"\n        }\n      },\n      \"./string\": {\n        \"import\": {\n          \"types\": \"./dist/string/index.d.mts\",\n          \"default\": \"./dist/string/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/string/index.d.ts\",\n          \"default\": \"./dist/string/index.js\"\n        }\n      },\n      \"./util\": {\n        \"import\": {\n          \"types\": \"./dist/util/index.d.mts\",\n          \"default\": \"./dist/util/index.mjs\"\n        },\n        \"require\": {\n          \"types\": \"./dist/util/index.d.ts\",\n          \"default\": \"./dist/util/index.js\"\n        }\n      },\n      \"./package.json\": \"./package.json\"\n    },\n    \"types\": \"./dist/index.d.ts\"\n  },\n  \"dependenciesMeta\": {\n    \"@trivago/prettier-plugin-sort-imports@4.3.0\": {\n      \"unplugged\": true\n    },\n    \"prettier-plugin-sort-re-exports@0.0.1\": {\n      \"unplugged\": true\n    }\n  },\n  \"react-native\": \"./dist/index.js\"\n}\n"
  },
  {
    "path": "packlint.config.mjs",
    "content": "export default {\n  files: ['./benchmarks/package.json', './docs/package.json', './package.json'],\n};\n"
  },
  {
    "path": "rollup.config.mjs",
    "content": "// @ts-check\nimport fs from 'node:fs';\nimport { createRequire } from 'node:module';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport dtsPlugin from 'rollup-plugin-dts';\nimport terserPlugin from '@rollup/plugin-terser';\nimport tsPlugin from '@rollup/plugin-typescript';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\n/**\n * @type {{\n *   exports: Record<string, string>;\n *   publishConfig: { browser: string };\n * }}\n */\nconst packageJson = createRequire(import.meta.url)('./package.json');\n\nconst testPatterns = ['**/*.bench.ts', '**/*.spec.ts', '**/*.test.ts'];\n\nexport default () => {\n  clearDir('dist');\n\n  const entrypoints = Object.values(packageJson.exports).filter(f => /^(\\.\\/)?src\\//.test(f) && f.endsWith('.ts'));\n\n  return [\n    libBuildOptions({\n      format: 'esm',\n      extension: 'mjs',\n      entrypoints,\n      outDir: 'dist',\n      sourcemap: false,\n    }),\n    libBuildOptions({\n      format: 'cjs',\n      extension: 'js',\n      entrypoints,\n      outDir: 'dist',\n      sourcemap: false,\n    }),\n    declarationOptions({\n      entrypoints,\n      outDir: 'dist',\n    }),\n    browserBuildConfig({\n      inputFile: './src/compat/index.ts',\n      outFile: packageJson.publishConfig.browser,\n      name: '_',\n      sourcemap: false,\n    }),\n  ];\n};\n\n/**\n * @type {(options: {\n *   entrypoints: string[];\n *   format: 'esm' | 'cjs';\n *   extension: 'js' | 'cjs' | 'mjs';\n *   outDir: string;\n *   sourcemap: boolean;\n * }) => import('rollup').RollupOptions}\n */\nfunction libBuildOptions({ entrypoints, extension, format, outDir, sourcemap }) {\n  return {\n    input: mapInputs(entrypoints),\n    plugins: [\n      tsPlugin({\n        exclude: [...testPatterns],\n        compilerOptions: {\n          sourceMap: sourcemap,\n          inlineSources: sourcemap || undefined,\n          removeComments: !sourcemap,\n          declaration: false,\n        },\n      }),\n    ],\n    output: {\n      format,\n      dir: outDir,\n      ...fileNames(extension),\n      // Using preserveModules disables bundling and the creation of chunks,\n      // leading to a result that is a mirror of the input module graph.\n      preserveModules: true,\n      sourcemap,\n      generatedCode: 'es2015',\n      // Hoisting transitive imports adds bare imports in modules,\n      // which can make imports by JS runtimes slightly faster,\n      // but makes the generated code harder to follow.\n      hoistTransitiveImports: false,\n    },\n  };\n}\n\n/**\n * @type {(options: {inputFile: string; outFile: string; name: string, sourcemap: boolean}) => import('rollup').RollupOptions}\n */\nfunction browserBuildConfig({ inputFile, outFile, name, sourcemap }) {\n  return {\n    input: inputFile,\n    plugins: [\n      tsPlugin({\n        exclude: [...testPatterns],\n        compilerOptions: {\n          sourceMap: sourcemap,\n          inlineSources: sourcemap || undefined,\n          removeComments: true,\n          declaration: false,\n        },\n      }),\n    ],\n    output: {\n      plugins: [\n        // Minify with terser, but with a configuration that optimizes for\n        // readability in browser DevTools (after re-indenting by DevTools).\n        terserPlugin({\n          // Terser defaults to ES5 for syntax it adds or rewrites\n          ecma: 2020,\n          // Readable function names (not just in final export)\n          keep_fnames: true,\n          // Turn off compress.sequences to keep the assignments to the toolkit\n          // object readable, instead of turning them into a huge list of\n          // comma-separated expressions.\n          compress: { sequences: false },\n        }),\n      ],\n      format: 'umd',\n      name,\n      file: outFile,\n      sourcemap,\n      generatedCode: 'es2015',\n    },\n  };\n}\n\n/**\n * @type {(options: {entrypoints: string[]; outDir: string}) => import('rollup').RollupOptions}\n */\nfunction declarationOptions({ entrypoints, outDir }) {\n  return {\n    plugins: [dtsPlugin()],\n    input: mapInputs(entrypoints),\n    output: [\n      {\n        format: 'esm',\n        dir: outDir,\n        generatedCode: 'es2015',\n        ...fileNames('d.mts'),\n        preserveModules: true,\n        preserveModulesRoot: 'src',\n      },\n      {\n        format: 'cjs',\n        dir: outDir,\n        generatedCode: 'es2015',\n        ...fileNames('d.ts'),\n        preserveModules: true,\n        preserveModulesRoot: 'src',\n      },\n    ],\n  };\n}\n\n/** @type {(srcFiles: string[]) => Record<string, string>} */\nfunction mapInputs(srcFiles) {\n  return Object.fromEntries(\n    srcFiles.map(file => [file.replace(/^(\\.\\/)?src\\//, '').replace(/\\.[cm]?(js|ts)$/, ''), join(__dirname, file)])\n  );\n}\n\nfunction fileNames(extension = 'js') {\n  return {\n    entryFileNames: `[name].${extension}`,\n    chunkFileNames: `_chunk/[name]-[hash:6].${extension}`,\n  };\n}\n\n/** @type {(dir: string) => void} */\nfunction clearDir(dir) {\n  const dirPath = join(__dirname, dir);\n  if (dir && fs.existsSync(dirPath)) {\n    fs.rmSync(dirPath, { recursive: true, force: true });\n    console.log(`cleared: ${dir}`);\n  }\n}\n"
  },
  {
    "path": "src/_internal/burredLetters.ts",
    "content": "export const burredLetters = [\n  // Latin-1 Supplement letters.\n  '\\xc0',\n  '\\xc1',\n  '\\xc2',\n  '\\xc3',\n  '\\xc4',\n  '\\xc5',\n  '\\xc6',\n  '\\xc7',\n  '\\xc8',\n  '\\xc9',\n  '\\xca',\n  '\\xcb',\n  '\\xcc',\n  '\\xcd',\n  '\\xce',\n  '\\xcf',\n  '\\xd0',\n  '\\xd1',\n  '\\xd2',\n  '\\xd3',\n  '\\xd4',\n  '\\xd5',\n  '\\xd6',\n  '\\xd8',\n  '\\xd9',\n  '\\xda',\n  '\\xdb',\n  '\\xdc',\n  '\\xdd',\n  '\\xde',\n  '\\xdf',\n  '\\xe0',\n  '\\xe1',\n  '\\xe2',\n  '\\xe3',\n  '\\xe4',\n  '\\xe5',\n  '\\xe6',\n  '\\xe7',\n  '\\xe8',\n  '\\xe9',\n  '\\xea',\n  '\\xeb',\n  '\\xec',\n  '\\xed',\n  '\\xee',\n  '\\xef',\n  '\\xf0',\n  '\\xf1',\n  '\\xf2',\n  '\\xf3',\n  '\\xf4',\n  '\\xf5',\n  '\\xf6',\n  '\\xf8',\n  '\\xf9',\n  '\\xfa',\n  '\\xfb',\n  '\\xfc',\n  '\\xfd',\n  '\\xfe',\n  '\\xff',\n  // Latin Extended-A letters.\n  '\\u0100',\n  '\\u0101',\n  '\\u0102',\n  '\\u0103',\n  '\\u0104',\n  '\\u0105',\n  '\\u0106',\n  '\\u0107',\n  '\\u0108',\n  '\\u0109',\n  '\\u010a',\n  '\\u010b',\n  '\\u010c',\n  '\\u010d',\n  '\\u010e',\n  '\\u010f',\n  '\\u0110',\n  '\\u0111',\n  '\\u0112',\n  '\\u0113',\n  '\\u0114',\n  '\\u0115',\n  '\\u0116',\n  '\\u0117',\n  '\\u0118',\n  '\\u0119',\n  '\\u011a',\n  '\\u011b',\n  '\\u011c',\n  '\\u011d',\n  '\\u011e',\n  '\\u011f',\n  '\\u0120',\n  '\\u0121',\n  '\\u0122',\n  '\\u0123',\n  '\\u0124',\n  '\\u0125',\n  '\\u0126',\n  '\\u0127',\n  '\\u0128',\n  '\\u0129',\n  '\\u012a',\n  '\\u012b',\n  '\\u012c',\n  '\\u012d',\n  '\\u012e',\n  '\\u012f',\n  '\\u0130',\n  '\\u0131',\n  '\\u0132',\n  '\\u0133',\n  '\\u0134',\n  '\\u0135',\n  '\\u0136',\n  '\\u0137',\n  '\\u0138',\n  '\\u0139',\n  '\\u013a',\n  '\\u013b',\n  '\\u013c',\n  '\\u013d',\n  '\\u013e',\n  '\\u013f',\n  '\\u0140',\n  '\\u0141',\n  '\\u0142',\n  '\\u0143',\n  '\\u0144',\n  '\\u0145',\n  '\\u0146',\n  '\\u0147',\n  '\\u0148',\n  '\\u0149',\n  '\\u014a',\n  '\\u014b',\n  '\\u014c',\n  '\\u014d',\n  '\\u014e',\n  '\\u014f',\n  '\\u0150',\n  '\\u0151',\n  '\\u0152',\n  '\\u0153',\n  '\\u0154',\n  '\\u0155',\n  '\\u0156',\n  '\\u0157',\n  '\\u0158',\n  '\\u0159',\n  '\\u015a',\n  '\\u015b',\n  '\\u015c',\n  '\\u015d',\n  '\\u015e',\n  '\\u015f',\n  '\\u0160',\n  '\\u0161',\n  '\\u0162',\n  '\\u0163',\n  '\\u0164',\n  '\\u0165',\n  '\\u0166',\n  '\\u0167',\n  '\\u0168',\n  '\\u0169',\n  '\\u016a',\n  '\\u016b',\n  '\\u016c',\n  '\\u016d',\n  '\\u016e',\n  '\\u016f',\n  '\\u0170',\n  '\\u0171',\n  '\\u0172',\n  '\\u0173',\n  '\\u0174',\n  '\\u0175',\n  '\\u0176',\n  '\\u0177',\n  '\\u0178',\n  '\\u0179',\n  '\\u017a',\n  '\\u017b',\n  '\\u017c',\n  '\\u017d',\n  '\\u017e',\n  '\\u017f',\n];\n"
  },
  {
    "path": "src/_internal/comboMarks.ts",
    "content": "/** List of combining diacritical marks. */\nexport const comboMarks = [\n  '\\u0300',\n  '\\u0301',\n  '\\u0302',\n  '\\u0303',\n  '\\u0304',\n  '\\u0305',\n  '\\u0306',\n  '\\u0307',\n  '\\u0308',\n  '\\u0309',\n  '\\u030a',\n  '\\u030b',\n  '\\u030c',\n  '\\u030d',\n  '\\u030e',\n  '\\u030f',\n  '\\u0310',\n  '\\u0311',\n  '\\u0312',\n  '\\u0313',\n  '\\u0314',\n  '\\u0315',\n  '\\u0316',\n  '\\u0317',\n  '\\u0318',\n  '\\u0319',\n  '\\u031a',\n  '\\u031b',\n  '\\u031c',\n  '\\u031d',\n  '\\u031e',\n  '\\u031f',\n  '\\u0320',\n  '\\u0321',\n  '\\u0322',\n  '\\u0323',\n  '\\u0324',\n  '\\u0325',\n  '\\u0326',\n  '\\u0327',\n  '\\u0328',\n  '\\u0329',\n  '\\u032a',\n  '\\u032b',\n  '\\u032c',\n  '\\u032d',\n  '\\u032e',\n  '\\u032f',\n  '\\u0330',\n  '\\u0331',\n  '\\u0332',\n  '\\u0333',\n  '\\u0334',\n  '\\u0335',\n  '\\u0336',\n  '\\u0337',\n  '\\u0338',\n  '\\u0339',\n  '\\u033a',\n  '\\u033b',\n  '\\u033c',\n  '\\u033d',\n  '\\u033e',\n  '\\u033f',\n  '\\u0340',\n  '\\u0341',\n  '\\u0342',\n  '\\u0343',\n  '\\u0344',\n  '\\u0345',\n  '\\u0346',\n  '\\u0347',\n  '\\u0348',\n  '\\u0349',\n  '\\u034a',\n  '\\u034b',\n  '\\u034c',\n  '\\u034d',\n  '\\u034e',\n  '\\u034f',\n  '\\u0350',\n  '\\u0351',\n  '\\u0352',\n  '\\u0353',\n  '\\u0354',\n  '\\u0355',\n  '\\u0356',\n  '\\u0357',\n  '\\u0358',\n  '\\u0359',\n  '\\u035a',\n  '\\u035b',\n  '\\u035c',\n  '\\u035d',\n  '\\u035e',\n  '\\u035f',\n  '\\u0360',\n  '\\u0361',\n  '\\u0362',\n  '\\u0363',\n  '\\u0364',\n  '\\u0365',\n  '\\u0366',\n  '\\u0367',\n  '\\u0368',\n  '\\u0369',\n  '\\u036a',\n  '\\u036b',\n  '\\u036c',\n  '\\u036d',\n  '\\u036e',\n  '\\u036f',\n  '\\ufe20',\n  '\\ufe21',\n  '\\ufe22',\n  '\\ufe23',\n];\n"
  },
  {
    "path": "src/_internal/compareValues.ts",
    "content": "export function compareValues(a: any, b: any, order: 'asc' | 'desc'): 0 | -1 | 1 {\n  if (a < b) {\n    return order === 'asc' ? -1 : 1;\n  }\n  if (a > b) {\n    return order === 'asc' ? 1 : -1;\n  }\n  return 0;\n}\n"
  },
  {
    "path": "src/_internal/deburredLetters.ts",
    "content": "/** List of converted Latin Unicode letters. */\nexport const deburredLetters = [\n  // Converted Latin-1 Supplement letters.\n  'A',\n  'A',\n  'A',\n  'A',\n  'A',\n  'A',\n  'Ae',\n  'C',\n  'E',\n  'E',\n  'E',\n  'E',\n  'I',\n  'I',\n  'I',\n  'I',\n  'D',\n  'N',\n  'O',\n  'O',\n  'O',\n  'O',\n  'O',\n  'O',\n  'U',\n  'U',\n  'U',\n  'U',\n  'Y',\n  'Th',\n  'ss',\n  'a',\n  'a',\n  'a',\n  'a',\n  'a',\n  'a',\n  'ae',\n  'c',\n  'e',\n  'e',\n  'e',\n  'e',\n  'i',\n  'i',\n  'i',\n  'i',\n  'd',\n  'n',\n  'o',\n  'o',\n  'o',\n  'o',\n  'o',\n  'o',\n  'u',\n  'u',\n  'u',\n  'u',\n  'y',\n  'th',\n  'y',\n  // Converted Latin Extended-A letters.\n  'A',\n  'a',\n  'A',\n  'a',\n  'A',\n  'a',\n  'C',\n  'c',\n  'C',\n  'c',\n  'C',\n  'c',\n  'C',\n  'c',\n  'D',\n  'd',\n  'D',\n  'd',\n  'E',\n  'e',\n  'E',\n  'e',\n  'E',\n  'e',\n  'E',\n  'e',\n  'E',\n  'e',\n  'G',\n  'g',\n  'G',\n  'g',\n  'G',\n  'g',\n  'G',\n  'g',\n  'H',\n  'h',\n  'H',\n  'h',\n  'I',\n  'i',\n  'I',\n  'i',\n  'I',\n  'i',\n  'I',\n  'i',\n  'I',\n  'i',\n  'IJ',\n  'ij',\n  'J',\n  'j',\n  'K',\n  'k',\n  'k',\n  'L',\n  'l',\n  'L',\n  'l',\n  'L',\n  'l',\n  'L',\n  'l',\n  'L',\n  'l',\n  'N',\n  'n',\n  'N',\n  'n',\n  'N',\n  'n',\n  \"'n\",\n  'N',\n  'n',\n  'O',\n  'o',\n  'O',\n  'o',\n  'O',\n  'o',\n  'Oe',\n  'oe',\n  'R',\n  'r',\n  'R',\n  'r',\n  'R',\n  'r',\n  'S',\n  's',\n  'S',\n  's',\n  'S',\n  's',\n  'S',\n  's',\n  'T',\n  't',\n  'T',\n  't',\n  'T',\n  't',\n  'U',\n  'u',\n  'U',\n  'u',\n  'U',\n  'u',\n  'U',\n  'u',\n  'U',\n  'u',\n  'U',\n  'u',\n  'W',\n  'w',\n  'Y',\n  'y',\n  'Y',\n  'Z',\n  'z',\n  'Z',\n  'z',\n  'Z',\n  'z',\n  's',\n];\n"
  },
  {
    "path": "src/_internal/isEqualsSameValueZero.ts",
    "content": "/**\n * Performs a `SameValueZero` comparison between two values to determine if they are equivalent.\n *\n * @param {any} value - The value to compare.\n * @param {any} other - The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n *\n * @example\n * eq(1, 1); // true\n * eq(0, -0); // true\n * eq(NaN, NaN); // true\n * eq('a', Object('a')); // false\n */\nexport function isEqualsSameValueZero(value: any, other: any): boolean {\n  return value === other || (Number.isNaN(value) && Number.isNaN(other));\n}\n"
  },
  {
    "path": "src/_internal/isUnsafeProperty.ts",
    "content": "/**\n * Checks if a property key is unsafe to modify directly.\n *\n * This function is used in functions like `merge` to prevent prototype pollution attacks\n * by identifying property keys that could modify the object's prototype chain or constructor.\n *\n * @param key - The property key to check\n * @returns `true` if the property is unsafe to modify directly, `false` otherwise\n * @internal\n */\nexport function isUnsafeProperty(key: PropertyKey) {\n  return key === '__proto__';\n}\n"
  },
  {
    "path": "src/array/at.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { at } from './at';\n\ndescribe('at', () => {\n  it('should return the elements corresponding to the specified keys', () => {\n    expect(at(['a', 'b', 'c'], [0, 2])).toEqual(['a', 'c']);\n    expect(at(['a', 'b', 'c'], [2, 0])).toEqual(['c', 'a']);\n  });\n\n  it('should support negative indices', () => {\n    expect(at(['a', 'b', 'c'], [-1, -2])).toEqual(['c', 'b']);\n    expect(at(['a', 'b', 'c'], [-2, -1])).toEqual(['b', 'c']);\n  });\n\n  it('should return `undefined` for nonexistent keys', () => {\n    expect(at(['a', 'b', 'c'], [2, 4, 0, -4])).toEqual(['c', undefined, 'a', undefined]);\n  });\n\n  it('should return an empty array when no keys are given', () => {\n    expect(at(['a', 'b', 'c'], [])).toEqual([]);\n  });\n\n  it('should return undefined for non-integer indices', () => {\n    const data = ['a', 'b', 'c'];\n    const indices = [1.5, -1.5, NaN, Infinity, -Infinity];\n\n    expect(at(data, indices)).toEqual(indices.map(i => data.at(i)));\n  });\n});\n"
  },
  {
    "path": "src/array/at.ts",
    "content": "/**\n * Retrieves elements from an array at the specified indices.\n *\n * This function supports negative indices, which count from the end of the array.\n *\n * @template T\n * @param {readonly T[]} arr - The array to retrieve elements from.\n * @param {number[]} indices - An array of indices specifying the positions of elements to retrieve.\n * @returns {T[]} A new array containing the elements at the specified indices.\n *\n * @example\n * const numbers = [10, 20, 30, 40, 50];\n * const result = at(numbers, [1, 3, 4]);\n * console.log(result); // [20, 40, 50]\n */\nexport function at<T>(arr: readonly T[], indices: number[]): T[] {\n  const result = new Array<T>(indices.length);\n  const length = arr.length;\n\n  for (let i = 0; i < indices.length; i++) {\n    let index = indices[i];\n\n    index = Number.isInteger(index) ? index : Math.trunc(index) || 0;\n\n    if (index < 0) {\n      index += length;\n    }\n\n    result[i] = arr[index];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/chunk.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { chunk } from './chunk';\n\ndescribe('chunk', () => {\n  it('should return an empty array when the input array is empty', () => {\n    expect(chunk([], 3)).toEqual([]);\n  });\n\n  it('should throw if the size is not an integer of is less than 1', () => {\n    expect(() => chunk([1, 2, 3], 0)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be an integer greater than zero.]`\n    );\n    expect(() => chunk([1, 2, 3], -1)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be an integer greater than zero.]`\n    );\n    expect(() => chunk([1, 2, 3], 0.5)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be an integer greater than zero.]`\n    );\n    expect(() => chunk([1, 2, 3], Math.PI)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be an integer greater than zero.]`\n    );\n  });\n\n  it('should evenly divide all elements into chunks of the specified size when the total length is a multiple of the size', () => {\n    expect(chunk([1, 2, 3, 4, 5, 6], 3)).toEqual([\n      [1, 2, 3],\n      [4, 5, 6],\n    ]);\n  });\n\n  it('should place the remaining elements in the last chunk when the total length is not a multiple of the size', () => {\n    expect(chunk([1, 2, 3, 4], 6)).toEqual([[1, 2, 3, 4]]);\n    expect(chunk([1, 2, 3, 4, 5, 6, 7], 2)).toEqual([[1, 2], [3, 4], [5, 6], [7]]);\n  });\n});\n"
  },
  {
    "path": "src/array/chunk.ts",
    "content": "/**\n * Splits an array into smaller arrays of a specified length.\n *\n * This function takes an input array and divides it into multiple smaller arrays,\n * each of a specified length. If the input array cannot be evenly divided,\n * the final sub-array will contain the remaining elements.\n *\n * @template T The type of elements in the array.\n * @param {T[]} arr - The array to be chunked into smaller arrays.\n * @param {number} size - The size of each smaller array. Must be a positive integer.\n * @returns {T[][]} A two-dimensional array where each sub-array has a maximum length of `size`.\n * @throws {Error} Throws an error if `size` is not a positive integer.\n *\n * @example\n * // Splits an array of numbers into sub-arrays of length 2\n * chunk([1, 2, 3, 4, 5], 2);\n * // Returns: [[1, 2], [3, 4], [5]]\n *\n * @example\n * // Splits an array of strings into sub-arrays of length 3\n * chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n * // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n */\nexport function chunk<T>(arr: readonly T[], size: number): T[][] {\n  if (!Number.isInteger(size) || size <= 0) {\n    throw new Error('Size must be an integer greater than zero.');\n  }\n\n  const chunkLength = Math.ceil(arr.length / size);\n  const result: T[][] = Array(chunkLength);\n\n  for (let index = 0; index < chunkLength; index++) {\n    const start = index * size;\n    const end = start + size;\n\n    result[index] = arr.slice(start, end);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/compact.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { compact } from './compact';\n\ndescribe('compact', () => {\n  it('removes falsey values from array', () => {\n    expect(compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5])).toEqual([1, 2, 3, 4, 5]);\n    expect(compact([false, 0, -0, 0n, '', null, undefined, NaN])).toEqual([]);\n    expect(compact([0, { name: 'John' }, false, 'hello', null, { age: 30 }, undefined, NaN])).toEqual([\n      { name: 'John' },\n      'hello',\n      { age: 30 },\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/compact.ts",
    "content": "type NotFalsey<T> = Exclude<T, false | null | 0 | 0n | '' | undefined>;\n\n/**\n * Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The input array to remove falsey values.\n * @returns {Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>} - A new array with all falsey values removed.\n *\n * @example\n * compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n * Returns: [1, 2, 3, 4, 5]\n */\nexport function compact<T>(arr: readonly T[]): Array<NotFalsey<T>> {\n  const result: Array<NotFalsey<T>> = [];\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    if (item) {\n      result.push(item as NotFalsey<T>);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/countBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { countBy } from './countBy.ts';\n\ndescribe('countBy', () => {\n  it('should count the occurrences of each item in an array', () => {\n    const arr = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5];\n    const result = countBy(arr, String);\n\n    expect(result).toEqual({\n      '1': 2,\n      '2': 2,\n      '3': 2,\n      '4': 2,\n      '5': 2,\n    });\n  });\n  it('should count the occurrences of each item in an array that applied transformer', () => {\n    const arr = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5];\n    const result = countBy(arr, item => (item % 2 === 0 ? 'even' : 'odd'));\n\n    expect(result).toEqual({\n      odd: 6,\n      even: 4,\n    });\n  });\n\n  it('should pass index to mapper function', () => {\n    const arr = ['a', 'b', 'c', 'd'];\n    const result = countBy(arr, (item, index) => (index < 2 ? 'first' : 'rest'));\n\n    expect(result).toEqual({\n      first: 2,\n      rest: 2,\n    });\n  });\n\n  it('should pass array to mapper function', () => {\n    const arr = [1, 2, 3, 4];\n    const result = countBy(arr, (item, index, array) => (item < array.length / 2 ? 'small' : 'large'));\n\n    expect(result).toEqual({\n      small: 1,\n      large: 3,\n    });\n  });\n});\n"
  },
  {
    "path": "src/array/countBy.ts",
    "content": "/**\n * Count the occurrences of each item in an array\n * based on a transformation function.\n *\n * This function takes an array and a transformation function\n * that converts each item in the array to a key. It then\n * counts the occurrences of each transformed item and returns\n * an object with the transformed items as keys and the counts\n * as values.\n *\n * @template T - The type of the items in the input array.\n * @template K - The type of keys.\n * @param {T[]} arr - The input array to count occurrences.\n * @param {(item: T, index: number, array: readonly T[]) => K} mapper - The transformation function that maps each item, its index, and the array to a key.\n * @returns {Record<K, number>} An object containing the transformed items as keys and the\n * counts as values.\n *\n * @example\n * const array = ['a', 'b', 'c', 'a', 'b', 'a'];\n * const result = countBy(array, x => x);\n * // result will be { a: 3, b: 2, c: 1 }\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd');\n * // result will be { odd: 3, even: 2 }\n *\n * @example\n * // Using index parameter\n * const array = ['a', 'b', 'c', 'd'];\n * const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest');\n * // result will be { first: 2, rest: 2 }\n */\nexport function countBy<T, K extends PropertyKey>(\n  arr: readonly T[],\n  mapper: (item: T, index: number, array: readonly T[]) => K\n): Record<K, number> {\n  const result = {} as Record<K, number>;\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    const key = mapper(item, i, arr);\n\n    result[key] = (result[key] ?? 0) + 1;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/difference.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { difference } from './difference';\n\ndescribe('difference', () => {\n  it('should the difference of two arrays', () => {\n    expect(difference([1, 2, 3], [1])).toEqual([2, 3]);\n    expect(difference([], [1, 2, 3])).toEqual([]);\n    expect(difference([1, 2, 3, 4], [2, 4])).toEqual([1, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/difference.ts",
    "content": "/**\n * Computes the difference between two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements\n * that are present in the first array but not in the second array. It effectively\n * filters out any elements from the first array that also appear in the second array.\n *\n * @template T\n * @param {T[]} firstArr - The array from which to derive the difference. This is the primary array\n * from which elements will be compared and filtered.\n * @param {T[]} secondArr - The array containing elements to be excluded from the first array.\n * Each element in this array will be checked against the first array, and if a match is found,\n * that element will be excluded from the result.\n * @returns {T[]} A new array containing the elements that are present in the first array but not\n * in the second array.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [2, 4];\n * const result = difference(array1, array2);\n * // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result.\n */\nexport function difference<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n  const secondSet = new Set(secondArr);\n\n  return firstArr.filter(item => !secondSet.has(item));\n}\n"
  },
  {
    "path": "src/array/differenceBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { differenceBy } from './differenceBy';\n\ndescribe('differenceBy', () => {\n  it('should the difference of two arrays using the `mapper` function', () => {\n    expect(differenceBy([1.2, 2.3, 3.4], [1.2], Math.floor)).toEqual([2.3, 3.4]);\n    expect(differenceBy([], [1.2], Math.floor)).toEqual([]);\n  });\n\n  it('should return the difference of two arrays with different element types using the `mapper` function', () => {\n    type CSV = { id: number; csv: number };\n    type JSON = { id: number; json: number };\n\n    const array1: CSV[] = [\n      { id: 1, csv: 1 },\n      { id: 2, csv: 1 },\n      { id: 3, csv: 1 },\n    ];\n    const array2: JSON[] = [\n      { id: 2, json: 2 },\n      { id: 4, json: 2 },\n    ];\n\n    const result = differenceBy(array1, array2, value => value.id);\n    expect(result).toEqual([\n      { id: 1, csv: 1 },\n      { id: 3, csv: 1 },\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/differenceBy.ts",
    "content": "/**\n * Computes the difference between two arrays after mapping their elements through a provided function.\n *\n * This function takes two arrays and a mapper function. It returns a new array containing the elements\n * that are present in the first array but not in the second array, based on the identity calculated\n * by the mapper function.\n *\n * Essentially, it filters out any elements from the first array that, when\n * mapped, match an element in the mapped version of the second array.\n *\n * @template T, U\n * @param {T[]} firstArr - The primary array from which to derive the difference.\n * @param {U[]} secondArr - The array containing elements to be excluded from the first array.\n * @param {(value: T | U) => unknown} mapper - The function to map the elements of both arrays. This function\n * is applied to each element in both arrays, and the comparison is made based on the mapped values.\n * @returns {T[]} A new array containing the elements from the first array that do not have a corresponding\n * mapped identity in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = differenceBy(array1, array2, mapper);\n * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [2, 4];\n * const mapper = item => (typeof item === 'object' ? item.id : item);\n * const result = differenceBy(array1, array2, mapper);\n * // result will be [{ id: 1 }, { id: 3 }] since 2 is present in both arrays after mapping, and is excluded from the result.\n */\nexport function differenceBy<T, U>(\n  firstArr: readonly T[],\n  secondArr: readonly U[],\n  mapper: (value: T | U) => unknown\n): T[] {\n  const mappedSecondSet = new Set(secondArr.map(item => mapper(item)));\n\n  return firstArr.filter(item => {\n    return !mappedSecondSet.has(mapper(item));\n  });\n}\n"
  },
  {
    "path": "src/array/differenceWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { differenceWith } from './differenceWith';\n\ndescribe('differenceWith', () => {\n  it('should return the difference of two arrays using the `areItemsEqual` function', () => {\n    expect(differenceWith([1.2, 2.3, 3.4], [1.2], (x, y) => Math.floor(x) === Math.floor(y))).toEqual([2.3, 3.4]);\n\n    const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const array2 = [{ id: 2 }, { id: 4 }];\n\n    expect(differenceWith(array1, array2, (a, b) => a.id === b.id)).toEqual([{ id: 1 }, { id: 3 }]);\n  });\n\n  it('should return the difference of two arrays with different element types using the `areItemsEqual` function', () => {\n    type CSV = { id: number; csv: number };\n    type JSON = { id: number; json: number };\n\n    const array1: CSV[] = [\n      { id: 1, csv: 1 },\n      { id: 2, csv: 1 },\n      { id: 3, csv: 1 },\n    ];\n    const array2: JSON[] = [\n      { id: 2, json: 2 },\n      { id: 4, json: 2 },\n    ];\n\n    const result = differenceWith(array1, array2, (a, b) => a.id === b.id);\n    expect(result).toEqual([\n      { id: 1, csv: 1 },\n      { id: 3, csv: 1 },\n    ]);\n  });\n\n  it('should handle duplicate elements correctly', () => {\n    expect(differenceWith([1, 1, 2, 2, 3], [2], (a, b) => a === b)).toEqual([1, 1, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/differenceWith.ts",
    "content": "/**\n * Computes the difference between two arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom comparison function. It returns a new array containing\n * the elements that are present in the first array but not in the second array. The comparison to determine\n * if elements are equal is made using the provided custom function.\n *\n * @template T, U\n * @param {T[]} firstArr - The array from which to get the difference.\n * @param {U[]} secondArr - The array containing elements to exclude from the first array.\n * @param {(x: T, y: U) => boolean} areItemsEqual - A function to determine if two items are equal.\n * @returns {T[]} A new array containing the elements from the first array that do not match any elements in the second array\n * according to the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = differenceWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are considered equal and are excluded from the result.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [2, 4];\n * const areItemsEqual = (a, b) => a.id === b;\n * const result = differenceWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 1 }, { id: 3 }] since the element with id 2 is considered equal to the second array's element and is excluded from the result.\n */\nexport function differenceWith<T, U>(\n  firstArr: readonly T[],\n  secondArr: readonly U[],\n  areItemsEqual: (x: T, y: U) => boolean\n): T[] {\n  return firstArr.filter(firstItem => {\n    return secondArr.every(secondItem => {\n      return !areItemsEqual(firstItem, secondItem);\n    });\n  });\n}\n"
  },
  {
    "path": "src/array/drop.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { drop } from './drop';\n\ndescribe('drop', () => {\n  it('should drop `itemsCount` elements from an array from the beginning', () => {\n    expect(drop([1.2, 2.3, 3.4], 1)).toEqual([2.3, 3.4]);\n    expect(drop(['a', 'b', 'c', 'd'], 2)).toEqual(['c', 'd']);\n  });\n\n  it('should return all elements if itemsCount < 1', () => {\n    expect(drop([1.2, 2.3, 3.4], 0)).toEqual([1.2, 2.3, 3.4]);\n    expect(drop([1.2, 2.3, 3.4], -1)).toEqual([1.2, 2.3, 3.4]);\n  });\n\n  it('should coerce itemsCount to an integer', () => {\n    expect(drop([1.2, 2.3, 3.4], 1.5)).toEqual([2.3, 3.4]);\n  });\n\n  it('should return empty array if itemsCount >= arr.length', () => {\n    expect(drop([1.2, 2.3, 3.4], 4)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/drop.ts",
    "content": "/**\n * Removes a specified number of elements from the beginning of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the start.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the beginning of the array.\n * @returns {T[]} A new array with the specified number of elements removed from the start.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = drop(array, 2);\n * // result will be [3, 4, 5] since the first two elements are dropped.\n */\nexport function drop<T>(arr: readonly T[], itemsCount: number): T[] {\n  itemsCount = Math.max(itemsCount, 0);\n\n  return arr.slice(itemsCount);\n}\n"
  },
  {
    "path": "src/array/dropRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { dropRight } from './dropRight';\n\ndescribe('dropRight', () => {\n  it('should drop `itemsCount` elements from an array from the end', () => {\n    expect(dropRight([1.2, 2.3, 3.4], 1)).toEqual([1.2, 2.3]);\n    expect(dropRight(['a', 'b', 'c', 'd'], 2)).toEqual(['a', 'b']);\n  });\n\n  it('should return all elements if itemsCount < 1', () => {\n    expect(dropRight([1.2, 2.3, 3.4], 0)).toEqual([1.2, 2.3, 3.4]);\n    expect(dropRight([1.2, 2.3, 3.4], -1)).toEqual([1.2, 2.3, 3.4]);\n  });\n\n  it('should coerce itemsCount to an integer', () => {\n    expect(dropRight([1.2, 2.3, 3.4], 1.5)).toEqual([1.2, 2.3]);\n  });\n\n  it('should return empty array if itemsCount >= arr.length', () => {\n    expect(dropRight([1.2, 2.3, 3.4], 4)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/dropRight.ts",
    "content": "/**\n * Removes a specified number of elements from the end of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the end.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the end of the array.\n * @returns {T[]} A new array with the specified number of elements removed from the end.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRight(array, 2);\n * // result will be [1, 2, 3] since the last two elements are dropped.\n */\nexport function dropRight<T>(arr: readonly T[], itemsCount: number): T[] {\n  itemsCount = Math.min(-itemsCount, 0);\n\n  if (itemsCount === 0) {\n    return arr.slice();\n  }\n\n  return arr.slice(0, itemsCount);\n}\n"
  },
  {
    "path": "src/array/dropRightWhile.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { dropRightWhile } from './dropRightWhile';\n\ndescribe('dropRightWhile', () => {\n  it('should drop elements from an array until `canContinueDropping` returns false, from the end', () => {\n    expect(dropRightWhile([1.2, 2.3, 3.4], x => x < 2)).toEqual([1.2, 2.3, 3.4]);\n\n    const items = [\n      { id: 1, enabled: false },\n      { id: 2, enabled: true },\n      { id: 3, enabled: false },\n    ];\n\n    expect(dropRightWhile(items, x => !x.enabled)).toEqual([\n      {\n        id: 1,\n        enabled: false,\n      },\n      {\n        id: 2,\n        enabled: true,\n      },\n    ]);\n\n    expect(dropRightWhile([1, 2, 3], x => x < 4)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/dropRightWhile.ts",
    "content": "/**\n * Removes elements from the end of an array until the predicate returns false.\n *\n * This function iterates over an array from the end and drops elements until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T, index: number, arr: T[]) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element from the end,\n * and dropping continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRightWhile(array, x => x > 3);\n * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end.\n */\nexport function dropRightWhile<T>(\n  arr: readonly T[],\n  canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean\n): T[] {\n  for (let i = arr.length - 1; i >= 0; i--) {\n    if (!canContinueDropping(arr[i], i, arr)) {\n      return arr.slice(0, i + 1);\n    }\n  }\n\n  return [];\n}\n"
  },
  {
    "path": "src/array/dropWhile.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { dropWhile } from './dropWhile';\n\ndescribe('dropWhile', () => {\n  it('should drop elements from an array until `canContinueDropping` returns false, from the beginning', () => {\n    expect(dropWhile([1.2, 2.3, 3.4], x => x < 2)).toEqual([2.3, 3.4]);\n\n    const items = [\n      { id: 1, enabled: false },\n      { id: 2, enabled: true },\n      { id: 3, enabled: false },\n    ];\n\n    expect(dropWhile(items, x => !x.enabled)).toEqual([\n      {\n        id: 2,\n        enabled: true,\n      },\n      { id: 3, enabled: false },\n    ]);\n\n    expect(dropWhile([1, 2, 3], x => x < 4)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/dropWhile.ts",
    "content": "/**\n * Removes elements from the beginning of an array until the predicate returns false.\n *\n * This function iterates over an array and drops elements from the start until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T, index: number, arr: T[]) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element, and dropping\n * continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropWhile(array, x => x < 3);\n * // result will be [3, 4, 5] since elements less than 3 are dropped.\n */\nexport function dropWhile<T>(\n  arr: readonly T[],\n  canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean\n): T[] {\n  const dropEndIndex = arr.findIndex((item, index, arr) => !canContinueDropping(item, index, arr));\n\n  if (dropEndIndex === -1) {\n    return [];\n  }\n\n  return arr.slice(dropEndIndex);\n}\n"
  },
  {
    "path": "src/array/fill.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { fill } from './fill';\n\ndescribe('fill', () => {\n  it('fills the entire array with the specified value', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a')).toEqual(['a', 'a', 'a']);\n  });\n\n  it('fills a new array with a specified value', () => {\n    expect(fill(Array(3), 2)).toEqual([2, 2, 2]);\n  });\n\n  it('fills part of an array from the start index to the end index', () => {\n    expect(fill([4, 6, 8, 10], '*', 1, 3)).toEqual([4, '*', '*', 10]);\n  });\n\n  it('fills middle values', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', 1, 4);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n\n  it('fills from specified start position', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', 2);\n    expect(result).toEqual([1, 2, '*', '*', '*']);\n  });\n\n  it('fills with negative start position', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', -3);\n    expect(result).toEqual([1, 2, '*', '*', '*']);\n  });\n\n  it('fills with positive start and negative end positions', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', 1, -1);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n\n  it('fills with both negative start and end positions', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', -4, -1);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n\n  it('does not fill if start is greater than end', () => {\n    const result = fill([1, 2, 3, 4, 5], '*', 3, 2);\n    expect(result).toEqual([1, 2, 3, 4, 5]);\n  });\n});\n"
  },
  {
    "path": "src/array/fill.ts",
    "content": "/**\n * Fills the whole array with a specified value.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T - The type of the value to fill the array with.\n * @param {unknown[]} array - The array to fill.\n * @param {T} value - The value to fill the array with.\n * @returns {T[]} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T>(array: unknown[], value: T): T[];\n\n/**\n * Fills elements of an array with a specified value from the start position up to the end of the array.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the array with.\n * @param {Array<T | U>} array - The array to fill.\n * @param {U} value - The value to fill the array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @returns {Array<T | U>} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T, U>(array: Array<T | U>, value: U, start: number): Array<T | U>;\n\n/**\n * Fills elements of an array with a specified value from the start position up to, but not including, the end position.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the array with.\n * @param {Array<T | U>} array - The array to fill.\n * @param {U} value - The value to fill the array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @param {number} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {Array<T | U>} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T, U>(array: Array<T | U>, value: U, start: number, end: number): Array<T | U>;\n\n/**\n * Fills elements of an array with a specified value from the start position up to, but not including, the end position.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the array with.\n * @param {Array<T | U>} array - The array to fill.\n * @param {U} value - The value to fill the array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @param {number} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {Array<T | U>} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T, U>(array: Array<T | U>, value: U, start = 0, end = array.length): Array<T | U> {\n  const length = array.length;\n  const finalStart = Math.max(start >= 0 ? start : length + start, 0);\n  const finalEnd = Math.min(end >= 0 ? end : length + end, length);\n\n  for (let i = finalStart; i < finalEnd; i++) {\n    array[i] = value;\n  }\n\n  return array;\n}\n"
  },
  {
    "path": "src/array/filterAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { filterAsync } from './filterAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('filterAsync', () => {\n  it('filters array asynchronously', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    const predicate = vi.fn(async (n: number) => n % 2 === 0);\n    const result = await filterAsync(arr, predicate);\n\n    expect(result).toEqual([2, 4]);\n\n    expect(predicate).toHaveBeenCalledTimes(arr.length);\n    expect(predicate.mock.calls[0]).toEqual([1, 0, arr]);\n    expect(predicate.mock.calls[1]).toEqual([2, 1, arr]);\n    expect(predicate.mock.calls[2]).toEqual([3, 2, arr]);\n  });\n\n  it('returns empty array if given empty array', async () => {\n    const arr: number[] = [];\n    const predicate = vi.fn(async () => true);\n\n    const result = await filterAsync(arr, predicate);\n    expect(result).toEqual([]);\n\n    expect(predicate).toHaveBeenCalledTimes(0);\n  });\n\n  it('returns empty array if all elements fail predicate', async () => {\n    const arr = [1, 3, 5];\n    const predicate = async (n: number) => n % 2 === 0;\n\n    const result = await filterAsync(arr, predicate);\n    expect(result).toEqual([]);\n  });\n\n  it('returns all elements if all pass predicate', async () => {\n    const arr = [2, 4, 6];\n    const predicate = async (n: number) => n % 2 === 0;\n\n    const result = await filterAsync(arr, predicate);\n    expect(result).toEqual([2, 4, 6]);\n  });\n\n  it('propagates rejection if any predicate throws', async () => {\n    const arr = [1, 2, 3];\n    const errorFn = async (item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n      return true;\n    };\n    await expect(filterAsync(arr, errorFn)).rejects.toThrow('fail');\n  });\n\n  it('respects concurrency limit', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = vi.fn(async (item: number) => {\n      running++;\n\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n\n      await delay(20);\n      running--;\n      return item % 2 === 0;\n    });\n\n    const concurrency = 2;\n    const result = await filterAsync(arr, fn, { concurrency });\n\n    expect(result).toEqual([2, 4]);\n    expect(maxRunning).toBeLessThanOrEqual(concurrency);\n    expect(fn).toHaveBeenCalledTimes(arr.length);\n  });\n\n  it('uses full concurrency when not specified', async () => {\n    const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = async (item: number) => {\n      running++;\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n      await delay(20);\n      running--;\n      return item % 2 === 0;\n    };\n\n    await filterAsync(arr, fn);\n    expect(maxRunning).toBe(10);\n  });\n});\n"
  },
  {
    "path": "src/array/filterAsync.ts",
    "content": "import { limitAsync } from './limitAsync.ts';\n\ninterface FilterAsyncOptions {\n  concurrency?: number;\n}\n\n/**\n * Filters an array asynchronously using an async predicate function.\n *\n * Returns a promise that resolves to a new array containing only the elements\n * for which the predicate function returns a truthy value.\n *\n * @template T - The type of elements in the array.\n * @param {readonly T[]} array The array to filter.\n * @param {(item: T, index: number, array: readonly T[]) => Promise<boolean>} predicate An async function that tests each element.\n * @param {FilterAsyncOptions} [options] Optional configuration object.\n * @param {number} [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently.\n * @returns {Promise<T[]>} A promise that resolves to the filtered array.\n * @example\n * const users = [{ id: 1, active: true }, { id: 2, active: false }, { id: 3, active: true }];\n * const activeUsers = await filterAsync(users, async (user) => {\n *   return await checkUserStatus(user.id);\n * });\n * // Returns: [{ id: 1, active: true }, { id: 3, active: true }]\n *\n * @example\n * // With concurrency limit\n * const numbers = [1, 2, 3, 4, 5];\n * const evenNumbers = await filterAsync(\n *   numbers,\n *   async (n) => await isEvenAsync(n),\n *   { concurrency: 2 }\n * );\n * // Processes at most 2 operations concurrently\n */\nexport async function filterAsync<T>(\n  array: readonly T[],\n  predicate: (item: T, index: number, array: readonly T[]) => Promise<boolean>,\n  options?: FilterAsyncOptions\n): Promise<T[]> {\n  if (options?.concurrency != null) {\n    predicate = limitAsync(predicate, options.concurrency);\n  }\n\n  const results = await Promise.all(array.map(predicate));\n  return array.filter((_, index) => results[index]);\n}\n"
  },
  {
    "path": "src/array/flatMap.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flatMap } from './flatMap';\n\ndescribe('flatMap', () => {\n  const originArr = [1, 2, 3];\n\n  it('should map and flatten array of numbers with default depth', () => {\n    const iteratee = (item: number) => [item, item];\n    const expectedArr = [1, 1, 2, 2, 3, 3];\n\n    expect(flatMap(originArr, iteratee)).toEqual(expectedArr);\n  });\n\n  it('should map and flatten array of numbers with specified depth', () => {\n    const iteratee = (item: number) => [[[item, item]]];\n\n    const expectedArr1 = [[[1, 1]], [[2, 2]], [[3, 3]]];\n    expect(flatMap(originArr, iteratee, 1)).toEqual(expectedArr1);\n\n    const expectedArr2 = [\n      [1, 1],\n      [2, 2],\n      [3, 3],\n    ];\n    expect(flatMap(originArr, iteratee, 2)).toEqual(expectedArr2);\n\n    const expectedArr3 = [1, 1, 2, 2, 3, 3];\n    expect(flatMap(originArr, iteratee, 3)).toEqual(expectedArr3);\n  });\n\n  it('should handle empty array', () => {\n    const emptyArr: number[] = [];\n    const result = flatMap(emptyArr, item => [item, item]);\n    expect(result).toEqual([]);\n  });\n\n  it('should return type is flatten array without depth prop', () => {\n    const arr: string[] = ['1', '2'];\n    const result = flatMap(arr, item => [item, item]);\n    expect(result).toEqual(['1', '1', '2', '2']);\n    result[0].substring(0, 1);\n  });\n\n  it('should provide index parameter to iteratee function', () => {\n    const arr = [1, 2, 3];\n    const result = flatMap(arr, (item, index) => [item + index]);\n    expect(result).toEqual([1, 3, 5]);\n  });\n\n  it('should provide array parameter to iteratee function', () => {\n    const arr = [1, 2, 3];\n    const result = flatMap(arr, (item, _index, array) => [item * array.length]);\n    expect(result).toEqual([3, 6, 9]);\n  });\n});\n"
  },
  {
    "path": "src/array/flatMap.ts",
    "content": "import { flatten } from './flatten.ts';\n\n/**\n * Maps each element in the array using the iteratee function and flattens the result up to the specified depth.\n *\n * @template T - The type of elements within the array.\n * @template U - The type of elements within the returned array from the iteratee function.\n * @template D - The depth to which the array should be flattened.\n * @param {T[]} arr - The array to flatten.\n * @param {(item: T, index: number, array: readonly T[]) => U} iteratee - The function that produces the new array elements. It receives the element, its index, and the array.\n * @param {D} depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.\n * @returns {Array<FlatArray<U[], D>>} The new array with the mapped and flattened elements.\n *\n * @example\n * const arr = [1, 2, 3];\n *\n * flatMap(arr, (item: number) => [item, item]);\n * // [1, 1, 2, 2, 3, 3]\n *\n * flatMap(arr, (item: number) => [[item, item]], 2);\n * // [1, 1, 2, 2, 3, 3]\n */\nexport function flatMap<T, U, D extends number = 1>(\n  arr: readonly T[],\n  iteratee: (item: T, index: number, array: readonly T[]) => U,\n  depth: D = 1 as D\n): Array<FlatArray<U[], D>> {\n  return flatten(\n    arr.map((item, index) => iteratee(item, index, arr)),\n    depth\n  );\n}\n"
  },
  {
    "path": "src/array/flatMapAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { flatMapAsync } from './flatMapAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('flatMapAsync', () => {\n  it('maps and flattens array asynchronously', async () => {\n    const arr = [1, 2, 3];\n\n    const callback = vi.fn(async (n: number) => [n, n * 2]);\n    const result = await flatMapAsync(arr, callback);\n\n    expect(result).toEqual([1, 2, 2, 4, 3, 6]);\n\n    expect(callback).toHaveBeenCalledTimes(arr.length);\n    expect(callback.mock.calls[0]).toEqual([1, 0, arr]);\n    expect(callback.mock.calls[1]).toEqual([2, 1, arr]);\n    expect(callback.mock.calls[2]).toEqual([3, 2, arr]);\n  });\n\n  it('handles callbacks that return empty arrays', async () => {\n    const arr = [1, 2, 3];\n    const callback = vi.fn(async (n: number) => (n % 2 === 0 ? [n] : []));\n\n    const result = await flatMapAsync(arr, callback);\n    expect(result).toEqual([2]);\n  });\n\n  it('returns empty array if given empty array', async () => {\n    const arr: number[] = [];\n    const callback = vi.fn(async (n: number) => [n * 2]);\n\n    const result = await flatMapAsync(arr, callback);\n    expect(result).toEqual([]);\n\n    expect(callback).toHaveBeenCalledTimes(0);\n  });\n\n  it('handles callbacks returning arrays of different lengths', async () => {\n    const arr = [1, 2, 3];\n    const callback = async (n: number) => {\n      if (n === 1) {\n        return [n];\n      }\n      if (n === 2) {\n        return [n, n, n];\n      }\n      return [];\n    };\n\n    const result = await flatMapAsync(arr, callback);\n    expect(result).toEqual([1, 2, 2, 2]);\n  });\n\n  it('flattens only one level deep', async () => {\n    const arr = [1, 2];\n    const callback = async (n: number) => [[n, n * 2]];\n\n    const result = await flatMapAsync(arr, callback);\n    expect(result).toEqual([\n      [1, 2],\n      [2, 4],\n    ]);\n  });\n\n  it('propagates rejection if any callback throws', async () => {\n    const arr = [1, 2, 3];\n    const errorFn = async (item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n      return [item];\n    };\n    await expect(flatMapAsync(arr, errorFn)).rejects.toThrow('fail');\n  });\n\n  it('respects concurrency limit', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = vi.fn(async (item: number) => {\n      running++;\n\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n\n      await delay(20);\n      running--;\n      return [item, item * 2];\n    });\n\n    const concurrency = 2;\n    const result = await flatMapAsync(arr, fn, { concurrency });\n\n    expect(result).toEqual([1, 2, 2, 4, 3, 6, 4, 8, 5, 10]);\n    expect(maxRunning).toBeLessThanOrEqual(concurrency);\n    expect(fn).toHaveBeenCalledTimes(arr.length);\n  });\n\n  it('uses full concurrency when not specified', async () => {\n    const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = async (item: number) => {\n      running++;\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n      await delay(20);\n      running--;\n      return [item];\n    };\n\n    await flatMapAsync(arr, fn);\n    expect(maxRunning).toBe(10);\n  });\n});\n"
  },
  {
    "path": "src/array/flatMapAsync.ts",
    "content": "import { flatten } from './flatten.ts';\nimport { limitAsync } from './limitAsync.ts';\n\ninterface FlatMapAsyncOptions {\n  concurrency?: number;\n}\n\n/**\n * Maps each element in an array using an async callback function and flattens the result by one level.\n *\n * This is equivalent to calling `mapAsync` followed by `flat(1)`, but more efficient.\n * Each callback should return an array, and all returned arrays are concatenated into\n * a single output array.\n *\n * @template T - The type of elements in the input array.\n * @template R - The type of elements in the arrays returned by the callback.\n * @param {readonly T[]} array The array to transform.\n * @param {(item: T, index: number, array: readonly T[]) => Promise<R[]>} callback An async function that transforms each element into an array.\n * @param {FlatMapAsyncOptions} [options] Optional configuration object.\n * @param {number} [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently.\n * @returns {Promise<R[]>} A promise that resolves to a flattened array of transformed values.\n * @example\n * const users = [{ id: 1 }, { id: 2 }];\n * const allPosts = await flatMapAsync(users, async (user) => {\n *   return await fetchUserPosts(user.id);\n * });\n * // Returns: [post1, post2, post3, ...] (all posts from all users)\n *\n * @example\n * // With concurrency limit\n * const numbers = [1, 2, 3];\n * const results = await flatMapAsync(\n *   numbers,\n *   async (n) => await fetchRelatedItems(n),\n *   { concurrency: 2 }\n * );\n * // Processes at most 2 operations concurrently\n */\nexport async function flatMapAsync<T, R>(\n  array: readonly T[],\n  callback: (item: T, index: number, array: readonly T[]) => Promise<R[]>,\n  options?: FlatMapAsyncOptions\n): Promise<R[]> {\n  if (options?.concurrency != null) {\n    callback = limitAsync(callback, options.concurrency);\n  }\n\n  const results = await Promise.all(array.map(callback));\n  return flatten(results);\n}\n"
  },
  {
    "path": "src/array/flatMapDeep.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flatMapDeep } from './flatMapDeep';\n\ndescribe('flatMapDeep', () => {\n  it('should map and deeply flatten an array', () => {\n    const result1 = flatMapDeep([1, 2, 3], n => [[n, n]]);\n    expect(result1).toEqual([1, 1, 2, 2, 3, 3]);\n\n    const result2 = flatMapDeep([1, 2, 3], n => [[[n]], [[n]]]);\n    expect(result2).toEqual([1, 1, 2, 2, 3, 3]);\n\n    const result3 = flatMapDeep([1, 2, 3], n => [n, [n, [n, [n]]]]);\n    expect(result3).toEqual([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]);\n  });\n\n  it('should return an empty array when provided with an empty array', () => {\n    const result = flatMapDeep([], n => [[n]]);\n    expect(result).toEqual([]);\n  });\n\n  it('should provide index parameter to iteratee function', () => {\n    const arr = [1, 2, 3];\n    const result = flatMapDeep(arr, (item, index) => [[item + index]]);\n    expect(result).toEqual([1, 3, 5]);\n  });\n\n  it('should provide array parameter to iteratee function', () => {\n    const arr = [1, 2, 3];\n    const result = flatMapDeep(arr, (item, _index, array) => [[item * array.length]]);\n    expect(result).toEqual([3, 6, 9]);\n  });\n});\n"
  },
  {
    "path": "src/array/flatMapDeep.ts",
    "content": "import { type ExtractNestedArrayType, flattenDeep } from './flattenDeep.ts';\n\n/**\n * Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array.\n *\n * @template T - The type of elements within the array.\n * @template U - The type of elements within the returned array from the iteratee function.\n * @param {T[]} arr - The array to flatten.\n * @param {(item: T, index: number, array: readonly T[]) => U} iteratee - The function that produces the new array elements. It receives the element, its index, and the array.\n * @returns {Array<ExtractNestedArrayType<U>>} A new array that has been flattened.\n *\n * @example\n * const result = flatMapDeep([1, 2, 3], n => [[n, n]]);\n * // [1, 1, 2, 2, 3, 3]\n */\nexport function flatMapDeep<T, U>(\n  arr: readonly T[],\n  iteratee: (item: T, index: number, array: readonly T[]) => U\n): Array<ExtractNestedArrayType<U>> {\n  return flattenDeep(arr.map((item: T, index: number) => iteratee(item, index, arr)));\n}\n"
  },
  {
    "path": "src/array/flatten.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flatten } from '.';\n\ndescribe('flatten', () => {\n  const originArr = [1, [2, [3, [4]]]];\n\n  it('should flatten a array to the default depth of 1', () => {\n    const expectedArr = [1, 2, [3, [4]]];\n\n    expect(flatten(originArr)).toEqual(expectedArr);\n    expect(originArr.flat()).toEqual(expectedArr);\n  });\n\n  it('should flatten a deeply nested array to the specified depth', () => {\n    const expectedArr1 = [1, 2, [3, [4]]];\n    expect(flatten(originArr, 1)).toEqual(expectedArr1);\n    expect(originArr.flat(1)).toEqual(expectedArr1);\n\n    const expectedArr2 = [1, 2, 3, [4]];\n    expect(flatten(originArr, 2)).toEqual(expectedArr2);\n    expect(originArr.flat(2)).toEqual(expectedArr2);\n\n    const expectedArr3 = [1, 2, 3, 4];\n    expect(flatten(originArr, 3)).toEqual(expectedArr3);\n    expect(originArr.flat(3)).toEqual(expectedArr3);\n\n    expect(flatten(originArr, Infinity)).toEqual(expectedArr3);\n    expect(originArr.flat(Infinity)).toEqual(expectedArr3);\n  });\n\n  it('should return the same array if depth is 0 or NaN or negative', () => {\n    const expectedArr = [1, [2, [3, [4]]]];\n\n    expect(flatten(originArr, 0)).toEqual(expectedArr);\n    expect(originArr.flat(0)).toEqual(expectedArr);\n\n    expect(flatten(originArr, NaN)).toEqual(expectedArr);\n    expect(originArr.flat(NaN)).toEqual(expectedArr);\n\n    expect(flatten(originArr, -1)).toEqual(expectedArr);\n    expect(originArr.flat(-1)).toEqual(expectedArr);\n  });\n\n  it('should flatten arrays to the specified depth considering floating point values', () => {\n    const expectedArr1 = [1, 2, [3, [4]]];\n    expect(flatten(originArr, 1.3)).toEqual(expectedArr1);\n    expect(originArr.flat(1.3)).toEqual(expectedArr1);\n\n    const expectedArr2 = [1, 2, 3, [4]];\n    expect(flatten(originArr, 2.5)).toEqual(expectedArr2);\n    expect(originArr.flat(2.5)).toEqual(expectedArr2);\n\n    const expectedArr3 = [1, 2, 3, 4];\n    expect(flatten(originArr, 3.9)).toEqual(expectedArr3);\n    expect(originArr.flat(3.9)).toEqual(expectedArr3);\n  });\n\n  it('should handle empty array', () => {\n    const originArr: number[] = [];\n\n    expect(flatten(originArr, 2)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/flatten.ts",
    "content": "/**\n * Flattens an array up to the specified depth.\n *\n * @template T - The type of elements within the array.\n * @template D - The depth to which the array should be flattened.\n * @param {T[]} arr - The array to flatten.\n * @param {D} depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.\n * @returns {Array<FlatArray<T[], D>>} A new array that has been flattened.\n *\n * @example\n * const arr = flatten([1, [2, 3], [4, [5, 6]]], 1);\n * // Returns: [1, 2, 3, 4, [5, 6]]\n *\n * const arr = flatten([1, [2, 3], [4, [5, 6]]], 2);\n * // Returns: [1, 2, 3, 4, 5, 6]\n */\nexport function flatten<T, D extends number = 1>(arr: readonly T[], depth = 1 as D): Array<FlatArray<T[], D>> {\n  const result: Array<FlatArray<T[], D>> = [];\n  const flooredDepth = Math.floor(depth);\n\n  const recursive = (arr: readonly T[], currentDepth: number) => {\n    for (let i = 0; i < arr.length; i++) {\n      const item = arr[i];\n      if (Array.isArray(item) && currentDepth < flooredDepth) {\n        recursive(item, currentDepth + 1);\n      } else {\n        result.push(item as FlatArray<T[], D>);\n      }\n    }\n  };\n\n  recursive(arr, 0);\n  return result;\n}\n"
  },
  {
    "path": "src/array/flattenDeep.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flattenDeep } from './flattenDeep';\n\ndescribe('flattenDeep', () => {\n  it('should flatten a deeply nested array of numbers', () => {\n    const originArr = [1, [2, [3, [4, [5]]]]];\n    const expectedArr = [1, 2, 3, 4, 5];\n\n    expect(flattenDeep(originArr)).toEqual(expectedArr);\n  });\n\n  it('should flatten a deeply nested array with mixed types', () => {\n    const originArr = [1, ['str', [3, [4, [false, [{ id: 1 }]]]]]];\n    const expectedArr = [1, 'str', 3, 4, false, { id: 1 }];\n\n    expect(flattenDeep(originArr)).toEqual(expectedArr);\n  });\n});\n"
  },
  {
    "path": "src/array/flattenDeep.ts",
    "content": "import { flatten } from './flatten.ts';\n\n/**\n * Utility type for recursively unpacking nested array types to extract the type of the innermost element\n *\n * @example\n * ExtractNestedArrayType<(number | (number | number[])[])[]>\n * // number\n *\n * ExtractNestedArrayType<(boolean | (string | number[])[])[]>\n * // string | number | boolean\n */\nexport type ExtractNestedArrayType<T> = T extends ReadonlyArray<infer U> ? ExtractNestedArrayType<U> : T;\n\n/**\n * Flattens all depths of a nested array.\n *\n * @template T - The type of elements within the array.\n * @param {T[]} arr - The array to flatten.\n * @returns {Array<ExtractNestedArrayType<T>>} A new array that has been flattened.\n *\n * @example\n * const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]);\n * // Returns: [1, 2, 3, 4, 5, 6]\n */\nexport function flattenDeep<T>(arr: readonly T[]): Array<ExtractNestedArrayType<T>> {\n  return flatten(arr, Infinity) as Array<ExtractNestedArrayType<T>>;\n}\n"
  },
  {
    "path": "src/array/forEachAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { forEachAsync } from './forEachAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('forEachAsync', () => {\n  it('executes callback for each element asynchronously', async () => {\n    const arr = [1, 2, 3];\n    const callback = vi.fn(async () => {\n      await delay(10);\n    });\n\n    await forEachAsync(arr, callback);\n\n    expect(callback).toHaveBeenCalledTimes(arr.length);\n    expect(callback.mock.calls[0]).toEqual([1, 0, arr]);\n    expect(callback.mock.calls[1]).toEqual([2, 1, arr]);\n    expect(callback.mock.calls[2]).toEqual([3, 2, arr]);\n  });\n\n  it('handles empty array', async () => {\n    const arr: number[] = [];\n    const callback = vi.fn(async () => {});\n\n    await forEachAsync(arr, callback);\n    expect(callback).toHaveBeenCalledTimes(0);\n  });\n\n  it('propagates rejection if any callback throws', async () => {\n    const arr = [1, 2, 3];\n    const errorFn = async (item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n    };\n    await expect(forEachAsync(arr, errorFn)).rejects.toThrow('fail');\n  });\n\n  it('respects concurrency limit', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = vi.fn(async () => {\n      running++;\n\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n\n      await delay(20);\n      running--;\n    });\n\n    const concurrency = 2;\n    await forEachAsync(arr, fn, { concurrency });\n\n    expect(maxRunning).toBeLessThanOrEqual(concurrency);\n    expect(fn).toHaveBeenCalledTimes(arr.length);\n  });\n\n  it('uses full concurrency when not specified', async () => {\n    const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = async () => {\n      running++;\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n      await delay(20);\n      running--;\n    };\n\n    await forEachAsync(arr, fn);\n    expect(maxRunning).toBe(10);\n  });\n});\n"
  },
  {
    "path": "src/array/forEachAsync.ts",
    "content": "import { limitAsync } from './limitAsync.ts';\n\ninterface ForEachAsyncOptions {\n  concurrency?: number;\n}\n\n/**\n * Executes an async callback function for each element in an array.\n *\n * Unlike the native `forEach`, this function returns a promise that resolves\n * when all async operations complete. It supports optional concurrency limiting.\n *\n * @template T - The type of elements in the array.\n * @param {readonly T[]} array The array to iterate over.\n * @param {(item: T, index: number, array: readonly T[]) => Promise<void>} callback An async function to execute for each element.\n * @param {ForEachAsyncOptions} [options] Optional configuration object.\n * @param {number} [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently.\n * @returns {Promise<void>} A promise that resolves when all operations complete.\n * @example\n * const users = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * await forEachAsync(users, async (user) => {\n *   await updateUser(user.id);\n * });\n * // All users have been updated\n *\n * @example\n * // With concurrency limit\n * const items = [1, 2, 3, 4, 5];\n * await forEachAsync(\n *   items,\n *   async (item) => await processItem(item),\n *   { concurrency: 2 }\n * );\n * // Processes at most 2 items concurrently\n */\nexport async function forEachAsync<T>(\n  array: readonly T[],\n  callback: (item: T, index: number, array: readonly T[]) => Promise<void>,\n  options?: ForEachAsyncOptions\n): Promise<void> {\n  if (options?.concurrency != null) {\n    callback = limitAsync(callback, options.concurrency);\n  }\n\n  await Promise.all(array.map(callback));\n}\n"
  },
  {
    "path": "src/array/forEachRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { forEachRight } from './forEachRight';\n\ndescribe('forEachRight', () => {\n  it('should iterate over elements from right to left', () => {\n    const array = [1, 2, 3];\n    const result: number[] = [];\n\n    forEachRight(array, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([3, 2, 1]);\n  });\n\n  it('should provide correct index and array for arrays', () => {\n    const array = [1, 2, 3];\n    const indices: number[] = [];\n    const arrays: number[][] = [];\n\n    forEachRight(array, (_, index, arr) => {\n      indices.push(index);\n      arrays.push(arr);\n    });\n\n    expect(indices).toEqual([2, 1, 0]);\n    expect(arrays).toEqual([array, array, array]);\n  });\n\n  it('should handle an empty array', () => {\n    const array: number[] = [];\n    const result: number[] = [];\n\n    forEachRight(array, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/forEachRight.ts",
    "content": "/**\n * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to iterate over.\n * @param {(value: T, index: number, arr: T[]) => void} callback - The function invoked per iteration.\n * The callback function receives three arguments:\n *  - 'value': The current element being processed in the array.\n *  - 'index': The index of the current element being processed in the array.\n *  - 'arr': The array 'forEachRight' was called upon.\n *\n * @example\n * const array = [1, 2, 3];\n * const result: number[] = [];\n *\n * // Use the forEachRight function to iterate through the array and add each element to the result array.\n * forEachRight(array, (value) => {\n *  result.push(value);\n * })\n *\n * console.log(result) // Output: [3, 2, 1]\n */\nexport function forEachRight<T>(arr: T[], callback: (value: T, index: number, arr: T[]) => void): void;\n/**\n * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to iterate over.\n * @param {(value: T, index: number, arr: T[]) => void} callback - The function invoked per iteration.\n * The callback function receives three arguments:\n *  - 'value': The current element being processed in the array.\n *  - 'index': The index of the current element being processed in the array.\n *  - 'arr': The array 'forEachRight' was called upon.\n *\n * @example\n * const array = [1, 2, 3];\n * const result: number[] = [];\n *\n * // Use the forEachRight function to iterate through the array and add each element to the result array.\n * forEachRight(array, (value) => {\n *  result.push(value);\n * })\n *\n * console.log(result) // Output: [3, 2, 1]\n */\nexport function forEachRight<T>(\n  arr: readonly T[],\n  callback: (value: T, index: number, arr: readonly T[]) => void\n): void;\n\n/**\n * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to iterate over.\n * @param {(value: T, index: number, arr: T[]) => void} callback - The function invoked per iteration.\n * The callback function receives three arguments:\n *  - 'value': The current element being processed in the array.\n *  - 'index': The index of the current element being processed in the array.\n *  - 'arr': The array 'forEachRight' was called upon.\n *\n * @example\n * const array = [1, 2, 3];\n * const result: number[] = [];\n *\n * // Use the forEachRight function to iterate through the array and add each element to the result array.\n * forEachRight(array, (value) => {\n *  result.push(value);\n * })\n *\n * console.log(result) // Output: [3, 2, 1]\n */\nexport function forEachRight<T>(arr: readonly T[], callback: (value: T, index: number, arr: T[]) => void): void {\n  for (let i = arr.length - 1; i >= 0; i--) {\n    const element = arr[i];\n    callback(element, i, arr as T[]);\n  }\n}\n"
  },
  {
    "path": "src/array/groupBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { groupBy } from './groupBy';\n\ndescribe('groupBy', () => {\n  it('should group elements by a given key', () => {\n    const array = [\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'banana' },\n      { category: 'vegetable', name: 'carrot' },\n      { category: 'fruit', name: 'pear' },\n      { category: 'vegetable', name: 'broccoli' },\n    ];\n\n    const result = groupBy(array, item => item.category);\n\n    expect(result).toEqual({\n      fruit: [\n        { category: 'fruit', name: 'apple' },\n        { category: 'fruit', name: 'banana' },\n        { category: 'fruit', name: 'pear' },\n      ],\n      vegetable: [\n        { category: 'vegetable', name: 'carrot' },\n        { category: 'vegetable', name: 'broccoli' },\n      ],\n    });\n  });\n\n  it('should handle an empty array', () => {\n    const array: Array<{ category: string; name: string }> = [];\n\n    const result = groupBy(array, item => item.category);\n\n    expect(result).toEqual({});\n  });\n\n  it('should handle an array with one element', () => {\n    const array = [{ category: 'fruit', name: 'apple' }];\n\n    const result = groupBy(array, item => item.category);\n\n    expect(result).toEqual({\n      fruit: [{ category: 'fruit', name: 'apple' }],\n    });\n  });\n\n  it('should pass index to the key-generating function', () => {\n    const array = ['a', 'b', 'c', 'd', 'e'];\n    const result = groupBy(array, (item, index) => (index % 2 === 0 ? 'even' : 'odd'));\n\n    expect(result).toEqual({\n      even: ['a', 'c', 'e'],\n      odd: ['b', 'd'],\n    });\n  });\n\n  it('should pass array to the key-generating function', () => {\n    const array = [1, 2, 3, 4];\n    const result = groupBy(array, (item, index, arr) => (item < arr.length / 2 ? 'small' : 'large'));\n\n    expect(result).toEqual({\n      small: [1],\n      large: [2, 3, 4],\n    });\n  });\n\n  it('should group elements by a numeric key', () => {\n    const array = [\n      { score: 1, name: 'John' },\n      { score: 2, name: 'Jane' },\n      { score: 1, name: 'Joe' },\n    ];\n\n    const result = groupBy(array, item => item.score);\n\n    expect(result).toEqual({\n      '1': [\n        { score: 1, name: 'John' },\n        { score: 1, name: 'Joe' },\n      ],\n      '2': [{ score: 2, name: 'Jane' }],\n    });\n  });\n\n  it('should group elements by a symbol key', () => {\n    const TYPE_A = Symbol();\n    const TYPE_B = Symbol();\n    const array = [\n      { type: TYPE_A, score: 1, name: 'John' },\n      { type: TYPE_A, score: 2, name: 'Jane' },\n      { type: TYPE_B, score: 1, name: 'Joe' },\n    ];\n\n    const result = groupBy(array, item => item.type);\n\n    expect(result).toEqual({\n      [TYPE_A]: [\n        { type: TYPE_A, score: 1, name: 'John' },\n        { type: TYPE_A, score: 2, name: 'Jane' },\n      ],\n      [TYPE_B]: [{ type: TYPE_B, score: 1, name: 'Joe' }],\n    });\n  });\n\n  it('should handle duplicate keys correctly', () => {\n    const array = [\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'apple' },\n    ];\n\n    const result = groupBy(array, item => item.category);\n\n    expect(result).toEqual({\n      fruit: [\n        { category: 'fruit', name: 'apple' },\n        { category: 'fruit', name: 'apple' },\n      ],\n    });\n  });\n});\n"
  },
  {
    "path": "src/array/groupBy.ts",
    "content": "/**\n * Groups the elements of an array based on a provided key-generating function.\n *\n * This function takes an array and a function that generates a key from each element. It returns\n * an object where the keys are the generated keys and the values are arrays of elements that share\n * the same key.\n *\n * @template T - The type of elements in the array.\n * @template K - The type of keys.\n * @param {T[]} arr - The array to group.\n * @param {(item: T, index: number, array: readonly T[]) => K} getKeyFromItem - A function that generates a key from an element, its index, and the array.\n * @returns {Record<K, T[]>} An object where each key is associated with an array of elements that\n * share that key.\n *\n * @example\n * const array = [\n *   { category: 'fruit', name: 'apple' },\n *   { category: 'fruit', name: 'banana' },\n *   { category: 'vegetable', name: 'carrot' }\n * ];\n * const result = groupBy(array, item => item.category);\n * // result will be:\n * // {\n * //   fruit: [\n * //     { category: 'fruit', name: 'apple' },\n * //     { category: 'fruit', name: 'banana' }\n * //   ],\n * //   vegetable: [\n * //     { category: 'vegetable', name: 'carrot' }\n * //   ]\n * // }\n *\n * @example\n * // Using index parameter\n * const items = ['a', 'b', 'c', 'd'];\n * const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd');\n * // result will be: { even: ['a', 'c'], odd: ['b', 'd'] }\n */\nexport function groupBy<T, K extends PropertyKey>(\n  arr: readonly T[],\n  getKeyFromItem: (item: T, index: number, array: readonly T[]) => K\n): Record<K, T[]> {\n  const result = {} as Record<K, T[]>;\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    const key = getKeyFromItem(item, i, arr);\n\n    if (!Object.hasOwn(result, key)) {\n      result[key] = [];\n    }\n\n    result[key].push(item);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/head.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { head } from './head';\n\ndescribe('head', () => {\n  it('returns the first element of an array or undefined for empty arrays', () => {\n    expect(head([1, 2, 3])).toBe(1);\n\n    expect(head(['a', 'b', 'c'])).toBe('a');\n\n    expect(head([true, false, true])).toBe(true);\n\n    expect(head([])).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "src/array/head.ts",
    "content": "/**\n * Returns the first element of an array.\n *\n * This function takes an array and returns the first element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * @template T - The type of elements in the array.\n * @param {[T, ...T[]]} arr - A non-empty array from which to get the first element.\n * @returns {T} The first element of the array.\n *\n * @example\n * const arr = [1, 2, 3];\n * const firstElement = head(arr);\n * // firstElement will be 1\n */\nexport function head<T>(arr: readonly [T, ...T[]]): T;\n\n/**\n * Returns the first element of an array or `undefined` if the array is empty.\n *\n * This function takes an array and returns the first element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to get the first element.\n * @returns {T | undefined} The first element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const emptyArr: number[] = [];\n * const noElement = head(emptyArr);\n * // noElement will be undefined\n */\nexport function head<T>(arr: readonly T[]): T | undefined;\n\n/**\n * Returns the first element of an array or `undefined` if the array is empty.\n *\n * This function takes an array and returns the first element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to get the first element.\n * @returns {T | undefined} The first element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const emptyArr: number[] = [];\n * const noElement = head(emptyArr);\n * // noElement will be undefined\n */\nexport function head<T>(arr: readonly T[]): T | undefined {\n  return arr[0];\n}\n"
  },
  {
    "path": "src/array/index.ts",
    "content": "export { at } from './at.ts';\nexport { chunk } from './chunk.ts';\nexport { compact } from './compact.ts';\nexport { countBy } from './countBy.ts';\nexport { difference } from './difference.ts';\nexport { differenceBy } from './differenceBy.ts';\nexport { differenceWith } from './differenceWith.ts';\nexport { drop } from './drop.ts';\nexport { dropRight } from './dropRight.ts';\nexport { dropRightWhile } from './dropRightWhile.ts';\nexport { dropWhile } from './dropWhile.ts';\nexport { fill } from './fill.ts';\nexport { filterAsync } from './filterAsync.ts';\nexport { flatMap } from './flatMap.ts';\nexport { flatMapAsync } from './flatMapAsync.ts';\nexport { flatMapDeep } from './flatMapDeep.ts';\nexport { flatten } from './flatten.ts';\nexport { flattenDeep } from './flattenDeep.ts';\nexport { forEachAsync } from './forEachAsync.ts';\nexport { forEachRight } from './forEachRight.ts';\nexport { groupBy } from './groupBy.ts';\nexport { head } from './head.ts';\nexport { initial } from './initial.ts';\nexport { intersection } from './intersection.ts';\nexport { intersectionBy } from './intersectionBy.ts';\nexport { intersectionWith } from './intersectionWith.ts';\nexport { isSubset } from './isSubset.ts';\nexport { isSubsetWith } from './isSubsetWith.ts';\nexport { keyBy } from './keyBy.ts';\nexport { last } from './last.ts';\nexport { limitAsync } from './limitAsync.ts';\nexport { mapAsync } from './mapAsync.ts';\nexport { maxBy } from './maxBy.ts';\nexport { minBy } from './minBy.ts';\nexport { orderBy } from './orderBy.ts';\nexport { partition } from './partition.ts';\nexport { pull } from './pull.ts';\nexport { pullAt } from './pullAt.ts';\nexport { reduceAsync } from './reduceAsync.ts';\nexport { remove } from './remove.ts';\nexport { sample } from './sample.ts';\nexport { sampleSize } from './sampleSize.ts';\nexport { shuffle } from './shuffle.ts';\nexport { sortBy } from './sortBy.ts';\nexport { tail } from './tail.ts';\nexport { take } from './take.ts';\nexport { takeRight } from './takeRight.ts';\nexport { takeRightWhile } from './takeRightWhile.ts';\nexport { takeWhile } from './takeWhile.ts';\nexport { toFilled } from './toFilled.ts';\nexport { union } from './union.ts';\nexport { unionBy } from './unionBy.ts';\nexport { unionWith } from './unionWith.ts';\nexport { uniq } from './uniq.ts';\nexport { uniqBy } from './uniqBy.ts';\nexport { uniqWith } from './uniqWith.ts';\nexport { unzip } from './unzip.ts';\nexport { unzipWith } from './unzipWith.ts';\nexport { windowed } from './windowed.ts';\nexport { without } from './without.ts';\nexport { xor } from './xor.ts';\nexport { xorBy } from './xorBy.ts';\nexport { xorWith } from './xorWith.ts';\nexport { zip } from './zip.ts';\nexport { zipObject } from './zipObject.ts';\nexport { zipWith } from './zipWith.ts';\n"
  },
  {
    "path": "src/array/initial.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { initial } from './initial';\n\ndescribe('initial', () => {\n  it('returns a new array containing all elements except the last one from the input array', () => {\n    expect(initial([1, 2, 3])).toEqual([1, 2]);\n    expect(initial(['a', 'b', 'c'])).toEqual(['a', 'b']);\n    expect(initial([1, true, 'string'])).toEqual([1, true]);\n    expect(initial([])).toEqual([]);\n  });\n\n  // Edge cases\n  it('returns an empty array for a single-element array', () => {\n    expect(initial(['one'])).toEqual([]);\n  });\n\n  it('returns all elements except the last one for a large array', () => {\n    const largeArray = Array(1000)\n      .fill(0)\n      .map((_, i) => i);\n    const expectedArray = Array(999)\n      .fill(0)\n      .map((_, i) => i);\n    expect(initial(largeArray)).toEqual(expectedArray);\n  });\n\n  it('returns all elements except the last one for a nested array', () => {\n    const nestedArray = [\n      [3, 1],\n      [3, 2],\n      [3, 3],\n    ];\n    expect(initial(nestedArray)).toEqual([\n      [3, 1],\n      [3, 2],\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/initial.ts",
    "content": "/**\n * Returns an empty array when the input is a tuple containing exactly one element.\n *\n * @template T The type of the single element.\n * @param {[T]} arr - A tuple containing exactly one element.\n * @returns {[]} An empty array since there is only one element.\n *\n * @example\n * const array = [100] as const;\n * const result = initial(array);\n * // result will be []\n */\nexport function initial<T>(arr: readonly [T]): [];\n\n/**\n * Returns an empty array when the input array is empty.\n *\n * @returns {[]} Always returns an empty array for an empty input.\n *\n * @example\n * const array = [] as const;\n * const result = initial(array);\n * // result will be []\n */\nexport function initial(arr: readonly []): [];\n\n/**\n * Returns a new array containing all elements except the last one from a tuple with multiple elements.\n *\n * @template T The types of the initial elements.\n * @template U The type of the last element in the tuple.\n * @param {[...T[], U]} arr - A tuple with one or more elements.\n * @returns {T[]} A new array containing all but the last element of the tuple.\n *\n * @example\n * const array = ['apple', 'banana', 'cherry'] as const;\n * const result = initial(array);\n * // result will be ['apple', 'banana']\n */\nexport function initial<T, U>(arr: readonly [...T[], U]): T[];\n\n/**\n * Returns a new array containing all elements except the last one from the input array.\n * If the input array is empty or has only one element, the function returns an empty array.\n *\n * @template T The type of elements in the array.\n * @param {T[]} arr - The input array.\n * @returns {T[]} A new array containing all but the last element of the input array.\n *\n * @example\n * const arr = [1, 2, 3, 4];\n * const result = initial(arr);\n * // result will be [1, 2, 3]\n */\nexport function initial<T>(arr: readonly T[]): T[];\n\n/**\n * Returns a new array containing all elements except the last one from the input array.\n * If the input array is empty or has only one element, the function returns an empty array.\n *\n * @template T The type of elements in the array.\n * @param {T[]} arr - The input array.\n * @returns {T[]} A new array containing all but the last element of the input array.\n *\n * @example\n * const arr = [1, 2, 3, 4];\n * const result = initial(arr);\n * // result will be [1, 2, 3]\n */\nexport function initial<T>(arr: readonly T[]): T[] {\n  return arr.slice(0, -1);\n}\n"
  },
  {
    "path": "src/array/intersection.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { intersection } from './intersection';\n\ndescribe('intersection', () => {\n  it('should return the intersection of two arrays', () => {\n    expect(intersection([1, 2], [1, 3])).toEqual([1]);\n    expect(intersection([1, 2], [3, 1])).toEqual([1]);\n    expect(intersection([1, 2], [3, 4])).toEqual([]);\n    expect(intersection([], [1, 2])).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/intersection.ts",
    "content": "/**\n * Returns the intersection of two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements that are\n * present in both arrays. It effectively filters out any elements from the first array that\n * are not found in the second array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @returns {T[]} A new array containing the elements that are present in both arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n  const secondSet = new Set(secondArr);\n\n  return firstArr.filter(item => secondSet.has(item));\n}\n"
  },
  {
    "path": "src/array/intersectionBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { intersectionBy } from './intersectionBy';\n\ndescribe('intersectionBy', () => {\n  it('should return the intersection of two arrays with `mapper`', () => {\n    expect(intersectionBy([1.2, 2.1], [1.4, 3.1], Math.floor)).toStrictEqual([1.2]);\n    expect(intersectionBy([{ foo: 1 }, { foo: 2 }], [{ foo: 1 }, { foo: 3 }], x => x.foo)).toStrictEqual([{ foo: 1 }]);\n  });\n\n  it('should return the intersection of two arrays with different element types using a `mapper` function', () => {\n    type CSV = { id: number; csv: number };\n    type JSON = { id: number; json: number };\n\n    const array1: CSV[] = [\n      { id: 1, csv: 1 },\n      { id: 2, csv: 1 },\n      { id: 3, csv: 1 },\n    ];\n    const array2: JSON[] = [\n      { id: 2, json: 2 },\n      { id: 4, json: 2 },\n    ];\n\n    const result = intersectionBy(array1, array2, value => value.id);\n    expect(result).toEqual([{ id: 2, csv: 1 }]);\n  });\n\n  it('should match each value from the first array to at most one value in the second array using the mapper', () => {\n    expect(intersectionBy([2.1, 2.2], [2.3, 3.4], Math.floor)).toStrictEqual([2.1]);\n  });\n});\n"
  },
  {
    "path": "src/array/intersectionBy.ts",
    "content": "/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {U[]} secondArr - The second array to compare.\n * @param {(item: T | U) => unknown} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n *\n * @example\n * const array1 = [\n *   { id: 1, name: 'jane' },\n *   { id: 2, name: 'amy' },\n *   { id: 3, name: 'michael' },\n * ];\n * const array2 = [2, 4];\n * const mapper = item => (typeof item === 'object' ? item.id : item);\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2, name: 'amy' }] since only this element has a matching id that is equal to seconds array's element.\n */\nexport function intersectionBy<T, U>(\n  firstArr: readonly T[],\n  secondArr: readonly U[],\n  mapper: (item: T | U) => unknown\n): T[] {\n  const result: T[] = [];\n  const mappedSecondSet = new Set(secondArr.map(mapper));\n\n  for (let i = 0; i < firstArr.length; i++) {\n    const item = firstArr[i];\n    const mappedItem = mapper(item);\n\n    if (mappedSecondSet.has(mappedItem)) {\n      result.push(item);\n      mappedSecondSet.delete(mappedItem);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/intersectionWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { intersectionWith } from './intersectionWith';\n\ndescribe('intersectionWith', () => {\n  it('should return the intersection of two arrays with `mapper`', () => {\n    expect(intersectionWith([1.2, 2.1], [1.4, 3.1], (x, y) => Math.floor(x) === Math.floor(y))).toStrictEqual([1.2]);\n    expect(\n      intersectionWith([{ foo: 1 }, { foo: 2 }], [{ foo: 1 }, { foo: 3 }], (x, y) => x.foo === y.foo)\n    ).toStrictEqual([{ foo: 1 }]);\n  });\n\n  it('should return the intersection of two arrays have different type', () => {\n    type CSV = { id: number; csv: number };\n    type JSON = { id: number; json: number };\n\n    const array1: CSV[] = [\n      { id: 1, csv: 1 },\n      { id: 2, csv: 1 },\n      { id: 3, csv: 1 },\n    ];\n    const array2: JSON[] = [\n      { id: 2, json: 2 },\n      { id: 4, json: 2 },\n    ];\n\n    const result = intersectionWith(array1, array2, (a, b) => a.id === b.id);\n    expect(result).toEqual([{ id: 2, csv: 1 }]);\n  });\n});\n"
  },
  {
    "path": "src/array/intersectionWith.ts",
    "content": "/**\n * Returns the intersection of two arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom equality function. It returns a new array containing\n * the elements from the first array that have matching elements in the second array, as determined\n * by the custom equality function. It effectively filters out any elements from the first array that\n * do not have corresponding matches in the second array according to the equality function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {U[]} secondArr - The second array to compare.\n * @param {(x: T, y: U) => boolean} areItemsEqual - A custom function to determine if two elements are equal.\n * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2 }] since this element has a matching id in both arrays.\n *\n * @example\n * const array1 = [\n *   { id: 1, name: 'jane' },\n *   { id: 2, name: 'amy' },\n *   { id: 3, name: 'michael' },\n * ];\n * const array2 = [2, 4];\n * const areItemsEqual = (a, b) => a.id === b;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2, name: 'amy' }] since this element has a matching id that is equal to seconds array's element.\n */\nexport function intersectionWith<T, U>(\n  firstArr: readonly T[],\n  secondArr: readonly U[],\n  areItemsEqual: (x: T, y: U) => boolean\n): T[] {\n  return firstArr.filter(firstItem => {\n    return secondArr.some(secondItem => {\n      return areItemsEqual(firstItem, secondItem);\n    });\n  });\n}\n"
  },
  {
    "path": "src/array/isSubset.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isSubset } from './isSubset';\n\ndescribe('isSubset', () => {\n  it('should correctly determine if the subset arrays are subsets of the superset array', () => {\n    const superset = [1, 2, 3, 4];\n    const subset1 = [1, 3];\n    const subset2 = [1, 5];\n    const subset3 = [1, '3'];\n\n    expect(isSubset(superset, subset1)).toBeTruthy();\n\n    expect(isSubset(superset, subset2)).toBeFalsy();\n    expect(isSubset(superset, subset3)).toBeFalsy();\n  });\n});\n"
  },
  {
    "path": "src/array/isSubset.ts",
    "content": "import { difference } from '../array/difference.ts';\n\n/**\n * Checks if the `subset` array is entirely contained within the `superset` array.\n *\n *\n * @template T - The type of elements contained in the arrays.\n * @param {T[]} superset - The array that may contain all elements of the subset.\n * @param {T[]} subset - The array to check against the superset.\n * @returns {boolean} - Returns `true` if all elements of the `subset` are present in the `superset`, otherwise returns `false`.\n *\n * @example\n * ```typescript\n * const superset = [1, 2, 3, 4, 5];\n * const subset = [2, 3, 4];\n * isSubset(superset, subset); // true\n * ```\n *\n * @example\n * ```typescript\n * const superset = ['a', 'b', 'c'];\n * const subset = ['a', 'd'];\n * isSubset(superset, subset); // false\n * ```\n */\n\nexport function isSubset<T>(superset: readonly T[], subset: readonly T[]): boolean {\n  return difference(subset, superset).length === 0;\n}\n"
  },
  {
    "path": "src/array/isSubsetWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isSubsetWith } from './isSubsetWith';\n\ndescribe('isSubsetWith', () => {\n  it('should return true if the subset is entirely contained within the superset using the `areItemsEqual` function', () => {\n    const superset = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const subset = [{ id: 2 }, { id: 1 }];\n    const areItemsEqual = (x: { id: number }, y: { id: number }) => x.id === y.id;\n\n    expect(isSubsetWith(superset, subset, areItemsEqual)).toBeTruthy();\n  });\n\n  it('should return false if the subset is not entirely contained within the superset', () => {\n    const superset = [{ id: 1 }, { id: 2 }, { id: 3 }];\n    const subset = [{ id: 4 }];\n    const areItemsEqual = (x: { id: number }, y: { id: number }) => x.id === y.id;\n\n    expect(isSubsetWith(superset, subset, areItemsEqual)).toBeFalsy();\n  });\n\n  it('should handle empty arrays correctly', () => {\n    const superset = [1, 2, 3];\n    const emptySubset: number[] = [];\n    const areItemsEqual = (x: number, y: number) => x === y;\n\n    expect(isSubsetWith(superset, emptySubset, areItemsEqual)).toBeTruthy();\n\n    const emptySuperset: number[] = [];\n    const subset = [1];\n    expect(isSubsetWith(emptySuperset, subset, areItemsEqual)).toBeFalsy();\n  });\n\n  it('should handle duplicates correctly', () => {\n    const superset = [1, 2, 2, 3];\n    const subset = [2, 2];\n    const areItemsEqual = (x: number, y: number) => x === y;\n\n    expect(isSubsetWith(superset, subset, areItemsEqual)).toBeTruthy();\n\n    const subsetWithExtra = [2, 2, 4];\n    expect(isSubsetWith(superset, subsetWithExtra, areItemsEqual)).toBeFalsy();\n  });\n});\n"
  },
  {
    "path": "src/array/isSubsetWith.ts",
    "content": "import { differenceWith } from './differenceWith.ts';\n\n/**\n * Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function.\n *\n * This function takes two arrays and a custom comparison function. It returns a boolean indicating\n * whether all elements in the subset array are present in the superset array, as determined by the provided\n * custom equality function.\n *\n * @template T - The type of elements contained in the arrays.\n * @param {T[]} superset - The array that may contain all elements of the subset.\n * @param {T[]} subset - The array to check against the superset.\n * @param {(x: T, y: T) => boolean} areItemsEqual - A function to determine if two items are equal.\n * @returns {boolean} - Returns `true` if all elements of the subset are present in the superset\n * according to the custom equality function, otherwise returns `false`.\n *\n * @example\n * ```typescript\n * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const subset = [{ id: 2 }, { id: 1 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * isSubsetWith(superset, subset, areItemsEqual); // true\n * ```\n *\n * @example\n * ```typescript\n * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const subset = [{ id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * isSubsetWith(superset, subset, areItemsEqual); // false\n * ```\n */\nexport function isSubsetWith<T>(\n  superset: readonly T[],\n  subset: readonly T[],\n  areItemsEqual: (x: T, y: T) => boolean\n): boolean {\n  return differenceWith(subset, superset, areItemsEqual).length === 0;\n}\n"
  },
  {
    "path": "src/array/keyBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { keyBy } from './keyBy';\n\ndescribe('keyBy', () => {\n  it('should map each element of an array by string key', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n    ];\n\n    const result = keyBy(people, person => person.name);\n    expect(result).toEqual({ mike: { name: 'mike', age: 20 }, jake: { name: 'jake', age: 30 } });\n  });\n\n  it('should map each element of an array by number key', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'jake', age: 30 },\n    ];\n\n    const result = keyBy(people, person => person.age);\n    expect(result).toEqual({ 20: { name: 'mike', age: 20 }, 30: { name: 'jake', age: 30 } });\n  });\n\n  it('should map each element of an array by symbol key', () => {\n    const id1 = Symbol('id');\n    const id2 = Symbol('id');\n    const people = [\n      { id: id1, name: 'mike', age: 20 },\n      { id: id2, name: 'jake', age: 30 },\n    ];\n\n    const result = keyBy(people, person => person.id);\n    expect(result).toEqual({\n      [id1]: { id: id1, name: 'mike', age: 20 },\n      [id2]: { id: id2, name: 'jake', age: 30 },\n    });\n  });\n\n  it('should overwrite the value when encountering the same key', () => {\n    const people = [\n      { name: 'mike', age: 20 },\n      { name: 'mike', age: 30 },\n    ];\n\n    const result = keyBy(people, person => person.name);\n\n    expect(result).toEqual({ mike: { name: 'mike', age: 30 } });\n  });\n\n  it('should pass index to key-generating function', () => {\n    const items = ['a', 'b', 'c'];\n    const result = keyBy(items, (item, index) => index);\n\n    expect(result).toEqual({ 0: 'a', 1: 'b', 2: 'c' });\n  });\n\n  it('should pass array to key-generating function', () => {\n    const items = [10, 20, 30];\n    const result = keyBy(items, (item, index, arr) => (item > arr[0] ? 'large' : 'small'));\n\n    expect(result).toEqual({ small: 10, large: 30 });\n  });\n\n  it('should handle empty array', () => {\n    const people: Array<{ name: string; age: number }> = [];\n\n    const result = keyBy(people, person => person.name);\n\n    expect(result).toEqual({});\n  });\n});\n"
  },
  {
    "path": "src/array/keyBy.ts",
    "content": "/**\n * Maps each element of an array based on a provided key-generating function.\n *\n * This function takes an array and a function that generates a key from each element. It returns\n * an object where the keys are the generated keys and the values are the corresponding elements.\n * If there are multiple elements generating the same key, the last element among them is used\n * as the value.\n *\n * @template T - The type of elements in the array.\n * @template K - The type of keys.\n * @param {T[]} arr - The array of elements to be mapped.\n * @param {(item: T, index: number, array: readonly T[]) => K} getKeyFromItem - A function that generates a key from an element, its index, and the array.\n * @returns {Record<K, T>} An object where keys are mapped to each element of an array.\n *\n * @example\n * const array = [\n *   { category: 'fruit', name: 'apple' },\n *   { category: 'fruit', name: 'banana' },\n *   { category: 'vegetable', name: 'carrot' }\n * ];\n * const result = keyBy(array, item => item.category);\n * // result will be:\n * // {\n * //   fruit: { category: 'fruit', name: 'banana' },\n * //   vegetable: { category: 'vegetable', name: 'carrot' }\n * // }\n *\n * @example\n * // Using index parameter\n * const items = ['a', 'b', 'c'];\n * const result = keyBy(items, (item, index) => index);\n * // result will be: { 0: 'a', 1: 'b', 2: 'c' }\n */\nexport function keyBy<T, K extends PropertyKey>(\n  arr: readonly T[],\n  getKeyFromItem: (item: T, index: number, array: readonly T[]) => K\n): Record<K, T> {\n  const result = {} as Record<K, T>;\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    const key = getKeyFromItem(item, i, arr);\n    result[key] = item;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/last.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { last } from './last';\n\ndescribe('last', () => {\n  it('returns the last element of an array or undefined for empty array', () => {\n    expect(last([1, 2, 3])).toBe(3);\n    expect(last(['a', 'b', 'c'])).toBe('c');\n    expect(last([1, 'string', true])).toBe(true);\n    expect(last([])).toBeUndefined();\n  });\n  // Edge cases\n  it('returns the only element in a single-element array', () => {\n    expect(last([42])).toBe(42);\n  });\n\n  it('returns the last element of a large array', () => {\n    const largeArray = Array(1000)\n      .fill(0)\n      .map((_, i) => i);\n    expect(last(largeArray)).toBe(999);\n  });\n\n  it('returns the last element of a nested array', () => {\n    const nestedArray = [\n      [3, 1],\n      [3, 2],\n      [3, 3],\n    ];\n    expect(last(nestedArray)).toEqual([3, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/last.ts",
    "content": "/**\n * Returns the last element of an array.\n *\n * This function takes an array and returns the last element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * Unlike some implementations, this function is optimized for performance\n * by directly accessing the last index of the array.\n *\n * @template T - The type of elements in the array.\n * @param {[...T[], T]} arr - The array from which to get the last element.\n * @returns {T} The last element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const arr = [1, 2, 3];\n * const lastElement = last(arr);\n * // lastElement will be 3\n *\n * const emptyArr: number[] = [];\n * const noElement = last(emptyArr);\n * // noElement will be undefined\n */\nexport function last<T>(arr: readonly [...T[], T]): T;\n\n/**\n * Returns the last element of an array.\n *\n * This function takes an array and returns the last element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * Unlike some implementations, this function is optimized for performance\n * by directly accessing the last index of the array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to get the last element.\n * @returns {T | undefined} The last element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const arr = [1, 2, 3];\n * const lastElement = last(arr);\n * // lastElement will be 3\n *\n * const emptyArr: number[] = [];\n * const noElement = last(emptyArr);\n * // noElement will be undefined\n */\nexport function last<T>(arr: readonly T[]): T | undefined;\n\n/**\n * Returns the last element of an array.\n *\n * This function takes an array and returns the last element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * Unlike some implementations, this function is optimized for performance\n * by directly accessing the last index of the array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to get the last element.\n * @returns {T | undefined} The last element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const arr = [1, 2, 3];\n * const lastElement = last(arr);\n * // lastElement will be 3\n *\n * const emptyArr: number[] = [];\n * const noElement = last(emptyArr);\n * // noElement will be undefined\n */\nexport function last<T>(arr: readonly T[]): T | undefined {\n  return arr[arr.length - 1];\n}\n"
  },
  {
    "path": "src/array/limitAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { limitAsync } from './limitAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('limitAsync', () => {\n  it('limits concurrency of async callbacks', async () => {\n    let running = 0;\n    let maxRunning = 0;\n\n    const callback = vi.fn(async () => {\n      running++;\n\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n      await delay(30);\n\n      running--;\n    });\n\n    const limitedCallback = limitAsync(callback, 2);\n\n    await Promise.all([limitedCallback(), limitedCallback(), limitedCallback(), limitedCallback(), limitedCallback()]);\n\n    expect(maxRunning).toBeLessThanOrEqual(2);\n    expect(callback).toHaveBeenCalledTimes(5);\n  });\n\n  it('returns correct values in correct order', async () => {\n    const callback = vi.fn(async (item: number) => item);\n\n    const limitedCallback = limitAsync(callback, 3);\n\n    const results = await Promise.all([limitedCallback(3), limitedCallback(1), limitedCallback(4), limitedCallback(2)]);\n\n    expect(results).toEqual([3, 1, 4, 2]);\n\n    expect(callback).toBeCalledTimes(4);\n    expect(callback.mock.calls[0][0]).toBe(3);\n    expect(callback.mock.calls[1][0]).toBe(1);\n    expect(callback.mock.calls[2][0]).toBe(4);\n    expect(callback.mock.calls[3][0]).toBe(2);\n  });\n\n  it('propagates callback errors', async () => {\n    const callback = vi.fn(async (item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n      return item;\n    });\n\n    const limitedCallback = limitAsync(callback, 2);\n\n    await expect(Promise.all([limitedCallback(1), limitedCallback(2), limitedCallback(3)])).rejects.toThrow('fail');\n  });\n});\n"
  },
  {
    "path": "src/array/limitAsync.ts",
    "content": "import { Semaphore } from '../promise/semaphore';\n\n/**\n * Wraps an async function to limit the number of concurrent executions.\n *\n * This function creates a wrapper around an async callback that ensures at most\n * `concurrency` number of executions can run simultaneously. Additional calls will\n * wait until a slot becomes available.\n *\n * @template F - The type of the async function to wrap.\n * @param {F} callback The async function to wrap with concurrency control.\n * @param {number} concurrency Maximum number of concurrent executions allowed.\n * @returns {F} A wrapped version of the callback with concurrency limiting.\n * @example\n * const limitedFetch = limitAsync(async (url) => {\n *   return await fetch(url);\n * }, 3);\n *\n * // Only 3 fetches will run concurrently\n * const urls = ['url1', 'url2', 'url3', 'url4', 'url5'];\n * await Promise.all(urls.map(url => limitedFetch(url)));\n *\n * @example\n * const processItem = async (item) => {\n *   // Expensive async operation\n *   return await heavyComputation(item);\n * };\n *\n * const limitedProcess = limitAsync(processItem, 2);\n * const items = [1, 2, 3, 4, 5];\n * // At most 2 items will be processed concurrently\n * await Promise.all(items.map(item => limitedProcess(item)));\n */\nexport function limitAsync<F extends (...args: any[]) => Promise<any>>(callback: F, concurrency: number): F {\n  const semaphore = new Semaphore(concurrency);\n\n  return async function (this: ThisType<F>, ...args: Parameters<F>): Promise<ReturnType<F>> {\n    try {\n      await semaphore.acquire();\n      return await callback.apply(this, args);\n    } finally {\n      semaphore.release();\n    }\n  } as F;\n}\n"
  },
  {
    "path": "src/array/mapAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { mapAsync } from './mapAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('mapAsync', () => {\n  it('maps array asynchronously', async () => {\n    const arr = [1, 2, 3];\n\n    const callback = vi.fn(async n => n * 2);\n    const result = await mapAsync(arr, callback);\n\n    expect(result).toEqual([2, 4, 6]);\n\n    expect(callback).toHaveBeenCalledTimes(arr.length);\n    expect(callback.mock.calls[0]).toEqual([1, 0, arr]);\n    expect(callback.mock.calls[1]).toEqual([2, 1, arr]);\n    expect(callback.mock.calls[2]).toEqual([3, 2, arr]);\n  });\n\n  it('returns empty array if given empty array', async () => {\n    const arr: number[] = [];\n    const callback = vi.fn(async n => n * 2);\n\n    const result = await mapAsync(arr, callback);\n    expect(result).toEqual([]);\n\n    expect(callback).toHaveBeenCalledTimes(0);\n  });\n\n  it('propagates rejection if any callback throws', async () => {\n    const arr = [1, 2, 3];\n    const errorFn = async (item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n      return item;\n    };\n    await expect(mapAsync(arr, errorFn)).rejects.toThrow('fail');\n  });\n\n  it('respects concurrency limit', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = vi.fn(async (item: number) => {\n      running++;\n\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n\n      await delay(20);\n      running--;\n      return item * 2;\n    });\n\n    const concurrency = 2;\n    const result = await mapAsync(arr, fn, { concurrency });\n\n    expect(result).toEqual([2, 4, 6, 8, 10]);\n    expect(maxRunning).toBeLessThanOrEqual(concurrency);\n    expect(fn).toHaveBeenCalledTimes(arr.length);\n  });\n\n  it('uses full concurrency when not specified', async () => {\n    const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n    let running = 0;\n    let maxRunning = 0;\n\n    const fn = async (item: number) => {\n      running++;\n      if (running > maxRunning) {\n        maxRunning = running;\n      }\n      await delay(20);\n      running--;\n      return item;\n    };\n\n    await mapAsync(arr, fn);\n    expect(maxRunning).toBe(10);\n  });\n});\n"
  },
  {
    "path": "src/array/mapAsync.ts",
    "content": "import { limitAsync } from './limitAsync.ts';\n\ninterface MapAsyncOptions {\n  concurrency?: number;\n}\n\n/**\n * Transforms each element in an array using an async callback function and returns\n * a promise that resolves to an array of transformed values.\n *\n * @template T - The type of elements in the input array.\n * @template R - The type of elements in the output array.\n * @param {readonly T[]} array The array to transform.\n * @param {(item: T, index: number, array: readonly T[]) => Promise<R>} callback An async function that transforms each element.\n * @param {MapAsyncOptions} [options] Optional configuration object.\n * @param {number} [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently.\n * @returns {Promise<R[]>} A promise that resolves to an array of transformed values.\n * @example\n * const users = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const userDetails = await mapAsync(users, async (user) => {\n *   return await fetchUserDetails(user.id);\n * });\n * // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]\n *\n * @example\n * // With concurrency limit\n * const numbers = [1, 2, 3, 4, 5];\n * const results = await mapAsync(\n *   numbers,\n *   async (n) => await slowOperation(n),\n *   { concurrency: 2 }\n * );\n * // Processes at most 2 operations concurrently\n */\nexport function mapAsync<T, R>(\n  array: readonly T[],\n  callback: (item: T, index: number, array: readonly T[]) => Promise<R>,\n  options?: MapAsyncOptions\n): Promise<R[]> {\n  if (options?.concurrency != null) {\n    callback = limitAsync(callback, options.concurrency);\n  }\n\n  return Promise.all(array.map(callback));\n}\n"
  },
  {
    "path": "src/array/maxBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { maxBy } from './maxBy';\n\ndescribe('maxBy', () => {\n  it('maxBy selects one max value in array', () => {\n    const people = [\n      { name: 'Mark', age: 25 },\n      { name: 'Nunu', age: 30 },\n      { name: 'Overmars', age: 20 },\n    ];\n    const result = maxBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Nunu', age: 30 });\n  });\n\n  it('if there are two max values, first one is selected', () => {\n    const people = [\n      { name: 'Mark', age: 25 },\n      { name: 'Nunu', age: 30 },\n      { name: 'Overmars', age: 30 },\n    ];\n    const result = maxBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Nunu', age: 30 });\n  });\n\n  it('if array is single-element, return unique element of array', () => {\n    const people = [{ name: 'Mark', age: 25 }];\n    const result = maxBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Mark', age: 25 });\n  });\n\n  it('if array is empty, return undefined', () => {\n    type Person = { name: string; age: number };\n    const people: Person[] = [];\n    const result = maxBy(people, person => person.age);\n    expect(result).toBeUndefined();\n  });\n\n  it('should skip NaN values when comparing elements', () => {\n    const numbers = [1, Number.NaN, 3, 2];\n    const result = maxBy(numbers, x => x);\n    expect(result).toBe(3);\n  });\n\n  it('should provide index parameter to getValue function', () => {\n    const items = [{ value: 10 }, { value: 20 }, { value: 15 }];\n    const result = maxBy(items, (item, index) => item.value + index);\n    expect(result).toEqual({ value: 20 });\n  });\n\n  it('should provide array parameter to getValue function', () => {\n    const items = [{ value: 10 }, { value: 20 }, { value: 15 }];\n    const result = maxBy(items, (item, _index, array) => item.value * array.length);\n    expect(result).toEqual({ value: 20 });\n  });\n});\n"
  },
  {
    "path": "src/array/maxBy.ts",
    "content": "/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {[T, ...T[]]} items The nonempty array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the maximum value as determined by the `getValue` function.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n * maxBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'john', age: 30 }\n */\nexport function maxBy<T>(\n  items: readonly [T, ...T[]],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T;\n/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T, index: number, array: readonly T[]) => number} getValue A function that selects a numeric value from each element.\n * @returns {T | undefined} The element with the maximum value as determined by the `getValue` function,\n * or `undefined` if the array is empty.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n * maxBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'john', age: 30 }\n */\nexport function maxBy<T>(\n  items: readonly T[],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T | undefined;\n/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T, index: number, array: readonly T[]) => number} getValue A function that selects a numeric value from each element.\n * @returns {T | undefined} The element with the maximum value as determined by the `getValue` function,\n * or `undefined` if the array is empty.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n * maxBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'john', age: 30 }\n */\nexport function maxBy<T>(\n  items: readonly T[],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T | undefined {\n  if (items.length === 0) {\n    return undefined;\n  }\n\n  let maxElement = items[0];\n  let max = getValue(maxElement, 0, items);\n\n  for (let i = 1; i < items.length; i++) {\n    const element = items[i];\n    const value = getValue(element, i, items);\n    if (value > max) {\n      max = value;\n      maxElement = element;\n    }\n  }\n\n  return maxElement;\n}\n"
  },
  {
    "path": "src/array/minBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { minBy } from './minBy';\n\ndescribe('minBy', () => {\n  it('minBy selects one min value in array', () => {\n    const people = [\n      { name: 'Mark', age: 30 },\n      { name: 'Nunu', age: 20 },\n      { name: 'Overmars', age: 35 },\n    ];\n    const result = minBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Nunu', age: 20 });\n  });\n\n  it('if there are two min values, first one is selected', () => {\n    const people = [\n      { name: 'Mark', age: 30 },\n      { name: 'Nunu', age: 20 },\n      { name: 'Overmars', age: 20 },\n    ];\n    const result = minBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Nunu', age: 20 });\n  });\n\n  it('if array is single-element, return unique element of array', () => {\n    const people = [{ name: 'Mark', age: 25 }];\n    const result = minBy(people, person => person.age);\n    expect(result).toEqual({ name: 'Mark', age: 25 });\n  });\n\n  it('if array is empty, return undefined', () => {\n    type Person = { name: string; age: number };\n    const people: Person[] = [];\n    const result = minBy(people, person => person.age);\n    expect(result).toBeUndefined();\n  });\n\n  it('should handle arrays with NaN values correctly', () => {\n    const numbers = [1, Number.NaN, 3, 2];\n    const result = minBy(numbers, x => x);\n    expect(result).toBe(1);\n  });\n\n  it('should provide index parameter to getValue function', () => {\n    const items = [{ value: 10 }, { value: 20 }, { value: 15 }];\n    const result = minBy(items, (item, index) => item.value + index);\n    expect(result).toEqual({ value: 10 });\n  });\n\n  it('should provide array parameter to getValue function', () => {\n    const items = [{ value: 10 }, { value: 20 }, { value: 15 }];\n    const result = minBy(items, (item, _index, array) => item.value * array.length);\n    expect(result).toEqual({ value: 10 });\n  });\n});\n"
  },
  {
    "path": "src/array/minBy.ts",
    "content": "/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {[T, ...T[]]} items The nonempty array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the minimum value as determined by the `getValue` function.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n * minBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'joe', age: 26 }\n */\nexport function minBy<T>(\n  items: readonly [T, ...T[]],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T;\n/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T, index: number, array: readonly T[]) => number} getValue A function that selects a numeric value from each element.\n * @returns {T | undefined} The element with the minimum value as determined by the `getValue` function,\n * or `undefined` if the array is empty.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n * minBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'joe', age: 26 }\n */\nexport function minBy<T>(\n  items: readonly T[],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T | undefined;\n/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T, index: number, array: readonly T[]) => number} getValue A function that selects a numeric value from each element.\n * @returns {T | undefined} The element with the minimum value as determined by the `getValue` function,\n * or `undefined` if the array is empty.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n * minBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'joe', age: 26 }\n */\nexport function minBy<T>(\n  items: readonly T[],\n  getValue: (element: T, index: number, array: readonly T[]) => number\n): T | undefined {\n  if (items.length === 0) {\n    return undefined;\n  }\n\n  let minElement = items[0];\n  let min = getValue(minElement, 0, items);\n\n  for (let i = 1; i < items.length; i++) {\n    const element = items[i];\n    const value = getValue(element, i, items);\n    if (value < min) {\n      min = value;\n      minElement = element;\n    }\n  }\n\n  return minElement;\n}\n"
  },
  {
    "path": "src/array/orderBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { orderBy } from './orderBy';\n\ndescribe('orderBy', () => {\n  const users = [\n    { user: 'fred', age: 48 },\n    { user: 'barney', age: 34 },\n    { user: 'fred', age: 40 },\n    { user: 'barney', age: 36 },\n  ];\n\n  it('should order objects by a single property in ascending order', () => {\n    expect(orderBy(users, ['user'], ['asc'])).toEqual([\n      { user: 'barney', age: 34 },\n      { user: 'barney', age: 36 },\n      { user: 'fred', age: 48 },\n      { user: 'fred', age: 40 },\n    ]);\n  });\n\n  it('should order objects by a single property in descending order', () => {\n    expect(orderBy(users, ['user'], ['desc'])).toEqual([\n      { user: 'fred', age: 48 },\n      { user: 'fred', age: 40 },\n      { user: 'barney', age: 34 },\n      { user: 'barney', age: 36 },\n    ]);\n  });\n\n  it('should order objects by multiple properties', () => {\n    expect(orderBy(users, ['user', 'age'], ['asc', 'desc'])).toEqual([\n      { user: 'barney', age: 36 },\n      { user: 'barney', age: 34 },\n      { user: 'fred', age: 48 },\n      { user: 'fred', age: 40 },\n    ]);\n  });\n\n  const users2 = [\n    { user: 'fred', age: 48 },\n    { user: 'barney', age: 36 },\n    { user: 'fred', age: 40 },\n    { user: 'barney', age: 34 },\n  ];\n\n  it('should extend orders if orders length is less than keys length', () => {\n    expect(orderBy(users2, ['user', 'age'], ['asc'])).toEqual([\n      { user: 'barney', age: 34 },\n      { user: 'barney', age: 36 },\n      { user: 'fred', age: 40 },\n      { user: 'fred', age: 48 },\n    ]);\n  });\n\n  it('should order objects by criteria functions', () => {\n    expect(orderBy(users2, [obj => obj.user, obj => obj.age], ['asc'])).toEqual([\n      { user: 'barney', age: 34 },\n      { user: 'barney', age: 36 },\n      { user: 'fred', age: 40 },\n      { user: 'fred', age: 48 },\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/orderBy.ts",
    "content": "import { compareValues } from '../_internal/compareValues.ts';\n\n/**\n * Sorts an array of objects based on the given `criteria` and their corresponding order directions.\n *\n * - If you provide keys, it sorts the objects by the values of those keys.\n * - If you provide functions, it sorts based on the values returned by those functions.\n *\n * The function returns the array of objects sorted in corresponding order directions.\n * If two objects have the same value for the current criterion, it uses the next criterion to determine their order.\n * If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array of objects to be sorted.\n * @param {Array<((item: T) => unknown) | keyof T>} criteria  - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting.\n * @param {Array<'asc' | 'desc'>} orders - An array of order directions ('asc' for ascending or 'desc' for descending).\n * @returns {T[]} - The sorted array.\n *\n * @example\n * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.\n * const users = [\n *   { user: 'fred', age: 48 },\n *   { user: 'barney', age: 34 },\n *   { user: 'fred', age: 40 },\n *   { user: 'barney', age: 36 },\n * ];\n *\n * const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);\n * // result will be:\n * // [\n * //   { user: 'barney', age: 36 },\n * //   { user: 'barney', age: 34 },\n * //   { user: 'fred', age: 48 },\n * //   { user: 'fred', age: 40 },\n * // ]\n */\nexport function orderBy<T extends object>(\n  arr: readonly T[],\n  criteria: Array<((item: T) => unknown) | keyof T>,\n  orders: Array<'asc' | 'desc'>\n): T[] {\n  return arr.slice().sort((a, b) => {\n    const ordersLength = orders.length;\n\n    for (let i = 0; i < criteria.length; i++) {\n      const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];\n      const criterion = criteria[i];\n      const criterionIsFunction = typeof criterion === 'function';\n\n      const valueA = criterionIsFunction ? criterion(a) : a[criterion];\n      const valueB = criterionIsFunction ? criterion(b) : b[criterion];\n\n      const result = compareValues(valueA, valueB, order);\n\n      if (result !== 0) {\n        return result;\n      }\n    }\n\n    return 0;\n  });\n}\n"
  },
  {
    "path": "src/array/partition.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { partition } from './partition';\n\ndescribe('partition', () => {\n  it('creates two arrays: the first array includes items for which isInTruthy returns true, and the second array includes items for which isInTruthy returns false.', () => {\n    expect(partition([true, true, false], x => x)).toEqual([[true, true], [false]]);\n    expect(\n      partition(\n        [\n          { id: 1, enabled: true },\n          { id: 2, enabled: false },\n          { id: 3, enabled: false },\n          { id: 4, enabled: true },\n        ],\n        x => x.enabled\n      )\n    ).toEqual([\n      [\n        { id: 1, enabled: true },\n        { id: 4, enabled: true },\n      ],\n      [\n        { id: 2, enabled: false },\n        { id: 3, enabled: false },\n      ],\n    ]);\n  });\n\n  it('should correctly infer the type of a narrow array', () => {\n    const arr = [1, 2, 3, 4, 5] as const;\n    const [evens, odds] = partition(arr, num => num % 2 === 0);\n\n    expect(evens).toEqual([2, 4]);\n    expect(odds).toEqual([1, 3, 5]);\n\n    expectTypeOf(evens).toEqualTypeOf<Array<1 | 2 | 3 | 4 | 5>>();\n    expectTypeOf(odds).toEqualTypeOf<Array<1 | 2 | 3 | 4 | 5>>();\n  });\n\n  it('should correctly infer type of a narrow array with a type guard', () => {\n    const arr = [1, 2, 3, 4, 5] as const;\n    const isOdd = (num: number): num is 1 | 3 | 5 => num % 2 === 1;\n    const [odds, evens] = partition(arr, isOdd);\n\n    expect(evens).toEqual([2, 4]);\n    expect(odds).toEqual([1, 3, 5]);\n\n    expectTypeOf(evens).toEqualTypeOf<Array<2 | 4>>();\n    expectTypeOf(odds).toEqualTypeOf<Array<1 | 3 | 5>>();\n  });\n\n  it('should pass index to the predicate function', () => {\n    const arr = [10, 20, 30, 40, 50];\n    const indices: number[] = [];\n    const [result] = partition(arr, (value, index) => {\n      indices.push(index);\n      return index % 2 === 0;\n    });\n\n    expect(indices).toEqual([0, 1, 2, 3, 4]);\n    expect(result).toEqual([10, 30, 50]);\n  });\n\n  it('should pass the array to the predicate function', () => {\n    const arr = [1, 2, 3, 4, 5];\n    const arrays: Array<readonly number[]> = [];\n    const [evens] = partition(arr, (value, index, array) => {\n      arrays.push(array);\n      return value % 2 === 0;\n    });\n\n    expect(evens).toEqual([2, 4]);\n    expect(arrays).toHaveLength(5);\n    arrays.forEach(array => {\n      expect(array).toBe(arr);\n    });\n  });\n});\n"
  },
  {
    "path": "src/array/partition.ts",
    "content": "/**\n * Splits an array into two groups based on a predicate function.\n *\n * This function takes an array and a predicate function. It returns a tuple of two arrays:\n * the first array contains elements for which the predicate function returns true, and\n * the second array contains elements for which the predicate function returns false.\n *\n * @template T - The type of elements in the array.\n * @template {T} U - The type being filtered for.\n * @param {T[]} arr - The array to partition.\n * @param {(value: T, index: number, array: readonly T[]) => value is U} isInTruthy - A type guard that determines whether an\n * element should be placed in the truthy array. The function is called with each element\n * of the array and its index.\n * @returns {[U[], Exclude<T, U>[]]} A tuple containing two arrays: the first array contains elements for\n * which the predicate returned true, and the second array contains elements for which the\n * predicate returned false.\n *\n * @example\n * const array = [1, 2, 3, 4] as const;\n * const isEven = (x: number): x is 2 | 4 => x % 2 === 0;\n * const [even, odd]: [(2 | 4)[], (2 | 4)[]] = partition(array, isEven);\n * // even will be [2, 4], and odd will be [1, 3]\n */\nexport function partition<T, U extends T>(\n  arr: readonly T[],\n  isInTruthy: (value: T, index: number, array: readonly T[]) => value is U\n): [truthy: U[], falsy: Array<Exclude<T, U>>];\n\n/**\n * Splits an array into two groups based on a predicate function.\n *\n * This function takes an array and a predicate function. It returns a tuple of two arrays:\n * the first array contains elements for which the predicate function returns true, and\n * the second array contains elements for which the predicate function returns false.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to partition.\n * @param {(value: T, index: number) => boolean} isInTruthy - A predicate function that determines\n * whether an element should be placed in the truthy array. The function is called with each\n * element of the array and its index.\n * @returns {[T[], T[]]} A tuple containing two arrays: the first array contains elements for\n * which the predicate returned true, and the second array contains elements for which the\n * predicate returned false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const isEven = x => x % 2 === 0;\n * const [even, odd] = partition(array, isEven);\n * // even will be [2, 4], and odd will be [1, 3, 5]\n */\nexport function partition<T>(\n  arr: readonly T[],\n  isInTruthy: (value: T, index: number, array: readonly T[]) => boolean\n): [truthy: T[], falsy: T[]];\nexport function partition<T>(\n  arr: readonly T[],\n  isInTruthy: (value: T, index: number, array: readonly T[]) => boolean\n): [truthy: T[], falsy: T[]] {\n  const truthy: T[] = [];\n  const falsy: T[] = [];\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    if (isInTruthy(item, i, arr)) {\n      truthy.push(item);\n    } else {\n      falsy.push(item);\n    }\n  }\n\n  return [truthy, falsy];\n}\n"
  },
  {
    "path": "src/array/pull.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pull } from './pull';\n\ndescribe('pull', () => {\n  it('should remove all occurrences of specified values from the array', () => {\n    const array = [1, 2, 3, 1, 2, 3];\n    pull(array, [1, 3]);\n    expect(array).toEqual([2, 2]);\n  });\n\n  it('should return the modified array after removing specified values', () => {\n    const array = [5, 6, 7, 8];\n    const result = pull(array, [5, 8]);\n    expect(result).toEqual([6, 7]);\n    expect(array).toEqual([6, 7]);\n  });\n\n  it('should not modify the array if no values are specified', () => {\n    const array = [1, 2, 3];\n    pull(array, []);\n    expect(array).toEqual([1, 2, 3]);\n  });\n\n  it('should not remove any values if none of the specified values are in the array', () => {\n    const array = [4, 5, 6];\n    pull(array, [1, 2, 3]);\n    expect(array).toEqual([4, 5, 6]);\n  });\n\n  it('should handle removing values from an empty array', () => {\n    const array: number[] = [];\n    pull(array, [1, 2]);\n    expect(array).toEqual([]);\n  });\n\n  it('should remove duplicate values only if they match the specified values', () => {\n    const array = [1, 2, 2, 3, 4, 4];\n    pull(array, [2, 4]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  it('should not throw an error when removing values not present in the array', () => {\n    const array = [10, 20, 30];\n    expect(() => pull(array, [40])).not.toThrow();\n    expect(array).toEqual([10, 20, 30]);\n  });\n});\n"
  },
  {
    "path": "src/array/pull.ts",
    "content": "/**\n * Removes all specified values from an array.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `difference`.\n *\n * @template T, U\n * @param {T[]} arr - The array to modify.\n * @param {unknown[]} valuesToRemove - The values to remove from the array.\n * @returns {T[]} The modified array with the specified values removed.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5, 2, 4];\n * pull(numbers, [2, 4]);\n * console.log(numbers); // [1, 3, 5]\n */\nexport function pull<T>(arr: T[], valuesToRemove: readonly unknown[]): T[] {\n  const valuesSet = new Set(valuesToRemove);\n  let resultIndex = 0;\n\n  for (let i = 0; i < arr.length; i++) {\n    if (valuesSet.has(arr[i])) {\n      continue;\n    }\n\n    // For handling sparse arrays\n    if (!Object.hasOwn(arr, i)) {\n      delete arr[resultIndex++];\n      continue;\n    }\n\n    arr[resultIndex++] = arr[i];\n  }\n\n  arr.length = resultIndex;\n\n  return arr;\n}\n"
  },
  {
    "path": "src/array/pullAt.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pullAt } from './pullAt';\n\ndescribe('pullAt', () => {\n  it('should returns index searched of original array and changed original array', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const result = pullAt(array, [3, 5]);\n\n    expect(array).toStrictEqual([0, 1, 2, 4]);\n    expect(result).toStrictEqual([3, 5]);\n  });\n\n  it('even if there are duplicate index values must return an array containing duplicate index values', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const result = pullAt(array, [1, 2, 2, 4]);\n\n    expect(array).toStrictEqual([0, 3, 5]);\n    expect(result).toStrictEqual([1, 2, 2, 4]);\n  });\n\n  it('even if there are not index value must return an array containing undefined value', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const result = pullAt(array, [0, 3, 5, 6]);\n\n    expect(array).toStrictEqual([1, 2, 4]);\n    expect(result).toStrictEqual([0, 3, 5, undefined]);\n  });\n\n  it('even if there are other instance or type must return an array containing other instance or type values', () => {\n    const array = [0, { a: 1 }, [2], 3, '4'];\n    const result = pullAt(array, [1, 2, 4]);\n\n    expect(array).toStrictEqual([0, 3]);\n    expect(result).toStrictEqual([{ a: 1 }, [2], '4']);\n  });\n\n  it('even if index array parameter is empty must return an empty array', () => {\n    const array = [0, 1, 2, 3, 4, 5];\n    const result = pullAt(array, []);\n\n    expect(array).toStrictEqual([0, 1, 2, 3, 4, 5]);\n    expect(result).toStrictEqual([]);\n  });\n\n  it('should work with unsorted indexes', () => {\n    const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n    const actual = pullAt(array, [1, 3, 11, 7, 5, 9]);\n\n    expect(array).toEqual([1, 3, 5, 7, 9, 11]);\n    expect(actual).toEqual([2, 4, 12, 8, 6, 10]);\n  });\n\n  it('should work with objects', () => {\n    const foo = { foo: 1 };\n    const bar = { foo: 2 };\n\n    const arr = [foo, bar, foo];\n    const result = pullAt(arr, [2]);\n\n    expect(arr).toEqual([foo, bar]);\n    expect(result).toEqual([foo]);\n  });\n});\n"
  },
  {
    "path": "src/array/pullAt.ts",
    "content": "import { at } from './at.ts';\n\n/**\n * Removes elements from an array at specified indices and returns the removed elements.\n *\n * This function supports negative indices, which count from the end of the array.\n *\n * @template T\n * @param {T[]} arr - The array from which elements will be removed.\n * @param {number[]} indicesToRemove - An array of indices specifying the positions of elements to remove.\n * @returns {Array<T | undefined>} An array containing the elements that were removed from the original array.\n *\n * @example\n * const numbers = [10, 20, 30, 40, 50];\n * const removed = pullAt(numbers, [1, 3, 4]);\n * console.log(removed); // [20, 40, 50]\n * console.log(numbers); // [10, 30]\n */\nexport function pullAt<T>(arr: T[], indicesToRemove: number[]): T[] {\n  const removed = at(arr, indicesToRemove);\n  const indices = new Set(indicesToRemove.slice().sort((x, y) => y - x));\n\n  for (const index of indices) {\n    arr.splice(index, 1);\n  }\n\n  return removed;\n}\n"
  },
  {
    "path": "src/array/reduceAsync.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { reduceAsync } from './reduceAsync';\nimport { delay } from '../promise/delay';\n\ndescribe('reduceAsync', () => {\n  it('reduces array to single value', async () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    const reducer = vi.fn(async (acc: number, n: number) => {\n      await delay(10);\n      return acc + n;\n    });\n\n    const result = await reduceAsync(arr, reducer, 0);\n\n    expect(result).toBe(15);\n    expect(reducer).toHaveBeenCalledTimes(arr.length);\n    expect(reducer.mock.calls[0]).toEqual([0, 1, 0, arr]);\n    expect(reducer.mock.calls[1]).toEqual([1, 2, 1, arr]);\n    expect(reducer.mock.calls[2]).toEqual([3, 3, 2, arr]);\n    expect(reducer.mock.calls[3]).toEqual([6, 4, 3, arr]);\n    expect(reducer.mock.calls[4]).toEqual([10, 5, 4, arr]);\n  });\n\n  it('returns initial value for empty array', async () => {\n    const arr: number[] = [];\n    const reducer = vi.fn(async (acc: number, n: number) => acc + n);\n\n    const result = await reduceAsync(arr, reducer, 10);\n    expect(result).toBe(10);\n\n    expect(reducer).toHaveBeenCalledTimes(0);\n  });\n\n  it('can reduce to different type', async () => {\n    const arr = [1, 2, 3];\n    const reducer = async (acc: string, n: number) => {\n      await delay(10);\n      return acc + n.toString();\n    };\n\n    const result = await reduceAsync(arr, reducer, '');\n    expect(result).toBe('123');\n  });\n\n  it('processes elements sequentially', async () => {\n    const arr = [1, 2, 3, 4, 5];\n    const order: number[] = [];\n\n    const reducer = async (acc: number, n: number) => {\n      order.push(n);\n      await delay(10);\n      return acc + n;\n    };\n\n    await reduceAsync(arr, reducer, 0);\n    expect(order).toEqual([1, 2, 3, 4, 5]);\n  });\n\n  it('propagates rejection if reducer throws', async () => {\n    const arr = [1, 2, 3];\n    const errorFn = async (acc: number, item: number) => {\n      if (item === 2) {\n        throw new Error('fail');\n      }\n      return acc + item;\n    };\n    await expect(reduceAsync(arr, errorFn, 0)).rejects.toThrow('fail');\n  });\n\n  it('maintains correct accumulator across iterations', async () => {\n    const arr = ['a', 'b', 'c'];\n    const reducer = async (acc: string[], item: string) => {\n      await delay(10);\n      return [...acc, item.toUpperCase()];\n    };\n\n    const result = await reduceAsync(arr, reducer, [] as string[]);\n    expect(result).toEqual(['A', 'B', 'C']);\n  });\n\n  describe('without initial value', () => {\n    it('reduces array using first element as initial value', async () => {\n      const arr = [1, 2, 3, 4, 5];\n\n      const reducer = vi.fn(async (acc: number, n: number) => {\n        await delay(10);\n        return acc + n;\n      });\n\n      const result = await reduceAsync(arr, reducer);\n\n      expect(result).toBe(15);\n      expect(reducer).toHaveBeenCalledTimes(arr.length - 1);\n      expect(reducer.mock.calls[0]).toEqual([1, 2, 1, arr]);\n      expect(reducer.mock.calls[1]).toEqual([3, 3, 2, arr]);\n      expect(reducer.mock.calls[2]).toEqual([6, 4, 3, arr]);\n      expect(reducer.mock.calls[3]).toEqual([10, 5, 4, arr]);\n    });\n\n    it('returns undefined for empty array without initial value', async () => {\n      const arr: number[] = [];\n      const reducer = vi.fn(async (acc: number, n: number) => acc + n);\n\n      const result = await reduceAsync(arr, reducer);\n      expect(result).toBeUndefined();\n\n      expect(reducer).toHaveBeenCalledTimes(0);\n    });\n\n    it('returns first element for single-element array', async () => {\n      const arr = [42];\n      const reducer = vi.fn(async (acc: number, n: number) => acc + n);\n\n      const result = await reduceAsync(arr, reducer);\n      expect(result).toBe(42);\n\n      expect(reducer).toHaveBeenCalledTimes(0);\n    });\n\n    it('concatenates strings without initial value', async () => {\n      const arr = ['Hello', ' ', 'World'];\n      const reducer = async (acc: string, str: string) => {\n        await delay(10);\n        return acc + str;\n      };\n\n      const result = await reduceAsync(arr, reducer);\n      expect(result).toBe('Hello World');\n    });\n\n    it('processes elements sequentially without initial value', async () => {\n      const arr = [1, 2, 3, 4, 5];\n      const order: number[] = [];\n\n      const reducer = async (acc: number, n: number) => {\n        order.push(n);\n        await delay(10);\n        return acc + n;\n      };\n\n      await reduceAsync(arr, reducer);\n      expect(order).toEqual([2, 3, 4, 5]);\n    });\n\n    it('propagates rejection if reducer throws without initial value', async () => {\n      const arr = [1, 2, 3, 4];\n      const errorFn = async (acc: number, item: number) => {\n        if (item === 3) {\n          throw new Error('fail');\n        }\n        return acc + item;\n      };\n      await expect(reduceAsync(arr, errorFn)).rejects.toThrow('fail');\n    });\n\n    it('works with complex objects without initial value', async () => {\n      const arr = [{ value: 1 }, { value: 2 }, { value: 3 }];\n\n      const reducer = async (acc: { value: number }, item: { value: number }) => {\n        await delay(10);\n        return { value: acc.value + item.value };\n      };\n\n      const result = await reduceAsync(arr, reducer);\n      expect(result).toEqual({ value: 6 });\n    });\n  });\n\n  it('can build complex objects', async () => {\n    const arr = [\n      { key: 'a', value: 1 },\n      { key: 'b', value: 2 },\n      { key: 'c', value: 3 },\n    ];\n\n    const reducer = async (acc: Record<string, number>, item: { key: string; value: number }) => {\n      await delay(10);\n      acc[item.key] = item.value * 2;\n      return acc;\n    };\n\n    const result = await reduceAsync(arr, reducer, {} as Record<string, number>);\n    expect(result).toEqual({ a: 2, b: 4, c: 6 });\n  });\n});\n"
  },
  {
    "path": "src/array/reduceAsync.ts",
    "content": "/**\n * Reduces an array to a single value using an async reducer function.\n *\n * Applies the reducer function sequentially to each element (left to right),\n * carrying an accumulated result from one call to the next. Unlike other async\n * array methods, reduce must process elements sequentially and does not support\n * concurrency limiting.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of the accumulated result.\n * @param {readonly T[]} array The array to reduce.\n * @param {(accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>} reducer An async function that processes each element.\n * @param {U} initialValue The initial value of the accumulator.\n * @returns {Promise<U>} A promise that resolves to the final accumulated value.\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * const sum = await reduceAsync(\n *   numbers,\n *   async (acc, n) => acc + await fetchValue(n),\n *   0\n * );\n * // Returns: sum of all fetched values\n *\n * @example\n * const users = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const userMap = await reduceAsync(\n *   users,\n *   async (acc, user) => {\n *     const details = await fetchUserDetails(user.id);\n *     acc[user.id] = details;\n *     return acc;\n *   },\n *   {} as Record<number, any>\n * );\n * // Returns: { 1: {...}, 2: {...}, 3: {...} }\n */\nexport async function reduceAsync<T, U>(\n  array: readonly T[],\n  reducer: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>,\n  initialValue: U\n): Promise<U>;\n\n/**\n * Reduces an array to a single value using an async reducer function.\n *\n * Applies the reducer function sequentially to each element (left to right),\n * carrying an accumulated result from one call to the next. Unlike other async\n * array methods, reduce must process elements sequentially and does not support\n * concurrency limiting.\n *\n * When no initial value is provided, the first element of the array is used as\n * the initial value and the reduction starts from the second element.\n *\n * @template T - The type of elements in the array.\n * @param {readonly T[]} array The array to reduce.\n * @param {(accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>} reducer An async function that processes each element.\n * @returns {Promise<T | undefined>} A promise that resolves to the final accumulated value, or undefined if the array is empty.\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * const sum = await reduceAsync(\n *   numbers,\n *   async (acc, n) => acc + n\n * );\n * // Returns: 15\n *\n * @example\n * const emptyArray: number[] = [];\n * const result = await reduceAsync(\n *   emptyArray,\n *   async (acc, n) => acc + n\n * );\n * // Returns: undefined\n */\nexport async function reduceAsync<T>(\n  array: readonly T[],\n  reducer: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<T>\n): Promise<T>;\n\nexport async function reduceAsync<T, U>(\n  array: readonly T[],\n  reducer: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise<U>,\n  initialValue?: U\n): Promise<U> {\n  let startIndex = 0;\n\n  if (initialValue == null) {\n    initialValue = array[0] as unknown as U;\n    startIndex = 1;\n  }\n\n  let accumulator: U = initialValue!;\n\n  for (let i = startIndex; i < array.length; i++) {\n    accumulator = await reducer(accumulator, array[i], i, array);\n  }\n\n  return accumulator;\n}\n"
  },
  {
    "path": "src/array/remove.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { remove } from './remove';\n\ndescribe('remove', () => {\n  it('should remove elements based on the predicate function', () => {\n    const numbers = [1, 2, 3, 4, 5];\n    const removed = remove(numbers, value => value % 2 === 0);\n    expect(numbers).toEqual([1, 3, 5]);\n    expect(removed).toEqual([2, 4]);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const sparseArray = [1, , 3, , 5];\n    const removed = remove(sparseArray, value => value === undefined);\n    expect(sparseArray).toEqual([1, 3, 5]);\n    expect(removed).toEqual([undefined, undefined]);\n  });\n\n  it('should return all elements if all elements are removed', () => {\n    const numbers = [1, 2, 3, 4, 5];\n    const removed = remove(numbers, () => true);\n    expect(numbers).toEqual([]);\n    expect(removed).toEqual([1, 2, 3, 4, 5]);\n  });\n\n  it('should not remove any elements if the predicate always returns false', () => {\n    const numbers = [1, 2, 3, 4, 5];\n    const removed = remove(numbers, () => false);\n    expect(numbers).toEqual([1, 2, 3, 4, 5]);\n    expect(removed).toEqual([]);\n  });\n\n  it('should work with an empty array', () => {\n    const emptyArray: number[] = [];\n    const removed = remove(emptyArray, () => true);\n    expect(emptyArray).toEqual([]);\n    expect(removed).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/remove.ts",
    "content": "/**\n * Removes elements from an array based on a predicate function.\n *\n * This function changes `arr` in place.\n * If you want to remove elements without modifying the original array, use `filter`.\n *\n * @template T\n * @param {T[]} arr - The array to modify.\n * @param {(value: T, index: number, array: T[]) => boolean} shouldRemoveElement - The function invoked per iteration to determine if an element should be removed.\n * @returns {T[]} The modified array with the specified elements removed.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * remove(numbers, (value) => value % 2 === 0);\n * console.log(numbers); // [1, 3, 5]\n */\nexport function remove<T>(arr: T[], shouldRemoveElement: (value: T, index: number, array: T[]) => boolean): T[] {\n  const originalArr = arr.slice();\n  const removed = [];\n\n  let resultIndex = 0;\n\n  for (let i = 0; i < arr.length; i++) {\n    if (shouldRemoveElement(arr[i], i, originalArr)) {\n      removed.push(arr[i]);\n\n      continue;\n    }\n\n    // For handling sparse arrays\n    if (!Object.hasOwn(arr, i)) {\n      delete arr[resultIndex++];\n      continue;\n    }\n\n    arr[resultIndex++] = arr[i];\n  }\n\n  arr.length = resultIndex;\n\n  return removed;\n}\n"
  },
  {
    "path": "src/array/sample.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { sample } from './sample';\n\ndescribe('sample', () => {\n  it('selects a random element from an array', () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    expect(arr.includes(sample(arr))).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/array/sample.ts",
    "content": "/**\n * Returns a random element from an array.\n *\n * This function takes an array and returns a single element selected randomly from the array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to sample from.\n * @returns {T} A random element from the array.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const randomElement = sample(array);\n * // randomElement will be one of the elements from the array, selected randomly.\n */\nexport function sample<T>(arr: readonly T[]): T {\n  const randomIndex = Math.floor(Math.random() * arr.length);\n  return arr[randomIndex];\n}\n"
  },
  {
    "path": "src/array/sampleSize.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { sampleSize } from './sampleSize';\n\ndescribe('sampleSize', () => {\n  it('returns a sample element array of a specified size', () => {\n    const array = [1, 2, 3];\n    const result = sampleSize(array, 2);\n\n    expect(array).toEqual(expect.arrayContaining(result));\n  });\n\n  it('returns an empty array for size 0', () => {\n    const result = sampleSize([1, 2, 3], 0);\n    expect(result).toEqual([]);\n  });\n\n  it('returns the same array if the size is equal to the array length', () => {\n    const array = [1, 2, 3];\n    const result = sampleSize(array, array.length);\n\n    expect(result).toEqual(array);\n    expect(result).not.toBe(array);\n  });\n\n  it('throws an error if the size is greater than the array length', () => {\n    expect(() => sampleSize([1, 2, 3], 4)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be less than or equal to the length of array.]`\n    );\n  });\n});\n"
  },
  {
    "path": "src/array/sampleSize.ts",
    "content": "import { randomInt } from '../math/randomInt.ts';\n\n/**\n * Returns a sample element array of a specified `size`.\n *\n * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm.\n *\n * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm}\n *\n * @template T - The type of elements in the array.\n * @param {T[]} array - The array to sample from.\n * @param {number} size - The size of sample.\n * @returns {T[]} A new array with sample size applied.\n * @throws {Error} Throws an error if `size` is greater than the length of `array`.\n *\n * @example\n * const result = sampleSize([1, 2, 3], 2)\n * // result will be an array containing two of the elements from the array.\n * // [1, 2] or [1, 3] or [2, 3]\n */\nexport function sampleSize<T>(array: readonly T[], size: number): T[] {\n  if (size > array.length) {\n    throw new Error('Size must be less than or equal to the length of array.');\n  }\n\n  const result = new Array(size);\n  const selected = new Set();\n\n  for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {\n    let index = randomInt(0, step + 1);\n\n    if (selected.has(index)) {\n      index = step;\n    }\n\n    selected.add(index);\n\n    result[resultIndex] = array[index];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/shuffle.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { shuffle } from './shuffle';\n\ndescribe('shuffle', () => {\n  it('randomizes the order of an array', () => {\n    const arr = [1, 2, 3, 4, 5];\n\n    expect(shuffle(arr).slice().sort()).toEqual(arr.slice().sort());\n  });\n\n  it('does not modify the original array', () => {\n    const arr = [1, 2, 3, 4, 5];\n    const copiedArr = arr.slice();\n\n    shuffle(arr);\n    expect(arr).toEqual(copiedArr);\n  });\n});\n"
  },
  {
    "path": "src/array/shuffle.ts",
    "content": "/**\n * Randomizes the order of elements in an array using the Fisher-Yates algorithm.\n *\n * This function takes an array and returns a new array with its elements shuffled in a random order.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to shuffle.\n * @returns {T[]} A new array with its elements shuffled in random order.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const shuffledArray = shuffle(array);\n * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]\n */\nexport function shuffle<T>(arr: readonly T[]): T[] {\n  const result = arr.slice();\n\n  /**\n   * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm\n   */\n  for (let i = result.length - 1; i >= 1; i--) {\n    const j = Math.floor(Math.random() * (i + 1));\n    [result[i], result[j]] = [result[j], result[i]];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/sortBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { sortBy } from './sortBy';\n\ndescribe('sortBy', () => {\n  const users = [\n    { user: 'foo', age: 24 },\n    { user: 'bar', age: 7 },\n    { user: 'foo', age: 8 },\n    { user: 'bar', age: 29 },\n  ];\n\n  it('should stable sort objects by a single property in ascending order', () => {\n    expect(sortBy(users, ['user'])).toEqual([\n      { user: 'bar', age: 7 },\n      { user: 'bar', age: 29 },\n      { user: 'foo', age: 24 },\n      { user: 'foo', age: 8 },\n    ]);\n  });\n\n  it('should stable sort objects by multiple properties', () => {\n    expect(sortBy(users, ['user', 'age'])).toEqual([\n      { user: 'bar', age: 7 },\n      { user: 'bar', age: 29 },\n      { user: 'foo', age: 8 },\n      { user: 'foo', age: 24 },\n    ]);\n  });\n\n  it('should stable sort objects by iteratee function', () => {\n    expect(sortBy(users, [user => user.user])).toEqual([\n      { user: 'bar', age: 7 },\n      { user: 'bar', age: 29 },\n      { user: 'foo', age: 24 },\n      { user: 'foo', age: 8 },\n    ]);\n  });\n\n  it('should stable sort objects by iteratee function and property', () => {\n    expect(sortBy(users, [user => user.user, user => user.age])).toEqual([\n      { user: 'bar', age: 7 },\n      { user: 'bar', age: 29 },\n      { user: 'foo', age: 8 },\n      { user: 'foo', age: 24 },\n    ]);\n  });\n\n  it('should stable sort objects by mixed iteratee function and key', () => {\n    expect(sortBy(users, ['user', user => user.age])).toEqual([\n      { user: 'bar', age: 7 },\n      { user: 'bar', age: 29 },\n      { user: 'foo', age: 8 },\n      { user: 'foo', age: 24 },\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/sortBy.ts",
    "content": "import { orderBy } from './orderBy.ts';\n\n/**\n * Sorts an array of objects based on the given `criteria`.\n *\n * - If you provide keys, it sorts the objects by the values of those keys.\n * - If you provide functions, it sorts based on the values returned by those functions.\n *\n * The function returns the array of objects sorted in ascending order.\n * If two objects have the same value for the current criterion, it uses the next criterion to determine their order.\n *\n * @template T - The type of the objects in the array.\n * @param {T[]} arr - The array of objects to be sorted.\n * @param {Array<((item: T) => unknown) | keyof T>} criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting.\n * @returns {T[]} - The sorted array.\n *\n * @example\n * const users = [\n *  { user: 'foo', age: 24 },\n *  { user: 'bar', age: 7 },\n *  { user: 'foo', age: 8 },\n *  { user: 'bar', age: 29 },\n * ];\n *\n * sortBy(users, ['user', 'age']);\n * sortBy(users, [obj => obj.user, 'age']);\n * // results will be:\n * // [\n * //   { user : 'bar', age: 7 },\n * //   { user : 'bar', age: 29 },\n * //   { user : 'foo', age: 8 },\n * //   { user : 'foo', age: 24 },\n * // ]\n */\nexport function sortBy<T extends object>(arr: readonly T[], criteria: Array<((item: T) => unknown) | keyof T>): T[] {\n  return orderBy(arr, criteria, ['asc']);\n}\n"
  },
  {
    "path": "src/array/tail.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { tail } from './tail';\n\ndescribe('tail', () => {\n  it('returns all elements except the first', () => {\n    expect(tail([1, 2, 3])).toEqual([2, 3]);\n\n    expect(tail([true, false, true])).toEqual([false, true]);\n\n    expect(tail([1])).toEqual([]);\n\n    expect(tail([])).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/array/tail.ts",
    "content": "/**\n * Returns an empty array when the input is a single-element array.\n *\n * @template T - The type of the single element in the array.\n * @param {[T]} arr - The single-element array to process.\n * @returns {[]} An empty array.\n *\n * @example\n * const arr = [1];\n * const result = tail(arr);\n * // result will be []\n */\nexport function tail<T>(arr: readonly [T]): [];\n\n/**\n * Returns an empty array when the input is an empty array.\n *\n * @template T - The type of elements in the array.\n * @param {[]} arr - The empty array to process.\n * @returns {[]} An empty array.\n *\n * @example\n * const arr = [];\n * const result = tail(arr);\n * // result will be []\n */\nexport function tail(arr: readonly []): [];\n\n/**\n * Returns a new array with all elements except for the first when the input is a tuple array.\n *\n * @template T - The type of the first element in the tuple array.\n * @template U - The type of the remaining elements in the tuple array.\n * @param {[T, ...U[]]} arr - The tuple array to process.\n * @returns {U[]} A new array containing all elements of the input array except for the first one.\n *\n * @example\n * const arr = [1, 2, 3];\n * const result = tail(arr);\n * // result will be [2, 3]\n */\nexport function tail<T, U>(arr: readonly [T, ...U[]]): U[];\n\n/**\n * Returns a new array with all elements except for the first.\n *\n * This function takes an array and returns a new array containing all the elements\n * except for the first one. If the input array is empty or has only one element,\n * an empty array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to get the tail of.\n * @returns {T[]} A new array containing all elements of the input array except for the first one.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const result = tail(arr1);\n * // result will be [2, 3]\n *\n * const arr2 = [1];\n * const result2 = tail(arr2);\n * // result2 will be []\n *\n * const arr3 = [];\n * const result3 = tail(arr3);\n * // result3 will be []\n */\nexport function tail<T>(arr: readonly T[]): T[];\n\n/**\n * Returns a new array with all elements except for the first.\n *\n * This function takes an array and returns a new array containing all the elements\n * except for the first one. If the input array is empty or has only one element,\n * an empty array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to get the tail of.\n * @returns {T[]} A new array containing all elements of the input array except for the first one.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const result = tail(arr1);\n * // result will be [2, 3]\n *\n * const arr2 = [1];\n * const result2 = tail(arr2);\n * // result2 will be []\n *\n * const arr3 = [];\n * const result3 = tail(arr3);\n * // result3 will be []\n */\nexport function tail<T>(arr: readonly T[]): T[] {\n  return arr.slice(1);\n}\n"
  },
  {
    "path": "src/array/take.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { take } from './take';\n\ndescribe('take', () => {\n  it('returns the first n elements from the array', () => {\n    expect(take([1, 2, 3, 4, 5], 3)).toEqual([1, 2, 3]);\n    expect(take(['a', 'b', 'c', 'd'], 2)).toEqual(['a', 'b']);\n    expect(take([true, false, true], 1)).toEqual([true]);\n  });\n\n  it('handles cases where count is greater than array length', () => {\n    expect(take([1, 2, 3], 5)).toEqual([1, 2, 3]);\n  });\n\n  it('handles cases where count is zero', () => {\n    expect(take([1, 2, 3], 0)).toEqual([]);\n  });\n\n  it('handles empty arrays', () => {\n    expect(take([], 3)).toEqual([]);\n  });\n\n  it('uses default count=1 when guard is truthy', () => {\n    const arr = [1, 2, 3];\n    expect(take(arr, 5, true)).toEqual([1]);\n    expect(take(arr, 0, 123)).toEqual([1]);\n  });\n\n  it('uses count normally when guard is falsy', () => {\n    const arr = [1, 2, 3];\n    expect(take(arr, 2, undefined)).toEqual([1, 2]);\n    expect(take(arr, 2, null)).toEqual([1, 2]);\n    expect(take(arr, 2, false)).toEqual([1, 2]);\n  });\n\n  it('handles iteratee-style usage with guard (lodash-style)', () => {\n    const arr = [1, 2, 3];\n    const result = arr.map((v, i, array) => take(array, i, true));\n    expect(result).toEqual([[1], [1], [1]]);\n  });\n});\n"
  },
  {
    "path": "src/array/take.ts",
    "content": "import { toInteger } from '../compat/util/toInteger.ts';\n\n/**\n * Returns a new array containing the first `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @param {unknown} guard - If truthy, ignores `count` and defaults to 1.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n *\n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n *\n * @example\n * // Returns [[1], [1], [1]]\n * const arr = [1, 2, 3];\n * const result = arr.map((v, i, array) => take(array, i, true));\n */\nexport function take<T>(arr: readonly T[], count?: number, guard?: unknown): T[] {\n  count = guard || count === undefined ? 1 : toInteger(count);\n  return arr.slice(0, count);\n}\n"
  },
  {
    "path": "src/array/takeRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { takeRight } from './takeRight';\n\ndescribe('takeRight', () => {\n  it('returns the last n elements from the array', () => {\n    expect(takeRight([1, 2, 3, 4, 5], 2)).toEqual([4, 5]);\n    expect(takeRight(['a', 'b', 'c', 'd'], 2)).toEqual(['c', 'd']);\n    expect(takeRight([true, false, true], 1)).toEqual([true]);\n    expect(takeRight([1, 2, 3], 5)).toEqual([1, 2, 3]);\n    expect(takeRight([1, 2, 3], 0)).toEqual([]);\n    expect(takeRight([], 3)).toEqual([]);\n  });\n\n  it('handles cases where count is greater than array length', () => {\n    expect(takeRight([1, 2, 3], 5)).toEqual([1, 2, 3]);\n  });\n\n  it('handles cases where count is zero', () => {\n    expect(takeRight([1, 2, 3], 0)).toEqual([]);\n  });\n\n  it('handles empty arrays', () => {\n    expect(takeRight([], 3)).toEqual([]);\n  });\n\n  it('handles negative counts', () => {\n    expect(takeRight([1, 2, 3], -1)).toEqual([]);\n    expect(takeRight([1, 2, 3], -5)).toEqual([]);\n  });\n\n  it('uses default count of 1 when count is undefined', () => {\n    expect(takeRight([1, 2, 3])).toEqual([3]);\n    expect(takeRight([1, 2, 3], undefined)).toEqual([3]);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(takeRight);\n\n    expect(actual).toEqual([[3], [6], [9]]);\n  });\n});\n"
  },
  {
    "path": "src/array/takeRight.ts",
    "content": "import { toInteger } from '../compat/util/toInteger.ts';\n\n/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to take elements from.\n * @param {number} [count=1] - The number of elements to take.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: readonly T[], count?: number, guard?: unknown): T[] {\n  count = guard || count === undefined ? 1 : toInteger(count);\n  if (count <= 0 || arr.length === 0) {\n    return [];\n  }\n  return arr.slice(-count);\n}\n"
  },
  {
    "path": "src/array/takeRightWhile.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { takeRightWhile } from './takeRightWhile';\n\ndescribe('takeRightWhile', () => {\n  it('returns elements from the end while the predicate returns true', () => {\n    expect(takeRightWhile([5, 4, 3, 2, 1], n => n < 4)).toEqual([3, 2, 1]);\n    expect(takeRightWhile([1, 2, 3], n => n > 3)).toEqual([]);\n    expect(takeRightWhile([1, 2, 3, 4, 5], n => n > 2)).toEqual([3, 4, 5]);\n    expect(takeRightWhile([1, 2, 3, 4, 5], n => n < 6)).toEqual([1, 2, 3, 4, 5]);\n    expect(takeRightWhile([], n => n < 6)).toEqual([]);\n  });\n\n  it('handles empty arrays', () => {\n    expect(takeRightWhile([], n => n < 6)).toEqual([]);\n  });\n\n  it('should pass index to predicate function', () => {\n    const arr = [10, 20, 30, 40, 50];\n    const result = takeRightWhile(arr, (_, index) => index > 2);\n    expect(result).toEqual([40, 50]);\n  });\n\n  it('should pass array to predicate function', () => {\n    const arr = [1, 2, 3, 4];\n    const result = takeRightWhile(arr, (value, index, array) => value >= array.length / 2);\n    expect(result).toEqual([2, 3, 4]);\n  });\n});\n"
  },
  {
    "path": "src/array/takeRightWhile.ts",
    "content": "/**\n * Takes elements from the end of the array while the predicate function returns `true`.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {(item: T, index: number, array: readonly T[]) => boolean} shouldContinueTaking - The function invoked per element with the item, its index, and the array.\n * @returns {T[]} A new array containing the elements taken from the end while the predicate returns `true`.\n *\n * @example\n * // Returns [3, 2, 1]\n * takeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n *\n * @example\n * // Returns []\n * takeRightWhile([1, 2, 3], n => n > 3);\n *\n * @example\n * // Using index parameter\n * takeRightWhile([10, 20, 30, 40], (x, index) => index > 1);\n * // Returns: [30, 40]\n */\nexport function takeRightWhile<T>(\n  arr: readonly T[],\n  shouldContinueTaking: (item: T, index: number, array: readonly T[]) => boolean\n): T[] {\n  for (let i = arr.length - 1; i >= 0; i--) {\n    if (!shouldContinueTaking(arr[i], i, arr)) {\n      return arr.slice(i + 1);\n    }\n  }\n\n  return arr.slice();\n}\n"
  },
  {
    "path": "src/array/takeWhile.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { takeWhile } from './takeWhile';\n\n// adjust the import path as necessary\n\ndescribe('takeWhile', () => {\n  it('should return elements while the predicate is true', () => {\n    const arr = [1, 2, 3, 4, 5];\n    const result = takeWhile(arr, x => x < 4);\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('should return an empty array if the first element does not satisfy the predicate', () => {\n    const arr = [1, 2, 3, 4, 5];\n    const result = takeWhile(arr, x => x > 4);\n    expect(result).toEqual([]);\n  });\n\n  it('should return all elements if all satisfy the predicate', () => {\n    const arr = [1, 2, 3];\n    const result = takeWhile(arr, x => x < 4);\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('should return an empty array if the input array is empty', () => {\n    const arr: number[] = [];\n    const result = takeWhile(arr, x => x < 4);\n    expect(result).toEqual([]);\n  });\n\n  it('should handle complex predicate functions', () => {\n    const arr = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\n    const result = takeWhile(arr, item => item.id < 3);\n    expect(result).toEqual([{ id: 1 }, { id: 2 }]);\n  });\n\n  it('should pass index to predicate function', () => {\n    const arr = [10, 20, 30, 40, 50];\n    const result = takeWhile(arr, (_, index) => index < 3);\n    expect(result).toEqual([10, 20, 30]);\n  });\n\n  it('should pass array to predicate function', () => {\n    const arr = [1, 2, 3, 4];\n    const result = takeWhile(arr, (value, index, array) => value < array.length);\n    expect(result).toEqual([1, 2, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/takeWhile.ts",
    "content": "/**\n * Returns a new array containing the leading elements of the provided array\n * that satisfy the provided predicate function. It stops taking elements as soon\n * as an element does not satisfy the predicate.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @param {(element: T, index: number, array: readonly T[]) => boolean} shouldContinueTaking - The predicate function that is called with each element, its index, and the array. Elements are included in the result as long as this function returns true.\n * @returns {T[]} A new array containing the leading elements that satisfy the predicate.\n *\n * @example\n * // Returns [1, 2]\n * takeWhile([1, 2, 3, 4], x => x < 3);\n *\n * @example\n * // Returns []\n * takeWhile([1, 2, 3, 4], x => x > 3);\n *\n * @example\n * // Using index parameter\n * takeWhile([10, 20, 30, 40], (x, index) => index < 2);\n * // Returns: [10, 20]\n */\nexport function takeWhile<T>(\n  arr: readonly T[],\n  shouldContinueTaking: (element: T, index: number, array: readonly T[]) => boolean\n): T[] {\n  const result: T[] = [];\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    if (!shouldContinueTaking(item, i, arr)) {\n      break;\n    }\n\n    result.push(item);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/toFilled.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toFilled } from './toFilled';\n\ndescribe('toFilled', () => {\n  it('fills empty array', () => {\n    const result = toFilled([], '*');\n    expect(result).toEqual([]);\n  });\n\n  it('fills middle values', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*', 1, 4);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n\n  it('fills entire array', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*');\n    expect(result).toEqual(['*', '*', '*', '*', '*']);\n  });\n\n  it('fills from specified start position', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*', 2);\n    expect(result).toEqual([1, 2, '*', '*', '*']);\n  });\n\n  it('fills with negative start position', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*', -3);\n    expect(result).toEqual([1, 2, '*', '*', '*']);\n  });\n\n  it('fills with positive start and negative end positions', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*', 1, -1);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n\n  it('fills with both negative start and end positions', () => {\n    const result = toFilled([1, 2, 3, 4, 5], '*', -4, -1);\n    expect(result).toEqual([1, '*', '*', '*', 5]);\n  });\n});\n"
  },
  {
    "path": "src/array/toFilled.ts",
    "content": "/**\n * Creates a new array filled with the specified value from the start position up to, but not including, the end position.\n * This function does not mutate the original array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the new array with.\n * @param {Array<T>} arr - The array to base the new array on.\n * @param {U} value - The value to fill the new array with.\n * @returns {Array<T | U>} The new array with the filled values.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * let result = toFilled(array, '*', 2);\n * console.log(result); // [1, 2, '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', 1, 4);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*');\n * console.log(result); // ['*', '*', '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', -4, -1);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n */\nexport function toFilled<T, U>(arr: readonly T[], value: U): Array<T | U>;\n\n/**\n * Creates a new array filled with the specified value from the start position up to, but not including, the end position.\n * This function does not mutate the original array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the new array with.\n * @param {Array<T>} arr - The array to base the new array on.\n * @param {U} value - The value to fill the new array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @returns {Array<T | U>} The new array with the filled values.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * let result = toFilled(array, '*', 2);\n * console.log(result); // [1, 2, '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', 1, 4);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*');\n * console.log(result); // ['*', '*', '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', -4, -1);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n */\nexport function toFilled<T, U>(arr: readonly T[], value: U, start: number): Array<T | U>;\n\n/**\n * Creates a new array filled with the specified value from the start position up to, but not including, the end position.\n * This function does not mutate the original array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the new array with.\n * @param {Array<T>} arr - The array to base the new array on.\n * @param {U} value - The value to fill the new array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @param {number} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {Array<T | U>} The new array with the filled values.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * let result = toFilled(array, '*', 2);\n * console.log(result); // [1, 2, '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', 1, 4);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*');\n * console.log(result); // ['*', '*', '*', '*', '*']\n * console.log(array); // [1, 2, 3, 4, 5]\n *\n * result = toFilled(array, '*', -4, -1);\n * console.log(result); // [1, '*', '*', '*', 5]\n * console.log(array); // [1, 2, 3, 4, 5]\n */\nexport function toFilled<T, U>(arr: readonly T[], value: U, start: number, end: number): Array<T | U>;\n\n/**\n * Creates a new array filled with the specified value from the start position up to, but not including, the end position.\n * This function does not mutate the original array.\n *\n * @template T - The type of elements in the original array.\n * @template U - The type of the value to fill the new array with.\n * @param {Array<T>} arr - The array to base the new array on.\n * @param {U} value - The value to fill the new array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @param {number} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {Array<T | U>} The new array with the filled values.\n */\nexport function toFilled<T, U>(arr: readonly T[], value: U, start = 0, end = arr.length): Array<T | U> {\n  const length = arr.length;\n  const finalStart = Math.max(start >= 0 ? start : length + start, 0);\n  const finalEnd = Math.min(end >= 0 ? end : length + end, length);\n\n  const newArr: Array<T | U> = arr.slice();\n\n  for (let i = finalStart; i < finalEnd; i++) {\n    newArr[i] = value;\n  }\n\n  return newArr;\n}\n"
  },
  {
    "path": "src/array/union.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { union } from './union';\n\ndescribe('union', () => {\n  it('should return the union of two arrays', () => {\n    expect(union([2, 1], [2, 3])).toEqual([2, 1, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/union.ts",
    "content": "import { uniq } from './uniq.ts';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n  return uniq(arr1.concat(arr2));\n}\n"
  },
  {
    "path": "src/array/unionBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { unionBy } from './unionBy';\n\ndescribe('unionBy', () => {\n  it('should work with a `mapper`', () => {\n    expect(unionBy([2.1], [1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]);\n    expect(unionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], ({ x }) => x)).toEqual([{ x: 1 }, { x: 2 }]);\n  });\n});\n"
  },
  {
    "path": "src/array/unionBy.ts",
    "content": "import { uniqBy } from './uniqBy.ts';\n\n/**\n * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for numbers (modulo comparison)\n * const moduloMapper = (x) => x % 3;\n * unionBy([1, 2, 3], [4, 5, 6], moduloMapper);\n * // Returns [1, 2, 3]\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = (obj) => obj.id;\n * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]\n */\nexport function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n  return uniqBy(arr1.concat(arr2), mapper);\n}\n"
  },
  {
    "path": "src/array/unionWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { unionWith } from './unionWith';\n\ndescribe('unionWith', () => {\n  it('should work with a `comparator`', () => {\n    expect(\n      unionWith(\n        [\n          { x: 1, y: 2 },\n          { x: 2, y: 1 },\n        ],\n        [\n          { x: 1, y: 1 },\n          { x: 1, y: 2 },\n        ],\n        (a, b) => a.x === b.x\n      )\n    ).toEqual([\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/unionWith.ts",
    "content": "import { uniqWith } from './uniqWith.ts';\n\n/**\n * Creates an array of unique values from two given arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom equality function, merges the arrays, and returns\n * a new array containing only the unique values as determined by the custom equality function.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @param {(item1: T, item2: T) => boolean} areItemsEqual - A custom function to determine if two elements are equal.\n * It takes two arguments and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array of unique values based on the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }];\n * const array2 = [{ id: 2 }, { id: 3 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = unionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays\n */\nexport function unionWith<T>(\n  arr1: readonly T[],\n  arr2: readonly T[],\n  areItemsEqual: (item1: T, item2: T) => boolean\n): T[] {\n  return uniqWith(arr1.concat(arr2), areItemsEqual);\n}\n"
  },
  {
    "path": "src/array/uniq.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { uniq } from './uniq';\n\ndescribe('uniq', () => {\n  it('uniq function creates unique elements from the array passed as an argument.', () => {\n    expect(uniq([11, 2, 3, 44, 11, 2, 3])).toEqual([11, 2, 3, 44]);\n  });\n  it('uniq function works with strings.', () => {\n    expect(uniq(['a', 'b', 'b', 'c', 'a'])).toEqual(['a', 'b', 'c']);\n  });\n  it('uniq function works with boolean values.', () => {\n    expect(uniq([true, false, true, false, false])).toEqual([true, false]);\n  });\n  it('uniq function works with nullish values.', () => {\n    expect(uniq([null, undefined, null, undefined])).toEqual([null, undefined]);\n  });\n  it('uniq function works with empty arrays.', () => {\n    expect(uniq([])).toEqual([]);\n  });\n  it('uniq function works with multiple types.', () => {\n    expect(uniq([1, 'a', 2, 'b', 1, 'a'])).toEqual([1, 'a', 2, 'b']);\n  });\n  it('uniq function keeps its original order.', () => {\n    expect(uniq([1, 2, 2, 3, 4, 4, 5])).toEqual([1, 2, 3, 4, 5]);\n  });\n  it('uniq function should create a new array.', () => {\n    const array = [1, 2, 3];\n    const result = uniq(array);\n\n    expect(result).toEqual([1, 2, 3]);\n    expect(result).not.toBe(array);\n  });\n  it('uniq function should not mutate the original array.', () => {\n    const array = [1, 2, 3, 2, 1, 3];\n    uniq(array);\n\n    expect(array).toEqual([1, 2, 3, 2, 1, 3]);\n  });\n\n  it('should handle arrays with undefined And Hole', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const arr: any[] = [1, , 2, undefined, 3, , 2];\n    expect(uniq(arr)).toEqual([1, undefined, 2, 3]);\n  });\n\n  it('should handle arrays with special values', () => {\n    const arr = [NaN, NaN, 0, -0, Infinity, -Infinity];\n    expect(uniq(arr)).toEqual([NaN, 0, Infinity, -Infinity]);\n  });\n});\n"
  },
  {
    "path": "src/array/uniq.ts",
    "content": "/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: readonly T[]): T[] {\n  return [...new Set(arr)];\n}\n"
  },
  {
    "path": "src/array/uniqBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { uniqBy } from './uniqBy';\n\ndescribe('uniqBy', () => {\n  it('should work with a `mapper`', () => {\n    expect(uniqBy([2.1, 1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]);\n    expect(uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor)).toEqual([1.2, 2.1, 3.2, 5.7, 7.19]);\n  });\n\n  it('should keep the first occurrence when duplicates are found', () => {\n    const items = [\n      { id: 1, value: 'apple' },\n      { id: 2, value: 'banana' },\n      { id: 1, value: 'avocado' },\n      { id: 3, value: 'cherry' },\n      { id: 2, value: 'blueberry' },\n    ];\n\n    const result = uniqBy(items, x => x.id);\n\n    expect(result).toEqual([\n      { id: 1, value: 'apple' },\n      { id: 2, value: 'banana' },\n      { id: 3, value: 'cherry' },\n    ]);\n  });\n\n  it('should provide index parameter to mapper function', () => {\n    const items = [{ value: 1 }, { value: 2 }, { value: 1 }];\n    const result = uniqBy(items, (item, index) => item.value + index);\n    expect(result).toEqual([{ value: 1 }, { value: 2 }]);\n  });\n\n  it('should provide array parameter to mapper function', () => {\n    const items = [{ value: 1 }, { value: 2 }, { value: 1 }];\n    const result = uniqBy(items, (item, _index, array) => item.value * array.length);\n    expect(result).toEqual([{ value: 1 }, { value: 2 }]);\n  });\n});\n"
  },
  {
    "path": "src/array/uniqBy.ts",
    "content": "/**\n * Returns a new array containing only the unique elements from the original array,\n * based on the values returned by the mapper function.\n *\n * When duplicates are found, the first occurrence is kept and the rest are discarded.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} arr - The array to process.\n * @param {(item: T) => U} mapper - The function used to convert the array elements.\n * @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the mapper function.\n *\n * @example\n * ```ts\n * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);\n * // [1.2, 2.1, 3.2, 5.7, 7.19]\n * ```\n *\n * @example\n * const array = [\n *   { category: 'fruit', name: 'apple' },\n *   { category: 'fruit', name: 'banana' },\n *   { category: 'vegetable', name: 'carrot' },\n * ];\n * uniqBy(array, item => item.category).length\n * // 2\n * ```\n */\nexport function uniqBy<T, U>(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => U): T[] {\n  const map = new Map<U, T>();\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    const key = mapper(item, i, arr);\n\n    if (!map.has(key)) {\n      map.set(key, item);\n    }\n  }\n\n  return Array.from(map.values());\n}\n"
  },
  {
    "path": "src/array/uniqWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { uniqWith } from './uniqWith';\n\ndescribe('uniqWith', () => {\n  it('should work with a `comparator`', () => {\n    expect(\n      uniqWith(\n        [\n          { x: 1, y: 2 },\n          { x: 1, y: 3 },\n        ],\n        (a, b) => a.x === b.x\n      )\n    ).toEqual([{ x: 1, y: 2 }]);\n    expect(uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1)).toEqual([\n      1.2, 3.2, 5.7, 7.19,\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/uniqWith.ts",
    "content": "/**\n * Returns a new array containing only the unique elements from the original array,\n * based on the values returned by the comparator function.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @param {(item1: T, item2: T) => boolean} areItemsEqual - The function used to compare the array elements.\n * @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the comparator function.\n *\n * @example\n * ```ts\n * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);\n * // [1.2, 3.2, 5.7, 7.19]\n * ```\n */\nexport function uniqWith<T>(arr: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[] {\n  const result: T[] = [];\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n    const isUniq = result.every(v => !areItemsEqual(v, item));\n\n    if (isUniq) {\n      result.push(item);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/unzip.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { unzip } from './unzip';\n\ndescribe('unzip', () => {\n  it('should unzip arrays correctly', () => {\n    const zipped = [\n      ['a', true, 1],\n      ['b', false, 2],\n    ];\n    const result = unzip(zipped);\n\n    expect(result).toEqual([\n      ['a', 'b'],\n      [true, false],\n      [1, 2],\n    ]);\n  });\n\n  it('should handle empty arrays', () => {\n    const zipped = [[], [], [], []];\n    const result = unzip(zipped);\n    expect(result).toEqual([]);\n  });\n\n  it('should handle arrays of different lengths', () => {\n    const zipped = [\n      ['a', 1, true, 32, 100],\n      ['b', 2, false],\n    ];\n    const result = unzip(zipped);\n    expect(result).toEqual([\n      ['a', 'b'],\n      [1, 2],\n      [true, false],\n      [32, undefined],\n      [100, undefined],\n    ]);\n\n    const zipped2 = [['a', 1, true], ['b', 2, false, 32, 58], [1]];\n    const result2 = unzip(zipped2);\n    expect(result2).toEqual([\n      ['a', 'b', 1],\n      [1, 2, undefined],\n      [true, false, undefined],\n      [undefined, 32, undefined],\n      [undefined, 58, undefined],\n    ]);\n  });\n});\n"
  },
  {
    "path": "src/array/unzip.ts",
    "content": "/**\n * Gathers elements in the same position in an internal array\n * from a grouped array of elements and returns them as a new array.\n *\n * @template T - The type of elements in the nested array.\n * @param {Array<[...T]>} zipped - The nested array to unzip.\n * @returns {Unzip<T>} A new array of unzipped elements.\n *\n * @example\n * const zipped = [['a', true, 1],['b', false, 2]];\n * const result = unzip(zipped);\n * // result will be [['a', 'b'], [true, false], [1, 2]]\n */\nexport function unzip<T extends unknown[]>(zipped: ReadonlyArray<[...T]>): Unzip<T> {\n  // For performance reasons, use this implementation instead of\n  // const maxLen = Math.max(...zipped.map(arr => arr.length));\n  let maxLen = 0;\n\n  for (let i = 0; i < zipped.length; i++) {\n    if (zipped[i].length > maxLen) {\n      maxLen = zipped[i].length;\n    }\n  }\n\n  const result = new Array(maxLen) as Unzip<T>;\n\n  for (let i = 0; i < maxLen; i++) {\n    result[i] = new Array(zipped.length);\n    for (let j = 0; j < zipped.length; j++) {\n      result[i][j] = zipped[j][i];\n    }\n  }\n\n  return result;\n}\n\ntype Unzip<K extends unknown[]> = { [I in keyof K]: Array<K[I]> };\n"
  },
  {
    "path": "src/array/unzipWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { unzipWith } from './unzipWith';\nimport { zip } from './zip';\n\ndescribe('unzipWith', () => {\n  it('should unzip arrays correctly with an iteratee', () => {\n    const zipped = zip([10, 20, 30], [40, 50, 60], [70, 80, 90]);\n    const result = unzipWith(zipped, (item, item2, item3) => item + item2 + item3);\n\n    expect(result).toEqual([60, 150, 240]);\n  });\n\n  it('should handle arrays of different lengths', () => {\n    const zipped = zip([1, 20, 300, 4000], [100, 200, 300]);\n    const result = unzipWith(zipped, (item, item2, item3, item4) => item + item2 + item3 + item4);\n\n    expect(result).toEqual([4321, NaN]);\n  });\n});\n"
  },
  {
    "path": "src/array/unzipWith.ts",
    "content": "/**\n * Unzips an array of arrays, applying an `iteratee` function to regrouped elements.\n *\n * @template T, R\n * @param {T[][]} target - The nested array to unzip. This is an array of arrays,\n * where each inner array contains elements to be unzipped.\n * @param {(...args: T[]) => R} iteratee - A function to transform the unzipped elements.\n * @returns {R[]} A new array of unzipped and transformed elements.\n *\n * @example\n * const nestedArray = [[1, 2], [3, 4], [5, 6]];\n * const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3);\n * // result will be [9, 12]\n */\nexport function unzipWith<T, R>(target: readonly T[][], iteratee: (...args: T[]) => R): R[] {\n  const maxLength = Math.max(...target.map(innerArray => innerArray.length));\n  const result: R[] = new Array(maxLength);\n\n  for (let i = 0; i < maxLength; i++) {\n    const group = new Array(target.length);\n\n    for (let j = 0; j < target.length; j++) {\n      group[j] = target[j][i];\n    }\n\n    result[i] = iteratee(...group);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/windowed.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { windowed } from './windowed';\n\ndescribe('windowed', () => {\n  it('should return a list of overlapping consecutive pairs', () => {\n    expect(windowed([1, 2, 3, 4], 2)).toEqual([\n      [1, 2],\n      [2, 3],\n      [3, 4],\n    ]);\n  });\n\n  it('should return a list of overlapping windows of the given size with given offsets', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 3, 2)).toEqual([\n      [1, 2, 3],\n      [3, 4, 5],\n    ]);\n  });\n\n  it('should return a list of non-overlapping windows of the given size', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 3, 3)).toEqual([\n      [1, 2, 3],\n      [4, 5, 6],\n    ]);\n  });\n\n  it('should return a list of partial with partial windows of smaller size', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true })).toEqual([\n      [1, 2, 3],\n      [3, 4, 5],\n      [5, 6],\n    ]);\n  });\n\n  it('should behave like chunked when size equals step', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 3, 3)).toEqual([\n      [1, 2, 3],\n      [4, 5, 6],\n    ]);\n  });\n\n  it('should skip elements when step is greater than size', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 2, 4)).toEqual([\n      [1, 2],\n      [5, 6],\n    ]);\n  });\n\n  it('should properly handle step bigger than array', () => {\n    expect(windowed([1, 2, 3, 4, 5, 6], 2, 10)).toEqual([[1, 2]]);\n  });\n\n  it('should return an empty array when the input array is empty', () => {\n    expect(windowed([], 3)).toEqual([]);\n  });\n\n  it('should throw error on invalid size or step', () => {\n    expect(() => windowed([1, 2, 3], 0)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be a positive integer.]`\n    );\n    expect(() => windowed([1, 2, 3], 1, 0)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Step must be a positive integer.]`\n    );\n    expect(() => windowed([1, 2, 3], -1)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be a positive integer.]`\n    );\n    expect(() => windowed([1, 2, 3], 0.5)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Size must be a positive integer.]`\n    );\n    expect(() => windowed([1, 2, 3], 1, -1)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Step must be a positive integer.]`\n    );\n    expect(() => windowed([1, 2, 3], 1, 0.5)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: Step must be a positive integer.]`\n    );\n  });\n});\n"
  },
  {
    "path": "src/array/windowed.ts",
    "content": "/**\n * Options for the windowed function.\n *\n * @interface WindowedOptions\n * @property {boolean} [partialWindows=false] - Whether to include partial windows at the end of the array.\n */\nexport interface WindowedOptions {\n  /**\n   * Whether to include partial windows at the end of the array.\n   *\n   * By default, `windowed` only includes full windows in the result,\n   * ignoring any leftover elements that can't form a full window.\n   *\n   * If `partialWindows` is true, the function will also include these smaller, partial windows at the end of the result.\n   */\n  partialWindows?: boolean;\n}\n\n/**\n * Creates an array of sub-arrays (windows) from the input array, each of the specified size.\n * The windows can overlap depending on the step size provided.\n *\n * By default, only full windows are included in the result, and any leftover elements that can't form a full window are ignored.\n *\n * If the `partialWindows` option is set to true in the options object, the function will also include partial windows at the end of the result.\n * Partial windows are smaller sub-arrays created when there aren't enough elements left in the input array to form a full window.\n *\n * @template T\n * @param {readonly T[]} arr - The input array to create windows from.\n * @param {number} size - The size of each window. Must be a positive integer.\n * @param {number} [step=1] - The step size between the start of each window. Must be a positive integer.\n * @param {WindowedOptions} [options={}] - Options object to configure the behavior of the function.\n * @param {boolean} [options.partialWindows=false] - Whether to include partial windows at the end of the array.\n * @returns {T[][]} An array of windows (sub-arrays) created from the input array.\n * @throws {Error} If the size or step is not a positive integer.\n *\n * @example\n * windowed([1, 2, 3, 4], 2);\n * // => [[1, 2], [2, 3], [3, 4]]\n *\n * @example\n * windowed([1, 2, 3, 4, 5, 6], 3, 2);\n * // => [[1, 2, 3], [3, 4, 5]]\n *\n * @example\n * windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true });\n * // => [[1, 2, 3], [3, 4, 5], [5, 6]]\n */\nexport function windowed<T>(\n  arr: readonly T[],\n  size: number,\n  step = 1,\n  { partialWindows = false }: WindowedOptions = {}\n): T[][] {\n  if (size <= 0 || !Number.isInteger(size)) {\n    throw new Error('Size must be a positive integer.');\n  }\n\n  if (step <= 0 || !Number.isInteger(step)) {\n    throw new Error('Step must be a positive integer.');\n  }\n\n  const result: T[][] = [];\n  const end = partialWindows ? arr.length : arr.length - size + 1;\n\n  for (let i = 0; i < end; i += step) {\n    result.push(arr.slice(i, i + size));\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/without.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { without } from './without';\n\ndescribe('without', () => {\n  it('should return an empty array when the input array is empty', () => {\n    expect(without([], 1, 2, 3)).toEqual([]);\n  });\n\n  it('should return the same array when no values are provided to exclude', () => {\n    expect(without([1, 2, 3])).toEqual([1, 2, 3]);\n  });\n\n  it('should return a new array excluding the specified values', () => {\n    expect(without([1, 2, 3, 4, 5], 2, 4)).toEqual([1, 3, 5]);\n    expect(without(['a', 'b', 'c', 'a'], 'a')).toEqual(['b', 'c']);\n  });\n\n  it('should handle cases where none of the specified values are in the array', () => {\n    expect(without([1, 2, 3], 4, 5)).toEqual([1, 2, 3]);\n  });\n\n  it('should handle cases with different types of values', () => {\n    expect(without([1, '2', 3, '4'], 2, '4')).toEqual([1, '2', 3]);\n    expect(without([1, '1', 2, '2'], 1, '2')).toEqual(['1', 2]);\n  });\n\n  it('should handle NaN values correctly', () => {\n    expect(without([NaN, 1, 2, NaN, 3], NaN)).toEqual([1, 2, 3]);\n  });\n\n  it('should treat +0 and -0 as equal', () => {\n    expect(without([0, -0, 1, 2], 0)).toEqual([1, 2]);\n    expect(without([0, -0, 1, 2], -0)).toEqual([1, 2]);\n  });\n});\n"
  },
  {
    "path": "src/array/without.ts",
    "content": "import { difference } from './difference.ts';\n\n/**\n * Creates an array that excludes all specified values.\n *\n * It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero).\n *\n * @template T The type of elements in the array.\n * @param {T[]} array - The array to filter.\n * @param {...T[]} values - The values to exclude.\n * @returns {T[]} A new array without the specified values.\n *\n * @example\n * // Removes the specified values from the array\n * without([1, 2, 3, 4, 5], 2, 4);\n * // Returns: [1, 3, 5]\n *\n * @example\n * // Removes specified string values from the array\n * without(['a', 'b', 'c', 'a'], 'a');\n * // Returns: ['b', 'c']\n */\nexport function without<T>(array: readonly T[], ...values: T[]): T[] {\n  return difference(array, values);\n}\n"
  },
  {
    "path": "src/array/xor.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { xor } from './xor';\n\ndescribe('xor', () => {\n  it('computes the symmetric difference between two arrays', () => {\n    expect(xor([1, 2, 3, 4], [3, 4, 5, 6])).toEqual([1, 2, 5, 6]);\n    expect(xor(['a', 'b'], ['b', 'c'])).toEqual(['a', 'c']);\n    expect(xor([1, 2, 3], [4, 5, 6])).toEqual([1, 2, 3, 4, 5, 6]);\n    expect(xor([1, 2, 3], [1, 2, 3])).toEqual([]);\n    expect(xor([], [1, 2, 3])).toEqual([1, 2, 3]);\n    expect(xor([1, 2, 3], [])).toEqual([1, 2, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/xor.ts",
    "content": "import { difference } from './difference.ts';\nimport { intersection } from './intersection.ts';\nimport { union } from './union.ts';\n\n/**\n * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements\n * which are in either of the arrays, but not in their intersection.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both.\n *\n * @example\n * // Returns [1, 2, 5, 6]\n * xor([1, 2, 3, 4], [3, 4, 5, 6]);\n *\n * @example\n * // Returns ['a', 'c']\n * xor(['a', 'b'], ['b', 'c']);\n */\nexport function xor<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n  return difference(union(arr1, arr2), intersection(arr1, arr2));\n}\n"
  },
  {
    "path": "src/array/xorBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { xorBy } from './xorBy';\n\ndescribe('xorBy', () => {\n  it('computes the symmetric difference between two arrays using a custom mapping function', () => {\n    const identity = (x: number) => x;\n    const idMapper = (obj: { id: number }) => obj.id;\n\n    expect(xorBy([1, 2, 3, 4], [3, 4, 5, 6], identity)).toEqual([1, 2, 5, 6]);\n    expect(xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper)).toEqual([{ id: 1 }, { id: 3 }]);\n    expect(xorBy([1, 2, 3], [4, 5, 6], identity)).toEqual([1, 2, 3, 4, 5, 6]);\n    expect(xorBy([1, 2, 3], [1, 2, 3], identity)).toEqual([]);\n    expect(xorBy([], [1, 2, 3], identity)).toEqual([1, 2, 3]);\n    expect(xorBy([1, 2, 3], [], identity)).toEqual([1, 2, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/xorBy.ts",
    "content": "import { differenceBy } from './differenceBy.ts';\nimport { intersectionBy } from './intersectionBy.ts';\nimport { unionBy } from './unionBy.ts';\n\n/**\n * Computes the symmetric difference between two arrays using a custom mapping function.\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection, determined by the result of the mapping function.\n *\n * @template T - Type of elements in the input arrays.\n * @template U - Type of the values returned by the mapping function.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = obj => obj.id;\n * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n  const union = unionBy(arr1, arr2, mapper);\n  const intersection = intersectionBy(arr1, arr2, mapper);\n\n  return differenceBy(union, intersection, mapper);\n}\n"
  },
  {
    "path": "src/array/xorWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { xorWith } from './xorWith';\n\ndescribe('xorWith', () => {\n  it('computes the symmetric difference between two arrays using a custom equality function', () => {\n    const areNumbersEqual = (a: number, b: number) => a === b;\n    const areObjectsEqual = (a: { id: number }, b: { id: number }) => a.id === b.id;\n\n    expect(xorWith([1, 2, 3, 4], [3, 4, 5, 6], areNumbersEqual)).toEqual([1, 2, 5, 6]);\n    expect(xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual)).toEqual([{ id: 1 }, { id: 3 }]);\n    expect(xorWith([1, 2, 3], [4, 5, 6], areNumbersEqual)).toEqual([1, 2, 3, 4, 5, 6]);\n    expect(xorWith([1, 2, 3], [1, 2, 3], areNumbersEqual)).toEqual([]);\n    expect(xorWith([], [1, 2, 3], areNumbersEqual)).toEqual([1, 2, 3]);\n    expect(xorWith([1, 2, 3], [], areNumbersEqual)).toEqual([1, 2, 3]);\n  });\n});\n"
  },
  {
    "path": "src/array/xorWith.ts",
    "content": "import { differenceWith } from './differenceWith.ts';\nimport { intersectionWith } from './intersectionWith.ts';\nimport { unionWith } from './unionWith.ts';\n\n/**\n * Computes the symmetric difference between two arrays using a custom equality function.\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection.\n *\n * @template T - Type of elements in the input arrays.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item1: T, item2: T) => boolean} areElementsEqual - The custom equality function to compare elements.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function.\n *\n * @example\n * // Custom equality function for objects with an 'id' property\n * const areObjectsEqual = (a, b) => a.id === b.id;\n * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorWith<T>(\n  arr1: readonly T[],\n  arr2: readonly T[],\n  areElementsEqual: (item1: T, item2: T) => boolean\n): T[] {\n  const union = unionWith(arr1, arr2, areElementsEqual);\n  const intersection = intersectionWith(arr1, arr2, areElementsEqual);\n\n  return differenceWith(union, intersection, areElementsEqual);\n}\n"
  },
  {
    "path": "src/array/zip.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { zip } from './zip';\n\ndescribe('zip', () => {\n  it('zips multiple arrays to create a tuple', () => {\n    expect(zip([1, 2, 3])).toEqual([[1], [2], [3]]);\n\n    expect(zip([1, 2, 3], ['a', 'b', 'c'])).toEqual([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n    expect(zip([1, 2, 3], ['a', 'b'])).toEqual([\n      [1, 'a'],\n      [2, 'b'],\n      [3, undefined],\n    ]);\n\n    expect(zip([1, 2, 3], ['a', 'b', 'c'], [true, true, false])).toEqual([\n      [1, 'a', true],\n      [2, 'b', true],\n      [3, 'c', false],\n    ]);\n    expect(zip([1], ['a'], [true], [null])).toEqual([[1, 'a', true, null]]);\n  });\n\n  it('supports spread operators', () => {\n    expect(zip(...[[1], ['s'], [{ a: 2 }]])).toEqual([[1, 's', { a: 2 }]]);\n  });\n});\n"
  },
  {
    "path": "src/array/zip.ts",
    "content": "/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T\n * @param {T[]} arr1 - The first array to zip.\n * @returns {Array<[T]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const result = zip(arr1);\n * // result will be [[1], [2], [3]]\n */\nexport function zip<T>(arr1: readonly T[]): Array<[T]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @returns {Array<[T, U]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zip(arr1, arr2);\n * // result will be [[1, 'a'], [2, 'b'], [3, 'c']]\n */\nexport function zip<T, U>(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U, V\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @param {V[]} arr3 - The third array to zip.\n * @returns {Array<[T, U, V]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const result = zip(arr1, arr2, arr3);\n * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\nexport function zip<T, U, V>(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U, V, W\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @param {V[]} arr3 - The third array to zip.\n * @param {W[]} arr4 - The fourth array to zip.\n * @returns {Array<[T, U, V, W]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const arr4 = [null, null, null];\n * const result = zip(arr1, arr2, arr3, arr4);\n * // result will be [[1, 'a', true, null], [2, 'b', false, null], [3, 'c', undefined, null]]\n */\nexport function zip<T, U, V, W>(\n  arr1: readonly T[],\n  arr2: readonly U[],\n  arr3: readonly V[],\n  arr4: readonly W[]\n): Array<[T, U, V, W]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T\n * @param {...Array<readonly T[]>} arrs - The arrays to zip together.\n * @returns {T[][]} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const result = zip(arr1, arr2, arr3);\n * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\nexport function zip<T>(...arrs: Array<readonly T[]>): T[][];\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T\n * @param {...Array<readonly T[]>} arrs - The arrays to zip together.\n * @returns {T[][]} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const result = zip(arr1, arr2, arr3);\n * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\nexport function zip<T>(...arrs: Array<readonly T[]>): T[][] {\n  // For performance reasons, use this implementation instead of\n  // const rowCount = Math.max(...arrs.map(x => x.length));\n  let rowCount = 0;\n\n  for (let i = 0; i < arrs.length; i++) {\n    if (arrs[i].length > rowCount) {\n      rowCount = arrs[i].length;\n    }\n  }\n  const columnCount = arrs.length;\n  const result = Array(rowCount);\n\n  for (let i = 0; i < rowCount; ++i) {\n    const row = Array(columnCount);\n    for (let j = 0; j < columnCount; ++j) {\n      row[j] = arrs[j][i];\n    }\n    result[i] = row;\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/array/zipObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { zipObject } from './zipObject';\n\ndescribe('zipObject', () => {\n  it('creates an object from two arrays of keys and values', () => {\n    expect(zipObject(['a', 'b', 'c'], [1, 2, 3])).toEqual({ a: 1, b: 2, c: 3 });\n\n    expect(zipObject(['a', 'b', 'c'], [1, 2])).toEqual({ a: 1, b: 2, c: undefined });\n\n    expect(zipObject(['a', 'b'], [1, 2, 3])).toEqual({ a: 1, b: 2 });\n  });\n});\n"
  },
  {
    "path": "src/array/zipObject.ts",
    "content": "/**\n * Combines two arrays, one of property names and one of corresponding values, into a single object.\n *\n * This function takes two arrays: one containing property names and another containing corresponding values.\n * It returns a new object where the property names from the first array are keys, and the corresponding elements\n * from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will\n * have `undefined` as their values.\n *\n * @template P - The type of elements in the array.\n * @template V - The type of elements in the array.\n * @param {P[]} keys - An array of property names.\n * @param {V[]} values - An array of values corresponding to the property names.\n * @returns {Record<P, V>} - A new object composed of the given property names and values.\n *\n * @example\n * const keys = ['a', 'b', 'c'];\n * const values = [1, 2, 3];\n * const result = zipObject(keys, values);\n * // result will be { a: 1, b: 2, c: 3 }\n *\n * const keys2 = ['a', 'b', 'c'];\n * const values2 = [1, 2];\n * const result2 = zipObject(keys2, values2);\n * // result2 will be { a: 1, b: 2, c: undefined }\n *\n * const keys2 = ['a', 'b'];\n * const values2 = [1, 2, 3];\n * const result2 = zipObject(keys2, values2);\n * // result2 will be { a: 1, b: 2 }\n */\nexport function zipObject<P extends PropertyKey, V>(keys: readonly P[], values: readonly V[]): Record<P, V> {\n  const result = {} as Record<P, V>;\n\n  for (let i = 0; i < keys.length; i++) {\n    result[keys[i]] = values[i];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/array/zipWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { zipWith } from './zipWith';\n\ndescribe('zipWith', () => {\n  it('zips multiple arrays with the given combine function', () => {\n    expect(zipWith([1, 2, 3], x => x)).toEqual([1, 2, 3]);\n\n    expect(zipWith([1, 2, 3], ['a', 'b', 'c'], (x, y) => `${x}${y}`)).toEqual(['1a', '2b', '3c']);\n    expect(zipWith([1, 2, 3], ['a', 'b'], (x, y) => `${x}${y}`)).toEqual(['1a', '2b', '3undefined']);\n\n    expect(zipWith([1, 2, 3], ['a', 'b', 'c'], [true, true, false], (x, y, z) => `${x}-${y}-${z}`)).toEqual([\n      `1-a-true`,\n      `2-b-true`,\n      `3-c-false`,\n    ]);\n  });\n\n  it('should provide index parameter to combine function', () => {\n    const result = zipWith([10, 20, 30], [1, 2, 3], (a, b, index) => a + b + index);\n    expect(result).toEqual([11, 23, 35]);\n  });\n});\n"
  },
  {
    "path": "src/array/zipWith.ts",
    "content": "/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes multiple arrays and a combiner function, and returns a new array where each element\n * is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @template T - The type of elements in the first array.\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {(item: T, index: number) => R} combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * // Example usage with two arrays:\n * const arr1 = [1, 2, 3];\n * const arr2 = [4, 5, 6];\n * const result = zipWith(arr1, arr2, (a, b) => a + b);\n * // result will be [5, 7, 9]\n *\n * @example\n * // Example usage with three arrays:\n * const arr1 = [1, 2];\n * const arr2 = [3, 4];\n * const arr3 = [5, 6];\n * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n * // result will be [`135`, `246`]\n */\nexport function zipWith<T, R>(arr1: readonly T[], combine: (item: T, index: number) => R): R[];\n/**\n * Combines two arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @param {(item1: T, item2: U, index: number) => R} combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, R>(\n  arr1: readonly T[],\n  arr2: readonly U[],\n  combine: (item1: T, item2: U, index: number) => R\n): R[];\n/**\n * Combines three arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template V - The type of elements in the third array.\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @param {V[]} arr3 - The third array to zip.\n * @param {(item1: T, item2: U, item3: V, index: number) => R} combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, V, R>(\n  arr1: readonly T[],\n  arr2: readonly U[],\n  arr3: readonly V[],\n  combine: (item1: T, item2: U, item3: V, index: number) => R\n): R[];\n/**\n * Combines four arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template V - The type of elements in the third array.\n * @template W - The type of elements in the fourth array.\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} arr2 - The second array to zip.\n * @param {V[]} arr3 - The third array to zip.\n * @param {W[]} arr4 - The fourth array to zip.\n * @param {(item1: T, item2: U, item3: V, item4: W, index: number) => R} combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, V, W, R>(\n  arr1: readonly T[],\n  arr2: readonly U[],\n  arr3: readonly V[],\n  arr4: readonly W[],\n  combine: (item1: T, item2: U, item3: V, item4: W, index: number) => R\n): R[];\n\n/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes one array and a variable number of additional arrays,\n * applying the provided combiner function to the corresponding elements of each array.\n * If the input arrays are of different lengths, the resulting array will have the length\n * of the longest input array, with undefined values for missing elements.\n *\n * @template T - The type of elements in the input arrays.\n * @template R - The type of elements in the resulting array.\n * @param {T[]} arr1 - The first array to zip.\n * @param {...Array<T[]>} rest - The additional arrays to zip together, followed by the combiner function.\n * @param {(...items: [...T[], number]) => R} combine - The combiner function that takes corresponding elements from each array, followed by their index, and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zipWith(arr1, arr2, (num, char) => `${num}${char}`);\n * // result will be ['1a', '2b', '3c']\n */\nexport function zipWith<T, R>(arr1: readonly T[], ...rest: any[]): R[] {\n  const arrs = [arr1, ...rest.slice(0, -1)];\n  const combine = rest[rest.length - 1] as (...items: any[]) => R;\n\n  const maxIndex = Math.max(...arrs.map(arr => arr.length));\n  const result: R[] = Array(maxIndex);\n\n  for (let i = 0; i < maxIndex; i++) {\n    const elements: T[] = arrs.map(arr => arr[i]);\n    result[i] = combine(...elements, i);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/_internal/ArrayIterator.ts",
    "content": "export type ArrayIterator<T, R> = (value: T, index: number, collection: T[]) => R;\n"
  },
  {
    "path": "src/compat/_internal/ConformsPredicateObject.ts",
    "content": "export type ConformsPredicateObject<T> = {\n  [P in keyof T]: T[P] extends (arg: infer A) => any ? A : any;\n};\n"
  },
  {
    "path": "src/compat/_internal/EmptyObjectOf.ts",
    "content": "type EmptyObject<T> = { [K in keyof T]?: never };\nexport type EmptyObjectOf<T> = EmptyObject<T> extends T ? EmptyObject<T> : never;\n"
  },
  {
    "path": "src/compat/_internal/Equals.d.ts",
    "content": "export type Equals<T, U> = (<X>() => X extends T ? 1 : 2) extends <X>() => X extends U ? 1 : 2 ? true : false;\n"
  },
  {
    "path": "src/compat/_internal/GetFieldType.ts",
    "content": "type GetFieldTypeOfArrayLikeByKey<T extends unknown[], K> = K extends number\n  ? T[K]\n  : K extends `${infer N extends number}`\n    ? T[N]\n    : K extends keyof T\n      ? T[K]\n      : undefined;\n\ntype GetFieldTypeOfStringByKey<T extends string, K> = K extends number\n  ? T[K]\n  : K extends `${infer N extends number}`\n    ? T[N]\n    : K extends keyof T\n      ? T[K]\n      : undefined;\n\ntype GetFieldTypeOfNarrowedByKey<T, K> = T extends unknown[]\n  ? GetFieldTypeOfArrayLikeByKey<T, K>\n  : T extends string\n    ? GetFieldTypeOfStringByKey<T, K>\n    : K extends keyof T\n      ? T[K]\n      : K extends number\n        ? `${K}` extends keyof T\n          ? T[`${K}`]\n          : undefined\n        : K extends `${infer N extends number}`\n          ? N extends keyof T\n            ? T[N]\n            : undefined\n          : undefined;\n\ntype GetFieldTypeOfNarrowedByDotPath<T, P> = P extends `${infer L}.${infer R}`\n  ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, L>, R, 'DotPath'>\n  : GetFieldTypeOfNarrowedByKey<T, P>;\n\ntype GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R> = '' extends R\n  ? GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>\n  : R extends `.${infer Rc}`\n    ? GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, Rc>\n    : GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, R>;\n\ntype GetFieldTypeOfNarrowedByLKR<T, L, K, R> = '' extends L\n  ? '' extends R\n    ? GetFieldTypeOfNarrowedByKey<T, K>\n    : R extends `.${infer Rc}`\n      ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, Rc>\n      : GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, R>\n  : L extends `${infer Lc}.`\n    ? GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R>\n    : GetFieldTypeOfNarrowedByLcKR<T, L, K, R>;\n\ntype GetFieldTypeOfNarrowed<T, X, XT extends 'DotPath' | 'Key' | 'Path'> = XT extends 'Key'\n  ? GetFieldTypeOfNarrowedByKey<T, X>\n  : XT extends 'DotPath'\n    ? GetFieldTypeOfNarrowedByDotPath<T, X>\n    : X extends `${infer L}['${infer K}']${infer R}`\n      ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>\n      : X extends `${infer L}[\"${infer K}\"]${infer R}`\n        ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>\n        : X extends `${infer L}[${infer K}]${infer R}`\n          ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>\n          : GetFieldTypeOfNarrowedByDotPath<T, X>;\n\ntype GetFieldTypeOfObject<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =\n  Extract<T, unknown[]> extends never\n    ? GetFieldTypeOfNarrowed<T, X, XT>\n    : GetFieldTypeOfNarrowed<Exclude<T, unknown[]>, X, XT> | GetFieldTypeOfNarrowed<Extract<T, unknown[]>, X, XT>;\n\ntype GetFieldTypeOfPrimitive<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =\n  Extract<T, string> extends never\n    ? T extends never\n      ? never\n      : undefined\n    : (Exclude<T, string> extends never ? never : undefined) | GetFieldTypeOfNarrowed<Extract<T, string>, X, XT>;\n\nexport type GetFieldType<T, X, XT extends 'DotPath' | 'Key' | 'Path' = 'Path'> =\n  Extract<T, object> extends never\n    ? GetFieldTypeOfPrimitive<T, X, XT>\n    : GetFieldTypeOfPrimitive<Exclude<T, object>, X, XT> | GetFieldTypeOfObject<Extract<T, object>, X, XT>;\n"
  },
  {
    "path": "src/compat/_internal/IsEqualCustomizer.ts",
    "content": "export type IsEqualCustomizer = (\n  value: any,\n  other: any,\n  indexOrKey: PropertyKey | undefined,\n  parent: any,\n  otherParent: any,\n  stack: any\n) => boolean | undefined;\n"
  },
  {
    "path": "src/compat/_internal/IsMatchWithCustomizer.ts",
    "content": "export type IsMatchWithCustomizer = (\n  value: any,\n  other: any,\n  indexOrKey: PropertyKey,\n  object: object,\n  source: object\n) => boolean | undefined;\n"
  },
  {
    "path": "src/compat/_internal/IsWritable.d.ts",
    "content": "import type { Equals } from './Equals.d.ts';\n\nexport type IsWritable<T> = Equals<{ [K in keyof T]: T[K] }, { -readonly [K in keyof T]: T[K] }>;"
  },
  {
    "path": "src/compat/_internal/IterateeShorthand.ts",
    "content": "import { PartialShallow } from './PartialShallow.ts';\n\nexport type IterateeShorthand<T> = PropertyKey | [PropertyKey, any] | PartialShallow<T>;\n"
  },
  {
    "path": "src/compat/_internal/LARGE_ARRAY_SIZE.ts",
    "content": "export const LARGE_ARRAY_SIZE = 200;\n"
  },
  {
    "path": "src/compat/_internal/ListIteratee.ts",
    "content": "import { PartialShallow } from './PartialShallow.ts';\n\nexport type ListIteratee<T> =\n  | ((value: T, index: number, collection: ArrayLike<T>) => unknown)\n  | (PropertyKey | [PropertyKey, any] | PartialShallow<T>);\n"
  },
  {
    "path": "src/compat/_internal/ListIterateeCustom.ts",
    "content": "import { PartialShallow } from './PartialShallow.ts';\n\nexport type ListIterateeCustom<T, R> =\n  | ((value: T, index: number, collection: ArrayLike<T>) => R)\n  | (PropertyKey | [PropertyKey, any] | PartialShallow<T>);\n"
  },
  {
    "path": "src/compat/_internal/ListIterator.ts",
    "content": "export type ListIterator<T, R> = (value: T, index: number, collection: ArrayLike<T>) => R;\n"
  },
  {
    "path": "src/compat/_internal/ListIteratorTypeGuard.ts",
    "content": "export type ListIteratorTypeGuard<T, S extends T> = (value: T, index: number, collection: ArrayLike<T>) => value is S;\n"
  },
  {
    "path": "src/compat/_internal/ListOfRecursiveArraysOrValues.ts",
    "content": "import { RecursiveArray } from './RecursiveArray.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface ListOfRecursiveArraysOrValues<T> extends ArrayLike<T | RecursiveArray<T>> {}\n"
  },
  {
    "path": "src/compat/_internal/MAX_ARRAY_LENGTH.ts",
    "content": "export const MAX_ARRAY_LENGTH = 4_294_967_295;\n"
  },
  {
    "path": "src/compat/_internal/MAX_INTEGER.ts",
    "content": "export const MAX_INTEGER = Number.MAX_VALUE;\n"
  },
  {
    "path": "src/compat/_internal/MAX_SAFE_INTEGER.ts",
    "content": "export const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n"
  },
  {
    "path": "src/compat/_internal/Many.ts",
    "content": "export type Many<T> = T | readonly T[];\n"
  },
  {
    "path": "src/compat/_internal/MemoListIterator.ts",
    "content": "export type MemoListIterator<T, R, A> = (prev: R, curr: T, index: number, list: A) => R;\n"
  },
  {
    "path": "src/compat/_internal/MemoObjectIterator.ts",
    "content": "export type MemoObjectIterator<T, R, A> = (prev: R, curr: T, key: string, list: A) => R;\n"
  },
  {
    "path": "src/compat/_internal/MutableList.d.ts",
    "content": "export interface MutableList<T> {\n  length: number;\n  [k: number]: T;\n}\n"
  },
  {
    "path": "src/compat/_internal/ObjectIteratee.ts",
    "content": "import { IterateeShorthand } from './IterateeShorthand.ts';\nimport { ObjectIterator } from './ObjectIterator.ts';\n\nexport type ObjectIteratee<TObject> = ObjectIterator<TObject, unknown> | IterateeShorthand<TObject[keyof TObject]>;\n\nexport type ObjectIterateeCustom<TObject, TResult> =\n  | ObjectIterator<TObject, TResult>\n  | IterateeShorthand<TObject[keyof TObject]>;\n"
  },
  {
    "path": "src/compat/_internal/ObjectIterateeCustom.ts",
    "content": "import { IterateeShorthand } from './IterateeShorthand';\nimport { ObjectIterator } from './ObjectIterator';\n\nexport type ObjectIterateeCustom<TObject, TResult> =\n  | ObjectIterator<TObject, TResult>\n  | IterateeShorthand<TObject[keyof TObject]>;\n"
  },
  {
    "path": "src/compat/_internal/ObjectIterator.ts",
    "content": "export type ObjectIterator<T, R> = (value: T[keyof T], key: string, collection: T) => R;\nexport type ObjectIteratorTypeGuard<T, U extends T[keyof T]> = (\n  value: T[keyof T],\n  key: string,\n  collection: T\n) => value is U;\n"
  },
  {
    "path": "src/compat/_internal/PartialShallow.ts",
    "content": "export type PartialShallow<T> = {\n  [P in keyof T]?: T[P] extends object ? object : T[P];\n};\n"
  },
  {
    "path": "src/compat/_internal/PropertyPath.ts",
    "content": "import { Many } from './Many.ts';\n\nexport type PropertyPath = Many<PropertyKey>;\n"
  },
  {
    "path": "src/compat/_internal/RecursiveArray.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RecursiveArray<T> extends Array<T | RecursiveArray<T>> {}\n"
  },
  {
    "path": "src/compat/_internal/RejectReadonly.d.ts",
    "content": "import { IsWritable } from './IsWritable.d.ts';\nimport { MutableList } from './MutableList.d.ts';\n\nexport type RejectReadonly<T extends MutableList<unknown>> = IsWritable<T> extends true ? T : never;"
  },
  {
    "path": "src/compat/_internal/StringIterator.ts",
    "content": "export type StringIterator<R> = (char: string, index: number, string: string) => R;\n"
  },
  {
    "path": "src/compat/_internal/TupleIterator.ts",
    "content": "export type TupleIterator<T extends readonly unknown[], TResult> = (\n  value: T[number],\n  index: T extends `${infer N extends number}` ? N : never,\n  collection: T\n) => TResult;\n"
  },
  {
    "path": "src/compat/_internal/ValueIteratee.ts",
    "content": "import { PartialShallow } from './PartialShallow.ts';\n\nexport type ValueIteratee<T> = ((value: T) => unknown) | (PropertyKey | [PropertyKey, any] | PartialShallow<T>);\n"
  },
  {
    "path": "src/compat/_internal/ValueIterateeCustom.ts",
    "content": "import { IterateeShorthand } from './IterateeShorthand.ts';\n\nexport type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | IterateeShorthand<T>;\n"
  },
  {
    "path": "src/compat/_internal/ValueIteratorTypeGuard.ts",
    "content": "export type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;\n"
  },
  {
    "path": "src/compat/_internal/ValueKeyIteratee.ts",
    "content": "import { IterateeShorthand } from './IterateeShorthand.ts';\n\nexport type ValueKeyIteratee<T> = ((value: T, key: string) => unknown) | IterateeShorthand<T>;\n"
  },
  {
    "path": "src/compat/_internal/ValueKeyIterateeTypeGuard.ts",
    "content": "export type ValueKeyIterateeTypeGuard<T, S extends T> = (value: T, key: string) => value is S;\n"
  },
  {
    "path": "src/compat/_internal/args.ts",
    "content": "import { toArgs } from './toArgs';\n\nexport const args = toArgs([1, 2, 3]);\n"
  },
  {
    "path": "src/compat/_internal/arrayProto.ts",
    "content": "export const arrayProto: any = Array.prototype;\n"
  },
  {
    "path": "src/compat/_internal/arrayViews.ts",
    "content": "import { typedArrays } from './typedArrays';\n\nexport const arrayViews = [...typedArrays, 'DataView'];\n"
  },
  {
    "path": "src/compat/_internal/assignValue.ts",
    "content": "import { eq } from '../util/eq.ts';\n\nexport const assignValue = (object: any, key: PropertyKey, value: any): void => {\n  const objValue = object[key];\n  if (!(Object.hasOwn(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n};\n"
  },
  {
    "path": "src/compat/_internal/compareValues.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { compareValues } from './compareValues';\n\ndescribe('compareValues', () => {\n  it('should return negative number', () => {\n    expect(compareValues(1, 2, 'asc')).toBeLessThan(0);\n    expect(compareValues(2, 1, 'desc')).toBeLessThan(0);\n    expect(compareValues(1, null, 'asc')).toBeLessThan(0);\n  });\n\n  it('should return positive number', () => {\n    expect(compareValues(2, 1, 'asc')).toBeGreaterThan(0);\n    expect(compareValues(1, 2, 'desc')).toBeGreaterThan(0);\n    expect(compareValues(1, null, 'desc')).toBeGreaterThan(0);\n  });\n\n  it('should return 0', () => {\n    expect(compareValues(1, 1, 'asc')).toBe(0);\n    expect(compareValues(1, 1, 'desc')).toBe(0);\n    expect(compareValues(null, null, 'asc')).toBe(0);\n    expect(compareValues(null, null, 'desc')).toBe(0);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/compareValues.ts",
    "content": "function getPriority(a: unknown): 0 | 1 | 2 | 3 | 4 {\n  if (typeof a === 'symbol') {\n    return 1;\n  }\n\n  if (a === null) {\n    return 2;\n  }\n\n  if (a === undefined) {\n    return 3;\n  }\n\n  if (a !== a) {\n    return 4;\n  }\n\n  return 0;\n}\n\nexport const compareValues = <V>(a: V, b: V, order: string) => {\n  if (a !== b) {\n    const aPriority = getPriority(a);\n    const bPriority = getPriority(b);\n\n    // If both values are of the same priority and are normal values, compare them.\n    if (aPriority === bPriority && aPriority === 0) {\n      if (a < b) {\n        return order === 'desc' ? 1 : -1;\n      }\n\n      if (a > b) {\n        return order === 'desc' ? -1 : 1;\n      }\n    }\n\n    return order === 'desc' ? bPriority - aPriority : aPriority - bPriority;\n  }\n\n  return 0;\n};\n"
  },
  {
    "path": "src/compat/_internal/copyArray.ts",
    "content": "/**\n * Copies the values of `source` to `array`.\n *\n * @template T\n * @param {ArrayLike<T>} source The array to copy values from.\n * @param {T[]} [array=[]] The array to copy values to.\n * @returns {T[]} Returns `array`.\n */\nfunction copyArray<T>(source: ArrayLike<T>, array?: T[]): T[] {\n  const length = source.length;\n\n  if (array == null) {\n    array = Array(length);\n  }\n\n  for (let i = 0; i < length; i++) {\n    array[i] = source[i];\n  }\n\n  return array;\n}\n\nexport default copyArray;\n"
  },
  {
    "path": "src/compat/_internal/decimalAdjust.ts",
    "content": "export function decimalAdjust(\n  type: 'round' | 'floor' | 'ceil',\n  number: number | string,\n  precision: number | string = 0\n): number {\n  number = Number(number);\n  if (Object.is(number, -0)) {\n    number = '-0';\n  }\n  precision = Math.min(Number.parseInt(precision as string, 10), 292);\n  if (precision) {\n    const [magnitude, exponent = 0] = number.toString().split('e');\n    let adjustedValue: string | number = Math[type](Number(`${magnitude}e${Number(exponent) + precision}`));\n    if (Object.is(adjustedValue, -0)) {\n      adjustedValue = '-0';\n    }\n    const [newMagnitude, newExponent = 0] = adjustedValue.toString().split('e');\n    return Number(`${newMagnitude}e${Number(newExponent) - precision}`);\n  }\n  return Math[type](Number(number));\n}\n"
  },
  {
    "path": "src/compat/_internal/doubled.ts",
    "content": "export function doubled(n: number) {\n  return n * 2;\n}\n"
  },
  {
    "path": "src/compat/_internal/empties.ts",
    "content": "import { falsey } from './falsey.ts';\n\nexport const empties = [[], {}].concat(falsey.slice(1));\n"
  },
  {
    "path": "src/compat/_internal/falsey.ts",
    "content": "// eslint-disable-next-line no-sparse-arrays\nexport const falsey: unknown[] = [, null, undefined, false, 0, NaN, ''];\n"
  },
  {
    "path": "src/compat/_internal/flattenArrayLike.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flattenArrayLike } from './flattenArrayLike';\n\ndescribe('flattenArrayLike', () => {\n  it('should flatten an array of array-like objects', () => {\n    const input: Array<ArrayLike<string>> = [\n      { length: 3, 0: 'a', 1: 'b', 2: 'c' },\n      { length: 2, 0: 'd', 1: 'e' },\n      { length: 0 },\n    ];\n    const expectedOutput = ['a', 'b', 'c', 'd', 'e'];\n    expect(flattenArrayLike(input)).toEqual(expectedOutput);\n  });\n\n  it('should ignore non-array-like objects', () => {\n    const input: any[] = [{ length: 2, 0: 'x', 1: 'y' }, 3, { length: 1, 0: 'z' }];\n    const expectedOutput = ['x', 'y', 'z'];\n    expect(flattenArrayLike(input)).toEqual(expectedOutput);\n  });\n\n  it('should return an empty array when input is empty', () => {\n    const input: Array<ArrayLike<any>> = [];\n    const expectedOutput: any[] = [];\n    expect(flattenArrayLike(input)).toEqual(expectedOutput);\n  });\n\n  it('should handle nested array-like objects', () => {\n    const input: Array<ArrayLike<number[]>> = [\n      { length: 2, 0: [1, 2], 1: [3, 4] },\n      { length: 1, 0: [5, 6] },\n    ];\n    const expectedOutput = [\n      [1, 2],\n      [3, 4],\n      [5, 6],\n    ];\n    expect(flattenArrayLike(input)).toEqual(expectedOutput);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/flattenArrayLike.ts",
    "content": "import { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\nexport function flattenArrayLike<T>(values: Array<ArrayLike<T>>): T[] {\n  const result: T[] = [];\n\n  for (let i = 0; i < values.length; i++) {\n    const arrayLike = values[i];\n\n    if (!isArrayLikeObject(arrayLike)) {\n      continue;\n    }\n\n    for (let j = 0; j < arrayLike.length; j++) {\n      result.push(arrayLike[j] as T);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/_internal/getSymbols.ts",
    "content": "export function getSymbols(object: any) {\n  return Object.getOwnPropertySymbols(object).filter(symbol =>\n    Object.prototype.propertyIsEnumerable.call(object, symbol)\n  );\n}\n"
  },
  {
    "path": "src/compat/_internal/getSymbolsIn.ts",
    "content": "import { getSymbols } from './getSymbols.ts';\n\nexport function getSymbolsIn(object: any) {\n  const result: PropertyKey[] = [];\n  while (object) {\n    result.push(...getSymbols(object));\n    object = Object.getPrototypeOf(object);\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/compat/_internal/getTag.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getTag } from './getTag';\n\ndescribe('getTag function', () => {\n  it('should return the tag of the value', () => {\n    expect(getTag(null)).toBe('[object Null]');\n    expect(getTag(undefined)).toBe('[object Undefined]');\n    expect(getTag(1)).toBe('[object Number]');\n    expect(getTag('')).toBe('[object String]');\n    expect(getTag(true)).toBe('[object Boolean]');\n    expect(getTag(Symbol())).toBe('[object Symbol]');\n    expect(getTag([])).toBe('[object Array]');\n    expect(getTag({})).toBe('[object Object]');\n    expect(getTag(() => {})).toBe('[object Function]');\n    expect(getTag(new Date())).toBe('[object Date]');\n    expect(getTag(/./)).toBe('[object RegExp]');\n  });\n\n  it('should return the tag of the custom object', () => {\n    class Custom {}\n    expect(getTag(new Custom())).toBe('[object Object]');\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/getTag.ts",
    "content": "/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {T} value The value to query.\n * @returns {string} Returns the `Object.prototype.toString.call` result.\n */\nexport function getTag<T>(value: T) {\n  if (value == null) {\n    return value === undefined ? '[object Undefined]' : '[object Null]';\n  }\n  return Object.prototype.toString.call(value);\n}\n"
  },
  {
    "path": "src/compat/_internal/isDeepKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isDeepKey } from './isDeepKey';\n\ndescribe('isDeepKey function', () => {\n  it('returns true for deep keys', () => {\n    expect(isDeepKey('a.b')).toBe(true);\n    expect(isDeepKey('a[b]')).toBe(true);\n    expect(isDeepKey('a.b.c')).toBe(true);\n    expect(isDeepKey('a[b][c]')).toBe(true);\n  });\n\n  it('returns false for non-deep keys', () => {\n    expect(isDeepKey('a')).toBe(false);\n    expect(isDeepKey(123)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/isDeepKey.ts",
    "content": "/**\n * Checks if a given key is a deep key.\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @param {PropertyKey} key - The key to check.\n * @returns {boolean} - Returns true if the key is a deep key, otherwise false.\n *\n * Examples:\n *\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // false\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n */\nexport function isDeepKey(key: PropertyKey): boolean {\n  switch (typeof key) {\n    case 'number':\n    case 'symbol': {\n      return false;\n    }\n    case 'string': {\n      return key.includes('.') || key.includes('[') || key.includes(']');\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/_internal/isEven.ts",
    "content": "export function isEven(value: any) {\n  // eslint-disable-next-line eqeqeq\n  return value % 2 == 0;\n}\n"
  },
  {
    "path": "src/compat/_internal/isIndex.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isIndex } from './isIndex';\n\ndescribe('isIndex', () => {\n  it('should return `true` for indices', () => {\n    expect(isIndex(0)).toBe(true);\n    expect(isIndex('0')).toBe(true);\n    expect(isIndex('1')).toBe(true);\n    expect(isIndex(3)).toBe(true);\n  });\n\n  it('should return `false` for non-indexes', () => {\n    expect(isIndex('1abc')).toBe(false);\n    expect(isIndex('07')).toBe(false);\n    expect(isIndex('0001')).toBe(false);\n    expect(isIndex(-1)).toBe(false);\n    expect(isIndex(1.1)).toBe(false);\n    expect(isIndex(Number.MAX_SAFE_INTEGER)).toBe(false);\n    expect(isIndex(Symbol('a'))).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/isIndex.ts",
    "content": "const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\\d*)$/;\n\nexport function isIndex(value: PropertyKey, length = Number.MAX_SAFE_INTEGER): boolean {\n  switch (typeof value) {\n    case 'number': {\n      return Number.isInteger(value) && value >= 0 && value < length;\n    }\n    case 'symbol': {\n      return false;\n    }\n    case 'string': {\n      return IS_UNSIGNED_INTEGER.test(value);\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/_internal/isIterateeCall.ts",
    "content": "import { isIndex } from './isIndex.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { eq } from '../util/eq.ts';\n\nexport function isIterateeCall(value: unknown, index: unknown, object: unknown): boolean {\n  if (!isObject(object)) {\n    return false;\n  }\n\n  if (\n    (typeof index === 'number' && isArrayLike(object) && isIndex(index) && index < object.length) ||\n    (typeof index === 'string' && index in object)\n  ) {\n    return eq((object as any)[index], value);\n  }\n\n  return false;\n}\n"
  },
  {
    "path": "src/compat/_internal/isKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isKey } from './isKey';\n\ndescribe('isKey', () => {\n  it('should return `true` for property names', () => {\n    expect(isKey('a')).toBe(true);\n    expect(isKey(false)).toBe(true);\n    expect(isKey(1)).toBe(true);\n    expect(isKey(null)).toBe(true);\n    expect(isKey(undefined)).toBe(true);\n    expect(isKey(-1.1)).toBe(true);\n    expect(isKey(Symbol.iterator)).toBe(true);\n  });\n\n  it('should return `false` for property paths', () => {\n    expect(isKey('a.b')).toBe(false);\n    expect(isKey('a[0]')).toBe(false);\n    expect(isKey('a[\"b\"]')).toBe(false);\n    expect(isKey(\"a['b']\")).toBe(false);\n    expect(isKey('a[0].b')).toBe(false);\n    expect(isKey('a[0][\"b\"]')).toBe(false);\n    expect(isKey(\"a[0]['b']\")).toBe(false);\n  });\n\n  it('should return `true` for property paths that are in the object', () => {\n    expect(isKey('a', { a: 1 })).toBe(true);\n    expect(isKey('a.b', { 'a.b': 2 })).toBe(true);\n    expect(isKey('a[0]', { 'a[0]': 3 })).toBe(true);\n    expect(isKey('a[\"b\"]', { 'a[\"b\"]': 4 })).toBe(true);\n    expect(isKey('a[0].b', { 'a[0].b': 5 })).toBe(true);\n    expect(isKey(\"a[0]['b']\", { \"a[0]['b']\": 6 })).toBe(true);\n  });\n\n  it('should return `false` for arrays', () => {\n    expect(isKey([])).toBe(false);\n    expect(isKey([1])).toBe(false);\n    expect(isKey([1, 2])).toBe(false);\n    expect(isKey([1, 2, 3])).toBe(false);\n  });\n\n  it('should return true for empty string', () => {\n    expect(isKey('')).toBe(true);\n  });\n\n  it('should return true for non-word characters', () => {\n    expect(isKey('^')).toBe(true);\n    expect(isKey('!')).toBe(true);\n    expect(isKey('@')).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/isKey.ts",
    "content": "import { isSymbol } from '../predicate/isSymbol.ts';\n\n/**  Matches any deep property path. (e.g. `a.b[0].c`)*/\nconst regexIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\n/**  Matches any word character (alphanumeric & underscore).*/\nconst regexIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path. (It's ok that the `value` is not in the keys of the `object`)\n * @param {unknown} value The value to check.\n * @param {unknown} object The object to query.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n *\n * @example\n * isKey('a', { a: 1 });\n * // => true\n *\n * isKey('a.b', { a: { b: 2 } });\n * // => false\n */\nexport function isKey(value?: unknown, object?: unknown): value is PropertyKey {\n  if (Array.isArray(value)) {\n    return false;\n  }\n\n  if (typeof value === 'number' || typeof value === 'boolean' || value == null || isSymbol(value)) {\n    return true;\n  }\n\n  return (\n    (typeof value === 'string' && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value))) ||\n    (object != null && Object.hasOwn(object, value as PropertyKey))\n  );\n}\n"
  },
  {
    "path": "src/compat/_internal/isPrototype.ts",
    "content": "export function isPrototype(value: object) {\n  const constructor = value?.constructor;\n  const prototype = typeof constructor === 'function' ? constructor.prototype : Object.prototype;\n\n  return value === prototype;\n}\n"
  },
  {
    "path": "src/compat/_internal/mapToEntries.ts",
    "content": "export function mapToEntries(map: Map<any, any>) {\n  const arr = new Array(map.size);\n  const keys = map.keys();\n  const values = map.values();\n\n  for (let i = 0; i < arr.length; i++) {\n    arr[i] = [keys.next().value, values.next().value];\n  }\n  return arr;\n}\n"
  },
  {
    "path": "src/compat/_internal/normalizeForCase.ts",
    "content": "import { toString } from '../util/toString.ts';\n\nexport function normalizeForCase(str: unknown): string {\n  // Coerce to string\n  if (typeof str !== 'string') {\n    str = toString(str);\n  }\n\n  // Remove contraction apostrophes\n  return (str as string).replace(/['\\u2019]/g, '');\n}\n"
  },
  {
    "path": "src/compat/_internal/numberProto.ts",
    "content": "export const numberProto: any = Number.prototype;\n"
  },
  {
    "path": "src/compat/_internal/numberTag.ts",
    "content": "export const numberTag = '[object Number]';\n"
  },
  {
    "path": "src/compat/_internal/objectProto.ts",
    "content": "export const objectProto: any = Object.prototype;\n"
  },
  {
    "path": "src/compat/_internal/primitives.ts",
    "content": "export const primitives = [null, undefined, false, true, 1, NaN, 'a'];\n"
  },
  {
    "path": "src/compat/_internal/setToEntries.ts",
    "content": "export function setToEntries(set: Set<any>) {\n  const arr = new Array(set.size);\n  const values = set.values();\n\n  for (let i = 0; i < arr.length; i++) {\n    const value = values.next().value;\n    arr[i] = [value, value];\n  }\n  return arr;\n}\n"
  },
  {
    "path": "src/compat/_internal/slice.ts",
    "content": "export const slice = Array.prototype.slice;\n"
  },
  {
    "path": "src/compat/_internal/strictArgs.ts",
    "content": "export const strictArgs = (function () {\n  'use strict';\n\n  // eslint-disable-next-line prefer-rest-params\n  return arguments;\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  //@ts-expect-error\n})(1, 2, 3);\n"
  },
  {
    "path": "src/compat/_internal/stringProto.ts",
    "content": "export const stringProto: any = String.prototype;\n"
  },
  {
    "path": "src/compat/_internal/stubA.ts",
    "content": "export function stubA() {\n  return 'a';\n}\n"
  },
  {
    "path": "src/compat/_internal/stubB.ts",
    "content": "export function stubB() {\n  return 'b';\n}\n"
  },
  {
    "path": "src/compat/_internal/stubC.ts",
    "content": "export function stubC() {\n  return 'C';\n}\n"
  },
  {
    "path": "src/compat/_internal/stubFour.ts",
    "content": "export const stubFour = function () {\n  return 4;\n};\n"
  },
  {
    "path": "src/compat/_internal/stubNaN.ts",
    "content": "export function stubNaN() {\n  return NaN;\n}\n"
  },
  {
    "path": "src/compat/_internal/stubNull.ts",
    "content": "export const stubNull = function () {\n  return null;\n};\n"
  },
  {
    "path": "src/compat/_internal/stubOne.ts",
    "content": "export const stubOne = function () {\n  return 1;\n};\n"
  },
  {
    "path": "src/compat/_internal/stubThree.ts",
    "content": "export const stubThree = function () {\n  return 3;\n};\n"
  },
  {
    "path": "src/compat/_internal/stubTwo.ts",
    "content": "export const stubTwo = function () {\n  return 2;\n};\n"
  },
  {
    "path": "src/compat/_internal/stubZero.ts",
    "content": "export const stubZero = function () {\n  return 0;\n};\n"
  },
  {
    "path": "src/compat/_internal/symbol.ts",
    "content": "export const symbol = Symbol('a');\n"
  },
  {
    "path": "src/compat/_internal/tags.ts",
    "content": "export const regexpTag = '[object RegExp]';\nexport const stringTag = '[object String]';\nexport const numberTag = '[object Number]';\nexport const booleanTag = '[object Boolean]';\nexport const argumentsTag = '[object Arguments]';\nexport const symbolTag = '[object Symbol]';\nexport const dateTag = '[object Date]';\nexport const mapTag = '[object Map]';\nexport const setTag = '[object Set]';\nexport const arrayTag = '[object Array]';\nexport const functionTag = '[object Function]';\nexport const arrayBufferTag = '[object ArrayBuffer]';\nexport const objectTag = '[object Object]';\nexport const errorTag = '[object Error]';\nexport const dataViewTag = '[object DataView]';\nexport const uint8ArrayTag = '[object Uint8Array]';\nexport const uint8ClampedArrayTag = '[object Uint8ClampedArray]';\nexport const uint16ArrayTag = '[object Uint16Array]';\nexport const uint32ArrayTag = '[object Uint32Array]';\nexport const bigUint64ArrayTag = '[object BigUint64Array]';\nexport const int8ArrayTag = '[object Int8Array]';\nexport const int16ArrayTag = '[object Int16Array]';\nexport const int32ArrayTag = '[object Int32Array]';\nexport const bigInt64ArrayTag = '[object BigInt64Array]';\nexport const float32ArrayTag = '[object Float32Array]';\nexport const float64ArrayTag = '[object Float64Array]';\n"
  },
  {
    "path": "src/compat/_internal/toArgs.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toArgs } from './toArgs';\n\ndescribe('toArgs', () => {\n  it('converts an array to an arguments object', () => {\n    const result = toArgs([1, 2, 3]);\n\n    expect(result.toString()).toBe('[object Arguments]');\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    (function (..._args) {\n      // eslint-disable-next-line prefer-rest-params\n      expect(arguments).toEqual(result);\n    })(1, 2, 3);\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/toArgs.ts",
    "content": "/**\n * Converts an array to an `arguments` object.\n *\n * @param {unknown[]} array - The array to convert.\n * @returns {IArguments} - The `arguments` object.\n *\n * @example\n * toArgs([1, 2, 3]); // { '0': 1, '1': 2, '2': 3 } as IArguments\n */\nexport function toArgs(array: unknown[]): IArguments {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  return (function (..._: unknown[]) {\n    // eslint-disable-next-line prefer-rest-params\n    return arguments;\n  })(...array);\n}\n"
  },
  {
    "path": "src/compat/_internal/toArray.ts",
    "content": "export function toArray<T>(value: ArrayLike<T>): T[] {\n  return Array.isArray(value) ? value : Array.from(value);\n}\n"
  },
  {
    "path": "src/compat/_internal/toKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toKey } from './toKey';\n\ndescribe('toKey', () => {\n  it(\"converts 0 to '0'\", () => {\n    expect(toKey(0)).toBe('0');\n  });\n\n  it(\"converts -0 to '-0'\", () => {\n    expect(toKey(-0)).toBe('-0');\n  });\n});\n"
  },
  {
    "path": "src/compat/_internal/toKey.ts",
    "content": "/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nexport function toKey(value: any) {\n  if (typeof value === 'string' || typeof value === 'symbol') {\n    return value;\n  }\n  if (Object.is(value?.valueOf?.(), -0)) {\n    return '-0';\n  }\n  return String(value);\n}\n"
  },
  {
    "path": "src/compat/_internal/typedArrays.ts",
    "content": "export const typedArrays = [\n  'Float32Array',\n  'Float64Array',\n  'Int8Array',\n  'Int16Array',\n  'Int32Array',\n  'Uint8Array',\n  'Uint8ClampedArray',\n  'Uint16Array',\n  'Uint32Array',\n];\n"
  },
  {
    "path": "src/compat/_internal/weakMap.ts",
    "content": "export const weakMap = new WeakMap();\n"
  },
  {
    "path": "src/compat/_internal/weakSet.ts",
    "content": "export const weakSet = new WeakSet();\n"
  },
  {
    "path": "src/compat/_internal/whitespace.ts",
    "content": "export const whitespace = [\n  ' ',\n  '\\t',\n  '\\x0b',\n  '\\f',\n  '\\xa0',\n  '\\ufeff',\n  '\\n',\n  '\\r',\n  '\\u2028',\n  '\\u2029',\n  '\\u1680',\n  '\\u180e',\n  '\\u2000',\n  '\\u2001',\n  '\\u2002',\n  '\\u2003',\n  '\\u2004',\n  '\\u2005',\n  '\\u2006',\n  '\\u2007',\n  '\\u2008',\n  '\\u2009',\n  '\\u200a',\n  '\\u202f',\n  '\\u205f',\n  '\\u3000',\n]\n  .filter(chr => /\\s/.exec(chr))\n  .join('');\n"
  },
  {
    "path": "src/compat/array/castArray.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { castArray as castArrayLodash } from 'lodash';\nimport { castArray } from './castArray';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/castArray.spec.js#L1\n */\ndescribe('castArray', () => {\n  it('should wrap non-array items in an array', () => {\n    const falsey = [false, null, undefined, 0, NaN, ''];\n    const values = [...falsey, true, 1, 'a', { a: 1 }];\n    const expected = values.map(value => [value]);\n    const actual = values.map(value => castArray(value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return array values by reference', () => {\n    const array = [1];\n    expect(castArray(array)).toBe(array);\n  });\n\n  it('should return an empty array when no arguments are given', () => {\n    expect(castArray()).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(castArray).toEqualTypeOf<typeof castArrayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/castArray.ts",
    "content": "/**\n * Casts value as an array if it's not one.\n *\n * @template T The type of elements in the array.\n * @param {T | T[]} value The value to be cast to an array.\n * @returns {T[]} An array containing the input value if it wasn't an array, or the original array if it was.\n *\n * @example\n * const arr1 = castArray(1);\n * // Returns: [1]\n *\n * const arr2 = castArray([1]);\n * // Returns: [1]\n *\n * const arr3 = castArray({'a': 1});\n * // Returns: [{'a': 1}]\n *\n * const arr4 = castArray(null);\n * // Returns: [null]\n *\n * const arr5 = castArray(undefined);\n * // Returns: [undefined]\n *\n * const arr6 = castArray();\n * // Returns: []\n */\n\nexport function castArray<T>(value?: T | readonly T[]): T[] {\n  if (arguments.length === 0) {\n    return [];\n  }\n\n  return Array.isArray(value) ? value : ([value] as T[]);\n}\n"
  },
  {
    "path": "src/compat/array/chunk.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { chunk as chunkLodash } from 'lodash';\nimport { chunk } from './chunk.ts';\nimport { args } from '../_internal/args.ts';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/chunk.spec.js#L1\n */\ndescribe('chunk', () => {\n  const array = [0, 1, 2, 3, 4, 5];\n\n  it('should return chunked arrays', () => {\n    const actual = chunk(array, 3);\n    expect(actual).toEqual([\n      [0, 1, 2],\n      [3, 4, 5],\n    ]);\n  });\n\n  it('should return the last chunk as remaining elements', () => {\n    const actual = chunk(array, 4);\n    expect(actual).toEqual([\n      [0, 1, 2, 3],\n      [4, 5],\n    ]);\n  });\n\n  it('has default size of 1', () => {\n    const actual = chunk(array);\n    expect(actual).toEqual([[0], [1], [2], [3], [4], [5]]);\n  });\n\n  it('should ensure the minimum `size` is `0`', () => {\n    expect(chunk([1, 2, 3], -1)).toEqual([]);\n    expect(chunk([1, 2, 3], -2)).toEqual([]);\n    expect(chunk([1, 2, 3], -Infinity)).toEqual([]);\n  });\n\n  it('should coerce `size` to an integer', () => {\n    expect(chunk(array, array.length / 4)).toEqual([[0], [1], [2], [3], [4], [5]]);\n  });\n\n  /** We intentionally do not support cases like chunk([1, 2, 3], false) */\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(chunk(null, 2)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(chunk(1, 2)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(chunk(true, 2)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(chunk({ 0: 1, 1: 2, 2: 3, length: 3 }, 2)).toEqual([[1, 2], [3]]);\n    expect(chunk('123', 2)).toEqual([['1', '2'], ['3']]);\n    expect(chunk(args, 2)).toEqual([[1, 2], [3]]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(chunk).toEqualTypeOf<typeof chunkLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/chunk.ts",
    "content": "import { chunk as chunkToolkit } from '../../array/chunk.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Splits an array into smaller arrays of a specified length.\n *\n * This function takes an input array and divides it into multiple smaller arrays,\n * each of a specified length. If the input array cannot be evenly divided,\n * the final sub-array will contain the remaining elements.\n *\n * @template T The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array to be chunked into smaller arrays.\n * @param {number} size - The size of each smaller array. Must be a positive integer.\n * @returns {T[][]} A two-dimensional array where each sub-array has a maximum length of `size`.\n *\n * @example\n * // Splits an array of numbers into sub-arrays of length 2\n * chunk([1, 2, 3, 4, 5], 2);\n * // Returns: [[1, 2], [3, 4], [5]]\n *\n * @example\n * // Splits an array of strings into sub-arrays of length 3\n * chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3);\n * // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]\n */\nexport function chunk<T>(arr: ArrayLike<T> | null | undefined, size = 1): T[][] {\n  size = Math.max(Math.floor(size), 0);\n\n  if (size === 0 || !isArrayLike(arr)) {\n    return [];\n  }\n\n  return chunkToolkit(toArray(arr), size);\n}\n"
  },
  {
    "path": "src/compat/array/compact.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { compact as compactLodash } from 'lodash';\nimport { compact } from './compact';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/compact.spec.js#L1\n */\ndescribe('compact', () => {\n  it('should filter falsey values', () => {\n    const array = ['0', '1', '2'];\n    expect(compact(falsey.concat(array))).toEqual(array);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(compact(null)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(compact(1)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(compact(true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(compact({ 0: 1, 1: null, 2: 3, length: 3 })).toEqual([1, 3]);\n    expect(compact('123')).toEqual(['1', '2', '3']);\n    expect(compact(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(compact).toEqualTypeOf<typeof compactLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/compact.ts",
    "content": "import { compact as compactToolkit } from '../../array/compact.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\ntype Falsey = false | null | 0 | 0n | '' | undefined;\n\n/**\n * Removes falsey values (false, null, 0, 0n, '', undefined, NaN) from an array.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T | Falsey> | null | undefined} arr - The input array to remove falsey values.\n * @returns {Array<Exclude<T, false | null | 0 | 0n | '' | undefined>>} - A new array with all falsey values removed.\n *\n * @example\n * compact([0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n * Returns: [1, 2, 3, 4, 5]\n */\nexport function compact<T>(arr: ArrayLike<T | Falsey> | null | undefined): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n\n  return compactToolkit(Array.from(arr));\n}\n"
  },
  {
    "path": "src/compat/array/concat.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { concat as concatLodash } from 'lodash';\nimport { concat } from './concat';\n\ndescribe('concat', () => {\n  it('should shallow clone `array`', () => {\n    const array = [1, 2, 3];\n    const actual = concat(array);\n\n    expect(actual).toEqual(array);\n    expect(actual === array).toBe(false);\n  });\n\n  it('should concat arrays and values', () => {\n    const array = [1];\n    const actual = concat<unknown>(array, 2, [3], [[4]]);\n\n    expect(actual).toEqual([1, 2, 3, [4]]);\n    expect(array).toEqual([1]);\n  });\n\n  it('should cast non-array `array` values to arrays', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, false, true, 1, NaN, 'a'];\n\n    let expected: unknown[] = values.map((value, index) => (index ? [value] : []));\n\n    let actual: unknown[] = values.map((value, index) => (index ? concat(value) : concat()));\n\n    expect(actual).toEqual(expected);\n\n    expected = values.map(value => [value, 2, [3]]);\n\n    actual = values.map(value => concat<unknown>(value, [2], [[3]]));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const expected = [];\n    const actual = concat(Array(1), Array(1));\n\n    expected.push(undefined, undefined);\n\n    expect('0' in actual).toBeTruthy();\n    expect('1' in actual).toBeTruthy();\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return a new wrapped array', () => {\n    const array = [1];\n    const actual = concat(array, [2, 3]);\n\n    expect(array).toEqual([1]);\n    expect(actual).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(concat).toEqualTypeOf<typeof concatLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/concat.ts",
    "content": "import { flatten } from '../../array/flatten.ts';\n\n/**\n * Concatenates multiple arrays and values into a single array.\n *\n * @template T The type of elements in the array.\n * @param {...(T | T[])} values - The values and/or arrays to concatenate.\n * @returns {T[]} A new array containing all the input values.\n *\n * @example\n * // Concatenate individual values\n * concat(1, 2, 3);\n * // returns [1, 2, 3]\n *\n * @example\n * // Concatenate arrays of values\n * concat([1, 2], [3, 4]);\n * // returns [1, 2, 3, 4]\n *\n * @example\n * // Concatenate a mix of individual values and arrays\n * concat(1, [2, 3], 4);\n * // returns [1, 2, 3, 4]\n *\n * @example\n * // Concatenate nested arrays\n * concat([1, [2, 3]], 4);\n * // returns [1, [2, 3], 4]\n */\nexport function concat<T>(...values: Array<T | readonly T[]>): T[] {\n  return flatten(values) as T[];\n}\n"
  },
  {
    "path": "src/compat/array/countBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { countBy as countByLodash } from 'lodash';\nimport { countBy } from './countBy';\n\ndescribe('countBy', () => {\n  const array = [6.1, 4.2, 6.3];\n\n  it('should transform keys by `iteratee`', () => {\n    const actual = countBy(array, Math.floor);\n    expect(actual).toEqual({ 4: 1, 6: 2 });\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const array = [4, 6, 6];\n    const values = [, null, undefined]; // eslint-disable-line no-sparse-arrays\n    const expected = values.map(() => ({ 4: 1, 6: 2 }));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? countBy(array, value) : countBy(array)));\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const actual = countBy(['one', 'two', 'three'], 'length');\n    expect(actual).toEqual({ 3: 2, 5: 1 });\n  });\n\n  it('should only add values to own, not inherited, properties', () => {\n    const actual = countBy(array, n => (Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor'));\n\n    expect(actual.constructor).toEqual(1);\n    expect(actual.hasOwnProperty).toEqual(2);\n  });\n\n  it('should work with a number for `iteratee`', () => {\n    const array = [\n      [1, 'a'],\n      [2, 'a'],\n      [2, 'b'],\n    ];\n\n    expect(countBy(array, 0)).toEqual({ 1: 1, 2: 2 });\n    expect(countBy(array, 1)).toEqual({ a: 2, b: 1 });\n  });\n\n  it('should work with an object for `collection`', () => {\n    const actual = countBy({ a: 6.1, b: 4.2, c: 6.3 }, Math.floor);\n    expect(actual).toEqual({ 4: 1, 6: 2 });\n  });\n\n  it('should return empty object when collection is nullish', () => {\n    expect(countBy(null)).toEqual({});\n    expect(countBy(undefined)).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(countBy).toEqualTypeOf<typeof countByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/countBy.ts",
    "content": "import { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through\n * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The\n * iteratee is invoked with one argument: (value).\n *\n * @param collection The collection to iterate over.\n * @param iteratee The function invoked per iteration.\n * @return Returns the composed aggregate object.\n *\n * @example\n * countBy([6.1, 4.2, 6.3], Math.floor); // => { '4': 1, '6': 2 }\n * countBy(['one', 'two', 'three'], 'length'); // => { '3': 2, '5': 1 }\n */\nexport function countBy<T>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): Record<string, number>;\n\nexport function countBy<T extends object>(\n  collection: T | null | undefined,\n  iteratee?: ValueIteratee<T[keyof T]>\n): Record<string, number>;\n\nexport function countBy(collection: any, iteratee?: any): Record<string, number> {\n  if (collection == null) {\n    return {} as Record<string, number>;\n  }\n\n  const array = isArrayLike(collection) ? Array.from(collection) : Object.values(collection);\n  const mapper = iterateeToolkit(iteratee ?? undefined) as (value: any) => any;\n\n  const result = Object.create(null) as Record<string, number>;\n\n  for (let i = 0; i < array.length; i++) {\n    const item = array[i];\n    const key = mapper(item);\n    result[key] = (result[key] ?? 0) + 1;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/difference.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { difference as differenceLodash } from 'lodash';\nimport { difference } from './difference';\nimport { range } from '../../math/range';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/difference-methods.spec.js#L1\n */\ndescribe('difference', () => {\n  it(`should return the difference of two arrays`, () => {\n    const actual = difference([2, 1], [2, 3]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return the difference of multiple arrays`, () => {\n    const actual = difference([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should treat \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => difference(array, [value]));\n\n    expect(actual).toEqual([[], []]);\n\n    expect(difference([-0, 1], [1])).toEqual([-0]);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    expect(difference([1, NaN, 3], [NaN, 5, NaN])).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays`, () => {\n    const array1: unknown[] = range(LARGE_ARRAY_SIZE + 1);\n    const array2: unknown[] = range(LARGE_ARRAY_SIZE);\n\n    const a = {};\n    const b = {};\n    const c = {};\n\n    array1.push(a, b, c);\n    array2.push(b, c, a);\n\n    expect(difference(array1, array2)).toEqual([LARGE_ARRAY_SIZE]);\n  });\n\n  it(`should work with large arrays of \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => {\n      const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => value);\n\n      return difference(array, largeArray);\n    });\n\n    expect(actual).toEqual([[], []]);\n\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => 1);\n    expect(difference([-0, 1], largeArray)).toEqual([-0]);\n  });\n\n  it(`should work with large arrays of \\`NaN\\``, () => {\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => NaN);\n    expect(difference([1, NaN, 3], largeArray)).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays of objects`, () => {\n    const object1 = {};\n    const object2 = {};\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => ({}));\n\n    expect(difference([object1, object2], largeArray)).toEqual([object1, object2]);\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    const array = [0, 1, null, 3];\n\n    expect(difference(array, args)).toEqual([0, null]);\n    expect(difference(args, array)).toEqual([2]);\n  });\n\n  it('should work with arrayLike objects', () => {\n    const array = { 0: 1, 1: 2, length: 2 };\n\n    expect(difference(array, [2, 3])).toEqual([1]);\n    expect(difference([1, 2, 3], array)).toEqual([3]);\n  });\n\n  it('should return an empty array when the first array is not array-like object', () => {\n    expect(difference('23', ['2', '3'])).toEqual([]);\n  });\n\n  it('should filter out values that are not arrays or array-like objects', () => {\n    expect(difference(['2', '3'], '2', ['3'])).toEqual(['2']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(difference).toEqualTypeOf<typeof differenceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/difference.ts",
    "content": "import { difference as differenceToolkit } from '../../array/difference.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Computes the difference between an array and multiple arrays.\n *\n * @template T\n * @param {ArrayLike<T> | undefined | null} arr - The primary array from which to derive the difference. This is the main array\n * from which elements will be compared and filtered.\n * @param {Array<ArrayLike<T>>} values - Multiple arrays containing elements to be excluded from the primary array.\n * These arrays will be flattened into a single array, and each element in this array will be checked against the primary array.\n * If a match is found, that element will be excluded from the result.\n * @returns {T[]} A new array containing the elements that are present in the primary array but not\n * in the flattened array.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [2, 4];\n * const array3 = [5, 6];\n * const result = difference(array1, array2, array3);\n * // result will be [1, 3] since 2, 4, and 5 are in the other arrays and are excluded from the result.\n *\n * @example\n * const arrayLike1 = { 0: 1, 1: 2, 2: 3, length: 3 };\n * const arrayLike2 = { 0: 2, 1: 4, length: 2 };\n * const result = difference(arrayLike1, arrayLike2);\n * // result will be [1, 3] since 2 is in both array-like objects and is excluded from the result.\n */\nexport function difference<T>(arr: ArrayLike<T> | undefined | null, ...values: Array<ArrayLike<T>>): T[] {\n  if (!isArrayLikeObject(arr)) {\n    return [];\n  }\n\n  const arr1 = toArray(arr);\n  const arr2 = [];\n\n  for (let i = 0; i < values.length; i++) {\n    const value = values[i];\n    if (isArrayLikeObject(value)) {\n      arr2.push(...Array.from(value));\n    }\n  }\n\n  return differenceToolkit(arr1, arr2);\n}\n"
  },
  {
    "path": "src/compat/array/differenceBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { differenceBy as differenceByLodash } from 'lodash';\nimport { differenceBy } from './differenceBy';\nimport { range } from '../../math';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { slice } from '../_internal/slice';\n\ndescribe('differenceBy', () => {\n  it('should accept an `iteratee`', () => {\n    let actual: any = differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n    expect(actual).toEqual([1.2]);\n\n    actual = differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], 'x');\n    expect(actual).toEqual([{ x: 2 }]);\n  });\n\n  it('should provide correct iteratee arguments', () => {\n    let args: any;\n\n    differenceBy([2.1, 1.2], [2.3, 3.4], function (...rest: any[]) {\n      if (!args) {\n        args = slice.call(rest);\n      }\n    });\n\n    expect(args).toEqual([2.3]);\n  });\n\n  it('should calculate the difference if iteratee is not provided', () => {\n    const actual = differenceBy([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([1]);\n  });\n\n  /**\n   * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/difference-methods.spec.js#L1\n   */\n\n  it(`should return the difference of two arrays`, () => {\n    const actual = differenceBy([2, 1], [2, 3]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return the difference of multiple arrays`, () => {\n    const actual = differenceBy([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should treat \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => differenceBy(array, [value]));\n\n    expect(actual).toEqual([[], []]);\n\n    expect(differenceBy([-0, 1], [1])).toEqual([-0]);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    expect(differenceBy([1, NaN, 3], [NaN, 5, NaN])).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays`, () => {\n    const array1: unknown[] = range(LARGE_ARRAY_SIZE + 1);\n    const array2: unknown[] = range(LARGE_ARRAY_SIZE);\n\n    const a = {};\n    const b = {};\n    const c = {};\n\n    array1.push(a, b, c);\n    array2.push(b, c, a);\n\n    expect(differenceBy(array1, array2)).toEqual([LARGE_ARRAY_SIZE]);\n  });\n\n  it(`should work with large arrays of \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => {\n      const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => value);\n\n      return differenceBy(array, largeArray);\n    });\n\n    expect(actual).toEqual([[], []]);\n\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => 1);\n    expect(differenceBy([-0, 1], largeArray)).toEqual([-0]);\n  });\n\n  it(`should work with large arrays of \\`NaN\\``, () => {\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => NaN);\n    expect(differenceBy([1, NaN, 3], largeArray)).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays of objects`, () => {\n    const object1 = {};\n    const object2 = {};\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }).map(() => ({}));\n\n    expect(differenceBy([object1, object2], largeArray)).toEqual([object1, object2]);\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    const array = [0, 1, null, 3];\n\n    expect(differenceBy(array, args)).toEqual([0, null]);\n    expect(differenceBy(args, array)).toEqual([2]);\n  });\n\n  it('should work with arrayLike objects', () => {\n    const array = { 0: 1, 1: 2, length: 2 };\n\n    expect(differenceBy(array, [2, 3])).toEqual([1]);\n    expect(differenceBy([1, 2, 3], array)).toEqual([3]);\n    expect(differenceBy([1, 2, 3], array, value => value)).toEqual([3]);\n  });\n\n  it('should return an empty array when the first array is not array-like object', () => {\n    expect(differenceBy('23', ['2', '3'])).toEqual([]);\n  });\n\n  it('should filter out values that are not arrays or array-like objects', () => {\n    expect(differenceBy(['2', '3'], '2', ['3'])).toEqual(['2']);\n    expect(differenceBy(['2', '3'], '2', ['3'], value => value)).toEqual(['2']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(differenceBy).toEqualTypeOf<typeof differenceByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/differenceBy.ts",
    "content": "import { last } from './last.ts';\nimport { difference as differenceToolkit } from '../../array/difference.ts';\nimport { differenceBy as differenceByToolkit } from '../../array/differenceBy.ts';\nimport { flattenArrayLike } from '../_internal/flattenArrayLike.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values The values to exclude\n * @param {ValueIteratee<T1 | T2>} iteratee The iteratee invoked per element\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)\n * // => [1.2]\n */\nexport function differenceBy<T1, T2>(\n  array: ArrayLike<T1> | null | undefined,\n  values: ArrayLike<T2>,\n  iteratee: ValueIteratee<T1 | T2>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2, T3\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values1 The first array of values to exclude\n * @param {ArrayLike<T3>} values2 The second array of values to exclude\n * @param {ValueIteratee<T1 | T2 | T3>} iteratee The iteratee invoked per element\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2], [2.3], [1.4], Math.floor)\n * // => []\n */\nexport function differenceBy<T1, T2, T3>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  iteratee: ValueIteratee<T1 | T2 | T3>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2, T3, T4\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values1 The first array of values to exclude\n * @param {ArrayLike<T3>} values2 The second array of values to exclude\n * @param {ArrayLike<T4>} values3 The third array of values to exclude\n * @param {ValueIteratee<T1 | T2 | T3 | T4>} iteratee The iteratee invoked per element\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2, 3.5], [2.3], [1.4], [3.2], Math.floor)\n * // => []\n */\nexport function differenceBy<T1, T2, T3, T4>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  values3: ArrayLike<T4>,\n  iteratee: ValueIteratee<T1 | T2 | T3 | T4>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2, T3, T4, T5\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values1 The first array of values to exclude\n * @param {ArrayLike<T3>} values2 The second array of values to exclude\n * @param {ArrayLike<T4>} values3 The third array of values to exclude\n * @param {ArrayLike<T5>} values4 The fourth array of values to exclude\n * @param {ValueIteratee<T1 | T2 | T3 | T4 | T5>} iteratee The iteratee invoked per element\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2, 3.5, 4.8], [2.3], [1.4], [3.2], [4.1], Math.floor)\n * // => []\n */\nexport function differenceBy<T1, T2, T3, T4, T5>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  values3: ArrayLike<T4>,\n  values4: ArrayLike<T5>,\n  iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2, T3, T4, T5, T6\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values1 The first array of values to exclude\n * @param {ArrayLike<T3>} values2 The second array of values to exclude\n * @param {ArrayLike<T4>} values3 The third array of values to exclude\n * @param {ArrayLike<T5>} values4 The fourth array of values to exclude\n * @param {ArrayLike<T6>} values5 The fifth array of values to exclude\n * @param {ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>} iteratee The iteratee invoked per element\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2, 3.5, 4.8, 5.3], [2.3], [1.4], [3.2], [4.1], [5.8], Math.floor)\n * // => []\n */\nexport function differenceBy<T1, T2, T3, T4, T5, T6>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  values3: ArrayLike<T4>,\n  values4: ArrayLike<T5>,\n  values5: ArrayLike<T6>,\n  iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays using an iteratee function.\n *\n * @template T1, T2, T3, T4, T5, T6, T7\n * @param {ArrayLike<T1> | null | undefined} array The array to inspect\n * @param {ArrayLike<T2>} values1 The first array of values to exclude\n * @param {ArrayLike<T3>} values2 The second array of values to exclude\n * @param {ArrayLike<T4>} values3 The third array of values to exclude\n * @param {ArrayLike<T5>} values4 The fourth array of values to exclude\n * @param {ArrayLike<T6>} values5 The fifth array of values to exclude\n * @param {...(ArrayLike<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>)[]} values Additional arrays of values to exclude and iteratee\n * @returns {T1[]} Returns the new array of filtered values\n * @example\n * differenceBy([2.1, 1.2, 3.5, 4.8, 5.3, 6.7], [2.3], [1.4], [3.2], [4.1], [5.8], [6.2], Math.floor)\n * // => []\n */\nexport function differenceBy<T1, T2, T3, T4, T5, T6, T7>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  values3: ArrayLike<T4>,\n  values4: ArrayLike<T5>,\n  values5: ArrayLike<T6>,\n  ...values: Array<ArrayLike<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>>\n): T1[];\n\n/**\n * Creates an array of array values not included in the other given arrays.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array The array to inspect\n * @param {...Array<ArrayLike<T>>} values The arrays of values to exclude\n * @returns {T[]} Returns the new array of filtered values\n * @example\n * differenceBy([2, 1], [2, 3])\n * // => [1]\n */\nexport function differenceBy<T>(array: ArrayLike<T> | null | undefined, ...values: Array<ArrayLike<T>>): T[];\n\n/**\n * Computes the difference between an array and multiple arrays using an iteratee function.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arr - The primary array from which to derive the difference.\n * @param {...any[]} values - Multiple arrays containing elements to be excluded from the primary array.\n * @returns {T[]} A new array containing the elements that are present in the primary array but not in the values arrays.\n */\nexport function differenceBy<T>(arr: ArrayLike<T> | null | undefined, ..._values: any[]): T[] {\n  if (!isArrayLikeObject(arr)) {\n    return [];\n  }\n\n  const iteratee = last(_values);\n  const values = flattenArrayLike<T>(_values);\n\n  if (isArrayLikeObject(iteratee)) {\n    return differenceToolkit(Array.from(arr), values);\n  }\n\n  return differenceByToolkit(Array.from(arr), values, createIteratee(iteratee));\n}\n"
  },
  {
    "path": "src/compat/array/differenceWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { differenceWith as differenceWithLodash } from 'lodash';\nimport { differenceWith } from './differenceWith';\nimport { range } from '../../math';\nimport { isEqual } from '../../predicate';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { stubNaN } from '../_internal/stubNaN';\nimport { stubOne } from '../_internal/stubOne';\nimport { constant } from '../util/constant';\nimport { eq } from '../util/eq';\nimport { times } from '../util/times';\nimport { toString } from '../util/toString';\n\ndescribe('differenceWith', () => {\n  /**\n   * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/difference-methods.spec.js#L1\n   */\n  it(`should return the difference of two arrays`, () => {\n    const actual = differenceWith([2, 1], [2, 3]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return the difference of multiple arrays`, () => {\n    const actual = differenceWith([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should treat \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => differenceWith(array, [value]));\n\n    expect(actual).toEqual([[], []]);\n\n    expect(differenceWith([-0, 1], [1])).toEqual([-0]);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    expect(differenceWith([1, NaN, 3], [NaN, 5, NaN])).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays`, () => {\n    const array1: unknown[] = range(LARGE_ARRAY_SIZE + 1);\n    const array2: unknown[] = range(LARGE_ARRAY_SIZE);\n    const a = {};\n    const b = {};\n    const c = {};\n\n    array1.push(a, b, c);\n    array2.push(b, c, a);\n\n    expect(differenceWith(array1, array2)).toEqual([LARGE_ARRAY_SIZE]);\n  });\n\n  it(`should work with large arrays of \\`-0\\` as \\`0\\``, () => {\n    const array = [-0, 0];\n\n    const actual = array.map(value => {\n      const largeArray = times(LARGE_ARRAY_SIZE, constant(value));\n\n      return differenceWith(array, largeArray);\n    });\n\n    expect(actual).toEqual([[], []]);\n\n    const largeArray = times(LARGE_ARRAY_SIZE, stubOne);\n    expect(differenceWith([-0, 1], largeArray)).toEqual([-0]);\n  });\n\n  it(`should work with large arrays of \\`NaN\\``, () => {\n    const largeArray = times(LARGE_ARRAY_SIZE, stubNaN);\n    expect(differenceWith([1, NaN, 3], largeArray)).toEqual([1, 3]);\n  });\n\n  it(`should work with large arrays of objects`, () => {\n    const object1 = {};\n    const object2 = {};\n    const largeArray = times(LARGE_ARRAY_SIZE, constant(object1));\n\n    expect(differenceWith([object1, object2], largeArray)).toEqual([object2]);\n  });\n\n  it(`should ignore values that are not array-like`, () => {\n    const array = [1, null, 3];\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(differenceWith(args, 3, { 0: 1 })).toEqual([1, 2, 3]);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(differenceWith(null, array, 1)).toEqual([]);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(differenceWith(array, args, null)).toEqual([null]);\n  });\n\n  /**\n   * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/differenceWith.spec.js#L1\n   */\n\n  it('should work with a `comparator`', () => {\n    const objects = [\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n    ];\n    const actual = differenceWith(objects, [{ x: 1, y: 2 }], isEqual);\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const array = [-0, 1];\n    const largeArray = times(LARGE_ARRAY_SIZE, stubOne);\n    const others = [[1], largeArray];\n    const expected = others.map(constant(['-0']));\n\n    const actual = others.map(other => differenceWith(array, other, eq).map(toString));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(differenceWith).toEqualTypeOf<typeof differenceWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/differenceWith.ts",
    "content": "import { last } from './last.ts';\nimport { difference as differenceToolkit } from '../../array/difference.ts';\nimport { differenceWith as differenceWithToolkit } from '../../array/differenceWith.ts';\nimport { flattenArrayLike } from '../_internal/flattenArrayLike.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Computes the difference between the primary array and another array using a comparator function.\n *\n * @template T1, T2\n * @param {ArrayLike<T1> | null | undefined} array - The primary array to compare elements against.\n * @param {ArrayLike<T2>} values - The array containing elements to compare with the primary array.\n * @param {(a: T1, b: T2) => boolean} comparator - A function to determine if two elements are considered equal.\n * @returns {T1[]} A new array containing the elements from the primary array that do not match any elements in `values` based on the comparator.\n *\n * @example\n * const array = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const values = [{ id: 2 }];\n * const comparator = (a, b) => a.id === b.id;\n *\n * const result = differenceWith(array, values, comparator);\n * // result will be [{ id: 1 }, { id: 3 }]\n */\nexport function differenceWith<T1, T2>(\n  array: ArrayLike<T1> | null | undefined,\n  values: ArrayLike<T2>,\n  comparator: (a: T1, b: T2) => boolean\n): T1[];\n\n/**\n * Computes the difference between the primary array and two arrays using a comparator function.\n *\n * @template T1, T2, T3\n * @param {ArrayLike<T1> | null | undefined} array - The primary array to compare elements against.\n * @param {ArrayLike<T2>} values1 - The first array containing elements to compare with the primary array.\n * @param {ArrayLike<T3>} values2 - The second array containing elements to compare with the primary array.\n * @param {(a: T1, b: T2 | T3) => boolean} comparator - A function to determine if two elements are considered equal.\n * @returns {T1[]} A new array containing the elements from the primary array that do not match any elements in `values1` or `values2` based on the comparator.\n *\n * @example\n * const array = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const values1 = [{ id: 2 }];\n * const values2 = [{ id: 3 }];\n * const comparator = (a, b) => a.id === b.id;\n *\n * const result = differenceWith(array, values1, values2, comparator);\n * // result will be [{ id: 1 }]\n */\nexport function differenceWith<T1, T2, T3>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  comparator: (a: T1, b: T2 | T3) => boolean\n): T1[];\n\n/**\n * Computes the difference between the primary array and multiple arrays using a comparator function.\n *\n * @template T1, T2, T3, T4\n * @param {ArrayLike<T1> | null | undefined} array - The primary array to compare elements against.\n * @param {ArrayLike<T2>} values1 - The first array containing elements to compare with the primary array.\n * @param {ArrayLike<T3>} values2 - The second array containing elements to compare with the primary array.\n * @param {...Array<ArrayLike<T4> | ((a: T1, b: T2 | T3 | T4) => boolean)>} values - Additional arrays and an optional comparator function to determine if two elements are considered equal.\n * @returns {T1[]} A new array containing the elements from the primary array that do not match any elements\n * in `values1`, `values2`, or subsequent arrays. If a comparator function is provided, it will be used to compare elements;\n * otherwise, [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero) algorithm will be used.\n *\n * @example\n * // Example with comparator function\n * const array = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];\n * const values1 = [{ id: 2 }];\n * const values2 = [{ id: 3 }];\n * const values3 = [{ id: 4 }];\n * const comparator = (a, b) => a.id === b.id;\n *\n * const result = differenceWith(array, values1, values2, values3, comparator);\n * // result will be [{ id: 1 }]\n *\n * @example\n * // Example without comparator function (behaves like `difference`)\n * const array = [1, 2, 3, 4];\n * const values1 = [2];\n * const values2 = [3];\n * const values3 = [4];\n *\n * const result = differenceWith(array, values1, values2, values3);\n * // result will be [1]\n */\nexport function differenceWith<T1, T2, T3, T4>(\n  array: ArrayLike<T1> | null | undefined,\n  values1: ArrayLike<T2>,\n  values2: ArrayLike<T3>,\n  ...values: Array<ArrayLike<T4> | ((a: T1, b: T2 | T3 | T4) => boolean)>\n): T1[];\n\n/**\n * Computes the difference between the primary array and one or more arrays without using a comparator function.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The primary array to compare elements against.\n * @param {...Array<ArrayLike<T>>} values - One or more arrays containing elements to compare with the primary array.\n * @returns {T[]} A new array containing the elements from the primary array that do not match any elements in the provided arrays.\n *\n * @example\n * const array = [1, 2, 3];\n * const values1 = [2];\n * const values2 = [3];\n *\n * const result = differenceWith(array, values1, values2);\n * // result will be [1]\n */\nexport function differenceWith<T>(array: ArrayLike<T> | null | undefined, ...values: Array<ArrayLike<T>>): T[];\n\n/**\n * Computes the difference between the primary array and one or more arrays using an optional comparator function.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The primary array to compare elements against.\n * @param {...Array<ArrayLike<unknown> | ((a: unknown, b: unknown) => boolean)>} values - One or more arrays to compare with the primary array, and an optional comparator function to determine if two elements are considered equal.\n * @returns {T[]} A new array containing the elements from the primary array that do not match any elements in the provided arrays or those compared using the comparator function.\n *\n * @example\n * // Example with a comparator function\n * const array = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const values1 = [{ id: 2 }];\n * const values2 = [{ id: 3 }];\n * const comparator = (a, b) => a.id === b.id;\n *\n * const result = differenceWith(array, values1, values2, comparator);\n * // result will be [{ id: 1 }]\n *\n * @example\n * // Example without a comparator function\n * const array = [1, 2, 3];\n * const values1 = [2];\n * const values2 = [3];\n *\n * const result = differenceWith(array, values1, values2);\n * // result will be [1]\n */\nexport function differenceWith<T>(\n  array: ArrayLike<T> | null | undefined,\n  ...values: Array<ArrayLike<unknown> | ((a: unknown, b: unknown) => boolean)>\n): T[] {\n  if (!isArrayLikeObject(array)) {\n    return [];\n  }\n\n  const comparator = last(values);\n  const flattenedValues = flattenArrayLike(values as Array<ArrayLike<T>>);\n\n  if (typeof comparator === 'function') {\n    return differenceWithToolkit(Array.from(array), flattenedValues, comparator);\n  }\n\n  return differenceToolkit(Array.from(array), flattenedValues);\n}\n"
  },
  {
    "path": "src/compat/array/drop.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { drop as dropLodash } from 'lodash';\nimport { drop } from './drop';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/drop.spec.js#L1\n */\ndescribe('drop', () => {\n  const array = [1, 2, 3];\n\n  it('should drop the first two elements', () => {\n    expect(drop(array, 2)).toEqual([3]);\n  });\n\n  it('should return all elements when `n` < `1`', () => {\n    [0, -1, -Infinity].forEach(n => {\n      expect(drop(array, n)).toEqual(array);\n    });\n  });\n\n  it('should return an empty array when `n` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(n => {\n      expect(drop(array, n)).toEqual([]);\n    });\n  });\n\n  it('should coerce `n` to an integer', () => {\n    expect(drop(array, 1.6)).toEqual([2, 3]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(drop(null, 2)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(drop(1, 2)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(drop(true, 2)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(drop({ 0: 1, 1: 2, length: 2 }, 1)).toEqual([2]);\n    expect(drop('123', 2)).toEqual(['3']);\n    expect(drop(args, 1)).toEqual([2, 3]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect([[1, 2], [3, 4], [5]].map(drop)).toEqual([[2], [4], []]);\n  });\n\n  it('should use default count of 1 when count is undefined', () => {\n    expect(drop([1, 2, 3])).toEqual([2, 3]);\n    expect(drop([1, 2, 3], undefined)).toEqual([2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(drop).toEqualTypeOf<typeof dropLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/drop.ts",
    "content": "import { drop as dropToolkit } from '../../array/drop.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Removes a specified number of elements from the beginning of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the start.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} collection - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the beginning of the array.\n * @param {unknown} [guard] - Enables use as an iteratee for methods like `_.map`.\n * @returns {T[]} A new array with the specified number of elements removed from the start.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = drop(array, 2);\n * result will be [3, 4, 5] since the first two elements are dropped.\n */\nexport function drop<T>(array: ArrayLike<T> | null | undefined, n?: number): T[];\n\nexport function drop<T>(collection: ArrayLike<T> | null | undefined, itemsCount = 1, guard?: unknown): T[] {\n  if (!isArrayLike(collection)) {\n    return [];\n  }\n  itemsCount = guard ? 1 : toInteger(itemsCount);\n\n  return dropToolkit(toArray(collection), itemsCount);\n}\n"
  },
  {
    "path": "src/compat/array/dropRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { dropRight as dropRightLodash } from 'lodash';\nimport { dropRight } from './dropRight';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/dropRight.spec.js#L1\n */\ndescribe('dropRight', () => {\n  const array = [1, 2, 3];\n\n  it('should drop the last two elements', () => {\n    expect(dropRight(array, 2)).toEqual([1]);\n  });\n\n  it('should return all elements when `n` < `1`', () => {\n    [0, -1, -Infinity].forEach(n => {\n      expect(dropRight(array, n)).toEqual(array);\n    });\n  });\n\n  it('should return an empty array when `n` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(n => {\n      expect(dropRight(array, n)).toEqual([]);\n    });\n  });\n\n  it('should coerce `n` to an integer', () => {\n    expect(dropRight(array, 1.6)).toEqual([1, 2]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(dropRight(null, 2)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(dropRight(1, 2)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(dropRight(true, 2)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(dropRight({ 0: 1, 1: 2, length: 2 }, 1)).toEqual([1]);\n    expect(dropRight('123', 2)).toEqual(['1']);\n    expect(dropRight(args, 1)).toEqual([1, 2]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect([[1, 2], [3, 4], [5]].map(dropRight)).toEqual([[1], [3], []]);\n  });\n\n  it('should support default itemsCount', () => {\n    expect(dropRight([1, 2, 3, 4, 5])).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(dropRight).toEqualTypeOf<typeof dropRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/dropRight.ts",
    "content": "import { dropRight as dropRightToolkit } from '../../array/dropRight.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Removes a specified number of elements from the end of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the end.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} collection - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the end of the array.\n * @param {unknown} [guard] - Enables use as an iteratee for methods like `_.map`.\n * @returns {T[]} A new array with the specified number of elements removed from the end.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRight(array, 2);\n * // result will be [1, 2, 3] since the last two elements are dropped.\n */\nexport function dropRight<T>(array: ArrayLike<T> | null | undefined, n?: number): T[];\n\n/**\n * Removes a specified number of elements from the end of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the end.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} collection - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the end of the array.\n * @param {unknown} [guard] - Enables use as an iteratee for methods like `_.map`.\n * @returns {T[]} A new array with the specified number of elements removed from the end.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRight(array, 2);\n * // result will be [1, 2, 3] since the last two elements are dropped.\n */\nexport function dropRight<T>(collection: ArrayLike<T> | null | undefined, itemsCount = 1, guard?: unknown): T[] {\n  if (!isArrayLike(collection)) {\n    return [];\n  }\n  itemsCount = guard ? 1 : toInteger(itemsCount);\n\n  return dropRightToolkit(toArray(collection), itemsCount);\n}\n"
  },
  {
    "path": "src/compat/array/dropRightWhile.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { dropRightWhile as dropRightWhileLodash } from 'lodash';\nimport { dropRightWhile } from './dropRightWhile';\nimport { args } from '../_internal/args';\nimport { slice } from '../_internal/slice';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/dropRightWhile.spec.js\n */\ndescribe('dropRightWhile', () => {\n  const array = [1, 2, 3, 4];\n\n  const objects = [\n    { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n    { a: 1, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    { a: 2, b: 2, 0: 2, [Symbol.for('a')]: 2 },\n  ];\n\n  it('should drop elements while `predicate` returns truthy', function () {\n    const actual = dropRightWhile(array, function (n) {\n      return n > 2;\n    });\n\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should provide correct `predicate` arguments', function () {\n    let args;\n\n    dropRightWhile(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n\n    expect(args).toEqual([4, 3, array]);\n  });\n\n  it('should work with `_.matches` shorthands', function () {\n    expect(dropRightWhile(objects, { b: 2 })).toEqual(objects.slice(0, 2));\n  });\n\n  it('should work with `_.matchesProperty` shorthands', function () {\n    expect(dropRightWhile(objects, ['b', 2])).toEqual(objects.slice(0, 2));\n    expect(dropRightWhile(objects, [0, 2])).toEqual(objects.slice(0, 2));\n    expect(dropRightWhile(objects, [Symbol.for('a'), 2])).toEqual(objects.slice(0, 2));\n  });\n\n  it('should work with `_.property` shorthands', function () {\n    expect(dropRightWhile(objects, 'b')).toEqual(objects.slice(0, 1));\n    expect(dropRightWhile(objects, 0)).toEqual(objects.slice(0, 1));\n    expect(dropRightWhile(objects, Symbol.for('a'))).toEqual(objects.slice(0, 1));\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(dropRightWhile(null, () => true)).toEqual([]);\n    expect(dropRightWhile(undefined, () => true)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(dropRightWhile(1, () => true)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(dropRightWhile(true, () => true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(dropRightWhile({ 0: 1, 1: 2, 2: 3, length: 3 }, i => i > 1)).toEqual([1]);\n    expect(dropRightWhile('123', i => Number(i) > 1)).toEqual(['1']);\n    expect(dropRightWhile(args, i => i > 1)).toEqual([1]);\n  });\n\n  it('should use identity function when no predicate is provided', () => {\n    expect(dropRightWhile([1, 2, 0, 3])).toEqual([1, 2, 0]);\n    expect(dropRightWhile(['hello', '', 'world'])).toEqual(['hello', '']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(dropRightWhile).toEqualTypeOf<typeof dropRightWhileLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(dropRightWhile([1, 2, 3, 4])).toEqual([]);\n    expect(dropRightWhile([1, 2, 3, 0])).toEqual([1, 2, 3, 0]);\n    expect(dropRightWhile([false, 0, null, undefined, ''])).toEqual([false, 0, null, undefined, '']);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/dropRightWhile.ts",
    "content": "import { dropRightWhile as dropRightWhileToolkit } from '../../array/dropRightWhile.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { property } from '../object/property.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Creates a slice of array excluding elements dropped from the end until predicate returns falsey.\n * The predicate is invoked with three arguments: (value, index, array).\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {ListIteratee<T>} [predicate] - The function invoked per iteration.\n * @returns {T[]} Returns the slice of array.\n * @example\n *\n * const users = [\n *   { user: 'barney', active: true },\n *   { user: 'fred', active: false },\n *   { user: 'pebbles', active: false }\n * ];\n *\n * // Using function predicate\n * dropRightWhile(users, user => !user.active);\n * // => [{ user: 'barney', active: true }]\n *\n * // Using matches shorthand\n * dropRightWhile(users, { user: 'pebbles', active: false });\n * // => [{ user: 'barney', active: true }, { user: 'fred', active: false }]\n *\n * // Using matchesProperty shorthand\n * dropRightWhile(users, ['active', false]);\n * // => [{ user: 'barney', active: true }]\n *\n * // Using property shorthand\n * dropRightWhile(users, 'active');\n * // => [{ user: 'barney', active: true }]\n */\nexport function dropRightWhile<T>(array: ArrayLike<T> | null | undefined, predicate?: ListIteratee<T>): T[];\n\n/**\n * Removes elements from the end of an array until the predicate returns false.\n *\n * This function iterates over an array and drops elements from the end until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array from which to drop elements.\n * @param {(item: T, index: number, arr: T[]) => unknown} predicate - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element, index, and array, and dropping\n * continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [3, 2, 1];\n * const result = dropRightWhile(array, (item, index, arr) => index >= 1);\n * // Returns: [3]\n */\nexport function dropRightWhile<T>(\n  arr: ArrayLike<T> | null | undefined,\n  predicate:\n    | ((item: T, index: number, arr: readonly T[]) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey = identity\n): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n\n  return dropRightWhileImpl(Array.from(arr), predicate);\n}\n\nfunction dropRightWhileImpl<T>(\n  arr: readonly T[],\n  predicate: ((item: T, index: number, arr: readonly T[]) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey\n): T[] {\n  switch (typeof predicate) {\n    case 'function': {\n      return dropRightWhileToolkit(arr, (item, index, arr) => Boolean(predicate(item, index, arr)));\n    }\n    case 'object': {\n      if (Array.isArray(predicate) && predicate.length === 2) {\n        const key = predicate[0];\n        const value = predicate[1];\n\n        return dropRightWhileToolkit(arr, matchesProperty(key, value));\n      } else {\n        return dropRightWhileToolkit(arr, matches(predicate));\n      }\n    }\n    case 'symbol':\n    case 'number':\n    case 'string': {\n      return dropRightWhileToolkit(arr, property(predicate));\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/array/dropWhile.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { dropWhile as dropWhileLodash } from 'lodash';\nimport { dropWhile } from './dropWhile';\nimport { args } from '../_internal/args';\nimport { slice } from '../_internal/slice';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/dropWhile.spec.js\n */\ndescribe('dropWhile', () => {\n  const array = [1, 2, 3, 4];\n\n  const objects = [\n    { a: 2, b: 2, 0: 2, [Symbol.for('a')]: 2 },\n    { a: 1, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n  ];\n\n  it('should drop elements while `predicate` returns truthy', function () {\n    const actual = dropWhile(array, function (n) {\n      return n < 3;\n    });\n\n    expect(actual).toEqual([3, 4]);\n  });\n\n  it('should provide correct `predicate` arguments', function () {\n    let args;\n\n    dropWhile(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n\n    expect(args).toEqual([1, 0, array]);\n  });\n\n  it('should work with `_.matches` shorthands', function () {\n    expect(dropWhile(objects, { b: 2 })).toEqual(objects.slice(1));\n  });\n\n  it('should work with `_.matchesProperty` shorthands', function () {\n    expect(dropWhile(objects, ['b', 2])).toEqual(objects.slice(1));\n    expect(dropWhile(objects, [0, 2])).toEqual(objects.slice(1));\n    expect(dropWhile(objects, [Symbol.for('a'), 2])).toEqual(objects.slice(1));\n  });\n\n  it('should work with `_.property` shorthands', function () {\n    expect(dropWhile(objects, 'b')).toEqual(objects.slice(2));\n    expect(dropWhile(objects, 0)).toEqual(objects.slice(2));\n    expect(dropWhile(objects, Symbol.for('a'))).toEqual(objects.slice(2));\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(dropWhile(null, () => true)).toEqual([]);\n    expect(dropWhile(undefined, () => true)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(dropWhile(1, () => true)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(dropWhile(true, () => true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(dropWhile({ 0: 1, 1: 2, 2: 3, length: 3 }, n => n < 3)).toEqual([3]);\n    expect(dropWhile('123', n => Number(n) < 3)).toEqual(['3']);\n    expect(dropWhile(args, n => n < 3)).toEqual([3]);\n  });\n\n  it('should use identity function when no predicate is provided', () => {\n    expect(dropWhile([1, 2, 0, 3])).toEqual([0, 3]);\n    expect(dropWhile(['hello', 'world', '', 'test'])).toEqual(['', 'test']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(dropWhile).toEqualTypeOf<typeof dropWhileLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(dropWhile([1, 2, 3, 4])).toEqual([]);\n    expect(dropWhile([1, 2, 3, 0])).toEqual([0]);\n    expect(dropWhile([false, 0, null, undefined, ''])).toEqual([false, 0, null, undefined, '']);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/dropWhile.ts",
    "content": "import { dropWhile as dropWhileToolkit } from '../../array/dropWhile.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { property } from '../object/property.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Creates a slice of array excluding elements dropped from the beginning.\n * Elements are dropped until predicate returns falsey.\n * The predicate is invoked with three arguments: (value, index, array).\n *\n * @template T - The type of elements in the array\n * @param {ArrayLike<T> | null | undefined} arr - The array to query\n * @param {ListIteratee<T>} [predicate=identity] - The function invoked per iteration\n * @returns {T[]} Returns the slice of array\n *\n * @example\n * dropWhile([1, 2, 3], n => n < 3)\n * // => [3]\n *\n * dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], { a: 1 })\n * // => [{ a: 1, b: 3 }]\n *\n * dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], ['a', 1])\n * // => [{ a: 1, b: 3 }]\n *\n * dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], 'a')\n * // => []\n */\nexport function dropWhile<T>(arr: ArrayLike<T> | null | undefined, predicate: ListIteratee<T> = identity): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n\n  return dropWhileImpl(toArray(arr), predicate);\n}\n\nfunction dropWhileImpl<T>(arr: readonly T[], predicate: ListIteratee<T>): T[] {\n  switch (typeof predicate) {\n    case 'function': {\n      return dropWhileToolkit(arr, (item, index, arr) => Boolean(predicate(item, index, arr)));\n    }\n    case 'object': {\n      if (Array.isArray(predicate) && predicate.length === 2) {\n        const key = predicate[0];\n        const value = predicate[1];\n\n        return dropWhileToolkit(arr, matchesProperty(key, value));\n      } else {\n        return dropWhileToolkit(arr, matches(predicate));\n      }\n    }\n    case 'number':\n    case 'symbol':\n    case 'string': {\n      return dropWhileToolkit(arr, property(predicate));\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/array/each.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it, vi } from 'vitest';\nimport type { each as eachLodash } from 'lodash';\nimport { forEach as each } from './forEach';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { slice } from '../_internal/slice';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('each', () => {\n  it('should iterate over array elements', () => {\n    const array = [1, 2, 3];\n    const result: number[] = [];\n\n    each(array, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('should iterate over string characters', () => {\n    const string = 'abc';\n    const result: string[] = [];\n\n    each(string, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should iterate over object properties', () => {\n    const object = { a: 1, b: 2 };\n    const result: Array<[number, string]> = [];\n\n    each(object, (value, key) => {\n      result.push([value, key]);\n    });\n\n    expect(result).toEqual([\n      [1, 'a'],\n      [2, 'b'],\n    ]);\n  });\n\n  it('should return the original array after iteration', () => {\n    const array = [1, 2, 3];\n    const result = each(array, value => value * 2);\n\n    expect(result).toBe(array);\n  });\n\n  it('should return the original string after iteration', () => {\n    const string = 'abc';\n    const result = each(string, value => value.toUpperCase());\n\n    expect(result).toBe(string);\n  });\n\n  it('should return the original object after iteration', () => {\n    const object = { a: 1, b: 2 };\n    const result = each(object, value => value + 1);\n\n    expect(result).toBe(object);\n  });\n\n  it('should return the input collection if null or undefined is passed', () => {\n    const nullValue = null;\n    const undefinedValue = undefined;\n\n    const resultForNull = each(nullValue, vi.fn());\n    const resultForUndefined = each(undefinedValue, vi.fn());\n\n    expect(resultForNull).toBe(null);\n    expect(resultForUndefined).toBe(undefined);\n  });\n\n  it('should use identity function as the callback if no callback is provided', () => {\n    const array = [1, 2, 3];\n    const result = each(array);\n\n    expect(result).toBe(array);\n  });\n\n  it('should iterate over array-like structures', () => {\n    const arrayLike = { 0: 'a', 1: 'b', length: 2 };\n    const result: Array<[number, string]> = [];\n\n    each(arrayLike, (value, index) => {\n      result.push([index, value]);\n    });\n\n    expect(result).toEqual([\n      [0, 'a'],\n      [1, 'b'],\n    ]);\n  });\n\n  const array = [1, 2, 3];\n  const func = each;\n  const methodName = 'each';\n\n  it(`\\`_.${methodName}\\` should provide correct iteratee arguments`, () => {\n    let args: any;\n    const expected = [1, 0, array];\n\n    func(array, function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    });\n    expect(args).toEqual(expected);\n  });\n\n  it(`\\`_.${methodName}\\` should treat sparse arrays as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    const expected = [\n      [1, 0, array],\n      [undefined, 1, array],\n      [3, 2, array],\n    ];\n\n    const argsList: any[] = [];\n    func(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      argsList.push(slice.call(arguments));\n      return true;\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  const isEvery = false;\n\n  it(`\\`_.${methodName}\\` should not iterate custom properties on arrays`, () => {\n    const array: any = [1, 2, 3];\n    array.a = 1;\n    const keys: any[] = [];\n    func(array, (value, key) => {\n      keys.push(key);\n      return isEvery;\n    });\n\n    expect(keys.includes('a')).toBeFalsy();\n  });\n\n  it(`\\`_.${methodName}\\` iterates over own string keyed properties of objects`, () => {\n    function Foo(this: any) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const values: any[] = [];\n    // eslint-disable-next-line\n    // @ts-ignore\n    func(new Foo(), value => {\n      values.push(value);\n    });\n    expect(values).toEqual([1]);\n  });\n\n  it(`\\`_.${methodName}\\` should return the collection`, () => {\n    const array = [1, 2, 3];\n    expect(func(array, Boolean)).toBe(array);\n  });\n\n  it(`\\`_.${methodName}\\` should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n    const isIteratedAsObject = function (object: any) {\n      let result = false;\n      func(object, () => {\n        result = true;\n      });\n      return result;\n    };\n\n    const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(length => isIteratedAsObject({ length: length }));\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const Foo = function (a: any) {};\n    Foo.a = 1;\n\n    expect(actual).toEqual(expected);\n    expect(isIteratedAsObject(Foo)).toBeTruthy();\n    expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n  });\n\n  it(`\\`_.${methodName}\\` should ignore changes to \\`length\\``, () => {\n    if (func) {\n      let count = 0;\n      const array = [1];\n\n      func(array, () => {\n        if (++count === 1) {\n          array.push(2);\n        }\n        return true;\n      });\n\n      expect(count).toBe(1);\n    }\n  });\n\n  it(`\\`_.${methodName}\\` should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object = { a: 1 };\n\n    func(object, () => {\n      if (++count === 1) {\n        // eslint-disable-next-line\n        // @ts-ignore\n        object.b = 2;\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it(`\\`_.${methodName}\\` can exit early when iterating arrays`, () => {\n    const array = [1, 2, 3];\n    const values: any[] = [];\n\n    func(array, (value, other) => {\n      values.push(Array.isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values).toEqual([1]);\n  });\n\n  it(`\\`_.${methodName}\\` can exit early when iterating objects`, () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const values = [];\n\n    func(object, (value, other) => {\n      values.push(Array.isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values.length).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(each).toEqualTypeOf<typeof eachLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/each.ts",
    "content": "export { forEach as each } from './forEach.ts';\n"
  },
  {
    "path": "src/compat/array/eachRight.ts",
    "content": "export { forEachRight as eachRight } from './forEachRight.ts';\n"
  },
  {
    "path": "src/compat/array/every.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { every as everyLodash } from 'lodash';\nimport { every } from './every';\nimport { identity } from '../../function/identity';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('every', () => {\n  it('should return true for array with all elements passing predicate', () => {\n    const arr = [1, 2, 3, 4];\n    const result = every(arr, n => n > 0);\n    expect(result).toBe(true);\n  });\n\n  it('should return false for array when an element does not pass predicate', () => {\n    const arr = [1, 2, 3, -4];\n    const result = every(arr, n => n > 0);\n    expect(result).toBe(false);\n  });\n\n  it('should return true for empty array', () => {\n    const result = every([], () => false);\n    expect(result).toBe(true);\n  });\n\n  it('should return true for object with all values passing predicate', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const result = every(obj, value => value > 0);\n    expect(result).toBe(true);\n  });\n\n  it('should return false for object when a value does not pass predicate', () => {\n    const obj = { a: 1, b: -2, c: 3 };\n    const result = every(obj, value => value > 0);\n    expect(result).toBe(false);\n  });\n\n  it('should return true for empty object', () => {\n    const result = every({}, () => false);\n    expect(result).toBe(true);\n  });\n\n  it('should correctly handle indices for arrays', () => {\n    const arr = [1, 2, 3];\n    const result = every(arr, (n, index) => index < 3);\n    expect(result).toBe(true);\n  });\n\n  it('should correctly handle keys for objects', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const result = every(obj, (value, key) => ['a', 'b', 'c'].includes(key as any));\n    expect(result).toBe(true);\n  });\n\n  it('should return `true` if `predicate` returns truthy for all elements', () => {\n    expect(every([true, 1, 'a'], identity)).toBe(true);\n  });\n\n  it('should return `true` for empty collections', () => {\n    const expected = empties.map(stubTrue);\n\n    const actual = empties.map(value => {\n      try {\n        return every(value, identity);\n      } catch (e) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` as soon as `predicate` returns falsey', () => {\n    let count = 0;\n\n    expect(\n      every([true, null, true], value => {\n        count++;\n        return value;\n      })\n    ).toEqual(false);\n\n    expect(count).toBe(2);\n  });\n\n  it('should work with collections of `undefined` values (test in IE < 9)', () => {\n    expect(every([undefined, undefined, undefined], identity)).toBe(false);\n  });\n\n  it('should use `_.identity` when `predicate` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    let expected = values.map(stubFalse);\n\n    let actual = values.map((value, index) => {\n      const array = [0];\n      // eslint-disable-next-line\n      // @ts-ignore\n      return index ? every(array, value) : every(array);\n    });\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expected = values.map(stubTrue);\n    actual = values.map((value, index) => {\n      const array = [1];\n      // eslint-disable-next-line\n      // @ts-ignore\n      return index ? every(array, value) : every(array);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [\n      { a: 0, b: 1, 0: 1, [Symbol.for('c')]: 1 },\n      { a: 1, b: 2, 0: 2, [Symbol.for('c')]: 2 },\n    ];\n    expect(every(objects, 'a')).toBe(false);\n    expect(every(objects, 'b')).toBe(true);\n    expect(every(objects, 0)).toBe(true);\n    expect(every(objects, Symbol.for('c'))).toBe(true);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    const objects = [\n      { a: 0, b: 0 },\n      { a: 0, b: 1 },\n    ];\n    expect(every(objects, { a: 0 })).toBe(true);\n    expect(every(objects, { b: 1 })).toBe(false);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const actual = [[1], [2, 3]].map(every);\n    expect(actual).toEqual([true, true]);\n  });\n\n  it('should return true when provided `null` or `undefined`', () => {\n    expect(every(null, identity)).toBe(true);\n    expect(every(undefined, identity)).toBe(true);\n  });\n\n  it('should support array-like objects', () => {\n    expect(every({ 0: 'a', 1: 'b', length: 2 }, stubFalse)).toBe(false);\n    expect(every('123', stubFalse)).toBe(false);\n    expect(every(args, stubFalse)).toBe(false);\n  });\n  it('should support property-value pair', () => {\n    const objects = [\n      { a: 0, b: 0, 0: 1, [Symbol.for('c')]: 1 },\n      { a: 0, b: 1, 0: 2, [Symbol.for('c')]: 1 },\n    ];\n    expect(every(objects, ['a', 0])).toBe(true);\n    expect(every(objects, ['b', 1])).toBe(false);\n    expect(every(objects, [0, 1])).toBe(false);\n    expect(every(objects, [Symbol.for('c'), 1])).toBe(true);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const sparseArray = [1, , 3, , 5] as any[];\n\n    expect(every(sparseArray, value => value > 0)).toEqual(false);\n    expect(every(sparseArray, value => value === undefined)).toEqual(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(every).toEqualTypeOf<typeof everyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/every.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport { property } from '../object/property.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Checks if all elements in a collection pass the predicate check.\n * The predicate is invoked with three arguments: (value, index|key, collection).\n *\n * @template T - The type of elements in the collection\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over\n * @param {ListIterateeCustom<T, boolean>} [predicate=identity] - The function invoked per iteration\n * @returns {boolean} Returns true if all elements pass the predicate check, else false\n *\n * @example\n * // Using a function predicate\n * every([true, 1, null, 'yes'], Boolean)\n * // => false\n *\n * // Using property shorthand\n * const users = [{ user: 'barney', age: 36 }, { user: 'fred', age: 40 }]\n * every(users, 'age')\n * // => true\n *\n * // Using matches shorthand\n * every(users, { age: 36 })\n * // => false\n *\n * // Using matchesProperty shorthand\n * every(users, ['age', 36])\n * // => false\n */\nexport function every<T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate?: ListIterateeCustom<T, boolean>\n): boolean;\n\n/**\n * Checks if all elements in an object pass the predicate check.\n * The predicate is invoked with three arguments: (value, key, object).\n *\n * @template T - The type of the object\n * @param {T | null | undefined} collection - The object to iterate over\n * @param {ObjectIterateeCustom<T, boolean>} [predicate=identity] - The function invoked per iteration\n * @returns {boolean} Returns true if all elements pass the predicate check, else false\n *\n * @example\n * // Using a function predicate\n * every({ a: true, b: 1, c: null }, Boolean)\n * // => false\n *\n * // Using property shorthand\n * const users = {\n *   barney: { active: true, age: 36 },\n *   fred: { active: true, age: 40 }\n * }\n * every(users, 'active')\n * // => true\n *\n * // Using matches shorthand\n * every(users, { active: true })\n * // => true\n *\n * // Using matchesProperty shorthand\n * every(users, ['age', 36])\n * // => false\n */\nexport function every<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>\n): boolean;\n\n/**\n * Checks if every item in an object has a specific property, where the property name is provided as a PropertyKey.\n *\n * @template T\n * @param {T extends Record<string, unknown> ? T : never} object - The object to check through.\n * @param {ArrayLike<T> | Record<any, any> | null | undefined} source - The source array or object to check through.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} doesMatch - The criteria to match. It can be a function, a partial object, a key-value pair, or a property name.\n * @param {PropertyKey} propertyToCheck - The property name to check.\n * @param {unknown} guard - Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} - `true` if every property value has the specified property, or `false` if at least one does not match.\n *\n * @example\n * // Using a property name\n * const obj = { a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } };\n * const result = every(obj, 'name');\n * console.log(result); // true\n */\nexport function every<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  doesMatch?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey,\n  guard?: unknown\n): boolean {\n  if (!source) {\n    return true;\n  }\n\n  if (guard && isIterateeCall(source, doesMatch, guard)) {\n    doesMatch = undefined;\n  }\n\n  if (!doesMatch) {\n    doesMatch = identity;\n  }\n\n  let predicate: (value: any, index: number, collection: any) => boolean;\n\n  switch (typeof doesMatch) {\n    case 'function': {\n      predicate = doesMatch as any;\n      break;\n    }\n    case 'object': {\n      if (Array.isArray(doesMatch) && doesMatch.length === 2) {\n        const key = doesMatch[0];\n        const value = doesMatch[1];\n        predicate = matchesProperty(key, value);\n      } else {\n        predicate = matches(doesMatch);\n      }\n      break;\n    }\n    case 'symbol':\n    case 'number':\n    case 'string': {\n      predicate = property(doesMatch);\n    }\n  }\n\n  if (!isArrayLike(source)) {\n    const keys = Object.keys(source) as Array<keyof typeof source>;\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n      const value = source[key];\n\n      if (!predicate(value, key, source)) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  for (let i = 0; i < source.length; i++) {\n    if (!predicate((source as ArrayLike<T>)[i], i, source)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/compat/array/fill.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { fill } from './fill.ts';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { toArgs } from '../_internal/toArgs.ts';\n\ndescribe('fill', () => {\n  it('should use a default `start` of `0` and a default `end` of `length`', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a')).toEqual(['a', 'a', 'a']);\n  });\n\n  it('should use `undefined` for `value` if not given', () => {\n    const array = [1, 2, 3];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = fill(array);\n\n    expect(actual).toEqual(Array(3));\n    expect(actual).toEqual([undefined, undefined, undefined]);\n  });\n\n  it('should work with a positive `start`', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a', 1)).toEqual([1, 'a', 'a']);\n  });\n\n  it('should work with a `start` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(start => {\n      const array = [1, 2, 3];\n      expect(fill(array, 'a', start)).toEqual([1, 2, 3]);\n    });\n  });\n\n  it('should treat falsey `start` values as `0`', () => {\n    const expected = falsey.map(() => ['a', 'a', 'a']);\n    const actual = falsey.map(start => {\n      const array = [1, 2, 3];\n      // @ts-expect-error testing invalid input\n      return fill(array, 'a', start);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a negative `start`', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a', -1)).toEqual([1, 2, 'a']);\n  });\n\n  it('should work with a negative `start` <= negative `length`', () => {\n    [-3, -4, -Infinity].forEach(start => {\n      const array = [1, 2, 3];\n      expect(fill(array, 'a', start)).toEqual(['a', 'a', 'a']);\n    });\n  });\n\n  it('should work with `start` >= `end`', () => {\n    [2, 3].forEach(start => {\n      const array = [1, 2, 3];\n      expect(fill(array, 'a', start, 2)).toEqual([1, 2, 3]);\n    });\n  });\n\n  it('should work with a positive `end`', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a', 0, 1)).toEqual(['a', 2, 3]);\n  });\n\n  it('should work with a `end` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(end => {\n      const array = [1, 2, 3];\n      expect(fill(array, 'a', 0, end)).toEqual(['a', 'a', 'a']);\n    });\n  });\n\n  it('should treat falsey `end` values, except `undefined`, as `0`', () => {\n    const expected = falsey.map(value => (value === undefined ? ['a', 'a', 'a'] : [1, 2, 3]));\n    const actual = falsey.map(end => {\n      const array = [1, 2, 3];\n      // @ts-expect-error testing invalid input\n      return fill(array, 'a', 0, end);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a negative `end`', () => {\n    const array = [1, 2, 3];\n    expect(fill(array, 'a', 0, -1)).toEqual(['a', 'a', 3]);\n  });\n\n  it('should work with a negative `end` <= negative `length`', () => {\n    [-3, -4, -Infinity].forEach(end => {\n      const array = [1, 2, 3];\n      expect(fill(array, 'a', 0, end)).toEqual([1, 2, 3]);\n    });\n  });\n\n  it('should coerce `start` and `end` to integers', () => {\n    const positions = [[0.1, 1.6], ['0', 1], [0, '1'], ['1'], [NaN, 1], [1, NaN]];\n    const actual = positions.map(pos => {\n      const array = [1, 2, 3];\n      // @ts-expect-error testing invalid input\n      return fill(array, 'a', pos[0], pos[1]);\n    });\n\n    expect(actual).toEqual([\n      ['a', 2, 3],\n      ['a', 2, 3],\n      ['a', 2, 3],\n      [1, 'a', 'a'],\n      ['a', 2, 3],\n      [1, 2, 3],\n    ]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const array = [\n      [1, 2],\n      [3, 4],\n    ];\n    const actual = array.map(fill);\n\n    expect(actual).toEqual([\n      [0, 0],\n      [1, 1],\n    ]);\n  });\n\n  it('should return an empty array when provided `null` or `undefined`', () => {\n    expect(fill(null, 'a')).toEqual([]);\n    expect(fill(undefined, 'a')).toEqual([]);\n  });\n\n  it('should return an empty array when provided none array-like object', () => {\n    // @ts-expect-error - invalid argument\n    expect(fill(1, 'a')).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(fill(true, 'a')).toEqual([]);\n  });\n\n  it('should support array-like objects', () => {\n    expect(fill({ 0: 1, 1: 2, length: 2 }, 3)).toEqual({ 0: 3, 1: 3, length: 2 });\n    expect(fill('12', '3')).toEqual('12');\n    expect(fill(args, 3)).toEqual(toArgs([3, 3, 3]));\n  });\n});\n"
  },
  {
    "path": "src/compat/array/fill.ts",
    "content": "import { fill as fillToolkit } from '../../array/fill.ts';\nimport type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isString } from '../predicate/isString.ts';\n\n/**\n * Fills an array with a value.\n * @template T\n * @param {any[] | null | undefined} array - The array to fill\n * @param {T} value - The value to fill array with\n * @returns {T[]} Returns the filled array\n * @example\n * fill([1, 2, 3], 'a')\n * // => ['a', 'a', 'a']\n */\nexport function fill<T>(array: any[] | null | undefined, value: T): T[];\n\n/**\n * Fills an array-like object with a value.\n * @template T, AL\n * @param {RejectReadonly<AL> | null | undefined} array - The array-like object to fill\n * @param {T} value - The value to fill array with\n * @returns {ArrayLike<T>} Returns the filled array-like object\n * @example\n * fill({ length: 3 }, 2)\n * // => { 0: 2, 1: 2, 2: 2, length: 3 }\n */\nexport function fill<T, AL extends MutableList<any>>(\n  array: RejectReadonly<AL> | null | undefined,\n  value: T\n): ArrayLike<T>;\n\n/**\n * Fills an array with a value from start up to end.\n * @template T, U\n * @param {U[] | null | undefined} array - The array to fill\n * @param {T} value - The value to fill array with\n * @param {number} [start=0] - The start position\n * @param {number} [end=array.length] - The end position\n * @returns {Array<T | U>} Returns the filled array\n * @example\n * fill([1, 2, 3], 'a', 1, 2)\n * // => [1, 'a', 3]\n */\nexport function fill<T, U>(array: U[] | null | undefined, value: T, start?: number, end?: number): Array<T | U>;\n\n/**\n * Fills an array-like object with a value from start up to end.\n * @template T, U\n * @param {U extends readonly any[] ? never : U | null | undefined} array - The array-like object to fill\n * @param {T} value - The value to fill array with\n * @param {number} [start=0] - The start position\n * @param {number} [end=array.length] - The end position\n * @returns {ArrayLike<T | U[0]>} Returns the filled array-like object\n * @example\n * fill({ 0: 1, 1: 2, 2: 3, length: 3 }, 'a', 1, 2)\n * // => { 0: 1, 1: 'a', 2: 3, length: 3 }\n */\nexport function fill<T, U extends MutableList<any>>(\n  array: RejectReadonly<U> | null | undefined,\n  value: T,\n  start?: number,\n  end?: number\n): ArrayLike<T | U[0]>;\n\n/**\n * Fills elements of an array with a specified value from the start position up to, but not including, the end position.\n *\n * This function mutates the original array and replaces its elements with the provided value, starting from the specified\n * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the\n * entire array.\n *\n * @template T, U\n * @param {ArrayLike<T | U> | null | undefined} array - The array to fill.\n * @param {U} value - The value to fill the array with.\n * @param {number} [start=0] - The start position. Defaults to 0.\n * @param {number} [end=arr.length] - The end position. Defaults to the array's length.\n * @returns {ArrayLike<T | U>} The array with the filled values.\n *\n * @example\n * const array = [1, 2, 3];\n * const result = fill(array, 'a');\n * // => ['a', 'a', 'a']\n *\n * const result = fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * const result = fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n *\n * const result = fill(array, '*', -2, -1);\n * // => [1, '*', 3]\n */\nexport function fill<T, U>(\n  array: ArrayLike<T | U> | null | undefined,\n  value: U,\n  start = 0,\n  end = array ? array.length : 0\n): ArrayLike<T | U> {\n  if (!isArrayLike(array)) {\n    return [];\n  }\n  if (isString(array)) {\n    // prevent TypeError: Cannot assign to read only property of string\n    return array;\n  }\n  start = Math.floor(start);\n  end = Math.floor(end);\n\n  if (!start) {\n    start = 0;\n  }\n  if (!end) {\n    end = 0;\n  }\n\n  return fillToolkit(array as any, value, start, end);\n}\n"
  },
  {
    "path": "src/compat/array/filter.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { filter as filterLodash } from 'lodash';\nimport { filter } from './filter';\nimport { args } from '../_internal/args';\nimport { isEven } from '../_internal/isEven';\n\nfunction isEven2(n: string) {\n  return parseInt(n) % 2 === 0;\n}\n\ndescribe('filter', () => {\n  it('should return the same array when no predicate is provided.', () => {\n    const arr = [1, 2, 3];\n\n    expect(filter(arr)).toEqual([1, 2, 3]);\n  });\n\n  it('should return an array of elements from the array', () => {\n    const arr = [1, 2, 3];\n\n    expect(filter(arr, isEven)).toEqual([2]);\n  });\n\n  it(`filter should work with \\`matches\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice' },\n      { id: 2, name: 'Bob' },\n    ];\n    expect(filter(arr, { name: 'Bob' })).toEqual([{ id: 2, name: 'Bob' }]);\n  });\n\n  it(`filter should work with \\`matchesProperty\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n    ];\n    expect(filter(arr, ['name', 'Alice'])).toEqual(arr.slice(0, 1));\n    expect(filter(arr, [0, 1])).toEqual(arr.slice(0, 1));\n    expect(filter(arr, [Symbol.for('key'), 1])).toEqual(arr.slice(0, 1));\n\n    const users = [\n      { user: 'barney', age: 36, active: true },\n      { user: 'fred', age: 40, active: false },\n    ];\n\n    expect(filter(users, ['active', false])).toEqual([{ user: 'fred', age: 40, active: false }]);\n  });\n\n  it(`filter should work with \\`property\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n      { id: 3, age: 28, 0: 3 },\n    ];\n\n    expect(filter(arr, 'name')).toEqual([\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n    ]);\n\n    expect(filter(arr, 0)).toEqual([\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n      { id: 3, age: 28, 0: 3 },\n    ]);\n\n    expect(filter(arr, Symbol.for('key'))).toEqual([\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n    ]);\n  });\n\n  it(`should return an array of elements from the object`, () => {\n    const obj: { [key: string]: number } = {\n      a: 1,\n      b: 2,\n      c: 3,\n    };\n\n    expect(filter(obj, (value, key) => value >= 2 && key === 'b')).toEqual([2]);\n  });\n\n  it(`filter should work with \\`matches\\` shorthands for objects.`, () => {\n    const obj = {\n      item1: { a: 0 },\n      item2: { a: 1 },\n      item3: { a: 2 },\n    };\n\n    expect(filter(obj, { a: 1 })).toEqual([{ a: 1 }]);\n  });\n\n  it(`filter should work with \\`matches\\` shorthands for nested objects.`, () => {\n    const obj = {\n      item1: { a: 0, b: { c: 1 } },\n      item2: { a: 1, b: { c: 2 } },\n      item3: { a: 0, b: { c: 1 } },\n    };\n\n    expect(filter(obj, { b: { c: 1 } })).toEqual([\n      { a: 0, b: { c: 1 } },\n      { a: 0, b: { c: 1 } },\n    ]);\n  });\n\n  it(`filter should work when looking for values inside nested objects`, () => {\n    const obj: Record<string, unknown> = {\n      item1: { a: 0, b: { c: 1 } },\n      item2: { a: 1, b: { c: 2 } },\n      item3: { a: 0, b: { c: 1 } },\n    };\n\n    expect(filter(obj, ['b.c', 2])).toEqual([{ a: 1, b: { c: 2 } }]);\n  });\n\n  it('filter should match nested object properties using key-value pair shorthand.', () => {\n    const obj: { [key: string]: { [key: string]: unknown } } = {\n      alice: { id: 1, name: 'Alice' },\n      bob: { id: 2, name: 'Bob' },\n    };\n\n    expect(filter(obj, ['name', 'Alice'])).toEqual([{ id: 1, name: 'Alice' }]);\n  });\n\n  it('filter should return objects that have the specified key.', () => {\n    const obj: { [key: string]: { [key: string]: unknown } } = {\n      a: { id: 1, name: 'Alice' },\n      b: { id: 2, name: 'Bob' },\n      c: { id: 3, age: 28 },\n    };\n\n    expect(filter(obj, 'name')).toEqual([\n      { id: 1, name: 'Alice' },\n      { id: 2, name: 'Bob' },\n    ]);\n  });\n\n  it('should return `[]` when provided `null` or `undefined`', () => {\n    expect(filter(null as any, isEven)).toEqual([]);\n    expect(filter(undefined as any, isEven)).toEqual([]);\n  });\n\n  it('should return `[]` when provided none array-like object', () => {\n    expect(filter(1 as any, isEven)).toEqual([]);\n    expect(filter('' as any, isEven)).toEqual([]);\n    expect(filter(true as any, isEven)).toEqual([]);\n    expect(filter(Symbol() as any, isEven)).toEqual([]);\n  });\n\n  it('should support array-like objects', () => {\n    expect(filter({ 0: 1, 1: 2, 2: 3, length: 3 }, isEven)).toEqual([2]);\n    expect(filter('123', isEven2)).toEqual(['2']);\n    expect(filter(args, isEven)).toEqual([2]);\n  });\n\n  it('should not modify the resulting value from within `predicate`', () => {\n    const actual = filter([0], (value, index, array) => {\n      // @ts-expect-error - testing\n      array[index] = 1;\n      return true;\n    });\n\n    expect(actual).toEqual([0]);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const sparseArray = [1, , 3, , 5] as any[];\n\n    expect(filter(sparseArray, value => value > 0)).toEqual([1, 3, 5]);\n    expect(filter(sparseArray, value => value === undefined)).toEqual([undefined, undefined]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(filter).toEqualTypeOf<typeof filterLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/filter.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ListIteratorTypeGuard } from '../_internal/ListIteratorTypeGuard.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport { ObjectIteratorTypeGuard } from '../_internal/ObjectIterator.ts';\nimport { StringIterator } from '../_internal/StringIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Filters characters in a string based on the predicate function.\n *\n * @param collection - The string to filter\n * @param predicate - The function to test each character\n * @returns An array of characters that pass the predicate test\n *\n * @example\n * filter('123', char => char === '2')\n * // => ['2']\n */\nexport function filter(collection: string | null | undefined, predicate?: StringIterator<boolean>): string[];\n\n/**\n * Filters elements in an array-like object using a type guard predicate.\n *\n * @param collection - The array-like object to filter\n * @param predicate - The type guard function to test each element\n * @returns An array of elements that are of type U\n *\n * @example\n * filter([1, '2', 3], (x): x is number => typeof x === 'number')\n * // => [1, 3]\n */\nexport function filter<T, U extends T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate: ListIteratorTypeGuard<T, U>\n): U[];\n\n/**\n * Filters elements in an array-like object based on the predicate.\n *\n * @param collection - The array-like object to filter\n * @param predicate - The function or shorthand to test each element\n * @returns An array of elements that pass the predicate test\n *\n * @example\n * filter([1, 2, 3], x => x > 1)\n * // => [2, 3]\n *\n * filter([{ a: 1 }, { a: 2 }], { a: 1 })\n * // => [{ a: 1 }]\n */\nexport function filter<T>(collection: ArrayLike<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): T[];\n\n/**\n * Filters values in an object using a type guard predicate.\n *\n * @param collection - The object to filter\n * @param predicate - The type guard function to test each value\n * @returns An array of values that are of type U\n *\n * @example\n * filter({ a: 1, b: '2', c: 3 }, (x): x is number => typeof x === 'number')\n * // => [1, 3]\n */\nexport function filter<T extends object, U extends T[keyof T]>(\n  collection: T | null | undefined,\n  predicate: ObjectIteratorTypeGuard<T, U>\n): U[];\n\n/**\n * Filters values in an object based on the predicate.\n *\n * @param collection - The object to filter\n * @param predicate - The function or shorthand to test each value\n * @returns An array of values that pass the predicate test\n *\n * @example\n * filter({ a: 1, b: 2 }, x => x > 1)\n * // => [2]\n *\n * filter({ a: { x: 1 }, b: { x: 2 } }, { x: 1 })\n * // => [{ x: 1 }]\n */\nexport function filter<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>\n): Array<T[keyof T]>;\n\n/**\n * Iterates over the collection and filters elements based on the given predicate.\n * If a function is provided, it is invoked for each element in the collection.\n *\n * @template T\n * @param {ArrayLike<T> | Record<any, any> | null | undefined} source - The array or object to iterate over.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate=identity] - The function invoked per iteration.\n * @returns {T[]} - Returns a new array of filtered elements that satisfy the predicate.\n *\n * @example\n * filter([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n * // => [{ a: 1 }, { a: 2 }]\n *\n * filter([{ a: 1 }, { a: 2 }, { b: 1 }], { b: 1 });\n * // => [{ b: 1 }]\n *\n * filter({ item1: { a: 0, b: true }, item2: { a: 1, b: true }, item3: { a: 2, b: false }}, { b: false })\n * // => [{ a: 2, b: false }]\n *\n * filter([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n * // => [{ a: 2 }]\n */\nexport function filter<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  predicate: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey = identity\n): T[] {\n  if (!source) {\n    return [];\n  }\n\n  predicate = iteratee(predicate);\n\n  if (!Array.isArray(source)) {\n    const result: T[] = [];\n    const keys = Object.keys(source) as Array<keyof T>;\n    const length = isArrayLike(source) ? source.length : keys.length;\n\n    for (let i = 0; i < length; i++) {\n      const key = keys[i];\n      const value = source[key] as T;\n\n      if (predicate(value, key as number, source)) {\n        result.push(value);\n      }\n    }\n\n    return result;\n  }\n\n  const result: T[] = [];\n  const length = source.length;\n\n  for (let i = 0; i < length; i++) {\n    const value = source[i];\n    if (predicate(value, i, source)) {\n      result.push(value);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/find.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { find as findLodash } from 'lodash';\nimport { find } from './find';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { slice } from '../_internal/slice';\n\ndescribe('find', () => {\n  const objects = [\n    { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n    { a: 1, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    { a: 2, b: 2, 0: 2, [Symbol.for('a')]: 2 },\n  ];\n\n  it(`should return the found value`, () => {\n    expect(find(objects, object => object.a)).toEqual(objects[1]);\n  });\n\n  it(`should return undefined if value is not found`, () => {\n    expect(find(objects, object => object.a === 3)).toEqual(undefined);\n  });\n\n  it(`find should work with \\`matches\\` shorthands`, () => {\n    expect(find(objects, { b: 2 })).toBe(objects[2]);\n  });\n\n  it(`find should work with \\`matchesProperty\\` shorthands`, () => {\n    expect(find(objects, ['b', 2])).toBe(objects[2]);\n    expect(find(objects, [0, 2])).toBe(objects[2]);\n    expect(find(objects, [Symbol.for('a'), 2])).toBe(objects[2]);\n  });\n\n  it(`find should work with \\`property\\` shorthands`, () => {\n    expect(find(objects, 'b')).toBe(objects[1]);\n    expect(find(objects, 0)).toBe(objects[1]);\n    expect(find(objects, Symbol.for('a'))).toBe(objects[1]);\n  });\n\n  it(`find should return undefined for empty collections`, () => {\n    const emptyValues = empties;\n    const expecting = emptyValues.map(() => undefined);\n\n    const actual = emptyValues.map(value => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return find(value, { a: 3 });\n        // eslint-disable-next-line\n      } catch (e) {}\n    });\n\n    expect(actual).toEqual(expecting);\n  });\n\n  it(`find should provide correct \\`predicate\\` arguments for arrays`, () => {\n    let args: any;\n    const array = ['a'];\n\n    find(array, function () {\n      // eslint-disable-next-line\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual(['a', 0, array]);\n  });\n\n  it(`find should work with an object for \\`collection\\``, () => {\n    const actual = find({ a: 1, b: 2, c: 3 }, n => n < 3);\n\n    expect(actual).toBe(1);\n  });\n\n  it(`find should provide correct \\`predicate\\` arguments for objects`, () => {\n    let args: any;\n    const object = { a: 1 };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    find(object, function () {\n      // eslint-disable-next-line\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual([1, 'a', object]);\n  });\n\n  it('find should support fromIndex', () => {\n    expect(find(objects, { b: 2 }, -1)).toBe(objects[2]);\n    expect(find(objects, { b: 2 }, 0)).toBe(objects[2]);\n    expect(find(objects, { b: 2 }, 1)).toBe(objects[2]);\n    expect(find(objects, { b: 2 }, 2)).toBe(objects[2]);\n    expect(find(objects, { b: 2 }, 3)).toBe(undefined);\n    expect(find(objects, { b: 2 }, 4)).toBe(undefined);\n  });\n\n  it('should return `undefined` when provided `null` or `undefined`', () => {\n    expect(find(null, 'a')).toBe(undefined);\n    expect(find(undefined, 'a')).toBe(undefined);\n  });\n\n  it('should return `undefined` when provided none array-like object', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(find(1, 'a')).toBe(undefined);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(find(true, 'a')).toBe(undefined);\n  });\n\n  it('should support array-like objects', () => {\n    expect(find({ 0: 1, 1: 2, 2: 3, length: 3 }, i => i === 3)).toBe(3);\n    expect(find('123', i => i === '3')).toBe('3');\n    expect(find(args, i => i === 3)).toBe(3);\n  });\n\n  it('should use identity when no _doesMatch is provided', () => {\n    expect(find([0, 1, 2])).toBe(1);\n    expect(find([false, true, false])).toBe(true);\n    expect(find(['', 'hello', ''])).toBe('hello');\n    expect(find({ a: 0, b: 1, c: 2 })).toBe(1);\n    expect(find({ a: false, b: true, c: false })).toBe(true);\n    expect(find({ a: '', b: 'hello', c: '' })).toBe('hello');\n    expect(find('123')).toBe('1');\n    expect(find(args)).toBe(1);\n  });\n\n  it('should throw error when boolean predicate is used', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(() => find({ a: 1, b: 2, c: 3 }, true)).toThrow('doesMatch is not a function');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(() => find({ a: 1, b: 2, c: 3 }, false)).toThrow('doesMatch is not a function');\n    expect(() => find([1, 2, 3], true)).toThrow('undefined is not a function');\n    expect(() => find([1, 2, 3], false)).toThrow('undefined is not a function');\n  });\n\n  it('should return undefined when object matcher has only undefined values for keys', () => {\n    const array = [\n      {\n        label: 'Foo',\n        value: 'foo',\n      },\n      {\n        label: 'Bar',\n        value: 'bar',\n      },\n    ];\n\n    expect(find(array, { value: { missingKey: undefined } })).toBe(undefined);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(find).toEqualTypeOf<typeof findLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(find([0, false, null, undefined, '', 1, 2, 3])).toBe(1);\n    expect(find([0, false, null, undefined, ''])).toBe(undefined);\n    expect(find({ a: 0, b: false, c: null, d: undefined, e: '', f: 1 })).toBe(1);\n    expect(find({ a: 0, b: false, c: null, d: undefined, e: '' })).toBe(undefined);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/find.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ListIteratorTypeGuard } from '../_internal/ListIteratorTypeGuard.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport { ObjectIteratorTypeGuard } from '../_internal/ObjectIterator.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Finds the first element in an array-like object that matches a type guard predicate.\n *\n * @param collection - The array-like object to search\n * @param predicate - The type guard function to test each element\n * @param fromIndex - The index to start searching from\n * @returns The first element that matches the type guard, or undefined if none found\n *\n * @example\n * find([1, '2', 3], (x): x is number => typeof x === 'number')\n * // => 1\n */\nexport function find<T, U extends T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate: ListIteratorTypeGuard<T, U>,\n  fromIndex?: number\n): U | undefined;\n\n/**\n * Finds the first element in an array-like object that matches a predicate.\n *\n * @param collection - The array-like object to search\n * @param predicate - The function or shorthand to test each element\n * @param fromIndex - The index to start searching from\n * @returns The first matching element, or undefined if none found\n *\n * @example\n * find([1, 2, 3], x => x > 2)\n * // => 3\n *\n * find([{ a: 1 }, { a: 2 }], { a: 2 })\n * // => { a: 2 }\n */\nexport function find<T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate?: ListIterateeCustom<T, boolean>,\n  fromIndex?: number\n): T | undefined;\n\n/**\n * Finds the first value in an object that matches a type guard predicate.\n *\n * @param collection - The object to search\n * @param predicate - The type guard function to test each value\n * @param fromIndex - The index to start searching from\n * @returns The first value that matches the type guard, or undefined if none found\n *\n * @example\n * find({ a: 1, b: '2', c: 3 }, (x): x is number => typeof x === 'number')\n * // => 1\n */\nexport function find<T extends object, U extends T[keyof T]>(\n  collection: T | null | undefined,\n  predicate: ObjectIteratorTypeGuard<T, U>,\n  fromIndex?: number\n): U | undefined;\n\n/**\n * Finds the first value in an object that matches a predicate.\n *\n * @param collection - The object to search\n * @param predicate - The function or shorthand to test each value\n * @param fromIndex - The index to start searching from\n * @returns The first matching value, or undefined if none found\n *\n * @example\n * find({ a: 1, b: 2 }, x => x > 1)\n * // => 2\n *\n * find({ a: { x: 1 }, b: { x: 2 } }, { x: 2 })\n * // => { x: 2 }\n */\nexport function find<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>,\n  fromIndex?: number\n): T[keyof T] | undefined;\n\n/**\n * Finds the first item in an object that has a specific property, where the property name is provided as a PropertyKey.\n *\n * @template T\n * @param {ArrayLike<T> | Record<any, any> | null | undefined} source - The source array or object to search through.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} doesMatch - The criteria to match. It can be a function, a partial object, a key-value pair, or a property name.\n * @param {number} [fromIndex=0] - The index to start the search from, defaults to 0.\n * @returns {T | undefined} - The first property value that has the specified property, or `undefined` if no match is found.\n *\n * @example\n * // Using a property name\n * const obj = { a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } };\n * const result = find(obj, 'name');\n * console.log(result); // { id: 1, name: 'Alice' }\n */\nexport function find<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  _doesMatch:\n    | ((item: T, index: number, arr: any) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey = identity,\n  fromIndex = 0\n): T | undefined {\n  if (!source) {\n    return undefined;\n  }\n  if (fromIndex < 0) {\n    fromIndex = Math.max(source.length + fromIndex, 0);\n  }\n\n  const doesMatch = iteratee(_doesMatch);\n  if (!Array.isArray(source)) {\n    const keys = Object.keys(source) as Array<keyof T>;\n\n    for (let i = fromIndex; i < keys.length; i++) {\n      const key = keys[i];\n      const value = source[key] as T;\n\n      if (doesMatch(value, key as number, source)) {\n        return value;\n      }\n    }\n\n    return undefined;\n  }\n\n  return source.slice(fromIndex).find(doesMatch);\n}\n"
  },
  {
    "path": "src/compat/array/findIndex.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { findIndex as findIndexLodash } from 'lodash';\nimport { findIndex } from './findIndex';\nimport { args } from '../_internal/args';\nimport { slice } from '../_internal/slice';\n\ndescribe('findIndex', () => {\n  const objects = [\n    { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n    { a: 1, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    { a: 2, b: 2, 0: 2, [Symbol.for('a')]: 2 },\n  ];\n\n  it(`should return the found value`, () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(findIndex(objects, object => object.a)).toEqual(1);\n  });\n\n  it(`should return -1 if value is not found`, () => {\n    expect(findIndex(objects, object => object.a === 3)).toEqual(-1);\n  });\n\n  it(`findIndex should work with \\`matches\\` shorthands`, () => {\n    expect(findIndex(objects, { b: 2 })).toBe(2);\n  });\n\n  it(`findIndex should work with \\`matchesProperty\\` shorthands`, () => {\n    expect(findIndex(objects, ['b', 2])).toBe(2);\n    expect(findIndex(objects, [0, 2])).toBe(2);\n    expect(findIndex(objects, [Symbol.for('a'), 2])).toBe(2);\n  });\n\n  it(`findIndex should work with \\`property\\` shorthands`, () => {\n    expect(findIndex(objects, 'b')).toBe(1);\n    expect(findIndex(objects, 0)).toBe(1);\n    expect(findIndex(objects, Symbol.for('a'))).toBe(1);\n  });\n\n  it(`findIndex should provide correct \\`predicate\\` arguments for arrays`, () => {\n    let args: any;\n    const array = ['a'];\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    findIndex(array, function () {\n      // eslint-disable-next-line\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual(['a', 0, array]);\n  });\n\n  it('findIndex should support fromIndex', () => {\n    expect(findIndex(objects, { b: 2 }, -1)).toBe(2);\n    expect(findIndex(objects, { b: 2 }, 0)).toBe(2);\n    expect(findIndex(objects, { b: 2 }, 1)).toBe(2);\n    expect(findIndex(objects, { b: 2 }, 2)).toBe(2);\n    expect(findIndex(objects, { b: 2 }, 3)).toBe(-1);\n    expect(findIndex(objects, { b: 2 }, 4)).toBe(-1);\n  });\n\n  it('should return `-1` when provided `null` or `undefined`', () => {\n    expect(findIndex(null, 'a')).toBe(-1);\n    expect(findIndex(undefined, 'a')).toBe(-1);\n  });\n\n  it('should support array-like objects', () => {\n    expect(findIndex({ 0: 'a', 1: 'b', length: 2 }, i => i === 'b')).toBe(1);\n    expect(findIndex('123', i => i === '2')).toBe(1);\n    expect(findIndex(args, i => i === 2)).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(findIndex).toEqualTypeOf<typeof findIndexLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(findIndex([0, false, null, undefined, '', 1, 2, 3])).toBe(5);\n    expect(findIndex([0, false, null, undefined, ''])).toBe(-1);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/findIndex.ts",
    "content": "import { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { identity } from '../function/identity.ts';\nimport { property } from '../object/property.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Finds the index of the first item in an array that has a specific property, where the property name is provided as a PropertyKey.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arr - The array to search through.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} doesMatch - The criteria to match against the items in the array. This can be a function, a partial object, a key-value pair, or a property name.\n * @param {PropertyKey} propertyToCheck - The property name to check for in the items of the array.\n * @param {number} [fromIndex=0] - The index to start the search from, defaults to 0.\n * @returns {number} - The index of the first item that has the specified property, or `-1` if no match is found.\n *\n * @example\n * // Using a property name\n * const items = [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }];\n * const result = findIndex(items, 'name');\n * console.log(result); // 0\n */\nexport function findIndex<T>(\n  arr: ArrayLike<T> | null | undefined,\n  doesMatch: ListIterateeCustom<T, boolean> = identity,\n  fromIndex = 0\n): number {\n  if (!arr) {\n    return -1;\n  }\n  if (fromIndex < 0) {\n    fromIndex = Math.max(arr.length + fromIndex, 0);\n  }\n  const subArray = Array.from(arr).slice(fromIndex);\n  let index = -1;\n  switch (typeof doesMatch) {\n    case 'function': {\n      index = subArray.findIndex(doesMatch);\n      break;\n    }\n    case 'object': {\n      if (Array.isArray(doesMatch) && doesMatch.length === 2) {\n        const key = doesMatch[0];\n        const value = doesMatch[1];\n\n        index = subArray.findIndex(matchesProperty(key, value));\n      } else {\n        index = subArray.findIndex(matches(doesMatch));\n      }\n      break;\n    }\n    case 'number':\n    case 'symbol':\n    case 'string': {\n      index = subArray.findIndex(property(doesMatch));\n    }\n  }\n  return index === -1 ? -1 : index + fromIndex;\n}\n"
  },
  {
    "path": "src/compat/array/findLast.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { findLast as findLastLodash } from 'lodash';\nimport { findLast } from './findLast';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('findLast', () => {\n  const func = findLast;\n\n  const objects = [\n    { a: 0, b: 0 },\n    { a: 1, b: 1 },\n    { a: 2, b: 2 },\n  ];\n\n  const expected = [objects[2], undefined, objects[2]];\n\n  it(`should return the found value`, () => {\n    expect(func(objects, object => object.a)).toEqual(expected[0]);\n  });\n\n  it(`should return \\`${expected[1]}\\` if value is not found`, () => {\n    expect(func(objects, object => object.a === 3)).toEqual(expected[1]);\n  });\n\n  it(`should work with \\`_.matches\\` shorthands`, () => {\n    expect(func(objects, { b: 2 })).toBe(expected[2]);\n  });\n\n  it(`should work with \\`_.matchesProperty\\` shorthands`, () => {\n    expect(func(objects, ['b', 2])).toBe(expected[2]);\n  });\n\n  it(`should work with \\`_.property\\` shorthands`, () => {\n    expect(func(objects, 'b')).toBe(expected[0]);\n  });\n\n  it(`should return \\`${expected[1]}\\` for empty collections`, () => {\n    const emptyValues = empties;\n    const expecting = lodashStable.map(emptyValues, lodashStable.constant(expected[1]));\n\n    const actual = lodashStable.map(emptyValues, value => {\n      try {\n        return func(value, { a: 3 } as any);\n      } catch (e) {\n        //\n      }\n    });\n\n    expect(actual).toEqual(expecting);\n  });\n\n  it(`should provide correct \\`predicate\\` arguments for arrays`, () => {\n    let args: any;\n    const array = ['a'];\n\n    func(array, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual(['a', 0, array]);\n  });\n\n  it(`should work with an object for \\`collection\\``, () => {\n    const actual = findLast({ a: 1, b: 2, c: 3 }, n => n < 3);\n\n    const expected = 2;\n\n    expect(actual).toBe(expected);\n  });\n\n  it(`should provide correct \\`predicate\\` arguments for objects`, () => {\n    let args: any;\n    const object = { a: 1 };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    findLast(object, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual([1, 'a', object]);\n  });\n\n  const resolve = lodashStable.curry(lodashStable.eq);\n\n  lodashStable.each(\n    {\n      'an `arguments` object': args,\n      'an array': [1, 2, 3],\n    },\n    (collection, key) => {\n      const values = lodashStable.toArray(collection);\n\n      it(`should work with ${key} and a positive \\`fromIndex\\``, () => {\n        const expected = [values[1], undefined];\n\n        const actual = [findLast(collection, resolve(values[1]), 1), findLast(collection, resolve(values[2]), 1)];\n\n        expect(actual).toEqual(expected);\n      });\n\n      it(`should work with ${key} and a \\`fromIndex\\` >= \\`length\\``, () => {\n        const indexes = [4, 6, 2 ** 32, Infinity];\n\n        const expected = lodashStable.map(indexes, lodashStable.constant([values[0], undefined, undefined]));\n\n        const actual = lodashStable.map(indexes, fromIndex => [\n          findLast(collection, resolve(1), fromIndex),\n          findLast(collection, resolve(undefined), fromIndex),\n          findLast(collection, resolve(''), fromIndex),\n        ]);\n\n        expect(actual).toEqual(expected);\n      });\n\n      it(`should work with ${key} and treat falsey \\`fromIndex\\` values correctly`, () => {\n        const expected = lodashStable.map(falsey, value => (value === undefined ? values[3] : undefined));\n\n        const actual = lodashStable.map(falsey, fromIndex =>\n          findLast(collection as any, resolve(values[3]), fromIndex as any)\n        );\n\n        expect(actual).toEqual(expected);\n      });\n\n      it(`should work with ${key} and coerce \\`fromIndex\\` to an integer`, () => {\n        const expected = [values[0], values[0], undefined];\n\n        const actual = [\n          findLast(collection, resolve(values[0]), 0.1),\n          findLast(collection, resolve(values[0]), NaN),\n          findLast(collection, resolve(values[2]), '1' as any),\n        ];\n\n        expect(actual).toEqual(expected);\n      });\n\n      it(`should work with ${key} and a negative \\`fromIndex\\``, () => {\n        const expected = [values[1], undefined];\n\n        const actual = [findLast(collection, resolve(values[1]), -2), findLast(collection, resolve(values[2]), -2)];\n\n        expect(actual).toEqual(expected);\n      });\n\n      it(`should work with ${key} and a negative \\`fromIndex\\` <= \\`-length\\``, () => {\n        const indexes = [-4, -6, -Infinity];\n        const expected = lodashStable.map(indexes, lodashStable.constant(values[0]));\n\n        const actual = lodashStable.map(indexes, fromIndex => findLast(collection, resolve(values[0]), fromIndex));\n\n        expect(actual).toEqual(expected);\n      });\n    }\n  );\n\n  it('should use identity when no _doesMatch is provided', () => {\n    expect(findLast([0, 1, 2])).toBe(2);\n    expect(findLast([false, true, false])).toBe(true);\n    expect(findLast(['', 'hello', ''])).toBe('hello');\n    expect(findLast({ a: 0, b: 1, c: 2 })).toBe(2);\n    expect(findLast({ a: false, b: true, c: false })).toBe(true);\n    expect(findLast({ a: '', b: 'hello', c: '' })).toBe('hello');\n    expect(findLast('123')).toBe('3');\n    expect(findLast(args)).toBe(3);\n  });\n\n  it('should throw error when boolean predicate is used', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(() => findLast({ a: 1, b: 2, c: 3 }, true)).toThrow('doesMatch is not a function');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(() => findLast({ a: 1, b: 2, c: 3 }, false)).toThrow('doesMatch is not a function');\n    expect(() => findLast([1, 2, 3], true)).toThrow('undefined is not a function');\n    expect(() => findLast([1, 2, 3], false)).toThrow('undefined is not a function');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(findLast).toEqualTypeOf<typeof findLastLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(findLast([0, false, null, undefined, '', 1, 2, 3])).toBe(3);\n    expect(findLast([0, false, null, undefined, ''])).toBe(undefined);\n    expect(findLast({ a: 0, b: false, c: null, d: undefined, e: '', f: 1, g: 2 })).toBe(2);\n    expect(findLast({ a: 0, b: false, c: null, d: undefined, e: '' })).toBe(undefined);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/findLast.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ListIteratorTypeGuard } from '../_internal/ListIteratorTypeGuard.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport { ObjectIteratorTypeGuard } from '../_internal/ObjectIterator.ts';\nimport { iteratee } from '../util/iteratee.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Finds the last element in a collection that satisfies the predicate.\n *\n * @template T, S\n * @param {ArrayLike<T> | null | undefined} collection - The collection to search.\n * @param {ListIteratorTypeGuard<T, S>} predicate - The predicate function with type guard.\n * @param {number} [fromIndex] - The index to start searching from.\n * @returns {S | undefined} The last element that satisfies the predicate.\n *\n * @example\n * const users = [{ user: 'barney', age: 36 }, { user: 'fred', age: 40 }, { user: 'pebbles', age: 18 }];\n * findLast(users, (o): o is { user: string; age: number } => o.age < 40);\n * // => { user: 'pebbles', age: 18 }\n */\nexport function findLast<T, S extends T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate: ListIteratorTypeGuard<T, S>,\n  fromIndex?: number\n): S | undefined;\n\n/**\n * Finds the last element in a collection that satisfies the predicate.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The collection to search.\n * @param {ListIterateeCustom<T, boolean>} [predicate] - The predicate function, partial object, property-value pair, or property name.\n * @param {number} [fromIndex] - The index to start searching from.\n * @returns {T | undefined} The last element that satisfies the predicate.\n *\n * @example\n * const users = [{ user: 'barney', age: 36 }, { user: 'fred', age: 40 }, { user: 'pebbles', age: 18 }];\n * findLast(users, o => o.age < 40);\n * // => { user: 'pebbles', age: 18 }\n *\n * findLast(users, { age: 36 });\n * // => { user: 'barney', age: 36 }\n *\n * findLast(users, ['age', 18]);\n * // => { user: 'pebbles', age: 18 }\n *\n * findLast(users, 'age');\n * // => { user: 'fred', age: 40 }\n */\nexport function findLast<T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate?: ListIterateeCustom<T, boolean>,\n  fromIndex?: number\n): T | undefined;\n\n/**\n * Finds the last element in an object that satisfies the predicate with type guard.\n *\n * @template T, S\n * @param {T | null | undefined} collection - The object to search.\n * @param {ObjectIteratorTypeGuard<T, S>} predicate - The predicate function with type guard.\n * @param {number} [fromIndex] - The index to start searching from.\n * @returns {S | undefined} The last element that satisfies the predicate.\n *\n * @example\n * const obj = { a: 1, b: 'hello', c: 3 };\n * findLast(obj, (value): value is string => typeof value === 'string');\n * // => 'hello'\n */\nexport function findLast<T extends object, S extends T[keyof T]>(\n  collection: T | null | undefined,\n  predicate: ObjectIteratorTypeGuard<T, S>,\n  fromIndex?: number\n): S | undefined;\n\n/**\n * Finds the last element in an object that satisfies the predicate.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to search.\n * @param {ObjectIterateeCustom<T, boolean>} [predicate] - The predicate function, partial object, property-value pair, or property name.\n * @param {number} [fromIndex] - The index to start searching from.\n * @returns {T[keyof T] | undefined} The last element that satisfies the predicate.\n *\n * @example\n * const obj = { a: { id: 1, name: 'Alice' }, b: { id: 2 }, c: { id: 3, name: 'Bob' } };\n * findLast(obj, o => o.id > 1);\n * // => { id: 3, name: 'Bob' }\n *\n * findLast(obj, { name: 'Bob' });\n * // => { id: 3, name: 'Bob' }\n *\n * findLast(obj, 'name');\n * // => { id: 3, name: 'Bob' }\n */\nexport function findLast<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>,\n  fromIndex?: number\n): T[keyof T] | undefined;\n\n/**\n * Finds the last item in an object that has a specific property, where the property name is provided as a PropertyKey.\n *\n * @template T\n * @param {ArrayLike<T> | Record<any, any> | null | undefined} source - The source array or object to search through.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} doesMatch - The criteria to match. It can be a function, a partial object, a key-value pair, or a property name.\n * @param {number} [fromIndex] - The index to start the search from, defaults to source.length-1 for arrays or Object.keys(source).length-1 for objects.\n * @returns {T | undefined} - The last property value that has the specified property, or `undefined` if no match is found.\n *\n * @example\n * // Using a property name\n * const obj = { a: { id: 1, name: 'Alice' }, b: { id: 2 }, c: { id: 3, name: 'Bob' } };\n * const result = findLast(obj, 'name');\n * console.log(result); // { id: 3, name: 'Bob' }\n */\nexport function findLast<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  _doesMatch:\n    | ((item: T, index: number, arr: any) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey = identity,\n  fromIndex?: number\n): T | undefined {\n  if (!source) {\n    return undefined;\n  }\n\n  const length = Array.isArray(source) ? source.length : Object.keys(source).length;\n\n  fromIndex = toInteger(fromIndex ?? length - 1);\n\n  if (fromIndex < 0) {\n    fromIndex = Math.max(length + fromIndex, 0);\n  } else {\n    fromIndex = Math.min(fromIndex, length - 1);\n  }\n\n  const doesMatch = iteratee(_doesMatch);\n\n  if (!Array.isArray(source)) {\n    const keys = Object.keys(source) as Array<keyof T>;\n\n    for (let i = fromIndex; i >= 0; i--) {\n      const key = keys[i];\n      const value = source[key] as T;\n\n      if (doesMatch(value, key as number, source)) {\n        return value;\n      }\n    }\n\n    return undefined;\n  }\n\n  return source.slice(0, fromIndex + 1).findLast(doesMatch);\n}\n"
  },
  {
    "path": "src/compat/array/findLastIndex.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { findLastIndex as findLastIndexLodash } from 'lodash';\nimport { findLastIndex } from './findLastIndex';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { stubZero } from '../_internal/stubZero';\n\ndescribe('findLastIndex', () => {\n  const objects = [\n    { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n    { a: 1, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    { a: 2, b: 2, 0: 2, [Symbol.for('a')]: 2 },\n  ];\n\n  it(`should return the found value`, () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(findLastIndex(objects, object => object.a)).toEqual(2);\n  });\n\n  it(`should return -1 if value is not found`, () => {\n    expect(findLastIndex(objects, object => object.a === 3)).toEqual(-1);\n  });\n\n  it(`findLastIndex should work with \\`matches\\` shorthands`, () => {\n    expect(findLastIndex(objects, { b: 2 })).toBe(2);\n  });\n\n  it(`findLastIndex should work with \\`matchesProperty\\` shorthands`, () => {\n    expect(findLastIndex(objects, ['b', 2])).toBe(2);\n    expect(findLastIndex(objects, [0, 2])).toBe(2);\n    expect(findLastIndex(objects, [Symbol.for('a'), 2])).toBe(2);\n  });\n\n  it(`findLastIndex should work with \\`property\\` shorthands`, () => {\n    expect(findLastIndex(objects, 'b')).toBe(2);\n    expect(findLastIndex(objects, 0)).toBe(2);\n    expect(findLastIndex(objects, Symbol.for('a'))).toBe(2);\n  });\n\n  it(`findLastIndex should provide correct \\`predicate\\` arguments for arrays`, () => {\n    let args: any;\n    const array = ['a'];\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    findLastIndex(array, function () {\n      // eslint-disable-next-line\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual(['a', 0, array]);\n  });\n\n  const array = [1, 2, 3, 1, 2, 3];\n\n  it(`\\`findLastIndex\\` should return the index of the last matched value`, () => {\n    expect(findLastIndex(array, x => x === 3)).toBe(5);\n  });\n\n  it(`\\`findLastIndex\\` should work with a positive \\`fromIndex\\``, () => {\n    expect(findLastIndex(array, x => x === 1, 2)).toBe(0);\n  });\n\n  it(`\\`findLastIndex\\` should work with a \\`fromIndex\\` >= \\`length\\``, () => {\n    const values = [6, 8, 2 ** 32, Infinity];\n    const expected = values.map(() => [-1, 3, -1]);\n\n    const actual = values.map(fromIndex => [\n      findLastIndex(array, x => x === undefined, fromIndex),\n      findLastIndex(array, x => x === 1, fromIndex),\n      // eslint-disable-next-line\n      // @ts-ignore\n      findLastIndex(array, x => x === '', fromIndex),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`findLastIndex\\` should work with a negative \\`fromIndex\\``, () => {\n    expect(findLastIndex(array, x => x === 2, -3)).toBe(1);\n  });\n\n  it(`\\`findLastIndex\\` should work with a negative \\`fromIndex\\` <= \\`-length\\``, () => {\n    const values = [-6, -8, -Infinity];\n    const expected = values.map(stubZero);\n\n    const actual = values.map(fromIndex => findLastIndex(array, x => x === 1, fromIndex));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`findLastIndex\\` should treat falsey \\`fromIndex\\` values correctly`, () => {\n    const expected = falsey.map(value => (value === undefined ? 5 : -1));\n\n    const actual = falsey.map(fromIndex =>\n      // eslint-disable-next-line\n      // @ts-ignore\n      findLastIndex(array, x => x === 3, fromIndex)\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`findLastIndex\\` should coerce \\`fromIndex\\` to an integer`, () => {\n    expect(findLastIndex(array, x => x === 2, 4.2)).toBe(4);\n  });\n\n  it('should return `-1` when provided `null` or `undefined`', () => {\n    expect(findLastIndex(null, 'a')).toBe(-1);\n    expect(findLastIndex(undefined, 'a')).toBe(-1);\n  });\n\n  it('should support array-like objects', () => {\n    expect(findLastIndex({ 0: 'a', 1: 'b', length: 2 }, i => i === 'b')).toBe(1);\n    expect(findLastIndex('123', i => i === '2')).toBe(1);\n    expect(findLastIndex(args, i => i === 2)).toBe(1);\n  });\n\n  it('should use identity function when no predicate is provided', () => {\n    expect(findLastIndex([null, undefined, 0, 'hello', 'world'])).toBe(4);\n    expect(findLastIndex([false, '', 0, 1, 2, null])).toBe(4);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(findLastIndex).toEqualTypeOf<typeof findLastIndexLodash>();\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    expect(findLastIndex([0, false, null, undefined, '', 1, 2, 3])).toBe(7);\n    expect(findLastIndex([0, false, null, undefined, ''])).toBe(-1);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/findLastIndex.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { property } from '../object/property.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Finds the index of the last element in the array that satisfies the predicate.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to search through.\n * @param {ListIterateeCustom<T, boolean>} [predicate] - The predicate function, partial object, property-value pair, or property name.\n * @param {number} [fromIndex] - The index to start searching from.\n * @returns {number} The index of the last matching element, or -1 if not found.\n *\n * @example\n * const users = [\n *   { user: 'barney', active: true },\n *   { user: 'fred', active: false },\n *   { user: 'pebbles', active: false }\n * ];\n *\n * findLastIndex(users, o => o.user === 'pebbles');\n * // => 2\n *\n * findLastIndex(users, { user: 'barney', active: true });\n * // => 0\n *\n * findLastIndex(users, ['active', false]);\n * // => 2\n *\n * findLastIndex(users, 'active');\n * // => 0\n */\nexport function findLastIndex<T>(\n  array: ArrayLike<T> | null | undefined,\n  predicate?: ListIterateeCustom<T, boolean>,\n  fromIndex?: number\n): number;\n\n/**\n * Finds the index of the last element in the array that satisfies the predicate.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arr - The array to search through.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} doesMatch - The predicate function, partial object, property-value pair, or property name.\n * @param {number} [fromIndex=arr.length - 1] - The index to start the search from, defaults to the last index of the array.\n * @returns {number} The index of the last matching element, or -1 if not found.\n *\n * @example\n * const items = [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }];\n * findLastIndex(items, 'name');\n * // => 1\n */\nexport function findLastIndex<T>(\n  arr: ArrayLike<T> | null | undefined,\n  doesMatch: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey = identity,\n  fromIndex: number = arr ? arr.length - 1 : 0\n): number {\n  if (!arr) {\n    return -1;\n  }\n  if (fromIndex < 0) {\n    fromIndex = Math.max(arr.length + fromIndex, 0);\n  } else {\n    fromIndex = Math.min(fromIndex, arr.length - 1);\n  }\n\n  const subArray = toArray(arr).slice(0, fromIndex + 1);\n\n  switch (typeof doesMatch) {\n    case 'function': {\n      return subArray.findLastIndex(doesMatch);\n    }\n    case 'object': {\n      if (Array.isArray(doesMatch) && doesMatch.length === 2) {\n        const key = doesMatch[0];\n        const value = doesMatch[1];\n\n        return subArray.findLastIndex(matchesProperty(key, value));\n      } else {\n        return subArray.findLastIndex(matches(doesMatch));\n      }\n    }\n    case 'number':\n    case 'symbol':\n    case 'string': {\n      return subArray.findLastIndex(property(doesMatch));\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/array/first.ts",
    "content": "export { head as first } from './head.ts';\n"
  },
  {
    "path": "src/compat/array/flatMap.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flatMap as flatMapLodash } from 'lodash';\nimport { flatMap } from './flatMap';\nimport { map } from './map';\nimport { identity } from '../../function/identity';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport { each, stubArray } from '../compat';\nimport { range } from '../math/range';\nimport { constant } from '../util/constant';\n\ndescribe('flatMap', () => {\n  it('should map and flatten values', () => {\n    const array = [1, 2];\n    const expected = [1, 1, 2, 2];\n\n    const duplicate = (n: number) => [n, n];\n    expect(flatMap(array, duplicate)).toEqual(expected);\n  });\n\n  it('should work with empty arrays', () => {\n    expect(flatMap([], n => [n, n])).toEqual([]);\n  });\n\n  it('should work with `_.identity`', () => {\n    const array = [[1], [2, [3]], 4];\n    expect(flatMap(array, identity)).toEqual([1, 2, [3], 4]);\n  });\n\n  it('should support shortcut fusion', () => {\n    const array = range(1, 4);\n    const iteratee = (n: number) => [n, n * n];\n    const mapper = map(array, iteratee);\n\n    expect(flatMap(array, iteratee)).toEqual([1, 1, 2, 4, 3, 9]);\n    expect(flatMap(mapper, identity)).toEqual([1, 1, 2, 4, 3, 9]);\n  });\n\n  it('should treat sparse arrays correctly', () => {\n    const array = [1];\n    array[2] = 3;\n\n    const expected = [1, undefined, 3];\n    const duplicator = constant([1, undefined, 3]);\n\n    expect(flatMap(array, identity)).toEqual(expected);\n    expect(flatMap([array], identity)).toEqual(expected);\n    expect(flatMap(array, value => (value === undefined ? [] : [value]))).toEqual([1, 3]);\n    expect(flatMap(array, duplicator)).toEqual([1, undefined, 3, 1, undefined, 3, 1, undefined, 3]);\n  });\n\n  it('should work with a \"_.property\" style iteratee', () => {\n    const objects = [{ a: [1, 2] }, { a: [3, 4] }];\n    expect(flatMap(objects, 'a')).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should work with objects', () => {\n    const object = { a: 1, b: 2 };\n    const expected = [1, 1, 2, 2];\n\n    const duplicate = (n: number) => [n, n];\n    expect(flatMap(object, duplicate)).toEqual(expected);\n  });\n\n  it('should work with nullish values', () => {\n    expect(flatMap(null, identity)).toEqual([]);\n    expect(flatMap(undefined, identity)).toEqual([]);\n  });\n\n  it('should handle empty values in arrays', () => {\n    const array = empties.slice();\n    const result = flatMap(array, value => [value, value]);\n    expect(result.length).toBe(array.length * 2);\n\n    for (const value of array) {\n      let count = 0;\n      for (const item of result) {\n        if (Object.is(item, value)) {\n          count++;\n        }\n      }\n      expect(count).toBe(2);\n    }\n  });\n\n  it('should work with undefined iteratee', () => {\n    const array = [[1], [2, [3]], 4];\n    expect(flatMap(array)).toEqual([1, 2, [3], 4]);\n  });\n\n  it(`should iterate over own string keyed properties of objects`, () => {\n    function Foo(this: any) {\n      this.a = [1, 2];\n    }\n    Foo.prototype.b = [3, 4];\n\n    // @ts-expect-error - Foo is a constructor\n    const actual = flatMap(new Foo(), identity);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it(`should use \\`_.identity\\` when \\`iteratee\\` is nullish`, () => {\n    const array = [\n      [1, 2],\n      [3, 4],\n    ];\n    const object = { a: [1, 2], b: [3, 4] };\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, constant([1, 2, 3, 4]));\n\n    each([array, object], collection => {\n      // @ts-expect-error - testing\n      const actual = map(values, (value, index) => (index ? flatMap(collection, value) : flatMap(collection)));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should accept a falsey \\`collection\\``, () => {\n    const expected = map(falsey, stubArray);\n\n    const actual = map(falsey, (collection, index) => {\n      // @ts-expect-error - testing\n      return index ? flatMap(collection) : flatMap();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should treat number values for \\`collection\\` as empty`, () => {\n    // @ts-expect-error - testing\n    expect(flatMap(1)).toEqual([]);\n  });\n\n  it(`should work with objects with non-number length properties`, () => {\n    const object = { length: [1, 2] };\n    expect(flatMap(object, identity)).toEqual([1, 2]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flatMap).toEqualTypeOf<typeof flatMapLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flatMap.ts",
    "content": "import { flattenDepth } from './flattenDepth.ts';\nimport { map } from './map.ts';\nimport { isNil } from '../../predicate/isNil.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @template T\n * @param {Record<string, Many<T>> | Record<number, Many<T>> | null | undefined} collection - The collection to iterate over.\n * @returns {T[]} Returns the new flattened array.\n *\n * @example\n * const obj = { a: [1, 2], b: [3, 4] };\n * flatMap(obj);\n * // => [1, 2, 3, 4]\n */\nexport function flatMap<T>(collection: Record<string, Many<T>> | Record<number, Many<T>> | null | undefined): T[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @returns {any[]} Returns the new flattened array.\n *\n * @example\n * flatMap({ a: 1, b: 2 });\n * // => [1, 2]\n */\nexport function flatMap(collection: object | null | undefined): any[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @template T, R\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {ListIterator<T, Many<R>>} iteratee - The function invoked per iteration.\n * @returns {R[]} Returns the new flattened array.\n *\n * @example\n * function duplicate(n) {\n *   return [n, n];\n * }\n *\n * flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nexport function flatMap<T, R>(collection: ArrayLike<T> | null | undefined, iteratee: ListIterator<T, Many<R>>): R[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @template T, R\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterator<T, Many<R>>} iteratee - The function invoked per iteration.\n * @returns {R[]} Returns the new flattened array.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * flatMap(obj, (value, key) => [key, value]);\n * // => ['a', 1, 'b', 2]\n */\nexport function flatMap<T extends object, R>(\n  collection: T | null | undefined,\n  iteratee: ObjectIterator<T, Many<R>>\n): R[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {string} iteratee - The property name to use as iteratee.\n * @returns {any[]} Returns the new flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', hobbies: ['hiking', 'coding'] },\n *   { user: 'fred', hobbies: ['reading'] }\n * ];\n * flatMap(users, 'hobbies');\n * // => ['hiking', 'coding', 'reading']\n */\nexport function flatMap(collection: object | null | undefined, iteratee: string): any[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {object} iteratee - The object properties to match.\n * @returns {boolean[]} Returns the new flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', age: 36, active: true },\n *   { user: 'fred', age: 40, active: false }\n * ];\n * flatMap(users, { active: false });\n * // => [false]\n */\nexport function flatMap(collection: object | null | undefined, iteratee: object): boolean[];\n\n/**\n * Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.\n *\n * @template R\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {any} [iteratee] - The function invoked per iteration.\n * @returns {R[]} Returns the new flattened array.\n *\n * @example\n * flatMap([1, 2], n => [n, n * 2]);\n * // => [1, 2, 2, 4]\n */\nexport function flatMap<R = any>(collection: object | null | undefined, iteratee?: any): R[] {\n  if (isNil(collection)) {\n    return [];\n  }\n\n  // eslint-disable-next-line\n  // @ts-ignore\n  const mapped = isNil(iteratee) ? map(collection) : map(collection, iteratee);\n\n  return flattenDepth(mapped, 1) as R[];\n}\n"
  },
  {
    "path": "src/compat/array/flatMapDeep.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flatMapDeep as flatMapDeepLodash } from 'lodash';\nimport { flatMapDeep } from './flatMapDeep';\n\ndescribe('flatMapDeep', () => {\n  const array = [1, 2, 3, 4];\n\n  function duplicate(n: number) {\n    return [n, n];\n  }\n\n  it('should map values in array to a new flattened array', () => {\n    const actual = flatMapDeep(array, duplicate);\n    const expected = array.map(duplicate).flat(Infinity);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with property shorthands', () => {\n    const objects = [{ a: [1, 2] }, { a: [3, 4] }];\n    expect(flatMapDeep(objects, 'a')).toEqual(array);\n  });\n\n  it('should iterate over own string keyed properties of objects', () => {\n    function Foo(this: any) {\n      this.a = [1, 2];\n    }\n    Foo.prototype.b = [3, 4];\n\n    const actual = flatMapDeep(new (Foo as any)(), (value: any) => value);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should use identity when iteratee is nullish', () => {\n    const array = [\n      [1, 2],\n      [3, 4],\n    ];\n    const object = { a: [1, 2], b: [3, 4] };\n    const values = [undefined, null];\n    const expected = values.map(() => [1, 2, 3, 4]);\n\n    [array, object].forEach(collection => {\n      const actual = values.map(value => (value ? flatMapDeep(collection, value) : flatMapDeep(collection)));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should accept a falsey collection', () => {\n    const falsey = [null, undefined, false, 0, NaN, ''];\n    const expected = falsey.map(() => []);\n\n    const actual = falsey.map(collection => {\n      try {\n        // @ts-expect-error - invalid argument\n        return collection ? flatMapDeep(collection) : flatMapDeep();\n      } catch (e) {\n        return [];\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat number values for collection as empty', () => {\n    // @ts-expect-error - invalid argument\n    expect(flatMapDeep(1)).toEqual([]);\n  });\n\n  it('should work with objects with non-number length properties', () => {\n    const object = { length: [1, 2] };\n    expect(flatMapDeep(object, value => value)).toEqual([1, 2]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flatMapDeep).toEqualTypeOf<typeof flatMapDeepLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flatMapDeep.ts",
    "content": "import { flatMapDepth } from './flatMapDepth.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\n\ntype RecursiveArray<T> = Array<T | RecursiveArray<T>>;\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @template T\n * @param {Record<string, RecursiveArray<T> | T> | Record<number, RecursiveArray<T> | T> | null | undefined} collection - The collection to iterate over.\n * @returns {T[]} Returns the new deeply flattened array.\n *\n * @example\n * const obj = { a: [[1, 2]], b: [[[3]]] };\n * flatMapDeep(obj);\n * // => [1, 2, 3]\n */\nexport function flatMapDeep<T>(\n  collection:\n    | Record<string, ListOfRecursiveArraysOrValues<T> | T>\n    | Record<number, ListOfRecursiveArraysOrValues<T> | T>\n    | null\n    | undefined\n): T[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @template T, R\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {ListIterator<T, RecursiveArray<R> | R>} iteratee - The function invoked per iteration.\n * @returns {R[]} Returns the new deeply flattened array.\n *\n * @example\n * function duplicate(n) {\n *   return [[[n, n]]];\n * }\n *\n * flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nexport function flatMapDeep<T, R>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<R> | R>\n): R[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @template T, R\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterator<T, RecursiveArray<R> | R>} iteratee - The function invoked per iteration.\n * @returns {R[]} Returns the new deeply flattened array.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * flatMapDeep(obj, (value, key) => [[[key, value]]]);\n * // => ['a', 1, 'b', 2]\n */\nexport function flatMapDeep<T extends object, R>(\n  collection: T | null | undefined,\n  iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<R> | R>\n): R[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {string} iteratee - The property name to use as iteratee.\n * @returns {any[]} Returns the new deeply flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', hobbies: [['hiking', 'coding']] },\n *   { user: 'fred', hobbies: [['reading']] }\n * ];\n * flatMapDeep(users, 'hobbies');\n * // => ['hiking', 'coding', 'reading']\n */\nexport function flatMapDeep(collection: object | null | undefined, iteratee: string): any[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {object} iteratee - The object properties to match.\n * @returns {boolean[]} Returns the new deeply flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', active: [true, false] },\n *   { user: 'fred', active: [false] }\n * ];\n * flatMapDeep(users, { active: [false] });\n * // => [false]\n */\nexport function flatMapDeep(collection: object | null | undefined, iteratee: object): boolean[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results.\n *\n * @template T, R\n * @param {Record<string, ArrayLike<T | RecursiveArray<T>> | T> | Record<number, ArrayLike<T | RecursiveArray<T>> | T> | ArrayLike<T> | object | null | undefined} collection - The array or object to iterate over.\n * @param {((value: T, index: number, array: ArrayLike<T>) => ArrayLike<R | RecursiveArray<R>> | R) | ((value: T[keyof T], key: string, object: T) => ArrayLike<R | RecursiveArray<R>> | R) | string | object} [iteratee] - The function that produces the new array elements.\n * @returns {T[] | R[] | any[] | boolean[]} A new array that has been deeply flattened.\n *\n * @example\n * flatMapDeep([1, 2, 3], n => [[n, n]]);\n * // => [1, 1, 2, 2, 3, 3]\n */\nexport function flatMapDeep<T, R>(\n  collection:\n    | Record<string, ArrayLike<T | RecursiveArray<T>> | T>\n    | Record<number, ArrayLike<T | RecursiveArray<T>> | T>\n    | ArrayLike<T>\n    | object\n    | null\n    | undefined,\n  iteratee?:\n    | ((value: T, index: number, array: ArrayLike<T>) => ArrayLike<R | RecursiveArray<R>> | R)\n    | ((value: T[keyof T], key: string, object: T) => ArrayLike<R | RecursiveArray<R>> | R)\n    | string\n    | object\n): T[] | R[] | any[] | boolean[] {\n  return flatMapDepth(collection, iteratee as any, Infinity);\n}\n"
  },
  {
    "path": "src/compat/array/flatMapDepth.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flatMapDepth as flatMapDepthLodash } from 'lodash';\nimport { flatMapDepth } from './flatMapDepth';\n\ndescribe('flatMapDepth', () => {\n  const array = [1, 2, 3, 4];\n\n  function duplicate(n: number) {\n    return [n, n];\n  }\n\n  it('should map values in array to a new flattened array', () => {\n    const actual = flatMapDepth(array, duplicate, 1);\n    const expected = array.map(duplicate).flat(1);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with property shorthands', () => {\n    const objects = [{ a: [1, 2] }, { a: [3, 4] }];\n    expect(flatMapDepth(objects, 'a', 1)).toEqual(array);\n  });\n\n  it('should iterate over own string keyed properties of objects', () => {\n    function Foo(this: any) {\n      this.a = [1, 2];\n    }\n    Foo.prototype.b = [3, 4];\n\n    const actual = flatMapDepth(new (Foo as any)(), (value: any) => value, 1);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should use identity when iteratee is nullish', () => {\n    const array = [\n      [1, 2],\n      [3, 4],\n    ];\n    const object = { a: [1, 2], b: [3, 4] };\n    const values = [undefined, null];\n    const expected = values.map(() => [1, 2, 3, 4]);\n\n    [array, object].forEach(collection => {\n      const actual = values.map(value =>\n        // eslint-disable-next-line\n        // @ts-ignore\n        value ? flatMapDepth(collection, value, 1) : flatMapDepth(collection, undefined, 1)\n      );\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should accept a falsey collection', () => {\n    const falsey = [null, undefined, false, 0, NaN, ''];\n    const expected = falsey.map(() => []);\n\n    const actual = falsey.map(collection => {\n      try {\n        // @ts-expect-error - invalid argument\n        return collection ? flatMapDepth(collection, undefined, 1) : flatMapDepth(undefined, undefined, 1);\n      } catch (e) {\n        return [];\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat number values for collection as empty', () => {\n    // @ts-expect-error - invalid argument\n    expect(flatMapDepth(1, undefined, 1)).toEqual([]);\n  });\n\n  it('should work with objects with non-number length properties', () => {\n    const object = { length: [1, 2] };\n    expect(flatMapDepth(object, value => value, 1)).toEqual([1, 2]);\n  });\n\n  it('should work with different depth values', () => {\n    const nested = [[[1, 2]], [[3, 4]]];\n    expect(flatMapDepth(nested, x => x, 0)).toEqual([[[1, 2]], [[3, 4]]]);\n    expect(flatMapDepth(nested, x => x, 2)).toEqual([1, 2, 3, 4]);\n    expect(flatMapDepth(nested, x => x, Infinity)).toEqual([1, 2, 3, 4]);\n    expect(flatMapDepth(nested)).toEqual([\n      [1, 2],\n      [3, 4],\n    ]);\n    expect(flatMapDepth(nested, x => x)).toEqual([\n      [1, 2],\n      [3, 4],\n    ]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flatMapDepth).toEqualTypeOf<typeof flatMapDepthLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flatMapDepth.ts",
    "content": "import { flatten } from './flatten.ts';\nimport { map } from './map.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @template T\n * @param {Record<string, ListOfRecursiveArraysOrValues<T> | T> | Record<number, ListOfRecursiveArraysOrValues<T> | T> | null | undefined} collection - The collection to iterate over.\n * @returns {T[]} Returns the new flattened array.\n *\n * @example\n * const obj = { a: [[1, 2]], b: [[[3]]] };\n * flatMapDepth(obj);\n * // => [1, 2, [3]]\n */\nexport function flatMapDepth<T>(\n  collection:\n    | Record<string, ListOfRecursiveArraysOrValues<T> | T>\n    | Record<number, ListOfRecursiveArraysOrValues<T> | T>\n    | null\n    | undefined\n): T[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @template T, R\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {ListIterator<T, RecursiveArray<R> | R>} iteratee - The function invoked per iteration.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {R[]} Returns the new flattened array.\n *\n * @example\n * function duplicate(n) {\n *   return [[n, n]];\n * }\n *\n * flatMapDepth([1, 2], duplicate, 2);\n * // => [1, 1, 2, 2]\n */\nexport function flatMapDepth<T, R>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<R> | R>,\n  depth?: number\n): R[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @template T, R\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterator<T, RecursiveArray<R> | R>} iteratee - The function invoked per iteration.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {R[]} Returns the new flattened array.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * flatMapDepth(obj, (value, key) => [[key, value]], 2);\n * // => ['a', 1, 'b', 2]\n */\nexport function flatMapDepth<T extends object, R>(\n  collection: T | null | undefined,\n  iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<R> | R>,\n  depth?: number\n): R[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {string} iteratee - The property name to use as iteratee.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {any[]} Returns the new flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', hobbies: [['hiking'], ['coding']] },\n *   { user: 'fred', hobbies: [['reading']] }\n * ];\n * flatMapDepth(users, 'hobbies', 2);\n * // => ['hiking', 'coding', 'reading']\n */\nexport function flatMapDepth(collection: object | null | undefined, iteratee: string, depth?: number): any[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {object} iteratee - The object properties to match.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {boolean[]} Returns the new flattened array.\n *\n * @example\n * const users = [\n *   { user: 'barney', active: [[true], [false]] },\n *   { user: 'fred', active: [[false]] }\n * ];\n * flatMapDepth(users, { active: [[false]] });\n * // => [false]\n */\nexport function flatMapDepth(collection: object | null | undefined, iteratee: object, depth?: number): boolean[];\n\n/**\n * Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.\n *\n * @template T, R\n * @param {Record<string, ArrayLike<T | ListOfRecursiveArraysOrValues<T>> | T> | Record<number, ArrayLike<T | ListOfRecursiveArraysOrValues<T>> | T> | ArrayLike<T> | object | null | undefined} collection - The array or object to iterate over.\n * @param {((value: T, index: number, array: ArrayLike<T>) => ArrayLike<R | RecursiveArray<R>> | R) | ((value: T[keyof T], key: string, object: T) => ArrayLike<R | RecursiveArray<R>> | R) | string | object} [iteratee] - The function that produces the new array elements.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {T[] | R[] | any[] | boolean[]} A new array that has been flattened up to the specified depth.\n *\n * @example\n * flatMapDepth([1, 2, 3], n => [[n, n]], 2);\n * // => [1, 1, 2, 2, 3, 3]\n */\nexport function flatMapDepth<T, R>(\n  collection:\n    | Record<string, ArrayLike<T | ListOfRecursiveArraysOrValues<T>> | T>\n    | Record<number, ArrayLike<T | ListOfRecursiveArraysOrValues<T>> | T>\n    | ArrayLike<T>\n    | object\n    | null\n    | undefined,\n  iteratee:\n    | ((value: T, index: number, array: ArrayLike<T>) => ArrayLike<R | ListOfRecursiveArraysOrValues<R>> | R)\n    | ((value: T[keyof T], key: string, object: T) => ArrayLike<R | ListOfRecursiveArraysOrValues<R>> | R)\n    | string\n    | object = identity,\n  depth = 1\n): T[] | R[] | any[] | boolean[] {\n  if (collection == null) {\n    return [];\n  }\n\n  const iterateeFn = createIteratee(iteratee);\n  const mapped = map(collection, iterateeFn);\n\n  return (flatten as any)(mapped, depth);\n}\n"
  },
  {
    "path": "src/compat/array/flatten.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flatten as flattenLodash } from 'lodash';\nimport { flatten } from './flatten';\nimport { args } from '../_internal/args';\n\ndescribe('flatten', () => {\n  it('should flatten `arguments` objects', () => {\n    const array = [args, [args]];\n    const expected = [1, 2, 3, args];\n    const actual = flatten(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const array = [[1, 2, 3], Array(3)];\n    const expected = [1, 2, 3, undefined, undefined, undefined];\n    const actual = flatten(array);\n\n    expect(actual).toEqual(expected);\n    expect('4' in actual).toBeTruthy();\n  });\n\n  it('should flatten objects with a truthy `Symbol.isConcatSpreadable` value', () => {\n    const object = { 0: 'a', length: 1, [Symbol.isConcatSpreadable]: true };\n    const array = [object];\n    const expected = ['a'];\n    const actual = flatten(array);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with empty arrays', () => {\n    const array = [[], [[]], [[], [[[]]]]];\n    const expected = [[], [], [[[]]]];\n    const actual = flatten(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support flattening of nested arrays', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    const expected = [1, 2, [3, [4]], 5];\n    const actual = flatten(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty array for non array-like objects', () => {\n    const nonArray = { 0: 'a' };\n    const expected: [] = [];\n    const actual = flatten(nonArray as any);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support array-like', () => {\n    expect(flatten({ 0: [1, 2, 3], length: 1 })).toEqual([1, 2, 3]);\n    expect(flatten('123')).toEqual(['1', '2', '3']);\n    expect(flatten(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flatten).toEqualTypeOf<typeof flattenLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flatten.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Flattens array up to depth times.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} value - The array to flatten.\n * @param {number} depth - The maximum recursion depth.\n * @returns {any[]} Returns the new flattened array.\n *\n * @example\n * flatten([1, [2, [3, [4]], 5]], 2);\n * // => [1, 2, 3, [4], 5]\n */\nexport function flatten<T>(value: ArrayLike<T | readonly T[]> | null | undefined): T[];\n\nexport function flatten<T>(value: ArrayLike<T | readonly T[]> | null | undefined, depth = 1): T[] {\n  const result: T[] = [];\n  const flooredDepth = Math.floor(depth);\n\n  if (!isArrayLike(value)) {\n    return result as T[];\n  }\n\n  const recursive = (arr: readonly T[], currentDepth: number) => {\n    for (let i = 0; i < arr.length; i++) {\n      const item = arr[i];\n      if (\n        currentDepth < flooredDepth &&\n        (Array.isArray(item) ||\n          Boolean(item?.[Symbol.isConcatSpreadable as keyof object]) ||\n          (item !== null && typeof item === 'object' && Object.prototype.toString.call(item) === '[object Arguments]'))\n      ) {\n        if (Array.isArray(item)) {\n          recursive(item, currentDepth + 1);\n        } else {\n          recursive(Array.from(item as T[]), currentDepth + 1);\n        }\n      } else {\n        result.push(item);\n      }\n    }\n  };\n\n  recursive(Array.from(value) as any, 0);\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/flattenDeep.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flattenDeep as flattenDeepLodash } from 'lodash';\nimport { flattenDeep } from './flattenDeep';\nimport { args } from '../_internal/args';\n\ndescribe('flattenDeep', () => {\n  it('should flattenDeep `arguments` objects', () => {\n    const array = [args, [args]];\n    const expected = [1, 2, 3, 1, 2, 3];\n    const actual = flattenDeep(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const array = [[1, 2, 3], Array(3)];\n    const expected = [1, 2, 3, undefined, undefined, undefined];\n    const actual = flattenDeep(array);\n\n    expect(actual).toEqual(expected);\n    expect('4' in actual).toBeTruthy();\n  });\n\n  it('should flattenDeep objects with a truthy `Symbol.isConcatSpreadable` value', () => {\n    const object = { 0: 'a', length: 1, [Symbol.isConcatSpreadable]: true };\n    const array = [object];\n    const expected = ['a'];\n    const actual = flattenDeep(array);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with empty arrays', () => {\n    const array = [[], [[]], [[], [[[]]]]];\n    const expected: [] = [];\n    const actual = flattenDeep(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support flattening of nested arrays', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    const expected = [1, 2, 3, 4, 5];\n    const actual = flattenDeep(array);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty array for non array-like objects', () => {\n    const nonArray = { 0: 'a' };\n    const expected: [] = [];\n    const actual = flattenDeep(nonArray as any);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support array-like', () => {\n    expect(flattenDeep({ 0: [1, 2, [3]], length: 1 })).toEqual([1, 2, 3]);\n    expect(flattenDeep('123')).toEqual(['1', '2', '3']);\n    expect(flattenDeep(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flattenDeep).toEqualTypeOf<typeof flattenDeepLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flattenDeep.ts",
    "content": "import { flattenDepth } from './flattenDepth.ts';\nimport { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.ts';\n\n/**\n * Recursively flattens array.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to flatten.\n * @returns {Array<ExtractNestedArrayType<T>>} Returns the new flattened array.\n *\n * @example\n * flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nexport function flattenDeep<T>(\n  value: ListOfRecursiveArraysOrValues<T> | null | undefined\n): Array<T extends string ? T : T extends ArrayLike<any> ? never : T> {\n  return flattenDepth(value, Infinity) as any;\n}\n"
  },
  {
    "path": "src/compat/array/flattenDepth.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flattenDepth as flattenDepthLodash } from 'lodash';\nimport { flattenDepth } from './flattenDepth';\nimport { args } from '../_internal/args';\n\ndescribe('flattenDepth', () => {\n  it('should flattenDepth `arguments` objects', () => {\n    const array = [args, [args]];\n    const expected = [1, 2, 3, 1, 2, 3];\n    const actual = flattenDepth(array, 2);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const array = [[1, 2, 3], Array(3)];\n    const expected = [1, 2, 3, undefined, undefined, undefined];\n    const actual = flattenDepth(array);\n\n    expect(actual).toEqual(expected);\n    expect('4' in actual).toBeTruthy();\n  });\n\n  it('should flattenDepth objects with a truthy `Symbol.isConcatSpreadable` value', () => {\n    const object = { 0: 'a', length: 1, [Symbol.isConcatSpreadable]: true };\n    const array = [object];\n    const expected = ['a'];\n    const actual = flattenDepth(array);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with empty arrays', () => {\n    const array = [[], [[]], [[], [[[]]]]];\n    const expected = [[[]]];\n    const actual = flattenDepth(array, 2);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support flattening of nested arrays', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    const expected = [1, 2, 3, [4], 5];\n    const actual = flattenDepth(array, 2);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty array for non array-like objects', () => {\n    const nonArray = { 0: 'a' };\n    const expected: [] = [];\n    const actual = flattenDepth(nonArray as any, 2);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use a default `depth` of `1`', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    expect(flattenDepth(array)).toEqual([1, 2, [3, [4]], 5]);\n  });\n\n  it('should treat a `depth` of < `1` as a shallow clone', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    for (const depth of [-1, 0]) {\n      expect(flattenDepth(array, depth)).toEqual([1, [2, [3, [4]], 5]]);\n    }\n  });\n\n  it('should coerce `depth` to an integer', () => {\n    const array = [1, [2, [3, [4]], 5]];\n    expect(flattenDepth(array, 2.2)).toEqual([1, 2, 3, [4], 5]);\n  });\n\n  it('should support array-like', () => {\n    expect(flattenDepth({ 0: [1, 2, 3], length: 1 })).toEqual([1, 2, 3]);\n    expect(flattenDepth('123')).toEqual(['1', '2', '3']);\n    expect(flattenDepth(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flattenDepth).toEqualTypeOf<typeof flattenDepthLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/flattenDepth.ts",
    "content": "import { flatten } from './flatten.ts';\nimport { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.ts';\n\n/**\n * Recursively flattens array up to depth times.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to flatten.\n * @param {number} [depth=1] - The maximum recursion depth.\n * @returns {T[]} Returns the new flattened array.\n *\n * @example\n * const array = [1, [2, [3, [4]], 5]];\n *\n * flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\nexport function flattenDepth<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, depth = 1): T[] {\n  return (flatten as any)(array, depth) as T[];\n}\n"
  },
  {
    "path": "src/compat/array/forEach.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it, vi } from 'vitest';\nimport type { forEach as forEachLodash } from 'lodash';\nimport { forEach } from './forEach';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { slice } from '../_internal/slice';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('forEach', () => {\n  it('should iterate over array elements', () => {\n    const array = [1, 2, 3];\n    const result: number[] = [];\n\n    forEach(array, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('should iterate over string characters', () => {\n    const string = 'abc';\n    const result: string[] = [];\n\n    forEach(string, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should iterate over object properties', () => {\n    const object = { a: 1, b: 2 };\n    const result: Array<[number, string]> = [];\n\n    forEach(object, (value, key) => {\n      result.push([value, key]);\n    });\n\n    expect(result).toEqual([\n      [1, 'a'],\n      [2, 'b'],\n    ]);\n  });\n\n  it('should return the original array after iteration', () => {\n    const array = [1, 2, 3];\n    const result = forEach(array, value => value * 2);\n\n    expect(result).toBe(array);\n  });\n\n  it('should return the original string after iteration', () => {\n    const string = 'abc';\n    const result = forEach(string, value => value.toUpperCase());\n\n    expect(result).toBe(string);\n  });\n\n  it('should return the original object after iteration', () => {\n    const object = { a: 1, b: 2 };\n    const result = forEach(object, value => value + 1);\n\n    expect(result).toBe(object);\n  });\n\n  it('should return the input collection if null or undefined is passed', () => {\n    const nullValue = null;\n    const undefinedValue = undefined;\n\n    const resultForNull = forEach(nullValue, vi.fn());\n    const resultForUndefined = forEach(undefinedValue, vi.fn());\n\n    expect(resultForNull).toBe(null);\n    expect(resultForUndefined).toBe(undefined);\n  });\n\n  it('should use identity function as the callback if no callback is provided', () => {\n    const array = [1, 2, 3];\n    const result = forEach(array);\n\n    expect(result).toBe(array);\n  });\n\n  it('should iterate over array-like structures', () => {\n    const arrayLike = { 0: 'a', 1: 'b', length: 2 };\n    const result: Array<[number, string]> = [];\n\n    forEach(arrayLike, (value, index) => {\n      result.push([index, value]);\n    });\n\n    expect(result).toEqual([\n      [0, 'a'],\n      [1, 'b'],\n    ]);\n  });\n\n  const array = [1, 2, 3];\n  const func = forEach;\n  const methodName = 'forEach';\n\n  it(`\\`_.${methodName}\\` should provide correct iteratee arguments`, () => {\n    let args: any;\n    const expected = [1, 0, array];\n\n    func(array, function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    });\n    expect(args).toEqual(expected);\n  });\n\n  it(`\\`_.${methodName}\\` should treat sparse arrays as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    const expected = [\n      [1, 0, array],\n      [undefined, 1, array],\n      [3, 2, array],\n    ];\n\n    const argsList: any[] = [];\n    func(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      argsList.push(slice.call(arguments));\n      return true;\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  const isEvery = false;\n\n  it(`\\`_.${methodName}\\` should not iterate custom properties on arrays`, () => {\n    const array: any = [1, 2, 3];\n    array.a = 1;\n    const keys: any[] = [];\n    func(array, (value, key) => {\n      keys.push(key);\n      return isEvery;\n    });\n\n    expect(keys.includes('a')).toBeFalsy();\n  });\n\n  it(`\\`_.${methodName}\\` iterates over own string keyed properties of objects`, () => {\n    function Foo(this: any) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const values: any[] = [];\n    // eslint-disable-next-line\n    // @ts-ignore\n    func(new Foo(), value => {\n      values.push(value);\n    });\n    expect(values).toEqual([1]);\n  });\n\n  it(`\\`_.${methodName}\\` should return the collection`, () => {\n    const array = [1, 2, 3];\n    expect(func(array, Boolean)).toBe(array);\n  });\n\n  it(`\\`_.${methodName}\\` should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n    const isIteratedAsObject = function (object: any) {\n      let result = false;\n      func(object, () => {\n        result = true;\n      });\n      return result;\n    };\n\n    const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(length => isIteratedAsObject({ length: length }));\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const Foo = function (a: any) {};\n    Foo.a = 1;\n\n    expect(actual).toEqual(expected);\n    expect(isIteratedAsObject(Foo)).toBeTruthy();\n    expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n  });\n\n  it(`\\`_.${methodName}\\` should ignore changes to \\`length\\``, () => {\n    if (func) {\n      let count = 0;\n      const array = [1];\n\n      func(array, () => {\n        if (++count === 1) {\n          array.push(2);\n        }\n        return true;\n      });\n\n      expect(count).toBe(1);\n    }\n  });\n\n  it(`\\`_.${methodName}\\` should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object = { a: 1 };\n\n    func(object, () => {\n      if (++count === 1) {\n        // eslint-disable-next-line\n        // @ts-ignore\n        object.b = 2;\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it(`\\`_.${methodName}\\` can exit early when iterating arrays`, () => {\n    const array = [1, 2, 3];\n    const values: any[] = [];\n\n    func(array, (value, other) => {\n      values.push(Array.isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values).toEqual([1]);\n  });\n\n  it(`\\`_.${methodName}\\` can exit early when iterating objects`, () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const values = [];\n\n    func(object, (value, other) => {\n      values.push(Array.isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values.length).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forEach).toEqualTypeOf<typeof forEachLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/forEach.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { range } from '../../math/range.ts';\nimport { ArrayIterator } from '../_internal/ArrayIterator.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { StringIterator } from '../_internal/StringIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Iterates over elements of array and invokes iteratee for each element.\n *\n * @template T\n * @param {T[]} collection - The array to iterate over.\n * @param {ArrayIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T[]} Returns array.\n *\n * @example\n * forEach([1, 2], value => console.log(value));\n * // => Logs `1` then `2`.\n */\nexport function forEach<T>(collection: T[], iteratee?: ArrayIterator<T, any>): T[];\n\n/**\n * Iterates over characters of string and invokes iteratee for each character.\n *\n * @param {string} collection - The string to iterate over.\n * @param {StringIterator<any>} [iteratee] - The function invoked per iteration.\n * @returns {string} Returns string.\n *\n * @example\n * forEach('abc', char => console.log(char));\n * // => Logs 'a', 'b', then 'c'.\n */\nexport function forEach(collection: string, iteratee?: StringIterator<any>): string;\n\n/**\n * Iterates over elements of collection and invokes iteratee for each element.\n *\n * @template T\n * @param {ArrayLike<T>} collection - The collection to iterate over.\n * @param {ListIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {ArrayLike<T>} Returns collection.\n *\n * @example\n * forEach({ 0: 'a', 1: 'b', length: 2 }, value => console.log(value));\n * // => Logs 'a' then 'b'.\n */\nexport function forEach<T>(collection: ArrayLike<T>, iteratee?: ListIterator<T, any>): ArrayLike<T>;\n\n/**\n * Iterates over own enumerable string keyed properties of an object and invokes iteratee for each property.\n *\n * @template T\n * @param {T} collection - The object to iterate over.\n * @param {ObjectIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T} Returns object.\n *\n * @example\n * forEach({ a: 1, b: 2 }, (value, key) => console.log(key));\n * // => Logs 'a' then 'b'.\n */\nexport function forEach<T extends object>(collection: T, iteratee?: ObjectIterator<T, any>): T;\n\n/**\n * Iterates over elements of array and invokes iteratee for each element.\n *\n * @template T, U\n * @param {U & (T[] | null | undefined)} collection - The array to iterate over.\n * @param {ArrayIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {U} Returns the array.\n *\n * @example\n * forEach([1, 2], value => console.log(value));\n * // => Logs `1` then `2`.\n */\nexport function forEach<T, U extends T[] | null | undefined>(\n  collection: U & (T[] | null | undefined),\n  iteratee?: ArrayIterator<T, any>\n): U;\n\n/**\n * Iterates over characters of string and invokes iteratee for each character.\n *\n * @template T\n * @param {T} collection - The string to iterate over.\n * @param {StringIterator<any>} [iteratee] - The function invoked per iteration.\n * @returns {T} Returns the string.\n *\n * @example\n * forEach('abc', char => console.log(char));\n * // => Logs 'a', 'b', then 'c'.\n */\nexport function forEach<T extends string | null | undefined>(collection: T, iteratee?: StringIterator<any>): T;\n\n/**\n * Iterates over elements of collection and invokes iteratee for each element.\n *\n * @template T, L\n * @param {L & (ArrayLike<T> | null | undefined)} collection - The collection to iterate over.\n * @param {ListIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {L} Returns the collection.\n *\n * @example\n * forEach({ 0: 'a', 1: 'b', length: 2 }, value => console.log(value));\n * // => Logs 'a' then 'b'.\n */\nexport function forEach<T, L extends ArrayLike<T> | null | undefined>(\n  collection: L & (ArrayLike<T> | null | undefined),\n  iteratee?: ListIterator<T, any>\n): L;\n\n/**\n * Iterates over own enumerable string keyed properties of an object and invokes iteratee for each property.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T | null | undefined} Returns the object.\n *\n * @example\n * forEach({ a: 1, b: 2 }, (value, key) => console.log(key));\n * // => Logs 'a' then 'b'.\n */\nexport function forEach<T extends object>(\n  collection: T | null | undefined,\n  iteratee?: ObjectIterator<T, any>\n): T | null | undefined;\n\n/**\n * Iterates over each element of the object invoking the provided callback function for each property.\n *\n * @template T - The type of object.\n * @param {T} object - The object to iterate over.\n * @param {(value: T[keyof T], key: keyof T, object: T) => unknown} [callback] - The function invoked for each property.\n * The callback function receives three arguments:\n *  - 'value': The current property being processed in the object.\n *  - 'key': The key of the current property being processed in the object.\n *  - 'object': The object 'forEach' was called upon.\n * @returns {T} Returns the original object.\n *\n * @example\n * forEach({'a': 1, 'b': 2 }, (value, key, object) => console.log(value, key));\n * // Output:\n * // 1 'a'\n * // 2 'b'\n */\nexport function forEach<T>(\n  collection: ArrayLike<T> | Record<any, any> | string | null | undefined,\n  callback: (item: any, index: any, arr: any) => unknown = identity\n): ArrayLike<T> | Record<any, any> | string | null | undefined {\n  if (!collection) {\n    return collection;\n  }\n\n  const keys: PropertyKey[] =\n    isArrayLike(collection) || Array.isArray(collection) ? range(0, collection.length) : Object.keys(collection);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = (collection as any)[key];\n\n    const result = callback(value, key, collection);\n\n    if (result === false) {\n      break;\n    }\n  }\n\n  return collection;\n}\n"
  },
  {
    "path": "src/compat/array/forEachRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { forEachRight as forEachRightLodash } from 'lodash';\nimport { forEachRight } from './forEachRight';\nimport { includes } from './includes';\nimport { map } from './map';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { identity } from '../compat';\nimport { isArray } from '../predicate/isArray';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('forEachRight', () => {\n  it(`should provide correct iteratee arguments`, () => {\n    const array = [1, 2, 3];\n    let args: any[];\n    const expected = [3, 2, array];\n\n    forEachRight(array, function (..._args: any[]) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      args || (args = _args);\n    });\n\n    expect(args!).toEqual(expected);\n  });\n\n  it(`should treat sparse arrays as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    const expected = [\n      [1, 0, array],\n      [undefined, 1, array],\n      [3, 2, array],\n    ];\n    expected.reverse();\n\n    const argsList: any[] = [];\n    forEachRight(array, function (...args: any[]) {\n      argsList.push(args);\n      return true;\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  it(`should not iterate custom properties on arrays`, () => {\n    const array: any = [1, 2, 3];\n    array.a = 1;\n    const keys: any[] = [];\n    forEachRight(array, (value, key) => {\n      keys.push(key);\n      return false;\n    });\n\n    expect(includes(keys, 'a')).toBeFalsy();\n  });\n\n  it(`iterates over own string keyed properties of objects`, () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const values: any[] = [];\n    // @ts-expect-error - Foo is not a constructor\n    forEachRight(new Foo(), value => {\n      values.push(value);\n    });\n    expect(values).toEqual([1]);\n  });\n\n  it(`should return the collection`, () => {\n    const array = [1, 2, 3];\n    expect(forEachRight(array, Boolean)).toBe(array);\n  });\n\n  it(`should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n    const isIteratedAsObject = function (object: any) {\n      let result = false;\n      forEachRight(object, () => {\n        result = true;\n      });\n      return result;\n    };\n\n    const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n    const expected = map(values, stubTrue);\n\n    const actual = map(values, length => isIteratedAsObject({ length: length }));\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const Foo = function (a: any) {};\n    Foo.a = 1;\n\n    expect(actual).toEqual(expected);\n    expect(isIteratedAsObject(Foo)).toBeTruthy();\n    expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n  });\n\n  it(`should ignore changes to \\`length\\``, () => {\n    let count = 0;\n    const array = [1];\n\n    forEachRight(array, () => {\n      if (++count === 1) {\n        array.push(2);\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it(`should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object = { a: 1 };\n\n    forEachRight(object, () => {\n      if (++count === 1) {\n        // @ts-expect-error - Property 'b' does not exist on type '{ a: number; }'.\n        object.b = 2;\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it(`can exit early when iterating arrays`, () => {\n    const array = [1, 2, 3];\n    const values: any[] = [];\n\n    forEachRight(array, (value, other) => {\n      values.push(isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values).toEqual([3]);\n  });\n\n  it(`can exit early when iterating objects`, () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const values: any[] = [];\n\n    forEachRight(object, (value, other) => {\n      values.push(isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values.length).toBe(1);\n  });\n\n  it('should return the input collection if null or undefined is passed', () => {\n    const nullValue = null;\n    const undefinedValue = undefined;\n\n    const resultForNull = forEachRight(nullValue, identity);\n    const resultForUndefined = forEachRight(undefinedValue, identity);\n\n    expect(resultForNull).toBe(null);\n    expect(resultForUndefined).toBe(undefined);\n  });\n\n  it('should use identity function when no callback is provided', () => {\n    const array = [1, 2, 3];\n    const result = forEachRight(array);\n\n    expect(result).toBe(array);\n\n    const object = { a: 1, b: 2 };\n    const objectResult = forEachRight(object);\n\n    expect(objectResult).toBe(object);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forEachRight).toEqualTypeOf<typeof forEachRightLodash>();\n  });\n\n  it('should use identity function as the callback if no callback is provided', () => {\n    const array = [1, 2, 3];\n    const result = forEachRight(array);\n\n    expect(result).toBe(array);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/forEachRight.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { range } from '../../math/range.ts';\nimport { ArrayIterator } from '../_internal/ArrayIterator.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { StringIterator } from '../_internal/StringIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Iterates over elements of array from right to left and invokes iteratee for each element.\n *\n * @template T\n * @param {T[]} collection - The array to iterate over.\n * @param {ArrayIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T[]} Returns array.\n *\n * @example\n * forEachRight([1, 2], value => console.log(value));\n * // => Logs `2` then `1`.\n */\nexport function forEachRight<T>(collection: T[], iteratee?: ArrayIterator<T, any>): T[];\n\n/**\n * Iterates over characters of string from right to left and invokes iteratee for each character.\n *\n * @param {string} collection - The string to iterate over.\n * @param {StringIterator<any>} [iteratee] - The function invoked per iteration.\n * @returns {string} Returns string.\n *\n * @example\n * forEachRight('abc', char => console.log(char));\n * // => Logs 'c', 'b', then 'a'.\n */\nexport function forEachRight(collection: string, iteratee?: StringIterator<any>): string;\n\n/**\n * Iterates over elements of collection from right to left and invokes iteratee for each element.\n *\n * @template T\n * @param {ArrayLike<T>} collection - The collection to iterate over.\n * @param {ListIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {ArrayLike<T>} Returns collection.\n *\n * @example\n * forEachRight({ 0: 'a', 1: 'b', length: 2 }, value => console.log(value));\n * // => Logs 'b' then 'a'.\n */\nexport function forEachRight<T>(collection: ArrayLike<T>, iteratee?: ListIterator<T, any>): ArrayLike<T>;\n\n/**\n * Iterates over own enumerable string keyed properties of an object from right to left and invokes iteratee for each property.\n *\n * @template T\n * @param {T} collection - The object to iterate over.\n * @param {ObjectIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T} Returns object.\n *\n * @example\n * forEachRight({ a: 1, b: 2 }, (value, key) => console.log(key));\n * // => Logs 'b' then 'a'.\n */\nexport function forEachRight<T extends object>(collection: T, iteratee?: ObjectIterator<T, any>): T;\n\n/**\n * Iterates over elements of array from right to left and invokes iteratee for each element.\n *\n * @template T, U\n * @param {U & (T[] | null | undefined)} collection - The array to iterate over.\n * @param {ArrayIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {U} Returns the array.\n *\n * @example\n * forEachRight([1, 2], value => console.log(value));\n * // => Logs `2` then `1`.\n */\nexport function forEachRight<T, U extends T[] | null | undefined>(\n  collection: U & (T[] | null | undefined),\n  iteratee?: ArrayIterator<T, any>\n): U;\n\n/**\n * Iterates over characters of string from right to left and invokes iteratee for each character.\n *\n * @template T\n * @param {T} collection - The string to iterate over.\n * @param {StringIterator<any>} [iteratee] - The function invoked per iteration.\n * @returns {T} Returns the string.\n *\n * @example\n * forEachRight('abc', char => console.log(char));\n * // => Logs 'c', 'b', then 'a'.\n */\nexport function forEachRight<T extends string | null | undefined>(collection: T, iteratee?: StringIterator<any>): T;\n\n/**\n * Iterates over elements of collection from right to left and invokes iteratee for each element.\n *\n * @template T, L\n * @param {L & (ArrayLike<T> | null | undefined)} collection - The collection to iterate over.\n * @param {ListIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {L} Returns the collection.\n *\n * @example\n * forEachRight({ 0: 'a', 1: 'b', length: 2 }, value => console.log(value));\n * // => Logs 'b' then 'a'.\n */\nexport function forEachRight<T, L extends ArrayLike<T> | null | undefined>(\n  collection: L & (ArrayLike<T> | null | undefined),\n  iteratee?: ListIterator<T, any>\n): L;\n\n/**\n * Iterates over own enumerable string keyed properties of an object from right to left and invokes iteratee for each property.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterator<T, any>} [iteratee] - The function invoked per iteration.\n * @returns {T | null | undefined} Returns the object.\n *\n * @example\n * forEachRight({ a: 1, b: 2 }, (value, key) => console.log(key));\n * // => Logs 'b' then 'a'.\n */\nexport function forEachRight<T extends object>(\n  collection: T | null | undefined,\n  iteratee?: ObjectIterator<T, any>\n): T | null | undefined;\n\n/**\n * Iterates over elements of 'array' from right to left and invokes 'callback' for each element.\n *\n * @template T - The type of object.\n * @param {T} object - The object to iterate over.\n * @param {(value: T[keyof T], key: keyof T, object: T) => unknown} [callback] - The function invoked for each property.\n * The callback function receives three arguments:\n *  - 'value': The current property being processed in the object.\n *  - 'key': The key of the current property being processed in the object.\n *  - 'object': The object 'forEachRight' was called upon.\n * @returns {T} Returns the original object.\n *\n * @example\n * forEachRight({'a': 1, 'b': 2 }, (value, key, object) => console.log(value, key));\n * // Output:\n * // 2 'b'\n * // 1 'a'\n */\nexport function forEachRight<T>(\n  collection: ArrayLike<T> | Record<any, any> | string | null | undefined,\n  callback: (item: any, index: any, arr: any) => unknown = identity\n): ArrayLike<T> | Record<any, any> | string | null | undefined {\n  if (!collection) {\n    return collection;\n  }\n\n  const keys: PropertyKey[] = isArrayLike(collection) ? range(0, collection.length) : Object.keys(collection);\n\n  for (let i = keys.length - 1; i >= 0; i--) {\n    const key = keys[i];\n    const value = (collection as any)[key];\n\n    const result = callback(value, key, collection);\n\n    if (result === false) {\n      break;\n    }\n  }\n\n  return collection;\n}\n"
  },
  {
    "path": "src/compat/array/groupBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { groupBy as groupByLodash } from 'lodash';\nimport { groupBy } from './groupBy';\n\ndescribe('groupBy', () => {\n  const array = [6.1, 4.2, 6.3];\n\n  it('should transform keys by `iteratee`', () => {\n    const actual = groupBy(array, Math.floor);\n    expect(actual).toEqual({ 4: [4.2], 6: [6.1, 6.3] });\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const array = [6, 4, 6];\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = lodashStable.map(values, lodashStable.constant({ 4: [4], 6: [6, 6] }));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = lodashStable.map(values, (value, index) => (index ? groupBy(array, value) : groupBy(array)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const actual = groupBy(['one', 'two', 'three'], 'length');\n    expect(actual).toEqual({ 3: ['one', 'two'], 5: ['three'] });\n  });\n\n  it('should only add values to own, not inherited, properties', () => {\n    const actual = groupBy(array, n => (Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor'));\n\n    expect(actual.constructor).toEqual([4.2]);\n    expect(actual.hasOwnProperty).toEqual([6.1, 6.3]);\n  });\n\n  it('should work with a number for `iteratee`', () => {\n    const array = [\n      [1, 'a'],\n      [2, 'a'],\n      [2, 'b'],\n    ];\n\n    expect(groupBy(array, 0)).toStrictEqual({\n      1: [[1, 'a']],\n      2: [\n        [2, 'a'],\n        [2, 'b'],\n      ],\n    });\n    expect(groupBy(array, 1)).toStrictEqual({\n      a: [\n        [1, 'a'],\n        [2, 'a'],\n      ],\n      b: [[2, 'b']],\n    });\n  });\n\n  it('should work with an object for `collection`', () => {\n    const actual = groupBy({ a: 6.1, b: 4.2, c: 6.3 }, Math.floor);\n    expect(actual).toEqual({ 4: [4.2], 6: [6.1, 6.3] });\n  });\n\n  it('should return empty object if null or undefined is passed', () => {\n    expect(groupBy(undefined)).toEqual({});\n    expect(groupBy(null)).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(groupBy).toEqualTypeOf<typeof groupByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/groupBy.ts",
    "content": "import { groupBy as groupByToolkit } from '../../array/groupBy.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n *\n * @template T - The type of elements in the array-like collection\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over\n * @param {ValueIteratee<T>} [iteratee=identity] - The iteratee to transform keys\n * @returns {Record<string, T[]>} Returns the composed aggregate object\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor)\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * groupBy(['one', 'two', 'three'], 'length')\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nexport function groupBy<T>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): Record<string, T[]>;\n\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n *\n * @template T - The type of the object\n * @param {T | null | undefined} collection - The object to iterate over\n * @param {ValueIteratee<T[keyof T]>} [iteratee=identity] - The iteratee to transform keys\n * @returns {Record<string, Array<T[keyof T]>>} Returns the composed aggregate object\n *\n * @example\n * groupBy({ a: 6.1, b: 4.2, c: 6.3 }, Math.floor)\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy<T extends object>(\n  collection: T | null | undefined,\n  iteratee?: ValueIteratee<T[keyof T]>\n): Record<string, Array<T[keyof T]>>;\n\n/**\n * Groups the elements of an array or object based on a provided key-generating function.\n *\n * This function takes an array or object and a function that generates a key from each element or value.\n * It returns an object where the keys are the generated keys and the values are arrays of elements that\n * share the same key.\n *\n * @template T - The type of elements in the array or values in the object.\n * @template K - The type of keys.\n * @param {ArrayLike<T> | Record<any, T> | null | undefined} source - The collection to group.\n * @param {Function | PropertyKey | Array | Object} [_getKeyFromItem] - The iteratee to transform keys.\n *   - If a function is provided, it's invoked for each element in the collection.\n *   - If a property name (string) is provided, that property of each element is used as the key.\n *   - If a property-value pair (array) is provided, elements with matching property values are used.\n *   - If a partial object is provided, elements with matching properties are used.\n * @returns {Record<K, T>} An object where each key is associated with an array of elements that\n * share that key.\n *\n * @example\n * // Using an array\n * const array = [6.1, 4.2, 6.3];\n * const result = groupBy(array, Math.floor);\n * // => { 4: [4.2], 6: [6.1, 6.3] }\n *\n * @example\n * // Using a property name\n * const array = ['one', 'two', 'three'];\n * const result = groupBy(array, 'length');\n * // => { 3: ['one', 'two'], 5: ['three'] }\n */\nexport function groupBy<T, K extends PropertyKey>(\n  source: ArrayLike<T> | Record<any, T> | null | undefined,\n  _getKeyFromItem?:\n    | ((item: T, index: number, arr: any) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey\n    | null\n): Record<K, T[]> {\n  if (source == null) {\n    return {} as Record<K, T[]>;\n  }\n\n  const items = isArrayLike(source) ? Array.from(source) : Object.values(source);\n  const getKeyFromItem = createIteratee(_getKeyFromItem ?? identity);\n\n  return groupByToolkit<T, K>(items, getKeyFromItem);\n}\n"
  },
  {
    "path": "src/compat/array/head.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { head as headLodash } from 'lodash';\nimport { args } from '../_internal/args';\nimport { first, head } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/head.spec.js#L1\n */\ndescribe('head', () => {\n  const array = [1, 2, 3, 4];\n\n  it('should return the first element', () => {\n    expect(head(array)).toBe(1);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(head);\n\n    expect(actual).toEqual([1, 4, 7]);\n  });\n\n  it('should be aliased', () => {\n    expect(first).toBe(head);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(first(null)).toBeUndefined();\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(first(1)).toBeUndefined();\n    // @ts-expect-error - invalid argument\n    expect(first(true)).toBeUndefined();\n  });\n\n  it('should support array-like', () => {\n    expect(first({ 0: 1, 1: null, 2: 3, length: 3 })).toEqual(1);\n    expect(first('123')).toEqual('1');\n    expect(first(args)).toEqual(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(head).toEqualTypeOf<typeof headLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/head.ts",
    "content": "import { head as headToolkit } from '../../array/head.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Returns the first element of an array or `undefined` if the array is empty.\n *\n * @template T - The type of elements in the array.\n * @param {readonly [T, ...unknown[]]} array - A non-empty tuple with at least one element.\n * @returns {T} The first element of the array.\n *\n * @example\n * const arr = [1, 2, 3] as const;\n * const first = head(arr);\n * // first will be 1\n */\nexport function head<T>(array: readonly [T, ...unknown[]]): T;\n\n/**\n * Returns the first element of an array or `undefined` if the array is empty.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} array - The array from which to get the first element.\n * @returns {T | undefined} The first element of the array, or `undefined` if the array is empty/null/undefined.\n *\n * @example\n * const arr = [1, 2, 3];\n * const first = head(arr);\n * // first will be 1\n *\n * const emptyArr: number[] = [];\n * const noElement = head(emptyArr);\n * // noElement will be undefined\n */\nexport function head<T>(array: ArrayLike<T> | null | undefined): T | undefined;\n\n/**\n * Returns the first element of an array or `undefined` if the array is empty.\n *\n * This function takes an array and returns the first element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | undefined | null} arr - The array from which to get the first element.\n * @returns {T | undefined} The first element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const emptyArr: number[] = [];\n * const noElement = head(emptyArr);\n * // noElement will be undefined\n */\nexport function head<T>(arr: ArrayLike<T> | undefined | null): T | undefined {\n  if (!isArrayLike(arr)) {\n    return undefined;\n  }\n  return headToolkit(toArray(arr));\n}\n"
  },
  {
    "path": "src/compat/array/includes.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { includes as includesLodash } from 'lodash';\nimport { includes } from './includes';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport { toArgs } from '../_internal/toArgs';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('includes', () => {\n  it('should ignore inherited value', () => {\n    const obj = Object.create({ inherited: 'value' });\n    expect(includes(obj, 'value')).toBe(false);\n  });\n\n  Object.entries({\n    'an `arguments` object': toArgs([1, 2, 3, 4]),\n    'an array': [1, 2, 3, 4],\n    'an object': { a: 1, b: 2, c: 3, d: 4 },\n    'a string': '1234',\n  }).forEach(([key, collection]) => {\n    it(`should work with ${key} and  return \\`true\\` for  matched values`, () => {\n      expect(includes(collection, 3)).toBe(true);\n    });\n\n    it(`should work with ${key} and  return \\`false\\` for unmatched values`, () => {\n      expect(includes(collection, 5)).toBe(false);\n    });\n\n    it(`should work with ${key} and floor \\`position\\` values`, () => {\n      expect(includes(collection, 2, 1.2)).toBe(true);\n    });\n\n    // it(`should work with ${key} and return an unwrapped value implicitly when chaining`, () => {\n    //   expect(_(collection).includes(3)).toBe(true);\n    // });\n\n    // it(`should work with ${key} and return a wrapped value when explicitly chaining`, () => {\n    //   expect(_(collection).chain().includes(3) instanceof _);\n    // });\n  });\n\n  Object.entries({\n    literal: 'abc',\n    object: Object('abc'),\n  }).forEach(([key, collection]) => {\n    it(`should work with a string ${key} for \\`collection\\``, () => {\n      expect(includes(collection, 'bc')).toBe(true);\n      expect(includes(collection, 'd')).toBe(false);\n    });\n  });\n\n  it('should return `false` for empty collections', () => {\n    const expected = empties.map(stubFalse);\n\n    const actual = empties.map(value => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return includes(value);\n      } catch (e) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a string and a `fromIndex` >= `length`', () => {\n    const string = '1234';\n    const length = string.length;\n    const indexes = [4, 6, 2 ** 32, Infinity];\n\n    const expected = indexes.map(index => [false, false, index === length]);\n\n    const actual = indexes.map(fromIndex => [\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      includes(string, 1, fromIndex),\n      includes(string, undefined, fromIndex),\n      includes(string, '', fromIndex),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match `NaN`', () => {\n    expect(includes([1, NaN, 3], NaN)).toBe(true);\n    expect(includes({ a: 1, b: NaN, c: 3 }, NaN)).toBe(true);\n  });\n\n  it('should match `-0` as `0`', () => {\n    expect(includes([-0], 0)).toBe(true);\n    expect(includes([0], -0)).toBe(true);\n  });\n\n  // it('should work as an iteratee for methods like `_.every`', () => {\n  //   const array = [2, 3, 1];\n  //   const values = [1, 2, 3];\n\n  //   expect(esToolkit.every(values, esToolkit.partial(includes, array)));\n  // });\n\n  const resolve = (x: unknown) => x;\n\n  Object.entries({\n    'an `arguments` object': args,\n    'an array': [1, 2, 3],\n    'a string': '123',\n  }).forEach(([key, collection]) => {\n    const values = Array.from(collection);\n\n    it(`should work with ${key} and a positive \\`fromIndex\\``, () => {\n      const expected = [true, false];\n      const actual = [includes(collection, resolve(values[2]), 2), includes(collection, resolve(values[1]), 2)];\n\n      expect(actual).toEqual(expected);\n    });\n\n    it(`should work with ${key} and a \\`fromIndex\\` >= \\`length\\``, () => {\n      const indexes = [4, 6, 2 ** 32, Infinity];\n\n      const expected = indexes.map(() => {\n        const result = false;\n        return [result, result, result];\n      });\n\n      const actual = indexes.map(fromIndex => [\n        includes(collection, resolve(1), fromIndex),\n        includes(collection, resolve(undefined), fromIndex),\n        includes(collection, resolve(''), fromIndex),\n      ]);\n\n      expect(actual).toEqual(expected);\n    });\n\n    it(`should work with ${key} and treat falsey \\`fromIndex\\` values as \\`0\\``, () => {\n      const expected = falsey.map(() => true);\n\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const actual = falsey.map(fromIndex => includes(collection, resolve(values[0]), fromIndex));\n\n      expect(actual).toEqual(expected);\n    });\n\n    it(`should work with ${key} and coerce \\`fromIndex\\` to an integer`, () => {\n      const expected = [true, true, false];\n\n      const actual = [\n        includes(collection, resolve(values[0]), 0.1),\n        includes(collection, resolve(values[0]), NaN),\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        includes(collection, resolve(values[0]), '1'),\n      ];\n\n      expect(actual).toEqual(expected);\n    });\n\n    it(`should work with ${key} and a negative \\`fromIndex\\``, () => {\n      const expected = [true, false];\n\n      const actual = [includes(collection, resolve(values[2]), -1), includes(collection, resolve(values[1]), -1)];\n\n      expect(actual).toEqual(expected);\n    });\n\n    it(`should work with ${key} and a negative \\`fromIndex\\` <= \\`-length\\``, () => {\n      const indexes = [-4, -6, -Infinity];\n      const expected = indexes.map(() => true);\n\n      const actual = indexes.map(fromIndex => includes(collection, resolve(values[0]), fromIndex));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(includes).toEqualTypeOf<typeof includesLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/includes.ts",
    "content": "import { isString } from '../predicate/isString.ts';\nimport { eq } from '../util/eq.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Checks if a specified value exists within a given array-like collection.\n *\n * The comparison uses SameValueZero to check for inclusion.\n *\n * @template T The type of elements in the collection\n * @param collection The array-like collection to search in\n * @param target The value to search for in the collection\n * @param [fromIndex=0] The index to start searching from. If negative, it is treated as an offset from the end\n * @returns `true` if the value is found in the collection, `false` otherwise\n *\n * @example\n * includes([1, 2, 3], 2); // true\n * includes([1, 2, 3], 4); // false\n * includes('hello', 'e'); // true\n * includes(null, 1); // false\n * includes([1, 2, 3], 2, 2); // false\n * includes([1, 2, 3], 2, -2); // true\n */\nexport function includes<T>(\n  collection: Record<string, T> | Record<number, T> | null | undefined,\n  target: T,\n  fromIndex?: number\n): boolean;\n\n/**\n * Checks if a specified value exists within a given source, which can be an array, an object, or a string.\n *\n * The comparison uses SameValueZero to check for inclusion.\n *\n * @param {T[] | Record<string, any> | string} source - The source to search in. It can be an array, an object, or a string.\n * @param {T} [target] - The value to search for in the source.\n * @param {number} [fromIndex=0] - The index to start searching from. If negative, it is treated as an offset from the end of the source.\n * @returns {boolean} `true` if the value is found in the source, `false` otherwise.\n *\n * @example\n * includes([1, 2, 3], 2); // true\n * includes({ a: 1, b: 'a', c: NaN }, 'a'); // true\n * includes('hello world', 'world'); // true\n * includes('hello world', 'test'); // false\n */\nexport function includes(\n  source: readonly unknown[] | Record<string, any> | string | null | undefined,\n  target?: unknown,\n  fromIndex?: number,\n  guard?: unknown\n): boolean {\n  if (source == null) {\n    return false;\n  }\n\n  if (guard || !fromIndex) {\n    fromIndex = 0;\n  } else {\n    fromIndex = toInteger(fromIndex);\n  }\n\n  if (isString(source)) {\n    if (fromIndex > source.length || target instanceof RegExp) {\n      return false;\n    }\n\n    if (fromIndex < 0) {\n      fromIndex = Math.max(0, source.length + fromIndex);\n    }\n\n    return source.includes(target as any, fromIndex);\n  }\n\n  if (Array.isArray(source)) {\n    return source.includes(target, fromIndex);\n  }\n\n  const keys = Object.keys(source);\n\n  if (fromIndex < 0) {\n    fromIndex = Math.max(0, keys.length + fromIndex);\n  }\n\n  for (let i = fromIndex; i < keys.length; i++) {\n    const value = Reflect.get(source, keys[i]);\n\n    if (eq(value, target)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n"
  },
  {
    "path": "src/compat/array/indexOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { indexOf as indexOfLodash } from 'lodash';\nimport { indexOf } from './indexOf';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { stubZero } from '../_internal/stubZero';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/indexOf.spec.js\n */\ndescribe('indexOf', () => {\n  const array = [1, 2, 3, 1, 2, 3];\n\n  it('should return the index of the first matched value', () => {\n    expect(indexOf(array, 3)).toBe(2);\n  });\n\n  it('should work with a positive `fromIndex`', () => {\n    expect(indexOf(array, 1, 2)).toBe(3);\n  });\n\n  it('should work with a `fromIndex` >= `length`', () => {\n    const values = [6, 8, 2 ** 32, Infinity];\n    const expected = values.map(() => [-1, -1, -1]);\n\n    const actual = values.map(fromIndex => [\n      indexOf(array, undefined, fromIndex),\n      indexOf(array, 1, fromIndex),\n      // eslint-disable-next-line\n      // @ts-ignore\n      indexOf(array, '', fromIndex),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a negative `fromIndex`', () => {\n    expect(indexOf(array, 2, -3)).toBe(4);\n  });\n\n  it('should work with a NaN `searchElement`', () => {\n    expect(indexOf([1, 2, 3, 4], NaN)).toBe(-1);\n    expect(indexOf([1, NaN, 3, NaN], NaN)).toBe(1);\n    expect(indexOf([1, NaN, 3, NaN], 3, 1)).toBe(2);\n    expect(indexOf([1, NaN, 3, NaN], 3, -2)).toBe(2);\n    expect(indexOf([1, NaN, 3, NaN], NaN, -32)).toBe(1);\n  });\n\n  it('should work with a negative `fromIndex` <= `-length`', () => {\n    const values = [-6, -8, -Infinity];\n    const expected = values.map(stubZero);\n\n    const actual = values.map(fromIndex => indexOf(array, 1, fromIndex));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat falsey `fromIndex` values as `0`', () => {\n    const expected = falsey.map(stubZero);\n\n    const actual = falsey.map(fromIndex => indexOf(array, 1, fromIndex as number));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `-1` for array is `null` or `undefined`', () => {\n    expect(indexOf(null, 1)).toBe(-1);\n    expect(indexOf(undefined, 1)).toBe(-1);\n  });\n\n  it('should coerce `fromIndex` to an integer', () => {\n    expect(indexOf(array, 2, 1.2)).toBe(1);\n  });\n\n  it('should return `-1` when provided `null` or `undefined`', () => {\n    expect(indexOf(null as any, 1)).toBe(-1);\n    expect(indexOf(undefined as any, 1)).toBe(-1);\n  });\n\n  it('should return `-1` when provided none array-like object', () => {\n    expect(indexOf(1 as any, 1)).toBe(-1);\n  });\n\n  it('should support array-like', () => {\n    expect(indexOf({ 0: 1, 1: 2, length: 2 }, 2)).toBe(1);\n    expect(indexOf('123', '2')).toBe(1);\n    expect(indexOf(args, 2)).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(indexOf).toEqualTypeOf<typeof indexOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/indexOf.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Finds the index of the first occurrence of a value in an array.\n *\n * This method is similar to `Array.prototype.indexOf`, but it also finds `NaN` values.\n * It uses strict equality (`===`) to compare elements.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} array - The array to search.\n * @param {T} searchElement - The value to search for.\n * @param {number} [fromIndex] - The index to start the search at.\n * @returns {number} The index (zero-based) of the first occurrence of the value in the array, or `-1` if the value is not found.\n *\n * @example\n * const array = [1, 2, 3, NaN];\n * indexOf(array, 3); // => 2\n * indexOf(array, NaN); // => 3\n */\nexport function indexOf<T>(array: ArrayLike<T> | null | undefined, searchElement: T, fromIndex?: number): number {\n  if (!isArrayLike(array)) {\n    return -1;\n  }\n\n  // `Array.prototype.indexOf` doesn't find `NaN` values, so we need to handle that case separately.\n  if (Number.isNaN(searchElement)) {\n    fromIndex = fromIndex ?? 0;\n\n    if (fromIndex < 0) {\n      fromIndex = Math.max(0, array.length + fromIndex);\n    }\n\n    for (let i = fromIndex; i < array.length; i++) {\n      if (Number.isNaN(array[i])) {\n        return i;\n      }\n    }\n\n    return -1;\n  }\n\n  // Array.prototype.indexOf already handles `fromIndex < -array.length`, `fromIndex >= array.length` and converts `fromIndex` to an integer, so we don't need to handle those cases here.\n  // And it uses strict equality (===) to compare elements like `lodash/indexOf` does.\n  return Array.from(array).indexOf(searchElement, fromIndex);\n}\n"
  },
  {
    "path": "src/compat/array/initial.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { initial as initialLodash } from 'lodash';\nimport { initial } from './initial';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/initial.spec.js#L1\n */\ndescribe('initial', () => {\n  const array = [1, 2, 3];\n\n  it('should exclude last element', () => {\n    expect(initial(array)).toEqual([1, 2]);\n  });\n\n  it('should return an empty when querying empty arrays', () => {\n    expect(initial([])).toEqual([]);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(initial);\n\n    expect(actual).toEqual([\n      [1, 2],\n      [4, 5],\n      [7, 8],\n    ]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(initial(null)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(initial(1)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(initial(true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(initial({ 0: 1, 1: null, 2: 3, length: 3 })).toEqual([1, null]);\n    expect(initial('123')).toEqual(['1', '2']);\n    expect(initial(args)).toEqual([1, 2]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(initial).toEqualTypeOf<typeof initialLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/initial.ts",
    "content": "import { initial as initialToolkit } from '../../array/initial.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Returns a new array containing all elements except the last one from the input array.\n * If the input array is empty or has only one element, the function returns an empty array.\n *\n * @template T The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The input array.\n * @returns {T[]} A new array containing all but the last element of the input array.\n *\n * @example\n * const arr = [1, 2, 3, 4];\n * const result = initial(arr);\n * // result will be [1, 2, 3]\n */\nexport function initial<T>(arr: ArrayLike<T> | null | undefined): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n  return initialToolkit(Array.from(arr));\n}\n"
  },
  {
    "path": "src/compat/array/intersection.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { intersection as intersectionLodash } from 'lodash';\nimport { intersection } from './intersection';\nimport { range } from '../../math';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { stubNaN } from '../_internal/stubNaN';\nimport { constant } from '../util/constant';\nimport { times } from '../util/times';\nimport { toString } from '../util/toString';\n\n/**\n * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/intersection-methods.spec.js#L1\n */\ndescribe('intersection', () => {\n  it('should return the intersection of two arrays', () => {\n    const actual = intersection([2, 1], [2, 3]);\n    expect(actual).toEqual([2]);\n  });\n\n  it('should return the intersection of multiple arrays', () => {\n    const actual = intersection([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([3]);\n  });\n\n  it('should return an array of unique values', () => {\n    const actual = intersection([1, 1, 3, 2, 2], [5, 2, 2, 1, 4], [2, 1, 1]);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should work with a single array', () => {\n    const actual = intersection([1, 1, 3, 2, 2]);\n    expect(actual).toEqual([1, 3, 2]);\n  });\n\n  it('should work with `arguments` objects', () => {\n    const array = [0, 1, null, 3];\n    const expected = [1, 3];\n\n    expect(intersection(array, args)).toEqual(expected);\n    expect(intersection(args, array)).toEqual(expected);\n  });\n\n  it('should treat `-0` as `0`', () => {\n    const values = [-0, 0];\n    const expected = values.map(constant(['0']));\n\n    const actual = values.map(value => intersection(values, [value]).map(toString));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match `NaN`', () => {\n    const actual = intersection([1, NaN, 3], [NaN, 5, NaN]);\n    expect(actual).toEqual([NaN]);\n  });\n\n  it('should work with large arrays of `-0` as `0`', () => {\n    const values = [-0, 0];\n    const expected = values.map(constant(['0']));\n\n    const actual = values.map(value => {\n      const largeArray = times(LARGE_ARRAY_SIZE, constant(value));\n      return intersection(values, largeArray).map(toString);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with large arrays of `NaN`', () => {\n    const largeArray = times(LARGE_ARRAY_SIZE, stubNaN);\n    expect(intersection([1, NaN, 3], largeArray)).toEqual([NaN]);\n  });\n\n  it('should work with large arrays of objects', () => {\n    const object = {};\n    const largeArray = times(LARGE_ARRAY_SIZE, constant(object));\n\n    expect(intersection([object], largeArray)).toEqual([object]);\n    expect(intersection(range(LARGE_ARRAY_SIZE), [1])).toEqual([1]);\n  });\n\n  it('should treat values that are not arrays or `arguments` objects as empty', () => {\n    const array = [0, 1, null, 3];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(intersection(array, 3, { 0: 1 }, null)).toEqual([]);\n    expect(intersection(null, array, null, [2, 3])).toEqual([]);\n    expect(intersection(array, null, args, null)).toEqual([]);\n  });\n\n  it('should return an empty array when there are no arguments', () => {\n    expect(intersection()).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(intersection).toEqualTypeOf<typeof intersectionLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/intersection.ts",
    "content": "import { intersection as intersectionToolkit } from '../../array/intersection.ts';\nimport { uniq } from '../../array/uniq.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Returns the intersection of multiple arrays.\n *\n * This function takes multiple arrays and returns a new array containing the elements that are\n * present in all provided arrays. It effectively filters out any elements that are not found\n * in every array.\n *\n * @template T - The type of elements in the arrays.\n * @param {...(ArrayLike<T> | null | undefined)} arrays - The arrays to compare.\n * @returns {T[]} A new array containing the elements that are present in all arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(...arrays: Array<ArrayLike<T> | null | undefined>): T[] {\n  if (arrays.length === 0) {\n    return [];\n  }\n\n  if (!isArrayLikeObject(arrays[0])) {\n    return [];\n  }\n\n  let result: T[] = uniq(Array.from(arrays[0]));\n\n  for (let i = 1; i < arrays.length; i++) {\n    const array = arrays[i];\n\n    if (!isArrayLikeObject(array)) {\n      return [];\n    }\n\n    result = intersectionToolkit(result, Array.from(array));\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/intersectionBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { intersectionBy as intersectionByLodash } from 'lodash';\nimport { intersection } from './intersection';\nimport { intersectionBy } from './intersectionBy';\nimport { range } from '../../math';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { slice } from '../_internal/slice';\nimport { stubNaN } from '../_internal/stubNaN';\nimport { constant } from '../util/constant';\nimport { times } from '../util/times';\nimport { toString } from '../util/toString';\n\ndescribe('intersectionBy', () => {\n  /**\n   * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/intersection-methods.spec.js#L1\n   */\n  it('should return the intersection of two arrays', () => {\n    const actual = intersection([2, 1], [2, 3]);\n    expect(actual).toEqual([2]);\n  });\n\n  it('should return the intersection of multiple arrays', () => {\n    const actual = intersection([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([3]);\n  });\n\n  it('should return an array of unique values', () => {\n    const actual = intersection([1, 1, 3, 2, 2], [5, 2, 2, 1, 4], [2, 1, 1]);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should work with a single array', () => {\n    const actual = intersection([1, 1, 3, 2, 2]);\n    expect(actual).toEqual([1, 3, 2]);\n  });\n\n  it('should work with `arguments` objects', () => {\n    const array = [0, 1, null, 3];\n    const expected = [1, 3];\n\n    expect(intersection(array, args)).toEqual(expected);\n    expect(intersection(args, array)).toEqual(expected);\n  });\n\n  it('should treat `-0` as `0`', () => {\n    const values = [-0, 0];\n    const expected = values.map(constant(['0']));\n\n    const actual = values.map(value => intersection(values, [value]).map(toString));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match `NaN`', () => {\n    const actual = intersection([1, NaN, 3], [NaN, 5, NaN]);\n    expect(actual).toEqual([NaN]);\n  });\n\n  it('should work with large arrays of `-0` as `0`', () => {\n    const values = [-0, 0];\n    const expected = values.map(constant(['0']));\n\n    const actual = values.map(value => {\n      const largeArray = times(LARGE_ARRAY_SIZE, constant(value));\n      return intersection(values, largeArray).map(toString);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with large arrays of `NaN`', () => {\n    const largeArray = times(LARGE_ARRAY_SIZE, stubNaN);\n    expect(intersection([1, NaN, 3], largeArray)).toEqual([NaN]);\n  });\n\n  it('should work with large arrays of objects', () => {\n    const object = {};\n    const largeArray = times(LARGE_ARRAY_SIZE, constant(object));\n\n    expect(intersection([object], largeArray)).toEqual([object]);\n    expect(intersection(range(LARGE_ARRAY_SIZE), [1])).toEqual([1]);\n  });\n\n  it('should treat values that are not arrays or `arguments` objects as empty', () => {\n    const array = [0, 1, null, 3];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(intersection(array, 3, { 0: 1 }, null)).toEqual([]);\n    expect(intersection(null, array, null, [2, 3])).toEqual([]);\n    expect(intersection(array, null, args, null)).toEqual([]);\n  });\n\n  /**\n   * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/intersectionBy.spec.js#L1\n   */\n  it('should accept an `iteratee`', () => {\n    const actual1 = intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n    expect(actual1).toEqual([2.1]);\n\n    const actual2 = intersectionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n    expect(actual2).toEqual([{ x: 1 }]);\n\n    const actual3 = intersectionBy([2.1, 1.2], [2.3, 3.4], [1.2, 2.4], Math.floor);\n    expect(actual3).toEqual([2.1]);\n\n    const actual4 = intersectionBy([1], [1], [1], [1], [1], [1], [1]);\n    expect(actual4).toEqual([1]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: number[] | undefined;\n\n    intersectionBy([2.1, 1.2], [2.3, 3.4], function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual([2.3]);\n  });\n\n  it('should return empty array if no arrays provided', () => {\n    expect(intersectionBy(null)).toEqual([]);\n    expect(intersectionBy(undefined)).toEqual([]);\n  });\n\n  it('should return as it is if only one array provided', () => {\n    expect(intersectionBy([1, 2, 3])).toEqual([1, 2, 3]);\n  });\n\n  it('should return empty array if non array-like object is provided in the middle', () => {\n    expect(intersectionBy([1, 2, 3], '123', [1, 2])).toEqual([]);\n  });\n\n  it('should support array-like object', () => {\n    expect(intersectionBy({ 0: 'a', 1: 'b', 2: 'c', length: 3 }, { 0: 'b', 1: 'c', length: 2 })).toEqual(['b', 'c']);\n    expect(intersectionBy({ 0: 1.1, 1: 2.2, 2: 3.3, length: 3 }, { 0: 1.7, 1: 2.7, length: 2 }, Math.floor)).toEqual([\n      1.1, 2.2,\n    ]);\n  });\n\n  it('should handle non-function, non-string, non-array iteratee', () => {\n    const array1 = [1, 2, 3];\n    const array2 = [2, 3, 4];\n\n    const actual = intersectionBy(array1, array2, 123);\n    expect(actual).toEqual([1, 2, 3]);\n  });\n\n  it('should match each value from the first array to at most one value in the second array using the mapper', () => {\n    expect(intersectionBy([2.1, 2.2], [2.3, 3.4], Math.floor)).toStrictEqual([2.1]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(intersectionBy).toEqualTypeOf<typeof intersectionByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/intersectionBy.ts",
    "content": "import { intersectionBy as intersectionByToolkit } from '../../array/intersectionBy.ts';\nimport { last } from '../../array/last.ts';\nimport { uniq } from '../../array/uniq.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { property } from '../object/property.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Creates an array of unique values that are included in all given arrays, using an iteratee to compute equality.\n *\n * @template T, U\n * @param {ArrayLike<T> | null} array - The array to inspect.\n * @param {ArrayLike<U>} values - The values to compare.\n * @param {ValueIteratee<T | U>} iteratee - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n */\nexport function intersectionBy<T, U>(\n  array: ArrayLike<T> | null,\n  values: ArrayLike<U>,\n  iteratee: ValueIteratee<T | U>\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays, using an iteratee to compute equality.\n *\n * @template T, U, V\n * @param {ArrayLike<T> | null} array - The array to inspect.\n * @param {ArrayLike<U>} values1 - The first values to compare.\n * @param {ArrayLike<V>} values2 - The second values to compare.\n * @param {ValueIteratee<T | U | V>} iteratee - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionBy([2.1, 1.2], [2.3, 3.4], [2.5], Math.floor);\n * // => [2.1]\n */\nexport function intersectionBy<T, U, V>(\n  array: ArrayLike<T> | null,\n  values1: ArrayLike<U>,\n  values2: ArrayLike<V>,\n  iteratee: ValueIteratee<T | U | V>\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays, using an iteratee to compute equality.\n *\n * @template T, U, V, W\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {ArrayLike<U>} values1 - The first values to compare.\n * @param {ArrayLike<V>} values2 - The second values to compare.\n * @param {...Array<ArrayLike<W> | ValueIteratee<T | U | V | W>>} values - The other arrays to compare, and the iteratee to use.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionBy([2.1, 1.2], [2.3, 3.4], [2.5], [2.6, 1.7], Math.floor);\n * // => [2.1]\n */\nexport function intersectionBy<T, U, V, W>(\n  array: ArrayLike<T> | null | undefined,\n  values1: ArrayLike<U>,\n  values2: ArrayLike<V>,\n  ...values: Array<ArrayLike<W> | ValueIteratee<T | U | V | W>>\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays.\n *\n * @template T\n * @param {ArrayLike<T> | null} [array] - The array to inspect.\n * @param {...Array<ArrayLike<T>>} values - The values to compare.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionBy([2, 1], [2, 3]);\n * // => [2]\n */\nexport function intersectionBy<T>(array?: ArrayLike<T> | null, ...values: Array<ArrayLike<T>>): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays, using an iteratee to compute equality.\n *\n * @template T\n * @param {...Array<ArrayLike<T> | ValueIteratee<T>>} values - The arrays to compare and the iteratee to use.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n */\nexport function intersectionBy<T>(...values: Array<ArrayLike<T> | ValueIteratee<T>>): T[];\n\n/**\n * Returns the intersection of multiple arrays after applying the iteratee function to their elements.\n *\n * This function takes multiple arrays and an optional iteratee function (or property key)\n * to compare the elements after transforming them. It returns a new array containing the elements from\n * the first array that are present in all subsequent arrays after applying the iteratee to each element.\n * If no iteratee is provided, the identity function is used.\n *\n * If the first array is `null` or `undefined`, an empty array is returned.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The first array to compare.\n * @param {...(ArrayLike<T> | ((value: T) => unknown) | string)} values - The arrays to compare, or the iteratee function.\n * @returns {T[]} A new array containing the elements from the first array that are present\n *  in all subsequent arrays after applying the iteratee.\n *\n * @example\n * const array1 = [{ x: 1 }, { x: 2 }, { x: 3 }];\n * const array2 = [{ x: 2 }, { x: 3 }];\n * const result = intersectionBy(array1, array2, 'x');\n * // result will be [{ x: 2 }, { x: 3 }] since these elements have the same `x` property.\n *\n * @example\n * const array1 = [1.1, 2.2, 3.3];\n * const array2 = [2.3, 3.3];\n * const result = intersectionBy(array1, array2, Math.floor);\n * // result will be [2.3, 3.3] since it shares the same integer part when `Math.floor` is applied.\n */\nexport function intersectionBy<T>(array: any, ...values: any[]): T[] {\n  if (!isArrayLikeObject(array)) {\n    return [];\n  }\n\n  const lastValue = last(values);\n  if (lastValue === undefined) {\n    return Array.from(array) as T[];\n  }\n\n  let result = uniq(Array.from(array));\n\n  const count = isArrayLikeObject(lastValue) ? values.length : values.length - 1;\n\n  for (let i = 0; i < count; ++i) {\n    const value = values[i];\n\n    if (!isArrayLikeObject(value)) {\n      return [];\n    }\n\n    if (isArrayLikeObject(lastValue)) {\n      result = intersectionByToolkit(result, Array.from(value), identity);\n    } else if (typeof lastValue === 'function') {\n      result = intersectionByToolkit(result, Array.from(value), value => lastValue(value));\n    } else if (typeof lastValue === 'string') {\n      result = intersectionByToolkit(result, Array.from(value), property(lastValue));\n    }\n  }\n\n  return result as T[];\n}\n"
  },
  {
    "path": "src/compat/array/intersectionWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { intersectionWith as intersectionWithLodash } from 'lodash';\nimport { intersectionWith } from './intersectionWith';\nimport { map } from './map';\nimport { isEqual } from '../../predicate/isEqual';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { stubNaN } from '../_internal/stubNaN';\nimport { stubZero } from '../_internal/stubZero';\nimport { range } from '../math/range';\nimport { constant } from '../util/constant';\nimport { eq } from '../util/eq';\nimport { times } from '../util/times';\nimport { toString } from '../util/toString';\n\ndescribe('intersectionWith', () => {\n  const func = intersectionWith;\n\n  it(`should return the intersection of two arrays`, () => {\n    const actual = func([2, 1], [2, 3]);\n    expect(actual).toEqual([2]);\n  });\n\n  it(`should return the intersection of multiple arrays`, () => {\n    const actual = func([2, 1, 2, 3], [3, 4], [3, 2]);\n    expect(actual).toEqual([3]);\n  });\n\n  it(`should return an array of unique values`, () => {\n    const actual = func([1, 1, 3, 2, 2], [5, 2, 2, 1, 4], [2, 1, 1]);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it(`should work with a single array`, () => {\n    const actual = func([1, 1, 3, 2, 2]);\n    expect(actual).toEqual([1, 3, 2]);\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    const array = [0, 1, null, 3];\n    const expected = [1, 3];\n\n    expect(func(array, args)).toEqual(expected);\n    expect(func(args, array)).toEqual(expected);\n  });\n\n  it(`should treat \\`-0\\` as \\`0\\``, () => {\n    const values = [-0, 0];\n    const expected = map(values, constant(['0']));\n\n    const actual = map(values, value => map(func(values, [value]), toString));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    const actual = func([1, NaN, 3], [NaN, 5, NaN]);\n    expect(actual).toEqual([NaN]);\n  });\n\n  it(`should work with large arrays of \\`-0\\` as \\`0\\``, () => {\n    const values = [-0, 0];\n    const expected = map(values, constant(['0']));\n\n    const actual = map(values, value => {\n      const largeArray = times(LARGE_ARRAY_SIZE, constant(value));\n      return map(func(values, largeArray), toString);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with large arrays of \\`NaN\\``, () => {\n    const largeArray = times(LARGE_ARRAY_SIZE, stubNaN);\n    expect(func([1, NaN, 3], largeArray)).toEqual([NaN]);\n  });\n\n  it(`should work with large arrays of objects`, () => {\n    const object = {};\n    const largeArray = times(LARGE_ARRAY_SIZE, constant(object));\n\n    expect(func([object], largeArray)).toEqual([object]);\n    expect(func(range(LARGE_ARRAY_SIZE), [1])).toEqual([1]);\n  });\n\n  it(`should treat values that are not arrays or \\`arguments\\` objects as empty`, () => {\n    const array = [0, 1, null, 3];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(array, 3, { 0: 1 }, null)).toEqual([]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(null, array, null, [2, 3])).toEqual([]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(array, null, args, null)).toEqual([]);\n  });\n\n  it('should work with a `comparator`', () => {\n    const objects = [\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n    ];\n    const others = [\n      { x: 1, y: 1 },\n      { x: 1, y: 2 },\n    ];\n    const actual = intersectionWith(objects, others, isEqual);\n\n    expect(actual).toEqual([objects[0]]);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const array = [-0];\n    const largeArray = times(LARGE_ARRAY_SIZE, stubZero);\n    const others = [[0], largeArray];\n    const expected = map(others, constant(['-0']));\n\n    const actual = map(others, other => map(intersectionWith(array, other, eq), toString));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(intersectionWith).toEqualTypeOf<typeof intersectionWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/intersectionWith.ts",
    "content": "import { last } from './last.ts';\nimport { intersectionWith as intersectionWithToolkit } from '../../array/intersectionWith.ts';\nimport { uniq as uniqToolkit } from '../array/uniq.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons.\n *\n * @template T, U\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {ArrayLike<U>} values - The values to compare.\n * @param {(a: T, b: T | U) => boolean} comparator - The comparator invoked per element.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * const others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n * intersectionWith(objects, others, (a, b) => a.x === b.x && a.y === b.y);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nexport function intersectionWith<T, U>(\n  array: ArrayLike<T> | null | undefined,\n  values: ArrayLike<U>,\n  comparator: (a: T, b: T | U) => boolean\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons.\n *\n * @template T, U, V\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {ArrayLike<U>} values1 - The first values to compare.\n * @param {ArrayLike<V>} values2 - The second values to compare.\n * @param {(a: T, b: T | U | V) => boolean} comparator - The comparator invoked per element.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * const others1 = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n * const others2 = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }];\n * intersectionWith(objects, others1, others2, (a, b) => a.x === b.x && a.y === b.y);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nexport function intersectionWith<T, U, V>(\n  array: ArrayLike<T> | null | undefined,\n  values1: ArrayLike<U>,\n  values2: ArrayLike<V>,\n  comparator: (a: T, b: T | U | V) => boolean\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays, using a comparator function for equality comparisons.\n *\n * @template T, U, V, W\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {ArrayLike<U>} values1 - The first values to compare.\n * @param {ArrayLike<V>} values2 - The second values to compare.\n * @param {...Array<ArrayLike<W> | (a: T, b: T | U | V | W) => boolean>} values - The other arrays to compare, and the comparator to use.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * const others1 = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n * const others2 = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }];\n * const others3 = [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }];\n * intersectionWith(objects, others1, others2, others3, (a, b) => a.x === b.x && a.y === b.y);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nexport function intersectionWith<T, U, V, W>(\n  array: ArrayLike<T> | null | undefined,\n  values1: ArrayLike<U>,\n  values2: ArrayLike<V>,\n  ...values: Array<ArrayLike<W> | ((a: T, b: T | U | V | W) => boolean)>\n): T[];\n\n/**\n * Creates an array of unique values that are included in all given arrays.\n *\n * @template T\n * @param {ArrayLike<T> | null} [array] - The array to inspect.\n * @param {...Array<ArrayLike<T> | (a: T, b: never) => boolean>} values - The values to compare.\n * @returns {T[]} Returns the new array of intersecting values.\n *\n * @example\n * intersectionWith([2, 1], [2, 3]);\n * // => [2]\n */\nexport function intersectionWith<T>(\n  array?: ArrayLike<T> | null,\n  ...values: Array<ArrayLike<T> | ((a: T, b: never) => boolean)>\n): T[];\n\n/**\n * Returns the intersection of multiple arrays based on a custom equality function.\n *\n * @template T - The type of elements in the arrays\n * @param {ArrayLike<T> | null | undefined} firstArr - The first array to compare\n * @param {...(ArrayLike<T> | null | undefined | ((x: T, y: T) => boolean))} otherArrs - Additional arrays and optional equality function\n * @returns {T[]} Elements from first array that match in all arrays\n *\n * @example\n * const arr1 = [{id: 1}, {id: 2}];\n * const arr2 = [{id: 2}, {id: 3}];\n * const result = intersectionWith(arr1, arr2, (a, b) => a.id === b.id);\n * // result is [{id: 2}]\n */\nexport function intersectionWith<T>(firstArr: ArrayLike<T> | null | undefined, ...otherArrs: any[]): T[] {\n  if (firstArr == null) {\n    return [];\n  }\n\n  const _comparator = last(otherArrs);\n  let comparator = eq as (x: T, y: T) => boolean;\n  let uniq: (arr: T[]) => T[] = uniqToolkit;\n\n  if (typeof _comparator === 'function') {\n    comparator = _comparator;\n    uniq = uniqPreserve0;\n    otherArrs.pop();\n  }\n\n  let result = uniq(Array.from(firstArr));\n\n  for (let i = 0; i < otherArrs.length; ++i) {\n    const otherArr = otherArrs[i] as ArrayLike<T>;\n\n    if (otherArr == null) {\n      return [];\n    }\n\n    result = intersectionWithToolkit(result, Array.from(otherArr), comparator);\n  }\n\n  return result;\n}\n\n/**\n * This function is to preserve the sign of `-0`, which is a behavior in lodash.\n */\nfunction uniqPreserve0<T>(arr: T[]): T[] {\n  const result = [];\n  const added = new Set();\n\n  for (let i = 0; i < arr.length; i++) {\n    const item = arr[i];\n\n    if (added.has(item)) {\n      continue;\n    }\n\n    result.push(item);\n    added.add(item);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/invokeMap.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { invokeMap as invokeMapLodash } from 'lodash';\nimport { invokeMap } from './invokeMap';\nimport { stubOne } from '../_internal/stubOne';\n\ndescribe('invokeMap', () => {\n  it('should invoke a methods on each element of `collection`', () => {\n    const array = ['a', 'b', 'c'];\n    const actual = invokeMap(array, 'toUpperCase');\n\n    expect(actual).toEqual(['A', 'B', 'C']);\n  });\n\n  it('should support invoking with arguments', () => {\n    const array = [\n      function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.from(arguments);\n      },\n    ];\n    const actual = invokeMap(array, 'call', null, 'a', 'b', 'c');\n\n    expect(actual).toEqual([['a', 'b', 'c']]);\n  });\n\n  it('should work with a function for `methodName`', () => {\n    const array = ['a', 'b', 'c'];\n\n    const actual = invokeMap(\n      array,\n      function (this: any, left: string, right: string) {\n        return left + this.toUpperCase() + right;\n      },\n      '(',\n      ')'\n    );\n\n    expect(actual).toEqual(['(A)', '(B)', '(C)']);\n  });\n\n  it('should work with an object for `collection`', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const actual = invokeMap(object, 'toFixed', 1);\n\n    expect(actual).toEqual(['1.0', '2.0', '3.0']);\n  });\n\n  it('should treat number, null, or undefined for `collection` as empty', () => {\n    // @ts-expect-error - `path` parameter is not optional\n    expect(invokeMap(1)).toEqual([]);\n    // @ts-expect-error - `path` parameter is not optional\n    expect(invokeMap(null)).toEqual([]);\n    // @ts-expect-error - `path` parameter is not optional\n    expect(invokeMap(undefined)).toEqual([]);\n  });\n\n  it('should not error on nullish elements', () => {\n    const array = ['a', null, undefined, 'd'];\n    const actual = invokeMap(array, 'toUpperCase');\n\n    expect(actual).toEqual(['A', undefined, undefined, 'D']);\n  });\n\n  it('should not error on elements with missing properties', () => {\n    const objects = [null, undefined, stubOne].map(value => ({ a: value }));\n    const expected = objects.map(object => (object.a ? object.a() : undefined));\n    const actual = invokeMap(objects, 'a');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should invoke deep property methods with the correct `this` binding', () => {\n    const object = {\n      a: {\n        b: function () {\n          return this.c;\n        },\n        c: 1,\n      },\n    };\n\n    const paths = ['a.b', ['a', 'b']];\n\n    paths.forEach(path => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      expect(invokeMap([object], path)).toEqual([1]);\n    });\n  });\n\n  it('should bind `this` correctly for array path', () => {\n    const singlePropObject = {\n      value: function () {\n        return this;\n      },\n    };\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(invokeMap([singlePropObject], ['value'])[0]).toBe(singlePropObject);\n\n    const emptyPathObject = {\n      '': function () {\n        return this;\n      },\n    };\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(invokeMap([emptyPathObject], []).length).toBe(1);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(invokeMap([emptyPathObject], [])[0]).toBeUndefined();\n\n    const nestedObject = {\n      a: {\n        b: {\n          c: function () {\n            return this;\n          },\n        },\n      },\n    };\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(invokeMap([nestedObject], ['a', 'b', 'c'])[0]).toBe(nestedObject.a.b);\n  });\n\n  it('should bind `this` correctly for string path', () => {\n    const singlePropObject = {\n      value: function () {\n        return this;\n      },\n    };\n    expect(invokeMap([singlePropObject], 'value')[0]).toBe(singlePropObject);\n\n    const emptyPathObject = {\n      '': function () {\n        return this;\n      },\n    };\n    const result = invokeMap([emptyPathObject], '');\n    expect(result[0]).toBe(emptyPathObject);\n\n    const nestedObject = {\n      a: {\n        b: {\n          c: function () {\n            return this;\n          },\n        },\n      },\n    };\n    expect(invokeMap([nestedObject], 'a.b.c')[0]).toBe(nestedObject.a.b);\n\n    const objectWithEmptyPart = {\n      a: {\n        '': {\n          c: function () {\n            return this;\n          },\n        },\n      },\n    };\n\n    const aEmptyDotC = invokeMap([objectWithEmptyPart], 'a..c');\n    expect(aEmptyDotC[0]).toBeUndefined();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(invokeMap).toEqualTypeOf<typeof invokeMapLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/invokeMap.ts",
    "content": "import { isFunction, isNil } from '../../predicate/index.ts';\nimport { get } from '../object/get.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Invokes the method at path of each element in collection.\n *\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {string} methodName - The name of the method to invoke.\n * @param {...any[]} args - The arguments to invoke each method with.\n * @returns {any[]} Returns the array of results.\n *\n * @example\n * invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * invokeMap([123, 456], 'toString', 2);\n * // => ['1111011', '111001000']\n */\nexport function invokeMap(collection: object | null | undefined, methodName: string, ...args: any[]): any[];\n\n/**\n * Invokes the method at path of each element in collection.\n *\n * @template R\n * @param {object | null | undefined} collection - The collection to iterate over.\n * @param {(...args: any[]) => R} method - The method to invoke.\n * @param {...any[]} args - The arguments to invoke each method with.\n * @returns {R[]} Returns the array of results.\n *\n * @example\n * invokeMap([5, 1, 7], Array.prototype.slice, 1);\n * // => [[], [], []]\n */\nexport function invokeMap<R>(collection: object | null | undefined, method: (...args: any[]) => R, ...args: any[]): R[];\n\n/**\n * Invokes the method at path of each element in collection.\n *\n * @template T, R\n * @param {ArrayLike<T> | Record<string, T> | null | undefined} collection - The collection to iterate over.\n * @param {string | ((...args: any[]) => R)} path - The path of the method to invoke or the method to invoke.\n * @param {...any[]} args - The arguments to invoke each method with.\n * @returns {Array<R | undefined>} Returns the array of results.\n *\n * @example\n * invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n */\nexport function invokeMap<T, R>(\n  collection: ArrayLike<T> | Record<string, T> | null | undefined,\n  path: string | ((...args: any[]) => R),\n  ...args: any[]\n): Array<R | undefined> {\n  if (isNil(collection)) {\n    return [];\n  }\n\n  const values = isArrayLike(collection) ? (Array.from(collection) as T[]) : (Object.values(collection) as T[]);\n  const result: Array<R | undefined> = [];\n\n  for (let i = 0; i < values.length; i++) {\n    const value = values[i];\n\n    if (isFunction(path)) {\n      result.push(path.apply(value, args));\n      continue;\n    }\n\n    const method = get(value, path);\n\n    let thisContext = value;\n\n    if (Array.isArray(path)) {\n      const pathExceptLast = path.slice(0, -1);\n      if (pathExceptLast.length > 0) {\n        thisContext = get(value, pathExceptLast);\n      }\n    } else if (typeof path === 'string' && path.includes('.')) {\n      const parts = path.split('.');\n      const pathExceptLast = parts.slice(0, -1).join('.');\n      thisContext = get(value, pathExceptLast);\n    }\n\n    result.push(method == null ? undefined : method.apply(thisContext, args));\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/join.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { join as joinLodash } from 'lodash';\nimport { join } from './join.js';\nimport { args } from '../_internal/args';\n\ndescribe('join', () => {\n  it('should join elements of an array into a string', () => {\n    const arr = ['a', 'b', 'c'];\n    const result = join(arr);\n    expect(result).toBe('a,b,c');\n  });\n\n  it('should join elements of an array into a string with a custom separator', () => {\n    const arr = ['a', 'b', 'c'];\n    const result = join(arr, '~');\n    expect(result).toBe('a~b~c');\n  });\n\n  it('should return an empty string for non-array-like values', () => {\n    expect(join(null)).toBe('');\n    expect(join(undefined)).toBe('');\n    expect(join(1 as any)).toBe('');\n  });\n\n  it('should support array-like', () => {\n    expect(join({ 0: 1, 1: 2, length: 2 })).toBe('1,2');\n    expect(join('123')).toBe('1,2,3');\n    expect(join(args)).toBe('1,2,3');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(join).toEqualTypeOf<typeof joinLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/join.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Joins elements of an array into a string.\n *\n * @param {ArrayLike<any> | null | undefined} array - The array to join.\n * @param {string} [separator=','] - The separator used to join the elements, default is common separator `,`.\n * @returns {string} - Returns a string containing all elements of the array joined by the specified separator.\n *\n * @example\n * const arr = [\"a\", \"b\", \"c\"];\n * const result = join(arr, \"~\");\n * console.log(result); // Output: \"a~b~c\"\n */\nexport function join(array: ArrayLike<any> | null | undefined, separator?: string): string {\n  if (!isArrayLike(array)) {\n    return '';\n  }\n  return Array.from(array).join(separator);\n}\n"
  },
  {
    "path": "src/compat/array/keyBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { keyBy as keyByLodash } from 'lodash';\nimport { keyBy } from './keyBy.ts';\n\ndescribe('keyBy', () => {\n  const array = [\n    { dir: 'left', code: 97 },\n    { dir: 'right', code: 100 },\n  ];\n\n  it('should transform keys by `iteratee`', () => {\n    const expected = { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } };\n\n    const actual = keyBy(array, object => String.fromCharCode(object.code));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use identity when iteratee is nullish', () => {\n    const array = [4, 6, 6];\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => ({ 4: 4, 6: 6 }));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? keyBy(array, value) : keyBy(array)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const expected = { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } };\n    const actual = keyBy(array, 'dir');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should only add values to own, not inherited, properties', () => {\n    const actual = keyBy([6.1, 4.2, 6.3], n => (Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor'));\n\n    expect(actual.constructor).toEqual(4.2);\n    expect(actual.hasOwnProperty).toEqual(6.3);\n  });\n\n  it('should work with a number for `iteratee`', () => {\n    const array = [\n      [1, 'a'],\n      [2, 'a'],\n      [2, 'b'],\n    ];\n\n    expect(keyBy(array, 0)).toEqual({ 1: [1, 'a'], 2: [2, 'b'] });\n    expect(keyBy(array, 1)).toEqual({ a: [2, 'a'], b: [2, 'b'] });\n  });\n\n  it('should work with an object for `collection`', () => {\n    const actual = keyBy({ a: 6.1, b: 4.2, c: 6.3 }, Math.floor);\n    expect(actual).toEqual({ 4: 4.2, 6: 6.3 });\n  });\n\n  // additional tests\n  it('should return an empty object for non-array/object collections', () => {\n    const nonCollections = [null, undefined, 123, true, NaN, Symbol('test')];\n\n    nonCollections.forEach(collection => {\n      // @ts-expect-error Testing invalid input types\n      expect(keyBy(collection)).toEqual({});\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(keyBy).toEqualTypeOf<typeof keyByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/keyBy.ts",
    "content": "import { reduce } from './reduce.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIterateeCustom } from '../_internal/ValueIterateeCustom.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isObjectLike } from '../predicate/isObjectLike.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {ValueIterateeCustom<T, PropertyKey>} [iteratee] - The iteratee to transform keys.\n * @returns {Record<string, T>} Returns the composed aggregate object.\n *\n * @example\n * const array = [\n *   { dir: 'left', code: 97 },\n *   { dir: 'right', code: 100 }\n * ];\n *\n * keyBy(array, o => String.fromCharCode(o.code));\n * // => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n *\n * keyBy(array, 'dir');\n * // => { left: { dir: 'left', code: 97 }, right: { dir: 'right', code: 100 } }\n */\nexport function keyBy<T>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIterateeCustom<T, PropertyKey>\n): Record<string, T>;\n\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ValueIterateeCustom<T[keyof T], PropertyKey>} [iteratee] - The iteratee to transform keys.\n * @returns {Record<string, T[keyof T]>} Returns the composed aggregate object.\n *\n * @example\n * const obj = { a: { dir: 'left', code: 97 }, b: { dir: 'right', code: 100 } };\n * keyBy(obj, o => String.fromCharCode(o.code));\n * // => { a: { dir: 'left', code: 97 }, d: { dir: 'right', code: 100 } }\n */\nexport function keyBy<T extends object>(\n  collection: T | null | undefined,\n  iteratee?: ValueIterateeCustom<T[keyof T], PropertyKey>\n): Record<string, T[keyof T]>;\n\n/**\n * Maps each element of an array or an object based on a provided key-generating function.\n *\n * This function takes an array or object and a function that generates a key from each element or value. It returns\n * an object where the keys are the generated keys and the values are the corresponding elements or values.\n * If there are multiple elements or values generating the same key, the last one among them is used\n * as the value.\n *\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {Function | PropertyKey | Array | Object} [iteratee] - The iteratee to transform keys.\n *   - If a function is provided, it's invoked for each element in the collection.\n *   - If a property name (string) is provided, that property of each element is used as the key.\n *   - If a property-value pair (array) is provided, elements with matching property values are used.\n *   - If a partial object is provided, elements with matching properties are used.\n *   - If omitted, the identity function is used.\n * @returns {Object} Returns the composed aggregate object.\n *\n * @example\n * // Using an array of objects\n * keyBy([{ id: 'a' }, { id: 'b' }], 'id');\n * // => { a: { id: 'a' }, b: { id: 'b' } }\n *\n * @example\n * // Using a function iteratee\n * keyBy(['a', 'b', 'c'], val => val.toUpperCase());\n * // => { A: 'a', B: 'b', C: 'c' }\n */\nexport function keyBy<T>(\n  collection: unknown,\n  iteratee?: ((value: T) => unknown) | PropertyKey | [keyof T, unknown] | Partial<T> | null\n): Record<string, T> {\n  if (!isArrayLike(collection) && !isObjectLike(collection)) {\n    return {};\n  }\n\n  const keyFn = createIteratee(iteratee ?? identity);\n\n  return reduce(\n    collection as ArrayLike<T>,\n    (result, value) => {\n      const key = keyFn(value);\n      result[key] = value;\n      return result;\n    },\n    {} as Record<string, T>\n  );\n}\n"
  },
  {
    "path": "src/compat/array/last.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { last as lastLodash } from 'lodash';\nimport { args } from '../_internal/args';\nimport { last } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/last.spec.js#L1\n */\ndescribe('last', () => {\n  const array = [1, 2, 3, 4];\n\n  it('should return the last element', () => {\n    expect(last(array)).toBe(4);\n  });\n\n  it('should return `undefined` when querying empty arrays', () => {\n    const array: number[] = [];\n    array['-1'] = 1;\n\n    expect(last([])).toBe(undefined);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(last);\n\n    expect(actual).toEqual([3, 6, 9]);\n  });\n\n  it('should return `undefined` when the collection is null or undefined', () => {\n    expect(last(null)).toBe(undefined);\n  });\n\n  it('should return `undefined` when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(last(1)).toBe(undefined);\n    // @ts-expect-error - invalid argument\n    expect(last(true)).toBe(undefined);\n  });\n\n  it('should support array-like', () => {\n    expect(last({ 0: 1, 1: 2, 2: 3, length: 3 })).toBe(3);\n    expect(last('123')).toBe('3');\n    expect(last(args)).toBe(3);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(last).toEqualTypeOf<typeof lastLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/last.ts",
    "content": "import { last as lastToolkit } from '../../array/last.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Returns the last element of an array.\n *\n * This function takes an array and returns the last element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * Unlike some implementations, this function is optimized for performance\n * by directly accessing the last index of the array.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array from which to get the last element.\n * @returns {T | undefined} The last element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const arr = [1, 2, 3];\n * const lastElement = last(arr);\n * // lastElement will be 3\n *\n * const emptyArr: number[] = [];\n * const noElement = last(emptyArr);\n * // noElement will be undefined\n */\nexport function last<T>(array: ArrayLike<T> | null | undefined): T | undefined {\n  if (!isArrayLike(array)) {\n    return undefined;\n  }\n  return lastToolkit(toArray(array));\n}\n"
  },
  {
    "path": "src/compat/array/lastIndexOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { lastIndexOf as lastIndexOfLodash } from 'lodash';\nimport { lastIndexOf } from './lastIndexOf';\n\n/**\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/findLastIndex-and-lastIndexOf.spec.js\n */\n\ndescribe('lastIndexOf', () => {\n  const array = [1, 2, 3, 1, 2, 3];\n\n  it(`should return the index of the last matched value`, () => {\n    expect(lastIndexOf(array, 3)).toBe(5);\n  });\n\n  it(`should work with \\`NaN\\``, () => {\n    expect(lastIndexOf([1, 2, 3, NaN, 1, 2], NaN)).toBe(3);\n  });\n\n  it(`should work with a positive \\`fromIndex\\``, () => {\n    expect(lastIndexOf(array, 1, 2)).toBe(0);\n  });\n\n  it(`should work with a \\`fromIndex\\` >= \\`length\\``, () => {\n    const values = [6, 8, 2 ** 32, Infinity];\n    const expected = values.map(() => [-1, 3]);\n\n    const actual = values.map(fromIndex => [\n      lastIndexOf(array, undefined, fromIndex),\n      lastIndexOf(array, 1, fromIndex),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with a negative \\`fromIndex\\``, () => {\n    expect(lastIndexOf(array, 2, -3)).toBe(1);\n  });\n\n  it(`should work with a negative \\`fromIndex\\` <= \\`-length\\``, () => {\n    const values = [-6, -8, -Infinity];\n    const expected = values.map(() => 0);\n\n    const actual = values.map(fromIndex => lastIndexOf(array, 1, fromIndex));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should coerce \\`fromIndex\\` to an integer`, () => {\n    expect(lastIndexOf(array, 2, 4.2)).toBe(4);\n  });\n\n  it(`should return -1 for empty array or nullish values`, () => {\n    expect(lastIndexOf([], 1)).toBe(-1);\n    expect(lastIndexOf(null, 1)).toBe(-1);\n    expect(lastIndexOf(undefined, 1)).toBe(-1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(lastIndexOf).toEqualTypeOf<typeof lastIndexOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/lastIndexOf.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Gets the index at which the last occurrence of value is found in array.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {T} value - The value to search for.\n * @param {true | number} [fromIndex] - The index to search from or true to search from the end.\n * @returns {number} Returns the index of the matched value, else -1.\n *\n * @example\n * lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n *\n * lastIndexOf([1, 2, 1, 2], 2, true);\n * // => 3\n */\nexport function lastIndexOf<T>(\n  array: ArrayLike<T> | null | undefined,\n  searchElement: T,\n  fromIndex?: true | number\n): number;\n\nexport function lastIndexOf<T>(\n  array: ArrayLike<T> | null | undefined,\n  searchElement: T,\n  fromIndex?: true | number\n): number {\n  if (!isArrayLike(array) || array.length === 0) {\n    return -1;\n  }\n\n  const length = array.length;\n\n  let index = (fromIndex as number) ?? length - 1;\n  if (fromIndex != null) {\n    index = index < 0 ? Math.max(length + index, 0) : Math.min(index, length - 1);\n  }\n\n  // `Array.prototype.lastIndexOf` doesn't find `NaN` values, so we need to handle that case separately.\n  if (Number.isNaN(searchElement)) {\n    for (let i = index; i >= 0; i--) {\n      if (Number.isNaN(array[i])) {\n        return i;\n      }\n    }\n  }\n\n  return Array.from(array).lastIndexOf(searchElement, index);\n}\n"
  },
  {
    "path": "src/compat/array/map.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { constant, each, stubArray } from '..';\nimport { map } from './map';\nimport { identity } from '../../function/identity';\nimport { falsey } from '../_internal/falsey';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\n\ndescribe('map', () => {\n  const array = [1, 2];\n\n  it('should map values in `collection` to a new array', () => {\n    const object = { a: 1, b: 2 };\n    const expected = ['1', '2'];\n\n    expect(map(array, String)).toEqual(expected);\n    expect(map(object, String)).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ a: 'x' }, { a: 'y' }];\n    expect(map(objects, 'a')).toEqual(['x', 'y']);\n    const objects2 = [{ 1: 'x' }, { 1: 'y' }];\n    expect(map(objects2, 1)).toEqual(['x', 'y']);\n    const object3 = [{ [Symbol.for('a')]: 'x' }, { [Symbol.for('a')]: 'y' }];\n    expect(map(object3, Symbol.for('a'))).toEqual(['x', 'y']);\n  });\n\n  it('should iterate over own string keyed properties of objects', () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    // @ts-expect-error - Foo is not a constructor\n    const actual = map(new Foo(), identity);\n    expect(actual).toEqual([1]);\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const object = { a: 1, b: 2 };\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(constant([1, 2]));\n\n    each([array, object], collection => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      const actual = values.map((value, index) => (index ? map(collection, value) : map(collection)));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should accept a falsey `collection`', () => {\n    const expected = falsey.map(stubArray);\n\n    const actual = falsey.map((collection, index) => {\n      // @ts-expect-error - invalid types\n      return index ? map(collection as any) : map();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat number values for `collection` as empty', () => {\n    // @ts-expect-error - invalid types\n    expect(map(1)).toEqual([]);\n  });\n\n  // it('should treat a nodelist as an array-like object', () => {\n  //   if (document) {\n  //     const actual = map(document.getElementsByTagName('body'), element => element.nodeName.toLowerCase());\n\n  //     expect(actual).toEqual(['body']);\n  //   }\n  // });\n\n  it('should work with objects with non-number length properties', () => {\n    const value = { value: 'x' };\n    const object = { length: { value: 'x' } };\n\n    expect(map(object, identity)).toEqual([value]);\n  });\n\n  it('should accept an object iteratee', () => {\n    const object = [{ a: 1 }, { a: 2 }, { a: 1 }];\n    const expected = [true, false, true];\n\n    expect(map(object, { a: 1 })).toEqual(expected);\n  });\n\n  it('should accept a string as the collection', () => {\n    const actual = map('abc', identity);\n    expect(actual).toEqual(['a', 'b', 'c']);\n  });\n\n  describe('iteration methods', () => {\n    const array = [1, 2, 3];\n    const func = map;\n    const isFind = false;\n    const isSome = false;\n\n    it(`\\`map\\` should provide correct iteratee arguments`, () => {\n      let args: any;\n      const expected = [1, 0, array];\n\n      func(array, function () {\n        // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n        args || (args = Array.prototype.slice.call(arguments));\n      });\n\n      expect(args).toEqual(expected);\n    });\n\n    it(`\\`map\\` should treat sparse arrays as dense`, () => {\n      const array = [1];\n      array[2] = 3;\n\n      const expected = [\n        [1, 0, array],\n        [undefined, 1, array],\n        [3, 2, array],\n      ];\n\n      const argsList: any[] = [];\n      func(array, function () {\n        // eslint-disable-next-line prefer-rest-params\n        argsList.push(Array.prototype.slice.call(arguments));\n        return !(isFind || isSome);\n      });\n\n      expect(argsList).toEqual(expected);\n    });\n\n    it(`\\`map\\` should not iterate custom properties on arrays`, () => {\n      const array: any = [1, 2, 3];\n      array.a = 1;\n      const keys: any = [];\n      func(array, (_, key) => {\n        keys.push(key);\n        return false;\n      });\n\n      expect(keys.includes('a')).toBeFalsy();\n    });\n\n    it(`\\`map\\` iterates over own string keyed properties of objects`, () => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      function Foo(this: any) {\n        this.a = 1;\n      }\n      Foo.prototype.b = 2;\n\n      const values: any[] = [];\n      // eslint-disable-next-line\n      // @ts-ignore\n      func(new Foo(), value => {\n        values.push(value);\n      });\n      expect(values).toEqual([1]);\n    });\n\n    it(`\\`map\\` should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n      const isIteratedAsObject = function (object: any) {\n        let result = false;\n        (func as any)(\n          object,\n          () => {\n            result = true;\n          },\n          0\n        );\n        return result;\n      };\n\n      const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n      const expected = map(values, () => true);\n\n      const actual = map(values, length => isIteratedAsObject({ length: length }));\n\n      const Foo = function () {};\n      Foo.a = 1;\n\n      expect(actual).toEqual(expected);\n      expect(isIteratedAsObject(Foo)).toBeTruthy();\n      expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n    });\n\n    it(`\\`map\\` should ignore changes to \\`length\\``, () => {\n      let count = 0;\n      const array = [1];\n\n      func(array, () => {\n        if (++count === 1) {\n          array.push(2);\n        }\n        return !(isFind || isSome);\n      });\n\n      expect(count).toBe(1);\n    });\n\n    it(`\\`map\\` should ignore added \\`object\\` properties`, () => {\n      let count = 0;\n      const object: any = { a: 1 };\n\n      func(object, () => {\n        if (++count === 1) {\n          object.b = 2;\n        }\n        return !(isFind || isSome);\n      });\n\n      expect(count).toBe(1);\n    });\n  });\n});\n"
  },
  {
    "path": "src/compat/array/map.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { range } from '../../math/range.ts';\nimport { ArrayIterator } from '../_internal/ArrayIterator.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { TupleIterator } from '../_internal/TupleIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Maps each element in a tuple to a new tuple of values using an iteratee.\n *\n * @param {T} collection - The tuple to iterate over\n * @param {TupleIterator<T, U>} iteratee - The function invoked per iteration\n * @returns {{ [K in keyof T]: U }} - Returns the new mapped tuple\n *\n * @example\n * // Using a transformation function on a tuple\n * const tuple = [1, 'hello', true] as const;\n * map(tuple, value => String(value)); // => ['1', 'hello', 'true']\n */\nexport function map<T extends readonly [unknown, ...unknown[]], U>(\n  collection: T,\n  iteratee: TupleIterator<T, U>\n): { [K in keyof T]: U };\n\n/**\n * Maps each element in an array to a new array using an iteratee.\n *\n * @param {T[] | null | undefined} collection - The array to iterate over\n * @param {ArrayIterator<T, U>} iteratee - The function invoked per iteration\n * @returns {U[]} - Returns the new mapped array\n *\n * @example\n * // Using a transformation function on an array\n * const array = [1, 2, 3];\n * map(array, x => x * 2); // => [2, 4, 6]\n */\nexport function map<T, U>(collection: T[] | null | undefined, iteratee: ArrayIterator<T, U>): U[];\n\n/**\n * Maps each element in an array-like object to a new array using an iteratee.\n *\n * @param {ArrayLike<T> | null | undefined} collection - The array-like object to iterate over\n * @param {ListIterator<T, U>} iteratee - The function invoked per iteration\n * @returns {U[]} - Returns the new mapped array\n *\n * @example\n * // Using a transformation function on an array-like object\n * const arrayLike = { length: 2, 0: 'a', 1: 'b' };\n * map(arrayLike, x => x.toUpperCase()); // => ['A', 'B']\n */\nexport function map<T, U>(collection: ArrayLike<T> | null | undefined, iteratee: ListIterator<T, U>): U[];\n\n/**\n * Maps each value in an object to a new array.\n *\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The object to iterate over\n * @returns {T[]} - Returns an array of the object's values\n *\n * @example\n * // Converting an object's values to an array\n * const obj = { a: 1, b: 2, c: 3 };\n * map(obj); // => [1, 2, 3]\n */\nexport function map<T>(collection: Record<string, T> | Record<number, T> | null | undefined): T[];\n\n/**\n * Maps each element in an object to a new array using an iteratee.\n *\n * @param {T | null | undefined} collection - The object to iterate over\n * @param {ObjectIterator<T, U>} iteratee - The function invoked per iteration\n * @returns {U[]} - Returns the new mapped array\n *\n * @example\n * // Using a transformation function on an object\n * const obj = { a: 1, b: 2 };\n * map(obj, (value, key) => `${key}:${value}`); // => ['a:1', 'b:2']\n */\nexport function map<T extends object, U>(collection: T | null | undefined, iteratee: ObjectIterator<T, U>): U[];\n\n/**\n * Maps each element in an object to a new array by plucking the specified property.\n *\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The object to iterate over\n * @param {K} iteratee - The property to pluck from each element\n * @returns {Array<T[K]>} - Returns the new array of plucked values\n *\n * @example\n * // Plucking a property from each object\n * const users = [{ name: 'John', age: 30 }, { name: 'Jane', age: 25 }];\n * map(users, 'name'); // => ['John', 'Jane']\n */\nexport function map<T, K extends keyof T>(\n  collection: Record<string, T> | Record<number, T> | null | undefined,\n  iteratee: K\n): Array<T[K]>;\n\n/**\n * Maps each element in an object to a new array by plucking the specified string property.\n *\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The object to iterate over\n * @param {string} [iteratee] - The string property to pluck from each element\n * @returns {any[]} - Returns the new array of plucked values\n *\n * @example\n * // Plucking a nested property\n * const users = [{ info: { name: 'John' } }, { info: { name: 'Jane' } }];\n * map(users, 'info.name'); // => ['John', 'Jane']\n */\nexport function map<T>(collection: Record<string, T> | Record<number, T> | null | undefined, iteratee?: string): any[];\n\n/**\n * Maps each element in an object to a new array by matching against a source object.\n *\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The object to iterate over\n * @param {object} [iteratee] - The object to match against\n * @returns {boolean[]} - Returns an array of boolean values indicating matches\n *\n * @example\n * // Matching against a source object\n * const users = [{ name: 'John', age: 30 }, { name: 'Jane', age: 25 }];\n * map(users, { age: 30 }); // => [true, false]\n */\nexport function map<T>(\n  collection: Record<string, T> | Record<number, T> | null | undefined,\n  iteratee?: object\n): boolean[];\n\nexport function map(\n  collection: any[] | ArrayLike<any> | Record<any, any> | null | undefined,\n  _iteratee?: ((value: any, index: PropertyKey, collection: any) => any) | PropertyKey | object | null\n): any[] {\n  if (!collection) {\n    return [];\n  }\n\n  const keys: PropertyKey[] =\n    isArrayLike(collection) || Array.isArray(collection) ? range(0, collection.length) : Object.keys(collection);\n\n  const iteratee = iterateeToolkit(_iteratee ?? identity);\n\n  const result: any[] = new Array(keys.length);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = (collection as any)[key];\n\n    result[i] = iteratee(value, key, collection);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/nth.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { nth as nthLodash } from 'lodash';\nimport { nth } from './nth';\nimport { noop } from '../../function';\nimport { range } from '../../math';\nimport { falsey } from '../_internal/falsey';\nimport { stubA } from '../_internal/stubA';\nimport { stubB } from '../_internal/stubB';\n\ndescribe('nth', () => {\n  const array = ['a', 'b', 'c', 'd'];\n\n  it('should get the nth element of `array`', () => {\n    const actual = array.map((_value, index) => nth(array, index));\n\n    expect(actual).toEqual(array);\n  });\n\n  it('should work with a negative `n`', () => {\n    const actual = range(1, array.length + 1).map(n => nth(array, -n));\n\n    expect(actual).toEqual(['d', 'c', 'b', 'a']);\n  });\n\n  it('should coerce `n` to an integer', () => {\n    let values = falsey;\n    let expected = values.map(stubA);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    let actual = values.map(n => (n ? nth(array, n) : nth(array)));\n\n    expect(actual).toEqual(expected);\n\n    values = ['1', 1.6];\n    expected = values.map(stubB);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = values.map(n => nth(array, n));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `undefined` for empty arrays', () => {\n    const values = [null, undefined, []];\n    const expected = values.map(noop);\n\n    const actual = values.map(array => nth(array, 1));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `undefined` for non-indexes', () => {\n    const array = [1, 2];\n    const values = [Infinity, array.length];\n    const expected = values.map(noop);\n\n    array[-1] = 3;\n\n    const actual = values.map(n => nth(array, n));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(nth).toEqualTypeOf<typeof nthLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/nth.ts",
    "content": "import { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned.\n *\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {number} [n=0] - The index of the element to return.\n * @return {T | undefined} Returns the nth element of `array`.\n *\n * @example\n * nth([1, 2, 3], 1); // => 2\n * nth([1, 2, 3], -1); // => 3\n */\nexport function nth<T>(array: ArrayLike<T> | null | undefined, n = 0): T | undefined {\n  if (!isArrayLikeObject(array) || array.length === 0) {\n    return undefined;\n  }\n\n  n = toInteger(n);\n\n  if (n < 0) {\n    n += array.length;\n  }\n\n  return array[n];\n}\n"
  },
  {
    "path": "src/compat/array/orderBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { orderBy as orderByLodash } from 'lodash';\nimport { orderBy } from './orderBy.ts';\nimport { zipObject } from '../../array/zipObject.ts';\nimport { partialRight } from '../../function/partialRight.ts';\nimport { falsey } from '../_internal/falsey.ts';\n\ndescribe('orderBy', () => {\n  class Pair {\n    constructor(\n      public a: number | undefined,\n      public b: number,\n      public c: number\n    ) {\n      this.a = a;\n      this.b = b;\n      this.c = c;\n    }\n  }\n  const objects = [\n    { a: 'x', b: 3 },\n    { a: 'y', b: 4 },\n    { a: 'x', b: 1 },\n    { a: 'y', b: 2 },\n  ];\n\n  const stableArray = [\n    new Pair(1, 1, 1),\n    new Pair(1, 2, 1),\n    new Pair(1, 1, 1),\n    new Pair(1, 2, 1),\n    new Pair(1, 3, 1),\n    new Pair(1, 4, 1),\n    new Pair(1, 5, 1),\n    new Pair(1, 6, 1),\n    new Pair(2, 1, 2),\n    new Pair(2, 2, 2),\n    new Pair(2, 3, 2),\n    new Pair(2, 4, 2),\n    new Pair(2, 5, 2),\n    new Pair(2, 6, 2),\n    new Pair(undefined, 1, 1),\n    new Pair(undefined, 2, 1),\n    new Pair(undefined, 3, 1),\n    new Pair(undefined, 4, 1),\n    new Pair(undefined, 5, 1),\n    new Pair(undefined, 6, 1),\n  ];\n\n  const stableObject = zipObject('abcdefghijklmnopqrst'.split(''), stableArray);\n\n  const nestedObj = [\n    { id: '4', address: { zipCode: 4, streetName: 'Beta' } },\n    { id: '3', address: { zipCode: 3, streetName: 'Alpha' } },\n    { id: '1', address: { zipCode: 1, streetName: 'Alpha' } },\n    { id: '2', address: { zipCode: 2, streetName: 'Alpha' } },\n    { id: '5', address: { zipCode: 4, streetName: 'Alpha' } },\n  ];\n\n  it(`should sort multiple properties in ascending order`, () => {\n    const actual = orderBy(objects, ['a', 'b']);\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n  });\n\n  it(`should support iteratees`, () => {\n    const actual = orderBy(objects, [\n      'a',\n      function (object) {\n        return object.b;\n      },\n    ]);\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n  });\n\n  it(`should perform a stable sort (test in IE > 8 and V8)`, () => {\n    expect(orderBy(stableArray, ['a', 'c'])).toEqual(stableArray);\n    expect(orderBy(stableObject, ['a', 'c'])).toEqual(stableArray);\n  });\n\n  it(`should not error on nullish elements`, () => {\n    let actual;\n    try {\n      actual = orderBy([...objects, null, undefined], ['a', 'b']);\n    } catch {\n      // do nothing\n    }\n\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1], null, undefined]);\n  });\n\n  it(`should work as an iteratee for methods like \\`_.reduce\\``, () => {\n    const objects = [\n      { a: 'x', 0: 3 },\n      { a: 'y', 0: 4 },\n      { a: 'x', 0: 1 },\n      { a: 'y', 0: 2 },\n    ];\n\n    // @ts-expect-error - reduce type mismatch\n    expect(['a'].reduce(orderBy, objects)).toEqual([objects[0], objects[2], objects[1], objects[3]]);\n    // @ts-expect-error - reduce type mismatch\n    expect([0].reduce(orderBy, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n    // @ts-expect-error - reduce type mismatch\n    expect([[0]].reduce(orderBy, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n\n    const wrapped = partialRight(orderBy, 'bogus');\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(['a'].reduce(wrapped, objects)).toEqual([objects[0], objects[2], objects[1], objects[3]]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect([0].reduce(wrapped, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect([[0]].reduce(wrapped, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    const actual = [null, undefined].map(value => orderBy(value));\n    const expected = [[], []];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return a shallow copy of the collection when no keys are provided', () => {\n    const actual = orderBy(objects);\n    const expected = objects.slice();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return ascending ordered collection when no orders are provided', () => {\n    const actual = orderBy(objects, ['a']);\n    const expected = orderBy(objects, ['a'], ['asc']);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sort by a single property by a specified order', () => {\n    const actual = orderBy(objects, 'a', 'desc');\n    const expected = [objects[1], objects[3], objects[0], objects[2]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sort by nested key in array format', () => {\n    const actual = orderBy(nestedObj, [['address', 'zipCode'], ['address.streetName']], ['asc', 'desc']);\n    const expected = [nestedObj[2], nestedObj[3], nestedObj[1], nestedObj[0], nestedObj[4]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sort by multiple properties by specified orders', () => {\n    const actual = orderBy(objects, ['a', 'b'], ['desc', 'asc']);\n    const expected = [objects[3], objects[1], objects[2], objects[0]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sort by a property in ascending order when its order is not specified', () => {\n    const actual = orderBy(objects, ['a', 'b']);\n    const expected = [objects[2], objects[0], objects[3], objects[1]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sort by a property in ascending order when its order is not specified and the collection is falsey', () => {\n    // @ts-expect-error - type mismatch\n    const actual = falsey.map((order, index) => orderBy(objects, ['a', 'b'], index ? ['desc', order] : ['desc']));\n    const expected = falsey.map(() => [objects[3], objects[1], objects[2], objects[0]]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `orders` specified as string objects', () => {\n    const actual = orderBy(objects, ['a'], [Object('desc')]);\n    const expected = [objects[1], objects[3], objects[0], objects[2]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `deep` property paths', () => {\n    const actual = orderBy(nestedObj, ['address.zipCode'], ['asc']);\n    const expected = [nestedObj[2], nestedObj[3], nestedObj[1], nestedObj[0], nestedObj[4]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with nested `deep` property paths when paths length is 1', () => {\n    const actual = orderBy(nestedObj, [['address.zipCode']], ['asc']);\n    const expected = [nestedObj[2], nestedObj[3], nestedObj[1], nestedObj[0], nestedObj[4]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `deep-like` property paths', () => {\n    const objects = [{ 'a.b': 1 }, { 'a.b': 2 }, { 'a.b': 3 }, { 'a.b': 4 }];\n    const actual = orderBy(objects, ['a.b'], ['desc']);\n    const expected = [objects[3], objects[2], objects[1], objects[0]];\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect(\n      [\n        [2, 1, 3],\n        [3, 2, 1],\n        // @ts-expect-error - type mismatch\n      ].map(orderBy)\n    ).toEqual([\n      [1, 2, 3],\n      [1, 2, 3],\n    ]);\n  });\n\n  it('should move `NaN`, nullish, and symbol values to the end', () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const array = [NaN, undefined, null, 4, symbol1, null, 1, symbol2, undefined, 3, NaN, 2];\n    const expected = [1, 2, 3, 4, symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];\n\n    expect(orderBy(array)).toEqual(expected);\n    expect(orderBy(array, [])).toEqual(expected);\n\n    const array2 = [NaN, undefined, symbol1, null, 'd', null, 'a', symbol2, undefined, 'c', NaN, 'b'];\n    const expected2 = ['a', 'b', 'c', 'd', symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];\n\n    expect(orderBy(array2)).toEqual(expected2);\n    expect(orderBy(array2, [])).toEqual(expected2);\n  });\n\n  it('should compare strings with ASCII code', () => {\n    // @ts-expect-error - type mismatch\n    expect(orderBy(['A', 'a'], null, 'desc')).toEqual(['a', 'A']);\n    // @ts-expect-error - type mismatch\n    expect(orderBy(['ABC', 'abc'], null, 'desc')).toEqual(['abc', 'ABC']);\n\n    expect(orderBy(['A', 'a'])).toEqual(['A', 'a']);\n    expect(orderBy(['ABC', 'abc'])).toEqual(['ABC', 'abc']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(orderBy).toEqualTypeOf<typeof orderByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/orderBy.ts",
    "content": "import { compareValues } from '../_internal/compareValues.ts';\nimport { isKey } from '../_internal/isKey.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { ListIterator } from '../_internal/ListIterator.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { ObjectIteratee } from '../_internal/ObjectIteratee.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { toPath } from '../util/toPath.ts';\n\nexport type Criterion<T> = ((item: T) => unknown) | PropertyKey | PropertyKey[] | null | undefined;\n\n/**\n * Sorts an array of elements based on multiple iteratee functions and their corresponding order directions.\n *\n * @template T The type of elements in the array\n * @param {ArrayLike<T> | null | undefined} collection The array to sort\n * @param {Many<ListIterator<T, unknown>>} iteratees The iteratee functions to sort by\n * @param {Many<boolean | 'asc' | 'desc'>} orders The sort orders\n * @returns {T[]} Returns the new sorted array\n * @example\n * const users = [\n *   { name: 'fred', age: 48 },\n *   { name: 'barney', age: 34 }\n * ];\n *\n * // Sort by age in ascending order\n * orderBy(users, [(user) => user.age], ['asc']);\n * // => [{ name: 'barney', age: 34 }, { name: 'fred', age: 48 }]\n */\nexport function orderBy<T>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratees?: Many<ListIterator<T, unknown>>,\n  orders?: Many<boolean | 'asc' | 'desc'>\n): T[];\n\n/**\n * Sorts an array of elements based on multiple property names/paths and their corresponding order directions.\n *\n * @template T The type of elements in the array\n * @param {ArrayLike<T> | null | undefined} collection The array to sort\n * @param {Many<ListIteratee<T>>} iteratees The property names/paths to sort by\n * @param {Many<boolean | 'asc' | 'desc'>} orders The sort orders\n * @returns {T[]} Returns the new sorted array\n * @example\n * const users = [\n *   { name: 'fred', age: 48 },\n *   { name: 'barney', age: 34 }\n * ];\n *\n * // Sort by name in ascending order\n * orderBy(users, ['name'], ['asc']);\n * // => [{ name: 'barney', age: 34 }, { name: 'fred', age: 48 }]\n */\nexport function orderBy<T>(\n  collection: ArrayLike<T> | null | undefined,\n  iteratees?: Many<ListIteratee<T>>,\n  orders?: Many<boolean | 'asc' | 'desc'>\n): T[];\n\n/**\n * Sorts an object's values based on multiple iteratee functions and their corresponding order directions.\n *\n * @template T The object type\n * @param {T | null | undefined} collection The object to sort values from\n * @param {Many<ObjectIterator<T, unknown>>} iteratees The iteratee functions to sort by\n * @param {Many<boolean | 'asc' | 'desc'>} orders The sort orders\n * @returns {Array<T[keyof T]>} Returns the new sorted array\n * @example\n * const obj = {\n *   a: { name: 'fred', age: 48 },\n *   b: { name: 'barney', age: 34 }\n * };\n *\n * // Sort by age in ascending order\n * orderBy(obj, [(user) => user.age], ['asc']);\n * // => [{ name: 'barney', age: 34 }, { name: 'fred', age: 48 }]\n */\nexport function orderBy<T extends object>(\n  collection: T | null | undefined,\n  iteratees?: Many<ObjectIterator<T, unknown>>,\n  orders?: Many<boolean | 'asc' | 'desc'>\n): Array<T[keyof T]>;\n\n/**\n * Sorts an object's values based on multiple property names/paths and their corresponding order directions.\n *\n * @template T The object type\n * @param {T | null | undefined} collection The object to sort values from\n * @param {Many<ObjectIteratee<T>>} iteratees The property names/paths to sort by\n * @param {Many<boolean | 'asc' | 'desc'>} orders The sort orders\n * @returns {Array<T[keyof T]>} Returns the new sorted array\n * @example\n * const obj = {\n *   a: { name: 'fred', age: 48 },\n *   b: { name: 'barney', age: 34 }\n * };\n *\n * // Sort by name in ascending order\n * orderBy(obj, ['name'], ['asc']);\n * // => [{ name: 'barney', age: 34 }, { name: 'fred', age: 48 }]\n */\nexport function orderBy<T extends object>(\n  collection: T | null | undefined,\n  iteratees?: Many<ObjectIteratee<T>>,\n  orders?: Many<boolean | 'asc' | 'desc'>\n): Array<T[keyof T]>;\n\n/**\n * Sorts an array of objects based on multiple properties and their corresponding order directions.\n *\n * This function takes an array of objects, an array of criteria to sort by, and an array of order directions.\n * It returns the sorted array, ordering by each key according to its corresponding direction ('asc' for ascending or 'desc' for descending).\n * If values for a key are equal, it moves to the next key to determine the order.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | object | null | undefined} collection - The array of objects to be sorted.\n * @param {Criterion<T> | Array<Criterion<T>>} criteria - An array of criteria (property names or property paths or custom key functions) to sort by.\n * @param {unknown | unknown[]} orders - An array of order directions ('asc' for ascending or 'desc' for descending).\n * @param {unknown} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {T[]} - The sorted array.\n *\n * @example\n * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.\n * const users = [\n *   { user: 'fred', age: 48 },\n *   { user: 'barney', age: 34 },\n *   { user: 'fred', age: 40 },\n *   { user: 'barney', age: 36 },\n * ];\n * const result = orderBy(users, ['user', (item) => item.age], ['asc', 'desc']);\n * // result will be:\n * // [\n * //   { user: 'barney', age: 36 },\n * //   { user: 'barney', age: 34 },\n * //   { user: 'fred', age: 48 },\n * //   { user: 'fred', age: 40 },\n * // ]\n */\nexport function orderBy<T = any>(collection: any, criteria?: any, orders?: any, guard?: unknown): T[] {\n  if (collection == null) {\n    return [];\n  }\n\n  orders = guard ? undefined : orders;\n\n  if (!Array.isArray(collection)) {\n    collection = Object.values(collection);\n  }\n\n  if (!Array.isArray(criteria)) {\n    criteria = criteria == null ? [null] : [criteria];\n  }\n  if (criteria.length === 0) {\n    criteria = [null];\n  }\n\n  if (!Array.isArray(orders)) {\n    orders = orders == null ? [] : [orders];\n  }\n\n  // For Object('desc') case\n  orders = (orders as unknown[]).map(order => String(order));\n\n  const getValueByNestedPath = (object: object, path: PropertyKey[]) => {\n    let target: object = object;\n\n    for (let i = 0; i < path.length && target != null; ++i) {\n      target = target[path[i] as keyof typeof target];\n    }\n\n    return target;\n  };\n\n  const getValueByCriterion = (criterion: Criterion<T> | { key: PropertyKey; path: string[] }, object: T) => {\n    if (object == null || criterion == null) {\n      return object;\n    }\n\n    if (typeof criterion === 'object' && 'key' in criterion) {\n      if (Object.hasOwn(object, criterion.key)) {\n        return object[criterion.key as keyof typeof object];\n      }\n\n      return getValueByNestedPath(object, criterion.path);\n    }\n\n    if (typeof criterion === 'function') {\n      return criterion(object);\n    }\n\n    if (Array.isArray(criterion)) {\n      return getValueByNestedPath(object, criterion);\n    }\n\n    if (typeof object === 'object') {\n      return object[criterion as keyof typeof object];\n    }\n\n    return object;\n  };\n\n  // Prepare all cases for criteria\n  const preparedCriteria = criteria.map((criterion: any) => {\n    // lodash handles a array with one element as a single criterion\n    if (Array.isArray(criterion) && criterion.length === 1) {\n      criterion = criterion[0];\n    }\n\n    if (criterion == null || typeof criterion === 'function' || Array.isArray(criterion) || isKey(criterion)) {\n      return criterion;\n    }\n\n    // If criterion is not key, it has possibility to be a deep path. So we have to prepare both cases.\n    return { key: criterion, path: toPath(criterion) };\n  });\n\n  // Array.prototype.sort() always shifts the `undefined` values to the end of the array. So we have to prevent it by using a wrapper object.\n  const preparedCollection = (collection as T[]).map(item => ({\n    original: item,\n    criteria: preparedCriteria.map((criterion: any) => getValueByCriterion(criterion, item)),\n  }));\n\n  return preparedCollection\n    .slice()\n    .sort((a, b) => {\n      for (let i = 0; i < preparedCriteria.length; i++) {\n        const comparedResult = compareValues(a.criteria[i], b.criteria[i], (orders as string[])[i]);\n\n        if (comparedResult !== 0) {\n          return comparedResult;\n        }\n      }\n\n      return 0;\n    })\n    .map(item => item.original);\n}\n"
  },
  {
    "path": "src/compat/array/partition.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { partition as partitionLodash } from 'lodash';\nimport { partition } from './partition';\nimport { args } from '../_internal/args';\n\ndescribe('partition', () => {\n  it('should split elements into two groups by `predicate`', () => {\n    const arr = [1, 2, 3, 4];\n    const isEven = (n: number) => n % 2 === 0;\n\n    expect(partition(arr, isEven)).toEqual([\n      [2, 4],\n      [1, 3],\n    ]);\n  });\n\n  it('should use `_.identity` when `predicate` is nullish', () => {\n    const arr = [0, 1, 2, null, 3, undefined, 4, false, 5, ''];\n\n    expect(partition(arr, null)).toEqual([\n      [1, 2, 3, 4, 5],\n      [0, null, undefined, false, ''],\n    ]);\n  });\n\n  it('should use `_.identity` when `predicate` is undefined', () => {\n    const arr = [0, 1, 2, null, 3, undefined, 4, false, 5, ''];\n\n    expect(partition(arr, undefined)).toEqual([\n      [1, 2, 3, 4, 5],\n      [0, null, undefined, false, ''],\n    ]);\n  });\n\n  it('should work with `matches` shorthand', () => {\n    const users = [\n      { user: 'barney', age: 36, active: false },\n      { user: 'fred', age: 40, active: true },\n    ];\n\n    expect(partition(users, { age: 36 })).toEqual([\n      [{ user: 'barney', age: 36, active: false }],\n      [{ user: 'fred', age: 40, active: true }],\n    ]);\n    expect(partition(users, { age: 36, active: false })).toEqual([\n      [{ user: 'barney', age: 36, active: false }],\n      [{ user: 'fred', age: 40, active: true }],\n    ]);\n  });\n\n  it('should work with `matchesProperty` shorthand', () => {\n    const users = [\n      { user: 'barney', age: 36, active: false },\n      { user: 'fred', age: 40, active: true },\n    ];\n\n    expect(partition(users, ['active', false])).toEqual([\n      [{ user: 'barney', age: 36, active: false }],\n      [{ user: 'fred', age: 40, active: true }],\n    ]);\n  });\n\n  it('should work with `property` shorthand', () => {\n    const users = [\n      { user: 'barney', age: 36, active: false },\n      { user: 'fred', age: 40, active: true },\n    ];\n\n    expect(partition(users, 'active')).toEqual([\n      [{ user: 'fred', age: 40, active: true }],\n      [{ user: 'barney', age: 36, active: false }],\n    ]);\n  });\n\n  it('should work with a number for `predicate`', () => {\n    const array = [\n      [1, 0],\n      [0, 1],\n      [1, 0],\n    ];\n\n    expect(partition(array, 0)).toEqual([\n      [\n        [1, 0],\n        [1, 0],\n      ],\n      [[0, 1]],\n    ]);\n  });\n\n  it('should work with objects', () => {\n    const obj = {\n      a: 1,\n      b: 2,\n      c: 3,\n      d: 4,\n    };\n    const isEven = (n: number) => n % 2 === 0;\n\n    expect(partition(obj, isEven)).toEqual([\n      [2, 4],\n      [1, 3],\n    ]);\n  });\n\n  it('should work with nested objects', () => {\n    const obj = {\n      item1: { a: 0, b: { c: 1 } },\n      item2: { a: 1, b: { c: 2 } },\n      item3: { a: 0, b: { c: 1 } },\n    };\n\n    expect(partition(obj, { b: { c: 1 } })).toEqual([\n      [\n        { a: 0, b: { c: 1 } },\n        { a: 0, b: { c: 1 } },\n      ],\n      [{ a: 1, b: { c: 2 } }],\n    ]);\n  });\n\n  it('should return partition objects based on key-value pair', () => {\n    const obj = {\n      alice: { id: 1, name: 'Alice' },\n      bob: { id: 2, name: 'Bob' },\n    };\n\n    expect(partition(obj, ['name', 'Alice'])).toEqual([[{ id: 1, name: 'Alice' }], [{ id: 2, name: 'Bob' }]]);\n  });\n\n  it('should return objects that have the specified key', () => {\n    const obj = {\n      a: { id: 1, name: 'Alice' },\n      b: { id: 2, name: 'Bob' },\n      c: { id: 3, age: 28 },\n    };\n\n    expect(partition(obj, 'name')).toEqual([\n      [\n        { id: 1, name: 'Alice' },\n        { id: 2, name: 'Bob' },\n      ],\n      [{ id: 3, age: 28 }],\n    ]);\n  });\n\n  it('should return [[], []] when provided `null` or `undefined`', () => {\n    const isEven = (n: number) => n % 2 === 0;\n    expect(partition(null, isEven)).toEqual([[], []]);\n    expect(partition(undefined, isEven)).toEqual([[], []]);\n  });\n\n  it('should support array-like objects', () => {\n    const isEven = (n: number) => n % 2 === 0;\n    const isEven2 = (n: string) => parseInt(n) % 2 === 0;\n    expect(partition({ 0: 1, 1: 2, 2: 3, length: 3 }, isEven)).toEqual([[2], [1, 3]]);\n    expect(partition('123', isEven2)).toEqual([['2'], ['1', '3']]);\n    expect(partition(args, isEven)).toEqual([[2], [1, 3]]);\n  });\n\n  it('should use identity function when no predicate is provided', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(partition([0, 1, 2, false, true, '', 'hello'])).toEqual([\n      [1, 2, true, 'hello'],\n      [0, false, ''],\n    ]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(partition).toEqualTypeOf<typeof partitionLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/partition.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { ValueIteratorTypeGuard } from '../_internal/ValueIteratorTypeGuard.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates an array of elements split into two groups, the first of which contains elements\n * predicate returns truthy for, while the second of which contains elements predicate returns falsey for.\n * The predicate is invoked with one argument: (value).\n *\n * @template T, U\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {(value: T) => value is U} callback - The function invoked per iteration.\n * @returns {[U[], Array<Exclude<T, U>>]} Returns the array of grouped elements.\n *\n * @example\n * partition([1, 2, 3, 4], n => n % 2 === 0);\n * // => [[2, 4], [1, 3]]\n */\nexport function partition<T, U extends T>(\n  collection: ArrayLike<T> | null | undefined,\n  callback: ValueIteratorTypeGuard<T, U>\n): [U[], Array<Exclude<T, U>>];\n\n/**\n * Creates an array of elements split into two groups, the first of which contains elements\n * predicate returns truthy for, while the second of which contains elements predicate returns falsey for.\n * The predicate is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {((value: T) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T>} callback - The function invoked per iteration.\n * @returns {[T[], T[]]} Returns the array of grouped elements.\n *\n * @example\n * partition([1, 2, 3, 4], n => n % 2 === 0);\n * // => [[2, 4], [1, 3]]\n */\nexport function partition<T>(collection: ArrayLike<T> | null | undefined, callback: ValueIteratee<T>): [T[], T[]];\n\n/**\n * Creates an array of elements split into two groups, the first of which contains elements\n * predicate returns truthy for, while the second of which contains elements predicate returns falsey for.\n * The predicate is invoked with one argument: (value).\n *\n * @template T\n * @param {T | null | undefined} collection - The collection to iterate over.\n * @param {((value: T[keyof T]) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T[keyof T]>} callback - The function invoked per iteration.\n * @returns {[Array<T[keyof T]>, Array<T[keyof T]>]} Returns the array of grouped elements.\n *\n * @example\n * partition({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n * // => [[2], [1, 3]]\n */\nexport function partition<T extends object>(\n  collection: T | null | undefined,\n  callback: ValueIteratee<T[keyof T]>\n): [Array<T[keyof T]>, Array<T[keyof T]>];\n\n/**\n * Creates an array of elements split into two groups, the first of which contains elements\n * `predicate` returns truthy for, the second of which contains elements\n * `predicate` returns falsy for. The predicate is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | T | null | undefined} source - The array or object to iterate over.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate=identity] - The function invoked per iteration.\n * @returns {[T[], T[]]} - Returns the array of grouped elements.\n *\n * @example\n * partition([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n * // => [[{ a: 1 }, { a: 2 }], [{ b: 1 }]]\n *\n * partition([{ a: 1 }, { a: 2 }, { b: 1 }], { b: 1 });\n * // => [[{ b: 1 }], [{ a: 1 }, { a: 2 }]]\n *\n * partition({ item1: { a: 0, b: true }, item2: { a: 1, b: true }, item3: { a: 2, b: false }}, { b: false })\n * // => [[{ a: 2, b: false }], [{ a: 0, b: true }, { a: 1, b: true }]]\n *\n * partition([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n * // => [[{ a: 2 }], [{ a: 1 }, { a: 3 }]]\n */\nexport function partition<T>(\n  source: ArrayLike<T> | T | null | undefined,\n  predicate: ((value: T) => unknown) | Partial<T> | [PropertyKey, any] | PropertyKey = identity\n): [T[], T[]] {\n  if (!source) {\n    return [[], []];\n  }\n\n  const collection = isArrayLike(source) ? source : Object.values(source);\n\n  predicate = iteratee(predicate);\n\n  const matched: T[] = [];\n  const unmatched: T[] = [];\n\n  for (let i = 0; i < collection.length; i++) {\n    const value = collection[i] as T;\n\n    if (predicate(value)) {\n      matched.push(value);\n    } else {\n      unmatched.push(value);\n    }\n  }\n\n  return [matched, unmatched];\n}\n"
  },
  {
    "path": "src/compat/array/pull.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pull as pullToolkit } from './pull';\n\ndescribe('pull', () => {\n  const methodName = 'pull';\n  const func = pullToolkit;\n\n  function pull(array: any[], values: any[]) {\n    // eslint-disable-next-line prefer-spread\n    return func.apply(undefined, [array].concat(values) as any);\n  }\n\n  it(`\\`_.${methodName}\\` should modify and return the array`, () => {\n    const array = [1, 2, 3];\n    const actual = pull(array, [1, 3]);\n\n    expect(actual).toBe(array);\n    expect(array).toEqual([2]);\n  });\n\n  it(`\\`_.${methodName}\\` should preserve holes in arrays`, () => {\n    const array = [1, 2, 3, 4];\n    delete array[1];\n    delete array[3];\n\n    pull(array, [1]);\n    expect('0' in array).toBe(false);\n    expect('2' in array).toBe(false);\n  });\n\n  it(`\\`_.${methodName}\\` should treat holes as \\`undefined\\``, () => {\n    const array = [1, 2, 3];\n    delete array[1];\n\n    pull(array, [undefined]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  it(`\\`_.${methodName}\\` should match \\`NaN\\``, () => {\n    const array = [1, NaN, 3, NaN];\n\n    pull(array, [NaN]);\n    expect(array).toEqual([1, 3]);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/pull.ts",
    "content": "import { pull as pullToolkit } from '../../array/pull.ts';\n\n/**\n * Removes all provided values from array using SameValueZero for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`.\n *\n * @template T\n * @param {T[]} array - The array to modify.\n * @param {...T[]} values - The values to remove.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * pull(array, 2, 3);\n * console.log(array);\n * // => [1, 1]\n */\nexport function pull<T>(array: T[], ...values: T[]): T[];\n\n/**\n * Removes all provided values from array using SameValueZero for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`.\n *\n * @template L\n * @param {L} array - The array to modify.\n * @param {...L[0][]} values - The values to remove.\n * @returns {L} Returns `array`.\n *\n * @example\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * pull(array, 2, 3);\n * console.log(array);\n * // => [1, 1]\n */\nexport function pull<L extends ArrayLike<any>>(array: L extends readonly any[] ? never : L, ...values: Array<L[0]>): L;\n\n/**\n * Removes all specified values from an array.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `difference`.\n *\n * @template T, U\n * @param {T[]} arr - The array to modify.\n * @param {...unknown[]} valuesToRemove - The values to remove from the array.\n * @returns {T[]} The modified array with the specified values removed.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5, 2, 4];\n * pull(numbers, [2, 4]);\n * console.log(numbers); // [1, 3, 5]\n */\nexport function pull<T>(arr: T[], ...valuesToRemove: readonly unknown[]): T[] {\n  return pullToolkit(arr, valuesToRemove);\n}\n"
  },
  {
    "path": "src/compat/array/pullAll.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pullAll } from './pullAll';\n\ndescribe('pullAll', () => {\n  function pull(array: any[], values: any[]) {\n    return pullAll(array, values);\n  }\n\n  it(`\\`_.pullAll\\` should modify and return the array`, () => {\n    const array = [1, 2, 3];\n    const actual = pull(array, [1, 3]);\n\n    expect(actual).toBe(array);\n    expect(array).toEqual([2]);\n  });\n\n  it(`\\`_.pullAll\\` should preserve holes in arrays`, () => {\n    const array = [1, 2, 3, 4];\n    delete array[1];\n    delete array[3];\n\n    pull(array, [1]);\n    expect('0' in array).toBe(false);\n    expect('2' in array).toBe(false);\n  });\n\n  it(`\\`_.pullAll\\` should treat holes as \\`undefined\\``, () => {\n    const array = [1, 2, 3];\n    delete array[1];\n\n    pull(array, [undefined]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  it(`\\`_.pullAll\\` should match \\`NaN\\``, () => {\n    const array = [1, NaN, 3, NaN];\n\n    pull(array, [NaN]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  it('should work with the same value for `array` and `values`', () => {\n    const array = [{ a: 1 }, { b: 2 }];\n    const actual = pullAll(array, array);\n\n    expect(actual).toEqual([]);\n  });\n\n  it('should use empty array as default when no values provided', () => {\n    const array = [1, 2, 3];\n    const result = pullAll(array);\n\n    expect(result).toBe(array);\n    expect(array).toEqual([1, 2, 3]);\n  });\n\n  // NOTE: TypeScript doesn't support matching conditional types\n  // it('should match the type of lodash', () => {\n  //   expectTypeOf(pullAll).toEqualTypeOf<typeof pullAllLodash>();\n  // });\n});\n"
  },
  {
    "path": "src/compat/array/pullAll.ts",
    "content": "import { pull as pullToolkit } from '../../array/pull.ts';\nimport type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @template T\n * @param {T[]} array - The array to modify.\n * @param {ArrayLike<T>} [values] - The values to remove.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * pullAll(array, [2, 3]);\n * console.log(array);\n * // => [1, 1]\n */\nexport function pullAll<T>(array: T[], values?: ArrayLike<T>): T[];\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @template L\n * @param {RejectReadonly<L>} array - The array to modify.\n * @param {List<L[0]>} [values] - The values to remove.\n * @returns {L} Returns `array`.\n *\n * @example\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * pullAll(array, [2, 3]);\n * console.log(array);\n * // => [1, 1]\n */\nexport function pullAll<L extends MutableList<any>>(array: RejectReadonly<L>, values?: ArrayLike<L[0]>): L;\n\n/**\n * Removes all specified values from an array.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `difference`.\n *\n * @template T\n * @param {T[]} arr - The array to modify.\n * @param {ArrayLike<T>} valuesToRemove - The values to remove from the array.\n * @returns {T[]} The modified array with the specified values removed.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5, 2, 4];\n * pullAll(numbers, [2, 4]);\n * console.log(numbers); // [1, 3, 5]\n */\nexport function pullAll<T>(arr: T[], valuesToRemove: ArrayLike<T> = []): T[] {\n  return pullToolkit(arr, Array.from(valuesToRemove));\n}\n"
  },
  {
    "path": "src/compat/array/pullAllBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pullAllBy } from './pullAllBy';\n\ndescribe('pullAllBy', () => {\n  it('should accept an `iteratee`', () => {\n    const array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\n\n    const actual = pullAllBy(array, [{ x: 1 }, { x: 3 }], object => object.x);\n\n    expect(actual).toEqual([{ x: 2 }]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n    const array = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }];\n\n    pullAllBy(array, [{ x: 1 }, { x: 3 }], function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual([{ x: 1 }]);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const array = [{ x: 1 }, { x: 2 }, , { x: 3 }, { x: 1 }];\n\n    const actual = pullAllBy(array, [{ x: 1 }, { x: 3 }], object => object?.x);\n\n    expect(Object.hasOwn(actual, '0')).toEqual(true);\n    expect(Object.hasOwn(actual, '1')).toEqual(false);\n  });\n\n  // NOTE: TypeScript doesn't support matching conditional types\n  // it('should match the type of lodash', () => {\n  //   expectTypeOf(pullAllBy).toEqualTypeOf<typeof pullAllByLodash>();\n  // });\n});\n"
  },
  {
    "path": "src/compat/array/pullAllBy.ts",
    "content": "import type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Removes all specified values from an array using an iteratee function.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `differenceBy`.\n *\n * @template T\n * @param {T[]} array - The array to modify.\n * @param {ArrayLike<T>} [values] - The values to remove.\n * @param {((value: T) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nexport function pullAllBy<T>(array: T[], values?: ArrayLike<T>, iteratee?: ValueIteratee<T>): T[];\n\n/**\n * Removes all specified values from an array using an iteratee function.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `differenceBy`.\n *\n * @template L\n * @param {RejectReadonly<L>} array - The array to modify.\n * @param {ArrayLike<L[0]>} [values] - The values to remove.\n * @param {ValueIteratee<L[0]>} [iteratee] - The iteratee invoked per element.\n * @returns {L} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nexport function pullAllBy<L extends MutableList<any>>(\n  array: RejectReadonly<L>,\n  values?: ArrayLike<L[0]>,\n  iteratee?: ValueIteratee<L[0]>\n): L;\n\n/**\n * Removes all specified values from an array using an iteratee function.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `differenceBy`.\n *\n * @template T, U\n * @param {T[]} array - The array to modify.\n * @param {ArrayLike<U>} values - The values to remove.\n * @param {((value: T | U) => unknown) | PropertyKey | [PropertyKey, any] | Partial<T | U>} iteratee - The iteratee invoked per element.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nexport function pullAllBy<T, U>(array: T[], values: ArrayLike<U>, iteratee: ValueIteratee<T | U>): T[];\n\n/**\n * Removes all specified values from an array using an iteratee function.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `differenceBy`.\n *\n * @template L, U\n * @param {L} array - The array to modify.\n * @param {ArrayLike<U>} values - The values to remove.\n * @param {((value: L[0] | U) => unknown) | PropertyKey | [PropertyKey, any] | Partial<L[0] | U>} iteratee - The iteratee invoked per element.\n * @returns {L} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nexport function pullAllBy<L extends ArrayLike<any>, U>(\n  array: L extends readonly any[] ? never : L,\n  values: ArrayLike<U>,\n  iteratee: ValueIteratee<L[0] | U>\n): L;\n\n/**\n * Removes all specified values from an array using an iteratee function.\n *\n * This function changes `arr` in place.\n * If you want to remove values without modifying the original array, use `differenceBy`.\n *\n * @template T\n * @param {T[]} arr - The array to modify.\n * @param {ArrayLike<T>} valuesToRemove - The values to remove from the array.\n * @param {keyof T} getValue - The key of the property to match against each element.\n * @returns {T[]} The modified array with the specified values removed.\n *\n * @example\n * // Using a iteratee function\n * const items = [{ value: 1 }, { value: 2 }, { value: 3 }, { value: 1 }];\n * const result = pullAllBy(items, [{ value: 1 }, { value: 3 }], obj => obj.value);\n * console.log(result); // [{ value: 2 }]\n *\n * // Using a property name\n * const items = [{ value: 1 }, { value: 2 }, { value: 3 }, { value: 1 }];\n * const result = pullAllBy(items, [{ value: 1 }, { value: 3 }], 'value');\n * console.log(result); // [{ value: 2 }]\n */\nexport function pullAllBy(arr: any, valuesToRemove: any, _getValue: any): any {\n  const getValue = iteratee(_getValue);\n  const valuesSet = new Set(Array.from(valuesToRemove).map(x => getValue(x)));\n\n  let resultIndex = 0;\n\n  for (let i = 0; i < arr.length; i++) {\n    const value = getValue(arr[i]);\n\n    if (valuesSet.has(value)) {\n      continue;\n    }\n\n    // For handling sparse arrays\n    if (!Object.hasOwn(arr, i)) {\n      delete arr[resultIndex++];\n      continue;\n    }\n\n    arr[resultIndex++] = arr[i];\n  }\n\n  arr.length = resultIndex;\n\n  return arr;\n}\n"
  },
  {
    "path": "src/compat/array/pullAllWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pullAllWith } from './pullAllWith';\nimport { isEqual } from '../../predicate';\n\ndescribe('pullAllWith', () => {\n  const methodName = 'pullAllWith';\n\n  // -------------------- lodash test case 1 -------------------- //\n  it(`\\`_.${methodName}\\` should work with a \\`comparator\\``, () => {\n    const objects = [\n      { x: 1, y: 1 },\n      { x: 2, y: 2 },\n      { x: 3, y: 3 },\n    ];\n    const expected = [objects[0], objects[2]];\n    const actual = pullAllWith(objects, [{ x: 2, y: 2 }], isEqual);\n\n    expect(actual).toEqual(expected);\n  });\n\n  // -------------------- lodash test case 2 -------------------- //\n  it(`\\`_.${methodName}\\` should modify and return the array`, () => {\n    const array = [1, 2, 3];\n    const result = pullAllWith(array, [1, 3]);\n\n    expect(result).toBe(array);\n    expect(array).toEqual([2]);\n  });\n\n  it(`\\`_.${methodName}\\` should preserve holes in arrays`, () => {\n    const array = [1, 2, 3, 4];\n    delete array[1];\n    delete array[3];\n\n    pullAllWith(array, [1]);\n    expect(0 in array).toBe(false);\n    expect(1 in array).toBe(true);\n    expect(2 in array).toBe(false);\n  });\n\n  it(`\\`_.${methodName}\\` should treat holes as undefined`, () => {\n    const array = [1, 2, 3];\n    delete array[1];\n\n    pullAllWith(array, [undefined]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  it(`\\`_.${methodName}\\` should match NaN`, () => {\n    const array = [1, NaN, 3, NaN];\n\n    pullAllWith(array, [NaN]);\n    expect(array).toEqual([1, 3]);\n  });\n\n  // -------------------- custom test case -------------------- //\n  it('should behave differently for shallow vs deep comparator', () => {\n    const array = [{ a: { b: 1 } }, { a: { b: 2 } }];\n    const values = [{ a: { b: 1 } }];\n\n    const shallow = (a: any, b: any) => a.a === b.a;\n    const deep = isEqual;\n\n    const arr1 = [...array];\n    const arr2 = [...array];\n\n    pullAllWith(arr1, values, shallow);\n    pullAllWith(arr2, values, deep);\n\n    expect(arr1).toEqual(array);\n    expect(arr2).toEqual([{ a: { b: 2 } }]);\n  });\n\n  it('should treat -0 and 0 as equal with default comparator', () => {\n    const array = [-0, 1, 0];\n    pullAllWith(array, [0], Object.is);\n    expect(array).toEqual([-0, 1]);\n  });\n\n  it('should handle weird JS values properly', () => {\n    const array = [NaN, undefined, null, false, 0];\n    const values = [NaN, undefined, null];\n\n    pullAllWith(array, values);\n    expect(array).toEqual([false, 0]);\n  });\n\n  it('should handle large sparse arrays correctly', () => {\n    const array = new Array(1e5);\n    array[123] = 1;\n    array[456] = 2;\n    array[789] = 3;\n\n    pullAllWith(array, [2]);\n\n    expect(123 in array).toBe(true);\n    expect(456 in array).toBe(false);\n    expect(789 in array).toBe(false);\n  });\n\n  it('should handle null and undefined values', () => {\n    // @ts-expect-error - null is not an array\n    expect(pullAllWith(null, [1, 2, 3])).toEqual(null);\n    // @ts-expect-error - undefined is not an array\n    expect(pullAllWith(undefined, [1, 2, 3])).toEqual(undefined);\n  });\n\n  it('should work with array-like objects as values', () => {\n    const array = [1, 2, 3, 4];\n    const arrayLikeValues = { 0: 2, 1: 4, length: 2 };\n\n    pullAllWith(array, arrayLikeValues);\n\n    expect(array).toEqual([1, 3]);\n  });\n\n  // NOTE: TypeScript doesn't support matching conditional types\n  // it('should match the type of lodash', () => {\n  //   expectTypeOf(pullAllWith).toEqualTypeOf<typeof pullAllWithLodash>();\n  // });\n\n  it('should work with the same value for `array` and `values`', () => {\n    const array = [{ a: 1 }, { b: 2 }];\n    const actual = pullAllWith(array, array);\n\n    expect(actual).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/pullAllWith.ts",
    "content": "import copyArray from '../_internal/copyArray.ts';\nimport type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which is\n * invoked to compare elements of array to values. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @template T\n * @param {T[]} array - The array to modify.\n * @param {ArrayLike<T>} [values] - The values to remove.\n * @param {(a: T, b: T) => boolean} [comparator] - The comparator invoked per element.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nexport function pullAllWith<T>(array: T[], values?: ArrayLike<T>, comparator?: (a: T, b: T) => boolean): T[];\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which is\n * invoked to compare elements of array to values. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @template L\n * @param {RejectReadonly<L>} array - The array to modify.\n * @param {List<L[0]>} [values] - The values to remove.\n * @param {Comparator<L[0]>} [comparator] - The comparator invoked per element.\n * @returns {L} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nexport function pullAllWith<L extends MutableList<any>>(\n  array: RejectReadonly<L>,\n  values?: ArrayLike<L[0]>,\n  comparator?: (a: L[0], b: L[0]) => boolean\n): L;\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which is\n * invoked to compare elements of array to values. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @template T, U\n * @param {T[]} array - The array to modify.\n * @param {ArrayLike<U>} values - The values to remove.\n * @param {(a: T, b: U) => boolean} comparator - The comparator invoked per element.\n * @returns {T[]} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nexport function pullAllWith<T, U>(array: T[], values: ArrayLike<U>, comparator: (a: T, b: U) => boolean): T[];\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which is\n * invoked to compare elements of array to values. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @template L1, L2\n * @param {RejectReadonly<L1>} array - The array to modify.\n * @param {List<L2>} values - The values to remove.\n * @param {Comparator2<L1[0], L2>} comparator - The comparator invoked per element.\n * @returns {L1} Returns `array`.\n *\n * @example\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nexport function pullAllWith<L1 extends MutableList<any>, L2>(\n  array: RejectReadonly<L1>,\n  values: ArrayLike<L2>,\n  comparator: (a: L1[0], b: L2) => boolean\n): L1;\n\n/**\n * Removes and returns elements from an array using a provided comparison function to determine which elements to remove.\n *\n * @template T\n * @param {T[] | ArrayLike<T>} array - The array to modify.\n * @param {T[] | ArrayLike<T>} values - The values to remove from the array.\n * @param {(a: T, b: T) => boolean} comparator - The function to compare elements of `array` with elements of `values`. Should return `true` if the two elements are considered equal.\n * @returns {T[] | ArrayLike<T>} - The array with specified values removed.\n *\n * @example\n * import pullAllWith from './pullAllWith';\n * import isEqual from '../predicate';\n *\n * const array = [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 }];\n * const valuesToRemove = [{ x: 3, y: 4 }];\n *\n * const result = pullAllWith(array, valuesToRemove, isEqual);\n *\n * console.log(result); // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n * console.log(array);  // [{ x: 1, y: 2 }, { x: 5, y: 6 }]\n */\nexport function pullAllWith<T>(\n  array: T[] | ArrayLike<T>,\n  values?: T[] | ArrayLike<T>,\n  comparator?: (a: T, b: T) => boolean\n): T[] | ArrayLike<T> {\n  if (array?.length == null || values?.length == null) {\n    return array;\n  }\n\n  if (array === values) {\n    values = copyArray(values);\n  }\n\n  let resultLength = 0;\n\n  if (comparator == null) {\n    comparator = (a, b) => eq(a, b);\n  }\n\n  const valuesArray = Array.isArray(values) ? values : Array.from(values);\n  const hasUndefined = valuesArray.includes(undefined as any);\n\n  for (let i = 0; i < array.length; i++) {\n    if (i in array) {\n      const shouldRemove = valuesArray.some(value => comparator(array[i], value));\n\n      if (!shouldRemove) {\n        (array as any)[resultLength++] = array[i];\n      }\n\n      continue;\n    }\n\n    // For handling sparse arrays\n    if (!hasUndefined) {\n      delete (array as any)[resultLength++];\n    }\n  }\n\n  (array as any).length = resultLength;\n\n  return array;\n}\n"
  },
  {
    "path": "src/compat/array/pullAt.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { map } from './map';\nimport { pullAt } from './pullAt';\nimport { reduce } from './reduce';\nimport { reject } from './reject';\nimport { at } from '../../array';\nimport { noop } from '../../function';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport { stubOne } from '../_internal/stubOne';\nimport { isArray } from '../predicate/isArray';\nimport { constant } from '../util/constant';\n\ndescribe('pullAt', () => {\n  it('should modify the array and return removed elements', () => {\n    const array = [1, 2, 3];\n    const actual = pullAt(array, [0, 1]);\n\n    expect(array).toEqual([3]);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should work with unsorted indexes', () => {\n    const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n    const actual = pullAt(array, [1, 3, 11, 7, 5, 9]);\n\n    expect(array).toEqual([1, 3, 5, 7, 9, 11]);\n    expect(actual).toEqual([2, 4, 12, 8, 6, 10]);\n  });\n\n  it('should work with repeated indexes', () => {\n    const array = [1, 2, 3, 4];\n    const actual = pullAt(array, [0, 2, 0, 1, 0, 2]);\n\n    expect(array).toEqual([4]);\n    expect(actual).toEqual([1, 3, 1, 2, 1, 3]);\n  });\n\n  it('should use `undefined` for nonexistent indexes', () => {\n    const array = ['a', 'b', 'c'];\n    const actual = pullAt(array, [2, 4, 0]);\n\n    expect(array).toEqual(['b']);\n    expect(actual).toEqual(['c', undefined, 'a']);\n  });\n\n  it('should flatten `indexes`', () => {\n    let array = ['a', 'b', 'c'];\n    expect(pullAt(array, 2, 0)).toEqual(['c', 'a']);\n    expect(array).toEqual(['b']);\n\n    array = ['a', 'b', 'c', 'd'];\n    expect(pullAt(array, [3, 0], 2)).toEqual(['d', 'a', 'c']);\n    expect(array).toEqual(['b']);\n  });\n\n  it('should return an empty array when no indexes are given', () => {\n    const array = ['a', 'b', 'c'];\n    let actual = pullAt(array);\n\n    expect(array).toEqual(['a', 'b', 'c']);\n    expect(actual).toEqual([]);\n\n    actual = pullAt(array, [], []);\n\n    expect(array).toEqual(['a', 'b', 'c']);\n    expect(actual).toEqual([]);\n  });\n\n  it('should work with non-index paths', () => {\n    const values: any[] = reject(empties, (value: any) => value === 0 || isArray(value)).concat(-1, 1.1);\n\n    const array = reduce(\n      values,\n      (result, value) => {\n        (result as any)[value] = 1;\n        return result;\n      },\n      []\n    );\n    let expected: any[] = map(values, stubOne);\n    let actual = pullAt(array, values);\n\n    expect(actual).toEqual(expected);\n\n    expected = map(values, noop);\n    actual = at(array, values);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = map(props, key => {\n      const array = [-1];\n      // @ts-expect-error - use -0 as a key\n      array['-0'] = -2;\n      return pullAt(array, key);\n    });\n\n    expect(actual).toEqual([[-2], [-2], [-1], [-1]]);\n  });\n\n  it('should support deep paths', () => {\n    const array: any = [];\n    array.a = { b: 2 };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    let actual = pullAt(array, 'a.b');\n\n    expect(actual).toEqual([2]);\n    expect(array.a).toEqual({});\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = pullAt(array, 'a.b.c');\n\n    expect(actual).toEqual([undefined]);\n  });\n\n  it('should work with a falsey `array` when keys are given', () => {\n    const values: any[] = falsey.slice();\n    const expected = map(values, constant(Array(4)));\n\n    const actual = map(values, array => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      return pullAt(array, 0, 1, 'pop', 'push');\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with array-like object', () => {\n    const arrayLike = {\n      0: 'a',\n      1: 'b',\n      2: 'c',\n      length: 3,\n    };\n\n    const actual = pullAt(arrayLike, [0, 2]);\n\n    expect(actual).toEqual(['a', 'c']);\n    expect(arrayLike).toEqual({ 0: 'b', length: 1 });\n  });\n\n  it('should support array paths for nested properties', () => {\n    const array: any = [];\n    array.a = { b: { c: 3 } };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = pullAt(array, [['a', 'b', 'c']]);\n\n    expect(actual).toEqual([3]);\n    expect(array.a.b).toEqual({});\n  });\n\n  // NOTE: TypeScript doesn't support matching conditional types\n  // it('should match the type of lodash', () => {\n  //   expectTypeOf(pullAt).toEqualTypeOf<typeof pullAtLodash>();\n  // });\n});\n"
  },
  {
    "path": "src/compat/array/pullAt.ts",
    "content": "import { flattenDepth } from './flattenDepth.ts';\nimport { isIndex } from '../_internal/isIndex.ts';\nimport { isKey } from '../_internal/isKey.ts';\nimport { Many } from '../_internal/Many.ts';\nimport type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { at } from '../object/at.ts';\nimport { unset } from '../object/unset.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Removes elements from array corresponding to the given indexes and returns an array of the removed elements.\n * Indexes may be specified as an array of indexes or as individual arguments.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @template T\n * @param {T[]} array - The array to modify.\n * @param {...Array<number | number[]>} indexes - The indexes of elements to remove, specified as individual indexes or arrays of indexes.\n * @returns {T[]} Returns the new array of removed elements.\n *\n * @example\n * var array = [5, 10, 15, 20];\n * var evens = pullAt(array, 1, 3);\n *\n * console.log(array);\n * // => [5, 15]\n *\n * console.log(evens);\n * // => [10, 20]\n */\nexport function pullAt<T>(array: T[], ...indexes: Array<Many<number>>): T[];\n\n/**\n * Removes elements from array corresponding to the given indexes and returns an array of the removed elements.\n * Indexes may be specified as an array of indexes or as individual arguments.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @template L\n * @param {L} array - The array to modify.\n * @param {...Array<number | number[]>} indexes - The indexes of elements to remove, specified as individual indexes or arrays of indexes.\n * @returns {L} Returns the new array of removed elements.\n *\n * @example\n * var array = [5, 10, 15, 20];\n * var evens = pullAt(array, 1, 3);\n *\n * console.log(array);\n * // => [5, 15]\n *\n * console.log(evens);\n * // => [10, 20]\n */\nexport function pullAt<L extends MutableList<any>>(array: RejectReadonly<L>, ...indexes: Array<Many<number>>): L;\n\n/**\n * Removes elements from an array at specified indices and returns the removed elements.\n *\n * @template T\n * @param {ArrayLike<T>} array - The array from which elements will be removed.\n * @param {Array<number | readonly number[] | string | readonly string[]>} _indices - An array of indices specifying the positions of elements to remove.\n * @returns {ArrayLike<T>} An array containing the elements that were removed from the original array.\n *\n * @example\n * const numbers = [10, 20, 30, 40, 50];\n * const removed = pullAt(numbers, [1, 3, 4]);\n * console.log(removed); // [20, 40, 50]\n * console.log(numbers); // [10, 30]\n */\nexport function pullAt<T>(\n  array: ArrayLike<T>,\n  ..._indices: Array<number | readonly number[] | string | readonly string[]>\n): ArrayLike<T> {\n  const indices: Array<number | string> = flattenDepth(_indices as any, 1);\n\n  if (!array) {\n    return Array(indices.length);\n  }\n\n  const result = at(array, indices);\n\n  const indicesToPull = indices\n    .map(index => (isIndex(index, array.length) ? Number(index) : index))\n    .sort((a: any, b: any) => b - a);\n\n  for (const index of new Set(indicesToPull)) {\n    if (isIndex(index, array.length)) {\n      Array.prototype.splice.call(array, index as number, 1);\n      continue;\n    }\n\n    if (isKey(index, array)) {\n      delete (array as any)[toKey(index)];\n      continue;\n    }\n\n    const path = isArray(index) ? index : toPath(index);\n    unset(array, path);\n  }\n\n  return result as T[];\n}\n"
  },
  {
    "path": "src/compat/array/reduce.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { reduce as reduceLodash } from 'lodash';\nimport { head } from './head';\nimport { reduce } from './reduce';\nimport { empties } from '../_internal/empties';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { keys } from '../object/keys';\n\ndescribe('reduce', () => {\n  const array = [1, 2, 3];\n\n  it(`should reduce a collection to a single value`, () => {\n    const actual = reduce(['a', 'b', 'c'], (accumulator, value) => accumulator + value, '');\n\n    expect(actual).toBe('abc');\n  });\n\n  it(`should support empty collections without an initial \\`accumulator\\` value`, () => {\n    const actual: any[] = [];\n    const expected = lodashStable.map(empties, lodashStable.noop);\n\n    lodashStable.each(empties, value => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        actual.push(reduce(value, lodashStable.noop));\n      } catch (e) {\n        //\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should support empty collections with an initial \\`accumulator\\` value`, () => {\n    const expected = lodashStable.map(empties, lodashStable.constant('x'));\n\n    const actual = lodashStable.map(empties, value => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        return reduce(value, lodashStable.noop, 'x');\n      } catch (e) {\n        //\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should handle an initial \\`accumulator\\` value of \\`undefined\\``, () => {\n    const actual = reduce([], lodashStable.noop, undefined);\n    expect(actual).toBe(undefined);\n  });\n\n  it(`should return \\`undefined\\` for empty collections when no \\`accumulator\\` is given (test in IE > 9 and modern browsers)`, () => {\n    const array: any[] = [];\n    const object = { 0: 1, length: 0 };\n\n    if ('__proto__' in array) {\n      array.__proto__ = object;\n      expect(reduce(array, lodashStable.noop)).toBe(undefined);\n    }\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(reduce(object, lodashStable.noop)).toBe(undefined);\n  });\n\n  it('should use the first element of a collection as the default `accumulator`', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(reduce(array)).toBe(1);\n  });\n\n  it('should provide correct `iteratee` arguments when iterating an array', () => {\n    let args: any;\n\n    reduce(\n      array,\n      function () {\n        // eslint-disable-next-line\n        args || (args = Array.prototype.slice.call(arguments));\n      },\n      // eslint-disable-next-line\n      // @ts-ignore\n      0\n    );\n\n    expect(args).toEqual([0, 1, 0, array]);\n\n    args = undefined;\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduce(array, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual([1, 2, 1, array]);\n  });\n\n  it('should provide correct `iteratee` arguments when iterating an object', () => {\n    let args: any;\n    const object = { a: 1, b: 2 };\n    const firstKey = head(keys(object));\n\n    let expected = firstKey === 'a' ? [0, 1, 'a', object] : [0, 2, 'b', object];\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduce(\n      object,\n      function () {\n        // eslint-disable-next-line\n        args || (args = Array.prototype.slice.call(arguments));\n      },\n      0\n    );\n\n    expect(args).toEqual(expected);\n\n    args = undefined;\n    expected = firstKey === 'a' ? [1, 2, 'b', object] : [2, 1, 'a', object];\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduce(object, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual(expected);\n  });\n\n  it(`should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n    const isIteratedAsObject = function (object: any) {\n      let result = false;\n\n      reduce(\n        object,\n        () => {\n          result = true;\n        },\n        0 as any\n      );\n      return result;\n    };\n\n    const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n    const expected = lodashStable.map(values, lodashStable.stubTrue);\n\n    const actual = lodashStable.map(values, length => isIteratedAsObject({ length: length }));\n\n    // eslint-disable-next-line\n    const Foo = function (a: any) {};\n    Foo.a = 1;\n\n    expect(actual).toEqual(expected);\n    expect(isIteratedAsObject(Foo)).toBeTruthy();\n    expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n  });\n\n  it(`should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object: any = { a: 1 };\n\n    reduce(\n      object,\n      () => {\n        if (++count === 1) {\n          object.b = 2;\n        }\n        return true;\n      },\n      object\n    );\n\n    expect(count).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(reduce).toEqualTypeOf<typeof reduceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/reduce.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { range } from '../../math/range.ts';\nimport { MemoListIterator } from '../_internal/MemoListIterator.ts';\nimport { MemoObjectIterator } from '../_internal/MemoObjectIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Reduces an array to a single value using an iteratee function.\n *\n * @param {T[] | null | undefined} collection - The array to iterate over\n * @param {MemoListIterator<T, U, T[]>} callback - The function invoked per iteration\n * @param {U} accumulator - The initial value\n * @returns {U} Returns the accumulated value\n *\n * @example\n * const array = [1, 2, 3];\n * reduce(array, (acc, value) => acc + value, 0); // => 6\n */\nexport function reduce<T, U>(\n  collection: T[] | null | undefined,\n  callback: MemoListIterator<T, U, T[]>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an array-like object to a single value using an iteratee function.\n *\n * @param {ArrayLike<T> | null | undefined} collection - The array-like object to iterate over\n * @param {MemoListIterator<T, U, ArrayLike<T>>} callback - The function invoked per iteration\n * @param {U} accumulator - The initial value\n * @returns {U} Returns the accumulated value\n *\n * @example\n * const arrayLike = {0: 1, 1: 2, 2: 3, length: 3};\n * reduce(arrayLike, (acc, value) => acc + value, 0); // => 6\n */\nexport function reduce<T, U>(\n  collection: ArrayLike<T> | null | undefined,\n  callback: MemoListIterator<T, U, ArrayLike<T>>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an object to a single value using an iteratee function.\n *\n * @param {T | null | undefined} collection - The object to iterate over\n * @param {MemoObjectIterator<T[keyof T], U, T>} callback - The function invoked per iteration\n * @param {U} accumulator - The initial value\n * @returns {U} Returns the accumulated value\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * reduce(obj, (acc, value) => acc + value, 0); // => 6\n */\nexport function reduce<T extends object, U>(\n  collection: T | null | undefined,\n  callback: MemoObjectIterator<T[keyof T], U, T>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an array to a single value using an iteratee function.\n *\n * @param {T[] | null | undefined} collection - The array to iterate over\n * @param {MemoListIterator<T, T, T[]>} callback - The function invoked per iteration\n * @returns {T | undefined} Returns the accumulated value\n *\n * @example\n * const array = [1, 2, 3];\n * reduce(array, (acc, value) => acc + value); // => 6\n */\nexport function reduce<T>(collection: T[] | null | undefined, callback: MemoListIterator<T, T, T[]>): T | undefined;\n\n/**\n * Reduces an array-like object to a single value using an iteratee function.\n *\n * @param {ArrayLike<T> | null | undefined} collection - The array-like object to iterate over\n * @param {MemoListIterator<T, T, ArrayLike<T>>} callback - The function invoked per iteration\n * @returns {T | undefined} Returns the accumulated value\n *\n * @example\n * const arrayLike = {0: 1, 1: 2, 2: 3, length: 3};\n * reduce(arrayLike, (acc, value) => acc + value); // => 6\n */\nexport function reduce<T>(\n  collection: ArrayLike<T> | null | undefined,\n  callback: MemoListIterator<T, T, ArrayLike<T>>\n): T | undefined;\n\n/**\n * Reduces an object to a single value using an iteratee function.\n *\n * @param {T | null | undefined} collection - The object to iterate over\n * @param {MemoObjectIterator<T[keyof T], T[keyof T], T>} callback - The function invoked per iteration\n * @returns {T[keyof T] | undefined} Returns the accumulated value\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * reduce(obj, (acc, value) => acc + value); // => 6\n */\nexport function reduce<T extends object>(\n  collection: T | null | undefined,\n  callback: MemoObjectIterator<T[keyof T], T[keyof T], T>\n): T[keyof T] | undefined;\n\n/**\n * Reduces a collection to a single value using an iteratee function.\n *\n * @param {T[] | ArrayLike<T> | Record<string, T> | null | undefined} collection - The collection to iterate over.\n * @param {((accumulator: any, value: any, index: PropertyKey, collection: any) => any) | PropertyKey | object} iteratee - The function invoked per iteration or the key to reduce over.\n * @param {any} initialValue - The initial value.\n * @returns {any} - Returns the accumulated value.\n *\n * @example\n * // Using a reducer function\n * const array = [1, 2, 3];\n * reduce(array, (acc, value) => acc + value, 0); // => 6\n *\n * @example\n * // Using a reducer function with initialValue\n * const array = [1, 2, 3];\n * reduce(array, (acc, value) => acc + value % 2 === 0, true); // => false\n *\n * @example\n * // Using an object as the collection\n * const obj = { a: 1, b: 2, c: 3 };\n * reduce(obj, (acc, value) => acc + value, 0); // => 6\n */\nexport function reduce(\n  collection: ArrayLike<any> | Record<any, any> | null | undefined,\n  iteratee: (accumulator: any, value: any, index: any, collection: any) => any = identity,\n  accumulator?: any\n): any {\n  if (!collection) {\n    return accumulator;\n  }\n\n  let keys: any[];\n  let startIndex = 0;\n\n  if (isArrayLike(collection)) {\n    keys = range(0, collection.length);\n\n    if (accumulator == null && collection.length > 0) {\n      accumulator = (collection as ArrayLike<any>)[0];\n      startIndex += 1;\n    }\n  } else {\n    keys = Object.keys(collection);\n\n    if (accumulator == null) {\n      accumulator = (collection as any)[keys[0]];\n      startIndex += 1;\n    }\n  }\n\n  for (let i = startIndex; i < keys.length; i++) {\n    const key = keys[i];\n    const value = (collection as any)[key];\n\n    accumulator = iteratee(accumulator, value, key, collection);\n  }\n\n  return accumulator;\n}\n"
  },
  {
    "path": "src/compat/array/reduceRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { reduceRight as reduceRightLodash } from 'lodash';\nimport { reduceRight } from './reduceRight';\nimport { empties } from '../_internal/empties';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\n\ndescribe('reduceRight', () => {\n  const array = [1, 2, 3];\n\n  it('should use the last element of a collection as the default `accumulator`', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(reduceRight(array)).toBe(3);\n  });\n\n  it('should provide correct `iteratee` arguments when iterating an array', () => {\n    let args: any;\n\n    reduceRight(\n      array,\n      function () {\n        // eslint-disable-next-line\n        args || (args = Array.prototype.slice.call(arguments));\n      },\n      0 as any\n    );\n\n    expect(args).toEqual([0, 3, 2, array]);\n\n    args = undefined;\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduceRight(array, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual([3, 2, 1, array]);\n  });\n\n  it('should provide correct `iteratee` arguments when iterating an object', () => {\n    let args: any;\n    const object = { a: 1, b: 2 };\n    const isFIFO = lodashStable.keys(object)[0] === 'a';\n\n    let expected = isFIFO ? [0, 2, 'b', object] : [0, 1, 'a', object];\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduceRight(\n      object,\n      function () {\n        // eslint-disable-next-line\n        args || (args = Array.prototype.slice.call(arguments));\n      },\n      0\n    );\n\n    expect(args).toEqual(expected);\n\n    args = undefined;\n    expected = isFIFO ? [2, 1, 'a', object] : [1, 2, 'b', object];\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduceRight(object, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    expect(args).toEqual(expected);\n  });\n\n  it(`should reduce a collection to a single value`, () => {\n    const actual = reduceRight(['a', 'b', 'c'], (accumulator, value) => accumulator + value, '');\n\n    expect(actual).toBe('cba');\n  });\n\n  it(`should support empty collections without an initial \\`accumulator\\` value`, () => {\n    const actual: any[] = [];\n    const expected = lodashStable.map(empties, lodashStable.noop);\n\n    lodashStable.each(empties, value => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        actual.push(reduceRight(value, lodashStable.noop));\n      } catch (e) {\n        //\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should support empty collections with an initial \\`accumulator\\` value`, () => {\n    const expected = lodashStable.map(empties, lodashStable.constant('x'));\n\n    const actual = lodashStable.map(empties, value => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        return reduceRight(value, lodashStable.noop, 'x');\n      } catch (e) {\n        //\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should handle an initial \\`accumulator\\` value of \\`undefined\\``, () => {\n    const actual = reduceRight([], lodashStable.noop, undefined);\n    expect(actual).toBe(undefined);\n  });\n\n  it(`should return \\`undefined\\` for empty collections when no \\`accumulator\\` is given (test in IE > 9 and modern browsers)`, () => {\n    const array: any[] = [];\n    const object = { 0: 1, length: 0 };\n\n    if ('__proto__' in array) {\n      array.__proto__ = object;\n      expect(reduceRight(array, lodashStable.noop)).toBe(undefined);\n    }\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(reduceRight(object, lodashStable.noop)).toBe(undefined);\n  });\n\n  it(`should use \\`isArrayLike\\` to determine whether a value is array-like`, () => {\n    const isIteratedAsObject = function (object: any) {\n      let result = false;\n      reduceRight(\n        object,\n        () => {\n          result = true;\n        },\n        // eslint-disable-next-line\n        // @ts-ignore\n        0\n      );\n      return result;\n    };\n\n    const values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1];\n    const expected = lodashStable.map(values, lodashStable.stubTrue);\n\n    const actual = lodashStable.map(values, length => isIteratedAsObject({ length: length }));\n\n    // eslint-disable-next-line\n    const Foo = function (a: any) {};\n    Foo.a = 1;\n\n    expect(actual).toEqual(expected);\n    expect(isIteratedAsObject(Foo)).toBeTruthy();\n    expect(isIteratedAsObject({ length: 0 })).toBeFalsy();\n  });\n\n  it(`should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object = { a: 1 };\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    reduceRight(\n      object,\n      () => {\n        if (++count === 1) {\n          // eslint-disable-next-line\n          // @ts-ignore\n          object.b = 2;\n        }\n        return true;\n      },\n      object\n    );\n\n    expect(count).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(reduceRight).toEqualTypeOf<typeof reduceRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/reduceRight.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { range } from '../../math/range.ts';\nimport { MemoListIterator } from '../_internal/MemoListIterator.ts';\nimport { MemoObjectIterator } from '../_internal/MemoObjectIterator.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Reduces an array to a single value using an iteratee function, starting from the right.\n *\n * The `reduceRight()` function goes through each element in an array from right to left and applies a special function (called a \"reducer\") to them, one by one.\n * This function takes the result of the previous step and the current element to perform a calculation.\n * After going through all the elements, the function gives you one final result.\n *\n * When the `reduceRight()` function starts, there's no previous result to use.\n * If you provide an initial value, it starts with that.\n * If not, it uses the last element of the array and begins with the second to last element for the calculation.\n *\n * The `reduceRight()` function goes through each element in an array from right to left and applies a special function (called a \"reducer\") to them, one by one.\n * This function takes the result of the previous step and the current element to perform a calculation.\n * After going through all the elements, the function gives you one final result.\n *\n * When the `reduceRight()` function starts, there's no previous result to use.\n * If you provide an initial value, it starts with that.\n * If not, it uses the last element of the array and begins with the second to last element for the calculation.\n *\n * @template T, U\n * @param {T[] | null | undefined} collection - The array to iterate over.\n * @param {MemoListIterator<T, U, T[]>} callback - The function invoked per iteration.\n * @param {U} accumulator - The initial value.\n * @returns {U} Returns the accumulated value.\n *\n * @example\n * reduceRight([1, 2, 3], (acc, value) => acc + value, 0);\n * // => 6\n */\nexport function reduceRight<T, U>(\n  collection: T[] | null | undefined,\n  callback: MemoListIterator<T, U, T[]>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an array-like collection to a single value using an iteratee function, starting from the right.\n *\n * @template T, U\n * @param {ArrayLike<T> | null | undefined} collection - The array-like collection to iterate over.\n * @param {MemoListIterator<T, U, ArrayLike<T>>} callback - The function invoked per iteration.\n * @param {U} accumulator - The initial value.\n * @returns {U} Returns the accumulated value.\n *\n * @example\n * reduceRight([1, 2, 3], (acc, value) => acc + value, 0);\n * // => 6\n */\nexport function reduceRight<T, U>(\n  collection: ArrayLike<T> | null | undefined,\n  callback: MemoListIterator<T, U, ArrayLike<T>>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an object to a single value using an iteratee function, starting from the right.\n *\n * @template T, U\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {MemoObjectIterator<T[keyof T], U, T>} callback - The function invoked per iteration.\n * @param {U} accumulator - The initial value.\n * @returns {U} Returns the accumulated value.\n *\n * @example\n * reduceRight({ a: 1, b: 2, c: 3 }, (acc, value) => acc + value, 0);\n * // => 6\n */\nexport function reduceRight<T extends object, U>(\n  collection: T | null | undefined,\n  callback: MemoObjectIterator<T[keyof T], U, T>,\n  accumulator: U\n): U;\n\n/**\n * Reduces an array to a single value using an iteratee function, starting from the right.\n *\n * The `reduceRight()` function goes through each element in an array from right to left and applies a special function (called a \"reducer\") to them, one by one.\n * This function takes the result of the previous step and the current element to perform a calculation.\n * After going through all the elements, the function gives you one final result.\n *\n * When the `reduceRight()` function starts, there's no previous result to use.\n * If you provide an initial value, it starts with that.\n * If not, it uses the last element of the array and begins with the second to last element for the calculation.\n *\n * The `reduceRight()` function goes through each element in an array from right to left and applies a special function (called a \"reducer\") to them, one by one.\n * This function takes the result of the previous step and the current element to perform a calculation.\n * After going through all the elements, the function gives you one final result.\n *\n * When the `reduceRight()` function starts, there's no previous result to use.\n * If you provide an initial value, it starts with that.\n * If not, it uses the last element of the array and begins with the second to last element for the calculation.\n *\n * @template T\n * @param {T[] | null | undefined} collection - The array to iterate over.\n * @param {MemoListIterator<T, T, T[]>} callback - The function invoked per iteration.\n * @returns {T | undefined} Returns the accumulated value.\n *\n * @example\n * reduceRight([1, 2, 3], (acc, value) => acc + value);\n * // => 6\n */\nexport function reduceRight<T>(\n  collection: T[] | null | undefined,\n  callback: MemoListIterator<T, T, T[]>\n): T | undefined;\n\n/**\n * Reduces an array-like collection to a single value using an iteratee function, starting from the right.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The array-like collection to iterate over.\n * @param {MemoListIterator<T, T, ArrayLike<T>>} callback - The function invoked per iteration.\n * @returns {T | undefined} Returns the accumulated value.\n *\n * @example\n * reduceRight([1, 2, 3], (acc, value) => acc + value);\n * // => 6\n */\nexport function reduceRight<T>(\n  collection: ArrayLike<T> | null | undefined,\n  callback: MemoListIterator<T, T, ArrayLike<T>>\n): T | undefined;\n\n/**\n * Reduces an object to a single value using an iteratee function, starting from the right.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {MemoObjectIterator<T[keyof T], T[keyof T], T>} callback - The function invoked per iteration.\n * @returns {T[keyof T] | undefined} Returns the accumulated value.\n *\n * @example\n * reduceRight({ a: 1, b: 2, c: 3 }, (acc, value) => acc + value);\n * // => 6\n */\nexport function reduceRight<T extends object>(\n  collection: T | null | undefined,\n  callback: MemoObjectIterator<T[keyof T], T[keyof T], T>\n): T[keyof T] | undefined;\n\n/**\n * Reduces a collection to a single value using an iteratee function, starting from the right.\n *\n * @param {T[] | ArrayLike<T> | Record<string, T> | null | undefined} collection - The collection to iterate over.\n * @param {((accumulator: any, value: any, index: PropertyKey, collection: any) => any) | PropertyKey | object} iteratee - The function invoked per iteration or the key to reduce over.\n * @param {any} initialValue - The initial value.\n * @returns {any} - Returns the accumulated value.\n *\n * @example\n * // Using a reducer function\n * const array = [1, 2, 3];\n * reduceRight(array, (acc, value) => acc + value, 0); // => 6\n *\n * @example\n * // Using a reducer function with initialValue\n * const array = [1, 2, 3];\n * reduceRight(array, (acc, value) => acc + value % 2 === 0, true); // => false\n *\n * @example\n * // Using an object as the collection\n * const obj = { a: 1, b: 2, c: 3 };\n * reduceRight(obj, (acc, value) => acc + value, 0); // => 6\n */\nexport function reduceRight(\n  collection: ArrayLike<any> | Record<any, any> | null | undefined,\n  iteratee: (accumulator: any, value: any, index: any, collection: any) => any = identity,\n  accumulator?: any\n): any {\n  if (!collection) {\n    return accumulator;\n  }\n\n  let keys: any[];\n  let startIndex: number;\n\n  if (isArrayLike(collection)) {\n    keys = range(0, collection.length).reverse();\n\n    if (accumulator == null && collection.length > 0) {\n      accumulator = (collection as ArrayLike<any>)[collection.length - 1];\n      startIndex = 1;\n    } else {\n      startIndex = 0;\n    }\n  } else {\n    keys = Object.keys(collection).reverse();\n\n    if (accumulator == null) {\n      accumulator = (collection as any)[keys[0]];\n      startIndex = 1;\n    } else {\n      startIndex = 0;\n    }\n  }\n\n  for (let i = startIndex; i < keys.length; i++) {\n    const key = keys[i];\n    const value = (collection as any)[key];\n\n    accumulator = iteratee(accumulator, value, key, collection);\n  }\n\n  return accumulator;\n}\n"
  },
  {
    "path": "src/compat/array/reject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { reject as rejectLodash } from 'lodash';\nimport { reject } from './reject';\nimport { args } from '../_internal/args';\nimport { isEven } from '../_internal/isEven';\n\ndescribe('reject', () => {\n  it('should return elements the `predicate` returns falsey for', () => {\n    const array = [1, 2, 3];\n    expect(reject(array, isEven)).toEqual([1, 3]);\n  });\n  it('should return an empty array when no predicate is provided.', () => {\n    const arr = [1, 2, 3];\n\n    expect(reject(arr)).toEqual([]);\n  });\n\n  it('should return an array of elements from the array', () => {\n    const arr = [1, 2, 3];\n\n    expect(reject(arr, isEven)).toEqual([1, 3]);\n  });\n\n  it(`should work with \\`matches\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice' },\n      { id: 2, name: 'Bob' },\n    ];\n    expect(reject(arr, { name: 'Bob' })).toEqual([{ id: 1, name: 'Alice' }]);\n  });\n\n  it(`should work with \\`matchesProperty\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n    ];\n\n    expect(reject(arr, ['name', 'Alice'])).toEqual([{ id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 }]);\n    expect(reject(arr, [0, 1])).toEqual([{ id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 }]);\n    expect(reject(arr, [Symbol.for('key'), 1])).toEqual([{ id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 }]);\n\n    const users = [\n      { user: 'barney', age: 36, active: true },\n      { user: 'fred', age: 40, active: false },\n    ];\n\n    expect(reject(users, ['active', false])).toEqual([{ user: 'barney', age: 36, active: true }]);\n  });\n\n  it(`should work with \\`property\\` shorthands`, () => {\n    const arr = [\n      { id: 1, name: 'Alice', 0: 1, [Symbol.for('key')]: 1 },\n      { id: 2, name: 'Bob', 0: 2, [Symbol.for('key')]: 2 },\n      { id: 3, age: 28, 0: 3 },\n    ];\n\n    expect(reject(arr, 'name')).toEqual([{ id: 3, age: 28, 0: 3 }]);\n\n    expect(reject(arr, 0)).toEqual([]);\n\n    expect(reject(arr, Symbol.for('key'))).toEqual([{ id: 3, age: 28, 0: 3 }]);\n  });\n\n  it(`should return an array of elements from the object`, () => {\n    const obj: { [key: string]: number } = {\n      a: 1,\n      b: 2,\n      c: 3,\n    };\n\n    expect(reject(obj, (value, key) => value >= 2 && key === 'b')).toEqual([1, 3]);\n  });\n\n  it(`should work with \\`matches\\` shorthands for objects.`, () => {\n    const obj = {\n      item1: { a: 0 },\n      item2: { a: 1 },\n      item3: { a: 2 },\n    };\n\n    expect(reject(obj, { a: 1 })).toEqual([{ a: 0 }, { a: 2 }]);\n  });\n\n  it(`should work with \\`matches\\` shorthands for nested objects.`, () => {\n    const obj = {\n      item1: { a: 0, b: { c: 1 } },\n      item2: { a: 1, b: { c: 2 } },\n      item3: { a: 0, b: { c: 1 } },\n    };\n\n    expect(reject(obj, { b: { c: 1 } })).toEqual([{ a: 1, b: { c: 2 } }]);\n  });\n\n  it(`should work when looking for values inside nested objects`, () => {\n    const obj: Record<string, unknown> = {\n      item1: { a: 0, b: { c: 1 } },\n      item2: { a: 1, b: { c: 2 } },\n      item3: { a: 0, b: { c: 1 } },\n    };\n\n    expect(reject(obj, ['b.c', 2])).toEqual([\n      { a: 0, b: { c: 1 } },\n      { a: 0, b: { c: 1 } },\n    ]);\n  });\n\n  it('should match nested object properties using key-value pair shorthand.', () => {\n    const obj: { [key: string]: { [key: string]: unknown } } = {\n      alice: { id: 1, name: 'Alice' },\n      bob: { id: 2, name: 'Bob' },\n    };\n\n    expect(reject(obj, ['name', 'Alice'])).toEqual([{ id: 2, name: 'Bob' }]);\n  });\n\n  it('should return objects that have the specified key.', () => {\n    const obj: { [key: string]: { [key: string]: unknown } } = {\n      a: { id: 1, name: 'Alice' },\n      b: { id: 2, name: 'Bob' },\n      c: { id: 3, age: 28 },\n    };\n\n    expect(reject(obj, 'name')).toEqual([{ id: 3, age: 28 }]);\n  });\n\n  it('should return `[]` when provided `null` or `undefined`', () => {\n    expect(reject(null as any, isEven)).toEqual([]);\n    expect(reject(undefined as any, isEven)).toEqual([]);\n  });\n\n  it('should return `[]` when provided none array-like object', () => {\n    expect(reject(1 as any, isEven)).toEqual([]);\n    expect(reject('' as any, isEven)).toEqual([]);\n    expect(reject(true as any, isEven)).toEqual([]);\n    expect(reject(Symbol() as any, isEven)).toEqual([]);\n  });\n\n  it('should support array-like objects', () => {\n    expect(reject({ 0: 1, 1: 2, 2: 3, length: 3 }, isEven)).toEqual([1, 3]);\n    expect(reject('123', value => isEven(parseInt(value)))).toEqual(['1', '3']);\n    expect(reject(args, isEven)).toEqual([1, 3]);\n  });\n\n  it('should not modify the resulting value from within `predicate`', () => {\n    const actual = reject([0], (value, index, array) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      array[index] = 1;\n      return false;\n    });\n\n    expect(actual).toEqual([0]);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const sparseArray = [1, , 3, , 5] as any[];\n\n    expect(reject(sparseArray, value => value > 2)).toEqual([1, undefined, undefined]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(reject).toEqualTypeOf<typeof rejectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/reject.ts",
    "content": "import { filter } from './filter.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport type { StringIterator } from '../_internal/StringIterator.ts';\nimport { negate } from '../function/negate.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Iterates over the collection and rejects elements based on the given predicate.\n * If a function is provided, it is invoked for each element in the collection.\n *\n * @param {string | null | undefined} collection The string to iterate over\n * @param {StringIterator<boolean>} [predicate] The function invoked per iteration\n * @returns {string[]} Returns a new array of characters that do not satisfy the predicate\n * @example\n * reject('abc', char => char === 'b')\n * // => ['a', 'c']\n */\nexport function reject(collection: string | null | undefined, predicate?: StringIterator<boolean>): string[];\n\n/**\n * Iterates over the collection and rejects elements based on the given predicate.\n * If a function is provided, it is invoked for each element in the collection.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection The array-like to iterate over\n * @param {ListIterateeCustom<T, boolean>} [predicate] The function invoked per iteration\n * @returns {T[]} Returns a new array of elements that do not satisfy the predicate\n * @example\n * reject([1, 2, 3], num => num % 2 === 0)\n * // => [1, 3]\n *\n * reject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a')\n * // => [{ b: 1 }]\n */\nexport function reject<T>(collection: ArrayLike<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): T[];\n\n/**\n * Iterates over the collection and rejects elements based on the given predicate.\n * If a function is provided, it is invoked for each element in the collection.\n *\n * @template T\n * @param {T | null | undefined} collection The object to iterate over\n * @param {ObjectIterateeCustom<T, boolean>} [predicate] The function invoked per iteration\n * @returns {Array<T[keyof T]>} Returns a new array of elements that do not satisfy the predicate\n * @example\n * reject({ a: 1, b: 2, c: 3 }, value => value % 2 === 0)\n * // => [1, 3]\n *\n * reject({ item1: { a: 0, b: true }, item2: { a: 1, b: true }, item3: { a: 2, b: false }}, { b: false })\n * // => [{ a: 0, b: true }, { a: 1, b: true }]\n */\nexport function reject<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>\n): Array<T[keyof T]>;\n\n/**\n * Iterates over the collection and rejects elements based on the given predicate.\n * If a function is provided, it is invoked for each element in the collection.\n *\n * @template T\n * @param {ArrayLike<T> | Record<any, any> | null | undefined} source - The array or object to iterate over.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate=identity] - The function invoked per iteration.\n * @returns {T[]} - Returns a new array of elements that do not satisfy the predicate.\n *\n * @example\n * reject([{ a: 1 }, { a: 2 }, { b: 1 }], 'a');\n * // => [{ b: 1 }]\n *\n * reject([{ a: 1 }, { a: 2 }, { b: 1 }], { b: 1 });\n * // => [{ a: 1 }, { a: 2 }]\n *\n * reject({ item1: { a: 0, b: true }, item2: { a: 1, b: true }, item3: { a: 2, b: false }}, { b: false })\n * // => [{ a: 0, b: true }, { a: 1, b: true }]\n *\n * reject([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n * // => [{ a: 1 }, { a: 3 }]\n */\nexport function reject<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  predicate: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey = identity\n): T[] {\n  return filter(source, negate(iteratee(predicate)));\n}\n"
  },
  {
    "path": "src/compat/array/remove.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { remove } from './remove';\n\nconst isEven = function (n: number) {\n  // eslint-disable-next-line eqeqeq\n  return n % 2 == 0;\n};\n\ndescribe('remove', () => {\n  it('should modify the array and return removed elements', () => {\n    const array = [1, 2, 3, 4];\n\n    const actual = remove(array, isEven);\n\n    expect(array).toEqual([1, 3]);\n    expect(actual).toEqual([2, 4]);\n  });\n\n  it('should provide correct `predicate` arguments', () => {\n    const argsList: any[] = [];\n    const array = [1, 2, 3];\n    const clone = array.slice();\n\n    remove(array, function (n, index) {\n      // eslint-disable-next-line prefer-rest-params\n      const args = Array.prototype.slice.call(arguments);\n      args[2] = args[2].slice();\n      argsList.push(args);\n      return isEven(index);\n    });\n\n    expect(argsList).toEqual([\n      [1, 0, clone],\n      [2, 1, clone],\n      [3, 2, clone],\n    ]);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    const objects = [\n      { a: 0, b: 1 },\n      { a: 1, b: 2 },\n    ];\n\n    remove(objects, { a: 1 });\n    expect(objects).toEqual([{ a: 0, b: 1 }]);\n  });\n\n  it('should work with `_.matchesProperty` shorthands', () => {\n    const objects = [\n      { a: 0, b: 1 },\n      { a: 1, b: 2 },\n    ];\n\n    remove(objects, ['a', 1]);\n    expect(objects).toEqual([{ a: 0, b: 1 }]);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ a: 0 }, { a: 1 }];\n\n    remove(objects, 'a');\n    expect(objects).toEqual([{ a: 0 }]);\n  });\n\n  it('should preserve holes in arrays', () => {\n    const array = [1, 2, 3, 4];\n    delete array[1];\n    delete array[3];\n\n    remove(array, n => n === 1);\n\n    expect('0' in array).toBe(false);\n    expect('2' in array).toBe(false);\n  });\n\n  it('should treat holes as `undefined`', () => {\n    const array = [1, 2, 3];\n    delete array[1];\n\n    remove(array, n => n == null);\n\n    expect(array).toEqual([1, 3]);\n  });\n\n  it('should not mutate the array until all elements to remove are determined', () => {\n    const array = [1, 2, 3];\n\n    remove(array, (n, index) => isEven(index));\n\n    expect(array).toEqual([2]);\n  });\n\n  it('should work with no predicate (uses identity)', () => {\n    const array = [0, 1, 2, null, 3, undefined, 4, false, 5, ''];\n\n    const removed = remove(array);\n\n    expect(array).toEqual([0, null, undefined, false, '']);\n    expect(removed).toEqual([1, 2, 3, 4, 5]);\n  });\n\n  it('should use identity function when no predicate is provided', () => {\n    const array = [0, 1, false, true, '', 'hello'];\n    const result = remove(array);\n\n    expect(result).toEqual([1, true, 'hello']);\n    expect(array).toEqual([0, false, '']);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/remove.ts",
    "content": "import { remove as removeToolkit } from '../../array/remove.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Removes all elements from array that predicate returns truthy for and returns an array of the removed elements.\n *\n * @template L\n * @param {RejectReadonly<L>} array - The array to modify.\n * @param {ListIteratee<L[0]>} [predicate] - The function invoked per iteration.\n * @returns {Array<L[0]>} Returns the new array of removed elements.\n *\n * @example\n * const array = [1, 2, 3, 4];\n * const evens = remove(array, n => n % 2 === 0);\n * console.log(array); // => [1, 3]\n * console.log(evens); // => [2, 4]\n */\nexport function remove<L extends MutableList<any>>(\n  array: RejectReadonly<L>,\n  predicate?: ListIteratee<L[0]>\n): Array<L[0]>;\n\n/**\n * Removes elements from an array based on various criteria.\n *\n * @param {ArrayLike<T>} arr - The array to iterate over.\n * @param {(value: T, index: number, arr: ArrayLike<T>) => boolean | Partial<T> | [keyof T, unknown] | keyof T} shouldRemoveElement - The function invoked per iteration, a partial object, a property-value pair, or a key to match against each element.\n * @returns {T[]} - Returns the modified array with the specified elements removed.\n *\n * @example\n * // Using a predicate function\n * const numbers = [1, 2, 3, 4, 5];\n * remove(numbers, value => value % 2 === 0); // => [1, 3, 5]\n *\n * @example\n * // Using a partial object\n * const objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\n * remove(objects, { a: 1 }); // => [{ a: 2 }, { a: 3 }]\n *\n * @example\n * // Using a property-value pair\n * const objects = [{ a: 1 }, { a: 2 }, { a: 3 }];\n * remove(objects, ['a', 1]); // => [{ a: 2 }, { a: 3 }]\n *\n * @example\n * // Using a property key\n * const objects = [{ a: 0 }, { a: 1 }];\n * remove(objects, 'a'); // => [{ a: 0 }]\n */\nexport function remove<T>(\n  arr: ArrayLike<T>,\n  shouldRemoveElement:\n    | ((value: T, index: number, arr: ArrayLike<T>) => boolean)\n    | Partial<T>\n    | [keyof T, unknown]\n    | keyof T = identity as any\n): T[] {\n  return removeToolkit(arr as T[], iteratee(shouldRemoveElement));\n}\n"
  },
  {
    "path": "src/compat/array/reverse.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { reverse } from './reverse';\nimport { range } from '../../math/range';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { times } from '../util/times';\n\ndescribe('reverse', () => {\n  const largeArray = range(LARGE_ARRAY_SIZE).concat([null as any]);\n  const smallArray = [0, 1, 2, null];\n\n  it('should reverse `array`', () => {\n    const array = [1, 2, 3];\n\n    const actual = reverse(array);\n\n    expect(actual).toBe(array);\n    expect(array).toEqual([3, 2, 1]);\n  });\n\n  it('should return the wrapped reversed `array`', () => {\n    times(2, index => {\n      const array = (index ? largeArray : smallArray).slice();\n      const clone = array.slice();\n      const actual = reverse(array);\n\n      expect(actual).toBe(array);\n      expect(actual).toEqual(clone.slice().reverse());\n    });\n  });\n\n  it('should return null if input is null', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(reverse(null)).toBeNull();\n  });\n\n  it('should return undefined if input is undefined', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(reverse(undefined)).toBeUndefined();\n  });\n\n  it('should return an empty array if input is an empty array', () => {\n    const array: number[] = [];\n    const result = reverse(array);\n    expect(result).toEqual([]);\n    expect(result).toBe(array);\n  });\n\n  it('should reverse an array with one element', () => {\n    const array = [42];\n    const result = reverse(array);\n    expect(result).toEqual([42]);\n    expect(result).toBe(array);\n  });\n\n  it('should handle an array with duplicate elements', () => {\n    const array = [1, 2, 2, 3];\n\n    const result = reverse(array);\n    expect(result).toEqual([3, 2, 2, 1]);\n    expect(result).toBe(array);\n  });\n\n  it('should modify the original array', () => {\n    const array = [1, 2, 3];\n\n    reverse(array);\n    expect(array).toEqual([3, 2, 1]);\n  });\n\n  it('should work with arrays of strings', () => {\n    const array = ['a', 'b', 'c'];\n\n    const result = reverse(array);\n    expect(result).toEqual(['c', 'b', 'a']);\n    expect(result).toBe(array);\n  });\n\n  it('should work with mixed types', () => {\n    const array = [1, 'two', 3, 'four'];\n\n    const result = reverse(array);\n    expect(result).toEqual(['four', 3, 'two', 1]);\n    expect(result).toBe(array);\n  });\n});\n"
  },
  {
    "path": "src/compat/array/reverse.ts",
    "content": "import type { MutableList } from '../_internal/MutableList.d.ts';\nimport type { RejectReadonly } from '../_internal/RejectReadonly.d.ts';\n\n/**\n * Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on.\n *\n * @template L\n * @param {L extends readonly any[] ? never : L} array - The array to reverse.\n * @returns {L} Returns `array`.\n *\n * @example\n * const array = [1, 2, 3];\n * reverse(array);\n * // => [3, 2, 1]\n */\nexport function reverse<L extends MutableList<any>>(array: RejectReadonly<L>): L;\n\n/**\n * Reverses the elements of an array in place.\n *\n * This function takes an array and reverses its elements in place, modifying the original array.\n * If the input is `null` or `undefined`, it returns the input as is.\n *\n * @template T - The type of elements in the array.\n * @param {T[] | null | undefined} array - The array to reverse. If `null` or `undefined`, the input is returned as is.\n * @returns {T[] | null | undefined} The reversed array, or `null`/`undefined` if the input was `null`/`undefined`.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const reversedArray = reverse(array);\n * // reversedArray is [5, 4, 3, 2, 1], and array is also modified to [5, 4, 3, 2, 1].\n *\n * const emptyArray = reverse([]);\n * // emptyArray is [].\n *\n * const nullArray = reverse(null);\n * // nullArray is null.\n */\nexport function reverse<T>(array: T[] | null | undefined): T[] | null | undefined {\n  if (array == null) {\n    return array;\n  }\n\n  return array.reverse();\n}\n"
  },
  {
    "path": "src/compat/array/sample.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sample as sampleLodash } from 'lodash';\nimport { sample } from './sample';\nimport { noop } from '../../function/noop';\nimport { empties } from '../_internal/empties';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/sample.spec.js\n */\n\ndescribe('sample', () => {\n  const array = [1, 2, 3, 4, 5];\n\n  it('should return a random element from an array', () => {\n    const actual = sample(array);\n    expect(array).toContain(actual);\n  });\n\n  it('should return `undefined` when sampling empty collections', () => {\n    const expected = empties.map(noop);\n\n    const actual = empties.map(value => {\n      try {\n        return sample(value);\n      } catch (e) {\n        return undefined;\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sample an object', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const actual = sample(object);\n    const values = Object.values(object);\n\n    expect(values).toContain(actual);\n  });\n\n  it('should sample a string', () => {\n    const str = 'abc';\n    const actual = sample(str);\n\n    expect(['a', 'b', 'c']).toContain(actual);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sample).toEqualTypeOf<typeof sampleLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sample.ts",
    "content": "import { sample as sampleToolkit } from '../../array/sample.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Gets a random element from collection.\n *\n * @template T\n * @param {readonly [T, ...T[]]} collection - The collection to sample.\n * @returns {T} Returns the random element.\n *\n * @example\n * sample([1, 2, 3, 4]);\n * // => 2\n */\nexport function sample<T>(collection: readonly [T, ...T[]]): T;\n\n/**\n * Gets a random element from collection.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The collection to sample.\n * @returns {T | undefined} Returns the random element.\n *\n * @example\n * sample({ 'a': 1, 'b': 2, 'c': 3 });\n * // => 2\n */\nexport function sample<T>(collection: Record<string, T> | Record<number, T> | null | undefined): T | undefined;\n\n/**\n * Gets a random element from collection.\n *\n * @template T\n * @param {T | null | undefined} collection - The collection to sample.\n * @returns {T[keyof T] | undefined} Returns the random element.\n *\n * @example\n * sample({ 'a': 1, 'b': 2, 'c': 3 });\n * // => 2\n */\nexport function sample<T extends object>(collection: T | null | undefined): T[keyof T] | undefined;\n\n/**\n * The implementation for the overloaded sample function.\n *\n * This function takes an array, string, or object and returns a single element selected randomly.\n * If the input is empty, or if it's null or undefined, the function returns `undefined`.\n *\n * @template T - The type of elements in the collection.\n * @param {ArrayLike<T> | Record<string, T>} collection - The collection to sample from.\n * @returns {T | string | undefined} A random element from the collection, or `undefined` if the collection is empty or invalid.\n */\nexport function sample<T>(collection: ArrayLike<T> | Record<string, T> | null | undefined): T | string | undefined {\n  if (collection == null) {\n    return undefined;\n  }\n\n  if (isArrayLike(collection)) {\n    return sampleToolkit(toArray(collection));\n  }\n\n  return sampleToolkit(Object.values(collection));\n}\n"
  },
  {
    "path": "src/compat/array/sampleSize.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { sampleSize as sampleSizeLodash } from 'lodash';\nimport { sampleSize } from './sampleSize';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport { stubArray } from '../util/stubArray';\n\ndescribe('sampleSize', () => {\n  const array = [1, 2, 3];\n\n  it('should return an array of random elements', () => {\n    const actual = sampleSize(array, 2);\n\n    expect(actual.length).toBe(2);\n    expect(lodashStable.difference(actual, array)).toEqual([]);\n  });\n\n  it('should contain elements of the collection', () => {\n    const actual = sampleSize(array, array.length).sort();\n\n    expect(actual).toEqual(array);\n  });\n\n  it('should treat falsey `size` values, except `undefined`, as `0`', () => {\n    const expected = lodashStable.map(falsey, value => (value === undefined ? ['a'] : []));\n\n    const actual = lodashStable.map(falsey, (size, index) =>\n      index ? sampleSize(['a'], size as any) : sampleSize(['a'])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty array when `n` < `1` or `NaN`', () => {\n    lodashStable.each([0, -1, -Infinity], n => {\n      expect(sampleSize(array, n)).toEqual([]);\n    });\n  });\n\n  it('should return all elements when `n` >= `length`', () => {\n    lodashStable.each([3, 4, 2 ** 32, Infinity], n => {\n      const actual = sampleSize(array, n).sort();\n      expect(actual).toEqual(array);\n    });\n  });\n\n  it('should coerce `n` to an integer', () => {\n    const actual = sampleSize(array, 1.6);\n    expect(actual.length).toBe(1);\n  });\n\n  it('should return an empty array for empty collections', () => {\n    const expected = lodashStable.map(empties, stubArray);\n\n    const actual = lodashStable.map(empties, value => {\n      return sampleSize(value, 1);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should sample an object', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const actual = sampleSize(object, 2);\n\n    expect(actual.length).toBe(2);\n    expect(lodashStable.difference(actual, lodashStable.values(object))).toEqual([]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const actual = lodashStable.map([['a']], sampleSize);\n    expect(actual).toEqual([['a']]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sampleSize).toEqualTypeOf<typeof sampleSizeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sampleSize.ts",
    "content": "import { sampleSize as sampleSizeToolkit } from '../../array/sampleSize.ts';\nimport { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { clamp } from '../math/clamp.ts';\nimport { toArray } from '../util/toArray.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Returns a sample element array of a specified size from a collection.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | null | undefined} collection - The collection to sample from.\n * @param {number} [n] - The size of sample.\n * @returns {T[]} A new array with sample size applied.\n *\n * @example\n * sampleSize([1, 2, 3], 2);\n * // => [2, 3] (example, actual result will vary)\n */\nexport function sampleSize<T>(collection: Record<string, T> | Record<number, T> | null | undefined, n?: number): T[];\n\n/**\n * Returns a sample element array of a specified size from an object.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to sample from.\n * @param {number} [n] - The size of sample.\n * @returns {Array<T[keyof T]>} A new array with sample size applied.\n *\n * @example\n * sampleSize({ a: 1, b: 2, c: 3 }, 2);\n * // => [2, 3] (example, actual result will vary)\n */\nexport function sampleSize<T extends object>(collection: T | null | undefined, n?: number): Array<T[keyof T]>;\n\n/**\n * Returns a sample element array of a specified `size`.\n *\n * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm.\n *\n * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm}\n *\n * @template T - The type of elements in the array.\n * @param {Record<string, T> | Record<number, T> | T | null | undefined} collection - The array to sample from.\n * @param {number} size - The size of sample.\n * @returns {Array<T[keyof T]> | T[]} A new array with sample size applied.\n *\n * @example\n * const result = sampleSize([1, 2, 3], 2)\n * // result will be an array containing two of the elements from the collection.\n * // [1, 2] or [1, 3] or [2, 3]\n */\nexport function sampleSize<T>(\n  collection: Record<string, T> | Record<number, T> | T | null | undefined,\n  size?: number,\n  guard?: unknown\n): Array<T[keyof T]> | T[] {\n  const arrayCollection = toArray(collection);\n\n  if (guard ? isIterateeCall(collection, size, guard) : size === undefined) {\n    size = 1;\n  } else {\n    size = clamp(toInteger(size), 0, arrayCollection.length);\n  }\n\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-expect-error\n  return sampleSizeToolkit(arrayCollection, size);\n}\n"
  },
  {
    "path": "src/compat/array/shuffle.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { shuffle as shuffleLodash } from 'lodash';\nimport { shuffle } from './shuffle.ts';\nimport { sortBy } from './sortBy';\nimport { uniqBy } from './uniqBy';\nimport { times } from '../util/times';\n\ndescribe('shuffle', () => {\n  const array = [1, 2, 3];\n  const object = { a: 1, b: 2, c: 3 };\n\n  it('should return a new array', () => {\n    expect(shuffle(array)).not.toBe(array);\n  });\n\n  it('should contain the same elements after a collection is shuffled', () => {\n    expect(shuffle(array).sort()).toEqual(array);\n    expect(shuffle(object).sort()).toEqual(array);\n  });\n\n  it('should shuffle small collections', () => {\n    const actual = times(1000, () => shuffle([1, 2]));\n\n    expect(sortBy(uniqBy(actual, String), '0')).toEqual([\n      [1, 2],\n      [2, 1],\n    ]);\n  });\n\n  it('should treat number values for `collection` as empty', () => {\n    // @ts-expect-error - Testing behavior with number input, though not strictly typed\n    expect(shuffle(1)).toEqual([]);\n  });\n\n  // additional test\n  it('should treat nullish values for `collection` as empty', () => {\n    expect(shuffle(null)).toEqual([]);\n    expect(shuffle(undefined)).toEqual([]);\n  });\n\n  it('should treat array-like objects as arrays', () => {\n    const arrayLike = {\n      2: 'a',\n      0: 'b',\n      1: 'c',\n      length: 3,\n    };\n\n    const result = shuffle(arrayLike);\n\n    expect(result).not.toBe(Array.from(arrayLike));\n    expect(shuffle(arrayLike).sort()).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(shuffle).toEqualTypeOf<typeof shuffleLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/shuffle.ts",
    "content": "import { shuffle as shuffleToolkit } from '../../array/shuffle.ts';\nimport { values } from '../object/values.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isNil } from '../predicate/isNil.ts';\nimport { isObjectLike } from '../predicate/isObjectLike.ts';\n\n/**\n * Randomizes the order of elements in an `array` using the Fisher-Yates algorithm.\n *\n * This function takes an `array` and returns a new `array` with its elements shuffled in a random order.\n *\n * @template T - The type of elements in the `array`.\n * @param {T[]} array - The `array` to shuffle.\n * @returns {T[]} A new `array` with its elements shuffled in random order.\n */\nexport function shuffle<T>(array: ArrayLike<T> | null | undefined): T[];\n\n/**\n * Randomizes the order of elements in an `object` using the Fisher-Yates algorithm.\n *\n * This function takes an `object` and returns a new `object` with its values shuffled in a random order.\n *\n * @template T - The type of elements in the `object`.\n * @param {T} object - The `object` to shuffle.\n * @returns {T[]} A new `Array` with the values of the `object` shuffled in a random order.\n */\nexport function shuffle<T extends object>(object: T | null | undefined): Array<T[keyof T]>;\n\n/**\n * Randomizes the order of elements in an `collection` using the Fisher-Yates algorithm.\n *\n * This function takes an `collection` and returns a new `collection` with its elements shuffled in a random order.\n *\n * @template T - The type of elements in the `collection`.\n * @param {T[]} collection - The `collection` to shuffle.\n * @returns {T[]} A new `collection` with its elements shuffled in random order.\n */\nexport function shuffle<T>(collection: ArrayLike<T> | T | null | undefined): T[] | Array<T[keyof T]> {\n  if (isNil(collection)) {\n    return [];\n  }\n\n  if (isArray(collection)) {\n    return shuffleToolkit(collection);\n  }\n\n  if (isArrayLike(collection)) {\n    return shuffleToolkit(Array.from(collection));\n  }\n\n  if (isObjectLike(collection)) {\n    return shuffleToolkit(values(collection as Record<PropertyKey, T[keyof T]>));\n  }\n\n  return [];\n}\n"
  },
  {
    "path": "src/compat/array/size.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { size as sizeLodash } from 'lodash';\nimport { size } from './size';\nimport { falsey } from '../_internal/falsey';\nimport { toArgs } from '../_internal/toArgs';\n\nconst args = toArgs([1, 2, 3]);\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/size.spec.js#L1\n */\ndescribe('size', () => {\n  const array = [1, 2, 3];\n\n  it('should return the number of own enumerable string keyed properties of an object', () => {\n    expect(size({ one: 1, two: 2, three: 3 })).toBe(3);\n  });\n\n  it('should return the length of an array', () => {\n    expect(size(array)).toBe(3);\n  });\n\n  it('should accept a falsey `object`', () => {\n    const expected = falsey.map(() => 0);\n    const actual = falsey.map((object, index) => {\n      try {\n        return index ? size(object as object) : size(undefined);\n      } catch (e) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `arguments` objects', () => {\n    expect(size(args)).toBe(3);\n  });\n\n  // it('should work with jQuery/MooTools DOM query collections', () => {\n  //   function Foo(elements: unknown[]) {\n  //     Array.prototype.push.apply(this, elements);\n  //   }\n  //   Foo.prototype = { length: 0, splice: Array.prototype.splice };\n\n  //   expect(size(new (Foo(array) as unknown as { new (elements?: unknown[] | undefined): object })())).toBe(3);\n  // });\n\n  it('should work with maps', () => {\n    const map = new Map();\n    map.set('a', 1);\n    map.set('b', 2);\n    expect(size(map)).toBe(2);\n    map.clear();\n  });\n\n  it('should work with sets', () => {\n    const set = new Set();\n    set.add(1);\n    set.add(2);\n    expect(size(set)).toBe(2);\n    set.clear();\n  });\n\n  it('should work with strings', () => {\n    const str = 'es-toolkit';\n    expect(size(str)).toBe(10);\n  });\n\n  it('should not treat objects with negative lengths as array-like', () => {\n    expect(size({ length: -1 })).toBe(1);\n  });\n\n  it('should not treat objects with lengths larger than `MAX_SAFE_INTEGER` as array-like', () => {\n    expect(size({ length: Number.MAX_SAFE_INTEGER + 1 })).toBe(1);\n  });\n\n  it('should not treat objects with non-number lengths as array-like', () => {\n    expect(size({ length: '0' })).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(size).toEqualTypeOf<typeof sizeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/size.ts",
    "content": "import { isNil } from '../../predicate/isNil.ts';\n\n/**\n * Returns the length of an array, string, or object.\n *\n * This function takes an array, string, or object and returns its length.\n * For arrays and strings, it returns the number of elements or characters, respectively.\n * For objects, it returns the number of enumerable properties.\n *\n * @template T - The type of the input value.\n * @param {T[] | object | string | Map<unknown, T> | Set<T> | null | undefined } target - The value whose size is to be determined. It can be an array, string, or object.\n * @returns {number} The size of the input value.\n *\n * @example\n * const arr = [1, 2, 3];\n * const arrSize = size(arr);\n * // arrSize will be 3\n *\n * const str = 'hello';\n * const strSize = size(str);\n * // strSize will be 5\n *\n * const obj = { a: 1, b: 2, c: 3 };\n * const objSize = size(obj);\n * // objSize will be 3\n *\n * const emptyArr = [];\n * const emptyArrSize = size(emptyArr);\n * // emptyArrSize will be 0\n *\n * const emptyStr = '';\n * const emptyStrSize = size(emptyStr);\n * // emptyStrSize will be 0\n *\n * const emptyObj = {};\n * const emptyObjSize = size(emptyObj);\n * // emptyObjSize will be 0\n */\nexport function size(collection: object | string | null | undefined): number;\n\nexport function size(target: any): number {\n  if (isNil(target)) {\n    return 0;\n  }\n\n  if (target instanceof Map || target instanceof Set) {\n    return target.size;\n  }\n\n  return Object.keys(target).length;\n}\n"
  },
  {
    "path": "src/compat/array/slice.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { slice as sliceLodash } from 'lodash';\nimport { slice } from './slice';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('slice', () => {\n  const array = [1, 2, 3];\n\n  it('should use a default `start` of `0` and a default `end` of `length`', () => {\n    const actual = slice(array);\n    expect(actual).toEqual(array);\n    expect(actual).not.toBe(array);\n  });\n\n  it('should work with a positive `start`', () => {\n    expect(slice(array, 1)).toEqual([2, 3]);\n    expect(slice(array, 1, 3)).toEqual([2, 3]);\n  });\n\n  it('should work with a `start` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(start => {\n      expect(slice(array, start)).toEqual([]);\n    });\n  });\n\n  it('should treat falsey `start` values as `0`', () => {\n    const expected = falsey.map(() => array);\n\n    const actual = falsey.map(start => slice(array, start as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a negative `start`', () => {\n    expect(slice(array, -1)).toEqual([3]);\n  });\n\n  it('should work with a negative `start` <= negative `length`', () => {\n    [-3, -4, -Infinity].forEach(start => {\n      expect(slice(array, start)).toEqual(array);\n    });\n  });\n\n  it('should work with `start` >= `end`', () => {\n    [2, 3].forEach(start => {\n      expect(slice(array, start, 2)).toEqual([]);\n    });\n  });\n\n  it('should work with a positive `end`', () => {\n    expect(slice(array, 0, 1)).toEqual([1]);\n  });\n\n  it('should work with a `end` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(end => {\n      expect(slice(array, 0, end)).toEqual(array);\n    });\n  });\n\n  it('should treat falsey `end` values, except `undefined`, as `0`', () => {\n    const expected = falsey.map(value => (value === undefined ? array : []));\n\n    const actual = falsey.map((end, index) => (index ? slice(array, 0, end as any) : slice(array, 0)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with a negative `end`', () => {\n    expect(slice(array, 0, -1)).toEqual([1, 2]);\n  });\n\n  it('should work with a negative `end` <= negative `length`', () => {\n    [-3, -4, -Infinity].forEach(end => {\n      expect(slice(array, 0, end)).toEqual([]);\n    });\n  });\n\n  it('should coerce `start` and `end` to integers', () => {\n    const positions = [[0.1, 1.6], ['0', 1], [0, '1'], ['1'], [NaN, 1], [1, NaN]];\n\n    const actual = positions.map(pos => slice(array, ...(pos as any)));\n\n    expect(actual).toEqual([[1], [1], [1], [2, 3], [1], []]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const array = [[1], [2, 3]];\n    const actual = array.map(slice as any);\n\n    expect(actual).toEqual(array);\n    expect(actual).not.toBe(array);\n  });\n\n  it('should not return dense arrays', () => {\n    const emptyArray = new Array(3);\n    emptyArray[1] = 2;\n    const actual = slice(emptyArray);\n    expect('2' in actual).toBe(true);\n  });\n\n  it('should return an empty array when provided `null` or `undefined`', () => {\n    expect(slice(null as any)).toEqual([]);\n    expect(slice(undefined as any)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(slice({ 0: 1, 1: 2, 2: 3, length: 3 })).toEqual([1, 2, 3]);\n    expect(slice('123')).toEqual(['1', '2', '3']);\n    expect(slice(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(slice).toEqualTypeOf<typeof sliceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/slice.ts",
    "content": "import { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Create a slice of `array` from `start` up to, but not including, `end`.\n *\n * It does not return a dense array for sparse arrays unlike the native `Array.prototype.slice`.\n *\n * @template T - The type of the array elements.\n * @param {ArrayLike<T> | null | undefined} array - The array to slice.\n * @param {number} [start=0] - The start position.\n * @param {number} [end=array.length] - The end position.\n * @returns {T[]} - Returns the slice of `array`.\n *\n * @example\n * slice([1, 2, 3], 1, 2); // => [2]\n * slice(new Array(3)); // => [undefined, undefined, undefined]\n */\nexport function slice<T>(array: ArrayLike<T> | null | undefined, start?: number, end?: number): T[] {\n  if (!isArrayLike(array)) {\n    return [];\n  }\n\n  const length = array.length;\n\n  if (end === undefined) {\n    end = length;\n  } else if (typeof end !== 'number' && isIterateeCall(array, start, end)) {\n    // support for expression like `_.map(slice)`\n    start = 0;\n    end = length;\n  }\n\n  start = toInteger(start);\n  end = toInteger(end);\n\n  if (start < 0) {\n    start = Math.max(length + start, 0);\n  } else {\n    start = Math.min(start, length);\n  }\n\n  if (end < 0) {\n    end = Math.max(length + end, 0);\n  } else {\n    end = Math.min(end, length);\n  }\n\n  const resultLength = Math.max(end - start, 0);\n  const result = new Array(resultLength);\n\n  for (let i = 0; i < resultLength; ++i) {\n    result[i] = array[start + i];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/some.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { some as someLodash } from 'lodash';\nimport { some } from './some';\nimport { identity } from '../../function/identity';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('some', () => {\n  it('should return `true` if `predicate` returns truthy for any element', () => {\n    expect(some([false, 1, ''], identity)).toBe(true);\n    expect(some([null, 'a', 0], identity)).toBe(true);\n  });\n\n  it('should return `false` for empty collections', () => {\n    const expected = empties.map(stubFalse);\n\n    const actual = empties.map(value => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        return some(value, identity);\n      } catch (e) {\n        console.log(e);\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `true` as soon as `predicate` returns truthy', () => {\n    let count = 0;\n\n    expect(\n      some([null, true, null], value => {\n        count++;\n        return value;\n      })\n    ).toBe(true);\n\n    expect(count).toBe(2);\n  });\n\n  it('should return `false` if `predicate` returns falsey for all elements', () => {\n    expect(some([false, false, false], identity)).toBe(false);\n    expect(some([null, 0, ''], identity)).toBe(false);\n  });\n\n  it('should use `_.identity` when `predicate` is nullish', () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    let expected = values.map(stubFalse);\n\n    let actual = values.map((value, index) => {\n      const array = [0, 0];\n      return index\n        ? // eslint-disable-next-line\n          // @ts-ignore\n          some(array, value)\n        : some(array);\n    });\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expected = values.map(stubTrue);\n    actual = values.map((value, index) => {\n      const array = [0, 1];\n      return index\n        ? // eslint-disable-next-line\n          // @ts-ignore\n          some(array, value)\n        : some(array);\n    });\n\n    expect(actual).toEqual(expected);\n\n    expected = values.map(stubFalse);\n    actual = values.map((value, index) => {\n      const array = { 0: 0, a: 0 };\n      return index\n        ? // eslint-disable-next-line\n          // @ts-ignore\n          some(array, value)\n        : some(array);\n    });\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expected = values.map(stubTrue);\n    actual = values.map((value, index) => {\n      const array = { 0: 0, a: 1 };\n      return index\n        ? // eslint-disable-next-line\n          // @ts-ignore\n          some(array, value)\n        : some(array);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with matchesProperty shorthands', () => {\n    const objects = [\n      { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n      { a: 0, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    ];\n\n    expect(some(objects, ['a', 0])).toBe(true);\n    expect(some(objects, ['b', 1])).toBe(true);\n    expect(some(objects, ['b', 2])).toBe(false);\n\n    expect(some(objects, [0, 1])).toBe(true);\n    expect(some(objects, [Symbol.for('a'), 1])).toBe(true);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [\n      { a: 0, b: 0, 0: 0, [Symbol.for('a')]: 0 },\n      { a: 0, b: 1, 0: 1, [Symbol.for('a')]: 1 },\n    ];\n    expect(some(objects, 'a')).toBe(false);\n    expect(some(objects, 'b')).toBe(true);\n\n    expect(some(objects, 0)).toBe(true);\n    expect(some(objects, '')).toBe(false);\n    expect(some(objects, Symbol.for('a'))).toBe(true);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    const objects = [\n      { a: 0, b: 0 },\n      { a: 1, b: 1 },\n    ];\n    expect(some(objects, { a: 0 })).toBe(true);\n    expect(some(objects, { b: 2 })).toBe(false);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const actual = [[1]].map(some);\n    expect(actual).toEqual([true]);\n  });\n\n  it('should return true for object with one value passing the predicate', () => {\n    expect(some({ a: 1, b: 2, c: 3 }, value => value >= 3)).toBe(true);\n  });\n\n  it('should return false for object with all values failing the predicate', () => {\n    expect(some({ a: 1, b: 2, c: 3 }, value => value > 3)).toBe(false);\n  });\n\n  it('should return true for object with one value matching the partial', () => {\n    expect(\n      some(\n        { a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } },\n        {\n          name: 'Bob',\n        }\n      )\n    ).toBe(true);\n  });\n\n  it('should return true for object with one value matching the property', () => {\n    expect(some({ a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } }, 'name')).toBe(true);\n  });\n\n  it('should return true for object with one value matching the property and value', () => {\n    expect(some({ a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } }, ['name', 'Bob'])).toBe(true);\n  });\n\n  it('should return false for empty object', () => {\n    const result = some({}, () => false);\n    expect(result).toBe(false);\n  });\n\n  it('should return false when provided `null` or `undefined`', () => {\n    expect(some(null, identity)).toBe(false);\n    expect(some(undefined, identity)).toBe(false);\n  });\n\n  it('should support array-like objects', () => {\n    expect(some({ 0: 'a', 1: 'b', length: 2 }, value => value === 'b')).toBe(true);\n    expect(some('123', value => value === '3')).toBe(true);\n    expect(some(args, value => value === 1)).toBe(true);\n  });\n\n  it('should handle sparse arrays correctly', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const sparseArray = [1, , 3, , 5] as any[];\n\n    expect(some(sparseArray, value => value > 0)).toEqual(true);\n    expect(some(sparseArray, value => value === undefined)).toEqual(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(some).toEqualTypeOf<typeof someLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/some.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { ListIterateeCustom } from '../_internal/ListIterateeCustom.ts';\nimport { ObjectIterateeCustom } from '../_internal/ObjectIteratee.ts';\nimport { property } from '../object/property.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Checks if predicate returns truthy for any element of collection.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {ListIterateeCustom<T, boolean>} [predicate] - The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n *\n * @example\n * some([null, 0, 'yes', false], Boolean);\n * // => true\n */\nexport function some<T>(\n  collection: ArrayLike<T> | null | undefined,\n  predicate?: ListIterateeCustom<T, boolean>\n): boolean;\n\n/**\n * Checks if predicate returns truthy for any element of collection.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {ObjectIterateeCustom<T, boolean>} [predicate] - The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n *\n * @example\n * some({ 'a': 0, 'b': 1, 'c': 0 }, function(n) { return n > 0; });\n * // => true\n */\nexport function some<T extends object>(\n  collection: T | null | undefined,\n  predicate?: ObjectIterateeCustom<T, boolean>\n): boolean;\n\n/**\n * Checks if there is an element in an array that matches the given predicate.\n *\n * Iteration is stopped once there is an element that matches `predicate`.\n *\n * @template T\n * @param {ArrayLike<T> | Record<string, any> | null | undefined} source The source to iterate over.\n * @param {((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate=identity] The function invoked per iteration.\n * If a property name or an object is provided it will be used to create a predicate function.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n *\n * @example\n * some([1, 2, 3, 4], n => n % 2 === 0);\n * // => true\n *\n * some([{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2 });\n * // => true\n *\n * some([{ a: 1 }, { a: 2 }, { a: 3 }], ['a', 2]);\n * // => true\n *\n * some([{ a: 1 }, { a: 2 }, { a: 3 }], 'a');\n * // => true\n *\n * some({ a: 1, b: 2, c: 3 }, n => n % 2 === 0);\n * // => true\n *\n * some({ a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } }, { name: 'Bob' });\n * // => true\n *\n * some({ a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } }, ['name', 'Alice']);\n * // => true\n *\n * some({ a: { id: 1, name: 'Alice' }, b: { id: 2, name: 'Bob' } }, 'name');\n * // => true\n */\nexport function some<T>(\n  source: ArrayLike<T> | Record<any, any> | null | undefined,\n  predicate?: ((item: T, index: number, arr: any) => unknown) | Partial<T> | [keyof T, unknown] | PropertyKey,\n  guard?: unknown\n): boolean {\n  if (!source) {\n    return false;\n  }\n  if (guard != null) {\n    predicate = undefined;\n  }\n\n  if (predicate == null) {\n    predicate = identity;\n  }\n\n  const values = Array.isArray(source) ? source : Object.values(source);\n\n  switch (typeof predicate) {\n    case 'function': {\n      if (!Array.isArray(source)) {\n        const keys = Object.keys(source) as Array<keyof T>;\n\n        for (let i = 0; i < keys.length; i++) {\n          const key = keys[i];\n          const value = source[key];\n\n          if (predicate(value as T, key as number, source)) {\n            return true;\n          }\n        }\n\n        return false;\n      }\n\n      for (let i = 0; i < source.length; i++) {\n        if (predicate(source[i] as T, i, source)) {\n          return true;\n        }\n      }\n      return false;\n    }\n    case 'object': {\n      if (Array.isArray(predicate) && predicate.length === 2) {\n        const key = predicate[0];\n        const value = predicate[1];\n\n        const matchFunc = matchesProperty(key, value);\n        if (Array.isArray(source)) {\n          for (let i = 0; i < source.length; i++) {\n            if (matchFunc(source[i])) {\n              return true;\n            }\n          }\n          return false;\n        }\n        return values.some(matchFunc);\n      } else {\n        const matchFunc = matches(predicate);\n        if (Array.isArray(source)) {\n          for (let i = 0; i < source.length; i++) {\n            if (matchFunc(source[i])) {\n              return true;\n            }\n          }\n          return false;\n        }\n        return values.some(matchFunc);\n      }\n    }\n    case 'number':\n    case 'symbol':\n    case 'string': {\n      const propFunc = property(predicate);\n      if (Array.isArray(source)) {\n        for (let i = 0; i < source.length; i++) {\n          if (propFunc(source[i])) {\n            return true;\n          }\n        }\n        return false;\n      }\n      return values.some(propFunc);\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/array/sortBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortBy as sortByLodash } from 'lodash';\nimport { sortBy } from './sortBy.ts';\nimport { zipObject } from '../../array/zipObject.ts';\nimport { partialRight } from '../../function/partialRight.ts';\n\ndescribe('sortBy', () => {\n  class Pair {\n    constructor(\n      public a: number | undefined,\n      public b: number,\n      public c: number\n    ) {\n      this.a = a;\n      this.b = b;\n      this.c = c;\n    }\n  }\n  const objects = [\n    { a: 'x', b: 3 },\n    { a: 'y', b: 4 },\n    { a: 'x', b: 1 },\n    { a: 'y', b: 2 },\n  ];\n\n  const stableArray = [\n    new Pair(1, 1, 1),\n    new Pair(1, 2, 1),\n    new Pair(1, 1, 1),\n    new Pair(1, 2, 1),\n    new Pair(1, 3, 1),\n    new Pair(1, 4, 1),\n    new Pair(1, 5, 1),\n    new Pair(1, 6, 1),\n    new Pair(2, 1, 2),\n    new Pair(2, 2, 2),\n    new Pair(2, 3, 2),\n    new Pair(2, 4, 2),\n    new Pair(2, 5, 2),\n    new Pair(2, 6, 2),\n    new Pair(undefined, 1, 1),\n    new Pair(undefined, 2, 1),\n    new Pair(undefined, 3, 1),\n    new Pair(undefined, 4, 1),\n    new Pair(undefined, 5, 1),\n    new Pair(undefined, 6, 1),\n  ];\n\n  const stableObject = zipObject('abcdefghijklmnopqrst'.split(''), stableArray);\n\n  it(`should sort multiple properties in ascending order`, () => {\n    const actual = sortBy(objects, ['a', 'b']);\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n    expect(sortBy(objects, 'a', 'b')).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n  });\n\n  it(`should support iteratees`, () => {\n    const actual = sortBy(objects, [\n      'a',\n      function (object) {\n        return object.b;\n      },\n    ]);\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n    expect(sortBy(objects, 'a', object => object.b)).toEqual([objects[2], objects[0], objects[3], objects[1]]);\n  });\n\n  it(`should perform a stable sort (test in IE > 8 and V8)`, () => {\n    expect(sortBy(stableArray, ['a', 'c'])).toEqual(stableArray);\n    expect(sortBy(stableArray, 'a', 'c')).toEqual(stableArray);\n    expect(sortBy(stableObject, ['a', 'c'])).toEqual(stableArray);\n    expect(sortBy(stableObject, 'a', 'c')).toEqual(stableArray);\n  });\n\n  it(`should not error on nullish elements`, () => {\n    let actual;\n    try {\n      actual = sortBy([...objects, null, undefined], ['a', 'b']);\n    } catch {\n      // do nothing\n    }\n\n    expect(actual).toEqual([objects[2], objects[0], objects[3], objects[1], null, undefined]);\n    expect(sortBy([...objects, null, undefined], 'a', 'b')).toEqual([\n      objects[2],\n      objects[0],\n      objects[3],\n      objects[1],\n      null,\n      undefined,\n    ]);\n  });\n\n  it(`should work as an iteratee for methods like \\`_.reduce\\``, () => {\n    const objects = [\n      { a: 'x', 0: 3 },\n      { a: 'y', 0: 4 },\n      { a: 'x', 0: 1 },\n      { a: 'y', 0: 2 },\n    ];\n\n    expect(['a'].reduce(sortBy, objects)).toEqual([objects[0], objects[2], objects[1], objects[3]]);\n    expect([0].reduce(sortBy, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n    expect([[0]].reduce(sortBy, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n\n    const wrapped = partialRight(sortBy, 'bogus');\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(['a'].reduce(wrapped, objects)).toEqual([objects[0], objects[2], objects[1], objects[3]]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect([0].reduce(wrapped, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect([[0]].reduce(wrapped, objects)).toEqual([objects[2], objects[3], objects[0], objects[1]]);\n  });\n\n  it('should sort in ascending order by `iteratee`', () => {\n    expect(sortBy(objects, object => object.b).map(object => object.b)).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const array = [3, 2, 1];\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => [1, 2, 3]);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? sortBy(array, value) : sortBy(array)));\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortBy({ ...objects, undefined }, 'b').map(object => object?.b)).toEqual([1, 2, 3, 4, undefined]);\n  });\n\n  it('should work with an object for `collection`', () => {\n    expect(sortBy({ a: 1, b: 2, c: 3 }, Math.sin)).toEqual([3, 1, 2]);\n  });\n\n  it('should move `NaN`, nullish, and symbol values to the end', () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const array = [NaN, undefined, null, 4, symbol1, null, 1, symbol2, undefined, 3, NaN, 2];\n    const expected = [1, 2, 3, 4, symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];\n\n    expect(sortBy(array)).toEqual(expected);\n    expect(sortBy(array, [])).toEqual(expected);\n\n    const array2 = [NaN, undefined, symbol1, null, 'd', null, 'a', symbol2, undefined, 'c', NaN, 'b'];\n    const expected2 = ['a', 'b', 'c', 'd', symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];\n\n    expect(sortBy(array2)).toEqual(expected2);\n    expect(sortBy(array2, [])).toEqual(expected2);\n  });\n\n  it('should treat number values for `collection` as empty', () => {\n    expect(sortBy(1 as any)).toEqual([]);\n  });\n\n  it('should coerce arrays returned from `iteratee`', () => {\n    const actual = sortBy(objects, object => {\n      const result = [object.a, object.b];\n      result.toString = function () {\n        return String(this[0]);\n      };\n      return result;\n    });\n\n    expect(actual).toEqual([objects[0], objects[2], objects[1], objects[3]]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect(\n      [\n        [2, 1, 3],\n        [3, 2, 1],\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n      ].map(sortBy)\n    ).toEqual([\n      [1, 2, 3],\n      [1, 2, 3],\n    ]);\n  });\n\n  it('should compare strings with ASCII code', () => {\n    expect(sortBy(['A', 'a'])).toEqual(['A', 'a']);\n    expect(sortBy(['ABC', 'abc'])).toEqual(['ABC', 'abc']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortBy).toEqualTypeOf<typeof sortByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortBy.ts",
    "content": "import { orderBy } from './orderBy.ts';\nimport { flatten } from '../../array/flatten.ts';\nimport { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { ObjectIteratee } from '../_internal/ObjectIteratee.ts';\n\n/**\n * Sorts an array of objects based on multiple properties and their corresponding order directions.\n *\n * This function takes an array of objects, an array of criteria to sort by.\n * It returns the ascending sorted array, ordering by each key.\n * If values for a key are equal, it moves to the next key to determine the order.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | object | null | undefined} collection - The array of objects to be sorted.\n * @param {Array<Array<Criterion<T> | Criterion<T>>>} criteria - An array of criteria (property names or property paths or custom key functions) to sort by.\n * @returns {T[]} - The ascending sorted array.\n *\n * @example\n * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.\n * const users = [\n *   { user: 'fred', age: 48 },\n *   { user: 'barney', age: 34 },\n *   { user: 'fred', age: 40 },\n *   { user: 'barney', age: 36 },\n * ];\n * const result = sortBy(users, ['user', (item) => item.age])\n * // result will be:\n * // [\n * //   { user: 'barney', age: 34 },\n * //   { user: 'barney', age: 36 },\n * //   { user: 'fred', age: 40 },\n * //   { user: 'fred', age: 48 },\n * // ]\n */\n/**\n * Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} collection - The collection to iterate over.\n * @param {...Array<T | readonly T[] | ListIteratee<T>>} iteratees - The iteratees to sort by.\n * @returns {T[]} Returns the new sorted array.\n *\n * @example\n * const users = [\n *   { 'user': 'fred',   'age': 48 },\n *   { 'user': 'barney', 'age': 36 },\n *   { 'user': 'fred',   'age': 42 },\n *   { 'user': 'barney', 'age': 34 }\n * ];\n *\n * sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n */\nexport function sortBy<T>(collection: ArrayLike<T> | null | undefined, ...iteratees: Array<Many<ListIteratee<T>>>): T[];\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee.\n *\n * @template T\n * @param {T | null | undefined} collection - The object to iterate over.\n * @param {...Array<T[keyof T] | readonly Array<T[keyof T]> | ObjectIteratee<T>>} iteratees - The iteratees to sort by.\n * @returns {Array<T[keyof T]>} Returns the new sorted array.\n *\n * @example\n * const users = {\n *   'a': { 'user': 'fred',   'age': 48 },\n *   'b': { 'user': 'barney', 'age': 36 }\n * };\n *\n * sortBy(users, [function(o) { return o.user; }]);\n * // => [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 48 }]\n */\nexport function sortBy<T extends object>(\n  collection: T | null | undefined,\n  ...iteratees: Array<Many<ObjectIteratee<T>>>\n): Array<T[keyof T]>;\n\nexport function sortBy<T = any>(collection: ArrayLike<T> | object | null | undefined, ...criteria: any[]): T[] {\n  const length = criteria.length;\n  // Enables use as an iteratee for methods like `_.reduce` and `_.map`.\n  if (length > 1 && isIterateeCall(collection, criteria[0], criteria[1])) {\n    criteria = [];\n  } else if (length > 2 && isIterateeCall(criteria[0], criteria[1], criteria[2])) {\n    criteria = [criteria[0]];\n  }\n  return orderBy(collection, flatten(criteria), ['asc']);\n}\n"
  },
  {
    "path": "src/compat/array/sortedIndex.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedIndex as sortedIndexLodash } from 'lodash';\nimport { sortBy } from './sortBy.ts';\nimport { sortedIndex } from './sortedIndex.ts';\n\ndescribe('sortedIndex', () => {\n  it(`should return the correct insert index`, () => {\n    const array = [30, 50];\n    const values = [30, 40, 50];\n    const expected = [0, 1, 1];\n\n    const actual = values.map(value => sortedIndex(array, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with an array of strings`, () => {\n    const array = ['a', 'c'];\n    const values = ['a', 'b', 'c'];\n    const expected = [0, 1, 1];\n\n    const actual = values.map(value => sortedIndex(array, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should handle nullish 'array' and a 'value'`, () => {\n    const values = [null, undefined];\n    const expected = values.map(() => [0, 0, 0]);\n\n    const actual = values.map(array => [\n      sortedIndex(array as any, 1),\n      sortedIndex(array as any, undefined),\n      sortedIndex(array as any, NaN),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should align with 'sortBy' for various data types`, () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const symbol3 = Symbol ? Symbol('c') : null;\n\n    const expected = [1, '2', {}, symbol1, symbol2, null, undefined, NaN, NaN];\n\n    const array = [NaN, symbol1, null, 1, '2', {}, symbol2, NaN, undefined];\n\n    expect(sortBy(array)).toEqual(expected);\n    expect(sortedIndex(expected, 3)).toBe(2);\n    expect(sortedIndex(expected, symbol3)).toBe(3);\n    expect(sortedIndex(expected, null)).toBe(5);\n    expect(sortedIndex(expected, undefined)).toBe(6);\n    expect(sortedIndex(expected, NaN)).toBe(7);\n  });\n\n  it(`should handle arrays with nulls`, () => {\n    const array = [null, null];\n\n    expect(sortedIndex(array, null)).toBe(0);\n    expect(sortedIndex(array, 1)).toBe(0);\n    expect(sortedIndex(array, 'a')).toBe(0);\n  });\n\n  it(`should handle arrays with symbols`, () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const symbol3 = Symbol ? Symbol('c') : null;\n    const array = [symbol1, symbol2];\n\n    expect(sortedIndex(array, symbol3)).toBe(0);\n    expect(sortedIndex(array, 1 as unknown as symbol)).toBe(0);\n    expect(sortedIndex(array, 'a' as unknown as symbol)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedIndex).toEqualTypeOf<typeof sortedIndexLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedIndex.ts",
    "content": "import { sortedIndexBy } from './sortedIndexBy.ts';\nimport { isNil } from '../../predicate/isNil.ts';\nimport { isNull } from '../../predicate/isNull.ts';\nimport { isSymbol } from '../../predicate/isSymbol.ts';\nimport { isNumber } from '../predicate/isNumber.ts';\n\nconst MAX_ARRAY_LENGTH = 4294967295;\nconst HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @category Array\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n * sortedIndex([30, 50], 40)\n * // => 1\n */\nexport function sortedIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number;\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @category Array\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n * sortedIndex([30, 50], 40)\n * // => 1\n */\nexport function sortedIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number;\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @category Array\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n * sortedIndex([30, 50], 40)\n * // => 1\n */\nexport function sortedIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number {\n  if (isNil(array)) {\n    return 0;\n  }\n\n  let low = 0;\n  let high = array.length;\n\n  if (isNumber(value) && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n    while (low < high) {\n      const mid = (low + high) >>> 1;\n      const compute = array[mid];\n      if (!isNull(compute) && !isSymbol(compute) && (compute as any) < value) {\n        low = mid + 1;\n      } else {\n        high = mid;\n      }\n    }\n    return high;\n  }\n  return sortedIndexBy(array, value, value => value);\n}\n"
  },
  {
    "path": "src/compat/array/sortedIndexBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedIndexBy as sortedIndexByLodash } from 'lodash';\nimport { sortedIndexBy } from './sortedIndexBy';\n\ndescribe('sortedIndexBy', () => {\n  it('should provide correct `iteratee` arguments', () => {\n    let args: unknown[];\n\n    sortedIndexBy([30, 50], 40, function (value) {\n      args = args || [value];\n    });\n    // @ts-expect-error Variable 'args' is used before being assigned.ts(2454)\n    expect(args).toEqual([40]);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ x: 30 }, { x: 50 }];\n    const actual = sortedIndexBy(objects, { x: 40 }, 'x');\n\n    expect(actual).toBe(1);\n  });\n\n  it('should avoid calling iteratee when length is 0', () => {\n    const objects: Array<{ x: number }> = [];\n    const actual = sortedIndexBy(objects, { x: 50 }, () => {\n      throw new Error('Iteratee should not be called');\n    });\n\n    expect(actual).toBe(0);\n  });\n\n  it('should support arrays larger than `MAX_ARRAY_LENGTH / 2`', () => {\n    const MAX_ARRAY_LENGTH = 4294967295;\n    const MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n    const testLengths = [Math.ceil(MAX_ARRAY_LENGTH / 2), MAX_ARRAY_LENGTH];\n\n    testLengths.forEach(length => {\n      const array: number[] = [];\n      const values = [MAX_ARRAY_LENGTH, NaN, undefined];\n\n      array.length = length;\n\n      values.forEach(value => {\n        let steps = 0;\n\n        const actual = sortedIndexBy(array, value, v => {\n          steps++;\n          return v;\n        });\n\n        const expected = !Number.isNaN(value) ? 0 : Math.min(length, MAX_ARRAY_INDEX);\n\n        // Check if steps are within expected bounds\n        expect(steps).toBeGreaterThanOrEqual(32);\n        expect(steps).toBeLessThanOrEqual(33);\n        expect(actual).toBe(expected);\n      });\n    });\n  });\n\n  it('should use default iteratee (identity function) when no iteratee is provided', () => {\n    const numbers = [10, 30, 50];\n    const actual = sortedIndexBy(numbers, 40);\n    expect(actual).toBe(2);\n\n    const strings = ['apple', 'cherry'];\n    const actualString = sortedIndexBy(strings, 'banana');\n    expect(actualString).toBe(1);\n  });\n\n  it('should return 0 when array is null or undefined', () => {\n    expect(sortedIndexBy(null, 1)).toBe(0);\n    expect(sortedIndexBy(undefined, 1)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedIndexBy).toEqualTypeOf<typeof sortedIndexByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedIndexBy.ts",
    "content": "import { isNull } from '../../predicate/isNull.ts';\nimport { isUndefined } from '../../predicate/isUndefined.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { identity } from '../function/identity.ts';\nimport { isNaN } from '../predicate/isNaN.ts';\nimport { isNil } from '../predicate/isNil.ts';\nimport { isSymbol } from '../predicate/isSymbol.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\ntype PropertyName = string | number | symbol;\ntype Iteratee<T, R> = ((value: T) => R) | PropertyName | [PropertyName, any] | Partial<T>;\n\nconst MAX_ARRAY_LENGTH = 4294967295;\nconst MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n\n/**\n * This method is like `sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The sorted array to inspect.\n * @param {T} value - The value to evaluate.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n *\n * @example\n * const dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };\n * sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));\n * // => 1\n *\n * @example\n * sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');\n * // => 0\n */\nexport function sortedIndexBy<T>(array: ArrayLike<T> | null | undefined, value: T, iteratee?: ValueIteratee<T>): number;\n\n/**\n * This method is like `sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @param {(value: T) => R | PropertyName | [PropertyName, any] | Partial<T>} iteratee The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n * const objects = [{ 'n': 4 }, { 'n': 5 }]\n * sortedIndexBy(objects, { 'n': 4 }, ({ n }) => n)\n * // => 0\n */\nexport function sortedIndexBy<T, R>(\n  array: ArrayLike<T> | null | undefined,\n  value: T,\n  iteratee: Iteratee<T, R> = identity,\n  retHighest?: boolean\n): number {\n  if (isNil(array) || array.length === 0) {\n    return 0;\n  }\n\n  let low = 0;\n  let high = array.length;\n\n  const iterateeFunction = iterateeToolkit(iteratee);\n  const transformedValue = iterateeFunction(value);\n\n  const valIsNaN = isNaN(transformedValue);\n  const valIsNull = isNull(transformedValue);\n  const valIsSymbol = isSymbol(transformedValue);\n  const valIsUndefined = isUndefined(transformedValue);\n\n  while (low < high) {\n    let setLow: boolean;\n    const mid = Math.floor((low + high) / 2);\n    const computed = iterateeFunction(array[mid]);\n\n    const othIsDefined = !isUndefined(computed);\n    const othIsNull = isNull(computed);\n    const othIsReflexive = !isNaN(computed);\n    const othIsSymbol = isSymbol(computed);\n\n    if (valIsNaN) {\n      setLow = retHighest || othIsReflexive;\n    } else if (valIsUndefined) {\n      setLow = othIsReflexive && (retHighest || othIsDefined);\n    } else if (valIsNull) {\n      setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n    } else if (valIsSymbol) {\n      setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n    } else if (othIsNull || othIsSymbol) {\n      setLow = false;\n    } else {\n      setLow = retHighest ? computed! <= transformedValue : computed! < transformedValue;\n    }\n\n    if (setLow) {\n      low = mid + 1;\n    } else {\n      high = mid;\n    }\n  }\n\n  return Math.min(high, MAX_ARRAY_INDEX);\n}\n"
  },
  {
    "path": "src/compat/array/sortedIndexOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedIndexOf as sortedIndexOfLodash } from 'lodash';\nimport { sortedIndexOf } from './sortedIndexOf';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('sortedIndexOf', () => {\n  //--------------- Lodash Test Case #1 -------------------\n  it('should perform a binary search', () => {\n    const array = [4, 4, 5, 5, 5, 6, 6];\n    expect(sortedIndexOf(array, 5)).toBe(2);\n  });\n\n  //--------------- Lodash Test Case #2 -------------------\n  it(`should accept a falsey \\`array\\``, () => {\n    const expected = falsey.map(() => -1);\n\n    const actual = falsey.map((array, index) => {\n      try {\n        // @ts-expect-error - Testing with falsey values\n        return index === 0 ? sortedIndexOf(array, 1) : sortedIndexOf();\n      } catch (e) {\n        return;\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`-1\\` for an unmatched value`, () => {\n    const array = [1, 2, 3];\n    const empty: unknown[] = [];\n\n    expect(sortedIndexOf(array, 4)).toBe(-1);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortedIndexOf(array, 4, true)).toBe(-1);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortedIndexOf(array, undefined, true)).toBe(-1);\n\n    expect(sortedIndexOf(empty, undefined)).toBe(-1);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortedIndexOf(empty, undefined, true)).toBe(-1);\n  });\n\n  it(`should not match values on empty arrays`, () => {\n    const array = [];\n    array[-1] = 0;\n\n    expect(sortedIndexOf(array, undefined)).toBe(-1);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortedIndexOf(array, 0, true)).toBe(-1);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    const sortedArray = [1, 2, NaN, NaN];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(sortedIndexOf(sortedArray, NaN, true)).toBe(2);\n  });\n\n  it(`should match \\`-0\\` as \\`0\\``, () => {\n    expect(sortedIndexOf([-0], 0)).toBe(0);\n    expect(sortedIndexOf([0], -0)).toBe(0);\n  });\n\n  //--------------- Additional Test Case ---------------\n  // Floating point handling\n  it('should handle floating point numbers', () => {\n    const array = [1.1, 2.2, 3.3];\n    expect(sortedIndexOf(array, 2.2)).toBe(1);\n  });\n\n  // Type strict checking\n  it('should differentiate string and number types', () => {\n    const array = ['4', '5', '5'];\n    expect(sortedIndexOf(array, '5')).toBe(1);\n  });\n\n  //NaN values in unsorted array\n  it('should not handle array with NaN Searching Number', () => {\n    const array = [NaN, 2, NaN, 3, 4];\n    expect(sortedIndexOf(array, 3)).toBe(-1);\n  });\n\n  // Null/undefined handling\n  it('should handle null values', () => {\n    const array = [null, null, 3];\n    expect(sortedIndexOf(array, null)).toBe(0);\n    expect(sortedIndexOf(array, 3)).toBe(-1);\n  });\n\n  it('should handle undefined values', () => {\n    const array = [undefined, undefined, 1];\n    expect(sortedIndexOf(array, undefined)).toBe(0);\n    expect(sortedIndexOf(array, 1)).toBe(-1);\n  });\n\n  it('should handle NAN values', () => {\n    const array = [0, 1, NaN, NaN, NaN, 3];\n    expect(sortedIndexOf(array, NaN)).toBe(2);\n    expect(sortedIndexOf(array, 0)).toBe(0);\n  });\n\n  // Symbol handling\n  it('should handle Symbol values correctly', () => {\n    const sym = Symbol('test');\n    const array = [sym, sym, Symbol('test2')];\n    expect(sortedIndexOf(array, sym)).toBe(0);\n\n    const uniqueSym = Symbol('unique');\n    expect(sortedIndexOf(array, uniqueSym)).toBe(-1);\n  });\n\n  it('should strictly compare types', () => {\n    expect(sortedIndexOf(['5', 5], 5)).toBe(-1);\n    expect(sortedIndexOf([0, false, 1], 1)).toBe(2);\n  });\n\n  // Array-like objects\n  it('should handle array-like objects', () => {\n    const arrayLike = {\n      length: 3,\n      0: 1,\n      1: 3,\n      2: 5,\n    };\n    expect(sortedIndexOf(arrayLike, 3)).toBe(1);\n    expect(sortedIndexOf(arrayLike, 4)).toBe(-1);\n  });\n\n  // Unsorted arrays\n  it('should return -1 for unsorted arrays', () => {\n    const unsortedArray = [5, 2, 7, 1];\n    expect(sortedIndexOf(unsortedArray, 2)).toBe(-1);\n  });\n\n  // Mixed types\n  it('should handle mixed types with undefined correctly', () => {\n    const arr = [undefined, null, Symbol('test'), 1];\n    expect(sortedIndexOf(arr, null)).toBe(-1);\n    expect(sortedIndexOf(arr, undefined)).toBe(-1);\n    expect(sortedIndexOf(arr, Symbol('test'))).toBe(-1);\n  });\n\n  // Mixed types ver2\n  it('should handle mixed types with midVal is NaN correctly', () => {\n    const arr = [undefined, null, NaN, Symbol('test'), 1];\n    expect(sortedIndexOf(arr, null)).toBe(-1);\n    expect(sortedIndexOf(arr, undefined)).toBe(-1);\n    expect(sortedIndexOf(arr, NaN)).toBe(2);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedIndexOf).toEqualTypeOf<typeof sortedIndexOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedIndexOf.ts",
    "content": "import { sortedIndex } from './sortedIndex.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Finds the index of the first occurrence of a value in a sorted array, similar to how `Array#indexOf` works, but specifically for sorted arrays.\n *\n * Make sure to provide a sorted array to this function, as it uses a binary search to quickly find the index.\n *\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to search for.\n * @returns {number} Returns the index of the matched value, else -1.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * sortedIndexOf(numbers, 11); // Return value: 0\n * sortedIndexOf(numbers, 30); // Return value: -1\n *\n * // If the value is duplicated, it returns the first index of the value.\n * const duplicateNumbers = [1, 2, 2, 3, 3, 3, 4];\n * sortedIndexOf(duplicateNumbers, 3); // Return value: 3\n *\n * // If the array is unsorted, it can return the wrong index.\n * const unSortedArray = [55, 33, 22, 11, 44];\n * sortedIndexOf(unSortedArray, 11); // Return value: -1\n *\n * // -0 and 0 are treated the same\n * const mixedZeroArray = [-0, 0];\n * sortedIndexOf(mixedZeroArray, 0); // Return value: 0\n * sortedIndexOf(mixedZeroArray, -0); // Return value: 0\n *\n * // It works with array-like objects\n * const arrayLike = { length: 3, 0: 10, 1: 20, 2: 30 };\n * sortedIndexOf(arrayLike, 20); // Return value: 1\n */\nexport function sortedIndexOf<T>(array: ArrayLike<T> | null | undefined, value: T): number {\n  if (!array?.length) {\n    return -1;\n  }\n\n  const index = sortedIndex(array, value);\n  if (index < array.length && eq(array[index], value)) {\n    return index;\n  }\n  return -1;\n}\n"
  },
  {
    "path": "src/compat/array/sortedLastIndex.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedLastIndex as sortedLastIndexLodash } from 'lodash';\nimport { sortBy } from './sortBy.ts';\nimport { sortedLastIndex } from './sortedLastIndex.ts';\n\ndescribe('sortedLastIndex', () => {\n  it(`should return the correct insert index`, () => {\n    const array = [30, 50];\n    const values = [30, 40, 50];\n    const expected = [1, 1, 2];\n\n    const actual = values.map(value => sortedLastIndex(array, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with an array of strings`, () => {\n    const array = ['a', 'c'];\n    const values = ['a', 'b', 'c'];\n    const expected = [1, 1, 2];\n\n    const actual = values.map(value => sortedLastIndex(array, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should handle nullish 'array' and a 'value'`, () => {\n    const values = [null, undefined];\n    const expected = values.map(() => [0, 0, 0]);\n\n    const actual = values.map(array => [\n      sortedLastIndex(array as any, 1),\n      sortedLastIndex(array as any, undefined),\n      sortedLastIndex(array as any, NaN),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should align with 'sortBy' for various data types`, () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const symbol3 = Symbol ? Symbol('c') : null;\n\n    const expected = [1, '2', {}, symbol1, symbol2, null, undefined, NaN, NaN];\n\n    const array1 = [NaN, symbol1, null, 1, '2', {}, symbol2, NaN, undefined];\n    const array2 = ['2', null, 1, symbol1, NaN, {}, NaN, symbol2, undefined];\n    expect(sortBy(array1)).toEqual(expected);\n    expect(sortBy(array2)).toEqual(expected);\n    expect(sortedLastIndex(expected, 3)).toBe(2);\n    expect(sortedLastIndex(expected, symbol3)).toBe(5);\n    expect(sortedLastIndex(expected, null)).toBe(6);\n    expect(sortedLastIndex(expected, undefined)).toBe(7);\n    expect(sortedLastIndex(expected, NaN)).toBe(9);\n  });\n\n  it(`should handle arrays with nulls`, () => {\n    const array = [null, null];\n\n    expect(sortedLastIndex(array, null)).toBe(2);\n    expect(sortedLastIndex(array, 1)).toBe(0);\n    expect(sortedLastIndex(array, 'a')).toBe(0);\n  });\n\n  it(`should handle arrays with symbols`, () => {\n    const symbol1 = Symbol ? Symbol('a') : null;\n    const symbol2 = Symbol ? Symbol('b') : null;\n    const symbol3 = Symbol ? Symbol('c') : null;\n    const array = [symbol1, symbol2];\n\n    expect(sortedLastIndex(array, symbol3)).toBe(2);\n    expect(sortedLastIndex(array, 1 as unknown as symbol)).toBe(0);\n    expect(sortedLastIndex(array, 'a' as unknown as symbol)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedLastIndex).toEqualTypeOf<typeof sortedLastIndexLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedLastIndex.ts",
    "content": "import { sortedLastIndexBy } from './sortedLastIndexBy.ts';\nimport { isNil } from '../../predicate/isNil.ts';\nimport { isNull } from '../../predicate/isNull.ts';\nimport { isSymbol } from '../../predicate/isSymbol.ts';\nimport { isNumber } from '../predicate/isNumber.ts';\n\nconst MAX_ARRAY_LENGTH = 4294967295;\nconst HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n/**\n * Uses a binary search to determine the highest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @category Array\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n * sortedIndex([4, 5, 5, 5, 6], 5)\n * // => 4\n */\nexport function sortedLastIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number {\n  if (isNil(array)) {\n    return 0;\n  }\n\n  let high = array.length;\n\n  if (!isNumber(value) || Number.isNaN(value) || high > HALF_MAX_ARRAY_LENGTH) {\n    return sortedLastIndexBy(array, value, value => value);\n  }\n\n  let low = 0;\n\n  while (low < high) {\n    const mid = (low + high) >>> 1;\n    const compute = array[mid];\n    if (!isNull(compute) && !isSymbol(compute) && (compute as any) <= value) {\n      low = mid + 1;\n    } else {\n      high = mid;\n    }\n  }\n\n  return high;\n}\n"
  },
  {
    "path": "src/compat/array/sortedLastIndexBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedLastIndexBy as sortedLastIndexByLodash } from 'lodash';\nimport { sortedLastIndexBy } from './sortedLastIndexBy';\n\ndescribe('sortedLastIndexBy', () => {\n  it('should provide correct `iteratee` arguments', () => {\n    let args: unknown[];\n\n    sortedLastIndexBy([30, 50], 40, function (value) {\n      args = args || [value];\n    });\n    // @ts-expect-error Variable 'args' is used before being assigned.ts(2454)\n    expect(args).toEqual([40]);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ x: 30 }, { x: 50 }];\n    const actual = sortedLastIndexBy(objects, { x: 40 }, 'x');\n\n    expect(actual).toBe(1);\n  });\n\n  it('should avoid calling iteratee when length is 0', () => {\n    const objects: Array<{ x: number }> = [];\n    const actual = sortedLastIndexBy(objects, { x: 50 }, () => {\n      throw new Error('Iteratee should not be called');\n    });\n\n    expect(actual).toBe(0);\n  });\n\n  it('should support arrays larger than `MAX_ARRAY_LENGTH / 2`', () => {\n    const MAX_ARRAY_LENGTH = 4294967295;\n    const MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n    const testLengths = [Math.ceil(MAX_ARRAY_LENGTH / 2), MAX_ARRAY_LENGTH];\n\n    testLengths.forEach(length => {\n      const array: number[] = [];\n      const values = [MAX_ARRAY_LENGTH, NaN, undefined];\n\n      array.length = length;\n\n      values.forEach(value => {\n        let steps = 0;\n\n        const actual = sortedLastIndexBy(array, value, v => {\n          steps++;\n          return v;\n        });\n\n        const expected = Number.isFinite(value) ? 0 : Math.min(length, MAX_ARRAY_INDEX);\n\n        // Check if steps are within expected bounds\n        expect(steps).toBeGreaterThanOrEqual(32);\n        expect(steps).toBeLessThanOrEqual(33);\n        expect(actual).toBe(expected);\n      });\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedLastIndexBy).toEqualTypeOf<typeof sortedLastIndexByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedLastIndexBy.ts",
    "content": "import { sortedIndexBy } from './sortedIndexBy.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\n\ntype PropertyName = string | number | symbol;\n\n// Lodash 스타일의 Iteratee 타입 정의\ntype Iteratee<T, R> = ((value: T) => R) | PropertyName | [PropertyName, any] | Partial<T>;\n\n/**\n * This method is like `sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The sorted array to inspect.\n * @param {T} value - The value to evaluate.\n * @param {ValueIteratee<T>} iteratee - The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n *\n * @example\n * sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');\n * // => 1\n */\nexport function sortedLastIndexBy<T>(\n  array: ArrayLike<T> | null | undefined,\n  value: T,\n  iteratee: ValueIteratee<T>\n): number;\n\n/**\n * This method is like `sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to evaluate.\n * @param {(value: T) => R | PropertyName | [PropertyName, any] | Partial<T>} iteratee The iteratee invoked per element.\n * @returns {number} Returns the highest index at which `value` should be inserted\n *  into `array`.\n * @example\n * const objects = [{ 'n': 4 }, { 'n': 5 }]\n * sortedLastIndexBy(objects, { 'n': 4 }, ({ n }) => n)\n * // => 1\n */\nexport function sortedLastIndexBy<T, R>(\n  array: ArrayLike<T> | null | undefined,\n  value: T,\n  iteratee?: Iteratee<T, R>\n): number {\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-expect-error\n  return sortedIndexBy(array, value, iteratee, true);\n}\n"
  },
  {
    "path": "src/compat/array/sortedLastIndexOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sortedLastIndexOf as sortedLastIndexOfLodash } from 'lodash';\nimport { sortedLastIndexOf } from './sortedLastIndexOf';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('sortedLastIndexOf', () => {\n  //--------------- Lodash Test Case #1 -------------------\n  it('`sortedLastIndexOf` should perform a binary search', () => {\n    const sorted = [4, 4, 5, 5, 6, 6];\n    expect(sortedLastIndexOf(sorted, 5)).toEqual(3);\n  });\n\n  //--------------- Lodash Test Case #2 -------------------\n  it('`sortedLastIndexOf` should accept a falsey `array`', () => {\n    const expected = falsey.map(() => -1);\n\n    const actual = falsey.map((array, index) => {\n      try {\n        // @ts-expect-error - Testing with falsey values\n        return index ? sortedLastIndexOf(array) : sortedLastIndexOf();\n      } catch (e) {\n        return undefined;\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('`sortedLastIndexOf` should return `-1` for an unmatched value', () => {\n    const array = [1, 2, 3];\n    const empty: unknown[] = [];\n\n    expect(sortedLastIndexOf(array, 4)).toBe(-1);\n    // @ts-expect-error - Testing with extra parameter\n    expect(sortedLastIndexOf(array, 4, true)).toBe(-1);\n    // @ts-expect-error - Testing with extra parameter\n    expect(sortedLastIndexOf(array, undefined, true)).toBe(-1);\n\n    expect(sortedLastIndexOf(empty, undefined)).toBe(-1);\n    // @ts-expect-error - Testing with extra parameter\n    expect(sortedLastIndexOf(empty, undefined, true)).toBe(-1);\n  });\n\n  it('`sortedLastIndexOf` should not match values on empty arrays', () => {\n    const array = [];\n    array[-1] = 0;\n\n    expect(sortedLastIndexOf(array, undefined)).toBe(-1);\n    // @ts-expect-error - Testing with extra parameter\n    expect(sortedLastIndexOf(array, 0, true)).toBe(-1);\n  });\n\n  it('`sortedLastIndexOf` should match `NaN`', () => {\n    const array = [1, 2, NaN, NaN];\n    // @ts-expect-error - Testing with extra parameter\n    expect(sortedLastIndexOf(array, NaN, true)).toBe(3);\n  });\n\n  it('`sortedLastIndexOf` should match `-0` as `0`', () => {\n    expect(sortedLastIndexOf([-0], 0)).toBe(0);\n    expect(sortedLastIndexOf([0], -0)).toBe(0);\n  });\n\n  // Additional tests specific to sortedLastIndexOf\n  it('should find the last occurrence of value in a sorted array', () => {\n    const array = [1, 2, 2, 3, 3, 3, 4, 5, 5];\n    expect(sortedLastIndexOf(array, 2)).toBe(2);\n    expect(sortedLastIndexOf(array, 3)).toBe(5);\n    expect(sortedLastIndexOf(array, 5)).toBe(8);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sortedLastIndexOf).toEqualTypeOf<typeof sortedLastIndexOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/sortedLastIndexOf.ts",
    "content": "import { sortedLastIndex } from './sortedLastIndex.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Finds the index of the last occurrence of a value in a sorted array.\n * This function is similar to `Array#lastIndexOf` but is specifically designed for sorted arrays.\n *\n * Make sure to provide a sorted array to this function, as it uses a binary search to quickly find the index.\n *\n * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.\n * @param {T} value The value to search for.\n * @returns {number} Returns the index of the last matched value, else -1.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * sortedLastIndexOf(numbers, 3); // Return value: 2\n * sortedLastIndexOf(numbers, 6); // Return value: -1\n *\n * // If the value is duplicated, it returns the last index of the value.\n * const duplicateNumbers = [1, 2, 2, 3, 3, 3, 4];\n * sortedLastIndexOf(duplicateNumbers, 3); // Return value: 5\n *\n * // If the array is unsorted, it can return the wrong index.\n * const unSortedArray = [55, 33, 22, 11, 44];\n * sortedLastIndexOf(unSortedArray, 11); // Return value: -1\n *\n * // -0 and 0 are treated the same\n * const mixedZeroArray = [-0, 0];\n * sortedLastIndexOf(mixedZeroArray, 0); // Return value: 1\n * sortedLastIndexOf(mixedZeroArray, -0); // Return value: 1\n *\n * // It works with array-like objects\n * const arrayLike = { length: 3, 0: 10, 1: 20, 2: 20 };\n * sortedLastIndexOf(arrayLike, 20); // Return value: 2\n */\nexport function sortedLastIndexOf<T>(array: ArrayLike<T> | null | undefined, value: T): number {\n  if (!array?.length) {\n    return -1;\n  }\n\n  const index = sortedLastIndex(array, value) - 1;\n  if (index >= 0 && eq(array[index], value)) {\n    return index;\n  }\n  return -1;\n}\n"
  },
  {
    "path": "src/compat/array/tail.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { tail as tailLodash } from 'lodash';\nimport { args } from '../_internal/args';\nimport { tail } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/tail.spec.js#L1\n */\ndescribe('tail', () => {\n  const array = [1, 2, 3];\n\n  it('should exclude the first element', () => {\n    expect(tail(array)).toEqual([2, 3]);\n  });\n\n  it('should return an empty when querying empty arrays', () => {\n    expect(tail([])).toEqual([]);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(tail);\n\n    expect(actual).toEqual([\n      [2, 3],\n      [5, 6],\n      [8, 9],\n    ]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(tail(null)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(tail(1)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(tail(true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(tail({ 0: 1, 1: null, 2: 3, length: 3 })).toEqual([null, 3]);\n    expect(tail('123')).toEqual(['2', '3']);\n    expect(tail(args)).toEqual([2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(tail).toEqualTypeOf<typeof tailLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/tail.ts",
    "content": "import { tail as tailToolkit } from '../../array/tail.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Gets all but the first element of array.\n *\n * @template T\n * @param {readonly [unknown, ...T]} array - The array to query.\n * @returns {T} Returns the slice of array.\n *\n * @example\n * tail([1, 2, 3]);\n * // => [2, 3]\n */\nexport function tail<T extends unknown[]>(array: readonly [unknown, ...T]): T;\n\n/**\n * Gets all but the first element of array.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @returns {T[]} Returns the slice of array.\n *\n * @example\n * tail([1, 2, 3]);\n * // => [2, 3]\n */\nexport function tail<T>(array: ArrayLike<T> | null | undefined): T[];\n\n/**\n * Returns a new array with all elements except for the first.\n *\n * This function takes an array and returns a new array containing all the elements\n * except for the first one. If the input array is empty or has only one element,\n * an empty array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array to get the tail of.\n * @returns {T[]} A new array containing all elements of the input array except for the first one.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const result = tail(arr1);\n * // result will be [2, 3]\n *\n * const arr2 = [1];\n * const result2 = tail(arr2);\n * // result2 will be []\n *\n * const arr3 = [];\n * const result3 = tail(arr3);\n * // result3 will be []\n */\nexport function tail<T>(arr: ArrayLike<T> | null | undefined): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n  return tailToolkit(toArray(arr));\n}\n"
  },
  {
    "path": "src/compat/array/take.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { take as takeLodash } from 'lodash';\nimport { take } from './take.ts';\nimport { args } from '../_internal/args';\n\ndescribe('take', () => {\n  const array = [1, 2, 3];\n\n  it('should take the first element when `n` is not provided', () => {\n    expect(take(array)).toEqual([1]);\n  });\n\n  it('should take the first two elements', () => {\n    expect(take(array, 2)).toEqual([1, 2]);\n  });\n\n  it('should return an empty array when `n` < `1`', () => {\n    [0, -1, -Infinity].forEach(n => {\n      expect(take(array, n)).toEqual([]);\n    });\n  });\n\n  it('should return all elements when `n` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(n => {\n      expect(take(array, n)).toEqual(array);\n    });\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(take(null)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(take(1)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(take(true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(take({ 0: 1, 1: 2, 2: 3, length: 3 }, 2)).toEqual([1, 2]);\n    expect(take('123', 2)).toEqual(['1', '2']);\n    expect(take(args, 2)).toEqual([1, 2]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect([[1, 2], [3, 4], [5]].map(take)).toEqual([[1], [3], [5]]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(take).toEqualTypeOf<typeof takeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/take.ts",
    "content": "import { take as takeToolkit } from '../../array/take.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Creates a slice of array with n elements taken from the beginning.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {number} [n=1] - The number of elements to take.\n * @returns {T[]} Returns the slice of array.\n *\n * @example\n * take([1, 2, 3]);\n * // => [1]\n *\n * @example\n * take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * @example\n * take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * @example\n * take([1, 2, 3], 0);\n * // => []\n */\nexport function take<T>(array: ArrayLike<T> | null | undefined, n?: number): T[];\n\n/**\n * Returns a new array containing the first `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {ArrayLike<T> | null | undefined} arr - The array to take elements from.\n * @param {number} [count=1] - The number of elements to take.\n * @param {unknown} [guard] - Enables use as an iteratee for methods like `_.map`.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n *\n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n */\nexport function take<T>(arr: ArrayLike<T> | null | undefined, count = 1, guard?: unknown): T[] {\n  count = guard ? 1 : toInteger(count);\n  if (count < 1 || !isArrayLike(arr)) {\n    return [];\n  }\n\n  return takeToolkit(toArray(arr), count);\n}\n"
  },
  {
    "path": "src/compat/array/takeRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { takeRight as takeRightLodash } from 'lodash';\nimport { args } from '../_internal/args';\nimport { takeRight } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/takeRight.spec.js#L1\n */\ndescribe('takeRight', () => {\n  const array = [1, 2, 3];\n\n  it('should take the last element when `n` is not provided', () => {\n    expect(takeRight(array)).toEqual([3]);\n  });\n\n  it('should take the last two elements', () => {\n    expect(takeRight(array, 2)).toEqual([2, 3]);\n  });\n\n  it('should return an empty array when `n` < `1`', () => {\n    [0, -1, -Infinity].forEach(n => {\n      expect(takeRight(array, n)).toEqual([]);\n    });\n  });\n\n  it('should return all elements when `n` >= `length`', () => {\n    [3, 4, 2 ** 32, Infinity].forEach(n => {\n      expect(takeRight(array, n)).toEqual(array);\n    });\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const array = [\n      [1, 2, 3],\n      [4, 5, 6],\n      [7, 8, 9],\n    ];\n    const actual = array.map(item => takeRight(item));\n    expect(actual).toEqual([[3], [6], [9]]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(takeRight(null, 2)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(takeRight(1, 2)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(takeRight(true, 2)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(takeRight({ 0: 1, 1: 2, 2: 3, length: 3 }, 2)).toEqual([2, 3]);\n    expect(takeRight('123', 2)).toEqual(['2', '3']);\n    expect(takeRight(args, 2)).toEqual([2, 3]);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    expect([[1, 2], [3, 4], [5]].map(takeRight)).toEqual([[2], [4], [5]]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(takeRight).toEqualTypeOf<typeof takeRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/takeRight.ts",
    "content": "import { takeRight as takeRightToolkit } from '../../array/takeRight.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { toInteger } from '../util/toInteger.ts';\n\n/**\n * Creates a slice of array with n elements taken from the end.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {number} [n=1] - The number of elements to take.\n * @returns {T[]} Returns the slice of array.\n *\n * @example\n * takeRight([1, 2, 3]);\n * // => [3]\n *\n * @example\n * takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * @example\n * takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * @example\n * takeRight([1, 2, 3], 0);\n * // => []\n */\nexport function takeRight<T>(array: ArrayLike<T> | null | undefined, n?: number): T[];\n\n/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array to take elements from.\n * @param {number} [count=1] - The number of elements to take.\n * @param {unknown} [guard] - Enables use as an iteratee for methods like `_.map`.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: ArrayLike<T> | null | undefined, count = 1, guard?: unknown): T[] {\n  count = guard ? 1 : toInteger(count);\n  if (count <= 0 || !isArrayLike(arr)) {\n    return [];\n  }\n\n  return takeRightToolkit(toArray(arr), count);\n}\n"
  },
  {
    "path": "src/compat/array/takeRightWhile.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { takeRightWhile as takeRightWhileLodash } from 'lodash';\nimport { takeRightWhile } from './takeRightWhile';\nimport { slice } from '../_internal/slice';\nimport { toArgs } from '../_internal/toArgs';\n\ndescribe('takeRightWhile', () => {\n  const array = [1, 2, 3, 4];\n\n  const objects = [\n    { a: 0, b: 0 },\n    { a: 1, b: 1 },\n    { a: 2, b: 2 },\n  ];\n\n  it('should take elements while `predicate` returns truthy', () => {\n    const actual = takeRightWhile(array, n => n > 2);\n    expect(actual).toEqual([3, 4]);\n  });\n\n  it('should provide correct `predicate` arguments', () => {\n    let args;\n    takeRightWhile(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n    expect(args).toEqual([4, 3, array]);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    expect(takeRightWhile(objects, { b: 2 })).toEqual(objects.slice(2));\n  });\n\n  it('should work with `_.matchesProperty` shorthands', () => {\n    expect(takeRightWhile(objects, ['b', 2])).toEqual(objects.slice(2));\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    expect(takeRightWhile(objects, 'b')).toEqual(objects.slice(1));\n  });\n\n  it('should use identity function as default `predicate`', () => {\n    expect(takeRightWhile(['a', 'b'])).toEqual(['a', 'b']);\n    expect(takeRightWhile([false, true])).toEqual([true]);\n  });\n\n  it('should return empty array when `array` is nullable', () => {\n    expect(takeRightWhile(null, () => true)).toEqual([]);\n    expect(takeRightWhile(undefined, () => true)).toEqual([]);\n    expect(takeRightWhile(null)).toEqual([]);\n    expect(takeRightWhile(undefined)).toEqual([]);\n  });\n\n  it('should work with array-like objects', () => {\n    expect(takeRightWhile({ 0: 1, 1: 2, 2: 3, length: 3 }, value => value > 1)).toEqual([2, 3]);\n    expect(takeRightWhile(toArgs([1, 2, 3]), value => value > 1)).toEqual([2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(takeRightWhile).toEqualTypeOf<typeof takeRightWhileLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/takeRightWhile.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { negate } from '../../function/negate.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a slice of array with elements taken from the end. Elements are taken until predicate\n * returns falsey. The predicate is invoked with three arguments: (value, index, array).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {ListIteratee<T>} [predicate] - The function invoked per iteration.\n * @returns {T[]} Returns the slice of array.\n *\n * @example\n * const users = [\n *   { 'user': 'barney',  'active': true },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': false }\n * ];\n *\n * takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * @example\n * takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * @example\n * takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * @example\n * takeRightWhile(users, 'active');\n * // => []\n */\nexport function takeRightWhile<T>(array: ArrayLike<T> | null | undefined, predicate?: ListIteratee<T>): T[];\n\n/**\n * Creates a slice of the array with elements taken from the end while the specified predicate is satisfied.\n * If no predicate is provided, the identity function is used by default.\n * If the array is `null` or `undefined`, returns an empty array.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to process.\n * @param {(item: T, index: number, array: T[]) => unknown | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate] - The condition used to determine elements to include. Can be:\n * - A function invoked per iteration.\n * - A partial object to match properties.\n * - A key-value pair as a tuple.\n * - A property key to check for truthy values.\n * Defaults to the identity function if not provided.\n * @returns {T[]} - A slice of the array with elements taken from the end or an empty array if `array` is `null` or `undefined`.\n *\n * @example\n * // Using a predicate function\n * const items = [1, 2, 3, 4, 5];\n * const result = takeRightWhile(items, (item) => item > 3);\n * console.log(result); // [4, 5]\n *\n * // Using a partial object\n * const items2 = [{ id: 10 }, { id: 20 }, { id: 30 }];\n * const result2 = takeRightWhile(items2, { id: 30 });\n * console.log(result2); // [{ id: 30 }]\n *\n * // Using a key-value pair\n * const items3 = [{ name: 'Alice' }, { name: 'Bob' }, { name: 'Alice' }];\n * const result3 = takeRightWhile(items3, ['name', 'Alice']);\n * console.log(result3); // [{ name: 'Alice' }]\n *\n * // Using a property key\n * const items4 = [{ active: false }, { active: true }, { active: true }];\n * const result4 = takeRightWhile(items4, 'active');\n * console.log(result4); // [{ active: true }, { active: true }]\n *\n * // No predicate provided\n * const items5 = [false, true];\n * const result5 = takeRightWhile(items5);\n * console.log(result5); // [true]\n *\n * // null or undefined array\n * const result6 = takeRightWhile(null);\n * console.log(result6); // []\n */\nexport function takeRightWhile<T>(\n  _array: ArrayLike<T> | null | undefined,\n  predicate?:\n    | ((value: T, index: number, array: ArrayLike<T>) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey\n): T[] {\n  if (!isArrayLikeObject(_array)) {\n    return [];\n  }\n\n  const array = toArray(_array);\n  const index = array.findLastIndex(negate(createIteratee(predicate ?? identity)));\n\n  return array.slice(index + 1);\n}\n"
  },
  {
    "path": "src/compat/array/takeWhile.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { takeWhile as takeWhileLodash } from 'lodash';\nimport { takeWhile } from './takeWhile';\nimport { slice } from '../_internal/slice';\nimport { toArgs } from '../_internal/toArgs';\n\ndescribe('takeWhile', () => {\n  const array = [1, 2, 3, 4];\n\n  const objects = [\n    { a: 2, b: 2 },\n    { a: 1, b: 1 },\n    { a: 0, b: 0 },\n  ];\n\n  it('should take elements while `predicate` returns truthy', () => {\n    const actual = takeWhile(array, n => n < 3);\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should provide correct `predicate` arguments', () => {\n    let args;\n    takeWhile(array, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n    expect(args).toEqual([1, 0, array]);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    expect(takeWhile(objects, { b: 2 })).toEqual(objects.slice(0, 1));\n  });\n\n  it('should work with `_.matchesProperty` shorthands', () => {\n    expect(takeWhile(objects, ['b', 2])).toEqual(objects.slice(0, 1));\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    expect(takeWhile(objects, 'b')).toEqual(objects.slice(0, 2));\n  });\n\n  it('should use identity function as default `predicate`', () => {\n    expect(takeWhile(['a', 'b'])).toEqual(['a', 'b']);\n    expect(takeWhile([true, false])).toEqual([true]);\n  });\n\n  it('should return empty array when `array` is nullable', () => {\n    expect(takeWhile(null, () => true)).toEqual([]);\n    expect(takeWhile(undefined, () => true)).toEqual([]);\n    expect(takeWhile(null)).toEqual([]);\n    expect(takeWhile(undefined)).toEqual([]);\n  });\n\n  it('should work with array-like objects', () => {\n    expect(takeWhile({ 0: 3, 1: 2, 2: 1, length: 3 }, value => value > 1)).toEqual([3, 2]);\n    expect(takeWhile(toArgs([3, 2, 1]), value => value > 1)).toEqual([3, 2]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(takeWhile).toEqualTypeOf<typeof takeWhileLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/takeWhile.ts",
    "content": "import { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { toArray } from '../_internal/toArray.ts';\nimport { identity } from '../function/identity.ts';\nimport { negate } from '../function/negate.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate\n * returns falsey. The predicate is invoked with three arguments: (value, index, array).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to query.\n * @param {ListIteratee<T>} [predicate] - The function invoked per iteration.\n * @returns {T[]} Returns the slice of array.\n *\n * @example\n * const users = [\n *   { 'user': 'barney',  'active': false },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': true }\n * ];\n *\n * takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * @example\n * takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * @example\n * takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * @example\n * takeWhile(users, 'active');\n * // => []\n */\nexport function takeWhile<T>(array: ArrayLike<T> | null | undefined, predicate?: ListIteratee<T>): T[];\n\n/**\n * Creates a slice of the array with elements taken from the beginning while the specified predicate is satisfied.\n * If no predicate is provided, the identity function is used by default.\n * If the array is `null` or `undefined`, returns an empty array.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to process.\n * @param {(item: T, index: number, array: T[]) => unknown | Partial<T> | [keyof T, unknown] | PropertyKey} [predicate] - The condition used to determine elements to include. Can be:\n * - A function invoked per iteration.\n * - A partial object to match properties.\n * - A key-value pair as a tuple.\n * - A property key to check for truthy values.\n * Defaults to the identity function if not provided.\n * @returns {T[]} - A slice of the array with elements taken from the beginning or an empty array if `array` is `null` or `undefined`.\n *\n * @example\n * // Using a predicate function\n * const items = [1, 2, 3, 4, 5];\n * const result = takeWhile(items, (item) => item < 3);\n * console.log(result); // [1, 2]\n *\n * // Using a partial object\n * const items2 = [{ id: 30 }, { id: 20 }, { id: 10 }];\n * const result2 = takeWhile(items2, { id: 30 });\n * console.log(result2); // [{ id: 30 }]\n *\n * // Using a key-value pair\n * const items3 = [{ name: 'Alice' }, { name: 'Bob' }, { name: 'Alice' }];\n * const result3 = takeWhile(items3, ['name', 'Alice']);\n * console.log(result3); // [{ name: 'Alice' }]\n *\n * // Using a property key\n * const items4 = [{ active: true }, { active: true }, { active: false }];\n * const result4 = takeWhile(items4, 'active');\n * console.log(result4); // [{ active: true }, { active: true }]\n *\n * // No predicate provided\n * const items5 = [true, false];\n * const result5 = takeWhile(items5);\n * console.log(result5); // [true]\n *\n * // null or undefined array\n * const result6 = takeWhile(null);\n * console.log(result6); // []\n **/\nexport function takeWhile<T>(\n  array: ArrayLike<T> | null | undefined,\n  predicate?:\n    | ((value: T, index: number, array: ArrayLike<T>) => unknown)\n    | Partial<T>\n    | [keyof T, unknown]\n    | PropertyKey\n): T[] {\n  if (!isArrayLikeObject(array)) {\n    return [];\n  }\n\n  const _array = toArray(array);\n  const index = _array.findIndex(negate(iteratee(predicate ?? identity)));\n\n  return index === -1 ? _array : _array.slice(0, index);\n}\n"
  },
  {
    "path": "src/compat/array/union.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { union as unionLodash } from 'lodash';\nimport { union } from './union';\nimport { args } from '../_internal/args';\n\ndescribe('union', () => {\n  it('should return the union of two arrays', () => {\n    const actual = union([2], [1, 2]);\n    expect(actual).toEqual([2, 1]);\n  });\n\n  it('should return the union of multiple arrays', () => {\n    const actual = union([2], [1, 2], [2, 3]);\n    expect(actual).toEqual([2, 1, 3]);\n  });\n\n  it('should not flatten nested arrays', () => {\n    const actual = union([1, 3, 2], [1, [5]], [2, [4]]);\n    expect(actual).toEqual([1, 3, 2, [5], [4]]);\n  });\n\n  it('should ignore values that are not arrays or arguments objects', () => {\n    const array = [0];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(union(array, 3, { '0': 1 }, null)).toEqual(array);\n    expect(union(null, array, null, [2, 1])).toEqual([0, 2, 1]);\n    expect(union(array, null, args, null)).toEqual([0, 1, 2, 3]);\n  });\n\n  it('should work with array-like objects', () => {\n    const actual = union({ 0: 2, 1: 3, length: 2 }, { 0: 3, 1: 4, length: 2 });\n    expect(actual).toEqual([2, 3, 4]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(union).toEqualTypeOf<typeof unionLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/union.ts",
    "content": "import { flatMapDepth } from './flatMapDepth.ts';\nimport { uniq } from '../../array/uniq.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * This function takes multiple arrays and returns a new array containing only the unique values\n * from all input arrays, preserving the order of their first occurrence.\n *\n * @template T - The type of elements in the arrays.\n * @param {Array<ArrayLike<T> | null | undefined>} arrays - The arrays to inspect.\n * @returns {T[]} Returns the new array of combined unique values.\n *\n * @example\n * // Returns [2, 1]\n * union([2], [1, 2]);\n *\n * @example\n * // Returns [2, 1, 3]\n * union([2], [1, 2], [2, 3]);\n *\n * @example\n * // Returns [1, 3, 2, [5], [4]] (does not deeply flatten nested arrays)\n * union([1, 3, 2], [1, [5]], [2, [4]]);\n *\n * @example\n * // Returns [0, 2, 1] (ignores non-array values like 3 and { '0': 1 })\n * union([0], 3, { '0': 1 }, null, [2, 1]);\n * @example\n * // Returns [0, 'a', 2, 1] (treats array-like object { 0: 'a', length: 1 } as a valid array)\n * union([0], { 0: 'a', length: 1 }, [2, 1]);\n */\nexport function union<T>(...arrays: Array<ArrayLike<T> | null | undefined>): T[];\n\n/**\n * This function takes multiple arrays and returns a new array containing only the unique values\n * from all input arrays, preserving the order of their first occurrence.\n *\n * @template T - The type of elements in the arrays.\n * @param {Array<ArrayLike<T> | null | undefined>} arrays - The arrays to inspect.\n * @returns {T[]} Returns the new array of combined unique values.\n *\n * @example\n * // Returns [2, 1]\n * union([2], [1, 2]);\n *\n * @example\n * // Returns [2, 1, 3]\n * union([2], [1, 2], [2, 3]);\n *\n * @example\n * // Returns [1, 3, 2, [5], [4]] (does not deeply flatten nested arrays)\n * union([1, 3, 2], [1, [5]], [2, [4]]);\n *\n * @example\n * // Returns [0, 2, 1] (ignores non-array values like 3 and { '0': 1 })\n * union([0], 3, { '0': 1 }, null, [2, 1]);\n * @example\n * // Returns [0, 'a', 2, 1] (treats array-like object { 0: 'a', length: 1 } as a valid array)\n * union([0], { 0: 'a', length: 1 }, [2, 1]);\n */\nexport function union<T>(...arrays: Array<ArrayLike<T> | null | undefined>): T[] {\n  const validArrays = arrays.filter(isArrayLikeObject);\n\n  const flattened = flatMapDepth(validArrays as any, v => Array.from(v), 1);\n\n  return uniq(flattened) as T[];\n}\n"
  },
  {
    "path": "src/compat/array/unionBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unionBy as unionByLodash } from 'lodash';\nimport { unionBy } from './unionBy';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/union-methods.spec.js\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/unionBy.spec.js\n */\ndescribe('unionBy', () => {\n  it('should return the union of two arrays', () => {\n    const actual = unionBy([2], [1, 2]);\n    expect(actual).toEqual([2, 1]);\n  });\n\n  it('should return the union of multiple arrays', () => {\n    const actual = unionBy([2], [1, 2], [2, 3]);\n    expect(actual).toEqual([2, 1, 3]);\n  });\n\n  it('should not flatten nested arrays', () => {\n    const actual = unionBy([1, 3, 2], [1, [5]], [2, [4]]);\n    expect(actual).toEqual([1, 3, 2, [5], [4]]);\n  });\n\n  it('should ignore values that are not arrays or arguments objects', () => {\n    const array = [0];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(unionBy(array, 3, { '0': 1 }, null)).toEqual(array);\n    expect(unionBy(null, array, null, [2, 1])).toEqual([0, 2, 1]);\n    expect(unionBy(array, null, args, null)).toEqual([0, 1, 2, 3]);\n  });\n\n  it('should accept an `iteratee`', () => {\n    const actual1 = unionBy([2.1], [1.2, 2.3], Math.floor);\n    expect(actual1).toEqual([2.1, 1.2]);\n\n    const actual2 = unionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n    expect(actual2).toEqual([{ x: 1 }, { x: 2 }]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    unionBy([2.1], [1.2, 2.3], function (...params) {\n      if (args === undefined) {\n        args = params;\n      }\n    });\n\n    expect(args).toEqual([2.1]);\n  });\n\n  it('should output values from the first possible array', () => {\n    const actual = unionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], 'x');\n    expect(actual).toEqual([{ x: 1, y: 1 }]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unionBy).toEqualTypeOf<typeof unionByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/unionBy.ts",
    "content": "import { last } from '../../array/last.ts';\nimport { uniq } from '../../array/uniq.ts';\nimport { uniqBy } from '../../array/uniqBy.ts';\nimport { ary } from '../../function/ary.ts';\nimport { flattenArrayLike } from '../_internal/flattenArrayLike.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\ntype Iteratee<T> = PropertyKey | Partial<T> | ((value: T) => unknown);\n\n/**\n * This method is like `union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * @example\n * unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nexport function unionBy<T>(arrays: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];\n\n/**\n * This method is like `union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n */\nexport function unionBy<T>(\n  arrays1: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): T[];\n\n/**\n * This method is like `union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionBy([2.1], [1.2, 2.3], [3.4], Math.floor);\n * // => [2.1, 1.2, 3.4]\n */\nexport function unionBy<T>(\n  arrays1: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): T[];\n\n/**\n * This method is like `union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays4 - The fourth array to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionBy([2.1], [1.2, 2.3], [3.4], [4.5], Math.floor);\n * // => [2.1, 1.2, 3.4, 4.5]\n */\nexport function unionBy<T>(\n  arrays1: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  arrays4: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): T[];\n\n/**\n * This method is like `union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays1 - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays4 - The fourth array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays5 - The fifth array to inspect.\n * @param {...Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>} iteratee - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionBy([2.1], [1.2, 2.3], [3.4], [4.5], [5.6], Math.floor);\n * // => [2.1, 1.2, 3.4, 4.5, 5.6]\n */\nexport function unionBy<T>(\n  arrays1: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  arrays4: ArrayLike<T> | null | undefined,\n  arrays5: ArrayLike<T> | null | undefined,\n  ...iteratee: Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>\n): T[];\n\n/**\n * This function takes multiple arrays and returns a new array containing only the unique values\n * from all input arrays, preserving the order of their first occurrence.\n * An iteratee function can be provided for comparison and it output values from the first possible array\n *\n * @template T - The type of elements in the arrays.\n * @param {...(ArrayLike<T> | null | undefined | Iteratee<T>)} values - The arrays to inspect, or the iteratee function.\n * @returns {T[]} Returns the new array of combined unique values.\n *\n * @example\n * // Returns [2.1, 1.2]\n * unionBy([2.1], [1.2, 2.3], Math.floor);\n *\n * @example\n * // Returns [{ x: 1 }, { x: 2 }]\n * unionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n *\n * @example\n * // Returns [{ x: 1, y: 1 }]\n * unionBy([{ x: 1, y: 1 }], [{ x: 1, y: 2 }], 'x');\n */\n\nexport function unionBy<T>(...values: Array<ArrayLike<T> | null | undefined | Iteratee<T>>): T[] {\n  const lastValue = last(values);\n  const flattened = flattenArrayLike(values as Array<ArrayLike<T>>);\n\n  if (isArrayLikeObject(lastValue) || lastValue == null) {\n    return uniq(flattened);\n  }\n\n  return uniqBy(flattened, ary(iteratee(lastValue), 1));\n}\n"
  },
  {
    "path": "src/compat/array/unionWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unionWith as unionWithLodash } from 'lodash';\nimport { unionWith } from './unionWith';\nimport { isEqual } from '../../predicate';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/union-methods.spec.js\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/unionWith.spec.js\n */\ndescribe('unionWith', () => {\n  it('should return the union of two arrays', () => {\n    const actual = unionWith([2], [1, 2]);\n    expect(actual).toEqual([2, 1]);\n  });\n\n  it('should return the union of multiple arrays', () => {\n    const actual = unionWith([2], [1, 2], [2, 3]);\n    expect(actual).toEqual([2, 1, 3]);\n  });\n\n  it('should not flatten nested arrays', () => {\n    const actual = unionWith([1, 3, 2], [1, [5]], [2, [4]]);\n    expect(actual).toEqual([1, 3, 2, [5], [4]]);\n  });\n\n  it('should ignore values that are not arrays or arguments objects', () => {\n    const array = [0];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(unionWith(array, 3, { '0': 1 }, null)).toEqual(array);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(unionWith(null, array, null, [2, 1])).toEqual([0, 2, 1]);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(unionWith(array, null, args, null)).toEqual([0, 1, 2, 3]);\n  });\n\n  it('should work with a `comparator`', () => {\n    const objects = [\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n    ];\n    const others = [\n      { x: 1, y: 1 },\n      { x: 1, y: 2 },\n    ];\n    const actual = unionWith(objects, others, isEqual);\n\n    expect(actual).toEqual([objects[0], objects[1], others[0]]);\n  });\n\n  it('should output values from the first possible array', () => {\n    const objects = [{ x: 1, y: 1 }];\n    const others = [{ x: 1, y: 2 }];\n\n    const actual = unionWith(objects, others, (a, b) => a.x === b.x);\n\n    expect(actual).toEqual([{ x: 1, y: 1 }]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unionWith).toEqualTypeOf<typeof unionWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/unionWith.ts",
    "content": "import { last } from '../../array/last.ts';\nimport { uniq } from '../../array/uniq.ts';\nimport { uniqWith } from '../../array/uniqWith.ts';\nimport { flattenArrayLike } from '../_internal/flattenArrayLike.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * This method is like `union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.\n * @param {(a: T, b: T) => boolean} [comparator] - The comparator invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * const others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n * unionWith(objects, others, isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\nexport function unionWith<T>(arrays: ArrayLike<T> | null | undefined, comparator?: (a: T, b: T) => boolean): T[];\n\n/**\n * This method is like `union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {(a: T, b: T) => boolean} [comparator] - The comparator invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionWith([1, 2], [2, 3], (a, b) => a === b);\n * // => [1, 2, 3]\n */\nexport function unionWith<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  comparator?: (a: T, b: T) => boolean\n): T[];\n\n/**\n * This method is like `union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {...Array<(a: T, b: T) => boolean | ArrayLike<T> | null | undefined>} comparator - The comparator invoked per element.\n * @returns {T[]} Returns the new array of combined values.\n *\n * @example\n * unionWith([1], [2], [3], (a, b) => a === b);\n * // => [1, 2, 3]\n */\nexport function unionWith<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  ...comparator: Array<((a: T, b: T) => boolean) | ArrayLike<T> | null | undefined>\n): T[];\n\n/**\n * This function takes multiple arrays and returns a new array containing only the unique values\n * from all input arrays, preserving the order of their first occurrence.\n * A comparator function can be provided for comparison and it output values from the first possible array\n *\n * @template T - The type of elements in the arrays.\n * @param {...(ArrayLike<T> | null | undefined | Comparator<T, U>)} values - The arrays to inspect, or the comparator function.\n * @returns {T[]} Returns the new array of combined unique values.\n *\n * @example\n * const objects = [\n *   { x: 1, y: 2 },\n *   { x: 2, y: 1 },\n * ];\n * const others = [\n *   { x: 1, y: 1 },\n *   { x: 1, y: 2 },\n * ];\n * // Returns [objects[0], objects[1], others[0]]\n * unionWith(objects, others, isEqual);\n *\n * @example\n * const objects = [{ x: 1, y: 1 }];\n * const others = [{ x: 1, y: 2 }];\n * // Returns [{ x: 1, y: 1 }]\n * unionWith(objects, others, (a, b) => a.x === b.x);\n */\n\nexport function unionWith<T>(...values: Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>): T[] {\n  const lastValue = last(values);\n  const flattened = flattenArrayLike(values as Array<ArrayLike<T>>);\n\n  if (isArrayLikeObject(lastValue) || lastValue == null) {\n    return uniq(flattened);\n  }\n\n  return uniqWith(flattened, lastValue);\n}\n"
  },
  {
    "path": "src/compat/array/uniq.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { uniq as uniqLodash } from 'lodash';\nimport { args } from '../_internal/args';\nimport { uniq } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/uniq.spec.js#L1\n */\ndescribe('uniq', () => {\n  it('should perform an unsorted uniq when used as an iteratee for methods like `map`', () => {\n    const array = [\n      [2, 1, 2],\n      [1, 2, 1],\n    ];\n    const actual = array.map(uniq);\n\n    expect(actual).toEqual([\n      [2, 1],\n      [1, 2],\n    ]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(uniq(null)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(uniq(1)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(uniq(true)).toEqual([]);\n  });\n\n  it('should support array-like', () => {\n    expect(uniq({ 0: 1, 1: 2, 2: 1, length: 3 })).toEqual([1, 2]);\n    expect(uniq('112')).toEqual(['1', '2']);\n    expect(uniq(args)).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(uniq).toEqualTypeOf<typeof uniqLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/uniq.ts",
    "content": "import { uniq as uniqToolkit } from '../../array/uniq.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: ArrayLike<T> | null | undefined): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n  return uniqToolkit(Array.from(arr));\n}\n"
  },
  {
    "path": "src/compat/array/uniqBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { uniqBy as uniqByLodash } from 'lodash';\nimport { uniqBy } from './uniqBy';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/uniqBy-methods.spec.js\n */\ndescribe('uniqBy', () => {\n  const objects = [{ a: 2 }, { a: 3 }, { a: 1 }, { a: 2 }, { a: 3 }, { a: 1 }];\n\n  it('should work with a `mapper`', () => {\n    expect(uniqBy([2.1, 1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]);\n    expect(uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor)).toEqual([1.2, 2.1, 3.2, 5.7, 7.19]);\n  });\n\n  it('should work with an iteratee function', () => {\n    const expected = objects.slice(0, 3);\n    const actual = uniqBy(objects, (object: { a: any }) => object.a);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with property shorthands (string)', () => {\n    const expected = objects.slice(0, 3);\n    const actual = uniqBy(objects, 'a');\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with property shorthands (number)', () => {\n    const arrays = [[2], [3], [1], [2], [3], [1]];\n    const expected = arrays.slice(0, 3);\n    const actual = uniqBy(arrays, 0);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with large arrays', () => {\n    const largeArray = Array.from({ length: LARGE_ARRAY_SIZE }, () => [1, 2]);\n    const actual = uniqBy(largeArray, JSON.stringify);\n    expect(actual.length).toBe(1);\n    expect(actual[0]).toEqual([1, 2]);\n  });\n\n  it('should provide correct iteratee arguments', () => {\n    let args: any;\n    uniqBy(objects, (...params: any[]) => {\n      if (!args) {\n        args = params;\n      }\n    });\n    expect(args).toEqual([objects[0]]);\n  });\n\n  it('should return an array with the first element when iteratee returns the same value for all elements', () => {\n    const actual = uniqBy(objects, () => 'same');\n    expect(actual).toEqual([objects[0]]);\n  });\n\n  describe('should return an empty array when iteratee returns various types', () => {\n    const testCases = {\n      'an array': [0, 'a'],\n      'an object': { '0': 'a' },\n      'a number': 0,\n      'a string': '0',\n    };\n\n    Object.entries(testCases).forEach(([key, value]) => {\n      it(`should return an empty array when iteratee returns ${key}`, () => {\n        const actual = uniqBy(objects, () => value);\n\n        expect(actual).toEqual([objects[0]]);\n      });\n    });\n  });\n\n  it('should return an empty array if the first array is null or undefined', () => {\n    expect(uniqBy(null as any, 'a')).toEqual([]);\n    expect(uniqBy(undefined as any, 'a')).toEqual([]);\n  });\n\n  it('should handle empty arrays correctly', () => {\n    expect(uniqBy([], 'a')).toEqual([]);\n    expect(uniqBy([], Math.floor)).toEqual([]);\n  });\n\n  it('should handle single-element arrays correctly', () => {\n    const singleElement = [{ a: 1 }];\n    expect(uniqBy(singleElement, 'a')).toEqual(singleElement);\n    expect(uniqBy(singleElement, (obj: { a: any }) => obj.a)).toEqual(singleElement);\n  });\n\n  it('should not mutate the original array', () => {\n    const original = [...objects];\n    uniqBy(objects, 'a');\n    expect(objects).toEqual(original);\n  });\n\n  it('should work with no iteratee', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(uniqBy([1, 2, 3, 4, 1, 2, 3])).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(uniqBy).toEqualTypeOf<typeof uniqByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/uniqBy.ts",
    "content": "import { uniqBy as uniqByToolkit } from '../../array/uniqBy.ts';\nimport { ary } from '../../function/ary.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a duplicate-free version of an array, using an optional transform function.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} array - The array to inspect.\n * @param {ValueIteratee<T>} iteratee - The transform function or property name to get values from.\n * @returns {T[]} Returns the new duplicate-free array.\n *\n * @example\n * uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n */\nexport function uniqBy<T>(array: ArrayLike<T> | null | undefined, iteratee: ValueIteratee<T>): T[];\nexport function uniqBy<T>(\n  array: ArrayLike<T> | null | undefined,\n  iteratee: ((value: T) => unknown) | PropertyKey | [keyof T, unknown] | Partial<T> = identity\n): T[] {\n  if (!isArrayLikeObject(array)) {\n    return [];\n  }\n\n  return uniqByToolkit(Array.from(array), ary(createIteratee(iteratee), 1));\n}\n"
  },
  {
    "path": "src/compat/array/uniqWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { uniqWith as uniqWithLodash } from 'lodash';\nimport { uniqWith } from './uniqWith';\nimport { isEven } from '../_internal/isEven';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\n\ndescribe('uniqWith', () => {\n  const objects = [{ a: 2 }, { a: 3 }, { a: 1 }, { a: 2 }, { a: 3 }, { a: 1 }];\n\n  // test case #1\n  it('should work with a `comparator`', () => {\n    const objects = [\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n      { x: 1, y: 2 },\n    ];\n    const actual = uniqWith(objects, lodashStable.isEqual);\n\n    expect(actual).toEqual([objects[0], objects[1]]);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const largeArray = lodashStable.times(LARGE_ARRAY_SIZE, index => (isEven(index) ? -0 : 0));\n\n    const arrays = [[-0, 0], largeArray];\n    const expected = lodashStable.map(arrays, lodashStable.constant(['-0']));\n\n    const actual = lodashStable.map(arrays, array =>\n      lodashStable.map(uniqWith(array, lodashStable.eq), lodashStable.toString)\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  // test case #2\n  it(`should return unique values of an unsorted array`, () => {\n    const array = [2, 1, 2];\n    expect(uniqWith(array)).toEqual([2, 1]);\n  });\n\n  it(`should return unique values of a sorted array`, () => {\n    const array = [1, 2, 2];\n    expect(uniqWith(array)).toEqual([1, 2]);\n  });\n\n  it(`should treat object instances as unique`, () => {\n    expect(uniqWith(objects)).toEqual(objects);\n  });\n\n  it(`should treat \\`-0\\` as \\`0\\``, () => {\n    const actual = lodashStable.map(uniqWith([-0, 0]), lodashStable.toString);\n    expect(actual).toEqual(['0']);\n  });\n\n  it(`should match \\`NaN\\``, () => {\n    expect(uniqWith([NaN, NaN])).toEqual([NaN]);\n  });\n\n  it(`should work with large arrays`, () => {\n    const largeArray: any[] = [];\n    const expected = [0, {}, 'a'];\n    const count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);\n\n    lodashStable.each(expected, value => {\n      lodashStable.times(count, () => {\n        largeArray.push(value);\n      });\n    });\n\n    expect(uniqWith(largeArray)).toEqual(expected);\n  });\n\n  it(`should work with large arrays of \\`-0\\` as \\`0\\``, () => {\n    const largeArray = lodashStable.times(LARGE_ARRAY_SIZE, index => (isEven(index) ? -0 : 0));\n\n    const actual = lodashStable.map(uniqWith(largeArray), lodashStable.toString);\n    expect(actual).toEqual(['0']);\n  });\n\n  it(`should work with large arrays of boolean, \\`NaN\\`, and nullish values`, () => {\n    const largeArray: any[] = [];\n    const expected = [null, undefined, false, true, NaN];\n    const count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);\n\n    lodashStable.each(expected, value => {\n      lodashStable.times(count, () => {\n        largeArray.push(value);\n      });\n    });\n\n    expect(uniqWith(largeArray)).toEqual(expected);\n  });\n\n  it(`should work with large arrays of symbols`, () => {\n    if (Symbol) {\n      const largeArray = lodashStable.times(LARGE_ARRAY_SIZE, Symbol);\n      expect(uniqWith(largeArray)).toEqual(largeArray);\n    }\n  });\n\n  it(`should work with large arrays of well-known symbols`, () => {\n    // See http://www.ecma-international.org/ecma-262/6.0/#sec-well-known-symbols.\n    if (Symbol) {\n      let expected = [\n        Symbol.hasInstance,\n        Symbol.isConcatSpreadable,\n        Symbol.iterator,\n        Symbol.match,\n        Symbol.replace,\n        Symbol.search,\n        Symbol.species,\n        Symbol.split,\n        Symbol.toPrimitive,\n        Symbol.toStringTag,\n        Symbol.unscopables,\n      ];\n\n      const largeArray: any[] = [];\n      const count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);\n\n      expected = lodashStable.map(expected, symbol => symbol || {});\n\n      lodashStable.each(expected, value => {\n        lodashStable.times(count, () => {\n          largeArray.push(value);\n        });\n      });\n\n      expect(uniqWith(largeArray)).toEqual(expected);\n    }\n  });\n\n  it(`should distinguish between numbers and numeric strings`, () => {\n    const largeArray: any[] = [];\n    const expected = ['2', 2, Object('2'), Object(2)];\n    const count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);\n\n    lodashStable.each(expected, value => {\n      lodashStable.times(count, () => {\n        largeArray.push(value);\n      });\n    });\n\n    expect(uniqWith(largeArray)).toEqual(expected);\n  });\n\n  // additional test\n  it('should unique Symbol instances', () => {\n    const a = Symbol('a');\n    const b = Symbol('a');\n\n    const result = uniqWith([a, a, b], Object.is);\n\n    expect(result).toEqual([a, b]);\n  });\n\n  it('should handle array-like objects', () => {\n    const arrayLike = {\n      0: { id: 1 },\n      1: { id: 1 },\n      2: { id: 2 },\n      length: 3,\n    };\n\n    const result = uniqWith(Array.from(arrayLike), (a, b) => a.id === b.id);\n\n    expect(result).toEqual([{ id: 1 }, { id: 2 }]);\n  });\n\n  it('should return an empty array when input is not array-like', () => {\n    expect(uniqWith(null, (a, b) => a === b)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(uniqWith).toEqualTypeOf<typeof uniqWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/uniqWith.ts",
    "content": "import { uniqWith as uniqWithToolkit } from '../../array/uniqWith.ts';\nimport { uniq as uniqToolkit } from '../array/uniq.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\ntype Comparator<T> = (a: T, b: T) => boolean;\n\n/**\n * This method is like `uniq`, except that it accepts a `comparator` which is used to determine the equality of elements.\n *\n * It creates a duplicate-free version of an array, in which only the first occurrence of each element is kept.\n * If a `comparator` is provided, it will be invoked with two arguments: `(arrVal, othVal)` to compare elements.\n * If no comparator is provided, shallow equality is used.\n *\n * The order of result values is determined by the order they appear in the input array.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} arr  - The array to process.\n * @param {Comparator<T>} [comparator] - Optional function to compare elements for equality.\n * @returns {T[]} A new array with only unique values based on the comparator.\n *\n * @example\n * const array = [1, 2, 2, 3];\n * const result = uniqWith(array);\n * // result will be [1, 2, 3]\n *\n * const array = [1, 2, 3];\n * const result = uniqWith(array, (a, b) => a % 2 === b % 2)\n * // result will be [1, 2]\n */\nexport function uniqWith<T>(arr: ArrayLike<T> | null | undefined, comparator?: Comparator<T>): T[] {\n  if (!isArrayLike(arr)) {\n    return [];\n  }\n\n  return typeof comparator === 'function' ? uniqWithToolkit(Array.from(arr), comparator) : uniqToolkit(Array.from(arr));\n}\n"
  },
  {
    "path": "src/compat/array/unzip.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unzip as unzipLodash } from 'lodash';\nimport { unzip } from './unzip';\nimport { zip } from '../../array/zip';\n\ndescribe('unzip', () => {\n  const object = {\n    'an empty array': [[], []],\n    '2-tuples': [\n      [\n        ['barney', 'fred'],\n        [36, 40],\n      ],\n      [\n        ['barney', 36],\n        ['fred', 40],\n      ],\n    ],\n    '3-tuples': [\n      [\n        ['barney', 'fred'],\n        [36, 40],\n        [false, true],\n      ],\n      [\n        ['barney', 36, false],\n        ['fred', 40, true],\n      ],\n    ],\n  };\n\n  Object.entries(object).forEach(([key, pair]) => {\n    it(`\\`_.unzip\\` should work with ${key}`, () => {\n      const actual = unzip(pair[1]);\n      expect(actual).toEqual(pair[0]);\n    });\n  });\n\n  it(`\\`_.unzip\\` should work with tuples of different lengths`, () => {\n    const pair = [\n      [\n        ['barney', 36],\n        ['fred', 40, false],\n      ],\n      [\n        ['barney', 'fred'],\n        [36, 40],\n        [undefined, false],\n      ],\n    ];\n    const actual = unzip(pair[1]) as any;\n    expect('2' in actual[0]).toBeTruthy();\n    expect(actual).toEqual([\n      ['barney', 36, undefined],\n      ['fred', 40, false],\n    ]);\n  });\n\n  it(`\\`_.unzip\\` should support consuming its return value`, () => {\n    const expected = [\n      ['barney', 'fred'],\n      [36, 40],\n    ];\n    // @ts-expect-error - TS doesn't support array types in rest parameters\n    expect(unzip(zip(...unzip(zip(...expected))))).toEqual(expected);\n  });\n\n  it(`\\`_.unzip\\` should work with array-like object`, () => {\n    const array = { 0: { 0: 'a', 1: 1, length: 2 }, 1: { 0: 'b', 1: 2, length: 2 }, length: 2 };\n    const actual = unzip(array);\n    expect(actual).toEqual([\n      ['a', 'b'],\n      [1, 2],\n    ]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unzip).toEqualTypeOf<typeof unzipLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/unzip.ts",
    "content": "import { unzip as unzipToolkit } from '../../array/unzip.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Gathers elements in the same position in an internal array\n * from a grouped array of elements and returns them as a new array.\n *\n * @template T - The type of elements in the nested array.\n * @param {T[][] | ArrayLike<ArrayLike<T>> | null | undefined} array - The nested array to unzip.\n * @returns {T[][]} A new array of unzipped elements.\n *\n * @example\n * const zipped = [['a', true, 1],['b', false, 2]];\n * const result = unzip(zipped);\n * // result will be [['a', 'b'], [true, false], [1, 2]]\n */\nexport function unzip<T>(array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined): T[][] {\n  if (!isArrayLikeObject(array) || !array.length) {\n    return [];\n  }\n  array = isArray(array) ? array : Array.from(array);\n  array = (array as T[][]).filter(item => isArrayLikeObject(item));\n  return unzipToolkit(array as T[][]);\n}\n"
  },
  {
    "path": "src/compat/array/unzipWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unzipWith as unzipWithLodash } from 'lodash';\nimport { map } from './map';\nimport { unzipWith } from './unzipWith';\nimport { unzip } from '../..';\nimport { slice } from '../_internal/slice';\nimport { constant } from '../util/constant';\n\ndescribe('unzipWith', () => {\n  it('should unzip arrays combining regrouped elements with `iteratee`', () => {\n    const array = [\n      [1, 4],\n      [2, 5],\n      [3, 6],\n    ];\n\n    const actual = unzipWith(array, (a, b, c) => a + b + c);\n\n    expect(actual).toEqual([6, 15]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: number[] | undefined;\n\n    unzipWith(\n      [\n        // eslint-disable-next-line\n        // @ts-ignore\n        [1, 3, 5],\n        // eslint-disable-next-line\n        // @ts-ignore\n        [2, 4, 6],\n      ],\n      function () {\n        // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n        args || (args = slice.call(arguments));\n      }\n    );\n\n    expect(args).toEqual([1, 2]);\n  });\n\n  it('should perform a basic unzip when `iteratee` is nullish', () => {\n    const array = [\n      [1, 3],\n      [2, 4],\n    ];\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, constant(unzip(array)));\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = map(values, (value, index) => (index ? unzipWith(array, value) : unzipWith(array)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with array-like objects', () => {\n    const array = { 0: [1, 3], 1: [2, 4], length: 2 };\n\n    expect(unzipWith(array, (a, b) => a + b)).toEqual([3, 7]);\n  });\n\n  it('should work with tuples of different lengths', () => {\n    const array = [\n      ['barney', 36],\n      ['fred', 40, false],\n    ];\n\n    expect(unzipWith(array, (a, b) => [a, b])).toEqual([\n      ['barney', 'fred'],\n      [36, 40],\n      [undefined, false],\n    ]);\n  });\n\n  it('should return an empty array when `array` is an empty array', () => {\n    expect(unzipWith([])).toEqual([]);\n  });\n\n  it('should return an empty array when `array` is null or undefined', () => {\n    expect(unzipWith(null)).toEqual([]);\n    expect(unzipWith(undefined)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unzipWith).toEqualTypeOf<typeof unzipWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/unzipWith.ts",
    "content": "import { unzip as unzipToolkit } from '../../array/unzip.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * This method is like `unzip` except that it accepts an iteratee to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @template T, R\n * @param {ArrayLike<ArrayLike<T>> | null | undefined} array - The array of grouped elements to process.\n * @param {(...values: T[]) => R} iteratee - The function to combine regrouped values.\n * @returns {R[]} Returns the new array of regrouped elements.\n *\n * @example\n * unzipWith([[1, 10, 100], [2, 20, 200]], (a, b) => a + b);\n * // => [3, 30, 300]\n */\nexport function unzipWith<T, R>(\n  array: ArrayLike<ArrayLike<T>> | null | undefined,\n  iteratee: (...values: T[]) => R\n): R[];\n\n/**\n * This method is like `unzip` except that it accepts an iteratee to specify\n * how regrouped values should be combined.\n *\n * @template T\n * @param {ArrayLike<ArrayLike<T>> | null | undefined} array - The array of grouped elements to process.\n * @returns {T[][]} Returns the new array of regrouped elements.\n *\n * @example\n * unzipWith([[1, 10, 100], [2, 20, 200]]);\n * // => [[1, 2], [10, 20], [100, 200]]\n */\nexport function unzipWith<T>(array: ArrayLike<ArrayLike<T>> | null | undefined): T[][];\n\n/**\n * Unzips an array of arrays, applying an `iteratee` function to regrouped elements.\n *\n * If the array is `null` or `undefined`, returns an empty array.\n *\n * @template T\n * @param {T[][] | ArrayLike<ArrayLike<T>> | null | undefined} array - The nested array to unzip. This is an array of arrays,\n * where each inner array contains elements to be unzipped.\n * @param {(...args: any[]) => unknown} iteratee - A function to transform the unzipped elements.\n * @returns {any[]} A new array of unzipped and transformed elements.\n *\n * @example\n * const nestedArray = [[1, 2], [3, 4], [5, 6]];\n * const result = unzipWith(nestedArray, (a, b) => a + b);\n * console.log(result); // [9, 12]\n */\nexport function unzipWith<T>(\n  array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined,\n  iteratee?: ((...args: any[]) => unknown) | null\n): any[] {\n  if (!isArrayLikeObject(array) || !array.length) {\n    return [];\n  }\n\n  const unzipped = isArray(array) ? unzipToolkit(array) : unzipToolkit(Array.from(array, value => Array.from(value)));\n\n  if (!iteratee) {\n    return unzipped;\n  }\n\n  const result: any[] = new Array(unzipped.length);\n\n  for (let i = 0; i < unzipped.length; i++) {\n    const value = unzipped[i];\n\n    result[i] = iteratee(...value);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/without.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { without as withoutLodash } from 'lodash';\nimport { without } from './without';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/without.spec.js#L1\n */\ndescribe('without', () => {\n  it('should return the difference of values', () => {\n    const actual = without([2, 1, 2, 3], 1, 2);\n    expect(actual).toEqual([3]);\n  });\n\n  it('should use strict equality to determine the values to reject', () => {\n    const object1 = { a: 1 };\n    const object2 = { b: 2 };\n    const array = [object1, object2];\n\n    expect(without(array, { a: 1 })).toEqual(array);\n    expect(without(array, object1)).toEqual([object2]);\n  });\n\n  it('should remove all occurrences of each value from an array', () => {\n    const array = [1, 2, 3, 1, 2, 3];\n    expect(without(array, 1, 2)).toEqual([3, 3]);\n  });\n\n  it('should return an empty array when the collection is null or undefined', () => {\n    expect(without(null, 1, 2)).toEqual([]);\n  });\n\n  it('should return an empty array when the collection is not array-like', () => {\n    // @ts-expect-error - invalid argument\n    expect(without(1, 2)).toEqual([]);\n    // @ts-expect-error - invalid argument\n    expect(without(true, 2)).toEqual([]);\n  });\n\n  it('should support array-like object', () => {\n    expect(without({ 0: 1, 1: 2, 2: 3, length: 3 }, 1, 2)).toEqual([3]);\n    expect(without('123', '1', '2')).toEqual([]);\n    expect(without(args, 1, 2)).toEqual([3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(without).toEqualTypeOf<typeof withoutLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/without.ts",
    "content": "import { without as withoutToolkit } from '../../array/without.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Creates an array that excludes all specified values.\n *\n * It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero).\n *\n * @template T The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} array - The array to filter.\n * @param {...T[]} values - The values to exclude.\n * @returns {T[]} A new array without the specified values.\n *\n * @example\n * // Removes the specified values from the array\n * without([1, 2, 3, 4, 5], 2, 4);\n * // Returns: [1, 3, 5]\n *\n * @example\n * // Removes specified string values from the array\n * without(['a', 'b', 'c', 'a'], 'a');\n * // Returns: ['b', 'c']\n */\nexport function without<T>(array: ArrayLike<T> | null | undefined, ...values: T[]): T[] {\n  if (!isArrayLikeObject(array)) {\n    return [];\n  }\n  return withoutToolkit(Array.from(array), ...values);\n}\n"
  },
  {
    "path": "src/compat/array/xor.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { xor as xorLodash } from 'lodash';\nimport { xor } from './xor';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/xor-methods.spec.js\n */\ndescribe('xor', () => {\n  it(`should return the symmetric difference of two arrays`, () => {\n    const actual = xor([2, 1], [2, 3]);\n    expect(actual).toEqual([1, 3]);\n  });\n\n  it(`should return the symmetric difference of multiple arrays`, () => {\n    let actual = xor([2, 1], [2, 3], [3, 4]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xor([1, 2], [2, 1], [1, 2]);\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an empty array when comparing the same array`, () => {\n    const array = [1];\n    const actual = xor(array, array, array);\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an array of unique values`, () => {\n    let actual = xor([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xor([1, 1]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return a new array when a single array is given`, () => {\n    const array = [1];\n    expect(xor(array)).not.toBe(array);\n  });\n\n  it(`should ignore individual secondary arguments`, () => {\n    const array = [0];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(xor(array, 3, null, { 0: 1 })).toEqual(array);\n  });\n\n  it(`should ignore values that are not arrays or \\`arguments\\` objects`, () => {\n    const array = [1, 2];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(xor(array, 3, { 0: 1 }, null)).toEqual(array);\n    expect(xor(null, array, null, [2, 3])).toEqual([1, 3]);\n    expect(xor(array, null, args, null)).toEqual([3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(xor).toEqualTypeOf<typeof xorLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/xor.ts",
    "content": "import { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { toArray } from '../util/toArray.ts';\n\n/**\n * Computes the symmetric difference of the provided arrays, returning an array of elements\n * that exist in only one of the arrays.\n *\n * @template T - The type of elements in the arrays.\n * @param {...(ArrayLike<T> | null | undefined)} arrays - The arrays to compare.\n * @returns {T[]} An array containing the elements that are present in only one of the provided `arrays`.\n *\n * @example\n * // Returns [1, 2, 5, 6]\n * xor([1, 2, 3, 4], [3, 4, 5, 6]);\n *\n * @example\n * // Returns ['a', 'c']\n * xor(['a', 'b'], ['b', 'c']);\n *\n * @example\n * // Returns [1, 3, 5]\n * xor([1, 2], [2, 3], [4, 5]);\n */\nexport function xor<T>(...arrays: Array<ArrayLike<T> | null | undefined>): T[] {\n  const itemCounts: Map<T, number> = new Map();\n\n  for (let i = 0; i < arrays.length; i++) {\n    const array = arrays[i];\n\n    if (!isArrayLikeObject(array)) {\n      continue;\n    }\n\n    const itemSet = new Set(toArray(array));\n\n    for (const item of itemSet) {\n      if (!itemCounts.has(item)) {\n        itemCounts.set(item, 1);\n      } else {\n        itemCounts.set(item, itemCounts.get(item)! + 1);\n      }\n    }\n  }\n\n  const result: T[] = [];\n\n  for (const [item, count] of itemCounts) {\n    if (count === 1) {\n      result.push(item);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/xorBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { xorBy as xorByLodash } from 'lodash';\nimport { xorBy } from './xorBy';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/xor-methods.spec.js\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/xorBy.spec.js\n */\ndescribe('xorBy', () => {\n  it(`should return the symmetric difference of two arrays`, () => {\n    const actual = xorBy([2, 1], [2, 3]);\n    expect(actual).toEqual([1, 3]);\n  });\n\n  it(`should return the symmetric difference of multiple arrays`, () => {\n    let actual = xorBy([2, 1], [2, 3], [3, 4]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xorBy([1, 2], [2, 1], [1, 2]);\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an empty array when comparing the same array`, () => {\n    const array = [1];\n    const actual = xorBy(array, array, array);\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an array of unique values`, () => {\n    let actual = xorBy([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xorBy([1, 1]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return a new array when a single array is given`, () => {\n    const array = [1];\n    expect(xorBy(array)).not.toBe(array);\n  });\n\n  it(`should ignore individual secondary arguments`, () => {\n    const array = [0];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(xorBy(array, 3, null, { 0: 1 } as any)).toEqual(array);\n  });\n\n  it(`should ignore values that are not arrays or \\`arguments\\` objects`, () => {\n    const array = [1, 2];\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(xorBy(array, 3, { 0: 1 } as any, null)).toEqual(array);\n    expect(xorBy(null, array, null, [2, 3])).toEqual([1, 3]);\n    expect(xorBy(array, null, args, null)).toEqual([3]);\n  });\n\n  it('should accept an `iteratee`', () => {\n    let actual: any = xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n    expect(actual).toEqual([1.2, 3.4]);\n\n    actual = xorBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], 'x');\n    expect(actual).toEqual([{ x: 2 }]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    xorBy([2.1, 1.2], [2.3, 3.4], function (...params) {\n      if (args === undefined) {\n        args = params;\n      }\n    });\n\n    expect(args).not.toEqual([1.2, 3.4]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(xorBy).toEqualTypeOf<typeof xorByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/xorBy.ts",
    "content": "import { differenceBy } from './differenceBy.ts';\nimport { intersectionBy } from './intersectionBy.ts';\nimport { last } from './last.ts';\nimport { unionBy } from './unionBy.ts';\nimport { windowed } from '../../array/windowed.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * This method is like `xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n * // => [1.2, 4.3]\n *\n * @example\n * xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nexport function xorBy<T>(arrays: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];\n\n/**\n * This method is like `xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n * // => [1.2, 4.3]\n */\nexport function xorBy<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  iteratee?: ValueIteratee<T>\n): T[];\n\n/**\n * This method is like `xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {...Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>} iteratee - The iteratee invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * xorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);\n * // => [1.2, 3.4, 5.6]\n */\nexport function xorBy<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  ...iteratee: Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>\n): T[];\n\n/**\n * Computes the symmetric difference between two arrays using a custom mapping function.\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection, determined by the result of the mapping function.\n *\n * @template T - Type of elements in the input arrays.\n * @template U - Type of the values returned by the mapping function.\n *\n * @param {...(ArrayLike<T> | null | undefined | PropertyKey | Partial<T> | ((value: T) => unknown))} values - The arrays to inspect, or the function to map array elements to comparison values.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = obj => obj.id;\n * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorBy<T>(...values: Array<ArrayLike<T> | null | undefined | ValueIteratee<T>>): T[] {\n  const lastValue = last(values);\n\n  let mapper = identity;\n\n  if (!isArrayLikeObject(lastValue) && lastValue != null) {\n    mapper = iteratee(lastValue);\n    values = values.slice(0, -1);\n  }\n\n  const arrays = values.filter(isArrayLikeObject) as [any];\n\n  const union = unionBy(...arrays, mapper);\n  const intersections = windowed(arrays, 2).map(([arr1, arr2]) => intersectionBy(arr1, arr2, mapper)) as [any];\n\n  return differenceBy(union, unionBy(...intersections, mapper), mapper) as T[];\n}\n"
  },
  {
    "path": "src/compat/array/xorWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { xorWith as xorWithLodash } from 'lodash';\nimport { xorWith } from './xorWith';\nimport { isEqual } from '../../predicate';\nimport { args } from '../_internal/args';\n\n/**\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/xor-methods.spec.js\n * @see https://github.com/lodash/lodash/blob/v5-wip/test/xorWith.spec.js\n */\ndescribe('xorWith', () => {\n  it(`should return the symmetric difference of two arrays`, () => {\n    const actual = xorWith([2, 1], [2, 3]);\n    expect(actual).toEqual([1, 3]);\n  });\n\n  it(`should return the symmetric difference of multiple arrays`, () => {\n    let actual = xorWith([2, 1], [2, 3], [3, 4]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xorWith([1, 2], [2, 1], [1, 2]);\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an empty array when comparing the same array`, () => {\n    const array = [1];\n    const actual = xorWith(array, array, array);\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should return an array of unique values`, () => {\n    let actual = xorWith([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);\n    expect(actual).toEqual([1, 4]);\n\n    actual = xorWith([1, 1]);\n    expect(actual).toEqual([1]);\n  });\n\n  it(`should return a new array when a single array is given`, () => {\n    const array = [1];\n    expect(xorWith(array)).not.toBe(array);\n  });\n\n  it(`should ignore individual secondary arguments`, () => {\n    const array = [0];\n    expect(xorWith(array, 3 as any, null, { 0: 1 } as any)).toEqual(array);\n  });\n\n  it(`should ignore values that are not arrays or \\`arguments\\` objects`, () => {\n    const array = [1, 2];\n    expect(xorWith(array, 3 as any, { 0: 1 } as any, null)).toEqual(array);\n    expect(xorWith(null, array, null, [2, 3])).toEqual([1, 3]);\n    expect(xorWith(array, null, args, null)).toEqual([3]);\n  });\n\n  it('should work with a `comparator`', () => {\n    const objects = [\n      { x: 1, y: 2 },\n      { x: 2, y: 1 },\n    ];\n    const others = [\n      { x: 1, y: 1 },\n      { x: 1, y: 2 },\n    ];\n    const actual = xorWith(objects, others, isEqual);\n\n    expect(actual).toEqual([objects[1], others[0]]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(xorWith).toEqualTypeOf<typeof xorWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/xorWith.ts",
    "content": "import { differenceWith } from './differenceWith.ts';\nimport { intersectionWith } from './intersectionWith.ts';\nimport { last } from './last.ts';\nimport { unionWith } from './unionWith.ts';\nimport { windowed } from '../../array/windowed.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * This method is like `xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.\n * @param {(a: T, b: T) => boolean} [comparator] - The comparator invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * const others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n * xorWith(objects, others, isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\nexport function xorWith<T>(arrays: ArrayLike<T> | null | undefined, comparator?: (a: T, b: T) => boolean): T[];\n\n/**\n * This method is like `xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {(a: T, b: T) => boolean} [comparator] - The comparator invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * xorWith([1, 2], [2, 3], (a, b) => a === b);\n * // => [1, 3]\n */\nexport function xorWith<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  comparator?: (a: T, b: T) => boolean\n): T[];\n\n/**\n * This method is like `xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.\n * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.\n * @param {...Array<(a: T, b: T) => boolean | ArrayLike<T> | null | undefined>} comparator - The comparator invoked per element.\n * @returns {T[]} Returns the new array of values.\n *\n * @example\n * xorWith([1], [2], [3], (a, b) => a === b);\n * // => [1, 2, 3]\n */\nexport function xorWith<T>(\n  arrays: ArrayLike<T> | null | undefined,\n  arrays2: ArrayLike<T> | null | undefined,\n  arrays3: ArrayLike<T> | null | undefined,\n  ...comparator: Array<((a: T, b: T) => boolean) | ArrayLike<T> | null | undefined>\n): T[];\n\n/**\n * Creates an array of unique values that is the symmetric difference of the given arrays using a custom comparator function.\n *\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection, determined by the comparator function.\n *\n * @template T - Type of elements in the input arrays.\n *\n * @param {...(ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean))} values - The arrays to inspect, or the comparator function.\n * @returns {T[]} An array containing the elements that are present in exactly one of the arrays\n *  as determined by the comparator.\n *\n * @example\n * // Custom comparator function for objects with an 'id' property\n * const idComparator = (a, b) => a.id === b.id;\n * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idComparator);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorWith<T>(...values: Array<ArrayLike<T> | null | undefined | ((a: T, b: T) => boolean)>): T[] {\n  const lastValue = last(values);\n\n  let comparator = (a: T, b: T) => a === b;\n\n  if (typeof lastValue === 'function') {\n    comparator = lastValue as (a: T, b: T) => boolean;\n    values = values.slice(0, -1);\n  }\n\n  const arrays = values.filter(isArrayLikeObject) as T[][];\n\n  // eslint-disable-next-line\n  // @ts-ignore\n  const union = unionWith(...arrays, comparator);\n  const intersections = windowed(arrays, 2).map(([arr1, arr2]) => intersectionWith(arr1, arr2, comparator));\n\n  // eslint-disable-next-line\n  // @ts-ignore\n  return differenceWith(union, unionWith(...intersections, comparator), comparator);\n}\n"
  },
  {
    "path": "src/compat/array/zip.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { zip as zipLodash } from 'lodash';\nimport { zip } from './zip';\nimport { unzip } from '../../array/unzip';\nimport { falsey } from '../_internal/falsey';\nimport { stubArray } from '../util/stubArray';\n\ndescribe('zip', () => {\n  const object = {\n    'an empty array': [[], []],\n    '0-tuples': [[[], []], []],\n    '2-tuples': [\n      [\n        ['barney', 'fred'],\n        [36, 40],\n      ],\n      [\n        ['barney', 36],\n        ['fred', 40],\n      ],\n    ],\n    '3-tuples': [\n      [\n        ['barney', 'fred'],\n        [36, 40],\n        [false, true],\n      ],\n      [\n        ['barney', 36, false],\n        ['fred', 40, true],\n      ],\n    ],\n  };\n\n  Object.entries(object).forEach(([key, pair]) => {\n    it(`\\`_.zip\\` should work with ${key}`, () => {\n      const actual = zip(...pair[0]);\n      expect(actual).toEqual(pair[1]);\n    });\n  });\n\n  it(`\\`_.zip\\` should work with tuples of different lengths`, () => {\n    const pair = [\n      [\n        ['barney', 36],\n        ['fred', 40, false],\n      ],\n      [\n        ['barney', 'fred'],\n        [36, 40],\n        [undefined, false],\n      ],\n    ];\n\n    let actual = zip(...pair[0]);\n    expect('0' in actual[2]).toBeTruthy();\n    expect(actual).toEqual(pair[1]);\n\n    actual = unzip(actual) as any;\n    expect('2' in actual[0]).toBeTruthy();\n    expect(actual).toEqual([\n      ['barney', 36, undefined],\n      ['fred', 40, false],\n    ]);\n  });\n\n  it(`\\`_.zip\\` should treat falsey values as empty arrays`, () => {\n    const expected = falsey.map(stubArray);\n\n    // @ts-expect-error - unknown type\n    const actual = falsey.map(value => zip(value, value, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`_.zip\\` should ignore values that are not arrays or \\`arguments\\` objects`, () => {\n    const array = [[1, 2], [3, 4], null, undefined, { 0: 1 }];\n    // @ts-expect-error - TS doesn't support array types with a spread operator\n    expect(zip(...array)).toEqual([\n      [1, 3],\n      [2, 4],\n    ]);\n  });\n\n  it(`\\`_.zip\\` should support consuming its return value`, () => {\n    const expected: any[][] = [\n      ['barney', 'fred'],\n      [36, 40],\n    ];\n\n    expect(unzip(zip(...unzip(zip(...expected))))).toEqual(expected);\n  });\n\n  it(`\\`_.zip\\` should work with array-like object`, () => {\n    const array = { 0: 'a', 1: 'b', length: 2 };\n    expect(zip(array)).toEqual([['a'], ['b']]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(zip).toEqualTypeOf<typeof zipLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/zip.ts",
    "content": "import { zip as zipToolkit } from '../../array/zip.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @returns {Array<[T | undefined, U | undefined]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zip(arr1, arr2);\n * // result will be [[1, 'a'], [2, 'b'], [3, 'c']]\n */\n/**\n * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,\n * the second of which contains the second elements of the given arrays, and so on.\n *\n * @template T, U\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @returns {Array<[T | undefined, U | undefined]>} Returns the new array of grouped elements.\n *\n * @example\n * zip([1, 2], ['a', 'b']);\n * // => [[1, 'a'], [2, 'b']]\n */\nexport function zip<T, U>(arr1: ArrayLike<T>, arr2: ArrayLike<U>): Array<[T | undefined, U | undefined]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U, V\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const result = zip(arr1, arr2, arr3);\n * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\n/**\n * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,\n * the second of which contains the second elements of the given arrays, and so on.\n *\n * @template T, U, V\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined]>} Returns the new array of grouped elements.\n *\n * @example\n * zip([1, 2], ['a', 'b'], [true, false]);\n * // => [[1, 'a', true], [2, 'b', false]]\n */\nexport function zip<T, U, V>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>\n): Array<[T | undefined, U | undefined, V | undefined]>;\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U, V, W\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined, W | undefined]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const arr4 = [null, null, null];\n * const result = zip(arr1, arr2, arr3, arr4);\n * // result will be [[1, 'a', true, null], [2, 'b', false, null], [3, 'c', undefined, null]]\n */\n/**\n * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,\n * the second of which contains the second elements of the given arrays, and so on.\n *\n * @template T, U, V, W\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined, W | undefined]>} Returns the new array of grouped elements.\n *\n * @example\n * zip([1], ['a'], [true], [null]);\n * // => [[1, 'a', true, null]]\n */\nexport function zip<T, U, V, W>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>,\n  arr4: ArrayLike<W>\n): Array<[T | undefined, U | undefined, V | undefined, W | undefined]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T, U, V, W\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @param {ArrayLike<X>} arr5 - The fifth array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined, W | undefined, X | undefined]>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const arr4 = [null, null, null];\n * const arr5 = [undefined, undefined, undefined];\n * const result = zip(arr1, arr2, arr3, arr4, arr5);\n * // result will be [[1, 'a', true, null, undefined], [2, 'b', false, null, undefined], [3, 'c', undefined, null, undefined]]\n */\n/**\n * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,\n * the second of which contains the second elements of the given arrays, and so on.\n *\n * @template T, U, V, W, X\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @param {ArrayLike<X>} arr5 - The fifth array to zip.\n * @returns {Array<[T | undefined, U | undefined, V | undefined, W | undefined, X | undefined]>} Returns the new array of grouped elements.\n *\n * @example\n * zip([1], ['a'], [true], [null], [undefined]);\n * // => [[1, 'a', true, null, undefined]]\n */\nexport function zip<T, U, V, W, X>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>,\n  arr4: ArrayLike<W>,\n  arr5: ArrayLike<X>\n): Array<[T | undefined, U | undefined, V | undefined, W | undefined, X | undefined]>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T\n * @param {Array<ArrayLike<any> | null | undefined>} arrays - The arrays to zip.\n * @returns {Array<Array<T | undefined>>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const arr4 = [null, null, null];\n * const arr5 = [undefined, undefined, undefined];\n * const result = zip(arr1, arr2, arr3, arr4, arr5);\n * // result will be [[1, 'a', true, null, undefined], [2, 'b', false, null, undefined], [3, 'c', undefined, null, undefined]]\n */\n/**\n * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,\n * the second of which contains the second elements of the given arrays, and so on.\n *\n * @template T\n * @param {...Array<ArrayLike<T> | null | undefined>} arrays - The arrays to process.\n * @returns {Array<Array<T | undefined>>} Returns the new array of grouped elements.\n *\n * @example\n * zip([1, 2], ['a', 'b'], [true, false]);\n * // => [[1, 'a', true], [2, 'b', false]]\n */\nexport function zip<T>(...arrays: Array<ArrayLike<T> | null | undefined>): Array<Array<T | undefined>>;\n\n/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @template T\n * @param {Array<ArrayLike<any> | null | undefined>} arrays - The arrays to zip.\n * @returns {Array<Array<T | undefined>>} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const arr3 = [true, false];\n * const arr4 = [null, null, null];\n * const arr5 = [undefined, undefined, undefined];\n * const result = zip(arr1, arr2, arr3, arr4, arr5);\n * // result will be [[1, 'a', true, null, undefined], [2, 'b', false, null, undefined], [3, 'c', undefined, null, undefined]]\n */\nexport function zip<T>(...arrays: Array<ArrayLike<any> | null | undefined>): Array<Array<T | undefined>> {\n  if (!arrays.length) {\n    return [];\n  }\n  // @ts-expect-error - TS doesn't support array types with a spread operator\n  return zipToolkit(...arrays.filter(group => isArrayLikeObject(group)));\n}\n"
  },
  {
    "path": "src/compat/array/zipObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { each } from '..';\nimport type { zipObject as zipObjectLodash } from 'lodash';\nimport { zipObject } from './zipObject';\n\ndescribe('zipObject', () => {\n  const object = { barney: 36, fred: 40 };\n  it(`should zip together key/value arrays into an object`, () => {\n    const actual = zipObject(['barney', 'fred'], [36, 40]);\n    expect(actual).toEqual(object);\n  });\n\n  it(`should ignore extra \\`values\\``, () => {\n    expect(zipObject(['a'], [1, 2])).toEqual({ a: 1 });\n  });\n\n  it(`should assign \\`undefined\\` values for extra \\`keys\\``, () => {\n    expect(zipObject(['a', 'b'], [1])).toEqual({ a: 1, b: undefined });\n  });\n\n  it(`should not support deep paths`, () => {\n    each(['a.b.c', ['a', 'b', 'c']], (path, index) => {\n      const expected = index ? { 'a,b,c': 1 } : { 'a.b.c': 1 };\n      // @ts-expect-error - invalid argument\n      expect(zipObject([path], [1])).toEqual(expected);\n    });\n  });\n\n  it('should return an empty object if no keys are provided', () => {\n    expect(zipObject([])).toEqual({});\n  });\n\n  it('should return an empty object if no values are provided', () => {\n    expect(zipObject(['a', 'b'])).toEqual({});\n  });\n\n  it('should return an empty object if no keys and no values are provided', () => {\n    expect(zipObject([], [])).toEqual({});\n  });\n\n  it('should handle undefined parameters with default values', () => {\n    expect(zipObject()).toEqual({});\n    expect(zipObject(undefined)).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(zipObject).toEqualTypeOf<typeof zipObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/zipObject.ts",
    "content": "import { assignValue } from '../_internal/assignValue.ts';\n\n/**\n * Combines two arrays, one of property names and one of corresponding values, into a single object.\n *\n * @template T - The type of values in the values array\n * @param {ArrayLike<PropertyKey>} props - An array of property names\n * @param {ArrayLike<T>} values - An array of values corresponding to the property names\n * @returns {Record<string, T>} A new object composed of the given property names and values\n *\n * @example\n * const props = ['a', 'b', 'c'];\n * const values = [1, 2, 3];\n * zipObject(props, values);\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function zipObject<T>(props: ArrayLike<PropertyKey>, values: ArrayLike<T>): Record<string, T>;\n\n/**\n * Creates an object from an array of property names, with undefined values.\n *\n * @param {ArrayLike<PropertyKey>} [props] - An array of property names\n * @returns {Record<string, undefined>} A new object with the given property names and undefined values\n *\n * @example\n * const props = ['a', 'b', 'c'];\n * zipObject(props);\n * // => { a: undefined, b: undefined, c: undefined }\n */\nexport function zipObject(props?: ArrayLike<PropertyKey>): Record<string, undefined>;\n\n/**\n * Combines two arrays, one of property names and one of corresponding values, into a single object.\n *\n * This function takes two arrays: one containing property names and another containing corresponding values.\n * It returns a new object where the property names from the first array are keys, and the corresponding elements\n * from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will\n * have `undefined` as their values.\n *\n * @template P - The type of elements in the array.\n * @template V - The type of elements in the array.\n * @param {ArrayLike<K>} keys - An array of property names.\n * @param {ArrayLike<V>} values - An array of values corresponding to the property names.\n * @returns {Record<K, V>} - A new object composed of the given property names and values.\n *\n * @example\n * const keys = ['a', 'b', 'c'];\n * const values = [1, 2, 3];\n * const result = zipObject(keys, values);\n * // result will be { a: 1, b: 2, c: 3 }\n *\n * const keys2 = ['a', 'b', 'c'];\n * const values2 = [1, 2];\n * const result2 = zipObject(keys2, values2);\n * // result2 will be { a: 1, b: 2, c: undefined }\n *\n * const keys2 = ['a', 'b'];\n * const values2 = [1, 2, 3];\n * const result2 = zipObject(keys2, values2);\n * // result2 will be { a: 1, b: 2 }\n */\nexport function zipObject<K extends PropertyKey, V>(keys: ArrayLike<K> = [], values: ArrayLike<V> = []): Record<K, V> {\n  const result = {} as Record<K, V>;\n\n  for (let i = 0; i < keys.length; i++) {\n    assignValue(result, keys[i], values[i]);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/zipObjectDeep.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { zipObjectDeep as zipObjectDeepLodash } from 'lodash';\nimport { zipObjectDeep } from './zipObjectDeep.ts';\n\ndescribe('zipObjectDeep', () => {\n  it('creates an object from two arrays of keys and values', () => {\n    const symbols = [Symbol('a'), Symbol('b')];\n\n    expect(zipObjectDeep(symbols, [1, 2])).toEqual({ [symbols[0]]: 1, [symbols[1]]: 2 });\n    expect(zipObjectDeep([], [])).toEqual({});\n    expect(zipObjectDeep(['a'], [1])).toEqual({ a: 1 });\n    expect(zipObjectDeep([0, 1], [1, 2])).toEqual({ 0: 1, 1: 2 });\n    expect(zipObjectDeep([0, 'a.b', symbols[0], 'a.c[0]', 'a.c[2].a'], [1, 2, 3, 4, 5])).toEqual({\n      0: 1,\n      [symbols[0]]: 3,\n      a: { b: 2, c: [4, undefined, { a: 5 }] },\n    });\n    expect(zipObjectDeep(['a', 'b'], [1, 2, 3])).toEqual({ a: 1, b: 2 });\n    expect(zipObjectDeep(['a', 'b', 'c'], [1, 2])).toEqual({ a: 1, b: 2, c: undefined });\n    expect(zipObjectDeep(['a.b.c', 'd.e.f'], [1, 2])).toEqual({ a: { b: { c: 1 } }, d: { e: { f: 2 } } });\n    expect(zipObjectDeep(['a.b.c', 'a.b.d', 'a.b.e.f'], [1, 2, 3])).toEqual({ a: { b: { c: 1, d: 2, e: { f: 3 } } } });\n    expect(zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2])).toEqual({ a: { b: [{ c: 1 }, { d: 2 }] } });\n  });\n\n  it('should zip together key/value arrays into an object', () => {\n    const result = zipObjectDeep(['barney', 'fred'], [36, 40]);\n    expect(result).toEqual({ barney: 36, fred: 40 });\n  });\n\n  it('should ignore extra `values`', () => {\n    expect(zipObjectDeep(['a'], [1, 2])).toEqual({ a: 1 });\n  });\n\n  it('should assign `undefined` values for extra `keys`', () => {\n    expect(zipObjectDeep(['a', 'b'], [1])).toEqual({ a: 1, b: undefined });\n  });\n\n  it('should support deep paths', () => {\n    expect(zipObjectDeep(['a.b.c'], [1])).toEqual({ a: { b: { c: 1 } } });\n  });\n\n  it('should return an empty object when given null or undefined `keys`', () => {\n    expect(zipObjectDeep(null as any, [1])).toEqual({});\n    expect(zipObjectDeep(undefined as any, [1])).toEqual({});\n  });\n\n  it('should support array-like keys', () => {\n    expect(zipObjectDeep({ 0: ['a'], length: 1 }, [1])).toEqual({ a: 1 });\n    expect(zipObjectDeep('12', [1, 2])).toEqual({ 1: 1, 2: 2 });\n  });\n\n  it('should support array-like values', () => {\n    expect(zipObjectDeep(['a'], { 0: 1, length: 1 })).toEqual({ a: 1 });\n    expect(zipObjectDeep(['a', 'b'], '12')).toEqual({ a: '1', b: '2' });\n  });\n\n  it('should treat values as empty arrays when keys are not array-like', () => {\n    expect(zipObjectDeep([1, 2, 3], undefined)).toEqual({ 1: undefined, 2: undefined, 3: undefined });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(zipObjectDeep).toEqualTypeOf<typeof zipObjectDeepLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/zipObjectDeep.ts",
    "content": "import { zip } from '../../array/zip.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { set } from '../object/set.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\n\n/**\n * Creates a deeply nested object given arrays of paths and values.\n *\n * This function takes two arrays: one containing arrays of property paths, and the other containing corresponding values.\n * It returns a new object where paths from the first array are used as key paths to set values, with corresponding elements from the second array as values.\n * Paths can be dot-separated strings or arrays of property names.\n *\n * If the `keys` array is longer than the `values` array, the remaining keys will have `undefined` as their values.\n *\n * @template P - The type of property paths.\n * @template V - The type of values corresponding to the property paths.\n * @param {ArrayLike<P | P[]>} keys - An array of property paths, each path can be a dot-separated string or an array of property names.\n * @param {ArrayLike<V>} values - An array of values corresponding to the property paths.\n * @returns {Record<P, V>} A new object composed of the given property paths and values.\n *\n * @example\n * const paths = ['a.b.c', 'd.e.f'];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n *\n * @example\n * const paths = [['a', 'b', 'c'], ['d', 'e', 'f']];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { a: { b: { c: 1 } }, d: { e: { f: 2 } } }\n *\n * @example\n * const paths = ['a.b[0].c', 'a.b[1].d'];\n * const values = [1, 2];\n * const result = zipObjectDeep(paths, values);\n * // result will be { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\nexport function zipObjectDeep(keys?: ArrayLike<PropertyPath>, values?: ArrayLike<any>): object {\n  const result = {};\n  if (!isArrayLike(keys)) {\n    return result;\n  }\n  if (!isArrayLike(values)) {\n    values = [];\n  }\n  const zipped = zip(Array.from(keys), Array.from(values));\n\n  for (let i = 0; i < zipped.length; i++) {\n    const [key, value] = zipped[i];\n\n    if (key != null) {\n      set(result, key, value);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/array/zipWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { zipWith as zipWithLodash } from 'lodash';\nimport { map } from './map';\nimport { zip } from './zip';\nimport { zipWith } from './zipWith';\nimport { identity } from '../compat';\nimport { constant } from '../util/constant';\n\ndescribe('zipWith', () => {\n  it('should zip arrays combining grouped elements with `iteratee`', () => {\n    const array1 = [1, 2, 3];\n    const array2 = [4, 5, 6];\n    const array3 = [7, 8, 9];\n\n    let actual = zipWith(array1, array2, array3, (a, b, c) => a + b + c);\n    expect(actual).toEqual([12, 15, 18]);\n\n    actual = zipWith(array1, [], (a, b) => a + (b || 0));\n    expect(actual).toEqual([1, 2, 3]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    zipWith([1, 2], [3, 4], [5, 6], function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = [...arguments]);\n    });\n\n    expect(args).toEqual([1, 3, 5]);\n  });\n\n  it('should perform a basic zip when `iteratee` is nullish', () => {\n    const array1 = [1, 2];\n    const array2 = [3, 4];\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, constant(zip(array1, array2)));\n\n    const actual = map(values, (value, index) => (index ? zipWith(array1, array2, value) : zipWith(array1, array2)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should handle null and undefined values', () => {\n    expect(zipWith(null)).toEqual([]);\n    expect(zipWith(undefined)).toEqual([]);\n    expect(zipWith()).toEqual([]);\n  });\n\n  it('should return an empty array when no arrays are provided', () => {\n    expect(zipWith(identity)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(zipWith).toEqualTypeOf<typeof zipWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/array/zipWith.ts",
    "content": "import { unzip } from './unzip.ts';\nimport { isFunction } from '../../predicate/isFunction.ts';\n\n/**\n * Combines one array into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template R - The type of elements in the resulting array.\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {(item: T) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\n\nexport function zipWith<T, R>(arr1: ArrayLike<T>, combine: (item: T) => R): R[];\n\n/**\n * Combines two arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template R - The type of elements in the resulting array.\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {(item1: T, item2: U) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, R>(arr1: ArrayLike<T>, arr2: ArrayLike<U>, combine: (item1: T, item2: U) => R): R[];\n\n/**\n * Combines three arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template V - The type of elements in the third array.\n * @template R - The type of elements in the resulting array.\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {(item1: T, item2: U, item3: V) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, V, R>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>,\n  combine: (item1: T, item2: U, item3: V) => R\n): R[];\n\n/**\n * Combines four arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template V - The type of elements in the third array.\n * @template W - The type of elements in the fourth array.\n * @template R - The type of elements in the resulting array.\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @param {(item1: T, item2: U, item3: V, item4: W) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, V, W, R>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>,\n  arr4: ArrayLike<W>,\n  combine: (item1: T, item2: U, item3: V, item4: W) => R\n): R[];\n\n/**\n * Combines five arrays into a single array using a custom combiner function.\n *\n * @template T - The type of elements in the first array.\n * @template U - The type of elements in the second array.\n * @template V - The type of elements in the third array.\n * @template W - The type of elements in the fourth array.\n * @template X - The type of elements in the fifth array.\n * @template R - The type of elements in the resulting array.\n * @param {ArrayLike<T>} arr1 - The first array to zip.\n * @param {ArrayLike<U>} arr2 - The second array to zip.\n * @param {ArrayLike<V>} arr3 - The third array to zip.\n * @param {ArrayLike<W>} arr4 - The fourth array to zip.\n * @param {ArrayLike<X>} arr5 - The fifth array to zip.\n * @param {(item1: T, item2: U, item3: V, item4: W, item5: X) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n */\nexport function zipWith<T, U, V, W, X, R>(\n  arr1: ArrayLike<T>,\n  arr2: ArrayLike<U>,\n  arr3: ArrayLike<V>,\n  arr4: ArrayLike<W>,\n  arr5: ArrayLike<X>,\n  combine: (item1: T, item2: U, item3: V, item4: W, item5: X) => R\n): R[];\n\n/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes one array and a variable number of additional arrays,\n * applying the provided combiner function to the corresponding elements of each array.\n * If the input arrays are of different lengths, the resulting array will have the length\n * of the longest input array, with undefined values for missing elements.\n *\n * @template T - The type of elements in the input arrays.\n * @template R - The type of elements in the resulting array.\n * @param {Array<((...group: T[]) => R) | ArrayLike<T> | null | undefined>} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zipWith(arr1, arr2, (num, char) => `${num}${char}`);\n * // result will be ['1a', '2b', '3c']\n */\nexport function zipWith<T, R>(...combine: Array<((...group: T[]) => R) | ArrayLike<T> | null | undefined>): R[];\n\n/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes one array and a variable number of additional arrays,\n * applying the provided combiner function to the corresponding elements of each array.\n * If the input arrays are of different lengths, the resulting array will have the length\n * of the longest input array, with undefined values for missing elements.\n *\n * @template T - The type of elements in the input arrays.\n * @template R - The type of elements in the resulting array.\n * @param {Array<((...group: T[]) => R) | ArrayLike<T> | null | undefined>} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zipWith(arr1, arr2, (num, char) => `${num}${char}`);\n * // result will be ['1a', '2b', '3c']\n */\nexport function zipWith<T, R>(...combine: Array<((...group: T[]) => R) | ArrayLike<T> | null | undefined>): R[] {\n  let iteratee = combine.pop();\n\n  if (!isFunction(iteratee)) {\n    combine.push(iteratee);\n    iteratee = undefined;\n  }\n\n  if (!combine?.length) {\n    return [];\n  }\n\n  const result = unzip(combine as ArrayLike<ArrayLike<T>>);\n\n  if (iteratee == null) {\n    return result as R[];\n  }\n\n  return result.map(group => iteratee(...group)) as R[];\n}\n"
  },
  {
    "path": "src/compat/compat.ts",
    "content": "export { castArray } from './array/castArray.ts';\nexport { chunk } from './array/chunk.ts';\nexport { compact } from './array/compact.ts';\nexport { concat } from './array/concat.ts';\nexport { countBy } from './array/countBy.ts';\nexport { difference } from './array/difference.ts';\nexport { differenceBy } from './array/differenceBy.ts';\nexport { differenceWith } from './array/differenceWith.ts';\nexport { drop } from './array/drop.ts';\nexport { dropRight } from './array/dropRight.ts';\nexport { dropRightWhile } from './array/dropRightWhile.ts';\nexport { dropWhile } from './array/dropWhile.ts';\nexport { each } from './array/each.ts';\nexport { eachRight } from './array/eachRight.ts';\nexport { every } from './array/every.ts';\nexport { fill } from './array/fill.ts';\nexport { filter } from './array/filter.ts';\nexport { find } from './array/find.ts';\nexport { findIndex } from './array/findIndex.ts';\nexport { findLast } from './array/findLast.ts';\nexport { findLastIndex } from './array/findLastIndex.ts';\nexport { first } from './array/first.ts';\nexport { flatMap } from './array/flatMap.ts';\nexport { flatMapDeep } from './array/flatMapDeep.ts';\nexport { flatMapDepth } from './array/flatMapDepth.ts';\nexport { flatten } from './array/flatten.ts';\nexport { flattenDeep } from './array/flattenDeep.ts';\nexport { flattenDepth } from './array/flattenDepth.ts';\nexport { forEach } from './array/forEach.ts';\nexport { forEachRight } from './array/forEachRight.ts';\nexport { groupBy } from './array/groupBy.ts';\nexport { head } from './array/head.ts';\nexport { includes } from './array/includes.ts';\nexport { indexOf } from './array/indexOf.ts';\nexport { initial } from './array/initial.ts';\nexport { intersection } from './array/intersection.ts';\nexport { intersectionBy } from './array/intersectionBy.ts';\nexport { intersectionWith } from './array/intersectionWith.ts';\nexport { invokeMap } from './array/invokeMap.ts';\nexport { join } from './array/join.ts';\nexport { keyBy } from './array/keyBy.ts';\nexport { last } from './array/last.ts';\nexport { lastIndexOf } from './array/lastIndexOf.ts';\nexport { map } from './array/map.ts';\nexport { nth } from './array/nth.ts';\nexport { orderBy } from './array/orderBy.ts';\nexport { partition } from './array/partition.ts';\nexport { pull } from './array/pull.ts';\nexport { pullAll } from './array/pullAll.ts';\nexport { pullAllBy } from './array/pullAllBy.ts';\nexport { pullAllWith } from './array/pullAllWith.ts';\nexport { pullAt } from './array/pullAt.ts';\nexport { reduce } from './array/reduce.ts';\nexport { reduceRight } from './array/reduceRight.ts';\nexport { reject } from './array/reject.ts';\nexport { remove } from './array/remove.ts';\nexport { reverse } from './array/reverse.ts';\nexport { sample } from './array/sample.ts';\nexport { sampleSize } from './array/sampleSize.ts';\nexport { shuffle } from './array/shuffle.ts';\nexport { size } from './array/size.ts';\nexport { slice } from './array/slice.ts';\nexport { some } from './array/some.ts';\nexport { sortBy } from './array/sortBy.ts';\nexport { sortedIndex } from './array/sortedIndex.ts';\nexport { sortedIndexBy } from './array/sortedIndexBy.ts';\nexport { sortedIndexOf } from './array/sortedIndexOf.ts';\nexport { sortedLastIndex } from './array/sortedLastIndex.ts';\nexport { sortedLastIndexBy } from './array/sortedLastIndexBy.ts';\nexport { sortedLastIndexOf } from './array/sortedLastIndexOf.ts';\n// export { sortedUniq } from './array/sortedUniq.ts';\n// export { sortedUniqBy } from './array/sortedUniqBy.ts';\nexport { tail } from './array/tail.ts';\nexport { take } from './array/take.ts';\nexport { takeRight } from './array/takeRight.ts';\nexport { takeRightWhile } from './array/takeRightWhile.ts';\nexport { takeWhile } from './array/takeWhile.ts';\nexport { union } from './array/union.ts';\nexport { unionBy } from './array/unionBy.ts';\nexport { unionWith } from './array/unionWith.ts';\nexport { uniq } from './array/uniq.ts';\nexport { uniqBy } from './array/uniqBy.ts';\nexport { uniqWith } from './array/uniqWith.ts';\nexport { unzip } from './array/unzip.ts';\nexport { unzipWith } from './array/unzipWith.ts';\nexport { without } from './array/without.ts';\nexport { xor } from './array/xor.ts';\nexport { xorBy } from './array/xorBy.ts';\nexport { xorWith } from './array/xorWith.ts';\nexport { zip } from './array/zip.ts';\nexport { zipObject } from './array/zipObject.ts';\nexport { zipObjectDeep } from './array/zipObjectDeep.ts';\nexport { zipWith } from './array/zipWith.ts';\n\nexport { after } from './function/after.ts';\nexport { ary } from './function/ary.ts';\nexport { attempt } from './function/attempt.ts';\nexport { before } from './function/before.ts';\nexport { bind } from './function/bind.ts';\nexport { bindKey } from './function/bindKey.ts';\nexport { curry } from './function/curry.ts';\nexport { curryRight } from './function/curryRight.ts';\nexport { debounce, type DebouncedFunc } from './function/debounce.ts';\nexport { defer } from './function/defer.ts';\nexport { delay } from './function/delay.ts';\nexport { flip } from './function/flip.ts';\nexport { flow } from './function/flow.ts';\nexport { flowRight } from './function/flowRight.ts';\nexport { memoize } from './function/memoize.ts';\nexport { negate } from './function/negate.ts';\nexport { nthArg } from './function/nthArg.ts';\nexport { once } from './function/once.ts';\nexport { overArgs } from './function/overArgs.ts';\nexport { partial } from './function/partial.ts';\nexport { partialRight } from './function/partialRight.ts';\nexport { rearg } from './function/rearg.ts';\nexport { rest } from './function/rest.ts';\nexport { spread } from './function/spread.ts';\nexport { throttle } from './function/throttle.ts';\nexport { unary } from './function/unary.ts';\nexport { wrap } from './function/wrap.ts';\n\nexport { add } from './math/add.ts';\nexport { ceil } from './math/ceil.ts';\nexport { clamp } from './math/clamp.ts';\nexport { divide } from './math/divide.ts';\nexport { floor } from './math/floor.ts';\nexport { inRange } from './math/inRange.ts';\nexport { max } from './math/max.ts';\nexport { maxBy } from './math/maxBy.ts';\nexport { mean } from './math/mean.ts';\nexport { meanBy } from './math/meanBy.ts';\nexport { min } from './math/min.ts';\nexport { minBy } from './math/minBy.ts';\nexport { multiply } from './math/multiply.ts';\nexport { parseInt } from './math/parseInt.ts';\nexport { random } from './math/random.ts';\nexport { range } from './math/range.ts';\nexport { rangeRight } from './math/rangeRight.ts';\nexport { round } from './math/round.ts';\nexport { subtract } from './math/subtract.ts';\nexport { sum } from './math/sum.ts';\nexport { sumBy } from './math/sumBy.ts';\n\nexport { isEqual } from '../predicate/isEqual.ts';\nexport { identity } from './function/identity.ts';\nexport { noop } from './function/noop.ts';\nexport { assign } from './object/assign.ts';\nexport { assignIn } from './object/assignIn.ts';\nexport { assignInWith } from './object/assignInWith.ts';\nexport { assignWith } from './object/assignWith.ts';\nexport { at } from './object/at.ts';\nexport { clone } from './object/clone.ts';\nexport { cloneDeep } from './object/cloneDeep.ts';\nexport { cloneDeepWith } from './object/cloneDeepWith.ts';\nexport { cloneWith } from './object/cloneWith.ts';\nexport { create } from './object/create.ts';\nexport { defaults } from './object/defaults.ts';\nexport { defaultsDeep } from './object/defaultsDeep.ts';\nexport { extend } from './object/extend.ts';\nexport { extendWith } from './object/extendWith.ts';\nexport { findKey } from './object/findKey.ts';\nexport { findLastKey } from './object/findLastKey.ts';\nexport { forIn } from './object/forIn.ts';\nexport { forInRight } from './object/forInRight.ts';\nexport { forOwn } from './object/forOwn.ts';\nexport { forOwnRight } from './object/forOwnRight.ts';\nexport { fromPairs } from './object/fromPairs.ts';\nexport { functions } from './object/functions.ts';\nexport { functionsIn } from './object/functionsIn.ts';\nexport { get } from './object/get.ts';\nexport { has } from './object/has.ts';\nexport { hasIn } from './object/hasIn.ts';\nexport { invert } from './object/invert.ts';\nexport { invertBy } from './object/invertBy.ts';\nexport { keys } from './object/keys.ts';\nexport { keysIn } from './object/keysIn.ts';\nexport { mapKeys } from './object/mapKeys.ts';\nexport { mapValues } from './object/mapValues.ts';\nexport { merge } from './object/merge.ts';\nexport { mergeWith } from './object/mergeWith.ts';\nexport { omit } from './object/omit.ts';\nexport { omitBy } from './object/omitBy.ts';\nexport { pick } from './object/pick.ts';\nexport { pickBy } from './object/pickBy.ts';\nexport { property } from './object/property.ts';\nexport { propertyOf } from './object/propertyOf.ts';\nexport { result } from './object/result.ts';\nexport { set } from './object/set.ts';\nexport { setWith } from './object/setWith.ts';\nexport { toDefaulted } from './object/toDefaulted.ts';\nexport { toPairs } from './object/toPairs.ts';\nexport { toPairsIn } from './object/toPairsIn.ts';\nexport { transform } from './object/transform.ts';\nexport { unset } from './object/unset.ts';\nexport { update } from './object/update.ts';\nexport { updateWith } from './object/updateWith.ts';\nexport { values } from './object/values.ts';\nexport { valuesIn } from './object/valuesIn.ts';\nexport { isFunction } from './predicate/isFunction.ts';\nexport { isLength } from './predicate/isLength.ts';\nexport { isMatchWith } from './predicate/isMatchWith.ts';\nexport { isNative } from './predicate/isNative.ts';\nexport { isNull } from './predicate/isNull.ts';\nexport { isUndefined } from './predicate/isUndefined.ts';\n\nexport { conforms } from './predicate/conforms.ts';\nexport { conformsTo } from './predicate/conformsTo.ts';\nexport { isArguments } from './predicate/isArguments.ts';\nexport { isArray } from './predicate/isArray.ts';\nexport { isArrayBuffer } from './predicate/isArrayBuffer.ts';\nexport { isArrayLike } from './predicate/isArrayLike.ts';\nexport { isArrayLikeObject } from './predicate/isArrayLikeObject.ts';\nexport { isBoolean } from './predicate/isBoolean.ts';\nexport { isBuffer } from './predicate/isBuffer.ts';\nexport { isDate } from './predicate/isDate.ts';\nexport { isElement } from './predicate/isElement.ts';\nexport { isEmpty } from './predicate/isEmpty.ts';\nexport { isEqualWith } from './predicate/isEqualWith.ts';\nexport { isError } from './predicate/isError.ts';\nexport { isFinite } from './predicate/isFinite.ts';\nexport { isInteger } from './predicate/isInteger.ts';\nexport { isMap } from './predicate/isMap.ts';\nexport { isMatch } from './predicate/isMatch.ts';\nexport { isNaN } from './predicate/isNaN.ts';\nexport { isNil } from './predicate/isNil.ts';\nexport { isNumber } from './predicate/isNumber.ts';\nexport { isObject } from './predicate/isObject.ts';\nexport { isObjectLike } from './predicate/isObjectLike.ts';\nexport { isPlainObject } from './predicate/isPlainObject.ts';\nexport { isRegExp } from './predicate/isRegExp.ts';\nexport { isSafeInteger } from './predicate/isSafeInteger.ts';\nexport { isSet } from './predicate/isSet.ts';\nexport { isString } from './predicate/isString.ts';\nexport { isSymbol } from './predicate/isSymbol.ts';\nexport { isTypedArray } from './predicate/isTypedArray.ts';\nexport { isWeakMap } from './predicate/isWeakMap.ts';\nexport { isWeakSet } from './predicate/isWeakSet.ts';\nexport { matches } from './predicate/matches.ts';\nexport { matchesProperty } from './predicate/matchesProperty.ts';\nexport { capitalize } from './string/capitalize.ts';\nexport { bindAll } from './util/bindAll.ts';\n\nexport { camelCase } from './string/camelCase.ts';\nexport { deburr } from './string/deburr.ts';\nexport { endsWith } from './string/endsWith.ts';\nexport { escape } from './string/escape.ts';\nexport { escapeRegExp } from './string/escapeRegExp.ts';\nexport { kebabCase } from './string/kebabCase.ts';\nexport { lowerCase } from './string/lowerCase.ts';\nexport { lowerFirst } from './string/lowerFirst.ts';\nexport { pad } from './string/pad.ts';\nexport { padEnd } from './string/padEnd.ts';\nexport { padStart } from './string/padStart.ts';\nexport { repeat } from './string/repeat.ts';\nexport { replace } from './string/replace.ts';\nexport { snakeCase } from './string/snakeCase.ts';\nexport { split } from './string/split.ts';\nexport { startCase } from './string/startCase.ts';\nexport { startsWith } from './string/startsWith.ts';\nexport { template } from './string/template.ts';\nexport { templateSettings } from './string/templateSettings.ts';\nexport { toLower } from './string/toLower.ts';\nexport { toUpper } from './string/toUpper.ts';\nexport { trim } from './string/trim.ts';\nexport { trimEnd } from './string/trimEnd.ts';\nexport { trimStart } from './string/trimStart.ts';\nexport { truncate } from './string/truncate.ts';\nexport { unescape } from './string/unescape.ts';\nexport { upperCase } from './string/upperCase.ts';\nexport { upperFirst } from './string/upperFirst.ts';\nexport { words } from './string/words.ts';\n\nexport { cond } from './util/cond.ts';\nexport { constant } from './util/constant.ts';\nexport { defaultTo } from './util/defaultTo.ts';\nexport { eq } from './util/eq.ts';\nexport { gt } from './util/gt.ts';\nexport { gte } from './util/gte.ts';\nexport { invoke } from './util/invoke.ts';\nexport { iteratee } from './util/iteratee.ts';\nexport { lt } from './util/lt.ts';\nexport { lte } from './util/lte.ts';\nexport { method } from './util/method.ts';\nexport { methodOf } from './util/methodOf.ts';\nexport { now } from './util/now.ts';\nexport { over } from './util/over.ts';\nexport { overEvery } from './util/overEvery.ts';\nexport { overSome } from './util/overSome.ts';\nexport { stubArray } from './util/stubArray.ts';\nexport { stubFalse } from './util/stubFalse.ts';\nexport { stubObject } from './util/stubObject.ts';\nexport { stubString } from './util/stubString.ts';\nexport { stubTrue } from './util/stubTrue.ts';\nexport { times } from './util/times.ts';\nexport { toArray } from './util/toArray.ts';\nexport { toFinite } from './util/toFinite.ts';\nexport { toInteger } from './util/toInteger.ts';\nexport { toLength } from './util/toLength.ts';\nexport { toNumber } from './util/toNumber.ts';\nexport { toPath } from './util/toPath.ts';\nexport { toPlainObject } from './util/toPlainObject.ts';\nexport { toSafeInteger } from './util/toSafeInteger.ts';\nexport { toString } from './util/toString.ts';\nexport { uniqueId } from './util/uniqueId.ts';\n"
  },
  {
    "path": "src/compat/function/after.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { after as afterLodash } from 'lodash';\nimport { after } from './after';\nimport { times } from '../util/times';\n\ndescribe('after', () => {\n  function testAfter(n: number, t: number) {\n    let count = 0;\n    times(\n      t,\n      after(n, () => {\n        count++;\n      })\n    );\n    return count;\n  }\n\n  it('should create a function that invokes `func` after `n` calls', () => {\n    // 'after(n) should invoke `func` after being called `n` times'\n    expect(testAfter(5, 5)).toBe(1);\n    // 'after(n) should not invoke `func` before being called `n` times'\n    expect(testAfter(5, 4)).toBe(0);\n    // 'after(0) should not invoke `func` immediately'\n    expect(testAfter(0, 0)).toBe(0);\n    // 'after(0) should invoke `func` when called once'\n    expect(testAfter(0, 1)).toBe(1);\n  });\n\n  it('should coerce `n` values of `NaN` to `0`', () => {\n    expect(testAfter(NaN, 1)).toBe(1);\n  });\n\n  it('should use `this` binding of function', () => {\n    const afterFn = after(1, function (this: any) {\n      return ++this.count;\n    });\n    const object = { after: afterFn, count: 0 };\n\n    object.after();\n    expect(object.after()).toBe(2);\n    expect(object.count).toBe(2);\n  });\n\n  it('should throw an error if `func` is not a function', () => {\n    expect(() => {\n      after(1, 42 as any);\n    }).toThrow();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(after).toEqualTypeOf<typeof afterLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/after.ts",
    "content": "import { toInteger } from '../util/toInteger.ts';\n\n/**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @template TFunc - The type of the function to be invoked.\n * @param {number} n - The number of calls before `func` is invoked.\n * @param {TFunc} func - The function to restrict.\n * @returns {TFunc} Returns the new restricted function.\n * @throws {TypeError} - If `func` is not a function.\n *\n * @example\n * const saves = ['profile', 'settings'];\n * const done = after(saves.length, () => {\n *   console.log('done saving!');\n * });\n *\n * saves.forEach(type => {\n *   asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\nexport function after<TFunc extends (...args: any[]) => any>(n: number, func: TFunc): TFunc {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n  n = toInteger(n);\n  return function (this: any, ...args: Parameters<TFunc>) {\n    if (--n < 1) {\n      return func.apply(this, args);\n    }\n  } as TFunc;\n}\n"
  },
  {
    "path": "src/compat/function/ary.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { ary as aryLodash } from 'lodash';\nimport { ary } from './ary';\n\ndescribe('ary', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should cap the number of arguments provided to `func`', () => {\n    const actual = ['6', '8', '10'].map(ary(parseInt, 1));\n    expect(actual).toEqual([6, 8, 10]);\n\n    const capped = ary(fn, 2);\n    expect(capped('a', 'b', 'c', 'd')).toEqual(['a', 'b']);\n  });\n\n  it('should use `func.length` if `n` is not given', () => {\n    const capped = ary(fn);\n    expect(capped('a', 'b', 'c', 'd')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should treat a negative `n` as `0`', () => {\n    const capped = ary(fn, -1);\n    expect(capped('a', 'b', 'c', 'd')).toEqual([]);\n  });\n\n  it('should coerce `n` to an integer', () => {\n    const values = ['1', 1.6, 'xyz'];\n    const expected = [['a'], ['a'], []];\n\n    const actual = values.map((n: any) => {\n      const capped = ary(fn, n);\n      return capped('a', 'b');\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not force a minimum argument count', () => {\n    const args = ['a', 'b', 'c'];\n    const capped = ary(fn, 3);\n\n    const expected = args.map((arg, index) => args.slice(0, index));\n    // eslint-disable-next-line prefer-spread\n    const actual = expected.map(array => capped.apply(undefined, array));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use `this` binding of function', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const capped = ary(function (this: unknown, _a: unknown, _b: unknown) {\n      return this;\n    }, 1);\n    const object = { capped: capped };\n\n    expect(object.capped()).toBe(object);\n  });\n\n  it('should use the existing `ary` if smaller', () => {\n    const capped = ary(ary(fn, 1), 2);\n    expect(capped('a', 'b', 'c', 'd')).toEqual(['a']);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const funcs = [fn].map(ary);\n    const actual = funcs[0]('a', 'b', 'c');\n\n    expect(actual).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(ary).toEqualTypeOf<typeof aryLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/ary.ts",
    "content": "import { ary as aryToolkit } from '../../function/ary.ts';\n\n/**\n * Creates a function that invokes func, with up to `n` arguments, ignoring any additional arguments.\n * If `n` is not provided, it defaults to the function's length.\n *\n * @param {Function} func - The function to cap arguments for.\n * @param {number} [n] - The arity cap. Defaults to func.length.\n * @returns {Function} Returns the new capped function.\n *\n * @example\n * function fn(a: number, b: number, c: number) {\n *   return Array.from(arguments);\n * }\n *\n * // Cap at 2 arguments\n * const capped = ary(fn, 2);\n * capped(1, 2, 3); // [1, 2]\n *\n * // Default to function length\n * const defaultCap = ary(fn);\n * defaultCap(1, 2, 3); // [1, 2, 3]\n */\nexport function ary(func: (...args: any[]) => any, n?: number): (...args: any[]) => any;\n\n/**\n * Creates a function that invokes func, with up to `n` arguments, ignoring any additional arguments.\n *\n * @template F - The type of the function.\n * @param {F} func - The function to cap arguments for.\n * @param {number} n - The arity cap.\n * @param {unknown} guard - The value to guard the arity cap.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.\n *\n * @example\n * function fn(a: number, b: number, c: number) {\n *   return Array.from(arguments);\n * }\n *\n * ary(fn, 0)(1, 2, 3); // []\n * ary(fn, 1)(1, 2, 3); // [1]\n * ary(fn, 2)(1, 2, 3); // [1, 2]\n * ary(fn, 3)(1, 2, 3); // [1, 2, 3]\n */\nexport function ary<F extends (...args: any[]) => any>(\n  func: F,\n  n: number = func.length,\n  guard?: unknown\n): (...args: any[]) => ReturnType<F> {\n  if (guard) {\n    n = func.length;\n  }\n\n  if (Number.isNaN(n) || n < 0) {\n    n = 0;\n  }\n\n  return aryToolkit(func, n);\n}\n"
  },
  {
    "path": "src/compat/function/attempt.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { attempt as attemptLodash } from 'lodash';\nimport { attempt } from './attempt';\nimport { isEqual } from '../../predicate/isEqual';\n\ndescribe('attempt', () => {\n  const errors = [\n    new Error(),\n    new EvalError(),\n    new RangeError(),\n    new ReferenceError(),\n    new SyntaxError(),\n    new TypeError(),\n    new URIError(),\n  ];\n\n  class CustomError extends Error {\n    name: string;\n    message: string;\n\n    constructor(message: string) {\n      super();\n      this.name = 'CustomError';\n      this.message = message;\n    }\n  }\n\n  it('should return the result of `func`', () => {\n    expect(attempt(() => 'x')).toBe('x');\n  });\n\n  it('should provide additional arguments to `func`', () => {\n    const actual = attempt(\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      function (_a: unknown, _b: unknown) {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.from(arguments);\n      },\n      1,\n      2\n    );\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should return the caught error', () => {\n    const expected = errors.map(() => true);\n\n    const actual = errors.map(\n      error =>\n        attempt(() => {\n          throw error;\n        }) === error\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should coerce errors to error objects', () => {\n    const actual = attempt(() => {\n      throw 'x';\n    });\n    expect(isEqual(actual, Error('x'))).toBeTruthy();\n  });\n\n  it('should preserve custom errors', () => {\n    const actual = attempt(() => {\n      throw new CustomError('x');\n    });\n    expect(actual instanceof CustomError).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(attempt).toEqualTypeOf<typeof attemptLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/attempt.ts",
    "content": "/**\n * Attempts to execute a function with the provided arguments.\n * If the function throws an error, it catches the error and returns it.\n * If the caught error is not an instance of Error, it wraps it in a new Error.\n *\n * @param {(...args: any[]) => R} func - The function to be executed.\n * @param {...any[]} args - The arguments to pass to the function.\n * @returns {R | Error} The return value of the function if successful, or an Error if an exception is thrown.\n *\n * @template R - The type of the function return value.\n *\n * @example\n * // Example 1: Successful execution\n * const result = attempt((x, y) => x + y, 2, 3);\n * console.log(result); // Output: 5\n *\n * @example\n * // Example 2: Function throws an error\n * const errorResult = attempt(() => {\n *   throw new Error(\"Something went wrong\");\n * });\n * console.log(errorResult); // Output: Error: Something went wrong\n *\n * @example\n * // Example 3: Non-Error thrown\n * const nonErrorResult = attempt(() => {\n *   throw \"This is a string error\";\n * });\n * console.log(nonErrorResult); // Output: Error: This is a string error\n */\nexport function attempt<R>(func: (...args: any[]) => R, ...args: any[]): R | Error {\n  try {\n    return func(...args);\n  } catch (e: any) {\n    return e instanceof Error ? e : new Error(e);\n  }\n}\n"
  },
  {
    "path": "src/compat/function/before.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { before as beforeLodash } from 'lodash';\nimport { before } from './before';\n\ndescribe('before', () => {\n  // eslint-disable-next-line @typescript-eslint/naming-convention\n  function _before(n: number, times: number) {\n    let count = 0;\n    const innerBefore = before(n, () => {\n      count++;\n    });\n\n    for (let i = 0; i < times; i++) {\n      innerBefore();\n    }\n\n    return count;\n  }\n\n  it('should create a function that invokes `func` after `n` calls', () => {\n    expect(_before(5, 4), 'before(n) should invoke `func` before being called `n` times').toBe(4);\n    expect(_before(5, 6), 'before(n) should not invoke `func` after being called `n - 1` times').toBe(4);\n    expect(_before(0, 0), 'before(0) should not invoke `func` immediately').toBe(0);\n    expect(_before(0, 1), 'before(0) should not invoke `func` when called').toBe(0);\n  });\n\n  it('should coerce `n` values of `NaN` to `0`', () => {\n    expect(_before(NaN, 1)).toBe(0);\n  });\n\n  it('should use `this` binding of function', () => {\n    const _before = before(2, function () {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      return ++this.count;\n    });\n    const object = { before: _before, count: 0 };\n\n    object.before();\n    expect(object.before()).toBe(1);\n    expect(object.count).toBe(1);\n  });\n\n  it('should throw an error if `func` is not a function', () => {\n    expect(() => before(1, 1 as any)).toThrow(TypeError);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(before).toEqualTypeOf<typeof beforeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/before.ts",
    "content": "import { toInteger } from '../util/toInteger.ts';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @template F - The type of the function to be invoked.\n * @param {number} n - The number of times the returned function is allowed to call `func` before stopping.\n * - If `n` is 0, `func` will never be called.\n * - If `n` is a positive integer, `func` will be called up to `n-1` times.\n * @param {F} func - The function to be called with the limit applied.\n * @returns {(...args: Parameters<F>) => ReturnType<F> } - A new function that:\n * - Tracks the number of calls.\n * - Invokes `func` until the `n-1`-th call.\n * - Returns last result of `func`, if `n` is reached.\n * @throws {TypeError} - If `func` is not a function.\n * @example\n * let count = 0;\n * const before3 = before(3, () => ++count);\n *\n * before3(); // => 1\n * before3(); // => 2\n * before3(); // => 2\n */\nexport function before<F extends (...args: any[]) => any>(n: number, func: F): F {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n\n  let result: ReturnType<F>;\n  n = toInteger(n);\n\n  return function (this: unknown, ...args: Parameters<F>) {\n    if (--n > 0) {\n      result = func.apply(this, args);\n    }\n\n    if (n <= 1 && func) {\n      // for garbage collection\n      func = undefined as any;\n    }\n\n    return result;\n  } as F;\n}\n"
  },
  {
    "path": "src/compat/function/bind.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { bind } from './bind';\nimport { isEqual } from '../../predicate/isEqual';\n\n// eslint-disable-next-line\nfunction fn(this: any, ..._: any[]) {\n  const result = [this];\n  // eslint-disable-next-line prefer-rest-params\n  return result.concat(Array.from(arguments));\n}\n\ndescribe('bind', () => {\n  it('should bind a function to an object', () => {\n    const object = {},\n      bound = bind(fn, object);\n\n    expect(bound('a')).toEqual([object, 'a']);\n  });\n\n  it('should accept a falsey `thisArg`', () => {\n    const values = [false, 0, '', NaN, null, undefined];\n    const expected = values.map(value => [value]);\n\n    const actual = values.map(value => {\n      const bound = bind(fn, value);\n      return bound();\n    });\n\n    expect(\n      actual.every((value, index) => {\n        return isEqual(value, expected[index]);\n      })\n    ).toBe(true);\n  });\n\n  it('should bind a function to nullish values', () => {\n    const bound = bind(fn, null);\n    const actual = bound('a');\n\n    expect(actual[0]).toBe(null);\n    expect(actual[1]).toBe('a');\n\n    const bound2 = bind(fn, undefined);\n    const actual2 = bound2('b');\n\n    expect(actual2[0]).toBe(undefined);\n    expect(actual2[1]).toBe('b');\n\n    const bound3 = (bind as any)(fn);\n    const actual3 = bound3('b');\n\n    expect(actual3[0]).toBe(undefined);\n    expect(actual3[1]).toBe('b');\n  });\n\n  it('should partially apply arguments', () => {\n    const object = {};\n    let bound = bind(fn, object, 'a');\n\n    expect(bound()).toEqual([object, 'a']);\n\n    bound = bind(fn, object, 'a');\n    expect(bound('b')).toEqual([object, 'a', 'b']);\n\n    bound = bind(fn, object, 'a', 'b');\n    expect(bound()).toEqual([object, 'a', 'b']);\n    expect(bound('c', 'd')).toEqual([object, 'a', 'b', 'c', 'd']);\n  });\n\n  it('should support placeholders', () => {\n    const object = {};\n    const ph = bind.placeholder;\n    const bound = bind(fn, object, ph, 'b', ph);\n\n    expect(bound('a', 'c')).toEqual([object, 'a', 'b', 'c']);\n    expect(bound('a')).toEqual([object, 'a', 'b', undefined]);\n    expect(bound('a', 'c', 'd')).toEqual([object, 'a', 'b', 'c', 'd']);\n    expect(bound()).toEqual([object, undefined, 'b', undefined]);\n  });\n\n  it('should create a function with a `length` of `0`', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (_a: unknown, _b: unknown, _c: unknown) {};\n    let bound = bind(fn, {});\n\n    expect(bound.length).toBe(0);\n\n    bound = bind(fn, {}, 1);\n    expect(bound.length).toBe(0);\n  });\n\n  it('should ignore binding when called with the `new` operator', () => {\n    function Foo(this: any) {\n      return this;\n    }\n\n    const bound = bind(Foo, { a: 1 });\n    // @ts-expect-error - bound is a constructor\n    const newBound = new bound();\n\n    expect(bound().a).toBe(1);\n    expect(newBound.a).toBe(undefined);\n    expect(newBound instanceof Foo).toBe(true);\n  });\n\n  it('should handle a number of arguments when called with the `new` operator', () => {\n    function Foo(this: any) {\n      return this;\n    }\n\n    function Bar() {}\n\n    const thisArg = { a: 1 };\n    const boundFoo = bind(Foo, thisArg) as any;\n    const boundBar = bind(Bar, thisArg) as any;\n    expect([new boundFoo().a, new boundBar().a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1).a, new boundBar(1).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2).a, new boundBar(1, 2).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3).a, new boundBar(1, 2, 3).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3, 4).a, new boundBar(1, 2, 3, 4).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3, 4, 5).a, new boundBar(1, 2, 3, 4, 5).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3, 4, 5, 6).a, new boundBar(1, 2, 3, 4, 5, 6).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3, 4, 5, 6, 7).a, new boundBar(1, 2, 3, 4, 5, 6, 7).a]).toEqual([undefined, undefined]);\n    expect([new boundFoo(1, 2, 3, 4, 5, 6, 7, 8).a, new boundBar(1, 2, 3, 4, 5, 6, 7, 8).a]).toEqual([\n      undefined,\n      undefined,\n    ]);\n  });\n\n  it('should ensure `new bound` is an instance of `func`', () => {\n    function Foo(value: any) {\n      return value && object;\n    }\n\n    const bound = (bind as any)(Foo) as any;\n    const object = {};\n\n    expect(new bound() instanceof Foo).toBe(true);\n    expect(new bound(true)).toBe(object);\n  });\n\n  it('should append array arguments to partially applied arguments', () => {\n    const object = {},\n      bound = bind(fn, object, 'a');\n\n    expect(bound(['b'], 'c')).toEqual([object, 'a', ['b'], 'c']);\n  });\n\n  it('should not rebind functions', () => {\n    const object1 = {},\n      object2 = {},\n      object3 = {};\n\n    const bound1 = bind(fn, object1),\n      bound2 = bind(bound1, object2, 'a'),\n      bound3 = bind(bound1, object3, 'b');\n\n    expect(bound1()).toEqual([object1]);\n    expect(bound2()).toEqual([object1, 'a']);\n    expect(bound3()).toEqual([object1, 'b']);\n  });\n\n  it('should not error when instantiating bound built-ins', () => {\n    let Ctor = bind(Date, null) as any;\n\n    const expected = new Date(2012, 4, 23, 0, 0, 0, 0);\n    let actual = new Ctor(2012, 4, 23, 0, 0, 0, 0);\n    expect(actual).toEqual(expected);\n\n    Ctor = bind(Date, null, 2012, 4, 23);\n    actual = new Ctor(0, 0, 0, 0);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not error when calling bound class constructors with the `new` operator', () => {\n    const createCtor: any = function () {\n      return class A {};\n    };\n\n    const bound = (bind as any)(createCtor()) as any;\n    expect(Boolean(new bound())).toBe(true);\n    expect(Boolean(new bound(1))).toBe(true);\n    expect(Boolean(new bound(1, 2))).toBe(true);\n    expect(Boolean(new bound(1, 2, 3))).toBe(true);\n    expect(Boolean(new bound(1, 2, 3, 4))).toBe(true);\n    expect(Boolean(new bound(1, 2, 3, 4, 5))).toBe(true);\n    expect(Boolean(new bound(1, 2, 3, 4, 5, 6))).toBe(true);\n    expect(Boolean(new bound(1, 2, 3, 4, 5, 6, 7))).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/compat/function/bind.ts",
    "content": "/**\n * Creates a function that invokes `func` with the `this` binding of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * The `bind.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: Unlike native `Function#bind`, this method doesn't set the `length` property of bound functions.\n *\n * @param {(...args: any[]) => any} func - The function to bind.\n * @param {any} thisObj - The `this` binding of `func`.\n * @param {...any} partialArgs - The arguments to be partially applied.\n * @returns {(...args: any[]) => any} - Returns the new bound function.\n *\n * @example\n * function greet(greeting, punctuation) {\n *   return greeting + ' ' + this.user + punctuation;\n * }\n * const object = { user: 'fred' };\n * let bound = bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * bound = bind(greet, object, bind.placeholder, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\nexport function bind(func: (...args: any[]) => any, thisObj: any, ...partialArgs: any[]): (...args: any[]) => any {\n  const bound = function (this: any, ...providedArgs: any[]) {\n    const args: any[] = [];\n\n    // Populate args by merging partialArgs and providedArgs.\n    // e.g.. when we call bind(func, {}, [1, bind.placeholder, 3])(2, 4);\n    // we have args with [1, 2, 3, 4].\n    let startIndex = 0;\n\n    for (let i = 0; i < partialArgs.length; i++) {\n      const arg = partialArgs[i];\n\n      if (arg === bind.placeholder) {\n        args.push(providedArgs[startIndex++]);\n      } else {\n        args.push(arg);\n      }\n    }\n\n    for (let i = startIndex; i < providedArgs.length; i++) {\n      args.push(providedArgs[i]);\n    }\n\n    if (this instanceof bound) {\n      // @ts-expect-error - fn is a constructor\n      return new func(...args);\n    }\n\n    return func.apply(thisObj, args);\n  };\n\n  return bound;\n}\n\nconst bindPlaceholder: unique symbol = Symbol('bind.placeholder');\nbind.placeholder = bindPlaceholder;\n"
  },
  {
    "path": "src/compat/function/bindKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { bindKey } from './bindKey';\n\ndescribe('bindKey', () => {\n  it('should work when the target function is overwritten', () => {\n    const object = {\n      user: 'fred',\n      greet: function (greeting: string) {\n        return `${this.user} says: ${greeting}`;\n      },\n    };\n\n    const bound = bindKey(object, 'greet', 'hi');\n    expect(bound()).toBe('fred says: hi');\n\n    object.greet = function (greeting) {\n      return `${this.user} says: ${greeting}!`;\n    };\n\n    expect(bound()).toBe('fred says: hi!');\n  });\n\n  it('should support placeholders', () => {\n    const object = {\n      fn: function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.from(arguments);\n      },\n    };\n\n    const ph = bindKey.placeholder,\n      bound = bindKey(object, 'fn', ph, 'b', ph);\n\n    expect(bound('a', 'c')).toEqual(['a', 'b', 'c']);\n    expect(bound('a')).toEqual(['a', 'b', undefined]);\n    expect(bound('a', 'c', 'd')).toEqual(['a', 'b', 'c', 'd']);\n    expect(bound()).toEqual([undefined, 'b', undefined]);\n  });\n\n  it('should ensure `new bound` is an instance of `object[key]`', () => {\n    function Foo(value: any) {\n      return value && object;\n    }\n\n    const object = { Foo: Foo };\n    const bound = bindKey(object, 'Foo');\n\n    // @ts-expect-error - bound is a constructor\n    expect(new bound() instanceof Foo).toBe(true);\n    // @ts-expect-error - bound is a constructor\n    expect(new bound(true)).toBe(object as any);\n  });\n});\n"
  },
  {
    "path": "src/compat/function/bindKey.ts",
    "content": "/**\n * Creates a function that invokes the method at `object[key]` with `partialArgs` prepended to the arguments it receives.\n *\n * This method differs from `bind` by allowing bound functions to reference methods that may be redefined or don't yet exist.\n *\n * The `bindKey.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * @template T - The type of the object to bind.\n * @template K - The type of the key to bind.\n * @param {T} object - The object to invoke the method on.\n * @param {K} key - The key of the method.\n * @param {...any} partialArgs - The arguments to be partially applied.\n * @returns {T[K] extends (...args: any[]) => any ? (...args: any[]) => ReturnType<T[K]> : never} - Returns the new bound function.\n *\n * @example\n * const object = {\n *   user: 'fred',\n *   greet: function (greeting, punctuation) {\n *     return greeting + ' ' + this.user + punctuation;\n *   },\n * };\n *\n * let bound = bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function (greeting, punctuation) {\n *   return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * bound = bindKey(object, 'greet', bindKey.placeholder, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\nexport function bindKey(object: object, key: string, ...partialArgs: any[]): (...args: any[]) => any;\n\n/**\n * Creates a function that invokes the method at `object[key]` with `partialArgs` prepended to the arguments it receives.\n *\n * This method differs from `bind` by allowing bound functions to reference methods that may be redefined or don't yet exist.\n *\n * The `bindKey.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * @template T - The type of the object to bind.\n * @template K - The type of the key to bind.\n * @param {T} object - The object to invoke the method on.\n * @param {K} key - The key of the method.\n * @param {...any} partialArgs - The arguments to be partially applied.\n * @returns {T[K] extends (...args: any[]) => any ? (...args: any[]) => ReturnType<T[K]> : never} - Returns the new bound function.\n *\n * @example\n * const object = {\n *   user: 'fred',\n *   greet: function (greeting, punctuation) {\n *     return greeting + ' ' + this.user + punctuation;\n *   },\n * };\n *\n * let bound = bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function (greeting, punctuation) {\n *   return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * bound = bindKey(object, 'greet', bindKey.placeholder, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\nexport function bindKey<T extends Record<PropertyKey, any>, K extends keyof T>(\n  object: T,\n  key: K,\n  ...partialArgs: any[]\n): T[K] extends (...args: any[]) => any ? (...args: any[]) => ReturnType<T[K]> : never {\n  const bound = function (this: any, ...providedArgs: any[]) {\n    const args: any[] = [];\n\n    // Populate args by merging partialArgs and providedArgs.\n    // e.g.. when we call bind(func, {}, [1, bind.placeholder, 3])(2, 4);\n    // we have args with [1, 2, 3, 4].\n    let startIndex = 0;\n\n    for (let i = 0; i < partialArgs.length; i++) {\n      const arg = partialArgs[i];\n\n      if (arg === bindKey.placeholder) {\n        args.push(providedArgs[startIndex++]);\n      } else {\n        args.push(arg);\n      }\n    }\n\n    for (let i = startIndex; i < providedArgs.length; i++) {\n      args.push(providedArgs[i]);\n    }\n\n    if (this instanceof bound) {\n      return new object[key](...args);\n    }\n\n    // eslint-disable-next-line prefer-spread\n    return object[key].apply(object, args);\n  };\n\n  return bound as any;\n}\n\nconst bindKeyPlaceholder: unique symbol = Symbol('bindKey.placeholder');\nbindKey.placeholder = bindKeyPlaceholder;\n"
  },
  {
    "path": "src/compat/function/curry.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { bind } from './bind';\nimport { curry } from './curry';\nimport { partial } from '../../function/partial';\nimport { partialRight } from '../../function/partialRight';\nimport { map } from '../array/map';\n\ndescribe('curry', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown, _d: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should curry based on the number of arguments given', () => {\n    const curried = curry(fn),\n      expected = [1, 2, 3, 4];\n\n    expect(curried(1)(2)(3)(4)).toEqual(expected);\n    expect(curried(1, 2)(3, 4)).toEqual(expected);\n    expect(curried(1, 2, 3, 4)).toEqual(expected);\n  });\n\n  it('should allow specifying `arity`', () => {\n    const curried = curry(fn, 3),\n      expected = [1, 2, 3];\n\n    expect(curried(1)(2, 3)).toEqual(expected);\n    expect(curried(1, 2)(3)).toEqual(expected);\n    expect(curried(1, 2, 3)).toEqual(expected);\n  });\n\n  it('should coerce `arity` to an integer', () => {\n    const values = ['0', 0.6, 'xyz'],\n      expected = values.map(() => []);\n\n    // @ts-expect-error - unusual arity type\n    const actual = values.map(arity => curry(fn, arity)());\n\n    expect(actual).toEqual(expected);\n    // @ts-expect-error - unusual arity type\n    expect(curry(fn, '2')(1)(2)).toEqual([1, 2]);\n  });\n\n  it('should support placeholders', () => {\n    const curried = curry(fn) as any,\n      // eslint-disable-next-line\n      // @ts-ignore\n      ph = curried.placeholder;\n\n    expect(curried(1)(ph, 3)(ph, 4)(2)).toEqual([1, 2, 3, 4]);\n    expect(curried(ph, 2)(1)(ph, 4)(3)).toEqual([1, 2, 3, 4]);\n    expect(curried(ph, ph, 3)(ph, 2)(ph, 4)(1)).toEqual([1, 2, 3, 4]);\n    expect(curried(ph, ph, ph, 4)(ph, ph, 3)(ph, 2)(1)).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should persist placeholders', () => {\n    const curried = curry(fn) as any,\n      ph = curried.placeholder,\n      actual = curried(ph, ph, ph, 'd')('a')(ph)('b')('c');\n\n    expect(actual).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should provide additional arguments after reaching the target arity', () => {\n    const curried = curry(fn, 3) as any;\n    expect(curried(1)(2, 3, 4)).toEqual([1, 2, 3, 4]);\n    expect(curried(1, 2)(3, 4, 5)).toEqual([1, 2, 3, 4, 5]);\n    expect(curried(1, 2, 3, 4, 5, 6)).toEqual([1, 2, 3, 4, 5, 6]);\n  });\n\n  it('should create a function with a `length` of `0`', () => {\n    const curried = curry(fn);\n    expect(curried.length).toBe(0);\n    expect(curried(1).length).toBe(0);\n    expect(curried(1, 2).length).toBe(0);\n\n    const curried2 = curry(fn, 4);\n    expect(curried2.length).toBe(0);\n    expect(curried2(1).length).toBe(0);\n    expect(curried2(1, 2).length).toBe(0);\n  });\n\n  it('should ensure `new curried` is an instance of `func`', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const curried = curry(Foo);\n    const object = {};\n\n    // @ts-expect-error - curried is a constructor\n    expect(new curried(false) instanceof Foo).toBe(true);\n\n    // @ts-expect-error - curried is a constructor\n    expect(new curried(true)).toBe(object);\n\n    function Bar(a: unknown, b: unknown, object: unknown) {\n      return a && b && object;\n    }\n\n    const curriedBar = curry(Bar) as any;\n    expect(new (curriedBar(true)(true))(object)).toBe(object);\n  });\n\n  it('should use `this` binding of function', () => {\n    const fn = function (this: any, a: string | number, b: string | number, c: string | number) {\n      const value = this || {};\n      return [value[a], value[b], value[c]];\n    };\n\n    const object: any = { a: 1, b: 2, c: 3 },\n      expected = [1, 2, 3];\n\n    expect(curry(bind(fn, object), 3)('a')('b')('c')).toEqual(expected);\n    expect(curry(bind(fn, object), 3)('a', 'b')('c')).toEqual(expected);\n    expect(curry(bind(fn, object), 3)('a', 'b', 'c')).toEqual(expected);\n\n    expect(bind(curry(fn), object)('a')('b')('c')).toEqual(Array(3));\n    expect(bind(curry(fn), object)('a', 'b')('c')).toEqual(Array(3));\n    expect(bind(curry(fn), object)('a', 'b', 'c')).toEqual(expected);\n\n    object.curried = curry(fn);\n    expect(object.curried('a')('b')('c')).toEqual(Array(3));\n    expect(object.curried('a', 'b')('c')).toEqual(Array(3));\n    expect(object.curried('a', 'b', 'c')).toEqual(expected);\n  });\n\n  it('should work with partialed methods', () => {\n    const curried = curry(fn),\n      expected = [1, 2, 3, 4];\n\n    const a = partial(curried, 1),\n      b = bind(a, null, 2),\n      c = partialRight(b, 4),\n      d = partialRight(b(3), 4);\n\n    expect(c(3)).toEqual(expected);\n    expect(d()).toEqual(expected);\n  });\n\n  it(`\\`curry\\` should work for function names that shadow those on \\`Object.prototype\\``, () => {\n    const curried = curry(function hasOwnProperty(a: unknown, b: unknown) {\n      return [a, b];\n    });\n\n    expect(curried(1)(2)).toEqual([1, 2]);\n  });\n\n  it(`\\`curry\\` should work as an iteratee for methods like \\`map\\``, () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    function fn(_a: unknown, _b: unknown) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    }\n    const array = [fn, fn, fn];\n    const object = { a: fn, b: fn, c: fn };\n\n    [array, object].forEach(collection => {\n      const curries = map(collection, curry),\n        expected = map(collection, () => ['a', 'b']);\n\n      const actual = map(curries, curried => (curried as any)('a')('b'));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n});\n"
  },
  {
    "path": "src/compat/function/curry.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/naming-convention\ntype __ = typeof curryPlaceholder;\n\ninterface CurriedFunction1<T1, R> {\n  (): CurriedFunction1<T1, R>;\n  (t1: T1): R;\n}\n\ninterface CurriedFunction2<T1, T2, R> {\n  (): CurriedFunction2<T1, T2, R>;\n  (t1: T1): CurriedFunction1<T2, R>;\n  (t1: __, t2: T2): CurriedFunction1<T1, R>;\n  (t1: T1, t2: T2): R;\n}\ninterface CurriedFunction3<T1, T2, T3, R> {\n  (): CurriedFunction3<T1, T2, T3, R>;\n  (t1: T1): CurriedFunction2<T2, T3, R>;\n  (t1: __, t2: T2): CurriedFunction2<T1, T3, R>;\n  (t1: T1, t2: T2): CurriedFunction1<T3, R>;\n  (t1: __, t2: __, t3: T3): CurriedFunction2<T1, T2, R>;\n  (t1: T1, t2: __, t3: T3): CurriedFunction1<T2, R>;\n  (t1: __, t2: T2, t3: T3): CurriedFunction1<T1, R>;\n  (t1: T1, t2: T2, t3: T3): R;\n}\ninterface CurriedFunction4<T1, T2, T3, T4, R> {\n  (): CurriedFunction4<T1, T2, T3, T4, R>;\n  (t1: T1): CurriedFunction3<T2, T3, T4, R>;\n  (t1: __, t2: T2): CurriedFunction3<T1, T3, T4, R>;\n  (t1: T1, t2: T2): CurriedFunction2<T3, T4, R>;\n  (t1: __, t2: __, t3: T3): CurriedFunction3<T1, T2, T4, R>;\n  (t1: __, t2: __, t3: T3): CurriedFunction2<T2, T4, R>;\n  (t1: __, t2: T2, t3: T3): CurriedFunction2<T1, T4, R>;\n  (t1: T1, t2: T2, t3: T3): CurriedFunction1<T4, R>;\n  (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3<T1, T2, T3, R>;\n  (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2<T2, T3, R>;\n  (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2<T1, T3, R>;\n  (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2<T1, T2, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1<T3, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1<T2, R>;\n  (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1<T1, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4): R;\n}\ninterface CurriedFunction5<T1, T2, T3, T4, T5, R> {\n  (): CurriedFunction5<T1, T2, T3, T4, T5, R>;\n  (t1: T1): CurriedFunction4<T2, T3, T4, T5, R>;\n  (t1: __, t2: T2): CurriedFunction4<T1, T3, T4, T5, R>;\n  (t1: T1, t2: T2): CurriedFunction3<T3, T4, T5, R>;\n  (t1: __, t2: __, t3: T3): CurriedFunction4<T1, T2, T4, T5, R>;\n  (t1: T1, t2: __, t3: T3): CurriedFunction3<T2, T4, T5, R>;\n  (t1: __, t2: T2, t3: T3): CurriedFunction3<T1, T4, T5, R>;\n  (t1: T1, t2: T2, t3: T3): CurriedFunction2<T4, T5, R>;\n  (t1: __, t2: __, t3: __, t4: T4): CurriedFunction4<T1, T2, T3, T5, R>;\n  (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction3<T2, T3, T5, R>;\n  (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction3<T1, T3, T5, R>;\n  (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction3<T1, T2, T5, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction2<T3, T5, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction2<T2, T5, R>;\n  (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction2<T1, T5, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1<T5, R>;\n  (t1: __, t2: __, t3: __, t4: __, t5: T5): CurriedFunction4<T1, T2, T3, T4, R>;\n  (t1: T1, t2: __, t3: __, t4: __, t5: T5): CurriedFunction3<T2, T3, T4, R>;\n  (t1: __, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction3<T1, T3, T4, R>;\n  (t1: __, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction3<T1, T2, T4, R>;\n  (t1: __, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction3<T1, T2, T3, R>;\n  (t1: T1, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction2<T3, T4, R>;\n  (t1: T1, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction2<T2, T4, R>;\n  (t1: T1, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction2<T2, T3, R>;\n  (t1: __, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction2<T1, T4, R>;\n  (t1: __, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction2<T1, T3, R>;\n  (t1: __, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction2<T1, T2, R>;\n  (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction1<T4, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction1<T3, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction1<T2, R>;\n  (t1: __, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFunction1<T1, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;\n}\n\n/**\n * Creates a curried function that accepts a single argument.\n * @param {(t1: T1) => R} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {CurriedFunction1<T1, R>} - Returns the new curried function.\n * @example\n * const greet = (name: string) => `Hello ${name}`;\n * const curriedGreet = curry(greet);\n * curriedGreet('John'); // => 'Hello John'\n */\nexport function curry<T1, R>(func: (t1: T1) => R, arity?: number): CurriedFunction1<T1, R>;\n\n/**\n * Creates a curried function that accepts two arguments.\n * @param {(t1: T1, t2: T2) => R} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {CurriedFunction2<T1, T2, R>} - Returns the new curried function.\n * @example\n * const add = (a: number, b: number) => a + b;\n * const curriedAdd = curry(add);\n * curriedAdd(1)(2); // => 3\n * curriedAdd(1, 2); // => 3\n */\nexport function curry<T1, T2, R>(func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2<T1, T2, R>;\n\n/**\n * Creates a curried function that accepts three arguments.\n * @param {(t1: T1, t2: T2, t3: T3) => R} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {CurriedFunction3<T1, T2, T3, R>} - Returns the new curried function.\n * @example\n * const volume = (l: number, w: number, h: number) => l * w * h;\n * const curriedVolume = curry(volume);\n * curriedVolume(2)(3)(4); // => 24\n * curriedVolume(2, 3)(4); // => 24\n * curriedVolume(2, 3, 4); // => 24\n */\nexport function curry<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arity?: number\n): CurriedFunction3<T1, T2, T3, R>;\n\n/**\n * Creates a curried function that accepts four arguments.\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {CurriedFunction4<T1, T2, T3, T4, R>} - Returns the new curried function.\n * @example\n * const fn = (a: number, b: number, c: number, d: number) => a + b + c + d;\n * const curriedFn = curry(fn);\n * curriedFn(1)(2)(3)(4); // => 10\n * curriedFn(1, 2)(3, 4); // => 10\n * curriedFn(1, 2, 3, 4); // => 10\n */\nexport function curry<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arity?: number\n): CurriedFunction4<T1, T2, T3, T4, R>;\n\n/**\n * Creates a curried function that accepts five arguments.\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {CurriedFunction5<T1, T2, T3, T4, T5, R>} - Returns the new curried function.\n * @example\n * const fn = (a: number, b: number, c: number, d: number, e: number) => a + b + c + d + e;\n * const curriedFn = curry(fn);\n * curriedFn(1)(2)(3)(4)(5); // => 15\n * curriedFn(1, 2)(3, 4)(5); // => 15\n * curriedFn(1, 2, 3, 4, 5); // => 15\n */\nexport function curry<T1, T2, T3, T4, T5, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R,\n  arity?: number\n): CurriedFunction5<T1, T2, T3, T4, T5, R>;\n\n/**\n * Creates a curried function that accepts any number of arguments.\n * @param {(...args: any[]) => any} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @returns {(...args: any[]) => any} - Returns the new curried function.\n * @example\n * const sum = (...args: number[]) => args.reduce((a, b) => a + b, 0);\n * const curriedSum = curry(sum);\n * curriedSum(1, 2, 3); // => 6\n * curriedSum(1)(2, 3); // => 6\n * curriedSum(1)(2)(3); // => 6\n */\nexport function curry(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have been provided, or returns a function that accepts the remaining `func` arguments, and so on.\n * The arity of `func` may be specified if `func.length` is not sufficient.\n *\n * The `curry.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of curried functions.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @param {unknown} guard - Enables use as an iteratee for methods like `Array#map`.\n * @returns {((...args: any[]) => any) & { placeholder: typeof curry.placeholder }} - Returns the new curried function.\n *\n * @example\n * const abc = function(a, b, c) {\n *   return Array.from(arguments);\n * };\n *\n * let curried = curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(curry.placeholder, 3)(2);\n * // => [1, 2, 3]\n *\n * // Curried with arity.\n * curried = curry(abc, 2);\n *\n * curried(1)(2);\n * // => [1, 2]\n */\nexport function curry(\n  func: (...args: any[]) => any,\n  arity: number = func.length,\n  guard?: unknown\n): ((...args: any[]) => any) & { placeholder: typeof curry.placeholder } {\n  arity = guard ? func.length : arity;\n  arity = Number.parseInt(arity as any, 10);\n  if (Number.isNaN(arity) || arity < 1) {\n    arity = 0;\n  }\n\n  const wrapper = function (this: any, ...partialArgs: any[]) {\n    const holders = partialArgs.filter(item => item === curry.placeholder);\n    const length = partialArgs.length - holders.length;\n    if (length < arity) {\n      return makeCurry(func, arity - length, partialArgs);\n    }\n    if (this instanceof wrapper) {\n      // @ts-expect-error - fn is a constructor\n      return new func(...partialArgs);\n    }\n    return func.apply(this, partialArgs);\n  };\n\n  wrapper.placeholder = curryPlaceholder;\n\n  return wrapper;\n}\n\nfunction makeCurry(\n  func: (...args: any[]) => any,\n  arity: number,\n  partialArgs: any[]\n): ((...args: any[]) => any) & { placeholder: typeof curry.placeholder } {\n  function wrapper(this: any, ...providedArgs: any[]) {\n    const holders = providedArgs.filter(item => item === curry.placeholder);\n    const length = providedArgs.length - holders.length;\n    providedArgs = composeArgs(providedArgs, partialArgs);\n    if (length < arity) {\n      return makeCurry(func, arity - length, providedArgs);\n    }\n    if (this instanceof wrapper) {\n      // @ts-expect-error - fn is a constructor\n      return new func(...providedArgs);\n    }\n    return func.apply(this, providedArgs);\n  }\n  wrapper.placeholder = curryPlaceholder;\n  return wrapper;\n}\n\nfunction composeArgs(providedArgs: any[], partialArgs: any[]): any[] {\n  const args = [];\n  let startIndex = 0;\n  for (let i = 0; i < partialArgs.length; i++) {\n    const arg = partialArgs[i];\n\n    if (arg === curry.placeholder && startIndex < providedArgs.length) {\n      args.push(providedArgs[startIndex++]);\n    } else {\n      args.push(arg);\n    }\n  }\n  for (let i = startIndex; i < providedArgs.length; i++) {\n    args.push(providedArgs[i]);\n  }\n  return args;\n}\n\nconst curryPlaceholder: unique symbol = Symbol('curry.placeholder');\ncurry.placeholder = curryPlaceholder;\n"
  },
  {
    "path": "src/compat/function/curryRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { bind } from './bind';\nimport { curryRight } from './curryRight';\nimport { partial } from '../../function/partial';\nimport { partialRight } from '../../function/partialRight';\nimport { map } from '../array/map';\n\ndescribe('curryRight', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown, _d: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should curry based on the number of arguments given', () => {\n    const curried = curryRight(fn),\n      expected = [1, 2, 3, 4];\n\n    expect(curried(4)(3)(2)(1)).toEqual(expected);\n    expect(curried(3, 4)(1, 2)).toEqual(expected);\n    expect(curried(1, 2, 3, 4)).toEqual(expected);\n  });\n\n  it('should allow specifying `arity`', () => {\n    const curried = curryRight(fn, 3),\n      expected = [1, 2, 3];\n\n    expect(curried(3)(1, 2)).toEqual(expected);\n    expect(curried(2, 3)(1)).toEqual(expected);\n    expect(curried(1, 2, 3)).toEqual(expected);\n  });\n\n  it('should coerce `arity` to an integer', () => {\n    const values = ['0', 0.6, 'xyz'],\n      expected = values.map(() => []);\n\n    // @ts-expect-error - unusual arity type\n    const actual = values.map(arity => curryRight(fn, arity)());\n\n    expect(actual).toEqual(expected);\n    // @ts-expect-error - unusual arity type\n    expect(curryRight(fn, '2')(1)(2)).toEqual([2, 1]);\n  });\n\n  it('should support placeholders', () => {\n    const curried = curryRight(fn) as any,\n      ph = curried.placeholder;\n\n    expect(curried(4)(2, ph)(1, ph)(3)).toEqual([1, 2, 3, 4]);\n    expect(curried(3, ph)(4)(1, ph)(2)).toEqual([1, 2, 3, 4]);\n    expect(curried(ph, ph, 4)(ph, 3)(ph, 2)(1)).toEqual([1, 2, 3, 4]);\n    expect(curried(ph, ph, ph, 4)(ph, ph, 3)(ph, 2)(1)).toEqual([1, 2, 3, 4]);\n  });\n\n  it('should persist placeholders', () => {\n    const curried = curryRight(fn) as any,\n      ph = curried.placeholder,\n      actual = curried('a', ph, ph, ph)('b')(ph)('c')('d');\n\n    expect(actual).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should provide additional arguments after reaching the target arity', () => {\n    const curried = curryRight(fn, 3) as any;\n    expect(curried(4)(1, 2, 3)).toEqual([1, 2, 3, 4]);\n    expect(curried(4, 5)(1, 2, 3)).toEqual([1, 2, 3, 4, 5]);\n    expect(curried(1, 2, 3, 4, 5, 6)).toEqual([1, 2, 3, 4, 5, 6]);\n  });\n\n  it('should create a function with a `length` of `0`', () => {\n    const curried = curryRight(fn);\n    expect(curried.length).toBe(0);\n    expect(curried(4).length).toBe(0);\n    expect(curried(3, 4).length).toBe(0);\n\n    const curried2 = curryRight(fn, 4);\n    expect(curried2.length).toBe(0);\n    expect(curried2(4).length).toBe(0);\n    expect(curried2(3, 4).length).toBe(0);\n  });\n\n  it('should ensure `new curried` is an instance of `func`', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const curried = curryRight(Foo);\n    const object = {};\n\n    // @ts-expect-error - curried is a constructor\n    expect(new curried(false) instanceof Foo).toBe(true);\n\n    // @ts-expect-error - curried is a constructor\n    expect(new curried(true)).toBe(object);\n\n    function Bar(object: unknown, value: unknown) {\n      return value && object;\n    }\n\n    const curriedBar = curryRight(Bar) as any;\n    expect(new (curriedBar(true))(object)).toBe(object);\n  });\n\n  it('should use `this` binding of function', () => {\n    const fn = function (this: any, a: string | number, b: string | number, c: string | number) {\n      const value = this || {};\n      return [value[a], value[b], value[c]];\n    };\n\n    const object: any = { a: 1, b: 2, c: 3 },\n      expected = [1, 2, 3];\n\n    expect(curryRight(bind(fn, object), 3)('c')('b')('a')).toEqual(expected);\n    expect(curryRight(bind(fn, object), 3)('b', 'c')('a')).toEqual(expected);\n    expect(curryRight(bind(fn, object), 3)('a', 'b', 'c')).toEqual(expected);\n\n    expect(bind(curryRight(fn), object)('c')('b')('a')).toEqual(Array(3));\n    expect(bind(curryRight(fn), object)('b', 'c')('a')).toEqual(Array(3));\n    expect(bind(curryRight(fn), object)('a', 'b', 'c')).toEqual(expected);\n\n    object.curried = curryRight(fn);\n    expect(object.curried('c')('b')('a')).toEqual(Array(3));\n    expect(object.curried('b', 'c')('a')).toEqual(Array(3));\n    expect(object.curried('a', 'b', 'c')).toEqual(expected);\n  });\n\n  it('should work with partialed methods', () => {\n    const curried = curryRight(fn),\n      expected = [1, 2, 3, 4];\n\n    const a = partialRight(curried, 4),\n      b = partialRight(a, 3) as any,\n      c = bind(b, null, 1),\n      d = partial(b(2), 1) as any;\n\n    expect(c(2)).toEqual(expected);\n    expect(d()).toEqual(expected);\n  });\n\n  it(`\\`curryRight\\` should work for function names that shadow those on \\`Object.prototype\\``, () => {\n    const curried = curryRight(function hasOwnProperty(a: unknown, b: unknown) {\n      return [a, b];\n    });\n\n    expect(curried(2)(1)).toEqual([1, 2]);\n  });\n\n  it(`\\`curryRight\\` should work as an iteratee for methods like \\`map\\``, () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    function fn(_a: unknown, _b: unknown) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    }\n    const array = [fn, fn, fn];\n    const object = { a: fn, b: fn, c: fn };\n\n    [array, object].forEach(collection => {\n      const curries = map(collection, curryRight as (...args: any[]) => any),\n        expected = map(collection, () => ['a', 'b']);\n\n      const actual = map(curries, (curried: any) => curried('b')('a'));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n});\n"
  },
  {
    "path": "src/compat/function/curryRight.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/naming-convention\ntype __ = typeof curryRightPlaceholder;\n\ninterface RightCurriedFunction1<T1, R> {\n  (): RightCurriedFunction1<T1, R>;\n  (t1: T1): R;\n}\ninterface RightCurriedFunction2<T1, T2, R> {\n  (): RightCurriedFunction2<T1, T2, R>;\n  (t2: T2): RightCurriedFunction1<T1, R>;\n  (t1: T1, t2: __): RightCurriedFunction1<T2, R>;\n  (t1: T1, t2: T2): R;\n}\ninterface RightCurriedFunction3<T1, T2, T3, R> {\n  (): RightCurriedFunction3<T1, T2, T3, R>;\n  (t3: T3): RightCurriedFunction2<T1, T2, R>;\n  (t2: T2, t3: __): RightCurriedFunction2<T1, T3, R>;\n  (t2: T2, t3: T3): RightCurriedFunction1<T1, R>;\n  (t1: T1, t2: __, t3: __): RightCurriedFunction2<T2, T3, R>;\n  (t1: T1, t2: T2, t3: __): RightCurriedFunction1<T3, R>;\n  (t1: T1, t2: __, t3: T3): RightCurriedFunction1<T2, R>;\n  (t1: T1, t2: T2, t3: T3): R;\n}\ninterface RightCurriedFunction4<T1, T2, T3, T4, R> {\n  (): RightCurriedFunction4<T1, T2, T3, T4, R>;\n  (t4: T4): RightCurriedFunction3<T1, T2, T3, R>;\n  (t3: T3, t4: __): RightCurriedFunction3<T1, T2, T4, R>;\n  (t3: T3, t4: T4): RightCurriedFunction2<T1, T2, R>;\n  (t2: T2, t3: __, t4: __): RightCurriedFunction3<T1, T3, T4, R>;\n  (t2: T2, t3: T3, t4: __): RightCurriedFunction2<T1, T4, R>;\n  (t2: T2, t3: __, t4: T4): RightCurriedFunction2<T1, T3, R>;\n  (t2: T2, t3: T3, t4: T4): RightCurriedFunction1<T1, R>;\n  (t1: T1, t2: __, t3: __, t4: __): RightCurriedFunction3<T2, T3, T4, R>;\n  (t1: T1, t2: T2, t3: __, t4: __): RightCurriedFunction2<T3, T4, R>;\n  (t1: T1, t2: __, t3: T3, t4: __): RightCurriedFunction2<T2, T4, R>;\n  (t1: T1, t2: __, t3: __, t4: T4): RightCurriedFunction2<T2, T3, R>;\n  (t1: T1, t2: T2, t3: T3, t4: __): RightCurriedFunction1<T4, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4): RightCurriedFunction1<T3, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4): RightCurriedFunction1<T2, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4): R;\n}\ninterface RightCurriedFunction5<T1, T2, T3, T4, T5, R> {\n  (): RightCurriedFunction5<T1, T2, T3, T4, T5, R>;\n  (t5: T5): RightCurriedFunction4<T1, T2, T3, T4, R>;\n  (t4: T4, t5: __): RightCurriedFunction4<T1, T2, T3, T5, R>;\n  (t4: T4, t5: T5): RightCurriedFunction3<T1, T2, T3, R>;\n  (t3: T3, t4: __, t5: __): RightCurriedFunction4<T1, T2, T4, T5, R>;\n  (t3: T3, t4: T4, t5: __): RightCurriedFunction3<T1, T2, T5, R>;\n  (t3: T3, t4: __, t5: T5): RightCurriedFunction3<T1, T2, T4, R>;\n  (t3: T3, t4: T4, t5: T5): RightCurriedFunction2<T1, T2, R>;\n  (t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction4<T1, T3, T4, T5, R>;\n  (t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction3<T1, T4, T5, R>;\n  (t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction3<T1, T3, T5, R>;\n  (t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction3<T1, T3, T4, R>;\n  (t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction2<T1, T5, R>;\n  (t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction2<T1, T4, R>;\n  (t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction2<T1, T3, R>;\n  (t2: T2, t3: T3, t4: T4, t5: T5): RightCurriedFunction1<T1, R>;\n  (t1: T1, t2: __, t3: __, t4: __, t5: __): RightCurriedFunction4<T2, T3, T4, T5, R>;\n  (t1: T1, t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction3<T3, T4, T5, R>;\n  (t1: T1, t2: __, t3: T3, t4: __, t5: __): RightCurriedFunction3<T2, T4, T5, R>;\n  (t1: T1, t2: __, t3: __, t4: T4, t5: __): RightCurriedFunction3<T2, T3, T5, R>;\n  (t1: T1, t2: __, t3: __, t4: __, t5: T5): RightCurriedFunction3<T2, T3, T4, R>;\n  (t1: T1, t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction2<T4, T5, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction2<T3, T5, R>;\n  (t1: T1, t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction2<T3, T4, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4, t5: __): RightCurriedFunction2<T2, T5, R>;\n  (t1: T1, t2: __, t3: T3, t4: __, t5: T5): RightCurriedFunction2<T2, T4, R>;\n  (t1: T1, t2: __, t3: __, t4: T4, t5: T5): RightCurriedFunction2<T2, T3, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction1<T5, R>;\n  (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction1<T4, R>;\n  (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction1<T3, R>;\n  (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): RightCurriedFunction1<T2, R>;\n  (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;\n}\n\nexport function curryRight<T1, R>(func: (t1: T1) => R, arity?: number): RightCurriedFunction1<T1, R>;\nexport function curryRight<T1, T2, R>(func: (t1: T1, t2: T2) => R, arity?: number): RightCurriedFunction2<T1, T2, R>;\nexport function curryRight<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arity?: number\n): RightCurriedFunction3<T1, T2, T3, R>;\nexport function curryRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arity?: number\n): RightCurriedFunction4<T1, T2, T3, T4, R>;\nexport function curryRight<T1, T2, T3, T4, T5, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R,\n  arity?: number\n): RightCurriedFunction5<T1, T2, T3, T4, T5, R>;\nexport function curryRight(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have been provided, or returns a function that accepts the remaining `func` arguments, and so on.\n * The arity of `func` may be specified if `func.length` is not sufficient.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * The `curryRight.placeholder` value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of curried functions.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @param {number=func.length} arity - The arity of func.\n * @param {unknown} guard - Enables use as an iteratee for methods like `Array#map`.\n * @returns {((...args: any[]) => any) & { placeholder: typeof curryRight.placeholder }} - Returns the new curried function.\n *\n * @example\n * const abc = function(a, b, c) {\n *   return Array.from(arguments);\n * };\n *\n * let curried = curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(curryRight.placeholder, 2)(1);\n * // => [1, 2, 3]\n *\n * // Curried with arity.\n * curried = curryRight(abc, 2);\n *\n * curried(2)(1);\n * // => [1, 2]\n */\nexport function curryRight(\n  func: (...args: any[]) => any,\n  arity: number = func.length,\n  guard?: unknown\n): ((...args: any[]) => any) & { placeholder: typeof curryRight.placeholder } {\n  arity = guard ? func.length : arity;\n  arity = Number.parseInt(arity as any, 10);\n  if (Number.isNaN(arity) || arity < 1) {\n    arity = 0;\n  }\n\n  const wrapper = function (this: any, ...partialArgs: any[]) {\n    const holders = partialArgs.filter(item => item === curryRight.placeholder);\n    const length = partialArgs.length - holders.length;\n    if (length < arity) {\n      return makeCurryRight(func, arity - length, partialArgs);\n    }\n    if (this instanceof wrapper) {\n      // @ts-expect-error - fn is a constructor\n      return new func(...partialArgs);\n    }\n    return func.apply(this, partialArgs);\n  };\n\n  wrapper.placeholder = curryRightPlaceholder;\n\n  return wrapper;\n}\n\nfunction makeCurryRight(\n  func: (...args: any[]) => any,\n  arity: number,\n  partialArgs: any[]\n): ((...args: any[]) => any) & { placeholder: typeof curryRight.placeholder } {\n  function wrapper(this: any, ...providedArgs: any[]) {\n    const holders = providedArgs.filter(item => item === curryRight.placeholder);\n    const length = providedArgs.length - holders.length;\n    providedArgs = composeArgs(providedArgs, partialArgs);\n    if (length < arity) {\n      return makeCurryRight(func, arity - length, providedArgs);\n    }\n    if (this instanceof wrapper) {\n      // @ts-expect-error - fn is a constructor\n      return new func(...providedArgs);\n    }\n    return func.apply(this, providedArgs);\n  }\n  wrapper.placeholder = curryRightPlaceholder;\n  return wrapper;\n}\n\nfunction composeArgs(providedArgs: any[], partialArgs: any[]): any[] {\n  const placeholderLength = partialArgs.filter(arg => arg === curryRight.placeholder).length;\n  const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);\n  const args: any[] = [];\n\n  let providedIndex = 0;\n  for (let i = 0; i < rangeLength; i++) {\n    args.push(providedArgs[providedIndex++]);\n  }\n  for (let i = 0; i < partialArgs.length; i++) {\n    const arg = partialArgs[i];\n\n    if (arg === curryRight.placeholder) {\n      if (providedIndex < providedArgs.length) {\n        args.push(providedArgs[providedIndex++]);\n      } else {\n        args.push(arg);\n      }\n    } else {\n      args.push(arg);\n    }\n  }\n  return args;\n}\n\nconst curryRightPlaceholder: unique symbol = Symbol('curryRight.placeholder');\ncurryRight.placeholder = curryRightPlaceholder;\n"
  },
  {
    "path": "src/compat/function/debounce.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it, vi } from 'vitest';\nimport type { debounce as debounceLodash } from 'lodash';\nimport { debounce } from './debounce';\nimport { identity } from '../../function/identity';\nimport { noop } from '../../function/noop';\nimport { delay } from '../../promise/delay';\n\ndescribe('debounce', () => {\n  it('should debounce function calls', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    debouncedFunc();\n    debouncedFunc();\n\n    await delay(debounceMs * 2);\n\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should delay the function call by the specified wait time', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs / 2 + 1);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should reset the wait time if called again before wait time ends', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs + 1);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should cancel the debounced function call', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    debouncedFunc.cancel();\n    await delay(debounceMs);\n\n    expect(func).not.toHaveBeenCalled();\n  });\n\n  it('should work correctly if the debounced function is called after the wait time', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs + 1);\n    debouncedFunc();\n    await delay(debounceMs + 1);\n\n    expect(func).toHaveBeenCalledTimes(2);\n  });\n\n  it('should have no effect if we call cancel when the function is not executed', () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    expect(() => debouncedFunc.cancel()).not.toThrow();\n  });\n\n  it('should call the function with correct arguments', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc('test', 123);\n\n    await delay(debounceMs * 2);\n\n    expect(func).toHaveBeenCalledTimes(1);\n    expect(func).toHaveBeenCalledWith('test', 123);\n  });\n\n  it('should call the function immediately and only once if leading is true', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs, { leading: true });\n\n    debouncedFunc();\n    expect(func).toHaveBeenCalledTimes(1);\n\n    await delay(debounceMs * 2);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should call the function immediately and after the wait time if leading and trailing are true', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs, {\n      leading: true,\n      trailing: true,\n    });\n\n    debouncedFunc();\n    debouncedFunc();\n\n    expect(func).toHaveBeenCalledTimes(1);\n\n    await delay(debounceMs * 2);\n    expect(func).toHaveBeenCalledTimes(2);\n  });\n\n  it('should not call the function immediately if leading is false', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs, { leading: false });\n\n    debouncedFunc();\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs * 2);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should not call the function after the wait time if trailing is false', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs, { trailing: false });\n\n    debouncedFunc();\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs * 2);\n    expect(func).not.toHaveBeenCalled();\n  });\n\n  /** @see https://github.com/lodash/lodash/blob/main/test/debounce.spec.js#L4 */\n  it('should debounce a function', async () => {\n    let callCount = 0;\n\n    const debounced = debounce(value => {\n      ++callCount;\n      return value;\n    }, 32);\n\n    const results = [debounced('a'), debounced('b'), debounced('c')];\n    expect(results).toEqual([undefined, undefined, undefined]);\n    expect(callCount).toBe(0);\n\n    await delay(128);\n\n    expect(callCount).toBe(1);\n\n    const results2 = [debounced('d'), debounced('e'), debounced('f')];\n    expect(results2).toEqual(['c', 'c', 'c']);\n    expect(callCount).toBe(1);\n\n    await delay(128);\n\n    expect(callCount).toBe(2);\n  });\n\n  it('subsequent debounced calls return the last `func` result', async () => {\n    const debounced = debounce(identity, 32);\n    debounced('a');\n\n    await delay(64);\n\n    expect(debounced('b')).not.toEqual('b');\n\n    await delay(64);\n\n    expect(debounced('c')).not.toEqual('c');\n  });\n\n  it('should not immediately call `func` when `wait` is `0`', async () => {\n    let callCount = 0;\n    const debounced = debounce(() => {\n      ++callCount;\n    }, 0);\n\n    debounced();\n    debounced();\n    expect(callCount).toBe(0);\n\n    await delay(5);\n\n    expect(callCount).toBe(1);\n  });\n\n  it('should apply default options', async () => {\n    let callCount = 0;\n    const debounced = debounce(\n      () => {\n        callCount++;\n      },\n      32,\n      {}\n    );\n\n    debounced();\n    expect(callCount).toBe(0);\n\n    await delay(64);\n\n    expect(callCount).toBe(1);\n  });\n\n  it('should support a `leading` option', async () => {\n    const callCounts = [0, 0];\n\n    const withLeading = debounce(\n      () => {\n        callCounts[0]++;\n      },\n      32,\n      { leading: true }\n    );\n\n    const withLeadingAndTrailing = debounce(\n      () => {\n        callCounts[1]++;\n      },\n      32,\n      { leading: true }\n    );\n\n    withLeading();\n    expect(callCounts[0]).toBe(1);\n\n    withLeadingAndTrailing();\n    withLeadingAndTrailing();\n    expect(callCounts[1]).toBe(1);\n\n    await delay(64);\n\n    expect(callCounts).toEqual([1, 2]);\n\n    withLeading();\n    expect(callCounts[0]).toBe(2);\n  });\n\n  it('subsequent leading debounced calls return the last `func` result', async () => {\n    const debounced = debounce(identity, 32, {\n      leading: true,\n      trailing: false,\n    });\n    const results = [debounced('a'), debounced('b')];\n\n    expect(results).toEqual(['a', 'a']);\n\n    await delay(64);\n\n    const results2 = [debounced('c'), debounced('d')];\n    expect(results2).toEqual(['c', 'c']);\n  });\n\n  it('should support a `trailing` option', async () => {\n    let withCount = 0;\n    let withoutCount = 0;\n\n    const withTrailing = debounce(\n      () => {\n        withCount++;\n      },\n      32,\n      { trailing: true }\n    );\n\n    const withoutTrailing = debounce(\n      () => {\n        withoutCount++;\n      },\n      32,\n      { trailing: false }\n    );\n\n    withTrailing();\n    expect(withCount).toBe(0);\n\n    withoutTrailing();\n    expect(withoutCount).toBe(0);\n\n    await delay(64);\n\n    expect(withCount).toBe(1);\n    expect(withoutCount).toBe(0);\n  });\n\n  it('should support a `maxWait` option', async () => {\n    let callCount = 0;\n\n    const debounced = debounce(\n      (value?: unknown) => {\n        ++callCount;\n        return value;\n      },\n      32,\n      { maxWait: 64 }\n    );\n\n    debounced();\n    debounced();\n    expect(callCount).toBe(0);\n\n    await delay(128);\n\n    expect(callCount).toBe(1);\n    debounced();\n    debounced();\n    expect(callCount).toBe(1);\n\n    await delay(128);\n\n    expect(callCount).toBe(2);\n  });\n\n  it('should support `maxWait` in a tight loop', async () => {\n    const limit = 1000;\n    let withCount = 0;\n    let withoutCount = 0;\n\n    const withMaxWait = debounce(\n      () => {\n        withCount++;\n      },\n      64,\n      { maxWait: 128 }\n    );\n\n    const withoutMaxWait = debounce(() => {\n      withoutCount++;\n    }, 96);\n\n    const start = Date.now();\n    while (Date.now() - start < limit) {\n      withMaxWait();\n      withoutMaxWait();\n    }\n    const actual = [Boolean(withoutCount), Boolean(withCount)];\n    await delay(1);\n    expect(actual).toEqual([false, true]);\n  });\n\n  // FIXME: flaky test\n  it.skip('should queue a trailing call for subsequent debounced calls after `maxWait`', async () => {\n    let callCount = 0;\n\n    const debounced = debounce(\n      () => {\n        ++callCount;\n      },\n      200,\n      { maxWait: 200 }\n    );\n\n    debounced();\n\n    setTimeout(debounced, 150);\n    setTimeout(debounced, 200);\n    setTimeout(debounced, 250);\n\n    await delay(500);\n\n    expect(callCount).toBe(2);\n  });\n\n  it('should cancel `maxDelayed` when `delayed` is invoked', async () => {\n    let callCount = 0;\n\n    const debounced = debounce(\n      () => {\n        callCount++;\n      },\n      32,\n      { maxWait: 64 }\n    );\n\n    debounced();\n\n    await delay(128);\n\n    debounced();\n    expect(callCount).toBe(1);\n\n    await delay(64);\n    expect(callCount).toBe(2);\n  });\n\n  it('should invoke the trailing call with the correct arguments and `this` binding', async () => {\n    let actual: any;\n    let callCount = 0;\n    const object = {};\n\n    const debounced = debounce(\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      function (this: any, _: any) {\n        actual = [this];\n        // eslint-disable-next-line prefer-rest-params\n        Array.prototype.push.apply(actual, arguments as any);\n        return ++callCount !== 2;\n      },\n      32,\n      { leading: true, maxWait: 64 }\n    );\n\n    while (true) {\n      if (!debounced.call(object, 'a')) {\n        break;\n      }\n    }\n\n    await delay(64);\n\n    expect(callCount).toBe(2);\n    expect(actual).toEqual([object, 'a']);\n  });\n\n  /** @see https://github.com/lodash/lodash/blob/4.17.15/test/test.js#L22973 */\n  const func = debounce;\n  const isDebounce = true;\n  const methodName = 'debounce';\n\n  it(`\\`_.${methodName}\\` should not error for non-object \\`options\\` values`, () => {\n    expect(() => func(noop, 32, 1 as any)).not.toThrow();\n  });\n\n  it(`\\`_.${methodName}\\` should use a default \\`wait\\` of \\`0\\``, async () => {\n    let callCount = 0;\n    const funced = func(() => {\n      callCount++;\n    });\n\n    funced();\n\n    await delay(32);\n\n    funced();\n    expect(callCount).toBe(isDebounce ? 1 : 2);\n  });\n\n  it(`\\`_.${methodName}\\` should invoke \\`func\\` with the correct \\`this\\` binding`, async () => {\n    const actual: any[] = [];\n    const object = {\n      funced: func(function (this: any) {\n        actual.push(this);\n      }, 32),\n    };\n    const expected = [object];\n\n    object.funced();\n\n    await delay(64);\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`_.${methodName}\\` supports recursive calls`, async () => {\n    const actual: any[] = [];\n    const args = ['a', 'b', 'c'].map(chr => [{}, chr]);\n    const expected = args.slice();\n    const queue: any[] = args.slice();\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const funced = func(function (this: any, _: unknown) {\n      const current = [this];\n      // eslint-disable-next-line prefer-rest-params\n      Array.prototype.push.apply(current, arguments as any);\n      actual.push(current);\n\n      const next = queue.shift();\n      if (next) {\n        funced.call(next[0], next[1]);\n      }\n    }, 32);\n\n    const next = queue.shift();\n    funced.call(next[0], next[1]);\n    expect(actual).toEqual(expected.slice(0, isDebounce ? 0 : 1));\n\n    await delay(256);\n\n    expect(actual).toEqual(expected.slice(0, actual.length));\n  });\n\n  it(`\\`_.${methodName}\\` should support cancelling delayed calls`, async () => {\n    let callCount = 0;\n\n    const funced = func(\n      () => {\n        callCount++;\n      },\n      32,\n      { leading: false }\n    );\n\n    funced();\n    funced.cancel();\n\n    await delay(64);\n\n    expect(callCount).toBe(0);\n  });\n\n  it(`\\`_.${methodName}\\` should reset \\`lastCalled\\` after cancelling`, async () => {\n    let callCount = 0;\n\n    const funced = func(() => ++callCount, 32, { leading: true });\n\n    expect(funced()).toBe(1);\n    funced.cancel();\n\n    expect(funced()).toBe(2);\n    funced();\n\n    await delay(64);\n    expect(callCount).toBe(3);\n  });\n\n  it(`\\`_.${methodName}\\` should support flushing delayed calls`, async () => {\n    let callCount = 0;\n\n    const funced = func(() => ++callCount, 32, { leading: false });\n\n    funced();\n    expect(funced.flush()).toBe(1);\n\n    await delay(64);\n\n    expect(callCount).toBe(1);\n  });\n\n  it(`\\`_.${methodName}\\` should noop \\`cancel\\` and \\`flush\\` when nothing is queued`, async () => {\n    let callCount = 0;\n    const funced = func(() => {\n      callCount++;\n    }, 32);\n\n    funced.cancel();\n    expect(funced.flush()).toBe(undefined);\n\n    await delay(64);\n    expect(callCount).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(debounce).toEqualTypeOf<typeof debounceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/debounce.ts",
    "content": "import { debounce as debounceToolkit } from '../../function/debounce.ts';\n\ninterface DebounceSettings {\n  /**\n   * If `true`, the function will be invoked on the leading edge of the timeout.\n   * @default false\n   */\n  leading?: boolean | undefined;\n  /**\n   * The maximum time `func` is allowed to be delayed before it's invoked.\n   * @default Infinity\n   */\n  maxWait?: number | undefined;\n  /**\n   * If `true`, the function will be invoked on the trailing edge of the timeout.\n   * @default true\n   */\n  trailing?: boolean | undefined;\n}\n\ninterface DebounceSettingsLeading extends DebounceSettings {\n  leading: true;\n}\n\nexport interface DebouncedFunc<T extends (...args: any[]) => any> {\n  /**\n   * Call the original function, but applying the debounce rules.\n   *\n   * If the debounced function can be run immediately, this calls it and returns its return\n   * value.\n   *\n   * Otherwise, it returns the return value of the last invocation, or undefined if the debounced\n   * function was not invoked yet.\n   */\n  (...args: Parameters<T>): ReturnType<T> | undefined;\n\n  /**\n   * Throw away any pending invocation of the debounced function.\n   */\n  cancel(): void;\n\n  /**\n   * If there is a pending invocation of the debounced function, invoke it immediately and return\n   * its return value.\n   *\n   * Otherwise, return the value from the last invocation, or undefined if the debounced function\n   * was never invoked.\n   */\n  flush(): ReturnType<T> | undefined;\n}\n\nexport interface DebouncedFuncLeading<T extends (...args: any[]) => any> extends DebouncedFunc<T> {\n  (...args: Parameters<T>): ReturnType<T>;\n  flush(): ReturnType<T>;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * You can set the debounced function to run at the start (`leading`) or end (`trailing`) of the delay period.\n * If `leading` is true, the function runs immediately on the first call.\n * If `trailing` is true, the function runs after `debounceMs` milliseconds have passed since the last call.\n * If both `leading` and `trailing` are true, the function runs at both the start and end, but it must be called at least twice within `debounceMs` milliseconds for this to happen\n * (since one debounced function call cannot trigger the function twice).\n *\n * You can also set a `maxWait` time, which is the maximum time the function is allowed to be delayed before it is called.\n *\n * @template F - The type of function.\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @param {boolean} options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n * @param {boolean} options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n * @param {number} options.maxWait - The maximum time `func` is allowed to be delayed before it's invoked.\n * @returns A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n *  console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<T extends (...args: any) => any>(\n  func: T,\n  wait: number | undefined,\n  options: DebounceSettingsLeading\n): DebouncedFuncLeading<T>;\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * You can set the debounced function to run at the start (`leading`) or end (`trailing`) of the delay period.\n * If `leading` is true, the function runs immediately on the first call.\n * If `trailing` is true, the function runs after `debounceMs` milliseconds have passed since the last call.\n * If both `leading` and `trailing` are true, the function runs at both the start and end, but it must be called at least twice within `debounceMs` milliseconds for this to happen\n * (since one debounced function call cannot trigger the function twice).\n *\n * You can also set a `maxWait` time, which is the maximum time the function is allowed to be delayed before it is called.\n *\n * @template F - The type of function.\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @param {boolean} options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n * @param {boolean} options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n * @param {number} options.maxWait - The maximum time `func` is allowed to be delayed before it's invoked.\n * @returns A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n *  console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<T extends (...args: any) => any>(\n  func: T,\n  wait?: number,\n  options?: DebounceSettings\n): DebouncedFunc<T>;\n\nexport function debounce<F extends (...args: any[]) => any>(\n  func: F,\n  debounceMs = 0,\n  options: DebounceSettings = {}\n): DebouncedFunc<F> {\n  if (typeof options !== 'object') {\n    options = {};\n  }\n\n  const { leading = false, trailing = true, maxWait } = options;\n\n  const edges = Array(2);\n\n  if (leading) {\n    edges[0] = 'leading';\n  }\n\n  if (trailing) {\n    edges[1] = 'trailing';\n  }\n\n  let result: ReturnType<F> | undefined = undefined;\n  let pendingAt: number | null = null;\n\n  const _debounced = debounceToolkit(\n    function (this: any, ...args: Parameters<F>) {\n      result = func.apply(this, args);\n      pendingAt = null;\n    },\n    debounceMs,\n    { edges }\n  );\n\n  const debounced = function (this: any, ...args: Parameters<F>) {\n    if (maxWait != null) {\n      if (pendingAt === null) {\n        pendingAt = Date.now();\n      }\n\n      if (Date.now() - pendingAt >= maxWait) {\n        result = func.apply(this, args);\n        pendingAt = Date.now();\n\n        _debounced.cancel();\n        _debounced.schedule();\n\n        return result;\n      }\n    }\n\n    _debounced.apply(this, args);\n    return result;\n  };\n\n  const flush = () => {\n    _debounced.flush();\n    return result;\n  };\n\n  debounced.cancel = _debounced.cancel;\n  debounced.flush = flush;\n\n  return debounced;\n}\n"
  },
  {
    "path": "src/compat/function/defer.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { defer as deferLodash } from 'lodash';\nimport { defer } from './defer';\n\ndescribe('defer', () => {\n  it('should provide additional arguments to `func`', (done: () => void) => {\n    let args: any[];\n\n    defer(\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      function (a: any, b: any) {\n        // eslint-disable-next-line prefer-rest-params\n        args = Array.from(arguments);\n      },\n      1,\n      2\n    );\n\n    setTimeout(() => {\n      expect(args).toEqual([1, 2]);\n      done();\n    }, 32);\n  });\n\n  it('should be cancelable', (done: () => void) => {\n    let pass = true;\n    const timerId = defer(() => {\n      pass = false;\n    });\n\n    clearTimeout(timerId);\n\n    setTimeout(() => {\n      expect(pass).toBe(true);\n      done();\n    }, 32);\n  });\n\n  it('should throw an error if `func` is not a function', () => {\n    expect(() => defer(1 as any)).toThrow();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(defer).toEqualTypeOf<typeof deferLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/defer.ts",
    "content": "/**\n * Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.\n *\n * @param {(...args: any[]) => any} func The function to defer.\n * @param {...any[]} args The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n *\n * @example\n * defer(console.log, 'deferred');\n * // => Logs 'deferred' after the current call stack has cleared.\n */\nexport function defer(func: (...args: any[]) => any, ...args: any[]): number;\n\n/**\n * Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.\n *\n * @param {F} func The function to defer.\n * @param {Parameters<F>} args The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n *\n * @example\n * defer((text) => {\n *   console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after the current call stack has cleared.\n */\nexport function defer<F extends (...args: any[]) => any>(func: F, ...args: Parameters<F>): number {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n  return setTimeout(func, 1, ...args);\n}\n"
  },
  {
    "path": "src/compat/function/delay.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { delay as delayLodash } from 'lodash';\nimport { delay } from './delay';\nimport { delay as delayToolkit } from '../../promise';\nimport { slice } from '../_internal/slice';\n\ndescribe('delay', () => {\n  it('should delay `func` execution', async () => {\n    let pass = false;\n    delay(() => {\n      pass = true;\n    }, 32);\n\n    setTimeout(() => {\n      expect(pass).toBe(false);\n    }, 1);\n\n    await delayToolkit(64);\n\n    expect(pass).toBe(true);\n  });\n\n  it('should provide additional arguments to `func`', async () => {\n    let args;\n    delay(\n      function () {\n        // eslint-disable-next-line prefer-rest-params\n        args = slice.call(arguments);\n      },\n      32,\n      1,\n      2\n    );\n\n    await delayToolkit(64);\n\n    expect(args).toEqual([1, 2]);\n  });\n\n  it('should use a default `wait` of `0`', async () => {\n    let pass = false;\n    // @ts-expect-error invalid type\n    delay(() => {\n      pass = true;\n    });\n\n    expect(pass).toBe(false);\n\n    await delayToolkit(0);\n\n    expect(pass).toBe(true);\n  });\n\n  it('should be cancelable', async () => {\n    let pass = true;\n    const timerId = delay(() => {\n      pass = false;\n    }, 32);\n\n    clearTimeout(timerId);\n\n    await delayToolkit(64);\n\n    expect(pass).toBe(true);\n  });\n\n  it('should work with mocked `setTimeout`', () => {\n    let pass = false;\n    const originalSetTimeout = globalThis.setTimeout;\n\n    // @ts-expect-error invalid type\n    global.setTimeout = (func: () => void) => {\n      func();\n    };\n\n    delay(() => {\n      pass = true;\n    }, 32);\n\n    expect(pass).toBe(true);\n\n    global.setTimeout = originalSetTimeout;\n  });\n\n  it('should throw an error if `func` is not a function', () => {\n    expect(() => {\n      // @ts-expect-error invalid type\n      delay('hello', 1000);\n    }).toThrow('Expected a function');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(delay).toEqualTypeOf<typeof delayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/delay.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\n\n/**\n * Invokes the specified function after a delay of the given number of milliseconds.\n * Any additional arguments are passed to the function when it is invoked.\n *\n * @param {(...args: any[]) => any} func - The function to delay.\n * @param {number} wait - The number of milliseconds to delay the invocation.\n * @param {...any[]} args - The arguments to pass to the function when it is invoked.\n * @returns {number} Returns the timer id.\n * @throws {TypeError} If the first argument is not a function.\n *\n * @example\n * // Example 1: Delayed function execution\n * const timerId = delay(\n *   (greeting, recipient) => {\n *     console.log(`${greeting}, ${recipient}!`);\n *   },\n *   1000,\n *   'Hello',\n *   'Alice'\n * );\n * // => 'Hello, Alice!' will be logged after one second.\n *\n * // Example 2: Clearing the timeout before execution\n * clearTimeout(timerId);\n * // The function will not be executed because the timeout was cleared.\n */\nexport function delay(func: (...args: any[]) => any, wait: number, ...args: any[]): number {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n\n  return setTimeout(func, toNumber(wait) || 0, ...args);\n}\n"
  },
  {
    "path": "src/compat/function/flip.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flip as flipLodash } from 'lodash';\nimport { flip } from './flip';\n\ndescribe('flip', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(a: any, b: any, c: any, d: any) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should flip arguments provided to `func`', () => {\n    const flipped = flip(fn);\n    expect(flipped('a', 'b', 'c', 'd')).toEqual(['d', 'c', 'b', 'a']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flip).toEqualTypeOf<typeof flipLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/flip.ts",
    "content": "/**\n * Reverses the order of arguments for a given function.\n *\n * @template T - The type of the function being flipped.\n * @param {T} func - The function whose arguments will be reversed.\n * @returns {T} A new function that takes the reversed arguments and returns the result of calling `func`.\n *\n * @example\n * var flipped = flip(function() {\n *   return Array.prototype.slice.call(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\nexport function flip<T extends (...args: any) => any>(func: T): T;\n\n/**\n * Reverses the order of arguments for a given function.\n *\n * @template F - The type of the function being flipped.\n * @param {F} func - The function whose arguments will be reversed.\n * @returns {(...args: Reversed<Parameters<F>>) => ReturnType<F>} A new function that takes the\n * reversed arguments and returns the result of calling `func`.\n *\n * @example\n * function fn(a: string, b: string, c: string, d: string) {\n *   return [a, b, c, d];\n * }\n *\n * const flipped = flip(fn);\n * flipped('a', 'b', 'c', 'd'); // => ['d', 'c', 'b', 'a']\n */\n\nexport function flip<F extends (...args: any[]) => any>(func: F): (...args: Reversed<Parameters<F>>) => ReturnType<F> {\n  return function (this: any, ...args: Reversed<Parameters<F>>) {\n    return func.apply(this, args.reverse());\n  };\n}\n\ntype Reversed<T extends any[]> = T extends [infer First, ...infer Rest] ? [...Reversed<Rest>, First] : [];\n"
  },
  {
    "path": "src/compat/function/flow.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flow as flowLodash } from 'lodash';\nimport { ary } from './ary';\nimport { flow } from './flow';\nimport { head } from '../../array/head';\nimport { uniq } from '../../array/uniq';\nimport { map } from '../array/map';\nimport { curry } from '../function/curry';\n\nconst add = function (x: number, y: number) {\n  return x + y;\n};\n\nconst square = function (n: number) {\n  return n * n;\n};\n\ndescribe('flow', () => {\n  it(`\\`flow\\` should supply each function with the return value of the previous`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flow(add, square, fixed);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it(`\\`flow\\` should return a new function`, () => {\n    const noop = () => {};\n    const combined = flow(noop);\n    expect(combined).not.toBe(noop);\n  });\n\n  it(`\\`flow\\` should work with a curried function and \\`_.head\\``, () => {\n    const curried = curry((i: any) => i);\n\n    const combined = flow(head, curried);\n\n    expect(combined([1])).toBe(1);\n  });\n\n  it(`\\`flow\\` should work with curried functions with placeholders`, () => {\n    const curried = curry(ary(map, 2), 2);\n    // eslint-disable-next-line\n    // @ts-ignore\n    const getProp = curried(curried.placeholder, (value: { a: any }) => value.a);\n    const objects = [{ a: 1 }, { a: 2 }, { a: 1 }];\n\n    const combined = flow(getProp, uniq);\n\n    expect(combined(objects)).toEqual([1, 2]);\n  });\n\n  it(`\\`flow\\` should throw an error if a function is not passed`, () => {\n    expect(() => {\n      flow(null as any);\n    }).toThrow();\n  });\n\n  it(`\\`flow\\` should flatten funcs`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flow([add, square], fixed);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flow).toEqualTypeOf<typeof flowLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/flow.ts",
    "content": "import { flatten } from '../../array/flatten.ts';\nimport { flow as flowToolkit } from '../../function/flow.ts';\nimport { Many } from '../_internal/Many.ts';\n\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * @template A - The type of the arguments.\n * @template R - The type of the return values.\n * @param {(...args: A) => R} f1 - The first function to invoke.\n * @param {(a: R) => R} f2 - The second function to invoke.\n * @param {(a: R) => R} f3 - The third function to invoke.\n * @param {(a: R) => R} f4 - The fourth function to invoke.\n * @param {(a: R) => R} f5 - The fifth function to invoke.\n * @param {(a: R) => R} f6 - The sixth function to invoke.\n * @param {(a: R) => R} f7 - The seventh function to invoke.\n * @returns {(...args: A) => R} Returns the new composite function.\n *\n * @example\n * function square(n) {\n *   return n * n;\n * }\n *\n * var addSquare = flow([add, square]);\n * addSquare(1, 2);\n * // => 9\n */\nexport function flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4,\n  f5: (a: R4) => R5,\n  f6: (a: R5) => R6,\n  f7: (a: R6) => R7\n): (...args: A) => R7;\n/**\n * Creates a new function that executes up to 7 functions in sequence, with additional functions flattened.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toString = (n: number) => n.toString();\n *\n * const combined = flow(add, square, double, toString);\n * console.log(combined(1, 2)); // \"18\"\n */\nexport function flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4,\n  f5: (a: R4) => R5,\n  f6: (a: R5) => R6,\n  f7: (a: R6) => R7,\n  ...func: Array<Many<(a: any) => any>>\n): (...args: A) => any;\n\n/**\n * Creates a new function that executes 6 functions in sequence.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow<A extends any[], R1, R2, R3, R4, R5, R6>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4,\n  f5: (a: R4) => R5,\n  f6: (a: R5) => R6\n): (...args: A) => R6;\n\n/**\n * Creates a new function that executes 5 functions in sequence.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow<A extends any[], R1, R2, R3, R4, R5>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4,\n  f5: (a: R4) => R5\n): (...args: A) => R5;\n\n/**\n * Creates a new function that executes 4 functions in sequence.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow<A extends any[], R1, R2, R3, R4>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4\n): (...args: A) => R4;\n\n/**\n * Creates a new function that executes 3 functions in sequence.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow<A extends any[], R1, R2, R3>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3\n): (...args: A) => R3;\n\n/**\n * Creates a new function that executes 2 functions in sequence.\n * The return value of the first function is passed as an argument to the second function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const addThenSquare = flow(add, square);\n * console.log(addThenSquare(1, 2)); // 9\n */\nexport function flow<A extends any[], R1, R2>(f1: (...args: A) => R1, f2: (a: R1) => R2): (...args: A) => R2;\n\n/**\n * Creates a new function that executes the given functions in sequence.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {Array<((...args: any[]) => any) | Array<(...args: any[]) => any>>} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow([add, square], double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow(...funcs: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any {\n  const flattenFuncs = flatten(funcs, 1);\n  if (flattenFuncs.some(func => typeof func !== 'function')) {\n    throw new TypeError('Expected a function');\n  }\n  return flowToolkit(...flattenFuncs);\n}\n"
  },
  {
    "path": "src/compat/function/flowRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { flowRight as flowRightLodash } from 'lodash';\nimport { ary } from './ary';\nimport { flowRight } from './flowRight';\nimport { head } from '../../array/head';\nimport { uniq } from '../../array/uniq';\nimport { map } from '../array/map';\nimport { curry } from '../function/curry';\n\nconst add = function (x: number, y: number) {\n  return x + y;\n};\n\nconst square = function (n: number) {\n  return n * n;\n};\n\ndescribe('flowRight', () => {\n  it(`\\`flowRight\\` should supply each function with the return value of the previous`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flowRight(fixed, square, add);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it(`\\`flowRight\\` should return a new function`, () => {\n    const noop = () => {};\n    const combined = flowRight(noop);\n    expect(combined).not.toBe(noop);\n  });\n\n  it(`\\`flowRight\\` should work with a curried function and \\`_.head\\``, () => {\n    const curried = curry((i: any) => i);\n\n    const combined = flowRight(curried, head);\n\n    expect(combined([1])).toBe(1);\n  });\n\n  it(`\\`flowRight\\` should work with curried functions with placeholders`, () => {\n    const curried = curry(ary(map, 2), 2);\n    // eslint-disable-next-line\n    // @ts-ignore\n    const getProp = curried(curried.placeholder, (value: { a: any }) => value.a);\n    const objects = [{ a: 1 }, { a: 2 }, { a: 1 }];\n\n    const combined = flowRight(uniq, getProp);\n\n    expect(combined(objects)).toEqual([1, 2]);\n  });\n\n  it(`\\`flowRight\\` should throw an error if a function is not passed`, () => {\n    expect(() => {\n      flowRight(null as any);\n    }).toThrow();\n  });\n\n  it(`\\`flowRight\\` should flatten funcs`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flowRight(fixed, [square, add]);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(flowRight).toEqualTypeOf<typeof flowRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/flowRight.ts",
    "content": "import { flatten } from '../../array/flatten.ts';\nimport { flowRight as flowRightToolkit } from '../../function/flowRight.ts';\nimport { Many } from '../_internal/Many.ts';\n\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * @template A - The type of the arguments.\n * @template R - The type of the return values.\n * @param {(a: R) => R} f7 - The seventh function to invoke.\n * @param {(a: R) => R} f6 - The sixth function to invoke.\n * @param {(a: R) => R} f5 - The fifth function to invoke.\n * @param {(a: R) => R} f4 - The fourth function to invoke.\n * @param {(a: R) => R} f3 - The third function to invoke.\n * @param {(a: R) => R} f2 - The second function to invoke.\n * @param {(...args: A) => R} f1 - The first function to invoke.\n * @returns {(...args: A) => R} Returns the new composite function.\n *\n * @example\n * function square(n) {\n *   return n * n;\n * }\n *\n * var addSquare = flowRight(square, add);\n * addSquare(1, 2);\n * // => 9\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4, R5, R6, R7>(\n  f7: (a: R6) => R7,\n  f6: (a: R5) => R6,\n  f5: (a: R4) => R5,\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R7;\n/**\n * Creates a new function that executes 6 functions in sequence from right to left.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toString = (n: number) => String(n);\n * const append = (s: string) => s + '!';\n * const length = (s: string) => s.length;\n *\n * const combined = flowRight(length, append, toString, double, square, add);\n * console.log(combined(1, 2)); // 7\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4, R5, R6>(\n  f6: (a: R5) => R6,\n  f5: (a: R4) => R5,\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R6;\n\n/**\n * Creates a new function that executes 5 functions in sequence from right to left.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toString = (n: number) => String(n);\n * const append = (s: string) => s + '!';\n *\n * const combined = flowRight(append, toString, double, square, add);\n * console.log(combined(1, 2)); // '18!'\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4, R5>(\n  f5: (a: R4) => R5,\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R5;\n\n/**\n * Creates a new function that executes 4 functions in sequence from right to left.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toString = (n: number) => String(n);\n *\n * const combined = flowRight(toString, double, square, add);\n * console.log(combined(1, 2)); // '18'\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4>(\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R4;\n\n/**\n * Creates a new function that executes 3 functions in sequence from right to left.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flowRight(double, square, add);\n * console.log(combined(1, 2)); // 18\n */\nexport function flowRight<A extends any[], R1, R2, R3>(\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R3;\n\n/**\n * Creates a new function that executes 2 functions in sequence from right to left.\n * The return value of the first function is passed as an argument to the second function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flowRight(square, add);\n * console.log(combined(1, 2)); // 9\n */\nexport function flowRight<A extends any[], R1, R2>(f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R2;\n\n/**\n * Creates a new function that executes the given functions in sequence from right to left.\n * The return value of each function is passed as an argument to the next function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toString = (n: number) => String(n);\n *\n * // Pass functions as separate arguments\n * const combined1 = flowRight(toString, double, square, add);\n * console.log(combined1(1, 2)); // '18'\n *\n * // Pass functions as arrays\n * const combined2 = flowRight([toString, double], [square, add]);\n * console.log(combined2(1, 2)); // '18'\n */\nexport function flowRight(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {Array<((...args: any[]) => any) | Array<(...args: any[]) => any>>} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flowRight(double, [square, add]);\n * console.log(combined(1, 2)); // 18\n */\nexport function flowRight(...funcs: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any {\n  const flattenFuncs = flatten(funcs, 1);\n  if (flattenFuncs.some(func => typeof func !== 'function')) {\n    throw new TypeError('Expected a function');\n  }\n  return flowRightToolkit(...flattenFuncs);\n}\n"
  },
  {
    "path": "src/compat/function/identity.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { identity as identityLodash } from 'lodash';\nimport { identity } from './identity';\n\ndescribe('identity', () => {\n  it('should return the input value unchanged for a number', () => {\n    expect(identity(5)).toBe(5);\n  });\n\n  it('should return the input value unchanged for a string', () => {\n    expect(identity('hello')).toBe('hello');\n  });\n\n  it('should return the input value unchanged for an object', () => {\n    const obj = { key: 'value' };\n    expect(identity(obj)).toBe(obj);\n  });\n\n  it('should return the input value unchanged for an array', () => {\n    const arr = [1, 2, 3];\n    expect(identity(arr)).toBe(arr);\n  });\n\n  it('should return the input value unchanged for a boolean', () => {\n    expect(identity(true)).toBe(true);\n    expect(identity(false)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(identity).toEqualTypeOf<typeof identityLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/identity.ts",
    "content": "/**\n * Returns the input value unchanged.\n *\n * @template T - The type of the input value.\n * @param {T} x - The value to be returned.\n * @returns {T} The input value.\n *\n * @example\n * // Returns 5\n * identity(5);\n *\n * @example\n * // Returns 'hello'\n * identity('hello');\n *\n * @example\n * // Returns { key: 'value' }\n * identity({ key: 'value' });\n */\nexport function identity<T>(value: T): T;\n\n/**\n * Returns the input value unchanged.\n *\n * @template T - The type of the input value.\n * @param {T} x - The value to be returned.\n * @returns {T} The input value.\n *\n * @example\n * // Returns 5\n * identity(5);\n *\n * @example\n * // Returns 'hello'\n * identity('hello');\n *\n * @example\n * // Returns { key: 'value' }\n * identity({ key: 'value' });\n */\nexport function identity(): undefined;\n\nexport function identity(x?: any): any {\n  return x;\n}\n"
  },
  {
    "path": "src/compat/function/memoize.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { memoize as memoizeLodash } from 'lodash';\nimport { memoize } from './memoize';\nimport { identity, isFunction, noop, stubTrue } from '../index';\n\ndescribe('memoize', () => {\n  class CustomCache {\n    __data__: Array<{ key: any; value: any }>;\n\n    constructor() {\n      this.__data__ = [];\n    }\n\n    clear() {\n      this.__data__ = [];\n      return this;\n    }\n    get(key: any) {\n      const entry = lodashStable.find(this.__data__, ['key', key]);\n      return entry && entry.value;\n    }\n\n    has(key: any) {\n      return lodashStable.some(this.__data__, ['key', key]);\n    }\n\n    set(key: any, value: any) {\n      this.__data__.push({ key, value });\n      return this;\n    }\n\n    delete(key: any): boolean {\n      const index = this.__data__.findIndex(entry => entry.key === key);\n      if (index >= 0) {\n        this.__data__.splice(index, 1);\n        return true;\n      }\n      return false;\n    }\n  }\n\n  class ImmutableCache extends CustomCache {\n    constructor() {\n      super();\n      this.__data__ = [];\n    }\n\n    override clear() {\n      return new ImmutableCache() as this;\n    }\n\n    override set(key: any, value: any) {\n      const result = new ImmutableCache();\n      result.__data__ = [...this.__data__, { key, value }];\n      return result as this;\n    }\n  }\n\n  it('should memoize results based on the first argument given', () => {\n    const memoized = memoize((a, b, c) => a + b + c);\n\n    expect(memoized(1, 2, 3)).toBe(6);\n    expect(memoized(1, 3, 5)).toBe(6);\n  });\n\n  it('should support a `resolver`', () => {\n    const fn = function (a: number, b: number, c: number) {\n      return a + b + c;\n    };\n    const memoized = memoize(fn, fn);\n\n    expect(memoized(1, 2, 3)).toBe(6);\n    expect(memoized(1, 3, 5)).toBe(9);\n  });\n\n  it('should use `this` binding of function for `resolver`', () => {\n    const fn = function (this: { b: number; c: number }, a: number) {\n      return a + this.b + this.c;\n    };\n    const memoized = memoize(fn, fn);\n\n    const object = { memoized: memoized, b: 2, c: 3 };\n    expect(object.memoized(1)).toBe(6);\n\n    object.b = 3;\n    object.c = 5;\n    expect(object.memoized(1)).toBe(9);\n  });\n\n  it('should throw a TypeError if `resolve` is truthy and not a function', () => {\n    expect(() => {\n      // @ts-expect-error - Intentionally passing incorrect type to test runtime error\n      memoize(noop, true);\n    }).toThrowError(TypeError);\n  });\n\n  it('should not error if `resolver` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = lodashStable.map(values, stubTrue);\n\n    const actual = lodashStable.map(values, (resolver, index) => {\n      try {\n        // @ts-expect-error - Intentionally bypassing type check for testing purposes\n        return isFunction(index ? memoize(noop, resolver) : memoize(noop));\n      } catch (e) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should check cache for own properties', () => {\n    const props = [\n      'constructor',\n      'hasOwnProperty',\n      'isPrototypeOf',\n      'propertyIsEnumerable',\n      'toLocaleString',\n      'toString',\n      'valueOf',\n    ];\n\n    const memoized = memoize(identity);\n\n    const actual = lodashStable.map(props, value => memoized(value));\n\n    expect(actual).toEqual(props);\n  });\n\n  it('should cache the `__proto__` key', () => {\n    const array: unknown[] = [];\n    const key = '__proto__';\n\n    lodashStable.times(2, index => {\n      let count = 0;\n      const resolver = index ? identity : undefined;\n\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const memoized = memoize(function (_): unknown[] {\n        count++;\n        return array;\n      }, resolver);\n\n      const cache = memoized.cache;\n\n      memoized(key);\n      memoized(key);\n\n      expect(count).toBe(1);\n      expect(cache.get(key)).toBe(array);\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(cache.__data__ instanceof Array).toBe(false);\n      expect(cache.delete(key)).toBe(true);\n    });\n  });\n\n  it('should allow `_.memoize.Cache` to be customized', () => {\n    const oldCache = memoize.Cache;\n    memoize.Cache = CustomCache;\n\n    const memoized = memoize(object => object.id);\n\n    const cache = memoized.cache;\n    const key1 = { id: 'a' };\n    const key2 = { id: 'b' };\n\n    expect(memoized(key1)).toBe('a');\n    expect(cache.has(key1)).toBe(true);\n\n    expect(memoized(key2)).toBe('b');\n    expect(cache.has(key2)).toBe(true);\n\n    memoize.Cache = oldCache;\n  });\n\n  it('should works with an immutable `_.memoize.Cache`', () => {\n    const oldCache = memoize.Cache;\n    memoize.Cache = ImmutableCache;\n\n    const memoized = memoize(object => object.id);\n\n    const key1 = { id: 'a' };\n    const key2 = { id: 'b' };\n\n    memoized(key1);\n    memoized(key2);\n\n    const cache = memoized.cache;\n    expect(cache.has(key1)).toBe(true);\n    expect(cache.has(key2)).toBe(true);\n\n    memoize.Cache = oldCache;\n  });\n\n  it('should use Map as the default cache when memoize.Cache is not specified', () => {\n    const oldCache = memoize.Cache;\n    // @ts-expect-error - Intentionally setting to null to test default behavior\n    memoize.Cache = null;\n\n    const memoized = memoize(identity);\n\n    expect(memoized.cache instanceof Map).toBe(true);\n\n    const key = 'test-key';\n    memoized(key);\n    expect(memoized.cache.has(key)).toBe(true);\n    expect(memoized.cache.get(key)).toBe(key);\n\n    memoize.Cache = oldCache;\n  });\n\n  it('should handle cache.set() not returning a value', () => {\n    class NonReturningCache {\n      data: Record<string, any> = {};\n\n      get(key: any) {\n        return this.data[key];\n      }\n\n      has(key: any) {\n        return key in this.data;\n      }\n\n      set(key: any, value: any) {\n        this.data[key] = value;\n        // Intentionally not returning anything\n      }\n    }\n\n    const oldCache = memoize.Cache;\n    memoize.Cache = NonReturningCache as any;\n\n    const memoized = memoize(identity);\n    const originalCache = memoized.cache;\n\n    memoized('a');\n    expect(memoized.cache).toBe(originalCache);\n    expect(memoized.cache.has('a')).toBe(true);\n    expect(memoized.cache.get('a')).toBe('a');\n\n    memoize.Cache = oldCache;\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(memoize).toEqualTypeOf<typeof memoizeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/memoize.ts",
    "content": "interface MapCache {\n  /**\n   * Removes the value associated with the specified key from the cache.\n   *\n   * @param key - The key of the value to remove\n   * @returns `true` if an element was removed, `false` if the key wasn't found\n   *\n   * @example\n   * ```typescript\n   * cache.set('user', { id: 123, name: 'John' });\n   * cache.delete('user'); // Returns true\n   * cache.delete('unknown'); // Returns false\n   * ```\n   */\n  delete(key: any): boolean;\n\n  /**\n   * Retrieves the value associated with the specified key from the cache.\n   *\n   * @param key - The key of the value to retrieve\n   * @returns The cached value or undefined if not found\n   *\n   * @example\n   * ```typescript\n   * cache.set('user', { id: 123, name: 'John' });\n   * cache.get('user'); // Returns { id: 123, name: 'John' }\n   * cache.get('unknown'); // Returns undefined\n   * ```\n   */\n  get(key: any): any;\n\n  /**\n   * Checks if the cache contains a value for the specified key.\n   *\n   * @param key - The key to check for existence\n   * @returns `true` if the key exists in the cache, otherwise `false`\n   *\n   * @example\n   * ```typescript\n   * cache.set('user', { id: 123, name: 'John' });\n   * cache.has('user'); // Returns true\n   * cache.has('unknown'); // Returns false\n   * ```\n   */\n  has(key: any): boolean;\n\n  /**\n   * Stores a value in the cache with the specified key.\n   * If the key already exists, its value is updated.\n   *\n   * @param key - The key to associate with the value\n   * @param value - The value to store in the cache\n   * @returns The cache instance for method chaining\n   *\n   * @example\n   * ```typescript\n   * cache.set('user', { id: 123, name: 'John' })\n   *      .set('settings', { theme: 'dark' });\n   * ```\n   */\n  set(key: any, value: any): this;\n\n  /**\n   * Removes all key-value pairs from the cache.\n   * This method is optional as some cache implementations may be immutable.\n   *\n   * @example\n   * ```typescript\n   * cache.set('user', { id: 123, name: 'John' });\n   * cache.set('settings', { theme: 'dark' });\n   * cache.clear(); // Cache is now empty\n   * ```\n   */\n  clear?(): void;\n}\n\n/**\n * Constructor interface for creating a new MapCache instance.\n * This defines the shape of a constructor that can create cache objects\n * conforming to the MapCache interface.\n *\n * @example\n * ```typescript\n * class CustomCache implements MapCache {\n *   // Cache implementation\n * }\n *\n * const CacheConstructor: MapCacheConstructor = CustomCache;\n * const cache = new CacheConstructor();\n * ```\n */\ninterface MapCacheConstructor {\n  new (): MapCache;\n}\n\n/**\n * Represents a function that has been memoized.\n * A memoized function maintains the same signature as the original function\n * but adds a cache property to store previously computed results.\n *\n * @template T - The type of the original function being memoized\n */\n\ninterface MemoizedFunction {\n  /**\n   * The cache storing previously computed results\n   */\n  cache: MapCache;\n}\n\n/**\n * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for\n * storing the result based on the arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with\n * the this binding of the memoized function.\n *\n * @template T - The type of the original function being memoized\n * @param {T} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @return {MemoizedFunction<T>} Returns the new memoizing function.\n */\nexport function memoize<T extends (...args: any) => any>(\n  func: T,\n  resolver?: (...args: Parameters<T>) => any\n): T & MemoizedFunction {\n  if (typeof func !== 'function' || (resolver != null && typeof resolver !== 'function')) {\n    throw new TypeError('Expected a function');\n  }\n\n  const memoized = function (this: unknown, ...args: Parameters<T>) {\n    const key = resolver ? resolver.apply(this, args) : args[0];\n    const cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n\n    const result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n\n  const CacheConstructor = memoize.Cache || Map;\n  memoized.cache = new CacheConstructor();\n\n  return memoized as T & MemoizedFunction;\n}\n\nmemoize.Cache = Map as unknown as MapCacheConstructor;\n"
  },
  {
    "path": "src/compat/function/negate.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { negate as negateLodash } from 'lodash';\nimport { negate } from './negate';\nimport { stubTrue } from '../util/stubTrue';\nimport { times } from '../util/times';\n\ndescribe('negate', () => {\n  function isEven(n: number) {\n    return n % 2 === 0;\n  }\n  it('should create a function that negates the result of `func`', () => {\n    const negateFn = negate(isEven);\n\n    expect(negateFn(1)).toBe(true);\n    expect(negateFn(2)).toBe(false);\n  });\n\n  it('should create a function that accepts multiple arguments', () => {\n    let argCount: any;\n    const count = 5;\n    // @ts-expect-error - any\n    const negateFn = negate((...args: any[]) => {\n      argCount = args.length;\n    });\n    const expected = times(count, stubTrue);\n\n    const actual = times(count, index => {\n      switch (index) {\n        case 0:\n          negateFn();\n          break;\n        case 1:\n          negateFn(1);\n          break;\n        case 2:\n          negateFn(1, 2);\n          break;\n        case 3:\n          negateFn(1, 2, 3);\n          break;\n        case 4:\n          negateFn(1, 2, 3, 4);\n      }\n      return argCount === index;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should throw an error if `func` is not a function', () => {\n    expect(() => negate(1 as any)).toThrow(TypeError);\n  });\n\n  it('should invoke `func` with the correct `this` binding', () => {\n    const object = { isEven };\n    const negateFn = negate(function (this: any, n: number) {\n      return this.isEven(n);\n    });\n\n    expect(negateFn.call(object, 1)).toBe(true);\n    expect(negateFn.call(object, 2)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(negate).toEqualTypeOf<typeof negateLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/negate.ts",
    "content": "/**\n * Creates a function that negates the result of the predicate function.\n *\n * @template T - The type of the arguments array.\n * @param {(...args: T) => boolean} predicate - The predicate to negate.\n * @returns {(...args: T) => boolean} The new negated function.\n *\n * @example\n * function isEven(n) {\n *   return n % 2 == 0;\n * }\n *\n * filter([1, 2, 3, 4, 5, 6], negate(isEven));\n * // => [1, 3, 5]\n */\nexport function negate<T extends any[]>(predicate: (...args: T) => boolean): (...args: T) => boolean;\n\n/**\n * Creates a function that negates the result of the predicate function.\n *\n * @template F - The type of the function to negate.\n * @param {F} func - The function to negate.\n * @returns {F} The new negated function, which negates the boolean result of `func`.\n *\n * @example\n * const array = [1, 2, 3, 4, 5, 6];\n * const isEven = (n: number) => n % 2 === 0;\n * const result = array.filter(negate(isEven));\n * // result will be [1, 3, 5]\n */\nexport function negate<F extends (...args: any[]) => boolean>(func: F): F {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n  return function (this: any, ...args: any[]) {\n    return !func.apply(this, args);\n  } as F;\n}\n"
  },
  {
    "path": "src/compat/function/noop.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { noop as noopLodash } from 'lodash';\nimport { noop } from './noop';\n\ndescribe('noop', () => {\n  it('should be a function', () => {\n    expect(typeof noop).toBe('function');\n  });\n\n  it('should return undefined', () => {\n    expect(noop()).toBeUndefined();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(noop).toEqualTypeOf<typeof noopLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/noop.ts",
    "content": "/**\n * A no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * noop(); // Does nothing\n *\n * @returns {void} This function does not return anything.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function noop(..._: any[]): void {}\n"
  },
  {
    "path": "src/compat/function/nthArg.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { nthArg as nthArgLodash } from 'lodash';\nimport { nthArg } from './nthArg';\nimport { noop } from '../../function';\nimport { range } from '../../math';\nimport { falsey } from '../_internal/falsey';\nimport { stubA } from '../_internal/stubA';\nimport { stubB } from '../_internal/stubB';\n\ndescribe('nthArg', () => {\n  const args = ['a', 'b', 'c', 'd'];\n\n  it('should create a function that returns its nth argument', () => {\n    const actual = args.map((value, index) => {\n      const func = nthArg(index);\n      return func(...args);\n    });\n\n    expect(actual).toEqual(args);\n  });\n\n  it('should work with a negative `n`', () => {\n    const actual = range(1, args.length + 1).map(n => {\n      const func = nthArg(-n);\n      return func(...args);\n    });\n\n    expect(actual).toEqual(['d', 'c', 'b', 'a']);\n  });\n\n  it('should coerce `n` to an integer', () => {\n    let values = falsey;\n    let expected = values.map(stubA);\n\n    let actual = values.map(n => {\n      // @ts-expect-error invalid types\n      const func = n ? nthArg(n) : nthArg();\n      return func(...args);\n    });\n\n    expect(actual).toEqual(expected);\n\n    values = ['1', 1.6];\n    expected = values.map(stubB);\n\n    actual = values.map(n => {\n      // @ts-expect-error invalid types\n      const func = nthArg(n);\n      return func(...args);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `undefined` for empty arrays', () => {\n    const func = nthArg(1);\n    expect(func()).toBe(undefined);\n  });\n\n  it('should return `undefined` for non-indexes', () => {\n    const values = [Infinity, args.length];\n    const expected = values.map(noop);\n\n    const actual = values.map(n => {\n      const func = nthArg(n);\n      return func(...args);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(nthArg).toEqualTypeOf<typeof nthArgLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/nthArg.ts",
    "content": "import { toInteger } from '../util/toInteger.ts';\n\n/**\n * Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned.\n *\n * @param {number} [n=0] - The index of the argument to return.\n * @returns {(...args: any[]) => any} Returns the new function.\n *\n * @example\n * var func = nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\nexport function nthArg(n?: number): (...args: any[]) => any;\n\n/**\n * Creates a function that retrieves the argument at the specified index `n`.\n *\n * If `n` is negative, the nth argument from the end is returned.\n *\n * @param {number} [n=0] - The index of the argument to retrieve.\n *   If negative, counts from the end of the arguments list.\n * @returns {(args: any[]) => unknown} A new function that returns the argument at the specified index.\n *\n * @example\n * const getSecondArg = nthArg(1);\n * const result = getSecondArg('a', 'b', 'c');\n * console.log(result); // => 'b'\n *\n * @example\n * const getLastArg = nthArg(-1);\n * const result = getLastArg('a', 'b', 'c');\n * console.log(result); // => 'c'\n */\nexport function nthArg(n = 0): (...args: any[]) => unknown {\n  return function (...args: any[]) {\n    return args.at(toInteger(n));\n  };\n}\n"
  },
  {
    "path": "src/compat/function/once.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { once as onceLodash } from 'lodash';\nimport { once } from './once';\n\ndescribe('once', () => {\n  it('should invoke `func` once', () => {\n    let count = 0;\n    const resultFunc = once(() => ++count);\n\n    expect(resultFunc()).toBe(1);\n    expect(count).toBe(1);\n  });\n\n  it('should ignore recursive calls', () => {\n    let count = 0;\n\n    const resultFunc = once(() => {\n      resultFunc();\n      return ++count;\n    });\n\n    expect(resultFunc()).toBe(1);\n    expect(count).toBe(1);\n  });\n\n  it('should not throw more than once', () => {\n    const resultFunc = once(() => {\n      throw new Error();\n    });\n\n    expect(resultFunc).toThrow();\n    expect(resultFunc).not.toThrow();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(once).toEqualTypeOf<typeof onceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/once.ts",
    "content": "import { once as onceToolkit } from '../../function/once.ts';\n\nexport function once<T extends (...args: any) => any>(func: T): T {\n  return onceToolkit(func);\n}\n"
  },
  {
    "path": "src/compat/function/overArgs.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { overArgs as overArgsLodash } from 'lodash';\nimport { overArgs } from './overArgs';\nimport { slice } from '../_internal/slice';\n\ndescribe('overArgs', () => {\n  function fn() {\n    // eslint-disable-next-line prefer-rest-params\n    return slice.call(arguments);\n  }\n\n  function doubled(n: number) {\n    return n * 2;\n  }\n\n  function square(n: number) {\n    return n * n;\n  }\n\n  it('should transform each argument', () => {\n    const over = overArgs(fn, [doubled, square]);\n    expect(over(5, 10)).toEqual([10, 100]);\n  });\n\n  it('should use identity when a predicate is nullish', () => {\n    const over = overArgs(fn, [undefined, null] as any[]);\n    expect(over('a', 'b')).toEqual(['a', 'b']);\n  });\n\n  it('should work with property shorthands', () => {\n    const over = overArgs(fn, ['b', 'a'] as any[]);\n    expect(over({ b: 2 }, { a: 1 })).toEqual([2, 1]);\n  });\n\n  it('should work with matches shorthands', () => {\n    const over = overArgs(fn, [{ b: 1 }, { a: 1 }] as any[]);\n    expect(over({ b: 2 }, { a: 1 })).toEqual([false, true]);\n  });\n\n  it('should work with matchesProperty shorthands', () => {\n    const over = overArgs(fn, [\n      ['b', 1],\n      ['a', 1],\n    ] as any[]);\n    expect(over({ b: 2 }, { a: 1 })).toEqual([false, true]);\n  });\n\n  it('should differentiate between property and matchesProperty shorthands', () => {\n    let over = overArgs(fn, ['a', 1] as any[]);\n    expect(over({ a: 1 }, { 1: 2 })).toEqual([1, 2]);\n\n    over = overArgs(fn, [['a', 1]] as any[]);\n    expect(over({ a: 1 })).toEqual([true]);\n  });\n\n  it('should flatten transforms', () => {\n    const over = overArgs(fn, [doubled, square, String]);\n    expect(over(5, 10, 15)).toEqual([10, 100, '15']);\n  });\n\n  it('should not transform any argument greater than the number of transforms', () => {\n    const over = overArgs(fn, [doubled, square]);\n    expect(over(5, 10, 18)).toEqual([10, 100, 18]);\n  });\n\n  it('should not transform any arguments if no transforms are given', () => {\n    const over = overArgs(fn, []);\n    expect(over(5, 10, 18)).toEqual([5, 10, 18]);\n  });\n\n  it('should not pass undefined if there are more transforms than arguments', () => {\n    const over = overArgs(fn, [doubled]);\n    expect(over(5)).toEqual([10]);\n  });\n\n  it('should provide the correct argument to each transform', () => {\n    const argsList: any[] = [];\n    const transform = function (this: any) {\n      // eslint-disable-next-line prefer-rest-params\n      argsList.push(slice.call(arguments));\n    };\n    const over = overArgs(fn, [transform, transform, transform]);\n\n    over('a', 'b');\n    expect(argsList).toEqual([['a'], ['b']]);\n  });\n\n  it('should use this binding of function for transforms', () => {\n    const over = overArgs(\n      function (this: any, x: any) {\n        return this[x];\n      },\n      [\n        function (this: any, x: any) {\n          return this === x;\n        },\n      ]\n    );\n\n    const object = { over: over, true: 1 };\n    expect(object.over(object)).toBe(1);\n  });\n\n  it('should transform each argument with the corresponding transform function', () => {\n    const func = overArgs((x, y) => [x, y], [doubled, square]);\n\n    expect(func(5, 3)).toEqual([10, 9]);\n    expect(func(10, 5)).toEqual([20, 25]);\n  });\n\n  it('should maintain `this` binding', () => {\n    const object = {\n      value: 10,\n    };\n\n    const func = overArgs(\n      function (this: any, x: number) {\n        return this.value + x;\n      },\n      [doubled]\n    );\n\n    expect(func.call(object, 5)).toBe(object.value + doubled(5));\n  });\n\n  it('should transform only the first n arguments where n is the number of transforms', () => {\n    const func = overArgs((a, b, c) => [a, b, c], [doubled, square]);\n\n    expect(func(5, 3, 2)).toEqual([10, 9, 2]);\n  });\n\n  it('should use identity function for nonexistent transforms', () => {\n    const func = overArgs((a, b) => [a, b], [doubled]);\n\n    expect(func(5, 3)).toEqual([10, 3]);\n  });\n\n  it('should use identity function if transforms is empty', () => {\n    const func = overArgs((a, b) => [a, b], []);\n\n    expect(func(5, 3)).toEqual([5, 3]);\n  });\n\n  it('should treat nullish transforms as identity function', () => {\n    const transforms = [doubled, null, undefined] as any;\n\n    const func = overArgs((a, b, c, d) => [a, b, c, d], transforms);\n\n    expect(func(1, 2, 3, 4)).toEqual([2, 2, 3, 4]);\n  });\n\n  it('should support property shorthand', () => {\n    const user = { name: 'John', age: 30 };\n    const func = overArgs((name, age) => `${name} is ${age} years old`, ['name', 'age'] as any[]);\n\n    expect(func(user, user)).toBe('John is 30 years old');\n  });\n\n  it('should throw TypeError if func is not a function', () => {\n    expect(() => {\n      // @ts-expect-error: Testing runtime behavior with incorrect types\n      overArgs(null, [doubled]);\n    }).toThrow(TypeError);\n  });\n\n  it('should handle transforms that are not an array', () => {\n    const func = overArgs((a, b) => [a, b], doubled as any);\n\n    expect(func(5, 3)).toEqual([10, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(overArgs).toEqualTypeOf<typeof overArgsLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/overArgs.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a function that invokes `func` with its arguments transformed by corresponding transform functions.\n *\n * Transform functions can be:\n * - Functions that accept and return a value\n * - Property names (strings) to get a property value from each argument\n * - Objects to check if arguments match the object properties\n * - Arrays of [property, value] to check if argument properties match values\n *\n * If a transform is nullish, the identity function is used instead.\n * Only transforms arguments up to the number of transform functions provided.\n *\n * @param {(...args: any[]) => any} func - The function to wrap\n * @param {Array<Many<(...args: any[]) => any>>} transforms - The functions to transform arguments. Each transform can be:\n *   - A function that accepts and returns a value\n *   - A string to get a property value (e.g. 'name' gets the name property)\n *   - An object to check if arguments match its properties\n *   - An array of [property, value] to check property matches\n * @returns {(...args: any[]) => any} A new function that transforms arguments before passing them to func\n * @throws {TypeError} If func is not a function.\n * @example\n * ```ts\n * function doubled(n: number) {\n *   return n * 2;\n * }\n *\n * function square(n: number) {\n *   return n * n;\n * }\n *\n * const func = overArgs((x, y) => [x, y], [doubled, square]);\n *\n * func(5, 3);\n * // => [10, 9]\n *\n * // With property shorthand\n * const user = { name: 'John', age: 30 };\n * const getUserInfo = overArgs(\n *   (name, age) => `${name} is ${age} years old`,\n *   ['name', 'age']\n * );\n * getUserInfo(user, user);\n * // => \"John is 30 years old\"\n * ```\n */\nexport function overArgs(\n  func: (...args: any[]) => any,\n  ..._transforms: Array<Many<(...args: any[]) => any>>\n): (...args: any[]) => any {\n  if (typeof func !== 'function') {\n    throw new TypeError('Expected a function');\n  }\n\n  const transforms = _transforms.flat();\n\n  return function (this: any, ...args: any[]) {\n    const length = Math.min(args.length, transforms.length);\n    const transformedArgs = [...args];\n\n    for (let i = 0; i < length; i++) {\n      const transform = iteratee(transforms[i] ?? identity);\n      transformedArgs[i] = transform.call(this, args[i]);\n    }\n\n    return func.apply(this, transformedArgs);\n  };\n}\n"
  },
  {
    "path": "src/compat/function/partial.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport _ from '..';\nimport { curry } from './curry';\nimport { partial } from './partial';\nimport { identity } from '../../function';\n\ndescribe('partial', () => {\n  const { placeholder } = partial;\n\n  it('should partially apply arguments', () => {\n    const par = partial(identity, 'a');\n    expect(par()).toBe('a');\n  });\n\n  it('should create a function that can be invoked with additional arguments', () => {\n    const fn = function (a: string, b: string) {\n      return [a, b];\n    };\n    const par = partial(fn, 'a');\n    expect(par('b')).toEqual(['a', 'b']);\n  });\n\n  it('should work when there are no partially applied arguments and the created function is invoked without additional arguments', () => {\n    const fn = function () {\n      return arguments.length;\n    };\n    const par = partial(fn);\n    expect(par()).toBe(0);\n  });\n\n  it('should work when there are no partially applied arguments and the created function is invoked with additional arguments', () => {\n    const par = partial(identity);\n    expect(par('a')).toBe('a');\n  });\n\n  it('should support placeholders', () => {\n    const fn = function () {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    const par = partial(fn, placeholder, 'b', placeholder) as any;\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c']);\n    expect(par('a')).toEqual(['a', 'b', undefined]);\n    expect(par()).toEqual([undefined, 'b', undefined]);\n\n    expect(par('a', 'c', 'd')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should create a function with a length of 0', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (_a: string, _b: string, _c: string) {};\n    const par = partial(fn, 'a');\n    expect(par.length).toBe(0);\n  });\n\n  it('should ensure `new par` is an instance of `func`', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const object = {};\n    const par = partial(Foo);\n\n    // @ts-expect-error - par is a constructor\n    expect(new par() instanceof Foo).toBe(true);\n    // @ts-expect-error - par is a constructor\n    expect(new par(true)).toBe(object);\n  });\n\n  it('should clone metadata for created functions', () => {\n    function greet(greeting: string, name: string) {\n      return `${greeting} ${name}`;\n    }\n\n    const par1 = partial(greet, 'hi');\n    const par2 = partial(par1, 'barney');\n    const par3 = partial(par1, 'pebbles');\n\n    expect(par1('fred')).toBe('hi fred');\n    expect(par2()).toBe('hi barney');\n    expect(par3()).toBe('hi pebbles');\n  });\n\n  it('should work with curried functions', () => {\n    const fn = function (a: any, b: any, c: any) {\n      return a + b + c;\n    };\n    const curried = curry(partial(fn, 1), 2);\n\n    expect(curried(2, 3)).toBe(6);\n    expect(curried(2)(3)).toBe(6);\n  });\n\n  it('should work with placeholders and curried functions', () => {\n    const fn = function () {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    const curried = curry(fn);\n    const par = partial(curried, placeholder, 'b', placeholder, 'd');\n\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should work with default values', () => {\n    const fn = function (a: any, b: any, c: any) {\n      return a + b + c;\n    };\n    const par = partial(fn, _, 'b', _);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(par('a', 'c')).toBe('abc');\n  });\n});\n"
  },
  {
    "path": "src/compat/function/partial.ts",
    "content": "import { partialImpl } from '../../function/partial.ts';\nimport type { Toolkit } from '../toolkit.ts';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ntype __ = Placeholder | Toolkit;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting} ${name}`;\n * const sayHello = partial(greet, _, 'world');\n * console.log(sayHello('Hello')); // => 'Hello world'\n */\nexport function partial<T1, T2, R>(func: (t1: T1, t2: T2) => R, plc1: __, arg2: T2): (t1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const calculate = (x: number, y: number, z: number) => x + y + z;\n * const addToY = partial(calculate, _, 2);\n * console.log(addToY(1, 3)); // => 6\n */\nexport function partial<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, plc1: __, arg2: T2): (t1: T1, t3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const calculate = (x: number, y: number, z: number) => x + y + z;\n * const addZ = partial(calculate, _, _, 3);\n * console.log(addZ(1, 2)); // => 6\n */\nexport function partial<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  plc1: __,\n  plc2: __,\n  arg3: T3\n): (t1: T1, t2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const calculate = (x: number, y: number, z: number) => x + y + z;\n * const withXandZ = partial(calculate, 1, _, 3);\n * console.log(withXandZ(2)); // => 6\n */\nexport function partial<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3\n): (t2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const calculate = (x: number, y: number, z: number) => x + y + z;\n * const withYandZ = partial(calculate, _, 2, 3);\n * console.log(withYandZ(1)); // => 6\n */\nexport function partial<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  plc1: __,\n  arg2: T2,\n  arg3: T3\n): (t1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withB = partial(format, _, 'b');\n * console.log(withB('a', 'c', 'd')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  arg2: T2\n): (t1: T1, t3: T3, t4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withC = partial(format, _, _, 'c');\n * console.log(withC('a', 'b', 'd')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  plc2: __,\n  arg3: T3\n): (t1: T1, t2: T2, t4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withAandC = partial(format, 'a', _, 'c');\n * console.log(withAandC('b', 'd')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3\n): (t2: T2, t4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withBandC = partial(format, _, 'b', 'c');\n * console.log(withBandC('a', 'd')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  arg2: T2,\n  arg3: T3\n): (t1: T1, t4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withD = partial(format, _, _, _, 'd');\n * console.log(withD('a', 'b', 'c')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  plc2: __,\n  plc3: __,\n  arg4: T4\n): (t1: T1, t2: T2, t3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withAandD = partial(format, 'a', _, _, 'd');\n * console.log(withAandD('b', 'c')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  plc3: __,\n  arg4: T4\n): (t2: T2, t3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withBandD = partial(format, _, 'b', _, 'd');\n * console.log(withBandD('a', 'c')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  arg2: T2,\n  plc3: __,\n  arg4: T4\n): (t1: T1, t3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withABandD = partial(format, 'a', 'b', _, 'd');\n * console.log(withABandD('c')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  plc3: __,\n  arg4: T4\n): (t3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withCandD = partial(format, _, _, 'c', 'd');\n * console.log(withCandD('a', 'b')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  plc2: __,\n  arg3: T3,\n  arg4: T4\n): (t1: T1, t2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withACandD = partial(format, 'a', _, 'c', 'd');\n * console.log(withACandD('b')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3,\n  arg4: T4\n): (t2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string) => `${a}-${b}-${c}-${d}`;\n * const withBCandD = partial(format, _, 'b', 'c', 'd');\n * console.log(withBCandD('a')); // => 'a-b-c-d'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  plc1: __,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): (t1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const sum = (...numbers: number[]) => numbers.reduce((a, b) => a + b, 0);\n * const partialSum = partial(sum);\n * console.log(partialSum(1, 2, 3)); // => 6\n */\nexport function partial<TS extends any[], R>(func: (...ts: TS) => R): (...ts: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const log = (prefix: string, ...messages: string[]) => console.log(prefix, ...messages);\n * const debugLog = partial(log, '[DEBUG]');\n * debugLog('message 1', 'message 2'); // => '[DEBUG] message 1 message 2'\n */\nexport function partial<TS extends any[], T1, R>(func: (t1: T1, ...ts: TS) => R, arg1: T1): (...ts: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (prefix: string, separator: string, ...messages: string[]) => `${prefix}${messages.join(separator)}`;\n * const logWithPrefix = partial(format, '[LOG]', ' - ');\n * console.log(logWithPrefix('msg1', 'msg2')); // => '[LOG]msg1 - msg2'\n */\nexport function partial<TS extends any[], T1, T2, R>(\n  func: (t1: T1, t2: T2, ...ts: TS) => R,\n  t1: T1,\n  t2: T2\n): (...ts: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (type: string, level: string, message: string, ...tags: string[]) =>\n *   `[${type}][${level}] ${message} ${tags.join(',')}`;\n * const errorLog = partial(format, 'ERROR', 'HIGH', 'Something went wrong');\n * console.log(errorLog('critical', 'urgent')); // => '[ERROR][HIGH] Something went wrong critical,urgent'\n */\nexport function partial<TS extends any[], T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3, ...ts: TS) => R,\n  t1: T1,\n  t2: T2,\n  t3: T3\n): (...ts: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * @example\n * const format = (a: string, b: string, c: string, d: string, ...rest: string[]) =>\n *   `${a}-${b}-${c}-${d}:${rest.join(',')}`;\n * const prefixedFormat = partial(format, 'a', 'b', 'c', 'd');\n * console.log(prefixedFormat('e', 'f')); // => 'a-b-c-d:e,f'\n */\nexport function partial<TS extends any[], T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: TS) => R,\n  t1: T1,\n  t2: T2,\n  t3: T3,\n  t4: T4\n): (...ts: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply arguments to.\n * @param {any[]} partialArgs The arguments to be partially applied.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new partially applied function.\n *\n * @example\n * function greet(greeting, name) {\n *   return greeting + ' ' + name;\n * }\n *\n * const sayHelloTo = partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * const greetFred = partial(greet, partial.placeholder, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\nexport function partial<F extends (...args: any[]) => any>(\n  func: F,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  return partialImpl<F, Placeholder>(func, partial.placeholder, ...partialArgs);\n}\n\npartial.placeholder = Symbol('compat.partial.placeholder') as Placeholder;\n\ntype Placeholder = symbol | (((value: any) => any) & { partial: typeof partial });\n"
  },
  {
    "path": "src/compat/function/partialRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { identity, isObject, mergeWith } from '..';\nimport { curry } from './curry';\nimport { partialRight } from './partialRight';\nimport _ from '../index';\n\ndescribe('partialRight', () => {\n  const { placeholder } = partialRight;\n\n  it('should partially apply arguments', () => {\n    const par = partialRight(identity, 'a');\n    expect(par()).toBe('a');\n  });\n\n  it('should create a function that can be invoked with additional arguments', () => {\n    const fn = function (a: string, b: string) {\n      return [a, b];\n    };\n    const par = partialRight(fn, 'a');\n    expect(par('b')).toEqual(['b', 'a']);\n  });\n\n  it('should work when there are no partially applied arguments and the created function is invoked without additional arguments', () => {\n    const fn = function () {\n      return arguments.length;\n    };\n    const par = partialRight(fn);\n    expect(par()).toBe(0);\n  });\n\n  it('should work when there are no partially applied arguments and the created function is invoked with additional arguments', () => {\n    const par = partialRight(identity as <T>(x: T) => T);\n    expect(par('a')).toBe('a');\n  });\n\n  it('should support placeholders', () => {\n    const fn = function () {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    const par = partialRight(fn, placeholder, 'b', placeholder) as any;\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c']);\n    expect(par('a')).toEqual(['a', 'b', undefined]);\n    expect(par()).toEqual([undefined, 'b', undefined]);\n\n    const par2 = partialRight(fn, placeholder, 'c', placeholder) as any;\n    expect(par2('a', 'b', 'd')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should create a function with a length of 0', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (_a: string, _b: string, _c: string) {};\n    const par = partialRight(fn, 'a');\n    expect(par.length).toBe(0);\n  });\n\n  it('should ensure `new par` is an instance of `func`', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const object = {};\n    const par = partialRight(Foo);\n\n    // @ts-expect-error - par is a constructor\n    expect(new par() instanceof Foo).toBe(true);\n    // @ts-expect-error - par is a constructor\n    expect(new par(true)).toBe(object);\n  });\n\n  it('should clone metadata for created functions', () => {\n    function greet(greeting: string, name: string) {\n      return `${greeting} ${name}`;\n    }\n\n    const par1 = partialRight(greet, 'hi');\n    const par2 = partialRight(par1, 'barney');\n    const par3 = partialRight(par1, 'pebbles');\n\n    expect(par1('fred')).toBe('fred hi');\n    expect(par2()).toBe('barney hi');\n    expect(par3()).toBe('pebbles hi');\n  });\n\n  it('should work with curried functions', () => {\n    const fn = function (a: any, b: any, c: any) {\n      return a + b + c;\n    };\n    const curried = curry(partialRight(fn, 1), 2);\n\n    expect(curried(2, 3)).toBe(6);\n    expect(curried(2)(3)).toBe(6);\n  });\n\n  it('should work with placeholders and curried functions', () => {\n    const fn = function () {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    const curried = curry(fn) as any;\n    const par = partialRight(curried, placeholder, 'b', placeholder, 'd') as any;\n\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should work as a deep defaults', () => {\n    const object = { a: { b: 2 } };\n    const source = { a: { b: 3, c: 3 } };\n    const expected = { a: { b: 2, c: 3 } };\n\n    const defaultsDeep = partialRight(mergeWith, function deep(value: any, other: any) {\n      return isObject(value) ? mergeWith(value, other, deep) : value;\n    }) as any;\n\n    expect(defaultsDeep(object, source)).toEqual(expected);\n  });\n\n  it('should work with default values', () => {\n    const fn = function (a: any, b: any, c: any) {\n      return a + b + c;\n    };\n    const par = partialRight(fn, _, 'b', _) as any;\n    expect(par('a', 'c')).toBe('abc');\n  });\n});\n"
  },
  {
    "path": "src/compat/function/partialRight.ts",
    "content": "import { partialRightImpl } from '../../function/partialRight.ts';\nimport type { Toolkit } from '../toolkit.ts';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ntype __ = Placeholder | Toolkit;\n\n/**\n * Creates a function that invokes the provided function with no arguments.\n *\n * @template R The return type of the function\n * @param {() => R} func The function to partially apply\n * @returns {() => R} Returns the new partially applied function\n *\n * @example\n * const greet = () => 'Hello!';\n * const sayHello = partialRight(greet);\n * sayHello(); // => 'Hello!'\n */\nexport function partialRight<R>(func: () => R): () => R;\n\n/**\n * Creates a function that invokes the provided function with one argument.\n *\n * @template T The type of the argument\n * @template R The return type of the function\n * @param {(t1: T) => R} func The function to partially apply\n * @returns {(t1: T) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (name: string) => `Hello ${name}!`;\n * const greetPerson = partialRight(greet);\n * greetPerson('Fred'); // => 'Hello Fred!'\n */\nexport function partialRight<T, R>(func: (t1: T) => R): (t1: T) => R;\n\n/**\n * Creates a function that invokes the provided function with one argument pre-filled.\n *\n * @template T The type of the argument\n * @template R The return type of the function\n * @param {(t1: T) => R} func The function to partially apply\n * @param {T} arg1 The argument to pre-fill\n * @returns {() => R} Returns the new partially applied function\n *\n * @example\n * const greet = (name: string) => `Hello ${name}!`;\n * const greetFred = partialRight(greet, 'Fred');\n * greetFred(); // => 'Hello Fred!'\n */\nexport function partialRight<T, R>(func: (t1: T) => R, arg1: T): () => R;\n\n/**\n * Creates a function that invokes the provided function with two arguments.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2) => R} func The function to partially apply\n * @returns {(t1: T1, t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting} ${name}!`;\n * const greetWithParams = partialRight(greet);\n * greetWithParams('Hi', 'Fred'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, R>(func: (t1: T1, t2: T2) => R): (t1: T1, t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with one argument pre-filled and a placeholder.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2) => R} func The function to partially apply\n * @param {T1} arg1 The argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @returns {(t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting} ${name}!`;\n * const hiWithName = partialRight(greet, 'Hi', partialRight.placeholder);\n * hiWithName('Fred'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, R>(func: (t1: T1, t2: T2) => R, arg1: T1, plc2: __): (t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with the second argument pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2) => R} func The function to partially apply\n * @param {T2} arg2 The argument to pre-fill\n * @returns {(t1: T1) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting} ${name}!`;\n * const greetFred = partialRight(greet, 'Fred');\n * greetFred('Hi'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, R>(func: (t1: T1, t2: T2) => R, arg2: T2): (t1: T1) => R;\n\n/**\n * Creates a function that invokes the provided function with both arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @returns {() => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting} ${name}!`;\n * const sayHiToFred = partialRight(greet, 'Hi', 'Fred');\n * sayHiToFred(); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, R>(func: (t1: T1, t2: T2) => R, arg1: T1, arg2: T2): () => R;\n/**\n * Creates a function that invokes the provided function with no pre-filled arguments.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @returns {(t1: T1, t2: T2, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const greetWithArgs = partialRight(greet);\n * greetWithArgs('Hi', 'Fred', '!'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R): (t1: T1, t2: T2, t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the first argument pre-filled and placeholders for the rest.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {__} plc3 The placeholder for the third argument\n * @returns {(t2: T2, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const hiWithNameAndPunc = partialRight(greet, 'Hi', partialRight.placeholder, partialRight.placeholder);\n * hiWithNameAndPunc('Fred', '!'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arg1: T1,\n  plc2: __,\n  plc3: __\n): (t2: T2, t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the second argument pre-filled and a placeholder for the third.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @returns {(t1: T1, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const greetFredWithPunc = partialRight(greet, 'Fred', partialRight.placeholder);\n * greetFredWithPunc('Hi', '!'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arg2: T2,\n  plc3: __\n): (t1: T1, t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the first two arguments pre-filled and a placeholder for the third.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @returns {(t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const hiToFredWithPunc = partialRight(greet, 'Hi', 'Fred', partialRight.placeholder);\n * hiToFredWithPunc('!'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arg1: T1,\n  arg2: T2,\n  plc3: __\n): (t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the third argument pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T3} arg3 The third argument to pre-fill\n * @returns {(t1: T1, t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const greetWithExclamation = partialRight(greet, '!');\n * greetWithExclamation('Hi', 'Fred'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arg3: T3): (t1: T1, t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with the first and third arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {T3} arg3 The third argument to pre-fill\n * @returns {(t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const hiWithNameAndExclamation = partialRight(greet, 'Hi', partialRight.placeholder, '!');\n * hiWithNameAndExclamation('Fred'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (t1: T1, t2: T2, t3: T3) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3\n): (t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with the second and third arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @returns {(t1: T1) => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const greetFredWithExclamation = partialRight(greet, 'Fred', '!');\n * greetFredWithExclamation('Hi'); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arg2: T2, arg3: T3): (t1: T1) => R;\n\n/**\n * Creates a function that invokes the provided function with all three arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @returns {() => R} Returns the new partially applied function\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting} ${name}${punctuation}`;\n * const sayHiToFredWithExclamation = partialRight(greet, 'Hi', 'Fred', '!');\n * sayHiToFredWithExclamation(); // => 'Hi Fred!'\n */\nexport function partialRight<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arg1: T1, arg2: T2, arg3: T3): () => R;\n\n/**\n * Creates a function that invokes the provided function with no pre-filled arguments.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @returns {(t1: T1, t2: T2, t3: T3, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const formatWithArgs = partialRight(format);\n * formatWithArgs('Hi', 'Fred', 'morning', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R\n): (t1: T1, t2: T2, t3: T3, t4: T4) => R;\n/**\n * Creates a function that invokes the provided function with the first argument pre-filled and placeholders for the rest.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {__} plc3 The placeholder for the third argument\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t2: T2, t3: T3, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiWithRest = partialRight(format, 'Hi', partialRight.placeholder, partialRight.placeholder, partialRight.placeholder);\n * hiWithRest('Fred', 'morning', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  plc3: __,\n  plc4: __\n): (t2: T2, t3: T3, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the second argument pre-filled and placeholders for the rest.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t1: T1, t3: T3, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const greetFredWithRest = partialRight(format, 'Fred', partialRight.placeholder, partialRight.placeholder);\n * greetFredWithRest('Hi', 'morning', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg2: T2,\n  plc3: __,\n  plc4: __\n): (t1: T1, t3: T3, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the first two arguments pre-filled and placeholders for the rest.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t3: T3, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiToFredWithRest = partialRight(format, 'Hi', 'Fred', partialRight.placeholder, partialRight.placeholder);\n * hiToFredWithRest('morning', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  plc3: __,\n  plc4: __\n): (t3: T3, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the third argument pre-filled and a placeholder for the fourth.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T3} arg3 The third argument to pre-fill\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t1: T1, t2: T2, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const atMorningWithPunc = partialRight(format, 'morning', partialRight.placeholder);\n * atMorningWithPunc('Hi', 'Fred', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg3: T3,\n  plc4: __\n): (t1: T1, t2: T2, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the first and third arguments pre-filled and a placeholder for the fourth.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {T3} arg3 The third argument to pre-fill\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t2: T2, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiAtMorningWithNameAndPunc = partialRight(format, 'Hi', partialRight.placeholder, 'morning', partialRight.placeholder);\n * hiAtMorningWithNameAndPunc('Fred', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3,\n  plc4: __\n): (t2: T2, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the second and third arguments pre-filled and a placeholder for the fourth.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t1: T1, t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const greetFredAtMorningWithPunc = partialRight(format, 'Fred', 'morning', partialRight.placeholder);\n * greetFredAtMorningWithPunc('Hi', '!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg2: T2,\n  arg3: T3,\n  plc4: __\n): (t1: T1, t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the first three arguments pre-filled and a placeholder for the fourth.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @param {__} plc4 The placeholder for the fourth argument\n * @returns {(t4: T4) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiToFredAtMorningWithPunc = partialRight(format, 'Hi', 'Fred', 'morning', partialRight.placeholder);\n * hiToFredAtMorningWithPunc('!'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3,\n  plc4: __\n): (t4: T4) => R;\n\n/**\n * Creates a function that invokes the provided function with the fourth argument pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t1: T1, t2: T2, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const withExclamation = partialRight(format, '!');\n * withExclamation('Hi', 'Fred', 'morning'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg4: T4\n): (t1: T1, t2: T2, t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the first and fourth arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {__} plc3 The placeholder for the third argument\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t2: T2, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiWithExclamation = partialRight(format, 'Hi', partialRight.placeholder, partialRight.placeholder, '!');\n * hiWithExclamation('Fred', 'morning'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  plc3: __,\n  arg4: T4\n): (t2: T2, t3: T3) => R;\n/**\n * Creates a function that invokes the provided function with the second and fourth arguments pre-filled and a placeholder for the third.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t1: T1, t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const greetFredWithTime = partialRight(format, 'Fred', partialRight.placeholder, '!');\n * greetFredWithTime('Hi', 'morning'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg2: T2,\n  plc3: __,\n  arg4: T4\n): (t1: T1, t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the first, second and fourth arguments pre-filled and a placeholder for the third.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {__} plc3 The placeholder for the third argument\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t3: T3) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiToFredWithTime = partialRight(format, 'Hi', 'Fred', partialRight.placeholder, '!');\n * hiToFredWithTime('morning'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  plc3: __,\n  arg4: T4\n): (t3: T3) => R;\n\n/**\n * Creates a function that invokes the provided function with the third and fourth arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T3} arg3 The third argument to pre-fill\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t1: T1, t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const inMorningWithExclamation = partialRight(format, 'morning', '!');\n * inMorningWithExclamation('Hi', 'Fred'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg3: T3,\n  arg4: T4\n): (t1: T1, t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with the first, third and fourth arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {__} plc2 The placeholder for the second argument\n * @param {T3} arg3 The third argument to pre-fill\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t2: T2) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const hiInMorningWithExclamation = partialRight(format, 'Hi', partialRight.placeholder, 'morning', '!');\n * hiInMorningWithExclamation('Fred'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  plc2: __,\n  arg3: T3,\n  arg4: T4\n): (t2: T2) => R;\n\n/**\n * Creates a function that invokes the provided function with the second, third and fourth arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {(t1: T1) => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const greetFredInMorningWithExclamation = partialRight(format, 'Fred', 'morning', '!');\n * greetFredInMorningWithExclamation('Hi'); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): (t1: T1) => R;\n\n/**\n * Creates a function that invokes the provided function with all arguments pre-filled.\n *\n * @template T1 The type of the first argument\n * @template T2 The type of the second argument\n * @template T3 The type of the third argument\n * @template T4 The type of the fourth argument\n * @template R The return type of the function\n * @param {(t1: T1, t2: T2, t3: T3, t4: T4) => R} func The function to partially apply\n * @param {T1} arg1 The first argument to pre-fill\n * @param {T2} arg2 The second argument to pre-fill\n * @param {T3} arg3 The third argument to pre-fill\n * @param {T4} arg4 The fourth argument to pre-fill\n * @returns {() => R} Returns the new partially applied function\n *\n * @example\n * const format = (greeting: string, name: string, time: string, punctuation: string) =>\n *   `${greeting} ${name}, it's ${time}${punctuation}`;\n * const sayHiToFredInMorningWithExclamation = partialRight(format, 'Hi', 'Fred', 'morning', '!');\n * sayHiToFredInMorningWithExclamation(); // => 'Hi Fred, it's morning!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (t1: T1, t2: T2, t3: T3, t4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): () => R;\n\n/**\n * Creates a function that invokes the provided function with partially applied arguments appended to the arguments it receives.\n * The partialRight.placeholder value can be used as a placeholder for partially applied arguments.\n *\n * @template F The type of the function to partially apply\n * @param {F} func The function to partially apply arguments to\n * @param {...any[]} args The arguments to be partially applied\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new partially applied function\n *\n * @example\n * function greet(greeting: string, name: string) {\n *   return greeting + ' ' + name;\n * }\n *\n * const greetFred = partialRight(greet, 'Fred');\n * greetFred('Hi'); // => 'Hi Fred'\n *\n * // Using placeholders\n * const sayHelloTo = partialRight(greet, 'Hello', partialRight.placeholder);\n * sayHelloTo('Fred'); // => 'Hello Fred'\n */\nexport function partialRight(func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply arguments to.\n * @param {any[]} partialArgs The arguments to be partially applied.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new partially applied function.\n *\n * @example\n * function greet(greeting, name) {\n *   return greeting + ' ' + name;\n * }\n *\n * const greetFred = partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * const sayHelloTo = partialRight(greet, 'hello', partialRight.placeholder);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\nexport function partialRight<F extends (...args: any[]) => any>(\n  func: F,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  return partialRightImpl<F, Placeholder>(func, partialRight.placeholder, ...partialArgs);\n}\n\npartialRight.placeholder = Symbol('compat.partialRight.placeholder') as Placeholder;\n\ntype Placeholder = symbol | (((value: any) => any) & { partialRight: typeof partialRight });\n"
  },
  {
    "path": "src/compat/function/rearg.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { rearg as reargLodash } from 'lodash';\nimport { rearg } from './rearg';\n\ndescribe('rearg', () => {\n  function fn() {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should reorder arguments provided to `func`', () => {\n    const rearged = rearg(fn, [2, 0, 1]);\n    expect(rearged('b', 'c', 'a')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should work with repeated indexes', () => {\n    const rearged = rearg(fn, [1, 1, 1]);\n    expect(rearged('c', 'a', 'b')).toEqual(['a', 'a', 'a']);\n  });\n\n  it('should use `undefined` for nonexistent indexes', () => {\n    const rearged = rearg(fn, [1, 4]);\n    expect(rearged('b', 'a', 'c')).toEqual(['a', undefined, 'c']);\n  });\n\n  it('should use `undefined` for non-index values', () => {\n    const values = [{}, null, undefined, false, NaN, '', -1, 1.1];\n    for (const value of values) {\n      // @ts-expect-error - invalid args\n      const rearged = rearg(fn, value);\n      expect(rearged('a', 'b', 'c')).toEqual([undefined, 'b', 'c']);\n    }\n  });\n\n  it('should not rearrange arguments when no indexes are given', () => {\n    let rearged = rearg(fn);\n    expect(rearged('a', 'b', 'c')).toEqual(['a', 'b', 'c']);\n\n    rearged = rearg(fn, [], []);\n    expect(rearged('a', 'b', 'c')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should accept multiple index arguments', () => {\n    const rearged = rearg(fn, 2, 0, 1);\n    expect(rearged('b', 'c', 'a')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should accept multiple arrays of indexes', () => {\n    const rearged = rearg(fn, [2], [0, 1]);\n    expect(rearged('b', 'c', 'a')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should work with fewer indexes than arguments', () => {\n    const rearged = rearg(fn, [1, 0]);\n    expect(rearged('b', 'a', 'c')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should work on functions that have been rearged', () => {\n    const rearged1 = rearg(fn, 2, 1, 0),\n      rearged2 = rearg(rearged1, 1, 0, 2);\n    expect(rearged2('b', 'c', 'a')).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(rearg).toEqualTypeOf<typeof reargLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/rearg.ts",
    "content": "import { Many } from '../_internal/Many.ts';\nimport { flatten } from '../array/flatten.ts';\n\n/**\n * Creates a function that invokes `func` with arguments arranged according to the specified `indices`\n * where the argument value at the first index is provided as the first argument,\n * the argument value at the second index is provided as the second argument, and so on.\n *\n * @param {(...args: any[]) => any} func The function to rearrange arguments for.\n * @param {Array<number | number[]>} indices The arranged argument indices.\n * @returns {(...args: any[]) => any} Returns the new function.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting}, ${name}!`;\n * const rearrangedGreet = rearg(greet, 1, 0);\n * console.log(rearrangedGreet('World', 'Hello')); // Output: \"Hello, World!\"\n */\nexport function rearg(func: (...args: any[]) => any, ...indices: Array<Many<number>>): (...args: any[]) => any {\n  const flattenIndices = flatten(indices);\n\n  return function (this: any, ...args: any[]) {\n    const reorderedArgs: any[] = flattenIndices.map(i => args[i]).slice(0, args.length);\n\n    for (let i = reorderedArgs.length; i < args.length; i++) {\n      reorderedArgs.push(args[i]);\n    }\n\n    return func.apply(this, reorderedArgs);\n  };\n}\n"
  },
  {
    "path": "src/compat/function/rest.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { rest as restLodash } from 'lodash';\nimport { rest } from './rest';\n\ndescribe('rest', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should apply a rest parameter to `func`', () => {\n    const restFn = rest(fn);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, 2, [3, 4]]);\n  });\n\n  it('should work with `start`', () => {\n    const restFn = rest(fn, 1);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, [2, 3, 4]]);\n  });\n\n  it('should treat `start` as `0` for `NaN` or negative values', () => {\n    let restFn = rest(fn, -1);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, 2, [3, 4]]);\n    restFn = rest(fn, NaN);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, 2, [3, 4]]);\n    // @ts-expect-error - intentionally passing a string\n    restFn = rest(fn, 'a');\n    expect(restFn(1, 2, 3, 4)).toEqual([1, 2, [3, 4]]);\n  });\n\n  it('should coerce `start` to an integer', () => {\n    const restFn = rest(fn, 1.6);\n    expect(restFn(1, 2, 3)).toEqual([1, [2, 3]]);\n  });\n\n  it('should use an empty array when `start` is not reached', () => {\n    const restFn = rest(fn);\n    expect(restFn(1)).toEqual([1, undefined, []]);\n  });\n\n  it('should work on functions with more than three parameters', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const restFn = rest(function (_a: unknown, _b: unknown, _c: unknown, _d: unknown) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    });\n\n    expect(restFn(1, 2, 3, 4, 5)).toEqual([1, 2, 3, [4, 5]]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(rest).toEqualTypeOf<typeof restLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/rest.ts",
    "content": "import { rest as restToolkit } from '../../function/rest.ts';\n\n/**\n * Creates a function that transforms the arguments of the provided function `func`.\n * The transformed arguments are passed to `func` such that the arguments starting from a specified index\n * are grouped into an array, while the previous arguments are passed as individual elements.\n *\n * @param {(...args: any[]) => any} func - The function whose arguments are to be transformed.\n * @param {number} [start=func.length - 1] - The index from which to start grouping the remaining arguments into an array.\n *                                            Defaults to `func.length - 1`, grouping all arguments after the last parameter.\n * @returns {(...args: any[]) => any} A new function that, when called, returns the result of calling `func` with the transformed arguments.\n *\n * The transformed arguments are:\n * - The first `start` arguments as individual elements.\n * - The remaining arguments from index `start` onward grouped into an array.\n * @example\n * function fn(a, b, c) {\n *   return [a, b, c];\n * }\n *\n * // Using default start index (func.length - 1, which is 2 in this case)\n * const transformedFn = rest(fn);\n * console.log(transformedFn(1, 2, 3, 4)); // [1, 2, [3, 4]]\n *\n * // Using start index 1\n * const transformedFnWithStart = rest(fn, 1);\n * console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]\n *\n * // With fewer arguments than the start index\n * console.log(transformedFn(1)); // [1, undefined, []]\n */\nexport function rest(func: (...args: any[]) => any, start: number = func.length - 1): (...args: any[]) => any {\n  start = Number.parseInt(start as any, 10);\n\n  if (Number.isNaN(start) || start < 0) {\n    start = func.length - 1;\n  }\n\n  return restToolkit(func, start);\n}\n"
  },
  {
    "path": "src/compat/function/spread.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { spread as spreadLodash } from 'lodash';\nimport { spread } from './spread';\n\ndescribe('spread', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should spread arguments to `func`', () => {\n    const spreadFn = spread(fn);\n    const expected = [1, 2];\n\n    expect(spreadFn([1, 2])).toEqual(expected);\n    expect(spreadFn([1, 2], 3)).toEqual(expected);\n  });\n\n  it('should accept a falsey `array`', () => {\n    const falsey = [null, undefined, false, 0, NaN, ''];\n    const spreadFn = spread(() => true);\n    const expected = falsey.map(() => true);\n\n    const actual = falsey.map(array => {\n      return spreadFn(array);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with `startIndex`', () => {\n    const spreadFn = spread(fn, 1);\n    const expected = [1, 2, 3];\n\n    expect(spreadFn(1, [2, 3])).toEqual(expected);\n    expect(spreadFn(1, [2, 3], 4)).toEqual(expected);\n  });\n\n  it('should treat `start` as `0` for negative or `NaN` values', () => {\n    const values = [-1, NaN, 'a'];\n    const expected = values.map(() => [1, 2]);\n\n    const actual = values.map(value => {\n      // @ts-expect-error - spreadFn is not being called with the correct arguments\n      const spreadFn = spread(fn, value);\n      return spreadFn([1, 2]);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should coerce `startIndex` to an integer', () => {\n    const spreadFn = spread(fn, 1.6);\n    const expected = [1, 2, 3];\n\n    expect(spreadFn(1, [2, 3])).toEqual(expected);\n    expect(spreadFn(1, [2, 3], 4)).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(spread).toEqualTypeOf<typeof spreadLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/spread.ts",
    "content": "/**\n * Creates a new function that spreads elements of an array argument into individual arguments\n * for the original function. The array argument is positioned based on the `argsIndex` parameter.\n *\n * @template F - A function type with any number of parameters and any return type.\n * @param {F} func - The function to be transformed. It can be any function with any number of arguments.\n * @param {number} [argsIndex=0] - The index where the array argument is positioned among the other arguments.\n *   If `argsIndex` is negative or `NaN`, it defaults to `0`. If it's a fractional number, it is rounded to the nearest integer.\n * @returns {(...args: any[]) => ReturnType<F>} - A new function that takes multiple arguments, including an array of arguments at the specified `argsIndex`,\n *   and returns the result of calling the original function with those arguments.\n *\n * @example\n * function add(a, b) {\n *   return a + b;\n * }\n *\n * const spreadAdd = spread(add);\n * console.log(spreadAdd([1, 2])); // Output: 3\n *\n * @example\n * // Example function to spread arguments over\n * function add(a, b) {\n *   return a + b;\n * }\n *\n * // Create a new function that uses `spread` to combine arguments\n * const spreadAdd = spread(add, 1);\n *\n * // Calling `spreadAdd` with an array as the second argument\n * console.log(spreadAdd(1, [2])); // Output: 3\n *\n * @example\n * // Function with default arguments\n * function greet(name, greeting = 'Hello') {\n *   return `${greeting}, ${name}!`;\n * }\n *\n * // Create a new function that uses `spread` to position the argument array at index 0\n * const spreadGreet = spread(greet, 0);\n *\n * // Calling `spreadGreet` with an array of arguments\n * console.log(spreadGreet(['Alice'])); // Output: Hello, Alice!\n * console.log(spreadGreet(['Bob', 'Hi'])); // Output: Hi, Bob!\n */\nexport function spread<R>(func: (...args: any[]) => R, argsIndex = 0): (...args: any[]) => R {\n  argsIndex = Number.parseInt(argsIndex as any, 10);\n\n  if (Number.isNaN(argsIndex) || argsIndex < 0) {\n    argsIndex = 0;\n  }\n\n  return function (this: any, ...args: any[]) {\n    const array = args[argsIndex];\n    const params = args.slice(0, argsIndex);\n\n    if (array) {\n      params.push(...array);\n    }\n\n    return func.apply(this, params);\n  };\n}\n"
  },
  {
    "path": "src/compat/function/throttle.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it, vi } from 'vitest';\nimport type { throttle as throttleLodash } from 'lodash';\nimport { throttle } from './throttle';\nimport { identity } from '../../function/identity';\nimport { noop } from '../../function/noop';\nimport { delay } from '../../promise/delay';\n\ndescribe('throttle', () => {\n  it('should throttle a function', async () => {\n    let callCount = 0;\n    const throttled = throttle(() => {\n      callCount++;\n    }, 32);\n\n    throttled();\n    throttled();\n    throttled();\n\n    const lastCount = callCount;\n    expect(callCount).toBeGreaterThan(0);\n\n    await delay(64);\n\n    expect(callCount > lastCount).toBe(true);\n  });\n\n  it('subsequent calls should return the result of the first call', async () => {\n    const throttled = throttle(identity, 32);\n    const results = [throttled('a'), throttled('b')];\n\n    expect(results).toEqual(['a', 'a']);\n\n    await delay(64);\n\n    const results2 = [throttled('c'), throttled('d')];\n    expect(results2[0]).not.toStrictEqual('a');\n    expect(results2[0]).not.toStrictEqual(undefined);\n\n    expect(results2[0]).not.toStrictEqual('d');\n    expect(results2[0]).not.toStrictEqual(undefined);\n  });\n\n  it('should clear timeout when `func` is called', async () => {\n    let callCount = 0;\n\n    const throttled = throttle(() => {\n      callCount++;\n    }, 32);\n\n    throttled();\n    throttled();\n\n    await delay(64);\n\n    expect(callCount).toBe(2);\n  });\n\n  it('should not trigger a trailing call when invoked once', async () => {\n    let callCount = 0;\n    const throttled = throttle(() => {\n      callCount++;\n    }, 32);\n\n    throttled();\n    expect(callCount).toBe(1);\n\n    await delay(64);\n    expect(callCount).toBe(1);\n  });\n\n  [0, 1].forEach(index => {\n    it(`should trigger a call when invoked repeatedly${index ? ' and `leading` is `false`' : ''}`, async () => {\n      let callCount = 0;\n      const limit = 1000;\n      const options = index ? { leading: false } : {};\n      const throttled = throttle(\n        () => {\n          callCount++;\n        },\n        32,\n        options\n      );\n\n      const start = Number(new Date());\n      while (Date.now() - start < limit) {\n        throttled();\n      }\n      const actual = callCount > 1;\n\n      await delay(1);\n\n      expect(actual).toBe(true);\n    });\n\n    it('should trigger a second throttled call as soon as possible', async () => {\n      let callCount = 0;\n\n      const throttled = throttle(\n        () => {\n          callCount++;\n        },\n        128,\n        { leading: false }\n      );\n\n      throttled();\n\n      await delay(192);\n\n      expect(callCount).toBe(1);\n      throttled();\n\n      await delay(254 - 192);\n\n      expect(callCount).toBe(1);\n\n      await delay(384 - 254);\n\n      expect(callCount).toBe(2);\n    });\n\n    it('should apply default options', async () => {\n      let callCount = 0;\n      const throttled = throttle(\n        () => {\n          callCount++;\n        },\n        32,\n        {}\n      );\n\n      throttled();\n      throttled();\n      expect(callCount).toBe(1);\n\n      await delay(128);\n\n      expect(callCount).toBe(2);\n    });\n\n    it('should support a `leading` option', () => {\n      const withLeading = throttle(identity, 32, { leading: true });\n      expect(withLeading('a')).toBe('a');\n\n      const withoutLeading = throttle(identity, 32, { leading: false });\n      expect(withoutLeading('a')).toBe(undefined);\n    });\n\n    it('should support a `trailing` option', async () => {\n      let withCount = 0;\n      let withoutCount = 0;\n\n      const withTrailing = throttle(\n        value => {\n          withCount++;\n          return value;\n        },\n        64,\n        { trailing: true }\n      );\n\n      const withoutTrailing = throttle(\n        value => {\n          withoutCount++;\n          return value;\n        },\n        64,\n        { trailing: false }\n      );\n\n      expect(withTrailing('a')).toBe('a');\n      expect(withTrailing('b')).toBe('a');\n\n      expect(withoutTrailing('a')).toBe('a');\n      expect(withoutTrailing('b')).toBe('a');\n\n      await delay(256);\n\n      expect(withCount).toBe(2);\n      expect(withoutCount).toBe(1);\n    });\n\n    it('should not update `lastCalled`, at the end of the timeout, when `trailing` is `false`', async () => {\n      let callCount = 0;\n\n      const throttled = throttle(\n        () => {\n          callCount++;\n        },\n        64,\n        { trailing: false }\n      );\n\n      throttled();\n      throttled();\n\n      await delay(96);\n\n      throttled();\n      throttled();\n\n      await delay(192 - 96);\n\n      expect(callCount).toBeGreaterThan(1);\n    });\n  });\n\n  /** @see https://github.com/lodash/lodash/blob/4.17.15/test/test.js#L22973 */\n  const func = throttle;\n  const isDebounce = false;\n  const methodName = 'throttle';\n\n  it(`\\`_.${methodName}\\` should not error for non-object \\`options\\` values`, () => {\n    expect(() => func(noop, 32, 1 as any)).not.toThrow();\n  });\n\n  it(`\\`_.${methodName}\\` should use a default \\`wait\\` of \\`0\\``, async () => {\n    let callCount = 0;\n    const funced = func(() => {\n      callCount++;\n    });\n\n    funced();\n\n    await delay(32);\n\n    funced();\n    expect(callCount).toBe(isDebounce ? 1 : 2);\n  });\n\n  it(`\\`_.${methodName}\\` should invoke \\`func\\` with the correct \\`this\\` binding`, async () => {\n    const actual: any[] = [];\n    const object = {\n      funced: func(function (this: any) {\n        actual.push(this);\n      }, 32),\n    };\n    const expected = [object];\n\n    object.funced();\n\n    await delay(64);\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`_.${methodName}\\` supports recursive calls`, async () => {\n    const actual: any[] = [];\n    const args = ['a', 'b', 'c'].map(chr => [{}, chr]);\n    const expected = args.slice();\n    const queue: any[] = args.slice();\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const funced = func(function (this: any, _: unknown) {\n      const current = [this];\n      // eslint-disable-next-line prefer-rest-params\n      Array.prototype.push.apply(current, arguments as any);\n      actual.push(current);\n\n      const next = queue.shift();\n      if (next) {\n        funced.call(next[0], next[1]);\n      }\n    }, 32);\n\n    const next = queue.shift();\n    funced.call(next[0], next[1]);\n    expect(actual).toEqual(expected.slice(0, isDebounce ? 0 : 1));\n\n    await delay(256);\n\n    expect(actual).toEqual(expected.slice(0, actual.length));\n  });\n\n  it(`\\`_.${methodName}\\` should support cancelling delayed calls`, async () => {\n    let callCount = 0;\n\n    const funced = func(\n      () => {\n        callCount++;\n      },\n      32,\n      { leading: false }\n    );\n\n    funced();\n    funced.cancel();\n\n    await delay(64);\n\n    expect(callCount).toBe(0);\n  });\n\n  it(`\\`_.${methodName}\\` should reset \\`lastCalled\\` after cancelling`, async () => {\n    let callCount = 0;\n\n    const funced = func(() => ++callCount, 32, { leading: true });\n\n    expect(funced()).toBe(1);\n    funced.cancel();\n\n    expect(funced()).toBe(2);\n    funced();\n\n    await delay(64);\n    expect(callCount).toBe(3);\n  });\n\n  it(`\\`_.${methodName}\\` should support flushing delayed calls`, async () => {\n    let callCount = 0;\n\n    const funced = func(() => ++callCount, 32, { leading: false });\n\n    funced();\n    expect(funced.flush()).toBe(1);\n\n    await delay(64);\n\n    expect(callCount).toBe(1);\n  });\n\n  it(`\\`_.${methodName}\\` should noop \\`cancel\\` and \\`flush\\` when nothing is queued`, async () => {\n    let callCount = 0;\n    const funced = func(() => {\n      callCount++;\n    }, 32);\n\n    funced.cancel();\n    expect(funced.flush()).toBe(undefined);\n\n    await delay(64);\n    expect(callCount).toBe(0);\n  });\n\n  it('should invoke the function immediately if wait is 0', () => {\n    const fn = vi.fn();\n\n    const throttled = throttle(fn, 0, { leading: true, trailing: true });\n\n    throttled();\n    expect(fn).toHaveBeenCalledTimes(1);\n\n    throttled();\n    expect(fn).toHaveBeenCalledTimes(2);\n\n    throttled();\n    expect(fn).toHaveBeenCalledTimes(3);\n\n    throttled();\n    expect(fn).toHaveBeenCalledTimes(4);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(throttle).toEqualTypeOf<typeof throttleLodash>();\n  });\n\n  it('should not invoke the function even after flush is called if timer is going', async () => {\n    let callCount = 0;\n    const throttled = throttle(() => ++callCount, 32);\n\n    throttled();\n    throttled.flush();\n    throttled();\n\n    expect(callCount).toBe(1);\n\n    await delay(64);\n    expect(callCount).toBe(2);\n  });\n});\n"
  },
  {
    "path": "src/compat/function/throttle.ts",
    "content": "import { debounce, DebouncedFunc, DebouncedFuncLeading } from './debounce.ts';\n\ninterface ThrottleSettings {\n  /**\n   * If `true`, the function will be invoked on the leading edge of the timeout.\n   * @default true\n   */\n  leading?: boolean | undefined;\n  /**\n   * If `true`, the function will be invoked on the trailing edge of the timeout.\n   * @default true\n   */\n  trailing?: boolean | undefined;\n}\n\ntype ThrottleSettingsLeading = (ThrottleSettings & { leading: true }) | Omit<ThrottleSettings, 'leading'>;\n\n/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @param {ThrottleOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the throttled function.\n * @param {boolean} options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n * @param {boolean} options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n * @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n *   throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<T extends (...args: any) => any>(\n  func: T,\n  throttleMs?: number,\n  options?: ThrottleSettingsLeading\n): DebouncedFuncLeading<T>;\n\n/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @param {ThrottleOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the throttled function.\n * @param {boolean} options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n * @param {boolean} options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n * @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n *   throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<T extends (...args: any) => any>(\n  func: T,\n  throttleMs?: number,\n  options?: ThrottleSettings\n): DebouncedFunc<T>;\n\n/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @param {ThrottleOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the throttled function.\n * @param {boolean} options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n * @param {boolean} options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n * @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n *   throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => any>(\n  func: F,\n  throttleMs = 0,\n  options: ThrottleSettings = {}\n): DebouncedFunc<F> {\n  const { leading = true, trailing = true } = options;\n\n  return debounce(func, throttleMs, {\n    leading,\n    maxWait: throttleMs,\n    trailing,\n  });\n}\n"
  },
  {
    "path": "src/compat/function/unary.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unary as unaryLodash } from 'lodash';\nimport { unary } from './unary';\nimport { map } from '../array/map';\n\ndescribe('unary', () => {\n  function fn(...args: any[]) {\n    return args;\n  }\n\n  it('should cap the number of arguments provided to `func`', () => {\n    const actual = map(['6', '8', '10'], unary(parseInt));\n    expect(actual).toEqual([6, 8, 10]);\n  });\n\n  it('should not force a minimum argument count', () => {\n    const capped = unary(fn);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(capped()).toEqual([]);\n  });\n\n  it('should use `this` binding of function', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const capped = unary(function (this: any, _a: unknown, _b: unknown) {\n      return this;\n    });\n    const object = { capped: capped };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(object.capped()).toBe(object);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unary).toEqualTypeOf<typeof unaryLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/unary.ts",
    "content": "import { ary } from './ary.ts';\n\n/**\n * Creates a function that accepts up to one argument, ignoring any additional arguments.\n *\n * @template F - The type of the function.\n * @param {F} func - The function to cap arguments for.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.\n *\n * @example\n * function fn(a, b, c) {\n *   console.log(arguments);\n * }\n *\n * unary(fn)(1, 2, 3); // [Arguments] { '0': 1 }\n */\nexport function unary<T, U>(func: (arg1: T, ...args: any[]) => U): (arg1: T) => U {\n  return ary(func, 1);\n}\n"
  },
  {
    "path": "src/compat/function/wrap.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { wrap as wrapLodash } from 'lodash';\nimport { wrap } from './wrap';\nimport { noop } from '../../function';\nimport { slice } from '../_internal/slice';\nimport { stubA } from '../_internal/stubA';\nimport { escape } from '../string/escape';\n\ndescribe('wrap', () => {\n  it('should create a wrapped function', () => {\n    const p = wrap(escape, (func, text: string) => `<p>${func(text)}</p>`);\n\n    expect(p('fred, barney & pebbles')).toBe('<p>fred, barney &amp; pebbles</p>');\n  });\n\n  it('should provide correct `wrapper` arguments', () => {\n    let args: unknown;\n\n    const wrapped = wrap(noop, function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    wrapped(1, 2, 3);\n    expect(args).toEqual([noop, 1, 2, 3]);\n  });\n\n  it('should use `_.identity` when `wrapper` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubA);\n\n    const actual = values.map((value, index) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const wrapped = index ? wrap('a', value) : wrap('a');\n      return wrapped('b', 'c');\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use `this` binding of function', () => {\n    const p = wrap(escape, function (func) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      return `<p>${func(this.text)}</p>`;\n    });\n\n    const object = { p: p, text: 'fred, barney & pebbles' };\n    expect(object.p()).toBe('<p>fred, barney &amp; pebbles</p>');\n  });\n\n  it('should work with primitive values', () => {\n    const value = 'value';\n    const expected = '<p>value</p>';\n\n    const p = wrap(value, v => `<p>${v}</p>`);\n    expect(p()).toBe(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(wrap).toEqualTypeOf<typeof wrapLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/function/wrap.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { isFunction } from '../../predicate/isFunction.ts';\n\n/**\n * Creates a new function that wraps the given function `func`.\n * In this process, you can apply additional logic defined in the `wrapper` function before and after the execution of the original function.\n *\n * If a `value` is provided instead of a function, this value is passed as the first argument to the `wrapper` function.\n *\n * @template T - The type of the value being wrapped.\n * @template U - The type of the arguments being passed to the `wrapper` function.\n * @template V - The type of the return value of the `wrapper` function.\n * @param {T} value - The value to be wrapped.\n * @param {(value: T, ...args: U[]) => V} wrapper - The function to wrap the value with.\n * @returns {(...args: U[]) => V} A new function that wraps the value with the `wrapper` function.\n *\n * @example\n * // Wrap a function\n * const greet = (name: string) => `Hi, ${name}`;\n * const wrapped = wrap(greet, (value, name) => `[LOG] ${value(name)}`);\n * wrapped('Bob'); // => \"[LOG] Hi, Bob\"\n *\n * @example\n * // Wrap a primitive value\n * const wrapped = wrap('value', v => `<p>${v}</p>`);\n * wrapped(); // => \"<p>value</p>\"\n */\nexport function wrap<T, U, V>(value: T, wrapper: (value: T, ...args: U[]) => V): (...args: U[]) => V {\n  return function (this: unknown, ...args: any[]): any {\n    const wrapFn = isFunction(wrapper) ? (wrapper as (value: unknown, ...args: unknown[]) => unknown) : identity;\n\n    return wrapFn.apply(this, [value, ...args]);\n  };\n}\n"
  },
  {
    "path": "src/compat/index.ts",
    "content": "/**\n * es-toolkit compatibility layer with lodash (WIP)\n * ====================================\n * ```tsx\n * // es-toolkit/compat aims to provide 100% feature parity with lodash\n * import { chunk } from 'es-toolkit/compat';\n *\n * chunk([1, 2, 3, 4], 0);\n * // Returns [], which is identical to lodash\n * ```\n *\n * `es-toolkit/compat` will offer complete compatibility with lodash, ensuring a seamless transition.\n *\n * To guarantee identical behavior, `es-toolkit/compat` will be thoroughly tested using actual lodash test cases.\n *\n * The primary goal of `es-toolkit/compat` is to serve as a drop-in replacement for lodash.\n *\n * It's important to note that while `es-toolkit/compat` will mirror the behavior of lodash functions with 100% accuracy,\n * it will deliberately omit unsafe features, such as:\n *\n * - Implicit type casting from an empty string `''` to 0 or false, and similar cases.\n *\n * @module\n */\nexport * from './compat.ts';\n\nexport { toolkit as default } from './toolkit.ts';\n"
  },
  {
    "path": "src/compat/math/add.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { add as addLodash } from 'lodash';\nimport { add } from './add';\nimport { symbol } from '../_internal/symbol';\nimport { map } from '../array/map';\nimport { times } from '../util/times';\n\ndescribe('add', () => {\n  it('should add two numbers', () => {\n    expect(add(6, 4)).toBe(10);\n    expect(add(-6, 4)).toBe(-2);\n    expect(add(-6, -4)).toBe(-10);\n  });\n\n  it('should not coerce arguments to numbers', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(add('6', '4')).toBe('64');\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(add('x', 'y')).toBe('xy');\n  });\n\n  it('should return the sum of two positive numbers', () => {\n    expect(add(2, 3)).toBe(5);\n  });\n\n  it('should return the sum of two negative numbers', () => {\n    expect(add(-1, -5)).toBe(-6);\n  });\n\n  it('should return the sum of a negative and a positive number', () => {\n    expect(add(-2, 3)).toBe(1);\n  });\n\n  it('should return NaN if the first value is NaN', () => {\n    expect(add(NaN, 10)).toBe(NaN);\n  });\n\n  it('should return NaN if the second value is NaN', () => {\n    expect(add(5, NaN)).toBe(NaN);\n  });\n\n  it('should return NaN if both values are NaN', () => {\n    expect(add(NaN, NaN)).toBe(NaN);\n  });\n\n  it(`\\`add\\` should return \\`0\\` when no arguments are given`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(add()).toBe(0);\n  });\n\n  it(`\\`add\\` should work with only one defined argument`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(add(6)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(add(6, undefined)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(add(undefined, 4)).toBe(4);\n  });\n\n  it(`\\`add\\` should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      ['0', Infinity],\n      [-0, -Infinity],\n      ['-0', -Infinity],\n    ];\n\n    times(2, index => {\n      const actual = map(values, value => {\n        // @ts-expect-error - invalid arguments\n        const result = index ? add(undefined, value) : add(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`\\`add\\` should convert objects to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(add(0, {})).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(add({}, 0)).toEqual(NaN);\n  });\n\n  it(`\\`add\\` should convert symbols to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(add(0, symbol)).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(add(symbol, 0)).toEqual(NaN);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(add).toEqualTypeOf<typeof addLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/add.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Adds two numbers while safely handling `NaN` values.\n *\n * This function takes two numbers and returns their sum. If either of the numbers is `NaN`,\n * the function returns `NaN`.\n *\n * @param {number} value - The first number to add.\n * @param {number} other - The second number to add.\n * @returns {number} The sum of the two numbers, or `NaN` if any input is `NaN`.\n *\n * @example\n * const result1 = add(2, 3);    // result1 will be 5\n * const result2 = add(5, NaN);  // result2 will be NaN\n * const result3 = add(NaN, 10); // result3 will be NaN\n */\nexport function add(value: number, other: number): number {\n  if (value === undefined && other === undefined) {\n    return 0;\n  }\n  if (value === undefined || other === undefined) {\n    return value ?? other;\n  }\n  if (typeof value === 'string' || typeof other === 'string') {\n    value = toString(value) as any;\n    other = toString(other) as any;\n  } else {\n    value = toNumber(value);\n    other = toNumber(other);\n  }\n  return value + other;\n}\n"
  },
  {
    "path": "src/compat/math/ceil.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { ceil as ceilLodash } from 'lodash';\nimport { ceil } from './ceil';\n\ndescribe('ceil', () => {\n  it(`\\`ceil\\` should return a rounded number without a precision`, () => {\n    const actual = ceil(4.006);\n    expect(actual).toBe(5);\n  });\n\n  it(`\\`ceil\\` should work with a precision of \\`0\\``, () => {\n    const actual = ceil(4.006, 0);\n    expect(actual).toBe(5);\n  });\n\n  it(`\\`ceil\\` should work with a positive precision`, () => {\n    let actual = ceil(4.016, 2);\n    expect(actual).toBe(4.02);\n\n    actual = ceil(4.1, 2);\n    expect(actual).toBe(4.1);\n\n    actual = ceil(4.4, 2);\n    expect(actual).toBe(4.4);\n  });\n\n  it(`\\`ceil\\` should work with a negative precision`, () => {\n    const actual = ceil(4160, -2);\n    expect(actual).toBe(4200);\n  });\n\n  it(`\\`ceil\\` should coerce \\`precision\\` to an integer`, () => {\n    let actual = ceil(4.006, NaN);\n    expect(actual).toBe(5);\n\n    const expected = 4.02;\n\n    actual = ceil(4.016, 2.6);\n    expect(actual).toBe(expected);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = ceil(4.016, '+2');\n    expect(actual).toBe(expected);\n  });\n\n  it(`\\`ceil\\` should work with exponential notation and \\`precision\\``, () => {\n    let actual = ceil(5e1, 2);\n    expect(actual).toEqual(50);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = ceil('5e', 1);\n    expect(actual).toEqual(NaN);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = ceil('5e1e1', 1);\n    expect(actual).toEqual(NaN);\n  });\n\n  it(`\\`ceil\\` should preserve the sign of \\`0\\``, () => {\n    const values = [[0], [-0], ['0'], ['-0'], [0, 1], [-0, 1], ['0', 1], ['-0', 1]];\n    const expected = [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity];\n\n    // eslint-disable-next-line prefer-spread\n    const actual = values.map(args => 1 / ceil.apply(undefined, args as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`ceil\\` should handle edge cases`, () => {\n    expect(ceil(1.797, 295)).toBe(1.797);\n    expect(ceil(1.797, -295)).toBe(1e295);\n    expect(ceil(1.792e-295, 295)).toBe(1e-292);\n    expect(ceil(1.792e295, -295)).toBe(2e295);\n    expect(ceil(1.7976931348623157e308, 292)).toBe(NaN);\n    expect(ceil(5e-324, 323)).toBe(1e-292);\n    expect(ceil(5e-324, -323)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(ceil).toEqualTypeOf<typeof ceilLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/ceil.ts",
    "content": "import { decimalAdjust } from '../_internal/decimalAdjust.ts';\n\n/**\n * Computes number rounded up to precision.\n *\n * @param {number | string} number The number to round up.\n * @param {number | string} precision The precision to round up to.\n * @returns {number} Returns the rounded up number.\n *\n * @example\n * ceil(4.006); // => 5\n * ceil(6.004, 2); // => 6.01\n * ceil(6040, -2); // => 6100\n */\nexport function ceil(number: number, precision = 0): number {\n  return decimalAdjust('ceil', number, precision);\n}\n"
  },
  {
    "path": "src/compat/math/clamp.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { clamp as clampLodash } from 'lodash';\nimport { clamp } from './clamp';\n\ndescribe('clamp', () => {\n  it('should work with a `max`', () => {\n    expect(clamp(5, 3)).toBe(3);\n    expect(clamp(1, 3)).toBe(1);\n  });\n\n  it('should clamp negative numbers', () => {\n    expect(clamp(-10, -5, 5)).toBe(-5);\n    expect(clamp(-10.2, -5.5, 5.5)).toBe(-5.5);\n    expect(clamp(-Infinity, -5, 5)).toBe(-5);\n  });\n\n  it('should clamp positive numbers', () => {\n    expect(clamp(10, -5, 5)).toBe(5);\n    expect(clamp(10.6, -5.6, 5.4)).toBe(5.4);\n    expect(clamp(Infinity, -5, 5)).toBe(5);\n  });\n\n  it('should not alter negative numbers in range', () => {\n    expect(clamp(-4, -5, 5)).toBe(-4);\n    expect(clamp(-5, -5, 5)).toBe(-5);\n    expect(clamp(-5.5, -5.6, 5.6)).toBe(-5.5);\n  });\n\n  it('should not alter positive numbers in range', () => {\n    expect(clamp(4, -5, 5)).toBe(4);\n    expect(clamp(5, -5, 5)).toBe(5);\n    expect(clamp(4.5, -5.1, 5.2)).toBe(4.5);\n  });\n\n  it('should not alter `0` in range', () => {\n    expect(1 / clamp(0, -5, 5)).toBe(Infinity);\n  });\n\n  it('should clamp to `0`', () => {\n    expect(1 / clamp(-10, 0, 5)).toBe(Infinity);\n  });\n\n  it('should not alter `-0` in range', () => {\n    expect(1 / clamp(-0, -5, 5)).toBe(-Infinity);\n  });\n\n  it('should clamp to `-0`', () => {\n    expect(1 / clamp(-10, -0, 5)).toBe(-Infinity);\n  });\n\n  it('should return `NaN` when `number` is `NaN`', () => {\n    expect(clamp(NaN, -5, 5)).toEqual(NaN);\n  });\n\n  it('should coerce `min` and `max` of `NaN` to `0`', () => {\n    expect(clamp(1, -5, NaN)).toEqual(0);\n    expect(clamp(-1, NaN, 5)).toEqual(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(clamp).toEqualTypeOf<typeof clampLodash>();\n  });\n\n  it('should work with undefined as lower bound', () => {\n    expect(clamp(5, undefined as any, 10)).toBe(5);\n    expect(clamp(-100, undefined as any, 10)).toBe(-100);\n    expect(clamp(100, undefined as any, 10)).toBe(10);\n  });\n\n  it('should work with undefined as upper bound', () => {\n    expect(clamp(5, 0, undefined as any)).toBe(0);\n    expect(clamp(-100, 0, undefined as any)).toBe(-100);\n    expect(clamp(100, 0, undefined as any)).toBe(0);\n  });\n\n  it('should work with only number provided', () => {\n    // @ts-expect-error - testing runtime behavior when only one argument is provided\n    expect(clamp(5)).toBe(5);\n    // @ts-expect-error - testing runtime behavior when only one argument is provided\n    expect(clamp(-100)).toBe(-100);\n    // @ts-expect-error - testing runtime behavior when only one argument is provided\n    expect(clamp(100)).toBe(100);\n  });\n\n  it('should handle non-numeric bounds', () => {\n    expect(clamp(5, 'a' as any, 10)).toBe(5);\n    expect(clamp(5, 0, 'b' as any)).toBe(0);\n  });\n\n  it('should handle upper bound less than lower bound', () => {\n    expect(clamp(5, 10, 0)).toBe(10);\n    expect(clamp(15, 10, 0)).toBe(10);\n    expect(clamp(-5, 10, 0)).toBe(10);\n  });\n\n  it('should handle Infinity and -Infinity correctly', () => {\n    expect(clamp(Infinity, 0, 10)).toBe(10);\n    expect(clamp(-Infinity, 0, 10)).toBe(0);\n    expect(clamp(5, -Infinity, Infinity)).toBe(5);\n    expect(clamp(5, Infinity, -Infinity)).toBe(Infinity);\n  });\n\n  it('should handle special NaN combinations', () => {\n    expect(clamp(5, NaN, NaN)).toBe(0);\n    expect(clamp(NaN, NaN, 10)).toBe(NaN);\n    expect(clamp(5, NaN, undefined as any)).toBe(0);\n    expect(clamp(5, undefined as any, NaN)).toBe(0);\n  });\n\n  it('should handle boolean bounds', () => {\n    expect(clamp(5, false as any, true as any)).toBe(1);\n    expect(clamp(5, true as any, false as any)).toBe(1);\n  });\n});\n"
  },
  {
    "path": "src/compat/math/clamp.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\n\n/**\n * Clamps a number within the specified bounds.\n *\n * @param {number} number The number to clamp\n * @param {number} lower The lower bound\n * @param {number} upper The upper bound\n * @returns {number} Returns the clamped number\n * @example\n * clamp(3, 2, 4) // => 3\n * clamp(0, 5, 10) // => 5\n * clamp(15, 5, 10) // => 10\n */\nexport function clamp(number: number, lower: number, upper: number): number;\n\n/**\n * Clamps a number to an upper bound.\n *\n * @param {number} number The number to clamp\n * @param {number} upper The upper bound\n * @returns {number} Returns the clamped number\n * @example\n * clamp(5, 3) // => 3\n * clamp(2, 3) // => 2\n */\nexport function clamp(number: number, upper: number): number;\n\n/**\n * Clamps a number within the specified bounds.\n *\n * This function takes a number and one or two bounds, and returns the number clamped within the specified bounds.\n * If only one bound is provided, it returns the minimum of the value and the bound.\n *\n * @param {number} value - The number to clamp.\n * @param {number} bound1 - The minimum bound to clamp the number, or the maximum bound if bound2 is not provided.\n * @param {number} [bound2] - The maximum bound to clamp the number. If not provided, the function will only consider bound1 as the upper limit.\n * @returns {number} The clamped number within the specified bounds.\n *\n * @example\n * const result1 = clamp(10, 5); // result1 will be 5, as 10 is clamped to the bound 5\n * const result2 = clamp(10, 5, 15); // result2 will be 10, as it is within the bounds 5 and 15\n * const result3 = clamp(2, 5, 15); // result3 will be 5, as 2 is clamped to the lower bound 5\n * const result4 = clamp(20, 5, 15); // result4 will be 15, as 20 is clamped to the upper bound 15\n */\nexport function clamp(value: number, bound1: number, bound2?: number): number {\n  if (bound2 === undefined) {\n    bound2 = bound1;\n    bound1 = undefined as any;\n  }\n\n  if (bound2 !== undefined) {\n    bound2 = toNumber(bound2);\n    value = Math.min(value, Number.isNaN(bound2) ? 0 : bound2);\n  }\n\n  if (bound1 !== undefined) {\n    bound1 = toNumber(bound1);\n    value = Math.max(value, Number.isNaN(bound1) ? 0 : bound1);\n  }\n\n  return value;\n}\n"
  },
  {
    "path": "src/compat/math/divide.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { divide as divideLodash } from 'lodash';\nimport { divide } from './divide';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('divide', () => {\n  it('should divide two numbers', () => {\n    expect(divide(6, 4)).toBe(1.5);\n    expect(divide(-6, 4)).toBe(-1.5);\n    expect(divide(-6, -4)).toBe(1.5);\n  });\n\n  it('should coerce arguments to numbers', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide('6', '4')).toBe(1.5);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide('x', 'y')).toEqual(NaN);\n  });\n\n  it(`should return 1 when no arguments are given`, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide()).toBe(1);\n  });\n\n  it(`should work with only one defined argument`, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(6)).toBe(6);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(6, undefined)).toBe(6);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(undefined, 4)).toBe(4);\n  });\n\n  it(`should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      ['0', Infinity],\n      [-0, -Infinity],\n      ['-0', -Infinity],\n    ];\n\n    lodashStable.times(2, index => {\n      const actual = lodashStable.map(values, value => {\n        // eslint-disable-next-line\n        // @ts-ignore\n        const result = index ? divide(undefined, value) : divide(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should convert objects to \\`NaN\\``, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(0, {})).toEqual(NaN);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide({}, 0)).toEqual(NaN);\n  });\n\n  it(`should convert symbols to \\`NaN\\``, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(0, symbol)).toEqual(NaN);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(divide(symbol, 0)).toEqual(NaN);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(divide).toEqualTypeOf<typeof divideLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/divide.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Divide two numbers.\n *\n * If either of the numbers is `NaN`, the function returns `NaN`.\n *\n * @param {number} value The first number in a division.\n * @param {number} other The second number in a division.\n * @returns {number} The quotient of value and other.\n *\n * @example\n * divide(6, 3); // => 2\n * divide(2, NaN); // => NaN\n * divide(NaN, 3); // => NaN\n * divide(NaN, NaN); // => NaN\n */\nexport function divide(value: number, other: number): number {\n  if (value === undefined && other === undefined) {\n    return 1;\n  }\n\n  if (value === undefined || other === undefined) {\n    return value ?? other;\n  }\n\n  if (typeof value === 'string' || typeof other === 'string') {\n    value = toString(value) as any;\n    other = toString(other) as any;\n  } else {\n    value = toNumber(value);\n    other = toNumber(other);\n  }\n\n  return value / other;\n}\n"
  },
  {
    "path": "src/compat/math/floor.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { floor as floorLodash } from 'lodash';\nimport { floor } from './floor';\n\ndescribe('floor', () => {\n  it(`\\`floor\\` should return a rounded number without a precision`, () => {\n    const actual = floor(4.006);\n    expect(actual).toBe(4);\n  });\n\n  it(`\\`floor\\` should work with a precision of \\`0\\``, () => {\n    const actual = floor(4.006, 0);\n    expect(actual).toBe(4);\n  });\n\n  it(`\\`floor\\` should work with a positive precision`, () => {\n    let actual = floor(4.016, 2);\n    expect(actual).toBe(4.01);\n\n    actual = floor(4.1, 2);\n    expect(actual).toBe(4.1);\n\n    actual = floor(4.4, 2);\n    expect(actual).toBe(4.4);\n  });\n\n  it(`\\`floor\\` should work with a negative precision`, () => {\n    const actual = floor(4160, -2);\n    expect(actual).toBe(4100);\n  });\n\n  it(`\\`floor\\` should coerce \\`precision\\` to an integer`, () => {\n    let actual = floor(4.006, NaN);\n    expect(actual).toBe(4);\n\n    const expected = 4.01;\n\n    actual = floor(4.016, 2.6);\n    expect(actual).toBe(expected);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = floor(4.016, '+2');\n    expect(actual).toBe(expected);\n  });\n\n  it(`\\`floor\\` should work with exponential notation and \\`precision\\``, () => {\n    let actual = floor(5e1, 2);\n    expect(actual).toEqual(50);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = floor('5e', 1);\n    expect(actual).toEqual(NaN);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    actual = floor('5e1e1', 1);\n    expect(actual).toEqual(NaN);\n  });\n\n  it(`\\`floor\\` should preserve the sign of \\`0\\``, () => {\n    const values = [[0], [-0], ['0'], ['-0'], [0, 1], [-0, 1], ['0', 1], ['-0', 1]];\n    const expected = [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity];\n\n    // eslint-disable-next-line prefer-spread\n    const actual = values.map(args => 1 / floor.apply(undefined, args as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`floor\\` should handle edge cases`, () => {\n    expect(floor(1.797, 295)).toBe(1.797);\n    expect(floor(1.797, -295)).toBe(0);\n    expect(floor(1.792e-295, 295)).toBe(0);\n    expect(floor(1.792e295, -295)).toBe(1e295);\n    expect(floor(1.7976931348623157e308, 292)).toBe(NaN);\n    expect(floor(5e-324, 323)).toBe(0);\n    expect(floor(5e-324, -323)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(floor).toEqualTypeOf<typeof floorLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/floor.ts",
    "content": "import { decimalAdjust } from '../_internal/decimalAdjust.ts';\n\n/**\n * Computes number rounded down to precision.\n *\n * @param {number | string} number The number to round down.\n * @param {number | string} precision The precision to round down to.\n * @returns {number} Returns the rounded down number.\n *\n * @example\n * floor(4.006); // => 4\n * floor(0.046, 2); // => 0.04\n * floor(4060, -2); // => 4000\n */\nexport function floor(number: number, precision = 0): number {\n  return decimalAdjust('floor', number, precision);\n}\n"
  },
  {
    "path": "src/compat/math/inRange.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { inRange as inRangeLodash } from 'lodash';\nimport { inRange } from './inRange';\nimport { falsey } from '../_internal/falsey';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('inRange', () => {\n  it('should work with an `end`', () => {\n    expect(inRange(3, 5)).toBe(true);\n    expect(inRange(5, 5)).toBe(false);\n    expect(inRange(6, 5)).toBe(false);\n  });\n\n  it('should work with a `start` and `end`', () => {\n    expect(inRange(1, 1, 5)).toBe(true);\n    expect(inRange(3, 1, 5)).toBe(true);\n    expect(inRange(0, 1, 5)).toBe(false);\n    expect(inRange(5, 1, 5)).toBe(false);\n    expect(inRange(5, 5, 5)).toBe(false);\n  });\n\n  it('should treat falsy `start` as `0`', () => {\n    falsey.forEach((value, index) => {\n      if (index) {\n        // eslint-disable-next-line\n        // @ts-ignore\n        expect(inRange(0, value)).toBe(false);\n        // eslint-disable-next-line\n        // @ts-ignore\n        expect(inRange(0, value, 1)).toBe(true);\n      } else {\n        // eslint-disable-next-line\n        // @ts-ignore\n        expect(inRange(0)).toBe(false);\n      }\n    });\n  });\n\n  it('should swap `start` and `end` when `start` > `end`', () => {\n    expect(inRange(2, 5, 1)).toBe(true);\n    expect(inRange(-3, -2, -6)).toBe(true);\n  });\n\n  it('should work with a floating point `n` value', () => {\n    expect(inRange(0.5, 5)).toBe(true);\n    expect(inRange(1.2, 1, 5)).toBe(true);\n    expect(inRange(5.2, 5)).toBe(false);\n    expect(inRange(0.5, 1, 5)).toBe(false);\n  });\n\n  it('should coerce arguments to finite numbers', () => {\n    const actual = [\n      // eslint-disable-next-line\n      // @ts-ignore\n      inRange(0, '1'),\n      // eslint-disable-next-line\n      // @ts-ignore\n      inRange(0, '0', 1),\n      // eslint-disable-next-line\n      // @ts-ignore\n      inRange(0, 0, '1'),\n      inRange(0, NaN, 1),\n      inRange(-1, -1, NaN),\n    ];\n\n    expect(actual).toEqual(actual.map(stubTrue));\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(inRange).toEqualTypeOf<typeof inRangeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/inRange.ts",
    "content": "import { inRange as inRangeToolkit } from '../../math/inRange.ts';\n\n/**\n * Checks if the value is within a specified range.\n *\n * @param {number} value The value to check.\n * @param {number} minimum The lower bound of the range (inclusive).\n * @param {number} maximum The upper bound of the range (exclusive).\n * @returns {boolean} `true` if the value is within the specified range, otherwise `false`.\n * @throws {Error} Throws an error if the `minimum` is greater or equal than the `maximum`.\n *\n * @example\n * const result1 = inRange(3, 5); // result1 will be true.\n * const result2 = inRange(1, 2, 5); // result2 will be false.\n * const result3 = inRange(1, 5, 2); // If the minimum is greater or equal than the maximum, an error is thrown.\n */\nexport function inRange(value: number, minimum: number, maximum?: number): boolean {\n  if (!minimum) {\n    minimum = 0;\n  }\n\n  if (maximum != null && !maximum) {\n    maximum = 0;\n  }\n\n  if (minimum != null && typeof minimum !== 'number') {\n    minimum = Number(minimum);\n  }\n\n  if (maximum == null && minimum === 0) {\n    return false;\n  }\n\n  if (maximum != null && typeof maximum !== 'number') {\n    maximum = Number(maximum);\n  }\n\n  if (maximum != null && minimum > maximum) {\n    [minimum, maximum] = [maximum, minimum];\n  }\n\n  if (minimum === maximum) {\n    return false;\n  }\n\n  return inRangeToolkit(value, minimum, maximum!);\n}\n"
  },
  {
    "path": "src/compat/math/max.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { max as maxLodash } from 'lodash';\nimport { max } from './max';\n\ndescribe('max', () => {\n  it('should return the largest value from a collection', () => {\n    expect(max([1, 2, 3])).toBe(3);\n    expect(max([1, 3, 2])).toBe(3);\n  });\n\n  it('should return `undefined` for empty collections', () => {\n    expect(max([])).toBe(undefined);\n    //@ts-expect-error - Invalid argument\n    expect(max()).toBe(undefined);\n  });\n\n  it('should work with non-numeric collection values', () => {\n    expect(max(['a', 'b'])).toBe('b');\n  });\n\n  it('should work with Date objects', () => {\n    const curr = new Date();\n    const past = new Date(0);\n\n    expect(max([curr, past])).toBe(curr);\n  });\n\n  it('should work with extremely large arrays', () => {\n    const array = Array.from({ length: 5e5 }, (_, i) => i);\n    expect(max(array)).toBe(499999);\n  });\n\n  it('should work when chaining on an array with only one value', () => {\n    const array = [40];\n    expect(max(array)).toBe(40);\n  });\n\n  it('should skip NaN values', () => {\n    expect(max([1, NaN, 2])).toBe(2);\n    expect(max([NaN, 1, 2])).toBe(2);\n  });\n\n  it('should skip symbol values', () => {\n    expect(max([1, Symbol('a'), 2])).toBe(2);\n    expect(max([Symbol('a'), 1, 2])).toBe(2);\n    expect(max([Symbol('a'), Symbol('b'), 1])).toBe(1);\n  });\n\n  it('should skip null values', () => {\n    expect(max([1, null, 2])).toBe(2);\n    expect(max([null, 1, 2])).toBe(2);\n  });\n\n  it('should return undefined when skipping all values', () => {\n    expect(max([Symbol('a'), null, NaN])).toBe(undefined);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(max).toEqualTypeOf<typeof maxLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/max.ts",
    "content": "/**\n * Finds the element in an array that has the maximum value.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} [items] - The array of elements to search. Defaults to an empty array.\n * @returns {T | undefined} - The element with the maximum value, or undefined if the array is empty.\n */\nexport function max<T>(items: ArrayLike<T> | null | undefined): T | undefined {\n  if (!items || items.length === 0) {\n    return undefined;\n  }\n\n  let maxResult: T | undefined = undefined;\n\n  for (let i = 0; i < items.length; i++) {\n    const current = items[i];\n\n    if (current == null || Number.isNaN(current) || typeof current === 'symbol') {\n      continue;\n    }\n\n    if (maxResult === undefined || current > (maxResult as T)) {\n      maxResult = current;\n    }\n  }\n\n  return maxResult;\n}\n"
  },
  {
    "path": "src/compat/math/maxBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { maxBy as maxByLodash } from 'lodash';\nimport { maxBy } from './maxBy';\n\ndescribe('maxBy', () => {\n  it('should work with Date objects', () => {\n    const curr = new Date();\n    const past = new Date(0);\n\n    expect(maxBy([curr, past], date => date.getTime())).toBe(curr);\n  });\n\n  it('should work with extremely large arrays', () => {\n    const array = Array.from({ length: 5e5 }, (_, i) => i);\n    expect(maxBy(array, x => x)).toBe(499999);\n  });\n\n  it('should work when chaining on an array with only one value', () => {\n    const array = [40];\n    expect(maxBy(array, x => x)).toBe(40);\n  });\n\n  const array = [1, 2, 3];\n\n  it('should work with an `iteratee`', () => {\n    const actual = maxBy(array, n => -n);\n    expect(actual).toBe(1);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ a: 2 }, { a: 3 }, { a: 1 }];\n    expect(maxBy(objects, 'a')).toEqual(objects[1]);\n\n    const arrays = [[2], [3], [1]];\n    expect(maxBy(arrays, 0)).toEqual(arrays[1]);\n  });\n\n  it('should work when `iteratee` returns +/-Infinity', () => {\n    const value = -Infinity;\n    const object = { a: value };\n\n    const actual = maxBy([object, { a: value }], obj => obj.a);\n    expect(actual).toBe(object);\n  });\n\n  it('should handle null and undefined values', () => {\n    expect(maxBy(null)).toBe(undefined);\n    expect(maxBy(undefined)).toBe(undefined);\n  });\n\n  it('should work without iteratee parameter (default to identity)', () => {\n    const numbers = [1, 2, 3];\n\n    expect(maxBy(numbers)).toBe(3);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(maxBy).toEqualTypeOf<typeof maxByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/maxBy.ts",
    "content": "import { maxBy as maxByToolkit } from '../../array/maxBy.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Finds the element in an array that has the maximum value when applying\n * the `iteratee` to each element.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} items The array of elements to search.\n * @param {ValueIteratee<T>} iteratee\n * The criteria used to determine the maximum value.\n *  - If a **function** is provided, it extracts a numeric value from each element.\n *  - If a **string** is provided, it is treated as a key to extract values from the objects.\n *  - If a **[key, value]** pair is provided, it matches elements with the specified key-value pair.\n *  - If an **object** is provided, it matches elements that contain the specified properties.\n * @returns {T | undefined} The element with the maximum value as determined by the `iteratee`.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n * maxBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'john', age: 30 }\n * maxBy([{ a: 1 }, { a: 2 }], 'a'); // Returns: { a: 2 }\n * maxBy([{ a: 1 }, { a: 2 }], ['a', 1]); // Returns: { a: 1 }\n * maxBy([{ a: 1 }, { a: 2 }], { a: 1 }); // Returns: { a: 1 }\n */\nexport function maxBy<T>(items: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined {\n  if (items == null) {\n    return undefined;\n  }\n\n  return maxByToolkit(Array.from(items), iterateeToolkit(iteratee ?? identity));\n}\n"
  },
  {
    "path": "src/compat/math/mean.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { mean as meanLodash } from 'lodash';\nimport { mean } from './mean';\nimport { empties } from '../_internal/empties';\nimport { stubNaN } from '../_internal/stubNaN';\nimport { map } from '../array/map';\n\ndescribe('mean', () => {\n  it('should return the mean of an array of numbers', () => {\n    const array = [4, 2, 8, 6];\n    expect(mean(array)).toBe(5);\n  });\n\n  it('should return `NaN` when passing empty `array` values', () => {\n    const expected = map(empties, stubNaN);\n    const actual = map(empties, mean);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(mean).toEqualTypeOf<typeof meanLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/mean.ts",
    "content": "import { sum } from './sum.ts';\n\n/**\n * Calculates the average of an array of numbers.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @param {ArrayLike<any> | null | undefined} nums - An array of numbers to calculate the average.\n * @returns {number} The average of all the numbers in the array.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * const result = mean(numbers);\n * // result will be 3\n */\nexport function mean(nums: ArrayLike<any> | null | undefined): number {\n  const length = nums ? nums.length : 0;\n  return length === 0 ? NaN : sum(nums) / length;\n}\n"
  },
  {
    "path": "src/compat/math/meanBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { meanBy as meanByLodash } from 'lodash';\nimport { meanBy } from './meanBy';\nimport { slice } from '../_internal/slice';\n\ndescribe('meanBy', () => {\n  const objects = [{ a: 2 }, { a: 3 }, { a: 1 }];\n\n  it('should work with an `iteratee`', () => {\n    const actual = meanBy(objects, object => object.a);\n\n    expect(actual).toEqual(2);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    meanBy(objects, function () {\n      // eslint-disable-next-line\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual([{ a: 2 }]);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const arrays = [[2], [3], [1]];\n    expect(meanBy(arrays, 0)).toBe(2);\n    expect(meanBy(objects, 'a')).toBe(2);\n  });\n\n  it('should handle null and undefined values', () => {\n    expect(meanBy(null)).toBe(NaN);\n    expect(meanBy(undefined)).toBe(NaN);\n  });\n\n  it('should work without iteratee parameter (default to identity)', () => {\n    const numbers = [1, 2, 3];\n\n    expect(meanBy(numbers)).toBe(2);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(meanBy).toEqualTypeOf<typeof meanByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/meanBy.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { meanBy as meanByToolkit } from '../../math/meanBy.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Calculates the average of an array of numbers when applying\n * the `iteratee` function to each element.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items An array to calculate the average.\n * @param {((element: T) => unknown) | PropertyKey | [PropertyKey, any] | PartialShallow<T>} iteratee\n * The criteria used to determine the maximum value.\n *  - If a **function** is provided, it extracts a numeric value from each element.\n *  - If a **string** is provided, it is treated as a key to extract values from the objects.\n *  - If a **[key, value]** pair is provided, it matches elements with the specified key-value pair.\n *  - If an **object** is provided, it matches elements that contain the specified properties.\n * @returns {number} The average of all the numbers as determined by the `iteratee` function.\n *\n * @example\n * meanBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: 2\n * meanBy([], x => x.a); // Returns: NaN\n * meanBy([[2], [3], [1]], 0); // Returns: 2\n * meanBy([{ a: 2 }, { a: 3 }, { a: 1 }], 'a'); // Returns: 2\n */\nexport function meanBy<T>(items: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): number {\n  if (items == null) {\n    return NaN;\n  }\n\n  return meanByToolkit(Array.from(items), iterateeToolkit(iteratee ?? identity));\n}\n"
  },
  {
    "path": "src/compat/math/min.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { min as minLodash } from 'lodash';\nimport { min } from './min';\n\ndescribe('min', () => {\n  it('should return the largest value from a collection', () => {\n    expect(min([1, 2, 3])).toBe(1);\n  });\n\n  it('should return `undefined` for empty collections', () => {\n    expect(min([])).toBe(undefined);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(min()).toBe(undefined);\n  });\n\n  it('should work with non-numeric collection values', () => {\n    expect(min(['a', 'b'])).toBe('a');\n  });\n\n  it('should work with Date objects', () => {\n    const curr = new Date();\n    const past = new Date(0);\n\n    expect(min([curr, past])).toBe(past);\n  });\n\n  it('should work with extremely large arrays', () => {\n    const array = Array.from({ length: 5e5 }, (_, i) => i);\n    expect(min(array)).toBe(0);\n  });\n\n  it('should work when chaining on an array with only one value', () => {\n    const array = [40];\n    expect(min(array)).toBe(40);\n  });\n\n  it('should skip NaN values', () => {\n    expect(min([1, NaN, 2])).toBe(1);\n    expect(min([NaN, 1, 2])).toBe(1);\n  });\n\n  it('should skip symbol values', () => {\n    expect(min([1, Symbol('a'), 2])).toBe(1);\n    expect(min([Symbol('a'), 1, 2])).toBe(1);\n    expect(min([Symbol('a'), Symbol('b'), 1])).toBe(1);\n  });\n\n  it('should skip null values', () => {\n    expect(min([1, null, 2])).toBe(1);\n    expect(min([null, 1, 2])).toBe(1);\n  });\n\n  it('should return undefined when skipping all values', () => {\n    expect(min([Symbol('a'), null, NaN])).toBe(undefined);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(min).toEqualTypeOf<typeof minLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/min.ts",
    "content": "/**\n * Finds the element in an array that has the minimum value.\n *\n * @template T - The type of elements in the array.\n * @param {ArrayLike<T> | null | undefined} [items] - The array of elements to search. Defaults to an empty array.\n * @returns {T | undefined} - The element with the minimum value, or undefined if the array is empty.\n */\nexport function min<T>(items: ArrayLike<T> | null | undefined): T | undefined {\n  if (!items || items.length === 0) {\n    return undefined;\n  }\n\n  let minResult: T | undefined = undefined;\n\n  for (let i = 0; i < items.length; i++) {\n    const current = items[i];\n\n    if (current == null || Number.isNaN(current) || typeof current === 'symbol') {\n      continue;\n    }\n\n    if (minResult === undefined || current < (minResult as T)) {\n      minResult = current;\n    }\n  }\n\n  return minResult;\n}\n"
  },
  {
    "path": "src/compat/math/minBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { minBy as minByLodash } from 'lodash';\nimport { minBy } from './minBy';\n\ndescribe('minBy', () => {\n  it('should work with Date objects', () => {\n    const curr = new Date();\n    const past = new Date(0);\n\n    expect(minBy([curr, past], date => date.getTime())).toBe(past);\n  });\n\n  it('should work with extremely large arrays', () => {\n    const array = Array.from({ length: 5e5 }, (_, i) => i);\n    expect(minBy(array, x => x)).toBe(0);\n  });\n\n  it('should work when chaining on an array with only one value', () => {\n    const array = [40];\n    expect(minBy(array, x => x)).toBe(40);\n  });\n\n  const array = [1, 2, 3];\n\n  it('should work with an `iteratee`', () => {\n    const actual = minBy(array, n => -n);\n    expect(actual).toBe(3);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const objects = [{ a: 2 }, { a: 3 }, { a: 1 }];\n    expect(minBy(objects, 'a')).toEqual(objects[2]);\n\n    const arrays = [[2], [3], [1]];\n    expect(minBy(arrays, 0)).toEqual(arrays[2]);\n  });\n\n  it('should work when `iteratee` returns +/-Infinity', () => {\n    const value = -Infinity;\n    const object = { a: value };\n\n    const actual = minBy([object, { a: value }], obj => obj.a);\n    expect(actual).toBe(object);\n  });\n\n  it('should handle null and undefined values', () => {\n    expect(minBy(null)).toBe(undefined);\n    expect(minBy(undefined)).toBe(undefined);\n  });\n\n  it('should work without iteratee parameter (default to identity)', () => {\n    const numbers = [3, 1, 2];\n\n    expect(minBy(numbers)).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(minBy).toEqualTypeOf<typeof minByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/minBy.ts",
    "content": "import { minBy as minByToolkit } from '../../array/minBy.ts';\nimport { identity } from '../../function/identity.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Finds the element in an array that has the minimum value when applying\n * the `iteratee` to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {((element: T) => number) | keyof T | [keyof T, unknown] | Partial<T>} iteratee\n * The criteria used to determine the minimum value.\n *  - If a **function** is provided, it extracts a numeric value from each element.\n *  - If a **string** is provided, it is treated as a key to extract values from the objects.\n *  - If a **[key, value]** pair is provided, it matches elements with the specified key-value pair.\n *  - If an **object** is provided, it matches elements that contain the specified properties.\n * @returns {T | undefined} The element with the minimum value as determined by the `iteratee`.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n * minBy(\n *   [\n *     { name: 'john', age: 30 },\n *     { name: 'jane', age: 28 },\n *     { name: 'joe', age: 26 },\n *   ],\n *   x => x.age\n * ); // Returns: { name: 'joe', age: 26 }\n * minBy([{ a: 1 }, { a: 2 }], 'a'); // Returns: { a: 1 }\n * minBy([{ a: 1 }, { a: 2 }], ['a', 1]); // Returns: { a: 2 }\n * minBy([{ a: 1 }, { a: 2 }], { a: 1 }); // Returns: { a: 2 }\n */\nexport function minBy<T>(items: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined {\n  if (items == null) {\n    return undefined;\n  }\n\n  return minByToolkit(Array.from(items), iterateeToolkit(iteratee ?? identity));\n}\n"
  },
  {
    "path": "src/compat/math/multiply.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { multiply as multiplyLodash } from 'lodash';\nimport { multiply } from './multiply';\nimport { symbol } from '../_internal/symbol';\nimport { map } from '../array/map';\nimport { times } from '../util/times';\n\ndescribe('multiply', () => {\n  it('should return the product of two positive numbers', () => {\n    expect(multiply(2, 4)).toBe(8);\n    expect(multiply(3, 4)).toBe(12);\n  });\n\n  it('should return the product when both numbers are negative', () => {\n    expect(multiply(-2, -4)).toBe(8);\n    expect(multiply(-3, -4)).toBe(12);\n  });\n\n  it('should return the product of a negative and a positive number', () => {\n    expect(multiply(-1, 5)).toBe(-5);\n    expect(multiply(5, -1)).toBe(-5);\n  });\n\n  it('should return NaN if the first value is NaN', () => {\n    expect(multiply(NaN, 3)).toBe(NaN);\n  });\n\n  it('should return NaN if the second value is NaN', () => {\n    expect(multiply(3, NaN)).toBe(NaN);\n  });\n\n  it('should return NaN if both values are NaN', () => {\n    expect(multiply(NaN, NaN)).toBe(NaN);\n  });\n\n  it('should multiply two numbers', () => {\n    expect(multiply(6, 4)).toBe(24);\n    expect(multiply(-6, 4)).toBe(-24);\n    expect(multiply(6, -4)).toBe(-24);\n    expect(multiply(-6, -4)).toBe(24);\n  });\n\n  it('should coerce arguments to numbers', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(multiply('6', '4')).toBe(24);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(multiply('x', 'y')).toEqual(NaN);\n  });\n\n  it(`\\`multiply\\` should return \\`1\\` when no arguments are given`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(multiply()).toBe(1);\n  });\n\n  it(`\\`multiply\\` should work with only one defined argument`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(multiply(6)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(multiply(6, undefined)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(multiply(undefined, 4)).toBe(4);\n  });\n\n  it(`\\`multiply\\` should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      ['0', Infinity],\n      [-0, -Infinity],\n      ['-0', -Infinity],\n    ];\n\n    times(2, index => {\n      const actual = map(values, value => {\n        // @ts-expect-error - invalid arguments\n        const result = index ? multiply(undefined, value) : multiply(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`\\`multiply\\` should convert objects to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(multiply(0, {})).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(multiply({}, 0)).toEqual(NaN);\n  });\n\n  it(`\\`multiply\\` should convert symbols to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(multiply(0, symbol)).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(multiply(symbol, 0)).toEqual(NaN);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(multiply).toEqualTypeOf<typeof multiplyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/multiply.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Multiply two numbers.\n *\n * If either of the numbers is `NaN`, the function returns `NaN`.\n *\n * @param {number} value The first number in a multiplication\n * @param {number} other The second number in a multiplication\n * @returns {number} The product of value and other\n *\n * @example\n * multiply(2, 3); // => 6\n * multiply(2, NaN); // => NaN\n * multiply(NaN, 3); // => NaN\n * multiply(NaN, NaN); // => NaN\n */\n\nexport function multiply(value: number, other: number): number {\n  if (value === undefined && other === undefined) {\n    return 1;\n  }\n\n  if (value === undefined || other === undefined) {\n    return value ?? other;\n  }\n\n  if (typeof value === 'string' || typeof other === 'string') {\n    value = toString(value) as any;\n    other = toString(other) as any;\n  } else {\n    value = toNumber(value);\n    other = toNumber(other);\n  }\n\n  return value * other;\n}\n"
  },
  {
    "path": "src/compat/math/parseInt.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { parseInt as parseIntLodash } from 'lodash';\nimport { parseInt } from './parseInt';\n\ndescribe('parseInt', () => {\n  it('should accept a `radix`', () => {\n    const expected = [\n      2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n      32, 33, 34, 35, 36,\n    ];\n\n    const actual = expected.map(radix => parseInt('10', radix));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use a radix of `10`, for non-hexadecimals, if `radix` is `undefined` or `0`', () => {\n    expect(parseInt('10')).toBe(10);\n    expect(parseInt('10', 0)).toBe(10);\n    expect(parseInt('10', 10)).toBe(10);\n    expect(parseInt('10', undefined)).toBe(10);\n  });\n\n  it('should use a radix of `16`, for hexadecimals, if `radix` is `undefined` or `0`', () => {\n    ['0x20', '0X20'].forEach(string => {\n      expect(parseInt(string)).toBe(32);\n      expect(parseInt(string, 0)).toBe(32);\n      expect(parseInt(string, 16)).toBe(32);\n      expect(parseInt(string, undefined)).toBe(32);\n    });\n  });\n\n  it('should use a radix of `10` for string with leading zeros', () => {\n    expect(parseInt('08')).toBe(8);\n    expect(parseInt('08', 10)).toBe(8);\n  });\n\n  it('should parse strings with leading whitespace', () => {\n    const expected = [8, 8, 10, 10, 32, 32, 32, 32];\n\n    const actual: number[] = [];\n    ['08', '10'].forEach(string => {\n      actual.push(parseInt(` ${string}`, 10), parseInt(` ${string}`));\n    });\n\n    ['0x20', '0X20'].forEach(string => {\n      actual.push(parseInt(` ${string}`), parseInt(` ${string}`, 16));\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should coerce `radix` to a number', () => {\n    const object = { valueOf: () => 0 };\n    // @ts-expect-error - unusual usage\n    expect(parseInt('08', object)).toBe(8);\n    // @ts-expect-error - unusual usage\n    expect(parseInt('0x20', object)).toBe(32);\n  });\n\n  it('should work as an iteratee for methods like `map`', () => {\n    const strings = ['6', '08', '10'].map(Object);\n    let actual = strings.map(parseInt);\n\n    expect(actual).toEqual([6, 8, 10]);\n\n    actual = ['1', '2', '3'].map(parseInt);\n    expect(actual).toEqual([1, 2, 3]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(parseInt).toEqualTypeOf<typeof parseIntLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/parseInt.ts",
    "content": "/**\n * Converts `string` to an integer of the specified radix. If `radix` is undefined or 0, a `radix` of 10 is used unless `string` is a hexadecimal, in which case a `radix` of 16 is used.\n *\n * @param {string} string The string to convert to an integer.\n * @param {number} radix The radix to use when converting the string to an integer. Defaults to `0`.\n * @param {unknown} guard Enables use as an iteratee for methods like `Array#map`.\n * @returns {number} Returns the converted integer.\n *\n * @example\n * parseInt('08'); // => 8\n * parseInt('0x20'); // => 32\n *\n * parseInt('08', 10); // => 8\n * parseInt('0x20', 16); // => 32\n *\n * ['6', '08', '10'].map(parseInt); // => [6, 8, 10]\n */\nexport function parseInt(string: string, radix?: number): number;\n\n/**\n * Converts `string` to an integer of the specified radix. If `radix` is undefined or 0, a `radix` of 10 is used unless `string` is a hexadecimal, in which case a `radix` of 16 is used.\n *\n * @param {string} string The string to convert to an integer.\n * @param {number} radix The radix to use when converting the string to an integer. Defaults to `0`.\n * @param {unknown} guard Enables use as an iteratee for methods like `Array#map`.\n * @returns {number} Returns the converted integer.\n *\n * @example\n * parseInt('08'); // => 8\n * parseInt('0x20'); // => 32\n *\n * parseInt('08', 10); // => 8\n * parseInt('0x20', 16); // => 32\n *\n * ['6', '08', '10'].map(parseInt); // => [6, 8, 10]\n */\nexport function parseInt(string: string, radix = 0, guard?: unknown): number {\n  if (guard) {\n    radix = 0;\n  }\n\n  return Number.parseInt(string, radix);\n}\n"
  },
  {
    "path": "src/compat/math/random.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { random as randomLodash } from 'lodash';\nimport { random } from './random';\nimport { uniq } from '../../array/uniq';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('random', () => {\n  const array = Array.from({ length: 100 });\n\n  it('should return `0` or `1` when no arguments are given', () => {\n    const actual = uniq(array.map(() => random())).sort();\n\n    expect(actual).toEqual([0, 1]);\n  });\n\n  it('should support a `min` and `max`', () => {\n    const min = 5;\n    const max = 10;\n\n    expect(\n      array.some(() => {\n        const result = random(min, max);\n        return result >= min && result <= max;\n      })\n    ).toBeTruthy();\n  });\n\n  it('should support not providing a `max`', () => {\n    const min = 0;\n    const max = 5;\n\n    expect(\n      array.some(() => {\n        const result = random(max);\n        return result >= min && result <= max;\n      })\n    ).toBeTruthy();\n  });\n\n  it('should swap `min` and `max` when `min` > `max`', () => {\n    const min = 4;\n    const max = 2;\n    const expected = [2, 3, 4];\n\n    const actual = uniq(array.map(() => random(min, max))).sort();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support large integer values', () => {\n    const min = 2 ** 31;\n    const max = 2 ** 62;\n\n    expect(\n      array.every(() => {\n        const result = random(min, max);\n        return result >= min && result <= max;\n      })\n    ).toBe(true);\n\n    expect(array.some(() => random(Number.MAX_SAFE_INTEGER))).toBe(true);\n  });\n\n  it('should coerce arguments to finite numbers', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = [random(NaN, NaN), random('1', '1'), random(Infinity, Infinity)];\n\n    expect(actual).toEqual([0, 1, Number.MAX_SAFE_INTEGER]);\n  });\n\n  it('should support floats', () => {\n    const min = 1.5;\n    const max = 1.6;\n    const actual = random(min, max);\n\n    expect(actual % 1);\n    expect(actual >= min && actual <= max);\n  });\n\n  it('should support providing a `floating`', () => {\n    let actual = random(true);\n    expect(actual % 1 && actual >= 0 && actual <= 1);\n\n    actual = random(2, true);\n    expect(actual % 1 && actual >= 0 && actual <= 2);\n\n    actual = random(2, 4, true);\n    expect(actual % 1 && actual >= 2 && actual <= 4);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const array = [1, 2, 3];\n    const expected = array.map(stubTrue);\n    const randoms = array.map(random);\n\n    const actual = randoms.map((result, index) => result >= 0 && result <= array[index] && result % 1 === 0);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(random).toEqualTypeOf<typeof randomLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/random.ts",
    "content": "import { clamp } from './clamp.ts';\nimport { random as randomToolkit } from '../../math/random.ts';\nimport { randomInt as randomIntToolkit } from '../../math/randomInt.ts';\n\n/**\n * Generate a random number between 0 and 1.\n * @param {boolean} [floating] - Whether to return a floating point number. Defaults to true.\n * @returns {number} A random number between 0 and 1.\n * @example\n * random(); // Returns a random number between 0 and 1\n * random(true); // Returns a random floating point number between 0 and 1\n * random(false); // Returns a random integer between 0 and 1\n */\nexport function random(floating?: boolean): number;\n\n/**\n * Generate a random number between 0 and max.\n * @param {number} max - The upper bound (exclusive).\n * @param {boolean} [floating] - Whether to return a floating point number. Defaults to true.\n * @returns {number} A random number between 0 and max.\n * @example\n * random(5); // Returns a random number between 0 and 5\n * random(10, true); // Returns a random floating point number between 0 and 10\n * random(3, false); // Returns a random integer between 0 and 3\n */\nexport function random(max: number, floating?: boolean): number;\n\n/**\n * Generate a random number between min and max.\n * @param {number} min - The lower bound (inclusive).\n * @param {number} max - The upper bound (exclusive).\n * @param {boolean} [floating] - Whether to return a floating point number. Defaults to true.\n * @returns {number} A random number between min and max.\n * @example\n * random(1, 5); // Returns a random number between 1 and 5\n * random(0, 10, true); // Returns a random floating point number between 0 and 10\n * random(1, 6, false); // Returns a random integer between 1 and 6\n */\nexport function random(min: number, max: number, floating?: boolean): number;\n\n/**\n * Generate a random number between 0 and min, using guard object for special cases.\n * @param {number} min - The upper bound (exclusive).\n * @param {string | number} index - The index or key to check in the guard object.\n * @param {object} guard - The guard object to validate the parameters.\n * @returns {number} A random number between 0 and min.\n * @example\n * const guard = { 5: 5 };\n * random(5, 5, guard); // Returns a random number between 0 and 5\n */\nexport function random(min: number, index: string | number, guard: object): number;\n\n/**\n * Generate a random number within the given range.\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random number between minimum (inclusive) and maximum (exclusive). The number can be an integer or a decimal.\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result1 = random(0, 5); // Returns a random number between 0 and 5.\n * const result2 = random(5, 0); // If the minimum is greater than the maximum, an error is thrown.\n * const result3 = random(5, 5); // If the minimum is equal to the maximum, an error is thrown.\n */\nexport function random(...args: any[]): number {\n  let minimum = 0;\n  let maximum = 1;\n  let floating = false;\n\n  switch (args.length) {\n    case 1: {\n      if (typeof args[0] === 'boolean') {\n        floating = args[0];\n      } else {\n        maximum = args[0];\n      }\n\n      break;\n    }\n    case 2: {\n      if (typeof args[1] === 'boolean') {\n        maximum = args[0];\n        floating = args[1];\n      } else {\n        minimum = args[0];\n        maximum = args[1];\n      }\n    }\n    // eslint-disable-next-line no-fallthrough\n    case 3: {\n      if (typeof args[2] === 'object' && args[2] != null && args[2][args[1]] === args[0]) {\n        minimum = 0;\n        maximum = args[0];\n        floating = false;\n      } else {\n        minimum = args[0];\n        maximum = args[1];\n        floating = args[2];\n      }\n    }\n  }\n\n  if (typeof minimum !== 'number') {\n    minimum = Number(minimum);\n  }\n\n  if (typeof maximum !== 'number') {\n    minimum = Number(maximum);\n  }\n\n  if (!minimum) {\n    minimum = 0;\n  }\n\n  if (!maximum) {\n    maximum = 0;\n  }\n\n  if (minimum > maximum) {\n    [minimum, maximum] = [maximum, minimum];\n  }\n\n  minimum = clamp(minimum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n  maximum = clamp(maximum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n\n  if (minimum === maximum) {\n    return minimum;\n  }\n\n  if (floating) {\n    return randomToolkit(minimum, maximum + 1);\n  } else {\n    return randomIntToolkit(minimum, maximum + 1);\n  }\n}\n"
  },
  {
    "path": "src/compat/math/range.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { range as rangeLodash } from 'lodash';\nimport { range } from './range';\nimport { falsey } from '../_internal/falsey';\nimport { each } from '../array/each';\nimport { map } from '../array/map';\n\ndescribe('range', () => {\n  it(`\\`_.range\\` should infer the sign of \\`step\\` when only \\`end\\` is given`, () => {\n    expect(range(4)).toEqual([0, 1, 2, 3]);\n    expect(range(-4)).toEqual([0, -1, -2, -3]);\n  });\n\n  it(`\\`_.range\\` should infer the sign of \\`step\\` when only \\`start\\` and \\`end\\` are given`, () => {\n    expect(range(1, 5)).toEqual([1, 2, 3, 4]);\n    expect(range(5, 1)).toEqual([5, 4, 3, 2]);\n  });\n\n  it(`\\`_.range\\` should work with a \\`start\\`, \\`end\\`, and \\`step\\``, () => {\n    expect(range(0, -4, -1)).toEqual([0, -1, -2, -3]);\n    expect(range(5, 1, -1)).toEqual([5, 4, 3, 2]);\n    expect(range(0, 20, 5)).toEqual([0, 5, 10, 15]);\n  });\n\n  it(`\\`_.range\\` should support a \\`step\\` of \\`0\\``, () => {\n    expect(range(1, 4, 0)).toEqual([1, 1, 1]);\n  });\n\n  it(`\\`_.range\\` should work with a \\`step\\` larger than \\`end\\``, () => {\n    expect(range(1, 5, 20)).toEqual([1]);\n  });\n\n  it(`\\`_.range\\` should work with a negative \\`step\\``, () => {\n    expect(range(0, -4, -1)).toEqual([0, -1, -2, -3]);\n    expect(range(21, 10, -3)).toEqual([21, 18, 15, 12]);\n  });\n\n  it(`\\`_.range\\` should support \\`start\\` of \\`-0\\``, () => {\n    const actual = range(-0, 1);\n    expect(1 / actual[0]).toBe(-Infinity);\n  });\n\n  it(`\\`_.range\\` should treat falsey \\`start\\` as \\`0\\``, () => {\n    each(falsey, (value, index) => {\n      if (index) {\n        // @ts-expect-error - invalid arguments\n        expect(range(value)).toEqual([]);\n        // @ts-expect-error - invalid arguments\n        expect(range(value, 1)).toEqual([0]);\n      } else {\n        // @ts-expect-error - invalid arguments\n        expect(range()).toEqual([]);\n      }\n    });\n  });\n\n  it(`\\`_.range\\` should coerce arguments to finite numbers`, () => {\n    // @ts-expect-error - invalid arguments\n    const actual = [range('1'), range('0', 1), range(0, 1, '1'), range(NaN), range(NaN, NaN)];\n\n    expect(actual).toEqual([[0], [0], [0], [], []]);\n  });\n\n  it(`\\`_.range\\` should work as an iteratee for methods like \\`_.map\\``, () => {\n    const array = [1, 2, 3];\n    const object = { a: 1, b: 2, c: 3 };\n    const expected = [[0], [0, 1], [0, 1, 2]];\n\n    each([array, object], collection => {\n      const actual = map(collection, range);\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(range).toEqualTypeOf<typeof rangeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/range.ts",
    "content": "import { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { toFinite } from '../util/toFinite.ts';\n\n/**\n * Creates an array of numbers progressing from `start` up to, but not including, `end`.\n *\n * @param {number} start - The starting number of the range (inclusive)\n * @param {number} end - The end number of the range (exclusive)\n * @param {number} step - The value to increment or decrement by\n * @returns {number[]} An array of numbers from start to end\n * @example\n * range(4)\n * // => [0, 1, 2, 3]\n *\n * range(1, 5)\n * // => [1, 2, 3, 4]\n *\n * range(0, 20, 5)\n * // => [0, 5, 10, 15]\n */\nexport function range(start: number, end?: number, step?: number): number[];\n\n/**\n * Creates an array of numbers progressing from 0 up to, but not including, `end`.\n * Used internally when range is called as an iteratee.\n *\n * @param {number} end - The end of the range (exclusive)\n * @param {string|number} index - The index argument passed to the iteratee\n * @param {object} guard - The guard object passed to the iteratee\n * @returns {number[]} An array of numbers from 0 to end\n * @example\n * [1, 2, 3].map(range)\n * // => [[0], [0, 1], [0, 1, 2]]\n */\nexport function range(end: number, index: string | number, guard: object): number[];\n\n/**\n * Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @param {number} step - The step value for the range.\n * @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with the specified `step`.\n *\n * @example\n * // Returns [0, 1, 2, 3]\n * range(4);\n *\n * @example\n * // Returns [0, -1, -2, -3]\n * range(0, -4, -1);\n */\nexport function range(start: number, end?: PropertyKey, step?: any): number[] {\n  // Enables use as an iteratee for methods like `_.map`.\n  if (step && typeof step !== 'number' && isIterateeCall(start, end, step)) {\n    end = step = undefined;\n  }\n  start = toFinite(start);\n  if (end === undefined) {\n    end = start;\n    start = 0;\n  } else {\n    end = toFinite(end);\n  }\n  step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n\n  const length = Math.max(Math.ceil((end - start) / (step || 1)), 0);\n  const result = new Array(length);\n  for (let index = 0; index < length; index++) {\n    result[index] = start;\n    start += step;\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/compat/math/rangeRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { each, map } from '..';\nimport type { rangeRight as rangeRightLodash } from 'lodash';\nimport { rangeRight } from './rangeRight';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('rangeRight methods', () => {\n  it(`\\`_.rangeRightRight\\` should infer the sign of \\`step\\` when only \\`end\\` is given`, () => {\n    expect(rangeRight(4)).toEqual([0, 1, 2, 3].reverse());\n    expect(rangeRight(-4)).toEqual([0, -1, -2, -3].reverse());\n  });\n\n  it(`\\`_.rangeRight\\` should infer the sign of \\`step\\` when only \\`start\\` and \\`end\\` are given`, () => {\n    expect(rangeRight(1, 5)).toEqual([1, 2, 3, 4].reverse());\n    expect(rangeRight(5, 1)).toEqual([5, 4, 3, 2].reverse());\n  });\n\n  it(`\\`_.rangeRight\\` should work with a \\`start\\`, \\`end\\`, and \\`step\\``, () => {\n    expect(rangeRight(0, -4, -1)).toEqual([0, -1, -2, -3].reverse());\n    expect(rangeRight(5, 1, -1)).toEqual([5, 4, 3, 2].reverse());\n    expect(rangeRight(0, 20, 5)).toEqual([0, 5, 10, 15].reverse());\n  });\n\n  it(`\\`_.rangeRight\\` should support a \\`step\\` of \\`0\\``, () => {\n    expect(rangeRight(1, 4, 0)).toEqual([1, 1, 1].reverse());\n  });\n\n  it(`\\`_.rangeRight\\` should work with a \\`step\\` larger than \\`end\\``, () => {\n    expect(rangeRight(1, 5, 20)).toEqual([1]);\n  });\n\n  it(`\\`_.rangeRight\\` should work with a negative \\`step\\``, () => {\n    expect(rangeRight(0, -4, -1)).toEqual([0, -1, -2, -3].reverse());\n    expect(rangeRight(21, 10, -3)).toEqual([21, 18, 15, 12].reverse());\n  });\n\n  it(`\\`_.rangeRight\\` should support \\`start\\` of \\`-0\\``, () => {\n    const actual = rangeRight(-0, 1);\n    expect(1 / actual[0]).toBe(-Infinity);\n  });\n\n  it(`\\`_.rangeRight\\` should treat falsey \\`start\\` as \\`0\\``, () => {\n    each(falsey, (value, index) => {\n      if (index) {\n        // @ts-expect-error - invalid arguments\n        expect(rangeRight(value)).toEqual([]);\n        // @ts-expect-error - invalid arguments\n        expect(rangeRight(value, 1)).toEqual([0]);\n      } else {\n        // @ts-expect-error - invalid arguments\n        expect(rangeRight()).toEqual([]);\n      }\n    });\n  });\n\n  it(`\\`_.rangeRight\\` should coerce arguments to finite numbers`, () => {\n    // @ts-expect-error - invalid arguments\n    const actual = [rangeRight('1'), rangeRight('0', 1), rangeRight(0, 1, '1'), rangeRight(NaN), rangeRight(NaN, NaN)];\n\n    expect(actual).toEqual([[0], [0], [0], [], []]);\n  });\n\n  it(`\\`_.rangeRight\\` should work as an iteratee for methods like \\`_.map\\``, () => {\n    const array = [1, 2, 3];\n    const object = { a: 1, b: 2, c: 3 };\n    const expected = [[0], [0, 1].reverse(), [0, 1, 2].reverse()];\n\n    each([array, object], collection => {\n      const actual = map(collection, rangeRight);\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(rangeRight).toEqualTypeOf<typeof rangeRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/rangeRight.ts",
    "content": "import { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { toFinite } from '../util/toFinite.ts';\n\n/**\n * Creates an array of numbers from `start` to `end` with optional `step`.\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} [end] - The end number of the range (exclusive).\n * @param {number} [step] - The step value for the range.\n * @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.\n * @example\n * // Returns [0, 1, 2, 3]\n * rangeRight(4);\n * @example\n * // Returns [0, 2, 4, 6]\n * rangeRight(0, 8, 2);\n * @example\n * // Returns [5, 4, 3, 2, 1]\n * rangeRight(1, 6);\n */\nexport function rangeRight(start: number, end?: number, step?: number): number[];\n\n/**\n * Creates an array of numbers from 0 to `end` with step 1.\n * Used when called as an iteratee for methods like `_.map`.\n * @param {number} end - The end number of the range (exclusive).\n * @param {string | number} index - The index parameter (used for iteratee calls).\n * @param {object} guard - The guard parameter (used for iteratee calls).\n * @returns {number[]} An array of numbers from 0 to `end` with step 1.\n * @example\n * // Returns [0, 1, 2, 3]\n * rangeRight(4, 'index', {});\n */\nexport function rangeRight(end: number, index: string | number, guard: object): number[];\n\n/**\n * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {string | number} end - The end number of the range (exclusive).\n * @param {number | object} step - The step value for the range.\n * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with the specified `step`.\n * @throws {Error} Throws an error if the step value is not a non-zero integer.\n *\n * @example\n * // Returns [3, 2, 1, 0]\n * rangeRight(4);\n *\n * @example\n * // Returns [-3, -2, -1, 0]\n * rangeRight(0, -4, -1);\n */\nexport function rangeRight(start: number, end?: string | number, step?: number | object): number[] {\n  // Enables use as an iteratee for methods like `_.map`.\n  if (step && typeof step !== 'number' && isIterateeCall(start, end, step)) {\n    end = step = undefined;\n  }\n  start = toFinite(start);\n  if (end === undefined) {\n    end = start;\n    start = 0;\n  } else {\n    end = toFinite(end);\n  }\n  step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n\n  const length = Math.max(Math.ceil((end - start) / (step || 1)), 0);\n  const result = new Array(length);\n  for (let index = length - 1; index >= 0; index--) {\n    result[index] = start;\n    start += step;\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/compat/math/round.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { round as roundLodash } from 'lodash';\nimport { round } from './round';\n\ndescribe('round', () => {\n  it(`\\`round\\` should return a rounded number without a precision`, () => {\n    const actual = round(4.006);\n    expect(actual).toBe(4);\n  });\n\n  it(`\\`round\\` should work with a precision of \\`0\\``, () => {\n    const actual = round(4.006, 0);\n    expect(actual).toBe(4);\n  });\n\n  it(`\\`round\\` should work with a positive precision`, () => {\n    let actual = round(4.016, 2);\n    expect(actual).toBe(4.02);\n\n    actual = round(4.1, 2);\n    expect(actual).toBe(4.1);\n\n    actual = round(4.4, 2);\n    expect(actual).toBe(4.4);\n  });\n\n  it(`\\`round\\` should work with a negative precision`, () => {\n    const actual = round(4160, -2);\n    expect(actual).toBe(4200);\n  });\n\n  it(`\\`round\\` should coerce \\`precision\\` to an integer`, () => {\n    let actual = round(4.006, NaN);\n    expect(actual).toBe(4);\n\n    const expected = 4.02;\n\n    actual = round(4.016, 2.6);\n    expect(actual).toBe(expected);\n\n    // @ts-expect-error - Invalid arguments\n    actual = round(4.016, '+2');\n    expect(actual).toBe(expected);\n  });\n\n  it(`\\`round\\` should work with exponential notation and \\`precision\\``, () => {\n    let actual = round(5e1, 2);\n    expect(actual).toEqual(50);\n\n    // @ts-expect-error - Invalid arguments\n    actual = round('5e', 1);\n    expect(actual).toEqual(NaN);\n\n    // @ts-expect-error - Invalid arguments\n    actual = round('5e1e1', 1);\n    expect(actual).toEqual(NaN);\n  });\n\n  it(`\\`round\\` should preserve the sign of \\`0\\``, () => {\n    const values = [[0], [-0], ['0'], ['-0'], [0, 1], [-0, 1], ['0', 1], ['-0', 1]];\n    const expected = [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity];\n\n    // eslint-disable-next-line prefer-spread\n    const actual = values.map(args => 1 / round.apply(undefined, args as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`round\\` should not return \\`NaN\\` for large \\`precision\\` values`, () => {\n    const results = [round(10.0000001, 1000), round(Number.MAX_SAFE_INTEGER, 293)];\n\n    const expected = results.map(() => false);\n    const actual = results.map(Number.isNaN);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`round\\` should handle edge cases`, () => {\n    expect(round(1.797, 295)).toBe(1.797);\n    expect(round(1.797, -295)).toBe(0);\n    expect(round(1.792e-295, 295)).toBe(0);\n    expect(round(1.792e295, -295)).toBe(2e295);\n    expect(round(1.7976931348623157e308, 292)).toBe(NaN);\n    expect(round(5e-324, 323)).toBe(0);\n    expect(round(5e-324, -323)).toBe(0);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(round).toEqualTypeOf<typeof roundLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/round.ts",
    "content": "import { decimalAdjust } from '../_internal/decimalAdjust.ts';\n\n/**\n * Computes number rounded to precision.\n *\n * @param {number} number  The number to round.\n * @param {number} precision The precision to round to.\n * @returns {number} Returns the rounded number.\n *\n * @example\n * round(4.006); // => 4\n * round(4.006, 2); // => 4.01\n * round(4060, -2); // => 4100\n */\nexport function round(number: number, precision = 0): number {\n  return decimalAdjust('round', number, precision);\n}\n"
  },
  {
    "path": "src/compat/math/subtract.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { subtract as subtractLodash } from 'lodash';\nimport { subtract } from './subtract';\nimport { symbol } from '../_internal/symbol';\nimport { map } from '../array/map';\nimport { times } from '../util/times';\n\ndescribe('subtract', () => {\n  it('should subtract two numbers', () => {\n    expect(subtract(6, 4)).toBe(2);\n    expect(subtract(6, -4)).toBe(10);\n    expect(subtract(-6, 4)).toBe(-10);\n    expect(subtract(-6, -4)).toBe(-2);\n  });\n\n  it('should not coerce arguments to numbers', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(subtract('6', '4')).toBe(2);\n  });\n\n  it('should return the difference of two positive numbers', () => {\n    expect(subtract(1, 5)).toBe(-4);\n    expect(subtract(5, 1)).toBe(4);\n  });\n\n  it('should return the difference when both numbers are negative', () => {\n    expect(subtract(-1, -5)).toBe(4);\n    expect(subtract(-5, -1)).toBe(-4);\n  });\n\n  it('should return the difference of a negative and a positive number', () => {\n    expect(subtract(-1, 5)).toBe(-6);\n    expect(subtract(5, -1)).toBe(6);\n  });\n\n  it('should return NaN if the first value is NaN', () => {\n    expect(subtract(NaN, 10)).toBe(NaN);\n  });\n\n  it('should return NaN if the second value is NaN', () => {\n    expect(subtract(10, NaN)).toBe(NaN);\n  });\n\n  it('should return NaN if both values are NaN', () => {\n    expect(subtract(NaN, NaN)).toBe(NaN);\n  });\n\n  it(`\\`subtract\\` should return \\`0\\` when no arguments are given`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(subtract()).toBe(0);\n  });\n\n  it(`\\`subtract\\` should work with only one defined argument`, () => {\n    // @ts-expect-error - invalid arguments\n    expect(subtract(6)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(subtract(6, undefined)).toBe(6);\n    // @ts-expect-error - invalid arguments\n    expect(subtract(undefined, 4)).toBe(4);\n  });\n\n  it(`\\`subtract\\` should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      ['0', Infinity],\n      [-0, -Infinity],\n      ['-0', -Infinity],\n    ];\n\n    times(2, index => {\n      const actual = map(values, value => {\n        // @ts-expect-error - invalid arguments\n        const result = index ? subtract(undefined, value) : subtract(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`\\`subtract\\` should convert objects to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(subtract(0, {})).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(subtract({}, 0)).toEqual(NaN);\n  });\n\n  it(`\\`subtract\\` should convert symbols to \\`NaN\\``, () => {\n    // @ts-expect-error - invalid arguments\n    expect(subtract(0, symbol)).toEqual(NaN);\n    // @ts-expect-error - invalid arguments\n    expect(subtract(symbol, 0)).toEqual(NaN);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(subtract).toEqualTypeOf<typeof subtractLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/subtract.ts",
    "content": "import { toNumber } from '../util/toNumber.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Subtracts one number from another.\n *\n * If either of the numbers is `NaN`, the function returns `NaN`.\n *\n * @param {number} value The first number. (minuend)\n * @param {number} other The second number.(subtrahend)\n * @returns {number} The difference of the two numbers, or `NaN` if any input is `NaN`.\n *\n * @example\n * subtract(6, 3); // => 3\n * subtract(6, NaN); // => NaN\n * subtract(NaN, 3); // => NaN\n */\nexport function subtract(value: number, other: number): number {\n  if (value === undefined && other === undefined) {\n    return 0;\n  }\n  if (value === undefined || other === undefined) {\n    return value ?? other;\n  }\n  if (typeof value === 'string' || typeof other === 'string') {\n    value = toString(value) as any;\n    other = toString(other) as any;\n  } else {\n    value = toNumber(value);\n    other = toNumber(other);\n  }\n  return value - other;\n}\n"
  },
  {
    "path": "src/compat/math/sum.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sum as sumLodash } from 'lodash';\nimport { sum } from './sum';\nimport { empties } from '../_internal/empties';\nimport { stubZero } from '../_internal/stubZero';\n\ndescribe('sum', () => {\n  const array = [6, 4, 2];\n\n  it(`should return the sum of an array of numbers`, () => {\n    expect(sum(array)).toBe(12);\n  });\n\n  it(`should return \\`0\\` when passing empty \\`array\\` values`, () => {\n    const expected = empties.map(stubZero);\n\n    const actual = empties.map(value => sum(value as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should skip \\`undefined\\` values`, () => {\n    expect(sum([1, undefined])).toBe(1);\n    expect(sum([undefined, 1, 2, 3])).toBe(6);\n  });\n\n  it(`should not skip \\`NaN\\` values`, () => {\n    expect(sum([1, NaN])).toEqual(NaN);\n  });\n\n  it(`should not coerce values to numbers`, () => {\n    expect(sum(['1', '2'])).toBe('12');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sum).toEqualTypeOf<typeof sumLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/sum.ts",
    "content": "import { sumBy } from './sumBy.ts';\n\n/**\n * Computes the sum of the values that are returned by the `iteratee` function.\n *\n * It does not coerce values to `number`.\n *\n * @param {ArrayLike<any> | null | undefined} array - The array to iterate over.\n * @returns {number} Returns the sum.\n *\n * @example\n * sum([1, 2, 3]); // => 6\n * sum([1n, 2n, 3n]); // => 6n\n * sum([\"1\", \"2\"]); // => \"12\"\n * sum([1, undefined, 2]); // => 3\n * sum(null); // => 0\n * sum(undefined); // => 0\n */\nexport function sum(array: ArrayLike<any> | null | undefined): number {\n  return sumBy(array);\n}\n"
  },
  {
    "path": "src/compat/math/sumBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { sumBy as sumByLodash } from 'lodash';\nimport { sumBy } from './sumBy';\nimport { empties } from '../_internal/empties';\nimport { slice } from '../_internal/slice';\nimport { stubZero } from '../_internal/stubZero';\n\ndescribe('sumBy', () => {\n  const array = [6, 4, 2];\n  const objects = [{ a: 2 }, { a: 3 }, { a: 1 }];\n\n  it(`should return the sum of an array of numbers`, () => {\n    expect(sumBy(array)).toBe(12);\n  });\n\n  it(`should return \\`0\\` when passing empty \\`array\\` values`, () => {\n    const expected = empties.map(stubZero);\n\n    const actual = empties.map(value => sumBy(value as any));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should skip \\`undefined\\` values`, () => {\n    expect(sumBy([1, undefined])).toBe(1);\n  });\n\n  it(`should not skip \\`NaN\\` values`, () => {\n    expect(sumBy([1, NaN])).toEqual(NaN);\n  });\n\n  it(`should not coerce values to numbers`, () => {\n    expect(sumBy(['1', '2'])).toBe('12');\n  });\n\n  it('should work with an `iteratee`', () => {\n    const actual = sumBy(objects, object => object.a);\n\n    expect(actual).toEqual(6);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    sumBy(array, function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    } as any);\n\n    expect(args).toEqual([6]);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const arrays = [[2], [3], [1]];\n    expect(sumBy(arrays, 0 as any)).toBe(6);\n    expect(sumBy(objects, 'a' as any)).toBe(6);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(sumBy).toEqualTypeOf<typeof sumByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/math/sumBy.ts",
    "content": "import { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Computes the sum of the values that are returned by the `iteratee` function.\n *\n * It does not coerce values to `number`.\n *\n * @template T - The type of the array elements.\n * @param {ArrayLike<T> | null | undefined} array - The array to iterate over.\n * @param {((value: T) => number) | string} iteratee - The function invoked per iteration.\n * @returns {number} Returns the sum.\n *\n * @example\n * sumBy([1, undefined, 2], value => value); // => 3\n * sumBy(null); // => 0\n * sumBy(undefined); // => 0\n * sumBy([1, 2, 3]); // => 6\n * sumBy([1n, 2n, 3n]); // => 6n\n * sumBy([{ a: \"1\" }, { a: \"2\" }], object => object.a); // => \"12\"\n */\nexport function sumBy<T>(array: ArrayLike<T> | null | undefined, iteratee?: ((value: T) => number) | string): number {\n  if (!array || !array.length) {\n    return 0;\n  }\n\n  if (iteratee != null) {\n    iteratee = iterateeToolkit(iteratee);\n  }\n\n  let result: any = undefined;\n\n  for (let i = 0; i < array.length; i++) {\n    const current = iteratee ? iteratee(array[i]) : array[i];\n\n    if (current !== undefined) {\n      if (result === undefined) {\n        result = current;\n      } else {\n        result += current;\n      }\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/assign.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { assign as assignLodash } from 'lodash';\nimport { assign } from './assign';\nimport { noop } from '../../function';\n\ndescribe('assign', () => {\n  const func = assign;\n\n  it(`\\`assign\\` should assign source properties to \\`object\\``, () => {\n    expect(func({ a: 1 }, { b: 2 })).toEqual({ a: 1, b: 2 });\n  });\n\n  it(`\\`assign\\` should accept multiple sources`, () => {\n    const expected = { a: 1, b: 2, c: 3 };\n    expect(func({ a: 1 }, { b: 2 }, { c: 3 })).toEqual(expected);\n    expect(func({ a: 1 }, { b: 2, c: 2 }, { c: 3 })).toEqual(expected);\n  });\n\n  it(`\\`assign\\` should overwrite destination properties`, () => {\n    const expected = { a: 3, b: 2, c: 1 };\n    expect(func({ a: 1, b: 2 }, expected)).toEqual(expected);\n  });\n\n  it(`\\`assign\\` should assign source properties with nullish values`, () => {\n    const expected = { a: null, b: undefined, c: null };\n    expect(func({ a: 1, b: 2 }, expected)).toEqual(expected);\n  });\n\n  it(`\\`assign\\` should skip assignments if values are the same`, () => {\n    const object = {};\n\n    const descriptor = {\n      configurable: true,\n      enumerable: true,\n      set: function () {\n        throw new Error();\n      },\n    };\n\n    const source = {\n      a: 1,\n      b: undefined,\n      c: NaN,\n      d: undefined,\n      constructor: Object,\n      toString: () => 'source',\n    };\n\n    Object.defineProperty(\n      object,\n      'a',\n      Object.assign({}, descriptor, {\n        get: () => 1,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'b',\n      Object.assign({}, descriptor, {\n        get: noop,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'c',\n      Object.assign({}, descriptor, {\n        get: () => NaN,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'constructor',\n      Object.assign({}, descriptor, {\n        get: () => Object,\n      })\n    );\n\n    let actual;\n\n    try {\n      actual = func(object, source);\n    } catch (e) {\n      console.log(e);\n    }\n\n    expect(actual).toEqual(source);\n  });\n\n  it(`\\`assign\\` should treat sparse array sources as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    expect(func({}, array)).toEqual({ 0: 1, 1: undefined, 2: 3 });\n  });\n\n  it(`\\`assign\\` should assign values of prototype objects`, () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    expect(func({}, Foo.prototype)).toEqual({ a: 1 });\n  });\n\n  it(`\\`assign\\` should coerce string sources to objects`, () => {\n    expect(func({}, 'a')).toEqual({ 0: 'a' });\n  });\n\n  it(`\\`assign\\` should assign properties with undefined values correctly`, () => {\n    const values = [{ workId: undefined }, { exerciseId: '1' }];\n    const result = assign({}, ...values);\n    expect(result).toEqual({ workId: undefined, exerciseId: '1' });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(assign).toEqualTypeOf<typeof assignLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/assign.ts",
    "content": "import { keys as keysToolkit } from './keys.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Assigns properties from one source object to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source - The source object whose properties will be assigned to the target object.\n * @returns {T & U} The updated target object with properties from the source object assigned.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n * const result = assign(target, source);\n * // => { a: 1, b: 3, c: 4 }\n */\nexport function assign<T, U>(object: T, source: U): T & U;\n\n/**\n * Assigns properties from two source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @returns {T & U & V} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const result = assign(target, source1, source2);\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assign<T, U, V>(object: T, source1: U, source2: V): T & U & V;\n\n/**\n * Assigns properties from three source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @returns {T & U & V & W} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const result = assign(target, source1, source2, source3);\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assign<T, U, V, W>(object: T, source1: U, source2: V, source3: W): T & U & V & W;\n\n/**\n * Assigns properties from four source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @template X - The type of the fourth source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {X} source4 - The fourth source object whose properties will be assigned to the target object.\n * @returns {T & U & V & W & X} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const source4 = { e: 5 };\n * const result = assign(target, source1, source2, source3, source4);\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function assign<T, U, V, W, X>(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X;\n\n/**\n * Assigns properties from a target object to itself.\n *\n * @template T - The type of the target object.\n * @param {T} object - The target object.\n * @returns {T} The target object.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const result = assign(target);\n * // => { a: 1, b: 2 }\n */\nexport function assign<T>(object: T): T;\n\n/**\n * Assigns properties from multiple source objects to a target object.\n *\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} otherArgs - The source objects whose properties will be assigned to the target object.\n * @returns {any} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assign(target, { b: 2 }, { c: 3 }, { d: 4 });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assign(object: any, ...otherArgs: any[]): any;\n\n/**\n * Assigns properties from multiple source objects to a target object.\n *\n * This function merges the properties of the source objects into the target object.\n * If a property in the source objects is equal to the corresponding property in the target object,\n * it will not be overwritten.\n *\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} sources - The source objects whose properties will be assigned to the target object.\n * @returns {any} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assign(target, { b: 2 }, { c: 3 });\n * console.log(result); // Output: { a: 1, b: 2, c: 3 }\n */\nexport function assign(object: any, ...sources: any[]): any {\n  for (let i = 0; i < sources.length; i++) {\n    assignImpl(object, sources[i]);\n  }\n\n  return object;\n}\n\nfunction assignImpl(object: any, source: any): any {\n  const keys = keysToolkit(source);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    if (!(key in object) || !eq(object[key], source[key])) {\n      object[key] = source[key];\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/object/assignIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { assignIn as assignInLodash } from 'lodash';\nimport { assignIn } from './assignIn';\nimport { noop } from '../../function';\n\ndescribe('assignIn', () => {\n  const func = assignIn;\n\n  it(`\\`assignIn\\` should assign source properties to \\`object\\``, () => {\n    expect(func({ a: 1 }, { b: 2 })).toEqual({ a: 1, b: 2 });\n  });\n\n  it(`\\`assignIn\\` should accept multiple sources`, () => {\n    const expected = { a: 1, b: 2, c: 3 };\n    expect(func({ a: 1 }, { b: 2 }, { c: 3 })).toEqual(expected);\n    expect(func({ a: 1 }, { b: 2, c: 2 }, { c: 3 })).toEqual(expected);\n  });\n\n  it(`\\`assignIn\\` should overwrite destination properties`, () => {\n    const expected = { a: 3, b: 2, c: 1 };\n    expect(func({ a: 1, b: 2 }, expected)).toEqual(expected);\n  });\n\n  it(`\\`assignIn\\` should assign source properties with nullish values`, () => {\n    const expected = { a: null, b: undefined, c: null };\n    expect(func({ a: 1, b: 2 }, expected)).toEqual(expected);\n  });\n\n  it(`\\`assignIn\\` should skip assignments if values are the same`, () => {\n    const object = {};\n\n    const descriptor = {\n      configurable: true,\n      enumerable: true,\n      set: function () {\n        throw new Error();\n      },\n    };\n\n    const source = {\n      a: 1,\n      b: undefined,\n      c: NaN,\n      d: undefined,\n      constructor: Object,\n      toString: () => 'source',\n    };\n\n    Object.defineProperty(\n      object,\n      'a',\n      Object.assign({}, descriptor, {\n        get: () => 1,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'b',\n      Object.assign({}, descriptor, {\n        get: noop,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'c',\n      Object.assign({}, descriptor, {\n        get: () => NaN,\n      })\n    );\n\n    Object.defineProperty(\n      object,\n      'constructor',\n      Object.assign({}, descriptor, {\n        get: () => Object,\n      })\n    );\n\n    let actual;\n\n    try {\n      actual = func(object, source);\n    } catch (e) {\n      console.log(e);\n    }\n\n    expect(actual).toEqual(source);\n  });\n\n  it(`\\`assignIn\\` should treat sparse array sources as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    expect(func({}, array)).toEqual({ 0: 1, 1: undefined, 2: 3 });\n  });\n\n  it(`\\`assignIn\\` should assign values of prototype objects`, () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    expect(func({}, Foo.prototype)).toEqual({ a: 1 });\n  });\n\n  it(`\\`assignIn\\` should coerce string sources to objects`, () => {\n    expect(func({}, 'a')).toEqual({ 0: 'a' });\n  });\n\n  it(`\\`assignIn\\` should assign properties with undefined values correctly`, () => {\n    const values = [{ workId: undefined }, { exerciseId: '1' }];\n    const result = assignIn({}, ...values);\n    expect(result).toEqual({ workId: undefined, exerciseId: '1' });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(assignIn).toEqualTypeOf<typeof assignInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/assignIn.ts",
    "content": "import { keysIn } from './keysIn.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Assigns own and inherited properties from one source object to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source - The source object whose properties will be assigned to the target object.\n * @returns {T & U} The updated target object with properties from the source object assigned.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n * const result = assignIn(target, source);\n * // => { a: 1, b: 3, c: 4 }\n */\nexport function assignIn<T, U>(object: T, source: U): T & U;\n\n/**\n * Assigns own and inherited properties from two source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @returns {T & U & V} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const result = assignIn(target, source1, source2);\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assignIn<T, U, V>(object: T, source1: U, source2: V): T & U & V;\n\n/**\n * Assigns own and inherited properties from three source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @returns {T & U & V & W} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const result = assignIn(target, source1, source2, source3);\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assignIn<T, U, V, W>(object: T, source1: U, source2: V, source3: W): T & U & V & W;\n\n/**\n * Assigns own and inherited properties from four source objects to a target object.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @template X - The type of the fourth source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {X} source4 - The fourth source object whose properties will be assigned to the target object.\n * @returns {T & U & V & W & X} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const source4 = { e: 5 };\n * const result = assignIn(target, source1, source2, source3, source4);\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function assignIn<T, U, V, W, X>(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X;\n\n/**\n * Returns the target object as-is.\n *\n * @template T - The type of the target object.\n * @param {T} object - The target object.\n * @returns {T} The target object.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const result = assignIn(target);\n * // => { a: 1, b: 2 }\n */\nexport function assignIn<T>(object: T): T;\n\n/**\n * Assigns own and inherited properties from multiple source objects to a target object.\n *\n * @template R - The type of the result.\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} otherArgs - The source objects whose properties will be assigned to the target object.\n * @returns {R} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignIn(target, { b: 2 }, { c: 3 }, { d: 4 });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assignIn<R>(object: any, ...otherArgs: any[]): R;\n\n/**\n * Assigns properties from multiple source objects to a target object.\n *\n * This function merges the properties of the source objects into the target object,\n * including properties from the prototype chain. If a property in the source objects\n * is equal to the corresponding property in the target object, it will not be overwritten.\n *\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} sources - The source objects whose properties will be assigned to the target object.\n * @returns {any} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignIn(target, { b: 2 }, { c: 3 });\n * console.log(result); // Output: { a: 1, b: 2, c: 3 }\n */\nexport function assignIn(object: any, ...sources: any[]): any {\n  for (let i = 0; i < sources.length; i++) {\n    assignInImpl(object, sources[i]);\n  }\n\n  return object;\n}\n\nfunction assignInImpl(object: any, source: any): any {\n  const keys = keysIn(source);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    if (!(key in object) || !eq(object[key], source[key])) {\n      object[key] = source[key];\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/object/assignInWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { assignInWith as assignInWithLodash } from 'lodash';\nimport { assignInWith } from './assignInWith';\nimport { noop } from '../../function/noop';\n\ndescribe('assignInWith', () => {\n  it(`should work with a \\`customizer\\` callback`, () => {\n    const actual = assignInWith({ a: 1, b: 2 }, { a: 3, c: 3 }, (a, b) => (a === undefined ? b : a));\n\n    expect(actual).toEqual({ a: 1, b: 2, c: 3 });\n  });\n\n  it(`should work with a \\`customizer\\` that returns \\`undefined\\``, () => {\n    const expected = { a: 1 };\n    expect(assignInWith({}, expected, noop)).toEqual(expected);\n  });\n\n  it('should assign properties from a source object to a target object', () => {\n    const target = { a: 1 };\n    const source = { b: 2 };\n    const result = assignInWith(target, source);\n    expect(result).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(assignInWith).toEqualTypeOf<typeof assignInWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/assignInWith.ts",
    "content": "import { keysIn } from './keysIn.ts';\nimport { eq } from '../util/eq.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\ntype AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;\n\n/**\n * Assigns own and inherited properties from one source object to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source - The source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U} The updated target object with properties from the source object assigned.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n * const result = assignInWith(target, source, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 4 }\n */\nexport function assignInWith<T, U>(object: T, source: U, customizer: AssignCustomizer): T & U;\n\n/**\n * Assigns own and inherited properties from two source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const result = assignInWith(target, source1, source2, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assignInWith<T, U, V>(object: T, source1: U, source2: V, customizer: AssignCustomizer): T & U & V;\n\n/**\n * Assigns own and inherited properties from three source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V & W} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const result = assignInWith(target, source1, source2, source3, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assignInWith<T, U, V, W>(\n  object: T,\n  source1: U,\n  source2: V,\n  source3: W,\n  customizer: AssignCustomizer\n): T & U & V & W;\n\n/**\n * Assigns own and inherited properties from four source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @template X - The type of the fourth source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {X} source4 - The fourth source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V & W & X} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const source4 = { e: 5 };\n * const result = assignInWith(target, source1, source2, source3, source4, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function assignInWith<T, U, V, W, X>(\n  object: T,\n  source1: U,\n  source2: V,\n  source3: W,\n  source4: X,\n  customizer: AssignCustomizer\n): T & U & V & W & X;\n\n/**\n * Returns the target object as-is.\n *\n * @template T - The type of the target object.\n * @param {T} object - The target object.\n * @returns {T} The target object.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const result = assignInWith(target);\n * // => { a: 1, b: 2 }\n */\nexport function assignInWith<T>(object: T): T;\n\n/**\n * Assigns own and inherited properties from multiple source objects to a target object using a customizer function.\n *\n * @template R - The type of the result.\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} otherArgs - The source objects and customizer function.\n * @returns {R} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignInWith(target, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assignInWith<R>(object: any, ...otherArgs: any[]): R;\n\n/**\n * Assigns properties from multiple source objects to a target object.\n * You can provide a `getValueToAssign` function to determine what value will be assigned for each property.\n *\n * This function merges the properties of the source objects into the target object,\n * including properties from the prototype chain. If a property in the source objects\n * is equal to the corresponding property in the target object, it will not be overwritten.\n *\n * Unlike `assignIn`, this method accepts a `getValueToAssign` function that determines\n * the final value to be assigned to each property in the target object. The return value\n * of this function will be directly assigned to the corresponding property. This allows for\n * more precise control over how properties are merged between objects. If not provided,\n * the default behavior is equivalent to using the identity function (returning the source value).\n *\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} sources - The source objects whose properties will be assigned to the target object.\n * @returns {any} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignInWith(target, { b: 2 }, { c: 3 }, function(objValue, srcValue) {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * console.log(result); // Output: { a: 1, b: 2, c: 3 }\n */\nexport function assignInWith(object: any, ...sources: any[]): any {\n  let getValueToAssign = sources[sources.length - 1];\n\n  if (typeof getValueToAssign === 'function') {\n    sources.pop();\n  } else {\n    getValueToAssign = undefined;\n  }\n\n  for (let i = 0; i < sources.length; i++) {\n    assignInWithImpl(object, sources[i], getValueToAssign);\n  }\n\n  return object;\n}\n\nfunction assignInWithImpl(\n  object: any,\n  source: any,\n  getValueToAssign?: (objValue: any, srcValue: any, key: string, object: any, source: any) => any\n): any {\n  const keys = keysIn(source);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const objValue = object[key];\n    const srcValue = source[key];\n\n    const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;\n\n    if (!(key in object) || !eq(objValue, newValue)) {\n      object[key] = newValue;\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/object/assignWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { assignWith as assignWithLodash } from 'lodash';\nimport { assignWith } from './assignWith';\nimport { noop } from '../../function/noop';\n\ndescribe('assignWith', () => {\n  it(`should work with a \\`customizer\\` callback`, () => {\n    const actual = assignWith({ a: 1, b: 2 }, { a: 3, c: 3 }, (a, b) => (a === undefined ? b : a));\n\n    expect(actual).toEqual({ a: 1, b: 2, c: 3 });\n  });\n\n  it(`should work with a \\`customizer\\` that returns \\`undefined\\``, () => {\n    const expected = { a: 1 };\n    expect(assignWith({}, expected, noop)).toEqual(expected);\n  });\n\n  it('should assign properties from a source object to a target object', () => {\n    const target = { a: 1 };\n    const source = { b: 2 };\n    const result = assignWith(target, source);\n    expect(result).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(assignWith).toEqualTypeOf<typeof assignWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/assignWith.ts",
    "content": "import { keys as keysToolkit } from './keys.ts';\nimport { eq } from '../util/eq.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\ntype AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;\n\n/**\n * Assigns own properties from one source object to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source - The source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U} The updated target object with properties from the source object assigned.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n * const result = assignWith(target, source, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 4 }\n */\nexport function assignWith<T, U>(object: T, source: U, customizer: AssignCustomizer): T & U;\n\n/**\n * Assigns own properties from two source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const result = assignWith(target, source1, source2, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assignWith<T, U, V>(object: T, source1: U, source2: V, customizer: AssignCustomizer): T & U & V;\n\n/**\n * Assigns own properties from three source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V & W} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const result = assignWith(target, source1, source2, source3, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function assignWith<T, U, V, W>(\n  object: T,\n  source1: U,\n  source2: V,\n  source3: W,\n  customizer: AssignCustomizer\n): T & U & V & W;\n\n/**\n * Assigns own properties from four source objects to a target object using a customizer function.\n *\n * @template T - The type of the target object.\n * @template U - The type of the first source object.\n * @template V - The type of the second source object.\n * @template W - The type of the third source object.\n * @template X - The type of the fourth source object.\n * @param {T} object - The target object to which properties will be assigned.\n * @param {U} source1 - The first source object whose properties will be assigned to the target object.\n * @param {V} source2 - The second source object whose properties will be assigned to the target object.\n * @param {W} source3 - The third source object whose properties will be assigned to the target object.\n * @param {X} source4 - The fourth source object whose properties will be assigned to the target object.\n * @param {AssignCustomizer} customizer - The function to customize assigned values.\n * @returns {T & U & V & W & X} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const source4 = { e: 5 };\n * const result = assignWith(target, source1, source2, source3, source4, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function assignWith<T, U, V, W, X>(\n  object: T,\n  source1: U,\n  source2: V,\n  source3: W,\n  source4: X,\n  customizer: AssignCustomizer\n): T & U & V & W & X;\n\n/**\n * Returns the target object as-is.\n *\n * @template T - The type of the target object.\n * @param {T} object - The target object.\n * @returns {T} The target object.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const result = assignWith(target);\n * // => { a: 1, b: 2 }\n */\nexport function assignWith<T>(object: T): T;\n\n/**\n * Assigns own properties from multiple source objects to a target object using a customizer function.\n *\n * @template R - The type of the result.\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} otherArgs - The source objects and customizer function.\n * @returns {R} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignWith(target, { b: 2 }, { c: 3 }, (objValue, srcValue) => {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function assignWith<R>(object: any, ...otherArgs: any[]): R;\n\n/**\n * Assigns properties from multiple source objects to a target object.\n * You can provide a `getValueToAssign` function to determine what value will be assigned for each property.\n *\n * This function merges the properties of the source objects into the target object.\n * If a property in the source objects is equal to the corresponding property in the target object,\n * it will not be overwritten.\n *\n * Unlike `assign`, this method accepts a `getValueToAssign` function that determines\n * the final value to be assigned to each property in the target object. The return value\n * of this function will be directly assigned to the corresponding property. This allows for\n * more precise control over how properties are merged between objects. If not provided,\n * the default behavior is equivalent to using the identity function (returning the source value).\n *\n * @param {any} object - The target object to which properties will be assigned.\n * @param {...any[]} sources - The source objects whose properties will be assigned to the target object.\n * @returns {any} The updated target object with properties from the source objects assigned.\n *\n * @example\n * const target = { a: 1 };\n * const result = assignWith(target, { b: 2 }, { c: 3 }, function(objValue, srcValue) {\n *   return objValue === undefined ? srcValue : objValue;\n * });\n * console.log(result); // Output: { a: 1, b: 2, c: 3 }\n */\nexport function assignWith(object: any, ...sources: any[]): any {\n  let getValueToAssign = sources[sources.length - 1];\n\n  if (typeof getValueToAssign === 'function') {\n    sources.pop();\n  } else {\n    getValueToAssign = undefined;\n  }\n\n  for (let i = 0; i < sources.length; i++) {\n    assignWithImpl(object, sources[i], getValueToAssign);\n  }\n\n  return object;\n}\n\nfunction assignWithImpl(\n  object: any,\n  source: any,\n  getValueToAssign?: (objValue: any, srcValue: any, key: string, object: any, source: any) => any\n): any {\n  const keys = keysToolkit(source);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const objValue = object[key];\n    const srcValue = source[key];\n\n    const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;\n\n    if (!(key in object) || !eq(objValue, newValue)) {\n      object[key] = newValue;\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/object/at.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { at as atLodash } from 'lodash';\nimport { at } from './at';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport { map } from '../array/map';\nimport { reject } from '../array/reject';\nimport { isArray } from '../predicate/isArray';\nimport { constant } from '../util/constant';\n\ndescribe('at', () => {\n  const array = ['a', 'b', 'c'];\n\n  it('should return the elements corresponding to the specified keys', () => {\n    const actual = at(array, [0, 2]);\n    expect(actual).toEqual(['a', 'c']);\n  });\n\n  it('should return `undefined` for nonexistent keys', () => {\n    const actual = at(array, [2, 4, 0]);\n    expect(actual).toEqual(['c', undefined, 'a']);\n  });\n\n  it('should work with non-index keys on array values', () => {\n    const values = reject(empties, value => value === 0 || isArray(value)).concat(-1, 1.1);\n\n    const testArray = values.reduce((result: any[], value) => {\n      result[value as any] = 1;\n      return result;\n    }, []);\n\n    const expected = map(values, () => 1);\n\n    const validPaths = values.filter(\n      (value): value is PropertyKey =>\n        typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol'\n    );\n\n    const actual = at(testArray, validPaths);\n    expect(actual).toEqual(expected.slice(0, validPaths.length));\n  });\n\n  it('should return an empty array when no keys are given', () => {\n    expect(at(array)).toEqual([]);\n    expect(at(array, [], [])).toEqual([]);\n  });\n\n  it('should accept multiple key arguments', () => {\n    const actual = at(['a', 'b', 'c', 'd'], 3, 0, 2);\n    expect(actual).toEqual(['d', 'a', 'c']);\n  });\n\n  it('should work with a falsey `object` when keys are given', () => {\n    const expected = map(falsey, constant(Array(4).fill(undefined)));\n\n    const actual = map(falsey, object => {\n      try {\n        return at(object as any, 0, 1, 'pop', 'push');\n      } catch (e) {\n        return Array(4).fill(undefined);\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with an `arguments` object for `object`', () => {\n    const actual = at(args, [2, 0]);\n    expect(actual).toEqual([3, 1]);\n  });\n\n  it('should work with `arguments` object as secondary arguments', () => {\n    const actual = at([1, 2, 3, 4, 5], args as any);\n    expect(actual).toEqual([2, 3, 4]);\n  });\n\n  it('should work with an object for `object`', () => {\n    const object = { a: [{ b: { c: 3 } }, 4] };\n    const actual = at(object, ['a[0].b.c', 'a[1]']);\n    expect(actual).toEqual([3, 4]);\n  });\n\n  it('should pluck inherited property values', () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const actual = at(new (Foo as any)(), 'b');\n    expect(actual).toEqual([2]);\n  });\n\n  it('should get multiple properties of `object` by paths', () => {\n    const object = { a: [{ b: { c: 3 } }, 4] };\n\n    expect(at(object, 'a[0].b.c', 'a[1]')).toEqual([3, 4]);\n    expect(at(object, ['a[0].b.c', 'a[1]'])).toEqual([3, 4]);\n  });\n\n  it('should support deep paths', () => {\n    const object = { a: { b: 2, c: { d: 3 } } };\n\n    expect(at(object, 'a.b', 'a.c.d')).toEqual([2, 3]);\n    expect(at(object, ['a.b', 'a.c.d'])).toEqual([2, 3]);\n  });\n\n  it('should support path with array indices', () => {\n    const object = { a: { b: [1, 2, 3] } };\n\n    expect(at(object, 'a.b[0]', 'a.b[2]')).toEqual([1, 3]);\n    expect(at(object, ['a.b[0]', 'a.b[2]'])).toEqual([1, 3]);\n  });\n\n  it('should handle complex object structures', () => {\n    const object = {\n      a: [1, 2, 3],\n      b: { c: [4, 5, { d: [6, 7, { e: 8 }] }] },\n    };\n\n    expect(at(object, 'a[1]', 'b.c[2].d[2].e')).toEqual([2, 8]);\n    expect(at(object, ['a[1]', 'b.c[2].d[2].e'])).toEqual([2, 8]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(at).toEqualTypeOf<typeof atLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/at.ts",
    "content": "import { get } from './get.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isString } from '../predicate/isString.ts';\n\ntype PropertyName = string | number | symbol;\ntype Many<T> = T | readonly T[];\ntype PropertyPath = Many<PropertyName>;\n\n/**\n * Gets values at given paths from a dictionary or numeric dictionary.\n *\n * @template T - The type of the values in the dictionary.\n * @param {Record<string, T> | Record<number, T> | null | undefined} object - The dictionary to query.\n * @param {...PropertyPath[]} props - The property paths to get values for.\n * @returns {T[]} Returns an array of the picked values.\n *\n * @example\n * const object = { 'a': 1, 'b': 2, 'c': 3 };\n * at(object, 'a', 'c');\n * // => [1, 3]\n */\nexport function at<T>(object: Record<string, T> | Record<number, T> | null | undefined, ...props: PropertyPath[]): T[];\n\n/**\n * Gets values at given keys from an object.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} object - The object to query.\n * @param {...Array<Many<keyof T>>} props - The property keys to get values for.\n * @returns {Array<T[keyof T]>} Returns an array of the picked values.\n *\n * @example\n * const object = { 'a': 1, 'b': 2, 'c': 3 };\n * at(object, 'a', 'c');\n * // => [1, 3]\n */\nexport function at<T extends object>(object: T | null | undefined, ...props: Array<Many<keyof T>>): Array<T[keyof T]>;\n\n/**\n * Returns an array of values corresponding to `paths` of `object`.\n *\n * @template T - The type of the object.\n * @param {T} object - The object to iterate over.\n * @param {...(PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>)} [paths] - The property paths to pick.\n * @returns {Array<unknown>} - Returns the picked values.\n *\n * @example\n * ```js\n * const object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n * ```\n */\nexport function at<T>(object: T, ...paths: Array<PropertyKey | PropertyKey[] | ArrayLike<PropertyKey>>): unknown[] {\n  if (paths.length === 0) {\n    return [];\n  }\n\n  const allPaths: PropertyKey[] = [];\n\n  for (let i = 0; i < paths.length; i++) {\n    const path = paths[i];\n\n    if (!isArrayLike(path) || isString(path)) {\n      allPaths.push(path as PropertyKey);\n      continue;\n    }\n\n    for (let j = 0; j < path.length; j++) {\n      allPaths.push(path[j]);\n    }\n  }\n\n  const result: unknown[] = [];\n\n  for (let i = 0; i < allPaths.length; i++) {\n    result.push(get(object, allPaths[i]));\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/clone.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { clone as cloneLodash } from 'lodash';\nimport { clone } from './clone';\nimport { args } from '../_internal/args';\nimport { typedArrays } from '../_internal/typedArrays';\n\ndescribe('clone', () => {\n  it('should perform a shallow clone', () => {\n    const array = [{ a: 0 }, { b: 1 }];\n    const actual = clone(array);\n\n    expect(actual).toEqual(array);\n    expect(actual).not.toBe(array);\n    expect(actual[0]).toBe(array[0]);\n  });\n\n  it('should clone arguments objects', () => {\n    const actual = clone(args);\n\n    expect(actual).toHaveProperty('0', 1);\n    expect(actual).toHaveProperty('1', 2);\n    expect(actual).toHaveProperty('2', 3);\n    expect(actual).toHaveProperty('length', 3);\n    expect(actual).not.toBe(args);\n  });\n\n  it('should clone arguments objects with Symbol.iterator', () => {\n    const args = {\n      0: 1,\n      1: 2,\n      length: 2,\n      [Symbol.iterator]: Array.prototype[Symbol.iterator],\n    };\n\n    const actual = clone(args);\n\n    expect(actual).toHaveProperty('0', 1);\n    expect(actual).toHaveProperty('1', 2);\n    expect(actual).toHaveProperty('length', 2);\n    expect(actual[Symbol.iterator]).toBe(Array.prototype[Symbol.iterator]);\n    expect(actual).not.toBe(args);\n  });\n\n  it('should clone arrays', () => {\n    const object = ['a', ''];\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone array-like objects', () => {\n    const object = { 0: 'a', length: 1 };\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone booleans', () => {\n    const object = false;\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone boolean objects', () => {\n    const object = Object(false);\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone date objects', () => {\n    const object = new Date();\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone Foo instances', () => {\n    class Foo {}\n\n    const object = new Foo();\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone objects', () => {\n    const object = { a: 0, b: 1, c: 2 };\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone objects with object values', () => {\n    const object = { a: /a/, b: ['B'], c: { C: 1 } };\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone maps', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const actual = clone(map);\n\n    expect(actual).toEqual(map);\n    expect(actual).not.toBe(map);\n  });\n\n  it('should clone null values', () => {\n    const object = null;\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone numbers', () => {\n    const object = 0;\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone number objects', () => {\n    const object = Object(0);\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone regexes', () => {\n    const object = /a/gim;\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone sets', () => {\n    const set = new Set([1, 2]);\n\n    const actual = clone(set);\n\n    expect(actual).toEqual(set);\n    expect(actual).not.toBe(set);\n  });\n\n  it('should clone strings', () => {\n    const object = 'a';\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone string objects', () => {\n    const object = Object('a');\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n  it('should clone undefined values', () => {\n    const object = undefined;\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone array buffers', () => {\n    if (typeof ArrayBuffer === 'undefined') {\n      return;\n    }\n\n    const buffer = new ArrayBuffer(10);\n    const actual = clone(buffer);\n\n    expect(actual.byteLength).toBe(buffer.byteLength);\n    expect(actual).not.toBe(buffer);\n  });\n\n  it('should clone array buffers of various sizes', () => {\n    if (typeof ArrayBuffer === 'undefined') {\n      return;\n    }\n\n    const sizes = [0, 1, 16, 1024];\n\n    lodashStable.each(sizes, size => {\n      const buffer = new ArrayBuffer(size);\n      const actual = clone(buffer);\n\n      expect(actual.byteLength).toBe(size);\n      expect(actual).not.toBe(buffer);\n    });\n  });\n\n  it('should clone DataView objects', () => {\n    if (typeof ArrayBuffer === 'undefined' || typeof DataView === 'undefined') {\n      return;\n    }\n\n    const buffer = new ArrayBuffer(16);\n    const dataView = new DataView(buffer);\n\n    dataView.setInt8(0, 42);\n    dataView.setInt16(2, 12345, true);\n    dataView.setFloat32(4, 3.14159, true);\n    dataView.setFloat64(8, 123456789.123456, true);\n\n    const cloned = clone(dataView);\n\n    expect(cloned).not.toBe(dataView);\n    expect(cloned.buffer).not.toBe(dataView.buffer);\n    expect(cloned.byteOffset).toBe(dataView.byteOffset);\n    expect(cloned.byteLength).toBe(dataView.byteLength);\n\n    expect(cloned.getInt8(0)).toBe(42);\n    expect(cloned.getInt16(2, true)).toBe(12345);\n    expect(cloned.getFloat32(4, true)).toBeCloseTo(3.14159, 5);\n    expect(cloned.getFloat64(8, true)).toBeCloseTo(123456789.123456, 10);\n\n    dataView.setInt8(0, 100);\n    expect(cloned.getInt8(0)).toBe(42);\n  });\n\n  it('should clone DataView objects with new buffer', () => {\n    if (typeof ArrayBuffer === 'undefined' || typeof DataView === 'undefined') {\n      return;\n    }\n\n    const buffer = new ArrayBuffer(16);\n    const dataView = new DataView(buffer);\n\n    const cloned = clone(dataView);\n\n    expect(cloned).not.toBe(dataView);\n    expect(cloned.buffer).not.toBe(dataView.buffer);\n    expect(cloned.byteLength).toBe(dataView.byteLength);\n  });\n\n  it('should clone `index` and `input` array properties', () => {\n    const array = /c/.exec('abcde') || [];\n    const actual = clone(array) as any;\n\n    expect(actual.index).toBe(2);\n    expect(actual.input).toBe('abcde');\n  });\n\n  it('should clone `lastIndex` regexp property', () => {\n    const regexp = /c/g;\n    regexp.exec('abcde');\n\n    const actual = clone(regexp);\n    expect(actual.lastIndex).toBe(3);\n  });\n\n  it('should clone expando properties', () => {\n    const values = [false, true, 1, 'a'];\n    const expected = values.map(() => true);\n\n    const actual = values.map(value => {\n      const object = Object(value);\n      object.a = 1;\n      const cloned = clone(object);\n      return cloned.a === 1;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should clone prototype objects', () => {\n    class Foo {\n      b = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const actual = clone(Foo.prototype);\n\n    expect(actual instanceof Foo).toBe(false);\n    expect(actual).toEqual({ b: 2 });\n  });\n\n  it('should set the `[[Prototype]]` of a clone', () => {\n    class Foo {}\n\n    expect(clone(new Foo()) instanceof Foo).toBe(true);\n  });\n\n  it('should set the `[[Prototype]]` of a clone even when the `constructor` is incorrect', () => {\n    class Foo {}\n\n    Foo.prototype.constructor = Object;\n    expect(clone(new Foo()) instanceof Foo).toBe(true);\n    Foo.prototype.constructor = Foo;\n  });\n\n  it('should ensure `value` constructor is a function before using its `[[Prototype]]`', () => {\n    class Foo {}\n\n    Foo.prototype.constructor = null as any;\n    expect(clone(new Foo()) instanceof Foo).toBe(false);\n    Foo.prototype.constructor = Foo;\n  });\n\n  it('should handle objects with null prototype', () => {\n    const obj = Object.create(null);\n    obj.a = 1;\n    obj.b = 2;\n\n    const actual = clone(obj);\n\n    expect(actual).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should handle objects with modified prototype chain', () => {\n    function CustomProto() {}\n    CustomProto.prototype.customMethod = function () {\n      return 'custom';\n    };\n\n    const obj = Object.create(CustomProto.prototype);\n    obj.a = 1;\n\n    const actual = clone(obj);\n\n    expect(actual.a).toBe(1);\n    expect(Object.getPrototypeOf(actual)).toBe(CustomProto.prototype);\n    expect((actual as any).customMethod()).toBe('custom');\n  });\n\n  it('should clone properties that shadow those on `Object.prototype`', () => {\n    const object = {\n      constructor: Object.prototype.constructor,\n      hasOwnProperty: Object.prototype.hasOwnProperty,\n      isPrototypeOf: Object.prototype.isPrototypeOf,\n      propertyIsEnumerable: Object.prototype.propertyIsEnumerable,\n      toLocaleString: Object.prototype.toLocaleString,\n      toString: Object.prototype.toString,\n      valueOf: Object.prototype.valueOf,\n    };\n\n    const actual = clone(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone symbol properties', () => {\n    function Foo(this: any) {\n      this[Symbol.for('c')] = { c: 1 };\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      const object = { a: { b: new (Foo as any)() } } as any;\n      object[Symbol.for('a')] = { b: 1 };\n\n      const actual = clone(object) as any;\n\n      expect(actual[Symbol.for('a')]).toBe(object[Symbol.for('a')]);\n      expect(actual.a).toBe(object.a);\n      expect(actual[Symbol.for('a')]).toEqual(object[Symbol.for('a')]);\n\n      const symbols = Object.getOwnPropertySymbols(actual.a.b);\n      expect(symbols.length).toBe(1);\n      expect(symbols[0]).toBe(Symbol.for('c'));\n      expect(actual.a.b[Symbol.for('c')]).toEqual(object.a.b[Symbol.for('c')]);\n      expect(actual.a.b[symbol2]).toEqual(object.a.b[symbol2]);\n      expect(actual.a.b[symbol3]).toEqual(object.a.b[symbol3]);\n    }\n  });\n\n  it('should handle mixed enumerable and non-enumerable symbol properties', () => {\n    const enumSymbol = Symbol('enumerable');\n    const nonEnumSymbol = Symbol('non-enumerable');\n\n    const object = { a: 1 } as any;\n    object[enumSymbol] = 'visible';\n\n    Object.defineProperty(object, nonEnumSymbol, {\n      value: 'hidden',\n      enumerable: false,\n      configurable: true,\n      writable: true,\n    });\n\n    const actual = clone(object);\n\n    expect(actual.a).toBe(1);\n    expect(actual[enumSymbol]).toBe('visible');\n    expect(actual[nonEnumSymbol]).toBeUndefined();\n\n    const symbols = Object.getOwnPropertySymbols(actual);\n    expect(symbols).toContain(enumSymbol);\n    expect(symbols).not.toContain(nonEnumSymbol);\n  });\n\n  it('should clone symbol objects', () => {\n    const symbol = Symbol('a');\n    expect(clone(symbol)).toBe(symbol);\n\n    const object = Object(symbol);\n    const actual = clone(object);\n\n    expect(typeof actual).toBe('object');\n    expect(typeof actual.valueOf()).toBe('symbol');\n    expect(actual).not.toBe(object);\n  });\n\n  it('should not clone symbol primitives', () => {\n    const symbol = Symbol('a');\n    expect(clone(symbol)).toBe(symbol);\n  });\n\n  it('should not error on DOM elements', () => {\n    if (typeof document === 'undefined') {\n      return;\n    }\n\n    const element = document.createElement('div');\n\n    try {\n      expect(clone(element)).toEqual({});\n    } catch (e) {\n      expect(false).toBe(true);\n    }\n  });\n\n  it('should perform a shallow clone when used as an iteratee for methods like `_.map`', () => {\n    const expected = [{ a: [0] }, { b: [1] }];\n    const actual = expected.map(clone);\n\n    expect(actual).toEqual(expected);\n    expect(actual[0]).not.toBe(expected[0]);\n    expect(actual[0].a).toBe(expected[0].a);\n    expect(actual[1].b).toBe(expected[1].b);\n  });\n\n  lodashStable.each(typedArrays, type => {\n    it(`should clone ${type} values`, () => {\n      const Ctor = globalThis[type as keyof typeof globalThis] as any;\n\n      if (!Ctor) {\n        return;\n      }\n\n      lodashStable.times(2, index => {\n        const buffer = new ArrayBuffer(24);\n        const view = index ? new Ctor(buffer, 8, 1) : new Ctor(buffer);\n        const actual = clone(view);\n\n        expect(actual).toEqual(view);\n        expect(actual).not.toBe(view);\n        expect(actual.buffer === view.buffer).toBe(true);\n        expect(actual.byteOffset).toBe(view.byteOffset);\n        expect(actual.length).toBe(view.length);\n      });\n    });\n  });\n\n  const uncloneableObjects = [\n    'DOM elements',\n    'functions',\n    'async functions',\n    'generator functions',\n    'the Proxy constructor',\n  ];\n\n  lodashStable.each(uncloneableObjects, type => {\n    it(`should not clone ${type}`, () => {\n      let value;\n\n      if (type === 'DOM elements' && typeof document !== 'undefined') {\n        value = document.body;\n      } else if (type === 'functions') {\n        value = function () {};\n      } else if (type === 'async functions') {\n        value = async function () {};\n      } else if (type === 'generator functions') {\n        value = function* () {};\n      } else if (type === 'the Proxy constructor') {\n        value = Proxy;\n      }\n\n      if (value) {\n        const object = { a: value, b: { c: value } };\n        const actual = clone(object);\n\n        expect(actual).toEqual(object);\n        expect(actual).not.toBe(object);\n        expect(clone(value)).toEqual({});\n      }\n    });\n  });\n\n  const errorTypes = ['Error', 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError'];\n\n  lodashStable.each(errorTypes, type => {\n    it(`should not clone ${type}s`, () => {\n      const Ctor = globalThis[type as keyof typeof globalThis];\n      const value = new Ctor('error');\n\n      const object = { a: value, b: { c: value } };\n      const actual = clone(object);\n\n      expect(actual).toEqual(object);\n      expect(actual).not.toBe(object);\n      expect(clone(value)).toEqual({});\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(clone).toEqualTypeOf<typeof cloneLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/clone.ts",
    "content": "import { isPrimitive } from '../../predicate/isPrimitive.ts';\nimport { getTag } from '../_internal/getTag.ts';\nimport {\n  argumentsTag,\n  arrayBufferTag,\n  arrayTag,\n  booleanTag,\n  dataViewTag,\n  dateTag,\n  float32ArrayTag,\n  float64ArrayTag,\n  int8ArrayTag,\n  int16ArrayTag,\n  int32ArrayTag,\n  mapTag,\n  numberTag,\n  objectTag,\n  regexpTag,\n  setTag,\n  stringTag,\n  symbolTag,\n  uint8ArrayTag,\n  uint8ClampedArrayTag,\n  uint16ArrayTag,\n  uint32ArrayTag,\n} from '../_internal/tags.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\n\n/**\n * Creates a shallow clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive objs\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n */\nexport function clone<T>(obj: T): T {\n  if (isPrimitive(obj)) {\n    return obj;\n  }\n\n  const tag = getTag(obj);\n\n  if (!isCloneableObject(obj)) {\n    return {} as T;\n  }\n\n  if (isArray(obj)) {\n    const result = Array.from(obj as any) as any;\n\n    if (obj.length > 0 && typeof obj[0] === 'string' && Object.hasOwn(obj, 'index')) {\n      result.index = (obj as any).index;\n      result.input = (obj as any).input;\n    }\n\n    return result;\n  }\n\n  if (isTypedArray(obj)) {\n    const typedArray = obj as unknown as ArrayBufferView;\n    const Ctor = typedArray.constructor as any;\n    return new Ctor(typedArray.buffer, typedArray.byteOffset, (typedArray as any).length) as any;\n  }\n\n  if (tag === arrayBufferTag) {\n    return new ArrayBuffer((obj as unknown as ArrayBuffer).byteLength) as any;\n  }\n\n  if (tag === dataViewTag) {\n    const dataView = obj as unknown as DataView;\n    const buffer = dataView.buffer;\n    const byteOffset = dataView.byteOffset;\n    const byteLength = dataView.byteLength;\n\n    const clonedBuffer = new ArrayBuffer(byteLength);\n    const srcView = new Uint8Array(buffer, byteOffset, byteLength);\n    const destView = new Uint8Array(clonedBuffer);\n    destView.set(srcView);\n\n    return new DataView(clonedBuffer) as any;\n  }\n\n  if (tag === booleanTag || tag === numberTag || tag === stringTag) {\n    const Ctor = (obj as any).constructor;\n    const clone = new Ctor((obj as any).valueOf()) as any;\n\n    if (tag === stringTag) {\n      cloneStringObjectProperties(clone, obj as any);\n    } else {\n      copyOwnProperties(clone, obj as any);\n    }\n\n    return clone;\n  }\n\n  if (tag === dateTag) {\n    return new Date(Number(obj as unknown as Date)) as any;\n  }\n\n  if (tag === regexpTag) {\n    const regExp = obj as unknown as RegExp;\n    const clone = new RegExp(regExp.source, regExp.flags) as any;\n    clone.lastIndex = regExp.lastIndex;\n    return clone;\n  }\n\n  if (tag === symbolTag) {\n    return Object(Symbol.prototype.valueOf.call(obj)) as any;\n  }\n\n  if (tag === mapTag) {\n    const map = obj as unknown as Map<any, any>;\n    const result = new Map();\n\n    map.forEach((obj, key) => {\n      result.set(key, obj);\n    });\n\n    return result as unknown as T;\n  }\n\n  if (tag === setTag) {\n    const set = obj as unknown as Set<any>;\n    const result = new Set();\n\n    set.forEach(obj => {\n      result.add(obj);\n    });\n\n    return result as unknown as T;\n  }\n\n  if (tag === argumentsTag) {\n    const args = obj as any;\n    const result = {} as any;\n\n    copyOwnProperties(result, args);\n\n    result.length = args.length;\n    result[Symbol.iterator] = args[Symbol.iterator];\n\n    return result as T;\n  }\n\n  const result = {} as any;\n\n  copyPrototype(result, obj);\n  copyOwnProperties(result, obj);\n  copySymbolProperties(result, obj);\n\n  return result;\n}\n\nfunction isCloneableObject(object: any): boolean {\n  switch (getTag(object)) {\n    case argumentsTag:\n    case arrayTag:\n    case arrayBufferTag:\n    case dataViewTag:\n    case booleanTag:\n    case dateTag:\n    case float32ArrayTag:\n    case float64ArrayTag:\n    case int8ArrayTag:\n    case int16ArrayTag:\n    case int32ArrayTag:\n    case mapTag:\n    case numberTag:\n    case objectTag:\n    case regexpTag:\n    case setTag:\n    case stringTag:\n    case symbolTag:\n    case uint8ArrayTag:\n    case uint8ClampedArrayTag:\n    case uint16ArrayTag:\n    case uint32ArrayTag: {\n      return true;\n    }\n    default: {\n      return false;\n    }\n  }\n}\n\nfunction copyOwnProperties(target: any, source: any): void {\n  for (const key in source) {\n    if (Object.hasOwn(source, key)) {\n      target[key] = source[key];\n    }\n  }\n}\n\nfunction copySymbolProperties(target: any, source: any): void {\n  const symbols = Object.getOwnPropertySymbols(source);\n  for (let i = 0; i < symbols.length; i++) {\n    const symbol = symbols[i];\n    if (Object.prototype.propertyIsEnumerable.call(source, symbol)) {\n      target[symbol] = source[symbol];\n    }\n  }\n}\n\nfunction cloneStringObjectProperties(target: any, source: any): void {\n  const stringLength = source.valueOf().length;\n\n  for (const key in source) {\n    if (Object.hasOwn(source, key) && (Number.isNaN(Number(key)) || Number(key) >= stringLength)) {\n      target[key] = source[key];\n    }\n  }\n}\n\nfunction copyPrototype(target: any, source: any): void {\n  const proto = Object.getPrototypeOf(source);\n  if (proto !== null) {\n    const Ctor = source.constructor;\n    if (typeof Ctor === 'function') {\n      Object.setPrototypeOf(target, proto);\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/object/cloneDeep.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { cloneDeep as cloneDeepLodash } from 'lodash';\nimport { cloneDeep } from './cloneDeep';\nimport { range } from '../../math/range';\nimport { args } from '../_internal/args';\nimport { LARGE_ARRAY_SIZE } from '../_internal/LARGE_ARRAY_SIZE';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('cloneDeep', () => {\n  it('should deep clone objects with circular references', () => {\n    const object: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: {},\n    };\n\n    object.foo.b.c.d = object;\n    object.bar.b = object.foo.b;\n\n    const actual = cloneDeep(object);\n\n    expect(actual.bar.b).toBe(actual.foo.b);\n    expect(actual).toBe(actual.foo.b.c.d);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should deep clone objects with lots of circular references', () => {\n    const cyclical: any = {};\n\n    range(LARGE_ARRAY_SIZE + 1).forEach(index => {\n      cyclical[`v${index}`] = [index ? cyclical[`v${index - 1}`] : cyclical];\n    });\n\n    const clone = cloneDeep(cyclical);\n\n    const actual = clone[`v${LARGE_ARRAY_SIZE}`][0];\n\n    expect(actual).toBe(clone[`v${LARGE_ARRAY_SIZE - 1}`]);\n    expect(actual).not.toBe(cyclical[`v${LARGE_ARRAY_SIZE - 1}`]);\n  });\n\n  class Foo {\n    a = 1;\n    b = 1;\n\n    static c = function () {};\n  }\n  Foo.prototype.b = 1;\n\n  const map = new Map([\n    ['a', 1],\n    ['b', 2],\n  ]);\n\n  const set = new Set([1, 2]);\n\n  it(`should clone arguments objects`, () => {\n    const actual = cloneDeep(args);\n\n    // Arguments objects equality doesn't work properly in Vitest 2, so we need to check the properties manually\n    expect(actual).toHaveProperty('0', 1);\n    expect(actual).toHaveProperty('1', 2);\n    expect(actual).toHaveProperty('2', 3);\n    expect(actual).toHaveProperty('length', 3);\n    expect(actual[Symbol.iterator]).toBe(args[Symbol.iterator]);\n\n    expect(actual).not.toBe(args);\n  });\n\n  it(`should clone arrays`, () => {\n    const object = ['a', ''];\n\n    const actual = cloneDeep(['a', '']);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it(`should clone array-like objects`, () => {\n    const object = { 0: 'a', length: 1 };\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone booleans', () => {\n    const object = false;\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone boolean objects', () => {\n    const object = Object(false);\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone date objects', () => {\n    const object = new Date();\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone Foo instances', () => {\n    const object = new Foo();\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone objects', () => {\n    const object = { a: 0, b: 1, c: 2 };\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone objects with object values', () => {\n    const object = { a: /a/, b: ['B'], c: { C: 1 } };\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone maps', () => {\n    const object = map;\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone null values', () => {\n    const object = null;\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone numbers', () => {\n    const object = 0;\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone number objects', () => {\n    const object = Object(0);\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone regexes', () => {\n    const object = /a/gim;\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone sets', () => {\n    const object = set;\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone strings', () => {\n    const object = 'a';\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone string objects', () => {\n    const object = Object('a');\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone undefined values', () => {\n    const object = undefined;\n\n    const actual = cloneDeep(object);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it(`should clone array buffers`, () => {\n    const arrayBuffer = new ArrayBuffer(2);\n    const actual = cloneDeep(arrayBuffer);\n    expect(actual.byteLength).toBe(arrayBuffer.byteLength);\n    expect(actual).not.toBe(arrayBuffer);\n  });\n\n  it(`should clone buffers`, () => {\n    const buffer = Buffer.from([1, 2]);\n    const actual = cloneDeep(buffer);\n\n    expect(actual.byteLength).toBe(buffer.byteLength);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(actual.inspect()).toBe(buffer.inspect());\n    expect(actual).not.toBe(buffer);\n\n    buffer[0] = 2;\n    expect(actual[0]).toBe(2);\n  });\n\n  it(`should clone \\`index\\` and \\`input\\` array properties`, () => {\n    const array = /c/.exec('abcde');\n    const actual = cloneDeep(array);\n\n    expect(actual?.index).toBe(2);\n    expect(actual?.input).toBe('abcde');\n  });\n\n  it(`should clone \\`lastIndex\\` regexp property`, () => {\n    const regexp = /c/g;\n    regexp.exec('abcde');\n\n    expect(cloneDeep(regexp).lastIndex).toBe(3);\n  });\n\n  it(`should clone expando properties`, () => {\n    const values = [false, true, 1, 'a'].map(value => {\n      const object = Object(value);\n      object.a = 1;\n      return object;\n    });\n\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => {\n      return cloneDeep(value).a === 1;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(cloneDeep).toEqualTypeOf<typeof cloneDeepLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/cloneDeep.ts",
    "content": "import { cloneDeepWith } from './cloneDeepWith.ts';\n\n/**\n * Creates a deep clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an array with nested objects\n * const arr = [1, { a: 1 }, [1, 2, 3]];\n * const clonedArr = clone(arr);\n * arr[1].a = 2;\n * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]\n * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an object with nested objects\n * const obj = { a: 1, b: { c: 1 } };\n * const clonedObj = clone(obj);\n * obj.b.c = 2;\n * console.log(obj); // { a: 1, b: { c: 2 } }\n * console.log(clonedObj); // { a: 1, b: { c: 1 } }\n * console.log(clonedObj === obj); // false\n */\nexport function cloneDeep<T>(obj: T): T {\n  return cloneDeepWith(obj);\n}\n"
  },
  {
    "path": "src/compat/object/cloneDeepWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { cloneDeepWith as cloneDeepWithLodash } from 'lodash';\nimport { cloneDeepWith } from './cloneDeepWith';\nimport { noop } from '../../function/noop';\nimport { args } from '../_internal/args';\nimport { last } from '../array/last';\nimport { isPlainObject } from '../predicate/isPlainObject';\n\ndescribe('cloneDeepWith', function () {\n  function Foo(this: any) {\n    this.a = 1;\n  }\n  Foo.prototype.b = 1;\n  Foo.c = function () {};\n\n  const map = new Map();\n  map.set('a', 1);\n  map.set('b', 2);\n\n  const set = new Set();\n  set.add(1);\n  set.add(2);\n\n  const objects = {\n    '`arguments` objects': args,\n    arrays: ['a', ''],\n    'array-like objects': { 0: 'a', length: 1 },\n    booleans: false,\n    'boolean objects': Object(false),\n    'date objects': new Date(),\n    // eslint-disable-next-line\n    // @ts-ignore\n    'Foo instances': new Foo(),\n    objects: { a: 0, b: 1, c: 2 },\n    'objects with object values': { a: /a/, b: ['B'], c: { C: 1 } },\n    maps: map,\n    'null values': null,\n    numbers: 0,\n    'number objects': Object(0),\n    regexes: /a/gim,\n    sets: set,\n    strings: 'a',\n    'string objects': Object('a'),\n    'undefined values': undefined,\n  };\n\n  objects.arrays.length = 3;\n\n  const uncloneable: any = {\n    functions: Foo,\n    'async functions': async function () {},\n    'generator functions': function* () {},\n    'the `Proxy` constructor': Proxy,\n  };\n\n  const errors = [\n    new Error(),\n    new EvalError(),\n    new RangeError(),\n    new ReferenceError(),\n    new SyntaxError(),\n    new TypeError(),\n    new URIError(),\n  ];\n\n  errors.forEach(error => {\n    uncloneable[`${error.name}s`] = error;\n  });\n\n  it('`_.cloneDeepWith` should provide `stack` to `customizer`', () => {\n    let actual: any;\n\n    cloneDeepWith({ a: 1 }, function () {\n      // eslint-disable-next-line prefer-rest-params\n      actual = last(arguments);\n    });\n\n    expect(actual instanceof Map).toBe(true);\n  });\n\n  const methodName = 'cloneDeepWith';\n  const func = cloneDeepWith;\n\n  it(`\\`_.${methodName}\\` should provide correct \\`customizer\\` arguments`, () => {\n    const argsList: any[] = [];\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object: any = new Foo();\n\n    func(object, function () {\n      const length = arguments.length;\n      // eslint-disable-next-line prefer-rest-params\n      const args = Array.prototype.slice.call(arguments, 0, length - (length > 1 ? 1 : 0));\n\n      argsList.push(args);\n    });\n\n    expect(argsList).toEqual([\n      [object, undefined, object],\n      [1, 'a', object],\n    ]);\n  });\n\n  it(`\\`_.${methodName}\\` should handle cloning when \\`customizer\\` returns \\`undefined\\``, () => {\n    const actual = func({ a: { b: 'c' } }, noop);\n    expect(actual).toEqual({ a: { b: 'c' } });\n  });\n\n  it(`\\`_.${methodName}\\` should handle cloning when \\`customizer\\` returns \\`null\\``, () => {\n    const actual = func({ a: 1, b: 2 }, (_value, key) => (key === 'b' ? null : undefined));\n    expect(actual).toEqual({ a: 1, b: null });\n  });\n\n  Object.entries(uncloneable).forEach(([value, key]) => {\n    it(`\\`_.${methodName}\\` should work with a \\`customizer\\` callback and ${key}`, () => {\n      const customizer = function (value: any) {\n        return isPlainObject(value) ? undefined : value;\n      };\n\n      let actual: any = func(value, customizer);\n      expect(actual).toBe(value);\n\n      const object = { a: value, b: { c: value } };\n      actual = func(object, customizer);\n\n      expect(actual).toEqual(object);\n      expect(actual).not.toBe(object);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(cloneDeepWith).toEqualTypeOf<typeof cloneDeepWithLodash>();\n  });\n\n  it('should clone objects created with Object.create(null) as regular objects with Object.prototype', () => {\n    const nullProtoObj = Object.create(null);\n    nullProtoObj.a = 1;\n    nullProtoObj.b = 'test';\n\n    const cloned = cloneDeepWith(nullProtoObj);\n\n    expect(Object.getPrototypeOf(cloned)).toBe(Object.prototype);\n    expect(cloned.toString).toBe(Object.prototype.toString);\n\n    expect(cloned.a).toBe(1);\n    expect(cloned.b).toBe('test');\n\n    expect(cloned).not.toBe(nullProtoObj);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/cloneDeepWith.ts",
    "content": "import { cloneDeepWith as cloneDeepWithToolkit } from '../../object/cloneDeepWith.ts';\nimport { copyProperties } from '../../object/cloneDeepWith.ts';\nimport { getTag } from '../_internal/getTag.ts';\nimport { argumentsTag, booleanTag, numberTag, objectTag, stringTag } from '../_internal/tags.ts';\n\ntype CloneDeepWithCustomizer<TObject> = (\n  value: any,\n  key: number | string | undefined,\n  object: TObject | undefined,\n  stack: any\n) => any;\n\n/**\n * Creates a deep clone of the given value using a customizer function.\n *\n * @template T - The type of the value.\n * @param {T} value - The value to clone.\n * @param {CloneDeepWithCustomizer<T>} customizer - A function to customize the cloning process.\n * @returns {any} - A deep clone of the given value.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * const clonedObj = cloneDeepWith(obj, (value) => {\n *   if (typeof value === 'number') {\n *     return value * 2;\n *   }\n * });\n * // => { a: 2, b: 4 }\n */\nexport function cloneDeepWith<T>(value: T, customizer: CloneDeepWithCustomizer<T>): any;\n\n/**\n * Creates a deep clone of the given value.\n *\n * @template T - The type of the value.\n * @param {T} value - The value to clone.\n * @returns {T} - A deep clone of the given value.\n *\n * @example\n * const obj = { a: 1, b: { c: 2 } };\n * const clonedObj = cloneDeepWith(obj);\n * // => { a: 1, b: { c: 2 } }\n */\nexport function cloneDeepWith<T>(value: T): T;\n\n/**\n * Creates a deep clone of the given object using a customizer function.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @param {Function} [cloneValue] - A function to customize the cloning process.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive value\n * const num = 29;\n * const clonedNum = cloneDeepWith(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an object with a customizer\n * const obj = { a: 1, b: 2 };\n * const clonedObj = cloneDeepWith(obj, (value) => {\n *   if (typeof value === 'number') {\n *     return value * 2; // Double the number\n *   }\n * });\n * console.log(clonedObj); // { a: 2, b: 4 }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an array with a customizer\n * const arr = [1, 2, 3];\n * const clonedArr = cloneDeepWith(arr, (value) => {\n *   return value + 1; // Increment each value\n * });\n * console.log(clonedArr); // [2, 3, 4]\n * console.log(clonedArr === arr); // false\n */\nexport function cloneDeepWith<T>(obj: T, customizer?: CloneDeepWithCustomizer<T>): any | T {\n  return cloneDeepWithToolkit(obj, (value, key, object, stack) => {\n    const cloned = customizer?.(value, key as any, object, stack);\n\n    if (cloned !== undefined) {\n      return cloned;\n    }\n\n    if (typeof obj !== 'object') {\n      return undefined;\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    if (getTag(obj) === objectTag && typeof obj.constructor !== 'function') {\n      const result = {};\n      stack.set(obj, result);\n      copyProperties(result, obj, object, stack);\n      return result;\n    }\n\n    switch (Object.prototype.toString.call(obj)) {\n      case numberTag:\n      case stringTag:\n      case booleanTag: {\n        // eslint-disable-next-line\n        // @ts-ignore\n        const result = new obj.constructor(obj?.valueOf()) as T;\n        copyProperties(result, obj);\n        return result;\n      }\n\n      case argumentsTag: {\n        const result = {} as any;\n\n        copyProperties(result, obj);\n\n        // eslint-disable-next-line\n        // @ts-ignore\n        result.length = obj.length;\n        // eslint-disable-next-line\n        // @ts-ignore\n        result[Symbol.iterator] = obj[Symbol.iterator];\n\n        return result as T;\n      }\n\n      default: {\n        return undefined;\n      }\n    }\n  });\n}\n"
  },
  {
    "path": "src/compat/object/cloneWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { cloneWith as cloneWithLodash } from 'lodash';\nimport { cloneWith } from './cloneWith';\nimport { noop } from '../../function/noop';\nimport { args } from '../_internal/args';\nimport { slice } from '../_internal/slice';\nimport { typedArrays } from '../_internal/typedArrays';\n\ndescribe('cloneWith', () => {\n  it('should provide the correct `customizer` arguments', () => {\n    const argsList: any[] = [];\n\n    class Foo {}\n    const object = new Foo();\n\n    cloneWith(object, function () {\n      const length = arguments.length;\n      // eslint-disable-next-line prefer-rest-params\n      const args = slice.call(arguments, 0, length - (length > 1 ? 1 : 0));\n      argsList.push(args);\n    });\n\n    expect(argsList).toEqual([[object]]);\n  });\n\n  it('should handle cloning when `customizer` returns `undefined`', () => {\n    const actual = cloneWith({ a: { b: 'c' } }, noop);\n    expect(actual).toEqual({ a: { b: 'c' } });\n  });\n\n  it('should clone a plain object when `customizer` returns `undefined`', () => {\n    const object = { a: 1, b: 2 };\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone an array when `customizer` returns `undefined`', () => {\n    const array = [1, 2, 3];\n    const actual = cloneWith(array, noop);\n\n    expect(actual).toEqual(array);\n    expect(actual).not.toBe(array);\n  });\n\n  it('should perform a shallow clone when `customizer` returns `undefined`', () => {\n    const object = { a: [1, 2, 3] };\n    const actual = cloneWith(object, noop) as any;\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n    expect(actual.a).toBe(object.a);\n  });\n\n  it('should accept a customizer callback', () => {\n    const customizer = (value: any) => {\n      if (lodashStable.isPlainObject(value)) {\n        return { value: 'replaced' };\n      }\n    };\n\n    const object = { a: 1, b: 2 };\n    const actual1 = cloneWith(object, customizer);\n    expect(actual1).toEqual({ value: 'replaced' });\n\n    const array = [1, 2, 3];\n    const actual2 = cloneWith(array, customizer);\n    expect(actual2).toEqual(array);\n    expect(actual2).not.toBe(array);\n\n    const nestedObject = { a: { b: 1 }, c: [1, 2] };\n    const actual3 = cloneWith(nestedObject, customizer);\n    expect(actual3).toEqual({ value: 'replaced' });\n  });\n\n  it('should handle customizer returning primitives', () => {\n    const customizer = (value: any) => {\n      if (typeof value === 'number') {\n        return value * 2;\n      }\n      if (typeof value === 'string') {\n        return value.toUpperCase();\n      }\n    };\n\n    expect(cloneWith(42, customizer)).toBe(84);\n    expect(cloneWith('hello', customizer)).toBe('HELLO');\n    expect(cloneWith(true, customizer)).toBe(true);\n  });\n\n  it('should clone arguments objects with customizer', () => {\n    const customizer = (value: any) => {\n      if (lodashStable.isArguments(value)) {\n        return ['replaced'];\n      }\n    };\n\n    const actual = cloneWith(args, customizer);\n    expect(actual).toEqual(['replaced']);\n  });\n\n  it('should clone date objects with customizer', () => {\n    const date = new Date();\n    const customizer = (value: any) => {\n      if (lodashStable.isDate(value)) {\n        return new Date(2000, 0, 1);\n      }\n    };\n\n    const actual = cloneWith(date, customizer);\n    expect(actual).toEqual(new Date(2000, 0, 1));\n  });\n\n  it('should provide correct arguments to customizer in array values', () => {\n    const argsList: any[] = [];\n    const array = [1, 2, 3];\n\n    cloneWith(array, function () {\n      const length = arguments.length;\n      // eslint-disable-next-line prefer-rest-params\n      argsList.push(slice.call(arguments, 0, length - (length > 1 ? 1 : 0)));\n    });\n\n    expect(argsList[0]).toEqual([array]);\n  });\n\n  it('should work with a function customizer', () => {\n    const customizer = function (value: any) {\n      return lodashStable.isPlainObject(value) ? undefined : value;\n    };\n\n    const actual = cloneWith({ a: { b: 'c' } }, customizer);\n    expect(actual).toEqual({ a: { b: 'c' } });\n  });\n\n  it('should clone objects with a customizer that returns a primitive', () => {\n    const customizer = function (value: any) {\n      if (lodashStable.isPlainObject(value)) {\n        return 42;\n      }\n    };\n\n    const actual = cloneWith({ a: { b: 'c' } }, customizer);\n    expect(actual).toBe(42);\n  });\n\n  it('should clone arguments objects when customizer returns undefined', () => {\n    const actual = cloneWith(args, noop);\n\n    expect(actual).toHaveProperty('0', 1);\n    expect(actual).toHaveProperty('1', 2);\n    expect(actual).toHaveProperty('2', 3);\n    expect(actual).toHaveProperty('length', 3);\n    expect(actual).not.toBe(args);\n  });\n\n  it('should clone arguments objects with Symbol.iterator when customizer returns undefined', () => {\n    const args = {\n      0: 1,\n      1: 2,\n      length: 2,\n      [Symbol.iterator]: Array.prototype[Symbol.iterator],\n    };\n\n    const actual = cloneWith(args, noop) as any;\n\n    expect(actual).toHaveProperty('0', 1);\n    expect(actual).toHaveProperty('1', 2);\n    expect(actual).toHaveProperty('length', 2);\n    expect(actual[Symbol.iterator]).toBe(Array.prototype[Symbol.iterator]);\n    expect(actual).not.toBe(args);\n  });\n\n  it('should clone array-like objects when customizer returns undefined', () => {\n    const object = { 0: 'a', length: 1 };\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone booleans when customizer returns undefined', () => {\n    const object = false;\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone boolean objects when customizer returns undefined', () => {\n    const object = Object(false);\n    const customizer = () => undefined;\n    const actual = cloneWith(object, customizer);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone date objects when customizer returns undefined', () => {\n    const object = new Date();\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone Foo instances when customizer returns undefined', () => {\n    class Foo {}\n\n    const object = new Foo();\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone objects with object values when customizer returns undefined', () => {\n    const object = { a: /a/, b: ['B'], c: { C: 1 } };\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone maps when customizer returns undefined', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const actual = cloneWith(map, noop);\n\n    expect(actual).toEqual(map);\n    expect(actual).not.toBe(map);\n  });\n\n  it('should clone null values even with customizer', () => {\n    const object = null;\n    const customizer = () => undefined;\n    const actual = cloneWith(object, customizer);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone number objects when customizer returns undefined', () => {\n    const object = Object(0);\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone regexes when customizer returns undefined', () => {\n    const object = /a/gim;\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone sets when customizer returns undefined', () => {\n    const set = new Set([1, 2]);\n\n    const actual = cloneWith(set, noop);\n\n    expect(actual).toEqual(set);\n    expect(actual).not.toBe(set);\n  });\n\n  it('should clone string objects when customizer returns undefined', () => {\n    const object = Object('a');\n    const customizer = () => undefined;\n    const actual = cloneWith(object, customizer);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n    expect(typeof actual).toBe('object');\n  });\n\n  it('should clone undefined values even with customizer', () => {\n    const object = undefined;\n    const customizer = () => undefined;\n    const actual = cloneWith(object, customizer);\n\n    expect(actual).toEqual(object);\n    expect(actual).toBe(object);\n  });\n\n  it('should clone array buffers when customizer returns undefined', () => {\n    if (typeof ArrayBuffer === 'undefined') {\n      return;\n    }\n\n    const buffer = new ArrayBuffer(10);\n    const actual = cloneWith(buffer, noop) as any;\n\n    expect(actual.byteLength).toBe(buffer.byteLength);\n    expect(actual).not.toBe(buffer);\n  });\n\n  it('should clone array buffers of various sizes when customizer returns undefined', () => {\n    if (typeof ArrayBuffer === 'undefined') {\n      return;\n    }\n\n    const sizes = [0, 1, 16, 1024];\n\n    lodashStable.each(sizes, size => {\n      const buffer = new ArrayBuffer(size);\n      const actual = cloneWith(buffer, noop) as any;\n\n      expect(actual.byteLength).toBe(size);\n      expect(actual).not.toBe(buffer);\n    });\n  });\n\n  it('should clone DataView objects when customizer returns undefined', () => {\n    if (typeof ArrayBuffer === 'undefined' || typeof DataView === 'undefined') {\n      return;\n    }\n\n    const buffer = new ArrayBuffer(16);\n    const dataView = new DataView(buffer);\n\n    dataView.setInt8(0, 42);\n    dataView.setInt16(2, 12345, true);\n    dataView.setFloat32(4, 3.14159, true);\n    dataView.setFloat64(8, 123456789.123456, true);\n\n    const cloned = cloneWith(dataView, noop) as any;\n\n    expect(cloned).not.toBe(dataView);\n    expect(cloned.buffer).not.toBe(dataView.buffer);\n    expect(cloned.byteOffset).toBe(dataView.byteOffset);\n    expect(cloned.byteLength).toBe(dataView.byteLength);\n\n    expect(cloned.getInt8(0)).toBe(42);\n    expect(cloned.getInt16(2, true)).toBe(12345);\n    expect(cloned.getFloat32(4, true)).toBeCloseTo(3.14159, 5);\n    expect(cloned.getFloat64(8, true)).toBeCloseTo(123456789.123456, 10);\n\n    dataView.setInt8(0, 100);\n    expect(cloned.getInt8(0)).toBe(42);\n  });\n\n  it('should clone `index` and `input` array properties when customizer returns undefined', () => {\n    const array = /c/.exec('abcde') || [];\n    const actual = cloneWith(array, noop) as any;\n\n    expect(actual.index).toBe(2);\n    expect(actual.input).toBe('abcde');\n  });\n\n  it('should clone `lastIndex` regexp property when customizer returns undefined', () => {\n    const regexp = /c/g;\n    regexp.exec('abcde');\n\n    const actual = cloneWith(regexp, noop) as any;\n    expect(actual.lastIndex).toBe(3);\n  });\n\n  it('should clone expando properties when customizer returns undefined', () => {\n    const values = [false, true, 1, 'a'];\n    const expected = values.map(() => true);\n\n    const actual = values.map(value => {\n      const object = Object(value);\n      object.a = 1;\n      const cloned = cloneWith(object, noop);\n      return cloned.a === 1;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should clone prototype objects when customizer returns undefined', () => {\n    class Foo {\n      b = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const actual = cloneWith(Foo.prototype, noop);\n\n    expect(actual instanceof Foo).toBe(false);\n    expect(actual).toEqual({ b: 2 });\n  });\n\n  it('should set the `[[Prototype]]` of a clone when customizer returns undefined', () => {\n    class Foo {}\n\n    expect(cloneWith(new Foo(), noop) instanceof Foo).toBe(true);\n  });\n\n  it('should set the `[[Prototype]]` of a clone even when the `constructor` is incorrect and customizer returns undefined', () => {\n    class Foo {}\n\n    Foo.prototype.constructor = Object;\n    expect(cloneWith(new Foo(), noop) instanceof Foo).toBe(true);\n    Foo.prototype.constructor = Foo;\n  });\n\n  it('should ensure `value` constructor is a function before using its `[[Prototype]]` when customizer returns undefined', () => {\n    class Foo {}\n\n    Foo.prototype.constructor = null as any;\n    expect(cloneWith(new Foo(), noop) instanceof Foo).toBe(false);\n    Foo.prototype.constructor = Foo;\n  });\n\n  it('should handle objects with null prototype when customizer returns undefined', () => {\n    const obj = Object.create(null);\n    obj.a = 1;\n    obj.b = 2;\n\n    const actual = cloneWith(obj, noop);\n\n    expect(actual).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should handle objects with modified prototype chain when customizer returns undefined', () => {\n    function CustomProto() {}\n    CustomProto.prototype.customMethod = function () {\n      return 'custom';\n    };\n\n    const obj = Object.create(CustomProto.prototype);\n    obj.a = 1;\n\n    const actual = cloneWith(obj, noop);\n\n    expect(actual.a).toBe(1);\n    expect(Object.getPrototypeOf(actual)).toBe(CustomProto.prototype);\n    expect((actual as any).customMethod()).toBe('custom');\n  });\n\n  it('should clone properties that shadow those on `Object.prototype` when customizer returns undefined', () => {\n    const object = {\n      constructor: Object.prototype.constructor,\n      hasOwnProperty: Object.prototype.hasOwnProperty,\n      isPrototypeOf: Object.prototype.isPrototypeOf,\n      propertyIsEnumerable: Object.prototype.propertyIsEnumerable,\n      toLocaleString: Object.prototype.toLocaleString,\n      toString: Object.prototype.toString,\n      valueOf: Object.prototype.valueOf,\n    };\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual).toEqual(object);\n    expect(actual).not.toBe(object);\n  });\n\n  it('should clone symbol properties when customizer returns undefined', () => {\n    function Foo(this: any) {\n      this[Symbol.for('c')] = { c: 1 };\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      const object = { a: { b: new (Foo as any)() } } as any;\n      object[Symbol.for('a')] = { b: 1 };\n\n      const actual = cloneWith(object, noop) as any;\n\n      expect(actual[Symbol.for('a')]).toBe(object[Symbol.for('a')]);\n      expect(actual.a).toBe(object.a);\n      expect(actual[Symbol.for('a')]).toEqual(object[Symbol.for('a')]);\n\n      const symbols = Object.getOwnPropertySymbols(actual.a.b);\n      expect(symbols.length).toBe(1);\n      expect(symbols[0]).toBe(Symbol.for('c'));\n      expect(actual.a.b[Symbol.for('c')]).toEqual(object.a.b[Symbol.for('c')]);\n      expect(actual.a.b[symbol2]).toEqual(object.a.b[symbol2]);\n      expect(actual.a.b[symbol3]).toEqual(object.a.b[symbol3]);\n    }\n  });\n\n  it('should handle mixed enumerable and non-enumerable symbol properties when customizer returns undefined', () => {\n    const enumSymbol = Symbol('enumerable');\n    const nonEnumSymbol = Symbol('non-enumerable');\n\n    const object = { a: 1 } as any;\n    object[enumSymbol] = 'visible';\n\n    Object.defineProperty(object, nonEnumSymbol, {\n      value: 'hidden',\n      enumerable: false,\n      configurable: true,\n      writable: true,\n    });\n\n    const actual = cloneWith(object, noop);\n\n    expect(actual.a).toBe(1);\n    expect(actual[enumSymbol]).toBe('visible');\n    expect(actual[nonEnumSymbol]).toBeUndefined();\n\n    const symbols = Object.getOwnPropertySymbols(actual);\n    expect(symbols).toContain(enumSymbol);\n    expect(symbols).not.toContain(nonEnumSymbol);\n  });\n\n  it('should clone symbol objects when customizer returns undefined', () => {\n    const symbol = Symbol('a');\n    expect(cloneWith(symbol, noop)).toBe(symbol);\n\n    const object = Object(symbol);\n    const actual = cloneWith(object, noop);\n\n    expect(typeof actual).toBe('object');\n    expect(typeof actual.valueOf()).toBe('symbol');\n    expect(actual).not.toBe(object);\n  });\n\n  it('should not clone symbol primitives when customizer returns undefined', () => {\n    const symbol = Symbol('a');\n    expect(cloneWith(symbol, noop)).toBe(symbol);\n  });\n\n  it('should not error on DOM elements when customizer returns undefined', () => {\n    if (typeof document === 'undefined') {\n      return;\n    }\n\n    const element = document.createElement('div');\n\n    try {\n      expect(cloneWith(element, noop)).toEqual({});\n    } catch (e) {\n      expect(false).toBe(true);\n    }\n  });\n\n  it('should perform a shallow clone when used as an iteratee for methods like `_.map` and customizer returns undefined', () => {\n    const expected = [{ a: [0] }, { b: [1] }];\n    const customizer = () => undefined;\n    const actual = expected.map(obj => cloneWith(obj, customizer)) as any;\n\n    expect(actual).toEqual(expected);\n    expect(actual[0]).not.toBe(expected[0]);\n    expect(actual[0].a).toBe(expected[0].a);\n    expect(actual[1].b).toBe(expected[1].b);\n  });\n\n  lodashStable.each(typedArrays, type => {\n    it(`should clone ${type} values when customizer returns undefined`, () => {\n      const Ctor = globalThis[type as keyof typeof globalThis] as any;\n\n      if (!Ctor) {\n        return;\n      }\n\n      lodashStable.times(2, index => {\n        const buffer = new ArrayBuffer(24);\n        const view = index ? new Ctor(buffer, 8, 1) : new Ctor(buffer);\n        const actual = cloneWith(view, noop);\n\n        expect(actual).toEqual(view);\n        expect(actual).not.toBe(view);\n        expect(actual.buffer === view.buffer).toBe(true);\n        expect(actual.byteOffset).toBe(view.byteOffset);\n        expect(actual.length).toBe(view.length);\n      });\n    });\n  });\n\n  const uncloneableObjects = [\n    'DOM elements',\n    'functions',\n    'async functions',\n    'generator functions',\n    'the Proxy constructor',\n  ];\n\n  lodashStable.each(uncloneableObjects, type => {\n    it(`should not clone ${type} when customizer returns undefined`, () => {\n      let value;\n\n      if (type === 'DOM elements' && typeof document !== 'undefined') {\n        value = document.body;\n      } else if (type === 'functions') {\n        value = function () {};\n      } else if (type === 'async functions') {\n        value = async function () {};\n      } else if (type === 'generator functions') {\n        value = function* () {};\n      } else if (type === 'the Proxy constructor') {\n        value = Proxy;\n      }\n\n      if (value) {\n        const object = { a: value, b: { c: value } };\n        const actual = cloneWith(object, noop);\n\n        expect(actual).toEqual(object);\n        expect(actual).not.toBe(object);\n        expect(cloneWith(value, noop)).toEqual({});\n      }\n    });\n  });\n\n  const errorTypes = ['Error', 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError'];\n\n  lodashStable.each(errorTypes, type => {\n    it(`should not clone ${type}s when customizer returns undefined`, () => {\n      const Ctor = globalThis[type as keyof typeof globalThis];\n      const value = new Ctor('error');\n\n      const object = { a: value, b: { c: value } };\n      const actual = cloneWith(object, noop);\n\n      expect(actual).toEqual(object);\n      expect(actual).not.toBe(object);\n      expect(cloneWith(value, noop)).toEqual({});\n    });\n  });\n\n  it('should handle customizer with return values for custom types', () => {\n    class CustomType {\n      value: number;\n      constructor(value: number) {\n        this.value = value;\n      }\n    }\n\n    const customizer = (value: any) => {\n      if (value instanceof CustomType) {\n        return new CustomType(value.value * 2);\n      }\n    };\n\n    const original = new CustomType(5);\n    const cloned = cloneWith(original, customizer);\n\n    expect(cloned).not.toBe(original);\n    expect(cloned instanceof CustomType).toBe(true);\n    expect((cloned as CustomType).value).toBe(10);\n  });\n\n  it('should customize only the top level value', () => {\n    const customizer = (value: any) => {\n      if (typeof value === 'number') {\n        return value * 2;\n      }\n    };\n\n    const obj = {\n      num: 42,\n      str: 'test',\n    };\n\n    const result = cloneWith(obj, customizer) as any;\n\n    expect(result.num).toBe(42);\n    expect(result.str).toBe('test');\n    expect(result).not.toBe(obj);\n  });\n\n  it('should apply customizer to objects with custom tags', () => {\n    if (typeof Map === 'undefined') {\n      return;\n    }\n\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const customizer = (value: any) => {\n      if (value instanceof Map) {\n        const newMap = new Map();\n        value.forEach((val, key) => {\n          newMap.set(key.toUpperCase(), val * 10);\n        });\n        return newMap;\n      }\n    };\n\n    const result = cloneWith(map, customizer);\n\n    expect(result).not.toBe(map);\n    expect(result.get('A')).toBe(10);\n    expect(result.get('B')).toBe(20);\n    expect(result.get('a')).toBeUndefined();\n  });\n\n  it('should allow returning null from customizer', () => {\n    const obj = { a: 1, b: 2 };\n\n    const customizer = () => null;\n\n    const result = cloneWith(obj, customizer);\n    expect(result).toBe(null);\n  });\n\n  it('should apply customizer only to the top level value', () => {\n    const obj = {\n      a: 1,\n      b: 'keep',\n      c: { nested: true },\n    };\n\n    const customizer = (value: any) => {\n      if (typeof value === 'object' && value !== null) {\n        return { modified: true };\n      }\n    };\n\n    const result = cloneWith(obj, customizer);\n\n    expect(result).toEqual({ modified: true });\n  });\n\n  it('should use clone when customizer is not provided', () => {\n    const obj = { a: 1, b: 2 };\n\n    const result = cloneWith(obj);\n\n    expect(result).toEqual(obj);\n    expect(result).not.toBe(obj);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(cloneWith).toEqualTypeOf<typeof cloneWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/cloneWith.ts",
    "content": "import { clone } from './clone.ts';\n\ntype CloneWithCustomizer<T, R> = (value: T, key: number | string | undefined, object: any, stack: any) => R;\n\n/**\n * Creates a shallow clone of a value with customizer that returns a specific result type.\n *\n * @template T - The type of the value to clone.\n * @template R - The result type extending primitive types or objects.\n * @param {T} value - The value to clone.\n * @param {CloneWithCustomizer<T, R>} customizer - The function to customize cloning.\n * @returns {R} Returns the cloned value.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * const cloned = cloneWith(obj, (value) => {\n *   if (typeof value === 'object') {\n *     return JSON.parse(JSON.stringify(value));\n *   }\n * });\n * // => { a: 1, b: 2 }\n */\nexport function cloneWith<T, R extends object | string | number | boolean | null>(\n  value: T,\n  customizer: CloneWithCustomizer<T, R>\n): R;\n\n/**\n * Creates a shallow clone of a value with optional customizer.\n *\n * @template T - The type of the value to clone.\n * @template R - The result type.\n * @param {T} value - The value to clone.\n * @param {CloneWithCustomizer<T, R | undefined>} customizer - The function to customize cloning.\n * @returns {R | T} Returns the cloned value or the customized result.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * const cloned = cloneWith(obj, (value) => {\n *   if (typeof value === 'number') {\n *     return value * 2;\n *   }\n * });\n * // => { a: 2, b: 4 }\n */\nexport function cloneWith<T, R>(value: T, customizer: CloneWithCustomizer<T, R | undefined>): R | T;\n\n/**\n * Creates a shallow clone of a value.\n *\n * @template T - The type of the value to clone.\n * @param {T} value - The value to clone.\n * @returns {T} Returns the cloned value.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * const cloned = cloneWith(obj);\n * // => { a: 1, b: 2 }\n */\nexport function cloneWith<T>(value: T): T;\n\n/**\n * Creates a shallow clone of the given object with customization.\n * This method is like `_.clone` except that it accepts a customizer which\n * is invoked to produce the cloned value. If customizer returns undefined,\n * cloning is handled by the method instead.\n *\n * If no customizer is provided, it behaves like `clone`.\n *\n * @template T - The type of the object.\n * @param {T} value - The value to clone.\n * @param {Function} [customizer] - The function to customize cloning.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = cloneWith(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = cloneWith(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = cloneWith(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an object with a customizer\n * const obj = { a: 1, b: 2 };\n * const clonedObj = cloneWith(obj, (value) => {\n *   if (typeof value === 'number') {\n *     return value * 2; // Double the number\n *   }\n *   // Returning undefined uses the default cloning\n * });\n * console.log(clonedObj); // { a: 2, b: 4 }\n */\nexport function cloneWith(value: any, customizer?: any): any {\n  if (!customizer) {\n    return clone(value);\n  }\n\n  const result = customizer(value);\n  if (result !== undefined) {\n    return result;\n  }\n\n  return clone(value);\n}\n"
  },
  {
    "path": "src/compat/object/create.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { create as createLodash } from 'lodash';\nimport { create } from './create';\nimport { keys } from './keys';\nimport { falsey } from '../_internal/falsey';\nimport { primitives } from '../_internal/primitives';\nimport { map } from '../array/map';\nimport { isObject } from '../predicate/isObject';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('create', () => {\n  function Shape(this: { x: number; y: number }) {\n    this.x = 0;\n    this.y = 0;\n  }\n\n  const Circle = function (this: any) {\n    Shape.call(this);\n  } as unknown as { new (): any };\n\n  it('should create an object that inherits from the given `prototype` object', () => {\n    Circle.prototype = create(Shape.prototype);\n    Circle.prototype.constructor = Circle;\n\n    const actual = new Circle();\n\n    expect(actual instanceof Circle).toBe(true);\n    expect(actual instanceof Shape).toBe(true);\n    expect(Circle.prototype).not.toBe(Shape.prototype);\n    // assert.notStrictEqual(Circle.prototype, Shape.prototype);\n  });\n\n  it('should assign `properties` to the created object', () => {\n    const expected: any = { constructor: Circle, radius: 0 };\n    const properties = Object.keys(expected);\n    Circle.prototype = create(Shape.prototype, expected);\n\n    const actual = new Circle();\n\n    expect(actual instanceof Circle).toBe(true);\n    expect(actual instanceof Shape).toBe(true);\n    expect(Object.keys(Circle.prototype)).toEqual(properties);\n    properties.forEach(property => {\n      expect(Circle.prototype[property]).toBe(expected[property]);\n    });\n  });\n\n  it('should assign own properties', () => {\n    const Foo = function (this: { a: number; c: number }) {\n      this.a = 1;\n      this.c = 3;\n    } as unknown as { new (): any };\n    Foo.prototype.b = 2;\n\n    const actual = create({}, new Foo());\n    const expected: any = { a: 1, c: 3 };\n    const properties = Object.keys(expected);\n\n    expect(Object.keys(actual)).toEqual(properties);\n    properties.forEach(property => {\n      expect(actual[property]).toBe(expected[property]);\n    });\n  });\n\n  it('should assign properties that shadow those of `prototype`', () => {\n    const Foo = function (this: { a: number }) {\n      this.a = 1;\n    } as unknown as { new (): any };\n    const object = create(new Foo(), { a: 1 });\n    expect(keys(object)).toEqual(['a']);\n  });\n\n  it('should accept a falsey `prototype`', () => {\n    // @ts-expect-error - should accept a falsey `prototype`\n    const actual = map(falsey, (prototype, index) => (index ? create(prototype) : create()));\n\n    actual.forEach(value => {\n      expect(isObject(value)).toBe(true);\n    });\n  });\n\n  it('should accept a primitive `prototype`', () => {\n    // @ts-expect-error - should accept a primitive `prototype`\n    const actual = map(primitives, (value, index) => (index ? create(value) : create()));\n\n    actual.forEach(value => {\n      expect(isObject(value)).toBe(true);\n    });\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const array = [{ a: 1 }, { a: 1 }, { a: 1 }];\n    const expected = map(array, stubTrue);\n    const objects = map(array, create<{ a: number }, any>);\n\n    const actual = map(objects, object => object.a === 1 && !keys(object).length);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(create).toEqualTypeOf<typeof createLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/create.ts",
    "content": "import { keys } from './keys.ts';\nimport { assignValue } from '../_internal/assignValue.ts';\nimport { isObject } from '../predicate/isObject.ts';\n\n/**\n * Creates an object that inherits from the prototype object.\n *\n * If `properties` are provided, they will be added to the new object.\n * Only string-keyed enumerable properties directly owned by the `properties` object are copied.\n * Inherited properties or those with `Symbol` keys are not copied.\n *\n * @template T - The prototype object type.\n * @template U - The properties object type.\n * @param {T} prototype - The object to inherit from.\n * @param {U} properties - The properties to assign to the created object.\n * @returns {T & U} The new object.\n */\nexport function create<T extends object, U extends object>(prototype: T, properties?: U): T & U {\n  const proto = isObject(prototype) ? Object.create(prototype) : ({} as unknown as T);\n  if (properties != null) {\n    const propsKeys = keys(properties);\n    for (let i = 0; i < propsKeys.length; i++) {\n      const key = propsKeys[i];\n      const propsValue = properties[key as keyof U];\n      assignValue(proto, key, propsValue);\n    }\n  }\n  return proto as T & U;\n}\n"
  },
  {
    "path": "src/compat/object/defaults.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { defaults as defaultsLodash } from 'lodash';\nimport { defaults } from './defaults';\nimport { objectProto } from '../_internal/objectProto';\nimport * as esToolkit from '../index';\n\ndescribe('defaults', () => {\n  it('should assign source properties if missing on `object`', () => {\n    const actual = defaults({ a: 1 }, { a: 2, b: 2 });\n    expect(actual).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should accept multiple sources', () => {\n    const expected = { a: 1, b: 2, c: 3 };\n    let actual = defaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n\n    expect(actual).toEqual(expected);\n\n    actual = defaults({ a: 1, b: 2 }, { b: 3, c: 3 }, { c: 2 });\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not overwrite `null` values', () => {\n    const actual = defaults({ a: null }, { a: 1 });\n    expect((actual as any).a).toBe(null);\n  });\n\n  it('should overwrite `undefined` values', () => {\n    const actual = defaults({ a: undefined }, { a: 1 });\n    expect((actual as any).a).toBe(1);\n  });\n\n  it('should assign `undefined` values', () => {\n    const source = { a: undefined, b: 1 };\n    const actual = defaults({}, source);\n\n    expect(actual).toEqual({ a: undefined, b: 1 });\n  });\n\n  it('should assign properties that shadow those on `Object.prototype`', () => {\n    const object = {\n      constructor: objectProto.constructor,\n      hasOwnProperty: objectProto.hasOwnProperty,\n      isPrototypeOf: objectProto.isPrototypeOf,\n      propertyIsEnumerable: objectProto.propertyIsEnumerable,\n      toLocaleString: objectProto.toLocaleString,\n      toString: objectProto.toString,\n      valueOf: objectProto.valueOf,\n    };\n\n    const source = {\n      constructor: 1,\n      hasOwnProperty: 2,\n      isPrototypeOf: 3,\n      propertyIsEnumerable: 4,\n      toLocaleString: 5,\n      toString: 6,\n      valueOf: 7,\n    };\n\n    let expected = esToolkit.clone(source);\n    expect(defaults({}, source)).toEqual(expected);\n\n    expected = esToolkit.clone(object);\n    expect(defaults({}, object, source)).toEqual(expected);\n  });\n\n  it('should be used as a iteratee', () => {\n    const array = [{ b: 1 }, { c: 2 }, { d: 3 }];\n    const source = { a: 4 };\n    array.forEach((...args: any[]) => defaults(source, ...args));\n    expect(source).toEqual({ a: 4, b: 1, c: 2, d: 3 });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(defaults).toEqualTypeOf<typeof defaultsLodash>();\n  });\n\n  it('should not throw an error when a source is `undefined`', () => {\n    const source = undefined;\n    const actual = defaults({ a: 1 }, source);\n    expect(actual).toEqual({ a: 1 });\n  });\n\n  it('should not throw an error when a source is `null`', () => {\n    const source = null;\n    const actual = defaults({ a: 1 }, source);\n    expect(actual).toEqual({ a: 1 });\n  });\n});\n"
  },
  {
    "path": "src/compat/object/defaults.ts",
    "content": "import { isNil } from '../../predicate/isNil.ts';\nimport { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @template T - The type of the object being processed.\n * @template S - The type of the object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S} source - The object that specifies the default values to apply.\n * @returns {NonNullable<S & T>} The `object` that has been updated with default values from `source`.\n *\n * @example\n * defaults({ a: 1 }, { b: 2 }); // { a: 1, b: 2 }\n * defaults({ a: undefined }, { a: 1 }); // { a: 1 }\n */\nexport function defaults<T, S>(object: T, source: S): NonNullable<S & T>;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @returns {NonNullable<S2 & S1 & T>} The `object` that has been updated with default values from `source1` and `source2`.\n *\n * @example\n * defaults({ a: 1 }, { b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * defaults({ a: undefined }, { a: 1 }, { b: 2 }); // { a: 1, b: 2 }\n */\nexport function defaults<T, S1, S2>(object: T, source1: S1, source2: S2): NonNullable<S2 & S1 & T>;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @template S3 - The type of the third object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @param {S3} source3 - The third object that specifies the default values to apply.\n * @returns {NonNullable<S3 & S2 & S1 & T>} The `object` that has been updated with default values from `source1`, `source2`, and `source3`.\n *\n * @example\n * defaults({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); // { a: 1, b: 2, c: 3, d: 4 }\n * defaults({ a: undefined }, { a: 1 }, { b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n */\nexport function defaults<T, S1, S2, S3>(\n  object: T,\n  source1: S1,\n  source2: S2,\n  source3: S3\n): NonNullable<S3 & S2 & S1 & T>;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @template S3 - The type of the third object that provides default values.\n * @template S4 - The type of the fourth object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @param {S3} source3 - The third object that specifies the default values to apply.\n * @param {S4} source4 - The fourth object that specifies the default values to apply.\n * @returns {NonNullable<S4 & S3 & S2 & S1 & T>} The `object` that has been updated with default values from `source1`, `source2`, `source3`, and `source4`.\n *\n * @example\n * defaults({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 }); // { a: 1, b: 2, c: 3, d: 4, e: 5 }\n * defaults({ a: undefined }, { a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); // { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function defaults<T, S1, S2, S3, S4>(\n  object: T,\n  source1: S1,\n  source2: S2,\n  source3: S3,\n  source4: S4\n): NonNullable<S4 & S3 & S2 & S1 & T>;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @template T - The type of the object being processed.\n * @param {T} object - The target object that will receive default values.\n * @returns {NonNullable<T>} The `object` that has been updated with default values.\n *\n * @example\n * defaults({ a: 1 }); // { a: 1 }\n * defaults({ a: undefined }); // { a: undefined }\n */\nexport function defaults<T>(object: T): NonNullable<T>;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * @param {any} object - The target object that will receive default values.\n * @param {...any[]} sources - The objects that specify the default values to apply.\n * @returns {any} The `object` that has been updated with default values from `sources`.\n *\n * @example\n * defaults({}, { a: 1 }, { b: 2 }); // { a: 1, b: 2 }\n * defaults({ a: undefined }, { a: 1 }); // { a: 1 }\n */\nexport function defaults(object: any, ...sources: any[]): any;\n\n/**\n * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * You can pass in multiple objects to define these default values,\n * and they will be applied in order from left to right.\n * Once a property has been assigned a value, any subsequent values for that property will be ignored.\n *\n * Note: This function modifies the first argument, `object`. If you want to keep `object` unchanged, consider using `toDefaulted` instead.\n *\n * @template T - The type of the object being processed.\n * @template S - The type of the objects that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S[]} source - The objects that specifies the default values to apply.\n * @returns {object} The `object` that has been updated with default values from `sources`, ensuring that all properties are defined and none are left as `undefined`.\n *\n * @example\n * defaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * defaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * defaults({ a: null }, { a: 1 }); // { a: null }\n * defaults({ a: undefined }, { a: 1 }); // { a: 1 }\n */\nexport function defaults<T extends object, S extends object>(object: T, ...sources: S[]): object {\n  object = Object(object);\n  const objectProto = Object.prototype;\n\n  let length = sources.length;\n  const guard = length > 2 ? sources[2] : undefined;\n  if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n    length = 1;\n  }\n\n  for (let i = 0; i < length; i++) {\n    if (isNil(sources[i])) {\n      continue;\n    }\n\n    const source = sources[i];\n    const keys = Object.keys(source) as Array<keyof S>;\n\n    for (let j = 0; j < keys.length; j++) {\n      const key = keys[j];\n      const value = (object as any)[key];\n\n      if (\n        value === undefined ||\n        (!Object.hasOwn(object, key) && eq(value, objectProto[key as keyof typeof objectProto]))\n      ) {\n        (object as any)[key] = source[key];\n      }\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/defaultsDeep.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { defaultsDeep as defaultsDeepLodash } from 'lodash';\nimport { defaultsDeep } from './defaultsDeep';\nimport { cloneDeep, noop } from '../compat';\n\ndescribe('defaultsDeep', () => {\n  it('should deep assign source properties if missing on `object`', () => {\n    const object = { a: { b: 2 }, d: 4 };\n    const source = { a: { b: 3, c: 3 }, e: 5 };\n    const expected = { a: { b: 2, c: 3 }, d: 4, e: 5 };\n\n    expect(defaultsDeep(object, source)).toEqual(expected);\n  });\n\n  it('should accept multiple sources', () => {\n    const source1 = { a: { b: 3 } };\n    const source2 = { a: { c: 3 } };\n    const source3 = { a: { b: 3, c: 3 } };\n    const source4 = { a: { c: 4 } };\n    const expected = { a: { b: 2, c: 3 } };\n\n    expect(defaultsDeep({ a: { b: 2 } }, source1, source2)).toEqual(expected);\n    expect(defaultsDeep({ a: { b: 2 } }, source3, source4)).toEqual(expected);\n  });\n\n  it('should not overwrite `null` values', () => {\n    const object = { a: { b: null } };\n    const source = { a: { b: 2 } };\n    const actual = defaultsDeep(object, source);\n\n    expect((actual as any).a.b).toBe(null);\n  });\n\n  it('should not overwrite regexp values', () => {\n    const object = { a: { b: /x/ } };\n    const source = { a: { b: /y/ } };\n    const actual = defaultsDeep(object, source);\n\n    expect(actual.a.b).toEqual(/x/);\n  });\n\n  it('should not convert function properties to objects', () => {\n    const actual = defaultsDeep({}, { a: noop });\n    expect(actual.a).toBe(noop);\n\n    const actual2 = defaultsDeep({}, { a: { b: noop } });\n    expect(actual2.a.b).toBe(noop);\n  });\n\n  it('should overwrite `undefined` values', () => {\n    const object = { a: { b: undefined } };\n    const source = { a: { b: 2 } };\n    const actual = defaultsDeep(object, source);\n\n    expect((actual as any).a.b).toBe(2);\n  });\n\n  it('should assign `undefined` values', () => {\n    const source = { a: undefined, b: { c: undefined, d: 1 } };\n    const expected = cloneDeep(source);\n    const actual = defaultsDeep({}, source);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should merge sources containing circular references', () => {\n    const object = {\n      foo: { b: { c: { d: {} } } },\n      bar: { a: 2 },\n    };\n\n    const source = {\n      foo: { b: { c: { d: {} } } },\n      bar: {},\n    };\n\n    object.foo.b.c.d = object;\n    source.foo.b.c.d = source;\n    (source.bar as any).b = source.foo.b;\n\n    const actual = defaultsDeep(object, source);\n\n    expect((actual as any).bar.b).toBe(actual.foo.b);\n    expect((actual as any).foo.b.c.d).toBe((actual as any).foo.b.c.d.foo.b.c.d);\n  });\n\n  it('should not modify sources', () => {\n    const source1 = { a: 1, b: { c: 2 } };\n    const source2 = { b: { c: 3, d: 3 } };\n    const actual = defaultsDeep({}, source1, source2);\n\n    expect(actual).toEqual({ a: 1, b: { c: 2, d: 3 } });\n    expect(source1).toEqual({ a: 1, b: { c: 2 } });\n    expect(source2).toEqual({ b: { c: 3, d: 3 } });\n  });\n\n  it('should not attempt a merge of a string into an array', () => {\n    const actual = defaultsDeep({ a: ['abc'] }, { a: 'abc' });\n    expect(actual.a).toEqual(['abc']);\n  });\n\n  it('should handle null or undefined sources', () => {\n    // null 소스 테스트\n    const target1 = { a: 1 };\n    const result1 = defaultsDeep(target1, null as any);\n    expect(result1).toEqual({ a: 1 }); // 대상 객체가 변경되지 않아야 함\n\n    // undefined 소스 테스트\n    const target2 = { b: 2 };\n    const result2 = defaultsDeep(target2, undefined as any);\n    expect(result2).toEqual({ b: 2 }); // 대상 객체가 변경되지 않아야 함\n\n    const result3 = defaultsDeep(target2, { d: 4 }, { d: 4 }, { d: 4 });\n    expect(result3).toEqual({ b: 2, d: 4 });\n  });\n\n  it('should not indirectly merge `Object` properties', () => {\n    defaultsDeep({}, { constructor: { a: 1 } });\n\n    const actual = 'a' in Object;\n    delete (Object as any).a;\n\n    expect(actual).toBe(false);\n  });\n\n  describe('defaultsDeep edge cases', () => {\n    it('should not assign values that are the same as their destinations', () => {\n      ['a', ['a'], { a: 1 }, NaN].forEach(value => {\n        const object = {};\n        let pass = true;\n\n        Object.defineProperty(object, 'a', {\n          configurable: true,\n          enumerable: true,\n          get: () => value,\n          set: () => {\n            pass = false;\n          },\n        });\n\n        defaultsDeep(object, { a: value });\n        expect(pass).toBe(true);\n      });\n    });\n\n    it('should coerce primitives to objects', () => {\n      const primitives = [Boolean(), Number(), String()];\n\n      const expected = primitives.map(value => {\n        const object = Object(value);\n        object.a = 1;\n        return object;\n      });\n\n      const actual = primitives.map(value => {\n        return defaultsDeep(value as any, { a: 1 });\n      });\n\n      expect(actual).toEqual(expected);\n    });\n\n    it('should assign own and inherited string keyed source properties', () => {\n      function Foo(this: any) {\n        this.a = 1;\n      }\n      Foo.prototype.b = 2;\n\n      const expected = { a: 1, b: 2 };\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(defaultsDeep({}, new Foo())).toEqual(expected);\n    });\n\n    it('should not skip a trailing function source', () => {\n      function fn() {}\n      fn.b = 2;\n\n      expect(defaultsDeep({}, { a: 1 }, fn)).toEqual({ a: 1, b: 2 });\n    });\n\n    it('should not error on nullish sources', () => {\n      expect(defaultsDeep({ a: 1 }, undefined as any, { b: 2 }, null)).toEqual({\n        a: 1,\n        b: 2,\n      });\n    });\n\n    it('should create an object when `object` is nullish', () => {\n      const source = { a: 1 };\n      const values = [null, undefined];\n\n      const actual1 = values.map(value => {\n        const object = defaultsDeep(value as any, source);\n        return object !== source && object.a === 1;\n      });\n\n      expect(actual1).toEqual([true, true]);\n\n      const actual2 = values.map(value => {\n        return Object.keys(defaultsDeep(value as any)).length === 0;\n      });\n\n      expect(actual2).toEqual([true, true]);\n    });\n\n    it('should work as an iteratee for methods like reduce', () => {\n      const array = [{ a: 1 }, { b: 2 }, { c: 3 }];\n      const expected = { a: 0, b: 2, c: 3 };\n\n      function fn() {}\n      fn.a = array[0];\n      fn.b = array[1];\n      fn.c = array[2];\n\n      expect(array.reduce((result, value) => defaultsDeep(result, value), { a: 0 })).toEqual(expected);\n\n      const result = { a: 0 };\n      for (const key in fn) {\n        if (Object.hasOwn(fn, key)) {\n          defaultsDeep(result, (fn as any)[key as any] as any);\n        }\n      }\n      expect(result).toEqual(expected);\n    });\n  });\n\n  it('should work with objects in arrays', () => {\n    const target = { a: [{ foo: 1 }] };\n    const source = { a: [{ bar: 2 }] };\n\n    const expected = { a: [{ foo: 1, bar: 2 }] };\n\n    expect(defaultsDeep(target, source)).toEqual(expected);\n  });\n\n  it('should append additional elements from the source array to the target array if the source array is longer than the target array', () => {\n    const target = { a: [{ foo: 1 }] };\n    const source = { a: [{ foo: 2 }, { some: 'hello' }] };\n\n    const expected = { a: [{ foo: 1 }, { some: 'hello' }] };\n\n    expect(defaultsDeep(target, source)).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(defaultsDeep).toEqualTypeOf<typeof defaultsDeepLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/defaultsDeep.ts",
    "content": "import { isPlainObject } from '../predicate/isPlainObject.ts';\n\n/**\n * Recursively assigns default values to an `object`, ensuring that certain properties do not remain `undefined`.\n * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`.\n *\n * Similar to `defaults` but recursively applies default values to nested objects.\n * Source objects are applied in order from left to right, and once a property has been assigned a value,\n * any subsequent values for that property will be ignored.\n *\n * Note: This function modifies the first argument, `object`.\n *\n * @template T - The type of the object being processed.\n * @param {any} target - The target object that will receive default values.\n * @param {any[]} sources - One or more source objects that specify default values to apply.\n * @returns {any} The `object` that has been updated with default values from all sources, recursively merging nested objects.\n *\n * @example\n * defaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 }); // { a: { b: 2, c: 3 }, d: 4 }\n * defaultsDeep({ a: { b: undefined } }, { a: { b: 1 } }); // { a: { b: 1 } }\n * defaultsDeep({ a: null }, { a: { b: 1 } }); // { a: null }\n */\nexport function defaultsDeep(target: any, ...sources: any[]): any {\n  target = Object(target);\n\n  for (let i = 0; i < sources.length; i++) {\n    const source = sources[i];\n    if (source != null) {\n      defaultsDeepRecursive(target, source, new WeakMap());\n    }\n  }\n\n  return target;\n}\n\nfunction defaultsDeepRecursive(target: any, source: any, stack: WeakMap<any, any>): void {\n  for (const key in source) {\n    const sourceValue = source[key];\n    const targetValue = target[key];\n\n    if (targetValue === undefined || !Object.hasOwn(target, key)) {\n      target[key] = handleMissingProperty(sourceValue, stack);\n      continue;\n    }\n\n    if (stack.get(sourceValue) === targetValue) {\n      // skipping circular reference\n      continue;\n    }\n\n    handleExistingProperty(targetValue, sourceValue, stack);\n  }\n}\n\nfunction handleMissingProperty(sourceValue: any, stack: WeakMap<any, any>): any {\n  if (stack.has(sourceValue)) {\n    return stack.get(sourceValue);\n  }\n\n  if (isPlainObject(sourceValue)) {\n    const newObj = {};\n    stack.set(sourceValue, newObj);\n    defaultsDeepRecursive(newObj, sourceValue, stack);\n    return newObj;\n  }\n\n  return sourceValue;\n}\n\nfunction handleExistingProperty(targetValue: any, sourceValue: any, stack: WeakMap<any, any>): void {\n  if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {\n    stack.set(sourceValue, targetValue);\n    defaultsDeepRecursive(targetValue, sourceValue, stack);\n    return;\n  }\n\n  if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n    stack.set(sourceValue, targetValue);\n    mergeArrays(targetValue, sourceValue, stack);\n  }\n}\n\nfunction mergeArrays(targetArray: any[], sourceArray: any[], stack: WeakMap<any, any>): void {\n  const minLength = Math.min(sourceArray.length, targetArray.length);\n\n  for (let i = 0; i < minLength; i++) {\n    if (isPlainObject(targetArray[i]) && isPlainObject(sourceArray[i])) {\n      defaultsDeepRecursive(targetArray[i], sourceArray[i], stack);\n    }\n  }\n  for (let i = minLength; i < sourceArray.length; i++) {\n    targetArray.push(sourceArray[i]);\n  }\n}\n"
  },
  {
    "path": "src/compat/object/extend.ts",
    "content": "export { assignIn as extend } from './assignIn.ts';\n"
  },
  {
    "path": "src/compat/object/extendWith.ts",
    "content": "export { assignInWith as extendWith } from './assignInWith.ts';\n"
  },
  {
    "path": "src/compat/object/findKey.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { findKey as findKeyLodash } from 'lodash';\nimport { findKey } from './findKey';\n\ndescribe('findKey', () => {\n  const objects = [\n    { a: 0, b: 0 },\n    { a: 1, b: 1 },\n    { a: 2, b: 2 },\n  ];\n  it('should return the found key', () => {\n    // @ts-expect-error invalid argument\n    expect(findKey(objects, object => object.a)).toBe('1');\n  });\n\n  it('should return undefined if value is not found', () => {\n    // @ts-expect-error invalid argument\n    expect(findKey(objects, object => object.a === 3)).toBeUndefined();\n  });\n\n  it('should work with matches shorthand', () => {\n    expect(findKey(objects, { b: 2 })).toBe('2');\n  });\n\n  it('should work with matchesProperty shorthand', () => {\n    expect(findKey(objects, ['b', 2])).toBe('2');\n  });\n\n  it('should work with property shorthand', () => {\n    expect(findKey(objects, 'b')).toBe('1');\n  });\n\n  it('should return undefined for empty collections', () => {\n    const emptyValues = [[], {}, null, undefined, ''];\n    emptyValues.forEach(value => {\n      // @ts-expect-error invalid argument\n      expect(findKey(value, { a: 3 })).toBeUndefined();\n    });\n  });\n\n  it('should work with an object for `collection`', () => {\n    expect(findKey({ a: 1, b: 2, c: 3 }, n => n < 3)).toBe('a');\n  });\n\n  it('should provide correct predicate arguments for objects', () => {\n    let args;\n    const object = { a: 1 };\n\n    findKey(object, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = Array.from(arguments);\n    });\n\n    expect(args).toEqual([1, 'a', object]);\n  });\n\n  it('should work without predicate parameter (default to identity)', () => {\n    const object = { a: 0, b: 1, c: 2 };\n\n    expect(findKey(object)).toBe('b');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(findKey).toEqualTypeOf<typeof findKeyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/findKey.ts",
    "content": "import { findKey as findKeyToolkit } from '../../object/findKey.ts';\nimport { ObjectIteratee } from '../_internal/ObjectIteratee.ts';\nimport { identity } from '../function/identity.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Finds the key of the first element that matches the given predicate.\n *\n * This function determines the type of the predicate and delegates the search\n * to the appropriate helper function. It supports predicates as functions, objects,\n * arrays, or strings.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} obj - The object to inspect.\n * @param {ObjectIteratee<T>} predicate - The predicate to match.\n * @returns {string | undefined} Returns the key of the matched element, else `undefined`.\n */\nexport function findKey<T>(obj: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined {\n  if (!isObject(obj)) {\n    return undefined;\n  }\n\n  const iteratee = createIteratee(predicate ?? identity);\n\n  return findKeyToolkit(obj, iteratee) as string | undefined;\n}\n"
  },
  {
    "path": "src/compat/object/findLastKey.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { findLastKey as findLastKeyLodash } from 'lodash';\nimport { findLastKey } from './findLastKey';\n\ndescribe('findLastKey', () => {\n  const objects = [\n    { a: 0, b: 0 },\n    { a: 1, b: 1 },\n    { a: 2, b: 2 },\n  ];\n  it('should return the found key', () => {\n    // @ts-expect-error invalid argument\n    expect(findLastKey(objects, object => object.a)).toBe('2');\n  });\n\n  it('should return undefined if value is not found', () => {\n    // @ts-expect-error invalid argument\n    expect(findLastKey(objects, object => object.a === 3)).toBeUndefined();\n  });\n\n  it('should work with matches shorthand', () => {\n    expect(findLastKey(objects, { b: 2 })).toBe('2');\n  });\n\n  it('should work with matchesProperty shorthand', () => {\n    expect(findLastKey(objects, ['b', 2])).toBe('2');\n  });\n\n  it('should work with property shorthand', () => {\n    expect(findLastKey(objects, 'b')).toBe('2');\n  });\n\n  it('should return undefined for empty collections', () => {\n    const emptyValues = [[], {}, null, undefined, ''];\n    emptyValues.forEach(value => {\n      // @ts-expect-error invalid argument\n      expect(findLastKey(value, { a: 3 })).toBeUndefined();\n    });\n  });\n\n  it('should work with an object for `collection`', () => {\n    expect(findLastKey({ a: 1, b: 2, c: 3 }, n => n < 3)).toBe('b');\n  });\n\n  it('should provide correct predicate arguments for objects', () => {\n    let args;\n    const object = { a: 1 };\n\n    findLastKey(object, function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = Array.from(arguments);\n    });\n\n    expect(args).toEqual([1, 'a', object]);\n  });\n\n  it('should work without predicate parameter (default to identity)', () => {\n    const object = { a: 0, b: 1, c: 2 };\n\n    expect(findLastKey(object)).toBe('c');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(findLastKey).toEqualTypeOf<typeof findLastKeyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/findLastKey.ts",
    "content": "import { ObjectIteratee } from '../_internal/ObjectIteratee.ts';\nimport { identity } from '../function/identity.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Finds the key of the last element that matches the given predicate.\n *\n * This function determines the type of the predicate and delegates the search\n * to the appropriate helper function. It supports predicates as functions, objects,\n * arrays, or strings.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} obj - The object to inspect.\n * @param {ObjectIteratee<T>} predicate - The predicate to match.\n * @returns {string | undefined} Returns the key of the matched element, else `undefined`.\n */\nexport function findLastKey<T>(obj: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined {\n  if (!isObject(obj)) {\n    return undefined;\n  }\n\n  const iteratee = createIteratee(predicate ?? identity);\n\n  const keys = Object.keys(obj);\n\n  return keys.findLast(key => iteratee(obj[key as keyof T], key, obj));\n}\n"
  },
  {
    "path": "src/compat/object/forIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { forIn as forInLodash } from 'lodash';\nimport { forIn } from './forIn';\n\ndescribe('forIn', () => {\n  it('iterates over inherited string keyed properties', () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const keys: string[] = [];\n\n    // @ts-expect-error - This is a test\n    forIn(new Foo(), (_, key) => {\n      keys.push(key);\n    });\n    expect(keys.sort()).toEqual(['a', 'b']);\n  });\n\n  it('returns `null` if `object` is `null`', () => {\n    expect(forIn(null)).toBeNull();\n  });\n\n  it('returns `undefined` if `object` is `undefined`', () => {\n    expect(forIn(undefined)).toBeUndefined();\n  });\n\n  it('early returns if `iteratee` returns `false`', () => {\n    const obj = { a: 1, b: 2 };\n\n    forIn(obj, (_, key, collection) => {\n      collection[key as keyof typeof obj] = 3;\n\n      return false;\n    });\n\n    expect(obj).toEqual({ a: 3, b: 2 });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forIn).toEqualTypeOf<typeof forInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/forIn.ts",
    "content": "import { identity } from '../../function/identity.ts';\n\n/**\n * Iterates over an object and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, obj: T) => any} iteratee - The function invoked per iteration\n * @returns {T} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'a' 1, 'b' 2\n *\n * // Early termination\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'a' 1\n */\nexport function forIn<T>(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T;\n\n/**\n * Iterates over an object and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T | null | undefined} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, obj: T) => any} iteratee - The function invoked per iteration\n * @returns {T | null | undefined} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'a' 1, 'b' 2\n *\n * // Early termination\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'a' 1\n */\nexport function forIn<T>(\n  object: T | null | undefined,\n  iteratee?: (value: T[keyof T], key: string, collection: T) => any\n): T | null | undefined;\n\n/**\n * Iterates over an object and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T | null | undefined} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, obj: T) => any} iteratee - The function invoked per iteration\n * @returns {T | null | undefined} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'a' 1, 'b' 2\n *\n * // Early termination\n * forIn(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'a' 1\n */\nexport function forIn<T>(\n  object: T | null | undefined,\n  iteratee: (value: T[keyof T], key: string, collection: T) => any = identity\n): T | null | undefined {\n  if (object == null) {\n    return object;\n  }\n\n  for (const key in object) {\n    const result = iteratee(object[key as keyof T], key, object);\n\n    if (result === false) {\n      break;\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/forInRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { forInRight as forInRightLodash } from 'lodash';\nimport { forInRight } from './forInRight';\n\ndescribe('forInRight', () => {\n  it('iterates over inherited string keyed properties', () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const keys: string[] = [];\n\n    // @ts-expect-error - This is a test\n    forInRight(new Foo(), (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['b', 'a']);\n  });\n\n  it('returns `null` if `object` is `null`', () => {\n    expect(forInRight(null)).toBeNull();\n  });\n\n  it('returns `undefined` if `object` is `undefined`', () => {\n    expect(forInRight(undefined)).toBeUndefined();\n  });\n\n  it('early returns if `iteratee` returns `false`', () => {\n    const obj = { a: 1, b: 2 };\n\n    forInRight(obj, (_, key, collection) => {\n      collection[key as keyof typeof obj] = 3;\n\n      return false;\n    });\n\n    expect(obj).toEqual({ a: 1, b: 3 });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forInRight).toEqualTypeOf<typeof forInRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/forInRight.ts",
    "content": "import { identity } from '../../function/identity.ts';\n\n/**\n * Iterates over an object in reverse order and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties in reverse order.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, collection: T) => any} iteratee - The function invoked per iteration\n * @returns {T} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'b' 2, 'a' 1\n *\n * // Early termination\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'b' 2\n */\nexport function forInRight<T>(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T;\n\n/**\n * Iterates over an object in reverse order and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties in reverse order.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T | null | undefined} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, obj: T) => any} iteratee - The function invoked per iteration\n * @returns {T | null | undefined} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'b' 2, 'a' 1\n *\n * // Early termination\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'b' 2\n */\nexport function forInRight<T>(\n  object: T | null | undefined,\n  iteratee?: (value: T[keyof T], key: string, collection: T) => any\n): T | null | undefined;\n\n/**\n * Iterates over an object in reverse order and invokes the `iteratee` function for each property.\n *\n * Iterates over string keyed properties including inherited properties in reverse order.\n *\n * The iteration is terminated early if the `iteratee` function returns `false`.\n *\n * @template T - The type of the object\n * @param {T | null | undefined} object - The object to iterate over\n * @param {(value: T[keyof T], key: string, obj: T) => any} iteratee - The function invoked per iteration\n * @returns {T | null | undefined} Returns the object\n *\n * @example\n * // Iterate over all properties including inherited ones\n * const obj = { a: 1, b: 2 };\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n * });\n * // Output: 'b' 2, 'a' 1\n *\n * // Early termination\n * forInRight(obj, (value, key) => {\n *   console.log(key, value);\n *   return key !== 'a'; // stop after 'a'\n * });\n * // Output: 'b' 2\n */\nexport function forInRight<T>(\n  object: T | null | undefined,\n  iteratee: (value: T[keyof T], key: string, collection: T) => any = identity\n): T | null | undefined {\n  if (object == null) {\n    return object;\n  }\n\n  const keys: string[] = [];\n\n  for (const key in object) {\n    keys.push(key);\n  }\n\n  for (let i = keys.length - 1; i >= 0; i--) {\n    const key = keys[i];\n    const result = iteratee(object[key as keyof T], key, object);\n\n    if (result === false) {\n      break;\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/forOwn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { forOwn as forOwnLodash } from 'lodash';\nimport { forOwn } from './forOwn';\n\n/**\n * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/forOwn-methods.spec.js#L1\n */\ndescribe('forOwn', () => {\n  it('should iterate over `length` properties', () => {\n    const object = { 0: 'zero', 1: 'one', length: 2 };\n    const props: string[] = [];\n\n    forOwn(object, (_, prop) => {\n      props.push(prop);\n    });\n\n    expect(props.sort()).toEqual(['0', '1', 'length']);\n  });\n\n  it('should return `object` itself', () => {\n    expect(forOwn(null)).toBe(null);\n    expect(forOwn(undefined)).toBe(undefined);\n    expect(forOwn([])).toEqual([]);\n    expect(forOwn([1])).toEqual([1]);\n    expect(forOwn({ 0: 1, length: 1 })).toEqual({ 0: 1, length: 1 });\n    expect(forOwn({})).toEqual({});\n    expect(forOwn({ a: 1 })).toEqual({ a: 1 });\n  });\n\n  it(`should provide correct iteratee arguments`, () => {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    let args: any;\n    const object = {\n      a: 1,\n    };\n\n    forOwn(object, function (value, key, collection) {\n      args = [value, key, collection];\n    });\n\n    expect(args).toEqual([1, 'a', { a: 1 }]);\n  });\n\n  it(`should exit iteration when iteratee returns false`, () => {\n    const object = {\n      a: 1,\n      b: 2,\n    };\n    const keys: string[] = [];\n\n    forOwn(object, (_, key) => {\n      keys.push(key);\n      if (keys.length === 1) {\n        return false;\n      }\n    });\n\n    expect(keys).toEqual(['a']);\n  });\n\n  it('should not iterate inherited properties', () => {\n    class Foo {\n      a: number;\n      b: number;\n\n      constructor() {\n        this.a = 1;\n        this.b = 2;\n      }\n    }\n    // @ts-expect-error - testing inherited properties\n    Foo.prototype.c = 3;\n\n    expect(getOwnEnumerableStringKeys(new Foo())).toEqual(['a', 'b']);\n  });\n\n  it('should not iterate non-enumerable properties', () => {\n    const foo = {\n      a: 1,\n      b: 2,\n    };\n    Object.defineProperty(foo, 'c', {\n      value: 3,\n      enumerable: false,\n    });\n\n    expect(getOwnEnumerableStringKeys(foo)).toEqual(['a', 'b']);\n  });\n\n  it('should not iterate symbol properties', () => {\n    const foo = {\n      a: 1,\n      b: 2,\n      [Symbol()]: 3,\n    };\n\n    expect(getOwnEnumerableStringKeys(foo)).toEqual(['a', 'b']);\n  });\n\n  it('should iterate over empty slots in sparse array', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const a = [1, , , 4];\n\n    expect(getOwnEnumerableStringKeys(a)).toEqual(['0', '1', '2', '3']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forOwn).toEqualTypeOf<typeof forOwnLodash>();\n  });\n});\n\nfunction getOwnEnumerableStringKeys(object: object) {\n  const keys: string[] = [];\n\n  forOwn(object, (_, key) => {\n    keys.push(key);\n  });\n\n  return keys;\n}\n"
  },
  {
    "path": "src/compat/object/forOwn.ts",
    "content": "import { keys as keysToolkit } from './keys.ts';\nimport { identity } from '../../function/identity.ts';\n\n/**\n * Iterates over an object's properties and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwn(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nexport function forOwn<T>(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T;\n\n/**\n * Iterates over an object's properties and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T | null | undefined} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwn(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nexport function forOwn<T>(\n  object: T | null | undefined,\n  iteratee?: (value: T[keyof T], key: string, collection: T) => any\n): T | null | undefined;\n\n/**\n * Iterates over an object's properties and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T | null | undefined} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwn(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nexport function forOwn<T>(\n  object: T | null | undefined,\n  iteratee: (value: T[keyof T], key: string, collection: T) => any = identity\n): T | null | undefined {\n  if (object == null) {\n    return object;\n  }\n\n  const iterable = Object(object);\n  const keys = keysToolkit(object);\n\n  for (let i = 0; i < keys.length; ++i) {\n    const key = keys[i];\n    if (iteratee(iterable[key], key, iterable) === false) {\n      break;\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/forOwnRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { forOwnRight as forOwnRightLodash } from 'lodash';\nimport { forOwnRight } from './forOwnRight';\n\n/**\n * x@see https://github.com/lodash/lodash/blob/v5-wip/test/forOwn-methods.spec.js#L1\n */\ndescribe('forOwnRight', () => {\n  it('should iterate over `length` properties in reverse order', () => {\n    const object = { 0: 'zero', 1: 'one', length: 2 };\n    const props: string[] = [];\n\n    forOwnRight(object, (_, prop) => {\n      props.push(prop);\n    });\n\n    expect(props).toEqual(['length', '1', '0']);\n  });\n\n  it('should return `object` itself', () => {\n    expect(forOwnRight(null)).toBe(null);\n    expect(forOwnRight(undefined)).toBe(undefined);\n    expect(forOwnRight([])).toEqual([]);\n    expect(forOwnRight([1])).toEqual([1]);\n    expect(forOwnRight({ 0: 1, length: 1 })).toEqual({ 0: 1, length: 1 });\n    expect(forOwnRight({})).toEqual({});\n    expect(forOwnRight({ a: 1 })).toEqual({ a: 1 });\n  });\n\n  it(`should provide correct iteratee arguments`, () => {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    let args: any;\n    const object = {\n      a: 1,\n      b: 2,\n    };\n\n    forOwnRight(object, function (value, key, collection) {\n      args = [value, key, collection];\n    });\n\n    expect(args).toEqual([1, 'a', { a: 1, b: 2 }]);\n  });\n\n  it(`should exit iteration when iteratee returns false`, () => {\n    const object = {\n      a: 1,\n      b: 2,\n      c: 3,\n    };\n    const keys: string[] = [];\n\n    forOwnRight(object, (_, key) => {\n      keys.push(key);\n      if (keys.length === 1) {\n        return false;\n      }\n    });\n\n    expect(keys).toEqual(['c']);\n  });\n\n  it('should not iterate inherited properties', () => {\n    class Foo {\n      a: number;\n      b: number;\n\n      constructor() {\n        this.a = 1;\n        this.b = 2;\n      }\n    }\n    // @ts-expect-error - testing inherited properties\n    Foo.prototype.c = 3;\n\n    const keys: string[] = [];\n    forOwnRight(new Foo(), (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['b', 'a']);\n  });\n\n  it('should not iterate non-enumerable properties', () => {\n    const foo = {\n      a: 1,\n      b: 2,\n    };\n    Object.defineProperty(foo, 'c', {\n      value: 3,\n      enumerable: false,\n    });\n\n    const keys: string[] = [];\n    forOwnRight(foo, (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['b', 'a']);\n  });\n\n  it('should not iterate symbol properties', () => {\n    const foo = {\n      a: 1,\n      b: 2,\n      [Symbol()]: 3,\n    };\n\n    const keys: string[] = [];\n    forOwnRight(foo, (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['b', 'a']);\n  });\n\n  it('should iterate over empty slots in sparse array', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const a = [1, , , 4];\n\n    const keys: string[] = [];\n    forOwnRight(a, (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['3', '2', '1', '0']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(forOwnRight).toEqualTypeOf<typeof forOwnRightLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/forOwnRight.ts",
    "content": "import { keys as keysToolkit } from './keys.ts';\nimport { identity } from '../../function/identity.ts';\n\n/**\n * Iterates over an object's properties in reverse order and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwnRight(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'b' then 'a' (iteration order is not guaranteed).\n */\nexport function forOwnRight<T>(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T;\n\n/**\n * Iterates over an object's properties in reverse order and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T | null | undefined} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwnRight(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'b' then 'a' (iteration order is not guaranteed).\n */\nexport function forOwnRight<T>(\n  object: T | null | undefined,\n  iteratee?: (value: T[keyof T], key: string, collection: T) => any\n): T | null | undefined;\n\n/**\n * Iterates over an object's properties in reverse order and calls the `iteratee` function for each property.\n *\n * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys.\n *\n * The `iteratee` function can terminate the iteration early by returning `false`.\n *\n * @template T - The type of the object.\n * @param {T | null | undefined} object The object to iterate over.\n * @param {(value: T[keyof T], key: string, collection: T) => any} [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used.\n * @return {T | null | undefined} Returns object.\n *\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * forOwnRight(new Foo(), function(value, key) {\n *   console.log(key);\n * });\n * // => Logs 'b' then 'a' (iteration order is not guaranteed).\n */\nexport function forOwnRight<T>(\n  object: T | null | undefined,\n  iteratee: (value: T[keyof T], key: string, collection: T) => any = identity\n): T | null | undefined {\n  if (object == null) {\n    return object;\n  }\n\n  const iterable = Object(object);\n  const keys = keysToolkit(object);\n\n  for (let i = keys.length - 1; i >= 0; --i) {\n    const key = keys[i];\n    if (iteratee(iterable[key], key, iterable) === false) {\n      break;\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/fromPairs.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { fromPairs as fromPairsLodash } from 'lodash';\nimport { fromPairs } from './fromPairs';\nimport { toPairs } from './toPairs';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('fromPairs', () => {\n  it('should convert an array of key-value pairs into an object', () => {\n    const result = fromPairs([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n    const expected = { a: 1, b: 2, c: 3 };\n    expect(result).toEqual(expected);\n  });\n\n  it('should handle different types of keys', () => {\n    const result = fromPairs([\n      [1, 'one'],\n      [2, 'two'],\n      [3, 'three'],\n    ]);\n    const expected = { 1: 'one', 2: 'two', 3: 'three' };\n    expect(result).toEqual(expected);\n  });\n\n  it('should handle Symbol type keys', () => {\n    const sym1 = Symbol('sym1');\n    const sym2 = Symbol('sym2');\n    const result = fromPairs([\n      [sym1, 'value1'],\n      [sym2, 'value2'],\n    ]);\n    const expected = { [sym1]: 'value1', [sym2]: 'value2' };\n    expect(result).toEqual(expected);\n  });\n\n  it('should accept a two dimensional array', () => {\n    const array = [\n      ['a', 1],\n      ['b', 2],\n    ];\n    const object = { a: 1, b: 2 };\n    const actual = fromPairs(array);\n\n    expect(actual).toEqual(object);\n  });\n\n  it('should accept a falsey `array`', () => {\n    const expected = falsey.map(() => ({}));\n\n    const actual = falsey.map((array, index) => {\n      try {\n        // eslint-disable-next-line\n        // @ts-ignore\n        return index ? fromPairs(array) : fromPairs();\n        // eslint-disable-next-line\n      } catch (e) {}\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not support deep paths', () => {\n    const actual = fromPairs([['a.b', 1]]);\n    expect(actual).toEqual({ 'a.b': 1 });\n  });\n\n  it('should support consuming the return value of `toPairs`', () => {\n    const object = { 'a.b': 1 };\n    expect(fromPairs(toPairs(object))).toEqual(object);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(fromPairs).toEqualTypeOf<typeof fromPairsLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/fromPairs.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\n\ntype PropertyName = string | number | symbol;\n\n/**\n * Converts an array of key-value pairs into an object.\n *\n * @template T - The type of the values.\n * @param {ArrayLike<[PropertyName, T]> | null | undefined} pairs - An array of key-value pairs.\n * @returns {Record<string, T>} - An object where keys are strings and values are of type T.\n *\n * @example\n * const pairs = [['a', 1], ['b', 2]];\n * const result = fromPairs(pairs);\n * // => { a: 1, b: 2 }\n */\nexport function fromPairs<T>(pairs: ArrayLike<[PropertyName, T]> | null | undefined): Record<string, T>;\n\n/**\n * Converts an array of key-value pairs into an object.\n *\n * @param {ArrayLike<any[]> | null | undefined} pairs - An array of key-value pairs.\n * @returns {Record<string, any>} - An object where keys are strings and values can be any type.\n *\n * @example\n * const pairs = [['a', 1], ['b', 'hello']];\n * const result = fromPairs(pairs);\n * // => { a: 1, b: 'hello' }\n */\nexport function fromPairs(pairs: ArrayLike<any[]> | null | undefined): Record<string, any>;\n\n/**\n * Converts an array of key-value pairs into an object.\n *\n * @template T - The type of the keys in the resulting object. It must extend `PropertyKey`.\n * @template U - The type of the values in the resulting object.\n *\n * @param {Array<[T, U]>} pairs - An array of key-value pairs where each key is a `PropertyKey` and each value is of type `U`.\n * @returns {Record<T, U>} - An object where the keys are of type `T` and the values are of type `U`.\n *\n * @example\n * const pairs = [['a', 1], ['b', 2]];\n * const result = fromPairs(pairs);\n * // result will be: { a: 1, b: 2 }\n */\nexport function fromPairs<T>(\n  pairs: ArrayLike<[PropertyName, T]> | ArrayLike<any[]> | null | undefined\n): Record<string, any> | Record<string, T> {\n  if (!isArrayLike(pairs)) {\n    return {};\n  }\n\n  const result: Record<string, any> = {};\n\n  for (let i = 0; i < pairs.length; i++) {\n    const [key, value] = pairs[i];\n    result[key] = value;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/functions.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { functions as functionsLodash } from 'lodash';\nimport { functions } from './functions';\nimport { identity } from '../../function/identity';\nimport { noop } from '../../function/noop';\n\ndescribe('functions', () => {\n  it('should return the function names of an object', () => {\n    const object = { a: 'a', b: identity, c: /x/, d: noop };\n    const actual = functions(object).sort();\n\n    expect(actual).toEqual(['b', 'd']);\n  });\n\n  it('should not include inherited functions', () => {\n    function Foo(this: { a: typeof identity; b: string }) {\n      this.a = identity;\n      this.b = 'b';\n    }\n    Foo.prototype.c = noop;\n    // @ts-expect-error - Foo is a constructor\n    expect(functions(new Foo())).toEqual(['a']);\n  });\n\n  it('should return an empty array for null', () => {\n    expect(functions(null)).toEqual([]);\n  });\n\n  it('should return an empty array for undefined', () => {\n    expect(functions(undefined)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(functions).toEqualTypeOf<typeof functionsLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/functions.ts",
    "content": "import { keys } from './keys.ts';\n\n/**\n * Creates an array of property names from an object where the property values are functions.\n *\n * @param {any} object - The object to inspect.\n * @returns {string[]} - An array of function property names.\n *\n * @example\n * function Foo() {\n *   this.a = () => 'a';\n *   this.b = () => 'b';\n * }\n *\n * Foo.prototype.c = () => 'c';\n *\n * functions(new Foo);\n * // => ['a', 'b']\n */\nexport function functions(object: any): string[];\n\n/**\n * Creates an array of property names from an object where the property values are functions.\n *\n * Only checks for own properties with string keys. Inherited properties or\n * properties with Symbol keys are not included.\n *\n * @param {unknown} object The object to inspect.\n * @returns {string[]} An array of function property names.\n *\n * @example\n *\n * function Foo() {\n *   this.a = () => 'a'\n *   this.b = () => 'b'\n * }\n *\n * Foo.prototype.c = () => 'c'\n *\n * functions(new Foo)\n * // => ['a', 'b']\n */\nexport function functions(object: any): string[] {\n  if (object == null) {\n    return [];\n  }\n\n  return keys(object).filter(key => typeof object[key as keyof typeof object] === 'function');\n}\n"
  },
  {
    "path": "src/compat/object/functionsIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { functionsIn as functionsInLodash } from 'lodash';\nimport { functionsIn } from './functionsIn';\nimport { identity } from '../../function/identity';\nimport { noop } from '../../function/noop';\n\ndescribe('functionsIn', () => {\n  function Foo(this: any) {\n    this.a = function () {\n      return 'a';\n    };\n    this.b = function () {\n      return 'b';\n    };\n  }\n\n  Foo.prototype.c = function () {\n    return 'c';\n  };\n\n  it('should return the function property names of an object', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(functionsIn(new Foo())).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should return an empty array for non objects', () => {\n    const values = [null, undefined, 1, 'abc', true, Symbol('test')];\n    const expected = values.map(() => []);\n\n    const actual = values.map(value => functionsIn(value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should include inherited functions', () => {\n    function Bar(this: any) {\n      this.a = function () {\n        return 'a';\n      };\n    }\n\n    Bar.prototype.b = function () {\n      return 'b';\n    };\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const bar = new Bar();\n\n    expect(functionsIn(bar)).toEqual(['a', 'b']);\n  });\n\n  it('should work with plain objects', () => {\n    const object = {\n      a: function () {\n        return 'a';\n      },\n      b: function () {\n        return 'b';\n      },\n    };\n\n    expect(functionsIn(object)).toEqual(['a', 'b']);\n  });\n\n  it('should return the function names of an object', () => {\n    const object = { a: 'a', b: identity, c: /x/, d: noop };\n    const actual = functionsIn(object).sort();\n\n    expect(actual).toEqual(['b', 'd']);\n  });\n\n  it('should not include inherited functions', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = identity;\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.b = 'b';\n    }\n    Foo.prototype.c = noop;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(functionsIn(new Foo())).toEqual(['a', 'c']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(functionsIn).toEqualTypeOf<typeof functionsInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/functionsIn.ts",
    "content": "import { isFunction } from '../../predicate/isFunction.ts';\n\n/**\n * Returns an array of property names whose values are functions, including inherited properties.\n *\n * @param {*} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @example\n *\n * function Foo() {\n *   this.a = function() { return 'a'; };\n *   this.b = function() { return 'b'; };\n * }\n *\n * Foo.prototype.c = function() { return 'c'; };\n *\n * functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-object-type\nexport function functionsIn<T extends {}>(object: any): string[] {\n  if (object == null) {\n    return [];\n  }\n\n  const result: string[] = [];\n\n  for (const key in object) {\n    if (isFunction(object[key])) {\n      result.push(key);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/get.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { get as getLodash } from 'lodash';\nimport { get } from './get';\nimport { empties } from '../_internal/empties';\n\ndescribe('get', () => {\n  it('should return defaultVersion', () => {\n    const obj = { a: { b: 3 } };\n    expect(get(obj, 'a.c', null)).toBe(null);\n    expect(get(obj, 'a.d', 4)).toBe(4);\n    expect(get(obj, 'a.e', undefined)).toBe(undefined);\n    expect(get(obj, 0, 5)).toBe(5);\n    expect(get(obj, Symbol('a'), 3)).toBe(3);\n  });\n\n  it('should return value', () => {\n    const obj = { a: { b: 3 } };\n    expect(get(obj, 'a.b')).toBe(3);\n  });\n\n  it('should return value with array', () => {\n    const obj = { a: [{ b: 3 }] };\n    expect(get(obj, 'a[0].b')).toBe(3);\n  });\n\n  it('should return undefined if array index number is not provided', () => {\n    const obj = { a: [{ b: 1 }] };\n    expect(get(obj, 'a[].b')).toBe(undefined);\n  });\n\n  /**\n   * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/get-and-result.spec.js#L1\n   */\n  it(`should get string keyed property values`, () => {\n    const object = { a: 1 };\n\n    expect(get(object, 'a')).toBe(1);\n    expect(get(object, ['a'])).toBe(1);\n  });\n\n  it(`should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = props.map(key => get(object, key));\n\n    expect(actual).toEqual(['a', 'a', 'b', 'b']);\n  });\n\n  it(`should get symbol keyed property values`, () => {\n    const symbol = Symbol('a');\n    const object: any = {};\n    object[symbol] = 1;\n\n    expect(get(object, symbol)).toBe(1);\n  });\n\n  it(`should get deep property values`, () => {\n    const object = { a: { b: 2 } };\n\n    expect(get(object, 'a.b')).toBe(2);\n    expect(get(object, ['a', 'b'])).toBe(2);\n  });\n\n  it(`should get a key over a path`, () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    expect(get(object, 'a.b')).toBe(1);\n    expect(get(object, ['a.b'])).toBe(1);\n  });\n\n  it(`should not coerce array paths to strings`, () => {\n    const object = { 'a,b,c': 3, a: { b: { c: 4 } } };\n    expect(get(object, ['a', 'b', 'c'])).toBe(4);\n  });\n\n  it(`should not ignore empty brackets`, () => {\n    const object = { a: { '': 1 } };\n    expect(get(object, 'a[]')).toBe(1);\n  });\n\n  it(`should handle empty paths`, () => {\n    expect(get({}, '')).toBe(undefined);\n    expect(get({ '': 3 }, '')).toBe(3);\n\n    expect(get({}, [''])).toBe(undefined);\n    expect(get({ '': 3 }, [''])).toBe(3);\n  });\n\n  it(`should handle complex paths`, () => {\n    const object = {\n      a: { '-1.23': { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: 8 } } } } } } },\n    };\n\n    expect(get(object, 'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g')).toBe(8);\n    expect(get(object, ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'])).toBe(8);\n  });\n\n  it(`should return \\`undefined\\` when \\`object\\` is nullish`, () => {\n    expect(get(null, 'constructor')).toBe(undefined);\n    expect(get(null, ['constructor'])).toBe(undefined);\n  });\n\n  it(`should return \\`undefined\\` for deep paths when \\`object\\` is nullish`, () => {\n    expect(get(null, 'constructor.prototype.valueOf')).toEqual(undefined);\n    expect(get(null, ['constructor', 'prototype', 'valueOf'])).toEqual(undefined);\n  });\n\n  it(`should return \\`undefined\\` if parts of \\`path\\` are missing`, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const object = { a: [, null] };\n\n    expect(get(object, 'a[1].b.c')).toEqual(undefined);\n    expect(get(object, ['a', '1', 'b', 'c'])).toEqual(undefined);\n  });\n\n  it(`should be able to return \\`null\\` values`, () => {\n    const object = { a: { b: null } };\n\n    expect(get(object, 'a.b')).toEqual(null);\n    expect(get(object, ['a', 'b'])).toEqual(null);\n  });\n\n  it(`should follow \\`path\\` over non-plain objects`, () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    Number.prototype.a = { b: 2 };\n\n    expect(get(0, 'a.b')).toEqual(2);\n    expect(get(0, ['a', 'b'])).toEqual(2);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    delete Number.prototype.a;\n  });\n\n  it(`should return the default value for \\`undefined\\` values`, () => {\n    const object = { a: {} };\n    const values = empties.concat(true, new Date(), 1, /x/, 'a');\n    const expected = values.map(value => [value, value]);\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const actual = values.map(value => [get(object, path, value), get(null, path, value)]);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return the default value when \\`path\\` is empty`, () => {\n    expect(get({}, [], 'a')).toBe('a');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(get<unknown>).toEqualTypeOf<typeof getLodash<unknown>>();\n  });\n\n  it('should prevent prototype pollution by returning defaultValue for __proto__ access', () => {\n    expect(get({ ['__proto__']: {} }, '__proto__', 'defaultValue')).toBe('defaultValue');\n    expect(get({ ['__proto__']: {} }, ['__proto__'], 'defaultValue')).toBe('defaultValue');\n    expect(get({ ['__proto__']: {} }, { toString: () => '__proto__' } as any, 'defaultValue')).toBe('defaultValue');\n  });\n\n  it('should return defaultValue when property value is undefined', () => {\n    const object = { '-0': undefined };\n    expect(get(object, Object(-0), 'defaultValue')).toBe('defaultValue');\n  });\n});\n"
  },
  {
    "path": "src/compat/object/get.ts",
    "content": "import { isUnsafeProperty } from '../../_internal/isUnsafeProperty.ts';\nimport type { GetFieldType } from '../_internal/GetFieldType.ts';\nimport { isDeepKey } from '../_internal/isDeepKey.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey\n * @param {TObject} object - The object to query.\n * @param {TKey | [TKey]} path - The path of the property to get.\n * @returns {TObject[TKey]} Returns the resolved value.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * get(object, 'a[0].b.c');\n * // => 3\n */\nexport function get<TObject extends object, TKey extends keyof TObject>(\n  object: TObject,\n  path: TKey | [TKey]\n): TObject[TKey];\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey\n * @param {TObject | null | undefined} object - The object to query.\n * @param {TKey | [TKey]} path - The path of the property to get.\n * @returns {TObject[TKey] | undefined} Returns the resolved value.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * get(object, 'a[0].b.c');\n * // => 3\n */\nexport function get<TObject extends object, TKey extends keyof TObject>(\n  object: TObject | null | undefined,\n  path: TKey | [TKey]\n): TObject[TKey] | undefined;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey\n * @template TDefault\n * @param {TObject | null | undefined} object - The object to query.\n * @param {TKey | [TKey]} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<TObject[TKey], undefined> | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * get(object, 'a[0].b.c', 'default');\n * // => 3\n */\nexport function get<TObject extends object, TKey extends keyof TObject, TDefault>(\n  object: TObject | null | undefined,\n  path: TKey | [TKey],\n  defaultValue: TDefault\n): Exclude<TObject[TKey], undefined> | TDefault;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @param {TObject} object - The object to query.\n * @param {[TKey1, TKey2]} path - The path of the property to get.\n * @returns {TObject[TKey1][TKey2]} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': 2 } };\n * get(object, ['a', 'b']);\n * // => 2\n */\nexport function get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(\n  object: TObject,\n  path: [TKey1, TKey2]\n): TObject[TKey1][TKey2];\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2]} path - The path of the property to get.\n * @returns {NonNullable<TObject[TKey1]>[TKey2] | undefined} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': 2 } };\n * get(object, ['a', 'b']);\n * // => 2\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n>(object: TObject | null | undefined, path: [TKey1, TKey2]): NonNullable<TObject[TKey1]>[TKey2] | undefined;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TDefault\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2]} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': 2 } };\n * get(object, ['a', 'b'], 'default');\n * // => 2\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n  TDefault,\n>(\n  object: TObject | null | undefined,\n  path: [TKey1, TKey2],\n  defaultValue: TDefault\n): Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @param {TObject} object - The object to query.\n * @param {[TKey1, TKey2, TKey3]} path - The path of the property to get.\n * @returns {TObject[TKey1][TKey2][TKey3]} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': 3 } } };\n * get(object, ['a', 'b', 'c']);\n * // => 3\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof TObject[TKey1],\n  TKey3 extends keyof TObject[TKey1][TKey2],\n>(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3];\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2, TKey3]} path - The path of the property to get.\n * @returns {NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': 3 } } };\n * get(object, ['a', 'b', 'c']);\n * // => 3\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n  TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>,\n>(\n  object: TObject | null | undefined,\n  path: [TKey1, TKey2, TKey3]\n): NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @template TDefault\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2, TKey3]} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': 3 } } };\n * get(object, ['a', 'b', 'c'], 'default');\n * // => 3\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n  TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>,\n  TDefault,\n>(\n  object: TObject | null | undefined,\n  path: [TKey1, TKey2, TKey3],\n  defaultValue: TDefault\n): Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault;\n\n/**\n * Gets the value at path of object.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @template TKey4\n * @param {TObject} object - The object to query.\n * @param {[TKey1, TKey2, TKey3, TKey4]} path - The path of the property to get.\n * @returns {TObject[TKey1][TKey2][TKey3][TKey4]} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': { 'd': 4 } } } };\n * get(object, ['a', 'b', 'c', 'd']);\n * // => 4\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof TObject[TKey1],\n  TKey3 extends keyof TObject[TKey1][TKey2],\n  TKey4 extends keyof TObject[TKey1][TKey2][TKey3],\n>(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4];\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, undefined is returned.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @template TKey4\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2, TKey3, TKey4]} path - The path of the property to get.\n * @returns {NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': { 'd': 4 } } } };\n * get(object, ['a', 'b', 'c', 'd']);\n * // => 4\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n  TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>,\n  TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>,\n>(\n  object: TObject | null | undefined,\n  path: [TKey1, TKey2, TKey3, TKey4]\n): NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TObject\n * @template TKey1\n * @template TKey2\n * @template TKey3\n * @template TKey4\n * @template TDefault\n * @param {TObject | null | undefined} object - The object to query.\n * @param {[TKey1, TKey2, TKey3, TKey4]} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { 'a': { 'b': { 'c': { 'd': 4 } } } };\n * get(object, ['a', 'b', 'c', 'd'], 'default');\n * // => 4\n */\nexport function get<\n  TObject extends object,\n  TKey1 extends keyof TObject,\n  TKey2 extends keyof NonNullable<TObject[TKey1]>,\n  TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>,\n  TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>,\n  TDefault,\n>(\n  object: TObject | null | undefined,\n  path: [TKey1, TKey2, TKey3, TKey4],\n  defaultValue: TDefault\n): Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault;\n\n/**\n * Gets the value at path of object.\n *\n * @template T\n * @param {Record<number, T>} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @returns {T} Returns the resolved value.\n *\n * @example\n * const object = { 0: 'a', 1: 'b', 2: 'c' };\n * get(object, 1);\n * // => 'b'\n */\nexport function get<T>(object: Record<number, T>, path: number): T;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, undefined is returned.\n *\n * @template T\n * @param {Record<number, T> | null | undefined} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @returns {T | undefined} Returns the resolved value.\n *\n * @example\n * const object = { 0: 'a', 1: 'b', 2: 'c' };\n * get(object, 1);\n * // => 'b'\n */\nexport function get<T>(object: Record<number, T> | null | undefined, path: number): T | undefined;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template T\n * @template TDefault\n * @param {Record<number, T> | null | undefined} object - The object to query.\n * @param {number} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {T | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { 0: 'a', 1: 'b', 2: 'c' };\n * get(object, 1, 'default');\n * // => 'b'\n */\nexport function get<T, TDefault>(\n  object: Record<number, T> | null | undefined,\n  path: number,\n  defaultValue: TDefault\n): T | TDefault;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.\n *\n * @template TDefault\n * @param {null | undefined} object - The object to query.\n * @param {PropertyPath} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {TDefault} Returns the default value.\n *\n * @example\n * get(null, 'a.b.c', 'default');\n * // => 'default'\n */\nexport function get<TDefault>(object: null | undefined, path: PropertyPath, defaultValue: TDefault): TDefault;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, undefined is returned.\n *\n * @param {null | undefined} object - The object to query.\n * @param {PropertyPath} path - The path of the property to get.\n * @returns {undefined} Returns undefined.\n *\n * @example\n * get(null, 'a.b.c');\n * // => undefined\n */\nexport function get(object: null | undefined, path: PropertyPath): undefined;\n\n/**\n * Gets the value at path of object using type-safe path.\n *\n * @template TObject\n * @template TPath\n * @param {TObject} data - The object to query.\n * @param {TPath} path - The path of the property to get.\n * @returns {string extends TPath ? any : GetFieldType<TObject, TPath>} Returns the resolved value.\n *\n * @example\n * const object = { a: { b: { c: 1 } } };\n * get(object, 'a.b.c');\n * // => 1\n */\nexport function get<TObject, TPath extends string>(\n  data: TObject,\n  path: TPath\n): string extends TPath ? any : GetFieldType<TObject, TPath>;\n\n/**\n * Gets the value at path of object using type-safe path. If the resolved value is undefined, the defaultValue is returned.\n *\n * @template TObject\n * @template TPath\n * @template TDefault\n * @param {TObject} data - The object to query.\n * @param {TPath} path - The path of the property to get.\n * @param {TDefault} defaultValue - The value returned if the resolved value is undefined.\n * @returns {Exclude<GetFieldType<TObject, TPath>, null | undefined> | TDefault} Returns the resolved value.\n *\n * @example\n * const object = { a: { b: { c: 1 } } };\n * get(object, 'a.b.d', 'default');\n * // => 'default'\n */\nexport function get<TObject, TPath extends string, TDefault = GetFieldType<TObject, TPath>>(\n  data: TObject,\n  path: TPath,\n  defaultValue: TDefault\n): Exclude<GetFieldType<TObject, TPath>, null | undefined> | TDefault;\n\n/**\n * Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned.\n *\n * @param {any} object - The object to query.\n * @param {PropertyPath} path - The path of the property to get.\n * @param {any} [defaultValue] - The value returned if the resolved value is undefined.\n * @returns {any} Returns the resolved value.\n *\n * @example\n * const object = { a: { b: { c: 1 } } };\n * get(object, 'a.b.c', 'default');\n * // => 1\n */\nexport function get(object: any, path: PropertyPath, defaultValue?: any): any;\n\n/**\n * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n *\n * @param {any} object - The object to query.\n * @param {PropertyKey | readonly PropertyKey[]} path - The path of the property to get.\n * @param {any} [defaultValue] - The value returned if the resolved value is undefined.\n * @returns {any} Returns the resolved value.\n *\n * @example\n * const object = { a: { b: { c: 1 } } };\n * get(object, 'a.b.c');\n * // => 1\n *\n * get(object, ['a', 'b', 'c']);\n * // => 1\n *\n * get(object, 'a.b.d', 'default');\n * // => 'default'\n */\nexport function get(object: any, path: PropertyKey | readonly PropertyKey[], defaultValue?: any): any {\n  if (object == null) {\n    return defaultValue;\n  }\n\n  switch (typeof path) {\n    case 'string': {\n      if (isUnsafeProperty(path)) {\n        return defaultValue;\n      }\n\n      const result = object[path];\n\n      if (result === undefined) {\n        if (isDeepKey(path)) {\n          return get(object, toPath(path), defaultValue);\n        } else {\n          return defaultValue;\n        }\n      }\n\n      return result;\n    }\n    case 'number':\n    case 'symbol': {\n      if (typeof path === 'number') {\n        path = toKey(path);\n      }\n\n      const result = object[path as PropertyKey];\n\n      if (result === undefined) {\n        return defaultValue;\n      }\n\n      return result;\n    }\n    default: {\n      if (Array.isArray(path)) {\n        return getWithPath(object, path, defaultValue);\n      }\n\n      if (Object.is(path?.valueOf(), -0)) {\n        path = '-0';\n      } else {\n        path = String(path);\n      }\n\n      if (isUnsafeProperty(path)) {\n        return defaultValue;\n      }\n\n      const result = object[path];\n\n      if (result === undefined) {\n        return defaultValue;\n      }\n\n      return result;\n    }\n  }\n}\n\nfunction getWithPath(object: any, path: readonly PropertyKey[], defaultValue?: any): any {\n  if (path.length === 0) {\n    return defaultValue;\n  }\n\n  let current = object;\n\n  for (let index = 0; index < path.length; index++) {\n    if (current == null) {\n      return defaultValue;\n    }\n\n    if (isUnsafeProperty(path[index])) {\n      return defaultValue;\n    }\n\n    current = current[path[index]];\n  }\n\n  if (current === undefined) {\n    return defaultValue;\n  }\n\n  return current;\n}\n"
  },
  {
    "path": "src/compat/object/has.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { has as hasLodash } from 'lodash';\nimport { has } from './has';\nimport { range } from '../../math/range';\nimport { args } from '../_internal/args';\nimport { symbol } from '../_internal/symbol';\nimport { toArgs } from '../_internal/toArgs';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('has', () => {\n  it(`should check for own properties`, () => {\n    const object = { a: 1 };\n\n    ['a', ['a']].forEach(path => {\n      expect(has(object, path)).toBe(true);\n    });\n  });\n\n  it(`should not use the \\`hasOwnProperty\\` method of \\`object\\``, () => {\n    const object = { hasOwnProperty: null, a: 1 };\n    expect(has(object, 'a')).toBe(true);\n  });\n\n  it(`should support deep paths`, () => {\n    const object = { a: { b: 2 } };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      expect(has(object, path)).toBe(true);\n    });\n\n    ['a.a', ['a', 'a']].forEach(path => {\n      expect(has(object, path)).toBe(false);\n    });\n  });\n\n  it(`should coerce \\`path\\` to a string`, () => {\n    function fn() {}\n    fn.toString = () => 'fn';\n\n    const object = { null: 1, undefined: 2, fn: 3, '[object Object]': 4 };\n    const paths: any[] = [null, undefined, fn, {}];\n    const expected = paths.map(stubTrue);\n\n    range(2).forEach(index => {\n      const actual = paths.map(path => has(object, index ? [path] : path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    expect(has(args, 1)).toBe(true);\n  });\n\n  it(`should work with a non-string \\`path\\``, () => {\n    const array = [1, 2, 3];\n\n    [1, [1]].forEach(path => {\n      expect(has(array, path)).toBe(true);\n    });\n  });\n\n  it(`should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = props.map(stubTrue);\n\n    const actual = props.map(key => has(object, key));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with a symbol \\`path\\``, () => {\n    function Foo() {}\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    Foo.prototype[symbol] = 1;\n\n    const symbol2 = Symbol('b');\n    Object.defineProperty(Foo.prototype, symbol2, {\n      configurable: true,\n      enumerable: false,\n      writable: true,\n      value: 2,\n    });\n\n    const object = Foo.prototype;\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(has(object, symbol)).toBe(true);\n    expect(has(object, symbol2)).toBe(true);\n  });\n\n  it(`has should check for a key over a path`, () => {\n    const object = { 'a.b': 1 };\n\n    ['a.b', ['a.b']].forEach(path => {\n      expect(has(object, path)).toBe(true);\n    });\n  });\n\n  it(`should return \\`true\\` for indexes of sparse values`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => has(value, 0));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` for indexes of sparse values with deep paths`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n    const expected = values.map(() => [true, true]);\n\n    const actual = values.map(value => ['a[0]', ['a', '0']].map(path => has({ a: value }, path)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return false for inherited properties`, () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    ['a', ['a']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(has(new Foo(), path)).toBe(false);\n    });\n  });\n\n  it(`should return false for nested inherited properties`, () => {\n    function Foo() {}\n    Foo.prototype.a = { b: 1 };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(has(new Foo(), path)).toBe(false);\n    });\n  });\n\n  it(`should return \\`false\\` when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor', ['constructor']].forEach(path => {\n      const actual = values.map(value => has(value, path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` for deep paths when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']].forEach(path => {\n      const actual = values.map(value => has(value, path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` for nullish values of nested objects`, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const actual = values.map((value, index) => {\n        const object = index ? { a: value } : {};\n        return has(object, path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` over sparse values of deep paths`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n    const expected = values.map(() => [false, false]);\n\n    const actual = values.map(value => ['a[0].b', ['a', '0', 'b']].map(path => has({ a: value }, path)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`false\\` for empty paths`, () => {\n    expect(has({ a: null }, [])).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(has<unknown>).toEqualTypeOf<typeof hasLodash<unknown>>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/has.ts",
    "content": "import { isDeepKey } from '../_internal/isDeepKey.ts';\nimport { isIndex } from '../_internal/isIndex.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { isArguments } from '../predicate/isArguments.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Checks if a given path exists within an object.\n *\n * @template T\n * @template K\n * @param {T} object - The object to query.\n * @param {K} path - The path to check.\n * @returns {object is T & { [P in K]: P extends keyof T ? T[P] : Record<string, unknown> extends T ? T[keyof T] : unknown } & { [key: symbol]: unknown }} Returns a type guard indicating if the path exists in the object.\n *\n * @example\n * const obj = { a: 1, b: { c: 2 } };\n *\n * if (has(obj, 'a')) {\n *   console.log(obj.a); // TypeScript knows obj.a exists\n * }\n *\n * if (has(obj, 'b')) {\n *   console.log(obj.b.c); // TypeScript knows obj.b exists\n * }\n */\nexport function has<T, K extends PropertyKey>(\n  object: T,\n  path: K\n): object is T & { [P in K]: P extends keyof T ? T[P] : Record<string, unknown> extends T ? T[keyof T] : unknown } & {\n  [key: symbol]: unknown;\n};\n\n/**\n * Checks if a given path exists within an object.\n *\n * @template T\n * @param {T} object - The object to query.\n * @param {PropertyPath} path - The path to check. This can be a single property key,\n *        an array of property keys, or a string representing a deep path.\n * @returns {boolean} Returns `true` if the path exists in the object, `false` otherwise.\n *\n * @example\n * const obj = { a: { b: { c: 3 } } };\n *\n * has(obj, 'a'); // true\n * has(obj, ['a', 'b']); // true\n * has(obj, ['a', 'b', 'c']); // true\n * has(obj, 'a.b.c'); // true\n * has(obj, 'a.b.d'); // false\n * has(obj, ['a', 'b', 'c', 'd']); // false\n * has([], 0); // false\n * has([1, 2, 3], 2); // true\n * has([1, 2, 3], 5); // false\n */\nexport function has<T>(object: T, path: PropertyPath): boolean;\n\n/**\n * Checks if a given path exists within an object.\n *\n * You can provide the path as a single property key, an array of property keys,\n * or a string representing a deep path.\n *\n * If the path is an index and the object is an array or an arguments object, the function will verify\n * if the index is valid and within the bounds of the array or arguments object, even if the array or\n * arguments object is sparse (i.e., not all indexes are defined).\n *\n * @param {any} object - The object to query.\n * @param {PropertyKey | readonly PropertyKey[]} path - The path to check. This can be a single property key,\n *        an array of property keys, or a string representing a deep path.\n * @returns {boolean} Returns `true` if the path exists in the object, `false` otherwise.\n *\n * @example\n *\n * const obj = { a: { b: { c: 3 } } };\n *\n * has(obj, 'a'); // true\n * has(obj, ['a', 'b']); // true\n * has(obj, ['a', 'b', 'c']); // true\n * has(obj, 'a.b.c'); // true\n * has(obj, 'a.b.d'); // false\n * has(obj, ['a', 'b', 'c', 'd']); // false\n * has([], 0); // false\n * has([1, 2, 3], 2); // true\n * has([1, 2, 3], 5); // false\n */\nexport function has(object: any, path: PropertyKey | readonly PropertyKey[]): boolean {\n  let resolvedPath;\n\n  if (Array.isArray(path)) {\n    resolvedPath = path;\n  } else if (typeof path === 'string' && isDeepKey(path) && object?.[path] == null) {\n    resolvedPath = toPath(path);\n  } else {\n    resolvedPath = [path];\n  }\n\n  if (resolvedPath.length === 0) {\n    return false;\n  }\n\n  let current = object;\n\n  for (let i = 0; i < resolvedPath.length; i++) {\n    const key = resolvedPath[i];\n\n    // Check if the current key is a direct property of the current object\n    if (current == null || !Object.hasOwn(current, key)) {\n      const isSparseIndex = (Array.isArray(current) || isArguments(current)) && isIndex(key) && key < current.length;\n\n      if (!isSparseIndex) {\n        return false;\n      }\n    }\n\n    current = current[key];\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/compat/object/hasIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { hasIn as hasInLodash } from 'lodash';\nimport { has } from './has';\nimport { hasIn } from './hasIn';\nimport { range } from '../../math/range';\nimport { args } from '../_internal/args';\nimport { symbol } from '../_internal/symbol';\nimport { toArgs } from '../_internal/toArgs';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('hasIn', () => {\n  it(`should check for own and inherited properties`, () => {\n    const object = { a: 1 };\n\n    ['a', ['a']].forEach(path => {\n      expect(hasIn(object, path)).toBe(true);\n    });\n\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    ['a', ['a']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(hasIn(new Foo(), path)).toBe(true);\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(has(new Foo(), path)).toBe(false);\n    });\n  });\n\n  it(`should not use the \\`hasOwnProperty\\` method of \\`object\\``, () => {\n    const object = { hasOwnProperty: null, a: 1 };\n    expect(hasIn(object, 'a')).toBe(true);\n  });\n\n  it(`should support deep paths`, () => {\n    const object = { a: { b: 2 } };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      expect(hasIn(object, path)).toBe(true);\n    });\n\n    ['a.a', ['a', 'a']].forEach(path => {\n      expect(hasIn(object, path)).toBe(false);\n    });\n  });\n\n  it(`should check for nested inherited properties`, () => {\n    function Foo() {}\n    Foo.prototype.a = { b: 1 };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(hasIn(new Foo(), path)).toBe(true);\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(has(new Foo(), path)).toBe(false);\n    });\n  });\n\n  it(`should coerce \\`path\\` to a string`, () => {\n    function fn() {}\n    fn.toString = () => 'fn';\n\n    const object = { null: 1, undefined: 2, fn: 3, '[object Object]': 4 };\n    const paths: any[] = [null, undefined, fn, {}];\n    const expected = paths.map(stubTrue);\n\n    range(2).forEach(index => {\n      const actual = paths.map(path => hasIn(object, index ? [path] : path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    expect(hasIn(args, 1)).toBe(true);\n  });\n\n  it(`should work with a non-string \\`path\\``, () => {\n    const array = [1, 2, 3];\n\n    [1, [1]].forEach(path => {\n      expect(hasIn(array, path)).toBe(true);\n    });\n  });\n\n  it(`should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = props.map(stubTrue);\n\n    const actual = props.map(key => hasIn(object, key));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with a symbol \\`path\\``, () => {\n    function Foo() {}\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    Foo.prototype[symbol] = 1;\n\n    const symbol2 = Symbol('b');\n    Object.defineProperty(Foo.prototype, symbol2, {\n      configurable: true,\n      enumerable: false,\n      writable: true,\n      value: 2,\n    });\n\n    const object = Foo.prototype;\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(hasIn(object, symbol)).toBe(true);\n    expect(hasIn(object, symbol2)).toBe(true);\n  });\n\n  it(`should check for a key over a path`, () => {\n    const object = { 'a.b': 1 };\n\n    ['a.b', ['a.b']].forEach(path => {\n      expect(hasIn(object, path)).toBe(true);\n    });\n  });\n\n  it(`should return \\`true\\` for indexes of sparse values`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => hasIn(value, 0));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` for indexes of sparse values with deep paths`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n    const expected = values.map(() => [true, true]);\n\n    const actual = values.map(value => ['a[0]', ['a', '0']].map(path => hasIn({ a: value }, path)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` for inherited properties`, () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    ['a', ['a']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(hasIn(new Foo(), path)).toBe(true);\n    });\n  });\n\n  it(`should return \\`true\\` for inherited properties on Object.prototype`, () => {\n    const object = {};\n    ['toString', 'valueOf', 'constructor'].forEach(prop => {\n      expect(hasIn(object, prop)).toBe(true);\n      expect(has(object, prop)).toBe(false);\n    });\n  });\n\n  it(`should return \\`true\\` for nested inherited properties`, () => {\n    function Foo() {}\n    Foo.prototype.a = { b: 1 };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(hasIn(new Foo(), path)).toBe(true);\n    });\n  });\n\n  it(`should return \\`false\\` when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor', ['constructor']].forEach(path => {\n      const actual = values.map(value => hasIn(value, path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` for deep paths when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']].forEach(path => {\n      const actual = values.map(value => hasIn(value, path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` for nullish values of nested objects`, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const actual = values.map((value, index) => {\n        const object = index ? { a: value } : {};\n        return hasIn(object, path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`false\\` over sparse values of deep paths`, () => {\n    const sparseArgs = toArgs([1]);\n    const sparseArray = Array(1);\n    const sparseString = Object('a');\n\n    delete sparseArgs[0];\n\n    const values = [sparseArgs, sparseArray, sparseString];\n    const expected = values.map(() => [false, false]);\n\n    const actual = values.map(value => ['a[0].b', ['a', '0', 'b']].map(path => hasIn({ a: value }, path)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`false\\` for empty paths`, () => {\n    expect(hasIn({ a: null }, [])).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(hasIn).toEqualTypeOf<typeof hasInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/hasIn.ts",
    "content": "import { isDeepKey } from '../_internal/isDeepKey.ts';\nimport { isIndex } from '../_internal/isIndex.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { isArguments } from '../predicate/isArguments.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Checks if a given path exists in an object, **including inherited properties**.\n *\n * You can provide the path as a single property key, an array of property keys,\n * or a string representing a deep path.\n *\n * Unlike `has`, which only checks for own properties, `hasIn` also checks for properties\n * in the prototype chain.\n *\n * If the path is an index and the object is an array or an arguments object, the function will verify\n * if the index is valid and within the bounds of the array or arguments object, even if the array or\n * arguments object is sparse (i.e., not all indexes are defined).\n *\n * @template T\n * @param {T} object - The object to query.\n * @param {PropertyPath} path - The path to check. This can be a single property key,\n *        an array of property keys, or a string representing a deep path.\n * @returns {boolean} Returns `true` if the path exists (own or inherited), `false` otherwise.\n *\n * @example\n *\n * const obj = { a: { b: { c: 3 } } };\n *\n * hasIn(obj, 'a'); // true\n * hasIn(obj, ['a', 'b']); // true\n * hasIn(obj, ['a', 'b', 'c']); // true\n * hasIn(obj, 'a.b.c'); // true\n * hasIn(obj, 'a.b.d'); // false\n * hasIn(obj, ['a', 'b', 'c', 'd']); // false\n *\n * // Example with inherited properties:\n * function Rectangle() {}\n * Rectangle.prototype.area = function() {};\n *\n * const rect = new Rectangle();\n * hasIn(rect, 'area'); // true\n * has(rect, 'area'); // false - has only checks own properties\n */\nexport function hasIn<T>(object: T, path: PropertyPath): boolean {\n  if (object == null) {\n    return false;\n  }\n\n  let resolvedPath;\n\n  if (Array.isArray(path)) {\n    resolvedPath = path;\n  } else if (typeof path === 'string' && isDeepKey(path) && (object as any)[path] == null) {\n    resolvedPath = toPath(path);\n  } else {\n    resolvedPath = [path];\n  }\n\n  if (resolvedPath.length === 0) {\n    return false;\n  }\n\n  let current = object;\n\n  for (let i = 0; i < resolvedPath.length; i++) {\n    const key = resolvedPath[i] as keyof T;\n\n    // hasIn: check both own and inherited properties\n    if (current == null || !(key in Object(current))) {\n      const isSparseIndex =\n        (Array.isArray(current) || isArguments(current)) && isIndex(key) && (key as number) < current.length;\n\n      if (!isSparseIndex) {\n        return false;\n      }\n    }\n\n    current = current[key] as NonNullable<T>;\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/compat/object/invert.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { invert as invertLodash } from 'lodash';\nimport { invert } from './invert';\n\ndescribe('invert', () => {\n  it('should invert an object', () => {\n    const object = { a: 1, b: 2 };\n    const actual = invert(object);\n\n    expect(actual).toEqual({ 1: 'a', 2: 'b' });\n    expect(invert(actual)).toEqual({ a: '1', b: '2' });\n  });\n\n  it('should work with values that shadow keys on `Object.prototype`', () => {\n    const object = { a: 'hasOwnProperty', b: 'constructor' };\n    expect(invert(object)).toEqual({ hasOwnProperty: 'a', constructor: 'b' });\n  });\n\n  it('should work with an object that has a `length` property', () => {\n    const object = { 0: 'a', 1: 'b', length: 2 };\n    expect(invert(object)).toEqual({ a: '0', b: '1', 2: 'length' });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(invert).toEqualTypeOf<typeof invertLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/invert.ts",
    "content": "import { invert as invertToolkit } from '../../object/invert.ts';\n\n/**\n * Inverts the keys and values of an object.\n *\n * @param {object} object - The object to invert.\n * @returns {Record<string, string>} - Returns the new inverted object.\n *\n * @example\n * invert({ a: 1, b: 2, c: 3 });\n * // => { '1': 'a', '2': 'b', '3': 'c' }\n */\nexport function invert(object: object): Record<string, string>;\n\n/**\n * Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.\n *\n * This function takes an object and creates a new object by inverting its keys and values. If the input object has duplicate values,\n * the key of the last occurrence will be used as the value for the new key in the output object. It effectively creates a reverse mapping\n * of the input object's key-value pairs.\n *\n * @template K - Type of the keys in the input object (string, number, symbol)\n * @template V - Type of the values in the input object (string, number, symbol)\n * @param {Record<K, V>} obj - The input object whose keys and values are to be inverted\n * @returns {Record<V, K>} - A new object with keys and values inverted\n *\n * @example\n * invert({ a: 1, b: 2, c: 3 }); // { 1: 'a', 2: 'b', 3: 'c' }\n * invert({ 1: 'a', 2: 'b', 3: 'c' }); // { a: '1', b: '2', c: '3' }\n * invert({ a: 1, 2: 'b', c: 3, 4: 'd' }); // { 1: 'a', b: '2', 3: 'c', d: '4' }\n * invert({ a: Symbol('sym1'), b: Symbol('sym2') }); // { [Symbol('sym1')]: 'a', [Symbol('sym2')]: 'b' }\n */\nexport function invert(obj: object): Record<string, string> {\n  return invertToolkit(obj);\n}\n"
  },
  {
    "path": "src/compat/object/invertBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { invertBy as invertByLodash } from 'lodash';\nimport { invertBy } from './invertBy.ts';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/invertBy.spec.js\n */\n\ndescribe('invertBy', () => {\n  const object = { a: 1, b: 2, c: 1 };\n\n  it('should transform keys by `iteratee`', () => {\n    const expected = { group1: ['a', 'c'], group2: ['b'] };\n\n    const actual = invertBy(object, value => `group${value}`);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use `identity` when `iteratee` is nullish', () => {\n    const values = [undefined, null];\n    const expected = values.map(() => ({ '1': ['a', 'c'], '2': ['b'] }));\n\n    const actual = values.map((value, index) => (index ? invertBy(object, value as any) : invertBy(object)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should only add multiple values to own, not inherited, properties', () => {\n    const objectWithInheritedProps = { a: 'hasOwnProperty', b: 'constructor' };\n    const expected = { hasOwnProperty: ['a'], constructor: ['b'] };\n\n    const actual = invertBy(objectWithInheritedProps);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty object for nullish values', () => {\n    expect(invertBy(null)).toEqual({});\n    expect(invertBy(undefined)).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(invertBy).toEqualTypeOf<typeof invertByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/invertBy.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { isNil } from '../../predicate/isNil.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee as iterateeToolkit } from '../util/iteratee.ts';\n\n/**\n * Creates a new object that reverses the keys and values of the given object, similar to the invert.\n * The values of the new object are arrays of keys that correspond to the value returned by the `iteratee` function.\n *\n * @param {Record<string|number, T>} object - The object to iterate over\n * @param {ValueIteratee<T>} [iteratee] - Optional function to transform values into keys\n * @returns {Record<string, string[]>} An object with transformed values as keys and arrays of original keys as values\n *\n * @example\n * const obj = { a: 1, b: 2, c: 1 };\n * invertBy(obj); // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * @example\n * const obj = { a: 1, b: 2, c: 1 };\n * invertBy(obj, value => `group${value}`); // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\nexport function invertBy<T>(\n  object: Record<string, T> | Record<number, T> | null | undefined,\n  interatee?: ValueIteratee<T>\n): Record<string, string[]>;\n\n/**\n * Creates a new object that reverses the keys and values of the given object, similar to the invert.\n * The values of the new object are arrays of keys that correspond to the value returned by the `iteratee` function.\n *\n * @param {T} object - The object to iterate over\n * @param {ValueIteratee<T[keyof T]>} [iteratee] - Optional function to transform values into keys\n * @returns {Record<string, string[]>} An object with transformed values as keys and arrays of original keys as values\n *\n * @example\n * const obj = { foo: { id: 1 }, bar: { id: 2 }, baz: { id: 1 } };\n * invertBy(obj, value => String(value.id)); // => { '1': ['foo', 'baz'], '2': ['bar'] }\n */\nexport function invertBy<T extends object>(\n  object: T | null | undefined,\n  interatee?: ValueIteratee<T[keyof T]>\n): Record<string, string[]>;\n\n/**\n * Creates a new object that reverses the keys and values of the given object, similar to the invert.\n *\n * The `iteratee` function specifies how the values are reversed into keys. If no `iteratee` function is provided, the values are used as keys as-is.\n *\n * The values of the new object are arrays of keys that correspond to the value returned by the `iteratee` function.\n *\n * @param {Record<K, V>} object - The object to iterate over.\n * @param {(value: V) => string} [iteratee] - Optional. A function that generates a key based on each value in the object.\n * If not provided, the function defaults to using the value as a string.\n *\n * @returns {Record<string, K[]>} An object where the keys are generated by the iteratee, and the values\n * are arrays of property names (keys) from the input object that correspond to those keys.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 1 };\n * const result = invertBy(obj);\n * // result => { '1': ['a', 'c'], '2': ['b'] }\n *\n * @example\n * const obj = { a: 1, b: 2, c: 1 };\n * const result = invertBy(obj, value => `group${value}`);\n * // result => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\nexport function invertBy<T extends object>(\n  object: T | null | undefined,\n  iteratee?: ValueIteratee<T[keyof T]>\n): Record<string, string[]> {\n  const result = {} as Record<string, string[]>;\n\n  if (isNil(object)) {\n    return result;\n  }\n\n  if (iteratee == null) {\n    iteratee = identity as (value: T[keyof T]) => string;\n  }\n\n  const keys = Object.keys(object);\n  const getString = iterateeToolkit(iteratee);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i] as string;\n\n    const value = (object as any)[key];\n    const valueStr = getString(value);\n\n    if (Array.isArray(result[valueStr])) {\n      result[valueStr].push(key);\n    } else {\n      result[valueStr] = [key];\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/keys.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { keys as keysLodash } from 'lodash';\nimport { keys } from './keys';\nimport { args } from '../_internal/args';\nimport { arrayProto } from '../_internal/arrayProto';\nimport { numberProto } from '../_internal/numberProto';\nimport { objectProto } from '../_internal/objectProto';\nimport { primitives } from '../_internal/primitives';\nimport { strictArgs } from '../_internal/strictArgs';\nimport { stringProto } from '../_internal/stringProto';\nimport { constant } from '../util/constant';\nimport { stubArray } from '../util/stubArray';\n\n/**\n * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/keys-methods.spec.js#L1\n */\ndescribe('keys', () => {\n  it('should return the string keyed property names of `object`', () => {\n    const actual = keys({ a: 1, b: 1 }).sort();\n\n    expect(actual).toEqual(['a', 'b']);\n  });\n\n  it('should not include inherited string keyed properties', () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const expected = ['a'];\n    // @ts-expect-error - Foo is a constructor\n    const actual = keys(new Foo()).sort();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const array = [1];\n    array[2] = 3;\n\n    const actual = keys(array).sort();\n\n    expect(actual).toEqual(['0', '1', '2']);\n  });\n\n  it('should return keys for custom properties on arrays', () => {\n    const array: any = [1];\n    array.a = 1;\n\n    const actual = keys(array).sort();\n\n    expect(actual).toEqual(['0', 'a']);\n  });\n\n  it('should not include inherited string keyed properties of arrays', () => {\n    arrayProto.a = 1;\n\n    const actual = keys([1]).sort();\n    const expected = ['0'];\n    expect(actual).toEqual(expected);\n\n    delete arrayProto.a;\n  });\n\n  it('should work with `arguments` objects', () => {\n    const values = [args, strictArgs];\n    const expected = values.map(constant(['0', '1', '2']));\n\n    const actual = values.map(value => keys(value).sort());\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return keys for custom properties on `arguments` objects', () => {\n    const values = [args, strictArgs];\n    const expected = values.map(constant(['0', '1', '2', 'a']));\n\n    const actual = values.map((value: any) => {\n      value.a = 1;\n      const result = keys(value).sort();\n      delete value.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should not include inherited string keyed properties of \\`arguments\\` objects`, () => {\n    const values = [args, strictArgs];\n    const expected = values.map(constant(['0', '1', '2']));\n\n    const actual = values.map(value => {\n      objectProto.a = 1;\n      const result = keys(value).sort();\n      delete objectProto.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work with string objects', () => {\n    const actual = keys(Object('abc')).sort();\n\n    expect(actual).toEqual(['0', '1', '2']);\n  });\n\n  it('should return keys for custom properties on string objects', () => {\n    const object = Object('a');\n    object.a = 1;\n\n    const actual = keys(object).sort();\n\n    expect(actual).toEqual(['0', 'a']);\n  });\n\n  it(`should not include inherited string keyed properties of string objects`, () => {\n    stringProto.a = 1;\n\n    const expected = ['0'];\n    const actual = keys(Object('a')).sort();\n\n    expect(actual).toEqual(expected);\n\n    delete stringProto.a;\n  });\n\n  it('should work with array-like objects', () => {\n    const object = { 0: 'a', length: 1 };\n    const actual = keys(object).sort();\n\n    expect(actual).toEqual(['0', 'length']);\n  });\n\n  it('should coerce primitives to objects (test in IE 9)', () => {\n    const expected = primitives.map(value => (typeof value === 'string' ? ['0'] : []));\n\n    const actual = primitives.map(keys);\n    expect(actual).toEqual(expected);\n\n    // IE 9 doesn't box numbers in for-in loops.\n    numberProto.a = 1;\n    expect(keys(0)).toEqual([]);\n    delete numberProto.a;\n  });\n\n  it('skips the `constructor` property on prototype objects', () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    const expected = ['a'];\n    expect(keys(Foo.prototype)).toEqual(expected);\n\n    Foo.prototype = { constructor: Foo, a: 1 };\n    expect(keys(Foo.prototype)).toEqual(expected);\n\n    const Fake = { prototype: {} as any };\n    Fake.prototype.constructor = Fake;\n    expect(keys(Fake.prototype)).toEqual(['constructor']);\n  });\n\n  it('should return an empty array when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubArray);\n\n    const actual = values.map((value, index) => {\n      objectProto.a = 1;\n      const result = index ? keys(value) : keys();\n      delete objectProto.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('buffers should not have offset or parent keys', () => {\n    const buffer = Buffer.from('test');\n    const actual = keys(buffer);\n    expect(actual).toEqual(['0', '1', '2', '3']);\n  });\n\n  it('typedArray should not have buffer, byteLength, or byteOffset keys', () => {\n    const typedArray = new Uint8Array(1);\n    const actual = keys(typedArray);\n    expect(actual).toEqual(['0']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(keys).toEqualTypeOf<typeof keysLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/keys.ts",
    "content": "import { isBuffer } from '../../predicate/isBuffer.ts';\nimport { isPrototype } from '../_internal/isPrototype.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\nimport { times } from '../util/times.ts';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * Non-object values are coerced to objects.\n *\n * @param {object} object The object to query.\n * @returns {string[]} Returns the array of property names.\n * @example\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n * Foo.prototype.c = 3;\n * keys(new Foo); // ['a', 'b'] (iteration order is not guaranteed)\n *\n * keys('hi'); // ['0', '1']\n * keys([1, 2, 3]); // ['0', '1', '2']\n * keys({ a: 1, b: 2 }); // ['a', 'b']\n */\nexport function keys(object?: any): string[] {\n  if (isArrayLike(object)) {\n    return arrayLikeKeys(object);\n  }\n\n  const result = Object.keys(Object(object));\n\n  if (!isPrototype(object)) {\n    return result;\n  }\n\n  return result.filter(key => key !== 'constructor');\n}\n\nfunction arrayLikeKeys(object: ArrayLike<any>): string[] {\n  const indices = times(object.length, index => `${index}`);\n\n  const filteredKeys = new Set(indices);\n\n  if (isBuffer(object)) {\n    // Node.js 0.10 has enumerable non-index properties on buffers.\n    filteredKeys.add('offset');\n    filteredKeys.add('parent');\n  }\n\n  if (isTypedArray(object)) {\n    // PhantomJS 2 has enumerable non-index properties on typed arrays.\n    filteredKeys.add('buffer');\n    filteredKeys.add('byteLength');\n    filteredKeys.add('byteOffset');\n  }\n\n  const inheritedKeys = Object.keys(object).filter(key => !filteredKeys.has(key));\n\n  if (Array.isArray(object)) {\n    return [...indices, ...inheritedKeys];\n  }\n\n  return [...indices.filter(index => Object.hasOwn(object, index)), ...inheritedKeys];\n}\n"
  },
  {
    "path": "src/compat/object/keysIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { keysIn as keysInLodash } from 'lodash';\nimport { keysIn } from './keysIn';\nimport { args } from '../_internal/args';\nimport { primitives } from '../_internal/primitives';\nimport { strictArgs } from '../_internal/strictArgs';\nimport { stubArray } from '../util/stubArray';\n\ndescribe('keys methods', () => {\n  const func = keysIn;\n  const isKeys = false;\n\n  it(`\\`keysIn\\` should return the string keyed property names of \\`object\\``, () => {\n    const actual = func({ a: 1, b: 1 }).sort();\n\n    expect(actual).toEqual(['a', 'b']);\n  });\n\n  it(`\\`keysIn\\` should include inherited string keyed properties`, () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const expected = isKeys ? ['a'] : ['a', 'b'];\n\n    const actual = func(\n      // eslint-disable-next-line\n      // @ts-ignore\n      new Foo()\n    ).sort();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('`keysIn` should only include indices for arrays', () => {\n    expect(func([1, 2, 3])).toEqual(['0', '1', '2']);\n  });\n\n  it('`keysIn` should include `length` property for array-like objects', () => {\n    expect(func({ 0: 'a', length: 1 })).toEqual(['0', 'length']);\n  });\n\n  it(`\\`keysIn\\` should treat sparse arrays as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    const actual = func(array).sort();\n\n    expect(actual).toEqual(['0', '1', '2']);\n  });\n\n  it(`\\`keysIn\\` should return keys for custom properties on arrays`, () => {\n    const array = [1];\n    // eslint-disable-next-line\n    // @ts-ignore\n    array.a = 1;\n\n    const actual = func(array).sort();\n\n    expect(actual).toEqual(['0', 'a']);\n  });\n\n  it(`\\`keysIn\\` should include inherited string keyed properties of arrays`, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    Array.prototype.a = 1;\n\n    const expected = isKeys ? ['0'] : ['0', 'a'];\n    const actual = func([1]).sort();\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete Array.prototype.a;\n  });\n\n  it(`\\`keysIn\\` should work with \\`arguments\\` objects`, () => {\n    const values = [args, strictArgs];\n    const expected = values.map(() => ['0', '1', '2']);\n\n    const actual = values.map(value => func(value).sort());\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`keysIn\\` should return keys for custom properties on \\`arguments\\` objects`, () => {\n    const values = [args, strictArgs];\n    const expected = values.map(() => ['0', '1', '2', 'a']);\n\n    const actual = values.map((value: any) => {\n      value.a = 1;\n      const result = func(value).sort();\n      delete value.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`keysIn\\` should include inherited string keyed properties of \\`arguments\\` objects`, () => {\n    const values = [args, strictArgs];\n    const expected = values.map(() => ['0', '1', '2', 'a']);\n\n    const actual = values.map(value => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      Object.prototype.a = 1;\n      const result = func(value).sort();\n      // eslint-disable-next-line\n      // @ts-ignore\n      delete Object.prototype.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`keysIn\\` should work with string objects`, () => {\n    const actual = func(Object('abc')).sort();\n\n    expect(actual).toEqual(['0', '1', '2']);\n  });\n\n  it(`\\`keysIn\\` should return keys for custom properties on string objects`, () => {\n    const object = Object('a');\n    object.a = 1;\n\n    const actual = func(object).sort();\n\n    expect(actual).toEqual(['0', 'a']);\n  });\n\n  it(`\\`keysIn\\` should include inherited string keyed properties of string objects`, () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    String.prototype.a = 1;\n\n    const expected = isKeys ? ['0'] : ['0', 'a'];\n    const actual = func(Object('a')).sort();\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete String.prototype.a;\n  });\n\n  it(`\\`keysIn\\` should work with array-like objects`, () => {\n    const object = { 0: 'a', length: 1 };\n    const actual = func(object).sort();\n\n    expect(actual).toEqual(['0', 'length']);\n  });\n\n  it(`\\`keysIn\\` should coerce primitives to objects (test in IE 9)`, () => {\n    const expected = primitives.map(value => (typeof value === 'string' ? ['0'] : []));\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = primitives.map(func);\n    expect(actual).toEqual(expected);\n\n    // IE 9 doesn't box numbers in for-in loops.\n    // eslint-disable-next-line\n    // @ts-ignore\n    Number.prototype.a = 1;\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(0)).toEqual(isKeys ? [] : ['a']);\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete Number.prototype.a;\n  });\n\n  it(`\\`keysIn\\` skips the \\`constructor\\` property on prototype objects`, () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    const expected = ['a'];\n    expect(func(Foo.prototype)).toEqual(expected);\n\n    Foo.prototype = { constructor: Foo, a: 1 };\n    expect(func(Foo.prototype)).toEqual(expected);\n\n    const Fake = { prototype: {} };\n    // eslint-disable-next-line\n    // @ts-ignore\n    Fake.prototype.constructor = Fake;\n    expect(func(Fake.prototype)).toEqual(['constructor']);\n  });\n\n  it(`\\`keysIn\\` should return an empty array when \\`object\\` is nullish`, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubArray);\n\n    const actual = values.map((value, index) => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      Object.prototype.a = 1;\n      const result = index ? func(value) : func();\n      // eslint-disable-next-line\n      // @ts-ignore\n      delete Object.prototype.a;\n      return result;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('buffers should not have offset or parent keys', () => {\n    const buffer = Buffer.from('test');\n    const actual = keysIn(buffer);\n    expect(actual).not.toContain('offset');\n    expect(actual).not.toContain('parent');\n  });\n\n  it('typedArray should not have buffer, byteLength, or byteOffset keys', () => {\n    const typedArray = new Uint8Array(1);\n    const actual = keysIn(typedArray);\n    expect(actual).not.toContain('buffer');\n    expect(actual).not.toContain('byteLength');\n    expect(actual).not.toContain('byteOffset');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(keysIn).toEqualTypeOf<typeof keysInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/keysIn.ts",
    "content": "import { isBuffer } from '../../predicate/isBuffer.ts';\nimport { isPrototype } from '../_internal/isPrototype.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\nimport { times } from '../util/times.ts';\n\n/**\n * This function retrieves the names of string-keyed properties from an object, including those inherited from its prototype.\n *\n * - If the value is not an object, it is converted to an object.\n * - Array-like objects are treated like arrays.\n * - Sparse arrays with some missing indices are treated like dense arrays.\n * - If the value is `null` or `undefined`, an empty array is returned.\n * - When handling prototype objects, the `constructor` property is excluded from the results.\n *\n * @param {any} [object] - The object to inspect for keys.\n * @returns {string[]} An array of string keys from the object.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * console.log(keysIn(obj)); // ['a', 'b']\n *\n * const arr = [1, 2, 3];\n * console.log(keysIn(arr)); // ['0', '1', '2']\n *\n * function Foo() {}\n * Foo.prototype.a = 1;\n * console.log(keysIn(new Foo())); // ['a']\n */\nexport function keysIn(object?: any): string[] {\n  if (object == null) {\n    return [];\n  }\n\n  switch (typeof object) {\n    case 'object':\n    case 'function': {\n      if (isArrayLike(object)) {\n        return arrayLikeKeysIn(object);\n      }\n\n      if (isPrototype(object)) {\n        return prototypeKeysIn(object);\n      }\n\n      return keysInImpl(object);\n    }\n\n    default: {\n      return keysInImpl(Object(object));\n    }\n  }\n}\n\nfunction keysInImpl(object: object): string[] {\n  const result: string[] = [];\n\n  for (const key in object) {\n    result.push(key);\n  }\n\n  return result;\n}\n\nfunction prototypeKeysIn(object: object): string[] {\n  const keys = keysInImpl(object);\n\n  return keys.filter(key => key !== 'constructor');\n}\n\nfunction arrayLikeKeysIn(object: ArrayLike<any>): string[] {\n  const indices = times(object.length, index => `${index}`);\n\n  const filteredKeys = new Set(indices);\n\n  if (isBuffer(object)) {\n    // Node.js 0.10 has enumerable non-index properties on buffers.\n    filteredKeys.add('offset');\n    filteredKeys.add('parent');\n  }\n\n  if (isTypedArray(object)) {\n    // PhantomJS 2 has enumerable non-index properties on typed arrays.\n    filteredKeys.add('buffer');\n    filteredKeys.add('byteLength');\n    filteredKeys.add('byteOffset');\n  }\n\n  const inheritedKeys = keysInImpl(object).filter(key => !filteredKeys.has(key));\n\n  if (Array.isArray(object)) {\n    return [...indices, ...inheritedKeys];\n  }\n\n  return [...indices.filter(index => Object.hasOwn(object, index)), ...inheritedKeys];\n}\n"
  },
  {
    "path": "src/compat/object/mapKeys.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { mapKeys as mapKeysLodash } from 'lodash';\nimport { mapKeys } from './mapKeys';\n\ndescribe('mapKeys', () => {\n  const array = [1, 2];\n  const object = { a: 1, b: 2 };\n\n  it('should map keys in `object` to a new object', () => {\n    const actual = mapKeys(object, String);\n    expect(actual).toEqual({ 1: 1, 2: 2 });\n  });\n\n  it('should treat arrays like objects', () => {\n    const actual = mapKeys(array, String);\n    expect(actual).toEqual({ 1: 1, 2: 2 });\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const actual = mapKeys({ a: { b: 'c' } }, 'b');\n    expect(actual).toEqual({ c: { b: 'c' } });\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const object = { a: 1, b: 2 };\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => ({ 1: 1, 2: 2 }));\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = values.map((value, index) => (index ? mapKeys(object, value) : mapKeys(object)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(mapKeys).toEqualTypeOf<typeof mapKeysLodash>();\n  });\n\n  it('should return empty object when object is null', () => {\n    expect(mapKeys(null)).toEqual({});\n  });\n\n  it('should return empty object when object is undefined', () => {\n    expect(mapKeys(undefined)).toEqual({});\n  });\n});\n"
  },
  {
    "path": "src/compat/object/mapKeys.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { mapKeys as mapKeysToolkit } from '../../object/mapKeys.ts';\nimport { ListIteratee } from '../_internal/ListIteratee.ts';\nimport { ObjectIteratee } from '../_internal/ObjectIteratee.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates an object with the same values as `object` and keys generated by running each own enumerable string keyed property through `iteratee`.\n *\n * @template T\n * @param {ArrayLike<T> | null | undefined} object - The object to iterate over.\n * @param {ValueIteratee<T>} [iteratee] - The function invoked per iteration.\n * @returns {Record<string, T>} - Returns the new mapped object.\n *\n * @example\n * mapKeys([1, 2, 3], (value, index) => `key${index}`);\n * // => { 'key0': 1, 'key1': 2, 'key2': 3 }\n */\nexport function mapKeys<T>(object: ArrayLike<T> | null | undefined, iteratee?: ListIteratee<T>): Record<string, T>;\n\n/**\n * Creates an object with the same values as `object` and keys generated by running each own enumerable string keyed property through `iteratee`.\n *\n * @template T\n * @param {T | null | undefined} object - The object to iterate over.\n * @param {ValueIteratee<T[keyof T]>} [iteratee] - The function invoked per iteration.\n * @returns {Record<string, T[keyof T]>} - Returns the new mapped object.\n *\n * @example\n * mapKeys({ a: 1, b: 2 }, (value, key) => key + value);\n * // => { 'a1': 1, 'b2': 2 }\n */\nexport function mapKeys<T extends object>(\n  object: T | null | undefined,\n  iteratee?: ObjectIteratee<T>\n): Record<string, T[keyof T]>;\n\n/**\n * Creates a new object with the same values as the given object, but with keys generated\n * by running each own enumerable property of the object through the iteratee function.\n *\n * @template T - The type of the object.\n * @template K1 - The type of the keys in the object.\n * @template K2 - The type of the new keys generated by the iteratee function.\n *\n * @param {T} object - The object to iterate over.\n * @param {(value: T[K1], key: K1, object: T) => K2} [getNewKey] - The function invoked per own enumerable property, or a path to generate new keys.\n * @returns {Record<K2, T[K1]>} - Returns the new mapped object.\n *\n * @example\n * // Example usage:\n * const obj = { a: 1, b: 2 };\n * const result = mapKeys(obj, (value, key) => key + value);\n * console.log(result); // { a1: 1, b2: 2 }\n */\nexport function mapKeys(object: any, getNewKey: ListIteratee<any> = identity): Record<string, any> {\n  if (object == null) {\n    return {};\n  }\n\n  return mapKeysToolkit(object, iteratee(getNewKey));\n}\n"
  },
  {
    "path": "src/compat/object/mapValues.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { mapValues as mapValuesLodash } from 'lodash';\nimport { mapValues } from './mapValues';\nimport { isEqual } from '../../predicate/isEqual';\n\ndescribe('mapValues', () => {\n  const array = [1, 2];\n  const object = { a: 1, b: 2 };\n\n  it('should map values in `object` to a new object', () => {\n    const actual = mapValues(object, String);\n    expect(actual).toEqual({ a: '1', b: '2' });\n  });\n  it('should treat arrays like objects', () => {\n    const actual = mapValues(array, String);\n    expect(actual).toEqual({ 0: '1', 1: '2' });\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    const actual = mapValues({ a: { b: 2 } }, 'b');\n    expect(actual).toEqual({ a: 2 });\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    const object = { a: 1, b: 2 };\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(() => [true, false]);\n\n    const actual = values.map((value, index) => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      const result = index ? mapValues(object, value) : mapValues(object);\n      return [isEqual(result, object), result === object];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(mapValues).toEqualTypeOf<typeof mapValuesLodash>();\n  });\n\n  it('should return empty object when object is null', () => {\n    expect(mapValues(null)).toEqual({});\n  });\n\n  it('should return empty object when object is undefined', () => {\n    expect(mapValues(undefined)).toEqual({});\n  });\n});\n"
  },
  {
    "path": "src/compat/object/mapValues.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { mapValues as mapValuesToolkit } from '../../object/mapValues.ts';\nimport { ArrayIterator } from '../_internal/ArrayIterator.ts';\nimport { ObjectIterator } from '../_internal/ObjectIterator.ts';\nimport { StringIterator } from '../_internal/StringIterator.ts';\nimport { ValueIteratee } from '../_internal/ValueIteratee.ts';\nimport { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a new object by mapping each character in a string to a value.\n * @param obj - The string to iterate over\n * @param callback - The function invoked per character\n * @returns A new object with numeric keys and mapped values\n * @example\n * mapValues('abc', (char) => char.toUpperCase())\n * // => { '0': 'A', '1': 'B', '2': 'C' }\n */\nexport function mapValues<T>(obj: string | null | undefined, callback: StringIterator<T>): Record<number, T>;\n\n/**\n * Creates a new object by mapping each element in an array to a value.\n * @param array - The array to iterate over\n * @param callback - The function invoked per element\n * @returns A new object with numeric keys and mapped values\n * @example\n * mapValues([1, 2], (num) => num * 2)\n * // => { '0': 2, '1': 4 }\n */\nexport function mapValues<T, U>(array: T[], callback: ArrayIterator<T, U>): Record<number, U>;\n\n/**\n * Creates a new object by mapping each property value in an object to a new value.\n * @param obj - The object to iterate over\n * @param callback - The function invoked per property\n * @returns A new object with the same keys and mapped values\n * @example\n * mapValues({ a: 1, b: 2 }, (num) => num * 2)\n * // => { a: 2, b: 4 }\n */\nexport function mapValues<T extends object, U>(\n  obj: T | null | undefined,\n  callback: ObjectIterator<T, U>\n): { [P in keyof T]: U };\n\n/**\n * Creates a new object by checking each value against a matcher object.\n * @param obj - The object to iterate over\n * @param iteratee - The object to match against\n * @returns A new object with boolean values indicating matches\n * @example\n * mapValues({ a: { x: 1 }, b: { x: 2 } }, { x: 2 })\n * // => { a: false, b: true }\n */\nexport function mapValues<T>(\n  obj: Record<string, T> | Record<number, T> | null | undefined,\n  iteratee: object\n): Record<string, boolean>;\n\n/**\n * Creates a new object by checking each value against a matcher object.\n * @param obj - The object to iterate over\n * @param iteratee - The object to match against\n * @returns A new object with boolean values indicating matches\n * @example\n * mapValues({ a: { x: 1 }, b: { x: 2 } }, { x: 2 })\n * // => { a: false, b: true }\n */\nexport function mapValues<T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean };\n\n/**\n * Creates a new object by extracting a property from each value.\n * @param obj - The object to iterate over\n * @param iteratee - The property key to extract\n * @returns A new object with extracted property values\n * @example\n * mapValues({ a: { x: 1 }, b: { x: 2 } }, 'x')\n * // => { a: 1, b: 2 }\n */\nexport function mapValues<T, K extends keyof T>(\n  obj: Record<string, T> | Record<number, T> | null | undefined,\n  iteratee: K\n): Record<string, T[K]>;\n\n/**\n * Creates a new object by extracting values at a path from each value.\n * @param obj - The object to iterate over\n * @param iteratee - The path to extract\n * @returns A new object with extracted values\n * @example\n * mapValues({ a: { x: { y: 1 } }, b: { x: { y: 2 } } }, 'x.y')\n * // => { a: 1, b: 2 }\n */\nexport function mapValues<T>(\n  obj: Record<string, T> | Record<number, T> | null | undefined,\n  iteratee: string\n): Record<string, any>;\n\n/**\n * Creates a new object by extracting values at a path from each value.\n * @param obj - The object to iterate over\n * @param iteratee - The path to extract\n * @returns A new object with extracted values\n * @example\n * mapValues({ a: { x: { y: 1 } }, b: { x: { y: 2 } } }, 'x.y')\n * // => { a: 1, b: 2 }\n */\nexport function mapValues<T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any };\n\n/**\n * Creates a new object from a string using identity function.\n * @param obj - The string to convert\n * @returns A new object with characters as values\n * @example\n * mapValues('abc')\n * // => { '0': 'a', '1': 'b', '2': 'c' }\n */\nexport function mapValues(obj: string | null | undefined): Record<number, string>;\n\n/**\n * Creates a new object using identity function.\n * @param obj - The object to clone\n * @returns A new object with the same values\n * @example\n * mapValues({ a: 1, b: 2 })\n * // => { a: 1, b: 2 }\n */\nexport function mapValues<T>(obj: Record<string, T> | Record<number, T> | null | undefined): Record<string, T>;\n\n/**\n * Creates a new object using identity function.\n * @param obj - The object to clone\n * @returns A new object with the same values\n * @example\n * mapValues({ a: 1, b: 2 })\n * // => { a: 1, b: 2 }\n */\nexport function mapValues<T extends object>(obj: T): T;\n\n/**\n * Creates a new object using identity function.\n * @param obj - The object to clone\n * @returns A new object with the same values, or empty object if input is null/undefined\n * @example\n * mapValues({ a: 1, b: 2 })\n * // => { a: 1, b: 2 }\n * mapValues(null)\n * // => {}\n */\nexport function mapValues<T extends object>(obj: T | null | undefined): Partial<T>;\n\n/**\n * Creates a new object with the same keys as the given object, but with values generated\n * by running each own enumerable property of the object through the iteratee function.\n *\n * @template T - The type of the object.\n * @template K - The type of the keys in the object.\n * @template V - The type of the new values generated by the iteratee function.\n *\n * @param {T} object - The object to iterate over.\n * @param {(value: T[K], key: K, object: T) => V | PropertyKey | readonly PropertyKey[] | null | undefined} [getNewValue] -\n *        The function invoked per own enumerable property, or a path to generate new values.\n * @returns {Record<K, V>} - Returns the new mapped object.\n *\n * @example\n * // Example usage:\n * const obj = { a: 1, b: 2 };\n * const result = mapValues(obj, (value) => value * 2);\n * console.log(result); // { a: 2, b: 4 }\n */\nexport function mapValues(object: any, getNewValue: ValueIteratee<any> = identity): Record<string, any> {\n  if (object == null) {\n    return {};\n  }\n\n  return mapValuesToolkit(object, iteratee(getNewValue));\n}\n"
  },
  {
    "path": "src/compat/object/merge.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { merge as mergeLodash } from 'lodash';\nimport { merge } from './merge';\nimport { range } from '../../math/range';\nimport { isEqual } from '../../predicate/isEqual';\nimport { args } from '../_internal/args';\nimport { typedArrays } from '../_internal/typedArrays';\nimport { isArguments } from '../predicate/isArguments';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('merge', () => {\n  it('should replace `source1` Date with `source2` Date instead of deep merging', () => {\n    const source1 = { a: 1, b: { x: 1, y: 2 }, c: new Date('2025-01-01') };\n    const source2 = { b: { y: 3, z: 4 }, c: new Date('2000-01-01') };\n\n    const actual = merge({}, source1, source2);\n\n    expect(actual).toEqual({\n      a: 1,\n      b: { x: 1, y: 3, z: 4 },\n      c: new Date('2000-01-01'),\n    });\n  });\n\n  it('should merge `source` into `object`', () => {\n    const names = {\n      characters: [{ name: 'barney' }, { name: 'fred' }],\n    };\n\n    const ages = {\n      characters: [{ age: 36 }, { age: 40 }],\n    };\n\n    const heights = {\n      characters: [{ height: '5\\'4\"' }, { height: '5\\'5\"' }],\n    };\n\n    const expected = {\n      characters: [\n        { name: 'barney', age: 36, height: '5\\'4\"' },\n        { name: 'fred', age: 40, height: '5\\'5\"' },\n      ],\n    };\n\n    expect(merge(names, ages, heights)).toEqual(expected);\n  });\n\n  it('should merge sources containing circular references', () => {\n    const object: any = {\n      foo: { a: 1 },\n      bar: { a: 2 },\n    };\n\n    const source: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: {},\n    };\n\n    source.foo.b.c.d = source;\n    source.bar.b = source.foo.b;\n\n    const actual = merge(object, source);\n\n    expect(actual.bar.b).not.toBe(actual.foo.b);\n    expect(actual.foo.b.c.d).toBe(actual.foo.b.c.d.foo.b.c.d);\n  });\n\n  it('should work with four arguments', () => {\n    const expected = { a: 4 };\n    const actual = merge({ a: 1 }, { a: 2 }, { a: 3 }, expected);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should merge onto function `object` values', () => {\n    function Foo() {}\n\n    const source = { a: 1 };\n    const actual = merge(Foo, source);\n\n    expect(actual).toBe(Foo);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(Foo.a).toBe(1);\n  });\n\n  it('should treat sparse array sources as dense', () => {\n    const array = [1];\n    array[2] = 3;\n\n    const actual = merge([], array),\n      expected: any = array.slice();\n\n    expected[1] = undefined;\n\n    expect('1' in actual).toBe(true);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should merge first source object properties to function', () => {\n    const fn = function () {};\n    const object = { prop: {} };\n    const actual = merge({ prop: fn }, object);\n\n    expect(actual).toEqual(object);\n  });\n\n  it('should merge first and second source object properties to function', () => {\n    const fn = function () {};\n    const object = { prop: {} };\n    const actual = merge({ prop: fn }, { prop: fn }, object);\n\n    expect(actual).toEqual(object);\n  });\n\n  it('should not merge onto function values of sources', () => {\n    const source1 = { a: function () {} };\n    const source2 = { a: { b: 2 } };\n    const expected = { a: { b: 2 } };\n    let actual = merge({}, source1, source2);\n\n    expect(actual).toEqual(expected);\n    expect('b' in source1.a).toBe(false);\n\n    actual = merge(source1, source2);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should merge onto non-plain `object` values', () => {\n    function Foo() {}\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object = new Foo();\n    const actual = merge(object, { a: 1 });\n\n    expect(actual).toBe(object);\n    expect(object.a).toBe(1);\n  });\n\n  it('should merge `arguments` objects', () => {\n    const object1 = { value: args };\n    const object2 = { value: { 3: 4 } };\n    let expected: any = { 0: 1, 1: 2, 2: 3, 3: 4 };\n    let actual: any = merge(object1, object2);\n\n    expect('3' in args).toBe(false);\n    expect(isArguments(actual.value)).toBe(false);\n    expect(actual.value).toEqual(expected);\n    object1.value = args;\n\n    actual = merge(object2, object1);\n    expect(isArguments(actual.value)).toBe(false);\n    expect(actual.value).toEqual(expected);\n\n    expected = { 0: 1, 1: 2, 2: 3 };\n\n    actual = merge({}, object1);\n\n    expect(isArguments(actual.value)).toBe(false);\n    expect(actual.value).toEqual(expected);\n  });\n\n  it('should merge typed arrays', () => {\n    const array1 = [0];\n    const array2 = [0, 0];\n    const array3 = [0, 0, 0, 0];\n    const array4 = [0, 0, 0, 0, 0, 0, 0, 0];\n\n    const arrays = [array2, array1, array4, array3, array2, array4, array4, array3, array2];\n    const buffer = new ArrayBuffer(8);\n\n    let expected = typedArrays.map((type, index) => {\n      const array = arrays[index].slice();\n      array[0] = 1;\n\n      // eslint-disable-next-line\n      // @ts-ignore\n      return globalThis[type] ? { value: array } : false;\n    });\n\n    let actual = typedArrays.map(type => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      const Ctor = globalThis[type];\n      return Ctor ? merge({ value: new Ctor(buffer) }, { value: [1] }) : false;\n    });\n\n    expect(Array.isArray(actual)).toBe(true);\n    expect(actual).toEqual(expected);\n\n    expected = typedArrays.map((type, index) => {\n      const array = arrays[index].slice();\n      array.push(1);\n      // eslint-disable-next-line\n      // @ts-ignore\n      return globalThis[type] ? { value: array } : false;\n    });\n\n    actual = typedArrays.map((type, index) => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      const Ctor = globalThis[type];\n      const array = range(arrays[index].length);\n\n      array.push(1);\n      return Ctor ? merge({ value: array }, { value: new Ctor(buffer) }) : false;\n    });\n\n    expect(Array.isArray(actual)).toBe(true);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should assign `null` values', () => {\n    const actual = merge({ a: 1 }, { a: null });\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(actual.a).toBe(null);\n  });\n\n  it('should assign non array/buffer/typed-array/plain-object source values directly', () => {\n    function Foo() {}\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const values = [new Foo(), new Boolean(), new Date(), Foo, new Number(), new String(), new RegExp()];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => {\n      const object = merge({}, { a: value, b: { c: value } });\n      return object.a === value && object.b.c === value;\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should clone buffer source values', () => {\n    const buffer = Buffer.from([1]);\n    const actual = merge({}, { value: buffer }).value;\n\n    expect(Buffer.isBuffer(actual)).toBe(true);\n    expect(actual[0]).toBe(buffer[0]);\n    expect(actual).not.toBe(buffer);\n  });\n\n  it('should deep clone array/typed-array/plain-object source values', () => {\n    const typedArray = Uint8Array ? new Uint8Array([1]) : { buffer: [1] };\n\n    const props = ['0', 'buffer', 'a'];\n    const values: any = [[{ a: 1 }], typedArray, { a: [1] }];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map((value: any, index: any) => {\n      const key = props[index];\n      const object = merge({}, { value: value });\n      const subValue = value[key];\n      const newValue = object.value;\n      const newSubValue = newValue[key];\n\n      return newValue !== value && newSubValue !== subValue && isEqual(newValue, value);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not augment source objects', () => {\n    let source1: any = { a: [{ a: 1 }] };\n    let source2: any = { a: [{ b: 2 }] };\n    let actual = merge({}, source1, source2);\n\n    expect(source1.a).toEqual([{ a: 1 }]);\n    expect(source2.a).toEqual([{ b: 2 }]);\n    expect(actual.a).toEqual([{ a: 1, b: 2 }]);\n\n    source1 = { a: [[1, 2, 3]] };\n    source2 = { a: [[3, 4]] };\n    actual = merge({}, source1, source2);\n\n    expect(source1.a).toEqual([[1, 2, 3]]);\n    expect(source2.a).toEqual([[3, 4]]);\n    expect(actual.a).toEqual([[3, 4, 3]]);\n  });\n\n  it('should merge plain objects onto non-plain objects', () => {\n    function Foo(object: any) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      Object.assign(this, object);\n    }\n\n    const object = { a: 1 };\n    // eslint-disable-next-line\n    // @ts-ignore\n    let actual = merge(new Foo(), object);\n\n    expect(actual instanceof Foo).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(actual).toEqual(new Foo(object));\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    actual = merge([new Foo()], [object]);\n    expect(actual[0] instanceof Foo).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(actual).toEqual([new Foo(object)]);\n  });\n\n  it('should not overwrite existing values with `undefined` values of object sources', () => {\n    const actual = merge({ a: 1 }, { a: undefined, b: undefined });\n    expect(actual).toEqual({ a: 1, b: undefined });\n  });\n\n  it('should not overwrite existing values with `undefined` values of array sources', () => {\n    let array: any = [1];\n    array[2] = 3;\n\n    let actual = merge([4, 5, 6], array);\n    const expected = [1, 5, 3];\n\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line\n    array = [1, , 3];\n    array[1] = undefined;\n\n    actual = merge([4, 5, 6], array);\n    expect(actual).toEqual(expected);\n  });\n\n  it('should skip merging when `object` and `source` are the same value', () => {\n    const object = {};\n    let pass = true;\n\n    Object.defineProperty(object, 'a', {\n      configurable: true,\n      enumerable: true,\n      get: function () {\n        pass = false;\n      },\n      set: function () {\n        pass = false;\n      },\n    });\n\n    merge(object, object);\n    expect(pass);\n  });\n\n  it('should preserve original properties of arrays', () => {\n    const arr = [1, 2, 3];\n    // eslint-disable-next-line\n    // @ts-ignore\n    arr.foo = 1;\n\n    merge(arr, [2]);\n\n    expect(arr[0]).toBe(2);\n    expect(arr[1]).toBe(2);\n    expect(arr[2]).toBe(3);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(arr.foo).toBe(1);\n  });\n\n  it('should convert values to arrays when merging arrays of `source`', () => {\n    const object = { a: { 1: 'y', b: 'z', length: 2 } };\n    let actual: any = merge(object, { a: ['x'] });\n\n    expect(Array.isArray(actual.a)).toEqual(true);\n    expect(actual.a[0]).toEqual('x');\n    expect(actual.a[1]).toEqual('y');\n\n    actual = merge({ a: {} }, { a: [] });\n    expect(actual).toEqual({ a: [] });\n  });\n\n  it('should convert strings to arrays when merging arrays of `source`', () => {\n    const object = { a: 'abcde' };\n    const actual = merge(object, { a: ['x', 'y', 'z'] });\n\n    expect(actual).toEqual({ a: ['x', 'y', 'z'] });\n  });\n\n  it('should not preserve object properties when nested object is replaced by array', () => {\n    const actual = merge({ x: { a: 2 } }, { x: ['1'] });\n\n    expect(actual.x).toEqual(['1']);\n    expect(Object.keys(actual.x)).toEqual(['0']);\n    expect((actual.x as any).a).toBeUndefined();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(merge).toEqualTypeOf<typeof mergeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/merge.ts",
    "content": "import { mergeWith } from './mergeWith.ts';\nimport { noop } from '../../function/noop.ts';\n\n/**\n * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.\n *\n * @template T\n * @template U\n * @param {T} object - The destination object.\n * @param {U} source - The source object.\n * @returns {T & U} - Returns `object`.\n *\n * @example\n * const object = { a: [{ b: 2 }, { d: 4 }] };\n * const other = { a: [{ c: 3 }, { e: 5 }] };\n * merge(object, other);\n * // => { a: [{ b: 2, c: 3 }, { d: 4, e: 5 }] }\n */\nexport function merge<T, U>(object: T, source: U): T & U;\n\n/**\n * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.\n *\n * @template T\n * @template U\n * @template V\n * @param {T} object - The destination object.\n * @param {U} source1 - The first source object.\n * @param {V} source2 - The second source object.\n * @returns {T & U & V} - Returns `object`.\n *\n * @example\n * merge({ a: 1 }, { b: 2 }, { c: 3 });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function merge<T, U, V>(object: T, source1: U, source2: V): T & U & V;\n\n/**\n * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.\n *\n * @template T\n * @template U\n * @template V\n * @template W\n * @param {T} object - The destination object.\n * @param {U} source1 - The first source object.\n * @param {V} source2 - The second source object.\n * @param {W} source3 - The third source object.\n * @returns {T & U & V & W} - Returns `object`.\n *\n * @example\n * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function merge<T, U, V, W>(object: T, source1: U, source2: V, source3: W): T & U & V & W;\n\n/**\n * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.\n *\n * @template T\n * @template U\n * @template V\n * @template W\n * @template X\n * @param {T} object - The destination object.\n * @param {U} source1 - The first source object.\n * @param {V} source2 - The second source object.\n * @param {W} source3 - The third source object.\n * @param {X} source4 - The fourth source object.\n * @returns {T & U & V & W & X} - Returns `object`.\n *\n * @example\n * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 });\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function merge<T, U, V, W, X>(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X;\n\n/**\n * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.\n *\n * @param {any} object - The destination object.\n * @param {...any[]} otherArgs - The source objects.\n * @returns {any} - Returns `object`.\n *\n * @example\n * merge({ a: 1 }, { b: 2 }, { c: 3 });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function merge(object: any, ...otherArgs: any[]): any;\n\n/**\n * Merges the properties of one or more source objects into the target object.\n *\n * This function performs a deep merge, recursively merging nested objects and arrays.\n * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.\n * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.\n *\n * The function can handle multiple source objects and will merge them all into the target object.\n *\n * @param {any} object - The target object into which the source object properties will be merged. This object is modified in place.\n * @param {any[]} sources - The source objects whose properties will be merged into the target object.\n * @returns {any} The updated target object with properties from the source object(s) merged in.\n *\n * @example\n * const target = { a: 1, b: { x: 1, y: 2 } };\n * const source = { b: { y: 3, z: 4 }, c: 5 };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n *\n * @example\n * const target = { a: [1, 2], b: { x: 1 } };\n * const source = { a: [3], b: { y: 2 } };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: [3], b: { x: 1, y: 2 } }\n *\n * @example\n * const target = { a: null };\n * const source = { a: [1, 2, 3] };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: [1, 2, 3] }\n */\nexport function merge(object: any, ...sources: any[]): any {\n  return mergeWith(object, ...sources, noop);\n}\n"
  },
  {
    "path": "src/compat/object/mergeWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { mergeWith as mergeWithLodash } from 'lodash';\nimport { cloneDeep } from './cloneDeep';\nimport { mergeWith } from './mergeWith';\nimport { last } from '../../array/last';\nimport { identity } from '../../function/identity';\nimport { noop } from '../../function/noop';\n\ndescribe('mergeWith', () => {\n  it('should replace `source1` Date with `source2` Date instead of deep merging', () => {\n    const source1 = { a: 1, b: { x: 1, y: 2 }, c: new Date('2025-01-01') };\n    const source2 = { b: { y: 3, z: 4 }, c: new Date('2000-01-01') };\n\n    const actual = mergeWith({}, source1, source2, noop);\n\n    expect(actual).toEqual({\n      a: 1,\n      b: { x: 1, y: 3, z: 4 },\n      c: new Date('2000-01-01'),\n    });\n  });\n\n  it('should handle merging when `customizer` returns `undefined`', () => {\n    let actual: any = mergeWith({ a: { b: [1, 1] } }, { a: { b: [0] } }, noop);\n    expect(actual).toEqual({ a: { b: [0, 1] } });\n\n    actual = mergeWith([], [undefined], identity);\n    expect(actual).toEqual([undefined]);\n  });\n\n  it('should clone sources when `customizer` returns `undefined`', () => {\n    const source1 = { a: { b: { c: 1 } } };\n    const source2 = { a: { b: { d: 2 } } };\n\n    mergeWith({}, source1, source2, noop);\n    expect(source1.a.b).toEqual({ c: 1 });\n  });\n\n  it('should defer to `customizer` for non `undefined` results', () => {\n    const actual = mergeWith({ a: { b: [0, 1] } }, { a: { b: [2] } }, (a, b) =>\n      Array.isArray(a) ? a.concat(b) : undefined\n    );\n\n    expect(actual).toEqual({ a: { b: [0, 1, 2] } });\n  });\n\n  it('should provide `stack` to `customizer`', () => {\n    let actual: any;\n\n    mergeWith({}, { a: { b: 2 } }, function () {\n      // eslint-disable-next-line\n      // @ts-ignore\n      // eslint-disable-next-line\n      actual = last(arguments);\n    });\n\n    expect(actual instanceof Map).toBe(true);\n  });\n\n  it('should overwrite primitives with source object clones', () => {\n    const actual = mergeWith({ a: 0 }, { a: { b: ['c'] } }, (a, b) => (Array.isArray(a) ? a.concat(b) : undefined));\n\n    expect(actual).toEqual({ a: { b: ['c'] } });\n  });\n\n  it('should pop the stack of sources for each sibling property', () => {\n    const array = ['b', 'c'];\n    const object = { a: ['a'] };\n    const source = { a: array, b: array };\n\n    const actual = mergeWith(object, source, (a, b) => (Array.isArray(a) ? a.concat(b) : undefined));\n\n    expect(actual).toEqual({ a: ['a', 'b', 'c'], b: ['b', 'c'] });\n  });\n\n  it('should handle symbols correctly', () => {\n    const symbol1 = Symbol('symbol1');\n    const symbol2 = Symbol('symbol2');\n\n    const value1 = { [symbol1]: { [symbol2]: ['a'] } };\n    const value2 = { [symbol1]: { [symbol2]: ['c'] } };\n\n    expect(mergeWith(value1, value2, (a, b) => (Array.isArray(a) ? a.concat(b) : undefined))).toEqual({\n      [symbol1]: { [symbol2]: ['a', 'c'] },\n    });\n  });\n\n  it('should preserve the properties of the target object', () => {\n    const symbol1 = Symbol('symbol1');\n    const symbol2 = Symbol('symbol2');\n\n    const array1: any = [1, 2, 3];\n    // eslint-disable-next-line\n    // @ts-ignore\n    array1.foo = 1;\n    array1[symbol1] = 'a';\n\n    const array2: any = [3, 4, 5, 6, 7];\n    array2[symbol2] = 'b';\n\n    const merged = mergeWith({ value: array1 }, { value: array2 }, (targetValue: unknown, sourceValue: unknown) => {\n      if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n        for (const sourceItem of sourceValue) {\n          if (!targetValue.find(targetItem => targetItem === sourceItem)) {\n            targetValue.push(sourceItem);\n          }\n        }\n\n        return targetValue;\n      }\n\n      return undefined;\n    });\n\n    const resultArr: any = [1, 2, 3, 4, 5, 6, 7];\n    // eslint-disable-next-line\n    // @ts-ignore\n    resultArr.foo = 1;\n    resultArr[symbol1] = 'a';\n\n    expect(merged).toEqual({ value: resultArr });\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(merged.value.foo).toEqual(1);\n    expect(merged.value[symbol1]).toEqual('a');\n  });\n\n  it('should return the target object when no sources are provided', () => {\n    const target = { a: 1 };\n    expect(mergeWith(target, null, noop)).toBe(target);\n    expect(mergeWith(target, undefined, noop)).toBe(target);\n    expect(mergeWith(target, 1, noop)).toBe(target);\n  });\n\n  it('should work with nullish variables', () => {\n    const source = { a: 1 };\n    expect(mergeWith(null, source, noop)).toEqual(source);\n    expect(mergeWith(undefined, source, noop)).toEqual(source);\n    expect(mergeWith(null, undefined, source, noop)).toEqual(source);\n    expect(mergeWith(null, undefined, noop)).toEqual({});\n    expect(mergeWith(undefined, null, noop)).toEqual({});\n  });\n\n  it('should merge array to a null prop', () => {\n    const target = { a: null };\n    const source = { a: ['abc', '123'] };\n    expect(mergeWith(target, source, noop)).toEqual({ a: ['abc', '123'] });\n  });\n\n  it('should return an object when the target is a primitive', () => {\n    expect(mergeWith(1, null, noop)).toEqual(Object(1));\n    expect(mergeWith('a', null, noop)).toEqual(Object('a'));\n    expect(mergeWith(true, null, noop)).toEqual(Object(true));\n    expect(mergeWith(1, { a: 1 }, noop)).toEqual(Object.assign(1, { a: 1 }));\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(mergeWith).toEqualTypeOf<typeof mergeWithLodash>();\n  });\n\n  it('should respect `null` returned from `customizer`', () => {\n    const obj = { prop: null };\n    const source = { prop: { foo: 'bar' } };\n\n    expect(\n      mergeWith(cloneDeep(obj), cloneDeep(source), targetValue => {\n        if (targetValue === null) {\n          return null;\n        }\n\n        return undefined;\n      })\n    ).toEqual({ prop: null });\n  });\n\n  it('should prevent prototype pollution by skipping __proto__ from source', () => {\n    const result = mergeWith(\n      { a: 0, ['__proto__']: { polluted: 'no' } },\n      { a: 1, ['__proto__']: { polluted: 'yes' } },\n      noop\n    );\n    expect(result).toEqual({ a: 1, ['__proto__']: { polluted: 'no' } });\n  });\n\n  it('should handle circular references in source object', () => {\n    const source: any = { a: 1 };\n    source.circular = source;\n\n    const target = { b: 2 };\n    const result = mergeWith(target, source, noop);\n\n    expect(result.a).toBe(1);\n    expect(result.b).toBe(2);\n    expect(result.circular).toBeDefined();\n    expect(result.circular.a).toBe(1);\n  });\n\n  it('should handle Arguments objects in both source and target', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    function getArgs(..._arg: unknown[]) {\n      // eslint-disable-next-line prefer-rest-params\n      return arguments;\n    }\n    const args = getArgs(1, 2, 3);\n\n    // If the source has an Arguments object\n    let result = mergeWith({ a: { b: 1 } }, { a: args }, noop);\n    expect(result.a).toEqual({ 0: 1, 1: 2, 2: 3, b: 1 });\n\n    // If the target has an Arguments object\n    result = mergeWith({ a: args }, { a: { b: 4 } }, noop);\n    expect(result.a).toEqual({ 0: 1, 1: 2, 2: 3, b: 4 });\n  });\n\n  it('should clone Buffer objects from source', () => {\n    if (typeof Buffer === 'undefined') {\n      return;\n    }\n\n    const buffer = Buffer.from([1, 2, 3]);\n    const result = mergeWith({ a: 1 }, { b: buffer }, noop);\n\n    expect(result.b).toBeInstanceOf(Buffer);\n    expect(result.b).not.toBe(buffer);\n    expect(result.b).toEqual(buffer);\n  });\n\n  it('should clone TypedArray from source', () => {\n    const typedArray = new Uint8Array([1, 2, 3]);\n    const result = mergeWith({ a: 1 }, { b: typedArray }, noop);\n\n    expect(result.b).toBeInstanceOf(Uint8Array);\n    expect(result.b).not.toBe(typedArray);\n    expect(Array.from(result.b)).toEqual([1, 2, 3]);\n  });\n\n  it('should assign source value when target is undefined and preserve target value when source is undefined', () => {\n    let result = mergeWith({}, { a: 1 }, noop);\n    expect(result.a).toBe(1);\n\n    result = mergeWith({ a: 1 }, { a: undefined }, noop);\n    expect(result.a).toBe(1);\n  });\n\n  it('should not preserve object properties when nested object is replaced by array', () => {\n    const actual = mergeWith({ x: { a: 2 } }, { x: ['1'] }, noop);\n\n    expect(actual.x).toEqual(['1']);\n    expect(Object.keys(actual.x)).toEqual(['0']);\n    expect((actual.x as any).a).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/mergeWith.ts",
    "content": "import { cloneDeep } from './cloneDeep.ts';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.ts';\nimport { clone } from '../../object/clone.ts';\nimport { isPrimitive } from '../../predicate/isPrimitive.ts';\nimport { getSymbols } from '../_internal/getSymbols.ts';\nimport { isArguments } from '../predicate/isArguments.ts';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.ts';\nimport { isObjectLike } from '../predicate/isObjectLike.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\n\ndeclare let Buffer:\n  | {\n      isBuffer: (a: any) => boolean;\n    }\n  | undefined;\n\ntype MergeWithCustomizer = (objValue: any, srcValue: any, key: string, object: any, source: any, stack: any) => any;\n\n/**\n * Merges the properties of a source object into the target object using a customizer function.\n *\n * @template TObject\n * @template TSource\n * @param {TObject} object - The target object into which the source object properties will be merged.\n * @param {TSource} source - The source object whose properties will be merged into the target object.\n * @param {MergeWithCustomizer} customizer - The function to customize assigned values.\n * @returns {TObject & TSource} Returns the updated target object with properties from the source object merged in.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n *\n * const result = mergeWith(target, source, (objValue, srcValue) => {\n *   if (typeof objValue === 'number' && typeof srcValue === 'number') {\n *     return objValue + srcValue;\n *   }\n * });\n * // => { a: 1, b: 5, c: 4 }\n */\nexport function mergeWith<TObject, TSource>(\n  object: TObject,\n  source: TSource,\n  customizer: MergeWithCustomizer\n): TObject & TSource;\n\n/**\n * Merges the properties of two source objects into the target object using a customizer function.\n *\n * @template TObject\n * @template TSource1\n * @template TSource2\n * @param {TObject} object - The target object into which the source objects properties will be merged.\n * @param {TSource1} source1 - The first source object.\n * @param {TSource2} source2 - The second source object.\n * @param {MergeWithCustomizer} customizer - The function to customize assigned values.\n * @returns {TObject & TSource1 & TSource2} Returns the updated target object with properties from the source objects merged in.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n *\n * const result = mergeWith(target, source1, source2, (objValue, srcValue) => {\n *   if (typeof objValue === 'number' && typeof srcValue === 'number') {\n *     return objValue + srcValue;\n *   }\n * });\n * // => { a: 1, b: 2, c: 3 }\n */\nexport function mergeWith<TObject, TSource1, TSource2>(\n  object: TObject,\n  source1: TSource1,\n  source2: TSource2,\n  customizer: MergeWithCustomizer\n): TObject & TSource1 & TSource2;\n\n/**\n * Merges the properties of three source objects into the target object using a customizer function.\n *\n * @template TObject\n * @template TSource1\n * @template TSource2\n * @template TSource3\n * @param {TObject} object - The target object into which the source objects properties will be merged.\n * @param {TSource1} source1 - The first source object.\n * @param {TSource2} source2 - The second source object.\n * @param {TSource3} source3 - The third source object.\n * @param {MergeWithCustomizer} customizer - The function to customize assigned values.\n * @returns {TObject & TSource1 & TSource2 & TSource3} Returns the updated target object with properties from the source objects merged in.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n *\n * const result = mergeWith(target, source1, source2, source3, (objValue, srcValue) => {\n *   if (typeof objValue === 'number' && typeof srcValue === 'number') {\n *     return objValue + srcValue;\n *   }\n * });\n * // => { a: 1, b: 2, c: 3, d: 4 }\n */\nexport function mergeWith<TObject, TSource1, TSource2, TSource3>(\n  object: TObject,\n  source1: TSource1,\n  source2: TSource2,\n  source3: TSource3,\n  customizer: MergeWithCustomizer\n): TObject & TSource1 & TSource2 & TSource3;\n\n/**\n * Merges the properties of four source objects into the target object using a customizer function.\n *\n * @template TObject\n * @template TSource1\n * @template TSource2\n * @template TSource3\n * @template TSource4\n * @param {TObject} object - The target object into which the source objects properties will be merged.\n * @param {TSource1} source1 - The first source object.\n * @param {TSource2} source2 - The second source object.\n * @param {TSource3} source3 - The third source object.\n * @param {TSource4} source4 - The fourth source object.\n * @param {MergeWithCustomizer} customizer - The function to customize assigned values.\n * @returns {TObject & TSource1 & TSource2 & TSource3 & TSource4} Returns the updated target object with properties from the source objects merged in.\n *\n * @example\n * const target = { a: 1 };\n * const source1 = { b: 2 };\n * const source2 = { c: 3 };\n * const source3 = { d: 4 };\n * const source4 = { e: 5 };\n *\n * const result = mergeWith(target, source1, source2, source3, source4, (objValue, srcValue) => {\n *   if (typeof objValue === 'number' && typeof srcValue === 'number') {\n *     return objValue + srcValue;\n *   }\n * });\n * // => { a: 1, b: 2, c: 3, d: 4, e: 5 }\n */\nexport function mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(\n  object: TObject,\n  source1: TSource1,\n  source2: TSource2,\n  source3: TSource3,\n  source4: TSource4,\n  customizer: MergeWithCustomizer\n): TObject & TSource1 & TSource2 & TSource3 & TSource4;\n\n/**\n * Merges the properties of one or more source objects into the target object.\n *\n * @param {any} object - The target object into which the source object properties will be merged.\n * @param {...any} otherArgs - Additional source objects to merge into the target object, including the custom `merge` function.\n * @returns {any} The updated target object with properties from the source object(s) merged in.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n *\n * const result = mergeWith(target, source, (objValue, srcValue) => {\n *   if (typeof objValue === 'number' && typeof srcValue === 'number') {\n *     return objValue + srcValue;\n */\nexport function mergeWith(object: any, ...otherArgs: any[]): any;\n\n/**\n * Merges the properties of one or more source objects into the target object using a customizer function.\n *\n * This function performs a deep merge, recursively merging nested objects and arrays.\n * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.\n * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.\n *\n * You can provide a custom `merge` function to control how properties are merged. The `merge` function is called for each property that is being merged and receives the following arguments:\n *\n * - `targetValue`: The current value of the property in the target object.\n * - `sourceValue`: The value of the property in the source object.\n * - `key`: The key of the property being merged.\n * - `target`: The target object.\n * - `source`: The source object.\n * - `stack`: A `Map` used to keep track of objects that have already been processed to handle circular references.\n *\n * The `merge` function should return the value to be set in the target object. If it returns `undefined`, a default deep merge will be applied for arrays and objects.\n *\n * The function can handle multiple source objects and will merge them all into the target object.\n *\n * @param {any} object - The target object into which the source object properties will be merged. This object is modified in place.\n * @param {...any} otherArgs - Additional source objects to merge into the target object, including the custom `merge` function.\n * @returns {any} The updated target object with properties from the source object(s) merged in.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n *\n * mergeWith(target, source, (targetValue, sourceValue) => {\n *   if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n *     return targetValue + sourceValue;\n *   }\n * });\n * // Returns { a: 1, b: 5, c: 4 }\n * @example\n * const target = { a: [1], b: [2] };\n * const source = { a: [3], b: [4] };\n *\n * const result = mergeWith(target, source, (objValue, srcValue) => {\n *   if (Array.isArray(objValue)) {\n *     return objValue.concat(srcValue);\n *   }\n * });\n *\n * expect(result).toEqual({ a: [1, 3], b: [2, 4] });\n */\nexport function mergeWith(object: any, ...otherArgs: any[]): any {\n  const sources = otherArgs.slice(0, -1);\n  const merge = otherArgs[otherArgs.length - 1] as (\n    targetValue: any,\n    sourceValue: any,\n    key: string | symbol,\n    target: any,\n    source: any,\n    stack: Map<any, any>\n  ) => any;\n\n  let result = object;\n\n  for (let i = 0; i < sources.length; i++) {\n    const source = sources[i];\n\n    result = mergeWithDeep(result, source, merge, new Map());\n  }\n\n  return result;\n}\n\nfunction mergeWithDeep(\n  target: any,\n  source: any,\n  merge: (\n    targetValue: any,\n    sourceValue: any,\n    key: string | symbol,\n    target: any,\n    source: any,\n    stack: Map<any, any>\n  ) => any,\n  stack: Map<any, any>\n) {\n  if (isPrimitive(target)) {\n    target = Object(target);\n  }\n\n  if (source == null || typeof source !== 'object') {\n    return target;\n  }\n\n  if (stack.has(source)) {\n    return clone(stack.get(source));\n  }\n\n  stack.set(source, target);\n\n  if (Array.isArray(source)) {\n    source = source.slice();\n    for (let i = 0; i < source.length; i++) {\n      source[i] = source[i] ?? undefined;\n    }\n  }\n\n  const sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n\n  for (let i = 0; i < sourceKeys.length; i++) {\n    const key = sourceKeys[i];\n\n    if (isUnsafeProperty(key)) {\n      continue;\n    }\n\n    let sourceValue = source[key];\n    let targetValue = target[key];\n\n    if (isArguments(sourceValue)) {\n      sourceValue = { ...sourceValue };\n    }\n\n    if (isArguments(targetValue)) {\n      targetValue = { ...targetValue };\n    }\n\n    if (typeof Buffer !== 'undefined' && Buffer.isBuffer(sourceValue)) {\n      sourceValue = cloneDeep(sourceValue);\n    }\n\n    if (Array.isArray(sourceValue)) {\n      if (Array.isArray(targetValue)) {\n        const cloned: any = [];\n        // for custom properties on arrays\n        const targetKeys = Reflect.ownKeys(targetValue);\n\n        for (let i = 0; i < targetKeys.length; i++) {\n          const targetKey = targetKeys[i] as keyof typeof targetValue;\n          cloned[targetKey] = targetValue[targetKey];\n        }\n\n        targetValue = cloned;\n      } else if (isArrayLikeObject(targetValue)) {\n        // array-like object: only copy numeric indices\n        const cloned: any = [];\n\n        for (let i = 0; i < targetValue.length; i++) {\n          cloned[i] = targetValue[i];\n        }\n\n        targetValue = cloned;\n      } else {\n        targetValue = [];\n      }\n    }\n\n    const merged = merge(targetValue, sourceValue, key, target, source, stack);\n\n    if (merged !== undefined) {\n      target[key] = merged;\n    } else if (Array.isArray(sourceValue)) {\n      target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n    } else if (\n      isObjectLike(targetValue) &&\n      isObjectLike(sourceValue) &&\n      (isPlainObject(targetValue) ||\n        isPlainObject(sourceValue) ||\n        isTypedArray(targetValue) ||\n        isTypedArray(sourceValue))\n    ) {\n      target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n    } else if (targetValue == null && isPlainObject(sourceValue)) {\n      target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n    } else if (targetValue == null && isTypedArray(sourceValue)) {\n      target[key] = cloneDeep(sourceValue);\n    } else if (targetValue === undefined || sourceValue !== undefined) {\n      target[key] = sourceValue;\n    }\n  }\n\n  return target;\n}\n"
  },
  {
    "path": "src/compat/object/omit.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { omit as omitLodash } from 'lodash';\nimport { omit } from './omit';\nimport { objectProto } from '../_internal/objectProto';\nimport { stringProto } from '../_internal/stringProto';\nimport { toArgs } from '../_internal/toArgs';\n\ndescribe('omit', () => {\n  it('should omit deep properties', () => {\n    const obj = { a: { b: { c: 1 } }, d: { e: 2 }, f: { g: 3 }, 'f.g': 4 };\n    const result = omit(obj, ['a.b.c', 'f.g']);\n    expect(result).toEqual({ a: { b: {} }, d: { e: 2 }, f: { g: 3 } });\n  });\n\n  const args = toArgs(['a', 'c']);\n  const object = { a: 1, b: 2, c: 3, d: 4 };\n  const nested = { a: 1, b: { c: 2, d: 3 } };\n\n  it('should avoid deep cloning if not omitting deep properties', () => {\n    expect(omit(nested, 'a').b).toBe(nested.b);\n  });\n\n  it('should flatten `paths`', () => {\n    expect(omit(object, 'a', 'c')).toEqual({ b: 2, d: 4 });\n    expect(omit(object, ['a', 'd'], 'c')).toEqual({ b: 2 });\n  });\n\n  it('should support deep paths', () => {\n    expect(omit(nested, 'b.c')).toEqual({ a: 1, b: { d: 3 } });\n  });\n\n  it('should support path arrays', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n    // @ts-expect-error - path is a string\n    const actual = omit(object, [['a.b']]);\n\n    expect(actual).toEqual({ a: { b: 2 } });\n  });\n\n  it('should omit a key over a path', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    ['a.b', ['a.b']].forEach(path => {\n      expect(omit(object, path)).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it('should coerce `paths` to strings', () => {\n    expect(omit({ 0: 'a' }, 0)).toEqual({});\n  });\n\n  it('should return an empty object when `object` is nullish', () => {\n    [null, undefined].forEach(value => {\n      objectProto.a = 1;\n      const actual = omit(value, 'valueOf');\n      delete objectProto.a;\n      expect(actual).toEqual({});\n    });\n  });\n\n  // Manipulating prototypes is an anti-pattern\n  it.skip('should work with a primitive `object`', () => {\n    stringProto.a = 1;\n    stringProto.b = 2;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(omit('', 'b').a).toEqual(1);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(omit('', 'b').b).not.toEqual(2);\n\n    delete stringProto.a;\n    delete stringProto.b;\n  });\n\n  it('should work with `arguments` object `paths`', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(omit(object, args)).toEqual({ b: 2, d: 4 });\n  });\n\n  it('should not mutate `object`', () => {\n    ['a', ['a'], 'a.b', ['a.b']].forEach(path => {\n      const object = { a: { b: 2 } };\n      omit(object, path);\n      expect(object).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it('should handle array-like objects as keys', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const keys = { 0: 'a', 1: 'c', length: 2 };\n    // eslint-disable-next-line\n    // @ts-ignore\n    const result = omit(object, keys);\n\n    expect(result).toEqual({ b: 2 });\n  });\n\n  it('should not add any keys after omitting', () => {\n    const obj = { a: 1, b: 2, c: 3, length: 5 };\n\n    const result = omit(obj, 'a', 'c');\n\n    expect(result).toEqual({ b: 2, length: 5 });\n    expect('0' in result).toBe(false);\n    expect('1' in result).toBe(false);\n    expect('2' in result).toBe(false);\n    expect('3' in result).toBe(false);\n    expect('4' in result).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(omit).toEqualTypeOf<typeof omitLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/omit.ts",
    "content": "import { cloneDeepWith } from './cloneDeepWith.ts';\nimport { keysIn } from './keysIn.ts';\nimport { unset } from './unset.ts';\nimport { getSymbolsIn } from '../_internal/getSymbolsIn.ts';\nimport { isDeepKey } from '../_internal/isDeepKey.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { flatten } from '../array/flatten.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\n\n/**\n * Creates a new object with specified keys omitted.\n *\n * @template T - The type of object.\n * @template K - The type of keys to omit.\n * @param {T | null | undefined} object - The object to omit keys from.\n * @param {...K} paths - The keys to be omitted from the object.\n * @returns {Pick<T, Exclude<keyof T, K[number]>>} A new object with the specified keys omitted.\n *\n * @example\n * omit({ a: 1, b: 2, c: 3 }, 'a', 'c');\n * // => { b: 2 }\n */\nexport function omit<T extends object, K extends PropertyKey[]>(\n  object: T | null | undefined,\n  ...paths: K\n): Pick<T, Exclude<keyof T, K[number]>>;\n\n/**\n * Creates a new object with specified keys omitted.\n *\n * @template T - The type of object.\n * @template K - The type of keys to omit.\n * @param {T | null | undefined} object - The object to omit keys from.\n * @param {...Array<Many<K>>} paths - The keys to be omitted from the object.\n * @returns {Omit<T, K>} A new object with the specified keys omitted.\n *\n * @example\n * omit({ a: 1, b: 2, c: 3 }, 'a', ['b', 'c']);\n * // => {}\n */\nexport function omit<T extends object, K extends keyof T>(\n  object: T | null | undefined,\n  ...paths: Array<Many<K>>\n): Omit<T, K>;\n\n/**\n * Creates a new object with specified keys omitted.\n *\n * @template T - The type of object.\n * @param {T | null | undefined} object - The object to omit keys from.\n * @param {...Array<Many<PropertyKey>>} paths - The keys to be omitted from the object.\n * @returns {Partial<T>} A new object with the specified keys omitted.\n *\n * @example\n * omit({ a: 1, b: 2, c: 3 }, 'a', 'b');\n * // => { c: 3 }\n */\nexport function omit<T extends object>(object: T | null | undefined, ...paths: Array<Many<PropertyKey>>): Partial<T>;\n\n/**\n * Creates a new object with specified keys omitted.\n *\n * This function takes an object and a variable number of keys, and returns a new object that\n * excludes the properties corresponding to the specified keys. Note that keys can be deep.\n *\n * Deep keys can be specified for keys.\n *\n * @template T - The type of object.\n * @param {T | null | undefined} obj - The object to omit keys from.\n * @param {...Array<Many<PropertyKey>> | Array<Many<PropertyKey[]>>} keysArr - A variable number of keys to be omitted from the object.\n * @returns {Partial<T>} A new object with the specified keys omitted.\n *\n * @example\n * omit({ a: 1, b: 2, c: 3 }, 'a', 'b');\n * // => { c: 3 }\n *\n * omit({ a: { b: 1, c: 2 }, d: 3 }, 'a.b', 'd');\n * // => { a: { c: 2 } }\n */\nexport function omit<T extends object>(obj: T | null | undefined, ...keysArr: Array<Many<PropertyKey>>): Partial<T> {\n  if (obj == null) {\n    return {};\n  }\n\n  keysArr = flatten(keysArr);\n\n  const result = cloneInOmit(obj, keysArr);\n\n  for (let i = 0; i < keysArr.length; i++) {\n    let keys = keysArr[i];\n\n    switch (typeof keys) {\n      case 'object': {\n        if (!Array.isArray(keys)) {\n          keys = Array.from(keys as PropertyKey[]);\n        }\n\n        for (let j = 0; j < keys.length; j++) {\n          const key = keys[j];\n\n          unset(result, key);\n        }\n\n        break;\n      }\n      case 'string':\n      case 'symbol':\n      case 'number': {\n        unset(result, keys);\n        break;\n      }\n    }\n  }\n\n  return result;\n}\n\nfunction cloneInOmit<T extends object>(obj: T, keys: Array<Many<PropertyKey>>): Partial<T> {\n  const hasDeepKey = keys.some(key => Array.isArray(key) || isDeepKey(key as PropertyKey));\n\n  if (hasDeepKey) {\n    return deepCloneInOmit(obj);\n  }\n\n  return shallowCloneInOmit(obj);\n}\n\nfunction shallowCloneInOmit<T extends object>(obj: T): Partial<T> {\n  const result = {} as Partial<T>;\n  const keysToCopy = [...keysIn(obj), ...getSymbolsIn(obj)] as Array<keyof T>;\n\n  for (let i = 0; i < keysToCopy.length; i++) {\n    const key = keysToCopy[i];\n    result[key] = obj[key];\n  }\n\n  return result;\n}\n\nfunction deepCloneInOmit<T extends object>(obj: T): Partial<T> {\n  const result = {} as Partial<T>;\n  const keysToCopy = [...keysIn(obj), ...getSymbolsIn(obj)] as Array<keyof T>;\n\n  for (let i = 0; i < keysToCopy.length; i++) {\n    const key = keysToCopy[i];\n    result[key] = cloneDeepWith(obj[key], valueToClone => {\n      if (isPlainObject(valueToClone)) {\n        return undefined;\n      }\n\n      return valueToClone;\n    });\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/omitBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { omitBy as omitByLodash } from 'lodash';\nimport { omitBy } from './omitBy';\nimport { symbol } from '../_internal/symbol';\nimport { castArray } from '../array/castArray';\nimport { map } from '../array/map';\nimport { some } from '../array/some';\nimport { isSymbol } from '../predicate/isSymbol';\nimport { toString } from '../util/toString';\n\ndescribe('omitBy', () => {\n  const object = { a: 1, b: 2, c: 3, d: 4 };\n  const expected = { b: 2, d: 4 };\n  const resolve = function (object: any, props: any) {\n    props = castArray(props);\n    return function (value: any) {\n      return some(props, (key: any) => {\n        key = isSymbol(key) ? key : toString(key);\n        return object[key] === value;\n      });\n    };\n  };\n\n  it('should create an object with omitted string keyed properties', () => {\n    expect(omitBy(object, resolve(object, 'a'))).toEqual({ b: 2, c: 3, d: 4 });\n    expect(omitBy(object, resolve(object, ['a', 'c']))).toEqual(expected);\n  });\n\n  it('should include inherited string keyed properties', () => {\n    function Foo() {}\n    Foo.prototype = object;\n\n    // @ts-expect-error - Foo is a constructor\n    const foo = new Foo();\n    expect(omitBy(foo, resolve(object, ['a', 'c']))).toEqual(expected);\n  });\n\n  it('omitBy should preserve the sign of 0', () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = [{ 0: 'b' }, { 0: 'b' }, { '-0': 'a' }, { '-0': 'a' }];\n\n    const actual = map(props, (key: any) => omitBy(object, resolve(object, key)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should include symbols', () => {\n    function Foo(this: any) {\n      this.a = 0;\n      this[symbol] = 1;\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      // @ts-expect-error - Foo is a constructor\n      const foo = new Foo();\n      const actual = omitBy(foo, resolve(foo, 'a'));\n\n      expect(actual[symbol as any]).toBe(1);\n      expect(actual[symbol2 as any]).toBe(2);\n      expect(symbol3 in actual).toBeFalsy();\n    }\n  });\n\n  it('should create an object with omitted symbols', () => {\n    function Foo(this: any) {\n      this.a = 0;\n      this[symbol] = 1;\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      // @ts-expect-error - Foo is a constructor\n      const foo = new Foo();\n      let actual = omitBy(foo, resolve(foo, symbol));\n\n      expect(actual.a).toBe(0);\n      expect(symbol in actual).toBeFalsy();\n      expect(actual[symbol2 as any]).toBe(2);\n      expect(symbol3 in actual).toBeFalsy();\n\n      actual = omitBy(foo, resolve(foo, symbol2));\n\n      expect(actual.a).toBe(0);\n      expect(actual[symbol as any]).toBe(1);\n      expect(symbol2 in actual).toBeFalsy();\n      expect(symbol3 in actual).toBeFalsy();\n    }\n  });\n\n  it('should work with an array object', () => {\n    const array = [1, 2, 3];\n    expect(omitBy(array, resolve(array, ['0', '2']))).toEqual({ 1: 2 });\n  });\n\n  it('should return an empty object if shouldOmit is null', () => {\n    const obj = { a: 1, b: 'omit', c: 3 };\n    const result = omitBy(obj, null as any);\n    expect(result).toEqual({});\n  });\n\n  it('should return an empty object if the object is null', () => {\n    const obj = null;\n    const shouldOmit = (value: string) => typeof value === 'string';\n    const result = omitBy(obj as unknown as object, shouldOmit);\n    expect(result).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(omitBy).toEqualTypeOf<typeof omitByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/omitBy.ts",
    "content": "import { keysIn } from './keysIn.ts';\nimport { range } from '../../math/range.ts';\nimport { getSymbolsIn } from '../_internal/getSymbolsIn.ts';\nimport { ValueKeyIteratee } from '../_internal/ValueKeyIteratee.ts';\nimport { identity } from '../function/identity.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isSymbol } from '../predicate/isSymbol.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * @template T\n * @param {Record<string, T> | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T>} predicate - The function invoked per property.\n * @returns {Record<string, T>} Returns the new object.\n *\n * @example\n * omitBy({ 'a': 1, 'b': '2', 'c': 3 }, isString);\n * // => { 'a': 1, 'c': 3 }\n */\nexport function omitBy<T>(\n  object: Record<string, T> | null | undefined,\n  predicate?: ValueKeyIteratee<T>\n): Record<string, T>;\n\n/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * @template T\n * @param {Record<number, T> | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T>} predicate - The function invoked per property.\n * @returns {Record<number, T>} Returns the new object.\n *\n * @example\n * omitBy({ 0: 1, 1: '2', 2: 3 }, isString);\n * // => { 0: 1, 2: 3 }\n */\nexport function omitBy<T>(\n  object: Record<number, T> | null | undefined,\n  predicate?: ValueKeyIteratee<T>\n): Record<number, T>;\n\n/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * @template T\n * @param {T | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T[keyof T]>} predicate - The function invoked per property.\n * @returns {Partial<T>} Returns the new object.\n *\n * @example\n * omitBy({ 'a': 1, 'b': '2', 'c': 3 }, isString);\n * // => { 'a': 1, 'c': 3 }\n */\nexport function omitBy<T extends object>(\n  object: T | null | undefined,\n  predicate: ValueKeyIteratee<T[keyof T]>\n): Partial<T>;\n\n/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns false.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to omit properties from.\n * @param {(value: T[keyof T], key: keyof T, obj: T) => boolean} shouldOmit - A predicate function that determines\n * whether a property should be omitted. It takes the property's value, key, and the source object as arguments and returns `true`\n * if the property should be omitted, and `false` otherwise.\n * @returns {Partial<T>} Returns the new object.\n *\n * @example\n * const obj = { a: 1, b: 'omit', c: 3 };\n * const shouldOmit = (value) => typeof value === 'string';\n * const result = omitBy(obj, shouldOmit);\n * // result will be { a: 1, c: 3 }\n */\nexport function omitBy<T, S extends T>(\n  object: Record<string, T> | Record<number, T> | object | null | undefined,\n  shouldOmit?: ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>\n): Record<string, S> | Record<number, S> | Partial<T> {\n  if (object == null) {\n    return {};\n  }\n\n  const result: Partial<T> = {};\n\n  const predicate = createIteratee(shouldOmit ?? identity);\n\n  const keys = isArrayLike(object)\n    ? range(0, object.length)\n    : ([...keysIn(object), ...getSymbolsIn(object)] as Array<keyof T>);\n  for (let i = 0; i < keys.length; i++) {\n    const key = (isSymbol(keys[i]) ? keys[i] : keys[i].toString()) as keyof T;\n    const value = object[key as keyof typeof object];\n\n    if (!predicate(value, key, object)) {\n      result[key] = value;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/pick.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { pick as pickLodash } from 'lodash';\nimport { pick } from './pick';\nimport { symbol } from '../_internal/symbol';\nimport { toArgs } from '../_internal/toArgs';\nimport { map } from '../array/map';\nimport { nthArg } from '../function/nthArg';\n\ndescribe('compat/pick', () => {\n  const object = { a: 1, b: 2, c: 3, d: 4 };\n  const nested = { a: 1, b: { c: 2, d: 3 } };\n  const expected = { a: 1, c: 3 };\n  const resolve = nthArg(1) as (obj: any, keys: any) => any;\n\n  it(`\\`pick\\` should create an object of picked string keyed properties`, () => {\n    expect(pick(object, resolve(object, 'a'))).toEqual({ a: 1 });\n    expect(pick(object, resolve(object, ['a', 'c']))).toEqual(expected);\n  });\n\n  it(`\\`pick\\` should pick inherited string keyed properties`, () => {\n    function Foo() {}\n    Foo.prototype = object;\n\n    // @ts-expect-error - Foo is a constructor\n    const foo = new Foo();\n    expect(pick(foo, resolve(foo, ['a', 'c']))).toEqual(expected);\n  });\n\n  it(`\\`pick\\` should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = [{ '-0': 'a' }, { '-0': 'a' }, { 0: 'b' }, { 0: 'b' }];\n\n    const actual = map(props, key => pick(object, resolve(object, key)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`pick\\` should pick symbols`, () => {\n    function Foo(this: any) {\n      this[symbol] = 1;\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      // @ts-expect-error - Foo is a constructor\n      const foo = new Foo();\n      const actual = pick(foo, resolve(foo, [symbol, symbol2, symbol3]));\n\n      // @ts-expect-error - symbol is a symbol\n      expect(actual[symbol]).toBe(1);\n      // @ts-expect-error - symbol2 is a symbol\n      expect(actual[symbol2]).toBe(2);\n      // @ts-expect-error - symbol3 is a symbol\n      expect(actual[symbol3]).toBe(3);\n    }\n  });\n\n  it(`\\`pick\\` should work with an array \\`object\\``, () => {\n    const array = [1, 2, 3];\n    expect(pick(array, resolve(array, '1'))).toEqual({ 1: 2 });\n  });\n\n  it('should flatten `paths`', () => {\n    pick(object, 'a', 'b');\n    expect(pick(object, 'a', 'c')).toEqual({ a: 1, c: 3 });\n    expect(pick(object, ['a', 'd'], 'c')).toEqual({ a: 1, c: 3, d: 4 });\n  });\n\n  it('should support deep paths', () => {\n    expect(pick(nested, 'b.c')).toEqual({ b: { c: 2 } });\n  });\n\n  it('should support path arrays', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n    const actual = pick(object, [['a.b']]);\n\n    expect(actual).toEqual({ 'a.b': 1 });\n  });\n\n  it('should pick a key over a path', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    ['a.b', ['a.b']].forEach(path => {\n      expect(pick(object, path)).toEqual({ 'a.b': 1 });\n    });\n\n    const obj = { a: { b: { c: 1 } }, d: { e: 2 }, f: 3, 'f.g': 4 };\n    expect(pick(obj, ['a.b.c', 'f.g'])).toEqual({\n      a: { b: { c: 1 } },\n      'f.g': 4,\n    });\n  });\n\n  it('should coerce `paths` to strings', () => {\n    expect(pick({ 0: 'a', 1: 'b' }, 0)).toEqual({ 0: 'a' });\n  });\n\n  it('should return an empty object when `object` is nullish', () => {\n    [null, undefined].forEach(value => {\n      expect(pick(value, 'valueOf')).toEqual({});\n    });\n  });\n\n  it('should work with a primitive `object`', () => {\n    expect(pick('', 'slice')).toEqual({ slice: ''.slice });\n  });\n\n  it('should work with `arguments` object `paths`', () => {\n    const args = toArgs(['a', 'c']);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(pick(object, args)).toEqual({ a: 1, c: 3 });\n  });\n\n  it('should work with stringified path with array', () => {\n    const array: number[] = [];\n    array[2] = 3;\n    expect(pick({ array: [1, 2, 3] }, 'array[2]')).toEqual({ array });\n\n    const array2: number[] = [];\n    array2[1] = 2;\n    expect(pick({ array: [1, 2, 3] }, 'array[1]')).toEqual({ array: array2 });\n  });\n\n  it('should not pick from nonexistent keys', () => {\n    const obj: { a?: unknown; b?: unknown } = {};\n    const result = pick(obj, ['a', 'b']);\n\n    expect(Reflect.ownKeys(result)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(pick).toEqualTypeOf<typeof pickLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/pick.ts",
    "content": "import { get } from './get.ts';\nimport { has } from './has.ts';\nimport { set } from './set.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isNil } from '../predicate/isNil.ts';\n\n/**\n * Creates a new object composed of the picked object properties.\n *\n * @template T - The type of object.\n * @template U - The type of keys to pick.\n * @param {T} object - The object to pick keys from.\n * @param {...Array<Many<U>>} props - An array of keys to be picked from the object.\n * @returns {Pick<T, U>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T extends object, U extends keyof T>(object: T, ...props: Array<Many<U>>): Pick<T, U>;\n\n/**\n * Creates a new object composed of the picked object properties.\n *\n * @template T - The type of object.\n * @param {T | null | undefined} object - The object to pick keys from.\n * @param {...Array<Many<PropertyPath>>} props - An array of keys to be picked from the object.\n * @returns {Partial<T>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T>(object: T | null | undefined, ...props: Array<Many<PropertyPath>>): Partial<T>;\n\n/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template U - The type of keys to pick.\n * @param {T | any | null | undefined} object - The object to pick keys from.\n * @param {...Array<Many<U>> | Array<Many<PropertyPath>>} props - An array of keys to be picked from the object. received keys goes through a flattening process before being used.\n * @returns {Pick<T, U> | Partial<T>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n *\n * // each path can be passed individually as an argument\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, 'a', 'c');\n *\n * // pick a key over a path\n * const obj = { 'a.b': 1, a: { b: 2 } };\n * const result = pick(obj, 'a.b');\n * // result will be { 'a.b': 1 }\n */\nexport function pick<T extends object, U extends keyof T>(\n  obj: T | any | null | undefined,\n  ...keysArr: Array<Many<U>> | Array<Many<PropertyPath>>\n): Pick<T, U> | Partial<T> {\n  if (isNil(obj)) {\n    return {};\n  }\n\n  const result: any = {};\n\n  for (let i = 0; i < keysArr.length; i++) {\n    let keys = keysArr[i];\n    switch (typeof keys) {\n      case 'object': {\n        if (!Array.isArray(keys)) {\n          if (isArrayLike(keys)) {\n            // eslint-disable-next-line\n            // @ts-ignore\n            keys = Array.from(keys) as PropertyKey[];\n          } else {\n            keys = [keys];\n          }\n        }\n        break;\n      }\n      case 'string':\n      case 'symbol':\n      case 'number': {\n        keys = [keys];\n        break;\n      }\n    }\n\n    for (const key of keys) {\n      const value = get(obj, key);\n\n      if (value === undefined && !has(obj, key)) {\n        continue;\n      }\n\n      if (typeof key === 'string' && Object.hasOwn(obj, key)) {\n        result[key] = value;\n      } else {\n        set(result, key, value);\n      }\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/pickBy.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { pickBy as pickByLodash } from 'lodash';\nimport { pickBy } from './pickBy';\nimport { symbol } from '../_internal/symbol';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('pickBy', () => {\n  const object = { a: 1, b: 2, c: 3, d: 4 };\n  const expected = { a: 1, c: 3 };\n  const resolve = function (object: any, props: any) {\n    props = lodashStable.castArray(props);\n    return function (value: any) {\n      return lodashStable.some(props, key => {\n        key = lodashStable.isSymbol(key) ? key : lodashStable.toString(key);\n        return object[key] === value;\n      });\n    };\n  };\n\n  it(`\\`pickBy\\` should create an object of picked string keyed properties`, () => {\n    expect(pickBy(object, resolve(object, 'a'))).toEqual({ a: 1 });\n    expect(pickBy(object, resolve(object, ['a', 'c']))).toEqual(expected);\n  });\n\n  it(`\\`pickBy\\` should pick inherited string keyed properties`, () => {\n    function Foo() {}\n    Foo.prototype = object;\n\n    // @ts-expect-error - Foo is a constructor\n    const foo = new Foo();\n    expect(pickBy(foo, resolve(foo, ['a', 'c']))).toEqual(expected);\n  });\n\n  it(`\\`pickBy\\` should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = [{ '-0': 'a' }, { '-0': 'a' }, { 0: 'b' }, { 0: 'b' }];\n\n    const actual = lodashStable.map(props, key => pickBy(object, resolve(object, key)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`pickBy\\` should pick symbols`, () => {\n    function Foo(this: any) {\n      this[symbol] = 1;\n    }\n\n    if (Symbol) {\n      const symbol2 = Symbol('b');\n      Foo.prototype[symbol2] = 2;\n\n      const symbol3 = Symbol('c');\n      Object.defineProperty(Foo.prototype, symbol3, {\n        configurable: true,\n        enumerable: false,\n        writable: true,\n        value: 3,\n      });\n\n      // @ts-expect-error - Foo is a constructor\n      const foo = new Foo();\n      const actual = pickBy(foo, resolve(foo, [symbol, symbol2, symbol3]));\n\n      expect(actual[symbol as any]).toBe(1);\n      expect(actual[symbol2 as any]).toBe(2);\n\n      expect(symbol3 in actual).toBe(false);\n    }\n  });\n\n  it(`\\`pickBy\\` should work with an array \\`object\\``, () => {\n    const array = [1, 2, 3];\n    expect(pickBy(array, resolve(array, '1'))).toEqual({ 1: 2 });\n  });\n\n  it('should work with a predicate argument', () => {\n    const object = { a: 1, b: 2, c: 3, d: 4 };\n\n    const actual = pickBy(object, n => n === 1 || n === 3);\n\n    expect(actual).toEqual({ a: 1, c: 3 });\n  });\n\n  it('should not treat keys with dots as deep paths', () => {\n    const object = { 'a.b.c': 1 };\n    const actual = pickBy(object, stubTrue);\n\n    expect(actual).toEqual({ 'a.b.c': 1 });\n  });\n\n  it('should pick properties based on the predicate function', () => {\n    const obj = { a: 1, b: 'pick', c: 3 };\n    const shouldPick = (value: string | number) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({ b: 'pick' });\n  });\n\n  it('should return an empty object if no properties satisfy the predicate', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const shouldPick = (value: number) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it('should return the same object if all properties satisfy the predicate', () => {\n    const obj = { a: 'pick', b: 'pick', c: 'pick' };\n    const shouldPick = (value: string) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual(obj);\n  });\n\n  it('should work with an empty object', () => {\n    const obj = {};\n    const shouldPick = (value: never) => value;\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it('should work with nested objects', () => {\n    const obj = { a: 1, b: { nested: 'pick' }, c: 3 };\n    const shouldPick = (value: number | { nested: string }, key: string) => key === 'b';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({ b: { nested: 'pick' } });\n  });\n\n  it('should work with no predicate function', () => {\n    const obj = { a: 1, b: 'pick', c: 3 };\n    const result = pickBy(obj);\n    expect(result).toEqual(obj);\n  });\n\n  it('should return an empty object if the object is null', () => {\n    const obj = null;\n    const shouldPick = (value: string) => typeof value === 'string';\n    const result = pickBy(obj as unknown as object, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it('should return an empty object if the object is undefined', () => {\n    const obj = undefined;\n    const shouldPick = (value: string) => typeof value === 'string';\n    const result = pickBy(obj as unknown as object, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it(`should provide correct iteratee arguments`, () => {\n    const array = [1, 2, 3];\n\n    let args: any;\n    const expected: any = [1, 0, array];\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    pickBy(array, function () {\n      // eslint-disable-next-line\n      args || (args = Array.prototype.slice.call(arguments));\n    });\n\n    // eslint-disable-next-line\n    expected[1] += '';\n\n    expect(args).toEqual(expected);\n  });\n\n  it(`should treat sparse arrays as dense`, () => {\n    const array = [1];\n    array[2] = 3;\n\n    let expected = [\n      [1, '0', array],\n      [undefined, '1', array],\n      [3, '2', array],\n    ];\n\n    expected = lodashStable.map(expected, args => {\n      // eslint-disable-next-line\n      args[1] += '';\n      return args;\n    });\n\n    const argsList: any = [];\n    pickBy(array, function () {\n      // eslint-disable-next-line\n      argsList.push(Array.prototype.slice.call(arguments));\n      return true;\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  it(`should ignore changes to \\`length\\``, () => {\n    let count = 0;\n    const array = [1];\n\n    pickBy(array, () => {\n      if (++count === 1) {\n        array.push(2);\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it(`should ignore added \\`object\\` properties`, () => {\n    let count = 0;\n    const object = { a: 1 };\n\n    pickBy(object, () => {\n      if (++count === 1) {\n        // eslint-disable-next-line\n        // @ts-ignore\n        object.b = 2;\n      }\n      return true;\n    });\n\n    expect(count).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(pickBy).toEqualTypeOf<typeof pickByLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/pickBy.ts",
    "content": "import { keysIn } from './keysIn.ts';\nimport { range } from '../../math/range.ts';\nimport { getSymbolsIn } from '../_internal/getSymbolsIn.ts';\nimport { ValueKeyIteratee } from '../_internal/ValueKeyIteratee.ts';\nimport { ValueKeyIterateeTypeGuard } from '../_internal/ValueKeyIterateeTypeGuard.ts';\nimport { identity } from '../function/identity.ts';\nimport { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isSymbol } from '../predicate/isSymbol.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * @template T - The type of object values.\n * @template S - The type of filtered values.\n * @param {Record<string, T> | null | undefined} object - The source object.\n * @param {ValueKeyIterateeTypeGuard<T, S>} predicate - The function invoked per property.\n * @returns {Record<string, S>} Returns the new filtered object.\n *\n * @example\n * const users = {\n *   'fred': { 'user': 'fred', 'age': 40 },\n *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n * pickBy(users, ({ age }) => age < 40);\n * // => { 'pebbles': { 'user': 'pebbles', 'age': 1 } }\n */\nexport function pickBy<T, S extends T>(\n  object: Record<string, T> | null | undefined,\n  predicate: ValueKeyIterateeTypeGuard<T, S>\n): Record<string, S>;\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * @template T - The type of object values.\n * @template S - The type of filtered values.\n * @param {Record<number, T> | null | undefined} object - The source object.\n * @param {ValueKeyIterateeTypeGuard<T, S>} predicate - The function invoked per property.\n * @returns {Record<number, S>} Returns the new filtered object.\n *\n * @example\n * const array = [1, 2, 3, 4];\n * pickBy(array, (value) => value % 2 === 0);\n * // => { 1: 2, 3: 4 }\n */\nexport function pickBy<T, S extends T>(\n  object: Record<number, T> | null | undefined,\n  predicate: ValueKeyIterateeTypeGuard<T, S>\n): Record<number, S>;\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * @template T - The type of object values.\n * @param {Record<string, T> | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T>} [predicate] - The function invoked per property.\n * @returns {Record<string, T>} Returns the new filtered object.\n *\n * @example\n * const object = { 'a': 1, 'b': '2', 'c': 3 };\n * pickBy(object, (value) => typeof value === 'string');\n * // => { 'b': '2' }\n */\nexport function pickBy<T>(\n  object: Record<string, T> | null | undefined,\n  predicate?: ValueKeyIteratee<T>\n): Record<string, T>;\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * @template T - The type of object values.\n * @param {Record<number, T> | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T>} [predicate] - The function invoked per property.\n * @returns {Record<number, T>} Returns the new filtered object.\n *\n * @example\n * const array = [1, 2, 3, 4];\n * pickBy(array, (value) => value > 2);\n * // => { 2: 3, 3: 4 }\n */\nexport function pickBy<T>(\n  object: Record<number, T> | null | undefined,\n  predicate?: ValueKeyIteratee<T>\n): Record<number, T>;\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * @template T - The type of object.\n * @param {T | null | undefined} object - The source object.\n * @param {ValueKeyIteratee<T[keyof T]>} [predicate] - The function invoked per property.\n * @returns {Partial<T>} Returns the new filtered object.\n *\n * @example\n * const object = { 'a': 1, 'b': '2', 'c': 3 };\n * pickBy(object, (value) => typeof value === 'string');\n * // => { 'b': '2' }\n */\nexport function pickBy<T extends object>(\n  object: T | null | undefined,\n  predicate?: ValueKeyIteratee<T[keyof T]>\n): Partial<T>;\n\n/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns true.\n *\n * @template T - The type of object.\n * @param {Record<string, T> | Record<number, T> | object | null | undefined} obj - The object to pick properties from.\n * @param {ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>} [shouldPick] - A predicate function that determines\n * whether a property should be picked. It takes the property's key and value as arguments and returns `true`\n * if the property should be picked, and `false` otherwise.\n * @returns {Record<string, S> | Record<number, S> | Partial<T>} A new object with the properties that satisfy the predicate function.\n *\n * @example\n * const obj = { a: 1, b: 'pick', c: 3 };\n * const shouldPick = (value) => typeof value === 'string';\n * const result = pickBy(obj, shouldPick);\n * // result will be { b: 'pick' }\n */\nexport function pickBy<T, S extends T>(\n  obj: Record<string, T> | Record<number, T> | object | null | undefined,\n  shouldPick?: ValueKeyIterateeTypeGuard<T, S> | ValueKeyIteratee<T[keyof T]> | ValueKeyIteratee<T>\n): Record<string, S> | Record<number, S> | Partial<T> {\n  if (obj == null) {\n    return {};\n  }\n\n  const predicate = createIteratee(shouldPick ?? identity);\n\n  const result: Partial<T> = {};\n\n  const keys = isArrayLike(obj) ? range(0, obj.length) : ([...keysIn(obj), ...getSymbolsIn(obj)] as Array<keyof T>);\n  for (let i = 0; i < keys.length; i++) {\n    const key = (isSymbol(keys[i]) ? keys[i] : keys[i].toString()) as keyof T;\n    const value = obj[key as keyof typeof obj];\n\n    if (predicate(value, key, obj)) {\n      result[key] = value;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/property.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { property as propertyLodash } from 'lodash';\nimport { property } from './property';\nimport { noop } from '../../function/noop';\n\ndescribe('property', () => {\n  it('should create a function that plucks a property value of a given object', () => {\n    const object = { a: 1 };\n\n    ['a', ['a']].forEach(path => {\n      const prop = property(path);\n      expect(prop.length).toBe(1);\n      expect(prop(object)).toBe(1);\n    });\n  });\n\n  it('should pluck deep property values', () => {\n    const object = { a: { b: 2 } };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const prop = property(path);\n      expect(prop(object)).toBe(2);\n    });\n  });\n\n  it('should pluck inherited property values', () => {\n    function Foo() {}\n    Foo.prototype.a = 1;\n\n    ['a', ['a']].forEach(path => {\n      const prop = property(path);\n      expect(\n        prop(\n          // eslint-disable-next-line\n          // @ts-ignore\n          new Foo()\n        )\n      ).toBe(1);\n    });\n  });\n\n  it('should work with a non-string `path`', () => {\n    const array = [1, 2, 3];\n\n    [1, [1]].forEach(path => {\n      const prop = property(path);\n      expect(prop(array)).toBe(2);\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = props.map(key => {\n      const prop = property(key);\n      return prop(object);\n    });\n\n    expect(actual).toEqual(['a', 'a', 'b', 'b']);\n  });\n\n  it('should pluck a key over a path', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    ['a.b', ['a.b']].forEach(path => {\n      const prop = property(path);\n      expect(prop(object)).toBe(1);\n    });\n  });\n\n  it('should return `undefined` when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = values.map(noop);\n\n    ['constructor', ['constructor']].forEach(path => {\n      const prop = property(path);\n\n      const actual = values.map(value => prop(value));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` for deep paths when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = values.map(noop);\n\n    ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']].forEach(path => {\n      const prop = property(path);\n\n      const actual = values.map(value => prop(value));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` if parts of `path` are missing', () => {\n    const object = {};\n\n    ['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']].forEach(path => {\n      const prop = property(path);\n      expect(prop(object)).toBe(undefined);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(property).toEqualTypeOf<typeof propertyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/property.ts",
    "content": "import { get } from './get.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\n\nexport function property<T, R>(path: PropertyPath): (obj: T) => R;\n\n/**\n * Creates a function that returns the value at a given path of an object.\n *\n * @template T - The type of object.\n * @template R - The type of the value to return.\n * @param {PropertyPath} path - The path of the property to get.\n * @returns {(object: T) => R} - Returns a new function that takes an object and returns the value at the specified path.\n *\n * @example\n * const getObjectValue = property('a.b.c');\n * const result = getObjectValue({ a: { b: { c: 3 } } });\n * console.log(result); // => 3\n *\n * @example\n * const getObjectValue = property(['a', 'b', 'c']);\n * const result = getObjectValue({ a: { b: { c: 3 } } });\n * console.log(result); // => 3\n */\nexport function property<T, R>(path: PropertyPath): (object: T) => R {\n  return function (object: T) {\n    return get(object, path);\n  };\n}\n"
  },
  {
    "path": "src/compat/object/propertyOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { propertyOf as propertyOfLodash } from 'lodash';\nimport { propertyOf } from './propertyOf';\nimport { noop } from '../../function';\nimport { constant } from '../util/constant';\nimport { times } from '../util/times';\n\ndescribe('propertyOf', () => {\n  it('should create a function that plucks a property value of a given key', () => {\n    const object = { a: 1 };\n    const propOf = propertyOf(object);\n\n    expect(propOf.length).toBe(1);\n    ['a', ['a']].forEach(path => {\n      expect(propOf(path)).toBe(1);\n    });\n  });\n\n  it('should pluck deep property values', () => {\n    const object = { a: { b: 2 } };\n    const propOf = propertyOf(object);\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      expect(propOf(path)).toBe(2);\n    });\n  });\n\n  it('should pluck inherited property values', () => {\n    function Foo() {\n      // @ts-expect-error type not defined\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    // @ts-expect-error type not defined\n    const propOf = propertyOf(new Foo());\n\n    ['b', ['b']].forEach(path => {\n      expect(propOf(path)).toBe(2);\n    });\n  });\n\n  it('should work with a non-string `path`', () => {\n    const array = [1, 2, 3];\n    const propOf = propertyOf(array);\n\n    [1, [1]].forEach(path => {\n      expect(propOf(path)).toBe(2);\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = props.map(key => {\n      const propOf = propertyOf(object);\n      return propOf(key);\n    });\n\n    expect(actual).toEqual(['a', 'a', 'b', 'b']);\n  });\n\n  it('should coerce `path` to a string', () => {\n    function fn() {}\n    fn.toString = constant('fn');\n\n    const expected = [1, 2, 3, 4];\n    const object = { null: 1, undefined: 2, fn: 3, '[object Object]': 4 };\n    const paths = [null, undefined, fn, {}];\n\n    times(2, index => {\n      const actual = paths.map(path => {\n        const propOf = propertyOf(object);\n        // @ts-expect-error invalid types\n        return propOf(index ? [path] : path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should pluck a key over a path', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n    const propOf = propertyOf(object);\n\n    ['a.b', ['a.b']].forEach(path => {\n      expect(propOf(path)).toBe(1);\n    });\n  });\n\n  it('should return `undefined` when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(noop);\n\n    ['constructor', ['constructor']].forEach(path => {\n      const actual = values.map((value, index) => {\n        // @ts-expect-error invalid types\n        const propOf = index ? propertyOf(value) : propertyOf();\n        return propOf(path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` for deep paths when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(noop);\n\n    ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']].forEach(path => {\n      const actual = values.map((value, index) => {\n        // @ts-expect-error invalid types\n        const propOf = index ? propertyOf(value) : propertyOf();\n        return propOf(path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` if parts of `path` are missing', () => {\n    const propOf = propertyOf({});\n\n    ['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']].forEach(path => {\n      expect(propOf(path)).toBe(undefined);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(propertyOf).toEqualTypeOf<typeof propertyOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/propertyOf.ts",
    "content": "import { get } from './get.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport function propertyOf<T extends {}>(object: T): (path: PropertyPath) => any;\n\n/**\n * Creates a function that returns the value at a given path of an object.\n *\n * Unlike `property`, which creates a function bound to a specific path and allows you to query different objects,\n * `propertyOf` creates a function bound to a specific object and allows you to query different paths within that object.\n *\n * @template T - The type of object.\n * @param {T} object - The object to query.\n * @returns {(path: PropertyPath) => any} - Returns a new function that takes a path and retrieves the value from the object at the specified path.\n *\n * @example\n * const getValue = propertyOf({ a: { b: { c: 3 } } });\n * const result = getValue('a.b.c');\n * console.log(result); // => 3\n *\n * @example\n * const getValue = propertyOf({ a: { b: { c: 3 } } });\n * const result = getValue(['a', 'b', 'c']);\n * console.log(result); // => 3\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport function propertyOf<T extends {}>(object: T): (path: PropertyPath) => any {\n  return function (path: PropertyPath) {\n    return get(object, path);\n  };\n}\n"
  },
  {
    "path": "src/compat/object/result.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { result as resultLodash } from 'lodash';\nimport { result } from './result';\nimport { empties } from '../_internal/empties';\nimport { numberProto } from '../_internal/numberProto';\nimport { stubB } from '../_internal/stubB';\nimport { symbol } from '../_internal/symbol';\nimport { forEach } from '../array/forEach';\nimport { map } from '../array/map';\nimport { noop } from '../compat';\nimport { constant } from '../util/constant';\n\ndescribe('result', () => {\n  const object = { a: 1, b: stubB };\n\n  it('should invoke function values', () => {\n    expect(result(object, 'b')).toBe('b');\n  });\n\n  it('should invoke default function values', () => {\n    const actual = result(object, 'c', object.b);\n    expect(actual).toBe('b');\n  });\n\n  it('should invoke nested function values', () => {\n    const value = { a: constant({ b: stubB }) };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      expect(result(value, path)).toBe('b');\n    });\n  });\n\n  it('should invoke deep property methods with the correct `this` binding', () => {\n    const value = {\n      a: {\n        b: function () {\n          return this.c;\n        },\n        c: 1,\n      },\n    };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      expect(result(value, path)).toBe(1);\n    });\n  });\n\n  it(`should get string keyed property values`, () => {\n    const object = { a: 1 };\n\n    forEach(['a', ['a']], path => {\n      expect(result(object, path)).toBe(1);\n    });\n  });\n\n  it(`should preserve the sign of \\`0\\``, () => {\n    const object = { '-0': 'a', 0: 'b' };\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = map(props, key => result(object, key));\n\n    expect(actual).toEqual(['a', 'a', 'b', 'b']);\n  });\n\n  it(`should get symbol keyed property values`, () => {\n    const object: Record<PropertyKey, unknown> = {};\n    object[symbol] = 1;\n\n    expect(result(object, symbol)).toBe(1);\n  });\n\n  it(`should get deep property values`, () => {\n    const object = { a: { b: 2 } };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      expect(result(object, path)).toBe(2);\n    });\n  });\n\n  it(`should get a key over a path`, () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    forEach(['a.b', ['a.b']], path => {\n      expect(result(object, path)).toBe(1);\n    });\n  });\n\n  it(`should not coerce array paths to strings`, () => {\n    const object = { 'a,b,c': 3, a: { b: { c: 4 } } };\n    expect(result(object, ['a', 'b', 'c'])).toBe(4);\n  });\n\n  it(`should not ignore empty brackets`, () => {\n    const object = { a: { '': 1 } };\n    expect(result(object, 'a[]')).toBe(1);\n  });\n\n  it(`should handle empty paths`, () => {\n    forEach(\n      [\n        ['', ''],\n        [[], ['']],\n      ],\n      pair => {\n        expect(result({}, pair[0])).toBe(undefined);\n        expect(result({ '': 3 }, pair[1])).toBe(3);\n      }\n    );\n  });\n\n  it(`should handle complex paths`, () => {\n    const object = {\n      a: { '-1.23': { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: 8 } } } } } } },\n    };\n\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    forEach(paths, path => {\n      expect(result(object, path)).toBe(8);\n    });\n  });\n\n  it(`should return \\`undefined\\` when \\`object\\` is nullish`, () => {\n    forEach(['constructor', ['constructor']], path => {\n      expect(result(null, path)).toBe(undefined);\n      expect(result(undefined, path)).toBe(undefined);\n    });\n  });\n\n  it(`should return \\`undefined\\` for deep paths when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = map(values, noop);\n    const paths = ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']];\n\n    forEach(paths, path => {\n      const actual = map(values, value => result(value, path));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return \\`undefined\\` if parts of \\`path\\` are missing`, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const object = { a: [, null] };\n\n    forEach(['a[1].b.c', ['a', '1', 'b', 'c']], path => {\n      expect(result(object, path)).toBe(undefined);\n    });\n  });\n\n  it(`should be able to return \\`null\\` values`, () => {\n    const object = { a: { b: null } };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      expect(result(object, path)).toBe(null);\n    });\n  });\n\n  it(`should follow \\`path\\` over non-plain objects`, () => {\n    const paths = ['a.b', ['a', 'b']];\n\n    forEach(paths, path => {\n      numberProto.a = { b: 2 };\n      expect(result(0, path)).toBe(2);\n      delete numberProto.a;\n    });\n  });\n\n  it(`should return the default value for \\`undefined\\` values`, () => {\n    const object = { a: {} };\n    const values = empties.concat(true, new Date(), 1, /x/, 'a');\n    const expected = map(values, value => [value, value]);\n\n    forEach(['a.b', ['a', 'b']], path => {\n      const actual = map(values, value => [result(object, path, value), result(null, path, value)]);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should return the default value when \\`path\\` is empty`, () => {\n    expect(result({}, [], 'a')).toBe('a');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(result).toEqualTypeOf<typeof resultLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/result.ts",
    "content": "import { isKey } from '../_internal/isKey.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { toPath } from '../util/toPath.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Retrieves the value at a given path of an object.\n * If the resolved value is a function, it is invoked with the object as its `this` context.\n * If the value is `undefined`, the `defaultValue` is returned.\n *\n * @template T - The type of object.\n * @template R - The type of the value to return.\n * @param {T} object - The object to query.\n * @param {PropertyPath} path - The path of the property to get.\n * @param {R | ((...args: any[]) => R)} [defaultValue] - The value returned if the resolved value is `undefined`.\n * @returns {R} - Returns the resolved value.\n *\n * @example\n * const obj = { a: { b: { c: 3 } } };\n * result(obj, 'a.b.c');\n * // => 3\n *\n * @example\n * const obj = { a: () => 5 };\n * result(obj, 'a');\n * // => 5 (calls the function `a` and returns its result)\n *\n * @example\n * const obj = { a: { b: null } };\n * result(obj, 'a.b.c', 'default');\n * // => 'default'\n *\n * @example\n * const obj = { a: { b: { c: 3 } } };\n * result(obj, 'a.b.d', () => 'default');\n * // => 'default'\n */\nexport function result<R>(object: any, path: PropertyPath, defaultValue?: R | ((...args: any[]) => R)): R {\n  if (isKey(path, object)) {\n    path = [path];\n  } else if (!Array.isArray(path)) {\n    path = toPath(toString(path));\n  }\n\n  const pathLength = Math.max(path.length, 1);\n\n  for (let index = 0; index < pathLength; index++) {\n    const value = object == null ? undefined : object[toKey(path[index])];\n\n    if (value === undefined) {\n      return typeof defaultValue === 'function' ? (defaultValue as any).call(object) : (defaultValue as R);\n    }\n\n    object = typeof value === 'function' ? value.call(object) : value;\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/object/set.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { constant, each, map, toString, unset } from '..';\nimport type { set as setLodash } from 'lodash';\nimport { set } from './set';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('set', () => {\n  const oldValue = 1;\n  const value = 2;\n  const updater = value;\n\n  // --------------------------------------------------------------------------------\n  // object\n  //--------------------------------------------------------------------------------\n  it('should set a value on an object', () => {\n    interface Test {\n      a: number;\n    }\n    const result = set<Test>({} as Test, 'a', 1);\n    expect(result).toEqual({ a: 1 });\n  });\n\n  it('should set a value on an object with nested path', () => {\n    const result = set<{ a: { b: number } }>({} as { a: { b: number } }, 'a.b', 1);\n    expect(result).toEqual({ a: { b: 1 } });\n  });\n\n  it('should set a value on an object with paths with arrays', () => {\n    const result = set<{ a: { b: number } }>({} as { a: { b: number } }, ['a', 'b'], 1);\n    expect(result).toEqual({ a: { b: 1 } });\n  });\n\n  it('should set a value on an object with deeply nested path', () => {\n    const result = set<{ a: { b: { c: { d: number } } } }>({} as { a: { b: { c: { d: number } } } }, 'a.b.c.d', 1);\n    expect(result).toEqual({ a: { b: { c: { d: 1 } } } });\n  });\n\n  //--------------------------------------------------------------------------------\n  // array\n  //--------------------------------------------------------------------------------\n  it('should set a value on an array', () => {\n    const result = set<number[]>([] as number[], 0, 1);\n    expect(result).toEqual([1]);\n    expect(result[0]).toEqual(1);\n  });\n\n  it('should set a value on an array with nested path of depth 2', () => {\n    const result = set<number[][]>([] as number[][], '0.0', 1);\n    expect(result).toEqual([[1]]);\n    expect(result[0][0]).toEqual(1);\n  });\n\n  it('should set a value on an array with nested path of depth 3', () => {\n    const result = set<number[][][]>([], '0.0.0', 1);\n    expect(result).toEqual([[[1]]]);\n    expect(result[0][0][0]).toEqual(1);\n  });\n\n  it('should set a value on an existing array at a specific index', () => {\n    const arr = [1, 2, 3];\n    set(arr, 1, 4);\n    expect(arr).toEqual([1, 4, 3]);\n    expect(arr[1]).toEqual(4);\n  });\n\n  //--------------------------------------------------------------------------------\n  // object and array\n  //--------------------------------------------------------------------------------\n  it('should set a value on an array containing an object', () => {\n    const result = set<Array<{ a: number }>>([] as Array<{ a: number }>, '0.a', 1);\n    expect(result).toEqual([{ a: 1 }]);\n    expect(result[0].a).toEqual(1);\n  });\n\n  it('should set a value on an object containing an array', () => {\n    const result = set<{ a: number[] }>({} as { a: number[] }, 'a.0', 1);\n    expect(result).toEqual({ a: [1] });\n    expect(result.a[0]).toEqual(1);\n  });\n\n  it('should set a value on an object containing nested arrays', () => {\n    const result = set<{ a: number[][] }>({} as { a: number[][] }, 'a.0.0', 1);\n    expect(result).toEqual({ a: [[1]] });\n    expect(result.a[0][0]).toEqual(1);\n  });\n\n  it('should set a value on an object containing deeply nested arrays with bracket notation', () => {\n    const result = set<{ a: number[][][] }>({} as { a: number[][][] }, 'a[0][0][0]', 1);\n    expect(result).toEqual({ a: [[[1]]] });\n    expect(result.a[0][0][0]).toEqual(1);\n  });\n\n  it(`\\`set\\` should set property values`, () => {\n    each(['a', ['a']], path => {\n      const object = { a: oldValue };\n      const actual = set(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a).toBe(value);\n    });\n  });\n\n  it(`\\`set\\` should preserve the sign of \\`0\\``, () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = map(props, constant(value));\n\n    const actual = map(props, key => {\n      const object: Record<any, any> = { '-0': 'a', 0: 'b' };\n      set(object, key, updater);\n      return object[toString(key)];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`set\\` should unset symbol keyed property values`, () => {\n    const object: Record<any, any> = {};\n    // @ts-expect-error - symbol type\n    object[symbol] = 1;\n\n    expect(unset(object, symbol)).toBe(true);\n    expect(symbol in object).toBe(false);\n  });\n\n  it(`\\`set\\` should set deep property values`, () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: { b: oldValue } };\n      const actual = set(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a.b).toBe(value);\n    });\n  });\n\n  it(`\\`set\\` should set a key over a path`, () => {\n    each(['a.b', ['a.b']], path => {\n      const object = { 'a.b': oldValue };\n      const actual = set(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object).toEqual({ 'a.b': value });\n    });\n  });\n\n  it(`\\`set\\` should not coerce array paths to strings`, () => {\n    const object = { 'a,b,c': 1, a: { b: { c: 1 } } };\n\n    set(object, ['a', 'b', 'c'], updater);\n    expect(object.a.b.c).toBe(value);\n  });\n\n  it(`\\`set\\` should not ignore empty brackets`, () => {\n    const object = {};\n\n    set(object, 'a[]', updater);\n    expect(object).toEqual({ a: { '': value } });\n  });\n\n  it(`\\`set\\` should handle empty paths`, () => {\n    each(\n      [\n        ['', ''],\n        [[], ['']],\n      ],\n      (pair, index) => {\n        const object = {};\n\n        set(object, pair[0], updater);\n        expect(object).toEqual(index ? {} : { '': value });\n\n        set(object, pair[1], updater);\n        expect(object).toEqual({ '': value });\n      }\n    );\n  });\n\n  it(`\\`set\\` should handle complex paths`, () => {\n    const object: Record<any, any> = {\n      a: { 1.23: { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: oldValue } } } } } } },\n    };\n\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    each(paths, path => {\n      set(object, path, updater);\n      expect(object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g).toBe(value);\n      object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g = oldValue;\n    });\n  });\n\n  it(`\\`set\\` should create parts of \\`path\\` that are missing`, () => {\n    const object: Record<any, any> = {};\n\n    each(['a[1].b.c', ['a', '1', 'b', 'c']], path => {\n      const actual = set(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(actual).toEqual({ a: [undefined, { b: { c: 2 } }] });\n      expect('0' in object.a).toBe(false);\n\n      delete object.a;\n    });\n  });\n\n  it(`\\`set\\` should not error when \\`object\\` is nullish`, () => {\n    const values = [null, undefined];\n    const expected = [\n      [null, null],\n      [undefined, undefined],\n    ];\n\n    const actual = map(values, (value: any) => {\n      try {\n        return [set(value, 'a.b', updater), set(value, ['a', 'b'], updater)];\n      } catch (e: any) {\n        return e.message;\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`set\\` should overwrite primitives in the path`, () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: '' };\n\n      set(object, path, updater);\n      expect(object).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it(`\\`set\\` should not create an array for missing non-index property names that start with numbers`, () => {\n    const object = {};\n\n    set(object, ['1a', '2b', '3c'], updater);\n    expect(object).toEqual({ '1a': { '2b': { '3c': value } } });\n  });\n\n  it(`\\`set\\` should not assign values that are the same as their destinations`, () => {\n    each(['a', ['a'], { a: 1 }, NaN], value => {\n      const object = {};\n      let pass = true;\n      const updater = value;\n\n      Object.defineProperty(object, 'a', {\n        configurable: true,\n        enumerable: true,\n        get: constant(value),\n        set: function () {\n          pass = false;\n        },\n      });\n\n      set(object, 'a', updater);\n      expect(pass).toBe(true);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(set).toEqualTypeOf<typeof setLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/set.ts",
    "content": "import { updateWith } from './updateWith.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\n\n/**\n * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @param {T} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @returns {T} - The modified object.\n *\n * @example\n * // Set a value in a nested object\n * const obj = { a: { b: { c: 3 } } };\n * set(obj, 'a.b.c', 4);\n * console.log(obj.a.b.c); // 4\n *\n * @example\n * // Set a value in an array\n * const arr = [1, 2, 3];\n * set(arr, 1, 4);\n * console.log(arr[1]); // 4\n *\n * @example\n * // Create non-existent path and set value\n * const obj = {};\n * set(obj, 'a.b.c', 4);\n * console.log(obj); // { a: { b: { c: 4 } } }\n */\nexport function set<T extends object>(object: T, path: PropertyPath, value: any): T;\n\n/**\n * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.\n *\n * @template R - The return type.\n * @param {object} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @returns {R} - The modified object.\n *\n * @example\n * // Set a value in a nested object\n * const obj = { a: { b: { c: 3 } } };\n * set(obj, 'a.b.c', 4);\n * console.log(obj.a.b.c); // 4\n *\n * @example\n * // Set a value in an array\n * const arr = [1, 2, 3];\n * set(arr, 1, 4);\n * console.log(arr[1]); // 4\n *\n * @example\n * // Create non-existent path and set value\n * const obj = {};\n * set(obj, 'a.b.c', 4);\n * console.log(obj); // { a: { b: { c: 4 } } }\n */\nexport function set<R>(object: object, path: PropertyPath, value: any): R;\n\n/**\n * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @returns {T} - The modified object.\n *\n * @example\n * // Set a value in a nested object\n * const obj = { a: { b: { c: 3 } } };\n * set(obj, 'a.b.c', 4);\n * console.log(obj.a.b.c); // 4\n *\n * @example\n * // Set a value in an array\n * const arr = [1, 2, 3];\n * set(arr, 1, 4);\n * console.log(arr[1]); // 4\n *\n * @example\n * // Create non-existent path and set value\n * const obj = {};\n * set(obj, 'a.b.c', 4);\n * console.log(obj); // { a: { b: { c: 4 } } }\n */\nexport function set<T extends object>(obj: T, path: PropertyPath, value: any): T {\n  return updateWith(\n    obj,\n    path,\n    () => value,\n    () => undefined\n  );\n}\n"
  },
  {
    "path": "src/compat/object/setWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { setWith as setWithLodash } from 'lodash';\nimport { setWith } from './setWith.ts';\nimport { symbol } from '../_internal/symbol.ts';\nimport { constant, each, map, toString, unset, update } from '../compat.ts';\nimport { isObject } from '../predicate/isObject.ts';\n\ndescribe('setWith', () => {\n  it('should work with a `customizer` callback', () => {\n    const actual = setWith({ 0: {} }, '[0][1][2]', 3, value => (isObject(value) ? undefined : {}));\n\n    expect(actual).toEqual({ 0: { 1: { 2: 3 } } });\n  });\n\n  it('should work with a `customizer` that returns `undefined`', () => {\n    const actual = setWith({}, 'a[0].b.c', 4, () => undefined);\n    expect(actual).toEqual({ a: [{ b: { c: 4 } }] });\n  });\n\n  const oldValue = 1;\n  const value = 2;\n  const updater = constant(value);\n\n  it('should set property values', () => {\n    each(['a', ['a']], path => {\n      const object = { a: oldValue };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a).toBe(value);\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = map(props, constant(value));\n\n    const actual = map(props, key => {\n      const object = { '-0': 'a', 0: 'b' };\n      update(object, key, updater);\n      return object[toString(key) as keyof typeof object];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should unset symbol keyed property values', () => {\n    const object: Record<symbol, unknown> = {};\n    object[symbol] = 1;\n\n    expect(unset(object, symbol)).toBe(true);\n    expect(symbol in object).toBe(false);\n  });\n\n  it('should set deep property values', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: { b: oldValue } };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a.b).toBe(value);\n    });\n  });\n\n  it('should set a key over a path', () => {\n    each(['a.b', ['a.b']], path => {\n      const object = { 'a.b': oldValue };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object).toEqual({ 'a.b': value });\n    });\n  });\n\n  it('should not coerce array paths to strings', () => {\n    const object = { 'a,b,c': 1, a: { b: { c: 1 } } };\n\n    update(object, ['a', 'b', 'c'], updater);\n    expect(object.a.b.c).toBe(value);\n  });\n\n  it('should not ignore empty brackets', () => {\n    const object = {};\n\n    update(object, 'a[]', updater);\n    expect(object).toEqual({ a: { '': value } });\n  });\n\n  it('should handle empty paths', () => {\n    each(\n      [\n        ['', ''],\n        [[], ['']],\n      ],\n      (pair, index) => {\n        const object = {};\n\n        update(object, pair[0], updater);\n        expect(object).toEqual(index ? {} : { '': value });\n\n        update(object, pair[1], updater);\n        expect(object).toEqual({ '': value });\n      }\n    );\n  });\n\n  it('should handle complex paths', () => {\n    const object: any = {\n      a: { 1.23: { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: oldValue } } } } } } },\n    };\n\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    each(paths, path => {\n      update(object, path, updater);\n      expect(object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g).toBe(value);\n      object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g = oldValue;\n    });\n  });\n\n  it('should create parts of `path` that are missing', () => {\n    const object: any = {};\n\n    each(['a[1].b.c', ['a', '1', 'b', 'c']], path => {\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(actual).toEqual({ a: [undefined, { b: { c: value } }] });\n      expect('0' in object.a).toBe(false);\n\n      delete object.a;\n    });\n  });\n\n  it('should not error when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = [\n      [null, null],\n      [undefined, undefined],\n    ];\n\n    const actual = map(values, value => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return [update(value, 'a.b', updater), update(value, ['a', 'b'], updater)];\n      } catch (e: unknown) {\n        return e instanceof Error ? e.message : 'unknown error';\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should overwrite primitives in the path', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: '' };\n\n      update(object, path, updater);\n      expect(object).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it('should not create an array for missing non-index property names that start with numbers', () => {\n    const object = {};\n\n    update(object, ['1a', '2b', '3c'], updater);\n    expect(object).toEqual({ '1a': { '2b': { '3c': value } } });\n  });\n\n  it('should not assign values that are the same as their destinations', () => {\n    each(['a', ['a'], { a: 1 }, NaN], value => {\n      const object = {};\n      let pass = true;\n      const updater = constant(value);\n\n      Object.defineProperty(object, 'a', {\n        configurable: true,\n        enumerable: true,\n        get: constant(value),\n        set: function () {\n          pass = false;\n        },\n      });\n\n      update(object, 'a', updater);\n      expect(pass).toBe(true);\n    });\n  });\n\n  it('should invoke `updater` with the value on `path` of `object`', () => {\n    const object = { a: [{ b: { c: oldValue } }] };\n    const expected = oldValue + 1;\n\n    each(['a[0].b.c', ['a', '0', 'b', 'c']], path => {\n      update(object, path, (n: any) => {\n        expect(n).toBe(oldValue);\n        return ++n;\n      });\n\n      expect(object.a[0].b.c).toBe(expected);\n      object.a[0].b.c = oldValue;\n    });\n  });\n\n  it('should handle Object as customizer', () => {\n    const actual = setWith({}, '[0][1]', 'a', Object);\n    expect(actual).toEqual({ 0: { 1: 'a' } });\n  });\n\n  it('should return null when object is null', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(setWith(null, 'a.b.c', 1)).toBeNull();\n  });\n\n  it('should return undefined when object is undefined', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(setWith(undefined, 'a.b.c', 1)).toBeUndefined();\n  });\n\n  it('should work without a customizer', () => {\n    const actual = setWith({}, 'a.b.c', 2);\n    expect(actual).toEqual({ a: { b: { c: 2 } } });\n  });\n\n  it('should handle array paths', () => {\n    const actual = setWith({}, ['a', 'b', 'c'], 3);\n    expect(actual).toEqual({ a: { b: { c: 3 } } });\n  });\n\n  it('should handle number paths', () => {\n    const obj: unknown[] = [];\n    setWith(obj, 0, 'value');\n    expect(obj).toEqual(['value']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(setWith).toEqualTypeOf<typeof setWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/setWith.ts",
    "content": "import { updateWith } from './updateWith.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\n\n/**\n * Sets the value at the specified path of the given object using a customizer function.\n * If any part of the path does not exist, it will be created based on the customizer's result.\n *\n * The customizer is invoked to produce the objects of the path. If the customizer returns\n * a value, that value is used for the current path segment. If the customizer returns\n * `undefined`, the method will create an appropriate object based on the path - an array\n * if the next path segment is a valid array index, or an object otherwise.\n *\n * @template T - The type of the object.\n * @param {T} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @param {(nsValue: any, key: string, nsObject: T) => any} [customizer] - The function to customize assigned values.\n * @returns {T} - The modified object.\n *\n * @example\n * // Set a value with a customizer that creates arrays for numeric path segments\n * const object = {};\n * setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);\n * // => { '0': ['a'] }\n */\nexport function setWith<T extends object>(\n  object: T,\n  path: PropertyPath,\n  value: any,\n  customizer?: (nsValue: any, key: string, nsObject: T) => any\n): T;\n\n/**\n * Sets the value at the specified path of the given object using a customizer function.\n * If any part of the path does not exist, it will be created based on the customizer's result.\n *\n * The customizer is invoked to produce the objects of the path. If the customizer returns\n * a value, that value is used for the current path segment. If the customizer returns\n * `undefined`, the method will create an appropriate object based on the path - an array\n * if the next path segment is a valid array index, or an object otherwise.\n *\n * @template T - The type of the object.\n * @template R - The type of the return value.\n * @param {T} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @param {(nsValue: any, key: string, nsObject: T) => any} [customizer] - The function to customize assigned values.\n * @returns {R} - The modified object.\n *\n * @example\n * // Set a value with a customizer that creates arrays for numeric path segments\n * const object = {};\n * setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);\n * // => { '0': ['a'] }\n */\nexport function setWith<T extends object, R>(\n  object: T,\n  path: PropertyPath,\n  value: any,\n  customizer?: (nsValue: any, key: string, nsObject: T) => any\n): R;\n\n/**\n * Sets the value at the specified path of the given object using a customizer function.\n * If any part of the path does not exist, it will be created based on the customizer's result.\n *\n * The customizer is invoked to produce the objects of the path. If the customizer returns\n * a value, that value is used for the current path segment. If the customizer returns\n * `undefined`, the method will create an appropriate object based on the path - an array\n * if the next path segment is a valid array index, or an object otherwise.\n *\n * @template T - The type of the object.\n * @template R - The type of the return value.\n * @param {T} obj - The object to modify.\n * @param {PropertyPath} path - The path of the property to set.\n * @param {any} value - The value to set.\n * @param {(value: any, key: string, object: T) => any} [customizer] - The function to customize assigned values.\n * @returns {T | R} - The modified object.\n *\n * @example\n * // Set a value with a customizer that creates arrays for numeric path segments\n * const object = {};\n * setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);\n * // => { '0': ['a'] }\n */\nexport function setWith<T extends object, R>(\n  obj: T,\n  path: PropertyPath,\n  value: any,\n  customizer?: (value: any, key: string, object: T) => any\n): T | R {\n  let customizerFn: (value: any, key: string, object: T) => any;\n\n  if (typeof customizer === 'function') {\n    customizerFn = customizer;\n  } else {\n    customizerFn = () => undefined;\n  }\n\n  return updateWith(obj, path, () => value, customizerFn);\n}\n"
  },
  {
    "path": "src/compat/object/toDefaulted.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toDefaulted } from './toDefaulted';\nimport { objectProto } from '../_internal/objectProto';\nimport * as esToolkit from '../index';\n\ndescribe('toDefaulted', () => {\n  it('should assign source properties if missing on `object`', () => {\n    const actual = toDefaulted({ a: 1 }, { a: 2, b: 2 });\n    expect(actual).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should not mutate the target object', () => {\n    const target = { a: 1 };\n    const source = { b: 2 };\n    const actual = toDefaulted(target, source);\n\n    expect(actual).toEqual({ a: 1, b: 2 });\n    expect(target).toEqual({ a: 1 }); // Ensure target object is not mutated\n  });\n\n  it('should accept multiple sources', () => {\n    const expected = { a: 1, b: 2, c: 3 };\n    let actual = toDefaulted({ a: 1, b: 2 }, { b: 3 }, { c: 3 });\n\n    expect(actual).toEqual(expected);\n\n    actual = toDefaulted({ a: 1, b: 2 }, { b: 3, c: 3 }, { c: 2 });\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not overwrite `null` values', () => {\n    const actual = toDefaulted({ a: null }, { a: 1 });\n    expect((actual as any).a).toBe(null);\n  });\n\n  it('should overwrite `undefined` values', () => {\n    const actual = toDefaulted({ a: undefined }, { a: 1 });\n    expect((actual as any).a).toBe(1);\n  });\n\n  it('should assign `undefined` values', () => {\n    const source = { a: undefined, b: 1 };\n    const actual = toDefaulted({}, source);\n\n    expect(actual).toEqual({ a: undefined, b: 1 });\n  });\n\n  it('should assign properties that shadow those on `Object.prototype`', () => {\n    const object = {\n      constructor: objectProto.constructor,\n      hasOwnProperty: objectProto.hasOwnProperty,\n      isPrototypeOf: objectProto.isPrototypeOf,\n      propertyIsEnumerable: objectProto.propertyIsEnumerable,\n      toLocaleString: objectProto.toLocaleString,\n      toString: objectProto.toString,\n      valueOf: objectProto.valueOf,\n    };\n\n    const source = {\n      constructor: 1,\n      hasOwnProperty: 2,\n      isPrototypeOf: 3,\n      propertyIsEnumerable: 4,\n      toLocaleString: 5,\n      toString: 6,\n      valueOf: 7,\n    };\n\n    let expected = esToolkit.clone(source);\n    expect(toDefaulted({}, source)).toEqual(expected);\n\n    expected = esToolkit.clone(object);\n    expect(toDefaulted({}, object, source)).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/toDefaulted.ts",
    "content": "import { cloneDeep } from './cloneDeep.ts';\nimport { defaults } from './defaults.ts';\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @param {T} object - The target object.\n * @returns {T} The cloned object.\n */\nexport function toDefaulted<T extends object>(object: T): T;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S - The type of the object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S} source - The object that specifies the default values to apply.\n * @returns {NonNullable<T & S>} A new object that combines the target and default values, ensuring no properties are left undefined.\n */\nexport function toDefaulted<T extends object, S extends object>(object: T, source: S): NonNullable<T & S>;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @returns {NonNullable<T & S1 & S2>} A new object that combines the target and default values, ensuring no properties are left undefined.\n */\nexport function toDefaulted<T extends object, S1 extends object, S2 extends object>(\n  object: T,\n  source1: S1,\n  source2: S2\n): NonNullable<T & S1 & S2>;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @template S3 - The type of the third object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @param {S3} source3 - The third object that specifies the default values to apply.\n * @returns {NonNullable<T & S1 & S2 & S3>} A new object that combines the target and default values, ensuring no properties are left undefined.\n */\nexport function toDefaulted<T extends object, S1 extends object, S2 extends object, S3 extends object>(\n  object: T,\n  source1: S1,\n  source2: S2,\n  source3: S3\n): NonNullable<T & S1 & S2 & S3>;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S1 - The type of the first object that provides default values.\n * @template S2 - The type of the second object that provides default values.\n * @template S3 - The type of the third object that provides default values.\n * @template S4 - The type of the fourth object that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S1} source1 - The first object that specifies the default values to apply.\n * @param {S2} source2 - The second object that specifies the default values to apply.\n * @param {S3} source3 - The third object that specifies the default values to apply.\n * @param {S4} source4 - The fourth object that specifies the default values to apply.\n * @returns {NonNullable<T & S1 & S2 & S3 & S4>} A new object that combines the target and default values, ensuring no properties are left undefined.\n */\nexport function toDefaulted<\n  T extends object,\n  S1 extends object,\n  S2 extends object,\n  S3 extends object,\n  S4 extends object,\n>(object: T, source1: S1, source2: S2, source3: S3, source4: S4): NonNullable<T & S1 & S2 & S3 & S4>;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S - The type of the objects that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S[]} sources - The objects that specifies the default values to apply.\n * @returns {object} A new object that combines the target and default values, ensuring no properties are left undefined.\n *\n * @example\n * toDefaulted({ a: 1 }, { a: 2, b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * toDefaulted({ a: 1, b: 2 }, { b: 3 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * toDefaulted({ a: null }, { a: 1 }); // { a: null }\n * toDefaulted({ a: undefined }, { a: 1 }); // { a: 1 }\n */\nexport function toDefaulted<T extends object, S extends object>(object: T, ...sources: S[]): object;\n\n/**\n * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`.\n * It assigns default values to properties that are either `undefined` or come from `Object.prototype`.\n *\n * You can provide multiple source objects to set these default values,\n * and they will be applied in the order they are given, from left to right.\n * Once a property has been set, any later values for that property will be ignored.\n *\n * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead.\n *\n * @template T - The type of the object being processed.\n * @template S - The type of the objects that provides default values.\n * @param {T} object - The target object that will receive default values.\n * @param {S[]} sources - The objects that specifies the default values to apply.\n * @returns {object} A new object that combines the target and default values, ensuring no properties are left undefined.\n *\n * @example\n * toDefaulted({ a: 1 }, { a: 2, b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * toDefaulted({ a: 1, b: 2 }, { b: 3 }, { c: 3 }); // { a: 1, b: 2, c: 3 }\n * toDefaulted({ a: null }, { a: 1 }); // { a: null }\n * toDefaulted({ a: undefined }, { a: 1 }); // { a: 1 }\n */\nexport function toDefaulted<T extends object, S extends object>(object: T, ...sources: S[]): object {\n  const cloned = cloneDeep(object);\n\n  return defaults(cloned, ...sources);\n}\n"
  },
  {
    "path": "src/compat/object/toPairs.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { toPairs as toPairsLodash } from 'lodash';\nimport { toPairs } from './toPairs';\n\ndescribe('toPairs', () => {\n  it('should create an array of string keyed-value pairs', () => {\n    const object = { a: 1, b: 2 };\n    const actual = lodashStable.sortBy(toPairs(object), 0);\n\n    expect(actual).toEqual([\n      ['a', 1],\n      ['b', 2],\n    ]);\n  });\n\n  it('should not include inherited string keyed property values', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const expected = [['a', 1]];\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = lodashStable.sortBy(toPairs(new Foo()), 0);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert objects with a `length` property', () => {\n    const object = { '0': 'a', '1': 'b', length: 2 };\n    const actual = lodashStable.sortBy(toPairs(object), 0);\n\n    expect(actual).toEqual([\n      ['0', 'a'],\n      ['1', 'b'],\n      ['length', 2],\n    ]);\n  });\n\n  it('should convert maps', () => {\n    const map = new Map();\n    map.set('a', 1);\n    map.set('b', 2);\n    expect(toPairs(map)).toEqual([\n      ['a', 1],\n      ['b', 2],\n    ]);\n  });\n\n  it('should convert sets', () => {\n    const set = new Set();\n    set.add(1);\n    set.add(2);\n    expect(toPairs(set)).toEqual([\n      [1, 1],\n      [2, 2],\n    ]);\n  });\n\n  it('should convert strings', () => {\n    lodashStable.each(['xo', Object('xo')], string => {\n      const actual = lodashStable.sortBy(toPairs(string), 0);\n      expect(actual).toEqual([\n        ['0', 'x'],\n        ['1', 'o'],\n      ]);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toPairs).toEqualTypeOf<typeof toPairsLodash>();\n  });\n\n  it('should return empty array when object is undefined', () => {\n    expect(toPairs(undefined)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/toPairs.ts",
    "content": "import { keys as keysToolkit } from './keys.ts';\nimport { mapToEntries } from '../_internal/mapToEntries.ts';\nimport { setToEntries } from '../_internal/setToEntries.ts';\n\n/**\n * Creates an array of key-value pairs from an object.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T>} object - The object to query.\n * @returns {Array<[string, T]>} Returns the array of key-value pairs.\n *\n * @example\n * const object = { a: 1, b: 2 };\n * toPairs(object); // [['a', 1], ['b', 2]]\n */\nexport function toPairs<T>(object?: Record<string, T> | Record<number, T>): Array<[string, T]>;\n\n/**\n * Creates an array of key-value pairs from an object.\n *\n * @param {object} object - The object to query.\n * @returns {Array<[string, any]>} Returns the array of key-value pairs.\n *\n * @example\n * const object = { a: 1, b: 2 };\n * toPairs(object); // [['a', 1], ['b', 2]]\n */\nexport function toPairs(object?: object): Array<[string, any]>;\n\n/**\n * Creates an array of key-value pairs from an object, set, or map.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | object} object - The object, set, or map to query.\n * @returns {Array<[string, T]> | Array<[string, any]>} Returns the array of key-value pairs.\n *\n * @example\n * const object = { a: 1, b: 2 };\n * toPairs(object); // [['a', 1], ['b', 2]]\n *\n * const set = new Set([1, 2]);\n * toPairs(set); // [[1, 1], [2, 2]]\n *\n * const map = new Map();\n * map.set('a', 1);\n * map.set('b', 2);\n * toPairs(map); // [['a', 1], ['b', 2]]\n */\nexport function toPairs<T>(\n  object?: Record<string, T> | Record<number, T> | object\n): Array<[string, T]> | Array<[string, any]> {\n  if (object == null) {\n    return [];\n  }\n\n  if (object instanceof Set) {\n    return setToEntries(object);\n  }\n\n  if (object instanceof Map) {\n    return mapToEntries(object);\n  }\n\n  const keys = keysToolkit(object);\n  const result: Array<[key: string, value: any]> = new Array(keys.length);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = object[key as keyof typeof object];\n\n    result[i] = [key, value];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/toPairsIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { toPairsIn as toPairsInLodash } from 'lodash';\nimport { toPairsIn } from './toPairsIn';\n\ndescribe('toPairsIn', () => {\n  it('should create an array of string keyed-value pairs', () => {\n    const object = { a: 1, b: 2 };\n    const actual = lodashStable.sortBy(toPairsIn(object), 0);\n\n    expect(actual).toEqual([\n      ['a', 1],\n      ['b', 2],\n    ]);\n  });\n\n  it('should include inherited string keyed property values', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const expected = [\n      ['a', 1],\n      ['b', 2],\n    ];\n\n    const actual = lodashStable.sortBy(\n      toPairsIn(\n        // eslint-disable-next-line\n        // @ts-ignore\n        new Foo()\n      ),\n      0\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert objects with a `length` property', () => {\n    const object = { '0': 'a', '1': 'b', length: 2 };\n    const actual = lodashStable.sortBy(toPairsIn(object), 0);\n\n    expect(actual).toEqual([\n      ['0', 'a'],\n      ['1', 'b'],\n      ['length', 2],\n    ]);\n  });\n\n  it('should convert maps', () => {\n    const map = new Map();\n    map.set('a', 1);\n    map.set('b', 2);\n    expect(toPairsIn(map)).toEqual([\n      ['a', 1],\n      ['b', 2],\n    ]);\n  });\n\n  it('should convert sets', () => {\n    const set = new Set();\n    set.add(1);\n    set.add(2);\n    expect(toPairsIn(set)).toEqual([\n      [1, 1],\n      [2, 2],\n    ]);\n  });\n\n  it('should convert strings', () => {\n    lodashStable.each(['xo', Object('xo')], string => {\n      const actual = lodashStable.sortBy(toPairsIn(string), 0);\n      expect(actual).toEqual([\n        ['0', 'x'],\n        ['1', 'o'],\n      ]);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toPairsIn).toEqualTypeOf<typeof toPairsInLodash>();\n  });\n\n  it('should return empty array when object is undefined', () => {\n    expect(toPairsIn(undefined)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/toPairsIn.ts",
    "content": "import { keysIn as keysInToolkit } from './keysIn.ts';\nimport { mapToEntries } from '../_internal/mapToEntries.ts';\nimport { setToEntries } from '../_internal/setToEntries.ts';\n\n/**\n * Creates an array of key-value pairs from an object, including inherited properties.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T>} object - The object to query.\n * @returns {Array<[string, T]>} Returns the array of key-value pairs.\n *\n * @example\n * const object = { a: 1, b: 2 };\n * toPairsIn(object); // [['a', 1], ['b', 2]]\n */\nexport function toPairsIn<T>(object?: Record<string, T> | Record<number, T>): Array<[string, T]>;\n\n/**\n * Creates an array of key-value pairs from an object, including inherited properties.\n *\n * @param {object} object - The object to query.\n * @returns {Array<[string, any]>} Returns the array of key-value pairs.\n *\n * @example\n * const object = { a: 1, b: 2 };\n * toPairsIn(object); // [['a', 1], ['b', 2]]\n */\nexport function toPairsIn(object?: object): Array<[string, any]>;\n\n/**\n * Creates an array of key-value pairs from an object, set, or map, including inherited properties.\n *\n * @param {Record<string, T> | Record<number, T> | object} object The object, set, or map to query.\n * @returns {Array<[string, T]> | Array<[string, any]>} Returns the array of key-value pairs.\n * @example\n * const object = { a: 1, b: 2 };\n * toPairsIn(object); // [['a', 1], ['b', 2]]\n *\n * const set = new Set([1, 2]);\n * toPairsIn(set); // [[1, 1], [2, 2]]\n *\n * const map = new Map();\n * map.set('a', 1);\n * map.set('b', 2);\n * toPairsIn(map); // [['a', 1], ['b', 2]]\n */\nexport function toPairsIn<T>(\n  object?: Record<string, T> | Record<number, T> | object\n): Array<[string, T]> | Array<[string, any]> {\n  if (object == null) {\n    return [];\n  }\n\n  if (object instanceof Set) {\n    return setToEntries(object);\n  }\n\n  if (object instanceof Map) {\n    return mapToEntries(object);\n  }\n\n  const keys = keysInToolkit(object);\n  const result: Array<[key: string, value: any]> = new Array(keys.length);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = object[key as keyof typeof object];\n\n    result[i] = [key, value];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/object/transform.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { transform as transformLodash } from 'lodash';\nimport { transform } from './transform';\nimport { noop } from '../../function';\nimport { falsey } from '../_internal/falsey';\nimport { typedArrays } from '../_internal/typedArrays';\nimport { every } from '../array/every';\nimport { forEach } from '../array/forEach';\nimport { map } from '../array/map';\nimport { isArray } from '../predicate/isArray';\nimport { isPlainObject } from '../predicate/isPlainObject';\nimport { constant } from '../util/constant';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubObject } from '../util/stubObject';\nimport { stubTrue } from '../util/stubTrue';\nimport { toPlainObject } from '../util/toPlainObject';\n\nconst freeGlobal = typeof global === 'object' && global && global.Object === Object && global;\nconst freeSelf = typeof self === 'object' && self && self.Object === Object && self;\nconst root = freeGlobal || freeSelf || Function('return this')();\n\nfunction square(n: number): number {\n  return n * n;\n}\n\ndescribe('transform', () => {\n  function Foo(this: any) {\n    this.a = 1;\n    this.b = 2;\n    this.c = 3;\n  }\n\n  it('should create an object with the same `[[Prototype]]` as `object` when `accumulator` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const accumulators = [, null, undefined];\n    // @ts-expect-error - This is a test\n    let object = new Foo();\n    let expected: any = map(accumulators, stubTrue);\n\n    const iteratee = function (result: any, value: any, key: any) {\n      result[key] = square(value);\n    };\n\n    const mapper = function (accumulator: any, index: number) {\n      return index ? transform(object, iteratee, accumulator) : transform(object, iteratee);\n    };\n\n    const results = map(accumulators, mapper);\n\n    let actual: any = map(results, result => result instanceof Foo);\n\n    expect(actual).toEqual(expected);\n\n    expected = map(accumulators, constant({ a: 1, b: 4, c: 9 }));\n    actual = map(results, toPlainObject);\n\n    expect(actual).toEqual(expected);\n\n    object = { a: 1, b: 2, c: 3 };\n    actual = map(accumulators, mapper);\n\n    expect(actual).toEqual(expected);\n\n    object = [1, 2, 3];\n    expected = map(accumulators, constant([1, 4, 9]));\n    actual = map(accumulators, mapper);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should create regular arrays from typed arrays', () => {\n    const expected = map(typedArrays, stubTrue);\n\n    const actual = map(typedArrays, type => {\n      const Ctor = root[type];\n      const array = Ctor ? new Ctor(new ArrayBuffer(24)) : [];\n\n      return isArray(transform(array, noop));\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support an `accumulator` value', () => {\n    // @ts-expect-error - Just for testing\n    const values = [new Foo(), [1, 2, 3], { a: 1, b: 2, c: 3 }];\n    let expected: any = map(values, constant([1, 4, 9]));\n\n    let actual: any = map(values, value =>\n      transform(\n        value,\n        (result: any, value: any) => {\n          result.push(square(value));\n        },\n        []\n      )\n    );\n\n    expect(actual).toEqual(expected);\n\n    const object = { a: 1, b: 4, c: 9 };\n    expected = [object, { 0: 1, 1: 4, 2: 9 }, object];\n\n    actual = map(values, value =>\n      transform(\n        value,\n        (result: any, value: any, key: any) => {\n          result[key] = square(value);\n        },\n        {}\n      )\n    );\n\n    expect(actual).toEqual(expected);\n\n    forEach([[], {}], accumulator => {\n      const actual = map(values, value => transform(value, noop, accumulator));\n\n      expect(every(actual, result => result === accumulator)).toBe(true);\n\n      // @ts-expect-error - Just for testing\n      expect(transform(null, null, accumulator)).toBe(accumulator);\n    });\n  });\n\n  it('should treat sparse arrays as dense', () => {\n    const actual = transform(Array(1), (result: any, value: any, index: any) => {\n      result[index] = String(value);\n    });\n\n    expect(actual).toEqual(['undefined']);\n  });\n\n  it('should work without an `iteratee`', () => {\n    // @ts-expect-error - Just for testing\n    expect(transform(new Foo()) instanceof Foo).toBe(true);\n  });\n\n  it('should ensure `object` is an object before using its `[[Prototype]]`', () => {\n    const Ctors = [Boolean, Boolean, Number, Number, Number, String, String];\n    const values = [false, true, 0, 1, NaN, '', 'a'];\n    let expected: any = map(values, stubObject);\n\n    // @ts-expect-error - Just for testing\n    const results = map(values, value => transform(value));\n\n    expect(results).toEqual(expected);\n\n    expected = map(values, stubFalse);\n\n    const actual = map(results, (value, index) => value instanceof Ctors[index]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should ensure `object` constructor is a function before using its `[[Prototype]]`', () => {\n    Foo.prototype.constructor = null;\n    // @ts-expect-error - Just for testing\n    expect(transform(new Foo()) instanceof Foo).toBe(false);\n    Foo.prototype.constructor = Foo;\n  });\n\n  it('should create an empty object when given a falsey `object`', () => {\n    const expected = map(falsey, stubObject);\n\n    // @ts-expect-error - Just for testing\n    const actual = map(falsey, (object, index) => (index ? transform(object) : transform()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  forEach(\n    {\n      array: [1, 2, 3],\n      object: { a: 1, b: 2, c: 3 },\n    },\n    (object, key) => {\n      it(`should provide correct \\`iteratee\\` arguments when transforming an ${key}`, () => {\n        let args: any = null;\n        transform(object, function (..._args) {\n          if (args == null) {\n            args = _args;\n          }\n        });\n        const first = args[0];\n        if (key === 'array') {\n          expect(first !== object).toBe(true);\n          expect(isArray(first)).toBe(true);\n          expect(args).toEqual([first, 1, 0, object]);\n        } else {\n          expect(first !== object).toBe(true);\n          expect(isPlainObject(first)).toBe(true);\n          expect(args).toEqual([first, 1, 'a', object]);\n        }\n      });\n    }\n  );\n\n  it(`can exit early when iterating arrays`, () => {\n    const array = [1, 2, 3];\n    const values: any[] = [];\n\n    transform(array, (value, other) => {\n      values.push(isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values).toEqual([1]);\n  });\n\n  it(`can exit early when iterating objects`, () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const values: any[] = [];\n\n    transform(object, (value, other) => {\n      values.push(isArray(value) ? other : value);\n      return false;\n    });\n\n    expect(values.length).toBe(1);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(transform).toEqualTypeOf<typeof transformLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/transform.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { isFunction } from '../../predicate/isFunction.ts';\nimport { forEach } from '../array/forEach.ts';\nimport { isBuffer } from '../predicate/isBuffer.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\nimport { iteratee as createIteratee } from '../util/iteratee.ts';\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * @template T - The type of object.\n * @template R - The type of accumulator.\n * @param {readonly T[]} object - The array to iterate over.\n * @param {(acc: R, curr: T, index: number, arr: T[]) => void} iteratee - The function invoked per iteration.\n * @param {R} [accumulator] - The initial value.\n * @returns {R} Returns the accumulated value.\n *\n * @example\n * const array = [2, 3, 4];\n * transform(array, (acc, value) => { acc.push(value * 2); }, []);\n * // => [4, 6, 8]\n */\nexport function transform<T, R>(\n  object: readonly T[],\n  iteratee: (acc: R, curr: T, index: number, arr: T[]) => void,\n  accumulator?: R\n): R;\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * @template T - The type of object.\n * @template R - The type of accumulator.\n * @param {Record<string, T>} object - The object to iterate over.\n * @param {(acc: R, curr: T, key: string, dict: Record<string, T>) => void} iteratee - The function invoked per iteration.\n * @param {R} [accumulator] - The initial value.\n * @returns {R} Returns the accumulated value.\n *\n * @example\n * const obj = { 'a': 1, 'b': 2, 'c': 1 };\n * transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\nexport function transform<T, R>(\n  object: Record<string, T>,\n  iteratee: (acc: R, curr: T, key: string, dict: Record<string, T>) => void,\n  accumulator?: R\n): R;\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * @template T - The type of object.\n * @template R - The type of accumulator.\n * @param {T} object - The object to iterate over.\n * @param {(acc: R, curr: T[keyof T], key: keyof T, dict: Record<keyof T, T[keyof T]>) => void} iteratee - The function invoked per iteration.\n * @param {R} [accumulator] - The initial value.\n * @returns {R} Returns the accumulated value.\n *\n * @example\n * const obj = { x: 1, y: 2, z: 3 };\n * transform(obj, (acc, value, key) => { acc[key] = value * 2; }, {});\n * // => { x: 2, y: 4, z: 6 }\n */\nexport function transform<T extends object, R>(\n  object: T,\n  iteratee: (acc: R, curr: T[keyof T], key: keyof T, dict: Record<keyof T, T[keyof T]>) => void,\n  accumulator?: R\n): R;\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * @param {any[]} object - The array to iterate over.\n * @returns {any[]} Returns the accumulated value.\n *\n * @example\n * const array = [1, 2, 3];\n * transform(array);\n * // => [1, 2, 3]\n */\nexport function transform(object: any[]): any[];\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * @param {object} object - The object to iterate over.\n * @returns {Record<string, any>} Returns the accumulated value.\n *\n * @example\n * const obj = { a: 1, b: 2 };\n * transform(obj);\n * // => { a: 1, b: 2 }\n */\nexport function transform(object: object): Record<string, any>;\n\n/**\n * Traverses object values and creates a new object by accumulating them in the desired form.\n *\n * If no initial value is provided for `accumulator`, it creates a new array or object with the same prototype.\n *\nThe traversal is interrupted when the `iteratee` function returns `false`.\n *\n * @template T - The type of object.\n * @template U - The type of accumulator.\n * @param {readonly T[] | T} object - The object to iterate over.\n * @param {(accumulator: U, value: T | T[keyof T], key: any, object: T[] | T) => unknown} [iteratee] - The function invoked per iteration.\n * @param {U} [accumulator] - The initial value.\n * @returns {U} Returns the accumulated value.\n *\n * @example\n * // Transform an array\n * const array = [2, 3, 4];\n * transform(array, (acc, value) => { acc += value; return value % 2 === 0; }, 0) // => 5\n *\n * @example\n * // Transform an object\n * const obj = { 'a': 1, 'b': 2, 'c': 1 };\n * transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {}) // => { '1': ['a', 'c'], '2': ['b'] }\n */\nexport function transform<T, U>(\n  object?: readonly T[] | T,\n  iteratee: (accumulator: U, value: T | T[keyof T], key: any, object: readonly T[] | T) => unknown = identity,\n  accumulator?: U\n): U | any[] | Record<string, any> {\n  const isArrayOrBufferOrTypedArray = Array.isArray(object) || isBuffer(object) || isTypedArray(object);\n\n  iteratee = createIteratee(iteratee);\n\n  if (accumulator == null) {\n    if (isArrayOrBufferOrTypedArray) {\n      accumulator = [] as U;\n    } else if (isObject(object) && isFunction(object.constructor)) {\n      accumulator = Object.create(Object.getPrototypeOf(object));\n    } else {\n      accumulator = {} as U;\n    }\n  }\n\n  if (object == null) {\n    return accumulator as U;\n  }\n\n  forEach(object, (value, key, object) => iteratee(accumulator as U, value as T, key, object));\n\n  return accumulator as U;\n}\n"
  },
  {
    "path": "src/compat/object/unset.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unset as unsetLodash } from 'lodash';\nimport { unset } from './unset';\nimport { numberProto } from '../_internal/numberProto';\nimport { stringProto } from '../_internal/stringProto';\nimport { symbol } from '../_internal/symbol';\nimport { toString } from '../util/toString';\n\ndescribe('unset', () => {\n  it('should unset property values', () => {\n    ['a', ['a']].forEach(path => {\n      const object = { a: 1, c: 2 };\n      expect(unset(object, path)).toBe(true);\n      expect(object).toEqual({ c: 2 });\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = props.map(() => [true, false]);\n\n    const actual = props.map(key => {\n      const object = { '-0': 'a', 0: 'b' };\n      return [unset(object, key), toString(key) in object];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should unset symbol keyed property values', () => {\n    const object: any = {};\n    object[symbol] = 1;\n\n    expect(unset(object, symbol)).toBe(true);\n    expect(symbol in object).toBe(false);\n  });\n\n  it('should unset deep property values', () => {\n    ['a.b', ['a', 'b']].forEach(path => {\n      const object = { a: { b: null } };\n      expect(unset(object, path)).toBe(true);\n      expect(object).toEqual({ a: {} });\n    });\n  });\n\n  it('should handle complex paths', () => {\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    paths.forEach(path => {\n      const object = {\n        a: {\n          '-1.23': {\n            '[\"b\"]': {\n              c: { \"['d']\": { '\\ne\\n': { f: { g: 8 } } } },\n            },\n          },\n        },\n      };\n      expect(unset(object, path)).toBe(true);\n      expect('g' in object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f).toBe(false);\n    });\n  });\n\n  it('should return `true` for nonexistent paths', () => {\n    const object = { a: { b: { c: null } } };\n\n    ['z', 'a.z', 'a.b.z', 'a.b.c.z'].forEach(path => {\n      expect(unset(object, path)).toBe(true);\n    });\n\n    expect(object).toEqual({ a: { b: { c: null } } });\n  });\n\n  it('should not error when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = [\n      [true, true],\n      [true, true],\n    ];\n\n    const actual = values.map(value => {\n      try {\n        return [unset(value, 'a.b'), unset(value, ['a', 'b'])];\n      } catch (e: any) {\n        return e.message;\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should follow `path` over non-plain objects', () => {\n    const object = { a: '' };\n    const paths = ['constructor.prototype.a', ['constructor', 'prototype', 'a']];\n\n    paths.forEach(path => {\n      numberProto.a = 1;\n\n      const actual = unset(0, path);\n      expect(actual).toBe(true);\n      expect('a' in numberProto).toBe(false);\n\n      delete numberProto.a;\n    });\n\n    ['a.replace.b', ['a', 'replace', 'b']].forEach(path => {\n      stringProto.replace.b = 1;\n\n      const actual = unset(object, path);\n      expect(actual).toBe(true);\n      expect('a' in stringProto.replace).toBe(false);\n\n      delete stringProto.replace.b;\n    });\n  });\n\n  it('should return `false` for non-configurable properties', () => {\n    const object = { b: { c: {} } };\n    const symbol = Symbol('a');\n\n    Object.defineProperty(object, 'a', {\n      configurable: false,\n      enumerable: true,\n      writable: true,\n      value: 1,\n    });\n\n    Object.defineProperty(object, symbol, {\n      configurable: false,\n      enumerable: true,\n      writable: true,\n      value: 1,\n    });\n\n    Object.defineProperty(object.b.c, 'a', {\n      configurable: false,\n      enumerable: true,\n      writable: true,\n      value: 1,\n    });\n\n    expect(unset(object, 'a')).toBe(false);\n    expect(unset(object, symbol)).toBe(false);\n    expect(unset(object, 'b.c.a')).toBe(false);\n  });\n\n  it('should return `true` when the target property is undefined', () => {\n    const object = { a: { b: {} } };\n\n    expect(unset(object, 'a.b.c')).toBe(true);\n    expect(unset(object, 'c')).toBe(true);\n    expect(unset(object, 0)).toBe(true);\n    expect(unset(object, Symbol('a'))).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unset).toEqualTypeOf<typeof unsetLodash>();\n  });\n\n  it('should not delete root properties from nonexistent paths', () => {\n    const object = { b: null };\n\n    expect(unset(object, 'a.b')).toBe(true);\n    expect(object).toEqual({ b: null });\n  });\n\n  it('should prevent prototype pollution by rejecting __proto__ deletion', () => {\n    expect(unset({ ['__proto__']: {} }, '__proto__')).toBe(false);\n    expect(unset({ ['__proto__']: {} }, ['__proto__'])).toBe(false);\n  });\n\n  it('should not be polluted in compat/unset', () => {\n    unset({}, '__proto__.toString');\n    expect({}.toString).not.toBeUndefined();\n\n    const object = { a: 1 };\n    expect(unset(object, '__proto__')).toBe(false);\n    expect(unset(object, { toString: () => '__proto__' } as any)).toBe(false);\n    expect(unset(object, ['a', '__proto__'])).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/unset.ts",
    "content": "import { get } from './get.ts';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.ts';\nimport { isDeepKey } from '../_internal/isDeepKey.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Removes the property at the given path of the object.\n *\n * @param {unknown} obj - The object to modify.\n * @param {PropertyKey | readonly PropertyKey[]} path - The path of the property to unset.\n * @returns {boolean} - Returns true if the property is deleted, else false.\n *\n * @example\n * const obj = { a: { b: { c: 42 } } };\n * unset(obj, 'a.b.c'); // true\n * console.log(obj); // { a: { b: {} } }\n *\n * @example\n * const obj = { a: { b: { c: 42 } } };\n * unset(obj, ['a', 'b', 'c']); // true\n * console.log(obj); // { a: { b: {} } }\n */\nexport function unset(obj: any, path: PropertyKey | readonly PropertyKey[]): boolean {\n  if (obj == null) {\n    return true;\n  }\n\n  switch (typeof path) {\n    case 'symbol':\n    case 'number':\n    case 'object': {\n      if (Array.isArray(path)) {\n        return unsetWithPath(obj, path);\n      }\n\n      if (typeof path === 'number') {\n        path = toKey(path);\n      } else if (typeof path === 'object') {\n        if (Object.is(path?.valueOf(), -0)) {\n          path = '-0';\n        } else {\n          path = String(path);\n        }\n      }\n\n      if (isUnsafeProperty(path as PropertyKey)) {\n        return false;\n      }\n\n      if (obj?.[path as PropertyKey] === undefined) {\n        return true;\n      }\n\n      try {\n        delete obj[path as PropertyKey];\n        return true;\n      } catch {\n        return false;\n      }\n    }\n    case 'string': {\n      if (obj?.[path] === undefined && isDeepKey(path)) {\n        return unsetWithPath(obj, toPath(path));\n      }\n\n      if (isUnsafeProperty(path)) {\n        return false;\n      }\n\n      try {\n        delete obj[path];\n        return true;\n      } catch {\n        return false;\n      }\n    }\n  }\n}\n\nfunction unsetWithPath(obj: unknown, path: readonly PropertyKey[]): boolean {\n  const parent = path.length === 1 ? obj : get(obj, path.slice(0, -1));\n  const lastKey = path[path.length - 1];\n\n  if (parent?.[lastKey] === undefined) {\n    return true;\n  }\n\n  if (isUnsafeProperty(lastKey)) {\n    return false;\n  }\n\n  try {\n    delete parent[lastKey];\n    return true;\n  } catch {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/compat/object/update.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { each, map, toString, unset, update } from '..';\nimport type { update as updateLodash } from 'lodash';\nimport { symbol } from '../_internal/symbol';\nimport { constant } from '../util/constant';\n\ndescribe('update', () => {\n  const oldValue = 1;\n  const value = 2;\n  const updater = constant(value);\n\n  it('should set property values', () => {\n    each(['a', ['a']], path => {\n      const object = { a: oldValue };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a).toBe(value);\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = map(props, constant(value));\n\n    const actual = map(props, key => {\n      const object = { '-0': 'a', 0: 'b' };\n      update(object, key, updater);\n      return object[toString(key) as keyof typeof object];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should unset symbol keyed property values', () => {\n    const object: Record<symbol, unknown> = {};\n    object[symbol] = 1;\n\n    expect(unset(object, symbol)).toBe(true);\n    expect(symbol in object).toBe(false);\n  });\n\n  it('should set deep property values', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: { b: oldValue } };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object.a.b).toBe(value);\n    });\n  });\n\n  it('should set a key over a path', () => {\n    each(['a.b', ['a.b']], path => {\n      const object = { 'a.b': oldValue };\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(object).toEqual({ 'a.b': value });\n    });\n  });\n\n  it('should not coerce array paths to strings', () => {\n    const object = { 'a,b,c': 1, a: { b: { c: 1 } } };\n\n    update(object, ['a', 'b', 'c'], updater);\n    expect(object.a.b.c).toBe(value);\n  });\n\n  it('should not ignore empty brackets', () => {\n    const object = {};\n\n    update(object, 'a[]', updater);\n    expect(object).toEqual({ a: { '': value } });\n  });\n\n  it('should handle empty paths', () => {\n    each(\n      [\n        ['', ''],\n        [[], ['']],\n      ],\n      (pair, index) => {\n        const object = {};\n\n        update(object, pair[0], updater);\n        expect(object).toEqual(index ? {} : { '': value });\n\n        update(object, pair[1], updater);\n        expect(object).toEqual({ '': value });\n      }\n    );\n  });\n\n  it('should handle complex paths', () => {\n    const object: any = {\n      a: { 1.23: { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: oldValue } } } } } } },\n    };\n\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    each(paths, path => {\n      update(object, path, updater);\n      expect(object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g).toBe(value);\n      object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g = oldValue;\n    });\n  });\n\n  it('should create parts of `path` that are missing', () => {\n    const object: any = {};\n\n    each(['a[1].b.c', ['a', '1', 'b', 'c']], path => {\n      const actual = update(object, path, updater);\n\n      expect(actual).toBe(object);\n      expect(actual).toEqual({ a: [undefined, { b: { c: value } }] });\n      expect('0' in object.a).toBe(false);\n\n      delete object.a;\n    });\n  });\n\n  it('should not error when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = [\n      [null, null],\n      [undefined, undefined],\n    ];\n\n    const actual = map(values, value => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return [update(value, 'a.b', updater), update(value, ['a', 'b'], updater)];\n      } catch (e: unknown) {\n        return e instanceof Error ? e.message : 'unknown error';\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should overwrite primitives in the path', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: '' };\n\n      update(object, path, updater);\n      expect(object).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it('should not create an array for missing non-index property names that start with numbers', () => {\n    const object = {};\n\n    update(object, ['1a', '2b', '3c'], updater);\n    expect(object).toEqual({ '1a': { '2b': { '3c': value } } });\n  });\n\n  it('should not assign values that are the same as their destinations', () => {\n    each(['a', ['a'], { a: 1 }, NaN], value => {\n      const object = {};\n      let pass = true;\n      const updater = constant(value);\n\n      Object.defineProperty(object, 'a', {\n        configurable: true,\n        enumerable: true,\n        get: constant(value),\n        set: function () {\n          pass = false;\n        },\n      });\n\n      update(object, 'a', updater);\n      expect(pass).toBe(true);\n    });\n  });\n\n  it('should invoke `updater` with the value on `path` of `object`', () => {\n    const object = { a: [{ b: { c: oldValue } }] };\n    const expected = oldValue + 1;\n\n    each(['a[0].b.c', ['a', '0', 'b', 'c']], path => {\n      update(object, path, (n: any) => {\n        expect(n).toBe(oldValue);\n        return ++n;\n      });\n\n      expect(object.a[0].b.c).toBe(expected);\n      object.a[0].b.c = oldValue;\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(update).toEqualTypeOf<typeof updateLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/update.ts",
    "content": "import { updateWith } from './updateWith.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\n\n/**\n * Updates the value at the specified path of the given object using an updater function.\n * If any part of the path does not exist, it will be created.\n *\n * @param {object} obj - The object to modify.\n * @param {PropertyPath} path - The path of the property to update.\n * @param {(value: any) => any} updater - The function to produce the updated value.\n * @returns {any} - The modified object.\n */\nexport function update(obj: object, path: PropertyPath, updater: (value: any) => any): any {\n  return updateWith(obj, path, updater, () => undefined);\n}\n"
  },
  {
    "path": "src/compat/object/updateWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { each, isObject, map, noop, toString, unset, updateWith } from '..';\nimport type { updateWith as updateWithLodash } from 'lodash';\nimport { stubFour } from '../_internal/stubFour';\nimport { stubThree } from '../_internal/stubThree';\nimport { symbol } from '../_internal/symbol';\nimport { constant } from '../util/constant';\n\ndescribe('updateWith', () => {\n  const oldValue = 1;\n  const value = 2;\n  const updater = constant(value);\n\n  it('should set property values with customizer', () => {\n    each(['a', ['a']], path => {\n      const object = { a: oldValue };\n      const actual = updateWith(object, path, updater, noop);\n\n      expect(actual).toBe(object);\n      expect(object.a).toBe(value);\n    });\n  });\n\n  it('should prevent prototype pollution by skipping __proto__ in path', () => {\n    const object = { a: [{ ['__proto__']: { b: 3 } }] };\n    const result = updateWith(object, 'a[0][__proto__].b', n => n * n);\n    expect(result).toBe(object);\n    expect(object.a[0]['__proto__'].b).toBe(3);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n    const expected = map(props, constant(value));\n\n    const actual = map(props, key => {\n      const object = { '-0': 'a', 0: 'b' };\n      updateWith(object, key, updater, noop);\n      return object[toString(key) as keyof typeof object];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should unset symbol keyed property values', () => {\n    const object: Record<symbol, unknown> = {};\n    object[symbol] = 1;\n\n    expect(unset(object, symbol)).toBe(true);\n    expect(symbol in object).toBe(false);\n  });\n\n  it('should set deep property values with customizer', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: { b: oldValue } };\n      const actual = updateWith(object, path, updater, noop);\n\n      expect(actual).toBe(object);\n      expect(object.a.b).toBe(value);\n    });\n  });\n\n  it('should set a key over a path with customizer', () => {\n    each(['a.b', ['a.b']], path => {\n      const object = { 'a.b': oldValue };\n      const actual = updateWith(object, path, updater, noop);\n\n      expect(actual).toBe(object);\n      expect(object).toEqual({ 'a.b': value });\n    });\n  });\n\n  it('should not coerce array paths to strings', () => {\n    const object = { 'a,b,c': 1, a: { b: { c: 1 } } };\n\n    updateWith(object, ['a', 'b', 'c'], updater, noop);\n    expect(object.a.b.c).toBe(value);\n  });\n\n  it('should not ignore empty brackets', () => {\n    const object = {};\n\n    updateWith(object, 'a[]', updater, noop);\n    expect(object).toEqual({ a: { '': value } });\n  });\n\n  it('should handle empty paths', () => {\n    each(\n      [\n        ['', ''],\n        [[], ['']],\n      ],\n      (pair, index) => {\n        const object = {};\n\n        updateWith(object, pair[0], updater, noop);\n        expect(object).toEqual(index ? {} : { '': value });\n\n        updateWith(object, pair[1], updater, noop);\n        expect(object).toEqual({ '': value });\n      }\n    );\n  });\n\n  it('should handle complex paths', () => {\n    const object: any = {\n      a: { 1.23: { '[\"b\"]': { c: { \"['d']\": { '\\ne\\n': { f: { g: oldValue } } } } } } },\n    };\n\n    const paths = [\n      'a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g',\n      ['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g'],\n    ];\n\n    each(paths, path => {\n      updateWith(object, path, updater, noop);\n      expect(object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g).toBe(value);\n      object.a[-1.23]['[\"b\"]'].c[\"['d']\"]['\\ne\\n'].f.g = oldValue;\n    });\n  });\n\n  it('should create parts of `path` that are missing', () => {\n    const object: any = {};\n\n    each(['a[1].b.c', ['a', '1', 'b', 'c']], path => {\n      const actual = updateWith(object, path, updater, noop);\n\n      expect(actual).toBe(object);\n      expect(actual).toEqual({ a: [undefined, { b: { c: value } }] });\n      expect('0' in object.a).toBe(false);\n\n      delete object.a;\n    });\n  });\n\n  it('should not error when `object` is nullish', () => {\n    const values = [null, undefined];\n    const expected = [\n      [null, null],\n      [undefined, undefined],\n    ];\n\n    const actual = map(values, value => {\n      try {\n        return [updateWith(value, 'a.b', updater, noop), updateWith(value, ['a', 'b'], updater, noop)];\n      } catch (e: unknown) {\n        return e instanceof Error ? e.message : 'unknown error';\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should overwrite primitives in the path', () => {\n    each(['a.b', ['a', 'b']], path => {\n      const object = { a: '' };\n\n      updateWith(object, path, updater, noop);\n      expect(object).toEqual({ a: { b: 2 } });\n    });\n  });\n\n  it('should not create an array for missing non-index property names that start with numbers', () => {\n    const object = {};\n\n    updateWith(object, ['1a', '2b', '3c'], updater, noop);\n    expect(object).toEqual({ '1a': { '2b': { '3c': value } } });\n  });\n\n  it('should not assign values that are the same as their destinations', () => {\n    each(['a', ['a'], { a: 1 }, NaN], value => {\n      const object = {};\n      let pass = true;\n      const updater = constant(value);\n\n      Object.defineProperty(object, 'a', {\n        configurable: true,\n        enumerable: true,\n        get: constant(value),\n        set: function () {\n          pass = false;\n        },\n      });\n\n      updateWith(object, 'a', updater, noop);\n      expect(pass).toBe(true);\n    });\n  });\n\n  it('should invoke `updater` with the value on `path` of `object`', () => {\n    const object = { a: [{ b: { c: oldValue } }] };\n    const expected = oldValue + 1;\n\n    each(['a[0].b.c', ['a', '0', 'b', 'c']], path => {\n      updateWith(\n        object,\n        path,\n        (n: any) => {\n          expect(n).toBe(oldValue);\n          return ++n;\n        },\n        noop\n      );\n\n      expect(object.a[0].b.c).toBe(expected);\n      object.a[0].b.c = oldValue;\n    });\n  });\n\n  it('should work with a `customizer` callback', () => {\n    const actual = updateWith({ 0: {} }, '[0][1][2]', stubThree, value => (isObject(value) ? undefined : {}));\n\n    expect(actual).toEqual({ 0: { 1: { 2: 3 } } });\n  });\n\n  it('should work with a `customizer` that returns `undefined`', () => {\n    const actual = updateWith({}, 'a[0].b.c', stubFour, noop);\n    expect(actual).toEqual({ a: [{ b: { c: 4 } }] });\n  });\n\n  it('should handle different path types correctly', () => {\n    const object: any = { a: { b: oldValue } };\n\n    updateWith(object, 'a.b', updater, noop);\n    expect(object.a.b).toBe(value);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(updateWith).toEqualTypeOf<typeof updateWithLodash>();\n  });\n\n  it('should correctly update the last level path when original object is modified by customizer', () => {\n    const object: any = { a: { b: 1 } };\n    updateWith(\n      object,\n      'a.b',\n      n => n * 2,\n      () => {\n        return {};\n      }\n    );\n    expect(object).toEqual({ a: { b: 2 } });\n  });\n});\n"
  },
  {
    "path": "src/compat/object/updateWith.ts",
    "content": "import { get } from './get.ts';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.ts';\nimport { assignValue } from '../_internal/assignValue.ts';\nimport { isIndex } from '../_internal/isIndex.ts';\nimport { isKey } from '../_internal/isKey.ts';\nimport { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { toPath } from '../util/toPath.ts';\n\n/**\n * Updates the value at the specified path of the given object using an updater function and a customizer.\n * If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @param {T} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to update.\n * @param {(oldValue: any) => any} updater - The function to produce the updated value.\n * @param {(value: any, key: string, object: T) => any} customizer - The function to customize the update process.\n * @returns {T} - The modified object.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * updateWith(object, 'a[0].b.c', (n) => n * n);\n * // => { 'a': [{ 'b': { 'c': 9 } }] }\n */\nexport function updateWith<T extends object>(\n  object: T,\n  path: PropertyPath,\n  updater: (oldValue: any) => any,\n  customizer?: (value: any, key: string, object: T) => any\n): T;\n\n/**\n * Updates the value at the specified path of the given object using an updater function and a customizer.\n * If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @template R - The type of the return value.\n * @param {T} object - The object to modify.\n * @param {PropertyPath} path - The path of the property to update.\n * @param {(oldValue: any) => any} updater - The function to produce the updated value.\n * @param {(value: any, key: string, object: T) => any} customizer - The function to customize the update process.\n * @returns {R} - The modified object.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * updateWith(object, 'a[0].b.c', (n) => n * n);\n * // => { 'a': [{ 'b': { 'c': 9 } }] }\n */\nexport function updateWith<T extends object, R>(\n  object: T,\n  path: PropertyPath,\n  updater: (oldValue: any) => any,\n  customizer?: (value: any, key: string, object: T) => any\n): R;\n\n/**\n * Updates the value at the specified path of the given object using an updater function and a customizer.\n * If any part of the path does not exist, it will be created.\n *\n * @template T - The type of the object.\n * @template R - The type of the return value.\n * @param {T} obj - The object to modify.\n * @param {PropertyPath} path - The path of the property to update.\n * @param {(value: any) => any} updater - The function to produce the updated value.\n * @param {(value: any, key: string, object: T) => any} customizer - The function to customize the update process.\n * @returns {T | R} - The modified object.\n *\n * @example\n * const object = { 'a': [{ 'b': { 'c': 3 } }] };\n * updateWith(object, 'a[0].b.c', (n) => n * n);\n * // => { 'a': [{ 'b': { 'c': 9 } }] }\n */\nexport function updateWith<T extends object, R>(\n  obj: T,\n  path: PropertyPath,\n  updater: (value: any) => any,\n  customizer?: (value: any, key: string, object: T) => any\n): T | R {\n  if (obj == null && !isObject(obj)) {\n    return obj;\n  }\n\n  let resolvedPath: PropertyKey[];\n  if (isKey(path, obj)) {\n    resolvedPath = [path];\n  } else if (Array.isArray(path)) {\n    resolvedPath = path;\n  } else {\n    resolvedPath = toPath(path);\n  }\n\n  const updateValue = updater(get(obj, resolvedPath));\n\n  let current: any = obj;\n\n  for (let i = 0; i < resolvedPath.length && current != null; i++) {\n    const key = toKey(resolvedPath[i]);\n\n    if (isUnsafeProperty(key)) {\n      continue;\n    }\n\n    let newValue: unknown;\n\n    if (i === resolvedPath.length - 1) {\n      newValue = updateValue;\n    } else {\n      const objValue = current[key];\n      const customizerResult = customizer?.(objValue, key as string, obj);\n      newValue =\n        customizerResult !== undefined\n          ? customizerResult\n          : isObject(objValue)\n            ? objValue\n            : isIndex(resolvedPath[i + 1])\n              ? []\n              : {};\n    }\n\n    assignValue(current, key, newValue);\n    current = current[key];\n  }\n\n  return obj;\n}\n"
  },
  {
    "path": "src/compat/object/values.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { values as valuesLodash } from 'lodash';\nimport { values } from './values';\nimport { args } from '../_internal/args';\nimport { strictArgs } from '../_internal/strictArgs';\n\ndescribe('values', () => {\n  it(`should get string keyed values of \\`object\\``, () => {\n    const object = { a: 1, b: 2 };\n    const actual = values(object).sort();\n\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it(`should work with an object that has a \\`length\\` property`, () => {\n    const object = { 0: 'a', 1: 'b', length: 2 };\n    const actual = values(object).sort();\n\n    expect(actual).toEqual([2, 'a', 'b']);\n  });\n\n  it(`should not include inherited string keyed property values`, () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const expected = [1];\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = values(new Foo()).sort();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    const vals = [args, strictArgs];\n    const expected = lodashStable.map(vals, lodashStable.constant([1, 2, 3]));\n\n    const actual = lodashStable.map(vals, value => values(value).sort());\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(values).toEqualTypeOf<typeof valuesLodash>();\n  });\n\n  it('should return an empty array for null or undefined', () => {\n    expect(values(null)).toEqual([]);\n    expect(values(undefined)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/compat/object/values.ts",
    "content": "/**\n * Creates an array of the own enumerable property values of `object`.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | ArrayLike<T> | null | undefined} object - The object to query.\n * @returns {T[]} Returns an array of property values.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * values(obj); // => [1, 2, 3]\n */\nexport function values<T>(object: Record<string, T> | Record<number, T> | ArrayLike<T> | null | undefined): T[];\n\n/**\n * Creates an array of the own enumerable property values of `object`.\n *\n * @template T\n * @param {T | null | undefined} object - The object to query.\n * @returns {Array<T[keyof T]>} Returns an array of property values.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * values(obj); // => [1, 2, 3]\n */\nexport function values<T extends object>(object: T | null | undefined): Array<T[keyof T]>;\n\n/**\n * Creates an array of the own enumerable property values of `object`.\n *\n * @param {any} object - The object to query.\n * @returns {any[]} Returns an array of property values.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * values(obj); // => [1, 2, 3]\n */\nexport function values(object: any): any[];\n\n/**\n * Creates an array of the own enumerable property values of `object`.\n *\n * @param {any} object The object to query.\n * @returns {any[]} Returns an array of property values.\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * values(obj); // => [1, 2, 3]\n */\nexport function values(object: any): any[] {\n  if (object == null) {\n    return [];\n  }\n\n  return Object.values(object);\n}\n"
  },
  {
    "path": "src/compat/object/valuesIn.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { valuesIn as valuesInLodash } from 'lodash';\nimport { valuesIn } from './valuesIn';\nimport { args } from '../_internal/args';\nimport { strictArgs } from '../_internal/strictArgs';\n\ndescribe('valuesIn', () => {\n  it(`should get string keyed values of \\`object\\``, () => {\n    const object = { a: 1, b: 2 };\n    const actual = valuesIn(object).sort();\n\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it(`should work with an object that has a \\`length\\` property`, () => {\n    const object = { 0: 'a', 1: 'b', length: 2 };\n    const actual = valuesIn(object).sort();\n\n    expect(actual).toEqual([2, 'a', 'b']);\n  });\n\n  it(`should include inherited string keyed property values`, () => {\n    function Foo(this: any) {\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const expected = [1, 2];\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = valuesIn(new Foo()).sort();\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should work with \\`arguments\\` objects`, () => {\n    const values = [args, strictArgs];\n    const expected = lodashStable.map(values, lodashStable.constant([1, 2, 3]));\n\n    const actual = lodashStable.map(values, value => valuesIn(value).sort());\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(valuesIn).toEqualTypeOf<typeof valuesInLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/object/valuesIn.ts",
    "content": "import { keysIn } from './keysIn.ts';\n\n/**\n * Retrieves the values from an object, including those inherited from its prototype.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | ArrayLike<T> | null | undefined} object - The object to query.\n * @returns {T[]} Returns an array of property values.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * valuesIn(obj); // => [1, 2, 3]\n */\nexport function valuesIn<T>(object: Record<string, T> | Record<number, T> | ArrayLike<T> | null | undefined): T[];\n\n/**\n * Retrieves the values from an object, including those inherited from its prototype.\n *\n * @template T\n * @param {T | null | undefined} object - The object to query.\n * @returns {Array<T[keyof T]>} Returns an array of property values.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * valuesIn(obj); // => [1, 2, 3]\n */\nexport function valuesIn<T extends object>(object: T | null | undefined): Array<T[keyof T]>;\n\n/**\n * Retrieves the values from an object, including those inherited from its prototype.\n *\n * - If the value is not an object, it is converted to an object.\n * - Array-like objects are treated like arrays.\n * - Sparse arrays with some missing indices are treated like dense arrays.\n * - If the value is `null` or `undefined`, an empty array is returned.\n * - When handling prototype objects, the `constructor` property is excluded from the results.\n *\n * @param {any} object The object to query.\n * @returns {any[]} Returns an array of property values.\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * valuesIn(obj); // => [1, 2, 3]\n */\nexport function valuesIn(object: any): any[] {\n  const keys = keysIn(object);\n  const result: any[] = new Array(keys.length);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    result[i] = object[key];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/predicate/conforms.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { conforms as conformsLodash } from 'lodash';\nimport { conforms } from './conforms';\n\ndescribe('conforms', () => {\n  it(`\\`conforms\\` should check if \\`object\\` conforms to \\`source\\``, () => {\n    const objects = [\n      { a: 1, b: 8 },\n      { a: 2, b: 4 },\n      { a: 3, b: 16 },\n    ];\n\n    let par: any = conforms({\n      b: (value: number) => value > 4,\n    });\n\n    let actual = objects.filter(par);\n    expect(actual).toEqual([objects[0], objects[2]]);\n\n    par = conforms({\n      b: (value: number) => value > 8,\n      a: (value: number) => value > 1,\n    });\n\n    actual = objects.filter(par);\n    expect(actual).toEqual([objects[2]]);\n  });\n\n  it(`\\`conforms\\` should not match by inherited \\`source\\` properties`, () => {\n    class Foo {\n      [key: PropertyKey]: (value: number) => boolean;\n      constructor() {\n        this.a = function (value: number) {\n          return value > 1;\n        };\n      }\n      b(value: number) {\n        return value > 8;\n      }\n    }\n\n    const objects = [\n      { a: 1, b: 8 },\n      { a: 2, b: 4 },\n      { a: 3, b: 16 },\n    ];\n\n    const par = conforms(new Foo());\n    const actual = objects.filter(par);\n\n    expect(actual).toEqual([objects[1], objects[2]]);\n  });\n\n  it(`\\`conforms\\` should not invoke \\`source\\` predicates for missing \\`object\\` properties`, () => {\n    let count = 0;\n\n    const par = conforms({\n      a: function () {\n        count++;\n        return true;\n      },\n    });\n\n    // @ts-expect-error - invalid argument\n    expect(par({})).toBe(false);\n    expect(count).toBe(0);\n  });\n\n  it(`\\`conforms\\` should work with a function for \\`object\\``, () => {\n    function Foo() {}\n    Foo.a = 1;\n\n    function Bar() {}\n    Bar.a = 2;\n\n    const par = conforms({\n      a: (value: number) => value > 1,\n    });\n\n    expect(par(Foo)).toBe(false);\n    expect(par(Bar)).toBe(true);\n  });\n\n  it(`\\`conforms\\` should work with a function for \\`source\\``, () => {\n    function Foo() {}\n    Foo.a = (value: number) => value > 1;\n\n    const objects = [{ a: 1 }, { a: 2 }];\n\n    const actual = objects.filter(conforms(Foo));\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it(`\\`conforms\\` should work with a non-plain \\`object\\``, () => {\n    class Foo {\n      a: number;\n      constructor() {\n        this.a = 1;\n      }\n    }\n    // @ts-expect-error - incorrect property\n    Foo.prototype.b = 2;\n\n    const par = conforms({\n      b: (value: number) => value > 1,\n    });\n\n    // @ts-expect-error - unusual argument\n    expect(par(new Foo())).toBe(true);\n  });\n\n  it(`\\`conforms\\` should return \\`false\\` when \\`object\\` is nullish`, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(() => false);\n\n    const par = conforms({\n      a: (value: number) => value > 1,\n    });\n\n    const actual = values.map((value, index) => {\n      // @ts-expect-error - invalid argument\n      return index ? par(value) : par();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`conforms\\` should return \\`true\\` when comparing an empty \\`source\\` to a nullish \\`object\\``, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(() => true);\n    const par = conforms({});\n\n    const actual = values.map((value, index) => {\n      // @ts-expect-error - invalid argument\n      return index ? par(value) : par();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`conforms\\` should return \\`true\\` when comparing an empty \\`source\\``, () => {\n    const empties = [[], {}, null, undefined, false, 0, NaN, ''];\n    const object = { a: 1 };\n    const expected = empties.map(() => true);\n\n    const actual = empties.map(value => {\n      // @ts-expect-error - invalid argument\n      const par = conforms(value);\n      return par(object);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not change behavior if `source` is modified', () => {\n    const object = { a: 2 };\n    const source = {\n      a: (value: number) => value > 1,\n    };\n    const par = conforms(source);\n\n    expect(par(object)).toBe(true);\n\n    source.a = (value: number) => value < 2;\n    expect(par(object)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(conforms<unknown>).toEqualTypeOf<typeof conformsLodash<unknown>>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/conforms.ts",
    "content": "import { conformsTo } from './conformsTo.ts';\nimport { cloneDeep } from '../../object/cloneDeep.ts';\nimport { ConformsPredicateObject } from '../_internal/ConformsPredicateObject.ts';\n\n/**\n * Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if all predicates return truthy, else `false`.\n *\n * Note: The created function is equivalent to `conformsTo` with source partially applied.\n *\n * @param {Record<PropertyKey, (value: any) => boolean>} source The object of property predicates to conform to.\n * @returns {(object: Record<PropertyKey, any>) => boolean} Returns the new spec function.\n *\n * @example\n * const isPositive = (n) => n > 0;\n * const isEven = (n) => n % 2 === 0;\n * const predicates = { a: isPositive, b: isEven };\n * const conform = conforms(predicates);\n *\n * console.log(conform({ a: 2, b: 4 })); // true\n * console.log(conform({ a: -1, b: 4 })); // false\n * console.log(conform({ a: 2, b: 3 })); // false\n * console.log(conform({ a: 0, b: 2 })); // false\n */\nexport function conforms<T>(source: ConformsPredicateObject<T>): (value: T) => boolean {\n  source = cloneDeep(source);\n\n  return function (object: T) {\n    return conformsTo(object, source);\n  };\n}\n"
  },
  {
    "path": "src/compat/predicate/conformsTo.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { conformsTo as conformsToLodash } from 'lodash';\nimport { conformsTo } from './conformsTo';\n\ndescribe('conformsTo', () => {\n  function conforms(source: Record<PropertyKey, (value: any) => boolean>) {\n    return function (object: Record<PropertyKey, any>) {\n      return conformsTo(object, source);\n    };\n  }\n\n  it(`\\`conformsTo\\` should check if \\`object\\` conforms to \\`source\\``, () => {\n    const objects = [\n      { a: 1, b: 8 },\n      { a: 2, b: 4 },\n      { a: 3, b: 16 },\n    ];\n\n    let par = conforms({\n      b: (value: number) => value > 4,\n    });\n\n    let actual = objects.filter(par);\n    expect(actual).toEqual([objects[0], objects[2]]);\n\n    par = conforms({\n      b: (value: number) => value > 8,\n      a: (value: number) => value > 1,\n    });\n\n    actual = objects.filter(par);\n    expect(actual).toEqual([objects[2]]);\n  });\n\n  it(`\\`conformsTo\\` should not match by inherited \\`source\\` properties`, () => {\n    class Foo {\n      [key: PropertyKey]: (value: number) => boolean;\n      constructor() {\n        this.a = function (value: number) {\n          return value > 1;\n        };\n      }\n      b(value: number) {\n        return value > 8;\n      }\n    }\n\n    const objects = [\n      { a: 1, b: 8 },\n      { a: 2, b: 4 },\n      { a: 3, b: 16 },\n    ];\n\n    const par = conforms(new Foo());\n    const actual = objects.filter(par);\n\n    expect(actual).toEqual([objects[1], objects[2]]);\n  });\n\n  it(`\\`conformsTo\\` should not invoke \\`source\\` predicates for missing \\`object\\` properties`, () => {\n    let count = 0;\n\n    const par = conforms({\n      a: function () {\n        count++;\n        return true;\n      },\n    });\n\n    expect(par({})).toBe(false);\n    expect(count).toBe(0);\n  });\n\n  it(`\\`conformsTo\\` should work with a function for \\`object\\``, () => {\n    function Foo() {}\n    Foo.a = 1;\n\n    function Bar() {}\n    Bar.a = 2;\n\n    const par = conforms({\n      a: (value: number) => value > 1,\n    });\n\n    expect(par(Foo)).toBe(false);\n    expect(par(Bar)).toBe(true);\n  });\n\n  it(`\\`conformsTo\\` should work with a function for \\`source\\``, () => {\n    function Foo() {}\n    Foo.a = (value: number) => value > 1;\n\n    const objects = [{ a: 1 }, { a: 2 }];\n    // @ts-expect-error - unusual argument\n    const actual = objects.filter(conforms(Foo));\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it(`\\`conformsTo\\` should work with a non-plain \\`object\\``, () => {\n    class Foo {\n      a: number;\n      constructor() {\n        this.a = 1;\n      }\n    }\n    // @ts-expect-error - incorrect property\n    Foo.prototype.b = 2;\n\n    const par = conforms({\n      b: (value: number) => value > 1,\n    });\n\n    expect(par(new Foo())).toBe(true);\n  });\n\n  it(`\\`conformsTo\\` should return \\`false\\` when \\`object\\` is nullish`, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(() => false);\n\n    const par = conforms({\n      a: (value: number) => value > 1,\n    });\n\n    const actual = values.map((value, index) => {\n      // @ts-expect-error - invalid argument\n      return index ? par(value) : par();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`conformsTo\\` should return \\`true\\` when comparing an empty \\`source\\` to a nullish \\`object\\``, () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(() => true);\n    const par = conforms({});\n\n    const actual = values.map((value, index) => {\n      // @ts-expect-error - invalid argument\n      return index ? par(value) : par();\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`\\`conformsTo\\` should return \\`true\\` when comparing an empty \\`source\\``, () => {\n    const empties = [[], {}, null, undefined, false, 0, NaN, ''];\n    const object = { a: 1 };\n    const expected = empties.map(() => true);\n\n    const actual = empties.map(value => {\n      // @ts-expect-error - invalid argument\n      const par = conforms(value);\n      return par(object);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(conformsTo<unknown>).toEqualTypeOf<typeof conformsToLodash<unknown>>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/conformsTo.ts",
    "content": "import { ConformsPredicateObject } from '../_internal/ConformsPredicateObject.ts';\n\n/**\n * Checks if `object` conforms to `source` by invoking the predicate properties of `source` with the corresponding property values of `object`.\n *\n * Note: This method is equivalent to `conforms` when source is partially applied.\n *\n * @template T - The type of the target object.\n * @param {T} target The object to inspect.\n * @param {ConformsPredicateObject<T>} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n *\n * @example\n *\n * const object = { 'a': 1, 'b': 2 };\n * const source = {\n *   'a': (n) => n > 0,\n *   'b': (n) => n > 1\n * };\n *\n * console.log(conformsTo(object, source)); // => true\n *\n * const source2 = {\n *   'a': (n) => n > 1,\n *   'b': (n) => n > 1\n * };\n *\n * console.log(conformsTo(object, source2)); // => false\n */\nexport function conformsTo<T>(target: T, source: ConformsPredicateObject<T>): boolean {\n  if (source == null) {\n    return true;\n  }\n\n  if (target == null) {\n    return Object.keys(source).length === 0;\n  }\n\n  const keys = Object.keys(source) as Array<keyof T>;\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const predicate = source[key];\n    const value = target[key];\n\n    if (value === undefined && !(key in (target as any))) {\n      return false;\n    }\n\n    if (typeof predicate === 'function' && !predicate(value)) {\n      return false;\n    }\n  }\n  return true;\n}\n"
  },
  {
    "path": "src/compat/predicate/isArguments.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isArguments as isArgumentsLodash } from 'lodash';\nimport { isArguments } from './isArguments';\nimport { noop } from '../../function';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { strictArgs } from '../_internal/strictArgs';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isArguments', () => {\n  it('should return `true` for `arguments` objects', () => {\n    expect(isArguments(args)).toBe(true);\n    expect(isArguments(strictArgs)).toBe(true);\n  });\n\n  it('should return `false` for non `arguments` objects', () => {\n    const expected = falsey.map(stubFalse);\n\n    const actual = falsey.map((value, index) => (index ? isArguments(value) : isArguments()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isArguments([1, 2, 3])).toBe(false);\n    expect(isArguments(true)).toBe(false);\n    expect(isArguments(new Date())).toBe(false);\n    expect(isArguments(new Error())).toBe(false);\n    expect(isArguments(slice)).toBe(false);\n    expect(isArguments({ 0: 1, callee: noop, length: 1 })).toBe(false);\n    expect(isArguments(1)).toBe(false);\n    expect(isArguments(/x/)).toBe(false);\n    expect(isArguments('a')).toBe(false);\n    expect(isArguments(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isArguments).toEqualTypeOf<typeof isArgumentsLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isArguments.ts",
    "content": "import { getTag } from '../_internal/getTag.ts';\n\n/**\n * Checks if the given value is an arguments object.\n *\n * This function tests whether the provided value is an arguments object or not.\n * It returns `true` if the value is an arguments object, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.\n *\n * @param {any} value - The value to test if it is an arguments object.\n * @returns {value is IArguments} `true` if the value is an arguments, `false` otherwise.\n *\n * @example\n * const args = (function() { return arguments; })();\n * const strictArgs = (function() { 'use strict'; return arguments; })();\n * const value = [1, 2, 3];\n *\n * console.log(isArguments(args)); // true\n * console.log(isArguments(strictArgs)); // true\n * console.log(isArguments(value)); // false\n */\nexport function isArguments(value?: any): value is IArguments {\n  return value !== null && typeof value === 'object' && getTag(value) === '[object Arguments]';\n}\n"
  },
  {
    "path": "src/compat/predicate/isArray.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isArray as isArrayLodash } from 'lodash';\nimport { isArray } from './isArray';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('isArray', function () {\n  it('returns true if value is an array', () => {\n    expect(isArray([])).toBe(true);\n  });\n\n  it('returns false if value is not an array', () => {\n    expect(isArray('abc')).toBe(false);\n    expect(isArray(() => {})).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr1 = ['abc', () => {}, [1, 2, 3]];\n    const result1 = arr1.filter(isArray);\n    expect(result1).toStrictEqual([[1, 2, 3]]);\n    expectTypeOf(result1).toEqualTypeOf<any[][]>();\n\n    const arr2 = ['abc', () => {}, [1, 2, 3] as const];\n    const result2 = arr2.filter(isArray);\n    expect(result2).toStrictEqual([[1, 2, 3]]);\n  });\n\n  it('should return `true` for arrays', () => {\n    expect(isArray([1, 2, 3])).toBe(true);\n  });\n\n  it('should return `false` for non-arrays', () => {\n    const expected = falsey.map(() => false);\n\n    const actual = falsey.map((value, index) => (index ? isArray(value) : isArray()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isArray(args)).toBe(false);\n    expect(isArray(true)).toBe(false);\n    expect(isArray(new Date())).toBe(false);\n    expect(isArray(new Error())).toBe(false);\n    expect(isArray(Array.prototype.slice)).toBe(false);\n    expect(isArray({ 0: 1, length: 1 })).toBe(false);\n    expect(isArray(1)).toBe(false);\n    expect(isArray(/x/)).toBe(false);\n    expect(isArray('a')).toBe(false);\n    expect(isArray(Symbol('a'))).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isArray).toEqualTypeOf<typeof isArrayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isArray.ts",
    "content": "/**\n * Checks if the given value is an array.\n *\n * This function tests whether the provided value is an array or not.\n * It returns `true` if the value is an array, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.\n *\n * @param {any} value - The value to test if it is an array.\n * @returns {value is any[]} `true` if the value is an array, `false` otherwise.\n *\n * @example\n * const value1 = [1, 2, 3];\n * const value2 = 'abc';\n * const value3 = () => {};\n *\n * console.log(isArray(value1)); // true\n * console.log(isArray(value2)); // false\n * console.log(isArray(value3)); // false\n */\nexport function isArray(value?: any): value is any[];\n/**\n * Checks if the given value is an array with generic type support.\n *\n * This function tests whether the provided value is an array or not.\n * It returns `true` if the value is an array, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.\n *\n * @template T - The type of elements in the array.\n * @param {any} value - The value to test if it is an array.\n * @returns {value is any[]} `true` if the value is an array, `false` otherwise.\n *\n * @example\n * const value1 = [1, 2, 3];\n * const value2 = 'abc';\n * const value3 = () => {};\n *\n * console.log(isArray<number>(value1)); // true\n * console.log(isArray<string>(value2)); // false\n * console.log(isArray<Function>(value3)); // false\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function isArray<T>(value?: any): value is any[];\n\n/**\n * Checks if the given value is an array.\n *\n * This function tests whether the provided value is an array or not.\n * It returns `true` if the value is an array, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.\n *\n * @param {any} value - The value to test if it is an array.\n * @returns {value is any[]} `true` if the value is an array, `false` otherwise.\n *\n * @example\n * const value1 = [1, 2, 3];\n * const value2 = 'abc';\n * const value3 = () => {};\n *\n * console.log(isArray(value1)); // true\n * console.log(isArray(value2)); // false\n * console.log(isArray(value3)); // false\n */\nexport function isArray(value?: any): value is any[] {\n  return Array.isArray(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isArrayBuffer.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isArrayBuffer as isArrayBufferLodash } from 'lodash';\nimport { isArrayBuffer } from './isArrayBuffer';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isArrayBuffer', () => {\n  it('should return `true` for array buffers', () => {\n    expect(isArrayBuffer(new ArrayBuffer(8))).toBe(true);\n  });\n\n  it('should return `false` for non array buffers', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map((value, index) => (index ? isArrayBuffer(value) : isArrayBuffer()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isArrayBuffer(args)).toBe(false);\n    expect(isArrayBuffer([1])).toBe(false);\n    expect(isArrayBuffer(true)).toBe(false);\n    expect(isArrayBuffer(new Date())).toBe(false);\n    expect(isArrayBuffer(new Error())).toBe(false);\n    expect(isArrayBuffer(slice)).toBe(false);\n    expect(isArrayBuffer({ a: 1 })).toBe(false);\n    expect(isArrayBuffer(1)).toBe(false);\n    expect(isArrayBuffer(/x/)).toBe(false);\n    expect(isArrayBuffer('a')).toBe(false);\n    expect(isArrayBuffer(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isArrayBuffer).toEqualTypeOf<typeof isArrayBufferLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isArrayBuffer.ts",
    "content": "import { isArrayBuffer as isArrayBufferToolkit } from '../../predicate/isArrayBuffer.ts';\n\n/**\n * Checks if a given value is `ArrayBuffer`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `ArrayBuffer`.\n *\n * @param {any} value The value to check if it is a `ArrayBuffer`.\n * @returns {value is ArrayBuffer} Returns `true` if `value` is a `ArrayBuffer`, else `false`.\n *\n * @example\n * const value1 = new ArrayBuffer();\n * const value2 = new Array();\n * const value3 = new Map();\n *\n * console.log(isArrayBuffer(value1)); // true\n * console.log(isArrayBuffer(value2)); // false\n * console.log(isArrayBuffer(value3)); // false\n */\n\nexport function isArrayBuffer(value?: any): value is ArrayBuffer {\n  return isArrayBufferToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isArrayLike.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isArrayLike as isArrayLikeLodash } from 'lodash';\nimport { isArrayLike } from './isArrayLike';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('isArrayLike', () => {\n  it('should return `true` for array-like values', () => {\n    const values = [args, [1, 2, 3], { 0: 'a', length: 1 }, 'a'];\n    const expected = values.map(() => true);\n    const actual = values.map(isArrayLike);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-arrays', () => {\n    const expected = falsey.map(value => value === '');\n\n    const actual = falsey.map(isArrayLike);\n\n    expect(actual).toEqual(expected);\n\n    const slice = Array.prototype.slice;\n    const asyncFunc = async function () {};\n    const genFunc = function* () {};\n    const symbol = Symbol ? Symbol('a') : undefined;\n\n    expect(isArrayLike(true)).toBe(false);\n    expect(isArrayLike(new Date())).toBe(false);\n    expect(isArrayLike(new Error())).toBe(false);\n    expect(isArrayLike(asyncFunc)).toBe(false);\n    expect(isArrayLike(genFunc)).toBe(false);\n    expect(isArrayLike(slice)).toBe(false);\n    expect(isArrayLike({ a: 1 })).toBe(false);\n    expect(isArrayLike(1)).toBe(false);\n    expect(isArrayLike(/x/)).toBe(false);\n    expect(isArrayLike(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isArrayLike).toEqualTypeOf<typeof isArrayLikeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isArrayLike.ts",
    "content": "import { isLength } from '../../predicate/isLength.ts';\n\n/**\n * Checks if `value` is array-like. This overload is for compatibility with lodash type checking.\n *\n * @param {T} t The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nexport function isArrayLike<T extends { __lodashAnyHack: any }>(t: T): boolean;\n\n/**\n * Checks if `value` is array-like. Functions, null, and undefined are never array-like.\n *\n * @param {((...args: any[]) => any) | null | undefined} value The value to check.\n * @returns {value is never} Returns `false` for functions, null, and undefined.\n */\nexport function isArrayLike(value: ((...args: any[]) => any) | null | undefined): value is never;\n\n/**\n * Checks if `value` is array-like.\n *\n * @param {any} value The value to check.\n * @returns {value is { length: number }} Returns `true` if `value` is array-like, else `false`.\n */\nexport function isArrayLike(value: any): value is { length: number };\n\n/**\n * Checks if `value` is array-like.\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n *\n * @example\n * isArrayLike([1, 2, 3]); // true\n * isArrayLike('abc'); // true\n * isArrayLike({ 0: 'a', length: 1 }); // true\n * isArrayLike({}); // false\n * isArrayLike(null); // false\n * isArrayLike(undefined); // false\n */\nexport function isArrayLike(value?: any): boolean {\n  return value != null && typeof value !== 'function' && isLength((value as ArrayLike<unknown>).length);\n}\n"
  },
  {
    "path": "src/compat/predicate/isArrayLikeObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isArrayLikeObject as isArrayLikeObjectLodash } from 'lodash';\nimport { isArrayLikeObject } from './isArrayLikeObject';\nimport { toArgs } from '../_internal/toArgs';\n\ndescribe('isArrayLikeObject', () => {\n  it('should return `true` for non-primitive, array-like objects', () => {\n    expect(isArrayLikeObject([1, 2, 3])).toBe(true);\n    expect(isArrayLikeObject({ 0: 'a', length: 1 })).toBe(true);\n    expect(isArrayLikeObject(new String('123'))).toBe(true);\n    expect(isArrayLikeObject(toArgs([1, 2, 3]))).toBe(true);\n  });\n\n  it('should return `false` for primitive values', () => {\n    expect(isArrayLikeObject('abc')).toBe(false);\n    expect(isArrayLikeObject(1)).toBe(false);\n    expect(isArrayLikeObject(true)).toBe(false);\n    expect(isArrayLikeObject(undefined)).toBe(false);\n    expect(isArrayLikeObject(null)).toBe(false);\n    expect(isArrayLikeObject(Symbol())).toBe(false);\n    expect(isArrayLikeObject(1n)).toBe(false);\n  });\n\n  it('should return `false` for non array-like objects', () => {\n    expect(isArrayLikeObject({ name: 'mike' })).toBe(false);\n    expect(isArrayLikeObject(() => {})).toBe(false);\n    expect(isArrayLikeObject(/123/)).toBe(false);\n    expect(isArrayLikeObject(new Date())).toBe(false);\n    expect(isArrayLikeObject(new Error())).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isArrayLikeObject).toEqualTypeOf<typeof isArrayLikeObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isArrayLikeObject.ts",
    "content": "import { isArrayLike } from './isArrayLike.ts';\nimport { isObjectLike } from './isObjectLike.ts';\n\nexport function isArrayLikeObject<T extends { __lodashAnyHack: any }>(value: T): boolean;\nexport function isArrayLikeObject(\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n  value: ((...args: any[]) => any) | Function | string | boolean | number | null | undefined\n): value is never;\nexport function isArrayLikeObject(value: any): value is object & { length: number };\n\n/**\n * Checks if the given value is a non-primitive, array-like object.\n *\n * @param {any} value The value to check.\n * @returns {boolean} `true` if the value is a non-primitive, array-like object, `false` otherwise.\n *\n * @example\n * isArrayLikeObject([1, 2, 3]); // true\n * isArrayLikeObject({ 0: 'a', length: 1 }); // true\n * isArrayLikeObject('abc'); // false\n * isArrayLikeObject(()=>{}); // false\n */\nexport function isArrayLikeObject(value?: any): boolean {\n  return isObjectLike(value) && isArrayLike(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isBoolean.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isBoolean as isBooleanLodash } from 'lodash';\nimport { isBoolean } from './isBoolean';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('isBoolean', () => {\n  it('should return `true` for booleans', () => {\n    expect(isBoolean(true)).toBe(true);\n    expect(isBoolean(false)).toBe(true);\n    expect(isBoolean(Object(true))).toBe(true);\n    expect(isBoolean(Object(false))).toBe(true);\n  });\n\n  it('should return `false` for non-booleans', () => {\n    const expected = falsey.map(value => value === false);\n\n    const actual = falsey.map(value => isBoolean(value));\n\n    expect(actual).toEqual(expected);\n\n    expect(isBoolean(args)).toBe(false);\n    expect(isBoolean([1, 2, 3])).toBe(false);\n    expect(isBoolean(new Date())).toBe(false);\n    expect(isBoolean(new Error())).toBe(false);\n    expect(isBoolean(slice)).toBe(false);\n    expect(isBoolean({ a: 1 })).toBe(false);\n    expect(isBoolean(1)).toBe(false);\n    expect(isBoolean(/x/)).toBe(false);\n    expect(isBoolean('a')).toBe(false);\n    expect(isBoolean(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isBoolean).toEqualTypeOf<typeof isBooleanLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isBoolean.ts",
    "content": "/**\n * Checks if the given value is boolean.\n *\n * This function tests whether the provided value is strictly `boolean`.\n * It returns `true` if the value is `boolean`, and `false` otherwise.\n *\n *  This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `boolean`.\n *\n * @param {any} value - The Value to test if it is boolean.\n * @returns {value is boolean} True if the value is boolean, false otherwise.\n *\n * @example\n *\n * const value1 = true;\n * const value2 = 0;\n * const value3 = 'abc';\n *\n * console.log(isBoolean(value1)); // true\n * console.log(isBoolean(value2)); // false\n * console.log(isBoolean(value3)); // false\n *\n */\nexport function isBoolean(value?: any): value is boolean {\n  return typeof value === 'boolean' || value instanceof Boolean;\n}\n"
  },
  {
    "path": "src/compat/predicate/isBuffer.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isBuffer as isBufferLodash } from 'lodash';\nimport { isBuffer } from './isBuffer';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { symbol } from '../_internal/symbol';\nimport { map } from '../array/map';\nimport { slice } from '../array/slice';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isBuffer', () => {\n  it('should return `true` for buffers', () => {\n    if (Buffer) {\n      expect(isBuffer(Buffer.alloc(2))).toBe(true);\n    }\n  });\n\n  it('should return `false` for non-buffers', () => {\n    const expected = map(falsey, stubFalse);\n\n    const actual = map(falsey, (value, index) => (index ? isBuffer(value) : isBuffer()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isBuffer(args)).toBe(false);\n    expect(isBuffer([1])).toBe(false);\n    expect(isBuffer(true)).toBe(false);\n    expect(isBuffer(new Date())).toBe(false);\n    expect(isBuffer(new Error())).toBe(false);\n    expect(isBuffer(slice)).toBe(false);\n    expect(isBuffer({ a: 1 })).toBe(false);\n    expect(isBuffer(1)).toBe(false);\n    expect(isBuffer(/x/)).toBe(false);\n    expect(isBuffer('a')).toBe(false);\n    expect(isBuffer(symbol)).toBe(false);\n  });\n\n  it('should return `false` if `Buffer` is not defined', () => {\n    const originalBuffer = global.Buffer;\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete global.Buffer;\n\n    expect(isBuffer(new Uint8Array())).toBe(false);\n\n    global.Buffer = originalBuffer; // Restore Buffer\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isBuffer).toEqualTypeOf<typeof isBufferLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isBuffer.ts",
    "content": "import { isBuffer as isBufferToolkit } from '../../predicate/isBuffer.ts';\n\n/**\n * Checks if the given value is a Buffer instance.\n *\n * This function tests whether the provided value is an instance of Buffer.\n * It returns `true` if the value is a Buffer, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.\n *\n * @param {any} x - The value to check if it is a Buffer.\n * @returns {boolean} Returns `true` if `x` is a Buffer, else `false`.\n *\n * @example\n * const buffer = Buffer.from(\"test\");\n * console.log(isBuffer(buffer)); // true\n *\n * const notBuffer = \"not a buffer\";\n * console.log(isBuffer(notBuffer)); // false\n */\nexport function isBuffer(x?: any): boolean {\n  return isBufferToolkit(x);\n}\n"
  },
  {
    "path": "src/compat/predicate/isDate.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isDate as isDateLodash } from 'lodash';\nimport { isDate } from './isDate';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isDate', () => {\n  it('should return `true` for dates', () => {\n    expect(isDate(new Date())).toBe(true);\n  });\n\n  it('should return `false` for non-dates', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map((value, index) => (index ? isDate(value) : isDate()));\n    expect(actual).toEqual(expected);\n\n    expect(isDate(args)).toBe(false);\n    expect(isDate([1, 2, 3])).toBe(false);\n    expect(isDate(true)).toBe(false);\n    expect(isDate(new Error())).toBe(false);\n    expect(isDate(slice)).toBe(false);\n    expect(isDate({ a: 1 })).toBe(false);\n    expect(isDate(1)).toBe(false);\n    expect(isDate(/x/)).toBe(false);\n    expect(isDate('a')).toBe(false);\n    expect(isDate(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isDate).toEqualTypeOf<typeof isDateLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isDate.ts",
    "content": "import { isDate as isDateToolkit } from '../../predicate/isDate.ts';\n\n/**\n * Checks if `value` is a Date object.\n *\n * @param {any} value The value to check.\n * @returns {value is Date} Returns `true` if `value` is a Date object, `false` otherwise.\n *\n * @example\n * const value1 = new Date();\n * const value2 = '2024-01-01';\n *\n * console.log(isDate(value1)); // true\n * console.log(isDate(value2)); // false\n */\nexport function isDate(value?: any): value is Date {\n  return isDateToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isElement.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isElement as isElementLodash } from 'lodash';\nimport { isElement } from './isElement';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\n/**\n * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/isElement.spec.js\n */\n\ndescribe('isElement', () => {\n  /*\n  it( 'should return `true` for elements', () => {\n    if ( document ) {\n      expect( isElement( body ) ).toBe( true );\n    }\n  } );\n   */\n\n  it('should return `true` for non-plain objects', () => {\n    class Foo {\n      nodeType = 1;\n    }\n\n    expect(isElement(new Foo())).toBe(true);\n  });\n\n  it('should return `false` for non DOM elements', () => {\n    falsey.forEach(val => {\n      expect(isElement(val)).toBe(false);\n    });\n\n    expect(isElement(args)).toBe(false);\n    expect(isElement([1, 2, 3])).toBe(false);\n    expect(isElement(true)).toBe(false);\n    expect(isElement(new Date())).toBe(false);\n    expect(isElement(new Error())).toBe(false);\n    expect(isElement(slice)).toBe(false);\n    expect(isElement({ a: 1 })).toBe(false);\n    expect(isElement(1)).toBe(false);\n    expect(isElement(/x/)).toBe(false);\n    expect(isElement('a')).toBe(false);\n    expect(isElement(symbol)).toBe(false);\n  });\n\n  it('should return `false` for plain objects', () => {\n    expect(isElement({ nodeType: 1 })).toBe(false);\n    expect(isElement({ nodeType: Object(1) })).toBe(false);\n    expect(isElement({ nodeType: true })).toBe(false);\n    expect(isElement({ nodeType: [1] })).toBe(false);\n    expect(isElement({ nodeType: '1' })).toBe(false);\n    expect(isElement({ nodeType: '001' })).toBe(false);\n  });\n\n  /*\n  it( 'should work with a DOM element from another realm', () => {\n    if ( realm.element ) {\n      expect( isElement( realm.element ) ).toBe( true );\n    }\n  } );\n   */\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isElement).toEqualTypeOf<typeof isElementLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isElement.ts",
    "content": "import { isObjectLike } from './isObjectLike.ts';\nimport { isPlainObject } from './isPlainObject.ts';\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n *\n * @example\n * console.log(isElement(document.body)); // true\n * console.log(isElement('<body>')); // false\n */\nexport function isElement(value?: any): boolean {\n  return isObjectLike(value) && (value as any).nodeType === 1 && !isPlainObject(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isEmpty.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isEmpty as isEmptyLodash } from 'lodash';\nimport { isEmpty } from './isEmpty';\nimport { args } from '../_internal/args';\nimport { empties } from '../_internal/empties';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('isEmpty', () => {\n  it('should return `true` for empty values', () => {\n    const expected = empties.map(stubTrue);\n    const actual = empties.map(isEmpty);\n\n    expect(actual).toEqual(expected);\n\n    expect(isEmpty(true)).toBe(true);\n    expect(isEmpty(slice)).toBe(true);\n    expect(isEmpty(1)).toBe(true);\n    expect(isEmpty(NaN)).toBe(true);\n    expect(isEmpty(/x/)).toBe(true);\n    expect(isEmpty(symbol)).toBe(true);\n    expect(isEmpty()).toBe(true);\n\n    expect(isEmpty(Buffer.alloc(0))).toBe(true);\n    expect(isEmpty(Buffer.alloc(1))).toBe(false);\n  });\n\n  it('should return `false` for non-empty values', () => {\n    expect(isEmpty([0])).toBe(false);\n    expect(isEmpty({ a: 0 })).toBe(false);\n    expect(isEmpty('a')).toBe(false);\n  });\n\n  it('should work with an object that has a `length` property', () => {\n    expect(isEmpty({ length: 0 })).toBe(false);\n  });\n\n  it('should work with `arguments` objects', () => {\n    expect(isEmpty(args)).toBe(false);\n  });\n\n  it('should work with prototype objects', () => {\n    function Foo() {}\n    Foo.prototype = { constructor: Foo };\n\n    expect(isEmpty(Foo.prototype)).toBe(true);\n\n    Foo.prototype.a = 1;\n    expect(isEmpty(Foo.prototype)).toBe(false);\n  });\n\n  it('should work with jQuery/MooTools DOM query collections', () => {\n    function Foo(this: any, elements: any) {\n      Array.prototype.push.apply(this, elements);\n    }\n    Foo.prototype = { length: 0, splice: Array.prototype.splice };\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEmpty(new Foo([]))).toBe(true);\n  });\n\n  it('should work with maps', () => {\n    [new Map()].forEach(map => {\n      expect(isEmpty(map)).toBe(true);\n      map.set('a', 1);\n      expect(isEmpty(map)).toBe(false);\n      map.clear();\n    });\n  });\n\n  it('should work with sets', () => {\n    [new Set()].forEach(set => {\n      expect(isEmpty(set)).toBe(true);\n      set.add(1);\n      expect(isEmpty(set)).toBe(false);\n      set.clear();\n    });\n  });\n\n  it('should not treat objects with negative lengths as array-like', () => {\n    function Foo() {}\n    Foo.prototype.length = -1;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEmpty(new Foo())).toBe(true);\n  });\n\n  it('should not treat objects with lengths larger than `MAX_SAFE_INTEGER` as array-like', () => {\n    function Foo() {}\n    Foo.prototype.length = MAX_SAFE_INTEGER + 1;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEmpty(new Foo())).toBe(true);\n  });\n\n  it('should not treat objects with non-number lengths as array-like', () => {\n    expect(isEmpty({ length: '0' })).toBe(false);\n  });\n\n  it('should return `true` for objects with only enumerable symbol properties', () => {\n    const value = { [Symbol('a')]: 1 };\n    expect(isEmpty(value)).toBe(true);\n\n    function Foo() {}\n    Foo.prototype = { constructor: Foo, [Symbol('a')]: 1 };\n    expect(isEmpty(Foo.prototype)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isEmpty).toEqualTypeOf<typeof isEmptyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isEmpty.ts",
    "content": "import { isArguments } from './isArguments.ts';\nimport { isArrayLike } from './isArrayLike.ts';\nimport { isTypedArray } from './isTypedArray.ts';\nimport type { EmptyObjectOf } from '../_internal/EmptyObjectOf.ts';\nimport { isPrototype } from '../_internal/isPrototype.ts';\n\ndeclare let Buffer:\n  | {\n      isBuffer: (a: any) => boolean;\n    }\n  | undefined;\n\nexport function isEmpty<T extends { __trapAny: any }>(value?: T): boolean;\nexport function isEmpty(value: string): value is '';\nexport function isEmpty(value: Map<any, any> | Set<any> | ArrayLike<any> | null | undefined): boolean;\nexport function isEmpty(value: object): boolean;\nexport function isEmpty<T extends object>(value: T | null | undefined): value is EmptyObjectOf<T> | null | undefined;\nexport function isEmpty(value?: any): boolean;\n\n/**\n * Checks if a given value is empty.\n *\n * - If the given value is a string, checks if it is an empty string.\n * - If the given value is an array, `Map`, or `Set`, checks if its size is 0.\n * - If the given value is an [array-like object](../predicate/isArrayLike.md), checks if its length is 0.\n * - If the given value is an object, checks if it is an empty object with no properties.\n * - Primitive values (booleans, numbers, or bigints) are considered empty.\n *\n * @param {unknown} [value] - The value to check.\n * @returns {boolean} `true` if the value is empty, `false` otherwise.\n *\n * @example\n * isEmpty(); // true\n * isEmpty(null); // true\n * isEmpty(\"\"); // true\n * isEmpty([]); // true\n * isEmpty({}); // true\n * isEmpty(new Map()); // true\n * isEmpty(new Set()); // true\n * isEmpty(\"hello\"); // false\n * isEmpty([1, 2, 3]); // false\n * isEmpty({ a: 1 }); // false\n * isEmpty(new Map([[\"key\", \"value\"]])); // false\n * isEmpty(new Set([1, 2, 3])); // false\n */\nexport function isEmpty(value?: unknown): boolean {\n  if (value == null) {\n    return true;\n  }\n\n  // Objects like { \"length\": 0 } are not empty in lodash\n  if (isArrayLike(value)) {\n    if (\n      typeof (value as any).splice !== 'function' &&\n      typeof value !== 'string' &&\n      (typeof Buffer === 'undefined' || !Buffer.isBuffer(value)) &&\n      !isTypedArray(value) &&\n      !isArguments(value)\n    ) {\n      return false;\n    }\n\n    return value.length === 0;\n  }\n\n  if (typeof value === 'object') {\n    if (value instanceof Map || value instanceof Set) {\n      return value.size === 0;\n    }\n\n    const keys = Object.keys(value);\n\n    if (isPrototype(value)) {\n      return keys.filter(x => x !== 'constructor').length === 0;\n    }\n\n    return keys.length === 0;\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/compat/predicate/isEqual.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { isEqual } from 'es-toolkit/compat';\nimport type { isEqual as isEqualLodash } from 'lodash';\nimport { noop } from '../../function/noop';\nimport { args } from '../_internal/args';\nimport { arrayViews } from '../_internal/arrayViews';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isEqual', () => {\n  const symbol1 = Symbol ? Symbol('a') : true;\n  const symbol2 = Symbol ? Symbol('b') : false;\n\n  it('should compare primitives', () => {\n    const pairs = [\n      [1, 1, true],\n      [1, Object(1), true],\n      [1, '1', false],\n      [1, 2, false],\n      [-0, -0, true],\n      [0, 0, true],\n      [0, Object(0), true],\n      [Object(0), Object(0), true],\n      [-0, 0, true],\n      [0, '0', false],\n      [0, null, false],\n      [NaN, NaN, true],\n      [NaN, Object(NaN), true],\n      [Object(NaN), Object(NaN), true],\n      [NaN, 'a', false],\n      [NaN, Infinity, false],\n      ['a', 'a', true],\n      ['a', Object('a'), true],\n      [Object('a'), Object('a'), true],\n      ['a', 'b', false],\n      ['a', ['a'], false],\n      [true, true, true],\n      [true, Object(true), true],\n      [Object(true), Object(true), true],\n      [true, 1, false],\n      [true, 'a', false],\n      [false, false, true],\n      [false, Object(false), true],\n      [Object(false), Object(false), true],\n      [false, 0, false],\n      [false, '', false],\n      [symbol1, symbol1, true],\n      [symbol1, Object(symbol1), true],\n      [Object(symbol1), Object(symbol1), true],\n      [symbol1, symbol2, false],\n      [null, null, true],\n      [null, undefined, false],\n      [null, {}, false],\n      [null, '', false],\n      [undefined, undefined, true],\n      [undefined, null, false],\n      [undefined, '', false],\n    ];\n\n    const expected = pairs.map(pair => pair[2]);\n\n    const actual = pairs.map(pair => isEqual(pair[0], pair[1]));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare arrays', () => {\n    let array1: unknown[] = [true, null, 1, 'a', undefined];\n    let array2: unknown[] = [true, null, 1, 'a', undefined];\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { e: 1 }];\n    array2 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { e: 1 }];\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = [1];\n    array1[2] = 3;\n\n    array2 = [1];\n    array2[1] = undefined;\n    array2[2] = 3;\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = [Object(1), false, Object('a'), /x/, new Date(2012, 4, 23), ['a', 'b', [Object('c')]], { a: 1 }];\n    array2 = [1, Object(false), 'a', /x/, new Date(2012, 4, 23), ['a', Object('b'), ['c']], { a: 1 }];\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = [1, 2, 3];\n    array2 = [3, 2, 1];\n\n    expect(isEqual(array1, array2)).toBe(false);\n\n    array1 = [1, 2];\n    array2 = [1, 2, 3];\n\n    expect(isEqual(array1, array2)).toBe(false);\n  });\n\n  it('should treat arrays with identical values but different non-index properties as equal', () => {\n    let array1: any = [1, 2, 3];\n    let array2: any = [1, 2, 3];\n\n    array1.every =\n      array1.filter =\n      array1.forEach =\n      array1.indexOf =\n      array1.lastIndexOf =\n      array1.map =\n      array1.some =\n      array1.reduce =\n      array1.reduceRight =\n        null;\n\n    array2.concat =\n      array2.join =\n      array2.pop =\n      array2.reverse =\n      array2.shift =\n      array2.slice =\n      array2.sort =\n      array2.splice =\n      array2.unshift =\n        null;\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = [1, 2, 3];\n    array1.a = 1;\n\n    array2 = [1, 2, 3];\n    array2.b = 1;\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1 = /c/.exec('abcde');\n    array2 = ['c'];\n\n    expect(isEqual(array1, array2)).toBe(true);\n  });\n\n  it('should compare sparse arrays', () => {\n    const array = Array(1);\n\n    expect(isEqual(array, Array(1))).toBe(true);\n    expect(isEqual(array, [undefined])).toBe(true);\n    expect(isEqual(array, Array(2))).toBe(false);\n  });\n\n  it('should compare plain objects', () => {\n    let object1: any = { a: true, b: null, c: 1, d: 'a', e: undefined };\n    let object2: any = { a: true, b: null, c: 1, d: 'a', e: undefined };\n\n    expect(isEqual(object1, object2)).toBe(true);\n\n    object1 = { a: [1, 2, 3], b: new Date(2012, 4, 23), c: /x/, d: { e: 1 } };\n    object2 = { a: [1, 2, 3], b: new Date(2012, 4, 23), c: /x/, d: { e: 1 } };\n\n    expect(isEqual(object1, object2)).toBe(true);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object2 = { a: 3, b: 2, c: 1 };\n\n    expect(isEqual(object1, object2)).toBe(false);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object2 = { d: 1, e: 2, f: 3 };\n\n    expect(isEqual(object1, object2)).toBe(false);\n\n    object1 = { a: 1, b: 2 };\n    object2 = { a: 1, b: 2, c: 3 };\n\n    expect(isEqual(object1, object2)).toBe(false);\n  });\n\n  it('should compare objects regardless of key order', () => {\n    const object1 = { a: 1, b: 2, c: 3 };\n    const object2 = { c: 3, a: 1, b: 2 };\n\n    expect(isEqual(object1, object2)).toBe(true);\n  });\n\n  it('should compare nested objects', () => {\n    const object1 = {\n      a: [1, 2, 3],\n      b: true,\n      c: Object(1),\n      d: 'a',\n      e: {\n        f: ['a', Object('b'), 'c'],\n        g: Object(false),\n        h: new Date(2012, 4, 23),\n        i: noop,\n        j: 'a',\n      },\n    };\n\n    const object2 = {\n      a: [1, Object(2), 3],\n      b: Object(true),\n      c: 1,\n      d: Object('a'),\n      e: {\n        f: ['a', 'b', 'c'],\n        g: false,\n        h: new Date(2012, 4, 23),\n        i: noop,\n        j: 'a',\n      },\n    };\n\n    expect(isEqual(object1, object2)).toBe(true);\n  });\n\n  it('should compare object instances', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.a = 1;\n\n    function Bar() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Bar.prototype.a = 2;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual(new Foo(), new Foo())).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual(new Foo(), new Bar())).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual({ a: 1 }, new Foo())).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual({ a: 2 }, new Bar())).toBe(false);\n  });\n\n  it('should compare objects with constructor properties', () => {\n    expect(isEqual({ constructor: 1 }, { constructor: 1 })).toBe(true);\n    expect(isEqual({ constructor: 1 }, { constructor: '1' })).toBe(false);\n    expect(isEqual({ constructor: [1] }, { constructor: [1] })).toBe(true);\n    expect(isEqual({ constructor: [1] }, { constructor: ['1'] })).toBe(false);\n    expect(isEqual({ constructor: Object }, {})).toBe(false);\n  });\n\n  it('should compare arrays with circular references', () => {\n    let array1: any[] = [];\n    let array2: any[] = [];\n\n    array1.push(array1);\n    array2.push(array2);\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1.push('b');\n    array2.push('b');\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1.push('c');\n    array2.push('d');\n\n    expect(isEqual(array1, array2)).toBe(false);\n\n    array1 = ['a', 'b', 'c'];\n    array1[1] = array1;\n    array2 = ['a', ['a', 'b', 'c'], 'c'];\n\n    expect(isEqual(array1, array2)).toBe(false);\n  });\n\n  it('should have transitive equivalence for circular references of arrays', () => {\n    const array1: any[] = [];\n    const array2: any[] = [array1];\n    const array3: any[] = [array2];\n\n    array1[0] = array1;\n\n    expect(isEqual(array1, array2)).toBe(true);\n    expect(isEqual(array2, array3)).toBe(true);\n    expect(isEqual(array1, array3)).toBe(true);\n  });\n\n  it('should compare objects with circular references', () => {\n    let object1: any = {};\n    let object2: any = {};\n\n    object1.a = object1;\n    object2.a = object2;\n\n    expect(isEqual(object1, object2)).toBe(true);\n\n    object1.b = 0;\n    object2.b = Object(0);\n\n    expect(isEqual(object1, object2)).toBe(true);\n\n    object1.c = Object(1);\n    object2.c = Object(2);\n\n    expect(isEqual(object1, object2)).toBe(false);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object1.b = object1;\n    object2 = { a: 1, b: { a: 1, b: 2, c: 3 }, c: 3 };\n\n    expect(isEqual(object1, object2)).toBe(false);\n  });\n\n  it('should have transitive equivalence for circular references of objects', () => {\n    const object1: any = {};\n    const object2: any = { a: object1 };\n    const object3: any = { a: object2 };\n\n    object1.a = object1;\n\n    expect(isEqual(object1, object2)).toBe(true);\n    expect(isEqual(object2, object3)).toBe(true);\n    expect(isEqual(object1, object3)).toBe(true);\n  });\n\n  it('should compare objects with multiple circular references', () => {\n    const array1: any = [{}];\n    const array2: any = [{}];\n\n    (array1[0].a = array1).push(array1);\n    (array2[0].a = array2).push(array2);\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1[0].b = 0;\n    array2[0].b = Object(0);\n\n    expect(isEqual(array1, array2)).toBe(true);\n\n    array1[0].c = Object(1);\n    array2[0].c = Object(2);\n\n    expect(isEqual(array1, array2)).toBe(false);\n  });\n\n  it('should compare objects with complex circular references', () => {\n    const object1: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: { a: 2 },\n    };\n\n    const object2: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: { a: 2 },\n    };\n\n    object1.foo.b.c.d = object1;\n    object1.bar.b = object1.foo.b;\n\n    object2.foo.b.c.d = object2;\n    object2.bar.b = object2.foo.b;\n\n    expect(isEqual(object1, object2)).toBe(true);\n  });\n\n  it('should compare objects with shared property values', () => {\n    const object1: any = {\n      a: [1, 2],\n    };\n\n    const object2: any = {\n      a: [1, 2],\n      b: [1, 2],\n    };\n\n    object1.b = object1.a;\n\n    expect(isEqual(object1, object2)).toBe(true);\n  });\n\n  it('should treat objects created by `Object.create(null)` like plain objects', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.constructor = null;\n\n    const object1 = Object.create(null);\n    object1.a = 1;\n\n    const object2 = { a: 1 };\n\n    expect(isEqual(object1, object2)).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual(new Foo(), object2)).toBe(false);\n  });\n\n  it('should avoid common type coercions', () => {\n    expect(isEqual(true, Object(false))).toBe(false);\n    expect(isEqual(Object(false), Object(0))).toBe(false);\n    expect(isEqual(false, Object(''))).toBe(false);\n    expect(isEqual(Object(36), Object('36'))).toBe(false);\n    expect(isEqual(0, '')).toBe(false);\n    expect(isEqual(1, true)).toBe(false);\n    expect(isEqual(1337756400000, new Date(2012, 4, 23))).toBe(false);\n    expect(isEqual('36', 36)).toBe(false);\n    expect(isEqual(36, '36')).toBe(false);\n  });\n\n  it('should compare `arguments` objects', () => {\n    const args1 = (function () {\n      // eslint-disable-next-line\n      return arguments;\n    })();\n    const args2 = (function () {\n      // eslint-disable-next-line\n      return arguments;\n    })();\n    // eslint-disable-next-line\n    const args3 = (function (..._: any[]) {\n      // eslint-disable-next-line\n      return arguments;\n    })(1, 2);\n\n    expect(isEqual(args1, args2)).toBe(true);\n    expect(isEqual(args1, args3)).toBe(false);\n  });\n\n  it('should treat `arguments` objects like `Object` objects', () => {\n    const object = { 0: 1, 1: 2, 2: 3 };\n\n    function Foo() {}\n    Foo.prototype = object;\n\n    expect(isEqual(args, object)).toBe(true);\n    expect(isEqual(object, args)).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual(args, new Foo())).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqual(new Foo(), args)).toBe(false);\n  });\n\n  it('should compare array buffers', () => {\n    const buffer = new Int8Array([-1]).buffer;\n\n    expect(isEqual(buffer, new Uint8Array([255]).buffer)).toBe(true);\n    expect(isEqual(buffer, new ArrayBuffer(1))).toBe(false);\n  });\n\n  it('should compare array views', () => {\n    const pairs = arrayViews.map((type, viewIndex) => {\n      const otherType = arrayViews[(viewIndex + 1) % arrayViews.length];\n      const CtorA =\n        // eslint-disable-next-line\n        // @ts-ignore\n        globalThis[type] ||\n        // eslint-disable-next-line\n        // @ts-ignore\n        function (n) {\n          // eslint-disable-next-line\n          // @ts-ignore\n          this.n = n;\n        };\n      const CtorB =\n        // eslint-disable-next-line\n        // @ts-ignore\n        globalThis[otherType] ||\n        // eslint-disable-next-line\n        // @ts-ignore\n        function (n) {\n          // eslint-disable-next-line\n          // @ts-ignore\n          this.n = n;\n        };\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferA = globalThis[type] ? new ArrayBuffer(8) : 8;\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferB = globalThis[otherType] ? new ArrayBuffer(8) : 8;\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferC = globalThis[otherType] ? new ArrayBuffer(16) : 16;\n\n      return [new CtorA(bufferA), new CtorA(bufferA), new CtorB(bufferB), new CtorB(bufferC)];\n    });\n\n    const expected = pairs.map(() => [true, false, false]);\n\n    const actual = pairs.map(pair => [isEqual(pair[0], pair[1]), isEqual(pair[0], pair[2]), isEqual(pair[2], pair[3])]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare buffers', () => {\n    const buffer = Buffer.from([1]);\n\n    expect(isEqual(buffer, Buffer.from([1]))).toBe(true);\n    expect(isEqual(buffer, Buffer.from([2]))).toBe(false);\n    expect(isEqual(buffer, new Uint8Array([1]))).toBe(false);\n  });\n\n  it('should compare date objects', () => {\n    const date = new Date(2012, 4, 23);\n\n    expect(isEqual(date, new Date(2012, 4, 23))).toBe(true);\n    expect(isEqual(new Date('a'), new Date('b'))).toBe(true);\n    expect(isEqual(date, new Date(2013, 3, 25))).toBe(false);\n    expect(isEqual(date, { getTime: () => Number(date) })).toBe(false);\n  });\n\n  it('should compare error objects', () => {\n    const pairs = ['Error', 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError'].map(\n      (type, index, errorTypes) => {\n        const otherType = errorTypes[++index % errorTypes.length];\n        // eslint-disable-next-line\n        // @ts-ignore\n        const CtorA = globalThis[type];\n        // eslint-disable-next-line\n        // @ts-ignore\n        const CtorB = globalThis[otherType];\n\n        return [new CtorA('a'), new CtorA('a'), new CtorB('a'), new CtorB('b')];\n      }\n    );\n\n    const expected = pairs.map(() => [true, false, false]);\n\n    const actual = pairs.map(pair => [isEqual(pair[0], pair[1]), isEqual(pair[0], pair[2]), isEqual(pair[2], pair[3])]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare functions', () => {\n    function a() {\n      return 1 + 2;\n    }\n    function b() {\n      return 1 + 2;\n    }\n\n    expect(isEqual(a, a)).toBe(true);\n    expect(isEqual(a, b)).toBe(false);\n  });\n\n  it('should compare maps', () => {\n    [[new Map(), new Map()]].forEach(maps => {\n      const map1 = maps[0];\n      const map2 = maps[1];\n\n      map1.set('a', 1);\n      map2.set('b', 2);\n      expect(isEqual(map1, map2)).toBe(false);\n\n      map1.set('b', 2);\n      map2.set('a', 1);\n      expect(isEqual(map1, map2)).toBe(true);\n\n      map1.delete('a');\n      map1.set('a', 1);\n      expect(isEqual(map1, map2)).toBe(true);\n\n      map2.delete('a');\n      expect(isEqual(map1, map2)).toBe(false);\n\n      map1.clear();\n      map2.clear();\n    });\n  });\n\n  it('should compare maps with circular references', () => {\n    const map1 = new Map();\n    const map2 = new Map();\n\n    map1.set('a', map1);\n    map2.set('a', map2);\n    expect(isEqual(map1, map2)).toBe(true);\n\n    map1.set('b', 1);\n    map2.set('b', 2);\n    expect(isEqual(map1, map2)).toBe(false);\n  });\n\n  it('should compare promises by reference', () => {\n    [[Promise.resolve(1), Promise.resolve(1)]].forEach(promises => {\n      const promise1 = promises[0];\n      const promise2 = promises[1];\n\n      expect(isEqual(promise1, promise2)).toBe(false);\n      expect(isEqual(promise1, promise1)).toBe(true);\n    });\n  });\n\n  it('should compare regexes', () => {\n    expect(isEqual(/x/gim, /x/gim)).toBe(true);\n    expect(isEqual(/x/gim, /x/gim)).toBe(true);\n    expect(isEqual(/x/gi, /x/g)).toBe(false);\n    expect(isEqual(/x/, /y/)).toBe(false);\n\n    expect(\n      isEqual(/x/g, {\n        global: true,\n        ignoreCase: false,\n        multiline: false,\n        source: 'x',\n      })\n    ).toBe(false);\n  });\n\n  it('should compare sets', () => {\n    [[new Set(), new Set()]].forEach(sets => {\n      const set1 = sets[0];\n      const set2 = sets[1];\n\n      set1.add(1);\n      set2.add(2);\n      expect(isEqual(set1, set2)).toBe(false);\n\n      set1.add(2);\n      set2.add(1);\n      expect(isEqual(set1, set2)).toBe(true);\n\n      set1.delete(1);\n      set1.add(1);\n      expect(isEqual(set1, set2)).toBe(true);\n\n      set2.delete(1);\n      expect(isEqual(set1, set2)).toBe(false);\n\n      set1.clear();\n      set2.clear();\n    });\n  });\n\n  it('should compare sets with circular references', () => {\n    const set1 = new Set();\n    const set2 = new Set();\n\n    set1.add(set1);\n    set2.add(set2);\n    expect(isEqual(set1, set2)).toBe(true);\n\n    set1.add(1);\n    set2.add(2);\n    expect(isEqual(set1, set2)).toBe(false);\n  });\n\n  it('should compare symbol properties', () => {\n    const symbol1 = Symbol('a');\n    const symbol2 = Symbol('b');\n\n    const object1: any = { a: 1 };\n    const object2: any = { a: 1 };\n\n    object1[symbol1] = { a: { b: 2 } };\n    object2[symbol1] = { a: { b: 2 } };\n\n    Object.defineProperty(object2, symbol2, {\n      configurable: true,\n      enumerable: false,\n      writable: true,\n      value: 2,\n    });\n\n    expect(isEqual(object1, object2)).toBe(true);\n\n    object2[symbol1] = { a: 1 };\n\n    expect(isEqual(object1, object2)).toBe(false);\n\n    delete object2[symbol1];\n    object2[Symbol('a')] = { a: { b: 2 } };\n    expect(isEqual(object1, object2)).toBe(false);\n  });\n\n  it('should return `false` for objects with custom `toString` methods', () => {\n    let primitive: any;\n    const object = {\n      toString: function () {\n        return primitive;\n      },\n    };\n    const values = [true, null, 1, 'a', undefined];\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(value => {\n      primitive = value;\n      return isEqual(object, value);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isEqual).toEqualTypeOf<typeof isEqualLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isEqualWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isEqualWith as isEqualWithLodash } from 'lodash';\nimport { isEqualWith } from './isEqualWith';\nimport { isString } from './isString';\nimport { without } from '../../array/without';\nimport { noop } from '../../function/noop';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { stubC } from '../_internal/stubC';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isEqualWith', () => {\n  it('should provide correct `customizer` arguments', () => {\n    const argsList: any = [];\n    const object1: any = { a: [1, 2], b: null };\n    const object2: any = { a: [1, 2], b: null };\n\n    object1.b = object2;\n    object2.b = object1;\n\n    const expected = [\n      [object1, object2, undefined, undefined, undefined],\n      [object1.a, object2.a, 'a', object1, object2],\n      [object1.a[0], object2.a[0], 0, object1.a, object2.a],\n      [object1.a[1], object2.a[1], 1, object1.a, object2.a],\n      [object1.b, object2.b, 'b', object1.b, object2.b],\n    ];\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    isEqualWith(object1, object2, function () {\n      const length = arguments.length;\n      // eslint-disable-next-line prefer-rest-params\n      const args = slice.call(arguments, 0, length - (length > 2 ? 1 : 0));\n\n      argsList.push(args);\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  it('should handle comparisons when `customizer` returns `undefined`', () => {\n    expect(isEqualWith('a', 'a')).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isEqualWith('a', 'a', noop)).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isEqualWith(['a'], ['a'], noop)).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isEqualWith({ 0: 'a' }, { 0: 'a' }, noop)).toBe(true);\n  });\n\n  it('should not handle comparisons when `customizer` returns `true`', () => {\n    const customizer = function (value: any) {\n      return isString(value) || undefined;\n    };\n\n    expect(isEqualWith('a', 'b', customizer)).toBe(true);\n    expect(isEqualWith(['a'], ['b'], customizer)).toBe(true);\n    expect(isEqualWith({ 0: 'a' }, { 0: 'b' }, customizer)).toBe(true);\n  });\n\n  it('should not handle comparisons when `customizer` returns `false`', () => {\n    const customizer = function (value: any) {\n      return isString(value) ? false : undefined;\n    };\n\n    expect(isEqualWith('a', 'a', customizer)).toBe(false);\n    expect(isEqualWith(['a'], ['a'], customizer)).toBe(false);\n    expect(isEqualWith({ 0: 'a' }, { 0: 'a' }, customizer)).toBe(false);\n  });\n\n  it('should return a boolean value even when `customizer` does not', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    let actual: any = isEqualWith('a', 'b', stubC);\n    expect(actual).toBe(true);\n\n    const values = without(falsey, undefined);\n    const expected = values.map(stubFalse);\n\n    actual = [];\n    values.forEach(value => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      actual.push(isEqualWith('a', 'a', () => value));\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should ensure `customizer` is a function', () => {\n    const array = [1, 2, 3];\n    // eslint-disable-next-line\n    // @ts-ignore\n    const eq = (...args: any[]) => isEqualWith(array, ...args);\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = [array, [1, 0, 3]].map(eq);\n\n    expect(actual).toEqual([true, false]);\n  });\n\n  it('should call `customizer` for values maps and sets', () => {\n    const value = { a: { b: 2 } };\n\n    const map1 = new Map();\n    map1.set('a', value);\n\n    const map2 = new Map();\n    map2.set('a', value);\n\n    const set1 = new Set();\n    set1.add(value);\n\n    const set2 = new Set();\n    set2.add(value);\n\n    [\n      [map1, map2],\n      [set1, set2],\n    ].forEach((pair, index) => {\n      if (pair[0]) {\n        const argsList: any = [];\n        const array: any[] = Array.from(pair[0]);\n\n        const expected: any = [\n          [pair[0], pair[1], undefined, undefined, undefined],\n          [array[0], array[0], 0, array, array],\n          [array[0][0], array[0][0], 0, array[0], array[0]],\n          [array[0][1], array[0][1], 1, array[0], array[0]],\n        ];\n\n        if (index) {\n          expected.length = 2;\n        }\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        isEqualWith(pair[0], pair[1], function () {\n          const length = arguments.length;\n          // eslint-disable-next-line prefer-rest-params\n          const args = slice.call(arguments, 0, length - (length > 2 ? 1 : 0));\n\n          argsList.push(args);\n        });\n\n        expect(argsList).toEqual(expected);\n      }\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isEqualWith).toEqualTypeOf<typeof isEqualWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isEqualWith.ts",
    "content": "import { after } from '../../function/after.ts';\nimport { isEqualWith as isEqualWithToolkit } from '../../predicate/isEqualWith.ts';\nimport type { IsEqualCustomizer } from '../_internal/IsEqualCustomizer.ts';\n\n/**\n * Compares two values for equality using a custom comparison function.\n *\n * The custom function allows for fine-tuned control over the comparison process. If it returns a boolean, that result determines the equality. If it returns undefined, the function falls back to the default equality comparison.\n *\n * This function also uses the custom equality function to compare values inside objects,\n * arrays, maps, sets, and other complex structures, ensuring a deep comparison.\n *\n * This approach provides flexibility in handling complex comparisons while maintaining efficient default behavior for simpler cases.\n *\n * The custom comparison function can take up to six parameters:\n * - `x`: The value from the first object `a`.\n * - `y`: The value from the second object `b`.\n * - `property`: The property key used to get `x` and `y`.\n * - `xParent`: The parent of the first value `x`.\n * - `yParent`: The parent of the second value `y`.\n * - `stack`: An internal stack (Map) to handle circular references.\n *\n * @param {unknown} a - The first value to compare.\n * @param {unknown} b - The second value to compare.\n * @param {(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void} [areValuesEqual=noop] - A function to customize the comparison.\n *   If it returns a boolean, that result will be used. If it returns undefined,\n *   the default equality comparison will be used.\n * @returns {boolean} `true` if the values are equal according to the customizer, otherwise `false`.\n *\n * @example\n * const customizer = (a, b) => {\n *   if (typeof a === 'string' && typeof b === 'string') {\n *     return a.toLowerCase() === b.toLowerCase();\n *   }\n * };\n * isEqualWith('Hello', 'hello', customizer); // true\n * isEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n * isEqualWith([1, 2, 3], [1, 2, 3], customizer); // true\n */\nexport function isEqualWith(a: any, b: any, areValuesEqual?: IsEqualCustomizer): boolean {\n  if (typeof areValuesEqual !== 'function') {\n    areValuesEqual = () => undefined;\n  }\n\n  return isEqualWithToolkit(a, b, (...args): boolean | void => {\n    const result = areValuesEqual(...args);\n\n    if (result !== undefined) {\n      return Boolean(result);\n    }\n\n    if (a instanceof Map && b instanceof Map) {\n      return isEqualWith(\n        Array.from(a),\n        Array.from(b),\n        // areValuesEqual should not be called for converted values\n        after(2, areValuesEqual)\n      );\n    }\n\n    if (a instanceof Set && b instanceof Set) {\n      return isEqualWith(\n        Array.from(a),\n        Array.from(b),\n        // areValuesEqual should not be called for converted values\n        after(2, areValuesEqual)\n      );\n    }\n  });\n}\n"
  },
  {
    "path": "src/compat/predicate/isError.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isError as isErrorLodash } from 'lodash';\nimport { isError } from './isError';\n\ndescribe('isError', () => {\n  it('should return `true` for error objects', () => {\n    expect(isError(new Error())).toBe(true);\n  });\n\n  it(\"should return 'true' for subclassed values\", () => {\n    class CustomError extends Error {}\n    expect(isError(new CustomError())).toBe(true);\n  });\n\n  it(\"should return 'false' for non-error objects\", () => {\n    expect(isError({})).toBe(false);\n    expect(isError(null)).toBe(false);\n    expect(isError(undefined)).toBe(false);\n    expect(isError('')).toBe(false);\n    expect(isError(1)).toBe(false);\n    expect(isError(true)).toBe(false);\n    expect(isError(Symbol())).toBe(false);\n    expect(isError(() => {})).toBe(false);\n    expect(isError(new Date())).toBe(false);\n    expect(isError(new Map())).toBe(false);\n    expect(isError(new Set())).toBe(false);\n  });\n\n  it(\"should return 'false' for plain objects\", () => {\n    expect(isError({ name: 'Error', message: '' })).toBe(false);\n  });\n\n  it('should work with an error object from another realm', () => {\n    const realm = { error: new Error() };\n    expect(isError(realm.error)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isError).toEqualTypeOf<typeof isErrorLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isError.ts",
    "content": "import { getTag } from '../_internal/getTag.ts';\n\n/**\n * Checks if `value` is an Error object.\n *\n * @param {any} value The value to check.\n * @returns {value is Error} Returns `true` if `value` is an Error object, `false` otherwise.\n *\n * @example\n * ```typescript\n * console.log(isError(new Error())); // true\n * console.log(isError('Error')); // false\n * console.log(isError({ name: 'Error', message: '' })); // false\n * ```\n */\nexport function isError(value: any): value is Error {\n  return getTag(value) === '[object Error]';\n}\n"
  },
  {
    "path": "src/compat/predicate/isFinite.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isFinite as isFiniteLodash } from 'lodash';\nimport { isFinite } from './isFinite';\n\ndescribe('isFinite', () => {\n  it(\"should return 'true' for finite values\", () => {\n    expect(isFinite(1)).toBe(true);\n    expect(isFinite(1.123)).toBe(true);\n    expect(isFinite(-1)).toBe(true);\n  });\n\n  it(\"should return 'false' for not-finite values\", () => {\n    expect(isFinite(Infinity)).toBe(false);\n    expect(isFinite(-Infinity)).toBe(false);\n    expect(isFinite(NaN)).toBe(false);\n    expect(isFinite(Object(1))).toBe(false);\n  });\n\n  it(\"should return 'false' for non-numeric values\", () => {\n    expect(isFinite(undefined)).toBe(false);\n    expect(isFinite([])).toBe(false);\n    expect(isFinite(true)).toBe(false);\n    expect(isFinite('')).toBe(false);\n    expect(isFinite(' ')).toBe(false);\n    expect(isFinite('2px')).toBe(false);\n  });\n\n  it(\"should return 'false' for numeric string values\", () => {\n    expect(isFinite('2')).toBe(false);\n    expect(isFinite('0')).toBe(false);\n    expect(isFinite('Infinity')).toBe(false);\n    expect(isFinite('-1')).toBe(false);\n  });\n\n  it('should be compatible with lodash type', () => {\n    const lodashFn: typeof isFiniteLodash = isFinite;\n    expect(lodashFn(3)).toBe(true);\n    expect(lodashFn('3')).toBe(false);\n  });\n\n  it('should work as a type predicate', () => {\n    const value: unknown = 3;\n    if (isFinite(value)) {\n      expectTypeOf(value).toEqualTypeOf<number>();\n      expect(typeof value).toBe('number');\n    }\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isFinite.ts",
    "content": "/**\n * Checks if `value` is a finite number.\n *\n * Acts as a type guard for `number` values — returning `true` only when `value`\n * is of type `number` and finite (not `Infinity`, `-Infinity`, or `NaN`).\n *\n * @param {unknown} value The value to check.\n * @returns {value is number} Returns `true` if `value` is a finite number, `false` otherwise.\n *\n * @example\n * ```typescript\n * const value1 = 100;\n * const value2 = Infinity;\n * const value3 = '100';\n *\n * console.log(isFinite(value1)); // true\n * console.log(isFinite(value2)); // false\n * console.log(isFinite(value3)); // false\n *\n * if (isFinite(value1)) {\n *   console.log(value1.toFixed(2));\n * }\n * ```\n */\nexport function isFinite(value: unknown): value is number {\n  return Number.isFinite(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isFunction.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isFunction as isFunctionLodash } from 'lodash';\nimport { isFunction } from '../../predicate/isFunction';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('isFunction', () => {\n  it('should return `true` for functions', () => {\n    const slice = Array.prototype.slice;\n    expect(isFunction(slice)).toBe(true);\n  });\n\n  it('should return `true` for async functions', () => {\n    const asyncFunc = async function () {};\n    expect(isFunction(asyncFunc)).toBe(typeof asyncFunc === 'function');\n  });\n\n  it('should return `true` for generator functions', () => {\n    const genFunc = function* () {};\n    expect(isFunction(genFunc)).toBe(typeof genFunc === 'function');\n  });\n\n  it('should return `true` for the `Proxy` constructor', () => {\n    if (Proxy) {\n      expect(isFunction(Proxy)).toBe(true);\n    }\n  });\n\n  it('should return `true` for array view constructors', () => {\n    const arrayViews = [\n      Int8Array,\n      Uint8Array,\n      Uint8ClampedArray,\n      Int16Array,\n      Uint16Array,\n      Int32Array,\n      Uint32Array,\n      Float32Array,\n      Float64Array,\n      DataView,\n    ];\n    const funcTag = '[object Function]';\n\n    const expected = arrayViews.map(type => Object.prototype.toString.call(type) === funcTag);\n    const actual = arrayViews.map(isFunction);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-functions', () => {\n    const expected = falsey.map(() => false);\n\n    const actual = falsey.map(isFunction);\n\n    expect(actual).toEqual(expected);\n\n    expect(isFunction(args)).toBe(false);\n    expect(isFunction([1, 2, 3])).toBe(false);\n    expect(isFunction(true)).toBe(false);\n    expect(isFunction(new Date())).toBe(false);\n    expect(isFunction(new Error())).toBe(false);\n    expect(isFunction({ a: 1 })).toBe(false);\n    expect(isFunction(1)).toBe(false);\n    expect(isFunction(/x/)).toBe(false);\n    expect(isFunction('a')).toBe(false);\n    expect(isFunction(Symbol('a'))).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isFunction).toEqualTypeOf<typeof isFunctionLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isFunction.ts",
    "content": "/**\n * Checks if `value` is a function.\n *\n * @param {any} value The value to check.\n * @returns {value is (...args: any[]) => any} Returns `true` if `value` is a function, else `false`.\n *\n * @example\n * isFunction(Array.prototype.slice); // true\n * isFunction(async function () {}); // true\n * isFunction(function* () {}); // true\n * isFunction(Proxy); // true\n * isFunction(Int8Array); // true\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n  return typeof value === 'function';\n}\n"
  },
  {
    "path": "src/compat/predicate/isInteger.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isInteger as isIntegerLodash } from 'lodash';\nimport { isInteger } from './isInteger';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\nconst MAX_INTEGER = 1.7976931348623157e308;\n\ndescribe('isInteger function', () => {\n  it('checks if an int is an integer', () => {\n    const result = isInteger(1);\n    expect(result).toBe(true);\n  });\n\n  it('checks if a float is not an integer', () => {\n    const result = isInteger(1.1);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a BigInt is not an integer', () => {\n    const result = isInteger(1n);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a string is not an integer', () => {\n    const result = isInteger('1');\n    expect(result).toBe(false);\n  });\n\n  it('checks if an array is not an integer', () => {\n    const result = isInteger([]);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a NaN is not an integer', () => {\n    const result = isInteger(NaN);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a Infinity is not an integer', () => {\n    const result = isInteger(Infinity);\n    expect(result).toBe(false);\n  });\n\n  const func = isInteger;\n\n  it(`\\`isInteger\\` should return \\`true\\` for integer values`, () => {\n    const values = [-1, 0, 1];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => func(value));\n\n    expect(actual).toEqual(expected);\n    expect(func(MAX_INTEGER)).toBe(true);\n  });\n\n  it('should return `false` for non-integer number values', () => {\n    const values = [NaN, Infinity, -Infinity, Object(1), 3.14];\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(value => func(value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-numeric values', () => {\n    const expected = falsey.map(value => value === 0);\n\n    const actual = falsey.map((value, index) => (index ? func(value) : func()));\n\n    expect(actual).toEqual(expected);\n\n    expect(func(args)).toBe(false);\n    expect(func([1, 2, 3])).toBe(false);\n    expect(func(true)).toBe(false);\n    expect(func(new Date())).toBe(false);\n    expect(func(new Error())).toBe(false);\n    expect(func({ a: 1 })).toBe(false);\n    expect(func(/x/)).toBe(false);\n    expect(func('a')).toBe(false);\n    expect(func(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isInteger).toEqualTypeOf<typeof isIntegerLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isInteger.ts",
    "content": "/**\n * Checks if `value` is an integer.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.\n *\n * @param {any} value - The value to check\n * @returns {boolean} `true` if `value` is integer, otherwise `false`.\n *\n * @example\n * isInteger(3); // Returns: true\n * isInteger(Infinity); // Returns: false\n * isInteger('3'); // Returns: false\n * isInteger([]); // Returns: false\n */\nexport function isInteger(value?: any): boolean {\n  return Number.isInteger(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isLength.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isLength as isLengthLodash } from 'lodash';\nimport { isLength } from '../index';\n\n/**\n * @see https://github.com/lodash/lodash/blob/6a2cc1dfcf7634fea70d1bc5bd22db453df67b42/test/isLength.spec.js#L1\n */\ndescribe('isLength', () => {\n  it('should return `true` for lengths', () => {\n    const values = [0, 3, Number.MAX_SAFE_INTEGER];\n    const expected = values.map(() => true);\n    const actual = values.map(isLength);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-lengths', () => {\n    const values = [-1, '1', 1.1, Number.MAX_SAFE_INTEGER + 1];\n    const expected = values.map(() => false);\n    const actual = values.map(isLength);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isLength).toEqualTypeOf<typeof isLengthLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isLength.ts",
    "content": "/**\n * Checks if a given value is a valid length.\n *\n * A valid length is of type `number`, is a non-negative integer, and is less than or equal to\n * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).\n * It returns `true` if the value is a valid length, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the\n * argument to a valid length (`number`).\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n *\n * @example\n * isLength(0); // true\n * isLength(42); // true\n * isLength(-1); // false\n * isLength(1.5); // false\n * isLength(Number.MAX_SAFE_INTEGER); // true\n * isLength(Number.MAX_SAFE_INTEGER + 1); // false\n */\nexport function isLength(value?: any): boolean {\n  return Number.isSafeInteger(value) && (value as number) >= 0;\n}\n"
  },
  {
    "path": "src/compat/predicate/isMap.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isMap as isMapLodash } from 'lodash';\nimport { isMap } from './isMap';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { weakMap } from '../_internal/weakMap';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isMap', () => {\n  it('should return `true` for maps', () => {\n    expect(isMap(new Map())).toBe(true);\n  });\n\n  it('returns false if the value is not a Map', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map((value, index) => (index ? isMap(value) : isMap()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isMap(args)).toBe(false);\n    expect(isMap([1, 2, 3])).toBe(false);\n    expect(isMap(true)).toBe(false);\n    expect(isMap(new Date())).toBe(false);\n    expect(isMap(new Error())).toBe(false);\n    expect(isMap(slice)).toBe(false);\n    expect(isMap({ a: 1 })).toBe(false);\n    expect(isMap(1)).toBe(false);\n    expect(isMap(/x/)).toBe(false);\n    expect(isMap('a')).toBe(false);\n    expect(isMap(symbol)).toBe(false);\n    expect(isMap(weakMap)).toBe(false);\n  });\n\n  it('should work for objects with a non-function `constructor` (test in IE 11)', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map(value => isMap({ constructor: value }));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isMap).toEqualTypeOf<typeof isMapLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isMap.ts",
    "content": "import { isMap as isMapToolKit } from '../../predicate/isMap.ts';\n\n/**\n * Checks if a given value is `Map`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Map`.\n *\n * @param {unknown} value The value to check if it is a `Map`.\n * @returns {value is Map<any, any>} Returns `true` if `value` is a `Map`, else `false`.\n *\n * @example\n * const value1 = new Map();\n * const value2 = new Set();\n * const value3 = new WeakMap();\n *\n * console.log(isMap(value1)); // true\n * console.log(isMap(value2)); // false\n * console.log(isMap(value3)); // false\n */\n\nexport function isMap(value?: any): value is Map<any, any> {\n  return isMapToolKit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isMatch.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isMatch as isMatchLodash } from 'lodash';\nimport { isMatch } from './isMatch';\nimport { noop } from '../../function/noop';\nimport { empties } from '../_internal/empties';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('isMatch', () => {\n  it('should handle null correctly', () => {\n    expect(isMatch({ a: { b: 1 } }, { a: { b: null } })).toBe(false);\n    expect(isMatch({ a: { b: 1 } }, { a: null })).toBe(false);\n    expect(isMatch({ a: 1 }, { a: null })).toBe(false);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch({ a: 1 }, null)).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(null, { a: 1 })).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(null, null)).toBe(true);\n  });\n\n  it(`should perform a deep comparison between \\`source\\` and \\`object\\``, () => {\n    const object = { a: 1, b: 2, c: 3 };\n\n    expect(isMatch(object, { a: 1 })).toBe(true);\n    expect(isMatch(object, { b: 2 })).toBe(true);\n    expect(isMatch(object, { a: 1, c: 3 })).toBe(true);\n    expect(isMatch(object, { c: 3, d: 4 })).toBe(false);\n    expect(isMatch({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 }, { a: { b: { c: 1 } } })).toBe(true);\n  });\n\n  it(`should match boolean values`, () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(true, true)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(false, true)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(true, false)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatch(false, false)).toBe(true);\n  });\n\n  it(`should match inherited string keyed \\`object\\` properties`, () => {\n    interface Foo {\n      a: number;\n      b: number;\n    }\n\n    interface FooConstructor {\n      new (): Foo;\n    }\n\n    const Foo = function Foo(this: Foo) {\n      this.a = 1;\n    } as any as FooConstructor;\n\n    Foo.prototype.b = 2;\n\n    const object = { a: new Foo() };\n    expect(isMatch(object, { a: { b: 2 } })).toBe(true);\n  });\n\n  it(`should not match by inherited \\`source\\` properties`, () => {\n    interface Foo {\n      a: number;\n      b: number;\n    }\n\n    interface FooConstructor {\n      new (): Foo;\n    }\n\n    const Foo = function Foo(this: Foo) {\n      this.a = 1;\n    } as any as FooConstructor;\n\n    Foo.prototype.b = 2;\n\n    const objects = [{ a: 1 }, { a: 1, b: 2 }];\n    const source = new Foo();\n    const actual = objects.map(object => isMatch(object, source));\n    const expected = objects.map(stubTrue);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should compare a variety of \\`source\\` property values`, () => {\n    const object1 = { a: false, b: true, c: '3', d: 4, e: [5], f: { g: 6 } };\n    const object2 = { a: 0, b: 1, c: 3, d: '4', e: ['5'], f: { g: '6' } };\n\n    expect(isMatch(object1, object1)).toBe(true);\n    expect(isMatch(object2, object1)).toBe(false);\n  });\n\n  it(`should match \\`-0\\` as \\`0\\``, () => {\n    const object1 = { a: -0 };\n    const object2 = { a: 0 };\n\n    expect(isMatch(object2, object1)).toBe(true);\n    expect(isMatch(object1, object2)).toBe(true);\n  });\n\n  it(`should compare functions by reference`, () => {\n    const object1 = { a: noop };\n    const object2 = { a: () => {} };\n    const object3 = { a: {} };\n\n    expect(isMatch(object1, object1)).toBe(true);\n    expect(isMatch(object2, object1)).toBe(false);\n    expect(isMatch(object3, object1)).toBe(false);\n  });\n\n  it(`should work with a function for \\`object\\``, () => {\n    function Foo() {}\n    Foo.a = { b: 2, c: 3 };\n\n    expect(isMatch(Foo, { a: { b: 2 } })).toBe(true);\n  });\n\n  it(`should work with a function for \\`source\\``, () => {\n    function Foo() {}\n    Foo.a = 1;\n    Foo.b = function () {};\n    Foo.c = 3;\n\n    const objects = [{ a: 1 }, { a: 1, b: Foo.b, c: 3 }];\n    const actual = objects.map(object => isMatch(object, Foo));\n\n    expect(actual).toEqual([false, true]);\n  });\n\n  it(`should work with a non-plain \\`object\\``, () => {\n    interface Foo {\n      a: number;\n      b: number;\n      c: number;\n    }\n\n    interface FooConstructor {\n      new (arg: Partial<Foo>): Foo;\n    }\n\n    const Foo = function Foo(this: Foo, object: Partial<Foo>) {\n      Object.assign(this, object);\n    } as any as FooConstructor;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object = new Foo({ a: new Foo({ b: 2, c: 3 }) });\n\n    expect(isMatch(object, { a: { b: 2 } })).toBe(true);\n  });\n\n  it(`should partial match arrays`, () => {\n    const objects = [{ a: ['b'] }, { a: ['c', 'd'] }];\n    let actual = objects.filter(x => isMatch(x, { a: ['d'] }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    actual = objects.filter(x => isMatch(x, { a: ['b', 'd'] }));\n    expect(actual).toEqual([]);\n\n    actual = objects.filter(x => isMatch(x, { a: ['d', 'b'] }));\n    expect(actual).toEqual([]);\n  });\n\n  it(`should partial match arrays with duplicate values`, () => {\n    const objects = [{ a: [1, 2] }, { a: [2, 2] }];\n    const actual = objects.filter(x => isMatch(x, { a: [2, 2] }));\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it('should partial match arrays of objects', () => {\n    const objects = [\n      {\n        a: [\n          { b: 1, c: 2 },\n          { b: 4, c: 5, d: 6 },\n        ],\n      },\n      {\n        a: [\n          { b: 1, c: 2 },\n          { b: 4, c: 6, d: 7 },\n        ],\n      },\n    ];\n\n    const actual = objects.filter(x => isMatch(x, { a: [{ b: 1 }, { b: 4, c: 5 }] }));\n    expect(actual).toEqual([objects[0]]);\n  });\n\n  it(`should partial match maps`, () => {\n    const objects = [{ a: new Map() }, { a: new Map() }];\n    objects[0].a.set('a', 1);\n    objects[1].a.set('a', 1);\n    objects[1].a.set('b', 2);\n\n    const map = new Map();\n    map.set('b', 2);\n    let actual = objects.filter(x => isMatch(x, { a: map }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    map.delete('b');\n    actual = objects.filter(x => isMatch(x, { a: map }));\n\n    expect(actual).toEqual(objects);\n\n    map.set('c', 3);\n    actual = objects.filter(x => isMatch(x, { a: map }));\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should partial match sets`, () => {\n    const objects = [{ a: new Set() }, { a: new Set() }];\n    objects[0].a.add(1);\n    objects[1].a.add(1);\n    objects[1].a.add(2);\n\n    const set = new Set();\n    set.add(2);\n    let actual = objects.filter(x => isMatch(x, { a: set }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    set.delete(2);\n    actual = objects.filter(x => isMatch(x, { a: set }));\n\n    expect(actual).toEqual(objects);\n\n    set.add(3);\n    actual = objects.filter(x => isMatch(x, { a: set }));\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should match \\`undefined\\` values`, () => {\n    const objects1 = [{ a: 1 }, { a: 1, b: 1 }, { a: 1, b: undefined }];\n    const actual1 = objects1.map(x => isMatch(x, { b: undefined }));\n    const expected1 = [false, false, true];\n\n    expect(actual1).toEqual(expected1);\n\n    const objects2 = [{ a: 1 }, { a: 1, b: 1 }, { a: 1, b: undefined }];\n    const actual2 = objects2.map(x => isMatch(x, { a: 1, b: undefined }));\n    const expected2 = [false, false, true];\n\n    expect(actual2).toEqual(expected2);\n\n    const objects3 = [\n      { a: { b: 2 } },\n      { a: { b: 2, c: 3 } },\n      {\n        a: { b: 2, c: undefined },\n      },\n    ];\n    const actual3 = objects3.map(x => isMatch(x, { a: { c: undefined } }));\n    const expected3 = [false, false, true];\n\n    expect(actual3).toEqual(expected3);\n  });\n\n  it(`should match \\`undefined\\` values on primitives`, () => {\n    const numberProto = Number.prototype;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.a = 1;\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.b = undefined;\n\n    try {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      expect(isMatch(1, { b: undefined })).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    try {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      expect(isMatch(1, { a: 1, b: undefined })).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.a = { b: 1, c: undefined };\n    try {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      expect(isMatch(1, { a: { c: undefined } })).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete numberProto.a;\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete numberProto.b;\n  });\n\n  it(`should return \\`false\\` when \\`object\\` is nullish`, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => false);\n\n    const actual = values.map((value, index) => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return index ? isMatch(value, { a: 1 }) : isMatch(undefined, { a: 1 });\n      } catch (e: unknown) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing an empty \\`source\\``, () => {\n    const object = { a: 1 };\n    const expected = empties.map(stubTrue);\n\n    const actual = empties.map(value => {\n      return isMatch(object, value);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing an empty \\`source\\` to a nullish \\`object\\``, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map((value, index) => {\n      try {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return index ? isMatch(value, {}) : isMatch(undefined, {});\n      } catch (e: unknown) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing a \\`source\\` of empty arrays and objects`, () => {\n    const objects = [\n      { a: [1], b: { c: 1 } },\n      { a: [2, 3], b: { d: 2 } },\n    ];\n    const actual = objects.filter(x => isMatch(x, { a: [], b: {} }));\n\n    expect(actual).toEqual(objects);\n  });\n\n  it('should return `false` when object matcher has only undefined values for keys', () => {\n    expect(\n      isMatch(\n        {\n          label: 'Foo',\n          value: 'foo',\n        },\n        { value: { missingKey: undefined } }\n      )\n    ).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isMatch).toEqualTypeOf<typeof isMatchLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isMatch.ts",
    "content": "import { isMatchWith } from './isMatchWith.ts';\n\n/**\n * Checks if the target matches the source by comparing their structures and values.\n * This function supports deep comparison for objects, arrays, maps, and sets.\n *\n * @param {object} target - The target value to match against.\n * @param {object} source - The source value to match with.\n * @returns {boolean} - Returns `true` if the target matches the source, otherwise `false`.\n *\n * @example\n * // Basic usage\n * isMatch({ a: 1, b: 2 }, { a: 1 }); // true\n *\n * @example\n * // Matching arrays\n * isMatch([1, 2, 3], [1, 2, 3]); // true\n *\n * @example\n * // Matching maps\n * const targetMap = new Map([['key1', 'value1'], ['key2', 'value2']]);\n * const sourceMap = new Map([['key1', 'value1']]);\n * isMatch(targetMap, sourceMap); // true\n *\n * @example\n * // Matching sets\n * const targetSet = new Set([1, 2, 3]);\n * const sourceSet = new Set([1, 2]);\n * isMatch(targetSet, sourceSet); // true\n */\nexport function isMatch(target: object, source: object): boolean {\n  return isMatchWith(target, source, () => undefined);\n}\n"
  },
  {
    "path": "src/compat/predicate/isMatchWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport * as lodashStable from 'es-toolkit/compat';\nimport type { isMatchWith as isMatchWithLodash } from 'lodash';\nimport { isMatchWith } from './isMatchWith.ts';\nimport { last } from '../../array/last.ts';\nimport { partial } from '../../function/partial.ts';\nimport { falsey } from '../_internal/falsey.ts';\nimport { stubA } from '../_internal/stubA.ts';\nimport { stubFalse } from '../util/stubFalse.ts';\nimport { stubTrue } from '../util/stubTrue.ts';\n\ndescribe('isMatchWith', () => {\n  it('should provide correct `customizer` arguments', () => {\n    const argsList: unknown[] = [];\n    const object1: any = { a: [1, 2], b: null };\n    const object2: any = { a: [1, 2], b: null };\n\n    object1.b = object2;\n    object2.b = object1;\n\n    const expected = [\n      [object1.a, object2.a, 'a', object1, object2],\n      [object1.a[0], object2.a[0], 0, object1.a, object2.a],\n      [object1.a[1], object2.a[1], 1, object1.a, object2.a],\n      [object1.b, object2.b, 'b', object1, object2],\n      [object1.b.a, object2.b.a, 'a', object1.b, object2.b],\n      [object1.b.a[0], object2.b.a[0], 0, object1.b.a, object2.b.a],\n      [object1.b.a[1], object2.b.a[1], 1, object1.b.a, object2.b.a],\n      [object1.b.b, object2.b.b, 'b', object1.b, object2.b],\n    ];\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    isMatchWith(object1, object2, function () {\n      // eslint-disable-next-line prefer-rest-params\n      argsList.push(Array.prototype.slice.call(arguments, 0, -1));\n    });\n\n    expect(argsList).toEqual(expected);\n  });\n\n  it('should handle comparisons when `customizer` returns `undefined`', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1 }, { a: 1 })).toBe(true);\n  });\n\n  it('should not handle comparisons when `customizer` returns `true`', () => {\n    const customizer = function (value: unknown) {\n      return typeof value === 'string' || undefined;\n    };\n\n    expect(isMatchWith(['a'], ['b'], customizer)).toBe(true);\n    expect(isMatchWith({ 0: 'a' }, { 0: 'b' }, customizer)).toBe(true);\n  });\n\n  it('should not handle comparisons when `customizer` returns `false`', () => {\n    const customizer = function (value: unknown) {\n      return typeof value === 'string' ? false : undefined;\n    };\n\n    expect(isMatchWith(['a'], ['a'], customizer)).toBe(false);\n    expect(isMatchWith({ 0: 'a' }, { 0: 'a' }, customizer)).toBe(false);\n  });\n\n  it('should return a boolean value even when `customizer` does not', () => {\n    const object = { a: 1 };\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = isMatchWith(object, { a: 1 }, stubA);\n\n    expect(actual).toBe(true);\n\n    const expected = lodashStable.map(falsey, stubFalse);\n\n    const actualArray: boolean[] = [];\n    lodashStable.each(falsey, (value: unknown) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      actualArray.push(isMatchWith(object, { a: 2 }, lodashStable.constant(value)));\n    });\n\n    expect(actualArray).toEqual(expected);\n  });\n\n  it('should provide `stack` to `customizer`', () => {\n    let actual: unknown;\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    isMatchWith({ a: 1 }, { a: 1 }, function (...args: unknown[]) {\n      actual = last(args);\n    });\n\n    expect(actual && typeof actual.constructor === 'function').toBe(true);\n  });\n\n  it('should ensure `customizer` is a function', () => {\n    const object = { a: 1 };\n    const matches = partial(isMatchWith, object);\n    const actual = lodashStable.map([object, { a: 2 }], matches);\n\n    expect(actual).toEqual([true, false]);\n  });\n\n  it('should call `customizer` for values maps and sets', () => {\n    const value = { a: { b: 2 } };\n\n    let map1: Map<string, unknown> | undefined;\n    let map2: Map<string, unknown> | undefined;\n    let set1: Set<unknown> | undefined;\n    let set2: Set<unknown> | undefined;\n\n    if (Map) {\n      map1 = new Map();\n      map1.set('a', value);\n\n      map2 = new Map();\n      map2.set('a', value);\n    }\n    if (Set) {\n      set1 = new Set();\n      set1.add(value);\n\n      set2 = new Set();\n      set2.add(value);\n    }\n    lodashStable.each(\n      [\n        [map1, map2],\n        [set1, set2],\n      ],\n      (pair: any) => {\n        if (pair[0]) {\n          const argsList: any[] = [];\n\n          const minimumExpectedCalls = 2;\n\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-expect-error\n          isMatchWith({ a: pair[0] }, { a: pair[1] }, function (...args: unknown[]) {\n            argsList.push(args.slice(0, -1));\n          });\n\n          expect(argsList.length).toBeGreaterThanOrEqual(minimumExpectedCalls);\n          expect(argsList[0][0]).toBe(pair[0]);\n          expect(argsList[0][1]).toBe(pair[1]);\n          expect(argsList[0][2]).toBe('a');\n        }\n      }\n    );\n  });\n\n  it('should handle primitive value comparisons', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(1, 1)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(1, 2)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith('a', 'a')).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith('a', 'b')).toBe(false);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, 0)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, false)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, null)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, 'abc')).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, 123)).toBe(true);\n  });\n\n  it('should handle arrays', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([1, 2, 3], [1, 2])).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([1, 2], [1, 2, 3])).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, [1, 2])).toBe(false);\n    expect(isMatchWith([{ id: 1 }, { id: 2 }, { id: 3 }], [{ id: 1 }, { id: 99 }], stubFalse)).toBe(false);\n\n    const customizer = (objValue: unknown, srcValue: unknown) => (objValue === 1 && srcValue === 1 ? false : undefined);\n    expect(isMatchWith([1, 2, 3], [1], customizer)).toBe(false);\n\n    const indexCustomizer = (objValue: unknown, srcValue: unknown, key: unknown) =>\n      key === 0 && objValue === 2 && srcValue === 2 ? false : undefined;\n    expect(isMatchWith([1, 2, 3], [2], indexCustomizer)).toBe(false);\n  });\n\n  it('should handle Map', () => {\n    const map1 = new Map([['a', 1]]);\n    const map2 = new Map([['a', 1]]);\n    const map3 = new Map([['a', 2]]);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(map1, map2)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(map1, map3)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, new Map())).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Map([['a', 1]]), new Map([['b', 2]]))).toBe(false);\n\n    const keyTrueCustomizer = (objValue: any, srcValue: any, key: any) => (key === 'a' ? true : undefined);\n    const keyFalseCustomizer = (objValue: any, srcValue: any, key: any) => (key === 'a' ? false : undefined);\n\n    expect(isMatchWith(map1, map3, keyTrueCustomizer)).toBe(true);\n    expect(isMatchWith(map1, map3, keyFalseCustomizer)).toBe(false);\n\n    expect(\n      isMatchWith(\n        new Map([\n          ['a', 1],\n          ['b', 2],\n        ]),\n        new Map([\n          ['a', 3],\n          ['b', 4],\n        ]),\n        stubFalse\n      )\n    ).toBe(false);\n  });\n\n  it('should handle Set', () => {\n    const set1 = new Set([1, 2]);\n    const set2 = new Set([1, 2]);\n    const set3 = new Set([1, 3]);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(set1, set2)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(set1, set3)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, new Set())).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Set([1]), new Set([1, 2, 3]))).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Set([1, 2]), new Set([99]))).toBe(false);\n\n    const valueCustomizer = (objValue: any, srcValue: any) => (objValue === 1 && srcValue === 3 ? true : undefined);\n    expect(isMatchWith(new Set([1, 2]), new Set([3]), valueCustomizer)).toBe(true);\n    expect(isMatchWith(new Set([1, 2]), new Set([3, 4]), stubFalse)).toBe(false);\n    expect(isMatchWith(new Set([1, 2, 3]), new Set([1]), stubFalse)).toBe(false);\n  });\n\n  it('should handle functions', () => {\n    function fn1() {}\n    function fn2() {}\n    fn1.a = 1;\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(fn1, fn2)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(fn1, { a: 1 })).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, fn1)).toBe(false);\n\n    const fnWithProps = function () {};\n    fnWithProps.prop1 = 'value1';\n    fnWithProps.prop2 = 'value2';\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ prop1: 'value1', prop2: 'value2' }, fnWithProps)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(fnWithProps, { prop1: 'value1' })).toBe(true);\n  });\n\n  it('should handle null and undefined', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1 }, null)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(null, null)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(undefined, null)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(null, { a: 1 })).toBe(false);\n  });\n\n  it('should handle object property matching', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1, b: 2 }, { a: 1 })).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1 }, { b: 2 })).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1, b: { c: 2 } }, { a: 1, b: { c: 2 } })).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: undefined }, { a: undefined })).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: null }, { a: null })).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1 }, { a: undefined })).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ a: 1 }, { a: null })).toBe(false);\n\n    const rootCustomizer = (objValue: unknown, srcValue: unknown, key: unknown) => (key === 'root' ? true : undefined);\n    expect(isMatchWith({}, {}, rootCustomizer)).toBe(true);\n  });\n\n  it('should handle empty collections', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([1, 2, 3], [])).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([], [])).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, [])).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ arr: [1, 2, 3] }, { arr: [] })).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({ arr: [] }, { arr: [] })).toBe(true);\n\n    const customizer = () => undefined;\n    expect(isMatchWith([1, 2, 3], [], customizer)).toBe(true);\n    expect(isMatchWith([], [], customizer)).toBe(true);\n\n    expect(isMatchWith([1, 2, 3], [], stubTrue)).toBe(true);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Map([['a', 1]]), new Map())).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([], new Map())).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, new Set())).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(123, new Set())).toBe(true);\n  });\n\n  it('should handle Map with customizer returning undefined and mismatched values', () => {\n    const map1 = new Map([\n      ['a', { x: 1 }],\n      ['b', { y: 2 }],\n    ]);\n    const map2 = new Map([\n      ['a', { x: 2 }],\n      ['b', { y: 3 }],\n    ]);\n\n    const customizer = (objValue: unknown, srcValue: unknown) => {\n      if (typeof objValue === 'object' && typeof srcValue === 'object') {\n        return;\n      }\n    };\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(map1, map2, customizer)).toBe(false);\n  });\n\n  it('should handle type mismatches', () => {\n    const source = new Map([['key', 'value']]);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([], source)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, source)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith('string', source)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(123, source)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Set(), source)).toBe(false);\n\n    const setSource = new Set([1, 2, 3]);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([], setSource)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith({}, setSource)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith('string', setSource)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(123, setSource)).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Map(), setSource)).toBe(false);\n  });\n\n  it('should handle comparisons without customizer', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(new Map([['a', { nested: 1 }]]), new Map([['a', { nested: 2 }]]))).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith([{ id: 1 }, { id: 2 }, { id: 3 }], [{ id: 2 }])).toBe(true);\n\n    const map1 = new Map([\n      ['key1', { nested: 'value1' }],\n      ['key2', { nested: 'value2' }],\n    ]);\n    const map2 = new Map([\n      ['key1', { nested: 'value1' }],\n      ['key2', { nested: 'value2' }],\n    ]);\n    const map3 = new Map([\n      ['key1', { nested: 'value1' }],\n      ['key2', { nested: 'different' }],\n    ]);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(map1, map2)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(map1, map3)).toBe(false);\n  });\n\n  it('should match when source is empty object and target is primitive', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(42, {})).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isMatchWith(42, {}, lodashStable.noop)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isMatchWith).toEqualTypeOf<typeof isMatchWithLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isMatchWith.ts",
    "content": "import { isObject } from './isObject.ts';\nimport { isPrimitive } from '../../predicate/isPrimitive.ts';\nimport type { IsMatchWithCustomizer } from '../_internal/IsMatchWithCustomizer.ts';\nimport { eq } from '../util/eq.ts';\n\n/**\n * Performs a deep comparison between a target value and a source pattern to determine if they match,\n * using a custom comparison function for fine-grained control over the matching logic.\n *\n * @param {object} target - The value to be tested for matching\n * @param {object} source - The pattern/template to match against\n * @param {IsMatchWithCustomizer} compare - Custom comparison function for fine-grained control\n * @returns {boolean} `true` if the target matches the source pattern, `false` otherwise\n *\n * @example\n * // Basic matching with custom comparator\n * const caseInsensitiveCompare = (objVal, srcVal) => {\n *   if (typeof objVal === 'string' && typeof srcVal === 'string') {\n *     return objVal.toLowerCase() === srcVal.toLowerCase();\n *   }\n *   return undefined;\n * };\n *\n * isMatchWith(\n *   { name: 'JOHN', age: 30 },\n *   { name: 'john' },\n *   caseInsensitiveCompare\n * ); // true\n */\nexport function isMatchWith(target: object, source: object, compare: IsMatchWithCustomizer): boolean;\n\n/**\n * Performs a deep comparison between a target value and a source pattern to determine if they match,\n * using a custom comparison function for fine-grained control over the matching logic.\n *\n * This function recursively traverses both values, calling the custom compare function for each\n * property/element pair. If the compare function returns a boolean, that result is used directly.\n * If it returns undefined, the default matching behavior continues recursively.\n *\n * The matching behavior varies by data type:\n * - **Objects**: Matches if all properties in the source exist in the target and match\n * - **Arrays**: Matches if all elements in the source array can be found in the target array (order-independent)\n * - **Maps**: Matches if all key-value pairs in the source Map exist and match in the target Map\n * - **Sets**: Matches if all elements in the source Set can be found in the target Set\n * - **Functions**: Matches using strict equality, or object comparison if the function has properties\n * - **Primitives**: Matches using strict equality\n *\n * Special cases:\n * - Empty objects, arrays, Maps, and Sets always match any target\n * - `null` and `undefined` source values have specific matching rules\n * - Circular references are handled using an internal stack to prevent infinite recursion\n *\n * @param {object} target - The value to be tested for matching\n * @param {object} source - The pattern/template to match against\n * @param {function} [compare] - Optional custom comparison function that receives:\n *   - `objValue` - The value from the target at the current path\n *   - `srcValue` - The value from the source at the current path\n *   - `key` - The property key or array index being compared\n *   - `object` - The parent object/array from the target\n *   - `source` - The parent object/array from the source\n *   - `stack` - Internal Map used for circular reference detection\n *   Should return `true` for a match, `false` for no match, or `undefined` to continue with default behavior\n *\n * @returns {boolean} `true` if the target matches the source pattern, `false` otherwise\n *\n * @example\n * // Basic matching without custom comparator\n * isMatchWith({ a: 1, b: 2 }, { a: 1 }); // true\n * isMatchWith([1, 2, 3], [1, 3]); // true\n *\n * @example\n * // Custom comparison for case-insensitive string matching\n * const caseInsensitiveCompare = (objVal, srcVal) => {\n *   if (typeof objVal === 'string' && typeof srcVal === 'string') {\n *     return objVal.toLowerCase() === srcVal.toLowerCase();\n *   }\n *   return undefined; // Use default behavior for non-strings\n * };\n *\n * isMatchWith(\n *   { name: 'JOHN', age: 30 },\n *   { name: 'john' },\n *   caseInsensitiveCompare\n * ); // true\n *\n * @example\n * // Custom comparison for range matching\n * const rangeCompare = (objVal, srcVal, key) => {\n *   if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n *     return objVal >= srcVal.min && objVal <= srcVal.max;\n *   }\n *   return undefined;\n * };\n *\n * isMatchWith(\n *   { name: 'John', age: 25 },\n *   { age: { min: 18, max: 30 } },\n *   rangeCompare\n * ); // true\n */\nexport function isMatchWith(\n  target: object,\n  source: object,\n  compare: (\n    value: any,\n    other: any,\n    indexOrKey: PropertyKey,\n    object: object,\n    source: object,\n    stack?: Map<any, any>\n  ) => boolean | undefined\n): boolean {\n  if (typeof compare !== 'function') {\n    return isMatchWith(target, source, () => undefined);\n  }\n\n  return isMatchWithInternal(\n    target,\n    source,\n    function doesMatch(objValue, srcValue, key, object, source, stack): boolean | undefined {\n      const isEqual = compare(objValue, srcValue, key, object, source, stack);\n\n      if (isEqual !== undefined) {\n        return Boolean(isEqual);\n      }\n\n      return isMatchWithInternal(objValue, srcValue, doesMatch, stack);\n    },\n    new Map()\n  );\n}\n\nfunction isMatchWithInternal(\n  target: any,\n  source: any,\n  compare: (\n    objValue: any,\n    srcValue: any,\n    key: PropertyKey,\n    object: any,\n    source: any,\n    stack?: Map<any, any>\n  ) => boolean | undefined,\n  stack?: Map<any, any>\n): boolean {\n  if (source === target) {\n    return true;\n  }\n\n  switch (typeof source) {\n    case 'object': {\n      return isObjectMatch(target, source, compare, stack);\n    }\n    case 'function': {\n      const sourceKeys = Object.keys(source);\n\n      if (sourceKeys.length > 0) {\n        return isMatchWithInternal(target, { ...source }, compare, stack);\n      }\n\n      return eq(target, source);\n    }\n    default: {\n      if (!isObject(target)) {\n        return eq(target, source);\n      }\n\n      if (typeof source === 'string') {\n        return source === '';\n      }\n\n      return true;\n    }\n  }\n}\n\nfunction isObjectMatch(\n  target: any,\n  source: any,\n  compare: (\n    objValue: any,\n    srcValue: any,\n    key: PropertyKey,\n    object: any,\n    source: any,\n    stack?: Map<any, any>\n  ) => boolean | undefined,\n  stack: Map<any, any> | undefined\n): boolean {\n  if (source == null) {\n    return true;\n  }\n\n  if (Array.isArray(source)) {\n    return isArrayMatch(target, source, compare, stack);\n  }\n\n  if (source instanceof Map) {\n    return isMapMatch(target, source, compare, stack);\n  }\n\n  if (source instanceof Set) {\n    return isSetMatch(target, source, compare, stack);\n  }\n\n  const keys = Object.keys(source as any);\n\n  if (target == null || isPrimitive(target)) {\n    return keys.length === 0;\n  }\n\n  if (keys.length === 0) {\n    return true;\n  }\n\n  if (stack?.has(source)) {\n    return stack.get(source) === target;\n  }\n\n  stack?.set(source, target);\n\n  try {\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n\n      if (!isPrimitive(target) && !(key in target)) {\n        return false;\n      }\n\n      if (source[key] === undefined && target[key] !== undefined) {\n        return false;\n      }\n\n      if (source[key] === null && target[key] !== null) {\n        return false;\n      }\n\n      const isEqual = compare(target[key], source[key], key, target, source, stack);\n\n      if (!isEqual) {\n        return false;\n      }\n    }\n\n    return true;\n  } finally {\n    stack?.delete(source);\n  }\n}\n\nfunction isMapMatch(\n  target: unknown,\n  source: Map<any, any>,\n  compare: (\n    objValue: any,\n    srcValue: any,\n    key: PropertyKey,\n    object: any,\n    source: any,\n    stack?: Map<any, any>\n  ) => boolean | undefined,\n  stack: Map<any, any> | undefined\n): boolean {\n  if (source.size === 0) {\n    return true;\n  }\n\n  if (!(target instanceof Map)) {\n    return false;\n  }\n\n  for (const [key, sourceValue] of source.entries()) {\n    const targetValue = target.get(key);\n\n    const isEqual = compare(targetValue, sourceValue, key, target, source, stack);\n\n    if (isEqual === false) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction isArrayMatch(\n  target: unknown,\n  source: readonly unknown[],\n  compare: (\n    objValue: any,\n    srcValue: any,\n    key: PropertyKey,\n    object: any,\n    source: any,\n    stack?: Map<any, any>\n  ) => boolean | undefined,\n  stack: Map<any, any> | undefined\n): boolean {\n  if (source.length === 0) {\n    return true;\n  }\n\n  if (!Array.isArray(target)) {\n    return false;\n  }\n\n  const countedIndex = new Set<number>();\n\n  for (let i = 0; i < source.length; i++) {\n    const sourceItem = source[i];\n    let found = false;\n\n    for (let j = 0; j < target.length; j++) {\n      if (countedIndex.has(j)) {\n        continue;\n      }\n\n      const targetItem = target[j];\n      let matches = false;\n\n      const isEqual = compare(targetItem, sourceItem, i, target, source, stack);\n\n      if (isEqual) {\n        matches = true;\n      }\n\n      if (matches) {\n        countedIndex.add(j);\n        found = true;\n        break;\n      }\n    }\n\n    if (!found) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nexport function isSetMatch(\n  target: unknown,\n  source: Set<any>,\n  compare: (\n    objValue: any,\n    srcValue: any,\n    key: PropertyKey,\n    object: any,\n    source: any,\n    stack?: Map<any, any>\n  ) => boolean | undefined,\n  stack?: Map<any, any>\n): boolean {\n  if (source.size === 0) {\n    return true;\n  }\n\n  if (!(target instanceof Set)) {\n    return false;\n  }\n\n  return isArrayMatch([...target], [...source], compare, stack);\n}\n"
  },
  {
    "path": "src/compat/predicate/isNaN.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isNaN as isNaNLodash } from 'lodash';\nimport { isNaN } from './isNaN';\n\ndescribe('isNaN', () => {\n  it('should return `true` for NaN', () => {\n    expect(isNaN(NaN)).toBe(true);\n  });\n\n  it('should return `false` for non-NaN numbers', () => {\n    expect(isNaN(0)).toBe(false);\n  });\n\n  it('should return `false` for non-numbers', () => {\n    expect(isNaN('NaN')).toBe(false);\n    expect(isNaN(true)).toBe(false);\n    expect(isNaN(null)).toBe(false);\n    expect(isNaN(undefined)).toBe(false);\n    expect(isNaN({})).toBe(false);\n    expect(isNaN([])).toBe(false);\n    expect(isNaN(() => {})).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isNaN).toEqualTypeOf<typeof isNaNLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isNaN.ts",
    "content": "/**\n * Checks if the value is NaN.\n *\n * @param {any} value - The value to check.\n * @returns {boolean} `true` if the value is NaN, `false` otherwise.\n *\n * @example\n * isNaN(NaN); // true\n * isNaN(0); // false\n * isNaN('NaN'); // false\n * isNaN(undefined); // false\n */\nexport function isNaN(value?: any): boolean {\n  return Number.isNaN(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isNative.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isNative as isNativeLodash } from 'lodash';\nimport { isNative } from './isNative';\nimport { noop } from '../../function/noop';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\n/**\n * @see https://github.com/lodash/lodash/blob/main/test/isNative.spec.js\n */\n\ndescribe('isNative', () => {\n  it('should return `true` for native methods', () => {\n    const values = [Array, Object.create, encodeURI, Promise, Array.prototype.slice, Uint8Array];\n    const expected = values.map(() => true);\n    const actual = values.map(isNative);\n\n    expect(actual).toEqual(expected);\n\n    const nativeFunctions = [\n      Array,\n      Promise,\n      Uint8Array,\n      Object.keys,\n      Array.prototype.push,\n      Function.prototype.bind,\n      String.prototype.charAt,\n      Number.prototype.toFixed,\n      Math.max,\n    ];\n\n    nativeFunctions.forEach(func => {\n      expect(isNative(func)).toBe(true);\n    });\n  });\n\n  it('should return `false` for non-native methods', () => {\n    const expected = falsey.map(stubFalse);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = falsey.map((value, index) => (index ? isNative(value) : isNative()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isNative(args)).toBe(false);\n    expect(isNative([1, 2, 3])).toBe(false);\n    expect(isNative(true)).toBe(false);\n    expect(isNative(new Date())).toBe(false);\n    expect(isNative(new Error())).toBe(false);\n    expect(isNative({ a: 1 })).toBe(false);\n    expect(isNative(1)).toBe(false);\n    expect(isNative(/x/)).toBe(false);\n    expect(isNative('a')).toBe(false);\n    expect(isNative(symbol)).toBe(false);\n\n    const nonNativeValues = [\n      undefined,\n      null,\n      true,\n      false,\n      0,\n      1,\n      'string',\n      {},\n      [],\n      () => {},\n      function () {},\n      new Date(),\n      new Error(),\n      /regex/,\n      Symbol('test'),\n      new Map(),\n      new Set(),\n      new WeakMap(),\n      new WeakSet(),\n      new ArrayBuffer(8),\n      new DataView(new ArrayBuffer(8)),\n    ];\n\n    nonNativeValues.forEach(value => {\n      expect(isNative(value)).toBe(false);\n    });\n  });\n\n  it('should throw an error if core-js is detected', () => {\n    (globalThis as any)['__core-js_shared__'] = {};\n\n    try {\n      expect(() => {\n        isNative(noop);\n      }).toThrow();\n    } finally {\n      delete (globalThis as any)['__core-js_shared__'];\n    }\n  });\n\n  it('should detect methods masquerading as native', () => {\n    // Create a fake native function\n    const fakeNative = () => {};\n    Object.defineProperty(fakeNative, 'toString', {\n      value: () => 'function () { [native code] }',\n    });\n\n    expect(isNative(fakeNative)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isNative).toEqualTypeOf<typeof isNativeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isNative.ts",
    "content": "const functionToString = Function.prototype.toString;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nconst REGEXP_SYNTAX_CHARS = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect if a method is native. */\nconst IS_NATIVE_FUNCTION_REGEXP = RegExp(\n  `^${functionToString\n    .call(Object.prototype.hasOwnProperty)\n    .replace(REGEXP_SYNTAX_CHARS, '\\\\$&')\n    .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?')}$`\n);\n\n/**\n * Checks if a given value is a native function.\n *\n * This function tests whether the provided value is a native function implemented by the JavaScript engine.\n * It returns `true` if the value is a native function, and `false` otherwise.\n *\n * @param {any} value - The value to test for native function.\n * @returns {value is (...args: any[]) => any} `true` if the value is a native function, `false` otherwise.\n *\n * @example\n * const value1 = Array.prototype.push;\n * const value2 = () => {};\n * const result1 = isNative(value1); // true\n * const result2 = isNative(value2); // false\n */\nexport function isNative(value: any): value is (...args: any[]) => any {\n  if (typeof value !== 'function') {\n    return false;\n  }\n\n  if ((globalThis as any)?.['__core-js_shared__'] != null) {\n    throw new Error('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.');\n  }\n\n  return IS_NATIVE_FUNCTION_REGEXP.test(functionToString.call(value));\n}\n"
  },
  {
    "path": "src/compat/predicate/isNil.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isNil as isNilLodash } from 'lodash';\nimport { isNil } from './isNil.ts';\nimport { args } from '../_internal/args.ts';\nimport { falsey } from '../_internal/falsey.ts';\n\n/**\n * @see https://github.com/lodash/lodash/blob/main/test/isNil.spec.js\n */\n\ndescribe('isNil', () => {\n  it('should return `true` for nullish values', () => {\n    expect(isNil(null)).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(isNil()).toBe(true);\n    expect(isNil(undefined)).toBe(true);\n  });\n\n  it('should return `false` for non-nullish values', () => {\n    const symbol = Symbol ? Symbol('a') : undefined;\n    const slice = Array.prototype.slice;\n\n    const expected = falsey.map(value => value == null);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = falsey.map((value, index) => (index ? isNil(value) : isNil()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isNil(args)).toBe(false);\n    expect(isNil([1, 2, 3])).toBe(false);\n    expect(isNil(true)).toBe(false);\n    expect(isNil(new Date())).toBe(false);\n    expect(isNil(new Error())).toBe(false);\n    expect(isNil(slice)).toBe(false);\n    expect(isNil({ a: 1 })).toBe(false);\n    expect(isNil(1)).toBe(false);\n    expect(isNil(/x/)).toBe(false);\n    expect(isNil('a')).toBe(false);\n    expect(isNil(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isNil).toEqualTypeOf<typeof isNilLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isNil.ts",
    "content": "/**\n * Checks if a given value is null or undefined.\n *\n * This function tests whether the provided value is either `null` or `undefined`.\n * It returns `true` if the value is `null` or `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null` or `undefined`.\n *\n * @param {any} x - The value to test for null or undefined.\n * @returns {x is null | undefined} `true` if the value is null or undefined, `false` otherwise.\n *\n * @example\n * const value1 = null;\n * const value2 = undefined;\n * const value3 = 42;\n * const result1 = isNil(value1); // true\n * const result2 = isNil(value2); // true\n * const result3 = isNil(value3); // false\n */\nexport function isNil(x: any): x is null | undefined {\n  return x == null;\n}\n"
  },
  {
    "path": "src/compat/predicate/isNull.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isNull as isNullLodash } from 'lodash';\nimport { isNull } from './isNull.ts';\nimport { falsey } from '../_internal/falsey';\n\n/**\n * @see https://github.com/lodash/lodash/blob/main/test/isNull.spec.js\n */\ndescribe('isNull', () => {\n  it('should return `true` for `null` values', () => {\n    expect(isNull(null)).toBe(true);\n  });\n\n  it('should return `false` for non `null` values', () => {\n    const expected = falsey.map(value => value === null);\n    const actual = falsey.map((value, index) => (index ? isNull(value) : isNull(undefined)));\n\n    // eslint-disable-next-line\n    (function (..._args: any[]) {\n      // eslint-disable-next-line\n      expect(isNull(arguments)).toBe(false);\n    })(1, 2, 3);\n    expect(actual).toEqual(expected);\n    expect(isNull([1, 2, 3])).toBe(false);\n    expect(isNull(true)).toBe(false);\n    expect(isNull(new Date())).toBe(false);\n    expect(isNull(new Error())).toBe(false);\n    expect(isNull(Array.prototype.slice)).toBe(false);\n    expect(isNull({ a: 1 })).toBe(false);\n    expect(isNull(1)).toBe(false);\n    expect(isNull(/x/)).toBe(false);\n    expect(isNull('a')).toBe(false);\n    expect(isNull(Symbol('a'))).toBe(false);\n    expect(isNull(undefined)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isNull).toEqualTypeOf<typeof isNullLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isNull.ts",
    "content": "/**\n * Checks if `value` is `null`.\n *\n * @param {any} value - The value to check.\n * @returns {value is null} Returns `true` if `value` is `null`, else `false`.\n *\n * @example\n * isNull(null); // true\n * isNull(undefined); // false\n * isNull(0); // false\n */\nexport function isNull(value: any): value is null {\n  return value === null;\n}\n"
  },
  {
    "path": "src/compat/predicate/isNumber.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isNumber as isNumberLodash } from 'lodash';\nimport { isNumber } from './isNumber';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('isNumber', () => {\n  it('should return true for number values', () => {\n    expect(isNumber(0)).toBe(true);\n    expect(isNumber(1)).toBe(true);\n    expect(isNumber(-1)).toBe(true);\n    expect(isNumber(1.5)).toBe(true);\n    expect(isNumber(Infinity)).toBe(true);\n    expect(isNumber(-Infinity)).toBe(true);\n  });\n\n  it('should return false for non-number values', () => {\n    expect(isNumber('123')).toBe(false);\n    expect(isNumber(true)).toBe(false);\n    expect(isNumber(false)).toBe(false);\n    expect(isNumber(null)).toBe(false);\n    expect(isNumber(undefined)).toBe(false);\n    expect(isNumber({})).toBe(false);\n    expect(isNumber([])).toBe(false);\n    expect(isNumber(() => {})).toBe(false);\n  });\n\n  it('should return true for NaN', () => {\n    expect(isNumber(NaN)).toBe(true);\n  });\n\n  it('should return `true` for numbers', () => {\n    expect(isNumber(0)).toBe(true);\n    expect(isNumber(Object(0))).toBe(true);\n    expect(isNumber(NaN)).toBe(true);\n  });\n\n  it('should return `false` for non-numbers', () => {\n    const expected = falsey.map(value => typeof value === 'number');\n\n    const actual = falsey.map((value, index) => (index ? isNumber(value) : isNumber()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isNumber(args)).toBe(false);\n    expect(isNumber([1, 2, 3])).toBe(false);\n    expect(isNumber(true)).toBe(false);\n    expect(isNumber(new Date())).toBe(false);\n    expect(isNumber(new Error())).toBe(false);\n    expect(isNumber(slice)).toBe(false);\n    expect(isNumber({ a: 1 })).toBe(false);\n    expect(isNumber(/x/)).toBe(false);\n    expect(isNumber('a')).toBe(false);\n    expect(isNumber(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isNumber).toEqualTypeOf<typeof isNumberLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isNumber.ts",
    "content": "/**\n * Checks if a given value is a number.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.\n *\n * @param {any} value The value to check if it is a number.\n * @returns {value is number} Returns `true` if `value` is a number, else `false`.\n *\n * @example\n * const value1 = 123;\n * const value2 = 'abc';\n * const value3 = true;\n *\n * console.log(isNumber(value1)); // true\n * console.log(isNumber(value2)); // false\n * console.log(isNumber(value3)); // false\n */\nexport function isNumber(value?: any): value is number {\n  return typeof value === 'number' || value instanceof Number;\n}\n"
  },
  {
    "path": "src/compat/predicate/isObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isObject as isObjectLodash } from 'lodash';\nimport { isObject } from './isObject';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isObject', () => {\n  it('should return `true` if value is an object', () => {\n    expect(isObject(args)).toBe(true);\n    expect(isObject({})).toBe(true);\n    expect(isObject(() => {})).toBe(true);\n    expect(isObject([1, 2, 3])).toBe(true);\n    expect(isObject(Object(false))).toBe(true);\n    expect(isObject(new Date())).toBe(true);\n    expect(isObject(new Error())).toBe(true);\n    expect(isObject({ a: 1 })).toBe(true);\n    expect(isObject(new Number(0))).toBe(true);\n    expect(isObject(slice)).toBe(true);\n    expect(isObject(/x/)).toBe(true);\n    expect(isObject(new String(''))).toBe(true);\n  });\n\n  it('should return `false` for non-objects', () => {\n    const values = falsey.concat(true, 1, 'a', symbol);\n    const expected = values.map(stubFalse);\n    const actual = values.map(isObject);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isObject).toEqualTypeOf<typeof isObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isObject.ts",
    "content": "/**\n * Checks if the given value is an object. An object is a value that is\n * not a primitive type (string, number, boolean, symbol, null, or undefined).\n *\n * This function tests whether the provided value is an object or not.\n * It returns `true` if the value is an object, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.\n *\n * @param {any} value - The value to check if it is an object.\n * @returns {value is object} `true` if the value is an object, `false` otherwise.\n *\n * @example\n * const value1 = {};\n * const value2 = [1, 2, 3];\n * const value3 = () => {};\n * const value4 = null;\n *\n * console.log(isObject(value1)); // true\n * console.log(isObject(value2)); // true\n * console.log(isObject(value3)); // true\n * console.log(isObject(value4)); // false\n */\n\nexport function isObject(value?: any): value is object {\n  return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n"
  },
  {
    "path": "src/compat/predicate/isObjectLike.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isObjectLike as isObjectLikeLodash } from 'lodash';\nimport { isObjectLike } from './isObjectLike';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isObjectLike', () => {\n  it('should return `true` for objects', () => {\n    expect(isObjectLike(args)).toBe(true);\n    expect(isObjectLike([1, 2, 3])).toBe(true);\n    expect(isObjectLike(Object(false))).toBe(true);\n    expect(isObjectLike(new Date())).toBe(true);\n    expect(isObjectLike(new Error())).toBe(true);\n    expect(isObjectLike({ a: 1 })).toBe(true);\n    expect(isObjectLike(Object(0))).toBe(true);\n    expect(isObjectLike(/x/)).toBe(true);\n    expect(isObjectLike(Object('a'))).toBe(true);\n  });\n\n  it('should return `false` for non-objects', () => {\n    const values = falsey.concat(true, slice, 1, 'a', symbol);\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(isObjectLike);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isObjectLike).toEqualTypeOf<typeof isObjectLikeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isObjectLike.ts",
    "content": "/**\n * Checks if the given value is object-like.\n *\n * A value is object-like if its type is object and it is not null.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object-like value.\n *\n * @param {any} value - The value to test if it is an object-like.\n * @returns {boolean} `true` if the value is an object-like, `false` otherwise.\n *\n * @example\n * const value1 = { a: 1 };\n * const value2 = [1, 2, 3];\n * const value3 = 'abc';\n * const value4 = () => {};\n * const value5 = null;\n *\n * console.log(isObjectLike(value1)); // true\n * console.log(isObjectLike(value2)); // true\n * console.log(isObjectLike(value3)); // false\n * console.log(isObjectLike(value4)); // false\n * console.log(isObjectLike(value5)); // false\n */\n\nexport function isObjectLike(value?: any): boolean {\n  return typeof value === 'object' && value !== null;\n}\n"
  },
  {
    "path": "src/compat/predicate/isPlainObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isPlainObject as isPlainObjectLodash } from 'lodash';\nimport { isPlainObject } from './isPlainObject';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('isPlainObject', () => {\n  it('should detect plain objects', () => {\n    class Foo {\n      a: number;\n      b: number;\n\n      constructor(b: number) {\n        this.a = 1;\n        this.b = b;\n      }\n    }\n\n    expect(isPlainObject({})).toBe(true);\n    expect(isPlainObject({ a: 1 })).toBe(true);\n    expect(isPlainObject({ constructor: Foo })).toBe(true);\n    expect(isPlainObject([1, 2, 3])).toBe(false);\n    expect(isPlainObject(new Foo(1))).toBe(false);\n  });\n\n  it('should return `true` for objects with a `[[Prototype]]` of `null`', () => {\n    const object = Object.create(null);\n    expect(isPlainObject(object)).toBe(true);\n\n    object.constructor = Object.prototype.constructor;\n    expect(isPlainObject(object)).toBe(true);\n  });\n\n  it('should return `true` for objects with a `valueOf` property', () => {\n    expect(isPlainObject({ valueOf: 0 })).toBe(true);\n  });\n\n  it('should return `true` for objects with a writable `Symbol.toStringTag` property', () => {\n    if (Symbol && Symbol.toStringTag) {\n      const object = {};\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      object[Symbol.toStringTag] = 'X';\n\n      expect(isPlainObject(object)).toEqual(true);\n    }\n  });\n\n  it('should return `false` for objects with a custom `[[Prototype]]`', () => {\n    const object = Object.create({ a: 1 });\n    expect(isPlainObject(object)).toBe(false);\n  });\n\n  it('should return `false` for non-Object objects', function () {\n    // eslint-disable-next-line prefer-rest-params\n    expect(isPlainObject(arguments)).toBe(false);\n    expect(isPlainObject(Error)).toBe(false);\n    expect(isPlainObject(Math)).toBe(false);\n  });\n\n  it('should return `false` for non-objects', () => {\n    const expected = falsey.map(() => false);\n\n    const actual = falsey.map((value, index) => (index ? isPlainObject(value) : isPlainObject()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isPlainObject(true)).toBe(false);\n    expect(isPlainObject('a')).toBe(false);\n    expect(isPlainObject(Symbol('a'))).toBe(false);\n  });\n\n  it('should return `false` for objects with a read-only `Symbol.toStringTag` property', () => {\n    if (Symbol && Symbol.toStringTag) {\n      const object = {};\n      Object.defineProperty(object, Symbol.toStringTag, {\n        configurable: true,\n        enumerable: false,\n        writable: false,\n        value: 'X',\n      });\n\n      expect(isPlainObject(object)).toEqual(false);\n    }\n  });\n\n  it('should not mutate `value`', () => {\n    if (Symbol && Symbol.toStringTag) {\n      const proto = {};\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      proto[Symbol.toStringTag] = undefined;\n      const object = Object.create(proto);\n\n      expect(isPlainObject(object)).toBe(false);\n      // eslint-disable-next-line no-prototype-builtins\n      expect(object.hasOwnProperty(Symbol.toStringTag)).toBe(false);\n    }\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isPlainObject).toEqualTypeOf<typeof isPlainObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isPlainObject.ts",
    "content": "/**\n * Checks if a given value is a plain object.\n *\n * A plain object is an object created by the `{}` literal, `new Object()`, or\n * `Object.create(null)`.\n *\n * This function also handles objects with custom\n * `Symbol.toStringTag` properties.\n *\n * `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the\n * default string description of objects.\n *\n * @param {any} [object] - The value to check.\n * @returns {boolean} - True if the value is a plain object, otherwise false.\n *\n * @example\n * console.log(isPlainObject({})); // true\n * console.log(isPlainObject([])); // false\n * console.log(isPlainObject(null)); // false\n * console.log(isPlainObject(Object.create(null))); // true\n * console.log(isPlainObject(new Map())); // false\n */\nexport function isPlainObject(object?: any): boolean {\n  if (typeof object !== 'object') {\n    return false;\n  }\n\n  if (object == null) {\n    return false;\n  }\n\n  if (Object.getPrototypeOf(object) === null) {\n    return true;\n  }\n\n  if (Object.prototype.toString.call(object) !== '[object Object]') {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    const tag = object[Symbol.toStringTag];\n\n    if (tag == null) {\n      return false;\n    }\n\n    const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;\n\n    if (isTagReadonly) {\n      return false;\n    }\n\n    return object.toString() === `[object ${tag}]`;\n  }\n\n  let proto = object;\n\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return Object.getPrototypeOf(object) === proto;\n}\n"
  },
  {
    "path": "src/compat/predicate/isRegExp.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isRegExp as isRegExpLodash } from 'lodash';\nimport { isRegExp } from './isRegExp';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse';\n\n/**\n * https://github.com/lodash/lodash/blob/main/test/isRegExp.spec.js\n */\ndescribe('isRegExp', () => {\n  it('returns `true` for RegExp', () => {\n    expect(isRegExp(/x/)).toBe(true);\n    expect(isRegExp(RegExp('x'))).toBe(true);\n  });\n\n  it('returns `false` for non-RegExp values', () => {\n    const expected = falsey.map(stubFalse);\n\n    const actual = falsey.map((value, index) => {\n      return index ? isRegExp(value) : isRegExp();\n    });\n\n    expect(actual).toEqual(expected);\n\n    expect(isRegExp(args)).toBe(false);\n    expect(isRegExp([1, 2, 3])).toBe(false);\n    expect(isRegExp(true)).toBe(false);\n    expect(isRegExp(new Date())).toBe(false);\n    expect(isRegExp(new Error())).toBe(false);\n    expect(isRegExp(slice)).toBe(false);\n    expect(isRegExp({ a: 1 })).toBe(false);\n    expect(isRegExp(1)).toBe(false);\n    expect(isRegExp('a')).toBe(false);\n    expect(isRegExp(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isRegExp).toEqualTypeOf<typeof isRegExpLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isRegExp.ts",
    "content": "import { isRegExp as isRegExpToolkit } from '../../predicate/isRegExp.ts';\n\n/**\n * Checks if `value` is a RegExp.\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.\n *\n * @example\n * const value1 = /abc/;\n * const value2 = '/abc/';\n *\n * console.log(isRegExp(value1)); // true\n * console.log(isRegExp(value2)); // false\n */\nexport function isRegExp(value?: any): value is RegExp {\n  return isRegExpToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isSafeInteger.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isSafeInteger as isSafeIntegerLodash } from 'lodash';\nimport { isSafeInteger } from './isSafeInteger.ts';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { symbol } from '../_internal/symbol';\nimport { stubFalse } from '../util/stubFalse.ts';\nimport { stubTrue } from '../util/stubTrue.ts';\n\nconst MAX_INTEGER = 1.7976931348623157e308;\n\ndescribe('isSafeInteger function', () => {\n  it('checks if an int is an integer', () => {\n    const result = isSafeInteger(1);\n    expect(result).toBe(true);\n  });\n\n  it('checks if a float is not an integer', () => {\n    const result = isSafeInteger(1.1);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a BigInt is not an integer', () => {\n    const result = isSafeInteger(1n);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a string is not an integer', () => {\n    const result = isSafeInteger('1');\n    expect(result).toBe(false);\n  });\n\n  it('checks if an array is not an integer', () => {\n    const result = isSafeInteger([]);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a NaN is not an integer', () => {\n    const result = isSafeInteger(NaN);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a Infinity is not an integer', () => {\n    const result = isSafeInteger(Infinity);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a value less than -(253 – 1) is not a safe integer', () => {\n    const result = isSafeInteger(Number.MIN_SAFE_INTEGER - 2);\n    expect(result).toBe(false);\n  });\n\n  it('checks if a value greater than (253 – 1) is not a safe integer', () => {\n    const result = isSafeInteger(Number.MAX_SAFE_INTEGER + 2);\n    expect(result).toBe(false);\n  });\n\n  const func = isSafeInteger;\n  const isSafe = true;\n\n  it(`\\`isSafeInteger\\` should return \\`true\\` for integer values`, () => {\n    const values = [-1, 0, 1];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => func(value));\n\n    expect(actual).toEqual(expected);\n    expect(func(MAX_INTEGER)).toBe(!isSafe);\n  });\n\n  it('should return `false` for non-integer number values', () => {\n    const values = [NaN, Infinity, -Infinity, Object(1), 3.14];\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(value => func(value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-numeric values', () => {\n    const expected = falsey.map(value => value === 0);\n\n    const actual = falsey.map((value, index) => (index ? func(value) : (func as any)()));\n\n    expect(actual).toEqual(expected);\n\n    expect(func(args)).toBe(false);\n    expect(func([1, 2, 3])).toBe(false);\n    expect(func(true)).toBe(false);\n    expect(func(new Date())).toBe(false);\n    expect(func(new Error())).toBe(false);\n    expect(func({ a: 1 })).toBe(false);\n    expect(func(/x/)).toBe(false);\n    expect(func('a')).toBe(false);\n    expect(func(symbol)).toBe(false);\n  });\n\n  it('should be compatible with lodash type', () => {\n    const lodashFn: typeof isSafeIntegerLodash = isSafeInteger;\n    expect(lodashFn(3)).toBe(true);\n    expect(lodashFn('3')).toBe(false);\n  });\n\n  it('should work as a type predicate', () => {\n    const value: unknown = 3;\n    if (isSafeInteger(value)) {\n      expectTypeOf(value).toEqualTypeOf<number>();\n      expect(typeof value).toBe('number');\n    }\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isSafeInteger.ts",
    "content": "/**\n * Checks if `value` is a safe integer (between -(2^53 – 1) and (2^53 – 1), inclusive).\n *\n * A safe integer is an integer that can be precisely represented as a `number` in JavaScript,\n * without any other integer being rounded to it.\n *\n * This function also serves as a type predicate in TypeScript,\n * narrowing the type of the argument to `number`.\n *\n * @param {unknown} value - The value to check\n * @returns {value is number} `true` if `value` is an integer and between the safe values, otherwise `false`\n *\n * @example\n * isSafeInteger(3); // Returns: true\n * isSafeInteger(Number.MIN_SAFE_INTEGER - 1); // Returns: false\n * isSafeInteger(1n); // Returns: false\n * isSafeInteger('1'); // Returns: false\n */\nexport function isSafeInteger(value: unknown): value is number {\n  return Number.isSafeInteger(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isSet.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isSet as isSetLodash } from 'lodash';\nimport { isSet } from './isSet';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\nimport { weakSet } from '../_internal/weakSet';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isSet', () => {\n  it('should return `true` for sets', () => {\n    expect(isSet(new Set())).toBe(true);\n  });\n\n  it('should return `false` for non-sets', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map((value, index) => (index ? isSet(value) : isSet()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isSet(args)).toBe(false);\n    expect(isSet([1, 2, 3])).toBe(false);\n    expect(isSet(true)).toBe(false);\n    expect(isSet(new Date())).toBe(false);\n    expect(isSet(new Error())).toBe(false);\n    expect(isSet(slice)).toBe(false);\n    expect(isSet({ a: 1 })).toBe(false);\n    expect(isSet(1)).toBe(false);\n    expect(isSet(/x/)).toBe(false);\n    expect(isSet('a')).toBe(false);\n    expect(isSet(symbol)).toBe(false);\n    expect(isSet(weakSet)).toBe(false);\n  });\n\n  it('should work for objects with a non-function `constructor` (test in IE 11)', () => {\n    const expected = falsey.map(() => stubFalse());\n\n    const actual = falsey.map(value => isSet({ constructor: value }));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isSet).toEqualTypeOf<typeof isSetLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isSet.ts",
    "content": "import { isSet as isSetToolkit } from '../../predicate/isSet.ts';\n\n/**\n * Checks if a given value is `Set`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Set`.\n *\n * @param {unknown} value The value to check if it is a `Set`.\n * @returns {value is Set<any>} Returns `true` if `value` is a `Set`, else `false`.\n *\n * @example\n * const value1 = new Set();\n * const value2 = new Map();\n * const value3 = new WeakSet();\n *\n * console.log(isSet(value1)); // true\n * console.log(isSet(value2)); // false\n * console.log(isSet(value3)); // false\n */\n\nexport function isSet(value?: any): value is Set<any> {\n  return isSetToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isString.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isString as isStringLodash } from 'lodash';\nimport { isString } from './isString';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('isString', () => {\n  it('returns true if the value is string', () => {\n    expect(isString('a')).toBe(true);\n    expect(isString(Object('a'))).toBe(true);\n  });\n\n  it('returns false if the value is not string', () => {\n    const expected = falsey.map(value => value === '');\n\n    const actual = falsey.map(value => isString(value));\n\n    expect(actual).toEqual(expected);\n\n    expect(isString(args)).toBe(false);\n    expect(isString([1, 2, 3])).toBe(false);\n    expect(isString(true)).toBe(false);\n    expect(isString(new Date())).toBe(false);\n    expect(isString(new Error())).toBe(false);\n    expect(isString(slice)).toBe(false);\n    expect(isString({ '0': 1, length: 1 })).toBe(false);\n    expect(isString(1)).toBe(false);\n    expect(isString(/x/)).toBe(false);\n    expect(isString(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isString).toEqualTypeOf<typeof isStringLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isString.ts",
    "content": "/**\n * Checks if a given value is string.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `string`.\n *\n * @param {unknown} value The value to check if it is string.\n * @returns {value is string} Returns `true` if `value` is a string, else `false`.\n *\n * @example\n * const value1 = 'abc';\n * const value2 = 123;\n * const value3 = true;\n *\n * console.log(isString(value1)); // true\n * console.log(isString(value2)); // false\n * console.log(isString(value3)); // false\n */\n\nexport function isString(value?: any): value is string {\n  return typeof value === 'string' || value instanceof String;\n}\n"
  },
  {
    "path": "src/compat/predicate/isSymbol.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isSymbol as isSymbolLodash } from 'lodash';\nimport { isSymbol } from './isSymbol';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { stubFalse } from '../util/stubFalse';\n\ndescribe('isSymbol', () => {\n  it('should return `true` for symbols', () => {\n    expect(isSymbol(Symbol('a'))).toBe(true);\n    expect(isSymbol(Object(Symbol('a')))).toBe(true);\n  });\n\n  it('should return `false` for non-symbols', () => {\n    const expected = falsey.map(stubFalse);\n    const actual = falsey.map(isSymbol);\n\n    expect(actual).toEqual(expected);\n\n    expect(isSymbol(args)).toBe(false);\n    expect(isSymbol([1, 2, 3])).toBe(false);\n    expect(isSymbol(true)).toBe(false);\n    expect(isSymbol(new Date())).toBe(false);\n    expect(isSymbol(new Error())).toBe(false);\n    expect(isSymbol(slice)).toBe(false);\n    expect(isSymbol({ 0: 1, length: 1 })).toBe(false);\n    expect(isSymbol(1)).toBe(false);\n    expect(isSymbol(/x/)).toBe(false);\n    expect(isSymbol('a')).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isSymbol).toEqualTypeOf<typeof isSymbolLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isSymbol.ts",
    "content": "/**\n * Check whether a value is a symbol.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.\n *\n * @param {unknown} value The value to check.\n * @returns {value is symbol} Returns `true` if `value` is a symbol, else `false`.\n * @example\n * isSymbol(Symbol.iterator);\n * // => true\n *\n * isSymbol('abc');\n * // => false\n */\nexport function isSymbol(value: any): value is symbol {\n  return typeof value === 'symbol' || value instanceof Symbol;\n}\n"
  },
  {
    "path": "src/compat/predicate/isTypedArray.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isTypedArray as isTypedArrayLodash } from 'lodash';\nimport { isTypedArray } from './isTypedArray';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { typedArrays } from '../_internal/typedArrays';\nimport { stubFalse } from '../util/stubFalse';\n\n/**\n * @see https://github.com/lodash/lodash/blob/main/test/isTypedArray.spec.js\n */\ndescribe('isTypedArray', () => {\n  it('should return `true` for typed arrays', () => {\n    const actual = typedArrays.map(type => {\n      const Ctor = (globalThis as any)[type];\n      return Ctor ? isTypedArray(new Ctor(new ArrayBuffer(8))) : false;\n    });\n\n    expect(actual).toEqual([true, true, true, true, true, true, true, true, true]);\n  });\n\n  it('should return `false` for non typed arrays', () => {\n    const expected = falsey.map(stubFalse);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = falsey.map((value, index) => (index ? isTypedArray(value) : isTypedArray()));\n\n    expect(actual).toEqual(expected);\n\n    expect(isTypedArray(args)).toBe(false);\n    expect(isTypedArray([1, 2, 3])).toBe(false);\n    expect(isTypedArray(true)).toBe(false);\n    expect(isTypedArray(new Date())).toBe(false);\n    expect(isTypedArray(new Error())).toBe(false);\n    expect(isTypedArray(Array.prototype.slice)).toBe(false);\n    expect(isTypedArray({ a: 1 })).toBe(false);\n    expect(isTypedArray(1)).toBe(false);\n    expect(isTypedArray(/x/)).toBe(false);\n    expect(isTypedArray('a')).toBe(false);\n    expect(isTypedArray(Symbol('a'))).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isTypedArray).toEqualTypeOf<typeof isTypedArrayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isTypedArray.ts",
    "content": "import { isTypedArray as isTypedArrayToolkit } from '../../predicate/isTypedArray.ts';\n\n/**\n * Checks if a value is a TypedArray.\n * @param {any} x The value to check.\n * @returns {boolean} Returns true if `x` is a TypedArray, false otherwise.\n *\n * @example\n * const arr = new Uint8Array([1, 2, 3]);\n * isTypedArray(arr); // true\n *\n * const regularArray = [1, 2, 3];\n * isTypedArray(regularArray); // false\n *\n * const buffer = new ArrayBuffer(16);\n * isTypedArray(buffer); // false\n */\nexport function isTypedArray(x: any): boolean {\n  return isTypedArrayToolkit(x);\n}\n"
  },
  {
    "path": "src/compat/predicate/isUndefined.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isUndefined as isUndefinedLodash } from 'lodash';\nimport { isUndefined } from './isUndefined';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('isUndefined', () => {\n  it('should return `true` for `undefined` values', () => {\n    expect(isUndefined(undefined)).toBe(true);\n  });\n\n  it('should return `false` for non `undefined` values', () => {\n    const expected = falsey.map(value => value === undefined);\n    const actual = falsey.map((value, index) => (index ? isUndefined(value) : isUndefined(undefined)));\n    expect(actual).toEqual(expected);\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    (function (..._: any[]) {\n      // eslint-disable-next-line prefer-rest-params\n      expect(isUndefined(arguments)).toBe(false);\n    })(1, 2, 3);\n    expect(isUndefined([1, 2, 3])).toBe(false);\n    expect(isUndefined(true)).toBe(false);\n    expect(isUndefined(new Date())).toBe(false);\n    expect(isUndefined(new Error())).toBe(false);\n    expect(isUndefined(Array.prototype.slice)).toBe(false);\n    expect(isUndefined({ a: 1 })).toBe(false);\n    expect(isUndefined(1)).toBe(false);\n    expect(isUndefined(/x/)).toBe(false);\n    expect(isUndefined('a')).toBe(false);\n    expect(isUndefined(Symbol('a'))).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isUndefined).toEqualTypeOf<typeof isUndefinedLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isUndefined.ts",
    "content": "import { isUndefined as isUndefinedToolkit } from '../../predicate/isUndefined.ts';\n\n/**\n * Checks if the given value is undefined.\n *\n * This function tests whether the provided value is strictly equal to `undefined`.\n * It returns `true` if the value is `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `undefined`.\n *\n * @param {any} x - The value to test if it is undefined.\n * @returns {x is undefined} true if the value is undefined, false otherwise.\n *\n * @example\n * const value1 = undefined;\n * const value2 = null;\n * const value3 = 42;\n *\n * console.log(isUndefined(value1)); // true\n * console.log(isUndefined(value2)); // false\n * console.log(isUndefined(value3)); // false\n */\nexport function isUndefined(x: any): x is undefined {\n  return isUndefinedToolkit(x);\n}\n"
  },
  {
    "path": "src/compat/predicate/isWeakMap.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isWeakMap as isWeakMapLodash } from 'lodash';\nimport { isWeakMap } from './isWeakMap';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('isWeakMap', () => {\n  it('should return `true` for weak maps', () => {\n    if (WeakMap) {\n      expect(isWeakMap(new WeakMap())).toBe(true);\n    }\n  });\n\n  it('should return `false` for non weak maps', () => {\n    expect(falsey.map((value, index) => (index ? isWeakMap(value) : isWeakMap()))).toEqual(falsey.map(() => false));\n    expect(isWeakMap(args)).toBe(false);\n    expect(isWeakMap([1, 2, 3])).toBe(false);\n    expect(isWeakMap(true)).toBe(false);\n    expect(isWeakMap(new Date())).toBe(false);\n    expect(isWeakMap(new Error())).toBe(false);\n    expect(isWeakMap(slice)).toBe(false);\n    expect(isWeakMap({ a: 1 })).toBe(false);\n    expect(isWeakMap(Array.prototype.map)).toBe(false);\n    expect(isWeakMap(1)).toBe(false);\n    expect(isWeakMap(/x/)).toBe(false);\n    expect(isWeakMap('a')).toBe(false);\n    expect(isWeakMap(symbol)).toBe(false);\n  });\n\n  it('should work for objects with a non-function `constructor` (test in IE 11)', () => {\n    expect(isWeakMap({ constructor: false })).toBe(false);\n    expect(isWeakMap({ constructor: true })).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isWeakMap).toEqualTypeOf<typeof isWeakMapLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isWeakMap.ts",
    "content": "import { isWeakMap as isWeakMapToolkit } from '../../predicate/isWeakMap.ts';\n\n/**\n * Checks if the given value is a `WeakMap`.\n *\n * This function tests whether the provided value is an instance of `WeakMap`.\n * It returns `true` if the value is a `WeakMap`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakMap`.\n *\n * @param {unknown} value - The value to test if it is a `WeakMap`.\n * @returns {value is WeakMap<WeakKey, any>} true if the value is a `WeakMap`, false otherwise.\n *\n * @example\n * const value1 = new WeakMap();\n * const value2 = new Map();\n * const value3 = new Set();\n *\n * console.log(isWeakMap(value1)); // true\n * console.log(isWeakMap(value2)); // false\n * console.log(isWeakMap(value3)); // false\n */\nexport function isWeakMap(value?: any): value is WeakMap<object, any> {\n  return isWeakMapToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/isWeakSet.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { isWeakSet as isWeakSetLodash } from 'lodash';\nimport { isWeakSet } from './isWeakSet';\nimport { args } from '../_internal/args';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('isWeakSet', () => {\n  it('should return `true` for weak sets', () => {\n    expect(isWeakSet(new WeakSet())).toBe(true);\n  });\n\n  it('should return `false` for non weak sets', () => {\n    expect(falsey.map((value, index) => (index ? isWeakSet(value) : isWeakSet()))).toEqual(falsey.map(() => false));\n\n    expect(isWeakSet(args)).toBe(false);\n    expect(isWeakSet([1, 2, 3])).toBe(false);\n    expect(isWeakSet(true)).toBe(false);\n    expect(isWeakSet(new Date())).toBe(false);\n    expect(isWeakSet(new Error())).toBe(false);\n    expect(isWeakSet(slice)).toBe(false);\n    expect(isWeakSet({ a: 1 })).toBe(false);\n    expect(isWeakSet(1)).toBe(false);\n    expect(isWeakSet(/x/)).toBe(false);\n    expect(isWeakSet('a')).toBe(false);\n    expect(isWeakSet(new Set())).toBe(false);\n    expect(isWeakSet(symbol)).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(isWeakSet).toEqualTypeOf<typeof isWeakSetLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/isWeakSet.ts",
    "content": "import { isWeakSet as isWeakSetToolkit } from '../../predicate/isWeakSet.ts';\n\n/**\n * Checks if the given value is a `WeakSet`.\n *\n * This function tests whether the provided value is an instance of `WeakSet`.\n * It returns `true` if the value is a `WeakSet`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakSet`.\n *\n * @param {unknown} value - The value to test if it is a `WeakSet`.\n * @returns {value is WeakSet<WeakKey>} true if the value is a `WeakSet`, false otherwise.\n *\n * @example\n * const value1 = new WeakSet();\n * const value2 = new Map();\n * const value3 = new Set();\n *\n * console.log(isWeakSet(value1)); // true\n * console.log(isWeakSet(value2)); // false\n * console.log(isWeakSet(value3)); // false\n */\nexport function isWeakSet(value?: any): value is WeakSet<object> {\n  return isWeakSetToolkit(value);\n}\n"
  },
  {
    "path": "src/compat/predicate/matches.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { matches as matchesLodash } from 'lodash';\nimport { matches } from './matches';\nimport { noop } from '../../function/noop';\nimport { empties } from '../_internal/empties';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('matches', () => {\n  it(`should perform a deep comparison between \\`source\\` and \\`object\\``, () => {\n    const object: any = { a: 1, b: 2, c: 3 };\n\n    const isMatch1 = matches({ a: 1 });\n    expect(isMatch1(object)).toBe(true);\n\n    const isMatch2 = matches({ b: 2 });\n    expect(isMatch2(object)).toBe(true);\n\n    const isMatch3 = matches({ a: 1, c: 3 });\n    expect(isMatch3(object)).toBe(true);\n\n    const isMatch4 = matches({ c: 3, d: 4 });\n    expect(isMatch4(object)).toBe(false);\n\n    const isMatch5 = matches({ a: { b: { c: 1 } } });\n    expect(isMatch5({ a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 })).toBe(true);\n  });\n\n  it(`should match inherited string keyed \\`object\\` properties`, () => {\n    interface Foo {\n      a: number;\n      b: number;\n    }\n\n    interface FooConstructor {\n      new (): Foo;\n    }\n\n    const Foo = function Foo(this: Foo) {\n      this.a = 1;\n    } as any as FooConstructor;\n\n    Foo.prototype.b = 2;\n\n    const object = { a: new Foo() };\n    const isMatch = matches({ a: { b: 2 } });\n\n    expect(isMatch(object)).toBe(true);\n  });\n\n  it(`should not match by inherited \\`source\\` properties`, () => {\n    interface Foo {\n      a: number;\n      b: number;\n    }\n\n    interface FooConstructor {\n      new (): Foo;\n    }\n\n    const Foo = function Foo(this: Foo) {\n      this.a = 1;\n    } as any as FooConstructor;\n\n    Foo.prototype.b = 2;\n\n    const objects = [{ a: 1 }, { a: 1, b: 2 }];\n    const source = new Foo();\n    const actual = objects.map(matches(source));\n    const expected = objects.map(stubTrue);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should compare a variety of \\`source\\` property values`, () => {\n    const object1 = { a: false, b: true, c: '3', d: 4, e: [5], f: { g: 6 } };\n    const object2 = { a: 0, b: 1, c: 3, d: '4', e: ['5'], f: { g: '6' } };\n\n    const isMatch = matches(object1);\n\n    expect(isMatch(object1)).toBe(true);\n    expect(isMatch(object2)).toBe(false);\n  });\n\n  it(`should match \\`-0\\` as \\`0\\``, () => {\n    const object1 = { a: -0 };\n    const object2 = { a: 0 };\n\n    const isMatch1 = matches(object1);\n    const isMatch2 = matches(object2);\n\n    expect(isMatch1(object2)).toBe(true);\n    expect(isMatch2(object1)).toBe(true);\n  });\n\n  it(`should compare functions by reference`, () => {\n    const object1 = { a: noop };\n    const object2 = { a: () => {} };\n    const object3 = { a: {} };\n\n    const isMatch = matches(object1);\n\n    expect(isMatch(object1)).toBe(true);\n    expect(isMatch(object2)).toBe(false);\n    expect(isMatch(object3)).toBe(false);\n  });\n\n  it(`should work with a function for \\`object\\``, () => {\n    function Foo() {}\n    Foo.a = { b: 2, c: 3 };\n\n    const isMatch = matches({ a: { b: 2 } });\n\n    expect(isMatch(Foo)).toBe(true);\n  });\n\n  it(`should work with a function for \\`source\\``, () => {\n    function Foo() {}\n    Foo.a = 1;\n    Foo.b = function () {};\n    Foo.c = 3;\n\n    const objects = [{ a: 1 }, { a: 1, b: Foo.b, c: 3 }];\n    const actual = objects.map(matches(Foo));\n\n    expect(actual).toEqual([false, true]);\n  });\n\n  it(`should work with a non-plain \\`object\\``, () => {\n    interface Foo {\n      a: number;\n      b: number;\n      c: number;\n    }\n\n    interface FooConstructor {\n      new (arg: Partial<Foo>): Foo;\n    }\n\n    const Foo = function Foo(this: Foo, object: Partial<Foo>) {\n      Object.assign(this, object);\n    } as any as FooConstructor;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object = new Foo({ a: new Foo({ b: 2, c: 3 }) });\n\n    const isMatch = matches({ a: { b: 2 } });\n\n    expect(isMatch(object)).toBe(true);\n  });\n\n  it(`should partial match arrays`, () => {\n    const objects = [{ a: ['b'] }, { a: ['c', 'd'] }];\n    let actual = objects.filter(matches({ a: ['d'] }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    actual = objects.filter(matches({ a: ['b', 'd'] }));\n    expect(actual).toEqual([]);\n\n    actual = objects.filter(matches({ a: ['d', 'b'] }));\n    expect(actual).toEqual([]);\n  });\n\n  it(`should partial match arrays with duplicate values`, () => {\n    const objects = [{ a: [1, 2] }, { a: [2, 2] }];\n    const actual = objects.filter(matches({ a: [2, 2] }));\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it('should partial match arrays of objects', () => {\n    const objects = [\n      {\n        a: [\n          { b: 1, c: 2 },\n          { b: 4, c: 5, d: 6 },\n        ],\n      },\n      {\n        a: [\n          { b: 1, c: 2 },\n          { b: 4, c: 6, d: 7 },\n        ],\n      },\n    ];\n\n    const actual = objects.filter(matches({ a: [{ b: 1 }, { b: 4, c: 5 }] }));\n    expect(actual).toEqual([objects[0]]);\n  });\n\n  it(`should partial match maps`, () => {\n    const objects = [{ a: new Map() }, { a: new Map() }];\n    objects[0].a.set('a', 1);\n    objects[1].a.set('a', 1);\n    objects[1].a.set('b', 2);\n\n    const map = new Map();\n    map.set('b', 2);\n    let actual = objects.filter(matches({ a: map }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    map.delete('b');\n    actual = objects.filter(matches({ a: map }));\n\n    expect(actual).toEqual(objects);\n\n    map.set('c', 3);\n    actual = objects.filter(matches({ a: map }));\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should partial match sets`, () => {\n    const objects = [{ a: new Set() }, { a: new Set() }];\n    objects[0].a.add(1);\n    objects[1].a.add(1);\n    objects[1].a.add(2);\n\n    const set = new Set();\n    set.add(2);\n    let actual = objects.filter(matches({ a: set }));\n\n    expect(actual).toEqual([objects[1]]);\n\n    set.delete(2);\n    actual = objects.filter(matches({ a: set }));\n\n    expect(actual).toEqual(objects);\n\n    set.add(3);\n    actual = objects.filter(matches({ a: set }));\n\n    expect(actual).toEqual([]);\n  });\n\n  it(`should match \\`undefined\\` values`, () => {\n    const objects1 = [{ a: 1 }, { a: 1, b: 1 }, { a: 1, b: undefined }];\n    const actual1 = objects1.map(matches({ b: undefined }));\n    const expected1 = [false, false, true];\n\n    expect(actual1).toEqual(expected1);\n\n    const objects2 = [{ a: 1 }, { a: 1, b: 1 }, { a: 1, b: undefined }];\n    const actual2 = objects2.map(matches({ a: 1, b: undefined }));\n    const expected2 = [false, false, true];\n\n    expect(actual2).toEqual(expected2);\n\n    const objects3 = [\n      { a: { b: 2 } },\n      { a: { b: 2, c: 3 } },\n      {\n        a: { b: 2, c: undefined },\n      },\n    ];\n    const actual3 = objects3.map(matches({ a: { c: undefined } }));\n    const expected3 = [false, false, true];\n\n    expect(actual3).toEqual(expected3);\n  });\n\n  it(`should match \\`undefined\\` values on primitives`, () => {\n    const numberProto = Number.prototype;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.a = 1;\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.b = undefined;\n\n    try {\n      const isMatch = matches({ b: undefined });\n      expect(isMatch(1)).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    try {\n      const isMatch = matches({ a: 1, b: undefined });\n      expect(isMatch(1)).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    numberProto.a = { b: 1, c: undefined };\n    try {\n      const isMatch = matches({ a: { c: undefined } });\n      expect(isMatch(1)).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete numberProto.a;\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete numberProto.b;\n  });\n\n  it(`should return \\`false\\` when \\`object\\` is nullish`, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => false);\n\n    const isMatch = matches({ a: 1 });\n\n    const actual = values.map((value, index) => {\n      try {\n        return index ? isMatch(value) : isMatch(undefined);\n      } catch (e: unknown) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing an empty \\`source\\``, () => {\n    const object = { a: 1 };\n    const expected = empties.map(stubTrue);\n\n    const actual = empties.map(() => {\n      const isMatch = matches(object);\n\n      return isMatch(object);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing an empty \\`source\\` to a nullish \\`object\\``, () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubTrue);\n\n    const isMatch = matches({});\n\n    const actual = values.map((value, index) => {\n      try {\n        return index ? isMatch(value) : isMatch(undefined);\n      } catch (e: unknown) {\n        /* empty */\n      }\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should return \\`true\\` when comparing a \\`source\\` of empty arrays and objects`, () => {\n    const objects = [\n      { a: [1], b: { c: 1 } },\n      { a: [2, 3], b: { d: 2 } },\n    ];\n    const actual = objects.filter(matches({ a: [], b: {} }));\n\n    expect(actual).toEqual(objects);\n  });\n\n  it('should not change behavior if `source` is modified', () => {\n    const sources = [{ a: { b: 2, c: 3 } }, { a: 1, b: 2 }, { a: 1 }];\n\n    sources.forEach((source: any, index) => {\n      const object = structuredClone(source);\n      const isMatch = matches(source);\n\n      expect(isMatch(object)).toBe(true);\n\n      if (index) {\n        source.a = 2;\n        source.b = 1;\n        source.c = 3;\n      } else {\n        source.a.b = 1;\n        source.a.c = 2;\n        source.a.d = 3;\n      }\n\n      expect(isMatch(object)).toBe(true);\n      expect(isMatch(source)).toBe(false);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(matches).toEqualTypeOf<typeof matchesLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/matches.ts",
    "content": "import { isMatch } from './isMatch.ts';\nimport { cloneDeep } from '../../object/cloneDeep.ts';\n\n/**\n * Creates a function that performs a deep comparison between a given target and the source object.\n *\n * @template T\n * @param {T} source - The source object to create the matcher from.\n * @returns {(value: any) => boolean} Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.\n *\n * @example\n * const matcher = matches({ a: 1, b: 2 });\n * matcher({ a: 1, b: 2, c: 3 }); // true\n * matcher({ a: 1, c: 3 }); // false\n */\nexport function matches<T>(source: T): (value: any) => boolean;\n\n/**\n * Creates a function that performs a deep comparison between a given target and the source object.\n *\n * @template T\n * @template V\n * @param {T} source - The source object to create the matcher from.\n * @returns {(value: V) => boolean} Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.\n *\n * @example\n * const matcher = matches<{ a: number }, { a: number; b?: number }>({ a: 1 });\n * matcher({ a: 1, b: 2 }); // true\n * matcher({ a: 2 }); // false\n */\nexport function matches<T, V>(source: T): (value: V) => boolean;\n\n/**\n * Creates a function that performs a deep comparison between a given target and the source object.\n *\n * @template T\n * @template V\n * @param {T} source - The source object to create the matcher from.\n * @returns {(target: V) => boolean} Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.\n *\n * @example\n * // Basic usage\n * const matcher = matches({ a: 1, b: 2 });\n * matcher({ a: 1, b: 2, c: 3 }); // true\n * matcher({ a: 1, c: 3 }); // false\n *\n * @example\n * // Matching arrays\n * const arrayMatcher = matches([1, 2, 3]);\n * arrayMatcher([1, 2, 3, 4]); // true\n * arrayMatcher([4, 5, 6]); // false\n *\n * @example\n * // Matching objects with nested structures\n * const nestedMatcher = matches({ a: { b: 2 } });\n * nestedMatcher({ a: { b: 2, c: 3 } }); // true\n * nestedMatcher({ a: { c: 3 } }); // false\n */\nexport function matches<T, V>(source: T): (target: V) => boolean {\n  source = cloneDeep(source);\n\n  return (target?: unknown): boolean => {\n    return isMatch(target as object, source as object);\n  };\n}\n"
  },
  {
    "path": "src/compat/predicate/matchesProperty.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { matchesProperty as matchesPropertyLodash } from 'lodash';\nimport { matchesProperty } from './matchesProperty';\nimport { noop } from '../../function/noop';\nimport { range } from '../../math/range';\nimport { numberProto } from '../_internal/numberProto';\nimport { cloneDeep } from '../object/cloneDeep';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('matchesProperty', () => {\n  it('should create a function that performs a deep comparison between a property value and `srcValue`', () => {\n    let object: any = { a: 1, b: 2, c: 3 };\n    let matches = matchesProperty('a', 1);\n\n    expect(matches.length).toBe(1);\n    expect(matches(object)).toBe(true);\n\n    matches = matchesProperty('b', 3);\n    expect(matches(object)).toBe(false);\n\n    matches = matchesProperty('a', { a: 1, c: 3 });\n    expect(matches({ a: object })).toBe(true);\n\n    matches = matchesProperty('a', { c: 3, d: 4 });\n    expect(matches(object)).toBe(false);\n\n    object = { a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 };\n    matches = matchesProperty('a', { b: { c: 1 } });\n\n    expect(matches(object)).toBe(true);\n  });\n\n  it('should support deep paths', () => {\n    const object = { a: { b: 2 } };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const matches = matchesProperty(path, 2);\n      expect(matches(object)).toBe(true);\n    });\n  });\n\n  it('should work with a non-string `path`', () => {\n    const array = [1, 2, 3];\n\n    [1, [1]].forEach(path => {\n      const matches = matchesProperty(path, 2);\n      expect(matches(array)).toBe(true);\n    });\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const object1 = { '-0': 'a' };\n    const object2 = { 0: 'b' };\n    const pairs = [\n      [object1, object2],\n      [object1, object2],\n      [object2, object1],\n      [object2, object1],\n    ];\n    const props = [-0, Object(-0), 0, Object(0)];\n    const values = ['a', 'a', 'b', 'b'];\n    const expected = props.map(() => [true, false]);\n\n    const actual = props.map((key, index) => {\n      const matches = matchesProperty(key, values[index]);\n      const pair = pairs[index];\n\n      return [matches(pair[0]), matches(pair[1])];\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should coerce `path` to a string', () => {\n    function fn() {}\n    fn.toString = () => 'fn';\n\n    const object: any = { null: 1, undefined: 2, fn: 3, '[object Object]': 4 };\n    const paths: any[] = [null, undefined, fn, {}];\n    const expected = paths.map(stubTrue);\n\n    range(2).forEach(index => {\n      const actual = paths.map(path => {\n        const matches = matchesProperty(index ? [path] : path, object[path]);\n        return matches(object);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should match a key over a path', () => {\n    const object = { 'a.b': 1, a: { b: 2 } };\n\n    ['a.b', ['a.b']].forEach(path => {\n      const matches = matchesProperty(path, 1);\n      expect(matches(object)).toBe(true);\n    });\n  });\n\n  it('should return `false` when `object` is nullish', () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor', ['constructor']].forEach(path => {\n      const matches = matchesProperty(path, 1);\n\n      const actual = values.map((value, index) => {\n        try {\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-expect-error\n          return index ? matches(value) : matches();\n          // eslint-disable-next-line\n        } catch (e) {}\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `false` for deep paths when `object` is nullish', () => {\n    // eslint-disable-next-line\n    const values = [, null, undefined];\n    const expected = values.map(stubFalse);\n\n    ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']].forEach(path => {\n      const matches = matchesProperty(path, 1);\n\n      const actual = values.map((value, index) => {\n        try {\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-expect-error\n          return index ? matches(value) : matches();\n          // eslint-disable-next-line\n        } catch (e) {}\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `false` if parts of `path` are missing', () => {\n    const object = {};\n\n    ['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']].forEach(path => {\n      const matches = matchesProperty(path, 1);\n      expect(matches(object)).toBe(false);\n    });\n  });\n\n  it('should match inherited string keyed `srcValue` properties', () => {\n    function Foo() {}\n    Foo.prototype.b = 2;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object = { a: new Foo() };\n\n    ['a', ['a']].forEach(path => {\n      const matches = matchesProperty(path, { b: 2 });\n      expect(matches(object)).toBe(true);\n    });\n  });\n\n  it('should not match by inherited `srcValue` properties', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.b = 2;\n\n    const objects = [{ a: { a: 1 } }, { a: { a: 1, b: 2 } }];\n    const expected = objects.map(stubTrue);\n\n    ['a', ['a']].forEach(path => {\n      expect(\n        objects.map(\n          matchesProperty(\n            path,\n            // eslint-disable-next-line\n            // @ts-ignore\n            new Foo()\n          )\n        )\n      ).toEqual(expected);\n    });\n  });\n\n  it('should compare a variety of values', () => {\n    const object1 = { a: false, b: true, c: '3', d: 4, e: [5], f: { g: 6 } };\n    const object2 = { a: 0, b: 1, c: 3, d: '4', e: ['5'], f: { g: '6' } };\n    const matches = matchesProperty('a', object1);\n\n    expect(matches({ a: object1 })).toBe(true);\n    expect(matches({ a: object2 })).toBe(false);\n  });\n\n  it('should match `-0` as `0`', () => {\n    let matches = matchesProperty('a', -0);\n    expect(matches({ a: 0 })).toBe(true);\n\n    matches = matchesProperty('a', 0);\n    expect(matches({ a: -0 })).toBe(true);\n  });\n\n  it('should compare functions by reference', () => {\n    const object1 = { a: noop };\n    const object2 = { a: () => {} };\n    const object3 = { a: {} };\n    const matches = matchesProperty('a', object1);\n\n    expect(matches({ a: object1 })).toBe(true);\n    expect(matches({ a: object2 })).toBe(false);\n    expect(matches({ a: object3 })).toBe(false);\n  });\n\n  it('should work with a function for `srcValue`', () => {\n    function Foo() {}\n    Foo.a = 1;\n    Foo.b = function () {};\n    Foo.c = 3;\n\n    const objects = [{ a: { a: 1 } }, { a: { a: 1, b: Foo.b, c: 3 } }];\n    const actual = objects.map(matchesProperty('a', Foo));\n\n    expect(actual).toEqual([false, true]);\n  });\n\n  it('should work with a non-plain `srcValue`', () => {\n    // eslint-disable-next-line\n    // @ts-ignore\n    function Foo(object) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      Object.assign(this, object);\n    }\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    const object = new Foo({ a: new Foo({ b: 1, c: 2 }) });\n    const matches = matchesProperty('a', { b: 1 });\n\n    expect(matches(object)).toBe(true);\n  });\n\n  it('should partial match arrays', () => {\n    const objects = [{ a: ['b'] }, { a: ['c', 'd'] }];\n    let actual = objects.filter(matchesProperty('a', ['d']));\n\n    expect(actual).toEqual([objects[1]]);\n\n    actual = objects.filter(matchesProperty('a', ['b', 'd']));\n    expect(actual).toEqual([]);\n\n    actual = objects.filter(matchesProperty('a', ['d', 'b']));\n    expect(actual).toEqual([]);\n  });\n\n  it('should partial match arrays with duplicate values', () => {\n    const objects = [{ a: [1, 2] }, { a: [2, 2] }];\n    const actual = objects.filter(matchesProperty('a', [2, 2]));\n\n    expect(actual).toEqual([objects[1]]);\n  });\n\n  it('should partial match arrays of objects', () => {\n    const objects = [\n      {\n        a: [\n          { a: 1, b: 2 },\n          { a: 4, b: 5, c: 6 },\n        ],\n      },\n      {\n        a: [\n          { a: 1, b: 2 },\n          { a: 4, b: 6, c: 7 },\n        ],\n      },\n    ];\n\n    const actual = objects.filter(matchesProperty('a', [{ a: 1 }, { a: 4, b: 5 }]));\n    expect(actual).toEqual([objects[0]]);\n  });\n  it('should partial match maps', () => {\n    if (Map) {\n      const objects = [{ a: new Map() }, { a: new Map() }];\n      objects[0].a.set('a', 1);\n      objects[1].a.set('a', 1);\n      objects[1].a.set('b', 2);\n\n      const map = new Map();\n      map.set('b', 2);\n      let actual = objects.filter(matchesProperty('a', map));\n\n      expect(actual).toEqual([objects[1]]);\n\n      map.delete('b');\n      actual = objects.filter(matchesProperty('a', map));\n\n      expect(actual).toEqual(objects);\n\n      map.set('c', 3);\n      actual = objects.filter(matchesProperty('a', map));\n\n      expect(actual).toEqual([]);\n    }\n  });\n\n  it('should partial match sets', () => {\n    if (Set) {\n      const objects = [{ a: new Set() }, { a: new Set() }];\n      objects[0].a.add(1);\n      objects[1].a.add(1);\n      objects[1].a.add(2);\n\n      const set = new Set();\n      set.add(2);\n      let actual = objects.filter(matchesProperty('a', set));\n\n      expect(actual).toEqual([objects[1]]);\n\n      set.delete(2);\n      actual = objects.filter(matchesProperty('a', set));\n\n      expect(actual).toEqual(objects);\n\n      set.add(3);\n      actual = objects.filter(matchesProperty('a', set));\n\n      expect(actual).toEqual([]);\n    }\n  });\n\n  it('should match `undefined` values', () => {\n    let objects: any[] = [{ a: 1 }, { a: 1, b: 1 }, { a: 1, b: undefined }];\n    let actual = objects.map(matchesProperty('b', undefined));\n    const expected = [false, false, true];\n\n    expect(actual).toEqual(expected);\n\n    objects = [\n      { a: { a: 1 } },\n      { a: { a: 1, b: 1 } },\n      {\n        a: { a: 1, b: undefined },\n      },\n    ];\n    actual = objects.map(matchesProperty('a', { b: undefined }));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match `undefined` values of nested objects', () => {\n    const object = { a: { b: undefined } };\n\n    ['a.b', ['a', 'b']].forEach(path => {\n      const matches = matchesProperty(path, undefined);\n      expect(matches(object)).toBe(true);\n    });\n\n    ['a.a', ['a', 'a']].forEach(path => {\n      const matches = matchesProperty(path, undefined);\n      expect(matches(object)).toBe(false);\n    });\n  });\n\n  it('should match `undefined` values on primitives', () => {\n    numberProto.a = 1;\n    numberProto.b = undefined;\n\n    try {\n      // eslint-disable-next-line\n      var matches = matchesProperty('b', undefined);\n      expect(matches(1)).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n    numberProto.a = { b: 1, c: undefined };\n    try {\n      matches = matchesProperty('a', { c: undefined });\n      expect(matches(1)).toBe(true);\n    } catch (e: any) {\n      expect(false, e.message);\n    }\n    delete numberProto.a;\n    delete numberProto.b;\n  });\n\n  it('should return `true` when comparing a `srcValue` of empty arrays and objects', () => {\n    const objects = [\n      { a: [1], b: { c: 1 } },\n      { a: [2, 3], b: { d: 2 } },\n    ];\n    const matches = matchesProperty('a', { a: [], b: {} });\n\n    const actual = objects.filter(object => matches({ a: object }));\n\n    expect(actual).toEqual(objects);\n  });\n\n  it('should not change behavior if `srcValue` is modified', () => {\n    [{ a: { b: 2, c: 3 } }, { a: 1, b: 2 }, { a: 1 }].forEach((source: any, index) => {\n      const object = cloneDeep(source);\n      const matches = matchesProperty('a', source);\n\n      expect(matches({ a: object })).toBe(true);\n\n      if (index) {\n        source.a = 2;\n        source.b = 1;\n        source.c = 3;\n      } else {\n        source.a.b = 1;\n        source.a.c = 2;\n        source.a.d = 3;\n      }\n      expect(matches({ a: object })).toBe(true);\n      expect(matches({ a: source })).toBe(false);\n    });\n  });\n\n  it('should correctly match the boolean property value', () => {\n    const truthy = { a: true };\n    const falsey = { a: false };\n    const matches = matchesProperty('a', false);\n\n    expect(matches(truthy)).toBe(false);\n    expect(matches(falsey)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(matchesProperty).toEqualTypeOf<typeof matchesPropertyLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/predicate/matchesProperty.ts",
    "content": "import { isMatch } from './isMatch.ts';\nimport type { PropertyPath } from '../_internal/PropertyPath.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { cloneDeep } from '../object/cloneDeep.ts';\nimport { get } from '../object/get.ts';\nimport { has } from '../object/has.ts';\n\n/**\n * Creates a function that checks if a given target object matches a specific property value.\n *\n * @template T\n * @template V\n * @param {PropertyPath} path - The property path to check within the target object.\n * @param {T} srcValue - The value to compare against the property value in the target object.\n * @returns {(value: any) => boolean} Returns a function that takes a target object and returns\n *     `true` if the property value at the given path in the target object matches the provided value,\n *     otherwise returns `false`.\n *\n * @example\n * const checkName = matchesProperty('name', 'Alice');\n * console.log(checkName({ name: 'Alice' })); // true\n * console.log(checkName({ name: 'Bob' })); // false\n */\nexport function matchesProperty<T>(path: PropertyPath, srcValue: T): (value: any) => boolean;\n\n/**\n * Creates a function that checks if a given target object matches a specific property value.\n *\n * @template T\n * @template V\n * @param {PropertyPath} path - The property path to check within the target object.\n * @param {T} srcValue - The value to compare against the property value in the target object.\n * @returns {(value: V) => boolean} Returns a function that takes a target object and returns\n *     `true` if the property value at the given path in the target object matches the provided value,\n *     otherwise returns `false`.\n *\n * @example\n * const checkNested = matchesProperty(['address', 'city'], 'New York');\n * console.log(checkNested({ address: { city: 'New York' } })); // true\n * console.log(checkNested({ address: { city: 'Los Angeles' } })); // false\n */\nexport function matchesProperty<T, V>(path: PropertyPath, srcValue: T): (value: V) => boolean;\n\n/**\n * Creates a function that checks if a given target object matches a specific property value.\n *\n * The returned function takes a target object and determines if the property at the\n * specified path within the target object is equal to the given value.\n *\n * @param {PropertyPath} property - The property path to check within the target object.\n *     This can be a single property key or an array of property keys.\n * @param {T} source - The value to compare against the property value in the target object.\n *\n * @returns {(target?: V) => boolean} - A function that takes a target object and returns\n *     `true` if the property value at the given path in the target object matches the provided value,\n *     otherwise returns `false`.\n *\n * @example\n * // Using a single property key\n * const checkName = matchesProperty('name', 'Alice');\n * console.log(checkName({ name: 'Alice' })); // true\n * console.log(checkName({ name: 'Bob' })); // false\n *\n * // Using an array of property keys\n * const checkNested = matchesProperty(['address', 'city'], 'New York');\n * console.log(checkNested({ address: { city: 'New York' } })); // true\n * console.log(checkNested({ address: { city: 'Los Angeles' } })); // false\n */\nexport function matchesProperty<T, V>(property: PropertyPath, source: T): (target?: V) => boolean {\n  switch (typeof property) {\n    case 'object': {\n      if (Object.is(property?.valueOf(), -0)) {\n        property = '-0';\n      }\n      break;\n    }\n    case 'number': {\n      property = toKey(property);\n      break;\n    }\n  }\n\n  source = cloneDeep(source);\n\n  return function (target?: unknown) {\n    const result = get(target, property as PropertyKey | PropertyKey[]);\n\n    if (result === undefined) {\n      return has(target, property as PropertyKey | PropertyKey[]);\n    }\n\n    if (source === undefined) {\n      return result === undefined;\n    }\n\n    return isMatch(result, source as object);\n  };\n}\n"
  },
  {
    "path": "src/compat/string/camelCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { camelCase as camelCaseLodash } from 'lodash';\nimport { camelCase } from './camelCase';\n\ndescribe('camelCase', () => {\n  it('should work with numbers', () => {\n    expect(camelCase('12 feet')).toBe('12Feet');\n    expect(camelCase('enable 6h format')).toBe('enable6HFormat');\n    expect(camelCase('enable 24H format')).toBe('enable24HFormat');\n    expect(camelCase('too legit 2 quit')).toBe('tooLegit2Quit');\n    expect(camelCase('walk 500 miles')).toBe('walk500Miles');\n    expect(camelCase('xhr2 request')).toBe('xhr2Request');\n  });\n\n  it('should handle acronyms', () => {\n    expect(camelCase('safe HTML')).toBe('safeHtml');\n    expect(camelCase('safeHTML')).toBe('safeHtml');\n\n    expect(camelCase('escape HTML entities')).toBe('escapeHtmlEntities');\n    expect(camelCase('escapeHTMLEntities')).toBe('escapeHtmlEntities');\n\n    expect(camelCase('XMLHttpRequest')).toBe('xmlHttpRequest');\n    expect(camelCase('XmlHTTPRequest')).toBe('xmlHttpRequest');\n\n    // As Lodash test codes, it should be 'ids'. But real lodash returns 'iDs'.\n    expect(camelCase('IDs')).toBe('iDs');\n    // As Lodash test codes, it should be 'productXmls'. But real lodash returns 'productXmLs'.\n    expect(camelCase('Product XMLs')).toBe('productXmLs');\n  });\n\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it('should convert string to camel case', () => {\n    const actual = strings.map(camelCase);\n    const expected = strings.map(() => 'fooBar');\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to camel case, identical to lodash', () => {\n    expect(camelCase('åäöÅÄÖ')).toBe('aaoAao');\n    expect(camelCase('helloÅäöWorld')).toBe('helloAaoWorld');\n    expect(camelCase('café')).toBe('cafe');\n    expect(camelCase('naïve')).toBe('naive');\n    expect(camelCase('Zürich')).toBe('zurich');\n    expect(camelCase('São Paulo')).toBe('saoPaulo');\n    expect(camelCase('Москва')).toBe('москва');\n  });\n\n  it('should handle double-converting strings', () => {\n    const actual = strings.map(str => camelCase(camelCase(str)));\n    const expected = strings.map(() => 'fooBar');\n    expect(actual).toEqual(expected);\n  });\n\n  it('should remove contraction apostrophes', () => {\n    const apostrophes = [\"'\", '\\u2019'];\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    const actual = apostrophes.map(apostrophe => postfixes.map(postfix => camelCase(`a b${apostrophe}${postfix} c`)));\n    const expected = apostrophes.map(() => postfixes.map(postfixes => `aB${postfixes}C`));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should remove remove Latin mathematical operators', () => {\n    expect(camelCase('\\xd7')).toBe('');\n    expect(camelCase('\\xf7')).toBe('');\n  });\n\n  it('should coerce string to a string', () => {\n    expect(camelCase(Object('foo bar'))).toBe('fooBar');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(camelCase({ toString: () => 'foo bar' })).toBe('fooBar');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(camelCase).toEqualTypeOf<typeof camelCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/camelCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { camelCase as camelCaseToolkit } from '../../string/camelCase.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts a string to camel case.\n *\n * Camel case is the naming convention in which the first word is written in lowercase and\n * each subsequent word begins with a capital letter, concatenated without any separator characters.\n *\n * @param {string | object} str - The string that is to be changed to camel case.\n * @returns {string} - The converted string to camel case.\n *\n * @example\n * const convertedStr1 = camelCase('camelCase') // returns 'camelCase'\n * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'\n * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'\n * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'\n */\n\nexport function camelCase(str?: string): string {\n  return camelCaseToolkit(normalizeForCase(deburr(str)));\n}\n"
  },
  {
    "path": "src/compat/string/capitalize.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { capitalize as capitalizeLodash } from 'lodash';\nimport { capitalize } from './capitalize';\n\ndescribe('capitalize', () => {\n  it('should capitalize the first character of a string', () => {\n    expect(capitalize('fred')).toBe('Fred');\n    expect(capitalize('Fred')).toBe('Fred');\n    expect(capitalize(' fred')).toBe(' fred');\n  });\n\n  it('should match the type of lodash', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expectTypeOf(capitalize).toEqualTypeOf<typeof capitalizeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/capitalize.ts",
    "content": "import { capitalize as capitalizeToolkit } from '../../string/capitalize.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts the first character of string to upper case and the remaining to lower case.\n *\n * @param {string} string - The string to capitalize.\n * @returns {string} - The capitalized string.\n *\n * @example\n * const convertedStr1 = capitalize('fred') // returns 'Fred'\n * const convertedStr2 = capitalize('FRED') // returns 'Fred'\n * const convertedStr3 = capitalize('') // returns ''\n */\nexport function capitalize<T extends string>(str?: T): string extends T ? string : Capitalize<Lowercase<T>> {\n  return capitalizeToolkit(toString(str)) as string extends T ? string : Capitalize<Lowercase<T>>;\n}\n"
  },
  {
    "path": "src/compat/string/deburr.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { deburr as deburrLodash } from 'lodash';\nimport { deburr } from './deburr';\nimport { burredLetters } from '../../_internal/burredLetters';\nimport { comboMarks } from '../../_internal/comboMarks';\nimport { deburredLetters } from '../../_internal/deburredLetters';\nimport { map } from '../array/map';\nimport { constant } from '../util/constant';\nimport { stubString } from '../util/stubString';\n\ndescribe('deburr', () => {\n  it('should convert Latin Unicode letters to basic Latin', () => {\n    const actual = map(burredLetters, deburr);\n    expect(actual).toEqual(deburredLetters);\n  });\n\n  it('should not deburr Latin mathematical operators', () => {\n    const operators = ['\\xd7', '\\xf7'];\n    const actual = map(operators, deburr);\n\n    expect(actual).toEqual(operators);\n  });\n\n  it('should deburr combining diacritical marks', () => {\n    const expected = map(comboMarks, constant('ei'));\n\n    const actual = map(comboMarks, chr => deburr(`e${chr}i`));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = map(values, stubString);\n\n    const actual = map(values, (value, index) => (index ? deburr(value as any) : deburr()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(deburr).toEqualTypeOf<typeof deburrLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/deburr.ts",
    "content": "import { deburr as deburrToolkit } from '../../string/deburr.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.\n * For example, \"Crème brûlée\" becomes \"Creme brulee\".\n *\n * @param {string} str - The input string to be deburred.\n * @returns {string} - The deburred string with special characters replaced by their ASCII equivalents.\n *\n * @example\n * // Basic usage:\n * deburr('Æthelred') // returns 'Aethelred'\n *\n * @example\n * // Handling diacritical marks:\n * deburr('München') // returns 'Munchen'\n *\n * @example\n * // Special characters:\n * deburr('Crème brûlée') // returns 'Creme brulee'\n */\nexport function deburr(str?: string): string {\n  return deburrToolkit(toString(str));\n}\n"
  },
  {
    "path": "src/compat/string/endsWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { endsWith as endsWithLodash } from 'lodash';\nimport { endsWith } from './endsWith';\n\ndescribe('endsWith', () => {\n  it('should return true if the string ends with the target string', () => {\n    expect(endsWith('fooBar', 'Bar')).toEqual(true);\n  });\n\n  it('should return false if the string does not end with the target string', () => {\n    expect(endsWith('fooBar', 'abc')).toEqual(false);\n  });\n\n  it('should return false if the string does not end with the target string, but does contain it', () => {\n    expect(endsWith('fooBar', 'foo')).toEqual(false);\n  });\n\n  it('should return true if the target string is an empty string', () => {\n    expect(endsWith('fooBar', '')).toEqual(true);\n  });\n\n  it('should return true if the string and target string are empty strings', () => {\n    expect(endsWith('', '')).toEqual(true);\n  });\n\n  it('should return false if the string past the provided position does not end with the target string', () => {\n    expect(endsWith('fooBar', 'foo', 5)).toEqual(false);\n  });\n\n  it('should return true if the string before the provided position ends with the target string', () => {\n    expect(endsWith('fooBar123', 'foo', 3)).toEqual(true);\n  });\n\n  const string = 'abc';\n\n  it('should return `true` if a string ends with `target`', () => {\n    expect(endsWith(string, 'c')).toBe(true);\n  });\n\n  it('should return `false` if a string does not end with `target`', () => {\n    expect(endsWith(string, 'b')).toBe(false);\n  });\n\n  it('should work with a `position`', () => {\n    expect(endsWith(string, 'b', 2)).toBe(true);\n  });\n\n  it('should work with `position` >= `length`', () => {\n    expect(endsWith(string, 'c', 3)).toBe(true);\n    expect(endsWith(string, 'c', 5)).toBe(true);\n    expect(endsWith(string, 'c', Number.MAX_SAFE_INTEGER)).toBe(true);\n    expect(endsWith(string, 'c', Infinity)).toBe(true);\n  });\n\n  it('should treat a negative `position` as `0`', () => {\n    expect(endsWith(string, string[0], -1)).toBe(false);\n    expect(endsWith(string, string[1], -1)).toBe(false);\n    expect(endsWith(string, string[2], -1)).toBe(false);\n    expect(endsWith(string, '', -1)).toBe(true);\n\n    expect(endsWith(string, string[0], -3)).toBe(false);\n    expect(endsWith(string, string[1], -3)).toBe(false);\n    expect(endsWith(string, string[2], -3)).toBe(false);\n    expect(endsWith(string, '', -3)).toBe(true);\n\n    expect(endsWith(string, string[0], -Infinity)).toBe(false);\n    expect(endsWith(string, string[1], -Infinity)).toBe(false);\n    expect(endsWith(string, string[2], -Infinity)).toBe(false);\n    expect(endsWith(string, '', -Infinity)).toBe(true);\n  });\n\n  it('should coerce `position` to an integer', () => {\n    expect(endsWith(string, 'ab', 2.2)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(endsWith).toEqualTypeOf<typeof endsWithLodash>();\n  });\n\n  it('should return false when str or target is undefined', () => {\n    expect(endsWith(undefined, 'test')).toBe(false);\n    expect(endsWith('test', undefined)).toBe(false);\n    expect(endsWith(undefined, undefined)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/compat/string/endsWith.ts",
    "content": "/**\n * Checks if a string contains another string at the end of the string.\n *\n * Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index.\n *\n * @param {string} str - The string that might contain the target string.\n * @param {string} target - The string to search for.\n * @param {number} position - An optional position from the start to search up to this index\n * @returns {boolean} - True if the str string ends with the target string.\n *\n * @example\n * const isPrefix = endsWith('fooBar', 'foo') // returns true\n * const isPrefix = endsWith('fooBar', 'bar') // returns false\n * const isPrefix = endsWith('fooBar', 'abc') // returns false\n * const isPrefix = endsWith('fooBar', 'foo', 3) // returns true\n * const isPrefix = endsWith('fooBar', 'abc', 5) // returns false\n */\nexport function endsWith(str?: string, target?: string, position?: number): boolean {\n  if (str == null || target == null) {\n    return false;\n  }\n\n  if (position == null) {\n    position = str.length;\n  }\n\n  return str.endsWith(target, position);\n}\n"
  },
  {
    "path": "src/compat/string/escape.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { escape as escapeLodash } from 'lodash';\nimport { escape, unescape } from '../index';\n\ndescribe('escape', () => {\n  let escaped = '&amp;&lt;&gt;&quot;&#39;/';\n  let unescaped = '&<>\"\\'/';\n\n  escaped += escaped;\n  unescaped += unescaped;\n\n  it('should escape values', () => {\n    expect(escape(unescaped)).toBe(escaped);\n  });\n\n  it('should handle undefined', () => {\n    expect(escape(undefined)).toBe('');\n  });\n\n  it('should handle strings with nothing to escape', () => {\n    expect(escape('abc')).toBe('abc');\n  });\n\n  it('should escape the same characters unescaped by `_.unescape`', () => {\n    expect(escape(unescape(escaped))).toBe(escaped);\n  });\n\n  ['`', '/'].forEach(chr => {\n    it(`should not escape the \"${chr}\" character`, () => {\n      expect(escape(chr)).toBe(chr);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(escape).toEqualTypeOf<typeof escapeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/escape.ts",
    "content": "import { escape as escapeToolkit } from '../../string/escape.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `str` to their corresponding HTML entities.\n * For example, \"<\" becomes \"&lt;\".\n *\n * @param {string} str  The string to escape.\n * @returns {string} Returns the escaped string.\n *\n * @example\n * escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'\n * escape('This is a \"quote\"'); // returns 'This is a &quot;quote&quot;'\n * escape(\"This is a 'quote'\"); // returns 'This is a &#39;quote&#39;'\n * escape('This is a & symbol'); // returns 'This is a &amp; symbol'\n */\nexport function escape(string?: string): string {\n  return escapeToolkit(toString(string));\n}\n"
  },
  {
    "path": "src/compat/string/escapeRegExp.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { escapeRegExp as escapeRegExpLodash } from 'lodash';\nimport { escapeRegExp } from './escapeRegExp';\nimport { map } from '../array/map';\nimport { stubString } from '../util/stubString';\n\ndescribe('escapeRegExp', () => {\n  const escaped = '\\\\^\\\\$\\\\.\\\\*\\\\+\\\\?\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}\\\\|\\\\\\\\';\n  const unescaped = '^$.*+?()[]{}|\\\\';\n\n  it('should escape values', () => {\n    expect(escapeRegExp(unescaped + unescaped)).toBe(escaped + escaped);\n  });\n\n  it('should handle strings with nothing to escape', () => {\n    expect(escapeRegExp('abc')).toBe('abc');\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = map(values, stubString);\n\n    const actual = map(values, (value, index) => (index ? escapeRegExp(value as any) : escapeRegExp()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(escapeRegExp).toEqualTypeOf<typeof escapeRegExpLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/escapeRegExp.ts",
    "content": "import { escapeRegExp as escapeRegExpToolkit } from '../../string/escapeRegExp.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Escapes the RegExp special characters \"^\", \"$\", \"\\\\\", \".\", \"*\", \"+\", \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `str`.\n *\n * @param {string} str The string to escape.\n * @returns {string} Returns the escaped string.\n *\n * @example\n * import { escapeRegExp } from 'es-toolkit/string';\n *\n * escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\\[es-toolkit\\]\\(https://es-toolkit\\.dev/\\)'\n */\nexport function escapeRegExp(str?: string): string {\n  return escapeRegExpToolkit(toString(str));\n}\n"
  },
  {
    "path": "src/compat/string/kebabCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { kebabCase as kebabCaseLodash } from 'lodash';\nimport { kebabCase } from './kebabCase';\n\ndescribe('kebabCase', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it(`should convert \\`string\\``, () => {\n    const actual = strings.map(string => kebabCase(string));\n\n    const expected = strings.map(() => 'foo-bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to snake case, identical to lodash', () => {\n    expect(kebabCase('åäöÅÄÖ')).toBe('aao-aao');\n    expect(kebabCase('helloÅäöWorld')).toBe('hello-aao-world');\n    expect(kebabCase('café')).toBe('cafe');\n    expect(kebabCase('naïve')).toBe('naive');\n    expect(kebabCase('Zürich')).toBe('zurich');\n    expect(kebabCase('São Paulo')).toBe('sao-paulo');\n    expect(kebabCase('Москва')).toBe('москва');\n  });\n\n  it(`should handle double-converting strings`, () => {\n    const actual = strings.map(string => kebabCase(kebabCase(string)));\n\n    const expected = strings.map(() => 'foo-bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should remove contraction apostrophes`, () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => kebabCase(`a b${apos}${postfix} c`));\n\n      const expected = postfixes.map(postfix => `a-b${postfix}-c`);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should remove Latin mathematical operators`, () => {\n    const actual = ['\\xd7', '\\xf7'].map(kebabCase);\n    expect(actual).toEqual(['', '']);\n  });\n\n  it(`should coerce \\`string\\` to a string`, () => {\n    const string = 'foo bar';\n    expect(kebabCase(Object(string))).toBe('foo-bar');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(kebabCase({ toString: () => string })).toBe('foo-bar');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(kebabCase).toEqualTypeOf<typeof kebabCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/kebabCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { kebabCase as kebabCaseToolkit } from '../../string/kebabCase.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts a string to kebab case.\n *\n * Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.\n *\n * @param {string | object} str - The string that is to be changed to kebab case.\n * @returns {string} - The converted string to kebab case.\n *\n * @example\n * const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'\n * const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'\n * const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'\n * const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'\n */\nexport function kebabCase(str?: string): string {\n  return kebabCaseToolkit(normalizeForCase(deburr(str)));\n}\n"
  },
  {
    "path": "src/compat/string/lowerCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { lowerCase as lowerCaseLodash } from 'lodash';\nimport { lowerCase } from './lowerCase';\n\ndescribe('lowerCase', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it(`should convert \\`string\\``, () => {\n    const actual = strings.map(string => lowerCase(string));\n\n    const expected = strings.map(() => 'foo bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to lower case, identical to lodash', () => {\n    expect(lowerCase('åäöÅÄÖ')).toBe('aao aao');\n    expect(lowerCase('helloÅäöWorld')).toBe('hello aao world');\n    expect(lowerCase('café')).toBe('cafe');\n    expect(lowerCase('naïve')).toBe('naive');\n    expect(lowerCase('Zürich')).toBe('zurich');\n    expect(lowerCase('São Paulo')).toBe('sao paulo');\n    expect(lowerCase('Москва')).toBe('москва');\n  });\n\n  it(`should handle double-converting strings`, () => {\n    const actual = strings.map(string => lowerCase(lowerCase(string)));\n\n    const expected = strings.map(() => 'foo bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should remove contraction apostrophes`, () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => lowerCase(`a b${apos}${postfix} c`));\n\n      const expected = postfixes.map(postfix => `a b${postfix} c`);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should remove Latin mathematical operators`, () => {\n    const actual = ['\\xd7', '\\xf7'].map(lowerCase);\n    expect(actual).toEqual(['', '']);\n  });\n\n  it(`should coerce \\`string\\` to a string`, () => {\n    const string = 'foo bar';\n    expect(lowerCase(Object(string))).toBe('foo bar');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(lowerCase({ toString: () => string })).toBe('foo bar');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(lowerCase).toEqualTypeOf<typeof lowerCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/lowerCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { lowerCase as lowerCaseToolkit } from '../../string/lowerCase.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts a string to lower case.\n *\n * Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.\n *\n * @param {string | object} str - The string that is to be changed to lower case.\n * @returns {string} - The converted string to lower case.\n *\n * @example\n * const convertedStr1 = lowerCase('camelCase') // returns 'camel case'\n * const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'\n * const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'\n * const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'\n */\nexport function lowerCase(str?: string): string {\n  return lowerCaseToolkit(normalizeForCase(deburr(str)));\n}\n"
  },
  {
    "path": "src/compat/string/lowerFirst.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { lowerFirst as lowerFirstLodash } from 'lodash';\nimport { lowerFirst } from './lowerFirst';\nimport { map } from '../array/map';\nimport { stubString } from '../util/stubString';\n\ndescribe('lowerFirst', () => {\n  it('should lowercase only the first character', () => {\n    expect(lowerFirst('fred')).toBe('fred');\n    expect(lowerFirst('Fred')).toBe('fred');\n    expect(lowerFirst('FRED')).toBe('fRED');\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = map(values, stubString);\n\n    const actual = map(values, (value, index) => (index ? lowerFirst(value as any) : lowerFirst()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(lowerFirst).toEqualTypeOf<typeof lowerFirstLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/lowerFirst.ts",
    "content": "import { lowerFirst as lowerFirstToolkit } from '../../string/lowerFirst.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts the first character of string to lower case.\n *\n * @param {string} str - The string that is to be changed\n * @returns {string} - The converted string.\n *\n * @example\n * const convertedStr1 = lowerCase('fred') // returns 'fred'\n * const convertedStr2 = lowerCase('Fred') // returns 'fred'\n * const convertedStr3 = lowerCase('FRED') // returns 'fRED'\n */\nexport function lowerFirst<T extends string = string>(str?: T): Uncapitalize<T> {\n  return lowerFirstToolkit(toString(str)) as Uncapitalize<T>;\n}\n"
  },
  {
    "path": "src/compat/string/pad.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { pad as padLodash } from 'lodash';\nimport { pad } from './pad';\n\ndescribe('pad', () => {\n  it(`\\`pad\\` should not pad if string is >= \\`length\\``, () => {\n    expect(pad('abc', 2)).toBe('abc');\n    expect(pad('abc', 3)).toBe('abc');\n  });\n\n  it(`\\`pad\\` should treat negative \\`length\\` as \\`0\\``, () => {\n    [0, -2].forEach(length => {\n      expect(pad('abc', length)).toBe('abc');\n    });\n  });\n\n  it(`\\`pad\\` should coerce \\`length\\` to a number`, () => {\n    ['', '4'].forEach(length => {\n      const actual = length ? 'abc ' : 'abc';\n      // @ts-expect-error - invalid length\n      expect(pad('abc', length)).toBe(actual);\n    });\n  });\n\n  it(`\\`pad\\` should treat nullish values as empty strings`, () => {\n    [undefined, '_-'].forEach(chars => {\n      const expected = chars ? '__' : '  ';\n      // @ts-expect-error - invalid string\n      expect(pad(null, 2, chars)).toBe(expected);\n      expect(pad(undefined, 2, chars)).toBe(expected);\n      expect(pad('', 2, chars)).toBe(expected);\n    });\n  });\n\n  it(`\\`pad\\` should return \\`string\\` when \\`chars\\` coerces to an empty string`, () => {\n    const values = ['', Object('')];\n    const expected = values.map(() => 'abc');\n\n    const actual = values.map(value => pad('abc', 6, value));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should pad a string to a given length', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, undefined];\n    const expected = values.map(() => ' abc  ');\n\n    const actual = values.map((value, index) => (index ? pad('abc', 6, value) : pad('abc', 6)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should truncate pad characters to fit the pad length', () => {\n    expect(pad('abc', 8)).toBe('  abc   ');\n    expect(pad('abc', 8, '_-')).toBe('_-abc_-_');\n  });\n\n  it('should coerce `string` to a string', () => {\n    const values = [Object('abc'), { toString: () => 'abc' }];\n    const expected = values.map(() => true);\n\n    const actual = values.map(value => pad(value, 6) === ' abc  ');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(pad).toEqualTypeOf<typeof padLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/pad.ts",
    "content": "import { pad as padToolkit } from '../../string/pad.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.\n *\n * @param {string} str - The string to pad.\n * @param {number} [length] - The length of the resulting string once padded.\n * @param {string} [chars] - The character(s) to use for padding.\n * @returns {string} - The padded string, or the original string if padding is not required.\n *\n * @example\n * const result1 = pad('abc', 8);         // result will be '  abc   '\n * const result2 = pad('abc', 8, '_-');   // result will be '_-abc_-_'\n * const result3 = pad('abc', 3);         // result will be 'abc'\n * const result4 = pad('abc', 2);         // result will be 'abc'\n *\n */\nexport function pad(str?: string, length?: number, chars?: string): string;\n\n/**\n * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.\n *\n * @param {string} str - The string to pad.\n * @param {number} [length] - The length of the resulting string once padded.\n * @param {string} [chars] - The character(s) to use for padding.\n * @returns {string} - The padded string, or the original string if padding is not required.\n *\n * @example\n * const result1 = pad('abc', 8);         // result will be '  abc   '\n * const result2 = pad('abc', 8, '_-');   // result will be '_-abc_-_'\n * const result3 = pad('abc', 3);         // result will be 'abc'\n * const result4 = pad('abc', 2);         // result will be 'abc'\n *\n */\nexport function pad(str: any, length?: any, chars?: any): string {\n  return padToolkit(toString(str), length, chars);\n}\n"
  },
  {
    "path": "src/compat/string/padEnd.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { padEnd as padEndLodash } from 'lodash';\nimport { padEnd } from './padEnd';\n\ndescribe('padEnd', () => {\n  it('should return the original string if no length and char is provided', () => {\n    expect(padEnd('abc')).toBe('abc');\n  });\n\n  it('should pad a string on the right side if it is shorter than the length', () => {\n    expect(padEnd('abc', 6)).toBe('abc   ');\n  });\n\n  it('should pad a string on the right side with custom characters', () => {\n    expect(padEnd('abc', 6, '_-')).toBe('abc_-_');\n  });\n\n  it('should not pad a string if it has the same length', () => {\n    expect(padEnd('abc', 3)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is less than the string length', () => {\n    expect(padEnd('abc', 2)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not a number', () => {\n    expect(padEnd('abc', NaN)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not an integer', () => {\n    expect(padEnd('abc', 3.5)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is negative', () => {\n    expect(padEnd('abc', -3)).toBe('abc');\n  });\n\n  it(`\\`padEnd\\` should not pad if string is >= \\`length\\``, () => {\n    expect(padEnd('abc', 2)).toBe('abc');\n    expect(padEnd('abc', 3)).toBe('abc');\n  });\n\n  it(`\\`padEnd\\` should treat negative \\`length\\` as \\`0\\``, () => {\n    [0, -2].forEach(length => {\n      expect(padEnd('abc', length)).toBe('abc');\n    });\n  });\n\n  it(`\\`padEnd\\` should coerce \\`length\\` to a number`, () => {\n    ['', '4'].forEach(length => {\n      const actual = length ? 'abc ' : 'abc';\n      // @ts-expect-error - invalid length\n      expect(padEnd('abc', length)).toBe(actual);\n    });\n  });\n\n  it(`\\`padEnd\\` should treat nullish values as empty strings`, () => {\n    [undefined, '_-'].forEach(chars => {\n      const expected = chars ? chars : '  ';\n      // @ts-expect-error - invalid string\n      expect(padEnd(null, 2, chars)).toBe(expected);\n      expect(padEnd(undefined, 2, chars)).toBe(expected);\n      expect(padEnd('', 2, chars)).toBe(expected);\n    });\n  });\n\n  it('should pad a string to a given length', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, undefined];\n    const expected = values.map(() => 'abc   ');\n\n    const actual = values.map((value, index) => (index ? padEnd('abc', 6, value) : padEnd('abc', 6)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should truncate pad characters to fit the pad length', () => {\n    expect(padEnd('abc', 6, '_-')).toBe('abc_-_');\n  });\n\n  it('should coerce `string` to a string', () => {\n    const values = [Object('abc'), { toString: () => 'abc' }];\n    const expected = values.map(() => true);\n\n    const actual = values.map(value => padEnd(value, 6) === 'abc   ');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(padEnd).toEqualTypeOf<typeof padEndLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/padEnd.ts",
    "content": "import { toString } from '../util/toString.ts';\n\n/**\n * Pads the end of a string with a given character until it reaches the specified length.\n *\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string,\n * the original string is returned unchanged.\n *\n * @param {string} str - The string to pad.\n * @param {number} [length] - The length of the resulting string once padded.\n * @param {string} [chars] - The character(s) to use for padding.\n * @returns {string} - The padded string, or the original string if padding is not required.\n *\n * @example\n * const result1 = padEnd('abc', 6);          // result will be 'abc   '\n * const result2 = padEnd('abc', 6, '_-');    // result will be 'abc_-_'\n * const result3 = padEnd('abc', 3);          // result will be 'abc'\n * const result4 = padEnd('abc', 2);          // result will be 'abc'\n */\n\nexport function padEnd(str?: string, length = 0, chars = ' '): string {\n  return toString(str).padEnd(length, chars);\n}\n"
  },
  {
    "path": "src/compat/string/padStart.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { padStart as padStartLodash } from 'lodash';\nimport { padStart } from './padStart';\n\ndescribe('padStart', () => {\n  it('should return the original string if no length and char is provided', () => {\n    expect(padStart('abc')).toBe('abc');\n  });\n\n  it('should pad a string on the left side if it is shorter than the length', () => {\n    expect(padStart('abc', 6)).toBe('   abc');\n  });\n\n  it('should pad a string on the left side with custom characters', () => {\n    expect(padStart('abc', 6, '_-')).toBe('_-_abc');\n  });\n\n  it('should not pad a string if it has the same length', () => {\n    expect(padStart('abc', 3)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is less than the string length', () => {\n    expect(padStart('abc', 2)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not a number', () => {\n    expect(padStart('abc', NaN)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not an integer', () => {\n    expect(padStart('abc', 3.5)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is negative', () => {\n    expect(padStart('abc', -3)).toBe('abc');\n  });\n\n  it(`\\`padStart\\` should not pad if string is >= \\`length\\``, () => {\n    expect(padStart('abc', 2)).toBe('abc');\n    expect(padStart('abc', 3)).toBe('abc');\n  });\n\n  it(`\\`padStart\\` should treat negative \\`length\\` as \\`0\\``, () => {\n    [0, -2].forEach(length => {\n      expect(padStart('abc', length)).toBe('abc');\n    });\n  });\n\n  it(`\\`padStart\\` should coerce \\`length\\` to a number`, () => {\n    ['', '4'].forEach(length => {\n      const actual = length ? ' abc' : 'abc';\n      // @ts-expect-error - invalid length\n      expect(padStart('abc', length)).toBe(actual);\n    });\n  });\n\n  it(`\\`padStart\\` should treat nullish values as empty strings`, () => {\n    [undefined, '_-'].forEach(chars => {\n      const expected = chars ? chars : '  ';\n      // @ts-expect-error - invalid string\n      expect(padStart(null, 2, chars)).toBe(expected);\n      expect(padStart(undefined, 2, chars)).toBe(expected);\n      expect(padStart('', 2, chars)).toBe(expected);\n    });\n  });\n\n  it('should pad a string to a given length', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, undefined];\n    const expected = values.map(() => '   abc');\n\n    const actual = values.map((value, index) => (index ? padStart('abc', 6, value) : padStart('abc', 6)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should truncate pad characters to fit the pad length', () => {\n    expect(padStart('abc', 6, '_-')).toBe('_-_abc');\n  });\n\n  it('should coerce `string` to a string', () => {\n    const values = [Object('abc'), { toString: () => 'abc' }];\n    const expected = values.map(() => true);\n\n    const actual = values.map(value => padStart(value, 6) === '   abc');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(padStart).toEqualTypeOf<typeof padStartLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/padStart.ts",
    "content": "import { toString } from '../util/toString.ts';\n\n/**\n * Pads the start of a string with a given character until it reaches the specified length.\n *\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string,\n * the original string is returned unchanged.\n *\n * @param {string} str - The string to pad.\n * @param {number} [length] - The length of the resulting string once padded.\n * @param {string} [chars] - The character(s) to use for padding.\n * @returns {string} - The padded string, or the original string if padding is not required.\n *\n * @example\n * const result1 = padStart('abc', 6);          // result will be '   abc'\n * const result2 = padStart('abc', 6, '_-');    // result will be '_-_abc'\n * const result3 = padStart('abc', 3);          // result will be 'abc'\n * const result4 = padStart('abc', 2);          // result will be 'abc'\n */\nexport function padStart(str?: string, length = 0, chars = ' '): string {\n  return toString(str).padStart(length, chars);\n}\n"
  },
  {
    "path": "src/compat/string/repeat.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { repeat as repeatLodash } from 'lodash';\nimport { repeat } from './repeat';\n\ndescribe('padStart', () => {\n  it('repeat abc 0', () => {\n    expect(repeat('abc', 0)).toBe('');\n  });\n\n  it('repeat abc 3', () => {\n    expect(repeat('abc', 3)).toBe('abcabcabc');\n  });\n\n  it('should be used as a iteratee', () => {\n    const array = ['a', 'b', 'c'];\n    const actual = array.map(repeat);\n    expect(actual).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should return empty string when n is less than 1', () => {\n    expect(repeat('abc', 0)).toBe('');\n    expect(repeat('abc', -1)).toBe('');\n    expect(repeat('abc', -5)).toBe('');\n    expect(repeat('abc', 0.5)).toBe('');\n  });\n\n  it('should return empty string when n is greater than MAX_SAFE_INTEGER', () => {\n    const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n    expect(repeat('abc', MAX_SAFE_INTEGER + 1)).toBe('');\n    expect(repeat('abc', Infinity)).toBe('');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(repeat).toEqualTypeOf<typeof repeatLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/repeat.ts",
    "content": "import { isIterateeCall } from '../_internal/isIterateeCall.ts';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER.ts';\nimport { toInteger } from '../util/toInteger.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Repeats the given string n times.\n *\n * If n is less than 1, an empty string is returned, or if the string is an empty string,\n * the original string is returned unchanged.\n *\n * @param {string} str - The string to repeat.\n * @param {number} n - The number of times to repeat the string.\n * @returns {string} - The repeated string, or an empty string if n is less than 1.\n *\n * @example\n * repeat('abc', 0); // ''\n * repeat('abc', 2); // 'abcabc'\n */\nexport function repeat(str?: string, n?: number): string;\n\n/**\n * Repeats the given string n times.\n *\n * If n is less than 1, an empty string is returned, or if the string is an empty string,\n * the original string is returned unchanged.\n *\n * @param {string} str - The string to repeat.\n * @param {number} n - The number of times to repeat the string.\n * @returns {string} - The repeated string, or an empty string if n is less than 1.\n *\n * @example\n * repeat('abc', 0); // ''\n * repeat('abc', 2); // 'abcabc'\n */\nexport function repeat(str: any, n?: any, guard?: any): string {\n  if (guard ? isIterateeCall(str, n, guard) : n === undefined) {\n    n = 1;\n  } else {\n    n = toInteger(n);\n  }\n  if (n < 1 || n > MAX_SAFE_INTEGER) {\n    return '';\n  }\n  return toString(str).repeat(n);\n}\n"
  },
  {
    "path": "src/compat/string/replace.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { replace as replaceLodash } from 'lodash';\nimport { replace } from './replace';\n\ndescribe('replace', () => {\n  it('should replace the matched pattern', () => {\n    const string = 'abcde';\n    expect(replace(string, 'de', '123')).toBe('abc123');\n    expect(replace(string, /[bd]/g, '-')).toBe('a-c-e');\n  });\n\n  it('should replace the matched pattern with a function', () => {\n    const string = 'abcde';\n    expect(replace(string, 'de', substring => substring.toUpperCase())).toBe('abcDE');\n    expect(replace(string, /[bd]/g, substring => substring.toUpperCase())).toBe('aBcDe');\n  });\n\n  it('should return empty string if the arguments are not provided', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(replace()).toBe('');\n  });\n\n  it('should return the original string if arguments length is less than 3', () => {\n    const string = 'abcde';\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(replace(string)).toBe(string);\n    expect(replace(string, 'de')).toBe(string);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(replace).toEqualTypeOf<typeof replaceLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/replace.ts",
    "content": "import { toString } from '../util/toString.ts';\n\ntype ReplaceFunction = (match: string, ...args: any[]) => string;\n\nexport function replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string;\nexport function replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;\n\n/**\n * Replaces the matched pattern with the replacement string.\n *\n * @param {} target - The target string.\n * @param {} pattern - The pattern to match.\n * @param {} replacement - The replacement string or a function that returns the replacement string.\n * @returns {string} The new string with the matched pattern replaced.\n *\n * @example\n * replace('abcde', 'de', '123'); // 'abc123'\n * replace('abcde', /[bd]/g, '-'); // 'a-c-e'\n * replace('abcde', 'de', substring => substring.toUpperCase()); // 'abcDE'\n * replace('abcde', /[bd]/g, substring => substring.toUpperCase()); // 'aBcDe'\n */\nexport function replace(\n  target: string | RegExp,\n  pattern: RegExp | string | ReplaceFunction,\n  replacement?: ReplaceFunction | string\n): string {\n  if (arguments.length < 3) {\n    return toString(target);\n  }\n\n  return toString(target).replace(pattern as any, replacement as any);\n}\n"
  },
  {
    "path": "src/compat/string/snakeCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { snakeCase as snakeCaseLodash } from 'lodash';\nimport { snakeCase } from './snakeCase';\n\ndescribe('snakeCase', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it(`should convert \\`string\\``, () => {\n    const actual = strings.map(string => snakeCase(string));\n\n    const expected = strings.map(() => 'foo_bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to snake case, identical to lodash', () => {\n    expect(snakeCase('åäöÅÄÖ')).toBe('aao_aao');\n    expect(snakeCase('helloÅäöWorld')).toBe('hello_aao_world');\n    expect(snakeCase('café')).toBe('cafe');\n    expect(snakeCase('naïve')).toBe('naive');\n    expect(snakeCase('Zürich')).toBe('zurich');\n    expect(snakeCase('São Paulo')).toBe('sao_paulo');\n    expect(snakeCase('Москва')).toBe('москва');\n  });\n\n  it(`should handle double-converting strings`, () => {\n    const actual = strings.map(string => snakeCase(snakeCase(string)));\n\n    const expected = strings.map(() => 'foo_bar');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should remove contraction apostrophes`, () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => snakeCase(`a b${apos}${postfix} c`));\n\n      const expected = postfixes.map(postfix => `a_b${postfix}_c`);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should remove Latin mathematical operators`, () => {\n    const actual = ['\\xd7', '\\xf7'].map(snakeCase);\n    expect(actual).toEqual(['', '']);\n  });\n\n  it(`should coerce \\`string\\` to a string`, () => {\n    const string = 'foo bar';\n    expect(snakeCase(Object(string))).toBe('foo_bar');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(snakeCase({ toString: () => string })).toBe('foo_bar');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(snakeCase).toEqualTypeOf<typeof snakeCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/snakeCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { snakeCase as snakeCaseToolkit } from '../../string/snakeCase.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts a string to snake case.\n *\n * Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.\n *\n * @param {string | object} str - The string that is to be changed to snake case.\n * @returns {string} - The converted string to snake case.\n *\n * @example\n * const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'\n * const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'\n * const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'\n * const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'\n */\nexport function snakeCase(str?: string): string {\n  return snakeCaseToolkit(normalizeForCase(deburr(str)));\n}\n"
  },
  {
    "path": "src/compat/string/split.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { split as splitLodash } from 'lodash';\nimport { split } from './split';\n\ndescribe('split', () => {\n  it('should split a string by `separator`', () => {\n    const string = 'abcde';\n    expect(split(string, 'c')).toEqual(['ab', 'de']);\n    expect(split(string, /[bd]/)).toEqual(['a', 'c', 'e']);\n    expect(split(string, '', 2)).toEqual(['a', 'b']);\n  });\n\n  it('should return an array containing an empty string for empty values', () => {\n    const values = [undefined, null, ''] as const;\n    const expected = values.map(() => ['']);\n\n    const actual = values.map(value => split(value));\n\n    expect(actual).toEqual(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(split()).toEqual(['']);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const strings = ['abc', 'def', 'ghi'];\n    const actual = strings.map(str => split(str));\n\n    expect(actual).toEqual([['abc'], ['def'], ['ghi']]);\n  });\n\n  it('should allow mixed string and array prototype methods', () => {\n    const result = split('abc', 'b').join(',');\n    expect(result).toBe('a,c');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(split).toEqualTypeOf<typeof splitLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/split.ts",
    "content": "import { toString } from '../util/toString.ts';\n\n/**\n * Splits the input string by the specified `separator`\n * and returns a new array containing the split segments.\n *\n * @param {string | null | undefined} [string=''] The string to split.\n * @param {RegExp|string} [separator] The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n *\n * @example\n * split('a-b-c', '-');\n * // => ['a', 'b', 'c']\n *\n * split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\nexport function split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[];\n\n/**\n * Splits the input string by the specified `separator`\n * and returns a new array containing the split segments.\n *\n * @param {string | null | undefined} [string=''] The string to split.\n * @param {RegExp|string} [separator] The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n *\n * @example\n * split('a-b-c', '-');\n * // => ['a', 'b', 'c']\n *\n * split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\nexport function split(string: string | null | undefined, index: string | number, guard: object): string[];\n\nexport function split(string: any, separator?: any, limit?: any): string[] {\n  return toString(string).split(separator as string, limit);\n}\n"
  },
  {
    "path": "src/compat/string/startCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { startCase as startCaseLodash } from 'lodash';\nimport { startCase } from './startCase';\n\ndescribe('startCase', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it(`should convert \\`string\\``, () => {\n    const actual = strings.map(string => startCase(string));\n\n    const expected = strings.map(string => (string === 'FOO BAR' ? 'FOO BAR' : 'Foo Bar'));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to start case, identical to lodash', () => {\n    expect(startCase('åäöÅÄÖ')).toBe('Aao AAO');\n    expect(startCase('helloÅäöWorld')).toBe('Hello Aao World');\n    expect(startCase('café')).toBe('Cafe');\n    expect(startCase('naïve')).toBe('Naive');\n    expect(startCase('Zürich')).toBe('Zurich');\n    expect(startCase('São Paulo')).toBe('Sao Paulo');\n    expect(startCase('Москва')).toBe('Москва');\n  });\n\n  it(`should handle double-converting strings`, () => {\n    const actual = strings.map(string => startCase(startCase(string)));\n\n    const expected = strings.map(string => (string === 'FOO BAR' ? 'FOO BAR' : 'Foo Bar'));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should remove contraction apostrophes`, () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => startCase(`a b${apos}${postfix} c`));\n\n      const expected = postfixes.map(postfix => `A B${postfix} C`);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should remove Latin mathematical operators`, () => {\n    const actual = ['\\xd7', '\\xf7'].map(startCase);\n    expect(actual).toEqual(['', '']);\n  });\n\n  it(`should coerce \\`string\\` to a string`, () => {\n    const string = 'foo bar';\n    expect(startCase(Object(string))).toBe('Foo Bar');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(startCase({ toString: () => string })).toBe('Foo Bar');\n  });\n\n  it('should uppercase only the first character of each word', () => {\n    expect(startCase('--foo-bar--')).toBe('Foo Bar');\n    expect(startCase('fooBar')).toBe('Foo Bar');\n    expect(startCase('__FOO_BAR__')).toBe('FOO BAR');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(startCase).toEqualTypeOf<typeof startCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/startCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { words as getWords } from '../../string/words.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.\n *\n * Start case is the naming convention in which each word is written with an initial capital letter.\n * @param {string | object} str - The string to convert.\n * @returns {string} The converted string.\n *\n * @example\n * const result1 = startCase('hello world');  // result will be 'Hello World'\n * const result2 = startCase('HELLO WORLD');  // result will be 'HELLO WORLD'\n * const result3 = startCase('hello-world');  // result will be 'Hello World'\n * const result4 = startCase('hello_world');  // result will be 'Hello World'\n */\nexport function startCase(str?: string): string {\n  const words = getWords(normalizeForCase(deburr(str)).trim());\n\n  let result = '';\n\n  for (let i = 0; i < words.length; i++) {\n    const word = words[i];\n\n    if (result) {\n      result += ' ';\n    }\n\n    if (word === word.toUpperCase()) {\n      result += word;\n    } else {\n      result += word[0].toUpperCase() + word.slice(1).toLowerCase();\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/string/startsWith.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { startsWith as startsWithLodash } from 'lodash';\nimport { startsWith } from './startsWith';\n\ndescribe('startsWith', () => {\n  it('should return true if the string starts with the target string', () => {\n    expect(startsWith('fooBar', 'foo')).toEqual(true);\n  });\n\n  it('should return false if the string does not start with the target string', () => {\n    expect(startsWith('fooBar', 'abc')).toEqual(false);\n  });\n\n  it('should return false if the string does not start with the target string, but does contain it', () => {\n    expect(startsWith('fooBar', 'Bar')).toEqual(false);\n  });\n\n  it('should return true if the target string is an empty string', () => {\n    expect(startsWith('fooBar', '')).toEqual(true);\n  });\n\n  it('should return true if the string and target string are empty strings', () => {\n    expect(startsWith('', '')).toEqual(true);\n  });\n\n  it('should return false if the string past the provided position does not start with the target string', () => {\n    expect(startsWith('fooBar', 'Bar', 5)).toEqual(false);\n  });\n\n  it('should return true if the string past the provided position does start with the target string', () => {\n    expect(startsWith('fooBar', 'Bar', 3)).toEqual(true);\n  });\n\n  const string = 'abc';\n\n  it('should return `true` if a string starts with `target`', () => {\n    expect(startsWith(string, 'a')).toBe(true);\n  });\n\n  it('should return `false` if a string does not start with `target`', () => {\n    expect(startsWith(string, 'b')).toBe(false);\n  });\n\n  it('should work with a `position`', () => {\n    expect(startsWith(string, 'b', 1)).toBe(true);\n  });\n\n  it('should work with `position` >= `length`', () => {\n    expect(startsWith(string, 'a', 3)).toBe(false);\n    expect(startsWith(string, 'a', 5)).toBe(false);\n    expect(startsWith(string, 'a', Number.MAX_SAFE_INTEGER)).toBe(false);\n    expect(startsWith(string, 'a', Infinity)).toBe(false);\n  });\n\n  it('should treat a negative `position` as `0`', () => {\n    expect(startsWith(string, 'a', -1)).toBe(true);\n    expect(startsWith(string, 'b', -1)).toBe(false);\n\n    expect(startsWith(string, 'a', -3)).toBe(true);\n    expect(startsWith(string, 'b', -3)).toBe(false);\n\n    expect(startsWith(string, 'a', -Infinity)).toBe(true);\n    expect(startsWith(string, 'b', -Infinity)).toBe(false);\n  });\n\n  it('should coerce `position` to an integer', () => {\n    expect(startsWith(string, 'bc', 1.2)).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(startsWith).toEqualTypeOf<typeof startsWithLodash>();\n  });\n\n  it('should return false when str or target is undefined', () => {\n    expect(startsWith(undefined, 'test')).toBe(false);\n    expect(startsWith('test', undefined)).toBe(false);\n    expect(startsWith(undefined, undefined)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/compat/string/startsWith.ts",
    "content": "/**\n * Checks if a string contains another string at the beginning of the string.\n *\n * Checks if one string startsWith another string. Optional position parameter to start searching from a certain index.\n *\n * @param {string} str - The string that might contain the target string.\n * @param {string} target - The string to search for.\n * @param {number} position - An optional offset to start searching in the str string\n * @returns {boolean} - True if the str string starts with the target string.\n *\n * @example\n * const isPrefix = startsWith('fooBar', 'foo') // returns true\n * const isPrefix = startsWith('fooBar', 'bar') // returns false\n * const isPrefix = startsWith('fooBar', 'abc') // returns false\n * const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true\n * const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false\n */\nexport function startsWith(str?: string, target?: string, position?: number): boolean {\n  if (str == null || target == null) {\n    return false;\n  }\n\n  if (position == null) {\n    position = 0;\n  }\n\n  return str.startsWith(target, position);\n}\n"
  },
  {
    "path": "src/compat/string/template.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { template as templateLodash } from 'lodash';\nimport { template, templateSettings } from './template';\nimport { numberTag } from '../_internal/numberTag';\nimport * as esToolkit from '../index';\nimport { stubFalse } from '../util/stubFalse';\nimport { stubString } from '../util/stubString';\nimport { stubTrue } from '../util/stubTrue';\n\ndescribe('template', () => {\n  it('should escape values in \"escape\" delimiters', () => {\n    const strings = ['<p><%- value %></p>', '<p><%-value%></p>', '<p><%-\\nvalue\\n%></p>'];\n    const expected = strings.map(esToolkit.constant('<p>&amp;&lt;&gt;&quot;&#39;/</p>'));\n    const data = { value: '&<>\"\\'/' };\n\n    const actual = strings.map(string => template(string)(data));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should not reference `_.escape` when \"escape\" delimiters are not used', () => {\n    const compiled = template('<%= typeof __e %>');\n    expect(compiled({})).toBe('undefined');\n  });\n\n  it('should evaluate JavaScript in \"evaluate\" delimiters', () => {\n    const compiled = template(\n      '<ul><%\\\n      for (var key in collection) {\\\n        %><li><%= collection[key] %></li><%\\\n      } %></ul>'\n    );\n\n    const data = { collection: { a: 'A', b: 'B' } };\n    const actual = compiled(data);\n\n    expect(actual).toBe('<ul><li>A</li><li>B</li></ul>');\n  });\n\n  it('should support \"evaluate\" delimiters with single line comments (test production builds)', () => {\n    const compiled = template('<% // A code comment. %><% if (value) { %>yap<% } else { %>nope<% } %>');\n    const data = { value: true };\n\n    expect(compiled(data)).toBe('yap');\n  });\n\n  it('should support referencing variables declared in \"evaluate\" delimiters from other delimiters', () => {\n    const compiled = template('<% var b = a; %><%= b.value %>');\n    const data = { a: { value: 1 } };\n\n    expect(compiled(data)).toBe('1');\n  });\n\n  it('should interpolate data properties in \"interpolate\" delimiters', () => {\n    const strings = ['<%= a %>BC', '<%=a%>BC', '<%=\\na\\n%>BC'];\n    const expected = strings.map(esToolkit.constant('ABC'));\n    const data = { a: 'A' };\n\n    const actual = strings.map(string => template(string)(data));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should support \"interpolate\" delimiters with escaped values', () => {\n    const compiled = template('<%= a ? \"a=\\\\\"A\\\\\"\" : \"\" %>');\n    const data = { a: true };\n\n    expect(compiled(data)).toBe('a=\"A\"');\n  });\n\n  it('should support \"interpolate\" delimiters containing ternary operators', () => {\n    const compiled = template('<%= value ? value : \"b\" %>');\n    const data = { value: 'a' };\n\n    expect(compiled(data)).toBe('a');\n  });\n\n  it('should support \"interpolate\" delimiters containing global values', () => {\n    const compiled = template('<%= typeof Math.abs %>');\n\n    const actual = compiled();\n\n    expect(actual).toBe('function');\n  });\n\n  it('should support complex \"interpolate\" delimiters', () => {\n    Object.entries({\n      '<%= a + b %>': '3',\n      '<%= b - a %>': '1',\n      '<%= a = b %>': '2',\n      '<%= !a %>': 'false',\n      '<%= ~a %>': '-2',\n      '<%= a * b %>': '2',\n      '<%= a / b %>': '0.5',\n      '<%= a % b %>': '1',\n      '<%= a >> b %>': '0',\n      '<%= a << b %>': '4',\n      '<%= a & b %>': '0',\n      '<%= a ^ b %>': '3',\n      '<%= a | b %>': '3',\n      '<%= {}.toString.call(0) %>': numberTag,\n      '<%= a.toFixed(2) %>': '1.00',\n      '<%= obj[\"a\"] %>': '1',\n      '<%= delete a %>': 'true',\n      '<%= \"a\" in obj %>': 'true',\n      '<%= obj instanceof Object %>': 'true',\n      '<%= new Boolean %>': 'false',\n      '<%= typeof a %>': 'number',\n      '<%= void a %>': '',\n    }).forEach(([key, value]) => {\n      const compiled = template(key);\n      const data = { a: 1, b: 2 };\n\n      expect(compiled(data)).toBe(value);\n    });\n  });\n\n  it('should support ES6 template delimiters', () => {\n    const data = { value: 2 };\n    expect(template('1${value}3')(data)).toBe('123');\n    expect(template('${\"{\" + value + \"\\\\}\"}')(data)).toBe('{2}');\n  });\n\n  it('should disable ES6 template delimiters when \"interpolate\" is set', () => {\n    const data = { value: 2 };\n    expect(template('1${value}3', { interpolate: /<%=([\\s\\S]+?)%>/g })(data)).toBe('1${value}3');\n    expect(template('${\"{\" + value + \"\\\\}\"}', { interpolate: /<%=([\\s\\S]+?)%>/g })(data)).toBe(\n      '${\"{\" + value + \"\\\\}\"}'\n    );\n  });\n\n  it('should support the \"imports\" option', () => {\n    const compiled = template('<%= a %>', { imports: { a: 1 } });\n    expect(compiled({})).toBe('1');\n  });\n\n  it('should support the \"variable\" options', () => {\n    // We don't have `each` function.\n    // const compiled = template('<% _.each( data.a, function( value ) { %>' + '<%= value.valueOf() %>' + '<% }) %>', {\n    //   variable: 'data',\n    // });\n    // const data = { a: [1, 2, 3] };\n    // expect(compiled(data)).toBe('123');\n\n    const compiled = template('<%= data.a %>', { variable: 'data' });\n    const data = { a: [1, 2, 3] };\n    expect(compiled(data)).toBe('1,2,3');\n  });\n\n  it('should support custom delimiters', () => {\n    esToolkit.times(2, index => {\n      const settingsClone = esToolkit.clone(templateSettings);\n\n      const settings = Object.assign(index ? templateSettings : {}, {\n        escape: /\\{\\{-([\\s\\S]+?)\\}\\}/g,\n        evaluate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n        interpolate: /\\{\\{=([\\s\\S]+?)\\}\\}/g,\n      });\n\n      const expected = '<ul><li>0: a &amp; A</li><li>1: b &amp; B</li></ul>';\n      // We don't have `each` function.\n      // const compiled = template(\n      //   '<ul>{{ _.each(collection, function(value, index) {}}<li>{{= index }}: {{- value }}</li>{{}); }}</ul>',\n      //   index ? null : settings\n      // );\n      const compiled = template(\n        '<ul>{{ collection.forEach((value, index) => {}}<li>{{= index }}: {{- value }}</li>{{}); }}</ul>',\n        index ? (null as any) : settings\n      );\n      const data = { collection: ['a & A', 'b & B'] };\n\n      expect(compiled(data)).toBe(expected);\n      Object.assign(templateSettings, settingsClone);\n    });\n  });\n\n  it('should support custom delimiters containing special characters', () => {\n    esToolkit.times(2, index => {\n      const settingsClone = esToolkit.clone(templateSettings);\n\n      const settings = Object.assign(index ? templateSettings : {}, {\n        escape: /<\\?-([\\s\\S]+?)\\?>/g,\n        evaluate: /<\\?([\\s\\S]+?)\\?>/g,\n        interpolate: /<\\?=([\\s\\S]+?)\\?>/g,\n      });\n\n      const expected = '<ul><li>0: a &amp; A</li><li>1: b &amp; B</li></ul>';\n      // We don't have `each` function.\n      // const compiled = template(\n      //   '<ul><? _.each(collection, function(value, index) { ?><li><?= index ?>: <?- value ?></li><? }); ?></ul>',\n      //   index ? null : settings\n      // );\n      const compiled = template(\n        '<ul><? collection.forEach((value, index) => { ?><li><?= index ?>: <?- value ?></li><? }); ?></ul>',\n        index ? (null as any) : settings\n      );\n      const data = { collection: ['a & A', 'b & B'] };\n\n      expect(compiled(data)).toBe(expected);\n      Object.assign(templateSettings, settingsClone);\n    });\n  });\n\n  it('should use a `with` statement by default', () => {\n    // We don't have `each` function.\n    // const compiled = template(\n    //   '<%= index %><%= collection[index] %><% _.each(collection, function(value, index) { %><%= index %><% }); %>'\n    // );\n    const compiled = template(\n      '<%= index %><%= collection[index] %><% collection.forEach((value, index) => { %><%= index %><% }); %>'\n    );\n    const actual = compiled({ index: 1, collection: ['a', 'b', 'c'] });\n    expect(actual).toBe('1b012');\n  });\n\n  // We couldn't change imported modules because of bundling settings.\n\n  // it('should use `_.templateSettings.imports._.templateSettings`', () => {\n  //   const toolkit = templateSettings.imports._;\n  //   const settingsClone = esToolkit.clone(toolkit.templateSettings);\n\n  //   toolkit.templateSettings = Object.assign(toolkit.templateSettings, {\n  //     interpolate: /\\{\\{=([\\s\\S]+?)\\}\\}/g,\n  //   });\n\n  //   const compiled = template('{{= a }}');\n  //   expect(compiled({ a: 1 })).toBe('1');\n\n  //   Object.assign(toolkit.templateSettings, settingsClone);\n  // });\n\n  it('should fallback to `_.templateSettings`', () => {\n    const esToolkit = templateSettings.imports._;\n    const delimiter = templateSettings.interpolate;\n\n    templateSettings.imports._ = { escape: esToolkit.escape } as any;\n    templateSettings.interpolate = /\\{\\{=([\\s\\S]+?)\\}\\}/g;\n\n    const compiled = template('{{= a }}');\n    expect(compiled({ a: 1 })).toBe('1');\n\n    templateSettings.imports._ = esToolkit;\n    templateSettings.interpolate = delimiter;\n  });\n\n  it('should ignore `null` delimiters', () => {\n    const delimiter = {\n      escape: /\\{\\{-([\\s\\S]+?)\\}\\}/g,\n      evaluate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n      interpolate: /\\{\\{=([\\s\\S]+?)\\}\\}/g,\n    };\n\n    (\n      [\n        ['escape', '{{- a }}'],\n        ['evaluate', '{{ print(a) }}'],\n        ['interpolate', '{{= a }}'],\n      ] as const\n    ).forEach(([key, value]) => {\n      const settings: any = { escape: null, evaluate: null, interpolate: null };\n      settings[key] = delimiter[key];\n\n      try {\n        const expected = '1 <%- a %> <% print(a) %> <%= a %>';\n        const compiled = template(`${value} <%- a %> <% print(a) %> <%= a %>`, settings);\n        const data = { a: 1 };\n\n        expect(compiled(data)).toBe(expected);\n      } catch (e) {\n        console.log(e);\n      }\n    });\n  });\n\n  it('should work without delimiters', () => {\n    const expected = 'abc';\n    expect(template(expected)({})).toBe(expected);\n  });\n\n  it('should work with `this` references', () => {\n    const compiled = template('a<%= this.String(\"b\") %>c');\n    expect(compiled()).toBe('abc');\n\n    const object: any = { b: 'B' };\n    object.compiled = template('A<%= this.b %>C', { variable: 'obj' });\n    expect(object.compiled()).toBe('ABC');\n  });\n\n  it('should work with backslashes', () => {\n    const compiled = template('<%= a %> \\\\b');\n    const data = { a: 'A' };\n\n    expect(compiled(data)).toBe('A \\\\b');\n  });\n\n  it('should work with escaped characters in string literals', () => {\n    let compiled = template('<% print(\"\\'\\\\n\\\\r\\\\t\\\\u2028\\\\u2029\\\\\\\\\") %>');\n    expect(compiled()).toBe(\"'\\n\\r\\t\\u2028\\u2029\\\\\");\n\n    const data = { a: 'A' };\n    compiled = template('\\'\\n\\r\\t<%= a %>\\u2028\\u2029\\\\\"');\n    expect(compiled(data)).toBe('\\'\\n\\r\\tA\\u2028\\u2029\\\\\"');\n  });\n\n  it('should handle \\\\u2028 & \\\\u2029 characters', () => {\n    const compiled = template('\\u2028<%= \"\\\\u2028\\\\u2029\" %>\\u2029');\n    expect(compiled()).toBe('\\u2028\\u2028\\u2029\\u2029');\n  });\n\n  it('should work with statements containing quotes', () => {\n    const compiled = template(\n      '<%\\\n      if (a === \\'A\\' || a === \"a\") {\\\n        %>\\'a\\',\"A\"<%\\\n      } %>'\n    );\n\n    const data = { a: 'A' };\n    expect(compiled(data)).toBe('\\'a\\',\"A\"');\n  });\n\n  it('should work with templates containing newlines and comments', () => {\n    const compiled = template(\n      '<%\\n\\\n      // A code comment.\\n\\\n      if (value) { value += 3; }\\n\\\n      %><p><%= value %></p>'\n    );\n\n    expect(compiled({ value: 3 })).toBe('<p>6</p>');\n  });\n\n  it('should tokenize delimiters', () => {\n    const compiled = template('<span class=\"icon-<%= type %>2\"></span>');\n    const data = { type: 1 };\n\n    expect(compiled(data)).toBe('<span class=\"icon-12\"></span>');\n  });\n\n  it('should evaluate delimiters once', () => {\n    const actual: any[] = [];\n    const compiled = template('<%= func(\"a\") %><%- func(\"b\") %><% func(\"c\") %>');\n    const data = {\n      func: function (value: any) {\n        actual.push(value);\n      },\n    };\n\n    compiled(data);\n    expect(actual).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should match delimiters before escaping text', () => {\n    const compiled = template('<<\\n a \\n>>', { evaluate: /<<(.*?)>>/g });\n    expect(compiled()).toBe('<<\\n a \\n>>');\n  });\n\n  it('should resolve nullish values to an empty string', () => {\n    let compiled = template('<%= a %><%- a %>');\n    let data: any = { a: null };\n\n    expect(compiled(data)).toBe('');\n\n    data = { a: undefined };\n    expect(compiled(data)).toBe('');\n\n    data = { a: {} };\n    compiled = template('<%= a.b %><%- a.b %>');\n    expect(compiled(data)).toBe('');\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = values.map(stubString);\n    const data = { a: 1 };\n\n    const actual = values.map((value, index) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const compiled = index ? template(value) : template();\n      return compiled(data);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should parse delimiters without newlines', () => {\n    const expected = '<<\\nprint(\"<p>\" + (value ? \"yes\" : \"no\") + \"</p>\")\\n>>';\n    const compiled = template(expected, { evaluate: /<<(.+?)>>/g });\n    const data = { value: true };\n\n    expect(compiled(data)).toBe(expected);\n  });\n\n  it('should support recursive calls', () => {\n    const compiled = template('<%= a %><% a = _.template(c)(obj) %><%= a %>');\n    const data = { a: 'A', b: 'B', c: '<%= b %>' };\n\n    expect(compiled(data)).toBe('AB');\n  });\n\n  it('should coerce `text` to a string', () => {\n    const object = { toString: esToolkit.constant('<%= a %>') };\n    const data = { a: 1 };\n\n    expect(template(object as string)(data)).toBe('1');\n  });\n\n  it('should not modify the `options` object', () => {\n    const options = {};\n    template('', options);\n    expect(options).toEqual({});\n  });\n\n  it('should not modify `_.templateSettings` when `options` are given', () => {\n    const data = { a: 1 };\n\n    expect('a' in templateSettings).toBe(false);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    template('', {}, data);\n    expect('a' in templateSettings).toBe(false);\n  });\n\n  it('should not error for non-object `data` and `options` values', () => {\n    expect(() => template('')(1 as any)).not.toThrow();\n    expect(() => template('', 1 as any)(1 as any)).not.toThrow();\n  });\n\n  it('should expose the source on compiled templates', () => {\n    const compiled = template('x');\n    const values = [String(compiled), compiled.source];\n    const expected = values.map(stubTrue);\n\n    const actual = values.map(value => esToolkit.includes(value, '__p'));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should expose the source on SyntaxErrors', () => {\n    try {\n      template('<% if x %>');\n    } catch (e: any) {\n      if (e instanceof SyntaxError) {\n        expect(esToolkit.includes((e as any).source, '__p')).toBe(true);\n      }\n    }\n  });\n\n  it('should not include sourceURLs in the source', () => {\n    const options = { sourceURL: '/a/b/c' };\n    const compiled = template('x', options);\n    const values = [compiled.source, undefined];\n\n    try {\n      template('<% if x %>', options);\n    } catch (e: any) {\n      values[1] = e.source;\n    }\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(value => esToolkit.includes(value as any, 'sourceURL'));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const array = ['<%= a %>', '<%- b %>', '<% print(c) %>'];\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const compiles = array.map(template);\n    const data = { a: 'one', b: '\"two\"', c: 'three' };\n\n    const actual = compiles.map(compiled => compiled(data));\n\n    expect(actual).toEqual(['one', '&quot;two&quot;', 'three']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(template).toEqualTypeOf<typeof templateLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/template.ts",
    "content": "import { escape } from './escape.ts';\nimport { attempt } from '../function/attempt.ts';\nimport { defaults } from '../object/defaults.ts';\nimport { toString } from '../util/toString.ts';\n\n// A regular expression for matching literal string in ES template string.\nconst esTemplateRegExp = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n// A regular expression for matching unescaped characters in string.\nconst unEscapedRegExp = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n// A regular expression for matching no match.\nconst noMatchExp = /($^)/;\n\nconst escapeMap = new Map([\n  ['\\\\', '\\\\'],\n  [\"'\", \"'\"],\n  ['\\n', 'n'],\n  ['\\r', 'r'],\n  ['\\u2028', 'u2028'],\n  ['\\u2029', 'u2029'],\n]);\n\nfunction escapeString(match: string): string {\n  return `\\\\${escapeMap.get(match)}`;\n}\n\nconst defaultInterpolateRegExp = /<%=([\\s\\S]+?)%>/g;\n\n// Only import the necessary functions for preventing circular dependencies.(lodash-es also does this)\nexport const templateSettings = {\n  escape: /<%-([\\s\\S]+?)%>/g,\n  evaluate: /<%([\\s\\S]+?)%>/g,\n  interpolate: defaultInterpolateRegExp,\n  variable: '',\n  imports: {\n    _: {\n      escape,\n      template,\n    },\n  },\n};\n\ninterface TemplateOptions {\n  escape?: RegExp | null | undefined;\n  evaluate?: RegExp | null | undefined;\n  interpolate?: RegExp | null | undefined;\n  variable?: string | undefined;\n  imports?: Record<string, any> | undefined;\n  sourceURL?: string;\n}\n\ninterface TemplateExecutor {\n  (data?: object): string;\n  source: string;\n}\n\nexport function template(string?: string, options?: TemplateOptions): TemplateExecutor;\n\n/**\n * Compiles a template string into a function that can interpolate data properties.\n *\n * This function allows you to create a template with custom delimiters for escaping,\n * evaluating, and interpolating values. It can also handle custom variable names and\n * imported functions.\n *\n * @param {string} string - The template string.\n * @param {TemplateOptions} [options] - The options object.\n * @param {RegExp | null | undefined} [options.escape] - The regular expression for \"escape\" delimiter.\n * @param {RegExp | null | undefined} [options.evaluate] - The regular expression for \"evaluate\" delimiter.\n * @param {RegExp | null | undefined} [options.interpolate] - The regular expression for \"interpolate\" delimiter.\n * @param {string | undefined} [options.variable] - The data object variable name.\n * @param {Record<string, any> | undefined} [options.imports] - The object of imported functions.\n * @param {string | undefined} [options.sourceURL] - The source URL of the template.\n * @param {object} [guard] - The guard to detect if the function is called with `options`.\n * @returns {TemplateExecutor} Returns the compiled template function.\n *\n * @example\n * // Use the \"escape\" delimiter to escape data properties.\n * const compiled = template('<%- value %>');\n * compiled({ value: '<div>' }); // returns '&lt;div&gt;'\n *\n * @example\n * // Use the \"interpolate\" delimiter to interpolate data properties.\n * const compiled = template('<%= value %>');\n * compiled({ value: 'Hello, World!' }); // returns 'Hello, World!'\n *\n * @example\n * // Use the \"evaluate\" delimiter to evaluate JavaScript code.\n * const compiled = template('<% if (value) { %>Yes<% } else { %>No<% } %>');\n * compiled({ value: true }); // returns 'Yes'\n *\n * @example\n * // Use the \"variable\" option to specify the data object variable name.\n * const compiled = template('<%= data.value %>', { variable: 'data' });\n * compiled({ value: 'Hello, World!' }); // returns 'Hello, World!'\n *\n * @example\n * // Use the \"imports\" option to import functions.\n * const compiled = template('<%= _.toUpper(value) %>', { imports: { _: { toUpper } } });\n * compiled({ value: 'hello, world!' }); // returns 'HELLO, WORLD!'\n *\n * @example\n * // Use the custom \"escape\" delimiter.\n * const compiled = template('<@ value @>', { escape: /<@([\\s\\S]+?)@>/g });\n * compiled({ value: '<div>' }); // returns '&lt;div&gt;'\n *\n * @example\n * // Use the custom \"evaluate\" delimiter.\n * const compiled = template('<# if (value) { #>Yes<# } else { #>No<# } #>', { evaluate: /<#([\\s\\S]+?)#>/g });\n * compiled({ value: true }); // returns 'Yes'\n *\n * @example\n * // Use the custom \"interpolate\" delimiter.\n * const compiled = template('<$ value $>', { interpolate: /<\\$([\\s\\S]+?)\\$>/g });\n * compiled({ value: 'Hello, World!' }); // returns 'Hello, World!'\n *\n * @example\n * // Use the \"sourceURL\" option to specify the source URL of the template.\n * const compiled = template('hello <%= user %>!', { sourceURL: 'template.js' });\n */\nexport function template(string?: string, options?: TemplateOptions, guard?: object): TemplateExecutor {\n  string = toString(string);\n\n  if (guard) {\n    options = templateSettings;\n  }\n\n  options = defaults({ ...options }, templateSettings);\n\n  const delimitersRegExp = new RegExp(\n    [\n      options.escape?.source ?? noMatchExp.source,\n      options.interpolate?.source ?? noMatchExp.source,\n      options.interpolate === defaultInterpolateRegExp ? esTemplateRegExp.source : noMatchExp.source,\n      options.evaluate?.source ?? noMatchExp.source,\n      '$',\n    ].join('|'),\n    'g'\n  );\n\n  let lastIndex = 0;\n  let isEvaluated = false;\n  let source = `__p += ''`;\n\n  for (const match of string.matchAll(delimitersRegExp)) {\n    const [fullMatch, escapeValue, interpolateValue, esTemplateValue, evaluateValue] = match;\n    const { index } = match;\n\n    source += ` + '${string.slice(lastIndex, index).replace(unEscapedRegExp, escapeString)}'`;\n\n    if (escapeValue) {\n      source += ` + _.escape(${escapeValue})`;\n    }\n\n    if (interpolateValue) {\n      source += ` + ((${interpolateValue}) == null ? '' : ${interpolateValue})`;\n    } else if (esTemplateValue) {\n      source += ` + ((${esTemplateValue}) == null ? '' : ${esTemplateValue})`;\n    }\n\n    if (evaluateValue) {\n      source += `;\\n${evaluateValue};\\n __p += ''`;\n      isEvaluated = true;\n    }\n\n    lastIndex = index + fullMatch.length;\n  }\n\n  const imports = defaults({ ...options.imports }, templateSettings.imports);\n  const importsKeys = Object.keys(imports);\n  const importValues = Object.values(imports);\n\n  const sourceURL = `//# sourceURL=${\n    options.sourceURL ? String(options.sourceURL).replace(/[\\r\\n]/g, ' ') : `es-toolkit.templateSource[${Date.now()}]`\n  }\\n`;\n\n  const compiledFunction = `function(${options.variable || 'obj'}) {\n    let __p = '';\n    ${options.variable ? '' : 'if (obj == null) { obj = {}; }'}\n    ${isEvaluated ? `function print() { __p += Array.prototype.join.call(arguments, ''); }` : ''}\n    ${options.variable ? source : `with(obj) {\\n${source}\\n}`}\n    return __p;\n  }`;\n\n  const result = attempt(() => new Function(...importsKeys, `${sourceURL}return ${compiledFunction}`)(...importValues));\n\n  result.source = compiledFunction;\n\n  if (result instanceof Error) {\n    throw result;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/string/templateSettings.ts",
    "content": "export { templateSettings } from './template.ts';\n"
  },
  {
    "path": "src/compat/string/toLower.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toLower as toLowerLodash } from 'lodash';\nimport { toLower } from './toLower';\n\ndescribe('toLower', () => {\n  it('should convert whole string to lower case', () => {\n    expect(toLower('--Foo-Bar--')).toEqual('--foo-bar--');\n    expect(toLower('fooBar')).toEqual('foobar');\n    expect(toLower('__FOO_BAR__')).toEqual('__foo_bar__');\n  });\n\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it('should convert string to upper case while preserving special characters', () => {\n    const actual = strings.map(string => toLower(string));\n    const expected = ['foo bar', 'foo bar', 'foo bar', 'foo bar', 'foo bar', 'foobar', '--foo-bar--', '__foo_bar__'];\n    expect(actual).toEqual(expected);\n  });\n\n  it('should handle double-converting strings', () => {\n    const actual = strings.map(string => toLower(toLower(string)));\n    const expected = strings.map(string => toLower(string));\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve spaces and special characters', () => {\n    expect(toLower('HELLO   WORLD')).toBe('hello   world');\n    expect(toLower('!@#$HELLO%^&*')).toBe('!@#$hello%^&*');\n    expect(toLower('TABS\\tAND\\nNEWLINES')).toBe('tabs\\tand\\nnewlines');\n  });\n\n  it('should handle unicode characters', () => {\n    expect(toLower('CAFÉ')).toBe('café');\n    expect(toLower('ÜBER')).toBe('über');\n    expect(toLower('SEÑOR')).toBe('señor');\n  });\n\n  it('should preserve Latin mathematical operators', () => {\n    expect(toLower('\\xd7')).toBe('\\xd7');\n    expect(toLower('\\xf7')).toBe('\\xf7');\n  });\n\n  it('should handle null and undefined', () => {\n    expect((toLower as any)(null)).toBe('');\n    expect(toLower(undefined)).toBe('');\n  });\n\n  it('should handle numbers including special cases', () => {\n    expect((toLower as any)(123)).toBe('123');\n    expect((toLower as any)(-0)).toBe('-0');\n    expect((toLower as any)(0)).toBe('0');\n    expect((toLower as any)(Infinity)).toBe('infinity');\n    expect((toLower as any)(NaN)).toBe('nan');\n  });\n\n  it('should handle arrays', () => {\n    expect((toLower as any)([1, 2, 3])).toBe('1,2,3');\n    expect((toLower as any)(['a', 'b', 'c'])).toBe('a,b,c');\n    expect((toLower as any)([1, 'b', -0])).toBe('1,b,-0');\n    expect((toLower as any)([])).toBe('');\n  });\n\n  it('should handle nested arrays', () => {\n    expect((toLower as any)([1, [2, 3], 4])).toBe('1,2,3,4');\n    expect((toLower as any)([[['a']]])).toBe('a');\n  });\n\n  it('should handle symbols', () => {\n    const sym1 = Symbol('test');\n    const sym2 = Symbol('');\n    expect((toLower as any)(sym1)).toBe('symbol(test)');\n    expect((toLower as any)(sym2)).toBe('symbol()');\n    expect((toLower as any)([Symbol('a'), Symbol('b')])).toBe('symbol(a),symbol(b)');\n  });\n\n  it('should handle objects', () => {\n    const obj = { toString: () => 'custom' };\n    expect((toLower as any)(obj)).toBe('custom');\n    expect((toLower as any)({})).toBe('[object object]');\n  });\n\n  it('should handle mixed types in arrays', () => {\n    const sym = Symbol('test');\n    expect((toLower as any)([1, 'b', sym, null, undefined])).toBe('1,b,symbol(test),,');\n  });\n\n  it('should maintain proper TypeScript types', () => {\n    const result1: string = toLower('test');\n    const result2: string = (toLower as any)(123);\n    const result3: string = (toLower as any)(null);\n    const result4: string = toLower(undefined);\n\n    expect(typeof result1).toBe('string');\n    expect(typeof result2).toBe('string');\n    expect(typeof result3).toBe('string');\n    expect(typeof result4).toBe('string');\n  });\n\n  it('should handle empty strings', () => {\n    expect(toLower('')).toBe('');\n  });\n\n  it('should handle whitespace strings', () => {\n    expect(toLower(' ')).toBe(' ');\n    expect(toLower('\\t')).toBe('\\t');\n    expect(toLower('\\n')).toBe('\\n');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toLower).toEqualTypeOf<typeof toLowerLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/toLower.ts",
    "content": "import { toString } from '../util/toString.ts';\n\n/**\n * Converts the given value to a string and transforms it to lower case.\n * The function can handle various input types by first converting them to strings.\n *\n * @param {unknown} [value=''] The value to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * toLower('--FOO-BAR--');\n * // => '--foo-bar--'\n *\n * toLower(null);\n * // => ''\n *\n * toLower([1, 2, 3]);\n * // => '1,2,3'\n */\nexport function toLower<T extends string = string>(value?: T): Lowercase<T> {\n  return toString(value).toLowerCase() as Lowercase<T>;\n}\n"
  },
  {
    "path": "src/compat/string/toUpper.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toUpper as toUpperLodash } from 'lodash';\nimport { toUpper } from './toUpper';\n\ndescribe('toUpper', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it('should convert string to upper case while preserving special characters', () => {\n    const actual = strings.map(string => toUpper(string));\n    const expected = ['FOO BAR', 'FOO BAR', 'FOO BAR', 'FOO BAR', 'FOO BAR', 'FOOBAR', '--FOO-BAR--', '__FOO_BAR__'];\n    expect(actual).toEqual(expected);\n  });\n\n  it('should handle double-converting strings', () => {\n    const actual = strings.map(string => toUpper(toUpper(string)));\n    const expected = strings.map(string => toUpper(string));\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve contractions with apostrophes', () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => toUpper(`a b${apos}${postfix} c`));\n      const expected = postfixes.map(postfix => `A B${apos}${postfix.toUpperCase()} C`);\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should preserve spaces and special characters', () => {\n    expect(toUpper('hello   world')).toBe('HELLO   WORLD');\n    expect(toUpper('!@#$hello%^&*')).toBe('!@#$HELLO%^&*');\n    expect(toUpper('tabs\\tand\\nnewlines')).toBe('TABS\\tAND\\nNEWLINES');\n  });\n\n  it('should handle unicode characters', () => {\n    expect(toUpper('café')).toBe('CAFÉ');\n    expect(toUpper('über')).toBe('ÜBER');\n    expect(toUpper('señor')).toBe('SEÑOR');\n  });\n\n  it('should preserve Latin mathematical operators', () => {\n    expect(toUpper('\\xd7')).toBe('\\xd7');\n    expect(toUpper('\\xf7')).toBe('\\xf7');\n  });\n\n  it('should handle null and undefined', () => {\n    expect((toUpper as any)(null)).toBe('');\n    expect((toUpper as any)(undefined)).toBe('');\n  });\n\n  it('should handle numbers including special cases', () => {\n    expect((toUpper as any)(123)).toBe('123');\n    expect((toUpper as any)(-0)).toBe('-0');\n    expect((toUpper as any)(0)).toBe('0');\n    expect((toUpper as any)(Infinity)).toBe('INFINITY');\n    expect((toUpper as any)(NaN)).toBe('NAN');\n  });\n\n  it('should handle arrays', () => {\n    expect((toUpper as any)([1, 2, 3])).toBe('1,2,3');\n    expect((toUpper as any)(['a', 'b', 'c'])).toBe('A,B,C');\n    expect((toUpper as any)([1, 'b', -0])).toBe('1,B,-0');\n    expect((toUpper as any)([])).toBe('');\n  });\n\n  it('should handle nested arrays', () => {\n    expect((toUpper as any)([1, [2, 3], 4])).toBe('1,2,3,4');\n    expect((toUpper as any)([[['a']]])).toBe('A');\n  });\n\n  it('should handle symbols', () => {\n    const sym1 = Symbol('test');\n    const sym2 = Symbol('');\n    expect((toUpper as any)(sym1)).toBe('SYMBOL(TEST)');\n    expect((toUpper as any)(sym2)).toBe('SYMBOL()');\n    expect((toUpper as any)([Symbol('a'), Symbol('b')])).toBe('SYMBOL(A),SYMBOL(B)');\n  });\n\n  it('should handle objects', () => {\n    const obj = { toString: () => 'custom' };\n    expect((toUpper as any)(obj)).toBe('CUSTOM');\n    expect((toUpper as any)({})).toBe('[OBJECT OBJECT]');\n  });\n\n  it('should handle mixed types in arrays', () => {\n    const sym = Symbol('test');\n    expect((toUpper as any)([1, 'b', sym, null, undefined])).toBe('1,B,SYMBOL(TEST),,');\n  });\n\n  it('should maintain proper TypeScript types', () => {\n    const result1: string = (toUpper as any)('test');\n    const result2: string = (toUpper as any)(123);\n    const result3: string = (toUpper as any)(null);\n    const result4: string = (toUpper as any)(undefined);\n\n    expect(typeof result1).toBe('string');\n    expect(typeof result2).toBe('string');\n    expect(typeof result3).toBe('string');\n    expect(typeof result4).toBe('string');\n  });\n\n  it('should handle empty strings', () => {\n    expect(toUpper('')).toBe('');\n  });\n\n  it('should handle whitespace strings', () => {\n    expect(toUpper(' ')).toBe(' ');\n    expect(toUpper('\\t')).toBe('\\t');\n    expect(toUpper('\\n')).toBe('\\n');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toUpper).toEqualTypeOf<typeof toUpperLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/toUpper.ts",
    "content": "import { toString } from '../util/toString.ts';\n\n/**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @param {unknown} [value=''] The value to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * toUpper(null);\n * // => ''\n *\n * toUpper([1, 2, 3]);\n * // => '1,2,3'\n */\nexport function toUpper<T extends string = string>(value?: T): Uppercase<T> {\n  return toString(value).toUpperCase() as Uppercase<T>;\n}\n"
  },
  {
    "path": "src/compat/string/trim.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { trim as trimLodash } from 'lodash';\nimport { trim } from './trim';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('trim', () => {\n  const func = trim as any;\n\n  it(`\\`trim\\` should remove trailing whitespace`, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `a b c`;\n\n    expect(func(string)).toBe(expected);\n  });\n\n  it(`\\`trim\\` should coerce \\`string\\` to a string`, () => {\n    const object = {\n      toString: () => `${whitespace}a b c${whitespace}`,\n    };\n    const expected = `a b c`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(object)).toBe(expected);\n  });\n\n  it(`\\`trim\\` should remove leading and trailing \\`chars\\``, () => {\n    const string = '-_-a-b-c-_-';\n    const expected = `a-b-c`;\n\n    expect(func(string, '_-')).toBe(expected);\n    expect(func(string, ['_', '-'])).toBe(expected);\n  });\n\n  it(`\\`trim\\` should coerce \\`chars\\` to a string`, () => {\n    const object = { toString: () => '_-' };\n    const string = '-_-a-b-c-_-';\n    const expected = `a-b-c`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(string, object)).toBe(expected);\n  });\n\n  it(`\\`trim\\` should return an empty string for empty values and \\`chars\\``, () => {\n    [null, '_-'].forEach(chars => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(null, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(undefined, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func('', chars)).toBe('');\n    });\n  });\n\n  it(`\\`trim\\` should work with \\`undefined\\` or empty string values for \\`chars\\``, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `a b c`;\n\n    expect(func(string, undefined)).toBe(expected);\n    expect(func(string, '')).toBe(string);\n  });\n\n  it(`\\`trim\\` should work as an iteratee for methods like \\`_.map\\``, () => {\n    const string = Object(`${whitespace}a b c${whitespace}`);\n    const trimmed = `a b c`;\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = [string, string, string].map(func);\n\n    expect(actual).toEqual([trimmed, trimmed, trimmed]);\n  });\n\n  it(`\\`trim\\` should support character arrays`, () => {\n    const string = 'hello world';\n    const expected = 'o wo';\n\n    expect(func(string, ['rld', 'hel'])).toBe(expected);\n    expect(func(string, ['rl', 'd', 'he', 'l'])).toBe(expected);\n    expect(func(string, ['he', 'd', 'lr'])).toBe(expected);\n    expect(func(string, ['d', 'l', 'r', 'e', 'h'])).toBe(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(trim).toEqualTypeOf<typeof trimLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/trim.ts",
    "content": "import { trim as trimToolkit } from '../../string/trim.ts';\n\n/**\n * Removes leading and trailing whitespace or specified characters from a string.\n *\n * @param {string} str - The string from which leading and trailing characters will be trimmed.\n * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `\" \"`.\n * @returns {string} - The resulting string after the specified leading and trailing characters have been removed.\n *\n * @example\n * trim(\"  hello  \"); // \"hello\"\n * trim(\"--hello--\", \"-\"); // \"hello\"\n * trim(\"##hello##\", [\"#\", \"o\"]); // \"hell\"\n */\nexport function trim(string?: string, chars?: string): string;\n\n/**\n * Removes leading and trailing whitespace or specified characters from a string.\n *\n * @param {string} str - The string from which leading and trailing characters will be trimmed.\n * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `\" \"`.\n * @returns {string} - The resulting string after the specified leading and trailing characters have been removed.\n *\n * @example\n * trim(\"  hello  \"); // \"hello\"\n * trim(\"--hello--\", \"-\"); // \"hello\"\n * trim(\"##hello##\", [\"#\", \"o\"]); // \"hell\"\n */\nexport function trim(string: string, index: string | number, guard: object): string;\n\nexport function trim(str: any, chars?: any, guard?: any): string {\n  if (str == null) {\n    return '';\n  }\n\n  if (guard != null || chars == null) {\n    return str.toString().trim();\n  }\n\n  switch (typeof chars) {\n    case 'object': {\n      if (Array.isArray(chars)) {\n        return trimToolkit(\n          str,\n          chars.flatMap(x => x.toString().split(''))\n        );\n      } else {\n        return trimToolkit(str, (chars as any).toString().split(''));\n      }\n    }\n    default: {\n      return trimToolkit(str, chars.toString().split(''));\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/string/trimEnd.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { trimEnd as trimEndLodash } from 'lodash';\nimport { trimEnd } from './trimEnd';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('trimEnd', () => {\n  const func = trimEnd;\n\n  it(`\\`trimEnd\\` should remove trailing whitespace`, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `${whitespace}a b c`;\n\n    expect(func(string)).toBe(expected);\n  });\n\n  it(`\\`trimEnd\\` should coerce \\`string\\` to a string`, () => {\n    const object = {\n      toString: () => `${whitespace}a b c${whitespace}`,\n    };\n    const expected = `${whitespace}a b c`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(object)).toBe(expected);\n  });\n\n  it(`\\`trimEnd\\` should remove trailing \\`chars\\``, () => {\n    const string = '-_-a-b-c-_-';\n    const expected = `${'-_-'}a-b-c`;\n\n    expect(func(string, '_-')).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['-', '_'])).toBe(expected);\n  });\n\n  it(`\\`trimEnd\\` should coerce \\`chars\\` to a string`, () => {\n    const object = { toString: () => '_-' };\n    const string = '-_-a-b-c-_-';\n    const expected = `${'-_-'}a-b-c`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(string, object)).toBe(expected);\n  });\n\n  it(`\\`trimEnd\\` should return an empty string for empty values and \\`chars\\``, () => {\n    [null, '_-'].forEach(chars => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(null, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(undefined, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func('', chars)).toBe('');\n    });\n  });\n\n  it(`\\`trimEnd\\` should work with \\`undefined\\` or empty string values for \\`chars\\``, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `${whitespace}a b c`;\n\n    expect(func(string, undefined)).toBe(expected);\n    expect(func(string, '')).toBe(string);\n  });\n\n  it(`\\`trimEnd\\` should work as an iteratee for methods like \\`_.map\\``, () => {\n    const string = Object(`${whitespace}a b c${whitespace}`);\n    const trimmed = `${whitespace}a b c`;\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = [string, string, string].map(func);\n\n    expect(actual).toEqual([trimmed, trimmed, trimmed]);\n  });\n\n  it(`\\`trimEnd\\` should support character arrays`, () => {\n    const string = 'hello world';\n    const expected = 'hello wo';\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['rld'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['rl', 'd'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['d', 'lr'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['d', 'l', 'r'])).toBe(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(trimEnd).toEqualTypeOf<typeof trimEndLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/trimEnd.ts",
    "content": "import { trimEnd as trimEndToolkit } from '../../string/trimEnd.ts';\n\n/**\n * Removes trailing whitespace or specified characters from a string.\n *\n * @param {string} string - The string to trim.\n * @param {string} chars - The characters to trim from the end of the string.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimEnd('  abc  ');\n * // => '  abc'\n *\n * trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\nexport function trimEnd(string?: string, chars?: string): string;\n\n/**\n * Removes trailing whitespace or specified characters from a string.\n *\n * @param {string} string - The string to trim.\n * @param {string | number} index - The index parameter (used with guard).\n * @param {object} guard - Enables use as an iteratee for methods like `map`.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimEnd('  abc  ', 0, {});\n * // => '  abc'\n */\nexport function trimEnd(string: string, index: string | number, guard: object): string;\n\n/**\n * Removes trailing whitespace or specified characters from a string.\n *\n * @param {string} str - The string from which trailing characters will be trimmed.\n * @param {string | number} chars - The character(s) to remove from the end of the string.\n * @param {object} guard - Enables use as an iteratee for methods like `map`.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimEnd('  abc  ');\n * // => '  abc'\n *\n * trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\nexport function trimEnd(str?: string, chars?: string | number, guard?: object): string {\n  if (str == null) {\n    return '';\n  }\n\n  if (guard != null || chars == null) {\n    return str.toString().trimEnd();\n  }\n\n  return trimEndToolkit(str, chars.toString().split(''));\n}\n"
  },
  {
    "path": "src/compat/string/trimStart.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { trimStart as trimStartLodash } from 'lodash';\nimport { trimStart } from './trimStart';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('trimStart', () => {\n  const func = trimStart;\n\n  it(`\\`trimStart\\` should remove leading whitespace`, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `a b c${whitespace}`;\n\n    expect(func(string)).toBe(expected);\n  });\n\n  it(`\\`trimStart\\` should coerce \\`string\\` to a string`, () => {\n    const object = {\n      toString: () => `${whitespace}a b c${whitespace}`,\n    };\n    const expected = `a b c${whitespace}`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(object)).toBe(expected);\n  });\n\n  it(`\\`trimStart\\` should remove leading \\`chars\\``, () => {\n    const string = '-_-a-b-c-_-';\n    const expected = `a-b-c${'-_-'}`;\n\n    expect(func(string, '_-')).toBe(expected);\n  });\n\n  it(`\\`trimStart\\` should coerce \\`chars\\` to a string`, () => {\n    const object = { toString: () => '_-' };\n    const string = '-_-a-b-c-_-';\n    const expected = `a-b-c${'-_-'}`;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(func(string, object)).toBe(expected);\n  });\n\n  it(`\\`trimStart\\` should return an empty string for empty values and \\`chars\\``, () => {\n    [null, '_-'].forEach(chars => {\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(null, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func(undefined, chars)).toBe('');\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(func('', chars)).toBe('');\n    });\n  });\n\n  it(`\\`trimStart\\` should work with \\`undefined\\` or empty string values for \\`chars\\``, () => {\n    const string = `${whitespace}a b c${whitespace}`;\n    const expected = `a b c${whitespace}`;\n\n    expect(func(string, undefined)).toBe(expected);\n    expect(func(string, '')).toBe(string);\n  });\n\n  it(`\\`trimStart\\` should work as an iteratee for methods like \\`_.map\\``, () => {\n    const string = Object(`${whitespace}a b c${whitespace}`);\n    const trimmed = `a b c${whitespace}`;\n    // eslint-disable-next-line\n    // @ts-ignore\n    const actual = [string, string, string].map(func);\n\n    expect(actual).toEqual([trimmed, trimmed, trimmed]);\n  });\n\n  it(`\\`trimStart\\` should support character arrays`, () => {\n    const string = 'hello world';\n    const expected = 'o world';\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['hel'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['he', 'l'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['eh', 'l'])).toBe(expected);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(func(string, ['l', 'e', 'h'])).toBe(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(trimStart).toEqualTypeOf<typeof trimStartLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/trimStart.ts",
    "content": "import { trimStart as trimStartToolkit } from '../../string/trimStart.ts';\n\n/**\n * Removes leading whitespace or specified characters from a string.\n *\n * @param {string} string - The string to trim.\n * @param {string} chars - The characters to trim from the start of the string.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimStart('  abc  ');\n * // => 'abc  '\n *\n * trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\nexport function trimStart(string?: string, chars?: string): string;\n\n/**\n * Removes leading whitespace or specified characters from a string.\n *\n * @param {string} string - The string to trim.\n * @param {string | number} index - The index parameter (used with guard).\n * @param {object} guard - Enables use as an iteratee for methods like `map`.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimStart('  abc  ', 0, {});\n * // => 'abc  '\n */\nexport function trimStart(string: string, index: string | number, guard: object): string;\n\n/**\n * Removes leading whitespace or specified characters from a string.\n *\n * @param {string} str - The string from which leading characters will be trimmed.\n * @param {string | number} chars - The character(s) to remove from the start of the string.\n * @param {object} guard - Enables use as an iteratee for methods like `map`.\n * @returns {string} Returns the trimmed string.\n *\n * @example\n * trimStart('  abc  ');\n * // => 'abc  '\n *\n * trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\nexport function trimStart(str?: string, chars?: string | number, guard?: object): string {\n  if (str == null) {\n    return '';\n  }\n\n  if (guard != null || chars == null) {\n    return str.toString().trimStart();\n  }\n\n  return trimStartToolkit(str, chars.toString().split(''));\n}\n"
  },
  {
    "path": "src/compat/string/truncate.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { truncate as truncateLodash } from 'lodash';\nimport { truncate } from './truncate.ts';\nimport { forEach } from '../array/forEach.ts';\nimport { map } from '../array/map.ts';\nimport { constant } from '../util/constant.ts';\n\ndescribe('truncate', () => {\n  const string = 'hi-diddly-ho there, neighborino';\n\n  it('should use a default `length` of `30`', () => {\n    expect(truncate(string)).toBe('hi-diddly-ho there, neighbo...');\n  });\n\n  it('should not truncate if `string` is <= `length`', () => {\n    expect(truncate(string, { length: string.length })).toBe(string);\n    expect(truncate(string, { length: string.length + 2 })).toBe(string);\n  });\n\n  it('should truncate string the given length', () => {\n    expect(truncate(string, { length: 24 })).toBe('hi-diddly-ho there, n...');\n  });\n\n  it('should support a `omission` option', () => {\n    expect(truncate(string, { omission: ' [...]' })).toBe('hi-diddly-ho there, neig [...]');\n  });\n\n  it('should coerce nullish `omission` values to strings', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(truncate(string, { omission: null })).toBe('hi-diddly-ho there, neighbnull');\n    expect(truncate(string, { omission: undefined })).toBe('hi-diddly-ho there, nundefined');\n  });\n\n  it('should support a `length` option', () => {\n    expect(truncate(string, { length: 4 })).toBe('h...');\n  });\n\n  it('should support a `separator` option', () => {\n    expect(truncate(string, { length: 24, separator: ' ' })).toBe('hi-diddly-ho there,...');\n    expect(truncate(string, { length: 24, separator: /,? +/ })).toBe('hi-diddly-ho there...');\n    expect(truncate(string, { length: 24, separator: /,? +/g })).toBe('hi-diddly-ho there...');\n  });\n\n  it('should treat negative `length` as `0`', () => {\n    forEach([0, -2], length => {\n      expect(truncate(string, { length: length })).toBe('...');\n    });\n  });\n\n  it('should coerce `length` to an integer', () => {\n    forEach(['', NaN, 4.6, '4'], (length, index) => {\n      const actual = index > 1 ? 'h...' : '...';\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      expect(truncate(string, { length: { valueOf: constant(length) } })).toBe(actual);\n    });\n  });\n\n  it('should coerce `string` to a string', () => {\n    expect(truncate(Object(string), { length: 4 })).toBe('h...');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(truncate({ toString: constant(string) }, { length: 5 })).toBe('hi...');\n  });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const actual = map([string, string, string], truncate);\n    const truncated = 'hi-diddly-ho there, neighbo...';\n\n    expect(actual).toEqual([truncated, truncated, truncated]);\n  });\n\n  const test = 'hi-diddly-ho there, neighborino';\n  const strAsciiLong = test.padEnd(500, 'A').padEnd(1000, '5').padEnd(1500, ' ').padEnd(2000, ', ');\n\n  it('should truncate to the default 30 characters', () => {\n    expect(truncate(strAsciiLong, { length: 150 })).toEqual(\n      'hi-diddly-ho there, neighborinoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...'\n    );\n  });\n\n  it('should truncate to 24 characters and remove trailing characters including the last space', () => {\n    expect(truncate(test, { length: 24, separator: ' ' })).toEqual('hi-diddly-ho there,...');\n  });\n\n  it('should truncate to 24 characters and remove trailing characters including the last comma using regex separator', () => {\n    expect(truncate(test, { length: 24, separator: /,? +/ })).toEqual('hi-diddly-ho there...');\n  });\n\n  it('should handle using a regex separator with already existing \"u\" flag', () => {\n    expect(truncate(test, { length: 24, separator: /,? +/u })).toEqual('hi-diddly-ho there...');\n  });\n\n  it('should truncate to 30 characters using \" [...]\" as the omission string', () => {\n    expect(truncate(test, { omission: ' [...]' })).toEqual('hi-diddly-ho there, neig [...]');\n  });\n\n  it('should return the input string if string is <= length', () => {\n    expect(truncate('ABC', { length: 3 })).toEqual('ABC');\n  });\n\n  it('should return the omission string if string is longer than length and shorter than the omission string', () => {\n    expect(truncate('ABC', { length: 2 })).toEqual('...');\n  });\n\n  it('should count unicode characters as a single character instead of string.length', () => {\n    expect(truncate('¥§✈✉🤓', { length: 5 })).toEqual('¥§✈✉🤓');\n  });\n\n  it('should truncate unicode characters correctly', () => {\n    expect(truncate('¥§✈✉🤓', { length: 4, omission: '…' })).toEqual('¥§✈…');\n  });\n\n  it('should handle null and undefined strings', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(truncate(null)).toBe('');\n    expect(truncate(undefined)).toBe('');\n  });\n\n  it('should return base string with omission when separator is not found in truncated string', () => {\n    expect(truncate('hello world test', { length: 10, separator: 'xyz' })).toEqual('hello w...');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(truncate).toEqualTypeOf<typeof truncateLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/truncate.ts",
    "content": "import { isObject } from '../predicate/isObject.ts';\n\ntype TruncateOptions = {\n  length?: number;\n  separator?: string | RegExp;\n  omission?: string;\n};\n\n/**\n * Used to compose unicode character classes.\n * @link https://github.com/lodash/lodash/blob/4.17.21-es/_hasUnicode.js\n *\n * Used to detect strings with zero-width joiners or code points from the astral planes.\n * @link http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/\n */\n// eslint-disable-next-line no-misleading-character-class\nconst regexMultiByte = /[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]/;\n\n/**\n * This regex might more completely detect unicode, but it is slower and this project\n * desires to mimic the behavior of lodash.\n */\n// const regexMultiByte = /[^\\x00-\\x7F]/;\n\n/**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n *\n * @example\n * const test = 'hi-diddly-ho there, neighborino';\n * const truncatedStr1 = truncate(test) // returns 'hi-diddly-ho there, neighbo...'\n * const truncatedStr2 = truncate(test, { length: 24, separator: ' ' }) // returns 'hi-diddly-ho there,...'\n * const truncatedStr3 = truncate(test, { length: 24, separator: /,? +/ }) // returns 'hi-diddly-ho there...'\n * const truncatedStr4 = truncate(test, { omission: ' [...]' }) // returns 'hi-diddly-ho there, neig [...]'\n * const truncatedStr5 = truncate('ABC', { length: 3 }) // returns 'ABC'\n * const truncatedStr6 = truncate('ABC', { length: 2 }) // returns '...'\n * const truncatedStr7 = truncate('¥§✈✉🤓', { length: 5 }) // returns '¥§✈✉🤓'\n * const truncatedStr8 = truncate('¥§✈✉🤓', { length: 4, omission: '…' }) // returns '¥§✈…'\n */\nexport function truncate(string?: string, options?: TruncateOptions): string {\n  string = string != null ? `${string}` : '';\n\n  let length = 30;\n  let omission = '...';\n\n  if (isObject(options)) {\n    length = parseLength(options.length);\n    omission = 'omission' in options ? `${options.omission}` : '...';\n  }\n\n  let i = string.length;\n\n  // Unicode length of omission string\n  const lengthOmission = Array.from(omission).length;\n  // Unicode length of the string if it is truncated\n  const lengthBase = Math.max(length - lengthOmission, 0);\n\n  let strArray: string[] | undefined = undefined;\n  const unicode = regexMultiByte.test(string);\n  if (unicode) {\n    strArray = Array.from(string);\n    i = strArray.length;\n  }\n\n  // Return input string as it satisfies truncation length\n  if (length >= i) {\n    return string;\n  }\n\n  // Return omission string since the input string will be truncated and is shorter than the omission string\n  if (i <= lengthOmission) {\n    return omission;\n  }\n\n  // Use string.slice for non-unicode strings for performance\n  let base = strArray === undefined ? string.slice(0, lengthBase) : strArray?.slice(0, lengthBase).join('');\n\n  // Return truncated string with omission appended when there is no separator to check for\n  const separator = options?.separator;\n  if (!separator) {\n    base += omission;\n    return base;\n  }\n\n  // Further truncate the string to the last separator using unicode regex\n  const search = separator instanceof RegExp ? separator.source : separator;\n  const flags = 'u' + (separator instanceof RegExp ? separator.flags.replace('u', '') : '');\n  const withoutSeparator = new RegExp(`(?<result>.*(?:(?!${search}).))(?:${search})`, flags).exec(base);\n\n  // Return the final truncated string with the omission string appended\n  return (!withoutSeparator?.groups ? base : withoutSeparator.groups.result) + omission;\n}\n\nfunction parseLength(length: number | undefined) {\n  if (length == null) {\n    return 30;\n  }\n\n  if (length <= 0) {\n    return 0;\n  }\n\n  return length;\n}\n"
  },
  {
    "path": "src/compat/string/unescape.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { unescape as unescapeLodash } from 'lodash';\nimport { escape } from './escape';\nimport { unescape } from './unescape';\nimport { map } from '../array/map';\nimport { stubString } from '../util/stubString';\n\ndescribe('unescape', () => {\n  let escaped = '&amp;&lt;&gt;&quot;&#39;/';\n  let unescaped = '&<>\"\\'/';\n\n  escaped += escaped;\n  unescaped += unescaped;\n\n  it('should unescape entities in order', () => {\n    expect(unescape('&amp;lt;')).toBe('&lt;');\n  });\n\n  it('should unescape the proper entities', () => {\n    expect(unescape(escaped)).toBe(unescaped);\n  });\n\n  it('should handle strings with nothing to unescape', () => {\n    expect(unescape('abc')).toBe('abc');\n  });\n\n  it('should unescape the same characters escaped by `_.escape`', () => {\n    expect(unescape(escape(unescaped))).toBe(unescaped);\n  });\n\n  it('should handle leading zeros in html entities', () => {\n    expect(unescape('&#39;')).toBe(\"'\");\n    expect(unescape('&#039;')).toBe(\"'\");\n    expect(unescape('&#000039;')).toBe(\"'\");\n  });\n\n  ['&#96;', '&#x2F;'].forEach(entity => {\n    it(`should not unescape the \"${entity}\" entity`, () => {\n      expect(unescape(entity)).toBe(entity);\n    });\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = map(values, stubString);\n\n    const actual = map(values, (value, index) => (index ? unescape(value as any) : unescape()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(unescape).toEqualTypeOf<typeof unescapeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/unescape.ts",
    "content": "import { unescape as unescapeToolkit } from '../../string/unescape.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.\n * It is the inverse of `escape`.\n *\n * @param {string} str The string to unescape.\n * @returns {string} Returns the unescaped string.\n *\n * @example\n * unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'\n * unescape('This is a &quot;quote&quot;'); // returns 'This is a \"quote\"'\n * unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''\n * unescape('This is a &amp; symbol'); // returns 'This is a & symbol'\n */\nexport function unescape(str?: string): string {\n  return unescapeToolkit(toString(str));\n}\n"
  },
  {
    "path": "src/compat/string/upperCase.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { upperCase as upperCaseLodash } from 'lodash';\nimport { upperCase } from './upperCase';\n\ndescribe('upperCase', () => {\n  const strings = ['foo bar', 'Foo bar', 'foo Bar', 'Foo Bar', 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'];\n\n  it(`should convert \\`string\\``, () => {\n    const actual = strings.map(string => upperCase(string));\n\n    const expected = strings.map(() => 'FOO BAR');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert string to snake case, identical to lodash', () => {\n    expect(upperCase('åäöÅÄÖ')).toBe('AAO AAO');\n    expect(upperCase('helloÅäöWorld')).toBe('HELLO AAO WORLD');\n    expect(upperCase('café')).toBe('CAFE');\n    expect(upperCase('naïve')).toBe('NAIVE');\n    expect(upperCase('Zürich')).toBe('ZURICH');\n    expect(upperCase('São Paulo')).toBe('SAO PAULO');\n    expect(upperCase('Москва')).toBe('МОСКВА');\n  });\n\n  it(`should handle double-converting strings`, () => {\n    const actual = strings.map(string => upperCase(upperCase(string)));\n\n    const expected = strings.map(() => 'FOO BAR');\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should remove contraction apostrophes`, () => {\n    const postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];\n\n    [\"'\", '\\u2019'].forEach(apos => {\n      const actual = postfixes.map(postfix => upperCase(`a b${apos}${postfix} c`));\n\n      const expected = postfixes.map(postfix => `A B${postfix.toUpperCase()} C`);\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it(`should remove Latin mathematical operators`, () => {\n    const actual = ['\\xd7', '\\xf7'].map(upperCase);\n    expect(actual).toEqual(['', '']);\n  });\n\n  it(`should coerce \\`string\\` to a string`, () => {\n    const string = 'foo bar';\n    expect(upperCase(Object(string))).toBe('FOO BAR');\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(upperCase({ toString: () => string })).toBe('FOO BAR');\n  });\n  it('should uppercase as space-separated words', () => {\n    expect(upperCase('--foo-bar--')).toBe('FOO BAR');\n    expect(upperCase('fooBar')).toBe('FOO BAR');\n    expect(upperCase('__foo_bar__')).toBe('FOO BAR');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(upperCase).toEqualTypeOf<typeof upperCaseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/upperCase.ts",
    "content": "import { deburr } from './deburr.ts';\nimport { upperCase as upperCaseToolkit } from '../../string/upperCase.ts';\nimport { normalizeForCase } from '../_internal/normalizeForCase.ts';\n\n/**\n * Converts a string to upper case.\n *\n * Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.\n *\n * @param {string | object} str - The string that is to be changed to upper case.\n * @returns {string} - The converted string to upper case.\n *\n * @example\n * const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'\n * const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'\n * const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'\n * const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'\n */\nexport function upperCase(str?: string): string {\n  return upperCaseToolkit(normalizeForCase(deburr(str)));\n}\n"
  },
  {
    "path": "src/compat/string/upperFirst.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { upperFirst as upperFirstLodash } from 'lodash';\nimport { upperFirst } from './upperFirst';\nimport { map } from '../array/map';\nimport { stubString } from '../util/stubString';\n\ndescribe('upperFirst', () => {\n  it('should uppercase only the first character', () => {\n    expect(upperFirst('fred')).toBe('Fred');\n    expect(upperFirst('Fred')).toBe('Fred');\n    expect(upperFirst('FRED')).toBe('FRED');\n  });\n\n  it('should return an empty string for empty values', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined, ''];\n    const expected = map(values, stubString);\n\n    const actual = map(values, (value, index) => (index ? upperFirst(value as any) : upperFirst()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(upperFirst).toEqualTypeOf<typeof upperFirstLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/string/upperFirst.ts",
    "content": "import { upperFirst as upperFirstToolkit } from '../../string/upperFirst.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Converts the first character of string to upper case.\n *\n * @param {string} str - The string that is to be changed\n * @returns {string} - The converted string.\n *\n * @example\n * const convertedStr1 = upperFirst('fred') // returns 'Fred'\n * const convertedStr2 = upperFirst('Fred') // returns 'Fred'\n * const convertedStr3 = upperFirst('FRED') // returns 'FRED'\n */\nexport function upperFirst<T extends string = string>(str?: T): Capitalize<T> {\n  return upperFirstToolkit(toString(str)) as Capitalize<T>;\n}\n"
  },
  {
    "path": "src/compat/string/words.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { words as wordsLodash } from 'lodash';\nimport { words } from './words';\n\ndescribe('words', () => {\n  it('splits a simple ASCII comma-separated string into words', () => {\n    const result = words('fred, barney, & pebbles');\n    expect(result).toEqual(['fred', 'barney', 'pebbles']);\n  });\n\n  it('splits a string with custom pattern', () => {\n    const result = words('fred, barney, & pebbles', /[^, ]+/g);\n    expect(result).toEqual(['fred', 'barney', '&', 'pebbles']);\n  });\n\n  it('returns an empty array when input is an empty string', () => {\n    const result = words('');\n    expect(result).toEqual([]);\n  });\n\n  it('correctly handles a string with multiple number inputs', () => {\n    const result = words('+0 -3 +3 -4 +4');\n    expect(result).toEqual(['0', '3', '3', '4', '4']);\n  });\n\n  it('splits a space-separated string into individual words', () => {\n    const result = words('split these words');\n    expect(result).toEqual(['split', 'these', 'words']);\n  });\n\n  it('splits a string representation of an array', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const result = words([1, 2, 3]);\n    expect(result).toEqual(['1', '2', '3']);\n  });\n\n  it('returns an empty array when input is undefined', () => {\n    const result = words(undefined);\n    expect(result).toEqual([]);\n  });\n\n  it('correctly handles a string with Unicode emojis and special characters', () => {\n    const result = words('example🚀with✨emojis💡and🔍special🌟characters');\n    expect(result).toEqual(['example', '🚀', 'with', '✨', 'emojis', '💡', 'and', '🔍', 'special', '🌟', 'characters']);\n  });\n\n  it('should match accented letters', () => {\n    expect(words('Lunedì 18 Set')).toEqual(['Lunedì', '18', 'Set']);\n  });\n\n  it('should match Hindi characters', () => {\n    expect(words('नमस्ते नमस्ते')).toEqual(['नमस्ते', 'नमस्ते']);\n  });\n\n  it('should match ordinal numbers', () => {\n    expect(words('1st 2nd+3rd--4th@1ST*2ND-3RD_4TH')).toEqual(['1st', '2nd', '3rd', '4th', '1ST', '2ND', '3RD', '4TH']);\n  });\n\n  it('should match contractions', () => {\n    expect(words(\"I don't+can't-won't-DON'T*THEY'RE-I'LL\")).toEqual([\n      'I',\n      \"don't\",\n      \"can't\",\n      \"won't\",\n      \"DON'T\",\n      \"THEY'RE\",\n      \"I'LL\",\n    ]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(words).toEqualTypeOf<typeof wordsLodash>();\n  });\n\n  it('should use default pattern when guard is provided', () => {\n    const result = words('fred, barney, & pebbles', 'custom' as any, {});\n    expect(result).toEqual(['fred', 'barney', 'pebbles']);\n  });\n\n  it('should convert number pattern to string', () => {\n    const result = words('test123', 123 as any);\n    expect(result).toEqual(['123']);\n  });\n});\n"
  },
  {
    "path": "src/compat/string/words.ts",
    "content": "import { toString } from '../util/toString.ts';\n\nconst rNonCharLatin = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\xd7\\\\xf7';\n\nconst rUnicodeUpper = '\\\\p{Lu}';\nconst rUnicodeLower = '\\\\p{Ll}';\n\nconst rMisc = '(?:[\\\\p{Lm}\\\\p{Lo}]\\\\p{M}*)';\nconst rNumber = '\\\\d';\nconst rUnicodeOptContrLower = \"(?:['\\u2019](?:d|ll|m|re|s|t|ve))?\";\nconst rUnicodeOptContrUpper = \"(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?\";\nconst rUnicodeBreak = `[\\\\p{Z}\\\\p{P}${rNonCharLatin}]`;\n\nconst rUnicodeMiscUpper = `(?:${rUnicodeUpper}|${rMisc})`;\nconst rUnicodeMiscLower = `(?:${rUnicodeLower}|${rMisc})`;\n\nconst rUnicodeWord = RegExp(\n  [\n    `${rUnicodeUpper}?${rUnicodeLower}+${rUnicodeOptContrLower}(?=${rUnicodeBreak}|${rUnicodeUpper}|$)`,\n\n    `${rUnicodeMiscUpper}+${rUnicodeOptContrUpper}(?=${rUnicodeBreak}|${rUnicodeUpper}${rUnicodeMiscLower}|$)`,\n\n    `${rUnicodeUpper}?${rUnicodeMiscLower}+${rUnicodeOptContrLower}`,\n\n    `${rUnicodeUpper}+${rUnicodeOptContrUpper}`,\n\n    `${rNumber}*(?:1ST|2ND|3RD|(?![123])${rNumber}TH)(?=\\\\b|[a-z_])`,\n\n    `${rNumber}*(?:1st|2nd|3rd|(?![123])${rNumber}th)(?=\\\\b|[A-Z_])`,\n\n    `${rNumber}+`,\n\n    '\\\\p{Emoji_Presentation}',\n\n    '\\\\p{Extended_Pictographic}',\n  ].join('|'),\n  'gu'\n);\n\n/**\n * Splits `string` into an array of its words.\n *\n * @param {string | object} str - The string or object that is to be split into words.\n * @param {RegExp | string} [pattern] - The pattern to match words.\n * @returns {string[]} - Returns the words of `string`.\n *\n * @example\n * const wordsArray1 = words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n */\nexport function words(string?: string, pattern?: string | RegExp): string[];\n\n/**\n * Splits `string` into an array of its words.\n *\n * @param {string | object} str - The string or object that is to be split into words.\n * @param {RegExp | string} [pattern] - The pattern to match words.\n * @returns {string[]} - Returns the words of `string`.\n *\n * @example\n * const wordsArray1 = words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n */\nexport function words(string: string, index: string | number, guard: object): string[];\n\n/**\n * Splits `string` into an array of its words.\n *\n * @param {string | object} str - The string or object that is to be split into words.\n * @param {RegExp | string} [pattern] - The pattern to match words.\n * @returns {string[]} - Returns the words of `string`.\n *\n * @example\n * const wordsArray1 = words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n */\nexport function words(str?: string, pattern: string | number | RegExp = rUnicodeWord, guard?: object): string[] {\n  const input = toString(str);\n\n  if (guard) {\n    pattern = rUnicodeWord;\n  }\n\n  if (typeof pattern === 'number') {\n    pattern = pattern.toString();\n  }\n\n  const words = Array.from(input.match(pattern) ?? []);\n\n  return words.filter(x => x !== '');\n}\n"
  },
  {
    "path": "src/compat/toolkit.ts",
    "content": "import * as compat from './compat.ts';\n\ntype ToolkitFn = (value: any) => any;\n\ntype Compat = typeof compat;\n\nexport interface Toolkit extends ToolkitFn, Compat {}\n\n// Cast the initial function to the combined Toolkit type\nexport const toolkit: Toolkit = ((value: any) => {\n  return value;\n}) as Toolkit;\n\n// Assign properties from compat module\nObject.assign(toolkit, compat);\n\n// Set the placeholder for partial and partialRight\ntoolkit.partial.placeholder = toolkit;\ntoolkit.partialRight.placeholder = toolkit;\n"
  },
  {
    "path": "src/compat/util/bindAll.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { bindAll as bindAllLodash } from 'lodash';\nimport { bindAll } from './bindAll';\nimport { toArgs } from '../_internal/toArgs';\nimport { cloneDeep } from '../object/cloneDeep';\n\ninterface TestObject {\n  _n0: number;\n  _p0: number;\n  _a: number;\n  _b: number;\n  _c: number;\n  _d: number;\n  '-0': () => number;\n  0: () => number;\n  a: () => number;\n  b: () => number;\n  c: () => number;\n  d: () => number;\n  [key: string]: number | (() => number) | undefined;\n}\n\ndescribe('bindAll', () => {\n  const args = toArgs(['a']);\n\n  const source: TestObject = {\n    _n0: -2,\n    _p0: -1,\n    _a: 1,\n    _b: 2,\n    _c: 3,\n    _d: 4,\n    '-0': function () {\n      return this._n0;\n    },\n    0: function () {\n      return this._p0;\n    },\n    a: function () {\n      return this._a;\n    },\n    b: function () {\n      return this._b;\n    },\n    c: function () {\n      return this._c;\n    },\n    d: function () {\n      return this._d;\n    },\n  };\n\n  it('should accept individual method names', () => {\n    const object = cloneDeep(source);\n    bindAll(object, 'a', 'b');\n\n    const actual = ['a', 'b', 'c'].map(key => {\n      const method = object[key];\n      if (typeof method === 'function') {\n        return method.call({});\n      }\n      return undefined;\n    });\n\n    expect(actual).toEqual([1, 2, undefined]);\n  });\n\n  it('should accept arrays of method names', () => {\n    const object = cloneDeep(source);\n    bindAll(object, ['a', 'b'], ['c']);\n\n    const actual = ['a', 'b', 'c', 'd'].map(key => {\n      const method = object[key];\n      if (typeof method === 'function') {\n        return method.call({});\n      }\n      return undefined;\n    });\n\n    expect(actual).toEqual([1, 2, 3, undefined]);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = props.map(key => {\n      const object = cloneDeep(source);\n      bindAll(object, key);\n      const methodKey = Object.is(Number(key), -0) ? '-0' : '0';\n      return object[methodKey]();\n    });\n\n    expect(actual).toEqual([-2, -2, -1, -1]);\n  });\n\n  it('should work with an array `object`', () => {\n    const array = ['push', 'pop'];\n    bindAll(array);\n    expect(array.pop).toBe(Array.prototype.pop);\n  });\n\n  it('should work with `arguments` objects as secondary arguments', () => {\n    const object = cloneDeep(source);\n    bindAll(object, args as any);\n\n    const actual = Array.from(args).map((key: string) => {\n      const method = object[key];\n      if (typeof method === 'function') {\n        return method.call({});\n      }\n      return undefined;\n    });\n\n    expect(actual).toEqual([1]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(bindAll).toEqualTypeOf<typeof bindAllLodash>();\n  });\n\n  it('should return the same object when object is null', () => {\n    const result = bindAll(null);\n    expect(result).toBe(null);\n  });\n\n  it('should return the same object when object is not an object', () => {\n    const result1 = bindAll('string');\n    expect(result1).toBe('string');\n\n    const result2 = bindAll(123);\n    expect(result2).toBe(123);\n\n    const result3 = bindAll(true);\n    expect(result3).toBe(true);\n\n    const result = bindAll(undefined);\n    expect(result).toBe(undefined);\n  });\n\n  it('should return the same object when no method names are provided', () => {\n    const object = cloneDeep(source);\n    const result = bindAll(object);\n    expect(result).toBe(object);\n  });\n\n  it('should return the same object when empty arrays are provided as method names', () => {\n    const object = cloneDeep(source);\n    const result = bindAll(object, [], []);\n    expect(result).toBe(object);\n  });\n\n  it('should handle non-function properties', () => {\n    const object = cloneDeep(source);\n    bindAll(object, '_a', 'a');\n\n    expect(object._a).toBe(1);\n    expect(object.a()).toBe(1);\n  });\n});\n"
  },
  {
    "path": "src/compat/util/bindAll.ts",
    "content": "import { isFunction } from '../../predicate/isFunction.ts';\nimport { Many } from '../_internal/Many.ts';\nimport { isArray } from '../predicate/isArray.ts';\nimport { isObject } from '../predicate/isObject.ts';\nimport { toString } from '../util/toString.ts';\n\n/**\n * Binds methods of an object to the object itself, overwriting the existing method.\n * Method names may be specified as individual arguments or as arrays of method names.\n *\n * @template T - The type of the object.\n * @param {T} object - The object to bind methods to.\n * @param {Array<Many<string>>} [methodNames] - The method names to bind, specified individually or in arrays.\n * @returns {T} - Returns the object.\n *\n * @example\n * const view = {\n *   'label': 'docs',\n *   'click': function() {\n *     console.log('clicked ' + this.label);\n *   }\n * };\n *\n * bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n *\n * @example\n * // Using individual method names\n * bindAll(view, 'click');\n * // => Same as above\n */\nexport function bindAll<T>(object: T, ...methodNames: Array<Many<string>>): T {\n  if (object == null) {\n    return object;\n  }\n\n  if (!isObject(object)) {\n    return object;\n  }\n\n  if (isArray(object) && methodNames.length === 0) {\n    return object;\n  }\n\n  const methods: any[] = [];\n  for (let i = 0; i < methodNames.length; i++) {\n    const name = methodNames[i];\n    if (isArray(name)) {\n      methods.push(...name);\n    } else if (name && typeof name === 'object' && 'length' in name) {\n      methods.push(...Array.from(name));\n    } else {\n      methods.push(name);\n    }\n  }\n\n  if (methods.length === 0) {\n    return object;\n  }\n\n  for (let i = 0; i < methods.length; i++) {\n    const key = methods[i];\n    const stringKey = toString(key) as keyof typeof object;\n    const func = object[stringKey];\n\n    if (isFunction(func)) {\n      object[stringKey] = func.bind(object) as any;\n    }\n  }\n\n  return object;\n}\n"
  },
  {
    "path": "src/compat/util/cond.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { cond as condLodash } from 'lodash';\nimport { cond } from './cond';\nimport { stubFalse, stubTrue } from '../index';\nimport { property } from '../object/property';\nimport { matches } from '../predicate/matches';\nimport { matchesProperty } from '../predicate/matchesProperty';\n\n// Utility functions\nconst stubA = () => 'a';\nconst stubB = () => 'b';\nconst stubC = () => 'c';\n\ndescribe('cond', () => {\n  it('should create a conditional function', () => {\n    const resultFunc = cond([\n      [matches({ a: 1 }), stubA],\n      [matchesProperty('b', 1), stubB],\n      [property('c'), stubC],\n    ]);\n\n    expect(resultFunc({ a: 1, b: 2, c: 3 })).toBe('a');\n    expect(resultFunc({ a: 0, b: 1, c: 2 })).toBe('b');\n    expect(resultFunc({ a: -1, b: 0, c: 1 })).toBe('c');\n  });\n\n  it('should provide arguments to functions', () => {\n    let args1: unknown[] = [];\n    let args2: unknown[] = [];\n    const expected = ['a', 'b', 'c'];\n\n    const resultFunc = cond([\n      [\n        function (...params: unknown[]) {\n          if (!args1.length) {\n            args1 = params;\n          }\n          return true;\n        },\n        function (...params: unknown[]) {\n          if (!args2.length) {\n            args2 = params;\n          }\n        },\n      ],\n    ]);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    resultFunc('a', 'b', 'c');\n\n    expect(args1).toEqual(expected);\n    expect(args2).toEqual(expected);\n  });\n\n  it('should work with predicate shorthands', () => {\n    const resultFunc = (cond as any)([\n      [{ a: 1 }, stubA],\n      [['b', 1], stubB],\n      ['c', stubC],\n    ]);\n\n    expect(resultFunc({ a: 1, b: 2, c: 3 })).toBe('a');\n    expect(resultFunc({ a: 0, b: 1, c: 2 })).toBe('b');\n    expect(resultFunc({ a: -1, b: 0, c: 1 })).toBe('c');\n  });\n\n  it('should return `undefined` when no condition is met', () => {\n    const resultFunc = (cond as any)([[stubFalse, stubA]]);\n    expect(resultFunc({ a: 1 })).toBe(undefined);\n  });\n\n  it('should throw a TypeError if `pairs` is not composed of functions', () => {\n    [false, true].forEach(value => {\n      expect(() => {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        cond([[stubTrue, value]])();\n      }).toThrow(TypeError);\n    });\n  });\n\n  it('should use `this` binding of function for `pairs`', () => {\n    const resultFunc = (cond as any)([\n      [\n        function (this: Record<string, unknown>, a: string) {\n          return this[a];\n        },\n        function (this: Record<string, unknown>, a: string, b: string) {\n          return this[b];\n        },\n      ],\n    ]);\n\n    const object = { resultFunc, a: 1, b: 2 };\n    expect(object.resultFunc('a', 'b')).toBe(2);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(cond).toEqualTypeOf<typeof condLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/cond.ts",
    "content": "import { iteratee } from './iteratee.ts';\nimport { isFunction } from '../../predicate/isFunction.ts';\n\n/**\n * Creates a function that checks conditions one by one and runs the matching function.\n *\n * Each pair consists of a condition (predicate) and a function to run.\n * The function goes through each condition in order until it finds one that's true.\n * When it finds a true condition, it runs the corresponding function and returns its result.\n * If none of the conditions are true, it returns undefined.\n *\n * @param {Array<Array>} pairs - Array of pairs. Each pair consists of a predicate function and a function to run.\n * @returns {(...args: any[]) => unknown} A new composite function that checks conditions and runs the matching function.\n * @example\n *\n * const func = cond([\n *   [matches({ a: 1 }), constant('matches A')],\n *   [conforms({ b: isNumber }), constant('matches B')],\n *   [stubTrue, constant('no match')]\n * ]);\n *\n * func({ a: 1, b: 2 });\n * // => 'matches A'\n *\n * func({ a: 0, b: 1 });\n * // => 'matches B'\n *\n * func({ a: '1', b: '2' });\n * // => 'no match'\n */\nexport function cond<R>(pairs: Array<[truthy: () => boolean, falsey: () => R]>): () => R;\n\n/**\n * Creates a function that checks conditions one by one and runs the matching function.\n *\n * Each pair consists of a condition (predicate) and a function to run.\n * The function goes through each condition in order until it finds one that's true.\n * When it finds a true condition, it runs the corresponding function and returns its result.\n * If none of the conditions are true, it returns undefined.\n *\n * @param {Array<Array>} pairs - Array of pairs. Each pair consists of a predicate function and a function to run.\n * @returns {(...args: any[]) => unknown} A new composite function that checks conditions and runs the matching function.\n * @example\n *\n * const func = cond([\n *   [matches({ a: 1 }), constant('matches A')],\n *   [conforms({ b: isNumber }), constant('matches B')],\n *   [stubTrue, constant('no match')]\n * ]);\n *\n * func({ a: 1, b: 2 });\n * // => 'matches A'\n *\n * func({ a: 0, b: 1 });\n * // => 'matches B'\n *\n * func({ a: '1', b: '2' });\n * // => 'no match'\n */\nexport function cond<T, R>(pairs: Array<[truthy: (val: T) => boolean, falsey: (val: T) => R]>): (val: T) => R;\n\nexport function cond(pairs: any[][]): (...args: any[]) => unknown {\n  const length = pairs.length;\n\n  const processedPairs = pairs.map(pair => {\n    const predicate = pair[0];\n    const func = pair[1];\n\n    if (!isFunction(func)) {\n      throw new TypeError('Expected a function');\n    }\n\n    return [iteratee(predicate), func] as const;\n  });\n\n  return function (this: unknown, ...args: any[]): unknown {\n    for (let i = 0; i < length; i++) {\n      const pair = processedPairs[i];\n      const predicate = pair[0] as (this: unknown, ...args: any[]) => boolean;\n      const func = pair[1] as (this: unknown, ...args: any[]) => unknown;\n\n      if (predicate.apply(this, args)) {\n        return func.apply(this, args);\n      }\n    }\n  };\n}\n"
  },
  {
    "path": "src/compat/util/constant.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { constant as constantLodash } from 'lodash';\nimport { constant } from './constant';\nimport { stubTrue } from './stubTrue';\nimport { empties } from '../_internal/empties';\nimport { falsey } from '../_internal/falsey';\nimport * as esToolkit from '../index';\n\ndescribe('constant', () => {\n  it('should create a function that returns `value`', () => {\n    const object = { a: 1 };\n    const values = Array(2).concat(empties, true, 1, 'a');\n    const _constant = constant(object);\n\n    const results = values.map((value, index) => {\n      if (index < 2) {\n        return index ? _constant.call({}) : _constant();\n      }\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      return _constant(value);\n    });\n\n    expect(esToolkit.every(results, result => result === object));\n  });\n\n  it('should work with falsey values', () => {\n    const expected = falsey.map(stubTrue);\n\n    const actual = falsey.map((value, index) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const _constant = index ? constant(value) : constant();\n      const result = _constant();\n\n      return result === value || (result !== result && value !== value);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  // Chaining is out of scope for es-toolkit\n\n  // it('should return a wrapped value when chaining', () => {\n  //   const wrapped = _(true).constant();\n  //   expect(wrapped instanceof _);\n  // });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(constant).toEqualTypeOf<typeof constantLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/constant.ts",
    "content": "/**\n * Creates a new function that always returns `value`.\n *\n * @template T - The type of the value to return.\n * @param {T} value - The value to return from the new function.\n * @returns {() => T} Returns the new constant function.\n */\nexport function constant<T>(value: T): () => T;\n\n/**\n * Creates a new function that always returns `value`.\n *\n * @template T - The type of the value to return.\n * @param {T} value - The value to return from the new function.\n * @returns {() => T | undefined} Returns the new constant function.\n *\n * @example\n * const object = { a: 1 };\n * const returnsObject = constant(object);\n *\n * returnsObject(); // => { a: 1 }\n * returnsObject() === object; // => true\n */\nexport function constant<T>(value?: T): () => T | undefined {\n  return () => value;\n}\n"
  },
  {
    "path": "src/compat/util/defaultTo.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { defaultTo as defaultToLodash } from 'lodash';\nimport { defaultTo } from './defaultTo';\nimport { falsey } from '../_internal/falsey';\n\ndescribe('defaultTo', () => {\n  it('should return a default value if `value` is `NaN` or nullish', () => {\n    const expected = falsey.map(value => (value == null || value !== value ? 1 : value));\n\n    const actual = falsey.map(value => defaultTo(value, 1));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(defaultTo).toEqualTypeOf<typeof defaultToLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/defaultTo.ts",
    "content": "/**\n * Returns the default value for `null`, `undefined`, and `NaN`.\n *\n * @template T - The type of the value parameter\n * @param {T | null | undefined} value - The value to check.\n * @param {T} defaultValue - The default value to return if the first value is null, undefined, or NaN.\n * @returns {T} Returns either the first value or the default value.\n */\nexport function defaultTo<T>(value: T | null | undefined, defaultValue: T): T;\n\n/**\n * Returns the default value for `null`, `undefined`, and `NaN`.\n *\n * @template T - The type of the value parameter\n * @template D - The type of the defaultValue parameter\n * @param {T | null | undefined} value - The value to check.\n * @param {D} defaultValue - The default value to return if the first value is null, undefined, or NaN.\n * @returns {T | D} Returns either the first value or the default value.\n */\nexport function defaultTo<T, D>(value: T | null | undefined, defaultValue: D): T | D;\n\n/**\n * Returns the default value for `null`, `undefined`, and `NaN`.\n *\n * @template T - The type of the value parameter\n * @template D - The type of the defaultValue parameter\n * @param {T | null | undefined} value - The value to check.\n * @param {T | D} defaultValue - The default value to return if the first value is null, undefined, or NaN.\n * @returns {T | D} Returns either the first value or the default value.\n *\n * @example\n * defaultTo(null, 'default') // returns 'default'\n * defaultTo(undefined, 42) // returns 42\n * defaultTo(NaN, 0) // returns 0\n * defaultTo('actual', 'default') // returns 'actual'\n * defaultTo(123, 0) // returns 123\n */\nexport function defaultTo<T, D>(value: T | null | undefined, defaultValue: D): T | D {\n  if (value == null || Number.isNaN(value)) {\n    return defaultValue;\n  }\n\n  return value;\n}\n"
  },
  {
    "path": "src/compat/util/eq.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { eq as eqLodash } from 'lodash';\nimport { eq } from './eq';\n\ndescribe('eq', () => {\n  it('should perform a `SameValueZero` comparison of two values', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(eq()).toBe(true);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(eq(undefined)).toBe(true);\n    expect(eq(0, -0)).toBe(true);\n    expect(eq(NaN, NaN)).toBe(true);\n    expect(eq(1, 1)).toBe(true);\n\n    expect(eq(null, undefined)).toBe(false);\n    expect(eq(1, Object(1))).toBe(false);\n    expect(eq(1, '1')).toBe(false);\n    expect(eq(1, '1')).toBe(false);\n\n    const object = { a: 1 };\n    expect(eq(object, object)).toBe(true);\n    expect(eq(object, { a: 1 })).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(eq).toEqualTypeOf<typeof eqLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/eq.ts",
    "content": "export { isEqualsSameValueZero as eq } from '../../_internal/isEqualsSameValueZero.ts';\n"
  },
  {
    "path": "src/compat/util/gt.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { gt as gtLodash } from 'lodash';\nimport { gt } from './gt';\n\ndescribe('gt', () => {\n  it('should return `true` if `value` > `other`', () => {\n    expect(gt(3, 1)).toBe(true);\n    expect(gt('def', 'abc')).toBe(true);\n  });\n\n  it('should return `false` if `value` is <= `other`', () => {\n    expect(gt(1, 3)).toBe(false);\n    expect(gt(3, 3)).toBe(false);\n    expect(gt('abc', 'def')).toBe(false);\n    expect(gt('def', 'def')).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(gt).toEqualTypeOf<typeof gtLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/gt.ts",
    "content": "import { toNumber } from './toNumber.ts';\n\n/**\n * Checks if value is greater than other.\n *\n * @param {any} value The value to compare.\n * @param {any} other The other value to compare.\n * @returns {boolean} Returns `true` if value is greater than other, else `false`.\n *\n * @example\n * gt(3, 1); // true\n * gt(3, 3); // false\n * gt(1, 3); // false\n */\nexport function gt(value: any, other: any): boolean {\n  if (typeof value === 'string' && typeof other === 'string') {\n    return value > other;\n  }\n\n  return toNumber(value) > toNumber(other);\n}\n"
  },
  {
    "path": "src/compat/util/gte.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { gte as gteLodash } from 'lodash';\nimport { gte } from './gte';\n\ndescribe('gte', () => {\n  it('should return `true` if `value` >= `other`', () => {\n    expect(gte(3, 1)).toBe(true);\n    expect(gte(3, 3)).toBe(true);\n    expect(gte('def', 'abc')).toBe(true);\n    expect(gte('def', 'def')).toBe(true);\n  });\n\n  it('should return `false` if `value` is less than `other`', () => {\n    expect(gte(1, 3)).toBe(false);\n    expect(gte('abc', 'def')).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(gte).toEqualTypeOf<typeof gteLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/gte.ts",
    "content": "import { toNumber } from './toNumber.ts';\n\n/**\n * Checks if value is greater than or equal to other.\n *\n * @param {any} value The value to compare.\n * @param {any} other The other value to compare.\n * @returns {boolean} Returns `true` if value is greater than or equal to other, else `false`.\n *\n * @example\n * gte(3, 1); // => true\n * gte(3, 3); // => true\n * gte(1, 3); // => false\n */\nexport function gte(value: any, other: any): boolean {\n  if (typeof value === 'string' && typeof other === 'string') {\n    return value >= other;\n  }\n\n  return toNumber(value) >= toNumber(other);\n}\n"
  },
  {
    "path": "src/compat/util/invoke.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { invoke as invokeLodash } from 'lodash';\nimport { constant } from './constant';\nimport { invoke } from './invoke';\nimport { noop } from '../../function/noop';\nimport { stubA } from '../_internal/stubA';\nimport { stubB } from '../_internal/stubB';\nimport { forEach } from '../array/forEach';\nimport { map } from '../array/map';\n\ndescribe('invoke', () => {\n  it('should invoke a method on `object`', () => {\n    const object = { a: constant('A') };\n    const actual = invoke(object, 'a');\n\n    expect(actual).toBe('A');\n  });\n\n  it('should support invoking with arguments', () => {\n    const object = {\n      a: function (a: any, b: any) {\n        return [a, b];\n      },\n    };\n    const actual = invoke(object, 'a', [1, 2]);\n\n    expect(actual).toEqual([1, 2]);\n  });\n\n  it('should not error on nullish elements', () => {\n    const values = [null, undefined];\n    const expected = map(values, noop);\n\n    const actual = map(values, value => {\n      return invoke(value, 'a.b', [1, 2]);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const object = { '-0': stubA, 0: stubB };\n    const props = [-0, Object(-0), 0, Object(0)];\n\n    const actual = map(props, key => invoke(object, key));\n\n    expect(actual).toEqual(['a', 'a', 'b', 'b']);\n  });\n\n  it('should support deep paths', () => {\n    const object = {\n      a: {\n        b: function (a: any, b: any) {\n          return [a, b];\n        },\n      },\n    };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      const actual = invoke(object, path, [1, 2]);\n      expect(actual).toEqual([1, 2]);\n    });\n  });\n\n  it('should invoke deep property methods with the correct `this` binding', () => {\n    const object = {\n      a: {\n        b: function () {\n          return this.c;\n        },\n        c: 1,\n      },\n    };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      expect(invoke(object, path)).toEqual(1);\n    });\n  });\n\n  it('should return `undefined` when resolving deep paths on nullish values', () => {\n    const object = { a: null };\n    expect(invoke(object, 'a.b')).toBeUndefined();\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(invoke).toEqualTypeOf<typeof invokeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/invoke.ts",
    "content": "import { toPath } from './toPath.ts';\nimport { toKey } from '../_internal/toKey.ts';\nimport { last } from '../array/last.ts';\nimport { get } from '../object/get.ts';\n\n/**\n * Invokes the method at `path` of `object` with the given arguments.\n *\n * @param {any} object - The object to query.\n * @param {PropertyKey | PropertyKey[]} path - The path of the method to invoke.\n * @param {any[]} args - The arguments to invoke the method with.\n * @returns {any} - Returns the result of the invoked method.\n *\n * @example\n * const object = {\n *   a: {\n *     b: function (x, y) {\n *       return x + y;\n *     }\n *   }\n * };\n *\n * invoke(object, 'a.b', [1, 2]); // => 3\n * invoke(object, ['a', 'b'], [1, 2]); // => 3\n */\nexport function invoke(object: any, path: PropertyKey | readonly PropertyKey[], ...args: any[]): any {\n  args = args.flat(1);\n\n  if (object == null) {\n    return;\n  }\n\n  switch (typeof path) {\n    case 'string': {\n      if (typeof object === 'object' && Object.hasOwn(object, path)) {\n        return invokeImpl(object, [path], args);\n      }\n      return invokeImpl(object, toPath(path), args);\n    }\n    case 'number':\n    case 'symbol': {\n      return invokeImpl(object, [path], args);\n    }\n    default: {\n      if (Array.isArray(path)) {\n        return invokeImpl(object, path, args);\n      } else {\n        // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n        // @ts-expect-error\n        return invokeImpl(object, [path], args);\n      }\n    }\n  }\n}\n\nfunction invokeImpl(object: unknown, path: PropertyKey[], args: any[]) {\n  const parent = get(object, path.slice(0, -1), object);\n\n  if (parent == null) {\n    return undefined;\n  }\n\n  let lastKey = last(path);\n  const lastValue = lastKey?.valueOf();\n\n  if (typeof lastValue === 'number') {\n    lastKey = toKey(lastValue);\n  } else {\n    lastKey = String(lastKey);\n  }\n\n  const func = get(parent, lastKey as PropertyKey);\n\n  return func?.apply(parent, args);\n}\n"
  },
  {
    "path": "src/compat/util/iteratee.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { iteratee as iterateeLodash } from 'lodash';\nimport { iteratee } from './iteratee';\nimport { stubFalse } from './stubFalse';\nimport { slice } from '../_internal/slice';\nimport { partial, partialRight } from '../index';\nimport * as esToolkit from '../index';\n\ndescribe('iteratee', () => {\n  it('should provide arguments to `func`', () => {\n    const fn = function () {\n      // eslint-disable-next-line prefer-rest-params\n      return slice.call(arguments);\n    };\n    const iterateeFn = iteratee(fn);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = iterateeFn('a', 'b', 'c', 'd', 'e', 'f');\n\n    expect(actual).toEqual(['a', 'b', 'c', 'd', 'e', 'f']);\n  });\n\n  it('should return `_.identity` when `func` is nullish', () => {\n    const object = {};\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(esToolkit.constant(object));\n\n    const actual = values.map((value, index) => {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const identity = index ? iteratee(value) : iteratee();\n      return identity(object);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an iteratee created by `_.matches` when `func` is an object', () => {\n    const matches = iteratee({ a: 1, b: 2 });\n    expect(matches({ a: 1, b: 2, c: 3 })).toBe(true);\n    expect(matches({ b: 2 })).toBe(false);\n  });\n\n  it('should not change `_.matches` behavior if `source` is modified', () => {\n    const sources: any[] = [{ a: { b: 2, c: 3 } }, { a: 1, b: 2 }, { a: 1 }];\n\n    sources.forEach((source, index) => {\n      const object = esToolkit.cloneDeep(source);\n      const matches = iteratee(source);\n\n      expect(matches(object)).toBe(true);\n\n      if (index) {\n        source.a = 2;\n        source.b = 1;\n        source.c = 3;\n      } else {\n        source.a.b = 1;\n        source.a.c = 2;\n        source.a.d = 3;\n      }\n      expect(matches(object)).toBe(true);\n      expect(matches(source)).toBe(false);\n    });\n  });\n\n  it('should return an iteratee created by `_.matchesProperty` when `func` is an array', () => {\n    const array = ['a', undefined];\n    let matches = iteratee([0, 'a']);\n\n    expect(matches(array)).toBe(true);\n\n    matches = iteratee(['0', 'a']);\n    expect(matches(array)).toBe(true);\n\n    matches = iteratee([1, undefined]);\n    expect(matches(array)).toBe(true);\n  });\n\n  it('should support deep paths for `_.matchesProperty` shorthands', () => {\n    const object = { a: { b: { c: 1, d: 2 } } };\n    const matches = iteratee(['a.b', { c: 1 }]);\n\n    expect(matches(object)).toBe(true);\n  });\n\n  it('should not change `_.matchesProperty` behavior if `source` is modified', () => {\n    const sources: any[] = [{ a: { b: 2, c: 3 } }, { a: 1, b: 2 }, { a: 1 }];\n\n    sources.forEach((source, index) => {\n      const object = { a: esToolkit.cloneDeep(source) };\n      const matches = iteratee(['a', source]);\n\n      expect(matches(object)).toBe(true);\n\n      if (index) {\n        source.a = 2;\n        source.b = 1;\n        source.c = 3;\n      } else {\n        source.a.b = 1;\n        source.a.c = 2;\n        source.a.d = 3;\n      }\n      expect(matches(object)).toBe(true);\n      expect(matches({ a: source })).toBe(false);\n    });\n  });\n\n  it('should return an iteratee created by `_.property` when `func` is a number or string', () => {\n    const array = ['a'];\n    let prop = iteratee(0);\n\n    expect(prop(array)).toBe('a');\n\n    prop = iteratee('0');\n    expect(prop(array)).toBe('a');\n  });\n\n  it('should support deep paths for `_.property` shorthands', () => {\n    const object = { a: { b: 2 } };\n    const prop = iteratee('a.b');\n\n    expect(prop(object)).toBe(2);\n  });\n\n  it('should work with functions created by `_.partial` and `_.partialRight`', () => {\n    const fn = function (this: any) {\n      const result = [this.a];\n      // eslint-disable-next-line prefer-rest-params\n      Array.prototype.push.apply(result, arguments as any);\n      return result;\n    };\n\n    const expected = [1, 2, 3];\n    const object = { a: 1, iteratee: iteratee(partial(fn, 2)) };\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(object.iteratee(3)).toEqual(expected);\n\n    object.iteratee = iteratee(partialRight(fn, 3));\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(object.iteratee(2)).toEqual(expected);\n  });\n\n  // it('should use internal `iteratee` if external is unavailable', () => {\n  //   const iteratee = _.iteratee;\n  //   delete _.iteratee;\n\n  //   expect(map([{ a: 1 }], 'a')).toEqual([1]);\n\n  //   _.iteratee = iteratee;\n  // });\n\n  it('should work as an iteratee for methods like `_.map`', () => {\n    const fn = function (this: any) {\n      return this instanceof Number;\n    };\n    const array = [fn, fn, fn];\n    const iteratees = array.map(iteratee);\n    const expected = array.map(stubFalse);\n\n    const actual = iteratees.map(iteratee => iteratee());\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(iteratee).toEqualTypeOf<typeof iterateeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/iteratee.ts",
    "content": "import { identity } from '../../function/identity.ts';\nimport { property } from '../object/property.ts';\nimport { matches } from '../predicate/matches.ts';\nimport { matchesProperty } from '../predicate/matchesProperty.ts';\n\n/**\n * Returns the provided function as-is when it is a function type.\n *\n * @template F - The function type\n * @param {F} func - The function to return\n * @returns {F} Returns the provided function unchanged\n *\n * @example\n * const fn = (x: number) => x * 2;\n * const iterateeFn = iteratee(fn);\n * iterateeFn(4); // => 8\n */\nexport function iteratee<F extends (...args: any[]) => any>(func: F): F;\n\n/**\n * Creates an iteratee function based on the provided property key or object.\n * If given a property key, returns a function that gets that property from objects.\n * If given an object, returns a function that matches objects against the provided one.\n *\n * @param {PropertyKey | object} func - The value to convert to an iteratee\n * @returns {Function} Returns the iteratee function\n *\n * @example\n * // With property key\n * const getLength = iteratee('length');\n * getLength([1,2,3]); // => 3\n *\n * // With object\n * const matchObj = iteratee({ x: 1, y: 2 });\n * matchObj({ x: 1, y: 2, z: 3 }); // => true\n */\nexport function iteratee(func: PropertyKey | object): (...args: any[]) => any;\n\n/**\n * Creates a function that returns a value from an element in a collection.\n *\n * You can call `iteratee` with the following types of arguments:\n *\n * - **Function**: Returns the function as-is, which will be called with the element from the collection.\n * - **Property name**: Returns the value of the specified property from the element.\n * - **Property-value pair**: Returns a boolean indicating whether the element's property matches the given value.\n * - **Partial object**: Returns a boolean indicating whether the element matches the properties of the partial object.\n *\n * If you don't provide any arguments or pass `null`, this function will return a function that simply returns its input unchanged.\n *\n * @param {symbol | number | string | object | null | ((...args: any[]) => any)} value - The value to convert to an iteratee.\n * @returns {(...args: any[]) => unknown} - Returns the new iteratee function.\n * @example\n * const func = iteratee();\n * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [{ a: 1 }, { a: 2 }, { a: 3 }]\n *\n * const func = iteratee((object) => object.a);\n * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]\n *\n * const func = iteratee('a');\n * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]\n *\n * const func = iteratee({ a: 1 });\n * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }\n *\n * const func = iteratee(['a', 1]);\n * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }\n */\nexport function iteratee(\n  value?: symbol | number | string | object | null | ((...args: any[]) => unknown)\n): (...args: any[]) => any {\n  if (value == null) {\n    return identity;\n  }\n\n  switch (typeof value) {\n    case 'function': {\n      return value as any;\n    }\n    case 'object': {\n      if (Array.isArray(value) && value.length === 2) {\n        return matchesProperty(value[0], value[1]);\n      }\n\n      return matches(value);\n    }\n    case 'string':\n    case 'symbol':\n    case 'number': {\n      return property(value);\n    }\n  }\n}\n"
  },
  {
    "path": "src/compat/util/lt.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { lt as ltLodash } from 'lodash';\nimport { lt } from './lt';\n\ndescribe('lt', () => {\n  it('should return `true` if `value` is less than `other`', () => {\n    expect(lt(1, 3)).toBe(true);\n    expect(lt('abc', 'def')).toBe(true);\n  });\n\n  it('should return `false` if `value` >= `other`', () => {\n    expect(lt(3, 1)).toBe(false);\n    expect(lt(3, 3)).toBe(false);\n    expect(lt('def', 'abc')).toBe(false);\n    expect(lt('def', 'def')).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(lt).toEqualTypeOf<typeof ltLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/lt.ts",
    "content": "import { toNumber } from './toNumber.ts';\n\n/**\n * Checks if value is less than other.\n *\n * @param {any} value The value to compare.\n * @param {any} other The other value to compare.\n * @returns {boolean} Returns `true` if value is less than other, else `false`.\n *\n * @example\n * lt(1, 3); // true\n * lt(3, 3); // false\n * lt(3, 1); // false\n */\nexport function lt(value: any, other: any): boolean {\n  if (typeof value === 'string' && typeof other === 'string') {\n    return value < other;\n  }\n\n  return toNumber(value) < toNumber(other);\n}\n"
  },
  {
    "path": "src/compat/util/lte.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { lte as lteLodash } from 'lodash';\nimport { lt } from './lt';\nimport { lte } from './lte';\n\ndescribe('lte', () => {\n  it('should return `true` if `value` is <= `other`', () => {\n    expect(lte(1, 3)).toBe(true);\n    expect(lte(3, 3)).toBe(true);\n    expect(lte('abc', 'def')).toBe(true);\n    expect(lte('def', 'def')).toBe(true);\n  });\n\n  it('should return `false` if `value` > `other`', () => {\n    expect(lt(3, 1)).toBe(false);\n    expect(lt('def', 'abc')).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(lte).toEqualTypeOf<typeof lteLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/lte.ts",
    "content": "import { toNumber } from './toNumber.ts';\n\n/**\n * Checks if value is less than or equal to other.\n *\n * @param {any} value The value to compare.\n * @param {any} other The other value to compare.\n * @returns {boolean} Returns `true` if value is less than or equal to other, else `false`.\n *\n * @example\n * lte(1, 3); // => true\n * lte(3, 3); // => true\n * lte(3, 1); // => false\n */\nexport function lte(value: any, other: any): boolean {\n  if (typeof value === 'string' && typeof other === 'string') {\n    return value <= other;\n  }\n\n  return toNumber(value) <= toNumber(other);\n}\n"
  },
  {
    "path": "src/compat/util/method.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { method as methodLodash } from 'lodash';\nimport { constant } from './constant';\nimport { method, method as methodToolkit } from './method';\nimport { times } from './times';\nimport { noop } from '../../function/noop';\nimport { stubOne } from '../_internal/stubOne';\nimport { forEach } from '../array/forEach';\nimport { map } from '../array/map';\n\ndescribe('method', () => {\n  it('should create a function that calls a method of a given object', () => {\n    const object = { a: stubOne };\n\n    forEach(['a', ['a']], path => {\n      const method = methodToolkit(path);\n      expect(method.length).toBe(1);\n      expect(method(object)).toBe(1);\n    });\n  });\n\n  it('should work with deep property values', () => {\n    const object = { a: { b: () => 2 } };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      const method = methodToolkit(path);\n      expect(method(object)).toBe(2);\n    });\n  });\n\n  it('should work with a non-string `path`', () => {\n    const array = times(3, constant);\n\n    forEach([1, [1]], path => {\n      const method = methodToolkit(path);\n      expect(method(array)).toBe(1);\n    });\n  });\n\n  it('should coerce `path` to a string', () => {\n    function fn() {}\n    fn.toString = constant('fn');\n\n    const expected = [1, 2, 3, 4];\n    const object = {\n      null: stubOne,\n      undefined: () => 2,\n      fn: () => 3,\n      '[object Object]': () => 4,\n    };\n    const paths = [null, undefined, fn, {}];\n\n    times(2, index => {\n      const actual = map(paths, path => {\n        const method = methodToolkit(index ? [path] : (path as any));\n        return method(object);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should work with inherited property values', () => {\n    function Foo() {}\n    Foo.prototype.a = stubOne;\n\n    forEach(['a', ['a']], path => {\n      const method = methodToolkit(path);\n      // eslint-disable-next-line\n      // @ts-ignore\n      expect(method(new Foo())).toBe(1);\n    });\n  });\n\n  it('should use a key over a path', () => {\n    const object = { 'a.b': stubOne, a: { b: () => 2 } };\n\n    forEach(['a.b', ['a.b']], path => {\n      const method = methodToolkit(path);\n      expect(method(object)).toBe(1);\n    });\n  });\n\n  it('should return `undefined` when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, noop);\n\n    forEach(['constructor', ['constructor']], path => {\n      const method = methodToolkit(path);\n\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const actual = map(values, (value, index) => (index ? method(value) : method()));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` for deep paths when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, noop);\n\n    forEach(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], path => {\n      const method = methodToolkit(path);\n\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-expect-error\n      const actual = map(values, (value, index) => (index ? method(value) : method()));\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` if parts of `path` are missing', () => {\n    const object = {};\n\n    forEach(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], path => {\n      const method = methodToolkit(path);\n      expect(method(object)).toBe(undefined);\n    });\n  });\n\n  it('should apply partial arguments to function', () => {\n    const object = {\n      fn: function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.prototype.slice.call(arguments);\n      },\n    };\n\n    forEach(['fn', ['fn']], path => {\n      const method = methodToolkit(path, 1, 2, 3);\n      expect(method(object)).toEqual([1, 2, 3]);\n    });\n  });\n\n  it('should invoke deep property methods with the correct `this` binding', () => {\n    const object = {\n      a: {\n        b: function () {\n          return this.c;\n        },\n        c: 1,\n      },\n    };\n\n    forEach(['a.b', ['a', 'b']], path => {\n      const method = methodToolkit(path);\n      expect(method(object)).toBe(1);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(method).toEqualTypeOf<typeof methodLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/method.ts",
    "content": "import { invoke } from './invoke.ts';\n\n/**\n * Creates a function that invokes the method at `path` of a given object with the provided arguments.\n *\n * @param {PropertyKey | PropertyKey[]} path - The path of the method to invoke.\n * @param {...any} args - The arguments to invoke the method with.\n * @returns {(object?: unknown) => any} - Returns a new function that takes an object and invokes the method at `path` with `args`.\n *\n * @example\n * const object = {\n *   a: {\n *     b: function (x, y) {\n *       return x + y;\n *     }\n *   }\n * };\n *\n * const add = method('a.b', 1, 2);\n * console.log(add(object)); // => 3\n */\nexport function method(path: PropertyKey | readonly PropertyKey[], ...args: any[]): (object: any) => any {\n  return function (object?: unknown) {\n    return invoke(object, path, args);\n  };\n}\n"
  },
  {
    "path": "src/compat/util/methodOf.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { constant, each, map, noop } from '..';\nimport type { methodOf as methodOfLodash } from 'lodash';\nimport { methodOf, methodOf as methodOfToolkit } from './methodOf';\nimport { times } from './times';\nimport { stubFour } from '../_internal/stubFour';\nimport { stubOne } from '../_internal/stubOne';\nimport { stubThree } from '../_internal/stubThree';\nimport { stubTwo } from '../_internal/stubTwo';\n\ndescribe('methodOf', () => {\n  it('should create a function that calls a method of a given key', () => {\n    const object = { a: stubOne };\n\n    each(['a', ['a']], path => {\n      const methodOf = methodOfToolkit(object);\n      expect(methodOf.length).toBe(1);\n      expect(methodOf(path)).toBe(1);\n    });\n  });\n\n  it('should work with deep property values', () => {\n    const object = { a: { b: stubTwo } };\n\n    each(['a.b', ['a', 'b']], path => {\n      const methodOf = methodOfToolkit(object);\n      expect(methodOf(path)).toBe(2);\n    });\n  });\n\n  it('should work with a non-string `path`', () => {\n    const array = times(3, constant);\n\n    each([1, [1]], path => {\n      const methodOf = methodOfToolkit(array);\n      expect(methodOf(path)).toBe(1);\n    });\n  });\n\n  it('should coerce `path` to a string', () => {\n    function fn() {}\n    fn.toString = constant('fn');\n\n    const expected = [1, 2, 3, 4];\n    const object = {\n      null: stubOne,\n      undefined: stubTwo,\n      fn: stubThree,\n      '[object Object]': stubFour,\n    };\n    const paths = [null, undefined, fn, {}];\n\n    times(2, index => {\n      const actual = map(paths, path => {\n        const methodOf = methodOfToolkit(object);\n        // @ts-expect-error - methodOf should handle nullish values\n        return methodOf(index ? [path] : path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should work with inherited property values', () => {\n    function Foo() {}\n    Foo.prototype.a = stubOne;\n\n    each(['a', ['a']], path => {\n      // @ts-expect-error - Foo is a constructor\n      const methodOf = methodOfToolkit(new Foo());\n      expect(methodOf(path)).toBe(1);\n    });\n  });\n\n  it('should use a key over a path', () => {\n    const object = { 'a.b': stubOne, a: { b: stubTwo } };\n\n    each(['a.b', ['a.b']], path => {\n      const methodOf = methodOfToolkit(object);\n      expect(methodOf(path)).toBe(1);\n    });\n  });\n\n  it('should return `undefined` when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, noop);\n\n    each(['constructor', ['constructor']], path => {\n      const actual = map(values, (value, index) => {\n        // @ts-expect-error - methodOf should handle nullish values\n        const methodOf = index ? methodOfToolkit() : methodOfToolkit(value);\n        return methodOf(path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` for deep paths when `object` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = map(values, noop);\n\n    each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], path => {\n      const actual = map(values, (value, index) => {\n        // @ts-expect-error - methodOf should handle nullish values\n        const methodOf = index ? methodOfToolkit() : methodOfToolkit(value);\n        return methodOf(path);\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  it('should return `undefined` if parts of `path` are missing', () => {\n    const object = {};\n    const methodOf = methodOfToolkit(object);\n\n    each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], path => {\n      expect(methodOf(path)).toBe(undefined);\n    });\n  });\n\n  it('should apply partial arguments to function', () => {\n    const object = {\n      fn: function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.prototype.slice.call(arguments);\n      },\n    };\n\n    const methodOf = methodOfToolkit(object, 1, 2, 3);\n\n    each(['fn', ['fn']], path => {\n      expect(methodOf(path)).toEqual([1, 2, 3]);\n    });\n  });\n\n  it('should invoke deep property methods with the correct `this` binding', () => {\n    const object = {\n      a: {\n        b: function () {\n          return this.c;\n        },\n        c: 1,\n      },\n    };\n    const methodOf = methodOfToolkit(object);\n\n    each(['a.b', ['a', 'b']], path => {\n      expect(methodOf(path)).toBe(1);\n    });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(methodOf).toEqualTypeOf<typeof methodOfLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/methodOf.ts",
    "content": "import { invoke } from './invoke.ts';\n\n/**\n * Creates a function that invokes the method at a given path of `object` with the provided arguments.\n *\n * @param {object} object - The object to query.\n * @param {...any} args - The arguments to invoke the method with.\n * @returns {(path: PropertyKey | PropertyKey[]) => any} - Returns a new function that takes a path and invokes the method at `path` with `args`.\n *\n * @example\n * const object = {\n *  a: {\n *   b: function (x, y) {\n *    return x + y;\n *    }\n *   }\n * };\n *\n * const add = methodOf(object, 1, 2);\n * console.log(add('a.b')); // => 3\n */\nexport function methodOf(object: object, ...args: any[]): (path: PropertyKey | readonly PropertyKey[]) => any {\n  return function (path: PropertyKey | readonly PropertyKey[]) {\n    return invoke(object, path, args);\n  };\n}\n"
  },
  {
    "path": "src/compat/util/now.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { now as nowLodash } from 'lodash';\nimport { now } from './now';\nimport { delay } from '../../promise/delay';\n\ndescribe('now', () => {\n  it('should return the number of milliseconds that have elapsed since the Unix epoch', async () => {\n    const stamp = Number(new Date());\n    const actual = now();\n\n    expect(actual).toBeGreaterThanOrEqual(stamp);\n\n    await delay(32);\n\n    expect(now()).toBeGreaterThan(actual);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(now).toEqualTypeOf<typeof nowLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/now.ts",
    "content": "/**\n * Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.\n *\n * @returns {number} The current time in milliseconds.\n *\n * @example\n * const currentTime = now();\n * console.log(currentTime); // Outputs the current time in milliseconds\n *\n * @example\n * const startTime = now();\n * // Some time-consuming operation\n * const endTime = now();\n * console.log(`Operation took ${endTime - startTime} milliseconds`);\n */\nexport function now(): number {\n  return Date.now();\n}\n"
  },
  {
    "path": "src/compat/util/over.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { over as overLodash } from 'lodash';\nimport { over } from './over';\nimport { slice } from '../_internal/slice';\n\ndescribe('over', () => {\n  it('should create a function that invokes `iteratees`', () => {\n    const func = (over as any)(Math.max, Math.min);\n    expect(func(1, 2, 3, 4)).toEqual([4, 1]);\n  });\n\n  it('should use `identity` when a predicate is nullish', () => {\n    const func = (over as any)(undefined, null);\n    expect(func('a', 'b', 'c')).toEqual(['a', 'a']);\n  });\n\n  it('should work with `property` shorthands', () => {\n    const func = (over as any)('b', 'a');\n    expect(func({ a: 1, b: 2 })).toEqual([2, 1]);\n  });\n\n  it('should work with `matches` shorthands', () => {\n    const func = (over as any)({ b: 1 }, { a: 1 });\n    expect(func({ a: 1, b: 2 })).toEqual([false, true]);\n  });\n\n  it('should work with `matchesProperty` shorthands', () => {\n    const func = (over as any)([\n      ['b', 2],\n      ['a', 2],\n    ]);\n\n    expect(func({ a: 1, b: 2 })).toEqual([true, false]);\n    expect(func({ a: 2, b: 1 })).toEqual([false, true]);\n  });\n\n  it('should differentiate between `property` and `matchesProperty` shorthands', () => {\n    let func = (over as any)(['a', 1]);\n\n    expect(func({ a: 1, 1: 2 })).toEqual([1, 2]);\n    expect(func({ a: 2, 1: 1 })).toEqual([2, 1]);\n\n    func = (over as any)([['a', 1]]);\n\n    expect(func({ a: 1 })).toEqual([true]);\n    expect(func({ a: 2 })).toEqual([false]);\n  });\n\n  it('should provide arguments to predicates', () => {\n    const func = over(function () {\n      // eslint-disable-next-line prefer-rest-params\n      return slice.call(arguments);\n    });\n\n    expect(func('a', 'b', 'c')).toEqual([['a', 'b', 'c']]);\n  });\n\n  it('should use `this` binding of function for `iteratees`', () => {\n    const func = over(\n      function (this: any) {\n        return this.b;\n      },\n      function (this: any) {\n        return this.a;\n      }\n    );\n    const object = { func, a: 1, b: 2 };\n\n    expect(object.func()).toEqual([2, 1]);\n  });\n\n  it('should return an empty array if no iteratees are provided', () => {\n    const emptyFunc = over([]);\n    expect(emptyFunc(1, 2, 3)).toEqual([]);\n  });\n\n  it('should work with nested iteratees', () => {\n    const func = (over as any)([\n      ['b', 'a'],\n      ['c', 'd'],\n    ]);\n    expect(func({ a: 1, b: 2, c: 3, d: 4 })).toEqual([false, false]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(over).toEqualTypeOf<typeof overLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/over.ts",
    "content": "import { iteratee } from '../util/iteratee.ts';\n\n/**\n * Creates a function that invokes given functions and returns their results as an array.\n *\n * @param {Array<Iteratee | Iteratee[]>} iteratees - The iteratees to invoke.\n * @returns {(...args: any[]) => unknown[]} Returns the new function.\n *\n * @example\n * const func = over([Math.max, Math.min]);\n * const func2 = over(Math.max, Math.min); // same as above\n * func(1, 2, 3, 4);\n * // => [4, 1]\n * func2(1, 2, 3, 4);\n * // => [4, 1]\n *\n * const func = over(['a', 'b']);\n * func({ a: 1, b: 2 });\n * // => [1, 2]\n *\n * const func = over([{ a: 1 }, { b: 2 }]);\n * func({ a: 1, b: 2 });\n * // => [true, false]\n *\n * const func = over([['a', 1], ['b', 2]]);\n * func({ a: 1, b: 2 });\n * // => [true, true]\n */\nexport function over<T>(\n  ...iteratees: Array<((...args: any[]) => T) | ReadonlyArray<(...args: any[]) => T>>\n): (...args: any[]) => T[] {\n  if (iteratees.length === 1 && Array.isArray(iteratees[0])) {\n    iteratees = iteratees[0];\n  }\n\n  const funcs = iteratees.map(item => iteratee(item as Iteratee));\n\n  return function (this: unknown, ...args: unknown[]) {\n    return funcs.map(func => func.apply(this, args));\n  };\n}\n\ntype Iteratee = Parameters<typeof iteratee>[0];\n"
  },
  {
    "path": "src/compat/util/overEvery.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { overEvery as overEveryLodash } from 'lodash';\nimport { overEvery } from './overEvery';\nimport { stubFalse } from './stubFalse';\nimport { stubTrue } from './stubTrue';\nimport { slice } from '../_internal/slice';\nimport { stubA } from '../_internal/stubA';\nimport { stubOne } from '../_internal/stubOne';\n\ndescribe('overEvery', () => {\n  it('should create a function that returns `true` if all predicates return truthy', () => {\n    // @ts-expect-error - invalid argument\n    const over = overEvery(stubTrue, stubOne, stubA);\n    expect(over()).toBe(true);\n  });\n\n  it('should return `false` as soon as a predicate returns falsey', () => {\n    let count = 0;\n    const countFalse = function () {\n      count++;\n      return false;\n    };\n    const countTrue = function () {\n      count++;\n      return true;\n    };\n    const over = overEvery(countTrue, countFalse, countTrue);\n\n    expect(over()).toBe(false);\n    expect(count).toBe(2);\n  });\n\n  it('should use `_.identity` when a predicate is nullish', () => {\n    // @ts-expect-error - invalid argument\n    const over = overEvery(undefined, null);\n\n    expect(over(true)).toBe(true);\n    expect(over(false)).toBe(false);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    const over = overEvery('b', 'a');\n\n    expect(over({ a: 1, b: 1 })).toBe(true);\n    expect(over({ a: 0, b: 1 })).toBe(false);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    const over = overEvery({ b: 2 }, { a: 1 });\n\n    expect(over({ a: 1, b: 2 })).toBe(true);\n    expect(over({ a: 0, b: 2 })).toBe(false);\n  });\n\n  it('should work with `_.matchesProperty` shorthands', () => {\n    const over = overEvery([\n      // @ts-expect-error - invalid argument\n      ['b', 2],\n      // @ts-expect-error - invalid argument\n      ['a', 1],\n    ]);\n\n    expect(over({ a: 1, b: 2 })).toBe(true);\n    expect(over({ a: 0, b: 2 })).toBe(false);\n  });\n\n  it('should differentiate between `_.property` and `_.matchesProperty` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    let over = overEvery(['a', 1]);\n\n    expect(over({ a: 1, 1: 1 })).toBe(true);\n    expect(over({ a: 1, 1: 0 })).toBe(false);\n    expect(over({ a: 0, 1: 1 })).toBe(false);\n\n    // @ts-expect-error - invalid argument\n    over = overEvery([['a', 1]]);\n\n    expect(over({ a: 1 })).toBe(true);\n    expect(over({ a: 2 })).toBe(false);\n  });\n\n  it('should flatten `predicates`', () => {\n    const over = overEvery(stubTrue, [stubFalse]);\n    expect(over()).toBe(false);\n  });\n\n  it('should provide arguments to predicates', () => {\n    let args;\n\n    // @ts-expect-error - invalid argument\n    const over = overEvery(function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    over('a', 'b', 'c');\n    expect(args).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should use `this` binding of function for `predicates`', () => {\n    const over = overEvery(\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      function (this: any) {\n        return this.b;\n      },\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      function (this: any) {\n        return this.a;\n      }\n    );\n    const object = { over: over, a: 1, b: 2 };\n\n    expect(object.over()).toBe(true);\n\n    object.a = 0;\n    expect(object.over()).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(overEvery).toEqualTypeOf<typeof overEveryLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/overEvery.ts",
    "content": "import { iteratee as createIteratee } from './iteratee.ts';\n\n/**\n * Creates a predicate function that checks if a value satisfies all of the given predicates.\n *\n * @template T - The type of the value to be checked.\n * @template U - The first possible type that the value could match.\n * @template V - The second possible type that the value could match.\n *\n * @param {(value: T) => value is U} predicate1 - A function that checks if the value matches type `U`.\n * @param {(value: T) => value is V} predicate2 - A function that checks if the value matches type `V`.\n *\n * @returns {(value: T) => value is U & V} A function that takes a value and returns `true` if all predicates return truthy.\n *\n * @example\n * const func = overEvery(\n *   (value) => typeof value === 'string',\n *   (value) => value === 'hello'\n * );\n *\n * func(\"hello\"); // true\n * func(\"world\"); // false\n * func(42); // false\n */\nexport function overEvery<T, U extends T, V extends T>(\n  predicate1: (value: T) => value is U,\n  predicate2: (value: T) => value is V\n): (value: T) => value is U & V;\n\n/**\n * Creates a function that checks if all of the given predicates return truthy for the provided values.\n *\n * @template T - The type of the values to be checked.\n *\n * @param {...Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>} predicates -\n *   A list of predicates or arrays of predicates. Each predicate is a function that takes one or more values of\n *   type `T` and returns a boolean indicating whether the condition is satisfied for those values.\n *\n * @returns {(...values: T[]) => boolean} A function that takes a list of values and returns `true` if all of the\n *   predicates return truthy for the provided values, and `false` otherwise.\n *\n * @example\n * const func = overEvery(\n *   (value) => typeof value === 'string',\n *   (value) => value.length > 3\n * );\n *\n * func(\"hello\"); // true\n * func(\"hi\"); // false\n * func(42); // false\n *\n * @example\n * const func = overEvery([\n *   (value) => value.a > 0,\n *   (value) => value.b > 0\n * ]);\n *\n * func({ a: 1, b: 2 }); // true\n * func({ a: 0, b: 2 }); // false\n *\n * @example\n * const func = overEvery(\n *   (a, b) => typeof a === 'string' && typeof b === 'string',\n *   (a, b) => a.length > 3 && b.length > 3\n * );\n *\n * func(\"hello\", \"world\"); // true\n * func(\"hi\", \"world\"); // false\n * func(1, 10); // false\n */\nexport function overEvery<T>(\n  ...predicates: Array<((...args: T[]) => boolean) | ReadonlyArray<(...args: T[]) => boolean>>\n): (...args: T[]) => boolean;\n\n/**\n * Creates a function that checks if all of the given predicates return truthy for the provided values.\n *\n * This function takes multiple predicates, which can either be individual predicate functions or arrays of predicates,\n * and returns a new function that checks if all of the predicates return truthy when called with the provided values.\n *\n * @template T - The type of the values to be checked.\n *\n * @param {...Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>} predicates -\n *   A list of predicates or arrays of predicates. Each predicate is a function that takes one or more values of\n *   type `T` and returns a boolean indicating whether the condition is satisfied for those values.\n *\n * @returns {(...values: T[]) => boolean} A function that takes a list of values and returns `true` if all of the\n *   predicates return truthy for the provided values, and `false` otherwise.\n *\n * @example\n * const func = overEvery(\n *   (value) => typeof value === 'string',\n *   (value) => value.length > 3\n * );\n *\n * func(\"hello\"); // true\n * func(\"hi\"); // false\n * func(42); // false\n *\n * @example\n * const func = overEvery([\n *   (value) => value.a > 0,\n *   (value) => value.b > 0\n * ]);\n *\n * func({ a: 1, b: 2 }); // true\n * func({ a: 0, b: 2 }); // false\n *\n * @example\n * const func = overEvery(\n *   (a, b) => typeof a === 'string' && typeof b === 'string',\n *   (a, b) => a.length > 3 && b.length > 3\n * );\n *\n * func(\"hello\", \"world\"); // true\n * func(\"hi\", \"world\"); // false\n * func(1, 10); // false\n */\nexport function overEvery<T>(\n  ...predicates: Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>\n): (...values: T[]) => boolean {\n  return function (this: any, ...values: T[]) {\n    for (let i = 0; i < predicates.length; ++i) {\n      const predicate = predicates[i];\n\n      if (!Array.isArray(predicate)) {\n        if (!createIteratee(predicate).apply(this, values)) {\n          return false;\n        }\n        continue;\n      }\n\n      for (let j = 0; j < predicate.length; ++j) {\n        if (!createIteratee(predicate[j]).apply(this, values)) {\n          return false;\n        }\n      }\n    }\n\n    return true;\n  };\n}\n"
  },
  {
    "path": "src/compat/util/overSome.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { overSome as overSomeLodash } from 'lodash';\nimport { overSome } from './overSome';\nimport { stubFalse } from './stubFalse';\nimport { stubString } from './stubString';\nimport { stubTrue } from './stubTrue';\nimport { slice } from '../_internal/slice';\nimport { stubA } from '../_internal/stubA';\nimport { stubNull } from '../_internal/stubNull';\nimport { stubOne } from '../_internal/stubOne';\nimport { stubZero } from '../_internal/stubZero';\n\n/**\n * @see https://github.com/lodash/lodash/blob/afcd5bc1e8801867c31a17566e0e0edebb083d0e/test/overSome.spec.js#L1\n */\ndescribe('overSome', () => {\n  it('should create a function that returns `true` if any predicates return truthy', () => {\n    // @ts-expect-error - invalid argument\n    let over = overSome(stubFalse, stubOne, stubString);\n    expect(over()).toBe(true);\n\n    // @ts-expect-error - invalid argument\n    over = overSome(stubNull, stubA, stubZero);\n    expect(over()).toBe(true);\n  });\n\n  it('should return `true` as soon as `predicate` returns truthy', () => {\n    let count = 0;\n    const countFalse = function () {\n      count++;\n      return false;\n    };\n    const countTrue = function () {\n      count++;\n      return true;\n    };\n    const over = overSome(countFalse, countTrue, countFalse);\n\n    expect(over()).toBe(true);\n    expect(count).toBe(2);\n  });\n\n  it('should return `false` if all predicates return falsey', () => {\n    let over = overSome(stubFalse, stubFalse, stubFalse);\n    expect(over()).toBe(false);\n\n    // @ts-expect-error - invalid argument\n    over = overSome(stubNull, stubZero, stubString);\n    expect(over()).toBe(false);\n  });\n\n  it('should use `_.identity` when a predicate is nullish', () => {\n    // @ts-expect-error - invalid argument\n    const over = overSome(undefined, null);\n\n    expect(over(true)).toBe(true);\n    expect(over(false)).toBe(false);\n  });\n\n  it('should work with `_.property` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    const over = overSome('b', 'a');\n\n    expect(over({ a: 1, b: 0 })).toBe(true);\n    expect(over({ a: 0, b: 0 })).toBe(false);\n  });\n\n  it('should work with `_.matches` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    const over = overSome({ b: 2 }, { a: 1 });\n\n    expect(over({ a: 0, b: 2 })).toBe(true);\n    expect(over({ a: 0, b: 0 })).toBe(false);\n  });\n\n  it('should work with `_.matchesProperty` shorthands', () => {\n    const over = overSome([\n      // @ts-expect-error - invalid argument\n      ['b', 2],\n      // @ts-expect-error - invalid argument\n      ['a', 1],\n    ]);\n\n    expect(over({ a: 0, b: 2 })).toBe(true);\n    expect(over({ a: 0, b: 0 })).toBe(false);\n  });\n\n  it('should differentiate between `_.property` and `_.matchesProperty` shorthands', () => {\n    // @ts-expect-error - invalid argument\n    let over = overSome(['a', 1]);\n\n    expect(over({ a: 0, 1: 0 })).toBe(false);\n    expect(over({ a: 1, 1: 0 })).toBe(true);\n    expect(over({ a: 0, 1: 1 })).toBe(true);\n\n    // @ts-expect-error - invalid argument\n    over = overSome([['a', 1]]);\n\n    expect(over({ a: 1 })).toBe(true);\n    expect(over({ a: 2 })).toBe(false);\n  });\n\n  it('should flatten `predicates`', () => {\n    const over = overSome(stubFalse, [stubTrue]);\n    expect(over()).toBe(true);\n  });\n\n  it('should provide arguments to predicates', () => {\n    let args;\n\n    // @ts-expect-error - invalid argument\n    const over = overSome(function () {\n      // eslint-disable-next-line prefer-rest-params\n      args = slice.call(arguments);\n    });\n\n    // @ts-expect-error - invalid argument\n    over('a', 'b', 'c');\n    expect(args).toEqual(['a', 'b', 'c']);\n  });\n\n  it('should use `this` binding of function for `predicates`', () => {\n    const over = overSome(\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      function (this: any) {\n        return this.b;\n      },\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      function (this: any) {\n        return this.a;\n      }\n    );\n    const object = { over: over, a: 1, b: 2 };\n\n    expect(object.over()).toBe(true);\n\n    object.a = object.b = 0;\n    expect(object.over()).toBe(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(overSome).toEqualTypeOf<typeof overSomeLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/overSome.ts",
    "content": "import { iteratee as createIteratee } from './iteratee.ts';\n\n/**\n * Creates a predicate function that checks if a value satisfies at least one of the given predicates.\n *\n * @template T - The type of the value to be checked.\n * @template U - The first possible type that the value could match.\n * @template V - The second possible type that the value could match.\n *\n * @param {(value: T) => value is U} predicate1 - A function that checks if the value matches type `U`.\n * @param {(value: T) => value is V} predicate2 - A function that checks if the value matches type `V`.\n *\n * @returns {(value: T) => value is U | V} A function that takes a value and returns `true` if any predicates return truthy.\n *\n * @example\n * const func = overSome(\n *   (value) => typeof value === 'string',\n *   (value) => typeof value === 'number'\n * );\n *\n * func(\"hello\"); // true\n * func(42); // true\n * func([]); // false\n */\nexport function overSome<T, U extends T, V extends T>(\n  predicate1: (value: T) => value is U,\n  predicate2: (value: T) => value is V\n): (value: T) => value is U | V;\n\n/**\n * Creates a function that checks if any of the given predicates return truthy for the provided values.\n *\n * @template T - The type of the values to be checked.\n *\n * @param {...Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>} predicates -\n *   A list of predicates or arrays of predicates. Each predicate is a function that takes one or more values of\n *   type `T` and returns a boolean indicating whether the condition is satisfied for those values.\n *\n * @returns {(...values: T[]) => boolean} A function that takes a list of values and returns `true` if any of the\n *   predicates return truthy for the provided values, and `false` otherwise.\n *\n * @example\n * const func = overSome(\n *   (value) => typeof value === 'string',\n *   (value) => typeof value === 'number',\n *   (value) => typeof value === 'symbol'\n * );\n *\n * func(\"hello\"); // true\n * func(42); // true\n * func(Symbol()); // true\n * func([]); // false\n *\n * @example\n * const func = overSome([\n *   (value) => value.a > 0,\n *   (value) => value.b > 0\n * ]);\n *\n * func({ a: 0, b: 2 }); // true\n * func({ a: 0, b: 0 }); // false\n *\n * @example\n * const func = overSome(\n *   (a, b) => typeof a === 'string' && typeof b === 'string',\n *   (a, b) => a > 0 && b > 0\n * );\n *\n * func(\"hello\", \"world\"); // true\n * func(1, 10); // true\n * func(0, 2); // false\n */\nexport function overSome<T>(\n  ...predicates: Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>\n): (...values: T[]) => boolean;\n\n/**\n * Creates a function that checks if any of the given predicates return truthy for the provided values.\n *\n * This function takes multiple predicates, which can either be individual predicate functions or arrays of predicates,\n * and returns a new function that checks if any of the predicates return truthy when called with the provided values.\n *\n * @template T - The type of the values to be checked.\n *\n * @param {...Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>} predicates -\n *   A list of predicates or arrays of predicates. Each predicate is a function that takes one or more values of\n *   type `T` and returns a boolean indicating whether the condition is satisfied for those values.\n *\n * @returns {(...values: T[]) => boolean} A function that takes a list of values and returns `true` if any of the\n *   predicates return truthy for the provided values, and `false` otherwise.\n *\n * @example\n * const func = overSome(\n *   (value) => typeof value === 'string',\n *   (value) => typeof value === 'number',\n *   (value) => typeof value === 'symbol'\n * );\n *\n * func(\"hello\"); // true\n * func(42); // true\n * func(Symbol()); // true\n * func([]); // false\n *\n * @example\n * const func = overSome([\n *   (value) => value.a > 0,\n *   (value) => value.b > 0\n * ]);\n *\n * func({ a: 0, b: 2 }); // true\n * func({ a: 0, b: 0 }); // false\n *\n * @example\n * const func = overSome(\n *   (a, b) => typeof a === 'string' && typeof b === 'string',\n *   (a, b) => a > 0 && b > 0\n * );\n *\n * func(\"hello\", \"world\"); // true\n * func(1, 10); // true\n * func(0, 2); // false\n */\nexport function overSome<T>(\n  ...predicates: Array<((...values: T[]) => boolean) | ReadonlyArray<(...values: T[]) => boolean>>\n): (...values: T[]) => boolean {\n  return function (this: any, ...values: T[]) {\n    for (let i = 0; i < predicates.length; ++i) {\n      const predicate = predicates[i];\n\n      if (!Array.isArray(predicate)) {\n        if (createIteratee(predicate).apply(this, values)) {\n          return true;\n        }\n        continue;\n      }\n\n      for (let j = 0; j < predicate.length; ++j) {\n        if (createIteratee(predicate[j]).apply(this, values)) {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  };\n}\n"
  },
  {
    "path": "src/compat/util/stubArray.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { stubArray as stubArrayLodash } from 'lodash';\nimport { stubArray } from './stubArray';\n\ndescribe('stubArray', () => {\n  it('should return an empty array', () => {\n    expect(stubArray()).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(stubArray).toEqualTypeOf<typeof stubArrayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/stubArray.ts",
    "content": "/**\n * Returns a new empty array.\n *\n * @returns {Array} A new empty array.\n * @example\n * stubArray() // Returns []\n */\nexport function stubArray(): any[];\n\nexport function stubArray(): any[] {\n  return [];\n}\n"
  },
  {
    "path": "src/compat/util/stubFalse.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { stubFalse as stubFalseLodash } from 'lodash';\nimport { stubFalse } from './stubFalse';\n\ndescribe('stubFalse', () => {\n  it('should return `false`', () => {\n    expect(stubFalse()).toEqual(false);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(stubFalse).toEqualTypeOf<typeof stubFalseLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/stubFalse.ts",
    "content": "/**\n * Returns false.\n *\n * @returns {boolean} false.\n * @example\n * stubFalse() // Returns false\n */\nexport function stubFalse(): false;\n\n/**\n * Returns false.\n *\n * @returns {boolean} false.\n * @example\n * stubFalse() // Returns false\n */\nexport function stubFalse(): false;\n\nexport function stubFalse(): false {\n  return false;\n}\n"
  },
  {
    "path": "src/compat/util/stubObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { stubObject as stubObjectLodash } from 'lodash';\nimport { stubObject } from './stubObject';\n\ndescribe('stubObject', () => {\n  it('should return an empty object', () => {\n    expect(stubObject()).toEqual({});\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(stubObject).toEqualTypeOf<typeof stubObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/stubObject.ts",
    "content": "/**\n * Returns an empty object.\n *\n * @returns {Object} An empty object.\n * @example\n * stubObject() // Returns {}\n */\nexport function stubObject(): any {\n  return {};\n}\n"
  },
  {
    "path": "src/compat/util/stubString.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { stubString as stubStringLodash } from 'lodash';\nimport { stubString } from './stubString';\n\ndescribe('stubString', () => {\n  it('should return an empty string', () => {\n    expect(stubString()).toEqual('');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(stubString).toEqualTypeOf<typeof stubStringLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/stubString.ts",
    "content": "/**\n * Returns an empty string.\n *\n * @returns {string} An empty string.\n * @example\n * stubString() // Returns ''\n */\nexport function stubString(): string;\n\nexport function stubString(): string {\n  return '';\n}\n"
  },
  {
    "path": "src/compat/util/stubTrue.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { stubTrue as stubTrueLodash } from 'lodash';\nimport { stubTrue } from './stubTrue';\n\ndescribe('stubTrue', () => {\n  it('should return `true`', () => {\n    expect(stubTrue()).toEqual(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(stubTrue).toEqualTypeOf<typeof stubTrueLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/stubTrue.ts",
    "content": "/**\n * Returns true.\n *\n * @returns {boolean} true.\n * @example\n * stubTrue() // Returns true\n */\nexport function stubTrue(): true;\n\n/**\n * Returns true.\n *\n * @returns {boolean} true.\n * @example\n * stubTrue() // Returns true\n */\nexport function stubTrue(): true;\n\nexport function stubTrue(): true {\n  return true;\n}\n"
  },
  {
    "path": "src/compat/util/times.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { times as timesLodash } from 'lodash';\nimport { stubArray } from './stubArray';\nimport { times } from './times';\nimport { doubled } from '../_internal/doubled';\nimport { falsey } from '../_internal/falsey';\nimport { slice } from '../_internal/slice';\n\ndescribe('times', () => {\n  it('should coerce non-finite `n` values to `0`', () => {\n    [-Infinity, NaN, Infinity].forEach(n => {\n      expect(times(n)).toEqual([]);\n    });\n  });\n\n  it('should coerce `n` to an integer', () => {\n    const actual = times(2.6, n => n);\n    expect(actual).toEqual([0, 1]);\n  });\n\n  it('should provide correct `iteratee` arguments', () => {\n    let args: any;\n\n    times(1, function () {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions, prefer-rest-params\n      args || (args = slice.call(arguments));\n    });\n\n    expect(args).toEqual([0]);\n  });\n\n  it('should use `_.identity` when `iteratee` is nullish', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(() => [0, 1, 2]);\n\n    const actual = values.map((value, index) => (index ? times(3, value as any) : times(3)));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an array of the results of each `iteratee` execution', () => {\n    expect(times(3, doubled)).toEqual([0, 2, 4]);\n  });\n\n  it('should return an empty array for falsey and negative `n` values', () => {\n    const values = falsey.concat(-1, -Infinity);\n    const expected = values.map(stubArray);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? times(value as any) : times()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return an empty array when `n > Number.MAX_SAFE_INTEGER`', () => {\n    expect(times(Number.MAX_SAFE_INTEGER + 1)).toEqual([]);\n    expect(times(Number.MAX_VALUE, doubled)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(times).toEqualTypeOf<typeof timesLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/times.ts",
    "content": "import { toInteger } from './toInteger.ts';\n\n/**\n * Invokes the iteratee function n times, returning an array of the results.\n *\n * @template T The return type of the iteratee function.\n * @param {number} n - The number of times to invoke iteratee.\n * @param {(num: number) => T} iteratee - The function to invoke for each index.\n * @returns {T[]} An array containing the results of invoking iteratee n times.\n * @example\n * times(3, (i) => i * 2); // => [0, 2, 4]\n * times(2, () => 'es-toolkit'); // => ['es-toolkit', 'es-toolkit']\n */\nexport function times<T>(n: number, iteratee: (num: number) => T): T[];\n\n/**\n * Invokes the default iteratee function n times, returning an array of indices.\n *\n * @param {number} n - The number of times to invoke the default iteratee.\n * @returns {number[]} An array containing indices from 0 to n-1.\n * @example\n * times(3); // => [0, 1, 2]\n */\nexport function times(n: number): number[];\n\n/**\n * Invokes the getValue function n times, returning an array of the results.\n *\n * @template R The return type of the getValue function.\n * @param {number} n - The number of times to invoke getValue.\n * @param {(index: number) => R} getValue - The function to invoke for each index.\n * @returns {R[]} An array containing the results of invoking getValue n times.\n * @example\n * times(3, (i) => i * 2); // => [0, 2, 4]\n * times(2, () => 'es-toolkit'); // => ['es-toolkit', 'es-toolkit']\n */\nexport function times<R = number>(n?: number, getValue?: (index: number) => R): R[] {\n  n = toInteger(n);\n\n  if (n < 1 || !Number.isSafeInteger(n)) {\n    return [];\n  }\n\n  const result = new Array(n);\n\n  for (let i = 0; i < n; i++) {\n    result[i] = typeof getValue === 'function' ? getValue(i) : i;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/util/toArray.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toArray as toArrayLodash } from 'lodash';\nimport { toArray } from './toArray';\n\ndescribe('toArray', () => {\n  it('should convert objects to arrays', () => {\n    expect(toArray({ a: 1, b: 2 })).toEqual([1, 2]);\n  });\n\n  it('should convert iterables to arrays', () => {\n    if (Symbol && Symbol.iterator) {\n      const object = { 0: 'a', length: 1 };\n      expect(toArray(object)).toEqual(['a']);\n    }\n  });\n\n  it('should convert maps to arrays', () => {\n    if (Map) {\n      const map = new Map();\n      map.set('a', 1);\n      map.set('b', 2);\n      expect(toArray(map)).toEqual([\n        ['a', 1],\n        ['b', 2],\n      ]);\n    }\n  });\n\n  it('should convert strings to arrays', () => {\n    expect(toArray('')).toEqual([]);\n    expect(toArray('ab')).toEqual(['a', 'b']);\n    expect(toArray(Object('ab'))).toEqual(['a', 'b']);\n  });\n\n  it('should convert nullish values to empty arrays', () => {\n    expect(toArray(null)).toEqual([]);\n    expect(toArray(undefined)).toEqual([]);\n  });\n\n  it('should convert non-iterable values to empty arrays', () => {\n    expect(toArray(1)).toEqual([]);\n    expect(toArray(true)).toEqual([]);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toArray).toEqualTypeOf<typeof toArrayLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toArray.ts",
    "content": "import { isArrayLike } from '../predicate/isArrayLike.ts';\nimport { isMap } from '../predicate/isMap.ts';\n\n/**\n * Converts a record or null/undefined to an array of its values.\n *\n * @template T\n * @param {Record<string, T> | Record<number, T> | null | undefined} value - The record or null/undefined to convert.\n * @returns {T[]} Returns an array of the record's values or an empty array if null/undefined.\n *\n * @example\n * toArray({ 'a': 1, 'b': 2 }) // => returns [1, 2]\n * toArray(null) // => returns []\n */\nexport function toArray<T>(value: Record<string, T> | Record<number, T> | null | undefined): T[];\n\n/**\n * Converts a value to an array of its values.\n *\n * @template T\n * @param {T} value - The value to convert.\n * @returns {Array<T[keyof T]>} Returns an array of the value's values.\n *\n * @example\n * toArray({ x: 10, y: 20 }) // => returns [10, 20]\n * toArray('abc') // => returns ['a', 'b', 'c']\n */\nexport function toArray<T>(value: T): Array<T[keyof T]>;\n\n/**\n * Converts an undefined value to an empty array.\n *\n * @returns {any[]} Returns an empty array.\n *\n * @example\n * toArray() // => returns []\n */\nexport function toArray(): any[];\n\n/**\n * Converts a value to an array.\n *\n * @param {unknown} value - The value to convert.\n * @returns {any[]} Returns the converted array.\n *\n * @example\n * toArray({ 'a': 1, 'b': 2 }) // => returns [1,2]\n * toArray('abc') // => returns ['a', 'b', 'c']\n * toArray(1) // => returns []\n * toArray(null) // => returns []\n */\nexport function toArray(value?: unknown): any[] {\n  if (value == null) {\n    return [];\n  }\n\n  if (isArrayLike(value) || isMap(value)) {\n    return Array.from(value);\n  }\n\n  if (typeof value === 'object') {\n    return Object.values(value);\n  }\n\n  return [];\n}\n"
  },
  {
    "path": "src/compat/util/toFinite.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toFinite as toFiniteLodash } from 'lodash';\nimport { toFinite } from './toFinite';\nimport { flatMap } from '../../array/flatMap';\nimport { identity } from '../../function/identity';\nimport { falsey } from '../_internal/falsey';\nimport { MAX_INTEGER } from '../_internal/MAX_INTEGER';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { symbol } from '../_internal/symbol';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('toFinite', () => {\n  it(`should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      [0, Infinity],\n      [-0, -Infinity],\n      [-0, -Infinity],\n    ];\n\n    [0, 1].forEach(index => {\n      const others = values.map(index ? Object : identity);\n\n      const actual = others.map(value => {\n        const result = toFinite(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  function negative(string: string) {\n    return `-${string}`;\n  }\n\n  function pad(string: string) {\n    return whitespace + string + whitespace;\n  }\n\n  function positive(string: string) {\n    return `+${string}`;\n  }\n\n  it(`should pass thru primitive number values`, () => {\n    const values = [0, 1, NaN];\n    const expected = [0, 1, 0];\n    const actual = values.map(toFinite);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert number primitives and objects to numbers`, () => {\n    const values = [2, 1.2, MAX_SAFE_INTEGER, MAX_INTEGER, Infinity, NaN];\n\n    const expected = values.map(value => {\n      if (value === Infinity) {\n        value = MAX_INTEGER;\n      } else if (value !== value) {\n        value = 0;\n      }\n\n      const neg = value === 0 ? 0 : -value;\n      return [value, value, neg, neg];\n    });\n\n    const actual = values.map(value => [\n      toFinite(value),\n      toFinite(Object(value)),\n      toFinite(-value),\n      toFinite(Object(-value)),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert string primitives and objects to numbers`, () => {\n    const transforms = [identity, pad, positive, negative];\n\n    const values = [\n      '10',\n      '1.234567890',\n      `${MAX_SAFE_INTEGER}`,\n      '1e+308',\n      '1e308',\n      '1E+308',\n      '1E308',\n      '5e-324',\n      '5E-324',\n      'Infinity',\n      'NaN',\n    ];\n\n    const expected = values.map(value => {\n      let n = Number(value);\n      if (n === Infinity) {\n        n = MAX_INTEGER;\n      } else if (n !== n) {\n        n = 0;\n      }\n      const neg = n === 0 ? 0 : -n;\n      return [n, n, n, n, n, n, neg, neg];\n    });\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toFinite(mod(value)), toFinite(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert binary/octal strings to numbers`, () => {\n    const numbers = [42, 5349, 1715004];\n    const transforms = [identity, pad];\n    const values = ['0b101010', '0o12345', '0x1a2b3c'];\n\n    const expected = numbers.map(n => [n, n, n, n, n, n, n, n]);\n\n    const actual = values.map(value => {\n      const upper = value.toUpperCase();\n      return flatMap(transforms, mod => [\n        toFinite(mod(value)),\n        toFinite(Object(mod(value))),\n        toFinite(mod(upper)),\n        toFinite(Object(mod(upper))),\n      ]);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert invalid binary/octal strings to '0'`, () => {\n    const transforms = [identity, pad, positive, negative];\n    const values = ['0b', '0o', '0x', '0b1010102', '0o123458', '0x1a2b3x'];\n\n    const expected = values.map(() => [0, 0, 0, 0, 0, 0, 0, 0]);\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toFinite(mod(value)), toFinite(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert symbols to  '0'`, () => {\n    const object1 = Object(symbol);\n    const object2 = Object(symbol);\n    const values = [symbol, object1, object2];\n    const expected = values.map(() => 0);\n\n    object2.valueOf = undefined;\n    const actual = values.map(toFinite);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert empty values to \\`0\\` or \\`NaN\\``, () => {\n    const values = falsey.concat(whitespace);\n\n    const expected = values.map(() => 0);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? toFinite(value) : toFinite()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should coerce objects to numbers`, () => {\n    const values: any = [\n      {},\n      [],\n      [1],\n      [1, 2],\n      { valueOf: '1.1' },\n      { valueOf: '1.1', toString: () => '2.2' },\n      { valueOf: () => '1.1', toString: '2.2' },\n      {\n        valueOf: () => '1.1',\n        toString: () => '2.2',\n      },\n      { valueOf: () => '-0x1a2b3c' },\n      { toString: () => '-0x1a2b3c' },\n      { valueOf: () => '0o12345' },\n      { toString: () => '0o12345' },\n      { valueOf: () => '0b101010' },\n      { toString: () => '0b101010' },\n    ];\n\n    const expected = [0, 0, 1, 0, 0, 2.2, 1.1, 1.1, 0, 0, 5349, 5349, 42, 42];\n\n    const actual = values.map(toFinite);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toFinite).toEqualTypeOf<typeof toFiniteLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toFinite.ts",
    "content": "import { toNumber } from './toNumber.ts';\n\n/**\n * Converts `value` to a finite number.\n *\n * @param {unknown} value - The value to convert.\n * @returns {number} Returns the number.\n *\n * @example\n * toFinite(3.2); // => 3.2\n * toFinite(Number.MIN_VALUE); // => 5e-324\n * toFinite(Infinity); // => 1.7976931348623157e+308\n * toFinite('3.2'); // => 3.2\n * toFinite(Symbol.iterator); // => 0\n * toFinite(NaN); // => 0\n */\nexport function toFinite(value: any): number {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n\n  value = toNumber(value);\n\n  if (value === Infinity || value === -Infinity) {\n    const sign = value < 0 ? -1 : 1;\n    return sign * Number.MAX_VALUE;\n  }\n\n  return value === value ? (value as number) : 0;\n}\n"
  },
  {
    "path": "src/compat/util/toInteger.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toInteger as toIntegerLodash } from 'lodash';\nimport { toInteger } from './toInteger';\nimport { flatMap } from '../../array/flatMap';\nimport { identity } from '../../function/identity';\nimport { falsey } from '../_internal/falsey';\nimport { MAX_INTEGER } from '../_internal/MAX_INTEGER';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { symbol } from '../_internal/symbol';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('toInteger', () => {\n  it(`should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      [0, Infinity],\n      [-0, -Infinity],\n      [-0, -Infinity],\n    ];\n\n    [0, 1].forEach(index => {\n      const others = values.map(index ? Object : identity);\n\n      const actual = others.map(value => {\n        const result = toInteger(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  function negative(string: string) {\n    return `-${string}`;\n  }\n\n  function pad(string: string) {\n    return whitespace + string + whitespace;\n  }\n\n  function positive(string: string) {\n    return `+${string}`;\n  }\n\n  it(`should pass thru primitive number values`, () => {\n    const values = [0, 1, NaN];\n    const expected = [0, 1, 0];\n    const actual = values.map(toInteger);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert number primitives and objects to numbers`, () => {\n    const values = [2, 1.2, MAX_SAFE_INTEGER, MAX_INTEGER, Infinity, NaN];\n\n    const expected = values.map(value => {\n      if (value === 1.2) {\n        value = 1;\n      } else if (value === Infinity) {\n        value = MAX_INTEGER;\n      } else if (value !== value) {\n        value = 0;\n      }\n\n      const neg = value === 0 ? 0 : -value;\n      return [value, value, neg, neg];\n    });\n\n    const actual = values.map(value => [\n      toInteger(value),\n      toInteger(Object(value)),\n      toInteger(-value),\n      toInteger(Object(-value)),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert string primitives and objects to numbers`, () => {\n    const transforms = [identity, pad, positive, negative];\n\n    const values = [\n      '10',\n      '1.234567890',\n      `${MAX_SAFE_INTEGER}`,\n      '1e+308',\n      '1e308',\n      '1E+308',\n      '1E308',\n      '5e-324',\n      '5E-324',\n      'Infinity',\n      'NaN',\n    ];\n\n    const expected = values.map(value => {\n      let n = Number(value);\n      if (n === 1.23456789) {\n        n = 1;\n      } else if (n === Infinity) {\n        n = MAX_INTEGER;\n      } else if (n === Number.MIN_VALUE || n !== n) {\n        n = 0;\n      }\n      const neg = n === 0 ? 0 : -n;\n      return [n, n, n, n, n, n, neg, neg];\n    });\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toInteger(mod(value)), toInteger(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert binary/octal strings to numbers`, () => {\n    const numbers = [42, 5349, 1715004];\n    const transforms = [identity, pad];\n    const values = ['0b101010', '0o12345', '0x1a2b3c'];\n\n    const expected = numbers.map(n => [n, n, n, n, n, n, n, n]);\n\n    const actual = values.map(value => {\n      const upper = value.toUpperCase();\n      return flatMap(transforms, mod => [\n        toInteger(mod(value)),\n        toInteger(Object(mod(value))),\n        toInteger(mod(upper)),\n        toInteger(Object(mod(upper))),\n      ]);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert invalid binary/octal strings to '0'`, () => {\n    const transforms = [identity, pad, positive, negative];\n    const values = ['0b', '0o', '0x', '0b1010102', '0o123458', '0x1a2b3x'];\n\n    const expected = values.map(() => [0, 0, 0, 0, 0, 0, 0, 0]);\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toInteger(mod(value)), toInteger(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert symbols to  '0'`, () => {\n    const object1 = Object(symbol);\n    const object2 = Object(symbol);\n    const values = [symbol, object1, object2];\n    const expected = values.map(() => 0);\n\n    object2.valueOf = undefined;\n    const actual = values.map(toInteger);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert empty values to \\`0\\` or \\`NaN\\``, () => {\n    const values = falsey.concat(whitespace);\n\n    const expected = values.map(() => 0);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? toInteger(value) : toInteger()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should coerce objects to numbers`, () => {\n    const values: any = [\n      {},\n      [],\n      [1],\n      [1, 2],\n      { valueOf: '1.1' },\n      { valueOf: '1.1', toString: () => '2.2' },\n      { valueOf: () => '1.1', toString: '2.2' },\n      {\n        valueOf: () => '1.1',\n        toString: () => '2.2',\n      },\n      { valueOf: () => '-0x1a2b3c' },\n      { toString: () => '-0x1a2b3c' },\n      { valueOf: () => '0o12345' },\n      { toString: () => '0o12345' },\n      { valueOf: () => '0b101010' },\n      { toString: () => '0b101010' },\n    ];\n\n    const expected = [0, 0, 1, 0, 0, 2, 1, 1, 0, 0, 5349, 5349, 42, 42];\n\n    const actual = values.map(toInteger);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert values to integers`, () => {\n    expect(toInteger(-5.6)).toBe(-5);\n    expect(toInteger('5.6')).toBe(5);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(toInteger()).toBe(0);\n    expect(toInteger(NaN)).toBe(0);\n\n    const expected = MAX_INTEGER;\n    expect(toInteger(Infinity)).toBe(expected);\n    expect(toInteger(-Infinity)).toBe(-expected);\n  });\n\n  it(`should support \\`value\\` of \\`-0\\``, () => {\n    expect(1 / toInteger(-0)).toBe(-Infinity);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toInteger).toEqualTypeOf<typeof toIntegerLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toInteger.ts",
    "content": "import { toFinite } from './toFinite.ts';\n\n/**\n * Converts `value` to an integer.\n *\n * This function first converts `value` to a finite number. If the result has any decimal places,\n * they are removed by rounding down to the nearest whole number.\n *\n * @param {unknown} value - The value to convert.\n * @returns {number} Returns the number.\n *\n * @example\n * toInteger(3.2); // => 3\n * toInteger(Number.MIN_VALUE); // => 0\n * toInteger(Infinity); // => 1.7976931348623157e+308\n * toInteger('3.2'); // => 3\n * toInteger(Symbol.iterator); // => 0\n * toInteger(NaN); // => 0\n */\nexport function toInteger(value: any): number {\n  const finite = toFinite(value);\n  const remainder = finite % 1;\n\n  return remainder ? finite - remainder : finite;\n}\n"
  },
  {
    "path": "src/compat/util/toLength.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toLength as toLengthLodash } from 'lodash';\nimport { toLength } from './toLength';\nimport { MAX_ARRAY_LENGTH } from '../_internal/MAX_ARRAY_LENGTH';\nimport { MAX_INTEGER } from '../_internal/MAX_INTEGER';\n\ndescribe('toLength', () => {\n  it('should return a valid length', () => {\n    expect(toLength(null)).toBe(0);\n    expect(toLength(-1)).toBe(0);\n    expect(toLength('1')).toBe(1);\n    expect(toLength(1.1)).toBe(1);\n    expect(toLength(MAX_INTEGER)).toBe(MAX_ARRAY_LENGTH);\n  });\n\n  it('should return `value` if a valid length', () => {\n    expect(toLength(0)).toBe(0);\n    expect(toLength(3)).toBe(3);\n    expect(toLength(MAX_ARRAY_LENGTH)).toBe(MAX_ARRAY_LENGTH);\n  });\n\n  it('should convert `-0` to `0`', () => {\n    expect(1 / toLength(-0)).toBe(Infinity);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toLength).toEqualTypeOf<typeof toLengthLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toLength.ts",
    "content": "import { MAX_ARRAY_LENGTH } from '../_internal/MAX_ARRAY_LENGTH.ts';\nimport { clamp } from '../math/clamp.ts';\n\n/**\n * Converts the value to a valid index. A valid index is an integer that is greater than or equal to `0` and less than or equal to `2^32 - 1`.\n *\n * It converts the given value to a number and floors it to an integer. If the value is less than `0`, it returns `0`. If the value exceeds `2^32 - 1`, it returns `2^32 - 1`.\n *\n * @param {unknown} value - The value to convert to a valid index.\n * @returns {number} The converted value.\n *\n * @example\n * toLength(3.2)  // => 3\n * toLength(-1)   // => 0\n * toLength(1.9)  // => 1\n * toLength('42') // => 42\n * toLength(null) // => 0\n */\nexport function toLength(value: any): number {\n  if (value == null) {\n    return 0;\n  }\n\n  const length = Math.floor(Number(value));\n\n  return clamp(length, 0, MAX_ARRAY_LENGTH);\n}\n"
  },
  {
    "path": "src/compat/util/toNumber.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toNumber as toNumberLodash } from 'lodash';\nimport { toNumber } from './toNumber';\nimport { flatMap } from '../../array/flatMap';\nimport { identity } from '../../function/identity';\nimport { falsey } from '../_internal/falsey';\nimport { MAX_INTEGER } from '../_internal/MAX_INTEGER';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\nimport { symbol } from '../_internal/symbol';\nimport { whitespace } from '../_internal/whitespace';\n\ndescribe('toNumber', () => {\n  it(`should preserve the sign of \\`0\\``, () => {\n    const values = [0, '0', -0, '-0'];\n    const expected = [\n      [0, Infinity],\n      [0, Infinity],\n      [-0, -Infinity],\n      [-0, -Infinity],\n    ];\n\n    [0, 1].forEach(index => {\n      const others = values.map(index ? Object : identity);\n\n      const actual = others.map(value => {\n        const result = toNumber(value);\n        return [result, 1 / result];\n      });\n\n      expect(actual).toEqual(expected);\n    });\n  });\n\n  function negative(string: string) {\n    return `-${string}`;\n  }\n\n  function pad(string: string) {\n    return whitespace + string + whitespace;\n  }\n\n  function positive(string: string) {\n    return `+${string}`;\n  }\n\n  it(`should pass thru primitive number values`, () => {\n    const values = [0, 1, NaN];\n\n    const actual = values.map(toNumber);\n\n    expect(actual).toEqual(values);\n  });\n\n  it(`should convert number primitives and objects to numbers`, () => {\n    const values = [2, 1.2, MAX_SAFE_INTEGER, MAX_INTEGER, Infinity, NaN];\n\n    const expected = values.map(value => {\n      const neg = -value;\n      return [value, value, neg, neg];\n    });\n\n    const actual = values.map(value => [\n      toNumber(value),\n      toNumber(Object(value)),\n      toNumber(-value),\n      toNumber(Object(-value)),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert string primitives and objects to numbers`, () => {\n    const transforms = [identity, pad, positive, negative];\n\n    const values = [\n      '10',\n      '1.234567890',\n      `${MAX_SAFE_INTEGER}`,\n      '1e+308',\n      '1e308',\n      '1E+308',\n      '1E308',\n      '5e-324',\n      '5E-324',\n      'Infinity',\n      'NaN',\n    ];\n\n    const expected = values.map(value => {\n      const n = Number(value);\n      const neg = -n;\n      return [n, n, n, n, n, n, neg, neg];\n    });\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toNumber(mod(value)), toNumber(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert binary/octal strings to numbers`, () => {\n    const numbers = [42, 5349, 1715004];\n    const transforms = [identity, pad];\n    const values = ['0b101010', '0o12345', '0x1a2b3c'];\n\n    const expected = numbers.map(n => [n, n, n, n, n, n, n, n]);\n\n    const actual = values.map(value => {\n      const upper = value.toUpperCase();\n      return flatMap(transforms, mod => [\n        toNumber(mod(value)),\n        toNumber(Object(mod(value))),\n        toNumber(mod(upper)),\n        toNumber(Object(mod(upper))),\n      ]);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert invalid binary/octal strings to 'NaN'`, () => {\n    const transforms = [identity, pad, positive, negative];\n    const values = ['0b', '0o', '0x', '0b1010102', '0o123458', '0x1a2b3x'];\n\n    const expected = values.map(() => [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]);\n\n    const actual = values.map(value =>\n      flatMap(transforms, mod => [toNumber(mod(value)), toNumber(Object(mod(value)))])\n    );\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert symbols to  'NaN'`, () => {\n    const object1 = Object(symbol);\n    const object2 = Object(symbol);\n    const values = [symbol, object1, object2];\n    const expected = values.map(() => NaN);\n\n    object2.valueOf = undefined;\n    const actual = values.map(toNumber);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should convert empty values to \\`0\\` or \\`NaN\\``, () => {\n    const values = falsey.concat(whitespace);\n\n    const expected = values.map(value => (value !== whitespace ? Number(value) : 0));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? toNumber(value) : toNumber()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it(`should coerce objects to numbers`, () => {\n    const values: any = [\n      {},\n      [],\n      [1],\n      [1, 2],\n      { valueOf: '1.1' },\n      { valueOf: '1.1', toString: () => '2.2' },\n      { valueOf: () => '1.1', toString: '2.2' },\n      {\n        valueOf: () => '1.1',\n        toString: () => '2.2',\n      },\n      { valueOf: () => '-0x1a2b3c' },\n      { toString: () => '-0x1a2b3c' },\n      { valueOf: () => '0o12345' },\n      { toString: () => '0o12345' },\n      { valueOf: () => '0b101010' },\n      { toString: () => '0b101010' },\n    ];\n\n    const expected = [NaN, 0, 1, NaN, NaN, 2.2, 1.1, 1.1, NaN, NaN, 5349, 5349, 42, 42];\n\n    const actual = values.map(toNumber);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toNumber).toEqualTypeOf<typeof toNumberLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toNumber.ts",
    "content": "import { isSymbol } from '../predicate/isSymbol.ts';\n\n/**\n * Converts `value` to a number.\n *\n * Unlike `Number()`, this function returns `NaN` for symbols.\n *\n * @param {unknown} value - The value to convert.\n * @returns {number} Returns the number.\n *\n * @example\n * toNumber(3.2); // => 3.2\n * toNumber(Number.MIN_VALUE); // => 5e-324\n * toNumber(Infinity); // => Infinity\n * toNumber('3.2'); // => 3.2\n * toNumber(Symbol.iterator); // => NaN\n * toNumber(NaN); // => NaN\n */\nexport function toNumber(value: any): number {\n  if (isSymbol(value)) {\n    return NaN;\n  }\n\n  return Number(value);\n}\n"
  },
  {
    "path": "src/compat/util/toPath.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toPath as toPathLodash } from 'lodash';\nimport { toPath } from './toPath';\n\ndescribe('toPath function', () => {\n  it('converts dot-separated keys correctly', () => {\n    const result = toPath('a.b.c');\n    expect(result).toEqual(['a', 'b', 'c']);\n  });\n\n  it('converts bracket notation keys correctly', () => {\n    const result = toPath('a[b][c]');\n    expect(result).toEqual(['a', 'b', 'c']);\n  });\n\n  it('handles mixed notation correctly', () => {\n    const result = toPath('a[b].c');\n    expect(result).toEqual(['a', 'b', 'c']);\n  });\n\n  it('handles leading dots correctly', () => {\n    const result = toPath('.a.b.c');\n    expect(result).toEqual(['', 'a', 'b', 'c']);\n  });\n\n  it('handles quoted keys correctly', () => {\n    const result = toPath('a[\"b.c\"].d');\n    expect(result).toEqual(['a', 'b.c', 'd']);\n  });\n\n  it('handles empty input correctly', () => {\n    const result = toPath('');\n    expect(result).toEqual([]);\n  });\n\n  it('handles complex paths correctly', () => {\n    const result = toPath('a[-1.23][\"[\\\\\"b\\\\\"]\"].c[\\'[\\\\\\'d\\\\\\']\\'][\\ne\\n][f].g');\n    expect(result).toEqual(['a', '-1.23', '[\"b\"]', 'c', \"['d']\", '\\ne\\n', 'f', 'g']);\n  });\n\n  it('handles complex input with leading dot correctly', () => {\n    const result = toPath('.a[b].c.d[e][\"f.g\"].h');\n    expect(result).toEqual(['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']);\n  });\n\n  it('handles empty brackets correctly', () => {\n    const result = toPath('a[].b');\n    expect(result).toEqual(['a', '', 'b']);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toPath).toEqualTypeOf<typeof toPathLodash>();\n  });\n\n  it('handles array input correctly', () => {\n    const sym = Symbol('sym');\n    const result = toPath(['a', 'b', 'c', -0, sym]);\n    expect(result).toEqual(['a', 'b', 'c', '-0', sym]);\n  });\n\n  it('handles symbol input correctly', () => {\n    const sym = Symbol('mySymbol');\n    const result = toPath(sym);\n    expect(result).toEqual([sym]);\n  });\n\n  it('handles non-string/non-array input by converting to string', () => {\n    expect(toPath(123)).toEqual(['123']);\n    expect(toPath(true)).toEqual(['true']);\n    expect(toPath(-0)).toEqual(['-0']);\n    expect(toPath(new Set())).toEqual(['object Set']);\n    expect(toPath(null)).toEqual([]);\n    expect(toPath(undefined)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toPath.ts",
    "content": "import { toString } from './toString.ts';\nimport { toKey } from '../_internal/toKey.ts';\n\n/**\n * Converts a deep key string into an array of path segments.\n *\n * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.\n *\n * @param {any} deepKey - The deep key string to convert.\n * @returns {string[]} An array of strings, each representing a segment of the path.\n *\n * Examples:\n *\n * toPath('a.b.c') // Returns ['a', 'b', 'c']\n * toPath('a[b][c]') // Returns ['a', 'b', 'c']\n * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']\n * toPath('a[\"b.c\"].d') // Returns ['a', 'b.c', 'd']\n * toPath('') // Returns []\n * toPath('.a[b].c.d[e][\"f.g\"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n */\nexport function toPath(deepKey: any): string[] {\n  if (Array.isArray(deepKey)) {\n    // @types/lodash defines this as string[], but lodash itself returns (string | symbol)[]\n    return deepKey.map(toKey) as string[];\n  }\n  if (typeof deepKey === 'symbol') {\n    // @types/lodash defines this as string[], but lodash itself returns [symbol]\n    return [deepKey as unknown as string];\n  }\n  deepKey = toString(deepKey);\n  const result: string[] = [];\n  const length = deepKey.length;\n\n  if (length === 0) {\n    return result;\n  }\n\n  let index = 0;\n  let key = '';\n  let quoteChar = '';\n  let bracket = false;\n\n  // Leading dot\n  if (deepKey.charCodeAt(0) === 46) {\n    result.push('');\n    index++;\n  }\n\n  while (index < length) {\n    const char = deepKey[index];\n\n    if (quoteChar) {\n      if (char === '\\\\' && index + 1 < length) {\n        // Escape character\n        index++;\n        key += deepKey[index];\n      } else if (char === quoteChar) {\n        // End of quote\n        quoteChar = '';\n      } else {\n        key += char;\n      }\n    } else if (bracket) {\n      if (char === '\"' || char === \"'\") {\n        // Start of quoted string inside brackets\n        quoteChar = char;\n      } else if (char === ']') {\n        // End of bracketed segment\n        bracket = false;\n        result.push(key);\n        key = '';\n      } else {\n        key += char;\n      }\n    } else {\n      if (char === '[') {\n        // Start of bracketed segment\n        bracket = true;\n        if (key) {\n          result.push(key);\n          key = '';\n        }\n      } else if (char === '.') {\n        if (key) {\n          result.push(key);\n          key = '';\n        }\n      } else {\n        key += char;\n      }\n    }\n\n    index++;\n  }\n\n  if (key) {\n    result.push(key);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/util/toPlainObject.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toPlainObject as toPlainObjectLodash } from 'lodash';\nimport { toPlainObject } from './toPlainObject';\nimport { args } from '../_internal/args';\n\ndescribe('toPlainObject', () => {\n  it('should flatten inherited string keyed properties', () => {\n    function Foo(this: any) {\n      this.b = 2;\n    }\n    Foo.prototype.c = 3;\n\n    // @ts-expect-error - Foo is a constructor\n    const actual = Object.assign({ a: 1 }, toPlainObject(new Foo()));\n    expect(actual).toEqual({ a: 1, b: 2, c: 3 });\n  });\n\n  it('should convert `arguments` objects to plain objects', () => {\n    const actual = toPlainObject(args);\n    const expected = { 0: 1, 1: 2, 2: 3 };\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert arrays to plain objects', () => {\n    const actual = toPlainObject(['a', 'b', 'c']);\n    const expected = { 0: 'a', 1: 'b', 2: 'c' };\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should convert objects with an enumerable `__proto__` property to plain objects', () => {\n    const object = {};\n    Object.defineProperty(object, '__proto__', {\n      value: { a: 1 },\n      enumerable: true,\n    });\n    expect(toPlainObject(object)).toEqual({ ['__proto__']: { a: 1 } });\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toPlainObject).toEqualTypeOf<typeof toPlainObjectLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toPlainObject.ts",
    "content": "import { keysIn } from '../object/keysIn.ts';\n\n/**\n * Converts value to a plain object flattening inherited enumerable string keyed properties of value to own properties of the plain object.\n *\n * @param {any} value The value to convert.\n * @returns {any} Returns the converted plain object.\n *\n * @example\n * function Foo() {\n *   this.b = 2;\n * }\n * Foo.prototype.c = 3;\n * toPlainObject(new Foo()); // { b: 2, c: 3 }\n */\nexport function toPlainObject(value?: any): any {\n  const plainObject: Record<string, any> = {};\n  const valueKeys = keysIn(value);\n\n  for (let i = 0; i < valueKeys.length; i++) {\n    const key = valueKeys[i];\n    const objValue = (value as any)[key];\n    if (key === '__proto__') {\n      Object.defineProperty(plainObject, key, {\n        configurable: true,\n        enumerable: true,\n        value: objValue,\n        writable: true,\n      });\n    } else {\n      plainObject[key] = objValue;\n    }\n  }\n  return plainObject;\n}\n"
  },
  {
    "path": "src/compat/util/toSafeInteger.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toSafeInteger as toSafeIntegerLodash } from 'lodash';\nimport { toSafeInteger } from './toSafeInteger';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER';\n\ndescribe('toSafeInteger methods', () => {\n  it('should convert values to safe integers', () => {\n    expect(toSafeInteger(-5.6)).toBe(-5);\n    expect(toSafeInteger('5.6')).toBe(5);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect(toSafeInteger()).toBe(0);\n    expect(toSafeInteger(NaN)).toBe(0);\n\n    expect(toSafeInteger(Infinity)).toBe(MAX_SAFE_INTEGER);\n    expect(toSafeInteger(-Infinity)).toBe(-MAX_SAFE_INTEGER);\n  });\n\n  it('should support `value` of `-0`', () => {\n    expect(1 / toSafeInteger(-0)).toBe(-Infinity);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toSafeInteger).toEqualTypeOf<typeof toSafeIntegerLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toSafeInteger.ts",
    "content": "import { toInteger } from './toInteger.ts';\nimport { MAX_SAFE_INTEGER } from '../_internal/MAX_SAFE_INTEGER.ts';\nimport { clamp } from '../math/clamp.ts';\n\n/**\n * Converts `value` to a safe integer.\n *\n * A safe integer can be compared and represented correctly.\n *\n * @param {any} value - The value to convert.\n * @returns {number} Returns the value converted to a safe integer.\n *\n * @example\n * toSafeInteger(3.2); // => 3\n * toSafeInteger(Number.MAX_VALUE); // => 9007199254740991\n * toSafeInteger(Infinity); // => 9007199254740991\n * toSafeInteger('3.2'); // => 3\n * toSafeInteger(NaN); // => 0\n * toSafeInteger(null); // => 0\n * toSafeInteger(-Infinity); // => -9007199254740991\n */\nexport function toSafeInteger(value: any): number {\n  if (value == null) {\n    return 0;\n  }\n\n  return clamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\n}\n"
  },
  {
    "path": "src/compat/util/toString.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { toString as toStringLodash } from 'lodash';\nimport { stubString } from './stubString';\nimport { toString } from './toString';\nimport { symbol } from '../_internal/symbol';\n\ndescribe('toString', () => {\n  it('should treat nullish values as empty strings', () => {\n    // eslint-disable-next-line no-sparse-arrays\n    const values = [, null, undefined];\n    const expected = values.map(stubString);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const actual = values.map((value, index) => (index ? toString(value) : toString()));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve the sign of `0`', () => {\n    const values = [-0, Object(-0), 0, Object(0)];\n    const expected = ['-0', '-0', '0', '0'];\n    const actual = values.map(toString);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should preserve the sign of `0` in an array', () => {\n    const values = [-0, Object(-0), 0, Object(0)];\n    expect(toString(values)).toEqual('-0,-0,0,0');\n  });\n\n  it('should handle symbols', () => {\n    expect(toString(symbol)).toBe('Symbol(a)');\n  });\n\n  it('should handle an array of symbols', () => {\n    expect(toString([symbol])).toBe('Symbol(a)');\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(toString).toEqualTypeOf<typeof toStringLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/toString.ts",
    "content": "/**\n * Converts `value` to a string.\n *\n * An empty string is returned for `null` and `undefined` values.\n * The sign of `-0` is preserved.\n *\n * @param {any} value - The value to convert.\n * @returns {string} Returns the converted string.\n *\n * @example\n * toString(null) // returns ''\n * toString(undefined) // returns ''\n * toString(-0) // returns '-0'\n * toString([1, 2, -0]) // returns '1,2,-0'\n * toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'\n */\nexport function toString(value: any): string {\n  if (value == null) {\n    return '';\n  }\n\n  if (typeof value === 'string') {\n    return value;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map(toString).join(',');\n  }\n\n  const result = String(value);\n\n  if (result === '0' && Object.is(Number(value), -0)) {\n    return '-0';\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/compat/util/uniqueId.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport type { uniqueId as uniqueIdLodash } from 'lodash';\nimport { uniqueId } from './uniqueId';\n\ndescribe('uniqueId', () => {\n  it('should generate unique ids', () => {\n    const actual = Array.from({ length: 1000 }, () => uniqueId());\n\n    expect(new Set(actual).size).toBe(actual.length);\n  });\n\n  it('should return a string value when not providing a `prefix`', () => {\n    expect(typeof uniqueId()).toBe('string');\n  });\n\n  it('should coerce the prefix argument to a string', () => {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const ids = [uniqueId(3), uniqueId(2), uniqueId(1), uniqueId(true)];\n    expect(ids[0].startsWith('3')).toBe(true);\n    expect(ids[1].startsWith('2')).toBe(true);\n    expect(ids[2].startsWith('1')).toBe(true);\n    expect(ids[3].startsWith('true')).toBe(true);\n  });\n\n  it('should match the type of lodash', () => {\n    expectTypeOf(uniqueId).toEqualTypeOf<typeof uniqueIdLodash>();\n  });\n});\n"
  },
  {
    "path": "src/compat/util/uniqueId.ts",
    "content": "/** Counter used to generate unique numeric identifiers. */\nlet idCounter = 0;\n\n/**\n * Generates a unique identifier, optionally prefixed with a given string.\n *\n * @param {string} [prefix] - An optional string to prefix the unique identifier.\n *                            If not provided or not a string, only the unique\n *                            numeric identifier is returned.\n * @returns {string} A string containing the unique identifier, with the optional\n *                   prefix if provided.\n *\n * @example\n * // Generate a unique ID with a prefix\n * uniqueId('user_');  // => 'user_1'\n *\n * @example\n * // Generate a unique ID without a prefix\n * uniqueId();  // => '2'\n *\n * @example\n * // Subsequent calls increment the internal counter\n * uniqueId('item_');  // => 'item_3'\n * uniqueId();         // => '4'\n */\nexport function uniqueId(prefix = ''): string {\n  const id = ++idCounter;\n\n  return `${prefix}${id}`;\n}\n"
  },
  {
    "path": "src/error/AbortError.ts",
    "content": "/**\n * An error class representing an aborted operation.\n * @augments Error\n */\nexport class AbortError extends Error {\n  constructor(message = 'The operation was aborted') {\n    super(message);\n    this.name = 'AbortError';\n  }\n}\n"
  },
  {
    "path": "src/error/TimeoutError.ts",
    "content": "/**\n * An error class representing an timeout operation.\n * @augments Error\n */\nexport class TimeoutError extends Error {\n  constructor(message = 'The operation was timed out') {\n    super(message);\n    this.name = 'TimeoutError';\n  }\n}\n"
  },
  {
    "path": "src/error/index.ts",
    "content": "export { AbortError } from './AbortError.ts';\nexport { TimeoutError } from './TimeoutError.ts';\n"
  },
  {
    "path": "src/function/after.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { after } from './after';\n\ndescribe('after', () => {\n  it('should throw error if n is less than zero.', () => {\n    const mockFn = vi.fn();\n    const n = -1;\n    expect(() => after(n, mockFn)).toThrowErrorMatchingInlineSnapshot('[Error: n must be a non-negative integer.]');\n    expect(() => after(NaN, mockFn)).toThrowErrorMatchingInlineSnapshot('[Error: n must be a non-negative integer.]');\n  });\n\n  it('should create a function that invokes `func` only after being called `n` calls.`', () => {\n    const mockFn = vi.fn();\n    const n = 3;\n\n    const afterFn = after(n, mockFn);\n    for (let i = 0; i < n - 1; i++) {\n      expect(afterFn()).toBeUndefined();\n    }\n    expect(mockFn).toHaveBeenCalledTimes(0);\n\n    afterFn();\n    expect(mockFn).toHaveBeenCalledTimes(1);\n\n    afterFn();\n    expect(mockFn).toHaveBeenCalledTimes(2);\n  });\n\n  it('should not invoke func immediately when n is zero.', () => {\n    const mockFn = vi.fn();\n    const afterFn = after(0, mockFn);\n    expect(mockFn).toHaveBeenCalledTimes(0);\n\n    afterFn();\n    expect(mockFn).toHaveBeenCalledTimes(1);\n  });\n\n  it('should handle arguments correctly.', () => {\n    const mockFn = vi.fn();\n    mockFn.mockReturnValue(3);\n\n    const afterFn = after(0, mockFn);\n    expect(afterFn(1, 2)).toBe(3);\n    expect(mockFn).toHaveBeenCalledWith(1, 2);\n    expect(mockFn).toHaveBeenCalledTimes(1);\n  });\n});\n"
  },
  {
    "path": "src/function/after.ts",
    "content": "/**\n * Creates a function that only executes starting from the `n`-th call.\n * The provided function will be invoked starting from the `n`-th call.\n *\n * This is particularly useful for scenarios involving events or asynchronous operations\n * where an action should occur only after a certain number of invocations.\n *\n * @template F - The type of the function to be invoked.\n * @param {number} n - The number of calls required for `func` to execute.\n * @param {F} func - The function to be invoked.\n * @returns {(...args: Parameters<F>) => ReturnType<F> | undefined} - A new function that:\n * - Tracks the number of calls.\n * - Invokes `func` starting from the `n`-th call.\n * - Returns `undefined` if fewer than `n` calls have been made.\n * @throws {Error} - Throws an error if `n` is negative.\n * @example\n *\n * const afterFn = after(3, () => {\n *  console.log(\"called\")\n * });\n *\n * // Will not log anything.\n * afterFn()\n * // Will not log anything.\n * afterFn()\n * // Will log 'called'.\n * afterFn()\n */\n\nexport function after<F extends (...args: any[]) => any>(\n  n: number,\n  func: F\n): (...args: Parameters<F>) => ReturnType<F> | undefined {\n  if (!Number.isInteger(n) || n < 0) {\n    throw new Error(`n must be a non-negative integer.`);\n  }\n\n  let counter = 0;\n  return (...args: Parameters<F>) => {\n    if (++counter >= n) {\n      return func(...args);\n    }\n    return undefined;\n  };\n}\n"
  },
  {
    "path": "src/function/ary.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { ary } from './ary';\n\ndescribe('ary', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should cap the number of arguments provided to `func`', () => {\n    const actual = ['6', '8', '10'].map(ary(parseInt, 1));\n    expect(actual).toEqual([6, 8, 10]);\n\n    const capped = ary(fn, 2);\n    expect(capped('a', 'b', 'c', 'd')).toEqual(['a', 'b']);\n  });\n\n  it('should not force a minimum argument count', () => {\n    const args = ['a', 'b', 'c'];\n    const capped = ary(fn, 3);\n\n    const expected = args.map((arg, index) => args.slice(0, index));\n    // eslint-disable-next-line prefer-spread\n    const actual = expected.map(array => capped.apply(undefined, array));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should use `this` binding of function', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const capped = ary(function (this: unknown, _a: unknown, _b: unknown) {\n      return this;\n    }, 1);\n    const object = { capped: capped };\n\n    expect(object.capped()).toBe(object);\n  });\n\n  it('should use the existing `ary` if smaller', () => {\n    const capped = ary(ary(fn, 1), 2);\n    expect(capped('a', 'b', 'c', 'd')).toEqual(['a']);\n  });\n});\n"
  },
  {
    "path": "src/function/ary.ts",
    "content": "/**\n * Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.\n *\n * @template F - The type of the function.\n * @param {F} func - The function to cap arguments for.\n * @param {number} n - The arity cap.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.\n *\n * @example\n * function fn(a: number, b: number, c: number) {\n *   return Array.from(arguments);\n * }\n *\n * ary(fn, 0)(1, 2, 3) // []\n * ary(fn, 1)(1, 2, 3) // [1]\n * ary(fn, 2)(1, 2, 3) // [1, 2]\n * ary(fn, 3)(1, 2, 3) // [1, 2, 3]\n */\nexport function ary<F extends (...args: any[]) => any>(func: F, n: number): (...args: any[]) => ReturnType<F> {\n  return function (this: any, ...args: Parameters<F>) {\n    return func.apply(this, args.slice(0, n));\n  };\n}\n"
  },
  {
    "path": "src/function/asyncNoop.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { asyncNoop } from './asyncNoop';\n\ndescribe('asyncNoop', () => {\n  it('should be a function', () => {\n    expect(typeof asyncNoop).toBe('function');\n  });\n\n  it('should return a Promise', () => {\n    expect(asyncNoop()).toBeInstanceOf(Promise);\n  });\n\n  it('should resolve to undefined', async () => {\n    await expect(asyncNoop()).resolves.toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "src/function/asyncNoop.ts",
    "content": "/**\n * An asynchronous no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * asyncNoop(); // Does nothing\n *\n * @returns {Promise<void>} This function returns a Promise that resolves to undefined.\n */\nexport async function asyncNoop(): Promise<void> {}\n"
  },
  {
    "path": "src/function/before.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { before } from './before';\n\ndescribe('before', () => {\n  it('should throw error if n is less than zero.', () => {\n    const mockFn = vi.fn();\n    expect(() => before(-1, mockFn)).toThrowErrorMatchingInlineSnapshot('[Error: n must be a non-negative integer.]');\n  });\n\n  it('should create a function that invokes `func` only until the `n-1`-th calls.', () => {\n    const mockFn = vi.fn();\n    mockFn.mockReturnValue(1);\n    const n = 3;\n    const beforeFn = before(n, mockFn);\n    expect(beforeFn()).toBe(1);\n    expect(mockFn).toHaveBeenCalledTimes(1);\n\n    expect(beforeFn()).toBe(1);\n    expect(mockFn).toHaveBeenCalledTimes(2);\n\n    expect(beforeFn()).toBeUndefined();\n  });\n\n  it('should not invoke func immediately when n is a positive integer', () => {\n    const mockFn = vi.fn();\n    mockFn.mockReturnValue(1);\n    const n = 3;\n    const beforeFn = before(n, mockFn);\n    expect(mockFn).toHaveBeenCalledTimes(0);\n\n    expect(beforeFn()).toBe(1);\n    expect(mockFn).toHaveBeenCalledTimes(1);\n  });\n\n  it('should handle arguments correctly', () => {\n    const mockFn = vi.fn();\n    mockFn.mockReturnValue(3);\n    const n = 3;\n    const beforeFn = before(n, mockFn);\n    expect(beforeFn(1, 2)).toBe(3);\n    expect(mockFn).toHaveBeenCalledWith(1, 2);\n    expect(mockFn).toHaveBeenCalledTimes(1);\n  });\n});\n"
  },
  {
    "path": "src/function/before.ts",
    "content": "/**\n * Creates a function that limits the number of times the given function (`func`) can be called.\n *\n * @template F - The type of the function to be invoked.\n * @param {number} n - The number of times the returned function is allowed to call `func` before stopping.\n * - If `n` is 0, `func` will never be called.\n * - If `n` is a positive integer, `func` will be called up to `n-1` times.\n * @param {F} func - The function to be called with the limit applied.\n * @returns {(...args: Parameters<F>) => ReturnType<F> | undefined} - A new function that:\n * - Tracks the number of calls.\n * - Invokes `func` until the `n-1`-th call.\n * - Returns `undefined` if the number of calls reaches or exceeds `n`, stopping further calls.\n * @throws {Error} - Throw an error if `n` is negative.\n * @example\n *\n * const beforeFn = before(3, () => {\n *  console.log(\"called\");\n * })\n *\n * // Will log 'called'.\n * beforeFn();\n *\n * // Will log 'called'.\n * beforeFn();\n *\n * // Will not log anything.\n * beforeFn();\n */\n\nexport function before<F extends (...args: any[]) => any>(\n  n: number,\n  func: F\n): (...args: Parameters<F>) => ReturnType<F> | undefined {\n  if (!Number.isInteger(n) || n < 0) {\n    throw new Error('n must be a non-negative integer.');\n  }\n\n  let counter = 0;\n\n  return (...args: Parameters<F>) => {\n    if (++counter < n) {\n      return func(...args);\n    }\n\n    return undefined;\n  };\n}\n"
  },
  {
    "path": "src/function/curry.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { curry } from './curry';\n\ndescribe('curry', () => {\n  it('should return original type of function when function without any arguments received', () => {\n    const fn = () => 'test';\n    const curried = curry(fn);\n\n    expect(curried()).toBe('test');\n  });\n\n  it('should curry based on the number of arguments given', () => {\n    const fn = (a: number, b: number, c: number, d: number) => [a, b, c, d];\n    const curried = curry(fn);\n    const expected = [1, 2, 3, 4];\n\n    expect(curried(1)(2)(3)(4)).toEqual(expected);\n  });\n\n  it('should inference type correctly', () => {\n    const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n    const curried = curry(fn);\n\n    expectTypeOf(curried).parameters.toEqualTypeOf<[number]>();\n    expectTypeOf(curried(1)).parameters.toEqualTypeOf<[string]>();\n    expectTypeOf(curried(1)).not.toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n    expectTypeOf(curried(1)('a')).parameters.toEqualTypeOf<[boolean]>();\n    expectTypeOf(curried(1)('a')).not.toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n    expectTypeOf(curried(1)('a')(true)).toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n  });\n});\n"
  },
  {
    "path": "src/function/curry.ts",
    "content": "/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {() => R} func - The function to curry.\n * @returns {() => R} A curried function.\n *\n * @example\n * function noArgFunc() {\n *   return 42;\n * }\n * const curriedNoArgFunc = curry(noArgFunc);\n * console.log(curriedNoArgFunc()); // 42\n */\nexport function curry<R>(func: () => R): () => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(p: P) => R} func - The function to curry.\n * @returns {(p: P) => R} A curried function.\n *\n * @example\n * function oneArgFunc(a: number) {\n *   return a * 2;\n * }\n * const curriedOneArgFunc = curry(oneArgFunc);\n * console.log(curriedOneArgFunc(5)); // 10\n */\nexport function curry<P, R>(func: (p: P) => R): (p: P) => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(p1: P1, p2: P2) => R} func - The function to curry.\n * @returns {(p1: P1) => (p2: P2) => R} A curried function.\n *\n * @example\n * function twoArgFunc(a: number, b: number) {\n *   return a + b;\n * }\n * const curriedTwoArgFunc = curry(twoArgFunc);\n * const add5 = curriedTwoArgFunc(5);\n * console.log(add5(10)); // 15\n */\nexport function curry<P1, P2, R>(func: (p1: P1, p2: P2) => R): (p1: P1) => (p2: P2) => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(p1: P1, p2: P2, p3: P3) => R} func - The function to curry.\n * @returns {(p1: P1) => (p2: P2) => (p3: P3) => R} A curried function.\n *\n * @example\n * function threeArgFunc(a: number, b: number, c: number) {\n *   return a + b + c;\n * }\n * const curriedThreeArgFunc = curry(threeArgFunc);\n * const add1 = curriedThreeArgFunc(1);\n * const add3 = add1(2);\n * console.log(add3(3)); // 6\n */\nexport function curry<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p1: P1) => (p2: P2) => (p3: P3) => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(p1: P1, p2: P2, p3: P3, p4: P4) => R} func - The function to curry.\n * @returns {(p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R} A curried function.\n *\n * @example\n * function fourArgFunc(a: number, b: number, c: number, d: number) {\n *   return a + b + c + d;\n * }\n * const curriedFourArgFunc = curry(fourArgFunc);\n * const add1 = curriedFourArgFunc(1);\n * const add3 = add1(2);\n * const add6 = add3(3);\n * console.log(add6(4)); // 10\n */\nexport function curry<P1, P2, P3, P4, R>(\n  func: (p1: P1, p2: P2, p3: P3, p4: P4) => R\n): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R} func - The function to curry.\n * @returns {(p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => (p5: P5) => R} A curried function.\n *\n * @example\n * function fiveArgFunc(a: number, b: number, c: number, d: number, e: number) {\n *   return a + b + c + d + e;\n * }\n * const curriedFiveArgFunc = curry(fiveArgFunc);\n * const add1 = curriedFiveArgFunc(1);\n * const add3 = add1(2);\n * const add6 = add3(3);\n * const add10 = add6(4);\n * console.log(add10(5)); // 15\n */\nexport function curry<P1, P2, P3, P4, P5, R>(\n  func: (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R\n): (p1: P1) => (p2: P2) => (p3: P3) => (p4: P4) => (p5: P5) => R;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @returns {(...args: any[]) => any} A curried function that can be called with a single argument at a time.\n *\n * @example\n * function sum(a: number, b: number, c: number) {\n *   return a + b + c;\n * }\n *\n * const curriedSum = curry(sum);\n *\n * // The parameter `a` should be given the value `10`.\n * const add10 = curriedSum(10);\n *\n * // The parameter `b` should be given the value `15`.\n * const add25 = add10(15);\n *\n * // The parameter `c` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.\n * const result = add25(5);\n */\nexport function curry(func: (...args: any[]) => any): (...args: any[]) => any;\n\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @returns {(...args: any[]) => any} A curried function that can be called with a single argument at a time.\n *\n * @example\n * function sum(a: number, b: number, c: number) {\n *   return a + b + c;\n * }\n *\n * const curriedSum = curry(sum);\n *\n * // The parameter `a` should be given the value `10`.\n * const add10 = curriedSum(10);\n *\n * // The parameter `b` should be given the value `15`.\n * const add25 = add10(15);\n *\n * // The parameter `c` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.\n * const result = add25(5);\n */\nexport function curry(func: (...args: any[]) => any): (...args: any[]) => any {\n  if (func.length === 0 || func.length === 1) {\n    return func;\n  }\n\n  return function (arg: any) {\n    return makeCurry(func, func.length, [arg]);\n  };\n}\n\nfunction makeCurry<F extends (...args: any) => any>(origin: F, argsLength: number, args: any[]) {\n  if (args.length === argsLength) {\n    return origin(...args);\n  } else {\n    const next = function (arg: Parameters<F>[0]) {\n      return makeCurry(origin, argsLength, [...args, arg]);\n    };\n\n    return next;\n  }\n}\n"
  },
  {
    "path": "src/function/curryRight.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { curryRight } from './curryRight';\n\ndescribe('curryRight', () => {\n  it('should return original type of function when function without any arguments received', () => {\n    const fn = () => 'test';\n    const curried = curryRight(fn);\n\n    expect(curried()).toBe('test');\n  });\n\n  it('should curry based on the number of arguments given', () => {\n    const fn = (a: number, b: number, c: number, d: number) => [a, b, c, d];\n    const curried = curryRight(fn);\n    const expected = [4, 3, 2, 1];\n\n    expect(curried(1)(2)(3)(4)).toEqual(expected);\n  });\n\n  it('should inference type correctly', () => {\n    const fn = (a: number, b: string, c: boolean) => ({ a, b, c });\n    const curried = curryRight(fn);\n\n    expectTypeOf(curried).parameters.toEqualTypeOf<[boolean]>();\n    expectTypeOf(curried(true)).parameters.toEqualTypeOf<[string]>();\n    expectTypeOf(curried(true)).not.toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n    expectTypeOf(curried(true)('a')).parameters.toEqualTypeOf<[number]>();\n    expectTypeOf(curried(true)('a')).not.toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n    expectTypeOf(curried(true)('a')(1)).toEqualTypeOf<{ a: number; b: string; c: boolean }>();\n  });\n});\n"
  },
  {
    "path": "src/function/curryRight.ts",
    "content": "/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {() => R} func - The function to curry.\n * @returns {() => R} A curried function.\n *\n * @example\n * function noArgFunc() {\n *  return 42;\n * }\n * const curriedNoArgFunc = curryRight(noArgFunc);\n * console.log(curriedNoArgFunc()); // 42\n */\nexport function curryRight<R>(func: () => R): () => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(p: P) => R} func - The function to curry.\n * @returns {(p: P) => R} A curried function.\n *\n * @example\n * function oneArgFunc(a: number) {\n *   return a * 2;\n * }\n * const curriedOneArgFunc = curryRight(oneArgFunc);\n * console.log(curriedOneArgFunc(5)); // 10\n */\nexport function curryRight<P, R>(func: (p: P) => R): (p: P) => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(p1: P1, p2: P2) => R} func - The function to curry.\n * @returns {(p2: P2) => (p1: P1) => R} A curried function.\n *\n * @example\n * function twoArgFunc(a: number, b: number) {\n *  return [a, b];\n * }\n * const curriedTwoArgFunc = curryRight(twoArgFunc);\n * const func = curriedTwoArgFunc(1);\n * console.log(func(2)); // [2, 1]\n */\nexport function curryRight<P1, P2, R>(func: (p1: P1, p2: P2) => R): (p2: P2) => (p1: P1) => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(p1: P1, p2: P2, p3: P3) => R} func - The function to curry.\n * @returns {(p3: P3) => (p2: P2) => (p1: P1) => R} A curried function.\n *\n * @example\n * function threeArgFunc(a: number, b: number, c: number) {\n *   return [a, b, c];\n * }\n * const curriedThreeArgFunc = curryRight(threeArgFunc);\n * const func = curriedThreeArgFunc(1);\n * const func2 = func(2);\n * console.log(func2(3)); // [3, 2, 1]\n */\nexport function curryRight<P1, P2, P3, R>(func: (p1: P1, p2: P2, p3: P3) => R): (p3: P3) => (p2: P2) => (p1: P1) => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(p1: P1, p2: P2, p3: P3, p4: P4) => R} func - The function to curry.\n * @returns {(p4: P4) => (p3: P3) => (p2: P2) => (p1: P1) => R} A curried function.\n *\n * @example\n * function fourArgFunc(a: number, b: number, c: number, d: number) {\n *  return [a, b, c, d];\n * }\n * const curriedFourArgFunc = curryRight(fourArgFunc);\n * const func = curriedFourArgFunc(1);\n * const func2 = func(2);\n * const func3 = func2(3);\n * console.log(func3(4)); // [4, 3, 2, 1]\n */\nexport function curryRight<P1, P2, P3, P4, R>(\n  func: (p1: P1, p2: P2, p3: P3, p4: P4) => R\n): (p4: P4) => (p3: P3) => (p2: P2) => (p1: P1) => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R} func - The function to curry.\n * @returns {(p5: P5) => (p4: P4) => (p3: P3) => (p2: P2) => (p1: P1) => R} A curried function.\n *\n * @example\n * function fiveArgFunc(a: number, b: number, c: number, d: number, e: number) {\n *   return [a, b, c, d, e];\n * }\n * const curriedFiveArgFunc = curryRight(fiveArgFunc);\n * const func = curriedFiveArgFunc(1);\n * const func2 = func(2);\n * const func3 = func2(3);\n * const func4 = func3(4);\n * console.log(func4(5)); // [5, 4, 3, 2, 1]\n */\nexport function curryRight<P1, P2, P3, P4, P5, R>(\n  func: (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => R\n): (p5: P5) => (p4: P4) => (p3: P3) => (p2: P2) => (p1: P1) => R;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @returns {(...args: any[]) => any} A curried function.\n *\n * @example\n * function sum(a: number, b: number, c: number) {\n *   return a + b + c;\n * }\n *\n * const curriedSum = curryRight(sum);\n *\n * // The parameter `c` should be given the value `10`.\n * const add10 = curriedSum(10);\n *\n * // The parameter `b` should be given the value `15`.\n * const add25 = add10(15);\n *\n * // The parameter `a` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.\n * const result = add25(5); // 30\n */\nexport function curryRight(func: (...args: any[]) => any): (...args: any[]) => any;\n/**\n * Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument.\n * This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.\n *\n * Unlike `curry`, this function curries the function from right to left.\n *\n * @param {(...args: any[]) => any} func - The function to curry.\n * @returns {(...args: any[]) => any} A curried function.\n *\n * @example\n * function sum(a: number, b: number, c: number) {\n *   return a + b + c;\n * }\n *\n * const curriedSum = curryRight(sum);\n *\n * // The parameter `c` should be given the value `10`.\n * const add10 = curriedSum(10);\n *\n * // The parameter `b` should be given the value `15`.\n * const add25 = add10(15);\n *\n * // The parameter `a` should be given the value `5`. The function 'sum' has received all its arguments and will now return a value.\n * const result = add25(5); // 30\n */\nexport function curryRight(func: (...args: any[]) => any): (...args: any[]) => any {\n  if (func.length === 0 || func.length === 1) {\n    return func;\n  }\n\n  return function (arg: any) {\n    return makeCurryRight(func, func.length, [arg]);\n  };\n}\n\nfunction makeCurryRight<F extends (...args: any) => any>(origin: F, argsLength: number, args: any[]) {\n  if (args.length === argsLength) {\n    return origin(...args);\n  } else {\n    const next = function (arg: Parameters<F>[0]) {\n      return makeCurryRight(origin, argsLength, [arg, ...args]);\n    };\n    return next;\n  }\n}\n"
  },
  {
    "path": "src/function/debounce.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { debounce } from './debounce';\n// adjust the import path as necessary\nimport { delay } from '../promise';\n\ndescribe('debounce', () => {\n  it('should debounce function calls', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    debouncedFunc();\n    debouncedFunc();\n\n    await delay(debounceMs * 2);\n\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should delay the function call by the specified wait time', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs / 2 + 1);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should reset the wait time if called again before wait time ends', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n    await delay(debounceMs / 2);\n    debouncedFunc();\n\n    expect(func).not.toHaveBeenCalled();\n\n    await delay(debounceMs + 1);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should cancel the debounced function call', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    debouncedFunc.cancel();\n    await delay(debounceMs);\n\n    expect(func).not.toHaveBeenCalled();\n  });\n\n  it('should work correctly if the debounced function is called after the wait time', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc();\n    await delay(debounceMs + 1);\n    debouncedFunc();\n    await delay(debounceMs + 1);\n\n    expect(func).toHaveBeenCalledTimes(2);\n  });\n\n  it('should have no effect if we call cancel when the function is not executed', () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    expect(() => debouncedFunc.cancel()).not.toThrow();\n  });\n\n  it('should call the function with correct arguments', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs);\n\n    debouncedFunc('test', 123);\n\n    await delay(debounceMs * 2);\n\n    expect(func).toHaveBeenCalledTimes(1);\n    expect(func).toHaveBeenCalledWith('test', 123);\n  });\n\n  it('should cancel the debounced function call if aborted via AbortSignal', async () => {\n    const func = vi.fn();\n    const debounceMs = 50;\n    const controller = new AbortController();\n    const signal = controller.signal;\n    const debouncedFunc = debounce(func, debounceMs, { signal });\n\n    debouncedFunc();\n    controller.abort();\n\n    await delay(debounceMs);\n\n    expect(func).not.toHaveBeenCalled();\n  });\n\n  it('should not call the debounced function if it is already aborted by AbortSignal', async () => {\n    const controller = new AbortController();\n    const signal = controller.signal;\n\n    controller.abort();\n\n    const func = vi.fn();\n\n    const debounceMs = 50;\n    const debouncedFunc = debounce(func, debounceMs, { signal });\n\n    debouncedFunc();\n\n    await delay(debounceMs);\n\n    expect(func).not.toHaveBeenCalled();\n  });\n\n  it('should not add multiple abort event listeners', async () => {\n    const func = vi.fn();\n    const debounceMs = 100;\n    const controller = new AbortController();\n    const signal = controller.signal;\n    const addEventListenerSpy = vi.spyOn(signal, 'addEventListener');\n\n    const debouncedFunc = debounce(func, debounceMs, { signal });\n\n    debouncedFunc();\n    debouncedFunc();\n\n    await new Promise(resolve => setTimeout(resolve, 150));\n\n    expect(func).toHaveBeenCalledTimes(1);\n\n    const listenerCount = addEventListenerSpy.mock.calls.filter(([event]) => event === 'abort').length;\n    expect(listenerCount).toBe(1);\n\n    addEventListenerSpy.mockRestore();\n  });\n});\n"
  },
  {
    "path": "src/function/debounce.ts",
    "content": "export interface DebounceOptions {\n  /**\n   * An optional AbortSignal to cancel the debounced function.\n   */\n  signal?: AbortSignal;\n\n  /**\n   * An optional array specifying whether the function should be invoked on the leading edge, trailing edge, or both.\n   * If `edges` includes \"leading\", the function will be invoked at the start of the delay period.\n   * If `edges` includes \"trailing\", the function will be invoked at the end of the delay period.\n   * If both \"leading\" and \"trailing\" are included, the function will be invoked at both the start and end of the delay period.\n   * @default [\"trailing\"]\n   */\n  edges?: Array<'leading' | 'trailing'>;\n}\n\nexport interface DebouncedFunction<F extends (...args: any[]) => void> {\n  (...args: Parameters<F>): void;\n\n  /**\n   * Schedules the execution of the debounced function after the specified debounce delay.\n   * This method resets any existing timer, ensuring that the function is only invoked\n   * after the delay has elapsed since the last call to the debounced function.\n   * It is typically called internally whenever the debounced function is invoked.\n   *\n   * @returns {void}\n   */\n  schedule: () => void;\n\n  /**\n   * Cancels any pending execution of the debounced function.\n   * This method clears the active timer and resets any stored context or arguments.\n   */\n  cancel: () => void;\n\n  /**\n   * Immediately invokes the debounced function if there is a pending execution.\n   * This method executes the function right away if there is a pending execution.\n   */\n  flush: () => void;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * @template F - The type of function.\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @returns A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n *  console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<F extends (...args: any[]) => void>(\n  func: F,\n  debounceMs: number,\n  { signal, edges }: DebounceOptions = {}\n): DebouncedFunction<F> {\n  let pendingThis: any = undefined;\n  let pendingArgs: Parameters<F> | null = null;\n\n  const leading = edges != null && edges.includes('leading');\n  const trailing = edges == null || edges.includes('trailing');\n\n  const invoke = () => {\n    if (pendingArgs !== null) {\n      func.apply(pendingThis, pendingArgs);\n      pendingThis = undefined;\n      pendingArgs = null;\n    }\n  };\n\n  const onTimerEnd = () => {\n    if (trailing) {\n      invoke();\n    }\n\n    cancel();\n  };\n\n  let timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n  const schedule = () => {\n    if (timeoutId != null) {\n      clearTimeout(timeoutId);\n    }\n\n    timeoutId = setTimeout(() => {\n      timeoutId = null;\n\n      onTimerEnd();\n    }, debounceMs);\n  };\n\n  const cancelTimer = () => {\n    if (timeoutId !== null) {\n      clearTimeout(timeoutId);\n      timeoutId = null;\n    }\n  };\n\n  const cancel = () => {\n    cancelTimer();\n    pendingThis = undefined;\n    pendingArgs = null;\n  };\n\n  const flush = () => {\n    invoke();\n  };\n\n  const debounced = function (this: any, ...args: Parameters<F>) {\n    if (signal?.aborted) {\n      return;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    pendingThis = this;\n    pendingArgs = args;\n\n    const isFirstCall = timeoutId == null;\n\n    schedule();\n\n    if (leading && isFirstCall) {\n      invoke();\n    }\n  };\n\n  debounced.schedule = schedule;\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n\n  signal?.addEventListener('abort', cancel, { once: true });\n\n  return debounced;\n}\n"
  },
  {
    "path": "src/function/flow.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { ary } from './ary';\nimport { flow } from './flow';\nimport { head } from '../array';\nimport { uniq } from '../array';\nimport { map } from '../compat';\nimport { curry } from '../compat/function/curry';\n\nconst add = function (x: number, y: number) {\n  return x + y;\n};\n\nconst square = function (n: number) {\n  return n * n;\n};\n\ndescribe('flow', () => {\n  it(`\\`flow\\` should supply each function with the return value of the previous`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flow(add, square, fixed);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it(`\\`flow\\` should return a new function`, () => {\n    const noop = () => {};\n    const combined = flow(noop);\n    expect(combined).not.toBe(noop);\n  });\n\n  it(`\\`flow\\` should work with a curried function and \\`_.head\\``, () => {\n    const curried = curry((i: any) => i);\n\n    const combined = flow(head, curried);\n\n    expect(combined([1])).toBe(1);\n  });\n\n  it(`\\`flow\\` should work with curried functions with placeholders`, () => {\n    const curried = curry(ary(map, 2), 2);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const getProp = curried(curried.placeholder, (value: { a: any }) => value.a);\n    const objects = [{ a: 1 }, { a: 2 }, { a: 1 }];\n\n    const combined = flow(getProp, uniq);\n\n    expect(combined(objects)).toEqual([1, 2]);\n  });\n\n  it(`\\`flow\\` should return the first argument when no functions are provided`, () => {\n    const combined = flow();\n\n    expect(combined(42)).toBe(42);\n  });\n\n  it(`\\`flow\\` should preserve \\`this\\` context`, () => {\n    const obj = {\n      multiplier: 2,\n      multiply: function (x: number, y: number) {\n        return add(x, y) * this.multiplier;\n      },\n    };\n    const combined = flow(obj.multiply, square);\n\n    expect(combined.call(obj, 1, 2)).toBe(36);\n  });\n});\n"
  },
  {
    "path": "src/function/flow.ts",
    "content": "/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {() => R} f The function to invoke.\n * @returns {() => R} Returns the new composite function.\n *\n * @example\n * function noArgFunc() {\n *  return 42;\n * }\n *\n * const combined = flow(noArgFunc);\n * console.log(combined()); // 42\n */\nexport function flow<R>(f: () => R): () => R;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {(...args: A) => R} f1 The function to invoke.\n * @returns {(...args: A) => R} Returns the new composite function.\n *\n * @example\n * function oneArgFunc(a: number) {\n *   return a * 2;\n * }\n *\n * const combined = flow(oneArgFunc);\n * console.log(combined(5)); // 10\n */\nexport function flow<A extends any[], R>(f1: (...args: A) => R): (...args: A) => R;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @returns {(...args: A) => R2} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flow(add, square);\n * console.log(combined(1, 2)); // 9\n */\nexport function flow<A extends any[], R1, R2>(f1: (...args: A) => R1, f2: (a: R1) => R2): (...args: A) => R2;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @returns {(...args: A) => R3} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flow(add, square, double);\n * console.log(combined(1, 2)); // 18\n */\nexport function flow<A extends any[], R1, R2, R3>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3\n): (...args: A) => R3;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @param {(a: R3) => R4} f4 The function to invoke.\n * @returns {(...args: A) => R4} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toStr = (n: number) => n.toString();\n *\n * const combined = flow(add, square, double, toStr);\n * console.log(combined(1, 2)); // '18'\n */\nexport function flow<A extends any[], R1, R2, R3, R4>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4\n): (...args: A) => R4;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @param {(a: R3) => R4} f4 The function to invoke.\n * @param {(a: R4) => R5} f5 The function to invoke.\n * @returns {(...args: A) => R5} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toStr = (n: number) => n.toString();\n * const split = (s: string) => s.split('');\n *\n * const combined = flow(add, square, double, toStr, split);\n * console.log(combined(1, 2)); // ['1', '8']\n */\nexport function flow<A extends any[], R1, R2, R3, R4, R5>(\n  f1: (...args: A) => R1,\n  f2: (a: R1) => R2,\n  f3: (a: R2) => R3,\n  f4: (a: R3) => R4,\n  f5: (a: R4) => R5\n): (...args: A) => R5;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {Array<(...args: any[]) => any>} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flow(add, square);\n * console.log(combined(1, 2)); // 9\n */\nexport function flow(...funcs: Array<(...args: any[]) => any>): (...args: any[]) => any;\n/**\n * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * @param {Array<(...args: any[]) => any>} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flow(add, square);\n * console.log(combined(1, 2)); // 9\n */\nexport function flow(...funcs: Array<(...args: any[]) => any>): (...args: any[]) => any {\n  return function (this: any, ...args: any[]) {\n    let result = funcs.length ? funcs[0].apply(this, args) : args[0];\n\n    for (let i = 1; i < funcs.length; i++) {\n      result = funcs[i].call(this, result);\n    }\n\n    return result;\n  };\n}\n"
  },
  {
    "path": "src/function/flowRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { ary } from './ary';\nimport { flowRight } from './flowRight';\nimport { head } from '../array';\nimport { uniq } from '../array';\nimport { map } from '../compat';\nimport { curry } from '../compat/function/curry';\n\nconst add = function (x: number, y: number) {\n  return x + y;\n};\n\nconst square = function (n: number) {\n  return n * n;\n};\n\ndescribe('flowRight', () => {\n  it(`\\`flowRight\\` should supply each function with the return value of the previous`, () => {\n    const fixed = function (n: number) {\n      return n.toFixed(1);\n    };\n    const combined = flowRight(fixed, square, add);\n\n    expect(combined(1, 2)).toBe('9.0');\n  });\n\n  it(`\\`flowRight\\` should return a new function`, () => {\n    const noop = () => {};\n    const combined = flowRight(noop);\n    expect(combined).not.toBe(noop);\n  });\n\n  it(`\\`flowRight\\` should work with a curried function and \\`_.head\\``, () => {\n    const curried = curry((i: any) => i);\n\n    const combined = flowRight(curried, head);\n\n    expect(combined([1])).toBe(1);\n  });\n\n  it(`\\`flowRight\\` should work with curried functions with placeholders`, () => {\n    const curried = curry(ary(map, 2), 2);\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    const getProp = curried(curried.placeholder, (value: { a: any }) => value.a);\n    const objects = [{ a: 1 }, { a: 2 }, { a: 1 }];\n\n    const combined = flowRight(uniq, getProp);\n\n    expect(combined(objects)).toEqual([1, 2]);\n  });\n});\n"
  },
  {
    "path": "src/function/flowRight.ts",
    "content": "import { flow } from './flow.ts';\n\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {() => R} f The function to invoke.\n * @returns {() => R} Returns the new composite function.\n *\n * @example\n * function noArgFunc() {\n *   return 42;\n * }\n * const combined = flowRight(noArgFunc);\n * console.log(combined()); // 42\n */\nexport function flowRight<R>(f: () => R): () => R;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(...args: A) => R} f1 The function to invoke.\n * @returns {(...args: A) => R} Returns the new composite function.\n *\n * @example\n * function oneArgFunc(a: number) {\n *  return a * 2;\n * }\n * const combined = flowRight(oneArgFunc);\n * console.log(combined(5)); // 10\n */\nexport function flowRight<A extends any[], R>(f1: (...args: A) => R): (...args: A) => R;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @returns {(...args: A) => R2} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flowRight(square, add);\n * console.log(combined(1, 2)); // 9\n */\nexport function flowRight<A extends any[], R1, R2>(f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R2;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @returns {(...args: A) => R3} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n *\n * const combined = flowRight(double, square, add);\n * console.log(combined(1, 2)); // 18\n */\nexport function flowRight<A extends any[], R1, R2, R3>(\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R3;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(a: R3) => R4} f4 The function to invoke.\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @returns {(...args: A) => R4} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toStr = (n: number) => n.toString();\n *\n * const combined = flowRight(toStr, double, square, add);\n * console.log(combined(1, 2));  // '18'\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4>(\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R4;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(a: R4) => R5} f5 The function to invoke.\n * @param {(a: R3) => R4} f4 The function to invoke.\n * @param {(a: R2) => R3} f3 The function to invoke.\n * @param {(a: R1) => R2} f2 The function to invoke.\n * @param {(...args: A) => R1} f1 The function to invoke.\n * @returns {(...args: A) => R5} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n * const double = (n: number) => n * 2;\n * const toStr = (n: number) => n.toString();\n * const split = (s: string) => s.split('');\n *\n * const combined = flowRight(split, toStr, double, square, add);\n * console.log(combined(1, 2)); // ['1', '8']\n */\nexport function flowRight<A extends any[], R1, R2, R3, R4, R5>(\n  f5: (a: R4) => R5,\n  f4: (a: R3) => R4,\n  f3: (a: R2) => R3,\n  f2: (a: R1) => R2,\n  f1: (...args: A) => R1\n): (...args: A) => R5;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(...args: any[]) => any} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flowRight(square, add);\n * console.log(combined(1, 2)); // 9\n */\nexport function flowRight(...funcs: Array<(...args: any[]) => any>): (...args: any[]) => any;\n/**\n * Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.\n *\n * The `this` context of the returned function is also passed to the functions provided as parameters.\n *\n * This method is like `flow` except that it creates a function that invokes the given functions from right to left.\n *\n * @param {(...args: any[]) => any} funcs The functions to invoke.\n * @returns {(...args: any[]) => any} Returns the new composite function.\n *\n * @example\n * const add = (x: number, y: number) => x + y;\n * const square = (n: number) => n * n;\n *\n * const combined = flowRight(square, add);\n * console.log(combined(1, 2)); // 9\n */\nexport function flowRight(...funcs: Array<(...args: any[]) => any>): (...args: any[]) => any {\n  return flow(...funcs.reverse());\n}\n"
  },
  {
    "path": "src/function/identity.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { identity } from './identity.ts';\n\ndescribe('identity', () => {\n  it('should return the input value unchanged for a number', () => {\n    expect(identity(5)).toBe(5);\n  });\n\n  it('should return the input value unchanged for a string', () => {\n    expect(identity('hello')).toBe('hello');\n  });\n\n  it('should return the input value unchanged for an object', () => {\n    const obj = { key: 'value' };\n    expect(identity(obj)).toBe(obj);\n  });\n\n  it('should return the input value unchanged for an array', () => {\n    const arr = [1, 2, 3];\n    expect(identity(arr)).toBe(arr);\n  });\n\n  it('should return the input value unchanged for a boolean', () => {\n    expect(identity(true)).toBe(true);\n    expect(identity(false)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/function/identity.ts",
    "content": "/**\n * Returns the input value unchanged.\n *\n * @template T - The type of the input value.\n * @param {T} x - The value to be returned.\n * @returns {T} The input value.\n *\n * @example\n * // Returns 5\n * identity(5);\n *\n * @example\n * // Returns 'hello'\n * identity('hello');\n *\n * @example\n * // Returns { key: 'value' }\n * identity({ key: 'value' });\n */\nexport function identity<T>(x: T): T {\n  return x;\n}\n"
  },
  {
    "path": "src/function/index.ts",
    "content": "export { after } from './after.ts';\nexport { ary } from './ary.ts';\nexport { asyncNoop } from './asyncNoop.ts';\nexport { before } from './before.ts';\nexport { curry } from './curry.ts';\nexport { curryRight } from './curryRight.ts';\nexport { debounce, type DebouncedFunction, type DebounceOptions } from './debounce.ts';\nexport { flow } from './flow.ts';\nexport { flowRight } from './flowRight.ts';\nexport { identity } from './identity.ts';\nexport { memoize, type MemoizeCache } from './memoize.ts';\nexport { negate } from './negate.ts';\nexport { noop } from './noop.ts';\nexport { once } from './once.ts';\nexport { partial } from './partial.ts';\nexport { partialRight } from './partialRight.ts';\nexport { rest } from './rest.ts';\nexport { retry } from './retry.ts';\nexport { spread } from './spread.ts';\nexport { throttle, type ThrottledFunction, type ThrottleOptions } from './throttle.ts';\nexport { unary } from './unary.ts';\n"
  },
  {
    "path": "src/function/memoize.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { memoize } from './memoize';\n\ndescribe('memoize', () => {\n  it('should memoize results of an unary function', () => {\n    const add10 = vi.fn((x: number) => x + 10);\n\n    const memoizedAdd10 = memoize(add10);\n    expect(memoizedAdd10(5)).toBe(15);\n    expect(memoizedAdd10(5)).toBe(15);\n\n    expect(add10).toBeCalledTimes(1);\n\n    const now = () => Date.now();\n    const memoizedNow = memoize(now);\n\n    expect(memoizedNow()).toBe(memoizedNow());\n  });\n\n  it('should memoize results using a custom resolver function', () => {\n    const sum = vi.fn(function sum(arr: number[]) {\n      return arr.reduce((x, y) => x + y, 0);\n    });\n\n    const memoizedSum = memoize(sum, {\n      getCacheKey: x => x.join(','),\n    });\n\n    expect(memoizedSum([1, 2, 3])).toBe(6);\n    expect(memoizedSum([1, 2, 3])).toBe(6);\n\n    expect(sum).toBeCalledTimes(1);\n  });\n\n  it('should use `this` context for resolver function', () => {\n    const fn = function (a: number) {\n      // @ts-expect-error: this is not defined\n      return (a + this.b + this.c) as number;\n    };\n    const memoized = memoize(fn);\n    const object = { memoized: memoized, b: 2, c: 3 };\n    expect(object.memoized(1)).toBe(6); // {1: 6}\n    object.b = 3;\n    object.c = 5;\n    expect(object.memoized(1)).toBe(6); // {1: 6}\n  });\n\n  it('should check cache for built-in properties', () => {\n    const props = [\n      'constructor',\n      'hasOwnProperty',\n      'isPrototypeOf',\n      'propertyIsEnumerable',\n      'toLocaleString',\n      'toString',\n      'valueOf',\n    ];\n    const fn = (value: string) => value;\n    const memoized = memoize(fn);\n    const actual = props.map(value => memoized(value));\n    expect(actual).toEqual(props);\n  });\n\n  it('should allow custom cache implementation', () => {\n    class CustomCache {\n      private __data__: Map<object, string> = new Map();\n      get(key: object): string | undefined {\n        return this.__data__.get(key);\n      }\n      set(key: object, value: string): void {\n        this.__data__.set(key, value);\n      }\n      has(key: object): boolean {\n        return this.__data__.has(key);\n      }\n      delete(key: object): boolean | void {\n        return this.__data__.delete(key);\n      }\n      clear(): void {\n        this.__data__.clear();\n      }\n      get size(): number {\n        return this.__data__.size;\n      }\n    }\n\n    const fn = (object: { id: string }) => object.id;\n    const memoized = memoize(fn, { cache: new CustomCache() });\n\n    const cache = memoized.cache;\n    const key1 = { id: 'a' };\n    const key2 = { id: 'b' };\n\n    expect(memoized(key1)).toBe('a');\n    expect(cache.has(key1)).toBe(true);\n    expect(memoized(key2)).toBe('b');\n    expect(cache.has(key2)).toBe(true);\n  });\n\n  it('should work with an immutable cache implementation', () => {\n    class ImmutableCache<T> {\n      private __data__: Map<T, string> = new Map();\n\n      clear(): ImmutableCache<T> {\n        return new ImmutableCache<T>();\n      }\n\n      get(key: T): string | undefined {\n        return this.__data__.get(key);\n      }\n      has(key: T): boolean {\n        return this.__data__.has(key);\n      }\n\n      set(key: T, value: string): ImmutableCache<T> {\n        this.__data__.set(key, value);\n        return this;\n      }\n\n      delete(key: T): boolean | void {\n        return this.__data__.delete(key);\n      }\n\n      get size(): number {\n        return this.__data__.size;\n      }\n    }\n    const fn = (object: { id: string }) => object.id;\n    const cache = new ImmutableCache<{ id: string }>();\n    const memoized = memoize(fn, { cache });\n    const key1 = { id: 'a' };\n    const key2 = { id: 'b' };\n\n    memoized(key1);\n    memoized(key2);\n    expect(cache.has(key1)).toBe(true);\n    expect(cache.has(key2)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/function/memoize.ts",
    "content": "/**\n * Creates a memoized version of the provided function. The memoized function caches\n * results based on the argument it receives, so if the same argument is passed again,\n * it returns the cached result instead of recomputing it.\n *\n * This function works with functions that take zero or just one argument. If your function\n * originally takes multiple arguments, you should refactor it to take a single object or array\n * that combines those arguments.\n *\n * If the argument is not primitive (e.g., arrays or objects), provide a\n * `getCacheKey` function to generate a unique cache key for proper caching.\n *\n * @template F - The type of the function to be memoized.\n * @param {F} fn - The function to be memoized. It should accept a single argument and return a value.\n * @param {MemoizeOptions<Parameters<F>[0], ReturnType<F>>} [options={}] - Optional configuration for the memoization.\n * @param {MemoizeCache<any, V>} [options.cache] - The cache object used to store results. Defaults to a new `Map`.\n * @param {(args: A) => unknown} [options.getCacheKey] - An optional function to generate a unique cache key for each argument.\n *\n * @returns The memoized function with an additional `cache` property that exposes the internal cache.\n *\n * @example\n * // Example using the default cache\n * const add = (x: number) => x + 10;\n * const memoizedAdd = memoize(add);\n *\n * console.log(memoizedAdd(5)); // 15\n * console.log(memoizedAdd(5)); // 15 (cached result)\n * console.log(memoizedAdd.cache.size); // 1\n *\n * @example\n * // Example using a custom resolver\n * const sum = (arr: number[]) => arr.reduce((x, y) => x + y, 0);\n * const memoizedSum = memoize(sum, { getCacheKey: (arr: number[]) => arr.join(',') });\n * console.log(memoizedSum([1, 2])); // 3\n * console.log(memoizedSum([1, 2])); // 3 (cached result)\n * console.log(memoizedSum.cache.size); // 1\n *\n * @example\n * // Example using a custom cache implementation\n * class CustomCache<K, T> implements MemoizeCache<K, T> {\n *   private cache = new Map<K, T>();\n *\n *   set(key: K, value: T): void {\n *     this.cache.set(key, value);\n *   }\n *\n *   get(key: K): T | undefined {\n *     return this.cache.get(key);\n *   }\n *\n *   has(key: K): boolean {\n *     return this.cache.has(key);\n *   }\n *\n *   delete(key: K): boolean {\n *     return this.cache.delete(key);\n *   }\n *\n *   clear(): void {\n *     this.cache.clear();\n *   }\n *\n *   get size(): number {\n *     return this.cache.size;\n *   }\n * }\n * const customCache = new CustomCache<string, number>();\n * const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });\n * console.log(memoizedSumWithCustomCache([1, 2])); // 3\n * console.log(memoizedSumWithCustomCache([1, 2])); // 3 (cached result)\n * console.log(memoizedAddWithCustomCache.cache.size); // 1\n */\nexport function memoize<F extends (...args: any) => any>(\n  fn: F,\n  options: {\n    cache?: MemoizeCache<any, ReturnType<F>>;\n    getCacheKey?: (args: Parameters<F>[0]) => unknown;\n  } = {}\n): F & { cache: MemoizeCache<any, ReturnType<F>> } {\n  const { cache = new Map<unknown, ReturnType<F>>(), getCacheKey } = options;\n\n  const memoizedFn = function (this: unknown, arg: Parameters<F>[0]): ReturnType<F> {\n    const key = getCacheKey ? getCacheKey(arg) : arg;\n\n    if (cache.has(key)) {\n      return cache.get(key)!;\n    }\n\n    const result = fn.call(this, arg);\n\n    cache.set(key, result);\n\n    return result;\n  };\n\n  memoizedFn.cache = cache;\n\n  return memoizedFn as F & { cache: MemoizeCache<any, ReturnType<F>> };\n}\n\n/**\n * Represents a cache for memoization, allowing storage and retrieval of computed values.\n *\n * @template K - The type of keys used to store values in the cache.\n * @template V - The type of values stored in the cache.\n */\nexport interface MemoizeCache<K, V> {\n  /**\n   * Stores a value in the cache with the specified key.\n   *\n   * @param key - The key to associate with the value.\n   * @param value - The value to store in the cache.\n   */\n  set(key: K, value: V): void;\n\n  /**\n   * Retrieves a value from the cache by its key.\n   *\n   * @param key - The key of the value to retrieve.\n   * @returns The value associated with the key, or undefined if the key does not exist.\n   */\n  get(key: K): V | undefined;\n\n  /**\n   * Checks if a value exists in the cache for the specified key.\n   *\n   * @param key - The key to check for existence in the cache.\n   * @returns True if the cache contains the key, false otherwise.\n   */\n  has(key: K): boolean;\n\n  /**\n   * Deletes a value from the cache by its key.\n   *\n   * @param key - The key of the value to delete.\n   * @returns True if the value was successfully deleted, false otherwise.\n   */\n  delete(key: K): boolean | void;\n\n  /**\n   * Clears all values from the cache.\n   */\n  clear(): void;\n\n  /**\n   * The number of entries in the cache.\n   */\n  size: number;\n}\n"
  },
  {
    "path": "src/function/negate.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { negate } from './negate';\n\ndescribe('negate', () => {\n  it('should negate the given predicate function', () => {\n    expect(typeof negate(() => true)).toBe('function');\n    expect(negate(() => true)()).toBe(false);\n    expect(negate(() => false)()).toBe(true);\n\n    function isEven(n: number) {\n      return n % 2 === 0;\n    }\n    expect([1, 2, 3, 4, 5, 6].filter(negate(isEven))).toEqual([1, 3, 5]);\n  });\n});\n"
  },
  {
    "path": "src/function/negate.ts",
    "content": "/**\n * Creates a function that negates the result of the predicate function.\n *\n * @template F - The type of the function to negate.\n * @param {F} func - The function to negate.\n * @returns {F} The new negated function, which negates the boolean result of `func`.\n *\n * @example\n * const array = [1, 2, 3, 4, 5, 6];\n * const isEven = (n: number) => n % 2 === 0;\n * const result = array.filter(negate(isEven));\n * // result will be [1, 3, 5]\n */\nexport function negate<F extends (...args: any[]) => boolean>(func: F): F {\n  return ((...args: any[]) => !func(...args)) as F;\n}\n"
  },
  {
    "path": "src/function/noop.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { noop } from './noop';\n\ndescribe('noop', () => {\n  it('should be a function', () => {\n    expect(typeof noop).toBe('function');\n  });\n\n  it('should return undefined', () => {\n    expect(noop()).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "src/function/noop.ts",
    "content": "/**\n * A no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * noop(); // Does nothing\n *\n * @returns {void} This function does not return anything.\n */\nexport function noop(): void {}\n"
  },
  {
    "path": "src/function/once.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { once } from './once';\n\n// adjust the import path as necessary\n\ndescribe('once', () => {\n  it('should call the function only once', () => {\n    const func = vi.fn(() => 42);\n    const onceFunc = once(func);\n\n    expect(onceFunc()).toBe(42);\n    expect(onceFunc()).toBe(42);\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should work with functions returning undefined', () => {\n    const func = vi.fn(() => undefined);\n    const onceFunc = once(func);\n\n    expect(onceFunc()).toBeUndefined();\n    expect(onceFunc()).toBeUndefined();\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should handle functions with no return value', () => {\n    const func = vi.fn(() => {\n      console.log('Side effect');\n    });\n    const onceFunc = once(func);\n\n    expect(onceFunc()).toBeUndefined();\n    expect(onceFunc()).toBeUndefined();\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n});\n"
  },
  {
    "path": "src/function/once.ts",
    "content": "/**\n * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value of the first invocation.\n *\n * @template F - The type of the function.\n * @param {F} func - The function to restrict.\n * @returns {F} Returns the new restricted function.\n *\n * @example\n * const initialize = once(createApplication);\n *\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nexport function once<F extends (...args: any[]) => any>(func: F): F;\n\n/**\n * Creates a function that is restricted to invoking the provided function `func` once.\n * Repeated calls to the function will return the value from the first invocation.\n *\n * @template F - The type of function.\n * @param {F} func - The function to restrict.\n * @returns {F} A new function that invokes `func` once and caches the result.\n *\n * @example\n * const initialize = once(() => {\n *   console.log('Initialized!');\n *   return true;\n * });\n *\n * initialize(); // Logs: 'Initialized!' and returns true\n * initialize(); // Returns true without logging\n */\nexport function once<F extends (() => any) | ((...args: any[]) => void)>(func: F): F {\n  let called = false;\n  let cache: ReturnType<F>;\n\n  return function (...args: Parameters<F>): ReturnType<F> {\n    if (!called) {\n      called = true;\n      cache = func(...args);\n    }\n\n    return cache;\n  } as F;\n}\n"
  },
  {
    "path": "src/function/partial.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { partial } from './partial';\nimport { curry } from '../compat/function/curry';\n\nfunction identity(arg?: any): any {\n  return arg;\n}\n\ndescribe('partial', () => {\n  const { placeholder } = partial;\n  it('partial partially applies arguments', () => {\n    const par = partial(identity, 'a');\n    expect(par()).toBe('a');\n  });\n\n  it('partial creates a function that can be invoked with additional arguments', () => {\n    const fn = function (a: string, b: string) {\n      return [a, b];\n    };\n    const par = partial(fn, 'a');\n    expect(par('b')).toEqual(['a', 'b']);\n  });\n\n  it('partial works when there are no partially applied arguments and the created function is invoked without additional arguments', () => {\n    const fn = function () {\n      return arguments.length;\n    };\n    const par = partial(fn);\n    expect(par()).toBe(0);\n  });\n\n  it('partial works when there are no partially applied arguments and the created function is invoked with additional arguments', () => {\n    const par = partial(identity);\n    expect(par('a')).toBe('a');\n  });\n\n  it('partial supports placeholders', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (..._: any[]) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    const par = partial(fn, placeholder, 'b', placeholder) as any;\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c']);\n    expect(par('a')).toEqual(['a', 'b', undefined]);\n    expect(par()).toEqual([undefined, 'b', undefined]);\n\n    expect(par('a', 'c', 'd')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('partial creates a function with a length of 0', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (_a: string, _b: string, _c: string) {};\n    const par = partial(fn, 'a');\n    expect(par.length).toBe(0);\n  });\n\n  it('partial ensures new par is an instance of func', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const object = {};\n    const par = partial(Foo);\n\n    // @ts-expect-error - par is a constructor\n    expect(new par() instanceof Foo).toBe(true);\n    // @ts-expect-error - par is a constructor\n    expect(new par(true)).toBe(object);\n  });\n\n  it('partial clones metadata for created functions', () => {\n    function greet(greeting: string, name: string) {\n      return `${greeting} ${name}`;\n    }\n\n    const par1 = partial(greet, 'hi');\n    const par2 = partial(par1, 'barney');\n    const par3 = partial(par1, 'pebbles');\n\n    expect(par1('fred')).toBe('hi fred');\n    expect(par2()).toBe('hi barney');\n    expect(par3()).toBe('hi pebbles');\n  });\n\n  it(`partial should work with curried functions`, () => {\n    const fn = function (a: any, b: any, c: any) {\n        return a + b + c;\n      },\n      curried = curry(partial(fn, 1), 2);\n\n    expect(curried(2, 3)).toBe(6);\n    expect(curried(2)(3)).toBe(6);\n  });\n\n  it('partial should work with placeholders and curried functions', () => {\n    const fn = function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.from(arguments);\n      },\n      curried = curry(fn),\n      par = partial(curried, partial.placeholder, 'b', partial.placeholder, 'd');\n\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should create partialed function without copying prototype from arrow function', () => {\n    const arrowFn = (a: number, b: number) => a + b;\n    const partialed = partial(arrowFn, 10);\n\n    expect(partialed(5)).toBe(15);\n    expect(typeof partialed.prototype).toBe('object');\n  });\n});\n"
  },
  {
    "path": "src/function/partial.ts",
    "content": "/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @returns {function(): R} A new function that takes no arguments and returns the result of the original function.\n *\n * @example\n * const addOne = (x: number) => x + 1;\n * const addOneToFive = partial(addOne, 5);\n * console.log(addOneToFive()); // => 6\n */\nexport function partial<T1, R>(func: (arg1: T1) => R, arg1: T1): () => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @returns {function(arg2: T2): R} A new function that takes the second argument and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number) => x * y;\n * const double = partial(multiply, 2);\n * console.log(double(5)); // => 10\n */\nexport function partial<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg1: T1): (arg2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2): R} func The function to partially apply.\n * @param {Placeholder} placeholder The placeholder for the first argument.\n * @param {T2} arg2 The second argument to apply.\n * @returns {function(arg1: T1): R} A new function that takes the first argument and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting}, ${name}!`;\n * const greetWithHello = partial(greet, partial.placeholder, 'John');\n * console.log(greetWithHello('Hello')); // => 'Hello, John!'\n */\nexport function partial<T1, T2, R>(\n  func: (arg1: T1, arg2: T2) => R,\n  placeholder: Placeholder,\n  arg2: T2\n): (arg1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @returns {function(arg2: T2, arg3: T3): R} A new function that takes the second and third arguments and returns the result of the original function.\n *\n * @example\n * const sumThree = (a: number, b: number, c: number) => a + b + c;\n * const addFive = partial(sumThree, 5);\n * console.log(addFive(3, 2)); // => 10\n */\nexport function partial<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1): (arg2: T2, arg3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {T2} arg2 The second argument to apply.\n * @returns {function(arg1: T1, arg3: T3): R} A new function that takes the first and third arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting}, ${name}!`;\n * const greetWithPlaceholder = partial(greet, partial.placeholder, 'John');\n * console.log(greetWithPlaceholder('Hello')); // => 'Hello, John!'\n */\nexport function partial<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: Placeholder,\n  arg2: T2\n): (arg1: T1, arg3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @returns {function(arg1: T1, arg2: T2): R} A new function that takes the first and second arguments and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number, z: number) => x * y * z;\n * const multiplyWithPlaceholders = partial(multiply, partial.placeholder, partial.placeholder, 2);\n * console.log(multiplyWithPlaceholders(3, 4)); // => 24\n */\nexport function partial<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: Placeholder,\n  arg2: Placeholder,\n  arg3: T3\n): (arg1: T1, arg2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @returns {function(arg2: T2): R} A new function that takes the second argument and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting}, ${name}!`;\n * const greetWithPlaceholder = partial(greet, 'Hello', partial.placeholder);\n * console.log(greetWithPlaceholder('John')); // => 'Hello, John!'\n */\nexport function partial<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3\n): (arg2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3): R} func The function to partially apply.\n * @param {Placeholder} arg1 The first argument to apply.\n * @param {T2} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @returns {function(arg2: T2): R} A new function that takes the second argument and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string) => `${greeting}, ${name}!`;\n * const greetWithPlaceholder = partial(greet, 'Hello', partial.placeholder);\n * console.log(greetWithPlaceholder('John')); // => 'Hello, John!'\n */\nexport function partial<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  plc1: Placeholder,\n  arg2: T2,\n  arg3: T3\n): (arg1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @returns {function(arg2: T2): R} A new function that takes the second argument and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number, z: number, w: number) => x * y * z * w;\n * const double = partial(multiply, 2);\n * console.log(double(5, 4, 3)); // => 120\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1\n): (arg2: T2, arg3: T3, arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg1: T1, arg2: T2): R} A new function that takes the first and second arguments and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number, z: number, w: number) => x * y * z * w;\n * const multiplyWithPlaceholders = partial(multiply, partial.placeholder, partial.placeholder, 2, 3);\n * console.log(multiplyWithPlaceholders(4, 5)); // => 120\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: Placeholder,\n  arg2: Placeholder,\n  arg3: T3,\n  arg4: T4\n): (arg1: T1, arg2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @returns {function(arg3: T3, arg4: T4): R} A new function that takes the third and fourth arguments and returns the result of the original function.\n *\n * @example\n * const sumFour = (a: number, b: number, c: number, d: number) => a + b + c + d;\n * const addOneAndTwo = partial(sumFour, 1, 2);\n * console.log(addOneAndTwo(3, 4)); // => 10\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2\n): (arg3: T3, arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg2: T2, arg4: T4): R} A new function that takes the second and fourth arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;\n * const greetWithPlaceholder = partial(greet, 'Hello', partial.placeholder, '!');\n * console.log(greetWithPlaceholder('John')); // => 'Hello, John!'\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3\n): (arg2: T2, arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {T2} arg2 The second argument to apply.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg1: T1, arg3: T3): R} A new function that takes the first and third arguments and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number, z: number, w: number) => x * y * z * w;\n * const multiplyWithPlaceholder = partial(multiply, partial.placeholder, 2, 3);\n * console.log(multiplyWithPlaceholder(4)); // => 24\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: Placeholder,\n  arg2: T2,\n  arg3: T3\n): (arg1: T1, arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {T2} arg2 The second argument to apply.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg1: T1, arg3: T3): R} A new function that takes the first and third arguments and returns the result of the original function.\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: Placeholder,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: T4\n): (arg1: T1, arg3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg1: T1, arg2: T2): R} A new function that takes the first and second arguments and returns the result of the original function.\n *\n * @example\n * const multiply = (x: number, y: number, z: number, w: number) => x * y * z * w;\n * const multiplyWithPlaceholders = partial(multiply, partial.placeholder, partial.placeholder, 2, 3);\n * console.log(multiplyWithPlaceholders(4, 5)); // => 120\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: Placeholder,\n  arg2: Placeholder,\n  arg3: T3,\n  arg4: T4\n): (arg1: T1, arg2: T2) => R;\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @param {T3} arg3 The third argument to apply.\n * @returns {function(arg4: T4): R} A new function that takes the fourth argument and returns the result of the original function.\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3\n): (arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg3: T3): R} A new function that takes the third argument and returns the result of the original function.\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: T4\n): (arg3: T3) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg2: T2): R} A new function that takes the second argument and returns the result of the original function.\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3,\n  arg4: T4\n): (arg2: T2) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, arg3: T3, arg4: T4): R} func The function to partially apply.\n * @param {Placeholder} arg1 The placeholder for the first argument.\n * @param {T2} arg2 The second argument to apply.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(arg1: T1): R} A new function that takes the first argument and returns the result of the original function.\n */\nexport function partial<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: Placeholder,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): (arg1: T1) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template TS The types of the arguments.\n * @template R The return type of the function.\n * @param {function(...args: TS): R} func The function to partially apply.\n * @returns {function(...args: TS): R} A new function that takes the same arguments as the original function.\n *\n * @example\n * const add = (...numbers: number[]) => numbers.reduce((sum, n) => sum + n, 0);\n * const addFive = partial(add, 5);\n * console.log(addFive(1, 2, 3)); // => 11\n */\nexport function partial<TS extends any[], R>(func: (...args: TS) => R): (...args: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template TS The types of the arguments.\n * @template T1 The type of the first argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, ...args: TS): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @returns {function(...args: TS): R} A new function that takes the remaining arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, ...names: string[]) => `${greeting}, ${names.join(', ')}!`;\n * const greetHello = partial(greet, 'Hello');\n * console.log(greetHello('Alice', 'Bob')); // => 'Hello, Alice, Bob!'\n */\nexport function partial<TS extends any[], T1, R>(func: (arg1: T1, ...args: TS) => R, arg1: T1): (...args: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template TS The types of the arguments.\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {function(arg1: T1, arg2: T2, ...args: TS): R} func The function to partially apply.\n * @param {T1} arg1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @returns {function(...args: TS): R} A new function that takes the remaining arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;\n * const greetWithHello = partial(greet, 'Hello', '!');\n * console.log(greetWithHello('John')); // => 'Hello, John!'\n */\nexport function partial<TS extends any[], T1, T2, R>(\n  func: (arg1: T1, arg2: T2, ...args: TS) => R,\n  t1: T1,\n  arg2: T2\n): (...args: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template TS The types of the arguments.\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {function(t1: T1, arg2: T2, arg3: T3, ...args: TS): R} func The function to partially apply.\n * @param {T1} t1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @param {T3} arg3 The third argument to apply.\n * @returns {function(...args: TS): R} A new function that takes the remaining arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;\n * const greetWithHello = partial(greet, 'Hello', 'John', '!');\n * console.log(greetWithHello()); // => 'Hello, John!'\n */\nexport function partial<TS extends any[], T1, T2, T3, R>(\n  func: (t1: T1, arg2: T2, arg3: T3, ...args: TS) => R,\n  t1: T1,\n  arg2: T2,\n  arg3: T3\n): (...args: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template TS The types of the arguments.\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {function(t1: T1, arg2: T2, arg3: T3, arg4: T4, ...args: TS): R} func The function to partially apply.\n * @param {T1} t1 The first argument to apply.\n * @param {T2} arg2 The second argument to apply.\n * @param {T3} arg3 The third argument to apply.\n * @param {T4} arg4 The fourth argument to apply.\n * @returns {function(...args: TS): R} A new function that takes the remaining arguments and returns the result of the original function.\n *\n * @example\n * const greet = (greeting: string, name: string, punctuation: string) => `${greeting}, ${name}${punctuation}`;\n * const greetWithHello = partial(greet, 'Hello', 'John', '!');\n * console.log(greetWithHello()); // => 'Hello, John!'\n */\nexport function partial<TS extends any[], T1, T2, T3, T4, R>(\n  func: (t1: T1, arg2: T2, arg3: T3, arg4: T4, ...args: TS) => R,\n  t1: T1,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): (...args: TS) => R;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply.\n * @param {...any[]} partialArgs The arguments to be partially applied.\n * @returns {function(...args: any[]): ReturnType<F>} A new function that takes the remaining arguments and returns the result of the original function.\n *\n * @example\n * const add = (...numbers: number[]) => numbers.reduce((sum, n) => sum + n, 0);\n * const addFive = partial(add, 5);\n * console.log(addFive(1, 2, 3)); // => 11\n */\nexport function partial<F extends (...args: any[]) => any>(\n  func: F,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F>;\n\n/**\n * Creates a function that invokes `func` with `partialArgs` prepended to the arguments it receives. This method is like `bind` except it does not alter the `this` binding.\n *\n * The partial.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply arguments to.\n * @param {any[]} partialArgs The arguments to be partially applied.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new partially applied function.\n *\n * @example\n * function greet(greeting, name) {\n *   return greeting + ' ' + name;\n * }\n *\n * const sayHelloTo = partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * const greetFred = partial(greet, partial.placeholder, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\nexport function partial<F extends (...args: any[]) => any>(\n  func: F,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  return partialImpl<F, Placeholder>(func, placeholderSymbol, ...partialArgs);\n}\n\nexport function partialImpl<F extends (...args: any[]) => any, P>(\n  func: F,\n  placeholder: P,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  const partialed = function (this: unknown, ...providedArgs: any[]) {\n    let providedArgsIndex = 0;\n\n    const substitutedArgs: any[] = partialArgs\n      .slice()\n      .map(arg => (arg === placeholder ? providedArgs[providedArgsIndex++] : arg));\n\n    const remainingArgs = providedArgs.slice(providedArgsIndex);\n\n    return func.apply(this, substitutedArgs.concat(remainingArgs));\n  };\n\n  if (func.prototype) {\n    partialed.prototype = Object.create(func.prototype);\n  }\n\n  return partialed;\n}\n\nconst placeholderSymbol: unique symbol = Symbol('partial.placeholder');\npartial.placeholder = placeholderSymbol;\n\ntype Placeholder = typeof placeholderSymbol;\n"
  },
  {
    "path": "src/function/partialRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { identity } from './identity';\nimport { partialRight } from './partialRight';\nimport { curry } from '../compat/function/curry';\n\ndescribe('partialRight', () => {\n  const { placeholder } = partialRight;\n  it('partialRight partially applies arguments', () => {\n    const par = partialRight(identity, 'a');\n    expect(par()).toBe('a');\n  });\n\n  it('partialRight creates a function that can be invoked with additional arguments', () => {\n    const fn = function (a: string, b: string) {\n      return [a, b];\n    };\n    const par = partialRight(fn, 'a');\n    expect(par('b')).toEqual(['b', 'a']);\n  });\n\n  it('partialRight works when there are no partially applied arguments and the created function is invoked without additional arguments', () => {\n    const fn = function () {\n      return arguments.length;\n    };\n    const par = partialRight(fn);\n    expect(par()).toBe(0);\n  });\n\n  it('partialRight works when there are no partially applied arguments and the created function is invoked with additional arguments', () => {\n    const par = partialRight(identity);\n    expect(par('a')).toBe('a');\n  });\n\n  it('partialRight supports placeholders', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (..._: any[]) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    };\n    let par: any = partialRight(fn, placeholder, 'b', placeholder);\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c']);\n    expect(par('a')).toEqual(['a', 'b', undefined]);\n    expect(par()).toEqual([undefined, 'b', undefined]);\n\n    par = partialRight(fn, placeholder, 'c', placeholder);\n    expect(par('a', 'b', 'd')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('partialRight creates a function with a length of 0', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const fn = function (_a: string, _b: string, _c: string) {};\n    const par = partialRight(fn, 'a');\n    expect(par.length).toBe(0);\n  });\n\n  it('partialRight ensures new par is an instance of func', () => {\n    function Foo(value: unknown) {\n      return value && object;\n    }\n\n    const object = {};\n    const par = partialRight(Foo);\n\n    // @ts-expect-error - par is a constructor\n    expect(new par() instanceof Foo).toBe(true);\n    // @ts-expect-error - par is a constructor\n    expect(new par(true)).toBe(object);\n  });\n\n  it('partialRight clones metadata for created functions', () => {\n    function greet(greeting: string, name: string) {\n      return `${greeting} ${name}`;\n    }\n\n    const par1 = partialRight(greet, 'hi');\n    const par2 = partialRight(par1, 'barney');\n    const par3 = partialRight(par1, 'pebbles');\n\n    expect(par1('fred')).toBe('fred hi');\n    expect(par2()).toBe('barney hi');\n    expect(par3()).toBe('pebbles hi');\n  });\n\n  it(`partialRight should work with curried functions`, () => {\n    const fn = function (a: any, b: any, c: any) {\n        return a + b + c;\n      },\n      curried = curry(partialRight(fn, 1), 2);\n\n    expect(curried(2, 3)).toBe(6);\n    expect(curried(2)(3)).toBe(6);\n  });\n\n  it('partialRight should work with placeholders and curried functions', () => {\n    const fn = function () {\n        // eslint-disable-next-line prefer-rest-params\n        return Array.from(arguments);\n      },\n      curried = curry(fn),\n      par = partialRight(curried, partialRight.placeholder, 'b', partialRight.placeholder, 'd') as any;\n\n    expect(par('a', 'c')).toEqual(['a', 'b', 'c', 'd']);\n  });\n\n  it('should create partialed function without copying prototype from arrow function', () => {\n    const arrowFn = (a: number, b: number) => a + b;\n    const partialed = partialRight(arrowFn, 10);\n\n    expect(partialed(5)).toBe(15);\n    expect(typeof partialed.prototype).toBe('object');\n  });\n});\n"
  },
  {
    "path": "src/function/partialRight.ts",
    "content": "/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template R The return type of the function.\n * @param {() => R} func The function to invoke.\n * @returns {() => R} Returns the new function.\n * @example\n * const getValue = () => 42;\n * const getValueFunc = partialRight(getValue);\n * console.log(getValueFunc()); // => 42\n */\nexport function partialRight<R>(func: () => R): () => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template R The return type of the function.\n * @param {(arg1: T1) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @returns {() => R} Returns the new partially applied function.\n * @example\n * const addOne = (num: number) => num + 1;\n * const addOneFunc = partialRight(addOne, 1);\n * console.log(addOneFunc()); // => 2\n */\nexport function partialRight<T1, R>(func: (arg1: T1) => R, arg1: T1): () => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template R The return type of the function.\n * @param {(arg1: T1) => R} func The function to partially apply arguments to.\n * @returns {(arg1: T1) => R} Returns the new partially applied function.\n * @example\n * const multiplyBy = (factor: number) => (num: number) => num * factor;\n * const double = partialRight(multiplyBy(2));\n * console.log(double(5)); // => 10\n */\nexport function partialRight<T1, R>(func: (arg1: T1) => R): (arg1: T1) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template R The return type of the function.\n * @param {(arg1: T1) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @returns {() => R} Returns the new partially applied function.\n * @example\n * const greet = (name: string) => `Hello, ${name}!`;\n * const greetJohn = partialRight(greet, 'John');\n * console.log(greetJohn()); // => 'Hello, John!'\n */\nexport function partialRight<T1, R>(func: (arg1: T1) => R, arg1: T1): () => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.\n * @returns {(arg1: T1, arg2: T2) => R} Returns the new partially applied function.\n * @example\n * const subtract = (a: number, b: number) => a - b;\n * const subtractFive = partialRight(subtract);\n * console.log(subtractFive(10, 5)); // => 5\n */\nexport function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R): (arg1: T1, arg2: T2) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @returns {(arg2: T2) => R} Returns the new partially applied function.\n * @example\n * const concat = (a: string, b: string) => a + b;\n * const concatWithHello = partialRight(concat, 'Hello', partialRight.placeholder);\n * console.log(concatWithHello(' World!')); // => 'Hello World!'\n */\nexport function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg1: T1, arg2: Placeholder): (arg2: T2) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @returns {(arg1: T1) => R} Returns the new partially applied function.\n * @example\n * const divide = (a: number, b: number) => a / b;\n * const divideByTwo = partialRight(divide, 2);\n * console.log(divideByTwo(10)); // => 5\n */\nexport function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg2: T2): (arg1: T1) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @returns {() => R} Returns the new partially applied function.\n * @example\n * const multiply = (a: number, b: number) => a * b;\n * const multiplyByThreeAndFour = partialRight(multiply, 3, 4);\n * console.log(multiplyByThreeAndFour()); // => 12\n */\nexport function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg1: T1, arg2: T2): () => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @returns {(arg1: T1, arg2: T2, arg3: T3) => R} Returns the new partially applied function.\n * @example\n * const sumThree = (a: number, b: number, c: number) => a + b + c;\n * const sumWithFive = partialRight(sumThree);\n * console.log(sumWithFive(1, 2, 5)); // => 8\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R\n): (arg1: T1, arg2: T2, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @returns {(arg2: T2, arg3: T3) => R} Returns the new partially applied function.\n * @example\n * const formatDate = (day: number, month: number, year: number) => `${day}/${month}/${year}`;\n * const formatDateWithDay = partialRight(formatDate, 1, partialRight.placeholder, partialRight.placeholder);\n * console.log(formatDateWithDay(12, 2023)); // => '1/12/2023'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: Placeholder\n): (arg2: T2, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @returns {(arg1: T1, arg3: T3) => R} Returns the new partially applied function.\n * @example\n * const createUser = (name: string, age: number, country: string) => `${name}, ${age} years old from ${country}`;\n * const createUserFromUSA = partialRight(createUser, 'USA', partialRight.placeholder);\n * console.log(createUserFromUSA('John', 30)); // => 'John, 30 years old from USA'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg2: T2,\n  arg3: Placeholder\n): (arg1: T1, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @returns {(arg3: T3) => R} Returns the new partially applied function.\n * @example\n * const logMessage = (level: string, message: string, timestamp: string) => `[${level}] ${message} at ${timestamp}`;\n * const logError = partialRight(logMessage, 'ERROR', '2023-10-01');\n * console.log(logError('Something went wrong!')); // => '[ERROR] Something went wrong! at 2023-10-01'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: Placeholder\n): (arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T3} arg3 The third argument to be partially applied.\n * @returns {(arg1: T1, arg2: T2) => R} Returns the new partially applied function.\n * @example\n * const calculateArea = (length: number, width: number) => length * width;\n * const calculateAreaWithWidth = partialRight(calculateArea, 5);\n * console.log(calculateAreaWithWidth(10)); // => 50\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg3: T3\n): (arg1: T1, arg2: T2) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to be partially applied.\n * @returns {(arg2: T2) => R} Returns the new partially applied function.\n * @example\n * const formatCurrency = (amount: number, currency: string) => `${amount} ${currency}`;\n * const formatUSD = partialRight(formatCurrency, 100, partialRight.placeholder);\n * console.log(formatUSD('USD')); // => '100 USD'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3\n): (arg2: T2) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {T3} arg3 The third argument to be partially applied.\n * @returns {(arg1: T1) => R} Returns the new partially applied function.\n * @example\n * const createProfile = (name: string, age: number, country: string) => `${name}, ${age} from ${country}`;\n * const createProfileFromCanada = partialRight(createProfile, 'Canada', 'John');\n * console.log(createProfileFromCanada(30)); // => 'John, 30 from Canada'\n */\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg2: T2,\n  arg3: T3\n): (arg1: T1) => R;\n\nexport function partialRight<T1, T2, T3, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3\n): () => R;\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @returns {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} Returns a new function that takes four arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R\n): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg2: T2, arg3: T3, arg4: T4) => R} Returns a new function that takes the second, third, and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: Placeholder,\n  arg4: Placeholder\n): (arg2: T2, arg3: T3, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg1: T1, arg3: T3, arg4: T4) => R} Returns a new function that takes the first, third, and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: Placeholder\n): (arg1: T1, arg3: T3, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg3: T3, arg4: T4) => R} Returns a new function that takes the third and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: Placeholder\n): (arg3: T3, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg1: T1, arg2: T2, arg4: T4) => R} Returns a new function that takes the first, second, and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg3: T3,\n  arg4: Placeholder\n): (arg1: T1, arg2: T2, arg4: T4) => R;\n\n/**\n * Creates a function that invokes `func` with the first argument, a placeholder for the second argument,\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg2: T2, arg4: T4) => R} Returns a new function that takes the second and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3,\n  arg4: Placeholder\n): (arg2: T2, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg1: T1, arg4: T4) => R} Returns a new function that takes the first and fourth arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg2: T2,\n  arg3: T3,\n  arg4: Placeholder\n): (arg1: T1, arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {Placeholder} arg4 The placeholder for the fourth argument.\n * @returns {(arg4: T4) => R} Returns a new function that takes the fourth argument.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3,\n  arg4: Placeholder\n): (arg4: T4) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg1: T1, arg2: T2, arg3: T3) => R} Returns a new function that takes the first, second, and third arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg4: T4\n): (arg1: T1, arg2: T2, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg2: T2, arg3: T3) => R} Returns a new function that takes the second and third arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: Placeholder,\n  arg4: T4\n): (arg2: T2, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg1: T1, arg3: T3) => R} Returns a new function that takes the first and third arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: T4\n): (arg1: T1, arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {Placeholder} arg3 The placeholder for the third argument.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg3: T3) => R} Returns a new function that takes the third argument.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: Placeholder,\n  arg4: T4\n): (arg3: T3) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg1: T1, arg2: T2) => R} Returns a new function that takes the first and second arguments.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg3: T3,\n  arg4: T4\n): (arg1: T1, arg2: T2) => R;\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {Placeholder} arg2 The placeholder for the second argument.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg2: T2) => R} Returns a new function that takes the second argument.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: Placeholder,\n  arg3: T3,\n  arg4: T4\n): (arg2: T2) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {(arg1: T1) => R} Returns a new function that takes the first argument.\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): (arg1: T1) => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template T1 The type of the first argument.\n * @template T2 The type of the second argument.\n * @template T3 The type of the third argument.\n * @template T4 The type of the fourth argument.\n * @template R The return type of the function.\n * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.\n * @param {T1} arg1 The first argument to be partially applied.\n * @param {T2} arg2 The second argument to be partially applied.\n * @param {T3} arg3 The third argument to be partially applied.\n * @param {T4} arg4 The fourth argument to be partially applied.\n * @returns {() => R} Returns the new partially applied function.\n * @example\n * const concatenate = (a: string, b: string, c: string, d: string) => a + b + c + d;\n * const concatenateHelloWorld = partialRight(concatenate, 'Hello', ' ', 'World', '!');\n * console.log(concatenateHelloWorld()); // => 'Hello World!'\n */\nexport function partialRight<T1, T2, T3, T4, R>(\n  func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R,\n  arg1: T1,\n  arg2: T2,\n  arg3: T3,\n  arg4: T4\n): () => R;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply arguments to.\n * @param {...any[]} args The arguments to be partially applied.\n * @returns {function(...args: any[]): ReturnType<F>} Returns the new partially applied function.\n * @example\n * const log = (...messages: string[]) => console.log(...messages);\n * const logError = partialRight(log, 'Error:');\n * logError('Something went wrong!'); // => 'Error: Something went wrong!'\n */\nexport function partialRight(func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;\n\n/**\n * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.\n *\n * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.\n *\n * Note: This method doesn't set the `length` property of partially applied functions.\n *\n * @template F The type of the function to partially apply.\n * @param {F} func The function to partially apply arguments to.\n * @param {any[]} partialArgs The arguments to be partially applied.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new partially applied function.\n *\n * @example\n * function greet(greeting, name) {\n *   return greeting + ' ' + name;\n * }\n *\n * const greetFred = partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * const sayHelloTo = partialRight(greet, 'hello', partialRight.placeholder);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\nexport function partialRight<F extends (...args: any[]) => any>(\n  func: F,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  return partialRightImpl<F, Placeholder>(func, placeholderSymbol, ...partialArgs);\n}\n\nexport function partialRightImpl<F extends (...args: any[]) => any, P>(\n  func: F,\n  placeholder: P,\n  ...partialArgs: any[]\n): (...args: any[]) => ReturnType<F> {\n  const partialedRight = function (this: any, ...providedArgs: any[]) {\n    const placeholderLength = partialArgs.filter(arg => arg === placeholder).length;\n    const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);\n    const remainingArgs: any[] = providedArgs.slice(0, rangeLength);\n\n    let providedArgsIndex = rangeLength;\n\n    const substitutedArgs = partialArgs\n      .slice()\n      .map(arg => (arg === placeholder ? providedArgs[providedArgsIndex++] : arg));\n\n    return func.apply(this, remainingArgs.concat(substitutedArgs));\n  };\n\n  if (func.prototype) {\n    partialedRight.prototype = Object.create(func.prototype);\n  }\n\n  return partialedRight;\n}\n\nconst placeholderSymbol: unique symbol = Symbol('partialRight.placeholder');\npartialRight.placeholder = placeholderSymbol;\n\ntype Placeholder = typeof placeholderSymbol;\n"
  },
  {
    "path": "src/function/rest.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { rest } from './rest';\n\ndescribe('rest', () => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  function fn(_a: unknown, _b: unknown, _c: unknown) {\n    // eslint-disable-next-line prefer-rest-params\n    return Array.from(arguments);\n  }\n\n  it('should apply a rest parameter to `func`', () => {\n    const restFn = rest(fn);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, 2, [3, 4]]);\n  });\n\n  it('should work with `start`', () => {\n    const restFn = rest(fn, 1);\n    expect(restFn(1, 2, 3, 4)).toEqual([1, [2, 3, 4]]);\n  });\n\n  it('should use an empty array when `start` is not reached', () => {\n    const restFn = rest(fn);\n    expect(restFn(1)).toEqual([1, undefined, []]);\n  });\n\n  it('should work on functions with more than three parameters', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const restFn = rest(function (_a: unknown, _b: unknown, _c: unknown, _d: unknown) {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    });\n\n    expect(restFn(1, 2, 3, 4, 5)).toEqual([1, 2, 3, [4, 5]]);\n  });\n});\n"
  },
  {
    "path": "src/function/rest.ts",
    "content": "/**\n * Creates a function that transforms the arguments of the provided function `func`.\n * The transformed arguments are passed to `func` such that the arguments starting from a specified index\n * are grouped into an array, while the previous arguments are passed as individual elements.\n *\n * @template F - The type of the function being transformed.\n * @param {F} func - The function whose arguments are to be transformed.\n * @param {number} [startIndex=func.length - 1] - The index from which to start grouping the remaining arguments into an array.\n *                                            Defaults to `func.length - 1`, grouping all arguments after the last parameter.\n * @returns {(...args: any[]) => ReturnType<F>} A new function that, when called, returns the result of calling `func` with the transformed arguments.\n *\n * The transformed arguments are:\n * - The first `start` arguments as individual elements.\n * - The remaining arguments from index `start` onward grouped into an array.\n * @example\n * function fn(a, b, c) {\n *   return [a, b, c];\n * }\n *\n * // Using default start index (func.length - 1, which is 2 in this case)\n * const transformedFn = rest(fn);\n * console.log(transformedFn(1, 2, 3, 4)); // [1, 2, [3, 4]]\n *\n * // Using start index 1\n * const transformedFnWithStart = rest(fn, 1);\n * console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]\n *\n * // With fewer arguments than the start index\n * console.log(transformedFn(1)); // [1, undefined, []]\n */\nexport function rest<F extends (...args: any[]) => any>(\n  func: F,\n  startIndex = func.length - 1\n): (...args: any[]) => ReturnType<F> {\n  return function (this: any, ...args: any[]) {\n    const rest = args.slice(startIndex);\n    const params = args.slice(0, startIndex);\n    while (params.length < startIndex) {\n      params.push(undefined);\n    }\n    return func.apply(this, [...params, rest]);\n  };\n}\n"
  },
  {
    "path": "src/function/retry.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { performance } from 'node:perf_hooks';\nimport { retry } from './retry';\n\ndescribe('retry', () => {\n  it('should resolve successfully on the first attempt', async () => {\n    const func = vi.fn().mockResolvedValue('success');\n    const result = await retry(func);\n    expect(result).toBe('success');\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should retry the specified number of times and eventually resolve', async () => {\n    const func = vi\n      .fn()\n      .mockRejectedValueOnce(new Error('failure'))\n      .mockRejectedValueOnce(new Error('failure'))\n      .mockResolvedValue('success');\n    const result = await retry(func, 3);\n    expect(result).toBe('success');\n    expect(func).toHaveBeenCalledTimes(3);\n  });\n\n  it('should retry with the specified delay between attempts', async () => {\n    const func = vi.fn().mockRejectedValueOnce(new Error('failure')).mockResolvedValue('success');\n    const delay = 100;\n    const start = performance.now();\n    const result = await retry(func, { delay, retries: 2 });\n    const end = performance.now();\n    expect(result).toBe('success');\n    expect(func).toHaveBeenCalledTimes(2);\n    // Date.now() has millisecond precision but not microsecond precision, so the result might be 99ms due to rounding.\n    // Date.now() is also *not* guaranteed to increment every millisecond - on some systems, it may tick every ~4ms.\n    expect(end - start).toBeGreaterThanOrEqual(delay - 1);\n  });\n\n  it('should retry with a dynamic delay function based on attempt count', async () => {\n    const func = vi\n      .fn()\n      .mockRejectedValueOnce(new Error('failure'))\n      .mockRejectedValueOnce(new Error('failure'))\n      .mockResolvedValue('success');\n\n    const delays: number[] = [];\n    const delayFn = vi.fn(attempt => {\n      const d = attempt * 50;\n      delays.push(d);\n      return d;\n    });\n\n    const start = performance.now();\n    const result = await retry(func, { delay: delayFn, retries: 3 });\n    const end = performance.now();\n\n    const totalDelay = delays.reduce((sum, d) => sum + d, 0);\n\n    expect(result).toBe('success');\n    expect(func).toHaveBeenCalledTimes(3);\n    expect(end - start).toBeGreaterThanOrEqual(totalDelay);\n  });\n\n  it('should throw an error after the specified number of retries', async () => {\n    const func = vi.fn().mockRejectedValue(new Error('failure'));\n    await expect(retry(func, 3)).rejects.toThrow('failure');\n    expect(func).toHaveBeenCalledTimes(4);\n  });\n\n  it('should abort the retry operation if the signal is already aborted', async () => {\n    const func = vi.fn().mockRejectedValue(new Error('failure'));\n    const controller = new AbortController();\n    const signal = controller.signal;\n    controller.abort();\n    await expect(retry(func, { retries: 5, signal })).rejects.toThrow(\n      'The retry operation was aborted due to an abort signal.'\n    );\n    expect(func).toHaveBeenCalledTimes(0);\n  });\n\n  it('should retry when shouldRetry returns true', async () => {\n    const error = { status: 500, message: 'Server Error' };\n    const func = vi.fn().mockRejectedValueOnce(error).mockResolvedValue('success');\n    const shouldRetry = vi.fn((err: unknown) => (err as { status: number }).status >= 500);\n\n    const result = await retry(func, { retries: 3, shouldRetry });\n\n    expect(result).toBe('success');\n    expect(func).toHaveBeenCalledTimes(2);\n    expect(shouldRetry).toHaveBeenCalledWith(error, 0);\n  });\n\n  it('should not retry when shouldRetry returns false', async () => {\n    const error = { status: 400, message: 'Bad Request' };\n    const func = vi.fn().mockRejectedValue(error);\n    const shouldRetry = vi.fn((err: unknown) => (err as { status: number }).status >= 500);\n\n    await expect(retry(func, { retries: 3, shouldRetry })).rejects.toEqual(error);\n    expect(func).toHaveBeenCalledTimes(1);\n    expect(shouldRetry).toHaveBeenCalledWith(error, 0);\n  });\n\n  it('should pass attempt number to shouldRetry', async () => {\n    const error = new Error('failure');\n    const func = vi.fn().mockRejectedValue(error);\n    const shouldRetry = vi.fn((_err: unknown, attempt: number) => attempt < 2);\n\n    await expect(retry(func, { retries: 5, shouldRetry })).rejects.toThrow('failure');\n    expect(func).toHaveBeenCalledTimes(3);\n    expect(shouldRetry).toHaveBeenCalledWith(error, 0);\n    expect(shouldRetry).toHaveBeenCalledWith(error, 1);\n    expect(shouldRetry).toHaveBeenCalledWith(error, 2);\n  });\n});\n"
  },
  {
    "path": "src/function/retry.ts",
    "content": "import { delay as delayToolkit } from '../promise/delay.ts';\n\ninterface RetryOptions {\n  /**\n   * Delay between retries. Can be a static number (milliseconds) or a function\n   * that computes delay dynamically based on the current attempt.\n   *\n   * @default 0\n   * @example\n   * delay: (attempts) => attempt * 50\n   */\n  delay?: number | ((attempts: number) => number);\n\n  /**\n   * The number of retries to attempt.\n   * @default Number.POSITIVE_INFINITY\n   */\n  retries?: number;\n\n  /**\n   * An AbortSignal to cancel the retry operation.\n   */\n  signal?: AbortSignal;\n\n  /**\n   * A function that determines whether to retry based on the error and attempt number.\n   * If not provided, all errors will trigger a retry.\n   *\n   * @param {unknown} error - The error that occurred.\n   * @param {number} attempt - The current attempt number (0-indexed).\n   * @returns {boolean} Whether to retry.\n   *\n   * @example\n   * shouldRetry: (error, attempt) => error.status >= 500\n   */\n  shouldRetry?: (error: unknown, attempt: number) => boolean;\n}\n\nconst DEFAULT_DELAY = 0;\nconst DEFAULT_RETRIES = Number.POSITIVE_INFINITY;\nconst DEFAULT_SHOULD_RETRY = () => true;\n\n/**\n * Retries a function that returns a promise until it resolves successfully.\n *\n * @template T\n * @param {() => Promise<T>} func - The function to retry.\n * @returns {Promise<T>} A promise that resolves with the value of the successful function call.\n *\n * @example\n * // Basic usage with default retry options\n * retry(() => fetchData()).then(data => console.log(data));\n */\nexport async function retry<T>(func: () => Promise<T>): Promise<T>;\n\n/**\n * Retries a function that returns a promise a specified number of times.\n *\n * @template T\n * @param {() => Promise<T>} func - The function to retry. It should return a promise.\n * @param {number} retries - The number of retries to attempt. Default is Infinity.\n * @returns {Promise<T>} A promise that resolves with the value of the successful function call.\n *\n * @example\n * // Retry a function up to 3 times\n * retry(() => fetchData(), 3).then(data => console.log(data));\n */\nexport async function retry<T>(func: () => Promise<T>, retries: number): Promise<T>;\n\n/**\n * Retries a function that returns a promise with specified options.\n *\n * @template T\n * @param {() => Promise<T>} func - The function to retry. It should return a promise.\n * @param {RetryOptions} options - Options to configure the retry behavior.\n * @param {number | ((attempts: number) => number)} [options.delay=0] - Delay(milliseconds) between retries.\n * @param {number} [options.retries=Infinity] - The number of retries to attempt.\n * @param {AbortSignal} [options.signal] - An AbortSignal to cancel the retry operation.\n * @param {(error: unknown, attempt: number) => boolean} [options.shouldRetry] - A function that determines whether to retry.\n * @returns {Promise<T>} A promise that resolves with the value of the successful function call.\n *\n * @example\n * // Retry a function with a delay of 1000ms between attempts\n * retry(() => fetchData(), { delay: 1000, times: 5 }).then(data => console.log(data));\n *\n * @example\n * // Retry a function with a fixed delay\n * retry(() => fetchData(), { delay: 1000, retries: 5 });\n *\n * // Retry a function with a delay increasing linearly by 50ms per attempt\n * retry(() => fetchData(), { delay: (attempts) => attempt * 50, retries: 5 });\n *\n * @example\n * // Retry a function with exponential backoff + jitter (max delay 10 seconds)\n * retry(() => fetchData(), {\n *   delay: (attempts) => Math.min(Math.random() * 100 * 2 ** attempts, 10000),\n *   retries: 5\n * });\n */\nexport async function retry<T>(func: () => Promise<T>, options: RetryOptions): Promise<T>;\n\n/**\n * Retries a function that returns a promise with specified options.\n *\n * @template T\n * @param {() => Promise<T>} func - The function to retry. It should return a promise.\n * @param {number | RetryOptions} [_options] - Either the number of retries or an options object.\n * @returns {Promise<T>} A promise that resolves with the value of the successful function call.\n */\nexport async function retry<T>(func: () => Promise<T>, _options?: number | RetryOptions): Promise<T> {\n  let delay: number | ((attempts: number) => number);\n  let retries: number;\n  let signal: AbortSignal | undefined;\n  let shouldRetry: (error: unknown, attempt: number) => boolean;\n\n  if (typeof _options === 'number') {\n    delay = DEFAULT_DELAY;\n    retries = _options;\n    signal = undefined;\n    shouldRetry = DEFAULT_SHOULD_RETRY;\n  } else {\n    delay = _options?.delay ?? DEFAULT_DELAY;\n    retries = _options?.retries ?? DEFAULT_RETRIES;\n    signal = _options?.signal;\n    shouldRetry = _options?.shouldRetry ?? DEFAULT_SHOULD_RETRY;\n  }\n\n  let error;\n\n  for (let attempts = 0; attempts <= retries; attempts++) {\n    if (signal?.aborted) {\n      throw error ?? new Error(`The retry operation was aborted due to an abort signal.`);\n    }\n\n    try {\n      return await func();\n    } catch (err) {\n      error = err;\n\n      // Determine if we should retry based on the provided shouldRetry function\n      if (!shouldRetry(err, attempts)) {\n        throw err;\n      }\n\n      const currentDelay = typeof delay === 'function' ? delay(attempts) : delay;\n      await delayToolkit(currentDelay);\n    }\n  }\n\n  throw error;\n}\n"
  },
  {
    "path": "src/function/spread.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { spread } from './spread';\n\nfunction add(a: number, b: number): number {\n  return a + b;\n}\n\nfunction greet(name: string, greeting = 'Hello'): string {\n  return `${greeting}, ${name}!`;\n}\n\n// Tests\ndescribe('spread', () => {\n  it('should correctly transform a function with multiple arguments', () => {\n    const spreadAdd = spread(add);\n    expect(spreadAdd([1, 2])).toBe(3);\n  });\n\n  it('should correctly transform a function with default arguments', () => {\n    const spreadGreet = spread(greet);\n    expect(spreadGreet(['Alice'])).toBe('Hello, Alice!');\n    expect(spreadGreet(['Bob', 'Hi'])).toBe('Hi, Bob!');\n  });\n\n  it('should handle functions with varying argument lengths', () => {\n    function concat(...args: string[]): string {\n      return args.join(' ');\n    }\n\n    const spreadConcat = spread(concat);\n    expect(spreadConcat(['Hello', 'World', 'Vitest'])).toBe('Hello World Vitest');\n  });\n\n  it('should maintain the context of `this` when calling the original function', () => {\n    function greetWithContext(this: { greeting: string }, name: string): string {\n      return `${this.greeting}, ${name}!`;\n    }\n\n    const context = { greeting: 'Hey' };\n    const spreadGreetWithContext = spread(greetWithContext.bind(context));\n\n    expect(spreadGreetWithContext(['Alice'])).toBe('Hey, Alice!');\n  });\n});\n"
  },
  {
    "path": "src/function/spread.ts",
    "content": "/**\n * Creates a new function that spreads elements of an array argument into individual arguments\n * for the original function.\n *\n * @template F - A function type with any number of parameters and any return type.\n * @param {F} func - The function to be transformed. It can be any function with any number of arguments.\n * @returns {(argsArr: Parameters<F>) => ReturnType<F>} - A new function that takes an array of arguments and returns the result of calling the original function with those arguments.\n *\n * @example\n * function add(a, b) {\n *   return a + b;\n * }\n *\n * const spreadAdd = spread(add);\n * console.log(spreadAdd([1, 2])); // Output: 3\n */\nexport function spread<F extends (...args: any[]) => any>(func: F): (argsArr: Parameters<F>) => ReturnType<F> {\n  return function (this: any, argsArr: Parameters<F>) {\n    return func.apply(this, argsArr);\n  };\n}\n"
  },
  {
    "path": "src/function/throttle.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { throttle } from './throttle';\nimport { delay } from '../promise';\n\ndescribe('throttle', () => {\n  it('should throttle function calls', () => {\n    const func = vi.fn();\n    const throttledFunc = throttle(func, 100);\n\n    throttledFunc();\n    throttledFunc();\n    throttledFunc();\n\n    expect(func).toHaveBeenCalledTimes(1);\n  });\n\n  it('should execute the function immediately if not called within the wait time', async () => {\n    const func = vi.fn();\n    const throttleMs = 500;\n    const throttledFunc = throttle(func, throttleMs);\n\n    throttledFunc(); // should be executed\n    expect(func).toHaveBeenCalledTimes(1);\n\n    await delay(throttleMs / 2);\n    expect(func).toHaveBeenCalledTimes(1);\n\n    throttledFunc(); // should be ignored\n    expect(func).toHaveBeenCalledTimes(1);\n\n    await delay(throttleMs / 2 + 1);\n    expect(func).toHaveBeenCalledTimes(1);\n\n    throttledFunc(); // should be executed\n    expect(func).toHaveBeenCalledTimes(2);\n\n    await delay(throttleMs / 2 - 1);\n    expect(func).toHaveBeenCalledTimes(2);\n\n    throttledFunc(); // should be ignored\n    expect(func).toHaveBeenCalledTimes(2);\n\n    await delay(throttleMs / 2 + 1);\n    expect(func).toHaveBeenCalledTimes(2);\n\n    throttledFunc(); // should be executed\n    expect(func).toHaveBeenCalledTimes(3);\n  });\n\n  it('should call the function with correct arguments', () => {\n    const func = vi.fn();\n    const throttleMs = 50;\n    const throttledFunc = throttle(func, throttleMs);\n\n    throttledFunc('test', 123);\n\n    expect(func).toHaveBeenCalledTimes(1);\n    expect(func).toHaveBeenCalledWith('test', 123);\n  });\n\n  it('should not trigger a trailing call when invoked once', async () => {\n    const func = vi.fn();\n    const throttleMs = 50;\n\n    const throttled = throttle(func, throttleMs);\n\n    throttled();\n    expect(func).toBeCalledTimes(1);\n\n    await delay(throttleMs + 1);\n    expect(func).toBeCalledTimes(1);\n  });\n\n  it('should trigger a trailing call as soon as possible', async () => {\n    const func = vi.fn();\n    const throttleMs = 50;\n\n    const throttled = throttle(func, throttleMs);\n\n    throttled();\n    throttled();\n    expect(func).toBeCalledTimes(1);\n\n    await delay(throttleMs + 1);\n    expect(func).toBeCalledTimes(2);\n  });\n\n  it('should be able to abort initial invocation', async () => {\n    const throttleMs = 50;\n    const func = vi.fn();\n    const controller = new AbortController();\n    controller.abort();\n\n    const throttled = throttle(func, throttleMs, { signal: controller.signal });\n\n    throttled();\n    throttled();\n    expect(func).toBeCalledTimes(0);\n\n    await delay(throttleMs + 1);\n    expect(func).toBeCalledTimes(0);\n  });\n\n  it('should be able to abort trailing edge invocation', async () => {\n    const throttleMs = 50;\n    const func = vi.fn();\n    const controller = new AbortController();\n\n    const throttled = throttle(func, throttleMs, { signal: controller.signal });\n\n    throttled();\n    throttled();\n    expect(func).toBeCalledTimes(1);\n\n    controller.abort();\n\n    await delay(throttleMs + 1);\n    expect(func).toBeCalledTimes(1);\n  });\n\n  it('should execute on leading and trailing when called multiple times with leading and trailing', async () => {\n    const callback = vi.fn();\n    const throttleMs = 50;\n    const throttled = throttle(callback, throttleMs, { edges: ['leading', 'trailing'] });\n\n    throttled();\n\n    await delay(throttleMs + 1);\n\n    expect(callback).toHaveBeenCalledTimes(1);\n\n    throttled();\n\n    await delay(throttleMs + 1);\n\n    expect(callback).toHaveBeenCalledTimes(2);\n\n    throttled();\n    throttled();\n\n    expect(callback).toHaveBeenCalledTimes(3);\n\n    await delay(throttleMs + 1);\n\n    expect(callback).toHaveBeenCalledTimes(4);\n  });\n\n  it('should preserve this context when called as a method', async () => {\n    const throttleMs = 50;\n    let capturedMsg: string | undefined;\n\n    const obj = {\n      msg: 'hello world',\n      logWithThrottle: throttle(function (this: any) {\n        capturedMsg = this?.msg;\n      }, throttleMs),\n    };\n\n    obj.logWithThrottle();\n    expect(capturedMsg).toBe('hello world');\n\n    capturedMsg = undefined;\n    obj.logWithThrottle();\n    obj.logWithThrottle();\n\n    await delay(throttleMs + 1);\n    expect(capturedMsg).toBe('hello world');\n  });\n\n  it('should invoke function periodically with trailing edge only', async () => {\n    const callback = vi.fn();\n    const throttleMs = 50;\n    const throttled = throttle(callback, throttleMs, { edges: ['trailing'] });\n\n    throttled();\n    expect(callback).toHaveBeenCalledTimes(0);\n\n    await delay(throttleMs + 1);\n    expect(callback).toHaveBeenCalledTimes(1);\n\n    throttled();\n    expect(callback).toHaveBeenCalledTimes(1);\n\n    await delay(throttleMs + 1);\n    expect(callback).toHaveBeenCalledTimes(2);\n  });\n\n  it('should invoke function periodically during continuous calls with trailing edge only', async () => {\n    const callback = vi.fn();\n    const throttleMs = 50;\n    const throttled = throttle(callback, throttleMs, { edges: ['trailing'] });\n\n    const intervalId = setInterval(() => {\n      throttled();\n    }, 10);\n\n    await delay(throttleMs * 3 + 10);\n    clearInterval(intervalId);\n\n    expect(callback.mock.calls.length).toBeGreaterThanOrEqual(2);\n  });\n\n  it('should invoke function periodically with leading edge only', async () => {\n    const callback = vi.fn();\n    const throttleMs = 50;\n    const throttled = throttle(callback, throttleMs, { edges: ['leading'] });\n\n    throttled();\n    expect(callback).toHaveBeenCalledTimes(1);\n\n    await delay(throttleMs / 2);\n    throttled();\n    expect(callback).toHaveBeenCalledTimes(1);\n\n    await delay(throttleMs / 2 + 1);\n    throttled();\n    expect(callback).toHaveBeenCalledTimes(2);\n  });\n});\n"
  },
  {
    "path": "src/function/throttle.ts",
    "content": "import { debounce } from './debounce.ts';\n\nexport interface ThrottleOptions {\n  /**\n   * An optional AbortSignal to cancel the throttled function.\n   */\n  signal?: AbortSignal;\n\n  /**\n   * An optional array specifying whether the function should be invoked on the leading edge, trailing edge, or both.\n   * If `edges` includes \"leading\", the function will be invoked at the start of the delay period.\n   * If `edges` includes \"trailing\", the function will be invoked at the end of the delay period.\n   * If both \"leading\" and \"trailing\" are included, the function will be invoked at both the start and end of the delay period.\n   * @default [\"leading\", \"trailing\"]\n   */\n  edges?: Array<'leading' | 'trailing'>;\n}\n\nexport interface ThrottledFunction<F extends (...args: any[]) => void> {\n  (...args: Parameters<F>): void;\n  cancel: () => void;\n  flush: () => void;\n}\n\n/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {(...args: Parameters<F>) => void} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n *   console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n *   throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(\n  func: F,\n  throttleMs: number,\n  { signal, edges = ['leading', 'trailing'] }: ThrottleOptions = {}\n): ThrottledFunction<F> {\n  let pendingAt: number | null = null;\n\n  const debounced = debounce(\n    function (this: any, ...args: Parameters<F>) {\n      pendingAt = Date.now();\n      func.apply(this, args);\n    },\n    throttleMs,\n    { signal, edges }\n  );\n\n  const throttled = function (this: any, ...args: Parameters<F>) {\n    if (pendingAt == null) {\n      pendingAt = Date.now();\n    }\n\n    if (Date.now() - pendingAt >= throttleMs) {\n      pendingAt = Date.now();\n      func.apply(this, args);\n\n      debounced.cancel();\n      debounced.schedule();\n      return;\n    }\n\n    debounced.apply(this, args);\n  };\n\n  throttled.cancel = debounced.cancel;\n  throttled.flush = debounced.flush;\n\n  return throttled;\n}\n"
  },
  {
    "path": "src/function/unary.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { unary } from './unary';\n\ndescribe('unary', () => {\n  it('should cap the number of arguments provided to `func`', () => {\n    const actual = ['6', '8', '10'].map(unary(parseInt));\n    expect(actual).toEqual([6, 8, 10]);\n  });\n\n  it('should not force a minimum argument count', () => {\n    function fn() {\n      // eslint-disable-next-line prefer-rest-params\n      return Array.from(arguments);\n    }\n    const capped = unary(fn);\n    expect(capped()).toEqual([]);\n  });\n\n  it('should use `this` binding of function', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const capped = unary(function (this: unknown, _a: unknown, _b: unknown) {\n      return this;\n    });\n    const object = { capped: capped };\n\n    expect(object.capped(1)).toBe(object);\n  });\n});\n"
  },
  {
    "path": "src/function/unary.ts",
    "content": "import { ary } from './ary.ts';\n\n/**\n * Creates a function that accepts up to one argument, ignoring any additional arguments.\n *\n * @template F - The type of the function.\n * @param {F} func - The function to cap arguments for.\n * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.\n *\n * @example\n * function fn(a, b, c) {\n *   console.log(arguments);\n * }\n *\n * unary(fn)(1, 2, 3); // [Arguments] { '0': 1 }\n */\nexport function unary<F extends (...args: any[]) => any>(func: F): (...args: any[]) => ReturnType<F> {\n  return ary(func, 1);\n}\n"
  },
  {
    "path": "src/index.ts",
    "content": "/**\n * es-toolkit\n * ====================================\n * A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.\n *\n * es-toolkit is a state-of-the-art, high-performance JavaScript utility library\n * with a small bundle size and strong type annotations.\n *\n * - es-toolkit offers a variety of everyday utility functions with modern implementations, such as [debounce](https://es-toolkit.dev/reference/function/debounce.html), [delay](https://es-toolkit.dev/reference/promise/delay.html), [chunk](https://es-toolkit.dev/reference/array/chunk.html), [sum](https://es-toolkit.dev/reference/math/sum.html), and [pick](https://es-toolkit.dev/reference/object/pick.html).\n * - Designed with performance in mind, es-toolkit achieves [2-3× better performance](https://es-toolkit.dev/performance.html) in modern JavaScript environments.\n * - es-toolkit supports tree shaking out of the box, and [reduces JavaScript code by up to 97%](https://es-toolkit.dev/bundle-size.html) compared to other libraries.\n * - es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as [isNotNil](https://es-toolkit.dev/reference/predicate/isNotNil.html).\n * - es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.\n *\n * ## Features\n *\n * Here are some of the features es-toolkit offers:\n *\n * - **Array**: Utilities for array manipulation, such as [uniq](https://es-toolkit.dev/reference/array/uniq.html) and [difference](https://es-toolkit.dev/reference/array/difference.html).\n * - **Function**: Tools for controlling function execution, including [debounce](https://es-toolkit.dev/reference/function/debounce.html) and [throttle](https://es-toolkit.dev/reference/function/throttle.html).\n * - **Math**: Numerical utilities like [sum](https://es-toolkit.dev/reference/math/sum.html) and [round](https://es-toolkit.dev/reference/math/round.html).\n * - **Object**: Tools for manipulating JavaScript objects, such as [pick](https://es-toolkit.dev/reference/object/pick.html) and [omit](https://es-toolkit.dev/reference/object/omit.html).\n * - **Predicate**: Type guard functions like [isNotNil](https://es-toolkit.dev/reference/predicate/isNotNil.html).\n * - **Promise**: Asynchronous utilities like [delay](https://es-toolkit.dev/reference/promise/delay.html).\n * - **String**: Utilities for string manipulation, such as [snakeCase](https://es-toolkit.dev/reference/string/snakeCase.html)\n *\n * ## Examples\n *\n * ```typescript\n * // import from '@es-toolkit/es-toolkit' in jsr.\n * import { debounce, chunk } from 'es-toolkit';\n *\n * const debouncedLog = debounce(message => {\n *   console.log(message);\n * }, 300);\n *\n * // This call will be debounced\n * debouncedLog('Hello, world!');\n *\n * const array = [1, 2, 3, 4, 5, 6];\n * const chunkedArray = chunk(array, 2);\n *\n * console.log(chunkedArray);\n * // Output: [[1, 2], [3, 4], [5, 6]]\n * ```\n *\n * ## Resources\n *\n * If you want to know more about the project, please take a look at the\n * following resources:\n *\n * - [GitHub](https://github.com/toss/es-toolkit)\n * - [Documentation](https://es-toolkit.dev)\n *\n * @module\n */\nexport * from './array/index.ts';\nexport * from './error/index.ts';\nexport * from './function/index.ts';\nexport * from './math/index.ts';\nexport * from './object/index.ts';\nexport * from './predicate/index.ts';\nexport * from './promise/index.ts';\nexport * from './string/index.ts';\nexport * from './util/index.ts';\n"
  },
  {
    "path": "src/map/countBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { countBy } from './countBy';\n\ndescribe('countBy', () => {\n  it('should count occurrences based on value', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 1],\n    ]);\n\n    const result = countBy(map, value => value);\n\n    expect(result).toEqual(\n      new Map([\n        [1, 2],\n        [2, 1],\n      ])\n    );\n  });\n\n  it('should count occurrences based on key transformation', () => {\n    const map = new Map([\n      ['alice', 20],\n      ['bob', 30],\n      ['carol', 20],\n    ]);\n\n    const result = countBy(map, (_value, key) => key[0]);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 1],\n        ['b', 1],\n        ['c', 1],\n      ])\n    );\n  });\n\n  it('should pass the original map to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const result = countBy(map, (value, _key, originalMap) => {\n      expect(originalMap).toBe(map);\n      return value + originalMap.size;\n    });\n\n    expect(result).toEqual(\n      new Map([\n        [3, 1],\n        [4, 1],\n      ])\n    );\n  });\n\n  it('should handle an empty Map', () => {\n    const map = new Map<string, number>();\n\n    const result = countBy(map, value => value);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should handle a Map with one entry', () => {\n    const map = new Map([['single', 42]]);\n\n    const result = countBy(map, value => value);\n\n    expect(result).toEqual(new Map([[42, 1]]));\n  });\n\n  it('should not modify the original Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const originalEntries = Array.from(map.entries());\n    countBy(map, value => value);\n\n    expect(Array.from(map.entries())).toEqual(originalEntries);\n  });\n\n  it('should count all entries with the same generated key', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n      ['e', 5],\n    ]);\n\n    const result = countBy(map, value => (value % 2 === 0 ? 'even' : 'odd'));\n\n    expect(result).toEqual(\n      new Map([\n        ['odd', 3],\n        ['even', 2],\n      ])\n    );\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'apple'],\n      [2, 'banana'],\n      [3, 'apricot'],\n    ]);\n\n    const result = countBy(map, value => value[0]);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 2],\n        ['b', 1],\n      ])\n    );\n  });\n\n  it('should work with object values', () => {\n    const map = new Map([\n      ['x', { type: 'fruit', name: 'apple' }],\n      ['y', { type: 'fruit', name: 'banana' }],\n      ['z', { type: 'vegetable', name: 'carrot' }],\n    ]);\n\n    const result = countBy(map, value => value.type);\n\n    expect(result).toEqual(\n      new Map([\n        ['fruit', 2],\n        ['vegetable', 1],\n      ])\n    );\n  });\n\n  it('should work with symbol keys as mapper result', () => {\n    const symbolA = Symbol('a');\n    const symbolB = Symbol('b');\n\n    const map = new Map([\n      ['x', 1],\n      ['y', 2],\n      ['z', 1],\n    ]);\n\n    const result = countBy(map, value => (value === 1 ? symbolA : symbolB));\n\n    expect(result.get(symbolA)).toBe(2);\n    expect(result.get(symbolB)).toBe(1);\n  });\n\n  it('should handle all entries mapping to the same key', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = countBy(map, () => 'same');\n\n    expect(result).toEqual(new Map([['same', 3]]));\n    expect(result.size).toBe(1);\n  });\n});\n"
  },
  {
    "path": "src/map/countBy.ts",
    "content": "/**\n * Counts the occurrences of items in a Map based on a transformation function.\n *\n * This function takes a Map and a function that generates a key from each value-key pair.\n * It returns an object with the generated keys as properties and their counts as values.\n * The count is incremented for each entry for which the transformation produces the same key.\n *\n * @template K - The type of the Map's keys.\n * @template V - The type of the Map's values.\n * @template K2 - The type of keys produced by the transformation function.\n * @param {Map<K, V>} map - The Map to count occurrences from.\n * @param {(value: V, key: K, object: Map<K, V>) => K2} mapper - The function to produce a key for counting.\n * @returns {Record<K2, number>} An object containing the mapped keys and their counts.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 1]\n * ]);\n * const result = countBy(map, (value) => value);\n * // result will be { 1: 2, 2: 1 }\n *\n * @example\n * const map = new Map([\n *   ['alice', 20],\n *   ['bob', 30],\n *   ['carol', 20]\n * ]);\n * const result = countBy(map, (value, key) => key[0]);\n * // result will be { a: 1, b: 1, c: 1 }\n */\nexport function countBy<K, V, K2 extends PropertyKey>(\n  map: Map<K, V>,\n  mapper: (value: V, key: K, object: Map<K, V>) => K2\n): Map<K2, number> {\n  const result = new Map<K2, number>();\n\n  for (const [key, value] of map) {\n    const mappedKey = mapper(value, key, map);\n    result.set(mappedKey, (result.get(mappedKey) ?? 0) + 1);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/map/every.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { every } from './every';\n\ndescribe('every', () => {\n  it('should return true when all entries satisfy the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(every(map, value => value > 0)).toBe(true);\n  });\n\n  it('should return false when at least one entry does not satisfy the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', -2],\n      ['c', 3],\n    ]);\n\n    expect(every(map, value => value > 0)).toBe(false);\n  });\n\n  it('should return true for an empty Map', () => {\n    const map = new Map<string, number>();\n\n    expect(every(map, () => false)).toBe(true);\n  });\n\n  it('should pass the key to the predicate function', () => {\n    const map = new Map([\n      ['apple', 5],\n      ['banana', 6],\n      ['cherry', 6],\n    ]);\n\n    expect(every(map, (_, key) => key.length > 3)).toBe(true);\n  });\n\n  it('should pass the key, value, and map to the predicate function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(every(map, (value, key, originalMap) => originalMap.has(key) && value > 0)).toBe(true);\n  });\n\n  it('should return false immediately when predicate returns false', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n      ['e', 5],\n    ]);\n\n    let callCount = 0;\n    const result = every(map, value => {\n      callCount++;\n      return value < 3;\n    });\n\n    expect(result).toBe(false);\n    expect(callCount).toBe(3); // Should stop at 'c' which has value 3\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n\n    expect(every(map, (_, key) => key > 0)).toBe(true);\n    expect(every(map, (_, key) => key < 3)).toBe(false);\n  });\n\n  it('should work with complex object values', () => {\n    const map = new Map([\n      ['user1', { age: 25, active: true }],\n      ['user2', { age: 30, active: true }],\n      ['user3', { age: 35, active: true }],\n    ]);\n\n    expect(every(map, value => value.active)).toBe(true);\n    expect(every(map, value => value.age > 20)).toBe(true);\n    expect(every(map, value => value.age > 30)).toBe(false);\n  });\n\n  it('should work with boolean values', () => {\n    const map = new Map([\n      ['a', true],\n      ['b', true],\n      ['c', true],\n    ]);\n\n    expect(every(map, value => value === true)).toBe(true);\n\n    map.set('d', false);\n    expect(every(map, value => value === true)).toBe(false);\n  });\n\n  it('should handle a single entry Map', () => {\n    const map = new Map([['only', 42]]);\n\n    expect(every(map, value => value === 42)).toBe(true);\n    expect(every(map, value => value === 0)).toBe(false);\n  });\n\n  it('should work with symbol keys', () => {\n    const key1 = Symbol('key1');\n    const key2 = Symbol('key2');\n    const key3 = Symbol('key3');\n\n    const map = new Map([\n      [key1, 10],\n      [key2, 20],\n      [key3, 30],\n    ]);\n\n    expect(every(map, value => value >= 10)).toBe(true);\n    expect(every(map, value => value > 15)).toBe(false);\n  });\n\n  it('should verify all entries match a complex condition', () => {\n    const map = new Map([\n      ['item1', { price: 100, inStock: true }],\n      ['item2', { price: 200, inStock: true }],\n      ['item3', { price: 150, inStock: true }],\n    ]);\n\n    expect(every(map, (value, key) => value.inStock && key.startsWith('item'))).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/map/every.ts",
    "content": "/**\n * Tests whether all entries in a Map satisfy the provided predicate function.\n *\n * This function iterates through all entries of the Map and checks if the predicate function\n * returns true for every entry. It returns true if the predicate is satisfied for all entries,\n * and false otherwise.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to test.\n * @param {(value: V, key: K, map: Map<K, V>) => boolean} doesMatch - A predicate function that tests each entry.\n * @returns {boolean} true if all entries satisfy the predicate, false otherwise.\n *\n * @example\n * const map = new Map([\n *   ['a', 10],\n *   ['b', 20],\n *   ['c', 30]\n * ]);\n * const result = every(map, (value) => value > 5);\n * // result will be: true\n *\n * const result2 = every(map, (value) => value > 15);\n * // result2 will be: false\n */\nexport function every<K, V>(map: Map<K, V>, doesMatch: (value: V, key: K, map: Map<K, V>) => boolean): boolean {\n  for (const [key, value] of map) {\n    if (!doesMatch(value, key, map)) {\n      return false;\n    }\n  }\n  return true;\n}\n"
  },
  {
    "path": "src/map/filter.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { filter } from './filter';\n\ndescribe('filter', () => {\n  it('should filter entries based on the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n    ]);\n\n    const result = filter(map, value => value > 2);\n\n    expect(result).toEqual(\n      new Map([\n        ['c', 3],\n        ['d', 4],\n      ])\n    );\n  });\n\n  it('should pass the key to the predicate function', () => {\n    const map = new Map([\n      ['apple', 1],\n      ['banana', 2],\n      ['cherry', 3],\n    ]);\n\n    const result = filter(map, (_, key) => key.startsWith('a'));\n\n    expect(result).toEqual(new Map([['apple', 1]]));\n  });\n\n  it('should pass the original map to the predicate function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = filter(map, (value, _key, originalMap) => {\n      expect(originalMap).toBe(map);\n      return value >= originalMap.size;\n    });\n\n    expect(result).toEqual(new Map([['c', 3]]));\n  });\n\n  it('should return an empty Map when no entries match', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = filter(map, value => value > 10);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should return all entries when all match the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = filter(map, value => value > 0);\n\n    expect(result).toEqual(map);\n  });\n\n  it('should handle an empty Map', () => {\n    const map = new Map<string, number>();\n\n    const result = filter(map, value => value > 0);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should not modify the original Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const originalSize = map.size;\n    const originalEntries = Array.from(map.entries());\n\n    filter(map, value => value > 1);\n\n    expect(map.size).toBe(originalSize);\n    expect(Array.from(map.entries())).toEqual(originalEntries);\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n      [4, 'd'],\n    ]);\n\n    const result = filter(map, (_, key) => key % 2 === 0);\n\n    expect(result).toEqual(\n      new Map([\n        [2, 'b'],\n        [4, 'd'],\n      ])\n    );\n  });\n\n  it('should work with complex predicates', () => {\n    const map = new Map([\n      ['user1', { age: 25, active: true }],\n      ['user2', { age: 30, active: false }],\n      ['user3', { age: 35, active: true }],\n      ['user4', { age: 40, active: false }],\n    ]);\n\n    const result = filter(map, value => value.active && value.age >= 30);\n\n    expect(result).toEqual(new Map([['user3', { age: 35, active: true }]]));\n  });\n\n  it('should handle boolean values', () => {\n    const map = new Map([\n      ['a', true],\n      ['b', false],\n      ['c', true],\n      ['d', false],\n    ]);\n\n    const result = filter(map, value => value === true);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', true],\n        ['c', true],\n      ])\n    );\n  });\n\n  it('should filter based on both key and value', () => {\n    const map = new Map([\n      ['apple', 5],\n      ['banana', 3],\n      ['cherry', 8],\n      ['date', 2],\n    ]);\n\n    const result = filter(map, (value, key) => key.length > 5 && value > 2);\n\n    expect(result).toEqual(\n      new Map([\n        ['banana', 3],\n        ['cherry', 8],\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "src/map/filter.ts",
    "content": "/**\n * Filters a Map based on a predicate function.\n *\n * This function takes a Map and a predicate function, and returns a new Map containing\n * only the entries for which the predicate function returns true.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to filter.\n * @param {(value: V, key: K, map: Map<K, V>) => boolean} callback - A predicate function that tests each entry.\n * @returns {Map<K, V>} A new Map containing only the entries that satisfy the predicate.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3],\n *   ['d', 4]\n * ]);\n * const result = filter(map, (value) => value > 2);\n * // result will be:\n * // Map(2) {\n * //   'c' => 3,\n * //   'd' => 4\n * // }\n */\nexport function filter<K, V>(map: Map<K, V>, callback: (value: V, key: K, map: Map<K, V>) => boolean): Map<K, V> {\n  const result = new Map<K, V>();\n\n  for (const [key, value] of map) {\n    if (callback(value, key, map)) {\n      result.set(key, value);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/map/findKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { findKey } from './findKey';\n\ndescribe('findKey', () => {\n  it('should return the key of the first entry that satisfies the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findKey(map, value => value.age < 40)).toBe('pebbles');\n  });\n\n  it('should return the first key if all entries satisfy the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findKey(map, value => value.age > 20)).toBe('pebbles');\n  });\n\n  it('should return undefined if no entry satisfies the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findKey(map, value => value.age > 50)).toBeUndefined();\n  });\n\n  it('should return undefined for an empty Map', () => {\n    const map = new Map<string, { age: number }>();\n\n    expect(findKey(map, value => value.age < 40)).toBeUndefined();\n  });\n\n  it('should handle Maps with various data types', () => {\n    const map = new Map<string, unknown>([\n      ['num', 42],\n      ['str', 'hello'],\n      ['bool', true],\n    ]);\n\n    expect(findKey(map, value => typeof value === 'string')).toBe('str');\n  });\n\n  it('should pass the key to the predicate function', () => {\n    const map = new Map([\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findKey(map, (_, key) => key === 'fred')).toBe('fred');\n  });\n\n  it('should pass the key and map to the predicate function', () => {\n    const map = new Map([\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findKey(map, (value, key, originalMap) => key === 'fred' && originalMap.get(key)?.active === false)).toBe(\n      'fred'\n    );\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n\n    expect(findKey(map, value => value === 'b')).toBe(2);\n  });\n\n  it('should work with symbol keys', () => {\n    const key1 = Symbol('key1');\n    const key2 = Symbol('key2');\n    const key3 = Symbol('key3');\n\n    const map = new Map([\n      [key1, 10],\n      [key2, 20],\n      [key3, 30],\n    ]);\n\n    expect(findKey(map, value => value > 15)).toBe(key2);\n  });\n\n  it('should return the first matching key when multiple entries match', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 2],\n      ['d', 3],\n    ]);\n\n    expect(findKey(map, value => value === 2)).toBe('b');\n  });\n\n  it('should stop iterating after finding the first match', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n    ]);\n\n    let callCount = 0;\n    const result = findKey(map, value => {\n      callCount++;\n      return value === 2;\n    });\n\n    expect(result).toBe('b');\n    expect(callCount).toBe(2);\n  });\n});\n"
  },
  {
    "path": "src/map/findKey.ts",
    "content": "/**\n * Finds the first key in a Map for which the predicate function returns true.\n *\n * This function iterates through the entries of the Map and returns the key of the first\n * entry for which the predicate function returns true. If no entry satisfies the predicate,\n * it returns undefined.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to search.\n * @param {(value: V, key: K, map: Map<K, V>) => boolean} doesMatch - A predicate function that tests each entry.\n * @returns {K | undefined} The key of the first entry that satisfies the predicate, or undefined if none found.\n *\n * @example\n * const map = new Map([\n *   ['apple', { color: 'red', quantity: 10 }],\n *   ['banana', { color: 'yellow', quantity: 5 }],\n *   ['grape', { color: 'purple', quantity: 15 }]\n * ]);\n * const result = findKey(map, (value) => value.quantity > 10);\n * // result will be: 'grape'\n */\nexport function findKey<K, V>(map: Map<K, V>, doesMatch: (value: V, key: K, map: Map<K, V>) => boolean): K | undefined {\n  let result: K | undefined = undefined;\n\n  for (const [key, value] of map) {\n    if (doesMatch(value, key, map)) {\n      result = key;\n      break;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/map/findValue.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { findValue } from './findValue';\n\ndescribe('findValue', () => {\n  it('should return the value of the first entry that satisfies the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findValue(map, value => value.age < 40)).toEqual({ age: 24, active: true });\n  });\n\n  it('should return the first value if all entries satisfy the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findValue(map, value => value.age > 20)).toEqual({ age: 24, active: true });\n  });\n\n  it('should return undefined if no entry satisfies the predicate', () => {\n    const map = new Map([\n      ['pebbles', { age: 24, active: true }],\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findValue(map, value => value.age > 50)).toBeUndefined();\n  });\n\n  it('should return undefined for an empty Map', () => {\n    const map = new Map<string, { age: number }>();\n\n    expect(findValue(map, value => value.age < 40)).toBeUndefined();\n  });\n\n  it('should handle Maps with various data types', () => {\n    const map = new Map<string, unknown>([\n      ['num', 42],\n      ['str', 'hello'],\n      ['bool', true],\n    ]);\n\n    expect(findValue(map, value => typeof value === 'string')).toBe('hello');\n  });\n\n  it('should pass the key to the predicate function', () => {\n    const map = new Map([\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(findValue(map, (_, key) => key === 'fred')).toEqual({ age: 40, active: false });\n  });\n\n  it('should pass the key and map to the predicate function', () => {\n    const map = new Map([\n      ['barney', { age: 36, active: true }],\n      ['fred', { age: 40, active: false }],\n    ]);\n\n    expect(\n      findValue(map, (value, key, originalMap) => key === 'fred' && originalMap.get(key)?.active === false)\n    ).toEqual({ age: 40, active: false });\n  });\n\n  it('should work with number values', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(findValue(map, value => value > 2)).toBe(3);\n  });\n\n  it('should work with string values', () => {\n    const map = new Map([\n      [1, 'apple'],\n      [2, 'banana'],\n      [3, 'cherry'],\n    ]);\n\n    expect(findValue(map, value => value.startsWith('b'))).toBe('banana');\n  });\n\n  it('should return the first matching value when multiple entries match', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 2],\n      ['d', 3],\n    ]);\n\n    expect(findValue(map, value => value === 2)).toBe(2);\n  });\n\n  it('should stop iterating after finding the first match', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n    ]);\n\n    let callCount = 0;\n    const result = findValue(map, value => {\n      callCount++;\n      return value === 2;\n    });\n\n    expect(result).toBe(2);\n    expect(callCount).toBe(2);\n  });\n\n  it('should handle complex object values', () => {\n    const map = new Map([\n      ['user1', { name: 'Alice', score: 100 }],\n      ['user2', { name: 'Bob', score: 85 }],\n      ['user3', { name: 'Charlie', score: 95 }],\n    ]);\n\n    expect(findValue(map, value => value.score > 90)).toEqual({ name: 'Alice', score: 100 });\n  });\n});\n"
  },
  {
    "path": "src/map/findValue.ts",
    "content": "/**\n * Finds the first value in a Map for which the predicate function returns true.\n *\n * This function iterates through the entries of the Map and returns the value of the first\n * entry for which the predicate function returns true. If no entry satisfies the predicate,\n * it returns undefined.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to search.\n * @param {(value: V, key: K, map: Map<K, V>) => boolean} doesMatch - A predicate function that tests each entry.\n * @returns {V | undefined} The value of the first entry that satisfies the predicate, or undefined if none found.\n *\n * @example\n * const map = new Map([\n *   ['apple', { color: 'red', quantity: 10 }],\n *   ['banana', { color: 'yellow', quantity: 5 }],\n *   ['grape', { color: 'purple', quantity: 15 }]\n * ]);\n * const result = findValue(map, (value) => value.quantity > 10);\n * // result will be: { color: 'purple', quantity: 15 }\n */\nexport function findValue<K, V>(\n  map: Map<K, V>,\n  doesMatch: (value: V, key: K, map: Map<K, V>) => boolean\n): V | undefined {\n  let result: V | undefined = undefined;\n\n  for (const [key, value] of map) {\n    if (doesMatch(value, key, map)) {\n      result = value;\n      break;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/map/forEach.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { forEach } from './forEach';\n\ndescribe('forEach', () => {\n  it('should execute callback for each entry in the Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result: Array<[string, number]> = [];\n    forEach(map, (value, key) => {\n      result.push([key, value]);\n    });\n\n    expect(result).toEqual([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n  });\n\n  it('should pass the value, key, and map to the callback', () => {\n    const map = new Map([\n      ['x', 10],\n      ['y', 20],\n    ]);\n\n    const results: Array<{ value: number; key: string; hasKey: boolean }> = [];\n    forEach(map, (value, key, originalMap) => {\n      results.push({\n        value,\n        key,\n        hasKey: originalMap.has(key),\n      });\n    });\n\n    expect(results).toEqual([\n      { value: 10, key: 'x', hasKey: true },\n      { value: 20, key: 'y', hasKey: true },\n    ]);\n  });\n\n  it('should work with an empty Map', () => {\n    const map = new Map<string, number>();\n    let callCount = 0;\n\n    forEach(map, () => {\n      callCount++;\n    });\n\n    expect(callCount).toBe(0);\n  });\n\n  it('should work with a single-entry Map', () => {\n    const map = new Map([['only', 42]]);\n    const result: Array<[string, number]> = [];\n\n    forEach(map, (value, key) => {\n      result.push([key, value]);\n    });\n\n    expect(result).toEqual([['only', 42]]);\n  });\n\n  it('should iterate in insertion order', () => {\n    const map = new Map<string, number>();\n    map.set('first', 1);\n    map.set('second', 2);\n    map.set('third', 3);\n\n    const keys: string[] = [];\n    forEach(map, (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual(['first', 'second', 'third']);\n  });\n\n  it('should work with various value types', () => {\n    const map = new Map<string, unknown>([\n      ['str', 'hello'],\n      ['num', 42],\n      ['bool', true],\n      ['obj', { id: 1 }],\n      ['arr', [1, 2, 3]],\n    ]);\n\n    const values: any[] = [];\n    forEach(map, value => {\n      values.push(value);\n    });\n\n    expect(values).toEqual(['hello', 42, true, { id: 1 }, [1, 2, 3]]);\n  });\n\n  it('should work with symbol keys', () => {\n    const key1 = Symbol('key1');\n    const key2 = Symbol('key2');\n    const map = new Map([\n      [key1, 'value1'],\n      [key2, 'value2'],\n    ]);\n\n    const keys: symbol[] = [];\n    forEach(map, (_, key) => {\n      keys.push(key);\n    });\n\n    expect(keys).toEqual([key1, key2]);\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'one'],\n      [2, 'two'],\n      [3, 'three'],\n    ]);\n\n    const result: Array<[number, string]> = [];\n    forEach(map, (value, key) => {\n      result.push([key, value]);\n    });\n\n    expect(result).toEqual([\n      [1, 'one'],\n      [2, 'two'],\n      [3, 'three'],\n    ]);\n  });\n\n  it('should allow side effects in the callback', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    let sum = 0;\n    forEach(map, value => {\n      sum += value;\n    });\n\n    expect(sum).toBe(6);\n  });\n\n  it('should work with complex nested structures', () => {\n    const map = new Map([\n      ['user1', { name: 'Alice', scores: [90, 85, 92] }],\n      ['user2', { name: 'Bob', scores: [78, 81, 79] }],\n    ]);\n\n    const names: string[] = [];\n    forEach(map, value => {\n      names.push(value.name);\n    });\n\n    expect(names).toEqual(['Alice', 'Bob']);\n  });\n});\n"
  },
  {
    "path": "src/map/forEach.ts",
    "content": "/**\n * Executes a provided function once for each entry in a Map.\n *\n * This function iterates through all entries of the Map and executes the callback function\n * for each entry. The callback receives the value, key, and the Map itself as arguments.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to iterate over.\n * @param {(value: V, key: K, map: Map<K, V>) => void} callback - A function to execute for each entry.\n * @returns {void}\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * forEach(map, (value, key) => {\n *   console.log(`${key}: ${value}`);\n * });\n * // Output:\n * // a: 1\n * // b: 2\n * // c: 3\n */\nexport function forEach<K, V>(map: Map<K, V>, callback: (value: V, key: K, map: Map<K, V>) => void): void {\n  for (const [key, value] of map) {\n    callback(value, key, map);\n  }\n}\n"
  },
  {
    "path": "src/map/hasValue.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { hasValue } from './hasValue';\n\ndescribe('hasValue', () => {\n  it('should return true when the Map contains the value', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, 2)).toBe(true);\n  });\n\n  it('should return false when the Map does not contain the value', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, 5)).toBe(false);\n  });\n\n  it('should return false for an empty Map', () => {\n    const map = new Map<string, number>();\n\n    expect(hasValue(map, 1)).toBe(false);\n  });\n\n  it('should work with string values', () => {\n    const map = new Map([\n      ['a', 'apple'],\n      ['b', 'banana'],\n      ['c', 'cherry'],\n    ]);\n\n    expect(hasValue(map, 'banana')).toBe(true);\n    expect(hasValue(map, 'grape')).toBe(false);\n  });\n\n  it('should work with boolean values', () => {\n    const map = new Map([\n      ['a', true],\n      ['b', false],\n      ['c', true],\n    ]);\n\n    expect(hasValue(map, true)).toBe(true);\n    expect(hasValue(map, false)).toBe(true);\n  });\n\n  it('should handle null values', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', null],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, null)).toBe(true);\n    expect(hasValue(map, undefined)).toBe(false);\n  });\n\n  it('should handle undefined values', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', undefined],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, undefined)).toBe(true);\n    expect(hasValue(map, null)).toBe(false);\n  });\n\n  it('should handle NaN using SameValueZero comparison', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', NaN],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, NaN)).toBe(true);\n  });\n\n  it('should distinguish between +0 and -0 using SameValueZero comparison', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', +0],\n      ['c', 3],\n    ]);\n\n    expect(hasValue(map, +0)).toBe(true);\n    expect(hasValue(map, -0)).toBe(true); // SameValueZero treats +0 and -0 as equal\n  });\n\n  it('should work with object values (reference equality)', () => {\n    const obj1 = { id: 1 };\n    const obj2 = { id: 2 };\n    const obj3 = { id: 3 };\n\n    const map = new Map([\n      ['a', obj1],\n      ['b', obj2],\n      ['c', obj3],\n    ]);\n\n    expect(hasValue(map, obj2)).toBe(true);\n    expect(hasValue(map, { id: 2 })).toBe(false); // Different reference\n  });\n\n  it('should work with array values (reference equality)', () => {\n    const arr1 = [1, 2, 3];\n    const arr2 = [4, 5, 6];\n\n    const map = new Map([\n      ['a', arr1],\n      ['b', arr2],\n    ]);\n\n    expect(hasValue(map, arr1)).toBe(true);\n    expect(hasValue(map, [1, 2, 3])).toBe(false); // Different reference\n  });\n\n  it('should find the first occurrence of a value', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 2],\n      ['d', 3],\n    ]);\n\n    expect(hasValue(map, 2)).toBe(true);\n  });\n\n  it('should find values at the beginning of the Map', () => {\n    const map = new Map([\n      ['first', 100],\n      ['second', 200],\n      ['third', 300],\n    ]);\n\n    expect(hasValue(map, 100)).toBe(true);\n  });\n\n  it('should find values at the end of the Map', () => {\n    const map = new Map([\n      ['first', 100],\n      ['second', 200],\n      ['third', 300],\n    ]);\n\n    expect(hasValue(map, 300)).toBe(true);\n  });\n\n  it('should work with a single entry Map', () => {\n    const map = new Map([['only', 42]]);\n\n    expect(hasValue(map, 42)).toBe(true);\n    expect(hasValue(map, 0)).toBe(false);\n  });\n\n  it('should work with symbol keys', () => {\n    const key1 = Symbol('key1');\n    const key2 = Symbol('key2');\n\n    const map = new Map([\n      [key1, 'value1'],\n      [key2, 'value2'],\n    ]);\n\n    expect(hasValue(map, 'value1')).toBe(true);\n    expect(hasValue(map, 'value3')).toBe(false);\n  });\n\n  it('should work with symbol values', () => {\n    const sym1 = Symbol('sym1');\n    const sym2 = Symbol('sym2');\n\n    const map = new Map([\n      ['a', sym1],\n      ['b', sym2],\n    ]);\n\n    expect(hasValue(map, sym1)).toBe(true);\n    expect(hasValue(map, Symbol('sym1'))).toBe(false); // Different symbol\n  });\n\n  it('should handle Maps with duplicate values', () => {\n    const map = new Map([\n      ['a', 'duplicate'],\n      ['b', 'duplicate'],\n      ['c', 'unique'],\n    ]);\n\n    expect(hasValue(map, 'duplicate')).toBe(true);\n    expect(hasValue(map, 'unique')).toBe(true);\n  });\n\n  it('should work with number keys and complex values', () => {\n    const map = new Map([\n      [1, { name: 'Alice', age: 25 }],\n      [2, { name: 'Bob', age: 30 }],\n      [3, { name: 'Charlie', age: 35 }],\n    ]);\n\n    const bob = { name: 'Bob', age: 30 };\n    const actualBob = map.get(2)!;\n\n    expect(hasValue(map, actualBob)).toBe(true);\n    expect(hasValue(map, bob)).toBe(false); // Different reference\n  });\n\n  it('should handle empty string values', () => {\n    const map = new Map([\n      ['a', ''],\n      ['b', 'not empty'],\n    ]);\n\n    expect(hasValue(map, '')).toBe(true);\n    expect(hasValue(map, 'not empty')).toBe(true);\n  });\n\n  it('should handle zero values', () => {\n    const map = new Map([\n      ['a', 0],\n      ['b', 1],\n      ['c', -1],\n    ]);\n\n    expect(hasValue(map, 0)).toBe(true);\n    expect(hasValue(map, 1)).toBe(true);\n    expect(hasValue(map, -1)).toBe(true);\n  });\n\n  it('should work with BigInt values', () => {\n    const map = new Map([\n      ['a', 1n],\n      ['b', 2n],\n      ['c', 3n],\n    ]);\n\n    expect(hasValue(map, 2n)).toBe(true);\n    expect(hasValue(map, 5n)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/map/hasValue.ts",
    "content": "import { isEqualsSameValueZero } from '../_internal/isEqualsSameValueZero';\n\n/**\n * Checks if a Map contains a specific value.\n *\n * This function iterates through all values in the Map and checks if any value\n * is equal to the search element using SameValueZero comparison (similar to\n * Array.prototype.includes). This means that NaN is considered equal to NaN.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to search.\n * @param {V} searchElement - The value to search for.\n * @returns {boolean} true if the Map contains the value, false otherwise.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * const result = hasValue(map, 2);\n * // result will be: true\n *\n * const result2 = hasValue(map, 5);\n * // result2 will be: false\n */\nexport function hasValue<K, V>(map: Map<K, V>, searchElement: V): boolean {\n  for (const value of map.values()) {\n    if (isEqualsSameValueZero(value, searchElement)) {\n      return true;\n    }\n  }\n  return false;\n}\n"
  },
  {
    "path": "src/map/index.ts",
    "content": "export { every } from './every.ts';\nexport { filter } from './filter.ts';\nexport { findKey } from './findKey.ts';\nexport { findValue } from './findValue.ts';\nexport { hasValue } from './hasValue.ts';\nexport { mapKeys } from './mapKeys.ts';\nexport { mapValues } from './mapValues.ts';\nexport { reduce } from './reduce.ts';\nexport { some } from './some.ts';\n"
  },
  {
    "path": "src/map/keyBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { keyBy } from './keyBy';\n\ndescribe('keyBy', () => {\n  it('should map entries by a property of the value', () => {\n    const map = new Map([\n      ['x', { type: 'fruit', name: 'apple' }],\n      ['y', { type: 'fruit', name: 'banana' }],\n      ['z', { type: 'vegetable', name: 'carrot' }],\n    ]);\n\n    const result = keyBy(map, item => item.type);\n\n    expect(result).toEqual(\n      new Map([\n        ['fruit', { type: 'fruit', name: 'banana' }],\n        ['vegetable', { type: 'vegetable', name: 'carrot' }],\n      ])\n    );\n  });\n\n  it('should use the last value when multiple entries produce the same key', () => {\n    const map = new Map([\n      ['a', { id: 1, name: 'first' }],\n      ['b', { id: 1, name: 'second' }],\n      ['c', { id: 2, name: 'third' }],\n    ]);\n\n    const result = keyBy(map, item => item.id);\n\n    expect(result.get(1)).toEqual({ id: 1, name: 'second' });\n    expect(result.get(2)).toEqual({ id: 2, name: 'third' });\n    expect(result.size).toBe(2);\n  });\n\n  it('should pass the key to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = keyBy(map, (_value, key) => `key_${key}`);\n\n    expect(result).toEqual(\n      new Map([\n        ['key_a', 1],\n        ['key_b', 2],\n        ['key_c', 3],\n      ])\n    );\n  });\n\n  it('should pass the original map to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const result = keyBy(map, (value, _key, originalMap) => {\n      expect(originalMap).toBe(map);\n      return value + originalMap.size;\n    });\n\n    expect(result).toEqual(\n      new Map([\n        [3, 1],\n        [4, 2],\n      ])\n    );\n  });\n\n  it('should handle an empty Map', () => {\n    const map = new Map<string, number>();\n\n    const result = keyBy(map, value => value);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should handle a Map with one entry', () => {\n    const map = new Map([['single', { id: 42, name: 'only one' }]]);\n\n    const result = keyBy(map, item => item.id);\n\n    expect(result).toEqual(new Map([[42, { id: 42, name: 'only one' }]]));\n  });\n\n  it('should not modify the original Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const originalEntries = Array.from(map.entries());\n    keyBy(map, value => value);\n\n    expect(Array.from(map.entries())).toEqual(originalEntries);\n  });\n\n  it('should work with number keys in the original map', () => {\n    const map = new Map([\n      [1, 'apple'],\n      [2, 'banana'],\n      [3, 'apricot'],\n    ]);\n\n    const result = keyBy(map, value => value[0]);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 'apricot'],\n        ['b', 'banana'],\n      ])\n    );\n  });\n\n  it('should work with symbol keys as generated keys', () => {\n    const symbolA = Symbol('a');\n    const symbolB = Symbol('b');\n\n    const map = new Map([\n      ['x', 1],\n      ['y', 2],\n    ]);\n\n    const result = keyBy(map, (_value, key) => (key === 'x' ? symbolA : symbolB));\n\n    expect(result.get(symbolA)).toBe(1);\n    expect(result.get(symbolB)).toBe(2);\n  });\n\n  it('should handle all entries mapping to the same key', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = keyBy(map, () => 'same');\n\n    expect(result).toEqual(new Map([['same', 3]]));\n    expect(result.size).toBe(1);\n  });\n\n  it('should work with complex objects as values', () => {\n    const user1 = { id: 'u1', name: 'Alice', age: 25 };\n    const user2 = { id: 'u2', name: 'Bob', age: 30 };\n    const user3 = { id: 'u3', name: 'Carol', age: 25 };\n\n    const map = new Map([\n      ['entry1', user1],\n      ['entry2', user2],\n      ['entry3', user3],\n    ]);\n\n    const result = keyBy(map, user => user.id);\n\n    expect(result).toEqual(\n      new Map([\n        ['u1', user1],\n        ['u2', user2],\n        ['u3', user3],\n      ])\n    );\n  });\n\n  it('should preserve insertion order for unique keys', () => {\n    const map = new Map([\n      ['a', { order: 1 }],\n      ['b', { order: 2 }],\n      ['c', { order: 3 }],\n    ]);\n\n    const result = keyBy(map, (_value, key) => key.toUpperCase());\n    const keys = Array.from(result.keys());\n\n    expect(keys).toEqual(['A', 'B', 'C']);\n  });\n});\n"
  },
  {
    "path": "src/map/keyBy.ts",
    "content": "/**\n * Maps each entry of a Map based on a provided key-generating function.\n *\n * This function takes a Map and a function that generates a key from each value-key pair.\n * It returns a new Map where the keys are generated by the key function and the values are\n * the corresponding values from the original map. If multiple entries produce the same key,\n * the last value encountered will be used.\n *\n * @template K - The type of keys in the original Map.\n * @template V - The type of values in the original Map.\n * @template K2 - The type of keys to produce in the returned Map.\n * @param {Map<K, V>} map - The map of entries to be mapped.\n * @param {(value: V, key: K, object: Map<K, V>) => K2} getKeyFromEntry - A function that generates a key from a value-key pair.\n * @returns {Map<K2, V>} A Map where the generated keys are mapped to each entry's value.\n *\n * @example\n * const map = new Map([\n *   ['x', { type: 'fruit', name: 'apple' }],\n *   ['y', { type: 'fruit', name: 'banana' }],\n *   ['z', { type: 'vegetable', name: 'carrot' }]\n * ]);\n * const result = keyBy(map, item => item.type);\n * // result will be:\n * // Map(2) {\n * //   'fruit' => { type: 'fruit', name: 'banana' },\n * //   'vegetable' => { type: 'vegetable', name: 'carrot' }\n * // }\n */\nexport function keyBy<K, V, K2>(\n  map: Map<K, V>,\n  getKeyFromEntry: (value: V, key: K, object: Map<K, V>) => K2\n): Map<K2, V> {\n  const result = new Map<K2, V>();\n\n  for (const [key, value] of map) {\n    const newKey = getKeyFromEntry(value, key, map);\n    result.set(newKey, value);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/map/mapKeys.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mapKeys } from './mapKeys';\n\ndescribe('mapKeys', () => {\n  it('should map keys of a Map with string keys', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapKeys(map, (_, key) => `${key}_new`);\n\n    expect(result).toEqual(\n      new Map([\n        ['a_new', 1],\n        ['b_new', 2],\n        ['c_new', 3],\n      ])\n    );\n  });\n\n  it('should map keys of a Map with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n\n    const result = mapKeys(map, (_, key) => key * 2);\n\n    expect(result).toEqual(\n      new Map([\n        [2, 'a'],\n        [4, 'b'],\n        [6, 'c'],\n      ])\n    );\n  });\n\n  it('should pass the value to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapKeys(map, value => `key_${value}`);\n\n    expect(result).toEqual(\n      new Map([\n        ['key_1', 1],\n        ['key_2', 2],\n        ['key_3', 3],\n      ])\n    );\n  });\n\n  it('should pass the original map to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const result = mapKeys(map, (_value, key, originalMap) => {\n      expect(originalMap).toBe(map);\n      return `${key}_${originalMap.size}`;\n    });\n\n    expect(result).toEqual(\n      new Map([\n        ['a_2', 1],\n        ['b_2', 2],\n      ])\n    );\n  });\n\n  it('should handle an empty Map', () => {\n    const map = new Map<string, number>();\n\n    const result = mapKeys(map, (_, key) => `${key}_new`);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should handle a Map with one entry', () => {\n    const map = new Map([['single', 42]]);\n\n    const result = mapKeys(map, (_, key) => `${key}_modified`);\n\n    expect(result).toEqual(new Map([['single_modified', 42]]));\n  });\n\n  it('should not modify the original Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const originalEntries = Array.from(map.entries());\n    mapKeys(map, (_, key) => `${key}_new`);\n\n    expect(Array.from(map.entries())).toEqual(originalEntries);\n  });\n\n  it('should handle duplicate keys by overwriting', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapKeys(map, () => 'same');\n\n    expect(result).toEqual(new Map([['same', 3]]));\n    expect(result.size).toBe(1);\n  });\n\n  it('should work with symbol keys', () => {\n    const symbolKey1 = Symbol('key1');\n    const symbolKey2 = Symbol('key2');\n    const symbolKey3 = Symbol('key3');\n    const symbolKey4 = Symbol('key4');\n\n    const map = new Map([\n      [symbolKey1, 'value1'],\n      [symbolKey2, 'value2'],\n    ]);\n\n    const result = mapKeys(map, (_, key) => (key === symbolKey1 ? symbolKey3 : symbolKey4));\n\n    expect(result.get(symbolKey3)).toBe('value1');\n    expect(result.get(symbolKey4)).toBe('value2');\n  });\n});\n"
  },
  {
    "path": "src/map/mapKeys.ts",
    "content": "/**\n * Creates a new Map with the same values but with keys transformed by the provided function.\n *\n * This function takes a Map and a function that generates a new key from each value-key pair.\n * It returns a new Map where the keys are the result of applying the function to each entry,\n * while the values remain the same.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to transform.\n * @param {(value: V, key: K, object: Map<K, V>) => K} getNewKey - A function that generates a new key from a value-key pair.\n * @returns {Map<K, V>} A new Map with transformed keys and the same values.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * const result = mapKeys(map, (value, key) => key.toUpperCase());\n * // result will be:\n * // Map(3) {\n * //   'A' => 1,\n * //   'B' => 2,\n * //   'C' => 3\n * // }\n */\nexport function mapKeys<K, V>(map: Map<K, V>, getNewKey: (value: V, key: K, object: Map<K, V>) => K): Map<K, V> {\n  const result = new Map<K, V>();\n\n  for (const [key, value] of map) {\n    const newKey = getNewKey(value, key, map);\n    result.set(newKey, value);\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/map/mapValues.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mapValues } from './mapValues';\n\ndescribe('mapValues', () => {\n  it('should map values of a Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapValues(map, value => value * 2);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 2],\n        ['b', 4],\n        ['c', 6],\n      ])\n    );\n  });\n\n  it('should pass the key to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapValues(map, (_, key) => `value_${key}`);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 'value_a'],\n        ['b', 'value_b'],\n        ['c', 'value_c'],\n      ])\n    );\n  });\n\n  it('should pass the original map to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const result = mapValues(map, (value, key, originalMap) => {\n      expect(originalMap).toBe(map);\n      return value + originalMap.size;\n    });\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 3],\n        ['b', 4],\n      ])\n    );\n  });\n\n  it('should handle an empty Map', () => {\n    const map = new Map<string, number>();\n\n    const result = mapValues(map, value => value * 2);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should handle a Map with one entry', () => {\n    const map = new Map([['single', 42]]);\n\n    const result = mapValues(map, value => value + 8);\n\n    expect(result).toEqual(new Map([['single', 50]]));\n  });\n\n  it('should not modify the original Map', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const originalEntries = Array.from(map.entries());\n    mapValues(map, value => value * 10);\n\n    expect(Array.from(map.entries())).toEqual(originalEntries);\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n\n    const result = mapValues(map, value => value.toUpperCase());\n\n    expect(result).toEqual(\n      new Map([\n        [1, 'A'],\n        [2, 'B'],\n        [3, 'C'],\n      ])\n    );\n  });\n\n  it('should work with various value types', () => {\n    const map = new Map<string, unknown>([\n      ['string', 'hello'],\n      ['number', 42],\n      ['boolean', true],\n      ['object', { name: 'test' }],\n    ]);\n\n    const result = mapValues(map, (value, key) => `${key}: ${JSON.stringify(value)}`);\n\n    expect(result).toEqual(\n      new Map([\n        ['string', 'string: \"hello\"'],\n        ['number', 'number: 42'],\n        ['boolean', 'boolean: true'],\n        ['object', 'object: {\"name\":\"test\"}'],\n      ])\n    );\n  });\n\n  it('should handle transforming value types', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = mapValues(map, value => `number_${value}`);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 'number_1'],\n        ['b', 'number_2'],\n        ['c', 'number_3'],\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "src/map/mapValues.ts",
    "content": "/**\n * Creates a new Map with the same keys but with values transformed by the provided function.\n *\n * This function takes a Map and a function that generates a new value from each value-key pair.\n * It returns a new Map where the values are the result of applying the function to each entry,\n * while the keys remain the same.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to transform.\n * @param {(value: V, key: K, object: Map<K, V>) => V} getNewValue - A function that generates a new value from a value-key pair.\n * @returns {Map<K, V>} A new Map with the same keys and transformed values.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * const result = mapValues(map, (value) => value * 2);\n * // result will be:\n * // Map(3) {\n * //   'a' => 2,\n * //   'b' => 4,\n * //   'c' => 6\n * // }\n */\nexport function mapValues<K, V, R>(map: Map<K, V>, getNewValue: (value: V, key: K, object: Map<K, V>) => R): Map<K, R> {\n  const result = new Map<K, R>();\n\n  for (const [key, value] of map) {\n    const newValue = getNewValue(value, key, map);\n    result.set(key, newValue);\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/map/reduce.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { reduce } from './reduce';\n\ndescribe('reduce', () => {\n  it('should reduce a Map to a single value with an initial value', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value, 0);\n\n    expect(result).toBe(6);\n  });\n\n  it('should return the last value when no initial value is provided', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value);\n\n    expect(result).toBe(6);\n  });\n\n  it('should throw an error when reducing an empty Map without an initial value', () => {\n    const map = new Map<string, number>();\n\n    expect(() => reduce(map, (acc, value) => acc + value)).toThrow('Reduce of empty map with no initial value');\n  });\n\n  it('should handle an empty Map with an initial value', () => {\n    const map = new Map<string, number>();\n\n    const result = reduce(map, (acc, value) => acc + value, 10);\n\n    expect(result).toBe(10);\n  });\n\n  it('should pass the key to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = reduce(map, (acc, value, key) => acc + key, '');\n\n    expect(result).toBe('abc');\n  });\n\n  it('should pass the original map to the callback function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n    ]);\n\n    const result = reduce(\n      map,\n      (acc, value, _key, originalMap) => {\n        expect(originalMap).toBe(map);\n        return acc + value;\n      },\n      0\n    );\n\n    expect(result).toBe(3);\n  });\n\n  it('should handle a single entry Map with initial value', () => {\n    const map = new Map([['only', 42]]);\n\n    const result = reduce(map, (acc, value) => acc + value, 10);\n\n    expect(result).toBe(52);\n  });\n\n  it('should handle a single entry Map without initial value', () => {\n    const map = new Map([['only', 42]]);\n\n    const result = reduce(map, (acc, value) => acc + value);\n\n    expect(result).toBe(42);\n  });\n\n  it('should work with string concatenation', () => {\n    const map = new Map([\n      ['a', 'hello'],\n      ['b', ' '],\n      ['c', 'world'],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value, '');\n\n    expect(result).toBe('hello world');\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 10],\n      [2, 20],\n      [3, 30],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value, 0);\n\n    expect(result).toBe(60);\n  });\n\n  it('should build an object from Map entries', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    const result = reduce(\n      map,\n      (acc, value, key) => {\n        return { ...acc, [key]: value * 2 };\n      },\n      {} as Record<string, number>\n    );\n\n    expect(result).toEqual({ a: 2, b: 4, c: 6 });\n  });\n\n  it('should find maximum value', () => {\n    const map = new Map([\n      ['a', 10],\n      ['b', 25],\n      ['c', 15],\n    ]);\n\n    const result = reduce(map, (acc, value) => (value > acc ? value : acc), 0);\n\n    expect(result).toBe(25);\n  });\n\n  it('should find minimum value', () => {\n    const map = new Map([\n      ['a', 10],\n      ['b', 25],\n      ['c', 15],\n    ]);\n\n    const result = reduce(map, (acc, value) => (value < acc ? value : acc), Infinity);\n\n    expect(result).toBe(10);\n  });\n\n  it('should handle complex accumulation', () => {\n    const map = new Map([\n      ['item1', { price: 100, quantity: 2 }],\n      ['item2', { price: 50, quantity: 3 }],\n      ['item3', { price: 75, quantity: 1 }],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value.price * value.quantity, 0);\n\n    expect(result).toBe(425); // 100*2 + 50*3 + 75*1 = 200 + 150 + 75\n  });\n\n  it('should return the last value when no initial value provided', () => {\n    const map = new Map([\n      ['a', 5],\n      ['b', 10],\n      ['c', 15],\n    ]);\n\n    const result = reduce(map, (acc, value) => acc + value);\n\n    expect(result).toBe(30);\n  });\n});\n"
  },
  {
    "path": "src/map/reduce.ts",
    "content": "/**\n * Reduces a Map to a single value by iterating through its entries and applying a callback function.\n *\n * This function iterates through all entries of the Map and applies the callback function to each entry,\n * accumulating the result. If an initial value is provided, it is used as the starting accumulator value.\n * If no initial value is provided and the Map is empty, a TypeError is thrown.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to reduce.\n * @param {(accumulator: V, value: V, key: K, map: Map<K, V>) => V} callback - A function that processes each entry and updates the accumulator.\n * @param {V} [initialValue] - The initial value for the accumulator. If not provided, the first value in the Map is used.\n * @returns {V} The final accumulated value.\n * @throws {TypeError} If the Map is empty and no initial value is provided.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * const result = reduce(map, (acc, value) => acc + value, 0);\n * // result will be: 6\n *\n * @example\n * const map = new Map([\n *   ['a', 10],\n *   ['b', 20]\n * ]);\n * const result = reduce(map, (acc, value) => acc + value);\n * // result will be: 30 (starts with first value 10)\n */\nexport function reduce<K, V, A = V>(\n  map: Map<K, V>,\n  callback: (accumulator: A, value: V, key: K, map: Map<K, V>) => A,\n  initialValue?: A\n): A {\n  if (initialValue == null && map.size === 0) {\n    throw new TypeError('Reduce of empty map with no initial value');\n  }\n\n  let accumulator: A = initialValue!;\n\n  for (const [key, value] of map) {\n    if (accumulator == null) {\n      accumulator = value as any as A;\n    } else {\n      accumulator = callback(accumulator, value, key, map);\n    }\n  }\n\n  return accumulator;\n}\n"
  },
  {
    "path": "src/map/some.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { some } from './some';\n\ndescribe('some', () => {\n  it('should return true when at least one entry satisfies the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(some(map, value => value > 2)).toBe(true);\n  });\n\n  it('should return false when no entries satisfy the predicate', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(some(map, value => value > 10)).toBe(false);\n  });\n\n  it('should return false for an empty Map', () => {\n    const map = new Map<string, number>();\n\n    expect(some(map, () => true)).toBe(false);\n  });\n\n  it('should pass the key to the predicate function', () => {\n    const map = new Map([\n      ['apple', 5],\n      ['banana', 6],\n      ['cherry', 6],\n    ]);\n\n    expect(some(map, (_, key) => key === 'banana')).toBe(true);\n    expect(some(map, (_, key) => key === 'grape')).toBe(false);\n  });\n\n  it('should pass the key, value, and map to the predicate function', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    expect(some(map, (value, key, originalMap) => originalMap.has(key) && value === 2)).toBe(true);\n  });\n\n  it('should return true immediately when predicate returns true', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n      ['d', 4],\n      ['e', 5],\n    ]);\n\n    let callCount = 0;\n    const result = some(map, value => {\n      callCount++;\n      return value === 2;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(2); // Should stop at 'b' which has value 2\n  });\n\n  it('should work with number keys', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n\n    expect(some(map, (_, key) => key === 2)).toBe(true);\n    expect(some(map, (_, key) => key > 5)).toBe(false);\n  });\n\n  it('should work with complex object values', () => {\n    const map = new Map([\n      ['user1', { age: 25, active: false }],\n      ['user2', { age: 30, active: true }],\n      ['user3', { age: 35, active: false }],\n    ]);\n\n    expect(some(map, value => value.active)).toBe(true);\n    expect(some(map, value => value.age > 40)).toBe(false);\n  });\n\n  it('should work with boolean values', () => {\n    const map = new Map([\n      ['a', false],\n      ['b', false],\n      ['c', true],\n    ]);\n\n    expect(some(map, value => value === true)).toBe(true);\n\n    const allFalse = new Map([\n      ['a', false],\n      ['b', false],\n    ]);\n    expect(some(allFalse, value => value === true)).toBe(false);\n  });\n\n  it('should handle a single entry Map', () => {\n    const map = new Map([['only', 42]]);\n\n    expect(some(map, value => value === 42)).toBe(true);\n    expect(some(map, value => value === 0)).toBe(false);\n  });\n\n  it('should work with symbol keys', () => {\n    const key1 = Symbol('key1');\n    const key2 = Symbol('key2');\n    const key3 = Symbol('key3');\n\n    const map = new Map([\n      [key1, 10],\n      [key2, 20],\n      [key3, 30],\n    ]);\n\n    expect(some(map, value => value > 25)).toBe(true);\n    expect(some(map, value => value > 50)).toBe(false);\n  });\n\n  it('should find entries matching a complex condition', () => {\n    const map = new Map([\n      ['item1', { price: 100, inStock: false }],\n      ['item2', { price: 200, inStock: true }],\n      ['item3', { price: 150, inStock: false }],\n    ]);\n\n    expect(some(map, (value, key) => value.inStock && key.startsWith('item'))).toBe(true);\n    expect(some(map, value => value.price > 300)).toBe(false);\n  });\n\n  it('should return true when the first entry matches', () => {\n    const map = new Map([\n      ['a', 10],\n      ['b', 20],\n      ['c', 30],\n    ]);\n\n    let callCount = 0;\n    const result = some(map, value => {\n      callCount++;\n      return value === 10;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(1);\n  });\n\n  it('should check all entries when none match until the last one', () => {\n    const map = new Map([\n      ['a', 1],\n      ['b', 2],\n      ['c', 3],\n    ]);\n\n    let callCount = 0;\n    const result = some(map, value => {\n      callCount++;\n      return value === 3;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(3);\n  });\n});\n"
  },
  {
    "path": "src/map/some.ts",
    "content": "/**\n * Tests whether at least one entry in a Map satisfies the provided predicate function.\n *\n * This function iterates through the entries of the Map and checks if the predicate function\n * returns true for at least one entry. It returns true if any entry satisfies the predicate,\n * and false otherwise.\n *\n * @template K - The type of keys in the Map.\n * @template V - The type of values in the Map.\n * @param {Map<K, V>} map - The Map to test.\n * @param {(value: V, key: K, map: Map<K, V>) => boolean} doesMatch - A predicate function that tests each entry.\n * @returns {boolean} true if at least one entry satisfies the predicate, false otherwise.\n *\n * @example\n * const map = new Map([\n *   ['a', 1],\n *   ['b', 2],\n *   ['c', 3]\n * ]);\n * const result = some(map, (value) => value > 2);\n * // result will be: true\n *\n * const result2 = some(map, (value) => value > 5);\n * // result2 will be: false\n */\nexport function some<K, V>(map: Map<K, V>, doesMatch: (value: V, key: K, map: Map<K, V>) => boolean): boolean {\n  for (const [key, value] of map) {\n    if (doesMatch(value, key, map)) {\n      return true;\n    }\n  }\n  return false;\n}\n"
  },
  {
    "path": "src/math/clamp.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { clamp } from './clamp';\n\ndescribe('clamp function', () => {\n  it('works with max', () => {\n    expect(clamp(3, 5)).toBe(3);\n    expect(clamp(10, 6)).toBe(6);\n    expect(clamp(6, 10)).toBe(6);\n  });\n\n  it('works with max and min', () => {\n    expect(clamp(3, 5, 10)).toBe(5);\n    expect(clamp(10, 6, 10)).toBe(10);\n    expect(clamp(6, 10, 10)).toBe(10);\n    expect(clamp(7, 5, 10)).toBe(7);\n    expect(clamp(100, 5, 6)).toBe(6);\n  });\n});\n"
  },
  {
    "path": "src/math/clamp.ts",
    "content": "/**\n * Clamps a number within the inclusive upper bound.\n *\n * This function takes a number and a maximum bound, and returns the number clamped within the specified upper bound.\n * If only one bound is provided, it returns the minimum of the value and the bound.\n *\n * @param {number} value - The number to clamp.\n * @param {number} maximum - The maximum bound to clamp the number.\n * @returns {number} The clamped number within the specified upper bound.\n *\n * @example\n * const result1 = clamp(10, 5); // result1 will be 5, as 10 is clamped to the bound 5\n */\nexport function clamp(value: number, maximum: number): number;\n\n/**\n * Clamps a number within the inclusive lower and upper bounds.\n *\n * This function takes a number and two bounds, and returns the number clamped within the specified bounds.\n *\n * @param {number} value - The number to clamp.\n * @param {number} minimum - The minimum bound to clamp the number.\n * @param {number} maximum - The maximum bound to clamp the number.\n * @returns {number} The clamped number within the specified bounds.\n *\n * @example\n * const result2 = clamp(10, 5, 15); // result2 will be 10, as it is within the bounds 5 and 15\n * const result3 = clamp(2, 5, 15); // result3 will be 5, as 2 is clamped to the lower bound 5\n * const result4 = clamp(20, 5, 15); // result4 will be 15, as 20 is clamped to the upper bound 15\n */\nexport function clamp(value: number, minimum: number, maximum: number): number;\n\n/**\n * Clamps a number within the specified bounds.\n *\n * This function takes a number and one or two bounds, and returns the number clamped within the specified bounds.\n * If only one bound is provided, it returns the minimum of the value and the bound.\n *\n * @param {number} value - The number to clamp.\n * @param {number} bound1 - The minimum bound to clamp the number, or the maximum bound if bound2 is not provided.\n * @param {number} [bound2] - The maximum bound to clamp the number. If not provided, the function will only consider bound1 as the upper limit.\n * @returns {number} The clamped number within the specified bounds.\n *\n * @example\n * const result1 = clamp(10, 5); // result1 will be 5, as 10 is clamped to the bound 5\n * const result2 = clamp(10, 5, 15); // result2 will be 10, as it is within the bounds 5 and 15\n * const result3 = clamp(2, 5, 15); // result3 will be 5, as 2 is clamped to the lower bound 5\n * const result4 = clamp(20, 5, 15); // result4 will be 15, as 20 is clamped to the upper bound 15\n */\nexport function clamp(value: number, bound1: number, bound2?: number): number {\n  if (bound2 == null) {\n    return Math.min(value, bound1);\n  }\n\n  return Math.min(Math.max(value, bound1), bound2);\n}\n"
  },
  {
    "path": "src/math/inRange.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { inRange } from './inRange';\n\ndescribe('inRange', () => {\n  it('returns true for values within the range when two parameters are provided', () => {\n    expect(inRange(3, 5)).toBe(true);\n    expect(inRange(3.2, 5.3)).toBe(true);\n  });\n\n  it('returns false for values outside the range when two parameters are provided', () => {\n    expect(inRange(3, 2)).toBe(false);\n    expect(inRange(5.3, 3.2)).toBe(false);\n  });\n\n  it('returns true for values within the range when three parameters are provided', () => {\n    expect(inRange(1, 0, 5)).toBe(true);\n    expect(inRange(-3, -5, -1)).toBe(true);\n  });\n\n  it('returns false for values outside the range when three parameters are provided', () => {\n    expect(inRange(1, 2, 5)).toBe(false);\n    expect(inRange(-5, -3, -1)).toBe(false);\n  });\n\n  it('throws an error if the minimum is greater or equal than the maximum', () => {\n    expect(() => inRange(1, 5, 2)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: The maximum value must be greater than the minimum value.]`\n    );\n  });\n});\n"
  },
  {
    "path": "src/math/inRange.ts",
    "content": "/**\n * Checks if the value is less than the maximum.\n *\n * @param {number} value The value to check.\n * @param {number} maximum The upper bound of the range (exclusive).\n * @returns {boolean} `true` if the value is less than the maximum, otherwise `false`.\n *\n * @example\n * const result = inRange(3, 5); // result will be true.\n * const result2 = inRange(5, 5); // result2 will be false.\n */\nexport function inRange(value: number, maximum: number): boolean;\n\n/**\n * Checks if the value is within the range defined by minimum (inclusive) and maximum (exclusive).\n *\n * @param {number} value The value to check.\n * @param {number} minimum The lower bound of the range (inclusive).\n * @param {number} maximum The upper bound of the range (exclusive).\n * @returns {boolean} `true` if the value is within the specified range, otherwise `false`.\n *\n * @example\n * const result = inRange(3, 2, 5); // result will be true.\n * const result2 = inRange(1, 2, 5); // result2 will be false.\n */\nexport function inRange(value: number, minimum: number, maximum: number): boolean;\n\n/**\n * Checks if the value is within a specified range.\n *\n * @param {number} value The value to check.\n * @param {number} minimum The lower bound of the range (inclusive).\n * @param {number} maximum The upper bound of the range (exclusive).\n * @returns {boolean} `true` if the value is within the specified range, otherwise `false`.\n * @throws {Error} Throws an error if the `minimum` is greater or equal than the `maximum`.\n *\n * @example\n * const result1 = inRange(3, 5); // result1 will be true.\n * const result2 = inRange(1, 2, 5); // result2 will be false.\n * const result3 = inRange(1, 5, 2); // If the minimum is greater or equal than the maximum, an error is thrown.\n */\nexport function inRange(value: number, minimum: number, maximum?: number): boolean {\n  if (maximum == null) {\n    maximum = minimum;\n    minimum = 0;\n  }\n\n  if (minimum >= maximum) {\n    throw new Error('The maximum value must be greater than the minimum value.');\n  }\n\n  return minimum <= value && value < maximum;\n}\n"
  },
  {
    "path": "src/math/index.ts",
    "content": "export { clamp } from './clamp.ts';\nexport { inRange } from './inRange.ts';\nexport { mean } from './mean.ts';\nexport { meanBy } from './meanBy.ts';\nexport { median } from './median.ts';\nexport { medianBy } from './medianBy.ts';\nexport { random } from './random.ts';\nexport { randomInt } from './randomInt.ts';\nexport { range } from './range.ts';\nexport { rangeRight } from './rangeRight.ts';\nexport { round } from './round.ts';\nexport { sum } from './sum.ts';\nexport { sumBy } from './sumBy.ts';\n"
  },
  {
    "path": "src/math/mean.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mean } from './mean';\n\ndescribe('mean', () => {\n  it('returns the average of the function', () => {\n    expect(mean([1, 2, 3, 4, 5])).toEqual(3);\n  });\n\n  it('returns NaN for empty arrays', () => {\n    expect(mean([])).toEqual(NaN);\n  });\n});\n"
  },
  {
    "path": "src/math/mean.ts",
    "content": "import { sum } from './sum.ts';\n\n/**\n * Calculates the average of an array of numbers.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @param {number[]} nums - An array of numbers to calculate the average.\n * @returns {number} The average of all the numbers in the array.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * const result = mean(numbers);\n * // result will be 3\n */\nexport function mean(nums: readonly number[]): number {\n  return sum(nums) / nums.length;\n}\n"
  },
  {
    "path": "src/math/meanBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { meanBy } from './meanBy';\n\ndescribe('meanBy', () => {\n  it('calculates the mean of values extracted from objects', () => {\n    const result = meanBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a);\n\n    expect(result).toEqual(2);\n  });\n\n  it('returns NaN for empty arrays', () => {\n    type Person = { name: string; age: number };\n    const people: Person[] = [];\n\n    expect(meanBy(people, x => x.age)).toEqual(NaN);\n  });\n});\n"
  },
  {
    "path": "src/math/meanBy.ts",
    "content": "import { sumBy } from './sumBy';\n\n/**\n * Calculates the average of an array of numbers when applying\n * the `getValue` function to each element.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items An array to calculate the average.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {number} The average of all the numbers as determined by the `getValue` function.\n *\n * @example\n * meanBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: 2\n * meanBy([], x => x.a); // Returns: NaN\n */\nexport function meanBy<T>(items: readonly T[], getValue: (element: T) => number): number {\n  return sumBy(items, item => getValue(item)) / items.length;\n}\n"
  },
  {
    "path": "src/math/median.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { median } from './median';\n\ndescribe('median', () => {\n  it('returns the median for an odd number of elements', () => {\n    expect(median([1, 2, 3, 4, 5])).toEqual(3);\n  });\n\n  it('returns the average of two middle elements for an even number of elements', () => {\n    expect(median([1, 2, 3, 4])).toEqual(2.5);\n  });\n\n  it('returns the correct median for unsorted arrays', () => {\n    expect(median([5, 2, 1, 4, 3])).toEqual(3);\n  });\n\n  it('returns NaN for empty arrays', () => {\n    expect(median([])).toEqual(NaN);\n  });\n\n  it('returns the single element for arrays with one element', () => {\n    expect(median([42])).toEqual(42);\n  });\n});\n"
  },
  {
    "path": "src/math/median.ts",
    "content": "/**\n * Calculates the median of an array of numbers.\n *\n * The median is the middle value of a sorted array.\n * If the array has an odd number of elements, the median is the middle value.\n * If the array has an even number of elements, it returns the average of the two middle values.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @param {number[]} nums - An array of numbers to calculate the median.\n * @returns {number} The median of all the numbers in the array.\n *\n * @example\n * const arrayWithOddNumberOfElements = [1, 2, 3, 4, 5];\n * const result = median(arrayWithOddNumberOfElements);\n * // result will be 3\n *\n * @example\n * const arrayWithEvenNumberOfElements = [1, 2, 3, 4];\n * const result = median(arrayWithEvenNumberOfElements);\n * // result will be 2.5\n */\nexport function median(nums: readonly number[]): number {\n  if (nums.length === 0) {\n    return NaN;\n  }\n\n  const sorted = nums.slice().sort((a, b) => a - b);\n  const middleIndex = Math.floor(sorted.length / 2);\n\n  if (sorted.length % 2 === 0) {\n    return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2;\n  } else {\n    return sorted[middleIndex];\n  }\n}\n"
  },
  {
    "path": "src/math/medianBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { medianBy } from './medianBy';\n\ndescribe('medianBy', () => {\n  it('calculates the median of values extracted from objects with odd number of elements', () => {\n    const result = medianBy([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }, { a: 5 }], x => x.a);\n    expect(result).toEqual(3);\n  });\n\n  it('calculates the median of values extracted from objects with even number of elements', () => {\n    const result = medianBy([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }], x => x.a);\n    expect(result).toEqual(2.5);\n  });\n\n  it('returns the correct median for unsorted values', () => {\n    const result = medianBy([{ a: 5 }, { a: 2 }, { a: 1 }, { a: 4 }, { a: 3 }], x => x.a);\n    expect(result).toEqual(3);\n  });\n\n  it('returns NaN for empty arrays', () => {\n    type Person = { name: string; age: number };\n    const people: Person[] = [];\n    expect(medianBy(people, x => x.age)).toEqual(NaN);\n  });\n\n  it('returns the single element for arrays with one element', () => {\n    expect(medianBy([{ a: 42 }], x => x.a)).toEqual(42);\n  });\n});\n"
  },
  {
    "path": "src/math/medianBy.ts",
    "content": "import { median } from './median.ts';\n\n/**\n * Calculates the median of an array of elements when applying\n * the `getValue` function to each element.\n *\n * The median is the middle value of a sorted array.\n * If the array has an odd number of elements, the median is the middle value.\n * If the array has an even number of elements, it returns the average of the two middle values.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items An array to calculate the median.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {number} The median of all the numbers as determined by the `getValue` function.\n *\n * @example\n * medianBy([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }, { a: 5 }], x => x.a); // Returns: 3\n * medianBy([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }], x => x.a); // Returns: 2.5\n * medianBy([], x => x.a); // Returns: NaN\n */\nexport function medianBy<T>(items: readonly T[], getValue: (element: T) => number): number {\n  const nums = items.map(x => getValue(x));\n\n  return median(nums);\n}\n"
  },
  {
    "path": "src/math/random.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { random } from './random';\n\ndescribe('random', () => {\n  it('generates a random floating-point number between min (inclusive) and max (exclusive)', () => {\n    const min = 0;\n    const max = 5;\n    for (let i = 0; i < 100; i++) {\n      const result = random(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n    }\n  });\n\n  it('generates a random floating-point between 0 and max (exclusive)', () => {\n    for (let i = 0; i < 100; i++) {\n      const result = random(5);\n      expect(result).toBeGreaterThanOrEqual(0);\n      expect(result).toBeLessThan(5);\n    }\n  });\n\n  it('throws an error if min is greater than max', () => {\n    const min = 5;\n    const max = 0;\n    expect(() => random(min, max)).toThrow('Invalid input: The maximum value must be greater than the minimum value.');\n  });\n\n  it('handles edge cases where min and max are the same', () => {\n    const min = 5;\n    const max = 5;\n    expect(() => random(min, max)).toThrow('Invalid input: The maximum value must be greater than the minimum value.');\n  });\n\n  it('works with negative ranges', () => {\n    const min = -10;\n    const max = -1;\n    for (let i = 0; i < 100; i++) {\n      const result = random(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n    }\n  });\n\n  it('works with a mix of negative and positive ranges', () => {\n    const min = -5;\n    const max = 5;\n    for (let i = 0; i < 100; i++) {\n      const result = random(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n    }\n  });\n});\n"
  },
  {
    "path": "src/math/random.ts",
    "content": "/**\n * Generate a random number within the given range.\n *\n * If only one argument is provided, a number between `0` and the given number is returned.\n *\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random number between 0 (inclusive) and maximum (exclusive). The number can be an integer or a decimal.\n * @throws {Error} Throws an error if `maximum` is not greater than `0`.\n *\n * @example\n * const result1 = random(5); // Returns a random number between 0 and 5.\n * const result2 = random(0); // If the `maximum` is less than or equal to 0, an error is thrown.\n */\nexport function random(maximum: number): number;\n\n/**\n * Generate a random number within the given range.\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random number between minimum (inclusive) and maximum (exclusive). The number can be an integer or a decimal.\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result1 = random(0, 5); // Returns a random number between 0 and 5.\n * const result2 = random(5, 0); // If the minimum is greater than the maximum, an error is thrown.\n * const result3 = random(5, 5); // If the minimum is equal to the maximum, an error is thrown.\n */\nexport function random(minimum: number, maximum: number): number;\n\n/**\n * Generate a random number within the given range.\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random number between minimum (inclusive) and maximum (exclusive). The number can be an integer or a decimal.\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result1 = random(0, 5); // Returns a random number between 0 and 5.\n * const result2 = random(5, 0); // If the minimum is greater than the maximum, an error is thrown.\n * const result3 = random(5, 5); // If the minimum is equal to the maximum, an error is thrown.\n */\nexport function random(minimum: number, maximum?: number): number {\n  if (maximum == null) {\n    maximum = minimum;\n    minimum = 0;\n  }\n\n  if (minimum >= maximum) {\n    throw new Error('Invalid input: The maximum value must be greater than the minimum value.');\n  }\n\n  return Math.random() * (maximum - minimum) + minimum;\n}\n"
  },
  {
    "path": "src/math/randomInt.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { randomInt } from './randomInt';\n\ndescribe('randomInt', () => {\n  it('generates a random integer between min (inclusive) and max (exclusive)', () => {\n    const min = 0;\n    const max = 5;\n    for (let i = 0; i < 100; i++) {\n      const result = randomInt(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n      expect(Number.isInteger(result)).toBe(true);\n    }\n  });\n\n  it('generates a random integer between 0 (inclusive) and max (exclusive)', () => {\n    for (let i = 0; i < 100; i++) {\n      const result = randomInt(5);\n      expect(result).toBeGreaterThanOrEqual(0);\n      expect(result).toBeLessThan(5);\n      expect(Number.isInteger(result)).toBe(true);\n    }\n  });\n\n  it('throws an error if min is greater than max', () => {\n    const min = 5;\n    const max = 0;\n    expect(() => randomInt(min, max)).toThrow(\n      'Invalid input: The maximum value must be greater than the minimum value.'\n    );\n  });\n\n  it('handles edge cases where min and max are the same', () => {\n    const min = 5;\n    const max = 5;\n    expect(() => randomInt(min, max)).toThrow(\n      'Invalid input: The maximum value must be greater than the minimum value.'\n    );\n  });\n\n  it('works with negative ranges', () => {\n    const min = -10;\n    const max = -1;\n    for (let i = 0; i < 100; i++) {\n      const result = randomInt(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n      expect(Number.isInteger(result)).toBe(true);\n    }\n  });\n\n  it('works with a mix of negative and positive ranges', () => {\n    const min = -5;\n    const max = 5;\n    for (let i = 0; i < 100; i++) {\n      const result = randomInt(min, max);\n      expect(result).toBeGreaterThanOrEqual(min);\n      expect(result).toBeLessThan(max);\n      expect(Number.isInteger(result)).toBe(true);\n    }\n  });\n});\n"
  },
  {
    "path": "src/math/randomInt.ts",
    "content": "import { random } from './random.ts';\n\n/**\n * Generates a random integer between 0 (inclusive) and the given maximum (exclusive).\n *\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random integer between 0 (inclusive) and maximum (exclusive).\n * @throws {Error} Throws an error if `maximum` is not greater than `0`.\n *\n * @example\n * const result = randomInt(5); // result will be a random integer between 0 (inclusive) and 5 (exclusive)\n */\nexport function randomInt(maximum: number): number;\n\n/**\n * Generates a random integer between minimum (inclusive) and maximum (exclusive).\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random integer between minimum (inclusive) and maximum (exclusive).\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result = randomInt(0, 5); // result will be a random integer between 0 (inclusive) and 5 (exclusive)\n * const result2 = randomInt(5, 0); // This will throw an error\n */\nexport function randomInt(minimum: number, maximum: number): number;\n\n/**\n * Generates a random integer between minimum (inclusive) and maximum (exclusive).\n *\n * If only one argument is provided, a number between `0` and the given number is returned.\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random integer between minimum (inclusive) and maximum (exclusive).\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result = randomInt(0, 5); // result will be a random integer between 0 (inclusive) and 5 (exclusive)\n * const result2 = randomInt(5, 0); // This will throw an error\n */\nexport function randomInt(minimum: number, maximum?: number): number {\n  return Math.floor(random(minimum, maximum!));\n}\n"
  },
  {
    "path": "src/math/range.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { range } from './range';\n\ndescribe('range', () => {\n  it('returns 0, 1, 2, 3 for range 0 to 4', () => {\n    expect(range(4)).toEqual([0, 1, 2, 3]);\n    expect(range(0, 4)).toEqual([0, 1, 2, 3]);\n  });\n\n  it('returns an empty array for range 0 to -4', () => {\n    expect(range(-4)).toEqual([]);\n    expect(range(0, -4)).toEqual([]);\n  });\n\n  it('can have positive step', () => {\n    expect(range(0, 20, 5)).toEqual([0, 5, 10, 15]);\n  });\n\n  it('returns an empty array when the step is negative', () => {\n    expect(range(0, 4, -1)).toEqual([]);\n  });\n\n  it('throws an error when step is zero', () => {\n    expect(() => range(1, 4, 0)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: The step value must be a non-zero integer.]`\n    );\n  });\n\n  it('returns an empty array when for range 0 to 0', () => {\n    expect(range(0)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/math/range.ts",
    "content": "/**\n * Returns an array of numbers from `0` (inclusive) to `end` (exclusive), incrementing by `1`.\n *\n * @param {number} end - The end number of the range (exclusive).\n * @returns {number[]} An array of numbers from `0` (inclusive) to `end` (exclusive) with a step of `1`.\n *\n * @example\n * // Returns [0, 1, 2, 3]\n * range(4);\n */\nexport function range(end: number): number[];\n\n/**\n * Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `1`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with a step of `1`.\n *\n * @example\n * // Returns [1, 2, 3]\n * range(1, 4);\n */\nexport function range(start: number, end: number): number[];\n\n/**\n * Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @param {number} step - The step value for the range.\n * @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with the specified `step`.\n *\n * @example\n * // Returns [0, 5, 10, 15]\n * range(0, 20, 5);\n */\nexport function range(start: number, end: number, step: number): number[];\n\n/**\n * Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @param {number} step - The step value for the range.\n * @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with the specified `step`.\n * @throws {Error} Throws an error if the step value is not a non-zero integer.\n *\n * @example\n * // Returns [0, 1, 2, 3]\n * range(4);\n *\n * @example\n * // Returns [0, -1, -2, -3]\n * range(0, -4, -1);\n */\nexport function range(start: number, end?: number, step = 1): number[] {\n  if (end == null) {\n    end = start;\n    start = 0;\n  }\n\n  if (!Number.isInteger(step) || step === 0) {\n    throw new Error(`The step value must be a non-zero integer.`);\n  }\n\n  const length = Math.max(Math.ceil((end - start) / step), 0);\n  const result = new Array<number>(length);\n\n  for (let i = 0; i < length; i++) {\n    result[i] = start + i * step;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/math/rangeRight.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { rangeRight } from './rangeRight';\n\ndescribe('rangeRight', () => {\n  it('returns 3, 2, 1, 0 for rangeRight 0 to 4', () => {\n    expect(rangeRight(4)).toEqual([3, 2, 1, 0]);\n    expect(rangeRight(0, 4)).toEqual([3, 2, 1, 0]);\n  });\n\n  it('returns an empty array for rangeRight 0 to -4', () => {\n    expect(rangeRight(-4)).toEqual([]);\n    expect(rangeRight(0, -4)).toEqual([]);\n  });\n\n  it('can have positive step', () => {\n    expect(rangeRight(0, 20, 5)).toEqual([15, 10, 5, 0]);\n  });\n\n  it('returns an empty array when the step is negative', () => {\n    expect(rangeRight(0, 4, -1)).toEqual([]);\n  });\n\n  it('throws an error when step is zero', () => {\n    expect(() => rangeRight(1, 4, 0)).toThrowErrorMatchingInlineSnapshot(\n      `[Error: The step value must be a non-zero integer.]`\n    );\n  });\n\n  it('returns an empty array when for rangeRight 0 to 0', () => {\n    expect(rangeRight(0)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/math/rangeRight.ts",
    "content": "/**\n * Returns an array of numbers from `end` (exclusive) to `0` (inclusive), decrementing by `1`.\n *\n * @param {number} end - The end number of the range (exclusive).\n * @returns {number[]} An array of numbers from `end` (exclusive) to `0` (inclusive) with a step of `1`.\n *\n * @example\n * // Returns [3, 2, 1, 0]\n * rangeRight(4);\n */\nexport function rangeRight(end: number): number[];\n\n/**\n * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `1`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with a step of `1`.\n *\n * @example\n * // Returns [3, 2, 1]\n * rangeRight(1, 4);\n */\nexport function rangeRight(start: number, end: number): number[];\n\n/**\n * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @param {number} step - The step value for the range.\n * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with the specified `step`.\n *\n * @example\n * // Returns [15, 10, 5, 0]\n * rangeRight(0, 20, 5);\n */\nexport function rangeRight(start: number, end: number, step: number): number[];\n\n/**\n * Returns an array of numbers from `end` (exclusive) to `start` (inclusive), decrementing by `step`.\n *\n * @param {number} start - The starting number of the range (inclusive).\n * @param {number} end - The end number of the range (exclusive).\n * @param {number} step - The step value for the range.\n * @returns {number[]} An array of numbers from `end` (exclusive) to `start` (inclusive) with the specified `step`.\n * @throws {Error} Throws an error if the step value is not a non-zero integer.\n *\n * @example\n * // Returns [3, 2, 1, 0]\n * rangeRight(4);\n *\n * @example\n * // Returns [-3, -2, -1, 0]\n * rangeRight(0, -4, -1);\n */\nexport function rangeRight(start: number, end?: number, step = 1): number[] {\n  if (end == null) {\n    end = start;\n    start = 0;\n  }\n\n  if (!Number.isInteger(step) || step === 0) {\n    throw new Error(`The step value must be a non-zero integer.`);\n  }\n\n  const length = Math.max(Math.ceil((end - start) / step), 0);\n  const result = new Array(length);\n\n  for (let i = 0; i < length; i++) {\n    result[i] = start + (length - i - 1) * step;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/math/round.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { round } from './round';\n\ndescribe('round function', () => {\n  it('rounds a number to zero decimal places by default', () => {\n    expect(round(1.5)).toBe(2);\n    expect(round(1.4)).toBe(1);\n    // JavaScript는 반올림 하는 부분이 정확히 음수 0.5라면 +∞방향, 즉, 정수로 반올림 한다.\n    // If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞. (positive number)\n    expect(round(-1.5)).toBe(-1);\n  });\n\n  it('rounds a number to a specified number of decimal places', () => {\n    expect(round(1.2345, 2)).toBe(1.23);\n    expect(round(1.2365, 2)).toBe(1.24);\n    expect(round(-1.2345, 2)).toBe(-1.23);\n    expect(round(-1.2365, 2)).toBe(-1.24);\n  });\n\n  it('handles zero precision as default precision', () => {\n    expect(round(1.999)).toBe(2);\n    expect(round(-1.999)).toBe(-2);\n  });\n\n  it('handles negative numbers properly', () => {\n    // JavaScript는 반올림 하는 부분이 정확히 음수 0.5라면 +∞방향, 즉, 정수로 반올림 한다.\n    // If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞. (positive number)\n    expect(round(-1.2345, 3)).toBe(-1.234);\n    expect(round(-1.2344, 3)).toBe(-1.234);\n  });\n\n  it('rounds correctly at high precision levels', () => {\n    expect(round(1.123456789, 5)).toBe(1.12346);\n    expect(round(-1.123456789, 5)).toBe(-1.12346);\n  });\n\n  it('rounds correctly with edge cases', () => {\n    expect(round(1.25, 1)).toBe(1.3);\n    // JavaScript는 반올림 하는 부분이 정확히 음수 0.5라면 +∞방향, 즉, 정수로 반올림 한다.\n    // If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞. (positive number)\n    expect(round(-1.25, 1)).toBe(-1.2);\n    // JavaScript는 일반적인 다른 언어들과 다르게 Round half to even 으로 동작하지 않는다.\n    // The round function in JavaScript does not work as 'Round half to Even'\n    expect(round(-1.35, 1)).toBe(-1.3);\n  });\n\n  it('works with zero', () => {\n    expect(round(0)).toBe(0);\n  });\n\n  it('works with precision leading to no rounding', () => {\n    expect(round(8.88888, 5)).toBe(8.88888);\n  });\n\n  it('handles edge cases where precision is not integer', () => {\n    const value = 1.2345;\n    const precision = 3.1;\n    expect(() => round(value, precision)).toThrow('Precision must be an integer.');\n  });\n});\n"
  },
  {
    "path": "src/math/round.ts",
    "content": "/**\n * Rounds a number to a specified precision.\n *\n * This function takes a number and an optional precision value, and returns the number rounded\n * to the specified number of decimal places.\n *\n * @param {number} value - The number to round.\n * @param {number} [precision=0] - The number of decimal places to round to. Defaults to 0.\n * @returns {number} The rounded number.\n * @throws {Error} Throws an error if `Precision` is not integer.\n *\n * @example\n * const result1 = round(1.2345); // result1 will be 1\n * const result2 = round(1.2345, 2); // result2 will be 1.23\n * const result3 = round(1.2345, 3); // result3 will be 1.235\n * const result4 = round(1.2345, 3.1); // This will throw an error\n */\nexport function round(value: number, precision = 0): number {\n  if (!Number.isInteger(precision)) {\n    throw new Error('Precision must be an integer.');\n  }\n  const multiplier = Math.pow(10, precision);\n  return Math.round(value * multiplier) / multiplier;\n}\n"
  },
  {
    "path": "src/math/sum.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { sum } from './sum';\n\ndescribe('sum function', () => {\n  it('calculates the sum of an array of numbers', () => {\n    const result = sum([1, 2, 3, 4]);\n    expect(result).toBe(10);\n  });\n\n  it('returns 0 for an empty array', () => {\n    const result = sum([]);\n    expect(result).toBe(0);\n  });\n\n  it('handles arrays with negative numbers', () => {\n    const result = sum([-1, -2, -3, 4]);\n    expect(result).toBe(-2);\n  });\n\n  it('ensures that adding the sums of two arrays equals the sum of their concatenation.', () => {\n    const array1: number[] = [];\n    const array2 = [1, 2, 3, 4];\n\n    expect(sum(array1) + sum(array2)).toBe(sum([...array1, ...array2]));\n  });\n});\n"
  },
  {
    "path": "src/math/sum.ts",
    "content": "/**\n * Calculates the sum of an array of numbers.\n *\n * This function takes an array of numbers and returns the sum of all the elements in the array.\n *\n * @param {number[]} nums - An array of numbers to be summed.\n * @returns {number} The sum of all the numbers in the array.\n *\n * @example\n * const numbers = [1, 2, 3, 4, 5];\n * const result = sum(numbers);\n * // result will be 15\n */\nexport function sum(nums: readonly number[]): number {\n  let result = 0;\n\n  for (let i = 0; i < nums.length; i++) {\n    result += nums[i];\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/math/sumBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { sumBy } from './sumBy.ts';\n\ndescribe('sumBy function', () => {\n  it('calculates the sum of values extracted from objects', () => {\n    const result = sumBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a);\n    expect(result).toBe(6);\n  });\n\n  it('returns 0 for empty arrays', () => {\n    type Person = { name: string; age: number };\n    const people: Person[] = [];\n\n    expect(sumBy(people, x => x.age)).toEqual(0);\n  });\n\n  it('ensures that adding the sums of two arrays equals the sum of their concatenation.', () => {\n    const array1: Array<{ a: number }> = [];\n    const array2 = [{ a: 1 }, { a: 2 }, { a: 3 }];\n\n    expect(sumBy(array1, x => x.a) + sumBy(array2, x => x.a)).toBe(sumBy([...array1, ...array2], x => x.a));\n  });\n\n  it('can access its zero‑based index in the array.', () => {\n    const result = sumBy([{ a: 1 }, { a: 2 }, { a: 3 }], (x, i) => x.a * i);\n    expect(result).toBe(8);\n  });\n});\n"
  },
  {
    "path": "src/math/sumBy.ts",
    "content": "/**\n * Calculates the sum of an array of numbers when applying\n * the `getValue` function to each element.\n *\n * If the array is empty, this function returns `0`.\n *\n * @template T - The type of elements in the array.\n * @param {readonly T[]} items - An array to calculate the sum.\n * @param {(element: T, index: number) => number} getValue - A function that selects a numeric value from each element.\n *   It receives the element and its zero‑based index in the array.\n * @returns {number} The sum of all the numbers as determined by the `getValue` function.\n *\n * @example\n * sumBy([{ a: 1 }, { a: 2 }, { a: 3 }], (x, i) => x.a * i); // Returns: 8\n * sumBy([], () => 1); // Returns: 0\n */\nexport function sumBy<T>(items: readonly T[], getValue: (element: T, index: number) => number): number {\n  let result = 0;\n\n  for (let i = 0; i < items.length; i++) {\n    result += getValue(items[i], i);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/clone.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { clone } from './clone';\n\ndescribe('clone', () => {\n  it('should return primitive values as is', () => {\n    const symbol = Symbol('symbol');\n\n    expect(clone(42)).toBe(42);\n    expect(clone('es-toolkit')).toBe('es-toolkit');\n    expect(clone(symbol)).toBe(symbol);\n    expect(clone(true)).toBe(true);\n    expect(clone(null)).toBe(null);\n    expect(clone(undefined)).toBe(undefined);\n    expect(clone(42n)).toBe(42n);\n  });\n\n  it('should clone arrays', () => {\n    const arr = [1, 2, 3];\n    const clonedArr = clone(arr);\n\n    expect(clonedArr).toEqual(arr);\n    expect(clonedArr).not.toBe(arr);\n  });\n\n  it('should clone ArrayBuffer', () => {\n    const buffer = new ArrayBuffer(8);\n    const clonedBuffer = clone(buffer);\n\n    expect(clonedBuffer).toEqual(buffer);\n    expect(clonedBuffer).not.toBe(buffer);\n    expect(clonedBuffer).toBeInstanceOf(ArrayBuffer);\n\n    expect(clonedBuffer.byteLength).toBe(buffer.byteLength);\n    expect(new Uint8Array(clonedBuffer)).toEqual(new Uint8Array(buffer));\n  });\n\n  it('should clone buffers', () => {\n    const buffer = Buffer.from([1, 2, 3]);\n    const clonedBuffer = clone(buffer);\n\n    expect(clonedBuffer).toEqual(buffer);\n    expect(clonedBuffer).not.toBe(buffer);\n    expect(clonedBuffer).toBeInstanceOf(Buffer);\n\n    expect(clonedBuffer.length).toBe(buffer.length);\n  });\n\n  it('should clone SharedArrayBuffer', () => {\n    const buffer = new SharedArrayBuffer(8);\n    const clonedBuffer = clone(buffer);\n\n    expect(clonedBuffer).toEqual(buffer);\n    expect(clonedBuffer).not.toBe(buffer);\n    expect(clonedBuffer).toBeInstanceOf(SharedArrayBuffer);\n\n    expect(clonedBuffer.byteLength).toBe(buffer.byteLength);\n    expect(new Uint8Array(clonedBuffer)).toEqual(new Uint8Array(buffer));\n  });\n\n  it('should clone objects', () => {\n    const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n    const clonedObj = clone(obj);\n\n    expect(clonedObj).toEqual(obj);\n    expect(clonedObj).not.toBe(obj);\n  });\n\n  it('should clone objects with a null prototype', () => {\n    const obj = Object.create(null);\n    const clonedObj = clone(obj);\n\n    expect(clonedObj).toEqual(obj);\n    expect(clonedObj).not.toBe(obj);\n  });\n\n  it('should clone custom classes', () => {\n    class Person {\n      constructor(\n        public name: string,\n        public age: number\n      ) {}\n\n      greet() {\n        return `Hello, my name is ${this.name}`;\n      }\n    }\n\n    const person = new Person('es-toolkit', 100);\n    const clonedPerson = clone(person);\n\n    expect(clonedPerson).toEqual(person);\n    expect(clonedPerson).not.toBe(person);\n    expect(clonedPerson.greet).toBe(person.greet);\n    expect(clonedPerson).toBeInstanceOf(Person);\n  });\n\n  it('should clone dates', () => {\n    const date = new Date();\n    const clonedDate = clone(date);\n\n    expect(clonedDate).toEqual(date);\n    expect(clonedDate).not.toBe(date);\n    expect(clonedDate).toBeInstanceOf(Date);\n  });\n\n  it('should clone regular expressions', () => {\n    const regex = /abc/gsu;\n    regex.lastIndex = 10;\n    const clonedRegex = clone(regex);\n\n    expect(clonedRegex).toEqual(regex);\n    expect(clonedRegex).not.toBe(regex);\n    expect(clonedRegex).toBeInstanceOf(RegExp);\n\n    expect(clonedRegex.source).toBe(regex.source);\n    expect(clonedRegex.flags).toBe(regex.flags);\n    expect(clonedRegex.lastIndex).toBe(regex.lastIndex);\n  });\n\n  it('should shallow clone nested objects', () => {\n    const nestedObj = { a: [1, 2, 3], b: { c: 'es-toolkit' }, d: new Date() };\n    const clonedNestedObj = clone(nestedObj);\n\n    expect(clonedNestedObj).toEqual(nestedObj);\n    expect(clonedNestedObj).not.toBe(nestedObj);\n    expect(clonedNestedObj.a).toEqual(nestedObj.a);\n    expect(clonedNestedObj.a[2]).toEqual(nestedObj.a[2]);\n  });\n\n  it('should return functions as is', () => {\n    const func = () => {};\n    const clonedFunc = clone(func);\n\n    expect(clonedFunc).toBe(func);\n  });\n\n  it('should clone sets', () => {\n    const set = new Set([1, 2, 3]);\n    const clonedSet = clone(set);\n\n    expect(clonedSet).toEqual(set);\n    expect(clonedSet).not.toBe(set);\n    expect(clonedSet).toBeInstanceOf(Set);\n  });\n\n  it('should clone maps', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n    const clonedMap = clone(map);\n\n    expect(clonedMap).toEqual(map);\n    expect(clonedMap).not.toBe(map);\n    expect(clonedMap).toBeInstanceOf(Map);\n  });\n\n  it('should clone typed arrays', () => {\n    const typedArray = new Uint8Array([1, 2, 3]);\n    const clonedTypedArray = clone(typedArray);\n\n    expect(clonedTypedArray).toEqual(typedArray);\n    expect(clonedTypedArray).not.toBe(typedArray);\n    expect(clonedTypedArray).toBeInstanceOf(Uint8Array);\n  });\n\n  it('should clone BigInt64Array', () => {\n    const bigIntArray = new BigInt64Array([1n, 2n, 3n]);\n    const clonedBigIntArray = clone(bigIntArray);\n\n    expect(clonedBigIntArray).toEqual(bigIntArray);\n    expect(clonedBigIntArray).not.toBe(bigIntArray);\n    expect(clonedBigIntArray).toBeInstanceOf(BigInt64Array);\n  });\n\n  it('should clone Data views', () => {\n    const buffer = new ArrayBuffer(8);\n    const dataView = new DataView(buffer);\n    const clonedDataView = clone(dataView);\n\n    expect(clonedDataView).toEqual(dataView);\n    expect(clonedDataView).not.toBe(dataView);\n    expect(clonedDataView).toBeInstanceOf(DataView);\n  });\n\n  it('should clone File', async () => {\n    if (typeof File === 'undefined') {\n      return;\n    }\n\n    const file = new File(['Hello'], 'file.txt', { type: 'text/plain' });\n    const clonedFile = clone(file);\n\n    expect(clonedFile).toEqual(file);\n    expect(clonedFile).not.toBe(file);\n    expect(clonedFile).toBeInstanceOf(File);\n\n    expect(clonedFile.size).toBe(file.size);\n    expect(clonedFile.type).toBe(file.type);\n    await expect(clonedFile.text()).resolves.toBe('Hello');\n  });\n\n  it('should clone Blob', async () => {\n    const blob = new Blob(['Hello'], { type: 'text/plain' });\n    const clonedBlob = clone(blob);\n\n    expect(clonedBlob).toEqual(blob);\n    expect(clonedBlob).not.toBe(blob);\n    expect(clonedBlob).toBeInstanceOf(Blob);\n\n    expect(clonedBlob.size).toBe(blob.size);\n    expect(clonedBlob.type).toBe(blob.type);\n    await expect(clonedBlob.text()).resolves.toBe('Hello');\n  });\n\n  it('should clone Error', () => {\n    const error = new Error('Something went wrong', { cause: 'Unknown' });\n    const clonedError = clone(error);\n\n    expect(clonedError).toEqual(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError).toBeInstanceOf(Error);\n\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.cause).toBe(error.cause);\n\n    const aggregateError = new AggregateError([new Error('First'), new Error('Second')], 'Multiple errors occurred');\n    const clonedAggregateError = clone(aggregateError);\n\n    expect(clonedAggregateError).toEqual(aggregateError);\n    expect(clonedAggregateError).not.toBe(aggregateError);\n    expect(clonedAggregateError).toBeInstanceOf(AggregateError);\n\n    expect(clonedAggregateError.message).toBe(aggregateError.message);\n    expect(clonedAggregateError.stack).toBe(aggregateError.stack);\n    expect(clonedAggregateError.name).toBe(aggregateError.name);\n    expect(clonedAggregateError.errors).toEqual(aggregateError.errors);\n  });\n\n  it('should clone Custom Error', () => {\n    class CustomError extends Error {\n      name: string;\n      custom?: string;\n      constructor(message: string) {\n        super(message);\n        this.name = 'CustomError';\n      }\n    }\n\n    const error = new CustomError('Something went wrong');\n    error.custom = 'Custom property';\n    const clonedError = clone(error);\n\n    expect(clonedError).toEqual(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError).toBeInstanceOf(CustomError);\n\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect((clonedError as CustomError).custom).toBe((error as CustomError).custom);\n  });\n\n  it('should clone class instance', () => {\n    class CustomClass {\n      value: number;\n\n      constructor(value: number) {\n        this.value = value;\n      }\n\n      getValue() {\n        return this.value;\n      }\n    }\n\n    const instance = new CustomClass(123);\n    const clonedInstance = clone(instance);\n\n    expect(clonedInstance).toEqual(instance);\n    expect(clonedInstance).not.toBe(instance);\n    expect(clonedInstance).toBeInstanceOf(CustomClass);\n\n    expect(clonedInstance.value).toBe(instance.value);\n    expect(clonedInstance.getValue()).toBe(123);\n  });\n});\n"
  },
  {
    "path": "src/object/clone.ts",
    "content": "import { isPrimitive } from '../predicate/isPrimitive.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\n\n/**\n * Creates a shallow clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n */\nexport function clone<T>(obj: T): T {\n  if (isPrimitive(obj)) {\n    return obj;\n  }\n\n  if (\n    Array.isArray(obj) ||\n    isTypedArray(obj) ||\n    obj instanceof ArrayBuffer ||\n    (typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)\n  ) {\n    return obj.slice(0) as T;\n  }\n\n  const prototype = Object.getPrototypeOf(obj);\n\n  if (prototype == null) {\n    return Object.assign(Object.create(prototype), obj);\n  }\n\n  const Constructor = prototype.constructor;\n\n  if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {\n    return new Constructor(obj);\n  }\n\n  if (obj instanceof RegExp) {\n    const newRegExp = new Constructor(obj);\n    newRegExp.lastIndex = obj.lastIndex;\n\n    return newRegExp;\n  }\n\n  if (obj instanceof DataView) {\n    return new Constructor(obj.buffer.slice(0));\n  }\n\n  if (obj instanceof Error) {\n    let newError;\n    if (obj instanceof AggregateError) {\n      newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });\n    } else {\n      newError = new Constructor(obj.message, { cause: obj.cause });\n    }\n\n    newError.stack = obj.stack;\n    Object.assign(newError, obj);\n\n    return newError;\n  }\n\n  if (typeof File !== 'undefined' && obj instanceof File) {\n    const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });\n    return newFile;\n  }\n\n  if (typeof obj === 'object') {\n    const newObject = Object.create(prototype);\n    return Object.assign(newObject, obj);\n  }\n\n  return obj;\n}\n"
  },
  {
    "path": "src/object/cloneDeep.dom.spec.ts",
    "content": "/**\n * @vitest-environment happy-dom\n */\nimport { describe, expect, it } from 'vitest';\nimport { cloneDeep } from './cloneDeep';\n\ndescribe('cloneDeep', () => {\n  it('should not clone uncloneable objects like `HTMLElement`s', () => {\n    const element = document.createElement('div');\n    element.textContent = 'Hello, World!';\n\n    const clonedElement = cloneDeep(element);\n\n    expect(clonedElement).toBe(element);\n    expect(clonedElement.nodeType).toBe(element.nodeType);\n    expect(clonedElement.textContent).toBe('Hello, World!');\n  });\n});\n"
  },
  {
    "path": "src/object/cloneDeep.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { cloneDeep } from './cloneDeep';\n\ndescribe('cloneDeep', () => {\n  //-------------------------------------------------------------------------------------\n  // primitive\n  //-------------------------------------------------------------------------------------\n  it('should return primitive values as is', () => {\n    const symbol = Symbol('symbol');\n    expect(cloneDeep(42)).toBe(42);\n    expect(cloneDeep('es-toolkit')).toBe('es-toolkit');\n    expect(cloneDeep(symbol)).toBe(symbol);\n    expect(cloneDeep(true)).toBe(true);\n    expect(cloneDeep(null)).toBe(null);\n    expect(cloneDeep(undefined)).toBe(undefined);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // array\n  //-------------------------------------------------------------------------------------\n  it('should clone arrays', () => {\n    const arr = [1, 2, 3];\n    const clonedArr = cloneDeep(arr);\n\n    expect(clonedArr).toEqual(arr);\n    expect(clonedArr).not.toBe(arr);\n  });\n\n  it('should clone RegExp arrays', () => {\n    const arr = /test/.exec('hello test');\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n  });\n\n  it('should clone arrays with nested objects', () => {\n    const arr = [{ a: 1 }, { b: 2 }, { c: 3 }];\n    const clonedArr = cloneDeep(arr);\n    arr[0].a = 2;\n    expect(clonedArr).not.toEqual(arr);\n    expect(clonedArr).not.toBe(arr);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // object\n  //-------------------------------------------------------------------------------------\n  it('should clone objects', () => {\n    const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3], [Symbol()]: 2 };\n    const clonedObj = cloneDeep(obj);\n\n    expect(clonedObj).toEqual(obj);\n    expect(clonedObj).not.toBe(obj);\n  });\n\n  it('should deep clone nested objects', () => {\n    const nestedObj = { a: [1, 2, 3], b: { c: 'es-toolkit' }, d: new Date() };\n    const clonedNestedObj = cloneDeep(nestedObj);\n    nestedObj.a[2] = 4;\n    nestedObj.b.c = 'es-toolkit-2';\n    expect(clonedNestedObj).not.toEqual(nestedObj);\n    expect(clonedNestedObj).not.toBe(nestedObj);\n    expect(clonedNestedObj.a).not.toEqual(nestedObj.a);\n    expect(clonedNestedObj.b).not.toEqual(nestedObj.b);\n    expect(clonedNestedObj.a[0]).toEqual(nestedObj.a[0]);\n    expect(clonedNestedObj.a[2]).not.toEqual(nestedObj.a[2]);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // date\n  //-------------------------------------------------------------------------------------\n  it('should clone dates', () => {\n    const date = new Date();\n    const clonedDate = cloneDeep(date);\n\n    expect(clonedDate).toEqual(date);\n    expect(clonedDate).not.toBe(date);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // regex\n  //-------------------------------------------------------------------------------------\n  it('should clone regular expressions', () => {\n    const regex = /abc/g;\n    const clonedRegex = cloneDeep(regex);\n\n    expect(clonedRegex).toEqual(regex);\n    expect(clonedRegex).not.toBe(regex);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // set\n  //-------------------------------------------------------------------------------------\n  it('should clone sets', () => {\n    const set = new Set([1, 2, 3]);\n    const clonedSet = cloneDeep(set);\n\n    expect(clonedSet).toEqual(set);\n    expect(clonedSet).not.toBe(set);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // map\n  //-------------------------------------------------------------------------------------\n  it('should clone maps', () => {\n    const map = new Map([\n      [1, 'a'],\n      [2, 'b'],\n      [3, 'c'],\n    ]);\n    const clonedMap = cloneDeep(map);\n\n    expect(clonedMap).toEqual(map);\n    expect(clonedMap).not.toBe(map);\n  });\n\n  it('should clone map with nested objects', () => {\n    const obj = { a: 1 };\n    const map = new Map([\n      [1, obj],\n      [2, obj],\n      [3, obj],\n    ]);\n    const clonedMap = cloneDeep(map);\n    obj.a = 2;\n    expect(clonedMap).not.toEqual(map); // map = {1:{a:2},2:{a:2},3:{a:2}}\n    expect(clonedMap).not.toBe(map);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // instance\n  //-------------------------------------------------------------------------------------\n  it('should clone instance', () => {\n    class A {\n      readonly props: { a: string };\n      #b: number; // this is js spec private field (not cloned)\n      private c: number; // this is ts spec private field (cloned)\n      private readonly d: () => number;\n      constructor(props: { a: string }, b: number, c: number, d: () => number) {\n        if (props.a !== 'es-toolkit') {\n          throw new Error('es-toolkit');\n        }\n        this.props = props;\n        this.#b = b;\n        this.c = c;\n        this.d = d;\n      }\n      getA() {\n        return this.props;\n      }\n      getB() {\n        return this.#b;\n      }\n      getThis() {\n        console.log(this);\n        return this;\n      }\n    }\n    const props = { a: 'es-toolkit' };\n    const d = () => 1;\n    const a = new A(props, 1, 2, d);\n    const b = cloneDeep(a);\n    a.props.a = 'es-toolkit-2';\n    expect(a).not.toBe(b);\n    // @ts-expect-error: test\n    expect(b['#b']).toBe(undefined);\n    expect(b).toEqual({\n      props: { a: 'es-toolkit' },\n      d,\n      c: 2,\n    });\n    expect(b.getA()).toEqual({ a: 'es-toolkit' });\n  });\n\n  //-------------------------------------------------------------------------------------\n  // File\n  //-------------------------------------------------------------------------------------\n  it('should clone File objects', () => {\n    // For legacy NodeJS support\n    if (typeof File !== 'undefined') {\n      const file = new File(['es-toolkit'], 'es-toolkit.txt', {\n        type: 'text/plain',\n      });\n      const clonedFile = cloneDeep(file);\n      expect(clonedFile).not.toBe(file);\n      expect(clonedFile.name).toBe(file.name);\n      expect(clonedFile.type).toBe(file.type);\n      expect(clonedFile.size).toBe(file.size);\n      expect(clonedFile.constructor).toBe(File);\n    }\n  });\n\n  //-------------------------------------------------------------------------------------\n  // Blob\n  //-------------------------------------------------------------------------------------\n  it('should clone Blob objects', () => {\n    const blob = new Blob(['es-toolkit'], { type: 'text/plain' });\n    const clonedBlob = cloneDeep(blob);\n    expect(clonedBlob).not.toBe(blob);\n    expect(clonedBlob.type).toBe(blob.type);\n    expect(clonedBlob.size).toBe(blob.size);\n    expect(clonedBlob.constructor).toBe(Blob);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // ArrayBuffer\n  //-------------------------------------------------------------------------------------\n  it('should clone ArrayBuffer objects', () => {\n    const arrayBuffer = new ArrayBuffer(10);\n    const uint8View = new Uint8Array(arrayBuffer);\n    for (let i = 0; i < uint8View.length; i++) {\n      uint8View[i] = i;\n    }\n    const clonedArrayBuffer = cloneDeep(arrayBuffer);\n    const clonedUint8View = new Uint8Array(clonedArrayBuffer);\n    uint8View[0] = 1;\n\n    /**\n     * arrayBuffer = <01, 01, 02, 03, 04, 05, 06, 07, 08, 09>\n     * clonedArrayBuffer = <00, 01, 02, 03, 04, 05, 06, 07, 08, 09>\n     */\n    expect(clonedArrayBuffer).not.toBe(arrayBuffer);\n    /**\n     * arrayBuffer = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     * clonedArrayBuffer = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     */\n    expect(clonedUint8View).not.toBe(uint8View);\n  });\n\n  //-------------------------------------------------------------------------------------\n  // TypedArray\n  //-------------------------------------------------------------------------------------\n  it('should clone TypedArray objects', () => {\n    const typedArray = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);\n    const clonedTypedArray = cloneDeep(typedArray);\n    typedArray[0] = 255;\n    expect(clonedTypedArray).not.toBe(typedArray);\n    expect(typedArray).toEqual(new Uint8Array([255, 1, 2, 3, 4, 5, 6, 7, 8, 9]));\n    expect(clonedTypedArray).toEqual(new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));\n  });\n\n  //-------------------------------------------------------------------------------------\n  // Error\n  //-------------------------------------------------------------------------------------\n\n  it('should clone Error', () => {\n    const error = new Error('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n  it('should clone TypeError', () => {\n    const error = new TypeError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone EvalError', () => {\n    const error = new EvalError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone RangeError', () => {\n    const error = new RangeError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone ReferenceError', () => {\n    const error = new ReferenceError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone SyntaxError', () => {\n    const error = new SyntaxError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone URIError', () => {\n    const error = new URIError('es-toolkit');\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n  });\n\n  it('should clone custom Error', () => {\n    class HttpError extends Error {\n      code: number;\n      constructor(message: string, code: number) {\n        super(message);\n        this.name = 'CustomError';\n        this.code = code;\n      }\n    }\n    const error = new HttpError('es-toolkit', 400);\n    const clonedError = cloneDeep(error);\n    expect(clonedError).not.toBe(error);\n    expect(clonedError.message).toBe(error.message);\n    expect(clonedError.name).toBe(error.name);\n    expect(clonedError.stack).toBe(error.stack);\n    expect(clonedError.cause).toBe(error.cause);\n    expect(clonedError.code).toBe(error.code);\n\n    class FetcherError extends Error {\n      constructor(readonly innerError: Error) {\n        super(innerError.message);\n      }\n    }\n\n    const fetcherError = new FetcherError(error);\n    const clonedFetcherError = cloneDeep(fetcherError);\n\n    expect(clonedFetcherError).not.toBe(fetcherError);\n    expect(clonedFetcherError.message).toBe(fetcherError.message);\n    expect(clonedFetcherError.name).toBe(fetcherError.name);\n    expect(clonedFetcherError.stack).toBe(fetcherError.stack);\n    expect(clonedFetcherError.cause).toBe(fetcherError.cause);\n    expect(clonedFetcherError.innerError).not.toBe(fetcherError.innerError);\n    expect(clonedFetcherError.innerError.message).toBe(fetcherError.innerError.message);\n  });\n\n  it('should clone DataViews', () => {\n    const buffer = new Uint8Array([0, 1, 2]).buffer;\n    const view = new DataView(buffer, 1, 2);\n\n    const cloned = cloneDeep(view);\n\n    expect(cloned).not.toBe(view);\n    expect(cloned.getInt8(0)).toBe(view.getInt8(0));\n    expect(cloned.getInt8(1)).toBe(view.getInt8(1));\n  });\n\n  it('should clone buffers', () => {\n    const buffer = Buffer.from([1, 2, 3]);\n\n    const cloned = cloneDeep(buffer);\n\n    expect(cloned).not.toBe(buffer);\n    expect(cloned).toEqual(buffer);\n  });\n\n  it('should clone read-only properties', () => {\n    const object: any = {};\n\n    Object.defineProperties(object, {\n      first: {\n        enumerable: true,\n        writable: true,\n        value: 1,\n      },\n      second: {\n        enumerable: true,\n        get() {\n          return 2;\n        },\n      },\n    });\n\n    object.third = 3;\n\n    const cloned = cloneDeep(object);\n    expect(cloned).not.toBe(object);\n    expect(cloned).toEqual({\n      first: 1,\n      second: 2,\n      third: 3,\n    });\n  });\n\n  it('should clone class instance', () => {\n    class CustomClass {\n      value: number;\n\n      constructor(value: number) {\n        this.value = value;\n      }\n\n      getValue() {\n        return this.value;\n      }\n    }\n\n    const instance = new CustomClass(123);\n    const clonedInstance = cloneDeep(instance);\n\n    expect(clonedInstance).toEqual(instance);\n    expect(clonedInstance).not.toBe(instance);\n    expect(clonedInstance).toBeInstanceOf(CustomClass);\n\n    expect(clonedInstance.value).toBe(instance.value);\n    expect(clonedInstance.getValue()).toBe(123);\n  });\n\n  it('should clone arguments objects', () => {\n    function func() {\n      // eslint-disable-next-line prefer-rest-params\n      return cloneDeep(arguments);\n    }\n    // @ts-expect-error: arguments object allows calling with parameters despite no formal params\n    const args = func(1, 2, 3);\n    const cloned = cloneDeep(args);\n\n    expect(cloned).toEqual(args);\n    expect(cloned).not.toBe(args);\n  });\n\n  it('should clone Boolean objects', () => {\n    const boolObj = new Boolean(true);\n    const cloned = cloneDeep(boolObj);\n\n    expect(cloned).toEqual(boolObj);\n    expect(cloned).not.toBe(boolObj);\n    expect(cloned).toBeInstanceOf(Boolean);\n  });\n\n  it('should clone String objects', () => {\n    const strObj = new String('es-toolkit');\n    const cloned = cloneDeep(strObj);\n\n    expect(cloned).toEqual(strObj);\n    expect(cloned).not.toBe(strObj);\n    expect(cloned).toBeInstanceOf(String);\n  });\n\n  it('should clone Number objects', () => {\n    const numObj = new Number(42);\n    const cloned = cloneDeep(numObj);\n\n    expect(cloned).toEqual(numObj);\n    expect(cloned).not.toBe(numObj);\n    expect(cloned).toBeInstanceOf(Number);\n  });\n\n  it('should clone Float32Array', () => {\n    const arr = new Float32Array([1.1, 2.2, 3.3]);\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n    expect(cloned).toBeInstanceOf(Float32Array);\n  });\n\n  it('should clone Float64Array', () => {\n    const arr = new Float64Array([1.1, 2.2, 3.3]);\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n    expect(cloned).toBeInstanceOf(Float64Array);\n  });\n\n  it('should clone Int8Array', () => {\n    const arr = new Int8Array([1, 2, 3]);\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n    expect(cloned).toBeInstanceOf(Int8Array);\n  });\n\n  it('should clone Int16Array', () => {\n    const arr = new Int16Array([1, 2, 3]);\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n    expect(cloned).toBeInstanceOf(Int16Array);\n  });\n\n  it('should clone Int32Array', () => {\n    const arr = new Int32Array([1, 2, 3]);\n    const cloned = cloneDeep(arr);\n\n    expect(cloned).toEqual(arr);\n    expect(cloned).not.toBe(arr);\n    expect(cloned).toBeInstanceOf(Int32Array);\n  });\n});\n"
  },
  {
    "path": "src/object/cloneDeep.ts",
    "content": "import { cloneDeepWithImpl } from './cloneDeepWith.ts';\n\n/**\n * Creates a deep clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = cloneDeep(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = cloneDeep(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an array with nested objects\n * const arr = [1, { a: 1 }, [1, 2, 3]];\n * const clonedArr = cloneDeep(arr);\n * arr[1].a = 2;\n * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]\n * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = cloneDeep(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an object with nested objects\n * const obj = { a: 1, b: { c: 1 } };\n * const clonedObj = cloneDeep(obj);\n * obj.b.c = 2;\n * console.log(obj); // { a: 1, b: { c: 2 } }\n * console.log(clonedObj); // { a: 1, b: { c: 1 } }\n * console.log(clonedObj === obj); // false\n */\nexport function cloneDeep<T>(obj: T): T {\n  return cloneDeepWithImpl(obj, undefined, obj, new Map(), undefined);\n}\n"
  },
  {
    "path": "src/object/cloneDeepWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { cloneDeepWith } from './cloneDeepWith';\nimport { noop } from '../function/noop';\n\ndescribe('cloneDeepWith', () => {\n  it('should clone primitive values', () => {\n    expect(cloneDeepWith(1, noop)).toBe(1);\n    expect(cloneDeepWith('test', noop)).toBe('test');\n    expect(cloneDeepWith(true, noop)).toBe(true);\n    expect(cloneDeepWith(null, noop)).toBe(null);\n    expect(cloneDeepWith(undefined, noop)).toBe(undefined);\n  });\n\n  it('should deep clone arrays', () => {\n    const original = [1, [2, 3], [4, [5, 6]]];\n    const cloned = cloneDeepWith(original, () => undefined);\n\n    expect(cloned).toEqual(original);\n    expect(cloned).not.toBe(original);\n    expect(cloned[1]).not.toBe(original[1]);\n    expect(cloned[2]).not.toBe(original[2]);\n    expect((cloned[2] as any)[1]).not.toBe((original[2] as any)[1]);\n  });\n\n  it('should deep clone objects', () => {\n    const original = {\n      a: 1,\n      b: { c: 2 },\n      d: { e: { f: 3 } },\n    };\n    const cloned = cloneDeepWith(original, noop);\n\n    expect(cloned).toEqual(original);\n    expect(cloned).not.toBe(original);\n    expect(cloned.b).not.toBe(original.b);\n    expect(cloned.d).not.toBe(original.d);\n    expect(cloned.d.e).not.toBe(original.d.e);\n  });\n\n  it('should handle circular references', () => {\n    const original: any = {\n      a: 1,\n    };\n    original.self = original;\n\n    const cloned = cloneDeepWith(original, () => undefined);\n\n    expect(cloned.a).toBe(1);\n    expect(cloned.self).toBe(cloned);\n  });\n\n  it('should pass correct arguments to customizer', () => {\n    const calls: any[] = [];\n    const obj = { a: 1, b: { c: 2 } };\n\n    cloneDeepWith(obj, (value, key, object, stack) => {\n      calls.push({ value, key, object, hasStack: stack instanceof Map });\n      return undefined;\n    });\n\n    expect(calls[0]).toEqual({\n      value: obj,\n      key: undefined,\n      object: obj,\n      hasStack: true,\n    });\n\n    expect(calls[1]).toEqual({\n      value: 1,\n      key: 'a',\n      object: obj,\n      hasStack: true,\n    });\n\n    expect(calls[2]).toEqual({\n      value: obj.b,\n      key: 'b',\n      object: obj,\n      hasStack: true,\n    });\n  });\n\n  it('should allow customizer to modify values', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const customizer = (value: any) => {\n      if (typeof value === 'number') {\n        return value * 2;\n      }\n    };\n\n    const cloned = cloneDeepWith(obj, customizer);\n\n    expect(cloned).toEqual({ a: 2, b: 4, c: 6 });\n  });\n\n  it('should allow customizer to skip cloning for certain values', () => {\n    const obj = { a: 1, b: { c: 2 } };\n    const customizer = (value: any) => {\n      if (typeof value === 'object') {\n        return value;\n      }\n    };\n\n    const cloned = cloneDeepWith(obj, customizer);\n\n    expect(cloned).toBe(obj);\n  });\n\n  it('should allow customizer to replace values', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const customizer = (value: any) => {\n      if (value === 2) {\n        return 42;\n      }\n    };\n\n    const cloned = cloneDeepWith(obj, customizer);\n\n    expect(cloned).toEqual({ a: 1, b: 42, c: 3 });\n  });\n\n  it('should allow customizer to replace values with null', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const customizer = (value: any) => {\n      if (value === 3) {\n        return null;\n      }\n    };\n\n    const cloned = cloneDeepWith(obj, customizer);\n\n    expect(cloned).toEqual({ a: 1, b: 2, c: null });\n  });\n\n  it('should allow customizer to handle arrays', () => {\n    const arr = [1, 2, 3];\n    const customizer = (value: any) => {\n      if (Array.isArray(value)) {\n        return value.map(v => v + 1);\n      }\n    };\n\n    const cloned = cloneDeepWith(arr, customizer);\n\n    expect(cloned).toEqual([2, 3, 4]);\n  });\n\n  it('should allow customizer to handle nested objects', () => {\n    const obj = { a: 1, b: { c: 2, d: { e: 3 } } };\n    const customizer = (value: any) => {\n      if (typeof value === 'number') {\n        return value * 2;\n      }\n    };\n\n    const cloned = cloneDeepWith(obj, customizer);\n\n    expect(cloned).toEqual({ a: 2, b: { c: 4, d: { e: 6 } } });\n  });\n});\n"
  },
  {
    "path": "src/object/cloneDeepWith.ts",
    "content": "import { getSymbols } from '../compat/_internal/getSymbols.ts';\nimport { getTag } from '../compat/_internal/getTag.ts';\nimport {\n  argumentsTag,\n  arrayBufferTag,\n  arrayTag,\n  booleanTag,\n  dataViewTag,\n  dateTag,\n  float32ArrayTag,\n  float64ArrayTag,\n  int8ArrayTag,\n  int16ArrayTag,\n  int32ArrayTag,\n  mapTag,\n  numberTag,\n  objectTag,\n  regexpTag,\n  setTag,\n  stringTag,\n  symbolTag,\n  uint8ArrayTag,\n  uint8ClampedArrayTag,\n  uint16ArrayTag,\n  uint32ArrayTag,\n} from '../compat/_internal/tags.ts';\nimport { isPrimitive } from '../predicate/isPrimitive.ts';\nimport { isTypedArray } from '../predicate/isTypedArray.ts';\n\n/**\n * Deeply clones the given object.\n *\n * You can customize the deep cloning process using the `cloneValue` function.\n * The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.\n * If the function returns a value, that value is used;\n * if it returns `undefined`, the default cloning method is used.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @param {Function} [cloneValue] - A function to customize the cloning process.\n * @returns {T} - A deep clone of the given object.\n *\n * @example\n * // Clone a primitive value\n * const num = 29;\n * const clonedNum = cloneDeepWith(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num); // true\n *\n * @example\n * // Clone an object with a customizer\n * const obj = { a: 1, b: 2 };\n * const clonedObj = cloneDeepWith(obj, (value) => {\n *   if (typeof value === 'number') {\n *     return value * 2; // Double the number\n *   }\n * });\n * console.log(clonedObj); // { a: 2, b: 4 }\n * console.log(clonedObj === obj); // false\n *\n * @example\n * // Clone an array with a customizer\n * const arr = [1, 2, 3];\n * const clonedArr = cloneDeepWith(arr, (value) => {\n *   return value + 1; // Increment each value\n * });\n * console.log(clonedArr); // [2, 3, 4]\n * console.log(clonedArr === arr); // false\n */\nexport function cloneDeepWith<T>(\n  obj: T,\n  cloneValue: (value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any\n): T {\n  return cloneDeepWithImpl(obj, undefined, obj, new Map(), cloneValue);\n}\n\nexport function cloneDeepWithImpl<T>(\n  valueToClone: any,\n  keyToClone: PropertyKey | undefined,\n  objectToClone: T,\n  stack = new Map<any, any>(),\n  cloneValue: ((value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any) | undefined = undefined\n): T {\n  const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);\n\n  if (cloned !== undefined) {\n    return cloned;\n  }\n\n  if (isPrimitive(valueToClone)) {\n    return valueToClone as T;\n  }\n\n  if (stack.has(valueToClone)) {\n    return stack.get(valueToClone) as T;\n  }\n\n  if (Array.isArray(valueToClone)) {\n    const result: any = new Array(valueToClone.length);\n    stack.set(valueToClone, result);\n\n    for (let i = 0; i < valueToClone.length; i++) {\n      result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n    }\n\n    // For RegExpArrays\n    if (Object.hasOwn(valueToClone, 'index')) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      result.index = valueToClone.index;\n    }\n    if (Object.hasOwn(valueToClone, 'input')) {\n      // eslint-disable-next-line\n      // @ts-ignore\n      result.input = valueToClone.input;\n    }\n\n    return result as T;\n  }\n\n  if (valueToClone instanceof Date) {\n    return new Date(valueToClone.getTime()) as T;\n  }\n\n  if (valueToClone instanceof RegExp) {\n    const result = new RegExp(valueToClone.source, valueToClone.flags);\n\n    result.lastIndex = valueToClone.lastIndex;\n\n    return result as T;\n  }\n\n  if (valueToClone instanceof Map) {\n    const result = new Map();\n    stack.set(valueToClone, result);\n\n    for (const [key, value] of valueToClone) {\n      result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));\n    }\n\n    return result as T;\n  }\n\n  if (valueToClone instanceof Set) {\n    const result = new Set();\n    stack.set(valueToClone, result);\n\n    for (const value of valueToClone) {\n      result.add(cloneDeepWithImpl(value, undefined, objectToClone, stack, cloneValue));\n    }\n\n    return result as T;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  if (typeof Buffer !== 'undefined' && Buffer.isBuffer(valueToClone)) {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    return valueToClone.subarray() as T;\n  }\n\n  if (isTypedArray(valueToClone)) {\n    const result = new (Object.getPrototypeOf(valueToClone).constructor)(valueToClone.length);\n    stack.set(valueToClone, result);\n\n    for (let i = 0; i < valueToClone.length; i++) {\n      result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n    }\n\n    return result as T;\n  }\n\n  if (\n    valueToClone instanceof ArrayBuffer ||\n    (typeof SharedArrayBuffer !== 'undefined' && valueToClone instanceof SharedArrayBuffer)\n  ) {\n    return valueToClone.slice(0) as T;\n  }\n\n  if (valueToClone instanceof DataView) {\n    const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);\n    stack.set(valueToClone, result);\n\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\n    return result as T;\n  }\n\n  // For legacy NodeJS support\n  if (typeof File !== 'undefined' && valueToClone instanceof File) {\n    const result = new File([valueToClone], valueToClone.name, {\n      type: valueToClone.type,\n    });\n    stack.set(valueToClone, result);\n\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\n    return result as T;\n  }\n\n  // For environments that don't support Blob, like mini-programs\n  if (typeof Blob !== 'undefined' && valueToClone instanceof Blob) {\n    const result = new Blob([valueToClone], { type: valueToClone.type });\n    stack.set(valueToClone, result);\n\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\n    return result as T;\n  }\n\n  if (valueToClone instanceof Error) {\n    const result = structuredClone(valueToClone) as Error;\n    stack.set(valueToClone, result);\n\n    result.message = valueToClone.message;\n    result.name = valueToClone.name;\n    result.stack = valueToClone.stack;\n    result.cause = valueToClone.cause;\n    result.constructor = valueToClone.constructor;\n\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\n    return result as T;\n  }\n\n  if (valueToClone instanceof Boolean) {\n    const result = new Boolean(valueToClone.valueOf()) as T;\n    stack.set(valueToClone, result);\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n    return result;\n  }\n\n  if (valueToClone instanceof Number) {\n    const result = new Number(valueToClone.valueOf()) as T;\n    stack.set(valueToClone, result);\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n    return result;\n  }\n\n  if (valueToClone instanceof String) {\n    const result = new String(valueToClone.valueOf()) as T;\n    stack.set(valueToClone, result);\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n    return result;\n  }\n\n  if (typeof valueToClone === 'object' && isCloneableObject(valueToClone)) {\n    const result = Object.create(Object.getPrototypeOf(valueToClone));\n\n    stack.set(valueToClone, result);\n\n    copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\n    return result as T;\n  }\n\n  return valueToClone;\n}\n\nexport function copyProperties<T>(\n  target: any,\n  source: any,\n  objectToClone: T = target,\n  stack?: Map<any, any> | undefined,\n  cloneValue?: ((value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any) | undefined\n): void {\n  const keys = [...Object.keys(source), ...getSymbols(source)];\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const descriptor = Object.getOwnPropertyDescriptor(target, key);\n\n    if (descriptor == null || descriptor.writable) {\n      target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);\n    }\n  }\n}\n\nfunction isCloneableObject(object: object) {\n  switch (getTag(object)) {\n    case argumentsTag:\n    case arrayTag:\n    case arrayBufferTag:\n    case dataViewTag:\n    case booleanTag:\n    case dateTag:\n    case float32ArrayTag:\n    case float64ArrayTag:\n    case int8ArrayTag:\n    case int16ArrayTag:\n    case int32ArrayTag:\n    case mapTag:\n    case numberTag:\n    case objectTag:\n    case regexpTag:\n    case setTag:\n    case stringTag:\n    case symbolTag:\n    case uint8ArrayTag:\n    case uint8ClampedArrayTag:\n    case uint16ArrayTag:\n    case uint32ArrayTag: {\n      return true;\n    }\n    default: {\n      return false;\n    }\n  }\n}\n"
  },
  {
    "path": "src/object/findKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { findKey } from './findKey';\n\ndescribe('findKey', () => {\n  const users = {\n    pebbles: { age: 24, active: true },\n    barney: { age: 36, active: true },\n    fred: { age: 40, active: false },\n  };\n\n  it('should return the key of the first element that satisfies the predicate', () => {\n    expect(findKey(users, o => o.age < 40)).toBe('pebbles');\n  });\n\n  it('should return the first key if all elements satisfy the predicate', () => {\n    expect(findKey(users, o => o.age > 20)).toBe('pebbles');\n  });\n\n  it('should return undefined if no element satisfies the predicate', () => {\n    expect(findKey(users, o => o.age > 50)).toBeUndefined();\n  });\n\n  it('should return undefined for an empty object', () => {\n    const users = {};\n\n    // @ts-expect-error users is empty here\n    expect(findKey(users, o => o.age < 40)).toBeUndefined();\n  });\n\n  it('should handle objects with various data types', () => {\n    const data = {\n      num: 42,\n      str: 'hello',\n      bool: true,\n    };\n\n    expect(findKey(data, value => typeof value === 'string')).toBe('str');\n  });\n\n  it('should pass the key and object to the predicate function', () => {\n    const users = {\n      barney: { age: 36, active: true },\n      fred: { age: 40, active: false },\n    };\n\n    expect(findKey(users, (value, key, obj) => key === 'fred' && obj[key].active === false)).toBe('fred');\n  });\n});\n"
  },
  {
    "path": "src/object/findKey.ts",
    "content": "/**\n * Finds the key of the first element in the object that satisfies the provided testing function.\n *\n * @param {T} obj - The object to search.\n * @param {(value: T[keyof T], key: keyof T, obj: T) => boolean} predicate - The function to execute on each value in the object. It takes three arguments:\n *   - value: The current value being processed in the object.\n *   - key: The key of the current value being processed in the object.\n *   - obj: The object that findKey was called upon.\n * @returns {keyof T | undefined} The key of the first element in the object that passes the test, or undefined if no element passes.\n *\n * @example\n * const users = {\n *   'barney':  { 'age': 36, 'active': true },\n *   'fred':    { 'age': 40, 'active': false },\n *   'pebbles': { 'age': 1,  'active': true }\n * };\n * findKey(users, function(o) { return o.age < 40; }); => 'barney'\n */\nexport function findKey<T extends Record<any, any>>(\n  obj: T,\n  predicate: (value: T[keyof T], key: keyof T, obj: T) => boolean\n): keyof T | undefined {\n  const keys = Object.keys(obj) as Array<keyof T>;\n\n  return keys.find(key => predicate(obj[key], key, obj));\n}\n"
  },
  {
    "path": "src/object/flattenObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { flattenObject } from './flattenObject';\n\ndescribe('flattenObject', function () {\n  it('flattens primitive values correctly', () => {\n    const result1 = flattenObject({\n      a: {\n        b: 'yay',\n      },\n    });\n\n    expect(result1).toEqual({\n      'a.b': 'yay',\n    });\n\n    const date = new Date();\n\n    const result2 = flattenObject({\n      a: {\n        b: {\n          string: 'hello world',\n          number: 1234.5678,\n          boolean: true,\n          null: null,\n          undefined: undefined,\n          date: date,\n        },\n      },\n    });\n\n    expect(result2).toEqual({\n      'a.b.string': 'hello world',\n      'a.b.number': 1234.5678,\n      'a.b.boolean': true,\n      'a.b.null': null,\n      'a.b.undefined': undefined,\n      'a.b.date': date,\n    });\n  });\n\n  it('flattens multiple keys', () => {\n    const date = new Date();\n\n    const result = flattenObject({\n      a: {\n        b: {\n          c: 1,\n        },\n        d: {\n          e: {\n            f: {\n              g: date,\n            },\n          },\n        },\n      },\n      h: {\n        i: 'hi',\n      },\n    });\n\n    expect(result).toEqual({\n      'a.b.c': 1,\n      'a.d.e.f.g': date,\n      'h.i': 'hi',\n    });\n  });\n\n  it('handles empty objects correctly', () => {\n    const result = flattenObject({\n      a: {\n        b: {},\n      },\n    });\n\n    expect(result).toEqual({\n      'a.b': {},\n    });\n  });\n\n  it('handles empty arrays correctly', () => {\n    const result = flattenObject({\n      a: {\n        b: [],\n      },\n    });\n\n    expect(result).toEqual({\n      'a.b': [],\n    });\n  });\n\n  it('handles `Buffer`s correctly', () => {\n    const result = flattenObject({\n      a: {\n        b: Buffer.from('test'),\n      },\n    });\n\n    expect(result).toEqual({\n      'a.b': Buffer.from('test'),\n    });\n  });\n\n  it('handles `TypedArray`s correctly', () => {\n    const result = flattenObject({\n      a: {\n        b: new Uint8Array([1, 2, 3, 4]),\n      },\n    });\n\n    expect(result).toEqual({\n      'a.b': new Uint8Array([1, 2, 3, 4]),\n    });\n  });\n\n  it('handles numeric keys', () => {\n    const result = flattenObject({\n      '01': {\n        '02': {\n          '03': 1,\n        },\n      },\n    });\n\n    expect(result).toEqual({\n      '01.02.03': 1,\n    });\n  });\n\n  it('handles mixed keys', () => {\n    const result = flattenObject({\n      a1: {\n        b2: {\n          c3: 1,\n        },\n      },\n    });\n\n    expect(result).toEqual({\n      'a1.b2.c3': 1,\n    });\n  });\n\n  it('handles arrays', () => {\n    const result = flattenObject({\n      a: [1, 2, 3],\n    });\n\n    expect(result).toEqual({\n      'a.0': 1,\n      'a.1': 2,\n      'a.2': 3,\n    });\n  });\n\n  it('handles object arrays', () => {\n    const result = flattenObject({\n      a: [1, { b: 2 }, 3, [{ c: 4 }]],\n    });\n\n    expect(result).toEqual({\n      'a.0': 1,\n      'a.1.b': 2,\n      'a.2': 3,\n      'a.3.0.c': 4,\n    });\n  });\n\n  describe('custom delimiters', () => {\n    it('handles forward slash delimiter', () => {\n      const result = flattenObject(\n        {\n          a: {\n            b: {\n              c: 1,\n            },\n            d: [2, 3],\n          },\n        },\n        { delimiter: '/' }\n      );\n\n      expect(result).toEqual({\n        'a/b/c': 1,\n        'a/d/0': 2,\n        'a/d/1': 3,\n      });\n    });\n\n    it('handles dash delimiter', () => {\n      const result = flattenObject(\n        {\n          users: {\n            profile: {\n              firstName: 'John',\n              lastName: 'Doe',\n              settings: {\n                theme: 'dark',\n              },\n            },\n          },\n        },\n        { delimiter: '-' }\n      );\n\n      expect(result).toEqual({\n        'users-profile-firstName': 'John',\n        'users-profile-lastName': 'Doe',\n        'users-profile-settings-theme': 'dark',\n      });\n    });\n\n    it('handles underscore delimiter', () => {\n      const result = flattenObject(\n        {\n          database: {\n            tables: {\n              users: ['admin', 'guest'],\n              permissions: {\n                read: true,\n                write: false,\n              },\n            },\n          },\n        },\n        { delimiter: '_' }\n      );\n\n      expect(result).toEqual({\n        database_tables_users_0: 'admin',\n        database_tables_users_1: 'guest',\n        database_tables_permissions_read: true,\n        database_tables_permissions_write: false,\n      });\n    });\n\n    it('handles multi-character delimiter', () => {\n      const result = flattenObject(\n        {\n          app: {\n            config: {\n              api: {\n                url: 'https://api.example.com',\n                key: '12345',\n              },\n            },\n          },\n        },\n        { delimiter: '->' }\n      );\n\n      expect(result).toEqual({\n        'app->config->api->url': 'https://api.example.com',\n        'app->config->api->key': '12345',\n      });\n    });\n\n    it('handles empty string delimiter', () => {\n      const result = flattenObject(\n        {\n          x: {\n            y: {\n              z: 42,\n            },\n          },\n        },\n        { delimiter: '' }\n      );\n\n      expect(result).toEqual({\n        xyz: 42,\n      });\n    });\n\n    it('handles special characters delimiter', () => {\n      const result = flattenObject(\n        {\n          level1: {\n            level2: {\n              data: 'test',\n              array: [1, 2],\n            },\n          },\n        },\n        { delimiter: '@#$' }\n      );\n\n      expect(result).toEqual({\n        'level1@#$level2@#$data': 'test',\n        'level1@#$level2@#$array@#$0': 1,\n        'level1@#$level2@#$array@#$1': 2,\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/object/flattenObject.ts",
    "content": "import { isPlainObject } from '../predicate/isPlainObject.ts';\n\ninterface FlattenObjectOptions {\n  /**\n   * The delimiter to use between nested keys.\n   * @default '.'\n   */\n  delimiter?: string;\n}\n\n/**\n * Flattens a nested object into a single level object with delimiter-separated keys.\n *\n * @param {object} object - The object to flatten.\n * @param {string} [options.delimiter='.'] - The delimiter to use between nested keys.\n * @returns {Record<string, any>} - The flattened object.\n *\n * @example\n * const nestedObject = {\n *   a: {\n *     b: {\n *       c: 1\n *     }\n *   },\n *   d: [2, 3]\n * };\n *\n * const flattened = flattenObject(nestedObject);\n * console.log(flattened);\n * // Output:\n * // {\n * //   'a.b.c': 1,\n * //   'd.0': 2,\n * //   'd.1': 3\n * // }\n */\nexport function flattenObject(object: object, { delimiter = '.' }: FlattenObjectOptions = {}): Record<string, any> {\n  return flattenObjectImpl(object, '', delimiter);\n}\n\nfunction flattenObjectImpl(object: object, prefix: string, delimiter: string): Record<string, any> {\n  const result: Record<string, any> = {};\n  const keys = Object.keys(object);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = (object as any)[key];\n\n    const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;\n\n    if (isPlainObject(value) && Object.keys(value).length > 0) {\n      Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));\n      continue;\n    }\n\n    if (Array.isArray(value) && value.length > 0) {\n      Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));\n      continue;\n    }\n\n    result[prefixedKey] = value;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/index.ts",
    "content": "export { clone } from './clone.ts';\nexport { cloneDeep } from './cloneDeep.ts';\nexport { cloneDeepWith } from './cloneDeepWith.ts';\nexport { findKey } from './findKey.ts';\nexport { flattenObject } from './flattenObject.ts';\nexport { invert } from './invert.ts';\nexport { mapKeys } from './mapKeys.ts';\nexport { mapValues } from './mapValues.ts';\nexport { merge } from './merge.ts';\nexport { mergeWith } from './mergeWith.ts';\nexport { omit } from './omit.ts';\nexport { omitBy } from './omitBy.ts';\nexport { pick } from './pick.ts';\nexport { pickBy } from './pickBy.ts';\nexport { toCamelCaseKeys } from './toCamelCaseKeys.ts';\nexport { toMerged } from './toMerged.ts';\nexport { toSnakeCaseKeys } from './toSnakeCaseKeys.ts';\n"
  },
  {
    "path": "src/object/invert.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { invert } from './invert';\n\ndescribe('invert', () => {\n  it('should invert a simple object with string keys and number values', () => {\n    expect(invert({ a: 1, b: 2, c: 3 })).toEqual({ 1: 'a', 2: 'b', 3: 'c' });\n  });\n\n  it('should invert an object with number keys and string values', () => {\n    expect(invert({ 1: 'a', 2: 'b', 3: 'c' })).toEqual({ a: '1', b: '2', c: '3' });\n  });\n\n  it('should handle an object with mixed key and value types', () => {\n    expect(invert({ a: 1, 2: 'b', c: 3, 4: 'd' })).toEqual({ 1: 'a', b: '2', 3: 'c', d: '4' });\n  });\n\n  it('should handle an object with symbol keys', () => {\n    const sym1 = Symbol('sym1');\n    const sym2 = Symbol('sym2');\n    expect(invert({ a: sym1, b: sym2 })).toEqual({ [sym1]: 'a', [sym2]: 'b' });\n  });\n\n  it('should handle an empty object', () => {\n    expect(invert({})).toEqual({});\n  });\n\n  it('should handle objects with duplicate values by keeping the last key', () => {\n    expect(invert({ a: 1, b: 1, c: 2 })).toEqual({ 1: 'b', 2: 'c' });\n  });\n\n  it('should work with values that shadow keys on `Object.prototype`', () => {\n    const object = { a: 'hasOwnProperty', b: 'constructor' };\n    expect(invert(object)).toEqual({ hasOwnProperty: 'a', constructor: 'b' });\n  });\n\n  it('should work with an object that has a `length` property', () => {\n    const object = { 0: 'a', 1: 'b', length: 2 };\n    expect(invert(object)).toEqual({ a: '0', b: '1', 2: 'length' });\n  });\n\n  it('should not invert inherited properties', () => {\n    const object = Object.create({ a: 1 });\n    object.b = 2;\n    expect(invert(object)).toEqual({ 2: 'b' });\n  });\n});\n"
  },
  {
    "path": "src/object/invert.ts",
    "content": "/**\n * Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.\n *\n * This function takes an object and creates a new object by inverting its keys and values. If the input object has duplicate values,\n * the key of the last occurrence will be used as the value for the new key in the output object. It effectively creates a reverse mapping\n * of the input object's key-value pairs.\n *\n * @template K - Type of the keys in the input object (string, number, symbol)\n * @template V - Type of the values in the input object (string, number, symbol)\n * @param {Record<K, V>} obj - The input object whose keys and values are to be inverted\n * @returns {Record<V, K>} - A new object with keys and values inverted\n *\n * @example\n * invert({ a: 1, b: 2, c: 3 }); // { 1: 'a', 2: 'b', 3: 'c' }\n * invert({ 1: 'a', 2: 'b', 3: 'c' }); // { a: '1', b: '2', c: '3' }\n * invert({ a: 1, 2: 'b', c: 3, 4: 'd' }); // { 1: 'a', b: '2', 3: 'c', d: '4' }\n * invert({ a: Symbol('sym1'), b: Symbol('sym2') }); // { [Symbol('sym1')]: 'a', [Symbol('sym2')]: 'b' }\n */\nexport function invert<K extends PropertyKey, V extends PropertyKey>(obj: Record<K, V>): Record<V, K> {\n  const result = {} as Record<V, K>;\n\n  const keys = Object.keys(obj) as K[];\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = obj[key];\n    result[value] = key;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/mapKeys.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mapKeys } from './mapKeys';\n\ndescribe('mapKeys', () => {\n  it('should iterate over and map the object using its own string keys', () => {\n    expect(mapKeys({ a: 1, b: 2, c: 3 }, (_, key) => `${key}a`)).toEqual({ aa: 1, ba: 2, ca: 3 });\n  });\n\n  it('should iterate over and map the object using its own number keys', () => {\n    expect(mapKeys({ 1: 'a', 2: 'b', 3: 'c' }, (_, key) => key * 2)).toEqual({ 2: 'a', 4: 'b', 6: 'c' });\n  });\n\n  it('should pass the value corresponding to the current key into the iteratee', () => {\n    expect(mapKeys({ a: 1, b: 2, c: 3 }, value => value)).toEqual({ 1: 1, 2: 2, 3: 3 });\n  });\n});\n"
  },
  {
    "path": "src/object/mapKeys.ts",
    "content": "/**\n * Creates a new object with the same values as the given object, but with keys generated\n * by running each own enumerable property of the object through the iteratee function.\n *\n * @template T - The type of the object.\n * @template K - The type of the new keys generated by the iteratee function.\n *\n * @param {T} object - The object to iterate over.\n * @param {(value: T[keyof T], key: keyof T, object: T) => K} getNewKey - The function invoked per own enumerable property.\n * @returns {Record<K, T[keyof T]>} - Returns the new mapped object.\n *\n * @example\n * // Example usage:\n * const obj = { a: 1, b: 2 };\n * const result = mapKeys(obj, (value, key) => key + value);\n * console.log(result); // { a1: 1, b2: 2 }\n */\nexport function mapKeys<T extends Record<PropertyKey, any>, K extends PropertyKey>(\n  object: T,\n  getNewKey: (value: T[keyof T], key: keyof T, object: T) => K\n): Record<K, T[keyof T]> {\n  const result = {} as Record<K, T[keyof T]>;\n  const keys = Object.keys(object) as Array<keyof T>;\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = object[key];\n\n    result[getNewKey(value, key, object)] = value;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/mapValues.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mapValues } from './mapValues';\n\ndescribe('mapValues', () => {\n  it('should iterate over and map the object using its own values', () => {\n    expect(mapValues({ a: 1, b: 2, c: 3 }, value => ++value)).toEqual({ a: 2, b: 3, c: 4 });\n  });\n\n  it('should pass the key corresponding to the current value into the iteratee', () => {\n    expect(mapValues({ a: 1, b: 2, c: 3 }, (_, key) => key)).toEqual({ a: 'a', b: 'b', c: 'c' });\n  });\n\n  it('should pass the cloned object into the iteratee', () => {\n    expect(\n      mapValues({ a: 1, b: 2, c: 3 }, (value, key, object) => {\n        object[key] = value * 11;\n        return value * 11;\n      })\n    ).toEqual({ a: 11, b: 22, c: 33 });\n  });\n});\n"
  },
  {
    "path": "src/object/mapValues.ts",
    "content": "/**\n * Creates a new object with the same keys as the given object, but with values generated\n * by running each own enumerable property of the object through the iteratee function.\n *\n * @template T - The type of the object.\n * @template K - The type of the keys in the object.\n * @template V - The type of the new values generated by the iteratee function.\n *\n * @param {T} object - The object to iterate over.\n * @param {(value: T[K], key: K, object: T) => V} getNewValue - The function invoked per own enumerable property.\n * @returns {Record<K, V>} - Returns the new mapped object.\n *\n * @example\n * // Example usage:\n * const obj = { a: 1, b: 2 };\n * const result = mapValues(obj, (value) => value * 2);\n * console.log(result); // { a: 2, b: 4 }\n */\nexport function mapValues<T extends object, K extends keyof T, V>(\n  object: T,\n  getNewValue: (value: T[K], key: K, object: T) => V\n): Record<K, V> {\n  const result = {} as Record<K, V>;\n  const keys = Object.keys(object);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i] as K;\n    const value = object[key];\n\n    result[key] = getNewValue(value, key, object);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/merge.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { merge } from './merge';\n\ndescribe('merge', () => {\n  it('should merge properties from source object into target object', () => {\n    const target = { a: 1, b: 2 };\n    const source = { b: 3, c: 4 };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: 1, b: 3, c: 4 });\n  });\n\n  it('should deeply merge nested objects', () => {\n    const target = { a: { x: 1, y: 2 }, b: 2 };\n    const source = { a: { y: 3, z: 4 }, c: 5 };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: { x: 1, y: 3, z: 4 }, b: 2, c: 5 });\n\n    const names = {\n      characters: [{ name: 'barney' }, { name: 'fred' }],\n    };\n\n    const ages = {\n      characters: [{ age: 36 }, { age: 40 }],\n    };\n\n    const heights = {\n      characters: [{ height: '5\\'4\"' }, { height: '5\\'5\"' }],\n    };\n\n    const expected = {\n      characters: [\n        { name: 'barney', age: 36, height: '5\\'4\"' },\n        { name: 'fred', age: 40, height: '5\\'5\"' },\n      ],\n    };\n\n    expect(merge(merge(names, ages), heights)).toEqual(expected);\n\n    const target2 = { a: [1, 2], b: { x: 1 } };\n    const source2 = { a: [3], b: { y: 2 } };\n    expect(merge(target2, source2)).toEqual({ a: [3, 2], b: { x: 1, y: 2 } });\n  });\n\n  it('should merge arrays deeply', () => {\n    const target = { a: [1, 2] };\n    const source = { a: [3, 4] };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: [3, 4] });\n  });\n\n  it('should handle merging with null values', () => {\n    const target = { a: null };\n    const source = { a: [1, 2, 3] };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: [1, 2, 3] });\n  });\n\n  it('should handle merging arrays into non-array target values', () => {\n    const numbers = [1, 2, 3];\n\n    const target = { a: 1, b: {} };\n    const source = { b: numbers, c: 4 };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: 1, b: { '0': 1, '1': 2, '2': 3 }, c: 4 });\n    expect(result.b).not.toBe(numbers);\n  });\n\n  it('should create new plain object when merged', () => {\n    const plainObject = { b: 2 } as const;\n\n    const target = {};\n    const source = { a: plainObject };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: plainObject });\n    expect(result.a).not.toBe(plainObject);\n  });\n\n  it('should handle merging values that are neither arrays nor plain objects', () => {\n    const date = new Date();\n    const target = {};\n    const source = { a: date };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: date });\n    // unlike arrays and plain objects, the original value is used.\n    expect(result.a).toBe(date);\n  });\n\n  it('should not overwrite existing values with undefined from source', () => {\n    const target = { a: 1, b: 2 };\n    const source = { b: undefined, c: 3 };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: 1, b: 2, c: 3 });\n  });\n\n  it('should handle merging of deeply nested objects with arrays and objects', () => {\n    const target = { a: { b: { c: [1] } } };\n    const source = { a: { b: { c: [2], d: 3 }, e: [4] } };\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: { b: { c: [2], d: 3 }, e: [4] } });\n  });\n\n  it('should skip unsafe properties like __proto__', () => {\n    const target = { a: 1 };\n    const source = Object.create(null);\n    source.__proto__ = { b: 2 };\n    source.a = 2;\n    const result = merge(target, source);\n\n    expect(result).toEqual({ a: 2 });\n    expect(result.__proto__).toBe(Object.prototype);\n  });\n\n  it('should behave like recursive Object.assign, applying the same logic to nested properties', () => {\n    const topLevelArray = merge(['1'], { a: 2 });\n    const topLevelObject = merge({ a: 2 }, ['1']);\n\n    const nestedArray = merge({ x: ['1'] }, { x: { a: 2 } });\n    const nestedObject = merge({ x: { a: 2 } }, { x: ['1'] });\n\n    expect(Array.isArray(topLevelArray)).toBe(true);\n    expect(topLevelArray[0]).toBe('1');\n    expect((topLevelArray as any).a).toBe(2);\n\n    expect(typeof topLevelObject).toBe('object');\n    expect(topLevelObject).toEqual({ a: 2, 0: '1' });\n\n    expect(typeof nestedObject.x).toBe('object');\n    expect(nestedObject.x).toEqual({ a: 2, 0: '1' });\n    expect(nestedObject.x[0]).toBe('1');\n\n    expect(Array.isArray(nestedArray.x)).toBe(true);\n    expect(nestedArray.x[0]).toBe('1');\n    expect((nestedArray.x as any).a).toBe(2);\n  });\n});\n"
  },
  {
    "path": "src/object/merge.ts",
    "content": "import { isUnsafeProperty } from '../_internal/isUnsafeProperty.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\n\n/**\n * Merges the properties of the source object into the target object.\n *\n * This function performs a deep merge, meaning nested objects and arrays are merged recursively.\n * If a property in the source object is an array or an object and the corresponding property in the target object is also an array or object, they will be merged.\n * If a property in the source object is undefined, it will not overwrite a defined property in the target object.\n *\n * Note that this function mutates the target object.\n *\n * @param {T} target - The target object into which the source object properties will be merged. This object is modified in place.\n * @param {S} source - The source object whose properties will be merged into the target object.\n * @returns {T & S} The updated target object with properties from the source object merged in.\n *\n * @template T - Type of the target object.\n * @template S - Type of the source object.\n *\n * @example\n * const target = { a: 1, b: { x: 1, y: 2 } };\n * const source = { b: { y: 3, z: 4 }, c: 5 };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n *\n * @example\n * const target = { a: [1, 2], b: { x: 1 } };\n * const source = { a: [3], b: { y: 2 } };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: [3, 2], b: { x: 1, y: 2 } }\n *\n * @example\n * const target = { a: null };\n * const source = { a: [1, 2, 3] };\n *\n * const result = merge(target, source);\n * console.log(result);\n * // Output: { a: [1, 2, 3] }\n */\nexport function merge<T extends Record<PropertyKey, any>, S extends Record<PropertyKey, any>>(\n  target: T,\n  source: S\n): T & S {\n  const sourceKeys = Object.keys(source) as Array<keyof S>;\n\n  for (let i = 0; i < sourceKeys.length; i++) {\n    const key = sourceKeys[i];\n\n    if (isUnsafeProperty(key)) {\n      continue;\n    }\n\n    const sourceValue = source[key];\n    const targetValue = target[key];\n\n    if (isMergeableValue(sourceValue) && isMergeableValue(targetValue)) {\n      target[key] = merge(targetValue, sourceValue);\n    } else if (Array.isArray(sourceValue)) {\n      target[key] = merge([], sourceValue);\n    } else if (isPlainObject(sourceValue)) {\n      target[key] = merge({}, sourceValue);\n    } else if (targetValue === undefined || sourceValue !== undefined) {\n      target[key] = sourceValue;\n    }\n  }\n\n  return target;\n}\n\nfunction isMergeableValue(value: unknown) {\n  return isPlainObject(value) || Array.isArray(value);\n}\n"
  },
  {
    "path": "src/object/mergeWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { cloneDeep } from './cloneDeep';\nimport { mergeWith } from './mergeWith';\n\ndescribe('mergeWith', () => {\n  it('should merge properties from source object into target object using custom merge function', () => {\n    const target1 = { a: 1, b: 2 };\n    const source1 = { b: 3, c: 4 };\n\n    const result1 = mergeWith(target1, source1, (targetValue, sourceValue) => {\n      if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n        return targetValue + sourceValue;\n      }\n    });\n\n    expect(result1).toEqual({ a: 1, b: 5, c: 4 });\n\n    const target2 = { a: [1], b: [2] };\n    const source2 = { a: [3], b: [4] };\n\n    const result2 = mergeWith(target2, source2, (objValue, srcValue) => {\n      if (Array.isArray(objValue)) {\n        return objValue.concat(srcValue);\n      }\n    });\n\n    expect(result2).toEqual({ a: [1, 3], b: [2, 4] });\n\n    const target3 = { a: { x: 1, y: 1 }, b: [2] };\n    const source3 = { a: { x: 2, y: 3 }, b: [4] };\n\n    const result3 = mergeWith(target3, source3, (objValue, srcValue) => {\n      if (objValue.x && srcValue.x) {\n        return objValue.x + srcValue.x;\n      }\n    });\n\n    expect(result3).toEqual({ a: 3, b: [4] });\n  });\n\n  it('should use custom merge function for nested objects', () => {\n    const target = { a: { x: 1, y: 1 }, b: 2 };\n    const source = { a: { y: 2 }, b: 3 };\n\n    const result = mergeWith(target, source, (targetValue, sourceValue) => {\n      if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n        return targetValue + sourceValue;\n      }\n    });\n\n    expect(result).toEqual({ a: { x: 1, y: 3 }, b: 5 });\n\n    const target2 = { a: { c: [1] }, b: [2] };\n    const source2 = { a: { c: [3] }, b: [4] };\n\n    const result2 = mergeWith(target2, source2, (objValue, srcValue) => {\n      if (Array.isArray(objValue)) {\n        return objValue.concat(srcValue);\n      }\n    });\n\n    expect(result2).toEqual({ a: { c: [1, 3] }, b: [2, 4] });\n  });\n\n  it('should respect `null` returned from `customizer`', () => {\n    const obj = { prop: null };\n    const source = { prop: { foo: 'bar' } };\n\n    expect(\n      mergeWith(cloneDeep(obj), cloneDeep(source), targetValue => {\n        if (targetValue === null) {\n          return null;\n        }\n\n        return undefined;\n      })\n    ).toEqual({ prop: null });\n  });\n\n  it('should skip unsafe properties like __proto__', () => {\n    const target = { a: 1 };\n    const source = Object.create(null);\n    source.__proto__ = { b: 2 };\n    source.a = 2;\n    const result = mergeWith(target, source, (targetValue, sourceValue) => {\n      return sourceValue;\n    });\n\n    expect(result).toEqual({ a: 2 });\n    expect(result.__proto__).toBe(Object.prototype);\n  });\n\n  it('should merge arrays when targetValue is undefined and merge function returns undefined', () => {\n    const target: { a?: number[] } = {};\n    const source = { a: [1, 2, 3] };\n\n    const result = mergeWith(target, source, () => undefined);\n\n    expect(result).toEqual({ a: [1, 2, 3] });\n  });\n\n  it('should not overwrite targetValue when sourceValue is undefined and merge function returns undefined', () => {\n    const target = { a: 1, b: 2 };\n    const source = { a: 3, b: undefined };\n\n    const result = mergeWith(target, source, () => undefined);\n\n    expect(result).toEqual({ a: 3, b: 2 });\n  });\n\n  it('should replace non-plain-object target value with plain object from source when merge returns undefined', () => {\n    const target = { a: 'string', b: 123, c: true };\n    const source = { a: { x: 1 }, b: { y: 2 }, c: { z: 3 } };\n\n    const result = mergeWith(target, source, () => undefined);\n\n    expect(result).toEqual({ a: { x: 1 }, b: { y: 2 }, c: { z: 3 } });\n  });\n\n  it('should handle nested case where non-plain-object is replaced with plain object when merge returns undefined', () => {\n    const target = { a: { b: null, c: undefined, d: 'text' } };\n    const source = { a: { b: { x: 1 }, c: { y: 2 }, d: { z: 3 } } };\n\n    const result = mergeWith(target, source, () => undefined);\n\n    expect(result).toEqual({ a: { b: { x: 1 }, c: { y: 2 }, d: { z: 3 } } });\n  });\n});\n"
  },
  {
    "path": "src/object/mergeWith.ts",
    "content": "import { isUnsafeProperty } from '../_internal/isUnsafeProperty.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\n\n/**\n * Merges the properties of the source object into the target object.\n *\n * You can provide a custom `merge` function to control how properties are merged. It should return the value to be set in the target object.\n *\n * If it returns `undefined`, a default deep merge will be applied for arrays and objects:\n *\n * - If a property in the source object is an array or an object and the corresponding property in the target object is also an array or object, they will be merged.\n * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.\n *\n * Note that this function mutates the target object.\n *\n * @param {T} target - The target object into which the source object properties will be merged. This object is modified in place.\n * @param {S} source - The source object whose properties will be merged into the target object.\n * @param {(targetValue: any, sourceValue: any, key: string, target: T, source: S) => any} merge - A custom merge function that defines how properties should be combined. It receives the following arguments:\n *   - `targetValue`: The current value of the property in the target object.\n *   - `sourceValue`: The value of the property in the source object.\n *   - `key`: The key of the property being merged.\n *   - `target`: The target object.\n *   - `source`: The source object.\n *\n * @returns {T & S} The updated target object with properties from the source object merged in.\n *\n * @template T - Type of the target object.\n * @template S - Type of the source object.\n *\n * @example\n * const target = { a: 1, b: 2 };\n * const source = { b: 3, c: 4 };\n *\n * mergeWith(target, source, (targetValue, sourceValue) => {\n *   if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n *     return targetValue + sourceValue;\n *   }\n * });\n * // Returns { a: 1, b: 5, c: 4 }\n * @example\n * const target = { a: [1], b: [2] };\n * const source = { a: [3], b: [4] };\n *\n * const result = mergeWith(target, source, (objValue, srcValue) => {\n *   if (Array.isArray(objValue)) {\n *     return objValue.concat(srcValue);\n *   }\n * });\n *\n * expect(result).toEqual({ a: [1, 3], b: [2, 4] });\n */\nexport function mergeWith<T extends Record<PropertyKey, any>, S extends Record<PropertyKey, any>>(\n  target: T,\n  source: S,\n  merge: (targetValue: any, sourceValue: any, key: string, target: T, source: S) => any\n): T & S {\n  const sourceKeys = Object.keys(source) as Array<keyof T>;\n\n  for (let i = 0; i < sourceKeys.length; i++) {\n    const key = sourceKeys[i];\n\n    if (isUnsafeProperty(key)) {\n      continue;\n    }\n\n    const sourceValue = source[key];\n    const targetValue = target[key];\n\n    const merged = merge(targetValue, sourceValue, key as string, target, source);\n\n    if (merged !== undefined) {\n      target[key] = merged;\n    } else if (Array.isArray(sourceValue)) {\n      if (Array.isArray(targetValue)) {\n        target[key] = mergeWith<any, S[keyof T]>(targetValue, sourceValue, merge);\n      } else {\n        target[key] = mergeWith<any, S[keyof T]>([], sourceValue, merge);\n      }\n    } else if (isPlainObject(sourceValue)) {\n      if (isPlainObject(targetValue)) {\n        target[key] = mergeWith<any, S[keyof T]>(targetValue, sourceValue, merge);\n      } else {\n        target[key] = mergeWith<any, S[keyof T]>({}, sourceValue, merge);\n      }\n    } else if (targetValue === undefined || sourceValue !== undefined) {\n      target[key] = sourceValue;\n    }\n  }\n\n  return target;\n}\n"
  },
  {
    "path": "src/object/omit.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { omit } from './omit';\n\ndescribe('omit', () => {\n  it('should omit properties from an object', () => {\n    const object = { foo: 1, bar: 2, baz: 3 };\n    const result = omit(object, ['foo', 'bar']);\n    expect(result).toEqual({ baz: 3 });\n  });\n\n  it('should return an empty object if all keys are omitted', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const result = omit(obj, ['a', 'b', 'c']);\n    expect(result).toEqual({});\n  });\n\n  it('should return the same object if no keys are omitted', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const result = omit(obj, []);\n    expect(result).toEqual({ a: 1, b: 2, c: 3 });\n  });\n\n  it('should not affect the original object', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const result = omit(obj, ['b']);\n    expect(result).toEqual({ a: 1, c: 3 });\n    expect(obj).toEqual({ a: 1, b: 2, c: 3 });\n  });\n});\n"
  },
  {
    "path": "src/object/omit.ts",
    "content": "/**\n * Creates a new object with specified keys omitted.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * excludes the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to omit keys from.\n * @param {K[]} keys - An array of keys to be omitted from the object.\n * @returns {Omit<T, K>} A new object with the specified keys omitted.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = omit(obj, ['b', 'c']);\n * // result will be { a: 1 }\n */\nexport function omit<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Omit<T, K> {\n  const result = { ...obj };\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    delete result[key];\n  }\n\n  return result as Omit<T, K>;\n}\n"
  },
  {
    "path": "src/object/omitBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { omitBy } from './omitBy';\n\ndescribe('omitBy', () => {\n  it('should omit properties based on the predicate function', () => {\n    const obj = { a: 1, b: 'omit', c: 3 };\n    const shouldOmit = (value: number | string) => typeof value === 'string';\n    const result = omitBy(obj, shouldOmit);\n    expect(result).toEqual({ a: 1, c: 3 });\n  });\n\n  it('should return an empty object if all properties are omitted', () => {\n    const obj = { a: 'omit', b: 'omit' };\n    const shouldOmit = (value: string) => typeof value === 'string';\n    const result = omitBy(obj, shouldOmit);\n    expect(result).toEqual({});\n  });\n\n  it('should return the same object if no properties are omitted', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const shouldOmit = (value: number) => typeof value === 'string';\n    const result = omitBy(obj, shouldOmit);\n    expect(result).toEqual(obj);\n  });\n\n  it('should work with an empty object', () => {\n    const obj = {};\n    const shouldOmit = (value: never) => value;\n    const result = omitBy(obj, shouldOmit);\n    expect(result).toEqual({});\n  });\n\n  it('should work with nested objects', () => {\n    const obj = { a: 1, b: { nested: 'omit' }, c: 3 };\n    const shouldOmit = (_: number | { nested: string }, key: string) => key === 'b';\n    const result = omitBy(obj, shouldOmit);\n    expect(result).toEqual({ a: 1, c: 3 });\n  });\n});\n"
  },
  {
    "path": "src/object/omitBy.ts",
    "content": "/**\n * Creates a new object composed of the properties that do not satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns false.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to omit properties from.\n * @param {(value: T[string], key: keyof T) => boolean} shouldOmit - A predicate function that determines\n * whether a property should be omitted. It takes the property's key and value as arguments and returns `true`\n * if the property should be omitted, and `false` otherwise.\n * @returns {Partial<T>} A new object with the properties that do not satisfy the predicate function.\n *\n * @example\n * const obj = { a: 1, b: 'omit', c: 3 };\n * const shouldOmit = (value) => typeof value === 'string';\n * const result = omitBy(obj, shouldOmit);\n * // result will be { a: 1, c: 3 }\n */\nexport function omitBy<T extends Record<string, any>>(\n  obj: T,\n  shouldOmit: (value: T[keyof T], key: keyof T) => boolean\n): Partial<T> {\n  const result: Partial<T> = {};\n\n  const keys = Object.keys(obj) as Array<keyof T>;\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = obj[key];\n\n    if (!shouldOmit(value, key)) {\n      result[key] = value;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/pick.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pick } from './pick';\n\ndescribe('pick', () => {\n  it('should pick properties from an object', () => {\n    const object = { foo: 1, bar: 2, baz: 3 };\n    const result = pick(object, ['foo', 'bar']);\n    expect(result).toEqual({ foo: 1, bar: 2 });\n  });\n\n  it('should return the same object if all keys are picked', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const result = pick(object, ['a', 'b', 'c']);\n    expect(result).toEqual(object);\n  });\n\n  it('should return an empty object if the key array is empty', () => {\n    const object = { a: 1, b: 2, c: 3 };\n    const result = pick(object, []);\n    expect(result).toEqual({});\n  });\n\n  it('should work with nested objects', () => {\n    const object = { a: 1, b: { nested: 'pick' }, c: 3 };\n    const result = pick(object, ['a', 'b', 'c']);\n    expect(result).toEqual({ a: 1, b: { nested: 'pick' }, c: 3 });\n  });\n\n  it('should not pick from nonexistent keys', () => {\n    const obj: { a?: unknown } = {};\n    const result = pick(obj, ['a']);\n\n    expect(Reflect.ownKeys(result)).toEqual([]);\n  });\n});\n"
  },
  {
    "path": "src/object/pick.ts",
    "content": "/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to pick keys from.\n * @param {K[]} keys - An array of keys to be picked from the object.\n * @returns {Pick<T, K>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Pick<T, K> {\n  const result = {} as Pick<T, K>;\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n\n    if (Object.hasOwn(obj, key)) {\n      result[key] = obj[key];\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/pickBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pickBy } from './pickBy';\n\ndescribe('pickBy', () => {\n  it('should pick properties based on the predicate function', () => {\n    const obj = { a: 1, b: 'pick', c: 3 };\n    const shouldPick = (value: string | number) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({ b: 'pick' });\n  });\n\n  it('should return an empty object if no properties satisfy the predicate', () => {\n    const obj = { a: 1, b: 2, c: 3 };\n    const shouldPick = (value: number) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it('should return the same object if all properties satisfy the predicate', () => {\n    const obj = { a: 'pick', b: 'pick', c: 'pick' };\n    const shouldPick = (value: string) => typeof value === 'string';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual(obj);\n  });\n\n  it('should work with an empty object', () => {\n    const obj = {};\n    const shouldPick = (value: never) => value;\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({});\n  });\n\n  it('should work with nested objects', () => {\n    const obj = { a: 1, b: { nested: 'pick' }, c: 3 };\n    const shouldPick = (value: number | { nested: string }, key: string) => key === 'b';\n    const result = pickBy(obj, shouldPick);\n    expect(result).toEqual({ b: { nested: 'pick' } });\n  });\n});\n"
  },
  {
    "path": "src/object/pickBy.ts",
    "content": "/**\n * Creates a new object composed of the properties that satisfy the predicate function.\n *\n * This function takes an object and a predicate function, and returns a new object that\n * includes only the properties for which the predicate function returns true.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to pick properties from.\n * @param {(value: T[keyof T], key: keyof T) => boolean} shouldPick - A predicate function that determines\n * whether a property should be picked. It takes the property's key and value as arguments and returns `true`\n * if the property should be picked, and `false` otherwise.\n * @returns {Partial<T>} A new object with the properties that satisfy the predicate function.\n *\n * @example\n * const obj = { a: 1, b: 'pick', c: 3 };\n * const shouldPick = (value) => typeof value === 'string';\n * const result = pickBy(obj, shouldPick);\n * // result will be { b: 'pick' }\n */\nexport function pickBy<T extends Record<string, any>>(\n  obj: T,\n  shouldPick: (value: T[keyof T], key: keyof T) => boolean\n): Partial<T> {\n  const result: Partial<T> = {};\n\n  const keys = Object.keys(obj) as Array<keyof T>;\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = obj[key];\n\n    if (shouldPick(value, key)) {\n      result[key] = value;\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/object/toCamelCaseKeys.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { toCamelCaseKeys } from './toCamelCaseKeys';\n\ndescribe('camelizeKeys', () => {\n  it('should convert snake_case keys to camelCase in a flat object', () => {\n    const input = { user_id: 1, first_name: 'John', last_name: 'Doe' };\n    const expected = { userId: 1, firstName: 'John', lastName: 'Doe' };\n    expect(toCamelCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should convert PascalCase keys to camelCase in a flat object', () => {\n    const input = { UserId: 1, FirstName: 'John', LastName: 'Doe' };\n    const expected = { userId: 1, firstName: 'John', lastName: 'Doe' };\n    expect(toCamelCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should convert keys recursively in nested objects', () => {\n    const input = {\n      user_data: {\n        user_id: 1,\n        user_address: {\n          street_name: 'Main St',\n          zip_code: '12345',\n        },\n      },\n    };\n    const expected = {\n      userData: {\n        userId: 1,\n        userAddress: {\n          streetName: 'Main St',\n          zipCode: '12345',\n        },\n      },\n    };\n    expect(toCamelCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should handle arrays of objects', () => {\n    const input = [\n      { user_id: 1, first_name: 'John' },\n      { user_id: 2, first_name: 'Jane' },\n    ];\n    const expected = [\n      { userId: 1, firstName: 'John' },\n      { userId: 2, firstName: 'Jane' },\n    ];\n    expect(toCamelCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should handle arrays inside objects', () => {\n    const input = {\n      user_list: [\n        { user_id: 1, first_name: 'John' },\n        { user_id: 2, first_name: 'Jane' },\n      ],\n    };\n    const expected = {\n      userList: [\n        { userId: 1, firstName: 'John' },\n        { userId: 2, firstName: 'Jane' },\n      ],\n    };\n    expect(toCamelCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should not modify primitive values', () => {\n    expect(toCamelCaseKeys(123)).toBe(123);\n    expect(toCamelCaseKeys('string')).toBe('string');\n    expect(toCamelCaseKeys(null)).toBe(null);\n    expect(toCamelCaseKeys(undefined)).toBe(undefined);\n    expect(toCamelCaseKeys(true)).toBe(true);\n  });\n\n  it('should handle empty objects and arrays', () => {\n    expect(toCamelCaseKeys({})).toEqual({});\n    expect(toCamelCaseKeys([])).toEqual([]);\n  });\n\n  it('should preserve object prototype methods', () => {\n    const input = { user_id: 1, toString: Object.prototype.toString };\n    const result = toCamelCaseKeys(input);\n    expect(result).toHaveProperty('userId', 1);\n    expect(result).toHaveProperty('toString');\n    expect(result.toString).toBe(Object.prototype.toString);\n  });\n\n  it('should properly type nested objects', () => {\n    const input = {\n      user_data: {\n        personal_info: {\n          first_name: 'John',\n        },\n      },\n    };\n    const result = toCamelCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<{\n      userData: {\n        personalInfo: {\n          firstName: string;\n        };\n      };\n    }>();\n  });\n\n  it('should properly type arrays', () => {\n    const input = [{ user_id: 1 }, { user_id: 2 }];\n    const result = toCamelCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<Array<{ userId: number }>>();\n  });\n\n  it('should properly type mixed complex structures', () => {\n    const input = {\n      users: [\n        { user_id: 1, settings: { is_active: true } },\n        { user_id: 2, settings: { is_active: false } },\n      ],\n    };\n    const result = toCamelCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<{\n      users: Array<{\n        userId: number;\n        settings: {\n          isActive: boolean;\n        };\n      }>;\n    }>();\n  });\n\n  it('should have correct TypeScript types for non-plain objects', () => {\n    const input = { a: new Date(), b: /test/, c: new Map() };\n    const result = toCamelCaseKeys(input);\n\n    expectTypeOf(result.a).toEqualTypeOf<Date>();\n    expectTypeOf(result.b).toEqualTypeOf<RegExp>();\n    expectTypeOf(result.c).toEqualTypeOf<Map<any, any>>();\n  });\n\n  it('should convert uppercase keys to camelCase at both runtime and type level', () => {\n    const input = {\n      FIRST_NAME: 'JinHo',\n      LAST: 'Yeom',\n    } as const;\n\n    const result = toCamelCaseKeys(input);\n\n    expect(result).toEqual({\n      firstName: 'JinHo',\n      last: 'Yeom',\n    });\n\n    expectTypeOf(result).toMatchTypeOf<{\n      firstName: 'JinHo';\n      last: 'Yeom';\n    }>();\n  });\n\n  it('should not recurse into NonPlainObject values', () => {\n    const date = new Date();\n    const map = new Map<string, any>([['first_name', 'JinHo']]);\n    const set = new Set<number>([1, 2, 3]);\n\n    const input = {\n      created_at: date,\n      meta_map: map,\n      ids_set: set,\n    };\n\n    const result = toCamelCaseKeys(input);\n\n    expect(result.createdAt).toBe(date);\n    expect(result.metaMap).toBe(map);\n    expect(result.idsSet).toBe(set);\n\n    expectTypeOf(result).toMatchTypeOf<{\n      createdAt: Date;\n      metaMap: Map<string, any>;\n      idsSet: Set<number>;\n    }>();\n  });\n});\n"
  },
  {
    "path": "src/object/toCamelCaseKeys.ts",
    "content": "import { isArray } from '../compat/predicate/isArray.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\nimport { camelCase } from '../string/camelCase.ts';\n\ntype SnakeToCamel<S extends string> = S extends `${infer H}_${infer T}`\n  ? `${Lowercase<H>}${Capitalize<SnakeToCamel<T>>}`\n  : Lowercase<S>;\n\ntype PascalToCamel<S extends string> = S extends `${infer F}${infer R}` ? `${Lowercase<F>}${R}` : S;\n\n/** If it's snake_case, apply the snake_case rule; for uppercase keys, lowercase the entire string; otherwise, just lowercase the first letter (including PascalCase → camelCase). */\ntype AnyToCamel<S extends string> = S extends `${string}_${string}`\n  ? SnakeToCamel<S>\n  : S extends Uppercase<S>\n    ? Lowercase<S>\n    : PascalToCamel<S>;\n\ntype NonPlainObject =\n  | Date\n  | RegExp\n  | Map<any, any>\n  | Set<any>\n  | WeakMap<any, any>\n  | WeakSet<any>\n  | Promise<any>\n  | Error\n  | ArrayBuffer\n  | DataView\n  | Int8Array\n  | Uint8Array\n  | Uint8ClampedArray\n  | Int16Array\n  | Uint16Array\n  | Int32Array\n  | Uint32Array\n  | Float32Array\n  | Float64Array\n  | BigInt64Array\n  | BigUint64Array\n  | ((...args: any[]) => any)\n  | typeof globalThis;\n\ntype ToCamelCaseKeys<T> = T extends NonPlainObject\n  ? T\n  : T extends any[]\n    ? Array<ToCamelCaseKeys<T[number]>>\n    : T extends Record<string, any>\n      ? { [K in keyof T as AnyToCamel<Extract<K, string>>]: ToCamelCaseKeys<T[K]> }\n      : T;\n\n/**\n * Creates a new object composed of the properties with keys converted to camelCase.\n *\n * This function takes an object and returns a new object that includes the same properties,\n * but with all keys converted to camelCase format.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to convert keys from.\n * @returns {ToCamelCaseKeys<T>} A new object with all keys converted to camelCase.\n *\n * @example\n * // Example with objects\n * const obj = { user_id: 1, first_name: 'John' };\n * const result = toCamelCaseKeys(obj);\n * // result will be { userId: 1, firstName: 'John' }\n *\n * // Example with arrays of objects\n * const arr = [\n *   { user_id: 1, first_name: 'John' },\n *   { user_id: 2, first_name: 'Jane' }\n * ];\n * const arrResult = toCamelCaseKeys(arr);\n * // arrResult will be [{ userId: 1, firstName: 'John' }, { userId: 2, firstName: 'Jane' }]\n *\n * // Example with nested objects\n * const nested = {\n *   user_data: {\n *     user_id: 1,\n *     user_address: {\n *       street_name: 'Main St',\n *       zip_code: '12345'\n *     }\n *   }\n * };\n * const nestedResult = toCamelCaseKeys(nested);\n * // nestedResult will be:\n * // {\n * //   userData: {\n * //     userId: 1,\n * //     userAddress: {\n * //       streetName: 'Main St',\n * //       zipCode: '12345'\n * //     }\n * //   }\n * // }\n */\nexport function toCamelCaseKeys<T>(obj: T): ToCamelCaseKeys<T> {\n  if (isArray(obj)) {\n    return obj.map(item => toCamelCaseKeys(item)) as ToCamelCaseKeys<T>;\n  }\n\n  if (isPlainObject(obj)) {\n    const result = {} as ToCamelCaseKeys<T>;\n    const keys = Object.keys(obj);\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n\n      const camelKey = camelCase(key) as keyof typeof result;\n      const convertedValue = toCamelCaseKeys(obj[key]);\n      result[camelKey] = convertedValue as ToCamelCaseKeys<T>[keyof ToCamelCaseKeys<T>];\n    }\n\n    return result;\n  }\n\n  return obj as ToCamelCaseKeys<T>;\n}\n"
  },
  {
    "path": "src/object/toMerged.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toMerged } from './toMerged';\n\ndescribe('toMerged', () => {\n  it('should merge properties from source object into target object', () => {\n    const target = { a: 1, b: 2 };\n    const source = { b: 3, c: 4 };\n\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: 1, b: 3, c: 4 });\n    expect(target).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should deeply merge nested objects', () => {\n    const target = { a: { x: 1, y: 2 }, b: 2 };\n    const source = { a: { y: 3, z: 4 }, c: 5 };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: { x: 1, y: 3, z: 4 }, b: 2, c: 5 });\n    expect(target).toEqual({ a: { x: 1, y: 2 }, b: 2 });\n\n    const names = {\n      characters: [{ name: 'barney' }, { name: 'fred' }],\n    };\n\n    const ages = {\n      characters: [{ age: 36 }, { age: 40 }],\n    };\n\n    const heights = {\n      characters: [{ height: '5\\'4\"' }, { height: '5\\'5\"' }],\n    };\n\n    const expected = {\n      characters: [\n        { name: 'barney', age: 36, height: '5\\'4\"' },\n        { name: 'fred', age: 40, height: '5\\'5\"' },\n      ],\n    };\n\n    expect(toMerged(toMerged(names, ages), heights)).toEqual(expected);\n    expect(names).toEqual({\n      characters: [{ name: 'barney' }, { name: 'fred' }],\n    });\n\n    const target2 = { a: [1, 2], b: { x: 1 } };\n    const source2 = { a: [3], b: { y: 2 } };\n    expect(toMerged(target2, source2)).toEqual({ a: [3, 2], b: { x: 1, y: 2 } });\n    expect(target2).toEqual({ a: [1, 2], b: { x: 1 } });\n  });\n\n  it('should deeply merge nested objects if they are shared', () => {\n    const lightTypography = {\n      secondaryBold: {\n        fontSize: '16px',\n      },\n      tertiaryBold: {\n        fontSize: '14px',\n      },\n    };\n\n    const lightComponents = {\n      button: {\n        sm: {\n          generic: {\n            textLabel: lightTypography.tertiaryBold,\n          },\n        },\n      },\n      calendarPicker: {\n        inputPlaceholder: lightTypography.secondaryBold,\n      },\n    };\n\n    const darkTypography = {\n      tertiaryBold: {\n        fontSize: '14px',\n      },\n    };\n\n    const darkComponents = {\n      button: {\n        sm: {\n          generic: {\n            textLabel: darkTypography.tertiaryBold,\n          },\n        },\n      },\n      calendarPicker: {\n        inputPlaceholder: darkTypography.tertiaryBold,\n      },\n    };\n\n    expect(toMerged(darkComponents, lightComponents)).toEqual({\n      button: {\n        sm: {\n          generic: {\n            textLabel: {\n              fontSize: '14px',\n            },\n          },\n        },\n      },\n      calendarPicker: {\n        inputPlaceholder: {\n          fontSize: '16px',\n        },\n      },\n    });\n\n    expect(darkComponents).toMatchInlineSnapshot(`\n      {\n        \"button\": {\n          \"sm\": {\n            \"generic\": {\n              \"textLabel\": {\n                \"fontSize\": \"14px\",\n              },\n            },\n          },\n        },\n        \"calendarPicker\": {\n          \"inputPlaceholder\": {\n            \"fontSize\": \"14px\",\n          },\n        },\n      }\n    `);\n  });\n\n  it('should merge arrays deeply', () => {\n    const target = { a: [1, 2] };\n    const source = { a: [3, 4] };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: [3, 4] });\n    expect(target).toEqual({ a: [1, 2] });\n  });\n\n  it('should handle merging with null values', () => {\n    const target = { a: null };\n    const source = { a: [1, 2, 3] };\n\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: [1, 2, 3] });\n    expect(target).toEqual({ a: null });\n  });\n\n  it('should not overwrite existing values with undefined from source', () => {\n    const target = { a: 1, b: 2 };\n    const source = { b: undefined, c: 3 };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: 1, b: 2, c: 3 });\n    expect(target).toEqual({ a: 1, b: 2 });\n  });\n\n  it('should handle merging of deeply nested objects with arrays and objects', () => {\n    const target = { a: { b: { c: [1] } } };\n    const source = { a: { b: { c: [2], d: 3 }, e: [4] } };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: { b: { c: [2], d: 3 }, e: [4] } });\n    expect(target).toEqual({ a: { b: { c: [1] } } });\n  });\n\n  it('should replace non-plain-object target value with plain object from source', () => {\n    const target = { a: 'string', b: 123, c: true };\n    const source = { a: { x: 1 }, b: { y: 2 }, c: { z: 3 } };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: { x: 1 }, b: { y: 2 }, c: { z: 3 } });\n    expect(target).toEqual({ a: 'string', b: 123, c: true });\n  });\n\n  it('should handle nested case where non-plain-object is replaced with plain object', () => {\n    const target = { a: { b: null, c: undefined, d: 'text' } };\n    const source = { a: { b: { x: 1 }, c: { y: 2 }, d: { z: 3 } } };\n    const result = toMerged(target, source);\n\n    expect(result).toEqual({ a: { b: { x: 1 }, c: { y: 2 }, d: { z: 3 } } });\n    expect(target).toEqual({ a: { b: null, c: undefined, d: 'text' } });\n  });\n});\n"
  },
  {
    "path": "src/object/toMerged.ts",
    "content": "import { clone } from './clone.ts';\nimport { mergeWith } from './mergeWith.ts';\nimport { isPlainObject } from '../predicate/isPlainObject.ts';\n\n/**\n * Merges the properties of the source object into a deep clone of the target object.\n * Unlike `merge`, This function does not modify the original target object.\n *\n * This function performs a deep merge, meaning nested objects and arrays are merged recursively.\n *\n * - If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.\n * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.\n *\n * Note that this function does not mutate the target object.\n *\n * @param {T} target - The target object to be cloned and merged into. This object is not modified directly.\n * @param {S} source - The source object whose properties will be merged into the cloned target object.\n * @returns {T & S} A new object with properties from the source object merged into a deep clone of the target object.\n *\n * @template T - Type of the target object.\n * @template S - Type of the source object.\n *\n * @example\n * const target = { a: 1, b: { x: 1, y: 2 } };\n * const source = { b: { y: 3, z: 4 }, c: 5 };\n *\n * const result = toMerged(target, source);\n * console.log(result);\n * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n *\n * @example\n * const target = { a: [1, 2], b: { x: 1 } };\n * const source = { a: [3], b: { y: 2 } };\n *\n * const result = toMerged(target, source);\n * console.log(result);\n * // Output: { a: [3, 2], b: { x: 1, y: 2 } }\n *\n * @example\n * const target = { a: null };\n * const source = { a: [1, 2, 3] };\n *\n * const result = toMerged(target, source);\n * console.log(result);\n * // Output: { a: [1, 2, 3] }\n */\nexport function toMerged<T extends Record<PropertyKey, any>, S extends Record<PropertyKey, any>>(\n  target: T,\n  source: S\n): T & S {\n  return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {\n    if (Array.isArray(sourceValue)) {\n      if (Array.isArray(targetValue)) {\n        return mergeWith(clone(targetValue), sourceValue, mergeRecursively);\n      } else {\n        return mergeWith([], sourceValue, mergeRecursively);\n      }\n    } else if (isPlainObject(sourceValue)) {\n      if (isPlainObject(targetValue)) {\n        return mergeWith(clone(targetValue), sourceValue, mergeRecursively);\n      } else {\n        return mergeWith({}, sourceValue, mergeRecursively);\n      }\n    }\n  });\n}\n"
  },
  {
    "path": "src/object/toSnakeCaseKeys.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { toSnakeCaseKeys } from './toSnakeCaseKeys';\n\ndescribe('snakeizeKeys', () => {\n  it('should convert camelCase keys to snake_case in a flat object', () => {\n    const input = { userId: 1, firstName: 'John', lastName: 'Doe' };\n    const expected = { user_id: 1, first_name: 'John', last_name: 'Doe' };\n    expect(toSnakeCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should convert keys recursively in nested objects', () => {\n    const input = {\n      userData: {\n        userId: 1,\n        userAddress: {\n          streetName: 'Main St',\n          zipCode: '12345',\n        },\n      },\n    };\n    const expected = {\n      user_data: {\n        user_id: 1,\n        user_address: {\n          street_name: 'Main St',\n          zip_code: '12345',\n        },\n      },\n    };\n    expect(toSnakeCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should handle arrays of objects', () => {\n    const input = [\n      { userId: 1, firstName: 'John' },\n      { userId: 2, firstName: 'Jane' },\n    ];\n    const expected = [\n      { user_id: 1, first_name: 'John' },\n      { user_id: 2, first_name: 'Jane' },\n    ];\n    expect(toSnakeCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should handle arrays inside objects', () => {\n    const input = {\n      userList: [\n        { userId: 1, firstName: 'John' },\n        { userId: 2, firstName: 'Jane' },\n      ],\n    };\n    const expected = {\n      user_list: [\n        { user_id: 1, first_name: 'John' },\n        { user_id: 2, first_name: 'Jane' },\n      ],\n    };\n    expect(toSnakeCaseKeys(input)).toEqual(expected);\n  });\n\n  it('should not modify primitive values', () => {\n    expect(toSnakeCaseKeys(123)).toBe(123);\n    expect(toSnakeCaseKeys('string')).toBe('string');\n    expect(toSnakeCaseKeys(null)).toBe(null);\n    expect(toSnakeCaseKeys(undefined)).toBe(undefined);\n    expect(toSnakeCaseKeys(true)).toBe(true);\n  });\n\n  it('should handle empty objects and arrays', () => {\n    expect(toSnakeCaseKeys({})).toEqual({});\n    expect(toSnakeCaseKeys([])).toEqual([]);\n  });\n\n  it('should preserve object prototype methods', () => {\n    const input = { userId: 1, toString: Object.prototype.toString };\n    const result = toSnakeCaseKeys(input);\n    expect(result).toHaveProperty('user_id', 1);\n    expect(result).toHaveProperty('toString');\n    expect(result.toString).toBe(Object.prototype.toString);\n  });\n\n  it('should properly type nested objects', () => {\n    const input = {\n      userData: {\n        personalInfo: {\n          firstName: 'John',\n        },\n      },\n    };\n    const result = toSnakeCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<{\n      user_data: {\n        personal_info: {\n          first_name: string;\n        };\n      };\n    }>();\n  });\n\n  it('should properly type arrays', () => {\n    const input = [{ userId: 1 }, { userId: 2 }];\n    const result = toSnakeCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<Array<{ user_id: number }>>();\n  });\n\n  it('should properly type mixed complex structures', () => {\n    const input = {\n      users: [\n        { userId: 1, settings: { isActive: true } },\n        { userId: 2, settings: { isActive: false } },\n      ],\n    };\n    const result = toSnakeCaseKeys(input);\n\n    expectTypeOf(result).toMatchTypeOf<{\n      users: Array<{\n        user_id: number;\n        settings: {\n          is_active: boolean;\n        };\n      }>;\n    }>();\n  });\n\n  it('should have correct TypeScript types for non-plain objects', () => {\n    const input = { a: new Date(), b: /test/, c: new Map() };\n    const result = toSnakeCaseKeys(input);\n\n    expectTypeOf(result.a).toEqualTypeOf<Date>();\n    expectTypeOf(result.b).toEqualTypeOf<RegExp>();\n    expectTypeOf(result.c).toEqualTypeOf<Map<any, any>>();\n  });\n\n  it('should convert uppercase keys to snake_case at both runtime and type level', () => {\n    const input = {\n      FIRST_NAME: 'JinHo',\n      LAST: 'Yeom',\n    } as const;\n\n    const result = toSnakeCaseKeys(input);\n\n    expect(result).toEqual({\n      first_name: 'JinHo',\n      last: 'Yeom',\n    });\n\n    expectTypeOf(result).toMatchTypeOf<{\n      first_name: 'JinHo';\n      last: 'Yeom';\n    }>();\n  });\n});\n"
  },
  {
    "path": "src/object/toSnakeCaseKeys.ts",
    "content": "import { isArray } from '../compat/predicate/isArray.ts';\nimport { isPlainObject } from '../compat/predicate/isPlainObject.ts';\nimport { snakeCase } from '../string/snakeCase.ts';\n\ntype SnakeCase<S extends string> =\n  S extends Uppercase<S>\n    ? Lowercase<S>\n    : S extends `${infer P1}${infer P2}`\n      ? P2 extends Uncapitalize<P2>\n        ? `${Lowercase<P1>}${SnakeCase<P2>}`\n        : `${Lowercase<P1>}_${SnakeCase<Uncapitalize<P2>>}`\n      : Lowercase<S>;\n\ntype NonPlainObject =\n  | Date\n  | RegExp\n  | Map<any, any>\n  | Set<any>\n  | WeakMap<any, any>\n  | WeakSet<any>\n  | Promise<any>\n  | Error\n  | ArrayBuffer\n  | DataView\n  | Int8Array\n  | Uint8Array\n  | Uint8ClampedArray\n  | Int16Array\n  | Uint16Array\n  | Int32Array\n  | Uint32Array\n  | Float32Array\n  | Float64Array\n  | BigInt64Array\n  | BigUint64Array\n  | ((...args: any[]) => any)\n  | typeof globalThis;\n\nexport type ToSnakeCaseKeys<T> = T extends NonPlainObject\n  ? T\n  : T extends any[]\n    ? Array<ToSnakeCaseKeys<T[number]>>\n    : T extends Record<string, any>\n      ? { [K in keyof T as SnakeCase<string & K>]: ToSnakeCaseKeys<T[K]> }\n      : T;\n\n/**\n * Creates a new object composed of the properties with keys converted to snake_case.\n *\n * This function takes an object and returns a new object that includes the same properties,\n * but with all keys converted to snake_case format.\n *\n * @template T - The type of object.\n * @param {T} obj - The object to convert keys from.\n * @returns {ToSnakeCaseKeys<T>} A new object with all keys converted to snake_case.\n *\n * @example\n * // Example with objects\n * const obj = { userId: 1, firstName: 'John' };\n * const result = toSnakeCaseKeys(obj);\n * // result will be { user_id: 1, first_name: 'John' }\n *\n * // Example with arrays of objects\n * const arr = [\n *   { userId: 1, firstName: 'John' },\n *   { userId: 2, firstName: 'Jane' }\n * ];\n * const arrResult = toSnakeCaseKeys(arr);\n * // arrResult will be [{ user_id: 1, first_name: 'John' }, { user_id: 2, first_name: 'Jane' }]\n *\n * // Example with nested objects\n * const nested = {\n *   userData: {\n *     userId: 1,\n *     userAddress: {\n *       streetName: 'Main St',\n *       zipCode: '12345'\n *     }\n *   }\n * };\n * const nestedResult = toSnakeCaseKeys(nested);\n * // nestedResult will be:\n * // {\n * //   user_data: {\n * //     user_id: 1,\n * //     user_address: {\n * //       street_name: 'Main St',\n * //       zip_code: '12345'\n * //     }\n * //   }\n * // }\n */\nexport function toSnakeCaseKeys<T>(obj: T): ToSnakeCaseKeys<T> {\n  if (isArray(obj)) {\n    return obj.map(item => toSnakeCaseKeys(item)) as unknown as ToSnakeCaseKeys<T>;\n  }\n\n  if (isPlainObject(obj)) {\n    const result = {} as ToSnakeCaseKeys<T>;\n    const keys = Object.keys(obj as Record<PropertyKey, any>);\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n\n      const snakeKey = snakeCase(key) as keyof typeof result;\n      const convertedValue = toSnakeCaseKeys((obj as Record<PropertyKey, any>)[key]);\n      result[snakeKey] = convertedValue as ToSnakeCaseKeys<T>[keyof ToSnakeCaseKeys<T>];\n    }\n\n    return result;\n  }\n\n  return obj as ToSnakeCaseKeys<T>;\n}\n"
  },
  {
    "path": "src/predicate/index.ts",
    "content": "export { isArrayBuffer } from './isArrayBuffer.ts';\nexport { isBlob } from './isBlob.ts';\nexport { isBoolean } from './isBoolean.ts';\nexport { isBrowser } from './isBrowser.ts';\nexport { isBuffer } from './isBuffer.ts';\nexport { isDate } from './isDate.ts';\nexport { isEmptyObject } from './isEmptyObject.ts';\nexport { isEqual } from './isEqual.ts';\nexport { isEqualWith } from './isEqualWith.ts';\nexport { isError } from './isError.ts';\nexport { isFile } from './isFile.ts';\nexport { isFunction } from './isFunction.ts';\nexport { isJSON } from './isJSON.ts';\nexport { isJSONArray, isJSONObject, isJSONValue } from './isJSONValue.ts';\nexport { isLength } from './isLength.ts';\nexport { isMap } from './isMap.ts';\nexport { isNil } from './isNil.ts';\nexport { isNode } from './isNode.ts';\nexport { isNotNil } from './isNotNil.ts';\nexport { isNull } from './isNull.ts';\nexport { isNumber } from './isNumber.ts';\nexport { isPlainObject } from './isPlainObject.ts';\nexport { isPrimitive } from './isPrimitive.ts';\nexport { isPromise } from './isPromise.ts';\nexport { isRegExp } from './isRegExp.ts';\nexport { isSet } from './isSet.ts';\nexport { isString } from './isString.ts';\nexport { isSymbol } from './isSymbol.ts';\nexport { isTypedArray } from './isTypedArray.ts';\nexport { isUndefined } from './isUndefined.ts';\nexport { isWeakMap } from './isWeakMap.ts';\nexport { isWeakSet } from './isWeakSet.ts';\n"
  },
  {
    "path": "src/predicate/isArrayBuffer.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isArrayBuffer } from './isArrayBuffer';\n\ndescribe('isArrayBuffer', () => {\n  it('returns true if the value is a ArrayBuffer', () => {\n    expect(isArrayBuffer(new ArrayBuffer(8))).toBe(true);\n  });\n\n  it('returns false if the value is not a ArrayBuffer', () => {\n    expect(isArrayBuffer(null)).toBe(false);\n    expect(isArrayBuffer('')).toBe(false);\n    expect(isArrayBuffer(123)).toBe(false);\n    expect(isArrayBuffer({})).toBe(false);\n    expect(isArrayBuffer([])).toBe(false);\n    expect(isArrayBuffer(new Map())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isArrayBuffer.ts",
    "content": "/**\n * Checks if a given value is `ArrayBuffer`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `ArrayBuffer`.\n *\n * @param {unknown} value The value to check if it is a `ArrayBuffer`.\n * @returns {value is ArrayBuffer} Returns `true` if `value` is a `ArrayBuffer`, else `false`.\n *\n * @example\n * const value1 = new ArrayBuffer();\n * const value2 = new Array();\n * const value3 = new Map();\n *\n * console.log(isArrayBuffer(value1)); // true\n * console.log(isArrayBuffer(value2)); // false\n * console.log(isArrayBuffer(value3)); // false\n */\n\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n  return value instanceof ArrayBuffer;\n}\n"
  },
  {
    "path": "src/predicate/isBlob.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isBlob } from './isBlob';\n\ndescribe('isBlob', () => {\n  it('returns true if the value is a Blob', () => {\n    expect(isBlob(new Blob())).toBe(true);\n    const blobWithOptions = new Blob(['content'], { type: 'text/plain' });\n    expect(isBlob(blobWithOptions)).toBe(true);\n    const originalFile = globalThis.File;\n    //@ts-expect-error - globalThis.File is browser only.\n    globalThis.File = class File extends Blob {\n      name: string;\n      constructor(chunks: any[], filename: string, options?: BlobPropertyBag) {\n        super(chunks, options);\n        this.name = filename;\n      }\n    };\n    const file = new File(['content'], 'example.txt', { type: 'text/plain' });\n    expect(isBlob(file)).toBe(true);\n    globalThis.File = originalFile;\n  });\n\n  it('returns false if the value is not a Blob', () => {\n    expect(isBlob(0)).toBe(false);\n    expect(isBlob('abc')).toBe(false);\n    expect(isBlob(123)).toBe(false);\n    expect(isBlob({ a: 1 })).toBe(false);\n    expect(isBlob([1, 2, 3])).toBe(false);\n    expect(isBlob(null)).toBe(false);\n    expect(isBlob(undefined)).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const items: Array<Blob | number> = [new Blob(), 1, new Blob(), 2];\n    const result = items.filter(isBlob);\n    expect(result).toHaveLength(2);\n    expect(result[0]).toBeInstanceOf(Blob);\n    expect(result[1]).toBeInstanceOf(Blob);\n  });\n\n  it('returns false if Blob is not supported in the environment', () => {\n    const blob = new Blob();\n    const originalBlob = globalThis.Blob;\n    // @ts-expect-error - we need to simulate the absence of Blob\n    globalThis.Blob = undefined;\n    expect(isBlob(blob)).toBe(false);\n    globalThis.Blob = originalBlob;\n  });\n});\n"
  },
  {
    "path": "src/predicate/isBlob.ts",
    "content": "/**\n * Checks if the given value is a Blob.\n *\n * This function tests whether the provided value is an instance of `Blob`.\n * It returns `true` if the value is an instance of `Blob`, and `false` otherwise.\n *\n * @param {unknown} x - The value to test if it is a Blob.\n * @returns {x is Blob} True if the value is a Blob, false otherwise.\n *\n * @example\n * const value1 = new Blob();\n * const value2 = {};\n *\n * console.log(isBlob(value1)); // true\n * console.log(isBlob(value2)); // false\n */\nexport function isBlob(x: unknown): x is Blob {\n  // Return false if Blob is not supported in the environment\n  if (typeof Blob === 'undefined') {\n    return false;\n  }\n\n  return x instanceof Blob;\n}\n"
  },
  {
    "path": "src/predicate/isBoolean.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isBoolean } from './isBoolean';\n\ndescribe('isBoolean', () => {\n  it('returns true if the value is boolean', () => {\n    expect(isBoolean(true)).toBe(true);\n    expect(isBoolean(false)).toBe(true);\n  });\n\n  it('returns false if the value is not boolean', () => {\n    expect(isBoolean(0)).toBe(false);\n    expect(isBoolean('abc')).toBe(false);\n    expect(isBoolean(123)).toBe(false);\n    expect(isBoolean({ a: 1 })).toBe(false);\n    expect(isBoolean([1, 2, 3])).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr = [1, 2, true, 4, false];\n\n    const result = arr.filter(isBoolean);\n\n    // Here the type of result should be `boolean[]`.\n    expect(result).toStrictEqual([true, false]);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isBoolean.ts",
    "content": "/**\n * Checks if the given value is boolean.\n *\n * This function tests whether the provided value is strictly `boolean`.\n * It returns `true` if the value is `boolean`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `boolean`.\n *\n * @param {unknown} x - The Value to test if it is boolean.\n * @returns {x is boolean} True if the value is boolean, false otherwise.\n *\n * @example\n *\n * const value1 = true;\n * const value2 = 0;\n * const value3 = 'abc';\n *\n * console.log(isBoolean(value1)); // true\n * console.log(isBoolean(value2)); // false\n * console.log(isBoolean(value3)); // false\n *\n */\nexport function isBoolean(x: unknown): x is boolean {\n  return typeof x === 'boolean';\n}\n"
  },
  {
    "path": "src/predicate/isBrowser.spec.ts",
    "content": "// @vitest-environment happy-dom\nimport { describe, expect, it } from 'vitest';\nimport { isBrowser } from './isBrowser';\n\ndescribe('isBrowser', () => {\n  it('should return true in browser environment', () => {\n    expect(isBrowser()).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isBrowser.ts",
    "content": "declare let window:\n  | {\n      document: unknown;\n    }\n  | undefined;\n\n/**\n * Checks if the current environment is a browser.\n *\n * This function checks for the existence of the `window.document` property,\n * which only exists in browser environments.\n *\n * @returns {boolean} `true` if the current environment is a browser, otherwise `false`.\n *\n * @example\n * if (isBrowser()) {\n *   console.log(\"This is running in a browser\");\n *   document.getElementById('app').innerHTML = 'Hello World';\n * }\n */\nexport function isBrowser(): boolean {\n  return typeof window !== 'undefined' && window?.document != null;\n}\n"
  },
  {
    "path": "src/predicate/isBuffer.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isBuffer } from './isBuffer';\n\ndescribe('isBuffer', () => {\n  it('should return true for Buffer instances', () => {\n    const buffer = Buffer.from('test');\n    expect(isBuffer(buffer)).toBe(true);\n  });\n\n  it('should return false for non-Buffer instances', () => {\n    expect(isBuffer(null)).toBe(false);\n    expect(isBuffer(undefined)).toBe(false);\n    expect(isBuffer(123)).toBe(false);\n    expect(isBuffer('string')).toBe(false);\n    expect(isBuffer([])).toBe(false);\n    expect(isBuffer({})).toBe(false);\n    expect(isBuffer(new Uint8Array(2))).toBe(false);\n  });\n\n  it('should return false when Buffer is not defined', () => {\n    const originalBuffer = global.Buffer;\n    // eslint-disable-next-line\n    // @ts-ignore\n    delete global.Buffer;\n\n    expect(isBuffer(new Uint8Array())).toBe(false);\n\n    global.Buffer = originalBuffer; // Restore Buffer\n  });\n});\n"
  },
  {
    "path": "src/predicate/isBuffer.ts",
    "content": "declare let Buffer:\n  | {\n      isBuffer: (a: any) => boolean;\n    }\n  | undefined;\n\n/**\n * Checks if the given value is a Buffer instance.\n *\n * This function tests whether the provided value is an instance of Buffer.\n * It returns `true` if the value is a Buffer, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.\n *\n * @param {unknown} x - The value to check if it is a Buffer.\n * @returns {boolean} Returns `true` if `x` is a Buffer, else `false`.\n *\n * @example\n * const buffer = Buffer.from(\"test\");\n * console.log(isBuffer(buffer)); // true\n *\n * const notBuffer = \"not a buffer\";\n * console.log(isBuffer(notBuffer)); // false\n */\nexport function isBuffer(x: unknown): boolean {\n  // eslint-disable-next-line\n  // @ts-ignore\n  return typeof Buffer !== 'undefined' && Buffer.isBuffer(x);\n}\n"
  },
  {
    "path": "src/predicate/isDate.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isDate } from './isDate';\n\ndescribe('isDate', () => {\n  it('should return `true` for dates', () => {\n    expect(isDate(new Date())).toBe(true);\n  });\n\n  it('should return `false` for non-dates', () => {\n    expect(isDate('2024-01-01')).toBe(false);\n    expect(isDate(2024)).toBe(false);\n    expect(isDate({ year: 2024, month: 1, day: 1 })).toBe(false);\n    expect(isDate([2024, 1, 1])).toBe(false);\n    expect(isDate(new Error())).toBe(false);\n    expect(isDate(/a/)).toBe(false);\n    expect(isDate(Symbol('2024'))).toBe(false);\n    expect(isDate(null)).toBe(false);\n    expect(isDate(undefined)).toBe(false);\n  });\n\n  it('should work on date within object', () => {\n    const obj = {\n      date: new Date(),\n    };\n    expect(isDate(obj.date)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isDate.ts",
    "content": "/**\n * Checks if `value` is a Date object.\n *\n * @param {unknown} value The value to check.\n * @returns {value is Date} Returns `true` if `value` is a Date object, `false` otherwise.\n *\n * @example\n * const value1 = new Date();\n * const value2 = '2024-01-01';\n *\n * console.log(isDate(value1)); // true\n * console.log(isDate(value2)); // false\n */\nexport function isDate(value: unknown): value is Date {\n  return value instanceof Date;\n}\n"
  },
  {
    "path": "src/predicate/isEmptyObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isEmptyObject } from './isEmptyObject';\n\ndescribe('isEmptyObject', () => {\n  it('returns true for empty plain objects', () => {\n    expect(isEmptyObject({})).toBe(true);\n    expect(isEmptyObject(new Object())).toBe(true);\n    expect(isEmptyObject(Object.create(null))).toBe(true);\n  });\n\n  it('returns false for non-empty plain objects', () => {\n    expect(isEmptyObject({ a: 1 })).toBe(false);\n    expect(isEmptyObject({ key: 'value' })).toBe(false);\n    expect(isEmptyObject({ nested: { key: true } })).toBe(false);\n  });\n\n  it('returns false for non-plain objects', () => {\n    expect(isEmptyObject([])).toBe(false);\n    expect(isEmptyObject([1, 2, 3])).toBe(false);\n    expect(isEmptyObject(new Date())).toBe(false);\n    expect(isEmptyObject(new Map())).toBe(false);\n    expect(isEmptyObject(new Set())).toBe(false);\n  });\n\n  it('returns false for non-objects', () => {\n    expect(isEmptyObject(null)).toBe(false);\n    expect(isEmptyObject(undefined)).toBe(false);\n    expect(isEmptyObject(0)).toBe(false);\n    expect(isEmptyObject('')).toBe(false);\n    expect(isEmptyObject(true)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isEmptyObject.ts",
    "content": "import { isPlainObject } from './isPlainObject.ts';\n\n/**\n * Checks if a value is an empty plain object.\n *\n * @param {unknown} value - The value to check.\n * @returns {value is Record<PropertyKey, never>} - True if the value is an empty plain object, otherwise false.\n *\n * @example\n * isEmptyObject({}); // true\n * isEmptyObject({ a: 1 }); // false\n * isEmptyObject([]); // false\n * isEmptyObject(null); // false\n */\nexport function isEmptyObject(value: unknown): value is Record<PropertyKey, never> {\n  return isPlainObject(value) && Object.keys(value).length === 0;\n}\n"
  },
  {
    "path": "src/predicate/isEqual.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isEqual } from './isEqual';\n\ndescribe('isEqual', () => {\n  it('should return true for equal primitive values', () => {\n    expect(isEqual(1, 1)).toBe(true);\n    expect(isEqual('hello', 'hello')).toBe(true);\n    expect(isEqual(true, true)).toBe(true);\n    expect(isEqual(100n, 100n)).toBe(true);\n  });\n\n  it('should return false for different primitive values', () => {\n    expect(isEqual(1, 2)).toBe(false);\n    expect(isEqual('hello', 'world')).toBe(false);\n    expect(isEqual(true, false)).toBe(false);\n    expect(isEqual(101n, 100n)).toBe(false);\n  });\n\n  it('should return true for NaN comparisons', () => {\n    expect(isEqual(NaN, NaN)).toBe(true);\n  });\n\n  it('should return true for +0 and -0 comparisons', () => {\n    expect(isEqual(+0, -0)).toBe(true);\n  });\n\n  it('should return true for equal Date objects', () => {\n    const date1 = new Date('2020-01-01');\n    const date2 = new Date('2020-01-01');\n    expect(isEqual(date1, date2)).toBe(true);\n  });\n\n  it('should return false for different Date objects', () => {\n    const date1 = new Date('2020-01-01');\n    const date2 = new Date('2021-01-01');\n    expect(isEqual(date1, date2)).toBe(false);\n  });\n\n  it('should return true for equal RegExp objects', () => {\n    const regex1 = /hello/g;\n    const regex2 = /hello/g;\n    expect(isEqual(regex1, regex2)).toBe(true);\n  });\n\n  it('should return false for different RegExp objects', () => {\n    const regex1 = /hello/g;\n    const regex2 = /hello/i;\n    expect(isEqual(regex1, regex2)).toBe(false);\n  });\n\n  it('should return true for deeply equal objects', () => {\n    const obj1 = { a: 1, b: { c: 2 } };\n    const obj2 = { a: 1, b: { c: 2 } };\n    expect(isEqual(obj1, obj2)).toBe(true);\n\n    const obj3 = null;\n    const obj4 = null;\n\n    expect(isEqual(obj3, obj4)).toBe(true);\n  });\n\n  it('should return false for objects with different values', () => {\n    const obj1 = { a: 1, b: { c: 2 } };\n    const obj2 = { a: 1, b: { c: 3 } };\n    expect(isEqual(obj1, obj2)).toBe(false);\n\n    const obj3 = null;\n    const obj4 = { a: 1, b: { c: 3 } };\n\n    expect(isEqual(obj3, obj4)).toBe(false);\n  });\n\n  it('should return false for objects with different keys', () => {\n    const obj1 = { a: 1, b: 2 };\n    const obj2 = { a: 1, c: 2 };\n    expect(isEqual(obj1, obj2)).toBe(false);\n  });\n\n  it('should return true for deeply equal arrays', () => {\n    const arr1 = [1, 2, 3];\n    const arr2 = [1, 2, 3];\n    expect(isEqual(arr1, arr2)).toBe(true);\n  });\n\n  it('should return false for arrays with different values', () => {\n    const arr1 = [1, 2, 3];\n    const arr2 = [1, 2, 4];\n    expect(isEqual(arr1, arr2)).toBe(false);\n  });\n\n  it('should return false for arrays with different lengths', () => {\n    const arr1 = [1, 2, 3];\n    const arr2 = [1, 2];\n    expect(isEqual(arr1, arr2)).toBe(false);\n  });\n\n  it('should return true for equal array buffers', () => {\n    const buffer1 = new Uint8Array([1, 2, 3]).buffer;\n    const buffer2 = new Uint8Array([1, 2, 3]).buffer;\n\n    expect(isEqual(buffer1, buffer2)).toBe(true);\n  });\n\n  it('should return false for different array buffers', () => {\n    const buffer1 = new Uint8Array([1, 2, 3]).buffer;\n    const buffer2 = new Uint8Array([1, 2]).buffer;\n\n    expect(isEqual(buffer1, buffer2)).toBe(false);\n\n    const buffer3 = new Uint8Array([1, 2, 3]).buffer;\n    const buffer4 = new Uint8Array([1, 2, 4]).buffer;\n\n    expect(isEqual(buffer3, buffer4)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isEqual.ts",
    "content": "import { isEqualWith } from './isEqualWith.ts';\nimport { noop } from '../function/noop.ts';\n\n/**\n * Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison.\n *\n * @param {unknown} a - The first value to compare.\n * @param {unknown} b - The second value to compare.\n * @returns {boolean} `true` if the values are equal, otherwise `false`.\n *\n * @example\n * isEqual(1, 1); // true\n * isEqual({ a: 1 }, { a: 1 }); // true\n * isEqual(/abc/g, /abc/g); // true\n * isEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\n * isEqual([1, 2, 3], [1, 2, 3]); // true\n */\nexport function isEqual(a: any, b: any): boolean {\n  return isEqualWith(a, b, noop);\n}\n"
  },
  {
    "path": "src/predicate/isEqualWith.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isEqualWith } from './isEqualWith';\nimport { args } from '../compat/_internal/args';\nimport { arrayViews } from '../compat/_internal/arrayViews';\nimport { stubFalse } from '../compat/util/stubFalse';\nimport { noop } from '../function';\n\ndescribe('isEqualWith', () => {\n  const symbol1 = Symbol ? Symbol('a') : true;\n  const symbol2 = Symbol ? Symbol('b') : false;\n\n  it('should use the customizer function for string comparison', () => {\n    const customizer = (a: any, b: any) => {\n      if (typeof a === 'string' && typeof b === 'string') {\n        return a.toLowerCase() === b.toLowerCase();\n      }\n    };\n\n    expect(isEqualWith('Hello', 'hello', customizer)).toBe(true);\n    expect(isEqualWith('Hello', 'world', customizer)).toBe(false);\n  });\n\n  it('should use the customizer function for number comparison', () => {\n    const customizer = (a: any, b: any) => {\n      if (typeof a === 'number' && typeof b === 'number') {\n        return Math.abs(a - b) < 0.01;\n      }\n    };\n\n    expect(isEqualWith(1.001, 1.002, customizer)).toBe(true);\n    expect(isEqualWith(1.001, 1.02, customizer)).toBe(false);\n  });\n\n  it('should use the customizer function for object comparison', () => {\n    const customizer = (a: any, b: any, key?: PropertyKey) => {\n      if (key === 'date' && a instanceof Date && b instanceof Date) {\n        return a.getFullYear() === b.getFullYear();\n      }\n    };\n\n    const obj1 = { name: 'John', date: new Date('2023-02-01') };\n    const obj2 = { name: 'John', date: new Date('2023-06-15') };\n    const obj3 = { name: 'John', date: new Date('2024-02-01') };\n\n    expect(isEqualWith(obj1, obj2, customizer)).toBe(true);\n    expect(isEqualWith(obj1, obj3, customizer)).toBe(false);\n  });\n\n  it('should use the customizer function with parent objects', () => {\n    const customizer = (a: any, b: any, key?: PropertyKey, aParent?: any, bParent?: any) => {\n      if (key === 'value' && aParent && bParent && aParent.type === 'special' && bParent.type === 'special') {\n        return String(a) === String(b);\n      }\n    };\n\n    const obj1 = { type: 'special', value: 42 };\n    const obj2 = { type: 'special', value: '42' };\n    const obj3 = { type: 'normal', value: 42 };\n    const obj4 = { type: 'normal', value: '42' };\n\n    expect(isEqualWith(obj1, obj2, customizer)).toBe(true);\n    expect(isEqualWith(obj1, obj3, customizer)).toBe(false);\n    expect(isEqualWith(obj3, obj4, customizer)).toBe(false);\n  });\n\n  it('should compare primitives when customizer returns undefined', () => {\n    const pairs = [\n      [1, 1, true],\n      [1, Object(1), true],\n      [1, '1', false],\n      [1, 2, false],\n      [-0, -0, true],\n      [0, 0, true],\n      [0, Object(0), true],\n      [Object(0), Object(0), true],\n      [-0, 0, true],\n      [0, '0', false],\n      [0, null, false],\n      [NaN, NaN, true],\n      [NaN, Object(NaN), true],\n      [Object(NaN), Object(NaN), true],\n      [NaN, 'a', false],\n      [NaN, Infinity, false],\n      ['a', 'a', true],\n      ['a', Object('a'), true],\n      [Object('a'), Object('a'), true],\n      ['a', 'b', false],\n      ['a', ['a'], false],\n      [true, true, true],\n      [true, Object(true), true],\n      [Object(true), Object(true), true],\n      [true, 1, false],\n      [true, 'a', false],\n      [false, false, true],\n      [false, Object(false), true],\n      [Object(false), Object(false), true],\n      [false, 0, false],\n      [false, '', false],\n      [symbol1, symbol1, true],\n      [symbol1, Object(symbol1), true],\n      [Object(symbol1), Object(symbol1), true],\n      [symbol1, symbol2, false],\n      [null, null, true],\n      [null, undefined, false],\n      [null, {}, false],\n      [null, '', false],\n      [undefined, undefined, true],\n      [undefined, null, false],\n      [undefined, '', false],\n    ];\n\n    const expected = pairs.map(pair => pair[2]);\n\n    const actual = pairs.map(pair => isEqualWith(pair[0], pair[1], noop));\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare arrays when customizer returns undefined', () => {\n    let array1: unknown[] = [true, null, 1, 'a', undefined];\n    let array2: unknown[] = [true, null, 1, 'a', undefined];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { e: 1 }];\n    array2 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { e: 1 }];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = [1];\n    array1[2] = 3;\n\n    array2 = [1];\n    array2[1] = undefined;\n    array2[2] = 3;\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = [Object(1), false, Object('a'), /x/, new Date(2012, 4, 23), ['a', 'b', [Object('c')]], { a: 1 }];\n    array2 = [1, Object(false), 'a', /x/, new Date(2012, 4, 23), ['a', Object('b'), ['c']], { a: 1 }];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = [1, 2, 3];\n    array2 = [3, 2, 1];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(false);\n\n    array1 = [1, 2];\n    array2 = [1, 2, 3];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(false);\n  });\n\n  it('should treat arrays with identical values but different non-index properties as equal when customizer returns undefined', () => {\n    let array1: any = [1, 2, 3];\n    let array2: any = [1, 2, 3];\n\n    array1.every =\n      array1.filter =\n      array1.forEach =\n      array1.indexOf =\n      array1.lastIndexOf =\n      array1.map =\n      array1.some =\n      array1.reduce =\n      array1.reduceRight =\n        null;\n\n    array2.concat =\n      array2.join =\n      array2.pop =\n      array2.reverse =\n      array2.shift =\n      array2.slice =\n      array2.sort =\n      array2.splice =\n      array2.unshift =\n        null;\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = [1, 2, 3];\n    array1.a = 1;\n\n    array2 = [1, 2, 3];\n    array2.b = 1;\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1 = /c/.exec('abcde');\n    array2 = ['c'];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n  });\n\n  it('should compare sparse arrays when customizer returns undefined', () => {\n    const array = Array(1);\n\n    expect(isEqualWith(array, Array(1), noop)).toBe(true);\n    expect(isEqualWith(array, [undefined], noop)).toBe(true);\n    expect(isEqualWith(array, Array(2), noop)).toBe(false);\n  });\n\n  it('should compare plain objects when customizer returns undefined', () => {\n    let object1: any = { a: true, b: null, c: 1, d: 'a', e: undefined };\n    let object2: any = { a: true, b: null, c: 1, d: 'a', e: undefined };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n\n    object1 = { a: [1, 2, 3], b: new Date(2012, 4, 23), c: /x/, d: { e: 1 } };\n    object2 = { a: [1, 2, 3], b: new Date(2012, 4, 23), c: /x/, d: { e: 1 } };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object2 = { a: 3, b: 2, c: 1 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object2 = { d: 1, e: 2, f: 3 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n\n    object1 = { a: 1, b: 2 };\n    object2 = { a: 1, b: 2, c: 3 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n  });\n\n  it('should compare objects regardless of key order when customizer returns undefined', () => {\n    const object1 = { a: 1, b: 2, c: 3 };\n    const object2 = { c: 3, a: 1, b: 2 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n  });\n\n  it('should compare nested objects when customizer returns undefined', () => {\n    const object1 = {\n      a: [1, 2, 3],\n      b: true,\n      c: Object(1),\n      d: 'a',\n      e: {\n        f: ['a', Object('b'), 'c'],\n        g: Object(false),\n        h: new Date(2012, 4, 23),\n        i: noop,\n        j: 'a',\n      },\n    };\n\n    const object2 = {\n      a: [1, Object(2), 3],\n      b: Object(true),\n      c: 1,\n      d: Object('a'),\n      e: {\n        f: ['a', 'b', 'c'],\n        g: false,\n        h: new Date(2012, 4, 23),\n        i: noop,\n        j: 'a',\n      },\n    };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n  });\n\n  it('should compare object instances when customizer returns undefined', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.a = 1;\n\n    function Bar() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Bar.prototype.a = 2;\n\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith(new Foo(), new Foo(), noop)).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith(new Foo(), new Bar(), noop)).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith({ a: 1 }, new Foo(), noop)).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith({ a: 2 }, new Bar(), noop)).toBe(false);\n  });\n\n  it('should compare objects with constructor properties when customizer returns undefined', () => {\n    expect(isEqualWith({ constructor: 1 }, { constructor: 1 }, noop)).toBe(true);\n    expect(isEqualWith({ constructor: 1 }, { constructor: '1' }, noop)).toBe(false);\n    expect(isEqualWith({ constructor: [1] }, { constructor: [1] }, noop)).toBe(true);\n    expect(isEqualWith({ constructor: [1] }, { constructor: ['1'] }, noop)).toBe(false);\n    expect(isEqualWith({ constructor: Object }, {}, noop)).toBe(false);\n  });\n\n  it('should compare arrays with circular references when customizer returns undefined', () => {\n    let array1: any[] = [];\n    let array2: any[] = [];\n\n    array1.push(array1);\n    array2.push(array2);\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1.push('b');\n    array2.push('b');\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1.push('c');\n    array2.push('d');\n\n    expect(isEqualWith(array1, array2, noop)).toBe(false);\n\n    array1 = ['a', 'b', 'c'];\n    array1[1] = array1;\n    array2 = ['a', ['a', 'b', 'c'], 'c'];\n\n    expect(isEqualWith(array1, array2, noop)).toBe(false);\n  });\n\n  it('should have transitive equivalence for circular references of arrays when customizer returns undefined', () => {\n    const array1: any[] = [];\n    const array2: any[] = [array1];\n    const array3: any[] = [array2];\n\n    array1[0] = array1;\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n    expect(isEqualWith(array2, array3, noop)).toBe(true);\n    expect(isEqualWith(array1, array3, noop)).toBe(true);\n  });\n\n  it('should compare objects with circular references when customizer returns undefined', () => {\n    let object1: any = {};\n    let object2: any = {};\n\n    object1.a = object1;\n    object2.a = object2;\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n\n    object1.b = 0;\n    object2.b = Object(0);\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n\n    object1.c = Object(1);\n    object2.c = Object(2);\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n\n    object1 = { a: 1, b: 2, c: 3 };\n    object1.b = object1;\n    object2 = { a: 1, b: { a: 1, b: 2, c: 3 }, c: 3 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n  });\n\n  it('should have transitive equivalence for circular references of objects when customizer returns undefined', () => {\n    const object1: any = {};\n    const object2: any = { a: object1 };\n    const object3: any = { a: object2 };\n\n    object1.a = object1;\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n    expect(isEqualWith(object2, object3, noop)).toBe(true);\n    expect(isEqualWith(object1, object3, noop)).toBe(true);\n  });\n\n  it('should compare objects with multiple circular references when customizer returns undefined', () => {\n    const array1: any = [{}];\n    const array2: any = [{}];\n\n    (array1[0].a = array1).push(array1);\n    (array2[0].a = array2).push(array2);\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1[0].b = 0;\n    array2[0].b = Object(0);\n\n    expect(isEqualWith(array1, array2, noop)).toBe(true);\n\n    array1[0].c = Object(1);\n    array2[0].c = Object(2);\n\n    expect(isEqualWith(array1, array2, noop)).toBe(false);\n  });\n\n  it('should compare objects with complex circular references when customizer returns undefined', () => {\n    const object1: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: { a: 2 },\n    };\n\n    const object2: any = {\n      foo: { b: { c: { d: {} } } },\n      bar: { a: 2 },\n    };\n\n    object1.foo.b.c.d = object1;\n    object1.bar.b = object1.foo.b;\n\n    object2.foo.b.c.d = object2;\n    object2.bar.b = object2.foo.b;\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n  });\n\n  it('should compare objects with shared property values when customizer returns undefined', () => {\n    const object1: any = {\n      a: [1, 2],\n    };\n\n    const object2: any = {\n      a: [1, 2],\n      b: [1, 2],\n    };\n\n    object1.b = object1.a;\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n  });\n\n  it('should treat objects created by `Object.create(null)` like plain objects when customizer returns undefined', () => {\n    function Foo() {\n      // eslint-disable-next-line\n      // @ts-ignore\n      this.a = 1;\n    }\n    Foo.prototype.constructor = null;\n\n    const object1 = Object.create(null);\n    object1.a = 1;\n\n    const object2 = { a: 1 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith(new Foo(), object2, noop)).toBe(false);\n  });\n\n  it('should avoid common type coercions when customizer returns undefined', () => {\n    expect(isEqualWith(true, Object(false), noop)).toBe(false);\n    expect(isEqualWith(Object(false), Object(0), noop)).toBe(false);\n    expect(isEqualWith(false, Object(''), noop)).toBe(false);\n    expect(isEqualWith(Object(36), Object('36'), noop)).toBe(false);\n    expect(isEqualWith(0, '', noop)).toBe(false);\n    expect(isEqualWith(1, true, noop)).toBe(false);\n    expect(isEqualWith(1337756400000, new Date(2012, 4, 23), noop)).toBe(false);\n    expect(isEqualWith('36', 36, noop)).toBe(false);\n    expect(isEqualWith(36, '36', noop)).toBe(false);\n  });\n\n  it('should compare `arguments` objects when customizer returns undefined', () => {\n    const args1 = (function () {\n      // eslint-disable-next-line\n      return arguments;\n    })();\n    const args2 = (function () {\n      // eslint-disable-next-line\n      return arguments;\n    })();\n    // eslint-disable-next-line\n    const args3 = (function (..._: any[]) {\n      // eslint-disable-next-line\n      return arguments;\n    })(1, 2);\n\n    expect(isEqualWith(args1, args2, noop)).toBe(true);\n    expect(isEqualWith(args1, args3, noop)).toBe(false);\n  });\n\n  it('should treat `arguments` objects like `Object` objects when customizer returns undefined', () => {\n    const object = { 0: 1, 1: 2, 2: 3 };\n\n    function Foo() {}\n    Foo.prototype = object;\n\n    expect(isEqualWith(args, object, noop)).toBe(true);\n    expect(isEqualWith(object, args, noop)).toBe(true);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith(args, new Foo(), noop)).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isEqualWith(new Foo(), args, noop)).toBe(false);\n  });\n\n  it('should compare array buffers when customizer returns undefined', () => {\n    const buffer = new Int8Array([-1]).buffer;\n\n    expect(isEqualWith(buffer, new Uint8Array([255]).buffer, noop)).toBe(true);\n    expect(isEqualWith(buffer, new ArrayBuffer(1), noop)).toBe(false);\n  });\n\n  it('should compare array views when customizer returns undefined', () => {\n    const pairs = arrayViews.map((type, viewIndex) => {\n      const otherType = arrayViews[(viewIndex + 1) % arrayViews.length];\n      const CtorA =\n        // eslint-disable-next-line\n        // @ts-ignore\n        globalThis[type] ||\n        // eslint-disable-next-line\n        // @ts-ignore\n        function (n) {\n          // eslint-disable-next-line\n          // @ts-ignore\n          this.n = n;\n        };\n      const CtorB =\n        // eslint-disable-next-line\n        // @ts-ignore\n        globalThis[otherType] ||\n        // eslint-disable-next-line\n        // @ts-ignore\n        function (n) {\n          // eslint-disable-next-line\n          // @ts-ignore\n          this.n = n;\n        };\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferA = globalThis[type] ? new ArrayBuffer(8) : 8;\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferB = globalThis[otherType] ? new ArrayBuffer(8) : 8;\n      // eslint-disable-next-line\n      // @ts-ignore\n      const bufferC = globalThis[otherType] ? new ArrayBuffer(16) : 16;\n\n      return [new CtorA(bufferA), new CtorA(bufferA), new CtorB(bufferB), new CtorB(bufferC)];\n    });\n\n    const expected = pairs.map(() => [true, false, false]);\n\n    const actual = pairs.map((pair: any[]) => [\n      isEqualWith(pair[0], pair[1], noop),\n      isEqualWith(pair[0], pair[2], noop),\n      isEqualWith(pair[2], pair[3], noop),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare buffers when customizer returns undefined', () => {\n    const buffer = Buffer.from([1]);\n\n    expect(isEqualWith(buffer, Buffer.from([1]), noop)).toBe(true);\n    expect(isEqualWith(buffer, Buffer.from([2]), noop)).toBe(false);\n    expect(isEqualWith(buffer, new Uint8Array([1]), noop)).toBe(false);\n  });\n\n  it('should compare date objects when customizer returns undefined', () => {\n    const date = new Date(2012, 4, 23);\n\n    expect(isEqualWith(date, new Date(2012, 4, 23), noop)).toBe(true);\n    expect(isEqualWith(new Date('a'), new Date('b'), noop)).toBe(true);\n    expect(isEqualWith(date, new Date(2013, 3, 25), noop)).toBe(false);\n    expect(isEqualWith(date, { getTime: () => Number(date) }, noop)).toBe(false);\n  });\n\n  it('should compare error objects when customizer returns undefined', () => {\n    const pairs = ['Error', 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError'].map(\n      (type, index, errorTypes) => {\n        const otherType = errorTypes[++index % errorTypes.length];\n        // eslint-disable-next-line\n        // @ts-ignore\n        const CtorA = globalThis[type];\n        // eslint-disable-next-line\n        // @ts-ignore\n        const CtorB = globalThis[otherType];\n\n        return [new CtorA('a'), new CtorA('a'), new CtorB('a'), new CtorB('b')];\n      }\n    );\n\n    const expected = pairs.map(() => [true, false, false]);\n\n    const actual = pairs.map(pair => [\n      isEqualWith(pair[0], pair[1], noop),\n      isEqualWith(pair[0], pair[2], noop),\n      isEqualWith(pair[2], pair[3], noop),\n    ]);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should compare functions when customizer returns undefined', () => {\n    function a() {\n      return 1 + 2;\n    }\n    function b() {\n      return 1 + 2;\n    }\n\n    expect(isEqualWith(a, a, noop)).toBe(true);\n    expect(isEqualWith(a, b, noop)).toBe(false);\n  });\n\n  it('should compare maps when customizer returns undefined', () => {\n    [[new Map(), new Map()]].forEach(maps => {\n      const map1 = maps[0];\n      const map2 = maps[1];\n\n      map1.set('a', 1);\n      map2.set('b', 2);\n      expect(isEqualWith(map1, map2, noop)).toBe(false);\n\n      map1.set('b', 2);\n      map2.set('a', 1);\n      expect(isEqualWith(map1, map2, noop)).toBe(true);\n\n      map1.delete('a');\n      map1.set('a', 1);\n      expect(isEqualWith(map1, map2, noop)).toBe(true);\n\n      map2.delete('a');\n      expect(isEqualWith(map1, map2, noop)).toBe(false);\n\n      map1.clear();\n      map2.clear();\n    });\n  });\n\n  it('should compare maps with circular references when customizer returns undefined', () => {\n    const map1 = new Map();\n    const map2 = new Map();\n\n    map1.set('a', map1);\n    map2.set('a', map2);\n    expect(isEqualWith(map1, map2, noop)).toBe(true);\n\n    map1.set('b', 1);\n    map2.set('b', 2);\n    expect(isEqualWith(map1, map2, noop)).toBe(false);\n  });\n\n  it('should compare promises by reference when customizer returns undefined', () => {\n    [[Promise.resolve(1), Promise.resolve(1)]].forEach(promises => {\n      const promise1 = promises[0];\n      const promise2 = promises[1];\n\n      expect(isEqualWith(promise1, promise2, noop)).toBe(false);\n      expect(isEqualWith(promise1, promise1, noop)).toBe(true);\n    });\n  });\n\n  it('should compare regexes when customizer returns undefined', () => {\n    expect(isEqualWith(/x/gim, /x/gim, noop)).toBe(true);\n    expect(isEqualWith(/x/gim, /x/gim, noop)).toBe(true);\n    expect(isEqualWith(/x/gi, /x/g, noop)).toBe(false);\n    expect(isEqualWith(/x/, /y/, noop)).toBe(false);\n\n    expect(\n      isEqualWith(\n        /x/g,\n        {\n          global: true,\n          ignoreCase: false,\n          multiline: false,\n          source: 'x',\n        },\n        noop\n      )\n    ).toBe(false);\n  });\n\n  it('should compare sets when customizer returns undefined', () => {\n    [[new Set(), new Set()]].forEach(sets => {\n      const set1 = sets[0];\n      const set2 = sets[1];\n\n      set1.add(1);\n      set2.add(2);\n      expect(isEqualWith(set1, set2, noop)).toBe(false);\n\n      set1.add(2);\n      set2.add(1);\n      expect(isEqualWith(set1, set2, noop)).toBe(true);\n\n      set1.delete(1);\n      set1.add(1);\n      expect(isEqualWith(set1, set2, noop)).toBe(true);\n\n      set2.delete(1);\n      expect(isEqualWith(set1, set2, noop)).toBe(false);\n\n      set1.clear();\n      set2.clear();\n    });\n  });\n\n  it('should compare sets with circular references when customizer returns undefined', () => {\n    const set1 = new Set();\n    const set2 = new Set();\n\n    set1.add(set1);\n    set2.add(set2);\n    expect(isEqualWith(set1, set2, noop)).toBe(true);\n\n    set1.add(1);\n    set2.add(2);\n    expect(isEqualWith(set1, set2, noop)).toBe(false);\n  });\n\n  it('should compare symbol properties when customizer returns undefined', () => {\n    const symbol1 = Symbol('a');\n    const symbol2 = Symbol('b');\n\n    const object1: any = { a: 1 };\n    const object2: any = { a: 1 };\n\n    object1[symbol1] = { a: { b: 2 } };\n    object2[symbol1] = { a: { b: 2 } };\n\n    Object.defineProperty(object2, symbol2, {\n      configurable: true,\n      enumerable: false,\n      writable: true,\n      value: 2,\n    });\n\n    expect(isEqualWith(object1, object2, noop)).toBe(true);\n\n    object2[symbol1] = { a: 1 };\n\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n\n    delete object2[symbol1];\n    object2[Symbol('a')] = { a: { b: 2 } };\n    expect(isEqualWith(object1, object2, noop)).toBe(false);\n  });\n\n  it('should return `false` for objects with custom `toString` methods when customizer returns undefined', () => {\n    let primitive: any;\n    const object = {\n      toString: function () {\n        return primitive;\n      },\n    };\n    const values = [true, null, 1, 'a', undefined];\n    const expected = values.map(stubFalse);\n\n    const actual = values.map(value => {\n      primitive = value;\n      return isEqualWith(object, value, noop);\n    });\n\n    expect(actual).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isEqualWith.ts",
    "content": "import { isPlainObject } from './isPlainObject.ts';\nimport { getSymbols } from '../compat/_internal/getSymbols.ts';\nimport { getTag } from '../compat/_internal/getTag.ts';\nimport {\n  argumentsTag,\n  arrayBufferTag,\n  arrayTag,\n  bigInt64ArrayTag,\n  bigUint64ArrayTag,\n  booleanTag,\n  dataViewTag,\n  dateTag,\n  errorTag,\n  float32ArrayTag,\n  float64ArrayTag,\n  functionTag,\n  int8ArrayTag,\n  int16ArrayTag,\n  int32ArrayTag,\n  mapTag,\n  numberTag,\n  objectTag,\n  regexpTag,\n  setTag,\n  stringTag,\n  symbolTag,\n  uint8ArrayTag,\n  uint8ClampedArrayTag,\n  uint16ArrayTag,\n  uint32ArrayTag,\n} from '../compat/_internal/tags.ts';\nimport { eq } from '../compat/util/eq.ts';\n\ndeclare let Buffer:\n  | {\n      isBuffer: (a: any) => boolean;\n    }\n  | undefined;\n\n/**\n * Compares two values for equality using a custom comparison function.\n *\n * The custom function allows for fine-tuned control over the comparison process. If it returns a boolean, that result determines the equality. If it returns undefined, the function falls back to the default equality comparison.\n *\n * This function also uses the custom equality function to compare values inside objects,\n * arrays, maps, sets, and other complex structures, ensuring a deep comparison.\n *\n * This approach provides flexibility in handling complex comparisons while maintaining efficient default behavior for simpler cases.\n *\n * The custom comparison function can take up to six parameters:\n * - `x`: The value from the first object `a`.\n * - `y`: The value from the second object `b`.\n * - `property`: The property key used to get `x` and `y`.\n * - `xParent`: The parent of the first value `x`.\n * - `yParent`: The parent of the second value `y`.\n * - `stack`: An internal stack (Map) to handle circular references.\n *\n * @param {unknown} a - The first value to compare.\n * @param {unknown} b - The second value to compare.\n * @param {(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void} areValuesEqual - A function to customize the comparison.\n *   If it returns a boolean, that result will be used. If it returns undefined,\n *   the default equality comparison will be used.\n * @returns {boolean} `true` if the values are equal according to the customizer, otherwise `false`.\n *\n * @example\n * const customizer = (a, b) => {\n *   if (typeof a === 'string' && typeof b === 'string') {\n *     return a.toLowerCase() === b.toLowerCase();\n *   }\n * };\n * isEqualWith('Hello', 'hello', customizer); // true\n * isEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n * isEqualWith([1, 2, 3], [1, 2, 3], customizer); // true\n */\nexport function isEqualWith(\n  a: any,\n  b: any,\n  areValuesEqual: (\n    x: any,\n    y: any,\n    property?: PropertyKey,\n    xParent?: any,\n    yParent?: any,\n    stack?: Map<any, any>\n  ) => boolean | void\n): boolean {\n  return isEqualWithImpl(a, b, undefined, undefined, undefined, undefined, areValuesEqual);\n}\n\nfunction isEqualWithImpl(\n  a: any,\n  b: any,\n  property: PropertyKey | undefined,\n  aParent: any,\n  bParent: any,\n  stack: Map<any, any> | undefined,\n  areValuesEqual: (\n    x: any,\n    y: any,\n    property?: PropertyKey,\n    xParent?: any,\n    yParent?: any,\n    stack?: Map<any, any>\n  ) => boolean | void\n): boolean {\n  const result = areValuesEqual(a, b, property, aParent, bParent, stack);\n\n  if (result !== undefined) {\n    return result;\n  }\n\n  if (typeof a === typeof b) {\n    switch (typeof a) {\n      case 'bigint':\n      case 'string':\n      case 'boolean':\n      case 'symbol':\n      case 'undefined': {\n        return a === b;\n      }\n      case 'number': {\n        return a === b || Object.is(a, b);\n      }\n      case 'function': {\n        return a === b;\n      }\n      case 'object': {\n        return areObjectsEqual(a, b, stack, areValuesEqual);\n      }\n    }\n  }\n\n  return areObjectsEqual(a, b, stack, areValuesEqual);\n}\n\nfunction areObjectsEqual(\n  a: any,\n  b: any,\n  stack: Map<any, any> | undefined,\n  areValuesEqual: (\n    x: any,\n    y: any,\n    property?: PropertyKey,\n    xParent?: any,\n    yParent?: any,\n    stack?: Map<any, any>\n  ) => boolean | void\n) {\n  if (Object.is(a, b)) {\n    return true;\n  }\n\n  let aTag = getTag(a);\n  let bTag = getTag(b);\n\n  if (aTag === argumentsTag) {\n    aTag = objectTag;\n  }\n\n  if (bTag === argumentsTag) {\n    bTag = objectTag;\n  }\n\n  if (aTag !== bTag) {\n    return false;\n  }\n\n  switch (aTag) {\n    case stringTag:\n      return a.toString() === b.toString();\n\n    case numberTag: {\n      const x = a.valueOf();\n      const y = b.valueOf();\n\n      return eq(x, y);\n    }\n\n    case booleanTag:\n    case dateTag:\n    case symbolTag:\n      return Object.is(a.valueOf(), b.valueOf());\n\n    case regexpTag: {\n      return a.source === b.source && a.flags === b.flags;\n    }\n\n    case functionTag: {\n      return a === b;\n    }\n  }\n\n  stack = stack ?? new Map();\n\n  const aStack = stack.get(a);\n  const bStack = stack.get(b);\n\n  if (aStack != null && bStack != null) {\n    return aStack === b;\n  }\n\n  stack.set(a, b);\n  stack.set(b, a);\n\n  try {\n    switch (aTag) {\n      case mapTag: {\n        if (a.size !== b.size) {\n          return false;\n        }\n\n        for (const [key, value] of a.entries()) {\n          if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) {\n            return false;\n          }\n        }\n\n        return true;\n      }\n\n      case setTag: {\n        if (a.size !== b.size) {\n          return false;\n        }\n\n        const aValues = Array.from(a.values());\n        const bValues = Array.from(b.values());\n\n        for (let i = 0; i < aValues.length; i++) {\n          const aValue = aValues[i];\n          const index = bValues.findIndex(bValue => {\n            return isEqualWithImpl(aValue, bValue, undefined, a, b, stack, areValuesEqual);\n          });\n\n          if (index === -1) {\n            return false;\n          }\n\n          bValues.splice(index, 1);\n        }\n\n        return true;\n      }\n\n      case arrayTag:\n      case uint8ArrayTag:\n      case uint8ClampedArrayTag:\n      case uint16ArrayTag:\n      case uint32ArrayTag:\n      case bigUint64ArrayTag:\n      case int8ArrayTag:\n      case int16ArrayTag:\n      case int32ArrayTag:\n      case bigInt64ArrayTag:\n      case float32ArrayTag:\n      case float64ArrayTag: {\n        // Buffers are also treated as [object Uint8Array]s.\n        if (typeof Buffer !== 'undefined' && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) {\n          return false;\n        }\n\n        if (a.length !== b.length) {\n          return false;\n        }\n\n        for (let i = 0; i < a.length; i++) {\n          if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) {\n            return false;\n          }\n        }\n\n        return true;\n      }\n\n      case arrayBufferTag: {\n        if (a.byteLength !== b.byteLength) {\n          return false;\n        }\n\n        return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);\n      }\n\n      case dataViewTag: {\n        if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) {\n          return false;\n        }\n\n        return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);\n      }\n\n      case errorTag: {\n        return a.name === b.name && a.message === b.message;\n      }\n\n      case objectTag: {\n        const areEqualInstances =\n          areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) ||\n          (isPlainObject(a) && isPlainObject(b));\n\n        if (!areEqualInstances) {\n          return false;\n        }\n\n        const aKeys = [...Object.keys(a), ...getSymbols(a)];\n        const bKeys = [...Object.keys(b), ...getSymbols(b)];\n\n        if (aKeys.length !== bKeys.length) {\n          return false;\n        }\n\n        for (let i = 0; i < aKeys.length; i++) {\n          const propKey = aKeys[i];\n          const aProp = a[propKey];\n\n          if (!Object.hasOwn(b, propKey)) {\n            return false;\n          }\n\n          const bProp = b[propKey];\n\n          if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) {\n            return false;\n          }\n        }\n\n        return true;\n      }\n      default: {\n        return false;\n      }\n    }\n  } finally {\n    stack.delete(a);\n    stack.delete(b);\n  }\n}\n"
  },
  {
    "path": "src/predicate/isError.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isError } from './isError';\n\ndescribe('isError', () => {\n  it('should return `true` for error objects', () => {\n    expect(isError(new Error())).toBe(true);\n  });\n\n  it(\"should return 'true' for subclassed values\", () => {\n    class CustomError extends Error {}\n    expect(isError(new CustomError())).toBe(true);\n  });\n\n  it(\"should return 'false' for non-error objects\", () => {\n    expect(isError({})).toBe(false);\n    expect(isError(null)).toBe(false);\n    expect(isError(undefined)).toBe(false);\n    expect(isError('')).toBe(false);\n    expect(isError(1)).toBe(false);\n    expect(isError(true)).toBe(false);\n    expect(isError(Symbol())).toBe(false);\n    expect(isError(() => {})).toBe(false);\n    expect(isError(new Date())).toBe(false);\n    expect(isError(new Map())).toBe(false);\n    expect(isError(new Set())).toBe(false);\n  });\n\n  it(\"should return 'false' for plain objects\", () => {\n    expect(isError({ name: 'Error', message: '' })).toBe(false);\n  });\n\n  it('should work with an error object from another realm', () => {\n    const realm = { error: new Error() };\n    expect(isError(realm.error)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isError.ts",
    "content": "/**\n * Checks if `value` is an Error object.\n *\n * @param {unknown} value The value to check.\n * @returns {value is Error} Returns `true` if `value` is an Error object, `false` otherwise.\n *\n * @example\n * ```typescript\n * console.log(isError(new Error())); // true\n * console.log(isError('Error')); // false\n * console.log(isError({ name: 'Error', message: '' })); // false\n * ```\n */\nexport function isError(value: unknown): value is Error {\n  return value instanceof Error;\n}\n"
  },
  {
    "path": "src/predicate/isFile.spec.ts",
    "content": "import { afterAll, beforeAll, describe, expect, it } from 'vitest';\nimport { isFile } from './isFile';\n\ndescribe('isFile', () => {\n  let originalFile: typeof File;\n\n  beforeAll(() => {\n    originalFile = globalThis.File;\n    //@ts-expect-error - globalThis.File is browser only.\n    globalThis.File = class File extends Blob {\n      name: string;\n      constructor(chunks: any[], filename: string, options?: BlobPropertyBag) {\n        super(chunks, options);\n        this.name = filename;\n      }\n    };\n  });\n\n  afterAll(() => {\n    globalThis.File = originalFile;\n  });\n\n  it('returns true if the value is a File', () => {\n    const file = new File(['content'], 'example.txt', { type: 'text/plain' });\n    expect(isFile(file)).toBe(true);\n  });\n\n  it('returns false if the value is not a File', () => {\n    expect(isFile(0)).toBe(false);\n    expect(isFile('abc')).toBe(false);\n    expect(isFile(123)).toBe(false);\n    expect(isFile({ a: 1 })).toBe(false);\n    expect(isFile([1, 2, 3])).toBe(false);\n    expect(isFile(null)).toBe(false);\n    expect(isFile(undefined)).toBe(false);\n    const blob = new Blob(['content'], { type: 'text/plain' });\n    expect(isFile(blob)).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const items: Array<File | number> = [new File([''], 'example.txt'), 1, new File([''], 'example2.txt'), 2];\n    const result = items.filter(isFile);\n    expect(result).toHaveLength(2);\n    expect(result[0]).toBeInstanceOf(File);\n    expect(result[1]).toBeInstanceOf(File);\n  });\n\n  it('returns false if File is not supported in the environment', () => {\n    const file = new File(['content'], 'example.txt', { type: 'text/plain' });\n    const originalFile = globalThis.File;\n    // @ts-expect-error - we need to simulate the absence of File\n    globalThis.File = undefined;\n    expect(isFile(file)).toBe(false);\n    globalThis.File = originalFile;\n  });\n\n  it('returns false if Blob is not supported in the environment', () => {\n    const file = new File(['content'], 'example.txt', { type: 'text/plain' });\n    const originalBlob = globalThis.Blob;\n    // @ts-expect-error - we need to simulate the absence of Blob\n    globalThis.Blob = undefined;\n    expect(isFile(file)).toBe(false);\n    globalThis.Blob = originalBlob;\n  });\n\n  it('returns false if Blob is passed as a File', () => {\n    const blob = new Blob(['content'], { type: 'text/plain' });\n    expect(isFile(blob)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isFile.ts",
    "content": "import { isBlob } from './isBlob.ts';\n\n/**\n * Checks if the given value is a File.\n *\n * This function tests whether the provided value is an instance of `File`.\n * It returns `true` if the value is an instance of `File`, and `false` otherwise.\n *\n * @param {unknown} x - The value to test if it is a File.\n * @returns {x is File} True if the value is a File, false otherwise.\n *\n * @example\n * const value1 = new File([\"content\"], \"example.txt\");\n * const value2 = {};\n * const value3 = new Blob([\"content\"], { type: \"text/plain\" });\n *\n * console.log(isFile(value1)); // true\n * console.log(isFile(value2)); // false\n * console.log(isFile(value3)); // false\n */\nexport function isFile(x: unknown): x is File {\n  // Return false if File is not supported in the environment\n  if (typeof File === 'undefined') {\n    return false;\n  }\n\n  return isBlob(x) && x instanceof File;\n}\n"
  },
  {
    "path": "src/predicate/isFunction.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isFunction } from './isFunction';\nimport { args } from '../compat/_internal/args';\nimport { falsey } from '../compat/_internal/falsey';\n\ndescribe('isFunction', () => {\n  it('should return `true` for functions', () => {\n    const slice = Array.prototype.slice;\n    expect(isFunction(slice)).toBe(true);\n  });\n\n  it('should return `true` for async functions', () => {\n    const asyncFunc = async function () {};\n    expect(isFunction(asyncFunc)).toBe(typeof asyncFunc === 'function');\n  });\n\n  it('should return `true` for generator functions', () => {\n    const genFunc = function* () {};\n    expect(isFunction(genFunc)).toBe(typeof genFunc === 'function');\n  });\n\n  it('should return `true` for the `Proxy` constructor', () => {\n    if (Proxy) {\n      expect(isFunction(Proxy)).toBe(true);\n    }\n  });\n\n  it('should return `true` for array view constructors', () => {\n    const arrayViews = [\n      Int8Array,\n      Uint8Array,\n      Uint8ClampedArray,\n      Int16Array,\n      Uint16Array,\n      Int32Array,\n      Uint32Array,\n      Float32Array,\n      Float64Array,\n      DataView,\n    ];\n    const funcTag = '[object Function]';\n\n    const expected = arrayViews.map(type => Object.prototype.toString.call(type) === funcTag);\n    const actual = arrayViews.map(isFunction);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-functions', () => {\n    const expected = falsey.map(() => false);\n\n    const actual = falsey.map(isFunction);\n\n    expect(actual).toEqual(expected);\n\n    expect(isFunction(args)).toBe(false);\n    expect(isFunction([1, 2, 3])).toBe(false);\n    expect(isFunction(true)).toBe(false);\n    expect(isFunction(new Date())).toBe(false);\n    expect(isFunction(new Error())).toBe(false);\n    expect(isFunction({ a: 1 })).toBe(false);\n    expect(isFunction(1)).toBe(false);\n    expect(isFunction(/x/)).toBe(false);\n    expect(isFunction('a')).toBe(false);\n    expect(isFunction(Symbol('a'))).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isFunction.ts",
    "content": "/**\n * Checks if `value` is a function.\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n *\n * @example\n * isFunction(Array.prototype.slice); // true\n * isFunction(async function () {}); // true\n * isFunction(function* () {}); // true\n * isFunction(Proxy); // true\n * isFunction(Int8Array); // true\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n  return typeof value === 'function';\n}\n"
  },
  {
    "path": "src/predicate/isJSON.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isJSON } from './isJSON';\n\ndescribe('isJSON', () => {\n  it('returns true if the value is a valid JSON string', () => {\n    expect(isJSON('{\"name\":\"John\",\"age\":30}')).toBe(true);\n    expect(isJSON('[1,2,3]')).toBe(true);\n    expect(isJSON('\"string\"')).toBe(true);\n    expect(isJSON('123')).toBe(true);\n    expect(isJSON('true')).toBe(true);\n    expect(isJSON('false')).toBe(true);\n    expect(isJSON('null')).toBe(true);\n  });\n\n  it('returns false if the value is not a valid JSON string', () => {\n    expect(isJSON('invalid json')).toBe(false);\n    expect(isJSON('{\"unclosed\": \"object\"')).toBe(false);\n    expect(isJSON('[1,2,')).toBe(false);\n    expect(isJSON('undefined')).toBe(false);\n    expect(isJSON('')).toBe(false);\n  });\n\n  it('returns false if the value is not a string', () => {\n    expect(isJSON(null)).toBe(false);\n    expect(isJSON(undefined)).toBe(false);\n    expect(isJSON(123)).toBe(false);\n    expect(isJSON(true)).toBe(false);\n    expect(isJSON({})).toBe(false);\n    expect(isJSON([])).toBe(false);\n    expect(isJSON(new Date())).toBe(false);\n    expect(isJSON(() => {})).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isJSON.ts",
    "content": "/**\n * Checks if a given value is a valid JSON string.\n *\n * A valid JSON string is one that can be successfully parsed using `JSON.parse()`. According to JSON\n * specifications, valid JSON can represent:\n * - Objects (with string keys and valid JSON values)\n * - Arrays (containing valid JSON values)\n * - Strings\n * - Numbers\n * - Booleans\n * - null\n *\n * String values like `\"null\"`, `\"true\"`, `\"false\"`, and numeric strings (e.g., `\"42\"`) are considered\n * valid JSON and will return true.\n *\n * This function serves as a type guard in TypeScript, narrowing the type of the argument to `string`.\n *\n * @param {unknown} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid JSON string, else `false`.\n *\n * @example\n * isJSON('{\"name\":\"John\",\"age\":30}'); // true\n * isJSON('[1,2,3]'); // true\n * isJSON('true'); // true\n * isJSON('invalid json'); // false\n * isJSON({ name: 'John' }); // false (not a string)\n * isJSON(null); // false (not a string)\n */\nexport function isJSON(value: unknown): value is string {\n  if (typeof value !== 'string') {\n    return false;\n  }\n\n  try {\n    JSON.parse(value);\n    return true;\n  } catch {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/predicate/isJSONValue.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isJSONArray, isJSONObject, isJSONValue } from './isJSONValue.ts';\n\ndescribe('isJSONValue', () => {\n  it('should return true for null', () => {\n    expect(isJSONValue(null)).toBe(true);\n  });\n\n  it('should return true for a valid JSON object', () => {\n    expect(isJSONValue({ key: 'value' })).toBe(true);\n    expect(\n      isJSONValue({\n        nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null },\n      })\n    ).toBe(true);\n  });\n\n  it('should return true for a valid JSON array', () => {\n    expect(isJSONValue([1, 2, 3])).toBe(true);\n    expect(isJSONValue(['string', 42, null, true])).toBe(true);\n  });\n\n  it('should return true for valid JSON primitive types', () => {\n    expect(isJSONValue('Hello')).toBe(true);\n    expect(isJSONValue(42)).toBe(true);\n    expect(isJSONValue(true)).toBe(true);\n  });\n\n  it('should return false for invalid JSON values', () => {\n    expect(isJSONValue(undefined)).toBe(false);\n    expect(isJSONValue(() => {})).toBe(false);\n    expect(isJSONValue(new Date())).toBe(false);\n    expect(isJSONValue(/regex/)).toBe(false);\n    expect(isJSONValue(Symbol('symbol'))).toBe(false);\n  });\n});\n\ndescribe('isJSONArray', () => {\n  it('should return true for valid JSON arrays', () => {\n    expect(isJSONArray([1, 2, 3])).toBe(true);\n    expect(isJSONArray(['string', null, true])).toBe(true);\n    expect(isJSONArray([{ key: 'value' }, [1, 2], null])).toBe(true);\n    expect(isJSONArray([])).toBe(true);\n  });\n\n  it('should return false for invalid JSON arrays', () => {\n    expect(isJSONArray('not an array')).toBe(false);\n    expect(isJSONArray(123)).toBe(false);\n    expect(isJSONArray(null)).toBe(false);\n    expect(isJSONArray(undefined)).toBe(false);\n    expect(isJSONArray({})).toBe(false);\n    expect(isJSONArray([1, 2, () => {}])).toBe(false);\n    expect(isJSONArray([1, 2, new Date()])).toBe(false);\n  });\n});\n\ndescribe('isJSONObject', () => {\n  it('isJSONObject should return true for valid JSON objects', () => {\n    expect(isJSONObject({ a: 1, b: 'es-toolkit' })).toBe(true);\n    expect(isJSONObject({})).toBe(true);\n    expect(isJSONObject({ nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null } })).toBe(true);\n  });\n\n  it('isJSONObject should return false for not valid value', () => {\n    expect(isJSONObject(null)).toBe(false);\n    expect(isJSONObject(undefined)).toBe(false);\n    expect(isJSONObject('string')).toBe(false);\n    expect(isJSONObject(123)).toBe(false);\n    expect(isJSONObject(true)).toBe(false);\n    expect(isJSONObject([1, 2, 3])).toBe(false);\n    expect(isJSONObject({ date: new Date() })).toBe(false);\n    expect(isJSONObject({ func: () => {} })).toBe(false);\n    expect(isJSONObject({ regexp: /test/ })).toBe(false);\n    expect(isJSONObject({ undefinedProperty: undefined })).toBe(false);\n    expect(isJSONObject({ symbolProperty: Symbol('test') })).toBe(false);\n    expect(isJSONObject({ nested: { a: function* () {} } })).toBe(false);\n  });\n\n  it('isJSONObject should return false when key is not a string', () => {\n    expect(isJSONObject({ [Symbol('a')]: 'a' })).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isJSONValue.ts",
    "content": "/**\n * The functions isJSONValue, isJSONArray, and isJSONObject are grouped in this file\n * to prevent any circular dependency issues.\n */\nimport { isPlainObject } from './isPlainObject.ts';\n\n/**\n * Checks if a given value is a valid JSON value.\n *\n * A valid JSON value can be:\n * - null\n * - a JSON object (an object with string keys and valid JSON values)\n * - a JSON array (an array of valid JSON values)\n * - a string\n * - a number\n * - a boolean\n *\n * @param {unknown} value - The value to check.\n * @returns {boolean} - True if the value is a valid JSON value, otherwise false.\n *\n * @example\n * console.log(isJSONValue(null)); // true\n * console.log(isJSONValue({ key: \"value\" })); // true\n * console.log(isJSONValue([1, 2, 3])); // true\n * console.log(isJSONValue(\"Hello\")); // true\n * console.log(isJSONValue(42)); // true\n * console.log(isJSONValue(true)); // true\n * console.log(isJSONValue(undefined)); // false\n * console.log(isJSONValue(() => {})); // false\n */\nexport function isJSONValue(value: unknown): value is Record<string, any> | any[] | string | number | boolean | null {\n  switch (typeof value) {\n    case 'object': {\n      return value === null || isJSONArray(value) || isJSONObject(value);\n    }\n    case 'string':\n    case 'number':\n    case 'boolean': {\n      return true;\n    }\n    default: {\n      return false;\n    }\n  }\n}\n\n/**\n * Checks if a given value is a valid JSON array.\n *\n * A valid JSON array is defined as an array where all items are valid JSON values.\n *\n * @param {unknown} value - The value to check.\n * @returns {value is any[]} - True if the value is a valid JSON array, otherwise false.\n *\n * @example\n * console.log(isJSONArray([1, 2, 3])); // true\n * console.log(isJSONArray([\"string\", null, true])); // true\n * console.log(isJSONArray([1, 2, () => {}])); // false\n * console.log(isJSONArray(\"not an array\")); // false\n */\nexport function isJSONArray(value: unknown): value is any[] {\n  if (!Array.isArray(value)) {\n    return false;\n  }\n\n  return value.every(item => isJSONValue(item));\n}\n\n/**\n * Checks if a value is a JSON object.\n *\n * A valid JSON object is defined as an object with string keys and valid JSON values.\n *\n * @param {unknown} obj The value to check.\n * @returns {obj is Record<string, any>} True if `obj` is a JSON object, false otherwise.\n *\n * @example\n * isJSONObject({ nested: { boolean: true, array: [1, 2, 3], string: 'test', null: null } }); // true\n * isJSONObject({ regexp: /test/ }); // false\n * isJSONObject(123); // false\n */\nexport function isJSONObject(obj: unknown): obj is Record<string, any> {\n  if (!isPlainObject(obj)) {\n    return false;\n  }\n\n  const keys = Reflect.ownKeys(obj);\n\n  for (let i = 0; i < keys.length; i++) {\n    const key = keys[i];\n    const value = obj[key];\n\n    if (typeof key !== 'string') {\n      return false;\n    }\n\n    if (!isJSONValue(value)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "src/predicate/isLength.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isLength } from './isLength';\n\ndescribe('isLength', () => {\n  it('should return `true` for lengths', () => {\n    const values = [0, 3, Number.MAX_SAFE_INTEGER];\n    const expected = values.map(() => true);\n    const actual = values.map(isLength);\n\n    expect(actual).toEqual(expected);\n  });\n\n  it('should return `false` for non-lengths', () => {\n    const values = [-1, '1', 1.1, Number.MAX_SAFE_INTEGER + 1];\n    const expected = values.map(() => false);\n    const actual = values.map(isLength);\n\n    expect(actual).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isLength.ts",
    "content": "/**\n * Checks if a given value is a valid length.\n *\n * A valid length is of type `number`, is a non-negative integer, and is less than or equal to\n * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).\n * It returns `true` if the value is a valid length, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the\n * argument to a valid length (`number`).\n *\n * @param {any} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n *\n * @example\n * isLength(0); // true\n * isLength(42); // true\n * isLength(-1); // false\n * isLength(1.5); // false\n * isLength(Number.MAX_SAFE_INTEGER); // true\n * isLength(Number.MAX_SAFE_INTEGER + 1); // false\n */\nexport function isLength(value?: any): boolean {\n  return Number.isSafeInteger(value) && (value as number) >= 0;\n}\n"
  },
  {
    "path": "src/predicate/isMap.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isMap } from './isMap';\n\ndescribe('isMap', () => {\n  it('returns true if the value is a Map', () => {\n    expect(isMap(new Map())).toBe(true);\n  });\n\n  it('returns false if the value is not a Map', () => {\n    expect(isMap(null)).toBe(false);\n    expect(isMap('')).toBe(false);\n    expect(isMap(123)).toBe(false);\n    expect(isMap({})).toBe(false);\n    expect(isMap([])).toBe(false);\n    expect(isMap(new Set())).toBe(false);\n    expect(isMap(new WeakMap())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isMap.ts",
    "content": "/**\n * Checks if a given value is `Map`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Map`.\n *\n * @param {unknown} value The value to check if it is a `Map`.\n * @returns {value is Map<any, any>} Returns `true` if `value` is a `Map`, else `false`.\n *\n * @example\n * const value1 = new Map();\n * const value2 = new Set();\n * const value3 = new WeakMap();\n *\n * console.log(isMap(value1)); // true\n * console.log(isMap(value2)); // false\n * console.log(isMap(value3)); // false\n */\n\nexport function isMap(value: unknown): value is Map<any, any> {\n  return value instanceof Map;\n}\n"
  },
  {
    "path": "src/predicate/isNil.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isNil } from './isNil';\n\ndescribe('isNil', () => {\n  it('returns true if the value is null or undefined', () => {\n    expect(isNil(null)).toBe(true);\n    expect(isNil(undefined)).toBe(true);\n  });\n\n  it('returns false if the value is not null nor undefined', () => {\n    expect(isNil('')).toBe(false);\n    expect(isNil(123)).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr = [1, 2, null, 4, undefined];\n\n    const result = arr.filter(isNil);\n\n    // Here the type of result should be `null | undefined`.\n    expect(result).toStrictEqual([null, undefined]);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isNil.ts",
    "content": "/**\n * Checks if a given value is null or undefined.\n *\n * This function tests whether the provided value is either `null` or `undefined`.\n * It returns `true` if the value is `null` or `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null` or `undefined`.\n *\n * @param {unknown} x - The value to test for null or undefined.\n * @returns {boolean} `true` if the value is null or undefined, `false` otherwise.\n *\n * @example\n * const value1 = null;\n * const value2 = undefined;\n * const value3 = 42;\n * const result1 = isNil(value1); // true\n * const result2 = isNil(value2); // true\n * const result3 = isNil(value3); // false\n */\nexport function isNil(x: unknown): x is null | undefined {\n  return x == null;\n}\n"
  },
  {
    "path": "src/predicate/isNode.spec.ts",
    "content": "// @vitest-environment node\nimport { describe, expect, it } from 'vitest';\nimport { isNode } from './isNode';\n\ndescribe('isNode', () => {\n  it('should return true in node environment', () => {\n    expect(isNode()).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isNode.ts",
    "content": "declare let process:\n  | {\n      versions?: {\n        node?: unknown;\n      };\n    }\n  | undefined;\n\n/**\n * Checks if the current environment is Node.js.\n *\n * This function checks for the existence of the `process.versions.node` property,\n * which only exists in Node.js environments.\n *\n * @returns {boolean} `true` if the current environment is Node.js, otherwise `false`.\n *\n * @example\n * if (isNode()) {\n *   console.log('This is running in Node.js');\n *   const fs = import('node:fs');\n * }\n */\nexport function isNode(): boolean {\n  return typeof process !== 'undefined' && process?.versions?.node != null;\n}\n"
  },
  {
    "path": "src/predicate/isNotNil.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isNotNil } from './isNotNil';\n\ndescribe('isNotNil', () => {\n  it('returns false if the value is null or undefined', () => {\n    expect(isNotNil(null)).toBe(false);\n    expect(isNotNil(undefined)).toBe(false);\n  });\n\n  it('returns true if the value is not null nor undefined', () => {\n    expect(isNotNil('')).toBe(true);\n    expect(isNotNil(123)).toBe(true);\n    expect(isNotNil(0)).toBe(true);\n    expect(isNotNil(false)).toBe(true);\n    expect(isNotNil(true)).toBe(true);\n    expect(isNotNil([])).toBe(true);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr1 = [1, 2, null, 4, undefined];\n    const arr2 = [1, 2, null];\n    const arr3 = [1, 2, 4, undefined];\n\n    const result1 = arr1.filter(isNotNil);\n    const result2 = arr2.filter(isNotNil);\n    const result3 = arr3.filter(isNotNil);\n\n    // Here the type of result should be `number[]`.\n    expect(result1).toStrictEqual([1, 2, 4]);\n    expect(result2).toStrictEqual([1, 2]);\n    expect(result3).toStrictEqual([1, 2, 4]);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isNotNil.ts",
    "content": "/**\n * Checks if the given value is not null nor undefined.\n *\n * The main use of this function is to be used with TypeScript as a type predicate.\n *\n * @template T - The type of value.\n * @param {T | null | undefined} x - The value to test if it is not null nor undefined.\n * @returns {x is T} True if the value is not null nor undefined, false otherwise.\n *\n * @example\n * // Here the type of `arr` is (number | undefined)[]\n * const arr = [1, undefined, 3];\n * // Here the type of `result` is number[]\n * const result = arr.filter(isNotNil);\n * // result will be [1, 3]\n */\nexport function isNotNil<T>(x: T | null | undefined): x is T {\n  return x != null;\n}\n"
  },
  {
    "path": "src/predicate/isNull.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isNull } from './isNull';\n\ndescribe('isNull', () => {\n  it('returns true if the value is null', () => {\n    expect(isNull(null)).toBe(true);\n  });\n\n  it('returns false if the value is not null', () => {\n    expect(isNull(undefined)).toBe(false);\n    expect(isNull('')).toBe(false);\n    expect(isNull(123)).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr = [1, 2, null, 4, undefined];\n\n    const result = arr.filter(isNull);\n\n    // Here the type of result should be `null[]`.\n    expect(result).toStrictEqual([null]);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isNull.ts",
    "content": "/**\n * Checks if the given value is null.\n *\n * This function tests whether the provided value is strictly equal to `null`.\n * It returns `true` if the value is `null`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null`.\n *\n * @param {unknown} x - The value to test if it is null.\n * @returns {x is null} True if the value is null, false otherwise.\n *\n * @example\n * const value1 = null;\n * const value2 = undefined;\n * const value3 = 42;\n *\n * console.log(isNull(value1)); // true\n * console.log(isNull(value2)); // false\n * console.log(isNull(value3)); // false\n */\nexport function isNull(x: unknown): x is null {\n  return x === null;\n}\n"
  },
  {
    "path": "src/predicate/isNumber.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isNumber } from './isNumber';\n\ndescribe('isNumber', () => {\n  it('returns true if the value is a number', () => {\n    expect(isNumber(0)).toBe(true);\n    expect(isNumber(123)).toBe(true);\n    expect(isNumber(-456)).toBe(true);\n    expect(isNumber(3.14)).toBe(true);\n    expect(isNumber(Infinity)).toBe(true);\n    expect(isNumber(-Infinity)).toBe(true);\n    expect(isNumber(NaN)).toBe(true);\n    expect(isNumber(new Number(42))).toBe(true);\n  });\n\n  it('returns false if the value is not a number', () => {\n    expect(isNumber('123')).toBe(false);\n    expect(isNumber(true)).toBe(false);\n    expect(isNumber(false)).toBe(false);\n    expect(isNumber(null)).toBe(false);\n    expect(isNumber(undefined)).toBe(false);\n    expect(isNumber({ a: 1 })).toBe(false);\n    expect(isNumber([1, 2, 3])).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isNumber.ts",
    "content": "/**\n * Checks if the given value is a number.\n *\n * This function tests whether the provided value is strictly a `number`.\n * It returns `true` if the value is a `number`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.\n *\n * @param {unknown} x - The value to test if it is a number.\n * @returns {x is number} True if the value is a number, false otherwise.\n *\n * @example\n *\n * const value1 = 123;\n * const value2 = 'abc';\n * const value3 = true;\n *\n * console.log(isNumber(value1)); // true\n * console.log(isNumber(value2)); // false\n * console.log(isNumber(value3)); // false\n *\n */\nexport function isNumber(x: unknown): x is number {\n  return typeof x === 'number' || x instanceof Number;\n}\n"
  },
  {
    "path": "src/predicate/isPlainObject.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { runInNewContext } from 'node:vm';\nimport { isPlainObject } from './isPlainObject';\n\ndescribe('isPlainObject', () => {\n  it('should return true for plain objects', () => {\n    const str = 'key';\n\n    expect(isPlainObject({})).toBe(true);\n    expect(isPlainObject(Object.create(null))).toBe(true);\n    expect(isPlainObject(new Object({ key: 'new_object' }))).toBe(true);\n    expect(isPlainObject(new Object({ key: new Date() }))).toBe(true);\n    expect(isPlainObject({ 1: 'integer_key' })).toBe(true);\n    expect(isPlainObject({ name: 'string_key' })).toBe(true);\n    expect(isPlainObject({ [str]: 'dynamic_string_key' })).toBe(true);\n    expect(isPlainObject({ [Symbol('tag')]: 'value' })).toBe(true);\n    expect(\n      isPlainObject({\n        children: [{ key: 'deep-children' }],\n        name: 'deep-plain',\n      })\n    ).toBe(true);\n    expect(\n      isPlainObject({\n        children: [{ key: new Date() }],\n        name: 'deep-with-regular-object',\n      })\n    ).toBe(true);\n    expect(isPlainObject({ constructor: { name: 'Object2' } })).toBe(true);\n    expect(isPlainObject(JSON.parse('{}'))).toBe(true);\n    expect(isPlainObject(new Proxy({}, {}))).toBe(true);\n    expect(isPlainObject(new Proxy({ key: 'proxied_key' }, {}))).toBe(true);\n    expect(\n      isPlainObject({\n        [Symbol.iterator]: function* () {\n          yield 1;\n        },\n      })\n    ).toBe(true);\n  });\n\n  it('should return false for invalid plain objects', () => {\n    function fnWithProto(x: number) {\n      // @ts-expect-error for the sake of testing\n      this.x = x;\n    }\n\n    function ObjectConstructor() {}\n\n    ObjectConstructor.prototype.constructor = Object;\n\n    expect(isPlainObject('hello')).toBe(false);\n    expect(isPlainObject(false)).toBe(false);\n    expect(isPlainObject(undefined)).toBe(false);\n    expect(isPlainObject(null)).toBe(false);\n    expect(isPlainObject(10)).toBe(false);\n    expect(isPlainObject([])).toBe(false);\n    expect(isPlainObject(Number.NaN)).toBe(false);\n    expect(isPlainObject(JSON)).toBe(false);\n    expect(isPlainObject(Math)).toBe(false);\n    expect(isPlainObject(Atomics)).toBe(false);\n    expect(isPlainObject({ [Symbol.toStringTag]: 'string-tagged' })).toBe(false);\n    expect(isPlainObject(() => 'cool')).toBe(false);\n    expect(isPlainObject(new (class Cls {})())).toBe(false);\n    expect(isPlainObject(new Intl.Locale('en'))).toBe(false);\n    expect(isPlainObject(new (class extends Object {})())).toBe(false);\n    expect(isPlainObject(fnWithProto)).toBe(false);\n    expect(isPlainObject(Symbol('cool'))).toBe(false);\n    expect(isPlainObject(globalThis)).toBe(false);\n    expect(isPlainObject(new Date())).toBe(false);\n    expect(isPlainObject(new Map())).toBe(false);\n    expect(isPlainObject(new Error())).toBe(false);\n    expect(isPlainObject(new Set())).toBe(false);\n    expect(isPlainObject(new Request('http://localhost'))).toBe(false);\n    expect(isPlainObject(new Promise(() => {}))).toBe(false);\n    expect(isPlainObject(Promise.resolve({}))).toBe(false);\n    expect(isPlainObject(Buffer.from('ABC'))).toBe(false);\n    expect(isPlainObject(new Uint8Array([1, 2, 3]))).toBe(false);\n    expect(isPlainObject(Object.create({}))).toBe(false);\n    expect(isPlainObject(/(\\d+)/)).toBe(false);\n    expect(isPlainObject(new RegExp('/d+/'))).toBe(false);\n    expect(isPlainObject(/d+/)).toBe(false);\n    expect(isPlainObject(`cool`)).toBe(false);\n    expect(isPlainObject(String.raw`rawtemplate`)).toBe(false);\n    // eslint-disable-next-line\n    // @ts-ignore\n    expect(isPlainObject(new ObjectConstructor())).toBe(false);\n    expect(\n      isPlainObject(\n        new Proxy(new Date(), {\n          get(target) {\n            return target;\n          },\n        })\n      )\n    ).toBe(false);\n  });\n\n  it('should return true for cross-realm plain objects', async () => {\n    expect(isPlainObject(runInNewContext('({})'))).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isPlainObject.ts",
    "content": "/**\n * Checks if a given value is a plain object.\n *\n * @param {object} value - The value to check.\n * @returns {value is Record<PropertyKey, any>} - True if the value is a plain object, otherwise false.\n *\n * @example\n * ```typescript\n * // ✅👇 True\n *\n * isPlainObject({ });                       // ✅\n * isPlainObject({ key: 'value' });          // ✅\n * isPlainObject({ key: new Date() });       // ✅\n * isPlainObject(new Object());              // ✅\n * isPlainObject(Object.create(null));       // ✅\n * isPlainObject({ nested: { key: true} });  // ✅\n * isPlainObject(new Proxy({}, {}));         // ✅\n * isPlainObject({ [Symbol('tag')]: 'A' });  // ✅\n *\n * // ✅👇 (cross-realms, node context, workers, ...)\n * const runInNewContext = await import('node:vm').then(\n *     (mod) => mod.runInNewContext\n * );\n * isPlainObject(runInNewContext('({})'));   // ✅\n *\n * // ❌👇 False\n *\n * class Test { };\n * isPlainObject(new Test())           // ❌\n * isPlainObject(10);                  // ❌\n * isPlainObject(null);                // ❌\n * isPlainObject('hello');             // ❌\n * isPlainObject([]);                  // ❌\n * isPlainObject(new Date());          // ❌\n * isPlainObject(new Uint8Array([1])); // ❌\n * isPlainObject(Buffer.from('ABC'));  // ❌\n * isPlainObject(Promise.resolve({})); // ❌\n * isPlainObject(Object.create({}));   // ❌\n * isPlainObject(new (class Cls {}));  // ❌\n * isPlainObject(globalThis);          // ❌,\n * ```\n */\nexport function isPlainObject(value: unknown): value is Record<PropertyKey, any> {\n  if (!value || typeof value !== 'object') {\n    return false;\n  }\n\n  const proto = Object.getPrototypeOf(value) as typeof Object.prototype | null;\n\n  const hasObjectPrototype =\n    proto === null ||\n    proto === Object.prototype ||\n    // Required to support node:vm.runInNewContext({})\n    Object.getPrototypeOf(proto) === null;\n\n  if (!hasObjectPrototype) {\n    return false;\n  }\n\n  return Object.prototype.toString.call(value) === '[object Object]';\n}\n"
  },
  {
    "path": "src/predicate/isPrimitive.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isPrimitive } from './isPrimitive';\n\ndescribe('isPrimitive', () => {\n  it('returns `true` for primitives', () => {\n    expect(isPrimitive(null)).toBe(true);\n    expect(isPrimitive(undefined)).toBe(true);\n    expect(isPrimitive('123')).toBe(true);\n    expect(isPrimitive(false)).toBe(true);\n    expect(isPrimitive(true)).toBe(true);\n    expect(isPrimitive(Symbol('a'))).toBe(true);\n    expect(isPrimitive(123n)).toBe(true);\n  });\n\n  it('returns `false` for values that are not primitives', () => {\n    expect(isPrimitive({})).toBe(false);\n    expect(isPrimitive(new Date())).toBe(false);\n    expect(isPrimitive(new Map())).toBe(false);\n    expect(isPrimitive(new Set())).toBe(false);\n    expect(isPrimitive([1, 2, 3])).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isPrimitive.ts",
    "content": "/**\n * Checks whether a value is a JavaScript primitive.\n * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.\n *\n * @param {unknown} value The value to check.\n * @returns {value is\n *     null\n *   | undefined\n *   | string\n *   | number\n *   | boolean\n *   | symbol\n *   | bigint} Returns true if `value` is a primitive, false otherwise.\n *\n * @example\n * isPrimitive(null); // true\n * isPrimitive(undefined); // true\n * isPrimitive('123'); // true\n * isPrimitive(false); // true\n * isPrimitive(true); // true\n * isPrimitive(Symbol('a')); // true\n * isPrimitive(123n); // true\n * isPrimitive({}); // false\n * isPrimitive(new Date()); // false\n * isPrimitive(new Map()); // false\n * isPrimitive(new Set()); // false\n * isPrimitive([1, 2, 3]); // false\n */\nexport function isPrimitive(value: unknown): value is null | undefined | string | number | boolean | symbol | bigint {\n  return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n"
  },
  {
    "path": "src/predicate/isPromise.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isPromise } from './isPromise';\n\ndescribe('isPromise', () => {\n  it('returns true if the value is a Promise', () => {\n    expect(isPromise(new Promise<void>(resolve => resolve()))).toBe(true);\n  });\n\n  it('returns false if the value is not a Promise', () => {\n    expect(isPromise(null)).toBe(false);\n    expect(isPromise('')).toBe(false);\n    expect(isPromise(123)).toBe(false);\n    expect(isPromise({})).toBe(false);\n    expect(isPromise([])).toBe(false);\n    expect(isPromise(new Map())).toBe(false);\n    expect(isPromise(new Set())).toBe(false);\n    expect(isPromise(new WeakSet())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isPromise.ts",
    "content": "/**\n * Checks if a given value is `Promise`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Promise`.\n *\n * @param {unknown} value The value to check if it is a `Promise`.\n * @returns {value is Promise<any>} Returns `true` if `value` is a `Promise`, else `false`.\n *\n * @example\n * const value1 = new Promise((resolve) => resolve());\n * const value2 = {};\n * const value3 = 123;\n *\n * console.log(isPromise(value1)); // true\n * console.log(isPromise(value2)); // false\n * console.log(isPromise(value3)); // false\n */\nexport function isPromise(value: unknown): value is Promise<any> {\n  return value instanceof Promise;\n}\n"
  },
  {
    "path": "src/predicate/isRegExp.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isRegExp } from './isRegExp';\n\ndescribe('isRegExp', () => {\n  it('returns `true` for RegExp', () => {\n    expect(isRegExp(new RegExp(''))).toBe(true);\n    expect(isRegExp(/abc/)).toBe(true);\n    expect(isRegExp(/abc/g)).toBe(true);\n    expect(isRegExp(/abc/i)).toBe(true);\n    expect(isRegExp(/abc/m)).toBe(true);\n    expect(isRegExp(/abc/s)).toBe(true);\n    expect(isRegExp(/abc/u)).toBe(true);\n    expect(isRegExp(/abc/y)).toBe(true);\n  });\n\n  it('returns `false` for non-RegExp values', () => {\n    expect(isRegExp({})).toBe(false);\n    expect(isRegExp('/abc/')).toBe(false);\n    expect(isRegExp(new Date())).toBe(false);\n    expect(isRegExp(new Map())).toBe(false);\n    expect(isRegExp(new Set())).toBe(false);\n    expect(isRegExp([1, 2, 3])).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isRegExp.ts",
    "content": "/**\n * Checks if `value` is a RegExp.\n *\n * @param {unknown} value The value to check.\n * @returns {value is RegExp} Returns `true` if `value` is a RegExp, `false` otherwise.\n *\n * @example\n * const value1 = /abc/;\n * const value2 = '/abc/';\n *\n * console.log(isRegExp(value1)); // true\n * console.log(isRegExp(value2)); // false\n */\nexport function isRegExp(value: unknown): value is RegExp {\n  return value instanceof RegExp;\n}\n"
  },
  {
    "path": "src/predicate/isSet.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isSet } from './isSet';\n\ndescribe('isSet', () => {\n  it('returns true if the value is a Set', () => {\n    expect(isSet(new Set())).toBe(true);\n  });\n\n  it('returns false if the value is not a Set', () => {\n    expect(isSet(null)).toBe(false);\n    expect(isSet('')).toBe(false);\n    expect(isSet(123)).toBe(false);\n    expect(isSet({})).toBe(false);\n    expect(isSet([])).toBe(false);\n    expect(isSet(new Map())).toBe(false);\n    expect(isSet(new WeakSet())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isSet.ts",
    "content": "/**\n * Checks if a given value is `Set`.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Set`.\n *\n * @param {unknown} value The value to check if it is a `Set`.\n * @returns {value is Set<any>} Returns `true` if `value` is a `Set`, else `false`.\n *\n * @example\n * const value1 = new Set();\n * const value2 = new Map();\n * const value3 = new WeakSet();\n *\n * console.log(isSet(value1)); // true\n * console.log(isSet(value2)); // false\n * console.log(isSet(value3)); // false\n */\n\nexport function isSet(value: unknown): value is Set<any> {\n  return value instanceof Set;\n}\n"
  },
  {
    "path": "src/predicate/isString.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isString } from './isString';\n\ndescribe('isString', () => {\n  it('returns true if the value is string', () => {\n    expect(isString('abc')).toBe(true);\n  });\n\n  it('returns false if the value is not string', () => {\n    expect(isString(123)).toBe(false);\n    expect(isString(true)).toBe(false);\n    expect(isString([1, 2, 3])).toBe(false);\n    expect(isString({ a: 1 })).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr = [1, 2, 'a', 4, 'b'];\n\n    const result = arr.filter(isString);\n\n    // Here the type of result should be `string[]`\n    expect(result).toStrictEqual(['a', 'b']);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isString.ts",
    "content": "/**\n * Checks if a given value is string.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `string`.\n *\n * @param {unknown} value The value to check if it is string.\n * @returns {value is string} Returns `true` if `value` is a string, else `false`.\n *\n * @example\n * const value1 = 'abc';\n * const value2 = 123;\n * const value3 = true;\n *\n * console.log(isString(value1)); // true\n * console.log(isString(value2)); // false\n * console.log(isString(value3)); // false\n */\n\nexport function isString(value: unknown): value is string {\n  return typeof value === 'string';\n}\n"
  },
  {
    "path": "src/predicate/isSymbol.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isSymbol } from './isSymbol';\nimport { args } from '../compat/_internal/args';\nimport { falsey } from '../compat/_internal/falsey';\n\ndescribe('isSymbol', () => {\n  it('returns `true` for symbols', () => {\n    expect(isSymbol(Symbol())).toBe(true);\n    expect(isSymbol(Symbol('a'))).toBe(true);\n    expect(isSymbol(Symbol.for('a'))).toBe(true);\n    expect(isSymbol(Symbol.iterator)).toBe(true);\n  });\n\n  it('returns `false` for values that are not symbols', () => {\n    const expected = falsey.map(() => false);\n    const actual = falsey.map(isSymbol);\n    expect(actual).toEqual(expected);\n\n    expect(isSymbol(1)).toBe(false);\n    expect(isSymbol('a')).toBe(false);\n    expect(isSymbol(args)).toBe(false);\n    expect(isSymbol([1, 2, 3])).toBe(false);\n    expect(isSymbol(Object(false))).toBe(false);\n    expect(isSymbol(new Date())).toBe(false);\n    expect(isSymbol(new Error())).toBe(false);\n    expect(isSymbol({ a: 1 })).toBe(false);\n    expect(isSymbol(Object(0))).toBe(false);\n    expect(isSymbol(/x/)).toBe(false);\n    expect(isSymbol(Object('a'))).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isSymbol.ts",
    "content": "/**\n * Check whether a value is a symbol.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.\n *\n * @param {unknown} value The value to check.\n * @returns {value is symbol} Returns `true` if `value` is a symbol, else `false`.\n *\n * @example\n * import { isSymbol } from 'es-toolkit/predicate';\n *\n * isSymbol(Symbol('a')); // true\n * isSymbol(Symbol.for('a')); // true\n * isSymbol(Symbol.iterator); // true\n *\n * isSymbol(null); // false\n * isSymbol(undefined); // false\n * isSymbol('123'); // false\n * isSymbol(false); // false\n * isSymbol(123n); // false\n * isSymbol({}); // false\n * isSymbol([1, 2, 3]); // false\n */\nexport function isSymbol(value: unknown): value is symbol {\n  return typeof value === 'symbol';\n}\n"
  },
  {
    "path": "src/predicate/isTypedArray.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isTypedArray } from './isTypedArray';\n\ndescribe('isTypedArray', () => {\n  it('returns `true` for typed arrays', () => {\n    expect(isTypedArray(new Uint8Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Uint8ClampedArray(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Uint16Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Uint32Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new BigUint64Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Int8Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Int16Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Int32Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new BigInt64Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Float32Array(new ArrayBuffer(8)))).toBe(true);\n    expect(isTypedArray(new Float64Array(new ArrayBuffer(8)))).toBe(true);\n  });\n\n  it('returns `false` for values that are not typed arrays', () => {\n    expect(isTypedArray(1)).toBe(false);\n    expect(isTypedArray(new Map())).toBe(false);\n    expect(isTypedArray(new Set())).toBe(false);\n    expect(isTypedArray('')).toBe(false);\n    expect(isTypedArray(Symbol('a'))).toBe(false);\n    expect(isTypedArray([1, 2, 3])).toBe(false);\n    expect(isTypedArray(false)).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isTypedArray.ts",
    "content": "/**\n * Checks if a value is a TypedArray.\n * @param {unknown} x The value to check.\n * @returns {x is\n *     Uint8Array\n *   | Uint8ClampedArray\n *   | Uint16Array\n *   | Uint32Array\n *   | BigUint64Array\n *   | Int8Array\n *   | Int16Array\n *   | Int32Array\n *   | BigInt64Array\n *   | Float32Array\n *   | Float64Array} Returns true if `x` is a TypedArray, false otherwise.\n *\n * @example\n * const arr = new Uint8Array([1, 2, 3]);\n * isTypedArray(arr); // true\n *\n * const regularArray = [1, 2, 3];\n * isTypedArray(regularArray); // false\n *\n * const buffer = new ArrayBuffer(16);\n * isTypedArray(buffer); // false\n */\nexport function isTypedArray(\n  x: unknown\n): x is\n  | Uint8Array\n  | Uint8ClampedArray\n  | Uint16Array\n  | Uint32Array\n  | BigUint64Array\n  | Int8Array\n  | Int16Array\n  | Int32Array\n  | BigInt64Array\n  | Float32Array\n  | Float64Array {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n"
  },
  {
    "path": "src/predicate/isUndefined.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isUndefined } from './isUndefined';\n\ndescribe('isUndefined', () => {\n  it('returns true if the value is undefined', () => {\n    expect(isUndefined(undefined)).toBe(true);\n  });\n\n  it('returns false if the value is not undefined', () => {\n    expect(isUndefined(null)).toBe(false);\n    expect(isUndefined('')).toBe(false);\n    expect(isUndefined(123)).toBe(false);\n  });\n\n  it('can be used with TypeScript as a type predicate', () => {\n    const arr = [1, 2, null, 4, undefined];\n\n    const result = arr.filter(isUndefined);\n\n    // Here the type of result should be `undefined[]`.\n    expect(result).toStrictEqual([undefined]);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isUndefined.ts",
    "content": "/**\n * Checks if the given value is undefined.\n *\n * This function tests whether the provided value is strictly equal to `undefined`.\n * It returns `true` if the value is `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `undefined`.\n *\n * @param {unknown} x - The value to test if it is undefined.\n * @returns {x is undefined} true if the value is undefined, false otherwise.\n *\n * @example\n * const value1 = undefined;\n * const value2 = null;\n * const value3 = 42;\n *\n * console.log(isUndefined(value1)); // true\n * console.log(isUndefined(value2)); // false\n * console.log(isUndefined(value3)); // false\n */\nexport function isUndefined(x: any): x is undefined {\n  return x === undefined;\n}\n"
  },
  {
    "path": "src/predicate/isWeakMap.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isWeakMap } from './isWeakMap';\n\ndescribe('isWeakMap', () => {\n  it('returns true if the value is WeakMap', () => {\n    expect(isWeakMap(new WeakMap())).toBe(true);\n  });\n\n  it('returns false if the value is not WeakMap', () => {\n    expect(isWeakMap(null)).toBe(false);\n    expect(isWeakMap('')).toBe(false);\n    expect(isWeakMap(123)).toBe(false);\n    expect(isWeakMap({})).toBe(false);\n    expect(isWeakMap([])).toBe(false);\n    expect(isWeakMap(new Map())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isWeakMap.ts",
    "content": "/**\n * Checks if the given value is a `WeakMap`.\n *\n * This function tests whether the provided value is an instance of `WeakMap`.\n * It returns `true` if the value is a `WeakMap`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakMap`.\n *\n * @param {unknown} value - The value to test if it is a `WeakMap`.\n * @returns {value is WeakMap<WeakKey, any>} true if the value is a `WeakMap`, false otherwise.\n *\n * @example\n * const value1 = new WeakMap();\n * const value2 = new Map();\n * const value3 = new Set();\n *\n * console.log(isWeakMap(value1)); // true\n * console.log(isWeakMap(value2)); // false\n * console.log(isWeakMap(value3)); // false\n */\nexport function isWeakMap(value: unknown): value is WeakMap<WeakKey, any> {\n  return value instanceof WeakMap;\n}\n"
  },
  {
    "path": "src/predicate/isWeakSet.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { isWeakSet } from './isWeakSet';\n\ndescribe('isWeakSet', () => {\n  it('returns true if the value is WeakSet', () => {\n    expect(isWeakSet(new WeakSet())).toBe(true);\n  });\n\n  it('returns false if the value is not WeakSet', () => {\n    expect(isWeakSet(null)).toBe(false);\n    expect(isWeakSet('')).toBe(false);\n    expect(isWeakSet(123)).toBe(false);\n    expect(isWeakSet({})).toBe(false);\n    expect(isWeakSet([])).toBe(false);\n    expect(isWeakSet(new Map())).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/predicate/isWeakSet.ts",
    "content": "/**\n * Checks if the given value is a `WeakSet`.\n *\n * This function tests whether the provided value is an instance of `WeakSet`.\n * It returns `true` if the value is a `WeakSet`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakSet`.\n *\n * @param {unknown} value - The value to test if it is a `WeakSet`.\n * @returns {value is WeakSet<WeakKey>} true if the value is a `WeakSet`, false otherwise.\n *\n * @example\n * const value1 = new WeakSet();\n * const value2 = new Map();\n * const value3 = new Set();\n *\n * console.log(isWeakSet(value1)); // true\n * console.log(isWeakSet(value2)); // false\n * console.log(isWeakSet(value3)); // false\n */\nexport function isWeakSet(value: unknown): value is WeakSet<WeakKey> {\n  return value instanceof WeakSet;\n}\n"
  },
  {
    "path": "src/promise/delay.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { performance } from 'node:perf_hooks';\nimport { delay } from './delay';\n\ndescribe('delay', () => {\n  it('pauses an async function for a given time', async () => {\n    const start = performance.now();\n    await delay(100);\n    const end = performance.now();\n\n    expect(end - start).greaterThanOrEqual(99);\n  });\n\n  it('should cancel the delay if aborted via AbortSignal', async () => {\n    const controller = new AbortController();\n    const signal = controller.signal;\n\n    setTimeout(() => controller.abort(), 50);\n\n    await expect(delay(100, { signal })).rejects.toThrow('The operation was aborted');\n  });\n\n  it('should not call the delay if it is already aborted by AbortSignal', async () => {\n    const controller = new AbortController();\n    const { signal } = controller;\n    const spy = vi.spyOn(global, 'setTimeout');\n\n    controller.abort();\n\n    await expect(delay(100, { signal })).rejects.toThrow('The operation was aborted');\n\n    expect(spy).not.toHaveBeenCalled();\n    spy.mockRestore();\n  });\n\n  it('should clear timeout when aborted by AbortSignal', async () => {\n    const controller = new AbortController();\n    const { signal } = controller;\n    const spy = vi.spyOn(global, 'clearTimeout');\n    const promise = delay(100, { signal });\n\n    controller.abort();\n\n    await expect(promise).rejects.toThrow('The operation was aborted');\n\n    expect(spy).toHaveBeenCalled();\n    spy.mockRestore();\n  });\n\n  it('should clear event listener if timeout completes', async () => {\n    const controller = new AbortController();\n    const { signal } = controller;\n    const spy = vi.spyOn(signal, 'removeEventListener');\n\n    await delay(100, { signal });\n\n    expect(spy).toHaveBeenCalled();\n    spy.mockRestore();\n  });\n});\n"
  },
  {
    "path": "src/promise/delay.ts",
    "content": "import { AbortError } from '../error/AbortError.ts';\n\ninterface DelayOptions {\n  signal?: AbortSignal;\n}\n\n/**\n * Delays the execution of code for a specified number of milliseconds.\n *\n * This function returns a Promise that resolves after the specified delay, allowing you to use it\n * with async/await to pause execution.\n *\n * @param {number} ms - The number of milliseconds to delay.\n * @param {DelayOptions} options - The options object.\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the delay.\n * @returns {Promise<void>} A Promise that resolves after the specified delay.\n *\n * @example\n * async function foo() {\n *   console.log('Start');\n *   await delay(1000); // Delays execution for 1 second\n *   console.log('End');\n * }\n *\n * foo();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const { signal } = controller;\n *\n * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms\n * try {\n *   await delay(100, { signal });\n *  } catch (error) {\n *   console.error(error); // Will log 'AbortError'\n *  }\n * }\n */\nexport function delay(ms: number, { signal }: DelayOptions = {}): Promise<void> {\n  return new Promise((resolve, reject) => {\n    const abortError = () => {\n      reject(new AbortError());\n    };\n\n    const abortHandler = () => {\n      clearTimeout(timeoutId);\n      abortError();\n    };\n\n    if (signal?.aborted) {\n      return abortError();\n    }\n\n    const timeoutId = setTimeout(() => {\n      signal?.removeEventListener('abort', abortHandler);\n      resolve();\n    }, ms);\n\n    signal?.addEventListener('abort', abortHandler, { once: true });\n  });\n}\n"
  },
  {
    "path": "src/promise/index.ts",
    "content": "export { delay } from './delay.ts';\nexport { Mutex } from './mutex.ts';\nexport { Semaphore } from './semaphore.ts';\nexport { timeout } from './timeout.ts';\nexport { withTimeout } from './withTimeout.ts';\n"
  },
  {
    "path": "src/promise/mutex.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { delay } from './delay';\nimport { Mutex } from './mutex';\n\ndescribe('Mutex', () => {\n  it('should allow acquisition when the mutex is available', async () => {\n    const mutex = new Mutex();\n\n    await expect(mutex.acquire()).resolves.toBeUndefined();\n  });\n\n  it('should not allow acquisition when the mutex is already acquired', async () => {\n    const mutex = new Mutex();\n\n    await mutex.acquire();\n\n    const spy = vi.fn();\n\n    mutex.acquire().then(spy);\n\n    await delay(0);\n\n    expect(spy).not.toHaveBeenCalled();\n  });\n\n  it('should allow acquisition after the mutex is released before the call', async () => {\n    const mutex = new Mutex();\n\n    await mutex.acquire();\n    mutex.release();\n\n    await expect(mutex.acquire()).resolves.toBeUndefined();\n  });\n\n  it('should allow acquisition after the mutex is released after the call', async () => {\n    const mutex = new Mutex();\n\n    await mutex.acquire();\n\n    const spy = vi.fn();\n\n    mutex.acquire().then(spy);\n\n    mutex.release();\n\n    await delay(100);\n\n    expect(spy).toBeCalledTimes(1);\n  });\n\n  it('should correctly report the locked state', async () => {\n    const mutex = new Mutex();\n\n    expect(mutex.isLocked).toBe(false);\n\n    await mutex.acquire();\n\n    expect(mutex.isLocked).toBe(true);\n\n    mutex.release();\n\n    expect(mutex.isLocked).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/promise/mutex.ts",
    "content": "import { Semaphore } from './semaphore.ts';\n\n/**\n * A Mutex (mutual exclusion lock) for async functions.\n * It allows only one async task to access a critical section at a time.\n *\n * @example\n * const mutex = new Mutex();\n *\n * async function criticalSection() {\n *   await mutex.acquire();\n *   try {\n *     // This code section cannot be executed simultaneously\n *   } finally {\n *     mutex.release();\n *   }\n * }\n *\n * criticalSection();\n * criticalSection(); // This call will wait until the first call releases the mutex.\n */\nexport class Mutex {\n  private semaphore = new Semaphore(1);\n\n  /**\n   * Checks if the mutex is currently locked.\n   * @returns {boolean} True if the mutex is locked, false otherwise.\n   *\n   * @example\n   * const mutex = new Mutex();\n   * console.log(mutex.isLocked); // false\n   * await mutex.acquire();\n   * console.log(mutex.isLocked); // true\n   * mutex.release();\n   * console.log(mutex.isLocked); // false\n   */\n  get isLocked(): boolean {\n    return this.semaphore.available === 0;\n  }\n\n  /**\n   * Acquires the mutex, blocking if necessary until it is available.\n   * @returns {Promise<void>} A promise that resolves when the mutex is acquired.\n   *\n   * @example\n   * const mutex = new Mutex();\n   * await mutex.acquire();\n   * try {\n   *   // This code section cannot be executed simultaneously\n   * } finally {\n   *   mutex.release();\n   * }\n   */\n  async acquire(): Promise<void> {\n    return this.semaphore.acquire();\n  }\n\n  /**\n   * Releases the mutex, allowing another waiting task to proceed.\n   *\n   * @example\n   * const mutex = new Mutex();\n   * await mutex.acquire();\n   * try {\n   *   // This code section cannot be executed simultaneously\n   * } finally {\n   *   mutex.release(); // Allows another waiting task to proceed.\n   * }\n   */\n  release(): void {\n    this.semaphore.release();\n  }\n}\n"
  },
  {
    "path": "src/promise/semaphore.spec.ts",
    "content": "import { describe, expect, it, vi } from 'vitest';\nimport { delay } from './delay';\nimport { Semaphore } from './semaphore';\n\ndescribe('Semaphore', () => {\n  it('should allow acquisition when a permit is available', async () => {\n    const sema = new Semaphore(1);\n\n    await expect(sema.acquire()).resolves.toBeUndefined();\n  });\n\n  it('should not allow acquisition when no permits are available', async () => {\n    const sema = new Semaphore(1);\n\n    await sema.acquire();\n\n    const spy = vi.fn();\n\n    sema.acquire().then(spy);\n\n    await delay(0);\n\n    expect(spy).not.toHaveBeenCalled();\n  });\n\n  it('should allow acquisition after a permit is released before the call', async () => {\n    const sema = new Semaphore(1);\n\n    await sema.acquire();\n    sema.release();\n\n    await expect(sema.acquire()).resolves.toBeUndefined();\n  });\n\n  it('should allow acquisition after a permit is released after the call', async () => {\n    const sema = new Semaphore(1);\n\n    await sema.acquire();\n\n    const spy = vi.fn();\n\n    sema.acquire().then(spy);\n\n    sema.release();\n\n    await delay(100);\n\n    expect(spy).toBeCalledTimes(1);\n  });\n\n  it('should resolve requests in the order they were made when permits are released', async () => {\n    const semaphore = new Semaphore(2);\n\n    await semaphore.acquire();\n    await semaphore.acquire();\n\n    const spy1 = vi.fn();\n    const spy2 = vi.fn();\n\n    semaphore.acquire().then(spy1);\n    semaphore.acquire().then(spy2);\n\n    await delay(0);\n\n    expect(spy1).not.toHaveBeenCalled();\n    expect(spy2).not.toHaveBeenCalled();\n\n    semaphore.release();\n\n    await delay(0);\n\n    expect(spy1).toHaveBeenCalledTimes(1);\n    expect(spy2).not.toHaveBeenCalled();\n\n    await delay(0);\n\n    expect(spy1).toHaveBeenCalledTimes(1);\n    expect(spy2).not.toHaveBeenCalledTimes(1);\n  });\n\n  it('should not allow acquiring more permits than the capacity', async () => {\n    const semaphore = new Semaphore(1);\n\n    semaphore.acquire();\n    semaphore.acquire();\n\n    semaphore.release();\n    semaphore.release();\n\n    const spy1 = vi.fn();\n    const spy2 = vi.fn();\n\n    semaphore.acquire().then(spy1);\n    semaphore.acquire().then(spy2);\n\n    await delay(0);\n\n    expect(spy1).toHaveBeenCalledTimes(1);\n    expect(spy2).not.toHaveBeenCalled();\n  });\n\n  it('should not increase available permits beyond capacity when releasing without pending tasks', () => {\n    const semaphore = new Semaphore(2);\n\n    expect(semaphore.available).toBe(2);\n\n    semaphore.release();\n    expect(semaphore.available).toBe(2);\n\n    semaphore.release();\n    expect(semaphore.available).toBe(2);\n  });\n});\n"
  },
  {
    "path": "src/promise/semaphore.ts",
    "content": "/**\n * A counting semaphore for async functions that manages available permits.\n * Semaphores are mainly used to limit the number of concurrent async tasks.\n *\n * Each `acquire` operation takes a permit or waits until one is available.\n * Each `release` operation adds a permit, potentially allowing a waiting task to proceed.\n *\n * The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.\n *\n * @example\n * const sema = new Semaphore(2);\n *\n * async function task() {\n *   await sema.acquire();\n *   try {\n *     // This code can only be executed by two tasks at the same time\n *   } finally {\n *     sema.release();\n *   }\n * }\n *\n * task();\n * task();\n * task(); // This task will wait until one of the previous tasks releases the semaphore.\n */\nexport class Semaphore {\n  /**\n   * The maximum number of concurrent operations allowed.\n   * @type {number}\n   */\n  public capacity: number;\n\n  /**\n   * The number of available permits.\n   * @type {number}\n   */\n  public available: number;\n  private deferredTasks: Array<() => void> = [];\n\n  /**\n   * Creates an instance of Semaphore.\n   * @param {number} capacity - The maximum number of concurrent operations allowed.\n   *\n   * @example\n   * const sema = new Semaphore(3); // Allows up to 3 concurrent operations.\n   */\n  constructor(capacity: number) {\n    this.capacity = capacity;\n    this.available = capacity;\n  }\n\n  /**\n   * Acquires a semaphore, blocking if necessary until one is available.\n   * @returns {Promise<void>} A promise that resolves when the semaphore is acquired.\n   *\n   * @example\n   * const sema = new Semaphore(1);\n   *\n   * async function criticalSection() {\n   *   await sema.acquire();\n   *   try {\n   *     // This code section cannot be executed simultaneously\n   *   } finally {\n   *     sema.release();\n   *   }\n   * }\n   */\n  async acquire(): Promise<void> {\n    if (this.available > 0) {\n      this.available--;\n      return;\n    }\n\n    return new Promise<void>(resolve => {\n      this.deferredTasks.push(resolve);\n    });\n  }\n\n  /**\n   * Releases a semaphore, allowing one more operation to proceed.\n   *\n   * @example\n   * const sema = new Semaphore(1);\n   *\n   * async function task() {\n   *   await sema.acquire();\n   *   try {\n   *     // This code can only be executed by two tasks at the same time\n   *   } finally {\n   *     sema.release(); // Allows another waiting task to proceed.\n   *   }\n   * }\n   */\n  release(): void {\n    const deferredTask = this.deferredTasks.shift();\n\n    if (deferredTask != null) {\n      deferredTask();\n      return;\n    }\n\n    if (this.available < this.capacity) {\n      this.available++;\n    }\n  }\n}\n"
  },
  {
    "path": "src/promise/timeout.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { timeout } from './timeout.ts';\n\ndescribe('timeout', () => {\n  it('returns a reason if a response is received after the specified wait time', async () => {\n    await expect(timeout(50)).rejects.toThrow('The operation was timed out');\n  });\n});\n"
  },
  {
    "path": "src/promise/timeout.ts",
    "content": "import { delay } from './delay.ts';\nimport { TimeoutError } from '../error/TimeoutError.ts';\n\n/**\n * Returns a promise that rejects with a `TimeoutError` after a specified delay.\n *\n * @param {number} ms - The delay duration in milliseconds.\n * @returns {Promise<never>} A promise that rejects with a `TimeoutError` after the specified delay.\n * @throws {TimeoutError} Throws a `TimeoutError` after the specified delay.\n *\n * @example\n * try {\n *   await timeout(1000); // Timeout exception after 1 second\n * } catch (error) {\n *   console.error(error); // Will log 'The operation was timed out'\n * }\n */\nexport async function timeout(ms: number): Promise<never> {\n  await delay(ms);\n  throw new TimeoutError();\n}\n"
  },
  {
    "path": "src/promise/withTimeout.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { delay } from './delay.ts';\nimport { withTimeout } from './withTimeout.ts';\n\ndescribe('withTimeout', () => {\n  it('returns the result value if a response is received before the specified wait time', async () => {\n    const result = await withTimeout(async () => {\n      await delay(50);\n      return 'foo';\n    }, 100);\n\n    expect(result).toEqual('foo');\n  });\n\n  it('returns a reason if a response is received after the specified wait time', () => {\n    return expect(withTimeout(() => delay(1000), 50)).rejects.toThrow('The operation was timed out');\n  });\n});\n"
  },
  {
    "path": "src/promise/withTimeout.ts",
    "content": "import { timeout } from './timeout.ts';\n\n/**\n * Executes an async function and enforces a timeout.\n *\n * If the promise does not resolve within the specified time,\n * the timeout will trigger and the returned promise will be rejected.\n *\n *\n * @template T\n * @param {() => Promise<T>} run - A function that returns a promise to be executed.\n * @param {number} ms - The timeout duration in milliseconds.\n * @returns {Promise<T>} A promise that resolves with the result of the `run` function or rejects if the timeout is reached.\n *\n * @example\n * async function fetchData() {\n *   const response = await fetch('https://example.com/data');\n *   return response.json();\n * }\n *\n * try {\n *   const data = await withTimeout(fetchData, 1000);\n *   console.log(data); // Logs the fetched data if `fetchData` is resolved within 1 second.\n * } catch (error) {\n *   console.error(error); // Will log 'TimeoutError' if `fetchData` is not resolved within 1 second.\n * }\n */\nexport async function withTimeout<T>(run: () => Promise<T>, ms: number): Promise<T> {\n  return Promise.race([run(), timeout(ms)]);\n}\n"
  },
  {
    "path": "src/set/countBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { countBy } from './countBy';\n\ndescribe('countBy', () => {\n  it('should count elements by the result of the mapper function', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    const result = countBy(set, value => (value % 2 === 0 ? 'even' : 'odd'));\n\n    expect(result).toEqual(\n      new Map([\n        ['odd', 3],\n        ['even', 2],\n      ])\n    );\n  });\n\n  it('should pass the original set to the mapper function', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = countBy(set, (value, value2, originalSet) => {\n      expect(originalSet).toBe(set);\n      return value >= originalSet.size ? 'large' : 'small';\n    });\n\n    expect(result).toEqual(\n      new Map([\n        ['small', 2],\n        ['large', 1],\n      ])\n    );\n  });\n\n  it('should return an empty Map for an empty Set', () => {\n    const set = new Set<number>();\n\n    const result = countBy(set, value => value);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should handle string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry', 'date']);\n\n    const result = countBy(set, value => value.length);\n\n    // apple=5, banana=6, cherry=6, date=4\n    expect(result).toEqual(\n      new Map([\n        [5, 1],\n        [6, 2],\n        [4, 1],\n      ])\n    );\n  });\n\n  it('should handle object values', () => {\n    const set = new Set([\n      { category: 'fruit', name: 'apple' },\n      { category: 'fruit', name: 'banana' },\n      { category: 'vegetable', name: 'carrot' },\n    ]);\n\n    const result = countBy(set, value => value.category);\n\n    expect(result).toEqual(\n      new Map([\n        ['fruit', 2],\n        ['vegetable', 1],\n      ])\n    );\n  });\n\n  it('should count all elements as one key when mapper returns the same value', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    const result = countBy(set, () => 'all');\n\n    expect(result).toEqual(new Map([['all', 5]]));\n  });\n\n  it('should count each element separately when mapper returns unique values', () => {\n    const set = new Set(['a', 'b', 'c']);\n\n    const result = countBy(set, value => value);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 1],\n        ['b', 1],\n        ['c', 1],\n      ])\n    );\n  });\n\n  it('should not modify the original Set', () => {\n    const set = new Set([1, 2, 3]);\n    const originalSize = set.size;\n    const originalValues = Array.from(set);\n\n    countBy(set, value => value % 2);\n\n    expect(set.size).toBe(originalSize);\n    expect(Array.from(set)).toEqual(originalValues);\n  });\n\n  it('should handle boolean keys', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    const result = countBy(set, value => value > 3);\n\n    expect(result).toEqual(\n      new Map([\n        [false, 3],\n        [true, 2],\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "src/set/countBy.ts",
    "content": "/**\n * Counts the occurrences of items in a Set based on a transformation function.\n *\n * This function takes a Set and a function that generates a key from each value.\n * It returns a Map with the generated keys and their counts as values.\n * The count is incremented for each element for which the transformation produces the same key.\n *\n * @template T - The type of elements in the Set.\n * @template K - The type of keys produced by the transformation function.\n * @param {Set<T>} set - The Set to count occurrences from.\n * @param {(value: T, value2: T, set: Set<T>) => K} mapper - The function to produce a key for counting.\n * @returns {Map<K, number>} A Map containing the mapped keys and their counts.\n *\n * @example\n * const set = new Set([1, 2, 3, 4, 5]);\n * const result = countBy(set, (value) => value % 2 === 0 ? 'even' : 'odd');\n * // result will be Map(2) { 'odd' => 3, 'even' => 2 }\n *\n * @example\n * const set = new Set(['apple', 'banana', 'cherry']);\n * const result = countBy(set, (value) => value.length);\n * // result will be Map(2) { 5 => 1, 6 => 2 }\n */\nexport function countBy<T, K>(set: Set<T>, mapper: (value: T, value2: T, set: Set<T>) => K): Map<K, number> {\n  const result = new Map<K, number>();\n\n  for (const value of set) {\n    const mappedKey = mapper(value, value, set);\n    result.set(mappedKey, (result.get(mappedKey) ?? 0) + 1);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/set/every.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { every } from './every';\n\ndescribe('every', () => {\n  it('should return true when all elements satisfy the predicate', () => {\n    const set = new Set([1, 2, 3]);\n\n    expect(every(set, value => value > 0)).toBe(true);\n  });\n\n  it('should return false when at least one element does not satisfy the predicate', () => {\n    const set = new Set([1, -2, 3]);\n\n    expect(every(set, value => value > 0)).toBe(false);\n  });\n\n  it('should return true for an empty Set', () => {\n    const set = new Set<number>();\n\n    expect(every(set, () => false)).toBe(true);\n  });\n\n  it('should pass the set to the predicate function', () => {\n    const set = new Set([1, 2, 3]);\n\n    expect(every(set, (value, value2, originalSet) => originalSet.has(value) && value > 0)).toBe(true);\n  });\n\n  it('should return false immediately when predicate returns false', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    let callCount = 0;\n    const result = every(set, value => {\n      callCount++;\n      return value < 3;\n    });\n\n    expect(result).toBe(false);\n    expect(callCount).toBe(3); // Should stop at value 3\n  });\n\n  it('should work with string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry']);\n\n    expect(every(set, value => value.length > 3)).toBe(true);\n    expect(every(set, value => value.startsWith('a'))).toBe(false);\n  });\n\n  it('should work with complex object values', () => {\n    const set = new Set([\n      { age: 25, active: true },\n      { age: 30, active: true },\n      { age: 35, active: true },\n    ]);\n\n    expect(every(set, value => value.active)).toBe(true);\n    expect(every(set, value => value.age > 20)).toBe(true);\n    expect(every(set, value => value.age > 30)).toBe(false);\n  });\n\n  it('should work with boolean values', () => {\n    const set = new Set([true, true, true]);\n\n    expect(every(set, value => value === true)).toBe(true);\n\n    const mixedSet = new Set([true, true, false]);\n    expect(every(mixedSet, value => value === true)).toBe(false);\n  });\n\n  it('should handle a single element Set', () => {\n    const set = new Set([42]);\n\n    expect(every(set, value => value === 42)).toBe(true);\n    expect(every(set, value => value === 0)).toBe(false);\n  });\n\n  it('should verify all elements match a complex condition', () => {\n    const set = new Set([\n      { price: 100, inStock: true },\n      { price: 200, inStock: true },\n      { price: 150, inStock: true },\n    ]);\n\n    expect(every(set, value => value.inStock && value.price > 50)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/set/every.ts",
    "content": "/**\n * Tests whether all elements in a Set satisfy the provided predicate function.\n *\n * This function iterates through all elements of the Set and checks if the predicate function\n * returns true for every element. It returns true if the predicate is satisfied for all elements,\n * and false otherwise.\n *\n * @template T - The type of elements in the Set.\n * @param {Set<T>} set - The Set to test.\n * @param {(value: T, value2: T, set: Set<T>) => boolean} doesMatch - A predicate function that tests each element.\n * @returns {boolean} true if all elements satisfy the predicate, false otherwise.\n *\n * @example\n * const set = new Set([10, 20, 30]);\n * const result = every(set, (value) => value > 5);\n * // result will be: true\n *\n * const result2 = every(set, (value) => value > 15);\n * // result2 will be: false\n */\nexport function every<T>(set: Set<T>, doesMatch: (value: T, value2: T, set: Set<T>) => boolean): boolean {\n  for (const value of set) {\n    if (!doesMatch(value, value, set)) {\n      return false;\n    }\n  }\n  return true;\n}\n"
  },
  {
    "path": "src/set/filter.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { filter } from './filter';\n\ndescribe('filter', () => {\n  it('should filter elements based on the predicate', () => {\n    const set = new Set([1, 2, 3, 4]);\n\n    const result = filter(set, value => value > 2);\n\n    expect(result).toEqual(new Set([3, 4]));\n  });\n\n  it('should pass the original set to the predicate function', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = filter(set, (value, value2, originalSet) => {\n      expect(originalSet).toBe(set);\n      return value >= originalSet.size;\n    });\n\n    expect(result).toEqual(new Set([3]));\n  });\n\n  it('should return an empty Set when no elements match', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = filter(set, value => value > 10);\n\n    expect(result).toEqual(new Set());\n  });\n\n  it('should return all elements when all match the predicate', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = filter(set, value => value > 0);\n\n    expect(result).toEqual(set);\n  });\n\n  it('should handle an empty Set', () => {\n    const set = new Set<number>();\n\n    const result = filter(set, value => value > 0);\n\n    expect(result).toEqual(new Set());\n  });\n\n  it('should not modify the original Set', () => {\n    const set = new Set([1, 2, 3]);\n\n    const originalSize = set.size;\n    const originalValues = Array.from(set);\n\n    filter(set, value => value > 1);\n\n    expect(set.size).toBe(originalSize);\n    expect(Array.from(set)).toEqual(originalValues);\n  });\n\n  it('should work with string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry', 'date']);\n\n    const result = filter(set, value => value.length > 5);\n\n    expect(result).toEqual(new Set(['banana', 'cherry']));\n  });\n\n  it('should work with complex predicates', () => {\n    const set = new Set([\n      { age: 25, active: true },\n      { age: 30, active: false },\n      { age: 35, active: true },\n      { age: 40, active: false },\n    ]);\n\n    const result = filter(set, value => value.active && value.age >= 30);\n\n    expect(result).toEqual(new Set([{ age: 35, active: true }]));\n  });\n\n  it('should handle boolean values', () => {\n    const set = new Set([true, false, true, false]);\n\n    const result = filter(set, value => value === true);\n\n    expect(result).toEqual(new Set([true]));\n  });\n\n  it('should filter based on value properties', () => {\n    const set = new Set([\n      { name: 'apple', quantity: 5 },\n      { name: 'banana', quantity: 3 },\n      { name: 'cherry', quantity: 8 },\n      { name: 'date', quantity: 2 },\n    ]);\n\n    const result = filter(set, value => value.quantity > 2);\n\n    expect(result).toEqual(\n      new Set([\n        { name: 'apple', quantity: 5 },\n        { name: 'banana', quantity: 3 },\n        { name: 'cherry', quantity: 8 },\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "src/set/filter.ts",
    "content": "/**\n * Filters a Set based on a predicate function.\n *\n * This function takes a Set and a predicate function, and returns a new Set containing\n * only the elements for which the predicate function returns true.\n *\n * @template T - The type of elements in the Set.\n * @param {Set<T>} set - The Set to filter.\n * @param {(value: T, value2: T, set: Set<T>) => boolean} callback - A predicate function that tests each element.\n * @returns {Set<T>} A new Set containing only the elements that satisfy the predicate.\n *\n * @example\n * const set = new Set([1, 2, 3, 4, 5]);\n * const result = filter(set, (value) => value > 2);\n * // result will be:\n * // Set(3) { 3, 4, 5 }\n */\nexport function filter<T>(set: Set<T>, callback: (value: T, value2: T, set: Set<T>) => boolean): Set<T> {\n  const result = new Set<T>();\n\n  for (const value of set) {\n    if (callback(value, value, set)) {\n      result.add(value);\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/set/find.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { find } from './find';\n\ndescribe('find', () => {\n  it('should return the first element that satisfies the predicate', () => {\n    const set = new Set([\n      { age: 24, active: true },\n      { age: 36, active: true },\n      { age: 40, active: false },\n    ]);\n\n    expect(find(set, value => value.age < 40)).toEqual({ age: 24, active: true });\n  });\n\n  it('should return the first element if all elements satisfy the predicate', () => {\n    const set = new Set([\n      { age: 24, active: true },\n      { age: 36, active: true },\n      { age: 40, active: false },\n    ]);\n\n    expect(find(set, value => value.age > 20)).toEqual({ age: 24, active: true });\n  });\n\n  it('should return undefined if no element satisfies the predicate', () => {\n    const set = new Set([\n      { age: 24, active: true },\n      { age: 36, active: true },\n      { age: 40, active: false },\n    ]);\n\n    expect(find(set, value => value.age > 50)).toBeUndefined();\n  });\n\n  it('should return undefined for an empty Set', () => {\n    const set = new Set<{ age: number }>();\n\n    expect(find(set, value => value.age < 40)).toBeUndefined();\n  });\n\n  it('should handle Sets with various data types', () => {\n    const set = new Set([42, 'hello', true]);\n\n    expect(find(set, value => typeof value === 'string')).toBe('hello');\n  });\n\n  it('should pass the set to the predicate function', () => {\n    const set = new Set([\n      { age: 36, active: true },\n      { age: 40, active: false },\n    ]);\n\n    expect(find(set, (value, value2, originalSet) => value.active && originalSet.has(value))).toEqual({\n      age: 36,\n      active: true,\n    });\n  });\n\n  it('should work with number values', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    expect(find(set, value => value > 3)).toBe(4);\n  });\n\n  it('should work with string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry']);\n\n    expect(find(set, value => value.startsWith('b'))).toBe('banana');\n  });\n\n  it('should return the first matching element when multiple elements match', () => {\n    const set = new Set([1, 2, 2, 3]);\n\n    expect(find(set, value => value === 2)).toBe(2);\n  });\n\n  it('should stop iterating after finding the first match', () => {\n    const set = new Set([1, 2, 3, 4]);\n\n    let callCount = 0;\n    const result = find(set, value => {\n      callCount++;\n      return value === 2;\n    });\n\n    expect(result).toBe(2);\n    expect(callCount).toBe(2);\n  });\n\n  it('should work with complex objects', () => {\n    const set = new Set([\n      { name: 'apple', quantity: 10 },\n      { name: 'banana', quantity: 5 },\n      { name: 'grape', quantity: 15 },\n    ]);\n\n    expect(find(set, value => value.quantity > 10)).toEqual({ name: 'grape', quantity: 15 });\n  });\n\n  it('should handle boolean values', () => {\n    const set = new Set([false, false, true, false]);\n\n    expect(find(set, value => value === true)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "src/set/find.ts",
    "content": "/**\n * Finds the first element in a Set for which the predicate function returns true.\n *\n * This function iterates through the elements of the Set and returns the first\n * element for which the predicate function returns true. If no element satisfies the predicate,\n * it returns undefined.\n *\n * @template T - The type of elements in the Set.\n * @param {Set<T>} set - The Set to search.\n * @param {(value: T, value2: T, set: Set<T>) => boolean} doesMatch - A predicate function that tests each element.\n * @returns {T | undefined} The first element that satisfies the predicate, or undefined if none found.\n *\n * @example\n * const set = new Set([\n *   { name: 'apple', quantity: 10 },\n *   { name: 'banana', quantity: 5 },\n *   { name: 'grape', quantity: 15 }\n * ]);\n * const result = find(set, (value) => value.quantity > 10);\n * // result will be: { name: 'grape', quantity: 15 }\n */\nexport function find<T>(set: Set<T>, doesMatch: (value: T, value2: T, set: Set<T>) => boolean): T | undefined {\n  for (const value of set) {\n    if (doesMatch(value, value, set)) {\n      return value;\n    }\n  }\n\n  return undefined;\n}\n"
  },
  {
    "path": "src/set/forEach.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { forEach } from './forEach';\n\ndescribe('forEach', () => {\n  it('should execute callback for each element in the Set', () => {\n    const set = new Set([1, 2, 3]);\n    const result: number[] = [];\n\n    forEach(set, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('should pass the value twice and the set to the callback', () => {\n    const set = new Set(['a', 'b', 'c']);\n    const results: Array<{ value1: string; value2: string; hasValue: boolean }> = [];\n\n    forEach(set, (value, value2, originalSet) => {\n      results.push({\n        value1: value,\n        value2: value2,\n        hasValue: originalSet.has(value),\n      });\n    });\n\n    expect(results).toEqual([\n      { value1: 'a', value2: 'a', hasValue: true },\n      { value1: 'b', value2: 'b', hasValue: true },\n      { value1: 'c', value2: 'c', hasValue: true },\n    ]);\n  });\n\n  it('should work with an empty Set', () => {\n    const set = new Set<number>();\n    let callCount = 0;\n\n    forEach(set, () => {\n      callCount++;\n    });\n\n    expect(callCount).toBe(0);\n  });\n\n  it('should work with a single-element Set', () => {\n    const set = new Set([42]);\n    const result: number[] = [];\n\n    forEach(set, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([42]);\n  });\n\n  it('should iterate in insertion order', () => {\n    const set = new Set<string>();\n    set.add('first');\n    set.add('second');\n    set.add('third');\n\n    const values: string[] = [];\n    forEach(set, value => {\n      values.push(value);\n    });\n\n    expect(values).toEqual(['first', 'second', 'third']);\n  });\n\n  it('should work with various value types', () => {\n    const obj = { id: 1 };\n    const arr = [1, 2, 3];\n    const set = new Set(['hello', 42, true, obj, arr]);\n\n    const values: any[] = [];\n    forEach(set, value => {\n      values.push(value);\n    });\n\n    expect(values).toEqual(['hello', 42, true, obj, arr]);\n  });\n\n  it('should work with object elements', () => {\n    const set = new Set([\n      { name: 'Alice', age: 25 },\n      { name: 'Bob', age: 30 },\n      { name: 'Charlie', age: 35 },\n    ]);\n\n    const names: string[] = [];\n    forEach(set, value => {\n      names.push(value.name);\n    });\n\n    expect(names).toEqual(['Alice', 'Bob', 'Charlie']);\n  });\n\n  it('should allow side effects in the callback', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n    let sum = 0;\n\n    forEach(set, value => {\n      sum += value;\n    });\n\n    expect(sum).toBe(15);\n  });\n\n  it('should work with boolean values', () => {\n    const set = new Set([true, false]);\n    const result: boolean[] = [];\n\n    forEach(set, value => {\n      result.push(value);\n    });\n\n    expect(result).toEqual([true, false]);\n  });\n\n  it('should work with symbol values', () => {\n    const sym1 = Symbol('sym1');\n    const sym2 = Symbol('sym2');\n    const set = new Set([sym1, sym2]);\n\n    const symbols: symbol[] = [];\n    forEach(set, value => {\n      symbols.push(value);\n    });\n\n    expect(symbols).toEqual([sym1, sym2]);\n  });\n\n  it('should handle large Sets', () => {\n    const set = new Set(Array.from({ length: 1000 }, (_, i) => i));\n    let count = 0;\n\n    forEach(set, () => {\n      count++;\n    });\n\n    expect(count).toBe(1000);\n  });\n});\n"
  },
  {
    "path": "src/set/forEach.ts",
    "content": "/**\n * Executes a provided function once for each element in a Set.\n *\n * This function iterates through all elements of the Set and executes the callback function\n * for each element. The callback receives the value twice (for consistency with Map.forEach)\n * and the Set itself as arguments.\n *\n * @template T - The type of elements in the Set.\n * @param {Set<T>} set - The Set to iterate over.\n * @param {(value: T, value2: T, set: Set<T>) => void} callback - A function to execute for each element.\n * @returns {void}\n *\n * @example\n * const set = new Set([1, 2, 3]);\n * forEach(set, (value) => {\n *   console.log(value * 2);\n * });\n * // Output:\n * // 2\n * // 4\n * // 6\n */\nexport function forEach<T>(set: Set<T>, callback: (value: T, value2: T, set: Set<T>) => void): void {\n  for (const value of set) {\n    callback(value, value, set);\n  }\n}\n"
  },
  {
    "path": "src/set/index.ts",
    "content": "export { countBy } from './countBy.ts';\nexport { every } from './every.ts';\nexport { filter } from './filter.ts';\nexport { find } from './find.ts';\nexport { keyBy } from './keyBy.ts';\nexport { map } from './map.ts';\nexport { reduce } from './reduce.ts';\nexport { some } from './some.ts';\n"
  },
  {
    "path": "src/set/keyBy.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { keyBy } from './keyBy';\n\ndescribe('keyBy', () => {\n  it('should map elements by the result of the key function', () => {\n    const set = new Set([\n      { id: 1, name: 'alice' },\n      { id: 2, name: 'bob' },\n      { id: 3, name: 'carol' },\n    ]);\n\n    const result = keyBy(set, value => value.id);\n\n    expect(result).toEqual(\n      new Map([\n        [1, { id: 1, name: 'alice' }],\n        [2, { id: 2, name: 'bob' }],\n        [3, { id: 3, name: 'carol' }],\n      ])\n    );\n  });\n\n  it('should pass the original set to the key function', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = keyBy(set, (value, value2, originalSet) => {\n      expect(originalSet).toBe(set);\n      return value >= originalSet.size ? 'large' : 'small';\n    });\n\n    expect(result).toEqual(\n      new Map([\n        ['small', 2],\n        ['large', 3],\n      ])\n    );\n  });\n\n  it('should return an empty Map for an empty Set', () => {\n    const set = new Set<number>();\n\n    const result = keyBy(set, value => value);\n\n    expect(result).toEqual(new Map());\n  });\n\n  it('should use the last value when multiple elements produce the same key', () => {\n    const set = new Set([\n      { type: 'fruit', name: 'apple' },\n      { type: 'fruit', name: 'banana' },\n      { type: 'vegetable', name: 'carrot' },\n    ]);\n\n    const result = keyBy(set, value => value.type);\n\n    expect(result).toEqual(\n      new Map([\n        ['fruit', { type: 'fruit', name: 'banana' }],\n        ['vegetable', { type: 'vegetable', name: 'carrot' }],\n      ])\n    );\n  });\n\n  it('should handle string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry']);\n\n    const result = keyBy(set, value => value[0]);\n\n    expect(result).toEqual(\n      new Map([\n        ['a', 'apple'],\n        ['b', 'banana'],\n        ['c', 'cherry'],\n      ])\n    );\n  });\n\n  it('should handle numeric keys', () => {\n    const set = new Set(['a', 'bb', 'ccc']);\n\n    const result = keyBy(set, value => value.length);\n\n    expect(result).toEqual(\n      new Map([\n        [1, 'a'],\n        [2, 'bb'],\n        [3, 'ccc'],\n      ])\n    );\n  });\n\n  it('should not modify the original Set', () => {\n    const set = new Set([1, 2, 3]);\n    const originalSize = set.size;\n    const originalValues = Array.from(set);\n\n    keyBy(set, value => value * 2);\n\n    expect(set.size).toBe(originalSize);\n    expect(Array.from(set)).toEqual(originalValues);\n  });\n\n  it('should handle boolean keys', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    const result = keyBy(set, value => value > 3);\n\n    expect(result).toEqual(\n      new Map([\n        [false, 3],\n        [true, 5],\n      ])\n    );\n  });\n\n  it('should preserve the value types', () => {\n    const obj1 = { id: 1, data: { nested: true } };\n    const obj2 = { id: 2, data: { nested: false } };\n    const set = new Set([obj1, obj2]);\n\n    const result = keyBy(set, value => value.id);\n\n    expect(result.get(1)).toBe(obj1);\n    expect(result.get(2)).toBe(obj2);\n  });\n});\n"
  },
  {
    "path": "src/set/keyBy.ts",
    "content": "/**\n * Maps each element of a Set based on a provided key-generating function.\n *\n * This function takes a Set and a function that generates a key from each value.\n * It returns a new Map where the keys are generated by the key function and the values are\n * the corresponding values from the original set. If multiple elements produce the same key,\n * the last value encountered will be used.\n *\n * @template T - The type of elements in the Set.\n * @template K - The type of keys to produce in the returned Map.\n * @param {Set<T>} set - The set of elements to be mapped.\n * @param {(value: T, value2: T, set: Set<T>) => K} getKeyFromValue - A function that generates a key from a value.\n * @returns {Map<K, T>} A Map where the generated keys are mapped to each element's value.\n *\n * @example\n * const set = new Set([\n *   { type: 'fruit', name: 'apple' },\n *   { type: 'fruit', name: 'banana' },\n *   { type: 'vegetable', name: 'carrot' }\n * ]);\n * const result = keyBy(set, item => item.type);\n * // result will be:\n * // Map(2) {\n * //   'fruit' => { type: 'fruit', name: 'banana' },\n * //   'vegetable' => { type: 'vegetable', name: 'carrot' }\n * // }\n */\nexport function keyBy<T, K>(set: Set<T>, getKeyFromValue: (value: T, value2: T, set: Set<T>) => K): Map<K, T> {\n  const result = new Map<K, T>();\n\n  for (const value of set) {\n    const newKey = getKeyFromValue(value, value, set);\n    result.set(newKey, value);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/set/map.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { map } from './map';\n\ndescribe('map', () => {\n  it('should transform elements with the provided function', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = map(set, value => value * 2);\n\n    expect(result).toEqual(new Set([2, 4, 6]));\n  });\n\n  it('should pass the set to the transform function', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = map(set, (value, value2, originalSet) => {\n      expect(originalSet).toBe(set);\n      return value + originalSet.size;\n    });\n\n    expect(result).toEqual(new Set([4, 5, 6]));\n  });\n\n  it('should handle an empty Set', () => {\n    const set = new Set<number>();\n\n    const result = map(set, value => value * 2);\n\n    expect(result).toEqual(new Set());\n  });\n\n  it('should not modify the original Set', () => {\n    const set = new Set([1, 2, 3]);\n\n    const originalSize = set.size;\n    const originalValues = Array.from(set);\n\n    map(set, value => value * 2);\n\n    expect(set.size).toBe(originalSize);\n    expect(Array.from(set)).toEqual(originalValues);\n  });\n\n  it('should work with string values', () => {\n    const set = new Set(['a', 'b', 'c']);\n\n    const result = map(set, value => value.toUpperCase());\n\n    expect(result).toEqual(new Set(['A', 'B', 'C']));\n  });\n\n  it('should work with type transformations', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = map(set, value => String(value));\n\n    expect(result).toEqual(new Set(['1', '2', '3']));\n  });\n\n  it('should work with complex object transformations', () => {\n    const set = new Set([\n      { name: 'apple', price: 1 },\n      { name: 'banana', price: 2 },\n    ]);\n\n    const result = map(set, value => ({ ...value, price: value.price * 2 }));\n\n    expect(result).toEqual(\n      new Set([\n        { name: 'apple', price: 2 },\n        { name: 'banana', price: 4 },\n      ])\n    );\n  });\n\n  it('should handle a single element Set', () => {\n    const set = new Set([42]);\n\n    const result = map(set, value => value + 1);\n\n    expect(result).toEqual(new Set([43]));\n  });\n\n  it('should work with boolean values', () => {\n    const set = new Set([true, false]);\n\n    const result = map(set, value => !value);\n\n    expect(result).toEqual(new Set([false, true]));\n  });\n\n  it('should handle duplicate results correctly', () => {\n    const set = new Set([1, 2, 3, 4]);\n\n    const result = map(set, value => Math.floor(value / 2));\n\n    // Set automatically deduplicates: [0, 1, 1, 2] -> [0, 1, 2]\n    expect(result).toEqual(new Set([0, 1, 2]));\n  });\n\n  it('should work with object property extraction', () => {\n    const set = new Set([\n      { id: 1, name: 'Alice' },\n      { id: 2, name: 'Bob' },\n      { id: 3, name: 'Charlie' },\n    ]);\n\n    const result = map(set, value => value.name);\n\n    expect(result).toEqual(new Set(['Alice', 'Bob', 'Charlie']));\n  });\n\n  it('should transform numbers to objects', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = map(set, value => ({ id: value, squared: value * value }));\n\n    expect(result).toEqual(\n      new Set([\n        { id: 1, squared: 1 },\n        { id: 2, squared: 4 },\n        { id: 3, squared: 9 },\n      ])\n    );\n  });\n});\n"
  },
  {
    "path": "src/set/map.ts",
    "content": "/**\n * Creates a new Set with elements transformed by the provided function.\n *\n * This function takes a Set and a function that generates a new value from each element.\n * It returns a new Set where the elements are the result of applying the function to each element.\n *\n * @template T - The type of elements in the input Set.\n * @template U - The type of elements in the output Set.\n * @param {Set<T>} set - The Set to transform.\n * @param {(value: T, value2: T, set: Set<T>) => U} getNewValue - A function that generates a new value from an element.\n * @returns {Set<U>} A new Set with transformed elements.\n *\n * @example\n * const set = new Set([1, 2, 3]);\n * const result = map(set, (value) => value * 2);\n * // result will be:\n * // Set(3) { 2, 4, 6 }\n */\nexport function map<T, U>(set: Set<T>, getNewValue: (value: T, value2: T, set: Set<T>) => U): Set<U> {\n  const result = new Set<U>();\n\n  for (const value of set) {\n    const newValue = getNewValue(value, value, set);\n    result.add(newValue);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/set/reduce.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { reduce } from './reduce';\n\ndescribe('reduce', () => {\n  it('should reduce a Set to a single value with an initial value', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = reduce(set, (acc, value) => acc + value, 0);\n\n    expect(result).toBe(6);\n  });\n\n  it('should return the accumulated value when no initial value is provided', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = reduce(set, (acc, value) => acc + value);\n\n    expect(result).toBe(6);\n  });\n\n  it('should throw an error when reducing an empty Set without an initial value', () => {\n    const set = new Set<number>();\n\n    expect(() => reduce(set, (acc, value) => acc + value)).toThrow('Reduce of empty set with no initial value');\n  });\n\n  it('should handle an empty Set with an initial value', () => {\n    const set = new Set<number>();\n\n    const result = reduce(set, (acc, value) => acc + value, 10);\n\n    expect(result).toBe(10);\n  });\n\n  it('should pass the original set to the callback function', () => {\n    const set = new Set([1, 2]);\n\n    const result = reduce(\n      set,\n      (acc, value, value2, originalSet) => {\n        expect(originalSet).toBe(set);\n        return acc + value;\n      },\n      0\n    );\n\n    expect(result).toBe(3);\n  });\n\n  it('should handle a single element Set with initial value', () => {\n    const set = new Set([42]);\n\n    const result = reduce(set, (acc, value) => acc + value, 10);\n\n    expect(result).toBe(52);\n  });\n\n  it('should handle a single element Set without initial value', () => {\n    const set = new Set([42]);\n\n    const result = reduce(set, (acc, value) => acc + value);\n\n    expect(result).toBe(42);\n  });\n\n  it('should work with string concatenation', () => {\n    const set = new Set(['hello', ' ', 'world']);\n\n    const result = reduce(set, (acc, value) => acc + value, '');\n\n    expect(result).toBe('hello world');\n  });\n\n  it('should build an array from Set elements', () => {\n    const set = new Set([1, 2, 3]);\n\n    const result = reduce(\n      set,\n      (acc, value) => {\n        acc.push(value * 2);\n        return acc;\n      },\n      [] as number[]\n    );\n\n    expect(result).toEqual([2, 4, 6]);\n  });\n\n  it('should find maximum value', () => {\n    const set = new Set([10, 25, 15]);\n\n    const result = reduce(set, (acc, value) => (value > acc ? value : acc), 0);\n\n    expect(result).toBe(25);\n  });\n\n  it('should find minimum value', () => {\n    const set = new Set([10, 25, 15]);\n\n    const result = reduce(set, (acc, value) => (value < acc ? value : acc), Infinity);\n\n    expect(result).toBe(10);\n  });\n\n  it('should handle complex accumulation', () => {\n    const set = new Set([\n      { price: 100, quantity: 2 },\n      { price: 50, quantity: 3 },\n      { price: 75, quantity: 1 },\n    ]);\n\n    const result = reduce(set, (acc, value) => acc + value.price * value.quantity, 0);\n\n    expect(result).toBe(425); // 100*2 + 50*3 + 75*1 = 200 + 150 + 75\n  });\n\n  it('should build an object from Set elements', () => {\n    const set = new Set([\n      { key: 'a', value: 1 },\n      { key: 'b', value: 2 },\n      { key: 'c', value: 3 },\n    ]);\n\n    const result = reduce(\n      set,\n      (acc, item) => {\n        return { ...acc, [item.key]: item.value * 2 };\n      },\n      {} as Record<string, number>\n    );\n\n    expect(result).toEqual({ a: 2, b: 4, c: 6 });\n  });\n\n  it('should work with different accumulator type', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    const result = reduce(\n      set,\n      (acc, value) => {\n        if (value % 2 === 0) {\n          acc.even.push(value);\n        } else {\n          acc.odd.push(value);\n        }\n        return acc;\n      },\n      { even: [], odd: [] } as { even: number[]; odd: number[] }\n    );\n\n    expect(result).toEqual({ even: [2, 4], odd: [1, 3, 5] });\n  });\n\n  it('should handle boolean values', () => {\n    const set = new Set([true, false, true]);\n\n    const result = reduce(set, (acc, value) => acc && value, true);\n\n    expect(result).toBe(false);\n  });\n\n  it('should work with multiplication', () => {\n    const set = new Set([2, 3, 4]);\n\n    const result = reduce(set, (acc, value) => acc * value, 1);\n\n    expect(result).toBe(24);\n  });\n});\n"
  },
  {
    "path": "src/set/reduce.ts",
    "content": "/**\n * Reduces a Set to a single value by iterating through its elements and applying a callback function.\n *\n * This function iterates through all elements of the Set and applies the callback function to each element,\n * accumulating the result. If an initial value is provided, it is used as the starting accumulator value.\n * If no initial value is provided and the Set is empty, a TypeError is thrown.\n *\n * @template T - The type of elements in the Set.\n * @template A - The type of the accumulator.\n * @param {Set<T>} set - The Set to reduce.\n * @param {(accumulator: A, value: T, value2: T, set: Set<T>) => A} callback - A function that processes each element and updates the accumulator.\n * @param {A} [initialValue] - The initial value for the accumulator. If not provided, the first element in the Set is used.\n * @returns {A} The final accumulated value.\n * @throws {TypeError} If the Set is empty and no initial value is provided.\n *\n * @example\n * const set = new Set([1, 2, 3]);\n * const result = reduce(set, (acc, value) => acc + value, 0);\n * // result will be: 6\n *\n * @example\n * const set = new Set([10, 20]);\n * const result = reduce(set, (acc, value) => acc + value);\n * // result will be: 30 (starts with first value 10)\n */\nexport function reduce<T, A = T>(\n  set: Set<T>,\n  callback: (accumulator: A, value: T, value2: T, set: Set<T>) => A,\n  initialValue?: A\n): A {\n  if (initialValue == null && set.size === 0) {\n    throw new TypeError('Reduce of empty set with no initial value');\n  }\n\n  let accumulator: A = initialValue!;\n\n  for (const value of set) {\n    if (accumulator == null) {\n      accumulator = value as any as A;\n    } else {\n      accumulator = callback(accumulator, value, value, set);\n    }\n  }\n\n  return accumulator;\n}\n"
  },
  {
    "path": "src/set/some.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { some } from './some';\n\ndescribe('some', () => {\n  it('should return true when at least one element satisfies the predicate', () => {\n    const set = new Set([1, 2, 3]);\n\n    expect(some(set, value => value > 2)).toBe(true);\n  });\n\n  it('should return false when no elements satisfy the predicate', () => {\n    const set = new Set([1, 2, 3]);\n\n    expect(some(set, value => value > 10)).toBe(false);\n  });\n\n  it('should return false for an empty Set', () => {\n    const set = new Set<number>();\n\n    expect(some(set, () => true)).toBe(false);\n  });\n\n  it('should pass the set to the predicate function', () => {\n    const set = new Set([1, 2, 3]);\n\n    expect(some(set, (value, value2, originalSet) => originalSet.has(value) && value === 2)).toBe(true);\n  });\n\n  it('should return true immediately when predicate returns true', () => {\n    const set = new Set([1, 2, 3, 4, 5]);\n\n    let callCount = 0;\n    const result = some(set, value => {\n      callCount++;\n      return value === 2;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(2); // Should stop at value 2\n  });\n\n  it('should work with string values', () => {\n    const set = new Set(['apple', 'banana', 'cherry']);\n\n    expect(some(set, value => value.startsWith('b'))).toBe(true);\n    expect(some(set, value => value.startsWith('z'))).toBe(false);\n  });\n\n  it('should work with complex object values', () => {\n    const set = new Set([\n      { age: 25, active: false },\n      { age: 30, active: true },\n      { age: 35, active: false },\n    ]);\n\n    expect(some(set, value => value.active)).toBe(true);\n    expect(some(set, value => value.age > 40)).toBe(false);\n  });\n\n  it('should work with boolean values', () => {\n    const set = new Set([false, false, true]);\n\n    expect(some(set, value => value === true)).toBe(true);\n\n    const allFalse = new Set([false, false]);\n    expect(some(allFalse, value => value === true)).toBe(false);\n  });\n\n  it('should handle a single element Set', () => {\n    const set = new Set([42]);\n\n    expect(some(set, value => value === 42)).toBe(true);\n    expect(some(set, value => value === 0)).toBe(false);\n  });\n\n  it('should find elements matching a complex condition', () => {\n    const set = new Set([\n      { price: 100, inStock: false },\n      { price: 200, inStock: true },\n      { price: 150, inStock: false },\n    ]);\n\n    expect(some(set, value => value.inStock && value.price > 100)).toBe(true);\n    expect(some(set, value => value.price > 300)).toBe(false);\n  });\n\n  it('should return true when the first element matches', () => {\n    const set = new Set([10, 20, 30]);\n\n    let callCount = 0;\n    const result = some(set, value => {\n      callCount++;\n      return value === 10;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(1);\n  });\n\n  it('should check all elements when none match until the last one', () => {\n    const set = new Set([1, 2, 3]);\n\n    let callCount = 0;\n    const result = some(set, value => {\n      callCount++;\n      return value === 3;\n    });\n\n    expect(result).toBe(true);\n    expect(callCount).toBe(3);\n  });\n\n  it('should work with number values', () => {\n    const set = new Set([5, 10, 15, 20]);\n\n    expect(some(set, value => value > 15)).toBe(true);\n    expect(some(set, value => value > 25)).toBe(false);\n  });\n\n  it('should handle type checking predicates', () => {\n    const set = new Set([1, 'hello', true, 42]);\n\n    expect(some(set, value => typeof value === 'string')).toBe(true);\n    expect(some(set, value => typeof value === 'object')).toBe(false);\n  });\n});\n"
  },
  {
    "path": "src/set/some.ts",
    "content": "/**\n * Tests whether at least one element in a Set satisfies the provided predicate function.\n *\n * This function iterates through the elements of the Set and checks if the predicate function\n * returns true for at least one element. It returns true if any element satisfies the predicate,\n * and false otherwise.\n *\n * @template T - The type of elements in the Set.\n * @param {Set<T>} set - The Set to test.\n * @param {(value: T, value2: T, set: Set<T>) => boolean} doesMatch - A predicate function that tests each element.\n * @returns {boolean} true if at least one element satisfies the predicate, false otherwise.\n *\n * @example\n * const set = new Set([1, 2, 3]);\n * const result = some(set, (value) => value > 2);\n * // result will be: true\n *\n * const result2 = some(set, (value) => value > 5);\n * // result2 will be: false\n */\nexport function some<T>(set: Set<T>, doesMatch: (value: T, value2: T, set: Set<T>) => boolean): boolean {\n  for (const value of set) {\n    if (doesMatch(value, value, set)) {\n      return true;\n    }\n  }\n  return false;\n}\n"
  },
  {
    "path": "src/string/camelCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { camelCase } from './camelCase';\n\ndescribe('camelCase', () => {\n  it('should change camel case to camel case', () => {\n    expect(camelCase('camelCase')).toEqual('camelCase');\n  });\n\n  it('should change space to camel case', () => {\n    expect(camelCase('some whitespace')).toEqual('someWhitespace');\n  });\n\n  it('should change hyphen to camel case', () => {\n    expect(camelCase('hyphen-text')).toEqual('hyphenText');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(camelCase('HTTPRequest')).toEqual('httpRequest');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(camelCase('    leading and trailing whitespace    ')).toEqual('leadingAndTrailingWhitespace');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(camelCase('special@characters!')).toEqual('specialCharacters');\n  });\n\n  it('should work with an empty string', () => {\n    expect(camelCase('')).toEqual('');\n  });\n\n  it('should work with screaming camel case', () => {\n    expect(camelCase('FOO_BAR')).toEqual('fooBar');\n  });\n\n  it('should support emojis', () => {\n    expect(camelCase('Keep unicode 😅')).toEqual('keepUnicode😅');\n  });\n});\n"
  },
  {
    "path": "src/string/camelCase.ts",
    "content": "import { capitalize } from './capitalize.ts';\nimport { words as getWords } from './words.ts';\n\n/**\n * Converts a string to camel case.\n *\n * Camel case is the naming convention in which the first word is written in lowercase and\n * each subsequent word begins with a capital letter, concatenated without any separator characters.\n *\n * @param {string} str - The string that is to be changed to camel case.\n * @returns {string} - The converted string to camel case.\n *\n * @example\n * const convertedStr1 = camelCase('camelCase') // returns 'camelCase'\n * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'\n * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'\n * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'\n * const convertedStr5 = camelCase('Keep unicode 😅') // returns 'keepUnicode😅'\n */\nexport function camelCase(str: string): string {\n  const words = getWords(str);\n\n  if (words.length === 0) {\n    return '';\n  }\n\n  const [first, ...rest] = words;\n\n  return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;\n}\n"
  },
  {
    "path": "src/string/capitalize.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { capitalize } from './capitalize';\n\ndescribe('capitalize', () => {\n  it('should converts the first character of string to upper case', () => {\n    expect(capitalize('fred')).toEqual('Fred');\n  });\n\n  it('should converts the first character of string to upper case and the remaining to lower case.', () => {\n    expect(capitalize('FRED')).toEqual('Fred');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(capitalize('special@characters!')).toEqual('Special@characters!');\n  });\n\n  it('should handle hyphen correctly', () => {\n    expect(capitalize('hyphen-text')).toEqual('Hyphen-text');\n  });\n\n  it('should handle leading whitespace', () => {\n    expect(capitalize(' fred')).toEqual(' fred');\n  });\n\n  it('should handle strings that are already in capitalize', () => {\n    expect(capitalize('Fred')).toEqual('Fred');\n  });\n\n  it('should work with an empty string', () => {\n    expect(capitalize('')).toEqual('');\n  });\n});\n"
  },
  {
    "path": "src/string/capitalize.ts",
    "content": "/**\n * Converts the first character of string to upper case and the remaining to lower case.\n *\n * @template T - Literal type of the string.\n * @param {T} str - The string to be converted to uppercase.\n * @returns {Capitalize<T>} - The capitalized string.\n *\n * @example\n * const result = capitalize('fred') // returns 'Fred'\n * const result2 = capitalize('FRED') // returns 'Fred'\n */\n\nexport function capitalize<T extends string>(str: T): Capitalize<T> {\n  return (str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()) as Capitalize<T>;\n}\n\ntype Capitalize<T extends string> = T extends `${infer F}${infer R}` ? `${Uppercase<F>}${Lowercase<R>}` : T;\n"
  },
  {
    "path": "src/string/constantCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { constantCase } from './constantCase';\n\ndescribe('constantCase', () => {\n  it('should change camel case to constant case', async () => {\n    expect(constantCase('camelCase')).toEqual('CAMEL_CASE');\n  });\n\n  it('should change space to underscore', async () => {\n    expect(constantCase('some whitespace')).toEqual('SOME_WHITESPACE');\n  });\n\n  it('should change hyphen to underscore', async () => {\n    expect(constantCase('hyphen-text')).toEqual('HYPHEN_TEXT');\n  });\n\n  it('should change Acronyms to small letter', async () => {\n    expect(constantCase('HTTPRequest')).toEqual('HTTP_REQUEST');\n  });\n\n  it('should handle leading and trailing whitespace', async () => {\n    expect(constantCase('    leading and trailing whitespace')).toEqual('LEADING_AND_TRAILING_WHITESPACE');\n  });\n\n  it('should handle special characters correctly', async () => {\n    expect(constantCase('special@characters!')).toEqual('SPECIAL_CHARACTERS');\n  });\n\n  it('should handle strings that are already in CONSTANT_CASE', async () => {\n    expect(constantCase('CONSTANT_CASE')).toEqual('CONSTANT_CASE');\n  });\n\n  it('should work with an empty string', async () => {\n    expect(constantCase('')).toEqual('');\n  });\n\n  it('should work with screaming constant case', async () => {\n    expect(constantCase('foo_bar')).toEqual('FOO_BAR');\n  });\n});\n"
  },
  {
    "path": "src/string/constantCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts a string to constant case.\n *\n * Constant case is a naming convention where each word is written in uppercase letters and separated by an underscore (`_`). For example, `CONSTANT_CASE`.\n *\n * @param {string} str - The string that is to be changed to constant case.\n * @returns {string} - The converted string to constant case.\n *\n * @example\n * const convertedStr1 = constantCase('camelCase') // returns 'CAMEL_CASE'\n * const convertedStr2 = constantCase('some whitespace') // returns 'SOME_WHITESPACE'\n * const convertedStr3 = constantCase('hyphen-text') // returns 'HYPHEN_TEXT'\n * const convertedStr4 = constantCase('HTTPRequest') // returns 'HTTP_REQUEST'\n */\n\nexport function constantCase(str: string): string {\n  const words = getWords(str);\n  return words.map(word => word.toUpperCase()).join('_');\n}\n"
  },
  {
    "path": "src/string/deburr.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { deburr } from './deburr';\nimport { burredLetters } from '../_internal/burredLetters';\nimport { comboMarks } from '../_internal/comboMarks';\nimport { deburredLetters } from '../_internal/deburredLetters';\n\ndescribe('deburr', () => {\n  it('should convert examples correctly', () => {\n    expect(deburr('Æthelred')).toBe('Aethelred');\n    expect(deburr('München')).toBe('Munchen');\n    expect(deburr('Crème brûlée')).toBe('Creme brulee');\n  });\n\n  it('should convert Latin Unicode letters to basic Latin', () => {\n    const actual = burredLetters.map(deburr);\n    expect(actual).toEqual(deburredLetters);\n  });\n\n  it('should not deburr Latin mathematical operators', () => {\n    const operators = ['\\xd7', '\\xf7'];\n    const actual = operators.map(deburr);\n\n    expect(actual).toEqual(operators);\n  });\n\n  it('should deburr combining diacritical marks', () => {\n    const expected = comboMarks.map(() => 'ei');\n\n    const actual = comboMarks.map(chr => deburr(`e${chr}i`));\n\n    expect(actual).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "src/string/deburr.ts",
    "content": "const deburrMap = new Map<string, string>([\n  ['Æ', 'Ae'],\n  ['Ð', 'D'],\n  ['Ø', 'O'],\n  ['Þ', 'Th'],\n  ['ß', 'ss'],\n  ['æ', 'ae'],\n  ['ð', 'd'],\n  ['ø', 'o'],\n  ['þ', 'th'],\n  ['Đ', 'D'],\n  ['đ', 'd'],\n  ['Ħ', 'H'],\n  ['ħ', 'h'],\n  ['ı', 'i'],\n  ['Ĳ', 'IJ'],\n  ['ĳ', 'ij'],\n  ['ĸ', 'k'],\n  ['Ŀ', 'L'],\n  ['ŀ', 'l'],\n  ['Ł', 'L'],\n  ['ł', 'l'],\n  ['ŉ', \"'n\"],\n  ['Ŋ', 'N'],\n  ['ŋ', 'n'],\n  ['Œ', 'Oe'],\n  ['œ', 'oe'],\n  ['Ŧ', 'T'],\n  ['ŧ', 't'],\n  ['ſ', 's'],\n]);\n\n/**\n * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.\n * For example, \"Crème brûlée\" becomes \"Creme brulee\".\n *\n * @param {string} str - The input string to be deburred.\n * @returns {string} - The deburred string with special characters replaced by their ASCII equivalents.\n *\n * @example\n * // Basic usage:\n * deburr('Æthelred') // returns 'Aethelred'\n *\n * @example\n * // Handling diacritical marks:\n * deburr('München') // returns 'Munchen'\n *\n * @example\n * // Special characters:\n * deburr('Crème brûlée') // returns 'Creme brulee'\n */\nexport function deburr(str: string): string {\n  str = str.normalize('NFD');\n\n  let result = '';\n\n  for (let i = 0; i < str.length; i++) {\n    const char = str[i];\n\n    if ((char >= '\\u0300' && char <= '\\u036f') || (char >= '\\ufe20' && char <= '\\ufe23')) {\n      continue;\n    }\n\n    result += deburrMap.get(char) ?? char;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/string/escape.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { escape } from './escape';\nimport { unescape } from './unescape';\n\ndescribe('escape', () => {\n  let escaped = '&amp;&lt;&gt;&quot;&#39;/';\n  let unescaped = '&<>\"\\'/';\n\n  escaped += escaped;\n  unescaped += unescaped;\n\n  it('should escape values', () => {\n    expect(escape(unescaped)).toBe(escaped);\n  });\n\n  it('should handle strings with nothing to escape', () => {\n    expect(escape('abc')).toBe('abc');\n  });\n\n  it('should escape the same characters unescaped by `_.unescape`', () => {\n    expect(escape(unescape(escaped))).toBe(escaped);\n  });\n\n  ['`', '/'].forEach(chr => {\n    it(`should not escape the \"${chr}\" character`, () => {\n      expect(escape(chr)).toBe(chr);\n    });\n  });\n});\n"
  },
  {
    "path": "src/string/escape.ts",
    "content": "const htmlEscapes: Record<string, string> = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n};\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `str` to their corresponding HTML entities.\n * For example, \"<\" becomes \"&lt;\".\n *\n * @param {string} str  The string to escape.\n * @returns {string} Returns the escaped string.\n *\n * @example\n * escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'\n * escape('This is a \"quote\"'); // returns 'This is a &quot;quote&quot;'\n * escape(\"This is a 'quote'\"); // returns 'This is a &#39;quote&#39;'\n * escape('This is a & symbol'); // returns 'This is a &amp; symbol'\n */\nexport function escape(str: string): string {\n  return str.replace(/[&<>\"']/g, match => htmlEscapes[match]);\n}\n"
  },
  {
    "path": "src/string/escapeRegExp.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { escapeRegExp } from './escapeRegExp';\n\ndescribe('escapeRegExp', () => {\n  const escaped = '\\\\^\\\\$\\\\.\\\\*\\\\+\\\\?\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}\\\\|\\\\\\\\';\n  const unescaped = '^$.*+?()[]{}|\\\\';\n\n  it('should escape values', () => {\n    expect(escapeRegExp(unescaped + unescaped)).toBe(escaped + escaped);\n  });\n\n  it('should handle strings with nothing to escape', () => {\n    expect(escapeRegExp('abc')).toBe('abc');\n  });\n});\n"
  },
  {
    "path": "src/string/escapeRegExp.ts",
    "content": "/**\n * Escapes the RegExp special characters \"^\", \"$\", \"\\\\\", \".\", \"*\", \"+\", \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `str`.\n *\n * @param {string} str The string to escape.\n * @returns {string} Returns the escaped string.\n *\n * @example\n * import { escapeRegExp } from 'es-toolkit/string';\n *\n * escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\\[es-toolkit\\]\\(https://es-toolkit\\.dev/\\)'\n */\nexport function escapeRegExp(str: string): string {\n  return str.replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&');\n}\n"
  },
  {
    "path": "src/string/index.ts",
    "content": "export { camelCase } from './camelCase.ts';\nexport { capitalize } from './capitalize.ts';\nexport { constantCase } from './constantCase.ts';\nexport { deburr } from './deburr.ts';\nexport { escape } from './escape.ts';\nexport { escapeRegExp } from './escapeRegExp.ts';\nexport { kebabCase } from './kebabCase.ts';\nexport { lowerCase } from './lowerCase.ts';\nexport { lowerFirst } from './lowerFirst.ts';\nexport { pad } from './pad.ts';\nexport { pascalCase } from './pascalCase.ts';\nexport { reverseString } from './reverseString.ts';\nexport { snakeCase } from './snakeCase.ts';\nexport { startCase } from './startCase.ts';\nexport { trim } from './trim.ts';\nexport { trimEnd } from './trimEnd.ts';\nexport { trimStart } from './trimStart.ts';\nexport { unescape } from './unescape.ts';\nexport { upperCase } from './upperCase.ts';\nexport { upperFirst } from './upperFirst.ts';\nexport { words } from './words.ts';\n"
  },
  {
    "path": "src/string/kebabCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { kebabCase } from './kebabCase';\n\ndescribe('kebabCase', () => {\n  it('should change camel case to kebab case', () => {\n    expect(kebabCase('camelCase')).toEqual('camel-case');\n  });\n\n  it('should change space to dash', () => {\n    expect(kebabCase('some whitespace')).toEqual('some-whitespace');\n  });\n\n  it('should change hyphen to dash', () => {\n    expect(kebabCase('hyphen-text')).toEqual('hyphen-text');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(kebabCase('HTTPRequest')).toEqual('http-request');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(kebabCase('    leading and trailing whitespace    ')).toEqual('leading-and-trailing-whitespace');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(kebabCase('special@characters!')).toEqual('special-characters');\n  });\n\n  it('should handle strings that are already in snake_case', () => {\n    expect(kebabCase('snake_case')).toEqual('snake-case');\n  });\n\n  it('should work with an empty string', () => {\n    expect(kebabCase('')).toEqual('');\n  });\n\n  it('should work with an leading and trailing underscores', () => {\n    expect(kebabCase('__foo_bar___')).toEqual('foo-bar');\n  });\n\n  it('should work with screaming snake case', () => {\n    expect(kebabCase('FOO_BAR')).toEqual('foo-bar');\n  });\n\n  it('should work with capitalized words', () => {\n    expect(kebabCase('Foo Bar')).toEqual('foo-bar');\n  });\n});\n"
  },
  {
    "path": "src/string/kebabCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts a string to kebab case.\n *\n * Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.\n *\n * @param {string} str - The string that is to be changed to kebab case.\n * @returns {string} - The converted string to kebab case.\n *\n * @example\n * const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'\n * const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'\n * const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'\n * const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'\n */\n\nexport function kebabCase(str: string): string {\n  const words = getWords(str);\n  return words.map(word => word.toLowerCase()).join('-');\n}\n"
  },
  {
    "path": "src/string/lowerCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { lowerCase } from './lowerCase';\n\ndescribe('lowerCase', () => {\n  it('should change camel case to lower case', () => {\n    expect(lowerCase('camelCase')).toEqual('camel case');\n  });\n\n  it('should change space to space', () => {\n    expect(lowerCase('some whitespace')).toEqual('some whitespace');\n  });\n\n  it('should change hyphen to space', () => {\n    expect(lowerCase('hyphen-text')).toEqual('hyphen text');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(lowerCase('HTTPRequest')).toEqual('http request');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(lowerCase('    leading and trailing whitespace    ')).toEqual('leading and trailing whitespace');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(lowerCase('special@characters!')).toEqual('special characters');\n  });\n\n  it('should handle strings that are already in lower case', () => {\n    expect(lowerCase('lower_case')).toEqual('lower case');\n  });\n\n  it('should work with an empty string', () => {\n    expect(lowerCase('')).toEqual('');\n  });\n\n  it('should work with screaming snake case', () => {\n    expect(lowerCase('FOO_BAR')).toEqual('foo bar');\n  });\n});\n"
  },
  {
    "path": "src/string/lowerCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts a string to lower case.\n *\n * Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.\n *\n * @param {string} str - The string that is to be changed to lower case.\n * @returns {string} - The converted string to lower case.\n *\n * @example\n * const convertedStr1 = lowerCase('camelCase') // returns 'camel case'\n * const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'\n * const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'\n * const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'\n */\nexport function lowerCase(str: string): string {\n  const words = getWords(str);\n  return words.map(word => word.toLowerCase()).join(' ');\n}\n"
  },
  {
    "path": "src/string/lowerFirst.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { lowerFirst } from './lowerFirst';\n\ndescribe('lowerFirst', () => {\n  it('should change first character of upper case to lower case', () => {\n    expect(lowerFirst('Fred')).toEqual('fred');\n  });\n\n  it('should keep first character of lower case unaltered', () => {\n    expect(lowerFirst('fred')).toEqual('fred');\n  });\n\n  it('should keep all other characters unaltered', () => {\n    expect(lowerFirst('FRED')).toEqual('fRED');\n  });\n\n  it('should work with an empty string', () => {\n    expect(lowerFirst('')).toEqual('');\n  });\n\n  it('should keep white space and not alter string', () => {\n    expect(lowerFirst('  fred')).toEqual('  fred');\n  });\n});\n"
  },
  {
    "path": "src/string/lowerFirst.ts",
    "content": "/**\n * Converts the first character of string to lower case.\n *\n * @param {string} str - The string that is to be changed\n * @returns {string} - The converted string.\n *\n * @example\n * const convertedStr1 = lowerCase('fred') // returns 'fred'\n * const convertedStr2 = lowerCase('Fred') // returns 'fred'\n * const convertedStr3 = lowerCase('FRED') // returns 'fRED'\n */\nexport function lowerFirst(str: string): string {\n  return str.substring(0, 1).toLowerCase() + str.substring(1);\n}\n"
  },
  {
    "path": "src/string/pad.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pad } from './pad';\n\ndescribe('pad', () => {\n  it('should pad a string on the left and right sides if it is shorter than the length', () => {\n    expect(pad('abc', 8)).toBe('  abc   ');\n  });\n\n  it('should pad a string on the left and right sides with custom characters', () => {\n    expect(pad('abc', 8, '_-')).toBe('_-abc_-_');\n  });\n\n  it('should not pad a string if it has the same length', () => {\n    expect(pad('abc', 3)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is less than the string length', () => {\n    expect(pad('abc', 2)).toBe('abc');\n    expect(pad('abc', 0)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not a number', () => {\n    expect(pad('abc', NaN)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is not an integer', () => {\n    expect(pad('abc', 3.5)).toBe('abc');\n  });\n\n  it('should not pad a string if the length is negative', () => {\n    expect(pad('abc', -3)).toBe('abc');\n  });\n});\n"
  },
  {
    "path": "src/string/pad.ts",
    "content": "/**\n * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.\n *\n * @param {string} str - The string to pad.\n * @param {number} [length] - The length of the resulting string once padded.\n * @param {string} [chars] - The character(s) to use for padding.\n * @returns {string} - The padded string, or the original string if padding is not required.\n *\n * @example\n * const result1 = pad('abc', 8);         // result will be '  abc   '\n * const result2 = pad('abc', 8, '_-');   // result will be '_-abc_-_'\n * const result3 = pad('abc', 3);         // result will be 'abc'\n * const result4 = pad('abc', 2);         // result will be 'abc'\n *\n */\nexport function pad(str: string, length: number, chars = ' '): string {\n  return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);\n}\n"
  },
  {
    "path": "src/string/pascalCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { pascalCase } from './pascalCase';\n\ndescribe('pascalCase', () => {\n  it('should change space to pascal case', () => {\n    expect(pascalCase('some whitespace')).toEqual('SomeWhitespace');\n  });\n\n  it('should change hyphen to pascal case', () => {\n    expect(pascalCase('hyphen-text')).toEqual('HyphenText');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(pascalCase('HTTPRequest')).toEqual('HttpRequest');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(pascalCase('    leading and trailing whitespace    ')).toEqual('LeadingAndTrailingWhitespace');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(pascalCase('special@characters!')).toEqual('SpecialCharacters');\n  });\n\n  it('should handle strings that are already in PascalCase', () => {\n    expect(pascalCase('PascalCase')).toEqual('PascalCase');\n  });\n\n  it('should work with an empty string', () => {\n    expect(pascalCase('')).toEqual('');\n  });\n\n  it('should work with screaming camel case', () => {\n    expect(pascalCase('FOO_BAR')).toEqual('FooBar');\n  });\n});\n"
  },
  {
    "path": "src/string/pascalCase.ts",
    "content": "import { capitalize } from './capitalize.ts';\nimport { words as getWords } from './words.ts';\n\n/**\n * Converts a string to Pascal case.\n *\n * Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.\n *\n * @param {string} str - The string that is to be changed to pascal case.\n * @returns {string} - The converted string to Pascal case.\n *\n * @example\n * const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'\n * const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'\n * const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'\n * const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'\n */\nexport function pascalCase(str: string): string {\n  const words = getWords(str);\n  return words.map(word => capitalize(word)).join('');\n}\n"
  },
  {
    "path": "src/string/reverseString.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { reverseString } from './reverseString';\n\ndescribe('reverseString', () => {\n  it('should reverse a simple string', () => {\n    expect(reverseString('hello')).toBe('olleh');\n  });\n\n  it('should reverse a string with spaces', () => {\n    expect(reverseString('foo bar')).toBe('rab oof');\n  });\n\n  it('should reverse a string with Unicode characters', () => {\n    expect(reverseString('foo 😄 bar')).toBe('rab 😄 oof');\n    expect(reverseString('foo 𝌆 bar')).toBe('rab 𝌆 oof');\n  });\n\n  it('should reverse an empty string', () => {\n    expect(reverseString('')).toBe('');\n  });\n\n  it('should reverse a numeric string', () => {\n    expect(reverseString('12345')).toBe('54321');\n  });\n});\n"
  },
  {
    "path": "src/string/reverseString.ts",
    "content": "/**\n * Reverses a given string.\n *\n * This function takes a string as input and returns a new string that is the reverse of the input.\n *\n * @param {string} value - The string that is to be reversed.\n * @returns {string} - The reversed string.\n *\n * @example\n * const reversedStr1 = reverseString('hello') // returns 'olleh'\n * const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'\n * const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'\n */\nexport function reverseString(value: string): string {\n  return [...value].reverse().join('');\n}\n"
  },
  {
    "path": "src/string/snakeCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { snakeCase } from './snakeCase';\n\ndescribe('snakeCase', () => {\n  it('should change camel case to snake case', () => {\n    expect(snakeCase('camelCase')).toEqual('camel_case');\n  });\n\n  it('should change space to underscore', () => {\n    expect(snakeCase('some whitespace')).toEqual('some_whitespace');\n  });\n\n  it('should change hyphen to underscore', () => {\n    expect(snakeCase('hyphen-text')).toEqual('hyphen_text');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(snakeCase('HTTPRequest')).toEqual('http_request');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(snakeCase('    leading and trailing whitespace    ')).toEqual('leading_and_trailing_whitespace');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(snakeCase('special@characters!')).toEqual('special_characters');\n  });\n\n  it('should handle strings that are already in snake_case', () => {\n    expect(snakeCase('snake_case')).toEqual('snake_case');\n  });\n\n  it('should work with an empty string', () => {\n    expect(snakeCase('')).toEqual('');\n  });\n\n  it('should work with screaming snake case', () => {\n    expect(snakeCase('FOO_BAR')).toEqual('foo_bar');\n  });\n});\n"
  },
  {
    "path": "src/string/snakeCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts a string to snake case.\n *\n * Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.\n *\n * @param {string} str - The string that is to be changed to snake case.\n * @returns {string} - The converted string to snake case.\n *\n * @example\n * const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'\n * const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'\n * const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'\n * const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'\n */\n\nexport function snakeCase(str: string): string {\n  const words = getWords(str);\n  return words.map(word => word.toLowerCase()).join('_');\n}\n"
  },
  {
    "path": "src/string/startCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { startCase } from './startCase';\n\ndescribe('startCase', function () {\n  it('should capitalize each word', function () {\n    expect(startCase('--foo-bar--')).toBe('Foo Bar');\n    expect(startCase('fooBar')).toBe('Foo Bar');\n    expect(startCase('__FOO_BAR__')).toBe('Foo Bar');\n  });\n\n  it('should handle compound words', function () {\n    expect(startCase('createElement')).toBe('Create Element');\n    expect(startCase('iPhone')).toBe('I Phone');\n    expect(startCase('XMLHttpRequest')).toBe('Xml Http Request');\n  });\n\n  it('should handle various delimiters', function () {\n    expect(startCase('_abc_123_def')).toBe('Abc 123 Def');\n    expect(startCase('__abc__123__def__')).toBe('Abc 123 Def');\n    expect(startCase('ABC-DEF')).toBe('Abc Def');\n    expect(startCase('ABC DEF')).toBe('Abc Def');\n  });\n\n  it('should handle empty strings', function () {\n    expect(startCase('')).toBe('');\n  });\n\n  it('should handle strings with only delimiters', function () {\n    expect(startCase('_-_-_-_')).toBe('');\n  });\n\n  it('should work with numbers', function () {\n    expect(startCase('12abc 12ABC')).toBe('12 Abc 12 Abc');\n  });\n\n  it('should handle consecutive uppercase letters', function () {\n    expect(startCase('ABC')).toBe('Abc');\n    expect(startCase('ABCdef')).toBe('Ab Cdef');\n  });\n\n  it('should handle combinations of numbers and letters', function () {\n    expect(startCase('123ABC')).toBe('123 Abc');\n    expect(startCase('a1B2c3')).toBe('A 1 B 2 C 3');\n  });\n\n  it('should handle special characters', function () {\n    expect(startCase('foo@bar')).toBe('Foo Bar');\n    expect(startCase('test*case')).toBe('Test Case');\n  });\n\n  it('should handle long strings', function () {\n    expect(startCase('thisIsAVeryLongStringWithManyWordsAndNumbers123')).toBe(\n      'This Is A Very Long String With Many Words And Numbers 123'\n    );\n  });\n\n  it('should handle whitespace characters', function () {\n    expect(startCase('  foo  bar  ')).toBe('Foo Bar');\n    expect(startCase('\\tfoo\\nbar')).toBe('Foo Bar');\n  });\n\n  it('should convert the non-first characters to lowercase', function () {\n    expect(startCase('FOO BAR')).toBe('Foo Bar');\n    expect(startCase('FOO BAR BAZ')).toBe('Foo Bar Baz');\n  });\n\n  it('should correctly handle accented letters', () => {\n    expect(startCase('lunedì 18 set')).toBe('Lunedì 18 Set');\n  });\n});\n"
  },
  {
    "path": "src/string/startCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.\n *\n * Start case is the naming convention in which each word is written with an initial capital letter.\n * @param {string} str - The string to convert.\n * @returns {string} The converted string.\n *\n * @example\n * const result1 = startCase('hello world');  // result will be 'Hello World'\n * const result2 = startCase('HELLO WORLD');  // result will be 'Hello World'\n * const result3 = startCase('hello-world');  // result will be 'Hello World'\n * const result4 = startCase('hello_world');  // result will be 'Hello World'\n */\nexport function startCase(str: string): string {\n  const words = getWords(str.trim());\n  let result = '';\n  for (let i = 0; i < words.length; i++) {\n    const word = words[i];\n    if (result) {\n      result += ' ';\n    }\n\n    result += word[0].toUpperCase() + word.slice(1).toLowerCase();\n  }\n  return result;\n}\n"
  },
  {
    "path": "src/string/trim.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { trim } from './trim.ts';\n\ndescribe('trim', () => {\n  it('should return the string without the double quotes', () => {\n    expect(trim('\"hello, world!\"', '\"')).toEqual('hello, world!');\n  });\n\n  it('should return the string without special characters', () => {\n    expect(trim('!@#$%^&*wow%#$', ['!', '@', '#', '$', '%', '^', '&', '*'])).toEqual('wow');\n  });\n\n  it('should return the string unchanged when no matching characters are found', () => {\n    expect(trim('hello', 'x')).toEqual('hello');\n  });\n\n  it('should remove all occurrences of a single character', () => {\n    expect(trim('banana', 'a')).toEqual('banan');\n  });\n\n  it('should remove all occurrences of multiple characters', () => {\n    expect(trim('abracadabra', ['a', 'b'])).toEqual('racadabr');\n  });\n\n  it('should handle an empty string', () => {\n    expect(trim('', 'a')).toEqual('');\n  });\n\n  it('should remove spaces when specified', () => {\n    expect(trim('hello world', ' ')).toEqual('hello world');\n  });\n\n  it('should handle a case where the string is already trimmed', () => {\n    expect(trim('alreadyTrimmed', 'x')).toEqual('alreadyTrimmed');\n  });\n\n  it('should return an empty string when all characters are removed', () => {\n    expect(trim('aaaaa', 'a')).toEqual('');\n  });\n\n  it('should remove numbers from a string', () => {\n    expect(trim('123abc456', ['1', '2', '3', '4', '5', '6'])).toEqual('abc');\n  });\n\n  it('should trim the string without giving the second parameter, which defaults to whitespace', () => {\n    expect(trim('  hello world  ')).toEqual('hello world');\n  });\n});\n"
  },
  {
    "path": "src/string/trim.ts",
    "content": "import { trimEnd } from './trimEnd.ts';\nimport { trimStart } from './trimStart.ts';\n\n/**\n * Removes leading and trailing whitespace or specified characters from a string.\n *\n * @param {string} str - The string from which characters will be trimmed.\n * @param {string | string[]} chars - The character(s) to remove from the string. Can be a single character or an array of characters.\n * @returns {string} - The resulting string after the specified characters have been removed.\n *\n * @example\n * trim(\"  hello  \"); // \"hello\"\n * trim(\"--hello--\", \"-\"); // \"hello\"\n * trim(\"##hello##\", [\"#\", \"o\"]); // \"hell\"\n */\nexport function trim(str: string, chars?: string | string[]): string {\n  if (chars === undefined) {\n    return str.trim();\n  }\n\n  return trimStart(trimEnd(str, chars), chars);\n}\n"
  },
  {
    "path": "src/string/trimEnd.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { trimEnd } from './trimEnd.ts';\n\ndescribe('trimEnd', () => {\n  it('should remove trailing characters from the string', () => {\n    expect(trimEnd('hello---', '-')).toEqual('hello');\n  });\n\n  it('should remove trailing characters when multiple characters are provided', () => {\n    expect(trimEnd('123000', '0')).toEqual('123');\n  });\n\n  it('should return the string unchanged when there are no trailing characters to remove', () => {\n    expect(trimEnd('hello', 'x')).toEqual('hello');\n  });\n\n  it('should remove trailing occurrences of a single character', () => {\n    expect(trimEnd('abcabcabc', 'c')).toEqual('abcabcab');\n  });\n\n  it('should handle an empty string', () => {\n    expect(trimEnd('', 'x')).toEqual('');\n  });\n\n  it('should remove trailing spaces when specified', () => {\n    expect(trimEnd('hello world   ', ' ')).toEqual('hello world');\n  });\n\n  it('should handle a case where the string is already trimmed', () => {\n    expect(trimEnd('trimmed', 'x')).toEqual('trimmed');\n  });\n\n  it('should return an empty string when all characters are removed', () => {\n    expect(trimEnd('xxxxx', 'x')).toEqual('');\n  });\n\n  it('should remove numbers from the end of a string', () => {\n    expect(trimEnd('abc123456', '6')).toEqual('abc12345');\n  });\n\n  it('should handle cases where multiple trailing characters need removal', () => {\n    expect(trimEnd('abc123abc123abc', 'c')).toEqual('abc123abc123ab');\n  });\n\n  it('should trim the string without giving the second parameter, which defaults to whitespace', () => {\n    expect(trimEnd('  hello world  ')).toEqual('  hello world');\n  });\n\n  it('should remove trailing characters when chars is an array', () => {\n    expect(trimEnd('hello---', ['-', 'o'])).toEqual('hell');\n  });\n\n  it('should remove trailing characters from the string when multiple characters are provided in an array', () => {\n    expect(trimEnd('123000', ['0', '3'])).toEqual('12');\n  });\n\n  it('should return the string unchanged when none of the trailing characters in the array match', () => {\n    expect(trimEnd('hello', ['x', 'y', 'z'])).toEqual('hello');\n  });\n\n  it('should handle cases where multiple trailing characters in the array need removal', () => {\n    expect(trimEnd('abcabcabc', ['c', 'b'])).toEqual('abcabca');\n  });\n\n  it('should throw an error when chars is a string with multiple characters', () => {\n    expect(() => trimEnd('hello', 'ab')).toThrow(`The 'chars' parameter should be a single character string.`);\n  });\n});\n"
  },
  {
    "path": "src/string/trimEnd.ts",
    "content": "/**\n * Removes trailing whitespace or specified characters from a string.\n *\n * If `chars` is a string, it should be a single character. To trim a string with multiple characters,\n * provide an array instead.\n *\n * @param {string} str - The string from which trailing characters will be trimmed.\n * @param {string | string[]} chars - The character(s) to remove from the end of the string.\n * @returns {string} - The resulting string after the specified trailing character has been removed.\n *\n * @example\n * const trimmedStr1 = trimEnd('hello---', '-') // returns 'hello'\n * const trimmedStr2 = trimEnd('123000', '0') // returns '123'\n * const trimmedStr3 = trimEnd('abcabcabc', 'c') // returns 'abcabcab'\n * const trimmedStr4 = trimEnd('trimmedxxx', 'x') // returns 'trimmed'\n */\nexport function trimEnd(str: string, chars?: string | string[]): string {\n  if (chars === undefined) {\n    return str.trimEnd();\n  }\n\n  let endIndex = str.length;\n\n  switch (typeof chars) {\n    case 'string': {\n      if (chars.length !== 1) {\n        throw new Error(`The 'chars' parameter should be a single character string.`);\n      }\n\n      while (endIndex > 0 && str[endIndex - 1] === chars) {\n        endIndex--;\n      }\n      break;\n    }\n    case 'object': {\n      while (endIndex > 0 && chars.includes(str[endIndex - 1])) {\n        endIndex--;\n      }\n    }\n  }\n\n  return str.substring(0, endIndex);\n}\n"
  },
  {
    "path": "src/string/trimStart.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { trimStart } from './trimStart.ts';\n\ndescribe('trimStart', () => {\n  it('should remove leading characters from the string', () => {\n    expect(trimStart('---hello', '-')).toEqual('hello');\n  });\n\n  it('should remove leading zeros from the string', () => {\n    expect(trimStart('000123', '0')).toEqual('123');\n  });\n\n  it('should return the string unchanged when there are no leading characters to remove', () => {\n    expect(trimStart('hello', 'x')).toEqual('hello');\n  });\n\n  it('should remove leading occurrences of a single character', () => {\n    expect(trimStart('abcabcabc', 'a')).toEqual('bcabcabc');\n  });\n\n  it('should handle an empty string', () => {\n    expect(trimStart('', 'x')).toEqual('');\n  });\n\n  it('should remove leading spaces when specified', () => {\n    expect(trimStart('   hello world', ' ')).toEqual('hello world');\n  });\n\n  it('should handle a case where the string is already trimmed', () => {\n    expect(trimStart('trimmed', 'x')).toEqual('trimmed');\n  });\n\n  it('should return an empty string when all characters are removed', () => {\n    expect(trimStart('xxxxx', 'x')).toEqual('');\n  });\n\n  it('should remove numbers from the start of a string', () => {\n    expect(trimStart('123456abc', '1')).toEqual('23456abc');\n  });\n\n  it('should handle cases where multiple leading characters need removal', () => {\n    expect(trimStart('aaaabbbcccc', 'a')).toEqual('bbbcccc');\n  });\n\n  it('should trim the string without giving the second parameter, which defaults to whitespace', () => {\n    expect(trimStart('  hello world  ')).toEqual('hello world  ');\n  });\n\n  it('should remove leading characters when chars is an array', () => {\n    expect(trimStart('---hello', ['-', 'h'])).toEqual('ello');\n  });\n\n  it('should remove leading characters from the string when multiple characters are provided in an array', () => {\n    expect(trimStart('000123', ['0', '1'])).toEqual('23');\n  });\n\n  it('should return the string unchanged when none of the leading characters in the array match', () => {\n    expect(trimStart('hello', ['x', 'y', 'z'])).toEqual('hello');\n  });\n\n  it('should handle cases where multiple leading characters in the array need removal', () => {\n    expect(trimStart('abcabcabc', ['a', 'b'])).toEqual('cabcabc');\n  });\n\n  it('should remove leading spaces and other characters when specified in an array', () => {\n    expect(trimStart('   hello world', [' ', 'h'])).toEqual('ello world');\n  });\n});\n"
  },
  {
    "path": "src/string/trimStart.ts",
    "content": "/**\n * Removes leading whitespace or specified characters from a string.\n *\n * If `chars` is a string, it should be a single character. To trim a string with multiple characters,\n * provide an array instead.\n *\n * @param {string} str - The string from which leading characters will be trimmed.\n * @param {string | string[]} chars - The character(s) to remove from the start of the string.\n * @returns {string} - The resulting string after the specified leading character has been removed.\n *\n * @example\n * const trimmedStr1 = trimStart('---hello', '-') // returns 'hello'\n * const trimmedStr2 = trimStart('000123', '0') // returns '123'\n * const trimmedStr3 = trimStart('abcabcabc', 'a') // returns 'bcabcabc'\n * const trimmedStr4 = trimStart('xxxtrimmed', 'x') // returns 'trimmed'\n */\nexport function trimStart(str: string, chars?: string | string[]): string {\n  if (chars === undefined) {\n    return str.trimStart();\n  }\n\n  let startIndex = 0;\n\n  switch (typeof chars) {\n    case 'string': {\n      while (startIndex < str.length && str[startIndex] === chars) {\n        startIndex++;\n      }\n      break;\n    }\n    case 'object': {\n      while (startIndex < str.length && chars.includes(str[startIndex])) {\n        startIndex++;\n      }\n    }\n  }\n\n  return str.substring(startIndex);\n}\n"
  },
  {
    "path": "src/string/unescape.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { escape } from './escape';\nimport { unescape } from './unescape';\n\ndescribe('unescape', () => {\n  let escaped = '&amp;&lt;&gt;&quot;&#39;/';\n  let unescaped = '&<>\"\\'/';\n\n  escaped += escaped;\n  unescaped += unescaped;\n\n  it('should unescape entities in order', () => {\n    expect(unescape('&amp;lt;')).toBe('&lt;');\n  });\n\n  it('should unescape the proper entities', () => {\n    expect(unescape(escaped)).toBe(unescaped);\n  });\n\n  it('should handle strings with nothing to unescape', () => {\n    expect(unescape('abc')).toBe('abc');\n  });\n\n  it('should unescape the same characters escaped by `_.escape`', () => {\n    expect(unescape(escape(unescaped))).toBe(unescaped);\n  });\n\n  it('should handle leading zeros in html entities', () => {\n    expect(unescape('&#39;')).toBe(\"'\");\n    expect(unescape('&#039;')).toBe(\"'\");\n    expect(unescape('&#000039;')).toBe(\"'\");\n  });\n\n  ['&#96;', '&#x2F;'].forEach(entity => {\n    it(`should not unescape the \"${entity}\" entity`, () => {\n      expect(unescape(entity)).toBe(entity);\n    });\n  });\n});\n"
  },
  {
    "path": "src/string/unescape.ts",
    "content": "const htmlUnescapes: Record<string, string> = {\n  '&amp;': '&',\n  '&lt;': '<',\n  '&gt;': '>',\n  '&quot;': '\"',\n  '&#39;': \"'\",\n};\n\n/**\n * Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.\n * It is the inverse of `escape`.\n *\n * @param {string} str The string to unescape.\n * @returns {string} Returns the unescaped string.\n *\n * @example\n * unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'\n * unescape('This is a &quot;quote&quot;'); // returns 'This is a \"quote\"'\n * unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''\n * unescape('This is a &amp; symbol'); // returns 'This is a & symbol'\n */\nexport function unescape(str: string): string {\n  return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, match => htmlUnescapes[match] || \"'\");\n}\n"
  },
  {
    "path": "src/string/upperCase.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { upperCase } from './upperCase';\n\ndescribe('upperCase', () => {\n  it('should change camel case to upper case', () => {\n    expect(upperCase('camelCase')).toEqual('CAMEL CASE');\n  });\n\n  it('should change space to space', () => {\n    expect(upperCase('some whitespace')).toEqual('SOME WHITESPACE');\n  });\n\n  it('should change hyphen to space', () => {\n    expect(upperCase('hyphen-text')).toEqual('HYPHEN TEXT');\n  });\n\n  it('should change Acronyms to small letter', () => {\n    expect(upperCase('HTTPRequest')).toEqual('HTTP REQUEST');\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    expect(upperCase('    leading and trailing whitespace    ')).toEqual('LEADING AND TRAILING WHITESPACE');\n  });\n\n  it('should handle special characters correctly', () => {\n    expect(upperCase('special@characters!')).toEqual('SPECIAL CHARACTERS');\n  });\n\n  it('should handle strings that are already in upper case', () => {\n    expect(upperCase('upper_case')).toEqual('UPPER CASE');\n  });\n\n  it('should work with an empty string', () => {\n    expect(upperCase('')).toEqual('');\n  });\n\n  it('should work with screaming snake case', () => {\n    expect(upperCase('FOO_BAR')).toEqual('FOO BAR');\n  });\n});\n"
  },
  {
    "path": "src/string/upperCase.ts",
    "content": "import { words as getWords } from './words.ts';\n\n/**\n * Converts a string to upper case.\n *\n * Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.\n *\n * @param {string} str - The string that is to be changed to upper case.\n * @returns {string} - The converted string to upper case.\n *\n * @example\n * const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'\n * const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'\n * const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'\n * const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'\n */\nexport function upperCase(str: string): string {\n  const words = getWords(str);\n\n  let result = '';\n\n  for (let i = 0; i < words.length; i++) {\n    result += words[i].toUpperCase();\n    if (i < words.length - 1) {\n      result += ' ';\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "src/string/upperFirst.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { upperFirst } from './upperFirst';\n\ndescribe('upperFirst', () => {\n  it('should change first character of lower case to upper case', () => {\n    expect(upperFirst('fred')).toEqual('Fred');\n  });\n\n  it('should keep first character of upper case unaltered', () => {\n    expect(upperFirst('Fred')).toEqual('Fred');\n  });\n\n  it('should keep first character of all upper case unaltered', () => {\n    expect(upperFirst('FRED')).toEqual('FRED');\n  });\n\n  it('should work with an empty string', () => {\n    expect(upperFirst('')).toEqual('');\n  });\n\n  it('should keep white space and not alter string', () => {\n    expect(upperFirst('  fred')).toEqual('  fred');\n  });\n});\n"
  },
  {
    "path": "src/string/upperFirst.ts",
    "content": "/**\n * Converts the first character of string to upper case.\n *\n * @param {string} str - The string that is to be changed\n * @returns {string} - The converted string.\n *\n * @example\n * const convertedStr1 = upperFirst('fred') // returns 'Fred'\n * const convertedStr2 = upperFirst('Fred') // returns 'Fred'\n * const convertedStr3 = upperFirst('FRED') // returns 'FRED'\n */\nexport function upperFirst(str: string): string {\n  return str.substring(0, 1).toUpperCase() + str.substring(1);\n}\n"
  },
  {
    "path": "src/string/words.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { words } from './words';\n\ndescribe('words', () => {\n  it('splits a simple ASCII comma-separated string into words', () => {\n    const result = words('fred, barney, & pebbles');\n    expect(result).toEqual(['fred', 'barney', 'pebbles']);\n  });\n\n  it('returns an empty array when input is an empty string', () => {\n    const result = words('');\n    expect(result).toEqual([]);\n  });\n\n  it('splits a space-separated string into individual words', () => {\n    const result = words('split these words');\n    expect(result).toEqual(['split', 'these', 'words']);\n  });\n\n  it('splits Unicode emojis and special characters as separate words', () => {\n    const result = words('example🚀with✨emojis💡and🔍special🌟characters');\n    expect(result).toEqual(['example', '🚀', 'with', '✨', 'emojis', '💡', 'and', '🔍', 'special', '🌟', 'characters']);\n  });\n\n  it('should match camelCase', () => {\n    const str = 'camelCase';\n    const matches = words(str);\n    expect(matches).toEqual(['camel', 'Case']);\n  });\n\n  it('should match snake_case', () => {\n    const str = 'snake_case';\n    const matches = words(str);\n    expect(matches).toEqual(['snake', 'case']);\n  });\n\n  it('should match kebab-case', () => {\n    const str = 'kebab-case';\n    const matches = words(str);\n    expect(matches).toEqual(['kebab', 'case']);\n  });\n\n  it('should handle mixed formats', () => {\n    const str = 'camelCase_snake_case-kebabCase';\n    const matches = words(str);\n    expect(matches).toEqual(['camel', 'Case', 'snake', 'case', 'kebab', 'Case']);\n  });\n\n  it('should match acronyms', () => {\n    const str = 'HTTPRequest';\n    const matches = words(str);\n    expect(matches).toEqual(['HTTP', 'Request']);\n  });\n\n  it('should match special characters', () => {\n    const str = 'special_characters@123';\n    const matches = words(str);\n    expect(matches).toEqual(['special', 'characters', '123']);\n  });\n\n  it('should handle leading and trailing whitespace', () => {\n    const str = '  leading_and_trailing_whitespace  ';\n    const matches = words(str);\n    expect(matches).toEqual(['leading', 'and', 'trailing', 'whitespace']);\n  });\n\n  it('should handle underscores', () => {\n    const str = 'underscore_case_example';\n    const matches = words(str);\n    expect(matches).toEqual(['underscore', 'case', 'example']);\n  });\n\n  it('should handle single character words', () => {\n    const str = 'aB';\n    const matches = words(str);\n    expect(matches).toEqual(['a', 'B']);\n  });\n\n  it('should work with hyphens', () => {\n    expect(words('--FOO-BAR--')).toEqual(['FOO', 'BAR']);\n  });\n\n  it('should work with numbers', () => {\n    expect(words('foo2bar')).toEqual(['foo', '2', 'bar']);\n  });\n\n  it('should match emojis', () => {\n    expect(words('camelCaseHTTPRequest🚀')).toEqual(['camel', 'Case', 'HTTP', 'Request', '🚀']);\n  });\n\n  it('should match accented letters', () => {\n    expect(words('Lunedì 18 Set')).toEqual(['Lunedì', '18', 'Set']);\n  });\n});\n"
  },
  {
    "path": "src/string/words.ts",
    "content": "/**\n * Regular expression pattern to split strings into words for various case conversions\n *\n * This pattern matches sequences of characters in a string, considering the following cases:\n * - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n * - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n * - Single uppercase letters\n * - Sequences of digits\n * - Emojis and other Unicode characters\n *\n * The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n * a consistent format like snake case. It also supports emojis and other Unicode characters.\n *\n * @example\n * const matches = 'camelCaseHTTPRequest🚀'.match(CASE_SPLIT_PATTERN);\n * // matches: ['camel', 'Case', 'HTTP', 'Request', '🚀']\n */\nexport const CASE_SPLIT_PATTERN =\n  /\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+/gu;\n\n/**\n * Splits `string` into an array of its words, treating spaces and punctuation marks as separators.\n *\n * @param {string} str The string to inspect.\n * @param {RegExp | string} [pattern] The pattern to match words.\n * @returns {string[]} Returns the words of `string`.\n *\n * @example\n * words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * words('camelCaseHTTPRequest🚀');\n * // => ['camel', 'Case', 'HTTP', 'Request', '🚀']\n *\n * words('Lunedì 18 Set')\n * // => ['Lunedì', '18', 'Set']\n */\nexport function words(str: string): string[] {\n  return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);\n}\n"
  },
  {
    "path": "src/util/attempt.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { attempt } from './attempt';\nimport { delay } from '../promise';\n\ndescribe('attempt', () => {\n  it('should return the result of the function', () => {\n    expect(attempt(() => 1)).toEqual([null, 1]);\n  });\n\n  it('should return the error of the function', () => {\n    expect(\n      attempt(() => {\n        throw new Error('test');\n      })\n    ).toEqual([new Error('test'), null]);\n  });\n\n  it('should return the result of the promise', async () => {\n    const [error, result] = attempt(async () => 1);\n    expect(error).toBeNull();\n    expect(await result).toBe(1);\n  });\n\n  it('should return the result of the promise that throws an error', async () => {\n    const [error, result] = attempt(async () => {\n      await delay(100);\n      throw new Error('test');\n    });\n\n    expect(error).toBeNull();\n\n    try {\n      await result;\n    } catch (tryError) {\n      expect(tryError).toBeInstanceOf(Error);\n      expect(error).toBeNull();\n    }\n  });\n});\n"
  },
  {
    "path": "src/util/attempt.ts",
    "content": "/**\n * Attempt to execute a function and return the result or error.\n * Returns a tuple where:\n * - On success: [null, Result] - First element is null, second is the result\n * - On error: [Error, null] - First element is the caught error, second is null\n *\n * @template {unknown} T - The type of the result of the function.\n * @template {unknown} E - The type of the error that can be thrown by the function.\n * @param {() => T} func - The function to execute.\n * @returns {[null, T] | [E, null]} A tuple containing either [null, result] or [error, null].\n *\n * @example\n * // Successful execution\n * const [error, result] = attempt(() => 42);\n * // [null, 42]\n *\n * // Failed execution\n * const [error, result] = attempt(() => {\n *   throw new Error('Something went wrong');\n * });\n * // [Error, null]\n *\n * // With type parameter\n * const [error, names] = attempt<string[]>(() => ['Alice', 'Bob']);\n * // [null, ['Alice', 'Bob']]\n *\n * @note\n * Important: This function is not suitable for async functions (functions that return a `Promise`).\n * When passing an async function, it will return `[null, Promise<Result>]`, but won't catch any\n * errors if the Promise is rejected later.\n *\n * For handling async functions, use the `attemptAsync` function instead:\n * ```\n * const [error, data] = await attemptAsync(async () => {\n *   const response = await fetch('https://api.example.com/data');\n *   return response.json();\n * });\n * ```\n */\nexport function attempt<T, E>(func: () => T): [null, T] | [E, null] {\n  try {\n    return [null, func()];\n  } catch (error) {\n    return [error as E, null];\n  }\n}\n"
  },
  {
    "path": "src/util/attemptAsync.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { attemptAsync } from './attemptAsync';\nimport { delay } from '../promise';\n\ndescribe('attemptAsync', () => {\n  it('should return the result of the async function', async () => {\n    const [error, result] = await attemptAsync(async () => 1);\n    expect(error).toBeNull();\n    expect(result).toBe(1);\n  });\n\n  it('should return the error of the async function', async () => {\n    const [error, result] = await attemptAsync(async () => {\n      throw new Error('test');\n    });\n    expect(error).toBeInstanceOf(Error);\n    expect(error instanceof Error && error.message).toBe('test');\n    expect(result).toBeNull();\n  });\n\n  it('should return the error of the async function that rejects after a delay', async () => {\n    const [error, result] = await attemptAsync(async () => {\n      await delay(100);\n      throw new Error('delayed error');\n    });\n    expect(error).toBeInstanceOf(Error);\n    expect(error instanceof Error && error.message).toBe('delayed error');\n    expect(result).toBeNull();\n  });\n\n  it('should return the result of a complex async operation', async () => {\n    const [error, result] = await attemptAsync(async () => {\n      const value1 = await Promise.resolve(10);\n      const value2 = await Promise.resolve(20);\n      return value1 + value2;\n    });\n    expect(error).toBeNull();\n    expect(result).toBe(30);\n  });\n\n  it('should work with non-Error thrown objects', async () => {\n    const [error, result] = await attemptAsync(async () => {\n      throw 'string error'; // Not an Error instance\n    });\n    expect(error).toBe('string error');\n    expect(result).toBeNull();\n  });\n});\n"
  },
  {
    "path": "src/util/attemptAsync.ts",
    "content": "/**\n * Attempt to execute an async function and return the result or error.\n * Returns a Promise that resolves to a tuple where:\n * - On success: [null, Result] - First element is null, second is the result\n * - On error: [Error, null] - First element is the caught error, second is null\n *\n * @template {unknown} T - The type of the result of the async function.\n * @template {unknown} E - The type of the error that can be thrown by the async function.\n * @param {() => Promise<T>} func - The async function to execute.\n * @returns {Promise<[null, T] | [E, null]>} A Promise that resolves to a tuple containing either [null, result] or [error, null].\n *\n * @example\n * // Successful execution\n * const [error, data] = await attemptAsync(async () => {\n *   const response = await fetch('https://api.example.com/data');\n *   return response.json();\n * });\n * // If successful: [null, { ... data ... }]\n *\n * // Failed execution\n * const [error, data] = await attemptAsync(async () => {\n *   throw new Error('Network error');\n * });\n * // [Error, null]\n *\n * // With type parameter\n * const [error, users] = await attemptAsync<User[]>(async () => {\n *   const response = await fetch('https://api.example.com/users');\n *   return response.json();\n * });\n * // users is typed as User[]\n */\nexport async function attemptAsync<T, E>(func: () => Promise<T>): Promise<[null, T] | [E, null]> {\n  try {\n    const result = await func();\n    return [null, result];\n  } catch (error) {\n    return [error as E, null];\n  }\n}\n"
  },
  {
    "path": "src/util/index.ts",
    "content": "export { attempt } from './attempt.ts';\nexport { attemptAsync } from './attemptAsync.ts';\nexport { invariant } from './invariant.ts';\nexport { invariant as assert } from './invariant.ts';\n"
  },
  {
    "path": "src/util/invariant.spec.ts",
    "content": "import { describe, expect, expectTypeOf, it } from 'vitest';\nimport { invariant } from './invariant';\n\ndescribe('invariant', () => {\n  it('should not throw an error when the condition is true', () => {\n    expect(() => invariant(true, 'This should not throw')).not.toThrow();\n\n    const value1 = 'some value';\n    expect(() =>\n      invariant(value1 !== null && value1 !== undefined, 'Value should not be null or undefined')\n    ).not.toThrow();\n\n    const value2 = null;\n    expect(() => invariant(value2 !== null && value2 !== undefined, 'Value should not be null or undefined')).toThrow(\n      'Value should not be null or undefined'\n    );\n\n    const number = 5;\n    expect(() => invariant(number > 0, 'Number must be positive')).not.toThrow();\n  });\n\n  it('should throw an error when the condition is false', () => {\n    expect(() => invariant(false, 'This should throw')).toThrow('This should throw');\n\n    const value1 = undefined;\n    expect(() => invariant(value1 !== null && value1 !== undefined, 'Value should not be null or undefined')).toThrow(\n      'Value should not be null or undefined'\n    );\n\n    const number = -1;\n    expect(() => invariant(number > 0, 'Number must be positive')).toThrow('Number must be positive');\n  });\n\n  it('should assert non-null value and treat it as string', () => {\n    const value = 'es-toolkit' as string | null;\n\n    invariant(value !== null, 'Value should not be null');\n\n    // Narrow the type.\n    expect(value.length).toBe(10);\n    expectTypeOf(value).toEqualTypeOf<string>();\n  });\n\n  it('should throw an error when the condition is false and the message is an error', () => {\n    expect(() => invariant(false, new Error('This should throw'))).toThrow('This should throw');\n  });\n\n  it('should throw a custom error when the condition is false and the message is an error', () => {\n    class CustomError extends Error {\n      constructor(message: string) {\n        super(message);\n      }\n    }\n\n    expect(() => invariant(false, new CustomError('This should throw'))).toThrow(CustomError);\n  });\n});\n"
  },
  {
    "path": "src/util/invariant.ts",
    "content": "/**\n * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.\n *\n * @param {unknown} condition - The condition to evaluate.\n * @param {string} message - The error message to throw if the condition is false.\n * @returns {void} Returns void if the condition is true.\n * @throws {Error} Throws an error if the condition is false.\n *\n * @example\n * // This call will succeed without any errors\n * invariant(true, 'This should not throw');\n *\n * // This call will fail and throw an error with the message 'This should throw'\n * invariant(false, 'This should throw');\n */\nexport function invariant(condition: unknown, message: string): asserts condition;\n\n/**\n * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided error.\n *\n * @param {unknown} condition - The condition to evaluate.\n * @param {Error} error - The error to throw if the condition is false.\n * @returns {void} Returns void if the condition is true.\n * @throws {Error} Throws an error if the condition is false.\n *\n * @example\n * // This call will succeed without any errors\n * invariant(true, new Error('This should not throw'));\n *\n * class CustomError extends Error {\n *   constructor(message: string) {\n *     super(message);\n *   }\n * }\n *\n * // This call will fail and throw an error with the message 'This should throw'\n * invariant(false, new CustomError('This should throw'));\n */\nexport function invariant(condition: unknown, error: Error): asserts condition;\n\n/**\n * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.\n *\n * @param {unknown} condition - The condition to evaluate.\n * @param {string | Error} [message] - The error message to throw if the condition is false.\n * @returns {void} Returns void if the condition is true.\n * @throws {Error} Throws an error if the condition is false.\n *\n * @example\n * // This call will succeed without any errors\n * invariant(true, 'This should not throw');\n *\n * // This call will fail and throw an error with the message 'This should throw'\n * invariant(false, 'This should throw');\n *\n * // Example of using invariant with a condition\n * invariant(condition, 'Expected condition is false');\n *\n * // Ensure that the value is neither null nor undefined\n * invariant(value !== null && value !== undefined, 'Value should not be null or undefined');\n *\n * // Example of using invariant to check if a number is positive\n * invariant(number > 0, 'Number must be positive');\n */\nexport function invariant(condition: unknown, message: string | Error): asserts condition {\n  if (condition) {\n    return;\n  }\n\n  if (typeof message === 'string') {\n    throw new Error(message);\n  }\n\n  throw message;\n}\n"
  },
  {
    "path": "tests/__proto__.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { merge, mergeWith, toMerged } from 'es-toolkit';\nimport { get, merge as mergeCompat, mergeWith as mergeWithCompat, set, unset, zipObjectDeep } from '../src/compat';\n\ndescribe('__proto__', () => {\n  it('should not be polluted in merge', () => {\n    merge({}, { ['__proto__']: { polluted: 'yes' } });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in toMerged', () => {\n    toMerged({}, { ['__proto__']: { polluted: 'yes' } });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in mergeWith', () => {\n    mergeWith({}, { ['__proto__']: { polluted: 'yes' } }, (x, y) => {\n      if (typeof x === 'number' && typeof y === 'number') {\n        return x + y;\n      }\n    });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in compat/merge', () => {\n    mergeCompat({}, { ['__proto__']: { polluted: 'yes' } });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in compat/mergeWith', () => {\n    mergeWithCompat({}, { ['__proto__']: { polluted: 'yes' } }, (x, y) => {\n      if (typeof x === 'number' && typeof y === 'number') {\n        return x + y;\n      }\n    });\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in compat/set', () => {\n    set({}, '__proto__.polluted', 'yes');\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in compat/zipObjectDeep', () => {\n    zipObjectDeep(['__proto__.polluted'], ['yes']);\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-expect-error\n    expect({}.polluted).toBeUndefined();\n  });\n\n  it('should not be polluted in compat/unset', () => {\n    unset({}, '__proto__.toString');\n\n    expect({}.toString).not.toBeUndefined();\n\n    const object = { a: 1 };\n    expect(unset(object, '__proto__')).toBe(false);\n    expect(unset(object, { toString: () => '__proto__' } as any)).toBe(false);\n    expect(unset(object, ['a', '__proto__'])).toBe(false);\n  });\n\n  it('should not be polluted in compat/get', () => {\n    const object = { a: 1 };\n    expect(get(object, '__proto__')).toBeUndefined();\n    expect(get(object, { toString: () => '__proto__' } as any)).toBeUndefined();\n    expect(get(object, ['a', '__proto__'])).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "tests/check-dist.spec.ts",
    "content": "import { beforeAll, describe, expect, it } from 'vitest';\nimport { execa } from 'execa';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { Readable } from 'node:stream';\nimport { createPackageTarball } from './utils/createPackageTarball';\nimport { createTmpDir } from './utils/createTmpDir';\nimport { parseTar } from './utils/parseTar';\nimport { streamToBuffer } from './utils/streamToBuffer';\n\nasync function getPackageJsonOfTarball(tarballPath: string) {\n  for await (const entry of parseTar(await fs.promises.readFile(tarballPath))) {\n    if (entry.path === 'package/package.json') {\n      const json = (await streamToBuffer(entry as unknown as Readable)).toString('utf-8');\n\n      return JSON.parse(json);\n    }\n  }\n\n  throw new Error(`package.json not found.`);\n}\n\nconst ENTRYPOINTS = [\n  '.',\n  './array',\n  './compat',\n  './compat/*',\n  './error',\n  './function',\n  './map',\n  './math',\n  './object',\n  './predicate',\n  './promise',\n  './set',\n  './string',\n  './util',\n];\n\ndescribe(`es-toolkit's package tarball`, () => {\n  let tarball: { path: string };\n\n  beforeAll(async () => {\n    tarball = await createPackageTarball();\n  }, 300000);\n\n  it('configures all entrypoints correctly', { timeout: 240_000 }, async () => {\n    const packageJson = await getPackageJsonOfTarball(tarball.path);\n    const entrypoints = Object.keys(packageJson.exports);\n\n    expect(entrypoints).toEqual([...ENTRYPOINTS, './package.json']);\n  });\n\n  it('exports identical functions in CJS and ESM', { timeout: 120_000 }, async () => {\n    const tmpdir = await createTmpDir();\n\n    const packageJson = {\n      dependencies: {\n        'es-toolkit': tarball.path,\n      },\n    };\n\n    await fs.promises.writeFile(path.join(tmpdir, 'package.json'), JSON.stringify(packageJson, null, 2));\n    await execa('npm', ['install'], { cwd: tmpdir });\n\n    for (const entrypoint of ENTRYPOINTS) {\n      if (entrypoint.includes('*')) {\n        continue;\n      }\n\n      const cjsScript = `\nconst toolkit = require(\"${path.join('es-toolkit', entrypoint)}\");\n\nconst exported = Object.entries(toolkit)\n  .map(([k, v]) => [k, typeof v])\n  .sort((x, y) => x[0].localeCompare(y[0]));\n\nconsole.log(\"${path.join('es-toolkit', entrypoint)}\");\nconsole.log(exported);\n      `.trim();\n      const cjsScriptPath = path.join(tmpdir, 'script.cjs');\n\n      const esmScript = `\nconst toolkit = await import(\"${path.join('es-toolkit', entrypoint)}\");\n\nconst exported = Object.entries(toolkit)\n  .map(([k, v]) => [k, typeof v])\n  .sort((x, y) => x[0].localeCompare(y[0]));\n\nconsole.log(\"${path.join('es-toolkit', entrypoint)}\");\nconsole.log(exported);\n      `.trim();\n      const esmScriptPath = path.join(tmpdir, 'script.mjs');\n\n      await fs.promises.writeFile(cjsScriptPath, cjsScript);\n      await fs.promises.writeFile(esmScriptPath, esmScript);\n\n      const cjsResult = await execa('node', [cjsScriptPath]);\n      const esmResult = await execa('node', [esmScriptPath]);\n\n      expect(cjsResult.stdout).toEqual(esmResult.stdout);\n    }\n  });\n});\n"
  },
  {
    "path": "tests/utils/createPackageTarball.ts",
    "content": "import { execa } from 'execa';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport async function createPackageTarball() {\n  const tmpdir = path.resolve(os.tmpdir(), '.es-toolkit');\n  const tarballPath = path.resolve(tmpdir, 'package.tgz');\n\n  await fs.promises.mkdir(tmpdir, { recursive: true });\n\n  await execa('yarn', ['pack', '--out', tarballPath]);\n\n  return {\n    path: tarballPath,\n  };\n}\n"
  },
  {
    "path": "tests/utils/createTmpDir.ts",
    "content": "import { randomUUID } from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport async function createTmpDir() {\n  const tmpdir = path.resolve(os.tmpdir(), '.es-toolkit', randomUUID());\n  await fs.promises.mkdir(tmpdir, { recursive: true });\n\n  return tmpdir;\n}\n"
  },
  {
    "path": "tests/utils/parseTar.ts",
    "content": "import { PassThrough } from 'node:stream';\nimport * as tar from 'tar';\n\nexport async function* parseTar(tgz: Buffer) {\n  const parser: tar.ParseStream = new tar.Parse();\n\n  const passthrough = new PassThrough({ objectMode: true, autoDestroy: true, emitClose: true });\n\n  parser.on(`entry`, (entry: tar.ReadEntry) => {\n    passthrough.write(entry);\n  });\n\n  parser.on(`error`, error => {\n    passthrough.destroy(error);\n  });\n\n  parser.on(`close`, () => {\n    if (!passthrough.destroyed) {\n      passthrough.end();\n    }\n  });\n\n  parser.end(tgz);\n\n  for await (const entry of passthrough) {\n    const it = entry as tar.ReadEntry;\n    yield it;\n    it.resume();\n  }\n}\n"
  },
  {
    "path": "tests/utils/streamToBuffer.ts",
    "content": "import { Readable } from 'node:stream';\n\nexport async function streamToBuffer(stream: Readable) {\n  return await new Promise<Buffer>((resolve, reject) => {\n    const chunks: Buffer[] = [];\n\n    stream.on(`error`, error => {\n      reject(error);\n    });\n\n    stream.on(`data`, chunk => {\n      chunks.push(chunk);\n    });\n\n    stream.on(`end`, () => {\n      resolve(Buffer.concat(chunks));\n    });\n  });\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"noEmit\": true,\n    \"allowImportingTsExtensions\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src\", \".scripts/**/*\", \"**/*.spec.ts\"],\n  \"exclude\": [\".scripts/docs/**/*\"]\n}\n"
  },
  {
    "path": "vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\nimport packageJson from './package.json';\n\nexport default defineConfig({\n  test: {\n    name: packageJson.name,\n    exclude: ['./benchmarks/**/*', '.yarn/**/*'],\n    coverage: {\n      provider: 'istanbul',\n      include: ['src/**/*'],\n      exclude: ['src/compat/_internal/**/*', 'src/**/*.spec.ts'],\n    },\n    watch: false,\n    deps: {\n      optimizer: {\n        ssr: {\n          enabled: true,\n          include: ['es-toolkit', 'es-toolkit/compat'],\n        },\n      },\n    },\n  },\n});\n"
  }
]